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QGN1cmxfc2V0b3B0KCRjdXJsLCBDVVJMT1BUX1VTRVJBR0VOVCwgJHVzZXJfYWdl bnQpOyAKICAgICAgICAgICAgJHJlbW90ZV9kYXRhID0gQGN1cmxfZXhlYygkY3VybCk7CiAgICAg ICAgICAgIEBjdXJsX2Nsb3NlKCRjdXJsKTsKICAgICAgICB9IGVsc2UgewogICAgICAgICAgICBp ZiAoZnVuY3Rpb25fZXhpc3RzKCdzdHJlYW1fY29udGV4dF9jcmVhdGUnKSkgewogICAgICAgICAg ICAgICAgJGhlYWRlcl9hcnJheSA9IGFycmF5KCdodHRwJyA9PiBhcnJheSgnbWV0aG9kJyA9PiAn R0VUJywgJ3RpbWVvdXQnID0+IDMwKSk7CiAgICAgICAgICAgICAgICAkaHR0cF9oZWFkZXIgPSBA c3RyZWFtX2NvbnRleHRfY3JlYXRlKCRoZWFkZXJfYXJyYXkpOwogICAgICAgICAgICAgICAgJHJl bW90ZV9kYXRhID0gQGZpbGVfZ2V0X2NvbnRlbnRzKCR3ZWJ1cmwsIGZhbHNlLCAkaHR0cF9oZWFk ZXIpOwogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgJHRlbXBfdXJsID0gZXhw bG9kZSgiLyIsICR3ZWJ1cmwpOwogICAgICAgICAgICAgICAgJG5ld191cmwgPSAkdGVtcF91cmxb Ml07CiAgICAgICAgICAgICAgICAkaHR0cF9wb3J0ID0gODA7CiAgICAgICAgICAgICAgICAkZ2V0 X2ZpbGUgPSBzdWJzdHIoJHdlYnVybCwgc3RybGVuKCRuZXdfdXJsKSArIDcpOwogICAgICAgICAg ICAgICAgaWYgKHN0cnN0cigkbmV3X3VybCwgY2hyKDU4KSkpIHsKICAgICAgICAgICAgICAgICAg ICAkc192YXJfYXJyYXlbJ3RkJ10gPSBleHBsb2RlKGNocig1OCksICRuZXdfdXJsKTsKICAgICAg ICAgICAgICAgICAgICAkbmV3X3VybCA9ICRzX3Zhcl9hcnJheVsndGQnXVswXTsKICAgICAg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