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m9yICIpICE9IHN0ZDo6c3RyaW5nOjpucG9zKSB8fAotICAgICAgICAgICAoY29uc29sZS5yZmluZCgiY2hhcmdlcjogWyIpICE9IHN0ZDo6c3RyaW5nOjpucG9zKSkpIHsKLSAgICAgICAgcmV0ID0gImNvbGQiOwotICAgICAgfQorICAgICAgKHZvaWQpYWRkS2VybmVsUGFuaWNTdWJSZWFzb24oY29uc29sZSwgcmV0KTsKICAgICB9CiAKICAgICAvLyBUT0RPOiB1c2UgdGhlIEhBTCB0byBnZXQgYmF0dGVyeSBsZXZlbCAoaHR0cDovL2IvNzc3MjU3MDIpLgpkaWZmIC0tZ2l0IGEvZGVidWdnZXJkL0FuZHJvaWQuYnAgYi9kZWJ1Z2dlcmQvQW5kcm9pZC5icAppbmRleCBkMjBkZTZiLi4zMjU3YTJjIDEwMDY0NAotLS0gYS9kZWJ1Z2dlcmQvQW5kcm9pZC5icAorKysgYi9kZWJ1Z2dlcmQvQW5kcm9pZC5icApAQCAtMTIsNiArMTIsNyBAQAogICAgICAgICAiLVduby11bnVzZWQtYXJndW1lbnQiLAogICAgICAgICAiLVduby11bnVzZWQtZnVuY3Rpb24iLAogICAgICAgICAiLVduby1udWxsYWJpbGl0eS1jb21wbGV0ZW5lc3MiLAorICAgICAgICAiLVduby1yZW9yZGVyLWluaXQtbGlzdCIsCiAgICAgICAgICItT3MiLAogICAgICAgICAiLWZuby1maW5pdGUtbG9vcHMiLAogICAgICAgICAiLURBTkRST0lEX0RFQlVHR0FCTEU9MCIsCkBAIC0yMCw4ICsyMSwxMSBAQAogICAgIGxvY2FsX2luY2x1ZGVfZGlyczogWyJpbmNsdWRlIl0sCiAgICAgcHJvZHVjdF92YXJpYWJsZXM6IHsKICAgICAgICAgZGVidWdnYWJsZTogewotICAgICAgICAgICAgY2ZsYWdzOiBbIi1VQU5EUk9JRF9ERUJVR0dBQkxFIiwgIi1EQU5EUk9JRF9ERUJVR0dBQkxFPTEiXSwKLSAgICAgICAgfQorICAgICAgICAgICAg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iAgICAgICAgICJsaWJsb2dfaGVhZGVycyIsCisgICAgICAgICJzY3Vkb19oZWFkZXJzIiwKICAgICBdLAogCiAgICAgc3RhdGljX2xpYnM6IFsKLSAgICAgICAgImxpYmRleGZpbGVfc3VwcG9ydCIsICAvLyBsaWJ1bndpbmRzdGFjayBkZXBlbmRlbmN5CisgICAgICAgICJsaWJkZXhmaWxlX3N1cHBvcnQiLCAvLyBsaWJ1bndpbmRzdGFjayBkZXBlbmRlbmN5CiAgICAgICAgICJsaWJ1bndpbmRzdGFjayIsCiAgICAgICAgICJsaWJsem1hIiwKICAgICAgICAgImxpYmJhc2UiLAogICAgICAgICAibGliY3V0aWxzIiwKICAgICBdLAotICAgIHJ1bnRpbWVfbGliczogWwotICAgICAgICAibGliZGV4ZmlsZSIsICAgICAgICAgICAvLyBsaWJkZXhmaWxlX3N1cHBvcnQgZGVwZW5kZW5jeQotICAgIF0sCiAKICAgICB3aG9sZV9zdGF0aWNfbGliczogWworICAgICAgICAibGliZGVidWdnZXJkX3RvbWJzdG9uZV9wcm90b190b190ZXh0IiwKICAgICAgICAgImxpYmFzeW5jX3NhZmUiLAogICAgICAgICAiZ3dwX2FzYW5fY3Jhc2hfaGFuZGxlciIsCiAgICAgICAgICJsaWJ0b21ic3RvbmVfcHJvdG8iLAogICAgICAgICAibGlicHJvY2luZm8iLAogICAgICAgICAibGlicHJvdG9idWYtY3BwLWxpdGUiLAorICAgICAgICAibGlic2N1ZG8iLAogICAgIF0sCiAKICAgICB0YXJnZXQ6IHsKQEAgLTI1MCw2ICsyOTksMTkgQEAKICAgICAgICAgICAgICAgICAibGliZGV4ZmlsZSIsCiAgICAgICAgICAgICBdLAogICAgICAgICB9LAorICAgICAgICByYW1kaXNrOiB7CisgICAgICAgICAgICBleGNsdWRlX3N0YXRpY19saWJzOiBbCisgICAgICAgICAgICAgICAgImxpYmRleGZpbGVfc3VwcG9ydCIsCisgICAgICAgICAgICBdLAorICAgICAgICAgICAgZXhjbHVkZV9ydW50aW1lX2xpYnM6IFsKKyAgICAgICAgICAgICAgICAibGliZGV4ZmlsZSIsCisgICAgICAgICAgICBdLAorICAgICAgICB9LAorICAgICAgICBhbmRyb2lkOiB7CisgICAgICAgICAgICBydW50aW1lX2xpYnM6IFsKKyAgICAgICAgICAgICAgICAibGliZGV4ZmlsZSIsIC8vIGxpYmRleGZpbGVfc3VwcG9ydCBkZXBlbmRlbmN5CisgICAgICAgICAgICBdLAorICAgICAgICB9LAogICAgIH0sCiAKICAgICBwcm9kdWN0X3ZhcmlhYmxlczogewpAQCAtMjU3LDI2ICszMTksMzAgQEAKICAgICAgICAgICAgIGNmbGFnczogWyItRFJPT1RfUE9TU0lCTEUiXSwKICAgICAgICAgfSwKIAotICAgICAgICBtYWxsb2Nfbm90X3N2ZWx0ZTogewotICAgICAgICAgICAgY2ZsYWdzOiBbIi1EVVNFX1NDVURPIl0sCi0gICAgICAgICAgICB3aG9sZV9zdGF0aWNfbGliczogWyJsaWJzY3VkbyJdLAotICAgICAgICAgICAgc3JjczogWyJsaWJkZWJ1Z2dlcmQvc2N1ZG8uY3BwIl0sCi0gICAgICAgICAgICBoZWFkZXJfbGliczogWyJzY3Vkb19oZWFkZXJzIl0sCisgICAgICAgIG1hbGxvY19sb3dfbWVtb3J5OiB7CisgICAgICAgICAgICBjZmxhZ3M6IFsiLVVVU0VfU0NVRE8iXSwKKyAgICAgICAgICAgIGV4Y2x1ZGVfc3RhdGljX2xpYnM6IFsibGlic2N1ZG8iXSwKICAgICAgICAgfSwKICAgICB9LAorICAgIGFwZXhfYXZhaWxhYmxlOiBbCisgICAgICAgICJjb20uYW5kcm9pZC5ydW50aW1lIiwKKyAgICBdLAogfQogCiBjY19iaW5hcnkgewogICAgIG5hbWU6ICJwYnRvbWJzdG9uZSIsCisgICAgaG9zdF9zdXBwb3J0ZWQ6IHRydWUsCiAgICAgZGVmYXVsdHM6IFsiZGVidWdnZXJkX2RlZmF1bHRzIl0sCi0gICAgc3JjczogWyJwYnRvbWJzd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lc3NhZ2UuaD4KQEAgLTY3LDcgKzcwLDcgQEAKICNpbmNsdWRlICJjcmFzaF90ZXN0LmgiCiAjaW5jbHVkZSAiZGVidWdnZXJkL2hhbmRsZXIuaCIKICNpbmNsdWRlICJndGVzdC9ndGVzdC5oIgotI2luY2x1ZGUgImxpYmRlYnVnZ2VyZC91dGlsaXR5LmgiCisjaW5jbHVkZSAibGliZGVidWdnZXJkL3V0aWxpdHlfaG9zdC5oIgogI2luY2x1ZGUgInByb3RvY29sLmgiCiAjaW5jbHVkZSAidG9tYnN0b25lZC90b21ic3RvbmVkLmgiCiAjaW5jbHVkZSAidXRpbC5oIgpAQCAtOTQsNyArOTcsNyBAQAogICAgIGlmIChzaWdhY3Rpb24oU0lHQUxSTSwgJm5ld19zaWdhY3Rpb24sICZvbGRfc2lnYWN0aW9uKSAhPSAwKSB7IFwKICAgICAgIGVycigxLCAic2lnYWN0aW9uIGZhaWxlZCIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGFsYXJtKHNlY29uZHMpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICBhbGFybShzZWNvbmRzICogYW5kcm9pZDo6YmFzZTo6SHdUaW1lb3V0TXVsdGlwbGllcigpKTsgICAgICAgICBcCiAgICAgYXV0byB2YWx1ZSA9IGV4cHI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgIGludCBzYXZlZF9lcnJubyA9IGVycm5vOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICBpZiAoc2lnYWN0aW9uKFNJR0FMUk0sICZvbGRfc2lnYWN0aW9uLCBudWxscHRyKSAhPSAwKSB7ICAgICAgICBcCkBAIC0xMTQsNyArMTE3LDcgQEAKICAgICAgIC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9ybWF0X2xvZyhBTkRST0lEX0xPR19FUlJPUiwgImxpYmMiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlVuYWJsZSB0byBlbmFibGUgZmFsbGJhY2sgYWxsb2NhdG9yLCBhbHJlYWR5IGluIHVzZS4iKTsKKyAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIGVuYWJsZWRfOworICB9CisKKyAgdm9pZCBEaXNhYmxlKCkgeworICAgIGlmIChlbmFibGVkXykgeworICAgICAgX19saW5rZXJfZGlzYWJsZV9mYWxsYmFja19hbGxvY2F0b3IoKTsKKyAgICAgIGVuYWJsZWRfID0gZmFsc2U7CisgICAgfQorICB9CisKKyAgYm9vbCBlbmFibGVkKCkgeyByZXR1cm4gZW5hYmxlZF87IH0KKworIHByaXZhdGU6CisgIGJvb2wgZW5hYmxlZF8gPSBmYWxzZTsKK307CisKIHN0YXRpYyB2b2lkIGRlYnVnZ2VyZF9mYWxsYmFja190cmFjZShpbnQgb3V0cHV0X2ZkLCB1Y29udGV4dF90KiB1Y29udGV4dCkgewotICBpZiAoIV9fbGlua2VyX2VuYWJsZV9mYWxsYmFja19hbGxvY2F0b3IoKSkgewotICAgIGFzeW5jX3NhZmVfZm9ybWF0X2xvZyhBTkRST0lEX0xPR19FUlJPUiwgImxpYmMiLCAiZmFsbGJhY2sgYWxsb2NhdG9yIGFscmVhZHkgaW4gdXNlIik7Ci0gICAgcmV0dXJuOwotICB9CisgIHN0ZDo6dW5pcXVlX3B0cjx1bndpbmRzdGFjazo6UmVncz4gcmVnczsKIAotICB7Ci0gICAgc3RkOjp1bmlxdWVfcHRyPHVud2luZHN0YWNrOjpSZWdzPiByZWdzOworICBUaHJlYWRJbmZvIHRocmVhZDsKKyAgdGhyZWFkLnBpZCA9IGdldHBpZCgpOworICB0aHJlYWQudGlkID0gZ2V0dGlkKCk7CisgIHRocmVhZC50aHJlYWRfbmFtZSA9IGdldF90aHJlYWRfbmFtZShnZXR0aWQoKSk7CisgIHRocmVhZ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ZXQoKSwgdGlkKSkgeworICAgICAgICAgICAgYXN5bmNfc2FmZV9mb3JtYXRfbG9nKEFORFJPSURfTE9HX0VSUk9SLCAibGliYyIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInRpbWVvdXQgZXhwaXJlZCB3aGlsZSB3YWl0aW5nIGZvciB0aHJlYWQgJWQgdG8gZHVtcCIsIHRpZCk7CisgICAgICAgICAgfQorICAgICAgICB9IGVsc2UgewogICAgICAgICAgIGFzeW5jX3NhZmVfZm9ybWF0X2xvZyhBTkRST0lEX0xPR19FUlJPUiwgImxpYmMiLCAiZmFpbGVkIHRvIHNlbmQgdHJhY2Ugc2lnbmFsIHRvICVkOiAlcyIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpZCwgc3RyZXJyb3IoZXJybm8pKTsKLSAgICAgICAgICByZXR1cm47CiAgICAgICAgIH0KIAotICAgICAgICBib29sIHN1Y2Nlc3MgPSBmb3J3YXJkX291dHB1dChwaXBlX3JlYWQuZ2V0KCksIG91dHB1dF9mZC5nZXQoKSwgdGlkKTsKLSAgICAgICAgaWYgKCFzdWNjZXNzKSB7Ci0gICAgICAgICAgYXN5bmNfc2FmZV9mb3JtYXRfbG9nKEFORFJPSURfTE9HX0VSUk9SLCAibGliYyIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJ0aW1lb3V0IGV4cGlyZWQgd2hpbGUgd2FpdGluZyBmb3IgdGhyZWFkICVkIHRvIGR1bXAiLCB0aWQpOworICAgICAgICAvLyBUaGUgdGhyZWFkIHNob3VsZCBiZSBmaW5pc2hlZCBub3csIHNvIHRyeSBhbmQgcmUtZW5hYmxlIHRoZSBmYWxsYmFjayBhbGxvY2F0b3IuCisgICAgICAgIGlmICghYWxsb2NhdG9yLkVuYWJsZSgpKSB7CisgICAgICAgICAgcmV0dXJuOwogICAgICAgICB9CiAKICAgICAgICAgLy8gUmVnYXJkbGVzcyBvZiB3aGV0aGVyIHRoZSBwb2x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0ciwgbnVsbHB0cik7Ci0gICAgYXN5bmNfc2FmZV9mb3JtYXRfbG9nKEFORFJPSURfTE9HX0ZBVEFMLCAibGliYyIsICJmYWlsZWQgdG8gZXhlYyBjcmFzaF9kdW1wIGhlbHBlcjogJXMiLAotICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlcnJvcihlcnJubykpOworICAgIGFzeW5jX3NhZmVfZm9ybWF0X2xvZyhBTkRST0lEX0xPR19GQVRBTCwgImxpYmMiLCAiJXM6IGZhaWxlZCB0byBleGVjIGNyYXNoX2R1bXAgaGVscGVyOiAlcyIsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGdldF91bndpbmRfdHlwZSh0aHJlYWRfaW5mbyksIHN0cmVycm9yKGVycm5vKSk7CiAgICAgcmV0dXJuIDE7CiAgIH0KIApAQCAtNDcxLDI2ICs1MzEsMzAgQEAKICAgfSBlbHNlIHsKICAgICAvLyBTb21ldGhpbmcgd2VudCB3cm9uZywgbG9nIGl0LgogICAgIGlmIChyYyA9PSAtMSkgewotICAgICAgYXN5bmNfc2FmZV9mb3JtYXRfbG9nKEFORFJPSURfTE9HX0ZBVEFMLCAibGliYyIsICJyZWFkIG9mIElQQyBwaXBlIGZhaWxlZDogJXMiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmVycm9yKGVycm5vKSk7CisgICAgICBhc3luY19zYWZlX2Zvcm1hdF9sb2coQU5EUk9JRF9MT0dfRkFUQUwsICJsaWJjIiwgIiVzOiByZWFkIG9mIElQQyBwaXBlIGZhaWxlZDogJXMiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldF91bndpbmRfdHlwZSh0aHJlYWRfaW5mbyksIHN0cmVycm9yKGVycm5vKSk7CiAgICAgfSBlbHNlIGlmIChyYyA9PSAwKSB7CiAgICAgICBhc3luY19zYWZlX2Zvcm1hdF9sb2coQU5EUk9JRF9MT0dfRkFUQUwsICJsaWJjIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAiY3Jhc2hfZHVtcCBoZWxwZXIgZmFpbGVkIHRvIGV4ZWMsIG9yIHdhcyBraWxsZWQiKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAiJXM6IGNyYXNoX2R1bXAgaGVscGVyIGZhaWxlZCB0byBleGVjLCBvciB3YXMga2lsbGVkIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRfdW53aW5kX3R5cGUodGhyZWFkX2luZm8pKTsKICAgICB9IGVsc2UgaWYgKHJjICE9IDEpIHsKICAgICAgIGFzeW5jX3NhZmVfZm9ybWF0X2xvZyhBTkRST0lEX0xPR19GQVRBTCwgImxpYmMiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICJyZWFkIG9mIElQQyBwaXBlIHJldHVybmVkIHVuZXhwZWN0ZWQgdmFsdWU6ICV6ZCIsIHJjKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAiJXM6IHJlYWQgb2YgSVBDIHBpcGUgcmV0dXJuZWQgdW5leHBlY3RlZCB2YWx1ZTogJXpkIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRfdW53aW5kX3R5cGUodGhyZWFkX2luZm8pLCByYyk7CiAgICAgfSBlbHNlIGlmIChidWZbMF0gIT0gJ1wxJykgewotICAgICAgYXN5bmNfc2FmZV9mb3JtYXRfbG9nKEFORFJPSURfTE9HX0ZBVEFMLCAibGliYyIsICJjcmFzaF9kdW1wIGhlbHBlciByZXBvcnRlZCBmYWlsdXJlIik7CisgICAgICBhc3luY19zYWZlX2Zvcm1hdF9sb2coQU5EUk9JRF9MT0dfRkFUQUwsICJsaWJjIiwgIiVzOiBjcmFzaF9kdW1wIGhlbHBlciByZXBvcnRlZCBmYWlsdXJlIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZXRfdW53aW5kX3R5cGUodGhyZWFkX2luZm8pKTsKICAgICB9CiAgIH0KIAogICAvLyBEb24ndCBsZWF2ZSBhIHpvbWJpZSBjaGlsZC4KICA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GFyZ2V0X3RscyArPSBzaXplb2Yodm9pZCopICogVExTX1NMT1RfU1RBQ0tfTVRFOworICB1aW50cHRyX3Qgc3RhY2tfbXRlOworICBpZiAoIXByb2Nlc3NfbWVtb3J5LT5SZWFkRnVsbHkodGFyZ2V0X3RscywgJnN0YWNrX210ZSwgc2l6ZW9mKHN0YWNrX210ZSkpKSB7CisgICAgYXN5bmNfc2FmZV9mb3JtYXRfbG9nKEFORFJPSURfTE9HX0VSUk9SLCBMT0dfVEFHLAorICAgICAgICAgICAgICAgICAgICAgICAgICAiZHVtcF9zdGFja19oaXN0b3J5OiBmYWlsZWQgdG8gcmVhZCBUTFNfU0xPVF9TVEFDS19NVEU6ICVtIik7CisgICAgcmV0dXJuOworICB9CisgIGlmIChzdGFja19tdGUgPT0gMCkgeworICAgIGFzeW5jX3NhZmVfZm9ybWF0X2xvZyhBTkRST0lEX0xPR19ERUJVRywgTE9HX1RBRywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgImR1bXBfc3RhY2tfaGlzdG9yeTogc3RhY2sgaGlzdG9yeSBidWZmZXIgaXMgbnVsbCIpOworICAgIHJldHVybjsKKyAgfQorICB1aW50cHRyX3QgdW50YWdnZWRfc3RhY2tfbXRlID0gdW50YWdfYWRkcmVzcyhzdGFja19tdGUpOworICB1aW50cHRyX3QgYnVmX3NpemUgPSBzdGFja19tdGVfcmluZ2J1ZmZlcl9zaXplX2Zyb21fcG9pbnRlcihzdGFja19tdGUpOworICBpZiAoYnVmX3NpemUgPT0gMCkgeworICAgIGFzeW5jX3NhZmVfZm9ybWF0X2xvZyhBTkRST0lEX0xPR19FUlJPUiwgTE9HX1RBRywgImR1bXBfc3RhY2tfaGlzdG9yeTogZW1wdHkgc2l6ZSIpOworICAgIHJldHVybjsKKyAgfQorICB1aW50cHRyX3QgYnVmX3N0YXJ0ID0gdW50YWdnZWRfc3RhY2tfbXRlICYgfihidWZfc2l6ZSAtIDFVTEwpOworICBzdGQ6OnZlY3RvcjxjaGFyPi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worICAgIH0KKworICAgIFN0YWNrSGlzdG9yeUJ1ZmZlckVudHJ5KiBlbnRyeSA9IHNoYl9vYmouYWRkX2VudHJpZXMoKTsKKyAgICBmaWxsX2luX2JhY2t0cmFjZV9mcmFtZShlbnRyeS0+bXV0YWJsZV9hZGRyKCksIGZyYW1lX2RhdGEpOworICAgIGVudHJ5LT5zZXRfZnAoZnApOworICAgIGVudHJ5LT5zZXRfdGFnKHRhZyk7CisgIH0KK30KKworc3RhdGljIHBpZF90IGdldF9jb250YWluaW5nX3RocmVhZCh1bndpbmRzdGFjazo6TWFwSW5mbyogbWFwX2luZm8sIHBpZF90IG1haW5fdGlkKSB7CisgIGlmIChtYXBfaW5mbyA9PSBudWxscHRyKSByZXR1cm4gMDsKKworICBzdGQ6OnN0cmluZyBuYW1lID0gbWFwX2luZm8tPm5hbWUoKTsKKyAgaWYgKG5hbWUgPT0gIltzdGFja10iKSB7CisgICAgcmV0dXJuIG1haW5fdGlkOworICB9CisgIGludCB0aWQ7CisgIGlmIChzc2NhbmYobmFtZS5jX3N0cigpLCAiW2Fub246c3RhY2tfYW5kX3RsczolZCIsICZ0aWQpICE9IDEpIHsKKyAgICByZXR1cm4gMDsKKyAgfQorICByZXR1cm4gdGlkOworfQorCitzdGF0aWMgc3RkOjpvcHRpb25hbDxzdGQ6OnN0cmluZz4gbWF5YmVfc3RhY2tfbXRlX2NhdXNlKAorICAgIFRvbWJzdG9uZSogdG9tYnN0b25lLCB1bndpbmRzdGFjazo6QW5kcm9pZFVud2luZGVyKiB1bndpbmRlciwgY29uc3QgVGhyZWFkSW5mbyYgdGFyZ2V0X3RocmVhZCwKKyAgICBbW21heWJlX3VudXNlZF1dIGNvbnN0IHN0ZDo6bWFwPHBpZF90LCBUaHJlYWRJbmZvPiYgdGhyZWFkcywgdWludDY0X3QgZmF1bHRfYWRkcikgeworICB1bndpbmRzdGFjazo6TWFwcyogbWFwcyA9IHVud2luZGVyLT5HZXRNYXBzKCk7CisgIGF1dG8gbWFw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cHRlZCBieSBzaWduYWwsIHJldHJ5CiAgICAgICAgIGNvbnRpbnVlOwogICAgICAgfQotICAgICAgaWYgKGFjdHVhbCA9PSAtRUFHQUlOKSB7Ci0gICAgICAgIC8vIG5vbi1ibG9ja2luZyBFT0Y7IHdlJ3JlIGRvbmUKLSAgICAgICAgYnJlYWs7Ci0gICAgICB9IGVsc2UgewotICAgICAgICBicmVhazsKKyAgICAgIC8vIERvbid0IGNvbnNpZGVyIEVBR0FJTiBhbiBlcnJvciBzaW5jZSB0aGlzIGlzIGEgbm9uLWJsb2NraW5nIGNhbGwuCisgICAgICBpZiAoYWN0dWFsICE9IC1FQUdBSU4pIHsKKyAgICAgICAgYWRkX2Vycm9yX2xvZ19tc2codG9tYnN0b25lLCBhbmRyb2lkOjpiYXNlOjpTdHJpbmdQcmludGYoInJlYWRpbmcgbG9nICVzIGZhaWxlZCAoJXMpIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9nZ2VyLCBzdHJlcnJvcigtYWN0dWFsKSkpOwogICAgICAgfQorICAgICAgYnJlYWs7CiAgICAgfSBlbHNlIGlmIChhY3R1YWwgPT0gMCkgewogICAgICAgYnJlYWs7CiAgICAgfQpAQCAtNjE3LDI4ICs4MzEsMzUgQEAKIH0KIAogdm9pZCBlbmdyYXZlX3RvbWJzdG9uZV9wcm90byhUb21ic3RvbmUqIHRvbWJzdG9uZSwgdW53aW5kc3RhY2s6OkFuZHJvaWRVbndpbmRlciogdW53aW5kZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6bWFwPHBpZF90LCBUaHJlYWRJbmZvPiYgdGhyZWFkcywgcGlkX3QgdGFyZ2V0X3RocmVhZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgUHJvY2Vzc0luZm8mIHByb2Nlc3NfaW5mbywgY29uc3QgT3BlbkZpbGVzTGlzdCogb3Bl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VlIC8qIHN1cHBvcnRzX3Byb3RvICovKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIC8qIG1heF9jb25jdXJyZW50X2R1bXBzICovLCB0cnVlIC8qIHN1cHBvcnRzX3Byb3RvICovLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRydWUgLyogd29ybGRfcmVhZGFibGUgKi8pOwogICAgIHJldHVybiAmcXVldWU7CiAgIH0KIAogICBzdGF0aWMgQ3Jhc2hRdWV1ZSogZm9yX2FucnMoKSB7CiAgICAgc3RhdGljIENyYXNoUXVldWUgcXVldWUoIi9kYXRhL2FuciIsICJ0cmFjZV8iIC8qIGZpbGVfbmFtZV9wcmVmaXggKi8sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR2V0SW50UHJvcGVydHkoInRvbWJzdG9uZWQubWF4X2Fucl9jb3VudCIsIDY0KSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICA0IC8qIG1heF9jb25jdXJyZW50X2R1bXBzICovLCBmYWxzZSAvKiBzdXBwb3J0c19wcm90byAqLyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCAvKiBtYXhfY29uY3VycmVudF9kdW1wcyAqLywgZmFsc2UgLyogc3VwcG9ydHNfcHJvdG8gKi8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmFsc2UgLyogd29ybGRfcmVhZGFibGUgKi8pOwogICAgIHJldHVybiAmcXVldWU7CiAgIH0KIApAQCAtMTQ1LDE5ICsxNDcsMTggQEAKICAgICBzdGQ6Om9wdGlvbmFsPHN0ZDo6c3RyaW5nPiBwYXRoOwogICAgIHJlc3VsdC5mZC5yZXNldChvcGVuYXQoZGlyX2ZkXywgIi4iLCBPX1dST05MWSB8IE9fQVBQRU5EIHwgT19UTVBGSUxFIHwgT19DTE9FWEVDLCAwNjYwKSk7CiAgICAgaWYgKHJlc3VsdC5mZCA9PSAtMSkgewotICAgICAgLy8gV2UgbWlnaHQgbm90IGhhdmUgT19UTVBGSUx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hbmRyb2lkLmhhcmR3YXJlLmZhc3Rib290QDEuMSIsCiAgICAgICAgICJhbmRyb2lkLmhhcmR3YXJlLmZhc3Rib290LVYxLW5kayIsCiAgICAgICAgICJhbmRyb2lkLmhhcmR3YXJlLmhlYWx0aEAyLjAiLAotICAgICAgICAiYW5kcm9pZC5oYXJkd2FyZS5oZWFsdGgtVjItbmRrIiwKKyAgICAgICAgImFuZHJvaWQuaGFyZHdhcmUuaGVhbHRoLVYzLW5kayIsCiAgICAgICAgICJsaWJhc3luY2lvIiwKICAgICAgICAgImxpYmJhc2UiLAogICAgICAgICAibGliYmluZGVyX25kayIsCkBAIC0xODYsMjEgKzE4NiwyMSBAQAogICAgICAgICAibGlicHJvdG9idWYtY3BwLWxpdGUiLAogICAgICAgICAibGlic3BhcnNlIiwKICAgICAgICAgImxpYnV0aWxzIiwKKyAgICAgICAgImxpYnNlbGludXgiLAogICAgIF0sCiAKICAgICBzdGF0aWNfbGliczogWwogICAgICAgICAiYW5kcm9pZC5oYXJkd2FyZS5oZWFsdGgtdHJhbnNsYXRlLW5kayIsCi0gICAgICAgICJsaWJjKytmcyIsCiAgICAgICAgICJsaWJoZWFsdGhoYWx1dGlscyIsCiAgICAgICAgICJsaWJoZWFsdGhzaGltIiwKICAgICAgICAgImxpYmZhc3Rib290c2hpbSIsCiAgICAgICAgICJsaWJzbmFwc2hvdF9jb3ciLAogICAgICAgICAibGlibHo0IiwKKyAgICAgICAgImxpYnpzdGQiLAogICAgICAgICAibGlic25hcHNob3Rfbm9iaW5kZXIiLAogICAgICAgICAidXBkYXRlX21ldGFkYXRhLXByb3RvcyIsCiAgICAgICAgICJsaWJ1cmluZyIsCiAgICAgXSwKLSAgICBpbmNsdWRlX2RpcnM6IFsiYmlvbmljL2xpYmMva2VybmVsIl0sCiAKICAgICBoZWFkZXJfbGliczogWwogICAgICAgICAiYXZiX2hlYWRlcnMiLApAQCAtNDE1LDcgKzQxNSw2IEBACiAgICAgc3JjczogWyJ2ZW5kb3J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OwogCiBzdGF0aWMgdW5zaWduZWQgZ19iYXNlX2FkZHIgPSAweDEwMDAwMDAwOwpAQCAtMTE4LDYgKzExNSw5IEBACiBzdGF0aWMgc3RkOjp2ZWN0b3I8SW1hZ2U+IGltYWdlcyA9IHsKICAgICAgICAgLy8gY2xhbmctZm9ybWF0IG9mZgogICAgIHsgImJvb3QiLCAgICAgImJvb3QuaW1nIiwgICAgICAgICAiYm9vdC5zaWciLCAgICAgImJvb3QiLCAgICAgZmFsc2UsIEltYWdlVHlwZTo6Qm9vdENyaXRpY2FsIH0sCisgICAgeyAiYm9vdGxvYWRlciIsCisgICAgICAgICAgICAgICAgICAiYm9vdGxvYWRlci5pbWciLCAgICIiLCAgICAgICAgICAgICAiYm9vdGxvYWRlciIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnVlLCAgSW1hZ2VUeXBlOjpFeHRyYSB9LAogICAgIHsgImluaXRfYm9vdCIsCiAgICAgICAgICAgICAgICAgICAiaW5pdF9ib290LmltZyIsICAgICJpbml0X2Jvb3Quc2lnIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJpbml0X2Jvb3QiLApAQCAtMTMwLDYgKzEzMCw3IEBACiAgICAgeyAib2RtX2Rsa20iLCAib2RtX2Rsa20uaW1nIiwgICAgICJvZG1fZGxrbS5zaWciLCAib2RtX2Rsa20iLCB0cnVlLCAgSW1hZ2VUeXBlOjpOb3JtYWwgfSwKICAgICB7ICJwcm9kdWN0IiwgICJwcm9kdWN0LmltZyIsICAgICAgInByb2R1Y3Quc2lnIiwgICJwcm9kdWN0IiwgIHRydWUsICBJbWFnZVR5cGU6Ok5vcm1hbCB9LAogICAgIHsgInB2bWZ3IiwgICAgInB2bWZ3LmltZyIsICAgICAgICAicHZtZncuc2lnIiwgICAgInB2bWZ3IiwgICAgdHJ1ZSwgIEltYWdlVHlwZTo6Q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AgICAgICAgdHJhbnNwb3J0ID0gdGNwOjpDb25uZWN0KG5ldHdvcmtfc2VyaWFsLT5hZGRyZXNzLCBuZXR3b3JrX3NlcmlhbC0+cG9ydCwgJmVycm9yKTsKICAgICAgICAgICAgIH0gZWxzZSBpZiAobmV0d29ya19zZXJpYWwtPnByb3RvY29sID09IFNvY2tldDo6UHJvdG9jb2w6OmtVZHApIHsKLSAgICAgICAgICAgICAgICB0cmFuc3BvcnQgPSB1ZHA6OkNvbm5lY3QobmV0d29ya19zZXJpYWwtPmFkZHJlc3MsIG5ldHdvcmtfc2VyaWFsLT5wb3J0LCAmZXJyb3IpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAucmVsZWFzZSgpOworICAgICAgICAgICAgICAgIHRyYW5zcG9ydCA9IHVkcDo6Q29ubmVjdChuZXR3b3JrX3NlcmlhbC0+YWRkcmVzcywgbmV0d29ya19zZXJpYWwtPnBvcnQsICZlcnJvcik7CiAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgIGlmICh0cmFuc3BvcnQgPT0gbnVsbHB0ciAmJiBhbm5vdW5jZSkgeworICAgICAgICAgICAgaWYgKCF0cmFuc3BvcnQgJiYgYW5ub3VuY2UpIHsKICAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJlcnJvcjogIiA8PCBlcnJvcjsKICAgICAgICAgICAgIH0KICAgICAgICAgfSBlbHNlIGlmIChuZXR3b3JrX3NlcmlhbC5lcnJvcigpLmNvZGUoKSA9PQpAQCAtMzcyLDEyICszNzEsMTIgQEAKICAgICAgICAgICAgIEV4cGVjdChuZXR3b3JrX3NlcmlhbCk7CiAgICAgICAgIH0KIAotICAgICAgICBpZiAodHJhbnNwb3J0ICE9IG51bGxwdHIpIHsKKyAgICAgICAgaWYgKHRyYW5zcG9ydCkgewogICAgICAgICAgICAgcmV0dXJuIHRyYW5zcG9ydDsKICAgICAgICAgfQogCiAgICAgICAgIGlmICghd2FpdF9mb3JfZGV2aWNlKSB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wogdm9pZCBzeW50YXhfZXJyb3IoY29uc3QgY2hhciogZm10LCAuLi4pIHsKICAgICBmcHJpbnRmKHN0ZGVyciwgImZhc3Rib290OiB1c2FnZTogIik7CiAKQEAgLTU1MSw2ICs1NTIsMTIgQEAKICAgICAgICAgICAgICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2Vjb25kYXJ5IGltYWdlcyBtYXkgYmUgZmxhc2hlZCB0byBpbmFjdGl2ZSBzbG90LlxuIgogICAgICAgICAgICAgIiBmbGFzaCBQQVJUSVRJT04gW0ZJTEVOQU1FXSBGbGFzaCBnaXZlbiBwYXJ0aXRpb24sIHVzaW5nIHRoZSBpbWFnZSBmcm9tXG4iCiAgICAgICAgICAgICAiICAgICAgICAgICAgICAgICAgICAgICAgICAgICRBTkRST0lEX1BST0RVQ1RfT1VUIGlmIG5vIGZpbGVuYW1lIGlzIGdpdmVuLlxuIgorICAgICAgICAgICAgIiBmbGFzaCB2ZW5kb3JfYm9vdDpSQU1ESVNLIFtGSUxFTkFNRV1cbiIKKyAgICAgICAgICAgICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgRmxhc2ggdmVuZG9yX2Jvb3QgcmFtZGlzaywgZmV0Y2hpbmcgdGhlIGV4aXN0aW5nXG4iCisgICAgICAgICAgICAiICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZlbmRvcl9ib290IGltYWdlIGFuZCByZXBhY2thZ2luZyBpdCB3aXRoIHRoZSBuZXdcbiIKKyAgICAgICAgICAgICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmFtZGlzay5cbiIKKyAgICAgICAgICAgICIgLS1kdGIgRFRCICAgICAgICAgICAgICAgICAgSWYgc2V0IHdpdGggZmxhc2ggdmVuZG9yX2Jvb3Q6UkFNRElTSywgdGhlblxuIgorICAgICAgICAgICAgIiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1cGRhdGUgdGhlIHZlbmRvcl9ib290IGltYWdlIHdpdGggcHJvdmlkZWQgRFRCLlxuIgogICAgICAgICAgICAgIlxuIgogICAgICAgICAgICAgImJhc2ljczpcbiIKICAgICAgICAgICAgICIgZGV2aWNlcyBbLWxdICAgICAgICAgICAgICAgTGlzdCBkZXZpY2VzIGluIGJvb3Rsb2FkZXIgKC1sOiB3aXRoIGRldmljZSBwYXRocykuXG4iCkBAIC01NzAsNyArNTc3LDggQEAKICAgICAgICAgICAgICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgRm9ybWF0IGEgZmxhc2ggcGFydGl0aW9uLlxuIgogICAgICAgICAgICAgIiBzZXRfYWN0aXZlIFNMT1QgICAgICAgICAgICBTZXQgdGhlIGFjdGl2ZSBzbG90LlxuIgogICAgICAgICAgICAgIiBvZW0gW0NPTU1BTkQuLi5dICAgICAgICAgICBFeGVjdXRlIE9FTS1zcGVjaWZpYyBjb21tYW5kLlxuIgotICAgICAgICAgICAgIiBnc2kgd2lwZXxkaXNhYmxlICAgICAgICAgICBXaXBlIG9yIGRpc2FibGUgYSBHU0kgaW5zdGFsbGF0aW9uIChmYXN0Ym9vdGQgb25seSkuXG4iCisgICAgICAgICAgICAiIGdzaSB3aXBlfGRpc2FibGV8c3RhdHVzICAgIFdpcGUsIGRpc2FibGUgb3Igc2hvdyBzdGF0dXMgb2YgYSBHU0kgaW5zdGFsbGF0aW9uXG4iCisgICAgICAgICAgICAiICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmYXN0Ym9vdGQgb25seSkuXG4iCiAgICAgICAgICAgICAiIHdpcGUtc3VwZXIgW1NVUEVSX0VNUFRZXSAgIFdpcGUgdGhlIHN1cGVyIHBhcnRpdGlvbi4gVGhpcyB3aWxsIHJlc2V0IGl0IHRvXG4iCiAgICAgICAgICAgICAiICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW4gYW4gZW1wdHkgc2V0IG9mIGRlZmF1bHQgZHluYW1pYyBwYXJ0aXRpb25zLlxuIgogICAgICAgICAgICAgIiBjcmVhdGUtbG9naWNhbC1wYXJ0aXRpb24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S4KLSAgICAgICAgZnBfLT53YW50c193aXBlID0gZmFsc2U7CisgICAgcmV0dXJuOworfQorCitzdGQ6OnZlY3RvcjxzdGQ6OnVuaXF1ZV9wdHI8VGFzaz4+IEZsYXNoQWxsVG9vbDo6Q29sbGVjdFRhc2tzKCkgeworICAgIHN0ZDo6dmVjdG9yPHN0ZDo6dW5pcXVlX3B0cjxUYXNrPj4gdGFza3M7CisgICAgaWYgKGZwXy0+c2hvdWxkX3VzZV9mYXN0Ym9vdF9pbmZvKSB7CisgICAgICAgIHRhc2tzID0gQ29sbGVjdFRhc2tzRnJvbUZhc3Rib290SW5mbygpOworCisgICAgfSBlbHNlIHsKKyAgICAgICAgdGFza3MgPSBDb2xsZWN0VGFza3NGcm9tSW1hZ2VMaXN0KCk7CiAgICAgfQorICAgIGlmIChmcF8tPmV4Y2x1ZGVfZHluYW1pY19wYXJ0aXRpb25zKSB7CisgICAgICAgIGF1dG8gaXNfbm9uX3N0YXRpY19mbGFzaF90YXNrID0gWyZdKGNvbnN0IGF1dG8mIHRhc2spIC0+IGJvb2wgeworICAgICAgICAgICAgaWYgKGF1dG8gZmxhc2hfdGFzayA9IHRhc2stPkFzRmxhc2hUYXNrKCkpIHsKKyAgICAgICAgICAgICAgICBpZiAoIXNob3VsZF9mbGFzaF9pbl91c2Vyc3BhY2UoZnBfLT5zb3VyY2UuZ2V0KCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYXNoX3Rhc2stPkdldFBhcnRpdGlvbkFuZFNsb3QoKSkpIHsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHJldHVybiB0cnVlOworICAgICAgICB9OworICAgICAgICB0YXNrcy5lcmFzZShzdGQ6OnJlbW92ZV9pZih0YXNrcy5iZWdpbigpLCB0YXNrcy5lbmQoKSwgaXNfbm9uX3N0YXRpY19mbGFz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0aWMgdm9pZCBkb193aXBlX3N1cGVyKGNvbnN0IHN0ZDo6c3RyaW5nJiBpbWFnZSwgY29uc3Qgc3RkOjpzdHJpbmcmIHNsb3Rfb3ZlcnJpZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IEZsYXNoaW5nUGxhbiogZnApIHsKICAgICBpZiAoYWNjZXNzKGltYWdlLmNfc3RyKCksIFJfT0spICE9IDApIHsKICAgICAgICAgZGllKCJDb3VsZCBub3QgcmVhZCBpbWFnZTogJXMiLCBpbWFnZS5jX3N0cigpKTsKICAgICB9CkBAIC0yMTg4LDcgKzIyMDUsNyBAQAogICAgIH0KIAogICAgIHN0ZDo6c3RyaW5nIG1lc3NhZ2U7Ci0gICAgaWYgKCF3aXBlX3N1cGVyKCptZXRhZGF0YS5nZXQoKSwgc2xvdCwgJm1lc3NhZ2UpKSB7CisgICAgaWYgKCF3aXBlX3N1cGVyKCptZXRhZGF0YS5nZXQoKSwgc2xvdCwgJm1lc3NhZ2UsIGZwKSkgewogICAgICAgICBkaWUobWVzc2FnZSk7CiAgICAgfQogfQpAQCAtMjIzMCw2ICsyMjQ3LDkgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyJjbWRsaW5lIiwgcmVxdWlyZWRfYXJndW1lbnQsIDAsIDB9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ImRpc2FibGUtdmVyaWZpY2F0aW9uIiwgbm9fYXJndW1lbnQsIDAsIDB9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ImRpc2FibGUtdmVyaXR5Iiwgbm9fYXJndW1lbnQsIDAsIDB9LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ImRpc2FibGUtc3VwZXItb3B0aW1pemF0aW9uIiwgbm9fYXJndW1lbnQsIDAsIDB9LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ImV4Y2x1ZGUtZHluYW1pYy1wYXJ0aXRpb25zIiwgbm9fYXJndW1lbnQsIDAsIDB9LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ImRpc2FibGUtZmFzdGJvb3QtaW5mbyIsIG5vX2FyZ3VtZW50LCAwLCAwfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyJmb3JjZSIsIG5vX2FyZ3VtZW50LCAwLCAwfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyJmcy1vcHRpb25zIiwgcmVxdWlyZWRfYXJndW1lbnQsIDAsIDB9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ImhlYWRlci12ZXJzaW9uIiwgcmVxdWlyZWRfYXJndW1lbnQsIDAsIDB9LApAQCAtMjI1MSw3ICsyMjcxLDEwIEBACiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsidmVyc2lvbiIsIG5vX2FyZ3VtZW50LCAwLCAwfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgezAsIDAsIDAsIDB9fTsKIAotICAgIHNlcmlhbCA9IGdldGVudigiQU5EUk9JRF9TRVJJQUwiKTsKKyAgICBzZXJpYWwgPSBnZXRlbnYoIkZBU1RCT09UX0RFVklDRSIpOworICAgIGlmICghc2VyaWFsKSB7CisgICAgICAgIHNlcmlhbCA9IGdldGVudigiQU5EUk9JRF9TRVJJQUwiKTsKKyAgICB9CiAKICAgICBpbnQgYzsKICAgICB3aGlsZSAoKGMgPSBnZXRvcHRfbG9uZyhhcmdjLCBhcmd2LCAiYTo6aGxzOlM6dnciLCBsb25nb3B0cywgJmxvbmdpbmRleCkpICE9IC0xKSB7CkBAIC0yMjY1LDYgKzIyODgsMTMgQEAKICAgICAgICAgICAgICAgICBnX2Rpc2FibGVfdmVyaWZpY2F0aW9uID0gdHJ1ZTsKICAgICAgICAgICAgIH0gZWxzZSBpZiAobmFtZSA9PSAiZGlzYWJsZS12ZXJpdHkiKSB7CiAgICAgICAgICAgICAgICAgZ19kaXNhYmxlX3Zlcml0eSA9IHRydWU7CisgICAgICAgICAgICB9IGVsc2UgaWYgKG5hbWUgPT0gImRpc2FibGUtc3VwZXItb3B0aW1pemF0aW9uIikgeworICAgICAgICAgICAgICAgIGZwLT5zaG91bGRfb3B0aW1pemVfZmxhc2hfc3VwZXIgPSBmYWxzZTsKKyAgICAgICAgICAgIH0gZWxzZSBpZiAobmFtZSA9PSAiZXhjbHVkZS1keW5hbWljLXBhcnRpdGlvbnMiKSB7CisgICAgICAgICAgICAgICAgZnAtPmV4Y2x1ZGVfZHluYW1pY19wYXJ0aXRpb25zID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICBmcC0+c2hvdWxkX29wdGltaXplX2ZsYXNoX3N1cGVyID0gZmFsc2U7CisgICAgICAgICAgICB9IGVsc2UgaWYgKG5hbWUgPT0gImRpc2FibGUtZmFzdGJvb3QtaW5mbyIpIHsKKyAgICAgICAgICAgICAgICBmcC0+c2hvdWxkX3VzZV9mYXN0Ym9vdF9pbmZvID0gZmFsc2U7CiAgICAgICAgICAgICB9IGVsc2UgaWYgKG5hbWUgPT0gImZvcmNlIikgewogICAgICAgICAgICAgICAgIGZwLT5mb3JjZV9mbGFzaCA9IHRydWU7CiAgICAgICAgICAgICB9IGVsc2UgaWYgKG5hbWUgPT0gImZzLW9wdGlvbnMiKSB7CkBAIC0yMzIwLDcgKzIzNTAsNyBAQAogICAgICAgICAgICAgICAgICAgICBzZXJpYWwgPSBvcHRhcmc7CiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgIGNhc2UgJ1MnOgotICAgICAgICAgICAgICAgICAgICBpZiAoIWFuZHJvaWQ6OmJhc2U6OlBhcnNlQnl0ZUNvdW50KG9wdGFyZywgJnNwYXJzZV9saW1pdCkpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpQYX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90b191c2Vyc3BhY2VfZmFzdGJvb3QoKTsKICAgICAgICAgICAgIGZwXy0+ZmItPldhaXRGb3JEaXNjb25uZWN0KCk7CkBAIC04NCwyMCArMTAyLDI2IEBACiAgICAgfQogfQogCi1GbGFzaFN1cGVyTGF5b3V0VGFzazo6Rmxhc2hTdXBlckxheW91dFRhc2soY29uc3Qgc3RkOjpzdHJpbmcmIHN1cGVyX25hbWUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjp1bmlxdWVfcHRyPFN1cGVyRmxhc2hIZWxwZXI+IGhlbHBlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTcGFyc2VQdHIgc3BhcnNlX2xheW91dCwgdWludDY0X3Qgc3VwZXJfc2l6ZSkKK3N0ZDo6c3RyaW5nIFJlYm9vdFRhc2s6OlRvU3RyaW5nKCkgY29uc3QgeworICAgIHJldHVybiAicmVib290ICIgKyByZWJvb3RfdGFyZ2V0XzsKK30KKworT3B0aW1pemVkRmxhc2hTdXBlclRhc2s6Ok9wdGltaXplZEZsYXNoU3VwZXJUYXNrKGNvbnN0IHN0ZDo6c3RyaW5nJiBzdXBlcl9uYW1lLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6dW5pcXVlX3B0cjxTdXBlckZsYXNoSGVscGVyPiBoZWxwZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU3BhcnNlUHRyIHNwYXJzZV9sYXlvdXQsIHVpbnQ2NF90IHN1cGVyX3NpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgRmxhc2hpbmdQbGFuKiBmcCkKICAgICA6IHN1cGVyX25hbWVfKHN1cGVyX25hbWUpLAogICAgICAgaGVscGVyXyhzdGQ6Om1vdmUoaGVscGVyKSksCiAgICAgICBzcGFyc2V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SB7CiAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgfSBlbHNlIGlmIChhdXRvIHJlYm9vdF90YXNrID0gdGFzay0+QXNSZWJvb3RUYXNrKCkpIHsKLSAgICAgICAgICAgIHJldHVybiB0cnVlOworICAgICAgICAgICAgaWYgKHJlYm9vdF90YXNrLT5HZXRUYXJnZXQoKSA9PSAiZmFzdGJvb3QiKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgICAgICB9CiAgICAgICAgIH0KICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgIH07CisKICAgICB0YXNrcy5lcmFzZShzdGQ6OnJlbW92ZV9pZih0YXNrcy5iZWdpbigpLCB0YXNrcy5lbmQoKSwgcmVtb3ZlX2lmX2NhbGxiYWNrKSwgdGFza3MuZW5kKCkpOwogCi0gICAgcmV0dXJuIHN0ZDo6bWFrZV91bmlxdWU8Rmxhc2hTdXBlckxheW91dFRhc2s+KHN1cGVyX25hbWUsIHN0ZDo6bW92ZShoZWxwZXIpLCBzdGQ6Om1vdmUocyksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnRpdGlvbl9zaXplKTsKKyAgICByZXR1cm4gc3RkOjptYWtlX3VuaXF1ZTxPcHRpbWl6ZWRGbGFzaFN1cGVyVGFzaz4oc3VwZXJfbmFtZSwgc3RkOjptb3ZlKGhlbHBlciksIHN0ZDo6bW92ZShzKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFydGl0aW9uX3NpemUsIGZwKTsKIH0KIAogVXBkYXRlU3VwZXJUYXNrOjpVcGRhdGVTdXBlclRhc2soY29uc3QgRmxhc2hpbmdQbGFuKiBmcCkgOiBmcF8oZnApIHt9CkBAIC0yNjUsNiArMjYzLDkgQEAKICAgICB9CiAgICAgZnBfLT5mYi0+UmF3Q29tbWFuZChjb21tYW5kLCAiVXBkYXRp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09SUlJFQ1QpIHsKLSAgICBzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gY29ycmVjdF92ZXJzaW9ucyA9IHsKLSAgICAgICAgICAgICJ2ZXJzaW9uIDEuMCIsCi0gICAgICAgICAgICAidmVyc2lvbiAyMi4wMCIsCi0gICAgfTsKK1RFU1RfRihQYXJzZVRlc3QsIFZlcnNpb25DaGVja0NvcnJlY3QpIHsKKyAgICBzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gY29ycmVjdF92ZXJzaW9ucyA9IHsidmVyc2lvbiAxIiwgInZlcnNpb24gMjIiLCAidmVyc2lvbiA1IiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAidmVyc2lvbiAxNyJ9OwogCi0gICAgc3RkOjp2ZWN0b3I8c3RkOjpzdHJpbmc+IGJhZF92ZXJzaW9ucyA9IHsidmVyc2lvbiIsICAgICAgICAidmVyc2lvbiAuMDEiLCAidmVyc2lvbiB4MSIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAidmVyc2lvbiAxLjAuMSIsICAidmVyc2lvbiAxLiIsICAicyAxLjAiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInZlcnNpb24gMS4wIDIuMCJ9OworICAgIHN0ZDo6dmVjdG9yPHN0ZDo6c3RyaW5nPiBiYWRfdmVyc2lvbnMgPSB7InZlcnNpb24iLCAgICAgICAgICJ2ZXJzaW9uIC4wMSIsICAgICJ2ZXJzaW9uIHgxIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJ2ZXJzaW9uIDEuMC4xIiwgICAidmVyc2lvbiAxLiIsICAgICAicyAxLjAiLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgInZlcnNpb24gMS4wIDIuMCIsICJ2ZXJzaW9uIDEwMC4wMCIsICJ2ZXJzaW9u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J9LAorICAgICAgICAgICAgIGZhbHNlfSwKKyAgICB9OworCisgICAgZm9yIChhdXRvJiB0ZXN0IDogcGF0dGVybm1hdGNodGVzdCkgeworICAgICAgICBzdGQ6OnZlY3RvcjxzdGQ6OnVuaXF1ZV9wdHI8VGFzaz4+IHRhc2tzID0gUGFyc2VGYXN0Ym9vdEluZm8oZnAuZ2V0KCksIHRlc3QuZmlyc3QpOworICAgICAgICAvLyBDaGVjayB0byBtYWtlIHN1cmUgd2UgaGF2ZSBhbiBvcHRpbWl6ZWQgZmxhc2ggc3VwZXIgdGFzayAmJiBubyBtb3JlIGR5bmFtaWMgcGFydGl0aW9uCisgICAgICAgIC8vIGZsYXNoaW5nIHRhc2tzCisgICAgICAgIGF1dG8mJiBJc09wdGltaXplZCA9IFtdKGNvbnN0IEZsYXNoaW5nUGxhbiogZnAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6dmVjdG9yPHN0ZDo6dW5pcXVlX3B0cjxUYXNrPj4mIHRhc2tzKSB7CisgICAgICAgICAgICBib29sIGNvbnRhaW5zX29wdGltaXplZF90YXNrID0gZmFsc2U7CisgICAgICAgICAgICBmb3IgKGF1dG8mIHRhc2sgOiB0YXNrcykgeworICAgICAgICAgICAgICAgIGlmICh0YXNrLT5Bc09wdGltaXplZEZsYXNoU3VwZXJUYXNrKCkpIHsKKyAgICAgICAgICAgICAgICAgICAgY29udGFpbnNfb3B0aW1pemVkX3Rhc2sgPSB0cnVlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBpZiAoYXV0byBmbGFzaF90YXNrID0gdGFzay0+QXNGbGFzaFRhc2soKSkgeworICAgICAgICAgICAgICAgICAgICBpZiAoRmxhc2hUYXNrOjpJc0R5bmFtaWNQYXJ0aXRpb24oZnAtPnNvdXJjZS5nZXQoKSwgZmxhc2hfdGFzaykpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgIC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nVsay5sZW4gPSB4ZmVyOwotICAgICAgICBidWxrLmRhdGEgPSBkYXRhOwotICAgICAgICBidWxrLnRpbWVvdXQgPSBtc190aW1lb3V0XzsKKyAgICAgICAgICAgIHVyYltpXS50eXBlID0gVVNCREVWRlNfVVJCX1RZUEVfQlVMSzsKKyAgICAgICAgICAgIHVyYltpXS5lbmRwb2ludCA9IGhhbmRsZV8tPmVwX291dDsKKyAgICAgICAgICAgIHVyYltpXS5idWZmZXJfbGVuZ3RoID0geGZlcjsKKyAgICAgICAgICAgIHVyYltpXS5idWZmZXIgPSBkYXRhOworICAgICAgICAgICAgdXJiW2ldLnVzZXJjb250ZXh0ID0gKHZvaWQgKilpOwogCi0gICAgICAgIG4gPSBpb2N0bChoYW5kbGVfLT5kZXNjLCBVU0JERVZGU19CVUxLLCAmYnVsayk7Ci0gICAgICAgIGlmKG4gIT0geGZlcikgewotICAgICAgICAgICAgREJHKCJFUlJPUjogbiA9ICVkLCBlcnJubyA9ICVkICglcylcbiIsCi0gICAgICAgICAgICAgICAgbiwgZXJybm8sIHN0cmVycm9yKGVycm5vKSk7CisgICAgICAgICAgICBpbnQgbiA9IGlvY3RsKGhhbmRsZV8tPmRlc2MsIFVTQkRFVkZTX1NVQk1JVFVSQiwgJnVyYltpXSk7CisgICAgICAgICAgICBpZiAobiAhPSAwKSB7CisgICAgICAgICAgICAgICAgaWYgKGVycm5vID09IEVOT01FTSAmJiBtYXhfdXNiZnNfYnVsa193cml0ZV9zaXplXyA+IE1JTl9VU0JGU19CVUxLX1dSSVRFX1NJWkUpIHsKKyAgICAgICAgICAgICAgICAgICAgbWF4X3VzYmZzX2J1bGtfd3JpdGVfc2l6ZV8gLz0gMjsKKyAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIERCRygiaW9jdGwoVVNCREVWRlNfU1VCTUlUVVJCKSBmYWlsZWRcbiIpOworICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgcGVuZGluZ1tpXSA9IHRydWU7CisgICAgICAgICAgICBjb3VudCArPSB4ZmVyOworICAgICAgICAgICAgbGVuIC09IHhmZXI7CisgICAgICAgICAgICBkYXRhICs9IHhmZXI7CisKKyAgICAgICAgICAgIHJldHVybiB0cnVlOworICAgICAgICB9CisgICAgfTsKKworICAgIGF1dG8gcmVhcF91cmIgPSBbJl0oc2l6ZV90IGkpIHsKKyAgICAgICAgd2hpbGUgKHBlbmRpbmdbaV0pIHsKKyAgICAgICAgICAgIHN0cnVjdCB1c2JkZXZmc191cmIgKnVyYnA7CisgICAgICAgICAgICBpbnQgcmVzID0gaW9jdGwoaGFuZGxlXy0+ZGVzYywgVVNCREVWRlNfUkVBUFVSQiwgJnVyYnApOworICAgICAgICAgICAgaWYgKHJlcyAhPSAwKSB7CisgICAgICAgICAgICAgICAgREJHKCJpb2N0bChVU0JERVZGU19SRUFQVVJCKSBmYWlsZWRcbiIpOworICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHNpemVfdCBkb25lID0gKHNpemVfdCl1cmJwLT51c2VyY29udGV4dDsKKyAgICAgICAgICAgIGlmIChkb25lID49IDIgfHwgIXBlbmRpbmdbZG9uZV0pIHsKKyAgICAgICAgICAgICAgICBEQkcoInVuZXhwZWN0ZWQgdXJiXG4iKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAodXJicC0+c3RhdHVzICE9IDAgfHwgdXJicC0+YWN0dWFsX2xlbmd0aCAhPSB1cmJwLT5idWZmZXJfbGVuZ3RoKSB7CisgICAgICAgICAgICAgICAgREJHKCJ1cmIgcmV0dXJuZWQgZXJyb3JcbiIpOworICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHBlbmRpbmdbZG9uZV0gPSBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICB9OworCisgICAgaWYgKCFzdWJtaXRfdXJiKDApKSB7CisgICAgICAgIHJldHVybiAtMTsKKyAgICB9CisgICAgd2hpbGUgKGxlbiA+IDApIHsKKyAgICAgICAgaWYgKCFzdWJtaXRfdXJiKDEpKSB7CiAgICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgIH0KLQotICAgICAgICBjb3VudCArPSB4ZmVyOwotICAgICAgICBsZW4gLT0geGZlcjsKLSAgICAgICAgZGF0YSArPSB4ZmVyOwotICAgIH0gd2hpbGUobGVuID4gMCk7Ci0KKyAgICAgICAgaWYgKCFyZWFwX3VyYigwKSkgeworICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICB9CisgICAgICAgIGlmIChsZW4gPD0gMCkgeworICAgICAgICAgICAgaWYgKCFyZWFwX3VyYigxKSkgeworICAgICAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHJldHVybiBjb3VudDsKKyAgICAgICAgfQorICAgICAgICBpZiAoIXN1Ym1pdF91cmIoMCkpIHsKKyAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgfQorICAgICAgICBpZiAoIXJlYXBfdXJiKDEpKSB7CisgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKCFyZWFwX3VyYigwKSkgeworICAgICAgICByZXR1cm4gLTE7CisgICAgfQogICAgIHJldHVybiBjb3VudDsKIH0KIApAQCAtNDQ3LDcgKzUxOCw3IEBACiAgICAgfQogCiAgICAgd2hpbGUgKGxlbiA+IDApIHsKLSAgICAgICAgaW50IHhmZXIgPSAobGVuID4gTUFYX1VTQkZTX0JVTEtfU0laRSkgPyBNQVhfVVNCRlNfQlVMS19TSVpFIDogbGVuOworICAgICAgICBpbnQgeGZlciA9IChsZW4gPiBNQVhfVVNCRlNfQlVMS19S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uIHJlcy5lcnJvcigpOwogCiAgICAgICAgIC8vIFJlcGxhY2UgdGFibGUgd2l0aCBzaW5nbGUgZW50cnkgcmVwcmVzZW50aW5nIHRoZSBmdWxsIHJhbWRpc2suCkBAIC0zMDMsNyArMzE1LDggQEAKIC8vIHJlcGxhY2UgaXQgd2l0aCB0aGUgY29udGVudCBvZiB8bmV3X3JhbWRpc2t8LgogW1tub2Rpc2NhcmRdXSBSZXN1bHQ8c3RkOjpzdHJpbmc+IHJlcGxhY2VfdmVuZG9yX3JhbWRpc2tfZnJhZ21lbnQoY29uc3Qgc3RkOjpzdHJpbmcmIHJhbWRpc2tfbmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiB2ZW5kb3JfYm9vdCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBuZXdfcmFtZGlzaykgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIG5ld19yYW1kaXNrLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIG5ld19kdGIpIHsKICAgICBpZiAoYXV0byByZXMgPSBjaGVja192ZW5kb3JfYm9vdF9oZHIodmVuZG9yX2Jvb3QsIDQpOyAhcmVzLm9rKCkpIHJldHVybiByZXMuZXJyb3IoKTsKICAgICBhdXRvIGhkciA9IHJlaW50ZXJwcmV0X2Nhc3Q8Y29uc3QgdmVuZG9yX2Jvb3RfaW1nX2hkcl92NCo+KHZlbmRvcl9ib290LmRhdGEoKSk7CiAgICAgYXV0byBoZHJfc2l6ZSA9IGd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bGVIYW5kbGU+IGR0Yl9yZXBsYWNlbWVudDsKIH07CiAKIFRFU1RfUChSZXBhY2tWZW5kb3JCb290SW1nVGVzdCwgSW52YWxpZFNpemUpIHsKLSAgICBFWFBFQ1RfRVJST1IocmVwbGFjZV92ZW5kb3JfcmFtZGlzayh2Ym9vdC0+ZmQoKSwgdmJvb3QtPnNpemUoKSArIDEsICJkZWZhdWx0IiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnYtPnJlcGxhY2UtPmZkKCksIGVudi0+cmVwbGFjZS0+c2l6ZSgpKSwKLSAgICAgICAgICAgICAgICAgSGFzU3Vic3RyKCJTaXplIG9mIHZlbmRvciBib290IGRvZXMgbm90IG1hdGNoIikpOwotICAgIEVYUEVDVF9FUlJPUihyZXBsYWNlX3ZlbmRvcl9yYW1kaXNrKHZib290LT5mZCgpLCB2Ym9vdC0+c2l6ZSgpLCAiZGVmYXVsdCIsIGVudi0+cmVwbGFjZS0+ZmQoKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnYtPnJlcGxhY2UtPnNpemUoKSArIDEpLAotICAgICAgICAgICAgICAgICBIYXNTdWJzdHIoIlNpemUgb2YgbmV3IHZlbmRvciByYW1kaXNrIGRvZXMgbm90IG1hdGNoIikpOworICAgIEVYUEVDVF9FUlJPUigKKyAgICAgICAgICAgIHJlcGxhY2VfdmVuZG9yX3JhbWRpc2sodmJvb3QtPmZkKCksIHZib290LT5zaXplKCkgKyAxLCAiZGVmYXVsdCIsIGVudi0+cmVwbGFjZS0+ZmQoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW52LT5yZXBsYWNlLT5zaXplKCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICFHZXRQYXJhbSgpLmR0Yl9maWxlX25hbWUuZW1wdHkoKSA/IGR0Yl9yZXBsYWNlbWVudC0+ZmQoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBhbmRyb2lkOjpiYXNlOjp1bmlxdWVfZmQoLTEpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAhR2V0UGFyYW0oKS5kdGJfZmlsZV9uYW1lLmVtcHR5KCkgPyBkdGJfcmVwbGFjZW1lbnQtPnNpemUoKSA6IDApLAorICAgICAgICAgICAgSGFzU3Vic3RyKCJTaXplIG9mIHZlbmRvciBib290IGRvZXMgbm90IG1hdGNoIikpOworICAgIEVYUEVDVF9FUlJPUigKKyAgICAgICAgICAgIHJlcGxhY2VfdmVuZG9yX3JhbWRpc2sodmJvb3QtPmZkKCksIHZib290LT5zaXplKCksICJkZWZhdWx0IiwgZW52LT5yZXBsYWNlLT5mZCgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnYtPnJlcGxhY2UtPnNpemUoKSArIDEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICFHZXRQYXJhbSgpLmR0Yl9maWxlX25hbWUuZW1wdHkoKSA/IGR0Yl9yZXBsYWNlbWVudC0+ZmQoKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBhbmRyb2lkOjpiYXNlOjp1bmlxdWVfZmQoLTEpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAhR2V0UGFyYW0oKS5kdGJfZmlsZV9uYW1lLmVtcHR5KCkgPyBkdGJfcmVwbGFjZW1lbnQtPnNpemUoKSA6IDApLAorICAgICAgICAgICAgSGFzU3Vic3RyKCJTaXplIG9mIG5ldyB2ZW5kb3IgcmFtZGlzayBkb2VzIG5vdCBtYXRjaCIpKTsKKyAgICBpZiAoIUdldFBhcmFtKCkuZHRiX2ZpbGVfbmFtZS5lbXB0eSgpKSB7CisgICAgICAgIEVYUEVDVF9FUlJPUihyZXBsYWNlX3ZlbmRvcl9yYW1kaXNrKHZib290LT5mZCgpLCB2Ym9vdC0+c2l6ZSgpLCAiZGVmYXVsdCIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudi0+cmVwbGFjZS0+ZmQoKSwgZW52LT5yZXBsYWNlLT5zaXplKCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGR0Yl9yZXBsYWNlbWVudC0+ZmQoKSwgZHRiX3JlcGxhY2VtZW50LT5zaXplKCkgKyAxKSwKKyAgICAgICAgICAgICAgICAgICAgIEhhc1N1YnN0cigiU2l6ZSBvZiBuZXcgZHRiIGRvZXMgbm90IG1hdGNoIikpOworICAgIH0KKyAgICBFWFBFQ1RfRVJST1IoCisgICAgICAgICAgICByZXBsYWNlX3ZlbmRvcl9yYW1kaXNrKAorICAgICAgICAgICAgICAgICAgICB2Ym9vdC0+ZmQoKSwgdmJvb3QtPnNpemUoKSwgImRlZmF1bHQiLCBlbnYtPnJlcGxhY2UtPmZkKCksIGVudi0+cmVwbGFjZS0+c2l6ZSgpLAorICAgICAgICAgICAgICAgICAgICBhbmRyb2lkOjpiYXNlOjp1bmlxdWVfZmQoc3RkOjpudW1lcmljX2xpbWl0czxpbnQzMl90Pjo6bWF4KCkpLCAxKSwKKyAgICAgICAgICAgIEhhc1N1YnN0cigiQ2FuJ3Qgc2VlayB0byB0aGUgYmVnaW5uaW5nIG9mIG5ldyBkdGIgaW1hZ2UiKSk7CiB9CiAKIFRFU1RfUChSZXBhY2tWZW5kb3JCb290SW1nVGVzdCwgUmVwbGFjZVVua25vd24pIHsKLSAgICBhdXRvIHJlcyA9IHJlcGxhY2VfdmVuZG9yX3JhbWRpc2sodmJvb3QtPmZkKCksIHZib290LT5zaXplKCksICJ1bmtub3duIiwgZW52LT5yZXBsYWNlLT5mZCgpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnYtPnJlcGxhY2UtPnNpemUoKSk7CisgICAgYX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gQEAKIAogSU5TVEFOVElBVEVfVEVTVF9TVUlURV9QKAogICAgICAgICBSZXBhY2tWZW5kb3JCb290SW1nVGVzdCwgUmVwYWNrVmVuZG9yQm9vdEltZ1Rlc3QsCi0gICAgICAgIDo6dGVzdGluZzo6VmFsdWVzKFJlcGFja1ZlbmRvckJvb3RJbWdUZXN0UGFyYW17InZlbmRvcl9ib290X3YzLmltZyIsIDN9LAotICAgICAgICAgICAgICAgICAgICAgICAgICBSZXBhY2tWZW5kb3JCb290SW1nVGVzdFBhcmFteyJ2ZW5kb3JfYm9vdF92NF93aXRoX2ZyYWcuaW1nIiwgNH0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgIFJlcGFja1ZlbmRvckJvb3RJbWdUZXN0UGFyYW17InZlbmRvcl9ib290X3Y0X3dpdGhvdXRfZnJhZy5pbWciLCA0fSksCisgICAgICAgIDo6dGVzdGluZzo6VmFsdWVzKFJlcGFja1ZlbmRvckJvb3RJbWdUZXN0UGFyYW17InZlbmRvcl9ib290X3YzLmltZyIsICIiLCAzfSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgUmVwYWNrVmVuZG9yQm9vdEltZ1Rlc3RQYXJhbXsidmVuZG9yX2Jvb3RfdjRfd2l0aF9mcmFnLmltZyIsICIiLCA0fSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgUmVwYWNrVmVuZG9yQm9vdEltZ1Rlc3RQYXJhbXsidmVuZG9yX2Jvb3RfdjRfd2l0aG91dF9mcmFnLmltZyIsICIiLCA0fSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgUmVwYWNrVmVuZG9yQm9vdEltZ1Rlc3RQYXJhbXsidmVuZG9yX2Jvb3RfdjRfd2l0aF9mcmFnLmltZyIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImR0Yl9yZXBsYWNlLmltZyIsIDR9LAorICAgICAgICAgICAgICAgICAgICAgICAgICBSZXBhY2tWZW5kb3JCb290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x1ZGUiXSwKKyAgICBjZmxhZ3M6IFsKKyAgICAgICAgIi1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQiLAorICAgIF0sCisgICAgc3JjczogWworICAgICAgICAiZmlsZV93YWl0LmNwcCIsCisgICAgXSwKKyAgICBzaGFyZWRfbGliczogWworICAgICAgICAibGliYmFzZSIsCisgICAgXSwKKyAgICBob3N0X3N1cHBvcnRlZDogdHJ1ZSwKICAgICByYW1kaXNrX2F2YWlsYWJsZTogdHJ1ZSwKICAgICB2ZW5kb3JfcmFtZGlza19hdmFpbGFibGU6IHRydWUsCiAgICAgcmVjb3ZlcnlfYXZhaWxhYmxlOiB0cnVlLAotICAgIGhvc3Rfc3VwcG9ydGVkOiB0cnVlLAotICAgIGRlZmF1bHRzOiBbImZzX21ncl9kZWZhdWx0cyJdLAotICAgIHNyY3M6IFsKLSAgICAgICAgImZzX21ncl9mc3RhYi5jcHAiLAotICAgICAgICAiZnNfbWdyX2Jvb3RfY29uZmlnLmNwcCIsCi0gICAgICAgICJmc19tZ3Jfc2xvdHNlbGVjdC5jcHAiLAotICAgIF0sCi0gICAgdGFyZ2V0OiB7Ci0gICAgICAgIGRhcndpbjogewotICAgICAgICAgICAgZW5hYmxlZDogZmFsc2UsCi0gICAgICAgIH0sCi0gICAgICAgIHZlbmRvcjogewotICAgICAgICAgICAgY2ZsYWdzOiBbCi0gICAgICAgICAgICAgICAgLy8gU2tpcHBpbmcgZW50cmllcyBpbiBmc3RhYiBzaG91bGQgb25seSBiZSBkb25lIGluIGEgc3lzdGVtCi0gICAgICAgICAgICAgICAgLy8gcHJvY2VzcyBhcyB0aGUgY29uZmlnIGZpbGUgaXMgaW4gL3N5c3RlbV9leHQuCi0gICAgICAgICAgICAgICAgLy8gUmVtb3ZlIHRoZSBvcCBmcm9tIHRoZSB2ZW5kb3IgdmFyaWFudC4KLSAgICAgICAgICAgICAgICAiLUROT19TS0lQX01PVU5UIiwKLSAgICAgICAgICAgIF0sCi0gICAgICAgIH0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cG9pbnRNYW5hZ2VyKGludCBuZWVkc19jaGVja3BvaW50ID0gLTEsIGJvb2wgbWV0YWRhdGFfZW5jcnlwdGVkID0gZmFsc2UpCi0gICAgICAgIDogbmVlZHNfY2hlY2twb2ludF8obmVlZHNfY2hlY2twb2ludCksIG1ldGFkYXRhX2VuY3J5cHRlZF8obWV0YWRhdGFfZW5jcnlwdGVkKSB7fQorICAgIENoZWNrcG9pbnRNYW5hZ2VyKGludCBuZWVkc19jaGVja3BvaW50ID0gLTEsIGJvb2wgbWV0YWRhdGFfZW5jcnlwdGVkID0gZmFsc2UsCisgICAgICAgICAgICAgICAgICAgICAgYm9vbCBuZWVkc19lbmNyeXB0ID0gZmFsc2UpCisgICAgICAgIDogbmVlZHNfY2hlY2twb2ludF8obmVlZHNfY2hlY2twb2ludCksCisgICAgICAgICAgbWV0YWRhdGFfZW5jcnlwdGVkXyhtZXRhZGF0YV9lbmNyeXB0ZWQpLAorICAgICAgICAgIG5lZWRzX2VuY3J5cHRfKG5lZWRzX2VuY3J5cHQpIHt9CiAKICAgICBib29sIE5lZWRzQ2hlY2twb2ludCgpIHsKICAgICAgICAgaWYgKG5lZWRzX2NoZWNrcG9pbnRfICE9IFVOS05PV04pIHsKQEAgLTExODMsNyArMTIwOCw3IEBACiAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgIExFUlJPUiA8PCBlbnRyeS0+ZnNfdHlwZSA8PCAiIGRvZXMgbm90IGltcGxlbWVudCBjaGVja3BvaW50cy4iOwogICAgICAgICAgICAgfQotICAgICAgICB9IGVsc2UgaWYgKGVudHJ5LT5mc19tZ3JfZmxhZ3MuY2hlY2twb2ludF9ibGspIHsKKyAgICAgICAgfSBlbHNlIGlmIChlbnRyeS0+ZnNfbWdyX2ZsYWdzLmNoZWNrcG9pbnRfYmxrICYmICFuZWVkc19lbmNyeXB0XykgewogICAgICAgICAgICAgYXV0byBhY3R1YWxfYmxvY2tfZGV2aWNlID0gYmxvY2tfZGV2aWNl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ikgKyBibG9ja19kZXZpY2Uuc3Vic3RyKDUpOwotCisgICAgc3RydWN0IHN0YXQgc3Q7CisgICAgaWYgKHN0YXQocmVhbF9wYXRoLmNfc3RyKCksICZzdCkgPCAwKSB7CisgICAgICAgIFBMT0coRVJST1IpIDw8ICJzdGF0IGZhaWxlZDogIiA8PCByZWFsX3BhdGg7CisgICAgICAgIHJldHVybiBzdGQ6OnN0cmluZygpOworICAgIH0KKyAgICBpZiAoIVNfSVNCTEsoc3Quc3RfbW9kZSkpIHsKKyAgICAgICAgUExPRyhFUlJPUikgPDwgcmVhbF9wYXRoIDw8ICIgaXMgbm90IGJsb2NrIGRldmljZSI7CisgICAgICAgIHJldHVybiBzdGQ6OnN0cmluZygpOworICAgIH0KKyAgICBzdGQ6OnN0cmluZyBzeXNfZGlyID0gYW5kcm9pZDo6YmFzZTo6U3RyaW5nUHJpbnRmKCIvc3lzL2Rldi9ibG9jay8ldToldSIsIG1ham9yKHN0LnN0X3JkZXYpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWlub3Ioc3Quc3RfcmRldikpOwogICAgIGZvciAoOzspIHsKICAgICAgICAgc3RkOjpzdHJpbmcgbmFtZTsKICAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpSZWFkRmlsZVRvU3RyaW5nKHN5c19kaXIgKyAiL2RtL25hbWUiLCAmbmFtZSkpIHsKLSAgICAgICAgICAgIFBMT0coRVJST1IpIDw8IGJsb2NrX2RldmljZSA8PCAiIGlzIG5vdCBkbSBkZXZpY2UiOworICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgcmVhbF9wYXRoIDw8ICIgaXMgbm90IGRtIGRldmljZSI7CiAgICAgICAgICAgICByZXR1cm4gc3RkOjpzdHJpbmcoKTsKICAgICAgICAgfQogCkBAIC0xMzg0LDIxICsxNDIwLDYzIEBACiAgICAgcmV0dXJuIEdldEVudHJ5Rm9yTW91bnRQb2ludCgmZnN0YWI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gKGl0ZXItPmZzX21ncl9mbGFncy5mb3JtYXR0YWJsZSkgeworICAgICAgICAgICAgaWYgKGdldHBhZ2VzaXplKCkgIT0gNDA5NiAmJiBpc19mMmZzKGl0ZXItPmZzX3R5cGUpICYmIGRldl9vcHRpb25fZW5hYmxlZCkgeworICAgICAgICAgICAgICAgIGYyZnNfZW50cnkgPSBpdGVyOworICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGYyZnNfZW50cnkpIHsKKyAgICAgICAgICAgICAgICBMT0coSU5GTykgPDwgIlNraXBwaW5nIEYyRlMgZm9ybWF0IGZvciBibG9jayBkZXZpY2UgIiA8PCBpdGVyLT5ibGtfZGV2aWNlIDw8ICIgQCAiCisgICAgICAgICAgICAgICAgICAgICAgICAgIDw8IGl0ZXItPm1vdW50X3BvaW50CisgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgaW4gbm9uLTRLIG1vZGUgZm9yIGRldiBvcHRpb24gZW5hYmxlZCBkZXZpY2VzLCAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJhcyB0aGVzZSBkZXZpY2VzIG5lZWQgdG8gdG9nZ2xlIGJldHdlZW4gNEsvMTZLIG1vZGUsIGFuZCBGMkZTIGRvZXMgIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAibm90IHN1cHBvcnQgcGFnZV9zaXplICE9IGJsb2NrX3NpemUgY29uZmlndXJhdGlvbi4iOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcmV0dXJuIGl0ZXI7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKGYyZnNfZW50cnkpIHsKKyAgICAgICAgTE9HKElORk8pIDw8ICJVc2luZyBGMkZTIGZvciAiIDw8IGYyZnNfZW50cnktPmJsa19kZXZpY2UgPDwgIiBAICIgPDwgZjJmc19lbnRyeS0+bW91bnRfcG9pbnQKKyAgICAgICAgICAgICAgICAgIDw8ICIgZXZlbiB0aG91Z2ggd2U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wsIHVzZXJkYXRhX21vdW50ZWR9OworICAgICAgICByZXR1cm4gRlNfTUdSX01OVEFMTF9GQUlMOwogICAgIH0KIAorICAgIGJvb2wgc2NyYXRjaF9jYW5fYmVfbW91bnRlZCA9IHRydWU7CisKICAgICAvLyBLZWVwIGkgaW50IHRvIHByZXZlbnQgdW5zaWduZWQgaW50ZWdlciBvdmVyZmxvdyBmcm9tIChpID0gdG9wX2lkeCAtIDEpLAogICAgIC8vIHdoZXJlIHRvcF9pZHggaXMgMC4gSXQgd2lsbCBnaXZlIFNJR0FCUlQKICAgICBmb3IgKGludCBpID0gMDsgaSA8IHN0YXRpY19jYXN0PGludD4oZnN0YWItPnNpemUoKSk7IGkrKykgewpAQCAtMTQ3Myw3ICsxNTUxLDcgQEAKICAgICAgICAgICAgICAgICBpZiAoIWF2Yl9oYW5kbGUpIHsKICAgICAgICAgICAgICAgICAgICAgTEVSUk9SIDw8ICJGYWlsZWQgdG8gb3BlbiBBdmJIYW5kbGUiOwogICAgICAgICAgICAgICAgICAgICBzZXRfdHlwZV9wcm9wZXJ0eShlbmNyeXB0YWJsZSk7Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiB7RlNfTUdSX01OVEFMTF9GQUlMLCB1c2VyZGF0YV9tb3VudGVkfTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEZTX01HUl9NTlRBTExfRkFJTDsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9CiAgICAgICAgICAgICBpZiAoYXZiX2hhbmRsZS0+U2V0VXBBdmJIYXNodHJlZSgmY3VycmVudF9lbnRyeSwgdHJ1ZSAvKiB3YWl0X2Zvcl92ZXJpdHlfZGV2ICovKSA9PQpAQCAtMTQ5MiwxMSArMTU3MCwxMyBAQAogICAgICAgICAgICAgfQogICAgICAgICB9CiAKLSAgICAgICAgaW50IGxhc3RfaWR4X2luc3BlY3RlZDsKLSAgICAgICAgaW50IHRvcF9pZHggPSBpOworICAgICAgICBpbnQgbGFzdF9pZHhfaW5zcGVjdGVkID0gLTE7CisgICAgICAgIGNvbnN0IGludCB0b3BfaWR4ID0gaTsKICAgICAgICAgaW50IGF0dGVtcHRlZF9pZHggPSAtMTsKIAotICAgICAgICBib29sIG1yZXQgPSBtb3VudF93aXRoX2FsdGVybmF0aXZlcygqZnN0YWIsIGksICZsYXN0X2lkeF9pbnNwZWN0ZWQsICZhdHRlbXB0ZWRfaWR4KTsKKyAgICAgICAgYm9vbCBlbmNyeXB0aW9uX2ludGVycnVwdGVkID0gV2FzTWV0YWRhdGFFbmNyeXB0aW9uSW50ZXJydXB0ZWQoY3VycmVudF9lbnRyeSk7CisgICAgICAgIGJvb2wgbXJldCA9IG1vdW50X3dpdGhfYWx0ZXJuYXRpdmVzKCpmc3RhYiwgaSwgZW5jcnlwdGlvbl9pbnRlcnJ1cHRlZCwgJmxhc3RfaWR4X2luc3BlY3RlZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmF0dGVtcHRlZF9pZHgpOwogICAgICAgICBhdXRvJiBhdHRlbXB0ZWRfZW50cnkgPSAoKmZzdGFiKVthdHRlbXB0ZWRfaWR4XTsKICAgICAgICAgaSA9IGxhc3RfaWR4X2luc3BlY3RlZDsKICAgICAgICAgaW50IG1vdW50X2Vycm5vID0gZXJybm87CkBAIC0xNTA3LDcgKzE1ODcsNyBAQAogCiAgICAgICAgICAgICBpZiAoc3RhdHVzID09IEZTX01HUl9NTlRBTExfRkFJTCkgewogICAgICAgICAgICAgICAgIC8vIEZhdGFsIGVycm9yIC0gbm8gcG9pbnQgY29udGludWluZy4KLSAgICAgICAgICAgICAgICByZXR1cm4ge3N0YXR1cywgdXNlcmRhdGFfbW91bnRlZH07CisgICAgICAgICAgICAgICAgcmV0dXJuIHN0YXR1czsKICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgaWYgKHN0YXR1cyAhPSBGU19NR1JfTU5UQUxMX0RFVl9OT1RfRU5DUllQVEFCTEUpIHsKQEAgLTE1MTcsMTMgKzE1OTcsMTggQEAKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgZW5jcnlwdGFibGUgPSBzdGF0dXM7CiAgICAgICAgICAgICAgICAgaWYgKHN0YXR1cyA9PSBGU19NR1JfTU5UQUxMX0RFVl9ORUVEU19NRVRBREFUQV9FTkNSWVBUSU9OKSB7CisgICAgICAgICAgICAgICAgICAgIGZzX21ncl9zZXRfYmxrX3JvKGF0dGVtcHRlZF9lbnRyeS5ibGtfZGV2aWNlLCBmYWxzZSk7CiAgICAgICAgICAgICAgICAgICAgIGlmICghY2FsbF92ZGMoeyJjcnlwdGZzIiwgImVuY3J5cHRGc3RhYiIsIGF0dGVtcHRlZF9lbnRyeS5ibGtfZGV2aWNlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRlbXB0ZWRfZW50cnkubW91bnRfcG9pbnQsIHdpcGVkID8gInRydWUiIDogImZhbHNlIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0ZW1wdGVkX2VudHJ5LmZzX3R5cGUsIGF0dGVtcHRlZF9lbnRyeS56b25lZF9kZXZpY2V9LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdHRlbXB0ZWRfZW50cnkuZnNfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0ZW1wdGVkX2VudHJ5LmZzX21ncl9mbGFncy5pc196b25lZCA/ICJ0cnVlIiA6ICJmYWxzZSIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6dG9fc3RyaW5nKGF0dGVtcHRlZF9lbnRyeS5sZW5ndGgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmRyb2lkOjpiYXNlOjpKb2luKGF0dGVtcHRlZF9lbnRyeS51c2VyX2RldmljZXMsICcgJyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZHJvaWQ6OmJhc2U6OkpvaW4oYXR0ZW1wdGVkX2VudHJ5LmRldmljZV9hbGlhc2VkLCAnICcpfSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudWxscHRyKSkgewogICAgICAgICAgICAgICAgICAgICAgICAgTEVSUk9SIDw8ICJFbmNyeXB0aW9uIGZhaWxlZCI7CiAgICAgICAgICAgICAgICAgICAgICAgICBzZXRfdHlwZV9wcm9wZXJ0eShlbmNyeXB0YWJsZSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4ge0ZTX01HUl9NTlRBTExfRkFJTCwgdXNlcmRhdGFfbW91bnRlZH07CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gRlNfTUdSX01OVEFMTF9GQUlMOwogICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfQpAQCAtMTUzMSwyMCArMTYxNiwyOSBAQAogICAgICAgICAgICAgaWYgKGN1cnJlbnRfZW50cnkubW91bnRfcG9pbnQgPT0gIi9kYXRhIikgewogICAgICAgICAgICAgICAgIHVzZXJkYXRhX21vdW50ZWQgPSB0cnVlOwogICAgICAgICAgICAgfQorCisgICAgICAgICAgICBNb3VudE92ZXJsYXlmcyhhdHRlbXB0ZWRfZW50cnksICZzY3JhdGNoX2Nhbl9iZV9tb3VudGVkKTsKKwogICAgICAgICAgICAgLy8gU3VjY2VzcyEgIEdvIGdldCB0aGUgbmV4dCBvbmUuCiAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgfQotCisgICAgICAgIGF1dG8gZm9ybWF0dGFibGVfZW50cnkgPQorICAgICAgICAgICAgICAgIExvY2F0ZUZvcm1hdHRhYmxlRW50cnkoZnN0YWItPmRhdGEoKSArIHRvcF9pZHgsIGZzdGFiLT5kYXRhKCkgKyBmc3RhYi0+c2l6ZSgpKTsKICAgICAgICAgLy8gTW91bnRpbmcgZmFpbGVkLCB1bmRlcnN0YW5kIHdoeSBhbmQgcmV0cn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oKGN1cnJlbnRfZW50cnkuYmxrX2RldmljZSkKKyAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBpcyB3aXBlZCBhbmQgIiA8PCBjdXJyZW50X2VudHJ5Lm1vdW50X3BvaW50IDw8ICIgIgorICAgICAgICAgICAgICAgICAgICAgICA8PCBjdXJyZW50X2VudHJ5LmZzX3R5cGUgPDwgIiBpcyBmb3JtYXR0YWJsZS4gRm9ybWF0IGl0LiI7CisgICAgICAgICAgICBpZiAoZW5jcnlwdGlvbl9pbnRlcnJ1cHRlZCkKKyAgICAgICAgICAgICAgICBMRVJST1IgPDwgX19GVU5DVElPTl9fIDw8ICIoKTogIiA8PCByZWFscGF0aChjdXJyZW50X2VudHJ5LmJsa19kZXZpY2UpCisgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgd2FzIGludGVycnVwdGVkIGR1cmluZyBlbmNyeXB0aW9uIGFuZCAiIDw8IGN1cnJlbnRfZW50cnkubW91bnRfcG9pbnQKKyAgICAgICAgICAgICAgICAgICAgICAgPDwgIiAiIDw8IGN1cnJlbnRfZW50cnkuZnNfdHlwZSA8PCAiIGlzIGZvcm1hdHRhYmxlLiBGb3JtYXQgaXQuIjsKIAogICAgICAgICAgICAgY2hlY2twb2ludF9tYW5hZ2VyLlJldmVydCgmY3VycmVudF9lbnRyeSk7CiAKQEAgLTE1NTcsOSArMTY1MSwxMyBAQAogICAgICAgICAgICAgICAgIGVuY3J5cHRhYmxlID0gRlNfTUdSX01OVEFMTF9ERVZfSVNfTUVUQURBVEFfRU5DUllQVEVEOwogICAgICAgICAgICAgICAgIHNldF90eXBlX3Byb3BlcnR5KGVuY3J5cHRhYmxlKTsKIAotICAgICAgICAgICAgICAgIGlmICghY2FsbF92ZGMoeyJjcnlwdGZzIiwgImVuY3J5cHRGc3RhYiIsIGN1cnJlbnRfZW50cnkuYmxrX2RldmljZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X2VudHJ5Lm1vdW50X3BvaW50LCAidHJ1ZSIgLyogc2hvdWxkRm9ybWF0ICovLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfZW50cnkuZnNfdHlwZSwgY3VycmVudF9lbnRyeS56b25lZF9kZXZpY2V9LAorICAgICAgICAgICAgICAgIGlmICghY2FsbF92ZGMoeyJjcnlwdGZzIiwgImVuY3J5cHRGc3RhYiIsIGZvcm1hdHRhYmxlX2VudHJ5LT5ibGtfZGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcm1hdHRhYmxlX2VudHJ5LT5tb3VudF9wb2ludCwgInRydWUiIC8qIHNob3VsZEZvcm1hdCAqLywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXR0YWJsZV9lbnRyeS0+ZnNfdHlwZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JtYXR0YWJsZV9lbnRyeS0+ZnNfbWdyX2ZsYWdzLmlzX3pvbmVkID8gInRydWUiIDogImZhbHNlIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6OnRvX3N0cmluZyhmb3JtYXR0YWJsZV9lbnRyeS0+bGVuZ3RoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmRyb2lkOjpiYXNlOjpKb2luKGZvcm1hdHRhYmxlX2VudHJ5LT51c2VyX2RldmljZXMsICcgJyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kcm9pZDo6YmFzZTo6Sm9pbihmb3JtYXR0YWJsZV9lbnRyeS0+ZGV2aWNlX2FsaWFzZWQsICcgJyl9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVsbHB0cikpIHsKICAgICAgICAgICAgICAgICAgICAgTEVSUk9SIDw8ICJFbmNyeXB0aW9uIGZhaWxlZCI7CiAgICAgICAgICAgICAgICAgfSBlbHNlIHsKQEAgLTE1NjgsNyArMTY2Niw3IEBACiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfQogCi0gICAgICAgICAgICBpZiAoZnNfbWdyX2RvX2Zvcm1hdChjdXJyZW50X2VudHJ5KSA9PSAwKSB7CisgICAgICAgICAgICBpZiAoZnNfbWdyX2RvX2Zvcm1hdCgqZm9ybWF0dGFibGVfZW50cnkpID09IDApIHsKICAgICAgICAgICAgICAgICAvLyBMZXQncyByZXBsYXkgdGhlIG1vdW50IGFjdGlvbnMuCiAgICAgICAgICAgICAgICAgaSA9IHRvcF9pZHggLSAxOwogICAgICAgICAgICAgICAgIGNvbnRpbnVlOwpAQCAtMTU4MSwxMCArMTY3OSwxMiBAQAogICAgICAgICB9CiAKICAgICAgICAgLy8gbW91bnQoMikgcmV0dXJuZWQgYW4gZXJyb3IsIGhhbmRsZSB0aGUgZW5jcnlwdGFibGUvZm9ybWF0dGFibGUgY2FzZS4KLSAgICAgICAgaWYgKG1vdW50X2Vycm5vICE9IEVCVVNZICYmIG1vdW50X2Vycm5vICE9IEVBQ0NFUyAmJgorICAgICAgICBpZiAobW91bnRfZXJybm8gIT0gRUJVU1kgJiYgbW91bnRfZXJybm8gIT0gRUFDQ0VTICYmICFlbmNyeXB0aW9uX2ludGVycnVwdGVkICYmCiAgICAgICAgICAgICBzaG91bGRfdXNlX21ldGFkYXRhX2VuY3J5cHRpb24oYXR0ZW1wdGVkX2VudHJ5KSkgewogICAgICAgICAgICAgaWYgKCFjYWxsX3ZkYyh7ImNyeXB0ZnMiLCAibW91bnRGc3RhYiIsIGF0dGVtcHRlZF9lbnRyeS5ibGtfZGV2aWNlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0ZW1wdGVkX2VudHJ5Lm1vdW50X3BvaW50LCBhdHRlbXB0ZWRfZW50cnkuem9uZWRfZGV2aWNlfSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0dGVtcHRlZF9lbnRyeS5tb3VudF9wb2ludCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfZW50cnkuZnNfbWdyX2ZsYWdzLmlzX3pvbmVkID8gInRydWUiIDogImZhbHNlIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZHJvaWQ6OmJhc2U6OkpvaW4oY3VycmVudF9lbnRyeS51c2VyX2RldmljZXMsICcgJyl9LAogICAgICAgICAgICAgICAgICAgICAgICAgICBudWxscHRyKSkgewogICAgICAgICAgICAgICAgICsrZXJyb3JfY291bnQ7CiAgICAgICAgICAgICB9IGVsc2UgaWYgKGN1cnJlbnRfZW50cnkubW91bnRfcG9pbnQgPT0gIi9kYXRhIikgewpAQCAtMTU5NywxMyArMTY5NywxMyBAQAogICAgICAgICAgICAgLy8gVXNlIFN0cmluZ1ByaW50ZiB0byBvdXRwdXQgIihudWxsKSIgaW5zdGVhZC4KICAgICAgICAgICAgIGlmIChhdHRlbXB0ZWRfZW50cnkuZnNfbWdyX2ZsYWdzLm5vX2ZhaWwpIHsKICAgICAgICAgICAgICAgICBQRVJST1IgPDwgYW5kcm9pZDo6YmFzZTo6U3RyaW5nUHJpbnRmKAotICAgICAgICAgICAgICAgICAgICAgICAgIklnbm9yaW5nIGZhaWx1cmUgdG8gbW91bnQgYW4gdW4tZW5jcnlwdGFibGUgb3Igd2lwZWQgIgorICAgICAgICAgICAgICAgICAgICAgICAgIklnbm9yaW5nIGZhaWx1cmUgdG8gbW91bnQgYW4gdW4tZW5jcnlwdGFibGUsIGludGVycnVwdGVkLCBvciB3aXBlZCAiCiAgICAgICAgICAgICAgICAgICAgICAgICAicGFydGl0aW9uIG9uICVzIGF0ICVzIG9wdGlvbnM6ICVzIiwKICAgICAgICAgICAgICAgICAgICAgICAgIGF0dGVtcHRlZF9lbnRyeS5ibGtfZGV2aWNlLmNfc3RyKCksIGF0dGVtcHRlZF9lbnRyeS5tb3VudF9wb2ludC5jX3N0cigpLAogICAgICAgICAgICAgICAgICAgICAgICAgYXR0ZW1wdGVkX2VudHJ5LmZzX29wdGlvbnMuY19zdHIoKSk7CiAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgIFBFUlJPUiA8PCBhbmRyb2lkOjpiYXNlOjpTdHJpbmdQcmludGYoCi0gICAgICAgICAgICAgICAgICAgICAgICAiRmFpbGVkIHRvIG1vdW50IGFuIHVuLWVuY3J5cHRhYmxlIG9yIHdpcGVkIHBhcnRpdGlvbiAiCisgICAgICAgICAgICAgICAgICAgICAgICAiRmFpbGVkIHRvIG1vdW50IGFuIHVuLWVuY3J5cHRhYmxlLCBpbnRlcnJ1cHRlZCwgb3Igd2lwZWQgcGFydGl0aW9uICIKICAgICAgICAgICAgICAgICAgICAgICAgICJvbiAlcyBhdCAlcyBvcHRpb25zOiAlcyIsCiAgICAgICAgICAgICAgICAgICAgICAgICBhdHRlbXB0ZWRfZW50cnkuYmxrX2RldmljZS5jX3N0cigpLCBhdHRlbXB0ZWRfZW50cnkubW91bnRfcG9pbnQuY19zdHIoKSwKICAgICAgICAgICAgICAgICAgICAgICAgIGF0dGVtcHRlZF9lbnRyeS5mc19vcHRpb25zLmNfc3RyKCkpOwpAQCAtMTYxMiwxNyArMTcxMiwyNiBAQAogICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgIH0KICAgICB9CisgICAgaWYgKHVzZXJkYXRhX21vdW50ZWQpIHsKKyAgICAgICAgRnN0YWIgbW91bnRlZF9mc3RhYjsKKyAgICAgICAgaWYgKCFSZWFkRnN0YWJGcm9tRmlsZSgiL3Byb2MvbW91bnRzIiwgJm1vdW50ZWRfZnN0YWIpKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJDb3VsZCd0IGxvYWQgZnN0YWIgZnJvbSAvcHJvYy9tb3VudHMgLCB1bmFibGUgdG8gc2V0IHJvLmZzdHlwZS5kYXRhIC4gIgorICAgICAgICAgICAgICAgICAgICAgICAgICAiaW5pdC5yYyBhY3Rpb25zIGRlcGVuZGluZyBvbiB0aGlzIHByb3Agd291bGQgbm90IHJ1biwgYm9vdCBtaWdodCBmYWlsLiI7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBmb3IgKGNvbnN0IGF1dG8mIGVudHJ5IDogbW91bnRlZF9mc3RhYikgeworICAgICAgICAgICAgICAgIGlmIChlbnRyeS5tb3VudF9wb2ludCA9PSAiL2RhdGEiKSB7CisgICAgICAgICAgICAgICAgICAgIGFuZHJvaWQ6OmJhc2U6OlNldFByb3BlcnR5KCJyby5mc3R5cGUuZGF0YSIsIGVudHJ5LmZzX3R5cGUpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KIAogICAgIHNldF90eXBlX3Byb3BlcnR5KGVuY3J5cHRhYmxlKTsKIAotI2lmIEFMTE9XX0FEQkRfRElTQUJMRV9WRVJJVFkgPT0gMSAgLy8gInVzZXJkZWJ1ZyIgYnVpbGQKLSAgICBmc19tZ3Jfb3ZlcmxheWZzX21vdW50X2FsbChmc3RhYik7Ci0jZW5kaWYKLQogICAgIGlmIChlcnJvcl9jb3VudCkgewotICAgICAgICByZXR1cm4ge0ZTX01HUl9NTlRBTExfRkFJTCwgdXNlcmRhdGFfbW91bnRlZH07CisgICAgICAgIHJldHVybiBGU19NR1JfTU5UQUxMX0ZBSUw7CiAgICAgfSBlbHNlIHsKLSAgICAgICAgcmV0dXJuIHtlbmNyeXB0YWJsZSwgdXNlcmRhdGFfbW91bnRlZH07CisgICAgICAgIHJldHVybiBlbmNyeXB0YWJsZTsKICAgICB9CiB9CiAKQEAgLTE2NTksMTkwICsxNzY4LDYgQEAKICAgICByZXR1cm4gcmV0OwogfQogCi1zdGF0aWMgc3RkOjpjaHJvbm86Om1pbGxpc2Vjb25kcyBHZXRNaWxsaXNQcm9wZXJ0eShjb25zdCBzdGQ6OnN0cmluZyYgbmFtZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6Y2hyb25vOjptaWxsaXNlY29uZHMgZGVmYXVsdF92YWx1ZSkgewotICAgIGF1dG8g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2tfZGV2aWNlOwotICAgICAgICAgICAgaWYgKFN0YXJ0c1dpdGgoZW50cnkuYmxrX2RldmljZSwgIi9kZXYvYmxvY2siKSAmJgotICAgICAgICAgICAgICAgICFSZWFscGF0aChlbnRyeS5ibGtfZGV2aWNlLCAmYmxvY2tfZGV2aWNlKSkgewotICAgICAgICAgICAgICAgIFBXQVJOSU5HIDw8IF9fRlVOQ1RJT05fXyA8PCAiKCk6IGZhaWxlZCB0byByZWFscGF0aCAiIDw8IGVudHJ5LmJsa19kZXZpY2U7Ci0gICAgICAgICAgICAgICAgYmxvY2tfZGV2aWNlID0gZW50cnkuYmxrX2RldmljZTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGlmIChkYXRhX2Jsb2NrX2RldmljZSA9PSBibG9ja19kZXZpY2UpIHsKLSAgICAgICAgICAgICAgICBpZiAodW1vdW50MihlbnRyeS5tb3VudF9wb2ludC5jX3N0cigpLCAwKSAhPSAwKSB7Ci0gICAgICAgICAgICAgICAgICAgIFBFUlJPUiA8PCBfX0ZVTkNUSU9OX18gPDwgIigpOiBGYWlsZWQgdG8gdW1vdW50ICIgPDwgZW50cnkubW91bnRfcG9pbnQ7Ci0gICAgICAgICAgICAgICAgICAgIHVtb3VudF9kb25lID0gZmFsc2U7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICAgIGlmICh1bW91bnRfZG9uZSkgewotICAgICAgICAgICAgTElORk8gPDwgX19GVU5DVElPTl9fIDw8ICIoKTogVW5tb3VudGluZyAvZGF0YSB0b29rICIgPDwgdDsKLSAgICAgICAgICAgIHJldHVybiB0cnVlOwotICAgICAgICB9Ci0gICAgICAgIGlmICh0LmR1cmF0aW9uKCkgPiB0aW1lb3V0KSB7Ci0gICAgICAgICAgICBMRVJST1IgPDwgX19GVU5DVElPTl9fIDw8ICIoKTogVGltZWQgb3V0IHVubW91bnRpbmcgYWxsIG1vdW50cyBvbiAiCi0gICAgICAgICAgICAgICAgICAgPDwgZGF0YV9ibG9ja19kZXZpY2U7Ci0gICAgICAgICAgICBGc3RhYiByZW1haW5pbmdfbW91bnRzOwotICAgICAgICAgICAgaWYgKCFSZWFkRnN0YWJGcm9tRmlsZSgiL3Byb2MvbW91bnRzIiwgJnJlbWFpbmluZ19tb3VudHMpKSB7Ci0gICAgICAgICAgICAgICAgTEVSUk9SIDw8IF9fRlVOQ1RJT05fXyA8PCAiKCk6IENhbid0IHJlYWQgL3Byb2MvbW91bnRzIjsKLSAgICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICAgTEVSUk9SIDw8IF9fRlVOQ1RJT05fXyA8PCAiKCk6IEZvbGxvd2luZyBtb3VudHMgcmVtYWluaW5nIjsKLSAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGF1dG8mIGUgOiByZW1haW5pbmdfbW91bnRzKSB7Ci0gICAgICAgICAgICAgICAgICAgIExFUlJPUiA8PCBfX0ZVTkNUSU9OX18gPDwgIigpOiBtb3VudCBwb2ludDogIiA8PCBlLm1vdW50X3BvaW50Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIGJsb2NrIGRldmljZTogIiA8PCBlLmJsa19kZXZpY2U7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgICAgICB9Ci0gICAgICAgIHN0ZDo6dGhpc190aHJlYWQ6OnNsZWVwX2Zvcig1MG1zKTsKLSAgICB9Ci19Ci0KLXN0YXRpYyBib29sIFVud2luZERtRGV2aWNlU3RhY2soY29uc3Qgc3RkOjpzdHJpbmcmIGJsb2NrX2RldmljZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjp2ZWN0b3I8c3RkOjpzdHJpbmc+KiBkbV9zdGFjaykgewotICAgIGlmICghU3RhcnRzV2l0aChibG9ja19kZXZpY2UsICIvZGV2L2Jsb2NrLyIpKSB7Ci0gICAgICAgIExXQVJOS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IG51bGxwdHI7Ci0gICAgfQotICAgIGZvciAoYXV0byYgZW50cnkgOiAqZnN0YWIpIHsKLSAgICAgICAgaWYgKGVudHJ5Lm1vdW50X3BvaW50ICE9ICIvZGF0YSIpIHsKLSAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICB9Ci0gICAgICAgIHN0ZDo6c3RyaW5nIGJsb2NrX2RldmljZTsKLSAgICAgICAgaWYgKGVudHJ5LmZzX21ncl9mbGFncy5sb2dpY2FsKSB7Ci0gICAgICAgICAgICBpZiAoIWZzX21ncl91cGRhdGVfbG9naWNhbF9wYXJ0aXRpb24oJmVudHJ5KSkgewotICAgICAgICAgICAgICAgIExFUlJPUiA8PCAiRmFpbGVkIHRvIHVwZGF0ZSBsb2dpYyBwYXJ0aXRpb24gIiA8PCBlbnRyeS5ibGtfZGV2aWNlOwotICAgICAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYmxvY2tfZGV2aWNlID0gZW50cnkuYmxrX2RldmljZTsKLSAgICAgICAgfSBlbHNlIGlmICghUmVhbHBhdGgoZW50cnkuYmxrX2RldmljZSwgJmJsb2NrX2RldmljZSkpIHsKLSAgICAgICAgICAgIFBXQVJOSU5HIDw8ICJGYWlsZWQgdG8gcmVhbHBhdGggIiA8PCBlbnRyeS5ibGtfZGV2aWNlOwotICAgICAgICAgICAgYmxvY2tfZGV2aWNlID0gZW50cnkuYmxrX2RldmljZTsKLSAgICAgICAgfQotICAgICAgICBpZiAoc3RkOjpmaW5kKGRtX3N0YWNrLmJlZ2luKCksIGRtX3N0YWNrLmVuZCgpLCBibG9ja19kZXZpY2UpICE9IGRtX3N0YWNrLmVuZCgpKSB7Ci0gICAgICAgICAgICByZXR1cm4gJmVudHJ5OwotICAgICAgICB9Ci0gICAgfQotICAgIExFUlJPUiA8PCAiRGlkbid0IGZpbmQgZW50cnkgdGhhdCB3YXMgdXNlZCB0byBtb3VudCAvZGF0YSBvbnRvICIgPDwgZGF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GRtLkdldERtRGV2aWNlTmFtZUJ5UGF0aChibG9ja19kZXZpY2UpOwotICAgICAgICAgICAgaWYgKCFuYW1lKSB7Ci0gICAgICAgICAgICAgICAgTEVSUk9SIDw8ICJGYWlsZWQgdG8gZ2V0IGRtLW5hbWUgZm9yICIgPDwgYmxvY2tfZGV2aWNlOwotICAgICAgICAgICAgICAgIHJldHVybiAtMTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIExJTkZPIDw8ICJEZWxldGluZyAiIDw8IGJsb2NrX2RldmljZSA8PCAiIG5hbWVkICIgPDwgKm5hbWU7Ci0gICAgICAgICAgICBpZiAoIWRtLkRlbGV0ZURldmljZSgqbmFtZSwgM3MpKSB7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIC0xOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgaWYgKCFuZXh0X2RldmljZSkgewotICAgICAgICAgICAgICAgIExFUlJPUiA8PCAiRmFpbGVkIHRvIGZpbmQgcGFyZW50IGRldmljZSBmb3IgIiA8PCBibG9ja19kZXZpY2U7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBibG9ja19kZXZpY2UgPSAqbmV4dF9kZXZpY2U7Ci0gICAgICAgIH0KLSAgICAgICAgTElORk8gPDwgIlJlbW91bnRpbmcgL2RhdGEiOwotICAgICAgICAvLyBUT0RPKGIvMTQzOTcwMDQzKTogcmVtb3ZlIHRoaXMgaGFjayBhZnRlciBmc19tZ3JfbW91bnRfYWxsIGlzIHJlZmFjdG9yZWQuCi0gICAgICAgIGF1dG8gcmVzdWx0ID0gZnNfbWdyX21vdW50X2FsbChmc3RhYiwgTU9VTlRfTU9ERV9PTkxZX1VTRVJEQVRBKTsKLSAgICAgICAgcmV0dXJuIHJlc3VsdC5jb2RlID09IEZTX01HUl9NTlRBTExfRkFJTCA/IC0xIDogMDsKLSAgICB9Ci0gICAgcmV0dXJuIDA7Ci19Ci0KIC8vIHdyYXBwZXIgdG8gX19tb3VudCgpIGFuZCBleHBl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RzX2VuY3J5cHQpOwogICAgIEF2YlVuaXF1ZVB0ciBhdmJfaGFuZGxlKG51bGxwdHIpOwogCiAgICAgaWYgKCFmc3RhYikgewpAQCAtMTkyMCwxMSArMTg0Miw3IEBACiAgICAgICAgIH0KIAogICAgICAgICAvLyBOb3cgbW91bnQgaXQgd2hlcmUgcmVxdWVzdGVkICovCi0gICAgICAgIGlmICh0bXBfbW91bnRfcG9pbnQpIHsKLSAgICAgICAgICAgIG1vdW50X3BvaW50ID0gdG1wX21vdW50X3BvaW50OwotICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgbW91bnRfcG9pbnQgPSBmc3RhYl9lbnRyeS5tb3VudF9wb2ludDsKLSAgICAgICAgfQorICAgICAgICBtb3VudF9wb2ludCA9IGZzdGFiX2VudHJ5Lm1vdW50X3BvaW50OwogCiAgICAgICAgIGludCBmc19zdGF0ID0gcHJlcGFyZV9mc19mb3JfbW91bnQobl9ibGtfZGV2aWNlLCBmc3RhYl9lbnRyeSwgbW91bnRfcG9pbnQpOwogCkBAIC0xOTYyLDYgKzE4ODAsOCBAQAogICAgICAgICAgICAgICAgIGlmIChyZXRyeV9jb3VudCA8PSAwKSBicmVhazsgIC8vIHJ1biBjaGVja19mcyBvbmx5IG9uY2UKICAgICAgICAgICAgICAgICBpZiAoIWZpcnN0X21vdW50X2Vycm5vKSBmaXJzdF9tb3VudF9lcnJubyA9IGVycm5vOwogICAgICAgICAgICAgICAgIG1vdW50X2Vycm9ycysrOworICAgICAgICAgICAgICAgIFBFUlJPUiA8PCAiQ2Fubm90IG1vdW50IGZpbGVzeXN0ZW0gb24gIiA8PCBuX2Jsa19kZXZpY2UgPDwgIiBhdCAiIDw8IG1vdW50X3BvaW50CisgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgd2l0aCBmc3R5cGUgIiA8PCBmc3RhYl9lbnRyeS5mc190eXBlOwogICAgICAgICAgICAgICAgIGZzX3N0YXQgfD0gRlNfU1RBVF9GVUxMX01PVU5UX0ZBSUxFRDsKICAgICAgICAgICAgICAgICAvLyB0cnkgYWdhaW4gYWZ0ZXIgZnNjawogICAgICAgICAgICAgICAgIGNoZWNrX2ZzKG5fYmxrX2RldmljZSwgZnN0YWJfZW50cnkuZnNfdHlwZSwgbW91bnRfcG9pbnQsICZmc19zdGF0KTsKQEAgLTE5ODEsMzUgKzE5MDEsNiBAQAogICAgIHJldHVybiBGU19NR1JfRE9NTlRfRkFJTEVEOwogfQogCi1pbnQgZnNfbWdyX2RvX21vdW50KEZzdGFiKiBmc3RhYiwgY29uc3QgY2hhciogbl9uYW1lLCBjaGFyKiBuX2Jsa19kZXZpY2UsIGNoYXIqIHRtcF9tb3VudF9wb2ludCkgewotICAgIHJldHVybiBmc19tZ3JfZG9fbW91bnRfaGVscGVyKGZzdGFiLCBuX25hbWUsIG5fYmxrX2RldmljZSwgdG1wX21vdW50X3BvaW50LCAtMSwgZmFsc2UpOwotfQotCi1pbnQgZnNfbWdyX2RvX21vdW50KEZzdGFiKiBmc3RhYiwgY29uc3QgY2hhciogbl9uYW1lLCBjaGFyKiBuX2Jsa19kZXZpY2UsIGNoYXIqIHRtcF9tb3VudF9wb2ludCwKLSAgICAgICAgICAgICAgICAgICAgYm9vbCBuZWVkc19jaGVja3BvaW50LCBib29sIG1ldGFkYXRhX2VuY3J5cHRlZCkgewotICAgIHJldHVybiBmc19tZ3JfZG9fbW91bnRfaGVscGVyKGZzdGFiLCBuX25hbWUsIG5fYmxrX2RldmljZSwgdG1wX21vdW50X3BvaW50LCBuZWVkc19jaGVja3BvaW50LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGFkYXRhX2VuY3J5cHRlZCk7Ci19Ci0KLS8qCi0gKiBtb3VudCBhIHRtcGZzIGZpbGVzeXN0ZW0gYXQgdGhlIGdpdmVuIHBvaW50LgotICogcmV0dXJuIDAgb24gc3VjY2Vzcywgbm9uLXplcm8gb24gZmFpbHVyZS4KLSAqLwotaW50IGZzX21ncl9kb190bXBmc19t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xzZSBpZiAoZXJybm8gIT0gRU5PRU5UKSB7Ci0gICAgICAgIHJldCA9IGZhbHNlOwotICAgICAgICBQRVJST1IgPDwgInJtZGlyICIgPDwgbmV3cGF0aDsKLSAgICB9Ci0gICAgaWYgKCFjbGVhbnVwX2FsbCkgewotICAgICAgICBpZiAoIXJtZGlyKHRvcC5jX3N0cigpKSkgewotICAgICAgICAgICAgaWYgKGNoYW5nZSkgKmNoYW5nZSA9IHRydWU7Ci0gICAgICAgICAgICBjbGVhbnVwX2FsbCA9IHRydWU7Ci0gICAgICAgIH0gZWxzZSBpZiAoZXJybm8gPT0gRU5PVEVNUFRZKSB7Ci0gICAgICAgICAgICBjbGVhbnVwX2FsbCA9IHRydWU7Ci0gICAgICAgICAgICAvLyBjbGVhbnVwIGFsbCBpZiB0aGUgY29udGVudCBpcyBhbGwgaGlkZGVuIChsZWFkaW5nIC4pCi0gICAgICAgICAgICBzdGQ6OnVuaXF1ZV9wdHI8RElSLCBkZWNsdHlwZSgmY2xvc2VkaXIpPiBkaXIob3BlbmRpcih0b3AuY19zdHIoKSksIGNsb3NlZGlyKTsKLSAgICAgICAgICAgIGlmICghZGlyKSB7Ci0gICAgICAgICAgICAgICAgUEVSUk9SIDw8ICJvcGVuZGlyICIgPDwgdG9wOwotICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICBkaXJlbnQqIGVudHJ5OwotICAgICAgICAgICAgICAgIHdoaWxlICgoZW50cnkgPSByZWFkZGlyKGRpci5nZXQoKSkpKSB7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChlbnRyeS0+ZF9uYW1lWzBdICE9ICcuJykgewotICAgICAgICAgICAgICAgICAgICAgICAgY2xlYW51cF9hbGwgPSBmYWxzZTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICB9IGVsc2UgaWYgKGVycm5vID09I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GVuOwotICAgIHNpemVfdCBhbGxvY19sZW4gPSAwOwotICAgIGNoYXIqIGxpbmUgPSBudWxscHRyOwotICAgIHdoaWxlICgobGVuID0gZ2V0bGluZSgmbGluZSwgJmFsbG9jX2xlbiwgZmlsZS5nZXQoKSkpICE9IC0xKSB7Ci0gICAgICAgIC8qIGlmIHRoZSBsYXN0IGNoYXJhY3RlciBpcyBhIG5ld2xpbmUsIHNob3J0ZW4gdGhlIHN0cmluZyBieSAxIGJ5dGUgKi8KLSAgICAgICAgaWYgKGxpbmVbbGVuIC0gMV0gPT0gJ1xuJykgewotICAgICAgICAgICAgbGluZVtsZW4gLSAxXSA9ICdcMCc7Ci0gICAgICAgIH0KLQotICAgICAgICBzdGF0aWMgY29uc3RleHByIGNoYXIgZGVsaW1bXSA9ICIgXHQiOwotICAgICAgICBjaGFyKiBzYXZlX3B0cjsKLSAgICAgICAgaWYgKCFzdHJ0b2tfcihsaW5lLCBkZWxpbSwgJnNhdmVfcHRyKSkgewotICAgICAgICAgICAgTEVSUk9SIDw8ICJFcnJvciBwYXJzaW5nIG1vdW50IElEIjsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGlmICghc3RydG9rX3IobnVsbHB0ciwgZGVsaW0sICZzYXZlX3B0cikpIHsKLSAgICAgICAgICAgIExFUlJPUiA8PCAiRXJyb3IgcGFyc2luZyBwYXJlbnQgSUQiOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgaWYgKCFzdHJ0b2tfcihudWxscHRyLCBkZWxpbSwgJnNhdmVfcHRyKSkgewotICAgICAgICAgICAgTEVSUk9SIDw8ICJFcnJvciBwYXJzaW5nIG1vdW50IHNvdXJjZSI7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBpZiAoIXN0cnRva19yKG51bGxwdHIsIGRlbGltLCAmc2F2ZV9wdHIpKSB7Ci0gICAgICAgICAgICBMRVJST1IgPDwgIkVycm9yIHBhcnNpbmcgcm9vdCI7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotCi0gICAgICAgIGNoYXIqIHA7Ci0gICAgICAgIGlmICghKHAgPSBzdHJ0b2tfcihudWxscHRyLCBkZWxpbSwgJnNhdmVfcHRyKSkpIHsKLSAgICAgICAgICAgIExFUlJPUiA8PCAiRXJyb3IgcGFyc2luZyBtb3VudF9wb2ludCI7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBtb3VudF9pbmZvIGVudHJ5ID0ge3AsIGZhbHNlfTsKLQotICAgICAgICBpZiAoIXN0cnRva19yKG51bGxwdHIsIGRlbGltLCAmc2F2ZV9wdHIpKSB7Ci0gICAgICAgICAgICBMRVJST1IgPDwgIkVycm9yIHBhcnNpbmcgbW91bnRfZmxhZ3MiOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLQotICAgICAgICB3aGlsZSAoKHAgPSBzdHJ0b2tfcihudWxscHRyLCBkZWxpbSwgJnNhdmVfcHRyKSkpIHsKLSAgICAgICAgICAgIGlmICgocFswXSA9PSAnLScpICYmIChwWzFdID09ICdcMCcpKSBicmVhazsKLSAgICAgICAgICAgIGlmIChhbmRyb2lkOjpiYXNlOjpTdGFydHNXaXRoKHAsICJzaGFyZWQ6IikpIGVudHJ5LnNoYXJlZF9mbGFnID0gdHJ1ZTsKLSAgICAgICAgfQotICAgICAgICBpZiAoIXApIHsKLSAgICAgICAgICAgIExFUlJPUiA8PCAiRXJyb3IgcGFyc2luZyBmaWVsZHMiOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgaW5mby5lbXBsYWNlX2JhY2soc3RkOjptb3ZlKGVudHJ5KSk7Ci0gICAgfQotCi0gICAgZnJlZShsaW5lKTsKLSAgICBpZiAoaW5mby5lbXB0eSgpKSB7Ci0gICAgICAgIExFUlJPUiA8PCBfX0ZVTkNUSU9OX18gPDwgIigpOiBmYWlsZWQgdG8gb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bnRyeS5tb3VudF9wb2ludCA9PSAiL2RldiIpICYmICFlbnRyeS5zaGFyZWRfZmxhZykgewotICAgICAgICAgICAgZGV2X3ByaXZhdGUgPSB0cnVlOwotICAgICAgICB9Ci0KLSAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpTdGFydHNXaXRoKGVudHJ5Lm1vdW50X3BvaW50LCBtb3VudF9wb2ludCArICIvIikpIHsKLSAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICB9Ci0gICAgICAgIGlmIChzdGQ6OmZpbmRfaWYobW92ZS5iZWdpbigpLCBtb3ZlLmVuZCgpLCBbJmVudHJ5XShjb25zdCBhdXRvJiBpdCkgewotICAgICAgICAgICAgICAgIHJldHVybiBhbmRyb2lkOjpiYXNlOjpTdGFydHNXaXRoKGVudHJ5Lm1vdW50X3BvaW50LCBpdC5tb3VudF9wb2ludCArICIvIik7Ci0gICAgICAgICAgICB9KSAhPSBtb3ZlLmVuZCgpKSB7Ci0gICAgICAgICAgICBjb250aW51ZTsKLSAgICAgICAgfQotCi0gICAgICAgIC8vIHVzZSBhcyB0aGUgYm91bmQgZGlyZWN0b3J5IGluIC9kZXYuCi0gICAgICAgIEF1dG9TZXRGc0NyZWF0ZUNvbiBjcmVhdGVjb247Ci0gICAgICAgIGF1dG8gbmV3X2NvbnRleHQgPSBmc19tZ3JfZ2V0X2NvbnRleHQoZW50cnkubW91bnRfcG9pbnQpOwotICAgICAgICBpZiAobmV3X2NvbnRleHQuZW1wdHkoKSB8fCAhY3JlYXRlY29uLlNldChuZXdfY29udGV4dCkpIHsKLSAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICB9Ci0gICAgICAgIG1vdmVfZW50cnkgbmV3X2VudHJ5ID0ge3N0ZDo6bW92ZShlbnRyeS5tb3VudF9wb2ludCksICIvZGV2L1RlbXBvcmFyeURpci1YWFhYWFgiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeS5zaGFyZWRfZmxhZ307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BzbG90LgotICAgICAgICAgICAgICAgICAgICBUcnVuY2F0ZVBhcnRpdGlvbnNXaXRoU3VmZml4KGJ1aWxkZXIuZ2V0KCksIGZzX21ncl9nZXRfb3RoZXJfc2xvdF9zdWZmaXgoKSk7Ci0KLSAgICAgICAgICAgICAgICAgICAgcGFydGl0aW9uX3NpemUgPQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1aWxkZXItPkFsbG9jYXRhYmxlU3BhY2UoKSAtIGJ1aWxkZXItPlVzZWRTcGFjZSgpICsgcGFydGl0aW9uLT5zaXplKCk7Ci0gICAgICAgICAgICAgICAgICAgIHBhcnRpdGlvbl9zaXplID0gc3RkOjptYXgoc3RkOjptaW4oa01pbmltdW1TaXplLCBwYXJ0aXRpb25fc2l6ZSAtIG1hcmdpbl9zaXplKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJ0aXRpb25fc2l6ZSAvIDIpOwotICAgICAgICAgICAgICAgICAgICBpZiAoIWJ1aWxkZXItPlJlc2l6ZVBhcnRpdGlvbihwYXJ0aXRpb24sIHBhcnRpdGlvbl9zaXplKSkgewotICAgICAgICAgICAgICAgICAgICAgICAgTEVSUk9SIDw8ICJyZXNpemUgIiA8PCBwYXJ0aXRpb25fbmFtZTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKLSAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBpZiAoIXBhcnRpdGlvbl9jcmVhdGUpIERlc3Ryb3lMb2dpY2FsUGFydGl0aW9uKHBhcnRpdGlvbl9uYW1lKTsKLSAgICAgICAgICAgICAgICBjaGFuZ2VkID0gdHJ1ZTsKLSAgICAgICAgICAgICAgICAqcGFydGl0aW9uX2V4aXN0cyA9IGZhbHNlOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgfQotICAgIC8vIGxhbmQgdGhlIHVwZGF0ZSBiYWN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5c3RlbXMgZm9yIGVhY2ggcGFydGl0aW9uLgotICAgICAgICBhdXRvIHByb2NfbW91bnRfcG9pbnQgPSAoZW50cnkubW91bnRfcG9pbnQgPT0gIi9zeXN0ZW0iKSA/ICIvIiA6IGVudHJ5Lm1vdW50X3BvaW50OwotICAgICAgICBhdXRvIG1vdW50ZWQgPSBHZXRFbnRyeUZvck1vdW50UG9pbnQoJm1vdW50cywgcHJvY19tb3VudF9wb2ludCk7Ci0gICAgICAgIGlmICghbW91bnRlZCB8fCBtb3VudGVkLT5mc190eXBlICE9IGVudHJ5LmZzX3R5cGUpIHsKLSAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICB9Ci0KLSAgICAgICAgRnN0YWJFbnRyeSBuZXdfZW50cnkgPSBlbnRyeTsKLSAgICAgICAgaWYgKCFmc19tZ3Jfb3ZlcmxheWZzX2FscmVhZHlfbW91bnRlZChlbnRyeS5tb3VudF9wb2ludCkgJiYKLSAgICAgICAgICAgICFmc19tZ3Jfd2FudHNfb3ZlcmxheWZzKCZuZXdfZW50cnkpKSB7Ci0gICAgICAgICAgICBjb250aW51ZTsKLSAgICAgICAgfQotICAgICAgICBhdXRvIG5ld19tb3VudF9wb2ludCA9IGZzX21ncl9tb3VudF9wb2ludChlbnRyeS5tb3VudF9wb2ludCk7Ci0gICAgICAgIGF1dG8gZHVwbGljYXRlX29yX21vcmVfc3BlY2lmaWMgPSBmYWxzZTsKLSAgICAgICAgZm9yIChhdXRvIGl0ID0gY2FuZGlkYXRlcy5iZWdpbigpOyBpdCAhPSBjYW5kaWRhdGVzLmVuZCgpOykgewotICAgICAgICAgICAgYXV0byBpdF9tb3VudF9wb2ludCA9IGZzX21ncl9tb3VudF9wb2ludChpdC0+bW91bnRfcG9pbnQpOwotICAgICAgICAgICAgaWYgKChpdF9tb3VudF9wb2ludCA9PSBuZXdfbW91bnRfcG9pbnQpIHx8Ci0gICAgICAgICAgICAgICAgKGFuZHJvaWQ6OmJhc2U6OlN0YXJ0c1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QorICAgICAgICBQRVJST1IgPDwgIm9wZW5kaXIgIiA8PCBwYXRoIDw8ICIgZGVwdGg9IiA8PCBsZXZlbDsKKyAgICAgICAgaWYgKChlcnJubyA9PSBFUEVSTSkgJiYgKGxldmVsICE9IDApKSB7CisgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIGRpcmVudCogZW50cnk7CisgICAgYXV0byByZXQgPSB0cnVlOworICAgIHdoaWxlICgoZW50cnkgPSByZWFkZGlyKGRpci5nZXQoKSkpKSB7CisgICAgICAgIGlmICgoIi4icyA9PSBlbnRyeS0+ZF9uYW1lKSB8fCAoIi4uInMgPT0gZW50cnktPmRfbmFtZSkpIGNvbnRpbnVlOworICAgICAgICBhdXRvIGZpbGUgPSBwYXRoICsgIi8iICsgZW50cnktPmRfbmFtZTsKKyAgICAgICAgaWYgKGVudHJ5LT5kX3R5cGUgPT0gRFRfVU5LTk9XTikgeworICAgICAgICAgICAgc3RydWN0IHN0YXQgc3Q7CisgICAgICAgICAgICBpZiAoIWxzdGF0KGZpbGUuY19zdHIoKSwgJnN0KSAmJiAoc3Quc3RfbW9kZSAmIFNfSUZESVIpKSBlbnRyeS0+ZF90eXBlID0gRFRfRElSOworICAgICAgICB9CisgICAgICAgIGlmIChlbnRyeS0+ZF90eXBlID09IERUX0RJUikgeworICAgICAgICAgICAgcmV0ICY9IGZzX21ncl9ybV9hbGwoZmlsZSwgY2hhbmdlLCBsZXZlbCArIDEpOworICAgICAgICAgICAgaWYgKCFybWRpcihmaWxlLmNfc3RyKCkpKSB7CisgICAgICAgICAgICAgICAgaWYgKGNoYW5nZSkgKmNoYW5nZSA9IHRydWU7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGlmIChlcnJubyAhPSBFTk9FTlQpIHJldCA9IGZhbHNlOworICAgICAgICAgICAgICAgIFBFUlJPUiA8PCAicm1kaXIgIiA8PCBmaWxlIDw8ICIgZGVwdGg9IiA8PCBsZXZlbDsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIGlmICghdW5saW5rKGZpbGUuY19zdHIoKSkpIHsKKyAgICAgICAgICAgIGlmIChjaGFuZ2UpICpjaGFuZ2UgPSB0cnVlOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgaWYgKGVycm5vICE9IEVOT0VOVCkgcmV0ID0gZmFsc2U7CisgICAgICAgICAgICBQRVJST1IgPDwgInJtICIgPDwgZmlsZSA8PCAiIGRlcHRoPSIgPDwgbGV2ZWw7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIHJldDsKK30KKworc3RkOjpzdHJpbmcgZnNfbWdyX292ZXJsYXlmc19zZXR1cF9kaXIoY29uc3Qgc3RkOjpzdHJpbmcmIGRpcikgeworICAgIGF1dG8gdG9wID0gZGlyICsgIi8iICsga092ZXJsYXlUb3BEaXI7CisKKyAgICBBdXRvU2V0RnNDcmVhdGVDb24gY3JlYXRlY29uKGtPdmVybGF5ZnNGaWxlQ29udGV4dCk7CisgICAgaWYgKCFjcmVhdGVjb24uT2soKSkgeworICAgICAgICByZXR1cm4ge307CisgICAgfQorICAgIGlmIChta2Rpcih0b3AuY19zdHIoKSwgMDc1NSkgIT0gMCAmJiBlcnJubyAhPSBFRVhJU1QpIHsKKyAgICAgICAgUEVSUk9SIDw8ICJta2RpciAiIDw8IHRvcDsKKyAgICAgICAgcmV0dXJuIHt9OworICAgIH0KKyAgICBpZiAoIWNyZWF0ZWNvbi5SZXN0b3JlKCkpIHsKKyAgICAgICAgcmV0dXJuIHt9OworICAgIH0KKyAgICByZXR1cm4gdG9wOworfQorCitib29sIGZzX21ncl9vdmVybGF5ZnNfc2V0dXBfb25lKGNvbnN0IHN0ZDo6c3RyaW5nJiBvdmVybGF5LCBjb25zdCBzdGQ6OnN0cmluZyYgbW91bnRfcG9pbnQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wqIHdhbnRfcmVib290KSB7CisgICAgaWYgKGZzX21ncl9vdmVybGF5ZnNfYWxyZWFkeV9tb3VudGVkKG1vdW50X3BvaW50KSkgeworICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICB9CisgICAgY29uc3QgYXV0byBiYXNlID0gR2V0RW5jb2RlZEJhc2VEaXJGb3JNb3VudFBvaW50KG1vdW50X3BvaW50KTsKKyAgICBhdXRvIGZzcmVjX21vdW50X3BvaW50ID0gb3ZlcmxheSArICIvIiArIGJhc2UgKyAiLyI7CisKKyAgICBBdXRvU2V0RnNDcmVhdGVDb24gY3JlYXRlY29uKGtPdmVybGF5ZnNGaWxlQ29udGV4dCk7CisgICAgaWYgKCFjcmVhdGVjb24uT2soKSkgeworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIGlmIChta2Rpcihmc3JlY19tb3VudF9wb2ludC5jX3N0cigpLCAwNzU1KSAhPSAwICYmIGVycm5vICE9IEVFWElTVCkgeworICAgICAgICBQRVJST1IgPDwgIm1rZGlyICIgPDwgZnNyZWNfbW91bnRfcG9pbnQ7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKG1rZGlyKChmc3JlY19tb3VudF9wb2ludCArIGtXb3JrTmFtZSkuY19zdHIoKSwgMDc1NSkgIT0gMCAmJiBlcnJubyAhPSBFRVhJU1QpIHsKKyAgICAgICAgUEVSUk9SIDw8ICJta2RpciAiIDw8IGZzcmVjX21vdW50X3BvaW50IDw8IGtXb3JrTmFtZTsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBpZiAoIWNyZWF0ZWNvbi5SZXN0b3JlKCkpIHsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIGNyZWF0ZWNvbiA9IHt9OworCisgICAgYXV0byBuZXdfY29udGV4dCA9IGZzX21ncl9nZXRfY29udGV4dChtb3VudF9wb2ludCk7CisgICAgaWYgKG5ld19jb250ZXh0LmVtcHR5KCkgfHwgIWNyZWF0ZWNvbi5TZXQobmV3X2NvbnRleHQpKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICBhdXRvIHVwcGVyID0gZnNyZWNfbW91bnRfcG9pbnQgKyBrVXBwZXJOYW1lOworICAgIGlmIChta2Rpcih1cHBlci5jX3N0cigpLCAwNzU1KSAhPSAwICYmIGVycm5vICE9IEVFWElTVCkgeworICAgICAgICBQRVJST1IgPDwgIm1rZGlyICIgPDwgdXBwZXI7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKCFjcmVhdGVjb24uUmVzdG9yZSgpKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICBpZiAod2FudF9yZWJvb3QpICp3YW50X3JlYm9vdCA9IHRydWU7CisKKyAgICByZXR1cm4gdHJ1ZTsKK30KKworc3RhdGljIHVpbnQzMl90IGZzX21ncl9vdmVybGF5ZnNfc2xvdF9udW1iZXIoKSB7CisgICAgcmV0dXJuIFNsb3ROdW1iZXJGb3JTbG90U3VmZml4KGZzX21ncl9nZXRfc2xvdF9zdWZmaXgoKSk7Cit9CisKK3N0YXRpYyBib29sIGZzX21ncl9vdmVybGF5ZnNfaGFzX2xvZ2ljYWwoY29uc3QgRnN0YWImIGZzdGFiKSB7CisgICAgZm9yIChjb25zdCBhdXRvJiBlbnRyeSA6IGZzdGFiKSB7CisgICAgICAgIGlmIChlbnRyeS5mc19tZ3JfZmxhZ3MubG9naWNhbCkgeworICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIGZhbHNlOworfQorCitPdmVybGF5ZnNUZWFyZG93blJlc3VsdCBUZWFyZG93bkRhdGFTY3JhdGNoKElJbWFnZU1hbmFnZXIqIGltYWdlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3R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bmcmIG1vdW50X3BvaW50LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sKiBjaGFuZ2UsIGJvb2wqIHNob3VsZF9kZXN0cm95X3NjcmF0Y2ggPSBudWxscHRyKSB7CisgICAgY29uc3QgYXV0byB0b3AgPSBvdmVybGF5ICsgIi8iICsga092ZXJsYXlUb3BEaXI7CisKKyAgICBpZiAoYWNjZXNzKHRvcC5jX3N0cigpLCBGX09LKSkgeworICAgICAgICBpZiAoc2hvdWxkX2Rlc3Ryb3lfc2NyYXRjaCkgKnNob3VsZF9kZXN0cm95X3NjcmF0Y2ggPSB0cnVlOworICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICB9CisKKyAgICBhdXRvIGNsZWFudXBfYWxsID0gbW91bnRfcG9pbnQuZW1wdHkoKTsKKyAgICBjb25zdCBhdXRvIGJhc2UgPSBHZXRFbmNvZGVkQmFzZURpckZvck1vdW50UG9pbnQobW91bnRfcG9pbnQpOworICAgIGNvbnN0IGF1dG8gb2xkcGF0aCA9IHRvcCArIChjbGVhbnVwX2FsbCA/ICIiIDogKCIvIiArIGJhc2UpKTsKKyAgICBjb25zdCBhdXRvIG5ld3BhdGggPSBjbGVhbnVwX2FsbCA/IG92ZXJsYXkgKyAiLy4iICsga092ZXJsYXlUb3BEaXIgKyAiLnRlYXJkb3duIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogdG9wICsgIi8uIiArIGJhc2UgKyAiLnRlYXJkb3duIjsKKyAgICBhdXRvIHJldCA9IGZzX21ncl9ybV9hbGwobmV3cGF0aCk7CisgICAgaWYgKCFyZW5hbWUob2xkcGF0aC5jX3N0cigpLCBuZXdwYXRoLmNfc3RyKCkpKSB7CisgICAgICAgIGlmIChjaGFuZ2UpICpjaGFuZ2UgPSB0cnVlOworICAgIH0gZWxzZSBpZiAoZXJybm8gIT0gRU5PRU5UKSB7CisgICAgICAgIHJldCA9IGZhbHNlOworICAgICAgICBQRVJST1IgPDwgIm12ICIgPDwgb2xkcGF0aCA8PCAiICIgPDwgbmV3cGF0aDsKKyAgICB9CisgICAgcmV0ICY9IGZzX21ncl9ybV9hbGwobmV3cGF0aCwgY2hhbmdlKTsKKyAgICBpZiAoIXJtZGlyKG5ld3BhdGguY19zdHIoKSkpIHsKKyAgICAgICAgaWYgKGNoYW5nZSkgKmNoYW5nZSA9IHRydWU7CisgICAgfSBlbHNlIGlmIChlcnJubyAhPSBFTk9FTlQpIHsKKyAgICAgICAgcmV0ID0gZmFsc2U7CisgICAgICAgIFBFUlJPUiA8PCAicm1kaXIgIiA8PCBuZXdwYXRoOworICAgIH0KKyAgICBpZiAoIWNsZWFudXBfYWxsKSB7CisgICAgICAgIGlmICghcm1kaXIodG9wLmNfc3RyKCkpKSB7CisgICAgICAgICAgICBpZiAoY2hhbmdlKSAqY2hhbmdlID0gdHJ1ZTsKKyAgICAgICAgICAgIGNsZWFudXBfYWxsID0gdHJ1ZTsKKyAgICAgICAgfSBlbHNlIGlmIChlcnJubyA9PSBFTk9URU1QVFkpIHsKKyAgICAgICAgICAgIGNsZWFudXBfYWxsID0gdHJ1ZTsKKyAgICAgICAgICAgIC8vIGNsZWFudXAgYWxsIGlmIHRoZSBjb250ZW50IGlzIGFsbCBoaWRkZW4gKGxlYWRpbmcgLikKKyAgICAgICAgICAgIHN0ZDo6dW5pcXVlX3B0cjxESVIsIGRlY2x0eXBlKCZjbG9zZWRpcik+IGRpcihvcGVuZGlyKHRvcC5jX3N0cigpKSwgY2xvc2VkaXIpOworICAgICAgICAgICAgaWYgKCFkaXIpIHsKKyAgICAgICAgICAgICAgICBQRVJST1IgPDwgIm9wZW5kaXIgIiA8PCB0b3A7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGRpcmVudCogZW50cnk7CisgICAgICAgICAgICAgICAgd2hpbGUgKChlbnRyeSA9IHJlYWRkaXIoZGlyLmdldCgpKSkpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGVudHJ5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VwKSkgeworICAgICAgICAgICAgY29uc3QgYXV0byYgbmFtZSA9IHBhcnQtPm5hbWUoKTsKKyAgICAgICAgICAgIGlmICghYW5kcm9pZDo6YmFzZTo6RW5kc1dpdGgobmFtZSwgc3VmZml4KSkgeworICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGRtLkdldFN0YXRlKG5hbWUpICE9IERtRGV2aWNlU3RhdGU6OklOVkFMSUQgJiYgIURlc3Ryb3lMb2dpY2FsUGFydGl0aW9uKG5hbWUpKSB7CisgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBidWlsZGVyLT5SZXNpemVQYXJ0aXRpb24oYnVpbGRlci0+RmluZFBhcnRpdGlvbihuYW1lKSwgMCk7CisgICAgICAgIH0KKyAgICB9Cit9CisKKy8vIENyZWF0ZSBvciB1cGRhdGUgYSBzY3JhdGNoIHBhcnRpdGlvbiB3aXRoaW4gc3VwZXIuCitzdGF0aWMgYm9vbCBDcmVhdGVEeW5hbWljU2NyYXRjaChzdGQ6OnN0cmluZyogc2NyYXRjaF9kZXZpY2UsIGJvb2wqIHBhcnRpdGlvbl9leGlzdHMpIHsKKyAgICBjb25zdCBhdXRvIHBhcnRpdGlvbl9uYW1lID0gYW5kcm9pZDo6YmFzZTo6QmFzZW5hbWUoa1NjcmF0Y2hNb3VudFBvaW50KTsKKworICAgIGF1dG8mIGRtID0gRGV2aWNlTWFwcGVyOjpJbnN0YW5jZSgpOworICAgICpwYXJ0aXRpb25fZXhpc3RzID0gZG0uR2V0U3RhdGUocGFydGl0aW9uX25hbWUpICE9IERtRGV2aWNlU3RhdGU6OklOVkFMSUQ7CisKKyAgICBhdXRvIHBhcnRpdGlvbl9jcmVhdGUgPSAhKnBhcnRpdGlvbl9leGlzdHM7CisgICAgYXV0byBzbG90X251bWJlciA9IGZzX21ncl9vdmVybGF5ZnNfc2xvdF9udW1iZXIoKTsKKyAgICB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ICAgICAgc3RkOjptYXgoc3RkOjptaW4oa01pbmltdW1TaXplLCBwYXJ0aXRpb25fc2l6ZSksIHBhcnRpdGlvbl9zaXplIC8gMik7CisgICAgICAgICAgICAgICAgICAgIGlmICghYnVpbGRlci0+UmVzaXplUGFydGl0aW9uKHBhcnRpdGlvbiwgcGFydGl0aW9uX3NpemUpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBMRVJST1IgPDwgInJlc2l6ZSAiIDw8IHBhcnRpdGlvbl9uYW1lOworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmICghcGFydGl0aW9uX2NyZWF0ZSkgRGVzdHJveUxvZ2ljYWxQYXJ0aXRpb24ocGFydGl0aW9uX25hbWUpOworICAgICAgICAgICAgICAgIGNoYW5nZWQgPSB0cnVlOworICAgICAgICAgICAgICAgICpwYXJ0aXRpb25fZXhpc3RzID0gZmFsc2U7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisKKyAgICAvLyBsYW5kIHRoZSB1cGRhdGUgYmFjayBvbiB0byB0aGUgcGFydGl0aW9uCisgICAgaWYgKGNoYW5nZWQpIHsKKyAgICAgICAgYXV0byBtZXRhZGF0YSA9IGJ1aWxkZXItPkV4cG9ydCgpOworICAgICAgICBpZiAoIW1ldGFkYXRhIHx8ICFVcGRhdGVQYXJ0aXRpb25UYWJsZShzdXBlcl9kZXZpY2UsICptZXRhZGF0YS5nZXQoKSwgc2xvdF9udW1iZXIpKSB7CisgICAgICAgICAgICBMRVJST1IgPDwgImFkZCBwYXJ0aXRpb24gIiA8PCBwYXJ0aXRpb25fbmFtZTsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgIH0KKworICAgIGlmIChjaGFuZ2VkIHx8IHBhcnRpdGlvbl9jcmVhdGUpIHsKKyAgICAgICAgQ3JlYXRlTG9naWNhbFBhcnRpdGlvblBhcmFtcyBwYXJhbXMgPSB7CisgICAgICAgICAgICAgICAgLmJsb2NrX2RldmljZSA9IHN1cGVyX2RldmljZSwKKyAgICAgICAgICAgICAgICAubWV0YWRhdGFfc2xvdCA9IHNsb3RfbnVtYmVyLAorICAgICAgICAgICAgICAgIC5wYXJ0aXRpb25fbmFtZSA9IHBhcnRpdGlvbl9uYW1lLAorICAgICAgICAgICAgICAgIC5mb3JjZV93cml0YWJsZSA9IHRydWUsCisgICAgICAgICAgICAgICAgLnRpbWVvdXRfbXMgPSAxMHMsCisgICAgICAgIH07CisgICAgICAgIGlmICghQ3JlYXRlTG9naWNhbFBhcnRpdGlvbihwYXJhbXMsIHNjcmF0Y2hfZGV2aWNlKSkgeworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgfSBlbHNlIGlmIChzY3JhdGNoX2RldmljZS0+ZW1wdHkoKSkgeworICAgICAgICAqc2NyYXRjaF9kZXZpY2UgPSBHZXRCb290U2NyYXRjaERldmljZSgpOworICAgIH0KKyAgICByZXR1cm4gdHJ1ZTsKK30KKworc3RhdGljIGlubGluZSB1aW50NjRfdCBHZXRJZGVhbERhdGFTY3JhdGNoU2l6ZSgpIHsKKyAgICBCbG9ja0RldmljZUluZm8gc3VwZXJfaW5mbzsKKyAgICBQYXJ0aXRpb25PcGVuZXIgb3BlbmVyOworICAgIGlmICghb3BlbmVyLkdldEluZm8oZnNfbWdyX2dldF9zdXBlcl9wYXJ0aXRpb25fbmFtZSgpLCAmc3VwZXJfaW5mbykpIHsKKyAgICAgICAgTEVSUk9SIDw8ICJjb3VsZCBub3QgZ2V0IGJsb2NrIGRldmljZSBpbmZvIGZvciBzdXBlciI7CisgICAgICAgIHJldHVybiAwOworICAgIH0KKworICAgIHN0cnVjdCBzdGF0dmZzIHM7CisgICAgaWYgKHN0YXR2ZnMoIi9kYXRhIiwgJnMpIDwgMCkgeworICAgICAgICBQRVJST1IgPDwgImNvdWxkIG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KE1vdW50U2NyYXRjaChzY3JhdGNoX2RldmljZSkpIHsKKyAgICAgICAgICAgIGNvbnN0IGF1dG8gdG9wID0ga1NjcmF0Y2hNb3VudFBvaW50ICsgIi8icyArIGtPdmVybGF5VG9wRGlyOworICAgICAgICAgICAgaWYgKGFjY2Vzcyh0b3AuY19zdHIoKSwgRl9PSykgPT0gMCB8fCBmc19tZ3JfZmlsZXN5c3RlbV9oYXNfc3BhY2Uoa1NjcmF0Y2hNb3VudFBvaW50KSkgeworICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgLy8gZGVjbGFyZSBpdCB1c2VsZXNzLCBubyBvdmVycmlkZXMgYW5kIG5vIGZyZWUgc3BhY2UKKyAgICAgICAgICAgIGlmICghZnNfbWdyX292ZXJsYXlmc191bW91bnRfc2NyYXRjaCgpKSB7CisgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiVW5hYmxlIHRvIHVubW91bnQgc2NyYXRjaCBwYXJ0aXRpb24iOworICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKworICAgIGlmICghTWFrZVNjcmF0Y2hGaWxlc3lzdGVtKHNjcmF0Y2hfZGV2aWNlKSkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gZm9ybWF0IHNjcmF0Y2ggcGFydGl0aW9uIjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIHJldHVybiBNb3VudFNjcmF0Y2goc2NyYXRjaF9kZXZpY2UpOworfQorCitjb25zdGV4cHIgYm9vbCBPdmVybGF5ZnNUZWFyZG93bkFsbG93ZWQoKSB7CisgICAgLy8gTmV2ZXIgYWxsb3cgb24gbm9uLWRlYnVnZ2FibGUgYnVpbGQuCisgICAgcmV0dXJuIGtBbGxvd092ZXJsYXlmczsKK30KKworfSAgLy8gbmFtZXNwYWNlCisKK2Jvb2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0ID0gY2FuZGlkYXRlcy5lcmFzZShpdCk7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICArK2l0OworICAgIH0KKworICAgIGlmIChjYW5kaWRhdGVzLmVtcHR5KCkpIHsKKyAgICAgICAgaWYgKG1vdW50X3BvaW50KSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJObyBvdmVybGF5ZnMgY2FuZGlkYXRlIHdhcyBmb3VuZCBmb3IgIiA8PCBtb3VudF9wb2ludDsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gdHJ1ZTsKKyAgICB9CisKKyAgICBzdGQ6OnN0cmluZyBkaXI7CisgICAgZm9yIChjb25zdCBhdXRvJiBvdmVybGF5X21vdW50X3BvaW50IDogT3ZlcmxheU1vdW50UG9pbnRzKCkpIHsKKyAgICAgICAgaWYgKG92ZXJsYXlfbW91bnRfcG9pbnQgPT0ga1NjcmF0Y2hNb3VudFBvaW50KSB7CisgICAgICAgICAgICBpZiAoIWZzX21ncl9vdmVybGF5ZnNfc2V0dXBfc2NyYXRjaChmc3RhYikpIHsKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGlmICghZnNfbWdyX292ZXJsYXlmc19hbHJlYWR5X21vdW50ZWQob3ZlcmxheV9tb3VudF9wb2ludCwgZmFsc2UgLyogb3ZlcmxheSAqLykpIHsKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBkaXIgPSBvdmVybGF5X21vdW50X3BvaW50OworICAgICAgICBicmVhazsKKyAgICB9CisgICAgaWYgKGRpci5lbXB0eSgpKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgIkNvdWxkIG5vdCBhbGxvY2F0ZSBiYWNraW5nIHN0b3JhZ2UgZm9yIG92ZXJsYXlzIjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIGNvbnN0IGF1dG8gb3ZlcmxheSA9IGZzX21ncl9vdmVybGF5ZnNfc2V0dXBfZGlyKGRpcik7CisgICAgaWYgKG92ZXJsYXkuZW1wdHkoKSkgeworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgYm9vbCBvayA9IHRydWU7CisgICAgZm9yIChjb25zdCBhdXRvJiBlbnRyeSA6IGNhbmRpZGF0ZXMpIHsKKyAgICAgICAgYXV0byBmc3RhYl9tb3VudF9wb2ludCA9IGZzX21ncl9tb3VudF9wb2ludChlbnRyeS5tb3VudF9wb2ludCk7CisgICAgICAgIG9rICY9IGZzX21ncl9vdmVybGF5ZnNfc2V0dXBfb25lKG92ZXJsYXksIGZzdGFiX21vdW50X3BvaW50LCB3YW50X3JlYm9vdCk7CisgICAgfQorICAgIHJldHVybiBvazsKK30KKworc3RydWN0IE1hcEluZm8geworICAgIC8vIElmIHNldCwgcGFydGl0aW9uIGlzIG93bmVkIGJ5IEltYWdlTWFuYWdlci4KKyAgICBzdGQ6OnVuaXF1ZV9wdHI8SUltYWdlTWFuYWdlcj4gaW1hZ2VzOworICAgIC8vIElmIHNldCwgYW5kIGltYWdlcyBpcyBudWxsLCB0aGlzIGlzIGEgREFQIHBhcnRpdGlvbi4KKyAgICBzdGQ6OnN0cmluZyBuYW1lOworICAgIC8vIElmIHNldCwgYW5kIGltYWdlcyBhbmQgbmFtZSBhcmUgZW1wdHksIHRoaXMgaXMgYSBub24tZHluYW1pYyBwYXJ0aXRpb24uCisgICAgc3RkOjpzdHJpbmcgZGV2aWNlOworCisgICAgTWFwSW5mbygpID0gZGVmYXVsdDsKKyAgICBNYXBJbmZvKE1hcEluZm8mJikgPSBkZWZhdWx0OworICAgIH5NYXBJbmZvKCkgeworICAgICAgICBpZiAoaW1hZ2VzKSB7CisgICAgICAgICAgICBpbWFnZXMtPlVubWFwSW1hZ2VEZXZpY2UobmFtZSk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2VzIHx8ICFpbWFnZXMtPkJhY2tpbmdJbWFnZUV4aXN0cyhhbmRyb2lkOjpnc2k6OmtEc3VTY3JhdGNoKSkgeworICAgICAgICAvLyBOb3RoaW5nIHRvIGRvIGlmIERTVSBzY3JhdGNoIGRldmljZSBkb2Vzbid0IGV4aXN0LgorICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgaW1hZ2VzLT5Vbm1hcEltYWdlRGV2aWNlKGFuZHJvaWQ6OmdzaTo6a0RzdVNjcmF0Y2gpOworICAgIGlmICghaW1hZ2VzLT5NYXBJbWFnZURldmljZShhbmRyb2lkOjpnc2k6OmtEc3VTY3JhdGNoLCAxMHMsIGRldmljZSkpIHsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICByZXR1cm4gdHJ1ZTsKK30KKworc3RhdGljIE92ZXJsYXlmc1RlYXJkb3duUmVzdWx0IFRlYXJkb3duTW91bnRzQW5kU2NyYXRjaChjb25zdCBjaGFyKiBtb3VudF9wb2ludCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCogd2FudF9yZWJvb3QpIHsKKyAgICBib29sIHNob3VsZF9kZXN0cm95X3NjcmF0Y2ggPSBmYWxzZTsKKyAgICBhdXRvIHJ2ID0gT3ZlcmxheWZzVGVhcmRvd25SZXN1bHQ6Ok9rOworICAgIGZvciAoY29uc3QgYXV0byYgb3ZlcmxheV9tb3VudF9wb2ludCA6IE92ZXJsYXlNb3VudFBvaW50cygpKSB7CisgICAgICAgIGF1dG8gb2sgPSBmc19tZ3Jfb3ZlcmxheWZzX3RlYXJkb3duX29uZSgKKyAgICAgICAgICAgICAgICBvdmVybGF5X21vdW50X3BvaW50LCBtb3VudF9wb2ludCA/IGZzX21ncl9tb3VudF9wb2ludChtb3VudF9wb2ludCkgOiAiIiwKKyAgICAgICAgICAgICAgICB3YW50X3JlYm9vdCwKKyAgICAgICAgICAgICAgICB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uR2V0RG1EZXZpY2VQYXRoQnlOYW1lKHBhcnRpdGlvbl9uYW1lLCAmZGV2aWNlKSkgeworICAgICAgICByZXR1cm4gZGV2aWNlOworICAgIH0KKworICAgIHJldHVybiAiIjsKK30KKwordm9pZCBUZWFyZG93bkFsbE92ZXJsYXlGb3JNb3VudFBvaW50KGNvbnN0IHN0ZDo6c3RyaW5nJiBtb3VudF9wb2ludCkgeworICAgIGlmICghT3ZlcmxheWZzVGVhcmRvd25BbGxvd2VkKCkpIHsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKyAgICBpZiAoIUluUmVjb3ZlcnkoKSkgeworICAgICAgICBMRVJST1IgPDwgX19GVU5DVElPTl9fIDw8ICIoKTogbXVzdCBiZSBjYWxsZWQgd2l0aGluIHJlY292ZXJ5LiI7CisgICAgICAgIHJldHVybjsKKyAgICB9CisKKyAgICAvLyBFbXB0eSBzdHJpbmcgbWVhbnMgdGVhcmRvd24gZXZlcnl0aGluZy4KKyAgICBjb25zdCBzdGQ6OnN0cmluZyB0ZWFyZG93bl9kaXIgPSBtb3VudF9wb2ludC5lbXB0eSgpID8gIiIgOiBmc19tZ3JfbW91bnRfcG9pbnQobW91bnRfcG9pbnQpOworICAgIGNvbnN0ZXhwciBib29sKiBpZ25vcmVfY2hhbmdlID0gbnVsbHB0cjsKKworICAgIC8vIFRlYXJkb3duIGxlZ2FjeSBvdmVybGF5IG1vdW50IHBvaW50cyB0aGF0J3Mgbm90IGJhY2tlZCBieSBhIHNjcmF0Y2ggZGV2aWNlLgorICAgIGZvciAoY29uc3QgYXV0byYgb3ZlcmxheV9tb3VudF9wb2ludCA6IE92ZXJsYXlNb3VudFBvaW50cygpKSB7CisgICAgICAgIGlmIChvdmVybGF5X21vdW50X3BvaW50ID09IGtTY3JhdGNoTW91bnRQb2ludCkgeworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgZnNfbWdyX292ZXJsYXlmc190ZWFyZG93bl9vbmUob3ZlcmxheV9t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U2NyYXRjaE1vdW50UG9pbnQuCisgICAgICAgIGZzX21ncl9vdmVybGF5ZnNfdW1vdW50X3NjcmF0Y2goKTsKKyAgICAgICAgaWYgKE1vdW50U2NyYXRjaChpbmZvLT5kZXZpY2UpKSB7CisgICAgICAgICAgICBib29sIHNob3VsZF9kZXN0cm95X3NjcmF0Y2ggPSBmYWxzZTsKKyAgICAgICAgICAgIGZzX21ncl9vdmVybGF5ZnNfdGVhcmRvd25fb25lKGtTY3JhdGNoTW91bnRQb2ludCwgdGVhcmRvd25fZGlyLCBpZ25vcmVfY2hhbmdlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnNob3VsZF9kZXN0cm95X3NjcmF0Y2gpOworICAgICAgICAgICAgZnNfbWdyX292ZXJsYXlmc191bW91bnRfc2NyYXRjaCgpOworICAgICAgICAgICAgaWYgKHNob3VsZF9kZXN0cm95X3NjcmF0Y2gpIHsKKyAgICAgICAgICAgICAgICBmc19tZ3Jfb3ZlcmxheWZzX3RlYXJkb3duX3NjcmF0Y2goa1NjcmF0Y2hNb3VudFBvaW50LCBudWxscHRyKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKworICAgIC8vIFRlYXJkb3duIERTVSBvdmVybGF5IGlmIHByZXNlbnQuCisgICAgc3RkOjpzdHJpbmcgc2NyYXRjaF9kZXZpY2U7CisgICAgaWYgKE1hcERzdVNjcmF0Y2hEZXZpY2UoJnNjcmF0Y2hfZGV2aWNlKSkgeworICAgICAgICBmc19tZ3Jfb3ZlcmxheWZzX3Vtb3VudF9zY3JhdGNoKCk7CisgICAgICAgIGlmIChNb3VudFNjcmF0Y2goc2NyYXRjaF9kZXZpY2UpKSB7CisgICAgICAgICAgICBmc19tZ3Jfb3ZlcmxheWZzX3RlYXJkb3duX29uZShrU2NyYXRjaE1vdW50UG9pbnQsIHRlYXJkb3duX2RpciwgaWdub3JlX2NoYW5nZSk7CisgICAgICAgICAgICBmc19tZ3Jfb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ljZSk7CisgICAgfQorICAgIHJldHVybiBoYXNfc2hhcmVkX2Jsb2NrczsKK30KKworY29uc3Qgc3RkOjpzdHJpbmcgZnNfbWdyX21vdW50X3BvaW50KGNvbnN0IHN0ZDo6c3RyaW5nJiBtb3VudF9wb2ludCkgeworICAgIGlmICgiLyJzICE9IG1vdW50X3BvaW50KSByZXR1cm4gbW91bnRfcG9pbnQ7CisgICAgcmV0dXJuICIvc3lzdGVtIjsKK30KKworLy8gZGVmYXVsdCBvcHRpb25zIGZvciBtb3VudF9wb2ludCwgcmV0dXJucyBlbXB0eSBzdHJpbmcgZm9yIG5vbmUgYXZhaWxhYmxlLgorc3RhdGljIHN0ZDo6c3RyaW5nIGZzX21ncl9nZXRfb3ZlcmxheWZzX29wdGlvbnMoY29uc3QgRnN0YWJFbnRyeSYgZW50cnkpIHsKKyAgICBjb25zdCBhdXRvIG1vdW50X3BvaW50ID0gZnNfbWdyX21vdW50X3BvaW50KGVudHJ5Lm1vdW50X3BvaW50KTsKKyAgICBpZiAoIWZzX21ncl9pc19kaXIobW91bnRfcG9pbnQpKSB7CisgICAgICAgIHJldHVybiAiIjsKKyAgICB9CisgICAgY29uc3QgYXV0byBiYXNlID0gR2V0RW5jb2RlZEJhc2VEaXJGb3JNb3VudFBvaW50KG1vdW50X3BvaW50KTsKKyAgICBpZiAoYmFzZS5lbXB0eSgpKSB7CisgICAgICAgIHJldHVybiAiIjsKKyAgICB9CisgICAgZm9yIChjb25zdCBhdXRvJiBvdmVybGF5X21vdW50X3BvaW50IDogT3ZlcmxheU1vdW50UG9pbnRzKCkpIHsKKyAgICAgICAgY29uc3QgYXV0byBkaXIgPSBvdmVybGF5X21vdW50X3BvaW50ICsgIi8iICsga092ZXJsYXlUb3BEaXIgKyAiLyIgKyBiYXNlICsgIi8iOworICAgICAgICBjb25zdCBhdXRvIHVwcGVyID0gZGlyICsga1VwcGVyTmFtZTsKKyAgICAgICAgY29uc3QgYXV0byB3b3JrID0gZGlyICsga1dvcmtOYW1lOworICAgICAgICBpZiAoIWZzX21ncl9pc19kaXIodXBwZXIpIHx8ICFmc19tZ3JfaXNfZGlyKHdvcmspIHx8IGFjY2Vzcyh3b3JrLmNfc3RyKCksIFJfT0sgfCBXX09LKSkgeworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgYXV0byByZXQgPSBrTG93ZXJkaXJPcHRpb24gKyBtb3VudF9wb2ludCArICIsIiArIGtVcHBlcmRpck9wdGlvbiArIHVwcGVyICsgIiwiICsKKyAgICAgICAgICAgICAgICAgICBrV29ya2Rpck9wdGlvbiArIHdvcmsgKyBhbmRyb2lkOjpmc19tZ3I6OkNoZWNrT3ZlcmxheWZzKCkubW91bnRfZmxhZ3M7CisgICAgICAgIGZvciAoY29uc3QgYXV0byYgZmxhZyA6IGFuZHJvaWQ6OmJhc2U6OlNwbGl0KGVudHJ5LmZzX29wdGlvbnMsICIsIikpIHsKKyAgICAgICAgICAgIGlmIChhbmRyb2lkOjpiYXNlOjpTdGFydHNXaXRoKGZsYWcsICJjb250ZXh0PSIpKSB7CisgICAgICAgICAgICAgICAgcmV0ICs9ICIsIiArIGZsYWc7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIHJldDsKKyAgICB9CisgICAgcmV0dXJuICIiOworfQorCitib29sIEF1dG9TZXRGc0NyZWF0ZUNvbjo6U2V0KGNvbnN0IHN0ZDo6c3RyaW5nJiBjb250ZXh0KSB7CisgICAgaWYgKHNldGZzY3JlYXRlY29uKGNvbnRleHQuY19zdHIoKSkpIHsKKyAgICAgICAgUExPRyhFUlJPUikgPDwgInNldGZzY3JlYXRlY29uICIgPDwgY29udGV4dDsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBva18gPSB0cnVlOworICAgIHJldHVybiB0cnVlOworfQorCitib29sIEF1dG9TZXRGc0NyZWF0ZUNvbjo6UmVzdG9yZSgpIHsKKyAgICBpZiAocmVzdG9yZWRfIHx8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AgICAgICByZXBvcnQgPSByZXBvcnQgKyAiLCIgKyBvcHQ7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0KKyAgICByZXBvcnQgPSByZXBvcnQgKyAiKT0iOworICAgIGF1dG8gcmV0ID0gbW91bnQoIm92ZXJsYXkiLCBtb3VudF9wb2ludC5jX3N0cigpLCAib3ZlcmxheSIsIE1TX1JET05MWSB8IE1TX05PQVRJTUUsCisgICAgICAgICAgICAgICAgICAgICBvcHRpb25zLmNfc3RyKCkpOworICAgIGlmIChyZXQpIHsKKyAgICAgICAgUEVSUk9SIDw8IHJlcG9ydCA8PCByZXQ7CisgICAgfSBlbHNlIHsKKyAgICAgICAgTElORk8gPDwgcmVwb3J0IDw8IHJldDsKKyAgICB9CisgICAgcmV0dXJuICFyZXQ7Cit9CisKK3N0cnVjdCBtb3VudF9pbmZvIHsKKyAgICBzdGQ6OnN0cmluZyBtb3VudF9wb2ludDsKKyAgICBib29sIHNoYXJlZF9mbGFnOworfTsKKworc3RhdGljIHN0ZDo6dmVjdG9yPG1vdW50X2luZm8+IFJlYWRNb3VudGluZm9Gcm9tRmlsZShjb25zdCBzdGQ6OnN0cmluZyYgcGF0aCkgeworICAgIHN0ZDo6dmVjdG9yPG1vdW50X2luZm8+IGluZm87CisKKyAgICBhdXRvIGZpbGUgPSBzdGQ6OnVuaXF1ZV9wdHI8RklMRSwgZGVjbHR5cGUoJmZjbG9zZSk+e2ZvcGVuKHBhdGguY19zdHIoKSwgInJlIiksIGZjbG9zZX07CisgICAgaWYgKCFmaWxlKSB7CisgICAgICAgIFBFUlJPUiA8PCBfX0ZVTkNUSU9OX18gPDwgIigpOiBjYW5ub3Qgb3BlbiBmaWxlOiAnIiA8PCBwYXRoIDw8ICInIjsKKyAgICAgICAgcmV0dXJuIGluZm87CisgICAgfQorCisgICAgc3NpemVfdCBsZW47CisgICAgc2l6ZV90IGFsbG9jX2xlbiA9IDA7CisgICAgY2hhciogbGluZSA9IG51bGxwdHI7CisgICAgd2hpbGUgKChsZW4gPSBnZXRsaW5lKCZsaW5lLCAmYWxsb2NfbGVuLCBmaWxlLmdldCgpKSkgIT0gLTEpIHsKKyAgICAgICAgLyogaWYgdGhlIGxhc3QgY2hhcmFjdGVyIGlzIGEgbmV3bGluZSwgc2hvcnRlbiB0aGUgc3RyaW5nIGJ5IDEgYnl0ZSAqLworICAgICAgICBpZiAobGluZVtsZW4gLSAxXSA9PSAnXG4nKSB7CisgICAgICAgICAgICBsaW5lW2xlbiAtIDFdID0gJ1wwJzsKKyAgICAgICAgfQorCisgICAgICAgIHN0YXRpYyBjb25zdGV4cHIgY2hhciBkZWxpbVtdID0gIiBcdCI7CisgICAgICAgIGNoYXIqIHNhdmVfcHRyOworICAgICAgICBpZiAoIXN0cnRva19yKGxpbmUsIGRlbGltLCAmc2F2ZV9wdHIpKSB7CisgICAgICAgICAgICBMRVJST1IgPDwgIkVycm9yIHBhcnNpbmcgbW91bnQgSUQiOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgaWYgKCFzdHJ0b2tfcihudWxscHRyLCBkZWxpbSwgJnNhdmVfcHRyKSkgeworICAgICAgICAgICAgTEVSUk9SIDw8ICJFcnJvciBwYXJzaW5nIHBhcmVudCBJRCI7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgICBpZiAoIXN0cnRva19yKG51bGxwdHIsIGRlbGltLCAmc2F2ZV9wdHIpKSB7CisgICAgICAgICAgICBMRVJST1IgPDwgIkVycm9yIHBhcnNpbmcgbW91bnQgc291cmNlIjsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGlmICghc3RydG9rX3IobnVsbHB0ciwgZGVsaW0sICZzYXZlX3B0cikpIHsKKyAgICAgICAgICAgIExFUlJPUiA8PCAiRXJyb3IgcGFyc2luZyByb290IjsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisKKyAgICAgICAgY2hhciogcDsKKyAgICAgICAgaWYgKCEocCA9IHN0cnRva19yKG51bGxwdHIsIGRlbGltLCAmc2F2ZV9wdHIpKSkgeworICAgICAgICAgICAgTEVSUk9SIDw8ICJFcnJvciBwYXJzaW5nIG1vdW50X3BvaW50IjsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIG1vdW50X2luZm8gZW50cnkgPSB7cCwgZmFsc2V9OworCisgICAgICAgIGlmICghc3RydG9rX3IobnVsbHB0ciwgZGVsaW0sICZzYXZlX3B0cikpIHsKKyAgICAgICAgICAgIExFUlJPUiA8PCAiRXJyb3IgcGFyc2luZyBtb3VudF9mbGFncyI7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorCisgICAgICAgIHdoaWxlICgocCA9IHN0cnRva19yKG51bGxwdHIsIGRlbGltLCAmc2F2ZV9wdHIpKSkgeworICAgICAgICAgICAgaWYgKChwWzBdID09ICctJykgJiYgKHBbMV0gPT0gJ1wwJykpIGJyZWFrOworICAgICAgICAgICAgaWYgKGFuZHJvaWQ6OmJhc2U6OlN0YXJ0c1dpdGgocCwgInNoYXJlZDoiKSkgZW50cnkuc2hhcmVkX2ZsYWcgPSB0cnVlOworICAgICAgICB9CisgICAgICAgIGlmICghcCkgeworICAgICAgICAgICAgTEVSUk9SIDw8ICJFcnJvciBwYXJzaW5nIGZpZWxkcyI7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgICBpbmZvLmVtcGxhY2VfYmFjayhzdGQ6Om1vdmUoZW50cnkpKTsKKyAgICB9CisKKyAgICBmcmVlKGxpbmUpOworICAgIGlmIChpbmZvLmVtcHR5KCkpIHsKKyAgICAgICAgTEVSUk9SIDw8IF9fRlVOQ1RJT05fXyA8PCAiKCk6IGZhaWxlZCB0byBsb2FkIG1vdW50aW5mbyBmcm9tIDogJyIgPDwgcGF0aCA8PCAiJyI7CisgICAgfQorICAgIHJldHVybiBpbmZvOworfQorCitzdGF0aWMgYm9vbCBmc19tZ3Jfb3Zlcmx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jpTdGFydHNXaXRoKGVudHJ5Lm1vdW50X3BvaW50LCBtb3VudF9wb2ludCArICIvIikpIHsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIC8vIEV4Y2x1ZGUgZHVwbGljYXRlZCBvciBtb3JlIHNwZWNpZmljIGVudHJpZXMuCisgICAgICAgIGlmIChzdGQ6OmZpbmRfaWYobW92ZWRfbW91bnRzLmJlZ2luKCksIG1vdmVkX21vdW50cy5lbmQoKSwgWyZlbnRyeV0oY29uc3QgYXV0byYgaXQpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gaXQubW91bnRfcG9pbnQgPT0gZW50cnkubW91bnRfcG9pbnQgfHwKKyAgICAgICAgICAgICAgICAgICAgICAgYW5kcm9pZDo6YmFzZTo6U3RhcnRzV2l0aChlbnRyeS5tb3VudF9wb2ludCwgaXQubW91bnRfcG9pbnQgKyAiLyIpOworICAgICAgICAgICAgfSkgIT0gbW92ZWRfbW91bnRzLmVuZCgpKSB7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICAvLyBtb3VudGluZm8gaXMgaW4gbGV4aWNhbCBvcmRlciwgc28gbm8gbmVlZCB0byB3b3JyeSBhYm91dCB8ZW50cnl8IGJlaW5nIGEgcGFyZW50IG1vdW50IG9mCisgICAgICAgIC8vIGVudHJpZXMgb2YgfG1vdmVkX21vdW50c3wuCisKKyAgICAgICAgTW92ZUVudHJ5IG5ld19lbnRyeXtlbnRyeS5tb3VudF9wb2ludCwga01vdmVNb3VudFRlbXBEaXIgKyAiL1RlbXBvcmFyeURpci1YWFhYWFgicywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeS5zaGFyZWRfZmxhZ307CisgICAgICAgIHsKKyAgICAgICAgICAgIEF1dG9TZXRGc0NyZWF0ZUNvbiBjcmVhdGVjb247CisgICAgICAgICAgICBhdXRvIG5ld19jb250ZXh0ID0gZnNfbWdyX2dldF9jb250ZXh0KGVudHJ5Lm1vdW50X3BvaW50KTsKKyAgICAgICAgICAgIGlmIChuZXdfY29udGV4dC5lbXB0eSgpIHx8ICFjcmVhdGVjb24uU2V0KG5ld19jb250ZXh0KSkgeworICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgY29uc3QgYXV0byB0YXJnZXQgPSBta2R0ZW1wKG5ld19lbnRyeS5kaXIuZGF0YSgpKTsKKyAgICAgICAgICAgIGlmICghdGFyZ2V0KSB7CisgICAgICAgICAgICAgICAgcmV0dmFsID0gZmFsc2U7CisgICAgICAgICAgICAgICAgUEVSUk9SIDw8ICJ0ZW1wb3JhcnkgZGlyZWN0b3J5IGZvciBNU19NT1ZFIjsKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICghY3JlYXRlY29uLlJlc3RvcmUoKSkgeworICAgICAgICAgICAgICAgIHJldHZhbCA9IGZhbHNlOworICAgICAgICAgICAgICAgIHJtZGlyKG5ld19lbnRyeS5kaXIuY19zdHIoKSk7CisgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgaWYgKCFwYXJlbnRfbWFkZV9wcml2YXRlKSB7CisgICAgICAgICAgICBwYXJlbnRfbWFkZV9wcml2YXRlIHw9IGZzX21ncl9vdmVybGF5ZnNfc2V0X3NoYXJlZF9tb3VudChtb3VudF9wb2ludCwgZmFsc2UpOworICAgICAgICAgICAgaWYgKCFwYXJlbnRfbWFkZV9wcml2YXRlICYmIGVycm5vID09IEVJTlZBTCAmJiBtb3VudF9wb2ludCA9PSAiL3N5c3RlbSIpIHsKKyAgICAgICAgICAgICAgICAvLyBJZiBmYWlsZWQgdG8gc2V0ICIvc3lzdGVtIiBtb3VudCB0eXBlLCBpdCBtaWdodCBiZSBkdWUgdG8gIi9zeXN0ZW0iIG5vdCBiZWluZyBhCisgICAgICAgICAgICAgICAgLy8gdmFsaWQgbW91bnRwb2ludCBhZnRlciBzd2l0Y2ggcm9vdC4gUmV0cnkgd2l0aCAiLyIgaW4gdGhpcyBjYXNlLgorICAgICAgICAgICAgICAgIHBhcmVudF9tYWRlX3ByaXZhdGUgfD0gZnNfbWdyX292ZXJsYXlmc19zZXRfc2hhcmVkX21vdW50KCIvIiwgZmFsc2UpOworICAgICAgICAgICAgICAgIHJvb3RfbWFkZV9wcml2YXRlIHw9IHBhcmVudF9tYWRlX3ByaXZhdGU7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpZiAobmV3X2VudHJ5LnNoYXJlZF9mbGFnKSB7CisgICAgICAgICAgICBuZXdfZW50cnkuc2hhcmVkX2ZsYWcgPSBmc19tZ3Jfb3ZlcmxheWZzX3NldF9zaGFyZWRfbW91bnQobmV3X2VudHJ5Lm1vdW50X3BvaW50LCBmYWxzZSk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKCFmc19tZ3Jfb3ZlcmxheWZzX21vdmVfbW91bnQobmV3X2VudHJ5Lm1vdW50X3BvaW50LCBuZXdfZW50cnkuZGlyKSkgeworICAgICAgICAgICAgcmV0dmFsID0gZmFsc2U7CisgICAgICAgICAgICBpZiAobmV3X2VudHJ5LnNoYXJlZF9mbGFnKSB7CisgICAgICAgICAgICAgICAgZnNfbWdyX292ZXJsYXlmc19zZXRfc2hhcmVkX21vdW50KG5ld19lbnRyeS5tb3VudF9wb2ludCwgdHJ1ZSk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBybWRpcihuZXdfZW50cnkuZGlyLmNfc3RyKCkpOworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgbW92ZWRfbW91bnRzLnB1c2hfYmFjayhzdGQ6Om1vdmUobmV3X2VudHJ5KSk7CisgICAgfQorCisgICAgcmV0dmFsICY9IGZzX21ncl9vdmVybGF5ZnNfbW91bnQobW91bnRfcG9pbnQsIG9wdGlvbnMpOworCisgICAgLy8gTW92ZSBzdWJtb3VudHMgYmFjay4KKyAgICBmb3IgKGNvbnN0IGF1dG8mIGVudHJ5IDogbW92ZWRfbW91bnRzKSB7CisgICAgICAgIGlmICghZnNfbWdyX292ZXJsYXlmc19tb3ZlX21vdW50KGVudHJ5LmRpciwgZW50cnkubW91bnRfcG9pbnQpKSB7CisgICAgICAgICAgICByZXR2YWwgPSBmYWxzZTsKKyAgICAgICAgfSBlbHNlIGlmIChlbnRyeS5zaGFyZWRfZmxhZyAmJgorICAgICAgICAgICAgICAgICAgICFmc19tZ3Jfb3ZlcmxheWZzX3NldF9zaGFyZWRfbW91bnQoZW50cnkubW91bnRfcG9pbnQsIHRydWUpKSB7CisgICAgICAgICAgICByZXR2YWwgPSBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBybWRpcihlbnRyeS5kaXIuY19zdHIoKSk7CisgICAgfQorICAgIC8vIElmIHRoZSBvcmlnaW5hbCAob3ZlcnJpZGRlbikgbW91bnQgd2FzIE1TX1NIQVJFRCwgdGhlbiBzZXQgdGhlIG92ZXJsYXlmcyBtb3VudCB0byBNU19TSEFSRUQuCisgICAgaWYgKHBhcmVudF9zaGFyZWQgJiYgcGFyZW50X21hZGVfcHJpdmF0ZSkgeworICAgICAgICBmc19tZ3Jfb3ZlcmxheWZzX3NldF9zaGFyZWRfbW91bnQobW91bnRfcG9pbnQsIHRydWUpOworICAgIH0KKyAgICBpZiAocm9vdF9zaGFyZWQgJiYgcm9vdF9tYWRlX3ByaXZhdGUpIHsKKyAgICAgICAgZnNfbWdyX292ZXJsYXlmc19zZXRfc2hhcmVkX21vdW50KCIvIiwgdHJ1ZSk7CisgICAgfQorCisgICAgcmV0dXJuIHJldHZhbDsKK30KKworLy8gTW91bnQga1NjcmF0Y2hNb3VudFBvaW50Citib29sIE1vdW50U2NyYXRjaChjb25zdCBzdGQ6OnN0cmluZyYgZGV2aWNlX3BhdGgsIGJvb2wgcmVhZG9ubHkpIHsKKyAgICBpZiAocmVhZG9ubHkpIHsKKyAgICAgICAgaW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8gIT0gRUVYSVNUKSkgeworICAgICAgICBQRVJST1IgPDwgImNyZWF0ZSAiIDw8IGtTY3JhdGNoTW91bnRQb2ludDsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIEZzdGFiRW50cnkgZW50cnk7CisgICAgZW50cnkuYmxrX2RldmljZSA9IGRldmljZV9wYXRoOworICAgIGVudHJ5Lm1vdW50X3BvaW50ID0ga1NjcmF0Y2hNb3VudFBvaW50OworICAgIGVudHJ5LmZsYWdzID0gTVNfTk9BVElNRSB8IE1TX1JET05MWTsKKyAgICBpZiAoIXJlYWRvbmx5KSB7CisgICAgICAgIGVudHJ5LmZsYWdzICY9IH5NU19SRE9OTFk7CisgICAgICAgIGVudHJ5LmZsYWdzIHw9IE1TX1NZTkNIUk9OT1VTOworICAgICAgICBlbnRyeS5mc19vcHRpb25zID0gIm5vZGlzY2FyZCI7CisgICAgICAgIGZzX21ncl9zZXRfYmxrX3JvKGRldmljZV9wYXRoLCBmYWxzZSk7CisgICAgfQorICAgIC8vIGNoZWNrX2ZzIHJlcXVpcmVzIGFwZXggcnVudGltZSBsaWJyYXJ5CisgICAgaWYgKGZzX21ncl9vdmVybGF5ZnNfYWxyZWFkeV9tb3VudGVkKCIvZGF0YSIsIGZhbHNlKSkgeworICAgICAgICBlbnRyeS5mc19tZ3JfZmxhZ3MuY2hlY2sgPSB0cnVlOworICAgIH0KKyAgICBib29sIG1vdW50ZWQgPSBmYWxzZTsKKyAgICBmb3IgKGF1dG8gZnNfdHlwZSA6IGZpbGVzeXN0ZW1fY2FuZGlkYXRlcykgeworICAgICAgICBlbnRyeS5mc190eXBlID0gZnNfdHlwZTsKKyAgICAgICAgaWYgKGZzX21ncl9kb19tb3VudF9vbmUoZW50cnkpID09IDApIHsKKyAgICAgICAgICAgIG1vdW50ZWQgPSB0cnVlOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKCFjcmVhdGVjb24uUmVzdG9yZSg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CFtb3VudGVkIHx8IG1vdW50ZWQtPmZzX3R5cGUgIT0gZW50cnkuZnNfdHlwZSkgeworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKworICAgICAgICBGc3RhYkVudHJ5IG5ld19lbnRyeSA9IGVudHJ5OworICAgICAgICBpZiAoIWZzX21ncl9vdmVybGF5ZnNfYWxyZWFkeV9tb3VudGVkKGVudHJ5Lm1vdW50X3BvaW50KSAmJgorICAgICAgICAgICAgIWZzX21ncl93YW50c19vdmVybGF5ZnMoJm5ld19lbnRyeSkpIHsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIGNvbnN0IGF1dG8gbmV3X21vdW50X3BvaW50ID0gZnNfbWdyX21vdW50X3BvaW50KG5ld19lbnRyeS5tb3VudF9wb2ludCk7CisgICAgICAgIGlmIChzdGQ6OmZpbmRfaWYoY2FuZGlkYXRlcy5iZWdpbigpLCBjYW5kaWRhdGVzLmVuZCgpLCBbJl0oY29uc3QgYXV0byYgaXQpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gZnNfbWdyX21vdW50X3BvaW50KGl0Lm1vdW50X3BvaW50KSA9PSBuZXdfbW91bnRfcG9pbnQ7CisgICAgICAgICAgICB9KSAhPSBjYW5kaWRhdGVzLmVuZCgpKSB7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBjYW5kaWRhdGVzLnB1c2hfYmFjayhzdGQ6Om1vdmUobmV3X2VudHJ5KSk7CisgICAgfQorICAgIHJldHVybiBjYW5kaWRhdGVzOworfQorCitzdGF0aWMgdm9pZCBUcnlNb3VudFNjcmF0Y2goKSB7CisgICAgLy8gTm90ZSB3ZSBnZXQgdGhlIGJvb3Qgc2NyYXRjaCBkZXZpY2UgaGVyZSwgd2hpY2ggbWVhbnMgaWYgc2NyYXRjaCB3YXMKKyAgICAvLyBqdXN0IGNyZWF0ZWQgdGhyb3VnaCBJbWFnZU1hbmFnZXIsIHRoaXMgY291bGQgZmFpbC4gSW4gcHJhY3RpY2UgdGhpcworICAgIC8vIHNob3VsZCBub3QgaGFwcGVuIGJlY2F1c2UgInJlbW91bnQiIGRldGVjdHMgdGhpcyBzY2VuYXJpbyAoYnkgY2hlY2tpbmcKKyAgICAvLyBpZiB2ZXJpdHkgaXMgc3RpbGwgZGlzYWJsZWQsIGkuZS4gbm8gcmVib290IG9jY3VycmVkKSwgYW5kIHNraXBzIGNhbGxpbmcKKyAgICAvLyBmc19tZ3Jfb3ZlcmxheWZzX21vdW50X2FsbCgpLgorICAgIGF1dG8gc2NyYXRjaF9kZXZpY2UgPSBHZXRCb290U2NyYXRjaERldmljZSgpOworICAgIGlmIChhY2Nlc3Moc2NyYXRjaF9kZXZpY2UuY19zdHIoKSwgUl9PSyB8IFdfT0spKSB7CisgICAgICAgIHJldHVybjsKKyAgICB9CisgICAgaWYgKCFXYWl0Rm9yRmlsZShzY3JhdGNoX2RldmljZSwgMTBzKSkgeworICAgICAgICByZXR1cm47CisgICAgfQorICAgIGlmICghTW91bnRTY3JhdGNoKHNjcmF0Y2hfZGV2aWNlLCB0cnVlIC8qIHJlYWRvbmx5ICovKSkgeworICAgICAgICByZXR1cm47CisgICAgfQorICAgIGNvbnN0IGF1dG8gdG9wID0ga1NjcmF0Y2hNb3VudFBvaW50ICsgIi8icyArIGtPdmVybGF5VG9wRGlyOworICAgIGNvbnN0IGJvb2wgaGFzX292ZXJsYXlmc19kaXIgPSBhY2Nlc3ModG9wLmNfc3RyKCksIEZfT0spID09IDA7CisgICAgZnNfbWdyX292ZXJsYXlmc191bW91bnRfc2NyYXRjaCgpOworICAgIGlmIChoYXNfb3ZlcmxheWZzX2RpcikgeworICAgICAgICBNb3VudFNjcmF0Y2goc2NyYXRjaF9kZXZpY2UpOworICAgIH0KK30KKworYm9vbCBmc19tZ3Jfb3ZlcmxheWZzX21vdW50X2FsbChGc3RhYiogZnN0YWIpIHsKKyAgICBpZiAoIU92ZXJsYXlmc1NldHVwQWxsb3dl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vcGVHdWFyZCB1bW91bnREaXIoW10oKSB7CisgICAgICAgIHVtb3VudChrTW92ZU1vdW50VGVtcERpcik7CisgICAgICAgIHJtZGlyKGtNb3ZlTW91bnRUZW1wRGlyKTsKKyAgICB9KTsKKworICAgIGF1dG8gcmV0ID0gdHJ1ZTsKKyAgICBhdXRvIHNjcmF0Y2hfY2FuX2JlX21vdW50ZWQgPSAhZnNfbWdyX292ZXJsYXlmc19hbHJlYWR5X21vdW50ZWQoa1NjcmF0Y2hNb3VudFBvaW50LCBmYWxzZSk7CisgICAgZm9yIChjb25zdCBhdXRvJiBlbnRyeSA6IGZzX21ncl9vdmVybGF5ZnNfY2FuZGlkYXRlX2xpc3QoKmZzdGFiKSkgeworICAgICAgICBpZiAoZnNfbWdyX2lzX3Zlcml0eV9lbmFibGVkKGVudHJ5KSkgY29udGludWU7CisgICAgICAgIGF1dG8gbW91bnRfcG9pbnQgPSBmc19tZ3JfbW91bnRfcG9pbnQoZW50cnkubW91bnRfcG9pbnQpOworICAgICAgICBpZiAoZnNfbWdyX292ZXJsYXlmc19hbHJlYWR5X21vdW50ZWQobW91bnRfcG9pbnQpKSB7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBpZiAoc2NyYXRjaF9jYW5fYmVfbW91bnRlZCkgeworICAgICAgICAgICAgc2NyYXRjaF9jYW5fYmVfbW91bnRlZCA9IGZhbHNlOworICAgICAgICAgICAgVHJ5TW91bnRTY3JhdGNoKCk7CisgICAgICAgIH0KKyAgICAgICAgcmV0ICY9IGZzX21ncl9vdmVybGF5ZnNfbW91bnRfb25lKGVudHJ5KTsKKyAgICB9CisgICAgcmV0dXJuIHJldDsKK30KKworYm9vbCBmc19tZ3Jfb3ZlcmxheWZzX2lzX3NldHVwKCkgeworICAgIGlmICghT3ZlcmxheWZzU2V0dXBBbGxvd2VkKCkpIHsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBpZiAoZnNfbWdyX292ZXJ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udHJ5LT5mc190eXBlICE9ICJvdmVybGF5ZnMiKSB7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBjb25zdCBhdXRvIG9wdGlvbnMgPSBhbmRyb2lkOjpiYXNlOjpTcGxpdChlbnRyeS0+ZnNfb3B0aW9ucywgIiwiKTsKKyAgICAgICAgZm9yIChjb25zdCBhdXRvJiBvcHQgOiBvcHRpb25zKSB7CisgICAgICAgICAgICBpZiAob3B0ID09IGxvd2VyZGlyKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIGZhbHNlOworfQorCituYW1lc3BhY2UgYW5kcm9pZCB7CituYW1lc3BhY2UgZnNfbWdyIHsKKwordm9pZCBNb3VudE92ZXJsYXlmcyhjb25zdCBGc3RhYkVudHJ5JiBmc3RhYl9lbnRyeSwgYm9vbCogc2NyYXRjaF9jYW5fYmVfbW91bnRlZCkgeworICAgIGlmICghT3ZlcmxheWZzU2V0dXBBbGxvd2VkKCkpIHsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKyAgICBjb25zdCBhdXRvIGNhbmRpZGF0ZXMgPSBmc19tZ3Jfb3ZlcmxheWZzX2NhbmRpZGF0ZV9saXN0KHtmc3RhYl9lbnRyeX0pOworICAgIGlmIChjYW5kaWRhdGVzLmVtcHR5KCkpIHsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKyAgICBjb25zdCBhdXRvJiBlbnRyeSA9IGNhbmRpZGF0ZXMuZnJvbnQoKTsKKyAgICBpZiAoZnNfbWdyX2lzX3Zlcml0eV9lbmFibGVkKGVudHJ5KSkgeworICAgICAgICByZXR1cm47CisgICAgfQorICAgIGNvbnN0IGF1dG8gbW91bnRfcG9pbnQgPSBmc19tZ3JfbW91bnRfcG9pbnQoZW50cnkubW91bnRfcG9pbnQpOworICAgIGlmIChmc19tZ3Jfb3ZlcmxheWZzX2FscmVhZHlfbW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c19jb250cm9sLmgiCisjaW5jbHVkZSAiZnNfbWdyX292ZXJsYXlmc19tb3VudC5oIgogCiB1c2luZyBuYW1lc3BhY2Ugc3RkOjpsaXRlcmFsczsKIHVzaW5nIGFuZHJvaWQ6OmZzX21ncjo6RnN0YWI7CkBAIC04NywxNyArODksNiBAQAogICAgIHJldHVybiBlbnRyeS5tb3VudF9wb2ludDsKIH0KIAotY29uc3QgRnN0YWJFbnRyeSogR2V0V3JhcHBlZEVudHJ5KGNvbnN0IEZzdGFiJiBvdmVybGF5ZnNfY2FuZGlkYXRlcywgY29uc3QgRnN0YWJFbnRyeSYgZW50cnkpIHsKLSAgICBhdXRvIG1vdW50X3BvaW50ID0gc3lzdGVtX21vdW50X3BvaW50KGVudHJ5KTsKLSAgICBhdXRvIGl0ID0gc3RkOjpmaW5kX2lmKG92ZXJsYXlmc19jYW5kaWRhdGVzLmJlZ2luKCksIG92ZXJsYXlmc19jYW5kaWRhdGVzLmVuZCgpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgWyZtb3VudF9wb2ludF0oY29uc3QgYXV0byYgZW50cnkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gYW5kcm9pZDo6YmFzZTo6U3RhcnRzV2l0aChtb3VudF9wb2ludCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzeXN0ZW1fbW91bnRfcG9pbnQoZW50cnkpICsgIi8iKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pOwotICAgIGlmIChpdCA9PSBvdmVybGF5ZnNfY2FuZGlkYXRlcy5lbmQoKSkgcmV0dXJuIG51bGxwdHI7Ci0gICAgcmV0dXJuICYoKml0KTsKLX0KLQogY2xhc3MgTXlMb2dnZXIgewogICBwdWJsaWM6CiAgICAgZXhwbGljaXQgTXlMb2dnZXIoYm9vbCB2ZXJib3NlKSA6IHZlcmJvc2VfKHZlcmJvc2UpIHt9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50aW5nKS5pc09rKCkpIHsKLSAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ291bGQgbm90IGRldGVybWluZSBjaGVja3BvaW50aW5nIHN0YXR1cy4iOwotICAgICAgICByZXR1cm4gZmFsc2U7Ci0gICAgfQotICAgIGlmIChjaGVja3BvaW50aW5nKSB7Ci0gICAgICAgIExPRyhFUlJPUikgPDwgIkNhbm5vdCB1c2UgcmVtb3VudCB3aGVuIGEgY2hlY2twb2ludCBpcyBpbiBwcm9ncmVzcy4iOwotICAgICAgICBMT0coRVJST1IpIDw8ICJUbyBmb3JjZSBlbmQgY2hlY2twb2ludGluZywgY2FsbCAndmRjIGNoZWNrcG9pbnQgY29tbWl0Q2hhbmdlcyciOwotICAgICAgICBMT0coRVJST1IpIDw8ICJXYXJuaW5nOiB0aGlzIGNhbiBsZWFkIHRvIGRhdGEgY29ycnVwdGlvbiBpZiByb2xsZWQgYmFjay4iOwotICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgYm9vbCBzaG93X2hlbHAgPSB0cnVlOworCisgICAgd2hpbGUgKHRydWUpIHsKKyAgICAgICAgaWYgKCF2b2xkLT5pc0NoZWNrcG9pbnRpbmcoJmNoZWNrcG9pbnRpbmcpLmlzT2soKSkgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ291bGQgbm90IGRldGVybWluZSBjaGVja3BvaW50aW5nIHN0YXR1cy4iOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIGlmICghY2hlY2twb2ludGluZykgeworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgaWYgKHNob3dfaGVscCkgeworICAgICAgICAgICAgc2hvd19oZWxwID0gZmFsc2U7CisgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgIldBUk5JTkc6IFVzZXJkYXRhIGNoZWNrcG9pbnQgaXMgaW4gcHJvZ3Jlc3MuICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAiVG8gZm9yY2libHkgZW5kIGNoZWNrcG9pbnRpbmcsICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAiY2FsbCAndmRjIGNoZWNrcG9pbnQgY29tbWl0Q2hhbmdlcycuICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAiVGhpcyBjYW4gbGVhZCB0byBkYXRhIGNvcnJ1cHRpb24gaWYgcm9sbGVkIGJhY2suIgorICAgICAgICAgICAgICAgICAgICAgIDw8IHN0ZDo6ZW5kbDsKKyAgICAgICAgICAgIExPRyhJTkZPKSA8PCAiV2FpdGluZyBmb3IgY2hlY2twb2ludCB0byBjb21wbGV0ZSBiZWZvcmUgcmVtb3VudGluZy4uLiI7CisgICAgICAgIH0KKyAgICAgICAgc3RkOjp0aGlzX3RocmVhZDo6c2xlZXBfZm9yKDRzKTsKICAgICB9CiAgICAgcmV0dXJuIHRydWU7CiB9CkBAIC0xOTYsOSArMTk3LDYgQEAKICAgICBpZiAoYXV0byBjYW5kaWRhdGVfZW50cnkgPSBHZXRFbnRyeUZvck1vdW50UG9pbnQoJmNhbmRpZGF0ZXMsIGVudHJ5Lm1vdW50X3BvaW50KSkgewogICAgICAgICByZXR1cm4gY2FuZGlkYXRlX2VudHJ5LT5mc190eXBlID09IGVudHJ5LmZzX3R5cGU7CiAgICAgfQotICAgIGlmIChHZXRXcmFwcGVkRW50cnkoY2FuZGlkYXRlcywgZW50cnkpKSB7Ci0gICAgICAgIHJldHVybiBmYWxzZTsKLSAgICB9CiAgICAgcmV0dXJuIHRydWU7CiB9CiAKQEAgLTI1MiwxMSArMjUwLDYgQEAKICAgICAgICAgfQogCiAgICAgICAgIGNvbnN0IEZzdGFiRW50cnkqIGVudHJ5ID0gJippdDsKLSAgICAgICAgaWYgKGF1dG8gd3JhcCA9IEdldFdyYXBwZWRFbnRyeShjYW5kaWRhdGVzLCAqZW50cnkpOyB3cmFwICE9IG51bGxwdHIpIHsKLSAgICAgICAgICAgIExPRyhJTkZPKSA8PCAicGFydGl0aW9uICIgPDwgYXJnIDw8ICIgY292ZXJlZCBieSBvdmVybGF5ZnMgZm9yICIgPDwgd3JhcC0+bW91bnRfcG9pbnQKLSAgICAgICAgICAgICAgICAgICAgICA8PCAiLCBzd2l0Y2hpbmciOwotICAgICAgICAgICAgZW50cnkgPSB3cmFwOwotICAgICAgICB9CiAKICAgICAgICAgLy8gSWYgaXQncyBhbHJlYWR5IHJlbW91bnRlZCwgaW5jbHVkZSBpdCBzbyBpdCBnZXRzIGdyYWNlZnVsbHkgc2tpcHBlZAogICAgICAgICAvLyBsYXRlciBvbi4KQEAgLTM4OSw4ICszODIsOCBAQAogCiAgICAgLy8gTm93IHJlbW91bnQhCiAgICAgZm9yIChjb25zdCBhdXRvJiBtbnRfcG9pbnQgOiB7bW91bnRfcG9pbnQsIGVudHJ5Lm1vdW50X3BvaW50fSkgewotICAgICAgICBpZiAoOjptb3VudChibGtfZGV2aWNlLmNfc3RyKCksIG1udF9wb2ludC5jX3N0cigpLCBlbnRyeS5mc190eXBlLmNfc3RyKCksIE1TX1JFTU9VTlQsCi0gICAgICAgICAgICAgICAgICAgIG51bGxwdHIpID09IDApIHsKKyAgICAgICAgaWYgKDo6bW91bnQoYmxrX2RldmljZS5jX3N0cigpLCBtbnRfcG9pbnQuY19zdHIoKSwgZW50cnkuZnNfdHlwZS5jX3N0cigpLAorICAgICAgICAgICAgICAgICAgICBNU19SRU1PVU5UIHwgTVNfTk9BVElNRSwgbnVsbHB0cikgPT0gMCkgewogICAgICAgICAgICAgTE9HKElORk8pIDw8ICJSZW1vdW50ZWQgIiA8PCBtbnRfcG9pbnQgPDwgIiBhcyBSVyI7CiAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgfQpAQCAtNjE3LDcgKzYxMCwxOSBAQAogICAgIH0KIAogICAgIC8vIE1ha2Ugc3VyZSB3ZSBhcmUgcm9vdC4KLSAgICBpZiAoOjpnZXR1aWQoKSAhPSAwKSB7CisgICAgaWYgKGNvbnN0IGF1dG8gdWlkID0g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geworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGVycm5vICE9IEVBR0FJTikgeworICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBhbGxvY2F0ZSBzcGFjZSBmb3IgZmlsZTogIiA8PCBmaWxlX3BhdGgKKyAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgc2l6ZTogIiA8PCBmaWxlX3NpemU7CisgICAgICAgICAgICByZXR1cm4gRmllbWFwU3RhdHVzOjpGcm9tRXJybm8oZXJybm8pOworICAgICAgICB9CisKKyAgICAgICAgc3RydWN0IHN0YXQgczsKKyAgICAgICAgaWYgKGZzdGF0KGZpbGVfZmQsICZzKSA8IDApIHsKKyAgICAgICAgICAgIFBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gZnN0YXQgYWZ0ZXIgZmFsbG9jYXRlIGZhaWx1cmU6ICIgPDwgZmlsZV9wYXRoOworICAgICAgICAgICAgcmV0dXJuIEZpZW1hcFN0YXR1czo6RnJvbUVycm5vKGVycm5vKTsKKyAgICAgICAgfQorICAgICAgICBpZiAoIXByZXZfc2l6ZSkgeworICAgICAgICAgICAgcHJldl9zaXplID0ge3Muc3Rfc2l6ZX07CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBpZiAoKnByZXZfc2l6ZSA+PSBzLnN0X3NpemUpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkZhbGxvY2F0ZSByZXRyeSBmYWlsZWQsIGdvdCAiIDw8IHMuc3Rfc2l6ZSA8PCAiLCBhc2tlZCBmb3IgIgorICAgICAgICAgICAgICAgICAgICAgICA8PCBmaWxlX3NpemU7CisgICAgICAgICAgICByZXR1cm4gRmllbWFwU3RhdHVzKEZpZW1hcFN0YXR1czo6RXJyb3JDb2RlOjpOT19TUEFDRSk7CisgICAgICAgIH0KKyAgICAgICAgTE9HKElORk8pIDw8ICJSZXRyeWluZyBmYWxsb2NhdGU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SBpbWFnZS4KICAgICB9IGVsc2UgewogICAgICAgICBleHRyYWN0ZWRfdmJtZXRhX3BhdGggPSBFeHRyYWN0VkJNZXRhSW1hZ2UoYXZiX2ltYWdlX3BhdGgsIGltYWdlX2ZpbGVfbmFtZSArICItdmJtZXRhLmltZyIpOwpAQCAtNjU1LDEwICs2NTYsMTIgQEAKICAgICAgICAgICAgICIgICAgICBQYXJ0aXRpb24gTmFtZTogICAgICAgICAgYm9vdFxuIgogICAgICAgICAgICAgIiAgICAgIFJvbGxiYWNrIEluZGV4IExvY2F0aW9uOiAxXG4iCiAgICAgICAgICAgICAiICAgICAgUHVibGljIGtleSAoc2hhMSk6ICAgICAgIGNkYmI3NzE3N2Y3MzE5MjBiYmUwYTBmOTRmODRkOTAzOGFlMDYxN2RcbiIKKyAgICAgICAgICAgICIgICAgICBGbGFnczogICAgICAgICAgICAgICAgICAgMFxuIgogICAgICAgICAgICAgIiAgICBDaGFpbiBQYXJ0aXRpb24gZGVzY3JpcHRvcjpcbiIKICAgICAgICAgICAgICIgICAgICBQYXJ0aXRpb24gTmFtZTogICAgICAgICAgc3lzdGVtXG4iCiAgICAgICAgICAgICAiICAgICAgUm9sbGJhY2sgSW5kZXggTG9jYXRpb246IDJcbiIKLSAgICAgICAgICAgICIgICAgICBQdWJsaWMga2V5IChzaGExKTogICAgICAgMjU5N2MyMThhYWU0NzBhMTMwZjYxMTYyZmVhYWU3MGFmZDk3ZjAxMVxuIiwKKyAgICAgICAgICAgICIgICAgICBQdWJsaWMga2V5IChzaGExKTogICAgICAgMjU5N2MyMThhYWU0NzBhMTMwZjYxMTYyZmVhYWU3MGFmZDk3ZjAxMVxuIgorICAgICAgICAgICAgIiAgICAgIEZsYWdzOiAgICAgICAgICAgICAgICAgICAwXG4iLAogICAgICAgICAgICAgSW5mb0ltYWdlKCJ2Ym1ldGEuaW1nIikpOwogCiAgICAgYW5kcm9pZDo6YmFzZTo6dW5pcXVlX2ZkIGZkKG9wZW4odmJtZXRhX3Bh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AzOGFlMDYxN2RcbiIKKyAgICAgICAgICAgICIgICAgICBGbGFnczogICAgICAgICAgICAgICAgICAgMFxuIgogICAgICAgICAgICAgIiAgICBDaGFpbiBQYXJ0aXRpb24gZGVzY3JpcHRvcjpcbiIKICAgICAgICAgICAgICIgICAgICBQYXJ0aXRpb24gTmFtZTogICAgICAgICAgdmJtZXRhX3N5c3RlbVxuIgogICAgICAgICAgICAgIiAgICAgIFJvbGxiYWNrIEluZGV4IExvY2F0aW9uOiAyXG4iCi0gICAgICAgICAgICAiICAgICAgUHVibGljIGtleSAoc2hhMSk6ICAgICAgIDI1OTdjMjE4YWFlNDcwYTEzMGY2MTE2MmZlYWFlNzBhZmQ5N2YwMTFcbiIsCisgICAgICAgICAgICAiICAgICAgUHVibGljIGtleSAoc2hhMSk6ICAgICAgIDI1OTdjMjE4YWFlNDcwYTEzMGY2MTE2MmZlYWFlNzBhZmQ5N2YwMTFcbiIKKyAgICAgICAgICAgICIgICAgICBGbGFnczogICAgICAgICAgICAgICAgICAgMFxuIiwKICAgICAgICAgICAgIEluZm9JbWFnZSgidmJtZXRhLmltZyIpKTsKIAogICAgIGJvb2wgZmF0YWxfZXJyb3IgPSBmYWxzZTsKQEAgLTkwOSw3ICs5MTcsOCBAQAogICAgICAgICAgICAgIiAgICBDaGFpbiBQYXJ0aXRpb24gZGVzY3JpcHRvcjpcbiIKICAgICAgICAgICAgICIgICAgICBQYXJ0aXRpb24gTmFtZTogICAgICAgICAgc3lzdGVtXG4iCiAgICAgICAgICAgICAiICAgICAgUm9sbGJhY2sgSW5kZXggTG9jYXRpb246IDNcbiIKLSAgICAgICAgICAgICIgICAgICBQdWJsaWMga2V5IChzaGExKTogICAgICAgMjU5N2MyMThhYWU0NzBhMTMwZjYxMTYyZmVhYWU3MGFmZDk3ZjAxMVxuIiwKKyAgICAgICAgICAgICIgICAgICBQdWJsaWMga2V5IChzaGExKTogICAgICAgMjU5N2MyMThhYWU0NzBhMTMwZjYxMTYyZmVhYWU3MG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Bkb2VzIG5vdCBoYXZlIGEgc3RhYmxlIGludGVyZmFjZS4KKyAgICBuYW1lOiAibGliZnN0YWIiLAorICAgIHZlbmRvcl9hdmFpbGFibGU6IHRydWUsCisgICAgcmFtZGlza19hdmFpbGFibGU6IHRydWUsCisgICAgdmVuZG9yX3JhbWRpc2tfYXZhaWxhYmxlOiB0cnVlLAorICAgIHJlY292ZXJ5X2F2YWlsYWJsZTogdHJ1ZSwKKyAgICBob3N0X3N1cHBvcnRlZDogdHJ1ZSwKKyAgICBkZWZhdWx0czogWyJmc19tZ3JfZGVmYXVsdHMiXSwKKyAgICBleHBvcnRfaW5jbHVkZV9kaXJzOiBbImluY2x1ZGUiXSwKKyAgICBoZWFkZXJfbGliczogWworICAgICAgICAibGliYmFzZV9oZWFkZXJzIiwKKyAgICAgICAgImxpYmdzaV9oZWFkZXJzIiwKKyAgICBdLAorICAgIHNyY3M6IFsKKyAgICAgICAgImZzdGFiLmNwcCIsCisgICAgICAgICJib290X2NvbmZpZy5jcHAiLAorICAgICAgICAic2xvdHNlbGVjdC5jcHAiLAorICAgIF0sCisgICAgdGFyZ2V0OiB7CisgICAgICAgIGRhcndpbjogeworICAgICAgICAgICAgZW5hYmxlZDogZmFsc2UsCisgICAgICAgIH0sCisgICAgICAgIHZlbmRvcjogeworICAgICAgICAgICAgY2ZsYWdzOiBbCisgICAgICAgICAgICAgICAgLy8gU2tpcHBpbmcgZW50cmllcyBpbiBmc3RhYiBzaG91bGQgb25seSBiZSBkb25lIGluIGEgc3lzdGVtCisgICAgICAgICAgICAgICAgLy8gcHJvY2VzcyBhcyB0aGUgY29uZmlnIGZpbGUgaXMgaW4gL3N5c3RlbV9leHQuCisgICAgICAgICAgICAgICAgLy8gUmVtb3ZlIHRoZSBvcCBmcm9tIHRoZSB2ZW5kb3IgdmFyaWFudC4KKyAgICAgICAgICAgICAgICAiLUROT19TS0lQX01PVU5UIiwKKyAgICAgICAgICAgIF0sCisgICAgICAgIH0sCisgICAgfSwKKyAg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KKyAgICAgICAgICAgIC8vIEVuc3VyZSB0aGUgcmV0dXJuZWQgcGF0aCBlbmRzIHdpdGggYSAvCisgICAgICAgICAgICBpZiAoYW5kcm9pZF9kdF9kaXIuYmFjaygpICE9ICcvJykgeworICAgICAgICAgICAgICAgIGFuZHJvaWRfZHRfZGlyLnB1c2hfYmFjaygnLycpOworICAgICAgICAgICAgfQorICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgLy8gRmFsbCBiYWNrIHRvIHRoZSBzdGFuZGFyZCBwcm9jZnMtYmFzZWQgcGF0aAorICAgICAgICAgICAgYW5kcm9pZF9kdF9kaXIgPSAiL3Byb2MvZGV2aWNlLXRyZWUvZmlybXdhcmUvYW5kcm9pZC8iOworICAgICAgICB9CisgICAgICAgIExJTkZPIDw8ICJVc2luZyBBbmRyb2lkIERUIGRpcmVjdG9yeSAiIDw8IGFuZHJvaWRfZHRfZGlyOworICAgICAgICByZXR1cm4gYW5kcm9pZF9kdF9kaXI7CisgICAgfSgpOworICAgIHJldHVybiBrQW5kcm9pZER0RGlyOworfQorCit2b2lkIEltcG9ydEJvb3Rjb25maWdGcm9tU3RyaW5nKGNvbnN0IHN0ZDo6c3RyaW5nJiBib290Y29uZmlnLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OmZ1bmN0aW9uPHZvaWQoc3RkOjpzdHJpbmcsIHN0ZDo6c3RyaW5nKT4mIGZuKSB7CisgICAgZm9yIChzdGQ6OnN0cmluZ192aWV3IGxpbmUgOiBhbmRyb2lkOjpiYXNlOjpTcGxpdChib290Y29uZmlnLCAiXG4iKSkgeworICAgICAgICBjb25zdCBhdXRvIGVxdWFsX3BvcyA9IGxpbmUuZmluZCgnPScpOworICAgICAgICBzdGQ6OnN0cmluZyBrZXkgPSBhbmRyb2lkOjpiYXNlOjpUcmltKGxpbmUuc3Vic3RyKDAsIGVxdWFsX3BvcykpOworICAgICAgICBpZiAoa2V5LmVtcHR5KCkpIHsKKyAgIC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YmVnaW4oKSwgdmFsdWUuZW5kKCksICciJyksIHZhbHVlLmVuZCgpKTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgLy8gSW4gb3JkZXIgdG8gbm90IGJyZWFrIHRoZSBleHBlY3RhdGlvbnMgb2YgZXhpc3RpbmcgY29kZSwgd2UgbW9kaWZ5IHRoZSB2YWx1ZSB0bworICAgICAgICAgICAgICAgIC8vIGtlZXAgdGhlIGZvcm1hdCBjb25zaXN0ZW50IHdpdGggdGhlIGtlcm5lbCBjbWRsaW5lIGJ5IHJlbW92aW5nIHF1b3RlIGFuZCBzcGFjZS4KKyAgICAgICAgICAgICAgICBzdGQ6OnN0cmluZ192aWV3IHN2KHZhbHVlKTsKKyAgICAgICAgICAgICAgICBhbmRyb2lkOjpiYXNlOjpDb25zdW1lUHJlZml4KCZzdiwgIlwiIik7CisgICAgICAgICAgICAgICAgYW5kcm9pZDo6YmFzZTo6Q29uc3VtZVN1ZmZpeCgmc3YsICJcIiIpOworICAgICAgICAgICAgICAgIHZhbHVlID0gYW5kcm9pZDo6YmFzZTo6U3RyaW5nUmVwbGFjZShzdiwgUiIoIiwgIikiLCAiLCIsIHRydWUpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIC8vICJrZXkiIGFuZCAia2V5ID0iIG1lYW5zIGVtcHR5IHZhbHVlLgorICAgICAgICBmbihzdGQ6Om1vdmUoa2V5KSwgc3RkOjptb3ZlKHZhbHVlKSk7CisgICAgfQorfQorCitib29sIEdldEJvb3Rjb25maWdGcm9tU3RyaW5nKGNvbnN0IHN0ZDo6c3RyaW5nJiBib290Y29uZmlnLCBjb25zdCBzdGQ6OnN0cmluZyYga2V5LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6OnN0cmluZyogb3V0KSB7CisgICAgYm9vbCBmb3VuZCA9IGZhbHNlOworICAgIEltcG9ydEJvb3Rjb25maWdGcm9tU3RyaW5nKGJvb3Rjb25maWcsIFsmXSh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3RhdGljIGNvbnN0ZXhwciBjaGFyIHF1b3RlID0gJyInOworCisgICAgc2l6ZV90IGJhc2UgPSAwOworICAgIHdoaWxlICh0cnVlKSB7CisgICAgICAgIC8vIHNraXAgcXVvdGVkIHNwYW5zCisgICAgICAgIGF1dG8gZm91bmQgPSBiYXNlOworICAgICAgICB3aGlsZSAoKChmb3VuZCA9IGNtZGxpbmUuZmluZF9maXJzdF9vZigiIFwiIiwgZm91bmQpKSAhPSBjbWRsaW5lLm5wb3MpICYmCisgICAgICAgICAgICAgICAoY21kbGluZVtmb3VuZF0gPT0gcXVvdGUpKSB7CisgICAgICAgICAgICAvLyB1bmJhbGFuY2VkIHF1b3RlIGlzIG9rCisgICAgICAgICAgICBpZiAoKGZvdW5kID0gY21kbGluZS5maW5kKHF1b3RlLCBmb3VuZCArIDEpKSA9PSBjbWRsaW5lLm5wb3MpIGJyZWFrOworICAgICAgICAgICAgKytmb3VuZDsKKyAgICAgICAgfQorICAgICAgICBzdGQ6OnN0cmluZyBwaWVjZSA9IGNtZGxpbmUuc3Vic3RyKGJhc2UsIGZvdW5kIC0gYmFzZSk7CisgICAgICAgIHBpZWNlLmVyYXNlKHN0ZDo6cmVtb3ZlKHBpZWNlLmJlZ2luKCksIHBpZWNlLmVuZCgpLCBxdW90ZSksIHBpZWNlLmVuZCgpKTsKKyAgICAgICAgYXV0byBlcXVhbF9zaWduID0gcGllY2UuZmluZCgnPScpOworICAgICAgICBpZiAoZXF1YWxfc2lnbiA9PSBwaWVjZS5ucG9zKSB7CisgICAgICAgICAgICBpZiAoIXBpZWNlLmVtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICAvLyBubyBkaWZmZXJlbmNlIGJldHdlZW4gPGtleT4gYW5kIDxrZXk+PQorICAgICAgICAgICAgICAgIGZuKHN0ZDo6bW92ZShwaWVjZSksICIiKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHN0ZDo6c3RyaW5nIHZhbHV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xhZyBtYWxmb3JtZWQ6ICIgPDwgYXJnOwogICAgICAgICAgICAgfQotICAgICAgICB9IGVsc2UgaWYgKGZsYWcgPT0gInpvbmVkX2RldmljZSIpIHsKLSAgICAgICAgICAgIGlmIChhY2Nlc3MoIi9kZXYvYmxvY2svYnktbmFtZS96b25lZF9kZXZpY2UiLCBGX09LKSA9PSAwKSB7Ci0gICAgICAgICAgICAgICAgZW50cnktPnpvbmVkX2RldmljZSA9ICIvZGV2L2Jsb2NrL2J5LW5hbWUvem9uZWRfZGV2aWNlIjsKLQotICAgICAgICAgICAgICAgIC8vIGF0Z2MgaW4gZjJmcyBkb2VzIG5vdCBzdXBwb3J0IGEgem9uZWQgZGV2aWNlCi0gICAgICAgICAgICAgICAgYXV0byBvcHRpb25zID0gU3BsaXQoZW50cnktPmZzX29wdGlvbnMsICIsIik7Ci0gICAgICAgICAgICAgICAgb3B0aW9ucy5lcmFzZShzdGQ6OnJlbW92ZShvcHRpb25zLmJlZ2luKCksIG9wdGlvbnMuZW5kKCksICJhdGdjIiksIG9wdGlvbnMuZW5kKCkpOwotICAgICAgICAgICAgICAgIGVudHJ5LT5mc19vcHRpb25zID0gYW5kcm9pZDo6YmFzZTo6Sm9pbihvcHRpb25zLCAiLCIpOwotICAgICAgICAgICAgICAgIExJTkZPIDw8ICJSZW1vdmVkIEFUR0MgaW4gZnNfb3B0aW9ucyBhcyAiIDw8IGVudHJ5LT5mc19vcHRpb25zCi0gICAgICAgICAgICAgICAgICAgICAgPDwgIiBmb3Igem9uZWQgZGV2aWNlPSIgPDwgZW50cnktPnpvbmVkX2RldmljZTsKLSAgICAgICAgICAgIH0KKyAgICAgICAgfSBlbHNlIGlmIChTdGFydHNXaXRoKGZsYWcsICJkZXZpY2U9IikpIHsKKyAgICAgICAgICAgIFBhcnNlVXNlckRldmljZXMoYXJnLCBlbnRyeSk7CiAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICBMV0FSTklORyA8PCAiV2FybmluZzogdW5rbm93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iBDT05ESVRJT05TIE9GIEFOWSBLSU5ELCBlaXRoZXIgZXhwcmVzcyBvciBpbXBsaWVkLgorICogU2VlIHRoZSBMaWNlbnNlIGZvciB0aGUgc3BlY2lmaWMgbGFuZ3VhZ2UgZ292ZXJuaW5nIHBlcm1pc3Npb25zIGFuZAorICogbGltaXRhdGlvbnMgdW5kZXIgdGhlIExpY2Vuc2UuCisgKgorICovCisKK3BhY2thZ2UgeworICAgIGRlZmF1bHRfdGVhbTogInRyZW5keV90ZWFtX2FuZHJvaWRfa2VybmVsIiwKK30KKworY2NfZGVmYXVsdHMgeworICAgIG5hbWU6ICJsaWJscF9mdXp6X2RlZmF1bHRzIiwKKyAgICBoZWFkZXJfbGliczogWworICAgICAgICAibGlic3RvcmFnZV9saXRlcmFsc19oZWFkZXJzIiwKKyAgICBdLAorICAgIHNoYXJlZF9saWJzOiBbCisgICAgICAgICJsaWJscCIsCisgICAgICAgICJsaWJiYXNlIiwKKyAgICAgICAgImxpYmxvZyIsCisgICAgXSwKKyAgICBzdGF0aWNfbGliczogWworICAgICAgICAibGliY3V0aWxzIiwKKyAgICBdLAorICAgIGluY2x1ZGVfZGlyczogWworICAgICAgICAic3lzdGVtL2NvcmUvZnNfbWdyL2xpYmxwIiwKKyAgICBdLAorICAgIGZ1enpfY29uZmlnOiB7CisgICAgICAgIGNjOiBbCisgICAgICAgICAgICAiYW5kcm9pZC1zeXN0ZW1zLXN0b3JhZ2VAZ29vZ2xlLmNvbSIsCisgICAgICAgIF0sCisgICAgICAgIGNvbXBvbmVudGlkOiA1OTE0OCwKKyAgICAgICAgaG90bGlzdHM6IFsiNDU5MzMxMSJdLAorICAgICAgICBkZXNjcmlwdGlvbjogIlRoZSBmdXp6ZXJzIHRhcmdldCB0aGUgQVBJcyBvZiBhbGwgbGlibHAgbW9kdWxlcyIsCisgICAgICAgIHZlY3RvcjogImxvY2FsX25vX3ByaXZpbGVnZXNfcmVxdWlyZWQiLAorICAgICAgICBzZXJ2aWNlX3Bya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ogInRlc3RfdmVuZG9yX2Jvb3RfdjRfd2l0aF9mcmFnIiwKKyAgICBkZWZhdWx0czogWyJ0ZXN0X3ZlbmRvcl9ib290X2dlbl9kZWZhdWx0cyJdLAorICAgIG91dDogWyJ0ZXN0X3ZlbmRvcl9ib290X3Y0X3dpdGhfZnJhZy5pbWciXSwKKyAgICBzcmNzOiBbCisgICAgICAgICI6dGVzdF9kdGIiLAorICAgICAgICAiOnRlc3RfdmVuZG9yX3JhbWRpc2tfbm9uZSIsCisgICAgICAgICI6dGVzdF92ZW5kb3JfcmFtZGlza19wbGF0Zm9ybSIsCisgICAgICAgICI6dGVzdF9ib290Y29uZmlnIiwKKyAgICBdLAorICAgIGNtZDogIiQobG9jYXRpb24gbWtib290aW1nKSAtLWhlYWRlcl92ZXJzaW9uIDQgIiArCisgICAgICAgICItLWR0YiAkKGxvY2F0aW9uIDp0ZXN0X2R0YikgIiArCisgICAgICAgICItLXZlbmRvcl9ib290Y29uZmlnICQobG9jYXRpb24gOnRlc3RfYm9vdGNvbmZpZykgIiArCisgICAgICAgICItLXJhbWRpc2tfdHlwZSBub25lIC0tcmFtZGlza19uYW1lIG5vbmVfcmFtZGlzayAiICsKKyAgICAgICAgIi0tdmVuZG9yX3JhbWRpc2tfZnJhZ21lbnQgJChsb2NhdGlvbiA6dGVzdF92ZW5kb3JfcmFtZGlza19ub25lKSAiICsKKyAgICAgICAgIi0tcmFtZGlza190eXBlIHBsYXRmb3JtIC0tcmFtZGlza19uYW1lIHBsYXRmb3JtX3JhbWRpc2sgIiArCisgICAgICAgICItLXZlbmRvcl9yYW1kaXNrX2ZyYWdtZW50ICQobG9jYXRpb24gOnRlc3RfdmVuZG9yX3JhbWRpc2tfcGxhdGZvcm0pICIgKworICAgICAgICAiLS12ZW5kb3JfYm9vdCAkKG91dCkgJiYgIiArCisgICAgICAgIGZhc3Rib290X3NpZ25fdGVzdF9pbWFnZSwKK30KKworY2NfZnV6eiB7CisgICAgbmFtZTogImxpYmxwX2Fwa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AgICAgICB9CisKKyAgICAgICAgUGFydGl0aW9uKiBzdXBlciA9IG1CdWlsZGVyLT5BZGRQYXJ0aXRpb24obVN1cGVyUGFydGl0aW9uTmFtZSwgTFBfUEFSVElUSU9OX0FUVFJfUkVBRE9OTFkpOworICAgICAgICBtQnVpbGRlci0+QWRkUGFydGl0aW9uKG1QYXJ0aXRpb25OYW1lLCBMUF9QQVJUSVRJT05fQVRUUl9SRUFET05MWSk7CisKKyAgICAgICAgaWYgKHN1cGVyKSB7CisgICAgICAgICAgICBpbnQ2NF90IG51bVNlY3RvcnMgPSBtRmRwLkNvbnN1bWVCb29sKCkgPyBtRmRwLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8dWludDY0X3Q+KAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrTWluU2VjdG9yVmFsdWUsIGtNYXhTZWN0b3JWYWx1ZSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGtWYWxpZE51bVNlY3RvcnM7CisgICAgICAgICAgICBpbnQ2NF90IHBoeXNpY2FsU2VjdG9yID0gbUZkcC5Db25zdW1lQm9vbCgpID8gbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQ2NF90PigKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtNaW5TZWN0b3JWYWx1ZSwga01heFNlY3RvclZhbHVlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGtWYWxpZFBoeXNpY2FsU2VjdG9yOworICAgICAgICAgICAgbUJ1aWxkZXItPkFkZExpbmVhckV4dGVudChzdXBlciwgbUJsb2NrRGV2aWNlSW5mb05hbWUsIG51bVNlY3RvcnMsIHBoeXNpY2FsU2VjdG9yKTsKKyAgICAgICAgfQorICAgIH0KK30KK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ludm9rZUFQSXMgPSBtRmRwLlBpY2tWYWx1ZUluQXJyYXk8Y29uc3QgZnVuY3Rpb248dm9pZCgpPj4oeworICAgICAgICAgICAgICAgICAgICBbJl0oKSB7IFdyaXRlVG9JbWFnZUZpbGUoZmQsIG1ldGFkYXRhVmFsdWUpOyB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7IFdyaXRlVG9JbWFnZUZpbGUoa0ltYWdlRmlsZS5jX3N0cigpLCBtZXRhZGF0YVZhbHVlKTsgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeyBGbGFzaFBhcnRpdGlvblRhYmxlKG9wZW5lciwga1N1cGVyTmFtZSwgbWV0YWRhdGFWYWx1ZSk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIFVwZGF0ZVBhcnRpdGlvblRhYmxlKG9wZW5lciwgbVBhcnRpdGlvbk5hbWUsIG1ldGFkYXRhVmFsdWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVCb29sKCkgPyAwIDogMSAvKiBzbG90X251bWJlciAqLyk7CisgICAgICAgICAgICAgICAgICAgIH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIFJlYWRNZXRhZGF0YShtUGFydGl0aW9uTmFtZSwgbUZkcC5Db25zdW1lQm9vbCgpID8gMCA6IDEgLyogc2xvdF9udW1iZXIgKi8pOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7IEZsYXNoUGFydGl0aW9uVGFibGUobVBhcnRpdGlvbk5hbWUsIG1ldGFkYXRhVmFsdWUpOyB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBVcGRhdGVQYXJ0aXRpb25UYWJsZShtUGFydGl0aW9uTmFtZSwgbWV0YWRhdGFWYWx1ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUJvb2woKSA/IDAgOiAxIC8qIHNsb3RfbnVtYmVyICovKTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgV3JpdGVUb0ltYWdlRmlsZShrSW1hZ2VGaWxlLmNfc3RyKCksIG1ldGFkYXRhVmFsdWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGFkYXRhLT5nZW9tZXRyeS5sb2dpY2FsX2Jsb2NrX3NpemUsIGltYWdlcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lQm9vbCgpID8gdHJ1ZSA6IGZhbHNlIC8qIHNwYXJzaWZ5ICovKTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKworICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBXcml0ZVNwbGl0SW1hZ2VGaWxlcyhrSW1hZ2VGaWxlLmNfc3RyKCksIG1ldGFkYXRhVmFsdWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZXRhZGF0YS0+Z2VvbWV0cnkubG9naWNhbF9ibG9ja19zaXplLCBpbWFnZXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVCb29sKCkgPyB0cnVlIDogZmFsc2UgLyogc3BhcnNpZnkgKi8pOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7IFJlYWRGcm9tSW1hZ2VGaWxlKGtJbWFnZUZpbGUuY19zdHIoKSk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsgSXNFbXB0eVN1cGVySW1hZ2Uoa0ltYWdlRmlsZS5jX3N0cigpKTsgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgdWludDY0X3QgYnVmZmVyU2l6ZSA9IG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50NjRfdD4oCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgKiBrTWV0YWRhdGFHZW9tZXRyeVNpemUsIGtNYXhCdWZmZXJTaXplKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHZlY3Rvcjx1aW50OF90PiBidWZmZXIgPSBtRmRwLkNvbnN1bWVCeXRlczx1aW50OF90PihrTWF4Qnl0ZXMpOworICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyLnJlc2l6ZShidWZmZXJTaXplKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIFJlYWRGcm9tSW1hZ2VCbG9iKGJ1ZmZlci5kYXRhKCksIGJ1ZmZlci5zaXplKCkpOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBncm91cFZlY3RvclNpemUgPSBtZXRhZGF0YS0+Z3JvdXBzLnNpemUoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQzMl90IHJhbmRvbUdyb3VwSW5kZXggPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8dWludDMyX3Q+KDAsIGdyb3VwVmVjdG9yU2l6ZSAtIDEpOworICAgICAgICAgICAgICAgICAgICAgICAgR2V0UGFydGl0aW9uR3JvdXBOYW1lKG1ldGFkYXRhLT5ncm91cHNbcmFuZG9tR3JvdXBJbmRleF0pOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBibG9ja0RldmljZVZlY3RvclNpemUgPSBtZXRhZGF0YS0+YmxvY2tfZGV2aWNlcy5zaXplKCk7CisgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCByYW5kb21CbG9ja0RldmljZUluZGV4ID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQzMl90PigwLCBibG9ja0RldmljZVZlY3RvclNpemUgLSAxKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIEdldEJsb2NrRGV2aWNlUGFydGl0aW9uTmFtZSgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0YWRhdGEtPmJsb2NrX2RldmljZXNbcmFuZG9tQmxvY2tEZXZpY2VJbmRleF0pOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7IEdldE1ldGFkYXRhU3VwZXJCbG9ja0RldmljZShtZXRhZGF0YVZhbHVlKTsgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nIHN1ZmZpeCA9IG1GZHAuQ29uc3VtZUJvb2woKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBtRmRwLlBpY2tWYWx1ZUluQXJyYXk8c3RyaW5nPihrU3VmZml4KQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBtRmRwLkNvbnN1bWVSYW5kb21MZW5ndGhTdHJpbmcoa01heEJ5dGVzKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIFNsb3ROdW1iZXJGb3JTbG90U3VmZml4KHN1ZmZpeCk7CisgICAgICAgICAgICAgICAgICAgIH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGF1dG8gZW50cnkgPSBGaW5kUGFydGl0aW9uKG1ldGFkYXRhVmFsdWUsIGtTeXN0ZW1QYXJ0aXRpb25OYW1lKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIEdldFBhcnRpdGlvblNpemUobWV0YWRhdGFWYWx1ZSwgKmVudHJ5KTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeyBHZXRQYXJ0aXRpb25TbG90U3VmZml4KG1QYXJ0aXRpb25OYW1lKTsgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeyBGaW5kUGFydGl0aW9uKG1ldGFkYXRhVmFsdWUsIG1QYXJ0aXRpb25OYW1lKTsgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgdWludDMyX3QgcGFydGl0aW9uVmVjdG9yU2l6ZSA9IG1ldGFkYXRhLT5wYXJ0aXRpb25zLnNpemUoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQzMl90IHJhbmRvbVBhcnRpdGlvbkluZGV4ID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQzMl90PigwLCBwYXJ0aXRpb25WZWN0b3JTaXplIC0gMSk7CisgICAgICAgICAgICAgICAgICAgICAgICBHZXRQYXJ0aXRpb25OYW1lKG1ldGFkYXRhLT5wYXJ0aXRpb25zW3JhbmRvbVBhcnRpdGlvbkluZGV4XSk7CisgICAgICAgICAgICAgICAgICAgIH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsgR2V0VG90YWxTdXBlclBhcnRpdGlvblNpemUobWV0YWRhdGFWYWx1ZSk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsgR2V0QmxvY2tEZXZpY2VQYXJ0aXRpb25OYW1lcyhtZXRhZGF0YVZhbHVlKTsgfSwKKyAgICAgICAgICAgIH0pOworICAgICAgICAgICAgaW52b2tlQVBJcygpOworICAgICAgICB9C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hcnRpdGlvbjsKKyAgICB0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4KKyAgICBUIGdldFBhcmFtVmFsdWUoVCB2YWxpZFZhbHVlKSB7CisgICAgICAgIFQgcGFyYW1ldGVyID0gdmFsaWRWYWx1ZTsKKyAgICAgICAgaWYgKG1GZHAuQ29uc3VtZUJvb2woKSkgeworICAgICAgICAgICAgcGFyYW1ldGVyID0gbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPFQ+KGtNaW5WYWx1ZSwga01heFZhbHVlKTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gcGFyYW1ldGVyOworICAgIH0KK307CisKK3ZvaWQgQnVpbGRlckZ1enplcjo6c2VsZWN0UmFuZG9tQnVpbGRlcihpbnQzMl90IHJhbmRvbUJ1aWxkZXIsIHN0cmluZyBzdXBlckJsb2NrRGV2aWNlTmFtZSkgeworICAgIHN3aXRjaCAocmFuZG9tQnVpbGRlcikgeworICAgICAgICBjYXNlIDA6IHsKKyAgICAgICAgICAgIHVpbnQzMl90IG1heE1ldGFkYXRhU2l6ZSA9IGdldFBhcmFtVmFsdWUoa1ZhbGlkTWF4TWV0YWRhdGFTaXplKTsKKyAgICAgICAgICAgIHVpbnQzMl90IG51bVNsb3RzID0gbUZkcC5Db25zdW1lQm9vbCgpID8gMCA6IDE7CisgICAgICAgICAgICBtQnVpbGRlciA9IE1ldGFkYXRhQnVpbGRlcjo6TmV3KG1CbG9ja0RldmljZXMsIHN1cGVyQmxvY2tEZXZpY2VOYW1lLCBtYXhNZXRhZGF0YVNpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bVNsb3RzKTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2UgMTogeworICAgICAgICAgICAgdWludDY0X3QgYmxvY2tEZXZTaXplID0KKyAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQ2NF90PihrTWluQmxvY2tEZXZWYWx1ZSwga01heEJsb2NrRGV2VmFsdWUpOworICAgICAgICAgICAgdWludDMyX3QgbWV0YWRhdGFNYXhTaXplID0KKyAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQzMl90PihrTWluTWV0YWRhdGFWYWx1ZSwga01heE1ldGFkYXRhVmFsdWUpOworICAgICAgICAgICAgdWludDMyX3QgbWV0YWRhdGFTbG90Q291bnQgPSBtRmRwLkNvbnN1bWVCb29sKCkgPyAwIDogMTsKKyAgICAgICAgICAgIG1CdWlsZGVyID0gTWV0YWRhdGFCdWlsZGVyOjpOZXcoYmxvY2tEZXZTaXplLCBtZXRhZGF0YU1heFNpemUsIG1ldGFkYXRhU2xvdENvdW50KTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2UgMjogeworICAgICAgICAgICAgdWludDY0X3QgYmxvY2tEZXZTaXplID0gZ2V0UGFyYW1WYWx1ZShrVmFsaWRCbG9ja1NpemUpOworICAgICAgICAgICAgdWludDMyX3QgbWV0YWRhdGFTaXplID0gZ2V0UGFyYW1WYWx1ZShrVmFsaWRNZXRhZGF0YVNpemUpOworICAgICAgICAgICAgdWludDMyX3QgbWV0YWRhdGFTbG90Q291bnQgPSBtRmRwLkNvbnN1bWVCb29sKCkgPyAwIDogMTsKKyAgICAgICAgICAgIG1CdWlsZGVyID0gTWV0YWRhdGFCdWlsZGVyOjpOZXcoYmxvY2tEZXZTaXplLCBtZXRhZGF0YVNpemUsIG1ldGFkYXRhU2xvdENvdW50KTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2UgMzogeworICAgICAgICAgICAgc3RyaW5nIHN1cGVyUGFydGl0aW9uTmFtZSA9IG1GZHAuQ29uc3VtZUJvb2woKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBrU3VwZXJQYXJ0aXRpb25OYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1GZHAuQ29uc3VtZVJhbmRvbUxlbmd0aFN0cmluZyhrTWF4Qnl0ZXMpOworICAgICAgICAgICAgbUJ1aWxkZXIgPSBNZXRhZGF0YUJ1aWxkZXI6Ok5ldyhQYXJ0aXRpb25PcGVuZXIoKSwgc3VwZXJQYXJ0aXRpb25OYW1lLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2UoMCwgMSkgLyogc2xvdF9udW1iZXIgKi8pOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgY2FzZSA0OiB7CisgICAgICAgICAgICBzdHJpbmcgc3VwZXJQYXJ0aXRpb25OYW1lID0gbUZkcC5Db25zdW1lQm9vbCgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGtTdXBlclBhcnRpdGlvbk5hbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbUZkcC5Db25zdW1lUmFuZG9tTGVuZ3RoU3RyaW5nKGtNYXhCeXRlcyk7CisgICAgICAgICAgICBtQnVpbGRlciA9IE1ldGFkYXRhQnVpbGRlcjo6TmV3KAorICAgICAgICAgICAgICAgICAgICBzdXBlclBhcnRpdGlvbk5hbWUsCisgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50MzJfdD4oMCwgMSkgLyogc2xvdF9udW1iZXIgKi8pOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9Cit9CisKK3ZvaWQgQnVpbGRlckZ1enplcjo6c2V0dXBCdWlsZGVyKHN0cmluZyBzdXBlckJsb2NrRGV2aWNlTmFtZSkgeworICAgIHVpbnQ2NF90IGJsb2NrRGV2aWNlSW5mb1NpemUgPQorICAgICAgICAgICAgbUZkcC5Db25zdW1lQm9vbCgpCisgICAgICAgICAgICAgICAgICAgID8gbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQ2NF90PihrTWluQmxvY2tEZXZWYWx1ZSwga01heEJsb2NrRGV2VmFsdWUpCisgICAgICAgICAgICAgICAgICAgIDoga1ZhbGlkQmxvY2tEZXZpY2VJbmZvU2l6ZTsKKyAgICB1aW50MzJfdCBhbGlnbm1lbnQgPSBtRmRwLkNvbnN1bWVCb29sKCkgPyBtRmRwLkNvbnN1bWVJbnRlZ3JhbDx1aW50MzJfdD4oKSA6IGtWYWxpZEFsaWdubWVudDsKKyAgICB1aW50MzJfdCBhbGlnbm1lbnRPZmZzZXQgPQorICAgICAgICAgICAgbUZkcC5Db25zdW1lQm9vbCgpID8gbUZkcC5Db25zdW1lSW50ZWdyYWw8dWludDMyX3Q+KCkgOiBrVmFsaWRBbGlnbm1lbnRPZmZzZXQ7CisgICAgdWludDMyX3QgbG9naWNhbEJsb2NrU2l6ZSA9IG1GZHAuQ29uc3VtZUJvb2woKSA/IG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50MzJfdD4oCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga01pbkJsb2NrRGV2VmFsdWUsIGtNYXhCbG9ja0RldlZhbHVlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBrVmFsaWRMb2dpY2FsQmxvY2tTaXplOworCisgICAgQmxvY2tEZXZpY2VJbmZvIHN1cGVyKHN1cGVyQmxvY2tEZXZpY2VOYW1lLCBibG9ja0RldmljZUluZm9TaXplLCBhbGlnbm1lbnQsIGFsaWdubWVudE9mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgbG9naWNhbEJsb2NrU2l6ZSk7CisgICAgbUJsb2NrRGV2aWNlcy5wd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rTWF4Qnl0ZXMpOworICAgIEJsb2NrRGV2aWNlSW5mbyBjaGFuZ2VQYXJ0aXRpb25EZXZpY2VJbmZvKAorICAgICAgICAgICAgY2hhbmdlUGFydGl0aW9uRGV2aWNlSW5mb05hbWUsCisgICAgICAgICAgICBtRmRwLkNvbnN1bWVCb29sKCkKKyAgICAgICAgICAgICAgICAgICAgPyBtRmRwLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8dWludDY0X3Q+KGtNaW5CbG9ja0RldlZhbHVlLCBrTWF4QmxvY2tEZXZWYWx1ZSkKKyAgICAgICAgICAgICAgICAgICAgOiBrQmxvY2tEZXZpY2VJbmZvU2l6ZSAvKiBzaXplICovLAorICAgICAgICAgICAgbUZkcC5Db25zdW1lQm9vbCgpID8gbUZkcC5Db25zdW1lSW50ZWdyYWw8dWludDMyX3Q+KCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGtaZXJvQWxpZ25tZW50T2Zmc2V0IC8qIGFsaWdubWVudCAqLywKKyAgICAgICAgICAgIG1GZHAuQ29uc3VtZUJvb2woKSA/IG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQzMl90PigpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBrWmVyb0FsaWdubWVudE9mZnNldCAvKiBhbGlnbm1lbnRfb2Zmc2V0ICovLAorICAgICAgICAgICAgbUZkcC5Db25zdW1lQm9vbCgpCisgICAgICAgICAgICAgICAgICAgID8gbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQzMl90PihrTWluQmxvY2tEZXZWYWx1ZSwga01heEJsb2NrRGV2VmFsdWUpCisgICAgICAgICAgICAgICAgICAgIDoga1ZhbGlkTG9naWNhbEJsb2NrU2l6ZSk7CisgICAgbUJsb2NrRGV2aWNlcy5wdXNoX2JhY2soY2hhbmdlUGFydGl0aW9uRGV2aWNlSW5mbyk7Cit9CisKK3ZvaWQgQnVpbGRlckZ1enplcjo6Y2FsbENoYW5nZ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TbG90Q291bnQpOworCisgICAgaWYgKHNvdXJjZUJ1aWxkZXIgJiYgdGFyZ2V0QnVpbGRlcikgeworICAgICAgICBpbnQ2NF90IHNvdXJjZUdyb3VwcyA9IG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTxpbnQ2NF90PihrTWluRWxlbWVudHMsIGtNYXhFbGVtZW50cyk7CisgICAgICAgIGZvciAoaW50NjRfdCBpZHggPSAwOyBpZHggPCBzb3VyY2VHcm91cHM7ICsraWR4KSB7CisgICAgICAgICAgICBzb3VyY2VCdWlsZGVyLT5BZGRHcm91cCgKKyAgICAgICAgICAgICAgICAgICAgbUZkcC5QaWNrVmFsdWVJbkFycmF5KG1Hcm91cE5hbWVzKSwKKyAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lQm9vbCgpID8ga1ZhbGlkTWF4R3JvdXBTaXplIDogbUZkcC5Db25zdW1lSW50ZWdyYWw8dWludDY0X3Q+KCkpOworICAgICAgICB9CisKKyAgICAgICAgaW50NjRfdCBzb3VyY2VQYXJ0aXRpb25zID0gbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPGludDY0X3Q+KGtNaW5FbGVtZW50cywga01heEVsZW1lbnRzKTsKKyAgICAgICAgZm9yIChpbnQ2NF90IGlkeCA9IDA7IGlkeCA8IHNvdXJjZVBhcnRpdGlvbnM7ICsraWR4KSB7CisgICAgICAgICAgICBzb3VyY2VCdWlsZGVyLT5BZGRQYXJ0aXRpb24obUZkcC5QaWNrVmFsdWVJbkFycmF5KG1QYXJ0aXRpb25OYW1lcyksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTFBfUEFSVElUSU9OX0FUVFJfUkVBRE9OTFkpOworICAgICAgICB9CisKKyAgICAgICAgaW50NjRfdCB0YXJnZXRHcm91cHMgPSBtRmRwLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8aW50NjRfdD4oa01pbkVsZW1lbnRzLCBrTWF4RWxlbWVudHMpOworICAgICAgICBmb3IgKGludDY0X3QgaWR4ID0gMDsgaWR4IDwgdGFyZ2V0R3JvdXBzOyArK2lkeCkgeworICAgICAgICAgICAgdGFyZ2V0QnVpbGRlci0+QWRkR3JvdXAoCisgICAgICAgICAgICAgICAgICAgIG1GZHAuUGlja1ZhbHVlSW5BcnJheShtR3JvdXBOYW1lcyksCisgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUJvb2woKSA/IGtWYWxpZE1heEdyb3VwU2l6ZSA6IG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQ2NF90PigpKTsKKyAgICAgICAgfQorCisgICAgICAgIGludDY0X3QgdGFyZ2V0UGFydGl0aW9ucyA9IG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTxpbnQ2NF90PihrTWluRWxlbWVudHMsIGtNYXhFbGVtZW50cyk7CisgICAgICAgIGZvciAoaW50NjRfdCBpZHggPSAwOyBpZHggPCB0YXJnZXRQYXJ0aXRpb25zOyArK2lkeCkgeworICAgICAgICAgICAgdGFyZ2V0QnVpbGRlci0+QWRkUGFydGl0aW9uKG1GZHAuUGlja1ZhbHVlSW5BcnJheShtUGFydGl0aW9uTmFtZXMpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExQX1BBUlRJVElPTl9BVFRSX1JFQURPTkxZKTsKKyAgICAgICAgfQorCisgICAgICAgIE1ldGFkYXRhQnVpbGRlcjo6VmVyaWZ5RXh0ZW50c0FnYWluc3RTb3VyY2VNZXRhZGF0YSgKKyAgICAgICAgICAgICAgICAqc291cmNlQnVpbGRlciwgbUZkcC5Db25zdW1lQm9vbCgpID8gMCA6IDEgLyogc291cmNlX3Nsb3RfbnVtYmVyICovLCAqdGFyZ2V0QnVpbGRlciwKKyAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVCb29sKCkgPyAwIDogMSAvKiB0YXJnZXRfc2xvdF9udW1iZXIgKi8sCisgICAgICAgICAgICAgICAgdmVjdG9yPHN0c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AorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50NjRfdD4oCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrTWluVmFsdWUsIGtNYXhWYWx1ZSkgLyogbWF4X3NpemUgKi8pOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBzdHJpbmcgcGFydGl0aW9uTmFtZSA9IG1GZHAuUGlja1ZhbHVlSW5BcnJheShtUGFydGl0aW9uTmFtZXMpOworICAgICAgICAgICAgICAgICAgICAgICAgUGFydGl0aW9uKiBhZGRlZFBhcnRpdGlvbiA9IG1CdWlsZGVyLT5BZGRQYXJ0aXRpb24oCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnRpdGlvbk5hbWUsIG1GZHAuUGlja1ZhbHVlSW5BcnJheShrQXR0cmlidXRlVHlwZXMpKTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgaW50NjRfdCBudW1TZWN0b3JzID0gbUZkcC5Db25zdW1lQm9vbCgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQ2NF90PigKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGtNaW5TZWN0b3JWYWx1ZSwga01heFNlY3RvclZhbHVlKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGtWYWxpZE51bVNlY3RvcnM7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQ2NF90IHBoeXNpY2FsU2VjdG9yID0gbUZkcC5Db25zdW1lQm9vbCgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50NjRfdD4oCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga01pblNlY3RvclZhbHVlLCBrTWF4U2VjdG9yVmFsdWUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IGtWYWxpZFBoeXNpY2FsU2VjdG9yOworCisgICAgICAgICAgICAgICAgICAgICAgICBpbnQ2NF90IG51bUV4dGVudHMgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8aW50NjRfdD4oa01pbkVsZW1lbnRzLCBrTWF4RWxlbWVudHMpOworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG1GdXp6UGFydGl0aW9uKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBleHRlbnRBZGRlZCA9IGZhbHNlOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaW50NjRfdCBpID0gMDsgaSA8PSBudW1FeHRlbnRzOyArK2kpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0ZW50QWRkZWQgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1CdWlsZGVyLT5BZGRMaW5lYXJFeHRlbnQobUZ1enpQYXJ0aXRpb24sIGtEZXZpY2VJbmZvTmFtZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bVNlY3RvcnMsIHBoeXNpY2FsU2VjdG9yKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXh0ZW50QWRkZWQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pcXVlX3B0cjxMcE1ldGFkYXRhPiBtZXRhZGF0YSA9IG1CdWlsZGVyLT5FeHBvcnQoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdWludDY0X3QgYWxpZ25lZFNpemUgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50NjRfdD4oa01pblZhbHVlLCBrTWF4VmFsdWUpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRnV6elBhcnRpdGlvbi0+R2V0QmVnaW5uaW5nRXh0ZW50cyhMUF9TRUNUT1JfU0laRSAqIG51bUV4dGVudHMpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeyBjYWxsVmVyaWZ5RXh0ZW50c0FnYWluc3RTb3VyY2VNZXRhZGF0YSgpOyB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7IG1CdWlsZGVyLT5MaXN0UGFydGl0aW9uc0luR3JvdXAobUZkcC5QaWNrVmFsdWVJbkFycmF5KG1Hcm91cE5hbWVzKSk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGludDY0X3QgbWF4U2l6ZSA9IG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQ2NF90PigpOworICAgICAgICAgICAgICAgICAgICAgICAgbUJ1aWxkZXItPkNoYW5nZUdyb3VwU2l6ZShtRmRwLlBpY2tWYWx1ZUluQXJyYXkobUdyb3VwTmFtZXMpLCBtYXhTaXplKTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nIGRldmljZUluZm9OYW1lID0gbUZkcC5Db25zdW1lQm9vbCgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8ga0RldmljZUluZm9OYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbUZkcC5Db25zdW1lUmFuZG9tTGVuZ3RoU3RyaW5nKGtNYXhCeXRlcyk7CisgICAgICAgICAgICAgICAgICAgICAgICBtQnVpbGRlci0+R2V0QmxvY2tEZXZpY2VJbmZvKGRldmljZUluZm9OYW1lLCAmbUJsb2NrRGV2aWNlc1sxXSk7CisgICAgICAgICAgICAgICAgICAgIH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyBkZXZpY2VJbmZvTmFtZSA9IG1GZHAuQ29uc3VtZUJvb2woKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IGtEZXZpY2VJbmZvTmFtZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1GZHAuQ29uc3VtZVJhbmRvbUxlbmd0aFN0cmluZyhrTWF4Qnl0ZXMpOworICAgICAgICAgICAgICAgICAgICAgICAgbUJ1aWxkZXItPlVwZGF0ZUJsb2NrRGV2aWNlSW5mbyhkZXZpY2VJbmZvTmFtZSwgbUJsb2NrRGV2aWNlc1sxXSk7CisgICAgICAgICAgICAgICAgICAgIH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHVuaXF1ZV9wdHI8THBNZXRhZGF0YT4gbWV0YWRhdGEgPSBtQnVpbGRlci0+RXhwb3J0KCk7CisgICAgICAgICAgICAgICAgICAgICAgICBtQnVpbGRlci0+SW1wb3J0UGFydGl0aW9ucygqbWV0YWRhdGEuZ2V0KCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7bUZkcC5QaWNrVmFsdWVJbkFycmF5KG1QYXJ0aXRpb25OYW1lcyl9KTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeyBtQnVpbGRlci0+SGFzQmxvY2tEZXZpY2UobUZkcC5QaWNrVmFsdWVJbkFycmF5KG1QYXJ0aXRpb25OYW1lcykpOyB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7IG1CdWlsZGVyLT5TZXRWaXJ0dWFsQUJEZXZpY2VGbGFnKCk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsgbUJ1aWxkZXItPlNldEF1dG9TbG90U3VmZml4aW5nKCk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsgbUJ1aWxkZXItPkxpc3RHcm91cHMoKTsgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeyBtQnVpbGRlci0+VXNlZFNwYWNlKCk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsgbUJ1aWxkZXItPlJlcXVpcmVFeHBhbmRlZE1ldGFkYXRhSGVhZGVyKCk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQ2NF90IHJlc2l6ZWRQYXJ0aXRpb25TaXplID0gZ2V0UGFyYW1WYWx1ZSgwKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1CdWlsZGVyLT5SZXNpemVQYXJ0aXRpb24obVJlc2l6ZVBhcnRpdGlvbiwgcmVzaXplZFBhcnRpdGlvblNpemUpOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBzb3VyY2VTbG90ID0gbUZkcC5Db25zdW1lQm9vbCgpID8gMCA6IDE7CisgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCB0YXJnZXRTbG90ID0gbUZkcC5Db25zdW1lQm9vbCgpID8gMCA6IDE7CisgICAgICAgICAgICAgICAgICAgICAgICBQYXJ0aXRpb25PcGVuZXIgcGFydGl0aW9uT3BlbmVyOworICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nIHNvdXJjZVBhcnRpdGlvbiA9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUJvb2woKSA/IGtGdXp6UGFydGl0aW9uTmFtZSA6IGtEZXZpY2VJbmZvTmFtZTsKKworICAgICAgICAgICAgICAgICAgICAgICAgTWV0YWRhdGFCdWlsZGVyOjpOZXdGb3JVcGRhdGUocGFydGl0aW9uT3BlbmVyLCBzb3VyY2VQYXJ0aXRpb24sIHNvdXJjZVNsb3QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YXJnZXRTbG90KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBhcnRpdGlvbk9wZW5lci5HZXREZXZpY2VTdHJpbmcobUZkcC5QaWNrVmFsdWVJbkFycmF5KG1QYXJ0aXRpb25OYW1lcykpOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICB1bmlxdWVfcHRyPExwTWV0YWRhdGE+IG1ldGFkYXRhID0gbUJ1aWxkZXItPkV4cG9ydCgpOworICAgICAgICAgICAgICAgICAgICAgICAgTWV0YWRhdGFCdWlsZGVyOjpOZXcoKm1ldGFkYXRhLmdldCgpKTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeyBtQnVpbGRlci0+QWxsb2NhdGFibGVTcGFjZSgpOyB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBQYXJ0aXRpb25PcGVuZXIgcE9wZW5lcjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyBzdXBlclBhcnRpdGlvbk5hbWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVCb29sKCkgPyBrU3VwZXJQYXJ0aXRpb25OYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1GZHAuQ29uc3VtZVJhbmRvbUxlbmd0aFN0cmluZyhrTWF4Qnl0ZXMpOworICAgICAgICAgICAgICAgICAgICAgICAgcE9wZW5lci5PcGVuKHN1cGVyUGFydGl0aW9uTmFtZSwgT19SRE9OTFkpOworICAgICAgICAgICAgICAgICAgICAgICAgcE9wZW5lci5HZXRJbmZvKHN1cGVyUGFydGl0aW9uTmFtZSwgJm1CbG9ja0RldmljZXNbMF0pOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBQYXJ0aXRpb25PcGVuZXIgcE9wZW5lcjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHN0cmluZyBzdXBlclBhcnRpdGlvbk5hbWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVCb29sKCkgPyBrU3VwZXJQYXJ0aXRpb25OYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG1GZHAuQ29uc3VtZVJhbmRvbUxlbmd0aFN0cmluZyhrTWF4Qnl0ZXMpOworICAgICAgICAgICAgICAgICAgICAgICAgcE9wZW5lci5PcGVuKHN1cGVyUGFydGl0aW9uTmFtZSwgT19SRE9OTFkpOworICAgICAgICAgICAgICAgICAgICAgICAgcE9wZW5lci5HZXREZXZpY2VTdHJpbmcoc3VwZXJQYXJ0aXRpb25OYW1lKTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgSW50ZXJ2YWw6OkludGVyc2VjdCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW50ZXJ2YWwobUZkcC5Db25zdW1lSW50ZWdyYWw8dWludDY0X3Q+KCkgLyogZGV2aWNlIF9pbmRleCAqLywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lSW50ZWdyYWw8dWludDY0X3Q+KCkgLyogc3RhcnQgKi8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQ2NF90PigpKSAvKiBlbmQgKi8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEludGVydmFsKG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQ2NF90PigpIC8qIGRldmljZSBfaW5kZXggKi8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQ2NF90PigpIC8qIHN0YXJ0ICovLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVJbnRlZ3JhbDx1aW50NjRfdD4oKSAvKiBlbmQgKi8pKTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgdmVjdG9yPEludGVydmFsPiBpbnRlcnZhbFZlY3RvckE7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQ2NF90IGludGVybmFsVmVjdG9yQUVsZW1lbnRzID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPGludDY0X3Q+KGtNaW5FbGVtZW50cywga01heEVsZW1lbnRzKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoaW50NjRfdCBpZHggPSAwOyBpZHggPCBpbnRlcm5hbFZlY3RvckFFbGVtZW50czsgKytpZHgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnZhbFZlY3RvckEucHVzaF9iYWNrKAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW50ZXJ2YWwobUZkcC5Db25zdW1lSW50ZWdyYWw8dWludDY0X3Q+KCkgLyogZGV2aWNlIF9pbmRleCAqLywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQ2NF90PigpIC8qIHN0YXJ0ICovLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lSW50ZWdyYWw8dWludDY0X3Q+KCkgLyogZW5kICovKSk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIHZlY3RvcjxJbnRlcnZhbD4gaW50ZXJ2YWxWZWN0b3JCOworICAgICAgICAgICAgICAgICAgICAgICAgaW50NjRfdCBpbnRlcm5hbFZlY3RvckJFbGVtZW50cyA9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTxpbnQ2NF90PihrTWluRWxlbWVudHMsIGtNYXhFbGVtZW50cyk7CisgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGludDY0X3QgaWR4ID0gMDsgaWR4IDwgaW50ZXJuYWxWZWN0b3JCRWxlbWVudHM7ICsraWR4KSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJ2YWxWZWN0b3JCLnB1c2hfYmFjaygKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEludGVydmFsKG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQ2NF90PigpIC8qIGRldmljZSBfaW5kZXggKi8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVJbnRlZ3JhbDx1aW50NjRfdD4oKSAvKiBzdGFydCAqLywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsPHVpbnQ2NF90PigpIC8qIGVuZCAqLykpOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICBJbnRlcnZhbDo6SW50ZXJzZWN0KGludGVydmFsVmVjdG9yQSwgaW50ZXJ2YWxWZWN0b3JCKTsKKyAgICAgICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeworICAgICAgICAgICAgICAgICAgICAgICAgdWludDY0X3QgbnVtU2VjdG9ycyA9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50NjRfdD4oa01pblZhbHVlLCBrTWF4VmFsdWUpOworICAgICAgICAgICAgICAgICAgICAgICAgdWludDMyX3QgZGV2aWNlSW5kZXggPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8dWludDMyX3Q+KGtNaW5WYWx1ZSwga01heFZhbHVlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQ2NF90IHBoeXNpY2FsU2VjdG9yID0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUZkcC5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQ2NF90PihrTWluVmFsdWUsIGtNYXhWYWx1ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICBMaW5lYXJFeHRlbnQgZXh0ZW50KG51bVNlY3RvcnMsIGRldmljZUluZGV4LCBwaHlzaWNhbFNlY3Rvcik7CisgICAgICAgICAgICAgICAgICAgICAgICBleHRlbnQuQXNJbnRlcnZhbCgpOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgICAgICAgICBbJl0oKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBJUHJvcGVydHlGZXRjaGVyOjpPdmVycmlkZUZvclRlc3Rpbmcoc3RkOjptYWtlX3VuaXF1ZTxQcm9wZXJ0eUZldGNoZXI+KCkpOworICAgICAgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgfSk7CisgICAgICAgICAgICBpbnZva2VBUElzKCk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKG1GZHAuQ29uc3VtZUJvb2woKSkgeworICAgICAgICAgICAgbUJ1aWxkZXItPlJlbW92ZUdyb3VwQW5kUGFydGl0aW9ucyhtRmRwLlBpY2tWYWx1ZUluQXJyYXkobUdyb3VwTmFtZXMpKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHN0cmluZyByZW1vdmVQYXJ0aXRpb24gPSBtRmRwLlBpY2tWYWx1ZUluQXJyYXkobVBhcnRpdGlvbk5hbWVzKTsKKyAgICAgICAgICAgIG1CdWlsZGVyLT5SZW1vdmVQYXJ0aXRpb24ocmVtb3ZlUGFydGl0aW9uKTsKKyAgICAgICAgfQorICAgIH0KK30KKwordm9pZCBCdWlsZGVyRnV6emVyOjpwcm9jZXNzKCkgeworICAgIGludm9rZUJ1aWxkZXJBUElzKCk7Cit9CisKK2V4dGVybiAiQyIgaW50IExMVk1GdXp6ZXJUZXN0T25lSW5wdXQoY29uc3QgdWludDhfdCogZGF0YSwgc2l6ZV90IHNpemUpIHsKKyAgICBCdWlsZGVyRnV6emVyIGJ1aWxkZXJGdXp6ZXIoZGF0YSwgc2l6ZSk7CisgICAgYnVpbGRlckZ1enplci5wcm9jZXNzKCk7CisgICAgcmV0dXJuIDA7Cit9CmRpZmYgLS1naXQgYS9mc19tZ3IvbGlibHAvZnV6emVyL2xpYmxwX3N1cGVyX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b3RDb3VudCk7CisKKyAgICBpZiAobVN1cGVyQnVpbGRlci5nZXQoKSkgeworICAgICAgICBpZiAobUZkcC5Db25zdW1lQm9vbCgpKSB7CisgICAgICAgICAgICBpbnQzMl90IG51bVBhcnRpdGlvbnMgPQorICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8aW50MzJfdD4oa01pbkVsZW1lbnRzLCBrTWF4RWxlbWVudHMpOworICAgICAgICAgICAgYWRkTXVsdGlwbGVQYXJ0aXRpb25zKG51bVBhcnRpdGlvbnMpOworICAgICAgICB9CisKKyAgICAgICAgdWludDMyX3QgcmFuZG9tT3BlbiA9IG1GZHAuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50MzJfdD4oa01pbk9wZW4sIGtNYXhPcGVuKTsKKyAgICAgICAgY2FsbFJhbmRvbU9wZW4ocmFuZG9tT3Blbik7CisgICAgfQorfQorCit2b2lkIFN1cGVyTGF5b3V0QnVpbGRlckZ1enplcjo6YWRkTXVsdGlwbGVQYXJ0aXRpb25zKGludDMyX3QgbnVtUGFydGl0aW9ucykgeworICAgIGZvciAoaW50MzJfdCBpZHggPSAwOyBpZHggPCBudW1QYXJ0aXRpb25zOyArK2lkeCkgeworICAgICAgICBzdHJpbmcgcGFydGl0aW9uTmFtZSA9IG1GZHAuQ29uc3VtZUJvb2woKSA/IG1GZHAuQ29uc3VtZVJhbmRvbUxlbmd0aFN0cmluZyhrTWF4Qnl0ZXMpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogImJ1aWxkZXJfcGFydGl0aW9uIjsKKyAgICAgICAgbVN1cGVyQnVpbGRlci0+QWRkUGFydGl0aW9uKHBhcnRpdGlvbk5hbWUsIG1GZHAuUGlja1ZhbHVlSW5BcnJheShrQXR0cmlidXRlVHlwZXMpKTsKKyAgICB9Cit9CisKK3ZvaWQgU3VwZXJMYXlvdXRCdWlsZGVyRnV6emVyOjpj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l0aW9uTmFtZSA9CisgICAgICAgICAgICBtRmRwLkNvbnN1bWVCb29sKCkgPyAiYnVpbGRlcl9wYXJ0aXRpb24iIDogbUZkcC5Db25zdW1lUmFuZG9tTGVuZ3RoU3RyaW5nKGtNYXhCeXRlcyk7CisgICAgaWYgKCFmdXp6UGFydGl0aW9uTmFtZS5zaXplKCkpIHsKKyAgICAgICAgZnV6elBhcnRpdGlvbk5hbWUgPSAiYnVpbGRlcl9wYXJ0aXRpb24iOworICAgIH0KKyAgICBzZXR1cFN1cGVyTGF5b3V0QnVpbGRlcigpOworICAgIGlmIChtT3BlblN1Y2Nlc3MpIHsKKyAgICAgICAgd2hpbGUgKG1GZHAucmVtYWluaW5nX2J5dGVzKCkpIHsKKyAgICAgICAgICAgIGF1dG8gaW52b2tlU3VwZXJBUElzID0gbUZkcC5QaWNrVmFsdWVJbkFycmF5PGNvbnN0IGZ1bmN0aW9uPHZvaWQoKT4+KHsKKyAgICAgICAgICAgICAgICAgICAgWyZdKCkgeyBtU3VwZXJMYXlvdXRCdWlsZGVyLkdldEltYWdlTGF5b3V0KCk7IH0sCisgICAgICAgICAgICAgICAgICAgIFsmXSgpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1TdXBlckxheW91dEJ1aWxkZXIuQWRkUGFydGl0aW9uKGZ1enpQYXJ0aXRpb25OYW1lLCBpbWFnZU5hbWUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtRmRwLkNvbnN1bWVJbnRlZ3JhbDx1aW50NjRfdD4oKSk7CisgICAgICAgICAgICAgICAgICAgIH0sCisgICAgICAgICAgICB9KTsKKyAgICAgICAgICAgIGludm9rZVN1cGVyQVBJcygpOworICAgICAgICB9CisgICAgfQorfQorCit2b2lkIFN1cGVyTGF5b3V0QnVpbGRlckZ1enplcjo6cHJvY2VzcygpIHsKKyAgICBpbnZva2VTdXBlckxheW91dEJ1aWxkZXJBUElzKCk7Cit9CisKK2V4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W9jdGwuaD4KICNlbmRpZgogCisjaW5jbHVkZSA8YWxnb3JpdGhtPgogI2luY2x1ZGUgPG1hcD4KICNpbmNsdWRlIDxzdHJpbmc+CiAjaW5jbHVkZSA8dmVjdG9yPgpkaWZmIC0tZ2l0IGEvZnNfbWdyL2xpYnNuYXBzaG90L0FuZHJvaWQuYnAgYi9mc19tZ3IvbGlic25hcHNob3QvQW5kcm9pZC5icAppbmRleCAzZGQxZjFhLi45NjY2OTZiIDEwMDY0NAotLS0gYS9mc19tZ3IvbGlic25hcHNob3QvQW5kcm9pZC5icAorKysgYi9mc19tZ3IvbGlic25hcHNob3QvQW5kcm9pZC5icApAQCAtMTUsNiArMTUsNyBAQAogLy8KIAogcGFja2FnZSB7CisgICAgZGVmYXVsdF90ZWFtOiAidHJlbmR5X3RlYW1fYW5kcm9pZF9rZXJuZWwiLAogICAgIGRlZmF1bHRfYXBwbGljYWJsZV9saWNlbnNlczogWyJBbmRyb2lkLUFwYWNoZS0yLjAiXSwKIH0KIApAQCAtNDQsNyArNDUsNyBAQAogICAgICAgICAibGliZXh0Ml91dWlkIiwKICAgICAgICAgImxpYmV4dDRfdXRpbHMiLAogICAgICAgICAibGliZnN0YWIiLAotICAgICAgICAibGlic25hcHNob3Rfc25hcHVzZXJkIiwKKyAgICAgICAgImxpYnNuYXB1c2VyZF9jbGllbnQiLAogICAgICAgICAibGlieiIsCiAgICAgXSwKICAgICBoZWFkZXJfbGliczogWwpAQCAtODUsMTQgKzg2LDEzIEBACiAgICAgICAgICJhbmRyb2lkL3NuYXBzaG90L3NuYXBzaG90LnByb3RvIiwKICAgICAgICAgImRldmljZV9pbmZvLmNwcCIsCiAgICAgICAgICJzbmFwc2hvdC5jcHAiLAotICAgICAgICAic25hcHNob3RfcmVhZGVyLmNwcCIsCiAgICAgICAgICJzbmFwc2hvdF9zdGF0cy5jcHAiLAogICAgICAgICAic25hcHNob3Rfc3R1Yi5jcHAiLAogICAgICAgICAic25hcHNob3RfbWV0YWRhdGFfdXBkYXRlci5jcHAiLAotICAgICAgICAic25hcHNob3Rfd3JpdGVyLmNwcCIsCiAgICAgICAgICJwYXJ0aXRpb25fY293X2NyZWF0b3IuY3BwIiwKICAgICAgICAgInJldHVybi5jcHAiLAogICAgICAgICAidXRpbGl0eS5jcHAiLAorICAgICAgICAic2NyYXRjaF9zdXBlci5jcHAiLAogICAgIF0sCiB9CiAKQEAgLTEwMywyMCArMTAzLDQ0IEBACiB9CiAKIGNjX2xpYnJhcnlfc3RhdGljIHsKLSAgICBuYW1lOiAibGlic25hcHNob3QiLAorICAgIG5hbWU6ICJsaWJzbmFwc2hvdF9zdGF0aWMiLAogICAgIGRlZmF1bHRzOiBbCiAgICAgICAgICJsaWJzbmFwc2hvdF9kZWZhdWx0cyIsCiAgICAgICAgICJsaWJzbmFwc2hvdF9oYWxfZGVwcyIsCiAgICAgXSwKICAgICBzcmNzOiBbIjpsaWJzbmFwc2hvdF9zb3VyY2VzIl0sCiAgICAgc3RhdGljX2xpYnM6IFsKLSAgICAgICAgImxpYmZzX21ncl9iaW5kZXIiCisgICAgICAgICJsaWJmc19tZ3JfYmluZGVyIiwKKyAgICBdLAorICAgIHdob2xlX3N0YXRpY19saWJzOiBbCisgICAgICAgICJsaWJzZWxpbnV4IiwKKyAgICBdLAorfQorCitjY19saWJyYXJ5IHsKKyAgICBuYW1lOiAibGlic25hcHNob3QiLAorICAgIGRlZmF1bHRzOiBbCisgICAgICAgICJsaWJzbmFwc2hvdF9kZWZhdWx0cyIsCisgICAgICAgICJsaWJzbmFwc2hvdF9jb3dfZGVmYXVsdHMiLAorICAgICAgICAibGlic25hcHNob3RfaGFsX2RlcHMiLAorICAgIF0sCisgICAgc3JjczogWyI6bGlic25hcHNob3Rfc291cmNlcyJdLAorICAgIHNoYXJlZF9saWJzOiBbCisgICAgICAgICJsaWJmc19tZ3JfYmluZGVyIiwKKyAgICAgICAgImxpYmxwIiwKKyAgICAgICAgImxpYnByb3RvYnVmLWNwcC1saXRlIiwKKyAgICBdLAorICAgIHN0YXRpY19saWJzOiBbCisgICAgICAgICJsaWJzbmFwc2hvdF9jb3ciLAorICAgIF0sCisgICAgd2hvbGVfc3RhdGljX2xpYnM6IFsKKyAgICAgICAgImxpYnNlbGludXgiLAogICAgIF0sCiB9CiAKIGNjX2xpYnJhcnlfc3RhdGljIHsKICAgICBuYW1lOiAibGlic25hcHNob3RfaW5pdCIsCi0gICAgbmF0aXZlX2NvdmVyYWdlIDogdHJ1ZSwKKyAgICBuYXRpdmVfY292ZXJhZ2U6IHRydWUsCiAgICAgZGVmYXVsdHM6IFsibGlic25hcHNob3RfZGVmYXVsdHMiXSwKICAgICBzcmNzOiBbIjpsaWJzbmFwc2hvdF9zb3VyY2VzIl0sCiAgICAgcmFtZGlza19hdmFpbGFibGU6IHRydWUsCkBAIC0xMjYsNiArMTUwLDcgQEAKICAgICBdLAogICAgIHN0YXRpY19saWJzOiBbCiAgICAgICAgICJsaWJmc19tZ3IiLAorICAgICAgICAibGlic2VsaW51eCIsCiAgICAgXSwKIH0KIApAQCAtMTQzLDYgKzE2OCw5IEBACiAgICAgc3RhdGljX2xpYnM6IFsKICAgICAgICAgImxpYmZzX21nciIsCiAgICAgXSwKKyAgICB3aG9sZV9zdGF0aWNfbGliczogWworICAgICAgICAibGlic2VsaW51eCIsCisgICAgXSwKIH0KIAogY2NfZGVmYXVsdHMgewpAQCAtMTYzLDggKzE5MSwxMSBAQAogICAgICAgICAibGliYnJvdGxpIiwKICAgICAgICAgImxpYnoiLAogICAgICAgICAibGlibHo0IiwKKyAgICAgICAgImxpYnpzdGQiLAogICAgIF0sCi0gICAgZXhwb3J0X2luY2x1ZGVfZGlyczogWyJpbmNsdWRlIl0sCisgICAgaGVhZGVyX2xpYnM6IFsKKyAgICAgICAgImxpYnVwZGF0ZV9lbmdpbmVfaGVhZGVycyIsCisgICAgXSwKIH0KIAogY2NfbGlicmFyeV9zdGF0aWMgewpAQCAtMTczLDEyICsyMDQsMjIgQEAKICAgICAgICAgIm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AgcmFtZGlza19hdmFpbGFibGU6IHRydWUsCkBAIC0yMTIsMTggKzI1MywyMCBAQAogICAgICAgICAibGliZnNfbWdyIiwKICAgICAgICAgImxpYmdtb2NrIiwKICAgICAgICAgImxpYmd0ZXN0IiwKKyAgICAgICAgImxpYnNlbGludXgiLAogICAgIF0sCiB9CiAKIGNjX2RlZmF1bHRzIHsKICAgICBuYW1lOiAibGlic25hcHNob3RfdGVzdF9kZWZhdWx0cyIsCi0gICAgZGVmYXVsdHM6IFsibGlic25hcHNob3RfZGVmYXVsdHMiLCAibGlic25hcHNob3RfY293X2RlZmF1bHRzIl0sCisgICAgZGVmYXVsdHM6IFsKKyAgICAgICAgImxpYnNuYXBzaG90X2RlZmF1bHRzIiwKKyAgICAgICAgImxpYnNuYXBzaG90X2Nvd19kZWZhdWx0cyIsCisgICAgXSwKICAgICBzcmNzOiBbCiAgICAgICAgICJwYXJ0aXRpb25fY293X2NyZWF0b3JfdGVzdC5jcHAiLAogICAgICAgICAic25hcHNob3RfbWV0YWRhdGFfdXBkYXRlcl90ZXN0LmNwcCIsCi0gICAgICAgICJzbmFwc2hvdF9yZWFkZXJfdGVzdC5jcHAiLAogICAgICAgICAic25hcHNob3RfdGVzdC5jcHAiLAotICAgICAgICAic25hcHNob3Rfd3JpdGVyX3Rlc3QuY3BwIiwKICAgICBdLAogICAgIHNoYXJlZF9saWJzOiBbCiAgICAgICAgICJsaWJiaW5kZXIiLApAQCAtMjM4LDEzICsyODEsMTIgQEAKICAgICAgICAgImFuZHJvaWQuaGFyZHdhcmUuYm9vdEAxLjEiLAogICAgICAgICAiYW5kcm9pZC5oYXJkd2FyZS5ib290LVYxLW5kayIsCiAgICAgICAgICJsaWJicm90bGkiLAotICAgICAgICAibGliYysrZnMiLAogICAgICAgICAibGliZnNfbWdyX2JpbmRlciIsCiAgICAgICAgICJsaWJnZmxhZ3MiLAogICAgICAgICAibGliZ3NpIiwKICAgICAgICAgImxpYmdtb2NrIiwKICAgICAgICAgImxpYmxwIiwKLSAgICAgICAgImxpYnNuYXBzaG90IiwKKyAgICAgICAgImxpYnNuYXBzaG90X3N0YXRpYyIsCiAgICAgICAgICJsaWJzbmFwc2hvdF9jb3ciLAogICAgICAgICAibGlic25hcHNob3RfdGVzdF9oZWxwZXJzIiwKICAgICAgICAgImxpYnNwYXJzZSIsCkBAIC0yNTQsMTYgKzI5NiwyNyBAQAogICAgIF0sCiAgICAgYXV0b19nZW5fY29uZmlnOiB0cnVlLAogICAgIHJlcXVpcmVfcm9vdDogdHJ1ZSwKLSAgICBjb21waWxlX211bHRpbGliOiAiZmlyc3QiLAogfQogCiBjY190ZXN0IHsKICAgICBuYW1lOiAidnRzX2xpYnNuYXBzaG90X3Rlc3QiLAotICAgIGRlZmF1bHRzOiBbImxpYnNuYXBzaG90X3Rlc3RfZGVmYXVsdHMiLCAibGlic25hcHNob3RfaGFsX2RlcHMiXSwKKyAgICBkZWZhdWx0czogWworICAgICAgICAibGlic25hcHNob3RfdGVzdF9kZWZhdWx0cyIsCisgICAgICAgICJsaWJzbmFwc2hvdF9oYWxfZGVwcyIsCisgICAgXSwKICAgICB0ZXN0X3N1aXRlczogWwogICAgICAgICAidnRzIiwKLSAgICAgICAgImRldmljZS10ZXN0cyIKKyAgICAgICAgImdlbmVyYWwtdGVzdHMiLAogICAgIF0sCisgICAgY29tcGlsZV9tdWx0aWxpYjogImJvdGgiLAorICAgIG11bHRpbGliOiB7CisgICAgICAgIGxpYjMyOiB7CisgICAgICAgICAgICBzdWZmaXg6ICIzMiIsCisgICAgICAgIH0sCisgICAgICAgIGxpYjY0OiB7CisgICAgICAgICAgICBzdWZmaXg6ICI2NCIsCisgICAgICAgIH0sCisgICAgfSwKICAgICB0ZXN0X29wdGlvbnM6IHsKICAgICAgICAgbWluX3NoaXBwaW5nX2FwaV9sZXZlbDogMzAsCiAgICAgfSwKQEAgLTI3MSwzMSArMzI0LDI2IEBACiAKIGNjX3Rlc3QgewogICAgIG5hbWU6ICJ2YWJfbGVnYW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uczogWworICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG5hbWU6ICJmb3JjZS1uby10ZXN0LWVycm9yIiwKKyAgICAgICAgICAgICAgICB2YWx1ZTogImZhbHNlIiwKKyAgICAgICAgICAgIH0sCisgICAgICAgIF0sCiAgICAgfSwKIH0KIApAQCAtMzE5LDE2ICszNjcsMTcgQEAKIAogY2NfYmluYXJ5IHsKICAgICBuYW1lOiAic25hcHNob3RjdGwiLAotICAgIGRlZmF1bHRzOiBbImxpYnNuYXBzaG90X2Nvd19kZWZhdWx0cyIsICJsaWJzbmFwc2hvdF9oYWxfZGVwcyJdLAorICAgIGRlZmF1bHRzOiBbCisgICAgICAgICJsaWJzbmFwc2hvdF9jb3dfZGVmYXVsdHMiLAorICAgICAgICAibGlic25hcHNob3RfaGFsX2RlcHMiLAorICAgIF0sCiAgICAgc3JjczogWwogICAgICAgICAic25hcHNob3RjdGwuY3BwIiwKKyAgICAgICAgInNjcmF0Y2hfc3VwZXIuY3BwIiwKICAgICBdLAogICAgIHN0YXRpY19saWJzOiBbCiAgICAgICAgICJsaWJicm90bGkiLAotICAgICAgICAibGliYysrZnMiLAogICAgICAgICAibGliZnN0YWIiLAotICAgICAgICAibGlic25hcHNob3QiLAotICAgICAgICAibGlic25hcHNob3RfY293IiwKICAgICAgICAgImxpYnoiLAogICAgICAgICAidXBkYXRlX21ldGFkYXRhLXByb3RvcyIsCiAgICAgXSwKQEAgLTM0MSw2ICszOTAsNyBAQAogICAgICAgICAibGlibG9nIiwKICAgICAgICAgImxpYmxwIiwKICAgICAgICAgImxpYnByb3RvYnVmLWNwcC1saXRlIiwKKyAgICAgICAgImxpYnNuYXBzaG90IiwKICAgICAgICAgImxpYnN0YXRzbG9nIiwKICAgICAgICAgImxpYnV0aWxzIiwKICAgICBdLApAQCAtMzY5LDcgKzQxOSw5IEBACiAgICAgICAgICJsaWJzbmFwc2hvdF9jb3dfZGVmYXVsdHMiLAogICAgIF0sCiAgICAgc3JjczogWwotICAgICAgICAibGlic25hcHNob3RfY293L2Nvd19hcGlfdGVzdC5jcHAiLAorICAgICAgICAibGlic25hcHNob3RfY293L3NuYXBzaG90X3JlYWRlcl90ZXN0LmNwcCIsCisgICAgICAgICJsaWJzbmFwc2hvdF9jb3cvdGVzdF92Mi5jcHAiLAorICAgICAgICAibGlic25hcHNob3RfY293L3Rlc3RfdjMuY3BwIiwKICAgICBdLAogICAgIGNmbGFnczogWwogICAgICAgICAiLURfRklMRV9PRkZTRVRfQklUUz02NCIsCkBAIC0zODcsMTIgKzQzOSwxOSBAQAogICAgICAgICAibGliZ3Rlc3QiLAogICAgICAgICAibGlic25hcHNob3RfY293IiwKICAgICBdLAorICAgIGhlYWRlcl9saWJzOiBbCisgICAgICAgICJsaWJzdG9yYWdlX2xpdGVyYWxzX2hlYWRlcnMiLAorICAgIF0sCiAgICAgdGVzdF9zdWl0ZXM6IFsKLSAgICAgICAgImRldmljZS10ZXN0cyIKKyAgICAgICAgImdlbmVyYWwtdGVzdHMiLAogICAgIF0sCiAgICAgdGVzdF9vcHRpb25zOiB7CiAgICAgICAgIG1pbl9zaGlwcGluZ19hcGlfbGV2ZWw6IDMwLAogICAgIH0sCisgICAgZGF0YTogWworICAgICAgICAidG9vbHMvdGVzdGRhdGEvY293X3YyIiwKKyAgICAgICAgInRvb2xzL3Rlc3RkYXRhL2luY29tcHJlc3NpYmxlX2Jsb2NrIiwKKyAgICBdLAogICAgIGF1dG9fZ2VuX2NvbmZpZzogdHJ1ZSwKICAgICByZXF1aXJlX3Jvb3Q6IGZhbHNlLAogICAgIGhvc3Rfc3VwcG9ydGVkOiB0cnVlLApAQCAtNDEzLDYgKzQ3Miw3IEBACiAgICAgICAgICJsaWJicm90bGkiLAogICAgICAgICAibGliY3J5cHRvX3N0YXRpYyIsCiAgICAgICAgICJsaWJsb2ciLAorICAgICAgICAibGliZ2ZsYWdzIiwKICAgICAgICAgImxpYnNuYXBzaG90X2NvdyIsCiAgICAgICAgICJsaWJ6IiwKICAgICBdLApAQCAtNDIzLDYgKzQ4Myw1NiBAQAogICAgIF0sCiB9CiAKK2NjX2JpbmFyeSB7CisgICAgbmFtZTogImNyZWF0ZV9zbmFwc2hvdCIsCisgICAgaG9zdF9zdXBwb3J0ZWQ6IHRydWUsCisgICAgZGV2aWNlX3N1cHBvcnRlZDogZmFsc2UsCisKKyAgICBzcmNzOiBbImxpYnNuYXBzaG90X2Nvdy9jcmVhdGVfY293LmNwcCJdLAorCisgICAgY2ZsYWdzOiBbCisgICAgICAgICItV2FsbCIsCisgICAgICAgICItV2Vycm9yIiwKKyAgICBdLAorCisgICAgc3RhdGljX2xpYnM6IFsKKyAgICAgICAgImxpYmxvZyIsCisgICAgICAgICJsaWJiYXNlIiwKKyAgICAgICAgImxpYmV4dDRfdXRpbHMiLAorICAgICAgICAibGlic25hcHNob3RfY293IiwKKyAgICAgICAgImxpYmNyeXB0byIsCisgICAgICAgICJsaWJicm90bGkiLAorICAgICAgICAibGlieiIsCisgICAgICAgICJsaWJsejQiLAorICAgICAgICAibGlienN0ZCIsCisgICAgICAgICJsaWJnZmxhZ3MiLAorICAgIF0sCisgICAgc2hhcmVkX2xpYnM6IFsKKyAgICBdLAorCisgICAgaGVhZGVyX2xpYnM6IFsKKyAgICAgICAgImxpYnN0b3JhZ2VfbGl0ZXJhbHNfaGVhZGVycyIsCisgICAgXSwKKworICAgIGRpc3Q6IHsKKyAgICAgICAgdGFyZ2V0czogWworICAgICAgICAgICAgInNkayIsCisgICAgICAgICAgICAic2RrLXJlcG8tcGxhdGZvcm0tdG9vbHMiLAorICAgICAgICAgICAgInNka19yZXBvIiwKKyAgICAgICAgXSwKKyAgICB9LAorICAgIHRhcmdldDogeworICAgICAgICBkYXJ3aW46IHsKKyAgICAgICAgICAgIGVuYWJsZWQ6IGZhbHNlLAorICAgICAgICB9LAorICAgICAgICB3aW5kb3dzOiB7CisgICAgICAgICAgICBlbmFibGVkOiBmYWxzZSwKKyAgICAgICAgfSwKKyAgICB9LAorICAgIHN0b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uX2xldmVsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50MzJfdCBibG9ja19zaXplKTsKKyAgICBzdGF0aWMgc3RkOjp1bmlxdWVfcHRyPElDb21wcmVzc29yPiBac3RkKGNvbnN0IGludDMyX3QgY29tcHJlc3Npb25fbGV2ZWwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50MzJfdCBibG9ja19zaXplKTsKKworICAgIHN0YXRpYyBzdGQ6OnVuaXF1ZV9wdHI8SUNvbXByZXNzb3I+IENyZWF0ZShDb3dDb21wcmVzc2lvbiBjb21wcmVzc2lvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdWludDMyX3QgYmxvY2tfc2l6ZSk7CisKKyAgICBpbnQzMl90IEdldENvbXByZXNzaW9uTGV2ZWwoKSBjb25zdCB7IHJldHVybiBjb21wcmVzc2lvbl9sZXZlbF87IH0KKyAgICB1aW50MzJfdCBHZXRCbG9ja1NpemUoKSBjb25zdCB7IHJldHVybiBibG9ja19zaXplXzsgfQorICAgIFtbbm9kaXNjYXJkXV0gdmlydHVhbCBzdGQ6OnZlY3Rvcjx1aW50OF90PiBDb21wcmVzcyhjb25zdCB2b2lkKiBkYXRhLCBzaXplX3QgbGVuZ3RoKSBjb25zdCA9IDA7CisKKyAgcHJpdmF0ZToKKyAgICBjb25zdCBpbnQzMl90IGNvbXByZXNzaW9uX2xldmVsXzsKKyAgICBjb25zdCB1aW50MzJfdCBibG9ja19zaXplXzsKK307Cit9ICAvLyBuYW1lc3BhY2Ugc25hcHNob3QKK30gIC8vIG5hbWVzcGFjZSBhbmRyb2lkCmRpZmYgLS1naXQgYS9mc19tZ3IvbGlic25hcHNob3QvaW5jbHVkZS9saWJzbmFwc2hvdC9jb3dfZm9ybWF0LmggYi9mc19tZ3IvbGlic25hcHNob3QvaW5jbHVkZS9saWJ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fQorICAgIGNvbnN0ZXhwciBDb3dPcGVyYXRpb25UeXBlIHR5cGUoKSBjb25zdCB7CisgICAgICAgIC8vIHRoaXMgaXMgYSBtYXNrIHRvIGdyYWIgdGhlIGZpcnN0IDQgYml0cyBvZiBhIDY0IGJpdCBpbnRlZ2VyCisgICAgICAgIGNvbnN0IGF1dG8gdHlwZSA9IChzb3VyY2VfaW5mb18gPj4ga0Nvd09wU291cmNlSW5mb1R5cGVCaXQpICYga0Nvd09wU291cmNlSW5mb1R5cGVNYXNrOworICAgICAgICByZXR1cm4gc3RhdGljX2Nhc3Q8Q293T3BlcmF0aW9uVHlwZT4odHlwZSk7CisgICAgfQorICAgIGNvbnN0ZXhwciB2b2lkIHNldF90eXBlKENvd09wZXJhdGlvblR5cGUgdHlwZSkgeworICAgICAgICAvLyBDbGVhciB0aGUgdG9wIDQgYml0cyBmaXJzdAorICAgICAgICBzb3VyY2VfaW5mb18gJj0gKCgxVUxMIDw8IGtDb3dPcFNvdXJjZUluZm9UeXBlQml0KSAtIDEpOworICAgICAgICAvLyBzZXQgdGhlIGFjdHVhbCB0eXBlIGJpdHMKKyAgICAgICAgc291cmNlX2luZm9fIHw9IChzdGF0aWNfY2FzdDx1aW50NjRfdD4odHlwZSkgJiBrQ293T3BTb3VyY2VJbmZvVHlwZU1hc2spCisgICAgICAgICAgICAgICAgICAgICAgICA8PCBrQ293T3BTb3VyY2VJbmZvVHlwZUJpdDsKKyAgICB9CisgICAgY29uc3RleHByIHZvaWQgc2V0X2NvbXByZXNzaW9uX2JpdHModWludDhfdCBjb21wcmVzc2lvbl9mYWN0b3IpIHsKKyAgICAgICAgLy8gQ2xlYXIgdGhlIDMgYml0cyBmcm9tIGJpdCA1NyAtIFs1Ny01OV0KKyAgICAgICAgc291cmNlX2luZm9fICY9IH4oa0Nvd09wU291cmNlSW5mb0NvbXByZXNzaW9uTWFzayA8PCBrQ293T3BTb3VyY2VJbmZvQ29tcHJlc3Npb25CaXQpOworICAgICAgICAvLyBT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lbkNvbXByZXNzZWRTbmFwc2hvdFdyaXRlcihMb2NrZWRGaWxlKiBsb2NrLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IFNuYXBzaG90U3RhdHVzJiBzdGF0dXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgU25hcHNob3RQYXRocyYgcGF0aHMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjpvcHRpb25hbDx1aW50NjRfdD4gbGFiZWwpOwogCiAgICAgLy8gTWFwIHRoZSBiYXNlIGRldmljZSwgQ09XIGRldmljZXMsIGFuZCBzbmFwc2hvdCBkZXZpY2UuCiAgICAgYm9vbCBNYXBQYXJ0aXRpb25XaXRoU25hcHNob3QoTG9ja2VkRmlsZSogbG9jaywgQ3JlYXRlTG9naWNhbFBhcnRpdGlvblBhcmFtcyBwYXJhbXMsCkBAIC03NDcsNyArNzYwLDcgQEAKICAgICAvLyBJbml0aWFsaXplIHNuYXBzaG90cyBzbyB0aGF0IHRoZXkgY2FuIGJlIG1hcHBlZCBsYXRlci4KICAgICAvLyBNYXAgdGhlIENPVyBwYXJ0aXRpb24gYW5kIHplcm8taW5pdGlhbGl6ZSB0aGUgaGVhZGVyLgogICAgIFJldHVybiBJbml0aWFsaXplVXBkYXRlU25hcHNob3RzKAotICAgICAgICAgICAgTG9ja2VkRmlsZSogbG9jaywgTWV0YWRhdGFCdWlsZGVyKiB0YXJnZXRfbWV0YWRhdGEsCisgICAgICAgICAgICBMb2NrZWRGaWxlKiBsb2NrLCB1aW50MzJfdCBjb3dfdmVyc2lvbiwgTWV0YWRhdGFCdWlsZGVyKiB0YXJnZXRfbWV0YWRhdGEsCiAgICAgICAgICAgICBjb25zdCBMcE1ldGFkYXRhKiBleHBvcnRlZF90YXJnZXRfbWV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ZWRfID0gZmFsc2U7Ci0gICAgdWludDY0X3QgZnJlZV9zcGFjZV8gPSAwOwotICAgIHVpbnQ2NF90IGF2YWlsYWJsZV9zcGFjZV8gPSAwOwotICAgIHVpbnQ2NF90IGJzaXplXyA9IDA7Ci19OwotCiBib29sIElzVmlydHVhbEFiRW5hYmxlZCgpOwogCiAjZGVmaW5lIFNLSVBfSUZfTk9OX1ZJUlRVQUxfQUIoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMjU0LDUgKzI0MCwyMSBAQAogCiAjZGVmaW5lIFJFVFVSTl9JRl9OT05fVklSVFVBTF9BQigpIFJFVFVSTl9JRl9OT05fVklSVFVBTF9BQl9NU0coIiIpCiAKKyNkZWZpbmUgU0tJUF9JRl9WRU5ET1JfT05fQU5EUk9JRF9TKCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIGlmIChJc1ZlbmRvckZyb21BbmRyb2lkMTIoKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgIEdURVNUX1NLSVAoKSA8PCAiU2tpcCB0ZXN0IGFzIFZlbmRvciBwYXJ0aXRpb24gaXMgb24gQW5kcm9pZCBTIjsgXAorICAgIH0gd2hpbGUgKDApCisKKyNkZWZpbmUgUkVUVVJOX0lGX1ZFTkRPUl9PTl9BTkRST0lEX1NfTVNHKG1zZykgXAorICAgIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIGlmIChJc1ZlbmRvckZyb21BbmRyb2lkMTIoKSkgeyAgICAgICAgIFwKKyAgICAgICAgICAgIHN0ZDo6Y2VyciA8PCAobXNnKTsgICAgICAgICAgICAgICAgXAorICAgICA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FkRGF0YSgqb3AsICZzaW5rKSk7Ci0gICAgICAgICAgICAgICAgZGF0YS5yZXNpemUob3B0aW9ucy5ibG9ja19zaXplKTsKLSAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luay5zdHJlYW0oKSwgZGF0YSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSA2MDAwKSB7Ci0gICAgICAgICAgICAgICAgU3RyaW5nU2luayBzaW5rOwotICAgICAgICAgICAgICAgIEFTU0VSVF9UUlVFKHJlYWRlci5SZWFkRGF0YSgqb3AsICZzaW5rKSk7Ci0gICAgICAgICAgICAgICAgZGF0YTIucmVzaXplKG9wdGlvbnMuYmxvY2tfc2l6ZSk7Ci0gICAgICAgICAgICAgICAgQVNTRVJUX0VRKHNpbmsuc3RyZWFtKCksIGRhdGEyKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGlmIChvcC0+bmV3X2Jsb2NrID09IDkwMDApIHsKLSAgICAgICAgICAgICAgICBTdHJpbmdTaW5rIHNpbms7Ci0gICAgICAgICAgICAgICAgQVNTRVJUX1RSVUUocmVhZGVyLlJlYWREYXRhKCpvcCwgJnNpbmspKTsKLSAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luay5zdHJlYW0oKSwgZGF0YTMpOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0KLSAgICAgICAgaXRlci0+TmV4dCgpOwotICAgIH0KLQotICAgIEFTU0VSVF9FUSh0b3RhbF9ibG9ja3MsIGV4cGVjdGVkX2Jsb2Nrcyk7Ci19Ci0KLVRFU1RfUChDb21wcmVzc2lvblJXVGVzdCwgTm9CYXRjaFdyaXRlcykgewotICAgIENvd09wdGlvbnMgb3B0aW9uczsKLSAgICBvcHRpb25zLmNvbXByZXNzaW9uID0gR2V0UGFyYW0oKTsKLSAgICBvcHRpb25zLm51bV9jb21wcmVzc190aHJlYWRzID0gMTsKLSAgICBvcHRpb25zLmNsdXN0ZXJfb3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7Ci0gICAgQVNTRVJUX1RSVUUocmVhZGVyLlBhcnNlKGNvd18tPmZkKSk7Ci0KLSAgICBhdXRvIGl0ZXIgPSByZWFkZXIuR2V0T3BJdGVyKCk7Ci0gICAgQVNTRVJUX05FKGl0ZXIsIG51bGxwdHIpOwotCi0gICAgaW50IHRvdGFsX2Jsb2NrcyA9IDA7Ci0gICAgd2hpbGUgKCFpdGVyLT5Eb25lKCkpIHsKLSAgICAgICAgYXV0byBvcCA9ICZpdGVyLT5HZXQoKTsKLQotICAgICAgICBpZiAob3AtPnR5cGUgPT0ga0Nvd1JlcGxhY2VPcCkgewotICAgICAgICAgICAgdG90YWxfYmxvY2tzICs9IDE7Ci0gICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSA1MCkgewotICAgICAgICAgICAgICAgIFN0cmluZ1Npbmsgc2luazsKLSAgICAgICAgICAgICAgICBBU1NFUlRfVFJVRShyZWFkZXIuUmVhZERhdGEoKm9wLCAmc2luaykpOwotICAgICAgICAgICAgICAgIGRhdGEucmVzaXplKG9wdGlvbnMuYmxvY2tfc2l6ZSk7Ci0gICAgICAgICAgICAgICAgQVNTRVJUX0VRKHNpbmsuc3RyZWFtKCksIGRhdGEpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgaWYgKG9wLT5uZXdfYmxvY2sgPT0gMzAwMCkgewotICAgICAgICAgICAgICAgIFN0cmluZ1Npbmsgc2luazsKLSAgICAgICAgICAgICAgICBBU1NFUlRfVFJVRShyZWFkZXIuUmVhZERhdGEoKm9wLCAmc2luaykpOwotICAgICAgICAgICAgICAgIGRhdGEyLnJlc2l6ZShvcHRpb25zLmJsb2NrX3NpemUpOwotICAgICAgICAgICAgICAgIEFTU0VSVF9FUShzaW5rLnN0cmVhbSgpLCBkYXRhMik7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSA1MDAwKSB7Ci0gICAgICAgICAgICAgICAgU3RyaW5nU2luayBzaW5rOw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b3dDb21wcmVzc0d6fTsKKyAgICB9IGVsc2UgaWYgKG5hbWUgPT0gImJyb3RsaSIpIHsKKyAgICAgICAgcmV0dXJuIHtrQ293Q29tcHJlc3NCcm90bGl9OworICAgIH0gZWxzZSBpZiAobmFtZSA9PSAibHo0IikgeworICAgICAgICByZXR1cm4ge2tDb3dDb21wcmVzc0x6NH07CisgICAgfSBlbHNlIGlmIChuYW1lID09ICJ6c3RkIikgeworICAgICAgICByZXR1cm4ge2tDb3dDb21wcmVzc1pzdGR9OworICAgIH0gZWxzZSBpZiAobmFtZSA9PSAibm9uZSIgfHwgbmFtZS5lbXB0eSgpKSB7CisgICAgICAgIHJldHVybiB7a0Nvd0NvbXByZXNzTm9uZX07CisgICAgfSBlbHNlIHsKKyAgICAgICAgTE9HKEVSUk9SKSA8PCAidW5hYmxlIHRvIGRldGVybWluZSBkZWZhdWx0IGNvbXByZXNzaW9uIGFsZ29yaXRobSBmb3I6ICIgPDwgbmFtZTsKKyAgICAgICAgcmV0dXJuIHt9OworICAgIH0KIH0KIAotc3RkOjpiYXNpY19zdHJpbmc8dWludDhfdD4gQ29tcHJlc3NXb3JrZXI6OkNvbXByZXNzKENvd0NvbXByZXNzaW9uQWxnb3JpdGhtIGNvbXByZXNzaW9uLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZvaWQqIGRhdGEsIHNpemVfdCBsZW5ndGgpIHsKK3N0ZDo6dW5pcXVlX3B0cjxJQ29tcHJlc3Nvcj4gSUNvbXByZXNzb3I6OkNyZWF0ZShDb3dDb21wcmVzc2lvbiBjb21wcmVzc2lvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50MzJfdCBibG9ja19zaXplKSB7CisgICAgc3dpdGNoIChjb21wcmVzc2lvbi5hbGdvcml0aG0pIHsKKyAgICAgICAgY2FzZSBrQ293Q29tcHJlc3NMejQ6CisgIC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aGUgZGV2aWNlIGFuZCBPVEEgcGFja2FnZSB1c2UgdGhlIHNhbWUgY29tcHJlc3Npb24gbGV2ZWwKKy8vIGZvciBPVEEgdG8gc3VjY2VlZC4KK3VpbnQzMl90IENvbXByZXNzV29ya2VyOjpHZXREZWZhdWx0Q29tcHJlc3Npb25MZXZlbChDb3dDb21wcmVzc2lvbkFsZ29yaXRobSBjb21wcmVzc2lvbikgewogICAgIHN3aXRjaCAoY29tcHJlc3Npb24pIHsKICAgICAgICAgY2FzZSBrQ293Q29tcHJlc3NHejogewotICAgICAgICAgICAgY29uc3QgYXV0byBib3VuZCA9IGNvbXByZXNzQm91bmQobGVuZ3RoKTsKLSAgICAgICAgICAgIHN0ZDo6YmFzaWNfc3RyaW5nPHVpbnQ4X3Q+IGJ1ZmZlcihib3VuZCwgJ1wwJyk7Ci0KLSAgICAgICAgICAgIHVMb25nZiBkZXN0X2xlbiA9IGJvdW5kOwotICAgICAgICAgICAgYXV0byBydiA9IGNvbXByZXNzMihidWZmZXIuZGF0YSgpLCAmZGVzdF9sZW4sIHJlaW50ZXJwcmV0X2Nhc3Q8Y29uc3QgQnl0ZWYqPihkYXRhKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGVuZ3RoLCBaX0JFU1RfQ09NUFJFU1NJT04pOwotICAgICAgICAgICAgaWYgKHJ2ICE9IFpfT0spIHsKLSAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJjb21wcmVzczIgcmV0dXJuZWQ6ICIgPDwgcnY7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHt9OwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnVmZmVyLnJlc2l6ZShkZXN0X2xlbik7Ci0gICAgICAgICAgICByZXR1cm4gYnVmZmVyOworICAgICAgICAgICAgcmV0dXJuIFpfQkVTVF9DT01QUkVTU0lPTjsKICAgICAgICAgfQogICAgICAgICBjYXNlIGtDb3dDb21wcmVzc0Jyb3RsaTogewotICAgICAgICAgICAgY29uc3QgYXV0byBib3VuZCA9IEJyb3RsaUVuY29kZXJNYXhDb21wcmVzc2VkU2l6ZShsZW5ndGgpOwotICAgICAgICAgICAgaWYgKCFib3VuZCkgewotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkJyb3RsaUVuY29kZXJNYXhDb21wcmVzc2VkU2l6ZSByZXR1cm5lZCAwIjsKLSAgICAgICAgICAgICAgICByZXR1cm4ge307Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBzdGQ6OmJhc2ljX3N0cmluZzx1aW50OF90PiBidWZmZXIoYm91bmQsICdcMCcpOwotCi0gICAgICAgICAgICBzaXplX3QgZW5jb2RlZF9zaXplID0gYm91bmQ7Ci0gICAgICAgICAgICBhdXRvIHJ2ID0gQnJvdGxpRW5jb2RlckNvbXByZXNzKAotICAgICAgICAgICAgICAgICAgICBCUk9UTElfREVGQVVMVF9RVUFMSVRZLCBCUk9UTElfREVGQVVMVF9XSU5ET1csIEJST1RMSV9ERUZBVUxUX01PREUsIGxlbmd0aCwKLSAgICAgICAgICAgICAgICAgICAgcmVpbnRlcnByZXRfY2FzdDxjb25zdCB1aW50OF90Kj4oZGF0YSksICZlbmNvZGVkX3NpemUsIGJ1ZmZlci5kYXRhKCkpOwotICAgICAgICAgICAgaWYgKCFydikgewotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkJyb3RsaUVuY29kZXJDb21wcmVzcyBmYWlsZWQiOwotICAgICAgICAgICAgICAgIHJldHVybiB7fTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJ1ZmZlci5yZXNpemUoZW5jb2RlZF9zaXplKTsKLSAgICAgICAgICAgIHJldHVybiBidWZmZXI7CisgICAgICAgICAgICByZXR1cm4gQlJPVExJX0RFRkFVTFRfUVVBTElUWTsKICAgICAgICAgfQogICAgICAgICBjYXNlIGtDb3dDb21wcmVzc0x6NDogewotICAgICAgICAgICAgY29uc3QgYXV0byBib3VuZCA9IExaNF9jb21wcmVzc0JvdW5kKGxlbmd0aCk7Ci0gICAgICAgICAgICBpZiAoIWJvdW5kKSB7Ci0gICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiTFo0X2NvbXByZXNzQm91bmQgcmV0dXJuZWQgMCI7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHt9OwotICAgICAgICAgICAgfQotICAgICAgICAgICAgc3RkOjpiYXNpY19zdHJpbmc8dWludDhfdD4gYnVmZmVyKGJvdW5kLCAnXDAnKTsKLQotICAgICAgICAgICAgY29uc3QgYXV0byBjb21wcmVzc2VkX3NpemUgPSBMWjRfY29tcHJlc3NfZGVmYXVsdCgKLSAgICAgICAgICAgICAgICAgICAgc3RhdGljX2Nhc3Q8Y29uc3QgY2hhcio+KGRhdGEpLCByZWludGVycHJldF9jYXN0PGNoYXIqPihidWZmZXIuZGF0YSgpKSwgbGVuZ3RoLAotICAgICAgICAgICAgICAgICAgICBidWZmZXIuc2l6ZSgpKTsKLSAgICAgICAgICAgIGlmIChjb21wcmVzc2VkX3NpemUgPD0gMCkgewotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkxaNF9jb21wcmVzc19kZWZhdWx0IGZhaWxlZCwgaW5wdXQgc2l6ZTogIiA8PCBsZW5ndGgKLSAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIsIGNvbXByZXNzaW9uIGJvdW5kOiAiIDw8IGJvdW5kIDw8ICIsIHJldDogIiA8PCBjb21wcmVzc2VkX3NpemU7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHt9OwotICAgICAgICAgICAgfQotICAgICAgICAgICAgLy8gRG9uJ3QgcnVuIGNvbXByZXNzaW9uIGlmIHRoZSBjb21wcmVzc2VkIG91dHB1dCBpcyBsYXJnZXIKLSAgICAgICAgICAgIGlmIChjb21wcmVzc2VkX3NpemUgPj0gbGVuZ3RoKSB7Ci0gICAgICAgICAgICAgICAgYnVmZmVyLnJlc2l6ZShsZW5ndGgpOwotICAgICAgICAgICAgICAgIG1lbWNweShidWZmZXIuZGF0YSgpLCBkYXRhLCBsZW5ndGgpOwotICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICBidWZmZXIucmVzaXplKGNvbXByZXNzZWRfc2l6ZSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICByZXR1cm4gYnVmZmVyOwotICAgICAgICB9Ci0gICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICBMT0coRVJST1IpIDw8ICJ1bmhhbmRsZWQgY29tcHJlc3Npb24gdHlwZTogIiA8PCBjb21wcmVzc2lvbjsKICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2Uga0Nvd0NvbXByZXNzWnN0ZDogeworICAgICAgICAgICAgcmV0dXJuIFpTVERfZGVmYXVsdENMZXZlbCgpOworICAgICAgICB9CisgICAgICAgIGNhc2Uga0Nvd0NvbXByZXNzTm9uZTogeworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KICAgICB9Ci0gICAgcmV0dXJuIHt9OwotfQotYm9vbCBDb21wcmVzc1dvcmtlcjo6Q29tcHJlc3NCbG9ja3MoY29uc3Qgdm9pZCogYnVmZmVyLCBzaXplX3QgbnVtX2Jsb2NrcywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6dmVjdG9yPHN0ZDo6YmFzaWNfc3RyaW5nPHVpbnQ4X3Q+PiogY29tcHJlc3NlZF9kYXRhKSB7Ci0gICAgcmV0dXJuIENvbXByZXNzQmxvY2tzKGNvbXByZXNzaW9uXywgYmxvY2tfc2l6ZV8sIGJ1ZmZlciwgbnVtX2Jsb2NrcywgY29tcHJlc3NlZF9kYXRhKTsKKyAgICByZXR1cm4gMDsKIH0KIAotYm9vbCBDb21wcmVzc1dvcmtlcjo6Q29tcHJlc3NCbG9ja3MoQ293Q29tcHJlc3Npb25BbGdvcml0aG0gY29tcHJlc3Npb24sIHNpemVfdCBibG9ja19zaXplLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgdm9pZCogYnVmZmVyLCBzaXplX3QgbnVtX2Jsb2NrcywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6dmVjdG9yPHN0ZDo6YmFzaWNfc3RyaW5nPHVpbnQ4X3Q+PiogY29tcHJlc3NlZF9kYXRhKSB7CitjbGFzcyBHekNvbXByZXNzb3IgZmluYWwgOiBwdWJsaWMgSUNvbXByZXNzb3IgeworICBwdWJsaWM6CisgICAgR3pDb21wcmVzc29yKGludDMyX3QgY29tcHJlc3Npb25fbGV2ZWwsIGNvbnN0IHVpbnQzMl90IGJsb2NrX3NpemUpCisgICAgICAgIDogSUNvbXByZXNzb3IoY29tcHJlc3Npb25fbGV2ZWwsIGJsb2NrX3NpemUpe307CisKKyAgICBzdGQ6OnZlY3Rvcjx1aW50OF90PiBDb21wcmVzcyhjb25zdCB2b2lkKiBkYXRhLCBzaXplX3QgbGVuZ3RoKSBjb25zdCBvdmVycmlkZSB7CisgICAgICAgIGNvbnN0IGF1dG8gYm91bmQgPSBjb21wcmVzc0JvdW5kKGxlbmd0aCk7CisgICAgICAgIHN0ZDo6dmVjdG9yPHVpbnQ4X3Q+IGJ1ZmZlcihib3VuZCwgJ1wwJyk7CisKKyAgICAgICAgdUxvbmdmIGRlc3RfbGVuID0gYm91bmQ7CisgICAgICAgIGF1dG8gcnYgPSBjb21wcmVzczIoYnVmZmVyLmRhdGEoKSwgJmRlc3RfbGVuLCByZWludGVycHJldF9jYXN0PGNvbnN0IEJ5dGVmKj4oZGF0YSksIGxlbmd0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBHZXRDb21wcmVzc2lvbkxldmVsKCkpOworICAgICAgICBpZiAocnYgIT0gWl9PSykgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiY29tcHJlc3MyIHJldHVybmVkOiAiIDw8IHJ2OworICAgICAgICAgICAgcmV0dXJuIHt9OworICAgICAgICB9CisgICAgICAgIGJ1ZmZlci5yZXNpemUoZGVzdF9sZW4pOworICAgICAgICByZXR1cm4gYnVmZmVyOworICAgIH07Cit9OworCitjbGFzcyBMejRDb21wcmVzc29yIGZpbmFsIDogcHVibGljIElDb21wcmVzc29yIHsKKyAgcHVibGljOgorICAgIEx6NENvbXByZXNzb3IoaW50MzJfdCBjb21wcmVzc2lvbl9sZXZlbCwgY29uc3QgdWludDMyX3QgYmxvY2tfc2l6ZSkKKyAgICAgICAgOiBJQ29tcHJlc3Nvcihjb21wcmVzc2lvbl9sZXZlbCwgYmxvY2tfc2l6ZSl7fTsKKworICAgIHN0ZDo6dmVjdG9yPHVpbnQ4X3Q+IENvbXByZXNzKGNvbnN0IHZvaWQqIGRhdGEsIHNpemVfdCBsZW5ndGgpIGNvbnN0IG92ZXJyaWRlIHsKKyAgICAgICAgY29uc3QgYXV0byBib3VuZCA9IExaNF9jb21wcmVzc0JvdW5kKGxlbmd0aCk7CisgICAgICAgIGlmICghYm91bmQpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkxaNF9jb21wcmVzc0JvdW5kIHJldHVybmVkIDAiOworICAgICAgICAgICAgcmV0dXJuIHt9OworICAgICAgICB9CisgICAgICAgIHN0ZDo6dmVjdG9yPHVpbnQ4X3Q+IGJ1ZmZlcihib3VuZCwgJ1wwJyk7CisKKyAgICAgICAgY29uc3QgYXV0byBjb21wcmVzc2VkX3NpemUgPQorICAgICAgICAgICAgICAgIExaNF9jb21wcmVzc19kZWZhdWx0KHN0YXRpY19jYXN0PGNvbnN0IGNoYXIqPihkYXRhKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWludGVycHJldF9jYXN0PGNoYXIqPihidWZmZXIuZGF0YSgpKSwgbGVuZ3RoLCBidWZmZXIuc2l6ZSgpKTsKKyAgICAgICAgaWYgKGNvbXByZXNzZWRfc2l6ZSA8PSAwKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJMWjRfY29tcHJlc3NfZGVmYXVsdCBmYWlsZWQsIGlucHV0IHNpemU6ICIgPDwgbGVuZ3RoCisgICAgICAgICAgICAgICAgICAgICAgIDw8ICIsIGNvbXByZXNzaW9uIGJvdW5kOiAiIDw8IGJvdW5kIDw8ICIsIHJldDogIiA8PCBjb21wcmVzc2VkX3NpemU7CisgICAgICAgICAgICByZXR1cm4ge307CisgICAgICAgIH0KKyAgICAgICAgLy8gRG9uJ3QgcnVuIGNvbXByZXNzaW9uIGlmIHRoZSBjb21wcmVzc2VkIG91dHB1dCBpcyBsYXJnZXIKKyAgICAgICAgaWYgKGNvbXByZXNzZWRfc2l6ZSA+PSBsZW5ndGgpIHsKKyAgICAgICAgICAgIGJ1ZmZlci5yZXNpemUobGVuZ3RoKTsKKyAgICAgICAgICAgIG1lbWNweShidWZmZXIuZGF0YSgpLCBkYXRhLCBsZW5ndGgpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgYnVmZmVyLnJlc2l6ZShjb21wcmVzc2VkX3NpemUpOworICAgICAgICB9CisgICAgICAgIHJldHVybiBidWZmZXI7CisgICAgfTsKK307CisKK2NsYXNzIEJyb3RsaUNvbXByZXNzb3IgZmluYWwgOiBwdWJsaWMgSUNvbXByZXNzb3IgeworICBwdWJsaWM6CisgICAgQnJvdGxpQ29tcHJlc3NvcihpbnQzMl90IGNvbXByZXNzaW9uX2xldmVsLCBjb25zdCB1aW50MzJfdCBibG9ja19zaXplKQorICAgICAgICA6IElDb21wcmVzc29yKGNvbXByZXNzaW9uX2xldmVsLCBibG9ja19zaXplKXt9OworCisgICAgc3RkOjp2ZWN0b3I8dWludDhfdD4gQ29tcHJlc3MoY29uc3Qgdm9pZCogZGF0YSwgc2l6ZV90IGxlbmd0aCkgY29uc3Qgb3ZlcnJpZGUgeworICAgICAgICBjb25zdCBhdXRvIGJvdW5kID0gQnJvdGxpRW5jb2Rlck1heENvbXByZXNzZWRTaXplKGxlbmd0aCk7CisgICAgICAgIGlmICghYm91bmQpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkJyb3RsaUVuY29kZXJNYXhDb21wcmVzc2VkU2l6ZSByZXR1cm5lZCAwIjsKKyAgICAgICAgICAgIHJldHVybiB7fTsKKyAgICAgICAgfQorICAgICAgICBzdGQ6OnZlY3Rvcjx1aW50OF90PiBidWZmZXIoYm91bmQsICdcMCcpOworCisgICAgICAgIHNpemVfdCBlbmNvZGVkX3NpemUgPSBib3VuZDsKKyAgICAgICAgYXV0byBydiA9IEJyb3RsaUVuY29kZXJDb21wcmVzcygKKyAgICAgICAgICAgICAgICBHZXRDb21wcmVzc2lvbkxldmVsKCksIEJST1RMSV9ERUZBVUxUX1dJTkRPVywgQlJPVExJX0RFRkFVTFRfTU9ERSwgbGVuZ3RoLAorICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0X2Nhc3Q8Y29uc3QgdWludDhfdCo+KGRhdGEpLCAmZW5jb2RlZF9zaXplLCBidWZmZXIuZGF0YSgpKTsKKyAgICAgICAgaWYgKCFydikgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiQnJvdGxpRW5jb2RlckNvbXByZXNzIGZhaWxlZCI7CisgICAgICAgICAgICByZXR1cm4ge307CisgICAgICAgIH0KKyAgICAgICAgYnVmZmVyLnJlc2l6ZShlbmNvZGVkX3NpemUpOworICAgICAgICByZXR1cm4gYnVmZmVyOworICAgIH07Cit9OworCitjbGFzcyBac3RkQ29tcHJlc3NvciBmaW5hbCA6IHB1YmxpYyBJQ29tcHJlc3NvciB7CisgIHB1YmxpYzoKKyAgICBac3RkQ29tcHJlc3NvcihpbnQzMl90IGNvbXByZXNzaW9uX2xldmVsLCBjb25zdCB1aW50MzJfdCBibG9ja19zaXplKQorICAgICAgICA6IElDb21wcmVzc29yKGNvbXByZXNzaW9uX2xldmVsLCBibG9ja19zaXplKSwKKyAgICAgICAgICB6c3RkX2NvbnRleHRfKFpTVERfY3JlYXRlQ0N0eCgpLCBaU1REX2ZyZWVDQ3R4K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gICAgICAgYXV0byBkYXRhID0gQ29tcHJlc3MoY29tcHJlc3Npb24sIGl0ZXIsIGJsb2NrX3NpemUpOworICAgICAgICBhdXRvIGRhdGEgPSBjb21wcmVzc29yLT5Db21wcmVzcyhpdGVyLCBibG9ja19zaXplKTsKICAgICAgICAgaWYgKGRhdGEuZW1wdHkoKSkgewogICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIkNvbXByZXNzQmxvY2tzOiBDb21wcmVzc2lvbiBmYWlsZWQiOwogICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICB9Ci0gICAgICAgIGlmIChkYXRhLnNpemUoKSA+IHN0ZDo6bnVtZXJpY19saW1pdHM8dWludDE2X3Q+OjptYXgoKSkgeworICAgICAgICBpZiAoZGF0YS5zaXplKCkgPiBzdGQ6Om51bWVyaWNfbGltaXRzPHVpbnQzMl90Pjo6bWF4KCkpIHsKICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkNvbXByZXNzZWQgYmxvY2sgaXMgdG9vIGxhcmdlOiAiIDw8IGRhdGEuc2l6ZSgpOwogICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICB9CkBAIC0xNDksNyArMjU2LDggQEAKICAgICAgICAgfQogCiAgICAgICAgIC8vIENvbXByZXNzIGJsb2NrcwotICAgICAgICBib29sIHJldCA9IENvbXByZXNzQmxvY2tzKGJsb2Nrcy5idWZmZXIsIGJsb2Nrcy5udW1fYmxvY2tzLCAmYmxvY2tzLmNvbXByZXNzZWRfZGF0YSk7CisgICAgICAgIGJvb2wgcmV0ID0gQ29tcHJlc3NCbG9ja3MoYmxvY2tzLmJ1ZmZlciwgYmxvY2tzLm51bV9ibG9ja3MsIGJsb2Nrcy5ibG9ja19zaXplLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZibG9ja3MuY29tcHJlc3NlZF9kYXRhKTsKICAgICAgICAgYmxvY2tzLmNvbXByZXNzaW9uX3N0YXR1cyA9IHJldDsKICAg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yAgICAgICAgaWYgKCh0b3RhbF9zdWJtaXR0ZWRfID09IHRvdGFsX3Byb2Nlc3NlZF8pIHx8IHN0b3BwZWRfKSB7CisgICAgICAgICAgICB0b3RhbF9zdWJtaXR0ZWRfID0gMDsKKyAgICAgICAgICAgIHRvdGFsX3Byb2Nlc3NlZF8gPSAwOworICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgIH0KICAgICB9Cit9CiAKLSAgICByZXR1cm4gdHJ1ZTsKK3N0ZDo6dW5pcXVlX3B0cjxJQ29tcHJlc3Nvcj4gSUNvbXByZXNzb3I6OkJyb3RsaShjb25zdCBpbnQzMl90IGNvbXByZXNzaW9uX2xldmVsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVpbnQzMl90IGJsb2NrX3NpemUpIHsKKyAgICByZXR1cm4gc3RkOjptYWtlX3VuaXF1ZTxCcm90bGlDb21wcmVzc29yPihjb21wcmVzc2lvbl9sZXZlbCwgYmxvY2tfc2l6ZSk7Cit9CisKK3N0ZDo6dW5pcXVlX3B0cjxJQ29tcHJlc3Nvcj4gSUNvbXByZXNzb3I6Okd6KGNvbnN0IGludDMyX3QgY29tcHJlc3Npb25fbGV2ZWwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1aW50MzJfdCBibG9ja19zaXplKSB7CisgICAgcmV0dXJuIHN0ZDo6bWFrZV91bmlxdWU8R3pDb21wcmVzc29yPihjb21wcmVzc2lvbl9sZXZlbCwgYmxvY2tfc2l6ZSk7Cit9CisKK3N0ZDo6dW5pcXVlX3B0cjxJQ29tcHJlc3Nvcj4gSUNvbXByZXNzb3I6Okx6NChjb25zdCBpbnQzMl90IGNvbXByZXNzaW9uX2xldmVsLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVpbnQzMl90IGJsb2NrX3NpemUpIHsKKyAgICByZ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VybiB0cnVlOworICAgIHJldHVybiBidWZmZXJfcG9zIC0gYnVmZmVyX3N0YXJ0OwogfQogCi1zdGQ6OnVuaXF1ZV9wdHI8SURlY29tcHJlc3Nvcj4gSURlY29tcHJlc3Nvcjo6VW5jb21wcmVzc2VkKCkgewotICAgIHJldHVybiBzdGQ6OnVuaXF1ZV9wdHI8SURlY29tcHJlc3Nvcj4obmV3IE5vRGVjb21wcmVzc29yKCkpOworc3RkOjp1bmlxdWVfcHRyPElEZWNvbXByZXNzb3I+IElEZWNvbXByZXNzb3I6OkZyb21TdHJpbmcoc3RkOjpzdHJpbmdfdmlldyBjb21wcmVzc29yKSB7CisgICAgaWYgKGNvbXByZXNzb3IgPT0gImx6NCIpIHsKKyAgICAgICAgcmV0dXJuIElEZWNvbXByZXNzb3I6Okx6NCgpOworICAgIH0gZWxzZSBpZiAoY29tcHJlc3NvciA9PSAiYnJvdGxpIikgeworICAgICAgICByZXR1cm4gSURlY29tcHJlc3Nvcjo6QnJvdGxpKCk7CisgICAgfSBlbHNlIGlmIChjb21wcmVzc29yID09ICJneiIpIHsKKyAgICAgICAgcmV0dXJuIElEZWNvbXByZXNzb3I6Okd6KCk7CisgICAgfSBlbHNlIGlmIChjb21wcmVzc29yID09ICJ6c3RkIikgeworICAgICAgICByZXR1cm4gSURlY29tcHJlc3Nvcjo6WnN0ZCgpOworICAgIH0gZWxzZSB7CisgICAgICAgIHJldHVybiBudWxscHRyOworICAgIH0KIH0KIAogLy8gUmVhZCBjaHVua3Mgb2YgdGhlIENPVyBhbmQgaW5jcmVtZW50YWxseSBzdHJlYW0gdGhlbSB0byB0aGUgZGVjb2Rlci4KIGNsYXNzIFN0cmVhbURlY29tcHJlc3NvciA6IHB1YmxpYyBJRGVjb21wcmVzc29yIHsKICAgcHVibGljOgotICAgIGJvb2wgRGVjb21wcmVzcyhzaXplX3Qgb3V0cHV0X2J5dGVzKSBvdmVycmlkZTsKKyAgICBzc2l6ZV90IERlY29tcHJlc3Modm9pZCogY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OwogICAgICAgICB9CiAgICAgICAgIGlmICghcmVhZCkgewogICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiU3RyZWFtIGVuZGVkIHByZW1hdHVyZWx5IjsKLSAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgfQotICAgICAgICBpZiAoIURlY29tcHJlc3NJbnB1dChjaHVuaywgcmVhZCkpIHsKLSAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgaWYgKCFQYXJ0aWFsRGVjb21wcmVzcyhjaHVuaywgcmVhZCkpIHsKKyAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgfQotCiAgICAgICAgIHN0cmVhbV9yZW1haW5pbmdfIC09IHJlYWQ7CisgICAgfQogCi0gICAgICAgIGlmIChzdHJlYW1fcmVtYWluaW5nXyAmJiBEb25lKCkpIHsKKyAgICBpZiAoc3RyZWFtX3JlbWFpbmluZ18pIHsKKyAgICAgICAgaWYgKGRlY29tcHJlc3Nvcl9lbmRlZF8gJiYgIU91dHB1dEZ1bGwoKSkgeworICAgICAgICAgICAgLy8gSWYgdGhlcmUncyBtb3JlIGlucHV0IGluIHRoZSBzdHJlYW0sIGJ1dCB3ZSBoYXZlbid0IGZpbmlzaGVkCisgICAgICAgICAgICAvLyBjb25zdW1pbmcgaWdub3JlZCBieXRlcyBvciBhdmFpbGFibGUgb3V0cHV0IHNwYWNlIHlldCwgdGhlbgorICAgICAgICAgICAgLy8gc29tZXRoaW5nIHdlaXJkIGhhcHBlbmVkLiBSZXBvcnQgaXQgYW5kIGZhaWwuCiAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJEZWNvbXByZXNzb3IgdGVybWluYXRlZCBlYXJseSI7Ci0gICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIH0KKyAgICB9IGVsc2UgeworICAgICAgICBpZiAoIWRlY29tcHJlc3Nvcl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ZiAoel8uYXZhaWxfb3V0ID09IDApIHsKLSAgICAgICAgICAgIGlmICghR2V0RnJlc2hCdWZmZXIoKSkgewotICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIHpfLm5leHRfb3V0ID0gcmVpbnRlcnByZXRfY2FzdDxCeXRlZio+KG91dHB1dF9idWZmZXJfKTsKLSAgICAgICAgICAgIHpfLmF2YWlsX291dCA9IG91dHB1dF9idWZmZXJfcmVtYWluaW5nXzsKKyAgICAvLyBJZiB3ZSdyZSBhc2tlZCB0byBpZ25vcmUgc3RhcnRpbmcgYnl0ZXMsIHdlIHNpbmsgdGhvc2UgaW50byB0aGUgb3V0cHV0CisgICAgLy8gcmVwZWF0ZWRseSB1bnRpbCB0aGVyZSBpcyBub3RoaW5nIGxlZnQgdG8gaWdub3JlLgorICAgIHdoaWxlIChpZ25vcmVfYnl0ZXNfICYmIHpfLmF2YWlsX2luKSB7CisgICAgICAgIHN0ZDo6YXJyYXk8Qnl0ZWYsIGtDaHVua1NpemU+IGlnbm9yZV9idWZmZXI7CisgICAgICAgIHNpemVfdCBtYXhfaWdub3JlID0gc3RkOjptaW4oaWdub3JlX2J5dGVzXywgaWdub3JlX2J1ZmZlci5zaXplKCkpOworICAgICAgICB6Xy5uZXh0X291dCA9IGlnbm9yZV9idWZmZXIuZGF0YSgpOworICAgICAgICB6Xy5hdmFpbF9vdXQgPSBtYXhfaWdub3JlOworCisgICAgICAgIGludCBydiA9IGluZmxhdGUoJnpfLCBaX05PX0ZMVVNIKTsKKyAgICAgICAgaWYgKHJ2ICE9IFpfT0sgJiYgcnYgIT0gWl9TVFJFQU1fRU5EKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJpbmZsYXRlIHJldHVybmVkIGVycm9yIGNvZGUgIiA8PCBydjsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgfQogCi0gICAgICAgIC8vIFJlbWVtYmVyIHRo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TaXplPiBpZ25vcmVfYnVmZmVyOworICAgICAgICBzaXplX3QgbWF4X2lnbm9yZSA9IHN0ZDo6bWluKGlnbm9yZV9ieXRlc18sIGlnbm9yZV9idWZmZXIuc2l6ZSgpKTsKKyAgICAgICAgc2l6ZV90IGlnbm9yZV9zaXplID0gbWF4X2lnbm9yZTsKKworICAgICAgICB1aW50OF90KiBpZ25vcmVfYnVmZmVyX3B0ciA9IGlnbm9yZV9idWZmZXIuZGF0YSgpOworICAgICAgICBhdXRvIHIgPSBCcm90bGlEZWNvZGVyRGVjb21wcmVzc1N0cmVhbShkZWNvZGVyXywgJmF2YWlsYWJsZV9pbiwgJm5leHRfaW4sICZpZ25vcmVfc2l6ZSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmlnbm9yZV9idWZmZXJfcHRyLCBudWxscHRyKTsKKyAgICAgICAgaWYgKHIgPT0gQlJPVExJX0RFQ09ERVJfUkVTVUxUX0VSUk9SKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJicm90bGkgZGVjb2RlIGZhaWxlZCI7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0gZWxzZSBpZiAociA9PSBCUk9UTElfREVDT0RFUl9SRVNVTFRfTkVFRFNfTU9SRV9JTlBVVCAmJiBhdmFpbGFibGVfaW4pIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgImJyb3RsaSB1bmV4cGVjdGVkIG5lZWRzIG1vcmUgaW5wdXQiOwogICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICB9CisgICAgICAgIGlnbm9yZV9ieXRlc18gLT0gbWF4X2lnbm9yZSAtIGlnbm9yZV9zaXplOworICAgIH0KIAotICAgICAgICBhdXRvIG91dHB1dF9idWZmZXIgPSBvdXRwdXRfYnVmZmVyXzsKKyAgICB3aGlsZSAoYXZhaWxhYmxlX2luICYmICFCcm90bGlEZWNvZGVySXNGaW5pc2hlZChkZWNvZGVyXykpIHsKICAgICAgICAgYXV0byByID0gQnJvdGxpRGVjb2RlckRlY29tcHJlc3NTdHJlYW0oZGVjb2Rlcl8sICZhdmFpbGFibGVfaW4sICZuZXh0X2luLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmb3V0cHV0X2J1ZmZlcl9yZW1haW5pbmdfLCAmb3V0cHV0X2J1ZmZlcl8sIG51bGxwdHIpOwogICAgICAgICBpZiAociA9PSBCUk9UTElfREVDT0RFUl9SRVNVTFRfRVJST1IpIHsKICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgImJyb3RsaSBkZWNvZGUgZmFpbGVkIjsKICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKLSAgICAgICAgfQotICAgICAgICBpZiAoIXNpbmtfLT5SZXR1cm5EYXRhKG91dHB1dF9idWZmZXIsIG91dHB1dF9idWZmZXJfIC0gb3V0cHV0X2J1ZmZlcikpIHsKKyAgICAgICAgfSBlbHNlIGlmIChyID09IEJST1RMSV9ERUNPREVSX1JFU1VMVF9ORUVEU19NT1JFX0lOUFVUICYmIGF2YWlsYWJsZV9pbikgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiYnJvdGxpIHVuZXhwZWN0ZWQgbmVlZHMgbW9yZSBpbnB1dCI7CiAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgIH0KLSAgICAgICAgbmVlZHNfbW9yZV9vdXRwdXQgPSAociA9PSBCUk9UTElfREVDT0RFUl9SRVNVTFRfTkVFRFNfTU9SRV9PVVRQVVQpOwogICAgIH0KLSAgICByZXR1cm4gdHJ1ZTsKLX0KIAotc3RkOjp1bmlxdWVfcHRyPElEZWNvbXByZXNzb3I+IElEZWNvbXByZXNzb3I6OkJyb3RsaSgpIHsKLSAgICByZXR1cm4gc3RkOjp1bmlxdWVfcHRyPElEZWNvbXByZXNzb3I+KG5ldyBCcm90bGlEZWNvbXByZXNzb3IoKSk7CisgICAgZGVjb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iAiIDw8IGJ5dGVzX2RlY29tcHJlc3NlZDsKKyAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgfQorICAgICAgICBDSEVDS19MRShieXRlc19kZWNvbXByZXNzZWQsIGRlY29kZV9idWZmZXJfc2l6ZSk7CisKKyAgICAgICAgaWYgKGlnbm9yZV9ieXRlcyA+IGJ5dGVzX2RlY29tcHJlc3NlZCkgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiSWdub3JpbmcgbW9yZSBieXRlcyB0aGFuIGV4aXN0IGluIHN0cmVhbSAoaWdub3JpbmcgIiA8PCBpZ25vcmVfYnl0ZXMKKyAgICAgICAgICAgICAgICAgICAgICAgPDwgIiwgZ290ICIgPDwgYnl0ZXNfZGVjb21wcmVzc2VkIDw8ICIpIjsKKyAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgfQorCisgICAgICAgIGlmICh0ZW1wLmVtcHR5KCkpIHsKKyAgICAgICAgICAgIC8vIExaNCdzIEFQSSBoYXMgbm8gd2F5IHRvIHNpbmsgb3V0IHRoZSBmaXJzdCBOIGJ5dGVzIG9mIGRlY29kaW5nLAorICAgICAgICAgICAgLy8gc28gd2UgcmVhZCB0aGVtIGFsbCBpbiBhbmQgbWVtbW92ZSgpIHRvIGRyb3AgdGhlIHBhcnRpYWwgcmVhZC4KKyAgICAgICAgICAgIGlmIChpZ25vcmVfYnl0ZXMpIHsKKyAgICAgICAgICAgICAgICBtZW1tb3ZlKGRlY29kZV9idWZmZXIsIGRlY29kZV9idWZmZXIgKyBpZ25vcmVfYnl0ZXMsCisgICAgICAgICAgICAgICAgICAgICAgICBieXRlc19kZWNvbXByZXNzZWQgLSBpZ25vcmVfYnl0ZXMpOwogICAgICAgICAgICAgfQotICAgICAgICAgICAgc2lua18tPlJldHVybkRhdGEob3V0cHV0X2J1ZmZlciwgb3V0cHV0X3NpemUpOwotICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgICAgICByZXR1cm4gYnl0ZXNfZGVjb21wcmVzc2VkIC0gaWdub3JlX2J5dGVzOwogICAgICAgICB9CisKKyAgICAgICAgc2l6ZV90IG1heF9jb3B5ID0gc3RkOjptaW4oYnl0ZXNfZGVjb21wcmVzc2VkIC0gaWdub3JlX2J5dGVzLCBidWZmZXJfc2l6ZSk7CisgICAgICAgIG1lbWNweShidWZmZXIsIHRlbXAuZGF0YSgpICsgaWdub3JlX2J5dGVzLCBtYXhfY29weSk7CisgICAgICAgIHJldHVybiBtYXhfY29weTsKKyAgICB9Cit9OworCitjbGFzcyBac3RkRGVjb21wcmVzc29yIGZpbmFsIDogcHVibGljIElEZWNvbXByZXNzb3IgeworICBwdWJsaWM6CisgICAgc3NpemVfdCBEZWNvbXByZXNzKHZvaWQqIGJ1ZmZlciwgc2l6ZV90IGJ1ZmZlcl9zaXplLCBzaXplX3QgZGVjb21wcmVzc2VkX3NpemUsCisgICAgICAgICAgICAgICAgICAgICAgIHNpemVfdCBpZ25vcmVfYnl0ZXMgPSAwKSBvdmVycmlkZSB7CisgICAgICAgIGlmIChidWZmZXJfc2l6ZSA8IGRlY29tcHJlc3NlZF9zaXplIC0gaWdub3JlX2J5dGVzKSB7CisgICAgICAgICAgICBMT0coSU5GTykgPDwgImJ1ZmZlciBzaXplICIgPDwgYnVmZmVyX3NpemUKKyAgICAgICAgICAgICAgICAgICAgICA8PCAiIGlzIG5vdCBsYXJnZSBlbm91Z2ggdG8gaG9sZCBkZWNvbXByZXNzZWQgZGF0YS4gRGVjb21wcmVzc2VkIHNpemUgIgorICAgICAgICAgICAgICAgICAgICAgIDw8IGRlY29tcHJlc3NlZF9zaXplIDw8ICIsIGlnbm9yZV9ieXRlcyAiIDw8IGlnbm9yZV9ieXRlczsKKyAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgfQorICAgICAgICBpZiAoaWdub3JlX2J5dGVzID09IDApIHsKKyAgICAgICAgICAgIGlmICghRGVjb21wcmVzcyhidWZmZXIsIGRlY29tcHJlc3NlZF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G9uY2UuIEV4cGVjdGVkOiAiIDw8IGlucHV0X2J1ZmZlci5zaXplKCkKICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBhY3R1YWw6ICIgPDwgYnl0ZXNfcmVhZDsKICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgfQotICAgICAgICBjb25zdCBpbnQgYnl0ZXNfZGVjb21wcmVzc2VkID0KLSAgICAgICAgICAgICAgICBMWjRfZGVjb21wcmVzc19zYWZlKGlucHV0X2J1ZmZlci5kYXRhKCksIHN0YXRpY19jYXN0PGNoYXIqPihvdXRwdXRfYnVmZmVyKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0X2J1ZmZlci5zaXplKCksIG91dHB1dF9zaXplKTsKKyAgICAgICAgY29uc3QgYXV0byBieXRlc19kZWNvbXByZXNzZWQgPSBaU1REX2RlY29tcHJlc3Mob3V0cHV0X2J1ZmZlciwgb3V0cHV0X3NpemUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0X2J1ZmZlci5kYXRhKCksIGlucHV0X2J1ZmZlci5zaXplKCkpOwogICAgICAgICBpZiAoYnl0ZXNfZGVjb21wcmVzc2VkICE9IG91dHB1dF9zaXplKSB7Ci0gICAgICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gZGVjb21wcmVzcyBMWjQgYmxvY2ssIGV4cGVjdGVkIG91dHB1dCBzaXplOiAiIDw8IG91dHB1dF9zaXplCisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gZGVjb21wcmVzcyBaU1REIGJsb2NrLCBleHBlY3RlZCBvdXRwdXQgc2l6ZTogIiA8PCBvdXRwdXRfc2l6ZQogICAgICAgICAgICAgICAgICAgICAgICA8PCAiLCBhY3R1YWw6ICIgPDwgYnl0ZXNfZGVjb21wcmVzc2VkOwogICAgICAgICAgICAgcmV0dXJuIGZhbHNlO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1bmNvbXByZXNzZWQsICI7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBrQ293Q29tcHJlc3NHejoKKyAgICAgICAgICAgIG9zIDw8ICJneiwgIjsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIGtDb3dDb21wcmVzc0Jyb3RsaToKKyAgICAgICAgICAgIG9zIDw8ICJicm90bGksICI7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBrQ293Q29tcHJlc3NMejQ6CisgICAgICAgICAgICBvcyA8PCAibHo0LCAiOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2Uga0Nvd0NvbXByZXNzWnN0ZDoKKyAgICAgICAgICAgIG9zIDw8ICJ6c3RkLCAiOworICAgICAgICAgICAgYnJlYWs7CisgICAgfQorICAgIG9zIDw8ICJkYXRhX2xlbmd0aDoiIDw8IG9wLmRhdGFfbGVuZ3RoIDw8ICIsICI7CisgICAgb3MgPDwgIm5ld19ibG9jazoiIDw8IG9wLm5ld19ibG9jayA8PCAiLCAiOwogICAgIG9zIDw8ICJzb3VyY2U6IiA8PCBvcC5zb3VyY2U7Ci0gICAgaWYgKG9wLnR5cGUgPT0ga0Nvd1hvck9wKQotICAgICAgICBvcyA8PCAiIChibG9jazoiIDw8IG9wLnNvdXJjZSAvIEJMT0NLX1NaIDw8ICIgb2Zmc2V0OiIgPDwgb3Auc291cmNlICUgQkxPQ0tfU1ogPDwgIikiOwogICAgIG9zIDw8ICIpIjsKICAgICByZXR1cm4gb3M7CiB9CiAKLWludDY0X3QgR2V0TmV4dE9wT2Zmc2V0KGNvbnN0IENvd09wZXJhdGlvbiYgb3AsIHVpbnQzMl90IGNsdXN0ZXJfb3BzKSB7CitzdGQ6Om9zdHJlYW0mIG9wZXJhdG9yPDwoc3RkOjpvc3RyZWFtJiBvcywgQ293T3BlcmF0aW9uVjMgY29uc3QmIG9wKSB7CisgICAgb3MgPDwgIkNvd09wZXJhdGlvbigiOworICAgIEV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gICAgIGRlZmF1bHQ6CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJDYW5ub3QgY3JlYXRlIHVua25vd24gY293IHZlcnNpb246ICIgPDwgdmVyc2lvbjsKKyAgICAgICAgICAgIHJldHVybiBudWxscHRyOworICAgIH0KKyAgICBpZiAoIWJhc2UtPkluaXRpYWxpemUobGFiZWwpKSB7CisgICAgICAgIHJldHVybiBudWxscHRyOworICAgIH0KKyAgICByZXR1cm4gYmFzZTsKK30KKworc3RkOjp1bmlxdWVfcHRyPElDb3dXcml0ZXI+IENyZWF0ZUNvd0VzdGltYXRvcih1aW50MzJfdCB2ZXJzaW9uLCBjb25zdCBDb3dPcHRpb25zJiBvcHRpb25zKSB7CisgICAgcmV0dXJuIENyZWF0ZUNvd1dyaXRlcih2ZXJzaW9uLCBvcHRpb25zLCB1bmlxdWVfZmR7LTF9LCBzdGQ6Om51bGxvcHQpOworfQorCitzaXplX3QgQ293T3BDb21wcmVzc2lvblNpemUoY29uc3QgQ293T3BlcmF0aW9uKiBvcCwgc2l6ZV90IGJsb2NrX3NpemUpIHsKKyAgICB1aW50OF90IGNvbXByZXNzaW9uX2JpdHMgPSBvcC0+Y29tcHJlc3Npb25fYml0cygpOworICAgIHJldHVybiAoYmxvY2tfc2l6ZSA8PCBjb21wcmVzc2lvbl9iaXRzKTsKK30KKworYm9vbCBHZXRCbG9ja09mZnNldChjb25zdCBDb3dPcGVyYXRpb24qIG9wLCB1aW50NjRfdCBpb19ibG9jaywgc2l6ZV90IGJsb2NrX3NpemUsIG9mZl90KiBvZmZzZXQpIHsKKyAgICBjb25zdCB1aW50NjRfdCBuZXdfYmxvY2sgPSBvcC0+bmV3X2Jsb2NrOworCisgICAgaWYgKG9wLT50eXBlKCkgIT0ga0Nvd1JlcGxhY2VPcCB8fCBpb19ibG9jayA8IG5ld19ibG9jaykgeworICAgICAgICBMT0coVkVSQk9TRSkgPDwgIkludmFsaWQgSU8gcmVxdWVzdCBmb3IgYmxvY2s6ICIgPD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ZWRfZmQgZmQsIENvd0hlYWRlclYzKiBoZWFkZXIpIHsKKyAgICBpZiAobHNlZWsoZmQuZ2V0KCksIDAsIFNFRUtfU0VUKSA8IDApIHsKKyAgICAgICAgUExPRyhFUlJPUikgPDwgImxzZWVrIGhlYWRlciBmYWlsZWQiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgbWVtc2V0KGhlYWRlciwgMCwgc2l6ZW9mKCpoZWFkZXIpKTsKKworICAgIGlmICghYW5kcm9pZDo6YmFzZTo6UmVhZEZ1bGx5KGZkLCAmaGVhZGVyLT5wcmVmaXgsIHNpemVvZihoZWFkZXItPnByZWZpeCkpKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKGhlYWRlci0+cHJlZml4Lm1hZ2ljICE9IGtDb3dNYWdpY051bWJlcikgeworICAgICAgICBMT0coRVJST1IpIDw8ICJIZWFkZXIgTWFnaWMgY29ycnVwdGVkLiBNYWdpYzogIiA8PCBoZWFkZXItPnByZWZpeC5tYWdpYworICAgICAgICAgICAgICAgICAgIDw8ICJFeHBlY3RlZDogIiA8PCBrQ293TWFnaWNOdW1iZXI7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKGhlYWRlci0+cHJlZml4LmhlYWRlcl9zaXplID4gc2l6ZW9mKENvd0hlYWRlclYzKSkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJVbmtub3duIENvd0hlYWRlciBzaXplIChnb3QgIiA8PCBoZWFkZXItPnByZWZpeC5oZWFkZXJfc2l6ZQorICAgICAgICAgICAgICAgICAgIDw8ICIgYnl0ZXMsIGV4cGVjdGVkIGF0IG1vc3QgIiA8PCBzaXplb2YoQ293SGVhZGVyVjMpIDw8ICIgYnl0ZXMpIjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIGlmIChsc2VlayhmZC5nZXQoKSwgMCwgU0VFS19TRVQpIDwgMCkgeworICAgICAgICBQT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5pcXVlPENvd1BhcnNlclYyPigpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgMzoKKyAgICAgICAgICAgIHBhcnNlciA9IHN0ZDo6bWFrZV91bmlxdWU8Q293UGFyc2VyVjM+KCk7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIlVua25vd24gdmVyc2lvbjogIiA8PCBoZWFkZXJfLnByZWZpeC5tYWpvcl92ZXJzaW9uOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgIH0KLSAgICBpZiAoaGVhZGVyXy5mb290ZXJfc2l6ZSAhPSBzaXplb2YoQ293Rm9vdGVyKSkgewotICAgICAgICBMT0coRVJST1IpIDw8ICJGb290ZXIgc2l6ZSB1bmtub3duLCByZWFkICIgPDwgaGVhZGVyXy5mb290ZXJfc2l6ZSA8PCAiLCBleHBlY3RlZCAiCi0gICAgICAgICAgICAgICAgICAgPDwgc2l6ZW9mKENvd0Zvb3Rlcik7Ci0gICAgICAgIHJldHVybiBmYWxzZTsKLSAgICB9Ci0gICAgaWYgKGhlYWRlcl8ub3Bfc2l6ZSAhPSBzaXplb2YoQ293T3BlcmF0aW9uKSkgewotICAgICAgICBMT0coRVJST1IpIDw8ICJPcGVyYXRpb24gc2l6ZSB1bmtub3duLCByZWFkICIgPDwgaGVhZGVyXy5vcF9zaXplIDw8ICIsIGV4cGVjdGVkICIKLSAgICAgICAgICAgICAgICAgICA8PCBzaXplb2YoQ293T3BlcmF0aW9uKTsKLSAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgIH0KLSAgICBpZiAoaGVhZGVyXy5jbHVzdGVyX29wcyA9PSAxKSB7Ci0gICAgICAgIExPRyhFUlJPUikgPDwgIkNsdXN0ZXJzIG11c3QgY29udGFpbiBhdCBsZWFzdCB0d28gb3BlcmF0aW9ucyB0byBmdW5jdGlvbi4iOwotICAgICAgICByZXR1cm4gZmFsc2U7Ci0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kgewotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50X29wLnR5cGUgPT0ga0Nvd0xhYmVsT3ApIHsKLSAgICAgICAgICAgICAgICBsYXN0X2xhYmVsXyA9IHtjdXJyZW50X29wLnNvdXJjZX07Ci0KLSAgICAgICAgICAgICAgICAvLyBJZiB3ZSByZWFjaCB0aGUgcmVxdWVzdGVkIGxhYmVsLCBzdG9wIHJlYWRpbmcuCi0gICAgICAgICAgICAgICAgaWYgKGxhYmVsICYmIGxhYmVsLnZhbHVlKCkgPT0gY3VycmVudF9vcC5zb3VyY2UpIHsKLSAgICAgICAgICAgICAgICAgICAgZG9uZSA9IHRydWU7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VycmVudF9vcC50eXBlID09IGtDb3dGb290ZXJPcCkgewotICAgICAgICAgICAgICAgIGZvb3Rlcl8uZW1wbGFjZSgpOwotICAgICAgICAgICAgICAgIENvd0Zvb3RlciogZm9vdGVyID0gJmZvb3Rlcl8udmFsdWUoKTsKLSAgICAgICAgICAgICAgICBtZW1jcHkoJmZvb3Rlcl8tPm9wLCAmY3VycmVudF9vcCwgc2l6ZW9mKGZvb3Rlci0+b3ApKTsKLSAgICAgICAgICAgICAgICBvZmZfdCBvZmZzID0gbHNlZWsoZmRfLmdldCgpLCBwb3MsIFNFRUtfU0VUKTsKLSAgICAgICAgICAgICAgICBpZiAob2ZmcyA8IDAgfHwgcG9zICE9IHN0YXRpY19jYXN0PHVpbnQ2NF90PihvZmZzKSkgewotICAgICAgICAgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAibHNlZWsgbmV4dCBvcCBmYWlsZWQgIiA8PCBvZmZzOwotICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGlmICghYW5kcm9pZDo6YmFzZTo6UmVhZEZ1bGx5KGZkXywgJmZvb3Rlci0+ZGF0YSwgc2l6ZW9mKGZvb3Rlci0+ZGF0YSkpKSB7Ci0gICAgICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkNvdWxkIG5vdCByZWFkIENPVyBmb290ZXIiOwotICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgLy8gRHJvcCB0aGUgZm9vdGVyIGZyb20gdGhlIG9wIHN0cmVhbS4KLSAgICAgICAgICAgICAgICBjdXJyZW50X29wX251bS0tOwotICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfSBlbHNlIGlmIChjdXJyZW50X29wLnR5cGUgPT0ga0Nvd1NlcXVlbmNlT3ApIHsKLSAgICAgICAgICAgICAgICBoYXNfc2VxX29wc18gPSB0cnVlOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0KLSAgICAgICAgLy8gUG9zaXRpb24gZm9yIG5leHQgY2x1c3RlciByZWFkCi0gICAgICAgIG9mZl90IG9mZnMgPSBsc2VlayhmZF8uZ2V0KCksIHBvcywgU0VFS19TRVQpOwotICAgICAgICBpZiAob2ZmcyA8IDAgfHwgcG9zICE9IHN0YXRpY19jYXN0PHVpbnQ2NF90PihvZmZzKSkgewotICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgImxzZWVrIG5leHQgb3AgZmFpbGVkICIgPDwgb2ZmczsKLSAgICAgICAgICAgIHJldHVybiBmYWxzZTsKLSAgICAgICAgfQotICAgICAgICBvcHNfYnVmZmVyLT5yZXNpemUoY3VycmVudF9vcF9udW0pOwotICAgIH0KLQotICAgIExPRyhERUJVRykgPDwgIkNPVyBmaWxlIHJlYWQgY29tcGxldGUuIFRvdGFsIG9wczogIiA8PCBvcHNfYnVmZmVyLT5zaXplKCk7Ci0gICAgLy8gVG8gc3Vj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ApIHsKLSAgICAgICAgICAgIHNpemVfdCBzZXFfbGVuID0gY3VycmVudF9vcC5kYXRhX2xlbmd0aCAvIHNpemVvZih1aW50MzJfdCk7Ci0KLSAgICAgICAgICAgIG1lcmdlX29wX2Jsb2Nrcy0+cmVzaXplKG1lcmdlX29wX2Jsb2Nrcy0+c2l6ZSgpICsgc2VxX2xlbik7Ci0gICAgICAgICAgICBpZiAoIUdldFJhd0J5dGVzKGN1cnJlbnRfb3Auc291cmNlLCAmbWVyZ2Vfb3BfYmxvY2tzLT5kYXRhKClbbnVtX3NlcXNdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X29wLmRhdGFfbGVuZ3RoLCAmcmVhZCkpIHsKLSAgICAgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIHJlYWQgc2VxdWVuY2Ugb3AhIjsKLSAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBmb3IgKHNpemVfdCBqID0gbnVtX3NlcXM7IGogPCBudW1fc2VxcyArIHNlcV9sZW47IGorKykgewotICAgICAgICAgICAgICAgIHNlcV9vcHNfc2V0Lmluc2VydChtZXJnZV9vcF9ibG9ja3MtPmRhdGEoKVtqXSk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBudW1fc2VxcyArPSBzZXFfbGVuOwotICAgICAgICB9Ci0KLSAgICAgICAgaWYgKElzTWV0YWRhdGFPcChjdXJyZW50X29wKSkgewotICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgIH0KLQotICAgICAgICBpZiAoIWhhc19zZXFfb3BzXyAmJiBJc09yZGVyZWRPcChjdXJyZW50X29wKSkgewotICAgICAgICAgICAgbWVyZ2Vfb3BfYmxvY2tzLT5lbXBsYWNlX2JhY2soY3VycmVudF9vcC5uZXdfYmxvY2spOwotICAgICAgICB9IGVsc2UgaWYgKHNlcV9vcHNfc2V0LmNvdW50KGN1cnJlbn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AgICAgICAgICAgICAgIGN1cnJlbnRfb3AuZGF0YV9sZW5ndGgsICZyZWFkKSkgeworICAgICAgICAgICAgICAgIFBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gcmVhZCBzZXF1ZW5jZSBvcCEiOworICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGZvciAoc2l6ZV90IGogPSBudW1fc2VxczsgaiA8IG51bV9zZXFzICsgc2VxX2xlbjsgaisrKSB7CisgICAgICAgICAgICAgICAgc2VxX29wc19zZXQuaW5zZXJ0KG1lcmdlX29wX2Jsb2Nrcy0+YXQoaikpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgbnVtX3NlcXMgKz0gc2VxX2xlbjsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChJc01ldGFkYXRhT3AoY3VycmVudF9vcCkpIHsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisKKyAgICAgICAgLy8gU2VxdWVuY2Ugb3BzIG11c3QgYmUgdGhlIGZpcnN0IG9wcyBpbiB0aGUgc3RyZWFtLgorICAgICAgICBpZiAoc2VxX29wc19zZXQuZW1wdHkoKSAmJiBJc09yZGVyZWRPcChjdXJyZW50X29wKSkgeworICAgICAgICAgICAgbWVyZ2Vfb3BfYmxvY2tzLT5lbXBsYWNlX2JhY2soY3VycmVudF9vcC5uZXdfYmxvY2spOworICAgICAgICB9IGVsc2UgaWYgKHNlcV9vcHNfc2V0LmNvdW50KGN1cnJlbnRfb3AubmV3X2Jsb2NrKSA9PSAwKSB7CisgICAgICAgICAgICBvdGhlcl9vcHMtPnB1c2hfYmFjayhjdXJyZW50X29wLm5ld19ibG9jayk7CisgICAgICAgIH0KKyAgICAgICAgYmxvY2tfbWFwLT5pbnNlcnQoe2N1cnJlbnRfb3AubmV3X2Jsb2NrLCBpfSk7CisgICAgfQorICAgIHJldHVybiBmYWxzZTsKK30KKworYm9vbCBDb3dSZWFkZXI6Okdld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XMgYmVlbiBjb21wbGV0ZWQuCisgICAgICAgIGlmICghSXNPcmRlcmVkT3AoKm9wKSkgeworICAgICAgICAgICAgbm9uX29yZGVyZWRfb3BfZm91bmQgPSB0cnVlOworICAgICAgICB9CisKKyAgICAgICAgLy8gU2luY2UsIGFsbCBvcmRlcmVkIG9wcyBwcm9jZXNzaW5nIGhhcyBiZWVuIGNvbXBsZXRlZCwKKyAgICAgICAgLy8gY2hlY2sgdGhhdCB0aGUgc3Vic2VxdWVudCBvcHMgYXJlIG5vdCBvcmRlcmVkLgorICAgICAgICBpZiAobm9uX29yZGVyZWRfb3BfZm91bmQgJiYgSXNPcmRlcmVkT3AoKm9wKSkgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiSW52YWxpZCBzZXF1ZW5jZSAtIG5vbi1vcmRlcmVkIGFuZCBvcmRlcmVkIG9wcyIKKyAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBjYW5ub3QgYmUgbWl4ZWQgZHVyaW5nIHNlcXVlbmNlIGdlbmVyYXRpb24iOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisKKyAgICAgICAgaWYgKCFHZXRTb3VyY2VPZmZzZXQob3AsICZvZmZzZXQpKSB7CiAgICAgICAgICAgICBpdHItPk5leHQoKTsKICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICB9CiAKLSAgICAgICAgQ293T3BlcmF0aW9uKiBvdmVyd3JpdGUgPSBudWxscHRyOworICAgICAgICB1aW50NjRfdCBibG9jayA9IEdldEJsb2NrRnJvbU9mZnNldChoZWFkZXJfLCBvZmZzZXQpOworICAgICAgICBib29sIG1pc2FsaWduZWQgPSAoR2V0QmxvY2tSZWxhdGl2ZU9mZnNldChoZWFkZXJfLCBvZmZzZXQpICE9IDApOworCisgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogb3ZlcndyaXRlID0gbnVsbHB0cjsKICAgICAgICAgaWYgKG92ZXJ3cml0dGVuX2Jsb2Nrc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ZShvcCwgaGVhZGVyXy5ibG9ja19zaXplKTsKKyAgICBpZiAoIW9wX2J1Zl9zaXplKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgIkNvbXByZXNzaW9uIHNpemUgaXMgemVyby4gb3A6ICIgPDwgKm9wOworICAgICAgICByZXR1cm4gLTE7CisgICAgfQorICAgIHN3aXRjaCAoR2V0Q29tcHJlc3Npb25UeXBlKCkpIHsKICAgICAgICAgY2FzZSBrQ293Q29tcHJlc3NOb25lOgotICAgICAgICAgICAgZGVjb21wcmVzc29yID0gSURlY29tcHJlc3Nvcjo6VW5jb21wcmVzc2VkKCk7CiAgICAgICAgICAgICBicmVhazsKICAgICAgICAgY2FzZSBrQ293Q29tcHJlc3NHejoKICAgICAgICAgICAgIGRlY29tcHJlc3NvciA9IElEZWNvbXByZXNzb3I6Okd6KCk7CkBAIC03ODIsMjQgKzczNyw0OSBAQAogICAgICAgICBjYXNlIGtDb3dDb21wcmVzc0Jyb3RsaToKICAgICAgICAgICAgIGRlY29tcHJlc3NvciA9IElEZWNvbXByZXNzb3I6OkJyb3RsaSgpOwogICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2Uga0Nvd0NvbXByZXNzWnN0ZDoKKyAgICAgICAgICAgIGlmIChvcF9idWZfc2l6ZSAhPSBvcC0+ZGF0YV9sZW5ndGgpIHsKKyAgICAgICAgICAgICAgICBkZWNvbXByZXNzb3IgPSBJRGVjb21wcmVzc29yOjpac3RkKCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBicmVhazsKICAgICAgICAgY2FzZSBrQ293Q29tcHJlc3NMejQ6Ci0gICAgICAgICAgICBkZWNvbXByZXNzb3IgPSBJRGVjb21wcmVzc29yOjpMejQoKTsKKyAgICAgICAgICAgIGlmIChvcF9idWZfc2l6ZSAhPSBvcC0+ZGF0YV9sZW5ndGgpIHsKKyAgICAgICAgICAgICAgICBkZWNvbXByZXNzb3IgPSBJRGVjb21wcmVzc29yOjpMejQoKTsKKyAgICAg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rKGJsb2NrKTsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKworICAgIGF1dG8gaXRlciA9IHNvdXJjZV9ibG9ja19oYXNoXy5maW5kKGJsb2NrX2hhc2gpOworICAgIGlmIChpdGVyICE9IHNvdXJjZV9ibG9ja19oYXNoXy5lbmQoKSkgeworICAgICAgICBzdGQ6OmxvY2tfZ3VhcmQ8c3RkOjptdXRleD4gbG9jayh3cml0ZV9sb2NrXyk7CisgICAgICAgIC8vIEluLXBsYWNlIGNvcHkgaXMgc2tpcHBlZAorICAgICAgICBpZiAoYmxvY2sgIT0gaXRlci0+c2Vjb25kKSB7CisgICAgICAgICAgICBjb3B5X2Jsb2Nrc19bYmxvY2tdID0gaXRlci0+c2Vjb25kOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgaW5fcGxhY2Vfb3BzXyArPSAxOworICAgICAgICB9CisgICAgICAgIHJldHVybjsKKyAgICB9CisgICAgc3RkOjpsb2NrX2d1YXJkPHN0ZDo6bXV0ZXg+IGxvY2sod3JpdGVfbG9ja18pOworICAgIHJlcGxhY2VfYmxvY2tzXy5wdXNoX2JhY2soYmxvY2spOworfQorCitzaXplX3QgQ3JlYXRlU25hcHNob3Q6OlByZXBhcmVXcml0ZShzaXplX3QqIHBlbmRpbmdfb3BzLCBzaXplX3Qgc3RhcnRfaW5kZXgpIHsKKyAgICBzaXplX3QgbnVtX29wcyA9ICpwZW5kaW5nX29wczsKKyAgICB1aW50NjRfdCBzdGFydF9ibG9jayA9IHJlcGxhY2VfYmxvY2tzX1tzdGFydF9pbmRleF07CisgICAgc2l6ZV90IG5yX2NvbnNlY3V0aXZlID0gMTsKKyAgICBudW1fb3BzIC09IDE7CisgICAgd2hpbGUgKG51bV9vcHMpIHsKKyAgICAgICAgdWludDY0X3QgbmV4dF9ibG9jayA9IHJlcGxhY2VfYmxvY2tzX1tzdGFydF9pbmRleCArIG5yX2NvbnNlY3V0aXZlXTsKKyAgICAgICAgaWYgKG5leHRfYmxvY2sgI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fLT5BZGRaZXJvQmxvY2tzKCppdCwgMSkpIHsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgIH0KKyAgICBzdGQ6OnN0cmluZyBidWZmZXIoY29tcHJlc3Npb25fZmFjdG9yXywgJ1wwJyk7CisKKyAgICByZXBsYWNlX29wc18gPSByZXBsYWNlX2Jsb2Nrc18uc2l6ZSgpOworICAgIHNpemVfdCBibG9ja3NfdG9fY29tcHJlc3MgPSByZXBsYWNlX2Jsb2Nrc18uc2l6ZSgpOworICAgIHNpemVfdCBudW1fb3BzID0gMDsKKyAgICBzaXplX3QgYmxvY2tfaW5kZXggPSAwOworICAgIHdoaWxlIChibG9ja3NfdG9fY29tcHJlc3MpIHsKKyAgICAgICAgbnVtX29wcyA9IHN0ZDo6bWluKChjb21wcmVzc2lvbl9mYWN0b3JfIC8gQkxPQ0tfU1opLCBibG9ja3NfdG9fY29tcHJlc3MpOworICAgICAgICBhdXRvIGxpbmVhcl9ibG9ja3MgPSBQcmVwYXJlV3JpdGUoJm51bV9vcHMsIGJsb2NrX2luZGV4KTsKKyAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpSZWFkRnVsbHlBdE9mZnNldCh0YXJnZXRfZmRfLmdldCgpLCBidWZmZXIuZGF0YSgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsaW5lYXJfYmxvY2tzICogQkxPQ0tfU1opLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcGxhY2VfYmxvY2tzX1tibG9ja19pbmRleF0gKiBCTE9DS19TWikpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byByZWFkIGF0IG9mZnNldDogIiA8PCByZXBsYWNlX2Jsb2Nrc19bYmxvY2tfaW5kZXhdICogQkxPQ0tfU1oKKyAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBzaXplOiAiIDw8IGxpbm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lbiB0aGUgc25hcHNob3QtcGF0Y2ggZmlsZTogIiA8PCBwYXRjaF9maWxlXzsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBDb3dSZWFkZXIgcmVhZGVyOworICAgIGlmICghcmVhZGVyLlBhcnNlKHJlYWRfZmQpKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgIlBhcnNlIGZhaWxlZCI7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICBpZiAoIXJlYWRlci5WZXJpZnlNZXJnZU9wcygpKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgIk1lcmdlT3BzIE9yZGVyIGlzIHdyb25nIjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICByZXR1cm4gdHJ1ZTsKK30KKworYm9vbCBDcmVhdGVTbmFwc2hvdDo6V3JpdGVWM1NuYXBzaG90cygpIHsKKyAgICBpZiAoIUNyZWF0ZVNuYXBzaG90V3JpdGVyKCkpIHsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBpZiAoIVdyaXRlT3JkZXJlZFNuYXBzaG90cygpKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKCFXcml0ZU5vbk9yZGVyZWRTbmFwc2hvdHMoKSkgeworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIGlmICghVmVyaWZ5TWVyZ2VPcmRlcigpKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICBMT0coSU5GTykgPDwgIkluLXBsYWNlOiAiIDw8IGluX3BsYWNlX29wc18gPDwgIiBaZXJvOiAiIDw8IHplcm9fb3BzXworICAgICAgICAgICAgICA8PCAiIFJlcGxhY2U6ICIgPDwgcmVwbGFjZV9vcHNfIDw8ICIgY29weTogIiA8PCBjb3B5X29wc187CisgICAgcmV0dXJuIHRydWU7Cit9CisKK2Jvb2wgQ3JlYXRlU25hcHNob3Q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OiAiIDw8IGRldl9zejsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorCisgICAgICAgIGlmICghSXNCbG9ja0FsaWduZWQodG9fcmVhZCkpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgInVuYWJsZSB0byBwYXJzZSB0aGUgdW4tYWxpZ25lZCByZXF1ZXN0OiAiIDw8IHRvX3JlYWQ7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKworICAgICAgICBzaXplX3QgbnVtX2Jsb2NrcyA9IHRvX3JlYWQgLyBCTE9DS19TWjsKKyAgICAgICAgdWludDY0X3QgYnVmZmVyX29mZnNldCA9IDA7CisgICAgICAgIG9mZl90IGZvZmZzZXQgPSBmaWxlX29mZnNldDsKKworICAgICAgICB3aGlsZSAobnVtX2Jsb2NrcykgeworICAgICAgICAgICAgY29uc3Qgdm9pZCogYnVmcHRyID0gKGNoYXIqKWJ1ZmZlci5nZXQoKSArIGJ1ZmZlcl9vZmZzZXQ7CisgICAgICAgICAgICB1aW50NjRfdCBibGtpbmRleCA9IGZvZmZzZXQgLyBCTE9DS19TWjsKKworICAgICAgICAgICAgdWludDhfdCBjaGVja3N1bVszMl07CisgICAgICAgICAgICBTSEEyNTYoYnVmcHRyLCBCTE9DS19TWiwgY2hlY2tzdW0pOworICAgICAgICAgICAgc3RkOjpzdHJpbmcgaGFzaCA9IFRvSGV4U3RyaW5nKGNoZWNrc3VtLCBzaXplb2YoY2hlY2tzdW0pKTsKKworICAgICAgICAgICAgaWYgKGNyZWF0ZV9zbmFwc2hvdF9wYXRjaF8pIHsKKyAgICAgICAgICAgICAgICBQcmVwYXJlTWVyZ2VCbG9jayhidWZwdHIsIGJsa2luZGV4LCBoYXNoKTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgc3RkOjpsb2NrX2d1YXJkPHN0ZDo6bXV0ZXg+IGxvY2soc291cmNlX2Jsb2NrX2hhc2hfbG9ja18pOworICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHNvdXJjZV9ibG9ja19oYXNoXy5jb3VudChoYXNoKSA9PSAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2VfYmxvY2tfaGFzaF9baGFzaF0gPSBibGtpbmRleDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGJ1ZmZlcl9vZmZzZXQgKz0gQkxPQ0tfU1o7CisgICAgICAgICAgICBmb2Zmc2V0ICs9IEJMT0NLX1NaOworICAgICAgICAgICAgbnVtX2Jsb2NrcyAtPSAxOworICAgICAgICB9CisKKyAgICAgICAgZmlsZV9vZmZzZXQgKz0gKHNraXBfYmxvY2tzICogdG9fcmVhZCk7CisgICAgICAgIGlmIChmaWxlX29mZnNldCA+PSBkZXZfc3opIHsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgfQorCisgICAgcmV0dXJuIHRydWU7Cit9CisKK2Jvb2wgQ3JlYXRlU25hcHNob3Q6OlBhcnNlUGFydGl0aW9uKCkgeworICAgIHVuaXF1ZV9mZCBmZChURU1QX0ZBSUxVUkVfUkVUUlkob3BlbihwYXJzaW5nX2ZpbGVfLmNfc3RyKCksIE9fUkRPTkxZKSkpOworICAgIGlmIChmZCA8IDApIHsKKyAgICAgICAgTE9HKEVSUk9SKSA8PCAib3BlbiBmYWlsZWQ6ICIgPDwgcGFyc2luZ19maWxlXzsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIHVpbnQ2NF90IGRldl9zeiA9IGxzZWVrKGZkLmdldCgpLCAwLCBTRUVLX0VORCk7CisgICAgaWYgKCFkZXZfc3opIHsKKyAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ291bGQgbm90IGRldGVybWluZSBibG9jayBkZXZpY2Ugc2l6ZTogIiA8PCBwYXJzaW5nX2ZpbGVfOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgaWYgKCFJc0Jsb2NrQWxpZ25lZChkZXZfc3opKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgImRldl9zejogIiA8PCBkZXZfc3ogPDwgIiBpcyBub3QgYmxvY2sgYWxpZ25lZCI7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICBpbnQgbnVtX3RocmVhZHMgPSBrTnVtVGhyZWFkczsKKworICAgIHN0ZDo6dmVjdG9yPHN0ZDo6ZnV0dXJlPGJvb2w+PiB0aHJlYWRzOworICAgIG9mZl90IHN0YXJ0X29mZnNldCA9IDA7CisgICAgY29uc3QgaW50IHNraXBfYmxvY2tzID0gbnVtX3RocmVhZHM7CisKKyAgICB3aGlsZSAobnVtX3RocmVhZHMpIHsKKyAgICAgICAgdGhyZWFkcy5lbXBsYWNlX2JhY2soc3RkOjphc3luYyhzdGQ6OmxhdW5jaDo6YXN5bmMsICZDcmVhdGVTbmFwc2hvdDo6UmVhZEJsb2NrcywgdGhpcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydF9vZmZzZXQsIHNraXBfYmxvY2tzLCBkZXZfc3opKTsKKyAgICAgICAgc3RhcnRfb2Zmc2V0ICs9IGtCbG9ja1NpemVUb1JlYWQ7CisgICAgICAgIG51bV90aHJlYWRzIC09IDE7CisgICAgICAgIGlmIChzdGFydF9vZmZzZXQgPj0gZGV2X3N6KSB7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0KKworICAgIGJvb2wgcmV0ID0gdHJ1ZTsKKyAgICBmb3IgKGF1dG8mIHQgOiB0aHJlYWRzKSB7CisgICAgICAgIHJldCA9IHQuZ2V0KCkgJiYgcmV0OworICAgIH0KKworICAgIGlmIChyZXQgJiYgY3JlYXRlX3NuYXBzaG90X3BhdGNoXyAmJiAhV3JpdGVWM1NuYXBzaG90cygpKSB7CisgICAgICAgIExPRyhFUlJPU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zIGhlYWRlcjsKKyAgICBpZiAoIVJlYWRDb3dIZWFkZXIoZmQsICZoZWFkZXIpKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgInBhcnNlIGhlYWRlciBmYWlsZWQiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgc3dpdGNoIChoZWFkZXIucHJlZml4Lm1ham9yX3ZlcnNpb24pIHsKKyAgICAgICAgY2FzZSAxOgorICAgICAgICBjYXNlIDI6CisgICAgICAgICAgICByZXR1cm4gU2hvd1Jhd09wU3RyZWFtVjIoZmQsIGhlYWRlcik7CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJ1bmtub3duIENPVyB2ZXJzaW9uOiAiIDw8IGhlYWRlci5wcmVmaXgubWFqb3JfdmVyc2lvbjsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9Cit9CisKK3N0YXRpYyBib29sIEluc3BlY3QoY29uc3Qgc3RkOjpzdHJpbmcmIHBhdGgpIHsKKyAgICB1bmlxdWVfZmQgZmQob3BlbihwYXRoLmNfc3RyKCksIE9fUkRPTkxZKSk7CiAgICAgaWYgKGZkIDwgMCkgewogICAgICAgICBQTE9HKEVSUk9SKSA8PCAib3BlbiBmYWlsZWQ6ICIgPDwgcGF0aDsKICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgIH0KIAorICAgIHVuaXF1ZV9mZCBleHRyYWN0X3RvOworICAgIGlmICghRkxBR1NfZXh0cmFjdF90by5lbXB0eSgpKSB7CisgICAgICAgIGV4dHJhY3RfdG8ucmVzZXQob3BlbihGTEFHU19leHRyYWN0X3RvLmNfc3RyKCksIE9fUkRXUiB8IE9fQ1JFQVQgfCBPX1RSVU5DLCAwNjY0KSk7CisgICAgICAgIGlmIChleHRyYWN0X3RvIDwgMCkgeworICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgImNvdWxkIG5vdCBvcGVuICIgPDwgRkxBR1NfZXh0cmFjdF90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Jlc3MgfHwgZXh0cmFjdF90byA+PSAwKSAmJiBvcC0+dHlwZSgpID09IGtDb3dSZXBsYWNlT3ApIHsKKyAgICAgICAgICAgIGlmIChyZWFkZXIuUmVhZERhdGEob3AsIGJ1ZmZlci5kYXRhKCksIGJ1ZmZlci5zaXplKCkpIDwgMCkgeworICAgICAgICAgICAgICAgIHN0ZDo6Y2VyciA8PCAiRmFpbGVkIHRvIGRlY29tcHJlc3MgZm9yIDoiIDw8ICpvcCA8PCAiXG4iOwogICAgICAgICAgICAgICAgIHN1Y2Nlc3MgPSBmYWxzZTsKLSAgICAgICAgICAgICAgICBpZiAob3B0LnNob3dfYmFkKSBTaG93QmFkKHJlYWRlciwgb3ApOworICAgICAgICAgICAgICAgIGlmIChGTEFHU19zaG93X2JhZF9kYXRhKSBTaG93QmFkKHJlYWRlciwgb3ApOwogICAgICAgICAgICAgfQotICAgICAgICAgICAgc2luay5SZXNldCgpOworICAgICAgICAgICAgaWYgKGV4dHJhY3RfdG8gPj0gMCkgeworICAgICAgICAgICAgICAgIG9mZl90IG9mZnNldCA9IHVpbnQ2NF90KG9wLT5uZXdfYmxvY2spICogaGVhZGVyLmJsb2NrX3NpemU7CisgICAgICAgICAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpXcml0ZUZ1bGx5QXRPZmZzZXQoZXh0cmFjdF90bywgYnVmZmVyLmRhdGEoKSwgYnVmZmVyLnNpemUoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZmZzZXQpKSB7CisgICAgICAgICAgICAgICAgICAgIFBMT0coRVJST1IpIDw8ICJmYWlsZWQgdG8gd3JpdGUgYmxvY2sgIiA8PCBvcC0+bmV3X2Jsb2NrOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9IGVsc2UgaWYgKGV4dHJhY3RfdG8gPj0gMCAmJiA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AgICAgICAgIH0KLSAgICAgICAgICAgIGlmICghb3B0LnNpbGVudCkgewotICAgICAgICAgICAgICAgIHN0ZDo6Y291dCA8PCAiU2VxdWVuY2UgZm9yICIgPDwgb3AgPDwgIiBpcyA6XG4iOworICAgICAgICAgICAgaWYgKCFGTEFHU19zaWxlbnQpIHsKKyAgICAgICAgICAgICAgICBzdGQ6OmNvdXQgPDwgIlNlcXVlbmNlIGZvciAiIDw8ICpvcCA8PCAiIGlzIDpcbiI7CiAgICAgICAgICAgICAgICAgZm9yIChzaXplX3QgaSA9IDA7IGkgPCBzZXFfbGVuOyBpKyspIHsKICAgICAgICAgICAgICAgICAgICAgc3RkOjpjb3V0IDw8IHN0ZDo6c2V0ZmlsbCgnMCcpIDw8IHN0ZDo6c2V0dyg2KSA8PCBtZXJnZV9vcF9ibG9ja3NbaV0gPDwgIiwgIjsKICAgICAgICAgICAgICAgICAgICAgaWYgKChpICsgMSkgJSAxMCA9PSAwIHx8IGkgKyAxID09IHNlcV9sZW4pIHN0ZDo6Y291dCA8PCAiXG4iOwpAQCAtMTg4LDI0ICsyMzYsMjYgQEAKICAgICAgICAgICAgIH0KICAgICAgICAgfQogCi0gICAgICAgIGlmIChvcC50eXBlID09IGtDb3dDb3B5T3ApIHsKKyAgICAgICAgaWYgKG9wLT50eXBlKCkgPT0ga0Nvd0NvcHlPcCkgewogICAgICAgICAgICAgY29weV9vcHMrKzsKLSAgICAgICAgfSBlbHNlIGlmIChvcC50eXBlID09IGtDb3dSZXBsYWNlT3ApIHsKKyAgICAgICAgfSBlbHNlIGlmIChvcC0+dHlwZSgpID09IGtDb3dSZXBsYWNlT3ApIHsKICAgICAgICAgICAgIHJlcGxhY2Vfb3BzKys7Ci0gICAgICAgIH0gZWxzZSBpZiAob3AudHlwZSA9PSBrQ293WmVyb09wKSB7CisgICAgICAgIH0gZWxzZSBpZiAob3AtPnR5cGUoKSA9PSBrQ293WmVyb09wKSB7CiAgICAgICAgICAgICB6ZXJvX29wcysrOwotIC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6OnNuYXBzaG90OjpNZXJnZTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIGNhc2UgJ28nOgotICAgICAgICAgICAgICAgIG9wdC5zaG93X3NlcSA9IHRydWU7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICBjYXNlICdsJzoKLSAgICAgICAgICAgICAgICBvcHQuc2hvd19vcHMgPSB0cnVlOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgY2FzZSAndic6Ci0gICAgICAgICAgICAgICAgb3B0LnZlcmlmeV9zZXF1ZW5jZSA9IHRydWU7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICBjYXNlICdhJzoKLSAgICAgICAgICAgICAgICBvcHQuaW5jbHVkZV9tZXJnZWQgPSB0cnVlOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgZGVmYXVsdDoKLSAgICAgICAgICAgICAgICBhbmRyb2lkOjpzbmFwc2hvdDo6dXNhZ2UoKTsKLSAgICAgICAgfQotICAgIH0KLSAgICBhbmRyb2lkOjpiYXNlOjpJbml0TG9nZ2luZyhhcmd2LCBhbmRyb2lkOjpzbmFwc2hvdDo6TXlMb2dnZXIpOworICAgIGdmbGFnczo6UGFyc2VDb21tYW5kTGluZUZsYWdzKCZhcmdjLCAmYXJndiwgdHJ1ZSk7CiAKLSAgICBpZiAoYXJnYyA8IG9wdGluZCArIDEpIHsKLSAgICAgICAgYW5kcm9pZDo6c25hcHNob3Q6OnVzYWdlKCk7CisgICAgaWYgKGFyZ2MgPCAyKSB7CisgICAgICAgIGdmbGFnczo6U2hvd1VzYWdlV2l0aEZsYWdzKGFyZ3ZbMF0pOworICAgICAgICByZXR1cm4gMTsKKyAgICB9CisgICAgaWYgKEZMQUdTX29yZGVyICE9ICIiICYmIEZMQUdTX29yZGVyICE9ICJtZXJnZSIgJiYgRkxBR1Nfb3JkZXIgIT0gInJldmVyc2UtbWVyZ2U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YWQgb3AgZmFpbGVkIjsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICAvLyBQYXJzZSBjdXJyZW50IGNsdXN0ZXIgdG8gZmluZCBzdGFydCBvZiBuZXh0IGNsdXN0ZXIKKyAgICAgICAgd2hpbGUgKGN1cnJlbnRfb3BfbnVtIDwgb3BzX2J1ZmZlci0+c2l6ZSgpKSB7CisgICAgICAgICAgICBhdXRvJiBjdXJyZW50X29wID0gb3BzX2J1ZmZlci0+ZGF0YSgpW2N1cnJlbnRfb3BfbnVtXTsKKyAgICAgICAgICAgIGN1cnJlbnRfb3BfbnVtKys7CisgICAgICAgICAgICBpZiAoY3VycmVudF9vcC50eXBlID09IGtDb3dYb3JPcCkgeworICAgICAgICAgICAgICAgIHhvcl9kYXRhX2xvYy0+aW5zZXJ0KHtjdXJyZW50X29wLm5ld19ibG9jaywgZGF0YV9wb3N9KTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHBvcyArPSBzaXplb2YoQ293T3BlcmF0aW9uVjIpICsgR2V0TmV4dE9wT2Zmc2V0KGN1cnJlbnRfb3AsIGhlYWRlcl8uY2x1c3Rlcl9vcHMpOworICAgICAgICAgICAgZGF0YV9wb3MgKz0gY3VycmVudF9vcC5kYXRhX2xlbmd0aCArIEdldE5leHREYXRhT2Zmc2V0KGN1cnJlbnRfb3AsIGhlYWRlcl8uY2x1c3Rlcl9vcHMpOworCisgICAgICAgICAgICBpZiAoY3VycmVudF9vcC50eXBlID09IGtDb3dDbHVzdGVyT3ApIHsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VycmVudF9vcC50eXBlID09IGtDb3dMYWJlbE9wKSB7CisgICAgICAgICAgICAgICAgbGFzdF9sYWJlbF8gPSB7Y3VycmVudF9vcC5zb3VyY2V9OworCisgICAgICAgICAgICAgICAgLy8gSWYgd2UgcmVhY2ggdGhlIHJlcXVlc3RlZCBsYWJlbCwgc3RvcCByZWFkaW5nLgorICAgICAgICAgICAgICAgIGlmIChsYWJlbCAmJiBsYWJlbC52YWx1ZSgpID09IGN1cnJlbnRfb3Auc291cmNlKSB7CisgICAgICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IGVsc2UgaWYgKGN1cnJlbnRfb3AudHlwZSA9PSBrQ293Rm9vdGVyT3ApIHsKKyAgICAgICAgICAgICAgICBmb290ZXJfLmVtcGxhY2UoKTsKKyAgICAgICAgICAgICAgICBDb3dGb290ZXIqIGZvb3RlciA9ICZmb290ZXJfLnZhbHVlKCk7CisgICAgICAgICAgICAgICAgbWVtY3B5KCZmb290ZXJfLT5vcCwgJmN1cnJlbnRfb3AsIHNpemVvZihmb290ZXItPm9wKSk7CisgICAgICAgICAgICAgICAgb2ZmX3Qgb2ZmcyA9IGxzZWVrKGZkLmdldCgpLCBwb3MsIFNFRUtfU0VUKTsKKyAgICAgICAgICAgICAgICBpZiAob2ZmcyA8IDAgfHwgcG9zICE9IHN0YXRpY19jYXN0PHVpbnQ2NF90PihvZmZzKSkgeworICAgICAgICAgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAibHNlZWsgbmV4dCBvcCBmYWlsZWQgIiA8PCBvZmZzOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmICghYW5kcm9pZDo6YmFzZTo6UmVhZEZ1bGx5KGZkLCAmZm9vdGVyLT51bnVzZWQsIHNpemVvZihmb290ZXItPnVudXNlZCkpKSB7CisgICAgICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkNvdWxkIG5vdCByZWFkIENPVyBmb290ZXIiOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgLy8gRHJvcCB0aGUgZm9vdGVyIGZyb20gdGhlIG9wIHN0cmVhbS4KKyAgICAgICAgICAgICAgICBjdXJyZW50X29wX251bS0tOworICAgICAgICAgICAgICAgIGRvbmUgPSB0cnVlOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICB9CisKKyAgICAgICAgLy8gUG9zaXRpb24gZm9yIG5leHQgY2x1c3RlciByZWFkCisgICAgICAgIG9mZl90IG9mZnMgPSBsc2VlayhmZC5nZXQoKSwgcG9zLCBTRUVLX1NFVCk7CisgICAgICAgIGlmIChvZmZzIDwgMCB8fCBwb3MgIT0gc3RhdGljX2Nhc3Q8dWludDY0X3Q+KG9mZnMpKSB7CisgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAibHNlZWsgbmV4dCBvcCBmYWlsZWQgIiA8PCBvZmZzOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIG9wc19idWZmZXItPnJlc2l6ZShjdXJyZW50X29wX251bSk7CisgICAgfQorCisgICAgTE9HKERFQlVHKSA8PCAiQ09XIGZpbGUgcmVhZCBjb21wbGV0ZS4gVG90YWwgb3BzOiAiIDw8IG9wc19idWZmZXItPnNpemUoKTsKKyAgICAvLyBUbyBzdWNjZXNzZnVsbHkgcGFyc2UgYSBDT1cgZmlsZSwgd2UgbmVlZCBlaXRoZXI6CisgICAgLy8gICgxKSBhIGxhYmVsIHRvIHJlYWQgdXAgdG8sIGFuZCBmb3IgdGhhdCBsYWJlbCB0byBiZSBmb3VuZCwgb3IKKyAgICAvLyAgKDIpIGEgdmFsaWQgZm9vdGVyLgorICAgIGlmIChsYWJlbCkgeworICAgICAgICBpZiAoIWxhc3RfbGFiZWxfKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJEaWQgbm90IGZpbmQgbGFiZWwgIiA8PCBsYWJlbC52YWx1ZSgpCisgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgd2hpbGUgcmVhZGluZyBDT1cgKG5vIGxhYmVscyBmb3VuZCkiOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIGlmIChsYXN0X2xhYmVsXy52YWx1ZSgpICE9IGxhYmVsLnZhbHVlKCkpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkRpZCBub3QgZmluZCBsYWJlbCAiIDw8IGxhYmVsLnZhbHVlKCkKKyAgICAgICAgICAgICAgICAgICAgICAgPDwgIiwgbGFzdCBsYWJlbD0iIDw8IGxhc3RfbGFiZWxfLnZhbHVlKCk7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICB9IGVsc2UgaWYgKCFmb290ZXJfKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgIk5vIENPVyBmb290ZXIgZm91bmQiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgdWludDhfdCBjc3VtWzMyXTsKKyAgICBtZW1zZXQoY3N1bSwgMCwgc2l6ZW9mKHVpbnQ4X3QpICogMzIpOworCisgICAgaWYgKGZvb3Rlcl8pIHsKKyAgICAgICAgaWYgKG9wc19idWZmZXItPnNpemUoKSAhPSBmb290ZXJfLT5vcC5udW1fb3BzKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJudW0gb3BzIGRvZXMgbm90IG1hdGNoLCBleHBlY3RlZCAiIDw8IGZvb3Rlcl8tPm9wLm51bV9vcHMgPDwgIiwgZm91bmQgIgorICAgICAgICAgICAgICAgICAgICAgICA8PCBvcHNfYnVmZmVyLT5zaXplKCk7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgaWYgKG9wc19idWZmZXItPnNpemUoKSAqIHNpemVvZihDb3dPcGVyYXRpb25WMikgIT0gZm9vdGVyXy0+b3Aub3BzX3NpemUpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIm9wcyBzaXplIGRvZXMgbm90IG1hdGNoICI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worICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIG5ld19vcC5uZXdfYmxvY2sgPSB2Ml9vcC5uZXdfYmxvY2s7CisKKyAgICAgICAgdWludDY0X3Qgc291cmNlX2luZm8gPSB2Ml9vcC5zb3VyY2U7CisgICAgICAgIGlmIChuZXdfb3AudHlwZSgpICE9IGtDb3dMYWJlbE9wKSB7CisgICAgICAgICAgICBzb3VyY2VfaW5mbyAmPSBrQ293T3BTb3VyY2VJbmZvRGF0YU1hc2s7CisgICAgICAgICAgICBpZiAoc291cmNlX2luZm8gIT0gdjJfb3Auc291cmNlKSB7CisgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiT3V0LW9mLXJhbmdlIHNvdXJjZSB2YWx1ZSBpbiBDT1cgb3A6ICIgPDwgdjJfb3A7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGlmICh2Ml9vcC5jb21wcmVzc2lvbiAhPSBrQ293Q29tcHJlc3NOb25lKSB7CisgICAgICAgICAgICBpZiAoaGVhZGVyXy5jb21wcmVzc2lvbl9hbGdvcml0aG0gPT0ga0Nvd0NvbXByZXNzTm9uZSkgeworICAgICAgICAgICAgICAgIGhlYWRlcl8uY29tcHJlc3Npb25fYWxnb3JpdGhtID0gdjJfb3AuY29tcHJlc3Npb247CisgICAgICAgICAgICB9IGVsc2UgaWYgKGhlYWRlcl8uY29tcHJlc3Npb25fYWxnb3JpdGhtICE9IHYyX29wLmNvbXByZXNzaW9uKSB7CisgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ09XIGhhcyBtaXhlZCBjb21wcmVzc2lvbiB0eXBlcyB3aGljaCBpcyBub3Qgc3VwcG9ydGVkOyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgcHJldmlvdXNseSBzYXcgIiA8PCBoZWFkZXJfLmNvbXByZXNzaW9uX2FsZ29yaXR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gICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICB9CisKKyAgICByZXR1cm4gUGFyc2VPcHMoZmQsIG9wX2luZGV4LnZhbHVlKCkpOworfQorCitib29sIENvd1BhcnNlclYzOjpSZWFkUmVzdW1lQnVmZmVyKGJvcnJvd2VkX2ZkIGZkKSB7CisgICAgcmVzdW1lX3BvaW50c18gPSBzdGQ6Om1ha2Vfc2hhcmVkPHN0ZDo6dmVjdG9yPFJlc3VtZVBvaW50Pj4oaGVhZGVyXy5yZXN1bWVfcG9pbnRfY291bnQpOworCisgICAgcmV0dXJuIGFuZHJvaWQ6OmJhc2U6OlJlYWRGdWxseUF0T2Zmc2V0KGZkLCByZXN1bWVfcG9pbnRzXy0+ZGF0YSgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXJfLnJlc3VtZV9wb2ludF9jb3VudCAqIHNpemVvZihSZXN1bWVQb2ludCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdldFJlc3VtZU9mZnNldChoZWFkZXJfKSk7Cit9CisKK3N0ZDo6b3B0aW9uYWw8dWludDMyX3Q+IENvd1BhcnNlclYzOjpGaW5kUmVzdW1lT3AoY29uc3QgdWludDY0X3QgbGFiZWwpIHsKKyAgICBmb3IgKGF1dG8mIHJlc3VtZV9wb2ludCA6ICpyZXN1bWVfcG9pbnRzXykgeworICAgICAgICBpZiAocmVzdW1lX3BvaW50LmxhYmVsID09IGxhYmVsKSB7CisgICAgICAgICAgICByZXR1cm4gcmVzdW1lX3BvaW50Lm9wX2luZGV4OworICAgICAgICB9CisgICAgfQorICAgIExPRyhFUlJPUikgPDwgImZhaWxlZCB0byBmaW5kIGxhYmVsOiAiIDw8IGxhYmVsIDw8ICJmcm9tIGZvbGxvd2luZyBsYWJlbHMiOworICAgIExPRyhFUlJPUikgPDwgYW5kcm9pZDo6YmFzZTo6Sm9pbigqcmVzdW1lX3BvaW50c18sIC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XIuYmxvY2tfc2l6ZTsKKworICAgIC8vIFBvcHVsYXRlIHRoZSBvcGVyYXRpb24gbWFwLgorICAgIG9wX2l0ZXJfID0gY293Xy0+R2V0T3BJdGVyKGZhbHNlKTsKKyAgICB3aGlsZSAoIW9wX2l0ZXJfLT5BdEVuZCgpKSB7CisgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogb3AgPSBvcF9pdGVyXy0+R2V0KCk7CisgICAgICAgIGlmIChJc01ldGFkYXRhT3AoKm9wKSkgeworICAgICAgICAgICAgb3BfaXRlcl8tPk5leHQoKTsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisKKyAgICAgICAgc2l6ZV90IG51bV9ibG9ja3MgPSAxOworICAgICAgICBpZiAob3AtPnR5cGUoKSA9PSBrQ293UmVwbGFjZU9wKSB7CisgICAgICAgICAgICBudW1fYmxvY2tzID0gKENvd09wQ29tcHJlc3Npb25TaXplKG9wLCBibG9ja19zaXplXykgLyBibG9ja19zaXplXyk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKG9wLT5uZXdfYmxvY2sgPj0gb3BzXy5zaXplKCkpIHsKKyAgICAgICAgICAgIG9wc18ucmVzaXplKG9wLT5uZXdfYmxvY2sgKyBudW1fYmxvY2tzLCBudWxscHRyKTsKKyAgICAgICAgfQorCisgICAgICAgIHNpemVfdCB2ZWNfaW5kZXggPSBvcC0+bmV3X2Jsb2NrOworICAgICAgICB3aGlsZSAobnVtX2Jsb2NrcykgeworICAgICAgICAgICAgb3BzX1t2ZWNfaW5kZXhdID0gb3A7CisgICAgICAgICAgICBudW1fYmxvY2tzIC09IDE7CisgICAgICAgICAgICB2ZWNfaW5kZXggKz0gMTsKKyAgICAgICAgfQorICAgICAgICBvcF9pdGVyXy0+TmV4dCgpOworICAgIH0KK30KKworLy8gTm90IHN1cHBvcnRlZC4KK2Jvb2wgQ29tcHJlc3NlZFNuYXBzaG90UmVhZGVyOjpPcGVuKGNvbnN0IGNoYXIqLCBpbnQsIG1vZGVfdCkgeworICAgIGVycm5vID0gRUlOVkFMOworICAgIHJldHVybiBmYWxzZTsKK30KKworYm9vbCBDb21wcmVzc2VkU25hcHNob3RSZWFkZXI6Ok9wZW4oY29uc3QgY2hhciosIGludCkgeworICAgIGVycm5vID0gRUlOVkFMOworICAgIHJldHVybiBmYWxzZTsKK30KKworc3NpemVfdCBDb21wcmVzc2VkU25hcHNob3RSZWFkZXI6OldyaXRlKGNvbnN0IHZvaWQqLCBzaXplX3QpIHsKKyAgICBlcnJubyA9IEVJTlZBTDsKKyAgICByZXR1cm4gZmFsc2U7Cit9CisKK2Jvb2wgQ29tcHJlc3NlZFNuYXBzaG90UmVhZGVyOjpCbGtJb2N0bChpbnQsIHVpbnQ2NF90LCB1aW50NjRfdCwgaW50KikgeworICAgIGVycm5vID0gRUlOVkFMOworICAgIHJldHVybiBmYWxzZTsKK30KKworYm9ycm93ZWRfZmQgQ29tcHJlc3NlZFNuYXBzaG90UmVhZGVyOjpHZXRTb3VyY2VGZCgpIHsKKyAgICBpZiAoc291cmNlX2ZkXyA8IDApIHsKKyAgICAgICAgaWYgKCFzb3VyY2VfZGV2aWNlXykgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ29tcHJlc3NlZFNuYXBzaG90UmVhZGVyIG5lZWRzIHNvdXJjZSBkZXZpY2UsIGJ1dCBub25lIHdhcyBzZXQiOworICAgICAgICAgICAgZXJybm8gPSBFSU5WQUw7CisgICAgICAgICAgICByZXR1cm4gey0xfTsKKyAgICAgICAgfQorICAgICAgICBzb3VyY2VfZmRfLnJlc2V0KG9wZW4oc291cmNlX2RldmljZV8tPmNfc3RyKCksIE9fUkRPTkxZIHwgT19DTE9FWEVDKSk7CisgICAgICAgIGlmIChzb3VyY2VfZmRfIDwgMCkgeworICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIm9wZW4gIiA8PCAqc291cmNlX2RldmljZV87CisgICAgICAgICAgICByZXR1cm4gey0xfTsKKyAgICAgICAgfQor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gICAgICBzc2l6ZV90IHJ2ID0gUmVhZEJsb2NrKGNodW5rLCAwLCBidWZfcG9zLCBidWZfcmVtYWluaW5nKTsKKyAgICAgICAgaWYgKHJ2IDwgMCkgeworICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICB9CisgICAgICAgIG9mZnNldF8gKz0gcnY7CisgICAgICAgIGJ1Zl9wb3MgKz0gcnY7CisgICAgICAgIGJ1Zl9yZW1haW5pbmcgLT0gcnY7CisgICAgfQorCisgICAgaWYgKGJ1Zl9yZW1haW5pbmcpIHsKKyAgICAgICAgc3NpemVfdCBydiA9IFJlYWRCbG9jayhlbmRfY2h1bmssIDAsIGJ1Zl9wb3MsIGJ1Zl9yZW1haW5pbmcpOworICAgICAgICBpZiAocnYgPCAwKSB7CisgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIH0KKyAgICAgICAgb2Zmc2V0XyArPSBydjsKKyAgICAgICAgYnVmX3BvcyArPSBydjsKKyAgICAgICAgYnVmX3JlbWFpbmluZyAtPSBydjsKKyAgICB9CisKKyAgICBDSEVDS19FUShidWZfcG9zIC0gcmVpbnRlcnByZXRfY2FzdDx1aW50OF90Kj4oYnVmKSwgY291bnQpOworICAgIENIRUNLX0VRKGJ1Zl9yZW1haW5pbmcsIDApOworCisgICAgZXJybm8gPSAwOworICAgIHJldHVybiBjb3VudDsKK30KKworc3NpemVfdCBDb21wcmVzc2VkU25hcHNob3RSZWFkZXI6OlJlYWRCbG9jayh1aW50NjRfdCBjaHVuaywgc2l6ZV90IHN0YXJ0X29mZnNldCwgdm9pZCogYnVmZmVyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplX3QgYnVmZmVyX3NpemUpIHsKKyAgICBzaXplX3QgYnl0ZXNfdG9fcmVhZCA9IHN0ZDo6bWluKHN0YXRpY19jYXN0PHNpemVfdD4oYmxvY2tfc2l6ZV8pLCBidWZmZXJfc2l6ZSk7CisKKyAgICAvLyBUaGUgb2Zmc2V0IGlzIHJlbGF0aXZlIHRvIHRoZSBjaHVuazsgd2Ugc2hvdWxkIGJlIHJlYWRpbmcgbm8gbW9yZSB0aGFuCisgICAgLy8gb25lIGNodW5rLgorICAgIENIRUNLKHN0YXJ0X29mZnNldCArIGJ5dGVzX3RvX3JlYWQgPD0gYmxvY2tfc2l6ZV8pOworCisgICAgY29uc3QgQ293T3BlcmF0aW9uKiBvcCA9IG51bGxwdHI7CisgICAgaWYgKGNodW5rIDwgb3BzXy5zaXplKCkpIHsKKyAgICAgICAgb3AgPSBvcHNfW2NodW5rXTsKKyAgICB9CisKKyAgICBpZiAoIW9wIHx8IG9wLT50eXBlKCkgPT0ga0Nvd0NvcHlPcCkgeworICAgICAgICBib3Jyb3dlZF9mZCBmZCA9IEdldFNvdXJjZUZkKCk7CisgICAgICAgIGlmIChmZCA8IDApIHsKKyAgICAgICAgICAgIC8vIEdldFNvdXJjZUZkIHNldHMgZXJybm8uCisgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIH0KKworICAgICAgICBpZiAob3ApIHsKKyAgICAgICAgICAgIHVpbnQ2NF90IHNvdXJjZV9vZmZzZXQ7CisgICAgICAgICAgICBpZiAoIWNvd18tPkdldFNvdXJjZU9mZnNldChvcCwgJnNvdXJjZV9vZmZzZXQpKSB7CisgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiR2V0U291cmNlT2Zmc2V0IGZhaWxlZCBpbiBDb21wcmVzc2VkU25hcHNob3RSZWFkZXIgZm9yIG9wOiAiIDw8ICpvcDsKKyAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBjaHVuayA9IEdldEJsb2NrRnJvbU9mZnNldChjb3dfLT5HZXRIZWFkZXIoKSwgc291cmNlX29mZnNldCk7CisgICAgICAgIH0KKworICAgICAgICBvZmY2NF90IG9mZnNldCA9IChjaHVuayAqIGJsb2NrX3NpemVfKSArIHN0YXJ0X29mZnNldDsKKyAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpSZWFkRnVsbHlBdE9mZnNldChmZCwgYnVmZmVyLCBieXRlc190b19yZWFkLCBvZmZzZXQpKSB7CisgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAicmVhZCAiIDw8ICpzb3VyY2VfZGV2aWNlXzsKKyAgICAgICAgICAgIC8vIFJlYWRGdWxseUF0T2Zmc2V0IHNldHMgZXJybm8uCisgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIH0KKyAgICB9IGVsc2UgaWYgKG9wLT50eXBlKCkgPT0ga0Nvd1plcm9PcCkgeworICAgICAgICBtZW1zZXQoYnVmZmVyLCAwLCBieXRlc190b19yZWFkKTsKKyAgICB9IGVsc2UgaWYgKG9wLT50eXBlKCkgPT0ga0Nvd1JlcGxhY2VPcCkgeworICAgICAgICBzaXplX3QgYnVmZmVyX3NpemUgPSBDb3dPcENvbXByZXNzaW9uU2l6ZShvcCwgYmxvY2tfc2l6ZV8pOworICAgICAgICB1aW50OF90IHRlbXBfYnVmZmVyW2J1ZmZlcl9zaXplXTsKKyAgICAgICAgaWYgKGNvd18tPlJlYWREYXRhKG9wLCB0ZW1wX2J1ZmZlciwgYnVmZmVyX3NpemUsIDApIDwgYnVmZmVyX3NpemUpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkNvbXByZXNzZWRTbmFwc2hvdFJlYWRlciBmYWlsZWQgdG8gcmVhZCByZXBsYWNlIG9wOiBidWZmZXJfc2l6ZTogIgorICAgICAgICAgICAgICAgICAgICAgICA8PCBidWZmZXJfc2l6ZSA8PCAic3RhcnRfb2Zmc2V0OiAiIDw8IHN0YXJ0X29mZnNldDsKKyAgICAgICAgICAgIGVycm5vID0gRUlPOworICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICB9CisgICAgICAgIG9mZl90IGJsb2NrX29mZnNldHt9OworICAgICAgICBpZiAoIUdldEJsb2NrT2Zmc2V0KG9wLCBjaHVuaywgYm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ikgPDwgInJlYWQgIiA8PCAqc291cmNlX2RldmljZV87CisgICAgICAgICAgICAvLyBSZWFkRnVsbHlBdE9mZnNldCBzZXRzIGVycm5vLgorICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICB9CisKKyAgICAgICAgaWYgKGNvd18tPlJlYWREYXRhKG9wLCBidWZmZXIsIGJ5dGVzX3RvX3JlYWQsIHN0YXJ0X29mZnNldCkgPCBieXRlc190b19yZWFkKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJDb21wcmVzc2VkU25hcHNob3RSZWFkZXIgZmFpbGVkIHRvIHJlYWQgeG9yIG9wIjsKKyAgICAgICAgICAgIGVycm5vID0gRUlPOworICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICB9CisKKyAgICAgICAgZm9yIChzaXplX3QgaSA9IDA7IGkgPCBieXRlc190b19yZWFkOyBpKyspIHsKKyAgICAgICAgICAgICgoY2hhciopYnVmZmVyKVtpXSBePSBkYXRhW2ldOworICAgICAgICB9CisgICAgfSBlbHNlIHsKKyAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ29tcHJlc3NlZFNuYXBzaG90UmVhZGVyIHVua25vd24gb3AgdHlwZTogIiA8PCB1aW50MzJfdChvcC0+dHlwZSgpKTsKKyAgICAgICAgZXJybm8gPSBFSU5WQUw7CisgICAgICAgIHJldHVybiAtMTsKKyAgICB9CisKKyAgICAvLyBNZW1vcnlCeXRlU2luayBkb2Vzbid0IGRvIGFueXRoaW5nIGluIFJldHVybkJ1ZmZlciwgc28gZG9uJ3QgYm90aGVyIGNhbGxpbmcgaXQuCisgICAgcmV0dXJuIGJ5dGVzX3RvX3JlYWQ7Cit9CisKK29mZjY0X3QgQ29tcHJlc3NlZFNuYXBzaG90UmVhZGVyOjpTZWVrKG9mZjY0X3Qgb2Zmc2V0LCBpbnQgd2hlbmNlKSB7CisgICAgc3dpdGNoICh3aGVuY2UpIHsKKyAgICAgICAgY2FzZSBTRUVLX1NFVDoKKyAgICAgICAgICAgIG9mZnNldF8gPSBvZmZzZXQ7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBTRUVLX0VORDoKKyAgICAgICAgICAgIG9mZnNldF8gPSBzdGF0aWNfY2FzdDxvZmY2NF90PihibG9ja19kZXZpY2Vfc2l6ZV8pICsgb2Zmc2V0OworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgU0VFS19DVVI6CisgICAgICAgICAgICBvZmZzZXRfICs9IG9mZnNldDsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiVW5yZWNvZ25pemVkIHNlZWsgd2hlbmNlOiAiIDw8IHdoZW5jZTsKKyAgICAgICAgICAgIGVycm5vID0gRUlOVkFMOworICAgICAgICAgICAgcmV0dXJuIC0xOworICAgIH0KKyAgICByZXR1cm4gb2Zmc2V0XzsKK30KKwordWludDY0X3QgQ29tcHJlc3NlZFNuYXBzaG90UmVhZGVyOjpCbG9ja0RldlNpemUoKSB7CisgICAgcmV0dXJuIGJsb2NrX2RldmljZV9zaXplXzsKK30KKworYm9vbCBDb21wcmVzc2VkU25hcHNob3RSZWFkZXI6OkNsb3NlKCkgeworICAgIGNvd18gPSBudWxscHRyOworICAgIHNvdXJjZV9mZF8gPSB7fTsKKyAgICByZXR1cm4gdHJ1ZTsKK30KKworYm9vbCBDb21wcmVzc2VkU25hcHNob3RSZWFkZXI6OklzU2V0dGluZ0Vycm5vKCkgeworICAgIHJldHVybiB0cnVlOworfQorCitib29sIENvbXByZXNzZWRTbmFwc2hvdFJlYWRlcjo6SXNPcGVuKCkgeworICAgIHJldHVybiBjb3dfICE9IG51bGxwdHI7Cit9CisKK2Jvb2wgQ29tcHJlc3NlZFNuYXBzaG90UmVhZGVyOjpGbHVzaCgpIHsKKyAgICByZXR1cm4gdHJ1ZTsKK30KKworfSAgLy8gbmFtZXNwYWNlIHNuYXBzaG90Cit9ICAvLyBuYW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IEFTU0VSVF9UUlVFKHJlYWRlci5HZXRGb290ZXIoJmZvb3RlcikpOworICAgIEFTU0VSVF9FUShmb290ZXIub3AubnVtX29wcywgMTAwKTsKKworICAgIGF1dG8gaXRlciA9IHJlYWRlci5HZXRPcEl0ZXIoKTsKKyAgICBBU1NFUlRfTkUoaXRlciwgbnVsbHB0cik7CisgICAgQVNTRVJUX0ZBTFNFKGl0ZXItPkF0RW5kKCkpOworCisgICAgc2l6ZV90IGkgPSAwOworICAgIHdoaWxlICghaXRlci0+QXRFbmQoKSkgeworICAgICAgICBhdXRvIG9wID0gaXRlci0+R2V0KCk7CisgICAgICAgIEFTU0VSVF9FUShvcC0+dHlwZSgpLCBrQ293Q29weU9wKTsKKyAgICAgICAgQVNTRVJUX0VRKG9wLT5kYXRhX2xlbmd0aCwgMCk7CisgICAgICAgIEFTU0VSVF9FUShvcC0+bmV3X2Jsb2NrLCAxMCArIGkpOworICAgICAgICBBU1NFUlRfRVEob3AtPnNvdXJjZSgpLCAxMDAwICsgaSk7CisgICAgICAgIGl0ZXItPk5leHQoKTsKKyAgICAgICAgaSArPSAxOworICAgIH0KKworICAgIEFTU0VSVF9FUShpLCAxMDApOworfQorCitURVNUX0YoQ293VGVzdCwgUmVhZFdyaXRlKSB7CisgICAgQ293T3B0aW9ucyBvcHRpb25zOworICAgIG9wdGlvbnMuY2x1c3Rlcl9vcHMgPSAwOworICAgIENvd1dyaXRlclYyIHdyaXRlcihvcHRpb25zLCBHZXRDb3dGZCgpKTsKKworICAgIEFTU0VSVF9UUlVFKHdyaXRlci5Jbml0aWFsaXplKCkpOworCisgICAgc3RkOjpzdHJpbmcgZGF0YSA9ICJUaGlzIGlzIHNvbWUgZGF0YSwgYmVsaWV2ZSBpdCI7CisgICAgZGF0YS5yZXNpemUob3B0aW9ucy5ibG9ja19zaXplLCAnXDAnKTsKKworICAgIEFTU0VSVF9UUlVFKHdyaXRlci5BZGRDb3B5KDEwLCAyMCkpOworICAgIEFTU0VSVF9UUlV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ICAgICAgICAgICBzdGQ6OnN0cmluZyBzaW5rKHhvcl9kYXRhLnNpemUoKSwgJ1wwJyk7CisgICAgICAgICAgICBBU1NFUlRfRVEob3AtPm5ld19ibG9jaywgNTApOworICAgICAgICAgICAgQVNTRVJUX0VRKG9wLT5zb3VyY2UoKSwgOTgzMTQpOyAgLy8gNDA5NiAqIDI0ICsgMTAKKyAgICAgICAgICAgIEFTU0VSVF9UUlVFKFJlYWREYXRhKHJlYWRlciwgb3AsIHNpbmsuZGF0YSgpLCBzaW5rLnNpemUoKSkpOworICAgICAgICAgICAgQVNTRVJUX0VRKHNpbmssIHhvcl9kYXRhKTsKKyAgICAgICAgfQorCisgICAgICAgIGlmIChvcC0+dHlwZSgpID09IGtDb3dSZXBsYWNlT3ApIHsKKyAgICAgICAgICAgIHRvdGFsX2Jsb2NrcyArPSAxOworICAgICAgICAgICAgaWYgKG9wLT5uZXdfYmxvY2sgPT0gMTAwKSB7CisgICAgICAgICAgICAgICAgZGF0YS5yZXNpemUob3B0aW9ucy5ibG9ja19zaXplKTsKKyAgICAgICAgICAgICAgICBzdGQ6OnN0cmluZyBzaW5rKGRhdGEuc2l6ZSgpLCAnXDAnKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfVFJVRShSZWFkRGF0YShyZWFkZXIsIG9wLCBzaW5rLmRhdGEoKSwgc2luay5zaXplKCkpKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luay5zaXplKCksIGRhdGEuc2l6ZSgpKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luaywgZGF0YSk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSA2MDAwKSB7CisgICAgICAgICAgICAgICAgZGF0YTIucmVzaXplKG9wdGlvbnMuYmxvY2tfc2l6ZSk7CisgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcgc2luayhkYXRhMi5zaXplKCksICdcMCcpOworICAgICAgICAgICAgICAgIEFTU0VSVF9UUlVFKFJlYWREYXRhKHJlYWRlciwgb3AsIHNpbmsuZGF0YSgpLCBzaW5rLnNpemUoKSkpOworICAgICAgICAgICAgICAgIEFTU0VSVF9FUShzaW5rLCBkYXRhMik7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSA5MDAwKSB7CisgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcgc2luayhkYXRhMy5zaXplKCksICdcMCcpOworICAgICAgICAgICAgICAgIEFTU0VSVF9UUlVFKFJlYWREYXRhKHJlYWRlciwgb3AsIHNpbmsuZGF0YSgpLCBzaW5rLnNpemUoKSkpOworICAgICAgICAgICAgICAgIEFTU0VSVF9FUShzaW5rLCBkYXRhMyk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpdGVyLT5OZXh0KCk7CisgICAgfQorCisgICAgQVNTRVJUX0VRKHRvdGFsX2Jsb2NrcywgZXhwZWN0ZWRfYmxvY2tzKTsKK30KKworVEVTVF9QKENvbXByZXNzaW9uVGVzdCwgTm9CYXRjaFdyaXRlcykgeworICAgIENvd09wdGlvbnMgb3B0aW9uczsKKyAgICBvcHRpb25zLmNvbXByZXNzaW9uID0gR2V0UGFyYW0oKTsKKyAgICBvcHRpb25zLm51bV9jb21wcmVzc190aHJlYWRzID0gMTsKKyAgICBvcHRpb25zLmNsdXN0ZXJfb3BzID0gMDsKKworICAgIENvd1dyaXRlclYyIHdyaXRlcihvcHRpb25zLCBHZXRDb3dGZCgpKTsKKworICAgIEFTU0VSVF9UUlVFKHdyaXRlci5Jbml0aWFsaXplKCkpOworCisgICAgc3RkOjpzdHJpbmcgZGF0YSA9ICJUZXN0aW5nIHJlcGxhY2Ugb3BzIHdpdGhvdXQgYmF0Y2ggd3JpdGVzIjsKKyAgICBkYXRhLnJlc2l6ZShvcHRpb25zLmJsb2NrX3NpemUgKiAxMDI0LCAnXDAnKTsKKyAgICBBU1NFUlRfVFJVRSh3cml0ZXIuQWRkU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0b3RhbF9ibG9ja3MgKz0gMTsKKyAgICAgICAgICAgIGlmIChvcC0+bmV3X2Jsb2NrID09IDUwKSB7CisgICAgICAgICAgICAgICAgZGF0YS5yZXNpemUob3B0aW9ucy5ibG9ja19zaXplKTsKKyAgICAgICAgICAgICAgICBzdGQ6OnN0cmluZyBzaW5rKGRhdGEuc2l6ZSgpLCAnXDAnKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfVFJVRShSZWFkRGF0YShyZWFkZXIsIG9wLCBzaW5rLmRhdGEoKSwgc2luay5zaXplKCkpKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luaywgZGF0YSk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSAzMDAwKSB7CisgICAgICAgICAgICAgICAgZGF0YTIucmVzaXplKG9wdGlvbnMuYmxvY2tfc2l6ZSk7CisgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcgc2luayhkYXRhMi5zaXplKCksICdcMCcpOworICAgICAgICAgICAgICAgIEFTU0VSVF9UUlVFKFJlYWREYXRhKHJlYWRlciwgb3AsIHNpbmsuZGF0YSgpLCBzaW5rLnNpemUoKSkpOworICAgICAgICAgICAgICAgIEFTU0VSVF9FUShzaW5rLCBkYXRhMik7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSA1MDAwKSB7CisgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcgc2luayhkYXRhMy5zaXplKCksICdcMCcpOworICAgICAgICAgICAgICAgIEFTU0VSVF9UUlVFKFJlYWREYXRhKHJlYWRlciwgb3AsIHNpbmsuZGF0YSgpLCBzaW5rLnNpemUoKSkpOworICAgICAgICAgICAgICAgIEFTU0VSVF9FUShzaW5rLCBkYXRhMyk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpdGVyLT5OZXh0KCk7CisgICAgfQorCisgICAgQVNTRVJUX0VRKHRvdGFsX2Js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hdGEuc2l6ZSgpKSkgeworICAgICAgICByZXR1cm4gQXNzZXJ0aW9uRmFpbHVyZSgpIDw8ICJGYWlsZWQgdG8gYWRkIHJhdyBibG9jayI7CisgICAgfQorICAgIHJldHVybiBBc3NlcnRpb25TdWNjZXNzKCk7Cit9CisKK0Fzc2VydGlvblJlc3VsdCBDb21wYXJlRGF0YUJsb2NrKENvd1JlYWRlciogcmVhZGVyLCBjb25zdCBDb3dPcGVyYXRpb24qIG9wLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIGRhdGEpIHsKKyAgICBjb25zdCBhdXRvJiBoZWFkZXIgPSByZWFkZXItPkdldEhlYWRlcigpOworCisgICAgc3RkOjpzdHJpbmcgY21wID0gZGF0YTsKKyAgICBjbXAucmVzaXplKGhlYWRlci5ibG9ja19zaXplLCAnXDAnKTsKKworICAgIHN0ZDo6c3RyaW5nIHNpbmsoY21wLnNpemUoKSwgJ1wwJyk7CisgICAgaWYgKCFyZWFkZXItPlJlYWREYXRhKG9wLCBzaW5rLmRhdGEoKSwgc2luay5zaXplKCkpKSB7CisgICAgICAgIHJldHVybiBBc3NlcnRpb25GYWlsdXJlKCkgPDwgIkZhaWxlZCB0byByZWFkIGRhdGEgYmxvY2siOworICAgIH0KKyAgICBpZiAoY21wICE9IHNpbmspIHsKKyAgICAgICAgcmV0dXJuIEFzc2VydGlvbkZhaWx1cmUoKSA8PCAiRGF0YSBibG9ja3MgZGlkIG5vdCBtYXRjaCwgZXhwZWN0ZWQgIiA8PCBjbXAgPDwgIiwgZ290ICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCBzaW5rOworICAgIH0KKworICAgIHJldHVybiBBc3NlcnRpb25TdWNjZXNzKCk7Cit9CisKK1RFU1RfRihDb3dUZXN0LCBSZXN1bWVNaWRDbHVzdGVyKSB7CisgICAgQ293T3B0aW9ucyBvcHRpb25zOworICAgIG9wdGlvbnMuY2x1c3Rl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bG9jayh3cml0ZXIuZ2V0KCksIDcsICJCbG9jayA3IikpOworICAgIEFTU0VSVF9UUlVFKFdyaXRlRGF0YUJsb2NrKHdyaXRlci5nZXQoKSwgOCwgIkJsb2NrIDgiKSk7CisgICAgQVNTRVJUX1RSVUUod3JpdGVyLT5BZGRMYWJlbCgyKSk7CisgICAgQVNTRVJUX1RSVUUod3JpdGVyLT5GaW5hbGl6ZSgpKTsKKyAgICBBU1NFUlRfRVEobHNlZWsoY293Xy0+ZmQsIDAsIFNFRUtfU0VUKSwgMCk7CisKKyAgICBDb3dSZWFkZXIgcmVhZGVyOworICAgIEFTU0VSVF9UUlVFKHJlYWRlci5QYXJzZShjb3dfLT5mZCkpOworCisgICAgYXV0byBpdGVyID0gcmVhZGVyLkdldE9wSXRlcigpOworICAgIHNpemVfdCBudW1fcmVwbGFjZSA9IDA7CisgICAgc2l6ZV90IG1heF9pbl9jbHVzdGVyID0gMDsKKyAgICBzaXplX3QgbnVtX2luX2NsdXN0ZXIgPSAwOworICAgIHNpemVfdCBudW1fY2x1c3RlcnMgPSAwOworICAgIHdoaWxlICghaXRlci0+QXRFbmQoKSkgeworICAgICAgICBjb25zdCBhdXRvJiBvcCA9IGl0ZXItPkdldCgpOworCisgICAgICAgIG51bV9pbl9jbHVzdGVyKys7CisgICAgICAgIG1heF9pbl9jbHVzdGVyID0gc3RkOjptYXgobWF4X2luX2NsdXN0ZXIsIG51bV9pbl9jbHVzdGVyKTsKKworICAgICAgICBpZiAob3AtPnR5cGUoKSA9PSBrQ293UmVwbGFjZU9wKSB7CisgICAgICAgICAgICBudW1fcmVwbGFjZSsrOworCisgICAgICAgICAgICBBU1NFUlRfRVEob3AtPm5ld19ibG9jaywgbnVtX3JlcGxhY2UpOworICAgICAgICAgICAgQVNTRVJUX1RSVUUoQ29tcGFyZURhdGFCbG9jaygmcmVhZGVyLCBvcCwgIkJsb2NrICIgKyBzdGQ6OnRvX3N0cmluZyhudW1fcmVwbGFjZSkpKTsKKyAgICAg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TsKKyAgICBBU1NFUlRfVFJVRSh3cml0ZXItPkluaXRpYWxpemUoezF9KSk7CisgICAgQVNTRVJUX1RSVUUod3JpdGVyLT5GaW5hbGl6ZSgpKTsKKyAgICBBU1NFUlRfRVEobHNlZWsoY293Xy0+ZmQsIDAsIFNFRUtfU0VUKSwgMCk7CisKKyAgICBDb3dSZWFkZXIgcmVhZGVyOworICAgIEFTU0VSVF9UUlVFKHJlYWRlci5QYXJzZShjb3dfLT5mZCkpOworCisgICAgYXV0byBpdGVyID0gcmVhZGVyLkdldE9wSXRlcigpOworICAgIHNpemVfdCBudW1fcmVwbGFjZSA9IDA7CisgICAgc2l6ZV90IG1heF9pbl9jbHVzdGVyID0gMDsKKyAgICBzaXplX3QgbnVtX2luX2NsdXN0ZXIgPSAwOworICAgIHNpemVfdCBudW1fY2x1c3RlcnMgPSAwOworICAgIHdoaWxlICghaXRlci0+QXRFbmQoKSkgeworICAgICAgICBjb25zdCBhdXRvJiBvcCA9IGl0ZXItPkdldCgpOworCisgICAgICAgIG51bV9pbl9jbHVzdGVyKys7CisgICAgICAgIG1heF9pbl9jbHVzdGVyID0gc3RkOjptYXgobWF4X2luX2NsdXN0ZXIsIG51bV9pbl9jbHVzdGVyKTsKKyAgICAgICAgaWYgKG9wLT50eXBlKCkgPT0ga0Nvd1JlcGxhY2VPcCkgeworICAgICAgICAgICAgbnVtX3JlcGxhY2UrKzsKKworICAgICAgICAgICAgQVNTRVJUX0VRKG9wLT5uZXdfYmxvY2ssIG51bV9yZXBsYWNlKTsKKyAgICAgICAgICAgIEFTU0VSVF9UUlVFKENvbXBhcmVEYXRhQmxvY2soJnJlYWRlciwgb3AsICJCbG9jayAiICsgc3RkOjp0b19zdHJpbmcobnVtX3JlcGxhY2UpKSk7CisgICAgICAgIH0gZWxzZSBpZiAob3AtPnR5cGUoKSA9PSBrQ293Q2x1c3Rlck9wKSB7CisgICAgICAgICAgICBudW1faW5fY2x1c3RlciA9IDA7CisgICAgICAgICAgICBudW1fY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GVyLT5BdEVuZCgpKTsKKworICAgIHNpemVfdCBpID0gMDsKKworICAgIHdoaWxlICghaXRlci0+QXRFbmQoKSkgeworICAgICAgICBhdXRvIG9wID0gaXRlci0+R2V0KCk7CisgICAgICAgIHN0ZDo6c3RyaW5nIHNpbmsob3B0aW9ucy5ibG9ja19zaXplLCAnXDAnKTsKKyAgICAgICAgQVNTRVJUX0VRKG9wLT50eXBlKCksIGtDb3dSZXBsYWNlT3ApOworICAgICAgICBBU1NFUlRfRVEob3AtPmRhdGFfbGVuZ3RoLCBvcHRpb25zLmJsb2NrX3NpemUpOworICAgICAgICBBU1NFUlRfRVEob3AtPm5ld19ibG9jaywgNSArIGkpOworICAgICAgICBBU1NFUlRfVFJVRShSZWFkRGF0YShyZWFkZXIsIG9wLCBzaW5rLmRhdGEoKSwgb3B0aW9ucy5ibG9ja19zaXplKSk7CisgICAgICAgIEFTU0VSVF9FUShzdGQ6OnN0cmluZ192aWV3KHNpbmspLAorICAgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmdfdmlldyhkYXRhKS5zdWJzdHIoaSAqIG9wdGlvbnMuYmxvY2tfc2l6ZSwgb3B0aW9ucy5ibG9ja19zaXplKSkKKyAgICAgICAgICAgICAgICA8PCAiIHJlYWRiYWNrIGRhdGEgZm9yICIgPDwgaSA8PCAidGggYmxvY2sgZG9lcyBub3QgbWF0Y2giOworICAgICAgICBpdGVyLT5OZXh0KCk7CisgICAgICAgIGkrKzsKKyAgICB9Cit9CisKK1RFU1RfRihDb3dUZXN0VjMsIENvbnNlY3V0aXZlUmVwbGFjZU9wKSB7CisgICAgQ293T3B0aW9ucyBvcHRpb25zOworICAgIG9wdGlvbnMub3BfY291bnRfbWF4ID0gMjA7CisgICAgb3B0aW9ucy5zY3JhdGNoX3NwYWNlID0gZmFsc2U7CisgICAgYXV0byB3cml0ZXIgPSBDcmVhdGVDb3dXcml0ZXIoMywgb3B0aW9ucywgR2V0Q293RmQoKSk7CisgICAgc3RkOjpzdHJpbm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U0VFS19TRVQpLCAwKTsKKworICAgIENvd1JlYWRlciByZWFkZXI7CisgICAgQVNTRVJUX1RSVUUocmVhZGVyLlBhcnNlKGNvd18tPmZkKSk7CisKKyAgICBjb25zdCBhdXRvJiBoZWFkZXIgPSByZWFkZXIuaGVhZGVyX3YzKCk7CisgICAgQVNTRVJUX0VRKGhlYWRlci5wcmVmaXgubWFnaWMsIGtDb3dNYWdpY051bWJlcik7CisgICAgQVNTRVJUX0VRKGhlYWRlci5wcmVmaXgubWFqb3JfdmVyc2lvbiwgMyk7CisgICAgQVNTRVJUX0VRKGhlYWRlci5wcmVmaXgubWlub3JfdmVyc2lvbiwga0Nvd1ZlcnNpb25NaW5vcik7CisgICAgQVNTRVJUX0VRKGhlYWRlci5ibG9ja19zaXplLCBvcHRpb25zLmJsb2NrX3NpemUpOworCisgICAgYXV0byBpdGVyID0gcmVhZGVyLkdldE9wSXRlcigpOworICAgIEFTU0VSVF9ORShpdGVyLCBudWxscHRyKTsKKyAgICBBU1NFUlRfRkFMU0UoaXRlci0+QXRFbmQoKSk7CisKKyAgICBzaXplX3QgaSA9IDA7CisgICAgd2hpbGUgKCFpdGVyLT5BdEVuZCgpKSB7CisgICAgICAgIGF1dG8gb3AgPSBpdGVyLT5HZXQoKTsKKyAgICAgICAgQVNTRVJUX0VRKG9wLT50eXBlKCksIGtDb3dDb3B5T3ApOworICAgICAgICBBU1NFUlRfRVEob3AtPmRhdGFfbGVuZ3RoLCAwKTsKKyAgICAgICAgQVNTRVJUX0VRKG9wLT5uZXdfYmxvY2ssIDEwICsgaSk7CisgICAgICAgIEFTU0VSVF9FUShvcC0+c291cmNlKCksIDEwMDAgKyBpKTsKKyAgICAgICAgaXRlci0+TmV4dCgpOworICAgICAgICBpICs9IDE7CisgICAgfQorCisgICAgQVNTRVJUX0VRKGksIDEwMCk7Cit9CisKK1RFU1RfRihDb3dUZXN0VjMsIFhvck9wKSB7CisgICAgQ293T3B0aW9ucyBvcHRpb25zOworICAgIG9wdGl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Y291bnQsIDIwKTsKKyAgICBBU1NFUlRfRVEoaGVhZGVyLm9wX2NvdW50X21heCwgMTAwKTsKKworICAgIGF1dG8gaXRlciA9IHJlYWRlci5HZXRPcEl0ZXIoKTsKKyAgICBBU1NFUlRfTkUoaXRlciwgbnVsbHB0cik7CisgICAgQVNTRVJUX0ZBTFNFKGl0ZXItPkF0RW5kKCkpOworCisgICAgZm9yIChzaXplX3QgaSA9IDA7IGkgPCA1OyBpKyspIHsKKyAgICAgICAgYXV0byBvcCA9IGl0ZXItPkdldCgpOworICAgICAgICBBU1NFUlRfRVEob3AtPnR5cGUoKSwga0Nvd1plcm9PcCk7CisgICAgICAgIEFTU0VSVF9FUShvcC0+bmV3X2Jsb2NrLCAxMCArIGkpOworICAgICAgICBpdGVyLT5OZXh0KCk7CisgICAgfQorICAgIGZvciAoc2l6ZV90IGkgPSAwOyBpIDwgNTsgaSsrKSB7CisgICAgICAgIGF1dG8gb3AgPSBpdGVyLT5HZXQoKTsKKyAgICAgICAgQVNTRVJUX0VRKG9wLT50eXBlKCksIGtDb3dDb3B5T3ApOworICAgICAgICBBU1NFUlRfRVEob3AtPm5ld19ibG9jaywgMTUgKyBpKTsKKyAgICAgICAgQVNTRVJUX0VRKG9wLT5zb3VyY2UoKSwgMyArIGkpOworICAgICAgICBpdGVyLT5OZXh0KCk7CisgICAgfQorICAgIHN0ZDo6c3RyaW5nIHNpbmsoZGF0YS5zaXplKCksICdcMCcpOworCisgICAgZm9yIChzaXplX3QgaSA9IDA7IGkgPCA1OyBpKyspIHsKKyAgICAgICAgYXV0byBvcCA9IGl0ZXItPkdldCgpOworICAgICAgICBBU1NFUlRfRVEob3AtPnR5cGUoKSwga0Nvd1JlcGxhY2VPcCk7CisgICAgICAgIEFTU0VSVF9FUShvcC0+bmV3X2Jsb2NrLCAxOCArIGkpOworICAgICAgICBBU1NFUlRfRVEocmVhZGVyLlJlYWREYXRhKG9wLCBzaW5rLmRhdGEoKSArIChpICogb3B0aW9ucy5ibG9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0VSVF9FUShsc2Vlayhjb3dfLT5mZCwgMCwgU0VFS19TRVQpLCAwKTsKKworICAgIENvd1JlYWRlciByZWFkZXI7CisgICAgQVNTRVJUX1RSVUUocmVhZGVyLlBhcnNlKGNvd18tPmZkKSk7CisKKyAgICBhdXRvIGl0ZXIgPSByZWFkZXIuR2V0T3BJdGVyKCk7CisgICAgQVNTRVJUX05FKGl0ZXIsIG51bGxwdHIpOworCisgICAgd2hpbGUgKCFpdGVyLT5BdEVuZCgpKSB7CisgICAgICAgIGF1dG8gb3AgPSBpdGVyLT5HZXQoKTsKKworICAgICAgICBpZiAob3AtPnR5cGUoKSA9PSBrQ293WG9yT3ApIHsKKyAgICAgICAgICAgIHN0ZDo6c3RyaW5nIHNpbmsoeG9yX2RhdGEuc2l6ZSgpLCAnXDAnKTsKKyAgICAgICAgICAgIEFTU0VSVF9FUShvcC0+bmV3X2Jsb2NrLCA1MCk7CisgICAgICAgICAgICBBU1NFUlRfRVEob3AtPnNvdXJjZSgpLCA5ODMxNCk7ICAvLyA0MDk2ICogMjQgKyAxMAorICAgICAgICAgICAgUmVhZEJsb2NrRGF0YShyZWFkZXIsIG9wLCBzaW5rLmRhdGEoKSwgc2luay5zaXplKCkpOworICAgICAgICAgICAgQVNTRVJUX0VRKHNpbmssIHhvcl9kYXRhKTsKKyAgICAgICAgfQorICAgICAgICBpZiAob3AtPnR5cGUoKSA9PSBrQ293UmVwbGFjZU9wKSB7CisgICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSAxMDApIHsKKyAgICAgICAgICAgICAgICBkYXRhLnJlc2l6ZShvcHRpb25zLmJsb2NrX3NpemUpOworICAgICAgICAgICAgICAgIHN0ZDo6c3RyaW5nIHNpbmsoZGF0YS5zaXplKCksICdcMCcpOworICAgICAgICAgICAgICAgIFJlYWRCbG9ja0RhdGEocmVhZGVyLCBvcCwgc2luay5kYXRhKCksIHNpbmsuc2l6ZSgpKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luay5zaXplKCksIGRhdGEuc2l6ZSgpKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luaywgZGF0YSk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSA2MDAwKSB7CisgICAgICAgICAgICAgICAgZGF0YTIucmVzaXplKG9wdGlvbnMuYmxvY2tfc2l6ZSk7CisgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcgc2luayhkYXRhMi5zaXplKCksICdcMCcpOworICAgICAgICAgICAgICAgIFJlYWRCbG9ja0RhdGEocmVhZGVyLCBvcCwgc2luay5kYXRhKCksIHNpbmsuc2l6ZSgpKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luaywgZGF0YTIpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKG9wLT5uZXdfYmxvY2sgPT0gOTAwMCkgeworICAgICAgICAgICAgICAgIHN0ZDo6c3RyaW5nIHNpbmsoZGF0YTMuc2l6ZSgpLCAnXDAnKTsKKyAgICAgICAgICAgICAgICBSZWFkQmxvY2tEYXRhKHJlYWRlciwgb3AsIHNpbmsuZGF0YSgpLCBzaW5rLnNpemUoKSk7CisgICAgICAgICAgICAgICAgQVNTRVJUX0VRKHNpbmssIGRhdGEzKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmIChvcC0+bmV3X2Jsb2NrID09IDEwMDAwKSB7CisgICAgICAgICAgICAgICAgZGF0YTQucmVzaXplKG9wdGlvbnMuYmxvY2tfc2l6ZSk7CisgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcgc2luayhvcHRpb25zLmJsb2NrX3NpemUsICdcMCcpOworICAgICAgICAgICAgICAgIFJlYWRCbG9ja0RhdGEocmVhZGVyLCBvcCwgc2luay5kYXRhKCksIHNpbmsuc2l6ZSgpKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luaywgZGF0YTQpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKG9wLT5uZXdfYmxvY2sgPT0gMTEwMDApIHsKKyAgICAgICAgICAgICAgICBkYXRhNS5yZXNpemUob3B0aW9ucy5ibG9ja19zaXplKTsKKyAgICAgICAgICAgICAgICBzdGQ6OnN0cmluZyBzaW5rKG9wdGlvbnMuYmxvY2tfc2l6ZSwgJ1wwJyk7CisgICAgICAgICAgICAgICAgUmVhZEJsb2NrRGF0YShyZWFkZXIsIG9wLCBzaW5rLmRhdGEoKSwgc2luay5zaXplKCkpOworICAgICAgICAgICAgICAgIEFTU0VSVF9FUShzaW5rLCBkYXRhNSk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAob3AtPm5ld19ibG9jayA9PSAxMjAwMCkgeworICAgICAgICAgICAgICAgIHJhbmRvbV9idWZmZXIucmVzaXplKG9wdGlvbnMuYmxvY2tfc2l6ZSk7CisgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcgc2luayhvcHRpb25zLmJsb2NrX3NpemUsICdcMCcpOworICAgICAgICAgICAgICAgIFJlYWRCbG9ja0RhdGEocmVhZGVyLCBvcCwgc2luay5kYXRhKCksIHNpbmsuc2l6ZSgpKTsKKyAgICAgICAgICAgICAgICBBU1NFUlRfRVEoc2luaywgcmFuZG9tX2J1ZmZlcik7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICBpdGVyLT5OZXh0KCk7CisgICAgfQorfQorCitzdGQ6OnZlY3RvcjxUZXN0UGFyYW0+IEdldFRlc3RDb25maWdzKCkgeworICAgIHN0ZDo6dmVjdG9yPFRlc3RQYXJhbT4gdGVzdFBhcmFtczsKKworICAgIHN0ZDo6dmVjdG9yPGludD4gYmxvY2tfc2l6ZXMgPSB7NF9LaUIsIDhfS2lCLCAxNl9LaUIsIDMyX0tpQiwgNjRfS2lCLCAxMjhfS2lCLCAyNTZfS2lCfTsKKyAgICBzdGQ6OnZlY3RvcjxzdGQ6OnN0cmluZz4gY29tcHJlc3Npb25fYWxnbyA9IHsibm9uZSIsICJsejQiLCAienN0ZCIsICJneiJ9OworICAgIHN0ZDo6dmVjdG9yPGludD4gdGhyZWFkcyA9IHsxLCAyfTsKKyAgICAvLyBUaGlzIHdpbGwgYWxzbyB0ZXN0IGJhdGNoIHNpemUKKyAgICBzdGQ6OnZlY3RvcjxzaXplX3Q+IGNsdXN0ZXJfb3BzID0gezEsIDI1Nn07CisKKyAgICAvLyBUaGlzIHNob3VsZCB0ZXN0IDExMiBjb21iaW5hdGlvbgorICAgIGZvciAoYXV0byBibG9jayA6IGJsb2NrX3NpemVzKSB7CisgICAgICAgIGZvciAoYXV0byBjb21wcmVzc2lvbiA6IGNvbXByZXNzaW9uX2FsZ28pIHsKKyAgICAgICAgICAgIGZvciAoYXV0byB0aHJlYWQgOiB0aHJlYWRzKSB7CisgICAgICAgICAgICAgICAgZm9yIChhdXRvIGNsdXN0ZXIgOiBjbHVzdGVyX29wcykgeworICAgICAgICAgICAgICAgICAgICBUZXN0UGFyYW0gcGFyYW07CisgICAgICAgICAgICAgICAgICAgIHBhcmFtLmJsb2NrX3NpemUgPSBibG9jazsKKyAgICAgICAgICAgICAgICAgICAgcGFyYW0uY29tcHJlc3Npb24gPSBjb21wcmVzc2lvbjsKKyAgICAgICAgICAgICAgICAgICAgcGFyYW0ubnVtX3RocmVhZHMgPSB0aHJlYWQ7CisgICAgICAgICAgICAgICAgICAgIHBhcmFtLmNsdXN0ZXJfb3BzID0gY2x1c3RlcjsKKyAgICAgICAgICAgICAgICAgICAgdGVzdFBhcmFtcy5wdXNoX2JhY2soc3RkOjptb3ZlKHBhcmFtKSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorCisgICAgcmV0dXJuIHRlc3RQYXJhbXM7Cit9CisKK0lOU1RBTlRJQVRFX1RFU1RfU1VJVEVfUChDb21wcmVzc29yc1dpdGhWYXJpYWJsZUJsb2NrcywgVmFyaWFibGVCbG9ja1Rlc3QsCisgICAgICAgICAgICAgICAgICAgICAgICA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6OnRvX3N0cmluZyhmZC5nZXQoKSk7CisgICAgc3RkOjpzdHJpbmcgZmlsZV9wYXRoKDUxMiwgJ1wwJyk7CisgICAgY29uc3QgYXV0byBlcnIgPSByZWFkbGluayhmZF9wYXRoLmNfc3RyKCksIGZpbGVfcGF0aC5kYXRhKCksIGZpbGVfcGF0aC5zaXplKCkpOworICAgIGlmIChlcnIgPD0gMCkgeworICAgICAgICBQTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIGRldGVybWluZSBwYXRoIGZvciBmZCAiIDw8IGZkLmdldCgpOworICAgICAgICBmaWxlX3BhdGguY2xlYXIoKTsKKyAgICB9IGVsc2UgeworICAgICAgICBmaWxlX3BhdGgucmVzaXplKGVycik7CisgICAgfQorICAgIHJldHVybiBmaWxlX3BhdGg7Cit9Cit9ICAvLyBuYW1lc3BhY2UKKworQ293V3JpdGVyQmFzZTo6Q293V3JpdGVyQmFzZShjb25zdCBDb3dPcHRpb25zJiBvcHRpb25zLCB1bmlxdWVfZmQmJiBmZCkKKyAgICA6IG9wdGlvbnNfKG9wdGlvbnMpLCBmZF8oc3RkOjptb3ZlKGZkKSkge30KKworYm9vbCBDb3dXcml0ZXJCYXNlOjpJbml0RmQoKSB7CisgICAgaWYgKGZkXy5nZXQoKSA8IDApIHsKKyAgICAgICAgZmRfLnJlc2V0KG9wZW4oIi9kZXYvbnVsbCIsIE9fUkRXUiB8IE9fQ0xPRVhFQykpOworICAgICAgICBpZiAoZmRfIDwgMCkgeworICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIm9wZW4gL2Rldi9udWxsIGZhaWxlZCI7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgaXNfZGV2X251bGxfID0gdHJ1ZTsKKyAgICAgICAgcmV0dXJuIHRydWU7CisgICAgfQorCisgICAgc3RydWN0IHN0YXQgc3RhdCB7fTsKKyAgICBpZiAoZnN0YXQoZmRfLmdldCgpLCAmc3RhdCkgPCAwKSB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QqIGl0ZXIgPSByZWludGVycHJldF9jYXN0PGNvbnN0IHVpbnQ4X3QqPihkYXRhKTsKIApAQCAtNDk3LDcgKzM4Niw3IEBACiAgICAgd2hpbGUgKG51bV9ibG9ja3MpIHsKICAgICAgICAgc2l6ZV90IHBlbmRpbmdfYmxvY2tzID0gKHN0ZDo6bWluKGtQcm9jZXNzaW5nQmxvY2tzLCBudW1fYmxvY2tzKSk7CiAKLSAgICAgICAgaWYgKGNvbXByZXNzaW9uXyAmJiBudW1fY29tcHJlc3NfdGhyZWFkc18gPiAxKSB7CisgICAgICAgIGlmIChjb21wcmVzc2lvbl8uYWxnb3JpdGhtICYmIG51bV9jb21wcmVzc190aHJlYWRzXyA+IDEpIHsKICAgICAgICAgICAgIGlmICghQ29tcHJlc3NCbG9ja3MocGVuZGluZ19ibG9ja3MsIGl0ZXIpKSB7CiAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgfQpAQCAtNTA4LDcgKzM5Nyw3IEBACiAgICAgICAgIG51bV9ibG9ja3MgLT0gcGVuZGluZ19ibG9ja3M7CiAKICAgICAgICAgd2hpbGUgKGkgPCBzaXplIC8gaGVhZGVyXy5ibG9ja19zaXplICYmIHBlbmRpbmdfYmxvY2tzKSB7Ci0gICAgICAgICAgICBDb3dPcGVyYXRpb24gb3AgPSB7fTsKKyAgICAgICAgICAgIENvd09wZXJhdGlvblYyIG9wID0ge307CiAgICAgICAgICAgICBvcC5uZXdfYmxvY2sgPSBuZXdfYmxvY2tfc3RhcnQgKyBpOwogICAgICAgICAgICAgb3AudHlwZSA9IHR5cGU7CiAgICAgICAgICAgICBpZiAodHlwZSA9PSBrQ293WG9yT3ApIHsKQEAgLTUxNywxOSArNDA2LDIyIEBACiAgICAgICAgICAgICAgICAgb3Auc291cmNlID0gbmV4dF9kYXRhX3Bvc187CiAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgIGlmIChjb21wcmVzc2lvbl8pIHsKKyAgICAgICAgICAgIGlmIChjb21wcmVzc2lvbl8uYWxnb3JpdGhtKSB7CiAgICAgICAgICAgICAgICAgYXV0byBkYXRhID0gWyYsIHRoaXNdKCkgewogICAgICAgICAgICAgICAgICAgICBpZiAobnVtX2NvbXByZXNzX3RocmVhZHNfID4gMSkgewogICAgICAgICAgICAgICAgICAgICAgICAgYXV0byBkYXRhID0gc3RkOjptb3ZlKCpidWZfaXRlcl8pOwogICAgICAgICAgICAgICAgICAgICAgICAgYnVmX2l0ZXJfKys7CiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGF0YTsKICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGF1dG8gZGF0YSA9Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvbXByZXNzV29ya2VyOjpDb21wcmVzcyhjb21wcmVzc2lvbl8sIGl0ZXIsIGhlYWRlcl8uYmxvY2tfc2l6ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWNvbXByZXNzb3JfKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcHJlc3Nvcl8gPSBJQ29tcHJlc3Nvcjo6Q3JlYXRlKGNvbXByZXNzaW9uXywgaGVhZGVyXy5ibG9ja19zaXplKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAgICAgYXV0byBkYXRhID0gY29tcHJlc3Nvcl8tPkNvbXByZXNzKGl0ZXIsIGhlYWRlcl8uYmxvY2tfc2l6ZSk7CiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGF0YTsKICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIH0oKTsKLSAgICAgICAgICAgICAgICBvcC5jb21wcmVzc2lvbiA9IGNvbXByZXNzaW9uXzsKKyAgICAgICAgICAgICAgICBvcC5jb21wcmVzc2lvbiA9IGNvbXByZXNzaW9uXy5hbGdvcml0aG07CiAgICAgICAgICAg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fbmVlZGVkCiAgICAgICAgICAgICAgICAgICAgPDwgIiwgYXZhaWxhYmxlOiAiIDw8IGNvd19pbWFnZV9zaXplXzsKQEAgLTcyNSwxNCArNjA2LDE0IEBACiAgICAgcmV0dXJuIHRydWU7CiB9CiAKLWJvb2wgQ293V3JpdGVyOjpGbHVzaENsdXN0ZXIoKSB7Citib29sIENvd1dyaXRlclYyOjpGbHVzaENsdXN0ZXIoKSB7CiAgICAgc3NpemVfdCByZXQ7CiAKICAgICBpZiAob3BfdmVjX2luZGV4XykgewogICAgICAgICByZXQgPSBwd3JpdGV2KGZkXy5nZXQoKSwgY293b3BfdmVjXy5nZXQoKSwgb3BfdmVjX2luZGV4XywgY3VycmVudF9vcF9wb3NfKTsKLSAgICAgICAgaWYgKHJldCAhPSAob3BfdmVjX2luZGV4XyAqIHNpemVvZihDb3dPcGVyYXRpb24pKSkgewotICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgInB3cml0ZXYgZmFpbGVkIGZvciBDb3dPcGVyYXRpb24uIEV4cGVjdGVkOiAiCi0gICAgICAgICAgICAgICAgICAgICAgICA8PCAob3BfdmVjX2luZGV4XyAqIHNpemVvZihDb3dPcGVyYXRpb24pKTsKKyAgICAgICAgaWYgKHJldCAhPSAob3BfdmVjX2luZGV4XyAqIHNpemVvZihDb3dPcGVyYXRpb25WMikpKSB7CisgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAicHdyaXRldiBmYWlsZWQgZm9yIENvd09wZXJhdGlvblYyLiBFeHBlY3RlZDogIgorICAgICAgICAgICAgICAgICAgICAgICAgPDwgKG9wX3ZlY19pbmRleF8gKiBzaXplb2YoQ293T3BlcmF0aW9uVjIpKTsKICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgfQogICAgIH0KQEAgLTc1NCwxNyArNjM1LDE2IEBACiAgICAgcmV0dXJuIHRydWU7CiB9CiAKLWJvb2wgQ293V3JpdGVyOjpXcml0ZU9wZXJhdGlvbihjb25zdCBDb3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geworICAgICAgICBMT0coRVJST1IpIDw8ICJmYWlsZWQgdG8gcGFyc2UgY29tcHJlc3Npb24gcGFyYW1ldGVyczogaW52YWxpZCBhcmd1bWVudCBjb3VudDogIgorICAgICAgICAgICAgICAgICAgIDw8IHBhcnRzLnNpemUoKSA8PCAiICIgPDwgb3B0aW9uc18uY29tcHJlc3Npb247CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgYXV0byBhbGdvcml0aG0gPSBDb21wcmVzc2lvbkFsZ29yaXRobUZyb21TdHJpbmcocGFydHNbMF0pOworICAgIGlmICghYWxnb3JpdGhtKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgInVucmVjb2duaXplZCBjb21wcmVzc2lvbjogIiA8PCBvcHRpb25zXy5jb21wcmVzc2lvbjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBoZWFkZXJfLmNvbXByZXNzaW9uX2FsZ29yaXRobSA9ICphbGdvcml0aG07CisgICAgaGVhZGVyXy5vcF9jb3VudF9tYXggPSBvcHRpb25zXy5vcF9jb3VudF9tYXg7CisKKyAgICBpZiAoIUlzRXN0aW1hdGluZygpICYmIGhlYWRlcl8ub3BfY291bnRfbWF4ID09IDApIHsKKyAgICAgICAgaWYgKCFvcHRpb25zXy5tYXhfYmxvY2tzLmhhc192YWx1ZSgpKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJjYW4ndCBzaXplIG9wIGJ1ZmZlciBzaXplIHNpbmNlIG9wX2NvdW50X21heCBpcyAwIGFuZCBtYXhfYmxvY2tzIGlzIG5vdCAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICJzZXQuIjsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICBMT0coSU5GTykgPDwgIm9wIGNvdW50IG1heCBpcyByZWFkIGluIGFzIDAuIFNldHRpbmcgdG8gIgorICAgICAgICAgICAgICAgICAgICAgIm51bSBibG9ja3MgaW4gcGFydGl0aW9uICIKKyAgICAgICAgICAgICAgICAgIDw8IG9wdGlvbnNfLm1heF9ibG9ja3MudmFsdWUoKTsKKyAgICAgICAgaGVhZGVyXy5vcF9jb3VudF9tYXggPSBvcHRpb25zXy5tYXhfYmxvY2tzLnZhbHVlKCk7CisgICAgfQorCisgICAgaWYgKHBhcnRzLnNpemUoKSA+IDEpIHsKKyAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpQYXJzZUludChwYXJ0c1sxXSwgJmNvbXByZXNzaW9uXy5jb21wcmVzc2lvbl9sZXZlbCkpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgImZhaWxlZCB0byBwYXJzZSBjb21wcmVzc2lvbiBsZXZlbCBpbnZhbGlkIHR5cGU6ICIgPDwgcGFydHNbMV07CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICB9IGVsc2UgeworICAgICAgICBjb21wcmVzc2lvbl8uY29tcHJlc3Npb25fbGV2ZWwgPQorICAgICAgICAgICAgICAgIENvbXByZXNzV29ya2VyOjpHZXREZWZhdWx0Q29tcHJlc3Npb25MZXZlbChhbGdvcml0aG0udmFsdWUoKSk7CisgICAgfQorCisgICAgY29tcHJlc3Npb25fLmFsZ29yaXRobSA9ICphbGdvcml0aG07CisgICAgaWYgKGNvbXByZXNzaW9uXy5hbGdvcml0aG0gIT0ga0Nvd0NvbXByZXNzTm9uZSkgeworICAgICAgICBjb21wcmVzc29yXyA9IElDb21wcmVzc29yOjpDcmVhdGUoY29tcHJlc3Npb25fLCBoZWFkZXJfLm1heF9jb21wcmVzc2lvbl9zaXplKTsKKyAgICAgICAgaWYgKGNvbXByZXNzb3JfID09IG51bGxwdHIpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBjcmVhdGUgY29tcHJlc3NvciBmb3IgIiA8PCBjb21wcmVzc2lvbl8uYWxnb3JpdGhtOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlO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db3dXcml0ZXJWMygpIHsKKyAgICBmb3IgKGNvbnN0IGF1dG8mIHQgOiBjb21wcmVzc190aHJlYWRzXykgeworICAgICAgICB0LT5GaW5hbGl6ZSgpOworICAgIH0KKyAgICBmb3IgKGF1dG8mIHQgOiB0aHJlYWRzXykgeworICAgICAgICBpZiAodC5qb2luYWJsZSgpKSB7CisgICAgICAgICAgICB0LmpvaW4oKTsKKyAgICAgICAgfQorICAgIH0KK30KKworYm9vbCBDb3dXcml0ZXJWMzo6SW5pdGlhbGl6ZShzdGQ6Om9wdGlvbmFsPHVpbnQ2NF90PiBsYWJlbCkgeworICAgIGlmICghSW5pdEZkKCkgfHwgIVBhcnNlT3B0aW9ucygpKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKCFsYWJlbCkgeworICAgICAgICBpZiAoIU9wZW5Gb3JXcml0ZSgpKSB7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICB9IGVsc2UgeworICAgICAgICBpZiAoIU9wZW5Gb3JBcHBlbmQoKmxhYmVsKSkgeworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgfQorICAgIHJldHVybiB0cnVlOworfQorCitib29sIENvd1dyaXRlclYzOjpPcGVuRm9yV3JpdGUoKSB7CisgICAgLy8gVGhpcyBsaW1pdGF0aW9uIGlzIHRpZWQgdG8gdGhlIGRhdGEgZmllbGQgc2l6ZSBpbiBDb3dPcGVyYXRpb25WMi4KKyAgICAvLyBLZWVwaW5nIHRoaXMgZm9yIFYzIHdyaXRlciA8LSBhbHRob3VnaCB3ZQorICAgIGlmIChoZWFkZXJfLmJsb2NrX3NpemUgPiBzdGQ6Om51bWVyaWNfbGltaXRzPHVpbnQxNl90Pjo6bWF4KCkpIHsKKyAgICAgICAgTE9HKEVSUk9SKSA8PCAiQmxvY2sgc2l6ZSBpcyB0b28gbGFyZ2UiOworICAgICAgICByZXR1cm4gZmFsc2U7Cisg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3AuZGF0YV9sZW5ndGg7CisgICAgfQorCisgICAgcmV0dXJuIHRydWU7Cit9CisKK2Jvb2wgQ293V3JpdGVyVjM6OkNoZWNrT3BDb3VudChzaXplX3Qgb3BfY291bnQpIHsKKyAgICBpZiAoSXNFc3RpbWF0aW5nKCkpIHsKKyAgICAgICAgcmV0dXJuIHRydWU7CisgICAgfQorICAgIGlmIChoZWFkZXJfLm9wX2NvdW50ICsgY2FjaGVkX29wc18uc2l6ZSgpICsgb3BfY291bnQgPiBoZWFkZXJfLm9wX2NvdW50X21heCkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJDdXJyZW50IG51bWJlciBvZiBvcHMgb24gZGlzazogIiA8PCBoZWFkZXJfLm9wX2NvdW50CisgICAgICAgICAgICAgICAgICAgPDwgIiwgbnVtYmVyIG9mIG9wcyBjYWNoZWQgaW4gbWVtb3J5OiAiIDw8IGNhY2hlZF9vcHNfLnNpemUoKQorICAgICAgICAgICAgICAgICAgIDw8ICIsIG51bWJlciBvZiBvcHMgYXR0ZW1wdGluZyB0byB3cml0ZTogIiA8PCBvcF9jb3VudAorICAgICAgICAgICAgICAgICAgIDw8ICIsIHRoaXMgd2lsbCBleGNlZWQgbWF4IG9wIGNvdW50ICIgPDwgaGVhZGVyXy5vcF9jb3VudF9tYXg7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgcmV0dXJuIHRydWU7Cit9CisKK3NpemVfdCBDb3dXcml0ZXJWMzo6Q2FjaGVkRGF0YVNpemUoKSBjb25zdCB7CisgICAgc2l6ZV90IHNpemUgPSAwOworICAgIGZvciAoY29uc3QgYXV0byYgaSA6IGNhY2hlZF9kYXRhXykgeworICAgICAgICBzaXplICs9IGkuc2l6ZSgpOworICAgIH0KKyAgICByZXR1cm4gc2l6ZTsKK30KKworYm9vbCBDb3dXcml0ZXJWMzo6RW1pdENvcHkodWludDY0X3QgbmV3X2Jsb2NrLCB1aW50NjRfdCBvbGRfYmxvY2ssIHVpbnQ2NF90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ZiAoTmVlZHNGbHVzaCgpICYmICFGbHVzaENhY2hlT3BzKCkpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkVtaXRCbG9ja3Mgd2l0aCBjb21wcmVzc2lvbjogd3JpdGUgZmFpbGVkLiBuZXcgYmxvY2s6ICIKKyAgICAgICAgICAgICAgICAgICAgICAgPDwgbmV3X2Jsb2NrX3N0YXJ0IDw8ICIgY29tcHJlc3Npb246ICIgPDwgY29tcHJlc3Npb25fLmFsZ29yaXRobQorICAgICAgICAgICAgICAgICAgICAgICA8PCAiLCBvcCB0eXBlOiAiIDw8IHR5cGU7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICAgICAgdG90YWxfd3JpdHRlbiArPSBjaHVuazsKKyAgICB9CisKKyAgICByZXR1cm4gdHJ1ZTsKK30KKworYm9vbCBDb3dXcml0ZXJWMzo6RW1pdFplcm9CbG9ja3ModWludDY0X3QgbmV3X2Jsb2NrX3N0YXJ0LCBjb25zdCB1aW50NjRfdCBudW1fYmxvY2tzKSB7CisgICAgaWYgKCFDaGVja09wQ291bnQobnVtX2Jsb2NrcykpIHsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBmb3IgKHVpbnQ2NF90IGkgPSAwOyBpIDwgbnVtX2Jsb2NrczsgaSsrKSB7CisgICAgICAgIGF1dG8mIG9wID0gY2FjaGVkX29wc18uZW1wbGFjZV9iYWNrKCk7CisgICAgICAgIG9wLnNldF90eXBlKGtDb3daZXJvT3ApOworICAgICAgICBvcC5uZXdfYmxvY2sgPSBuZXdfYmxvY2tfc3RhcnQgKyBpOworICAgIH0KKyAgICBpZiAoTmVlZHNGbHVzaCgpKSB7CisgICAgICAgIGlmICghRmx1c2hDYWNoZU9wcygpKSB7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIHRydWU7Cit9CisKK2Jvb2wgQ293V3JpdGVyVj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VtZV9wb2ludHNfLT5zaXplKCkgPiBoZWFkZXJfLnJlc3VtZV9wb2ludF9tYXgpIHsKKyAgICAgICAgcmVzdW1lX3BvaW50c18tPmVyYXNlKHJlc3VtZV9wb2ludHNfLT5iZWdpbigpKTsKKyAgICB9CisKKyAgICBDSEVDS19MRShyZXN1bWVfcG9pbnRzXy0+c2l6ZSgpLCBoZWFkZXJfLnJlc3VtZV9wb2ludF9tYXgpOworCisgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpXcml0ZUZ1bGx5QXRPZmZzZXQoZmRfLCByZXN1bWVfcG9pbnRzXy0+ZGF0YSgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VtZV9wb2ludHNfLT5zaXplKCkgKiBzaXplb2YoUmVzdW1lUG9pbnQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdldFJlc3VtZU9mZnNldChoZWFkZXJfKSkpIHsKKyAgICAgICAgUExPRyhFUlJPUikgPDwgIndyaXRpbmcgcmVzdW1lIGJ1ZmZlciBmYWlsZWQiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIHJldHVybiBGaW5hbGl6ZSgpOworfQorCitib29sIENvd1dyaXRlclYzOjpFbWl0U2VxdWVuY2VEYXRhKHNpemVfdCBudW1fb3BzLCBjb25zdCB1aW50MzJfdCogZGF0YSkgeworICAgIGlmIChoZWFkZXJfLm9wX2NvdW50ID4gMCB8fCAhY2FjaGVkX29wc18uZW1wdHkoKSkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJUaGVyZSdzICIgPDwgaGVhZGVyXy5vcF9jb3VudCA8PCAiIG9wZXJhdGlvbnMgd3JpdHRlbiB0byBkaXNrIGFuZCAiCisgICAgICAgICAgICAgICAgICAgPDwgY2FjaGVkX29wc18uc2l6ZSgpCisgICAgICAgICAgICAgICAgICAgPDwgIiBvcHMgY2FjaGVkIGluIG1lbW9yeS4gV3JpdGluZ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CAiQ2FjaGVkIG9wcyBpcyBlbXB0eSwgYnV0IGRhdGEgaW92ZWMgaGFzIHNpemU6ICIgPDwgZGF0YV92ZWNfLnNpemUoKQorICAgICAgICAgICAgICAgICAgICAgICA8PCAiIHRoaXMgaXMgZGVmaW5pdGVseSBhIGJ1Zy4iOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIHJldHVybiB0cnVlOworICAgIH0KKyAgICBzaXplX3QgYnl0ZXNfd3JpdHRlbiA9IDA7CisKKyAgICBmb3IgKGF1dG8mIG9wIDogY2FjaGVkX29wc18pIHsKKyAgICAgICAgaWYgKG9wLnR5cGUoKSA9PSBrQ293UmVwbGFjZU9wKSB7CisgICAgICAgICAgICBvcC5zZXRfc291cmNlKG5leHRfZGF0YV9wb3NfICsgYnl0ZXNfd3JpdHRlbik7CisgICAgICAgIH0KKyAgICAgICAgYnl0ZXNfd3JpdHRlbiArPSBvcC5kYXRhX2xlbmd0aDsKKyAgICB9CisgICAgaWYgKCFXcml0ZU9wZXJhdGlvbihjYWNoZWRfb3BzXywgZGF0YV92ZWNfKSkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gZmx1c2ggIiA8PCBjYWNoZWRfb3BzXy5zaXplKCkgPDwgIiBvcHMgdG8gZGlzayI7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgY2FjaGVkX29wc18uY2xlYXIoKTsKKyAgICBjYWNoZWRfZGF0YV8uY2xlYXIoKTsKKyAgICBkYXRhX3ZlY18uY2xlYXIoKTsKKyAgICByZXR1cm4gdHJ1ZTsKK30KKworc2l6ZV90IENvd1dyaXRlclYzOjpHZXRDb21wcmVzc2lvbkZhY3Rvcihjb25zdCBzaXplX3QgYmxvY2tzX3RvX2NvbXByZXNzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb3dPcGVyYXRpb25UeXBlIHR5cGUpIGNvbnN0IHsKKyAgICAv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49IGJsb2NrX3NpemUpIHsKKyAgICAgICAgICAgIGJ1ZmZlci5jb21wcmVzc2VkX2RhdGEucmVzaXplKGJsb2NrX3NpemUpOworICAgICAgICAgICAgc3RkOjptZW1jcHkoYnVmZmVyLmNvbXByZXNzZWRfZGF0YS5kYXRhKCksIGl0ZXIsIGJsb2NrX3NpemUpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgLy8gQ29tcHJlc3NlZCBibG9jaworICAgICAgICAgICAgYnVmZmVyLmNvbXByZXNzZWRfZGF0YS5yZXNpemUoYmxvY2suc2l6ZSgpKTsKKyAgICAgICAgICAgIHN0ZDo6bWVtY3B5KGJ1ZmZlci5jb21wcmVzc2VkX2RhdGEuZGF0YSgpLCBibG9jay5kYXRhKCksIGJsb2NrLnNpemUoKSk7CisgICAgICAgIH0KKyAgICAgICAgaXRlciArPSBibG9ja19zaXplOworICAgIH0KKyAgICByZXR1cm4gY29tcHJlc3NlZF92ZWM7Cit9CisKK3N0ZDo6dmVjdG9yPENvd1dyaXRlclYzOjpDb21wcmVzc2VkQnVmZmVyPiBDb3dXcml0ZXJWMzo6Q29tcHJlc3NCbG9ja3MoY29uc3Qgc2l6ZV90IG51bV9ibG9ja3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZvaWQqIGRhdGEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvd09wZXJhdGlvblR5cGUgdHlwZSkgeworICAgIGlmIChjb21wcmVzc2lvbl8uYWxnb3JpdGhtID09IGtDb3dDb21wcmVzc05vbmUpIHsKKyAgICAgICAgcmV0dXJuIFByb2Nlc3NCbG9ja3NXaXRoTm9Db21wcmVzc2lvbihudW1fYmxvY2tzLCBkYXRhLCB0eXBlKTsKKyAgICB9CisKKyAgICBjb25zdCBzaXplX3QgbnVtX3RocmVh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plKCkgPDwgIiBvcHMgYXQgIiA8PCBvZmZzZXQ7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKCFkYXRhLmVtcHR5KCkpIHsKKyAgICAgICAgaW50IHRvdGFsX3dyaXR0ZW4gPSAwOworICAgICAgICBpbnQgaSA9IDA7CisgICAgICAgIHdoaWxlIChpIDwgZGF0YS5zaXplKCkpIHsKKyAgICAgICAgICAgIGludCBjaHVuayA9IHN0ZDo6bWluKHN0YXRpY19jYXN0PGludD4oZGF0YS5zaXplKCkgLSBpKSwgSU9WX01BWCk7CisKKyAgICAgICAgICAgIGNvbnN0IGF1dG8gcmV0ID0gcHdyaXRldihmZF8sIGRhdGEuZGF0YSgpICsgaSwgY2h1bmssIG5leHRfZGF0YV9wb3NfICsgdG90YWxfd3JpdHRlbik7CisgICAgICAgICAgICBpZiAocmV0IDwgMCkgeworICAgICAgICAgICAgICAgIFBMT0coRVJST1IpIDw8ICJ3cml0ZSBmYWlsZWQgY2h1bmsgc2l6ZSBvZjogIiA8PCBjaHVuaworICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgYXQgb2Zmc2V0OiAiIDw8IG5leHRfZGF0YV9wb3NfICsgdG90YWxfd3JpdHRlbiA8PCAiICIgPDwgZXJybm87CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgdG90YWxfd3JpdHRlbiArPSByZXQ7CisgICAgICAgICAgICBpICs9IGNodW5rOworICAgICAgICB9CisgICAgICAgIGlmICh0b3RhbF93cml0dGVuICE9IHRvdGFsX2RhdGFfc2l6ZSkgeworICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIndyaXRlIGZhaWxlZCBmb3IgZGF0YSB2ZWN0b3Igb2Ygc2l6ZTogIiA8PCBkYXRhLnNpemUoKQorICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBhbmQgdG90YWwgZGF0YSBsZW5ndGg6ICIgPDwgdG90YWxfZGF0YV9zaXplCisgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIGF0IG9mZnNldDogIiA8PCBuZXh0X2RhdGFfcG9zXyA8PCAiICIgPDwgZXJybm8KKyAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIsIG9ubHkgd3JvdGU6ICIgPDwgdG90YWxfd3JpdHRlbjsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgIH0KKworICAgIGhlYWRlcl8ub3BfY291bnQgKz0gb3BzLnNpemUoKTsKKyAgICBuZXh0X2RhdGFfcG9zXyArPSB0b3RhbF9kYXRhX3NpemU7CisKKyAgICByZXR1cm4gdHJ1ZTsKK30KKworYm9vbCBDb3dXcml0ZXJWMzo6RmluYWxpemUoKSB7CisgICAgQ0hFQ0tfR0UoaGVhZGVyXy5wcmVmaXguaGVhZGVyX3NpemUsIHNpemVvZihDb3dIZWFkZXJWMykpOworICAgIENIRUNLX0xFKGhlYWRlcl8ucHJlZml4LmhlYWRlcl9zaXplLCBzaXplb2YoaGVhZGVyXykpOworICAgIGlmICghRmx1c2hDYWNoZU9wcygpKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpXcml0ZUZ1bGx5QXRPZmZzZXQoZmRfLCAmaGVhZGVyXywgaGVhZGVyXy5wcmVmaXguaGVhZGVyX3NpemUsIDApKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgcmV0dXJuIFN5bmMoKTsKK30KKworQ293U2l6ZUluZm8gQ293V3JpdGVyVjM6OkdldENvd1NpemVJbmZvKCkgY29uc3QgeworICAgIENvd1NpemVJbmZvIGluZm87CisgICAgaW5mby5jb3dfc2l6ZSA9IG5leHRfZGF0YV9wb3NfOworICAgIGluZm8ub3BfY291bnRfbWF4ID0gaGVhZGVyXy5vcF9jb3VudF9tYXg7CisgICAgcmV0dXJuIGluZm87Cit9CisKK30gIC8vIG5hbWV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3RkOjp2ZWN0b3I8Q29tcHJlc3NlZEJ1ZmZlcj4gUHJvY2Vzc0Jsb2Nrc1dpdGhOb0NvbXByZXNzaW9uKGNvbnN0IHNpemVfdCBudW1fYmxvY2tzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2b2lkKiBkYXRhLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb3dPcGVyYXRpb25UeXBlIHR5cGUpOworICAgIHN0ZDo6dmVjdG9yPENvbXByZXNzZWRCdWZmZXI+IFByb2Nlc3NCbG9ja3NXaXRoQ29tcHJlc3Npb24oY29uc3Qgc2l6ZV90IG51bV9ibG9ja3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2b2lkKiBkYXRhLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ293T3BlcmF0aW9uVHlwZSB0eXBlKTsKKyAgICBzdGQ6OnZlY3RvcjxDb21wcmVzc2VkQnVmZmVyPiBQcm9jZXNzQmxvY2tzV2l0aFRocmVhZGVkQ29tcHJlc3Npb24oY29uc3Qgc2l6ZV90IG51bV9ibG9ja3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZvaWQqIGRhdGEsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENvd09wZXJhdGlvblR5cGUgdHlwZSk7CisgICAgc3RkOjp2ZWN0b3I8Q29tcHJlc3NlZEJ1ZmZlcj4gQ29tcHJlc3NCbG9ja3MoY29uc3Qgc2l6ZV90IG51bV9ibG9ja3MsIGNvbnN0I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gICAgICAgICAgICAgICAgICAgICAgICAgLnRhcmdldF9wYXJ0aXRpb24gPSBzeXN0ZW1fYiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmN1cnJlbnRfbWV0YWRhdGEgPSBidWlsZGVyX2EuZ2V0KCksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jdXJyZW50X3N1ZmZpeCA9ICJfYSIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC51c2luZ19zbmFwdXNlcmQgPSB0cnVlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudXBkYXRlID0gJnVwZGF0ZX07CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC51cGRhdGUgPSAmdXBkYXRlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudXNpbmdfc25hcHVzZXJkID0gdHJ1ZX07CiAKICAgICBhdXRvIHJldCA9IGNyZWF0b3IuUnVuKCk7CiAgICAgQVNTRVJUX1RSVUUocmV0Lmhhc192YWx1ZSgpKTsKQEAgLTI3NSw4ICsyNzYsOCBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudGFyZ2V0X3BhcnRpdGlvbiA9IHN5c3RlbV9iLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuY3VycmVudF9tZXRhZGF0YSA9IGJ1aWxkZXJfYS5nZXQoKSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLmN1cnJlbnRfc3VmZml4ID0gIl9hIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnVzaW5nX3NuYXB1c2VyZCA9IHRydWUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC51cGRhdGUgPSBudWxscHRyfTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLnVwZGF0ZSA9IG51bGxwdHIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC51c2luZ19zbmFwdXNlcmQgPS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RTbG90U3VmZml4KCk7CisgICAgLy8gV2FsayBib3RoIHRoZSBzbG90cyBhbmQgY2xlYW4gdXAgbWV0YWRhdGEgcmVsYXRlZCB0byBzY3JhdGNoIHNwYWNlIGZyb20KKyAgICAvLyBib3RoIHRoZSBzbG90cy4KKyAgICBmb3IgKGF1dG8gc2xvdCA6IHNsb3RzKSB7CisgICAgICAgIHN0ZDo6dW5pcXVlX3B0cjxNZXRhZGF0YUJ1aWxkZXI+IGJ1aWxkZXIgPSBNZXRhZGF0YUJ1aWxkZXI6Ok5ldyhvcGVuZXIsIHN1cGVyX2RldmljZSwgc2xvdCk7CisgICAgICAgIGlmICghYnVpbGRlcikgeworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisKKyAgICAgICAgaWYgKGJ1aWxkZXItPkZpbmRQYXJ0aXRpb24ocGFydGl0aW9uX25hbWUpICE9IG51bGxwdHIpIHsKKyAgICAgICAgICAgIGJ1aWxkZXItPlJlbW92ZVBhcnRpdGlvbihwYXJ0aXRpb25fbmFtZSk7CisgICAgICAgICAgICBhdXRvIG1ldGFkYXRhID0gYnVpbGRlci0+RXhwb3J0KCk7CisgICAgICAgICAgICBpZiAoIW1ldGFkYXRhKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKCFVcGRhdGVQYXJ0aXRpb25UYWJsZShpbmZvLT5HZXRQYXJ0aXRpb25PcGVuZXIoKSwgc3VwZXJfZGV2aWNlLCAqbWV0YWRhdGEuZ2V0KCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNsb3QpKSB7CisgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiVXBkYXRlUGFydGl0aW9uVGFibGUgZmFpbGVkIGZvciBzbG90OiAiIDw8IHNsb3Q7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKERlc3Ryb3lMb2dpY2FsUGFydGl0aW9uKHBhcnRpdGlvbl9uYW1lKSkgeworICAgICAgICAgICAgICAgIExPRyhJTkZPKSA8PCAiQ2xlYW51cFNjcmF0Y2hPdGFNZXRhZGF0YSBzdWNjZXNzIGZvciBzbG90OiAiIDw8IHNsb3Q7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisKKyAgICByZXR1cm4gdHJ1ZTsKK30KKworc3RhdGljIGJvb2wgU2V0dXBPVEFEaXJzKCkgeworICAgIGlmIChzZXRmc2NyZWF0ZWNvbihhbmRyb2lkOjpzbmFwc2hvdDo6a090YU1ldGFkYXRhRmlsZUNvbnRleHQpKSB7CisgICAgICAgIFBMT0coRVJST1IpIDw8ICJzZXRmc2NyZWF0ZWNvbiBmYWlsZWQ6ICIgPDwgYW5kcm9pZDo6c25hcHNob3Q6OmtPdGFNZXRhZGF0YUZpbGVDb250ZXh0OworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIGNvbnN0IGF1dG8gb3RhX2RpciA9IHN0ZDo6c3RyaW5nKGtPdGFNZXRhZGF0YU1vdW50KSArICIvIiArICJvdGEiOworICAgIGlmIChta2RpcihvdGFfZGlyLmNfc3RyKCksIDA3NTUpICE9IDAgJiYgZXJybm8gIT0gRUVYSVNUKSB7CisgICAgICAgIFBMT0coRVJST1IpIDw8ICJta2RpciAiIDw8IG90YV9kaXI7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICBjb25zdCBhdXRvIHNuYXBzaG90X2RpciA9IG90YV9kaXIgKyAiLyIgKyAic25hcHNob3RzIjsKKyAgICBpZiAobWtkaXIoc25hcHNob3RfZGlyLmNfc3RyKCksIDA3NTUpICE9IDAgJiYgZXJybm8gIT0gRUVYSVNUKSB7CisgICAgICAgIFBMT0coRVJST1IpIDw8ICJta2RpciAiIDw8IHNuYXBzaG90X2RpcjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBpZiAoc2V0ZnNjcmVhdGVjb24obnVsbHB0cikpIHsKKyAgICAgICAgUExPRyhFUlJPUikgPDwgInNldGZzY3JlYXRlY29uIG51bGwiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIHJldHVybiB0cnVlOworfQorCitzdGF0aWMgYm9vbCBNb3VudFNjcmF0Y2goY29uc3Qgc3RkOjpzdHJpbmcmIGRldmljZV9wYXRoKSB7CisgICAgaWYgKGFjY2VzcyhkZXZpY2VfcGF0aC5jX3N0cigpLCBSX09LIHwgV19PSykpIHsKKyAgICAgICAgTE9HKEVSUk9SKSA8PCAiUGF0aCBkb2VzIG5vdCBleGlzdCBvciBpcyBub3QgcmVhZHdyaXRlOiAiIDw8IGRldmljZV9wYXRoOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgc3RkOjpzdHJpbmcgZmlsZXN5c3RlbV9jYW5kaWRhdGU7CisgICAgaWYgKGZzX21ncl9pc19leHQ0KGRldmljZV9wYXRoKSkgeworICAgICAgICBmaWxlc3lzdGVtX2NhbmRpZGF0ZSA9ICJleHQ0IjsKKyAgICB9IGVsc2UgeworICAgICAgICBMT0coRVJST1IpIDw8ICJTY3JhdGNoIHBhcnRpdGlvbiBpcyBub3QgZXh0NCI7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKHNldGZzY3JlYXRlY29uKGFuZHJvaWQ6OnNuYXBzaG90OjprT3RhTWV0YWRhdGFGaWxlQ29udGV4dCkpIHsKKyAgICAgICAgUExPRyhFUlJPUikgPDwgInNldGZzY3JlYXRlY29uIGZhaWxlZDogIiA8PCBhbmRyb2lkOjpzbmFwc2hvdDo6a090YU1ldGFkYXRhRmlsZUNvbnRleHQ7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgaWYgKG1rZGlyKGtPdGFNZXRhZGF0YU1vdW50LCAwNzU1KSAmJiAoZXJybm8gIT0gRUVYSVNUKSkgeworICAgICAgICBQTE9HKEVSUk9SKSA8PCAiY3JlYXRlICIgPDwga090YU1ldGFkYXRhTW91bnQ7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICBhbmRyb2lkOjpmc19tZ3I6OkZzdGFiRW50cnkgZW50cnk7CisgICAgZW50cnkuYmxrX2RldmljZSA9IGRldmljZV9wYXRoOworICAgIGVudHJ5Lm1vdW50X3BvaW50ID0ga090YU1ldGFkYXRhTW91bnQ7CisgICAgZW50cnkuZmxhZ3MgPSBNU19OT0FUSU1FOworICAgIGVudHJ5LmZsYWdzIHw9IE1TX1NZTkNIUk9OT1VTOworICAgIGVudHJ5LmZzX29wdGlvbnMgPSAibm9kaXNjYXJkIjsKKyAgICBmc19tZ3Jfc2V0X2Jsa19ybyhkZXZpY2VfcGF0aCwgZmFsc2UpOworICAgIGVudHJ5LmZzX21ncl9mbGFncy5jaGVjayA9IHRydWU7CisKKyAgICBib29sIG1vdW50ZWQgPSBmYWxzZTsKKyAgICBlbnRyeS5mc190eXBlID0gZmlsZXN5c3RlbV9jYW5kaWRhdGUuY19zdHIoKTsKKyAgICBpZiAoZnNfbWdyX2RvX21vdW50X29uZShlbnRyeSkgPT0gMCkgeworICAgICAgICBtb3VudGVkID0gdHJ1ZTsKKyAgICB9CisKKyAgICBpZiAoc2V0ZnNjcmVhdGVjb24obnVsbHB0cikpIHsKKyAgICAgICAgUExPRyhFUlJPUikgPDwgInNldGZzY3JlYXRlY29uIG51bGwiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIGlmICghbW91bnRlZCkgeworICAgICAgICBybWRpcihrT3RhTWV0YWRhdGFNb3VudCk7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisKKyAgICByZXR1cm4gdHJ1ZTsKK30KKworc3RhdGljIGJvb2wgTWFrZVNjcmF0Y2hGaWxlc3lzdGVtKGNvbnN0IHN0ZDo6c3RyaW5nJiBzY3JhdGNoX2RldmljZSkgeworICAgIHN0ZDo6c3RyaW5nIGZzX3R5cGU7CisgICAgc3RkOjpzdHJpbmcgY29tbWFuZDsKKyAgICBpZiAoIWFjY2VzcyhrTWtFeHQ0LCBYX09LKSkgeworICAgICAgICBmc190eXBlID0gImV4dDQiOworICAgICAgICBjb21tYW5kID0ga01rRXh0NCArICIgLUYgLWIgNDA5NiAtdCBleHQ0IC1tIDAgLU8gaGFzX2pvdXJuYWwgLU0gInMgKyBrT3RhTWV0YWRhdGFNb3VudDsKKyAgICB9IGVsc2UgeworICAgICAgICBMT0coRVJST1IpIDw8ICJObyBzdXBwb3J0ZWQgbWtmcyBjb21tYW5kIG9yIGZpbGVzeXN0ZW0gZHJpdmVyIGF2YWlsYWJsZSwgc3VwcG9ydGVkICIKKyAgICAgICAgICAgICAgICAgICAgICAiZmlsZXN5c3RlbXMgIgorICAgICAgICAgICAgICAgICAgICAgICJhcmU6IGYyZnMsIGV4dDQiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIGNvbW1hbmQgKz0gIiAiICsgc2NyYXRjaF9kZXZpY2UgKyAiID4vZGV2L251bGwgMj4vZGV2L251bGwgPC9kZXYvbnVsbCI7CisgICAgZnNfbWdyX3NldF9ibGtfcm8oc2NyYXRjaF9kZXZpY2UsIGZhbHNlKTsKKyAgICBhdXRvIHJldCA9IHN5c3RlbShjb21tYW5kLmNfc3RyKCkpOworICAgIGlmIChyZXQpIHsKKyAgICAgICAgTE9HKEVSUk9SKSA8PCAibWFrZSAiIDw8IGZzX3R5cGUgPDwgIiBmaWxlc3lzdGVtIG9uICIgPDwgc2NyYXRjaF9kZXZpY2UKKyAgICAgICAgICAgICAgICAgICA8PCAiIHJldHVybj0iIDw8IHJldDsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICByZXR1cm4gdHJ1ZTsKK30KKworc3RhdGljIGJvb2wgQ3JlYXRlRHluYW1pY1NjcmF0Y2goY29uc3QgSVNuYXBzaG90TWFuYWdlcjo6SURldmljZUluZm8qIGluZ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CBzbG90LCB3ZSBkZXRlcm1pbmUgdGhlIHNpemUKKyAgICAgICAgLy8gb2YgYmxvY2sgZGV2aWNlIGJhc2VkIG9uIHRoZSBudW1iZXIgb2YgQ09XIG9wZXJhdGlvbnMuIFdlIGNhbm5vdAorICAgICAgICAvLyB1c2UgYmFzZSBkZXZpY2UgYXMgaXQgd2lsbCBiZSBmcm9tIG9sZGVyIGltYWdlLgorICAgICAgICB1bmlxdWVfZmQgZmQob3Blbihjb3dfZmlsZS5jX3N0cigpLCBPX1JET05MWSB8IE9fQ0xPRVhFQykpOworICAgICAgICBpZiAoZmQgPCAwKSB7CisgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIG9wZW4gIiA8PCBjb3dfZmlsZTsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorCisgICAgICAgIENvd1JlYWRlciByZWFkZXI7CisgICAgICAgIGlmICghcmVhZGVyLlBhcnNlKHN0ZDo6bW92ZShmZCkpKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gcGFyc2UgY293ICIgPDwgY293X2ZpbGU7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKworICAgICAgICB1aW50NjRfdCBkZXZfc3ogPSAwOworICAgICAgICBjb25zdCBhdXRvJiBoZWFkZXIgPSByZWFkZXIuR2V0SGVhZGVyKCk7CisgICAgICAgIGlmIChoZWFkZXIucHJlZml4Lm1ham9yX3ZlcnNpb24gPT0gMikgeworICAgICAgICAgICAgY29uc3Qgc2l6ZV90IG51bV9vcHMgPSByZWFkZXIuZ2V0X251bV90b3RhbF9kYXRhX29wcygpOworICAgICAgICAgICAgZGV2X3N6ID0gKG51bV9vcHMgKiBoZWFkZXIuYmxvY2tfc2l6ZSk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAvLyBjcmVhdGVfc25hcHNob3Qgd2lsbCBza2lwIGluLXBsYWNlIGNv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AiIDw8IHNuYXBzaG90OwogICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgIH0KIApAQCAtMTE2Myw4ICsxMjM1LDggQEAKICAgICAgICAgICAgICAgICB3cm9uZ19waGFzZSA9IHRydWU7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIlVua25vd24gbWVyZ2Ugc3RhdHVzIGZvciBcIiIgPDwgc25hcHNob3QgPDwgIlwiOiAiCi0gICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiXCIiIDw8IHJlc3VsdC5zdGF0ZSA8PCAiXCIiOworICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIlVua25vd24gbWVyZ2Ugc3RhdHVzIGZvciBcIiIgPDwgc25hcHNob3QgPDwgIlwiOiAiIDw8ICJcIiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8IHJlc3VsdC5zdGF0ZSA8PCAiXCIiOwogICAgICAgICAgICAgICAgIGlmIChmYWlsdXJlX2NvZGUgPT0gTWVyZ2VGYWlsdXJlQ29kZTo6T2spIHsKICAgICAgICAgICAgICAgICAgICAgZmFpbHVyZV9jb2RlID0gTWVyZ2VGYWlsdXJlQ29kZTo6VW5leHBlY3RlZE1lcmdlU3RhdGU7CiAgICAgICAgICAgICAgICAgfQpAQCAtMTI0OCwxNCArMTMyMCwxMiBAQAogICAgICAgICAgICBHZXRNZXRhZGF0YVBhcnRpdGlvblN0YXRlKCpjdXJyZW50X21ldGFkYXRhLCBuYW1lKSA9PSBNZXRhZGF0YVBhcnRpdGlvblN0YXRlOjpVcGRhdGVkKTsKIAogICAgIGlmIChVcGRhdGVVc2VzVXNlclNuYXBzaG90cyhsb2NrKSkgewotICAgICAgICBzdGQ6OnN0cmluZyBtZXJnZV9zdGF0dXM7Ci0gICAgICAgIGlmIChFbnN1cmVTbmFwdXNlcmRDb25uZWN0ZWQoKSkgewotICAgICAgICAg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b01lcmdlOiAiIDw8IG5hbWUgPDwgIiBhZnRlciByZXN1bWluZyBtZXJnZSI7CisgICAgICAgICAgICAgICAgYXV0byBjb2RlID0gU3dpdGNoU25hcHNob3RUb01lcmdlKGxvY2ssIG5hbWUpOworICAgICAgICAgICAgICAgIGlmIChjb2RlICE9IE1lcmdlRmFpbHVyZUNvZGU6Ok9rKSB7CisgICAgICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBzd2l0Y2ggc25hcHNob3Q6ICIgPDwgbmFtZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgdG8gbWVyZ2UgZHVyaW5nIHNlY29uZCBwaGFzZSI7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBNZXJnZVJlc3VsdChVcGRhdGVTdGF0ZTo6TWVyZ2VGYWlsZWQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNZXJnZUZhaWx1cmVDb2RlOjpVbmtub3duVGFyZ2V0VHlwZSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIHJldHVybiBNZXJnZVJlc3VsdChVcGRhdGVTdGF0ZTo6TWVyZ2luZyk7CisgICAgICAgICAgICB9CiAgICAgICAgIH0KIAogICAgICAgICBpZiAobWVyZ2Vfc3RhdHVzID09ICJzbmFwc2hvdC1tZXJnZSIpIHsKQEAgLTEzMjYsMTMgKzE0MTEsNiBAQAogICAgICAgICB9CiAgICAgfQogCi0gICAgLy8gTWVyZ2UgaXMgY29tcGxldGUgYXQgdGhpcyBwb2ludAotCi0gICAgYXV0byBjb2RlID0gQ2hlY2tNZXJnZUNvbnNpc3RlbmN5KGxvY2ssIG5hbWUsIHNuYXBzaG90X3N0YXR1cyk7Ci0gICAgaWYgKGNvZGUgIT0gTWVyZ2VGYWlsdXJlQ29kZTo6T2spIHsKLSAgICAgICAgcmV0dXJuIE1lcmdlUmVzdWx0KFVwZGF0ZVN0YXRlOjpNZXJnZUZhaWx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ICAgICAgICBzbmFwdXNlcmRfYXJndi0+ZW1wbGFjZV9iYWNrKCItaW9fdXJpbmciKTsKICAgICAgICAgfQorICAgICAgICBpZiAoVXBkYXRlVXNlc09EaXJlY3QobG9jay5nZXQoKSkpIHsKKyAgICAgICAgICAgIHNuYXB1c2VyZF9hcmd2LT5lbXBsYWNlX2JhY2soIi1vX2RpcmVjdCIpOworICAgICAgICB9CisgICAgICAgIHVpbnQgY293X29wX21lcmdlX3NpemUgPSBHZXRVcGRhdGVDb3dPcE1lcmdlU2l6ZShsb2NrLmdldCgpKTsKKyAgICAgICAgaWYgKGNvd19vcF9tZXJnZV9zaXplICE9IDApIHsKKyAgICAgICAgICAgIHNuYXB1c2VyZF9hcmd2LT5lbXBsYWNlX2JhY2soIi1jb3dfb3BfbWVyZ2Vfc2l6ZT0iICsgc3RkOjp0b19zdHJpbmcoY293X29wX21lcmdlX3NpemUpKTsKKyAgICAgICAgfQorICAgICAgICB1aW50MzJfdCB3b3JrZXJfY291bnQgPSBHZXRVcGRhdGVXb3JrZXJDb3VudChsb2NrLmdldCgpKTsKKyAgICAgICAgaWYgKHdvcmtlcl9jb3VudCAhPSAwKSB7CisgICAgICAgICAgICBzbmFwdXNlcmRfYXJndi0+ZW1wbGFjZV9iYWNrKCItd29ya2VyX2NvdW50PSIgKyBzdGQ6OnRvX3N0cmluZyh3b3JrZXJfY291bnQpKTsKKyAgICAgICAgfQogICAgIH0KIAogICAgIHNpemVfdCBudW1fY293cyA9IDA7CkBAIC0xNzg5LDYgKzE4MTgsOCBAQAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhc2VfcGF0aF9tZXJnZTsKICAgICAgICAgICAgICAgICBzbmFwdXNlcmRfYXJndi0+ZW1wbGFjZV9iYWNrKHN0ZDo6bW92ZShtZXNzYWdlKSk7CiAgICAgICAgICAgICB9CisgICAgICAgICAgICBTZXRSZWFkQWhlYWRTaXplKGNvd19pbWFnZV9kZXZpY2UsIHNuYXBzaG90X3N0YXR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MjgsNiArMzU0NSwxOSBAQAogICAgICAgICAgICAgc3RhdHVzLnNldF9pb191cmluZ19lbmFibGVkKHRydWUpOwogICAgICAgICAgICAgTE9HKElORk8pIDw8ICJpb191cmluZyBmb3Igc25hcHNob3RzIGVuYWJsZWQiOwogICAgICAgICB9CisgICAgICAgIGlmIChHZXRPRGlyZWN0RW5hYmxlZFByb3BlcnR5KCkpIHsKKyAgICAgICAgICAgIHN0YXR1cy5zZXRfb19kaXJlY3QodHJ1ZSk7CisgICAgICAgICAgICBMT0coSU5GTykgPDwgIm9fZGlyZWN0IGZvciBzb3VyY2UgaW1hZ2UgZW5hYmxlZCI7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGlzX2xlZ2FjeV9zbmFwdXNlcmQpIHsKKyAgICAgICAgICAgIHN0YXR1cy5zZXRfbGVnYWN5X3NuYXB1c2VyZCh0cnVlKTsKKyAgICAgICAgICAgIExPRyhJTkZPKSA8PCAiU2V0dGluZyBsZWdhY3lfc25hcHVzZXJkIHRvIHRydWUiOworICAgICAgICB9CisgICAgICAgIHN0YXR1cy5zZXRfY293X29wX21lcmdlX3NpemUoCisgICAgICAgICAgICAgICAgYW5kcm9pZDo6YmFzZTo6R2V0VWludFByb3BlcnR5PHVpbnQzMl90Pigicm8udmlydHVhbF9hYi5jb3dfb3BfbWVyZ2Vfc2l6ZSIsIDApKTsKKyAgICAgICAgc3RhdHVzLnNldF9udW1fd29ya2VyX3RocmVhZHMoCisgICAgICAgICAgICAgICAgYW5kcm9pZDo6YmFzZTo6R2V0VWludFByb3BlcnR5PHVpbnQzMl90Pigicm8udmlydHVhbF9hYi5udW1fd29ya2VyX3RocmVhZHMiLCAwKSk7CisKICAgICB9IGVsc2UgaWYgKGxlZ2FjeV9jb21wcmVzc2lvbikgewogICAgICAgICBMT0coSU5GTykgPDwgIlZpcnR1YWwgQS9CIHVzaW5nIGxlZ2FjeSBzbmFwdXNlcmQiOwogICAgIH0gZWxzZSB7CkBAIC0zMzM1LDEyICszN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3BhdGgsIDZzKSkgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiVGltZWQgb3V0IHdhaXRpbmcgZm9yIGRldmljZSB0byBhcHBlYXI6ICIgPDwgY293X3BhdGg7CisgICAgICAgICAgICByZXR1cm4gUmV0dXJuOjpFcnJvcigpOworICAgICAgICB9CisKICAgICAgICAgaWYgKGl0LT5zZWNvbmQudXNpbmdfc25hcHVzZXJkKCkpIHsKICAgICAgICAgICAgIHVuaXF1ZV9mZCBmZChvcGVuKGNvd19wYXRoLmNfc3RyKCksIE9fUkRXUiB8IE9fQ0xPRVhFQykpOwogICAgICAgICAgICAgaWYgKGZkIDwgMCkgewpAQCAtMzU1Myw5ICszNzkyLDEzIEBACiAgICAgICAgICAgICAgICAgb3B0aW9ucy5zY3JhdGNoX3NwYWNlID0gZmFsc2U7CiAgICAgICAgICAgICB9CiAgICAgICAgICAgICBvcHRpb25zLmNvbXByZXNzaW9uID0gaXQtPnNlY29uZC5jb21wcmVzc2lvbl9hbGdvcml0aG0oKTsKKyAgICAgICAgICAgIGlmIChjb3dfdmVyc2lvbiA+PSAzKSB7CisgICAgICAgICAgICAgICAgb3B0aW9ucy5vcF9jb3VudF9tYXggPSBpdC0+c2Vjb25kLmVzdGltYXRlZF9vcHNfYnVmZmVyX3NpemUoKTsKKyAgICAgICAgICAgICAgICBvcHRpb25zLm1heF9ibG9ja3MgPSB7aXQtPnNlY29uZC5kZXZpY2Vfc2l6ZSgpIC8gb3B0aW9ucy5ibG9ja19zaXplfTsKKyAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgQ293V3JpdGVyIHdyaXRlcihvcHRpb25zKTsKLSAgICAgICAgICAgIGlmICghd3JpdGVyLkluaXRpYWxpemUoZmQpIHx8ICF3cml0ZXIuRmluYWxpemUoKSkgeworICAgICAgICAgICAgYXV0byB3cml0ZXIgPSBDcmVhdGVDb3dXcml0ZXIoY293X3ZlcnNpb24sIG9wdGlvbnMsIHN0ZDo6bW92ZShmZCkpOworICA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VhZHkgaGFuZGxlZCBlYXJsaWVyLCBpbiBIYW5kbGVJbW1pbmVudERhdGFXaXBlLAorICAgICAgICAgICAgICAgIC8vIGJ1dCBpdCB3aWxsIGZhbGwgdGhyb3VnaCBoZXJlIGlmIGEgZm9yd2FyZCBtZXJnZSBpcyByZXF1aXJlZC4KKyAgICAgICAgICAgICAgICAvLworICAgICAgICAgICAgICAgIC8vIElmIEluaXRpYXRlTWVyZ2UgZmFpbHMsIHdlIGVhcmx5IHJldHVybi4gSWYgaXQgc3VjY2VlZHMsIHRoZW4gd2UKKyAgICAgICAgICAgICAgICAvLyBhcmUgZ3VhcmFudGVlZCB0aGF0IHRoZSBuZXh0IGNhbGwgdG8gUHJvY2Vzc1VwZGF0ZVN0YXRlIHdpbGwgbm90CisgICAgICAgICAgICAgICAgLy8gcmV0dXJuIFVudmVyaWZpZWQuCisgICAgICAgICAgICAgICAgaWYgKCFJbml0aWF0ZU1lcmdlKCkpIHsKKyAgICAgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIGluaXRpYXRlIG1lcmdlIG9uIGRhdGEgd2lwZS4iOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gVXBkYXRlU3RhdGU6Ok1lcmdlRmFpbGVkOwogICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIlJldmVydGluZyB0byBvbGQgc2xvdCBzaW5jZSB1cGRhdGUgd2lsbCBiZSBkZWxldGVkLiI7Ci0gICAgICAgICAgICAgICAgZGV2aWNlXy0+U2V0U2xvdEFzVW5ib290YWJsZShzbG90X251bWJlcik7Ci0gICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgIExPRyhJTkZPKSA8PCAiQm9vdGluZyBmcm9tICIgPDwgc2xvdCA8PCAiIHNsb3QsIG5vIGFjdGlvbiBpcyB0YWtlbi4iOworICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgfQotICA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KTsKICAgICAgICAgICAgIGlmICghcmVzKSB7CiAgICAgICAgICAgICAgICAgcmV0dXJuIHJlczsKQEAgLTExODMsMTMgKzEyMzQsMTMgQEAKICAgICAgICAgU0hBMjU2X0NUWCBjdHg7CiAgICAgICAgIFNIQTI1Nl9Jbml0KCZjdHgpOwogCi0gICAgICAgIGlmICghd3JpdGVyLT5vcHRpb25zKCkubWF4X2Jsb2NrcykgeworICAgICAgICBpZiAoIXdyaXRlci0+R2V0TWF4QmxvY2tzKCkpIHsKICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkNvd1dyaXRlciBtdXN0IHNwZWNpZnkgbWF4aW11bSBudW1iZXIgb2YgYmxvY2tzIjsKICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgfQotICAgICAgICBjb25zdCBhdXRvIG51bV9ibG9ja3MgPSB3cml0ZXItPm9wdGlvbnMoKS5tYXhfYmxvY2tzLnZhbHVlKCk7CisgICAgICAgIGNvbnN0IGF1dG8gbnVtX2Jsb2NrcyA9IHdyaXRlci0+R2V0TWF4QmxvY2tzKCkudmFsdWUoKTsKIAotICAgICAgICBjb25zdCBhdXRvIGJsb2NrX3NpemUgPSB3cml0ZXItPm9wdGlvbnMoKS5ibG9ja19zaXplOworICAgICAgICBjb25zdCBhdXRvIGJsb2NrX3NpemUgPSB3cml0ZXItPkdldEJsb2NrU2l6ZSgpOwogICAgICAgICBzdGQ6OnN0cmluZyBibG9jayhibG9ja19zaXplLCAnXDAnKTsKICAgICAgICAgZm9yICh1aW50NjRfdCBpID0gMDsgaSA8IG51bV9ibG9ja3M7IGkrKykgewogICAgICAgICAgICAgaWYgKCFSZWFkRnVsbHkocmFuZCwgYmxvY2suZGF0YSgpLCBibG9jay5zaXplKCkpKSB7CkBAIC0xMjEzLDE3ICsxMjY0LDE3IEBACiAgICAgLy8gSXQgZG9lc24ndCByZWFsbHkgbWF0dGVyIHRoZSBvcmRlciwgd2UganVzdCB3YW50IGNvcGllcyB0aGF0IH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I6OkZpbmRQYXJ0aXRpb247CiB1c2luZyBhbmRyb2lkOjpmc19tZ3I6OkdldFBhcnRpdGlvblNpemU7CkBAIC01NiwzNiArNzUsNjMwIEBACiAgICAgICAgICAgICAgICAgICIgIG1lcmdlXG4iCiAgICAgICAgICAgICAgICAgICIgICAgRGVwcmVjYXRlZC5cbiIKICAgICAgICAgICAgICAgICAgIiAgbWFwXG4iCi0gICAgICAgICAgICAgICAgICIgICAgTWFwIGFsbCBwYXJ0aXRpb25zIGF0IC9kZXYvYmxvY2svbWFwcGVyXG4iOworICAgICAgICAgICAgICAgICAiICAgIE1hcCBhbGwgcGFydGl0aW9ucyBhdCAvZGV2L2Jsb2NrL21hcHBlclxuIgorICAgICAgICAgICAgICAgICAiICBtYXAtc25hcHNob3RzIDxkaXJlY3Rvcnkgd2hlcmUgc25hcHNob3QgcGF0Y2hlcyBhcmUgcHJlc2VudD5cbiIKKyAgICAgICAgICAgICAgICAgIiAgICBNYXAgYWxsIHNuYXBzaG90cyBiYXNlZCBvbiBwYXRjaGVzIHByZXNlbnQgaW4gdGhlIGRpcmVjdG9yeVxuIgorICAgICAgICAgICAgICAgICAiICB1bm1hcC1zbmFwc2hvdHNcbiIKKyAgICAgICAgICAgICAgICAgIiAgICBVbm1hcCBhbGwgcHJlLWNyZWF0ZWQgc25hcHNob3RzXG4iCisgICAgICAgICAgICAgICAgICIgIGRlbGV0ZS1zbmFwc2hvdHNcbiIKKyAgICAgICAgICAgICAgICAgIiAgICBEZWxldGUgYWxsIHByZS1jcmVhdGVkIHNuYXBzaG90c1xuIgorICAgICAgICAgICAgICAgICAiICByZXZlcnQtc25hcHNob3RzXG4iCisgICAgICAgICAgICAgICAgICIgICAgUHJlcGFyZXMgZGV2aWNlcyB0byBib290IHdpdGhvdXQgc25hcHNob3RzIG9uIG5leHQgYm9vdC5cbiIKKyAgICAgICAgICAgICAgICAgIiAgICBUaGlzIGRvZXMgbm90IGRlbGV0ZSB0aGUgc25hcHNob3QuIEl0IG9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DApIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBvcGVuIGZpbGU6ICIgPDwgcGFyc2luZ19maWxlOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIHVpbnQ2NF90IGRldl9zeiA9IGxzZWVrKGZkLmdldCgpLCAwLCBTRUVLX0VORCk7CisgICAgICAgIGlmICghZGV2X3N6KSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJDb3VsZCBub3QgZGV0ZXJtaW5lIGJsb2NrIGRldmljZSBzaXplOiAiIDw8IHBhcnNpbmdfZmlsZTsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorCisgICAgICAgIGNvbnN0IGludCBibG9ja19zeiA9IDRfS2lCOworICAgICAgICBkZXZfc3ogKz0gYmxvY2tfc3ogLSAxOworICAgICAgICBkZXZfc3ogJj0gfihibG9ja19zeiAtIDEpOworCisgICAgICAgIGF1dG8gbnBvcyA9IHBhdGNoZmlsZS5yZmluZCgiLnBhdGNoIik7CisgICAgICAgIGF1dG8gcGFydGl0aW9uX25hbWUgPSBwYXRjaGZpbGUuc3Vic3RyKDAsIG5wb3MpOworCisgICAgICAgIGNocm9tZW9zX3VwZGF0ZV9lbmdpbmU6OkR5bmFtaWNQYXJ0aXRpb25Hcm91cCogZ3JvdXAgPSBudWxscHRyOworICAgICAgICBzdGQ6OnN0cmluZyBncm91cF9uYW1lID0gR2V0R3JvdXBOYW1lKCpzb3VyY2VfbWV0YWRhdGEuZ2V0KCksIHBhcnRpdGlvbl9uYW1lKTsKKyAgICAgICAgaWYgKGdyb3VwX21hcF8uZmluZChncm91cF9uYW1lKSAhPSBncm91cF9tYXBfLmVuZCgpKSB7CisgICAgICAgICAgICBncm91cCA9IGdyb3VwX21hcF9bZ3JvdXBfbmFtZV07CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBncm91cCA9IGRhcC0+YWRkX2dyb3VwcygpOworICAgICAgICAgICAgZ3JvdXAtPnNldF9uYW1lKGdyb3VwX25hbWUpOworICAgICAgICAgICAgZ3JvdXBfbWFwX1tncm91cF9uYW1lXSA9IGdyb3VwOworICAgICAgICB9CisgICAgICAgIGdyb3VwLT5hZGRfcGFydGl0aW9uX25hbWVzKHBhcnRpdGlvbl9uYW1lKTsKKworICAgICAgICBhdXRvIHB1ID0gbWFuaWZlc3RfLm11dGFibGVfcGFydGl0aW9ucygpLT5BZGQoKTsKKyAgICAgICAgcHUtPnNldF9wYXJ0aXRpb25fbmFtZShwYXJ0aXRpb25fbmFtZSk7CisgICAgICAgIHB1LT5zZXRfZXN0aW1hdGVfY293X3NpemUoZGV2X3N6KTsKKworICAgICAgICBDb3dSZWFkZXIgcmVhZGVyOworICAgICAgICBpZiAoIXJlYWRlci5QYXJzZShmZCkpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkNPVyByZWFkZXIgcGFyc2UgZmFpbGVkIjsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorCisgICAgICAgIHVpbnQ2NF90IG5ld19kZXZpY2Vfc2l6ZSA9IDA7CisgICAgICAgIGNvbnN0IGF1dG8mIGhlYWRlciA9IHJlYWRlci5HZXRIZWFkZXIoKTsKKyAgICAgICAgaWYgKGhlYWRlci5wcmVmaXgubWFqb3JfdmVyc2lvbiA9PSAyKSB7CisgICAgICAgICAgICBzaXplX3QgbnVtX29wcyA9IHJlYWRlci5nZXRfbnVtX3RvdGFsX2RhdGFfb3BzKCk7CisgICAgICAgICAgICBuZXdfZGV2aWNlX3NpemUgPSAobnVtX29wcyAqIGhlYWRlci5ibG9ja19zaXplKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIGNvbnN0IGF1dG8mIHYzX2hlYWRlciA9IHJlYWRlci5oZWFkZXJfdjMoKTsKKyAgICAgICAgICAgIG5ld19kZXZpY2Vfc2l6ZSA9IHYzX2hlYWRlci5vcF9jb3VudF9tYXggKiB2M19oZWFkZXIuYmxvY2tfc2l6ZTsKKyAgICAgICAgfQorCisgICAgICAgIExPRyhJTkZPKSA8PCAiUGFydGl0aW9uOiAiIDw8IHBhcnRpdGlvbl9uYW1lIDw8ICIgR3JvdXBfbmFtZTogIiA8PCBncm91cF9uYW1lCisgICAgICAgICAgICAgICAgICA8PCAiIHNpemU6ICIgPDwgbmV3X2RldmljZV9zaXplIDw8ICIgQ09XLXNpemU6ICIgPDwgZGV2X3N6OworICAgICAgICBwdS0+bXV0YWJsZV9uZXdfcGFydGl0aW9uX2luZm8oKS0+c2V0X3NpemUobmV3X2RldmljZV9zaXplKTsKKyAgICB9CisgICAgcmV0dXJuIHRydWU7Cit9CisKK2Jvb2wgTWFwU25hcHNob3RzOjpHZXRDb3dEZXZpY2VQYXRoKHN0ZDo6c3RyaW5nIHBhcnRpdGlvbl9uYW1lLCBzdGQ6OnN0cmluZyogY293X3BhdGgpIHsKKyAgICBhdXRvJiBkbSA9IGFuZHJvaWQ6OmRtOjpEZXZpY2VNYXBwZXI6Okluc3RhbmNlKCk7CisKKyAgICBzdGQ6OnN0cmluZyBjb3dfZGV2aWNlID0gcGFydGl0aW9uX25hbWUgKyAiLWNvdy1pbWciOworICAgIGlmIChtZXRhZGF0YV9zdXBlcl8pIHsKKyAgICAgICAgLy8gSWYgQ09XIGRldmljZSBleGlzdHMgb24gL2RhdGEsIHRoZW4gZGF0YSB3aXBlIGNhbm5vdCBiZSBkb25lLgorICAgICAgICBpZiAoZG0uR2V0RG1EZXZpY2VQYXRoQnlOYW1lKGNvd19kZXZpY2UsIGNvd19wYXRoKSkgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ09XIGRldmljZSBleGlzdHMgb24gL2RhdGE6ICIgPDwgKmNvd19wYXRoOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgfQorCisgICAgY293X2RldmljZSA9IHBhcnRpdGlvbl9uYW1lICsgIi1jb3ciOworICAgIGlmIChkbS5HZXREbURldmljZVBhdGhCeU5hbWUoY293X2RldmljZSwgY293X3BhdGgpKSB7CisgICAgICAgIHJldHVybiB0cnVlOworICAgIH0KKworICAgIExPRyhJTkZPKSA8PCAiRmFpbGVkIHRvIGZpbmQgY293IHBhdGg6ICIgPDwgY293X2RldmljZSA8PCAiIENoZWNraW5nIHRoZSBkZXZpY2UgZm9yIC1pbWcgcGF0aCI7CisgICAgLy8gSWYgdGhlIENPVyBkZXZpY2UgZXhpc3RzIG9ubHkgb24gL2RhdGEKKyAgICBjb3dfZGV2aWNlID0gcGFydGl0aW9uX25hbWUgKyAiLWNvdy1pbWciOworICAgIGlmICghZG0uR2V0RG1EZXZpY2VQYXRoQnlOYW1lKGNvd19kZXZpY2UsIGNvd19wYXRoKSkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gY293IHBhdGg6ICIgPDwgY293X2RldmljZTsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICByZXR1cm4gdHJ1ZTsKK30KKworYm9vbCBNYXBTbmFwc2hvdHM6OkFwcGx5VXBkYXRlKCkgeworICAgIGlmICghUHJlcGFyZVVwZGF0ZSgpKSB7CisgICAgICAgIExPRyhFUlJPUikgPDwgIlByZXBhcmVVcGRhdGUgZmFpbGVkIjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBpZiAoIXNtXy0+QmVnaW5VcGRhdGUoKSkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJCZWdpblVwZGF0ZSBmYWlsZWQiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorICAgIGlmICghc21fLT5DcmVhdGVVcGRhdGVTbmFwc2hvdHMobWFuaWZlc3RfKSkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJDb3VsZCBub3QgYXBwbHkgc25hcHNob3RzIjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIExPRyhJTkZPKSA8PCAiQ3JlYXRlVXBkYXRlU25hcHNob3RzIHN1Y2Nlc3MiOworICAgIGlmICghc21fLT5NYXBBbGxTbmFwc2hvdHMoMTBzKSkgeworICAgICAgICBMT0coRVJST1IpIDw8ICJNYXBBbGxTbmFwc2hvdHMgZmFpbGVkIjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIExPRyhJTkZPKSA8PCAiTWFwQWxsU25hcHNob3RzIHN1Y2Nlc3MiOworCisgICAgYXV0byB0YXJnZXRfc2xvdCA9IGZzX21ncl9nZXRfb3RoZXJfc2xvdF9zdWZmaXgoKTsKKyAgICBmb3IgKGF1dG8mIHBhdGNoZmlsZSA6IHBhdGNoZmlsZXNfKSB7CisgICAgICAgIGF1dG8gbnBvcyA9IHBhdGNoZmlsZS5yZmluZCgiLnBhdGNoIik7CisgICAgICAgIGF1dG8gcGFydGl0aW9uX25hbWUgPSBwYXRjaGZpbGUuc3Vic3RyKDAsIG5wb3MpICsgdGFyZ2V0X3Nsb3Q7CisgICAgICAgIHN0ZDo6c3RyaW5nIGNvd19wYXRoOworICAgICAgICBpZiAoIUdldENvd0RldmljZVBhdGgocGFydGl0aW9uX25hbWUsICZjb3dfcGF0aCkpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBmaW5kIGNvdyBwYXRoIjsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICB0aHJlYWRzXy5lbXBsYWNlX2JhY2soc3RkOjphc3luYyhzdGQ6OmxhdW5jaDo6YXN5bmMsICZNYXBTbmFwc2hvdHM6OldyaXRlU25hcHNob3RQYXRjaCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcywgY293X3BhdGgsIHBhdGNoZmlsZSkpOworICAgIH0KKworICAgIGJvb2wgcmV0ID0gdHJ1ZTsKKyAgICBmb3IgKGF1dG8mIHQgOiB0aHJlYWRzXykgeworICAgICAgICByZXQgPSB0L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CisgICAgaWYgKCFwYXRoLmhhc192YWx1ZSgpKSB7CisgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICB9CisgICAgdGhyZWFkc18uZW1wbGFjZV9iYWNrKHN0ZDo6YXN5bmMoc3RkOjpsYXVuY2g6OmFzeW5jLCAmTWFwU25hcHNob3RzOjpXcml0ZVNuYXBzaG90UGF0Y2gsIHRoaXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGF0aC52YWx1ZSgpLCBzbmFwc2hvdF9wYXRjaCkpOworICAgIHJldHVybiB0cnVlOworfQorCitib29sIE1hcFNuYXBzaG90czo6RmluaXNoU25hcHNob3RXcml0ZXMoKSB7CisgICAgYm9vbCByZXQgPSB0cnVlOworICAgIGZvciAoYXV0byYgdCA6IHRocmVhZHNfKSB7CisgICAgICAgIHJldCA9IHQuZ2V0KCkgJiYgcmV0OworICAgIH0KKworICAgIGxvY2tfID0gbnVsbHB0cjsKKyAgICBpZiAocmV0KSB7CisgICAgICAgIExPRyhJTkZPKSA8PCAiUHJlLWNyZWF0ZWQgc25hcHNob3RzIHN1Y2Nlc3NmdWxseSBjb3BpZWQiOworICAgICAgICBpZiAoIXNtXy0+RmluaXNoZWRTbmFwc2hvdFdyaXRlcyhmYWxzZSkpIHsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gc21fLT5Cb290RnJvbVNuYXBzaG90c1dpdGhvdXRTbG90U3dpdGNoKCk7CisgICAgfQorCisgICAgTE9HKEVSUk9SKSA8PCAiU25hcHNob3QgY29weSBmYWlsZWQiOworICAgIHJldHVybiBmYWxzZTsKK30KKworYm9vbCBNYXBTbmFwc2hvdHM6OlVubWFwQ293SW1hZ2VQYXRoKHN0ZDo6c3RyaW5nJiBuYW1lKSB7CisgICAgc21fID0gU25hcHNob3RNYW5hZ2VyOjpOZXcoKTsKKyAgICByZXR1cm4gc21fLT5Vbm1hcENvd0ltYWdlKG5hbWUpOwor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mF1bHRzIiwKICAgICBkZWZhdWx0czogWwogICAgICAgICAiZnNfbWdyX2RlZmF1bHRzIiwKICAgICBdLApAQCAtMzMsMTUgKzM0LDE2IEBACiB9CiAKIGNjX2xpYnJhcnlfc3RhdGljIHsKLSAgICBuYW1lOiAibGlic25hcHNob3Rfc25hcHVzZXJkIiwKKyAgICBuYW1lOiAibGlic25hcHVzZXJkX2NsaWVudCIsCiAgICAgZGVmYXVsdHM6IFsKICAgICAgICAgImZzX21ncl9kZWZhdWx0cyIsCi0gICAgICAgICJsaWJzbmFwc2hvdF9zbmFwdXNlcmRfZGVmYXVsdHMiLAorICAgICAgICAibGlic25hcHVzZXJkX2NsaWVudF9kZWZhdWx0cyIsCiAgICAgXSwKICAgICByZWNvdmVyeV9hdmFpbGFibGU6IHRydWUsCiAgICAgc3RhdGljX2xpYnM6IFsKICAgICAgICAgImxpYmN1dGlsc19zb2NrZXRzIiwKLSAgICAgICAgImxpYmZzX21nciIsCisgICAgICAgICJsaWJmc19tZ3JfZmlsZV93YWl0IiwKKyAgICAgICAgImxpYmRtIiwKICAgICBdLAogICAgIHNoYXJlZF9saWJzOiBbCiAgICAgICAgICJsaWJiYXNlIiwKQEAgLTU3LDMyICs1OSw0NSBAQAogICAgIGRlZmF1bHRzOiBbCiAgICAgICAgICJmc19tZ3JfZGVmYXVsdHMiLAogICAgIF0sCisgICAgbG9jYWxfaW5jbHVkZV9kaXJzOiBbImluY2x1ZGUvIl0sCiAgICAgc3JjczogWwotICAgICAgICAiZG0tc25hcHNob3QtbWVyZ2Uvc25hcHVzZXJkLmNwcCIsCi0gICAgICAgICJkbS1zbmFwc2hvdC1tZXJnZS9zbmFwdXNlcmRfd29ya2VyLmNwcCIsCi0gICAgICAgICJkbS1zbmFwc2hvdC1tZXJnZS9zbmFwdXNlcmRfcmVhZGFoZWFkLmNwcCIsCisgICAgICAgICJkbV91c2VyX2Jsb2NrX3NlcnZlci5jcHAiLAogICAgICAgICAic25hcHVzZXJkX2J1ZmZlci5jcHAiLAorICAgICAgICAidXNlci1zcGFjZS1tZXJnZS9oYW5kbGVyX21hbmFnZXIuY3BwIiwKKyAgICAgICAgInVzZXItc3BhY2UtbWVyZ2UvbWVyZ2Vfd29ya2VyLmNwcCIsCisgICAgICAgICJ1c2VyLXNwYWNlLW1lcmdlL3JlYWRfd29ya2VyLmNwcCIsCiAgICAgICAgICJ1c2VyLXNwYWNlLW1lcmdlL3NuYXB1c2VyZF9jb3JlLmNwcCIsCi0gICAgICAgICJ1c2VyLXNwYWNlLW1lcmdlL3NuYXB1c2VyZF9kbV91c2VyLmNwcCIsCi0gICAgICAgICJ1c2VyLXNwYWNlLW1lcmdlL3NuYXB1c2VyZF9tZXJnZS5jcHAiLAogICAgICAgICAidXNlci1zcGFjZS1tZXJnZS9zbmFwdXNlcmRfcmVhZGFoZWFkLmNwcCIsCiAgICAgICAgICJ1c2VyLXNwYWNlLW1lcmdlL3NuYXB1c2VyZF90cmFuc2l0aW9ucy5jcHAiLAogICAgICAgICAidXNlci1zcGFjZS1tZXJnZS9zbmFwdXNlcmRfdmVyaWZ5LmNwcCIsCisgICAgICAgICJ1c2VyLXNwYWNlLW1lcmdlL3dvcmtlci5jcHAiLAorICAgICAgICAidXRpbGl0eS5jcHAiLAorICAgIF0sCisgICAgY2ZsYWdzOiBbCisgICAgICAgICItRF9GSUxFX09GRlNFVF9CSVRTPTY0IiwKKyAgICAgICAgIi1XYWxsIiwKKyAgICAgICAgIi1XZXJyb3IiLAogICAgIF0sCiAgICAgc3RhdGljX2xpYnM6IFsKICAgICAgICAgImxpYmJhc2UiLAogICAgICAgICAibGliZG0iLAorICAgICAgICAibGliZXh0Ml91dWlkIiwKICAgICAgICAgImxpYmV4dDRfdXRpbHMiLAogICAgICAgICAibGlic25hcHNob3RfY293IiwKICAgICAgICAgImxpYnVyaW5nIiwKKyAgICAgICAgImxpYnByb2Nlc3Nncm91cCIsCisgICAgICAgICJsaWJwcm9jZXNzZ3JvdXBfdXRpbCIsCisgICAgICAgICJsaWJqc29uY3BwIiwKICAgICBdLAotICAgIGluY2x1ZGVfZGlyczogWyJiaW9uaWMvbGliYy9rZXJuZWwiXSwKKyAgICBleHBvcnRfaW5jbHVkZV9kaXJzOiBbImluY2x1ZGUiXSwKICAgICBoZWFkZXJfbGliczogWworICAgICAgICAibGliY3V0aWxzX2hlYWRlcnMiLAogICAgICAgICAibGlic3RvcmFnZV9saXRlcmFsc19oZWFkZXJzIiwKICAgICBdLAogICAgIHJhbWRpc2tfYXZhaWxhYmxlOiB0cnVlLAogICAgIHZlbmRvcl9yYW1kaXNrX2F2YWlsYWJsZTogdHJ1ZSwKICAgICByZWNvdmVyeV9hdmFpbGFibGU6IHRydWUsCisgICAgaG9zdF9zdXBwb3J0ZWQ6IHRydWUsCiB9CiAKIGNjX2RlZmF1bHRzIHsKQEAgLTkxLDEzICsxMDYsMTQgQEAKICAgICAgICAgImZzX21ncl9kZWZhdWx0cyIsCiAgICAgXSwKICAgICBzcmNzOiBbCi0gICAgICAgICJkbS1zbmFwc2hvdC1tZXJnZS9zbmFwdXNlcmRfc2VydmVyLmNwcCIsCiAgICAgICAgICJzbmFwdXNlcmRfZGFlbW9uLmNwcCIsCiAgICAgICAgICJ1c2VyLXNwYWNlLW1lcmdlL3NuYXB1c2VyZF9zZXJ2ZXIuY3BwIiwKICAgICBdLAogCiAgICAgY2ZsYWdzOiBbCiAgICAgICAgICItRF9GSUxFX09GRlNFVF9CSVRTPTY0IiwKKyAgICAgICAgIi1XYWxsIiwKKyAgICAgICAgIi1XZXJyb3IiLAogICAgIF0sCiAKICAgICBzdGF0aWNfbGliczogWwpAQCAtMTA1LDIzICsxMjEsMjggQEAKICAgICAgICAgImxpYmJyb3RsaSIsCiAgICAgICAgICJsaWJjdXRpbHNfc29ja2V0cyIsCiAgICAgICAgICJsaWJkbSIsCi0gICAgICAgICJsaWJmc19tZ3IiLAorICAgICAgICAibGliZXh0Ml91dWlkIiwKKyAgICAgICAgImxpYmZzX21ncl9maWxlX3dhaXQiLAogICAgICAgICAibGliZ2ZsYWdzIiwKICAgICAgICAgImxpYmxvZyIsCiAgICAgICAgICJsaWJzbmFwc2hvdF9jb3ciLAotICAgICAgICAibGlic25hcHNob3Rfc25hcHVzZXJkIiwKICAgICAgICAgImxpYnNuYXB1c2VyZCIsCisgICAgICAgICJsaWJwcm9jZXNzZ3JvdXAiLAorICAgICAgICAibGlicHJvY2Vzc2dyb3VwX3V0aWwiLAorICAgICAgICAibGlianNvbmNwcCIsCisgICAgICAgICJsaWJzbmFwdXNlcmRfY2xpZW50IiwKICAgICAgICAgImxpYnoiLAogICAgICAgICAibGlibHo0IiwKICAgICAgICAgImxpYmV4dDRfdXRpbHMiLAogICAgICAgICAibGlidXJpbmciLAorICAgICAgICAibGlienN0ZCIsCiAgICAgXSwKIAogICAgIGhlYWRlcl9saWJzOiBbCisgICAgICAgICJsaWJjdXRpbHNfaGVhZGVycyIsCiAgICAgICAgICJsaWJzdG9yYWdlX2xpdGVyYWxzX2hlYWRlcnMiLAogICAgIF0sCiAKLSAgICBpbmNsdWRlX2RpcnM6IFsiYmlvbmljL2xpYmMva2VybmVsIl0sCiAgICAgc3lzdGVtX3NoYXJlZF9saWJzOiBbXSwKIAogICAgIC8vIHNuYXB1c2VyZCBpcyBzdGFydGVkIGR1cmluZyBlYXJseSBib290IGJ5IGZpcnN0LXN0YWdlIGluaXQuIEF0IHRoYXQKQEAgLTEzMCwxMiArMTUxLDYgQEAKICAgICAvLyBzbmFwdXNlcmQsIHdoaWNoIHdvdWxkIGxlYWQgdG8gZGVhZGxvY2sgaWYgd2UgaGFkIHRvIGhhbmRsZSBwYWdlCiAgICAgLy8gZmF1bHRzIGZvciBpdHMgY29kZSBwYWdlcy4KICAgICBzdGF0aWNfZXhlY3V0YWJsZTogdHJ1ZSwKLQotICAgIC8vIFNuYXB1c2VyZCBzZWdmYXVsdHMgd2l0aCBUaGluTFRPCi0gICAgLy8gaHR0cDovL2IvMjA4NTY1NzE3Ci0gICAgbHR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yIsCiAgICAgXSwKICAgICBzcmNzOiBbCi0gICAgICAgICJkbS1zbmFwc2hvdC1tZXJnZS9jb3dfc25hcHVzZXJkX3Rlc3QuY3BwIiwKLSAgICAgICAgImRtLXNuYXBzaG90LW1lcmdlL3NuYXB1c2VyZC5jcHAiLAotICAgICAgICAiZG0tc25hcHNob3QtbWVyZ2Uvc25hcHVzZXJkX3dvcmtlci5jcHAiLAotICAgICAgICAic25hcHVzZXJkX2J1ZmZlci5jcHAiLAorICAgICAgICAidGVzdGluZy9kbV91c2VyX2hhcm5lc3MuY3BwIiwKKyAgICAgICAgInRlc3RpbmcvaGFybmVzcy5jcHAiLAorICAgICAgICAidGVzdGluZy9ob3N0X2hhcm5lc3MuY3BwIiwKKyAgICAgICAgInVzZXItc3BhY2UtbWVyZ2Uvc25hcHVzZXJkX3Rlc3QuY3BwIiwKKyAgICBdLAorICAgIGNmbGFnczogWworICAgICAgICAiLURfRklMRV9PRkZTRVRfQklUUz02NCIsCisgICAgICAgICItV2FsbCIsCisgICAgICAgICItV2Vycm9yIiwKICAgICBdLAogICAgIHNoYXJlZF9saWJzOiBbCiAgICAgICAgICJsaWJiYXNlIiwKQEAgLTE4NCwzNCArMjA4LDk4IEBACiAgICAgXSwKICAgICBzdGF0aWNfbGliczogWwogICAgICAgICAibGliYnJvdGxpIiwKKyAgICAgICAgImxpYmN1dGlsc19zb2NrZXRzIiwKKyAgICAgICAgImxpYmRtIiwKKyAgICAgICAgImxpYmV4dDJfdXVpZCIsCisgICAgICAgICJsaWJleHQ0X3V0aWxzIiwKKyAgICAgICAgImxpYmZzX21ncl9maWxlX3dhaXQiLAorICAgICAgICAibGliZ2ZsYWdzIiwKICAgICAgICAgImxpYmd0ZXN0IiwKICAgICAgICAgImxpYnNuYXBzaG90X2NvdyIsCi0gICAgICAgICJsaWJzbmFwc2hvdF9zbmFwdXNlcmQiLAotICAgICAgICAibGliY3V0aWxzX3NvY2tldHMiLAorICAgICAgICAibGlic25hcHVzZXJkIiwKKyAgICAgICAgImxpYnByb2Nlc3Nncm91cCIsCisgICAgICAgICJsaWJwcm9jZXNzZ3JvdXBfdXRpbCIsCisgICAgICAgICJsaWJqc29uY3BwIiwKKyAgICAgICAgImxpYnVyaW5nIiwKICAgICAgICAgImxpYnoiLAotICAgICAgICAibGliZnNfbWdyIiwKLSAgICAgICAgImxpYmRtIiwKLSAgICAgICAgImxpYmV4dDRfdXRpbHMiLAorICAgIF0sCisgICAgaW5jbHVkZV9kaXJzOiBbCisgICAgICAgICIuIiwKICAgICBdLAogICAgIGhlYWRlcl9saWJzOiBbCiAgICAgICAgICJsaWJzdG9yYWdlX2xpdGVyYWxzX2hlYWRlcnMiLAogICAgICAgICAibGliZmllbWFwX2hlYWRlcnMiLAorICAgICAgICAibGliY3V0aWxzX2hlYWRlcnMiLAogICAgIF0sCiAgICAgdGVzdF9vcHRpb25zOiB7CiAgICAgICAgIG1pbl9zaGlwcGluZ19hcGlfbGV2ZWw6IDMwLAogICAgIH0sCisKKyAgICBjb21waWxlX211bHRpbGliOiAiYm90aCIsCisgICAgbXVsdGlsaWI6IHsKKyAgICAgICAgbGliMzI6IHsKKyAgICAgICAgICAgIHN1ZmZpeDogIjMyIiwKKyAgICAgICAgfSwKKyAgICAgICAgbGliNjQ6IHsKKyAgICAgICAgICAgIHN1ZmZpeDogIjY0IiwKKyAgICAgICAgfSwKKyAgICB9LAorCiAgICAgYXV0b19nZW5fY29uZmlnOiB0cnVlLAotICAgIHJlcXVpcmVfcm9vdDogZmFsc2UsCisgICAgcmVxdWlyZV9yb290OiB0cnVlLAogfQogCiBjY190ZXN0IHsKICAgICBuYW1lOiAic25hcHVzZXJkX3Rlc3QiLAorICAgIGRlZmF1bHRzOiBbInNuYXB1c2VyZF90ZXN0X2RlZmF1bHRzIl0sCisgICAgaG9zdF9zdXBwb3J0ZWQ6IHRydWUsCisgICAgdGVzdF9zdWl0ZXM6IFsKKyAgICAgICAgImdlbmVyYWwtdGVzdHMiLAorICAgIF0sCisgICAgdGVzdF9vcHRpb25zOiB7CisgICAgICAgIHRlc3RfcnVubmVyX29wdGlvbnM6IFsKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBuYW1lOiAiZm9yY2Utbm8tdGVzdC1lcnJvciIsCisgICAgICAgICAgICAgICAgdmFsdWU6ICJmYWxzZSIsCisgICAgICAgICAgICB9LAorICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIG5hbWU6ICJuYXRpdmUtdGVzdC10aW1lb3V0IiwKKyAgICAgICAgICAgICAgICB2YWx1ZTogIjE1bSIsCisgICAgICAgICAgICB9LAorICAgICAgICBdLAorICAgIH0sCit9CisKKy8vIHZ0cyB0ZXN0cyBjYW5ub3QgYmUgaG9zdF9zdXBwb3J0ZWQuCitjY190ZXN0IHsKKyAgICBuYW1lOiAidnRzX3NuYXB1c2VyZF90ZXN0IiwKKyAgICBkZWZhdWx0czogWyJzbmFwdXNlcmRfdGVzdF9kZWZhdWx0cyJdLAorICAgIHRlc3Rfc3VpdGVzOiBbCisgICAgICAgICJ2dHMiLAorICAgIF0sCisgICAgdGVzdF9vcHRpb25zOiB7CisgICAgICAgIC8vIFZBQkMgbWFuZGF0b3J5IGluIEFuZHJvaWQgVCBwZXIgVlNSLgorICAgICAgICBtaW5fc2hpcHBpbmdfYXBpX2xldmVsOiAzMiwKKyAgICB9LAorfQorCitjY19iaW5hcnlfaG9zdCB7CisgICAgbmFtZTogInNuYXB1c2VyZF9leHRyYWN0b3IiLAogICAgIGRlZmF1bHRzOiBbCiAgICAgICAgICJmc19tZ3JfZGVmYXVsdHMiLAogICAgICAgICAibGlic25hcHNob3RfY293X2RlZmF1bHRzIiwKICAgICBdLAogICAgIHNyY3M6IFsKLSAgICAgICAgInVzZXItc3BhY2UtbWVyZ2Uvc25hcHVzZXJkX3Rlc3QuY3BwIiwKKyAgICAgICAgInRlc3RpbmcvZG1fdXNlcl9oYXJuZXNzLmNwcCIsCisgICAgICAgICJ0ZXN0aW5nL2hhcm5lc3MuY3BwIiwKKyAgICAgICAgInRlc3RpbmcvaG9zdF9oYXJuZXNzLmNwcCIsCisgICAgICAgICJ1c2VyLXNwYWNlLW1lcmdlL2V4dHJhY3Rvci5jcHAiLAorICAgICAgICAic25hcHVzZXJkX2V4dHJhY3Rvci5jcHAiLAorICAgIF0sCisgICAgY2ZsYWdzOiBbCisgICAgICAgICItRF9GSUxFX09GRlNFVF9CSVRTPTY0IiwKKyAgICAgICAgIi1XYWxsIiwKKyAgICAgICAgIi1XZXJyb3IiLAogICAgIF0sCiAgICAgc2hhcmVkX2xpYnM6IFsKICAgICAgICAgImxpYmJhc2UiLApAQCAtMjE5LDI1ICszMDcsMjUgQEAKICAgICBdLAogICAgIHN0YXRpY19saWJzOiBbCiAgICAgICAgICJsaWJicm90bGkiLAotICAgICAgICAibGliZ3Rlc3QiLAotICAgICAgICAibGlic25hcHNob3RfY293IiwKLSAgICAgICAgImxpYnNuYXBzaG90X3NuYXB1c2VyZCIsCiAgICAgICAgICJsaWJjdXRpbHNfc29ja2V0cyIsCi0gICAgICAgICJsaWJ6IiwKLSAgICAgICAgImxpYmZzX21nciIsCiAgICAgICAgICJsaWJkbSIsCisgICAgICAgICJsaWJleHQyX3V1aWQiLAogICAgICAgICAibGliZXh0NF91dGlscyIsCi0gICAgICAgICJsaWJ1cmluZyIsCisgICAgICAgICJsaWJmc19tZ3JfZmlsZV93YWl0IiwKICAgICAgICAgImxpYmdmbGFncyIsCisgICAgICAgICJsaWJzbmFwc2hvdF9jb3ciLAorICAgICAgICAibGlic25hcHVzZXJkIiwKKyAgICAgICAgImxpYnByb2Nlc3Nncm91cCIsCisgICAgICAgICJsaWJqc29uY3BwIiwKKyAgICAgICAgImxpYnVyaW5nIiwKKyAgICAgICAgImxpYnoiLAogICAgIF0sCi0gICAgaW5jbHVkZV9kaXJzOiBbImJpb25pYy9saWJjL2tlcm5lbCJdLAorICAgIGluY2x1ZGVfZGlyczogWworICAgICAgICAiLiIsCisgICAgXSwKICAgICBoZWFkZX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c3osIDMpOwotCi0gICAgc2l6ZV90IG9sZF9jaHVuazsKLSAgICBzaXplX3QgbmV3X2NodW5rOwotCi0gICAgZm9yIChpbnQgaSA9IDA7IGkgPCBhcmVhX3N6OyBpKyspIHsKLSAgICAgICAgdm9pZCogYnVmZmVyID0gc25hcHVzZXJkXy0+R2V0RXhjZXB0aW9uQnVmZmVyKGkpOwotICAgICAgICBsb2ZmX3Qgb2Zmc2V0ID0gMDsKLSAgICAgICAgaWYgKGkgPT0gMCkgewotICAgICAgICAgICAgb2xkX2NodW5rID0gMjU2OwotICAgICAgICAgICAgbmV3X2NodW5rID0gMjsKLSAgICAgICAgfSBlbHNlIGlmIChpID09IDEpIHsKLSAgICAgICAgICAgIG9sZF9jaHVuayA9IDUxMjsKLSAgICAgICAgICAgIG5ld19jaHVuayA9IDI1OTsKLSAgICAgICAgfQotICAgICAgICBmb3IgKGludCBqID0gMDsgaiA8IDI1NjsgaisrKSB7Ci0gICAgICAgICAgICBzdHJ1Y3QgZGlza19leGNlcHRpb24qIGRlID0KLSAgICAgICAgICAgICAgICAgICAgcmVpbnRlcnByZXRfY2FzdDxzdHJ1Y3QgZGlza19leGNlcHRpb24qPigoY2hhciopYnVmZmVyICsgb2Zmc2V0KTsKLQotICAgICAgICAgICAgaWYgKGkgIT0gMikgewotICAgICAgICAgICAgICAgIEFTU0VSVF9FUShkZS0+b2xkX2NodW5rLCBvbGRfY2h1bmspOwotICAgICAgICAgICAgICAgIEFTU0VSVF9FUShkZS0+bmV3X2NodW5rLCBuZXdfY2h1bmspOwotICAgICAgICAgICAgICAgIG9sZF9jaHVuayArPSAxOwotICAgICAgICAgICAgICAgIG5ld19jaHVuayArPSAxOwotICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIG9mZnNldCArPSBzaXplb2Yoc3RydWN0IGRpc2tfZXhjZXB0aW9uKTsKLSAgICAgICAgfQotCi0gICAgICAg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LT5uZXdfY2h1bmsgPSBkYXRhX2NodW5rX2lkOwotCi0gICAgICAgIC8vIFN0b3JlIG9wZXJhdGlvbiBwb2ludGVyLgotICAgICAgICBjaHVua192ZWNfLnB1c2hfYmFjayhzdGQ6Om1ha2VfcGFpcihDaHVua1RvU2VjdG9yKGRhdGFfY2h1bmtfaWQpLCBjb3dfb3ApKTsKLSAgICAgICAgbnVtX29wcyArPSAxOwotICAgICAgICBvZmZzZXQgKz0gc2l6ZW9mKHN0cnVjdCBkaXNrX2V4Y2VwdGlvbik7Ci0gICAgICAgIGNvd29wX3JtX2l0ZXItPk5leHQoKTsKLQotICAgICAgICBTTkFQX0xPRyhERUJVRykgPDwgbnVtX29wcyA8PCAiOiIKLSAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgT2xkLWNodW5rOiAiIDw8IGRlLT5vbGRfY2h1bmsgPDwgIiBOZXctY2h1bms6ICIgPDwgZGUtPm5ld19jaHVuazsKLQotICAgICAgICBpZiAobnVtX29wcyA9PSBleGNlcHRpb25zX3Blcl9hcmVhXykgewotICAgICAgICAgICAgLy8gU3RvcmUgaXQgaW4gdmVjdG9yIGF0IHRoZSByaWdodCBpbmRleC4gVGhpcyBtYXBzIHRoZSBjaHVuay1pZCB0bwotICAgICAgICAgICAgLy8gdmVjdG9yIGluZGV4LgotICAgICAgICAgICAgdmVjXy5wdXNoX2JhY2soc3RkOjptb3ZlKGRlX3B0cikpOwotICAgICAgICAgICAgb2Zmc2V0ID0gMDsKLSAgICAgICAgICAgIG51bV9vcHMgPSAwOwotCi0gICAgICAgICAgICAvLyBDcmVhdGUgYnVmZmVyIGZvciBuZXh0IGFyZWEKLSAgICAgICAgICAgIGRlX3B0ciA9IHN0ZDo6bWFrZV91bmlxdWU8dWludDhfdFtdPihleGNlcHRpb25zX3Blcl9hcmVhXyAqCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mKHN0cnVjdCBkaXNrX2V4Y2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IiA8PCBudW1fb3BzCi0gICAgICAgICAgICAgICAgICAgIDw8ICIgUGVuZGluZyBjb3B5IG9wcyBmb3IgdGhpcyBhcmVhOiAiIDw8IHBlbmRpbmdfb3JkZXJlZF9vcHM7Ci0KLSAgICB3aGlsZSAoIWNvd29wX3JtX2l0ZXItPkRvbmUoKSkgewotICAgICAgICBkbyB7Ci0gICAgICAgICAgICBjb25zdCBDb3dPcGVyYXRpb24qIGNvd19vcCA9ICZjb3dvcF9ybV9pdGVyLT5HZXQoKTsKLQotICAgICAgICAgICAgLy8gV2UgaGF2ZSB0d28gY2FzZXMgc3BlY2lmaWMgY2FzZXM6Ci0gICAgICAgICAgICAvLwotICAgICAgICAgICAgLy8gPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgICAgICAgICAgIC8vIENhc2UgMTogT3ZlcmxhcHBpbmcgY29weSByZWdpb25zCi0gICAgICAgICAgICAvLwotICAgICAgICAgICAgLy8gRXg6Ci0gICAgICAgICAgICAvLwotICAgICAgICAgICAgLy8gU291cmNlIC0+IERlc3RpbmF0aW9uCi0gICAgICAgICAgICAvLwotICAgICAgICAgICAgLy8gMTogMTUgLT4gMTgKLSAgICAgICAgICAgIC8vIDI6IDE2IC0+IDE5Ci0gICAgICAgICAgICAvLyAzOiAxNyAtPiAyMAotICAgICAgICAgICAgLy8gNDogMTggLT4gMjEKLSAgICAgICAgICAgIC8vIDU6IDE5IC0+IDIyCi0gICAgICAgICAgICAvLyA2OiAyMCAtPiAyMwotICAgICAgICAgICAgLy8KLSAgICAgICAgICAgIC8vIFdlIGhhdmUgNiBjb3B5IG9wZXJhdGlvbnMgdG8gYmUgZXhlY3V0ZWQgaW4gT1RBIGFuZCB0aGVyZSBpcyBhIG92ZXJsYXAuIFVwZGF0ZS1lbmdpbmUKLSAgICAgICAgICAgIC8vIHdpbGwgd3JpdGUgdG8gQ09XIGZpbGUgYXMgZm9sbG93czoKLSAgICAgICAgICAgIC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FoZWFkCi0gICAgICAgICAgICAvLyB0aHJlYWQgd2lsbCBzZXJ2ZSB0aGUgYmxvY2tzIGZyb20gdGhlIHJlYWQtYWhlYWQgY2FjaGUuCi0gICAgICAgICAgICAvLyBJZiB0aGVyZSBpcyBhIGNyYXNoIGR1cmluZyBtZXJnZTsgb24gc3Vic2VxdWVudCByZWJvb3QsCi0gICAgICAgICAgICAvLyByZWFkLWFoZWFkIHRocmVhZCB3aWxsIHJlY292ZXIgdGhlIGRhdGEgZnJvbSB0aGUKLSAgICAgICAgICAgIC8vIHNjcmF0Y2ggc3BhY2UgYW5kIHJlLWNvbnN0cnVjdCBpdCB0aGVyZWJ5IHRoZXJlCi0gICAgICAgICAgICAvLyBpcyBubyBsb3NzIG9mIGRhdGEuCi0gICAgICAgICAgICAvLwotICAgICAgICAgICAgLy8gTm90ZSB0aGF0IHdlIHdpbGwgZm9sbG93IHRoZSBzYW1lIG9yZGVyIG9mIENPVyBvcGVyYXRpb25zCi0gICAgICAgICAgICAvLyBhcyBwcmVzZW50IGluIHRoZSBDT1cgZmlsZS4gVGhpcyB3aWxsIG1ha2Ugc3VyZSB0aGF0Ci0gICAgICAgICAgICAvLyB0aGUgbWVyZ2Ugb2Ygb3BlcmF0aW9ucyBhcmUgZG9uZSBiYXNlZCBvbiB0aGUgb3BzIHByZXNlbnQKLSAgICAgICAgICAgIC8vIGluIHRoZSBmaWxlLgotICAgICAgICAgICAgLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgICAgICAgICAgdWludDY0X3QgYmxvY2tfc291cmNlID0gY293X29wLT5zb3VyY2U7Ci0gICAgICAgICAgICB1aW50NjRfdCBibG9ja19vZmZzZXQgPSAwOwotICAgICAgICAgICAgaWYgKHByZXZfaWQuaGFzX3ZhbHVlKCkpIHsKLSAgICAgICAgICAgICAgICBpZiAoZGVzdF9ibG9ja3MuY291bnQoY293X29wLT5uZXdfYmxvY2spIHx8IHNvdXJjZV9ibG9ja3MuY291bnQoYmxvY2tfc291cmNlKSB8fAotICAgICAgICAgICAgICAgICAgICAoYmxvY2tfb2Zmc2V0ID4gMCAmJiBzb3VyY2VfYmxvY2tzLmNvdW50KGJsb2NrX3NvdXJjZSArIDEpKSkgewotICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBtZXRhZGF0YV9mb3VuZCA9IHRydWU7Ci0gICAgICAgICAgICBwZW5kaW5nX29yZGVyZWRfb3BzIC09IDE7Ci0gICAgICAgICAgICB2ZWMucHVzaF9iYWNrKGNvd19vcCk7Ci0gICAgICAgICAgICBkZXN0X2Jsb2Nrcy5pbnNlcnQoYmxvY2tfc291cmNlKTsKLSAgICAgICAgICAgIGlmIChibG9ja19vZmZzZXQgPiAwKSB7Ci0gICAgICAgICAgICAgICAgZGVzdF9ibG9ja3MuaW5zZXJ0KGJsb2NrX3NvdXJjZSArIDEpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgc291cmNlX2Jsb2Nrcy5pbnNlcnQoY293X29wLT5uZXdfYmxvY2spOwotICAgICAgICAgICAgcHJldl9pZCA9IGNvd19vcC0+bmV3X2Jsb2NrOwotICAgICAgICAgICAgY293b3Bfcm1faXRlci0+TmV4dCgpOwotICAgICAgICB9IHdoaWxlICghY293b3Bfcm1faXRlci0+RG9uZSgpICYmIHBlbmRpbmdfb3JkZXJlZF9vcHMpOwotCi0gICAgICAgIGRhdGFfY2h1bmtfaWQgPSBHZXROZXh0QWxsb2NhdGFibGVDaHVua0lkKGRhdGFfY2h1bmtfaWQpOwotICAgICAgICBTTkFQX0xPRyhERUJVRykgPDwgIkJhdGNoIE1lcmdlIGNvcHktb3BzIG9mIHNpemU6ICIgPDwgdmVjLnNpemUoKQotICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBBcmVhOiAiIDw8IHZlY18uc2l6ZSgpIDw8ICIgQXJlYSBvZmZzZXQ6ICIgPDwgb2Zmc2V0Ci0gICAgICAgICAgICAgICAgICAgICAgICA8PCAiIFBlbmRpbmctb3JkZXJlZC1vcHMgaW4gdGhpcyBhcmVhOiAiIDw8IHBlbmRpbmdfb3JkZXJlZF9vcHM7Ci0KLSAgICAgICAgZm9yIChzaXplX3QgaSA9IDA7IGkgPCB2ZWMuc2l6ZSgpOyBpKyspIHsKLSAgICAgICAgICAgIHN0cnVjdCBkaXNrX2V4Y2VwdGlvbiogZGUgPQotICAgICAgICAgICAgICAgICAgICByZWludGVycHJldF9jYXN0PHN0cnVjdCBkaXNrX2V4Y2VwdGlvbio+KChjaGFyKilkZV9wdHIuZ2V0KCkgKyBvZmZzZXQpOwotICAgICAgICAgICAgY29uc3QgQ293T3BlcmF0aW9uKiBjb3dfb3AgPSB2ZWNbaV07Ci0KLSAgICAgICAgICAgIGRlLT5vbGRfY2h1bmsgPSBjb3dfb3AtPm5ld19ibG9jazsKLSAgICAgICAgICAgIGRlLT5uZXdfY2h1bmsgPSBkYXRhX2NodW5rX2lkOwotCi0gICAgICAgICAgICAvLyBTdG9yZSBvcGVyYXRpb24gcG9pbnRlci4KLSAgICAgICAgICAgIGNodW5rX3ZlY18ucHVzaF9iYWNrKHN0ZDo6bWFrZV9wYWlyKENodW5rVG9TZWN0b3IoZGF0YV9jaHVua19pZCksIGNvd19vcCkpOwotICAgICAgICAgICAgb2Zmc2V0ICs9IHNpemVvZihzdHJ1Y3QgZGlza19leGNlcHRpb24pOwotICAgICAgICAgICAgbnVtX29wcyArPSAxOwotICAgICAgICAgICAgaWYgKGNvd19vcC0+dHlwZSA9PSBrQ293Q29weU9wKSB7Ci0gICAgICAgICAgICAgICAgY29weV9vcHMrKzsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgaWYgKHJlYWRfYWhlYWRfZmVhdHVyZV8pIHsKLSAgICAgICAgICAgICAgICByZWFkX2FoZWFkX29wc18ucHVzaF9iYWNrKGNvd19vcCk7Ci0gICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgIFNOQVBfTE9HKERFQlVHKSA8PCBudW1fb3BzIDw8ICI6IgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgT3JkZXJlZC1vcDogIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgT2xkLWNodW5rOiAiIDw8IGRlLT5vbGRfY2h1bmsgPDwgIiBOZXctY2h1bms6ICIgPDwgZGUtPm5ld19jaHVuazsKLQotICAgICAgICAgICAgaWYgKG51bV9vcHMgPT0gZXhjZXB0aW9uc19wZXJfYXJlYV8pIHsKLSAgICAgICAgICAgICAgICAvLyBTdG9yZSBpdCBpbiB2ZWN0b3IgYXQgdGhlIHJpZ2h0IGluZGV4LiBUaGlzIG1hcHMgdGhlIGNodW5rLWlkIHRvCi0gICAgICAgICAgICAgICAgLy8gdmVjdG9yIGluZGV4LgotICAgICAgICAgICAgICAgIHZlY18ucHVzaF9iYWNrKHN0ZDo6bW92ZShkZV9wdHIpKTsKLSAgICAgICAgICAgICAgICBudW1fb3BzID0gMDsKLSAgICAgICAgICAgICAgICBvZmZzZXQgPSAwOwotCi0gICAgICAgICAgICAgICAgLy8gQ3JlYXRlIGJ1ZmZlciBmb3IgbmV4dCBhcmVhCi0gICAgICAgICAgICAgICAgZGVfcHRyID0gc3RkOjptYWtlX3VuaXF1ZTx1aW50OF90W10+KGV4Y2VwdGlvbnNfcGVyX2FyZWFfICoKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mKHN0cnVjdCBkaXNrX2V4Y2VwdGlvbikpOwotICAgICAgICAgICAgICAgIG1lbXNldChkZV9wdHIuZ2V0KCksIDAsIChleGNlcHRpb25zX3Blcl9hcmVhXyAqIHNpemVvZihzdHJ1Y3QgZGlza19leGNlcHRpb24pKSk7Ci0KLSAgICAgICAgICAgICAgICBpZiAoY293b3Bfcm1faXRlci0+RG9uZSgpKSB7Ci0gICAgICAgICAgICAgICAgICAgIHZlY18ucHVzaF9iYWNrKHN0ZDo6bW92ZShkZV9wdHIpKTsKLSAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coREVCVUcpIDw8ICJSZWFkTWV0YWRhdGEoKSBjb21wbGV0ZWQ7IE51bWJlciBvZiBBcmVhczogIiA8PCB2ZWNfLnNpemUoKTsKLSAgICAgICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgICAgICBpZiAoIShwZW5kaW5nX29yZGVyZWRfb3BzID09IDApKSB7Ci0gICAgICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiSW52YWxpZCBwZW5kaW5nX29yZGVyZWRfb3BzOiBleHBlY3RlZDogMCBmb3VuZDogIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgcGVuZGluZ19vcmRlcmVkX29wczsKLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBwZW5kaW5nX29yZGVyZWRfb3BzID0gZXhjZXB0aW9uc19wZXJfYXJlYV87Ci0gICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgIGRhdGFfY2h1bmtfaWQgPSBHZXROZXh0QWxsb2NhdGFibGVDaHVua0lkKGRhdGFfY2h1bmtfaWQpOwotICAgICAgICAgICAgdG90YWxfb3JkZXJlZF9vcHMgLT0gMTsKLSAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgKiBTcGxpdCB0aGUgbnVtYmVyIG9mIG9wcyBiYXNlZCBvbiB0aGUgc2l6ZSBvZiByZWFkLWFoZWFkIGJ1ZmZlcgotICAgICAgICAgICAgICogcmVnaW9uLiBXZSBuZWVkIHRvIGVuc3VyZSB0aGF0IGtlcm5lbCBkb2Vzbid0IGlzc3VlIElPIG9uIGJsb2NrcwotICAgICAgICAgICAgICogd2hpY2ggYXJlIG5vdCByZWFkIGJ5IHRoZSByZWFkLWFoZWFkIHRocmVhZC4KLSAgICAgICAgICAgIC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KLSAqICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICogICAgICB8ICAgICAgIE1ldGFkYXRhICAgICAgICB8IDwtIDRrIHBhZ2UKLSAqICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICogICAgICB8ICAgICAgICAgICAgICAgICAgICAgICB8Ci0gKiAgICAgIHwgICAgUmVhZC1haGVhZCBkYXRhICAgIHwKLSAqICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgfAotICogICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gKgotICogU3RhdGUgdHJhbnNpdGlvbnMgYW5kIGNvbW11bmljYXRpb24gYmV0d2VlbiByZWFkLWFoZWFkIHRocmVhZCBhbmQgd29ya2VyCi0gKiB0aHJlYWQgZHVyaW5nIG1lcmdlOgotICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gKgotICogICBXb3JrZXIgVGhyZWFkcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlYWQtQWhlYWQgdGhyZWFkCi0gKiAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotICoKLSAqICAgICAgfAotICogICAgICB8Ci0gKiAgLS0+IC0tLS0tLS0tLS0tLS0tLS0tUkVBRF9BSEVBRF9CRUdJTi0tLS0tLS0tLS0tLS0+fAotICogIHwgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgUkVBRF9BSEVBRF9JTl9QUk9HUkVTUwotICogIHwgIFdBSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAqICB8ICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gKiAgfCAgIHw8LS0tLS0tLS0tLS0tLS0tLS1JT19JTl9QUk9HUkVTUy0tLS0tLS0tLS0tLS0tLQotICogIHwgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAqICB8ICAgfCBJT19JTl9QUkdSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdBSVQKLSAqICB8ICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gKiAgfDwtLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICogICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAqICAgICAgLS0tLS0tLS0tLS0tLS0tLS0tSU9fVEVSTUlOQVRFRC0tLS0tLS0tLS0tLS0tLT58Ci0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRU5ECi0gKgotICoKLSAqID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqCi0gKiBFeGFtcGxlOgotICoKLSAqIFdlIGhhdmUgNiBjb3B5IG9wZXJhdGlvbnMgdG8gYmUgZXhlY3V0ZWQgaW4gT1RBIGFuZCB0aGVyZSBpcyBhIG92ZXJsYXAuIFVwZGF0ZS1lbmdpbmUKLSAqIHdpbGwgd3JpdGUgdG8gQ09XIGZpbGUgYXMgZm9sbG93czoKLSAqCi0gKiBPcC0xOiAyMCAtPiAyMwotICogT3AtMjogMTkgLT4gMjIKLSAqIE9wLTM6IDE4IC0+IDIxCi0gKiBPcC00OiAxNyAtPiAyMAotICogT3AtNTogMTYgLT4gMTkKLSAqIE9wLTY6IDE1IC0+IDE4Ci0gKgotICogUmVhZC1haGVhZCB0aHJlYWQgd2lsbCByZWFkIGFsbCB0aGUgNiBzb3VyY2UgYmxvY2tzIGFuZCBzdG9yZS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LSAgICAgICAgbnJfY29uc2VjdXRpdmUgPSAxOwotICAgICAgICBibG9ja3MucHVzaF9iYWNrKGNvd19vcC0+bmV3X2Jsb2NrKTsKLQotICAgICAgICBpZiAoIW92ZXJsYXBfKSB7Ci0gICAgICAgICAgICBDaGVja092ZXJsYXAoY293X29wKTsKLSAgICAgICAgfQotCi0gICAgICAgIC8qCi0gICAgICAgICAqIEZpbmQgbnVtYmVyIG9mIGNvbnNlY3V0aXZlIGJsb2NrcyB3b3JraW5nIGJhY2t3YXJkcy4KLSAgICAgICAgICovCi0gICAgICAgIHdoaWxlICghUkFJdGVyRG9uZSgpICYmIG51bV9vcHMpIHsKLSAgICAgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogb3AgPSBHZXRSQU9wSXRlcigpOwotICAgICAgICAgICAgQ0hFQ0tfTkUob3AsIG51bGxwdHIpOwotICAgICAgICAgICAgdWludDY0X3QgbmV4dF9vZmZzZXQgPSBvcC0+c291cmNlOwotICAgICAgICAgICAgaWYgKG9wLT50eXBlID09IGtDb3dDb3B5T3ApIHsKLSAgICAgICAgICAgICAgICBuZXh0X29mZnNldCAqPSBCTE9DS19TWjsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGlmIChuZXh0X29mZnNldCArIG5yX2NvbnNlY3V0aXZlICogQkxPQ0tfU1ogIT0gKnNvdXJjZV9vZmZzZXQpIHsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIG5yX2NvbnNlY3V0aXZlICs9IDE7Ci0gICAgICAgICAgICBudW1fb3BzIC09IDE7Ci0gICAgICAgICAgICBibG9ja3MucHVzaF9iYWNrKG9wLT5uZXdfYmxvY2spOwotICAgICAgICAgICAgUkFJdGVyTmV4dCgpOwotCi0gICAgICAgICAgICBpZiAoIW92ZXJsYXBfKSB7Ci0gICAgICAgICAgICAgICAgQ2hlY2tPdmVybGFwKG9wKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotIC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fYmxvY2tdID0gYnVmcHRyOwotICAgICAgICAgICAgb2Zmc2V0ICs9IEJMT0NLX1NaOwotCi0gICAgICAgICAgICBibSA9IHJlaW50ZXJwcmV0X2Nhc3Q8c3RydWN0IFNjcmF0Y2hNZXRhZGF0YSo+KChjaGFyKiltZXRhZGF0YV9idWZmZXJfICsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0YWRhdGFfb2Zmc2V0KTsKLSAgICAgICAgICAgIGJtLT5uZXdfYmxvY2sgPSBuZXdfYmxvY2s7Ci0gICAgICAgICAgICBibS0+ZmlsZV9vZmZzZXQgPSBmaWxlX29mZnNldDsKLQotICAgICAgICAgICAgbWV0YWRhdGFfb2Zmc2V0ICs9IHNpemVvZihzdHJ1Y3QgU2NyYXRjaE1ldGFkYXRhKTsKLSAgICAgICAgICAgIGZpbGVfb2Zmc2V0ICs9IEJMT0NLX1NaOwotCi0gICAgICAgICAgICBsaW5lYXJfYmxvY2tzIC09IDE7Ci0gICAgICAgIH0KLQotICAgICAgICAvLyBSZWFkIGZyb20gdGhlIGJhc2UgZGV2aWNlIGNvbnNlY3V0aXZlIHNldCBvZiBibG9ja3MgaW4gb25lIHNob3QKLSAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpSZWFkRnVsbHlBdE9mZnNldChiYWNraW5nX3N0b3JlX2ZkXywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY2hhciopcmVhZF9haGVhZF9idWZmZXJfICsgYnVmZmVyX29mZnNldCwgaW9fc2l6ZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb3VyY2Vfb2Zmc2V0KSkgewotICAgICAgICAgICAgU05BUF9QTE9HKEVSUk9SKSA8PCAiT3JkZXJlZC1vcCBmYWlsZWQuIFJlYWQgZnJvbSBiYWNraW5nIHN0b3JlOiAiCi0gICAgICAgICAgICA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AgICAgIGlmICghU3RhcnRIYW5kbGVyKCppdGVyKSkgewotICAgICAgICAgICAgICAgIHJldHVybiBTZW5kbXNnKGZkLCAiZmFpbCIpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJzdWNjZXNzIik7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSBEYWVtb25PcGVyYXRpb25zOjpTVE9QOiB7Ci0gICAgICAgICAgICAvLyBNZXNzYWdlIGZvcm1hdDogc3RvcAotICAgICAgICAgICAgLy8KLSAgICAgICAgICAgIC8vIFN0b3AgYWxsIHRoZSB0aHJlYWRzIGdyYWNlZnVsbHkgYW5kIHRoZW4gc2h1dGRvd24gdGhlCi0gICAgICAgICAgICAvLyBtYWluIHRocmVhZAotICAgICAgICAgICAgU2V0VGVybWluYXRpbmcoKTsKLSAgICAgICAgICAgIFNodXRkb3duVGhyZWFkcygpOwotICAgICAgICAgICAgcmV0dXJuIHRydWU7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSBEYWVtb25PcGVyYXRpb25zOjpRVUVSWTogewotICAgICAgICAgICAgLy8gTWVzc2FnZSBmb3JtYXQ6IHF1ZXJ5Ci0gICAgICAgICAgICAvLwotICAgICAgICAgICAgLy8gQXMgcGFydCBvZiB0cmFuc2l0aW9uLCBTZWNvbmQgc3RhZ2UgZGFlbW9uIHdpbGwgYmUKLSAgICAgICAgICAgIC8vIGNyZWF0ZWQgYmVmb3JlIHRlcm1pbmF0aW5nIHRoZSBmaXJzdCBzdGFnZSBkYWVtb24uIEhlbmNlLAotICAgICAgICAgICAgLy8gZm9yIGEgYnJpZWYgcGVyaW9kIGNsaWVudCBtYXkgaGF2ZSB0byBkaXN0aWd1aXNoIGJldHdlZW4KLSAgICAgICAgICAgIC8vIGZpcnN0IHN0YWdlIGRhZW1vbiBhbmQgc2Vjb25kIHN0YWdlIGRhZW1vbi4KLSAgICAgICAgICAgIC8vCi0gICAgICAgICAgICAvLyBTZWNvbmQgc3RhZ2UgZGFlbW9uIGlzIG1hcmtlZCBhcyBhY3RpdmUgYW5kIGhlbmNlIHdpbGwKLSAgICAgICAgICAgIC8vIGJlIHJlYWR5IHRvIHJlY2VpdmUgY29udHJvbCBtZXNzYWdlLgotICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsIEdldERhZW1vblN0YXR1cygpKTsKLSAgICAgICAgfQotICAgICAgICBjYXNlIERhZW1vbk9wZXJhdGlvbnM6OkRFTEVURTogewotICAgICAgICAgICAgLy8gTWVzc2FnZSBmb3JtYXQ6Ci0gICAgICAgICAgICAvLyBkZWxldGUsPG1pc2NfbmFtZT4KLSAgICAgICAgICAgIGlmIChvdXQuc2l6ZSgpICE9IDIpIHsKLSAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJNYWxmb3JtZWQgZGVsZXRlIG1lc3NhZ2UsICIgPDwgb3V0LnNpemUoKSA8PCAiIHBhcnRzIjsKLSAgICAgICAgICAgICAgICByZXR1cm4gU2VuZG1zZyhmZCwgImZhaWwiKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGlmICghUmVtb3ZlQW5kSm9pbkhhbmRsZXIob3V0WzFdKSkgewotICAgICAgICAgICAgICAgIHJldHVybiBTZW5kbXNnKGZkLCAiZmFpbCIpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJzdWNjZXNzIik7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSBEYWVtb25PcGVyYXRpb25zOjpERVRBQ0g6IHsKLSAgICAgICAgICAgIHRlcm1pbmF0aW5nXyA9IHRydWU7Ci0gICAgICAgICAgICByZXR1cm4gdHJ1ZTsKLSAgICAgICAgfQotICAgICAgICBjYXNlIERhZW1vbk9wZXJhdGlvbnM6OlNVUFBPUlRTOiB7Ci0gICAgICAgICAgICBpZiAob3V0LnNpemUoKSAhPSAyKSB7Ci0gICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiTWFs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rOiAiIDw8IGNvd19kZS0+b2xkX2NodW5rOwotICAgICAgICAgICAgICAgIHJldHVybiAtMTsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgaWYgKCEobWVyZ2VkX2RlLT5uZXdfY2h1bmsgPT0gY293X2RlLT5uZXdfY2h1bmspKSB7Ci0gICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJHZXRNZXJnZVN0YXJ0T2Zmc2V0OiBtZXJnZWRfZGUtPm5ld19jaHVuazogIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCBtZXJnZWRfZGUtPm5ld19jaHVuawotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiY293X2RlLT5uZXdfY2h1bms6ICIgPDwgY293X2RlLT5uZXdfY2h1bms7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIC0xOwotICAgICAgICAgICAgfQotCi0gICAgICAgICAgICBvZmZzZXQgKz0gc2l6ZW9mKHN0cnVjdCBkaXNrX2V4Y2VwdGlvbik7Ci0gICAgICAgICAgICAqdW5tZXJnZWRfZXhjZXB0aW9ucyArPSAxOwotICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgIH0KLQotICAgICAgICBicmVhazsKLSAgICB9Ci0KLSAgICBTTkFQX0xPRyhERUJVRykgPDwgIlVubWVyZ2VkX0V4Y2VwdGlvbnM6ICIgPDwgKnVubWVyZ2VkX2V4Y2VwdGlvbnMgPDwgIiBPZmZzZXQ6ICIgPDwgb2Zmc2V0OwotICAgIHJldHVybiBvZmZzZXQ7Ci19Ci0KLWludCBXb3JrZXJUaHJlYWQ6OkdldE51bWJlck9mTWVyZ2VkT3BzKHZvaWQqIG1lcmdlZF9idWZmZXIsIHZvaWQqIHVubWVyZ2VkX2J1ZmZlciwgbG9mZl90IG9mZnNldCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCB1bm1lcmdlZF9leGNlcHRpb25zLCBib29sKiBvcmRlcmVkX29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5rOiAiIDw8IG1lcmdlZF9kZS0+bmV3X2NodW5rOwotICAgICAgICAgICAgcmV0dXJuIC0xOwotICAgICAgICB9Ci0KLSAgICAgICAgaWYgKCEobWVyZ2VkX2RlLT5vbGRfY2h1bmsgPT0gMCkpIHsKLSAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiR2V0TnVtYmVyT2ZNZXJnZWRPcHM6IEludmFsaWQgb2xkLWNodW5rOiAiIDw8IG1lcmdlZF9kZS0+b2xkX2NodW5rOwotICAgICAgICAgICAgcmV0dXJuIC0xOwotICAgICAgICB9Ci0KLSAgICAgICAgaWYgKGNvd19kZS0+bmV3X2NodW5rICE9IDApIHsKLSAgICAgICAgICAgIG1lcmdlZF9vcHNfY3VyX2l0ZXIgKz0gMTsKLSAgICAgICAgICAgIG9mZnNldCArPSBzaXplb2Yoc3RydWN0IGRpc2tfZXhjZXB0aW9uKTsKLSAgICAgICAgICAgIGF1dG8gaXQgPSBzdGQ6Omxvd2VyX2JvdW5kKGNodW5rX3ZlYy5iZWdpbigpLCBjaHVua192ZWMuZW5kKCksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6Om1ha2VfcGFpcihDaHVua1RvU2VjdG9yKGNvd19kZS0+bmV3X2NodW5rKSwgbnVsbHB0ciksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTbmFwdXNlcmQ6OmNvbXBhcmUpOwotCi0gICAgICAgICAgICBpZiAoIShpdCAhPSBjaHVua192ZWMuZW5kKCkpKSB7Ci0gICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJTZWN0b3Igbm90IGZvdW5kOiAiIDw8IENodW5rVG9TZWN0b3IoY293X2RlLT5uZXdfY2h1bmspOwotICAgICAgICAgICAgICAgIHJldHVybiAtMTsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgaWYgKCEoaXQtPmZpcnN0ID09IENodW5rVG9TZWN0b3IoY293X2RlLT5uZXdfY2h1bmspKSkgewotICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiSW52YWxpZCBzZWN0b3I6ICIgPDwgQ2h1bmtUb1NlY3Rvcihjb3dfZGUtPm5ld19jaHVuayk7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIC0xOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgY29uc3QgQ293T3BlcmF0aW9uKiBjb3dfb3AgPSBpdC0+c2Vjb25kOwotCi0gICAgICAgICAgICBpZiAoc25hcHVzZXJkXy0+SXNSZWFkQWhlYWRGZWF0dXJlUHJlc2VudCgpICYmIElzT3JkZXJlZE9wKCpjb3dfb3ApKSB7Ci0gICAgICAgICAgICAgICAgKm9yZGVyZWRfb3AgPSB0cnVlOwotICAgICAgICAgICAgICAgIC8vIEV2ZXJ5IHNpbmdsZSBvcmRlcmVkIG9wZXJhdGlvbiBoYXMgdG8gY29tZSBmcm9tIHJlYWQtYWhlYWQKLSAgICAgICAgICAgICAgICAvLyBjYWNoZS4KLSAgICAgICAgICAgICAgICBpZiAocmVhZF9haGVhZF9idWZmZXJfbWFwLmZpbmQoY293X29wLT5uZXdfYmxvY2spID09IHJlYWRfYWhlYWRfYnVmZmVyX21hcC5lbmQoKSkgewotICAgICAgICAgICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIEJsb2NrOiAiIDw8IGNvd19vcC0+bmV3X2Jsb2NrIDw8ICIgbm90IGZvdW5kIGluIHJlYWQtYWhlYWQgY2FjaGUiCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBTb3VyY2U6ICIgPDwgY293X29wLT5zb3VyY2U7Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgLy8gSWYgdGhpcyBpcyBhIGZpbmFsIGJsb2NrIG1lcmdlZCBpbiB0aGUgcmVhZC1haGVhZCBidWZmZXIKLSAgICAgICAgICAgICAgICAvLyByZWdpb24sIG5vdGlmeSB0aGUgcmVhZC1haGVhZCB0aHJlYWQgdG8gbWFrZSBmb3J3YXJkCi0gICAgICAgICAgICAgICAgLy8gcHJvZ3Jlc3MKLSAgICAgICAgICAgICAgICBpZiAoY293X29wLT5uZXdfYmxvY2sgPT0gc25hcHVzZXJkXy0+R2V0RmluYWxCbG9ja01lcmdlZCgpKSB7Ci0gICAgICAgICAgICAgICAgICAgICpjb21taXQgPSB0cnVlOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgLy8gemVybyBvdXQgdG8gaW5kaWNhdGUgdGhhdCBvcGVyYXRpb24gaXMgbWVyZ2VkLgotICAgICAgICAgICAgY293X2RlLT5vbGRfY2h1bmsgPSAwOwotICAgICAgICAgICAgY293X2RlLT5uZXdfY2h1bmsgPSAwOwotICAgICAgICB9IGVsc2UgaWYgKGNvd19kZS0+b2xkX2NodW5rID09IDApIHsKLSAgICAgICAgICAgIC8vIEFscmVhZHkgbWVyZ2VkIG9wIGluIHByZXZpb3VzIGl0ZXJhdGlvbiBvcgotICAgICAgICAgICAgLy8gVGhpcyBjb3VsZCBhbHNvIHJlcHJlc2VudCBhIHBhcnRpYWxseSBmaWxsZWQgYXJlYS4KLSAgICAgICAgICAgIC8vCi0gICAgICAgICAgICAvLyBJZiB0aGUgb3Agd2FzIG1lcmdlZCBpbiBwcmV2aW91cyBjeWNsZSwgd2UgZG9uJ3QgaGF2ZQotICAgICAgICAgICAgLy8gdG8gY291bnQgdGhlbS4KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJFcnJvciBpbiBtZXJnZSBvcGVyYXRpb24uIEZvdW5kIGludmFsaWQgbWV0YWRhdGE6ICIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIG1lcmdlZF9kZS1vbGQ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gICAgICAgICAgICAgICAgICBzdGQ6Om1ha2VfcGFpcihoZWFkZXItPnNlY3RvciwgbnVsbHB0ciksIFNuYXB1c2VyZDo6Y29tcGFyZSk7Ci0gICAgICAgICAgICBib29sIG5vdF9mb3VuZCA9IChpdCA9PSBjaHVua192ZWMuZW5kKCkgfHwgaXQtPmZpcnN0ICE9IGhlYWRlci0+c2VjdG9yKTsKLSAgICAgICAgICAgIGlmICghb2Zmc2V0ICYmIChyZWFkX3NpemUgPT0gQkxPQ0tfU1opICYmIG5vdF9mb3VuZCkgewotICAgICAgICAgICAgICAgIGlmICghUmVhZERpc2tFeGNlcHRpb25zKGNodW5rLCByZWFkX3NpemUpKSB7Ci0gICAgICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiUmVhZERpc2tFeGNlcHRpb25zIGZhaWxlZCBmb3IgY2h1bmsgaWQ6ICIgPDwgY2h1bmsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICJTZWN0b3I6ICIgPDwgaGVhZGVyLT5zZWN0b3I7Ci0gICAgICAgICAgICAgICAgICAgIGhlYWRlci0+dHlwZSA9IERNX1VTRVJfUkVTUF9FUlJPUjsKLSAgICAgICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgICAgICBTTkFQX0xPRyhERUJVRykgPDwgIlJlYWREaXNrRXhjZXB0aW9ucyBzdWNjZXNzIGZvciBjaHVuayBpZDogIiA8PCBjaHVuawotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIlNlY3RvcjogIiA8PCBoZWFkZXItPnNlY3RvcjsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgIGNodW5rX3QgbnVtX3NlY3RvcnNfcmVhZCA9IChvZmZzZXQgPj4gU0VDVE9SX1NISUZUKTsKLQotICAgICAgICAgICAgICAgIHJldCA9IFJlYWREYXRhKHNlY3RvciArIG51bV9zZWN0b3JzX3JlYWQsIHJlYWRfc2l6ZSk7Ci0gICAgICAgICAgICAgICAgaWYgKHJldCA8IDApIHsKLSAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJSZWFkRGF0YSBmYWlsZWQgZm9yIGNodW5rIGlkOiAiIDw8IGNodW5rCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIFNlY3RvcjogIiA8PCAoc2VjdG9yICsgbnVtX3NlY3RvcnNfcmVhZCkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgc2l6ZTogIiA8PCByZWFkX3NpemUgPDwgIiBoZWFkZXItbGVuOiAiIDw8IGhlYWRlci0+bGVuOwotICAgICAgICAgICAgICAgICAgICBoZWFkZXItPnR5cGUgPSBETV9VU0VSX1JFU1BfRVJST1I7Ci0gICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coREVCVUcpIDw8ICJSZWFkRGF0YSBzdWNjZXNzIGZvciBjaHVuayBpZDogIiA8PCBjaHVuawotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIlNlY3RvcjogIiA8PCBoZWFkZXItPnNlY3RvcjsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9Ci0gICAgICAgIH0KLQotICAgICAgICAvLyBKdXN0IHJldHVybiB0aGUgaGVhZGVyIGlmIGl0IGlzIGFuIGVycm9yCi0gICAgICAgIGlmIChoZWFkZXItPnR5cGUgPT0gRE1fVVNFUl9SRVNQX0VSUk9SKSB7Ci0gICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikgPDwgIklPIHJlYWQgcmVxdWVzdCBmYWlsZWQuLi4iOwotICAgICAgICAgICAgcmV0ID0gMDsKLSAgICAgICAgfQotCi0gICAgICAgIGlmICghaGVhZGVyX3Jlc3BvbnNlKSB7Ci0gICAgICAgICAgICBDSEVDSyhoZWFkZXItPnR5cGU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ICAgICBmZC5yZXNldChURU1QX0ZBSUxVUkVfUkVUUlkoc29ja2V0X2xvY2FsX2NsaWVudCgKKyAgICAgICAgICAgICAgICBzb2NrZXRfbmFtZS5jX3N0cigpLCBBTkRST0lEX1NPQ0tFVF9OQU1FU1BBQ0VfUkVTRVJWRUQsIFNPQ0tfU1RSRUFNKSkpOworICAgICAgICBpZiAoZmQgPj0gMCkgeworICAgICAgICAgICAgYXV0byBjbGllbnQgPSBzdGQ6Om1ha2VfdW5pcXVlPFNuYXB1c2VyZENsaWVudD4oc3RkOjptb3ZlKGZkKSk7CisgICAgICAgICAgICBpZiAoIWNsaWVudC0+VmFsaWRhdGVDb25uZWN0aW9uKCkpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gbnVsbHB0cjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHJldHVybiBjbGllbnQ7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGVycm5vID09IEVOT0VOVCkgeworICAgICAgICAgICAgTE9HKElORk8pIDw8ICJEYWVtb24gc29ja2V0ICIgPDwgc29ja2V0X25hbWUKKyAgICAgICAgICAgICAgICAgICAgICA8PCAiIGRvZXMgbm90IGV4aXN0LCByZXR1cm4gd2l0aG91dCB3YWl0aW5nLiI7CisgICAgICAgICAgICByZXR1cm4gbnVsbHB0cjsKKyAgICAgICAgfQorICAgICAgICBpZiAoZXJybm8gPT0gRUNPTk5SRUZVU0VEKSB7CisgICAgICAgICAgICBjb25zdCBhdXRvIG5vdyA9IHN0ZDo6Y2hyb25vOjpzdGVhZHlfY2xvY2s6Om5vdygpOworICAgICAgICAgICAgY29uc3QgYXV0byBlbGFwc2VkID0gc3RkOjpjaHJvbm86OmR1cmF0aW9uX2Nhc3Q8c3RkOjpjaHJvbm86Om1pbGxpc2Vjb25kcz4obm93IC0gc3RhcnQpOworICAgICAgICAgICAgaWYgKGVsYXBzZWQgPj0gdGltZW91dF9tcykgeworICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIlRpbWVkIG91dCBjb25uZWN0aW5nIHRvIHNuYXB1c2VyZCBzb2NrZXQ6ICIgPDwgc29ja2V0X25hbWU7CisgICAgICAgICAgICAgICAgcmV0dXJuIG51bGxwdHI7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBzdGQ6OnRoaXNfdGhyZWFkOjpzbGVlcF9mb3IoMTBtcyk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAiY29ubmVjdCBmYWlsZWQ6ICIgPDwgc29ja2V0X25hbWU7CisgICAgICAgICAgICByZXR1cm4gbnVsbHB0cjsKKyAgICAgICAgfQorICAgIH0KK30KKwogc3RkOjp1bmlxdWVfcHRyPFNuYXB1c2VyZENsaWVudD4gU25hcHVzZXJkQ2xpZW50OjpDb25uZWN0KGNvbnN0IHN0ZDo6c3RyaW5nJiBzb2NrZXRfbmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6OmNocm9ubzo6bWlsbGlzZWNvbmRzIHRpbWVvdXRfbXMpIHsKICAgICB1bmlxdWVfZmQgZmQ7CkBAIC0yNzYsNiArMzExLDExIEBACiAgICAgfQogICAgIHN0ZDo6c3RyaW5nIHJlc3BvbnNlID0gUmVjZWl2ZW1zZygpOwogCisgICAgLy8gSWYgc2VydmVyIHNvY2tldCBkaXNjb25uZWN0cyBtb3N0IGxpa2VseSBiZWNhdXNlIG9mIGRldmljZSByZWJvb3QsCisgICAgLy8gdGhlbiB3ZSBqdXN0IHJldHVybiAwLgorICAgIGlmIChyZXNwb25zZS5lbXB0eSgpKSB7CisgICAgICAgIHJldHVybiAwLjA7CisgICAgfQogICAgIHJldHVybiBzdGQ6OnN0b2QocmVzcG9uc2UpOwogfQogCkBAIC0yOTksNyArMzM5LDIxIEBACiB9CiAKIHN0ZDo6c3RyaW5nIFNuYXB1c2VyZENsaWVudDo6R2V0RGFlbW9uQWxpdmVJbmRpY2F0b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hlci52YWxpZF8gPSBmYWxzZTsKKyAgICB9CisgICAgflRlbXBkZXZpY2UoKSB7CisgICAgICAgIGlmICh2YWxpZF8pIHsKKyAgICAgICAgICAgIGRtXy5EZWxldGVEZXZpY2VJZkV4aXN0cyhuYW1lXyk7CisgICAgICAgIH0KKyAgICB9CisgICAgYm9vbCBEZXN0cm95KCkgeworICAgICAgICBpZiAoIXZhbGlkXykgeworICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgIH0KKyAgICAgICAgdmFsaWRfID0gZmFsc2U7CisgICAgICAgIHJldHVybiBkbV8uRGVsZXRlRGV2aWNlSWZFeGlzdHMobmFtZV8pOworICAgIH0KKyAgICBjb25zdCBzdGQ6OnN0cmluZyYgcGF0aCgpIGNvbnN0IHsgcmV0dXJuIHBhdGhfOyB9CisgICAgY29uc3Qgc3RkOjpzdHJpbmcmIG5hbWUoKSBjb25zdCB7IHJldHVybiBuYW1lXzsgfQorICAgIGJvb2wgdmFsaWQoKSBjb25zdCB7IHJldHVybiB2YWxpZF87IH0KKworICAgIFRlbXBkZXZpY2UoY29uc3QgVGVtcGRldmljZSYpID0gZGVsZXRlOworICAgIFRlbXBkZXZpY2UmIG9wZXJhdG9yPShjb25zdCBUZW1wZGV2aWNlJikgPSBkZWxldGU7CisKKyAgICBUZW1wZGV2aWNlJiBvcGVyYXRvcj0oVGVtcGRldmljZSYmIG90aGVyKSBub2V4Y2VwdCB7CisgICAgICAgIG5hbWVfID0gb3RoZXIubmFtZV87CisgICAgICAgIHZhbGlkXyA9IG90aGVyLnZhbGlkXzsKKyAgICAgICAgb3RoZXIudmFsaWRfID0gZmFsc2U7CisgICAgICAgIHJldHVybiAqdGhpczsKKyAgICB9CisKKyAgcHJpdmF0ZToKKyAgICBEZXZpY2VNYXBwZXImIGRtXzsKKyAgICBzdGQ6OnN0cmluZyBuYW1lXzsKKyAgICBzdGQ6OnN0cmluZyBwYXRoXzsKKyAgICBib29sIHZhbGlkXzsKK307CisKK30gIC8v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w8IGFjdGl2ZV9tZXJnZV90aHJlYWRzXzsKKyAgICAgICAgeworICAgICAgICAgICAgYXV0byBudW1fbWVyZ2VfdGhyZWFkcyA9IGFuZHJvaWQ6OmJhc2U6OkdldFVpbnRQcm9wZXJ0eTx1aW50PigKKyAgICAgICAgICAgICAgICAgICAgInJvLnZpcnR1YWxfYWIubnVtX21lcmdlX3RocmVhZHMiLCBrTWF4TWVyZ2VUaHJlYWRzKTsKKyAgICAgICAgICAgIHN0ZDo6bG9ja19ndWFyZDxzdGQ6Om11dGV4PiBsb2NrKGxvY2tfKTsKKyAgICAgICAgICAgIHdoaWxlIChhY3RpdmVfbWVyZ2VfdGhyZWFkc18gPCBudW1fbWVyZ2VfdGhyZWFkcyAmJiBtZXJnZV9oYW5kbGVyc18uc2l6ZSgpID4gMCkgeworICAgICAgICAgICAgICAgIGF1dG8gaGFuZGxlciA9IG1lcmdlX2hhbmRsZXJzXy5mcm9udCgpOworICAgICAgICAgICAgICAgIG1lcmdlX2hhbmRsZXJzXy5wb3AoKTsKKworICAgICAgICAgICAgICAgIGlmICghaGFuZGxlci0+c25hcHVzZXJkKCkpIHsKKyAgICAgICAgICAgICAgICAgICAgTE9HKElORk8pIDw8ICJNb25pdG9yTWVyZ2U6IHNraXBwaW5nIGRlbGV0ZWQgaGFuZGxlcjogIiA8PCBoYW5kbGVyLT5taXNjX25hbWUoKTsKKyAgICAgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgTE9HKElORk8pIDw8ICJTdGFydGluZyBtZXJnZSBmb3IgcGFydGl0aW9uOiAiCisgICAgICAgICAgICAgICAgICAgICAgICAgIDw8IGhhbmRsZXItPnNuYXB1c2VyZCgpLT5HZXRNaXNjTmFtZSgpOworICAgICAgICAgICAgICAgIGhhbmRsZXItPnNuYXB1c2VyZCgpLT5Jbml0aWF0ZU1lcmdlKCk7CisgICAgICAgICAgICAgICAgYWN0aXZlX21lcmdlX3RocmVh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0aXRpb24gdmVyaWZpY2F0aW9uCisgICAgdmlydHVhbCB2b2lkIERpc2FibGVWZXJpZmljYXRpb24oKSA9IDA7Cit9OworCitjbGFzcyBTbmFwc2hvdEhhbmRsZXJNYW5hZ2VyIGZpbmFsIDogcHVibGljIElTbmFwc2hvdEhhbmRsZXJNYW5hZ2VyIHsKKyAgcHVibGljOgorICAgIFNuYXBzaG90SGFuZGxlck1hbmFnZXIoKTsKKyAgICBzdGQ6OnNoYXJlZF9wdHI8SGFuZGxlclRocmVhZD4gQWRkSGFuZGxlcihjb25zdCBzdGQ6OnN0cmluZyYgbWlzY19uYW1lLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBjb3dfZGV2aWNlX3BhdGgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIGJhY2tpbmdfZGV2aWNlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBiYXNlX3BhdGhfbWVyZ2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjpzaGFyZWRfcHRyPElCbG9ja1NlcnZlck9wZW5lcj4gb3BlbmVyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBudW1fd29ya2VyX3RocmVhZHMsIGJvb2wgdXNlX2lvdXJpbmcsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm9vbCBvX2RpcmVjdCwgdWludDMyX3QgY293X29wX21lcmdlX3NpemUpIG92ZXJyaWRlOworICAgIGJvb2wgU3RhcnRIYW5kbGVyKGNvbnN0IHN0ZDo6c3RyaW5nJiBtaXNjX25hbWUpIG92ZXJyaWRlOworICAgIGJvb2wgRGVsZXRlSGF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50MzJfdD4oKnBlbmRpbmdfb3BzKSk7CisgICAgfQorCiAgICAgaW50IG5yX2NvbnNlY3V0aXZlID0gMDsKICAgICBib29sIGNoZWNrT3JkZXJlZE9wID0gKHJlcGxhY2VfemVyb192ZWMgPT0gbnVsbHB0cik7CisgICAgc2l6ZV90IG51bV9ibG9ja3MgPSAxOwogCiAgICAgZG8gewotICAgICAgICBpZiAoIWNvd29wX2l0ZXJfLT5Eb25lKCkgJiYgbnVtX29wcykgewotICAgICAgICAgICAgY29uc3QgQ293T3BlcmF0aW9uKiBjb3dfb3AgPSAmY293b3BfaXRlcl8tPkdldCgpOworICAgICAgICBpZiAoIWNvd29wX2l0ZXJfLT5BdEVuZCgpICYmIG51bV9vcHMpIHsKKyAgICAgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogY293X29wID0gY293b3BfaXRlcl8tPkdldCgpOwogICAgICAgICAgICAgaWYgKGNoZWNrT3JkZXJlZE9wICYmICFJc09yZGVyZWRPcCgqY293X29wKSkgewogICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAqc291cmNlX29mZnNldCA9IGNvd19vcC0+bmV3X2Jsb2NrICogQkxPQ0tfU1o7CisgICAgICAgICAgICAqc291cmNlX29mZnNldCA9IHN0YXRpY19jYXN0PHVpbnQ2NF90Pihjb3dfb3AtPm5ld19ibG9jaykgKiBCTE9DS19TWjsKICAgICAgICAgICAgIGlmICghY2hlY2tPcmRlcmVkT3ApIHsKICAgICAgICAgICAgICAgICByZXBsYWNlX3plcm9fdmVjLT5wdXNoX2JhY2soY293X29wKTsKKyAgICAgICAgICAgICAgICBpZiAoY293X29wLT50eXBlKCkgPT0ga0Nvd1JlcGxhY2VPcCkgeworICAgICAgICAgICAgICAgICAgICAvLyBHZXQgdGhlIG51bWJlciBvZiBibG9ja3MgdGhpcyBvcCBoYXMgY29tcHJlc3NlZAorICAgICAgICAgICAgICAgICAgICBudW1fYmxvY2tzID0gKENvd09wQ29tcHJlc3Npb25TaXplKGNvd19vcCwgQkxPQ0tfU1opIC8gQkxPQ0tfU1opOworICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgY293b3BfaXRlcl8tPk5leHQoKTsKLSAgICAgICAgICAgIG51bV9vcHMgLT0gMTsKLSAgICAgICAgICAgIG5yX2NvbnNlY3V0aXZlID0gMTsKKyAgICAgICAgICAgIG51bV9vcHMgLT0gbnVtX2Jsb2NrczsKKyAgICAgICAgICAgIG5yX2NvbnNlY3V0aXZlID0gbnVtX2Jsb2NrczsKIAotICAgICAgICAgICAgd2hpbGUgKCFjb3dvcF9pdGVyXy0+RG9uZSgpICYmIG51bV9vcHMpIHsKLSAgICAgICAgICAgICAgICBjb25zdCBDb3dPcGVyYXRpb24qIG9wID0gJmNvd29wX2l0ZXJfLT5HZXQoKTsKKyAgICAgICAgICAgIHdoaWxlICghY293b3BfaXRlcl8tPkF0RW5kKCkgJiYgbnVtX29wcykgeworICAgICAgICAgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogb3AgPSBjb3dvcF9pdGVyXy0+R2V0KCk7CiAgICAgICAgICAgICAgICAgaWYgKGNoZWNrT3JkZXJlZE9wICYmICFJc09yZGVyZWRPcCgqb3ApKSB7CiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIHVpbnQ2NF90IG5leHRfb2Zmc2V0ID0gb3AtPm5ld19ibG9jayAqIEJMT0NLX1NaOworICAgICAgICAgICAgICAgIHVpbnQ2NF90IG5leHRfb2Zmc2V0ID0gc3RhdGljX2Nhc3Q8dWludDY0X3Q+KG9wLT5uZXdfYmxvY2spICogQkxPQ0tfU1o7CiAgICAgICAgICAgICAgICAgaWYgKG5leHRfb2Zmc2V0ICE9ICgqc291cmNlX29mZnNldCArIG5yX2NvbnNlY3V0aXZlICogQkxPQ0tfU1opKSB7CiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgIGlmICghY2hlY2tPcmRlcmVkT3ApIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKG9wLT50eXBlKCkgPT0ga0Nvd1JlcGxhY2VPcCkgeworICAgICAgICAgICAgICAgICAgICAgICAgbnVtX2Jsb2NrcyA9IChDb3dPcENvbXByZXNzaW9uU2l6ZShvcCwgQkxPQ0tfU1opIC8gQkxPQ0tfU1opOworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG51bV9vcHMgPCBudW1fYmxvY2tzKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyB6ZXJvIG9wCisgICAgICAgICAgICAgICAgICAgICAgICBudW1fYmxvY2tzID0gMTsKKyAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICByZXBsYWNlX3plcm9fdmVjLT5wdXNoX2JhY2sob3ApOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIG5yX2NvbnNlY3V0aXZlICs9IDE7Ci0gICAgICAgICAgICAgICAgbnVtX29wcyAtPSAxOworICAgICAgICAgICAgICAgIG5yX2NvbnNlY3V0aXZlICs9IG51bV9ibG9ja3M7CisgICAgICAgICAgICAgICAgbnVtX29wcyAtPSBudW1fYmxvY2tzOwogICAgICAgICAgICAgICAgIGNvd29wX2l0ZXJfLT5OZXh0KCk7CiAgICAgICAgICAgICB9CiAgICAgICAgIH0KQEAgLTcwLDIyICsxMDIsMjIgQEAKICAgICByZXR1cm4gbnJfY29uc2VjdXRpdmU7CiB9CiAKLWJvb2wgV29ya2VyOjpNZXJnZVJlcGxhY2VaZXJvT3BzKCkgewotICAgIC8vIEZsdXNoIGFmdGVyIG1lcmdpbmcgMk1CLiBTaW5jZSBhbGwgb3BzIG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oUEFZTE9BRF9CVUZGRVJfU1ogLyBCTE9DS19TWik7CiAgICAgaW50IG51bV9vcHNfbWVyZ2VkID0gMDsKIAogICAgIFNOQVBfTE9HKElORk8pIDw8ICJNZXJnZVJlcGxhY2VaZXJvT3BzIHN0YXJ0ZWQuLi4uIjsKIAotICAgIHdoaWxlICghY293b3BfaXRlcl8tPkRvbmUoKSkgeworICAgIHdoaWxlICghY293b3BfaXRlcl8tPkF0RW5kKCkpIHsKICAgICAgICAgaW50IG51bV9vcHMgPSBQQVlMT0FEX0JVRkZFUl9TWiAvIEJMT0NLX1NaOwogICAgICAgICBzdGQ6OnZlY3Rvcjxjb25zdCBDb3dPcGVyYXRpb24qPiByZXBsYWNlX3plcm9fdmVjOwogICAgICAgICB1aW50NjRfdCBzb3VyY2Vfb2Zmc2V0OwpAQCAtOTMsMjYgKzEyNSwzMyBAQAogICAgICAgICBpbnQgbGluZWFyX2Jsb2NrcyA9IFByZXBhcmVNZXJnZSgmc291cmNlX29mZnNldCwgJm51bV9vcHMsICZyZXBsYWNlX3plcm9fdmVjKTsKICAgICAgICAgaWYgKGxpbmVhcl9ibG9ja3MgPT0gMCkgewogICAgICAgICAgICAgLy8gTWVyZ2UgY29tcGxldGUKLSAgICAgICAgICAgIENIRUNLKGNvd29wX2l0ZXJfLT5Eb25lKCkpOworICAgICAgICAgICAgQ0hFQ0soY293b3BfaXRlcl8tPkF0RW5kKCkpOwogICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIH0KIAogICAgICAgICBmb3IgKHNpemVfdCBpID0gMDsgaSA8IHJlcGxhY2VfemVyb192ZWMuc2l6ZSgpOyBpKyspIHsKICAgICAgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogY293X29wID0gcmVwbGFjZV96ZXJvX3ZlY1tpXTsKLSAgICAgICAgICAgIGlmIChjb3dfb3AtPnR5cGUgPT0ga0Nvd1JlcGxhY2VPcCkgewotICAgICAgICAgICAgICAgIGlmICghUHJvY2Vzc1JlcGxhY2VPcChjb3dfb3ApKSB7Ci0gICAgICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiTWVyZ2UgLSBSZXBsYWNlT3AgZmFpbGVkIGZvciBibG9jazogIiA8PCBjb3dfb3AtPm5ld19ibG9jazsKKyAgICAgICAgICAgIGlmIChjb3dfb3AtPnR5cGUoKSA9PSBrQ293UmVwbGFjZU9wKSB7CisgICAgICAgICAgICAgICAgc2l6ZV90IGJ1ZmZlcl9zaXplID0gQ293T3BDb21wcmVzc2lvblNpemUoY293X29wLCBCTE9DS19TWik7CisgICAgICAgICAgICAgICAgdm9pZCogYnVmZmVyID0gYnVmc2lua18uQWNxdWlyZUJ1ZmZlcihidWZmZXJfc2l6ZSk7CisgICAgICAgICAgICAgICAgaWYgKCFidWZmZXIpIHsKKyAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJBY3F1aXJlQnVmZmVyIGZhaWxlZCBpbiBNZXJnZVJlcGxhY2VPcHMiOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIC8vIFJlYWQgdGhlIGVudGlyZSBjb21wcmVzc2VkIGJ1ZmZlciBzcGFubmluZyBtdWx0aXBsZSBibG9ja3MKKyAgICAgICAgICAgICAgICBpZiAoIXJlYWRlcl8tPlJlYWREYXRhKGNvd19vcCwgYnVmZmVyLCBidWZmZXJfc2l6ZSkpIHsKKyAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gcmVhZCBDT1cgaW4gbWVyZ2UiOwogICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICBDSEVDSyhjb3dfb3AtPnR5cGUgPT0ga0Nvd1plcm9PcCk7Ci0gICAgICAgICAgICAgICAgaWYgKCFQcm9jZXNzWmVyb09wKCkpIHsKLSAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJNZXJnZSBaZXJvT3AgZmFpbGVkLiI7CisgICAgICAgICAgICAgICAgdm9pZCogYnVmZmVyID0gYnVmc2lua18uQWNxdWlyZUJ1ZmZlcihCTE9DS19TWik7CisgICAgICAgICAgICAgICAgaWYgKCFidWZmZXIpIHsKKyAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJBY3F1aXJlQnVmZmVyIGZhaWxlZCBpbiBNZXJnZVJlcGxhY2VPcHMiOwogICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIENIRUNLKGNvd19vcC0+dHlwZSgpID09IGtDb3daZXJvT3ApOworICAgICAgICAgICAgICAgIG1lbXNldChidWZmZXIsIDAsIEJMT0NLX1NaKTsKICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgYnVmc2lua18uVXBkYXRlQnVmZmVyT2Zmc2V0KEJMT0NLX1NaKTsKICAgICAgICAgfQogCiAgICAgICAgIHNpemVfdCBpb19zaXplID0gbGluZWFyX2Jsb2NrcyAqIEJMT0NLX1NaOwpAQCAtMTI3LDcgKzE2Niw3IEBACiAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgIH0KIAotICAgICAgICBudW1fb3BzX21lcmdlZCArPSBsaW5lYXJfYmxvY2tzOworICAgICAgICBudW1fb3BzX21lcmdlZCArPSByZXBsYWNlX3plcm9fdmVjLnNpemUoKTsKIAogICAgICAgICBpZiAobnVtX29wc19tZXJnZWQgPj0gdG90YWxfb3BzX21lcmdlZF9wZXJfY29tbWl0KSB7CiAgICAgICAgICAgICAvLyBGbHVzaCB0aGUgZGF0YQpAQCAtMTQ4LDggKzE4Nyw4IEBACiAgICAgICAgIGJ1ZnNpbmtfLlJlc2V0QnVmZmVyT2Zmc2V0KCk7CiAKICAgICAgICAgaWYgK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XJfLT5BdEVuZCgpKSB7CisgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogY293X29wID0gY293b3BfaXRlcl8tPkdldCgpOwogICAgICAgICBpZiAoIUlzT3JkZXJlZE9wKCpjb3dfb3ApKSB7CiAgICAgICAgICAgICBicmVhazsKICAgICAgICAgfQpAQCAtMTkwLDYgKzIyOSw3IEBACiAgICAgICAgIC8vIFdhaXQgZm9yIFJBIHRocmVhZCB0byBub3RpZnkgdGhhdCB0aGUgbWVyZ2Ugd2luZG93CiAgICAgICAgIC8vIGlzIHJlYWR5IGZvciBtZXJnaW5nLgogICAgICAgICBpZiAoIXNuYXB1c2VyZF8tPldhaXRGb3JNZXJnZUJlZ2luKCkpIHsKKyAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHdhaXRpbmcgZm9yIG1lcmdlIHRvIGJlZ2luIjsKICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgfQogCkBAIC0yOTUsNyArMzM1LDcgQEAKICAgICAgICAgICAgICAgICAgICAgLy8gd2lsbCBmYWxsYmFjayB0byBzeW5jaHJvbm91cyBJL08uCiAgICAgICAgICAgICAgICAgICAgIHJldCA9IGlvX3VyaW5nX3dhaXRfY3FlKHJpbmdfLmdldCgpLCAmY3FlKTsKICAgICAgICAgICAgICAgICAgICAgaWYgKHJldCkgewotICAgICAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJNZXJnZTogaW9fdXJpbmdfd2FpdF9jcWUgZmFpbGVkOiAiIDw8IHJldDsKKyAgICAgICAgICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiTWVyZ2U6IGlvX3VyaW5nX3dhaXRfY3FlIGZhaWxlZDogIiA8PCBzdHJlcnJvcigtcmV0KTsKICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXR1cyA9IGZhbHNlOwogICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAg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CisgICAgfQorICAgIFNOQVBfTE9HKERFQlVHKSA8PCAiIFJlYWRGcm9tQmFzZURldmljZS4uLjogbmV3LWJsb2NrOiAiIDw8IGNvd19vcC0+bmV3X2Jsb2NrCisgICAgICAgICAgICAgICAgICAgIDw8ICIgT3A6ICIgPDwgKmNvd19vcDsKKworICAgIGlmIChkaXJlY3RfcmVhZF8gJiYgSXNCbG9ja0FsaWduZWQob2Zmc2V0KSkgeworICAgICAgICBpZiAoIWFuZHJvaWQ6OmJhc2U6OlJlYWRGdWxseUF0T2Zmc2V0KGJhY2tpbmdfc3RvcmVfZGlyZWN0X2ZkXywgYWxpZ25lZF9idWZmZXJfLmdldCgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJMT0NLX1NaLCBvZmZzZXQpKSB7CisgICAgICAgICAgICBTTkFQX1BMT0coRVJST1IpIDw8ICJPX0RJUkVDVCBSZWFkIGZhaWxlZCBhdCBvZmZzZXQ6ICIgPDwgb2Zmc2V0OworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIHN0ZDo6bWVtY3B5KGJ1ZmZlciwgYWxpZ25lZF9idWZmZXJfLmdldCgpLCBCTE9DS19TWik7CisgICAgICAgIHJldHVybiB0cnVlOworICAgIH0KKworICAgIGlmICghYW5kcm9pZDo6YmFzZTo6UmVhZEZ1bGx5QXRPZmZzZXQoYmFja2luZ19zdG9yZV9mZF8sIGJ1ZmZlciwgQkxPQ0tfU1osIG9mZnNldCkpIHsKKyAgICAgICAgc3RkOjpzdHJpbmcgb3A7CisgICAgICAgIGlmIChjb3dfb3AtPnR5cGUoKSA9PSBrQ293Q29weU9wKQorICAgICAgICAgICAgb3AgPSAiQ29weS1vcCI7CisgICAgICAgIGVsc2UgeworICAgICAgICAgICAgb3AgPSAiWG9yLW9wIjsKKyAgICAgICAgfQorICAgICAgICBTTkFQX1BMT0coRVJST1IpIDw8IG9wIDw8ICIgZmFpbGVkLi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zZXJkXy0+UHJvY2Vzc01lcmdpbmdCbG9jayhjb3dfb3AtPm5ld19ibG9jaywgYnVmZmVyKTsKKworICAgIHN3aXRjaCAoc3RhdGUpIHsKKyAgICAgICAgY2FzZSBNRVJHRV9HUk9VUF9TVEFURTo6R1JPVVBfTUVSR0VfQ09NUExFVEVEOiB7CisgICAgICAgICAgICAvLyBNZXJnZSBpcyBjb21wbGV0ZWQgZm9yIHRoaXMgQ09XIG9wOyBqdXN0IHJlYWQgZGlyZWN0bHkgZnJvbQorICAgICAgICAgICAgLy8gdGhlIGJhc2UgZGV2aWNlCisgICAgICAgICAgICBTTkFQX0xPRyhERUJVRykgPDwgIk1lcmdlLWNvbXBsZXRlZDogUmVhZGluZyBmcm9tIGJhc2UgZGV2aWNlIHNlY3RvcjogIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8IChjb3dfb3AtPm5ld19ibG9jayA+PiBTRUNUT1JfU0hJRlQpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBCbG9jay1udW1iZXI6ICIgPDwgY293X29wLT5uZXdfYmxvY2s7CisgICAgICAgICAgICBpZiAoIVJlYWREYXRhRnJvbUJhc2VEZXZpY2UoQ2h1bmtUb1NlY3Rvcihjb3dfb3AtPm5ld19ibG9jayksIGJ1ZmZlciwgQkxPQ0tfU1opKSB7CisgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJSZWFkRGF0YUZyb21CYXNlRGV2aWNlIGF0IHNlY3RvcjogIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAoY293X29wLT5uZXdfYmxvY2sgPj4gU0VDVE9SX1NISUZUKSA8PCAiIGFmdGVyIG1lcmdlLWNvbXBsZXRlLiI7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgIH0KKyAgICAgICAgY2FzZSBNRVJHRV9HUk9VUF9TVEFURTo6R1JPVVBfTUVSR0VfUEVORElORzogeworICAgICAgICAgICAgYm9vbCByZXQ7CisgICAgICAgICAgICBpZiAoY293X29wLT50eXBlKCkgPT0ga0Nvd0NvcHlPcCkgeworICAgICAgICAgICAgICAgIHJldCA9IFByb2Nlc3NDb3B5T3AoY293X29wLCBidWZmZXIpOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICByZXQgPSBQcm9jZXNzWG9yT3AoY293X29wLCBidWZmZXIpOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvLyBJL08gaXMgY29tcGxldGUgLSBkZWNyZW1lbnQgdGhlIHJlZmNvdW50IGlycmVzcGVjdGl2ZSBvZiB0aGUgcmV0dXJuCisgICAgICAgICAgICAvLyBzdGF0dXMKKyAgICAgICAgICAgIHNuYXB1c2VyZF8tPk5vdGlmeUlPQ29tcGxldGlvbihjb3dfb3AtPm5ld19ibG9jayk7CisgICAgICAgICAgICByZXR1cm4gcmV0OworICAgICAgICB9CisgICAgICAgIC8vIFdlIGFscmVhZHkgaGF2ZSB0aGUgZGF0YSBpbiB0aGUgYnVmZmVyIHJldHJpZXZlZCBmcm9tIFJBIHRocmVhZC4KKyAgICAgICAgLy8gTm90aGluZyB0byBwcm9jZXNzIGZ1cnRoZXIuCisgICAgICAgIGNhc2UgTUVSR0VfR1JPVVBfU1RBVEU6OkdST1VQX01FUkdFX1JBX1JFQURZOiB7CisgICAgICAgICAgICBbW2ZhbGx0aHJvdWdoXV07CisgICAgICAgIH0KKyAgICAgICAgY2FzZSBNRVJHRV9HUk9VUF9TVEFURTo6R1JPVVBfTUVSR0VfSU5fUFJPR1JFU1M6IHsKKyAgICAgICAgICAgIHJldHVybiB0cnVlOworICAgICAgICB9CisgICAgICAgIGRlZmF1bHQ6IHsKKyAgICAgICAgICAgIC8vIEFsbCBvdGhlciBzdGF0ZXMsIGZhaWwgdGhlIEkvTyB2aXogKEdST1VQX01FUkdFX0ZBSUxFRCBhbmQgR1JPVVBfSU5WQUxJRCkKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorICAgIH0KKworICAgIHJldHVybiBmYWxzZTsKK30KKworYm9vbCBSZWFkV29ya2VyOjpQcm9jZXNzQ293T3AoY29uc3QgQ293T3BlcmF0aW9uKiBjb3dfb3AsIHZvaWQqIGJ1ZmZlcikgeworICAgIGlmIChjb3dfb3AgPT0gbnVsbHB0cikgeworICAgICAgICBTTkFQX0xPRyhFUlJPUikgPDwgIlByb2Nlc3NDb3dPcDogSW52YWxpZCBjb3dfb3AiOworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgc3dpdGNoIChjb3dfb3AtPnR5cGUoKSkgeworICAgICAgICBjYXNlIGtDb3dSZXBsYWNlT3A6IHsKKyAgICAgICAgICAgIHNpemVfdCBidWZmZXJfc2l6ZSA9IENvd09wQ29tcHJlc3Npb25TaXplKGNvd19vcCwgQkxPQ0tfU1opOworICAgICAgICAgICAgdWludDhfdCBjaHVua1tidWZmZXJfc2l6ZV07CisgICAgICAgICAgICBpZiAoIVByb2Nlc3NSZXBsYWNlT3AoY293X29wLCBjaHVuaywgYnVmZmVyX3NpemUpKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc3RkOjptZW1jcHkoYnVmZmVyLCBjaHVuaywgQkxPQ0tfU1opOworICAgICAgICAgICAgcmV0dXJuIHRydWU7CisgICAgICAgIH0KKworICAgICAgICBjYXNlIGtDb3daZXJvT3A6IHsKKyAgICAgICAgICAgIHJldHVybiBQcm9jZXNzWmVyb09wKGJ1ZmZlcik7CisgICAgICAgIH0KKworICAgICAgICBjYXNlIGtDb3dDb3B5T3A6CisgICAgICAgICAgICBbW2ZhbGx0aHJvdWdoXV07CisgICAgICAgIGNhc2Uga0Nvd1hvck9wOiB7CisgICAgICAgICAgICByZXR1cm4gUHJvY2Vzc09yZGVyZWRPcChjb3dfb3AsIGJ1ZmZlcik7CisgICAgICAgIH0KKworICAgICAgICBkZWZhdWx0OiB7CisgICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikgPDwgIlVua25vd24gb3BlcmF0aW9uLXR5cGUgZm91bmQ6ICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCBzdGF0aWNfY2FzdDx1aW50OF90Pihjb3dfb3AtPnR5cGUoKSk7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIGZhbHNlOworfQorCitib29sIFJlYWRXb3JrZXI6OkluaXQoKSB7CisgICAgaWYgKCFXb3JrZXI6OkluaXQoKSkgeworICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgfQorCisgICAgY29uc3Qgc2l6ZV90IGNvbXByZXNzaW9uX2ZhY3RvciA9IHJlYWRlcl8tPkdldE1heENvbXByZXNzaW9uU2l6ZSgpOworICAgIGlmICghY29tcHJlc3Npb25fZmFjdG9yKSB7CisgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiQ29tcHJlc3Npb24gZmFjdG9yIGlzIHNldCB0byAwIHdoaWNoIGlzIGludmFsaWQuIjsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICBkZWNvbXByZXNzZWRfYnVmZmVyXyA9IHN0ZDo6bWFrZV91bmlxdWU8dWludDhfdFtdPihjb21wcmVzc2lvbl9mYWN0b3IpOworCisgICAgYmFja2luZ19zdG9yZV9mZF8ucmVzZXQob3BlbihiYWNraW5nX3N0b3JlX2RldmljZV8uY19zdHIoKSwgT19SRE9OTFkpKTsKKyAgICBpZiAoYmFja2luZ19zdG9yZV9mZF8gPCAwKSB7CisgICAgICAgIFNOQVBfUExPRyhFUlJPUikgPDwgIk9wZW4gRmFpbGVkOiAiIDw8IGJhY2tpbmdfc3RvcmVfZGV2aWNlXzsKKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKworICAgIGlmIChkaXJlY3RfcmVhZF8pIHsKKyAgICAgICAgYmFja2luZ19zdG9yZV9kaXJlY3RfZmRfLnJlc2V0KG9wZW4oYmFja2luZ19zdG9yZV9kZXZpY2VfLmNfc3RyKCksIE9fUkRPTkxZIHwgT19ESVJFQ1QpKTsKKyAgICAgICAgaWYgKGJhY2tpbmdfc3RvcmVfZGlyZWN0X2ZkXyA8IDApIHsKKyAgICAgICAgICAgIFNOQVBfUExPRyhFUlJPUikgPDwgIk9wZW4gRmFpbGVkIHdpdGggT19ESVJFQ1Q6ICIgPDwgYmFja2luZ19zdG9yZV9kaXJlY3RfZmRfOworICAgICAgICAgICAgZGlyZWN0X3JlYWRfID0gZmFsc2U7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICB2b2lkKiBhbGlnbmVkX2FkZHI7CisgICAgICAgICAgICBzc2l6ZV90IHBhZ2Vfc2l6ZSA9IGdldHBhZ2VzaXplKCk7CisgICAgICAgICAgICBpZiAocG9zaXhfbWVtYWxpZ24oJmFsaWduZWRfYWRkciwgcGFnZV9zaXplLCBwYWdlX3NpemUpIDwgMCkgeworICAgICAgICAgICAgICAgIGRpcmVjdF9yZWFkXyA9IGZhbHNlOworICAgICAgICAgICAgICAgIFNOQVBfUExPRyhFUlJPUikgPDwgInBvc2l4X21lbWFsaWduIGZhaWxlZCAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIHBhZ2Vfc2l6ZTogIiA8PCBwYWdlX3NpemUgPDwgIiByZWFkX3N6OiAiIDw8IHBhZ2Vfc2l6ZTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgYWxpZ25lZF9idWZmZXJfLnJlc2V0KGFsaWduZWRfYWRkcik7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICB9CisKKyAgICBibG9ja19zZXJ2ZXJfID0gYmxvY2tfc2VydmVyX29wZW5lcl8tPk9wZW4odGhpcywgUEFZTE9BRF9CVUZGRVJfU1opOworICAgIGlmICghYmxvY2tfc2VydmVyXykgeworICAgICAgICBTTkFQX1BMT0coRVJST1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mVjLmVuZCgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjptYWtlX3BhaXIoc2VjdG9yLCBudWxscHRyKSwgU25hcHNob3RIYW5kbGVyOjpjb21wYXJlKTsKKyAgICAgICAgICAgIGNvbnN0IGJvb2wgc2VjdG9yX25vdF9mb3VuZCA9IChpdCA9PSBjaHVua192ZWMuZW5kKCkgfHwgaXQtPmZpcnN0ICE9IHNlY3Rvcik7CisKKyAgICAgICAgICAgIHZvaWQqIGJ1ZmZlciA9IGJsb2NrX3NlcnZlcl8tPkdldFJlc3BvbnNlQnVmZmVyKEJMT0NLX1NaLCBzaXplKTsKKyAgICAgICAgICAgIGlmICghYnVmZmVyKSB7CisgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJBY3F1aXJlQnVmZmVyIGZhaWxlZCBpbiBSZWFkQWxpZ25lZFNlY3RvciI7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBpZiAoc2VjdG9yX25vdF9mb3VuZCkgeworICAgICAgICAgICAgICAgIC8vIEZpbmQgdGhlIDRrIGJsb2NrCisgICAgICAgICAgICAgICAgdWludDY0X3QgaW9fYmxvY2sgPSBTZWN0b3JUb0NodW5rKHNlY3Rvcik7CisgICAgICAgICAgICAgICAgLy8gR2V0IHRoZSBwcmV2aW91cyBpdGVyYXRvci4gU2luY2UgdGhlIHZlY3RvciBpcyBzb3J0ZWQsIHRoZQorICAgICAgICAgICAgICAgIC8vIGxvb2t1cCBvZiB0aGlzIHNlY3RvciBjYW4gZmFsbCBpbiBhIHJhbmdlIG9mIGJsb2NrcyBpZgorICAgICAgICAgICAgICAgIC8vIENvd09wZXJhdGlvbiBoYXMgY29tcHJlc3NlZCBtdWx0aXBsZSBibG9ja3MuCisgICAgICAgICAgICAgICAgaWYgKGl0ICE9IGNodW5rX3ZlYy5iZWdpbigpKSB7CisgICAgICAgICAgICAgICAgICAgIHN0ZDo6YWR2YW5jZShpdCwgLTEpOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIGJvb2wgaXNfbWFwcGluZ19wcmVzZW50ID0gdHJ1ZTsKKworICAgICAgICAgICAgICAgIC8vIFZlY3RvciBpdHNlbGYgaXMgZW1wdHkuIFRoaXMgY2FuIGhhcHBlbiBpZiB0aGUgYmxvY2sgd2FzIG5vdAorICAgICAgICAgICAgICAgIC8vIGNoYW5nZWQgcGVyIHRoZSBPVEEgb3IgaWYgdGhlIG1lcmdlIHdhcyBhbHJlYWR5IGNvbXBsZXRlIGJ1dAorICAgICAgICAgICAgICAgIC8vIHNuYXBzaG90IHRhYmxlIHdhcyBub3QgeWV0IGNvbGxhcHNlZC4KKyAgICAgICAgICAgICAgICBpZiAoaXQgPT0gY2h1bmtfdmVjLmVuZCgpKSB7CisgICAgICAgICAgICAgICAgICAgIGlzX21hcHBpbmdfcHJlc2VudCA9IGZhbHNlOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogY293X29wID0gbnVsbHB0cjsKKyAgICAgICAgICAgICAgICAvLyBSZWxhdGl2ZSBvZmZzZXQgd2l0aGluIHRoZSBjb21wcmVzc2VkIG11bHRpcGxlIGJsb2NrcworICAgICAgICAgICAgICAgIG9mZl90IGJsb2NrX29mZnNldCA9IDA7CisgICAgICAgICAgICAgICAgaWYgKGlzX21hcHBpbmdfcHJlc2VudCkgeworICAgICAgICAgICAgICAgICAgICAvLyBHZXQgdGhlIG5lYXJlc3Qgb3BlcmF0aW9uIGZvdW5kIGluIHRoZSB2ZWN0b3IKKyAgICAgICAgICAgICAgICAgICAgY293X29wID0gaXQtPnNlY29uZDsKKyAgICAgICAgICAgICAgICAgICAgaXNfbWFwcGluZ19wcmVzZW50ID0gR2V0Q293T3BCbG9ja09mZnNldChjb3dfb3AsIGlvX2Jsb2NrLCAmYmxvY2tfb2Zmc2V0KTsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAvLyBUaHVzLCB3ZSBoYXZlIGEgY2FzZSB3aGVyZWluIHNlY3RvciB3YXMgbm90IGZvdW5kIGluIHRoZSBzb3J0ZWQKKyAgICAgICAgICAgICAgICAvLyB2ZWN0b3I7IGhvd2V2ZXIsIHdlIGluZGVlZCBoYXZlIGEgbWFwcGluZyBvZiB0aGlzIHNlY3RvcgorICAgICAgICAgICAgICAgIC8vIGVtYmVkZGVkIGluIG9uZSBvZiB0aGUgQ293T3BlcmF0aW9uIHdoaWNoIHNwYW5zIG11bHRpcGxlCisgICAgICAgICAgICAgICAgLy8gYmxvY2sgc2l6ZS4KKyAgICAgICAgICAgICAgICBpZiAoaXNfbWFwcGluZ19wcmVzZW50KSB7CisgICAgICAgICAgICAgICAgICAgIC8vIGJsb2NrX29mZnNldCA9IDAgd291bGQgbWVhbiB0aGF0IHRoZSBDb3dPcGVyYXRpb24gc2hvdWxkCisgICAgICAgICAgICAgICAgICAgIC8vIGFscmVhZHkgYmUgaW4gdGhlIHNvcnRlZCB2ZWN0b3IuIEhlbmNlLCBsb29rdXAgc2hvdWxkCisgICAgICAgICAgICAgICAgICAgIC8vIGhhdmUgYWxyZWFkeSBmb3VuZCBpdC4gSWYgbm90LCB0aGlzIGlzIGEgYnVnLgorICAgICAgICAgICAgICAgICAgICBpZiAoYmxvY2tfb2Zmc2V0ID09IDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiR2V0QmxvY2tPZmZzZXQgcmV0dXJuZWQgb2Zmc2V0IDAgZm9yIGlvX2Jsb2NrOiAiIDw8IGlvX2Jsb2NrOworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgLy8gR2V0IHRoZSBDb3dPcGVyYXRpb24gYWN0dWFsIGNvbXByZXNzaW9uIHNpemUKKyAgICAgICAgICAgICAgICAgICAgc2l6ZV90IGNvbXByZXNzaW9uX3NpemUgPSBDb3dPcENvbXByZXNzaW9uU2l6ZShjb3dfb3AsIEJMT0NLX1NaKTsKKyAgICAgICAgICAgICAgICAgICAgLy8gT2Zmc2V0IGNhbm5vdCBiZSBncmVhdGVyIHRoYW4gdGhlIGNvbXByZXNzaW9uIHNpemUKKyAgICAgICAgICAgICAgICAgICAgaWYgKGJsb2NrX29mZnNldCA+IGNvbXByZXNzaW9uX3NpemUpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiSW52YWxpZCBJL08gYmxvY2sgZm91bmQuIGlvX2Jsb2NrOiAiIDw8IGlvX2Jsb2NrCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBDb3dPcGVyYXRpb24tbmV3LWJsb2NrOiAiIDw8IGNvd19vcC0+bmV3X2Jsb2NrCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBjb21wcmVzc2lvbi1zaXplOiAiIDw8IGNvbXByZXNzaW9uX3NpemU7CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICAvLyBDYWNoZWQgY29weSBvZiB0aGUgcHJldmlvdXMgaXRlcmF0aW9uLiBKdXN0IHJldHJpZXZlIHRoZQorICAgICAgICAgICAgICAgICAgICAvLyBkYXRhCisgICAgICAgICAgICAgICAgICAgIGlmIChwcmV2X29wICYmIHByZXZfb3AtPm5ld19ibG9jayA9PSBjb3dfb3AtPm5ld19ibG9jaykgeworICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjptZW1jcHkoYnVmZmVyLCAoY2hhciopZGVjb21wcmVzc2VkX2J1ZmZlcl8uZ2V0KCkgKyBibG9ja19vZmZzZXQsIHNpemUpOworICAgICAgICAgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgLy8gR2V0IHRoZSBkYXRhIGZyb20gdGhlIGRpc2sgYmFzZWQgb24gdGhlIGNvbXByZXNzaW9uCisgICAgICAgICAgICAgICAgICAgICAgICAvLyBzaXplCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIVByb2Nlc3NSZXBsYWNlT3AoY293X29wLCBkZWNvbXByZXNzZWRfYnVmZmVyXy5nZXQoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wcmVzc2lvbl9zaXplKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIENvcHkgdGhlIGRhdGEgZnJvbSB0aGUgZGVjb21wcmVzc2VkIGJ1ZmZlciByZWxhdGl2ZQorICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG8gdGhlIGkvbyBibG9jayBvZmZzZXQuCisgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6Om1lbWNweShidWZmZXIsIChjaGFyKilkZWNvbXByZXNzZWRfYnVmZmVyXy5nZXQoKSArIGJsb2NrX29mZnNldCwgc2l6ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBDYWNoZSB0aGlzIENvd09wZXJhdGlvbiBwb2ludGVyIGZvciBzdWNjZXNzaXZlIEkvTworICAgICAgICAgICAgICAgICAgICAgICAgLy8gb3BlcmF0aW9uLiBTaW5jZSB0aGUgcmVxdWVzdCBpcyBzZXF1ZW50aWFsIGFuZCB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIGJsb2NrIGlzIGFscmVhZHkgZGVjb21wcmVzc2VkLCBzdWJzZXF1ZXN0IEkvTyBibG9ja3MKKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNhbiBmZXRjaCB0aGUgZGF0YSBkaXJlY3RseSBmcm9tIHRoaXMgZGVjb21wcmVzc2VkCisgICAgICAgICAgICAgICAgICAgICAgICAvLyBidWZmZXIuCisgICAgICAgICAgICAgICAgICAgICAgICBwcmV2X29wID0gY293X29wOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gQmxvY2sgbm90IGZvdW5kIGluIG1hcCAtIHdoaWNoIG1lYW5zIHRoaXMgYmxvY2sgd2FzIG5vdAorICAgICAgICAgICAgICAgICAgICAvLyBjaGFuZ2VkIGFzIHBlciB0aGUgT1RBLiBKdXN0IHJvdXRlIHRoZSBJL08gdG8gdGhlIGJhc2UKKyAgICAgICAgICAgICAgICAgICAgLy8gZGV2aWNlLgorICAgICAgICAgICAgICAgICAgICBpZiAoIVJlYWREYXRhRnJvbUJhc2VEZXZpY2Uoc2VjdG9yLCBidWZmZXIsIHNpemUpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikgPDwgIlJlYWREYXRhRnJvbUJhc2VEZXZpY2UgZmFpbGVkIjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICByZXQgPSBzaXplOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAvLyBXZSBmb3VuZCB0aGUgc2VjdG9yIGluIG1hcHBpbmcuIENoZWNrIHRoZSB0eXBlIG9mIENPVyBPUCBhbmQKKyAgICAgICAgICAgICAgICAvLyBwcm9jZXNzIGl0LgorICAgICAgICAgICAgICAgIGlmICghUHJvY2Vzc0Nvd09wKGl0LT5zZWNvbmQsIGJ1ZmZlcikpIHsKKyAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIlByb2Nlc3NDb3dPcCBmYWlsZWQsIHNlY3RvciA9ICIgPDwgc2VjdG9yIDw8ICIsIHNpemUgPSAiIDw8IHN6OworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgcmV0ID0gc3RkOjptaW4oQkxPQ0tfU1osIHJlYWRfc2l6ZSk7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHJlYWRfc2l6ZSAtPSByZXQ7CisgICAgICAgICAgICB0b3RhbF9ieXRlc19yZWFkICs9IHJldDsKKyAgICAgICAgICAgIHNlY3RvciArPSAocmV0ID4+IFNFQ1RPUl9TSElGVCk7CisgICAgICAgIH0KKworICAgICAgICBpZiAoIVNlbmRCdWZmZXJlZElvKCkpIHsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorCisgICAgICAgIFNOQVBfTE9HKERFQlVHKSA8PCAiU2VuZEJ1ZmZlcmVkSW8gc3VjY2VzcyB0b3RhbF9ieXRlc19yZWFkOiAiIDw8IHRvdGFsX2J5dGVzX3JlYWQKKyAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgcmVtYWluaW5nX3NpemU6ICIgPDwgcmVtYWluaW5nX3NpemU7CisgICAgICAgIHJlbWFpbmluZ19zaXplIC09IHRvdGFsX2J5dGVzX3JlYWQ7CisgICAgfSB3aGlsZSAocmVtYWluaW5nX3NpemUgPiAwKTsKKworICAgIHJldHVybiB0cnVlOworfQorCitib29sIFJlYWRXb3JrZXI6OklzTWFwcGluZ1ByZXNlbnQoY29uc3QgQ293T3BlcmF0aW9uKiBjb3dfb3AsIGxvZmZfdCByZXF1ZXN0ZWRfb2Zmc2V0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZmZfdCBjb3dfb3Bfb2Zmc2V0KSB7CisgICAgY29uc3QgYm9vbCByZXBsYWNlX29wID0gKGNvd19vcC0+dHlwZSgpID09IGtDb3dSZXBsYWNlT3ApOworICAgIGlm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idWZmZXJfc2l6ZSA9IENvd09wQ29tcHJlc3Npb25TaXplKGNvd19vcCwgQkxPQ0tfU1opOworICAgICAgICB1aW50OF90IGNodW5rW2J1ZmZlcl9zaXplXTsKKyAgICAgICAgLy8gUmVhZCB0aGUgZW50aXJlIGRlY29tcHJlc3NlZCBidWZmZXIgYmFzZWQgb24gdGhlIGJsb2NrLXNpemUKKyAgICAgICAgaWYgKCFQcm9jZXNzUmVwbGFjZU9wKGNvd19vcCwgY2h1bmssIGJ1ZmZlcl9zaXplKSkgeworICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICB9CisgICAgICAgIHNpemVfdCBza2lwX29mZnNldCA9IChyZXF1ZXN0ZWRfb2Zmc2V0IC0gZmluYWxfb2Zmc2V0KTsKKyAgICAgICAgc2l6ZV90IHdyaXRlX3N6ID0gc3RkOjptaW4oc2l6ZSwgYnVmZmVyX3NpemUgLSBza2lwX29mZnNldCk7CisKKyAgICAgICAgYXV0byBidWZmZXIgPQorICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0X2Nhc3Q8dWludDhfdCo+KGJsb2NrX3NlcnZlcl8tPkdldFJlc3BvbnNlQnVmZmVyKEJMT0NLX1NaLCB3cml0ZV9zeikpOworICAgICAgICBpZiAoIWJ1ZmZlcikgeworICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJSZWFkVW5hbGlnbmVkU2VjdG9yIGZhaWxlZCB0byBhbGxvY2F0ZSBidWZmZXIiOworICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICB9CisKKyAgICAgICAgc3RkOjptZW1jcHkoYnVmZmVyLCAoY2hhciopY2h1bmsgKyBza2lwX29mZnNldCwgd3JpdGVfc3opOworICAgICAgICByZXR1cm4gd3JpdGVfc3o7CisgICAgfQorCisgICAgaW50IG51bV9zZWN0b3JzX3NraXAgPSBzZWN0b3IgLSBpdC0+Zmlyc3Q7CisgICAgc2l6ZV90IHNraXBfc2l6ZSA9IG51bV9zZWN0b3JzX3N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nbmVkIGRhdGEKKyAgICAgICAgcmV0ID0gUmVhZFVuYWxpZ25lZFNlY3RvcihzZWN0b3IsIHJlbWFpbmluZ19zaXplLCBpdCk7CisgICAgICAgIGlmIChyZXQgPCAwKSB7CisgICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikgPDwgIlJlYWRVbmFsaWduZWRTZWN0b3IgZmFpbGVkIGZvciBzZWN0b3I6ICIgPDwgc2VjdG9yCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBzaXplOiAiIDw8IHNpemUgPDwgIiBpdC0+c2VjdG9yOiAiIDw8IGl0LT5maXJzdDsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgfQorCisgICAgICAgIHJlbWFpbmluZ19zaXplIC09IHJldDsKKyAgICAgICAgc2VjdG9yICs9IChyZXQgPj4gU0VDVE9SX1NISUZUKTsKKworICAgICAgICAvLyBTZW5kIHRoZSBkYXRhIGJhY2sKKyAgICAgICAgaWYgKCFTZW5kQnVmZmVyZWRJbygpKSB7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKworICAgICAgICAvLyBJZiB3ZSBzdGlsbCBoYXZlIHBlbmRpbmcgZGF0YSB0byBiZSBwcm9jZXNzZWQsIHRoaXMgd2lsbCBiZSBhbGlnbmVkIEkvTworICAgICAgICBpZiAocmVtYWluaW5nX3NpemUpIHsKKyAgICAgICAgICAgIHJldHVybiBSZWFkQWxpZ25lZFNlY3RvcihzZWN0b3IsIHJlbWFpbmluZ19zaXplKTsKKyAgICAgICAgfQorICAgIH0gZWxzZSB7CisgICAgICAgIC8vIFRoaXMgaXMgYWxsIGFib3V0IGhhbmRsaW5nIEkvTyByZXF1ZXN0IHRvIGJlIHJvdXRlZCB0byBiYXNlIGRldmljZQorICAgICAgICAvLyBhcyB0aGUgSS9PIGlzIG5vdCBtYXBwZWQgdG8gYW55IG9mIHRoZSBDT1cgb3BzLgorICAgICAgICBsb2ZmX3QgYWxpZ25lZF9vZmZzZXQgPSByZXF1ZXN0ZWRfb2Zmc2V0OworICAgICAgICAvLyBBbGlnbiB0byBuZWFyZXN0IDRrCisgICAgICAgIGFsaWduZWRfb2Zmc2V0ICs9IEJMT0NLX1NaIC0gMTsKKyAgICAgICAgYWxpZ25lZF9vZmZzZXQgJj0gfihCTE9DS19TWiAtIDEpOworICAgICAgICAvLyBGaW5kIHRoZSBkaWZmIG9mIHRoZSBhbGlnbmVkIG9mZnNldAorICAgICAgICBzaXplX3QgZGlmZl9zaXplID0gYWxpZ25lZF9vZmZzZXQgLSByZXF1ZXN0ZWRfb2Zmc2V0OworICAgICAgICBDSEVDSyhkaWZmX3NpemUgPD0gQkxPQ0tfU1opOworCisgICAgICAgIHNpemVfdCByZWFkX3NpemUgPSBzdGQ6Om1pbihyZW1haW5pbmdfc2l6ZSwgZGlmZl9zaXplKTsKKyAgICAgICAgdm9pZCogYnVmZmVyID0gYmxvY2tfc2VydmVyXy0+R2V0UmVzcG9uc2VCdWZmZXIoQkxPQ0tfU1osIHJlYWRfc2l6ZSk7CisgICAgICAgIGlmICghYnVmZmVyKSB7CisgICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikgPDwgIkFjcXVpcmVCdWZmZXIgZmFpbGVkIGluIFJlYWRVbmFsaWduZWRTZWN0b3IiOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIGlmICghUmVhZERhdGFGcm9tQmFzZURldmljZShzZWN0b3IsIGJ1ZmZlciwgcmVhZF9zaXplKSkgeworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisgICAgICAgIGlmICghU2VuZEJ1ZmZlcmVkSW8oKSkgeworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisKKyAgICAgICAgaWYgKHJlbWFpbmluZ19zaXplID49IGRpZmZfc2l6ZSkgeworICAgICAgICAgICAgcmVtYWluaW5nX3NpemUgLT0gZGlmZl9zaXplOworICAgICAgIC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RCdWZmZXJlZElvKCk7CisKKyAgICBib29sIFByb2Nlc3NDb3dPcChjb25zdCBDb3dPcGVyYXRpb24qIGNvd19vcCwgdm9pZCogYnVmZmVyKTsKKyAgICBib29sIFByb2Nlc3NYb3JPcChjb25zdCBDb3dPcGVyYXRpb24qIGNvd19vcCwgdm9pZCogYnVmZmVyKTsKKyAgICBib29sIFByb2Nlc3NPcmRlcmVkT3AoY29uc3QgQ293T3BlcmF0aW9uKiBjb3dfb3AsIHZvaWQqIGJ1ZmZlcik7CisgICAgYm9vbCBQcm9jZXNzQ29weU9wKGNvbnN0IENvd09wZXJhdGlvbiogY293X29wLCB2b2lkKiBidWZmZXIpOworICAgIGJvb2wgUHJvY2Vzc1JlcGxhY2VPcChjb25zdCBDb3dPcGVyYXRpb24qIGNvd19vcCwgdm9pZCogYnVmZmVyLCBzaXplX3QgYnVmZmVyX3NpemUpOworICAgIGJvb2wgUHJvY2Vzc1plcm9PcCh2b2lkKiBidWZmZXIpOworCisgICAgYm9vbCBJc01hcHBpbmdQcmVzZW50KGNvbnN0IENvd09wZXJhdGlvbiogY293X29wLCBsb2ZmX3QgcmVxdWVzdGVkX29mZnNldCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgbG9mZl90IGNvd19vcF9vZmZzZXQpOworICAgIGJvb2wgR2V0Q293T3BCbG9ja09mZnNldChjb25zdCBDb3dPcGVyYXRpb24qIGNvd19vcCwgdWludDY0X3QgaW9fYmxvY2ssIG9mZl90KiBibG9ja19vZmZzZXQpOworICAgIGJvb2wgUmVhZEFsaWduZWRTZWN0b3Ioc2VjdG9yX3Qgc2VjdG9yLCBzaXplX3Qgc3opOworICAgIGJvb2wgUmVhZFVuYWxpZ25lZFNlY3RvcihzZWN0b3JfdCBzZWN0b3IsIHNpemVfdCBzaXplKTsKKyAgICBpbnQgUmVhZFVuYWxpZ25lZFNlY3RvcihzZWN0b3JfdCBzZWN0b3IsIHNpemVfdCBzaXplLAorICAgICAgICAgICAgICAgICAgICAgICA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ZWFkX3dvcmtlci5oIgorI2luY2x1ZGUgInV0aWxpdHkuaCIKIAogbmFtZXNwYWNlIGFuZHJvaWQgewogbmFtZXNwYWNlIHNuYXBzaG90IHsKQEAgLTMyLDIzICszNSwyNiBAQAogCiBTbmFwc2hvdEhhbmRsZXI6OlNuYXBzaG90SGFuZGxlcihzdGQ6OnN0cmluZyBtaXNjX25hbWUsIHN0ZDo6c3RyaW5nIGNvd19kZXZpY2UsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6OnN0cmluZyBiYWNraW5nX2RldmljZSwgc3RkOjpzdHJpbmcgYmFzZV9wYXRoX21lcmdlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IG51bV93b3JrZXJfdGhyZWFkcywgYm9vbCB1c2VfaW91cmluZywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgcGVyZm9ybV92ZXJpZmljYXRpb24pIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6c2hhcmVkX3B0cjxJQmxvY2tTZXJ2ZXJPcGVuZXI+IG9wZW5lciwgaW50IG51bV93b3JrZXJfdGhyZWFkcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJvb2wgdXNlX2lvdXJpbmcsIGJvb2wgcGVyZm9ybV92ZXJpZmljYXRpb24sIGJvb2wgb19kaXJlY3QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBjb3dfb3BfbWVyZ2Vfc2l6ZSkgewogICAgIG1pc2NfbmFtZV8gPSBzdGQ6Om1vdmUobWlzY19uYW1lKTsKICAgICBjb3dfZGV2aWNlXyA9IHN0ZDo6bW92ZShjb3dfZGV2aWNlKTsKICAgICBiYWNraW5nX3N0b3JlX2RldmljZV8gPSBzdGQ6Om1vdmUoYmFja2luZ19kZXZpY2UpOwotICAgIGNvbnRyb2xfZGV2aWNlXyA9ICIvZGV2L2RtLXVzZXIvIiArIG1pc2NfbmFtZV87CisgICAgYmxvY2tfc2VydmVyX29wZW5lcl8gPSBzdGQ6Om1vdmUob3BlbmVyKTsKICAgICBiYXNlX3BhdGhfbWVyZ2VfID0gc3RkOjptb3ZlKGJhc2VfcGF0aF9tZXJnZSk7CiAgICAgbnVtX3dvcmtlcl90aHJlYWRzXyA9IG51bV93b3JrZXJfdGhyZWFkczsKICAgICBpc19pb191cmluZ19lbmFibGVkXyA9IHVzZV9pb3VyaW5nOwogICAgIHBlcmZvcm1fdmVyaWZpY2F0aW9uXyA9IHBlcmZvcm1fdmVyaWZpY2F0aW9uOworICAgIG9fZGlyZWN0XyA9IG9fZGlyZWN0OworICAgIGNvd19vcF9tZXJnZV9zaXplXyA9IGNvd19vcF9tZXJnZV9zaXplOwogfQogCiBib29sIFNuYXBzaG90SGFuZGxlcjo6SW5pdGlhbGl6ZVdvcmtlcnMoKSB7CiAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBudW1fd29ya2VyX3RocmVhZHNfOyBpKyspIHsKLSAgICAgICAgc3RkOjp1bmlxdWVfcHRyPFdvcmtlcj4gd3QgPQotICAgICAgICAgICAgICAgIHN0ZDo6bWFrZV91bmlxdWU8V29ya2VyPihjb3dfZGV2aWNlXywgYmFja2luZ19zdG9yZV9kZXZpY2VfLCBjb250cm9sX2RldmljZV8sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pc2NfbmFtZV8sIGJhc2VfcGF0aF9tZXJnZV8sIEdldFNoYXJlZFB0cigpKTsKKyAgICAgICAgYXV0byB3dCA9IHN0ZDo6bWFrZV91bmlxdWU8UmVhZFdvcmtlcj4oY293X2RldmljZV8sIGJhY2tpbmdfc3RvcmVfZGV2aWNlXywgbWlzY19uYW1lXywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFzZV9wYXRoX21lcmdlXywgR2V0U2hhcmVkUHRyKCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrX3NlcnZlcl9vcGVuZXJfLCBvX2RpcmVjdF8pOwogICAgICAgICBpZiAoIXd0LT5Jbml0KCkpIHsKICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiVGhyZWFkIGluaXRpYWxpemF0aW9uIGZhaWxlZCI7CiAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CkBAIC01NiwxMiArNjIsMTEgQEAKIAogICAgICAgICB3b3JrZXJfdGhyZWFkc18ucHVzaF9iYWNrKHN0ZDo6bW92ZSh3dCkpOwogICAgIH0KLQotICAgIG1lcmdlX3RocmVhZF8gPSBzdGQ6Om1ha2VfdW5pcXVlPFdvcmtlcj4oY293X2RldmljZV8sIGJhY2tpbmdfc3RvcmVfZGV2aWNlXywgY29udHJvbF9kZXZpY2VfLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWlzY19uYW1lXywgYmFzZV9wYXRoX21lcmdlXywgR2V0U2hhcmVkUHRyKCkpOworICAgIG1lcmdlX3RocmVhZF8gPSBzdGQ6Om1ha2VfdW5pcXVlPE1lcmdlV29ya2VyPihjb3dfZGV2aWNlXywgbWlzY19uYW1lXywgYmFzZV9wYXRoX21lcmdlXywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR2V0U2hhcmVkUHRyKCksIGNvd19vcF9tZXJnZV9zaXplXyk7CiAKICAgICByZWFkX2FoZWFkX3RocmVhZF8gPSBzdGQ6Om1ha2VfdW5pcXVlPFJlYWRBaGVhZD4oY293X2RldmljZV8sIGJhY2tpbmdfc3RvcmVfZGV2aWNlXywgbWlzY19uYW1lXywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR2V0U2hhcmVkUHRyKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHZXRTaG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S19TWikpIHsKICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJJbnZhbGlkIGhlYWRlciBibG9jayBzaXplIGZvdW5kOiAiIDw8IGhlYWRlci5ibG9ja19zaXplOwogICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgfQogCiAgICAgU05BUF9MT0coSU5GTykgPDwgIk1lcmdlLW9wczogIiA8PCBoZWFkZXIubnVtX21lcmdlX29wczsKKyAgICBpZiAoaGVhZGVyLm51bV9tZXJnZV9vcHMpIHsKKyAgICAgICAgcmVzdW1lX21lcmdlXyA9IHRydWU7CisgICAgICAgIFNOQVBfTE9HKElORk8pIDw8ICJSZXN1bWUgU25hcHNob3QtbWVyZ2UiOworICAgIH0KIAogICAgIGlmICghTW1hcE1ldGFkYXRhKCkpIHsKICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJtbWFwIGZhaWxlZCI7CkBAIC0xOTEsMTYgKzE5OCwxNiBAQAogCiAgICAgc2l6ZV90IGNvcHlfb3BzID0gMCwgcmVwbGFjZV9vcHMgPSAwLCB6ZXJvX29wcyA9IDAsIHhvcl9vcHMgPSAwOwogCi0gICAgd2hpbGUgKCFjb3dvcF9pdGVyLT5Eb25lKCkpIHsKLSAgICAgICAgY29uc3QgQ293T3BlcmF0aW9uKiBjb3dfb3AgPSAmY293b3BfaXRlci0+R2V0KCk7CisgICAgd2hpbGUgKCFjb3dvcF9pdGVyLT5BdEVuZCgpKSB7CisgICAgICAgIGNvbnN0IENvd09wZXJhdGlvbiogY293X29wID0gY293b3BfaXRlci0+R2V0KCk7CiAKLSAgICAgICAgaWYgKGNvd19vcC0+dHlwZSA9PSBrQ293Q29weU9wKSB7CisgICAgICAgIGlmIChjb3dfb3AtPnR5cGUoKSA9PSBrQ293Q29weU9wKSB7CiAgICAgICAgICAgICBjb3B5X29wcyArPSAxOwotICAgICAgICB9IGVsc2UgaWYgKGNvd19vcC0+dHlwZSA9PSBrQ293UmVwbGFjZU9wKSB7CisgICAgICAgIH0gZW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fb3AtPm5ld19ibG9jayksIEJMT0NLX1NaKSkgewotICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiUmVhZERhdGFGcm9tQmFzZURldmljZSBhdCBzZWN0b3I6ICIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgKGNvd19vcC0+bmV3X2Jsb2NrID4+IFNFQ1RPUl9TSElGVCkgPDwgIiBhZnRlciBtZXJnZS1jb21wbGV0ZS4iOwotICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIHJldHVybiB0cnVlOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgTUVSR0VfR1JPVVBfU1RBVEU6OkdST1VQX01FUkdFX1BFTkRJTkc6IHsKLSAgICAgICAgICAgIGJvb2wgcmV0OwotICAgICAgICAgICAgaWYgKGNvd19vcC0+dHlwZSA9PSBrQ293Q29weU9wKSB7Ci0gICAgICAgICAgICAgICAgcmV0ID0gUHJvY2Vzc0NvcHlPcChjb3dfb3ApOwotICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICByZXQgPSBQcm9jZXNzWG9yT3AoY293X29wKTsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgLy8gSS9PIGlzIGNvbXBsZXRlIC0gZGVjcmVtZW50IHRoZSByZWZjb3VudCBpcnJlc3BlY3RpdmUgb2YgdGhlIHJldHVybgotICAgICAgICAgICAgLy8gc3RhdHVzCi0gICAgICAgICAgICBzbmFwdXNlcmRfLT5Ob3RpZnlJT0NvbXBsZXRpb24oY293X29wLT5uZXdfYmxvY2spOwotICAgICAgICAgICAgcmV0dXJuIHJldDsKLSAgICAgICAgfQotICAgICAgICAvLyBXZSBhbHJlYWR5IGhhdmUgdGhlIGRhdGEgaW4gdGhlIGJ1ZmZlciByZXRyaWV2ZWQgZnJvbSBSQSB0aHJlYWQuCi0gICAgICAgIC8vIE5vdGhpbmcgdG8gcHJvY2VzcyBmdXJ0aGVyLgotICAgICAgICBjYXNlIE1FUkdFX0dST1VQX1NUQVRFOjpHUk9VUF9NRVJHRV9SQV9SRUFEWTogewotICAgICAgICAgICAgW1tmYWxsdGhyb3VnaF1dOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgTUVSR0VfR1JPVVBfU1RBVEU6OkdST1VQX01FUkdFX0lOX1BST0dSRVNTOiB7Ci0gICAgICAgICAgICByZXR1cm4gdHJ1ZTsKLSAgICAgICAgfQotICAgICAgICBkZWZhdWx0OiB7Ci0gICAgICAgICAgICAvLyBBbGwgb3RoZXIgc3RhdGVzLCBmYWlsIHRoZSBJL08gdml6IChHUk9VUF9NRVJHRV9GQUlMRUQgYW5kIEdST1VQX0lOVkFMSUQpCi0gICAgICAgICAgICByZXR1cm4gZmFsc2U7Ci0gICAgICAgIH0KLSAgICB9Ci0KLSAgICByZXR1cm4gZmFsc2U7Ci19Ci0KLWJvb2wgV29ya2VyOjpQcm9jZXNzQ293T3AoY29uc3QgQ293T3BlcmF0aW9uKiBjb3dfb3ApIHsKLSAgICBpZiAoY293X29wID09IG51bGxwdHIpIHsKLSAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJQcm9jZXNzQ293T3A6IEludmFsaWQgY293X29wIjsKLSAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgIH0KLQotICAgIHN3aXRjaCAoY293X29wLT50eXBlKSB7Ci0gICAgICAgIGNhc2Uga0Nvd1JlcGxhY2VPcDogewotICAgICAgICAgICAgcmV0dXJuIFByb2Nlc3NSZXBsYWNlT3AoY293X29wKTsKLSAgICAgICAgfQotCi0gICAgICAgIGNhc2Uga0Nvd1plcm9PcDogewotICAgICAgICAgICAgcmV0dXJuIFByb2Nlc3NaZXJvT3AoKTsKLSAgICAgICAgfQotCi0gICAgICAgIGNhc2Uga0Nvd0NvcHlPcDoKLSAgICAgICAgICAgIFtbZmFsbHRocm91Z2hdXTsKLSAgICAgICAgY2FzZSBrQ293WG9yT3A6IHsKLS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cCAtIHdoaWNoIG1lYW5zIHRoaXMgYmxvY2sgd2FzIG5vdAotICAgICAgICAgICAgICAgIC8vIGNoYW5nZWQgYXMgcGVyIHRoZSBPVEEuIEp1c3Qgcm91dGUgdGhlIEkvTyB0byB0aGUgYmFzZQotICAgICAgICAgICAgICAgIC8vIGRldmljZS4KLSAgICAgICAgICAgICAgICBpZiAoIVJlYWREYXRhRnJvbUJhc2VEZXZpY2Uoc2VjdG9yLCBzaXplKSkgewotICAgICAgICAgICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikgPDwgIlJlYWREYXRhRnJvbUJhc2VEZXZpY2UgZmFpbGVkIjsKLSAgICAgICAgICAgICAgICAgICAgaGVhZGVyLT50eXBlID0gRE1fVVNFUl9SRVNQX0VSUk9SOwotICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgIHJldCA9IHNpemU7Ci0gICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgIC8vIFdlIGZvdW5kIHRoZSBzZWN0b3IgaW4gbWFwcGluZy4gQ2hlY2sgdGhlIHR5cGUgb2YgQ09XIE9QIGFuZAotICAgICAgICAgICAgICAgIC8vIHByb2Nlc3MgaXQuCi0gICAgICAgICAgICAgICAgaWYgKCFQcm9jZXNzQ293T3AoaXQtPnNlY29uZCkpIHsKLSAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJQcm9jZXNzQ293T3AgZmFpbGVkIjsKLSAgICAgICAgICAgICAgICAgICAgaGVhZGVyLT50eXBlID0gRE1fVVNFUl9SRVNQX0VSUk9SOwotICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgIHJldCA9IEJMT0NLX1NaOwotICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAvLyBKdXN0IHJldHVybiB0aGUgaGVhZGVyIGlmIGl0IGlzIGFuIGVycm9yCi0gICAgICAgICAgICBpZiAoaGVhZGVyLT50eXBlID09IERNX1VTRVJfUkVTUF9FUlJPUikgewotICAgICAgICAgICAgICAgIGlmICghUmVzcG9uZElPRXJyb3IoaGVhZGVyX3Jlc3BvbnNlKSkgewotICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgaW9fZXJyb3IgPSB0cnVlOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfQotCi0gICAgICAgICAgICByZWFkX3NpemUgLT0gcmV0OwotICAgICAgICAgICAgdG90YWxfYnl0ZXNfcmVhZCArPSByZXQ7Ci0gICAgICAgICAgICBzZWN0b3IgKz0gKHJldCA+PiBTRUNUT1JfU0hJRlQpOwotICAgICAgICAgICAgYnVmc2lua18uVXBkYXRlQnVmZmVyT2Zmc2V0KHJldCk7Ci0gICAgICAgIH0KLQotICAgICAgICBpZiAoIWlvX2Vycm9yKSB7Ci0gICAgICAgICAgICBpZiAoIVdyaXRlRG1Vc2VyUGF5bG9hZCh0b3RhbF9ieXRlc19yZWFkLCBoZWFkZXJfcmVzcG9uc2UpKSB7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgICAgICAgICAgfQotCi0gICAgICAgICAgICBTTkFQX0xPRyhERUJVRykgPDwgIldyaXRlRG1Vc2VyUGF5bG9hZCBzdWNjZXNzIHRvdGFsX2J5dGVzX3JlYWQ6ICIgPDwgdG90YWxfYnl0ZXNfcmVhZAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgaGVhZGVyLXJlc3BvbnNlOiAiIDw8IGhlYWRlcl9yZXNwb25zZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgcmVtYWluaW5nX3NpemU6ICIgPDwgcmVtYWluaW5nX3NpemU7Ci0gICAgICAgICAgICBoZWFkZXJfcmVzcG9uc2UgPSBmYWxzZTsKLSAgICAgICAgICAgIHJlbWFpbmluZ19zaXplIC09IHRvdGFsX2J5dGVzX3JlYWQ7Ci0gICAgICAgIH0KLSAgICB9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AgICB9CiAKQEAgLTU0LDggKzY1LDExIEBACiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6OnZlY3Rvcjx1aW50NjRfdD4mIGJsb2NrcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6dmVjdG9yPGNvbnN0IENvd09wZXJhdGlvbio+JiB4b3Jfb3BfdmVjKSB7CiAgICAgaW50IG51bV9vcHMgPSAqcGVuZGluZ19vcHM7Ci0gICAgaW50IG5yX2NvbnNlY3V0aXZlID0gMDsKKyAgICBpZiAoY293X29wX21lcmdlX3NpemVfICE9IDApIHsKKyAgICAgICAgbnVtX29wcyA9IHN0ZDo6bWluKHN0YXRpY19jYXN0PGludD4oY293X29wX21lcmdlX3NpemVfKSwgKnBlbmRpbmdfb3BzKTsKKyAgICB9CiAKKyAgICBpbnQgbnJfY29uc2VjdXRpdmUgPSAwOwogICAgIGJvb2wgaXNfb3BzX3ByZXNlbnQgPSAoIVJBSXRlckRvbmUoKSAmJiBudW1fb3BzKTsKIAogICAgIGlmICghaXNfb3BzX3ByZXNlbnQpIHsKQEAgLTY0LDExICs3OCwxMiBAQAogCiAgICAgLy8gR2V0IHRoZSBmaXJzdCBibG9jayB3aXRoIG9mZnNldAogICAgIGNvbnN0IENvd09wZXJhdGlvbiogY293X29wID0gR2V0UkFPcEl0ZXIoKTsKLSAgICAqc291cmNlX29mZnNldCA9IGNvd19vcC0+c291cmNlOwogCi0gICAgaWYgKGNvd19vcC0+dHlwZSA9PSBrQ293Q29weU9wKSB7Ci0gICAgICAgICpzb3VyY2Vfb2Zmc2V0ICo9IEJMT0NLX1NaOwotICAgIH0gZWxzZSBpZiAoY293X29wLT50eXBlID09IGtDb3dYb3JPcCkgeworICAgIGlmICghcmVhZGVyXy0+R2V0U291cmNlT2Zmc2V0KGNvd19vcCwgc291cmNlX29mZnNldCkpIHsKKyAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJQcmVwYXJlTmV4dFJ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emUoKSkgewpAQCAtNDM1LDEzICs0NzEsMTQgQEAKICAgICAgICAgICAgIC8vIENoZWNrIGlmIHRoaXMgYmxvY2sgaXMgYW4gWE9SIG9wCiAgICAgICAgICAgICBpZiAoeG9yX29wLT5uZXdfYmxvY2sgPT0gbmV3X2Jsb2NrKSB7CiAgICAgICAgICAgICAgICAgLy8gUG9pbnRlciB0byB0aGUgZGF0YSByZWFkIGZyb20gYmFzZSBkZXZpY2UKLSAgICAgICAgICAgICAgICB1aW50OF90KiBidWZmZXIgPSByZWludGVycHJldF9jYXN0PHVpbnQ4X3QqPihidWZwdHIpOworICAgICAgICAgICAgICAgIGF1dG8gYnVmZmVyX3dvcmRzID0gcmVpbnRlcnByZXRfY2FzdDxXb3JkVHlwZSo+KGJ1ZnB0cik7CiAgICAgICAgICAgICAgICAgLy8gR2V0IHRoZSB4b3InZWQgZGF0YSByZWFkIGZyb20gQ09XIGRldmljZQotICAgICAgICAgICAgICAgIHVpbnQ4X3QqIHhvcl9kYXRhID0gcmVpbnRlcnByZXRfY2FzdDx1aW50OF90Kj4oKGNoYXIqKWJ1ZnNpbmtfLkdldFBheWxvYWRCdWZQdHIoKSArCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4b3JfYnVmX29mZnNldCk7CisgICAgICAgICAgICAgICAgYXV0byB4b3JfZGF0YV93b3JkcyA9IHJlaW50ZXJwcmV0X2Nhc3Q8V29yZFR5cGUqPigKKyAgICAgICAgICAgICAgICAgICAgICAgIChjaGFyKilidWZzaW5rXy5HZXRQYXlsb2FkQnVmUHRyKCkgKyB4b3JfYnVmX29mZnNldCk7CisgICAgICAgICAgICAgICAgYXV0byBudW1fd29yZHMgPSBCTE9DS19TWiAvIHNpemVvZihXb3JkVHlwZSk7CiAKLSAgICAgICAgICAgICAgICBmb3IgKHNpemVfdCBieXRlX29mZnNldCA9IDA7IGJ5dGVfb2Zmc2V0IDwgQkxPQ0tfU1o7IGJ5dGVfb2Zmc2V0KyspIHsKLSAgICAgICAgICAgICAgICAgICAgYnVmZmVyW2J5dGVfb2Zmc2V0XSBePSB4b3JfZGF0YVtieXRlX29mZnNldF07CisgICAgICAgICAgICAgICAgZm9yIChhdXRvIGkgPSAwOyBpIDwgbnVtX3dvcmRzOyBpKyspIHsKKyAgICAgICAgICAgICAgICAgICAgYnVmZmVyX3dvcmRzW2ldIF49IHhvcl9kYXRhX3dvcmRzW2ldOwogICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgIC8vIE1vdmUgdG8gbmV4dCBYT1Igb3AKQEAgLTQ2NywxNCArNTA0LDIwIEBACiAgICAgICAgIGlmICh4b3Jfb3BfaW5kZXggPCB4b3Jfb3BfdmVjLnNpemUoKSkgewogICAgICAgICAgICAgY29uc3QgQ293T3BlcmF0aW9uKiB4b3Jfb3AgPSB4b3Jfb3BfdmVjW3hvcl9vcF9pbmRleF07CiAgICAgICAgICAgICBpZiAoeG9yX29wLT5uZXdfYmxvY2sgPT0gbmV3X2Jsb2NrKSB7Ci0gICAgICAgICAgICAgICAgaWYgKCFyZWFkZXJfLT5SZWFkRGF0YSgqeG9yX29wLCAmYnVmc2lua18pKSB7CisgICAgICAgICAgICAgICAgdm9pZCogYnVmZmVyID0gYnVmc2lua18uQWNxdWlyZUJ1ZmZlcihCTE9DS19TWik7CisgICAgICAgICAgICAgICAgaWYgKCFidWZmZXIpIHsKKyAgICAgICAgICAgICAgICAgICAgU05BUF9MT0coRVJST1IpIDw8ICJSZWFkQWhlYWQgLSBmYWlsZWQgdG8gYWxsb2NhdGUgYnVmZmVyIGZvciBibG9jazogIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgeG9yX29wLT5uZXdfYmxvY2s7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKHNzaXplX3QgcnYgPSByZWFkZXJfLT5SZWFkRGF0YSh4b3Jfb3AsIGJ1ZmZlciwgQkxPQ0tfU1opOyBydiAhPSBCTE9DS19TWikgewogICAgICAgICAgICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIFJlYWRBaGVhZCAtIFhvck9wIFJlYWQgZmFpbGVkIGZvciBibG9jazogIiA8PCB4b3Jfb3AtPm5ld19ibG9jazsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIFJlYWRBaGVhZCAtIFhvck9wIFJlYWQgZmFpbGVkIGZvciBibG9jazogIiA8PCB4b3Jfb3AtPm5ld19ibG9jaworICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIsIHJldHVybiB2YWx1ZTogIiA8PCBydjsKICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgIHhvcl9vcF9pbmRleCArPSAxOwotICAgICAgICAgICAgICAgIGJ1ZnNpbmtfLlVwZGF0ZUJ1ZmZlck9mZnNldChCTE9DS19TWik7CiAgICAgICAgICAgICB9CiAgICAgICAgIH0KICAgICAgICAgYmxvY2tfaW5kZXggKz0gMTsKQEAgLTQ5Miw2ICs1MzUsOCBAQAogICAgIGJsb2Nrc18uY2xlYXIoKTsKICAgICBzdGQ6OnZlY3Rvcjxjb25zdCBDb3dPcGVyYXRpb24qPiB4b3Jfb3BfdmVjOwogCisgICAgQXV0b05vdGlmeVJlYWRBaGVhZEZhaWxlZCBub3RpZnlfcmVhZF9haGVhZF9mYWlsZWQoc25hcHVzZXJkXyk7CisKICAgICBidWZzaW5rXy5SZXNldEJ1ZmZlck9mZnNldCgpOwogCiAgICAgLy8gTnVtYmVyIG9mIG9wcyB0byBiZSBtZXJnZWQgaW4gdGhpcyB3aW5kb3cuIFRoaXMgaXMgYSBmaXhlZCBzaXplCkBAIC01MTgsOCArNTYzLDYgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBvZmZzZXQgOiIgPDwgc291cmNlX29mZnNldCAlIEJMT0NLX1NaCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgYnVmZmVyX29mZnNldCA6ICIgPDwgYnVmZmVyX29mZnNldCA8PCAiIGlvX3NpemUgOiAiIDw8IGlvX3NpemUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBidWYtYWRkciA6ICIgPDwgcmVhZF9haGVhZF9idWZmZXJfOwotCi0gICAgICAgICAgICBzbmFwdXNlcmRfLT5SZWFkQWhlYWRJT0ZhaWxlZCgpOwogICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICB9CiAKQEAgLTUzMCw2ICs1NzMsNyBAQAogCiAgICAgLy8gRG9uZSB3aXRoIG1lcmdpbmcgb3JkZXJlZCBvcHMKICAgICBpZiAoUkFJdGVyRG9uZSgpICYmIHRvdGFsX2Jsb2Nrc19tZXJnZWRfID09IDApIHsKKyAgICAgICAgbm90aWZ5X3JlYWRfYWhlYWRfZmFpbGVkLkNhbmNlbCgpOwogICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICB9CiAKQEAgLTU2MCwyMCArNjA0LDI1IEBACiAgICAgICAgICAgICAvLyBDaGVjayBpZiB0aGlzIGJsb2NrIGlzIGFuIFhPUiBvcAogICAgICAgICAgICAgaWYgKHhvcl9vcC0+bmV3X2Jsb2NrID09IG5ld19ibG9jaykgewogICAgICAgICAgICAgICAgIC8vIFJlYWQgdGhlIHhvcidlZCBkYXRhIGZyb20gQ09XCi0gICAgICAgICAgICAgICAgaWYgKCFyZWFkZXJfLT5SZWFkRGF0YSgqeG9yX29wLCAmYnVmc2luaykpIHsKKyAgICAgICAgICAgICAgICB2b2lkKiBidWZmZXIgPSBidWZzaW5rLkdldFBheWxvYWRCdWZmZXIoQkxPQ0tfU1opOworICAgICAgICAgICAgICAgIGlmICghYnVmZmVyKSB7CisgICAgICAgICAgICAgICAgICAgIFNOQVBfTE9HKEVSUk9SKSA8PCAiUmVhZEFoZWFkIC0gZmFpbGVkIHRvIGFsbG9jYXRlIGJ1ZmZlciI7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgaWYgKHNzaXplX3QgcnYgPSByZWFkZXJfLT5SZWFkRGF0YSh4b3Jfb3AsIGJ1ZmZlciwgQkxPQ0tfU1opOyBydiAhPSBCTE9DS19TWikgewogICAgICAgICAgICAgICAgICAgICBTTkFQX0xPRyhFUlJPUikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIFJlYWRBaGVhZCAtIFhvck9wIFJlYWQgZmFpbGVkIGZvciBibG9jazogIiA8PCB4b3Jfb3AtPm5ld19ibG9jazsKLSAgICAgICAgICAgICAgICAgICAgc25hcHVzZXJkXy0+UmVhZEFoZWFkSU9GYWlsZWQoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIFJlYWRBaGVhZCAtIFhvck9wIFJlYWQgZmFpbGVkIGZvciBibG9jazogIiA8PCB4b3Jfb3AtPm5ld19ibG9jaworICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIsIHJldHVybiB2YWx1ZTogIiA8PCBydjsKICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAvLyBQb2ludGVyIHRvIHRoZSBkYXRhIHJlYWQgZnJvbSBiYXNlIGRldmljZQotICAgICAgICAgICAgICAgIHVpbnQ4X3QqIGJ1ZmZlciA9IHJlaW50ZXJwcmV0X2Nhc3Q8dWludDhfdCo+KGJ1ZnB0cik7CisgICAgICAgICAgICAgICAgdWludDhfdCogcmVhZF9idWZmZXIgPSByZWludGVycHJldF9jYXN0PHVpbnQ4X3QqPihidWZwdHIpOwogICAgICAgICAgICAgICAgIC8vIEdldCB0aGUgeG9yJ2VkIGRhdGEgcmVhZCBmc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X3BhdGhfbWVyZ2U+Ci0gICAgICAgICAgICAvLwotICAgICAgICAgICAgLy8gUmVhZHMgdGhlIG1ldGFkYXRhIGFuZCBzZW5kIHRoZSBudW1iZXIgb2Ygc2VjdG9ycwotICAgICAgICAgICAgaWYgKG91dC5zaXplKCkgIT0gNSkgewotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIk1hbGZvcm1lZCBpbml0IG1lc3NhZ2UsICIgPDwgb3V0LnNpemUoKSA8PCAiIHBhcnRzIjsKLSAgICAgICAgICAgICAgICByZXR1cm4gU2VuZG1zZyhmZCwgImZhaWwiKTsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgYXV0byBoYW5kbGVyID0gQWRkSGFuZGxlcihvdXRbMV0sIG91dFsyXSwgb3V0WzNdLCBvdXRbNF0pOwotICAgICAgICAgICAgaWYgKCFoYW5kbGVyKSB7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJmYWlsIik7Ci0gICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgIGF1dG8gcmV0dmFsID0gInN1Y2Nlc3MsIiArIHN0ZDo6dG9fc3RyaW5nKGhhbmRsZXItPnNuYXB1c2VyZCgpLT5HZXROdW1TZWN0b3JzKCkpOwotICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsIHJldHZhbCk7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSBEYWVtb25PcHM6OlNUQVJUOiB7Ci0gICAgICAgICAgICAvLyBNZXNzYWdlIGZvcm1hdDoKLSAgICAgICAgICAgIC8vIHN0YXJ0LDxtaXNjX25hbWU+Ci0gICAgICAgICAgICAvLwotICAgICAgICAgICAgLy8gU3RhcnQgdGhlIG5ldyB0aHJlYWQgd2hpY2ggYmluZHMgdG8gZG0tdXNlciBtaXNjIGRldmljZQotICAgICAgICAgICAgaWYgKG91dC5zaXplKCkgIT0gMikgewotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIk1hbGZvcm1lZCBzdGFydCBtZXNzYWdlLCAiIDw8IG91dC5zaXplKCkgPDwgIiBwYXJ0cyI7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJmYWlsIik7Ci0gICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgIHN0ZDo6bG9ja19ndWFyZDxzdGQ6Om11dGV4PiBsb2NrKGxvY2tfKTsKLSAgICAgICAgICAgIGF1dG8gaXRlciA9IEZpbmRIYW5kbGVyKCZsb2NrLCBvdXRbMV0pOwotICAgICAgICAgICAgaWYgKGl0ZXIgPT0gZG1fdXNlcnNfLmVuZCgpKSB7Ci0gICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ291bGQgbm90IGZpbmQgaGFuZGxlcjogIiA8PCBvdXRbMV07Ci0gICAgICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJmYWlsIik7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBpZiAoISgqaXRlciktPnNuYXB1c2VyZCgpIHx8ICgqaXRlciktPnNuYXB1c2VyZCgpLT5Jc0F0dGFjaGVkKCkpIHsKLSAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJUcmllZCB0byByZS1hdHRhY2ggY29udHJvbCBkZXZpY2U6ICIgPDwgb3V0WzFdOwotICAgICAgICAgICAgICAgIHJldHVybiBTZW5kbXNnKGZkLCAiZmFpbCIpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgaWYgKCFTdGFydEhhbmRsZXIoKml0ZXIpKSB7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJmYWlsIik7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICByZXR1cm4gU2VuZG1zZyhmZCwgInN1Y2Nlc3MiKTsKLSAgICAgICAgfQotICAgICAgICBjYXNlIERhZW1vbk9wczo6U1RPUDogewotICAgICAgICAgICAgLy8gTWVzc2FnZSBmb3JtYXQ6IHN0b3AKLSAgICAgICAgICAgI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SAgICAgICAgICAgIC8vIGRlbGV0ZSw8bWlzY19uYW1lPgotICAgICAgICAgICAgaWYgKG91dC5zaXplKCkgIT0gMikgewotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIk1hbGZvcm1lZCBkZWxldGUgbWVzc2FnZSwgIiA8PCBvdXQuc2l6ZSgpIDw8ICIgcGFydHMiOwotICAgICAgICAgICAgICAgIHJldHVybiBTZW5kbXNnKGZkLCAiZmFpbCIpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIHN0ZDo6bG9ja19ndWFyZDxzdGQ6Om11dGV4PiBsb2NrKGxvY2tfKTsKLSAgICAgICAgICAgICAgICBhdXRvIGl0ZXIgPSBGaW5kSGFuZGxlcigmbG9jaywgb3V0WzFdKTsKLSAgICAgICAgICAgICAgICBpZiAoaXRlciA9PSBkbV91c2Vyc18uZW5kKCkpIHsKLSAgICAgICAgICAgICAgICAgICAgLy8gQWZ0ZXIgbWVyZ2UgaXMgY29tcGxldGVkLCB3ZSBzd2FwIGRtLXVzZXIgdGFibGUgd2l0aAotICAgICAgICAgICAgICAgICAgICAvLyB0aGUgdW5kZXJseWluZyBkbS1saW5lYXIgYmFzZSBkZXZpY2UuIEhlbmNlLCB3b3JrZXIKLSAgICAgICAgICAgICAgICAgICAgLy8gdGhyZWFkcyB3b3VsZCBoYXZlIHRlcm1pbnRlZCBhbmQgd2FzIHJlbW92ZWQgZnJvbQotICAgICAgICAgICAgICAgICAgICAvLyB0aGUgbGlzdC4KLSAgICAgICAgICAgICAgICAgICAgTE9HKERFQlVHKSA8PCAiQ291bGQgbm90IGZpbmQgaGFuZGxlcjogIiA8PCBvdXRbMV07Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiBTZW5kbXNnKGZkLCAic3VjY2VzcyIpOwotICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgIGlmICghKCppdGVyKS0+VGhyZWFkVGVybWluYXRlZCgpKSB7Ci0gICAgICA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0dXJuIFNlbmRtc2coZmQsICJmYWlsIik7CisgICAgICAgIH0KKyAgICAgICAgaWYgKCFoYW5kbGVyc18tPkRlbGV0ZUhhbmRsZXIob3V0WzFdKSkgeworICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJmYWlsIik7CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJzdWNjZXNzIik7CisgICAgfSBlbHNlIGlmIChjbWQgPT0gImRldGFjaCIpIHsKKyAgICAgICAgaGFuZGxlcnNfLT5UZXJtaW5hdGVNZXJnZVRocmVhZHMoKTsKKyAgICAgICAgdGVybWluYXRpbmdfID0gdHJ1ZTsKKyAgICAgICAgcmV0dXJuIHRydWU7CisgICAgfSBlbHNlIGlmIChjbWQgPT0gInN1cHBvcnRzIikgeworICAgICAgICBpZiAob3V0LnNpemUoKSAhPSAyKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJNYWxmb3JtZWQgc3VwcG9ydHMgbWVzc2FnZSwgIiA8PCBvdXQuc2l6ZSgpIDw8ICIgcGFydHMiOworICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJmYWlsIik7CisgICAgICAgIH0KKyAgICAgICAgaWYgKG91dFsxXSA9PSAic2Vjb25kX3N0YWdlX3NvY2tldF9oYW5kb2ZmIikgewogICAgICAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJzdWNjZXNzIik7CiAgICAgICAgIH0KLSAgICAgICAgZGVmYXVsdDogewotICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiUmVjZWl2ZWQgdW5rbm93biBtZXNzYWdlIHR5cGUgZnJvbSBjbGllbnQiOwotICAgICAgICAgICAgU2VuZG1zZyhmZCwgImZhaWwiKTsKLSAgICAgICAgICAgIHJldHVybiBmYWxzZTsKKyAgICAgICAgcmV0dXJuIFNlbmRtc2coZmQsICJmYWlsIik7CisgICAgfSBlbHNlIGlmIChjbWQgPT0gImluaXRpYXRlX21lcmdlIikg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gdGhyZWFkcyBvbmx5IGR1cmluZwogICAgIC8vIGRldmljZSBib290IGFmdGVyIE9UQS4gRm9yIGFsbCBvdGhlciBwdXJwb3NlcywKICAgICAvLyBvbmUgdGhyZWFkIGlzIHN1ZmZpY2llbnQuIFdlIGRvbid0IHdhbnQgdG8gY29uc3VtZQpAQCAtNDk2LDE5NSArMzU1LDI4IEBACiAgICAgLy8KICAgICAvLyBEdXJpbmcgYm9vdCB1cCwgd2UgbmVlZCBtdWx0aXBsZSB0aHJlYWRzIHByaW1hcmlseSBmb3IKICAgICAvLyB1cGRhdGUtdmVyaWZpY2F0aW9uLgotICAgIGludCBudW1fd29ya2VyX3RocmVhZHMgPSBrTnVtV29ya2VyVGhyZWFkczsKKyAgICBpZiAoIW51bV93b3JrZXJfdGhyZWFkcy5oYXNfdmFsdWUoKSkgeworICAgICAgICBudW1fd29ya2VyX3RocmVhZHMgPSBrTnVtV29ya2VyVGhyZWFkczsKKyAgICB9CiAgICAgaWYgKGlzX3NvY2tldF9wcmVzZW50XykgewogICAgICAgICBudW1fd29ya2VyX3RocmVhZHMgPSAxOwogICAgIH0KIAotICAgIGJvb2wgcGVyZm9ybV92ZXJpZmljYXRpb24gPSB0cnVlOwotICAgIGlmIChhbmRyb2lkOjpiYXNlOjpFbmRzV2l0aChtaXNjX25hbWUsICItaW5pdCIpIHx8IGlzX3NvY2tldF9wcmVzZW50XykgewotICAgICAgICBwZXJmb3JtX3ZlcmlmaWNhdGlvbiA9IGZhbHNlOworICAgIGlmIChhbmRyb2lkOjpiYXNlOjpFbmRzV2l0aChtaXNjX25hbWUsICItaW5pdCIpIHx8IGlzX3NvY2tldF9wcmVzZW50XyB8fAorICAgICAgICAoYWNjZXNzKGtCb290U25hcHNob3RzV2l0aG91dFNsb3RTd2l0Y2gsIEZfT0spID09IDApKSB7CisgICAgICAgIGhhbmRsZXJzXy0+RGlzYWJsZVZlcmlmaWNhdGlvbigpOwogICAgIH0KIAotICAgIGF1dG8gc25hcHVzZXJkID0gc3RkOjptYWtlX3NoYXJlZDxTbmFwc2hvdEhhbmRsZXI+KG1pc2NfbmFtZSwgY293X2RldmljZV9wYXRoLCBiYWNraW5nX2RldmljZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYXNlX3BhdGhfbWVyZ2UsIG51bV93b3JrZXJfdGhyZWFkcywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpb191cmluZ19lbmFibGVkXywgcGVyZm9ybV92ZXJpZmljYXRpb24pOwotICAgIGlmICghc25hcHVzZXJkLT5Jbml0Q293RGV2aWNlKCkpIHsKLSAgICAgICAgTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIGluaXRpYWxpemUgU25hcHVzZXJkIjsKLSAgICAgICAgcmV0dXJuIG51bGxwdHI7Ci0gICAgfQorICAgIGF1dG8gb3BlbmVyID0gYmxvY2tfc2VydmVyX2ZhY3RvcnlfLT5DcmVhdGVPcGVuZXIobWlzY19uYW1lKTsKIAotICAgIGlmICghc25hcHVzZXJkLT5Jbml0aWFsaXplV29ya2VycygpKSB7Ci0gICAgICAgIExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBpbml0aWFsaXplIHdvcmtlcnMiOwotICAgICAgICByZXR1cm4gbnVsbHB0cjsKLSAgICB9Ci0KLSAgICBhdXRvIGhhbmRsZXIgPSBzdGQ6Om1ha2Vfc2hhcmVkPEhhbmRsZXJUaHJlYWQ+KHNuYXB1c2VyZCk7Ci0gICAgewotICAgICAgICBzdGQ6OmxvY2tfZ3VhcmQ8c3RkOjptdXRleD4gbG9jayhsb2NrXyk7Ci0gICAgICAgIGlmIChGaW5kSGFuZGxlcigmbG9jaywgbWlzY19uYW1lKSAhPSBkbV91c2Vyc18uZW5kKCkpIHsKLSAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkhhbmRsZXIgYWxyZWFkeSBleGlzdHM6ICIgPDwgbWlz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BAIC0xNDYsMTMgKzg2LDEyIEBACiAgICAgc3RkOjpzaGFyZWRfcHRyPEhhbmRsZXJUaHJlYWQ+IEFkZEhhbmRsZXIoY29uc3Qgc3RkOjpzdHJpbmcmIG1pc2NfbmFtZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgY293X2RldmljZV9wYXRoLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBiYWNraW5nX2RldmljZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgYmFzZV9wYXRoX21lcmdlKTsKLSAgICBib29sIFN0YXJ0SGFuZGxlcihjb25zdCBzdGQ6OnNoYXJlZF9wdHI8SGFuZGxlclRocmVhZD4mIGhhbmRsZXIpOwotICAgIGJvb2wgU3RhcnRNZXJnZShzdGQ6OmxvY2tfZ3VhcmQ8c3RkOjptdXRleD4qIHByb29mX29mX2xvY2ssCi0gICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c2hhcmVkX3B0cjxIYW5kbGVyVGhyZWFkPiYgaGFuZGxlcik7Ci0gICAgc3RkOjpzdHJpbmcgR2V0TWVyZ2VTdGF0dXMoY29uc3Qgc3RkOjpzaGFyZWRfcHRyPEhhbmRsZXJUaHJlYWQ+JiBoYW5kbGVyKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgYmFzZV9wYXRoX21lcmdlLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6b3B0aW9uYWw8dWludDMyX3Q+IG51bV93b3JrZXJfdGhyZWFkcywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBib29sIG9fZG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5jZSkpOworCisgICAgc2l6ZV90IHggPSBudW1fYmxvY2tzOworICAgIHdoaWxlICgxKSB7CisgICAgICAgIEFTU0VSVF9UUlVFKHdyaXRlci0+QWRkQ29weShzb3VyY2VfYmxrLCBibGtfc3JjX2NvcHkpKTsKKyAgICAgICAgeCAtPSAxOworICAgICAgICBpZiAoeCA9PSAwKSB7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgICBzb3VyY2VfYmxrIC09IDE7CisgICAgICAgIGJsa19zcmNfY29weSAtPSAxOworICAgIH0KKworICAgIHNvdXJjZV9ibGsgPSBudW1fYmxvY2tzOworICAgIGJsa19zcmNfY29weSA9IGJsa19lbmRfY29weTsKKworICAgIEFTU0VSVF9UUlVFKHdyaXRlci0+QWRkUmF3QmxvY2tzKHNvdXJjZV9ibGssIHJhbmRvbV9idWZmZXJfMV8uZ2V0KCksIHNpemVfKSk7CisKKyAgICBzaXplX3QgYmxrX3plcm9fY29weV9zdGFydCA9IHNvdXJjZV9ibGsgKyBudW1fYmxvY2tzOworICAgIHNpemVfdCBibGtfemVyb19jb3B5X2VuZCA9IGJsa196ZXJvX2NvcHlfc3RhcnQgKyBudW1fYmxvY2tzOworCisgICAgQVNTRVJUX1RSVUUod3JpdGVyLT5BZGRaZXJvQmxvY2tzKGJsa196ZXJvX2NvcHlfc3RhcnQsIG51bV9ibG9ja3MpKTsKKworICAgIHNpemVfdCBibGtfcmFuZG9tMl9yZXBsYWNlX3N0YXJ0ID0gYmxrX3plcm9fY29weV9lbmQ7CisKKyAgICBBU1NFUlRfVFJVRSh3cml0ZXItPkFkZFJhd0Jsb2NrcyhibGtfcmFuZG9tMl9yZXBsYWNlX3N0YXJ0LCByYW5kb21fYnVmZmVyXzFfLmdldCgpLCBzaXplXykpOworCisgICAgc2l6ZV90IGJsa194b3Jfc3RhcnQgPSBibGtfcmFuZG9tMl9yZXBsYWNlX3N0YXJ0ICsgbnVtX2Jsb2NrczsKKyAgICBzaXplX3QgeG9yX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b3B5KHNvdXJjZV9ibGssIGJsa19zcmNfY29weSkpOworICAgICAgICBBU1NFUlRfVFJVRSh3cml0ZXItPkFkZENvcHkoc291cmNlX2JsaywgYmxrX3NyY19jb3B5KSk7CiAgICAgICAgIHggLT0gMTsKICAgICAgICAgaWYgKHggPT0gMCkgewogICAgICAgICAgICAgYnJlYWs7CkBAIC00MzUsMTIgKzYzMCwxMiBAQAogICAgIH0KIAogICAgIGZvciAoc2l6ZV90IGkgPSBudW1fYmxvY2tzOyBpID4gMDsgaS0tKSB7Ci0gICAgICAgIEFTU0VSVF9UUlVFKHdyaXRlci5BZGRYb3JCbG9ja3MobnVtX2Jsb2NrcyArIGkgLSAxLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZyYW5kb21fYnVmZmVyXzFfLmdldCgpW29wdGlvbnMuYmxvY2tfc2l6ZSAqIChpIC0gMSldLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9wdGlvbnMuYmxvY2tfc2l6ZSwgMiAqIG51bV9ibG9ja3MgKyBpIC0gMSwgeG9yX29mZnNldCkpOworICAgICAgICBBU1NFUlRfVFJVRSh3cml0ZXItPkFkZFhvckJsb2NrcygKKyAgICAgICAgICAgICAgICBudW1fYmxvY2tzICsgaSAtIDEsICZyYW5kb21fYnVmZmVyXzFfLmdldCgpW3dyaXRlci0+R2V0QmxvY2tTaXplKCkgKiAoaSAtIDEpXSwKKyAgICAgICAgICAgICAgICB3cml0ZXItPkdldEJsb2NrU2l6ZSgpLCAyICogbnVtX2Jsb2NrcyArIGkgLSAxLCB4b3Jfb2Zmc2V0KSk7CiAgICAgfQogICAgIC8vIEZsdXNoIG9wZXJhdGlvbnMKLSAgICBBU1NFUlRfVFJVRSh3cml0ZXIuRmluYWxpemUoKSk7CisgICAgQVNTRVJUX1RSVUUod3JpdGVyLT5GaW5hbGl6ZSgpKTsKICAgICAvLyBDb25zdHJ1Y3QgdGhlIGJ1ZmZlciByZXF1a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l9idWZmZXJbaV0gPSBzdGF0aWNfY2FzdDxjaGFyPignQycgKyBpIC8gQkxPQ0tfU1opOworICAgIH0KKyAgICBzaXplX3QgeG9yX29mZnNldCA9IDIxOworICAgIHN0ZDo6c3RyaW5nIHNvdXJjZV9idWZmZXI7CisgICAgc291cmNlX2J1ZmZlci5yZXNpemUodG90YWxfYmxvY2tzX3RvX3dyaXRlICogQkxPQ0tfU1osICdcMCcpOworICAgIEFTU0VSVF9FUShhbmRyb2lkOjpiYXNlOjpSZWFkRnVsbHlBdE9mZnNldChiYXNlX2ZkXywgc291cmNlX2J1ZmZlci5kYXRhKCksIHNvdXJjZV9idWZmZXIuc2l6ZSgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplXyArIHhvcl9vZmZzZXQpLAorICAgICAgICAgICAgICB0cnVlKTsKKyAgICBmb3IgKHNpemVfdCBpID0gMDsgaSA8IHhvcl9idWZmZXIuc2l6ZSgpOyBpKyspIHsKKyAgICAgICAgeG9yX2J1ZmZlcltpXSBePSBzb3VyY2VfYnVmZmVyW2ldOworICAgIH0KKworICAgIEFTU0VSVF9FUSh4b3JfYmxvY2tfc3RhcnQsIHNvdXJjZV9ibG9jayk7CisKKyAgICBBU1NFUlRfVFJVRSh3cml0ZXItPkFkZFhvckJsb2Nrcyhzb3VyY2VfYmxvY2ssIHhvcl9idWZmZXIuZGF0YSgpLCB4b3JfYnVmZmVyLnNpemUoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2l6ZV8gLyBCTE9DS19TWiksIHhvcl9vZmZzZXQpKTsKKyAgICAvLyBGbHVzaCBvcGVyYXRpb25zCisgICAgQVNTRVJUX1RSVUUod3JpdGVyLT5GaW5hbGl6ZSgpKTsKKworICAgIC8vIENvbnN0cnVjdCB0aGUgYnVmZmVyIHJlcXVpcmVkIGZvciB2YWxpZGF0aW9uCisgICAgb3JpZ19idWZmZXJfID0gc3RkOjptYWtlX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ja19zaXplcyA9IHs0MDk2LCA4MTkyLCAxNjM4NCwgMzI3NjgsIDY1NTM2LCAxMzEwNzJ9OworICAgIHN0ZDo6dmVjdG9yPHN0ZDo6c3RyaW5nPiBjb21wcmVzc2lvbl9hbGdvID0geyJub25lIiwgImx6NCIsICJ6c3RkIiwgImd6In07CisgICAgc3RkOjp2ZWN0b3I8aW50PiB0aHJlYWRzID0gezEsIDJ9OworICAgIHN0ZDo6dmVjdG9yPGJvb2w+IHVyaW5nX2NvbmZpZ3MgPSBHZXRJb1VyaW5nQ29uZmlncygpOworCisgICAgLy8gVGhpcyBzaG91bGQgdGVzdCA5NiBjb21iaW5hdGlvbiBhbmQgdmFsaWRhdGVzIHRoZSBJL08gcGF0aAorICAgIGZvciAoYXV0byBibG9jayA6IGJsb2NrX3NpemVzKSB7CisgICAgICAgIGZvciAoYXV0byBjb21wcmVzc2lvbiA6IGNvbXByZXNzaW9uX2FsZ28pIHsKKyAgICAgICAgICAgIGZvciAoYXV0byB0aHJlYWQgOiB0aHJlYWRzKSB7CisgICAgICAgICAgICAgICAgZm9yIChhdXRvIGlvX3VyaW5nIDogdXJpbmdfY29uZmlncykgeworICAgICAgICAgICAgICAgICAgICBUZXN0UGFyYW0gcGFyYW07CisgICAgICAgICAgICAgICAgICAgIHBhcmFtLmJsb2NrX3NpemUgPSBibG9jazsKKyAgICAgICAgICAgICAgICAgICAgcGFyYW0uY29tcHJlc3Npb24gPSBjb21wcmVzc2lvbjsKKyAgICAgICAgICAgICAgICAgICAgcGFyYW0ubnVtX3RocmVhZHMgPSB0aHJlYWQ7CisgICAgICAgICAgICAgICAgICAgIHBhcmFtLmlvX3VyaW5nID0gaW9fdXJpbmc7CisgICAgICAgICAgICAgICAgICAgIHBhcmFtLm9fZGlyZWN0ID0gZmFsc2U7CisgICAgICAgICAgICAgICAgICAgIHBhcmFtLmNvd19vcF9tZXJnZV9zaXplID0gMDsKKyAgICAgICAgICAgICAgICAgICAgdGVzdFBhcmFtcy5wdXNo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scy9BbmRyb2lkLmJwCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmExYzkyYzAKLS0tIC9kZXYvbnVsbAorKysgYi9mc19tZ3IvbGlic25hcHNob3QvdG9vbHMvQW5kcm9pZC5icApAQCAtMCwwICsxLDQ2IEBACisKK2NjX2JpbmFyeSB7CisgICAgbmFtZTogImNvd19iZW5jaG1hcmsiLAorICAgIGhvc3Rfc3VwcG9ydGVkOiB0cnVlLAorICAgIGRlZmF1bHRzOiBbCisgICAgICAgICJmc19tZ3JfZGVmYXVsdHMiLAorICAgICAgICAibGlic25hcHNob3RfY293X2RlZmF1bHRzIiwKKyAgICBdLAorCisgICAgc3JjczogWyJjb3dfYmVuY2htYXJrLmNwcCJdLAorCisgICAgc3RhdGljX2xpYnM6IFsKKyAgICAgICAgImxpYnNuYXBzaG90X2NvdyIsCisgICAgXSwKKworICAgIHNoYXJlZF9saWJzOiBbCisgICAgICAgICJsaWJiYXNlIiwKKyAgICAgICAgImxpYmxvZyIsCisgICAgXSwKKworICAgIGNmbGFnczogWyItV2Vycm9yIl0sCit9CisKKworY2NfYmluYXJ5IHsKKyAgICBuYW1lOiAid3JpdGVfY293IiwKKyAgICBob3N0X3N1cHBvcnRlZDogdHJ1ZSwKKyAgICBkZWZhdWx0czogWworICAgICAgICAiZnNfbWdyX2RlZmF1bHRzIiwKKyAgICAgICAgImxpYnNuYXBzaG90X2Nvd19kZWZhdWx0cyIsCisgICAgXSwKKworICAgIHNyY3M6IFsid3JpdGVfY293LmNwcCJdLAorCisgICAgc3RhdGljX2xpYnM6IFsKKyAgICAgICAgImxpYnNuYXBzaG90X2NvdyIsCisgICAgICAgICJsaWJnZmxhZ3MiLAorICAgIF0sCisKKyAgICBzaGFyZWRfbGliczogWworICAgICAgICAibGliYmFzZSIsCisgICAgICAgICJsaWJsb2ciLAorICAgIF0sCisKKyAgICBjZmxhZ3M6IFsiLVdlcnJvciJdLAorfQpkaWZmIC0tZ2l0IG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YW5kCisvLyBsaW1pdGF0aW9ucyB1bmRlciB0aGUgTGljZW5zZS4KKy8vCisjaW5jbHVkZSA8bWVtb3J5PgorCisjaW5jbHVkZSA8YXJyYXk+CisjaW5jbHVkZSA8aW9zdHJlYW0+CisjaW5jbHVkZSA8cmFuZG9tPgorCisjaW5jbHVkZSA8bGlic25hcHNob3QvY293X2NvbXByZXNzLmg+CisjaW5jbHVkZSA8bGlic25hcHNob3QvY293X2Zvcm1hdC5oPgorCitzdGF0aWMgY29uc3QgdWludDMyX3QgQkxPQ0tfU1ogPSA0MDk2Oworc3RhdGljIGNvbnN0IHVpbnQzMl90IFNFRURfTlVNQkVSID0gMTA7CisKK25hbWVzcGFjZSBhbmRyb2lkIHsKK25hbWVzcGFjZSBzbmFwc2hvdCB7CisKK3N0YXRpYyBzdGQ6OnN0cmluZyBDb21wcmVzc2lvblRvU3RyaW5nKENvd0NvbXByZXNzaW9uJiBjb21wcmVzc2lvbikgeworICAgIHN0ZDo6c3RyaW5nIG91dHB1dDsKKyAgICBzd2l0Y2ggKGNvbXByZXNzaW9uLmFsZ29yaXRobSkgeworICAgICAgICBjYXNlIGtDb3dDb21wcmVzc0Jyb3RsaToKKyAgICAgICAgICAgIG91dHB1dC5hcHBlbmQoImJyb3RsaSIpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2Uga0Nvd0NvbXByZXNzR3o6CisgICAgICAgICAgICBvdXRwdXQuYXBwZW5kKCJneiIpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2Uga0Nvd0NvbXByZXNzTHo0OgorICAgICAgICAgICAgb3V0cHV0LmFwcGVuZCgibHo0Iik7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBrQ293Q29tcHJlc3Nac3RkOgorICAgICAgICAgICAgb3V0cHV0LmFwcGVuZCgienN0ZCIpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2Uga0Nvd0NvbXByZXNzTm9uZToKKyAgICAgIC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UgY29tcHJlc3Npb25fcmF0aW8gPSBzaXplICogMS4wMCAvIGJ1ZmZlci5zaXplKCk7CisKKyAgICAgICAgc3RkOjpjb3V0IDw8ICJNZXRyaWNzIGZvciAiIDw8IENvbXByZXNzaW9uVG9TdHJpbmcoY29tcHJlc3Npb25fbGlzdFtpXSkgPDwgIjogbGF0ZW5jeSAtPiAiCisgICAgICAgICAgICAgICAgICA8PCBsYXRlbmN5LmNvdW50KCkgPDwgIm1zICIKKyAgICAgICAgICAgICAgICAgIDw8ICIgY29tcHJlc3Npb24gcmF0aW8gLT4iIDw8IGNvbXByZXNzaW9uX3JhdGlvIDw8ICIgXG4iOworCisgICAgICAgIGxhdGVuY2llcy5lbXBsYWNlX2JhY2soCisgICAgICAgICAgICAgICAgc3RkOjptYWtlX3BhaXIobGF0ZW5jeS5jb3VudCgpLCBDb21wcmVzc2lvblRvU3RyaW5nKGNvbXByZXNzaW9uX2xpc3RbaV0pKSk7CisgICAgICAgIHJhdGlvcy5lbXBsYWNlX2JhY2soCisgICAgICAgICAgICAgICAgc3RkOjptYWtlX3BhaXIoY29tcHJlc3Npb25fcmF0aW8sIENvbXByZXNzaW9uVG9TdHJpbmcoY29tcHJlc3Npb25fbGlzdFtpXSkpKTsKKyAgICB9CisKKyAgICBpbnQgYmVzdF9zcGVlZCA9IDA7CisgICAgaW50IGJlc3RfcmF0aW8gPSAwOworCisgICAgZm9yIChzaXplX3QgaSA9IDE7IGkgPCBsYXRlbmNpZXMuc2l6ZSgpOyBpKyspIHsKKyAgICAgICAgaWYgKGxhdGVuY2llc1tpXS5maXJzdCA8IGxhdGVuY2llc1tiZXN0X3NwZWVkXS5maXJzdCkgeworICAgICAgICAgICAgYmVzdF9zcGVlZCA9IGk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKHJhdGlvc1tpXS5maXJzdCA8IHJhdGlvc1tiZXN0X3JhdGlvXS5maXJzdCkgeworICAgICAgICAgICAgYmVzdF9yYXRpbyA9IGk7CisgICAgICAgIH0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ICAgICAgICAgICAgICAgICB7InNoYXJlZCIsIE1TX1NIQVJFRH0sCisgICAgICAgICAgICAgICAgeyJsYXp5dGltZSIsIE1TX0xBWllUSU1FfSwKICAgICAgICAgICAgICAgICB7ImRlZmF1bHRzIiwgMH0sCiAgICAgICAgICAgICAgICAgezAsIDB9LAogICAgICAgICB9OwpAQCAtNDk3LDYgKzUzMSw3IEBACiAgICAgRVhQRUNUX0VRKCJub25lMCIsIGVudHJ5LT5tb3VudF9wb2ludCk7CiAgICAgewogICAgICAgICBGc3RhYkVudHJ5OjpGc01nckZsYWdzIGZsYWdzID0ge307CisgICAgICAgIGZsYWdzLmZpbGVfZW5jcnlwdGlvbiA9IHRydWU7CiAgICAgICAgIEVYUEVDVF9UUlVFKENvbXBhcmVGbGFncyhmbGFncywgZW50cnktPmZzX21ncl9mbGFncykpOwogICAgIH0KICAgICBFWFBFQ1RfRVEoIiIsIGVudHJ5LT5tZXRhZGF0YV9rZXlfZGlyKTsKQEAgLTY3NSw2ICs3MTAsNyBAQAogc291cmNlIG5vbmUzICAgICAgIHN3YXAgICBkZWZhdWx0cyAgICAgIHpyYW1zaXplPTUlCiBzb3VyY2Ugbm9uZTQgICAgICAgc3dhcCAgIGRlZmF1bHRzICAgICAgenJhbXNpemU9MTA1JQogc291cmNlIG5vbmU1ICAgICAgIHN3YXAgICBkZWZhdWx0cyAgICAgIHpyYW1zaXplPSUKK3NvdXJjZSBub25lNiAgICAgICBzd2FwICAgZGVmYXVsdHMgICAgICB6cmFtc2l6ZT0yMTAlCiApZnMiOwogICAgIEFTU0VSVF9UUlVFKGFuZHJvaWQ6OmJhc2U6OldyaXRlU3RyaW5nVG9GaWxlKGZzdGFiX2NvbnRlbnRzLCB0Zi5wYXRoKSk7CiAKQEAgLTcwNywxMiArNzQzLDE3IEBACiAKICAgICBFWFBFQ1RfRVEoIm5vbmU0IiwgZW50cnktPm1vdW50X3BvaW50KTsKICAgICBFWFBFQ1RfVFJVRShDb21wYXJlRmxhZ3Mo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gPSBOZXh0QXJnKCk7CisgICAgICAgICAgICBzdGQ6OnN0cmluZyBibG9ja19kZXZpY2UxID0gTmV4dEFyZygpOworICAgICAgICAgICAgdWludDY0X3QgY2h1bmtfc2l6ZTsKKyAgICAgICAgICAgIGlmICghYW5kcm9pZDo6YmFzZTo6UGFyc2VVaW50KE5leHRBcmcoKSwgJmNodW5rX3NpemUpKSB7CisgICAgICAgICAgICAgICAgc3RkOjpjZXJyIDw8ICJFeHBlY3RlZCBzdGFydCBzZWN0b3IsIGdvdDogIiA8PCBQcmV2aW91c0FyZygpIDw8IHN0ZDo6ZW5kbDsKKyAgICAgICAgICAgICAgICByZXR1cm4gbnVsbHB0cjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHJldHVybiBzdGQ6Om1ha2VfdW5pcXVlPERtVGFyZ2V0U3RyaXBlPihzdGFydF9zZWN0b3IsIG51bV9zZWN0b3JzLCBjaHVua19zaXplLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsb2NrX2RldmljZTAsIGJsb2NrX2RldmljZTEpOwogICAgICAgICB9IGVsc2UgaWYgKHRhcmdldF90eXBlID09ICJib3ciKSB7CiAgICAgICAgICAgICBpZiAoIUhhc0FyZ3MoMSkpIHsKICAgICAgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgIkV4cGVjdGVkIFwiYm93XCIgPGJsb2NrX2RldmljZT4iIDw8IHN0ZDo6ZW5kbDsKQEAgLTE4Nyw2ICsyMDQsNDYgQEAKICAgICAgICAgICAgIHJldHVybiBzdGQ6Om1ha2VfdW5pcXVlPERtVGFyZ2V0VXNlcj4oc3RhcnRfc2VjdG9yLCBudW1fc2VjdG9ycywgY29udHJvbF9kZXZpY2UpOwogICAgICAgICB9IGVsc2UgaWYgKHRhcmdldF90eXBlID09ICJlcnJvciIpIHsKICAgICAgICAgICAgIHJldHVybiBzdGQ6Om1ha2VfdW5pcXVlPERtVGFyZ2V0RXJyb3I+KHN0YXJ0X3NlY3RvciwgbnVtX3NlY3RvcnMpOworICAgICAgICB9IGVsc2UgaWYgKHRhcmdldF90eXBlID09ICJ0aGluLXBvb2wiKSB7CisgICAgICAgICAgICBpZiAoIUhhc0FyZ3MoNCkpIHsKKyAgICAgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgIkV4cGVjdGVkIFwidGhpbi1wb29sXCIgPG1ldGFkYXRhIGRldj4gPGRhdGEgZGV2PiA8ZGF0YSBibG9jayBzaXplPiAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICI8bG93IHdhdGVyIG1hcms+IDxmZWF0dXJlIGFyZ3M+IgorICAgICAgICAgICAgICAgICAgICAgICAgICA8PCBzdGQ6OmVuZGw7CisgICAgICAgICAgICAgICAgcmV0dXJuIG51bGxwdHI7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIHN0ZDo6c3RyaW5nIG1ldGFkYXRhX2RldiA9IE5leHRBcmcoKTsKKyAgICAgICAgICAgIHN0ZDo6c3RyaW5nIGRhdGFfZGV2ID0gTmV4dEFyZygpOworICAgICAgICAgICAgc3RkOjpzdHJpbmcgZGF0YV9ibG9ja19zaXplX3N0ciA9IE5leHRBcmcoKTsKKyAgICAgICAgICAgIHN0ZDo6c3RyaW5nIGxvd193YXRlcl9tYXJrX3N0ciA9IE5leHRBcmcoKTsKKworICAgICAgICAgICAgdWludDY0X3QgZGF0YV9ibG9ja19zaXplOworICAgICAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpQYXJzZVVpbnQoZGF0YV9ibG9ja19zaXplX3N0ciwgJmRhdGFfYmxvY2tfc2l6ZSkpIHsKKyAgICAgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgIkRhdGEgYmxvY2sgc2l6ZSBtdXN0IGJlIGFuIHVuc2lnbmVkIGludGVnZXIuXG4iOworICAgICAgICAgICAgICAgIHJldHVybiBudWxscHRyOworICAgICAgICAgICAgfQorICAgICAgICAgICAgdWludDY0X3QgbG93X3dhdGVyX21hcms7CisgICAgICAgICAgICBpZiAoIWFuZHJvaWQ6OmJhc2U6OlBhcnNlVWludChsb3dfd2F0ZXJfbWFya19zdHIsICZsb3dfd2F0ZXJfbWFyaykpIHsKKyAgICAgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgIkxvdyB3YXRlciBtYXJrIG11c3QgYmUgYW4gdW5zaWduZWQgaW50ZWdlci5cbiI7CisgICAgICAgICAgICAgICAgcmV0dXJuIG51bGxwdHI7CisgICAgICAgICAgICB9CisgICAgICAgICAgICByZXR1cm4gc3RkOjptYWtlX3VuaXF1ZTxEbVRhcmdldFRoaW5Qb29sPihzdGFydF9zZWN0b3IsIG51bV9zZWN0b3JzLCBtZXRhZGF0YV9kZXYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhX2RldiwgZGF0YV9ibG9ja19zaXplLCBsb3dfd2F0ZXJfbWFyayk7CisgICAgICAgIH0gZWxzZSBpZiAodGFyZ2V0X3R5cGUgPT0gInRoaW4iKSB7CisgICAgICAgICAgICBpZiAoIUhhc0FyZ3MoMikpIHsKKyAgICAgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgIkV4cGVjdGVkIFwidGhpblwiIDxwb29sIGRldj4gPGRldiBpZD4iIDw8IHN0ZDo6ZW5kbDsKKyAgICAgICAgICAgICAgICByZXR1cm4gbnVsbHB0cjsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgc3RkOjpzdHJpbmcgcG9vbF9kZXYgPSBOZXh0QXJnKCk7CisgICAgICAgICAgICBzdGQ6OnN0cmluZyBkZXZfaWRfc3RyID0gTmV4dEFyZygpOworCisgICAgICAgICAgICB1aW50NjRfdCBkZXZfaWQ7CisgICAgICAgICAgICBpZiAoIWFuZHJvaWQ6OmJhc2U6OlBhcnNlVWludChkZXZfaWRfc3RyLCAmZGV2X2lkKSkgeworICAgICAgICAgICAgICAgIHN0ZDo6Y2VyciA8PCAiRGV2IGlkIG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F92ZWM8dWludDhfdD4gY3VyUHdkSGFuZGxlOwotICAgICAgICBhbmRyb2lkOjpoYXJkd2FyZTo6aGlkbF92ZWM8dWludDhfdD4gY3VyUHdkOworICAgIGFuZHJvaWQ6OmhhcmR3YXJlOjpoaWRsX3ZlYzx1aW50OF90PiBjdXJQd2RIYW5kbGU7CisgICAgYW5kcm9pZDo6aGFyZHdhcmU6OmhpZGxfdmVjPHVpbnQ4X3Q+IGN1clB3ZDsKIAotICAgICAgICBpZiAoY3VycmVudFBhc3N3b3JkSGFuZGxlICYmIGN1cnJlbnRQYXNzd29yZCkgewotICAgICAgICAgICAgaWYgKGh3X2RldmljZSkgewotICAgICAgICAgICAgICAgIC8vIEhpZGwgSW1wbGVtZW50YXRpb25zIGV4cGVjdHMgcGFzc3dvcmRIYW5kbGUgdG8gYmUgaW4KLSAgICAgICAgICAgICAgICAvLyBnYXRla2VlcGVyOjpwYXNzd29yZF9oYW5kbGVfdCBmb3JtYXQuCi0gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnRQYXNzd29yZEhhbmRsZS0+c2l6ZSgpICE9IHNpemVvZihnYXRla2VlcGVyOjpwYXNzd29yZF9oYW5kbGVfdCkpIHsKLSAgICAgICAgICAgICAgICAgICAgTE9HKElORk8pIDw8ICJQYXNzd29yZCBoYW5kbGUgaGFzIHdyb25nIGxlbmd0aCI7Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiBHS19FUlJPUjsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBjdXJQd2RIYW5kbGUuc2V0VG9FeHRlcm5hbChjb25zdF9jYXN0PHVpbnQ4X3QqPihjdXJyZW50UGFzc3dvcmRIYW5kbGUtPmRhdGEoKSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50UGFzc3dvcmRIYW5kbGUtPnNpemUoKSk7Ci0gICAgICAgICAgICBjdXJQd2Quc2V0VG9FeHRlcm5hbChjb25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0gaHdfZGV2aWNlLT5lbnJvbGwoCisgICAgICAgIH0KKyAgICAgICAgY3VyUHdkSGFuZGxlLnNldFRvRXh0ZXJuYWwoY29uc3RfY2FzdDx1aW50OF90Kj4oY3VycmVudFBhc3N3b3JkSGFuZGxlLT5kYXRhKCkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50UGFzc3dvcmRIYW5kbGUtPnNpemUoKSk7CisgICAgICAgIGN1clB3ZC5zZXRUb0V4dGVybmFsKGNvbnN0X2Nhc3Q8dWludDhfdCo+KGN1cnJlbnRQYXNzd29yZC0+ZGF0YSgpKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudFBhc3N3b3JkLT5zaXplKCkpOworICAgIH0KKworICAgIGFuZHJvaWQ6OmhhcmR3YXJlOjpoaWRsX3ZlYzx1aW50OF90PiBuZXdQd2Q7CisgICAgbmV3UHdkLnNldFRvRXh0ZXJuYWwoY29uc3RfY2FzdDx1aW50OF90Kj4oZGVzaXJlZFBhc3N3b3JkLmRhdGEoKSksIGRlc2lyZWRQYXNzd29yZC5zaXplKCkpOworCisgICAgdWludDMyX3QgaHdfdXNlcklkID0gMDsKKyAgICBTdGF0dXMgcmVzdWx0ID0gYWRqdXN0X3VzZXJJZCh1c2VySWQsICZod191c2VySWQpOworICAgIGlmICghcmVzdWx0LmlzT2soKSkgeworICAgICAgICByZXR1cm4gcmVzdWx0OworICAgIH0KKworICAgIHVpbnQ2NF90IHNlY3VyZVVzZXJJZCA9IDA7CisgICAgaWYgKGFpZGxfaHdfZGV2aWNlKSB7CisgICAgICAgIC8vIEFJREwgZ2F0ZWtlZXBlciBzZXJ2aWNlCisgICAgICAgIEFpZGxHYXRla2VlcGVyRW5yb2xsUmVzcCByc3A7CisgICAgICAgIGF1dG8gcmVzdWx0ID0gYWlkbF9od19kZXZpY2UtPmVucm9sbChod191c2VySWQsIGN1clB3ZEhhbmRsZSwgY3VyUHdkLCBuZXdQd2QsICZyc3ApOworICAgICAgICBpZiAoIXJlc3VsdC5pc09rKCkpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgImVucm9sbCB0cmFuc2FjdGlvbiBmYWlsZWQiOworICAgICAgICAgICAgcmV0dXJuIEdLX0VSUk9SOworICAgICAgICB9CisgICAgICAgIGlmIChyc3Auc3RhdHVzQ29kZSA+PSBBaWRsSUdhdGVrZWVwZXI6OlNUQVRVU19PSykgeworICAgICAgICAgICAgKmdrUmVzcG9uc2UgPSBHS1Jlc3BvbnNlOjpvayh7cnNwLmRhdGEuYmVnaW4oKSwgcnNwLmRhdGEuZW5kKCl9KTsKKyAgICAgICAgICAgIHNlY3VyZVVzZXJJZCA9IHN0YXRpY19jYXN0PHVpbnQ2NF90Pihyc3Auc2VjdXJlVXNlcklkKTsKKyAgICAgICAgfSBlbHNlIGlmIChyc3Auc3RhdHVzQ29kZSA9PSBBaWRsSUdhdGVrZWVwZXI6OkVSUk9SX1JFVFJZX1RJTUVPVVQgJiYgcnNwLnRpbWVvdXRNcyA+IDApIHsKKyAgICAgICAgICAgICpna1Jlc3BvbnNlID0gR0tSZXNwb25zZTo6cmV0cnkocnNwLnRpbWVvdXRNcyk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAqZ2tSZXNwb25zZSA9IEdLUmVzcG9uc2U6OmVycm9yKCk7CisgICAgICAgIH0KKyAgICB9IGVsc2UgaWYgKGh3X2RldmljZSkgeworICAgICAgICAvLyBISURMIGdhdGVrZWVwZXIgc2VydmljZQorICAgICAgICBSZXR1cm48dm9pZD4gaHdSZXMgPSBod19kZXZpY2UtPmVucm9sbCgKICAgICAgICAgICAgICAgICBod191c2VySWQsIGN1clB3ZEhhbmRsZSwgY3VyUHdkLCBuZXdQd2QsCiAgICAgICAgICAgICAgICAgWyZna1Jlc3BvbnNlXShjb25zdCBHYXRla2VlcGVyUmVzcG9uc2UmIHJzcCkgewogICAgICAgICAgICAgICAgICAgICBpZiAocnNwLmNvZGUgPj0gR2F0ZWtlZXBlclN0YXR1c0NvZGU6OlNUQVRVU19PSykgewpAQCAtMjUxLDExMCArMjUwLDExNSBAQAogICAgICAgICAgICAgICAgICAgICAgICAgKmdrUmVzcG9uc2UgPSBHS1Jlc3BvbnNlOjplcnJvcigpOwogICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgfSk7Ci0gICAgICAgICAgICBpZiAoIWh3UmVzLmlzT2soKSkgewotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgImVucm9sbCB0cmFuc2FjdGlvbiBmYWlsZWQiOworICAgICAgICBpZiAoIWh3UmVzLmlzT2soKSkgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiZW5yb2xsIHRyYW5zYWN0aW9uIGZhaWxlZCI7CisgICAgICAgICAgICByZXR1cm4gR0tfRVJST1I7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGdrUmVzcG9uc2UtPnJlc3BvbnNlX2NvZGUoKSA9PSBHS1Jlc3BvbnNlQ29kZTo6T0spIHsKKyAgICAgICAgICAgIGlmIChna1Jlc3BvbnNlLT5wYXlsb2FkKCkuc2l6ZSgpICE9IHNpemVvZihnYXRla2VlcGVyOjpwYXNzd29yZF9oYW5kbGVfdCkpIHsKKyAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJIQUwgcmV0dXJuZWQgcGFzc3dvcmQgaGFuZGxlIG9mIGludmFsaWQgbGVuZ3RoICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8IGdrUmVzcG9uc2UtPnBheWxvYWQoKS5zaXplKCk7CiAgICAgICAgICAgICAgICAgcmV0dXJuIEdLX0VSUk9SOwogICAgICAgICAgICAgfQotICAgICAgICAgICAgaWYgKGdrUmVzcG9uc2UtPnJlc3BvbnNlX2NvZGUoKSA9PSBHS1Jlc3BvbnNlQ29kZTo6T0spIHsKLSAgICAgICAgICAgICAgICBpZiAoZ2tSZXNwb25zZS0+cGF5bG9hZCgpLnNpemUoKSAhPSBzaXplb2YoZ2F0ZWtlZXBlcjo6cGFzc3dvcmRfaGFuZGxlX3QpKSB7Ci0gICAgICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkhBTCByZXR1cm5lZCBwYXNzd29yZCBoYW5kbGUgb2YgaW52YWxpZCBsZW5ndGggIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8IGdrUmVzcG9uc2UtPnBheWxvYWQoKS5zaXplKCk7Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiBHS19FUlJPUjsKLSAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBjb25zdCBnYXRla2VlcGVyOjpwYXNzd29yZF9oYW5kbGVfdCogaGFuZGxlID0KKyAgICAgICAgICAgIGNvbnN0IGdhdGVrZWVwZXI6OnBhc3N3b3JkX2hhbmRsZV90KiBoYW5kbGUgPQogICAgICAgICAgICAgICAgICAgICByZWludGVycHJldF9jYXN0PGNvbnN0IGdhdGVrZWVwZXI6OnBhc3N3b3JkX2hhbmRsZV90Kj4oCi0gICAgICAgICAgICAgICAgICAgICAgICBna1Jlc3BvbnNlLT5wYXlsb2FkKCkuZGF0YSgpKTsKLSAgICAgICAgICAgICAgICBzZWN1cmVVc2VySWQgPSBoYW5kbGUtPnVzZXJfaWQ7Ci0gICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2tSZXNwb25zZS0+cGF5bG9hZCgpLmRhdGEoKSk7CisgICAgICAgICAgICBzZWN1cmVVc2VySWQgPSBoYW5kbGUtPnVzZXJfaWQ7CiAgICAgICAgIH0KLQotICAgICAgICBpZiAoZ2tSZXNwb25zZS0+cmVzcG9uc2VfY29kZSgpID09IEdLUmVzcG9uc2VDb2RlOjpPSyAmJiAhZ2tSZXNwb25zZS0+c2hvdWxkX3JlZW5yb2xsKCkpIHsKLSAgICAgICAgICAgIHN0b3JlX3NpZCh1c2VySWQsIHNlY3VyZVVzZXJJZCk7Ci0KLSAgICAgICAgICAgIEdLU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Nzd29yZEhhbmRsZS5kYXRhKCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnJvbGxlZFBhc3N3b3JkSGFuZGxlLnNpemUoKSk7Ci0gICAgICAgIGFuZHJvaWQ6OmhhcmR3YXJlOjpoaWRsX3ZlYzx1aW50OF90PiBlbnRlcmVkUHdkOwotICAgICAgICBlbnRlcmVkUHdkLnNldFRvRXh0ZXJuYWwoY29uc3RfY2FzdDx1aW50OF90Kj4ocHJvdmlkZWRQYXNzd29yZC5kYXRhKCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvdmlkZWRQYXNzd29yZC5zaXplKCkpOwotCi0gICAgICAgIHVpbnQ2NF90IHNlY3VyZVVzZXJJZCA9IDA7Ci0gICAgICAgIGlmIChhaWRsX2h3X2RldmljZSkgewotICAgICAgICAgICAgLy8gQUlETCBnYXRla2VlcGVyIHNlcnZpY2UKLSAgICAgICAgICAgIEFpZGxHYXRla2VlcGVyVmVyaWZ5UmVzcCByc3A7Ci0gICAgICAgICAgICBhdXRvIHJlc3VsdCA9Ci0gICAgICAgICAgICAgICAgYWlkbF9od19kZXZpY2UtPnZlcmlmeShod191c2VySWQsIGNoYWxsZW5nZSwgY3VyUHdkSGFuZGxlLCBlbnRlcmVkUHdkLCAmcnNwKTsKLSAgICAgICAgICAgIGlmICghcmVzdWx0LmlzT2soKSkgewotICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgInZlcmlmeSB0cmFuc2FjdGlvbiBmYWlsZWQiOwotICAgICAgICAgICAgICAgIHJldHVybiBHS19FUlJPUjsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGlmIChyc3Auc3RhdHVzQ29kZSA+PSBBaWRsSUdhdGVrZWVwZXI6OlNUQVRVU19PSykgewotICAgICAgICAgICAgICAgIHNlY3VyZVVzZXJJZCA9IHJzcC5oYXJkd2FyZUF1dGhUb2tlbi51c2VySWQ7Ci0gICAgICAgICAgICAgICAgLy8gU2VyaWFsaXplIEhhcmR3YXJlQXV0aFRva2VuIHRvIGEgdmVjdG9yIGFzIGh3X2F1dGhfdG9rZW5fdC4KLSAgICAgICAgICAgICAgICAqZ2tSZXNwb25zZSA9IEdLUmVzcG9uc2U6Om9rKGF1dGhUb2tlbjJBaWRsVmVjKHJzcC5oYXJkd2FyZUF1dGhUb2tlbiksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByc3Auc3RhdHVzQ29kZSA9PQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFpZGxJR2F0ZWtlZXBlcjo6U1RBVFVTX1JFRU5ST0xMIC8qIHJlZW5yb2xsICovKTsKLSAgICAgICAgICAgIH0gZWxzZSBpZiAocnNwLnN0YXR1c0NvZGUgPT0gQWlkbElHYXRla2VlcGVyOjpFUlJPUl9SRVRSWV9USU1FT1VUKSB7Ci0gICAgICAgICAgICAgICAgKmdrUmVzcG9uc2UgPSBHS1Jlc3BvbnNlOjpyZXRyeShyc3AudGltZW91dE1zKTsKLSAgICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICAgKmdrUmVzcG9uc2UgPSBHS1Jlc3BvbnNlOjplcnJvcigpOwotICAgICAgICAgICAgfQotICAgICAgICB9IGVsc2UgaWYgKGh3X2RldmljZSkgewotICAgICAgICAgICAgLy8gSElETCBnYXRla2VlcGVyIHNlcnZpY2UKLSAgICAgICAgICAgIFJldHVybjx2b2lkPiBod1JlcyA9IGh3X2RldmljZS0+dmVyaWZ5KAorICAgIH0gZWxzZSBpZiAoaHdfZGV2aWNlKSB7CisgICAgICAgIC8vIEhJREwgZ2F0ZWtlZXBlciBzZXJ2aWNlCisgICAgICAgIFJldHVybjx2b2lkPiBod1JlcyA9IGh3X2RldmljZS0+dmVyaWZ5KAogICAgICAgICAgICAgICAgIGh3X3VzZXJJZCwgY2hhbGxlbmdlLCBjdXJQd2RIYW5kbGUsIGVudGVyZWRQd2QsCiAgICAgICAgICAgICAgICAgWyZna1Jlc3BvbnNlXShjb25zdCBHYXRla2VlcGVyUmVzcG9uc2UmIHJzcCkgewogICAgICAgICAgICAgICAgICAgICBpZiAocnNwLmNvZGUgPj0gR2F0ZWtlZXBlclN0YXR1c0NvZGU6OlNUQVRVU19PSykgewogICAgICAgICAgICAgICAgICAgICAgICAgKmdrUmVzcG9uc2UgPSBHS1Jlc3BvbnNlOjpvaygKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB7cnNwLmRhdGEuYmVnaW4oKSwgcnNwLmRhdGEuZW5kKCl9LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJzcC5jb2RlID09IEdhdGVrZWVwZXJTdGF0dXNDb2RlOjpTVEFUVVNfUkVFTlJPTEwgLyogcmVlbnJvbGwgKi8pOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7cnNwLmRhdGEuYmVnaW4oKSwgcnNwLmRhdGEuZW5kKCl9LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByc3AuY29kZSA9PSBHYXRla2VlcGVyU3RhdHVzQ29kZTo6U1RBVFVTX1JFRU5ST0xMIC8qIHJlZW5yb2xsICovKTsKICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChyc3AuY29kZSA9PSBHYXRla2VlcGVyU3RhdHVzQ29kZTo6RVJST1JfUkVUUllfVElNRU9VVCkgewogICAgICAgICAgICAgICAgICAgICAgICAgKmdrUmVzcG9uc2UgPSBHS1Jlc3BvbnNlOjpyZXRyeShyc3AudGltZW91dCk7CiAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CkBAIC0zNjIsMTQ5ICszNjYsMTE1IEBACiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9KTsKIAotICAgICAgICAgICAgaWYgKCFod1Jlcy5pc09rKCkpIHsKLSAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJ2ZXJpZnkgdHJhbnNhY3Rpb24gZmFpbGVkIjsKLSAgICAgICAgICAgICAgICByZXR1cm4gR0tfRVJST1I7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBjb25zdCBnYXRla2VlcGVyOjpwYXNzd29yZF9oYW5kbGVfdCogaGFuZGxlID0KLSAgICAgICAgICAgICAgICByZWludGVycHJldF9jYXN0PGNvbnN0IGdhdGVrZWVwZXI6OnBhc3N3b3JkX2hhbmRsZV90Kj4oCi0gICAgICAgICAgICAgICAgICAgIGVucm9sbGVkUGFzc3dvcmRIYW5kbGUuZGF0YSgpKTsKLSAgICAgICAgICAgIHNlY3VyZVVzZXJJZCA9IGhhbmRsZS0+dXNlcl9pZDsKKyAgICAgICAgaWYgKCFod1Jlcy5pc09rKCkpIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgInZlcmlmeSB0cmFuc2FjdGlvbiBmYWlsZWQiOworICAgICAgICAgICAgcmV0dXJuIEdLX0VSUk9SOwogICAgICAgICB9CisgICAgICAgIGNvbnN0IGdhdGVrZWVwZXI6OnBhc3N3b3JkX2hhbmRsZV90KiBoYW5kbGUgPQorICAgICAgICAgICAgICAgIHJlaW50ZXJwcmV0X2Nhc3Q8Y29uc3QgZ2F0ZWtlZXBlcjo6cGFzc3dvcmRfaGFuZGxlX3QqPigKKyAgICAgICAgICAgICAgICAgICAgICAgIGVucm9sbGVkUGFzc3dvcmRIYW5kbGUuZGF0YSgpKTsKKyAgICAgICAgc2VjdXJlVXNlcklkID0gaGFuZGxlLT51c2VyX2lkOworICAgIH0KIAotICAgICAgICBpZiAoZ2tSZXNwb25zZS0+cmVzcG9uc2VfY29kZSgpID09IEdLUmVzcG9uc2VDb2RlOjpPSykgewotICAgICAgICAgICAgaWYgKGdrUmVzcG9uc2UtPnBheWxvYWQoKS5zaXplKCkgIT0gMCkgewotICAgICAgICAgICAgICAgIC8vIHRyeSB0byBjb25uZWN0IHRvIElLZXlzdG9yZUF1dGhvcml6YXRpb24gQUlETCBzZXJ2aWNlIGZpcnN0LgotICAgICAgICAgICAgICAgIEFJQmluZGVyKiBhdXRoekFJQmluZGVyID0KLSAgICAgICAgICAgICAgICAgICAgICAgIEFTZXJ2aWNlTWFuYWdlcl9nZXRTZXJ2aWNlKCJhbmRyb2lkLnNlY3VyaXR5LmF1dGhvcml6YXRpb24iKTsKLSAgICAgICAgICAgICAgICA6Om5kazo6U3BBSUJpbmRlciBhdXRoekJpbmRlcihhdXRoekFJQmluZGVyKTsKLSAgICAgICAgICAgICAgICBhdXRvIGF1dGh6U2VydmljZSA9IElLZXlzdG9yZUF1dGhvcml6YXRpb246OmZyb21CaW5kZXIoYXV0aHpCaW5kZXIpOwotICAgICAgICAgICAgICAgIGlmIChhdXRoelNlcnZpY2UpIHsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGdrUmVzcG9uc2UtPnBheWxvYWQoKS5zaXplKCkgIT0gc2l6ZW9mKGh3X2F1dGhfdG9rZW5fdCkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkluY29ycmVjdCBzaXplIG9mIEF1dGhUb2tlbiBwYXlsb2FkLiI7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gR0tfRVJST1I7Ci0gICAgICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgICAgICBjb25zdCBod19hdXRoX3Rva2VuX3QqIGh3QXV0aFRva2VuID0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWludGVycHJldF9jYXN0PGNvbnN0IGh3X2F1dGhfdG9rZW5fdCo+KGdrUmVzcG9uc2UtPnBheWxvYWQoKS5kYXRhKCkpOwotICAgICAgICAgICAgICAgICAgICBIYXJkd2FyZUF1dGhUb2tlbiBhdXRoVG9rZW47Ci0KLSAgICAgICAgICAgICAgICAgICAgYXV0aFRva2VuLnRpbWVzdGFtcC5taWxsaVNlY29uZHMgPSBiZXRvaDY0KGh3QXV0aFRva2VuLT50aW1lc3RhbXApOwotICAgICAgICAgICAgICAgICAgICBhdXRoVG9rZW4uY2hhbGxlbmdlID0gaHdBdXRoVG9rZW4tPmNoYWxsZW5nZTsKLSAgICAgICAgICAgICAgICAgICAgYXV0aFRva2VuLnVzZXJJZCA9IGh3QXV0aFRva2VuLT51c2VyX2lkOwotICAgICAgICAgICAgICAgICAgICBhdXRoVG9rZW4uYXV0aGVudGljYXRvcklkID0gaHdBdXRoVG9rZW4tPmF1dGhlbnRpY2F0b3JfaWQ7Ci0gICAgICAgICAgICAgICAgICAgIGF1dGhUb2tlbi5hdXRoZW50aWNhdG9yVHlwZSA9IHN0YXRpY19jYXN0PEhhcmR3YXJlQXV0aGVudGljYXRvclR5cGU+KAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJldG9oMzIoaHdBdXRoVG9rZW4tPmF1dGhlbnRpY2F0b3JfdHlwZSkpOwotICAgICAgICAgICAgICAgICAgICBhdXRoVG9rZW4ubWFjLmFzc2lnbigmaHdBdXRoVG9rZW4tPmhtYWNbMF0sICZod0F1dGhUb2tlbi0+aG1hY1szMl0pOwotICAgICAgICAgICAgICAgICAgICBhdXRvIHJlc3VsdCA9IGF1dGh6U2VydmljZS0+YWRkQXV0aFRva2VuKGF1dGhUb2tlbik7Ci0gICAgICAgICAgICAgICAgICAgIGlmICghcmVzdWx0LmlzT2soKSkgewotICAgICAgICAgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiRmFpbHVyZSBpbiBzZW5kaW5nIEF1dGhUb2tlbiB0byBBdXRob3JpemF0aW9uU2VydmljZS4iOwotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEdLX0VSUk9SOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiQ2Fubm90IGRlbGl2ZXIgYXV0aCB0b2tlbi4gVW5hYmxlIHRvIGNvbW11bmljYXRlIHdpdGggIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJLZXlzdG9yZS4iOworICAgIGlmIChna1Jlc3BvbnNlLT5yZXNwb25zZV9jb2RlKCkgPT0gR0tSZXNwb25zZUNvZGU6Ok9LKSB7CisgICAgICAgIGlmIChna1Jlc3BvbnNlLT5wYXlsb2FkKCkuc2l6ZSgpICE9IDApIHsKKyAgICAgICAgICAgIC8vIHRyeSB0byBjb25uZWN0IHRvIElLZXlzdG9yZUF1dGhvcml6YXRpb24gQUlETCBzZXJ2aWNlIGZpcnN0LgorICAgICAgICAgICAgQUlCaW5kZXIqIGF1dGh6QUlCaW5kZXIgPSBBU2VydmljZU1hbmFnZXJfZ2V0U2VydmljZSgiYW5kcm9pZC5zZWN1cml0eS5hdXRob3JpemF0aW9uIik7CisgICAgICAgICAgICA6Om5kazo6U3BBSUJpbmRlciBhdXRoekJpbmRlcihhdXRoekFJQmluZGVyKTsKKyAgICAgICAgICAgIGF1dG8gYXV0aHpTZXJ2aWNlID0gSUtleXN0b3JlQXV0aG9yaXphdGlvbjo6ZnJvbUJpbmRlcihhdXRoekJpbmRlcik7CisgICAgICAgICAgICBpZiAoYXV0aHpTZXJ2aWNlKSB7CisgICAgICAgICAgICAgICAgaWYgKGdrUmVzcG9uc2UtPnBheWxvYWQoKS5zaXplKCkgIT0gc2l6ZW9mKGh3X2F1dGhfdG9rZW5fdCkpIHsKKyAgICAgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiSW5jb3JyZWN0IHNpemUgb2YgQXV0aFRva2VuIHBheWxvYWQuIjsKICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEdLX0VSUk9SOwogICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIGNvbnN0IGh3X2F1dGhfdG9rZW5fdCogaHdBdXRoVG9rZW4gPQorICAgICAgICAgICAgICAgICAgICAgICAgcmVpbnRlcnByZXRfY2FzdDxjb25zdCBod19hdXRoX3Rva2VuX3QqPihna1Jlc3BvbnNlLT5wYXlsb2FkKCkuZGF0YSgpKTsKKyAgICAgICAgICAgICAgICBIYXJkd2FyZUF1dGhUb2tlbiBhdXRoVG9rZW47CisKKyAgICAgICAgICAgICAgICBhdXRoVG9rZW4udGltZXN0YW1wLm1pbGxpU2Vjb25kcyA9IGJldG9oNjQoaHdBdXRoVG9rZW4tPnRpbWVzdGFtcCk7CisgICAgICAgICAgICAgICAgYXV0aFRva2VuLmNoYWxsZW5nZSA9IGh3QXV0aFRva2VuLT5jaGFsbGVuZ2U7CisgICAgICAgICAgICAgICAgYXV0aFRva2VuLnVzZXJJZCA9IGh3QXV0aFRva2VuLT51c2VyX2lkOworICAgICAgICAgICAgICAgIGF1dGhUb2tlbi5hdXRoZW50aWNhdG9ySWQgPSBod0F1dGhUb2tlbi0+YXV0aGVudGljYXRvcl9pZDsKKyAgICAgICAgICAgICAgICBhdXRoVG9rZW4uYXV0aGVudGljYXRvclR5cGUgPSBzdGF0aWNfY2FzdDxIYXJkd2FyZUF1dGhlbnRpY2F0b3JUeXBlPigKKyAgICAgICAgICAgICAgICAgICAgICAgIGJldG9oMzIoaHdBdXRoVG9rZW4tPmF1dGhlbnRpY2F0b3JfdHlwZSkpOworICAgICAgICAgICAgICAgIGF1dGhUb2tlbi5tYWMuYXNzaWduKCZod0F1dGhUb2tlbi0+aG1hY1swXSwgJmh3QXV0aFRva2VuLT5obWFjWzMyXSk7CisgICAgICAgICAgICAgICAgYXV0byByZXN1bHQgPSBhdXRoelNlcnZpY2UtPmFkZEF1dGhUb2tlbihhdXRoVG9rZW4pOworICAgICAgICAgICAgICAgIGlmICghcmVzdWx0LmlzT2soKSkgeworICAgICAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsdXJlIGluIHNlbmRpbmcgQXV0aFRva2VuIHRvIEF1dGhvcml6YXRpb25TZXJ2aWNlLiI7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBHS19FUlJPUjsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIExPR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ZU0ZTX1BBVEgsIG1DaGFyZ2VyTmFtZXNbaV0uY19zdHIoKSk7CiAgICAgICAgICAgICBzd2l0Y2gocmVhZFBvd2VyU3VwcGx5VHlwZShwYXRoKSkgewogICAgICAgICAgICAgY2FzZSBBTkRST0lEX1BPV0VSX1NVUFBMWV9UWVBFX0FDOgogICAgICAgICAgICAgICAgIG1IZWFsdGhJbmZvLT5jaGFyZ2VyQWNPbmxpbmUgPSB0cnVlOwpAQCAtNDY2LDI2ICs0NjYsMjQgQEAKICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9pc19kb2NrIiwgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUNoYXJnZXJOYW1lc1tpXS5zdHJpbmcoKSk7Ci0gICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLnN0cmluZygpLCBSX09LKSA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1DaGFyZ2VyTmFtZXNbaV0uY19zdHIoKSk7CisgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgIG1IZWFsdGhJbmZvLT5jaGFyZ2VyRG9ja09ubGluZSA9IHRydWU7CiAgICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgICAgICBLTE9HX1dBUk5JTkcoTE9HX1RBRywgIiVzOiBVbmtub3duIHBvd2VyIHN1cHBseSB0eXBlXG4iLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUNoYXJnZXJOYW1lc1tpXS5zdHJpbmcoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtQ2hhcmdlck5hbWVzW2ldLmNfc3RyKCkpOwogICAgICAgICAgICAgfQogICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2N1cnJlbnRfbWF4IiwgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtQ2hhcmdlck5hbWVzW2ldLnN0cmluZygpKTsKLSAgICAgICAgICAgIGludCBDaGFyZ2luZ0N1cnJlbnQgPQotICAgICAgICAgICAgICAgICAgICAoYWNjZXNzKHBhdGguc3RyaW5nKCksIFJfT0spID09IDApID8gZ2V0SW50RmllbGQocGF0aCkgOiAwOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUNoYXJnZXJOYW1lc1tpXS5jX3N0cigpKTsKKyAgICAgICAgICAgIGludCBDaGFyZ2luZ0N1cnJlbnQgPSAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgPyBnZXRJbnRGaWVsZChwYXRoKSA6IDA7CiAKICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy92b2x0YWdlX21heCIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUNoYXJnZXJOYW1lc1tpXS5zdHJpbmcoKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtQ2hhcmdlck5hbWVzW2ldLmNfc3RyKCkpOwogCiAgICAgICAgICAgICBpbnQgQ2hhcmdpbmdWb2x0YWdlID0KLSAgICAgICAgICAgICAgICAoYWNjZXNzKHBhdGguc3RyaW5nKCksIFJfT0spID09IDApID8gZ2V0SW50RmllbGQocGF0aCkgOgotICAgICAgICAgICAgICAgIERFRkFVTFRfVkJVU19WT0xUQUdFOworICAgICAgICAgICAgICAgICAgICAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgPyBnZXRJ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7CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlTdGF0dXNQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVN0YXR1c1BhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9zdGF0dXMiLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKLSAgICAgICAgICAgICAgICAgICAgICAgIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5U3RhdHVzUGF0aCA9IHBhdGg7CisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKSBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVN0YXR1c1BhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUhlYWx0aFBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5SGVhbHRoUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2hlYWx0aCIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKQotICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlIZWFsdGhQYXRoID0gcGF0aDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5SGVhbHRoUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5UHJlc2VudFBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5UHJlc2VudFBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9wcmVzZW50IiwgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApCi0gICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVByZXNlbnRQYXRoID0gcGF0aDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5UHJlc2VudFBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUNhcGFjaXR5UGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eVBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9jYXBhY2l0eSIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKQotICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eVBhdGggPSBwYXRoOworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgbUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eVBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVZvbHRhZ2VQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVZvbHRhZ2VQYXRoLmVtcHR5KCkpIHsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvdm9sdGFnZV9ub3ciLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlWb2x0YWdlUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlGdWxsQ2hhcmdlUGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlGdWxsQ2hhcmdlUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2NoYXJnZV9mdWxsIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApCisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKQogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlGdWxsQ2hhcmdlUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudE5vd1BhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudE5vd1BhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9jdXJyZW50X25vdyIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKQorICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkKICAgICAgICAgICAgICAgICAgICAgICAgIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudE5vd1BhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN5Y2xlQ291bnRQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN5Y2xlQ291bnRQYXRoLmVtcHR5KCkpIHsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvY3ljbGVfY291bnQiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN5Y2xlQ291bnRQYXRoID0gcGF0aDsKICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eUxldmVsUGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eUxldmVsUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2NhcGFjaXR5X2xldmVsIiwgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q2FwYWNpdHlMZXZlbFBhdGggPSBwYXRoOworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eUxldmVsUGF0aCA9IHBhdGg7CisgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VUaW1lVG9GdWxsTm93UGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VUaW1lVG9GdWxsTm93UGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL3RpbWVfdG9fZnVsbF9ub3ciLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUNoYXJnZVRpbWVUb0Z1bGxOb3dQYXRoID0gcGF0aDsKICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlGdWxsQ2hhcmdlRGVzaWduQ2FwYWNpdHlVYWhQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUZ1bGxDaGFyZ2VEZXNpZ25DYXBhY2l0eVVhaFBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9jaGFyZ2VfZnVsbF9kZXNpZ24iLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUZ1bGxDaGFyZ2VEZXNpZ25DYXBhY2l0eVVhaFBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN1cnJlbnRBdmdQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN1cnJlbnRBdmdQYXRoLmVtcHR5KCkpIHsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvY3VycmVudF9hdmciLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN1cnJlbnRBdmdQYXRoID0gcGF0aDsKICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VDb3VudGVyUGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VDb3VudGVyUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2NoYXJnZV9jb3VudGVyIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApCisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKQogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VDb3VudGVyUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5VGVtcGVyYXR1cmVQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVRlbXBlcmF0dXJlUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL3RlbXAiLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlUZW1wZXJhdHVyZVBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5VGVjaG5vbG9neVBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5VGVjaG5vbG9neVBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy90ZWNobm9sb2d5IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApCisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKQogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlUZWNobm9sb2d5UGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5U3RhdGVPZkhlYWx0aFBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5U3RhdGVPZkhlYWx0aFBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9zdGF0ZV9vZl9oZWFsdGgiLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlTdGF0ZU9mSGVhbHRoUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvaGVhbHRoX2luZGV4IiwgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlTdGF0ZU9mSGVhbHRoUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlIZWFsdGhTdGF0dXNQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUhlYWx0aFN0YXR1c1BhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9oZWFsdGhfc3RhdHVzIiwgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5SGVhbHRoU3RhdHVzUGF0aCA9IHBhdGg7CisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUhlYWx0aFN0YXR1c1BhdGggPSBwYXRoOworICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5TWFudWZhY3R1cmluZ0RhdGVQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeU1hbnVmYWN0dXJpbmdEYXRlUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL21hbnVmYWN0dXJpbmdfZGF0ZSIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKQorICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkKICAgICAgICAgICAgICAgICAgICAgICAgIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5TWFudWZhY3R1cmluZ0RhdGVQYXRoID0gcGF0aDsKICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlGaXJzdFVzYWdlRGF0ZVBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Rmlyc3RVc2FnZURhdGVQYXRoLmVtcHR5KCkpIHsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvZmlyc3RfdXNhZ2VfZGF0ZSIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKSBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUZpcnN0VXNhZ2VEYXRlUGF0aCA9IHBhdGg7CisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUZpcnN0VXNhZ2VEYXRlUGF0aCA9IHBhdGg7CisgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmNoYXJnaW5nU3RhdGVQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+Y2hhcmdpbmdTdGF0ZVBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9jaGFyZ2luZ19zdGF0ZSIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKSBtSGVhbHRoZENvbmZpZy0+Y2hhcmdpbmdTdGF0ZVBhdGggPSBwYXRoOworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgbUhlYWx0aGRDb25maWctPmNoYXJnaW5nU3RhdGVQYXRoID0gcGF0aDsKICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmNoYXJnaW5nUG9saWN5UGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmNoYXJnaW5nUG9saWN5UGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2NoYXJnaW5nX3BvbGljeSIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKSBtSGVhbHRoZENvbmZpZy0+Y2hhcmdpbmdQb2xpY3lQYXRoID0gcGF0aDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApIG1IZWFsdGhkQ29uZmlnLT5jaGFyZ2luZ1BvbGljeVBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgIGJyZWFrOwpAQCAtOTU4LDEyICs5NzAsMTAgQEAKICAgICAgICAgICAgIC8vIExvb2sgZm9yICJpc19kb2NrIiBmaWxlCiAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvaXNfZG9jayIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5zdHJpbmcoKSwgUl9PSykgPT0gMCkgeworICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApIHsKICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL29ubGluZSIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguc3RyaW5nKCksIFJfT0spID09IDApCi0gICAgICAgICAgICAgICAgICAgIG1DaGFyZ2VyTmFtZXMuYWRkKFN0cmluZzgobmFtZSkpOwotCisgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApIG1DaGFyZ2VyTmFtZXMuYWRkKFN0cmluZzgobmFtZSkpOwogICAgICAgICAgICAgfQogICAgICAgICB9CiAgICAgfQpAQCAtOTc1LDQzICs5ODUsNDMgQEAKICAgICAgICAgaGMtPnBlcmlvZGljX2Nob3Jlc19pbnRlcnZhbF9mYXN0ID0gLTE7CiAgICAgICAgIGhjLT5wZXJpb2RpY19jaG9yZXNfaW50ZXJ2YWxfc2xvdyA9IC0xOwogICAgIH0gZWxzZSB7Ci0gICAgICAgIGlmIChtSGVhbHR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gICBkZWZhdWx0OgogICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvaXNfZG9jayIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1DaGFyZ2VyTmFtZXNbaV0uc3RyaW5nKCkpOwotICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5zdHJpbmcoKSwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtQ2hhcmdlck5hbWVzW2ldLmNfc3RyKCkpOworICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKQogICAgICAgICAgICAgICAgICAgICBtSGVhbHRoSW5mby0+Y2hhcmdlckRvY2tPbmxpbmUgPSB0cnVlOwogICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICAgICAgS0xPR19XQVJOSU5HKExPR19UQUcsICIlczogVW5rbm93biBwb3dlciBzdXBwbHkgdHlwZVxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1DaGFyZ2VyTmFtZXNbaV0uc3RyaW5nKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUNoYXJnZXJOYW1lc1tpXS5jX3N0cigpKTsKICAgICAgICAgICAgIH0KICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9jdXJyZW50X21heCIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUNoYXJnZXJOYW1lc1tpXS5zdHJpbmcoKSk7Ci0gICAgICAgICAgICBpbnQgQ2hhcmdpbmdDdXJyZW50ID0KLSAgICAgICAgICAgICAgICAgICAgKGFjY2VzcyhwYXRoLnN0cmluZygpLCBSX09LKSA9PSAwKSA/IGdldEludEZpZWxkKHBhdGgpIDogMDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1DaGFyZ2VyTmFtZXNbaV0uY19zdHIoKSk7CisgICAgICAgICAgICBpbnQgQ2hhcmdpbmdDdXJyZW50ID0gKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApID8gZ2V0SW50RmllbGQocGF0aCkgOiAwOwogCiAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvdm9sdGFnZV9tYXgiLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1DaGFyZ2VyTmFtZXNbaV0uc3RyaW5nKCkpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbUNoYXJnZXJOYW1lc1tpXS5jX3N0cigpKTsKIAogICAgICAgICAgICAgaW50IENoYXJnaW5nVm9sdGFnZSA9Ci0gICAgICAgICAgICAgICAgKGFjY2VzcyhwYXRoLnN0cmluZygpLCBSX09LKSA9PSAwKSA/IGdldEludEZpZWxkKHBhdGgpIDoKLSAgICAgICAgICAgICAgICBERUZBVUxUX1ZCVVNfVk9MVEFHRTsKKyAgICAgICAgICAgICAgICAgICAgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApID8gZ2V0SW50RmllbGQocGF0aCkgOiBERUZBVUxUX1ZCVVNfVk9MVEFHRTsKIAogICAgICAgICAgICAgZG91YmxlIHBvd2VyID0gKChkb3VibGUpQ2hhcmdpbmdDdXJyZW50IC8gTUlMTElPTikgKgogICAgICAgICAgICAgICAgICAgICAgICAgICAgKChkb3VibGUpQ2hhcmdpbmdWb2x0YWdlIC8gTUlMTElPTik7CkBAIC00MjQsMTcgKzQyMCwxNyBAQAogICAgICAgICAgICAgICAgICBwcm9wcy5iYXR0ZXJ5U3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lJFTlRfTk9XOgotICAgICAgICBpZiAoIW1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudE5vd1BhdGguaXNFbXB0eSgpKSB7CisgICAgICAgIGlmICghbUhlYWx0aGRDb25maWctPmJhdHRlcnlDdXJyZW50Tm93UGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICB2YWwtPnZhbHVlSW50NjQgPQogICAgICAgICAgICAgICAgIGdldEludEZpZWxkKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudE5vd1BhdGgpOwogICAgICAgICAgICAgcmV0ID0gT0s7CkBAIC01MDQsNyArNTAwLDcgQEAKICAgICAgICAgYnJlYWs7CiAKICAgICBjYXNlIEJBVFRFUllfUFJPUF9DVVJSRU5UX0FWRzoKLSAgICAgICAgaWYgKCFtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN1cnJlbnRBdmdQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICBpZiAoIW1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudEF2Z1BhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgdmFsLT52YWx1ZUludDY0ID0KICAgICAgICAgICAgICAgICBnZXRJbnRGaWVsZChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN1cnJlbnRBdmdQYXRoKTsKICAgICAgICAgICAgIHJldCA9IE9LOwpAQCAtNTE0LDcgKzUxMCw3IEBACiAgICAgICAgIGJyZWFrOwogCiAgICAgY2FzZSBCQVRURVJZX1BST1BfQ0FQQUNJVFk6Ci0gICAgICAgIGlmICghbUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eVBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgIGlmICghbUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eVBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgdmFsLT52YWx1ZUludDY0ID0KICAgICAgICAgICAgICAgICBnZXRJbnRGaWVsZChtSGVhb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WctPmJhdHRlcnlGdWxsQ2hhcmdlUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgIHNucHJpbnRmKHZzLCBzaXplb2YodnMpLCAiRnVsbCBjaGFyZ2U6ICVkXG4iLCBwcm9wcy5iYXR0ZXJ5RnVsbENoYXJnZVVhaCk7CiAgICAgICAgIHdyaXRlKGZkLCB2cywgc3RybGVuKHZzKSk7CiAgICAgfQpAQCAtNjI4LDggKzYyNCw3IEBACiAgICAgICAgICAgICBjYXNlIEFORFJPSURfUE9XRVJfU1VQUExZX1RZUEVfRE9DSzoKICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL29ubGluZSIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguc3RyaW5nKCksIFJfT0spID09IDApCi0gICAgICAgICAgICAgICAgICAgIG1DaGFyZ2VyTmFtZXMuYWRkKFN0cmluZzgobmFtZSkpOworICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKSBtQ2hhcmdlck5hbWVzLmFkZChTdHJpbmc4KG5hbWUpKTsKICAgICAgICAgICAgICAgICBicmVhazsKIAogICAgICAgICAgICAgY2FzZSBBTkRST0lEX1BPV0VSX1NVUFBMWV9UWVBFX0JBVFRFUlk6CkBAIC02NDAsMTIxICs2MzUsMTE5IEBACiAgICAgICAgICAgICAgICAgaWYgKGlzU2NvcGVkUG93ZXJTdXBwbHkobmFtZSkpIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgIG1CYXR0ZXJ5RGV2aWNlUHJlc2VudCA9IHRydWU7CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlTdGF0dXNQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVN0YXR1c1BhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9zdGF0dXMiLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKLSAgICAgICAgICAgICAgICAgICAgICAgIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5U3RhdHVzUGF0aCA9IHBhdGg7CisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKSBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVN0YXR1c1BhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUhlYWx0aFBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5SGVhbHRoUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2hlYWx0aCIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKQotICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlIZWFsdGhQYXRoID0gcGF0aDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5SGVhbHRoUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5UHJlc2VudFBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5UHJlc2VudFBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9wcmVzZW50IiwgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApCi0gICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVByZXNlbnRQYXRoID0gcGF0aDsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5UHJlc2VudFBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUNhcGFjaXR5UGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eVBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9jYXBhY2l0eSIsIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKQotICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eVBhdGggPSBwYXRoOworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgbUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eVBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVZvbHRhZ2VQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVZvbHRhZ2VQYXRoLmVtcHR5KCkpIHsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvdm9sdGFnZV9ub3ciLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlWb2x0YWdlUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlGdWxsQ2hhcmdlUGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlGdWxsQ2hhcmdlUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2NoYXJnZV9mdWxsIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApCisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKQogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlGdWxsQ2hhcmdlUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudE5vd1BhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudE5vd1BhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9jdXJyZW50X25vdyIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBPV0VSX1NVUFBMWV9TWVNGU19QQVRILCBuYW1lKTsKLSAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLCBSX09LKSA9PSAwKQorICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkKICAgICAgICAgICAgICAgICAgICAgICAgIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q3VycmVudE5vd1BhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN5Y2xlQ291bnRQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN5Y2xlQ291bnRQYXRoLmVtcHR5KCkpIHsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvY3ljbGVfY291bnQiLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN5Y2xlQ291bnRQYXRoID0gcGF0aDsKICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eUxldmVsUGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eUxldmVsUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2NhcGFjaXR5X2xldmVsIiwgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApIG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5Q2FwYWNpdHlMZXZlbFBhdGggPSBwYXRoOworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlDYXBhY2l0eUxldmVsUGF0aCA9IHBhdGg7CisgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VUaW1lVG9GdWxsTm93UGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VUaW1lVG9GdWxsTm93UGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL3RpbWVfdG9fZnVsbF9ub3ciLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUNoYXJnZVRpbWVUb0Z1bGxOb3dQYXRoID0gcGF0aDsKICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlGdWxsQ2hhcmdlRGVzaWduQ2FwYWNpdHlVYWhQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUZ1bGxDaGFyZ2VEZXNpZ25DYXBhY2l0eVVhaFBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy9jaGFyZ2VfZnVsbF9kZXNpZ24iLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUZ1bGxDaGFyZ2VEZXNpZ25DYXBhY2l0eVVhaFBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN1cnJlbnRBdmdQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN1cnJlbnRBdmdQYXRoLmVtcHR5KCkpIHsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5jbGVhcigpOwogICAgICAgICAgICAgICAgICAgICBwYXRoLmFwcGVuZEZvcm1hdCgiJXMvJXMvY3VycmVudF9hdmciLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKGFjY2VzcyhwYXRoLmNfc3RyKCksIFJfT0spID09IDApCiAgICAgICAgICAgICAgICAgICAgICAgICBtSGVhbHRoZENvbmZpZy0+YmF0dGVyeUN1cnJlbnRBdmdQYXRoID0gcGF0aDsKICAgICAgICAgICAgICAgICB9CiAKLSAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VDb3VudGVyUGF0aC5pc0VtcHR5KCkpIHsKKyAgICAgICAgICAgICAgICBpZiAobUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VDb3VudGVyUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL2NoYXJnZV9jb3VudGVyIiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApCisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKQogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlDaGFyZ2VDb3VudGVyUGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5VGVtcGVyYXR1cmVQYXRoLmlzRW1wdHkoKSkgeworICAgICAgICAgICAgICAgIGlmIChtSGVhbHRoZENvbmZpZy0+YmF0dGVyeVRlbXBlcmF0dXJlUGF0aC5lbXB0eSgpKSB7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguY2xlYXIoKTsKICAgICAgICAgICAgICAgICAgICAgcGF0aC5hcHBlbmRGb3JtYXQoIiVzLyVzL3RlbXAiLCBQT1dFUl9TVVBQTFlfU1lTRlNfUEFUSCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmFtZSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aCwgUl9PSykgPT0gMCkgeworICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGguY19zdHIoKSwgUl9PSykgPT0gMCkgewogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlUZW1wZXJhdHVyZVBhdGggPSBwYXRoOwogICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5VGVjaG5vbG9neVBhdGguaXNFbXB0eSgpKSB7CisgICAgICAgICAgICAgICAgaWYgKG1IZWFsdGhkQ29uZmlnLT5iYXR0ZXJ5VGVjaG5vbG9neVBhdGguZW1wdHkoKSkgewogICAgICAgICAgICAgICAgICAgICBwYXRoLmNsZWFyKCk7CiAgICAgICAgICAgICAgICAgICAgIHBhdGguYXBwZW5kRm9ybWF0KCIlcy8lcy90ZWNobm9sb2d5IiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUE9XRVJfU1VQUExZX1NZU0ZTX1BBVEgsIG5hbWUpOwotICAgICAgICAgICAgICAgICAgICBpZiAoYWNjZXNzKHBhdGgsIFJfT0spID09IDApCisgICAgICAgICAgICAgICAgICAgIGlmIChhY2Nlc3MocGF0aC5jX3N0cigpLCBSX09LKSA9PSAwKQogICAgICAgICAgICAgICAgICAgICAgICAgbUhlYWx0aGRDb25maWctPmJhdHRlcnlUZWNobm9sb2d5UGF0aCA9IHBhdGg7CiAgICAgICAgICAgICAgICAgfQogCkBAIC03NjcsMTIgKzc2MCwxMCBAQAogICAgICAgICAgICAgLy8gTG9vayBmb3IgImlzX2RvY2siIGZ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JzOiBbCiAgICAgICAgICJsaWJhdmIiLAorICAgICAgICAibGliYXZmX2NjX2ZsYWdzIiwKICAgICAgICAgImxpYmJvb3Rsb2FkZXJfbWVzc2FnZSIsCi0gICAgICAgICJsaWJjKytmcyIsCi0gICAgICAgICJsaWJjZ3JvdXByY19mb3JtYXQiLAotICAgICAgICAibGliZnN2ZXJpdHlfaW5pdCIsCiAgICAgICAgICJsaWJsbWtkX3V0aWxzIiwKICAgICAgICAgImxpYmx6NCIsCi0gICAgICAgICJsaWJtaW5pX2tleWN0bF9zdGF0aWMiLAorICAgICAgICAibGlienN0ZCIsCiAgICAgICAgICJsaWJtb2Rwcm9iZSIsCiAgICAgICAgICJsaWJwcm9jaW5mbyIsCiAgICAgICAgICJsaWJwcm90b2J1Zi1jcHAtbGl0ZSIsCiAgICAgICAgICJsaWJwcm9wZXJ0eWluZm9zZXJpYWxpemVyIiwKICAgICAgICAgImxpYnByb3BlcnR5aW5mb3BhcnNlciIsCi0gICAgICAgICJsaWJzaWduaW5ndXRpbHMiLAogICAgICAgICAibGlic25hcHNob3RfY293IiwKICAgICAgICAgImxpYnNuYXBzaG90X2luaXQiLAogICAgICAgICAibGlieG1sMiIsCkBAIC0xODQsMTQgKzE3OSwxMSBAQAogICAgIF0sCiAgICAgc2hhcmVkX2xpYnM6IFsKICAgICAgICAgImxpYmJhc2UiLAotICAgICAgICAibGliY3J5cHRvIiwKICAgICAgICAgImxpYmN1dGlscyIsCiAgICAgICAgICJsaWJkbCIsCiAgICAgICAgICJsaWJleHQ0X3V0aWxzIiwKICAgICAgICAgImxpYmZzX21nciIsCiAgICAgICAgICJsaWJnc2kiLAotICAgICAgICAibGliaGlkbC1nZW4tdXRpbHMiLAotICAgICAgICAibGlia2V5dXRpbHMiLAogICAgICAgICAibGlibG9nIiwKICAgICAgICAgImxpYmxvZ3dyYXAiLAogICAgICAgICAibGlibHAiLApAQCAtMjAwLDcgKzE5Miw3IEBACiAgICAgICAgICJsaWJzZWxpbnV4IiwKICAgICAgICAgImxpYnVud2luZHN0YWNrIiwKICAgICAgICAgImxpYnV0aWxzIiwKLSAgICAgICAgImxpYnppcGFyY2hpdmUiLAorICAgICAgICAibGlidmVuZG9yc3VwcG9ydCIsCiAgICAgXSwKICAgICBoZWFkZXJfbGliczogWyJiaW9uaWNfbGliY19wbGF0Zm9ybV9oZWFkZXJzIl0sCiAgICAgYm9vdHN0cmFwOiB0cnVlLApAQCAtMjEzLDggKzIwNSw4IEBACiAgICAgdmlzaWJpbGl0eTogWyI6X19zdWJwYWNrYWdlc19fIl0sCiB9CiAKLWNjX2xpYnJhcnlfc3RhdGljIHsKLSAgICBuYW1lOiAibGliaW5pdCIsCitjY19kZWZhdWx0cyB7CisgICAgbmFtZTogImxpYmluaXRfZGVmYXVsdHMiLAogICAgIHJlY292ZXJ5X2F2YWlsYWJsZTogdHJ1ZSwKICAgICBkZWZhdWx0czogWwogICAgICAgICAiaW5pdF9kZWZhdWx0cyIsCkBAIC0yMjcsOCArMjE5LDYgQEAKICAgICBdLAogICAgIHdob2xlX3N0YXRpY19saWJzOiBbCiAgICAgICAgICJsaWJjYXAiLAotICAgICAgICAibGliY29tLmFuZHJvaWQuc3lzcHJvcC5hcGV4IiwKLSAgICAgICAgImxpYmNvbS5hbmRyb2lkLnN5c3Byb3AuaW5pdCIsCiAgICAgXSwKICAgICBoZWFkZXJfbGliczogWyJib290aW1nX2hlYWRlcnMiXSwKICAgICBwcm90bzogewpAQCAtMjUxLDEwICsyNDEsMjEgQEAKICAgICAgICAgICAgIF0sCiAgICAgICAgIH0sCiAgICAgfSwKLSAgICB2aXNpYmlsaXR5OiBbCi0gICAgICAgICIvL3N5c3RlbS9hcGV4L2FwZXhkIiwKLSAgICAgICAgIi8vZnJhbWV3b3Jrcy9uYXRpdmUvY21kcy9pbnN0YWxsZCIsCit9CisKK2NjX2xpYnJhcnlfc3RhdGljIHsKKyAgICBuYW1lOiAibGliaW5pdCIsCisgICAgZGVmYXVsdHM6IFsibGliaW5pdF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ICAgICBzb29uZ19jb25maWdfdmFyaWFibGVzOiB7CiAgICAgICAgIEJPQVJEX1VTRVNfUkVDT1ZFUllfQVNfQk9PVDogewotICAgICAgICAgICAgaW5zdGFsbGFibGU6IGZhbHNlLAorICAgICAgICAgICAgbm9fZnVsbF9pbnN0YWxsOiB0cnVlLAogICAgICAgICB9LAogICAgIH0sCi19CiAKLWNjX2JpbmFyeSB7Ci0gICAgbmFtZTogImluaXRfZmlyc3Rfc3RhZ2UiLAogICAgIHN0ZW06ICJpbml0IiwKLSAgICBkZWZhdWx0czogWyJpbml0X2ZpcnN0X3N0YWdlX2RlZmF1bHRzIl0sCiAKICAgICBzcmNzOiBbCiAgICAgICAgICJibG9ja19kZXZfaW5pdGlhbGl6ZXIuY3BwIiwKQEAgLTM0Nyw4ICszNjIsOCBAQAogICAgIF0sCiAKICAgICBzdGF0aWNfbGliczogWwotICAgICAgICAibGliYysrZnMiLAogICAgICAgICAibGliZnNfYXZiIiwKKyAgICAgICAgImxpYmF2Zl9jY19mbGFncyIsCiAgICAgICAgICJsaWJmc19tZ3IiLAogICAgICAgICAibGliZmVjIiwKICAgICAgICAgImxpYmZlY19ycyIsCkBAIC0zNzAsOSArMzg1LDExIEBACiAgICAgICAgICJsaWJwcm90b2J1Zi1jcHAtbGl0ZSIsCiAgICAgICAgICJsaWJzbmFwc2hvdF9jb3ciLAogICAgICAgICAibGlibHo0IiwKKyAgICAgICAgImxpYnpzdGQiLAogICAgICAgICAibGlic25hcHNob3RfaW5pdCIsCiAgICAgICAgICJ1cGRhdGVfbWV0YWRhdGEtcHJvdG9zIiwKICAgICAgICAgImxpYnByb2NpbmZvIiwKKyAgICAgICAgImxpYmJvb3Rsb2FkZXJfbWVzc2FnZSIsCiAgICAgXSwKIAogICAgIHN0YXRpY19leGVjdXRhYmxlOiB0cnVlLApAQCAtNDMwLDYgKzQ0Nyw3IEBACiAKICAgICAgICAgLy8gRmlyc3Qgc3RhZ2UgaW5pdCBpcyB3ZWlyZDogaXQ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y8gZm9yIHRlc3RzCiAgICAgaGVhZGVyX2xpYnM6IFsiYmlvbmljX2xpYmNfcGxhdGZvcm1faGVhZGVycyJdLAorICAgIHByb2R1Y3RfdmFyaWFibGVzOiB7CisgICAgICAgIHNoaXBwaW5nX2FwaV9sZXZlbDogeworICAgICAgICAgICAgY2ZsYWdzOiBbIi1EQlVJTERfU0hJUFBJTkdfQVBJX0xFVkVMPSVzIl0sCisgICAgICAgIH0sCisgICAgfSwKIH0KIAogLy8gSG9zdCBWZXJpZmllcgpAQCAtNTYyLDggKzYwMSw2IEBACiAgICAgd2hvbGVfc3RhdGljX2xpYnM6IFsibGliY2FwIl0sCiAgICAgc2hhcmVkX2xpYnM6IFsKICAgICAgICAgImxpYmN1dGlscyIsCi0gICAgICAgICJsaWJoaWRsLWdlbi11dGlscyIsCi0gICAgICAgICJsaWJoaWRsbWV0YWRhdGEiLAogICAgICAgICAibGlibG9nIiwKICAgICAgICAgImxpYnByb2Nlc3Nncm91cCIsCiAgICAgICAgICJsaWJwcm90b2J1Zi1jcHAtbGl0ZSIsCkBAIC01NzEsMTAgKzYwOCw2IEBACiAgICAgcHJvdG86IHsKICAgICAgICAgdHlwZTogImxpdGUiLAogICAgIH0sCi0gICAgZ2VuZXJhdGVkX2hlYWRlcnM6IFsKLSAgICAgICAgImdlbmVyYXRlZF9zdHViX2J1aWx0aW5fZnVuY3Rpb25fbWFwIiwKLSAgICAgICAgImdlbmVyYXRlZF9hbmRyb2lkX2lkcyIsCi0gICAgXSwKICAgICB0YXJnZXQ6IHsKICAgICAgICAgYW5kcm9pZDogewogICAgICAgICAgICAgZW5hYmxlZDogZmFsc2UsCkBAIC01ODMsMTkgKzYxNiw1MyBAQAogICAgICAgICAgICAgZW5hYmxlZDogZmFsc2UsCiAgICAgICAgIH0sCiAgICAgfSwKKyAgICBwcm9kdWN0X3ZhcmlhYmxlczogeworICAgICAgICBzaGlwcGluZ19hcGlfbGV2ZWw6IHsKKyAgICAgICAgICAgIGNmbGFnczogWyItREJVSUxEX1NISVBQSU5HX0FQSV9MRVZFTD0lcyJdLAorICAgICAgICB9LAorICAgIH0sCiB9CiAKIGNjX2JpbmFyeSB7CiAgICAgbmFtZTogImhvc3RfaW5pdF92ZXJpZmllciIsCiAgICAgZGVmYXVsdHM6IFsiaW5pdF9ob3N0X2RlZmF1bHRzIl0sCi0gICAgc3JjczogaW5pdF9jb21tb25fc291cmNlcyArIGluaXRfaG9zdF9zb3VyY2VzLAorICAgIHNyY3M6IFsKKyAgICAgICAgImNoZWNrX2J1aWx0aW5zLmNwcCIsCisgICAgICAgICJob3N0X2ltcG9ydF9wYXJzZXIuY3BwIiwKKyAgICAgICAgImhvc3RfaW5pdF92ZXJpZmllci5jcHAiLAorICAgICAgICAiaW50ZXJmYWNlX3V0aWxzLmNwcCIsCisgICAgXSArIGluaXRfY29tbW9uX3NvdXJjZXMsCisgICAgZ2VuZXJhdGVkX2hlYWRlcnM6IFsKKyAgICAgICAgImdlbmVyYXRlZF9hbmRyb2lkX2lkcyIsCisgICAgICAgICJnZW5lcmF0ZWRfc3R1Yl9idWlsdGluX2Z1bmN0aW9uX21hcCIsCisgICAgXSwKKyAgICBzaGFyZWRfbGliczogWworICAgICAgICAibGliaGlkbC1nZW4tdXRpbHMiLAorICAgICAgICAibGliaGlkbG1ldGFkYXRhIiwKKyAgICBdLAorfQorCitnZW5ydWxlIHsKKyAgICBuYW1lOiAibm9vcF9idWlsdGluX2Z1bmN0aW9uX21hcCIsCisgICAgdG9vbF9maWxlczogWyJob3N0X2J1aWx0aW5fbWFwLnB5Il0sCisgICAgb3V0OiBbIm5vb3BfYnVpbHRpbl9mdW5jdGlvbl9tYXAuaCJdLAorICAgIHNyY3M6IFsKKyAgICAgICAgImJ1aWx0aW5zLmNwcCIsCisgICAgICAgICJub29wX2J1aWx0aW5zLmNwcCIsCisgICAgXSwKKyAgICBjbWQ6ICIkKGxvY2F0aW9uIGhvc3RfYnVpbHRpbl9tYXAucHkpIC0tYnVpbHRpbnM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oLmJhY2soKSA9PSAnLycpIHsKICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICB9Ci0gICAgICAgIC8vIEZpbHRlciBkaXJlY3RvcmllcwotICAgICAgICBpZiAocGF0aC5iYWNrKCkgPT0gJy8nKSB7CisKKyAgICAgICAgLy8gR2V0IGFwZXggbmFtZSBmcm9tIHBhdGguCisgICAgICAgIHN0ZDo6dmVjdG9yPHN0ZDo6c3RyaW5nPiBwYXRocyA9IGFuZHJvaWQ6OmJhc2U6OlNwbGl0KHBhdGgsICIvIik7CisgICAgICAgIGlmIChwYXRocy5zaXplKCkgPCAzKSB7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgYXBleF9uYW1lID0gcGF0aHNbMl07CisKKyAgICAgICAgLy8gRmlsdGVyIG91dCAvYXBleC88bmFtZT5APHZlcj4gcGF0aHMuIFRoZSBwYXRocyBhcmUgYmluZC1tb3VudGVkIHRvCisgICAgICAgIC8vIC9hcGV4LzxuYW1lPiBwYXRocywgc28gdW5sZXNzIHdlIGZpbHRlciB0aGVtIG91dCwgd2Ugd2lsbCBwYXJzZSB0aGUKKyAgICAgICAgLy8gc2FtZSBmaWxlIHR3aWNlLgorICAgICAgICBpZiAoYXBleF9uYW1lLmZpbmQoJ0AnKSAhPSBzdGQ6OnN0cmluZzo6bnBvcykgeworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKworICAgICAgICAvLyBGaWx0ZXIgb3V0IHNraXBfc2V0IGFwZXhlcworICAgICAgICBpZiAoc2tpcF9hcGV4ZXMuY291bnQoYXBleF9uYW1lKSA+IDApIHsKICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICB9CiAgICAgICAgIGNvbmZpZ3MucHVzaF9iYWNrKHBhdGgpOwpAQCAtNjQsMTEgKzgyLDQ5IEBACiAgICAgcmV0dXJuIGNvbmZpZ3M7CiB9CiAKLXN0YXRpYyBSZXN1bHQ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b3AoVEVNUF9GQUlMVVJFX1JFVFJZKG9wZW4odG1wLmNfc3RyKCksIG1vZGUgfCBPX0NMT0VYRUMpKSk7Ci0gICAgICAgICAgICBpZiAobG9vcCA8IDApIHJldHVybiBFcnJub0Vycm9yKCkgPDwgIm9wZW4oIiA8PCB0bXAgPDwgIiwgIiA8PCBtb2RlIDw8ICIpIGZhaWxlZCI7Ci0KLSAgICAgICAgICAgIGxvb3BfaW5mbyBpbmZvOwotICAgICAgICAgICAgLyogaWYgaXQgaXMgYSBibGFuayBsb29wIGRldmljZSAqLwotICAgICAgICAgICAgaWYgKGlvY3RsKGxvb3AuZ2V0KCksIExPT1BfR0VUX1NUQVRVUywgJmluZm8pIDwgMCAmJiBlcnJubyA9PSBFTlhJTykgewotICAgICAgICAgICAgICAgIC8qIGlmIGl0IGJlY29tZXMgb3VyIGxvb3AgZGV2aWNlICovCi0gICAgICAgICAgICAgICAgaWYgKGlvY3RsKGxvb3AuZ2V0KCksIExPT1BfU0VUX0ZELCBmZC5nZXQoKSkgPj0gMCkgewotICAgICAgICAgICAgICAgICAgICBpZiAobW91bnQodG1wLmNfc3RyKCksIHRhcmdldCwgc3lzdGVtLCBmbGFncywgb3B0aW9ucykgPCAwKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpb2N0bChsb29wLmdldCgpLCBMT09QX0NMUl9GRCwgMCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gRXJybm9FcnJvcigpIDw8ICJtb3VudCgpIGZhaWxlZCI7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHt9OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KKyAgICAgICAgLy8gT3BlbiBzb3VyY2UgZmlsZQorICAgICAgICBpZiAod2FpdCkgeworICAgICAgICAgICAgd2FpdF9mb3JfZmlsZShmaWxlX3BhdGgsIGtDb21tYW5kUmV0cnlUaW1lb3V0KTsKICAgICAgICAgfQogCi0gICAgICAgIHJldHVybiBFcnJvcigpIDw8ICJvdXQgb2YgbG9vcGJhY2sgZGV2aWNlcyI7CisgICAgICAgIHVuaXF1ZV9mZCBmZChURU1QX0ZBSUxVUkVfUkVUUlkob3BlbihmaWxlX3BhdGgsIG1vZGUgfCBPX0NMT0VYRUMpKSk7CisgICAgICAgIGlmIChmZCA8IDApIHsKKyAgICAgICAgICAgIHJldHVybiBFcnJub0Vycm9yKCkgPDwgIm9wZW4oIiA8PCBmaWxlX3BhdGggPDwgIiwgIiA8PCBtb2RlIDw8ICIpIGZhaWxlZCI7CisgICAgICAgIH0KKworICAgICAgICAvLyBBbGxvY2F0ZSBsb29wIGRldmljZSBhbmQgYXR0YWNoIGl0IHRvIGZpbGVfcGF0aC4KKyAgICAgICAgYW5kcm9pZDo6ZG06Okxvb3BDb250cm9sIGxvb3BfY29udHJvbDsKKyAgICAgICAgc3RkOjpzdHJpbmcgbG9vcF9kZXZpY2U7CisgICAgICAgIGlmICghbG9vcF9jb250cm9sLkF0dGFjaChmZC5nZXQoKSwgNXMsICZsb29wX2RldmljZSkpIHsKKyAgICAgICAgICAgIHJldHVybiBFcnJub0Vycm9yKCkgPDwgImxvb3BfY29udHJvbC5BdHRhY2ggIiA8PCBmaWxlX3BhdGggPDwgIiBmYWlsZWQiOworICAgICAgICB9CisKKyAgICAgICAgaWYgKG1vdW50KGxvb3BfZGV2aWNlLmNfc3RyKCksIHRhcmdldCwgc3lzdGVtLCBmbGFncywgb3B0aW9ucykgPCAwKSB7CisgICAgICAgICAgICBsb29wX2NvbnRyb2wuRGV0YWNoKGxvb3BfZGV2aWNlKTsKKyAgICAgICAgICAgIHJldHVybiBFcnJub0Vycm9yKCkgPDwgIm1vdW50KCkgZmFpbGVkIjsKKyAgICAgICAgfQogICAgIH0gZWxzZSB7CiAgICAgICAgIGlmICh3YWl0KQogICAgICAgICAgICAgd2FpdF9mb3JfZmlsZShzb3VyY2UsIGtDb21tYW5kUmV0cnlUaW1lb3V0KT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pbmcoKSkgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCBtZXNzYWdlIDw8ICI6IFJlYm9vdGluZyBpbnRvIHJlY292ZXJ5LCByZWFzb246ICIgPDwgcmVib290X3JlYXNvbjsKKyAgICAgICAgICAgIGlmIChhdXRvIHJlc3VsdCA9IHJlYm9vdF9pbnRvX3JlY292ZXJ5KAorICAgICAgICAgICAgICAgICAgICAgICAgeyItLXByb21wdF9hbmRfd2lwZV9kYXRhIiwgIi0tcmVhc29uPSJzICsgcmVib290X3JlYXNvbn0pOworICAgICAgICAgICAgICAgICFyZXN1bHQub2soKSkgeworICAgICAgICAgICAgICAgIExPRyhGQVRBTCkgPDwgIkNvdWxkIG5vdCByZWJvb3QgaW50byByZWNvdmVyeTogIiA8PCByZXN1bHQuZXJyb3IoKTsKICAgICAgICAgICAgIH0KICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgIExPRyhFUlJPUikgPDwgbWVzc2FnZSA8PCAiOiByZWJvb3RpbmcsIHJlYXNvbjogIiA8PCByZWJvb3RfcmVhc29uOwotICAgICAgICAgICAgdHJpZ2dlcl9zaHV0ZG93bigicmVib290LCIgKyByZWJvb3RfcmVhc29uKTsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkZhaWx1cmUgKHJlYm9vdCBzdXBwcmVzc2VkKTogIiA8PCByZWJvb3RfcmVhc29uOwogICAgICAgICB9CiAgICAgfTsKIApAQCAtMTE5OCwyOSArMTE1Nyw2IEBACiAgICAgcmV0dXJuIEV4ZWNXaXRoRnVuY3Rpb25PbkZhaWx1cmUoYXJncywgcmVib290KTsKIH0KIAotc3RhdGljIFJlc3VsdDx2b2lkPiBkb19yZW1vdW50X3VzZXJkYXRhKGNvbnN0IEJ1aWx0aW5Bcmd1bWVudHMmIGFyZ3MpIHsKLSAgICBpZiAoaW5pdGlhbF9tb3VudF9mc3RhYl9yZXR1cm5fY29kZSA9PSAtMSkgewotICAgICAgICByZXR1cm4gRXJyb3IoKSA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ZpZ319fSwKKyAgICAgICAgeyJwZXJmb3JtX2FwZXhfY29uZmlnIiwgICAgIHswLCAgICAgMSwgICAge2ZhbHNlLCAgZG9fcGVyZm9ybV9hcGV4X2NvbmZpZ319fSwKICAgICAgICAgeyJ1bW91bnQiLCAgICAgICAgICAgICAgICAgIHsxLCAgICAgMSwgICAge2ZhbHNlLCAgZG9fdW1vdW50fX19LAogICAgICAgICB7InVtb3VudF9hbGwiLCAgICAgICAgICAgICAgezAsICAgICAxLCAgICB7ZmFsc2UsICBkb191bW91bnRfYWxsfX19LAogICAgICAgICB7InVwZGF0ZV9saW5rZXJfY29uZmlnIiwgICAgezAsICAgICAwLCAgICB7ZmFsc2UsICBkb191cGRhdGVfbGlua2VyX2NvbmZpZ319fSwKICAgICAgICAgeyJyZWFkYWhlYWQiLCAgICAgICAgICAgICAgIHsxLCAgICAgMiwgICAge3RydWUsICAgZG9fcmVhZGFoZWFkfX19LAotICAgICAgICB7InJlbW91bnRfdXNlcmRhdGEiLCAgICAgICAgezAsICAgICAwLCAgICB7ZmFsc2UsICBkb19yZW1vdW50X3VzZXJkYXRhfX19LAogICAgICAgICB7InJlc3RhcnQiLCAgICAgICAgICAgICAgICAgezEsICAgICAyLCAgICB7ZmFsc2UsICBkb19yZXN0YXJ0fX19LAogICAgICAgICB7InJlc3RvcmVjb24iLCAgICAgICAgICAgICAgezEsICAgICBrTWF4LCB7dHJ1ZSwgICBkb19yZXN0b3JlY29ufX19LAogICAgICAgICB7InJlc3RvcmVjb25fcmVjdXJzaXZlIiwgICAgezEsICAgICBrTWF4LCB7dHJ1ZSwgICBkb19yZXN0b3JlY29uX3JlY3Vyc2l2ZX19fSwKQEAgLTEzOTMsNiArMTMzMyw3IEBACiAgICAgICAgIHsic3RhcnQiLCAgICAgICAgICAgICAgICAgICB7MSwgICAgIDEsICAgIHtmYWxzZSwgIGRvX3N0YXJ0fX19LAogICAgICAgICB7InN0b3AiLCAgICAgICAgICAgICAgICAgICAgezEsICAgICAxLCAgICB7ZmFsc2UsICBkb19zdG9wfX19LAogICAgICAgICB7InN3YXBvbl9hbGwiLCAgICAgICAgICAgICAgezAsICAgICAxLCAgICB7ZmFsc2UsICBkb19zd2Fwb25fYWxsfX19LAorICAgICAgICB7InN3YXBvZmYiLCAgICAgICAgICAgICAgICAgezEsICAgICAxLCAgICB7ZmFsc2UsICBkb19zd2Fwb2ZmfX19LAogICAgICAgICB7ImVudGVyX2RlZmF1bHRfbW91bnRfbnMiLCAgezAsICAgICAwLCAgICB7ZmFsc2UsICBkb19lbnRlcl9kZWZhdWx0X21vdW50X25zfX19LAogICAgICAgICB7InN5bWxpbmsiLCAgICAgICAgICAgICAgICAgezIsICAgICAyLCAgICB7dHJ1ZSwgICBkb19zeW1saW5rfX19LAogICAgICAgICB7InN5c2Nsa3R6IiwgICAgICAgICAgICAgICAgezEsICAgICAxLCAgICB7ZmFsc2UsICBkb19zeXNjbGt0en19fSwKZGlmZiAtLWdpdCBhL2luaXQvY2FwYWJpbGl0aWVzLmNwcCBiL2luaXQvY2FwYWJpbGl0aWVzLmNwcAppbmRleCBhYjZmZjAzLi4wZTJjZDJhIDEwMDY0NAotLS0gYS9pbml0L2NhcGFiaWxpdGllcy5jcHAKKysrIGIvaW5pdC9jYXBhYmlsaXRpZXMuY3BwCkBAIC02NiwxOCArNjYsMTIgQEAKICAgICAgICAgQ0FQX01BUF9FTlRSWShXQUtFX0FMQVJNKSwKICAgICAgICAgQ0FQX01BUF9FTlRSWShCTE9DS19TVVNQRU5EKSwKICAgICAgICAgQ0FQX01BUF9FTlRSWShBVURJVF9SRUFEKSwKLSNpZiBkZWZpbmVkKF9fQklPTklDX18pCiAgICAgICAgIENBUF9NQVBfRU5UUlkoUEVSRk1PTiksCiAgICAgICAgIENBUF9NQVBfRU5UUlkoQlBGKSwKICAgICAgICAgQ0FQX01BUF9FTlRSWShDSEVDS1BPSU5UX1JFU1RPUkUpLAotI2VuZGlmCiB9OwogCi0jaWYgZGVmaW5lZChfX0JJT05J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lbnQKKyAgICAgICAgICAgIHN0YXRpYyBjb25zdGV4cHIgc3RkOjpzdHJpbmdfdmlldyBkZXZpY2VzX3BsYXRmb3JtX3ByZWZpeCA9ICIvZGV2aWNlcy9wbGF0Zm9ybS8iOworICAgICAgICAgICAgc3RhdGljIGNvbnN0ZXhwciBzdGQ6OnN0cmluZ192aWV3IGRldmljZXNfcHJlZml4ID0gIi9kZXZpY2VzLyI7CisgICAgICAgICAgICBzdGQ6OnN0cmluZ192aWV3IHN2ID0gZGlyZWN0b3J5OworCisgICAgICAgICAgICBpZiAoIUNvbnN1bWVQcmVmaXgoJnN2LCBkZXZpY2VzX3BsYXRmb3JtX3ByZWZpeCkpIHsKKyAgICAgICAgICAgICAgICBDb25zdW1lUHJlZml4KCZzdiwgZGV2aWNlc19wcmVmaXgpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgKmRldmljZV9wYXRoID0gc3Y7CisKICAgICAgICAgICAgIHJldHVybiB0cnVlOwogICAgICAgICB9CiAKQEAgLTI0OCw2ICszMTEsNDAgQEAKICAgICByZXR1cm4gZmFsc2U7CiB9CiAKK2Jvb2wgRGV2aWNlSGFuZGxlcjo6RmluZFBsYXRmb3JtRGV2aWNlKGNvbnN0IHN0ZDo6c3RyaW5nJiBwYXRoLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcqIHBsYXRmb3JtX2RldmljZV9wYXRoKSBjb25zdCB7CisgICAgY29uc3Qgc3RkOjpzZXQ8c3RkOjpzdHJpbmc+IHN1YnN5c3RlbV9wYXRocyA9IHsKKyAgICAgICAgICAgIHN5c2ZzX21vdW50X3BvaW50XyArICIvYnVzL3BsYXRmb3JtIiwKKyAgICAgICAgICAgIHN5c2ZzX21vdW50X3BvaW50XyArICIvYnVzL2FtYmEiLAorICAgIH07CisKKyAgICByZXR1cm4gRmluZFN1YnN5c3RlbURldmljZShwYXRoLCBwbGF0Zm9ybV9kZXZpY2VfcGF0aCwgc3Vic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sYXNoID0gdWV2ZW50LnBhdGgucmZpbmQoJy8nKTsKQEAgLTQ4MSwxMSArNTY1LDIxIEBACiAgICAgLy8gZXZlbnQuCiAgICAgaWYgKGFjdGlvbiA9PSAiYWRkIiB8fCAoYWN0aW9uID09ICJjaGFuZ2UiICYmIFN0YXJ0c1dpdGgoZGV2cGF0aCwgIi9kZXYvYmxvY2svZG0tIikpKSB7CiAgICAgICAgIGZvciAoY29uc3QgYXV0byYgbGluayA6IGxpbmtzKSB7CisgICAgICAgICAgICBzdGQ6OnN0cmluZyB0YXJnZXQ7CisgICAgICAgICAgICBpZiAoU3RhcnRzV2l0aChsaW5rLCAiL2Rldi9ibG9jay8iKSkgeworICAgICAgICAgICAgICAgIHRhcmdldCA9IGRldnBhdGg7CisgICAgICAgICAgICB9IGVsc2UgaWYgKFN0YXJ0c1dpdGgobGluaywgIi9kZXYvc3lzL2Jsb2NrLyIpKSB7CisgICAgICAgICAgICAgICAgdGFyZ2V0ID0gIi9zeXMvY2xhc3MvYmxvY2svIiArIEJhc2VuYW1lKGRldnBhdGgpOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJVbnJlY29nbml6ZWQgbGluayB0eXBlOiAiIDw8IGxpbms7CisgICAgICAgICAgICAgICAgY29udGludWU7CisgICAgICAgICAgICB9CisKICAgICAgICAgICAgIGlmICghbWtkaXJfcmVjdXJzaXZlKERpcm5hbWUobGluayksIDA3NTUpKSB7CiAgICAgICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBjcmVhdGUgZGlyZWN0b3J5ICIgPDwgRGlybmFtZShsaW5rKTsKICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgaWYgKHN5bWxpbmsoZGV2cGF0aC5jX3N0cigpLCBsaW5rLmNfc3RyKCkpKSB7CisgICAgICAgICAgICBpZiAoc3ltbGluayh0YXJnZXQuY19zdHIoKSwgbGluay5jX3N0cigpKSkgewogICAgICA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gYm9vbCBza2lwX3Jlc3RvcmVjb24pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6c3RyaW5nIGJvb3RfcGFydF91dWlkLCBib29sIHNraXBfcmVzdG9yZWNvbikKICAgICA6IGRldl9wZXJtaXNzaW9uc18oc3RkOjptb3ZlKGRldl9wZXJtaXNzaW9ucykpLAogICAgICAgc3lzZnNfcGVybWlzc2lvbnNfKHN0ZDo6bW92ZShzeXNmc19wZXJtaXNzaW9ucykpLAogICAgICAgc3Vic3lzdGVtc18oc3RkOjptb3ZlKHN1YnN5c3RlbXMpKSwKICAgICAgIGJvb3RfZGV2aWNlc18oc3RkOjptb3ZlKGJvb3RfZGV2aWNlcykpLAorICAgICAgYm9vdF9wYXJ0X3V1aWRfKGJvb3RfcGFydF91dWlkKSwKICAgICAgIHNraXBfcmVzdG9yZWNvbl8oc2tpcF9yZXN0b3JlY29uKSwKLSAgICAgIHN5c2ZzX21vdW50X3BvaW50XygiL3N5cyIpIHt9CisgICAgICBzeXNmc19tb3VudF9wb2ludF8oIi9zeXMiKSB7CisgICAgLy8gSWYgYm90aCBhIGJvb3QgcGFydGl0aW9uIFVVSUQgYW5kIGEgbGlzdCBvZiBib290IGRldmljZXMgYXJlCisgICAgLy8gc3BlY2lmaWVkIHRoZW4gd2UgaWdub3JlIHRoZSBib290X2RldmljZXMgaW4gZmF2b3Igb2YgYm9vdF9wYXJ0X3V1aWQuCisgICAgaWYgKGJvb3RfZGV2aWNlc18uc2l6ZSgpICYmICFib290X3BhcnRfdXVpZC5lbXB0eSgpKSB7CisgICAgICAgIExPRyhXQVJOSU5HKSA8PCAiQm90aCBib290X2RldmljZXMgYW5kIGJvb3RfcGFydF91dWlkIHByb3ZpZGVkOyBpZ25vcmluZyBib290ZGV2aWNlcyI7CisgICAgICAgIGJvb3RfZGV2aWNlc18uY2xlYXIoKTsKKyAgICB9Cit9CiAKIERldmljZUhhbmRsZXI6OkRldmljZUhhbmRsZXIoKQogICAgIDogRGV2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bmcgZGV2bmFtZSA9IGRldm5hbWVfc291cmNlXyA9PSBERVZOQU1FX1VFVkVOVF9ERVZOQU1FCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdWV2ZW50LmRldmljZV9uYW1lCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogYW5kcm9pZDo6YmFzZTo6QmFzZW5hbWUodWV2ZW50LnBhdGgpOwotCisgICAgICAgIHN0ZDo6c3RyaW5nIGRldm5hbWU7CisgICAgICAgIGlmIChkZXZuYW1lX3NvdXJjZV8gPT0gREVWTkFNRV9VRVZFTlRfREVWTkFNRSkgeworICAgICAgICAgICAgZGV2bmFtZSA9IHVldmVudC5kZXZpY2VfbmFtZTsKKyAgICAgICAgfSBlbHNlIGlmIChkZXZuYW1lX3NvdXJjZV8gPT0gREVWTkFNRV9VRVZFTlRfREVWUEFUSCkgeworICAgICAgICAgICAgZGV2bmFtZSA9IGFuZHJvaWQ6OmJhc2U6OkJhc2VuYW1lKHVldmVudC5wYXRoKTsKKyAgICAgICAgfSBlbHNlIGlmIChkZXZuYW1lX3NvdXJjZV8gPT0gREVWTkFNRV9TWVNfTkFNRSkgeworICAgICAgICAgICAgaWYgKGFuZHJvaWQ6OmJhc2U6OlJlYWRGaWxlVG9TdHJpbmcoIi9zeXMvIiArIHVldmVudC5wYXRoICsgIi9uYW1lIiwgJmRldm5hbWUpKSB7CisgICAgICAgICAgICAgICAgZGV2bmFtZS5wb3BfYmFjaygpOyAgLy8gUmVtb3ZlIHRlcm1pbmF0aW5nIG5ld2xpbmUKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgZGV2bmFtZSA9IHVldmVudC5kZXZpY2VfbmFtZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQogICAgICAgICByZXR1cm4gZGlyX25hbWVfICsgIi8iICsgZGV2bmFtZTsKICAgICB9CiAKQEAgLTEwNywzMyArMTE2LDQ4IEBACiAgICAgc3Rk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CArMTQ1LDE3IEBACiAgICAgICAgICAgICAgICAgICAgICAgPDwgIicgZm9yIGRldnBhdGg6ICciIDw8IHVldmVudC5wYXRoIDw8ICInIGZpcm13YXJlOiAnIiA8PCB1ZXZlbnQuZmlybXdhcmUKICAgICAgICAgICAgICAgICAgICAgICA8PCAiJyI7CiAKKyAgICAgICAgICAgIHN0ZDo6dW5vcmRlcmVkX21hcDxzdGQ6OnN0cmluZywgc3RkOjpzdHJpbmc+IGVudnNfbWFwOworICAgICAgICAgICAgZW52c19tYXBbIkZJUk1XQVJFIl0gPSB1ZXZlbnQuZmlybXdhcmU7CisgICAgICAgICAgICBlbnZzX21hcFsiREVWUEFUSCJdID0gdWV2ZW50LnBhdGg7CisKICAgICAgICAgICAgIGF1dG8gcmVzdWx0ID0gUnVuRXh0ZXJuYWxIYW5kbGVyKGV4dGVybmFsX2hhbmRsZXIuaGFuZGxlcl9wYXRoLCBleHRlcm5hbF9oYW5kbGVyLnVpZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dGVybmFsX2hhbmRsZXIuZ2lkLCB1ZXZlbnQpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXh0ZXJuYWxfaGFuZGxlci5naWQsIGVudnNfbWFwKTsKKyAgICAgICAgICAgIGlmICghcmVzdWx0Lm9rKCkgJiYgTmVlZHNSZXJ1bkV4dGVybmFsSGFuZGxlcigpKSB7CisgICAgICAgICAgICAgICAgYXV0byByZXMgPSBSdW5FeHRlcm5hbEhhbmRsZXIoZXh0ZXJuYWxfaGFuZGxlci5oYW5kbGVyX3BhdGgsIGV4dGVybmFsX2hhbmRsZXIudWlkLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGV4dGVybmFsX2hhbmRsZXIuZ2lkLCBlbnZzX21hcCk7CisgICAgICAgICAgICAgICAgcmVzdWx0ID0gc3RkOjptb3ZlKHJlcyk7CisgICA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lZF9kZXZpY2VzKSB7Ci0gICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIGNyZWF0ZSBkZXZpY2Ugbm9kZXMgZWFybHkiOworICAgICAgICAgICAgZnNtID0gQ3JlYXRlRmlyc3RTdGFnZU1vdW50KGNtZGxpbmUpOworICAgICAgICAgICAgaWYgKGZzbSkgeworICAgICAgICAgICAgICAgIGNyZWF0ZWRfZGV2aWNlcyA9IGZzbS0+RG9DcmVhdGVEZXZpY2VzKCk7CisgICAgICAgICAgICAgICAgaWYgKCFjcmVhdGVkX2RldmljZXMpIHsKKyAgICAgICAgICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIGNyZWF0ZSBkZXZpY2Ugbm9kZXMgZWFybHkiOworICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgIH0KICAgICAgICAgfQogICAgICAgICBTdGFydENvbnNvbGUoY21kbGluZSk7CkBAIC00MDAsMTEgKzUyMiwyNiBAQAogICAgICAgICBTd2l0Y2hSb290KCIvZmlyc3Rfc3RhZ2VfcmFtZGlzayIpOwogICAgIH0KIAotICAgIGlmICghRG9GaXJzdFN0YWdlTW91bnQoIWNyZWF0ZWRfZGV2aWNlcykpIHsKLSAgICAgICAgTE9HKEZBVEFMKSA8PCAiRmFpbGVkIHRvIG1vdW50IHJlcXVpcmVkIHBhcnRpdGlvbnMgZWFybHkgLi4uIjsKKyAgICBpZiAoSXNSZWNvdmVyeU1vZGUoKSkgeworICAgICAgICBMT0coSU5GTykgPDwgIkZpcnN0IHN0YWdlIG1vdW50IHNraXBwZWQgKHJlY292ZXJ5IG1vZGUpIjsKKyAgICB9IGVsc2UgeworICAgICAgICBpZiAoIWZzbSkgeworICAgICAgICAgICAgZnNtID0gQ3JlYXRlRmlyc3RTdGFnZU1vdW50KGNtZGxpbmUpOworICAgICAgICB9CisgICAgICAgIGlmICghZnNtKSB7CisgICAgICAgICAgICBMT0coRkFUQUwpIDw8ICJGaXJ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ZEZpbGVUb1N0cmluZyhrV2lwZUluZGljYXRvciwgJmNvbnRlbnRzKSkgeworICAgICAgICBhbmRyb2lkOjpiYXNlOjpQYXJzZVVpbnQoY29udGVudHMsICZjb3VudGVyKTsKKyAgICAgICAgY29udGVudHMgPSBzdGQ6OnRvX3N0cmluZygrK2NvdW50ZXIpOworICAgICAgICBpZiAoYW5kcm9pZDo6YmFzZTo6V3JpdGVTdHJpbmdUb0ZpbGUoY29udGVudHMsIGtXaXBlSW5kaWNhdG9yKSkgeworICAgICAgICAgICAgc3luYygpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byB1cGRhdGUgIiA8PCBrV2lwZUluZGljYXRvcjsKKyAgICAgICAgfQorICAgIH0gZWxzZSB7CisgICAgICAgIFBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gcmVhZCAiIDw8IGtXaXBlSW5kaWNhdG9yOwogICAgIH0KIAotICAgIGlmIChjcmVhdGVfZGV2aWNlcykgewotICAgICAgICBpZiAoISgqZnNtKS0+RG9DcmVhdGVEZXZpY2VzKCkpIHJldHVybiBmYWxzZTsKKyAgICBzdGQ6OnN0cmluZyBlcnI7CisgICAgYXV0byBtaXNjX2RldmljZSA9IGdldF9taXNjX2Jsa19kZXZpY2UoJmVycik7CisgICAgaWYgKG1pc2NfZGV2aWNlLmVtcHR5KCkpIHsKKyAgICAgICAgTE9HKEZBVEFMKSA8PCAiQ291bGQgbm90IGZpbmQgbWlzYyBkZXZpY2U6ICIgPDwgZXJyOwogICAgIH0KIAotICAgIHJldHVybiAoKmZzbSktPkRvRmlyc3RTdGFnZU1vdW50KCk7CisgICAgYXV0byBtaXNjX25hbWUgPSBhbmRyb2lkOjpiYXNlOjpCYXNlbmFtZShtaXNjX2RldmljZSk7CisgICAgaWYgKCFibG9ja19kZXZfaW5pdF8uSW5pdERldmljZXMoe21pc2NfbmFtZX0pKSB7CisgICAgICAgIExPRyhGQVRBTCkgP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CBzdGQ6OnN0cmluZyYgcmVmX2Jhc2VuYW1lLCBGc2NyeXB0QWN0aW9uIGFjdGlvbiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgZGlyKTsKZGlmZiAtLWdpdCBhL2luaXQvZnV6emVyL0FuZHJvaWQuYnAgYi9pbml0L2Z1enplci9BbmRyb2lkLmJwCmluZGV4IGMyMWExOTYuLjhjZmQ1OTcgMTAwNjQ0Ci0tLSBhL2luaXQvZnV6emVyL0FuZHJvaWQuYnAKKysrIGIvaW5pdC9mdXp6ZXIvQW5kcm9pZC5icApAQCAtMTgsOSArMTgsOCBAQAogfQogCiBjY19kZWZhdWx0cyB7Ci0gICAgbmFtZTogImxpYmluaXRfZGVmYXVsdHMiLAorICAgIG5hbWU6ICJsaWJpbml0X2Z1enplcl9kZWZhdWx0cyIsCiAgICAgc3RhdGljX2xpYnM6IFsKLSAgICAgICAgImxpYmMrK2ZzIiwKICAgICAgICAgImxpYmxta2RfdXRpbHMiLAogICAgICAgICAibGlibW9kcHJvYmUiLAogICAgICAgICAibGlicHJvdG9idWYtY3BwLWxpdGUiLApAQCAtMzEsOCArMzAsNiBAQAogICAgIHNoYXJlZF9saWJzOiBbCiAgICAgICAgICJsaWJiYXNlIiwKICAgICAgICAgImxpYmZzX21nciIsCi0gICAgICAgICJsaWJoaWRsLWdlbi11dGlscyIsCi0gICAgICAgICJsaWJrZXl1dGlscyIsCiAgICAgICAgICJsaWJsb2ciLAogICAgICAgICAibGlicHJvY2Vzc2dyb3VwIiwKICAgICAgICAgImxpYnNlbGludXgiLApAQCAtNTEsOSArNDgsOCBAQAogICAgIHNyY3M6IFsKICAgICAgICAgImluaXRfcGFyc2VyX2Z1enplci5jcHAiLAogICAgIF0sCi0gICAgc2hhcmVkX2xpYnM6IFsibGliaGlkbG1ldGFkYXRhIixdLAogICAgIGRlZmF1bHRzOiBbCi0gICAgICAgICJsaWJpbml0X2RlZmF1bHRzIiwKK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nRQcm9wZXJ0aWVzRnJvbU1lbW9yeSgpIHsKLSAgICBQZXJzaXN0ZW50UHJvcGVydGllcyBwZXJzaXN0ZW50X3Byb3BlcnRpZXM7Ci0gICAgX19zeXN0ZW1fcHJvcGVydHlfZm9yZWFjaCgKLSAgICAgICAgW10oY29uc3QgcHJvcF9pbmZvKiBwaSwgdm9pZCogY29va2llKSB7Ci0gICAgICAgICAgICBfX3N5c3RlbV9wcm9wZXJ0eV9yZWFkX2NhbGxiYWNrKAotICAgICAgICAgICAgICAgIHBpLAotICAgICAgICAgICAgICAgIFtdKHZvaWQqIGNvb2tpZSwgY29uc3QgY2hhciogbmFtZSwgY29uc3QgY2hhciogdmFsdWUsIHVuc2lnbmVkIHNlcmlhbCkgewotICAgICAgICAgICAgICAgICAgICBpZiAoU3RhcnRzV2l0aChuYW1lLCAicGVyc2lzdC4iKSkgewotICAgICAgICAgICAgICAgICAgICAgICAgYXV0byBwcm9wZXJ0aWVzID0gcmVpbnRlcnByZXRfY2FzdDxQZXJzaXN0ZW50UHJvcGVydGllcyo+KGNvb2tpZSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBBZGRQZXJzaXN0ZW50UHJvcGVydHkobmFtZSwgdmFsdWUsIHByb3BlcnRpZXMpOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfSwKLSAgICAgICAgICAgICAgICBjb29raWUpOwotICAgICAgICB9LAotICAgICAgICAmcGVyc2lzdGVudF9wcm9wZXJ0aWVzKTsKLSAgICByZXR1cm4gcGVyc2lzdGVudF9wcm9wZXJ0aWVzOwotfQotCiBSZXN1bHQ8c3RkOjpzdHJpbmc+IFJlYWRQZXJzaXN0ZW50UHJvcGVydHlGaWxlKCkgewogICAgIGNvbnN0IHN0ZDo6c3RyaW5nIHRlbXBfZmlsZW5hbWUgPSBwZXJzaXN0ZW50X3Byb3BlcnR5X2ZpbGVuYW1lICsgIi50bXAiOwogICAgIGlmIChhY2Nlc3ModGVtcF9maWxlb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m9yZWFjaCgKKyAgICAgICAgICAgIFtdKGNvbnN0IHByb3BfaW5mbyogcGksIHZvaWQqIGNvb2tpZSkgeworICAgICAgICAgICAgICAgIF9fc3lzdGVtX3Byb3BlcnR5X3JlYWRfY2FsbGJhY2soCisgICAgICAgICAgICAgICAgICAgICAgICBwaSwKKyAgICAgICAgICAgICAgICAgICAgICAgIFtdKHZvaWQqIGNvb2tpZSwgY29uc3QgY2hhciogbmFtZSwgY29uc3QgY2hhciogdmFsdWUsIHVuc2lnbmVkIHNlcmlhbCkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChTdGFydHNXaXRoKG5hbWUsICJwZXJzaXN0LiIpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF1dG8gcHJvcGVydGllcyA9IHJlaW50ZXJwcmV0X2Nhc3Q8UGVyc2lzdGVudFByb3BlcnRpZXMqPihjb29raWUpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBZGRQZXJzaXN0ZW50UHJvcGVydHkobmFtZSwgdmFsdWUsIHByb3BlcnRpZXMpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgICAgIH0sCisgICAgICAgICAgICAgICAgICAgICAgICBjb29raWUpOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgICZwZXJzaXN0ZW50X3Byb3BlcnRpZXMpOworICAgIHJldHVybiBwZXJzaXN0ZW50X3Byb3BlcnRpZXM7Cit9CisKIC8vIFBlcnNpc3RlbnQgcHJvcGVydGllcyBhcmUgbm90IHdyaXR0ZW4gb2Z0ZW4sIHNvIHdlIHJhdGhlciBub3Qga2VlcCBhbnkgZGF0YSBpbiBtZW1vcnkgYW5kIHJlYWQKIC8vIHRoZW4gcmV3cml0ZSB0aGUgcGVyc2lzdGVudCBwcm9wZXJ0eSBmaWxlIGZvciBlYWNoIHVwZGF0ZS4KIHZvaWQgV3JpdGVQZXJzaXN0ZW50UHJvcGVydHkoY29u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2UubXNnX2Nhc2UoKSkgewogICAgICAgICBjYXNlIEluaXRNZXNzYWdlOjprTG9hZFBlcnNpc3RlbnRQcm9wZXJ0aWVzOiB7CiAgICAgICAgICAgICBsb2FkX292ZXJyaWRlX3Byb3BlcnRpZXMoKTsKLSAgICAgICAgICAgIC8vIFJlYWQgcGVyc2lzdGVudCBwcm9wZXJ0aWVzIGFmdGVyIGFsbCBkZWZhdWx0IHZhbHVlcyBoYXZlIGJlZW4gbG9hZGVkLgorCiAgICAgICAgICAgICBhdXRvIHBlcnNpc3RlbnRfcHJvcGVydGllcyA9IExvYWRQZXJzaXN0ZW50UHJvcGVydGllcygpOwotICAgICAgICAgICAgZm9yIChjb25zdCBhdXRvJiBwZXJzaXN0ZW50X3Byb3BlcnR5X3JlY29yZCA6IHBlcnNpc3RlbnRfcHJvcGVydGllcy5wcm9wZXJ0aWVzKCkpIHsKLSAgICAgICAgICAgICAgICBJbml0UHJvcGVydHlTZXQocGVyc2lzdGVudF9wcm9wZXJ0eV9yZWNvcmQubmFtZSgpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZXJzaXN0ZW50X3Byb3BlcnR5X3JlY29yZC52YWx1ZSgpKTsKKyAgICAgICAgICAgIGZvciAoY29uc3QgYXV0byYgcHJvcGVydHlfcmVjb3JkIDogcGVyc2lzdGVudF9wcm9wZXJ0aWVzLnByb3BlcnRpZXMoKSkgeworICAgICAgICAgICAgICAgIGF1dG8gY29uc3QmIHByb3BfbmFtZSA9IHByb3BlcnR5X3JlY29yZC5uYW1lKCk7CisgICAgICAgICAgICAgICAgYXV0byBjb25zdCYgcHJvcF92YWx1ZSA9IHByb3BlcnR5X3JlY29yZC52YWx1ZSgpOworICAgICAgICAgICAgICAgIEluaXRQcm9wZXJ0eVNldChwcm9wX25hbWUsIHByb3BfdmFsdWUpOwogICAgICAgICAgICAgfQorCiAgICAgICAgICAgICAvLyBBcHBseSBkZWJ1ZyByYW1kaXNrIHNwZWNpYWwgc2V0dGluZ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W1lKCkpOwotICAgICAgICB9Ci0gICAgfQotICAgIHJldHVybiByZXQ7Ci19Ci0KIHN0YXRpYyB2b2lkIFBlcnNpc3RSZWJvb3RSZWFzb24oY29uc3QgY2hhciogcmVhc29uLCBib29sIHdyaXRlX3RvX3Byb3BlcnR5KSB7CiAgICAgaWYgKHdyaXRlX3RvX3Byb3BlcnR5KSB7CiAgICAgICAgIFNldFByb3BlcnR5KExBU1RfUkVCT09UX1JFQVNPTl9QUk9QRVJUWSwgcmVhc29uKTsKQEAgLTU2Myw3ICs1NTIsNyBAQAogICAgICAgICB9CiAgICAgfQogICAgIGlmICh0aW1lb3V0ID4gMG1zKSB7Ci0gICAgICAgIFdhaXRUb0JlUmVhcGVkKHBpZHMsIHRpbWVvdXQpOworICAgICAgICBXYWl0VG9CZVJlYXBlZChTZXJ2aWNlOjpHZXRTaWdjaGxkRmQoKSwgcGlkcywgdGltZW91dCk7CiAgICAgfSBlbHNlIHsKICAgICAgICAgLy8gRXZlbiBpZiB3ZSBkb24ndCB0byB3YWl0IGZvciBzZXJ2aWNlcyB0byBzdG9wLCB3ZSBzdGlsbCBvcHRpbWlzdGljYWxseSByZWFwIHpvbWJpZXMuCiAgICAgICAgIFJlYXBBbnlPdXRzdGFuZGluZ0NoaWxkcmVuKCk7CkBAIC02ODAsOCArNjY5LDggQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICInOiAiIDw8IHJlc3VsdC5lcnJvcigpOwogICAgICAgICAgICAgfQogICAgICAgICAgICAgcy0+U2V0U2h1dGRvd25Dcml0aWNhbCgpOwotICAgICAgICB9IGVsc2UgaWYgKGRvX3NodXRkb3duX2FuaW1hdGlvbikgewotICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0gZWxzZSBpZiAoZG9fc2h1dGRvd25fYW5pbWF0aW9uICYmIHMtPmNsYXNzbmFtZXMoKS5jb3VudCgiYW5pbWF0aW9uIikgPiAwKSB7CisgICAgICAgICAgICAvLyBOZWVkIHRoZXNl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pZiAoY21kX3BhcmFtcy5zaXplKCkgPj0gMikgewogICAgICAgICAgICAgcmVib290X3RhcmdldCA9IGNtZF9wYXJhbXNbMV07CiAgICAgICAgICAgICBpZiAocmVib290X3RhcmdldCA9PSAidXNlcnNwYWNlIikgewotICAgICAgICAgICAgICAgIExPRyhJTkZPKSA8PCAiVXNlcnNwYWNlIHJlYm9vdCByZXF1ZXN0ZWQiOwotICAgICAgICAgICAgICAgIHVzZXJzcGFjZV9yZWJvb3QgPSB0cnVlOworICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIlVzZXJzcGFjZSByZWJvb3QgaXMgZGVwcmVjYXRlZC4iOworICAgICAgICAgICAgICAgIHJldHVybjsKICAgICAgICAgICAgIH0KICAgICAgICAgICAgIC8vIGFkYiByZWJvb3QgZmFzdGJvb3Qgc2hvdWxkIGJvb3QgaW50byBib290bG9hZGVyIGZvciBkZXZpY2VzIG5vdAogICAgICAgICAgICAgLy8gc3VwcG9ydGluZyBsb2dpY2FsIHBhcnRpdGlvbnMuCkBAIC0xMDgzLDcgKzg4MSw4IEBACiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47CiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9IGVsc2UgaWYgKHJlYm9vdF90YXJnZXQgPT0gInF1aWVzY2VudCIpIHsKKyAgICAgICAgICAgIH0gZWxzZSBpZiAoc3RkOjpmaW5kKGNtZF9wYXJhbXMuYmVnaW4oKSwgY21kX3BhcmFtcy5lbmQoKSwgInF1aWVzY2VudCIpCisgICAgICAgICAgICAgICAgICAgICE9IGNtZF9wYXJhbXMuZW5kKCkpIHsgLy8gUXVpZXNjZW50IGNhbiBiZSBlaXRoZXIgc3VicmVhc29uIG9yIGRldGFpbHMuCiAgICAgICAgICAgICAgICAgYm9vdGxvYWRlcl9tZXNzYWdlIGJvb3QgPSB7fTsKICAgICAgICAgICAgICAgICBpZiAoc3RkOjpzdHJpbmcgZX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iAKKyAgICAgICAgICAgICAgICAgICAgLy8gRm9yIHNvbWUgcmVhc29uLCB3ZSBzcGVsbGVkIHRoZXNlIHdyb25nLgogICAgICAgICAgICAgICAgICAgICB7eyJSTElNX0NQVSIsICIxMCIsICIxMCJ9LCB7MCwgezEwLCAxMH19fSwKICAgICAgICAgICAgICAgICAgICAge3siUkxJTV9GU0laRSIsICIxMCIsICIxMCJ9LCB7MSwgezEwLCAxMH19fSwKICAgICAgICAgICAgICAgICAgICAge3siUkxJTV9EQVRBIiwgIjEwIiwgIjEwIn0sIHsyLCB7MTAsIDEwfX19LApAQCAtODQsNiArODUsMjQgQEAKICAgICAgICAgICAgICAgICAgICAge3siUkxJTV9SVFBSSU8iLCAiMTAiLCAiMTAifSwgezE0LCB7MTAsIDEwfX19LAogICAgICAgICAgICAgICAgICAgICB7eyJSTElNX1JUVElNRSIsICIxMCIsICIxMCJ9LCB7MTUsIHsxMCwgMTB9fX0sCiAKKyAgICAgICAgICAgICAgICAgICAgLy8gVGhlc2UgYXJlIHRoZSBjb3JyZWN0IHNwZWxsaW5ncy4KKyAgICAgICAgICAgICAgICAgICAge3siUkxJTUlUX0NQVSIsICIxMCIsICIxMCJ9LCB7MCwgezEwLCAxMH19fSwKKyAgICAgICAgICAgICAgICAgICAge3siUkxJTUlUX0ZTSVpFIiwgIjEwIiwgIjEwIn0sIHsxLCB7MTAsIDEwfX19LAorICAgICAgICAgICAgICAgICAgICB7eyJSTElNSVRfREFUQSIsICIxMCIsICIxMCJ9LCB7MiwgezEwLCAxMH19fSwKKyAgICAgICAgICAgICAgICAgICAge3siUkxJTUlUX1NUQUNLIiwgIjEwIiwgIjEwIn0sIHszLCB7MTAsIDEwfX19LAorICAgICAgICAgICAgICAgICAgICB7eyJSTElNSVRfQ09SRSIsICIxMCIsICIxMCJ9LCB7NCwgezEwLCAxMH19fSwKKyAgICAgICAgICAgICAgICAgICAge3siUkxJTUlUX1JTUyIsICIxMCIsICIxMCJ9LCB7NSwgezEwLCAxMH19fSwKKyAgICAgICAgICAgICAgICAgICAge3siUkxJTUlUX05QUk9DIiwgIjEwIiwgIjEwIn0sIHs2LCB7MTAsIDEwfX19LAorICAgICAgICAgICAgICAgICAgICB7eyJSTElNSVRfTk9GSUxFIiwgIjEwIiwgIjEwIn0sIHs3LCB7MTAsIDEwfX19LAorICAgICAgICAgICAgICAgICAgICB7eyJSTElNSVRfTUVNTE9DSyIsICIxMCIsICIxMCJ9LCB7OCwgezEwLCAxMH19fSwKKyAgICAgICAgICAgICAgICAgICAge3siUkxJTUlUX0FTIiwgIjEwIiwgIjEwIn0sIHs5LCB7MTAsIDEwfX19LAorICAgICAgICAgICAgICAgICAgICB7eyJSTElNSVRfTE9DS1MiLCAiMTAiLCAiMTAifSwgezEwLCB7MTAsIDEwfX19LAorICAgICAgICAgICAgICAgICAgICB7eyJSTElNSVRfU0lHUEVORElORyIsICIxMCIsICIxMCJ9LCB7MTEsIHsxMCwgMTB9fX0sCisgICAgICAgICAgICAgICAgICAgIHt7IlJMSU1JVF9NU0dRVUVVRSIsICIxMCIsICIxMCJ9LCB7MTIsIHsxMCwgMTB9fX0sCisgICAgICAgICAgICAgICAgICAgIHt7IlJMSU1JVF9OSUNFIiwgIjEwIiwgIjEwIn0sIHsxMywgezEwLCAxMH19fSwKKyAgICAgICAgICAgICAgICAgICAge3siUkxJTUlUX1JUUFJJTyIsICIxMCIsICIxMCJ9LCB7MTQsIHsxMCwgMTB9fX0sCisgICAgICAgICAgICAgICAgICAgIHt7IlJMSU1JVF9SVFRJTUUiLCAiMTAiLCAiMTAifSwgezE1LCB7MTAsIDEwfX19LAorCiAgICAgICAgICAgICAgICAgICAgIHt7IjAiLCAiMTAiLCAiMTAifSwgezAsIHsxMCwgMTB9fX0sCiAgICAgICAgICAgICAgICAgICAgIHt7IjEiLCAiMTAiLCAiMTAifSwgezEsIHsxMCwgMTB9fX0sCiAgICAgICAgICAgICAgICAgICAgIHt7IjIiLCAiMTAiLCAiMTAifSwgezIsIHsxM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IHN0ZDo6dG9fc3RyaW5nKGZhdGFsX2NyYXNoX3dpbmRvd18uY291bnQoKSkgKyAiIG1pbnV0ZXMiIDoKLSAgICAgICAgICAgICAgICAgICAgImJlZm9yZSBib290IGNvbXBsZXRlZCI7CisgICAgICAgICAgICAgICAgYXV0byBleGl0X3JlYXNvbiA9CisgICAgICAgICAgICAgICAgICAgICAgICBib290X2NvbXBsZXRlZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICJpbiAiICsgc3RkOjp0b19zdHJpbmcoZmF0YWxfY3Jhc2hfd2luZG93Xy5jb3VudCgpKSArICIgbWludXRlcyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiYmVmb3JlIGJvb3QgY29tcGxldGVkIjsKICAgICAgICAgICAgICAgICBpZiAoZmxhZ3NfICYgU1ZDX0NSSVRJQ0FMKSB7CiAgICAgICAgICAgICAgICAgICAgIGlmICghR2V0Qm9vbFByb3BlcnR5KCJpbml0LnN2Y19kZWJ1Zy5ub19mYXRhbC4iICsgbmFtZV8sIGZhbHNlKSkgewotICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWJvcnRzIGludG8gYGZhdGFsX3JlYm9vdF90YXJnZXRfJy4KLSAgICAgICAgICAgICAgICAgICAgICAgIFNldEZhdGFsUmVib290VGFyZ2V0KGZhdGFsX3JlYm9vdF90YXJnZXRfKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIExPRyhGQVRBTCkgPDwgImNyaXRpY2FsIHByb2Nlc3MgJyIgPDwgbmFtZV8gPDwgIicgZXhpdGVkIDQgdGltZXMgIgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCBleGl0X3JlYXNvbjsKKyAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQ2NF90IGVwb2NoX3RpbWUgPQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGQ6OmNocm9ubzo6ZHVyYXRpb25fY2FzdDxzdGQ6OmNocm9ubzo6c2Vjb25kcz4oCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RkOjpjaHJvbm86OnN5c3RlbV9jbG9jazo6bm93KCkudGltZV9zaW5jZV9lcG9jaCgpKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5jb3VudCgpOworICAgICAgICAgICAgICAgICAgICAgICAgLy8gRG8gbm90IHJlYm9vdCBhZ2FpbiBJZiBpdCB3YXMgYWxyZWFkeSBpbml0aWF0ZWQgaW4gdGhlIGxhc3QgMjRocnMKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlcG9jaF90aW1lIC0gR2V0SW50UHJvcGVydHkobmF0aXZlX3dhdGNoZG9nX3JlYm9vdF90aW1lLCAwKSA+CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3R0bGVfd2luZG93KSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2V0UHJvcGVydHkobmF0aXZlX3dhdGNoZG9nX3JlYm9vdF90aW1lLCBzdGQ6OnRvX3N0cmluZyhlcG9jaF90aW1lKSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWJvcnRzIGludG8gYGZhdGFsX3JlYm9vdF90YXJnZXRfJy4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZXRGYXRhbFJlYm9vdFRhcmdldChmYXRhbF9yZWJvb3RfdGFyZ2V0Xyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTE9HKEZBVEFMKSA8PCAiY3JpdGljYWwgcHJvY2VzcyAnIiA8PCBuYW1lXyA8PCAiJyBleGl0ZWQgNCB0aW1lcyAiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCBleGl0X3JlYXNvbjsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTE9HKElORk8pIDw8ICJSZWJvb3QgYWxyZWFkeSBwZXJmb3JtZWQgaW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2tldC0+UHVibGlzaCgpOwogCi0gICAgICAgIGlmIChkcml2ZXIgPT0gU25hcHNob3REcml2ZXI6OkRNX1VTRVIpIHsKLSAgICAgICAgICAgIGNoYXIgYXJnMFtdID0gIi9zeXN0ZW0vYmluL3NuYXB1c2VyZCI7Ci0gICAgICAgICAgICBjaGFyIGFyZzFbXSA9ICItdXNlcl9zbmFwc2hvdCI7Ci0gICAgICAgICAgICBjaGFyKiBjb25zdCBhcmd2W10gPSB7YXJnMCwgYXJnMSwgbnVsbHB0cn07Ci0gICAgICAgICAgICBpZiAoZXhlY3YoYXJnMCwgYXJndikgPCAwKSB7Ci0gICAgICAgICAgICAgICAgUExPRyhGQVRBTCkgPDwgIkNhbm5vdCBsYXVuY2ggc25hcHVzZXJkOyBleGVjdiBmYWlsZWQiOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgX2V4aXQoMTI3KTsKLSAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgIGNoYXIgYXJnMFtdID0gIi9zeXN0ZW0vYmluL3NuYXB1c2VyZCI7Ci0gICAgICAgICAgICBjaGFyKiBjb25zdCBhcmd2W10gPSB7YXJnMCwgbnVsbHB0cn07Ci0gICAgICAgICAgICBpZiAoZXhlY3YoYXJnMCwgYXJndikgPCAwKSB7Ci0gICAgICAgICAgICAgICAgUExPRyhGQVRBTCkgPDwgIkNhbm5vdCBsYXVuY2ggc25hcHVzZXJkOyBleGVjdiBmYWlsZWQiOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgX2V4aXQoMTI3KTsKKyAgICAgICAgY2hhciBhcmcwW10gPSAiL3N5c3RlbS9iaW4vc25hcHVzZXJkIjsKKyAgICAgICAgY2hhciBhcmcxW10gPSAiLXVzZXJfc25hcHNob3QiOworICAgICAgICBjaGFyKiBjb25zdCBhcmd2W10gPSB7YXJnMCwgYXJnMSwgbnVsbHB0cn07CisgICAgICAgIGlmIChleGVjdihhcmcwLCBhcmd2KSA8IDApIHsKKyAgICAgICAgICAgIFBMT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KSkgeworICAgICAgICAgICAgLy8gTG9nIGNhcHR1cmVkIG91dHB1dCwgbGluZSBieSBsaW5lLCBiZWNhdXNlIExPRyBleHBlY3RzIHRvIGJlIGludm9rZWQgZm9yIGVhY2ggbGluZQorICAgICAgICAgICAgc3RkOjppc3RyaW5nc3RyZWFtIGluKGNoaWxkX291dHB1dCk7CisgICAgICAgICAgICBzdGQ6OnN0cmluZyBsaW5lOworICAgICAgICAgICAgd2hpbGUgKHN0ZDo6Z2V0bGluZShpbiwgbGluZSkpIHsKKyAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8IGZpbGVuYW1lIDw8ICI6ICIgPDwgbGluZTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIC8vIFdhaXQgZm9yIGNoaWxkIHRvIHRlcm1pbmF0ZQorICAgICAgICBpbnQgc3RhdHVzOworICAgICAgICBpZiAoVEVNUF9GQUlMVVJFX1JFVFJZKHdhaXRwaWQoY2hpbGRfcGlkLCAmc3RhdHVzLCAwKSkgIT0gY2hpbGRfcGlkKSB7CisgICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIHdhaXQgZm9yICIgPDwgZmlsZW5hbWU7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgIH0KKworICAgICAgICBpZiAoV0lGRVhJVEVEKHN0YXR1cykpIHsKKyAgICAgICAgICAgIGludCBzdGF0dXNfY29kZSA9IFdFWElUU1RBVFVTKHN0YXR1cyk7CisgICAgICAgICAgICBpZiAoc3RhdHVzX2NvZGUgPT0gMCkgeworICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBMT0coRVJST1IpIDw8IGZpbGVuYW1lIDw8ICIgZXhpdGVkIHdpdGggc3RhdHVzICIgPDwgc3RhdHVzX2NvZGU7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSBpZiAoV0lGU0lHTkFMR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ydWUsCi0gICAgICAgIHN1cHBvcnRfc3lzdGVtX3Byb2Nlc3M6IHRydWUsCi0gICAgfSwKKyAgICBkb3VibGVfbG9hZGFibGU6IHRydWUsCiAgICAgc3JjczogWwogICAgICAgICAiY29uZmlnX3V0aWxzLmNwcCIsCiAgICAgICAgICJpb3NjaGVkX3BvbGljeS5jcHAiLApAQCAtMTYyLDcgKzE0MSw2IEBACiAgICAgICAgICJwcm9wZXJ0aWVzLmNwcCIsCiAgICAgICAgICJyZWNvcmRfc3RyZWFtLmNwcCIsCiAgICAgICAgICJzdHJsY3B5LmMiLAotICAgICAgICAidGhyZWFkcy5jcHAiLAogICAgIF0sCiAKICAgICB0YXJnZXQ6IHsKQEAgLTE3MiwyNSArMTUwLDI0IEBACiAgICAgICAgICAgICAgICAgImxpYmFzeW5jX3NhZmUiLAogICAgICAgICAgICAgXSwKICAgICAgICAgfSwKLSAgICAgICAgbm90X3dpbmRvd3M6IHsKLSAgICAgICAgICAgIHNyY3M6IGxpYmN1dGlsc19ub253aW5kb3dzX3NvdXJjZXMgKyBbCi0gICAgICAgICAgICAgICAgImFzaG1lbS1ob3N0LmNwcCIsCisgICAgICAgIGxpbnV4OiB7CisgICAgICAgICAgICBzcmNzOiBbCiAgICAgICAgICAgICAgICAgImNhbm5lZF9mc19jb25maWcuY3BwIiwKICAgICAgICAgICAgICAgICAiZnNfY29uZmlnLmNwcCIsCi0gICAgICAgICAgICAgICAgInRyYWNlLWhvc3QuY3BwIiwKICAgICAgICAgICAgIF0sCiAgICAgICAgIH0sCi0gICAgICAgIHdpbmRvd3M6IHsKLSAgICAgICAgICAgIGhvc3RfbGRsaWJzOiBbIi1sd3MyXzMyIl0sCi0KKyAgICAgICAgaG9zdDogewogICAgICAgICAgICAgc3JjczogWwogICAgICAgICAgICAgICAgICJ0cmFjZS1ob3N0LmNwcCIsCisgICAgICAgICAgICAgICAgImFzaG1lbS1ob3N0LmNwcCIsCiAgICAgICAgICAgICBdLAotCisgICAgICAgIH0sCisgICAgICAgIG5vdF93aW5kb3dzOiB7CisgICAgICAgICAgICBzcmNzOiBsaWJjdXRpbHNfbm9ud2luZG93c19zb3VyY2VzLAorICAgICAgICB9LAorICAgICAgICB3aW5kb3dzOiB7CiAgICAgICAgICAgICBlbmFibGVkOiB0cnVlLAotICAgICAgICAgICAgY2ZsYWdzOiBbCi0gICAgICAgICAgICAgICAgIi1EX0dOVV9TT1VSQ0UiLAotICAgICAgICAgICAgXSwKKyAgICAgICAgICAgIGhvc3RfbGRsaWJzOiBbIi1sd3MyXzMyIl0sCiAgICAgICAgIH0sCiAgICAgICAgIGFuZHJvaWQ6IHsKICAgICAgICAgICAgIHNhbml0aXplOiB7CkBAIC0yMDIsOCArMTc5LDYgQEAKICAgICAgICAgICAgIHNyY3M6IGxpYmN1dGlsc19ub253aW5kb3dzX3NvdXJjZXMgKyBbCiAgICAgICAgICAgICAgICAgImFuZHJvaWRfcmVib290LmNwcCIsCiAgICAgICAgICAgICAgICAgImFzaG1lbS1kZXYuY3BwIiwKLSAgICAgICAgICAgICAgICAiY2FubmVkX2ZzX2NvbmZpZy5jcHAiLAotICAgICAgICAgICAgICAgICJmc19jb25maWcuY3BwIiwKICAgICAgICAgICAgICAgICAia2xvZy5jcHAiLAogICAgICAgICAgICAgICAgICJwYXJ0aXRpb25fdXRpbHMuY3BwIiwKICAgICAgICAgICAgICAgICAicXRhZ3VpZC5jcHAiLApAQCAtMjE5LDExICsxOTQsMTkgQEAKICAgICAgICAgICAgIGV4Y2x1ZGVfc3JjczogWwogICAgICAgICAgICAgICAgICJxdGFndWlkLmNwcCIsCiAgICAgICAgICAgICBdLAorICAgICAgICAgICAgaGVhZGVyX2FiaV9jaGVja2VyOiB7CisgICAgICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSwKKyAgICAgICAgICAgICAgICByZWZfZHVtcF9kaXJzOiBbImFiaS1kdW1wcyJdLAorICAgICAgICAgICAgfSwKICAgICAgICAgfSwKICAgICAgICAgcHJvZHVjdDogewogICAgICAgICAgICAgZXhjbHVkZV9zcmNzOiBbCiAgICAgICAgICAgICAgICAgInF0YWd1aWQuY3BwIiwKICAgICAgICAgICAgIF0sCisgICAgICAgICAgICBoZWFkZXJfYWJpX2NoZWNrZXI6IHsKKyAgICAgICAgICAgICAgICBlbmFibGVkOiB0cnVlLAorICAgICAgICAgICAgICAgIHJlZl9kdW1wX2RpcnM6IFsiYWJpLWR1bXBzIl0sCisgICAgICAgICAgICB9LAogICAgICAgICB9LAogICAgIH0sCiAKQEAgLTI1Myw2ICsyMzYsNyBAQAogY2NfZGVmYXVsdHMgewogICAgIG5hbWU6ICJsaWJjdXRpbHNfdGVzdF9kZWZhdWx0IiwKICAgICBzcmNzOiBbCisgICAgICAgICJhc2htZW1fYmFzZV90ZXN0LmNwcCIsCiAgICAgICAgICJuYXRpdmVfaGFuZGxlX3Rlc3QuY3BwIiwKICAgICAgICAgInByb3BlcnRpZXNfdGVzdC5jcHAiLAogICAgICAgICAic29ja2V0c190ZXN0LmNwcCIsCkBAIC0yOTUsNyArMjc5LDYgQEAKICAgICAibGlibG9nIiwKICAgICAibGliYmFzZSIsCiAgICAgImxpYnByb2Nlc3Nncm91cCIsCi0gICAgImxpYmNncm91cHJjIiwKIF0KIAogY2NfdGVzdCB7CkBAIC0zMTEsMjAgKzI5NCwyNiBAQAogY2NfZGVmYXVsdHMgewogICAgIG5hbWU6ICJsaWJjdXRpbHNfdGVzdF9zdGF0aWNfZGVmYXVsdHMiLAogICAgIGRlZmF1bHRzOiBbImxpYmN1dGlsc190ZXN0X2RlZmF1bHQiXSwKLSAgICBzdGF0aWNfbGliczogWwotICAgICAgICAibGliYyIsCi0gICAgICAgICJsaWJjZ3JvdXByY19mb3JtYXQiLAotICAgIF0gKyB0ZXN0X2xpYnJhcmllcyArIGFsd2F5c19zdGF0aWNfdGVzdF9saWJyYXJpZXMsCiAgICAgc3RsOiAibGliYysrX3N0YXRpYyIsCiAgICAgcmVxdWlyZV9yb290OiB0cnVlLAogCiAgICAgdGFyZ2V0OiB7CiAgICAgICAgIGFuZHJvaWQ6IHsKICAgICAgICAgICAgIHN0YXRpY19leGVjdXRhYmxlOiB0cnVlLAorICAgICAgICAgICAgc3RhdGljX2xpYnM6IFsKKyAgICAgICAgICAgICAgICAibGlicHJvY2Vzc2dyb3VwX3V0aWwiLAorICAgICAgICAgICAgXSArIHRlc3RfbGlicmFyaWVzICsgYWx3YXlzX3N0YXRpY190ZXN0X2xpYnJhcmllcywKKyAgICAgICAgfSwKKyAgICAgICAgbm90X3dpbmRvd3M6IHsKKyAgICAgICAgICAgIHN0YXRpY19saWJzOiB0ZXN0X2xpYnJhcmllcyArIGFsd2F5c19zdGF0aWNfdGVzdF9saWJyYXJpZXMsCiAgICAgICAgIH0sCiAgICAgICAgIHdpbmRvd3M6IHsKKyAgICAgICAgICAgIHN0YXRpY19saWJzOiBbCisgICAgICAgICAgICAgICAgImxpYmJhc2UiLAorICAgICAgICAgICAgICAgICJsaWJjdXRpbHMiLAorICAgICAgICAgICAgICAgICJsaWJjdXRpbHNfc29ja2V0cyIsCisgICAgICAgICAgICBdLAogICAgICAgICAgICAgaG9zdF9sZGxpYnM6IFsiLWx3czJfMzIiXSwKLQogICAgICAgICAgICAgZW5hYmxlZDogdHJ1ZSwKICAgICAgICAgfSwKICAgICB9LApAQCAtMzMyLDEzICszMjEsMTcgQEAKIAogY2NfdGVzdCB7CiAgICAgbmFtZTogImxpYmN1dGlsc190ZXN0X3N0YXRpYyIsCisgICAgaG9zdF9zdXBwb3J0ZWQ6IHRydWUsCiAgICAgdGVzdF9zdWl0ZXM6IFsiZGV2aWNlLXRlc3RzIl0sCiAgICAgZGVmYXVsdHM6IFsibGliY3V0aWxzX3Rlc3Rfc3RhdGljX2RlZmF1bHRzIl0sCiB9CiAKIGNjX3Rlc3QgewogICAgIG5hbWU6ICJLZXJuZWxMaWJjdXRpbHNUZXN0IiwKLSAgICB0ZXN0X3N1aXRlczogWyJnZW5lcmFsLXRlc3RzIiwgInZ0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ICJpc19pbnRlZ3JhbCIgOiB0cnVlLAorICAgImlzX3Vuc2lnbmVkIiA6IHRydWUsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEljIiwKKyAgICJuYW1lIiA6ICJjaGFyIiwKKyAgICJzaXplIiA6IDEKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJZiIsCisgICAibmFtZSIgOiAiZmxvYXQiLAorICAgInNpemUiIDogNAorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDEsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJpc191bnNpZ25lZCIgOiB0cnVlLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJaCIsCisgICAibmFtZSIgOiAidW5zaWduZWQgY2hhciIsCisgICAic2l6ZSIgOiAxCisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKKyAgICJpc19pbnRlZ3JhbCIgOiB0cnVlLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJaSIsCisgICAibmFtZSIgOiAiaW50IiwKKyAgICJzaXplIiA6IDQKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImlzX2ludGVncmFsIiA6IHRydWUsCisgICAiaXNfdW5zaWduZWQiIDogdHJ1ZSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSWoiLAorICAgIm5hbWUiIDogInVuc2lnbmVkIGludCIsCisgICAic2l6ZSIgOiA0CisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogOCwKKyAgICJpc19pbnRlZ3JhbCIgOiB0cnVlLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJbCIsCisgICAibmFtZSIgOiAibG9uZyIsCisgICAic2l6ZSIgOiA4CisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogOCwKKyAgICJpc19pbnRlZ3JhbCIgOiB0cnVlLAorICAgImlzX3Vuc2lnbmVkIiA6IHRydWUsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEltIiwKKyAgICJuYW1lIiA6ICJ1bnNpZ25lZCBsb25nIiwKKyAgICJzaXplIiA6IDgKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiAxNiwKKyAgICJpc19pbnRlZ3JhbCIgOiB0cnVlLAorICAgImlzX3Vuc2lnbmVkIiA6IHRydWUsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElvIiwKKyAgICJuYW1lIiA6ICJ1bnNpZ25lZCBfX2ludDEyOCIsCisgICAic2l6ZSIgOiAxNgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDIsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSXMiLAorICAgIm5hbWUiIDogInNob3J0IiwKKyAgICJzaXplIiA6IDIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiAyLAorICAgImlzX2ludGVncmFsIiA6IHRydWUsCisgICAiaXNfdW5zaWduZWQiIDogdHJ1ZSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSXQiLAorICAgIm5hbWUiIDogInVuc2lnbmVkIHNob3J0IiwKKyAgICJzaXplIiA6IDIKKyAgfSwKKyAgeworICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJdiIsCisgICAibmFtZSIgOiAidm9pZCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA4LAorICAgImlzX2ludGVncmFsIiA6IHRydWUsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEl4IiwKKyAgICJuYW1lIiA6ICJsb25nIGxvbmciLAorICAgInNpemUiIDogOAorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDgsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJpc191bnNpZ25lZCIgOiB0cnVlLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJ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IHsKKyAgICJuYW1lIiA6ICJhdHJhY2VfYXN5bmNfZm9yX3RyYWNrX2VuZF9ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2JlZ2luX2JvZHkiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2VfZW5kX2JvZHkiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2VfZ2V0X2VuYWJsZWRfdGFncyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9pbml0IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2luc3RhbnRfYm9keSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9pbnN0YW50X2Zvcl90cmFja19ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2ludDY0X2JvZHkiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2VfaW50X2JvZHkiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2Vfc2V0X3RyYWNpbmdfZW5hYmxlZCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9zZXR1cCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV91cGRhdGVfdGFncyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImNhbm5lZF9mc19jb25maWciCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJjb25maWdfYm9vbCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImNvbmZpZ19maW5kIgorICB9LAorICB7CisgICAibmFtZSIgOiAiY29uZmlnX2ZyZWUiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJjb25maWdfbG9hZCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImNvbmZpZ19sb2FkX2ZpbGUiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJjb25maWdfbm9kZSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImNvbmZpZ19zZXQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJjb25maWdfc3RyIgorICB9LAorICB7CisgICAibmFtZSIgOiAiZnNfY29uZmlnIgorICB9LAorICB7CisgICAibmFtZSIgOiAiZnNfbWtkaXJzIgorICB9LAorICB7CisgICAibmFtZSIgOiAiZnNfcHJlcGFyZV9kaXIiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJmc19wcmVwYXJlX2Rpcl9zdHJpY3QiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJmc19wcmVwYXJlX2ZpbGVfc3RyaWN0IgorICB9LAorICB7CisgICAibmFtZSIgOiAiZnNfcmVhZF9hdG9taWNfaW50IgorICB9LAorICB7CisgICAibmFtZSIgOiAiZnNfd3JpdGVfYXRvbWljX2ludCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImdldF9mc19jb25maWciCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJoYXNobWFwQ3JlYXRlIgorICB9LAorICB7CisgICAibmFtZSIgOiAiaGFzaG1hcEZvckVhY2giCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJoYXNobWFwRnJlZSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImhhc2htYXBHZXQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJoYXNobWFwSGFzaCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImhhc2htYXBMb2NrIgorICB9LAorICB7CisgICAibmFtZSIgOiAiaGFzaG1hcFB1dCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImhhc2htYXBSZW1vdmUiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJoYXNobWFwVW5sb2NrIgorICB9LAorICB7CisgICAibmFtZSIgOiAia2xvZ19zZXRfbGV2ZWwiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJrbG9nX3dyaXRlIgorICB9LAorICB7CisgICAibmFtZSIgOiAia2xvZ193cml0ZXYiCisgIH0sCisgIHsK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wKKyAgeworICAgIm5hbWUiIDogIm5hdGl2ZV9oYW5kbGVfaW5pdCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogIm5hdGl2ZV9oYW5kbGVfc2V0X2Zkc2FuX3RhZyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogIm5hdGl2ZV9oYW5kbGVfdW5zZXRfZmRzYW5fdGFnIgorICB9LAorICB7CisgICAibmFtZSIgOiAicGFydGl0aW9uX3dpcGVkIgorICB9LAorICB7CisgICAibmFtZSIgOiAicHJvcGVydHlfZ2V0IgorICB9LAorICB7CisgICAibmFtZSIgOiAicHJvcGVydHlfZ2V0X2Jvb2wiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJwcm9wZXJ0eV9nZXRfaW50MzIiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJwcm9wZXJ0eV9nZXRfaW50NjQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJwcm9wZXJ0eV9saXN0IgorICB9LAorICB7CisgICAibmFtZSIgOiAicHJvcGVydHlfc2V0IgorICB9LAorICB7CisgICAibmFtZSIgOiAicmVjb3JkX3N0cmVhbV9mcmVlIgorICB9LAorICB7CisgICAibmFtZSIgOiAicmVjb3JkX3N0cmVhbV9nZXRfbmV4dCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInJlY29yZF9zdHJlYW1fbmV3IgorICB9LAorICB7CisgICAibmFtZSIgOiAic29ja2V0X2Nsb3NlIgorICB9LAorICB7CisgICAibmFtZSIgOiAic29ja2V0X2dldF9sb2NhbF9wb3J0IgorICB9LAorICB7CisgICAibmFtZSIgOiAic29ja2V0X2luYWRkcl9hbnlfc2VydmVyIgorICB9LAorICB7CisgICAibmFtZSIgOiAic29ja2V0X2xvY2FsX2NsaWVudCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInNvY2tldF9sb2NhbF9jbGllbnRfY29ubmVjdCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInNvY2tldF9sb2NhbF9zZXJ2ZXIiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzb2NrZXRfbG9jYWxfc2VydmVyX2JpbmQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzb2NrZXRfbmV0d29ya19jbGllbnQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzb2NrZXRfbmV0d29ya19jbGllbnRfdGltZW91dCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInNvY2tldF9zZW5kX2J1ZmZlcnMiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfYWRkX2Zsb2F0IgorICB9LAorICB7CisgICAibmFtZSIgOiAic3RyX3Bhcm1zX2FkZF9pbnQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfYWRkX3N0ciIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInN0cl9wYXJtc19jcmVhdGUiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfY3JlYXRlX3N0ciIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInN0cl9wYXJtc19kZWwiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfZGVzdHJveSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInN0cl9wYXJtc19kdW1wIgorICB9LAorICB7CisgICAibmFtZSIgOiAic3RyX3Bhcm1zX2dldF9mbG9hdCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInN0cl9wYXJtc19nZXRfaW50IgorICB9LAorICB7CisgICAibmFtZSIgOiAic3RyX3Bhcm1zX2dldF9zdHIiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfaGFzX2tleSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInN0cl9wYXJtc190b19zdHIiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJ1ZXZlbnRfYmluZCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInVldmVudF9jcmVhdGVfc29ja2V0IgorICB9LAorICB7CisgICAibmFtZSIgOiAidWV2ZW50X2tlcm5lbF9tdWx0aWNhc3RfcmVjdiIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInVldmVudF9rZXJuZWxfbXVsdGljYXN0X3VpZF9yZWN2IgorICB9LAorICB7CisgICAibmFtZSIgOiAidWV2ZW50X2tlcm5lbF9yZWN2IgorICB9LAorICB7CisgICAibmFtZSIgOiAidWV2ZW50X29wZW5fc29ja2V0IgorICB9CisgXSwKKyAiZWxmX29iamVjdHMiIDoKKyBbCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2VfZW5hYmxlZF90YWdzIgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2lzX3JlYWR5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX21hcmtlcl9mZCIKKyAgfQorIF0sCisgImVudW1fdHlwZXMiIDoKKyBbCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKKyAgICJlbnVtX2ZpZWxkcyIgOgorICAgWworICAgIHsKKyAgICAgImVudW1fZmllbGRfdmFsdWUiIDogMCwKKyAgICAgIm5hbWUiIDogIklvU2NoZWRDbGFzc19OT05FIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAxLAorICAgICAibmFtZSIgOiAiSW9TY2hlZENsYXNzX1JUIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAyLAorICAgICAibmFtZSIgOiAiSW9TY2hlZENsYXNzX0JFIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAzLAorICAgICAibmFtZSIgOiAiSW9TY2hlZENsYXNzX0lETEUiCisgICAgfQorICAgXSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSTEySW9TY2hlZENsYXNzIiwKKyAgICJuYW1lIiA6ICJJb1NjaGVkQ2xhc3MiLAorICAgInNpemUiIDogNCwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2lvc2NoZWRfcG9saWN5LmgiLAorICAgInVuZGVybHlpbmdfdHlwZSIgOiAiX1pUSWoiCisgIH0KKyBdLAorICJmdW5jdGlvbl90eXBlcyIgOgorIFsKKyAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJRmJQdlNfRSIsCisgICAibmFtZSIgOiAiYm9vbCAodm9pZCAqLCB2b2lkICopIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJYiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSUZiUHZTX1NfRSIsCisgICAibmFtZSIgOiAiYm9vbCAodm9pZCAqLCB2b2lkICosIHZvaWQgKikiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWIiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElGaVB2RSIsCisgICAibmFtZSIgOiAiaW50ICh2b2lkICopIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElGdlBLY1MwX1B2RSIsCisgICAibmFtZSIgOiAidm9pZCAoY29uc3QgY2hhciAqLCBjb25zdCBjaGFyICosIHZvaWQgKikiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9wcm9wZXJ0aWVzLmgiCisgIH0KKyBdLAorICJmdW5jdGlvbnMiIDoKKyBbCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJhbmRyb2lkX2dldF9jb250cm9sX2ZpbGUiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhbmRyb2lkX2dldF9jb250cm9sX2ZpbGUiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvYW5kcm9pZF9nZXRfY29udHJvbF9maWxlLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJhbmRyb2lkX2dldF9jb250cm9sX3NvY2tldCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImFuZHJvaWRfZ2V0X2NvbnRyb2xfc29ja2V0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3NvY2tldHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImFuZHJvaWRfZ2V0X2lvcHJpbyIsCisgICAibGlua2VyX3NldF9rZXkiIDogImFuZHJvaWRfZ2V0X2lvcHJpbyIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQMTJJb1NjaGVkQ2xhc3MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmN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3JlYXRlX3JlZ2lvbiIsCisgICAibGlua2VyX3NldF9rZXkiIDogImFzaG1lbV9jcmVhdGVfcmVnaW9uIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJbSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9hc2htZW0uaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImFzaG1lbV9nZXRfc2l6ZV9yZWdpb24iLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhc2htZW1fZ2V0X3NpemVfcmVnaW9uIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9hc2htZW0uaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImFzaG1lbV9waW5fcmVnaW9uIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiYXNobWVtX3Bpbl9yZWdpb24iLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJbSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSW0iCisgICAgfQorICAgXSwKKyAgICJyZX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mFsaWQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhc2htZW1fdmFsaWQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2FzaG1lbS5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiYXRyYWNlX2FzeW5jX2JlZ2luX2JvZHkiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhdHJhY2VfYXN5bmNfYmVnaW5fYm9keSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvdHJhY2UuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImF0cmFjZV9hc3luY19lbmRfYm9keSIsCisgICAibGlua2VyX3NldF9rZXkiIDogImF0cmFjZV9hc3luY19lbmRfYm9keSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvdHJhY2UuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImF0cmFjZV9hc3luY19mb3JfdHJhY2tfYmVnaW5fYm9keSIsCisgICAibGlua2VyX3NldF9rZXkiIDogImF0cmFjZV9hc3luY19mb3JfdHJhY2tfYmVnaW5fYm9keSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvdHJhY2UuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImF0cmFjZV9hc3luY19mb3JfdHJhY2tfZW5kX2JvZHkiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhdHJhY2VfYXN5bmNfZm9yX3RyYWNrX2VuZF9ib2R5IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy90cmFjZS5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiYXRyYW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lvbl9uYW1lIiA6ICJhdHJhY2VfaW5zdGFudF9ib2R5IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiYXRyYWNlX2luc3RhbnRfYm9keSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy90cmFjZS5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiYXRyYWNlX2luc3RhbnRfZm9yX3RyYWNrX2JvZHkiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhdHJhY2VfaW5zdGFudF9mb3JfdHJhY2tfYm9keSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy90cmFjZS5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiYXRyYWNlX2ludDY0X2JvZHkiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhdHJhY2VfaW50NjRfYm9keSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWwiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHl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mdW5jdGlvbl9uYW1lIiA6ICJjb25maWdfYm9vbCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImNvbmZpZ19ib29sIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDVjbm9kZSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJjb25maWdfZmluZCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImNvbmZpZ19maW5kIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDVjbm9kZSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJUDVjbm9kZSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9jb25maWdfdXRpbHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImNvbmZpZ19mcmVlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiY29uZmlnX2ZyZWUiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQNWNub2RlIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2NvbmZpZ191dGlscy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiY29uZmlnX2xvYWQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJjb25maWdfbG9hZCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9jb25maWdfdXRpbHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImNvbmZpZ19sb2FkX2ZpbGUiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJjb25maWdfbG9hZF9maWxlIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDVjbm9kZSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9jb25maWdfdXRpbHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImNvbmZpZ19ub2RlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiY29uZmlnX25vZGUiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSVA1Y25vZGUiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJjb25maWdfc2V0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiY29uZmlnX3NldCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJjb25maWdfc3RyIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiY29uZmlnX3N0ciIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSVBLYyIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9jb25maWdfdXRpbHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImZzX2NvbmZpZyIsCisgICAibGlua2VyX3NldF9rZXkiIDogImZzX2NvbmZpZyIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQaiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQbSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL3ByaXZhdGUvZnNfY29uZmlnLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJmc19ta2RpcnMiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJmc19ta2RpcnMiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2ZzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJmc19wcmVwYXJlX2RpciIsCisgICAibGlua2VyX3NldF9rZXkiIDogImZzX3ByZXBhcmVfZGlyIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2ZzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJmc19wcmVwYXJlX2Rpcl9zdHJpY3QiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJmc19wcmVwYXJlX2Rpcl9zdHJpY3QiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvZnMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImZzX3ByZXBhcmVfZmlsZV9zdHJpY3QiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJmc19wcmVwYXJlX2ZpbGVfc3RyaWN0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2ZzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJmc19yZWFkX2F0b21pY19pbnQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJmc19yZWFkX2F0b21pY19pbnQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9mcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiZnNfd3JpdGVfYXRvbWljX2ludCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImZzX3dyaXRlX2F0b21pY19pbnQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2ZzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJnZXRfZnNfY29uZmlnIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiZ2V0X2ZzX2NvbmZpZyIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWIiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQOWZzX2NvbmZpZyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJYiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL3ByaXZhdGUvZnNfY29uZmlnLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJoYXNobWFwQ3JlYXRlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiaGFzaG1hcENyZWF0ZSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSW0iCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQRmlQdkUiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQRmJQdlNfRSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJUDdIYXNobWFwIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2hhc2htYXAuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImhhc2htYXBGb3JFYWNoIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiaGFzaG1hcEZvckVhY2giLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQN0hhc2htYXAiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQRmJQdlNfU19FIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiaGFzaG1hcEZyZWUiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJoYXNobWFwRnJlZSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA3SGFzaG1hcCIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJoYXNobWFwR2V0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiaGFzaG1hcEdldCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA3SGFzaG1hcCIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElQdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJoYXNobWFwSGFzaCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImhhc2htYXBIYXNoIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEltIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2hhc2htYXAuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImhhc2htYXBMb2NrIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiaGFzaG1hcExvY2siLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQN0hhc2htYXAiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiaGFzaG1hcFB1dCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImhhc2htYXBQdXQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQN0hhc2htYXAiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElQdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJoYXNobWFwUmVtb3ZlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiaGFzaG1hcFJlbW92ZSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA3SGFzaG1hcCIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElQdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJoYXNobWFwVW5sb2NrIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiaGFzaG1hcFVubG9jayIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA3SGFzaG1hcCIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJrbG9nX3NldF9sZXZlbCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImtsb2dfc2V0X2xldmVsIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9rbG9nLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJrbG9nX3dyaXRlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAia2xvZ193cml0ZSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5f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isgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElqIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL211bHRpdXNlci5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAibXVsdGl1c2VyX2dldF9zZGtfc2FuZGJveF91aWQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJtdWx0aXVzZXJfZ2V0X3Nka19zYW5kYm94X3VpZCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElqIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL211bHRpdXNlci5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAibXVsdGl1c2VyX2dldF9zaGFyZWRfYXBwX2dpZCIsCisgICAibGlua2VyX3NldF9rZXkiIDogIm11bHRpdXNlcl9nZXRfc2hhcmVkX2FwcF9naWQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElqIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL211bHRpdXNlci5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAibXVsd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VfaGFuZGxlX3Vuc2V0X2Zkc2FuX3RhZyIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLMTNuYXRpdmVfaGFuZGxlIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL25hdGl2ZV9oYW5kbGUuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInBhcnRpdGlvbl93aXBlZCIsCisgICAibGlua2VyX3NldF9rZXkiIDogInBhcnRpdGlvbl93aXBlZCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9wYXJ0aXRpb25fdXRpbHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInByb3BlcnR5X2dldCIsCisgICAibGlua2VyX3NldF9rZXkiIDogInByb3BlcnR5X2dldCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3Byb3BlcnRpZXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInByb3BlcnR5X2dldF9ib29sIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAicHJvcGVydHlfZ2V0X2Jvb2wiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElhIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElhIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3Byb3BlcnRpZXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInByb3BlcnR5X2dldF9pbnQzMiIsCisgICAibGlua2VyX3NldF9rZXkiIDogInByb3BlcnR5X2dldF9pbnQzMiIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvcHJvcGVydGllcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAicHJvcGVydHlfZ2V0X2ludDY0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAicHJvcGVydHlfZ2V0X2ludDY0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJbCIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJbCIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9wcm9wZXJ0aWVzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJwcm9wZXJ0eV9saXN0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAicHJvcGVydHlfbGlzdCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBGdlBLY1MwX1B2RSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3Byb3BlcnRpZXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInByb3BlcnR5X3NldCIsCisgICAibGlua2VyX3NldF9rZXkiIDogInByb3BlcnR5X3NldCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9wcm9wZXJ0aWVzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlv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VyIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc29ja2V0cy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic29ja2V0X2xvY2FsX2NsaWVudCIsCisgICAibGlua2VyX3NldF9rZXkiIDogInNvY2tldF9sb2NhbF9jbGllbnQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zb2NrZXRzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJzb2NrZXRfbG9jYWxfY2xpZW50X2Nvbm5lY3QiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzb2NrZXRfbG9jYWxfY2xpZW50X2Nvbm5lY3QiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc29ja2V0cy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic29ja2V0X2xvY2FsX3NlcnZlciIsCisgICAibGlua2VyX3NldF9rZXkiIDogInNvY2tldF9sb2NhbF9zZXJ2ZXIiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zb2NrZXRzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJzb2NrZXRfbG9jYWxfc2VydmVyX2JpbmQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzb2NrZXRfbG9jYWxfc2VydmVyX2JpbmQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zb2NrZXRzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJzb2NrZXRfbmV0d29ya19jbGllbnQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzb2NrZXRfbmV0d29ya19jbGllbnQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zb2NrZXRzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJzb2NrZXRfbmV0d29ya19jbGllbnRfdGltZW91dCIsCisgICAibGlua2VyX3NldF9rZXkiIDogInNvY2tldF9uZXR3b3JrX2NsaWVudF90aW1lb3V0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc29ja2V0cy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic29ja2V0X3NlbmRfYnVmZmVycyIsCisgICAibGlua2VyX3NldF9rZXkiIDogInNvY2tldF9zZW5kX2J1ZmZlcnMiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEsyMmN1dGlsc19zb2NrZXRfYnVmZmVyX3QiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEltIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElsIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3NvY2tldHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInN0cl9wYXJtc19hZGRfZmxvYXQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzdHJfcGFybXNfYWRkX2Zsb2F0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDlzdHJfcGFybXMiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElmIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3N0cl9wYXJtcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic3RyX3Bhcm1zX2FkZF9pbnQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzdHJfcGFybXNfYWRkX2ludCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA5c3RyX3Bhcm1zIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zdHJfcGFybXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInN0cl9wYXJtc19hZGRfc3RyIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAic3RyX3Bhcm1zX2FkZF9zdHIiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQOXN0cl9wYXJtcyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zdHJfcGFybXMua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fdHlwZSIgOiAiX1pUSVBmIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3N0cl9wYXJtcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic3RyX3Bhcm1zX2dldF9pbnQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzdHJfcGFybXNfZ2V0X2ludCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA5c3RyX3Bhcm1zIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc3RyX3Bhcm1zLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJzdHJfcGFybXNfZ2V0X3N0ciIsCisgICAibGlua2VyX3NldF9rZXkiIDogInN0cl9wYXJtc19nZXRfc3RyIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDlzdHJfcGFybXMiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCis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MiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3VldmVudC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAidWV2ZW50X2NyZWF0ZV9zb2NrZXQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJ1ZXZlbnRfY3JlYXRlX3NvY2tldCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEliIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3VldmVudC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAidWV2ZW50X2tlcm5lbF9tdWx0aWNhc3RfcmVjdiIsCisgICAibGlua2VyX3NldF9rZXkiIDogInVldmVudF9rZXJuZWxfbXVsdGljYXN0X3JlY3YiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEltIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElsIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3VldmVudC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAidWV2ZW50X2tlcm5lbF9tdWx0aWNhc3RfdWlkX3JlY3YiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJ1ZXZlbnRfa2VybmVsX211bHRpY2FzdF91aWRfcmVjdiIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSW0iCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJbCIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy91ZXZlbnQuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInVldmVudF9rZXJuZWxfcmVjdiIsCisgICAibGlua2VyX3NldF9rZXkiIDogInVldmVudF9rZXJuZWxfcmVjdiIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSW0iCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEliIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGoiCisgICAgf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F0ZS9mc19jb25maWcuaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA4LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJUDlzdHJfcGFybXMiLAorICAgIm5hbWUiIDogInN0cl9wYXJtcyAqIiwKKyAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEk5c3RyX3Bhcm1zIiwKKyAgICJzaXplIiA6IDgsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zdHJfcGFybXMuaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA4LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJUEZiUHZTX0UiLAorICAgIm5hbWUiIDogImJvb2wgKCopKHZvaWQgKiwgdm9pZCAqKSIsCisgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJRmJQdlNfRSIsCisgICAic2l6ZSIgOiA4LAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDgsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElQRmJQdlNfU19FIiwKKyAgICJuYW1lIiA6ICJib29sICgqKSh2b2lkICosIHZvaWQgKiwgdm9pZCAqKSIsCisgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJRmJQdlNfU19FIiwKKyAgICJzaXplIiA6IDgsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogOCwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSVBGaVB2RSIsCisgICAibmFtZSIgOiAiaW50ICgqKSh2b2lkICopIiwKKyAgICJyZWZlcmVuY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A6ICJfWlRJUHYiLAorICAgInNpemUiIDogOCwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3JlY29yZF9zdHJlYW0uaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA4LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJUGMiLAorICAgIm5hbWUiIDogImNoYXIgKiIsCisgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJYyIsCisgICAic2l6ZSIgOiA4LAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogOCwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSVBmIiwKKyAgICJuYW1lIiA6ICJmbG9hdCAqIiwKKyAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElmIiwKKyAgICJzaXplIiA6IDgsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zdHJfcGFybXMuaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA4LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJUGkiLAorICAgIm5hbWUiIDogImludCAqIiwKKyAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIiwKKyAgICJzaXplIiA6IDgsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9pb3NjaGVkX3BvbGljeS5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDgsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElQaiIsCisgICAibmFtZSIgOiAidW5zaWduZWQgaW50ICoiLAorICAgInJlZmVyZW5jZWRfd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mFtZSIgOiAiY29uc3Qgdm9pZCIsCisgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zb2NrZXRzLmgiCisgIH0KKyBdLAorICJyZWNvcmRfdHlwZXMiIDoKKyBbCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKKyAgICJmaWVsZHMiIDoKKyAgIFsKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJ2ZXJzaW9uIiwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJudW1GZHMiLAorICAgICAiZmllbGRfb2Zmc2V0IiA6IDMyLAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogIm51bUludHMiLAorICAgICAiZmllbGRfb2Zmc2V0IiA6IDY0LAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogImRhdGEiLAorICAgICAiZmllbGRfb2Zmc2V0IiA6IDk2LAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJQTBfaSIKKyAgICB9CisgICBdLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJMTNuYXRpdmVfaGFuZGxlIiwKKyAgICJuYW1lIiA6ICJuYXRpdmVfaGFuZGxlIiwKKyAgICJzaXplIiA6IDEyLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvbmF0aXZlX2hhbmRsZS5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDgsCisgICAiZmllbGRzIiA6CisgICBbCisgICAgeworICAgICAiZmllbGRfbmFtZSIgOiAiZGF0YSIsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS3YiCisgICAgfSwKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJsZW5ndGgiLAorICAgICAiZmllbGRfb2Zmc2V0IiA6IDY0LAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJbSIKKyAgICB9CisgICBdLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJMjJjdXRpbHNfc29ja2V0X2J1ZmZlcl90IiwKKyAgICJuYW1lIiA6ICJjdXRpbHNfc29ja2V0X2J1ZmZlcl90IiwKKyAgICJzaXplIiA6IDE2LAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc29ja2V0cy5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDgsCisgICAiZmllbGRzIiA6CisgICBbCisgICAgeworICAgICAiZmllbGRfbmFtZSIgOiAibmV4dCIsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQNWNub2RlIgorICAgIH0sCisgICAgeworICAgICAiZmllbGRfbmFtZSIgOiAiZmlyc3RfY2hpbGQiLAorICAgICAiZmllbGRfb2Zmc2V0IiA6IDY0LAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDVjbm9kZSIKKyAgICB9LAorICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogImxhc3RfY2hpbGQiLAorICAgICAiZmllbGRfb2Zmc2V0IiA6IDEyOCwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJuYW1lIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiAxOTIsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJ2YWx1ZSIsCisgICAgICJmaWVsZF9vZmZzZXQiIDogMjU2LAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEk1Y25vZGUiLAorICAgIm5hbWUiIDogImNub2RlIiwKKyAgICJzaXplIiA6IDQwLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogOCwKKyAgICJmaWVsZHMiIDoKKyAgIFsKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJ1aWQiLAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9LAorICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogImdpZCIsCisgICAgICJmaWVsZF9vZmZzZXQiIDogMzIsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAiZmllbGRfbmFtZSIgOiAibW9kZSIsCisgICAgICJmaWVsZF9vZmZzZXQiIDogNjQsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAiZmllbGRfbmFtZSIgOiAiY2FwYWJpbGl0aWVzIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiAxMjgsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEltIgorICAgIH0KKyAgIF0sCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEk5ZnNfY29uZmlnIiwKKyAgICJuYW1lIiA6ICJmc19jb25maWciLAorICAgInNpemUiIDogMjQsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL3ByaXZhdGUvZnN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SWIiLAorICAgIm5hbWUiIDogImJvb2wiLAorICAgInNpemUiIDogMQorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDEsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJpc191bnNpZ25lZCIgOiB0cnVlLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJYyIsCisgICAibmFtZSIgOiAiY2hhciIsCisgICAic2l6ZSIgOiAxCisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSWYiLAorICAgIm5hbWUiIDogImZsb2F0IiwKKyAgICJzaXplIiA6IDQKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiAxLAorICAgImlzX2ludGVncmFsIiA6IHRydWUsCisgICAiaXNfdW5zaWduZWQiIDogdHJ1ZSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSWgiLAorICAgIm5hbWUiIDogInVuc2lnbmVkIGNoYXIiLAorICAgInNpemUiIDogMQorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSWkiLAorICAgIm5hbWUiIDogImludCIsCisgICAic2l6ZSIgOiA0CisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKKyAgICJpc19pbnRlZ3JhbCIgOiB0cnVlLAorICAgImlzX3Vuc2lnbmVkIiA6IHRydWUsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElqIiwKKyAgICJuYW1lIiA6ICJ1bnNpZ25lZCBpbnQiLAorICAgInNpemUiIDogNAorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSWwiLAorICAgIm5hbWUiIDogImxvbmciLAorICAgInNpemUiIDogNAorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJpc191bnNpZ25lZCIgOiB0cnVlLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJbSIsCisgICAibmFtZSIgOiAidW5zaWduZWQgbG9uZyIsCisgICAic2l6ZSIgOiA0CisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogMiwKKyAgICJpc19pbnRlZ3JhbCIgOiB0cnVlLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJcyIsCisgICAibmFtZSIgOiAic2hvcnQiLAorICAgInNpemUiIDogMgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDIsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJpc191bnNpZ25lZCIgOiB0cnVlLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJdCIsCisgICAibmFtZSIgOiAidW5zaWduZWQgc2hvcnQiLAorICAgInNpemUiIDogMgorICB9LAorICB7CisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEl2IiwKKyAgICJuYW1lIiA6ICJ2b2lkIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDgsCisgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSXgiLAorICAgIm5hbWUiIDogImxvbmcgbG9uZyIsCisgICAic2l6ZSIgOiA4CisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogOCwKKyAgICJpc19pbnRlZ3JhbCIgOiB0cnVlLAorICAgImlzX3Vuc2lnbmVkIiA6IHRydWUsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEl5IiwKKyAgICJuYW1lIiA6ICJ1bnNpZ25lZCBsb25nIGxvbmciLAorICAgInNpemUiIDogOAorICB9CisgXSwKKyAiZWxmX2Z1bmN0aW9ucyIgOgorIFsKKyAgeworICAgIm5hbWUiIDogIl9aMjNzb2NrZXRfbWFrZV9zb2NrYWRkcl91blBLY2lQMTFzb2NrYWRkcl91blBpIgorICB9LAorICB7CisgICAiYmluZGluZyIgOiAid2VhayIsCisgICAibmFtZSIgOiAiX1pON2FuZHJvaWQ0YmFzZTRUcmltSVJOU3QzX18xMTJiYXNpY19zdHJpbmdJY05TMl8xMWNoYXJfdHJhaXRzSWNFRU5TMl85YWxsb2NhdG9ySWNFRUVFRUVTOF9PVF8iCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhbmRyb2lkX2dldF9jb250cm9sX2ZpbGUiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhbmRyb2lkX2dldF9jb250cm9sX3NvY2tldCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImFuZHJvaWRfZ2V0X2lvcHJpbyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImFuZHJvaWRfcmVib290IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYW5kcm9pZF9zZXRfaW9wcmlvIgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXNobWVtX2NyZWF0ZV9yZWdpb24iCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhc2htZW1fZ2V0X3NpemVfcmVnaW9uIgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXNobWVtX3Bpbl9yZWdpb24iCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhc2htZW1fc2V0X3Byb3RfcmVnaW9uIgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXNobWVtX3VucGluX3JlZ2lvbiIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImFzaG1lbV92YWxpZCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9hc3luY19iZWdpbl9ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2FzeW5jX2VuZF9ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2FzeW5jX2Zvcl90cmFja19iZWdpbl9ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2FzeW5jX2Zvcl90cmFja19lbmRfYm9keSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9iZWdpbl9ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2VuZF9ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2dldF9lbmFibGVkX3RhZ3MiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2VfaW5pdCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9pbnN0YW50X2JvZHkiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2VfaW5zdGFudF9mb3JfdHJhY2tfYm9keSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9pbnQ2NF9ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2ludF9ib2R5IgorICB9LAorICB7CisgICAibmFtZSIgOiAiYXRyYWNlX3NldF90cmFjaW5nX2VuYWJsZWQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2Vfc2V0dXAiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJhdHJhY2VfdXBkYXRlX3RhZ3MiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJjYW5uZWRfZnNfY29uZmlnIgorICB9LAorICB7CisgICAibmFtZSIgOiAiY29uZmlnX2Jvb2wiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJjb25maWdfZmluZCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImNvbmZpZ19mcmVlIgorICB9LAorICB7CisgICAibmFtZSIgOiAiY29uZmlnX2xvYWQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJjb25maWdfbG9hZF9maWxlIgorICB9LAorICB7CisgICAibmFtZSIgOiAiY29uZmlnX25vZGUiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJjb25maWdfc2V0IgorICB9LAorICB7CisgICAibmFtZSIgOiAiY29uZmlnX3N0ciIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImZzX2NvbmZpZyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImZzX21rZGlycyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImZzX3ByZXBhcmVfZGlyIgorICB9LAorICB7CisgICAibmFtZSIgOiAiZnNfcHJlcGFyZV9kaXJfc3RyaWN0IgorICB9LAorICB7CisgICAibmFtZSIgOiAiZnNfcHJlcGFyZV9maWxlX3N0cmljdCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImZzX3JlYWRfYXRvbWljX2ludCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImZzX3dyaXRlX2F0b21pY19pbnQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJnZXRfZnNfY29uZmlnIgorICB9LAorICB7CisgICAibmFtZSIgOiAiaGFzaG1hcENyZWF0ZSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImhhc2htYXBGb3JFYWNoIgorICB9LAorICB7CisgICAibmFtZSIgOiAiaGFzaG1hcEZyZWUiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJoYXNobWFwR2V0IgorICB9LAorICB7CisgICAibmFtZSIgOiAiaGFzaG1hcEhhc2giCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJoYXNobWFwTG9jayIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImhhc2htYXBQdXQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJoYXNobWFwUmVtb3ZlIgorICB9LAorICB7CisgICAibmFtZSIgOiAiaGFzaG1hcFVubG9jayIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImtsb2dfc2V0X2xldmVsIgorICB9LAorICB7CisgICAibmFtZSIgOiAia2xvZ193cml0ZSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImtsb2df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2hhbmRsZV9kZWxldGUiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJuYXRpdmVfaGFuZGxlX2luaXQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJuYXRpdmVfaGFuZGxlX3NldF9mZHNhbl90YWciCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJuYXRpdmVfaGFuZGxlX3Vuc2V0X2Zkc2FuX3RhZyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInBhcnRpdGlvbl93aXBlZCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInByb3BlcnR5X2dldCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInByb3BlcnR5X2dldF9ib29sIgorICB9LAorICB7CisgICAibmFtZSIgOiAicHJvcGVydHlfZ2V0X2ludDMyIgorICB9LAorICB7CisgICAibmFtZSIgOiAicHJvcGVydHlfZ2V0X2ludDY0IgorICB9LAorICB7CisgICAibmFtZSIgOiAicHJvcGVydHlfbGlzdCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInByb3BlcnR5X3NldCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInJlY29yZF9zdHJlYW1fZnJlZSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInJlY29yZF9zdHJlYW1fZ2V0X25leHQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJyZWNvcmRfc3RyZWFtX25ldyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInNvY2tldF9jbG9zZSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInNvY2tldF9nZXRfbG9jYWxfcG9ydCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInNvY2tldF9pbmFkZHJfYW55X3NlcnZlciIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInNvY2tldF9sb2NhbF9jbGllbnQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzb2NrZXRfbG9jYWxfY2xpZW50X2Nvbm5lY3QiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzb2NrZXRfbG9jYWxfc2VydmVyIgorICB9LAorICB7CisgICAibmFtZSIgOiAic29ja2V0X2xvY2FsX3NlcnZlcl9iaW5kIgorICB9LAorICB7CisgICAibmFtZSIgOiAic29ja2V0X25ldHdvcmtfY2xpZW50IgorICB9LAorICB7CisgICAibmFtZSIgOiAic29ja2V0X25ldHdvcmtfY2xpZW50X3RpbWVvdXQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzb2NrZXRfc2VuZF9idWZmZXJzIgorICB9LAorICB7CisgICAibmFtZSIgOiAic3RyX3Bhcm1zX2FkZF9mbG9hdCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInN0cl9wYXJtc19hZGRfaW50IgorICB9LAorICB7CisgICAibmFtZSIgOiAic3RyX3Bhcm1zX2FkZF9zdHIiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfY3JlYXRlIgorICB9LAorICB7CisgICAibmFtZSIgOiAic3RyX3Bhcm1zX2NyZWF0ZV9zdHIiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfZGVsIgorICB9LAorICB7CisgICAibmFtZSIgOiAic3RyX3Bhcm1zX2Rlc3Ryb3kiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfZHVtcCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInN0cl9wYXJtc19nZXRfZmxvYXQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfZ2V0X2ludCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInN0cl9wYXJtc19nZXRfc3RyIgorICB9LAorICB7CisgICAibmFtZSIgOiAic3RyX3Bhcm1zX2hhc19rZXkiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJzdHJfcGFybXNfdG9fc3RyIgorICB9LAorICB7CisgICAibmFtZSIgOiAidWV2ZW50X2JpbmQiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJ1ZXZlbnRfY3JlYXRlX3NvY2tldCIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInVldmVudF9rZXJuZWxfbXVsdGljYXN0X3JlY3YiCisgIH0sCisgIHsKKyAgICJuYW1lIiA6ICJ1ZXZlbnRfa2VybmVsX211bHRpY2FzdF91aWRfcmVjdiIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInVldmVudF9rZXJuZWxfcmVjdiIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogInVldmVudF9vcGVuX3NvY2tldCIKKyAgfQorIF0sCisgImVsZl9vYmplY3RzIiA6CisgWworICB7CisgICAibmFtZSIgOiAiYXRyYWNlX2VuYWJsZWRfdGFncyIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9pc19yZWFkeSIKKyAgfSwKKyAgeworICAgIm5hbWUiIDogImF0cmFjZV9tYXJrZXJfZmQiCisgIH0KKyBdLAorICJlbnVtX3R5cGVzIiA6CisgWworICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAiZW51bV9maWVsZHMiIDoKKyAgIFsKKyAgICB7CisgICAgICJlbnVtX2ZpZWxkX3ZhbHVlIiA6IDAsCisgICAgICJuYW1lIiA6ICJJb1NjaGVkQ2xhc3NfTk9ORSIKKyAgICB9LAorICAgIHsKKyAgICAgImVudW1fZmllbGRfdmFsdWUiIDogMSwKKyAgICAgIm5hbWUiIDogIklvU2NoZWRDbGFzc19SVCIKKyAgICB9LAorICAgIHsKKyAgICAgImVudW1fZmllbGRfdmFsdWUiIDogMiwKKyAgICAgIm5hbWUiIDogIklvU2NoZWRDbGFzc19CRSIKKyAgICB9LAorICAgIHsKKyAgICAgImVudW1fZmllbGRfdmFsdWUiIDogMywKKyAgICAgIm5hbWUiIDogIklvU2NoZWRDbGFzc19JRExFIgorICAgIH0KKyAgIF0sCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEkxMklvU2NoZWRDbGFzcyIsCisgICAibmFtZSIgOiAiSW9TY2hlZENsYXNzIiwKKyAgICJzaXplIiA6IDQsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9pb3NjaGVkX3BvbGljeS5oIiwKKyAgICJ1bmRlcmx5aW5nX3R5cGUiIDogIl9aVElqIgorICB9CisgXSwKKyAiZnVuY3Rpb25fdHlwZXMiIDoKKyBbCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSUZiUHZTX0UiLAorICAgIm5hbWUiIDogImJvb2wgKHZvaWQgKiwgdm9pZCAqKSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWIiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElGYlB2U19TX0UiLAorICAgIm5hbWUiIDogImJvb2wgKHZvaWQgKiwgdm9pZCAqLCB2b2lkICopIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEliIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2hhc2htYXAuaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJRmlQdkUiLAorICAgIm5hbWUiIDogImludCAodm9pZCAqKSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2hhc2htYXAuaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJRnZQS2NTMF9QdkUiLAorICAgIm5hbWUiIDogInZvaWQgKGNvbnN0IGNoYXIgKiwgY29uc3QgY2hhciAqLCB2b2lkICopIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvcHJvcGVydGllcy5oIgorICB9CisgXSwKKyAiZnVuY3Rpb25zIiA6CisgWworICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiYW5kcm9pZF9nZXRfY29udHJvbF9maWxlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiYW5kcm9pZF9nZXRfY29udHJvbF9maWxlIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2FuZHJvaWRfZ2V0X2NvbnRyb2xfZmlsZS5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiYW5kcm9pZF9nZXRfY29udHJvbF9zb2NrZXQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhbmRyb2lkX2dldF9jb250cm9sX3NvY2tldCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zb2NrZXRzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJhbmRyb2lkX2dldF9pb3ByaW8iLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhbmRyb2lkX2dldF9pb3ByaW8iLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDEySW9TY2hlZENsYXNzIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaW9zY2hlZF9wb2xpY3kuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImFuZHJvaWRfcmVib290IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiYW5kcm9pZF9yZWJvb3QiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9hbmRyb2lkX3JlYm9vdC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiYW5kcm9pZF9zZXRfaW9wcmlvIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiYW5kcm9pZF9zZXRfaW9wcmlvIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSTEySW9TY2hlZENsYXNzIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9pb3NjaGVkX3BvbGljeS5oIgorICB9LAorICB7CisgICA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WZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2FzaG1lbS5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiYXNobWVtX3NldF9wcm90X3JlZ2lvbiIsCisgICAibGlua2VyX3NldF9rZXkiIDogImFzaG1lbV9zZXRfcHJvdF9yZWdpb24iLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9hc2htZW0uaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImFzaG1lbV91bnBpbl9yZWdpb24iLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJhc2htZW1fdW5waW5fcmVnaW9uIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2FzaG1lbS5oIgorICB9LA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IgOiAiYXRyYWNlX3NldHVwIiwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvdHJhY2UuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImF0cmFjZV91cGRhdGVfdGFncyIsCisgICAibGlua2VyX3NldF9rZXkiIDogImF0cmFjZV91cGRhdGVfdGFncyIsCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3RyYWNlLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJjYW5uZWRfZnNfY29uZmlnIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiY2FubmVkX2ZzX2NvbmZpZyIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQaiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQeSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL3ByaXZhdGUvY2FubmVkX2ZzX2NvbmZpZy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiY29uZmlnX2Jvb2wiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJjb25maWdfYm9vbCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2NvbmZpZ191dGlscy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiY29uZmlnX2ZpbmQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJjb25maWdfZmluZCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSVA1Y25vZGUiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJjb25maWdfZnJlZSIsCisgICAibGlua2VyX3NldF9rZXkiIDogImNvbmZpZ19mcmVlIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDVjbm9kZSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9jb25maWdfdXRpbHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImNvbmZpZ19sb2FkIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiY29uZmlnX2xvYWQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQNWNub2RlIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGMiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJjb25maWdfbG9hZF9maWxlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiY29uZmlnX2xvYWRfZmlsZSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJjb25maWdfbm9kZSIsCisgICAibGlua2VyX3NldF9rZXkiIDogImNvbmZpZ19ub2RlIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElQNWNub2RlIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2NvbmZpZ191dGlscy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiY29uZmlnX3NldCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImNvbmZpZ19zZXQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQNWNub2RlIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2NvbmZpZ191dGlscy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiY29uZmlnX3N0ciIsCisgICAibGlua2VyX3NldF9rZXkiIDogImNvbmZpZ19zdHIiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQNWNub2RlIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElQS2MiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvY29uZmlnX3V0aWxzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJmc19jb25maWciLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJmc19jb25maWciLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQaiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9wcml2YXRlL2ZzX2NvbmZpZy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiZnNfbWtkaXJzIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiZnNfbWtkaXJzIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJdCIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9mcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiZnNfcHJlcGFyZV9kaXIiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJmc19wcmVwYXJlX2RpciIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSXQiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9mcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiZnNfcHJlcGFyZV9kaXJfc3RyaWN0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiZnNfcHJlcGFyZV9kaXJfc3RyaWN0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJdCIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2ZzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJmc19wcmVwYXJlX2ZpbGVfc3RyaWN0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiZnNfcHJlcGFyZV9maWxlX3N0cmljdCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSXQiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9mcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiZnNfcmVhZF9hdG9taWNfaW50IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiZnNfcmVhZF9hdG9taWNfaW50IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvZnMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImZzX3dyaXRlX2F0b21pY19pbnQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJmc193cml0ZV9hdG9taWNfaW50IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9mcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiZ2V0X2ZzX2NvbmZpZyIsCisgICAibGlua2VyX3NldF9rZXkiIDogImdldF9mc19jb25maWciLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEliIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDlmc19jb25maWciCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWIiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9wcml2YXRlL2ZzX2NvbmZpZy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiaGFzaG1hcENyZWF0ZSIsCisgICAibGlua2VyX3NldF9rZXkiIDogImhhc2htYXBDcmVhdGUiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEZpUHZFIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEZiUHZTX0UiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSVA3SGFzaG1hcCIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJoYXNobWFwRm9yRWFjaCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImhhc2htYXBGb3JFYWNoIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDdIYXNobWFwIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEZiUHZTX1NfRSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2hhc2htYXAuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImhhc2htYXBGcmVlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiaGFzaG1hcEZyZWUiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQN0hhc2htYXAiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiaGFzaG1hcEdldCIsCisgICAibGlua2VyX3NldF9rZXkiIDogImhhc2htYXBHZXQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQN0hhc2htYXAiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJUHYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiaGFzaG1hcEhhc2giLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJoYXNobWFwSGFzaCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9oYXNobWFwLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJoYXNobWFwTG9jayIsCisgICAibGlua2VyX3NldF9rZXkiIDogImhhc2htYXBMb2NrIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDdIYXNobWFwIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2hhc2htYXAuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImhhc2htYXBQdXQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJoYXNobWFwUHV0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDdIYXNobWFwIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJUHYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiaGFzaG1hcFJlbW92ZSIsCisgICAibGlua2VyX3NldF9rZXkiIDogImhhc2htYXBSZW1vdmUiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQN0hhc2htYXAiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQdiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJUHYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAiaGFzaG1hcFVubG9jayIsCisgICAibGlua2VyX3NldF9rZXkiIDogImhhc2htYXBVbmxvY2siLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQN0hhc2htYXAiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvaGFzaG1hcC5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAia2xvZ19zZXRfbGV2ZWwiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJrbG9nX3NldF9sZXZlbCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSXYiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMva2xvZy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAia2xvZ193cml0ZSIsCisgICAibGlua2VyX3NldF9rZXkiIDogImtsb2dfd3JpdGUiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2tsb2cuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImtsb2dfd3JpdGV2IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAia2xvZ193cml0ZXYiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEs1aW92ZWMiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2tsb2cuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogImxvYWRfY2FubmVkX2ZzX2NvbmZpZyIsCisgICAibGlua2VyX3NldF9rZXkiIDogImxvYWRfY2FubmVkX2ZzX2NvbmZpZyIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL3ByaXZhdGUvY2FubmVkX2ZzX2NvbmZpZy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAibG9hZF9maWxlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAibG9hZF9maWxlIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGoiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSVB2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL21pc2MuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogIm11bHRpdXNlcl9jb252ZXJ0X3Nka19zYW5kYm94X3RvX2FwcF91aWQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJtdWx0aXVzZXJfY29udmVydF9zZGtfc2FuZGJveF90b19hcHBfdWlkIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9tdWx0aXVzZXIuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogIm11bHRpdXNlcl9nZXRfYXBwX2lkIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAibXVsdGl1c2VyX2dldF9hcHBfaWQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElqIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL211bHRpdXNlci5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAibXVsdGl1c2Vy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XJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9tdWx0aXVzZXIuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogIm11bHRpdXNlcl9nZXRfc2RrX3NhbmRib3hfdWlkIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAibXVsdGl1c2VyX2dldF9zZGtfc2FuZGJveF91aWQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9tdWx0aXVzZXIuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogIm11bHRpdXNlcl9nZXRfc2hhcmVkX2FwcF9naWQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJtdWx0aXVzZXJfZ2V0X3NoYXJlZF9hcHBfZ2lkIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9tdWx0aXVzZXIuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogIm11bHRpdXNlcl9nZXRfc2hhcmVkX2dpZCIsCisgICAibGlua2VyX3NldF9rZXkiIDogIm11bHRpdXNlcl9nZXRfc2hhcmVkX2dpZCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElqIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL211bHRpdXNlci5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAibXVsdGl1c2VyX2dldF91aWQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJtdWx0aXVzZXJfZ2V0X3VpZCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElqIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL211bHRpdXNlci5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAibXVsdGl1c2VyX2dldF91c2VyX2lkIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAibXVsdGl1c2VyX2dldF91c2VyX2lkIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYm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KKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJwcm9wZXJ0eV9nZXRfYm9vbCIsCisgICAibGlua2VyX3NldF9rZXkiIDogInByb3BlcnR5X2dldF9ib29sIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJYSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJYSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9wcm9wZXJ0aWVzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJwcm9wZXJ0eV9nZXRfaW50MzIiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJwcm9wZXJ0eV9nZXRfaW50MzIiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3Byb3BlcnRpZXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInByb3BlcnR5X2dldF9pbnQ2NCIsCisgICAibGlua2VyX3NldF9rZXkiIDogInByb3BlcnR5X2dldF9pbnQ2NCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZ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AgICJsaW5rZXJfc2V0X2tleSIgOiAicmVjb3JkX3N0cmVhbV9mcmVlIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDEyUmVjb3JkU3RyZWFtIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3JlY29yZF9zdHJlYW0uaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInJlY29yZF9zdHJlYW1fZ2V0X25leHQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJyZWNvcmRfc3RyZWFtX2dldF9uZXh0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDEyUmVjb3JkU3RyZWFtIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUFB2IgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGoiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvcmVjb3JkX3N0cmVhbS5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAicmVjb3JkX3N0cmVhbV9uZXciLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJyZWNvcmRfc3RyZWFtX25ldyIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElQMTJSZWNvcmRTdHJlYW0iLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvcmVjb3JkX3N0cmVhbS5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic29ja2V0X2Nsb3NlIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAic29ja2V0X2Nsb3NlIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zb2NrZXRzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJzb2NrZXRfZ2V0X2xvY2FsX3BvcnQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzb2NrZXRfZ2V0X2xvY2FsX3BvcnQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3NvY2tldHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInNvY2tldF9pbmFkZHJfYW55X3NlcnZlciIsCisgICAibGlua2VyX3NldF9rZXkiIDogInNvY2tldF9pbmFkZHJfYW55X3NlcnZlciIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3NvY2tldHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInNvY2tldF9sb2NhbF9jbGllbnQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzb2NrZXRfbG9jYWxfY2xpZW50IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc29ja2V0cy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic29ja2V0X2xvY2FsX2NsaWVudF9jb25uZWN0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAic29ja2V0X2xvY2FsX2NsaWVudF9jb25uZWN0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOi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AgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc29ja2V0cy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic29ja2V0X25ldHdvcmtfY2xpZW50IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAic29ja2V0X25ldHdvcmtfY2xpZW50IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc29ja2V0cy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic29ja2V0X25ldHdvcmtfY2xpZW50X3RpbWVvdXQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzb2NrZXRfbmV0d29ya19jbGllbnRfdGltZW91dCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3NvY2tldHMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInNvY2tldF9zZW5kX2J1ZmZlcnMiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzb2NrZXRfc2VuZF9idWZmZXJzIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLMjJjdXRpbHNfc29ja2V0X2J1ZmZlcl90IgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zb2NrZXRzLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJzdHJfcGFybXNfYWRkX2Zsb2F0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAic3RyX3Bhcm1zX2FkZF9mbG9hdCIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA5c3RyX3Bhcm1zIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJZiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCis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GFybXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInN0cl9wYXJtc19kZXN0cm95IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAic3RyX3Bhcm1zX2Rlc3Ryb3kiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQOXN0cl9wYXJtcyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zdHJfcGFybXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInN0cl9wYXJtc19kdW1wIiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAic3RyX3Bhcm1zX2R1bXAiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQOXN0cl9wYXJtcyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zdHJfcGFybXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInN0cl9wYXJtc19nZXRfZmxvYXQiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzdHJfcGFybXNfZ2V0X2Zsb2F0IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDlzdHJfcGFybXMiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQZiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9zdHJfcGFybXMuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInN0cl9wYXJtc19nZXRfaW50IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAic3RyX3Bhcm1zX2dldF9pbnQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQOXN0cl9wYXJtcyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3N0cl9wYXJtcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic3RyX3Bhcm1zX2dldF9zdHIiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzdHJfcGFybXNfZ2V0X3N0ciIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA5c3RyX3Bhcm1zIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGMiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3N0cl9wYXJtcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic3RyX3Bhcm1zX2hhc19rZXkiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJzdHJfcGFybXNfaGFzX2tleSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA5c3RyX3Bhcm1zIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUEtjIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3N0cl9wYXJtcy5oIgorICB9LAorICB7CisgICAiZnVuY3Rpb25fbmFtZSIgOiAic3RyX3Bhcm1zX3RvX3N0ciIsCisgICAibGlua2VyX3NldF9rZXkiIDogInN0cl9wYXJtc190b19zdHIiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQOXN0cl9wYXJtcyIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJUGMiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvc3RyX3Bhcm1zLmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJ1ZXZlbnRfYmluZCIsCisgICAibGlua2VyX3NldF9rZXkiIDogInVldmVudF9iaW5kIiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy91ZXZlbnQuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInVldmVudF9jcmVhdGVfc29ja2V0IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAidWV2ZW50X2NyZWF0ZV9zb2NrZXQiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJYiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy91ZXZlbnQuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInVldmVudF9rZXJuZWxfbXVsdGljYXN0X3JlY3YiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJ1ZXZlbnRfa2VybmVsX211bHRpY2FzdF9yZWN2IiwKKyAgICJwYXJhbWV0ZXJzIiA6CisgICBbCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVB2IgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIKKyAgICB9CisgICBdLAorICAgInJldHVybl90eXBlIiA6ICJfWlRJaSIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy91ZXZlbnQuaCIKKyAgfSwKKyAgeworICAgImZ1bmN0aW9uX25hbWUiIDogInVldmVudF9rZXJuZWxfbXVsdGljYXN0X3VpZF9yZWN2IiwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAidWV2ZW50X2tlcm5lbF9tdWx0aWNhc3RfdWlkX3JlY3YiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGoiCisgICAgfQorICAgXSwKKyAgICJyZXR1cm5fdHlwZSIgOiAiX1pUSWkiLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvdWV2ZW50LmgiCisgIH0sCisgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJ1ZXZlbnRfa2VybmVsX3JlY3YiLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJ1ZXZlbnRfa2VybmVsX3JlY3YiLAorICAgInBhcmFtZXRlcnMiIDoKKyAgIFsKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUHYiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJYiIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBqIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJ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pdmVfaGFuZGxlICoiLAorICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSTEzbmF0aXZlX2hhbmRsZSIsCisgICAic2l6ZSIgOiA0LAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJjdXRpbHMvaW5jbHVkZS9jdXRpbHMvbmF0aXZlX2hhbmRsZS5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElQNWNub2RlIiwKKyAgICJuYW1lIiA6ICJjbm9kZSAqIiwKKyAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEk1Y25vZGUiLAorICAgInNpemUiIDogNCwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2NvbmZpZ191dGlscy5oIgorICB9LAorICB7CisgICAiYWxpZ25tZW50IiA6IDQsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElQN0hhc2htYXAiLAorICAgIm5hbWUiIDogIkhhc2htYXAgKiIsCisgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJN0hhc2htYXAiLAorICAgInNpemUiIDogNCwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL2hhc2htYXAuaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJUDlmc19jb25maWciLAorICAgIm5hbWUiIDogImZzX2NvbmZpZyAqIiwKKyAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEk5ZnNfY29uZmlnIiwKKyAgICJzaXplIiA6IDQsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL3ByaXZhdGUvZnNfY29uZmlnLmgiCisgIH0sCisgIHsKKyAgICJ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2IiwKKyAgICJuYW1lIiA6ICJjb25zdCB2b2lkIiwKKyAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEl2IiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3NvY2tldHMuaCIKKyAgfQorIF0sCisgInJlY29yZF90eXBlcyIgOgorIFsKKyAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImZpZWxkcyIgOgorICAgWworICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogInZlcnNpb24iLAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIKKyAgICB9LAorICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogIm51bUZkcyIsCisgICAgICJmaWVsZF9vZmZzZXQiIDogMzIsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAiZmllbGRfbmFtZSIgOiAibnVtSW50cyIsCisgICAgICJmaWVsZF9vZmZzZXQiIDogNjQsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAiZmllbGRfbmFtZSIgOiAiZGF0YSIsCisgICAgICJmaWVsZF9vZmZzZXQiIDogOTYsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElBMF9pIgorICAgIH0KKyAgIF0sCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEkxM25hdGl2ZV9oYW5kbGUiLAorICAgIm5hbWUiIDogIm5hdGl2ZV9oYW5kbGUiLAorICAgInNpemUiIDogMTIsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9uYXRpdmVfaGFuZGxlLmgiCisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKKyAgICJmaWVsZHMiIDoKKyAgIFsKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJkYXRhIiwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLdiIKKyAgICB9LAorICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogImxlbmd0aCIsCisgICAgICJmaWVsZF9vZmZzZXQiIDogMzIsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0KKyAgIF0sCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEkyMmN1dGlsc19zb2NrZXRfYnVmZmVyX3QiLAorICAgIm5hbWUiIDogImN1dGlsc19zb2NrZXRfYnVmZmVyX3QiLAorICAgInNpemUiIDogOCwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvY3V0aWxzL3NvY2tldHMuaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImZpZWxkcyIgOgorICAgWworICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogIm5leHQiLAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUDVjbm9kZSIKKyAgICB9LAorICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogImZpcnN0X2NoaWxkIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiAzMiwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJsYXN0X2NoaWxkIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiA2NCwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVA1Y25vZGUiCisgICAgfSwKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJuYW1lIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiA5NiwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBLYyIKKyAgICB9LAorICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogInZhbHVlIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiAxMjgsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQS2MiCisgICAgfQorICAgXSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSTVjbm9kZSIsCisgICAibmFtZSIgOiAiY25vZGUiLAorICAgInNpemUiIDogMjAsCisgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYmN1dGlscy9pbmNsdWRlL2N1dGlscy9jb25maWdfdXRpbHMuaCIKKyAgfSwKKyAgeworICAgImFsaWdubWVudCIgOiA4LAorICAgImZpZWxkcyIgOgorICAgWworICAgIHsKKyAgICAgImZpZWxkX25hbWUiIDogInVpZCIsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElqIgorICAgIH0sCisgICAgeworICAgICAiZmllbGRfbmFtZSIgOiAiZ2lkIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiAzMiwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWoiCisgICAgfSwKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJtb2RlIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiA2NCwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSXQiCisgICAgfSwKKyAgICB7CisgICAgICJmaWVsZF9uYW1lIiA6ICJjYXBhYmlsaXRpZXMiLAorICAgICAiZmllbGRfb2Zmc2V0IiA6IDEyOCwKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSXkiCisgICAgfQorICAgXSwKKyAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSTlmc19jb25maWciLAorICAgIm5hbWUiIDogImZzX2NvbmZpZyIsCisgICAic2l6ZSIgOiAyNCwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGliY3V0aWxzL2luY2x1ZGUvcHJpdmF0ZS9mc19jb25ma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zdCBjaGFyKiBwYXRoLCBpbnQgZGlyLCBjb25zdCBjaGFyKiB0YXJnZXRfb3V0X3BhdGgsIHVuc2lnbmVkKiB1aWQsIHVuc2lnbmVkKiBnaWQsCi0gICAgICAgICAgICAgICB1bnNpZ25lZCogbW9kZSwgdWludDY0X3QqIGNhcGFiaWxpdGllcykgeworYm9vbCBnZXRfZnNfY29uZmlnKGNvbnN0IGNoYXIqIHBhdGgsIGJvb2wgZGlyLCBjb25zdCBjaGFyKiB0YXJnZXRfb3V0X3BhdGgsCisgICAgICAgICAgICAgICAgICAgc3RydWN0IGZzX2NvbmZpZyogZnNfY29uZikgewogICAgIGNvbnN0IHN0cnVjdCBmc19wYXRoX2NvbmZpZyogcGM7CiAgICAgc2l6ZV90IHdoaWNoLCBwbGVuOwogCkBAIC0zNjUsMTEgKzM2OCwxMSBAQAogICAgICAgICAgICAgaWYgKGZzX2NvbmZpZ19jbXAoZGlyLCBwcmVmaXgsIGxlbiwgcGF0aCwgcGxlbikpIHsKICAgICAgICAgICAgICAgICBmcmVlKHByZWZpeCk7CiAgICAgICAgICAgICAgICAgY2xvc2UoZmQpOwotICAgICAgICAgICAgICAgICp1aWQgPSBoZWFkZXIudWlkOwotICAgICAgICAgICAgICAgICpnaWQgPSBoZWFkZXIuZ2lkOwotICAgICAgICAgICAgICAgICptb2RlID0gKCptb2RlICYgKH4wNzc3NykpIHwgaGVhZGVyLm1vZGU7Ci0gICAgICAgICAgICAgICAgKmNhcGFiaWxpdGllcyA9IGhlYWRlci5jYXBhYmlsaXRpZXM7Ci0gICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIGZzX2NvbmYtPnVpZCA9IGhlYWRlci51aWQ7CisgICAgICAgICAgICAgICAgZnNfY29uZi0+Z2lkID0gaGVhZGVyLmdpZDsKKyAgICAgICAgICAgICAgICBmc19jb25mLT5tb2RlID0gaGVhZGVyLm1vZGU7CisgICAgICAgICAgICAgICAgZnNfY29uZi0+Y2FwYWJpbGl0aWVzID0gaGVhZGVyLmNhcGFiaWxpdGllczsKKyAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgICAgIH0KICAgICAgICAgICAgIGZyZWUocHJlZml4KTsKICAgICAgICAgfQpAQCAtMzc4LDExICszODEsMjggQEAKIAogICAgIGZvciAocGMgPSBkaXIgPyBhbmRyb2lkX2RpcnMgOiBhbmRyb2lkX2ZpbGVzOyBwYy0+cHJlZml4OyBwYysrKSB7CiAgICAgICAgIGlmIChmc19jb25maWdfY21wKGRpciwgcGMtPnByZWZpeCwgc3RybGVuKHBjLT5wcmVmaXgpLCBwYXRoLCBwbGVuKSkgewotICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBmc19jb25mLT51aWQgPSBwYy0+dWlkOworICAgICAgICAgICAgZnNfY29uZi0+Z2lkID0gcGMtPmdpZDsKKyAgICAgICAgICAgIGZzX2NvbmYtPm1vZGUgPSBwYy0+bW9kZTsKKyAgICAgICAgICAgIGZzX2NvbmYtPmNhcGFiaWxpdGllcyA9IHBjLT5jYXBhYmlsaXRpZXM7CisgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAgfQogICAgIH0KLSAgICAqdWlkID0gcGMtPnVpZDsKLSAgICAqZ2lkID0gcGMtPmdpZDsKLSAgICAqbW9kZSA9ICgqbW9kZSAmICh+MDc3NzcpKSB8IHBjLT5tb2RlOwotICAgICpjYXBhYmlsaXRpZXMgPSBwYy0+Y2FwYWJpbGl0aWVzOworICAgIHJldHVybiBmYWxzZTsKK30KKwordm9pZCBmc19jb25maWcoY29uc3QgY2hhciogcGF0aCwgaW50IGRpciwgY29uc3QgY2hhciogdGFyZ2V0X291dF9wYXRoLCB1bnNpZ25lZCogdWlkLCB1bnNpZ25lZCogZ2lkLAorICAgICAgICAgICAgICAgdW5zaWduZWQqIG1vZGUsIHVpbnQ2NF90KiBjYXBhYmlsaXRpZXMpIHsKKyAgICBzdHJ1Y3QgZnNfY29uZmlnIGNvbmY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2xpc3QgKgotY29uZmlnX21icihzdHJ1Y3QgZGlza19pbmZvICpkaW5mbykKLXsKLSAgICBzdHJ1Y3QgcGFydF9pbmZvICpwaW5mbzsKLSAgICB1aW50MzJfdCBjdXJfbGJhID0gZGluZm8tPnNraXBfbGJhOwotICAgIHVpbnQzMl90IGV4dF9sYmEgPSAwOwotICAgIHN0cnVjdCB3cml0ZV9saXN0ICp3cl9saXN0ID0gTlVMTDsKLSAgICBzdHJ1Y3Qgd3JpdGVfbGlzdCAqdGVtcF93ciA9IE5VTEw7Ci0gICAgaW50IGNudCA9IDA7Ci0gICAgaW50IGV4dGVuZGVkID0gMDsKLQotICAgIGlmICghZGluZm8tPnBhcnRfbHN0KQotICAgICAgICByZXR1cm4gTlVMTDsKLQotICAgIGZvciAoY250ID0gMDsgY250IDwgZGluZm8tPm51bV9wYXJ0czsgKytjbnQpIHsKLSAgICAgICAgcGluZm8gPSAmZGluZm8tPnBhcnRfbHN0W2NudF07Ci0KLSAgICAgICAgLyogU2hvdWxkIHdlIGNyZWF0ZSBhbiBleHRlZG5lZCBwYXJ0aXRpb24/ICovCi0gICAgICAgIGlmIChjbnQgPT0gKFBDX05VTV9CT09UX1JFQ09SRF9QQVJUUyAtIDEpKSB7Ci0gICAgICAgICAgICBpZiAoY250ICsgMSA8IGRpbmZvLT5udW1fcGFydHMpIHsKLSAgICAgICAgICAgICAgICBleHRlbmRlZCA9IDE7Ci0gICAgICAgICAgICAgICAgZXh0X2xiYSA9IGN1cl9sYmE7Ci0gICAgICAgICAgICAgICAgaWYgKCh0ZW1wX3dyID0gbWtfcHJpX3BlbnRyeShkaW5mbywgTlVMTCwgY250LCAmY3VyX2xiYSkpKQotICAgICAgICAgICAgICAgICAgICB3bGlzdF9hZGQoJndyX2xpc3QsIHRlbXBfd3IpOwotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICBBTE9HRSgiQ2Fubm90IGNyZWF0ZSBwcmltYXJ5IGV4dGVuZGVkIHBhcnRpdGlvbi4iKTsKLSAgICAgICAgICAgICAgICAgICAgZ290byBmYWlsOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotCi0gICAgICAgIC8qIGlmIGV4dGVuZGVkLCBuZWVkIDEgbGJhIGZvciBlYnIgKi8KLSAgICAgICAgaWYgKChjdXJfbGJhICsgZXh0ZW5kZWQpID49IGRpbmZvLT5udW1fbGJhKQotICAgICAgICAgICAgZ290byBub3NwYWNlOwotICAgICAgICBlbHNlIGlmIChwaW5mby0+bGVuX2tiICE9ICh1aW50MzJfdCktMSkgewotICAgICAgICAgICAgdWludDMyX3Qgc3pfbGJhID0gKHBpbmZvLT5sZW5fa2IgLyBkaW5mby0+c2VjdF9zaXplKSAqIDEwMjQ7Ci0gICAgICAgICAgICBpZiAoKGN1cl9sYmEgKyBzel9sYmEgKyBleHRlbmRlZCkgPiBkaW5mby0+bnVtX2xiYSkKLSAgICAgICAgICAgICAgICBnb3RvIG5vc3BhY2U7Ci0gICAgICAgIH0KLQotICAgICAgICBpZiAoIWV4dGVuZGVkKQotICAgICAgICAgICAgdGVtcF93ciA9IG1rX3ByaV9wZW50cnkoZGluZm8sIHBpbmZvLCBjbnQsICZjdXJfbGJhKTsKLSAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICBzdHJ1Y3QgcGFydF9pbmZvICpwbmV4dDsKLSAgICAgICAgICAgIHBuZXh0ID0gY250ICsgMSA8IGRpbmZvLT5udW1fcGFydHMgPyAmZGluZm8tPnBhcnRfbHN0W2NudCsxXSA6IE5VTEw7Ci0gICAgICAgICAgICB0ZW1wX3dyID0gbWtfZXh0X3BlbnRyeShkaW5mbywgcGluZm8sICZjdXJfbGJhLCBleHRfbGJhLCBwbmV4dCk7Ci0gICAgICAgIH0KLQotICAgICAgICBpZiAodGVtcF93cikKLSAgICAgICAgICAgIHdsaXN0X2FkZCgmd3JfbGlzdCwgdGVtcF93cik7Ci0gICAgICAgIGVsc2UgewotICAgIC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gZGlzayBsZW5ndGggc3BlY2lmaWVkLiIpOwotICAgICAgICByZXR1cm4gMTsKLSAgICB9Ci0KLSAgICBzd2l0Y2godG1wW2xlbl9zdHIgLSAxXSkgewotICAgICAgICBjYXNlICdNJzogY2FzZSAnbSc6Ci0gICAgICAgICAgICAvKiBtZWdhYnl0ZSAqLwotICAgICAgICAgICAgbXVsdGlwbGUgPDw9IDEwOwotICAgICAgICBjYXNlICdLJzogY2FzZSAnayc6Ci0gICAgICAgICAgICAvKiBraWxvYnl0ZXMgKi8KLSAgICAgICAgICAgIG11bHRpcGxlIDw8PSAxMDsKLSAgICAgICAgICAgIHRtcFtsZW5fc3RyIC0gMV0gPSAnXDAnOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICBicmVhazsKLSAgICB9Ci0KLSAgICAqcGxlbiA9IHN0cnRvdWxsKHRtcCwgTlVMTCwgMCk7Ci0gICAgaWYgKCEqcGxlbikgewotICAgICAgICBBTE9HRSgiSW52YWxpZCBsZW5ndGggc3BlY2lmaWVkOiAlcyIsIHN0cik7Ci0gICAgICAgIHJldHVybiAxOwotICAgIH0KLQotICAgIGlmICgqcGxlbiA9PSAodWludDY0X3QpLTEpIHsKLSAgICAgICAgaWYgKG11bHRpcGxlID4gMSkgewotICAgICAgICAgICAgQUxPR0UoIlNpemUgbW9kaWZpZXIgaWxsZWdhbCB3aGVuIGxlbiBpcyAtMSIpOwotICAgICAgICAgICAgcmV0dXJuIDE7Ci0gICAgICAgIH0KLSAgICB9IGVsc2UgewotICAgICAgICAvKiBjb252ZXJ0IGxlbiB0byBraWxvYnl0ZXMgKi8KLSAgICAgICAgaWYgKG11bHRpcGxlID4gMTAyNCkKLSAgICAgICAgICAgIG11bHRpcGxlID4+PSAxMDsKLSAgICAgICAgKnBsZW4gKj0gbXVsdGlwbGU7Ci0KLSAgICAgICAgaWYgKCpwbGVuID4gMHhmZmZmZmZmZlVMTCkgewotICAgICAgICAg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ICVzIiwgcGluZm8tPm5hbWUpOwotICAgICAgICAgICAgcmV0dXJuIDE7Ci0gICAgICAgIH0KLQotICAgICAgICAvKiBwb3NzaWJsZSB2YWx1ZXMgYXJlOiBsaW51eCwgZmF0MzIgKi8KLSAgICAgICAgaWYgKCFzdHJjbXAodG1wLCAibGludXgiKSkgewotICAgICAgICAgICAgcGluZm8tPnR5cGUgPSBQQ19QQVJUX1RZUEVfTElOVVg7Ci0gICAgICAgIH0gZWxzZSBpZiAoIXN0cmNtcCh0bXAsICJmYXQzMiIpKSB7Ci0gICAgICAgICAgICBwaW5mby0+dHlwZSA9IFBDX1BBUlRfVFlQRV9GQVQzMjsKLSAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgIEFMT0dFKCJVbnN1cHBvcnRlZCBwYXJ0aXRpb24gdHlwZSBmb3VuZDogJXMiLCB0bXApOwotICAgICAgICAgICAgcmV0dXJuIDE7Ci0gICAgICAgIH0KLQotICAgICAgICBpZiAoKHRtcCA9IGNvbmZpZ19zdHIocGFydG5vZGUsICJsZW4iLCBOVUxMKSkgIT0gTlVMTCkgewotICAgICAgICAgICAgdWludDY0X3QgbGVuOwotICAgICAgICAgICAgaWYgKHBhcnNlX2xlbih0bXAsICZsZW4pKQotICAgICAgICAgICAgICAgIHJldHVybiAxOwotICAgICAgICAgICAgcGluZm8tPmxlbl9rYiA9ICh1aW50MzJfdCkgbGVuOwotICAgICAgICB9IGVsc2UgCi0gICAgICAgICAgICBwaW5mby0+bGVuX2tiID0gMDsKLQotICAgICAgICArK2RpbmZvLT5udW1fcGFydHM7Ci0gICAgfQotCi0gICAgcmV0dXJuIDA7Ci19Ci0KLXN0cnVjdCBkaXNrX2luZm8gKgotbG9hZF9kaXNrY29uZmlnKGNvbnN0IGNoYXIgKmZuLCBjaGFyICpwYXRoX292ZXJyaWRlKQotewotICAgIHN0cnVjdCBkaXNrX2luZm8gKmRpbmZvOwotICAgIGNub2RlICpkZXZyb290OwotICAgIGNub2RlICpwYXJ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XJybm8pOwotICAgICAgICAgICAgICAgIGdvdG8gZmFpbDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIC8qIFhYWDogd2UgYXNzdW1lIHRoYXQgdGhlIGRpc2sgaGFzIDwgMl4zMiBzZWN0b3JzIDotKSAqLwotICAgICAgICAgICAgZGluZm8tPm51bV9sYmEgPSAodWludDMyX3QpKGRpc2tfc2l6ZSAvICh1aW50NjRfdClkaW5mby0+c2VjdF9zaXplKTsKLSAgICAgICAgfSBlbHNlCi0gICAgICAgICAgICBkaXNrX3NpemUgPSAodWludDY0X3QpZGluZm8tPm51bV9sYmEgKiAodWludDY0X3QpZGluZm8tPnNlY3Rfc2l6ZTsKLSAgICB9IGVsc2UgaWYgKFNfSVNSRUcoc3RhdC5zdF9tb2RlKSkgewotICAgICAgICBBTE9HSSgiUmVxdWVzdGluZyBvcGVyYXRpb24gb24gYSByZWd1bGFyIGZpbGUsIG5vdCBibG9jayBkZXZpY2UuIik7Ci0gICAgICAgIGlmICghZGluZm8tPnNlY3Rfc2l6ZSkgewotICAgICAgICAgICAgQUxPR0UoIlNlY3RvciBzaXplIGZvciByZWd1bGFyIGZpbGUgaW1hZ2VzIGNhbm5vdCBiZSB6ZXJvIik7Ci0gICAgICAgICAgICBnb3RvIGZhaWw7Ci0gICAgICAgIH0KLSAgICAgICAgaWYgKGRpbmZvLT5udW1fbGJhKQotICAgICAgICAgICAgZGlza19zaXplID0gKHVpbnQ2NF90KWRpbmZvLT5udW1fbGJhICogKHVpbnQ2NF90KWRpbmZvLT5zZWN0X3NpemU7Ci0gICAgICAgIGVsc2UgewotICAgICAgICAgICAgZGluZm8tPm51bV9sYmEgPSAodWludDMyX3QpKHN0YXQuc3Rfc2l6ZSAvIGRpbmZvLT5zZWN0X3NpemUpOwotICAgICAgICAgICAgZGlza19zaXplID0gKHVpbnQ2NF90KXN0YXQuc3Rfc2l6ZTsKLSAgICAgICAgfQotICAgIH0gZWxzZSB7Ci0gICAgICAgIEFMT0dFKCJ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vdG8gZmFpbDsKLSAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgIC8qIHRoZSBwYXJ0aXRpb24gcmVxdWVzdHMgdGhlIHJlc3Qgb2YgdGhlIGRpc2suICovCi0gICAgICAgICAgICBpZiAoY250ICsgMSAhPSBkaW5mby0+bnVtX3BhcnRzKSB7Ci0gICAgICAgICAgICAgICAgQUxPR0UoIk9ubHkgdGhlIGxhc3QgcGFydGl0aW9uIGluIHRoZSBsaXN0IGNhbiByZXF1ZXN0IHRvIGZpbGwgIgotICAgICAgICAgICAgICAgICAgICAgInRoZSByZXN0IG9mIGRpc2suIik7Ci0gICAgICAgICAgICAgICAgZ290byBmYWlsOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0KLSAgICAgICAgaWYgKChwYXJ0LT50eXBlICE9IFBDX1BBUlRfVFlQRV9MSU5VWCkgJiYKLSAgICAgICAgICAgIChwYXJ0LT50eXBlICE9IFBDX1BBUlRfVFlQRV9GQVQzMikpIHsKLSAgICAgICAgICAgIEFMT0dFKCJVbmtub3duIHBhcnRpdGlvbiB0eXBlICgweCV4KSBlbmNvdW50ZXJlZCBmb3IgcGFydGl0aW9uICIKLSAgICAgICAgICAgICAgICAgIiclcydcbiIsIHBhcnQtPnR5cGUsIHBhcnQtPm5hbWUpOwotICAgICAgICAgICAgZ290byBmYWlsOwotICAgICAgICB9Ci0gICAgfQotCi0gICAgLyogb25seSBtYXR0ZXJzIGZvciBkaXNrcywgbm90IGZpbGVzICovCi0gICAgaWYgKFNfSVNCTEsoc3RhdC5zdF9tb2RlKSAmJiB0b3RhbF9zaXplID4gZGlza19zaXplKSB7Ci0gICAgICAgIEFMT0dFKCJUb3RhbCByZXF1ZXN0ZWQgc2l6ZSBvZiBwYXJ0aXRpb25zICglIlBSSXU2NCIpIGlzIGdyZWF0ZXIgdGhhbiBkaXNrICIKLSAgICAgICAgICAgICAic2l6ZSAoJSJQUkl1NjQiKS4iLCB0b3RhbF9zaXplLCBkaXNrX3NpemUp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fQotCi1pbnQKLWR1bXBfZGlza19jb25maWcoc3RydWN0IGRpc2tfaW5mbyAqZGluZm8pCi17Ci0gICAgaW50IGNudDsKLSAgICBzdHJ1Y3QgcGFydF9pbmZvICpwYXJ0OwotCi0gICAgcHJpbnRmKCJEZXZpY2U6ICVzXG4iLCBkaW5mby0+ZGV2aWNlKTsKLSAgICBwcmludGYoIlNjaGVtZTogIik7Ci0gICAgc3dpdGNoIChkaW5mby0+c2NoZW1lKSB7Ci0gICAgICAgIGNhc2UgUEFSVF9TQ0hFTUVfTUJSOgotICAgICAgICAgICAgcHJpbnRmKCJNQlIiKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFBBUlRfU0NIRU1FX0dQVDoKLSAgICAgICAgICAgIHByaW50ZigiR1BUICh1bnN1cHBvcnRlZCkiKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgcHJpbnRmKCJVbmtub3duIik7Ci0gICAgICAgICAgICBicmVhazsKLSAgICB9Ci0gICAgcHJpbnRmICgiXG4iKTsKLQotICAgIHByaW50ZigiU2VjdG9yIHNpemU6ICVkXG4iLCBkaW5mby0+c2VjdF9zaXplKTsKLSAgICBwcmludGYoIlNraXAgbGVhZGluZyBMQkFzOiAldVxuIiwgZGluZm8tPnNraXBfbGJhKTsKLSAgICBwcmludGYoIk51bWJlciBvZiBMQkFzOiAldVxuIiwgZGluZm8tPm51bV9sYmEpOwotICAgIHByaW50ZigiUGFydGl0aW9uczpcbiIpOwotCi0gICAgZm9yIChjbnQgPSAwOyBjbnQgPCBkaW5mby0+bnVtX3BhcnRzOyArK2NudCkgewotICAgICAgICBwYXJ0ID0gJmRpbmZvLT5wYXJ0X2xzdFtjbnRdOwotICAgICAgICBwcmludGYoIlx0bmFtZSA9ICVzXG4iLCBwYXJ0LT5uYW1lKTsKLSAgICAgICAgcHJpbnRmKCJcdFx0ZmxhZ3MgPSAlc1xuIiwKLSAgICAgICAgICAgICAgIHBhcnQtPmZsYWdzICYgUEFSVF9BQ1RJVkVfRkxBRyA/ICJBY3RpdmUiIDogIk5vbmUiKTsKLSAgICAgICAgcHJpbnRmKCJcdFx0dHlwZSA9ICVzXG4iLAotICAgICAgICAgICAgICAgcGFydC0+dHlwZSA9PSBQQ19QQVJUX1RZUEVfTElOVVggPyAiTGludXgiIDogIlVua25vd24iKTsKLSAgICAgICAgaWYgKHBhcnQtPmxlbl9rYiA9PSAodWludDMyX3QpLTEpCi0gICAgICAgICAgICBwcmludGYoIlx0XHRsZW4gPSByZXN0IG9mIGRpc2tcbiIpOwotICAgICAgICBlbHNlCi0gICAgICAgICAgICBwcmludGYoIlx0XHRsZW4gPSAldUtCXG4iLCBwYXJ0LT5sZW5fa2IpOwotICAgIH0KLSAgICBwcmludGYoIlRvdGFsIG51bWJlciBvZiBwYXJ0aXRpb25zOiAlZFxuIiwgY250KTsKLSAgICBwcmludGYoIlxuIik7Ci0KLSAgICByZXR1cm4gMDsKLX0KLQotc3RydWN0IHBhcnRfaW5mbyAqCi1maW5kX3BhcnQoc3RydWN0IGRpc2tfaW5mbyAqZGluZm8sIGNvbnN0IGNoYXIgKm5hbWUpCi17Ci0gICAgc3RydWN0IHBhcnRfaW5mbyAqcGluZm87Ci0gICAgaW50IGNudDsKLQotICAgIGZvciAoY250ID0gMDsgY250IDwgZGluZm8tPm51bV9wYXJ0czsgKytjbnQpIHsKLSAgICAgICAgcGluZm8gPSAmZGluZm8tPnBhcnRfbHN0W2NudF07Ci0gICAgICAgIGlmICghc3RyY21wKHBpbmZvLT5uYW1lLCBuYW1lKSkKLSAgICAgICAgICAgIHJldHVybiBwaW5mbzsKLSAgICB9Ci0KLSAgICByZXR1cm4gTlVMTDsKLX0KLQotLyogTk9URTogSWYgdGhlIHJldHVybmVkIHB0ciBpcyBub24tTlVMTCwgaXQgbXVzdCBiZSBmcmVlZCBieSB0aGUgY2FsbGVyLiAqLwotY2hhciAqCi1maW5kX3BhcnRfZGV2aW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gICAgICAgICAgICAvKiBYWFg6IFNob3VsZCB3ZSBub3QgZXZlbiBib3RoZXIgd2l0aCBFSU5UUj8gKi8KLSAgICAgICAgICAgIGlmIChlcnJubyA9PSBFSU5UUikKLSAgICAgICAgICAgICAgICBjb250aW51ZTsKLSAgICAgICAgICAgIEFMT0dFKCJFcnJvciAoJWQpIHdoaWxlIHJlYWRpbmcgZnJvbSAnJXMnIiwgZXJybm8sIHNyYyk7Ci0gICAgICAgICAgICBnb3RvIGZhaWw7Ci0gICAgICAgIH0KLQotICAgICAgICBpZiAoIW5yX2J5dGVzKSB7Ci0gICAgICAgICAgICAvKiB3ZSdyZSBkb25lLiAqLwotICAgICAgICAgICAgZG9uZSA9IDE7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotCi0gICAgICAgIHRvdGFsICs9IG5yX2J5dGVzOwotCi0gICAgICAgIC8qIHNraXAgdGhlIHdyaXRlIGxvb3AgaWYgd2UncmUgdGVzdGluZyAqLwotICAgICAgICBpZiAodGVzdCkKLSAgICAgICAgICAgIG5yX2J5dGVzID0gMDsKLQotICAgICAgICB3aGlsZSAobnJfYnl0ZXMgPiAwKSB7Ci0gICAgICAgICAgICBpZiAoKHRtcCA9IHdyaXRlKGRzdF9mZCwgYnVmZmVyLCBucl9ieXRlcykpIDwgMCkgewotICAgICAgICAgICAgICAgIC8qIFhYWDogU2hvdWxkIHdlIG5vdCBldmVuIGJvdGhlciB3aXRoIEVJTlRSPyAqLwotICAgICAgICAgICAgICAgIGlmIChlcnJubyA9PSBFSU5UUikKLSAgICAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgICAgQUxPR0UoIkVycm9yICglZCkgd2hpbGUgd3JpdGluZyB0byAnJXMnIiwgZXJybm8sIGRzdCk7Ci0gICAgICAgICAgICAgICAgZ290byBmYWlsOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgaWYgKCF0bXApCi0gICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAg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gICB1aW50MzJfdCBzdGFydF9sYmE7IC8qIGJ5dGVzIDgtMTEgICovCi0gICAgdWludDMyX3QgbGVuX2xiYTsgICAvKiBieXRlcyAxMi0xNSAqLwotfSBfX2F0dHJpYnV0ZV9fKChfX3BhY2tlZF9fKSk7Ci0KLXN0cnVjdCBwY19ib290X3JlY29yZCB7Ci0gICAgdWludDhfdCBjb2RlWzQ0MF07ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBieXRlcyAwLTQzOSAgICovCi0gICAgdWludDMyX3QgZGlza19zaWc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBieXRlcyA0NDAtNDQzICovCi0gICAgdWludDE2X3QgcGFkOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBieXRlcyA0NDQtNDQ1ICovCi0gICAgc3RydWN0IHBjX3BhcnRpdGlvbiBwdGFibGVbUENfTlVNX0JPT1RfUkVDT1JEX1BBUlRTXTsgICAvKiBieXRlcyA0NDYtNTA5ICovCi0gICAgdWludDE2X3QgbWJyX3NpZzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBieXRlcyA1MTAtNTExICovCi19IF9fYXR0cmlidXRlX18oKF9fcGFja2VkX18pKTsKLQotc3RydWN0IHBhcnRfaW5mbyB7Ci0gICAgY2hhciAqbmFtZTsKLSAgICB1aW50OF90IGZsYWdzOwotICAgIHVpbnQ4X3QgdHlwZTsKLSAgICB1aW50MzJfdCBsZW5fa2I7ICAgICAgIC8qIGluIDFLLWJ5dGVzICovCi0gICAgdWludDMyX3Qgc3RhcnRfbGJhOyAgICAvKiB0aGUgTEJBIHdoZXJlIHRoaXMgcGFydGl0aW9uIGJlZ2lucyAqLwotfTsKLQotc3RydWN0IGRpc2tfaW5mbyB7Ci0gICAgY2hhciAqZGV2aWNlOwotICAgIHVpbnQ4X3Qgc2NoZW1lOwotICAgIGludCBzZWN0X3NpemU7ICAg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JrKCk7CisgICAgaWYgKHBpZCA8IDApIHsKKyAgICAgICAgcmV0dXJuIEVycm5vRXJyb3IoKSA8PCAiZm9yaygpIGZhaWxlZCI7CisgICAgfQorCisgICAgaWYgKHBpZCA9PSAwKSB7CisgICAgICAgIGZvciAoYXV0byBpdCA9IGVudnNfbWFwLmJlZ2luKCk7IGl0ICE9IGVudnNfbWFwLmVuZCgpOyArK2l0KSB7CisgICAgICAgICAgICBzZXRlbnYoaXQtPmZpcnN0LmNfc3RyKCksIGl0LT5zZWNvbmQuY19zdHIoKSwgMSk7CisgICAgICAgIH0KKyAgICAgICAgcGFyZW50X3N0ZG91dC5yZXNldCgpOworICAgICAgICBwYXJlbnRfc3RkZXJyLnJlc2V0KCk7CisgICAgICAgIGNsb3NlKFNURE9VVF9GSUxFTk8pOworICAgICAgICBjbG9zZShTVERFUlJfRklMRU5PKTsKKyAgICAgICAgZHVwMihjaGlsZF9zdGRvdXQuZ2V0KCksIFNURE9VVF9GSUxFTk8pOworICAgICAgICBkdXAyKGNoaWxkX3N0ZGVyci5nZXQoKSwgU1RERVJSX0ZJTEVOTyk7CisKKyAgICAgICAgYXV0byBhcmdzID0gU3BsaXQoaGFuZGxlciwgIiAiKTsKKyAgICAgICAgc3RkOjp2ZWN0b3I8Y2hhcio+IGNfYXJnczsKKyAgICAgICAgZm9yIChhdXRvJiBhcmcgOiBhcmdzKSB7CisgICAgICAgICAgICBjX2FyZ3MuZW1wbGFjZV9iYWNrKGFyZy5kYXRhKCkpOworICAgICAgICB9CisgICAgICAgIGNfYXJncy5lbXBsYWNlX2JhY2sobnVsbHB0cik7CisKKyAgICAgICAgaWYgKGdpZCAhPSAwKSB7CisgICAgICAgICAgICBpZiAoc2V0Z2lkKGdpZCkgIT0gMCkgeworICAgICAgICAgICAgICAgIGZwcmludGYoc3RkZXJyLCAic2V0Z2lkKCkgZmFpbGVkOiAlcyIsIHN0cmVycm9yKGVycm5vKSk7CisgICAgICAgICAgICAgICAgX2V4aXQoRVhJ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AgICAgICAgICAgICAgICAgICAgaWYgKCFMb2FkV2l0aEFsaWFzZXMoaXRfbW9kLCB0cnVlKSAmJiAhSXNCbG9ja2xpc3RlZChpdF9tb2QpKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgbW9kc19wYXRoX3RvX2xvYWQuZW1wbGFjZV9iYWNrKGl0X21vZCk7CisgICAgICAgICAgICBhdXRvIGl0ZF9sYXN0ID0gaXRfZGVwLnJiZWdpbigpOworICAgICAgICAgICAgaWYgKGl0ZF9sYXN0ID09IGl0X2RlcC5yZW5kKCkpCisgICAgICAgICAgICAgICAgY29udGludWU7CisKKyAgICAgICAgICAgIGF1dG8gY25kX2xhc3QgPSBNYWtlQ2Fub25pY2FsKCppdGRfbGFzdCk7CisgICAgICAgICAgICAvLyBIYXJkLWRlcGVuZGVuY2llcyBjYW5ub3QgYmUgYmxvY2tsaXN0ZWQKKyAgICAgICAgICAgIGlmIChJc0Jsb2NrbGlzdGVkKGNuZF9sYXN0KSkgeworICAgICAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkxNUDogQmxvY2tsaXN0OiBNb2R1bGUtZGVwICIgPDwgY25kX2xhc3QKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIgOiBmYWlsZWQgdG8gbG9hZCBtb2R1bGUgIiA8PCBpdF9tb2Q7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBzdGQ6OnN0cmluZyBzdHIgPSAibG9hZF9zZXF1ZW50aWFsPTEiOworICAgICAgICAgICAgYXV0byBpdCA9IG1vZHVsZV9vcHRpb25zX1tjbmRfbGFzdF0uZmluZChzdHIpOworICAgICAgICAgICAgaWYgKGl0ICE9IHN0ZDo6c3RyaW5nOjpucG9zKSB7CisgICAgICAgICAgICAgICAgbW9kdWxlX29wdGlvbnNfW2NuZF9sYXN0XS5lcmFzZShpdCwgaXQgKyBzdHIuc2l6ZSgpKTsKKworICAgICAgICAgICAgICAgIGlmICghTG9hZFdpdGhBbGlhc2VzKGNuZF9sYXN0LCB0cnVlKSkgeworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICBpZiAoc3RkOjpmaW5kKG1vZHNfcGF0aF90b19sb2FkLmJlZ2luKCksIG1vZHNfcGF0aF90b19sb2FkLmVuZCgpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNuZF9sYXN0KSA9PSBtb2RzX3BhdGhfdG9fbG9hZC5lbmQoKSkgeworICAgICAgICAgICAgICAgICAgICBtb2RzX3BhdGhfdG9fbG9hZC5lbXBsYWNlX2JhY2soY25kX2xhc3QpOwogICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgIH0KICAgICAgICAgfQpAQCAtNTAyLDcgKzU3Miw3IEBACiAgICAgICAgICAgICAgICAgbGsudW5sb2NrKCk7CiAgICAgICAgICAgICAgICAgcmV0X2xvYWQgJj0gTG9hZFdpdGhBbGlhc2VzKG1vZF90b19sb2FkLCB0cnVlKTsKICAgICAgICAgICAgICAgICBsay5sb2NrKCk7Ci0gICAgICAgICAgICAgICAgaWYgKCFyZXRfbG9hZCAmJiAhSXNCbG9ja2xpc3RlZChtb2RfdG9fbG9hZCkpIHsKKyAgICAgICAgICAgICAgICBpZiAoIXJldF9sb2FkKSB7CiAgICAgICAgICAgICAgICAgICAgIHJldCAmPSByZXRfbG9hZDsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9CkBAIC01MjAsMTQgKzU5MCwxNiBAQAogCiAgICAgICAgIHN0ZDo6bG9ja19ndWFyZCBndWFyZChtb2R1bGVfbG9hZGVkX2xvY2tfKTsKICAgICAgICAgLy8gUmVtb3ZlIGxvYWR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dfYXdhcmVfY2NfZGVmYXVsdHMgeworICAgIG5hbWU6ICJsaWJwcm9jZXNzZ3JvdXBfYnVpbGRfZmxhZ3NfY2MiLAorICAgIGNwcF9zdGQ6ICJnbnUrKzIzIiwKKyAgICBzb29uZ19jb25maWdfdmFyaWFibGVzOiB7CisgICAgICAgIG1lbWNnX3YyX2ZvcmNlX2VuYWJsZWQ6IHsKKyAgICAgICAgICAgIGNmbGFnczogWworICAgICAgICAgICAgICAgICItRE1FTUNHX1YyX0ZPUkNFX0VOQUJMRUQ9dHJ1ZSIsCisgICAgICAgICAgICBdLAorICAgICAgICB9LAorICAgICAgICBjZ3JvdXBfdjJfc3lzX2FwcF9pc29sYXRpb246IHsKKyAgICAgICAgICAgIGNmbGFnczogWworICAgICAgICAgICAgICAgICItRENHUk9VUF9WMl9TWVNfQVBQX0lTT0xBVElPTj10cnVlIiwKKyAgICAgICAgICAgIF0sCisgICAgICAgIH0sCisgICAgfSwKIH0KIAogY2NfbGlicmFyeV9oZWFkZXJzIHsKQEAgLTUzLDE2ICs3MiwxMyBAQAogICAgIHJlY292ZXJ5X2F2YWlsYWJsZTogdHJ1ZSwKICAgICB2ZW5kb3JfYXZhaWxhYmxlOiB0cnVlLAogICAgIHByb2R1Y3RfYXZhaWxhYmxlOiB0cnVlLAotICAgIHZuZGs6IHsKLSAgICAgICAgZW5hYmxlZDogdHJ1ZSwKLSAgICAgICAgc3VwcG9ydF9zeXN0ZW1fcHJvY2VzczogdHJ1ZSwKLSAgICB9LAorICAgIGRvdWJsZV9sb2FkYWJsZTogdHJ1ZSwKICAgICBzaGFyZWRfbGliczogWwogICAgICAgICAibGliYmFzZSIsCi0gICAgICAgICJsaWJjZ3JvdXByYyIsCiAgICAgXSwKICAgICBzdGF0aWNfbGliczogWwogICAgICAgICAibGlianNvbmNwcCIsCisgICAgICAgICJsaWJwcm9jZXNzZ3JvdXBfdXRpbCIsCiAgICAgXSwKICAgICAvLyBmb3IgY3V0aWxzL2FuZHJvaWRfZ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dldFZlcnNpb24oY29udHJvbGxlcl8pOworICAgIHJldHVybiBjb250cm9sbGVyXy0+dmVyc2lvbigpOwogfQogCi1jb25zdCBjaGFyKiBDZ3JvdXBDb250cm9sbGVyOjpuYW1lKCkgY29uc3QgeworY29uc3QgY2hhciogQ2dyb3VwQ29udHJvbGxlcldyYXBwZXI6Om5hbWUoKSBjb25zdCB7CiAgICAgQ0hFQ0soSGFzVmFsdWUoKSk7Ci0gICAgcmV0dXJuIEFDZ3JvdXBDb250cm9sbGVyX2dldE5hbWUoY29udHJvbGxlcl8pOworICAgIHJldHVybiBjb250cm9sbGVyXy0+bmFtZSgpOwogfQogCi1jb25zdCBjaGFyKiBDZ3JvdXBDb250cm9sbGVyOjpwYXRoKCkgY29uc3QgeworY29uc3QgY2hhciogQ2dyb3VwQ29udHJvbGxlcldyYXBwZXI6OnBhdGgoKSBjb25zdCB7CiAgICAgQ0hFQ0soSGFzVmFsdWUoKSk7Ci0gICAgcmV0dXJuIEFDZ3JvdXBDb250cm9sbGVyX2dldFBhdGgoY29udHJvbGxlcl8pOworICAgIHJldHVybiBjb250cm9sbGVyXy0+cGF0aCgpOwogfQogCi1ib29sIENncm91cENvbnRyb2xsZXI6Okhhc1ZhbHVlKCkgY29uc3QgeworYm9vbCBDZ3JvdXBDb250cm9sbGVyV3JhcHBlcjo6SGFzVmFsdWUoKSBjb25zdCB7CiAgICAgcmV0dXJuIGNvbnRyb2xsZXJfICE9IG51bGxwdHI7CiB9CiAKLWJvb2wgQ2dyb3VwQ29udHJvbGxlcjo6SXNVc2FibGUoKSB7Citib29sIENncm91cENvbnRyb2xsZXJXcmFwcGVyOjpJc1VzYWJsZSgpIHsKICAgICBpZiAoIUhhc1ZhbHVlKCkpIHJldHVybiBmYWxzZTsKIAogICAgIGlmIChzdGF0ZV8gPT0gVU5LTk9XTikgewogICAgICAgICBpZiAoX19idWlsdGluX2F2YWlsYWJsZShhbmRyb2lkIDMwLCAqKSkgewotICAgICAgICAgICAgdWludDMyX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CBwcm9wZXJseSI7CiAgICAgICAgIHJldHVybjsKICAgICB9Ci0gICAgTE9HKElORk8pIDw8ICJGaWxlIHZlcnNpb24gPSAiIDw8IEFDZ3JvdXBGaWxlX2dldFZlcnNpb24oKTsKLSAgICBMT0coSU5GTykgPDwgIkZpbGUgY29udHJvbGxlciBjb3VudCA9ICIgPDwgQUNncm91cEZpbGVfZ2V0Q29udHJvbGxlckNvdW50KCk7CisgICAgTE9HKElORk8pIDw8ICJDb250cm9sbGVyIGNvdW50ID0gIiA8PCBkZXNjcmlwdG9yc18uc2l6ZSgpOwogCiAgICAgTE9HKElORk8pIDw8ICJNb3VudGVkIGNncm91cHM6IjsKIAotICAgIGF1dG8gY29udHJvbGxlcl9jb3VudCA9IEFDZ3JvdXBGaWxlX2dldENvbnRyb2xsZXJDb3VudCgpOwotICAgIGZvciAodWludDMyX3QgaSA9IDA7IGkgPCBjb250cm9sbGVyX2NvdW50OyArK2kpIHsKLSAgICAgICAgY29uc3QgQUNncm91cENvbnRyb2xsZXIqIGNvbnRyb2xsZXIgPSBBQ2dyb3VwRmlsZV9nZXRDb250cm9sbGVyKGkpOwotICAgICAgICBpZiAoX19idWlsdGluX2F2YWlsYWJsZShhbmRyb2lkIDMwLCAqKSkgewotICAgICAgICAgICAgTE9HKElORk8pIDw8ICJcdCIgPDwgQUNncm91cENvbnRyb2xsZXJfZ2V0TmFtZShjb250cm9sbGVyKSA8PCAiIHZlciAiCi0gICAgICAgICAgICAgICAgICAgICAgPDwgQUNncm91cENvbnRyb2xsZXJfZ2V0VmVyc2lvbihjb250cm9sbGVyKSA8PCAiIHBhdGggIgotICAgICAgICAgICAgICAgICAgICAgIDw8IEFDZ3JvdXBDb250cm9sbGVyX2dldFBhdGgoY29udHJvbGxlcikgPDwgIiBmbGFncyAiCi0gICAgICAgICAgICAgICAgICAgICAgPDwgQUNncm91cENvbnRyb2xsZXJfZ2V0RmxhZ3MoY29udHJvbGxlcik7Ci0gICAgICAgIH0gZWxzZSB7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AgICAgICAgIDw8ICJdIGZhaWxlZCwgUkMgZmlsZSB3YXMgbm90IGluaXRpYWxpemVkIHByb3Blcmx5IjsKLSAgICAgICAgcmV0dXJuIENncm91cENvbnRyb2xsZXIobnVsbHB0cik7CisgICAgICAgICAgICAgICAgICAgPDwgIl0gZmFpbGVkLCBjZ3JvdXBzIHdlcmUgbm90IGluaXRpYWxpemVkIHByb3Blcmx5IjsKKyAgICAgICAgcmV0dXJuIENncm91cENvbnRyb2xsZXJXcmFwcGVyKG51bGxwdHIpOwogICAgIH0KIAotICAgIGF1dG8gY29udHJvbGxlcl9jb3VudCA9IEFDZ3JvdXBGaWxlX2dldENvbnRyb2xsZXJDb3VudCgpOwotICAgIGZvciAodWludDMyX3QgaSA9IDA7IGkgPCBjb250cm9sbGVyX2NvdW50OyArK2kpIHsKLSAgICAgICAgY29uc3QgQUNncm91cENvbnRyb2xsZXIqIGNvbnRyb2xsZXIgPSBBQ2dyb3VwRmlsZV9nZXRDb250cm9sbGVyKGkpOwotICAgICAgICBpZiAobmFtZSA9PSBBQ2dyb3VwQ29udHJvbGxlcl9nZXROYW1lKGNvbnRyb2xsZXIpKSB7Ci0gICAgICAgICAgICByZXR1cm4gQ2dyb3VwQ29udHJvbGxlcihjb250cm9sbGVyKTsKLSAgICAgICAgfQorICAgIGlmIChjb25zdCBhdXRvIGl0ID0gZGVzY3JpcHRvcnNfLmZpbmQobmFtZSk7IGl0ICE9IGRlc2NyaXB0b3JzXy5lbmQoKSkgeworICAgICAgICByZXR1cm4gQ2dyb3VwQ29udHJvbGxlcldyYXBwZXIoaXQtPnNlY29uZC5jb250cm9sbGVyKCkpOwogICAgIH0KIAotICAgIHJldHVybiBDZ3JvdXBDb250cm9sbGVyKG51bGxwdHIpOworICAgIHJldHVybiBDZ3JvdXBDb250cm9sbGVyV3JhcHBlcihudWxscHRyKTsKIH0KIAotQ2dyb3VwQ29udHJvbGxlciBDZ3JvdXBNYXA6OkZpbmRDb250cm9sbGVyQnlQYXRoK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ICAgICAgICAgIH0KIAogICAgICAgICAgICAgYXV0byBwYXRoID0gU3RyaW5nUHJpbnRmKCIlcy8lcyIsIHVpZF9wYXRoLmNfc3RyKCksIGRpci0+ZF9uYW1lKTsKLSAgICAgICAgICAgIGlmIChlbXB0eV9vbmx5KSB7Ci0gICAgICAgICAgICAgICAgc3RydWN0IHN0YXQgc3Q7Ci0gICAgICAgICAgICAgICAgYXV0byBwcm9jc19maWxlID0gU3RyaW5nUHJpbnRmKCIlcy8lcyIsIHBhdGguY19zdHIoKSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFJPQ0VTU0dST1VQX0NHUk9VUF9QUk9DU19GSUxFKTsKLSAgICAgICAgICAgICAgICBpZiAoc3RhdChwcm9jc19maWxlLmNfc3RyKCksICZzdCkgPT0gLTEpIHsKLSAgICAgICAgICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBnZXQgc3RhdHMgZm9yICIgPDwgcHJvY3NfZmlsZTsKLSAgICAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGlmIChzdC5zdF9zaXplID4gMCkgewotICAgICAgICAgICAgICAgICAgICAvLyBza2lwIG5vbi1lbXB0eSBncm91cHMKLSAgICAgICAgICAgICAgICAgICAgTE9HKFZFUkJPU0UpIDw8ICJTa2lwcGluZyBub24tZW1wdHkgZ3JvdXAgIiA8PCBwYXRoOwotICAgICAgICAgICAgICAgICAgICBlbXB0eSA9IGZhbHNlOwotICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9CiAgICAgICAgICAgICBMT0coVkVSQk9TRSkgPDwgIlJlbW92aW5nICIgPDwgcGF0aDsKICAgICAgICAgICAgIGlmIChybWRpcihwYXRoLmNfc3RyKCkpID09IC0xKSB7CiAgICAgICAgICAgICAgICAgaWYgKGVycm5vICE9IEVCV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VhZHkgYmVlbiByZW1vdmVkIHdpdGggYSBzdWNjZXNzZnVsIGNhbGwKKyAgICAgICAgICAgIC8vIHRvIGtpbGxQcm9jZXNzR3JvdXAuIENhbGxlcnMgc2hvdWxkIG9ubHkgcmV0cnkgc2VuZFNpZ25hbFRvUHJvY2Vzc0dyb3VwIG9yCisgICAgICAgICAgICAvLyBraWxsUHJvY2Vzc0dyb3VwIGNhbGxzIGlmIHRoZXkgZmFpbCB3aXRob3V0IEVOT0VOVC4KKyAgICAgICAgICAgIFBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gb3BlbiAiIDw8IHByb2NzZmlsZXBhdGg7CisgICAgICAgICAgICBraWxsKC1pbml0aWFsUGlkLCBzaWduYWwpOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CisKICAgICAgICAgcGlkX3QgcGlkOwogICAgICAgICBib29sIGZpbGVfaXNfZW1wdHkgPSB0cnVlOwotICAgICAgICB3aGlsZSAoZnNjYW5mKGZkLmdldCgpLCAiJWRcbiIsICZwaWQpID09IDEgJiYgcGlkID49IDApIHsKLSAgICAgICAgICAgIHByb2Nlc3NlcysrOworICAgICAgICB3aGlsZSAoZnNjYW5mKGZwLmdldCgpLCAiJWRcbiIsICZwaWQpID09IDEgJiYgcGlkID49IDApIHsKICAgICAgICAgICAgIGZpbGVfaXNfZW1wdHkgPSBmYWxzZTsKICAgICAgICAgICAgIGlmIChwaWQgPT0gMCkgewogICAgICAgICAgICAgICAgIC8vIFNob3VsZCBuZXZlciBoYXBwZW4uLi4gIGJ1dCBpZiBpdCBkb2VzLCB0cnlpbmcgdG8ga2lsbCB0aGlzCkBAIC00MjYsNiArNDQwLDggQEAKICAgICAgICAgfQogICAgIH0KIAorICAgIHBnaWRzLmVtcGxhY2UoaW5pdGlhbFBpZCk7CisKICAgICAvLyBLaWxsIGFsbCBwcm9jZXNzIGdyb3Vwcy4KICAgICBmb3IgKGNvbnN0IGF1dG8gcGdpZCA6IHBnaWRzKS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HlfY2xvY2s6Om5vdygpIDwgdW50aWwpIHsKKworICAgICAgICAgICAgc2VuZFNpZ25hbFRvUHJvY2Vzc0dyb3VwKHVpZCwgaW5pdGlhbFBpZCwgc2lnbmFsKTsKKyAgICAgICAgICAgIGlmIChvbmNlKSB7CisgICAgICAgICAgICAgICAgcG9wdWxhdGVkID0gY2dyb3VwSXNQb3B1bGF0ZWQoZXZlbnRzX2ZkLmdldCgpKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgY29uc3Qgc3RkOjpjaHJvbm86OnN0ZWFkeV9jbG9jazo6dGltZV9wb2ludCBwb2xsX3N0YXJ0ID0KKyAgICAgICAgICAgICAgICAgICAgc3RkOjpjaHJvbm86OnN0ZWFkeV9jbG9jazo6bm93KCk7CisKKyAgICAgICAgICAgIGlmIChwb2xsX3N0YXJ0IDwgdW50aWwpCisgICAgICAgICAgICAgICAgcmV0ID0gVEVNUF9GQUlMVVJFX1JFVFJZKHBvbGwoJmZkcywgMSwgdG9NaWxsaXNlYyh1bnRpbCAtIHBvbGxfc3RhcnQpLmNvdW50KCkpKTsKKworICAgICAgICAgICAgaWYgKHJldCA9PSAtMSkgeworICAgICAgICAgICAgICAgIC8vIEZhbGxiYWNrIHRvIDVtcyBzbGVlcHMgaWYgcG9sbCBmYWlscworICAgICAgICAgICAgICAgIFBMT0coRVJST1IpIDw8ICJQb2xsIG9uICIgPDwgZXZlbnRzZmlsZSA8PCAiZmFpbGVkIjsKKyAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OmNocm9ubzo6c3RlYWR5X2Nsb2NrOjp0aW1lX3BvaW50IG5vdyA9IHN0ZDo6Y2hyb25vOjpzdGVhZHlfY2xvY2s6Om5vdygpOworICAgICAgICAgICAgICAgIGlmIChub3cgPCB1bnRpbCkKKyAgICAgICAgICAgICAgICAgICAgc3RkOjp0aGlzX3RocmVhZDo6c2xlZXBfZm9yKHN0ZDo6bWluKDVtcywgdG9NaWxsaXNlYyh1bnRpbCAtIG5vdykpKTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgTE9HKFZFUkJPU0UpIDw8ICJXYWl0ZWQgIgorICAgICAgICAgICAgICAgICAgICAgICAgIDw8IHRvTWlsbGlzZWMoc3RkOjpjaHJvbm86OnN0ZWFkeV9jbG9jazo6bm93KCkgLSBwb2xsX3N0YXJ0KS5jb3VudCgpCisgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBtcyBmb3IgIiA8PCBldmVudHNmaWxlIDw8ICIgcG9sbCI7CiAgICAgICAgIH0KIAotICAgICAgICBpZiAoIUNncm91cHNBdmFpbGFibGUoKSkgewotICAgICAgICAgICAgLy8gbm90aGluZyB0byBkbyBoZXJlLCBpZiBjZ3JvdXBzIGlzbid0IGF2YWlsYWJsZQotICAgICAgICAgICAgcmV0dXJuIDA7CisgICAgICAgIGNvbnN0IHN0ZDo6Y2hyb25vOjptaWxsaXNlY29uZHMga2lsbF9kdXJhdGlvbiA9CisgICAgICAgICAgICAgICAgdG9NaWxsaXNlYyhzdGQ6OmNocm9ubzo6c3RlYWR5X2Nsb2NrOjpub3coKSAtIHN0YXJ0KTsKKworICAgICAgICBpZiAocG9wdWxhdGVkID09IHBvcHVsYXRlZF9zdGF0dXM6OnBvcHVsYXRlZCkgeworICAgICAgICAgICAgTE9HKFdBUk5JTkcpIDw8ICJTdGlsbCB3YWl0aW5nIG9uIHByb2Nlc3MoZXMpIHRvIGV4aXQgZm9yIGNncm91cCAiIDw8IGNncm91cF92Ml9wYXRoCisgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBhZnRlciAiIDw8IGtpbGxfZHVyYXRpb24uY291bnQoKSA8PCAiIG1zIjsKKyAgICAgICAgICAgIC8vIFdlJ2xsIHN0aWxsIHRyeSB0aGUgY2dyb3VwIHJlbW92YWwgYmVsb3cgd2hpY2ggd2UgZXhwZWN0IHRvIGxvZyBhbiBlcnJvci4KKyAgICAgICAgfSBlbHNlIGlmIChw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QVXMiLAorICAgICAgIkNvbnRyb2xsZXIiOiAiY3B1c2V0IiwKKyAgICAgICJGaWxlIjogImZvcmVncm91bmRfd2luZG93L2NwdXMiCisgICAgfSwKKyAgICB7CiAgICAgICAiTmFtZSI6ICJNYXhDYXBhY2l0eUNQVXMiLAogICAgICAgIkNvbnRyb2xsZXIiOiAiY3B1c2V0IiwKICAgICAgICJGaWxlIjogInRvcC1hcHAvY3B1cyIKQEAgLTE1OSw2ICsxNjQsMTkgQEAKICAgICAgIF0KICAgICB9LAogICAgIHsKKyAgICAgICJOYW1lIjogIkhpZ2hQZXJmb3JtYW5jZVdJIiwKKyAgICAgICJBY3Rpb25zIjogWworICAgICAgICB7CisgICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCisgICAgICAgICAgIlBhcmFtcyI6CisgICAgICAgICAgeworICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAiY3B1IiwKKyAgICAgICAgICAgICJQYXRoIjogImZvcmVncm91bmRfd2luZG93IgorICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgXQorICAgIH0sCisgICAgewogICAgICAgIk5hbWUiOiAiTWF4UGVyZm9ybWFuY2UiLAogICAgICAgIkFjdGlvbnMiOiBbCiAgICAgICAgIHsKQEAgLTE4NSw2ICsyMDMsMTkgQEAKICAgICAgIF0KICAgICB9LAogICAgIHsKKyAgICAgICJOYW1lIjogIlJlYWxUaW1lSW5wdXRTY2hlZHVsaW5nIiwKKyAgICAgICJBY3Rpb25zIjogWworICAgICAgICB7CisgICAgICAgICAgIk5hbWUiOiAiU2V0U2NoZWR1bGVyUG9saWN5IiwKKyAgICAgICAgICAiUGFyYW1zIjoKKyAgICAgICAgICB7CisgICAgICAgICAgICAiUG9saWN5IjogIlNDSEVEX0ZJRk8iLAorICAgICAgICAgICAgIlByaW9yaXR5IjogIjIiCisgICAgICAgICAgfQorICAgICAgICB9CisgICAgICBdCisgICAgfSwKKyAgICB7CiAgICAgICAiTmFtZSI6ICJDYW1lcmFTZXJ2aWNlUGVyZm9ybWFuY2UiLAogICAgICAgIkFjdGlvbnMiOiBbCiAgICAgICAgIHsKQEAgLTM4Miw2ICs0MTMsMTkgQEAKICAgICAgIF0KICAgICB9LAogICAgIHsKKyAgICAgICJOYW1lIjogIlByb2Nlc3NDYXBhY2l0eUhpZ2hXSSIsCisgICAgICAiQWN0aW9ucyI6IFsKKyAgICAgICAgeworICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAorICAgICAgICAgICJQYXJhbXMiOgorICAgICAgICAgIHsKKyAgICAgICAgICAgICJDb250cm9sbGVyIjogImNwdXNldCIsCisgICAgICAgICAgICAiUGF0aCI6ICJmb3JlZ3JvdW5kX3dpbmRvdyIKKyAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgIF0KKyAgICB9LAorICAgIHsKICAgICAgICJOYW1lIjogIlByb2Nlc3NDYXBhY2l0eU1heCIsCiAgICAgICAiQWN0aW9ucyI6IFsKICAgICAgICAgewpAQCAtNTQxLDMzICs1ODUsNiBAQAogICAgIH0sCiAKICAgICB7Ci0gICAgICAiTmFtZSI6ICJQZXJmQm9vc3QiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJTZXRDbGFtcHMiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJCb29zdCI6ICI1MCUiLAotICAgICAgICAgICAgIkNsYW1wIjogIjAiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJQZXJmQ2xhbXAiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJTZXRDbGFtcHMiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJCb29zdCI6ICIwIiwKLSAgICAgICAgICAgICJDbGFtcCI6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dW5lUHJlZmVySWRsZSIsCi0gICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgIkZpbGUiOiAic2NoZWR0dW5lLnByZWZlcl9pZGxlIgotICAgIH0KLSAgXSwKLQotICAiUHJvZmlsZXMiOiBbCi0gICAgewotICAgICAgIk5hbWUiOiAiSGlnaEVuZXJneVNhdmluZyIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICJiYWNrZ3JvdW5kIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiTm9ybWFsUGVyZm9ybWFuY2UiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJKb2luQ2dyb3VwIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAiIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiU2VydmljZVBlcmZvcm1hbmNlIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogImJhY2tncm91bmQiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJIaWdoUGVyZm9ybWFuY2UiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJKb2luQ2dyb3VwIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAiZm9yZWdyb3VuZCIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIk1heFBlcmZvcm1hbmNlIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogInRvcC1hcHAiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJSZWFsdGltZVBlcmZvcm1hbmNlIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogInJ0IgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiQ2FtZXJhU2VydmljZVBlcmZvcm1hbmNlIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogImNhbWVyYS1kYWVtb24iCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJOTkFwaUhBTFBlcmZvcm1hbmNlIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogIm5uYXBpLWhhbCIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIkRleDJvYXRQZXJmb3JtYW5jZSIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICJiYWNrZ3JvdW5kIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiQ3B1UG9saWN5U3ByZWFkIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiU2V0QXR0cmlidXRlIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiTmFtZSI6ICJTVHVuZVByZWZlcklkbGUiLAotICAgICAgICAgICAgIlZhbHVlIjogIjEiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJDcHVQb2xpY3lQYWNrIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiU2V0QXR0cmlidXRlIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiTmFtZSI6ICJTVHVuZVByZWZlcklkbGUiLAotICAgICAgICAgICAgIlZhbHVlIjogIjAiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfQotICBdCi19CmRpZmYgLS1naXQgYS9saWJwcm9jZXNzZ3JvdXAvcHJvZmlsZXMvdGFza19wcm9maWxlc18yOS5qc29uIGIvbGlicHJvY2Vzc2dyb3VwL3Byb2ZpbGVzL3Rhc2tfcHJvZmlsZXNfMjkuanNvbgpkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggNjE3NGM4ZC4uMDAwMDAwMAotLS0gYS9saWJwcm9jZXNzZ3JvdXAvcHJvZmlsZXMvdGFza19wcm9maWxlc18yOS5qc29uCisrKyAvZGV2L251bGwKQEAgLTEsMTYwICswLDAgQEAKLXsKLSAgIkF0dHJpYnV0ZXMiOiBbCi0gICAgewotICAgICAgIk5hbWUiOiAiU1R1bmVCb29zdCIsCi0gICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgIkZpbGUiOiAic2NoZWR0dW5lLmJvb3N0IgotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiU1R1bmVQcmVmZXJJZGxlIiwKLSAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAiRmlsZSI6ICJzY2hlZHR1bmUucHJlZmVyX2lkbGUiCi0gICAgfQotICBdLAotCi0gICJQcm9maWxlcyI6IFsKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJIaWdoRW5lcmd5U2F2aW5nIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogImJhY2tncm91bmQiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJOb3JtYWxQZXJmb3JtYW5jZSIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICIiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJIaWdoUGVyZm9ybWFuY2UiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJKb2luQ2dyb3VwIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAiZm9yZWdyb3VuZCIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIlNlcnZpY2VQZXJmb3JtYW5jZSIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICJiYWNrZ3JvdW5kIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiTWF4UGVyZm9ybWFuY2UiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJKb2luQ2dyb3VwIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAidG9wLWFwcCIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIlJlYWx0aW1lUGVyZm9ybWFuY2UiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJKb2luQ2dyb3VwIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAicnQiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJDYW1lcmFTZXJ2aWNlUGVyZm9ybWFuY2UiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJKb2luQ2dyb3VwIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAiY2FtZXJhLWRhZW1vbiIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIk5OQXBpSEFMUGVyZm9ybWFuY2UiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJKb2luQ2dyb3VwIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAibm5hcGktaGFsIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiRGV4Mm9hdFBlcmZvcm1hbmNlIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogImJhY2tncm91bmQiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJDcHVQb2xpY3lTcHJlYWQiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJTZXRBdHRyaWJ1dGUiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJOYW1lIjogIlNUdW5lUHJlZmVySWRsZSIsCi0gICAgICAgICAgICAiVmFsdWUiOiAiMSIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIkNwdVBvbGljeVBhY2siLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJTZXRBdHRyaWJ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vbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAiYmFja2dyb3VuZCIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIk5vcm1hbFBlcmZvcm1hbmNlIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogIiIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIlNlcnZpY2VQZXJmb3JtYW5jZSIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICJiYWNrZ3JvdW5kIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiSGlnaFBlcmZvcm1hbmNlIiwKLSAgICAgICJBY3Rpb25zIjogWwotICAgICAgICB7Ci0gICAgICAgICAgIk5hbWUiOiAiSm9pbkNncm91cCIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIkNvbnRyb2xsZXIiOiAic2NoZWR0dW5lIiwKLSAgICAgICAgICAgICJQYXRoIjogImZvcmVncm91bmQiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJNYXhQZXJmb3JtYW5jZSIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICJ0b3AtYXBwIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiUmVhbHRpbWVQZXJmb3JtYW5jZSIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICJydCIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIkNhbWVyYVNlcnZpY2VQZXJmb3JtYW5jZSIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICJjYW1lcmEtZGFlbW9uIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiTk5BcGlIQUxQZXJmb3JtYW5jZSIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIkpvaW5DZ3JvdXAiLAotICAgICAgICAgICJQYXJhbXMiOgotICAgICAgICAgIHsKLSAgICAgICAgICAgICJDb250cm9sbGVyIjogInNjaGVkdHVuZSIsCi0gICAgICAgICAgICAiUGF0aCI6ICJubmFwaS1oYWwiCi0gICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICBdCi0gICAgfSwKLSAgICB7Ci0gICAgICAiTmFtZSI6ICJEZXgyb2F0UGVyZm9ybWFuY2UiLAotICAgICAgIkFjdGlvbnMiOiBbCi0gICAgICAgIHsKLSAgICAgICAgICAiTmFtZSI6ICJKb2luQ2dyb3VwIiwKLSAgICAgICAgICAiUGFyYW1zIjoKLSAgICAgICAgICB7Ci0gICAgICAgICAgICAiQ29udHJvbGxlciI6ICJzY2hlZHR1bmUiLAotICAgICAgICAgICAgIlBhdGgiOiAiYmFja2dyb3VuZCIKLSAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICAgIF0KLSAgICB9LAotICAgIHsKLSAgICAgICJOYW1lIjogIkNwdVBvbGljeVNwcmVhZCIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIlNldEF0dHJpYnV0ZSIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIk5hbWUiOiAiU1R1bmVQcmVmZXJJZGxlIiwKLSAgICAgICAgICAgICJWYWx1ZSI6ICIxIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0sCi0gICAgewotICAgICAgIk5hbWUiOiAiQ3B1UG9saWN5UGFjayIsCi0gICAgICAiQWN0aW9ucyI6IFsKLSAgICAgICAgewotICAgICAgICAgICJOYW1lIjogIlNldEF0dHJpYnV0ZSIsCi0gICAgICAgICAgIlBhcmFtcyI6Ci0gICAgICAgICAgewotICAgICAgICAgICAgIk5hbWUiOiAiU1R1bmVQcmVmZXJJZGxlIiwKLSAgICAgICAgICAgICJWYWx1ZSI6ICIwIgotICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgXQotICAgIH0KLSAgXQotfQp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ZXRUYXNrUHJvZmlsZXModGlkLCB7IkNQVVNFVF9TUF9GT1JFR1JPVU5EX1dJTkRPVyJ9LCB0cnVlKSA/IDAgOiAtMTsKICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgIGJyZWFrOwogICAgIH0KQEAgLTY0LDcgKzY3LDcgQEAKICAgICByZXR1cm4gMDsKIH0KIAotaW50IHNldF9zY2hlZF9wb2xpY3koaW50IHRpZCwgU2NoZWRQb2xpY3kgcG9saWN5KSB7CitpbnQgc2V0X3NjaGVkX3BvbGljeShwaWRfdCB0aWQsIFNjaGVkUG9saWN5IHBvbGljeSkgewogICAgIGlmICh0aWQgPT0gMCkgewogICAgICAgICB0aWQgPSBHZXRUaHJlYWRJZCgpOwogICAgIH0KQEAgLTEwOSw2ICsxMTIsOSBAQAogICAgICAgICBjYXNlIFNQX1JUX0FQUDoKICAgICAgICAgICAgIFNMT0dEKCJSVCAgdGlkICVkICglcykiLCB0aWQsIHRocmVhZF9uYW1lKTsKICAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIFNQX0ZPUkVHUk9VTkRfV0lORE9XOgorICAgICAgICAgICAgU0xPR0QoIldJICB0aWQgJWQgKCVzKSIsIHRpZCwgdGhyZWFkX25hbWUpOworICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICBTTE9HRCgiPz8/IHRpZCAlZCAoJXMpIiwgdGlkLCB0aHJlYWRfbmFtZSk7CiAgICAgICAgICAgICBicmVhazsKQEAgLTEyOCw2ICsxMzQsOCBAQAogICAgICAgICAgICAgcmV0dXJuIFNldFRhc2tQcm9maWxlcyh0aWQsIHsiU0NIRURfU1BfU1lTVEVNIn0sIHRydWUpID8gMCA6IC0xOwogICAgICAgICBjYXNlIFNQX1JUX0FQUDoKICAgICAgICAgICAgIHJldHVybiBTZXRUYXNrUHJvZmlsZXModGlkLCB7IlNDSEVEX1NQX1JUX0FQUCJ9LCB0cnVlKSA/IDAgOiA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PDwgIiBjZ3JvdXAiOwogICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgfQogCi0gICAgaWYgKGNvbnRyb2xsZXItPmZsYWdzKCkgJiBDR1JPVVBSQ19DT05UUk9MTEVSX0ZMQUdfTkVFRFNfQUNUSVZBVElPTikgewotICAgICAgICBzdGQ6OnN0cmluZyBzdHIgPSAiKyI7Ci0gICAgICAgIHN0ciArPSBjb250cm9sbGVyLT5uYW1lKCk7Ci0gICAgICAgIHN0ZDo6c3RyaW5nIHBhdGggPSBjb250cm9sbGVyLT5wYXRoKCk7Ci0gICAgICAgIHBhdGggKz0gIi9jZ3JvdXAuc3VidHJlZV9jb250cm9sIjsKLQotICAgICAgICBpZiAoIWJhc2U6OldyaXRlU3RyaW5nVG9GaWxlKHN0ciwgcGF0aCkpIHsKLSAgICAgICAgICAgIGlmIChJc09wdGlvbmFsQ29udHJvbGxlcihjb250cm9sbGVyKSkgewotICAgICAgICAgICAgICAgIFBMT0coSU5GTykgPDwgIkZhaWxlZCB0byBhY3RpdmF0ZSBvcHRpb25hbCBjb250cm9sbGVyICIgPDwgY29udHJvbGxlci0+bmFtZSgpOwotICAgICAgICAgICAgICAgIHJldHVybiB0cnVlOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgUExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBhY3RpdmF0ZSBjb250cm9sbGVyICIgPDwgY29udHJvbGxlci0+bmFtZSgpOwotICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgICAgICB9Ci0gICAgfQotCi0gICAgcmV0dXJuIHRydWU7CisgICAgcmV0dXJuIDo6QWN0aXZhdGVDb250cm9sbGVycyhjb250cm9sbGVyLT5wYXRoKCksIHt7Y29udHJvbGxlci0+bmFtZSgpLCBkZXNjcmlwdG9yfX0pOwogfQogCiBzdGF0aWMgYm9vbCBNb3VudFYxQ2dyb3VwQ29udHJvbGxlcihjb25zdCBDZ3JvdXBEZXNjcmlwdG9yJiBkZXNjcmlwdG9yKSB7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gKLSAgICAgICAgICAgICAgICB3cml0ZShmZCwgZGVzY3JpcHRvci5jb250cm9sbGVyKCksIHNpemVvZihmb3JtYXQ6OkNncm91cENvbnRyb2xsZXIpKSk7Ci0gICAgICAgIGlmIChyZXQgPCAwKSB7Ci0gICAgICAgICAgICBQTE9HKEVSUk9SKSA8PCAid3JpdGUoKSBmYWlsZWQgZm9yICIgPDwgQ0dST1VQU19SQ19QQVRIOwotICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwotICAgICAgICB9Ci0gICAgfQotCi0gICAgcmV0dXJuIHRydWU7Ci19Ci0KIENncm91cERlc2NyaXB0b3I6OkNncm91cERlc2NyaXB0b3IodWludDMyX3QgdmVyc2lvbiwgY29uc3Qgc3RkOjpzdHJpbmcmIG5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nJiBwYXRoLCBtb2RlX3QgbW9kZSwgY29uc3Qgc3RkOjpzdHJpbmcmIHVpZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIGdpZCwgdWludDMyX3QgZmxhZ3MgPSAwKQotICAgIDogY29udHJvbGxlcl8odmVyc2lvbiwgZmxhZ3MsIG5hbWUsIHBhdGgpLCBtb2RlXyhtb2RlKSwgdWlkXyh1aWQpLCBnaWRfKGdpZCkge30KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpzdHJpbmcmIGdpZCwgdWludDMyX3QgZmxhZ3MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVpbnQzMl90IG1heF9hY3RpdmF0aW9uX2RlcHRoKQorICAgIDogY29udHJvbGxlcl8odmVyc2lvbiwgZmxhZ3MsIG5hbWUsIHBhdGgsIG1heF9hY3RpdmF0aW9uX2RlcHRoKSwKKyAgICAgIG1vZGVfKG1vZGUpLAorICAgICAgdWlkXyh1aWQpLAorICAg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vbGF0aW9uKCkpIHsKKyAgICAgICAgY29uc3QgYXV0byBpdCA9IGRlc2NyaXB0b3JzLmZpbmQoQ0dST1VQVjJfSElFUkFSQ0hZX05BTUUpOworICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyBjZ3JvdXBfdjJfcm9vdCA9IChpdCA9PSBkZXNjcmlwdG9ycy5lbmQoKSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gQ0dST1VQX1YyX1JPT1RfREVGQVVMVAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBpdC0+c2Vjb25kLmNvbnRyb2xsZXIoKS0+cGF0aCgpOwogCi0gICAgLy8gY2htb2QgMDY0NCA8Q0dST1VQU19SQ19QQVRIPgotICAgIGlmIChmY2htb2RhdChBVF9GRENXRCwgQ0dST1VQU19SQ19QQVRILCAwNjQ0LCBBVF9TWU1MSU5LX05PRk9MTE9XKSA8IDApIHsKLSAgICAgICAgUExPRyhFUlJPUikgPDwgImZjaG1vZGF0KCkgZmFpbGVkIjsKLSAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICBMT0coSU5GTykgPDwgIlVzaW5nIHN5c3RlbS9hcHAgaXNvbGF0aW9uIHVuZGVyOiAiIDw8IGNncm91cF92Ml9yb290OworICAgICAgICBpZiAoIUNyZWF0ZVYyU3ViSGllcmFyY2h5KGNncm91cF92Ml9yb290ICsgIi9hcHBzIiwgZGVzY3JpcHRvcnMpIHx8CisgICAgICAgICAgICAhQ3JlYXRlVjJTdWJIaWVyYXJjaHkoY2dyb3VwX3YyX3Jvb3QgKyAiL3N5c3RlbSIsIGRlc2NyaXB0b3JzKSkgeworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICB9CiAgICAgfQogCiAgICAgcmV0dXJuIHRydWU7CmRpZmYgLS1naXQgYS9saWJwcm9jZXNzZ3JvdXAvdGFza19wcm9maWxlcy5jcHAgYi9sa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OjpFeGVjdXRlRm9yVGFzayhwaWRfdCB0aWQpIGNvbnN0IHsKICAgICBpZiAodGlkID09IDApIHsKICAgICAgICAgdGlkID0gR2V0VGhyZWFkSWQoKTsKICAgICB9CkBAIC03NTksNyArODExLDcgQEAKICAgICByZXR1cm4gdHJ1ZTsKIH0KIAotYm9vbCBUYXNrUHJvZmlsZTo6SXNWYWxpZEZvclRhc2soaW50IHRpZCkgY29uc3QgeworYm9vbCBUYXNrUHJvZmlsZTo6SXNWYWxpZEZvclRhc2socGlkX3QgdGlkKSBjb25zdCB7CiAgICAgZm9yIChjb25zdCBhdXRvJiBlbGVtZW50IDogZWxlbWVudHNfKSB7CiAgICAgICAgIGlmICghZWxlbWVudC0+SXNWYWxpZEZvclRhc2sodGlkKSkgcmV0dXJuIGZhbHNlOwogICAgIH0KQEAgLTg2NiwyMCArOTE4LDIzIEBACiAKICAgICAgICAgICAgICAgICBhdXRvIGNvbnRyb2xsZXIgPSBjZ19tYXAuRmluZENvbnRyb2xsZXIoY29udHJvbGxlcl9uYW1lKTsKICAgICAgICAgICAgICAgICBpZiAoY29udHJvbGxlci5IYXNWYWx1ZSgpKSB7Ci0gICAgICAgICAgICAgICAgICAgIHByb2ZpbGUtPkFkZChzdGQ6Om1ha2VfdW5pcXVlPFNldENncm91cEFjdGlvbj4oY29udHJvbGxlciwgcGF0aCkpOworICAgICAgICAgICAgICAgICAgICBpZiAoY29udHJvbGxlci52ZXJzaW9uKCkgPT0gMSkgeworICAgICAgICAgICAgICAgICAgICAgICAgcHJvZmlsZS0+QWRkKHN0ZDo6bWFrZV91bmlxdWU8U2V0Q2dyb3VwQWN0aW9uPihjb250cm9sbGVyLCBwYXRoKSk7CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBMT0coV0FSTklORykgPDwgIkEgSm9pbkNncm91cCBhY3Rpb24gaW4gdGhlICIgPDwgcHJvZmlsZV9uYW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIiBwcm9maWxlIGlzIHVzZWQgZm9yIGNvbnRyb2xsZXIgIiA8PCBjb250cm9sbGVyX25hbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiIGluIHRoZSBjZ3JvdXAgdjIgaGllcmFyY2h5IGFuZCB3aWxsIGJlIGlnbm9yZWQiOworICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgTE9HKFdBUk5JTkcpIDw8ICJKb2luQ2dyb3VwOiBjb250cm9sbGVyICIgPDwgY29udHJvbGxlcl9uYW1lIDw8ICIgaXMgbm90IGZvdW5kIjsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9IGVsc2UgaWYgKGFjdGlvbl9uYW1lID09ICJTZXRUaW1lclNsYWNrIikgewotICAgICAgICAgICAgICAgIHN0ZDo6c3RyaW5nIHNsYWNrX3ZhbHVlID0gcGFyYW1zX3ZhbFsiU2xhY2siXS5hc1N0cmluZygpOwotICAgICAgICAgICAgICAgIGNoYXIqIGVuZDsKLSAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIHNsYWNrOwotCi0gICAgICAgICAgICAgICAgc2xhY2sgPSBzdHJ0b3VsKHNsYWNrX3ZhbHVlLmNfc3RyKCksICZlbmQsIDEwKTsKLSAgICAgICAgICAgICAgICBpZiAoZW5kID4gc2xhY2tfdmFsdWUuY19zdHIoKSkgewotICAgICAgICAgICAgICAgICAgICBwcm9maWxlLT5BZGQoc3RkOjptYWtlX3VuaXF1ZTxTZXRUaW1lclNsYWNrQWN0aW9uPihzbGFjaykpOworICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nIHNsYWNrX3N0cmluZyA9IHBhcmFtc192YWxbIlNsYWNrIl0uYXNTdHJpbmcoKTsKKyAgICAgICAgICAgICAgICBzdGQ6Om9wdGlvbmFsPGxvbmc+IHNsYWNrID0gcmVhZExvbmcoc2xhY2tfc3RyaW5nKTsKKyAgICAgICAgICAgICAgICBpZiAoc2xhY2sgJiYgKnNsYWNrID49IDApIHsKKyAgICAgICAgICAgICAgICAgICAgcHJvZmlsZS0+QWRkKHN0ZDo6bWFrZV91bmlxdWU8U2V0VGltZXJTbGFja0FjdGlvbj4oKnNsYWNrKSk7CiAgICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgTE9HKFdBUk5JTkcpIDw8ICJTZXRUaW1lclNsYWNrOiBpbnZhbGlkIHBhcmFtZXRlcjogIiA8PCBzbGFja192YWx1ZTsKKyAgICAgICAgICAgICAgICAgICAgTE9HKFdBUk5JTkcpIDw8ICJTZXRUaW1lclNsYWNrOiBpbnZhbGlkIHBhcmFtZXRlcjogIiA8PCBzbGFja19zdHJpbmc7CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb25fbmFtZSA9PSAiU2V0QXR0cmlidXRlIikgewogICAgICAgICAgICAgICAgIHN0ZDo6c3RyaW5nIGF0dHJfbmFtZSA9IHBhcmFtc192YWxbIk5hbWUiXS5hc1N0cmluZygpOwpAQCAtODkzLDIzICs5NDgsNiBAQAogICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgIExPRyhXQVJOSU5HKSA8PCAiU2V0QXR0cmlidXRlOiB1bmtub3duIGF0dHJpYnV0ZTogIiA8PCBhdHRyX25hbWU7CiAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb25fbmFtZSA9PSAiU2V0Q2xhbXBzIikgewotICAgICAgICAgICAgICAgIHN0ZDo6c3RyaW5nIGJvb3N0X3ZhbHVlID0gcGFyYW1zX3ZhbFsiQm9vc3QiXS5hc1N0cmluZygpOwotICAgICAgICAgICAgICAgIHN0ZDo6c3RyaW5nIGNsYW1wX3ZhbHVlID0gcGFyYW1zX3ZhbFsiQ2xhbXAiXS5hc1N0cmluZygpOwotICAgICAgICAgICAgICAgIGNoYXIqIGVuZDsKLSAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGJvb3N0OwotCi0gICAgICAgICAgICAgICAgYm9vc3QgPSBzdHJ0b3VsKGJvb3N0X3ZhbHVlLmNfc3RyKCksICZlbmQsIDEwKTsKLSAgICAgICAgICAgICAgICBpZiAoZW5kID4gYm9vc3RfdmFsdWUuY19zdHIoKSkgewotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGNsYW1wID0gc3RydG91bChjbGFtcF92YWx1ZS5jX3N0cigpLCAmZW5kLCAxMCk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChlbmQgPiBjbGFtcF92YWx1ZS5jX3N0cigpKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcm9maWxlLT5BZGQoc3RkOjptYWtlX3VuaXF1ZTxTZXRDbGFtcHNBY3Rpb24+KGJvb3N0LCBjbGFtcCkpOwotICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgTE9HKFdBUk5JTkcpIDw8ICJTZXRDbGFtcHM6IGludmFsaWQgcGFyYW1ldGVyICIgPDwgY2xhbXBfdmFsdWU7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgICAgICBMT0coV0FSTklORykgPDwgIlNldENsYW1wczogaW52YWxpZCBwYXJhbWV0ZXI6ICIgPDwgYm9vc3RfdmFsdWU7Ci0gICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb25fbmFtZSA9PSAiV3JpdGVGaWxlIikgewogICAgICAgICAgICAgICAgIHN0ZDo6c3RyaW5nIGF0dHJfZmlsZXBhdGggPSBwYXJhbXNfdmFsWyJGaWxlUGF0aCJdLmFzU3RyaW5nKCk7CiAgICAgICAgICAgICAgICAgc3RkOjpzdHJpbmcgYXR0cl9wcm9jZmlsZXBhdGggPSBwYXJhbXNfdmFsWyJQcm9jRmlsZVBhdGgiXS5hc1N0cmluZygpOwpAQCAtOTI3LDYgKzk2NSw3MyBAQAogICAgICAgICAgICAgICAgICAgICBMT0coV0FSTklORykgPDwgIldyaXRlRmlsZTogaW52YWxpZCBwYXJhbWV0ZXI6ICIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICJlbXB0eSB2YWx1ZSI7CiAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfSBlbHNlIGlmIChhY3Rpb25fbmFtZSA9PSAiU2V0U2NoZWR1bGVyUG9saWN5IikgeworICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6bWFwPHN0ZDo6c3RyaW5nLCBpbnQ+IFBPTElDWV9NQVAgPSB7CisgICAgICAgICAgICAgICAgICAgIHsiU0NIRURfT1RIRVIiLCBTQ0hFRF9PVEhFUn0sCisgICAgICAgICAgICAgICAgICAgIHsiU0NIRURfQkFUQ0giLCBTQ0hFRF9CQVRDSH0sCisgICAgICAgICAgICAgICAgICAgIHsiU0NIRURfSURMRSIsIFNDSEVEX0lETEV9LAorICAgICAgICAgICAgICAgICAgICB7IlNDSEVEX0ZJRk8iLCBTQ0hFRF9GSUZPfSwKKyAgICAgICAgICAgICAgICAgICAgeyJTQ0hFRF9SUiIsIFNDSEVEX1JSfSwKKyAgICAgICAgICAgICAgICB9OworICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nIHBvbGljeV9zdHIgPSBwYXJhbXNfdmFsWyJQb2xpY3kiXS5hc1N0cmluZygpOworCisgICAgICAgICAgICAgICAgY29uc3QgYXV0byBpdCA9IFBPTElDWV9NQVAuZmluZChwb2xpY3lfc3RyKTsKKyAgICAgICAgICAgICAgICBpZiAoaXQgPT0gUE9MSUNZX01BUC5lbmQoKSkgeworICAgICAgICAgICAgICAgICAgICBMT0coV0FSTklORykgPDwgIlNldFNjaGVkdWxlclBvbGljeTogaW52YWxpZCBwb2xpY3kgIiA8PCBwb2xpY3lfc3RyOworICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICBjb25zdCBpbnQgcG9saWN5ID0gaXQtPnNlY29uZDsKKworICAgICAgICAgICAgICAgIGlmIChTZXRTY2hlZHVsZXJQb2xpY3lBY3Rpb246OmlzTm9ybWFsUG9saWN5KHBvbGljeSkpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtc192YWwuaXNNZW1iZXIoIlByaW9yaXR5IikpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIExPRyhXQVJOSU5HKSA8PCAiU2V0U2NoZWR1bGVyUG9saWN5OiBOb3JtYWwgcG9saWNpZXMgKCIgPDwgcG9saWN5X3N0cgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDw8ICIpIHVzZSBOaWNlIHZhbHVlcywgbm90IFByaW9yaXR5IHZhbHVlcyI7CisgICAgICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgICAgICBpZiAocGFyYW1zX3ZhbC5pc01lbWJlcigiTmljZSIpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiBwcmVzZW50LCB0aGlzIG9wdGlvbmFsIHZhbHVlIHdpbGwgYmUgcGFzc2VkIGluIGFuIGFkZGl0aW9uYWwgc3lzY2FsbAorICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG8gc2V0cHJpb3JpdHkoKSwgc2luY2UgdGhlIHNjaGVkX3ByaW9yaXR5IHZhbHVlIG11c3QgYmUgMCBmb3IgY2FsbHMgdG8KKyAgICAgICAgICAgICAgICAgICAgICAgIC8vIHNjaGVkX3NldHNjaGVkdWxlcigpIHdpdGggIm5vcm1hbCIgcG9saWNpZXMuCisgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyBuaWNlX3N0cmluZyA9IHBhcmFtc192YWxbIk5pY2UiXS5hc1N0cmluZygpOworICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RkOjpvcHRpb25hbDxpbnQ+IG5pY2UgPSByZWFkTG9uZyhuaWNlX3N0cmluZyk7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICghbmljZSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIExPRyhGQVRBTCkgPDwgIkludmFsaWQgbmljZSB2YWx1ZSBzcGVjaWZpZWQ6ICIgPDwgbmljZV9zdHJpbmc7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbnQgTElOVVhfTUlOX05JQ0UgPSAtMjA7CisgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbnQgTElOVVhfTUFYX05JQ0UgPSAxOTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICgqbmljZSA8IExJTlVYX01JTl9OSUNFIHx8ICpuaWNlID4gTElOVVhfTUFYX05JQ0UpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBMT0coV0FSTklORykgPDwgIlNldFNjaGVkdWxlclBvbGljeTogUHJvdmlkZWQgbmljZSAoIiA8PCAqbmljZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8PCAiKSBhcHBlYXJzIG91dCBvZiByYW5nZS4iOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgcHJvZmlsZS0+QWRkKHN0ZDo6bWFrZV91bmlxdWU8U2V0U2NoZWR1bGVyUG9saWN5QWN0aW9uPihwb2xpY3ksICpuaWNlKSk7CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwcm9maWxlLT5BZGQoc3RkOjptYWtlX3VuaXF1ZTxTZXRTY2hlZHVsZXJQb2xpY3lBY3Rpb24+KHBvbGljeSkpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHBhcmFtc192YWwuaXNNZW1iZXIoIk5pY2UiKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgTE9HKFdBUk5JTkcpIDw8ICJTZXRTY2hlZHVsZXJQb2xpY3k6IFJlYWwtdGltZSBwb2xpY2llcyAoIiA8PCBwb2xpY3lfc3RyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDwgIikgdXNlIFByaW9yaXR5IHZhbHVlcywgbm90IE5pY2UgdmFsdWVzIjsKKyAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgIC8vIFRoaXMgaXMgYSAidmlydHVhbCBwcmlvcml0eSIgYXMgZGVzY3JpYmVkIGJ5IGBtYW4gMiBzY2hlZF9nZXRfcHJpb3JpdHlfbWluYAorICAgICAgICAgICAgICAgICAgICAvLyB0aGF0IHdpbGwgYmUgbWFwcGVkIG9udG8gdGhlIGZvbGxvd2luZyByYW5nZSBmb3IgdGhlIHByb3ZpZGVkIHBvbGljeToKKyAgICAgICAgICAgICAgICAgICAgLy8gW3NjaGVkX2dldF9wcmlvcml0eV9taW4oKSwgc2NoZWRfZ2V0X3ByaW9yaXR5X21heCgpXQorCisgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0ZDo6c3RyaW5nIHByaW9yaXR5X3N0cmluZyA9IHBhcmFtc192YWxbIlByaW9yaXR5Il0uYXNTdHJpbmcoKTsKKyAgICAgICAgICAgICAgICAgICAgc3RkOjpvcHRpb25hbDxsb25nPiB2aXJ0dWFsX3ByaW9yaXR5ID0gcmVhZExvbmcocHJpb3JpdHlfc3RyaW5nKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHZpcnR1YWxfcHJpb3JpdHkgJiYgKnZpcnR1YWxfcHJpb3JpdHkgPiAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpbnQgcHJpb3JpdHk7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoU2V0U2NoZWR1bGVyUG9saWN5QWN0aW9uOjp0b1ByaW9yaXR5KHBvbGljeSwgKnZpcnR1YWxfcHJpb3JpdHksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW9yaXR5KSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2ZpbGUtPkFkZCgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0ZDo6bWFrZV91bmlxdWU8U2V0U2NoZWR1bGVyUG9saWN5QWN0aW9uPihwb2xpY3ksIHByaW9yaXR5KSk7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgICAgICAgICBMT0coV0FSTklORykgPDwgIkludmFsaWQgcHJpb3JpdHkgdmFsdWU6ICIgPDwgcHJpb3JpdHlfc3RyaW5nOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICBMT0coV0FSTklORykgPDwgIlVua25vd24gcHJvZmlsZSBhY3Rpb246ICIgPDwgYWN0aW9uX25hbWU7CiAgICAgICAgICAgICB9CkBAIC0xMDM1LDcgKzExNDAsNyBAQAogfQogCiB0ZW1wbGF0ZSA8dHlwZW5hbWUgVD4KLWJvb2wgVGFza1Byb2ZpbGVzOjpTZXRUYXNrUHJvZmlsZXMoaW50IHRpZCwgc3RkOjpzcGFuPGNvbnN0IFQ+IHByb2ZpbGVzLCBib29sIHVzZV9mZF9jYWNoZSkgeworYm9vbCBUYXNrUHJvZmlsZXM6OlNldFRhc2tQcm9maWxlcyhwaWRfdCB0aWQsIHN0ZDo6c3Bhbjxjb25zdCBUPiBwcm9maWxlcywgYm9vbCB1c2VfZmRfY2FjaGUpIHsKICAgICBib29sIHN1Y2Nlc3MgPSB0cnVlOwogICAgIGZvciAoY29uc3QgYXV0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c3RyaW5nIENHUk9VUFYyX0hJRVJBUkNIWV9OQU1FX0lOVEVSTkFMID0gImNncm91cDIiOworCitjb25zdCBjaGFyIFNFUCA9ICcvJzsKKworc3RkOjpzdHJpbmcgRGVkdXBsaWNhdGVBbmRUcmltU2VwYXJhdG9ycyhjb25zdCBzdGQ6OnN0cmluZyYgcGF0aCkgeworICAgIGJvb2wgbGFzdFdhc1NlcCA9IGZhbHNlOworICAgIHN0ZDo6c3RyaW5nIHJldDsKKworICAgIHN0ZDo6Y29weV9pZihwYXRoLmJlZ2luKCksIHBhdGguZW5kKCksIHN0ZDo6YmFja19pbnNlcnRlcihyZXQpLCBbJmxhc3RXYXNTZXBdKGNoYXIgYykgeworICAgICAgICBpZiAobGFzdFdhc1NlcCkgeworICAgICAgICAgICAgaWYgKGMgPT0gU0VQKSByZXR1cm4gZmFsc2U7CisgICAgICAgICAgICBsYXN0V2FzU2VwID0gZmFsc2U7CisgICAgICAgIH0gZWxzZSBpZiAoYyA9PSBTRVApIHsKKyAgICAgICAgICAgIGxhc3RXYXNTZXAgPSB0cnVlOworICAgICAgICB9CisgICAgICAgIHJldHVybiB0cnVlOworICAgIH0pOworCisgICAgaWYgKHJldC5sZW5ndGgoKSA+IDEgJiYgcmV0LmJhY2soKSA9PSBTRVApIHJldC5wb3BfYmFjaygpOworCisgICAgcmV0dXJuIHJldDsKK30KKwordm9pZCBNZXJnZUNncm91cFRvRGVzY3JpcHRvcnMoQ2dyb3VwRGVzY3JpcHRvck1hcCogZGVzY3JpcHRvcnMsIGNvbnN0IEpzb246OlZhbHVlJiBjZ3JvdXAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdGQ6OnN0cmluZyYgbmFtZSwgY29uc3Qgc3RkOjpzdHJpbmcmIHJvb3RfcGF0aCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBjZ3JvdXBzX3ZlcnNpb24pIHsKKyAgICBjb25zdCBzdGQ6OnN0cmluZyBjZ3JvdXBfcGF0aCA9IGNncm91cFsiUGF0aCJdLmFzU3RyaW5nKCk7CisgICAgc3RkOjpzdHJpbmcgcGF0aDsKKworICAgIGlmICghcm9vdF9wYXRoLmVtcHR5KCkpIHsKKyAgICAgICAgcGF0aCA9IHJvb3RfcGF0aDsKKyAgICAgICAgaWYgKGNncm91cF9wYXRoICE9ICIuIikgeworICAgICAgICAgICAgcGF0aCArPSAiLyI7CisgICAgICAgICAgICBwYXRoICs9IGNncm91cF9wYXRoOworICAgICAgICB9CisgICAgfSBlbHNlIHsKKyAgICAgICAgcGF0aCA9IGNncm91cF9wYXRoOworICAgIH0KKworICAgIHVpbnQzMl90IGNvbnRyb2xsZXJfZmxhZ3MgPSAwOworCisgICAgaWYgKGNncm91cFsiTmVlZHNBY3RpdmF0aW9uIl0uaXNCb29sKCkgJiYgY2dyb3VwWyJOZWVkc0FjdGl2YXRpb24iXS5hc0Jvb2woKSkgeworICAgICAgICBjb250cm9sbGVyX2ZsYWdzIHw9IENHUk9VUFJDX0NPTlRST0xMRVJfRkxBR19ORUVEU19BQ1RJVkFUSU9OOworICAgIH0KKworICAgIGlmIChjZ3JvdXBbIk9wdGlvbmFsIl0uaXNCb29sKCkgJiYgY2dyb3VwWyJPcHRpb25hbCJdLmFzQm9vbCgpKSB7CisgICAgICAgIGNvbnRyb2xsZXJfZmxhZ3MgfD0gQ0dST1VQUkNfQ09OVFJPTExFUl9GTEFHX09QVElPTkFMOworICAgIH0KKworICAgIHVpbnQzMl90IG1heF9hY3RpdmF0aW9uX2RlcHRoID0gVUlOVDMyX01BWDsKKyAgICBpZiAoY2dyb3VwLmlzTWVtYmVyKCJNYXhBY3RpdmF0aW9uRGVwdGgiKSkgeworICAgICAgICBtYXhfYWN0aXZhdGlvbl9kZXB0aCA9IGNncm91cFsiTWF4QWN0aXZhdGlvbkRlcHRoIl0uYXNVSW50KCk7CisgICAgfQorCisgICAgQ2dyb3VwRGVzY3JpcHRvciBkZXNjcmlwdG9yKAorICAgICAgICA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AiIDw8IHBhdGg7CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgIH0KKyAgICByZXR1cm4gdHJ1ZTsKK30KKwpkaWZmIC0tZ2l0IGEvbGlic3BhcnNlL0FuZHJvaWQuYnAgYi9saWJzcGFyc2UvQW5kcm9pZC5icAppbmRleCA4ZTgzZTE2Li40NDkwN2ExIDEwMDY0NAotLS0gYS9saWJzcGFyc2UvQW5kcm9pZC5icAorKysgYi9saWJzcGFyc2UvQW5kcm9pZC5icApAQCAtMjgsNiArMjgsOSBAQAogICAgICAgICAibGliYmFzZSIsCiAgICAgXSwKICAgICB0YXJnZXQ6IHsKKyAgICAgICAgZGFyd2luOiB7CisgICAgICAgICAgICBlbmFibGVkOiB0cnVlLAorICAgICAgICB9LAogICAgICAgICB3aW5kb3dzOiB7CiAgICAgICAgICAgICBlbmFibGVkOiB0cnVlLAogICAgICAgICB9LApAQCAtMzgsOSArNDEsOCBAQAogICAgIF0sCiB9CiAKLWNjX2JpbmFyeSB7CitjY19iaW5hcnlfaG9zdCB7CiAgICAgbmFtZTogInNpbWcyaW1nIiwKLSAgICBob3N0X3N1cHBvcnRlZDogdHJ1ZSwKICAgICBzcmNzOiBbCiAgICAgICAgICJzaW1nMmltZy5jcHAiLAogICAgICAgICAic3BhcnNlX2NyYzMyLmNwcCIsCkBAIC01MiwxMSArNTQsMTUgQEAKICAgICBdLAogCiAgICAgY2ZsYWdzOiBbIi1XZXJyb3IiXSwKKyAgICB0YXJnZXQ6IHsKKyAgICAgICAgZGFyd2luOiB7CisgICAgICAgICAgICBlbmFibGVkOiB0cnVlLAorICAgICAgICB9LAorICAgIH0sCiB9CiAKLWNjX2JpbmFyeSB7CitjY19iaW5hcnlfaG9zdCB7CiAgICAgbmFtZTogImltZzJzaW1nIiwKLSAgICBob3N0X3N1cHBvc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ljX2V4Y2hhbmdlKCZzdGF0c2RMb2dnZXJXcml0ZS5zb2NrLCByZXQpOwotICAgICAgICAgICAgICAgICAgICAvKiBGQUxMVEhSVSAqLworICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICB9CkBAIC0xODgsNyArMTg4LDcgQEAKICAgICAgKiAgfTsKICAgICAgKi8KIAotICAgIGhlYWRlci50aWQgPSBnZXR0aWQoKTsKKyAgICBoZWFkZXIudGlkID0gYW5kcm9pZDo6YmFzZTo6R2V0VGhyZWFkSWQoKTsKICAgICBoZWFkZXIucmVhbHRpbWUudHZfc2VjID0gdHMtPnR2X3NlYzsKICAgICBoZWFkZXIucmVhbHRpbWUudHZfbnNlYyA9IHRzLT50dl9uc2VjOwogCkBAIC0yNzIsNyArMjcyLDcgQEAKICAgICAgICAgICAgIGlmIChyZXQgPCAwKSB7CiAgICAgICAgICAgICAgICAgcmV0ID0gLWVycm5vOwogICAgICAgICAgICAgfQotICAgICAgICAvKiBGQUxMVEhSVSAqLworICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICBicmVhazsKICAgICB9CmRpZmYgLS1naXQgYS9saWJzdGF0cy9wdXNoX2NvbXBhdC9zdGF0c2Rfd3JpdGVyLmggYi9saWJzdGF0cy9wdXNoX2NvbXBhdC9zdGF0c2Rfd3JpdGVyLmgKaW5kZXggZmUyZDM3Yy4uZjAzMGI5NiAxMDA2NDQKLS0tIGEvbGlic3RhdHMvcHVzaF9jb21wYXQvc3RhdHNkX3dyaXRlci5oCisrKyBiL2xpYnN0YXRzL3B1c2hfY29tcGF0L3N0YXRzZF93cml0ZXIuaApAQCAtMjEsNiArMjEsOCBAQAogI2luY2x1ZGUgPHN0ZGF0b21pYy5oPgogI2luY2x1ZGUgPHN5cy9zb2NrZXQuaD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xzX2RlZmF1bHRzX25vZGVwcyIsCiAgICAgdmVuZG9yX2F2YWlsYWJsZTogdHJ1ZSwKICAgICBwcm9kdWN0X2F2YWlsYWJsZTogdHJ1ZSwKICAgICByZWNvdmVyeV9hdmFpbGFibGU6IHRydWUsCkBAIC02OCwxOCArNjYsNyBAQAogICAgICAgICAiLVduby1leGl0LXRpbWUtZGVzdHJ1Y3RvcnMiLAogICAgICAgICAiLURBTkRST0lEX1VUSUxTX1JFRl9CQVNFX0RJU0FCTEVfSU1QTElDSVRfQ09OU1RSVUNUSU9OIiwKICAgICBdLAotICAgIGhlYWRlcl9saWJzOiBbCi0gICAgICAgICJsaWJiYXNlX2hlYWRlcnMiLAotICAgICAgICAibGlidXRpbHNfaGVhZGVycyIsCi0gICAgXSwKLSAgICBleHBvcnRfaGVhZGVyX2xpYl9oZWFkZXJzOiBbCi0gICAgICAgICJsaWJ1dGlsc19oZWFkZXJzIiwKLSAgICBdLAogCi0gICAgc2hhcmVkX2xpYnM6IFsKLSAgICAgICAgImxpYmN1dGlscyIsCi0gICAgICAgICJsaWJsb2ciLAotICAgIF0sCiAgICAgc2FuaXRpemU6IHsKICAgICAgICAgbWlzY191bmRlZmluZWQ6IFsiaW50ZWdlciJdLAogICAgIH0sCkBAIC0xMjAsMTEgKzEwNywyMyBAQAogICAgICAgICB9LAogICAgIH0sCiAgICAgZnV6el9jb25maWc6IHsKLSAgICAgICBjYzogWyJzbW9yZWxhbmRAZ29vZ2xlLmNvbSJdLAorICAgICAgICBjYzogWyJzbW9yZWxhbmRAZ29vZ2xlLmNvbSJdLAogICAgIH0sCiB9CiAKIGNjX2RlZmF1bHRzIHsKKyAgICBuYW1lOiAibGlidXRpbHNfZGVmYXVsdHMiLAorICAgIGRlZmF1bHRzOiBbCisgICAgICAgICJsaWJ1dGlsc19kZWZhdWx0c19ub2RlcHMiLAorICAgIF0sCisKKyAgICBzaGFyZWRfbGliczogWworICAgICAgICAibGliY3V0aWxzIiwKKyAgICAgICAgImxpYmxvZyIsCisgICAgXSwKK30KKworY2NfZGVmYXVsdHMgewogICAgIG5hbWU6ICJsaWJ1dGlsc19pbXBsX2RlZmF1bHRzIiwKICAgICBkZWZhdWx0czogWwogICAgICAgICAibGlidXRpbHNfZGVmYXVsdHMiLApAQCAtMTMyLDI1ICsxMzEsMjcgQEAKICAgICBdLAogICAgIG5hdGl2ZV9icmlkZ2Vfc3VwcG9ydGVkOiB0cnVlLAogCisgICAgd2hvbGVfc3RhdGljX2xpYnM6IFsibGlidXRpbHNfYmluZGVyIl0sCisKKyAgICBoZWFkZXJfbGliczogWworICAgICAgICAibGliYmFzZV9oZWFkZXJzIiwKKyAgICAgICAgImxpYnV0aWxzX2hlYWRlcnMiLAorICAgIF0sCisgICAgZXhwb3J0X2hlYWRlcl9saWJfaGVhZGVyczogWworICAgICAgICAibGlidXRpbHNfaGVhZGVycyIsCisgICAgXSwKKwogICAgIHNyY3M6IFsKLSAgICAgICAgIkVycm9ycy5jcHAiLAogICAgICAgICAiRmlsZU1hcC5jcHAiLAogICAgICAgICAiSmVua2luc0hhc2guY3BwIiwKICAgICAgICAgIkxpZ2h0UmVmQmFzZS5jcHAiLAogICAgICAgICAiTmF0aXZlSGFuZGxlLmNwcCIsCiAgICAgICAgICJQcmludGVyLmNwcCIsCi0gICAgICAgICJSZWZCYXNlLmNwcCIsCi0gICAgICAgICJTaGFyZWRCdWZmZXIuY3BwIiwKICAgICAgICAgIlN0b3BXYXRjaC5jcHAiLAotICAgICAgICAiU3RyaW5nOC5jcHAiLAotICAgICAgICAiU3RyaW5nMTYuY3BwIiwKLSAgICAgICAgIlN0cm9uZ1BvaW50ZXIuY3BwIiwKICAgICAgICAgIlN5c3RlbUNsb2NrLmNwcCIsCiAgICAgICAgICJUaHJlYWRzLmNwcCIsCiAgICAgICAgICJUaW1lcnMuY3BwIiwKICAgICAgICAgIlRva2VuaXplci5jcHAiLAotICAgICAgICAiVW5pY29kZS5jcHAiLAotICAgICAgICAiVmVjdG9ySW1wbC5jcHAiLAogICAgICAgICAibWlzYy5jcHAiLAogICAgIF0sCiAKQEAgLTE4MCwxNSArMTgxLDI1IEBACiAgICAgbmFtZTogImxpYnV0aWxzIiwKICAgICBkZWZhdWx0czogWyJsaWJ1dGlsc19pbXBsX2RlZmF1bHRzIl0sCiAKLSAgICB2bmRrOiB7Ci0gICAgICAgIGVuYWJsZWQ6IHRydWUsCi0gICAgICAgIHN1cHBvcnRfc3lzdGVtX3Byb2Nlc3M6IHRydWUsCi0gICAgfSwKKyAgICBkb3VibGVfbG9hZGFibGU6IHRydWUsCiAKLSAgICBoZWFkZXJfYWJpX2NoZWNrZXI6IHsKLSAgICAgICAgLy8gQUZETyBhZmZlY3RzIHdlYWsgc3ltYm9scy4KLSAgICAgICAgZGlmZl9mbGFnczogWyItYWxsb3ctYWRkaW5nLXJlbW92aW5nLXdlYWstc3ltYm9scyJdLAotICAgICAgICByZWZfZHVtcF9kaXJzOiBbImFiaS1kdW1wcyJdLAorICAgIHRhcmdldDogeworICAgICAgICBwcm9kdWN0OiB7CisgICAgICAgICAgICBoZWFkZXJfYWJpX2NoZWNrZXI6IHsKKyAgICAgICAgICAgICAgICBlbmFibGVkOiB0cnVlLAorICAgICAgICAgICAgICAgIC8vIEFGRE8gYWZmZWN0cyB3ZWFrIHN5bWJvbHMuCisgICAgICAgICAgICAgICAgZGlmZl9mbGFnczogWyItYWxsb3ctYWRkaW5nLXJlbW92aW5nLXdlYWstc3ltYm9scyJdLAorICAgICAgICAgICAgICAgIHJlZl9kdW1wX2RpcnM6IFsiYWJpLWR1bXBzIl0sCisgICAgICAgICAgICB9LAorICAgICAgICB9LAorICAgICAgICB2ZW5kb3I6IHsKKyAgICAgICAgICAgIGhlYWRlcl9hYmlfY2hlY2tlcjogeworICAgICAgICAgICAgICAgIGVuYWJsZWQ6IHRydWUsCisgICAgICAgICAgICAgICAgLy8gQUZETyBhZmZlY3RzIHdlYWsgc3ltYm9scy4KKyAgICAgICAgICAgICAgICBkaWZmX2Z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AKICAgICAgICAgImxpYmJhc2UiLAogICAgICAgICAibGlibG9nIiwKICAgICBdLAorICAgIGZ1enpfY29uZmlnOiB7CisgICAgICAgIGNjOiBbCisgICAgICAgICAgICAic21vcmVsYW5kQGdvb2dsZS5jb20iLAorICAgICAgICBdLAorICAgICAgICBjb21wb25lbnRpZDogMTI4NTc3LAorICAgICAgICBkZXNjcmlwdGlvbjogIlRoZSBmdXp6ZXIgdGFyZ2V0cyB0aGUgQVBJcyBvZiBsaWJ1dGlscyIsCisgICAgICAgIHZlY3RvcjogImxvY2FsX25vX3ByaXZpbGVnZXNfcmVxdWlyZWQiLAorICAgICAgICBzZXJ2aWNlX3ByaXZpbGVnZTogInByaXZpbGVnZWQiLAorICAgICAgICB1c2VyczogIm11bHRpX3VzZXIiLAorICAgICAgICBmdXp6ZWRfY29kZV91c2FnZTogInNoaXBwZWQiLAorICAgIH0sCiB9CiAKIGNjX2Z1enogewpAQCAtMjY0LDI0ICsyOTEsNiBAQAogfQogCiBjY19mdXp6IHsKLSAgICBuYW1lOiAibGlidXRpbHNfZnV6el9zdHJpbmc4IiwKLSAgICBkZWZhdWx0czogWyJsaWJ1dGlsc19mdXp6X2RlZmF1bHRzIl0sCi0gICAgc3JjczogWyJTdHJpbmc4X2Z1enouY3BwIl0sCi19Ci0KLWNjX2Z1enogewotICAgIG5hbWU6ICJsaWJ1dGlsc19mdXp6X3N0cmluZzE2IiwKLSAgICBkZWZhdWx0czogWyJsaWJ1dGlsc19mdXp6X2RlZmF1bHRzIl0sCi0gICAgc3JjczogWyJTdHJpbmcxNl9mdXp6LmNwcCJdLAotfQotCi1jY19mdXp6IHsKLSAgICBuYW1lOiAibGlidXRpbHNfZnV6el92ZWN0b3IiLAotICAgIGRlZmF1bHRzOiBbImxpYnV0aWxzX2Z1enpfZGVmYXVsdHMiXSwKLSAgICBzcmNzOiBbIlZlY3Rvcl9mdXp6LmNwcCJdLAotfQotCi1jY19mdXp6IHsKICAgICBuYW1lOiAibGlidXRpbH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ICAgICBdLAogCiAgICAgdGFyZ2V0OiB7CkBAIC0zNjMsNyArMzU5LDYgQEAKICAgICAgICAgbGludXg6IHsKICAgICAgICAgICAgIHNyY3M6IFsKICAgICAgICAgICAgICAgICAiTG9vcGVyX3Rlc3QuY3BwIiwKLSAgICAgICAgICAgICAgICAiUmVmQmFzZV90ZXN0LmNwcCIsCiAgICAgICAgICAgICBdLAogICAgICAgICB9LAogICAgICAgICBob3N0OiB7CkBAIC0zNzQsNiArMzY5LDcgQEAKICAgICAgICAgICAgICAgICAibGlidW53aW5kc3RhY2tfbm9fZGV4IiwKICAgICAgICAgICAgICAgICAibGlidXRpbHMiLAogICAgICAgICAgICAgICAgICJsaWJ1dGlsc2NhbGxzdGFjayIsCisgICAgICAgICAgICAgICAgImxpYnoiLAogICAgICAgICAgICAgXSwKICAgICAgICAgfSwKICAgICB9LApAQCAtNDE3LDkgKzQxMywzIEBACiAgICAgc2hhcmVkX2xpYnM6IFsibGlidXRpbHNfdGVzdF9zaW5nbGV0b24xIl0sCiAgICAgaGVhZGVyX2xpYnM6IFsibGlidXRpbHNfaGVhZGVycyJdLAogfQotCi1jY19iZW5jaG1hcmsgewotICAgIG5hbWU6ICJsaWJ1dGlsc19iZW5jaG1hcmsiLAotICAgIHNyY3M6IFsiVmVjdG9yX2JlbmNobWFyay5jcHAiXSwKLSAgICBzaGFyZWRfbGliczogWyJsaWJ1dGlscyJdLAotfQpkaWZmIC0tZ2l0IGEvbGlidXRpbHMvQ2FsbFN0YWNrLmNwcCBiL2xpYnV0aWxzL0NhbGxTdGFjay5jcHAKaW5kZXggNGRjYjM1Yi4uMDI5ZjRhNyAxMDA2NDQKLS0tIGEvbGlidXRpbHMvQ2FsbFN0YWNrLmNwcAorKysgYi9saWJ1dGlscy9DYWxsU3RhY2suY3BwCkBAIC0xOCw3ICsxOCw3IEBACiAKICNpbmNsdWRlIDx1dGlscy9QcmludGVyLmg+CiAjaW5jbHVkZSA8dXRpbHMvRXJyb3JzLmg+Ci0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YgZGVmaW5lZChfX0FORFJPSURfXykKK1RFU1QoQ2FsbFN0YWNrVGVzdCwgbG9nX3N0YWNrKSB7CisgICAgYW5kcm9pZDo6Q2FsbFN0YWNrOjpsb2dTdGFjaygiY2FsbHN0YWNrX3Rlc3QiKTsKKyAgICBhdXRvIGxvZ2dlcl9saXN0ID0gYW5kcm9pZF9sb2dnZXJfbGlzdF9vcGVuKGFuZHJvaWRfbmFtZV90b19sb2dfaWQoIm1haW4iKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFORFJPSURfTE9HX05PTkJMT0NLLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSU5UX01BWCAvKiB0YWlsICovLCBnZXRwaWQoKSk7CisgICAgQVNTRVJUX05FKG51bGxwdHIsIGxvZ2dlcl9saXN0KTsKKyAgICBzdGQ6OnN0cmluZyBsb2c7CisgICAgd2hpbGUgKHRydWUpIHsKKyAgICAgICAgbG9nX21zZyBsb2dfbXNnOworICAgICAgICBhdXRvIHJldCA9IGFuZHJvaWRfbG9nZ2VyX2xpc3RfcmVhZChsb2dnZXJfbGlzdCwgJmxvZ19tc2cpOworICAgICAgICBpZiAocmV0ID09IC1FQUdBSU4pIHsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIEFTU0VSVF9HVChyZXQsIDApOworICAgICAgICBpZiAobG9nX21zZy5tc2coKSA9PSBudWxscHRyKSB7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICAvLyBGaXJzdCBnZXQgdGhlIHRhZy4KKyAgICAgICAgY2hhciogbXNnID0gJmxvZ19tc2cubXNnKClbMV07CisgICAgICAgIGlmIChzdGQ6OnN0cmluZyhtc2cpICE9ICJjYWxsc3RhY2tfdGVzdCIpIHsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIC8vIE5vdyBtb3ZlIHBhc3Q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mlsZSAnJXMnOiAlcyIsIGZpbGVuYW1lLnN0cmluZygpLCBzdHJlcnJvcihlcnJubykpOworICAgICAgICAgICAgQUxPR0UoIkVycm9yIGdldHRpbmcgc2l6ZSBvZiBmaWxlICclcyc6ICVzIiwgZmlsZW5hbWUuY19zdHIoKSwgc3RyZXJyb3IoZXJybm8pKTsKICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgIHNpemVfdCBsZW5ndGggPSBzaXplX3Qoc3RhdC5zdF9zaXplKTsKIApAQCAtODAsNyArODAsNyBAQAogICAgICAgICAgICAgICAgIHNzaXplX3QgbnJkID0gcmVhZChmZCwgYnVmZmVyLCBsZW5ndGgpOwogICAgICAgICAgICAgICAgIGlmIChucmQgPCAwKSB7CiAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IC1lcnJubzsKLSAgICAgICAgICAgICAgICAgICAgQUxPR0UoIkVycm9yIHJlYWRpbmcgZmlsZSAnJXMnOiAlcyIsIGZpbGVuYW1lLnN0cmluZygpLCBzdHJlcnJvcihlcnJubykpOworICAgICAgICAgICAgICAgICAgICBBTE9HRSgiRXJyb3IgcmVhZGluZyBmaWxlICclcyc6ICVzIiwgZmlsZW5hbWUuY19zdHIoKSwgc3RyZXJyb3IoZXJybm8pKTsKICAgICAgICAgICAgICAgICAgICAgZGVsZXRlW10gYnVmZmVyOwogICAgICAgICAgICAgICAgICAgICBidWZmZXIgPSBudWxscHRyOwogICAgICAgICAgICAgICAgIH0gZWxzZSB7CkBAIC0xMDYsNyArMTA2LDcgQEAKIAogU3RyaW5nOCBUb2tlbml6ZXI6OmdldExvY2F0aW9uKCkgY29uc3QgewogICAgIFN0cmluZzggcmVzdWx0OwotICAgIHJlc3VsdC5hcHBlbmRGb3JtYXQoIiVzOiVkIiwgbUZpbGVuYW1lLnN0cmluZygpLCBtTGluZU51bWJlcik7CisgICAgcmVzdWx0LmFwcGVuZEZvcm1hdCgiJXM6JWQiLCBtRmlsZW5hbWUuY19zdHIoKSwgbU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9LAogICB7CkBAIC0xMDgsMjQgKzkzLDE4IEBACiAgICAiaXNfdW5zaWduZWQiIDogdHJ1ZSwKICAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSWMiLAogICAgIm5hbWUiIDogImNoYXIiLAotICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWMiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSWMiLAogICAgInNpemUiIDogMQogICB9LAogICB7CiAgICAiYWxpZ25tZW50IiA6IDgsCiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElkIiwKICAgICJuYW1lIiA6ICJkb3VibGUiLAotICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSWQiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSWQiLAogICAgInNpemUiIDogOAogICB9LAogICB7CiAgICAiYWxpZ25tZW50IiA6IDQsCiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElmIiwKICAgICJuYW1lIiA6ICJmbG9hdCIsCi0gICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJZiIsCi0gICAic2VsZl90eXBlIiA6ICJfWlRJZiIsCiAgICAic2l6ZSIgOiA0CiAgIH0sCiAgIHsKQEAgLTEzNCw4ICsxMTMsNiBAQAogICAgImlzX3Vuc2lnbmVkIiA6IHRydWUsCiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEloIiwKICAgICJuYW1lIiA6ICJ1bnNpZ25lZCBjaGFyIiwKLSAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEloIiwKLSAgICJzZWxmX3R5cGUiIDogIl9aVEloIiwKICAgICJzaXplIiA6IDEKICAgfSwKICAgewpAQCAtMTQzLDggKzEyMCw2IEBACiAgICAiaXNfaW50ZWdyYWwiIDogdHJ1ZSwKICAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSWkiLAogICAgIm5hbWUiIDogImludCIsCi0gICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaSIsCi0gICAic2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yb2lkOjpJTlZBTElEX09QRVJBVElPTiIKKyAgICB9LAorICAgIHsKKyAgICAgImVudW1fZmllbGRfdmFsdWUiIDogLTIyLAorICAgICAibmFtZSIgOiAiYW5kcm9pZDo6QkFEX1ZBTFVFIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMjE0NzQ4MzY0NywKKyAgICAgIm5hbWUiIDogImFuZHJvaWQ6OkJBRF9UWVBFIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMiwKKyAgICAgIm5hbWUiIDogImFuZHJvaWQ6Ok5BTUVfTk9UX0ZPVU5EIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMSwKKyAgICAgIm5hbWUiIDogImFuZHJvaWQ6OlBFUk1JU1NJT05fREVOSUVEIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMTksCisgICAgICJuYW1lIiA6ICJhbmRyb2lkOjpOT19JTklUIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMTcsCisgICAgICJuYW1lIiA6ICJhbmRyb2lkOjpBTFJFQURZX0VYSVNUUyIKKyAgICB9LAorICAgIHsKKyAgICAgImVudW1fZmllbGRfdmFsdWUiIDogLTMyLAorICAgICAibmFtZSIgOiAiYW5kcm9pZDo6REVBRF9PQkpFQ1QiCisgICAgfSwKKyAgICB7CisgICAgICJlbnVtX2ZpZWxkX3ZhbHVlIiA6IC0yMTQ3NDgzNjQ2LAorICAgICAibmFtZSIgOiAiYW5kcm9pZDo6RkFJTEVEX1RSQU5TQUNUSU9OIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtNzUsCisgICAgICJuYW1lIiA6ICJhbmRyb2lkOjpCQURfSU5ERVgiCisgICAgfSwKKyAgICB7CisgICAgICJlbnVtX2ZpZWxkX3ZhbHVlIiA6IC02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BlIiA6ICJfWlRJUktON2FuZHJvaWQ4U3RyaW5nMTZFIiwKICAgICJzaXplIiA6IDgsCi0gICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYnV0aWxzL2luY2x1ZGUvdXRpbHMvU3RyaW5nOC5oIgorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJ1dGlscy9iaW5kZXIvaW5jbHVkZS91dGlscy9TdHJpbmcxNi5oIgogICB9LAogICB7CiAgICAiYWxpZ25tZW50IiA6IDgsCiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElSS2EiLAogICAgIm5hbWUiIDogImNvbnN0IHNpZ25lZCBjaGFyICYiLAogICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSUthIiwKLSAgICJzZWxmX3R5cGUiIDogIl9aVElSS2EiLAogICAgInNpemUiIDogOCwKICAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGlidXRpbHMvaW5jbHVkZS91dGlscy9UeXBlSGVscGVycy5oIgogICB9LApAQCAtMTAwMDAsNyArMTAxNTksNiBAQAogICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJUktiIiwKICAgICJuYW1lIiA6ICJjb25zdCBib29sICYiLAogICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSUtiIiwKLSAgICJzZWxmX3R5cGUiIDogIl9aVElSS2IiLAogICAgInNpemUiIDogOCwKICAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGlidXRpbHMvaW5jbHVkZS91dGlscy9UeXBlSGVscGVycy5oIgogICB9LApAQCAtMTAwMDksNyArMTAxNjcsNiBAQAogICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJUktkIiwKICAgICJuYW1lIiA6ICJjb25zdCBkb3VibGUgJiIsCiAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJS2QiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSVJLZCIsCiAg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AgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEltIgorICAgIH0sCisgICAgeworICAgICAiYWNjZXNzIiA6ICJwcml2YXRlIiwKKyAgICAgImZpZWxkX25hbWUiIDogIm1GbGFncyIsCisgICAgICJmaWVsZF9vZmZzZXQiIDogMTkyLAorICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJS2oiCisgICAgfSwKKyAgICB7CisgICAgICJhY2Nlc3MiIDogInByaXZhdGUiLAorICAgICAiZmllbGRfbmFtZSIgOiAibUl0ZW1TaXplIiwKKyAgICAgImZpZWxkX29mZnNldCIgOiAyNTYsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElLbSIKKyAgICB9CisgICBdLAorICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJTjdhbmRyb2lkMTBWZWN0b3JJbXBsRSIsCisgICAibmFtZSIgOiAiYW5kcm9pZDo6VmVjdG9ySW1wbCIsCisgICAicmVjb3JkX2tpbmQiIDogImNsYXNzIiwKKyAgICJzZWxmX3R5cGUiIDogIl9aVElON2FuZHJvaWQxMFZlY3RvckltcGxFI09EUjpvdXQvc29vbmcvLmludGVybWVkaWF0ZXMvc3lzdGVtL2NvcmUvbGlidXRpbHMvYmluZGVyL2xpYnV0aWxzX2JpbmRlci9hbmRyb2lkX3ZlbmRvcl9hcm02NF9hcm12OC1hX2NvcnRleC1hNTNfc3RhdGljX2FmZG8tbGlidXRpbHMvb2JqL3N5c3RlbS9jb3JlL2xpYnV0aWxzL2JpbmRlci9SZWZCYXNlLnNkdW1wIiwKKyAgICJzaXplIiA6IDQwLAorICAgInNvdXJjZV9maWxlIiA6ICJzeXN0ZW0vY29yZS9saWJ1dGlscy9iaW5kZXIvaW5jbHVkZS91dGlscy9WZWN0b3JJbXBsLmgiLAorICAgInZ0YWJsZV9jb21wb25lbnRzIiA6CisgICBbCisgICAgeworICAgICAia2luZCIgOiAib2Zmc2V0X3RvX3RvcCIKKyAgICB9LAorICAgIHsKKyAgICAgImtpbmQiIDogInJ0dGkiLAorICAgICAibWFuZ2xlZF9jb21wb25lbnRfbmFtZSIgOiAiX1pUSU43YW5kcm9pZDEwVmVjdG9ySW1wbEUiCisgICAgfSwKKyAgICB7CisgICAgICJraW5kIiA6ICJjb21wbGV0ZV9kdG9yX3BvaW50ZXIiLAorICAgICAibWFuZ2xlZF9jb21wb25lbnRfbmFtZSIgOiAiX1pON2FuZHJvaWQxMFZlY3RvckltcGxEMUV2IgorICAgIH0sCisgICAgeworICAgICAia2luZCIgOiAiZGVsZXRpbmdfZHRvcl9wb2ludGVyIiwKKyAgICAgIm1hbmdsZWRfY29tcG9uZW50X25hbWUiIDogIl9aTjdhbmRyb2lkMTBWZWN0b3JJbXBsRDBFdiIKKyAgICB9LAorICAgIHsKKyAgICAgImlzX3B1cmUiIDogdHJ1ZSwKKyAgICAgIm1hbmdsZWRfY29tcG9uZW50X25hbWUiIDogIl9aTks3YW5kcm9pZDEwVmVjdG9ySW1wbDEyZG9fY29uc3RydWN0RVB2bSIKKyAgICB9LAorICAgIHsKKyAgICAgImlzX3B1cmUiIDogdHJ1ZSwKKyAgICAgIm1hbmdsZWRfY29tcG9uZW50X25hbWUiIDogIl9aTks3YW5kcm9pZDEwVmVjdG9ySW1wbDEwZG9fZGVzdHJveUVQdm0iCisgICAgfSwKKyAgICB7CisgICAgICJpc19wdXJlIiA6IHRydWUsCisgICAgICJtYW5nbGVkX2NvbXBvbmVudF9uYW1lIiA6ICJfWk5LN2FuZHJvaWQxMFZlY3RvckltcGw3ZG9fY29weUVQdlBLdm0iCisgICAgfSwKKyAgICB7CisgICAgICJpc19wdXJlIiA6IHRydWUsCisgICAgICJtYW5nbGVkX2NvbXBvbmVudF9uYW1lIiA6ICJfWk5LN2FuZHJvaWQxMFZlY3RvckltcGw4ZG9fc3BsYXRFUHZQS3ZtIgorICAgIH0sCisgICAgeworICAgICAiaXNfcHVyZSIgOiB0cnVlLAorICAgICAibWFuZ2xlZF9jb21wb25lbnR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IgOiAiX1pUSURpIiwKICAgICJuYW1lIiA6ICJjaGFyMzJfdCIsCi0gICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJRGkiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSURpIiwKICAgICJzaXplIiA6IDQKICAgfSwKICAgewogICAgImFsaWdubWVudCIgOiA0LAogICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJRG4iLAogICAgIm5hbWUiIDogInN0ZDo6bnVsbHB0cl90IiwKLSAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElEbiIsCi0gICAic2VsZl90eXBlIiA6ICJfWlRJRG4iLAogICAgInNpemUiIDogNAogICB9LAogICB7CkBAIC03OSw4ICs3MCw2IEBACiAgICAiaXNfdW5zaWduZWQiIDogdHJ1ZSwKICAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSURzIiwKICAgICJuYW1lIiA6ICJjaGFyMTZfdCIsCi0gICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJRHMiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSURzIiwKICAgICJzaXplIiA6IDIKICAgfSwKICAgewpAQCAtODgsOCArNzcsNiBAQAogICAgImlzX2ludGVncmFsIiA6IHRydWUsCiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElhIiwKICAgICJuYW1lIiA6ICJzaWduZWQgY2hhciIsCi0gICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJYSIsCi0gICAic2VsZl90eXBlIiA6ICJfWlRJYSIsCiAgICAic2l6ZSIgOiAxCiAgIH0sCiAgIHsKQEAgLTk4LDggKzg1LDYgQEAKICAgICJpc191bnNpZ25lZCIgOiB0cnVlLAogICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJYiIsCiAgICAibmFtZSIgOiAiYm9vbCIsCi0gICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJYiIsCi0gICAic2VsZl90eXBlIiA6ICJfWlRJYiIsCiAgICAic2l6ZSIgO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Il9aVElpIiwKLSAgICJzZWxmX3R5cGUiIDogIl9aVElpIiwKICAgICJzaXplIiA6IDQKICAgfSwKICAgewpAQCAtMTUzLDggKzEyOCw2IEBACiAgICAiaXNfdW5zaWduZWQiIDogdHJ1ZSwKICAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSWoiLAogICAgIm5hbWUiIDogInVuc2lnbmVkIGludCIsCi0gICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJaiIsCi0gICAic2VsZl90eXBlIiA6ICJfWlRJaiIsCiAgICAic2l6ZSIgOiA0CiAgIH0sCiAgIHsKQEAgLTE2Miw4ICsxMzUsNiBAQAogICAgImlzX2ludGVncmFsIiA6IHRydWUsCiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElsIiwKICAgICJuYW1lIiA6ICJsb25nIiwKLSAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElsIiwKLSAgICJzZWxmX3R5cGUiIDogIl9aVElsIiwKICAgICJzaXplIiA6IDQKICAgfSwKICAgewpAQCAtMTcyLDggKzE0Myw2IEBACiAgICAiaXNfdW5zaWduZWQiIDogdHJ1ZSwKICAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSW0iLAogICAgIm5hbWUiIDogInVuc2lnbmVkIGxvbmciLAotICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSW0iLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSW0iLAogICAgInNpemUiIDogNAogICB9LAogICB7CkBAIC0xODEsOCArMTUwLDYgQEAKICAgICJpc19pbnRlZ3JhbCIgOiB0cnVlLAogICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJcyIsCiAgICAibmFtZSIgOiAic2hvcnQiLAotICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSXMiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSXMiLAogICAgInNpemUiIDogMgogICB9LAogICB7CkBAIC0xOTEsMjMgKzE1OCwxNyBAQAogICAgImlzX3Vuc2lnbmVkIiA6IHRydWUsCiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEl0IiwKICAgICJuYW1lIiA6ICJ1bnNpZ25lZCBzaG9ydCIsCi0gICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJdCIsCi0gICAic2VsZl90eXBlIiA6ICJfWlRJdCIsCiAgICAic2l6ZSIgOiAyCiAgIH0sCiAgIHsKICAgICJsaW5rZXJfc2V0X2tleSIgOiAiX1pUSXYiLAotICAgIm5hbWUiIDogInZvaWQiLAotICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSXYiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSXYiCisgICAibmFtZSIgOiAidm9pZCIKICAgfSwKICAgewogICAgImFsaWdubWVudCIgOiA4LAogICAgImlzX2ludGVncmFsIiA6IHRydWUsCiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVEl4IiwKICAgICJuYW1lIiA6ICJsb25nIGxvbmciLAotICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSXgiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSXgiLAogICAgInNpemUiIDogOAogICB9LAogICB7CkBAIC0yMTYsOCArMTc3LDYgQEAKICAgICJpc191bnNpZ25lZCIgOiB0cnVlLAogICAgImxpbmtlcl9zZXRfa2V5IiA6ICJfWlRJeSIsCiAgICAibmFtZSIgOiAidW5zaWduZWQgbG9uZyBsb25nIiwKLSAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVEl5IiwKLSAgICJzZWxmX3R5cGUiIDogIl9aVEl5IiwKICAgICJzaXplIiA6IDgKICAgfQogIF0sCkBAIC00OTEsMTUgKzQ1MCw0MCBAQAogICAgIm5hbWUiIDogIl9aTjdhbmRyb2lkMjdhZGRfc3lzcHJvcF9jaGFuZ2VfY2FsbGJhY2tFUEZ2dkVpIgogICB9LAogICB7CisgICAiYmluZGluZyIgOiAid2VhayIsCisgICAibmFtZSIgOiAiX1pON2FuZHJvaWQyc3B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dmFsdWUiIDogLTIyLAorICAgICAibmFtZSIgOiAiYW5kcm9pZDo6QkFEX1ZBTFVFIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMjE0NzQ4MzY0NywKKyAgICAgIm5hbWUiIDogImFuZHJvaWQ6OkJBRF9UWVBFIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMiwKKyAgICAgIm5hbWUiIDogImFuZHJvaWQ6Ok5BTUVfTk9UX0ZPVU5EIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMSwKKyAgICAgIm5hbWUiIDogImFuZHJvaWQ6OlBFUk1JU1NJT05fREVOSUVEIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMTksCisgICAgICJuYW1lIiA6ICJhbmRyb2lkOjpOT19JTklUIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtMTcsCisgICAgICJuYW1lIiA6ICJhbmRyb2lkOjpBTFJFQURZX0VYSVNUUyIKKyAgICB9LAorICAgIHsKKyAgICAgImVudW1fZmllbGRfdmFsdWUiIDogLTMyLAorICAgICAibmFtZSIgOiAiYW5kcm9pZDo6REVBRF9PQkpFQ1QiCisgICAgfSwKKyAgICB7CisgICAgICJlbnVtX2ZpZWxkX3ZhbHVlIiA6IC0yMTQ3NDgzNjQ2LAorICAgICAibmFtZSIgOiAiYW5kcm9pZDo6RkFJTEVEX1RSQU5TQUNUSU9OIgorICAgIH0sCisgICAgeworICAgICAiZW51bV9maWVsZF92YWx1ZSIgOiAtNzUsCisgICAgICJuYW1lIiA6ICJhbmRyb2lkOjpCQURfSU5ERVgiCisgICAgfSwKKyAgICB7CisgICAgICJlbnVtX2ZpZWxkX3ZhbHVlIiA6IC02MSwKKyAgICAgIm5hbWUiIDogImFuZHJvaWQ6Ok5PVF9FTk9VR0hfREFUQSIKKyAgICB9LA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ZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0sCisgICAgeworICAgICAicmVmZXJlbmNlZF90eXBlIiA6ICJfWlRJUGkiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQaSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBON2FuZHJvaWQyc3BJTlNfMTRMb29wZXJDYWxsYmFja0VFRSIKKyAgICB9LAorICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSVBQdiIKICAgICB9CiAgICBdLAotICAgInJldHVybl90eXBlIiA6ICJfWlRJdiIsCisgICAicmV0dXJuX3R5cGUiIDogIl9aVEliIiwKICAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2NvcmUvbGlidXRpbHMvaW5jbHVkZS91dGlscy9Mb29wZXIuaCIKICAgfSwKICAgewpAQCAtNTk3MCw2ICs2ODUwLDIyIEBACiAgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYnV0aWxzL2luY2x1ZGUvdXRpbHMvTG9vcGVyLmgiCiAgIH0sCiAgIHsKKyAgICJmdW5jdGlvbl9uYW1lIiA6ICJhbmRyb2lkOjpMb29wZXI6OnJlcG9sbCIsCisgICAibGlua2VyX3NldF9rZXkiIDogIl9aTjdhbmRyb2lkNkxvb3BlcjZyZXBvbGxFaSIsCisgICAicGFyYW1ldGVycyIgOgorICAgWworICAgIHsKKyAgICAgImlzX3RoaXNfcHRyIiA6IHRydWUsCisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElQTjdhbmRyb2lkNkxvb3BlckUiCisgICAgfSwKKyAgICB7CisgICAgICJyZWZlcmVuY2VkX3R5cGUiIDogIl9aVElpIgorICAgIH0KKyAgIF0sCisgICAicmV0dXJuX3R5cGUiIDogIl9aVElpIiwKKyAgICJzb3VyY2VfZmlsZSIgOiAic3lzdGVtL2Nvc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Im9mZnNldF90b190b3AiCisgICAgfSwKKyAgICB7CisgICAgICJraW5kIiA6ICJydHRpIiwKKyAgICAgIm1hbmdsZWRfY29tcG9uZW50X25hbWUiIDogIl9aVElON2FuZHJvaWQxNlJlZmVyZW5jZVJlbmFtZXJFIgorICAgIH0sCisgICAgeworICAgICAiaXNfcHVyZSIgOiB0cnVlLAorICAgICAibWFuZ2xlZF9jb21wb25lbnRfbmFtZSIgOiAiX1pOSzdhbmRyb2lkMTZSZWZlcmVuY2VSZW5hbWVyY2xFaiIKKyAgICB9CisgICBdCisgIH0sCisgIHsKKyAgICJhbGlnbm1lbnQiIDogNCwKICAgICJiYXNlX3NwZWNpZmllcnMiIDoKICAgIFsKICAgICB7CkBAIC0xMjgyNyw4ICsxMzU3OSw2IEBACiAgICAibGlua2VyX3NldF9rZXkiIDogIl9aVElON2FuZHJvaWQxNlNvcnRlZFZlY3RvckltcGxFIiwKICAgICJuYW1lIiA6ICJhbmRyb2lkOjpTb3J0ZWRWZWN0b3JJbXBsIiwKICAgICJyZWNvcmRfa2luZCIgOiAiY2xhc3MiLAotICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSU43YW5kcm9pZDE2U29ydGVkVmVjdG9ySW1wbEUiLAotICAgInNlbGZfdHlwZSIgOiAiX1pUSU43YW5kcm9pZDE2U29ydGVkVmVjdG9ySW1wbEUiLAogICAgInNpemUiIDogMjAsCiAgICAic291cmNlX2ZpbGUiIDogInN5c3RlbS9jb3JlL2xpYnV0aWxzL2luY2x1ZGUvdXRpbHMvVmVjdG9ySW1wbC5oIiwKICAgICJ2dGFibGVfY29tcG9uZW50cyIgOgpAQCAtMTI4NzksNiArMTM2MjksNjcgQEAKICAgIF0KICAgfSwKICAgeworICAgImFsaWdubWVudCIgOiA0LAorICAgImJhc2Vfc3BlY2lmaWVycyIgOgorICAgWworICAgIHsKKyAgICAgInJlZmVyZW5jZWRfdHlwZSIgOiAiX1pUSU43YW5kcm9pZDEwVmVjdG9ySW1wbE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J1dGlsc19kZWZhdWx0c19ub2RlcHMiLAorICAgICAgICAiYXBleC1sb3dlc3QtbWluLXNkay12ZXJzaW9uIiwKKyAgICBdLAorICAgIG5hdGl2ZV9icmlkZ2Vfc3VwcG9ydGVkOiB0cnVlLAorCisgICAgZXhwb3J0X2luY2x1ZGVfZGlyczogWyJpbmNsdWRlIl0sCisgICAgc3JjczogWworICAgICAgICAiRXJyb3JzLmNwcCIsCisgICAgICAgICJSZWZCYXNlLmNwcCIsCisgICAgICAgICJTaGFyZWRCdWZmZXIuY3BwIiwKKyAgICAgICAgIlN0cmluZzE2LmNwcCIsCisgICAgICAgICJTdHJpbmc4LmNwcCIsCisgICAgICAgICJTdHJvbmdQb2ludGVyLmNwcCIsCisgICAgICAgICJVbmljb2RlLmNwcCIsCisgICAgICAgICJWZWN0b3JJbXBsLmNwcCIsCisgICAgXSwKKworICAgIGNmbGFnczogWworICAgICAgICAiLVdpbnZhbGlkLW9mZnNldG9mIiwKKyAgICAgICAgIi1Xc2VxdWVuY2UtcG9pbnQiLAorICAgICAgICAiLVd6ZXJvLWFzLW51bGwtcG9pbnRlci1jb25zdGFudCIsCisgICAgXSwKKworICAgIGFwZXhfYXZhaWxhYmxlOiBbCisgICAgICAgICIvL2FwZXhfYXZhaWxhYmxlOmFueWFwZXgiLAorICAgICAgICAiLy9hcGV4X2F2YWlsYWJsZTpwbGF0Zm9ybSIsCisgICAgXSwKKworICAgIGFmZG86IHRydWUsCit9CisKK2NjX2RlZmF1bHRzIHsKKyAgICBuYW1lOiAibGlidXRpbHNfYmluZGVyX2ltcGxfZGVmYXVsdHMiLAorICAgIGRlZmF1bHRzOiBbCisgICAgICAgICJsaWJ1dGlsc19kZWZhdWx0cyIsCisgICAgICAgICJsaWJ1dGlsc19iaW5kZXJfaW1wbF9kZWZhdWx0c19ub2RlcHMiLAorICAgIF0sCit9CisKK2NjX2xpYnJhcnkgeworICAgIG5hbWU6ICJsaWJ1dGlsc19iaW5kZXIiLAorICAgIGRlZ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3M6IFsiU3RyaW5nMTZfZnV6ei5jcHAiXSwKK30KKworY2NfZnV6eiB7CisgICAgbmFtZTogImxpYnV0aWxzX2Z1enpfdmVjdG9yIiwKKyAgICBkZWZhdWx0czogWyJsaWJ1dGlsc19mdXp6X2RlZmF1bHRzIl0sCisgICAgc3JjczogWyJWZWN0b3JfZnV6ei5jcHAiXSwKK30KKworY2NfZnV6eiB7CisgICAgbmFtZTogImxpYnV0aWxzX2Z1enpfcmVmYmFzZSIsCisgICAgZGVmYXVsdHM6IFsibGlidXRpbHNfZnV6el9kZWZhdWx0cyJdLAorICAgIHNyY3M6IFsiUmVmQmFzZV9mdXp6LmNwcCJdLAorfQorCitjY190ZXN0IHsKKyAgICBuYW1lOiAibGlidXRpbHNfYmluZGVyX3Rlc3QiLAorICAgIGhvc3Rfc3VwcG9ydGVkOiB0cnVlLAorCisgICAgc3JjczogWworICAgICAgICAiRXJyb3JzX3Rlc3QuY3BwIiwKKyAgICAgICAgIlNoYXJlZEJ1ZmZlcl90ZXN0LmNwcCIsCisgICAgICAgICJTdHJpbmcxNl90ZXN0LmNwcCIsCisgICAgICAgICJTdHJpbmc4X3Rlc3QuY3BwIiwKKyAgICAgICAgIlN0cm9uZ1BvaW50ZXJfdGVzdC5jcHAiLAorICAgICAgICAiVW5pY29kZV90ZXN0LmNwcCIsCisgICAgICAgICJWZWN0b3JfdGVzdC5jcHAiLAorICAgIF0sCisKKyAgICB0YXJnZXQ6IHsKKyAgICAgICAgYW5kcm9pZDogeworICAgICAgICAgICAgc2hhcmVkX2xpYnM6IFsKKyAgICAgICAgICAgICAgICAibGliYmFzZSIsCisgICAgICAgICAgICAgICAgImxpYmN1dGlscyIsCisgICAgICAgICAgICAgICAgImxpYmxvZyIsCisgICAgICAgICAgICAgICAgImxpYmx6bWEiLAorICAgICAgICAgICAgICAgICJsaWJ1dGlscyIsIC8vIHdoaWNoIGluY2x1ZGVzIGxpYnV0aWxzX2JpbmRlcgorICAgICAgICAgICAgICAgICJsaWJ6IiwKKyAgICAgICAgICAgIF0sCisgICAgICAgIH0sCisgICAgICAgIGxpbnV4OiB7CisgICAgICAgICAgICBzcmNzOiBbCisgICAgICAgICAgICAgICAgIlJlZkJhc2VfdGVzdC5jcHAiLAorICAgICAgICAgICAgXSwKKyAgICAgICAgfSwKKyAgICAgICAgaG9zdDogeworICAgICAgICAgICAgc3RhdGljX2xpYnM6IFsKKyAgICAgICAgICAgICAgICAibGliYmFzZSIsCisgICAgICAgICAgICAgICAgImxpYmxvZyIsCisgICAgICAgICAgICAgICAgImxpYmx6bWEiLAorICAgICAgICAgICAgICAgICJsaWJ1dGlscyIsIC8vIHdoaWNoIGluY2x1ZGVzIGxpYnV0aWxzX2JpbmRlcgorICAgICAgICAgICAgXSwKKyAgICAgICAgfSwKKyAgICB9LAorCisgICAgY2ZsYWdzOiBbCisgICAgICAgICItV2FsbCIsCisgICAgICAgICItV2V4dHJhIiwKKyAgICAgICAgIi1XZXJyb3IiLAorICAgICAgICAiLVd0aHJlYWQtc2FmZXR5IiwKKyAgICBdLAorCisgICAgdGVzdF9zdWl0ZXM6IFsiZGV2aWNlLXRlc3RzIl0sCit9CisKK2NjX2JlbmNobWFyayB7CisgICAgbmFtZTogImxpYnV0aWxzX2JpbmRlcl9iZW5jaG1hcmsiLAorICAgIHNyY3M6IFsiVmVjdG9yX2JlbmNobWFyay5jcHAiXSwKKyAgICBzaGFyZWRfbGliczogWyJsaWJ1dGlscyJdLAorfQpkaWZmIC0tZ2l0IGEvbGlidXRpbHMvRXJyb3JzLmNwcCBiL2xpYnV0aWxzL2JpbmRlci9FcnJvcnMuY3BwCnNpbWlsYXJpdHkgaW5kZXggOTglCnJlbmFtZSBmcm9tIGxpYnV0aWxzL0Vycm9ycy5jcHAKcmVuYW1lIHRvIGxpYnV0aWxzL2JpbmRlci9FcnJvcnMuY3BwCmluZGV4IDc0ZjNiZWYuLmRmYjRkOWIgMTAwNjQ0Ci0tLSBhL2xpYnV0aWxzL0Vycm9ycy5jcH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tfRU5BQkxFRAorI2lmIERFQlVHX1JFRlNfQ0FMTFNUQUNLX0VOQUJMRUQgJiYgQU5EUk9JRF9VVElMU19DQUxMU1RBQ0tfRU5BQkxFRAogICAgICAgICAgICAgICAgIENhbGxTdGFjazo6bG9nU3RhY2soTE9HX1RBRywgcmVmcy0+c3RhY2suZ2V0KCkpOwogI2VuZGlmCiAgICAgICAgICAgICAgICAgcmVmcyA9IHJlZnMtPm5leHQ7CkBAIC0yNTUsNyArMjU0LDcgQEAKICAgICAgICAgfQogICAgICAgICBpZiAoZHVtcFN0YWNrKSB7CiAgICAgICAgICAgICBBTE9HRSgiYWJvdmUgZXJyb3JzIGF0OiIpOwotI2lmIENBTExTVEFDS19FTkFCTEVECisjaWYgQU5EUk9JRF9VVElMU19DQUxMU1RBQ0tfRU5BQkxFRAogICAgICAgICAgICAgQ2FsbFN0YWNrOjpsb2dTdGFjayhMT0dfVEFHKTsKICNlbmRpZgogICAgICAgICB9CkBAIC0zMTAsNyArMzA5LDcgQEAKICAgICAgICAgU3RyaW5nOCB0ZXh0OwogCiAgICAgICAgIHsKLSAgICAgICAgICAgIE11dGV4OjpBdXRvbG9jayBfbChtTXV0ZXgpOworICAgICAgICAgICAgc3RkOjpsb2NrX2d1YXJkPHN0ZDo6bXV0ZXg+IF9sKG1NdXRleCk7CiAgICAgICAgICAgICBjaGFyIGJ1ZlsxMjhdOwogICAgICAgICAgICAgc25wcmludGYoYnVmLCBzaXplb2YoYnVmKSwKICAgICAgICAgICAgICAgICAgICAgICJTdHJvbmcgcmVmZXJlbmNlcyBvbiBSZWZCYXNlICVwICh3ZWFrcmVmX3R5cGUgJXApOlxuIiwKQEAgLTMzMCw3ICszMjksNyBAQAogICAgICAgICAgICAgICAgICAgICAgdGhpcyk7CiAgICAgICAgICAgICBpbnQgcmMgPSBvcGVuKG5hbWUsIE9fUkRXUiB8IE9fQ1JFQVQgfCBPX0FQUEVORCwgMDY0NCk7CiAgICAgICAgICAgICBpZiAocmMgPj0gM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BAQAogICAgIHZvaWQgcmVuYW1lUmVmc0lkKHJlZl9lbnRyeSogciwgY29uc3Qgdm9pZCogb2xkX2lkLCBjb25zdCB2b2lkKiBuZXdfaWQpCiAgICAgewogICAgICAgICBpZiAobVRyYWNrRW5hYmxlZCkgewotICAgICAgICAgICAgQXV0b011dGV4IF9sKG1NdXRleCk7CisgICAgICAgICAgICBzdGQ6OmxvY2tfZ3VhcmQ8c3RkOjptdXRleD4gX2wobU11dGV4KTsKICAgICAgICAgICAgIHJlZl9lbnRyeSogcmVmID0gcjsKICAgICAgICAgICAgIHdoaWxlIChyZWYgIT0gTlVMTCkgewogICAgICAgICAgICAgICAgIGlmIChyZWYtPmlkID09IG9sZF9pZCkgewpAQCAtNDI1LDcgKzQyNCw3IEBACiAgICAgICAgICAgICBzbnByaW50ZihidWYsIHNpemVvZihidWYpLCAiXHQlYyBJRCAlcCAocmVmICVkKTpcbiIsCiAgICAgICAgICAgICAgICAgICAgICBpbmMsIHJlZnMtPmlkLCByZWZzLT5yZWYpOwogICAgICAgICAgICAgb3V0LT5hcHBlbmQoYnVmKTsKLSNpZiBERUJVR19SRUZTX0NBTExTVEFDS19FTkFCTEVEICYmIENBTExTVEFDS19FTkFCTEVECisjaWYgREVCVUdfUkVGU19DQUxMU1RBQ0tfRU5BQkxFRCAmJiBBTkRST0lEX1VUSUxTX0NBTExTVEFDS19FTkFCTEVECiAgICAgICAgICAgICBvdXQtPmFwcGVuZChDYWxsU3RhY2s6OnN0YWNrVG9TdHJpbmcoIlx0XHQiLCByZWZzLT5zdGFjay5nZXQoKSkpOwogI2Vsc2UKICAgICAgICAgICAgIG91dC0+YXBwZW5kKCJcdFx0KGNhbGwgc3RhY2tzIGRpc2FibGVkKSIpOwpAQCAtNDM0LDcgKzQzMyw3IEBACiAgICAgICAgIH0KICAgICB9CiAKLSAgICBtdXRhYmxlIE11dGV4IG1NdXRleDsKKyAgICBtdXRhYmxlIHN0ZDo6bXV0ZXggbU11dGV4OwogICAgIHJlZ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ICAgc3RyMS5zdGFydHNXaXRoKHN0cjIpOwogICAgICAgICAgICAgICAgIH0pLAogICAgICAgICAgICAgICAgIChbXShGdXp6ZWREYXRhUHJvdmlkZXImLCBhbmRyb2lkOjpTdHJpbmcxNiBzdHIxLCBhbmRyb2lkOjpTdHJpbmcxNiBzdHIyKSAtPiB2b2lkIHsKLSAgICAgICAgICAgICAgICAgICAgc3RyMS5jb250YWlucyhzdHIyLnN0cmluZygpKTsKKyAgICAgICAgICAgICAgICAgICAgc3RyMS5jb250YWlucyhzdHIyLmNfc3RyKCkpOwogICAgICAgICAgICAgICAgIH0pLAogICAgICAgICAgICAgICAgIChbXShGdXp6ZWREYXRhUHJvdmlkZXImLCBhbmRyb2lkOjpTdHJpbmcxNiBzdHIxLCBhbmRyb2lkOjpTdHJpbmcxNiBzdHIyKSAtPiB2b2lkIHsKICAgICAgICAgICAgICAgICAgICAgc3RyMS5jb21wYXJlKHN0cjIpOwpAQCAtNTIsNyArNTQsNyBAQAogICAgICAgICAgICAgICAgIChbXShGdXp6ZWREYXRhUHJvdmlkZXImIGRhdGFQcm92aWRlciwgYW5kcm9pZDo6U3RyaW5nMTYgc3RyMSwKICAgICAgICAgICAgICAgICAgICAgYW5kcm9pZDo6U3RyaW5nMTYgc3RyMikgLT4gdm9pZCB7CiAgICAgICAgICAgICAgICAgICAgIGludCBwb3MgPSBkYXRhUHJvdmlkZXIuQ29uc3VtZUludGVncmFsSW5SYW5nZTxpbnQ+KDAsIHN0cjEuc2l6ZSgpKTsKLSAgICAgICAgICAgICAgICAgICAgc3RyMS5pbnNlcnQocG9zLCBzdHIyLnN0cmluZygpKTsKKyAgICAgICAgICAgICAgICAgICAgc3RyMS5pbnNlcnQocG9zLCBzdHIyLmNfc3RyKCkpOwogICAgICAgICAgICAgICAgIH0pLAogCiAgICAgICAgICAgICAgICAgLy8gRmluZCBhbmQgcmVwbGFjZSBvcGVyYXRpb25zCmRpZmYgLS1naXQgYS9saWJ1dGlscy9TdHJpbmcxN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gICAgICAgICAgICAgICAgICAgc3RyMS0+aXNFbXB0eSgpOworICAgICAgICAgICAgICAgICAgICBzdHIxLT5lbXB0eSgpOwogICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgW10oRnV6emVkRGF0YVByb3ZpZGVyKiwgYW5kcm9pZDo6U3RyaW5nOCogc3RyMSwgYW5kcm9pZDo6U3RyaW5nOCopIC0+IHZvaWQgewogICAgICAgICAgICAgICAgICAgICBzdHIxLT5sZW5ndGgoKTsKQEAgLTQ1LDYgKzQ1LDggQEAKICAgICAgICAgICAgICAgICAgICAgc3RyMS0+dG9Mb3dlcigpOwogICAgICAgICAgICAgICAgIH0sCiAgICAgICAgICAgICAgICAgW10oRnV6emVkRGF0YVByb3ZpZGVyKiwgYW5kcm9pZDo6U3RyaW5nOCogc3RyMSwgYW5kcm9pZDo6U3RyaW5nOCogc3RyMikgLT4gdm9pZCB7CisgICAgICAgICAgICAgICAgICAgIGlmIChzdHIyLT5zaXplKCkgPT0gMCkgcmV0dXJuOworCiAgICAgICAgICAgICAgICAgICAgIHN0cjEtPnJlbW92ZUFsbChzdHIyLT5jX3N0cigpKTsKICAgICAgICAgICAgICAgICB9LAogICAgICAgICAgICAgICAgIFtdKEZ1enplZERhdGFQcm92aWRlciosIGFuZHJvaWQ6OlN0cmluZzgqIHN0cjEsIGFuZHJvaWQ6OlN0cmluZzgqIHN0cjIpIC0+IHZvaWQgewpAQCAtNjYsMzMgKzY4LDYgQEAKICAgICAgICAgICAgICAgICAgICAgaW50IHN0YXJ0X2luZGV4ID0gZGF0YVByb3ZpZGVyLT5Db25zdW1lSW50ZWdyYWxJblJhbmdlPGludD4oMCwgc3RyMS0+c2l6ZSgpKTsKICAgICAgICAgICAgICAgICAgICAgc3RyMS0+ZmluZChzdHIyLT5jX3N0cigpLCBzdGFydF9pbmRleCk7CiAgICAgICAgICAgICAgICAgfSwKLQotICAgICAgICAgICAgICAgIC8vIFBhdGggaGFuZGxpbmcKLSAgICAgICAgICAgICAgICBbXShGdXp6ZWREYXRhUHJvdmlkZXIqLCBhbmRyb2lkOjpTdHJpbmc4KiBzdHIxLCBhbmRyb2lkOjpTdHJpbmc4KikgLT4gdm9pZCB7Ci0gICAgICAgICAgICAgICAgICAgIHN0cjEtPmdldEJhc2VQYXRoKCk7Ci0gICAgICAgICAgICAgICAgfSwKLSAgICAgICAgICAgICAgICBbXShGdXp6ZWREYXRhUHJvdmlkZXIqLCBhbmRyb2lkOjpTdHJpbmc4KiBzdHIxLCBhbmRyb2lkOjpTdHJpbmc4KikgLT4gdm9pZCB7Ci0gICAgICAgICAgICAgICAgICAgIHN0cjEtPmdldFBhdGhFeHRlbnNpb24oKTsKLSAgICAgICAgICAgICAgICB9LAotICAgICAgICAgICAgICAgIFtdKEZ1enplZERhdGFQcm92aWRlciosIGFuZHJvaWQ6OlN0cmluZzgqIHN0cjEsIGFuZHJvaWQ6OlN0cmluZzgqKSAtPiB2b2lkIHsKLSAgICAgICAgICAgICAgICAgICAgc3RyMS0+Z2V0UGF0aExlYWYoKTsKLSAgICAgICAgICAgICAgICB9LAotICAgICAgICAgICAgICAgIFtdKEZ1enplZERhdGFQcm92aWRlciosIGFuZHJvaWQ6OlN0cmluZzgqIHN0cjEsIGFuZHJvaWQ6OlN0cmluZzgqKSAtPiB2b2lkIHsKLSAgICAgICAgICAgICAgICAgICAgc3RyMS0+Z2V0UGF0aERpcigpOwotICAgICAgICAgICAgICAgIH0sCi0gICAgICAgICAgICAgICAgW10oRnV6emVkRGF0YVByb3ZpZGVyKiwgYW5kcm9pZDo6U3RyaW5nOCogc3RyMSwgYW5kcm9pZDo6U3RyaW5nOCopIC0+IHZvaWQgewotICAgICAgICAgICAgICAgICAgICBzdHIxLT5jb252ZXJ0VG9SZXNQYXRoKCk7Ci0gICAgICAgICAgICAgICAgfSwKLSAgICAgICAgICAgICAgICBbXShGdXp6ZWREYXRhUHJvdmlkZXIqLCBhbmRyb2lkOjpTdHJpbmc4KiBzdHIxLCBhbmRyb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dXI7CisgICAgaWYgKChmaXJzdF9jaGFyICYgMHg4MCkgPT0gMCkgeyAvLyBBU0NJSQorICAgICAgICAqbnVtX3JlYWQgPSAxOworICAgICAgICByZXR1cm4gKmN1cjsKKyAgICB9CisgICAgY3VyKys7CisgICAgY2hhcjMyX3QgbWFzaywgdG9faWdub3JlX21hc2s7CisgICAgc2l6ZV90IG51bV90b19yZWFkID0gMDsKKyAgICBjaGFyMzJfdCB1dGYzMiA9IGZpcnN0X2NoYXI7CisgICAgZm9yIChudW1fdG9fcmVhZCA9IDEsIG1hc2sgPSAweDQwLCB0b19pZ25vcmVfbWFzayA9IDB4RkZGRkZGODA7CisgICAgICAgICAoZmlyc3RfY2hhciAmIG1hc2spOworICAgICAgICAgbnVtX3RvX3JlYWQrKywgdG9faWdub3JlX21hc2sgfD0gbWFzaywgbWFzayA+Pj0gMSkgeworICAgICAgICAvLyAweDNGID09IDAwMTExMTExCisgICAgICAgIHV0ZjMyID0gKHV0ZjMyIDw8IDYpICsgKCpjdXIrKyAmIDB4M0YpOworICAgIH0KKyAgICB0b19pZ25vcmVfbWFzayB8PSBtYXNrOworICAgIHV0ZjMyICY9IH4odG9faWdub3JlX21hc2sgPDwgKDYgKiAobnVtX3RvX3JlYWQgLSAxKSkpOworCisgICAgKm51bV9yZWFkID0gbnVtX3RvX3JlYWQ7CisgICAgcmV0dXJuIHN0YXRpY19jYXN0PGludDMyX3Q+KHV0ZjMyKTsKK30KKworaW50MzJfdCB1dGYzMl9mcm9tX3V0ZjhfYXQoY29uc3QgY2hhciAqc3JjLCBzaXplX3Qgc3JjX2xlbiwgc2l6ZV90IGluZGV4LCBzaXplX3QgKm5leHRfaW5kZXgpCit7CisgICAgaWYgKGluZGV4ID49IHNyY19sZW4pIHsKKyAgICAgICAgcmV0dXJuIC0xOworICAgIH0KKyAgICBzaXplX3QgdW51c2VkX2luZGV4OworICAgIGlmIChuZXh0X2luZGV4ID09IG51bGxwdHIpIHsKKyAgICAgICAgbmV4dF9pbm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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKworaW50IHN0cmNtcDE2KGNvbnN0IGNoYXIxNl90ICpzMSwgY29uc3QgY2hhcjE2X3QgKnMyKQoreworICBjaGFyMTZfdCBjaDsKKyAgaW50IGQgPSAwOworCisgIHdoaWxlICggMSApIHsKKyAgICBkID0gKGludCkoY2ggPSAqczErKykgLSAoaW50KSpzMisrOworICAgIGlmICggZCB8fCAhY2ggKQorICAgICAgYnJlYWs7CisgIH0KKworICByZXR1cm4gZDsKK30KKworaW50IHN0cm5jbXAxNihjb25zdCBjaGFyMTZfdCAqczEsIGNvbnN0IGNoYXIxNl90ICpzMiwgc2l6ZV90IG4pCit7CisgIGNoYXIxNl90IGNoOworICBpbnQgZCA9IDA7CisKKyAgaWYgKG4gPT0gMCkgeworICAgIHJldHVybiAwOworICB9CisKKyAgZG8geworICAgIGQgPSAoaW50KShjaCA9ICpzMSsrKSAtIChpbnQpKnMyKys7CisgICAgaWYgKCBkIHx8ICFjaCApIHsKKyAgICAgIGJyZWFrOworICAgIH0KKyAgfSB3aGlsZSAoLS1uKTsKKworICByZXR1cm4gZDsKK30KKworc2l6ZV90IHN0cmxlbjE2KGNvbnN0IGNoYXIxNl90ICpzKQoreworICBjb25zdCBjaGFyMTZfdCAqc3MgPSBzOworICB3aGlsZSAoICpzcyApCisgICAgc3MrKzsKKyAgcmV0dXJuIHNzLXM7Cit9CisKK3NpemVfdCBzdHJubGVuMTYoY29uc3QgY2hhcjE2X3QgKnMsIHNpemVfdCBtYXhsZW4pCit7CisgIGNvbnN0IGNoYXIxNl90ICpzcyA9IHM7CisKKyAgLyogSW1wb3J0YW50OiB0aGUgbWF4bGVuIHRlc3QgbXVzdCBwcmVjZWRlIHRoZSByZWZlcmVuY2UgdGhyb3VnaCBzczsKKyAgICAgc2luY2UgdGhlIGJ5dGUgYmV5b25kIHRoZSBtYXhpbXVtIG1heSBzZWdmYXVsdCAqLworICB3aGlsZSAoKG1heGxlbiA+IDApICYmICpzcykgeworICAgIHNzKys7CisgICAgbWF4bGVuLS07CisgIH0KKyAgcmV0dXJuIHNzLXM7Cit9CisKK2NoYXIxNl90KiBzdHJzdHIxNihjb25zdCBjaGFyMTZfdCogc3JjLCBjb25zdCBjaGFyMTZfdCogdGFyZ2V0KQoreworICAgIGNvbnN0IGNoYXIxNl90IG5lZWRsZSA9ICp0YXJnZXQ7CisgICAgaWYgKG5lZWRsZSA9PSAnXDAnKSByZXR1cm4gKGNoYXIxNl90KilzcmM7CisKKyAgICBjb25zdCBzaXplX3QgdGFyZ2V0X2xlbiA9IHN0cmxlbjE2KCsrdGFyZ2V0KTsKKyAgICBkbyB7CisgICAgICAgIGRvIHsKKyAgICAgICAgICAgIGlmICgqc3JjID09ICdcMCcpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gbnVsbHB0cjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSB3aGlsZSAoKnNyYysrICE9IG5lZWRsZSk7CisgICAgfSB3aGlsZSAoc3RybmNtcDE2KHNyYywgdGFyZ2V0LCB0YXJnZXRfbGVuKSAhPSAwKTsKKyAgICBzcmMtLTsKKworICAgIHJldHVybiAoY2hhcjE2X3QqKXNyYzsKK30KKworaW50IHN0cnpjbXAxNihjb25zdCBjaGFyMTZfdCAqczEsIHNpemVfdCBuMSwgY29uc3QgY2hhcjE2X3QgKnMyLCBzaXplX3QgbjIpCit7CisgICAgY29uc3QgY2hhcjE2X3QqIGUxID0gczErbjE7CisgICAgY29uc3QgY2hhcjE2X3QqIGUyID0gczIrbjI7CisKKyAgICB3aGlsZSAoczEgPCBlMSAmJiBzMiA8IGUyKSB7CisgICAgICAgIGNvbnN0IGludCBkID0gKGludCkqczErKyAtIChpbnQpKnMyKys7CisgICAgICAgIGlmIChkKSB7CisgICAgICAgICAgICByZXR1cm4gZDsKKyAgICAgICAgfQorICAgIH0KKworICAgIHJldHVybiBuMSA8IG4y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FyMTZfdCogY29uc3QgZW5kID0gc3JjICsgc3JjX2xlbjsKKyAgICBjb25zdCBjaGFyMTZfdCogaW4gPSBzcmM7CisgICAgc2l6ZV90IHV0ZjhfbGVuID0gMDsKKworICAgIHdoaWxlIChpbiA8IGVuZCkgeworICAgICAgICBjaGFyMTZfdCB3ID0gKmluKys7CisgICAgICAgIGlmICh3IDwgMHgwMDgwKSBbW2xpa2VseV1dIHsKKyAgICAgICAgICAgIHV0ZjhfbGVuICs9IDE7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBpZiAodyA8IDB4MDgwMCkgW1tsaWtlbHldXSB7CisgICAgICAgICAgICB1dGY4X2xlbiArPSAyOworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgaWYgKCFpc19hbnlfc3Vycm9nYXRlKHcpKSBbW2xpa2VseV1dIHsKKyAgICAgICAgICAgIHV0ZjhfbGVuICs9IDM7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBpZiAoaW4gPCBlbmQgJiYgaXNfc3Vycm9nYXRlX3BhaXIodywgKmluKSkgeworICAgICAgICAgICAgdXRmOF9sZW4gKz0gNDsKKyAgICAgICAgICAgIGluKys7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICAvKiBza2lwIGlmIGF0IHRoZSBlbmQgb2YgdGhlIHN0cmluZyBvciBpbnZhbGlkIHN1cnJvZ2F0ZSBwYWlyICovCisgICAgfQorICAgIHJldHVybiAoaW4gPT0gZW5kICYmIHV0ZjhfbGVuIDwgU1NJWkVfTUFYKSA/IHV0ZjhfbGVuIDogLTE7Cit9CisKK3ZvaWQgdXRmMTZfdG9fdXRmOChjb25zdCBjaGFyMTZfdCogc3JjLCBzaXplX3Qgc3JjX2xlbiwgY2hhciogZHN0LCBzaXplX3QgZHN0X2xlbikKK3sKKyAgICBpZiAoc3JjID09IG51bGxwdHIgfHwgc3JjX2xlbiA9PSAwIHx8IGRzdCA9PSBudWxscHRyKSB7CisgICAgICAgIHJldHVybjsKKyAgICB9CisKKyAgICBjb25zdCBjaGFyMTZfdCogaW4gPSBzcmM7CisgICAgY29uc3QgY2hhcjE2X3QqIGNvbnN0IGluX2VuZCA9IHNyYyArIHNyY19sZW47CisgICAgY2hhciogb3V0ID0gZHN0OworICAgIGNvbnN0IGNoYXIqIGNvbnN0IG91dF9lbmQgPSBkc3QgKyBkc3RfbGVuOworICAgIGNoYXIxNl90IHcyOworCisgICAgYXV0byBlcnJfb3V0ID0gWyZvdXQsICZvdXRfZW5kLCAmZHN0X2xlbl0oKSB7CisgICAgICAgIExPR19BTFdBWVNfRkFUQUxfSUYob3V0ID49IG91dF9lbmQsCisgICAgICAgICAgICAgICAgInRhcmdldCB1dGY4IHN0cmluZyBzaXplICV6dSB0b28gc2hvcnQiLCBkc3RfbGVuKTsKKyAgICB9OworCisgICAgd2hpbGUgKGluIDwgaW5fZW5kKSB7CisgICAgICAgIGNoYXIxNl90IHcgPSAqaW4rKzsKKyAgICAgICAgaWYgKHcgPCAweDAwODApIFtbbGlrZWx5XV0geworICAgICAgICAgICAgaWYgKG91dCArIDEgPiBvdXRfZW5kKQorICAgICAgICAgICAgICAgIHJldHVybiBlcnJfb3V0KCk7CisgICAgICAgICAgICAqb3V0KysgPSAoY2hhcikodyAmIDB4ZmYpOworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgaWYgKHcgPCAweDA4MDApIFtbbGlrZWx5XV0geworICAgICAgICAgICAgaWYgKG91dCArIDIgPiBvdXRfZW5kKQorICAgICAgICAgICAgICAgIHJldHVybiBlcnJfb3V0KCk7CisgICAgICAgICAgICAqb3V0KysgPSAoY2hhcikoMHhjMCB8ICgodyA+PiA2KSAmIDB4MWYpKTsKKyAgICAgICAgICAgICpvdXQrKyA9IChjaGFyKSgweDgwIHwgKCh3ID4+IDApICYgMHgzZikpOworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgaWYgKCFpc19hbnlfc3Vycm9nYXRlKHcpKSBbW2xpa2VseV1dIHsKKyAgICAgICAgICAgIGlmIChvdXQgKyAzID4gb3V0X2VuZCkKKyAgICAgICAgICAgICAgICByZXR1cm4gZXJyX291dCgpOworICAgICAgICAgICAgKm91dCsrID0gKGNoYXIpKDB4ZTAgfCAoKHcgPj4gMTIpICYgMHhmKSk7CisgICAgICAgICAgICAqb3V0KysgPSAoY2hhcikoMHg4MCB8ICgodyA+PiA2KSAmIDB4M2YpKTsKKyAgICAgICAgICAgICpvdXQrKyA9IChjaGFyKSgweDgwIHwgKCh3ID4+IDApICYgMHgzZikpOworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgLyogc3Vycm9nYXRlIHBhaXIgKi8KKyAgICAgICAgaWYgKGluIDwgaW5fZW5kICYmICh3MiA9ICppbiwgaXNfc3Vycm9nYXRlX3BhaXIodywgdzIpKSkgeworICAgICAgICAgICAgaWYgKG91dCArIDQgPiBvdXRfZW5kKQorICAgICAgICAgICAgICAgIHJldHVybiBlcnJfb3V0KCk7CisgICAgICAgICAgICBjaGFyMzJfdCBkdyA9IChjaGFyMzJfdCkoMHgxMDAwMCArICgodyAtIDB4ZDgwMCkgPDwgMTApICsgKHcyIC0gMHhkYzAwKSk7CisgICAgICAgICAgICAqb3V0KysgPSAoY2hhcikoMHhmMCB8ICgoZHcgPj4gMTgpICYgMHgwNykpOworICAgICAgICAgICAgKm91dCsrID0gKGNoYXIpKDB4ODAgfCAoKGR3ID4+IDEyKSAmIDB4M2YpKTsKKyAgICAgICAgICAgICpvdXQrKyA9IChjaGFyKSgweDgwIHwgKChkdyA+PiA2KSAgJiAweDNmKSk7CisgICAgICAgICAgICAqb3V0KysgPSAoY2hhcikoMHg4MCB8ICgoZHcgPj4gMCkgICYgMHgzZikpOworICAgICAgICAgICAgaW4rKzsKKyAgICAgICAgfQorICAgICAgICAvKiBXZSByZWFjaCBoZXJlIGluIHR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yAgICAgICAgdXRmMTZfbGVuKys7CisgICAgICAgIGlmICgoYyAmIDB4ODApID09IDApIFtbbGlrZWx5XV0geworICAgICAgICAgICAgaW4rKzsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIGlmIChjIDwgMHhjMCkgW1t1bmxpa2VseV1dIHsKKyAgICAgICAgICAgIEFMT0dXKCJJbnZhbGlkIFVURi04IGxlYWRpbmcgYnl0ZTogMHglMDJ4IiwgYyk7CisgICAgICAgICAgICBpbisrOworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGMgPCAweGUwKSBbW2xpa2VseV1dIHsKKyAgICAgICAgICAgIGluICs9IDI7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBpZiAoYyA8IDB4ZjApIFtbbGlrZWx5XV0geworICAgICAgICAgICAgaW4gKz0gMzsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgdWludDhfdCBjMiwgYzMsIGM0OworICAgICAgICAgICAgaWYgKGMgPj0gMHhmOCkgW1t1bmxpa2VseV1dIHsKKyAgICAgICAgICAgICAgICBBTE9HVygiSW52YWxpZCBVVEYtOCBsZWFkaW5nIGJ5dGU6IDB4JTAyeCIsIGMpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYzIgPSBpblsxXTsgYzMgPSBpblsyXTsgYzQgPSBpblszXTsKKyAgICAgICAgICAgIGlmICh1dGY4XzRiX3RvX3V0ZjMyKGMsIGMyLCBjMywgYzQpID49IDB4MTAwMDApIHsKKyAgICAgICAgICAgICAgICB1dGYxNl9sZW4rKzsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGluICs9IDQ7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgIH0KKyAgICBpZiAoaW4gPT0gaW5fZW5kKSB7CisgICAgICAgIHJldHVybiB1dGYxNl9sZW4gPCBTU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ZCBhcyBhbiBlcnJvciBhbmQgY2FzdGVkLgorICAgIExPR19BTFdBWVNfRkFUQUxfSUYoZHN0TGVuID4gU1NJWkVfTUFYLCAiZHN0TGVuIGlzICV6dSIsIGRzdExlbik7CisKKyAgICBjb25zdCB1aW50OF90KiBjb25zdCBpbl9lbmQgPSBzcmMgKyBzcmNMZW47CisgICAgY29uc3QgdWludDhfdCogaW4gPSBzcmM7CisgICAgY29uc3QgY2hhcjE2X3QqIGNvbnN0IG91dF9lbmQgPSBkc3QgKyBkc3RMZW47CisgICAgY2hhcjE2X3QqIG91dCA9IGRzdDsKKyAgICB1aW50OF90IGMsIGMyLCBjMywgYzQ7CisgICAgY2hhcjMyX3QgdzsKKworICAgIGF1dG8gZXJyX2luID0gWyZjLCAmb3V0XSgpIHsKKyAgICAgICAgQUxPR1coIlVuZW5kZWQgVVRGLTggYnl0ZTogMHglMDJ4IiwgYyk7CisgICAgICAgIHJldHVybiBvdXQ7CisgICAgfTsKKworICAgIHdoaWxlIChpbiA8IGluX2VuZCAmJiBvdXQgPCBvdXRfZW5kKSB7CisgICAgICAgIGMgPSAqaW4rKzsKKyAgICAgICAgaWYgKChjICYgMHg4MCkgPT0gMCkgW1tsaWtlbHldXSB7CisgICAgICAgICAgICAqb3V0KysgPSAoY2hhcjE2X3QpKGMpOworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGMgPCAweGMwKSBbW3VubGlrZWx5XV0geworICAgICAgICAgICAgQUxPR1coIkludmFsaWQgVVRGLTggbGVhZGluZyBieXRlOiAweCUwMngiLCBjKTsKKyAgICAgICAgICAgICpvdXQrKyA9IChjaGFyMTZfdCkoYyk7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorICAgICAgICBpZiAoYyA8IDB4ZTApIFtbbGlrZWx5XV0geworICAgICAgICAgICAgaWYgKGluICsgMSA+IGluX2VuZCkgW1t1bmxpa2VseV1dIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gZXJyX2luKCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBjMiA9ICppbisrOworICAgICAgICAgICAgKm91dCsrID0gKGNoYXIxNl90KSgoKGMgJiAweDFmKSA8PCA2KSB8IChjMiAmIDB4M2YpKTsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIGlmIChjIDwgMHhmMCkgW1tsaWtlbHldXSB7CisgICAgICAgICAgICBpZiAoaW4gKyAyID4gaW5fZW5kKSBbW3VubGlrZWx5XV0geworICAgICAgICAgICAgICAgIHJldHVybiBlcnJfaW4oKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGMyID0gKmluKys7IGMzID0gKmluKys7CisgICAgICAgICAgICAqb3V0KysgPSAoY2hhcjE2X3QpKCgoYyAmIDB4MGYpIDw8IDEyKSB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoYzIgJiAweDNmKSA8PCA2KSB8IChjMyAmIDB4M2YpKTsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgaWYgKGluICsgMyA+IGluX2VuZCkgW1t1bmxpa2VseV1dIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gZXJyX2luKCk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBpZiAoYyA+PSAweGY4KSBbW3VubGlrZWx5XV0geworICAgICAgICAgICAgICAgIEFMT0dXKCJJbnZhbGlkIFVURi04IGxlYWRpbmcgYnl0ZTogMHglMDJ4IiwgYyk7CisgICAgICAgICAgICB9CisgICAgICAgICAgICAvLyBNdWx0aXBsZSBVVEYxNiBjaGFyYWN0ZXJzIHdpdGggc3Vycm9nYXRlcworICAgICAgICAgICAgYzIgPSAqaW4rKzsgYzMgPSAqaW4rKzsgYzQgPSAqaW4rKzsKKyAgICAgICAgICAgIHcgPSB1dGY4XzRiX3RvX3V0ZjMyKGMsIGMyLCBjMywgYzQpOworICAgICAgICAgICAgaWYgKHcgPCAweDEwMDAwKSBbW3VubGlrZWx5XV0geworICAgICAgICAgICAgICAgICpvdXQrKyA9IChjaGFyMTZfdCkodyk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGlmIChvdXQgKyAyID4gb3V0X2VuZCkgW1t1bmxpa2VseV1dIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gT29vcHMuLi4uIG5vdCBlbm91Z2ggcm9vbSBmb3IgdGhpcyBzdXJyb2dhdGUgcGFpci4KKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG91dDsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgKm91dCsrID0gKGNoYXIxNl90KSgoKHcgLSAweDEwMDAwKSA+PiAxMCkgKyAweGQ4MDApOworICAgICAgICAgICAgICAgICpvdXQrKyA9IChjaGFyMTZfdCkoKCh3IC0gMHgxMDAwMCkgJiAweDNmZikgKyAweGRjMDApOworICAgICAgICAgICAgfQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIG91dDsKK30KKworfQpkaWZmIC0tZ2l0IGEvbGlidXRpbHMvVW5pY29kZV90ZXN0LmNwcCBiL2xpYnV0aWxzL2JpbmRlci9Vbmljb2RlX3Rlc3QuY3BwCnNpbWlsYXJpdHkgaW5kZXggMTAwJQpyZW5hbWUgZnJvbSBsaWJ1dGlscy9Vbmljb2RlX3Rlc3QuY3BwCnJlbmFtZSB0byBsaWJ1dGlscy9iaW5kZXIvVW5pY29kZV90ZXN0LmNwcApkaWZmIC0tZ2l0IGEvbGlidXRpbHMvVmVjdG9ySW1wbC5jcHAgYi9saWJ1dGlscy9iaW5kZXIvVmVjdG9ySW1wbC5jcHAKc2ltaWxhcml0eSBpbmRleCA5OSUKcmVuYW1lIGZyb20gbGlidXRpbHMvVmVjdG9ySW1wbC5jcHAKcmVuYW1lIHRvIGxpYnV0aWxzL2JpbmRlci9WZWN0b3JJbXBsLmNwcAppbmRleCBkOTUxYjh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WVkcyBmb3IgU29ydGVkVmVjdG9yCisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJvcGVyYXRvcj0iKTsKKyAgICAgICAgICAgICAgICB2ZWN0b3IgPSB0ZXN0VmVjdG9yKHByb3ZpZGVyKTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICAodm9pZClwcm92aWRlcjsKKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koImNsZWFyIik7CisgICAgICAgICAgICAgICAgdmVjdG9yLmNsZWFyKCk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgKHZvaWQpcHJvdmlkZXI7CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJzaXplIik7CisgICAgICAgICAgICAgICAgdmVjdG9yLnNpemUoKTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICAodm9pZClwcm92aWRlcjsKKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koImlzRW1wdHkiKTsKKyAgICAgICAgICAgICAgICB2ZWN0b3IuaXNFbXB0eSgpOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIFsmXShGdXp6ZWREYXRhUHJvdmlkZXImIHByb3ZpZGVyLCBWZWN0b3I8VD4mIHZlY3RvcikgeworICAgICAgICAgICAgICAgICh2b2lkKXByb3ZpZGVyOworICAgICAgICAgICAgICAgIGlmIChrTG9nKSBBTE9HSSgiY2FwYWNpdHkiKTsKKyAgICAgICAgICAgICAgICB2ZWN0b3IuY2FwYWNpdHkoKTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICBzaXplX3QgdmVjdG9yU2l6ZSA9IHByb3ZpZGVyLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8c2l6ZV90PigwLCBNQVhfVkVDX1NJWkUpOworICAgICAgICAgICAgICAgIGlmIChrTG9nKSBBTE9HSSgic2V0Q2FwYWNpdHkiKTsKKyAgICAgICAgICAgICAgICB2ZWN0b3Iuc2V0Q2FwYWNpdHkodmVjdG9yU2l6ZSk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgc2l6ZV90IHZlY3RvclNpemUgPSBwcm92aWRlci5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHNpemVfdD4oMCwgTUFYX1ZFQ19TSVpFKTsKKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koInJlc2l6ZSIpOworICAgICAgICAgICAgICAgIHZlY3Rvci5yZXNpemUodmVjdG9yU2l6ZSk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgKHZvaWQpcHJvdmlkZXI7CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJhcnJheSIpOworICAgICAgICAgICAgICAgIHZlY3Rvci5hcnJheSgpOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIFsmXShGdXp6ZWREYXRhUHJvdmlkZXImIHByb3ZpZGVyLCBWZWN0b3I8VD4mIHZlY3RvcikgeworICAgICAgICAgICAgICAgICh2b2lkKXByb3ZpZGVyOworICAgICAgICAgICAgICAgIGlmIChrTG9nKSBBTE9HSSgiZWRpdEFycmF5Iik7CisgICAgICAgICAgICAgICAgdmVjdG9yLmVkaXRBcnJheSgpOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIFsmXShGdXp6ZWREYXRhUHJvdmlkZXImIHByb3ZpZGVyLCBWZWN0b3I8VD4mIHZlY3RvcikgeworICAgICAgICAgICAgICAgIGlmICh2ZWN0b3Iuc2l6ZSgpID09IDApIHJldHVybjsKKyAgICAgICAgICAgICAgICBzaXplX3QgaWR4ID0gcHJvdmlkZXIuQ29uc3VtZUludGVncmFsSW5SYW5nZTxzaXplX3Q+KDAsIHZlY3Rvci5zaXplKCkgLSAxKTsKKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koIm9wZXJhdG9yW10iKTsKKyAgICAgICAgICAgICAgICB2ZWN0b3JbaWR4XTsgIC8vIHJldHVybnMgYSBjb25zdCB2YWx1ZSBmb3IgVmVjdG9yCisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgaWYgKHZlY3Rvci5zaXplKCkgPT0gMCkgcmV0dXJuOworICAgICAgICAgICAgICAgIHNpemVfdCBpZHggPSBwcm92aWRlci5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHNpemVfdD4oMCwgdmVjdG9yLnNpemUoKSAtIDEpOworICAgICAgICAgICAgICAgIGlmIChrTG9nKSBBTE9HSSgiaXRlbUF0Iik7CisgICAgICAgICAgICAgICAgdmVjdG9yLml0ZW1BdChpZHgpOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIFsmXShGdXp6ZWREYXRhUHJvdmlkZXImIHByb3ZpZGVyLCBWZWN0b3I8VD4mIHZlY3RvcikgeworICAgICAgICAgICAgICAgICh2b2lkKXByb3ZpZGVyOworICAgICAgICAgICAgICAgIGlmICh2ZWN0b3Iuc2l6ZSgpID09IDApIHJldHVybjsKKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koInRvcCIpOworICAgICAgICAgICAgICAgIHZlY3Rvci50b3AoKTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICBpZiAodmVjdG9yLnNpemUoKSA9PSAwKSByZXR1cm47CisgICAgICAgICAgICAgICAgc2l6ZV90IGlkeCA9IHByb3ZpZGVyLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8c2l6ZV90PigwLCB2ZWN0b3Iuc2l6ZSgpIC0gMSk7CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJlZGl0SXRlbUF0Iik7CisgICAgICAgICAgICAgICAgdmVjdG9yLmVkaXRJdGVtQXQoaWR4KTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICAodm9pZClwcm92aWRlcjsKKyAgICAgICAgICAgICAgICBpZiAodmVjdG9yLnNpemUoKSA9PSAwKSByZXR1cm47CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJlZGl0VG9wIik7CisgICAgICAgICAgICAgICAgdmVjdG9yLmVkaXRUb3AoKSA9IFR7fTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICB1aW50OF90IGlkeCA9IHByb3ZpZGVyLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8dWludDhfdD4oMCwgdmVjdG9yLnNpemUoKSk7CisgICAgICAgICAgICAgICAgVmVjdG9yIHZlYzIgPSB0ZXN0VmVjdG9yKHByb3ZpZGVyKTsKKyAgICAgICAgICAgICAgICBpZiAodmVjMi5zaXplKCkgPT0gMCkgcmV0dXJuOyAgLy8gVE9ETzogbWF5YmUgd2Ugc2hvdWxkIHN1cHBvcnQgdGhpcz8KKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koImluc2VydFZlY3RvckF0ICVkIG9mIHNpemUgJXp1IiwgaWR4LCB2ZWMyLnNpemUoKSk7CisgICAgICAgICAgICAgICAgdmVjdG9yLmluc2VydFZlY3RvckF0KHZlYzIsIGlkeCk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJhcHBlbmRWZWN0b3IiKTsKKyAgICAgICAgICAgICAgICB2ZWN0b3IuYXBwZW5kVmVjdG9yKHRlc3RWZWN0b3IocHJvdmlkZXIpKTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICAvLyBUT0RPOiBpbnNlcnRBcnJheUF0CisgICAgICAgICAgICAvLyBUT0RPOiBhcHBlbmRBcnJheQorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgdWludDhfdCBpZHggPSBwcm92aWRlci5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQ4X3Q+KDAsIHZlY3Rvci5zaXplKCkpOworICAgICAgICAgICAgICAgIHVpbnQ4X3QgbnVtSXRlbXMgPSBwcm92aWRlci5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQ4X3Q+KDEsIDEwMCk7CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJpbnNlcnRBdCIpOworICAgICAgICAgICAgICAgIHZlY3Rvci5pbnNlcnRBdChpZHgsIG51bUl0ZW1zKTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICB1aW50OF90IGlkeCA9IHByb3ZpZGVyLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8dWludDhfdD4oMCwgdmVjdG9yLnNpemUoKSk7CisgICAgICAgICAgICAgICAgdWludDhfdCBudW1JdGVtcyA9IHByb3ZpZGVyLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8dWludDhfdD4oMSwgMTAwKTsKKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koImluc2VydEF0Iik7CisgICAgICAgICAgICAgICAgdmVjdG9yLmluc2VydEF0KFR7fSwgaWR4LCBudW1JdGVtcyk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgKHZvaWQpcHJvdmlkZXI7CisgICAgICAgICAgICAgICAgaWYgKHZlY3Rvci5zaXplKCkgPT0gMCkgcmV0dXJuOworICAgICAgICAgICAgICAgIGlmIChrTG9nKSBBTE9HSSgicG9wIik7CisgICAgICAgICAgICAgICAgdmVjdG9yLnBvcCgpOworICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIFsmXShGdXp6ZWREYXRhUHJvdmlkZXImIHByb3ZpZGVyLCBWZWN0b3I8VD4mIHZlY3RvcikgeworICAgICAgICAgICAgICAgICh2b2lkKXByb3ZpZGVyOworICAgICAgICAgICAgICAgIGlmIChrTG9nKSBBTE9HSSgicHVzaCIpOworICAgICAgICAgICAgICAgIHZlY3Rvci5wdXNoKCk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgKHZvaWQpcHJvdmlkZXI7CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJhZGQiKTsKKyAgICAgICAgICAgICAgICB2ZWN0b3IuYWRkKCk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgKHZvaWQpcHJvdmlkZXI7CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJhZGQiKTsKKyAgICAgICAgICAgICAgICB2ZWN0b3IuYWRkKFR7fSk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgdWludDhfdCBpZHggPSBwcm92aWRlci5Db25zdW1lSW50ZWdyYWxJblJhbmdlPHVpbnQ4X3Q+KDAsIHZlY3Rvci5zaXplKCkgLSAxKTsKKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koInJlcGxhY2VBdCIpOworICAgICAgICAgICAgICAgIHZlY3Rvci5yZXBsYWNlQXQoaWR4KTsKKyAgICAgICAgICAgIH0sCisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICB1aW50OF90IGlkeCA9IHByb3ZpZGVyLkNvbnN1bWVJbnRlZ3JhbEluUmFuZ2U8dWludDhfdD4oMCwgdmVjdG9yLnNpemUoKSAtIDEpOworICAgICAgICAgICAgICAgIGlmIChrTG9nKSBBTE9HSSgicmVwbGFjZUF0Iik7CisgICAgICAgICAgICAgICAgdmVjdG9yLnJlcGxhY2VBdChUe30sIGlkeCk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgWyZdKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIsIFZlY3RvcjxUPiYgdmVjdG9yKSB7CisgICAgICAgICAgICAgICAgaWYgKHZlY3Rvci5zaXplKCkgPT0gMCkgcmV0dXJuOworICAgICAgICAgICAgICAgIHVpbnQ4X3QgaWR4ID0gcHJvdmlkZXIuQ29uc3VtZUludGVncmFsSW5SYW5nZTx1aW50OF90PigwLCB2ZWN0b3Iuc2l6ZSgpIC0gMSk7CisgICAgICAgICAgICAgICAgaWYgKGtMb2cpIEFMT0dJKCJyZW1vdGVJdGVtc0F0Iik7CisgICAgICAgICAgICAgICAgdmVjdG9yLnJlbW92ZUl0ZW1zQXQoaWR4KTsgIC8vIFRPRE86IGRpZmZlcmVudCBjb3VudAorICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIC8vIHJlbW92ZUF0IGlzIGFsaWFzIGZvciByZW1vdmVJdGVtc0F0CisgICAgICAgICAgICAvLyBUT0RPOiBzb3J0CisgICAgICAgICAgICBbJl0oRnV6emVkRGF0YVByb3ZpZGVyJiBwcm92aWRlciwgVmVjdG9yPFQ+JiB2ZWN0b3IpIHsKKyAgICAgICAgICAgICAgICAodm9pZClwcm92aWRlcjsKKyAgICAgICAgICAgICAgICBpZiAoa0xvZykgQUxPR0koImdldEl0ZW1TaXplIik7CisgICAgICAgICAgICAgICAgdmVjdG9yLmdldEl0ZW1TaXplKCk7CisgICAgICAgICAgICB9LAorICAgICAgICAgICAgLy8gVE9ETzogaXRlcmF0b3JzCisgICAgfTsKKworICAgIFZlY3RvcjxUPiB0ZXN0VmVjdG9yKEZ1enplZERhdGFQcm92aWRlciYgcHJvdmlkZXIpIHsKKyAgICAgICAgVmVjdG9yPFQ+IHZlYzsKKyAgICAgICAgc2l6ZV90IHZlY3RvclNpemUgPSBwcm92aWRlci5Db25zdW1lSW50ZWdyYWxJblJh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Glscy9iaW5kZXIvaW5jbHVkZS91dGlscy9TdHJpbmcxNi5oCkBAIC0yNCw2ICsyNCwxNSBAQAogI2luY2x1ZGUgPHV0aWxzL1N0cmluZzguaD4KICNpbmNsdWRlIDx1dGlscy9UeXBlSGVscGVycy5oPgogCisjaWYgX19oYXNfaW5jbHVkZSg8c3RyaW5nX3ZpZXc+KQorI2luY2x1ZGUgPHN0cmluZ192aWV3PgorI2RlZmluZSBIQVNfU1RSSU5HX1ZJRVcKKyNlbmRpZgorCisjaWYgX19jcGx1c3BsdXMgPj0gMjAyMDAyTAorI2luY2x1ZGUgPGNvbXBhcmU+CisjZW5kaWYKKwogLy8gLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAKIG5hbWVzcGFjZSBhbmRyb2lkIHsKQEAgLTUzLDEyICs2MiwxMyBAQAogCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH5TdHJpbmcxNigpOwogCi0gICAgaW5saW5lICBjb25zdCBjaGFyMTZfdCogICAgIHN0cmluZygpIGNvbnN0OworICAgIGlubGluZSAgY29uc3QgY2hhcjE2X3QqICAgICBjX3N0cigpIGNvbnN0OwogCi1wcml2YXRlOgotICAgIHN0YXRpYyBpbmxpbmUgc3RkOjpzdHJpbmcgICBzdGRfc3RyaW5nKGNvbnN0IFN0cmluZzE2JiBzdHIpOwotcHVibGljOgogICAgICAgICAgICAgc2l6ZV90ICAgICAgICAgICAgICBzaXplKCkgY29uc3Q7CisgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIGVtcHR5KCkgY29uc3Q7CisKKyAgICBpbmxpbmUgIHNpemVfdCAgICAgICAgICAgICAgbGVuZ3RoKCkgY29uc3Q7CisKICAgICAgICAgICAgIHZvaWQgICAgICAgICAgICAgICAgc2V0VG8oY29uc3QgU3RyaW5nMTYmIG90aGVyKTsKICAgICAgICAgICAgIHN0YXR1c190ICAgICAgICAgICAgc2V0VG8oY29uc3QgY2hhcjE2X3QqIG90aGVyKTsKICAgICAgICAgICAgIHN0YXR1c190ICAgICAgICAgICAgc2V0VG8oY29uc3QgY2hhcjE2X3QqIG90aGVyLCBzaXplX3QgbGVuKTsKQEAgLTg2LDYgKzk2LDcgQEAKICAgICAgICAgICAgIGJvb2wgICAgICAgICAgICAgICAgc3RhcnRzV2l0aChjb25zdCBjaGFyMTZfdCogcHJlZml4KSBjb25zdDsKIAogICAgICAgICAgICAgYm9vbCAgICAgICAgICAgICAgICBjb250YWlucyhjb25zdCBjaGFyMTZfdCogY2hycykgY29uc3Q7CisgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIGNvbnRhaW5zKGNvbnN0IFN0cmluZzE2JiBvdGhlcikgY29uc3Q7CiAKICAgICAgICAgICAgIHN0YXR1c190ICAgICAgICAgICAgcmVwbGFjZUFsbChjaGFyMTZfdCByZXBsYWNlVGhpcywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyMTZfdCB3aXRoVGhpcyk7CkBAIC05OCw2ICsxMDksOSBAQAogICAgIGlubGluZSAgYm9vbCAgICAgICAgICAgICAgICBvcGVyYXRvciE9KGNvbnN0IFN0cmluZzE2JiBvdGhlcikgY29uc3Q7CiAgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIG9wZXJhdG9yPj0oY29uc3QgU3RyaW5nMTYmIG90aGVyKSBjb25zdDsKICAgICBpbmxpbmUgIGJvb2wgICAgICAgICAgICAgICAgb3BlcmF0b3I+KGNvbnN0IFN0cmluZzE2JiBvdGhlcikgY29uc3Q7CisjaWYgX19jcGx1c3BsdXMgPj0gMjAyMDAyTAorICAgIGlubGluZSBzdGQ6OnN0cm9uZ19vcmRlcmluZyBvcGVyYXRvcjw9Pihjb25zdCBTdHJpbmcxNiYgb3RoZXIpIGNvbnN0OworI2VuZGlmCiAKICAgICBpbmxpbmUgIGJvb2wgICAgICAgICAgICAgICAgb3BlcmF0b3I8KGNvbnN0IGNoYXIxNl90KiBvdGhlcikgY29uc3Q7CiAgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIG9wZXJhdG9yPD0oY29uc3QgY2hhcjE2X3QqIG90aGVyKSBjb25zdDsKQEAgLTEwNSw5ICsxMTksMTggQEAKICAgICBpbmxpbmUgIGJvb2wgICAgICAgICAgICAgICAgb3BlcmF0b3IhPShjb25zdCBjaGFyMTZfdCogb3RoZXIpIGNvbnN0OwogICAgIGlubGluZSAgYm9vbCAgICAgICAgICAgICAgICBvcGVyYXRvcj49KGNvbnN0IGNoYXIxNl90KiBvdGhlcikgY29uc3Q7CiAgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIG9wZXJhdG9yPihjb25zdCBjaGFyMTZfdCogb3RoZXIpIGNvbnN0OworI2lmIF9fY3BsdXNwbHVzID49IDIwMjAwMkwKKyAgICBpbmxpbmUgc3RkOjpzdHJvbmdfb3JkZXJpbmcgb3BlcmF0b3I8PT4oY29uc3QgY2hhcjE2X3QqIG90aGVyKSBjb25zdDsKKyNlbmRpZgogCiAgICAgaW5saW5lICAgICAgICAgICAgICAgICAgICAgIG9wZXJhdG9yIGNvbnN0IGNoYXIxNl90KigpIGNvbnN0OwogCisjaWZkZWYgSEFTX1NUUklOR19WSUVXCisgICAgLy8gSW1wbGljaXQgY2FzdCB0byBzdGQ6OnUxNnN0cmluZyBpcyBub3QgaW1wbGVtZW50ZWQgb24gcHVycG9zZSAtIHUxNnN0cmluZ192aWV3IGlzIG11Y2gKKyAgICAvLyBsaWdodGVyIGFuZCBpZiBvbmUgbmVlZHMsIHRoZXkgY2FuIHN0aWxsIGNyZWF0ZSB1MTZzdHJpbmcgZnJvbSB1MTZzdHJpbmdfdmlldy4KKyAgICBpbmxpbmUgICAgICAgICAgICAgICAgICAgICAgb3BlcmF0b3Igc3RkOjp1MTZzdHJpbmdfdmlldygpIGNvbnN0OworI2VuZGlmCisKICAgICAvLyBTdG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plKCkgY29uc3Q7CiAgICAgaW5saW5lICBzaXplX3QgICAgICAgICAgICAgIGJ5dGVzKCkgY29uc3Q7Ci0gICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIGlzRW1wdHkoKSBjb25zdDsKKyAgICBpbmxpbmUgIGJvb2wgICAgICAgICAgICAgICAgZW1wdHkoKSBjb25zdDsKIAogICAgICAgICAgICAgc2l6ZV90ICAgICAgICAgICAgICBsZW5ndGgoKSBjb25zdDsKIApAQCAtMTA0LDYgKzExMCw5IEBACiAgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIG9wZXJhdG9yIT0oY29uc3QgU3RyaW5nOCYgb3RoZXIpIGNvbnN0OwogICAgIGlubGluZSAgYm9vbCAgICAgICAgICAgICAgICBvcGVyYXRvcj49KGNvbnN0IFN0cmluZzgmIG90aGVyKSBjb25zdDsKICAgICBpbmxpbmUgIGJvb2wgICAgICAgICAgICAgICAgb3BlcmF0b3I+KGNvbnN0IFN0cmluZzgmIG90aGVyKSBjb25zdDsKKyNpZiBfX2NwbHVzcGx1cyA+PSAyMDIwMDJMCisgICAgaW5saW5lIHN0ZDo6c3Ryb25nX29yZGVyaW5nIG9wZXJhdG9yPD0+KGNvbnN0IFN0cmluZzgmIG90aGVyKSBjb25zdDsKKyNlbmRpZgogCiAgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIG9wZXJhdG9yPChjb25zdCBjaGFyKiBvdGhlcikgY29uc3Q7CiAgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIG9wZXJhdG9yPD0oY29uc3QgY2hhciogb3RoZXIpIGNvbnN0OwpAQCAtMTExLDkgKzEyMCwxNiBAQAogICAgIGlubGluZSAgYm9vbCAgICAgICAgICAgICAgICBvcGVyYXRvciE9KGNvbnN0IGNoYXIqIG90aGVyKSBjb25zdDsKICAgICBpbmxpbmUgIGJvb2wgICAgICAgICAgICAgICAgb3BlcmF0b3I+PShjb25zdCBjaGFyKiBvdGhlcikgY29uc3Q7CiAgICAgaW5saW5lICBib29sICAgICAgICAgICAgICAgIG9wZXJhdG9yPihjb25zdCBjaGFyKiBvdGhlcikgY29uc3Q7CisjaWYgX19jcGx1c3BsdXMgPj0gMjAyMDAyTAorICAgIGlubGluZSBzdGQ6OnN0cm9uZ19vcmRlcmluZyBvcGVyYXRvcjw9Pihjb25zdCBjaGFyKiBvdGhlcikgY29uc3Q7CisjZW5kaWYKIAogICAgIGlubGluZSAgICAgICAgICAgICAgICAgICAgICBvcGVyYXRvciBjb25zdCBjaGFyKigpIGNvbnN0OwogCisjaWZkZWYgSEFTX1NUUklOR19WSUVXCisgICAgaW5saW5lIGV4cGxpY2l0ICAgICAgICAgICAgIG9wZXJhdG9yIHN0ZDo6c3RyaW5nX3ZpZXcoKSBjb25zdDsKKyNlbmRpZgorCiAgICAgICAgICAgICBjaGFyKiAgICAgICAgICAgICAgIGxvY2tCdWZmZXIoc2l6ZV90IHNpemUpOwogICAgICAgICAgICAgdm9pZCAgICAgICAgICAgICAgICB1bmxvY2tCdWZmZXIoKTsKICAgICAgICAgICAgIHN0YXR1c190ICAgICAgICAgICAgdW5sb2NrQnVmZmVyKHNpemVfdCBzaXplKTsKQEAgLTEyMSwxMDEgKzEzNywzNSBAQAogICAgICAgICAgICAgLy8gcmV0dXJuIHRoZSBpbmRleCBvZiB0aGUgZmlyc3QgYnl0ZSBvZiBvdGhlciBpbiB0aGlzIGF0IG9yIGFmdGVyCiAgICAgICAgICAgICAvLyBzdGFydCwgb3IgLTEgaWYgbm90IGZvdW5kCiAgICAgICAgICAgICBzc2l6ZV90ICAgICAgICAgICAgIGZpbmQoY29uc3QgY2hhciogb3RoZXIsIHNpemVfdCBzdGFydCA9IDApIGNvbnN0OworICAgIGlubGluZSAgc3NpemVfdCAgICAgICAgICAgICBmaW5kKGNvbnN0IFN0cmluZzgmIG90aGVyLCBzaXplX3Qgc3RhcnQgPSAwKSBjb25zdDsKIAogICAgICAgICAgICAgLy8gcmV0dXJuIHRydWUgaWYgdGhpcyBzdHJpbmcgY29udGFpbnMgdGhlIHNwZWNpZmllZCBzdWJzdHJpbmcKICAgICBpbmxpbmUgIGJvb2wgICAgICAgICAgICAgICAgY29udGFpbnMoY29uc3QgY2hhciogb3RoZXIpIGNvbnN0OworICAgIGlubGluZSAgYm9vbCAgICAgICAgICAgICAgICBjb250YWlucyhjb25zdCBTdHJpbmc4JiBvdGhlcikgY29uc3Q7CiAKICAgICAgICAgICAgIC8vIHJlbW92ZXMgYWxsIG9jY3VycmVuY2Ugb2YgdGhlIHNwZWNpZmllZCBzdWJzdHJpbmcKICAgICAgICAgICAgIC8vIHJldHVybnMgdHJ1ZSBpZiBhbnkgd2VyZSBmb3VuZCBhbmQgcmVtb3ZlZAogICAgICAgICAgICAgYm9vbCAgICAgICAgICAgICAgICByZW1vdmVBbGwoY29uc3QgY2hhciogb3RoZXIpOworICAgIGlubGluZSAgYm9vbCAgICAgICAgICAgICAgICByZW1vdmVBbGwoY29uc3QgU3RyaW5nOCYgb3RoZXIpOwogCiAgICAgICAgICAgICB2b2lkICAgICAgICAgICAgICAgIHRvTG93ZXIoKTsKIAotCi0gICAgLyoKLSAgICAgKiBUaGVzZSBtZXRob2RzIG9wZXJhdGUgb24gdGhlIHN0cmluZyBhcyBpZiBpdCB3ZXJlIGEgcGF0aCBuYW1lLgotICAgICAqLwotCi0gICAgLyoKLSAgICAgKiBHZXQganVzdCB0aGUgZmlsZW5hbWUgY29tcG9uZW50LgotICAgICAqCi0gICAgICogIi90bXAvZm9vL2Jhci5jIiAtLT4gImJhci5jIgotICAgICAqLwotICAgIFN0cmluZzggZ2V0UGF0aExlYWYodm9pZCkgY29uc3Q7Ci0KLSAgICAvKgotICAgICAqIFJlbW92ZSB0aGUgbGFzdCAoZmlsZSBuYW1lKSBjb21wb25lbnQsIGxlYXZpbmcganVzdCB0aGUgZGlyZWN0b3J5Ci0gICAgICogbmFtZS4KLSAgICAgKgotICAgICAqICIvdG1wL2Zvby9iYXIuYyIgLS0+ICIvdG1wL2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G9nU3RhY2soY29uc3QgY2hhciogbG9ndGFnLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENhbGxTdGFjayogc3RhY2sgPSBnZXRDdXJyZW50KCkuZ2V0KCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kcm9pZF9Mb2dQcmlvcml0eSBwcmlvcml0eSA9IEFORFJPSURfTE9HX0RFQlVHKSB7CiAgICAgICAgIGlmIChyZWludGVycHJldF9jYXN0PHVpbnRwdHJfdD4obG9nU3RhY2tJbnRlcm5hbCkgIT0gMCAmJiBzdGFjayAhPSBudWxscHRyKSB7CiAgICAgICAgICAgICBsb2dTdGFja0ludGVybmFsKGxvZ3RhZywgc3RhY2ssIHByaW9yaXR5KTsKICAgICAgICAgfSBlbHNlIHsKQEAgLTEyNywzMCArMTI5LDMxIEBACiAgICAgfQogCiAjZWxzZQotICAgIHN0YXRpYyB2b2lkIEFMV0FZU19JTkxJTkUgbG9nU3RhY2soY29uc3QgY2hhciogbG9ndGFnLCBDYWxsU3RhY2sqID0gZ2V0Q3VycmVudCgpLmdldCgpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kcm9pZF9Mb2dQcmlvcml0eSA9IEFORFJPSURfTE9HX0RFQlVHKSB7CisgICAgc3RhdGljIHZvaWQgQ0FMTFNUQUNLX0FMV0FZU19JTkxJTkUgbG9nU3RhY2soY29uc3QgY2hhciogbG9ndGFnLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENhbGxTdGFjayogPSBnZXRDdXJyZW50KCkuZ2V0KCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kcm9pZF9Mb2dQcmlvcml0eSA9IEFORFJPSURfTE9HX0RFQlVHKSB7CiAgICAgICAgIEFMT0coTE9HX1dBUk4sIGxvZ3RhZywgIkNhbGxT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GFja1RvU3RyaW5nKGNvbnN0IGNoYXIqIHByZWZpeCA9IG51bGxwdHIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IENhbGxTdGFjayogPSBnZXRDdXJyZW50KCkuZ2V0KCkpIHsKKyNlbHNlIC8vICFDQUxMU1RBQ0tfV0VBS1NfQVZBSUxBQkxFCisgICAgc3RhdGljIFN0cmluZzggQ0FMTFNUQUNLX0FMV0FZU19JTkxJTkUgc3RhY2tUb1N0cmluZyhjb25zdCBjaGFyKiBwcmVmaXggPSBudWxscHRyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgQ2FsbFN0YWNrKiA9IGdldEN1cnJlbnQoKS5nZXQoKSkgewogICAgICAgICByZXR1cm4gU3RyaW5nODo6Zm9ybWF0KCIlczxDYWxsU3RhY2sgcGFja2FnZSBub3QgbGlua2VkPiIsIChwcmVmaXggPyBwcmVmaXggOiAiIikpOwogICAgIH0KLSNlbmRpZiAvLyAhV0VBS1NfQVZBSUxBQkxFCisjZW5kaWYgLy8gIUNBTExTVEFDS19XRUFLU19BVkFJTEFCTEUKIAogICBwcml2YXRlOgotI2lmZGVmIFdFQUtTX0FWQUlMQUJMRQorI2lmZGVmIENBTExTVEFDS19XRUFLU19BVkFJTEFCTEUKICAgICBzdGF0aWMgQ2FsbFN0YWNrVVB0ciBDQUxMU1RBQ0tfV0VBSyBnZXRDdXJyZW50SW50ZXJuYWwoaW50MzJfdCBpZ25vcmVEZXB0aCk7CiAgICAgc3RhdGljIHZvaWQgQ0FMTFNUQUNLX1dFQUsgbG9nU3RhY2tJbnRlcm5hbChjb25zdCBjaGFyKiBsb2d0YWcsIGNvbnN0IENhbGxTdGFjayogc3RhY2ssCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmRyb2lkX0xvZ1ByaW9yaXR5IHByaW9yaXR5KT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AgICAgICBuYW1lcyA9IChjaGFyKiopIHJlYWxsb2MobmFtZXMsIHNpemUgKiBzaXplb2YoY2hhciopKTsKICAgICAgICAgICBpZiAobmFtZXMgPT0gTlVMTCkgewogICAgICAgICAgICAgZXJyeCgxLCAiZmFpbGVkIHRvIHJlYWxsb2NhdGUgZGlyIG5hbWVzIGFycmF5IChzaXplICVkKSIsIHNpemUpOwogICAgICAgICAgIH0KQEAgLTIxMSwyMCArMjE1LDEyIEBACiAgICAgaWYobHN0YXQoaW4sICZzKSkgZXJyKDEsICJjb3VsZCBub3Qgc3RhdCAnJXMnIiwgaW4pOwogCiAgICAgaWYoU19JU1JFRyhzLnN0X21vZGUpKXsKLSAgICAgICAgaW50IGZkID0gb3BlbihpbiwgT19SRE9OTFkpOwotICAgICAgICBpZihmZCA8IDApIGVycigxLCAiY2Fubm90IG9wZW4gJyVzJyBmb3IgcmVhZCIsIGluKTsKLQotICAgICAgICBjaGFyKiB0bXAgPSAoY2hhciopIG1hbGxvYyhzLnN0X3NpemUpOwotICAgICAgICBpZih0bXAgPT0gMCkgZXJyeCgxLCAiY2Fubm90IGFsbG9jYXRlICV6ZCBieXRlcyIsIHMuc3Rfc2l6ZSk7Ci0KLSAgICAgICAgaWYocmVhZChmZCwgdG1wLCBzLnN0X3NpemUpICE9IHMuc3Rfc2l6ZSkgewotICAgICAgICAgICAgZXJyKDEsICJjYW5ub3QgcmVhZCAlemQgYnl0ZXMiLCBzLnN0X3NpemUpOworICAgICAgICBzdGQ6OnN0cmluZyBjb250ZW50OworICAgICAgICBpZiAoIWFuZHJvaWQ6OmJhc2U6OlJlYWRGaWxlVG9TdHJpbmcoaW4sICZjb250ZW50KSkgeworICAgICAgICAgICAgZXJyKDEsICJjYW5ub3QgcmVhZCAnJXMnIiwgaW4pOwogICAgICAgICB9CiAKLSAgICAgICAgX2VqZWN0KCZzLCBvdXQsIG9sZW4sIHRtcCwgcy5zdF9zaXplKTsKLQotICAgICAgICBmcmVlKHRtcCk7Ci0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ICAgICAgICJcdEV4YW1wbGU6XG4iCiAgICAgICAgICAgICAiXHRcdCMgTXkgZGV2aWNlIG5vZGVzXG4iCiAgICAgICAgICAgICAiXHRcdGRpciBkZXYgMDc1NSAwIDBcbiIKLSAgICAgICAgICAgICJcdFx0bm9kIGRldi9udWxsIDA2MDAgMCAwIGMgMSA1XG4iCisgICAgICAgICAgICAiXHRcdG5vZCBkZXYvbnVsbCAwNjAwIDAgMCBjIDEgM1xuIgogICAgICk7CiB9CiAKQEAgLTQ0NSwyMCArNDQxLDEyIEBACiAgICAgaW50IG51bV9kaXJzID0gYXJnYyAtIG9wdGluZDsKICAgICBhcmd2ICs9IG9wdGluZDsKIAotICAgIGlmIChudW1fZGlycyA8PSAwKSB7Ci0gICAgICAgIHVzYWdlKCk7Ci0gICAgICAgIGVycngoMSwgIm5vIGRpcmVjdG9yaWVzIHRvIHByb2Nlc3M/ISIpOwotICAgIH0KLQotICAgIHdoaWxlKG51bV9kaXJzLS0gPiAwKXsKKyAgICB3aGlsZSAobnVtX2RpcnMtLSA+IDApewogICAgICAgICBjaGFyICp4ID0gc3RyY2hyKCphcmd2LCAnPScpOwotICAgICAgICBpZih4ICE9IDApIHsKLSAgICAgICAgICAgICp4KysgPSAwOwotICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgeCA9ICIiOworICAgICAgICBpZiAoeCAhPSBudWxscHRyKSB7CisgICAgICAgICAgICAqeCsrID0gJ1wwJzsKICAgICAgICAgfQotCi0gICAgICAgIGFyY2hpdmUoKmFyZ3YsIHgpOworICAgICAgICBhcmNoaXZlKCphcmd2LCB4ID86ICIiKTsKIAogICAgICAgICBhcmd2Kys7CiAgICAgfQpkaWZmIC0tZ2l0IGEvcHJvcGVydHlfc2VydmljZS9saWJwcm9wZXJ0eWluZm9wYXJzZXIvQW5kcm9pZC5icCBiL3Byb3BlcnR5X3NlcnZpY2UvbGlicHJvcGVydHlpbmZvcGFyc2VyL0FuZHJvaWQuYnAKaW5kZXggODc2NDZmOS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AgICAiZWNobyAnICAgICIgKyBFWFBPUlRfR0xPQkFMX0FTQU5fT1BUSU9OUyArICInID4+ICQob3V0KSAmJiAiICsKKyAgICAgICAgImVjaG8gJyAgICAiICsgRVhQT1JUX0dMT0JBTF9HQ09WX09QVElPTlMgKyAiJyA+PiAkKG91dCkgJiYgIiArCisgICAgICAgICJlY2hvICcgICAgIiArIEVYUE9SVF9HTE9CQUxfQ0xBTkdfQ09WRVJBR0VfT1BUSU9OUyArICInID4+ICQob3V0KSAmJiAiICsKKyAgICAgICAgImVjaG8gJyAgICAiICsgRVhQT1JUX0dMT0JBTF9IV0FTQU5fT1BUSU9OUyArICInID4+ICQob3V0KSAmJiAiICsKKyAgICAgICAgImVjaG8gJyAgICAiICsgRVhQT1JUX0dMT0JBTF9TQ1VET19BTExPQ0FUSU9OX1JJTkdfQlVGRkVSX1NJWkUgKyAiJyA+PiAkKG91dCkiLAorfQorCitwcmVidWlsdF9yb290IHsKKyAgICBuYW1lOiAiaW5pdC5lbnZpcm9uLnJjLXNvb25nIiwKKyAgICBzcmM6ICI6aW5pdC5lbnZpcm9uLnJjLmdlbiIsCisgICAgZmlsZW5hbWU6ICJpbml0LmVudmlyb24ucmMiLAorICAgIGluc3RhbGxfaW5fcm9vdDogdHJ1ZSwKKyAgICBub19mdWxsX2luc3RhbGw6IHRydWUsCisgICAgcmVxdWlyZWQ6IHNlbGVjdCgoc29vbmdfY29uZmlnX3ZhcmlhYmxlKCJBTkRST0lEIiwgIkFTQU5fRU5BQkxFRCIpLCBzb29uZ19jb25maWdfdmFyaWFibGUoIkFORFJPSUQiLCAiU0FOSVRJWkVfVEFSR0VUX1NZU1RFTV9FTkFCTEVEIikpLCB7CisgICAgICAgICh0cnVlLCB0cnVlKTogWworICAgICAgICAgICAgImFzYW4ub3B0aW9ucyIsCisgICAgICAgICAgICAiYXNhbl9leHRyYWN0IiwKKyAgICAgICAgXSwKKyAgICAgICAgKHRydWUsIGRlZmF1bHQpOiBbImFzYW4ub3B0a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mJfa2V5c19wcmVidWlsdF9hdmIiLAorICAgIG1vZHVsZV90eXBlOiAicHJlYnVpbHRfYXZiIiwKKyAgICBjb25maWdfbmFtZXNwYWNlOiAiQU5EUk9JRCIsCisgICAgYm9vbF92YXJpYWJsZXM6IFsKKyAgICAgICAgIkJPQVJEX01PVkVfR1NJX0FWQl9LRVlTX1RPX1ZFTkRPUl9CT09UIiwKKyAgICBdLAorICAgIHByb3BlcnRpZXM6IFsKKyAgICAgICAgInJhbWRpc2siLAorICAgICAgICAidmVuZG9yX3JhbWRpc2siLAorICAgIF0sCit9CisKK2F2Yl9rZXlzX3ByZWJ1aWx0X2F2YiB7CisgICAgbmFtZTogInEtZGV2ZWxvcGVyLWdzaS5hdmJwdWJrZXkiLAorICAgIHNyYzogInEtZGV2ZWxvcGVyLWdzaS5hdmJwdWJrZXkiLAorICAgIHNvb25nX2NvbmZpZ192YXJpYWJsZXM6IHsKKyAgICAgICAgQk9BUkRfTU9WRV9HU0lfQVZCX0tFWVNfVE9fVkVORE9SX0JPT1Q6IHsKKyAgICAgICAgICAgIHJhbWRpc2s6IGZhbHNlLAorICAgICAgICAgICAgdmVuZG9yX3JhbWRpc2s6IHRydWUsCisgICAgICAgICAgICBjb25kaXRpb25zX2RlZmF1bHQ6IHsKKyAgICAgICAgICAgICAgICByYW1kaXNrOiB0cnVlLAorICAgICAgICAgICAgICAgIHZlbmRvcl9yYW1kaXNrOiBmYWxzZSwKKyAgICAgICAgICAgIH0sCisgICAgICAgIH0sCisgICAgfSwKK30KKworYXZiX2tleXNfcHJlYnVpbHRfYXZiIHsKKyAgICBuYW1lOiAici1kZXZlbG9wZXItZ3NpLmF2YnB1YmtleSIsCisgICAgc3JjOiAici1kZXZlbG9wZXItZ3NpLmF2YnB1YmtleSIsCisgICAgc29vbmdfY29uZmlnX3ZhcmlhYmxlczogeworICAgICAgICBCT0FSRF9NT1ZFX0dTSV9BVkJfS0VZU19UT19WRU5ET1JfQk9PVDogeworICAgICAgICAgICAgcmFtZGlzazogZmFsc2UsCisgICAgICAgICAgICB2ZW5kb3JfcmFtZGlzazogdHJ1ZSwKKyAgICAgICAgICAgIGNvbmRpdGlvbnNfZGVmYXVsdDogeworICAgICAgICAgICAgICAgIHJhbWRpc2s6IHRydWUsCisgICAgICAgICAgICAgICAgdmVuZG9yX3JhbWRpc2s6IGZhbHNlLAorICAgICAgICAgICAgfSwKKyAgICAgICAgfSwKKyAgICB9LAorfQorCithdmJfa2V5c19wcmVidWlsdF9hdmIgeworICAgIG5hbWU6ICJzLWRldmVsb3Blci1nc2kuYXZicHVia2V5IiwKKyAgICBzcmM6ICJzLWRldmVsb3Blci1nc2kuYXZicHVia2V5IiwKKyAgICBzb29uZ19jb25maWdfdmFyaWFibGVzOiB7CisgICAgICAgIEJPQVJEX01PVkVfR1NJX0FWQl9LRVlTX1RPX1ZFTkRPUl9CT09UOiB7CisgICAgICAgICAgICByYW1kaXNrOiBmYWxzZSwKKyAgICAgICAgICAgIHZlbmRvcl9yYW1kaXNrOiB0cnVlLAorICAgICAgICAgICAgY29uZGl0aW9uc19kZWZhdWx0OiB7CisgICAgICAgICAgICAgICAgcmFtZGlzazogdHJ1ZSwKKyAgICAgICAgICAgICAgICB2ZW5kb3JfcmFtZGlzazogZmFsc2UsCisgICAgICAgICAgICB9LAorICAgICAgICB9LAorICAgIH0sCit9CmRpZmYgLS1naXQgYS9yb290ZGlyL2F2Yi9BbmRyb2lkLm1rIGIvcm9vdGRpci9hdmIvQW5kcm9pZC5tawpkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggOGNmMzE3Mi4uMDAwMDAwMAotLS0gYS9yb290ZGlyL2F2Yi9BbmRyb2lkLm1rCisrKyAvZGV2L251bGwKQEAgLTEsNTYgKzAsMCBAQAotTE9DQUxfUEFUSDo9ICQoY2FsbCBteS1kaXIpCi0KLWlmZXEgKCQoQk9BUkRfTU9WRV9HU0lfQVZCX0tFWVNfVE9fVkVORE9SX0JPT1QpLHRydWUpICMgQV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QxLDcgQEAKICAgICBpZihyZXMgPCAoaW50KXNpemVvZigqZXZlbnQpKSB7CiAgICAgICAgIGlmKGVycm5vID09IEVJTlRSKQogICAgICAgICAgICAgcmV0dXJuIDA7Ci0gICAgICAgIGZwcmludGYoc3RkZXJyLCAiY291bGQgbm90IGdldCBldmVudCwgJXNcbiIsIHN0cmVycm9yKGVycm5vKSk7CisgICAgICAgIGZwcmludGYoc3RkZXJyLCAiY291bGQgbm90IGdldCBpbm90aWZ5IGV2ZW50cywgJXNcbiIsIHN0cmVycm9yKGVycm5vKSk7CiAgICAgICAgIHJldHVybiAxOwogICAgIH0KICAgICAvL3ByaW50ZigiZ290ICVkIGJ5dGVzIG9mIGV2ZW50IGluZm9ybWF0aW9uXG4iLCByZXMpOwpAQCAtNjY1LDcgKzY2NCw3IEBACiAgICAgICAgICAgICAgICAgaWYodWZkc1tpXS5yZXZlbnRzICYgUE9MTElOKSB7CiAgICAgICAgICAgICAgICAgICAgIHJlcyA9IHJlYWQodWZkc1tpXS5mZCwgJmV2ZW50LCBzaXplb2YoZXZlbnQpKTsKICAgICAgICAgICAgICAgICAgICAgaWYocmVzIDwgKGludClzaXplb2YoZXZlbnQpKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgImNvdWxkIG5vdCBnZXQgZXZlbnRcbiIpOworICAgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRlcnIsICJjb3VsZCBub3QgZ2V0IGV2ZGV2IGV2ZW50LCAlc1xuIiwgc3RyZXJyb3IoZXJybm8pKTsKICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAxOwogICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgIGlmKGdldF90aW1lKSB7CmRpZmYgLS1naXQgYS90b29sYm94L21vZHByb2JlLmNwcCBiL3Rvb2xib3gvbW9kcHJvYmUuY3BwCmluZGV4IDE3ZDRlMzEuLjEzMDI2YWMgMTAwNjQ0Ci0t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W1lbnQuCiAgICAgICAgICAgICAgICAgY2hlY2tfbW9kZSgpOwogICAgICAgICAgICAgICAgIGlmIChvcHRhcmcgPT0gTlVMTCkgYnJlYWs7Ci0gICAgICAgICAgICAgICAgaWYgKCFhbmRyb2lkOjpiYXNlOjpSZWFkRmlsZVRvU3RyaW5nKG9wdGFyZywgJm1vZHMpKSB7CisKKyAgICAgICAgICAgICAgICAvLyBTaW5jZSBsaWJtb2Rwcm9iZSBkb2Vzbid0IGZhaWwgd2hlbiB0aGUgbW9kdWxlcyBsb2FkIGZpbGUKKyAgICAgICAgICAgICAgICAvLyBkb2Vzbid0IGV4aXN0LCBsZXQncyBjaGVjayB0aGF0IGhlcmUgc28gdGhhdCB3ZSBkb24ndAorICAgICAgICAgICAgICAgIC8vIHNpbGVudGx5IGZhaWwuCisgICAgICAgICAgICAgICAgZmQgPSBvcGVuKG9wdGFyZywgT19SRE9OTFkgfCBPX0NMT0VYRUMgfCBPX0JJTkFSWSk7CisgICAgICAgICAgICAgICAgaWYgKGZkID09IC0xKSB7CiAgICAgICAgICAgICAgICAgICAgIFBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gb3BlbiAiIDw8IG9wdGFyZzsKLSAgICAgICAgICAgICAgICAgICAgcnYgPSBFWElUX0ZBSUxVUkU7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBFWElUX0ZBSUxVUkU7CiAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGZvciAoYXV0byBtb2QgOiBhbmRyb2lkOjpiYXNlOjpTcGxpdChzdHJpcENvbW1lbnRzKG1vZHMpLCAiXG4iKSkgewotICAgICAgICAgICAgICAgICAgICBtb2QgPSBhbmRyb2lkOjpiYXNlOjpUcmltKG1vZCk7Ci0gICAgICAgICAgICAgICAgICAgIGlmIChtb2QgPT0gIiIpIGNvbnRpbnVlOwotICAgICAgICAgICAgICAgICAgICBpZiAoc3RkOjpmaW5kKG1vZHVsZXMuYmVnaW4oKSwgbW9kdWxlcy5lbmQoKSwgbW9kKSAhPSBtb2R1bGVzLmVuZCgpKSBjb250aW51ZTsKLSAgICAgICAgICAgICAgICAgICAgbW9kdWxlcy5lbXBsYWNlX2JhY2sobW9kKTsKLSAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgY2xvc2UoZmQpOworCisgICAgICAgICAgICAgICAgbW9kX2RpcnMuZW1wbGFjZV9iYWNrKGFuZHJvaWQ6OmJhc2U6OkRpcm5hbWUob3B0YXJnKSk7CisgICAgICAgICAgICAgICAgbW9kdWxlc19sb2FkX2ZpbGUgPSBhbmRyb2lkOjpiYXNlOjpCYXNlbmFtZShvcHRhcmcpOwogICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgY2FzZSAnYic6CiAgICAgICAgICAgICAgICAgYmxvY2tsaXN0ID0gdHJ1ZTsKQEAgLTIyNiwzNyArMjQ1LDQ4IEBACiAgICAgICAgIH0KICAgICAgICAgZnJlZShrZXJuZWxfZGlycyk7CiAKLSAgICAgICAgLy8gQWxsb3cgbW9kdWxlcyB0byBiZSBkaXJlY3RseSBpbnNpZGUgL2xpYi9tb2R1bGVzCi0gICAgICAgIG1vZF9kaXJzLmVtcGxhY2VfYmFjayhMSUJfTU9EVUxFU19QUkVGSVgpOworICAgICAgICBpZiAobW9kX2RpcnMuZW1wdHkoKSB8fCBnZXRwYWdlc2l6ZSgpID09IDQwOTYpIHsKKyAgICAgICAgICAgIC8vIEFsbG93IG1vZHVsZXMgdG8gYmUgZGlyZWN0bHkgaW5zaWRlIC9saWIvbW9kdWxlcworICAgICAgICAgICAgbW9kX2RpcnMuZW1wbGFjZV9iYWNrKExJQl9NT0RVTEVTX1BSRUZJWCk7CisgICAgICAgIH0KICAgICB9CiAKICAgICBMT0coREVCVUcpIDw8ICJtb2RlIGlzICIgPDwgbW9kZTsKICAgICBMT0coREVCVUcpIDw8ICJtb2RfZGlycyBpczogIiA8PCBhbmRyb2lkOjpiYXNlOjpKb2luKG1vZF9kaXJzLCAiICI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bmRyb2lkLmhhcmR3YXJlLmtleW1hc3RlckA0LjAiLAogICAgIF0sCiAKICAgICB2aW50Zl9mcmFnbWVudHM6IFsiNC4wL2FuZHJvaWQuaGFyZHdhcmUua2V5bWFzdGVyQDQuMC1zZXJ2aWNlLnRydXN0eS54bWwiXSwKQEAgLTEwNSwyNSArMTA1LDIzIEBACiAgICAgICAgICJrZXltaW50L1RydXN0eVNoYXJlZFNlY3JldC5jcHAiLAogICAgICAgICAia2V5bWludC9zZXJ2aWNlLmNwcCIsCiAgICAgXSwKLSAgICBkZWZhdWx0czogWwotICAgICAgICAia2V5bWludF91c2VfbGF0ZXN0X2hhbF9haWRsX25ka19zaGFyZWQiLAotICAgIF0sCiAgICAgc2hhcmVkX2xpYnM6IFsKKyAgICAgICAgImFuZHJvaWQuaGFyZHdhcmUuc2VjdXJpdHkua2V5bWludC1WMy1uZGsiLAogICAgICAgICAiYW5kcm9pZC5oYXJkd2FyZS5zZWN1cml0eS5ya3AtVjMtbmRrIiwKICAgICAgICAgImFuZHJvaWQuaGFyZHdhcmUuc2VjdXJpdHkuc2VjdXJlY2xvY2stVjEtbmRrIiwKICAgICAgICAgImFuZHJvaWQuaGFyZHdhcmUuc2VjdXJpdHkuc2hhcmVkc2VjcmV0LVYxLW5kayIsCi0gICAgICAgICJsaWJfYW5kcm9pZF9rZXltYXN0ZXJfa2V5bWludF91dGlscyIsCisgICAgICAgICJsaWJfYW5kcm9pZF9rZXltYXN0ZXJfa2V5bWludF91dGlsc19WMyIsCiAgICAgICAgICJsaWJiYXNlIiwKICAgICAgICAgImxpYmJpbmRlcl9uZGsiLAogICAgICAgICAibGliaGFyZHdhcmUiLAogICAgICAgICAibGlia2V5bWFzdGVyX21lc3NhZ2VzIiwKLSAgICAgICAgImxpYmtleW1pbnQiLAorICAgICAgICAibGlia2V5bWFzdGVyY29uZmlnIiwKICAgICAgICAgImxpYmxvZyIsCiAgICAgICAgICJsaWJ0cnVzdHkiLAogICAgICAgICAibGlidXRpbHMiLAogICAgIF0sCiAgICAgcmVxdWlyZWQ6IFsKLSAgICAgICAgImFuZHJvaWQuaGFyZHdhcmUuaGFyZHdhcmVfa2V5c3RvcmUueG1sIiwKKyAgICAgICAgImFuZHJvaWQuaGFyZHdhcmUuaGFyZHdhcmVfa2V5c3RvcmVfVjMueG1sIiwKICAgICBdLAogfQogCkBAIC0yMDgsMyArMjA2LDM2IEBACiAgICAgICAgICItV2Vycm9yIiwKICAgICBdLAogfQorCitwcmVidWlsdF9ldGMgeworICAgIG5hbWU6ICJya3BfdWRzX2NlcnRfdGVzdC54bWwiLAorICAgIHZlbmRvcjogdHJ1ZSwKKyAgICBzcmM6ICJzZXRfdWRzX2NlcnRzL3JrcF91ZHNfY2VydF90ZXN0LnhtbCIsCit9CisKK2NjX2JpbmFyeSB7CisgICAgbmFtZTogInRydXN0eV9ya3Bfc2V0X3Vkc19jZXJ0IiwKKyAgICB2ZW5kb3I6IHRydWUsCisKKyAgICBzcmNzOiBbCisgICAgICAgICJzZXRfdWRzX2NlcnRzL3NldF91ZHNfY2VydGlmaWNhdGVzLmNwcCIsCisgICAgICAgICJpcGMvdHJ1c3R5X2tleW1hc3Rlcl9pcGMuY3BwIiwKKyAgICBdLAorCisgICAgbG9jYWxfaW5jbHVkZV9kaXJzOiBbImluY2x1ZGUiXSwKKworICAgIHNoYXJlZF9saWJzOiBbCisgICAgICAgICJsaWJjIiwKKyAgICAgICAgImxpYmNyeXB0byIsCisgICAgICAgICJsaWJsb2ciLAorICAgICAgICAibGlidHJ1c3R5IiwKKyAgICAgICAgImxpYmhhcmR3YXJlIiwKKyAgICAgICAgImxpYmtleW1hc3Rlcl9tZXNzYWdlcyIsCisgICAgICAgICJsaWJ1dGlscyIsCisgICAgICAgICJsaWJ4bWwyIiwKKyAgICBdLAorICAgIGNmbGFnczogWworICAgICAgICAiLVdhbGwiLAorICAgICAgICAiLVdlcnJvciIsCisgICAgXSwKK30KZGlmZiAtLWdpdCBhL3RydXN0eS9rZXltYXN0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AgICIgIC1ELCAtLWRldiBuYW1lICAgICAgICBUcnVzdHkgZGV2aWNlIG5hbWVcbiIKKyAgICAgICAgIlxuIjsKKworc3RhdGljIGNvbnN0IGNoYXIqIHVzYWdlX2xvbmcgPSAiXG4iOworCitzdGF0aWMgdm9pZCBwcmludF91c2FnZV9hbmRfZXhpdChjb25zdCBjaGFyKiBwcm9nLCBpbnQgY29kZSwgYm9vbCB2ZXJib3NlKSB7CisgICAgZnByaW50ZihzdGRlcnIsIHVzYWdlLCBwcm9nKTsKKyAgICBpZiAodmVyYm9zZSkgeworICAgICAgICBmcHJpbnRmKHN0ZGVyciwgIiVzIiwgdXNhZ2VfbG9uZyk7CisgICAgfQorICAgIGV4aXQoY29kZSk7Cit9CisKK3N0YXRpYyB2b2lkIHBhcnNlX29wdGlvbnMoaW50IGFyZ2MsIGNoYXIqKiBhcmd2KSB7CisgICAgaW50IGM7CisgICAgaW50IG9pZHggPSAwOworCisgICAgd2hpbGUgKDEpIHsKKyAgICAgICAgYyA9IGdldG9wdF9sb25nKGFyZ2MsIGFyZ3YsIF9zb3B0cywgX2xvcHRzLCAmb2lkeCk7CisgICAgICAgIGlmIChjID09IC0xKSB7CisgICAgICAgICAgICBicmVhazsgLyogZG9uZSAqLworICAgICAgICB9CisKKyAgICAgICAgc3dpdGNoIChjKSB7CisgICAgICAgICAgICBjYXNlICdEJzoKKyAgICAgICAgICAgICAgICB0cnVzdHlfa2V5bWFzdGVyX3NldF9kZXZfbmFtZShvcHRhcmcpOworICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICBjYXNlICdoJzoKKyAgICAgICAgICAgICAgICBwcmludF91c2FnZV9hbmRfZXhpdChhcmd2WzBdLCBFWElUX1NVQ0NFU1MsIHRydWUpOworICAgICAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgIHByaW50X3VzYWdlX2FuZF9leGl0KGFyZ3ZbMF0sIEVYSVRfRkFJTF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05NCwyOCArMTY3LDMxIEBACiAKICAgICAgICAgc3dpdGNoIChjKSB7CiAgICAgICAgICAgICBjYXNlICdiJzoKLSAgICAgICAgICAgICAgICByZXEuYnJhbmQuUmVpbml0aWFsaXplKG9wdGFyZywgc3RybGVuKG9wdGFyZykpOworICAgICAgICAgICAgICAgIHJlcS5iYXNlLmJyYW5kLlJlaW5pdGlhbGl6ZShvcHRhcmcsIHN0cmxlbihvcHRhcmcpKTsKICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgIGNhc2UgJ2QnOgotICAgICAgICAgICAgICAgIHJlcS5kZXZpY2UuUmVpbml0aWFsaXplKG9wdGFyZywgc3RybGVuKG9wdGFyZykpOworICAgICAgICAgICAgICAgIHJlcS5iYXNlLmRldmljZS5SZWluaXRpYWxpemUob3B0YXJnLCBzdHJsZW4ob3B0YXJnKSk7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICBjYXNlICdwJzoKLSAgICAgICAgICAgICAgICByZXEucHJvZHVjdC5SZWluaXRpYWxpemUob3B0YXJnLCBzdHJsZW4ob3B0YXJnKSk7CisgICAgICAgICAgICAgICAgcmVxLmJhc2UucHJvZHVjdC5SZWluaXRpYWxpemUob3B0YXJnLCBzdHJsZW4ob3B0YXJnKSk7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICBjYXNlICdzJzoKLSAgICAgICAgICAgICAgICByZXEuc2VyaWFsLlJlaW5pdGlhbGl6ZShvcHRhcmcsIHN0cmxlbihvcHRhcmcpKTsKKyAgICAgICAgICAgICAgICByZXEuYmFzZS5zZXJpYWwuUmVpbml0aWFsaXplKG9wdGFyZywgc3RybGVuKG9wdGFyZykpOwogICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgY2FzZSAnTSc6Ci0gICAgICAgICAgICAgICAgcmVxLm1hbnVmYWN0dXJlci5SZWluaXRpYWxpemUob3B0YXJnLCBzdHJsZW4ob3B0YXJnKSk7CisgICAgICAgICAgICAgICAgcmVxLmJhc2UubWFudWZhY3R1cmVyLlJlaW5pdGlhbGl6ZShvcHRhcmcsIHN0cmxlbihvcHRhcmcpKTsKICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgIGNhc2UgJ20nOgotICAgICAgICAgICAgICAgIHJlcS5tb2RlbC5SZWluaXRpYWxpemUob3B0YXJnLCBzdHJsZW4ob3B0YXJnKSk7CisgICAgICAgICAgICAgICAgcmVxLmJhc2UubW9kZWwuUmVpbml0aWFsaXplKG9wdGFyZywgc3RybGVuKG9wdGFyZykpOwogICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgY2FzZSAnaSc6Ci0gICAgICAgICAgICAgICAgcmVxLmltZWkuUmVpbml0aWFsaXplKG9wdGFyZywgc3RybGVuKG9wdGFyZykpOworICAgICAgICAgICAgICAgIHJlcS5iYXNlLmltZWkuUmVpbml0aWFsaXplKG9wdGFyZywgc3RybGVuKG9wdGFyZykpOwogICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgY2FzZSAnYyc6Ci0gICAgICAgICAgICAgICAgcmVxLm1laWQuUmVpbml0aWFsaXplKG9wdGFyZywgc3RybGVuKG9wdGFyZykpOworICAgICAgICAgICAgICAgIHJlcS5iYXNlLm1laWQuUmVpbml0aWFsaXplKG9wdGFyZywgc3RybGVuKG9wdGFyZykpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAnMic6CisgICAgICAgICAgICAgICAgcmVxLnNlY29uZF9pbWVpLlJlaW5pdGlhbGl6ZShvcHRhcmcsIHN0cmxlbihvcHRhcmcpKTsKICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgIGNhc2UgJ2gnOgogICAgICAgICAgICAgICAgIHByaW50X3VzYWdlKGFyZ3ZbMF0sIHJlcSk7CkBAIC0xNDQsMTkgKzIyMCwzNCBAQAogICAgICAgICAgICAiICBtYW51ZmFjdHVyZXI6ICVzXG4iCiAgICAgICAgICAgICIgIG1vZGVsOiAgICAgICAgJXNcbiIKICAgICAgICAgICAgIiAgSU1FSTogICAgICAgICAlc1xuIgotICAgICAgICAgICAiICBNRUlEOiAgICAgICAgICVzXG4iLAotICAgICAgICAgICBidWYyc3RyaW5nKHJlcS5icmFuZCkuY19zdHIoKSwgYnVmMnN0cmluZyhyZXEuZGV2aWNlKS5jX3N0cigpLAotICAgICAgICAgICBidWYyc3RyaW5nKHJlcS5wcm9kdWN0KS5jX3N0cigpLCBidWYyc3RyaW5nKHJlcS5zZXJpYWwpLmNfc3RyKCksCi0gICAgICAgICAgIGJ1ZjJzdHJpbmcocmVxLm1hbnVmYWN0dXJlcikuY19zdHIoKSwgYnVmMnN0cmluZyhyZXEubW9kZWwpLmNfc3RyKCksCi0gICAgICAgICAgIGJ1ZjJzdHJpbmcocmVxLmltZWkpLmNfc3RyKCksIGJ1ZjJzdHJpbmcocmVxLm1laWQpLmNfc3RyKCkpOworICAgICAgICAgICAiICBNRUlEOiAgICAgICAgICVzXG4iCisgICAgICAgICAgICIgIFNFQ09ORF9JTUVJOiAgJXNcblxuIiwKKyAgICAgICAgICAgYnVmMnN0cmluZyhyZXEuYmFzZS5icmFuZCkuY19zdHIoKSwgYnVmMnN0cmluZyhyZXEuYmFzZS5kZXZpY2UpLmNfc3RyKCksCisgICAgICAgICAgIGJ1ZjJzdHJpbmcocmVxLmJhc2UucHJvZHVjdCkuY19zdHIoKSwgYnVmMnN0cmluZyhyZXEuYmFzZS5zZXJpYWwpLmNfc3RyKCksCisgICAgICAgICAgIGJ1ZjJzdHJpbmcocmVxLmJhc2UubWFudWZhY3R1cmVyKS5jX3N0cigpLCBidWYyc3RyaW5nKHJlcS5iYXNlLm1vZGVsKS5jX3N0cigpLAorICAgICAgICAgICBidWYyc3RyaW5nKHJlcS5iYXNlLmltZWkpLmNfc3RyKCksIGJ1ZjJzdHJpbmcocmVxLmJhc2UubWVpZCkuY19zdHIoKSwKKyAgICAgICAgICAgYnVmMnN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KKyAgICAgICAgZnByaW50ZihzdGRlcnIsICJ0cnVzdHlfa2V5bWFzdGVyX3NlbmQgY21kIDB4JXggZmFpbGVkICVkXG4iLCBjbWQsIHJldCk7CisgICAgICAgIHJldHVybiByZXQ7CisgICAgfQorCisgICAgcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgc2V0X3Vkc19jZXJ0X3BlbSh1aW50MzJfdCBjbWQsIGNvbnN0IHhtbENoYXIqIHBlbWtleSkgeworICAgIGludCByZXQ7CisgICAgaW50IHNzbHJldDsKKworICAgIC8qIENvbnZlcnQgZnJvbSBwZW0gdG8gYmluYXJ5ICovCisgICAgQklPKiBiaW8gPSBCSU9fbmV3X21lbV9idWYocGVta2V5LCB4bWxTdHJsZW4ocGVta2V5KSk7CisgICAgaWYgKCFiaW8pIHsKKyAgICAgICAgZnByaW50ZihzdGRlcnIsICJCSU9fbmV3X21lbV9idWYgZmFpbGVkXG4iKTsKKyAgICAgICAgRVJSX3ByaW50X2Vycm9yc19mcChzdGRlcnIpOworICAgICAgICByZXR1cm4gLTE7CisgICAgfQorCisgICAgY2hhcioga2V5X25hbWU7CisgICAgY2hhcioga2V5X2hlYWRlcjsKKyAgICB1aW50OF90KiBrZXk7CisgICAgbG9uZyBrZXlsZW47CisgICAgc3NscmV0ID0gUEVNX3JlYWRfYmlvKGJpbywgJmtleV9uYW1lLCAma2V5X2hlYWRlciwgJmtleSwgJmtleWxlbik7CisgICAgQklPX2ZyZWUoYmlvKTsKKworICAgIGlmICghc3NscmV0KSB7CisgICAgICAgIGZwcmludGYoc3RkZXJyLCAiUEVNX3JlYWRfYmlvIGZhaWxlZFxuIik7CisgICAgICAgIEVSUl9wcmludF9lcnJvcnNfZnAoc3RkZXJyKTsKKyAgICAgICAgcmV0dXJuIC0xOworICAgIH0KKworICAgIC8qIFNlbmQga2V5IGluIGJpbmFyeSBmb3JtYXQgdG8gdHJ1c3R5ICovCisgICAgcmV0ID0gc2V0X3Vkc19jZXJ0X2Jpbihjb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ydGlmaWNhdGVzOiBcIiVzXCJcbiIsIG5hbWUpOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmICh4bWxTdHJFcXVhbChuYW1lLCBCQURfQ0FTVCAiQ2VydGlmaWNhdGVDaGFpbiIpKSB7CisgICAgICAgICAgICAgICAgICAgIHJldCA9IGNsZWFyX2NlcnRfY2hhaW4oKTsKKyAgICAgICAgICAgICAgICAgICAgaWYgKHJldCkgeworICAgICAgICAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRlcnIsICIlczogQ2xlYXIgY2VydCBjaGFpbiBjbWQgZmFpbGVkLCAlZFxuIiwgZWxlbWVudCwgcmV0KTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXQ7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCIlczogQ2xlYXIgY2VydCBjaGFpbiBjbWQgZG9uZVxuIiwgZWxlbWVudCk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBYTUxfUkVBREVSX1RZUEVfVEVYVDoKKyAgICAgICAgICAgICAgICB2YWx1ZSA9IHhtbFRleHRSZWFkZXJDb25zdFZhbHVlKHhtbCk7CisgICAgICAgICAgICAgICAgdWludDMyX3QgY21kOworICAgICAgICAgICAgICAgIGlmICh4bWxTdHJFcXVhbChlbGVtZW50LCBCQURfQ0FTVCAiQ2VydGlmaWNhdGUiKSkgeworICAgICAgICAgICAgICAgICAgICBjbWQgPSBLTV9BUFBFTkRfVURTX0NFUlRfQ0hBSU47CisgICAgICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgcmV0ID0gc2V0X3Vkc19jZXJ0KGNtZCwgZWxlbWVudF9mb3JtYXQsIHZhbHVlKTsKKyAgICAgICAgICAgICAgICBpZiAocmV0KSB7CisgICAgICAgICAgICAgICAgICAgIGZwcmludGYoc3RkZXJyLCAiJXMsIGZvcm1hdCAlczogQ21kIDB4JXggZmFpbGVkLCAlZFxuIiwgZWxlbWVudCwgZWxlbWVudF9mb3JtYXQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgY21kLCByZXQpOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBwcmludGYoIiVzLCBmb3JtYXQgJXM6IENtZCAweCV4IGRvbmVcbiIsIGVsZW1lbnQsIGVsZW1lbnRfZm9ybWF0LCBjbWQpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSBYTUxfUkVBREVSX1RZUEVfRU5EX0VMRU1FTlQ6CisgICAgICAgICAgICAgICAgZWxlbWVudCA9IE5VTEw7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCBwYXJzZV9hbmRfcHJvdmlzaW9uX3htbF9maWxlKGNvbnN0IGNoYXIqIGZpbGVuYW1lKSB7CisgICAgaW50IHJldDsKKyAgICB4bWxUZXh0UmVhZGVyUHRyIHhtbCA9IHhtbFJlYWRlckZvckZpbGUoZmlsZW5hbWUsIE5VTEwsIDApOworICAgIGlmICgheG1sKSB7CisgICAgICAgIGZwcmludGYoc3RkZXJyLCAiZmFpbGVkIHRvIG9wZW4gJXNcbiIsIGZpbGVuYW1lKTsKKyAgICAgICAgcmV0dXJuIC0xOworICAgIH0KKworICAgIHJldCA9IHByb2Nlc3NfeG1sKHhtbCk7CisKKyAgICB4bWxGcmVlVGV4dFJlYWRlcih4bWwpOworICAgIGlmIChyZXQgIT0gMCkgeworICAgICAgICBmcHJpbnRmKHN0ZGVyciwgIkZhaWxlZCB0byBwYXJzZSBvciBwcm9jZXNzICVzXG4iLCBm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XVzZSBvZiB7Oj99LiIsIGUpKQotICAgICAgICB9KT87CisgICAgbGV0IGNvbm5lY3Rpb24gPQorICAgICAgICB0cnVzdHk6OlRpcGNDaGFubmVsOjpjb25uZWN0KGFyZ3MuZGV2LmFzX3N0cigpLCBUUlVTVFlfS0VZTUlOVF9SVVNUX1NFUlZJQ0VfTkFNRSkubWFwX2VycigKKyAgICAgICAgICAgIHxlfCB7CisgICAgICAgICAgICAgICAgSGFsU2VydmljZUVycm9yKGZvcm1hdCEoCisgICAgICAgICAgICAgICAgICAgICJGYWlsZWQgdG8gY29ubmVjdCB0byBUcnVzdHkgS2V5bWludCBUQSBhdCB7fSBiZWNhdXNlIG9mIHs6P30uIiwKKyAgICAgICAgICAgICAgICAgICAgYXJncy5kZXYsIGUKKyAgICAgICAgICAgICAgICApKQorICAgICAgICAgICAgfSwKKyAgICAgICAgKT87CiAgICAgbGV0IHRpcGNfY2hhbm5lbCA9IEFyYzo6bmV3KE11dGV4OjpuZXcoVGlwY0NoYW5uZWwoY29ubmVjdGlvbikpKTsKIAorICAgICNbY2ZnKGZlYXR1cmUgPSAibm9uc2VjdXJlIildCisgICAgeworICAgICAgICAvLyBXaGVuIHRoZSBub24tc2VjdXJlIGZlYXR1cmUgaXMgZW5hYmxlZCwgcmV0cmlldmUgcm9vdC1vZi10cnVzdCBpbmZvcm1hdGlvbgorICAgICAgICAvLyAod2l0aCB0aGUgZXhjZXB0aW9uIG9mIHRoZSB2ZXJpZmllZCBib290IGtleSBoYXNoKSBmcm9tIEFuZHJvaWQgcHJvcGVydGllcywgYW5kCisgICAgICAgIC8vIHBvcHVsYXRlIHRoZSBUQSB3aXRoIHRoaXMgaW5mb3JtYXRpb24uIE9uIGEgcmVhbCBkZXZpY2UsIHRoZSBib290bG9hZGVyIHNob3VsZAorICAgICAgICAvLyBwcm92aWRlIHRoaXMgZGF0YSB0byB0aGUgVEEgZGlyZWN0bHkuCisgICAgICAgIGxldCBib290X3JlcSA9IGttcl9oYWxfbm9u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YWNrZXRzIGV2ZXJ5IHRpbWUgaXQgcmVjZWl2ZXMgYSBkYXRhIHBhY2tldCB3aGlsZSB0aGUKKyAgICAgICAgICAgICAqIFNPQ0tfU1RSRUFNIHZlcnNpb24gc2tpcHMgdGhlc2UgdW5sZXNzIHRoZSByZW1haW5pbmcgYnVmZmVyIHNwYWNlIGlzICJsb3ciLgorICAgICAgICAgICAgICovCisgICAgICAgICAgICBzb2NrZXRfdHlwZSA9IHNvY2tldDo6U29ja1R5cGU6OlN0cmVhbTsKKyAgICAgICAgICAgIGNpZF9wb3J0X3N0ciA9IHR5cGVfY2lkX3BvcnRfc3RyOworICAgICAgICB9CisKKyAgICAgICAgbGV0IFtjaWQsIHBvcnRdOiBbdTMyOyAyXSA9IGNpZF9wb3J0X3N0cgorICAgICAgICAgICAgLnNwbGl0KCc6JykKKyAgICAgICAgICAgIC5tYXAofHZ8IHYucGFyc2U6Ojx1MzI+KCkubWFwX2Vycih8ZXwgaW86OkVycm9yOjpuZXcoaW86OkVycm9yS2luZDo6SW52YWxpZElucHV0LCBlKSkpCisgICAgICAgICAgICAuY29sbGVjdDo6PFJlc3VsdDxWZWM8dTMyPj4+KCk/CisgICAgICAgICAgICAudHJ5X2ludG8oKQorICAgICAgICAgICAgLm1hcF9lcnIofGV8IHsKKyAgICAgICAgICAgICAgICBpbzo6RXJyb3I6Om5ldyhpbzo6RXJyb3JLaW5kOjpJbnZhbGlkSW5wdXQsIGZvcm1hdCEoIldyb25nIG51bWJlciBvZiBhcmdzOiB7ZTo/fSIpKQorICAgICAgICAgICAgfSk/OworCisgICAgICAgIHRyYWNlISgiZ290IGNpZCwgcG9ydDoge2NpZH0sIHtwb3J0fSIpOworICAgICAgICBsZXQgcyA9IHNvY2tldDo6c29ja2V0KAorICAgICAgICAgICAgc29ja2V0OjpBZGRyZXNzRmFtaWx5OjpWc29jaywKKyAgICAgICAgICAgIHNvY2tldF90eXBlLAorICAgICAgICAgICAgc29ja2V0OjpTb2NrRmxhZzo6U09DS19DTE9FWEVDLAorICAgICAgICAgICAgTm9uZSwKKyAgICAgICAgKT87CisgICAgICAgIHRyYWNlISgiZ290IHNvY2tldCIpOworICAgICAgICBsZXQgc2EgPSBzb2NrZXQ6OlZzb2NrQWRkcjo6bmV3KGNpZCwgcG9ydCk7CisgICAgICAgIHRyYWNlISgiZ290IHNhIik7CisKKyAgICAgICAgLy9sZXQgY29ubmVjdF90aW1lb3V0ID0gbGliYzo6dGltZXZhbCB7dHZfc2VjOiA2MCwgdHZfdXNlYzogMH07CisgICAgICAgIC8vIFRPRE86IFNldCBBRl9WU09DSy9TT19WTV9TT0NLRVRTX0NPTk5FQ1RfVElNRU9VVCBzb2Nrb3B0LgorCisgICAgICAgIGxldCBtdXQgcmV0cnkgPSAxMDsKKyAgICAgICAgbG9vcCB7CisgICAgICAgICAgICBsZXQgcmVzID0gc29ja2V0Ojpjb25uZWN0KHMuYXNfcmF3X2ZkKCksICZzYSk7CisgICAgICAgICAgICBpZiByZXMuaXNfb2soKSB8fCByZXRyeSA8PSAwIHsKKyAgICAgICAgICAgICAgICByZXM/OworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorICAgICAgICAgICAgd2FybiEoInZzb2NrOntjaWR9Ontwb3J0fSBjb25uZWN0IGZhaWxlZCB7cmVzOj99LCB7cmV0cnl9IHJldHJpZXMgcmVtYWluaW5nIik7CisgICAgICAgICAgICByZXRyeSAtPSAxOworICAgICAgICAgICAgdGhyZWFkOjpzbGVlcCh0aW1lOjpEdXJhdGlvbjo6ZnJvbV9zZWNzKDUpKTsKKyAgICAgICAgfQorICAgICAgICB0cmFjZSEoImNvbm5lY3RlZCIpOworICAgICAgICAvLyBUT0RPOiBDdXJyZW50IHZzb2NrIHRpcGMgYnJpZGdlIGluIHRydXN0eSBleHBlY3RzIGEgcG9ydCBuYW1lIGluIHRoZQorICAgICAgICAvLyBmaXJzdCBwYWNrZXQuIFdlIG5lZWQgdG8gcmVwbGFjZSB0aGlzIHdpd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uaD4KIApAQCAtMzEsOCArMzMsMjcgQEAKIAogI2RlZmluZSBUSVBDX0RFRkFVTFRfREVWTkFNRSAiL2Rldi90cnVzdHktaXBjLWRldjAiCiAKLXN0YXRpYyBjb25zdCBjaGFyICpkZXZfbmFtZSA9IE5VTEw7Ci1zdGF0aWMgY29uc3QgY2hhciAqdGVzdF9uYW1lID0gTlVMTDsKKy8qIGNsYW5nLWZvcm1hdCBvZmYgKi8KKyNkZWZpbmUgQkVOQ0hfUkVTVUxUX1RQTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyJ7IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyIgICAgXCJzY2hlbWFfdmVyc2lvblwiOiAzLCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyIgICAgXCJzdWl0ZV9uYW1lXCI6IFwidGlwY1wiLCIgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisiICAgIFwiYmVuY2hfbmFtZVwiOiBcIiVzXCIsIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisiICAgIFwicmVzdWx0c1wiOiBbIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICB7IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICAgICAgXCJtZXRyaWNfbmFtZVwiOiBcInRpbWVfbWljcm9fc2VjXCIsIiAgICAgICAgICBcCisiICAgICAgICAgICAgXCJtaW5cIjogXCIlIiBQUklkNjQgIlwiLCIgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICAgICAgXCJtYXhcIjogXCIlIiBQUklkNjQgIlwiLCIgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICAgICAgXCJhdmdcIjogXCIlIiBQUklkNjQgIlwiLCIgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICAgICAgXCJjb2xkXCI6IFwiJSIgUFJJZDY0ICJcIiwiICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICAgICAgXCJyYXdfbWluXCI6ICUiIFBSSWQ2NCAiLCIgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICAgICAgXCJyYXdfbWF4XCI6ICUiIFBSSWQ2NCAiLCIgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICAgICAgXCJyYXdfYXZnXCI6ICUiIFBSSWQ2NCAiLCIgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICAgICAgXCJyYXdfY29sZFwiOiAlIiBQUklkNjQgIiIgICAgICAgICAgICAgICAgICAgICBcCisiICAgICAgICB9LCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisiICAgIF0iICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisifSIKKy8qIGNsYW5nLWZvcm1hdCBvbiAqLwogCiBzdGF0aWMgY29uc3QgY2hhciAqdXVpZF9uYW1lID0gImNvbS5hbmRyb2lkLmlwYy11bml0dGVzdC5zcnYudXVpZCI7CiBzdGF0aWMgY29uc3QgY2hhciAqZWNob19uYW1lID0gImNvbS5hbmRyb2lkLmlwYy11bml0dGVzdC5zcnYuZWNobyI7CkBAIC00NCw4ICs2NSw5IEBACiBzdGF0aWMgY29uc3QgY2hhciAqY2xvc2VyM19uYW1lID0gImNvbS5hbmRyb2lkLmlwYy11bml0dGVzdC5zcnYuY2xvc2VyMyI7CiBzdGF0aWMgY29uc3QgY2hhciAqbWFpbl9jdHJsX25hbWUgPSAiY29tLmFuZHJvaWQuaXBjLXVuaXR0ZXN0LmN0cmwiOwogc3RhdGljIGNvbnN0IGNoYXIqIHJlY2VpdmVyX25hbWUgPSAiY29tLmFuZHJvaWQudHJ1c3R5Lm1lbXJlZi5yZWNlaXZlciI7CitzdGF0aWMgY29uc3Qgc2l6ZV90IG1lbXJlZl9jaHVua19zaXplID0gNDA5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hcmFtcy0+YmVuY2ggPSAwOworICAgIHBhcmFtcy0+c3J2X25hbWUgPSBOVUxMOworICAgIHBhcmFtcy0+dGVzdF9uYW1lID0gTlVMTDsKK30KIAogc3RhdGljIHZvaWQgcHJpbnRfdXNhZ2VfYW5kX2V4aXQoY29uc3QgY2hhciAqcHJvZywgaW50IGNvZGUsIGJvb2wgdmVyYm9zZSkKIHsKQEAgLTEwOSw4ICsxNTYsNyBAQAogICAgIGV4aXQoY29kZSk7CiB9CiAKLXN0YXRpYyB2b2lkIHBhcnNlX29wdGlvbnMoaW50IGFyZ2MsIGNoYXIgKiphcmd2KQoteworc3RhdGljIHZvaWQgcGFyc2Vfb3B0aW9ucyhpbnQgYXJnYywgY2hhcioqIGFyZ3YsIHN0cnVjdCB0aXBjX3Rlc3RfcGFyYW1zKiBwYXJhbXMpIHsKICAgICBpbnQgYzsKICAgICBpbnQgb2lkeCA9IDA7CiAKQEAgLTEyMCwzNSArMTY2LDM5IEBACiAKICAgICAgICAgc3dpdGNoIChjKSB7CiAgICAgICAgICAgICBjYXNlICdEJzoKLSAgICAgICAgICAgICAgICBkZXZfbmFtZSA9IHN0cmR1cChvcHRhcmcpOworICAgICAgICAgICAgICAgIHBhcmFtcy0+ZGV2X25hbWUgPSBzdHJkdXAob3B0YXJnKTsKICAgICAgICAgICAgICAgICBicmVhazsKIAogICAgICAgICAgICAgY2FzZSAnUyc6Ci0gICAgICAgICAgICAgICAgc3J2X25hbWUgPSBzdHJkdXAob3B0YXJnKTsKKyAgICAgICAgICAgICAgICBwYXJhbXMtPnNydl9uYW1lID0gc3RyZHVwKG9wdGFyZyk7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgIGNhc2UgJ3QnOgotICAgICAgICAgICAgICAgIHRlc3RfbmFtZSA9IHN0cmR1cChvcHRhcmcpOworICAgICAgICAgICAgICAgIHBhcmFtcy0+dGVzdF9uYW1lID0gc3RyZHVwKG9wdGFyZyk7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgIGNhc2UgJ3YnOgotICAgICAgICAgICAgICAgIG9wdF92YXJpYWJsZSA9IHRydWU7CisgICAgICAgICAgICAgICAgcGFyYW1zLT52YXJpYWJsZSA9IHRydWU7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgIGNhc2UgJ3InOgotICAgICAgICAgICAgICAgIG9wdF9yZXBlYXQgPSBhdG9pKG9wdGFyZyk7CisgICAgICAgICAgICAgICAgcGFyYW1zLT5yZXBlYXQgPSBhdG9pKG9wdGFyZyk7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgIGNhc2UgJ20nOgotICAgICAgICAgICAgICAgIG9wdF9tc2dzaXplID0gYXRvaShvcHRhcmcpOworICAgICAgICAgICAgICAgIHBhcmFtcy0+bXNnc2l6ZSA9IGF0b2kob3B0YXJnKTsKICAgICAgICAgICAgICAgICBicmVhazsKIAogICAgICAgICAgICAgY2FzZSAnYic6Ci0gICAgICAgICAgICAgICAgb3B0X21zZ2J1cnN0ID0gYXRvaShvcHRhcmcpOworICAgICAgICAgICAgICAgIHBhcmFtcy0+bXNnYnVyc3QgPSBhdG9pKG9wdGFyZyk7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICAgIGNhc2UgJ3MnOgotICAgICAgICAgICAgICAgIG9wdF9zaWxlbnQgPSB0cnVlOworICAgICAgICAgICAgICAgIHBhcmFtcy0+c2lsZW50ID0gdHJ1ZTsKKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSAnQic6CisgICAgICAgICAgICAgICAgcGFyYW1zLT5iZW5jaCA9IGF0b2kob3B0YXJnKTsKICAgICAgICAgICAgICAgICBicmVhazsKIAogICAgICAgICAgICAgY2FzZSAnaCc6CkBAIC0xNjEsMzIgKzIxMSwzMSBAQAogICAgIH0KIH0KIAotc3RhdGljIGludCBjb25uZWN0X3Rlc3QodWludCByZXBlYXQ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bV9mZCA+PSAwKSB7CiAgICAgICAgICAgICAgICAgdGlwY19jbG9zZShjdXN0b21fZmQpOwogICAgICAgICAgICAgfQogICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgZWNob19mZCA9IHRpcGNfY29ubmVjdChkZXZfbmFtZSwgZWNob19uYW1lKTsKKyAgICAgICAgICAgIGVjaG9fZmQgPSB0aXBjX2Nvbm5lY3QocGFyYW1zLT5kZXZfbmFtZSwgZWNob19uYW1lKTsKICAgICAgICAgICAgIGlmIChlY2hvX2ZkIDwgMCkgewogICAgICAgICAgICAgICAgIGZwcmludGYoc3RkZXJyLCAiRmFpbGVkIHRvIGNvbm5lY3QgdG8gJyVzJyBzZXJ2aWNlXG4iLCAiZWNobyIpOwogICAgICAgICAgICAgfQotICAgICAgICAgICAgZHNpbmtfZmQgPSB0aXBjX2Nvbm5lY3QoZGV2X25hbWUsIGRhdGFzaW5rX25hbWUpOworICAgICAgICAgICAgZHNpbmtfZmQgPSB0aXBjX2Nvbm5lY3QocGFyYW1zLT5kZXZfbmFtZSwgZGF0YXNpbmtfbmFtZSk7CiAgICAgICAgICAgICBpZiAoZHNpbmtfZmQgPCAwKSB7CiAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRlcnIsICJGYWlsZWQgdG8gY29ubmVjdCB0byAnJXMnIHNlcnZpY2VcbiIsICJkYXRhc2luayIpOwogICAgICAgICAgICAgfQpAQCAtMjAwLDc5ICsyNDksNzUgQEAKICAgICAgICAgfQogICAgIH0KIAotICAgIGlmICghb3B0X3NpbGVudCkgeworICAgIGlmICghcGFyYW1zLT5zaWxlbnQpIHsKICAgICAgICAgcHJpbnRmKCIlczogZG9uZVxuIiwgX19mdW5jX18pOwogICAgIH0KIAogICAgIHJldHVybiAwOwogfQogCi1zdGF0aWMgaW50IGNvbm5lY3RfZm9vKHVpbnQgcmVwZWF0KQoteworc3RhdGljIGludCBjb25uZWN0X2Zvbyhjb25zdCBzdHJ1Y3QgdGlwY190ZXN0X3BhcmFtcyogcGFyYW1zKSB7CiAgICAgdWludCBpOwogICAgIGludCBmZDsKIAotICAgIGlmICghb3B0X3NpbGVudCkgewotICAgICAgICBwcmludGYoIiVzOiByZXBlYXQgPSAldVxuIiwgX19mdW5jX18sIHJlcGVhdCk7CisgICAgaWYgKCFwYXJhbXMtPnNpbGVudCkgeworICAgICAgICBwcmludGYoIiVzOiByZXBlYXQgPSAldVxuIiwgX19mdW5jX18sIHBhcmFtcy0+cmVwZWF0KTsKICAgICB9CiAKLSAgICBmb3IgKGkgPSAwOyBpIDwgcmVwZWF0OyBpKyspIHsKLSAgICAgICAgZmQgPSB0aXBjX2Nvbm5lY3QoZGV2X25hbWUsICJmb28iKTsKKyAgICBmb3IgKGkgPSAwOyBpIDwgcGFyYW1zLT5yZXBlYXQ7IGkrKykgeworICAgICAgICBmZCA9IHRpcGNfY29ubmVjdChwYXJhbXMtPmRldl9uYW1lLCAiZm9vIik7CiAgICAgICAgIGlmIChmZCA+PSAwKSB7CiAgICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgInN1Y2NlZWRlZCB0byBjb25uZWN0IHRvICclcycgc2VydmljZVxuIiwgImZvbyIpOwogICAgICAgICAgICAgdGlwY19jbG9zZShmZCk7CiAgICAgICAgIH0KICAgICB9CiAKLSAgICBpZiAoIW9wdF9zaWxlbnQpIHsKKyAgICBpZiAoIXBhcmFtcy0+c2lsZW50KSB7CiAgICAgICAgIHByaW50ZigiJXM6IGRvbmVcbiIsIF9fZnVuY19fKTsKICAgICB9CiAKICAgICByZXR1cm4gMDsKIH0KIAotCi1zdGF0aWMgaW50IGNsb3NlcjFfdGVzdCh1aW50IHJlcGVhdCkKLXsKK3N0YXRpYyBpbnQgY2xvc2VyMV90ZXN0KGNvbnN0IHN0cnVjdCB0aXBjX3Rlc3RfcGFyYW1zKiBwYXJhbXMpIHsKICAgICB1aW50IGk7CiAgICAgaW50IGZkOwogCi0gICAgaWYgKCFvcHRfc2lsZW50KSB7Ci0gICAgICAgIHByaW50ZigiJXM6IHJlcGVhdCA9ICV1XG4iLCBfX2Z1bmNfXywgcmVwZWF0KTsKKyAgICBpZiAoIXBhcmFtcy0+c2lsZW50KSB7CisgICAgICAgIHByaW50ZigiJXM6IHJlcGVhdCA9ICV1XG4iLCBfX2Z1bmNfXywgcGFyYW1zLT5yZXBlYXQpOwogICAgIH0KIAotICAgIGZvciAoaSA9IDA7IGkgPCByZXBlYXQ7IGkrKykgewotICAgICAgICBmZCA9IHRpcGNfY29ubmVjdChkZXZfbmFtZSwgY2xvc2VyMV9uYW1lKTsKKyAgICBmb3IgKGkgPSAwOyBpIDwgcGFyYW1zLT5yZXBlYXQ7IGkrKykgeworICAgICAgICBmZCA9IHRpcGNfY29ubmVjdChwYXJhbXMtPmRldl9uYW1lLCBjbG9zZXIxX25hbWUpOwogICAgICAgICBpZiAoZmQgPCAwKSB7CiAgICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgIkZhaWxlZCB0byBjb25uZWN0IHRvICclcycgc2VydmljZVxuIiwgImNsb3NlcjEiKTsKICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICB9Ci0gICAgICAgIGlmICghb3B0X3NpbGVudCkgeworICAgICAgICBpZiAoIXBhcmFtcy0+c2lsZW50KSB7CiAgICAgICAgICAgICBwcmludGYoIiVzOiBjb25uZWN0ZWRcbiIsIF9fZnVuY19fKTsKICAgICAgICAgfQogICAgICAgICB0aXBjX2Nsb3NlKGZkKTsKICAgICB9CiAKLSAgICBpZiAoIW9wdF9zaWxlbnQpIHsKKyAgICBpZiAoIXBhcmFtcy0+c2lsZW50KSB7CiAgICAgICAgIHByaW50ZigiJXM6IGRvbmVcbiIsIF9fZnVuY19fKTsKICAgICB9CiAKICAgICByZXR1cm4gMDsKIH0KIAotc3RhdGljIGludCBjbG9zZXIyX3Rlc3QodWludCByZXBlYXQpCi17CitzdGF0aWMgaW50IGNsb3NlcjJfdGVzdChjb25zdCBzdHJ1Y3QgdGlwY190ZXN0X3BhcmFtcyogcGFyYW1zKSB7CiAgICAgdWludCBpOwogICAgIGludCBmZDsKIAotICAgIGlmICghb3B0X3NpbGVudCkgewotICAgICAgICBwcmludGYoIiVzOiByZXBlYXQgPSAldVxuIiwgX19mdW5jX18sIHJlcGVhdCk7CisgICAgaWYgKCFwYXJhbXMtPnNpbGVudCkgeworICAgICAgICBwcmludGYoIiVzOiByZXBlYXQgPSAldVxuIiwgX19mdW5jX18sIHBhcmFtcy0+cmVwZWF0KTsKICAgICB9CiAKLSAgICBmb3IgKGkgPSAwOyBpIDwgcmVwZWF0OyBpKyspIHsKLSAgICAgICAgZmQgPSB0aXBjX2Nvbm5lY3QoZGV2X25hbWUsIGNsb3NlcjJfbmFtZSk7CisgICAgZm9yIChpID0gMDsgaSA8IHBhcmFtcy0+cmVwZWF0OyBpKyspIHsKKyAgICAgICAgZmQgPSB0aXBjX2Nvbm5lY3QocGFyYW1zLT5kZXZfbmFtZSwgY2xvc2VyMl9uYW1lKTsKICAgICAgICAgaWYgKGZkIDwgMCkgewotICAgICAgICAgICAgaWYgKCFvcHRfc2lsZW50KSB7CisgICAgICAgICAgICBpZiAoIXBhcmFtcy0+c2lsZW50KSB7CiAgICAgICAgICAgICAgICAgcHJpbnRmKCJmYWlsZWQgdG8gY29ubmVjdCB0byAnJXMnIHNlcnZpY2VcbiIsICJjbG9zZXIyIik7CiAgICAgICAgICAgICB9CiAgICAgICAgIH0gZWxzZSB7CkBAIC0yODIsMzggKzMyNywzNyBAQAogICAgICAgICB9CiAgICAgfQogCi0gICAgaWYgKCFvcHRfc2lsZW50KSB7CisgICAgaWYgKCFwYXJhbXMtPnNpbGVudCkgewogICAgICAgICBwcmludGYoIiVzOiBkb25lXG4iLCBfX2Z1bmNfXyk7CiAgICAgfQogCiAgICAgcmV0dXJuIDA7CiB9CiAKLXN0YXRpYyBpbnQgY2xvc2VyM190ZXN0KHVpbnQgcmVwZWF0KQoteworc3RhdGljIGludCBjbG9zZXIzX3Rlc3QoY29uc3Qgc3RydWN0IHRpcGNfdGVzdF9wYXJhbXMqIHBhcmFtcykgewogICAgIHVpbnQgaSwgajsKICAgICBzc2l6ZV90IHJjOwogICAgIGludCBmZFs0XTsKICAgICBjaGFyIGJ1Zls2NF07CiAKLSAgICBpZiAoIW9wdF9zaWxlbnQpIHsKLSAgICAgICAgcHJpbnRmKCIlczogcmVwZWF0ID0gJXVcbiIsIF9fZnVuY19fLCByZXBlYXQpOworICAgIGlmICghcGFyYW1zLT5zaWxlbnQpIHsKKyAgICAgICAgcHJpbnRmKCIlczogcmVwZWF0ID0gJXVcbiIsIF9fZnVuY19fLCBwYXJhbXMtPnJlcGVhdCk7CiAgICAgfQogCi0gICAgZm9yIChpID0gMDsgaSA8IHJlcGVhdDsgaSsrKSB7CisgICAgZm9yIChpID0gMDsgaSA8IHBhcmFtcy0+cmVwZWF0OyBpKyspIHsKICAgICAgICAgLyogb3BlbiA0IGNvbm5lY3Rpb25zIHRvIGNsb3NlcjMgc2VydmljZSAqLwogICAgICAgICBmb3IgKGogPSAwOyBqIDwgNDsgaisrKSB7Ci0gICAgICAgICAgICBmZFtqXSA9IHRpcGNfY29ubmVjdChkZXZfbmFtZSwgY2xvc2VyM19uYW1lKTsKKyAgICAgICAgICAgIGZkW2pdID0gdGlwY19jb25uZWN0KHBhcmFtcy0+ZGV2X25hbWUsIGNsb3NlcjNfbmFtZSk7CiAgICAgICAgICAgICBpZiAoZmRbal0gPCAwKSB7CiAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRlcnIsICJmZFslZF06IGZhaWxlZCB0byBjb25uZWN0IHRvICclcycgc2VydmljZVxuIiwgaiwgImNsb3NlcjMiKTsKICAgICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICAgaWYgKCFvcHRfc2lsZW50KSB7CisgICAgICAgICAgICAgICAgaWYgKCFwYXJhbXMtPnNpbGVudCkgewogICAgICAgICAgICAgICAgICAgICBwcmludGYoIiVzOiBmZFslZF09JWQ6IGNvbm5lY3RlZFxuIiwgX19mdW5jX18sIGosIGZkW2pdKTsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgbWVtc2V0KGJ1ZiwgaSArIGosIHNpemVvZihidWYpKTsKICAgICAgICAgICAgICAgICByYyA9IHdyaXRlKGZkW2pdLCBidWYsIHNpemVvZihidWYpKTsKICAgICAgICAgICAgICAgICBpZiAocmMgIT0gc2l6ZW9mKGJ1ZikpIHsKLSAgICAgICAgICAgICAgICAgICAgaWYgKCFvcHRfc2lsZW50KSB7CisgICAgICAgICAgICAgICAgICAgIGlmICghcGFyYW1zLT5zaWxlbnQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgIHByaW50ZigiJXM6IGZkWyVkXT0lZDogd3JpdGUgcmV0dXJuZWQgID0gJXpkXG4iLCBfX2Z1bmNfXywgaiwgZmRbal0sIHJjKTsKICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICBwZXJyb3IoImNsb3NlcjNfdGVzdDogd3JpdGUiKTsKQEAgLTMyOSw3ICszNzMsNyBAQAogICAgICAgICAgICAgaWYgKGZkW2pdIDwgMCkgY29udGludWU7CiAgICAgICAgICAgICByYyA9IHdyaXRlKGZkW2pdLCBidWYsIHNpemVvZihidWYpKTsKICAgICAgICAgICAgIGlmIChyYyAhPSBzaXplb2YoYnVmKSkgewotICAgICAgICAgICAgICAgIGlmICghb3B0X3NpbGVudCkgeworICAgICAgICAgICAgICAgIGlmICghcGFyYW1zLT5zaWxlbnQpIHsKICAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCIlczogZmRbJWRdPSVkOiB3cml0ZSByZXR1cm5lZCA9ICV6ZFxuIiwgX19mdW5jX18sIGosIGZkW2pdLCByYyk7CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIHBlcnJvcigiY2xvc2VyM190ZXN0OiB3cml0ZSIpOwpAQCAtMzQ0LDM4ICszODgsMzYgQEAKICAgICAgICAgfQogICAgIH0KIAotICAgIGlmICghb3B0X3NpbG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c3Qgc3RydWN0IHRpcGNfdGVzdF9wYXJhbXMqIHBhcmFtcykgewogICAgIGludCBmZDsKICAgICB1aW50IGksIGo7CiAgICAgc3NpemVfdCByYzsKICAgICBzaXplX3QgbXNnX2xlbjsKLSAgICBjaGFyIHR4X2J1Zlttc2dzel07CisgICAgY2hhciB0eF9idWZbcGFyYW1zLT5tc2dzaXplXTsKIAotICAgIGlmICghb3B0X3NpbGVudCkgewotICAgICAgICBwcmludGYoIiVzOiByZXBlYXQgJXU6IGJ1cnN0ICV1OiBtc2dzeiAldTogdmFyaWFibGUgJXNcbiIsIF9fZnVuY19fLCByZXBlYXQsIG1zZ2J1cnN0LAotICAgICAgICAgICAgICAgbXNnc3osIHZhciA/ICJ0cnVlIiA6ICJmYWxzZSIpOworICAgIGlmICghcGFyYW1zLT5zaWxlbnQpIHsKKyAgICAgICAgcHJpbnRmKCIlczogcmVwZWF0ICV1OiBidXJzdCAldTogcGFyYW1zLT5tc2dzaXplICV1OiB2YXJpYWJsZSAlc1xuIiwgX19mdW5jX18sCisgICAgICAgICAgICAgICBwYXJhbXMtPnJlcGVhdCwgcGFyYW1zLT5tc2didXJzdCwgcGFyYW1zLT5tc2dzaXplLAorICAgICAgICAgICAgICAgcGFyYW1zLT52YXJpYWJsZSA/ICJ0cnVlIiA6ICJmYWxzZSIpOwogICAgIH0KIAotICAgIGZvciAoaSA9IDA7IGkgPCByZXBlYXQ7IGkrKykgewotICAgICAgICBmZCA9IHRpcGNfY29ubmVjdChkZXZfbmFtZSwgZGF0YXNpbmtfbmFtZSk7CisgICAgZm9yIChpID0gMDsgaSA8IHBhcmFtcy0+cmVwZWF0OyBpKyspIHsKKyAgICAgICAgZmQgPSB0aXBjX2Nvbm5lY3QocGFyYW1zLT5kZXZfbmFtZSwgZGF0YXNpbmtfbmFtZSk7CiAgICAgICAgIGlmIChmZCA8IDApIHsKICAgICAgICAgICAgIGZwcmludGYoc3RkZXJyLCAiRmFpbGVkIHRvIGNvbm5lY3QgdG8g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bXNnY250ID0gMDsKLSAgICBjaGFyIHJ4X2J1Zlttc2dzel07CisgICAgY2hhciByeF9idWZbcGFyYW1zLT5tc2dzaXplXTsKICAgICBzdHJ1Y3QgdGltZXZhbCB0djsKIAotICAgIGlmICghb3B0X3NpbGVudCkgeworICAgIGlmICghcGFyYW1zLT5zaWxlbnQpIHsKICAgICAgICAgcHJpbnRmKCJ3YWl0aW5nICglZCkgZm9yIG1zZ1xuIiwgdGltZW91dCk7CiAgICAgfQogCkBAIC00NzksNyArNTE5LDcgQEAKICAgICAgICAgcmMgPSBzZWxlY3QoZmQgKyAxLCAmcmZkcywgTlVMTCwgTlVMTCwgJnR2KTsKIAogICAgICAgICBpZiAocmMgPT0gMCkgewotICAgICAgICAgICAgaWYgKCFvcHRfc2lsZW50KSB7CisgICAgICAgICAgICBpZiAoIXBhcmFtcy0+c2lsZW50KSB7CiAgICAgICAgICAgICAgICAgcHJpbnRmKCJzZWxlY3QgdGltZWRvdXRcbiIpOwogICAgICAgICAgICAgfQogICAgICAgICAgICAgYnJlYWs7CkBAIC01MDEsNDIgKzU0MSw0MCBAQAogICAgICAgICB9CiAgICAgfQogCi0gICAgaWYgKCFvcHRfc2lsZW50KSB7CisgICAgaWYgKCFwYXJhbXMtPnNpbGVudCkgewogICAgICAgICBwcmludGYoImdvdCAldSBtZXNzYWdlc1xuIiwgbXNnY250KTsKICAgICB9CiAKICAgICByZXR1cm4gMDsKIH0KIAotCi1zdGF0aWMgaW50IHNlbGVjdF90ZXN0KHVpbnQgcmVwZWF0LCB1aW50IG1zZ2J1cnN0LCB1aW50IG1zZ3N6KQoteworc3RhdGljIGludCBzZWxlY3RfdGVzdChjb25zdCBzdHJ1Y3QgdGlwY190ZXN0X3BhcmFtcyogcGFyYW1zKSB7CiAgICAgaW50IGZkOwogICAgIHVpbnQgaSwgajsKICAgICBzc2l6ZV90IHJjOwotICAgIGNoYXIgdHhfYnVmW21zZ3N6XTsKKyAgICBjaGFyIHR4X2J1ZltwYXJhbX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eF9idWYsIGkgKyBqLCBtc2dzeik7Ci0gICAgICAgICAgICByYyA9IHdyaXRlKGZkLCB0eF9idWYsIG1zZ3N6KTsKLSAgICAgICAgICAgIGlmICgoc2l6ZV90KXJjICE9IG1zZ3N6KSB7CisgICAgICAgIGZvciAoaiA9IDA7IGogPCBwYXJhbXMtPm1zZ2J1cnN0OyBqKyspIHsKKyAgICAgICAgICAgIG1lbXNldCh0eF9idWYsIGkgKyBqLCBwYXJhbXMtPm1zZ3NpemUpOworICAgICAgICAgICAgcmMgPSB3cml0ZShmZCwgdHhfYnVmLCBwYXJhbXMtPm1zZ3NpemUpOworICAgICAgICAgICAgaWYgKChzaXplX3QpcmMgIT0gcGFyYW1zLT5tc2dzaXplKSB7CiAgICAgICAgICAgICAgICAgcGVycm9yKCJidXJzdF90ZXN0OiB3cml0ZSIpOwogICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgfQpAQCAtNTQ1LDM3ICs1ODMsMzYgQEAKIAogICAgIHRpcGNfY2xvc2UoZmQpOwogCi0gICAgaWYgKCFvcHRfc2lsZW50KSB7CisgICAgaWYgKCFwYXJhbXMtPnNpbGVudCkgewogICAgICAgICBwcmludGYoIiVzOiBkb25lXG4iLCBfX2Z1bmNfXyk7CiAgICAgfQogCiAgICAgcmV0dXJuIDA7CiB9CiAKLXN0YXRpYyBpbnQgYmxvY2tlZF9yZWFkX3Rlc3QodWludCByZXBlYXQpCi17CitzdGF0aWMgaW50IGJsb2NrZWRfcmVhZF90ZXN0KGNvbnN0IHN0cnVjdCB0aXBjX3Rlc3RfcGFyYW1zKiBwYXJhbXMpIHsKICAgICBpbnQgZmQ7CiAgICAgdWludCBpOwogICAgIHNzaXplX3QgcmM7CiAgICAgY2hhciByeF9idWZbNTEyXTsKIAotICAgIGlmICghb3B0X3NpbGVudCkgewotICAgICAgICBwcmludGYoIiVzOiByZXBlYXQgJXVcbiIsIF9fZnVuY19fLCByZXBlYXQpOworICAgIGlmICghcGFyYW1zLT5zaWxlbnQpIHsKKyAgICAgICAgcHJpbnRmKCIlczogcmVwZWF0ICV1XG4iLCBfX2Z1bmNfXywgcGFyYW1zLT5yZXBlYXQpOwogICAgIH0KIAotICAgIGZkID0gdGlwY19jb25uZWN0KGRldl9uYW1lLCBlY2hvX25hbWUpOworICAgIGZkID0gdGlwY19jb25uZWN0KHBhcmFtcy0+ZGV2X25hbWUsIGVjaG9fbmFtZSk7CiAgICAgaWYgKGZkIDwgMCkgewogICAgICAgICBmcHJpbnRmKHN0ZGVyciwgIkZhaWxlZCB0byBjb25uZWN0IHRvICclcycgc2VydmljZVxuIiwgImVjaG8iKTsKICAgICAgICAgcmV0dXJuIGZkOwogICAgIH0KIAotICAgIGZvciAoaSA9IDA7IGkgPCByZXBlYXQ7IGkrKykgeworICAgIGZvciAoaSA9IDA7IGkgPCBwYXJhbXMtPnJlcGVhdDsgaSsrKSB7CiAgICAgICAgIHJjID0gcmVhZChmZCwgcnhfYnVmLCBzaXplb2YocnhfYnVmKSk7CiAgICAgICAgIGlmIChyYyA8IDApIHsKICAgICAgICAgICAgIHBlcnJvcigic2VsZWN0X3Rlc3Q6IHJlYWQiKTsKICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgaWYgKCFvcHRfc2lsZW50KSB7CisgICAgICAgICAgICBpZiAoIXBhcmFtcy0+c2lsZW50KSB7CiAgICAgICAgICAgICAgICAgcHJpbnRmKCJnb3QgJXpkIGJ5dGVzXG4iLCByYyk7CiAgICAgICAgICAgICB9CiAgICAgICAgIH0KQEAgLTU4MywxNSArNjIwLDE0IEBACiAKICAgICB0aXBjX2Nsb3NlKGZkKTsKIAotICAgIGlmICghb3B0X3NpbGVudCkgeworICAgIGlmICghcGFyYW1zLT5zaWxlbnQpIHsKICAgICAgICAgcHJpbnRmKCIlczogZG9uZVxuIiwgX19mdW5jX18pOwogICAgIH0KIAogICAgIHJldHVybiAwOwogfQogCi1zdGF0aWMgaW50IHRhMnRhX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ICBzdGFydCA9IGdldF90aW1lX3VzKCk7CisgICAgICAgIHJjIHw9IHRlc3QocGFyYW1zKTsKKyAgICAgICAgZW5kID0gZ2V0X3RpbWVfdXMoKTsKKyAgICAgICAgaW50NjRfdCB0ID0gZW5kIC0gc3RhcnQ7CisKKyAgICAgICAgaWYgKGkgPT0gMCkgeworICAgICAgICAgICAgY29sZCA9IHQ7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBtaW4gPSAodCA8IG1pbikgPyB0IDogbWluOworICAgICAgICAgICAgbWF4ID0gKHQgPiBtYXgpID8gdCA6IG1heDsKKyAgICAgICAgICAgIGF2ZyArPSB0OworICAgICAgICB9CisgICAgfQorICAgIGF2ZyAvPSBwYXJhbXMtPmJlbmNoOworCisgICAgcHJpbnRmKEJFTkNIX1JFU1VMVF9UUEwsIHBhcmFtcy0+dGVzdF9uYW1lLCBtaW4sIG1heCwgYXZnLCBjb2xkLCBtaW4sIG1heCwgYXZnLCBjb2xkKTsKKyAgICByZXR1cm4gcmM7Cit9CisKIGludCBtYWluKGludCBhcmdjLCBjaGFyICoqYXJndikKIHsKICAgICBpbnQgcmMgPSAwOwpAQCAtOTUwLDUyICsxMDUyLDI1IEBACiAgICAgaWYgKGFyZ2MgPD0gMSkgewogICAgICAgICBwcmludF91c2FnZV9hbmRfZXhpdChhcmd2WzBdLCBFWElUX0ZBSUxVUkUsIGZhbHNlKTsKICAgICB9CisgICAgc3RydWN0IHRpcGNfdGVzdF9wYXJhbXMgcGFyYW1zOworICAgIGluaXRfcGFyYW1zKCZwYXJhbXMpOworICAgIHBhcnNlX29wdGlvbnMoYXJnYywgYXJndiwgJnBhcmFtcyk7CiAKLSAgICBwYXJzZV9vcHRpb25zKGFyZ2MsIGFyZ3YpOwotCi0gICAgaWYgKCFkZXZfbmFtZSkgewotICAgICAgICBkZXZfbmFtZSA9IFRJUENfREVGQVVMVF9ERVZOQU1FOworICAgIGlmICghcGFyYW1zLmRldl9uYW1lKSB7CisgICAgICA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EFMT0dFKCIlczogdnNvY2sgJWxkOiVsZDogRmFpbGVkIHRvIHNldCBjb25uZWN0IHRpbWVvdXQgKGVycj0lZClcbiIsIF9fZnVuY19fLCBjaWQsIHBvcnQsCisgICAgICAgICAgICAgIGVycm5vKTsKKyAgICAgICAgLyogZmFpbGVkIHRvIHNldCBsb25nZXIgdGltZW91dCwgYnV0IHRyeSB0byBjb25uZWN0IGFueXdheSAqLworICAgIH0KKyAgICBzdHJ1Y3Qgc29ja2FkZHJfdm0gc2EgPSB7CisgICAgICAgICAgICAuc3ZtX2ZhbWlseSA9IEFGX1ZTT0NLLAorICAgICAgICAgICAgLnN2bV9wb3J0ID0gcG9ydCwKKyAgICAgICAgICAgIC5zdm1fY2lkID0gY2lkLAorICAgIH07CisgICAgaW50IHJldHJ5ID0gMTA7CisgICAgZG8geworICAgICAgICByZXQgPSBURU1QX0ZBSUxVUkVfUkVUUlkoY29ubmVjdChmZCwgKHN0cnVjdCBzb2NrYWRkciopJnNhLCBzaXplb2Yoc2EpKSk7CisgICAgICAgIGlmIChyZXQgJiYgKGVycm5vID09IEVOT0RFViB8fCBlcnJubyA9PSBFU09DS1ROT1NVUFBPUlQpICYmIC0tcmV0cnkpIHsKKyAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgKiBUaGUga2VybmVsIHJldHVybnMgRVNPQ0tUTk9TVVBQT1JUIGluc3RlYWQgb2YgRU5PREVWIGlmIHRoZSBzb2NrZXQgdHlwZSBpcworICAgICAgICAgICAgICogU09DS19TRVFQQUNLRVQgYW5kIHRoZSBndWVzdCBDSUQgd2UgYXJlIHRyeWluZyB0byBjb25uZWN0IHRvIGlzIG5vdCByZWFkeSB5ZXQuCisgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgIEFMT0dFKCIlczogQ2FuJ3QgY29ubmVjdCB0byB2c29jayAlbGQ6JWxkIGZvciB0aXBjIHNlcnZpY2UgXCIlc1wiIChlcnI9JWQpICVkIHJldHJpZXMgIgorICAgICAgICAgICAgICAgICAgInJlbWFpbmluZ1xuIiwKKyAgICAgICAgICAgICAgICAgIF9fZnVuY19fLCBjaWQsIHBvcnQsIHNydl9uYW1lLCBlcnJubywgcmV0cnkpOworICAgICAgICAgICAgc2xlZXAoMSk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICByZXRyeSA9IDA7CisgICAgICAgIH0KKyAgICB9IHdoaWxlIChyZXRyeSk7CisgICAgaWYgKHJldCkgeworICAgICAgICByZXQgPSAtZXJybm87CisgICAgICAgIEFMT0dFKCIlczogQ2FuJ3QgY29ubmVjdCB0byB2c29jayAlbGQ6JWxkIGZvciB0aXBjIHNlcnZpY2UgXCIlc1wiIChlcnI9JWQpXG4iLCBfX2Z1bmNfXywKKyAgICAgICAgICAgICAgY2lkLCBwb3J0LCBzcnZfbmFtZSwgZXJybm8pOworICAgICAgICBjbG9zZShmZCk7CisgICAgICAgIHJldHVybiByZXQgPCAwID8gcmV0IDogLTE7CisgICAgfQorICAgIC8qCisgICAgICogVE9ETzogQ3VycmVudCB2c29jayB0aXBjIGJyaWRnZSBpbiB0cnVzdHkgZXhwZWN0cyBhIHBvcnQgbmFtZSBpbiB0aGUKKyAgICAgKiBmaXJzdCBwYWNrZXQuIFdlIG5lZWQgdG8gcmVwbGFjZSB0aGlzIHdpdGggYSBwcm90b2NvbCB0aGF0IGFsc28gZG9lcyBESUNFCisgICAgICogYmFzZWQgYXV0aGVudGljYXRpb24uCisgICAgICovCisgICAgcmV0ID0gVEVNUF9GQUlMVVJFX1JFVFJZKHdyaXRlKGZkLCBzcnZfbmFtZSwgc3RybGVuKHNydl9uYW1lKSkpOworICAgIGlmIChyZXQgIT0gc3RybGVuKHNydl9uYW1lKSkgeworICAgICAgICByZXQgPSAtZXJybm87CisgICAgICAgIEFMT0dFKCIlczogdnNvY2sgJWxkOiVsZDogZmFpbGVkIHRvIHNlbmQgdGlwYyBzZXJ2aWNlIG5hbWUgXCIlc1wiIChlcnI9JWQpXG4iLCBfX2Z1bmNfXywKKyAgICAgICAgICAgICAgY2lkLCBwb3J0LCBzcnZfbmFtZSwgZXJybm8pOworICAgICAgICBjbG9zZShmZCk7CisgICAgICAgIHJldHVybiByZXQgPCAwID8gcmV0IDogLTE7CisgICAgfQorICAgIC8qCisgICAgICogV29yayBhcm91bmQgbGFjayBvZiBzZXEgcGFja2V0IHN1cHBvcnQuIFJlYWQgYSBzdGF0dXMgYnl0ZSB0byBwcmV2ZW50CisgICAgICogdGhlIGNhbGxlciBmcm9tIHNlbmRpbmcgbW9yZSBkYXRhIHVudGlsIHNydl9uYW1lIGhhcyBiZWVuIHJlYWQuCisgICAgICovCisgICAgaW50OF90IHN0YXR1czsKKyAgICByZXQgPSBURU1QX0ZBSUxVUkVfUkVUUlkocmVhZChmZCwgJnN0YXR1cywgc2l6ZW9mKHN0YXR1cykpKTsKKyAgICBpZiAocmV0ICE9IHNpemVvZihzdGF0dXMpKSB7CisgICAgICAgIEFMT0dFKCIlczogdnNvY2sgJWxkOiVsZDogZmFpbGVkIHRvIHJlYWQgc3RhdHVzIGJ5dGUgZm9yIGNvbm5lY3QgdG8gdGlwYyBzZXJ2aWNlIG5hbWUgIgorICAgICAgICAgICAgICAiXCIlc1wiIChlcnI9JWQpXG4iLAorICAgICAgICAgICAgICBfX2Z1bmNfXywgY2lkLCBwb3J0LCBzcnZfbmFtZSwgZXJybm8pOworICAgICAgICBjbG9zZShmZCk7CisgICAgICAgIHJldHVybiByZXQgPCAwID8gcmV0IDogLTE7CisgICAgfQorICAgIHVzZV92c29ja19jb25uZWN0aW9uID0gdHJ1ZTsKKyAgICByZXR1cm4gZmQ7Cit9CisKK3N0YXRpYyBzaXplX3QgdGlwY192c29ja19zZW5kKGludCBmZCwgY29uc3Qgc3RydWN0IGlvdmVjKiBpb3YsIGludCBpb3ZjbnQsIHN0cnVjdCB0cnVzdHlfc2htKiBzaG1zLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHNobWNudCkgeworICAgIGludCByZXQ7CisKKyAgICAodm9pZClzaG1zOworICAgIGlmIChzaG1jbnQgIT0gMCkgeworICAgICAgICBBTE9HRSgiJXM6IHZzb2NrIGRvZXMgbm90IHlldCBzdXBwb3J0IHBhc3NpbmcgZmRzXG4iLCBfX2Z1bmNfXyk7CisgICAgICAgIHJldHVybiAtRU5PVFNVUDsKKyAgICB9CisgICAgcmV0ID0gVEVNUF9GQUlMVVJFX1JFVFJZKHdyaXRldihmZCwgaW92LCBpb3ZjbnQpKTsKKyAgICBpZiAocmV0IDwgMCkgeworICAgICAgICByZXQgPSAtZXJybm87CisgICAgICAgIEFMT0dFKCIlczogZmFpbGVkIHRvIHNlbmQgbWVzc2FnZSAoZXJyPSVkKVxuIiwgX19mdW5jX18sIGVycm5vKTsKKyAgICAgICAgcmV0dXJuIHJldCA8IDAgPyByZXQgOiAtMTsKKyAgICB9CisKKyAgICByZXR1cm4gcmV0OworfQorCiBpbnQgdGlwY19jb25uZWN0KGNvbnN0IGNoYXIqIGRldl9uYW1lLCBjb25zdCBjaGFyKiBzcnZfbmFtZSkgewogICAgIGludCBmZDsKICAgICBpbnQgcmM7CiAKKyAgICBjb25zdCBjaGFyKiB0eXBlX2NpZF9wb3J0X3N0ciA9IHN0cmlwX3ByZWZpeChkZXZfbmFtZSwgIlZTT0NLOiIpOworICAgIGlmICh0eXBlX2NpZF9wb3J0X3N0cikgeworICAgICAgICByZXR1cm4gdGlwY192c29ja19jb25uZWN0KHR5cGVfY2lkX3BvcnRfc3RyLCBzcnZfbmFtZSk7CisgICAgfQorCiAgICAgZmQgPSBURU1QX0ZBSUxVUkVfUkVUUlkob3BlbihkZXZfbmFtZSwgT19SRFdSKSk7CiAgICAgaWYgKGZkIDwgMCkgewogICAgICAgICByYyA9IC1lcnJubzsKQEAgLTU0LDYgKzE5OSw5IEBACiAKIHNzaXplX3QgdGlwY19zZW5kKGludCBmZCwgY29uc3Qgc3RydWN0IGlvdmVjKiBpb3YsIGludCBpb3ZjbnQsIHN0cnVjdCB0cnVzdHl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3JjczogWworICAgICAgICAic3JjL2hhbF9tYWluLnJzIiwKKyAgICBdLAorICAgIHJ1c3RsaWJzOiBbCisgICAgICAgICJsaWJhbmRyb2lkX2xvZ2dlciIsCisgICAgICAgICJsaWJhdXRoZ3JhcGhfaGFsIiwKKyAgICAgICAgImxpYmF1dGhncmFwaF93aXJlIiwKKyAgICAgICAgImxpYmJpbmRlcl9ycyIsCisgICAgICAgICJsaWJsaWJjIiwKKyAgICAgICAgImxpYmxvZ19ydXN0IiwKKyAgICAgICAgImxpYnNlY3JldGtlZXBlcl9oYWwiLAorICAgICAgICAibGlidHJ1c3R5LXJzIiwKKyAgICBdLAorICAgIGRlZmF1bHRzOiBbCisgICAgICAgICJzZWNyZXRrZWVwZXJfdXNlX2xhdGVzdF9oYWxfYWlkbF9ydXN0IiwKKyAgICBdLAorICAgIHByZWZlcl9ybGliOiB0cnVlLAorfQorCitjY19kZWZhdWx0cyB7CisgICAgbmFtZTogInRydXN0eV9zZWNyZXRrZWVwZXJfZnV6el9kZWZhdWx0cyIsCisgICAgc3JjczogWyI6dHJ1c3R5X3RpcGNfZnV6emVyIl0sCisgICAgZnV6el9jb25maWc6IHsKKyAgICAgICAgY2M6IFsKKyAgICAgICAgICAgICJhbGFuc3Rva2VzQGdvb2dsZS5jb20iLAorICAgICAgICAgICAgImRyeXNkYWxlQGdvb2dsZS5jb20iLAorICAgICAgICAgICAgInNoaWtoYXBhbndhckBnb29nbGUuY29tIiwKKyAgICAgICAgXSwKKyAgICAgICAgY29tcG9uZW50aWQ6IDg2NzEyNSwKKyAgICAgICAgLy8gVE9ETzogYWRkIFNlY3JldGtlZXBlciBob3RsaXN0CisgICAgICAgIC8vIGhvdGxpc3RzOiBbIiJdLAorICAgIH0sCit9CisKK2NjX2Z1enogeworICAgIG5hbWU6ICJ0cnVzdHlfc2VjcmV0a2VlcGVyX3NrX2Z1enplciIsCisgICAgZGVmYXVsdHM6IFsKKyAgICAgICAgInRydXN0eV9mdXp6ZXJfZGVmYX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19NQVhfU0laRSkgeworICAgICAgICAgICAgY2hhbm5lbC5zZW5kKCZyZXFfZnJhZykubWFwX2Vycih8ZXwgYmluZGVycigic2VuZCByZXF1ZXN0IiwgZSkpPzsKKworICAgICAgICAgICAgLy8gRXZlcnkgcmVxdWVzdCBnZXRzIGEgcmVzcG9uc2UuCisgICAgICAgICAgICBsZXQgbXV0IHJzcF9mcmFnID0gVmVjOjpuZXcoKTsKKyAgICAgICAgICAgIGNoYW5uZWwucmVjdigmbXV0IHJzcF9mcmFnKS5tYXBfZXJyKHxlfCBiaW5kZXJyKCJyZWNlaXZlIHJlc3BvbnNlIiwgZSkpPzsKKworICAgICAgICAgICAgaWYgbGV0IFNvbWUoZnVsbF9yc3ApID0gcGVuZGluZ19yc3AuYWNjdW11bGF0ZSgmcnNwX2ZyYWcpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gT2soZnVsbF9yc3AudG9fdmVjKCkpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIC8vIFRoZXJlIG1heSBiZSBhZGRpdGlvbmFsIHJlc3BvbnNlIGZyYWdtZW50cyB0byByZWNlaXZlLgorICAgICAgICBsb29wIHsKKyAgICAgICAgICAgIGxldCBtdXQgcnNwX2ZyYWcgPSBWZWM6Om5ldygpOworICAgICAgICAgICAgY2hhbm5lbC5yZWN2KCZtdXQgcnNwX2ZyYWcpLm1hcF9lcnIofGV8IGJpbmRlcnIoInJlY2VpdmUgcmVzcG9uc2UiLCBlKSk/OworICAgICAgICAgICAgaWYgbGV0IFNvbWUoZnVsbF9yc3ApID0gcGVuZGluZ19yc3AuYWNjdW11bGF0ZSgmcnNwX2ZyYWcpIHsKKyAgICAgICAgICAgICAgICByZXR1cm4gT2soZnVsbF9yc3AudG9fdmVjKCkpOworICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgfQorfQorCitmbiBtYWluKCkgeworICAgIGlmIGxldCBFcnIoSGFsU2VydmljZUVycm9yKGUpKSA9IGlubmVyX21haW4oKSB7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vckF0b21WYWx1ZTo6c3RyaW5nVmFsdWU+KCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiNTI0N2QxOWItY2YwOS00MjcyLWE0NTAtM2VmMjBkYmVmYzE0Iik7CisgICAgICAgICAgICAgICAgQVNTRVJUX0VRKFN0cmluZzgodmVuZG9yQXRvbS52YWx1ZXNbMF0uZ2V0PFZlbmRvckF0b21WYWx1ZTo6c3RyaW5nVmFsdWU+KCkpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAiNTI0N2QxOWItY2YwOS00MjcyLWE0NTAtM2VmMjBkYmVmYzE0Iik7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICBjYXNlIFRydXN0eUF0b21zOjpUcnVzdHlTdG9yYWdlRXJyb3I6CiAgICAgICAgICAgICAgICAgKythdG9tU3RvcmFnZUVycm9yQ250OwogICAgICAgICAgICAgICAgIEFTU0VSVF9FUSh2ZW5kb3JBdG9tLnZhbHVlc1swXS5nZXQ8VmVuZG9yQXRvbVZhbHVlOjppbnRWYWx1ZT4oKSwgNSk7Ci0gICAgICAgICAgICAgICAgQVNTRVJUX1NUUkVRKFN0cmluZzgodmVuZG9yQXRvbS52YWx1ZXNbMV0uZ2V0PFZlbmRvckF0b21WYWx1ZTo6c3RyaW5nVmFsdWU+KCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiNTI0N2QxOWItY2YwOS00MjcyLWE0NTAtM2VmMjBkYmVmYzE0Iik7Ci0gICAgICAgICAgICAgICAgQVNTRVJUX1NUUkVRKFN0cmluZzgodmVuZG9yQXRvbS52YWx1ZXNbMl0uZ2V0PFZlbmRvckF0b21WYWx1ZTo6c3RyaW5nVmFsdWU+KCkpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiNTI0N2QxOWItY2YwOS00MjcyLWE0NTAtM2VmMjBkYmVmYzE0Iik7CisgICAgICAgICAgICAgICAgQVNTRVJUX0VRKFN0cmluZzgodmVuZG9yQXRvbS52Y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yAgICAgICAgcmV0dXJuIC0xOworICAgIH0KKyAgICAqbmV3X25vZGUgPSAoc3RydWN0IHN0b3JhZ2VfbWFwcGluZ19ub2RlKXsuZmlsZV9uYW1lID0gZmlsZV9uYW1lLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5iYWNraW5nX3N0b3JhZ2UgPSBiYWNraW5nX3N0b3JhZ2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLm5leHQgPSBzdG9yYWdlX21hcHBpbmdfaGVhZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAuZmQgPSAtMX07CisgICAgc3RvcmFnZV9tYXBwaW5nX2hlYWQgPSBuZXdfbm9kZTsKKyAgICByZXR1cm4gMDsKK30KKworc3RhdGljIGNvbnN0IGNoYXIqIF9zb3B0cyA9ICJocDpkOnI6dDptOmY6IjsKIHN0YXRpYyBjb25zdCBzdHJ1Y3Qgb3B0aW9uIF9sb3B0c1tdID0ge3siaGVscCIsIG5vX2FyZ3VtZW50LCBOVUxMLCAnaCd9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyJ0cnVzdHlfZGV2IiwgcmVxdWlyZWRfYXJndW1lbnQsIE5VTEwsICdkJ30sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7ImRhdGFfcGF0aCIsIHJlcXVpcmVkX2FyZ3VtZW50LCBOVUxMLCAncCd9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyJycG1iX2RldiIsIHJlcXVpcmVkX2FyZ3VtZW50LCBOVUxMLCAncid9LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyJkZXZfdHlwZSIsIHJlcXVpcmVkX2FyZ3VtZW50LCBOVUxMLCAndCd9LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeyJtYXh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orICAgICAgICAgICJUaGUgY29uc3RyYWludCBpcyBjaG9zZW4gYnkgZ2l2aW5nIGEgZmlsZSwgdGhpcyBhbGxvd3MgZm9yIHBhc3NpbmcgYVxuIgorICAgICAgICAgICJibG9jayBkZXZpY2UgZm9yIHdoaWNoIGEgbWF4IGZpbGUgc2l6ZSBjYW4gYmUgcXVlcmllZC4gIEZpbGUgYmFzZWRcbiIKKyAgICAgICAgICAic3RvcmFnZXMgd2lsbCBiZSBjb25zdHJhaW5lZCB0byB0aGF0IHNpemUgYXMgd2VsbC5cbiIpOwogICAgIGV4aXQoY29kZSk7CiB9CiAKQEAgLTE4Nyw2ICsyMzUsNyBAQAogc3RhdGljIHZvaWQgcGFyc2VfYXJncyhpbnQgYXJnYywgY2hhciogYXJndltdKSB7CiAgICAgaW50IG9wdDsKICAgICBpbnQgb2lkeCA9IDA7CisgICAgaW50IHJjID0gMDsKIAogICAgIHdoaWxlICgob3B0ID0gZ2V0b3B0X2xvbmcoYXJnYywgYXJndiwgX3NvcHRzLCBfbG9wdHMsICZvaWR4KSkgIT0gLTEpIHsKICAgICAgICAgc3dpdGNoIChvcHQpIHsKQEAgLTIxMCw2ICsyNTksMTggQEAKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAKKyAgICAgICAgICAgIGNhc2UgJ2YnOgorICAgICAgICAgICAgICAgIHJjID0gcGFyc2VfYW5kX2FwcGVuZF9maWxlX21hcHBpbmcob3B0YXJnKTsKKyAgICAgICAgICAgICAgICBpZiAocmMgPCAwKSB7CisgICAgICAgICAgICAgICAgICAgIEFMT0dFKCJGYWlsZWQgdG8gcGFyc2UgZmlsZSBtYXBwaW5nOiAlc1xuIiwgb3B0YXJnKTsKKyAgICAgICAgICAgICAgICAgICAgc2hvd191c2FnZV9hbmRfZXhpdChFWElUX0ZBSUxVUkUpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBicmVhazsKKworICAgICAgICAgICAgY2FzZSAnbS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SBTU19ESVJUWTsgIC8qIHNldCBmZCBkaXJ0eSAqLwotICAgICAgICAgICAgfQorICAgICAgICBmZF9zdGF0ZVtmZF0gPSBTU19DTEVBTjsgLyogZmQgY2xlYW4gKi8KKyAgICAgICAgaWYgKG9wZW5fZmxhZ3MgJiBPX1RSVU5DKSB7CisgICAgICAgICAgICBhc3NlcnQobm9kZSA9PSBOVUxMKTsKKyAgICAgICAgICAgIGZkX3N0YXRlW2ZkXSA9IFNTX0RJUlRZOyAvKiBzZXQgZmQgZGlydHkgKi8KKyAgICAgICAgfQorCisgICAgICAgIGlmIChub2RlICE9IE5VTEwpIHsKKyAgICAgICAgICAgIGZkX3N0YXRlW2ZkXSA9IFNTX0NMRUFOX05FRURfU1lNTElOSzsKKyAgICAgICAgfQogICAgIH0gZWxzZSB7CiAgICAgICAgICAgICBBTE9HVygiJXM6IHVudHJhY2tlZCBmZCAldVxuIiwgX19mdW5jX18sIGZkKTsKICAgICAgICAgICAgIGlmIChvcGVuX2ZsYWdzICYgKE9fVFJVTkMgfCBPX0NSRUFUKSkgewogICAgICAgICAgICAgICAgIGZzX3N0YXRlID0gU1NfRElSVFk7CiAgICAgICAgICAgICB9CiAgICAgfQorCisgICAgaWYgKG5vZGUgIT0gTlVMTCkgeworICAgICAgICBub2RlLT5mZCA9IGZkOworICAgIH0KKwogICAgIHJldHVybiBoYW5kbGU7CiB9CiAKK3N0YXRpYyB2b2lkIGNsZWFyX2ZkX3N5bWxpbmtfc3RhdHVzKHVpbnQzMl90IGhhbmRsZSwgc3RydWN0IHN0b3JhZ2VfbWFwcGluZ19ub2RlKiBlbnRyeSkgeworICAgIC8qIEFsd2F5cyBjbGVhciBGRCwgaW4gY2FzZSBmZCBpcyBub3QgaW4gRkRfVEJMICovCisgICAgZW50cnktPmZkID0gLTE7CisKKyAgICBpZiAoaGFuZGxlID49IEZEX1RCTF9TSVpFKSB7CisgICAgICAgIEFMT0dFKCIlczogdW50cmFja2VkIGZkPSV1XG4iLCBfX2Z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JhZ2VfbWFwcGluZ19ub2RlKiBlbnRyeSA9IGdldF9wZW5kaW5nX3N5bWxpbmtfbWFwcGluZyhoYW5kbGUpOworICAgIGlmIChlbnRyeSA9PSBOVUxMKSB7CisgICAgICAgIC8qIE5vIG1hcHBpbmdzIHBlbmRpbmcgKi8KKyAgICAgICAgcmV0dXJuIDA7CisgICAgfQorCisgICAgLyogQ3JlYXRlIGZ1bGwgcGF0aCAqLworICAgIGNoYXIqIHBhdGggPSBOVUxMOworICAgIGludCByYyA9IGFzcHJpbnRmKCZwYXRoLCAiJXMvJXMiLCBzc2Rpcl9uYW1lLCBlbnRyeS0+ZmlsZV9uYW1lKTsKKyAgICBpZiAocmMgPCAwKSB7CisgICAgICAgIEFMT0dFKCIlczogYXNwcmludGYgZmFpbGVkXG4iLCBfX2Z1bmNfXyk7CisgICAgICAgIHJldHVybiAtMTsKKyAgICB9CisKKyAgICAvKiBUcnkgYW5kIHNldHVwIHRoZSBzeW1saW5raW5nICovCisgICAgQUxPR0koIkNyZWF0aW5nIHN5bWxpbmsgJXMtPiVzXG4iLCBwYXRoLCBlbnRyeS0+YmFja2luZ19zdG9yYWdlKTsKKyAgICByYyA9IHN5bWxpbmsoZW50cnktPmJhY2tpbmdfc3RvcmFnZSwgcGF0aCk7CisgICAgaWYgKHJjIDwgMCkgeworICAgICAgICBBTE9HRSgiJXM6IGVycm9yIHN5bWxpbmtpbmcgJXMtPiVzICglcylcbiIsIF9fZnVuY19fLCBwYXRoLCBlbnRyeS0+YmFja2luZ19zdG9yYWdlLAorICAgICAgICAgICAgICBzdHJlcnJvcihlcnJubykpOworICAgICAgICBmcmVlKHBhdGgpOworICAgICAgICByZXR1cm4gcmM7CisgICAgfQorICAgIGZyZWUocGF0aCk7CisKKyAgICBjbGVhcl9mZF9zeW1saW5rX3N0YXR1cyhoYW5kbGUsIGVudHJ5KTsKKworICAgIHJldHVybiByYzsKK30KKworc3RhdGljIGJvb2wgaXNfcGVuZGluZ19zeW1saW5rKHVpb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gZmQgdGFibGUgYW5kIHJlc2V0IGl0IHRvIGNsZWFuIHN0YXRlIGZpcnN0ICovCiAgICAgZm9yICh1aW50IGZkID0gMDsgZmQgPCBGRF9UQkxfU0laRTsgZmQrKykgewotICAgICAgICAgaWYgKGZkX3N0YXRlW2ZkXSA9PSBTU19ESVJUWSkgewotICAgICAgICAgICAgIGlmIChmc19zdGF0ZSA9PSBTU19DTEVBTikgewotICAgICAgICAgICAgICAgICAvKiBuZWVkIHRvIHN5bmMgaW5kaXZpZHVhbCBmZCAqLwotICAgICAgICAgICAgICAgICByYyA9IGZzeW5jKGZkKTsKLSAgICAgICAgICAgICAgICAgaWYgKHJjIDwgMCkgewotICAgICAgICAgICAgICAgICAgICAgQUxPR0UoImZzeW5jIGZvciBmZD0lZCBmYWlsZWQ6ICVzXG4iLCBmZCwgc3RyZXJyb3IoZXJybm8pKTsKLSAgICAgICAgICAgICAgICAgICAgIHJldHVybiByYzsKLSAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICBmZF9zdGF0ZVtmZF0gPSBTU19DTEVBTjsgLyogc2V0IHRvIGNsZWFuICovCi0gICAgICAgICB9CisgICAgICAgIGlmIChmZF9zdGF0ZVtmZF0gPT0gU1NfRElSVFkpIHsKKyAgICAgICAgICAgIGlmIChmc19zdGF0ZSA9PSBTU19DTEVBTikgeworICAgICAgICAgICAgICAgIC8qIG5lZWQgdG8gc3luYyBpbmRpdmlkdWFsIGZkICovCisgICAgICAgICAgICAgICAgcmMgPSBmc3luYyhmZCk7CisgICAgICAgICAgICAgICAgaWYgKHJjIDwgMCkgeworICAgICAgICAgICAgICAgICAgICBBTE9HRSgiZnN5bmMgZm9yIGZkPSVkIGZhaWxlZDogJXNcbiIsIGZkLCBzdHJlcnJvcihlcnJubykpOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmM7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgZmRfc3RhdGVbZm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J1ZmZlcihTVERPVVRfRklMRU5PKSkgeworICAgICAgICAgICAgICAgIEFMT0dFKCJDb3VsZCBub3QgZmx1c2ggdGhlIGJ1ZmZlciB0byBzdGRvdXRcbiIpOworICAgICAgICAgICAgICAgIHJldHVybiBFWElUX0ZBSUxVUkU7CisgICAgICAgICAgICB9CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICBNb2R1bGVXcmFwcGVyIHdyYXBwZXI7CisgICAgICAgICAgICBhdXRvIHJlcyA9IHdyYXBwZXIuU2VuZE1lc3NhZ2UoYXJncyk7CisgICAgICAgICAgICBpZiAoIXJlcy5vaygpKSB7CisgICAgICAgICAgICAgICAgc3RkOjpjZXJyIDw8IHJlcy5lcnJvcigpIDw8IHN0ZDo6ZW5kbDsKKyAgICAgICAgICAgICAgICByZXR1cm4gRVhJVF9GQUlMVVJFOworICAgICAgICAgICAgfQogCi0gICAgICAgIHJlcyA9IHdyYXBwZXIuRm9yd2FyZFJlc3BvbnNlKCk7Ci0gICAgICAgIGlmICghcmVzLm9rKCkpIHsKLSAgICAgICAgICAgIHN0ZDo6Y2VyciA8PCByZXMuZXJyb3IoKSA8PCBzdGQ6OmVuZGw7Ci0gICAgICAgICAgICByZXR1cm4gRVhJVF9GQUlMVVJFOworICAgICAgICAgICAgcmVzID0gd3JhcHBlci5Gb3J3YXJkUmVzcG9uc2UoKTsKKyAgICAgICAgICAgIGlmICghcmVzLm9rKCkpIHsKKyAgICAgICAgICAgICAgICBzdGQ6OmNlcnIgPDwgcmVzLmVycm9yKCkgPDwgc3RkOjplbmRsOworICAgICAgICAgICAgICAgIHJldHVybiBFWElUX0ZBSUxVUkU7CisgICAgICAgICAgICB9CiAgICAgICAgIH0KICAgICB9CiAKZGlmZiAtLWdpdCBhL2xpYnByb2Nlc3Nncm91cC9jZ3JvdXByY19mb3JtYXQvQW5kcm9pZC5icCBiL3RydXN0eS91dGlscy9jb3ZlcmFnZS1jb250cm9sbGVyL0FuZHJvaWQuYnAKc2lt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ZWQ6IHRydWUsCi0gICAgc3JjczogWwotICAgICAgICAiY2dyb3VwX2NvbnRyb2xsZXIuY3BwIiwKLSAgICBdLAotICAgIGNmbGFnczogWwotICAgICAgICAiLVdhbGwiLAotICAgICAgICAiLVdlcnJvciIsCi0gICAgXSwKLSAgICBleHBvcnRfaW5jbHVkZV9kaXJzOiBbCi0gICAgICAgICJpbmNsdWRlIiwKLSAgICBdLAorY2NfYmluYXJ5IHsKKyAgICBuYW1lOiAidHJ1c3R5LWNvdmVyYWdlLWNvbnRyb2xsZXIiLAorICAgIHZlbmRvcjogdHJ1ZSwKKworICAgIHNyY3M6IFsiY29udHJvbGxlci5jcHAiXSwKICAgICBzaGFyZWRfbGliczogWworICAgICAgICAibGliYyIsCisgICAgICAgICJsaWJsb2ciLAogICAgICAgICAibGliYmFzZSIsCisgICAgICAgICJsaWJkbWFidWZoZWFwIiwKKyAgICBdLAorICAgIHN0YXRpY19saWJzOiBbCisgICAgICAgICJsaWJ0cnVzdHkiLAorICAgICAgICAibGlidHJ1c3R5X2xpbmVfY292ZXJhZ2UiLAogICAgIF0sCiB9CmRpZmYgLS1naXQgYS90cnVzdHkvdXRpbHMvY292ZXJhZ2UtY29udHJvbGxlci9jb250cm9sbGVyLmNwcCBiL3RydXN0eS91dGlscy9jb3ZlcmFnZS1jb250cm9sbGVyL2NvbnRyb2xsZXIuY3BwCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmY1ZDcwYjEKLS0tIC9kZXYvbnVsbAorKysgYi90cnVzdHkvdXRpbHMvY292ZXJhZ2UtY29udHJvbGxlci9jb250cm9sbGVyLmNwcApAQCAtMCwwICsxLDE4NiBAQAorLyoKKyAqIENvcHlyaWdodCAoQykgMjAyMyBUaGUgQW5kcm9pZCBPcGVuIFNvdXJjZSBQcm9qZWN0CisgKgorICogTGljZW5zZWQgdW5kZXIgdGhlIEFwYWNoZSBMaWNlbnNlLCBWZXJzaW9uIDIuMCAodGhlICJMa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gICAgICBpZiAoY29tcGxldGVfY250ICE9IGNvdW50ZXJzW2luZGV4XSAmJiBzdGFydF9jbnQgPT0gY29tcGxldGVfY250KSB7CisgICAgICAgICAgICAgICAgV1JJVEVfT05DRShjb250cm9sLT5jbnRybF9mbGFncywgRkxBR19OT05FKTsKKyAgICAgICAgICAgICAgICBzdGQ6OnN0cmluZyBmaWxlbmFtZTsKKyAgICAgICAgICAgICAgICBmaWxlbmFtZSA9IGFuZHJvaWQ6OmJhc2U6OlN0cmluZ1ByaW50ZigiLyVzLiUiIFBSSXU2NCAiLnByb2ZyYXciLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHV1aWRfbGlzdF9baW5kZXhdLmNfc3RyKCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY291bnRlcnNbaW5kZXhdKTsKKyAgICAgICAgICAgICAgICBmaWxlbmFtZS5pbnNlcnQoMCwgb3V0cHV0X2Rpcik7CisgICAgICAgICAgICAgICAgYW5kcm9pZDo6YmFzZTo6UmVzdWx0PHZvaWQ+IHJlcyA9IHJlY29yZF9saXN0X1tpbmRleF0tPlNhdmVGaWxlKGZpbGVuYW1lKTsKKyAgICAgICAgICAgICAgICBjb3VudGVyc1tpbmRleF0rKzsKKyAgICAgICAgICAgICAgICBXUklURV9PTkNFKGNvbnRyb2wtPnJlYWRfYnVmZmVyX2NudCwgY291bnRlcnNbaW5kZXhdKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmKGNvbXBsZXRlX2NudCA9PSBjb3VudGVyc1tpbmRleF0gJiYKKyAgICAgICAgICAgICAgICAhKGZsYWdzICYgRkxBR19SVU4pKSB7CisgICAgICAgICAgICAgICAgZmxhZ3MgfD0gRkxBR19SVU47CisgICAgICAgICAgICAgICAgV1JJVEVfT05DRShjb250cm9sLT5jbnRybF9mbGFncywgZmxhZ3MpOworICAgICAgICAgICAgfQorICAgICAgICB9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ICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQudGltZV9taWQsCisgICAgICAgICAgICAgICAgICAgIHJlc3Auc2VuZF9saXN0X2FyZ3MudXVpZC50aW1lX2hpX2FuZF92ZXJzaW9uLAorICAgICAgICAgICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQuY2xvY2tfc2VxX2FuZF9ub2RlWzBdLAorICAgICAgICAgICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQuY2xvY2tfc2VxX2FuZF9ub2RlWzFdLAorICAgICAgICAgICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQuY2xvY2tfc2VxX2FuZF9ub2RlWzJdLAorICAgICAgICAgICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQuY2xvY2tfc2VxX2FuZF9ub2RlWzNdLAorICAgICAgICAgICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQuY2xvY2tfc2VxX2FuZF9ub2RlWzRdLAorICAgICAgICAgICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQuY2xvY2tfc2VxX2FuZF9ub2RlWzVdLAorICAgICAgICAgICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQuY2xvY2tfc2VxX2FuZF9ub2RlWzZdLAorICAgICAgICAgICAgICAgICAgICByZXNwLnNlbmRfbGlzdF9hcmdzLnV1aWQuY2xvY2tfc2VxX2FuZF9ub2RlWzddKTsKKyAgICAgICAgICAgICAgICB1dWlkX2xpc3RfLnB1c2hfYmFjayh1dWlkX3N0cik7CisgICAgICAgICAgICAgICAgcmVjb3JkX2xpc3RfLnB1c2hfYmFjayhzdGQ6Om1ha2VfdW5pcXVlPENvdmVyYWdlUmVjb3JkPihUSVBDX0RFViwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnJlc3Auc2VuZF9saXN0X2FyZ3MudXVpZCkpOworICAgICAgICAgICAgICAgIGNvdW50ZXJzLnB1c2hfYmFjaygwKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIHsKKyAgICAgICAgICAgIGZwcmludGYoc3RkZXJyLCAiVW5rbm93biByZXNwb25zZSBoZWFkZXJcbiIpOworICAgICAgICB9CisgICAgICAgIGN1cl9pbmRleCsrOworICAgICAgICByZXEuaGRyLmNtZCA9IExJTkVfQ09WRVJBR0VfQ0xJRU5UX0NNRF9TRU5EX0xJU1Q7CisgICAgICAgIHJlcS5zZW5kX2xpc3RfYXJncy5pbmRleCA9IGN1cl9pbmRleDsKKyAgICAgICAgaW50IHJjID0gd3JpdGUoY292ZXJhZ2Vfc3J2X2ZkLCAmcmVxLCBzaXplb2YocmVxKSk7CisgICAgICAgIGlmIChyYyAhPSAoaW50KXNpemVvZihyZXEpKSB7CisgICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgImZhaWxlZCB0byBzZW5kIHJlcXVlc3QgdG8gY292ZXJhZ2Ugc2VydmVyOiAlZFxuIiwgcmMpOworICAgICAgICB9CisgICAgfQorCisgICAgZm9yKGludCBpbmQgPSAwIDsgaW5kIDwgcmVjb3JkX2xpc3RfLnNpemUoKSA7IGluZCsrKSB7CisgICAgICAgIHJlY29yZF9saXN0X1tpbmRdLT5PcGVuKGNvdmVyYWdlX3Nydl9mZCk7CisgICAgfQorfQorCisKK30gIC8vIG5hbWVzcGFjZSBjb250cm9sbGVyCit9ICAvLyBuYW1lc3BhY2UgdHJ1c3R5Cit9ICAvLyBuYW1lc3BhY2UgYW5kcm9pZAorCitpbnQgbWFpbihpbnQgYXJnYywgY2hhciogYXJndltdKSB7CisKKyAgICBzdGQ6OnN0cmluZyBvcHRhcmcgPSAiIjsKKyAgICBkbyB7CisgICAgICAgIGludCBjOworICAgICAgICBjID0gZ2V0b3B0KGFyZ2MsIGFyZ3YsICJvIik7C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vcnk+CisjaW5jbHVkZSA8dmVjdG9yPgorI2luY2x1ZGUgPHNldD4KKworI2RlZmluZSBUSVBDX0RFViAiL2Rldi90cnVzdHktaXBjLWRldjAiCisjZGVmaW5lIFRFU1RfU1JWX1BPUlQgImNvbS5hbmRyb2lkLnRydXN0eS5zYW5jb3YudGVzdC5zcnYiCisjZGVmaW5lIFRFU1RfU1JWX01PRFVMRSAic3J2LnN5bXMuZWxmIgorCisjZGVmaW5lIFVVSURfU1RSX1NJWkUgKDM3KQorCisjZGVmaW5lIEZMQUdfTk9ORSAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBGTEFHX1JVTiAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgRkxBR19UT0dHTEVfQ0xFQVIgICAgICAgMHgyCisKK3N0cnVjdCBjb250cm9sIHsKKyAgICAvKiBXcml0dGVuIGJ5IGNvbnRyb2xsZXIsIHJlYWQgYnkgaW5zdHJ1bWVudGVkIFRBICovCisgICAgdWludDY0X3QgICAgICAgIGNudHJsX2ZsYWdzOworICAgIHVpbnQ2NF90ICAgICAgICByZWFkX2J1ZmZlcl9jbnQ7CisKKyAgICAvKiBXcml0dGVuIGJ5IGluc3RydW1lbnRlZCBUQSwgcmVhZCBieSBjb250cm9sbGVyICovCisgICAgdWludDY0X3QgICAgICAgIHdyaXRlX2J1ZmZlcl9zdGFydF9jb3VudDsKKyAgICB1aW50NjRfdCAgICAgICAgd3JpdGVfYnVmZmVyX2NvbXBsZXRlX2NvdW50OworfTsKKworbmFtZXNwYWNlIGFuZHJvaWQgeworbmFtZXNwYWNlIHRydXN0eSB7CituYW1lc3BhY2UgY29udHJvbGxlciB7CisKK2NsYXNzIENvbnRyb2xsZXIgeworICBwdWJsaWM6CisgICAgcHVibGljOgorICAgICAgICB2b2lkIHJ1bihzdGQ6OnN0cmluZyBvdXRwdXRfZGlyKTsKKworICAgIHByaXZhdGU6CisgICAgICAgIHN0ZDo6dmVjdG9yPHN0ZDo6dW5pcXVlX3B0cj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nVmX2xlbjsKK30KKwogc3RhdGljIGludCBydW5fdHJ1c3R5X3VuaXRlc3QoY29uc3QgY2hhciogdXRhcHApIHsKICAgICBpbnQgZmQ7Ci0gICAgaW50IHJjOwotICAgIGNoYXIgcnhfYnVmWzEwMjRdOworICAgIGNoYXIgcmVhZF9idWZbMTAyNF07CisgICAgaW50IHJlYWRfbGVuOworICAgIGNoYXIqIHJ4X2J1ZjsKKyAgICBpbnQgcnhfYnVmX2xlbjsKKyAgICBpbnQgY21kID0gLTE7CiAKICAgICAvKiBjb25uZWN0IHRvIHVuaXRlc3QgYXBwICovCiAgICAgZmQgPSB0aXBjX2Nvbm5lY3QoZGV2X25hbWUsIHV0YXBwKTsKQEAgLTExMCwyMiArMTI0LDM5IEBACiAgICAgfQogCiAgICAgLyogd2FpdCBmb3IgdGVzdCB0byBjb21wbGV0ZSAqLworICAgIHJ4X2J1Zl9sZW4gPSAwOwogICAgIGZvciAoOzspIHsKLSAgICAgICAgcmMgPSByZWFkKGZkLCByeF9idWYsIHNpemVvZihyeF9idWYpKTsKLSAgICAgICAgaWYgKHJjIDw9IDAgfHwgcmMgPj0gKGludClzaXplb2YocnhfYnVmKSkgewotICAgICAgICAgICAgZnByaW50ZihzdGRlcnIsICIlczogUmVhZCBmYWlsZWQ6ICVkXG4iLCBfX2Z1bmNfXywgcmMpOwotICAgICAgICAgICAgdGlwY19jbG9zZShmZCk7Ci0gICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIGlmIChyeF9idWZfbGVuID09IDApIHsKKyAgICAgICAgICAgIHJlYWRfbGVuID0gcmVhZChmZCwgcmVhZF9idWYsIHNpemVvZihyZWFkX2J1ZikpOworICAgICAgICAgICAgaWYgKHJlYWRfbGVuIDw9IDAgfHwgcmVhZF9sZW4gPiAoaW50KXNpemVvZihyZWFkX2J1ZikpIHsKKyAgICAgICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgIiVzOiBSZWFkIGZhaWxlZDogJWQsICVzXG4iLCBfX2Z1bmNfXywgcmVhZF9sZW4sCisgICAgICAgICAgICAgICAgICAgICAgICByZWFkX2xlbiA8IDAgPyBzdHJlcnJvcihlcnJubykgOiAiIik7CisgICAgICAgICAgICAgICAgdGlwY19jbG9zZShmZCk7CisgICAgICAgICAgICAgICAgcmV0dXJuIC0xOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcnhfYnVmID0gcmVhZF9idWY7CisgICAgICAgICAgICByeF9idWZfbGVuID0gcmVhZF9sZW47CiAgICAgICAgIH0KIAotICAgICAgICBpZiAocnhfYnVmWzBdID09IFRFU1RfUEFTU0VEKSB7CisgICAgICAgIGludCBtc2dfbGVuID0gZ2V0X21zZ19sZW4ocnhfYnVmLCByeF9idWZfbGVuKTsKKyAgICAgICAgaWYgKG1zZ19sZW4gPT0gMCkgeworICAgICAgICAgICAgY21kID0gcnhfYnVmWzBdOworICAgICAgICAgICAgcnhfYnVmKys7CisgICAgICAgICAgICByeF9idWZfbGVuLS07CisgICAgICAgIH0KKworICAgICAgICBpZiAoY21kID09IFRFU1RfUEFTU0VEKSB7CiAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfSBlbHNlIGlmIChyeF9idWZbMF0gPT0gVEVTVF9GQUlMRUQpIHsKKyAgICAgICAgfSBlbHNlIGlmIChjbWQgPT0gVEVTVF9GQUlMRUQpIHsKICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9IGVsc2UgaWYgKHJ4X2J1ZlswXSA9PSBURVNUX01FU1NBR0UgfHwgcnhfYnVmWzBdID09IFRFU1RfVEVYVCkgewotICAgICAgICAgICAgd3JpdGUoU1RET1VUX0ZJTEVOTywgcnhfYnVmICsgMSwgcmMgLSAxKTsKKyAgICAgICAgfSBlbHNlIGlmIChjbWQgPT0gVEVTVF9NRVNTQUdFIHx8IGNtZCA9PSBURVNUX1RFWFQpIHsKKyAgICAgICAgICAgIGlmIChtc2dfbGVuKSB7CisgICAgICAgICAgICAgICAgd3JpdGUoU1RET1VUX0ZJTEVOTywgcnhfYnVmLCBtc2dfbGVuKTsKKyAgICAgICAgICAgICAgICByeF9idWYgKz0gbXNnX2xlbjsKKyAgICAgICAgICAgICAgICByeF9idWZfbGVuIC09IG1zZ19sZW47CisgICAgICAgICAgICB9CiAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgIiVzOiBCYWQgbWVzc2FnZSBoZWFkZXI6ICVkXG4iLCBfX2Z1bmNfXywgcnhfYnVmWzBdKTsKKyAgICAgICAgICAgIGZwcmludGYoc3RkZXJyLCAiJXM6IEJhZCBtZXNzYWdlIGhlYWRlcjogJWRcbiIsIF9fZnVuY19fLCBjbWQpOwogICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIH0KICAgICB9CkBAIC0xMzMsNyArMTY0LDcgQEAKICAgICAvKiBjbG9zZSBjb25uZWN0aW9uIHRvIHVuaXRlc3QgYXBwICovCiAgICAgdGlwY19jbG9zZShmZCk7CiAKLSAgICByZXR1cm4gcnhfYnVmWzBdID09IFRFU1RfUEFTU0VEID8gMCA6IC0xOworICAgIHJldHVybiBjbWQgPT0gVEVTVF9QQVNTRUQgPyAwIDogLTE7CiB9CiAKIGludCBtYWluKGludCBhcmdjLCBjaGFyKiogYXJndikgewo=