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JiYgU19JU1JFRyhzdC5zdF9tb2RlKSAmJgogICAgICAgICAgICAgICAgICh0aW1lX3QpIHN0LnN0X210aW1lID49IHRoaXJ0eV9taW51dGVzX2FnbykgewpAQCAtNzUsNiArNzcsODkgQEAKICAgICB9CiB9CiAKK3N0YXRpYyB2b2lkIGR1bXBfZGV2X2ZpbGVzKGNvbnN0IGNoYXIgKnRpdGxlLCBjb25zdCBjaGFyICpkcml2ZXJwYXRoLCBjb25zdCBjaGFyICpmaWxlbmFtZSkKK3sKKyAgICBESVIgKmQ7CisgICAgc3RydWN0IGRpcmVudCAqZGU7CisgICAgY2hhciBwYXRoW1BBVEhfTUFYXTsKKworICAgIGQgPSBvcGVuZGlyKGRyaXZlcnBhdGgpOworICAgIGlmIChkID09IE5VTEwpIHsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKworICAgIHdoaWxlICgoZGUgPSByZWFkZGlyKGQpKSkgeworICAgICAgICBpZiAoZGUtPmRfdHlwZSAhPSBEVF9MTkspIHsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIHNucHJpbnRmKHBhdGgsIHNpemVvZihwYXRoKSwgIiVzLyVzLyVzIiwgZHJpdmVycGF0aCwgZGUtPmRfbmFtZSwgZmlsZW5hbWUpOworICAgICAgICBkdW1wX2ZpbGUodGl0bGUsIHBhdGgpOworICAgIH0KKworICAgIGNsb3NlZGlyKGQpOworfQorCitzdGF0aWMgYm9vbCBza2lwX25vdF9zdGF0KGNvbnN0IGNoYXIgKnBhdGgpIHsKKyAgICBzdGF0aWMgY29uc3QgY2hhciBzdGF0W10gPSAiL3N0YXQiOworICAgIHNpemVfdCBsZW4gPSBzdHJsZW4ocGF0aCk7CisgICAgaWYgKHBhdGhbbGVuIC0gMV0gPT0gJy8nKSB7IC8qIERpcmVjdG9yeT8gKi8KKyAgICAgICAgcmV0dXJuIGZhbHNlOworICAgIH0KKyAgICByZXR1cm4gc3RyY21wKHBhdGggKyBsZW4gLSBzaXplb2Yoc3RhdCkgKyAxLCBzdGF0KTsgLyogLi4uL3N0YXQ/ICovCit9CisKK3N0YXRpYyBjb25zdCBjaGFyIG1tY2JsazBbXSA9ICIvc3lzL2Jsb2NrL21tY2JsazAvIjsKKworc3RhdGljIGludCBkdW1wX3N0YXRfZnJvbV9mZChjb25zdCBjaGFyICp0aXRsZSBfX3VudXNlZCwgY29uc3QgY2hhciAqcGF0aCwgaW50IGZkKSB7CisgICAgdW5zaWduZWQgbG9uZyBmaWVsZHNbMTFdLCByZWFkX3BlcmYsIHdyaXRlX3BlcmY7CisgICAgYm9vbCB6OworICAgIGNoYXIgKmNwLCAqYnVmZmVyID0gTlVMTDsKKyAgICBzaXplX3QgaSA9IDA7CisgICAgRklMRSAqZnAgPSBmZG9wZW4oZmQsICJyYiIpOworICAgIGdldGxpbmUoJmJ1ZmZlciwgJmksIGZwKTsKKyAgICBmY2xvc2UoZnApOworICAgIGlmICghYnVmZmVyKSB7CisgICAgICAgIHJldHVybiAtZXJybm87CisgICAgfQorICAgIGkgPSBzdHJsZW4oYnVmZmVyKTsKKyAgICB3aGlsZSAoKGkgPiAwKSAmJiAoYnVmZmVyW2kgLSAxXSA9PSAnXG4nKSkgeworICAgICAgICBidWZmZXJbLS1pXSA9ICdcMCc7CisgICAgfQorICAgIGlmICghKmJ1ZmZlcikgeworICAgICAgICBmcmVlKGJ1ZmZlcik7CisgICAgICAgIHJldHVybiAwOworICAgIH0KKyAgICB6ID0gdHJ1ZTsKKyAgICBmb3IgKGNwID0gYnVmZmVyLCBpID0gMDsgaSA8IChzaXplb2YoZmllbGRzKSAvIHNpemVvZihmaWVsZHNbMF0pKTsgKytpKSB7CisgICAgICAgIGZpZWxkc1tpXSA9IHN0cnRvbChjcCwgJmNwLCAwKTsKKyAgICAgICAgaWYgKGZpZWxkc1tpXSAhPSAwKSB7CisgICAgICAgICAgICB6ID0gZmFsc2U7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKHopIHsgLyogbmV2ZXIgY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2X25zZWM7Cit9CisKIHZvaWQgZm9yX2VhY2hfdXNlcmlkKHZvaWQgKCpmdW5jKShpbnQpLCBjb25zdCBjaGFyICpoZWFkZXIpIHsKICAgICBESVIgKmQ7CiAgICAgc3RydWN0IGRpcmVudCAqZGU7CkBAIC05OCw3ICsxMDQsNyBAQAogCiAgICAgICAgIHNwcmludGYoY21kcGF0aCwiL3Byb2MvJWQvY21kbGluZSIsIHBpZCk7CiAgICAgICAgIG1lbXNldChjbWRsaW5lLCAwLCBzaXplb2YoY21kbGluZSkpOwotICAgICAgICBpZiAoKGZkID0gb3BlbihjbWRwYXRoLCBPX1JET05MWSkpIDwgMCkgeworICAgICAgICBpZiAoKGZkID0gVEVNUF9GQUlMVVJFX1JFVFJZKG9wZW4oY21kcGF0aCwgT19SRE9OTFkgfCBPX0NMT0VYRUMpKSkgPCAwKSB7CiAgICAgICAgICAgICBzdHJjcHkoY21kbGluZSwgIk4vQSIpOwogICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgcmVhZChmZCwgY21kbGluZSwgc2l6ZW9mKGNtZGxpbmUpIC0gMSk7CkBAIC0xNDksNyArMTU1LDcgQEAKIAogICAgICAgICBzcHJpbnRmKGNvbW1wYXRoLCIvcHJvYy8lZC9jb21tIiwgdGlkKTsKICAgICAgICAgbWVtc2V0KGNvbW0sIDAsIHNpemVvZihjb21tKSk7Ci0gICAgICAgIGlmICgoZmQgPSBvcGVuKGNvbW1wYXRoLCBPX1JET05MWSkpIDwgMCkgeworICAgICAgICBpZiAoKGZkID0gVEVNUF9GQUlMVVJFX1JFVFJZKG9wZW4oY29tbXBhdGgsIE9fUkRPTkxZIHwgT19DTE9FWEVDKSkpIDwgMCkgewogICAgICAgICAgICAgc3RyY3B5KGNvbW0sICJOL0EiKTsKICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgIGNoYXIgKmM7CkBAIC0xODAsNyArMTg2LDcgQEAKICAgICBtZW1zZXQoYnVmZmVyLCAwLCBzaXplb2YoYnV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VMTCwgTlVMTCwgJnRtKSk7CisgICAgICAgIGlmIChyZXQgPT0gLTEpIHsKKyAgICAgICAgICAgIHByaW50ZigiKioqICVzOiBzZWxlY3QgZmFpbGVkOiAlc1xuIiwgcGF0aCwgc3RyZXJyb3IoZXJybm8pKTsKKyAgICAgICAgICAgIG5ld2xpbmUgPSB0cnVlOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0gZWxzZSBpZiAocmV0ID09IDApIHsKKyAgICAgICAgICAgIGVsYXBzZWQgPSBuYW5vdGltZSgpIC0gZWxhcHNlZDsKKyAgICAgICAgICAgIHByaW50ZigiKioqICVzOiBUaW1lZCBvdXQgYWZ0ZXIgJS4zZnNcbiIsIHBhdGgsCisgICAgICAgICAgICAgICAgICAgKGZsb2F0KSBlbGFwc2VkIC8gTkFOT1NfUEVSX1NFQyk7CisgICAgICAgICAgICBuZXdsaW5lID0gdHJ1ZTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgY2hhciBidWZmZXJbNjU1MzZdOworICAgICAgICAgICAgc3NpemVfdCBieXRlc19yZWFkID0gVEVNUF9GQUlMVVJFX1JFVFJZKHJlYWQoZmQsIGJ1ZmZlciwgc2l6ZW9mKGJ1ZmZlcikpKTsKKyAgICAgICAgICAgIGlmIChieXRlc19yZWFkID4gMCkgeworICAgICAgICAgICAgICAgIGZ3cml0ZShidWZmZXIsIGJ5dGVzX3JlYWQsIDEsIHN0ZG91dCk7CisgICAgICAgICAgICAgICAgbmV3bGluZSA9IChidWZmZXJbYnl0ZXNfcmVhZC0xXSA9PSAnXG4nKTsKKyAgICAgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgaWYgKGJ5dGVzX3JlYWQgPT0gLTEpIHsKKyAgICAgICAgICAgICAgICAgICAgcHJpbnRmKCIqKiogJXM6IEZhaWxlZCB0byByZWFkIGZyb20gZmQ6ICVzIiwgcGF0aCwgc3RyZXJyb3IoZXJybm8pKTsKKyAgICAgICAgICAgICAgICAgICAgbmV3bGluZSA9IHRydWU7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQogICAgICAgICB9Ci0gICAgICAgIGlmIChyZXQgPD0gMCkgYnJlYWs7CiAgICAgfQotICAgIGNsb3NlKGZkKTsKKyAgICBURU1QX0ZBSUxVUkVfUkVUUlkoY2xvc2UoZmQpKTsKIAogICAgIGlmICghbmV3bGluZSkgcHJpbnRmKCJcbiIpOwogICAgIGlmICh0aXRsZSkgcHJpbnRmKCJcbiIpOwogICAgIHJldHVybiAwOwogfQogCi1zdGF0aWMgaW50NjRfdCBuYW5vdGltZSgpIHsKLSAgICBzdHJ1Y3QgdGltZXNwZWMgdHM7Ci0gICAgY2xvY2tfZ2V0dGltZShDTE9DS19NT05PVE9OSUMsICZ0cyk7Ci0gICAgcmV0dXJuIChpbnQ2NF90KXRzLnR2X3NlYyAqIE5BTk9TX1BFUl9TRUMgKyB0cy50dl9uc2VjOworLyogcHJpbnRzIHRoZSBjb250ZW50cyBvZiBhIGZpbGUgKi8KK2ludCBkdW1wX2ZpbGUoY29uc3QgY2hhciAqdGl0bGUsIGNvbnN0IGNoYXIgKnBhdGgpIHsKKyAgICBpbnQgZmQgPSBURU1QX0ZBSUxVUkVfUkVUUlkob3BlbihwYXRoLCBPX1JET05MWSB8IE9fTk9OQkxPQ0sgfCBPX0NMT0VYRUMpKTsKKyAgICBpZiAoZmQgPCAwKSB7CisgICAgICAgIGludCBlcnIgPSBlcnJubzsKKyAgICAgICAgaWYgKHRpdGxlKSBwcmludGYoIi0tLS0tLSAlcyAoJXMpIC0tLS0tLVxuIiwgdGl0bGUsIHBhdGgpOworICAgICAgICBwcmludGYoIioqKiAlczogJXNcbiIsIHBhdGgsIHN0cmVycm9yKGVycikpOworICAgICAgICBpZiAodGl0bGUpIHByaW50ZigiXG4iKTsKKyAgICAgICAgcmV0dXJuIC0xOworICAgIH0KKyAgICByZXR1cm4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50ZihzdGRlcnIsICIlczogJXNcbiIsIGRpciwgc3RyZXJyb3IoZXJybm8pKTsKKyAgICAgICAgcmV0dXJuIHJldHZhbDsKKyAgICB9CisKKyAgICBpZiAoIWR1bXBfZnJvbV9mZCkgeworICAgICAgICBkdW1wX2Zyb21fZmQgPSBkdW1wX2ZpbGVfZnJvbV9mZDsKKyAgICB9CisgICAgZm9yICg7ICgoZCA9IHJlYWRkaXIoZGlycCkpKTsgZnJlZShuZXdwYXRoKSwgbmV3cGF0aCA9IE5VTEwpIHsKKyAgICAgICAgaWYgKChkLT5kX25hbWVbMF0gPT0gJy4nKQorICAgICAgICAgJiYgKCgoZC0+ZF9uYW1lWzFdID09ICcuJykgJiYgKGQtPmRfbmFtZVsyXSA9PSAnXDAnKSkKKyAgICAgICAgICB8fCAoZC0+ZF9uYW1lWzFdID09ICdcMCcpKSkgeworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKyAgICAgICAgYXNwcmludGYoJm5ld3BhdGgsICIlcyVzJXMlcyIsIGRpciwgc2xhc2gsIGQtPmRfbmFtZSwKKyAgICAgICAgICAgICAgICAgKGQtPmRfdHlwZSA9PSBEVF9ESVIpID8gIi8iIDogIiIpOworICAgICAgICBpZiAoIW5ld3BhdGgpIHsKKyAgICAgICAgICAgIHJldHZhbCA9IC1lcnJubzsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIGlmIChza2lwICYmICgqc2tpcCkobmV3cGF0aCkpIHsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisgICAgICAgIGlmIChkLT5kX3R5cGUgPT0gRFRfRElSKSB7CisgICAgICAgICAgICBpbnQgcmV0ID0gZHVtcF9maWxlcyhOVUxMLCBuZXdwYXRoLCBza2lwLCBkdW1wX2Zyb21fZmQpOworICAgICAgICAgICAgaWYgKHJldCA8IDApIHsKKyAgICAgICAgICAgICAgICByZXR2YWwgPSByZXQ7CisgICAgICAgICAgICB9CisgICAgICAg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GlmICghc3RybmNtcChkYXRhLCAiL3N5c3RlbS9iaW4vYXBwX3Byb2Nlc3MiLCBzdHJsZW4oIi9zeXN0ZW0vYmluL2FwcF9wcm9jZXNzIikpKSB7CiAgICAgICAgICAgICAvKiBza2lwIHp5Z290ZSAtLSBpdCB3b24ndCBkdW1wIGl0cyBzdGFjayBhbnl3YXkgKi8KICAgICAgICAgICAgIHNucHJpbnRmKHBhdGgsIHNpemVvZihwYXRoKSwgIi9wcm9jLyVkL2NtZGxpbmUiLCBwaWQpOwotICAgICAgICAgICAgaW50IGNmZCA9IG9wZW4ocGF0aCwgT19SRE9OTFkpOworICAgICAgICAgICAgaW50IGNmZCA9IFRFTVBfRkFJTFVSRV9SRVRSWShvcGVuKHBhdGgsIE9fUkRPTkxZIHwgT19DTE9FWEVDKSk7CiAgICAgICAgICAgICBsZW4gPSByZWFkKGNmZCwgZGF0YSwgc2l6ZW9mKGRhdGEpIC0gMSk7CiAgICAgICAgICAgICBjbG9zZShjZmQpOwogICAgICAgICAgICAgaWYgKGxlbiA8PSAwKSB7CkBAIC02MTIsNyArNzI0LDcgQEAKICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgKytkYWx2aWtfZm91bmQ7Ci0gICAgICAgICAgICBpbnQ2NF90IHN0YXJ0ID0gbmFub3RpbWUoKTsKKyAgICAgICAgICAgIHVpbnQ2NF90IHN0YXJ0ID0gbmFub3RpbWUoKTsKICAgICAgICAgICAgIGlmIChraWxsKHBpZCwgU0lHUVVJVCkpIHsKICAgICAgICAgICAgICAgICBmcHJpbnRmKHN0ZGVyciwgImtpbGwoJWQsIFNJR1FVSVQpOiAlc1xuIiwgcGlkLCBzdHJlcnJvcihlcnJubykpOwogICAgICAgICAgICAgICAgIGNvbnRpbnVlOwpAQCAtNjQyLDcgKzc1NCw3IEBACiAgICAgICAgICAgICAgICAgZnByaW50ZihzdGRlcnIsICJsc2VlazogJXNcbiIsIHN0cmVycm9yKGVycm5vKSk7CiAgICAgICAgICAgICB9IG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VhdGUgZGlyICclcyc6ICVzXG4iLCBwa2dkaXIsIHN0cmVycm9yKGVycm5vKSk7CkBAIC02OCw0MiArNjMsMTQgQEAKICAgICAgICAgcmV0dXJuIC0xOwogICAgIH0KIAotICAgIGlmIChsc3RhdChsaWJzeW1saW5rLCAmbGliU3RhdCkgPCAwKSB7Ci0gICAgICAgIGlmIChlcnJubyAhPSBFTk9FTlQpIHsKLSAgICAgICAgICAgIEFMT0dFKCJjb3VsZG4ndCBzdGF0IGxpYiBkaXI6ICVzXG4iLCBzdHJlcnJvcihlcnJubykpOwotICAgICAgICAgICAgcmV0dXJuIC0xOwotICAgICAgICB9Ci0gICAgfSBlbHNlIHsKLSAgICAgICAgaWYgKFNfSVNESVIobGliU3RhdC5zdF9tb2RlKSkgewotICAgICAgICAgICAgaWYgKGRlbGV0ZV9kaXJfY29udGVudHMobGlic3ltbGluaywgMSwgTlVMTCkgPCAwKSB7Ci0gICAgICAgICAgICAgICAgQUxPR0UoImNvdWxkbid0IGRlbGV0ZSBsaWIgZGlyZWN0b3J5IGR1cmluZyBpbnN0YWxsIGZvcjogJXMiLCBsaWJzeW1saW5rKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gLTE7Ci0gICAgICAgICAgICB9Ci0gICAgICAgIH0gZWxzZSBpZiAoU19JU0xOSyhsaWJTdGF0LnN0X21vZGUpKSB7Ci0gICAgICAgICAgICBpZiAodW5saW5rKGxpYnN5bWxpbmspIDwgMCkgewotICAgICAgICAgICAgICAgIEFMT0dFKCJjb3VsZG4ndCB1bmxpbmsgbGliIGRpcmVjdG9yeSBkdXJpbmcgaW5zdGFsbCBmb3I6ICVzIiwgbGlic3ltbGluayk7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIC0xOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgfQotCiAgICAgaWYgKHNlbGludXhfYW5kcm9pZF9zZXRmaWxlY29uKHBrZ2RpciwgcGtnbmFtZSwgc2VpbmZvLCB1aWQpIDwgMCkgew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E9IEVOT0VOVCkgewotICAgICAgICAgICAgQUxPR0UoImNvdWxkbid0IHN0YXQgbGliIGRpciBmb3Igbm9uLXByaW1hcnk6ICVzXG4iLCBzdHJlcnJvcihlcnJubykpOwotICAgICAgICAgICAgdW5saW5rKHBrZ2Rpcik7Ci0gICAgICAgICAgICByZXR1cm4gLTE7Ci0gICAgICAgIH0KLSAgICB9IGVsc2UgewotICAgICAgICBpZiAoU19JU0RJUihsaWJTdGF0LnN0X21vZGUpKSB7Ci0gICAgICAgICAgICBpZiAoZGVsZXRlX2Rpcl9jb250ZW50cyhsaWJzeW1saW5rLCAxLCBOVUxMKSA8IDApIHsKLSAgICAgICAgICAgICAgICBBTE9HRSgiY291bGRuJ3QgZGVsZXRlIGxpYiBkaXJlY3RvcnkgZHVyaW5nIGluc3RhbGwgZm9yIG5vbi1wcmltYXJ5OiAlcyIsCi0gICAgICAgICAgICAgICAgICAgICAgICBsaWJzeW1saW5rKTsKLSAgICAgICAgICAgICAgICB1bmxpbmsocGtnZGlyKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gLTE7Ci0gICAgICAgICAgICB9Ci0gICAgICAgIH0gZWxzZSBpZiAoU19JU0xOSyhsaWJTdGF0LnN0X21vZGUpKSB7Ci0gICAgICAgICAgICBpZiAodW5saW5rKGxpYnN5bWxpbmspIDwgMCkgewotICAgICAgICAgICAgICAgIEFMT0dFKCJjb3VsZG4ndCB1bmxpbmsgbGliIGRpcmVjdG9yeSBkdXJpbmcgaW5zdGFsbCBmb3Igbm9uLXByaW1hcnk6ICVzIiwKLSAgICAgICAgICAgICAgICAgICAgICAgIGxpYnN5bWxpbmspOwotICAgICAgICAgICAgICAgIHVubGluayhwa2dkaXIpOwotICAgICAgICAgICAgICAgIHJldHVybiAtMTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgIH0KLQogICAgIGlmIChzZWxpbnV4X2FuZHJvaWRfc2V0ZmlsZWNvbihwa2dkaXIsIHBrZ25hbWUsIHNlaW5mbywgdWlkKSA8IDApIHsKICAgICAgICAgQUxPR0UoImNhbm5vdCBzZXRmaWxlY29uIGRpciAnJXMnOiAlc1xuIiwgcGtnZGlyLCBzdHJlcnJvcihlcnJubykpOwotICAgICAgICB1bmxpbmsobGlic3ltbGluayk7CiAgICAgICAgIHVubGluayhwa2dkaXIpOwogICAgICAgICByZXR1cm4gLWVycm5vOwogICAgIH0KIAotICAgIGlmIChzeW1saW5rKGFwcGxpYmRpciwgbGlic3ltbGluaykgPCAwKSB7Ci0gICAgICAgIEFMT0dFKCJjb3VsZG4ndCBzeW1saW5rIGRpcmVjdG9yeSBmb3Igbm9uLXByaW1hcnkgJyVzJyAtPiAnJXMnOiAlc1xuIiwgbGlic3ltbGluaywKLSAgICAgICAgICAgICAgICBhcHBsaWJkaXIsIHN0cmVycm9yKGVycm5vKSk7Ci0gICAgICAgIHVubGluayhwa2dkaXIpOwotICAgICAgICByZXR1cm4gLTE7Ci0gICAgfQotCiAgICAgaWYgKGNob3duKHBrZ2RpciwgdWlkLCB1aWQpIDwgMCkgewogICAgICAgICBBTE9HRSgiY2Fubm90IGNob3duIGRpciAnJXMnOiAlc1xuIiwgcGtnZGlyLCBzdHJlcnJvcihlcnJubykpOwotICAgICAgICB1bmxpbmsobGlic3ltbGluayk7CiAgICAgICAgIHVubGluayhwa2dkaXIpOwogICAgICAgICByZXR1cm4gLWVycm5vOwogICAgIH0KQEAgLTI2NSw2ICsxNzcsODAgQEAKICAgICByZXR1cm4gMDsKIH0KIAoraW50IG1vdmVfdXNlcl9kYXRhKGNvbnN0IGNoYXIgKmZyb21fdXVpZCwgY29uc3QgY2hhciAqdG9fdXVpZCwKKyAgICAgICAgY29uc3QgY2hhciAqcGFja2FnZV9uYW1lLCBhcHBpZF90IGFwcGlkLCBjb25zdCBjaGFyKiBzZWluZm8pIHsKKyAgICBzdGQ6OnZlY3Rvcjx1c2VyaWRfdD4gdXNlcnMgPSBnZXRfa25vd25fdXNlcnMoZnJvbV91dWlkKTsKKworICAgIC8vIENvcHkgcGFja2FnZSBwcml2YXRlIGRhdGEgZm9yIGFsbCBrbm93biB1c2VycworICAgIGZvciAoYXV0byB1c2VyIDogdXNlcnMpIHsKKyAgICAgICAgc3RkOjpzdHJpbmcgZnJvbShjcmVhdGVfcGFja2FnZV9kYXRhX3BhdGgoZnJvbV91dWlkLCBwYWNrYWdlX25hbWUsIHVzZXIpKTsKKyAgICAgICAgc3RkOjpzdHJpbmcgdG8oY3JlYXRlX3BhY2thZ2VfZGF0YV9wYXRoKHRvX3V1aWQsIHBhY2thZ2VfbmFtZSwgdXNlcikpOworICAgICAgICBzdGQ6OnN0cmluZyB0b191c2VyKGNyZWF0ZV9kYXRhX3VzZXJfcGF0aCh0b191dWlkLCB1c2VyKSk7CisKKyAgICAgICAgLy8gRGF0YSBzb3VyY2UgbWF5IG5vdCBleGlzdCBmb3IgYWxsIHVzZXJzOyB0aGF0J3Mgb2theQorICAgICAgICBpZiAoYWNjZXNzKGZyb20uY19zdHIoKSwgRl9PSykgIT0gMCkgeworICAgICAgICAgICAgTE9HKElORk8pIDw8ICJNaXNzaW5nIHNvdXJjZSAiIDw8IGZyb207CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorCisgICAgICAgIHN0ZDo6c3RyaW5nIHVzZXJfcGF0aChjcmVhdGVfZGF0YV91c2VyX3BhdGgodG9fdXVpZCwgdXNlcikpOworICAgICAgICBpZiAoZnNfcHJlcGFyZV9kaXIodXNlcl9wYXRoLmNfc3RyKCksIDA3NzEsIEFJRF9TWVNURU0sIEFJRF9TWVNURU0pICE9IDApIHsKKyAgICAgICAgICAgIExPRyhFUlJPUikgPDwgIkZhaWxlZCB0byBwcmVwYXJlIHVzZXIgdGFyZ2V0ICIgPDwgdXNlcl9wYXRoOworICAgICAgICAgICAgZ290byBmYWlsOworICAgICAgICB9CisKKyAgICAgICAgdWlkX3QgdWlkID0gbXVsdGl1c2VyX2dldF91aWQodXNlciwgYXBwaWQpOworICAgICAgICBpZiAobWFrZV91c2VyX2RhdGEodG9fdXVpZCwgcGFja2FnZV9uYW1lLCB1aWQsIHVzZXIsIHNlaW5mbykgIT0gMCkgeworICAgICAgICAgICAgTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIGNyZWF0ZSBwYWNrYWdlIHRhcmdldCAiIDw8IHRvOworICAgICAgICAgICAgZ290byBmYWlsOworICAgICAgICB9CisKKyAgICAgICAgY2hhciAqYXJndltdID0geworICAgICAgICAgICAgKGNoYXIqKSBrQ3BQYXRoLAorICAgICAgICAgICAgKGNoYXIqKSAiLUYiLCAvKiBkZWxldGUgYW55IGV4aXN0aW5nIGRlc3RpbmF0aW9uIGZpbGUgZmlyc3QgKC0tcmVtb3ZlLWRlc3RpbmF0aW9uKSAqLworICAgICAgICAgICAgKGNoYXIqKSAiLXAiLCAvKiBwcmVzZXJ2ZSB0aW1lc3RhbXBzLCBvd25lcnNoaXAsIGFuZCBwZXJtaXNzaW9ucyAqLworICAgICAgICAgICAgKGNoYXIqKSAiLVIiLCAvKiByZWN1cnNlIGludG8gc3ViZGlyZWN0b3JpZXMgKERFU1QgbXVzdCBiZSBhIGRpcmVjdG9yeSkgKi8KKyAgICAgICAgICAgIChjaGFyKikgIi1QIiwgLyogRG8gbm90IGZvbGxvdyBzeW1saW5rcyBbZGVmYXVsdF0gKi8KKyAgICAgICAgICAgIChjaGFyKikgIi1kIiwgLyogZG9uJ3QgZGVyZWZlcmVuY2Ugc3ltbGlua3MgKi8KKyAgICAgICAgICAgIChjaGFyKikgZnJvbS5jX3N0cigpLAorICAgICAgICAgICAgKGNoYXIqKSB0b191c2VyLmNfc3RyKCkKKyAgICAgICAgfTsKKworICAgICAgICBMT0coREVCVUcpIDw8ICJDb3B5aW5nICIgPDwgZnJvbSA8PCAiIHRvICIgPDwgdG87CisgICAgICAgIGludCByYyA9IGFuZHJvaWRfZm9ya19leGVjdnAoQVJSQVlfU0laRShhcmd2KSwgYXJndiwgTlVMTCwgZmFsc2UsIHRydWUpOworCisgICAgICAgIGlmIChyYyAhPSAwKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsZWQgY29weWluZyAiIDw8IGZyb20gPDwgIiB0byAiIDw8IHRvCisgICAgICAgICAgICAgICAgICAgIDw8ICI6IHN0YXR1cyAiIDw8IHJjOworICAgICAgICAgICAgZ290byBmYWlsOworICAgICAgICB9CisKKyAgICAgICAgaWYgKHJlc3RvcmVjb25fZGF0YSh0b191dWlkLCBwYWNrYWdlX25hbWUsIHNlaW5mbywgdWlkKSAhPSAwKSB7CisgICAgICAgICAgICBMT0coRVJST1IpIDw8ICJGYWlsZWQgdG8gcmVzdG9yZWNvbiAiIDw8IHRvOworICAgICAgICAgICAgZ290byBmYWlsOworICAgICAgICB9CisgICAgfQorCisgICAgLy8gQ29weSBzdWNjZXNzZnVsLCBzbyBkZWxldGUgb2xkIGRhdGEKKyAgICBmb3IgKGF1dG8gdXNlciA6IHVzZXJzKSB7CisgICAgICAgIHN0ZDo6c3RyaW5nIGZyb20oY3JlYXRlX3BhY2thZ2VfZGF0YV9wYXRoKGZyb21fdXVpZCwgcGFja2FnZV9uYW1lLCB1c2VyKSk7CisgICAgICAgIGlmIChkZWxldGVfZGlyX2NvbnRlbnRzKGZyb20uY19zdHIoKSwgMSwgTlVMTCkgIT0gMCkgeworICAgICAgICAgICAgTE9HKFdBUk5JTkcpIDw8ICJGYWlsZWQgdG8gZGVsZXRlICIgPDwgZnJvbTsKKyAgICAgICAgfQorICAgIH0KKyAgICByZXR1cm4gMDsKKworZmFpbDoKKyAgICAvLyBOdWtlIGV2ZXJ5dGhpbmcgd2UgbWlnaHQgaGF2ZSBhbHJlYWR5IGNvcGllZAorICAgIGZvciAoYXV0byB1c2VyIDogdXNlcnMpIHsKKyAgICAgICAgc3RkOjpzdHJpbmcgdG8oY3JlYXRlX3BhY2thZ2VfZGF0YV9wYXRoKHRvX3V1aWQsIHBhY2thZ2VfbmFtZSwgdXNlcikpOworICAgICAgICBpZiAoZGVsZ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V9kZXgyb2F0X1hteF9mbGFnID8gMiA6IDApCiAgICAgICAgICAgICAgICAgICAgICArIChoYXZlX2RleDJvYXRfY29tcGlsZXJfZmlsdGVyX2ZsYWcgPyAxIDogMCkKKyAgICAgICAgICAgICAgICAgICAgICsgKGhhdmVfZGV4Mm9hdF90aHJlYWRzX2ZsYWcgPyAxIDogMCkKICAgICAgICAgICAgICAgICAgICAgICsgKGhhdmVfZGV4Mm9hdF9zd2FwX2ZkID8gMSA6IDApCiAgICAgICAgICAgICAgICAgICAgICArIChoYXZlX2RleDJvYXRfcmVsb2NhdGlvbl9za2lwX2ZsYWcgPyAyIDogMCkKKyAgICAgICAgICAgICAgICAgICAgICsgKGdlbl9jZmkgPyAxIDogMCkKKyAgICAgICAgICAgICAgICAgICAgICsgKGRlYnVnZ2FibGUgPyAxIDogMCkKICAgICAgICAgICAgICAgICAgICAgICsgZGV4Mm9hdF9mbGFnc19jb3VudF07CiAgICAgaW50IGkgPSAwOwogICAgIGFyZ3ZbaSsrXSA9IERFWDJPQVRfQklOOwpAQCAtODU5LDkgKzg4MCwxOCBAQAogICAgIGlmIChoYXZlX2RleDJvYXRfY29tcGlsZXJfZmlsdGVyX2ZsYWcpIHsKICAgICAgICAgYXJndltpKytdID0gZGV4Mm9hdF9jb21waWxlcl9maWx0ZXJfYXJnOwogICAgIH0KKyAgICBpZiAoaGF2ZV9kZXgyb2F0X3RocmVhZHNfZmxhZykgeworICAgICAgICBhcmd2W2krK10gPSBkZXgyb2F0X3RocmVhZHNfYXJnOworICAgIH0KICAgICBpZiAoaGF2ZV9kZXgyb2F0X3N3YXBfZmQpIHsKICAgICAgICAgYXJndltpKytdID0gZGV4Mm9hdF9zd2FwX2ZkOwogICAgIH0KKyAgICBpZiAoZ2VuX2NmaSkgeworICAgICAgICBhcmd2W2krK10gPSAiLS1pbmNsdWRlLWNmaSI7CisgICAgfQorICAgIGlmIChkZWJ1Z2dhYmxlKSB7CisgICAgICAgIGFyZ3ZbaSsrXSA9IC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MF0gIT0gJyEnKSB7CisgICAgICAgIGlmICh2YWxpZGF0ZV9hcGtfcGF0aChvYXRfZGlyKSkgeworICAgICAgICAgICAgQUxPR0UoImludmFsaWQgb2F0X2RpciAnJXMnXG4iLCBvYXRfZGlyKTsKICAgICAgICAgICAgIHJldHVybiAtMTsKICAgICAgICAgfQotICAgICAgICBjb25zdCBjaGFyICphcGtfZW5kID0gYXBrX3BhdGggKyAoZW5kIC0gaW5fb2RleF9wYXRoKTsgLy8gc3RycmNocihhcGtfcGF0aCwgJy8nKTsKLSAgICAgICAgc3RyY3B5KGVuZCArIDEsIGluc3RydWN0aW9uX3NldCk7IC8vIGluX29kZXhfcGF0aCBub3cgaXMgL3N5c3RlbS9mcmFtZXdvcmsvPGlzYT5cMAotICAgICAgICBzdHJjYXQoaW5fb2RleF9wYXRoLCBhcGtfZW5kKTsKLSAgICAgICAgZW5kID0gc3RycmNocihpbl9vZGV4X3BhdGgsICcuJyk7Ci0gICAgICAgIGlmIChlbmQgPT0gTlVMTCkgeworICAgICAgICBpZiAoY2FsY3VsYXRlX29hdF9maWxlX3BhdGgob3V0X3BhdGgsIG9hdF9kaXIsIGFwa19wYXRoLCBpbnN0cnVjdGlvbl9zZXQpKSB7CiAgICAgICAgICAgICByZXR1cm4gLTE7CiAgICAgICAgIH0KLSAgICAgICAgc3RyY3B5KGVuZCArIDEsICJvZGV4Iik7Ci0gICAgICAgIGlucHV0X2ZpbGUgPSBpbl9vZGV4X3BhdGg7CiAgICAgfSBlbHNlIHsKLSAgICAgICAgaW5wdXRfZmlsZSA9IGFwa19wYXRoOworICAgICAgICBpZiAoY3JlYXRlX2NhY2hlX3BhdGgob3V0X3BhdGgsIGFwa19wYXRoLCBpbnN0cnVjdGlvbl9zZXQpKSB7CisgICAgICAgICAgICByZXR1cm4gLTE7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBzd2l0Y2ggKGRleG9wdF9uZWVkZWQpIHsKKyAgICAgICAgY2FzZSBERVhPUFRfREVYMk9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ob3V0X2xlbiArIHN0cmxlbigiLnN3YXAiKSArIDEgPD0gUEtHX1BBVEhfTUFYKSB7CkBAIC0xMDYwLDE2ICsxMTIyLDMwIEBACiAgICAgICAgICAgICBBTE9HRSgic2V0X3NjaGVkX3BvbGljeSBmYWlsZWQ6ICVzXG4iLCBzdHJlcnJvcihlcnJubykpOwogICAgICAgICAgICAgZXhpdCg3MCk7CiAgICAgICAgIH0KKyAgICAgICAgaWYgKHNldHByaW9yaXR5KFBSSU9fUFJPQ0VTUywgMCwgQU5EUk9JRF9QUklPUklUWV9CQUNLR1JPVU5EKSA8IDApIHsKKyAgICAgICAgICAgIEFMT0dFKCJzZXRwcmlvcml0eSBmYWlsZWQ6ICVzXG4iLCBzdHJlcnJvcihlcnJubykpOworICAgICAgICAgICAgZXhpdCg3MSk7CisgICAgICAgIH0KICAgICAgICAgaWYgKGZsb2NrKG91dF9mZCwgTE9DS19FWCB8IExPQ0tfTkIpICE9IDApIHsKICAgICAgICAgICAgIEFMT0dFKCJmbG9jayglcykgZmFpbGVkOiAlc1xuIiwgb3V0X3BhdGgsIHN0cmVycm9yKGVycm5vKSk7CiAgICAgICAgICAgICBleGl0KDY3KTsKICAgICAgICAgfQogCi0gICAgICAgIGlmIChpc19wYXRjaG9hdCkgeworICAgICAgICBpZiAoZGV4b3B0X25lZWRlZCA9PSBERVhPUFRfUEFUQ0hPQVRfTkVFREVECisgICAgICAgICAgICB8fCBkZXhvcHRfbmVlZGVkID09IERFWE9QVF9TRUxGX1BBVENIT0FUX05FRURFRCkgewogICAgICAgICAgICAgcnVuX3BhdGNob2F0KGlucHV0X2ZkLCBvdXRfZmQsIGlucHV0X2ZpbGUsIG91dF9wYXRoLCBwa2duYW1lLCBpbnN0cnVjdGlvbl9zZXQpOworICAgICAgICB9IGVsc2UgaWYgKGRleG9wdF9uZWVkZWQgPT0gREVYT1BUX0RFWDJPQVRfTkVFREVEKSB7CisgICAgICAgICAgICBjb25zdCBjaGFyICppbnB1dF9maWxlX25h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ZW1vdmUiLCAgICAgICAgICAgICAgIDIsIGRvX3JlbW92ZSB9LAorICAgIHsgInJlbW92ZSIsICAgICAgICAgICAgICAgMywgZG9fcmVtb3ZlIH0sCiAgICAgeyAicmVuYW1lIiwgICAgICAgICAgICAgICAyLCBkb19yZW5hbWUgfSwKLSAgICB7ICJmaXh1aWQiLCAgICAgICAgICAgICAgIDMsIGRvX2ZpeHVpZCB9LAotICAgIHsgImZyZWVjYWNoZSIsICAgICAgICAgICAgMSwgZG9fZnJlZV9jYWNoZSB9LAotICAgIHsgInJtY2FjaGUiLCAgICAgICAgICAgICAgMiwgZG9fcm1fY2FjaGUgfSwKLSAgICB7ICJybWNvZGVjYWNoZSIsICAgICAgICAgIDIsIGRvX3JtX2NvZGVfY2FjaGUgfSwKLSAgICB7ICJnZXRzaXplIiwgICAgICAgICAgICAgIDcsIGRvX2dldF9zaXplIH0sCi0gICAgeyAicm11c2VyZGF0YSIsICAgICAgICAgICAyLCBkb19ybV91c2VyX2RhdGEgfSwKKyAgICB7ICJmaXh1aWQiLCAgICAgICAgICAgICAgIDQsIGRvX2ZpeHVpZCB9LAorICAgIHsgImZyZWVjYWNoZSIsICAgICAgICAgICAgMiwgZG9fZnJlZV9jYWNoZSB9LAorICAgIHsgInJtY2FjaGUiLCAgICAgICAgICAgICAgMywgZG9fcm1fY2FjaGUgfSwKKyAgICB7ICJybWNvZGVjYWNoZSIsICAgICAgICAgIDMsIGRvX3JtX2NvZGVfY2FjaGUgfSwKKyAgICB7ICJnZXRzaXplIiwgICAgICAgICAgICAgIDgsIGRvX2dldF9zaXplIH0sCisgICAgeyAicm11c2VyZGF0YSIsICAgICAgICAgICAzLCBkb19ybV91c2VyX2RhdGEgfSwKKyAgICB7ICJtdnVzZXJkYXRhIiwgICAgICAgICAgIDUsIGRvX212X3VzZXJfZGF0YSB9LAogICAgIHsgIm1vdmVmaWxlcyIsICAgICAgICAgICAgMCwgZG9fbW92ZWZpbGVzIH0sCi0gICAgeyAibGlua2xpYiIsICAgICAgICAgICAgICAzLCBkb19saW5rbGliIH0sCi0gICAgeyAibWt1c2VyZGF0YSIsICAgICAgICAgICA0LCBkb19ta191c2VyX2RhdGEgfSwKKyAgICB7ICJsaW5rbGliIiwgICAgICAgICAgICAgIDQsIGRvX2xpbmtsaWIgfSwKKyAgICB7ICJta3VzZXJkYXRhIiwgICAgICAgICAgIDUsIGRvX21rX3VzZXJfZGF0YSB9LAogICAgIHsgIm1rdXNlcmNvbmZpZyIsICAgICAgICAgMSwgZG9fbWtfdXNlcl9jb25maWcgfSwKLSAgICB7ICJybXVzZXIiLCAgICAgICAgICAgICAgIDEsIGRvX3JtX3VzZXIgfSwKKyAgICB7ICJybXVzZXIiLCAgICAgICAgICAgICAgIDIsIGRvX3JtX3VzZXIgfSwKICAgICB7ICJpZG1hcCIsICAgICAgICAgICAgICAgIDMsIGRvX2lkbWFwIH0sCi0gICAgeyAicmVzdG9yZWNvbmRhdGEiLCAgICAgICAzLCBkb19yZXN0b3JlY29uX2RhdGEgfSwKLSAgICB7ICJwYXRjaG9hdCIsICAgICAgICAgICAgIDUsIGRvX3BhdGNob2F0IH0sCisgICAgeyAicmVzdG9yZWNvbmRhdGEiLCAgICAgICA0LCBkb19yZXN0b3JlY29uX2RhdGEgfSwKKyAgICB7ICJjcmVhdGVvYXRkaXIiLCAgICAgICAgIDIsIGRvX2NyZWF0ZV9vYXRfZGlyIH0sCisgICAgeyAicm1wYWNrYWdlZGlyIiwgICAgICAgICAxLCBkb19ybV9wYWNrYWdlX2Rpcn0sCiB9OwogCiBzdGF0aWMgaW50IHJlYWR4KGludCBzLCB2b2lkICpfYnVmLCBpbnQgY291bnQpCiB7Ci0gICAgY2hhciAqYnVmID0gX2J1ZjsKKyAgICBjaGFyICpidWYgPSAoY2hhciAqKSBfYnVmOwogICAgIGludCBuID0gMCwgcjsKICAgICBpZiAoY291bnQgPCAwKSByZXR1cm4gLTE7CiAgICAgd2hpbGUgKG4gPCBjb3VudCkgewpAQCAtMjA5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mcuaD4KKwogI2RlZmluZSBDQUNIRV9OT0lTWSh4KSAvL3gKIAotaW50IGNyZWF0ZV9wa2dfcGF0aF9pbl9kaXIoY2hhciBwYXRoW1BLR19QQVRIX01BWF0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGRpcl9yZWNfdCogZGlyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjaGFyKiBwa2duYW1lLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjaGFyKiBwb3N0Zml4KQotewotICAgICBjb25zdCBzaXplX3QgcG9zdGZpeF9sZW4gPSBzdHJsZW4ocG9zdGZpeCk7Cit1c2luZyBhbmRyb2lkOjpiYXNlOjpTdHJpbmdQcmludGY7CiAKLSAgICAgY29uc3Qgc2l6ZV90IHBrZ25hbWVfbGVuID0gc3RybGVuKHBrZ25hbWUpOwotICAgICBpZiAocGtnbmFtZV9sZW4gPiBQS0dfTkFNRV9NQVgpIHsKLSAgICAgICAgIHJldHVybiAtMTsKLSAgICAgfQotCi0gICAgIGlmIChpc192YWxpZF9wYWNrYWdlX25hbWUocGtnbmFtZSkgPCAwKSB7Ci0gICAgICAgICByZXR1cm4gLTE7Ci0gICAgIH0KLQotICAgICBpZiAoKHBrZ25hbWVfbGVuICsgZGlyLT5sZW4gKyBwb3N0Zml4X2xlbikgPj0gUEtHX1BBVEhfTUFYKSB7Ci0gICAgICAgICByZXR1cm4gLTE7Ci0gICAgIH0KLQotICAgICBjaGFyICpkc3QgPSBwYXRoOwotICAgICBzaXplX3QgZHN0X3NpemUgPSBQS0dfUEFUSF9NQVg7Ci0KLSAgICAgaWYgKGFwcGVuZF9hbmRfaW5jcmVtZW50KCZkc3QsIGRpci0+cGF0aCwgJmRzdF9zaXplKSA8IDAKLSAgICAgICAgICAgICB8fCBhcHBlbmRfYW5kX2luY3JlbWVudCgmZHN0LCBwa2duYW1lLCAmZHN0X3NpemUpIDwgMAotICAgICAgICAgIC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IHJldHVybiAtMTsKK3N0ZDo6c3RyaW5nIGNyZWF0ZV9kYXRhX21lZGlhX3BhdGgoY29uc3QgY2hhciogdm9sdW1lX3V1aWQsIHVzZXJpZF90IHVzZXJpZCkgeworICAgIHJldHVybiBTdHJpbmdQcmludGYoIiVzL21lZGlhLyV1IiwgY3JlYXRlX2RhdGFfcGF0aCh2b2x1bWVfdXVpZCkuY19zdHIoKSwgdXNlcmlkKTsKK30KKworc3RkOjp2ZWN0b3I8dXNlcmlkX3Q+IGdldF9rbm93bl91c2Vycyhjb25zdCBjaGFyKiB2b2x1bWVfdXVpZCkgeworICAgIHN0ZDo6dmVjdG9yPHVzZXJpZF90PiB1c2VyczsKKworICAgIC8vIFdlIGFsd2F5cyBoYXZlIGFuIG93bmVyCisgICAgdXNlcnMucHVzaF9iYWNrKDApOworCisgICAgc3RkOjpzdHJpbmcgcGF0aChjcmVhdGVfZGF0YV9wYXRoKHZvbHVtZV91dWlkKSArICIvIiArIFNFQ09OREFSWV9VU0VSX1BSRUZJWCk7CisgICAgRElSKiBkaXIgPSBvcGVuZGlyKHBhdGguY19zdHIoKSk7CisgICAgaWYgKGRpciA9PSBOVUxMKSB7CisgICAgICAgIC8vIFVuYWJsZSB0byBkaXNjb3ZlciBvdGhlciB1c2VycywgYnV0IGF0IGxlYXN0IHJldHVybiBvd25lcgorICAgICAgICBQTE9HKEVSUk9SKSA8PCAiRmFpbGVkIHRvIG9wZW5kaXIgIiA8PCBwYXRoOworICAgICAgICByZXR1cm4gdXNlcnM7CiAgICAgfQotICAgIHJldHVybiAwOworCisgICAgc3RydWN0IGRpcmVudCogZW50OworICAgIHdoaWxlICgoZW50ID0gcmVhZGRpcihkaXIpKSkgeworICAgICAgICBpZiAoZW50LT5kX3R5cGUgIT0gRFRfRElSKSB7CisgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgfQorCisgICAgICAgIGNoYXIqIGVuZDsKKyAgICAgICAgdXNlcmlkX3QgdXNlciA9IHN0cnRvbChl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Bib29sKiBvdXRJc0F1dG9UaW1lc3RhbXAsCi0gICAgICAgICAgICAgICAgUmVjdCogb3V0Q3JvcCwgaW50KiBvdXRTY2FsaW5nTW9kZSwgdWludDMyX3QqIG91dFRyYW5zZm9ybSwKLSAgICAgICAgICAgICAgICBib29sKiBvdXRBc3luYywgc3A8RmVuY2U+KiBvdXRGZW5jZSwKKyAgICAgICAgICAgICAgICBhbmRyb2lkX2RhdGFzcGFjZSogb3V0RGF0YVNwYWNlLAorICAgICAgICAgICAgICAgIFJlY3QqIG91dENyb3AsIGludCogb3V0U2NhbGluZ01vZGUsCisgICAgICAgICAgICAgICAgdWludDMyX3QqIG91dFRyYW5zZm9ybSwgYm9vbCogb3V0QXN5bmMsIHNwPEZlbmNlPiogb3V0RmVuY2UsCiAgICAgICAgICAgICAgICAgdWludDMyX3QqIG91dFN0aWNreVRyYW5zZm9ybSA9IE5VTEwpIGNvbnN0IHsKICAgICAgICAgICAgICpvdXRUaW1lc3RhbXAgPSB0aW1lc3RhbXA7CiAgICAgICAgICAgICAqb3V0SXNBdXRvVGltZXN0YW1wID0gYm9vbChpc0F1dG9UaW1lc3RhbXApOworICAgICAgICAgICAgKm91dERhdGFTcGFjZSA9IGRhdGFTcGFjZTsKICAgICAgICAgICAgICpvdXRDcm9wID0gY3JvcDsKICAgICAgICAgICAgICpvdXRTY2FsaW5nTW9kZSA9IHNjYWxpbmdNb2RlOwogICAgICAgICAgICAgKm91dFRyYW5zZm9ybSA9IHRyYW5zZm9ybTsKQEAgLTMwMSwxNSArMzA3LDIwIEBACiAgICAgICAgIHN0YXR1c190IGZsYXR0ZW4odm9pZComIGJ1ZmZlciwgc2l6ZV90JiBzaXplLCBpbnQqJiBmZHMsIHNpemVfdCYgY291bnQpIGNvbnN0OwogICAgICAgICBzdGF0dXNfdCB1bmZsYXR0ZW4odm9pZCBjb25zdComIGJ1ZmZlciwgc2l6ZV90JiBzaXplLCBpbnQgY29uc3QqJiBmZHMsIHNpemVfdCYgY291bnQp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hfQVVESU9fQ29kaW5nVW51c2VkOiAgICAgcmV0dXJuICJVbnVzZWQiOyAgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdBdXRvRGV0ZWN0OiByZXR1cm4gIkF1dG9EZXRlY3QiOyAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ1BDTTogICAgICAgIHJldHVybiAiUENNIjsKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nQURQQ006ICAgICAgcmV0dXJuICJBRFBDTSI7ICAgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdBTVI6ICAgICAgICByZXR1cm4gIkFNUiI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ0dTTUZSOiAgICAgIHJldHVybiAiR1NNRlIiOworICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdHU01FRlI6ICAgICByZXR1cm4gIkdTTUVGUiI7ICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ0dTTUhSOiAgICAgIHJldHVybiAiR1NNSFIiOyAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nUERDRlI6ICAgICAgcmV0dXJuICJQRENGUiI7ICAgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdQRENFRlI6ICAgICByZXR1cm4gIlBEQ0VGUiI7ICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ1BEQ0hSOiAgICAgIHJldHVybiAiUERDSFIiOyAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nVERNQUZSOiAgICAgcmV0dXJuICJURE1BRlIiOyAgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdURE1BRUZSOiAgICByZXR1cm4gIlRETUFFRlIiOyAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ1FDRUxQODogICAgIHJldHVybiAiUUNFTFA4IjsgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nUUNFTFAxMzogICAgcmV0dXJuICJRQ0VMUDEzIjsgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdFVlJDOiAgICAgICByZXR1cm4gIkVWUkMiOyAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ1NNVjogICAgICAgIHJldHVybiAiU01WIjsgICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nRzcxMTogICAgICAgcmV0dXJuICJHNzExIjsKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nRzcyMzogICAgICAgcmV0dXJuICJHNzIzIjsgICAgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdHNzI2OiAgICAgICByZXR1cm4gIkc3MjYiOyAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ0c3Mjk6ICAgICAgIHJldHVybiAiRzcyOSI7ICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nQUFDOiAgICAgICAgcmV0dXJuICJBQUMiOworICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdNUDM6ICAgICAgICByZXR1cm4gIk1QMyI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ1NCQzogICAgICAgIHJldHVybiAiU0JDIjsgICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nVk9SQklTOiAgICAgcmV0dXJuICJWT1JCSVMiOworICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdXTUE6ICAgICAgICByZXR1cm4gIldNQSI7ICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ1JBOiAgICAgICAgIHJldHVybiAiUkEiOyAgICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ29kaW5nTUlESTogICAgICAgcmV0dXJuICJNSURJIjsgICAgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9BVURJT19Db2RpbmdGTEFDOiAgICAgICByZXR1cm4gIkZMQUMiOworICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmOworICAgIH0KK30KKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfQVVESU9fUENNTU9ERVRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworICAgICAgICBjYXNlIE9NWF9BVURJT19QQ01Nb2RlTGluZWFyOiByZXR1cm4gIkxpbmVhciI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX1BDTU1vZGVBTGF3OiAgIHJldHVybiAiQUxhdyI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX1BDTU1vZGVNVUxhdzogIHJldHVybiAiTVVMYXciOworICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmOworICAgIH0KK30KKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfQVVESU9fQ0hBTk5FTFRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworICAgICAgICBjYXNlIE9NWF9BVURJT19DaGFubmVsTm9uZTogcmV0dXJuICJOb25lIjsgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9BVURJT19DaGFubmVsTEY6ICAgcmV0dXJuICJMRiI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0NoYW5uZWxSRjogICByZXR1cm4gIlJGIjsKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ2hhbm5lbENGOiAgIHJldHVybiAiQ0YiOworICAgICAgICBjYXNlIE9NWF9BVURJT19DaGFubmVsTFM6ICAgcmV0dXJuICJMUyI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0NoYW5uZWxSUzogICByZXR1cm4gIlJTIjsKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ2hhbm5lbExGRTogIHJldHVybiAiTEZFIjsKKyAgICAgICAgY2FzZSBPTVhfQVVESU9fQ2hhbm5lbENTOiAgIHJldHVybiAiQ1MiOworICAgICAgICBjYXNlIE9NWF9BVURJT19DaGFubmVsTFI6ICAgcmV0dXJuICJMUiI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0NoYW5uZWxSUjogICByZXR1cm4gIlJSIjsKKyAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWY7CisgICAgfQorfQorCitpbmxpbmUgc3RhdGljIGNvbnN0IGNoYXIgKmFzU3RyaW5nKE9NWF9BVURJT19DSEFOTkVMTU9ERVRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworICAgICAgICBjYXNlIE9NWF9BVURJT19DaGFubmVsTW9kZVN0ZXJlbzogICAgICByZXR1cm4gIlN0ZXJlbyI7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0NoYW5uZWxNb2RlSm9pbnRTdGVyZW86IHJldHVybiAiSm9pbnRTdGVyZW8iOworLy8gICAgICBjYXNlIE9NWF9BVURJT19DaGFubmVsTW9kZUR1YWw6ICAgICAgICByZXR1cm4gIkR1YWwiOworICAgICAgICBjYXNlIE9NWF9BVURJT19DaGFubmVsTW9kZU1vbm86ICAgICAgICByZXR1cm4gIk1vbm8iOworICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmOworICAgIH0KK30KKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfQVVESU9fQUFDU1RSRUFNRk9STUFUVFlQRSBpLCBjb25zdCBjaGFyICpkZWYgPSAiPz8iKSB7CisgICAgc3dpdGNoIChpKSB7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0FBQ1N0cmVhbUZvcm1hdE1QMkFEVFM6IHJldHVybiAiTVAyQURUUyI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0FBQ1N0cmVhbUZvcm1hdE1QNEFEVFM6IHJldHVybiAiTVA0QURUUyI7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0FBQ1N0cmVhbUZvcm1hdE1QNExPQVM6IHJldHVybiAiTVA0TE9BUyI7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0FBQ1N0cmVhbUZvcm1hdE1QNExBVE06IHJldHVybiAiTVA0TEFUTSI7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0FBQ1N0cmVhbUZvcm1hdEFESUY6ICAgIHJldHVybiAiQURJRiI7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0FBQ1N0cmVhbUZvcm1hdE1QNEZGOiAgIHJldHVybiAiTVA0RkYiOworLy8gICAgICBjYXNlIE9NWF9BVURJT19BQUNTdHJlYW1Gb3JtYXRSQVc6ICAgICByZXR1cm4gIlJBVyI7CisgICAgICAgIGRlZmF1bHQ6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWY7CisgICAgfQorfQorCitpbmxpbmUgc3RhdGljIGNvbnN0IGNoYXIgKmFzU3RyaW5nKE9NWF9BVURJT19BTVJGUkFNRUZPUk1BVFRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworLy8gICAgICBjYXNlIE9NWF9BVURJT19BTVJGcmFtZUZvcm1hdENvbmZvcm1hbmNlOiByZ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9NWF9BVURJT19BTVJEVFhNT0RFVFlQRSBpLCBjb25zdCBjaGFyICpkZWYgPSAiPz8iKSB7CisgICAgc3dpdGNoIChpKSB7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0FNUkRUWE1vZGVPZmY6ICAgIHJldHVybiAiTW9kZU9mZiI7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0FNUkRUWE1vZGVPblZBRDE6IHJldHVybiAiTW9kZU9uVkFEMSI7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0FNUkRUWE1vZGVPblZBRDI6IHJldHVybiAiTW9kZU9uVkFEMiI7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0FNUkRUWE1vZGVPbkF1dG86IHJldHVybiAiTW9kZU9uQXV0byI7CisvLyAgICAgIGNhc2UgT01YX0FVRElPX0FNUkRUWGFzRUZSOiAgICAgIHJldHVybiAiYXNFRlIiOworICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmOworICAgIH0KK30KKworI2VuZGlmIC8vIEFTX1NUUklOR19GT1JfT01YX0FVRElPX0gKKworI2VuZGlmIC8vIE9NWF9BdWRpb19oCisKKyNpZmRlZiBPTVhfQXVkaW9FeHRfaAorLyogYXNTdHJpbmcgZGVmaW5pdGlvbnMgaWYgbWVkaWEvb3Blbm1heC9PTVhfQXVkaW9FeHQuaCB3YXMgaW5jbHVkZWQgKi8KKworI2lmbmRlZiBBU19TVFJJTkdfRk9SX09NWF9BVURJT0VYVF9ICisjZGVmaW5lIEFTX1NUUklOR19GT1JfT01YX0FVRElPRVhUX0gKKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfQVVESU9fQ09ESU5HRVhUVFlQRSBpLCBjb25zdCBjaGFyICpkZWYgPSAiPz8iKSB7CisgICAgc3dpdGNoIChpKSB7CisgICAgICAgIGNhc2UgT01YX0FVRElPX0NvZGluZ0FuZHJvaWRBQzM6ICByZXR1cm4gIkFuZ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C8vIE9NWF9Db21wb25lbnRfaAorCisjaWZkZWYgT01YX0NvcmVfaAorLyogYXNTdHJpbmcgZGVmaW5pdGlvbnMgaWYgbWVkaWEvb3Blbm1heC9PTVhfQ29yZS5oIHdhcyBpbmNsdWRlZCAqLworCisjaWZuZGVmIEFTX1NUUklOR19GT1JfT01YX0NPUkVfSAorI2RlZmluZSBBU19TVFJJTkdfRk9SX09NWF9DT1JFX0gKKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfQ09NTUFORFRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworICAgICAgICBjYXNlIE9NWF9Db21tYW5kU3RhdGVTZXQ6ICAgIHJldHVybiAiU3RhdGVTZXQiOworICAgICAgICBjYXNlIE9NWF9Db21tYW5kRmx1c2g6ICAgICAgIHJldHVybiAiRmx1c2giOworICAgICAgICBjYXNlIE9NWF9Db21tYW5kUG9ydERpc2FibGU6IHJldHVybiAiUG9ydERpc2FibGUiOworICAgICAgICBjYXNlIE9NWF9Db21tYW5kUG9ydEVuYWJsZTogIHJldHVybiAiUG9ydEVuYWJsZSI7CisvLyAgICAgIGNhc2UgT01YX0NvbW1hbmRNYXJrQnVmZmVyOiAgcmV0dXJuICJNYXJrQnVmZmVyIjsKKyAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmOworICAgIH0KK30KKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfU1RBVEVUWVBFIGksIGNvbnN0IGNoYXIgKmRlZiA9ICI/PyIpIHsKKyAgICBzd2l0Y2ggKGkpIHsKKyAgICAgICAgY2FzZSBPTVhfU3RhdGVJbnZhbGlkOiAgICAgICAgICByZXR1cm4gIkludmFsaWQiOworICAgICAgICBjYXNlIE9NWF9TdGF0ZUxvYWRlZDogICAgICAgICAgIHJldHVybiAiTG9hZGVkIjsKKyAgICAgICAgY2FzZSBPTVhfU3RhdGVJZGxlOiAgICAgICAgICAgICByZXR1cm4gIklkbGUiOworICAgICAgICBjYXNlIE9NWF9TdGF0ZUV4ZWN1dGluZzogICAgICAgIHJldHVybiAiRXhlY3V0aW5nIjsKKy8vICAgICAgY2FzZSBPTVhfU3RhdGVQYXVzZTogICAgICAgICAgICByZXR1cm4gIlBhdXNlIjsKKy8vICAgICAgY2FzZSBPTVhfU3RhdGVXYWl0Rm9yUmVzb3VyY2VzOiByZXR1cm4gIldhaXRGb3JSZXNvdXJjZXMiOworICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWY7CisgICAgfQorfQorCitpbmxpbmUgc3RhdGljIGNvbnN0IGNoYXIgKmFzU3RyaW5nKE9NWF9FUlJPUlRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworICAgICAgICBjYXNlIE9NWF9FcnJvck5vbmU6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiTm9uZSI7CisgICAgICAgIGNhc2UgT01YX0Vycm9ySW5zdWZmaWNpZW50UmVzb3VyY2VzOiAgICAgICAgICAgICAgcmV0dXJuICJJbnN1ZmZpY2llbnRSZXNvdXJjZXMiOworICAgICAgICBjYXNlIE9NWF9FcnJvclVuZGVmaW5lZDogICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiVW5kZWZpbmVkIjsKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JJbnZhbGlkQ29tcG9uZW50TmFtZTogICAgICAgICAgICAgICByZXR1cm4gIkludmFsaWRDb21wb25lbnROYW1lIjsKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JDb21wb25lbnROb3RGb3VuZDogICAgICAgICAgICAgICAgICByZXR1cm4gIkNvbXBvbmVudE5vdEZvdW5kIjsKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JJbnZhbGlkQ29tcG9uZW50OiAgICAgICAgICAgICAgICAgICByZXR1cm4gIkludmFsaWRDb21wb25lbnQiOyAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JCYWRQYXJhbWV0ZXI6ICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIkJhZFBhcmFtZXRlciI7CisgICAgICAgIGNhc2UgT01YX0Vycm9yTm90SW1wbGVtZW50ZWQ6ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJOb3RJbXBsZW1lbnRlZCI7CisgICAgICAgIGNhc2UgT01YX0Vycm9yVW5kZXJmbG93OiAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJVbmRlcmZsb3ciOyAgICAgICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yT3ZlcmZsb3c6ICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJPdmVyZmxvdyI7ICAgICAgICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9ySGFyZHdhcmU6ICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJIYXJkd2FyZSI7ICAgICAgICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9ySW52YWxpZFN0YXRlOiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJJbnZhbGlkU3RhdGUiOworICAgICAgICBjYXNlIE9NWF9FcnJvclN0cmVhbUNvcnJ1cHQ6ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiU3RyZWFtQ29ycnVwdCI7CisgICAgICAgIGNhc2UgT01YX0Vycm9yUG9ydHNOb3RDb21wYXRpYmxlOiAgICAgICAgICAgICAgICAgcmV0dXJuICJQb3J0c05vdENvbXBhdGlibGUiOyAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yUmVzb3VyY2VzTG9zdDogICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJSZXNvdXJjZXNMb3N0IjsKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JOb01vcmU6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIk5vTW9yZSI7CisgICAgICAgIGNhc2UgT01YX0Vycm9yVmVyc2lvbk1pc21hdGNoOiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJWZXJzaW9uTWlzbWF0Y2giOyAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yTm90UmVhZHk6ICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJOb3RSZWFkeSI7ICAgICAgICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yVGltZW91dDogICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJUaW1lb3V0IjsgICAgICAgICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yU2FtZVN0YXRlOiAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJTYW1lU3RhdGUiOyAgICAgICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yUmVzb3VyY2VzUHJlZW1wdGVkOiAgICAgICAgICAgICAgICAgcmV0dXJuICJSZXNvdXJjZXNQcmVlbXB0ZWQiOyAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yUG9ydFVucmVzcG9uc2l2ZUR1cmluZ0FsbG9jYXRpb246CisgICAgICAgICAgICByZXR1cm4gIlBvcnRVbnJlc3BvbnNpdmVEdXJpbmdBbGxvY2F0aW9uIjsgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yUG9ydFVucmVzcG9uc2l2ZUR1cmluZ0RlYWxsb2NhdGlvbjoKKyAgICAgICAgICAgIHJldHVybiAiUG9ydFVucmVzcG9uc2l2ZUR1cmluZ0RlYWxsb2NhdGlvbiI7ICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JQb3J0VW5yZXNwb25zaXZlRHVyaW5nU3RvcDoKKyAgICAgICAgICAgIHJldHVybiAiUG9ydFVucmVzcG9uc2l2ZUR1cmluZ1N0b3AiOyAgICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JJbmNvcnJlY3RTdGF0ZVRyYW5zaXRpb246CisgICAgICAgICAgICByZXR1cm4gIkluY29ycmVjdFN0YXRlVHJhbnNpdGlvbiI7ICAgICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9ySW5jb3JyZWN0U3RhdGVPcGVyYXRpb246CisgICAgICAgICAgICByZXR1cm4gIkluY29ycmVjdFN0YXRlT3BlcmF0aW9uIjsgICAgICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0Vycm9yVW5zdXBwb3J0ZWRTZXR0aW5nOiAgICAgICAgICAgICAgICAgcmV0dXJuICJVbnN1cHBvcnRlZFNldHRpbmciOworICAgICAgICBjYXNlIE9NWF9FcnJvclVuc3VwcG9ydGVkSW5kZXg6ICAgICAgICAgICAgICAgICAgIHJldHVybiAiVW5zdXBwb3J0ZWRJbmRleCI7CisgICAgICAgIGNhc2UgT01YX0Vycm9yQmFkUG9ydEluZGV4OiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJCYWRQb3J0SW5kZXgiOworICAgICAgICBjYXNlIE9NWF9FcnJvclBvcnRVbnBvcHVsYXRlZDogICAgICAgICAgICAgICAgICAgIHJldHVybiAiUG9ydFVucG9wdWxhdGVkIjsgICAgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9FcnJvckNvbXBvbmVudFN1c3BlbmRlZDogICAgICAgICAgICAgICAgIHJldHVybiAiQ29tcG9uZW50U3VzcGVuZGVkIjsgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9FcnJvckR5bmFtaWNSZXNvdXJjZXNVbmF2YWlsYWJsZToKKyAgICAgICAgICAgIHJldHVybiAiRHluYW1pY1Jlc291cmNlc1VuYXZhaWxhYmxlIjsgICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JNYkVycm9yc0luRnJhbWU6ICAgICAgICAgICAgICAgICAgICByZXR1cm4gIk1iRXJyb3JzSW5GcmFtZSI7ICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JGb3JtYXROb3REZXRlY3RlZDogICAgICAgICAgICAgICAgICByZXR1cm4gIkZvcm1hdE5vdERldGVjdGVkIjsgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JDb250ZW50UGlwZU9wZW5GYWlsZWQ6ICAgICAgICAgICAgICByZXR1cm4gIkNvbnRlbnRQaXBlT3BlbkZhaWxlZCI7ICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfRXJyb3JDb250ZW50UGlwZUNyZWF0aW9uRmFpbGVkOgorICAgICAgICAgICAgcmV0dXJuICJDb250ZW50UGlwZUNyZWF0aW9uRmFpbGVkIjsgICAgICAgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9FcnJvclNlcGVyYXRlVGFibGVzVXNlZDogICAgICAgICAgICAgICAgIHJldHVybiAiU2VwZXJhdGVUYWJsZXNVc2VkIjsgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9FcnJvclR1bm5lbGluZ1Vuc3VwcG9ydGVkOiAgICAgICAgICAgICAgIHJldHVybiAiVHVubmVsaW5nVW5zdXBwb3J0ZWQiOyAgIC8vIHVudXNlZAorICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWY7CisgICAgfQorfQorCitpbmxpbmUgc3RhdGljIGNvbnN0IGNoYXIgKmFzU3RyaW5nKE9NWF9FVkVOVFRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworICAgICAgICBjYXNlIE9NWF9FdmVudENtZENvbXBsZXRlOiAgICAgICAgICAgICAgIHJldHVybiAiQ21kQ29tcGxldGUiOworICAgICAgICBjYXNlIE9NWF9FdmVudEVycm9yOiAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiRXJyb3IiOworLy8gICAgICBjYXNlIE9NWF9FdmVudE1hcms6ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiTWFyayI7CisgICAgICAgIGNhc2UgT01YX0V2ZW50UG9ydFNldHRpbmdzQ2hhbmdlZDogICAgICAgcmV0dXJuICJQb3J0U2V0dGluZ3NDaGFuZ2VkIjsKKyAgICAgICAgY2FzZSBPTVhfRXZlbnRCdWZmZXJGbGFnOiAgICAgICAgICAgICAgICByZXR1cm4gIkJ1ZmZlckZsYWciOworLy8gICAgICBjYXNlIE9NWF9FdmVudFJlc291cmNlc0FjcXVpcmVkOiAgICAgICAgIHJldHVybiAiUmVzb3VyY2VzQWNxdWlyZWQiOworLy8gICAgICBjYXNlIE9NWF9FdmVudENvbXBvbmVudFJlc3VtZWQ6ICAgICAgICAgIHJldHVybiAiQ29tcG9uZW50UmVzdW1lZCI7CisvLyAgICAgIGNhc2UgT01YX0V2ZW50RHluYW1pY1Jlc291cmNlc0F2YWlsYWJsZTogcmV0dXJuICJEeW5hbWljUmVzb3VyY2VzQXZhaWxhYmxlIjsKKy8vICAgICAgY2FzZSBPTVhfRXZlbnRQb3J0Rm9ybWF0RGV0ZWN0ZWQ6ICAgICAgICByZXR1cm4gIlBvcnRGb3JtYXREZXRlY3RlZCI7CisgICAgICAgIGRlZmF1bHQ6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlZjsKKyAgICB9Cit9CisKKyNlbmRpZiAvLyBBU19TVFJJTkdfRk9SX09NWF9DT1JFX0gKKworI2VuZGlmIC8vIE9NWF9Db3JlX2gKKworI2lmZGVmIE9NWF9JbWFnZV9oCisvKiBhc1N0cmluZyBkZWZpbml0a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m4gIkxaVyI7ICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX0lNQUdFX0NvZGluZ0JNUDogICAgICAgIHJldHVybiAiQk1QIjsgICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlZjsKKyAgICB9Cit9CisKKyNlbmRpZiAvLyBBU19TVFJJTkdfRk9SX09NWF9JTUFHRV9ICisKKyNlbmRpZiAvLyBPTVhfSW1hZ2VfaAorCisjaWZkZWYgT01YX0luZGV4X2gKKy8qIGFzU3RyaW5nIGRlZmluaXRpb25zIGlmIG1lZGlhL29wZW5tYXgvT01YX0luZGV4Lmggd2FzIGluY2x1ZGVkICovCisKKyNpZm5kZWYgQVNfU1RSSU5HX0ZPUl9PTVhfSU5ERVhfSAorI2RlZmluZSBBU19TVFJJTkdfRk9SX09NWF9JTkRFWF9ICisKK2lubGluZSBzdGF0aWMgY29uc3QgY2hhciAqYXNTdHJpbmcoT01YX0lOREVYVFlQRSBpLCBjb25zdCBjaGFyICpkZWYgPSAiPz8iKSB7CisgICAgc3dpdGNoIChpKSB7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1Qcmlvcml0eU1nbXQ6ICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtUHJpb3JpdHlNZ210IjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUF1ZGlvSW5pdDogICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1BdWRpb0luaXQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtSW1hZ2VJbml0OiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUltYWdlSW5pdCI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1WaWRlb0luaXQ6ICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtVmlkZW9Jbml0IjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbU90aGVySW5pdDogICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1PdGhlckluaXQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtTnVtQXZhaWxhYmxlU3RyZWFtczogICAgICAgICAgICAgcmV0dXJuICJQYXJhbU51bUF2YWlsYWJsZVN0cmVhbXMiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQWN0aXZlU3RyZWFtOiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUFjdGl2ZVN0cmVhbSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1TdXNwZW5zaW9uUG9saWN5OiAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtU3VzcGVuc2lvblBvbGljeSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1Db21wb25lbnRTdXNwZW5kZWQ6ICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQ29tcG9uZW50U3VzcGVuZGVkIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdDYXB0dXJpbmc6ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ2FwdHVyaW5nIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdDYXB0dXJlTW9kZTogICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ2FwdHVyZU1vZGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleEF1dG9QYXVzZUFmdGVyQ2FwdHVyZTogICAgICAgICAgICAgICAgcmV0dXJuICJBdXRvUGF1c2VBZnRlckNhcHR1cmUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQ29udGVudFVSSTogICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUNvbnRlbnRVUkkiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQ3VzdG9tQ29udGVudFBpcGU6ICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUN1c3RvbUNvbnRlbnRQaXBlIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbURpc2FibGVSZXNvdXJjZUNvbmNlYWxtZW50OgorLy8gICAgICAgICAgcmV0dXJuICJQYXJhbURpc2FibGVSZXNvdXJjZUNvbmNlYWxtZW50IjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdNZXRhZGF0YUl0ZW1Db3VudDogICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnTWV0YWRhdGFJdGVtQ291bnQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbnRhaW5lck5vZGVDb3VudDogICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb250YWluZXJOb2RlQ291bnQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ01ldGFkYXRhSXRlbTogICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdNZXRhZGF0YUl0ZW0iOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvdW50ZXJOb2RlSUQ6ICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb3VudGVyTm9kZUlEIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbU1ldGFkYXRhRmlsdGVyVHlwZTogICAgICAgICAgICAgIHJldHVybiAiUGFyYW1NZXRhZGF0YUZpbHRlclR5cGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtTWV0YWRhdGFLZXlGaWx0ZXI6ICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbU1ldGFkYXRhS2V5RmlsdGVyIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdQcmlvcml0eU1nbXQ6ICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnUHJpb3JpdHlNZ210IjsKKyAgICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbVN0YW5kYXJkQ29tcG9uZW50Um9sZTogICAgICAgICAgIHJldHVybiAiUGFyYW1TdGFuZGFyZENvbXBvbmVudFJvbGUiOworICAgICAgICBjYXNlIE9NWF9JbmRleFBhcmFtUG9ydERlZmluaXRpb246ICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbVBvcnREZWZpbml0aW9uIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUNvbXBCdWZmZXJTdXBwbGllcjogICAgICAgICAgICAgIHJldHVybiAiUGFyYW1Db21wQnVmZmVyU3VwcGxpZXIiOworICAgICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9Qb3J0Rm9ybWF0OiAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvUG9ydEZvcm1hdCI7CisgICAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb1BjbTogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9QY20iOworICAgICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9BYWM6ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvQWFjIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUF1ZGlvUmE6ICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1BdWRpb1JhIjsKKyAgICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUF1ZGlvTXAzOiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1BdWRpb01wMyI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb0FkcGNtOiAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9BZHBjbSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb0c3MjM6ICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9HNzIzIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUF1ZGlvRzcyOTogICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1BdWRpb0c3MjkiOworICAgICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9BbXI6ICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvQW1yIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUF1ZGlvV21hOiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1BdWRpb1dtYSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb1NiYzogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9TYmMiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9NaWRpOiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvTWlkaSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb0dzbV9GUjogICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9Hc21fRlIiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9NaWRpTG9hZFVzZXJTb3VuZDogICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvTWlkaUxvYWRVc2VyU291bmQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9HNzI2OiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvRzcyNiI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb0dzbV9FRlI6ICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9Hc21fRUZSIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUF1ZGlvR3NtX0hSOiAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1BdWRpb0dzbV9IUiI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb1BkY19GUjogICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9QZGNfRlIiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9QZGNfRUZSOiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvUGRjX0VGUiI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb1BkY19IUjogICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9QZGNfSFIiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9UZG1hX0ZSOiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvVGRtYV9GUiI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb1RkbWFfRUZSOiAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9UZG1hX0VGUiI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb1FjZWxwODogICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9RY2VscDgiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQXVkaW9RY2VscDEzOiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUF1ZGlvUWNlbHAxMyI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb0V2cmM6ICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtQXVkaW9FdnJjIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUF1ZGlvU212OiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1BdWRpb1NtdiI7CisgICAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1BdWRpb1ZvcmJpczogICAgICAgICAgICAgICAgICAgICByZXR1c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bmNlOiAgICAgICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0F1ZGlvQmFsYW5jZSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQXVkaW9DaGFubmVsTXV0ZTogICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0F1ZGlvQ2hhbm5lbE11dGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0F1ZGlvTXV0ZTogICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdBdWRpb011dGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0F1ZGlvTG91ZG5lc3M6ICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdBdWRpb0xvdWRuZXNzIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdBdWRpb0VjaG9DYW5jZWxhdGlvbjogICAgICAgICAgIHJldHVybiAiQ29uZmlnQXVkaW9FY2hvQ2FuY2VsYXRpb24iOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0F1ZGlvTm9pc2VSZWR1Y3Rpb246ICAgICAgICAgICAgcmV0dXJuICJDb25maWdBdWRpb05vaXNlUmVkdWN0aW9uIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdBdWRpb0Jhc3M6ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQXVkaW9CYXNzIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdBdWRpb1RyZWJsZTogICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQXVkaW9UcmVibGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0F1ZGlvU3RlcmVvV2lkZW5pbmc6ICAgICAgICAgICAgcmV0dXJuICJDb25maWdBdWRpb1N0ZXJlb1dpZGVuaW5nIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdBdWRpb0Nob3J1czogICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQXVkaW9DaG9ydXMiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0F1ZGlvRXF1YWxpemVyOiAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdBdWRpb0VxdWFsaXplciI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQXVkaW9SZXZlcmJlcmF0aW9uOiAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0F1ZGlvUmV2ZXJiZXJhdGlvbiI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQXVkaW9DaGFubmVsVm9sdW1lOiAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0F1ZGlvQ2hhbm5lbFZvbHVtZSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1JbWFnZVBvcnRGb3JtYXQ6ICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtSW1hZ2VQb3J0Rm9ybWF0IjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUZsYXNoQ29udHJvbDogICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1GbGFzaENvbnRyb2wiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0ZvY3VzQ29udHJvbDogICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdGb2N1c0NvbnRyb2wiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtUUZhY3RvcjogICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbVFGYWN0b3IiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtUXVhbnRpemF0aW9uVGFibGU6ICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbVF1YW50aXphdGlvblRhYmxlIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUh1ZmZtYW5UYWJsZTogICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1IdWZmbWFuVGFibGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0ZsYXNoQ29udHJvbDogICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdGbGFzaENvbnRyb2wiOworICAgICAgICBjYXNlIE9NWF9JbmRleFBhcmFtVmlkZW9Qb3J0Rm9ybWF0OiAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbVZpZGVvUG9ydEZvcm1hdCI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1WaWRlb1F1YW50aXphdGlvbjogICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtVmlkZW9RdWFudGl6YXRpb24iOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtVmlkZW9GYXN0VXBkYXRlOiAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbVZpZGVvRmFzdFVwZGF0ZSI7CisgICAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1WaWRlb0JpdHJhdGU6ICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtVmlkZW9CaXRyYXRlIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbVZpZGVvTW90aW9uVmVjdG9yOiAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1WaWRlb01vdGlvblZlY3RvciI7CisgICAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1WaWRlb0ludHJhUmVmcmVzaDogICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtVmlkZW9JbnRyYVJlZnJlc2giOworICAgICAgICBjYXNlIE9NWF9JbmRleFBhcmFtVmlkZW9FcnJvckNvcnJlY3Rpb246ICAgICAgICAgICAgcmV0dXJuICJQYXJhbVZpZGVvRXJyb3JDb3JyZWN0aW9uIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbVZpZGVvVkJTTUM6ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1WaWRlb1ZCU01DIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbVZpZGVvTXBlZzI6ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1WaWRlb01wZWcyIjsKKyAgICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbVZpZGVvTXBlZzQ6ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1WaWRlb01wZWc0IjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbVZpZGVvV212OiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1WaWRlb1dtdiI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1WaWRlb1J2OiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtVmlkZW9SdiI7CisgICAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1WaWRlb0F2YzogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gIlBhcmFtVmlkZW9BdmMiOworICAgICAgICBjYXNlIE9NWF9JbmRleFBhcmFtVmlkZW9IMjYzOiAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbVZpZGVvSDI2MyI7CisgICAgICAgIGNhc2UgT01YX0luZGV4UGFyYW1WaWRlb1Byb2ZpbGVMZXZlbFF1ZXJ5U3VwcG9ydGVkOgorICAgICAgICAgICAgcmV0dXJuICJQYXJhbVZpZGVvUHJvZmlsZUxldmVsUXVlcnlTdXBwb3J0ZWQiOworICAgICAgICBjYXNlIE9NWF9JbmRleFBhcmFtVmlkZW9Qcm9maWxlTGV2ZWxDdXJyZW50OiAgICAgICAgcmV0dXJuICJQYXJhbVZpZGVvUHJvZmlsZUxldmVsQ3VycmVudCI7CisgICAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnVmlkZW9CaXRyYXRlOiAgICAgICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ1ZpZGVvQml0cmF0ZSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnVmlkZW9GcmFtZXJ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F9JbmRleFBhcmFtQ29tbW9uRGVibG9ja2luZzogICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUNvbW1vbkRlYmxvY2tpbmciOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQ29tbW9uU2Vuc29yTW9kZTogICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUNvbW1vblNlbnNvck1vZGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleFBhcmFtQ29tbW9uSW50ZXJsZWF2ZTogICAgICAgICAgICAgICAgcmV0dXJuICJQYXJhbUNvbW1vbkludGVybGVhdmUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkNvbG9yRm9ybWF0Q29udmVyc2lvbjoKKy8vICAgICAgICAgIHJldHVybiAiQ29uZmlnQ29tbW9uQ29sb3JGb3JtYXRDb252ZXJzaW9uIjsKKyAgICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdDb21tb25TY2FsZTogICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ29tbW9uU2NhbGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkltYWdlRmlsdGVyOiAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25JbWFnZUZpbHRlciI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uQ29sb3JFbmhhbmNlbWVudDogICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vbkNvbG9yRW5oYW5jZW1lbnQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkNvbG9yS2V5OiAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25Db2xvcktleSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uQ29sb3JCbGVuZDogICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vbkNvbG9yQmxlbmQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkZyYW1lU3RhYmlsaXNhdGlvbjogICAgICAgcmV0dXJuICJDb25maWdDb21tb25GcmFtZVN0YWJpbGlzYXRpb24iOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vblJvdGF0ZTogICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25Sb3RhdGUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbk1pcnJvcjogICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25NaXJyb3IiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbk91dHB1dFBvc2l0aW9uOiAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25PdXRwdXRQb3NpdGlvbiI7CisgICAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uSW5wdXRDcm9wOiAgICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vbklucHV0Q3JvcCI7CisgICAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uT3V0cHV0Q3JvcDogICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vbk91dHB1dENyb3AiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkRpZ2l0YWxab29tOiAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25EaWdpdGFsWm9vbSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uT3B0aWNhbFpvb206ICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vbk9wdGljYWxab29tIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdDb21tb25XaGl0ZUJhbGFuY2U6ICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ29tbW9uV2hpdGVCYWxhbmNlIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdDb21tb25FeHBvc3VyZTogICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ29tbW9uRXhwb3N1cmUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkNvbnRyYXN0OiAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25Db250cmFzdCI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uQnJpZ2h0bmVzczogICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vbkJyaWdodG5lc3MiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkJhY2tsaWdodDogICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25CYWNrbGlnaHQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkdhbW1hOiAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25HYW1tYSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uU2F0dXJhdGlvbjogICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vblNhdHVyYXRpb24iOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkxpZ2h0bmVzczogICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25MaWdodG5lc3MiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbkV4Y2x1c2lvblJlY3Q6ICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25FeGNsdXNpb25SZWN0IjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdDb21tb25EaXRoZXJpbmc6ICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ29tbW9uRGl0aGVyaW5nIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdDb21tb25QbGFuZUJsZW5kOiAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ29tbW9uUGxhbmVCbGVuZCI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uRXhwb3N1cmVWYWx1ZTogICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vbkV4cG9zdXJlVmFsdWUiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vbk91dHB1dFNpemU6ICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25PdXRwdXRTaXplIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbUNvbW1vbkV4dHJhUXVhbnREYXRhOiAgICAgICAgICAgIHJldHVybiAiUGFyYW1Db21tb25FeHRyYVF1YW50RGF0YSI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbW9uRm9jdXNSZWdpb246ICAgICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NvbW1vbkZvY3VzUmVnaW9uIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdDb21tb25Gb2N1c1N0YXR1czogICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ29tbW9uRm9jdXNTdGF0dXMiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NvbW1vblRyYW5zaXRpb25FZmZlY3Q6ICAgICAgICAgcmV0dXJuICJDb25maWdDb21tb25UcmFuc2l0aW9uRWZmZWN0IjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhQYXJhbU90aGVyUG9ydEZvcm1hdDogICAgICAgICAgICAgICAgIHJldHVybiAiUGFyYW1PdGhlclBvcnRGb3JtYXQiOworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ090aGVyUG93ZXI6ICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICJDb25maWdPdGhlclBvd2VyIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdPdGhlclN0YXRzOiAgICAgICAgICA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WF9JbmRleENvbmZpZ1RpbWVDbGllbnRTdGFydFRpbWU6ICAgICAgICAgICAgcmV0dXJuICJDb25maWdUaW1lQ2xpZW50U3RhcnRUaW1lIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdUaW1lUG9zaXRpb246ICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnVGltZVBvc2l0aW9uIjsKKy8vICAgICAgY2FzZSBPTVhfSW5kZXhDb25maWdUaW1lU2Vla01vZGU6ICAgICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnVGltZVNlZWtNb2RlIjsKKyAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWY7CisgICAgfQorfQorCisjZW5kaWYgLy8gQVNfU1RSSU5HX0ZPUl9PTVhfSU5ERVhfSAorCisjZW5kaWYgLy8gT01YX0luZGV4X2gKKworI2lmZGVmIE9NWF9JbmRleEV4dF9oCisvKiBhc1N0cmluZyBkZWZpbml0aW9ucyBpZiBtZWRpYS9vcGVubWF4L09NWF9JbmRleEV4dC5oIHdhcyBpbmNsdWRlZCAqLworCisjaWZuZGVmIEFTX1NUUklOR19GT1JfT01YX0lOREVYRVhUX0gKKyNkZWZpbmUgQVNfU1RSSU5HX0ZPUl9PTVhfSU5ERVhFWFRfSAorCitpbmxpbmUgc3RhdGljIGNvbnN0IGNoYXIgKmFzU3RyaW5nKE9NWF9JTkRFWEVYVFRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworLy8gICAgICBjYXNlIE9NWF9JbmRleENvbmZpZ0NhbGxiYWNrUmVxdWVzdDogICAgICAgICAgICByZXR1cm4gIkNvbmZpZ0NhbGxiYWNrUmVxdWVzdCI7CisvLyAgICAgIGNhc2UgT01YX0luZGV4Q29uZmlnQ29tbWl0TW9kZTogICAgICAgICAgICAgICAgIHJldHVybiAiQ29uZmlnQ29tbW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KKyAgICAgICAgY2FzZSBPTVhfVklERU9fQ29kaW5nTVBFRzI6ICAgICAgcmV0dXJuICJNUEVHMiI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0NvZGluZ0gyNjM6ICAgICAgIHJldHVybiAiSDI2MyI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0NvZGluZ01QRUc0OiAgICAgIHJldHVybiAiTVBFRzQiOworICAgICAgICBjYXNlIE9NWF9WSURFT19Db2RpbmdXTVY6ICAgICAgICByZXR1cm4gIldNViI7ICAgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX1ZJREVPX0NvZGluZ1JWOiAgICAgICAgIHJldHVybiAiUlYiOyAgICAgICAgICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfVklERU9fQ29kaW5nQVZDOiAgICAgICAgcmV0dXJuICJBVkMiOworICAgICAgICBjYXNlIE9NWF9WSURFT19Db2RpbmdNSlBFRzogICAgICByZXR1cm4gIk1KUEVHIjsgICAgICAgLy8gdW51c2VkCisgICAgICAgIGNhc2UgT01YX1ZJREVPX0NvZGluZ1ZQODogICAgICAgIHJldHVybiAiVlA4IjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fQ29kaW5nVlA5OiAgICAgICAgcmV0dXJuICJWUDkiOworICAgICAgICBjYXNlIE9NWF9WSURFT19Db2RpbmdIRVZDOiAgICAgICByZXR1cm4gIkhFVkMiOworICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmOworICAgIH0KK30KKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfVklERU9fQ09OVFJPTFJBVEVUWVBFIGksIGNvbnN0IGNoYXIgKmRlZiA9ICI/PyIpIHsKKyAgICBzd2l0Y2ggKGkpIHsKKy8vICAgICAgY2FzZSBPTVhfVmlkZW9fQ29udHJvbFJhdGVEaXNhYmxlOiAgICAgICAgICAgIHJldHVybiAiRGlzYWJsZSI7CisgICAgICAgIGNhc2UgT01YX1ZpZGVvX0NvbnRyb2xSYXRlVmFyaWFibGU6ICAgICAgICAgICByZXR1cm4gIlZhcmlhYmxlIjsKKyAgICAgICAgY2FzZSBPTVhfVmlkZW9fQ29udHJvbFJhdGVDb25zdGFudDogICAgICAgICAgIHJldHVybiAiQ29uc3RhbnQiOworLy8gICAgICBjYXNlIE9NWF9WaWRlb19Db250cm9sUmF0ZVZhcmlhYmxlU2tpcEZyYW1lczogcmV0dXJuICJWYXJpYWJsZVNraXBGcmFtZXMiOworLy8gICAgICBjYXNlIE9NWF9WaWRlb19Db250cm9sUmF0ZUNvbnN0YW50U2tpcEZyYW1lczogcmV0dXJuICJDb25zdGFudFNraXBGcmFtZXMiOworICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlZjsKKyAgICB9Cit9CisKK2lubGluZSBzdGF0aWMgY29uc3QgY2hhciAqYXNTdHJpbmcoT01YX1ZJREVPX0lOVFJBUkVGUkVTSFRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIj8/IikgeworICAgIHN3aXRjaCAoaSkgeworICAgICAgICBjYXNlIE9NWF9WSURFT19JbnRyYVJlZnJlc2hDeWNsaWM6ICAgcmV0dXJuICJDeWNsaWMiOworICAgICAgICBjYXNlIE9NWF9WSURFT19JbnRyYVJlZnJlc2hBZGFwdGl2ZTogcmV0dXJuICJBZGFwdGl2ZSI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0ludHJhUmVmcmVzaEJvdGg6ICAgICByZXR1cm4gIkJvdGgiOworICAgICAgICBkZWZhdWx0OiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlZjsKKyAgICB9Cit9CisKK2lubGluZSBzdGF0aWMgY29uc3QgY2hhciAqYXNTdHJpbmcoT01YX1ZJREVPX0gyNjNQUk9GSUxFVFlQRSBpLCBjb25zdCBjaGFyICpkZWYgPSAiPz8iKSB7CisgICAgc3dpdGNoIChpKSB7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0gyNjNQcm9maWxlQmFzZWxpbmU6ICAgICAgICAgICByZXR1cm4gIkJhc2VsaW5lIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fSDI2M1Byb2ZpbGVIMzIwQ29kaW5nOiAgICAgICAgIHJldHVybiAiSDMyMENvZGluZyI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0gyNjNQcm9maWxlQmFja3dhcmRDb21wYXRpYmxlOiByZXR1cm4gIkJhY2t3YXJkQ29tcGF0aWJsZSI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0gyNjNQcm9maWxlSVNXVjI6ICAgICAgICAgICAgICByZXR1cm4gIklTV1YyIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fSDI2M1Byb2ZpbGVJU1dWMzogICAgICAgICAgICAgIHJldHVybiAiSVNXVjMiOworICAgICAgICBjYXNlIE9NWF9WSURFT19IMjYzUHJvZmlsZUhpZ2hDb21wcmVzc2lvbjogICAgcmV0dXJuICJIaWdoQ29tcHJlc3Npb24iOworICAgICAgICBjYXNlIE9NWF9WSURFT19IMjYzUHJvZmlsZUludGVybmV0OiAgICAgICAgICAgcmV0dXJuICJJbnRlcm5ldCI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0gyNjNQcm9maWxlSW50ZXJsYWNlOiAgICAgICAgICByZXR1cm4gIkludGVybGFjZSI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0gyNjNQcm9maWxlSGlnaExhdGVuY3k6ICAgICAgICByZXR1cm4gIkhpZ2hMYXRlbmN5IjsKKyAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWY7CisgICAgfQorfQorCitpbmxpbmUgc3RhdGljIGNvbnN0IGNoYXIgKmFzU3RyaW5nKE9NWF9WSURFT19IMjYzTEVWRUxUWVBFIGksIGNvbnN0IGNoYXIgKmRl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I7CisvLyAgICAgIGNhc2UgT01YX1ZJREVPX1BpY3R1cmVUeXBlU1A6IHJldHVybiAiU1AiOworLy8gICAgICBjYXNlIE9NWF9WSURFT19QaWN0dXJlVHlwZUVJOiByZXR1cm4gIkVJIjsKKy8vICAgICAgY2FzZSBPTVhfVklERU9fUGljdHVyZVR5cGVFUDogcmV0dXJuICJFUCI7CisvLyAgICAgIGNhc2UgT01YX1ZJREVPX1BpY3R1cmVUeXBlUzogIHJldHVybiAiUyI7CisgICAgICAgIGRlZmF1bHQ6ICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWY7CisgICAgfQorfQorCitpbmxpbmUgc3RhdGljIGNvbnN0IGNoYXIgKmFzU3RyaW5nKE9NWF9WSURFT19NUEVHNFBST0ZJTEVUWVBFIGksIGNvbnN0IGNoYXIgKmRlZiA9ICI/PyIpIHsKKyAgICBzd2l0Y2ggKGkpIHsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fTVBFRzRQcm9maWxlU2ltcGxlOiAgICAgICAgICAgcmV0dXJuICJTaW1wbGUiOworICAgICAgICBjYXNlIE9NWF9WSURFT19NUEVHNFByb2ZpbGVTaW1wbGVTY2FsYWJsZTogICByZXR1cm4gIlNpbXBsZVNjYWxhYmxlIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fTVBFRzRQcm9maWxlQ29yZTogICAgICAgICAgICAgcmV0dXJuICJDb3JlIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fTVBFRzRQcm9maWxlTWFpbjogICAgICAgICAgICAgcmV0dXJuICJNYWluIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fTVBFRzRQcm9maWxlTmJpdDogICAgICAgICAgICAgcmV0dXJuICJOYml0IjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fTVBFRzRQcm9maWxlU2NhbGFibGVUZXh0dXJlOiAgcmV0dXJuICJTY2FsYWJsZVRleHR1cmUiOworICAgICAgICBjYXNlIE9NWF9WSURFT19NUEVHNFByb2ZpbGVTaW1wbGVGYWNlOiAgICAgICByZXR1cm4gIlNpbXBsZUZhY2UiOworICAgICAgICBjYXNlIE9NWF9WSURFT19NUEVHNFByb2ZpbGVTaW1wbGVGQkE6ICAgICAgICByZXR1cm4gIlNpbXBsZUZCQSI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX01QRUc0UHJvZmlsZUJhc2ljQW5pbWF0ZWQ6ICAgIHJldHVybiAiQmFzaWNBbmltYXRlZCI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX01QRUc0UHJvZmlsZUh5YnJpZDogICAgICAgICAgIHJldHVybiAiSHlicmlkIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fTVBFRzRQcm9maWxlQWR2YW5jZWRSZWFsVGltZTogcmV0dXJuICJBZHZhbmNlZFJlYWxUaW1lIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fTVBFRzRQcm9maWxlQ29yZVNjYWxhYmxlOiAgICAgcmV0dXJuICJDb3JlU2NhbGFibGUiOworICAgICAgICBjYXNlIE9NWF9WSURFT19NUEVHNFByb2ZpbGVBZHZhbmNlZENvZGluZzogICByZXR1cm4gIkFkdmFuY2VkQ29kaW5nIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fTVBFRzRQcm9maWxlQWR2YW5jZWRDb3JlOiAgICAgcmV0dXJuICJBZHZhbmNlZENvcmUiOworICAgICAgICBjYXNlIE9NWF9WSURFT19NUEVHNFByb2ZpbGVBZHZhbmNlZFNjYWxhYmxlOiByZXR1cm4gIkFkdmFuY2VkU2NhbGFibGUiOworICAgICAgICBjYXNlIE9NWF9WSURFT19NUEVHNFByb2ZpbGVBZHZhbmNlZFNpbXBsZTogICByZXR1cm4gIkFkdmFuY2VkU2ltcGxlIjsKKyAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGRlZjsKKyAgICB9Cit9CisKK2lubGluZSBzdGF0aWMgY29uc3QgY2hhciAqYXNTdH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VkNQcm9maWxlRXh0ZW5kZWQ6IHJldHVybiAiRXh0ZW5kZWQiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNQcm9maWxlSGlnaDogICAgIHJldHVybiAiSGlnaCI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0FWQ1Byb2ZpbGVIaWdoMTA6ICAgcmV0dXJuICJIaWdoMTAiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNQcm9maWxlSGlnaDQyMjogIHJldHVybiAiSGlnaDQyMiI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0FWQ1Byb2ZpbGVIaWdoNDQ0OiAgcmV0dXJuICJIaWdoNDQ0IjsKKyAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmOworICAgIH0KK30KKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfVklERU9fQVZDTEVWRUxUWVBFIGksIGNvbnN0IGNoYXIgKmRlZiA9ICI/PyIpIHsKKyAgICBzd2l0Y2ggKGkpIHsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fQVZDTGV2ZWwxOiAgcmV0dXJuICJMZXZlbDEiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNMZXZlbDFiOiByZXR1cm4gIkxldmVsMWIiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNMZXZlbDExOiByZXR1cm4gIkxldmVsMTEiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNMZXZlbDEyOiByZXR1cm4gIkxldmVsMTIiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNMZXZlbDEzOiByZXR1cm4gIkxldmVsMTMiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNMZXZlbDI6ICByZXR1cm4gIkxldmVsMiI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0FWQ0xldmVsMjE6IHJldHVybiAiTGV2ZWwyMSI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0FWQ0xldmVsMjI6IHJldHVybiAiTGV2ZWwyMiI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0FWQ0xldmVsMzogIHJldHVybiAiTGV2ZWwzIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fQVZDTGV2ZWwzMTogcmV0dXJuICJMZXZlbDMxIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fQVZDTGV2ZWwzMjogcmV0dXJuICJMZXZlbDMyIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fQVZDTGV2ZWw0OiAgcmV0dXJuICJMZXZlbDQiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNMZXZlbDQxOiByZXR1cm4gIkxldmVsNDEiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNMZXZlbDQyOiByZXR1cm4gIkxldmVsNDIiOworICAgICAgICBjYXNlIE9NWF9WSURFT19BVkNMZXZlbDU6ICByZXR1cm4gIkxldmVsNSI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0FWQ0xldmVsNTE6IHJldHVybiAiTGV2ZWw1MSI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0FWQ0xldmVsNTI6IHJldHVybiAiTGV2ZWw1MiI7CisgICAgICAgIGRlZmF1bHQ6ICAgICAgICAgICAgICAgICAgIHJldHVybiBkZWY7CisgICAgfQorfQorCitpbmxpbmUgc3RhdGljIGNvbnN0IGNoYXIgKmFzU3RyaW5nKE9NWF9WSURFT19BVkNMT09QRklMVEVSVFlQRSBpLCBjb25zdCBjaGFyICpkZWYgPSAiPz8iKSB7CisgICAgc3dpdGNoIChpKSB7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0FWQ0xvb3BGaWx0ZXJFbmFibGU6ICAgICAgICAgICAgICAgcmV0dXJuICJFbmFibGUiOworLy8gICAgICBjYXNlIE9NWF9WSURFT19BVkNMb29wRmlsdGVyRGlzYWJsZTogICAgICAgICAgICAgIHJldHVybiAiRGlzYWJsZSI7CisvLyAgICAg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PRklMRVRZUEUgaSwgY29uc3QgY2hhciAqZGVmID0gIiEhIikgeworICAgIHN3aXRjaCAoaSkgeworICAgICAgICBjYXNlIE9NWF9WSURFT19IRVZDUHJvZmlsZVVua25vd246IHJldHVybiAiVW5rbm93biI7ICAvLyB1bnVzZWQKKyAgICAgICAgY2FzZSBPTVhfVklERU9fSEVWQ1Byb2ZpbGVNYWluOiAgICByZXR1cm4gIk1haW4iOworICAgICAgICBjYXNlIE9NWF9WSURFT19IRVZDUHJvZmlsZU1haW4xMDogIHJldHVybiAiTWFpbjEwIjsKKyAgICAgICAgZGVmYXVsdDogICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZGVmOworICAgIH0KK30KKworaW5saW5lIHN0YXRpYyBjb25zdCBjaGFyICphc1N0cmluZyhPTVhfVklERU9fSEVWQ0xFVkVMVFlQRSBpLCBjb25zdCBjaGFyICpkZWYgPSAiISEiKSB7CisgICAgc3dpdGNoIChpKSB7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0hFVkNMZXZlbFVua25vd246ICAgIHJldHVybiAiTGV2ZWxVbmtub3duIjsgICAgIC8vIHVudXNlZAorICAgICAgICBjYXNlIE9NWF9WSURFT19IRVZDTWFpblRpZXJMZXZlbDE6ICByZXR1cm4gIk1haW5UaWVyTGV2ZWwxIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fSEVWQ0hpZ2hUaWVyTGV2ZWwxOiAgcmV0dXJuICJIaWdoVGllckxldmVsMSI7CisgICAgICAgIGNhc2UgT01YX1ZJREVPX0hFVkNNYWluVGllckxldmVsMjogIHJldHVybiAiTWFpblRpZXJMZXZlbDIiOworICAgICAgICBjYXNlIE9NWF9WSURFT19IRVZDSGlnaFRpZXJMZXZlbDI6ICByZXR1cm4gIkhpZ2hUaWVyTGV2ZWwyIjsKKyAgICAgICAgY2FzZSBPTVhfVklERU9fSEVWQ01haW5UaWVyTGV2ZWwyMTogcmV0dXJuICJNYWluVGllckxldmVsMjEiOworICAgICAg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NWF9TVFJJTkcgY01JTUVUeXBlOyAgICAgICAgICAgIC8qKjwgTUlNRSB0eXBlIG9mIGRhdGEgZm9yIHRoZSBwb3J0ICovCiAgICAgT01YX05BVElWRV9ERVZJQ0VUWVBFIHBOYXRpdmVSZW5kZXI7IC8qKiA8IHBsYXRmb3JtIHNwZWNpZmljIHJlZmVyZW5jZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgYW4gb3V0cHV0IGRldmljZSwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciBhbiBvdXRwdXQgZGV2aWNlLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdGhlcndpc2UgdGhpcyBmaWVsZCBpcyAwICovCi0gICAgT01YX0JPT0wgYkZsYWdFcnJvckNvbmNlYWxtZW50OyAgLyoqPCBUdXJucyBvbiBlcnJvciBjb25jZWFsbWVudCBpZiBpdCBpcyAKKyAgICBPTVhfQk9PTCBiRmxhZ0Vycm9yQ29uY2VhbG1lbnQ7ICAvKio8IFR1cm5zIG9uIGVycm9yIGNvbmNlYWxtZW50IGlmIGl0IGlzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdXBwb3J0ZWQgYnkgdGhlIE9NWCBjb21wb25lbnQgKi8KLSAgICBPTVhfQVVESU9fQ09ESU5HVFlQRSBlRW5jb2Rpbmc7ICAvKio8IFR5cGUgb2YgZGF0YSBleHBlY3RlZCBmb3IgdGhpcyAKKyAgICBPTVhfQVVESU9fQ09ESU5HVFlQRSBlRW5jb2Rpbmc7ICAvKio8IFR5cGUgb2YgZGF0YSBleHBlY3RlZCBmb3IgdGhpcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9ydCAoZS5nLiBQQ00sIEFNUiwgTVAzLCBldGMpICovCiB9IE9NWF9BVURJT19QT1JUREVGSU5JVElPTlRZU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gICAvKio8IFNldCAgYml0cmF0ZSAgbWFuYWdlbWVudCAgbW9kZS4gVGhpcyB0dXJucyBvZmYgdGhlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vcm1hbCBWQlIgZW5jb2RpbmcsIGJ1dCBhbGxvd3MgaGFyZCBvciBzb2Z0IGJpdHJhdGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3RyYWludHMgdG8gYmUgZW5mb3JjZWQgYnkgdGhlIGVuY29kZXIuIFRoaXMgbW9kZSBjYW4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmUgc2xvd2VyLCBhbmQgbWF5IGFsc28gYmUgbG93ZXIgcXVhbGl0eS4gSXQgaXMKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbWFyaWx5IHVzZWZ1bCBmb3Igc3RyZWFtaW5nLiAqLwotICAgIE9NWF9CT09MIGJEb3dubWl4OwkJICAvKio8IERvd25taXggaW5wdXQgZnJvbSBzdGVyZW8gdG8gbW9ubyAoaGFzIG5vIGVmZmVjdCBvbiAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9uLXN0ZXJlbyBzdHJlYW1zKS4gVXNlZnVsIGZvciBsb3dlci1iaXRyYXRlIGVuY29kaW5nLiAqLyAgICAgCisgICAgT01YX0JPT0wgYkRvd25taXg7ICAgICAgICAvKio8IERvd25taXggaW5wdXQgZnJvbSBzdGVyZW8gdG8gbW9ubyAoaGFzIG5vIGVmZmVjdCBvbgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub24tc3RlcmVvIHN0cmVhbXMpLiBVc2VmdWwgZm9yIGxvd2VyLWJpdHJhdGUgZW5jb2RpbmcuICovCiB9IE9NWF9BVURJT19QQVJBTV9WT1JCSVNUWVBFOwogCiAKQEAgLTM2MSw3ICszNjAsNyBAQAogICBPTVhfQVVESU9fV01BRm9ybWF0NywgICAgICAgICAgLyoqPCB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HNzI5VmVuZG9yU3RhcnRVbnVzZWQgPSAweDdGMDAwMDAwLCAvKio8IFJlc2VydmVkIHJlZ2lvbiBmb3IgaW50cm9kdWNpbmcgVmVuZG9yIEV4dGVuc2lvbnMgKi8KICAgICBPTVhfQVVESU9fRzcyOU1heCA9IDB4N0ZGRkZGRkYKIH0gT01YX0FVRElPX0c3MjlUWVBFOwpAQCAtNTQ3LDIzICs1NDYsMjMgQEAKIH0gT01YX0FVRElPX1BBUkFNX0c3MjlUWVBFOwogCiAKLS8qKiBBTVIgRnJhbWUgZm9ybWF0ICovIAotdHlwZWRlZiBlbnVtIE9NWF9BVURJT19BTVJGUkFNRUZPUk1BVFRZUEUgeyAKLSAgICBPTVhfQVVESU9fQU1SRnJhbWVGb3JtYXRDb25mb3JtYW5jZSA9IDAsICAvKio8IEZyYW1lIEZvcm1hdCBpcyBBTVIgQ29uZm9ybWFuY2UgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoU3RhbmRhcmQpIEZvcm1hdCAqLyAKLSAgICBPTVhfQVVESU9fQU1SRnJhbWVGb3JtYXRJRjEsICAgICAgICAgICAgICAvKio8IEZyYW1lIEZvcm1hdCBpcyBBTVIgSW50ZXJmYWNlIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRm9ybWF0IDEgKi8gCi0gICAgT01YX0FVRElPX0FNUkZyYW1lRm9ybWF0SUYyLCAgICAgICAgICAgICAgLyoqPCBGcmFtZSBGb3JtYXQgaXMgQU1SIEludGVyZmFjZSAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZvcm1hdCAyKi8gCi0gICAgT01YX0FVRElPX0FNUkZyYW1lRm9ybWF0RlNGLCAgICAgICAgICAgICAgLyoqPCBGcmFtZSBGb3JtYXQgaXMgQU1SIEZpbGUgU3RvcmFnZSAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZvcm1hdCAqLyAKLSAgICBPTVhfQVVESU9fQU1SRnJhbWVGb3JtYXRSVFBQYXlsb2FkLCAgICAgICAvKio8IEZyYW1lIEZvcm1hdCBpcyBBTVIgUmVhbC1UaW1lIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVHJhbnNwb3J0IFByb3RvY29sIFBheWxvYWQgRm9ybWF0ICovIAotICAgIE9NWF9BVURJT19BTVJGcmFtZUZvcm1hdElUVSwgICAgICAgICAgICAgIC8qKjwgRnJhbWUgRm9ybWF0IGlzIElUVSBGb3JtYXQgKGFkZGVkIGF0IE1vdG9yb2xhIHJlcXVlc3QpICovIAotICAgIE9NWF9BVURJT19BTVJGcmFtZUZvcm1hdEtocm9ub3NFeHRlbnNpb25zID0gMHg2RjAwMDAwMCwgLyoqPCBSZXNlcnZlZCByZWdpb24gZm9yIGludHJvZHVjaW5nIEtocm9ub3MgU3RhbmRhcmQgRXh0ZW5zaW9ucyAqLyAKKy8qKiBBTVIgRnJhbWUgZm9ybWF0ICovCit0eXBlZGVmIGVudW0gT01YX0FVRElPX0FNUkZSQU1FRk9STUFUVFlQRSB7CisgICAgT01YX0FVRElPX0FNUkZyYW1lRm9ybWF0Q29uZm9ybWFuY2UgPSAwLCAgLyoqPCBGcmFtZSBGb3JtYXQgaXMgQU1SIENvbmZvcm1hbmNlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoU3RhbmRhcmQpIEZvcm1hdCAqLworICAgIE9NWF9BVURJT19BTVJGcmFtZUZvcm1hdElGMSwgICAgICAgICAgICAgIC8qKjwgRnJhbWUgRm9ybWF0IGlzIEFNUiBJbnRlcmZhY2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZvcm1hdCAxICovCisgICAgT01YX0FVRElPX0FNUkZyYW1lRm9ybWF0SUYyLCAgICAgICAgICAgICAgLyoqPCBGcmFtZSBGb3JtYXQgaXMgQU1SIEludGVyZmFjZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRm9ybWF0IDIqLworICAgIE9NWF9BVURJT19BTVJGcmFtZUZvcm1hdEZTRiwgICAgICAgICAgICAgIC8qKjwgRnJhbWUgRm9ybWF0IGlzIEFNUiBGaWxlIFN0b3JhZ2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZvcm1hdCAqLworICAgIE9NWF9BVURJT19BTVJGcmFtZUZvcm1hdFJUUFBheWxvYWQsICAgICAgIC8qKjwgRnJhbWUgRm9ybWF0IGlzIEFNUiBSZWFsLVRpbWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRyYW5zcG9ydCBQcm90b2NvbCBQYXlsb2FkIEZvcm1hdCAqLworICAgIE9NWF9BVURJT19BTVJGcmFtZUZvcm1hdElUVSwgICAgICAgICAgICAgIC8qKjwgRnJhbWUgRm9ybWF0IGlzIElUVSBGb3JtYXQgKGFkZGVkIGF0IE1vdG9yb2xhIHJlcXVlc3QpICovCisgICAgT01YX0FVRElPX0FNUkZyYW1lRm9ybWF0S2hyb25vc0V4dGVuc2lvbnMgPSAweDZGMDAwMDAwLCAvKio8IFJlc2VydmVkIHJlZ2lvbiBmb3IgaW50cm9kdWNpbmcgS2hyb25vcyBTdGFuZGFyZCBFeHRlbnNpb25zICovCiAgICAgT01YX0FVRElPX0FNUkZyYW1lRm9ybWF0VmVuZG9yU3RhcnRVbnVzZWQgPSAweDdGMDAwMDAwLCAvKio8IFJlc2VydmVkIHJlZ2lvbiBmb3IgaW50cm9kdWNpbmcgVmVuZG9yIEV4dGVuc2lvbnMgKi8KLSAgICBPTVhfQVVESU9fQU1SRnJhbWVGb3JtYXRNYXggPSAweDdGRkZGRkZGIAotfSBPTVhfQVVESU9fQU1SRlJBTUVGT1JNQVRUWVBFOyAKKyAgICBPTVhfQVVESU9fQU1SRnJhbWVGb3JtYXRNYXggPSAweDdGRkZGRkZGCit9IE9NWF9BVURJT19BTVJGUkFNRUZPUk1BVFRZUEU7CiAKIAogLyoqIEFNUiBiYW5kIG1vZGUgKi8KQEAgLTU3MSw3ICs1NzAsNyBAQAogICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZVVudXNlZCA9IDAsICAgICAgICAgIC8qKjwgQU1STkIgTW9kZSB1bnVzZWQgLyB1bmtub3duICovCiAgICAgT01YX0FVRElPX0FNUkJhbmRNb2RlTkIwLCAgICAgICAgICAgICAgICAgLyoqPCBBTVJOQiBNb2RlIDAgPSAgNDc1MCBicHMgKi8KICAgICBPTVhfQVVESU9fQU1SQmFuZE1vZGVOQjEsICAgICAgICAgICAgICAgICAvKio8IEFNUk5CIE1vZGUgMSA9ICA1MTUwIGJwcyAqLwotICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZU5CMiwgICAgICAgICAgICAgICAgIC8qKjwgQU1STkIgTW9kZSAyID0gIDU5MDAgYnBzICovIAorICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZU5CMiwgICAgICAgICAgICAgICAgIC8qKjwgQU1STkIgTW9kZSAyID0gIDU5MDAgYnBzICovCiAgICAgT01YX0FVRElPX0FNUkJhbmRNb2RlTkIzLCAgICAgICAgICAgICAgICAgLyoqPCBBTVJOQiBNb2RlIDMgPSAgNjcwMCBicHMgKi8KICAgICBPTVhfQVVESU9fQU1SQmFuZE1vZGVOQjQsICAgICAgICAgICAgICAgICAvKio8IEFNUk5CIE1vZGUgNCA9ICA3NDAwIGJwcyAqLwogICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZU5CNSwgICAgICAgICAgICAgICAgIC8qKjwgQU1STkIgTW9kZSA1ID0gIDc5NTAgYnBzICovCkBAIC01NzksMzYgKzU3OCwzNiBAQAogICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZU5CNywgICAgICAgICAgICAgICAgIC8qKjwgQU1STkIgTW9kZSA3ID0gMTIyMDAgYnBzICovCiAgICAgT01YX0FVRElPX0FNUkJhbmRNb2RlV0IwLCAgICAgICAgICAgICAgICAgLyoqPCBBTVJXQiBNb2RlIDAgPSAgNjYwMCBicHMgKi8KICAgICBPTVhfQVVESU9fQU1SQmFuZE1vZGVXQjEsICAgICAgICAgICAgICAgICAvKio8IEFNUldCIE1vZGUgMSA9ICA4ODUwIGJwcyAqLwotICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZVdCMiwgICAgICAgICAgICAgICAgIC8qKjwgQU1SV0IgTW9kZSAyID0gMTI2NTAgYnBzICovIAotICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZVdCMywgICAgICAgICAgICAgICAgIC8qKjwgQU1SV0IgTW9kZSAzID0gMTQyNTAgYnBzICovIAorICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZVdCMiwgICAgICAgICAgICAgICAgIC8qKjwgQU1SV0IgTW9kZSAyID0gMTI2NTAgYnBzICovCisgICAgT01YX0FVRElPX0FNUkJhbmRNb2RlV0IzLCAgICAgICAgICAgICAgICAgLyoqPCBBTVJXQiBNb2RlIDMgPSAxNDI1MCBicHMgKi8KICAgICBPTVhfQVVESU9fQU1SQmFuZE1vZGVXQjQsICAgICAgICAgICAgICAgICAvKio8IEFNUldCIE1vZGUgNCA9IDE1ODUwIGJwcyAqLwogICAgIE9NWF9BVURJT19BTVJCYW5kTW9kZVdCNSwgICAgICAgICAgICAgICAgIC8qKjwgQU1SV0IgTW9kZSA1ID0gMTgyNTAgYnBzICovCiAgICAgT01YX0FVRElPX0FNUkJhbmRNb2RlV0I2LCAgICAgICAgICAgICAgICAgLyoqPCBBTVJXQiBNb2RlIDYgPSAxOTg1MCBicHMgKi8KICAgICBPTVhfQVVESU9fQU1SQmFuZE1vZGVXQjcsICAgICAgICAgICAgICAgICAvKio8IEFNUldCIE1vZGUgNyA9IDIzMDUwIGJwcyAqLwotICAgIE9NWF9BVUR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ICAvKio8IEFNUiBEaXNjb250aW51b3VzIFRyYW5zbWlzc2lvbiBNb2RlIHVzaW5nIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVm9pY2UgQWN0aXZpdHkgRGV0ZWN0b3IgMSAoVkFEMSkgaXMgZW5hYmxlZCAqLyAKLSAgICBPTVhfQVVESU9fQU1SRFRYTW9kZU9uVkFEMiwgICAgICAgICAvKio8IEFNUiBEaXNjb250aW51b3VzIFRyYW5zbWlzc2lvbiBNb2RlIHVzaW5nIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVm9pY2UgQWN0aXZpdHkgRGV0ZWN0b3IgMiAoVkFEMikgaXMgZW5hYmxlZCAqLyAgICAgICAKLSAgICBPTVhfQVVESU9fQU1SRFRYTW9kZU9uQXV0bywgICAgICAgICAvKio8IFRoZSBjb2RlYyB3aWxsIGF1dG9tYXRpY2FsbHkgc2VsZWN0IGJldHdlZW4gCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPZmYsIFZBRDEgb3IgVkFEMiBtb2RlcyAqLyAKKworLyoqIEFNUiBEaXNjb250aW51b3VzIFRyYW5zbWlzc2lvbiBtb2RlICovCit0eXBlZGVmIGVudW0gT01YX0FVRElPX0FNUkRUWE1PREVUWVBFIHsKKyAgICBPTVhfQVVESU9fQU1SRFRYTW9kZU9mZiA9IDAsICAgICAgICAvKio8IEFNUiBEaXNjb250aW51b3VzIFRyYW5zbWlzc2lvbiBNb2RlIGlzIGRpc2FibGVkICovCisgICAgT01YX0FVRElPX0FNUkRUWE1vZGVPblZBRDEsICAgICAgICAgLyoqPCBBTVIgRGlzY29udGludW91cyBUcmFuc21pc3Npb24gTW9kZSB1c2luZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVm9pY2UgQWN0aXZpdHkgRGV0ZWN0b3IgMSAoVkFEMSkgaXMgZW5hYmxlZCAqLwor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BTV9NSURJVFlQRSB7CiAgICAgT01YX1UzMiBuU2l6ZTsgICAgICAgICAgICAgICAgIC8qKjwgc2l6ZSBvZiB0aGUgc3RydWN0dXJlIGluIGJ5dGVzICovCiAgICAgT01YX1ZFUlNJT05UWVBFIG5WZXJzaW9uOyAgICAgIC8qKjwgT01YIHNwZWNpZmljYXRpb24gdmVyc2lvbiBpbmZvcm1hdGlvbiAqLwogICAgIE9NWF9VMzIgblBvcnRJbmRleDsgICAgICAgICAgICAvKio8IHBvcnQgdGhhdCB0aGlzIHN0cnVjdHVyZSBhcHBsaWVzIHRvICovCi0gICAgT01YX1UzMiBuRmlsZVNpemU7ICAgICAgICAgICAgIC8qKjwgc2l6ZSBvZiB0aGUgTUlESSBmaWxlIGluIGJ5dGVzLCB3aGVyZSB0aGUgZW50aXJlIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1JREkgZmlsZSBwYXNzZWQgaW4sIG90aGVyd2lzZSBpZiAweDAsIHRoZSBNSURJIGRhdGEgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXMgbWVyZ2VkIGFuZCBzdHJlYW1lZCAoaW5zdGVhZCBvZiBwYXNzZWQgYXMgYW4gCisgICAgT01YX1UzMiBuRmlsZVNpemU7ICAgICAgICAgICAgIC8qKjwgc2l6ZSBvZiB0aGUgTUlESSBmaWxlIGluIGJ5dGVzLCB3aGVyZSB0aGUgZW50aXJlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTUlESSBmaWxlIHBhc3NlZCBpbiwgb3RoZXJ3aXNlIGlmIDB4MCwgdGhlIE1JREkgZGF0YQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzIG1lcmdlZCBhbmQgc3RyZWFtZWQgKGluc3RlYWQgb2YgcGFzc2VkIGFzIGFuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW50aXJlIE1JREkgZmlsZSkgKi8KLSAgICBPTVhfQlUzMiBzTWF4UG9seXBob255OyAgICAgICAgLyoqPCBTcGVjaWZpZXMgdGhlIG1heGltdW0gc2ltdWx0YW5lb3VzIHBvbHlwaG9uaWMgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9pY2VzLiBBIHZhbHVlIG9mIHplcm8gaW5kaWNhdGVzIHRoYXQgdGhlIGRlZmF1bHQgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9seXBob255IG9mIHRoZSBkZXZpY2UgaXMgdXNlZCAgKi8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKLSAgICBPTVhfQk9PTCBiTG9hZERlZmF1bHRTb3VuZDsgICAgLyoqPCBXaGV0aGVyIHRvIGxvYWQgZGVmYXVsdCBzb3VuZCAKKyAgICBPTVhfQlUzMiBzTWF4UG9seXBob255OyAgICAgICAgLyoqPCBTcGVjaWZpZXMgdGhlIG1heGltdW0gc2ltdWx0YW5lb3VzIHBvbHlwaG9uaWMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2b2ljZXMuIEEgdmFsdWUgb2YgemVybyBpbmRpY2F0ZXMgdGhhdCB0aGUgZGVmYXVsdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvbHlwaG9ueSBvZiB0aGUgZGV2aWNlIGlzIHVzZWQgICovCisgICAgT01YX0JPT0wgYkxvYWREZWZhdWx0U291bmQ7ICAgIC8qKjwgV2hldGhlciB0byBsb2FkIGRlZmF1bHQgc291bmQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYW5rIGF0IGluaXRpYWxpemF0aW9uICovCi0gICAgT01YX0FVRElPX01JRElGT1JNQVRUWVBFIGVNaWRpRm9ybWF0OyAvKio8IFZlcnNpb24gb2YgdGhlIE1JREkgZmlsZSAqLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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gc3RvcmVkIGFzIFEyMi4xMAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZml4ZWQtcG9pbnQgbnVtYmVyIGJhc2VkIG9uIEpTUi0xMzUgcmVxdWlyZW1lbnQgKi8KLSAgICBPTVhfVTMyIG5NYXhQb2x5cGhvbnk7ICAgICAgICAvKio8IFNwZWNpZmllcyB0aGUgbWF4aW11bSBzaW11bHRhbmVvdXMgcG9seXBob25pYyAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvaWNlcy4gQSB2YWx1ZSBvZiB6ZXJvIGluZGljYXRlcyB0aGF0IHRoZSBkZWZhdWx0IAorICAgIE9NWF9VMzIgbk1heFBvbHlwaG9ueTsgICAgICAgIC8qKjwgU3BlY2lmaWVzIHRoZSBtYXhpbXVtIHNpbXVsdGFuZW91cyBwb2x5cGhvbmljCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2b2ljZXMuIEEgdmFsdWUgb2YgemVybyBpbmRpY2F0ZXMgdGhhdCB0aGUgZGVmYXVsdAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9seXBob255IG9mIHRoZSBkZXZpY2UgaXMgdXNlZCAgKi8KICAgICBPTVhfVTMyIG5OdW1SZXBlYXQ7ICAgICAgICAgICAvKio8IE51bWJlciBvZiB0aW1lcyB0byByZXBlYXQgcGxheWJhY2sgKi8KLSAgICBPTVhfVTMyIG5TdG9wVGltZTsgICAgICAgICAgICAvKio8IFRpbWUgaW4gbWlsbGlzZWNvbmRzIHRvIGluZGljYXRlIHdoZW4gcGxheWJhY2sgCisgICAgT01YX1UzMiBuU3RvcFRpbWU7ICAgICAgICAgICAgLyoqPCBUaW1lIGluIG1pbGxpc2Vjb25kcyB0byBpbmRpY2F0ZSB3aGVuIHBsYXliYWNrCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aWxsIHN0b3AgYXV0b21hdGljYWxseS4gIFNldCB0byB6ZXJvIGlmIG5vdCB1c2VkICovCiAgICAgT01YX1UxNiBuQ2hhbm5lbE11dGVNYXNrOyAgICAgLyoqPCAxNiBiaXQgbWFzayBmb3IgY2hhbm5lbCBtdXRlIHN0YXR1cyAqLwogICAgIE9NWF9VMTYgbkNoYW5uZWxTb2xvTWFzazsgICAgIC8qKjwgMTYgYml0IG1hc2sgZm9yIGNoYW5uZWwgc29sbyBzdGF0dXMgKi8KQEAgLTkzOSwyMiArOTM4LDIyIEBACiB9IE9NWF9BVURJT19DT05GSUdfTUlESUNPTlRST0xUWVBFOwogCiAKLS8qKiBNSURJIFBsYXliYWNrIFN0YXRlcyAKKy8qKiBNSURJIFBsYXliYWNrIFN0YXRlcwogICogQGluZ3JvdXAgbWlkaQogICovCiB0eXBlZGVmIGVudW0gT01YX0FVRElPX01JRElQTEFZQkFDS1NUQVRFVFlQRSB7Ci0gIE9NWF9BVURJT19NSURJUGxheUJhY2tTdGF0ZVVua25vd24gPSAwLCAgICAgIC8qKjwgVW5rbm93biBzdGF0ZSBvciBzdGF0ZSBkb2VzIG5vdCBtYXAgdG8gCi0gIAkJCQkJCQkJCQkJCQlvdGhlciBkZWZpbmVkIHN0YXRlcyAqLwotICBPTVhfQVVESU9fTUlESVBsYXlCYWNrU3RhdGVDbG9zZWRFbmdhZ2VkLCAgICAvKio8IE5vIE1JREkgcmVzb3VyY2UgaXMgY3VycmVudGx5IG9wZW4uIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSBNSURJIGVuZ2luZSBpcyBjdXJyZW50bHkgcHJvY2Vzc2luZyAKKyAgT01YX0FVRElPX01JRElQbGF5QmFja1N0YXRlVW5rbm93biA9IDAsICAgICAgLyoqPCBVbmtub3duIHN0YXRlIG9yIHN0YXRlIGRvZXMgbm90IG1hcCB0bworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG90aGVyIGRlZmluZWQgc3RhdGVzICovCisgIE9NWF9BVURJT19NSURJUGxheUJhY2tTdGF0ZUNsb3NlZEVuZ2FnZWQsICAgIC8qKjwgTm8gTUlESSByZXNvdXJjZSBpcyBjdXJyZW50bHkgb3Blbi4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgTUlESSBlbmdpbmUgaXMgY3VycmVudGx5IHByb2Nlc3NpbmcKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNSURJIGV2ZW50cy4gKi8KLSAgT01YX0FVRElPX01JRElQbGF5QmFja1N0YXRlUGFyc2luZywgICAgICAgICAgLyoqPCBBIE1JREkgcmVzb3VyY2UgaXMgb3BlbiBhbmQgaXMgYmVpbmcgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbWVkLiBUaGUgTUlESSBlbmdpbmUgaXMgY3VycmVudGx5IAorICBPTVhfQVVESU9fTUlESVBsYXlCYWNrU3RhdGVQYXJzaW5nLCAgICAgICAgICAvKio8IEEgTUlESSByZXNvdXJjZSBpcyBvcGVuIGFuZCBpcyBiZWluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW1lZC4gVGhlIE1JREkgZW5naW5lIGlzIGN1cnJlbnRseQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2Nlc3NpbmcgTUlESSBldmVudHMuICovCi0gIE9NWF9BVURJT19NSURJUGxheUJhY2tTdGF0ZU9wZW5FbmdhZ2VkLCAgICAgIC8qKjwgQSBNSURJIHJlc291cmNlIGlzIG9wZW4gYW5kIHByaW1lZCBidXQgCisgIE9NWF9BVURJT19NSURJUGxheUJhY2tTdGF0ZU9wZW5FbmdhZ2VkLCAgICAgIC8qKjwgQSBNSURJIHJlc291cmNlIGlzIG9wZW4gYW5kIHByaW1lZCBidXQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub3QgcGxheWluZy4gVGhlIE1JREkgZW5naW5lIGlzIGN1cnJlbnRseQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByb2Nlc3NpbmcgTUlESSBldmVudHMuIFRoZSB0cmFuc2l0aW9uIHRvCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcyBzdGF0ZSBpcyBvbmx5IHBvc3NpYmxlIGZyb20gdGhlIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoaXMgc3RhdGUgaXMgb25seSBwb3NzaWJsZSBmcm9tIHRoZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE9NWF9BVURJT19NSURJUGxheUJhY2tTdGF0ZVBsYXlpbmcgc3RhdGUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hlbiB0aGUgJ3BsYXliYWNrIGhlYWQnIHJlYWNoZXMgdGhlIGVuZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mIG1lZGlhIGRhdGEgb3IgdGhlIHBsYXliYWNrIHN0b3BzIGR1ZQpAQCAtOTY5LDk1ICs5NjgsOTUgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBubyBhdWRpYmxlIE1JREkgY29udGVudCBkdXJpbmcgcGxheWJhY2sKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50bHkuIFRoZSBzaXR1YXRpb24gbWF5IGNoYW5nZSBpZgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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0dXJlIGFwcGxpZXMgdG8gKi8KLSAgICBPTVhfVTE2IG5OdW1UcmFja3M7ICAgICAgICAgLyoqPCBOdW1iZXIgb2YgTUlESSB0cmFja3MgaW4gdGhlIGZpbGUsIHJlYWQgb25seSBmaWVsZC4gCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTk9URTogTWF5IG5vdCByZXR1cm4gYSBtZWFuaW5nZnVsIHZhbHVlIHVudGlsIHRoZSBlbnRpcmUgCisgICAgT01YX1UxNiBuTnVtVHJhY2tzOyAgICAgICAgIC8qKjwgTnVtYmVyIG9mIE1JREkgdHJhY2tzIGluIHRoZSBmaWxlLCByZWFkIG9ubHkgZmllbGQuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTk9URTogTWF5IG5vdCByZXR1cm4gYSBtZWFuaW5nZnVsIHZhbHVlIHVudGlsIHRoZSBlbnRpcmUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlIGlzIHBhcnNlZCBhbmQgYnVmZmVyZWQuICAqLwotICAgIE9NWF9VMzIgbkR1cmF0aW9uOyAgICAgICAgICAvKio8IFRoZSBsZW5ndGggb2YgdGhlIGN1cnJlbnRseSBvcGVuIE1JREkgcmVzb3VyY2UgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4gbWlsbGlzZWNvbmRzLiBOT1RFOiBNYXkgbm90IHJldHVybiBhIG1lYW5pbmdmdWwgdmFsdWUgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW50aWwgdGhlIGVudGlyZSBmaWxlIGlzIHBhcnNlZCBhbmQgYnVmZmVyZWQuICAqLyAgCi0gICAgT01YX1UzMiBuUG9zaXRpb247ICAgICAgICAgIC8qKjwgQ3VycmVudCBQb3NpdGlvbiBvZiB0aGUgTUlESSByZXNvdXJjZSBiZWluZyBwbGF5ZWQgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4gbWlsbGlzZWNvbmRzICovCi0gICAgT01YX0JPT0wgYlZpYnJhOyAgICAgICAgICAgIC8qKjwgRG9lcyBWaWJyYSB0cmFjayBleGlzdD8gTk9URTogTWF5IG5vdCByZXR1cm4gYSBtZWFuaW5nZnVsIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlIHVudGlsIHRoZSBlbnRpcmUgZmlsZSBpcyBwYXJzZWQgYW5kIGJ1ZmZlcmVkLiAqLwotICAgIE9NWF9VMzIgbk51bU1ldGFFdmVudHM7ICAgICAvKio8IFRvdGFsIG51bWJlciBvZiBNSURJIE1ldGEgRXZlbnRzIGluIHRoZSBjdXJyZW50bHkgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BlbiBNSURJIHJlc291cmNlLiBOT1RFOiBNYXkgbm90IHJldHVybiBhIG1lYW5pbmdmdWwgdmFsdWUgCisgICAgT01YX1UzMiBuRHVyYXRpb247ICAgICAgICAgIC8qKjwgVGhlIGxlbmd0aCBvZiB0aGUgY3VycmVudGx5IG9wZW4gTUlESSByZXNvdXJjZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIG1pbGxpc2Vjb25kcy4gTk9URTogTWF5IG5vdCByZXR1cm4gYSBtZWFuaW5nZnVsIHZhbHVlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW50aWwgdGhlIGVudGlyZSBmaWxlIGlzIHBhcnNlZCBhbmQgYnVmZmVyZWQuICAqLwotICAgIE9NWF9VMzIgbk51bUFjdGl2ZVZvaWNlczsgICAvKio8IE51bWJlciBvZiBhY3RpdmUgdm9pY2VzIGluIHRoZSBjdXJyZW50bHkgcGxheWluZyAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNSURJIHJlc291cmNlLiBOT1RFOiBNYXkgbm90IHJldHVybiBhIG1lYW5pbmdmdWwgdmFsdWUgdW50aWwgCisgICAgT01YX1UzMiBuUG9zaXRpb247ICAgICAgICAgIC8qKjwgQ3VycmVudCBQb3NpdGlvbiBvZiB0aGUgTUlESSByZXNvdXJjZSBiZWluZyBwbGF5ZWQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiBtaWxsaXNlY29uZHMgKi8KKyAgICBPTVhfQk9PTCBiVmlicmE7ICAgICAgICAgICAgLyoqPCBEb2VzIFZpYnJhIHRyYWNrIGV4aXN0PyBOT1RFOiBNYXkgbm90IHJldHVybiBhIG1lYW5pbmdmdWwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSB1bnRpbCB0aGUgZW50aXJlIGZpbGUgaXMgcGFyc2VkIGFuZCBidWZmZXJlZC4gKi8KKyAgICBPTVhfVTMyIG5OdW1NZXRhRXZlbnRzOyAgICAgLyoqPCBUb3RhbCBudW1iZXIgb2YgTUlESSBNZXRhIEV2ZW50cyBpbiB0aGUgY3VycmVudGx5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3BlbiBNSURJIHJlc291cmNlLiBOT1RFOiBNYXkgbm90IHJldHVybiBhIG1lYW5pbmdmdWwgdmFsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnRpbCB0aGUgZW50aXJlIGZpbGUgaXMgcGFyc2VkIGFuZCBidWZmZXJlZC4gICovCisgICAgT01YX1UzMiBuTnVtQWN0aXZlVm9pY2VzOyAgIC8qKjwgTnVtYmVyIG9mIGFjdGl2ZSB2b2ljZXMgaW4gdGhlIGN1cnJlbnRseSBwbGF5aW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTUlESSByZXNvdXJjZS4gTk9URTogTWF5IG5vdCByZXR1cm4gYSBtZWFuaW5nZnVsIHZhbHVlIHVudGlsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGVudGlyZSBmaWxlIGlzIHBhcnNlZCBhbmQgYnVmZ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ICAgICBzZXQuICBTZWxlY3QgdGhlIGlucHV0IHBvcnQgdG8gc2V0IAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3QgdGhhdCBwb3J0J3Mgdm9sdW1lLiAgU2VsZWN0IHRoZSAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgcG9ydCB0byBhZGp1c3QgdGhlIG1hc3RlciAKKyAgICBPTVhfVTMyIG5Qb3J0SW5kZXg7ICAgICAgICAgLyoqPCBQb3J0IGluZGV4IGluZGljYXRpbmcgd2hpY2ggcG9ydCB0bworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldC4gIFNlbGVjdCB0aGUgaW5wdXQgcG9ydCB0byBzZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0IHRoYXQgcG9ydCdzIHZvbHVtZS4gIFNlbGVjdCB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgcG9ydCB0byBhZGp1c3QgdGhlIG1hc3RlcgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvbHVtZS4gKi8KLSAgICBPTVhfQk9PTCBiTGluZWFyOyAgICAgICAgICAgLyoqPCBJcyB0aGUgdm9sdW1lIHRvIGJlIHNldCBpbiBsaW5lYXIgKDAuMTAwKSAKKyAgICBPTVhfQk9PTCBiTGluZWFyOyAgICAgICAgICAgLyoqPCBJcyB0aGUgdm9sdW1lIHRvIGJlIHNldCBpbiBsaW5lYXIgKDAuMTAwKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yIGxvZ2FyaXRobWljIHNjYWxlIChtQikgKi8KICAgICBPTVhfQlMzMiBzVm9sdW1lOyAgICAgICAgICAgLyoqPCBWb2x1bWUgbGluZWFyIHNldHRpbmcgaW4gdGhlIDAuLjEwMCByYW5nZSwgT1IKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWb2x1bWUgbG9nYXJpdGhtaWMgc2V0dGluZyBmb3IgdGhpcyBwb3J0LiAgVGhlIHZhbHVlcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciB2b2x1bWUgYXJlIGluIG1CIChtaWxsaWJlbHMgPSAxLzEwMCBkQikgcmVsYXRpdmUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBhIGdhaW4gb2YgMSAoZS5nLiB0aGUgb3V0cHV0IGlzIHRoZSBzYW1lIGFzIHRoZSAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dCBsZXZlbCkuICBWYWx1ZXMgYXJlIGluIG1CIGZyb20gbk1heCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBhIGdhaW4gb2YgMSAoZS5nLiB0aGUgb3V0cHV0IGlzIHRoZSBzYW1lIGFzIHRoZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0IGxldmVsKS4gIFZhbHVlcyBhcmUgaW4gbUIgZnJvbSBuTWF4CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1heGltdW0gdm9sdW1lKSB0byBuTWluIG1CICh0eXBpY2FsbHkgbmVnYXRpdmUpLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNpbmNlIHRoZSB2b2x1bWUgaXMgInZvbHRhZ2UiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kIG5vdCBhICJwb3dlciIsIGl0IHRha2VzIGEgc2V0dGluZyBvZgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC02MDAgbUIgdG8gZGVjcmVhc2UgdGhlIHZvbHVtZSBieSAxLzIuICBJZgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGEgY29tcG9uZW50IGNhbm5vdCBhY2N1cmF0ZWx5IHNldCB0aGUgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSBjb21wb25lbnQgY2Fubm90IGFjY3VyYXRlbHkgc2V0IHRoZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvbHVtZSB0byB0aGUgcmVxdWVzdGVkIHZhbHVlLCBpdCBtdXN0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0IHRoZSB2b2x1bWUgdG8gdGhlIGNsb3Nlc3QgdmFsdWUgQkVMT1cKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgcmVxdWVzdGVkIHZhbHVlLiAgV2hlbiBnZXR0aW5nIHRoZQpAQCAtMTA3MCwyNyArMTA2OSwyNyBAQAogdHlwZWRlZiBzdHJ1Y3QgT01YX0FVRElPX0NPTkZJR19DSEFOTkVMVk9MVU1FVFlQRSB7CiAgICAgT01YX1UzMiBuU2l6ZTsgICAgICAgICAgICAgIC8qKjwgc2l6ZSBvZiB0aGUgc3RydWN0dXJlIGluIGJ5dGVzICovCiAgICAgT01YX1ZFUlNJT05UWVBFIG5WZXJzaW9uOyAgIC8qKjwgT01YIHNwZWNpZmljYXRpb24gdmVyc2lvbiBpbmZvcm1hdGlvbiAqLwotICAgIE9NWF9VMzIgblBvcnRJbmRleDsgICAgICAgICAvKio8IFBvcnQgaW5kZXggaW5kaWNhdGluZyB3aGljaCBwb3J0IHRvIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldC4gIFNlbGVjdCB0aGUgaW5wdXQgcG9ydCB0byBzZXQgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdCB0aGF0IHBvcnQncyB2b2x1bWUuICBTZWxlY3QgdGhlIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCBwb3J0IHRvIGFkanVzdCB0aGUgbWFzdGVyIAorICAgIE9NWF9VMzIgblBvcnRJbmRleDsgICAgICAgICAvKio8IFBvcnQgaW5kZXggaW5kaWNhdGluZyB3aGljaCBwb3J0IHRvCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0LiAgU2VsZWN0IHRoZSBpbnB1dCBwb3J0IHRvIHNldAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3QgdGhhdCBwb3J0J3Mgdm9sdW1lLiAgU2VsZWN0IHRoZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCBwb3J0IHRvIGFkanVzdCB0aGUgbWFzdGVyCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdm9sdW1lLiAqLwotICAgIE9NWF9VMzIgbkNoYW5uZWw7ICAgICAgICAgICAvKio8IGNoYW5uZWwgdG8gc2VsZWN0IGZyb20gMCB0byBOLTEsIAorICAgIE9NWF9VMzIgbkNoYW5uZWw7ICAgICAgICAgICAvKio8IGNoYW5uZWwgdG8gc2VsZWN0IGZyb20gMCB0byBOLTEsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNpbmcgT01YX0FMTCB0byBhcHBseSB2b2x1bWUgc2V0dGluZ3MKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBhbGwgY2hhbm5lbHMgKi8KLSAgICBPTVhfQk9PTCBiTGluZWFyOyAgICAgICAgICAgLyoqPCBJcyB0aGUgdm9sdW1lIHRvIGJlIHNldCBpbiBsaW5lYXIgKDAuMTAwKSBvciAKKyAgICBPTVhfQk9PTCBiTGluZWFyOyAgICAgICAgICAgLyoqPCBJcyB0aGUgdm9sdW1lIHRvIGJlIHNldCBpbiBsaW5lYXIgKDAuMTAwKSBvcgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2FyaXRobWljIHNjYWxlIChtQikgKi8KICAgICBPTVhfQlMzMiBzVm9sdW1lOyAgICAgICAgICAgLyoqPCBWb2x1bWUgbGluZWFyIHNldHRpbmcgaW4gdGhlIDAuLjEwMCByYW5nZSwgT1IKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWb2x1bWUgbG9nYXJpdGhtaWMgc2V0dGluZyBmb3IgdGhpcyBwb3J0LiAgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhlIHZhbHVlcyBmb3Igdm9sdW1lIGFyZSBpbiBtQiAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWb2x1bWUgbG9nYXJpdGhtaWMgc2V0dGluZyBmb3IgdGhpcyBwb3J0LgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSB2YWx1ZXMgZm9yIHZvbHVtZSBhcmUgaW4gbUIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobWlsbGliZWxzID0gMS8xMDAgZEIpIHJlbGF0aXZlIHRvIGEgZ2FpbgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mIDEgKGUuZy4gdGhlIG91dHB1dCBpcyB0aGUgc2FtZSBhcyB0aGUgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5wdXQgbGV2ZWwpLiAgVmFsdWVzIGFyZSBpbiBtQiBmcm9tIG5NYXggCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1heGltdW0gdm9sdW1lKSB0byBuTWluIG1CICh0eXBpY2FsbHkgbmVnYXRpdmUpLiAgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2YgMSAoZS5nLiB0aGUgb3V0cHV0IGlzIHRoZSBzYW1lIGFzIHRoZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlucHV0IGxldmVsKS4gIFZhbHVlcyBhcmUgaW4gbUIgZnJvbSBuTWF4CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG1heGltdW0gdm9sdW1lKSB0byBuTWluIG1CICh0eXBpY2FsbHkgbmVnYXRpdmUpLgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNpbmNlIHRoZSB2b2x1bWUgaXMgInZvbHRhZ2UiCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kIG5vdCBhICJwb3dlciIsIGl0IHRha2VzIGEgc2V0dGluZyBvZgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC02MDAgbUIgdG8gZGVjcmVhc2UgdGhlIHZvbHVtZSBieSAxLzIuICBJZgotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGEgY29tcG9uZW50IGNhbm5vdCBhY2N1cmF0ZWx5IHNldCB0aGUgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSBjb21wb25lbnQgY2Fubm90IGFjY3VyYXRlbHkgc2V0IHRoZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZvbHVtZSB0byB0aGUgcmVxdWVzdGVkIHZhbHVlLCBpdCBtdXN0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0IHRoZSB2b2x1bWUgdG8gdGhlIGNsb3Nlc3QgdmFsdWUgQkVMT1cKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgcmVxdWVzdGVkIHZhbHVlLiAgV2hlbiBnZXR0aW5nIHRoZQpAQCAtMTEwNSwxMiArMTEwNCwxMiBAQAogdHlwZWRlZiBzdHJ1Y3QgT01YX0FVRElPX0NPTkZJR19CQUxBTkNFVFlQRSB7CiAgICAgT01YX1UzMiBuU2l6ZTsgICAgICAgICAgICAgIC8qKjwgc2l6ZSBvZiB0aGUgc3RydWN0dXJlIGluIGJ5dGVzICovCiAgICAgT01YX1ZFUlNJT05UWVBFIG5WZXJzaW9uOyAgIC8qKjwgT01YIHNwZWNpZmljYXRpb24gdmVyc2lvbiBpbmZvcm1hdGlvbiAqLwotICAgIE9NWF9VMzIgblBvcnRJbmRleDsgICAgICAgICAvKio8IFBvcnQgaW5kZXggaW5kaWNhdGluZyB3aGljaCBwb3J0IHRvIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldC4gIFNlbGVjdCB0aGUgaW5wdXQgcG9ydCB0byBzZXQgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdCB0aGF0IHBvcnQncyBiYWxhbmNlLiAgU2VsZWN0IHRoZSAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvdXRwdXQgcG9ydCB0byBhZGp1c3QgdGhlIG1hc3RlciAKKyAgICBPTVhfVTMyIG5Qb3J0SW5kZXg7ICAgICAgICAgLyoqPCBQb3J0IGluZGV4IGluZGljYXRpbmcgd2hpY2ggcG9ydCB0bworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldC4gIFNlbGVjdCB0aGUgaW5wdXQgcG9ydCB0byBzZXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqdXN0IHRoYXQgcG9ydCdzIGJhbGFuY2UuICBTZWxlY3QgdGhlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0IHBvcnQgdG8gYWRqdXN0IHRoZSBtYXN0ZXIKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiYWxhbmNlLiAqLwotICAgIE9NWF9TMzIgbkJhbGFuY2U7ICAgICAgICAgICAvKio8IGJhbGFuY2Ugc2V0dGluZyBmb3IgdGhpcyBwb3J0IAorICAgIE9NWF9TMzIgbkJhbGFuY2U7ICAgICAgICAgICAvKio8IGJhbGFuY2Ugc2V0dGluZyBmb3IgdGhpcyBwb3J0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKC0xMDAgdG8gMTAwLCB3aGVyZSAtMTAwIGluZGljYXRlcwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsbCBsZWZ0LCBhbmQgbm8gcmlnaHQgKi8KIH0gT01YX0FVRElPX0NPTkZJR19CQUxBTkNFVFlQRTsKQEAgLTExMjAsMTAgKzExMTksMTAgQEAKIHR5cGVkZWYgc3RydWN0IE9NWF9BVURJT19DT05GSUdfTVVURVRZUEUgewogICAgIE9NWF9VMzIgblNpemU7ICAgICAgICAgICAgICAvKio8IHNpemUgb2YgdGhlIHN0cnVjdHVyZSBpbiBieXRlcyAqLwogICAgIE9NWF9WRVJTSU9OVFlQRSBuVmVyc2lvbjsgICAvKio8IE9NWCBzcGVjaWZpY2F0aW9uIHZlcnNpb24gaW5mb3JtYXRpb24gKi8KLSAgICBPTVhfVTMyIG5Qb3J0SW5kZXg7ICAgICAgICAgLyoqPCBQb3J0IGluZGV4IGluZGljYXRpbmcgd2hpY2ggcG9ydCB0byAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXQuICBTZWxlY3QgdGhlIGlucHV0IHBvcnQgdG8gc2V0IAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGp1c3QgdGhhdCBwb3J0J3MgbXV0ZS4gIFNlbGVjdCB0aGUgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0IHBvcnQgdG8gYWRqdXN0IHRoZSBtYXN0ZXIgCisgICAgT01YX1UzMiBuUG9ydEluZGV4OyAgICAgICAgIC8qKjwgUG9ydCBpbmRleCBpbmRpY2F0aW5nIHdoaWNoIHBvcnQgdG8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXQuICBTZWxlY3QgdGhlIGlucHV0IHBvcnQgdG8gc2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAganVzdCB0aGF0IHBvcnQncyBtdXRlLiAgU2VsZWN0IHRoZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCBwb3J0IHRvIGFkanVzdCB0aGUgbWFzdGVyCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbXV0ZS4gKi8KICAgICBPTVhfQk9PTCBiTXV0ZTsgICAgICAgICAgICAgLyoqPCBNdXRlIHNldHRpbmcgZm9yIHRoaXMgcG9ydCAqLwogfSBPTVhfQVVESU9fQ09ORklHX01VVEVUWVBFOwpAQCAtMTEzNCwyMCArMTEzMywyMCBAQAogICAgIE9NWF9VMzIgblNpemU7ICAgICAgICAgICAgICAvKio8IHNpemUgb2YgdGhlIHN0cnVjdHVyZSBpbiBieXRlcyAqLwogICAgIE9NWF9WRVJTSU9OVFlQRSBuVmVyc2lvbjsgICAvKio8IE9NWCBzcGVjaWZpY2F0aW9uIHZlcnNpb24gaW5mb3JtYXRpb24gKi8KICAgICBPTVhfVTMyIG5Qb3J0SW5kZXg7ICAgICAgICAgLyoqPCBwb3J0IHRoYXQgdGhpcyBzdHJ1Y3R1cmUgYXBwbGllcyB0byAqLwotICAgIE9NWF9VMzIgbkNoYW5uZWw7ICAgICAgICAgICAvKio8IGNoYW5uZWwgdG8gc2VsZWN0IGZyb20gMCB0byBOLTEsIAorICAgIE9NWF9VMzIgbkNoYW5uZWw7ICAgICAgICAgICAvKio8IGNoYW5uZWwgdG8gc2VsZWN0IGZyb20gMCB0byBOLTEsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNpbmcgT01YX0FMTCB0byBhcHBseSBtdXRlIHNldHRpbmdzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gYWxsIGNoYW5uZWxzICovCiAgICAgT01YX0JPT0wgYk11dGU7ICAgICAgICAgICAgIC8qKjwgTXV0ZSBzZXR0aW5nIGZvciB0aGlzIGNoYW5uZWwgKi8KICAgICBPTVhfQk9PTCBiSXNNSURJOyAgICAgICAgICAgLyoqPCBUUlVFIGlmIG5DaGFubmVsIHJlZmVycyB0byBhIE1JREkgY2hhbm5lbCwKLSAgICAgICA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qPCBJbnRlbnNpdHkgbGV2ZWwgZm9yIHRoZSB3aG9sZSByb29tIGVmZmVjdCAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpLmUuIGJvdGggZWFybHkgcmVmbGVjdGlvbnMgYW5kIGxhdGUgCisgICAgT01YX0JTMzIgc1Jvb21MZXZlbDsgICAgICAgICAgLyoqPCBJbnRlbnNpdHkgbGV2ZWwgZm9yIHRoZSB3aG9sZSByb29tIGVmZmVjdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGkuZS4gYm90aCBlYXJseSByZWZsZWN0aW9ucyBhbmQgbGF0ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV2ZXJiZXJhdGlvbikgaW4gbWlsbGliZWxzICovCiAgICAgT01YX0JTMzIgc1Jvb21IaWdoRnJlcUxldmVsOyAgLyoqPCBBdHRlbnVhdGlvbiBhdCBoaWdoIGZyZXF1ZW5jaWVzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWxhdGl2ZSB0byB0aGUgaW50ZW5zaXR5IGF0IGxvdwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJlcXVlbmNpZXMgaW4gbWlsbGliZWxzICovCiAgICAgT01YX0JTMzIgc1JlZmxlY3Rpb25zTGV2ZWw7ICAgLyoqPCBJbnRlbnNpdHkgbGV2ZWwgb2YgZWFybHkgcmVmbGVjdGlvbnMKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChyZWxhdGl2ZSB0byByb29tIHZhbHVlKSwgaW4gbWlsbGliZWxzICovCi0gICAgT01YX0JVMzIgc1JlZmxlY3Rpb25zRGVsYXk7ICAgLyoqPCBEZWxheSB0aW1lIG9mIHRoZSBmaXJzdCByZWZsZWN0aW9uIHJlbGF0aXZlIAorICAgIE9NWF9CVTMyIHNSZWZsZWN0aW9uc0RlbGF5OyAgIC8qKjwgRGVsYXkgdGltZSBvZiB0aGUgZmlyc3QgcmVmbGVjdGlvbiByZWxhdGl2ZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gdGhlIGRpcmVjdCBwYXRoLCBpbiBtaWxsaXNlY29uZHMgKi8KICAgICBPTVhfQlMzMiBzUmV2ZXJiTGV2ZWw7ICAgICAgICAvKio8IEludGVuc2l0eSBsZXZlbCBvZiBsYXRlIHJldmVyYmVyYXRpb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlbGF0aXZlIHRvIHJvb20gbGV2ZWwsIGluIG1pbGxpYmVscyAqLwotICAgIE9NWF9CVTMyIHNSZXZlcmJEZWxheTsgICAgICAgIC8qKjwgVGltZSBkZWxheSBmcm9tIHRoZSBmaXJzdCBlYXJseSByZWZsZWN0aW9uIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gdGhlIGJlZ2lubmluZyBvZiB0aGUgbGF0ZSByZXZlcmJlcmF0aW9uIAorICAgIE9NWF9CVTMyIHNSZXZlcmJEZWxheTsgICAgICAgIC8qKjwgVGltZSBkZWxheSBmcm9tIHRoZSBmaXJzdCBlYXJseSByZWZsZWN0aW9uCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0byB0aGUgYmVnaW5uaW5nIG9mIHRoZSBsYXRlIHJldmVyYmVyYXRpb24KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlY3Rpb24sIGluIG1pbGxpc2Vjb25kcyAqLwogICAgIE9NWF9CVTMyIHNEZWNheVRpbWU7ICAgICAgICAgIC8qKjwgTGF0ZSByZXZlcmJlcmF0aW9uIGRlY2F5IHRpbWUgYXQgbG93CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcmVxdWVuY2llcywgaW4gbWlsbGlzZWNvbmRzICovCi0gICAgT01YX0JVMzIgbkRlY2F5SGlnaEZyZXFSYXRpb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gICAgLyoqPCBQb3J0IGlzIHBvcHVsYXRlZCB3aXRoIGFsbCBvZiBpdHMgYnVmZmVycyBhcyBpbmRpY2F0ZWQgYnkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuQnVmZmVyQ291bnRBY3R1YWwuIEEgZGlzYWJsZWQgcG9ydCBpcyBhbHdheXMgdW5wb3B1bGF0ZWQuIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5CdWZmZXJDb3VudEFjdHVhbC4gQSBkaXNhYmxlZCBwb3J0IGlzIGFsd2F5cyB1bnBvcHVsYXRlZC4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBbiBlbmFibGVkIHBvcnQgaXMgcG9wdWxhdGVkIG9uIGEgdHJhbnNpdGlvbiB0byBPTVhfU3RhdGVJZGxlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW5kIHVucG9wdWxhdGVkIG9uIGEgdHJhbnNpdGlvbiB0byBsb2FkZWQuICovCiAgICAgT01YX1BPUlRET01BSU5UWVBFIGVEb21haW47ICAgIC8qKjwgRG9tYWluIG9mIHRoZSBwb3J0LiBEZXRlcm1pbmVzIHRoZSBjb250ZW50cyBvZiBtZXRhZGF0YSBiZWxvdy4gKi8KQEAgLTEwMywyNiArMTAzLDI2IEBACiB9IE9NWF9QQVJBTV9QT1JUREVGSU5JVElPTlRZUEU7CiAKIC8qKiBAaW5ncm91cCBjb21wICovCi10eXBlZGVmIHN0cnVjdCBPTVhfUEFSQU1fVTMyVFlQRSB7IAotICAgIE9NWF9VMzIgblNpemU7ICAgICAgICAgICAgICAgICAgICAvKio8IFNpemUgb2YgdGhpcyBzdHJ1Y3R1cmUsIGluIEJ5dGVzICovIAotICAgIE9NWF9WRVJTSU9OVFlQRSBuVmVyc2lvbjsgICAgICAgICAvKio8IE9NWCBzcGVjaWZpY2F0aW9uIHZlcnNpb24gaW5mb3JtYXRpb24gKi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BQYXJhbWV0ZXIgc3BlY2lmeWluZyB0aGUgY29udGVudCB1cmkgdG8gdXNlLiAqLwpAQCAtMTcxLDkgKzE3MSw5IEBACiB0eXBlZGVmIHN0cnVjdCBPTVhfUkVTT1VSQ0VDT05DRUFMTUVOVFRZUEUgewogICAgIE9NWF9VMzIgblNpemU7ICAgICAgICAgICAgIC8qKjwgc2l6ZSBvZiB0aGUgc3RydWN0dXJlIGluIGJ5dGVzICovCiAgICAgT01YX1ZFUlNJT05UWVBFIG5WZXJzaW9uOyAgLyoqPCBPTVggc3BlY2lmaWNhdGlvbiB2ZXJzaW9uIGluZm9ybWF0aW9uICovCi0gICAgT01YX0JPT0wgYlJlc291cmNlQ29uY2VhbG1lbnRGb3JiaWRkZW47IC8qKjwgZGlzYWxsb3cgdGhlIHVzZSBvZiByZXNvdXJjZSBjb25jZWFsbWVudCAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWV0aG9kcyAobGlrZSBkZWdyYWRpbmcgYWxnb3JpdGhtIHF1YWxpdHkgdG8gCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvd2VyIHJlc291cmNlIGNvbnN1bXB0aW9uIG9yIGZ1bmN0aW9uYWwgYnlwYXNzKSAKKyAgICBPTVhfQk9PTCBiUmVzb3VyY2VDb25jZWFsbWVudEZvcmJpZGRlbjsgLyoqPCBkaXNhbGxvdyB0aGUgdXNlIG9mIHJlc291cmNlIGNvbmNlYWxtZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1ldGhvZHMgKGxpa2UgZGVncmFkaW5nIGFsZ29yaXRobSBxdWFsaXR5IHRvCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvd2VyIHJlc291cmNlIGNvbnN1bXB0aW9uIG9yIGZ1bmN0aW9uYWwgYnlwYXNzKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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BDb21wb25lbnRVVUlEKTsKIAotICAgIC8qKiByZWZlciB0byBPTVhfU2VuZENvbW1hbmQgaW4gT01YX2NvcmUuaCBvciB0aGUgT01YIElMIAorICAgIC8qKiByZWZlciB0byBPTVhfU2VuZENvbW1hbmQgaW4gT01YX2NvcmUuaCBvciB0aGUgT01YIElMCiAgICAgICAgIHNwZWNpZmljYXRpb24gZm9yIGRldGFpbHMgb24gdGhlIFNlbmRDb21tYW5kIG1ldGhvZC4KICAgICAgKi8KICAgICBPTVhfRVJST1JUWVBFICgqU2VuZENvbW1hbmQpKApAQCAtMzY3LDQzICszNjcsNDMgQEAKICAgICAgICAgICAgIE9NWF9JTiAgT01YX1UzMiBuUGFyYW0xLAogICAgICAgICAgICAgT01YX0lOICBPTVhfUFRSIHBDbWREYXRhKTsKIAotICAgIC8qKiByZWZlciB0byBPTVhfR2V0UGFyYW1ldGVyIGluIE9NWF9jb3JlLmggb3IgdGhlIE9NWCBJTCAKKyAgICAvKiogcmVmZXIgdG8gT01YX0dldFBhcmFtZXRlciBpbiBPTVhfY29yZS5oIG9yIHRoZSBPTVggSUwKICAgICAgICAgc3BlY2lmaWNhdGlvbiBmb3IgZGV0YWlscyBvbiB0aGUgR2V0UGFyYW1ldGVyIG1ldGhvZC4KICAgICAgKi8KICAgICBPTVhfRVJST1JUWVBFICgqR2V0UGFyYW1ldGVyKSgKLSAgICAgICAgICAgIE9NWF9JTiAgT01YX0hBTkRMRVRZUEUgaENvbXBvbmVudCwgCi0gICAgICAgICAgICBPTVhfSU4gIE9NWF9JTkRFWFRZUEUgblBhcmFtSW5kZXgsICAKKyAgICAgICAgICAgIE9NWF9JTiAgT01YX0hBTkRMRVRZUEUgaENvbXBvbmVudCwKKyAgICAgICAgICAgIE9NWF9JTiAgT01YX0lOREVYVFlQRSBuUGFyYW1JbmRleCwKICAgICAgICAgICAgIE9NWF9JTk9VVCBPTVhfUFRSIHBDb21wb25lbnRQYXJhbWV0ZXJTdHJ1Y3R1cmUpOwogCiAKLSAgICAvKiogcmVmZXIgdG8gT01YX1NldFBhcmFtZXRlciBpbiBPTVhfY29yZS5oIG9yIHRoZSBPTVggSUwgCisgICAgLyoqIHJlZmVyIHRvIE9NWF9TZXRQYXJhbWV0ZXIgaW4gT01YX2NvcmUuaCBvciB0aGUgT01YIElMCiAgICAgICAgIHNwZWNpZmljYXRpb24gZm9yIGRldGFpbHMgb24gdGhlIFNldFBhcmFtZXRlciBtZXRob2QuCiAgICAgICovCiAgICAgT01YX0VSUk9SVFlQRSAoKlNldFBhcmFtZXRlcikoCi0gICAgICAgICAgICBPTVhfSU4gIE9NWF9IQU5ETEVUWVBFIGhDb21wb25lbnQsIAorICAgICAgICAgICAgT01YX0lOICBPTVhfSEFORExFVFlQRSBoQ29tcG9uZW50LAogICAgICAgICAgICAgT01YX0lOICBPTVhfSU5ERVhUWVBFIG5JbmRleCwKICAgICAgICAgICAgIE9NWF9JTiAgT01YX1BUUiBwQ29tcG9uZW50UGFyYW1ldGVyU3RydWN0dXJlKTsKIAogCi0gICAgLyoqIHJlZmVyIHRvIE9NWF9HZXRDb25maWcgaW4gT01YX2NvcmUuaCBvciB0aGUgT01YIElMIAorICAgIC8qKiByZWZlciB0byBPTVhfR2V0Q29uZmlnIGluIE9NWF9jb3JlLmggb3IgdGhlIE9NWCBJTAogICAgICAgICBzcGVjaWZpY2F0aW9uIGZvciBkZXRhaWxzIG9uIHRoZSBHZXRDb25maWcgbWV0aG9kLgogICAgICAqLwogICAgIE9NWF9FUlJPUlRZUEUgKCpHZXRDb25maWcpKAogICAgICAgICAgICAgT01YX0lOICBPTVhfSEFORExFVFlQRSBoQ29tcG9uZW50LAotICAgICAgICAgICAgT01YX0lOICBPTVhfSU5ERVhUWVBFIG5JbmRleCwgCisgICAgICAgICAgICBPTVhfSU4gIE9NWF9JTkRFWFRZUEUgbkluZGV4LAogICAgICAgICAgICAgT01YX0lOT1VUIE9NWF9QVFIgcENvbXBvbmVudENvbmZpZ1N0cnVjdHVyZSk7Ci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hpcyBpcyB0aGUgY29tcG9uZW50IAorICAgICAgICAgICAgSGFuZGxlIG9mIHRoZSBjb21wb25lbnQgdG8gdHVubmVsIHdpdGguICBUaGlzIGlzIHRoZSBjb21wb25lbnQKICAgICAgICAgICAgIGhhbmRsZSByZXR1cm5lZCBieSB0aGUgY2FsbCB0byB0aGUgT01YX0dldEhhbmRsZSBtZXRob2QuICBXaGVuCiAgICAgICAgICAgICB0aGlzIHBhcmFtZXRlciBpcyAweDAgdGhlIGNvbXBvbmVudCBzaG91bGQgc2V0dXAgdGhlIHBvcnQgZm9yCiAgICAgICAgICAgICBjb21tdW5pY2F0aW9uIHdpdGggdGhlIGFwcGxpY2F0aW9uIC8gSUwgQ2xpZW50LgpAQCAtNDg2LDkgKzQ4Niw5IEBACiAgICAgICAgIE9NWF9JTiAgT01YX1UzMiBuUG9ydCwKICAgICAgICAgT01YX0lOICBPTVhfSEFORExFVFlQRSBoVHVubmVsZWRDb21wLAogICAgICAgICBPTVhfSU4gIE9NWF9VMzIgblR1bm5lbGVkUG9ydCwKLSAgICAgICAgT01YX0lOT1VUICBPTVhfVFVOTkVMU0VUVVBUWVBFKiBwVHVubmVsU2V0dXApOyAKKyAgICAgICAgT01YX0lOT1VUICBPTVhfVFVOTkVMU0VUVVBUWVBFKiBwVHVubmVsU2V0dXApOwogCi0gICAgLyoqIHJlZmVyIHRvIE9NWF9Vc2VCdWZmZXIgaW4gT01YX2NvcmUuaCBvciB0aGUgT01YIElMIAorICAgIC8qKiByZWZlciB0byBPTVhfVXNlQnVmZmVyIGluIE9NWF9jb3JlLmggb3IgdGhlIE9NWCBJTAogICAgICAgICBzcGVjaWZpY2F0aW9uIGZvciBkZXRhaWxzIG9uIHRoZSBVc2VCdWZmZXIgbWV0aG9kLgogICAgICAgICBAaW5ncm91cCBidWYKICAgICAgKi8KQEAgLTUwMCw3ICs1MDAsNyBAQAogICAgICAgICAgICAgT01YX0lOIE9NWF9VMzIgblNpemVCeXRlcywKICAgICAgICAgICAg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ZXN0IG51bWJlcgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mIGJ5dGVzIGF2YWlsYWJsZSAqLwotICAgIENQX0NoZWNrQnl0ZXNOb3RSZWFkeSwgICAgICAgICAgICAgIC8qKjwgVGhlIHBpcGUgaXMgc3RpbGwgcmV0cmlldmluZyBieXRlcyAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbmQgcHJlc2VudGx5IGxhY2tzIHN1ZmZpY2llbnQgYnl0ZXMuIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENsaWVudCB3aWxsIGJlIGNhbGxlZCB3aGVuIHRoZXkgYXJlIAorICAgIENQX0NoZWNrQnl0ZXNOb3RSZWFkeSwgICAgICAgICAgICAgIC8qKjwgVGhlIHBpcGUgaXMgc3RpbGwgcmV0cmlldmluZyBieXRlcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCBwcmVzZW50bHkgbGFja3Mgc3VmZmljaWVudCBieXRlcy4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDbGllbnQgd2lsbCBiZSBjYWxsZWQgd2hlbiB0aGV5IGFyZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1ZmZpY2llbnQgYnl0ZXMgYXJlIGF2YWlsYWJsZS4gKi8KLSAgICBDUF9DaGVja0J5dGVzSW5zdWZmaWNpZW50Qnl0ZXMgICwgICAgIC8qKjwgVGhlIHBpcGUgaGFzIHJldHJpZXZlZCBhbGwgYnl0ZXMgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnV0IHRob3NlIGF2YWlsYWJsZSBhcmUgbGVzcyB0aGFuIHRob3NlIAorICAgIENQX0NoZWNrQnl0ZXNJbnN1ZmZpY2llbnRCeXRlcywgICAgIC8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AgICAgYW5kIHRoZSBPTVhfR2V0UGFyYW1ldGVyIG1hY3JvIGFyZSB0aGUgb25seSAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWQgbWFjcm9zIGFsbG93ZWQgdG8gYmUgc2VudCB0byB0aGUgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCB0aGUgT01YX0dldFBhcmFtZXRlciBtYWNybyBhcmUgdGhlIG9ubHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWQgbWFjcm9zIGFsbG93ZWQgdG8gYmUgc2VudCB0byB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50IGluIHRoaXMgc3RhdGUuICovCiAgICAgT01YX1N0YXRlSWRsZSwgICAgICAgIC8qKjwgY29tcG9uZW50IGluaXRpYWxpemF0aW9uIGhhcyBiZWVuIGNvbXBsZXRlZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdWNjZXNzZnVsbHkgYW5kIHRoZSBjb21wb25lbnQgaXMgcmVhZHkgdG8KQEAgLTEyMiwxNyArMTIyLDE3IEBACiAgICAgT01YX1N0YXRlRXhlY3V0aW5nLCAgIC8qKjwgY29tcG9uZW50IGhhcyBhY2NlcHRlZCB0aGUgc3RhcnQgY29tbWFuZCBhbmQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXMgcHJvY2Vzc2luZyBkYXRhIChpZiBkYXRhIGlzIGF2YWlsYWJsZSkgKi8KICAgICBPTVhfU3RhdGVQYXVzZSwgICAgICAgLyoqPCBjb21wb25lbnQgaGFzIHJlY2VpdmVkIHBhdXNlIGNvbW1hbmQgKi8KLSAgICBPTVhfU3RhdGVXYWl0Rm9yUmVzb3VyY2VzLCAvKio8IGNvbXBvbmVudCBpcyB3YWl0aW5nIGZvciByZXNvdXJjZXMsIGVpdGhlciBhZnRlciAKKyAgICBPTVhfU3RhdGVXYWl0Rm9yUmVzb3VyY2VzL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gICAgICAgIC8qKjwgUG9pbnRlciB0byBhY3R1YWwgYmxvY2sgb2YgbWVtb3J5CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhhdCBpcyBhY3RpbmcgYXMgdGhlIGJ1ZmZlciAqLwogICAgIE9NWF9VMzIgbkFsbG9jTGVuOyAgICAgICAgICAvKio8IHNpemUgb2YgdGhlIGJ1ZmZlciBhbGxvY2F0ZWQsIGluIGJ5dGVzICovCi0gICAgT01YX1UzMiBuRmlsbGVkTGVuOyAgICAgICAgIC8qKjwgbnVtYmVyIG9mIGJ5dGVzIGN1cnJlbnRseSBpbiB0aGUgCisgICAgT01YX1UzMiBuRmlsbGVkTGVuOyAgICAgICAgIC8qKjwgbnVtYmVyIG9mIGJ5dGVzIGN1cnJlbnRseSBpbiB0aGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXIgKi8KICAgICBPTVhfVTMyIG5PZmZzZXQ7ICAgICAgICAgICAgLyoqPCBzdGFydCBvZmZzZXQgb2YgdmFsaWQgZGF0YSBpbiBieXRlcyBmcm9tCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHN0YXJ0IG9mIHRoZSBidWZmZXIgKi8KICAgICBPTVhfUFRSIHBBcHBQcml2YXRlOyAgICAgICAgLyoqPCBwb2ludGVyIHRvIGFueSBkYXRhIHRoZSBhcHBsaWNhdGlvbgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhbnRzIHRvIGFzc29jaWF0ZSB3aXRoIHRoaXMgYnVmZmVyICovCiAgICAgT01YX1BUUiBwUGxhdGZvcm1Qcml2YXRlOyAgIC8qKjwgcG9pbnRlciB0byBhbnkgZGF0YSB0aGUgcGxhdGZvcm0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YW50cyB0byBhc3NvY2lhdGUgd2l0aCB0aGlzIGJ1ZmZlciAqLyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YW50cyB0byBhc3NvY2lhdGUgd2l0aCB0aGlzIGJ1ZmZlciAqLwogICAgIE9NWF9QVFIgcElucHV0UG9ydFByaXZhdGU7ICAvKio8IHBvaW50ZXIgdG8gYW55IGRhdGEgdGhlIGlucHV0IHBvcnQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YW50cyB0byBhc3NvY2lhdGUgd2l0aCB0aGlzIGJ1ZmZlciAqLwogICAgIE9NWF9QVFIgcE91dHB1dFBvcnRQcml2YXRlOyAvKio8IHBvaW50ZXIgdG8gYW55IGRhdGEgdGhlIG91dHB1dCBwb3J0CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2FudHMgdG8gYXNzb2NpYXRlIHdpdGggdGhpcyBidWZmZXIgKi8KLSAgICBPTVhfSEFORExFVFlQRSBoTWFya1RhcmdldENvbXBvbmVudDsgLyoqPCBUaGUgY29tcG9uZW50IHRoYXQgd2lsbCBnZW5lcmF0ZSBhIAorICAgIE9NWF9IQU5ETEVUWVBFIGhNYXJrVGFyZ2V0Q29tcG9uZW50OyAvKio8IFRoZSBjb21wb25lbnQgdGhhdCB3aWxsIGdlbmVyYXRlIGEKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXJrIGV2ZW50IHVwb24gcHJvY2Vzc2luZyB0aGlzIGJ1ZmZlci4gKi8KLSAgICBPTVhfUFRSIHBNYXJrRGF0YTsgICAgICAgICAgLyoqPCBBcHBsaWNhdGlvbiBzcGVjaWZpYyBkYXRhIGFzc29jaWF0ZWQgd2l0aCAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbWFyayBzZW50IG9uIGEgbWFyayBldmVudCB0byBkaXNhbWJpZ3VhdGUgCisgICAgT01YX1BUUiBwTWFya0RhdGE7ICAgICAgICAgIC8qKjwgQXBwbGljYXRpb24gc3BlY2lmaWMgZGF0YSBhc3NvY2lhdGVkIHdpdGgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbWFyayBzZW50IG9uIGEgbWFyayBldmVudCB0byBkaXNhbWJpZ3VhdGUKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIG1hcmsgZnJvbSBvdGhlcnMuICovCiAgICAgT01YX1UzMiBuVGlja0NvdW50OyAgICAgICAgIC8qKjwgT3B0aW9uYWwgZW50cnkgdGhhdCB0aGUgY29tcG9uZW50IGFuZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFwcGxpY2F0aW9uIGNhbiB1cGRhdGUgd2l0aCBhIHRpY2sgY291bnQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGVuIHRoZXkgYWNjZXNzIHRoZSBjb21wb25lbnQuICBUaGlzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgc2hvdWxkIGJlIGluIG1pY3Jvc2Vjb25kcy4gIFNpbmNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhpcyBpcyBhIHZhbHVlIHJlbGF0aXZlIHRvIGFuIGFyYml0cmFyeQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0aW5nIHBvaW50LCB0aGlzIHZhbHVlIGNhbm5vdCBiZSB1c2VkIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0aW5nIHBvaW50LCB0aGlzIHZhbHVlIGNhbm5vdCBiZSB1c2VkCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gZGV0ZXJtaW5lIGFic29sdXRlIHRpbWUuICBUaGlzIGlzIGFuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3B0aW9uYWwgZW50cnkgYW5kIG5vdCBhbGwgY29tcG9uZW50cwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpbGwgdXBkYXRlIGl0LiovCi0gT01YX1RJQ0tTIG5UaW1lU3RhbXA7ICAgICAgICAgIC8qKjwgVGltZXN0YW1wIGNvcnJlc3BvbmRpbmcgdG8gdGhlIHNhbXBsZSAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydGluZyBhdCB0aGUgZmlyc3QgbG9naWNhbCBzYW1wbGUgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm91bmRhcnkgaW4gdGhlIGJ1ZmZlci4gVGltZXN0YW1wcyBvZiAKKyBPTVhfVElDS1MgblRpbWVTdGFtcDsgICAgICAgICAgLyoqPCBUaW1lc3RhbXAgY29ycmVzcG9uZGluZyB0byB0aGUgc2FtcGxlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhcnRpbmcgYXQgdGhlIGZpcnN0IGxvZ2ljYWwgc2FtcGxlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm91bmRhcnkgaW4gdGhlIGJ1ZmZlci4gVGltZXN0YW1wcyBvZgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1Y2Nlc3NpdmUgc2FtcGxlcyB3aXRoaW4gdGhlIGJ1ZmZlciBtYXkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZSBpbmZlcnJlZCBieSBhZGRpbmcgdGhlIGR1cmF0aW9uIG9mIHRoZSAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZSBpbmZlcnJlZCBieSBhZGRpbmcgdGhlIGR1cmF0aW9uIG9mIHRoZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mIHRoZSBwcmVjZWRpbmcgYnVmZmVyIHRvIHRoZSB0aW1lc3RhbXAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZiB0aGUgcHJlY2VkaW5nIGJ1ZmZ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IHRoZQogICAgICAgICBjb21wb25lbnQuCiAgICAgQHJldHVybiBPTVhfRVJST1JUWVBFCiAgICAgICAgIElmIHRoZSBjb21tYW5kIHN1Y2Nlc3NmdWxseSBleGVjdXRlcywgdGhlIHJldHVybiBjb2RlIHdpbGwgYmUKICAgICAgICAgT01YX0Vycm9yTm9uZS4gIE90aGVyd2lzZSB0aGUgYXBwcm9wcmlhdGUgT01YIGVycm9yIHdpbGwgYmUgcmV0dXJuZWQuCiAgICAgQGluZ3JvdXAgY29tcAotKi8gICAgICAgIAorKi8KICNkZWZpbmUgT01YX0dldENvbmZpZyggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICAgICAgaENvbXBvbmVudCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICAgICAgbkNvbmZpZ0luZGV4LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTg4NSwxOCArODg1LDE4IEBACiAgICAgICAgIHBDb21wb25lbnRDb25maWdTdHJ1Y3R1cmUpICAgICAgIC8qIE1hY3JvIEVuZCAqLwogCiAKLS8qKiBUaGUgT01YX1NldENvbmZpZyBtYWNybyB3aWxsIHNlbmQgb25lIG9mIHRoZSBjb25maWd1cmF0aW9uIAorLyoqIFRoZSBPTVhfU2V0Q29uZmlnIG1hY3JvIHdpbGwgc2VuZCBvbmUgb2YgdGhlIGNvbmZpZ3VyYXRpb24KICAgICBzdHJ1Y3R1cmVzIHRvIGEgY29tcG9uZW50LiAgRWFjaCBzdHJ1Y3R1cmUgc2hhbGwgYmUgc2VudCBvbmUgYXQgYSB0aW1lLAotICAgIGVhY2ggaW4gYSBzZXBhcmF0ZSBpbnZvY2F0aW9uIG9mIHRoZSBtYWNyby4gIFRoaXMgbWFjcm8gY2FuIGJlIGludm9rZWQgCi0gICAgYW55dGltZSBhZnRlciB0aGUgY29tcG9uZW50IGhhcyBiZWVuIGxvYWRlZC4gIFRoZSBhc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bmRleCAgICAgICAgIDogSW5kaWNhdGVzIHdoaWNoIHBvcnQgdG8gc2V0Ci0gKiAgbkluZGV4ICAgICAgICAgICAgIDogSW5kaWNhdGVzIHRoZSBlbnVtZXJhdGlvbiBpbmRleCBmb3IgdGhlIGZvcm1hdCBmcm9tIAorICogIG5JbmRleCAgICAgICAgICAgICA6IEluZGljYXRlcyB0aGUgZW51bWVyYXRpb24gaW5kZXggZm9yIHRoZSBmb3JtYXQgZnJvbQogICogICAgICAgICAgICAgICAgICAgICAgIDB4MCB0byBOLTEKLSAqICBlQ29tcHJlc3Npb25Gb3JtYXQgOiBDb21wcmVzc2lvbiBmb3JtYXQgdXNlZCBpbiB0aGlzIGluc3RhbmNlIG9mIHRoZSAKLSAqICAgICAgICAgICAgICAgICAgICAgICBjb21wb25lbnQuIFdoZW4gT01YX0lNQUdFX0NvZGluZ1VudXNlZCBpcyBzcGVjaWZpZWQsIAorICogIGVDb21wcmVzc2lvbkZvcm1hdCA6IENvbXByZXNzaW9uIGZvcm1hdCB1c2VkIGluIHRoaXMgaW5zdGFuY2Ugb2YgdGhlCisgKiAgICAgICAgICAgICAgICAgICAgICAgY29tcG9uZW50LiBXaGVuIE9NWF9JTUFHRV9Db2RpbmdVbnVzZWQgaXMgc3BlY2lmaWVkLAogICogICAgICAgICAgICAgICAgICAgICAgIGVDb2xvckZvcm1hdCBpcyB2YWxpZAogICogIGVDb2xvckZvcm1hdCAgICAgICA6IERlY29tcHJlc3NlZCBmb3JtYXQgdXNlZCBieSB0aGlzIGNvbXBvbmVudAogICovCkBAIC0xNjQsOCArMTY0LDggQEAKIH0gT01YX0lNQUdFX1BBUkFNX1BPUlRGT1JNQVRUWVBFOwogCiAKLS8qKiAKLSAqIEZsYXNoIGNvbnRyb2wgdHlwZSAKKy8qKgorICogRmxhc2ggY29udHJvbCB0eXBlCiAgKgogICogRU5VTVMKICAqICBUb3JjaCA6IEZsYXNoIGZvcmNlZCBjb25zdGFudGx5IG9uCkBAIC0xNzcs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gICAgICAgOiBPTVggc3BlY2lmaWNhdGlvbiB2ZXJzaW9uIGluZm9ybWF0aW9uCiAgKiAgblBvcnRJbmRleCAgICAgICAgICAgICAgOiBQb3J0IHRoYXQgdGhpcyBzdHJ1Y3R1cmUgYXBwbGllcyB0bwogICogIGVRdWFudGl6YXRpb25UYWJsZSAgICAgIDogUXVhbnRpemF0aW9uIHRhYmxlIHR5cGUKLSAqICBuUXVhbnRpemF0aW9uTWF0cml4WzY0XSA6IEpQRUcgcXVhbnRpemF0aW9uIHRhYmxlIG9mIGNvZWZmaWNpZW50cyBzdG9yZWQgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiBpbmNyZWFzaW5nIGNvbHVtbnMgdGhlbiBieSByb3dzIG9mIGRhdGEgKGkuZS4gCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICByb3cgMSwgLi4uIHJvdyA4KS4gUXVhbnRpemF0aW9uIHZhbHVlcyBhcmUgaW4gCisgKiAgblF1YW50aXphdGlvbk1hdHJpeFs2NF0gOiBKUEVHIHF1YW50aXphdGlvbiB0YWJsZSBvZiBjb2VmZmljaWVudHMgc3RvcmVkCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiBpbmNyZWFzaW5nIGNvbHVtbnMgdGhlbiBieSByb3dzIG9mIGRhdGEgKGkuZS4KKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJvdyAxLCAuLi4gcm93IDgpLiBRdWFudGl6YXRpb24gdmFsdWVzIGFyZSBpbgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHJhbmdlIDAtMjU1IGFuZCBzdG9yZWQgaW4gbGluZWFyIG9yZGVyCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaS5lLiB0aGUgY29tcG9uZW50IHdpbGwgemlnLXphZyB0aGUgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWFudGl6YXRpb24gdGFibGUgZGF0YSBpZiByZXF1aXJlZCBpb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maWxscyAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICB0aGlzIHJlcXVlc3QuIEEgdmFsdWUgb2YgemVybyBpcyByZXNlcnZlZCBmb3IgdGltZSBzY2FsZSAKKyAgICBPTVhfUFRSIHBDbGllbnRQcml2YXRlOyAgICAgLyoqPCBDbGllbnQgcHJpdmF0ZSBkYXRhIHRvIGRpc2FiaWd1YXRlIHRoaXMgbWVkaWEgdGltZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiAgIGZyb20gb3RoZXJzIChlLmcuIHRoZSBudW1iZXIgb2YgdGhlIGZyYW1lIHRvIGRlbGl2ZXIpLgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiAgIER1cGxpY2F0ZWQgaW4gdGhlIG1lZGlhIHRpbWUgc3RydWN0dXJlIHRoYXQgZnVsZmlsbHMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICB0aGlzIHJlcXVlc3QuIEEgdmFsdWUgb2YgemVybyBpcyByZXNlcnZlZCBmb3IgdGltZSBzY2FsZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiAgIHVwZGF0ZXMuICovCi0gICAgT01YX1RJQ0tTIG5NZWRpYVRpbWVzdGFtcDsgIC8qKjwgTWVkaWEgdGltZXN0YW1wIHJlcXVlc3RlZC4qLyAKKyAgICBPTVhfVElDS1Mgbk1lZGlhVGltZXN0YW1wOyAgLyoqPCBNZWRpYSB0aW1lc3RhbXAgcmVxdWVzdGVkLiovCiAgICAgT01YX1RJQ0tTIG5PZmZzZXQ7ICAgICAgICAgIC8qKjwgQW1vdW50IG9mIHdhbGwgY2xvY2sgdGltZSBieSB3aGljaCB0aGlzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqICAgcmVxdWVzdCBzaG91bGQgYmUgZnVsZmlsbGVkIGVhcmx5ICovCiB9IE9NWF9USU1FX0NPTkZJR19NRURJQVRJTUVSRVFVRVNUVFlQRTs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pYSB0aW1lIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICBmcm9tIG90aGVycy4gQ29waWVkIGZyb20gdGhlIG1lZGlhIHRpbWUgcmVxdWVzdC4gCisgICAgT01YX1UzMiBuQ2xpZW50UHJpdmF0ZTsgICAgICAgICAvKio8IENsaWVudCBwcml2YXRlIGRhdGEgdG8gZGlzYWJpZ3VhdGUgdGhpcyBtZWRpYSB0aW1lCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiAgIGZyb20gb3RoZXJzLiBDb3BpZWQgZnJvbSB0aGUgbWVkaWEgdGltZSByZXF1ZXN0LgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICBBIHZhbHVlIG9mIHplcm8gaXMgcmVzZXJ2ZWQgZm9yIHRpbWUgc2NhbGUgdXBkYXRlcy4gKi8KICAgICBPTVhfVElNRV9VUERBVEVUWVBFIGVVcGRhdGVUeXBlOyAvKio8IFJlYXNvbiBmb3IgdGhlIHVwZGF0ZSAqLwotICAgIE9NWF9USUNLUyBuTWVkaWFUaW1lc3RhbXA7ICAgICAgLyoqPCBNZWRpYSB0aW1lIHJlcXVlc3RlZC4gSWYgbm8gbWVkaWEgdGltZSB3YXMgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiAgIHJlcXVlc3RlZCB0aGVuIHRoaXMgaXMgdGhlIGN1cnJlbnQgbWVkaWEgdGltZS4gKi8gCisgICAgT01YX1RJQ0tTIG5NZWRpYVRpbWVzdGFtcDsgICAgICAvKio8IE1lZGlhIHRpbWUgcmVxdWVzdGVkLiBJZiBubyBtZWRpYSB0aW1lIHdhcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogICByZXF1ZXN0ZWQgdGhlbiB0aGlzIGlzIHRoZSBjdXJyZW50IG1lZGlhIHRpbWUuICovCiAgICAgT01YX1RJQ0tTIG5PZmZzZXQ7ICAgICAgICAgICAgICAvKio8IEFtb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tTVEFURSBlU3RhdGU7IC8qKjwgU3RhdGUgb2YgdGhlIG1lZGlhIHRpbWUuICovCiAgICAgT01YX1RJQ0tTIG5TdGFydFRpbWU7ICAgICAgIC8qKjwgU3RhcnQgdGltZSBvZiB0aGUgbWVkaWEgdGltZS4gKi8KLSAgICBPTVhfVElDS1Mgbk9mZnNldDsgICAgICAgICAgLyoqPCBUaW1lIHRvIG9mZnNldCB0aGUgbWVkaWEgdGltZSBieSAKKyAgICBPTVhfVElDS1Mgbk9mZnNldDsgICAgICAgICAgLyoqPCBUaW1lIHRvIG9mZnNldCB0aGUgbWVkaWEgdGltZSBieQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiAoZS5nLiBwcmVyb2xsKS4gTWVkaWEgdGltZSB3aWxsIGJlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHJlcG9ydGVkIHRvIGJlIG5PZmZzZXQgdGlja3MgZWFybGllci4gICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiByZXBvcnRlZCB0byBiZSBuT2Zmc2V0IHRpY2tzIGVhcmxpZXIuCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgIE9NWF9VMzIgbldhaXRNYXNrOyAgICAgICAgICAvKio8IE1hc2sgb2YgT01YX0NMT0NLUE9SVCB2YWx1ZXMuICovCiB9IE9NWF9USU1FX0NPTkZJR19DTE9DS1NUQVRFVFlQRTsKIAogLyoqIFN0cnVjdHVyZSByZXByZXNlbnRpbmcgdGhlIHJlZmVyZW5jZSBjbG9jayBjdXJyZW50bHkgYmVpbmcgdXNlZCB0bwotICogIGNvbXB1dGUgbWVkaWEgdGltZS4gSUwgY2xpZW50IHVzZXMgdGhpcyBjb25maWcgdG8gY2hhbmdlIG9yIHF1ZXJ5IHRoZSAKKyAqICBjb21wdXRlIG1lZGlhIHRpbWUuIElMIGNsaWVudCB1c2VzIHRoaXMgY29uZmlnIHRvIGNoYW5nZSBvciBxdW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XQgdmFsdWUgaW50ZXJuYWxseSBidXQgcmlzayBsb3NzIG9mIHByZWNpc2lvbi4gIAorICAqICBJbXBsZW1lbnRhdGlvbnMgd2l0aCBsaW1pdGVkIHByZWNpc2lvbiBtYXkgY29udmVydCB0aGUgc2lnbmVkIDY0IGJpdCB2YWx1ZSB0bworICAqICBhIHNpZ25lZCAzMiBiaXQgdmFsdWUgaW50ZXJuYWxseSBidXQgcmlzayBsb3NzIG9mIHByZWNpc2lvbi4KICAgKi8KICNpZm5kZWYgT01YX1NLSVA2NEJJVAogdHlwZWRlZiBPTVhfUzY0IE9NWF9USUNLUzsKQEAgLTMzNiwxNyArMzM2LDE3IEBACiAKIHR5cGVkZWYgc3RydWN0IE9NWF9NQVJLVFlQRQogewotICAgIE9NWF9IQU5ETEVUWVBFIGhNYXJrVGFyZ2V0Q29tcG9uZW50OyAgIC8qKjwgVGhlIGNvbXBvbmVudCB0aGF0IHdpbGwgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZW5lcmF0ZSBhIG1hcmsgZXZlbnQgdXBvbiAKKyAgICBPTVhfSEFORExFVFlQRSBoTWFya1RhcmdldENvbXBvbmVudDsgICAvKio8IFRoZSBjb21wb25lbnQgdGhhdCB3aWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnZW5lcmF0ZSBhIG1hcmsgZXZlbnQgdXBvbgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2Vzc2luZyB0aGUgbWFyay4gKi8KLSAgICBPTVhfUFRSIHBNYXJrRGF0YTsgICAvKio8IEFwcGxpY2F0aW9uIHNwZWNpZmljIGRhdGEgYXNzb2NpYXRlZCB3aXRoIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIG1hcmsgc2VudCBvbiBhIG1hcmsgZXZlbnQgdG8gZGlzYW1iaWd1YXRlIAorICAgIE9NWF9QVF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aWZpYyByZWZlcmVuY2UgZm9yIGEgZGlzcGxheSBpZiBhIAorICogIHBOYXRpdmVSZW5kZXIgICAgICAgICA6IFBsYXRmb3JtIHNwZWNpZmljIHJlZmVyZW5jZSBmb3IgYSBkaXNwbGF5IGlmIGEKICAqICAgICAgICAgICAgICAgICAgICAgICAgICBzeW5jLCBvdGhlcndpc2UgdGhpcyBmaWVsZCBpcyAwCi0gKiAgbkZyYW1lV2lkdGggICAgICAgICAgIDogV2lkdGggb2YgZnJhbWUgdG8gYmUgdXNlZCBvbiBjaGFubmVsIGlmIAorICogIG5GcmFtZVdpZHRoICAgICAgICAgICA6IFdpZHRoIG9mIGZyYW1lIHRvIGJlIHVzZWQgb24gY2hhbm5lbCBpZgogICogICAgICAgICAgICAgICAgICAgICAgICAgIHVuY29tcHJlc3NlZCBmb3JtYXQgaXMgdXNlZC4gIFVzZSAwIGZvciB1bmtub3duLAogICogICAgICAgICAgICAgICAgICAgICAgICAgIGRvbid0IGNhcmUgb3IgdmFyaWFibGUKLSAqICBuRnJhbWVIZWlnaHQgICAgICAgICAgOiBIZWlnaHQgb2YgZnJhbWUgdG8gYmUgdXNlZCBvbiBjaGFubmVsIGlmIAorICogIG5GcmFtZUhlaWdodCAgICAgICAgICA6IEhlaWdodCBvZiBmcmFtZSB0byBiZSB1c2VkIG9uIGNoYW5uZWwgaWYKICAqICAgICAgICAgICAgICAgICAgICAgICAgICB1bmNvbXByZXNzZWQgZm9ybWF0IGlzIHVzZWQuIFVzZSAwIGZvciB1bmtub3duLAogICogICAgICAgICAgICAgICAgICAgICAgICAgIGRvbid0IGNhcmUgb3IgdmFyaWFibGUKLSAqICBuU3RyaWRlICAgICAgICAgICAgICAgOiBOdW1iZXIgb2YgYnl0ZXMgcGVyIHNwYW4gb2YgYW4gaW1hZ2UgCisgKiAgblN0cmlkZSAgICAgICAgICAgICAgIDogTnVtYmVyIG9mIGJ5dGVzIHBlciBzcGFuIG9mIGFuIGltYWdlCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgKGkuZS4gaW5kaWNhdGVzIHRoZSBudW1iZXIgb2YgYnl0ZXMgdG8gZ2V0CiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgZnJvbSBzcGFuIE4gdG8gc3BhbiBOKzEsIHdoZXJlIG5lZ2F0aXZlIHN0cmlkZQogICogICAgICAgICAgICAgICAgICAgICAgICAgIGluZGljYXRlcyB0aGUgaW1hZ2UgaXMgYm90dG9tIHVwCiAgKiAgblNsaWNlSGVpZ2h0ICAgICAgICAgIDogSGVpZ2h0IHVzZWQgd2hlbiBlbmNvZGluZyBpbiBzbGljZXMKLSAqICBuQml0cmF0ZSAgICAgICAgICAgICAgOiBCaXQgcmF0ZSBvZiBmcmFtZSB0byBiZSB1c2VkIG9uIGNoYW5uZWwgaWYgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcHJlc3NlZCBmb3JtYXQgaXMgdXNlZC4gVXNlIDAgZm9yIHVua25vd24sIAorICogIG5CaXRyYXRlICAgICAgICAgICAgICA6IEJpdCByYXRlIG9mIGZyYW1lIHRvIGJlIHVzZWQgb24gY2hhbm5lbCBpZgorICogICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXByZXNzZWQgZm9ybWF0IGlzIHVzZWQuIFVzZSAwIGZvciB1bmtub3duLAogICogICAgICAgICAgICAgICAgICAgICAgICAgIGRvbid0IGNhcmUgb3IgdmFyaWFibGUKLSAqICB4RnJhbWVyYXRlICAgICAgICAgICAgOiBGcmFtZSByYXRlIHRvIGJlIHVzZWQgb24gY2hhbm5lbCBpZiB1bmNvbXByZXNzZWQgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0IGlzIHVzZWQuIFVzZSAwIGZvciB1bmtub3duLCBkb24ndCBjYXJlIG9yIAorICogIHhGcmFtZXJhdGUgICAgICAgICAgICA6IEZyYW1lIHJhdGUgdG8gYmUgdXNlZCBvbiBjaGFubmVsIGlmIHVuY29tcHJlc3NlZAorICogICAgICAg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cGVjaWZpZXMgdGhlIG51bWJlciBvZiBNQnMgdG8gYmUgcmVmcmVzaGVkIGZyb20gbkZpcnN0R09CCiAgKiAgICAgICAgICAgICAgIGFuZCBuRmlyc3RNQgogICovCiB0eXBlZGVmIHN0cnVjdCBPTVhfVklERU9fUEFSQU1fVklERU9GQVNUVVBEQVRFVFlQRSB7Ci0gICAgT01YX1UzMiBuU2l6ZTsgICAgICAgICAgICAKLSAgICBPTVhfVkVSU0lPTlRZUEUgblZlcnNpb247IAotICAgIE9NWF9VMzIgblBvcnRJbmRleDsgICAgICAgCi0gICAgT01YX0JPT0wgYkVuYWJsZVZGVTsgICAgICAKLSAgICBPTVhfVTMyIG5GaXJzdEdPQjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi0gICAgT01YX1UzMiBuRmlyc3RNQjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi0gICAgT01YX1UzMiBuTnVtTUJzOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyAgICBPTVhfVTMyIG5TaXplOworICAgIE9NWF9WRVJTSU9OVFlQRSBuVmVyc2lvbjsKKyAgICBPTVhfVTMyIG5Qb3J0SW5kZXg7CisgICAgT01YX0JPT0wgYkVuYWJsZVZGVTsKKyAgICBPTVhfVTMyIG5GaXJzdEdPQjsKKyAgICBPTVhfVTMyIG5GaXJzdE1COworICAgIE9NWF9VMzIgbk51bU1CczsKIH0gT01YX1ZJREVPX1BBUkFNX1ZJREVPRkFTVFVQREFURVRZUEU7CiAKIAotLyoqIAotICogRW51bWVyYXRpb24gb2YgcG9zc2libGUgYml0cmF0ZSBjb250cm9sIHR5cGVzIAorLyoqCisgKiBFbnVtZXJhdGlvbiBvZiBwb3NzaWJsZSBiaXRyYXRlIGNvbnRyb2wgdHlwZXMKICAqLwogdHlwZWRlZiBlbnVtIE9NWF9WSURFT19DT05UUk9MUkFURVRZUEUgewogICAgIE9NWF9WaWRlb19Db250cm9sUmF0ZURpc2FibGUsCkBAIC0yMzks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lcmZvcm1hbmNlIGJvdW5kcyBhbmQgZGlmZmVyZW50IGFubmV4ZXMuCiAgKgogICogRU5VTVM6Ci0gKiAgQmFzZWxpbmUgICAgICAgICAgIDogQmFzZWxpbmUgUHJvZmlsZTogSC4yNjMgKFYxKSwgbm8gb3B0aW9uYWwgbW9kZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCi0gKiAgSDMyMCBDb2RpbmcgICAgICAgIDogSC4zMjAgQ29kaW5nIEVmZmljaWVuY3kgQmFja3dhcmQgQ29tcGF0aWJpbGl0eSAKKyAqICBCYXNlbGluZSAgICAgICAgICAgOiBCYXNlbGluZSBQcm9maWxlOiBILjI2MyAoVjEpLCBubyBvcHRpb25hbCBtb2RlcworICogIEgzMjAgQ29kaW5nICAgICAgICA6IEguMzIwIENvZGluZyBFZmZpY2llbmN5IEJhY2t3YXJkIENvbXBhdGliaWxpdHkKICAqICAgICAgICAgICAgICAgICAgICAgICBQcm9maWxlOiBILjI2MysgKFYyKSwgaW5jbHVkZXMgYW5uZXhlcyBJLCBKLCBMLjQKICAqICAgICAgICAgICAgICAgICAgICAgICBhbmQgVAotICogIEJhY2t3YXJkQ29tcGF0aWJsZSA6IEJhY2t3YXJkIENvbXBhdGliaWxpdHkgUHJvZmlsZTogSC4yNjMgKFYxKSwgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgaW5jbHVkZXMgYW5uZXggRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAotICogIElTV1YyICAgICAgICAgICAgICA6IEludGVyYWN0aXZlIFN0cmVhbWluZyBXaXJlbGVzcyBQcm9maWxlOiBILjI2MysgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgKFYyKSwgaW5jbHVkZXMgYW5uZXhlcyBJLCBKLCBLIGFuZCBUICAgICAgICAgICAgICAgICAKLSAqICBJU1dWMyAgICAgICAgICAgICAgOiBJbnRlcmFjdGl2ZSBTdHJlYW1pbmcgV2lyZWxlc3MgUHJvZmlsZTogSC4yNjMrKyAgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgKFYzKSwgaW5jbHVkZXMgcHJvZmlsZSAzIGFuZCBhbm5leGVzIFYgYW5kIFcuNi4zLjggICAKLSAqICBIaWdoQ29tcHJlc3Npb24gICAgOiBDb252ZXJzYXRpb25hbCBIaWdoIENvbXByZXNzaW9uIFByb2ZpbGU6IEguMjYzKysgIAotICogICAgICAgICAgICAgICAgICAgICAgIChWMyksIGluY2x1ZGVzIHByb2ZpbGVzIDEgJiAyIGFuZCBhbm5leGVzIEQgYW5kIFUgICAKLSAqICBJbnRlcm5ldCAgICAgICAgICAgOiBDb252ZXJzYXRpb25hbCBJbnRlcm5ldCBQcm9maWxlOiBILjI2MysrIChWMyksICAKLSAqICAgICAgICAgICAgICAgICAgICAgICBpbmNsdWRlcyBwcm9maWxlIDUgYW5kIGFubmV4IEsgICAgICAgICAgICAgICAgICAgICAgIAotICogIEludGVybGFjZSAgICAgICAgICA6IENvbnZlcnNhdGlvbmFsIEludGVybGFjZSBQcm9maWxlOiBILjI2MysrIChWMyksICAKLSAqICAgICAgICAgICAgICAgICAgICAgICBpbmNsdWRlcyBwcm9maWxlIDUgYW5kIGFubmV4IFcuNi4zLjExICAgICAgICAgICAgICAgCi0gKiAgSGlnaExhdGVuY3kgICAgICAgIDogSGlnaCBMYXRlbmN5IFByb2ZpbGU6IEguMjYzKysgKFYzKSwgaW5jbHVkZXMgIAotICogICAgICAgICAgICAgICAgICAgICAgIHByb2ZpbGUgNiBhbmQgYW5uZXhlcyBPLjEgYW5kIFAuNSAgICAgICAgICAgICAgICAgICAgICAgCisgKiAgQmFja3dhcmRDb21wYXRpYmxlIDogQmFja3dhcmQgQ29tcGF0aWJpbGl0eSBQcm9maWxlOiBILjI2MyAoVjEpLAorICogICAgICAgICAgICAgICAgICAgICAgIGluY2x1ZGVzIGFubmV4IEYKKyAqICBJU1dWMiAgICAgICAgICAgICAgOiBJbnRlcmFjdGl2ZSBTdHJlYW1pbmcgV2lyZWxlc3MgUHJvZmlsZTogSC4yNjMrCisgKiAgICAgICAgICAgICAgICAgICAgICAgKFYyKSwgaW5jbHVkZXMgYW5uZXhlcyBJLCBKLCBLIGFuZCBUCisgKiAgSVNXVjMgICAgICAgICAgICAgIDogSW50ZXJhY3RpdmUgU3RyZWFtaW5nIFdpcmVsZXNzIFByb2ZpbGU6IEguMjYzKysKKyAqICAgICAgICAgICAgICAgICAgICAgICAoVjMpLCBpbmNsdWRlcyBwcm9maWxlIDMgYW5kIGFubmV4ZXMgViBhbmQgVy42LjMuOAorICogIEhpZ2hDb21wcmVzc2lvbiAgICA6IENvbnZlcnNhdGlvbmFsIEhpZ2ggQ29tcHJlc3Npb24gUHJvZmlsZTogSC4yNjMrKworICogICAgICAgICAgICAgICAgICAgICAgIChWMyksIGluY2x1ZGVzIHByb2ZpbGVzIDEgJiAyIGFuZCBhbm5leGVzIEQgYW5kIFUKKyAqICBJbnRlcm5ldCAgICAgICAgICAgOiBDb252ZXJzYXRpb25hbCBJbnRlcm5ldCBQcm9maWxlOiBILjI2MysrIChWMyksCisgKiAgICAgICAgICAgICAgICAgICAgICAgaW5jbHVkZXMgcHJvZmlsZSA1IGFuZCBhbm5leCBLCisgKiAgSW50ZXJsYWNlICAgICAgICAgIDogQ29udmVyc2F0aW9uYWwgSW50ZXJsYWNlIFByb2ZpbGU6IEguMjYzKysgKFYzKSwKKyAqICAgICAgICAgICAgICAgICAgICAgICBpbmNsdWRlcyBwcm9maWxlIDUgYW5kIGFubmV4IFcuNi4zLjExCisgKiAgSGlnaExhdGVuY3kgICAgICAgIDogSGlnaCBMYXRlbmN5IFByb2ZpbGU6IEguMjYzKysgKFYzKSwgaW5jbHVkZXMKKyAqICAgICAgICAgICAgICAgICAgICAgICBwcm9maWxlIDYgYW5kIGFubmV4ZXMgTy4xIGFuZCBQLjUKICAqLwogdHlwZWRlZiBlbnVtIE9NWF9WSURFT19IMjYzUFJPRklMRVRZUEUgewotICAgIE9NWF9WSURFT19IMjYzUHJvZmlsZUJhc2VsaW5lICAgICAgICAgICAgPSAweDAxLCAgICAgICAgCi0gICAgT01YX1ZJREVPX0gyNjNQcm9maWxlSDMyMENvZGluZyAgICAgICAgICA9IDB4MDIsICAgICAgICAgIAotICAgIE9NWF9WSURFT19IMjYzUHJvZmlsZUJhY2t3YXJkQ29tcGF0aWJsZSAgPSAweDA0LCAgCi0gICAgT01YX1ZJREVPX0gyNjNQcm9maWxlSVNXVjIgICAgICAgICAgICAgICA9IDB4MDgsICAgICAgICAgICAgICAgCi0gICAgT01YX1ZJREVPX0gyNjNQcm9maWxlSVNXVjMgICAgICAgICAgICAgICA9IDB4MTAsICAgICAgICAgICAgICAgCi0gICAgT01YX1ZJREVPX0gyNjNQcm9maWxlSGlnaENvbXByZXNzaW9uICAgICA9IDB4MjAsICAgICAKLSAgICBPTVhfVklERU9fSDI2M1Byb2ZpbGVJbnRlcm5ldCAgICAgICAgICAgID0gMHg0MCwgICAgICAgICAgICAKLSAgICBPTVhfVklERU9fSDI2M1Byb2ZpbGVJbnRlcmxhY2UgICAgICAgICAgID0gMHg4MCwgICAgICAgICAgIAotICAgIE9NWF9WSURFT19IMjYzUHJvZmlsZUhpZ2hMYXRlbmN5ICAgICAgICAgPSAweDEwMCwgICAgICAgICAKLSAgICBPTVhfVklERU9fSDI2M1Byb2ZpbGVLaHJvbm9zRXh0ZW5zaW9ucyA9IDB4NkYwMDAwMDAsIC8qKjwgUmVzZXJ2ZWQgcmVnaW9uIGZvciBpbnRyb2R1Y2luZyBLaHJvbm9zIFN0YW5kYXJkIEV4dGVuc2lvbnMgKi8gCisgICAgT01YX1ZJREVPX0gyNjNQcm9maWxlQmFzZWxpbmUgICAgICAgICAgICA9IDB4MDEsCisgICAgT01YX1ZJREVPX0gyNjNQcm9maWxlSDMyMENvZGluZyAgICAgICAgICA9IDB4MDIsCisgICAgT01YX1ZJREVPX0gyNjNQcm9maWxlQmFja3dhcmRDb21wYXRpYmxlICA9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GJldHdlZW4gZWFjaCBJIGZyYW1lCiAgKiAgZVByb2ZpbGUgICAgICAgICAgICAgICAgIDogSC4yNjMgcHJvZmlsZShzKSB0byB1c2UKICAqICBlTGV2ZWwgICAgICAgICAgICAgICAgICAgOiBILjI2MyBsZXZlbChzKSB0byB1c2UKLSAqICBiUExVU1BUWVBFQWxsb3dlZCAgICAgICAgOiBJbmRpY2F0aW5nIHRoYXQgaXQgaXMgYWxsb3dlZCB0byB1c2UgUExVU1BUWVBFIAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzcGVjaWZpZWQgaW4gdGhlIDE5OTggdmVyc2lvbiBvZiBILjI2MykgdG8gCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kaWNhdGUgY3VzdG9tIHBpY3R1cmUgc2l6ZXMgb3IgY2xvY2sgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJlcXVlbmNpZXMgCi0gKiAgbkFsbG93ZWRQaWN0dXJlVHlwZXMgICAgIDogU3BlY2lmaWVzIHRoZSBwaWN0dXJlIHR5cGVzIGFsbG93ZWQgaW4gdGhlIAorICogIGJQTFVTUFRZUEVBbGxvd2VkICAgICAgICA6IEluZGljYXRpbmcgdGhhdCBpdCBpcyBhbGxvd2VkIHRvIHVzZSBQTFVTUFRZUEUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc3BlY2lmaWVkIGluIHRoZSAxOTk4IHZlcnNpb24gb2YgSC4yNjMpIHRvCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5kaWNhdGUgY3VzdG9tIHBpY3R1cmUgc2l6ZXMgb3IgY2xvY2sKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcmVxdWVuY2llcworICogIG5BbGxvd2VkUGljdHVyZVR5cGVzICAgICA6IFNwZWNpZmllcyB0aGUgcGljdHVyZSB0eXBlcyBhbGxvd2VkIGluIHRoZQogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdHN0cmVhbQotICogIGJGb3JjZVJvdW5kaW5nVHlwZVRvWmVybyA6IHZhbHVlIG9mIHRoZSBSVFlQRSBiaXQgKGJpdCA2IG9mIE1QUFRZUEUpIGlzIAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdCBjb25zdHJhaW5lZC4gSXQgaXMgcmVjb21tZW5kZWQgdG8gY2hhbmdlIAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSB2YWx1ZSBvZiB0aGUgUlRZUEUgYml0IGZvciBlYWNoIHJlZmVyZW5jZSAKKyAqICBiRm9yY2VSb3VuZGluZ1R5cGVUb1plcm8gOiB2YWx1ZSBvZiB0aGUgUlRZUEUgYml0IChiaXQgNiBvZiBNUFBUWVBFKSBpcworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vdCBjb25zdHJhaW5lZC4gSXQgaXMgcmVjb21tZW5kZWQgdG8gY2hhbmdlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHZhbHVlIG9mIHRoZSBSVFlQRSBiaXQgZm9yIGVhY2ggcmVmZXJlbmNlCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGljdHVyZSBpbiBlcnJvci1mcmVlIGNvbW11bmljYXRpb24KLSAqICBuUGljdHVyZUhlYWRlclJlcGV0aXRpb24gOiBTcGVjaWZpZXMgdGhlIGZyZXF1ZW5jeSBvZiBwaWN0dXJlIGhlYWRlciAKKyAqICBuUGljdHVyZUhlYWRlclJlcGV0aXRpb24gOiBTcGVjaWZpZXMgdGhlIGZyZXF1ZW5jeSBvZiBwaWN0dXJlIGhlYWRlcgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcGV0aXRpb24KLSAqICBuR09CSGVhZGVySW50ZXJ2YWwgICAgICAgOiBTcGVjaWZpZXMgdGhlIGludGVydmFsIG9mIG5vbi1lbXB0eSBHT0IgIAorICogIG5HT0JIZWFkZXJJbnRlcnZhbCAgICAgICA6IFNwZWNp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HlwZXMsIGVhY2ggcHJvZmlsZSBpbmRpY2F0ZXMgc3VwcG9ydCBmb3IgdmFyaW91cyAKKy8qKgorICogTVBFRy00IHByb2ZpbGUgdHlwZXMsIGVhY2ggcHJvZmlsZSBpbmRpY2F0ZXMgc3VwcG9ydCBmb3IgdmFyaW91cwogICogcGVyZm9ybWFuY2UgYm91bmRzIGFuZCBkaWZmZXJlbnQgYW5uZXhlcy4KLSAqIAorICoKICAqIEVOVU1TOgogICogIC0gU2ltcGxlIFByb2ZpbGUsIExldmVscyAxLTMKICAqICAtIFNpbXBsZSBTY2FsYWJsZSBQcm9maWxlLCBMZXZlbHMgMS0yCkBAIC02MDMsNDggKzYwMyw0OCBAQAogICogIC0gQWR2YW5jZWQgU2NhbGFibGUgVGV4dHVyZSwgTGV2ZWxzIDItMwogICovCiB0eXBlZGVmIGVudW0gT01YX1ZJREVPX01QRUc0UFJPRklMRVRZUEUgewotICAgIE9NWF9WSURFT19NUEVHNFByb2ZpbGVTaW1wbGUgICAgICAgICAgID0gMHgwMSwgICAgICAgIAotICAgIE9NWF9WSURFT19NUEVHNFByb2ZpbGVTaW1wbGVTY2FsYWJsZSAgID0gMHgwMiwgICAgCi0gICAgT01YX1ZJREVPX01QRUc0UHJvZmlsZUNvcmUgICAgICAgICAgICAgPSAweDA0LCAgICAgICAgICAgICAgCi0gICAgT01YX1ZJREVPX01QRUc0UHJvZmlsZU1haW4gICAgICAgICAgICAgPSAweDA4LCAgICAgICAgICAgICAKLSAgICBPTVhfVklERU9fTVBFRzRQcm9maWxlTmJpdCAgICAgICAgICAgICA9IDB4MTAsICAgICAgICAgICAgICAKLSAgICBPTVhfVklERU9fTVBFRzRQcm9maWxlU2NhbGFibGVUZXh0dXJlICA9IDB4MjAsICAgCi0gICAgT01YX1ZJREVPX01QRUc0UHJvZmlsZVNpbXBsZUZhY2UgICAgICAgPSAweDQwLCAgICAgICAgCi0gICAgT01YX1ZJREVPX01QRUc0UHJvZmlsZVNpbXBsZUZCQSAgICAgICAgPSAweDgwLCAgICAgICAgIAotICAgIE9NWF9WSURFT19NUEVHNFByb2ZpbGVCYXNpY0FuaW1hdGVkICAgID0gMHgxMDAsICAgICAKLSAgICBPTVhfVklERU9fTVBFRzRQcm9maWxlSHlicmlkICAgICAgICAgICA9IDB4MjAwLCAgICAgICAgICAgIAotICAgIE9NWF9WSURFT19NUEVHNFByb2ZpbGVBZHZhbmNlZFJlYWxUaW1lID0gMHg0MDAsICAKLSAgICBPTVhfVklERU9fTVBFRzRQcm9maWxlQ29yZVNjYWxhYmxlICAgICA9IDB4ODAwLCAgICAgIAotICAgIE9NWF9WSURFT19NUEVHNFByb2ZpbGVBZHZhbmNlZENvZGluZyAgID0gMHgxMDAwLCAgICAKLSAgICBPTVhfVklERU9fTVBFRzRQcm9maWxlQWR2YW5jZWRDb3JlICAgICA9IDB4MjAwMCwgICAgICAKKyAgICBPTVhfVklERU9fTVBFRzRQcm9maWxlU2ltcGxlICAgICAgICAgICA9IDB4MDEsCisgICAgT01YX1ZJREVPX01QRUc0UHJvZmlsZVNpbXBsZVNjYWxhYmxlICAgPSAweDAyLAorICAgIE9NWF9WSURFT19NUEVHNFByb2ZpbGVDb3JlICAgICAgICAgICAgID0gMHgwNCwKKyAgICBPTVhfVklERU9fTVBFRzRQcm9maWxlTWFpbiAgICAgICAgICAgICA9IDB4MDgsCisgICAgT01YX1ZJREVPX01QRUc0UHJvZmlsZU5iaXQgICAgICAgICAgICAgPSAweDEwLAorICAgIE9NWF9WSURFT19NUEVHNFByb2ZpbGVTY2FsYWJsZVRleHR1cmUgID0gMHgyMCwKKyAgICBPTVhfVklERU9fTVBFRzRQcm9maWxlU2ltcGxlRmFjZSAgICAgICA9IDB4NDAsCisgICAgT01YX1ZJREVPX01QRUc0UHJvZmlsZVNpbXBsZUZCQSAgICAgICAgPSAweDgwLAorICAgIE9NWF9WSURFT19NUEVHNFByb2ZpbGVCYXNpY0FuaW1hdGVkICAgID0gMHgxMDAsCisgICAgT01YX1ZJ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yIG9mIFAgZnJhbWVzIGJldHdlZW4gZWFjaCBJIGZyYW1lIChhbHNvIGNhbGxlZAogICogICAgICAgICAgICAgICAgICAgICAgICAgR09WIHBlcmlvZCkKICAqICBuQkZyYW1lcyAgICAgICAgICAgICA6IE51bWJlciBvZiBCIGZyYW1lcyBiZXR3ZWVuIGVhY2ggSSBmcmFtZQogICogIG5JRENWTENUaHJlc2hvbGQgICAgIDogVmFsdWUgb2YgaW50cmEgREMgVkxDIHRocmVzaG9sZAogICogIGJBQ1ByZWQgICAgICAgICAgICAgIDogRmxhZyB0byB1c2UgYWMgcHJlZGljdGlvbgogICogIG5NYXhQYWNrZXRTaXplICAgICAgIDogTWF4aW11bSBzaXplIG9mIHBhY2tldCBpbiBieXRlcy4KLSAqICBuVGltZUluY1JlcyAgICAgICAgICA6IFVzZWQgdG8gcGFzcyBWT1AgdGltZSBpbmNyZW1lbnQgcmVzb2x1dGlvbiBmb3IgTVBFRzQuIAorICogIG5UaW1lSW5jUmVzICAgICAgICAgIDogVXNlZCB0byBwYXNzIFZPUCB0aW1lIGluY3JlbWVudCByZXNvbHV0aW9uIGZvciBNUEVHNC4KICAqICAgICAgICAgICAgICAgICAgICAgICAgIEludGVycHJldGVkIGFzIGRlc2NyaWJlZCBpbiBNUEVHNCBzdGFuZGFyZC4KICAqICBlUHJvZmlsZSAgICAgICAgICAgICA6IE1QRUctNCBwcm9maWxlKHMpIHRvIHVzZS4KICAqICBlTGV2ZWwgICAgICAgICAgICAgICA6IE1QRUctNCBsZXZlbChzKSB0byB1c2UuCiAgKiAgbkFsbG93ZWRQaWN0dXJlVHlwZXMgOiBTcGVjaWZpZXMgdGhlIHBpY3R1cmUgdHlwZXMgYWxsb3dlZCBpbiB0aGUgYml0c3RyZWFtCiAgKiAgbkhlYWRlckV4dGVuc2lvbiAgICAgOiBTcGVjaWZpZXMgdGhlIG51bWJlciBvZiBjb25zZWN1dGl2ZSB2aWRlbyBwYWNrZXQKICAqICAgICAgICAgICAgICAgICA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MT09QRklMVEVSVFlQRTsKIAogCi0vKiogCi0gKiBBVkMgcGFyYW1zIAorLyoqCisgKiBBVkMgcGFyYW1zCiAgKgogICogU1RSVUNUIE1FTUJFUlM6CiAgKiAgblNpemUgICAgICAgICAgICAgICAgICAgICA6IFNpemUgb2YgdGhlIHN0cnVjdHVyZSBpbiBieXRlcwogICogIG5WZXJzaW9uICAgICAgICAgICAgICAgICAgOiBPTVggc3BlY2lmaWNhdGlvbiB2ZXJzaW9uIGluZm9ybWF0aW9uCiAgKiAgblBvcnRJbmRleCAgICAgICAgICAgICAgICA6IFBvcnQgdGhhdCB0aGlzIHN0cnVjdHVyZSBhcHBsaWVzIHRvCi0gKiAgblNsaWNlSGVhZGVyU3BhY2luZyAgICAgICA6IE51bWJlciBvZiBtYWNyb2Jsb2NrcyBiZXR3ZWVuIHNsaWNlIGhlYWRlciwgcHV0ICAKKyAqICBuU2xpY2VIZWFkZXJTcGFjaW5nICAgICAgIDogTnVtYmVyIG9mIG1hY3JvYmxvY2tzIGJldHdlZW4gc2xpY2UgaGVhZGVyLCBwdXQKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgemVybyBpZiBub3QgdXNlZAogICogIG5QRnJhbWVzICAgICAgICAgICAgICAgICAgOiBOdW1iZXIgb2YgUCBmcmFtZXMgYmV0d2VlbiBlYWNoIEkgZnJhbWUKICAqICBuQkZyYW1lcyAgICAgICAgICAgICAgICAgIDogTnVtYmVyIG9mIEIgZnJhbWVzIGJldHdlZW4gZWFjaCBJIGZyYW1lCkBAIC04NjIsODUgKzg2Miw4NSBAQAogICogIG5SZWZJZHhGb3J3YXJkICAgICAgICAgICAgOiBQaWMgcGFyYW0gc2V0IHJlZiBmcmFtZSBpbmRleCAoaW5kZXggaW50byByZWYKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJhbWUgYnVmZmVyIG9mIGZvcndhcmQgZnJhbWVzIGxpc3QpLCBCIGZyYW1lCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN1cHBvcnQKLSAqICBiRW5hYmxlVUVQICAgICAgICAgICAgICAgIDogRW5hYmxlL2Rpc2FibGUgdW5lcXVhbCBlcnJvciBwcm90ZWN0aW9uLiBUaGlzIAorICogIGJFbmFibGVVRVAgICAgICAgICAgICAgICAgOiBFbmFibGUvZGlzYWJsZSB1bmVxdWFsIGVycm9yIHByb3RlY3Rpb24uIFRoaXMKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXMgb25seSB2YWxpZCBvZiBkYXRhIHBhcnRpdGlvbmluZyBpcyBlbmFibGVkLgogICogIGJFbmFibGVGTU8gICAgICAgICAgICAgICAgOiBFbmFibGUvZGlzYWJsZSBmbGV4aWJsZSBtYWNyb2Jsb2NrIG9yZGVyaW5nCiAgKiAgYkVuYWJsZUFTTyAgICAgICAgICAgICAgICA6IEVuYWJsZS9kaXNhYmxlIGFyYml0cmFyeSBzbGljZSBvcmRlcmluZwogICogIGJFbmFibGVSUyAgICAgICAgICAgICAgICAgOiBFbmFibGUvZGlzYWJsZSBzZW5kaW5nIG9mIHJlZHVuZGFudCBzbGljZXMKICAqICBlUHJvZmlsZSAgICAgICAgICAgICAgICAgIDogQVZDIHByb2ZpbGUocykgdG8gdXNlCiAgKiAgZUxldmVsICAgICAgICAgICAgICAgICAgICA6IEFWQyBsZXZlbChzKSB0byB1c2UKLSAqICBuQWxsb3dlZFBpY3R1cmVUeXBlcyAgICAgIDogU3BlY2lmaWVzIHRoZSBwaWN0dXJlIHR5cGVzIGFsbG93ZWQgaW4gdGhlIAorICogIG5BbGxvd2VkUGljdHVyZVR5cGVzICAgICAgOiBTcGVjaWZpZXMgdGhlIHBpY3R1cmUgdHlwZXMgYWxsb3dlZCBpbiB0aGUKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYml0c3RyZWFtCi0gKiAgYkZyYW1lTUJzT25seSAgICAgICAgICAgICA6IHNwZWNpZmllcyB0aGF0IGV2ZXJ5IGNvZGVkIHBpY3R1cmUgb2YgdGhlIAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlZCB2aWRlbyBzZXF1ZW5jZSBpcyBhIGNvZGVkIGZyYW1lIAorICogIGJGcmFtZU1Cc09ubHkgICAgICAgICAgICAgOiBzcGVjaWZpZXMgdGhhdCBldmVyeSBjb2RlZCBwaWN0dXJlIG9mIHRoZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2RlZCB2aWRlbyBzZXF1ZW5jZSBpcyBhIGNvZGVkIGZyYW1lCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5pbmcgb25seSBmcmFtZSBtYWNyb2Jsb2NrcwotICogIGJNQkFGRiAgICAgICAgICAgICAgICAgICAgOiBFbmFibGUvZGlzYWJsZSBzd2l0Y2hpbmcgYmV0d2VlbiBmcmFtZSBhbmQgCisgKiAgYk1CQUZGICAgICAgICAgICAgICAgICAgICA6IEVuYWJsZS9kaXNhYmxlIHN3aXRjaGluZyBiZXR3ZWVuIGZyYW1lIGFuZAogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZCBtYWNyb2Jsb2NrcyB3aXRoaW4gYSBwaWN0dXJlCi0gKiAgYkVudHJvcHlDb2RpbmdDQUJBQyAgICAgICA6IEVudHJvcHkgZGVjb2RpbmcgbWV0aG9kIHRvIGJlIGFwcGxpZWQgZm9yIHRoZSAKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ludGF4IGVsZW1lbnRzIGZvciB3aGljaCB0d28gZGVzY3JpcHRvcnMgYXBwZWFyIAorICogIGJFbnRyb3B5Q29kaW5nQ0FCQUMgICAgICAgOiBFbnRyb3B5IGRlY29kaW5nIG1ldGhvZCB0byBiZSBhcHBsaWVkIGZvciB0aGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3ludGF4IGVsZW1lbnRzIGZvciB3aGljaCB0d28gZGVzY3JpcHRvcnMgYXBwZWFyCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSBzeW50YXggdGFibGVzCi0gKiAgYldlaWdodGVkUFByZWRpY3Rpb24gICAgICA6IEVuYWJsZS9kaXNhYmxlIHdlaWdodGVkIHByZWRpY3Rpb24gc2hhbGwgbm90IAorICogIGJXZWlnaHRlZFBQcmVkaWN0aW9uICAgICAgOiBFbmFibGUvZGlzYWJsZSB3ZWlnaHRlZCBwcmVkaWN0aW9uIHNoYWxsIG5vdAogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiZSBhcHBsaWVkIHRvIFAgYW5kIFNQIHNsaWNlcwotICogIG5XZWlnaHRlZEJpcHJlZGljaXRvbk1vZGUgOiBEZWZhdWx0IHdlaWdodGVkIHByZWRpY3Rpb24gaXMgYXBwbGllZCB0byBCIAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzbGljZXMgCisgKiAgbldlaWdodGVkQmlwcmVkaWNpdG9uTW9kZSA6IERlZmF1bHQgd2VpZ2h0ZWQgcHJlZGljdGlvbiBpcyBhcHBsaWVkIHRvIEIKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2xpY2VzCiAgKiAgYmNvbnN0SXByZWQgICAgICAgICAgICAgICA6IEVuYWJsZS9kaXNhYmxlIGludHJhIHByZWRpY3Rpb24KLSAqICBiRGlyZWN0OHg4SW5mZXJlbmNlICAgICAgIDogU3BlY2lmaWVzIHRoZSBtZXRob2QgdXNlZCBpbiB0aGUgZGVyaXZhdGlvbiAKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJvY2VzcyBmb3IgbHVtYSBtb3Rpb24gdmVjdG9ycyBmb3IgQl9Ta2lwLCAKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQl9EaXJlY3RfMTZ4MTYgYW5kIEJfRGlyZWN0Xzh4OCBhcyBzcGVjaWZpZWQgCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHN1YmNsYXVzZSA4LjQuMS4yIG9mIHRoZSBBVkMgc3BlYyAKKyAqICBiRGlyZWN0OHg4SW5mZXJlbmNlICAgICAgIDogU3BlY2lmaWVzIHRoZSBtZXRob2QgdXNlZCBpbiB0aGUgZGVyaXZhdGlvbgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9jZXNzIGZvciBsdW1hIG1vdGlvbiB2ZWN0b3JzIGZvciBCX1NraXAsCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJfRGlyZWN0XzE2eDE2IGFuZCBCX0RpcmVjdF84eDggYXMgc3BlY2lmaWVkCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHN1YmNsYXVzZSA4LjQuMS4yIG9mIHRoZSBBVkMgc3BlYwogICogIGJEaXJlY3RTcGF0aWFsVGVtcG9yYWwgICAgOiBGbGFnIGluZGljYXRpbmcgc3BhdGlhbCBvciB0ZW1wb3JhbCBkaXJlY3QKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9kZSB1c2VkIGluIEIgc2xpY2UgY29kaW5nIChyZWxhdGVkIHRvIAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiRGlyZWN0OHg4SW5mZXJlbmNlKSAuIFNwYXRpYWwgZGlyZWN0IG1vZGUgaXMgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1vZGUgdXNlZCBpbiBCIHNsaWNlIGNvZGluZyAocmVsYXRlZCB0bworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiRGlyZWN0OHg4SW5mZXJlbmNlKSAuIFNwYXRpYWwgZGlyZWN0IG1vZGUgaXMKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbW9yZSBjb21tb24gYW5kIHNob3VsZCBiZSB0aGUgZGVmYXVsdC4KICAqICBuQ2FiYWNJbml0SWR4ICAgICAgICAgICAgIDogSW5kZXggdXNlZCB0byBpbml0IENBQkFDIGNvbnRleHRzCiAgKiAgZUxvb3BGaWx0ZXJNb2RlIC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NvbWluZyBmcm9tLgotICAgICAgICBpbnQgZHVwRXJybm8gPSBkdXBGZCA8IDAgPyBlcnJubyA6IDA7Ci0gICAgICAgIGludCBmZEZsYWdzID0gZmNudGwoZmQsIEZfR0VURkQpOwotICAgICAgICBpbnQgZmRGbGFnc0Vycm5vID0gZmRGbGFncyA9PSAtMSA/IGVycm5vIDogMDsKLSAgICAgICAgaW50IGR1cEZsYWdzID0gZmNudGwoZHVwRmQsIEZfR0VURkQpOwotICAgICAgICBpbnQgZHVwRmxhZ3NFcnJubyA9IGR1cEZsYWdzID09IC0xID8gZXJybm8gOiAwOwotICAgICAgICBpZiAoZHVwRmQgPCAwIHx8IGZkRmxhZ3MgPT0gLTEgfHwgZHVwRmxhZ3MgPT0gLTEpIHsKLSAgICAgICAgICAgIEFMT0dFKCJQYXJjZWw6OndyaXRlRHVwRmlsZURlc2NyaXB0b3IgZmFpbGVkOlxuIgotICAgICAgICAgICAgICAgICAgICAiICBmZD0lZCBmbGFncz0lZCBlcnI9JWQoJXMpXG4iCi0gICAgICAgICAgICAgICAgICAgICIgIGR1cEZkPSVkIGR1cEVycj0lZCglcykgZmxhZ3M9JWQgZXJyPSVkKCVzKSIsCi0gICAgICAgICAgICAgICAgICAgIGZkLCBmZEZsYWdzLCBmZEZsYWdzRXJybm8sIHN0cmVycm9yKGZkRmxhZ3NFcnJubyksCi0gICAgICAgICAgICAgICAgICAgIGR1cEZkLCBkdXBFcnJubywgc3RyZXJyb3IoZHVwRXJybm8pLAotICAgICAgICAgICAgICAgICAgICBkdXBGbGFncywgZHVwRmxhZ3NFcnJubywgc3RyZXJyb3IoZHVwRmxhZ3NFcnJubykpOwotICAgICAgICAgICAgaWYgKGZkIDwgMCB8fCBmZEZsYWdzID09IC0xKSB7Ci0gICAgICAgICAgICAgICAgQ2FsbFN0YWNrKExPR19UQUcpOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgcmV0dXJuIC1lcnJubzsKLSAgICAgICAgfQotICAgIH0KLQogICAgIGlmIChkdXBGZCA8IDApIHsKICAgICAgICAgcmV0dXJuIC1lcnJubzsKICAgICB9CkBAIC0xMzIwLDIzICsxMzE4LDExIEBACiAKICAgICBzdGF0dXNfdCBlcnIgPSBOT19FUlJPUjsKICAgICBmb3IgKHNpemVfdCBpPTAgOyBpPGZkX2NvdW50ICYmIGVycj09Tk9fRVJST1IgOyBpKyspIHsKLSAgICAgICAgaW50IG9sZGZkID0gdGhpcy0+cmVhZEZpbGVEZXNjcmlwdG9yKCk7Ci0gICAgICAgIGZkc1tpXSA9IGR1cChvbGRmZCk7CisgICAgICAgIGZkc1tpXSA9IGR1cCh0aGlzLT5yZWFkRmlsZURlc2NyaXB0b3IoKSk7CiAgICAgICAgIGlmIChmZHNbaV0gPCAwKSB7Ci0gICAgICAgICAgICBpbnQgZHVwRXJybm8gPSBlcnJubzsKICAgICAgICAgICAgIGVyciA9IEJBRF9WQUxVRTsKLSAgICAgICAgICAgIGludCBmbGFncyA9IGZjbnRsKG9sZGZkLCBGX0dFVEZEKTsKLSAgICAgICAgICAgIGludCBmY250bEVycm5vID0gZXJybm87Ci0gICAgICAgICAgICBjb25zdCBmbGF0X2JpbmRlcl9vYmplY3QqIGZsYXQgPSByZWFkT2JqZWN0KHRydWUpOwotICAgICAgICAgICAgQUxPR0UoImR1cCBmYWlsZWQgaW4gUGFyY2VsOjpyZWFkLCBmZCAlenUgb2YgJXp1XG4iCi0gICAgICAgICAgICAgICAgIiAgZHVwKCVkKSA9ICVkIFtlcnJubzogJWQgKCVzKV1cbiIKLSAgICAgICAgICAgICAgICAiICBmY250bCglZCwgRl9HRVRGRCkgPSAlZCBbZXJybm86ICVkICglcyldXG4iCi0gICAgICAgICAgICAgICAgIiAgZmxhdCAlcCB0eXBlICVkIiwKLSAgICAgICAgICAgICAgICBpLCBmZF9jb3VudCwKLSAgICAgICAgICAgICAgICBvbGRmZCwgZmRzW2ldLCBkdXBFcnJubywgc3RyZXJyb3IoZHVwRXJybm8pLAotICAgICAgICAgICA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2FwYWNpdHkpOworICAgICAgICAgICAgcHRocmVhZF9tdXRleF9sb2NrKCZnUGFyY2VsR2xvYmFsQWxsb2NTaXplTG9jayk7CisgICAgICAgICAgICBnUGFyY2VsR2xvYmFsQWxsb2NTaXplIC09IG1EYXRhQ2FwYWNpdHk7CisgICAgICAgICAgICBnUGFyY2VsR2xvYmFsQWxsb2NDb3VudC0tOworICAgICAgICAgICAgcHRocmVhZF9tdXRleF91bmxvY2soJmdQYXJjZWxHbG9iYWxBbGxvY1NpemVMb2NrKTsKKyAgICAgICAgICAgIGZyZWUobURhdGEpOworICAgICAgICB9CiAgICAgICAgIGlmIChtT2JqZWN0cykgZnJlZShtT2JqZWN0cyk7CiAgICAgfQogfQpAQCAtMTU3Myw2ICsxNTY4LDExIEBACiAgICAgcmVsZWFzZU9iamVjdHMoKTsKIAogICAgIGlmIChkYXRhKSB7CisgICAgICAgIExPR19BTExPQygiUGFyY2VsICVwOiByZXN0YXJ0IGZyb20gJXp1IHRvICV6dSBjYXBhY2l0eSIsIHRoaXMsIG1EYXRhQ2FwYWNpdHksIGRlc2lyZWQpOworICAgICAgICBwdGhyZWFkX211dGV4X2xvY2soJmdQYXJjZWxHbG9iYWxBbGxvY1NpemVMb2NrKTsKKyAgICAgICAgZ1BhcmNlbEdsb2JhbEFsbG9jU2l6ZSArPSBkZXNpcmVkOworICAgICAgICBnUGFyY2VsR2xvYmFsQWxsb2NTaXplIC09IG1EYXRhQ2FwYWNpdHk7CisgICAgICAgIHB0aHJlYWRfbXV0ZXhfdW5sb2NrKCZnUGFyY2VsR2xvYmFsQWxsb2NTaXplTG9jayk7CiAgICAgICAgIG1EYXRhID0gZGF0YTsKICAgICAgICAgbURhdGFDYXBhY2l0eSA9IGRlc2lyZWQ7CiAgICAgfQpAQCAtMTYyNiw3ICsxNjI2LDcgQEAKICAgICAgICAgYmluZGVyX3NpemVfdCogb2JqZWN0cyA9IE5VTEw7CiAKICAgICAgICAgaWYgKG9iamVjdHNTaXplKSB7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0ZUNvbnNpc3RlbmN5TG9ja2VkKCkgY29uc3QgeworICAgIHN0YXRpYyBjb25zdCB1c2Vjb25kc190IFBBVVNFX1RJTUUgPSAwOworICAgIGZvciAoaW50IHNsb3QgPSAwOyBzbG90IDwgQnVmZmVyUXVldWVEZWZzOjpOVU1fQlVGRkVSX1NMT1RTOyArK3Nsb3QpIHsKKyAgICAgICAgYm9vbCBpc0luRnJlZVNsb3RzID0gbUZyZWVTbG90cy5jb3VudChzbG90KSAhPSAwOworICAgICAgICBib29sIGlzSW5GcmVlQnVmZmVycyA9CisgICAgICAgICAgICAgICAgc3RkOjpmaW5kKG1GcmVlQnVmZmVycy5jYmVnaW4oKSwgbUZyZWVCdWZmZXJzLmNlbmQoKSwgc2xvdCkgIT0KKyAgICAgICAgICAgICAgICBtRnJlZUJ1ZmZlcnMuY2VuZCgpOworICAgICAgICBpZiAobVNsb3RzW3Nsb3RdLm1CdWZmZXJTdGF0ZSA9PSBCdWZmZXJTbG90OjpGUkVFKSB7CisgICAgICAgICAgICBpZiAobVNsb3RzW3Nsb3RdLm1HcmFwaGljQnVmZmVyID09IE5VTEwpIHsKKyAgICAgICAgICAgICAgICBpZiAoIWlzSW5GcmVlU2xvdHMpIHsKKyAgICAgICAgICAgICAgICAgICAgQlFfTE9HRSgiU2xvdCAlZCBpcyBGUkVFIGJ1dCBpcyBub3QgaW4gbUZyZWVTbG90cyIsIHNsb3QpOworICAgICAgICAgICAgICAgICAgICB1c2xlZXAoUEFVU0VfVElNRSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmIChpc0luRnJlZUJ1ZmZlcnMpIHsKKyAgICAgICAgICAgICAgICAgICAgQlFfTE9HRSgiU2xvdCAlZCBpcyBpbiBtRnJlZVNsb3RzICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAiYnV0IGlzIGFsc28gaW4gbUZyZWVCdWZmZXJzIiwgc2xvdCk7CisgICAgICAgICAgICAgICAgICAgIHVzbGVlcChQQVVTRV9USU1FKTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGlmICghaXNJbkZyZWVCdWZmZXJzKSB7CisgICAgICAgICAgICAgICAgICAgIEJRX0xPR0UoIlNsb3QgJWQgaXMgRlJFRSBidXQgaXMgbm90IGluIG1GcmVlQnVmZmVycyIsIHNsb3QpOworICAgICAgICAgICAgICAgICAgICB1c2xlZXAoUEFVU0VfVElNRSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGlmIChpc0luRnJlZVNsb3RzKSB7CisgICAgICAgICAgICAgICAgICAgIEJRX0xPR0UoIlNsb3QgJWQgaXMgaW4gbUZyZWVCdWZmZXJzICIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAiYnV0IGlzIGFsc28gaW4gbUZyZWVTbG90cyIsIHNsb3QpOworICAgICAgICAgICAgICAgICAgICB1c2xlZXAoUEFVU0VfVElNRSk7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgaWYgKGlzSW5GcmVlU2xvdHMpIHsKKyAgICAgICAgICAgICAgICBCUV9MT0dFKCJTbG90ICVkIGlzIGluIG1GcmVlU2xvdHMgYnV0IGlzIG5vdCBGUkVFICglZCkiLAorICAgICAgICAgICAgICAgICAgICAgICAgc2xvdCwgbVNsb3RzW3Nsb3RdLm1CdWZmZXJTdGF0ZSk7CisgICAgICAgICAgICAgICAgdXNsZWVwKFBBVVNFX1RJTUUpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGlzSW5GcmVlQnVmZmVycykgeworICAgICAgICAgICAgICAgIEJRX0xPR0UoIlNsb3QgJWQgaXMgaW4gbUZyZWVCdWZmZXJzIGJ1dCBpcyBub3QgRlJFRSAoJWQpIiwKKyAgICAgICAgICAgICAgICAgICAgICAgIHNsb3QsIG1TbG90c1tzbG90XS5tQnVmZmVyU3RhdGUpOworICAgICAgICA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ICAgICAgICBpbnQgYWNxdWlyZWRDb3VudCA9IDA7CiAgICAgICAgIGZvciAoaW50IHMgPSAwOyBzIDwgbWF4QnVmZmVyQ291bnQ7ICsrcykgewpAQCAtMTY4LDE1ICsxNzEsNiBAQAogICAgICAgICAgICAgICAgIGNhc2UgQnVmZmVyU2xvdDo6QUNRVUlSRUQ6CiAgICAgICAgICAgICAgICAgICAgICsrYWNxdWlyZWRDb3VudDsKICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgY2FzZSBCdWZmZXJTbG90OjpGUkVFOgotICAgICAgICAgICAgICAgICAgICAvLyBXZSByZXR1cm4gdGhlIG9sZGVzdCBvZiB0aGUgZnJlZSBidWZmZXJzIHRvIGF2b2lkCi0gICAgICAgICAgICAgICAgICAgIC8vIHN0YWxsaW5nIHRoZSBwcm9kdWNlciBpZiBwb3NzaWJsZSwgc2luY2UgdGhlIGNvbnN1bWVyCi0gICAgICAgICAgICAgICAgICAgIC8vIG1heSBzdGlsbCBoYXZlIHBlbmRpbmcgcmVhZHMgb2YgaW4tZmxpZ2h0IGJ1ZmZlcnMKLSAgICAgICAgICAgICAgICAgICAgaWYgKCpmb3VuZCA9PSBCdWZmZXJRdWV1ZUNvcmU6OklOVkFMSURfQlVGRkVSX1NMT1QgfHwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBtU2xvdHNbc10ubUZyYW1lTnVtYmVyIDwgbVNsb3RzWypmb3VuZF0ubUZyYW1lTnVtYmVyKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAqZm91bmQgPSBzOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgfQpAQCAtMjA5LDYgKzIwMyw4IEBACiAgICAgICAgICAgICB9CiAgICAgICAgIH0KIAorICAgICAgICAqZm91bmQg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B0aGUgbWF4IGJ1ZmZlciBjb3VudAorICAgICAgICAgICAgICAgIGlmICgqc2xvdCA8IG1heEJ1ZmZlckNvdW50KSB7CisgICAgICAgICAgICAgICAgICAgICpmb3VuZCA9ICpzbG90OworICAgICAgICAgICAgICAgICAgICBtQ29yZS0+bUZyZWVTbG90cy5lcmFzZShzbG90KTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICB9CiAgICAgICAgIH0KIAogICAgICAgICAvLyBJZiBubyBidWZmZXIgaXMgZm91bmQsIG9yIGlmIHRoZSBxdWV1ZSBoYXMgdG9vIG1hbnkgYnVmZmVycwpAQCAtMjc2LDE3ICsyODUsMzkgQEAKICAgICAgICAgLy8gRW5hYmxlIHRoZSB1c2FnZSBiaXRzIHRoZSBjb25zdW1lciByZXF1ZXN0ZWQKICAgICAgICAgdXNhZ2UgfD0gbUNvcmUtPm1Db25zdW1lclVzYWdlQml0czsKIAotICAgICAgICBpbnQgZm91bmQ7Ci0gICAgICAgIHN0YXR1c190IHN0YXR1cyA9IHdhaXRGb3JGcmVlU2xvdFRoZW5SZWxvY2soImRlcXVldWVCdWZmZXIiLCBhc3luYywKLSAgICAgICAgICAgICAgICAmZm91bmQsICZyZXR1cm5GbGFncyk7Ci0gICAgICAgIGlmIChzdGF0dXMgIT0gTk9fRVJST1IpIHsKLSAgICAgICAgICAgIHJldHVybiBzdGF0dXM7CisgICAgICAgIGNvbnN0IGJvb2wgdXNlRGVmYXVsdFNpemUgPSAhd2lkdGggJiYgIWhlaWdodDsKKyAgICAgICAgaWYgKHVzZURlZmF1bHRTaXplKSB7CisgICAgICAgICAgICB3aWR0aCA9IG1Db3JlLT5tRGVmYXVsdFdpZHRoOworICAgICAgICAgICAgaGVpZ2h0ID0gbUNvcmUtPm1EZWZhdWx0SGVpZ2h0OwogICAgICAgICB9CiAKLSAgICAgICAgLy8gVGhpcyBzaG91bGQgbm90IGhhcHBlbgotICAgICAgICBpZiAoZm91bmQgPT0gQnVmZmVyUXVldWVDb3JlOjpJTlZBTElEX0JVRkZFUl9TTE9UKSB7Ci0gICAgICAgICAgICBCUV9MT0dFKCJkZXF1ZXVlQnVmZmVyOiBubyBhdmFpbGFibGUgYnVmZmVyIHNsb3RzIik7Ci0gICAgICAgICAgICByZXR1cm4gLUVCVVNZOworICAgICAgICBpbnQgZm91bmQgPSBCdWZmZXJJdGVtOjpJTlZBTElEX0JVRkZFUl9TTE9UOworICAgICAgICB3aGlsZSAoZm91bmQgPT0gQnVmZmVySXRlbTo6SU5WQUxJRF9CVUZGRVJfU0xPVCkgeworICAgICAgICAgICAgc3RhdHVzX3Qgc3RhdHVzID0gd2FpdEZvckZyZWVTbG90VGhlblJlbG9jaygiZGVxdWV1ZUJ1ZmZlciIsIGFzeW5jLAorICAgICAgICAgICAgICAgICAgICAmZm91bmQsICZyZXR1cm5GbGFncyk7CisgICAgICAgICAgICBpZiAoc3RhdHVzICE9IE5PX0VSUk9SKSB7CisgICAgICAgICAgICAgICAgcmV0dXJuIHN0YXR1czsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLy8gVGhpcyBzaG91bGQgbm90IGhhcHBlbgorICAgICAgICAgICAgaWYgKGZvdW5kID09IEJ1ZmZlclF1ZXVlQ29yZTo6SU5WQUxJRF9CVUZGRVJfU0xPVCkgeworICAgICAgICAgICAgICAgIEJRX0xPR0UoImRlcXVldWVCdWZmZXI6IG5vIGF2YWlsYWJsZSBidWZmZXIgc2xvdHMiKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gLUVCVVNZOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICBjb25zdCBzcDxHcmFwaGljQnVmZmVyPiYgYnVmZmVyKG1TbG90c1tmb3VuZF0ubUdyYXBoaWNCdWZmZXIpOworCisgICAgICAgICAgICAvLyBJZiB3ZSBhcmUgbm90IGFsbG93ZWQgdG8gYWxsb2NhdGUgbmV3IGJ1ZmZlcnMsCisgICAgICAgICAgICAvLyB3YWl0Rm9yRnJlZVNsb3RUaGVuUmVsb2NrIG11c3QgaGF2ZSByZXR1cm5lZCBhIHNsb3QgY29udGFpbmluZyBhCisgICAgICAgICAgICAvLyBidWZmZXIuIElmIHRoaXMgYnVmZmVyIHdvdWxkIHJlcXVpcmUgcmVhbGxvY2F0aW9uIHRvIG1lZXQgdGhlCisgICAgICAgICAgICAvLyByZXF1ZXN0ZWQgYXR0cmlidXRlcywgd2UgZnJlZSBpdCBhbmQgYXR0ZW1wdCB0byBnZXQgYW5vdGhlciBvbmUuCisgICAgICAgICAgICBpZiAoIW1Db3JlLT5tQWxsb3dBbGxvY2F0aW9uKSB7CisgICAgICAgICAgICAgICAgaWYgKGJ1ZmZlci0+bmVlZHNSZWFsbG9jYXRpb24od2lkdGgsIGhlaWdodCwgZm9ybWF0LCB1c2FnZSkpIHsKKyAgICAgICAgICAgICAgICAgICAgbUNvcmUtPmZyZWVCdWZmZXJMb2NrZWQoZm91bmQpOworICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IEJ1ZmZlckl0ZW06OklOVkFMSURfQlVGRkVSX1NMT1Q7CisgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KICAgICAgICAgfQogCiAgICAgICAgICpvdXRTbG90ID0gZm91bmQ7CkBAIC0yOTQsMjAgKzMyNSwxMSBAQAogCiAgICAgICAgIGF0dGFjaGVkQnlDb25zdW1lciA9IG1TbG90c1tmb3VuZF0ubUF0dGFjaGVkQnlDb25zdW1lcjsKIAotICAgICAgICBjb25zdCBib29sIHVzZURlZmF1bHRTaXplID0gIXdpZHRoICYmICFoZWlnaHQ7Ci0gICAgICAgIGlmICh1c2VEZWZhdWx0U2l6ZSkgewotICAgICAgICAgICAgd2lkdGggPSBtQ29yZS0+bURlZmF1bHRXaWR0aDsKLSAgICAgICAgICAgIGhlaWdodCA9IG1Db3JlLT5tRGVmYXVsdEhlaWdodDsKLSAgICAgICAgfQotCiAgICAgICAgIG1TbG90c1tmb3VuZF0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ucHVzaF9iYWNrKGl0ZW0pOwotICAgICAgICAgICAgbGlzdGVuZXIgPSBtQ29yZS0+bUNvbnN1bWVyTGlzdGVuZXI7CisgICAgICAgICAgICBmcmFtZUF2YWlsYWJsZUxpc3RlbmVyID0gbUNvcmUtPm1Db25zdW1lckxpc3RlbmVyOwogICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgLy8gV2hlbiB0aGUgcXVldWUgaXMgbm90IGVtcHR5LCB3ZSBuZWVkIHRvIGxvb2sgYXQgdGhlIGZyb250IGJ1ZmZlcgogICAgICAgICAgICAgLy8gc3RhdGUgdG8gc2VlIGlmIHdlIG5lZWQgdG8gcmVwbGFjZSBpdApAQCAtNjI5LDE1ICs2NjIsMTQgQEAKICAgICAgICAgICAgICAgICAvLyBtYXJrIGl0IGFzIGZyZWVkCiAgICAgICAgICAgICAgICAgaWYgKG1Db3JlLT5zdGlsbFRyYWNraW5nKGZyb250KSkgewogICAgICAgICAgICAgICAgICAgICBtU2xvdHNbZnJvbnQtPm1TbG90XS5tQnVmZmVyU3RhdGUgPSBCdWZmZXJTbG90OjpGUkVFOwotICAgICAgICAgICAgICAgICAgICAvLyBSZXNldCB0aGUgZnJhbWUgbnVtYmVyIG9mIHRoZSBmcmVlZCBidWZmZXIgc28gdGhhdCBpdCBpcwotICAgICAgICAgICAgICAgICAgICAvLyB0aGUgZmlyc3QgaW4gbGluZSB0byBiZSBkZXF1ZXVlZCBhZ2FpbgotICAgICAgICAgICAgICAgICAgICBtU2xvdHNbZnJvbnQtPm1TbG90XS5tRnJhbWVOdW1iZXIgPSAwOworICAgICAgICAgICAgICAgICAgICBtQ29yZS0+bUZyZWVCdWZmZXJzLnB1c2hfZnJvbnQoZnJvbnQtPm1TbG90KTsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgLy8gT3ZlcndyaXRlIHRoZSBkcm9wcGFibGUgYnVmZmVyIHdpdGggdGhlIGluY29taW5nIG9uZQogICAgICAgICAgICAgICAgICpmcm9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l9VU0FHRV9CSVRTOgogICAgICAgICAgICAgdmFsdWUgPSBzdGF0aWNfY2FzdDxpbnQzMl90PihtQ29yZS0+bUNvbnN1bWVyVXNhZ2VCaXRzKTsKICAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIE5BVElWRV9XSU5ET1dfREVGQVVMVF9EQVRBU1BBQ0U6CisgICAgICAgICAgICB2YWx1ZSA9IHN0YXRpY19jYXN0PGludDMyX3Q+KG1Db3JlLT5tRGVmYXVsdEJ1ZmZlckRhdGFTcGFjZSk7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBOQVRJVkVfV0lORE9XX0JVRkZFUl9BR0U6CisgICAgICAgICAgICBpZiAobUNvcmUtPm1CdWZmZXJBZ2UgPiBJTlQzMl9NQVgpIHsKKyAgICAgICAgICAgICAgICB2YWx1ZSA9IDA7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIHZhbHVlID0gc3RhdGljX2Nhc3Q8aW50MzJfdD4obUNvcmUtPm1CdWZmZXJBZ2UpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICByZXR1cm4gQkFEX1ZBTFVFOwogICAgIH0KQEAgLTg4Nyw2ICs5NjIsMTIgQEAKICAgICAgICAgICAgIE11dGV4OjpBdXRvbG9jayBsb2NrKG1Db3JlLT5tTXV0ZXgpOwogICAgICAgICAgICAgbUNvcmUtPndhaXRXaGlsZUFsbG9jYXRpbmdMb2NrZWQoKTsKIAorICAgICAgICAgICAgaWYgKCFtQ29yZS0+bUFsbG93QWxsb2NhdGlvbikgeworICAgICAgICAgICAgICAgIEJRX0xPR0UoImFsbG9jYXRlQnVmZmVyczogYWxsb2NhdGlvbiBpcyBub3QgYWxsb3dlZCBmb3IgdGhpcyAiCisgICAgICAgICAgICAgICAgICAgICAgICAiQnVmZmVyUXVldWUiKTsKKyAgICAgICAgICAgICAgICByZXR1cm47C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4sCiAgICAgICAgICAgICAgICAgYi5tQ3JvcCwKICAgICAgICAgICAgICAgICAmeWNiY3IsCiAgICAgICAgICAgICAgICAgYi5tRmVuY2UtPmR1cCgpKTsKLQotICAgICAgICAgICAgaWYgKGVyciAhPSBPSykgewotICAgICAgICAgICAgICAgIENDX0xPR0UoIlVuYWJsZSB0byBsb2NrIFlDYkNyIGJ1ZmZlciBmb3IgQ1BVIHJlYWRpbmc6ICVzICglZCkiLAotICAgICAgICAgICAgICAgICAgICAgICAgc3RyZXJyb3IoLWVyciksIGVycik7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIGVycjsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGJ1ZmZlclBvaW50ZXIgPSB5Y2Jjci55OwogICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgZXJyID0gbVNsb3RzW2J1Zl0ubUdyYXBoaWNCdWZmZXItPmxvY2tZQ2JDcigKKyAgICAgICAgICAgICAgICBHcmFwaGljQnVmZmVyOjpVU0FHRV9TV19SRUFEX09GVEVOLAorICAgICAgICAgICAgICAgIGIubUNyb3AsCisgICAgICAgICAgICAgICAgJnljYmNyKTsKKyAgICAgICAgfQorICAgICAgICBpZiAoZXJyID09IE9LKSB7CisgICAgICAgICAgICBidWZmZXJQb2ludGVyID0geWNiY3IueTsKKyAgICAgICAgICAgIGZsZXhGb3JtYXQgPSBIQUxfUElYRUxfRk9STUFUX1lDYkNyXzQyMF84ODg7CisgICAgICAgICAgICBpZiAoZm9ybWF0ICE9IEhBTF9QSVhFTF9GT1JNQVRfWUNiQ3JfNDIwXzg4OCkgeworICAgICAgICAgICAgICAgIENDX0xPR1YoImxvY2tpbmcgYnVmZmVyIG9mIGZvcm1hdCAlI3ggYXMgZmxleCBZVVYiLCBmb3JtYXQpOworICAgICAgICAgICAgfQorICAgICAgICB9IGVsc2UgaWYgKGZvcm1hdCA9PSBIQUxfUElYRUxfRk9STUFUX1lDYkNyXzQyMF84ODgpIHsKKyAgICAgICAgICAgIENDX0xPR0UoIlVuYWJsZSB0byBsb2NrIFlDYkNyIGJ1ZmZlciBmb3IgQ1BVIHJlYWRpbmc6ICVzICglZCkiLAorICAgICAgICAgICAgICAgICAgICBzdHJlcnJvcigtZXJyKSwgZXJyKTsKKyAgICAgICAgICAgIHJldHVybiBlcnI7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBpZiAoYnVmZmVyUG9pbnRlciA9PSBOVUxMKSB7IC8vIG5vdCBmbGV4aWJsZSBZVVYKKyAgICAgICAgaWYgKGIubUZlbmNlLmdldCgpKSB7CiAgICAgICAgICAgICBlcnIgPSBtU2xvdHNbYnVmXS5tR3JhcGhpY0J1ZmZlci0+bG9ja0FzeW5jKAogICAgICAgICAgICAgICAgIEdyYXBoaWNCdWZmZXI6OlVTQUdFX1NXX1JFQURfT0ZURU4sCiAgICAgICAgICAgICAgICAgYi5tQ3JvcCwKICAgICAgICAgICAgICAgICAmYnVmZmVyUG9pbnRlciwKICAgICAgICAgICAgICAgICBiLm1GZW5jZS0+ZHVwKCkpOwotCi0gICAgICAgICAgICBpZiAoZXJyICE9IE9LKSB7Ci0gICAgICAgICAgICAgICAgQ0NfTE9HRSgiVW5hYmxlIHRvIGxvY2sgYnVmZmVyIGZvciBDUFUgcmVhZGluZzogJXMgKCVkKSIsCi0gICAgICAgICAgICAgICAgICAgICAgICBzdHJlcnJvcigtZXJyKSwgZXJyKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gZXJyOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgfSBlbHNlIHsKLSAgICAgICAgaWYgKG1TbG90c1tidWZdLm1HcmFwaGljQnVmZmVyLT5nZXRQaXhlbEZvcm1hdCgpID09Ci0gICAgICAgICAgICAgICAgSEFMX1BJWEVMX0ZPUk1BVF9ZQ2JDcl80MjBfODg4KSB7Ci0gICAgICAgICAgICBlcnIgPSBtU2xvdHNbYnVmXS5tR3JhcGhpY0J1ZmZlci0+bG9ja1lDYkNyKAotICAgICAgICAgICAgICAgIEdyYXBoaWNCdWZmZXI6OlVTQUdFX1NXX1JFQURfT0ZURU4sCi0gICAgICAgICAgICAgICAgYi5tQ3JvcCwKLSAgICAgICAgICAgICAgICAmeWNiY3IpOwotCi0gICAgICAgICAgICBpZiAoZXJyICE9IE9LKSB7Ci0gICAgICAgICAgICAgICAgQ0NfTE9HRSgiVW5hYmxlIHRvIGxvY2sgWUNiQ3IgYnVmZmVyIGZvciBDUFUgcmVhZGluZzogJXMgKCVkKSIsCi0gICAgICAgICAgICAgICAgICAgICAgICBzdHJlcnJvcigtZXJyKSwgZXJyKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gZXJyOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgYnVmZmVyUG9pbnRlciA9IHljYmNyLnk7CiAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICBlcnIgPSBtU2xvdHNbYnVmXS5tR3JhcGhpY0J1ZmZlci0+bG9jaygKICAgICAgICAgICAgICAgICBHcmFwaGljQnVmZmVyOjpVU0FHRV9TV19SRUFEX09GVEVOLAogICAgICAgICAgICAgICAgIGIubUNyb3AsCiAgICAgICAgICAgICAgICAgJmJ1ZmZlclBvaW50ZXIpOwotCi0gICAgICAgICAgICBpZiAoZXJyICE9IE9LKSB7Ci0gICAgICAgICAgICAgICAgQ0NfTE9HRSgiVW5hYmxlIHRvIGxvY2sgYnVmZmVyIGZvciBDUFUgcmVhZGluZzogJXMgKCVkKSIsCi0gICAgICAgICAgICAgICAgICAgICAgICBzdHJlcnJvcigtZXJyKSwgZXJyKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gZXJyOwotICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIGlmIChlcnIgIT0gT0spIHsKKyAgICAgICAgICAgIENDX0xPR0UoIlVuYWJsZSB0byBsb2NrIGJ1ZmZlciBmb3IgQ1BVIHJlYWRpbmc6ICVzICglZCkiLAorICAgICAgICAgICAgICAgICAgICBzdHJlcnJvcigtZXJyKSwgZXJyKT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BvdXRDcm9wLnJpZ2h0ICs9IGR3OworICAgICAgICAgICAgdWludDMyX3QgZHcgPSAoY3VycmVudFdpZHRoIC0gbmV3V2lkdGgpIC8gMjsKKyAgICAgICAgICAgIG91dENyb3AubGVmdCArPSBkdzsKKyAgICAgICAgICAgIG91dENyb3AucmlnaHQgLT0gZHc7CiAgICAgICAgIC8vIFRoZSBjcm9wIGlzIHRvbyB0YWxsCiAgICAgICAgIH0gZWxzZSBpZiAobmV3SGVpZ2h0IDwgY3VycmVudEhlaWdodCkgewotICAgICAgICAgICAgdWludDMyX3QgZGggPSAobmV3SGVpZ2h0IC0gY3VycmVudEhlaWdodCkgLyAyOwotICAgICAgICAgICAgb3V0Q3JvcC50b3AgLT0gZGg7Ci0gICAgICAgICAgICBvdXRDcm9wLmJvdHRvbSArPSBkaDsKKyAgICAgICAgICAgIHVpbnQzMl90IGRoID0gKGN1cnJlbnRIZWlnaHQgLSBuZXdIZWlnaHQpIC8gMjsKKyAgICAgICAgICAgIG91dENyb3AudG9wICs9IGRoOworICAgICAgICAgICAgb3V0Q3JvcC5ib3R0b20gLT0gZGg7CiAgICAgICAgIH0KIAogICAgICAgICBHTENfTE9HVigiZ2V0Q3VycmVudENyb3AgZmluYWwgY3JvcCBbJWQsJWQsJWQsJWRdIiwKQEAgLTEwMjMsNiArMTAyNCwxMiBAQAogICAgIHJldHVybiBtQ29uc3VtZXItPnNldERlZmF1bHRCdWZmZXJGb3JtYXQoZGVmYXVsdEZvcm1hdCk7CiB9CiAKK3N0YXR1c190IEdMQ29uc3VtZXI6OnNldERlZmF1bHRCdWZmZXJEYXRhU3BhY2UoCisgICAgICAgIGFuZHJvaWRfZGF0YXNwYWNlIGRlZmF1bHREYXRhU3BhY2UpIHsKKyAgICBNdXRleDo6QXV0b2xvY2sgbG9jayhtTXV0ZXgpOworICAgIHJldHVybiBtQ29uc3VtZXItPnNldERlZmF1bHRCdWZmZXJEYXRhU3BhY2UoZGVmYXVsdERhdGFTcGFjZSk7Cit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bSkgewogICAgICAgICBQYXJjZWwgZGF0YSwgcmVwbHk7CiAgICAgICAgIGRhdGEud3JpdGVJbnRlcmZhY2VUb2tlbihJQ29uc3VtZXJMaXN0ZW5lcjo6Z2V0SW50ZXJmYWNlRGVzY3JpcHRvcigpKTsKKyAgICAgICAgZGF0YS53cml0ZShpdGVtKTsKICAgICAgICAgcmVtb3RlKCktPnRyYW5zYWN0KE9OX0ZSQU1FX0FWQUlMQUJMRSwgZGF0YSwgJnJlcGx5LCBJQmluZGVyOjpGTEFHX09ORVdBWSk7CiAgICAgfQogCkBAIC03MiwxOCArNzQsMjAgQEAKICAgICB1aW50MzJfdCBjb2RlLCBjb25zdCBQYXJjZWwmIGRhdGEsIFBhcmNlbCogcmVwbHksIHVpbnQzMl90IGZsYWdzKQogewogICAgIHN3aXRjaChjb2RlKSB7Ci0gICAgICAgIGNhc2UgT05fRlJBTUVfQVZBSUxBQkxFOgorICAgICAgICBjYXNlIE9OX0ZSQU1FX0FWQUlMQUJMRTogewogICAgICAgICAgICAgQ0hFQ0tfSU5URVJGQUNFKElDb25zdW1lckxpc3RlbmVyLCBkYXRhLCByZXBseSk7Ci0gICAgICAgICAgICBvbkZyYW1lQXZhaWxhYmxlKCk7Ci0gICAgICAgICAgICByZXR1cm4gTk9fRVJST1I7Ci0gICAgICAgIGNhc2UgT05fQlVGRkVSX1JFTEVBU0VEOgorICAgICAgICAgICAgQnVmZmVySXRlbSBpdGVtOworICAgICAgICAgICAgZGF0YS5yZWFkKGl0ZW0pOworICAgICAgICAgICAgb25GcmFtZUF2YWlsYWJsZShpdGVtKTsKKyAgICAgICAgICAgIHJldHVybiBOT19FUlJPUjsgfQorICAgICAgICBjYXNlIE9OX0JVRkZFUl9SRUxFQVNFRDogewogICAgICAgICAgICAgQ0hFQ0tfSU5URVJGQUNFKElDb25zdW1lckxpc3RlbmVyLCBkYXRhLCByZXBseSk7CiAgICAgICAgICAgICBvbkJ1ZmZlcnNSZWxlYXNlZCgpOwotICAgICAg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WQgZHVtcChTdHJpbmc4JiByZXN1bHQsIGNvbnN0IGNoYXIqIHByZWZpeCkgY29uc3QgewogICAgICAgICBQYXJjZWwgZGF0YSwgcmVwbHk7CiAgICAgICAgIGRhdGEud3JpdGVJbnRlcmZhY2VUb2tlbihJR3JhcGhpY0J1ZmZlckNvbnN1bWVyOjpnZXRJbnRlcmZhY2VEZXNjcmlwdG9yKCkpOwpAQCAtNTMwLDYgKzQwNCwxNCBAQAogICAgICAgICAgICAgcmVwbHktPndyaXRlSW50MzIocmVzdWx0KTsKICAgICAgICAgICAgIHJldHVybiBOT19FUlJPUjsKICAgICAgICAgfQorICAgICAgICBjYXNlIFNFVF9ERUZBVUxUX0JVRkZFUl9EQVRBX1NQQUNFOiB7CisgICAgICAgICAgICBDSEVDS19JTlRFUkZBQ0UoSUdyYXBoaWNCdWZmZXJDb25zdW1lciwgZGF0YSwgcmVwbHkpOworICAgICAgICAgICAgYW5kcm9pZF9kYXRhc3BhY2UgZGVmYXVsdERhdGFTcGFjZSA9CisgICAgICAgICAgICAgICAgICAgIHN0YXRpY19jYXN0PGFuZHJvaWRfZGF0YXNwYWNlPihkYXRhLnJlYWRJbnQzMigpKTsKKyAgICAgICAgICAgIHN0YXR1c190IHJlc3VsdCA9IHNldERlZmF1bHRCdWZmZXJEYXRhU3BhY2UoZGVmYXVsdERhdGFTcGFjZSk7CisgICAgICAgICAgICByZXBseS0+d3JpdGVJbnQzMihyZXN1bHQpOworICAgICAgICAgICAgcmV0dXJuIE5PX0VSUk9SOworICAgICAgICB9CiAgICAgICAgIGNhc2UgU0VUX0NPTlNVTUVSX1VTQUdFX0JJVFM6IHsKICAgICAgICAgICAgIENIRUNLX0lOVEVSRkFDRShJR3JhcGhpY0J1ZmZlckNvbnN1bWVyLCBkYXRhLCByZXBseSk7CiAgICAgICAgICAgICB1aW50MzJfdCB1c2FnZSA9IGRhdGEucmVhZFVpbnQzMigpOwpAQCAtNTQ0LDYgKzQyNiwyMSBAQAogICAgICAgICAgICAgcmVwbHktPndyaXRlSW50MzIocmVzdWx0KTsKICAgICAgICAgICAgIHJldHVybiBOT19FUlJPUjsKICAgICAgICAgfQorICAgICAgICBjYXNlIEdFVF9TSURFQkFORF9TVFJFQU06IHsKKyAgICAgICAgICAgIENIRUNLX0lOVEVSRkFDRShJR3JhcGhpY0J1ZmZlckNvbnN1bWVyLCBkYXRhLCByZXBseSk7CisgICAgICAgICAgICBzcDxOYXRpdmVIYW5kbGU+IHN0cmVhbSA9IGdldFNpZGViYW5kU3RyZWFtKCk7CisgICAgICAgICAgICByZXBseS0+d3JpdGVJbnQzMihzdGF0aWNfY2FzdDxpbnQzMl90PihzdHJlYW0gIT0gTlVMTCkpOworICAgICAgICAgICAgaWYgKHN0cmVhbSAhPSBOVUxMKSB7CisgICAgICAgICAgICAgICAgcmVwbHktPndyaXRlTmF0aXZlSGFuZGxlKHN0cmVhbS0+aGFuZGxlKCkpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgcmV0dXJuIE5PX0VSUk9SOworICAgICAgICB9CisgICAgICAgIGNhc2UgU0VUX1NIQURPV19RVUVVRV9TSVpFOiB7CisgICAgICAgICAgICBDSEVDS19JTlRFUkZBQ0UoSUdyYXBoaWNCdWZmZXJDb25zdW1lciwgZGF0YSwgcmVwbHkpOworICAgICAgICAgICAgc2l6ZV90IHNpemUgPSBzdGF0aWNfY2FzdDxzaXplX3Q+KGRhdGEucmVhZEludDY0KCkpOworICAgICAgICAgICAgc2V0U2hhZG93UXVldWVTaXplKHNpemUpOworICAgICAgICAgICAgcmV0dXJuIE5PX0VSUk9SOworICAgICAgICB9CiAgICAgICAgIGNhc2UgRFVNUDogewogICAgICAgICAgICAgQ0hFQ0tfSU5URVJGQUNFKElHcmFwaGljQnVmZmVyQ29uc3VtZXIsIGRhdGEsIHJlcGx5KTsKICAgICAgICAgICAgIFN0cmluZzggcmVzdWx0ID0gZGF0YS5yZWFkU3RyaW5nOCgpOwpkaWZmIC0tZ2l0IGEvbGlicy9ndWk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ICAgICByZXR1cm4gcmVzdWx0OworICAgICAgICB9CisgICAgICAgIHJlc3VsdCA9IHJlcGx5LnJlYWRJbnQzMigpOworICAgICAgICByZXR1cm4gcmVzdWx0OworICAgIH0KIH07CiAKIC8vIE91dC1vZi1saW5lIHZpcnR1YWwgbWV0aG9kIGRlZmluaXRpb24gdG8gdHJpZ2dlciB2dGFibGUgZW1pc3Npb24gaW4gdGhpcwpAQCAtNDE4LDcgKzQzMSw3IEBACiAgICAgICAgICAgICByZXBseS0+d3JpdGVJbnQzMihyZXN1bHQpOwogICAgICAgICAgICAgcmV0dXJuIE5PX0VSUk9SOwogICAgICAgICB9Ci0gICAgICAgIGNhc2UgQUxMT0NBVEVfQlVGRkVSUzoKKyAgICAgICAgY2FzZSBBTExPQ0FURV9CVUZGRVJTOiB7CiAgICAgICAgICAgICBDSEVDS19JTlRFUkZBQ0UoSUdyYXBoaWNCdWZmZXJQcm9kdWNlciwgZGF0YSwgcmVwbHkpOwogICAgICAgICAgICAgYm9vbCBhc3luYyA9IHN0YXRpY19jYXN0PGJvb2w+KGRhdGEucmVhZEludDMyKCkpOwogICAgICAgICAgICAgdWludDMyX3Qgd2lkdGggPSBkYXRhLnJlYWRVaW50MzIoKTsKQEAgLTQyNyw2ICs0NDAsMTQgQEAKICAgICAgICAgICAgIHVpbnQzMl90IHVzYWdlID0gZGF0YS5yZWFkVWludDMyKCk7CiAgICAgICAgICAgICBhbGxvY2F0ZUJ1ZmZlcnMoYXN5bmMsIHdpZHRoLCBoZWlnaHQsIGZvcm1hdCwgdXNhZ2UpOwogICAgICAgICAgICAgcmV0dXJuIE5PX0VSUk9SOworICAgICAgICB9CisgICAgICAgIGNhc2UgQUxMT1dfQUxMT0NBVElPTjogeworICAgICAgICAgICAgQ0hFQ0tfSU5URVJGQUNFKElHcmFwaGljQnVmZmVyUHJvZHVjZXIsIGRhdGEsIHJlcGx5KTsKKyAgICAgICAgICAgIGJvb2wgYWxsb3cgPSBzdGF0aWNfY2FzdDxib29sPihkYXRhLnJlYWRJbnQzMigpKTsKKyAgICAgICAgICAgIHN0YXR1c190IHJlc3VsdCA9IGFsbG93QWxsb2NhdGlvbihhbGxvdyk7CisgICAgICAgICAgICByZXBseS0+d3JpdGVJbnQzMihyZXN1bHQpOworICAgICAgICAgICAgcmV0dXJuIE5PX0VSUk9SOworICAgICAgICB9CiAgICAgfQogICAgIHJldHVybiBCQmluZGVyOjpvblRyYW5zYWN0KGNvZGUsIGRhdGEsIHJlcGx5LCBmbGFncyk7CiB9CkBAIC00NDAsMTIgKzQ2MSwxNCBAQAogc2l6ZV90IElHcmFwaGljQnVmZmVyUHJvZHVjZXI6OlF1ZXVlQnVmZmVySW5wdXQ6OmdldEZsYXR0ZW5lZFNpemUoKSBjb25zdCB7CiAgICAgcmV0dXJuIHNpemVvZih0aW1lc3RhbXApCiAgICAgICAgICArIHNpemVvZihpc0F1dG9UaW1lc3RhbXApCisgICAgICAgICArIHNpemVvZihkYXRhU3BhY2UpCiAgICAgICAgICArIHNpemVvZihjcm9wKQogICAgICAgICAgKyBzaXplb2Yoc2NhbGluZ01vZGUpCiAgICAgICAgICArIHNpemVvZih0cmFuc2Zvcm0pCiAgICAgICAgICArIHNpemVvZihzdGlja3lUcmFuc2Zvcm0pCiAgICAgICAgICArIHNpemVvZihhc3luYykKLSAgICAgICAgICsgZmVuY2UtPmdldEZsYXR0ZW5lZFNpemUoKTsKKyAgICAgICAgICsgZmVuY2UtPmdldEZsYXR0ZW5lZFNpemUoKQorICAgICAgICAgKyBzdXJmYWNlRGFtYWdlLmdldEZsYXR0ZW5lZFNpemUoKTsKIH0KIAogc2l6ZV90IElHcmFwaGljQnVmZmVyUHJvZHVjZXI6OlF1ZXVlQnVmZmVySW5wdXQ6OmdldEZkQ291bnQoKSBjb25zdCB7CkBAIC00NjAsMTIgKzQ4MywxNyBAQAogICAgIH0KICAgICBGbGF0dGVuYWJsZVV0aWxzOjp3cml0ZShidWZmZXIsIHNpemUsIHRpbWVzdGFtcCk7C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bG9jayBsb2NrKG1NdXRleCk7CiAgICAgICAgICAgICBtUGVuZGluZ0ZyYW1lcysrOwogICAgICAgICAgICAgbUNvbmRpdGlvbi5zaWduYWwoKTsKQEAgLTEyNSw3ICsxMjUsNyBAQAogICAgICAgICAgICAgbVBlbmRpbmdGcmFtZXMtLTsKICAgICAgICAgfQogCi0gICAgICAgIHZpcnR1YWwgdm9pZCBvbkZyYW1lQXZhaWxhYmxlKCkgeworICAgICAgICB2aXJ0dWFsIHZvaWQgb25GcmFtZUF2YWlsYWJsZShjb25zdCBCdWZmZXJJdGVtJikgewogICAgICAgICAgICAgTXV0ZXg6OkF1dG9sb2NrIGxvY2sobU11dGV4KTsKICAgICAgICAgICAgIG1QZW5kaW5nRnJhbWVzKys7CiAgICAgICAgICAgICBtRnJhbWVDb25kaXRpb24uc2lnbmFsKCk7CkBAIC0xNjYsNyArMTY2LDcgQEAKICAgICAgICAgdWludDMyX3QgeCwgdWludDMyX3QgeSwgdWludDMyX3QgciwgdWludDMyX3QgZz0wLCB1aW50MzJfdCBiPTApIHsKICAgICAvLyBJZ25vcmVzIGNvbXBvbmVudHMgdGhhdCBkb24ndCBleGlzdCBmb3IgZ2l2ZW4gcGl4ZWwKICAgICBzd2l0Y2goYnVmLmZvcm1hdCkgewotICAgICAgICBjYXNlIEhBTF9QSVhFTF9GT1JNQVRfUkFXX1NFTlNPUjogeworICAgICAgICBjYXNlIEhBTF9QSVhFTF9GT1JNQVRfUkFXMTY6IHsKICAgICAgICAgICAgIFN0cmluZzggbXNnOwogICAgICAgICAgICAgdWludDE2X3QgKmJQdHIgPSAodWludDE2X3QqKWJ1Zi5kYXRhOwogICAgICAgICAgICAgYlB0ciArPSB5ICogYnVmLnN0cmlkZSArIHg7CkBAIC00MjksNyArNDI5LDcgQEAKIAogdm9pZCBjaGVja0FueUJ1ZmZlcihjb25zdCBDcHVDb25zdW1lcjo6TG9ja2VkQnVmZmVyICZidWYsIGludCBmb3JtYXQpIHsKICAgICBzd2l0Y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ID0gUVVFVUVfQlVGRkVSX0lOUFVUX0RBVEFTUEFDRTsKICAgICAgICAgICAgY3JvcCA9IFFVRVVFX0JVRkZFUl9JTlBVVF9SRUNUOwogICAgICAgICAgICBzY2FsaW5nTW9kZSA9IFFVRVVFX0JVRkZFUl9JTlBVVF9TQ0FMSU5HX01PREU7CiAgICAgICAgICAgIHRyYW5zZm9ybSA9IFFVRVVFX0JVRkZFUl9JTlBVVF9UUkFOU0ZPUk07CkBAIC0xMzcsNiArMTM5LDcgQEAKICAgICAgICAgICAgIHJldHVybiBJR3JhcGhpY0J1ZmZlclByb2R1Y2VyOjpRdWV1ZUJ1ZmZlcklucHV0KAogICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXAsCiAgICAgICAgICAgICAgICAgICAgIGlzQXV0b1RpbWVzdGFtcCwKKyAgICAgICAgICAgICAgICAgICAgZGF0YVNwYWNlLAogICAgICAgICAgICAgICAgICAgICBjcm9wLAogICAgICAgICAgICAgICAgICAgICBzY2FsaW5nTW9kZSwKICAgICAgICAgICAgICAgICAgICAgdHJhbnNmb3JtLApAQCAtMTU0LDYgKzE1NywxMSBAQAogICAgICAgICAgICAgcmV0dXJuICp0aGlzOwogICAgICAgICB9CiAKKyAgICAgICAgUXVldWVCdWZmZXJJbnB1dEJ1aWxkZXImIHNldERhdGFTcGFjZShhbmRyb2lkX2RhdGFzcGFjZSBkYXRhU3BhY2UpIHsKKyAgICAgICAgICAgIHRoaXMtPmRhdGFTcGFjZSA9IGRhdGFTcGFjZTsKKyAgICAgICAgICAgIHJldHVybiAqdGhpczsKKyAgICAgICAgfQorCiAgICAgICAgIFF1ZXVlQnVmZmVySW5wdXRCdWlsZGVyJiBzZXRDcm9wKFJlY3QgY3JvcCkgewogICAgICAgICAgICAgdGhpcy0+Y3JvcCA9IGNyb3A7CiAgICAgICAgICAgICByZXR1cm4gKnRoaXM7CkBAIC0xODIsNiArMTkwLDcgQEAKICAgICBwcml2YXRlOgogICAgICAgICBpbnQ2NF90IH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lnaHQgPD0gbGVmdCkgYnJlYWs7CiAKLSAgICAgICAgICAgICAgICBpZiAocHJldi0+cmlnaHQgPiBsZWZ0ICYmIHByZXYtPnJpZ2h0IDwgcmlnaHQpIHsKLSAgICAgICAgICAgICAgICAgICAgZHN0LmFkZChSZWN0KHByZXYtPnJpZ2h0LCB0b3AsIHJpZ2h0LCBib3R0b20pKTsKLSAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwcmV2LT5yaWdodDsKKyAgICAgICAgICAgICAgICBpZiAocHJldi5yaWdodCA+IGxlZnQgJiYgcHJldi5yaWdodCA8IHJpZ2h0KSB7CisgICAgICAgICAgICAgICAgICAgIGRzdC5hZGQoUmVjdChwcmV2LnJpZ2h0LCB0b3AsIHJpZ2h0LCBib3R0b20pKTsKKyAgICAgICAgICAgICAgICAgICAgcmlnaHQgPSBwcmV2LnJpZ2h0OwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIGlmIChwcmV2LT5sZWZ0ID4gbGVmdCAmJiBwcmV2LT5sZWZ0IDwgcmlnaHQpIHsKLSAgICAgICAgICAgICAgICAgICAgZHN0LmFkZChSZWN0KHByZXYtPmxlZnQsIHRvcCwgcmlnaHQsIGJvdHRvbSkpOwotICAgICAgICAgICAgICAgICAgICByaWdodCA9IHByZXYtPmxlZnQ7CisgICAgICAgICAgICAgICAgaWYgKHByZXYubGVmdCA+IGxlZnQgJiYgcHJldi5sZWZ0IDwgcmlnaHQpIHsKKyAgICAgICAgICAgICAgICAgICAgZHN0LmFkZChSZWN0KHByZXYubGVmdCwgdG9wLCByaWdodCwgYm90dG9tKSk7CisgICAgICAgICAgICAgICAgICAgIHJpZ2h0ID0gcHJldi5sZWZ0OwogICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgIC8vIGlmIGFuIGVudHJ5IGluIHRoZSBwcmV2aW91cyBzcGFuIGlzIHRvbyBmYXIgcmlnaHQsIG5vdGhpbmcgZnVydGhlciBsZWZ0IGluIHRoZQogICAgICAgICAgICAgICAgIC8vIGN1cnJlbnQgc3BhbiB3aWxsIG5lZWQgaXQKLSAgICAgICAgICAgICAgICBpZiAocHJldi0+bGVmdCA+PSByaWdodCkgeworICAgICAgICAgICAgICAgIGlmIChwcmV2LmxlZnQgPj0gcmlnaHQpIHsKICAgICAgICAgICAgICAgICAgICAgYmVnaW5MYXN0U3BhbiA9IHByZXZJbmRleDsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgIC8vIGl0ZXJhdGluZyBvdmVyIHByZXZpb3VzIHNwYW4gTFRSLCBxdWl0IGlmIGl0J3MgdG9vIGZhciByaWdodAotICAgICAgICAgICAgICAgIGlmIChwcmV2LT5sZWZ0ID49IHJpZ2h0KSBicmVhazsKKyAgICAgICAgICAgICAgICBpZiAocHJldi5sZWZ0ID49IHJpZ2h0KSBicmVhazsKIAotICAgICAgICAgICAgICAgIGlmIChwcmV2LT5sZWZ0ID4gbGVmdCAmJiBwcmV2LT5sZWZ0IDwgcmlnaHQpIHsKLSAgICAgICAgICAgICAgICAgICAgZHN0LmFkZChSZWN0KGxlZnQsIHRvcCwgcHJldi0+bGVmdCwgYm90dG9tKSk7Ci0gICAgICAgICAgICAgICAgICAgIGxlZnQgPSBwcmV2LT5sZWZ0OworICAgICAgICAgICAgICAgIGlmIChwcmV2LmxlZnQgPiBsZWZ0ICYmIHByZXYubGVmdCA8IHJpZ2h0KSB7CisgICAgICAgICAgICAgICAgICAgIGRzdC5hZGQoUmVjdChsZWZ0LCB0b3AsIHByZXYubGVmdCwgYm90dG9tKSk7CisgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBwcmV2LmxlZnQ7CiAgICAgICAgICAgICAgICAgfQogCi0gICAgICAgICAgICAgICAgaWYgKHByZXYtPnJpZ2h0ID4gbGVmdCAmJiBwcmV2LT5yaWdodCA8IHJpZ2h0KSB7Ci0gICAgICAgICAgICAgICAgICAgIGRzdC5hZGQoUmVjdChsZWZ0LCB0b3AsIHByZXYtPnJpZ2h0LCBib3R0b20pKTsKLSAgICAgICAgICAgICAgICAgICAgbGVmdCA9IHByZXYtPnJpZ2h0OworICAgICAgICAgICAgICAgIGlmIChwcmV2LnJpZ2h0ID4gbGVmdCAmJiBwcmV2LnJpZ2h0IDwgcmlnaHQpIHsKKyAgICAgICAgICAgICAgICAgICAgZHN0LmFkZChSZWN0KGxlZnQsIHRvcCwgcHJldi5yaWdodCwgYm90dG9tKSk7CisgICAgICAgICAgICAgICAgICAgIGxlZnQgPSBwcmV2LnJpZ2h0OwogICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAvLyBpZiBhbiBlbnRyeSBpbiB0aGUgcHJldmlvdXMgc3BhbiBpcyB0b28gZmFyIGxlZnQsIG5vdGhpbmcgZnVydGhlciByaWdodCBpbiB0aGUKICAgICAgICAgICAgICAgICAvLyBjdXJyZW50IHNwYW4gd2lsbCBuZWVkIGl0Ci0gICAgICAgICAgICAgICAgaWYgKHByZXYtPnJpZ2h0IDw9IGxlZnQpIHsKKyAgICAgICAgICAgICAgICBpZiAocHJldi5yaWdodCA8PSBsZWZ0KSB7CiAgICAgICAgICAgICAgICAgICAgIGJlZ2luTGFzdFNwYW4gPSBwcmV2SW5kZXg7CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfQpAQCAtNTE4LDggKzUxOSwxMiBAQAogICAgIFJlY3QgYigqcHJldik7CiAgICAgd2hpbGUgKGN1ciAhPSB0YWlsKSB7CiAgICAgICAgIGlmIChjdXItPmlzVmFsaWQoKSA9PSBmYWxzZSkgewotICAgICAgICAgICAgQUxPR0VfSUYoIXNpbGVudCwgIiVzOiByZWdpb24gY29udGFpbnMgYW4gaW52YWxpZCBSZWN0IiwgbmFtZSk7Ci0gICAgICAgICAgICByZXN1bHQgPSBmYWxzZTsKKyAgICAgICAgICAgIC8vIFdlIGFsbG93IHRoaXMgcGFydGljdWxhciBmbGF2b3Igb2YgaW52YWxpZCBSZWN0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lbnRhdGlvbl90aW1lICIKKyAgICAgICAgIkVHTF9LSFJfc3dhcF9idWZmZXJzX3dpdGhfZGFtYWdlICIKICAgICAgICAgOwogZXh0ZXJuIGNoYXIgY29uc3QgKiBjb25zdCBnRXh0ZW5zaW9uU3RyaW5nICA9CiAgICAgICAgICJFR0xfS0hSX2ltYWdlICIgICAgICAgICAgICAgICAgICAgICAgICAvLyBtYW5kYXRvcnkKQEAgLTEwMCw2ICsxMDEsOCBAQAogICAgICAgICAiRUdMX0FORFJPSURfaW1hZ2VfbmF0aXZlX2J1ZmZlciAiICAgICAgLy8gbWFuZGF0b3J5CiAgICAgICAgICJFR0xfS0hSX3dhaXRfc3luYyAiICAgICAgICAgICAgICAgICAgICAvLyBzdHJvbmdseSByZWNvbW1lbmRlZAogICAgICAgICAiRUdMX0FORFJPSURfcmVjb3JkYWJsZSAiICAgICAgICAgICAgICAgLy8gbWFuZGF0b3J5CisgICAgICAgICJFR0xfS0hSX3BhcnRpYWxfdXBkYXRlICIgICAgICAgICAgICAgICAvLyBzdHJvbmdseSByZWNvbW1lbmRlZAorICAgICAgICAiRUdMX0VYVF9idWZmZXJfYWdlICIgICAgICAgICAgICAgICAgICAgLy8gc3Ryb25nbHkgcmVjb21tZW5kZWQgd2l0aCBwYXJ0aWFsX3VwZGF0ZQogICAgICAgICA7CiAKIC8vIGV4dGVuc2lvbnMgbm90IGV4cG9zZWQgdG8gYXBwbGljYXRpb25zIGJ1dCB1c2VkIGJ5IHRoZSBBTkRST0lEIHN5c3RlbQpAQCAtMTUyLDYgKzE1NSwxNCBAQAogICAgIC8vIEVHTF9BTkRST0lEX3ByZXNlbnRhdGlvbl90aW1lCiAgICAgeyAiZWdsUHJlc2VudGF0aW9uVGltZUFORFJPSUQiLAogICAgICAgICAgICAgKF9fZWdsTXVzdENhc3RUb1Byb3BlckZ1bmN0aW9uUG9pbnRlclR5cGUpJmVnbFByZXNlbnRhdGlvblRpbWVBTkRST0lEIH0sCisKKyAgICAvLyBFR0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weSwgRUdMQ29uZmlnIGNvbmZpZywKQEAgLTQyNCw2ICs0MzAsNyBAQAogCiAgICAgICAgIC8vIGJ5IGRlZmF1bHQsIGp1c3QgcGljayBSR0JBXzg4ODgKICAgICAgICAgRUdMaW50IGZvcm1hdCA9IEhBTF9QSVhFTF9GT1JNQVRfUkdCQV84ODg4OworICAgICAgICBhbmRyb2lkX2RhdGFzcGFjZSBkYXRhU3BhY2UgPSBIQUxfREFUQVNQQUNFX1VOS05PV047CiAKICAgICAgICAgRUdMaW50IGEgPSAwOwogICAgICAgICBjbngtPmVnbC5lZ2xHZXRDb25maWdBdHRyaWIoaURweSwgY29uZmlnLCBFR0xfQUxQSEFfU0laRSwgJmEpOwpAQCAtNDQ5LDcgKzQ1Niw3IEBACiAgICAgICAgICAgICBmb3IgKGNvbnN0IEVHTGludCogYXR0ciA9IGF0dHJpYl9saXN0OyAqYXR0ciAhPSBFR0xfTk9ORTsgYXR0ciArPSAyKSB7CiAgICAgICAgICAgICAgICAgaWYgKCphdHRyID09IEVHTF9HTF9DT0xPUlNQQUNFX0tIUikgewogICAgICAgICAgICAgICAgICAgICBpZiAoRU5BQkxFX0VHTF9LSFJfR0xfQ09MT1JTUEFDRSkgewotICAgICAgICAgICAgICAgICAgICAgICAgZm9ybWF0ID0gbW9kaWZ5Rm9ybWF0Q29sb3JzcGFjZShmb3JtYXQsICooYXR0cisxKSk7CisgICAgICAgICAgICAgICAgICAgICAgICBkYXRhU3BhY2UgPSBtb2RpZnlCdWZmZXJEYXRhc3BhY2UoZGF0YVNwYWNlLCAqKGF0dHIrMSkpOwogICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm9ybWFsbHkgd2UnZCBwYXNzIHRocm91Z2ggdW5oYW5kbGVkIGF0dHJpYnV0ZXMgdG8KICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZSBkcml2ZXIuIEJ1dCBpbiBjYXNlIHRoZSBkcml2ZXIgaW1wbGVtZW50cyB0aGlzCkBAIC00NzMsNiArNDgwLDE2IEBACiAgICAgICAgICAgICB9CiAgICAgICAgIH0KIAorICAgICAgICBpZiAoZGF0YVNwYWNlICE9IDApIHsKKyAgICAgICAgICAgIGludCBlcnIgPSBuYXRpdmVfd2luZG93X3NldF9idWZmZXJzX2RhdGFfc3BhY2Uod2luZG93LCBkYXRhU3BhY2UpOworICAgICAgICAgICAgaWYgKGVyciAhPSAwKSB7CisgICAgICAgICAgICAgICAgQUxPR0UoImVycm9yIHNldHRpbmcgbmF0aXZlIHdpbmRvdyBwaXhlbCBkYXRhU3BhY2U6ICVzICglZCkiLAorICAgICAgICAgICAgICAgICAgICAgICAgc3RyZXJyb3IoLWVyciksIGVycik7CisgICAgICAgICAgICAgICAgbmF0aXZlX3dpbmRvd19hcGlfZGlzY29ubmVjdCh3aW5kb3csIE5BVElWRV9XSU5ET1dfQVBJX0VHTCk7CisgICAgICAgICAgICAgICAgcmV0dXJuIHNldEVycm9yKEVHTF9CQURfTkFUSVZFX1dJTkRPVywgRUdMX05PX1NVUkZBQ0UpOworICAgICAgICAgICAgfQorICAgICAgICB9CisKICAgICAgICAgLy8gdGhlIEVHTCBzcGVjIHJlcXVpcmVzIHRoYXQgYSBuZXcgRUdMU3VyZmFjZSBkZWZhdWx0IHRvIHN3YXAgaW50ZXJ2YWwKICAgICAgICAgLy8gMSwgc28gZXhwbGljaXRseSBzZXQgdGhhdCBvbiB0aGUgd2luZG93IGhlcmUuCiAgICAgICAgIEFOYXRpdmVXaW5kb3cqIGFudyA9IHJlaW50ZXJwcmV0X2Nhc3Q8QU5hdGl2ZVdpbmRvdyo+KHdpbmRvdyk7CkBAIC0xMDE1LDcgKzEwMzIsOCBAQAogICAgIE11dGV4IG1NdXRleDsKIH07CiAKLUVHTEJvb2xlYW4gZWdsU3dhcEJ1ZmZlcnMoRUdMRGlzcGxheSBkcHksIEVHTFN1cmZhY2UgZHJhdykKK0VHTEJvb2xlYW4gZWdsU3dhcE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gICAgICB3aGlsZSghZWdsSXNJbml0aWFsaXplZCkgcmVmQ29uZC53YWl0KHJlZkxvY2spOworICAgICAgICAgICAgcmV0dXJuIEVHTF9UUlVFOworICAgICAgICB9CisKKyAgICAgICAgd2hpbGUoZWdsSXNJbml0aWFsaXplZCkgcmVmQ29uZC53YWl0KHJlZkxvY2spOworICAgIH0KKworICAgIHsKKyAgICAgICAgTXV0ZXg6OkF1dG9sb2NrIF9sKGxvY2spOworCisjaWYgRUdMX1RSQUNFCisKKyAgICAgICAgLy8gQ2FsbGVkIGJvdGggYXQgZWFybHlfaW5pdCB0aW1lIGFuZCBhdCB0aGlzIHRpbWUuIChFYXJseV9pbml0IGlzIHByZS16eWdvdGUsIHNvCisgICAgICAgIC8vIHRoZSBpbmZvcm1hdGlvbiBmcm9tIHRoYXQgY2FsbCBtYXkgYmUgc3RhbGUuKQorICAgICAgICBpbml0RWdsVHJhY2VMZXZlbCgpOworICAgICAgICBpbml0RWdsRGVidWdMZXZlbCgpOworCisjZW5kaWYKKworICAgICAgICBzZXRHTEhvb2tzVGhyZWFkU3BlY2lmaWMoJmdIb29rc05vQ29udGV4dCk7CisKKyAgICAgICAgLy8gaW5pdGlhbGl6ZSBlYWNoIEVHTCBhbmQKKyAgICAgICAgLy8gYnVpbGQgb3VyIG93biBleHRlbnNpb24gc3RyaW5nIGZpcnN0LCBiYXNlZCBvbiB0aGUgZXh0ZW5zaW9uIHdlIGtub3cKKyAgICAgICAgLy8gYW5kIHRoZSBleHRlbnNpb24gc3VwcG9ydGVkIGJ5IG91ciBjbGllbnQgaW1wbGVtZW50YXRpb24KKworICAgICAgICBlZ2xfY29ubmVjdGlvbl90KiBjb25zdCBjbnggPSAmZ0VHTEltcGw7CisgICAgICAgIGNueC0+bWFqb3IgPSAtMTsKKyAgICAgICAgY254LT5taW5vciA9IC0xOworICAgICAgICBpZiAoY254LT5kc28pIHsKKyAgICAgICAgICAgIEVHTERpc3BsYXkgaWRweSA9IGRpc3AuZHB5OworICAgICAgICAgICAgaWYgKGNueC0+ZWdsLmVnbEluaXRpYWxpemUoaWRweSwgJmNueC0+bWFqb3IsICZjbngtPm1pbm9yKSkgeworICAgICAgICAgICAgICAgIC8vQUxPR0QoImluaXRpYWxpemVkIGRweT0lcCwgdmVyPSVkLiVkLCBjbng9JXAiLAorICAgICAgICAgICAgICAgIC8vICAgICAgICBpZHB5LCBjbngtPm1ham9yLCBjbngtPm1pbm9yLCBjbngpOworCisgICAgICAgICAgICAgICAgLy8gZGlzcGxheSBpcyBub3cgaW5pdGlhbGl6ZWQKKyAgICAgICAgICAgICAgICBkaXNwLnN0YXRlID0gZWdsX2Rpc3BsYXlfdDo6SU5JVElBTElaRUQ7CisKKyAgICAgICAgICAgICAgICAvLyBnZXQgdGhlIHF1ZXJ5LXN0cmluZ3MgZm9yIHRoaXMgZGlzcGxheSBmb3IgZWFjaCBpbXBsZW1lbnRhdGlvbgorICAgICAgICAgICAgICAgIGRpc3AucXVlcnlTdHJpbmcudmVuZG9yID0gY254LT5lZ2wuZWdsUXVlcnlTdHJpbmcoaWRweSwKKyAgICAgICAgICAgICAgICAgICAgICAgIEVHTF9WRU5ET1IpOworICAgICAgICAgICAgICAgIGRpc3AucXVlcnlTdHJpbmcudmVyc2lvbiA9IGNueC0+ZWdsLmVnbFF1ZXJ5U3RyaW5nKGlkcHksCisgICAgICAgICAgICAgICAgICAgICAgICBFR0xfVkVSU0lPTik7CisgICAgICAgICAgICAgICAgZGlzcC5xdWVyeVN0cmluZy5leHRlbnNpb25zID0gY254LT5lZ2wuZWdsUXVlcnlTdHJpbmcoaWRweSwKKyAgICAgICAgICAgICAgICAgICAgICAgIEVHTF9FWFRFTlNJT05TKTsKKyAgICAgICAgICAgICAgICBkaXNwLnF1ZXJ5U3RyaW5nLmNsaWVudEFwaSA9IGNueC0+ZWdsLmVnbFF1ZXJ5U3RyaW5nKGlkcHksCisgICAgICAgICAgICAgICAgICAgICAgICBFR0xfQ0xJRU5UX0FQSVMpOworCisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIEFMT0dXKCJlZ2xJbml0aWFsaXplKCVwKSBmYWlsZWQgKCVzKSIsIGlkcHksCisgICAgICAgICAgICAgICAgICAgICAgICBlZ2xfdGxzX3Q6OmVnbF9zdHJlcnJvcihjbngtPmVnbC5lZ2xHZXRFcnJvcigpKSk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKworICAgICAgICAvLyB0aGUgcXVlcnkgc3RyaW5ncyBhcmUgcGVyLWRpc3BsYXkKKyAgICAgICAgbVZlbmRvclN0cmluZy5zZXRUbyhzVmVuZG9yU3RyaW5nKTsKKyAgICAgICAgbVZlcnNpb25TdHJpbmcuc2V0VG8oc1ZlcnNpb25TdHJpbmcpOworICAgICAgICBtQ2xpZW50QXBpU3RyaW5nLnNldFRvKHNDbGllbnRBcGlTdHJpbmcpOworCisgICAgICAgIG1FeHRlbnNpb25TdHJpbmcuc2V0VG8oZ0J1aWx0aW5FeHRlbnNpb25TdHJpbmcpOworICAgICAgICBjaGFyIGNvbnN0KiBzdGFydCA9IGdFeHRlbnNpb25TdHJpbmc7CisgICAgICAgIGNoYXIgY29uc3QqIGVuZDsKKyAgICAgICAgZG8geworICAgICAgICAgICAgLy8gZmluZCB0aGUgc3BhY2Ugc2VwYXJhdGluZyB0aGlzIGV4dGVuc2lvbiBmb3IgdGhlIG5leHQgb25lCisgICAgICAgICAgICBlbmQgPSBzdHJjaHIoc3RhcnQsICcgJyk7CisgICAgICAgICAgICBpZiAoZW5kKSB7CisgICAgICAgICAgICAgICAgLy8gbGVuZ3RoIG9mIHRoZSBleHRlbnNpb24gc3RyaW5nCisgICAgICAgICAgICAgICAgY29uc3Qgc2l6ZV90IGxlbiA9IGVuZCAtIHN0YXJ0OworICAgICAgICAgICAgICAgIGlmIChsZW4pIHsKKyAgICAgICAgICAgICAgICAgICAgLy8gTk9URTogd2UgY291bGQgYXZvaWQgdGhlIGNvcHkgaWYgd2UgaGFkIHN0cm5zdHIuCisgICAgICAgICAgICAgICAgICAgIGNvbnN0IFN0cmluZzggZXh0KHN0YXJ0LCBsZW4pOworICAgICAgICAgICAgICAgICAgICBpZiAoZmluZEV4dGVuc2lvbihkaXNwLnF1ZXJ5U3RyaW5nLmV4dGVuc2lvbnMsIGV4dC5zdHJpbmcoKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW4pKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBtRXh0ZW5zaW9uU3RyaW5nLmFwcGVuZChzdGFydCwgbGVuKzEpOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIC8vIHByb2Nlc3MgdGhlIG5leHQgZXh0ZW5zaW9uIHN0cmluZywgYW5kIHNraXAgdGhlIHNwYWNlLgorICAgICAgICAgICAgICAgIHN0YXJ0ID0gZW5kICsgMTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfSB3aGlsZSAoZW5kKTsKKworICAgICAgICBlZ2xfY2FjaGVfdDo6Z2V0KCktPmluaXRpYWxpemUodGhpcyk7CisKKyAgICAgICAgY2hhciB2YWx1ZVtQUk9QRVJUWV9WQUxVRV9NQVhdOworICAgICAgICBwcm9wZXJ0eV9nZXQoImRlYnVnLmVnbC5maW5pc2giLCB2YWx1ZSwgIjAiKTsKKyAgICAgICAgaWYgKGF0b2kodmFsdWUpKSB7CisgICAgICAgICAgICBmaW5pc2hPblN3YXAgPSB0cnVlOworICAgICAgICB9CisKKyAgICAgICAgcHJvcGVydHlfZ2V0KCJkZWJ1Zy5lZ2wudHJhY2VHcHVDb21wbGV0aW9uIiwgdmFsdWUsICIwIik7CisgICAgICAgIGlmIChhdG9pKHZhbHVlKSkgeworICAgICAgICAgICAgdHJhY2VHcHVDb21wbGV0aW9uID0gdHJ1ZTsKKyAgICAgICAgfQorCiAgICAgICAgIGlmIChtYWpvciAhPSBOVUxMKQogICAgICAgICAgICAgKm1ham9yID0gVkVSU0lPTl9NQUpPUjsKICAgICAgIC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AgICAgICAvL0FMT0dEKCJpbml0aWFsaXplZCBkcHk9JXAsIHZlcj0lZC4lZCwgY254PSVwIiwKLSAgICAgICAgICAgIC8vICAgICAgICBpZHB5LCBjbngtPm1ham9yLCBjbngtPm1pbm9yLCBjbngpOwotCi0gICAgICAgICAgICAvLyBkaXNwbGF5IGlzIG5vdyBpbml0aWFsaXplZAotICAgICAgICAgICAgZGlzcC5zdGF0ZSA9IGVnbF9kaXNwbGF5X3Q6OklOSVRJQUxJWkVEOwotCi0gICAgICAgICAgICAvLyBnZXQgdGhlIHF1ZXJ5LXN0cmluZ3MgZm9yIHRoaXMgZGlzcGxheSBmb3IgZWFjaCBpbXBsZW1lbnRhdGlvbgotICAgICAgICAgICAgZGlzcC5xdWVyeVN0cmluZy52ZW5kb3IgPSBjbngtPmVnbC5lZ2xRdWVyeVN0cmluZyhpZHB5LAotICAgICAgICAgICAgICAgICAgICBFR0xfVkVORE9SKTsKLSAgICAgICAgICAgIGRpc3AucXVlcnlTdHJpbmcudmVyc2lvbiA9IGNueC0+ZWdsLmVnbFF1ZXJ5U3RyaW5nKGlkcHksCi0gICAgICAgICAgICAgICAgICAgIEVHTF9WRVJTSU9OKTsKLSAgICAgICAgICAgIGRpc3AucXVlcnlTdHJpbmcuZXh0ZW5zaW9ucyA9IGNueC0+ZWdsLmVnbFF1ZXJ5U3RyaW5nKGlkcHksCi0gICAgICAgICAgICAgICAgICAgIEVHTF9FWFRFTlNJT05TKTsKLSAgICAgICAgICAgIGRpc3AucXVlcnlTdHJpbmcuY2xpZW50QXBpID0gY254LT5lZ2wuZWdsUXVlcnlTdHJpbmcoaWRweSwKLSAgICAgICAgICAgICAgICAgICAgRUdMX0NMSUVOVF9BUElTKTsKLQotICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgQUxPR1coImVnbEluaXRpYWxpemUoJXApIGZhaWxlZCAoJXMpIiwgaWRweSwKLSAgICAgICAgICAgICAgICAgICAgZWdsX3Rsc190OjplZ2xfc3RyZXJyb3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ICAgICAgIG8tPmRlc3Ryb3koKTsKKyAgICB7CisgICAgICAgIE11dGV4OjpBdXRvbG9jayBfcmwocmVmTG9jayk7CisgICAgICAgIGVnbElzSW5pdGlhbGl6ZWQgPSBmYWxzZTsKKyAgICAgICAgcmVmQ29uZC5icm9hZGNhc3QoKTsKICAgICB9CiAKLSAgICAvLyB0aGlzIG1hcmtzIGFsbCBvYmplY3QgaGFuZGxlcyBhcmUgInRlcm1pbmF0ZWQiCi0gICAgb2JqZWN0cy5jbGVhcigpOwotCi0gICAgcmVmcy0tOwogICAgIHJldHVybiByZXM7CiB9CiAKZGlmZiAtLWdpdCBhL29wZW5nbC9saWJzL0VHTC9lZ2xfZGlzcGxheS5oIGIvb3BlbmdsL2xpYnMvRUdML2VnbF9kaXNwbGF5LmgKaW5kZXggMGE2ZTQyNS4uMmQ4NjI5NSAxMDA2NDQKLS0tIGEvb3BlbmdsL2xpYnMvRUdML2VnbF9kaXNwbGF5LmgKKysrIGIvb3BlbmdsL2xpYnMvRUdML2VnbF9kaXNwbGF5LmgKQEAgLTEzMSw3ICsxMzEsOSBAQAogICAgIHZvaWQgbGVhdmUoKSB7IHJldHVybiBtSGliZXJuYXRpb24uZGVjV2FrZUNvdW50KEhpYmVybmF0aW9uTWFjaGluZTo6V0VBSyk7IH0KIAogICAgICAgICAgICAgdWludDMyX3QgICAgICAgICAgICAgICAgICAgIHJlZnM7Ci0gICAgbXV0YWJsZSBNdXRleCAgICAgICAgICAgICAgICAgICAgICAgbG9jazsKKyAgICAgICAgICAgIGJvb2wgICAgICAgICAgICAgICAgICAgICAgICBlZ2xJc0luaXRpYWxpemVkOworICAgIG11dGFibGUgTXV0ZXggICAgICAgICAgICAgICAgICAgICAgIGxvY2ssIHJlZkxvY2s7CisgICAgbXV0YWJsZSBDb25kaXRpb24gICAgICAgICAgICAgICAgICAgcmVmQ29uZDsKICAgICAgICAgICAgIFNvcnRlZFZlY3RvcjxlZ2xfb2JqZWN0X3QqPiBvYmplY3RzOwog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YzMyAxMDA2NDQKLS0tIGEvb3BlbmdsL2xpYnMvRUdML2dldFByb2NBZGRyZXNzLmNwcAorKysgYi9vcGVuZ2wvbGlicy9FR0wvZ2V0UHJvY0FkZHJlc3MuY3BwCkBAIC0xNjMsNiArMTYzLDcgQEAKICAgICAgICAgICAgIGFzbSB2b2xhdGlsZSggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgICIuc2V0ICBwdXNoXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICAgICAgICAgICAgIi5zZXQgIG5vcmVvcmRlclxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICAgICAiLnNldCAgbWlwczMycjJcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgICAgICJyZGh3ciAlW3Rsc10sICQyOVxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICAgICAgICAgICAgImx3ICAgICVbdDBdLCAlW09QRU5HTF9BUEldKCVbdGxzXSlcblx0IiAgICAgICAgICAgIFwKICAgICAgICAgICAgICAgICAiYmVxeiAgJVt0MF0sIDFmXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApkaWZmIC0tZ2l0IGEvb3BlbmdsL2xpYnMvR0xFUzIvZ2wyLmNwcCBiL29wZW5nbC9saWJzL0dMRVMyL2dsMi5jcHAKaW5kZXggNDA1NTVkNy4uZDVkYzAxMiAxMDA2NDQKLS0tIGEvb3BlbmdsL2xpYnMvR0xFUzIvZ2wyLmNwcAorKysgYi9vcGVuZ2wvbGlicy9HTEVTMi9nbDIuY3BwCkBAIC0xNjMsNiArMTYzLDcgQEAKICAgICAgICAgYXNtIHZvbGF0aWxlKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgIi5zZXQgIHB1c2hcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICAgICAgICAiLnNldCAgbm9yZW9yZGVyXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICIuc2V0ICBtaXBzMzJyMlxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgInJkaHdyICVbdGxzXSwgJDI5XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICAgICAgICAibHcgICAgJVt0MF0sICVbT1BFTkdMX0FQSV0oJVt0bHNdKVxuXHQiICAgICAgICAgICAgIFwKICAgICAgICAgICAgICJiZXF6ICAlW3QwXSwgMWZcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApkaWZmIC0tZ2l0IGEvb3BlbmdsL2xpYnMvR0xFU19DTS9nbC5jcHAgYi9vcGVuZ2wvbGlicy9HTEVTX0NNL2dsLmNwcAppbmRleCAwYjMwOTU2Li5iMWIzMWY4IDEwMDY0NAotLS0gYS9vcGVuZ2wvbGlicy9HTEVTX0NNL2dsLmNwcAorKysgYi9vcGVuZ2wvbGlicy9HTEVTX0NNL2dsLmNwcApAQCAtMjE5LDYgKzIxOSw3IEBACiAgICAgICAgIGFzbSB2b2xhdGlsZSggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICAgICAgICAgICIuc2V0ICBwdXNoXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgICAgICAgIi5zZXQgIG5vcmVvcmRlclxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAiLnNldCAgbWlwczMycjJcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICAgICAgICAgICJyZGh3ciAlW3Rsc10sICQyOVxuXHQiICAgICAgICAgICAgICAgICAgICAgICAg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pZiAod2luZG93SW5mby0+dmlzaWJsZSkgewogICAgICAgICAgICAgICAgIGlmICghKGZsYWdzICYgSW5wdXRXaW5kb3dJbmZvOjpGTEFHX05PVF9UT1VDSEFCTEUpKSB7CkBAIC00ODksMTEgKzQ4OCw2IEBACiAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9Ci0KLSAgICAgICAgICAgIGlmIChwcml2YXRlRmxhZ3MgJiBJbnB1dFdpbmRvd0luZm86OlBSSVZBVEVfRkxBR19TWVNURU1fRVJST1IpIHsKLSAgICAgICAgICAgICAgICAvLyBFcnJvciB3aW5kb3cgaXMgb24gdG9wIGJ1dCBub3QgdmlzaWJsZSwgc28gdG91Y2ggaXMgZHJvcHBlZC4KLSAgICAgICAgICAgICAgICByZXR1cm4gTlVMTDsKLSAgICAgICAgICAgIH0KICAgICAgICAgfQogICAgIH0KICAgICByZXR1cm4gTlVMTDsKQEAgLTExOTAsNyArMTE4NCw2IEBACiAgICAgICAgIGludDMyX3QgeSA9IGludDMyX3QoZW50cnktPnBvaW50ZXJDb29yZHNbcG9pbnRlckluZGV4XS4KICAgICAgICAgICAgICAgICBnZXRBeGlzVmFsdWUoQU1PVElPTl9FVkVOVF9BWElTX1kpKTsKICAgICAgICAgc3A8SW5wdXRXaW5kb3dIYW5kbGU+IG5ld1RvdWNoZWRXaW5kb3dIYW5kbGU7Ci0gICAgICAgIHNwPElucHV0V2luZG93SGFuZGxlPiB0b3BFcnJvcldpbmRvd0hhbmRsZTsKICAgICAgICAgYm9vbCBpc1RvdWNoTW9kYWwgPSBmYWxzZTsKIAogICAgICAgICAvLyBUcmF2ZXJzZSB3aW5kb3dzIGZyb20gZnJvbnQgdG8gYmFjayB0byBmaW5kIHRvdWNoZWQgd2luZG93IGFuZCBvdXRzaWRlIHRhcmdldHMuCkBAIC0xMjAyLDEzICsxMTk1LDYgQEAKICAgICAgICAgICAgICAgICBjb250aW51ZTsgLy8gd3JvbmcgZGlzcGxheQogICAgICAgICAgICAgfQogCi0gICAgICAgICAgICBpbnQzMl90IHByaXZhdGVGbGFncyA9IHdpbmRvd0luZm8tPmxheW91dFBhcmFtc1ByaXZhdGVGbGFnczsKLSAgICAgICAgICAgIGlmIChwcml2YXRlRmxhZ3MgJiBJbnB1dFdpbmRvd0luZm86OlBSSVZBVEVfRkxBR19TWVNURU1fRVJST1IpIHsKLSAgICAgICAgICAgICAgICBpZiAodG9wRXJyb3JXaW5kb3dIYW5kbGUgPT0gTlVMTCkgewotICAgICAgICAgICAgICAgICAgICB0b3BFcnJvcldpbmRvd0hhbmRsZSA9IHdpbmRvd0hhbmRsZTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9Ci0KICAgICAgICAgICAgIGludDMyX3QgZmxhZ3MgPSB3aW5kb3dJbmZvLT5sYXlvdXRQYXJhbXNGbGFnczsKICAgICAgICAgICAgIGlmICh3aW5kb3dJbmZvLT52aXNpYmxlKSB7CiAgICAgICAgICAgICAgICAgaWYgKCEgKGZsYWdzICYgSW5wdXRXaW5kb3dJbmZvOjpGTEFHX05PVF9UT1VDSEFCTEUpKSB7CkBAIC0xMjMzLDE3ICsxMjE5LDYgQEAKICAgICAgICAgICAgIH0KICAgICAgICAgfQogCi0gICAgICAgIC8vIElmIHRoZXJlIGlzIGFuIGVycm9yIHdpbmRvdyBidXQgaXQgaXMgbm90IHRha2luZyBmb2N1cyAodHlwaWNhbGx5IGJlY2F1c2UKLSAgICAgICAgLy8gaXQgaXMgaW52aXNpYmxlKSB0aGVuIHdhaXQgZm9yIGl0LiAgQW55IG90aGVyIGZvY3VzZWQgd2luZG93IG1heSBpbgotICAgICAgICAvLyBmYWN0IGJlIGluIEFOUiBzdGF0ZS4KLSAgICAgICAgaWYgKHRvcEVycm9yV2luZG93SGFuZGxlICE9IE5VTEwgJiYgbmV3VG91Y2hlZFdpbmRvd0hhbmRsZSAhPSB0b3BFcnJvcldpbmRvd0hhbmRsZSkgewotICAgICAgICA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G1YVHJhbnNsYXRlOwogICAgICAgICAgICAgdG9wID0gZmxvYXQobVJhd1BvaW50ZXJBeGVzLngubWF4VmFsdWUgLSByYXdSaWdodCkgKiBtWFNjYWxlICsgbVhUcmFuc2xhdGU7CiAgICAgICAgICAgICBvcmllbnRhdGlvbiAtPSBNX1BJXzI7Ci0gICAgICAgICAgICBpZiAob3JpZW50YXRpb24gPCBtT3JpZW50ZWRSYW5nZXMub3JpZW50YXRpb24ubWluKSB7CisgICAgICAgICAgICBpZiAobU9yaWVudGVkUmFuZ2VzLmhhdmVPcmllbnRhdGlvbiAmJiBvcmllbnRhdGlvbiA8IG1PcmllbnRlZFJhbmdlcy5vcmllbnRhdGlvbi5taW4pIHsKICAgICAgICAgICAgICAgICBvcmllbnRhdGlvbiArPSAobU9yaWVudGVkUmFuZ2VzLm9yaWVudGF0aW9uLm1heCAtIG1PcmllbnRlZFJhbmdlcy5vcmllbnRhdGlvbi5taW4pOwogICAgICAgICAgICAgfQogICAgICAgICAgICAgYnJlYWs7CkBAIC00MzI3LDcgKzQzMjcsNyBAQAogICAgICAgICAgICAgYm90dG9tID0gZmxvYXQobVJhd1BvaW50ZXJBeGVzLnkubWF4VmFsdWUgLSByYXdUb3ApICogbVlTY2FsZSArIG1ZVHJhbnNsYXRlOwogICAgICAgICAgICAgdG9wID0gZmxvYXQobVJhd1BvaW50ZXJBeGVzLnkubWF4VmFsdWUgLSByYXdCb3R0b20pICogbVlTY2FsZSArIG1ZVHJhbnNsYXRlOwogICAgICAgICAgICAgb3JpZW50YXRpb24gLT0gTV9QSTsKLSAgICAgICAgICAgIGlmIChvcmllbnRhdGlvbiA8IG1PcmllbnRlZFJhbmdlcy5vcmllbnRhdGlvbi5taW4pIHsKKyAgICAgICAgICAgIGlmIChtT3JpZW50ZWRSYW5nZXMuaGF2ZU9yaWVudGF0aW9uICYmIG9yaWVudGF0aW9uIDwgbU9yaWVudGVkUmFuZ2VzLm9yaWVudGF0aW9uLm1pbikgewogICAgICAgICAg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jdGl2ZUNvbm5lY3Rpb25zKTsKKyAgICB7CisgICAgICAgIE11dGV4OjpBdXRvbG9jayBfbChtTG9jayk7CisgICAgICAgIGZvciAoc2l6ZV90IGk9MCA7IGkgPCBhY3RpdmVDb25uZWN0aW9ucy5zaXplKCk7ICsraSkgeworICAgICAgICAgICAgaWYgKGFjdGl2ZUNvbm5lY3Rpb25zW2ldICE9IDApIHsKKyAgICAgICAgICAgICAgICBhY3RpdmVDb25uZWN0aW9uc1tpXS0+cmVzZXRXYWtlTG9ja1JlZkNvdW50KCk7CisgICAgICAgICAgICB9CisgICAgICAgIH0KKyAgICAgICAgc2V0V2FrZUxvY2tBY3F1aXJlZExvY2tlZChmYWxzZSk7CisgICAgfQorfQorCit2b2lkIFNlbnNvclNlcnZpY2U6OnNldFdha2VMb2NrQWNxdWlyZWRMb2NrZWQoYm9vbCBhY3F1aXJlKSB7CisgICAgaWYgKGFjcXVpcmUpIHsKKyAgICAgICAgaWYgKCFtV2FrZUxvY2tBY3F1aXJlZCkgeworICAgICAgICAgICAgYWNxdWlyZV93YWtlX2xvY2soUEFSVElBTF9XQUtFX0xPQ0ssIFdBS0VfTE9DS19OQU1FKTsKKyAgICAgICAgICAgIG1XYWtlTG9ja0FjcXVpcmVkID0gdHJ1ZTsKKyAgICAgICAgfQorICAgICAgICBtTG9vcGVyLT53YWtlKCk7CisgICAgfSBlbHNlIHsKKyAgICAgICAgaWYgKG1XYWtlTG9ja0FjcXVpcmVkKSB7CisgICAgICAgICAgICByZWxlYXNlX3dha2VfbG9jayhXQUtFX0xPQ0tfTkFNRSk7CisgICAgICAgICAgICBtV2FrZUxvY2tBY3F1aXJlZCA9IGZhbHNlOworICAgICAgICB9CisgICAgfQorfQorCisKK2Jvb2wgU2Vuc29yU2VydmljZTo6aXNXYWtlTG9ja0FjcXVpcmVkKCkgeworICAgIE11dGV4OjpBdXRvbG9jayBfbChtTG9jayk7CisgICAgcmV0dXJuIG1XYWtlTG9ja0FjcXVpcmVkOworfQor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HsKLSAgICAgICAgICAgICAgICAgICAgICAgIGFjcXVpcmVfd2FrZV9sb2NrKFBBUlRJQUxfV0FLRV9MT0NLLCBXQUtFX0xPQ0tfTkFNRSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBtV2FrZUxvY2tBY3F1aXJlZCA9IHRydWU7Ci0gICAgICAgICAgICAgICAgICAgICAgICBBTE9HRF9JRihERUJVR19DT05ORUNUSU9OUywgImFjcXVpcmVkIHdha2Vsb2NrIGZvciBvbl9jaGFuZ2Ugc2Vuc29yICVzIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV0FLRV9MT0NLX05BTUUpOworICAgICAgICAgICAgICAgICAgICAgICAgc2V0V2FrZUxvY2tBY3F1aXJlZExvY2tlZCh0cnVlKTsKICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICBjb25uZWN0aW9uLT5zZW5kRXZlbnRzKCZldmVudCwgMSwgTlVMTCk7CiAgICAgICAgICAgICAgICAgICAgIGlmICghY29ubmVjdGlvbi0+bmVlZHNXYWtlTG9jaygpICYmIG1XYWtlTG9ja0FjcXVpcmVkKSB7CkBAIC05MTksOCArOTQ2LDI2IEBACiAgICAgICAgIH0KICAgICB9CiAgICAgaWYgKHJlbGVhc2VMb2NrKSB7Ci0gICAgICAgIHJlbGVhc2Vfd2FrZV9sb2NrKFdBS0VfTE9DS19OQU1FKTsKLSAgICAgICAgbVdha2VMb2NrQWNxdWlyZWQgPSBmYWxzZTsKKyAgICAgICAgc2V0V2FrZUxvY2tBY3F1aXJlZExvY2tlZChmYWxzZSk7CisgICAgfQorfQorCit2b2lkIFNlbnNvclNlcnZpY2U6OnNlbmRFdmVudHNGcm9tQ2FjaGUoY29uc3Qgc3A8U2Vuc29yRXZlbnRDb25uZWN0aW9uPiYgY29ubmVjdGlvbikgeworICAgIE11dGV4OjpBdXRvbG9jayBfbChtTG9jayk7CisgICAgY29ubmVjdGlvbi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CkgOgogICAgICAgICAgICAgbVZhbHVlKDApLAotICAgICAgICAgICAgbVBoYXNlT2Zmc2V0KHBoYXNlT2Zmc2V0KSwKICAgICAgICAgICAgIG1UcmFjZVZzeW5jKHRyYWNlVnN5bmMpLAogICAgICAgICAgICAgbVZzeW5jT25MYWJlbChTdHJpbmc4Ojpmb3JtYXQoIlZzeW5jT24tJXMiLCBsYWJlbCkpLAogICAgICAgICAgICAgbVZzeW5jRXZlbnRMYWJlbChTdHJpbmc4Ojpmb3JtYXQoIlZTWU5DLSVzIiwgbGFiZWwpKSwKLSAgICAgICAgICAgIG1EaXNwU3luYyhkaXNwU3luYykge30KKyAgICAgICAgICAgIG1EaXNwU3luYyhkaXNwU3luYyksCisgICAgICAgICAgICBtQ2FsbGJhY2tNdXRleCgpLAorICAgICAgICAgICAgbUNhbGxiYWNrKCksCisgICAgICAgICAgICBtVnN5bmNNdXRleCgpLAorICAgICAgICAgICAgbVBoYXNlT2Zmc2V0KHBoYXNlT2Zmc2V0KSwKKyAgICAgICAgICAgIG1FbmFibGVkKGZhbHNlKSB7fQogCiAgICAgdmlydHVhbCB+RGlzcFN5bmNTb3VyY2UoKSB7fQogCiAgICAgdmlydHVhbCB2b2lkIHNldFZTeW5jRW5hYmxlZChib29sIGVuYWJsZSkgewotICAgICAgICAvLyBEbyBOT1QgbG9jayB0aGUgbXV0ZXggaGVyZSBzbyBhcyB0byBhdm9pZCBhbnkgbXV0ZXggb3JkZXJpbmcgaXNzdWVzCi0gICAgICAgIC8vIHdpdGggbG9ja2luZyBpdCBpbiB0aGUgb25EaXNwU3luY0V2ZW50IGNhbGxiYWNrLgorICAgICAgICBNdXRleDo6QXV0b2xvY2sgbG9jayhtVnN5bmNNdXRleCk7CiAgICAgICAgIGlmIChlbmFibGUpIHsKICAgICAgICAgICAgIHN0YXR1c190IGVyciA9IG1EaXNwU3luYy0+YWRkRXZlbnRMaXN0ZW5lcihtUGhhc2VPZmZzZXQsCiAgICAgICAgICAgICAgICAgICAg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aGFzZU9mZnNldCA9IHBoYXNlT2Zmc2V0OworCisgICAgICAgIC8vIElmIHdlJ3JlIG5vdCBlbmFibGVkLCB3ZSBkb24ndCBuZWVkIHRvIG1lc3Mgd2l0aCB0aGUgbGlzdGVuZXJzCisgICAgICAgIGlmICghbUVuYWJsZWQpIHsKKyAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgfQorCisgICAgICAgIC8vIFJlbW92ZSB0aGUgbGlzdGVuZXIgd2l0aCB0aGUgb2xkIG9mZnNldAorICAgICAgICBzdGF0dXNfdCBlcnIgPSBtRGlzcFN5bmMtPnJlbW92ZUV2ZW50TGlzdGVuZXIoCisgICAgICAgICAgICAgICAgc3RhdGljX2Nhc3Q8RGlzcFN5bmM6OkNhbGxiYWNrKj4odGhpcykpOworICAgICAgICBpZiAoZXJyICE9IE5PX0VSUk9SKSB7CisgICAgICAgICAgICBBTE9HRSgiZXJyb3IgdW5yZWdpc3RlcmluZyB2c3luYyBjYWxsYmFjazogJXMgKCVkKSIsCisgICAgICAgICAgICAgICAgICAgIHN0cmVycm9yKC1lcnIpLCBlcnIpOworICAgICAgICB9CisKKyAgICAgICAgLy8gQWRkIGEgbGlzdGVuZXIgd2l0aCB0aGUgbmV3IG9mZnNldAorICAgICAgICBlcnIgPSBtRGlzcFN5bmMtPmFkZEV2ZW50TGlzdGVuZXIobVBoYXNlT2Zmc2V0LAorICAgICAgICAgICAgICAgIHN0YXRpY19jYXN0PERpc3BTeW5jOjpDYWxsYmFjayo+KHRoaXMpKTsKKyAgICAgICAgaWYgKGVyciAhPSBOT19FUlJPUikgeworICAgICAgICAgICAgQUxPR0UoImVycm9yIHJlZ2lzdGVyaW5nIHZzeW5jIGNhbGxiYWNrOiAlcyAoJWQpIiwKKyAgICAgICAgICAgICAgICAgICAgc3RyZXJyb3IoLWVyciksIGVycik7CisgICAgICAgIH0KKyAgICB9CisKIHByaXZhdGU6CiAgICAgdmlydHVhbCB2b2lkIG9uRGlzcFN5bmNFdmVudChuc2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XNzYWdlSW52YWxpZGF0ZSgpIHsKK2Jvb2wgU3VyZmFjZUZsaW5nZXI6OmhhbmRsZU1lc3NhZ2VJbnZhbGlkYXRlKCkgewogICAgIEFUUkFDRV9DQUxMKCk7Ci0gICAgaGFuZGxlUGFnZUZsaXAoKTsKKyAgICByZXR1cm4gaGFuZGxlUGFnZUZsaXAoKTsKIH0KIAogdm9pZCBTdXJmYWNlRmxpbmdlcjo6aGFuZGxlTWVzc2FnZVJlZnJlc2goKSB7CkBAIC0xMzI5LDcgKzEzOTEsMjIgQEAKICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGV0Yy4pIGJ1dCBubyBpbnRlcm5hbCBzdGF0ZSAoaS5lLiBhIERpc3BsYXlEZXZpY2UpLgogICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHN0YXRlLnN1cmZhY2UgIT0gTlVMTCkgewogCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgaHdjRGlzcGxheUlkID0gYWxsb2NhdGVId2NEaXNwbGF5SWQoc3RhdGUudHlwZSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IHdpZHRoID0gMDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgc3RhdHVzID0gc3RhdGUuc3VyZmFjZS0+cXVlcnkoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOQVRJVkVfV0lORE9XX1dJRFRILCAmd2lkdGgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFMT0dFX0lGKHN0YXR1cyAhPSBOT19FUlJPUiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJVbmFibGUgdG8gcXVlcnkgd2lkdGggKCVkKSIsIHN0YXR1cyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGhlaWdodCA9IDA7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdHVzID0gc3RhdGUuc3VyZmFjZS0+cXVlcnkoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOQVRJVkVfV0lORE9XX0hFSUdIVCwgJmhlaWdodCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQUxPR0VfSUYoc3RhdHVzICE9IE5PX0VSUk9SLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIlVuYWJsZSB0byBxdWVyeSBoZWlnaHQgKCVkKSIsIHN0YXR1cyk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE1BWF9WSVJUVUFMX0RJU1BMQVlfRElNRU5TSU9OID09IDAgfHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh3aWR0aCA8PSBNQVhfVklSVFVBTF9ESVNQTEFZX0RJTUVOU0lPTiAmJgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodCA8PSBNQVhfVklSVFVBTF9ESVNQTEFZX0RJTUVOU0lPTikpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaHdjRGlzcGxheUlkID0gYWxsb2NhdGVId2NEaXNwbGF5SWQoc3RhdGUudHlwZSk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3A8VmlydHVhbERpc3BsYXlTdXJmYWNlPiB2ZHMgPSBuZXcgVmlydHVhbERpc3BsYXlTdXJmYWNlKAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKm1Id2MsIGh3Y0Rpc3BsYXlJZCwgc3RhdGUuc3VyZmFjZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJxUHJvZHVjZXIsIGJxQ29uc3VtZXIsIHN0YXRlLmRpc3BsYXlOYW1lKTsKQEAgLTE2NjgsMTIgKzE3NDUsMTMgQEAKICAgICB9CiB9CiAKLXZvaWQgU3VyZmFjZUZsaW5nZXI6OmhhbmRsZVBhZ2VGbGlwKCkKK2Jvb2wgU3VyZmFjZUZsaW5nZ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OwogfQogCkBAIC0yODI4LDYgKzI5MzgsMjEgQEAKICAgICAgICAgICAgICAgICBtUHJpbWFyeURpc3BTeW5jLnNldFJlZnJlc2hTa2lwQ291bnQobik7CiAgICAgICAgICAgICAgICAgcmV0dXJuIE5PX0VSUk9SOwogICAgICAgICAgICAgfQorICAgICAgICAgICAgY2FzZSAxMDE3OiB7CisgICAgICAgICAgICAgICAgbiA9IGRhdGEucmVhZEludDMyKCk7CisgICAgICAgICAgICAgICAgbUZvcmNlRnVsbERhbWFnZSA9IHN0YXRpY19jYXN0PGJvb2w+KG4pOworICAgICAgICAgICAgICAgIHJldHVybiBOT19FUlJPUjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGNhc2UgMTAxODogeyAvLyBNb2RpZnkgQ2hvcmVvZ3JhcGhlcidzIHBoYXNlIG9mZnNldAorICAgICAgICAgICAgICAgIG4gPSBkYXRhLnJlYWRJbnQzMigpOworICAgICAgICAgICAgICAgIG1FdmVudFRocmVhZC0+c2V0UGhhc2VPZmZzZXQoc3RhdGljX2Nhc3Q8bnNlY3NfdD4obikpOworICAgICAgICAgICAgICAgIHJldHVybiBOT19FUlJPUjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGNhc2UgMTAxOTogeyAvLyBNb2RpZnkgU3VyZmFjZUZsaW5nZXIncyBwaGFzZSBvZmZzZXQKKyAgICAgICAgICAgICAgICBuID0gZGF0YS5yZWFkSW50MzIoKTsKKyAgICAgICAgICAgICAgICBtU0ZFdmVudFRocmVhZC0+c2V0UGhhc2VPZmZzZXQoc3RhdGljX2Nhc3Q8bnNlY3NfdD4obikpOworICAgICAgICAgICAgICAgIHJldHVybiBOT19FUlJPUjsKKyAgICAgICAgICAgIH0KICAgICAgICAgfQogICAgIH0KICAgICByZXR1cm4gZXJyOwpAQCAtMzA3NSw3ICszMjAwLDcgQEAKICAgICBjb25zdCBpbnQzMl90IGh3X3cgPSBody0+Z2V0V2lkdGgoKTsKICAgICBjb25zdCBpbnQzMl90IGh3X2ggPSBody0+Z2V0SGVpZ2h0KCk7CiAgICAgY29uc3QgYm9vbCBmaWx0ZXJpbmcgPSBzdGF0aWNfY2FzdDxpbnQzMl90PihyZXFXaWR0aCkgIT0gaHdfdyB8fAotICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RhdGljX2Nhc3Q8aW50MzJfdD4ocmVxV2lkdGgpICE9IGh3X2g7CisgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0aWNfY2FzdDxpbnQzMl90PihyZXFIZWlnaHQpICE9IGh3X2g7CiAKICAgICAvLyBpZiBhIGRlZmF1bHQgb3IgaW52YWxpZCBzb3VyY2VDcm9wIGlzIHBhc3NlZCBpbiwgc2V0IHJlYXNvbmFibGUgdmFsdWVzCiAgICAgaWYgKHNvdXJjZUNyb3Aud2lkdGgoKSA9PSAwIHx8IHNvdXJjZUNyb3AuaGVpZ2h0KCkgPT0gMCB8fApAQCAtMzIwMCw2ICszMzI1LDggQEAKICAgICAgICAgICAgICAgICAgICAgICAgIEVHTFN5bmNLSFIgc3luYzsKICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghREVCVUdfU0NSRUVOU0hPVFMpIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN5bmMgPSBlZ2xDcmVhdGVTeW5jS0hSKG1FR0xEaXNwbGF5LCBFR0xfU1lOQ19OQVRJVkVfRkVOQ0VfQU5EUk9JRCwgTlVMTCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBuYXRpdmUgZmVuY2UgZmQgd2lsbCBub3QgYmUgcG9wdWxhdGVkIHVudGlsIGZsdXNoKCkgaXMgZG9uZS4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGdldFJlbmRlckVuZ2luZSgpLmZsdXNoKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN5bmMgPSBFR0xfTk9fU1lOQ19LSFI7CiAgICAgICAgICAgICAgICA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vcm0uY3BwCisrKyBiL3NlcnZpY2VzL3N1cmZhY2VmbGluZ2VyL1RyYW5zZm9ybS5jcHAKQEAgLTMwMSwxNiArMzAxLDE2IEBACiAgICAgLy8gKFQqTSleLTEgPSBNXi0xICogVF4tMQogICAgIFRyYW5zZm9ybSByZXN1bHQ7CiAgICAgaWYgKG1UeXBlIDw9IFRSQU5TTEFURSkgewotICAgICAgICAvLyAxIDAgeAotICAgICAgICAvLyAwIDEgeQotICAgICAgICAvLyAwIDAgMQorICAgICAgICAvLyAxIDAgMAorICAgICAgICAvLyAwIDEgMAorICAgICAgICAvLyB4IHkgMQogICAgICAgICByZXN1bHQgPSAqdGhpczsKICAgICAgICAgcmVzdWx0Lm1NYXRyaXhbMl1bMF0gPSAtcmVzdWx0Lm1NYXRyaXhbMl1bMF07CiAgICAgICAgIHJlc3VsdC5tTWF0cml4WzJdWzFdID0gLXJlc3VsdC5tTWF0cml4WzJdWzFdOwogICAgIH0gZWxzZSB7Ci0gICAgICAgIC8vIGEgYyB4Ci0gICAgICAgIC8vIGIgZCB5Ci0gICAgICAgIC8vIDAgMCAxCisgICAgICAgIC8vIGEgYyAwCisgICAgICAgIC8vIGIgZCAwCisgICAgICAgIC8vIHggeSAxCiAgICAgICAgIGNvbnN0IG1hdDMzJiBNKG1NYXRyaXgpOwogICAgICAgICBjb25zdCBmbG9hdCBhID0gTVswXVswXTsKICAgICAgICAgY29uc3QgZmxvYXQgYiA9IE1bMV1bMF07CkBAIC0zMTksMTYgKzMxOSwxNyBAQAogICAgICAgICBjb25zdCBmbG9hdCB4ID0gTVsyXVswXTsKICAgICAgICAgY29uc3QgZmxvYXQgeSA9IE1bMl1bMV07CiAKLSAgICAgICAgVHJhbnNmb3JtIFIsIFQ7CiAgICAgICAgIGNvbnN0IGZsb2F0IGlkZXQgPSAxLjAgLyAoYSpkIC0gYipjKTsKLSAgICAgICAgUi5tTWF0cml4WzBdWzBdID0gIGQqaWRldDsgICAgUi5tTWF0cml4WzBdWzFdID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