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iAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkemlwLT5vcGVuKCRfUE9TVFsncDInXSwgMSkpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGRpcigkX1NFU1NJT05bJ2MnXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCgkX1NFU1NJT05bJ2YnXSBhcyAkZikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigkZiA9PSAnLi4nKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKEBpc19maWxlKCRfU0VTU0lPTlsnYyddLiRmKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmFkZEZpbGUoJF9TRVNTSU9OWydjJ10uJGYsICRmKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZWlmKEBpc19kaXIoJF9TRVNTSU9OWydjJ10uJGYpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaXRlcmF0b3IgPSBuZXcgUmVjdXJzaXZlSXRlcmF0b3JJdGVyYXRvcihuZXcgUmVjdXJzaXZlRGlyZWN0b3J5SXRlcmF0b3IoJGYuJy8nKSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoICgkaXRlcmF0b3IgYXMgJGtleT0+JHZhbHVlKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHppcC0+YWRkRmlsZShyZWFscGF0aCgka2V5KSwgJGtleSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hkaXIoJEdMT0JBTFNbJ2N3ZCddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5jbG9zZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICB9DQoJCQkJfSBlbHNlaWYoJF9TRVNTSU9OWydhY3QnXSA9PSAndW56aXAnKSB7DQoJCQkJCWlmKGNsYXNzX2V4aXN0cygnWmlwQXJjaGl2ZScpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAkemlwID0gbmV3IFppcEFyY2hpdmUoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2goJF9TRVNTSU9OWydmJ10gYXMgJGYpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigkemlwLT5vcGVuKCRfU0VTU0lPTlsnYyddLiRmKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkemlwLT5leHRyYWN0VG8oJEdMT0JBTFNbJ2N3ZCddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHppcC0+Y2xvc2UoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIH0NCgkJCQl9IGVsc2VpZigkX1NFU1NJT05bJ2FjdCddID09ICd0YXInKSB7DQogICAgICAgICAgICAgICAgICAgIGNoZGlyKCRfU0VTU0lPTlsnYyddKTsNCiAgICAgICAgICAgICAgICAgICAgJF9TRVNTSU9OWydmJ10gPSBhcnJheV9tYXAoJ2VzY2FwZXNoZWxsYXJnJywgJF9TRVNTSU9OWydmJ10pOw0KICAgICAgICAgICAgICAgICAgICBCT0ZGRXgoJ3RhciBjZnp2ICcgLiBlc2NhcGVzaGVsbGFyZygkX1BPU1RbJ3AyJ10pIC4gJyAnIC4gaW1wbG9kZSgnICcsICRfU0VTU0lPTlsnZiddKSk7DQogICAgICAgICAgICAgICAgICAgIGNoZGlyKCRHTE9CQUxTWydjd2QnXSk7DQoJCQkJfQ0KCQ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