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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCnN1YiBzZXRTIHsKICAgIG15ICgkc2VudGVuY2UpID0gQF87CiAgICAKICAgICRzZW50ZW5jZS0+c2V0X2dpKCdzJyk7CgkgICAgCiAgICAjIHRoZSBhdHRzIG9mIDxzZW50ZW5jZT46CiAgICAjICAgIFVTRSAgIDEgQGlkPSJzLWJjZDBmM2ZhLWJiZDNkYWM0LWY3NDI5MDkwIgogICAgIyAgICBVU0UgICAyIEBsYW5nPSJmaW4iIC0+IHhtbDpsYW5nIAogICAgIyAgICA/ICAgICAzIEBsYW5nX2NvbmY9IjAuNjczNDg1MyI+IC0+IFRvRG8gQGNlcnQgPwkgICAgCiAgICAKICAgICMgc2V0IGF0dHJzIG9mIDxzPgogICAgJHNlbnRlbmNlLT5zZXRfYXR0KCJ4bWw6bGFuZyIsICRzZW50ZW5jZS0+YXR0KCJsYW5nIikpOyAgIyBUb0RvOiBjb252ZXJ0IHRoZSB2YWx1ZSAvIGludHJvZHVjZSBhIGhhc2ggZm9yIGxvb2t1cCAoaW5wdXQgdmFsdWVzOiAiZmluIiwgInh4eCIsIC4uLi4pCiAgICAjICRzZW50ZW5jZS0+Y2hhbmdlX2F0dF9uYW1lKCdpZCcsICd4bWw6aWQnKTsgICAgICAgICAgICAjIG5pY2h0IGVpbmRldXRpZwogICAgJHNlbnRlbmNlLT5kZWxfYXR0KCdpZCcpOwogICAgJHNlbnRlbmNlLT5kZWxfYXR0KCJsYW5nIik7ICAgICAgICAgICAgICAgICAgICAgICAgICMgcmVwbGFjZWQgYnkgeG1sOmxhbmcKICAgICRzZW50ZW5jZS0+ZGVsX2F0dCgibGFuZ19jb25mIik7ICAgICAgICAgICAgICAgICAgICAjIGZvciB0aGUgdGltZSBiZ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