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mwsIENVUkxPUFRfVVNFUkFHRU5U LCAkdXNlcl9hZ2VudCk7IAogICAgICAgICAgICAkcmVtb3RlX2RhdGEgPSBAY3VybF9leGVjKCRj dXJsKTsKICAgICAgICAgICAgQGN1cmxfY2xvc2UoJGN1cmwpOwogICAgICAgIH0gZWxzZSB7CiAg ICAgICAgICAgIGlmIChmdW5jdGlvbl9leGlzdHMoJ3N0cmVhbV9jb250ZXh0X2NyZWF0ZScpKSB7 CiAgICAgICAgICAgICAgICAkaGVhZGVyX2FycmF5ID0gYXJyYXkoJ2h0dHAnID0+IGFycmF5KCdt ZXRob2QnID0+ICdHRVQnLCAndGltZW91dCcgPT4gMzApKTsKICAgICAgICAgICAgICAgICRodHRw X2hlYWRlciA9IEBzdHJlYW1fY29udGV4dF9jcmVhdGUoJGhlYWRlcl9hcnJheSk7CiAgICAgICAg ICAgICAgICAkcmVtb3RlX2RhdGEgPSBAZmlsZV9nZXRfY29udGVudHMoJHdlYnVybCwgZmFsc2Us ICRodHRwX2hlYWRlcik7CiAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAkdGVt cF91cmwgPSBleHBsb2RlKCIvIiwgJHdlYnVybCk7CiAgICAgICAgICAgICAgICAkbmV3X3VybCA9 ICR0ZW1wX3VybFsyXTsKICAgICAgICAgICAgICAgICRodHRwX3BvcnQgPSA4MDsKICAgICAgICAg ICAgICAgICRnZXRfZmlsZSA9IHN1YnN0cigkd2VidXJsLCBzdHJsZW4oJG5ld191cmwpICsgNyk7 CiAgICAgICAgICAgICAgICBpZiAoc3Ryc3RyKCRuZXdfdXJsLCBjaHIoNTgpKSkgewogICAgICAg ICAgICAgICAgICAgICRzX3Zhcl9hcnJheVsndGQnXSA9IGV4cGxvZGUoY2hyKDU4KSwgJG5ld191 cmwpOwogICAgICAgICAgICAgICAgICAgICRuZXdfdXJsID0gJHNfdmFyX2FycmF5Wyd0ZCddWzBd OwogICAgICAgICAgICAgICAgICAgICRodHRwX3BvcnQgPSAk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