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A3ICsKLSBNYWtlZmlsZS5hbSAgICAgICAgICAgICB8ICAgICAyICstCi0gY29uZmlndXJlLmFjICAgICAgICAgICAgfCAgICAgNiArLQotIGludGwvQ2hhbmdlTG9nICAgICAgICAgIHwgICAgIDQgLQotIGludGwvTWFrZWZpbGUuaW4gICAgICAgIHwgICA1ODcgLS0KLSBpbnRsL1ZFUlNJT04gICAgICAgICAgICB8ICAgICAxIC0KLSBpbnRsL2JpbmR0ZXh0ZG9tLmMgICAgICB8ICAgMzQwIC0KLSBpbnRsL2NvbmZpZy5jaGFyc2V0ICAgICB8ICAgNjQwIC0tCi0gaW50bC9kY2dldHRleHQuYyAgICAgICAgfCAgICA1NiAtCi0gaW50bC9kY2lnZXR0ZXh0LmMgICAgICAgfCAgMTY4OSAtLS0tLQotIGludGwvZGNuZ2V0dGV4dC5jICAgICAgIHwgICAgNTcgLQotIGludGwvZGdldHRleHQuYyAgICAgICAgIHwgICAgNTggLQotIGludGwvZG5nZXR0ZXh0LmMgICAgICAgIHwgICAgNTkgLQotIGludGwvZXZhbC1wbHVyYWwuaCAgICAgIHwgICAxMDggLQotIGludGwvZXhwbG9kZW5hbWUuYyAgICAgIHwgICAxMzUgLQotIGludGwvZXhwb3J0LmggICAgICAgICAgIHwgICAgIDYgLQotIGludGwvZmluZGRvbWFpbi5jICAgICAgIHwgICAyMTIgLQotIGludGwvZ2V0dGV4dC5jICAgICAgICAgIHwgICAgNjMgLQotIGludGwvZ2V0dGV4dFAuaCAgICAgICAgIHwgICAyOTcgLQotIGludGwvZ21vLmggICAgICAgICAgICAgIHwgICAxNTIgLQotIGludGwvaGFzaC1zdHJpbmcuYyAgICAgIHwgICAgNTEgLQotIGludGwvaGFzaC1zdHJpbmcuaCAgICAgIHwgICAgMzYgLQotIGludGwvaW50bC1jb21wYXQuYyAgICAgIHwgICAxMzMgLQotIGludGwvaW50bC1leHBvcnRzLmMgICAgIHwgICAgMzYgLQotIGludGwvbDEwbmZsaXN0LmMgICAgICAgIHwgICA0MDAgLS0KLSBpbnRsL2xhbmdwcmVmcy5jICAgICAgICB8ICAgMTMwIC0KLSBpbnRsL2xpYmdudWludGwuaC5pbiAgICB8ICAgNDE5IC0tCi0gaW50bC9saWJpbnRsLnJjICAgICAgICAgfCAgICAzOCAtCi0gaW50bC9sb2FkaW5mby5oICAgICAgICAgfCAgIDEzMiAtCi0gaW50bC9sb2FkbXNnY2F0LmMgICAgICAgfCAgMTMzNiAtLS0tCi0gaW50bC9sb2NhbGNoYXJzZXQuYyAgICAgfCAgIDQ2MSAtLQotIGludGwvbG9jYWxjaGFyc2V0LmggICAgIHwgICAgNDIgLQotIGludGwvbG9jYWxlLmFsaWFzICAgICAgIHwgICAgNzcgLQotIGludGwvbG9jYWxlYWxpYXMuYyAgICAgIHwgICA0MzkgLS0KLSBpbnRsL2xvY2FsZW5hbWUuYyAgICAgICB8ICAxNTA3IC0tLS0KLSBpbnRsL2xvY2suYyAgICAgICAgICAgICB8ICAgOTIyIC0tLQotIGludGwvbG9jay5oICAgICAgICAgICAgIHwgIDExMDUgLS0tCi0gaW50bC9sb2cuYyAgICAgICAgICAgICAgfCAgIDExNiAtCi0gaW50bC9uZ2V0dGV4dC5jICAgICAgICAgfCAgICA2NSAtCi0gaW50bC9vczJjb21wYXQuYyAgICAgICAgfCAgICA5OCAtCi0gaW50bC9vczJjb21wYXQuaCAgICAgICAgfCAgICA0NiAtCi0gaW50bC9vc2RlcC5jICAgICAgICAgICAgfCAgICAyNiAtCi0gaW50bC9wbHVyYWwtZXhwLmMgICAgICAgfCAgIDE1NSAtCi0gaW50bC9wbHVyYWwtZXhwLmggICAgICAgfCAgIDEyOSAtCi0gaW50bC9wbHVyYWwuYyAgICAgICAgICAgfCAgMTk4MSAtLS0tLS0KLSBpbnRsL3BsdXJhbC55ICAgICAgICAgICB8ICAgMzg1IC0tCi0gaW50bC9wcmludGYtYXJncy5jICAgICAgfCAgIDE4OCAtCi0gaW50bC9wcmludGYtYXJncy5oICAgICAgfCAgIDE1NSAtCi0gaW50bC9wcmludGYtcGFyc2UuYyAgICAgfCAgIDU5MCAtLQotIGludGwvcHJpbnRmLXBhcnNlLmggICAgIHwgICAgNzUgLQotIGludGwvcHJpbnRmLmMgICAgICAgICAgIHwgICA0MjcgLS0KLSBpbnRsL3JlZi1hZGQuc2luICAgICAgICB8ICAgIDMxIC0KLSBpbnRsL3JlZi1kZWwuc2luICAgICAgICB8ICAgIDI2IC0KLSBpbnRsL3JlbG9jYXRhYmxlLmMgICAgICB8ICAgNDY4IC0tCi0gaW50bC9yZWxvY2F0YWJsZS5oICAgICAgfCAgICA3OSAtCi0gaW50bC90ZXh0ZG9tYWluLmMgICAgICAgfCAgIDEyNyAtCi0gaW50bC90c2VhcmNoLmMgICAgICAgICAgfCAgIDY4NCAtLQotIGludGwvdHNlYXJjaC5oICAgICAgICAgIHwgICAgODMgLQotIGludGwvdmFzbnByaW50Zi5jICAgICAgIHwgIDQ2NzcgLS0tLS0tLS0tLS0tLQotIGludGwvdmFzbnByaW50Zi5oICAgICAgIHwgICAgNzggLQotIGludGwvdmFzbndwcmludGYuaCAgICAgIHwgICAgNDYgLQotIGludGwvdmVyc2lvbi5jICAgICAgICAgIHwgICAgMjYgLQotIGludGwvd3ByaW50Zi1wYXJzZS5oICAgIHwgICAgNzUgLQotIGludGwveHNpemUuaCAgICAgICAgICAgIHwgICAxMDkgLQotIG00L2ludGxtYWNvc3gubTQgICAgICAgIHwgICAgNTUgKy0KLSBwby9DaGFuZ2VMb2cgICAgICAgICAgICB8ICAgICA4ICsKLSBwby9SdWxlcy1xdW90ICAgICAgICAgICB8ICAgIDE5ICstCi0gcG8vZW5AYm9sZHF1b3QuaGVhZGVyICAgfCAgICAgMiArLQotIHBvL2VuQHF1b3QuaGVhZGVyICAgICAgIHwgICAgIDIgKy0KLSBwby9pbnNlcnQtaGVhZGVyLnNpbiAgICB8ICAgICA1ICsKLSBwby9yZW1vdmUtcG90Y2RhdGUuc2luICB8ICAgICA4ICstCi0gNzQgZm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RlIGVsIGVuIGVuX0dCIGVvCi0tICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0tICAgICBDb21wZW5kaXVtICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgW10gICAgICB8Ci0tICAgICBhMnBzICAgICAgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSBbXSBbXSAgICAgW10gICAgICB8Ci0tICAgICBhZWdpcyAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICBhbnQtcGhvbmUgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICBhbnViaXMgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBhcC11dGlscyAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBhc3BlbGwgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICBbXSBbXSAgICAgICAgW10gICAgICB8Ci0tICAgICBiYXNoICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBiZmQgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBiaWJzaGVsZiAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBiaW51dGlscyAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBiaXNvbiAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBiaXNvbi1ydW50aW1lICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBibHVlei1waW4gICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgICBbXSB8Ci0tICAgICBjZmxvdyAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBjbGlzcCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICBbXSAgICAgICAgICB8Ci0tICAgICBjb25zb2xlLXRvb2xzICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBjb3JldXRpbHMgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBjcGlvICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBjcHBsaWIgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBjcnlwdG9uaXQgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBkaWFsb2cgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBkaWZmdXRpbHMgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICBbXSBbXSBbXSAgICAgICAgICBbXSB8Ci0tICAgICBkb29kbGUgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBlMmZzcHJvZ3MgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBlbnNjcmlwdCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgW10gICAgICB8Ci0tICAgICBmZXRjaG1haWwgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAoKSBbXSAgICAgW10gICAgICB8Ci0tICAgICBmaW5kdXRpbHMgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBmaW5kdXRpbHNfc3RhYmxlICAgfCAgICAgICAgICAgICAgICBbXSAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBmbGV4ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBmc2xpbnQgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnYXMgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnYXdrICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBnY2FsICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnY2MgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBnZXR0ZXh0LWV4YW1wbGVzICAgfCBbXSAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSBbXSAgICAgICAgICBbXSB8Ci0tICAgICBnZXR0ZXh0LXJ1bnRpbWUgICAgfCAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICBbXSB8Ci0tICAgICBnZXR0ZXh0LXRvb2xzICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBnaXAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbGl2ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBnbHVuYXJjbG9jayAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbXVsdCAgICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBnbnViaWZmICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICBnbnVjYXNoICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAoKSAoKSAgICAgW10gICAgICB8Ci0tICAgICBnbnVlZHUgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbnVsaWIgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbnVuZXQgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbnVuZXQtZ3RrICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbnV0bHMgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtYWVyaWFsICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtYmVhbSAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtY2FsZW5kYXIgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtY2xvY2sgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtY29uZiAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtY29udGFjdHMgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtZWRpdCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtZmlsZW1hbmFnZXIgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtZ28gICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtbG9naW4gICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtb3duZXJpbmZvICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtcGFja2FnZSAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtc2tldGNoYm9vayAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtc3UgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtdGFza21hbmFnZXIgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtdGltZXNoZWV0ICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtdG9kYXkgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtdG9kbyAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGhvdG8yICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICAgW10gICAgICB8Ci0tICAgICBncHJvZiAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncHNkcml2ZSAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncmFtYWRvaXIgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBncmVwICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBncmV0bCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICBnc2FzbCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnc3MgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnc3QtcGx1Z2lucy1iYWQgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnc3QtcGx1Z2lucy1iYXNlICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnc3QtcGx1Z2lucy1nb29kICAgfCAgICAgICAgICAgICAgICBbXSAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnc3QtcGx1Z2lucy11Z2x5ICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnc3RyZWFtZXIgICAgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgICAgW10gICAgICB8Ci0tICAgICBndGljayAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICBndGthbSAgICAgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBndGtvcnBoYW4gICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBndGtzcGVsbCAgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICBbXSB8Ci0tICAgICBndXRlbnByaW50ICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBoZWxsbyAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICBbXSB8Ci0tICAgICBoZXJyaWUgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBoeWxhZmF4ICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBpZHV0aWxzICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBpbmRlbnQgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICBbXSAgICAgICAgICAgICBbXSB8Ci0tICAgICBpc29fMTU5MjQgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBpc29fMzE2NiAgICAgICAgICAgfCAgICAgICBbXSAgICBbXSBbXSBbXSBbXSBbXSBbXSBbXSBbXSBbXSAgICAgICAgICBbXSB8Ci0tICAgICBpc29fMzE2Nl8yICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBpc29fNDIxNyAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBpc29fNjM5ICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICAgICAgICBbXSB8Ci0tICAgICBqcGlsb3QgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBqdGFnICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBqd2hvaXMgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBrYmQgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSBbXSAgICAgICAgICAgICB8Ci0tICAgICBrZXl0b3VjaCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBrZXl0b3VjaC1lZGl0b3IgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBrZXl0b3VjaC1rZXlib2EuLi4gfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBsYXRyaW5lICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICBsZCAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBsZWFmcGFkICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICB8Ci0tICAgICBsaWJjICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJleGlmICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJleHRyYWN0b3IgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJncGV3aWRnZXQgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJncGctZXJyb3IgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJncGhvdG8yICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJncGhvdG8yX3BvcnQgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJnc2FzbCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJpY29udiAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICBbXSB8Ci0tICAgICBsaWJpZG4gICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBsaWZlbGluZXMgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWx5cG9uZCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBsaW5nb3RlYWNoICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBscHJuZyAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBseW54ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBtNCAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSBbXSAgICAgICAgICAgICB8Ci0tICAgICBtYWlsZnJvbWQgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBtYWlsdXRpbHMgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBtYWtlICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBtYW4tZGIgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBtaW5pY29tICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBuYW5vICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICBbXSAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBvcGNvZGVzICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBwYXJ0ZWQgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBwaWxvdC1xb2YgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBwb3B0ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBwc21pc2MgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBwd2R1dGlscyAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBxb2YgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICByYWRpdXMgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICByZWNvZGUgICAgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICBbXSBbXSBbXSAgICAgICAgICBbXSB8Ci0tICAgICBycG0gICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBzY3JlZW0gICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBzY3JvbGxrZWVwZXIgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgICBbXSBbXSBbXSBbXSBbXSAgICAgICAgW10gICAgICB8Ci0tICAgICBzZWQgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgICAgICAgICBbXSB8Ci0tICAgICBzaGFyZWQtbWltZS1pbmZvICAgfCAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICBbXSAoKSBbXSAgICAgW10gICBbXSB8Ci0tICAgICBzaGFydXRpbHMgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSAgICBbXSBbXSBbXSAgICAgICAgICAgICB8Ci0tICAgICBzaGlzaGkgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBza2VuY2lsICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICBzb2xmZWdlICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBzb3VuZHRyYWNrZXIgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBzcCAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICBzeXN0ZW0tdG9vbHMtYmEuLi4gfCAgICAgICBbXSAgICAgICBbXSBbXSBbXSBbXSAgICBbXSBbXSBbXSAgICAgW10gICAgICB8Ci0tICAgICB0YXIgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICB0ZXhpbmZvICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICBbXSB8Ci0tICAgICB0aW4gICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgICAgKCkgICAgICB8Ci0tICAgICB0dXhwYWludCAgICAgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICBbXSBbXSAgICAgICAgW10gICBbXSB8Ci0tICAgICB1bmljb2RlLWhhbi10cmEuLi4gfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB1bmljb2RlLXRyYW5zbGEuLi4gfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB1dGlsLWxpbnV4ICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICB1dGlsLWxpbnV4LW5nICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICBbXSBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICB2b3JiaXMtdG9vbHMgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB3YXN0ZXNlZGdlICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICB8Ci0tICAgICB3ZGlmZiAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICAgW10gICAgICB8Ci0tICAgICB3Z2V0ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgICBbXSAgICAgICAgICAgICAgICB8Ci0tICAgICB4Y2hhdCAgICAgICAgICAgICAgfCAgICAgICAgICAgICBbXSBbXSAgICBbXSBbXSAgICAgICBbXSBbXSAgICAgW10gICAgICB8Ci0tICAgICB4a2V5Ym9hcmQtY29uZmlnICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB4cGFkICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgW10gICAgICB8Ci0tICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0tICAgICAgICAgICAgICAgICAgICAgICAgICBhZiBhbSBhciBheiBiZSBiZyBicyBjYSBjcyBjeSBkYSBkZSBlbCBlbiBlbl9HQiBlbwotLSAgICAgICAgICAgICAgICAgICAgICAgICAgIDYgIDAgIDIgIDEgIDggMjYgIDIgNDAgNDggIDIgNTYgODggMTUgIDEgIDE1ICAgMTgKLS0KLS0gICAgICAgICAgICAgICAgICAgICAgICAgIGVzIGV0IGV1IGZhIGZpIGZyICBnYSBnbCBndSBoZSBoaSBociBodSBpZCBpcyBpdAotLSAgICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLS0gICAgIENvbXBlbmRpdW0gICAgICAgICB8IFtdICAgICAgICAgIFtdIFtdICBbXSAgICAgICAgICAgICAgICBbXSAgICAgICAgICB8Ci0tICAgICBhMnBzICAgICAgICAgICAgICAgfCAgICBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCkgfAotLSAgICAgYWVnaXMgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGFudC1waG9uZSAgICAgICAgICB8ICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBhbnViaXMgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgYXAtdXRpbHMgICAgICAgICAgIHwgICAgICAgICAgICAgW10gW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGFzcGVsbCAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIFtdICBbXSAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBiYXNoICAgICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgYmZkICAgICAgICAgICAgICAgIHwgW10gICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGJpYnNoZWxmICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBiaW51dGlscyAgICAgICAgICAgfCBbXSAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgYmlzb24gICAgICAgICAgICAgIHwgW10gW10gICAgICAgICAgW10gIFtdICAgICAgICAgICAgICAgICAgIFtdICAgIFtdIHwKLS0gICAgIGJpc29uLXJ1bnRpbWUgICAgICB8ICAgIFtdICAgICAgICAgIFtdICBbXSAgICAgICAgICAgICAgICAgICBbXSAgICBbXSB8Ci0tICAgICBibHVlei1waW4gICAgICAgICAgfCAgICAgICAgICAgICBbXSBbXSAgW10gICAgICAgICAgICAgICAgW10gW10gICAgICAgfAotLSAgICAgY2Zsb3cgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGNsaXNwICAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBjb25zb2xlLXRvb2xzICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgY29yZXV0aWxzICAgICAgICAgIHwgW10gW10gICAgICAgW10gW10gIFtdICAgICAgICAgICAgICAgIFtdICAgICAgICAgIHwKLS0gICAgIGNwaW8gICAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgIFtdICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBjcHBsaWIgICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgY3J5cHRvbml0ICAgICAgICAgIHwgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGRpYWxvZyAgICAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBkaWZmdXRpbHMgICAgICAgICAgfCBbXSAgICAgICAgICBbXSBbXSAgW10gW10gICAgW10gICAgICAgW10gW10gICAgW10gfAotLSAgICAgZG9vZGxlICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgIFtdIHwKLS0gICAgIGUyZnNwcm9ncyAgICAgICAgICB8IFtdICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBlbnNjcmlwdCAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgfAotLSAgICAgZmV0Y2htYWlsICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGZpbmR1dGlscyAgICAgICAgICB8ICAgIFtdICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgICAgICB8Ci0tICAgICBmaW5kdXRpbHNfc3RhYmxlICAgfCAgICBbXSAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgfAotLSAgICAgZmxleCAgICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGZzbGludCAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnYXMgICAgICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ2F3ayAgICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gIFtdICAgICAgIFtdICAgICAgICAgICAgICAgICgpIHwKLS0gICAgIGdjYWwgICAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnY2MgICAgICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ2V0dGV4dC1leGFtcGxlcyAgIHwgW10gICAgICAgICAgW10gW10gIFtdICAgICAgICAgICAgICAgIFtdIFtdICAgIFtdIHwKLS0gICAgIGdldHRleHQtcnVudGltZSAgICB8IFtdICAgICAgICAgIFtdIFtdICBbXSAgICAgICAgICAgICAgICAgICBbXSAgICBbXSB8Ci0tICAgICBnZXR0ZXh0LXRvb2xzICAgICAgfCBbXSAgICBbXSAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gfAotLSAgICAgZ2lwICAgICAgICAgICAgICAgIHwgW10gICAgW10gICAgICAgW10gIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdsaXYgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbHVuYXJjbG9jayAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgfAotLSAgICAgZ211bHQgICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdIHwKLS0gICAgIGdudWJpZmYgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSB8Ci0tICAgICBnbnVjYXNoICAgICAgICAgICAgfCAoKSAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICAgICAgKCkgICAgICAgICAgfAotLSAgICAgZ251ZWR1ICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdudWxpYiAgICAgICAgICAgICB8IFtdIFtdICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbnVuZXQgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ251bmV0LWd0ayAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdudXRscyAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtYWVyaWFsICAgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ3BlLWJlYW0gICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdwZS1jYWxlbmRhciAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtY2xvY2sgICAgICAgICAgfCBbXSAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgfAotLSAgICAgZ3BlLWNvbmYgICAgICAgICAgIHwgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdwZS1jb250YWN0cyAgICAgICB8IFtdICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtZWRpdCAgICAgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgW10gW10gICAgICAgfAotLSAgICAgZ3BlLWZpbGVtYW5hZ2VyICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdwZS1nbyAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICB8Ci0tICAgICBncGUtbG9naW4gICAgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgfAotLSAgICAgZ3BlLW93bmVyaW5mbyAgICAgIHwgW10gICAgICAgICAgW10gW10gICAgICAgICAgICAgICAgICAgIFtdIFtdICAgICAgIHwKLS0gICAgIGdwZS1wYWNrYWdlICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtc2tldGNoYm9vayAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ3BlLXN1ICAgICAgICAgICAgIHwgW10gICAgICAgICAgW10gW10gICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgIHwKLS0gICAgIGdwZS10YXNrbWFuYWdlciAgICB8IFtdICAgICAgICAgIFtdIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtdGltZXNoZWV0ICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgICAgICAgW10gICAgICAgfAotLSAgICAgZ3BlLXRvZGF5ICAgICAgICAgIHwgW10gICAgICAgICAgW10gW10gIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdwZS10b2RvICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGhvdG8yICAgICAgICAgICAgfCBbXSAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICAgICAgW10gICAgICAgW10gfAotLSAgICAgZ3Byb2YgICAgICAgICAgICAgIHwgW10gICAgICAgICAgW10gW10gIFtdICAgICAgICAgICAgICAgICAgIFtdICAgICAgIHwKLS0gICAgIGdwc2RyaXZlICAgICAgICAgICB8ICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncmFtYWRvaXIgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ3JlcCAgICAgICAgICAgICAgIHwgW10gICAgICAgICAgW10gICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdyZXRsICAgICAgICAgICAgICB8IFtdICAgIFtdICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSB8Ci0tICAgICBnc2FzbCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgW10gICAgICAgfAotLSAgICAgZ3NzICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgW10gIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdzdC1wbHVnaW5zLWJhZCAgICB8IFtdICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSB8Ci0tICAgICBnc3QtcGx1Z2lucy1iYXNlICAgfCBbXSAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgW10gfAotLSAgICAgZ3N0LXBsdWdpbnMtZ29vZCAgIHwgW10gICAgW10gICAgW10gICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgIFtdIHwKLS0gICAgIGdzdC1wbHVnaW5zLXVnbHkgICB8IFtdICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSB8Ci0tICAgICBnc3RyZWFtZXIgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgW10gfAotLSAgICAgZ3RpY2sgICAgICAgICAgICAgIHwgICAgICAgICAgICAgW10gICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgIFtdIHwKLS0gICAgIGd0a2FtICAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSB8Ci0tICAgICBndGtvcnBoYW4gICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gfAotLSAgICAgZ3Rrc3BlbGwgICAgICAgICAgIHwgW10gICAgW10gICAgW10gW10gIFtdICAgICAgICAgICAgICAgIFtdICAgICAgIFtdIHwKLS0gICAgIGd1dGVucHJpbnQgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICB8Ci0tICAgICBoZWxsbyAgICAgICAgICAgICAgfCBbXSBbXSBbXSBbXSBbXSBbXSAgW10gW10gICAgW10gICAgW10gW10gW10gICAgW10gfAotLSAgICAgaGVycmllICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGh5bGFmYXggICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBpZHV0aWxzICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgICAgW10gW10gICAgW10gfAotLSAgICAgaW5kZW50ICAgICAgICAgICAgIHwgW10gW10gW10gICAgW10gW10gIFtdIFtdICAgICAgICAgICAgIFtdIFtdICAgIFtdIHwKLS0gICAgIGlzb18xNTkyNCAgICAgICAgICB8ICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBpc29fMzE2NiAgICAgICAgICAgfCBbXSBbXSBbXSAgICBbXSBbXSAgICAgW10gW10gW10gW10gW10gW10gW10gICAgW10gfAotLSAgICAgaXNvXzMxNjZfMiAgICAgICAgIHwgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGlzb180MjE3ICAgICAgICAgICB8IFtdIFtdICAgICAgIFtdIFtdICAgICAgICAgICAgICAgICAgICBbXSAgICAgICBbXSB8Ci0tICAgICBpc29fNjM5ICAgICAgICAgICAgfCBbXSAgICAgICBbXSBbXSBbXSAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgfAotLSAgICAganBpbG90ICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGp0YWcgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBqd2hvaXMgICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgW10gW10gICAgW10gfAotLSAgICAga2JkICAgICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGtleXRvdWNoICAgICAgICAgICB8ICAgICAgICAgICAgICAgIFtdICBbXSAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBrZXl0b3VjaC1lZGl0b3IgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAga2V5dG91Y2gta2V5Ym9hLi4uIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgIFtdIHwKLS0gICAgIGxhdHJpbmUgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBsZCAgICAgICAgICAgICAgICAgfCBbXSAgICAgICAgICBbXSBbXSAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbGVhZnBhZCAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gIFtdICAgICAgIFtdICAgICAgIFtdICAgICAgIFtdIHwKLS0gICAgIGxpYmMgICAgICAgICAgICAgICB8IFtdICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgICAgICBbXSAgICAgICAgICB8Ci0tICAgICBsaWJleGlmICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbGliZXh0cmFjdG9yICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxpYmdwZXdpZGdldCAgICAgICB8IFtdICAgICAgICAgICAgIFtdICBbXSAgICAgICAgICAgICAgICBbXSBbXSAgICAgICB8Ci0tICAgICBsaWJncGctZXJyb3IgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbGliZ3Bob3RvMiAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdIHwKLS0gICAgIGxpYmdwaG90bzJfcG9ydCAgICB8ICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBsaWJnc2FzbCAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbGliaWNvbnYgICAgICAgICAgIHwgICAgW10gICAgICAgW10gICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxpYmlkbiAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBsaWZlbGluZXMgICAgICAgICAgfCAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbGlseXBvbmQgICAgICAgICAgIHwgW10gICAgICAgICAgW10gW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxpbmdvdGVhY2ggICAgICAgICB8ICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSB8Ci0tICAgICBscHJuZyAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbHlueCAgICAgICAgICAgICAgIHwgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgIFtdIHwKLS0gICAgIG00ICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIFtdICBbXSBbXSAgICAgICAgICAgICAgICBbXSAgICAgICB8Ci0tICAgICBtYWlsZnJvbWQgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbWFpbHV0aWxzICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIG1ha2UgICAgICAgICAgICAgICB8IFtdICAgICAgICAgIFtdIFtdICBbXSBbXSAgICBbXSAgICBbXSAgICBbXSAgICAgICB8Ci0tICAgICBtYW4tZGIgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gfAotLSAgICAgbWluaWNvbSAgICAgICAgICAgIHwgW10gICAgICAgICAgW10gW10gICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgIHwKLS0gICAgIG5hbm8gICAgICAgICAgICAgICB8IFtdICAgIFtdICAgICAgIFtdICBbXSBbXSAgICAgICAgICAgICBbXSAgICAgICBbXSB8Ci0tICAgICBvcGNvZGVzICAgICAgICAgICAgfCBbXSAgICAgICAgICBbXSBbXSAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgcGFydGVkICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgIFtdICAgIFtdIHwKLS0gICAgIHBpbG90LXFvZiAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBwb3B0ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgW10gW10gICAgICAgICAgICAgICAgICAgW10gICAgfAotLSAgICAgcHNtaXNjICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgIFtdIHwKLS0gICAgIHB3ZHV0aWxzICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBxb2YgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgfAotLSAgICAgcmFkaXVzICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHJlY29kZSAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgIFtdICBbXSBbXSAgICBbXSAgICAgICBbXSBbXSAgICBbXSB8Ci0tICAgICBycG0gICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgfAotLSAgICAgc2NyZWVtICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHNjcm9sbGtlZXBlciAgICAgICB8IFtdICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICB8Ci0tICAgICBzZWQgICAgICAgICAgICAgICAgfCBbXSBbXSAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgfAotLSAgICAgc2hhcmVkLW1pbWUtaW5mbyAgIHwgW10gICAgW10gICAgW10gW10gICAgICAgICAgICAgICAgICAgIFtdICAgICAgIFtdIHwKLS0gICAgIHNoYXJ1dGlscyAgICAgICAgICB8IFtdIFtdICAgICAgIFtdIFtdICBbXSBbXSAgICAgICAgICAgICBbXSAgICAgICBbXSB8Ci0tICAgICBzaGlzaGkgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgc2tlbmNpbCAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHNvbGZlZ2UgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSB8Ci0tICAgICBzb3VuZHRyYWNrZXIgICAgICAgfCBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gfAotLSAgICAgc3AgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHN5c3RlbS10b29scy1iYS4uLiB8IFtdICAgIFtdICAgIFtdIFtdICBbXSAgICAgICAgICAgICBbXSBbXSBbXSAgICBbXSB8Ci0tICAgICB0YXIgICAgICAgICAgICAgICAgfCAgICBbXSBbXSAgICBbXSAgICAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgfAotLSAgICAgdGV4aW5mbyAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgW10gICAgICAgICAgIFtdICAgICAgIFtdICAgICAgICAgIHwKLS0gICAgIHRpbiAgICAgICAgICAgICAgICB8ICAgIFtdICAgICAgICAgICgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB0dXhwYWludCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgfAotLSAgICAgdW5pY29kZS1oYW4tdHJhLi4uIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHVuaWNvZGUtdHJhbnNsYS4uLiB8ICAgICAgICAgICAgICAgIFtdICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB1dGlsLWxpbnV4ICAgICAgICAgfCBbXSBbXSAgICAgICBbXSBbXSAgICAgICAgICAgICAgICAgICAgW10gW10gICAgW10gfAotLSAgICAgdXRpbC1saW51eC1uZyAgICAgIHwgW10gW10gICAgICAgW10gW10gICAgICAgICAgICAgICAgICAgIFtdIFtdICAgIFtdIHwKLS0gICAgIHZvcmJpcy10b29scyAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB3YXN0ZXNlZGdlICAgICAgICAgfCAgICAgICAgICAgICAgICAoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgd2RpZmYgICAgICAgICAgICAgIHwgW10gW10gICAgICAgICAgW10gIFtdIFtdICAgICAgICAgICAgIFtdIFtdICAgIFtdIHwKLS0gICAgIHdnZXQgICAgICAgICAgICAgICB8ICAgIFtdICAgICAgIFtdIFtdICBbXSAgICAgICAgICAgICBbXSBbXSBbXSAgICBbXSB8Ci0tICAgICB4Y2hhdCAgICAgICAgICAgICAgfCBbXSAgICAgICAgICBbXSBbXSAgICAgICAgW10gICAgW10gICAgW10gICAgICAgW10gfAotLSAgICAgeGtleWJvYXJkLWNvbmZpZyAgIHwgW10gICAgICAgICAgW10gW10gICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgIHwKLS0gICAgIHhwYWQgICAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgICAgICB8Ci0tICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotLSAgICAgICAgICAgICAgICAgICAgICAgICAgZXMgZXQgZXUgZmEgZmkgZnIgIGdhIGdsIGd1IGhlIGhpIGhyIGh1IGlkIGlzIGl0Ci0tICAgICAgICAgICAgICAgICAgICAgICAgICA4NSAyMiAxNCAgMiA0OCAxMDEgNjEgMTIgIDIgIDggIDIgIDYgNTMgMjkgIDEgNTIKLS0KLS0gICAgICAgICAgICAgICAgICAgICAgICAgIGphIGthIGtvIGt1IGt5IGxnIGx0IGx2IG1rIG1uIG1zIG10IG5iIG5lIG5sICBubgotLSAgICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLS0gICAgIENvbXBlbmRpdW0gICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBhMnBzICAgICAgICAgICAgICAgfCAgICAgICAoKSAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgfAotLSAgICAgYWVnaXMgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCkgICAgIHwKLS0gICAgIGFudC1waG9uZSAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBhbnViaXMgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSAgICBbXSAgICAgfAotLSAgICAgYXAtdXRpbHMgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgIHwKLS0gICAgIGFzcGVsbCAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBiYXNoICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgYmZkICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGJpYnNoZWxmICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICB8Ci0tICAgICBiaW51dGlscyAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgYmlzb24gICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgW10gICAgW10gICAgIHwKLS0gICAgIGJpc29uLXJ1bnRpbWUgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgIFtdICAgIFtdICAgICB8Ci0tICAgICBibHVlei1waW4gICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgfAotLSAgICAgY2Zsb3cgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGNsaXNwICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBjb25zb2xlLXRvb2xzICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgY29yZXV0aWxzICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGNwaW8gICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBjcHBsaWIgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgY3J5cHRvbml0ICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGRpYWxvZyAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgIFtdICAgICB8Ci0tICAgICBkaWZmdXRpbHMgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgfAotLSAgICAgZG9vZGxlICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGUyZnNwcm9ncyAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBlbnNjcmlwdCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZmV0Y2htYWlsICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGZpbmR1dGlscyAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBmaW5kdXRpbHNfc3RhYmxlICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZmxleCAgICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGZzbGludCAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnYXMgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ2F3ayAgICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdjYWwgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnY2MgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ2V0dGV4dC1leGFtcGxlcyAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgW10gICAgIHwKLS0gICAgIGdldHRleHQtcnVudGltZSAgICB8IFtdICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnZXR0ZXh0LXRvb2xzICAgICAgfCBbXSAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ2lwICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgW10gICAgIHwKLS0gICAgIGdsaXYgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnbHVuYXJjbG9jayAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ211bHQgICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgW10gICAgIHwKLS0gICAgIGdudWJpZmYgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnbnVjYXNoICAgICAgICAgICAgfCAoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAoKSAgICAgICAgfAotLSAgICAgZ251ZWR1ICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdudWxpYiAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnbnVuZXQgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ251bmV0LWd0ayAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdudXRscyAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtYWVyaWFsICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3BlLWJlYW0gICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdwZS1jYWxlbmRhciAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtY2xvY2sgICAgICAgICAgfCBbXSAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3BlLWNvbmYgICAgICAgICAgIHwgW10gICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdwZS1jb250YWN0cyAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtZWRpdCAgICAgICAgICAgfCBbXSAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3BlLWZpbGVtYW5hZ2VyICAgIHwgW10gICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdwZS1nbyAgICAgICAgICAgICB8IFtdICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBncGUtbG9naW4gICAgICAgICAgfCBbXSAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3BlLW93bmVyaW5mbyAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdwZS1wYWNrYWdlICAgICAgICB8IFtdICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGUtc2tldGNoYm9vayAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3BlLXN1ICAgICAgICAgICAgIHwgW10gICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdwZS10YXNrbWFuYWdlciAgICB8IFtdICAgIFtdIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBncGUtdGltZXNoZWV0ICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3BlLXRvZGF5ICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdwZS10b2RvICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBncGhvdG8yICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3Byb2YgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgIHwKLS0gICAgIGdwc2RyaXZlICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBncmFtYWRvaXIgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICAgfAotLSAgICAgZ3JlcCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdyZXRsICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnc2FzbCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3NzICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdzdC1wbHVnaW5zLWJhZCAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnc3QtcGx1Z2lucy1iYXNlICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3N0LXBsdWdpbnMtZ29vZCAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdzdC1wbHVnaW5zLXVnbHkgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnc3RyZWFtZXIgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3RpY2sgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGd0a2FtICAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBndGtvcnBoYW4gICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3Rrc3BlbGwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGd1dGVucHJpbnQgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBoZWxsbyAgICAgICAgICAgICAgfCBbXSBbXSBbXSAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSAgICBbXSAgW10gfAotLSAgICAgaGVycmllICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGh5bGFmYXggICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBpZHV0aWxzICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgaW5kZW50ICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGlzb18xNTkyNCAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBpc29fMzE2NiAgICAgICAgICAgfCBbXSAgICBbXSBbXSAgICAgICBbXSAgICBbXSAgICAgICAgICBbXSAgICBbXSAgW10gfAotLSAgICAgaXNvXzMxNjZfMiAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGlzb180MjE3ICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBpc29fNjM5ICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICBbXSAgW10gfAotLSAgICAganBpbG90ICAgICAgICAgICAgIHwgKCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCkgICAgIHwKLS0gICAgIGp0YWcgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBqd2hvaXMgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAga2JkICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGtleXRvdWNoICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBrZXl0b3VjaC1lZGl0b3IgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAga2V5dG91Y2gta2V5Ym9hLi4uIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxhdHJpbmUgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBsZCAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbGVhZnBhZCAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxpYmMgICAgICAgICAgICAgICB8IFtdICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBsaWJleGlmICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbGliZXh0cmFjdG9yICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxpYmdwZXdpZGdldCAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBsaWJncGctZXJyb3IgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbGliZ3Bob3RvMiAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxpYmdwaG90bzJfcG9ydCAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBsaWJnc2FzbCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgbGliaWNvbnYgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGxpYmlkbiAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBsaWZlbGluZXMgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgbGlseXBvbmQgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGxpbmdvdGVhY2ggICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBscHJuZyAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbHlueCAgICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIG00ICAgICAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBtYWlsZnJvbWQgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbWFpbHV0aWxzICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIG1ha2UgICAgICAgICAgICAgICB8IFtdICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBtYW4tZGIgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbWluaWNvbSAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIG5hbm8gICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgIFtdICAgIFtdICAgICB8Ci0tICAgICBvcGNvZGVzICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgcGFydGVkICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIHBpbG90LXFvZiAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBwb3B0ICAgICAgICAgICAgICAgfCBbXSAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgcHNtaXNjICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgW10gICAgIHwKLS0gICAgIHB3ZHV0aWxzICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBxb2YgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgcmFkaXVzICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHJlY29kZSAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBycG0gICAgICAgICAgICAgICAgfCBbXSAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgc2NyZWVtICAgICAgICAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHNjcm9sbGtlZXBlciAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdIFtdIFtdICBbXSB8Ci0tICAgICBzZWQgICAgICAgICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgc2hhcmVkLW1pbWUtaW5mbyAgIHwgW10gICAgW10gICAgICAgICAgW10gICAgICAgICAgW10gICAgW10gICAgW10gIFtdIHwKLS0gICAgIHNoYXJ1dGlscyAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBzaGlzaGkgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgc2tlbmNpbCAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHNvbGZlZ2UgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgpICAgICAgICAoKSB8Ci0tICAgICBzb3VuZHRyYWNrZXIgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgc3AgICAgICAgICAgICAgICAgIHwgKCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHN5c3RlbS10b29scy1iYS4uLiB8IFtdICAgIFtdICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICB0YXIgICAgICAgICAgICAgICAgfCBbXSAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgdGV4aW5mbyAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgW10gICAgIHwKLS0gICAgIHRpbiAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB0dXhwYWludCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKSAgICBbXSAgW10gfAotLSAgICAgdW5pY29kZS1oYW4tdHJhLi4uIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHVuaWNvZGUtdHJhbnNsYS4uLiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB1dGlsLWxpbnV4ICAgICAgICAgfCBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgdXRpbC1saW51eC1uZyAgICAgIHwgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIHZvcmJpcy10b29scyAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB3YXN0ZXNlZGdlICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgd2RpZmYgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgW10gICAgICAgICAgIHwKLS0gICAgIHdnZXQgICAgICAgICAgICAgICB8IFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICB4Y2hhdCAgICAgICAgICAgICAgfCBbXSAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgeGtleWJvYXJkLWNvbmZpZyAgIHwgICAgW10gW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIHhwYWQgICAgICAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgIFtdICAgICB8Ci0tICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotLSAgICAgICAgICAgICAgICAgICAgICAgICAgamEga2Ega28ga3Uga3kgbGcgbHQgbHYgbWsgbW4gbXMgbXQgbmIgbmUgbmwgIG5uCi0tICAgICAgICAgICAgICAgICAgICAgICAgICA1MSAgMiAyNSAgMyAgMiAgMCAgNiAgMCAgMiAgMiAyMCAgMCAxMSAgMSAxMDMgIDYKLS0KLS0gICAgICAgICAgICAgICAgICAgICAgICAgIG9yIHBhIHBsIHB0IHB0X0JSIHJtIHJvIHJ1IHJ3IHNrIHNsIHNxIHNyIHN2ICB0YQotLSAgICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLS0gICAgIENvbXBlbmRpdW0gICAgICAgICB8ICAgICAgICAgIFtdICBbXSAgICAgIFtdICAgICAgIFtdICAgICAgICAgIFtdICAgICB8Ci0tICAgICBhMnBzICAgICAgICAgICAgICAgfCAgICAgICAoKSAgICAgW10gICAgICBbXSBbXSAgICAgICBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgYWVnaXMgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgKCkgKCkgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGFudC1waG9uZSAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBhbnViaXMgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgYXAtdXRpbHMgICAgICAgICAgIHwgICAgICAgKCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGFzcGVsbCAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgIFtdIFtdICAgIFtdICAgICAgICAgICAgICAgICB8Ci0tICAgICBiYXNoICAgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgfAotLSAgICAgYmZkICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGJpYnNoZWxmICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBiaW51dGlscyAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICBbXSAgICAgICAgICAgICAgICAgfAotLSAgICAgYmlzb24gICAgICAgICAgICAgIHwgICAgICAgW10gICAgIFtdICAgICAgW10gW10gICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGJpc29uLXJ1bnRpbWUgICAgICB8ICAgICAgIFtdICAgICBbXSAgICAgIFtdICAgICAgICAgIFtdICAgICAgIFtdICAgICB8Ci0tICAgICBibHVlei1waW4gICAgICAgICAgfCAgICAgICBbXSAgICAgW10gICBbXSBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgY2Zsb3cgICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGNsaXNwICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBjb25zb2xlLXRvb2xzICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgY29yZXV0aWxzICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgICAgW10gICAgICAgW10gICAgIHwKLS0gICAgIGNwaW8gICAgICAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBjcHBsaWIgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgY3J5cHRvbml0ICAgICAgICAgIHwgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGRpYWxvZyAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBkaWZmdXRpbHMgICAgICAgICAgfCAgICAgICBbXSAgICAgW10gICAgICBbXSBbXSAgICAgICAgICAgICBbXSBbXSAgICAgfAotLSAgICAgZG9vZGxlICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgW10gICAgIHwKLS0gICAgIGUyZnNwcm9ncyAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBlbnNjcmlwdCAgICAgICAgICAgfCAgICAgICAgICAgICAgW10gICAgICBbXSBbXSAgICAgICBbXSAgICAgICBbXSAgICAgfAotLSAgICAgZmV0Y2htYWlsICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgW10gICAgICAgICAgIHwKLS0gICAgIGZpbmR1dGlscyAgICAgICAgICB8ICAgICAgIFtdIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBmaW5kdXRpbHNfc3RhYmxlICAgfCAgICAgICBbXSBbXSAgICAgICAgICBbXSAgICAgICBbXSBbXSAgICAgICBbXSAgICAgfAotLSAgICAgZmxleCAgICAgICAgICAgICAgIHwgICAgICAgW10gICAgIFtdICAgICAgW10gW10gICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGZzbGludCAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnYXMgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ2F3ayAgICAgICAgICAgICAgIHwgICAgICAgW10gICAgIFtdICAgICAgW10gICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdjYWwgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnY2MgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgfAotLSAgICAgZ2V0dGV4dC1leGFtcGxlcyAgIHwgICAgICAgW10gW10gICAgICAgICAgW10gW10gICAgW10gW10gICAgW10gW10gICAgIHwKLS0gICAgIGdldHRleHQtcnVudGltZSAgICB8ICAgICAgIFtdIFtdICAgICAgICAgIFtdIFtdICAgIFtdIFtdICAgIFtdIFtdICAgICB8Ci0tICAgICBnZXR0ZXh0LXRvb2xzICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgZ2lwICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgW10gICAgICAgW10gW10gICAgIHwKLS0gICAgIGdsaXYgICAgICAgICAgICAgICB8ICAgICAgIFtdICAgICBbXSAgICAgIFtdIFtdICAgIFtdICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnbHVuYXJjbG9jayAgICAgICAgfCAgICAgICAgICAgICAgW10gICAgICBbXSBbXSAgICBbXSAgICAgICBbXSBbXSAgICAgfAotLSAgICAgZ211bHQgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgW10gW10gICAgICAgICAgICAgICAgW10gW10gICAgIHwKLS0gICAgIGdudWJpZmYgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICgpICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnbnVjYXNoICAgICAgICAgICAgfCAgICAgICAoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ251ZWR1ICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGdudWxpYiAgICAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgIFtdICAgICB8Ci0tICAgICBnbnVuZXQgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgZ251bmV0LWd0ayAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdudXRscyAgICAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBncGUtYWVyaWFsICAgICAgICAgfCAgICAgICAgICBbXSAgW10gICAgICBbXSBbXSAgICAgICBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgZ3BlLWJlYW0gICAgICAgICAgIHwgICAgICAgICAgW10gIFtdICAgICAgW10gW10gICAgICAgW10gICAgW10gW10gICAgIHwKLS0gICAgIGdwZS1jYWxlbmRhciAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgIFtdICAgIFtdIFtdICAgICB8Ci0tICAgICBncGUtY2xvY2sgICAgICAgICAgfCAgICAgICAgICBbXSAgW10gICAgICBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgZ3BlLWNvbmYgICAgICAgICAgIHwgICAgICAgICAgW10gIFtdICAgICAgW10gW10gICAgW10gW10gICAgICAgW10gICAgIHwKLS0gICAgIGdwZS1jb250YWN0cyAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgIFtdIFtdICAgICAgIFtdICAgIFtdIFtdICAgICB8Ci0tICAgICBncGUtZWRpdCAgICAgICAgICAgfCAgICAgICBbXSBbXSAgW10gICAgICBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgZ3BlLWZpbGVtYW5hZ2VyICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgW10gICAgIHwKLS0gICAgIGdwZS1nbyAgICAgICAgICAgICB8ICAgICAgIFtdICAgICBbXSAgICAgIFtdIFtdICAgIFtdIFtdICAgIFtdIFtdICAgICB8Ci0tICAgICBncGUtbG9naW4gICAgICAgICAgfCAgICAgICAgICBbXSAgW10gICAgICBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgZ3BlLW93bmVyaW5mbyAgICAgIHwgICAgICAgICAgW10gIFtdICAgICAgW10gW10gICAgW10gW10gICAgW10gW10gICAgIHwKLS0gICAgIGdwZS1wYWNrYWdlICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgIFtdICAgICB8Ci0tICAgICBncGUtc2tldGNoYm9vayAgICAgfCAgICAgICAgICBbXSAgW10gICAgICBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgZ3BlLXN1ICAgICAgICAgICAgIHwgICAgICAgICAgW10gIFtdICAgICAgW10gW10gICAgW10gW10gICAgW10gW10gICAgIHwKLS0gICAgIGdwZS10YXNrbWFuYWdlciAgICB8ICAgICAgICAgIFtdICBbXSAgICAgIFtdIFtdICAgIFtdIFtdICAgIFtdIFtdICAgICB8Ci0tICAgICBncGUtdGltZXNoZWV0ICAgICAgfCAgICAgICAgICBbXSAgW10gICAgICBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgZ3BlLXRvZGF5ICAgICAgICAgIHwgICAgICAgICAgW10gIFtdICAgICAgW10gW10gICAgW10gW10gICAgW10gW10gICAgIHwKLS0gICAgIGdwZS10b2RvICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgIFtdICAgIFtdIFtdICAgICB8Ci0tICAgICBncGhvdG8yICAgICAgICAgICAgfCAgICBbXSBbXSAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICBbXSBbXSAgICAgfAotLSAgICAgZ3Byb2YgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIFtdICAgICAgW10gICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdwc2RyaXZlICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBncmFtYWRvaXIgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3JlcCAgICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgW10gW10gICAgICAgW10gICAgIHwKLS0gICAgIGdyZXRsICAgICAgICAgICAgICB8ICAgICAgIFtdIFtdICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBnc2FzbCAgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSAgICAgfAotLSAgICAgZ3NzICAgICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgW10gICAgICAgW10gICAgICAgICAgW10gICAgIHwKLS0gICAgIGdzdC1wbHVnaW5zLWJhZCAgICB8ICAgICAgIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnc3QtcGx1Z2lucy1iYXNlICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3N0LXBsdWdpbnMtZ29vZCAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGdzdC1wbHVnaW5zLXVnbHkgICB8ICAgICAgIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBnc3RyZWFtZXIgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSBbXSBbXSAgICAgfAotLSAgICAgZ3RpY2sgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGd0a2FtICAgICAgICAgICAgICB8ICAgIFtdIFtdICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBndGtvcnBoYW4gICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgZ3Rrc3BlbGwgICAgICAgICAgIHwgICAgICAgICAgICAgIFtdICAgW10gW10gW10gICAgW10gW10gICAgW10gW10gICAgIHwKLS0gICAgIGd1dGVucHJpbnQgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBoZWxsbyAgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgW10gICAgICBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgaGVycmllICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGh5bGFmYXggICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBpZHV0aWxzICAgICAgICAgICAgfCAgICAgICBbXSAgICAgW10gICAgICBbXSBbXSAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgaW5kZW50ICAgICAgICAgICAgIHwgICAgICAgW10gICAgIFtdICAgICAgW10gW10gICAgW10gICAgICAgW10gW10gICAgIHwKLS0gICAgIGlzb18xNTkyNCAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBpc29fMzE2NiAgICAgICAgICAgfCAgICBbXSBbXSBbXSAgW10gICAgICBbXSBbXSBbXSBbXSBbXSBbXSBbXSBbXSAgW10gfAotLSAgICAgaXNvXzMxNjZfMiAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGlzb180MjE3ICAgICAgICAgICB8ICAgICAgIFtdIFtdICAgICAgICAgICAgIFtdIFtdICAgIFtdICAgIFtdIFtdICAgICB8Ci0tICAgICBpc29fNjM5ICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICBbXSBbXSBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAganBpbG90ICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGp0YWcgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICB8Ci0tICAgICBqd2hvaXMgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgW10gICAgICBbXSAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAga2JkICAgICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGtleXRvdWNoICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBrZXl0b3VjaC1lZGl0b3IgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAga2V5dG91Y2gta2V5Ym9hLi4uIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGxhdHJpbmUgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBsZCAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgbGVhZnBhZCAgICAgICAgICAgIHwgICAgICAgW10gW10gICAgICAgICAgICAgW10gICAgW10gICAgICAgICAgW10gIFtdIHwKLS0gICAgIGxpYmMgICAgICAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgIFtdICAgICAgICAgIFtdICAgICB8Ci0tICAgICBsaWJleGlmICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgfAotLSAgICAgbGliZXh0cmFjdG9yICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIGxpYmdwZXdpZGdldCAgICAgICB8ICAgICAgIFtdIFtdICBbXSAgICAgIFtdICAgICAgIFtdIFtdICAgIFtdIFtdICAgICB8Ci0tICAgICBsaWJncGctZXJyb3IgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgbGliZ3Bob3RvMiAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxpYmdwaG90bzJfcG9ydCAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBsaWJnc2FzbCAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSBbXSAgICAgfAotLSAgICAgbGliaWNvbnYgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgW10gW10gICAgIHwKLS0gICAgIGxpYmlkbiAgICAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICgpICAgICB8Ci0tICAgICBsaWZlbGluZXMgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgbGlseXBvbmQgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIGxpbmdvdGVhY2ggICAgICAgICB8ICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBscHJuZyAgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbHlueCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIG00ICAgICAgICAgICAgICAgICB8ICAgICAgIFtdICAgICBbXSAgICAgIFtdIFtdICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBtYWlsZnJvbWQgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgbWFpbHV0aWxzICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIG1ha2UgICAgICAgICAgICAgICB8ICAgICAgIFtdICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBtYW4tZGIgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICBbXSBbXSAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgbWluaWNvbSAgICAgICAgICAgIHwgICAgICAgW10gICAgIFtdICAgICAgW10gW10gICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIG5hbm8gICAgICAgICAgICAgICB8ICAgICAgICAgICAgICBbXSAgICAgIFtdIFtdICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBvcGNvZGVzICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgcGFydGVkICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHBpbG90LXFvZiAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBwb3B0ICAgICAgICAgICAgICAgfCAgICAgICBbXSBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgcHNtaXNjICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIHB3ZHV0aWxzICAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICB8Ci0tICAgICBxb2YgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgcmFkaXVzICAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHJlY29kZSAgICAgICAgICAgICB8ICAgICAgIFtdIFtdICBbXSAgICAgIFtdIFtdICAgICAgIFtdICAgICAgIFtdICAgICB8Ci0tICAgICBycG0gICAgICAgICAgICAgICAgfCAgICAgICBbXSBbXSAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgfAotLSAgICAgc2NyZWVtICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHNjcm9sbGtlZXBlciAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgIFtdIFtdICAgIFtdICAgIFtdIFtdIFtdICAgICB8Ci0tICAgICBzZWQgICAgICAgICAgICAgICAgfCAgICAgICBbXSBbXSAgW10gICAgICBbXSBbXSAgICBbXSBbXSAgICBbXSBbXSAgICAgfAotLSAgICAgc2hhcmVkLW1pbWUtaW5mbyAgIHwgICAgICAgW10gW10gIFtdICAgICAgICAgICAgICAgICAgICAgW10gW10gW10gICAgIHwKLS0gICAgIHNoYXJ1dGlscyAgICAgICAgICB8ICAgICAgIFtdICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgIFtdIFtdICAgICB8Ci0tICAgICBzaGlzaGkgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgc2tlbmNpbCAgICAgICAgICAgIHwgICAgICAgICAgW10gIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIHNvbGZlZ2UgICAgICAgICAgICB8ICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICBzb3VuZHRyYWNrZXIgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgfAotLSAgICAgc3AgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHN5c3RlbS10b29scy1iYS4uLiB8ICAgIFtdIFtdIFtdICBbXSAgICAgIFtdICAgICAgICAgICAgIFtdIFtdIFtdICBbXSB8Ci0tICAgICB0YXIgICAgICAgICAgICAgICAgfCAgICAgICBbXSAgICAgICAgICAgICAgICBbXSAgICAgICBbXSAgICAgICBbXSAgICAgfAotLSAgICAgdGV4aW5mbyAgICAgICAgICAgIHwgICAgICAgW10gICAgICAgICAgICAgW10gW10gICAgICAgICAgICAgICAgW10gICAgIHwKLS0gICAgIHRpbiAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICgpICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB0dXhwYWludCAgICAgICAgICAgfCAgICAgICBbXSBbXSAgICAgICAgICAgICAgICAgICAgICBbXSBbXSBbXSBbXSAgICAgfAotLSAgICAgdW5pY29kZS1oYW4tdHJhLi4uIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLS0gICAgIHVuaWNvZGUtdHJhbnNsYS4uLiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB1dGlsLWxpbnV4ICAgICAgICAgfCAgICAgICAgICAgICAgW10gICAgICAgICBbXSAgICAgICBbXSAgICAgICBbXSAgICAgfAotLSAgICAgdXRpbC1saW51eC1uZyAgICAgIHwgICAgICAgICAgICAgIFtdICAgICAgICAgW10gICAgICAgW10gICAgICAgW10gICAgIHwKLS0gICAgIHZvcmJpcy10b29scyAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICB8Ci0tICAgICB3YXN0ZXNlZGdlICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotLSAgICAgd2RpZmYgICAgICAgICAgICAgIHwgICAgICAgW10gICAgIFtdICAgICAgW10gW10gICAgW10gW10gICAgICAgW10gICAgIHwKLS0gICAgIHdnZXQgICAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICAgICAgIFtdICAgIFtdICAgICAgICAgIFtdICAgICB8Ci0tICAgICB4Y2hhdCAgICAgICAgICAgICAgfCAgICBbXSAgICAgICAgICAgICAgICAgICBbXSAgICBbXSBbXSBbXSBbXSBbXSAgICAgfAotLSAgICAgeGtleWJvYXJkLWNvbmZpZyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgW10gW10gICAgICAgW10gICAgIHwKLS0gICAgIHhwYWQgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdIFtdICAgICAgIFtdICAgICB8Ci0tICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotLSAgICAgICAgICAgICAgICAgICAgICAgICAgb3IgcGEgcGwgcHQgcHRfQlIgcm0gcm8gcnUgcncgc2sgc2wgc3Egc3Igc3YgIHRhCi0tICAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgNSA3NyAzMSAgNTMgICAgNCA1OCA3MiAgMyA0NSA0NiAgOSA0NSAxMjIgIDMKLS0KLS0gICAgICAgICAgICAgICAgICAgICAgICAgIHRnIHRoIHRrIHRyIHVrIHZlbiB2aSAgd2EgeGggemhfQ04gemhfSEsgemhfVFcgenUKLS0gICAgICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotLSAgICAgQ29tcGVuZGl1bSAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgW10gICAgICB8IDE5Ci0tICAgICBhMnBzICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTkKLS0gICAgIGFlZ2lzICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMQotLSAgICAgYW50LXBob25lICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA2Ci0tICAgICBhbnViaXMgICAgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTEKLS0gICAgIGFwLXV0aWxzICAgICAgICAgICB8ICAgICAgICAgICAgICgpICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNAotLSAgICAgYXNwZWxsICAgICAgICAgICAgIHwgICAgICAgICAgICAgW10gICAgIFtdICBbXSAgICAgICAgICAgICAgICAgICAgICAgICB8IDE2Ci0tICAgICBiYXNoICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDYKLS0gICAgIGJmZCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMgotLSAgICAgYmlic2hlbGYgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA3Ci0tICAgICBiaW51dGlscyAgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICBbXSAgICAgIHwgIDkKLS0gICAgIGJpc29uICAgICAgICAgICAgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgfCAyMAotLSAgICAgYmlzb24tcnVudGltZSAgICAgIHwgICAgICAgICAgICAgW10gICAgIFtdICAgICAgICAgW10gICAgICAgICAgW10gICAgICB8IDE4Ci0tICAgICBibHVlei1waW4gICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gIFtdICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMjgKLS0gICAgIGNmbG93ICAgICAgICAgICAgICB8ICAgICAgICAgICAgIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNQotLSAgICAgY2xpc3AgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA5Ci0tICAgICBjb25zb2xlLXRvb2xzICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDUKLS0gICAgIGNvcmV1dGlscyAgICAgICAgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxOAotLSAgICAgY3BpbyAgICAgICAgICAgICAgIHwgICAgICAgICAgW10gW10gICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgICB8IDExCi0tICAgICBjcHBsaWIgICAgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMTIKLS0gICAgIGNyeXB0b25pdCAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNgotLSAgICAgZGlhbG9nICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICBbXSAgICAgW10gICAgICAgICAgICAgICAgICB8ICA5Ci0tICAgICBkaWZmdXRpbHMgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMjkKLS0gICAgIGRvb2RsZSAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNgotLSAgICAgZTJmc3Byb2dzICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDEwCi0tICAgICBlbnNjcmlwdCAgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTYKLS0gICAgIGZldGNobWFpbCAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxMgotLSAgICAgZmluZHV0aWxzICAgICAgICAgIHwgICAgICAgICAgW10gW10gICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDExCi0tICAgICBmaW5kdXRpbHNfc3RhYmxlICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICBbXSAgICAgIHwgMTgKLS0gICAgIGZsZXggICAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxNQotLSAgICAgZnNsaW50ICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAyCi0tICAgICBnYXMgICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDMKLS0gICAgIGdhd2sgICAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgfCAxNgotLSAgICAgZ2NhbCAgICAgICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA1Ci0tICAgICBnY2MgICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgIDcKLS0gICAgIGdldHRleHQtZXhhbXBsZXMgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgIFtdICAgIFtdICAgIFtdICAgICAgfCAyOQotLSAgICAgZ2V0dGV4dC1ydW50aW1lICAgIHwgICAgICAgICAgW10gW10gICAgIFtdICAgICAgICAgW10gICAgW10gICAgW10gICAgICB8IDI4Ci0tICAgICBnZXR0ZXh0LXRvb2xzICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMjAKLS0gICAgIGdpcCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgfCAxMwotLSAgICAgZ2xpdiAgICAgICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDExCi0tICAgICBnbHVuYXJjbG9jayAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gIFtdICAgICAgICAgICAgICAgICBbXSAgICAgIHwgMTUKLS0gICAgIGdtdWx0ICAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgIFtdICAgICAgICAgIFtdICAgICAgfCAxNgotLSAgICAgZ251YmlmZiAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAyCi0tICAgICBnbnVjYXNoICAgICAgICAgICAgfCAgICAgICAgICAoKSBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDUKLS0gICAgIGdudWVkdSAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMgotLSAgICAgZ251bGliICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDEwCi0tICAgICBnbnVuZXQgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDAKLS0gICAgIGdudW5ldC1ndGsgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMwotLSAgICAgZ251dGxzICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA0Ci0tICAgICBncGUtYWVyaWFsICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICBbXSAgICAgICAgICAgICAgICAgIHwgMTQKLS0gICAgIGdwZS1iZWFtICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgfCAxNAotLSAgICAgZ3BlLWNhbGVuZGFyICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICBbXSAgICAgICAgICAgICAgICAgICAgICAgICB8ICA3Ci0tICAgICBncGUtY2xvY2sgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gIFtdICAgICBbXSAgICAgICAgICAgICAgICAgIHwgMjEKLS0gICAgIGdwZS1jb25mICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgW10gICAgIFtdICAgICAgICAgICAgICAgICAgfCAxNgotLSAgICAgZ3BlLWNvbnRhY3RzICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgICB8IDEwCi0tICAgICBncGUtZWRpdCAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gIFtdICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMjIKLS0gICAgIGdwZS1maWxlbWFuYWdlciAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgICAgICAgICAgICAgfCAgNwotLSAgICAgZ3BlLWdvICAgICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICBbXSAgICAgW10gICAgICAgICAgICAgICAgICB8IDE5Ci0tICAgICBncGUtbG9naW4gICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gIFtdICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMjEKLS0gICAgIGdwZS1vd25lcmluZm8gICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgIFtdICAgICAgICAgIFtdICAgICAgfCAyMQotLSAgICAgZ3BlLXBhY2thZ2UgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA2Ci0tICAgICBncGUtc2tldGNoYm9vayAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTYKLS0gICAgIGdwZS1zdSAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgW10gICAgIFtdICAgICAgICAgICAgICAgICAgfCAyMQotLSAgICAgZ3BlLXRhc2ttYW5hZ2VyICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICBbXSAgICAgW10gICAgICAgICAgICAgICAgICB8IDIxCi0tICAgICBncGUtdGltZXNoZWV0ICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMTgKLS0gICAgIGdwZS10b2RheSAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgW10gICAgIFtdICAgICAgICAgIFtdICAgICAgfCAyMQotLSAgICAgZ3BlLXRvZG8gICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICBbXSAgICAgICAgICAgICAgICAgICAgICAgICB8ICA4Ci0tICAgICBncGhvdG8yICAgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMjEKLS0gICAgIGdwcm9mICAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxMwotLSAgICAgZ3BzZHJpdmUgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA1Ci0tICAgICBncmFtYWRvaXIgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDcKLS0gICAgIGdyZXAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxMgotLSAgICAgZ3JldGwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA2Ci0tICAgICBnc2FzbCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgIDkKLS0gICAgIGdzcyAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNwotLSAgICAgZ3N0LXBsdWdpbnMtYmFkICAgIHwgICAgICAgICAgICAgW10gICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgICB8IDEzCi0tICAgICBnc3QtcGx1Z2lucy1iYXNlICAgfCAgICAgICAgICAgICBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTEKLS0gICAgIGdzdC1wbHVnaW5zLWdvb2QgICB8ICAgICAgICAgICAgIFtdICAgICBbXSAgICAgICAgIFtdICAgIFtdICAgIFtdICAgICAgfCAxNgotLSAgICAgZ3N0LXBsdWdpbnMtdWdseSAgIHwgICAgICAgICAgICAgW10gICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgICB8IDEzCi0tICAgICBnc3RyZWFtZXIgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTgKLS0gICAgIGd0aWNrICAgICAgICAgICAgICB8ICAgICAgICAgICAgIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNwotLSAgICAgZ3RrYW0gICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IDE2Ci0tICAgICBndGtvcnBoYW4gICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDcKLS0gICAgIGd0a3NwZWxsICAgICAgICAgICB8ICAgICAgICAgICAgIFtdICAgICBbXSAgW10gICAgIFtdICAgIFtdICAgIFtdICAgICAgfCAyNwotLSAgICAgZ3V0ZW5wcmludCAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA0Ci0tICAgICBoZWxsbyAgICAgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMzgKLS0gICAgIGhlcnJpZSAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgOAotLSAgICAgaHlsYWZheCAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAwCi0tICAgICBpZHV0aWxzICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTUKLS0gICAgIGluZGVudCAgICAgICAgICAgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgIFtdICAgICAgICAgIFtdICAgICAgfCAyOAotLSAgICAgaXNvXzE1OTI0ICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgICB8ICA0Ci0tICAgICBpc29fMzE2NiAgICAgICAgICAgfCAgICBbXSBbXSBbXSBbXSAgICAgW10gIFtdICAgICBbXSAgICBbXSAgICBbXSAgICAgIHwgNTQKLS0gICAgIGlzb18zMTY2XzIgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgfCAgNAotLSAgICAgaXNvXzQyMTcgICAgICAgICAgIHwgICAgW10gICAgW10gICAgICAgIFtdICAgICAgICAgW10gICAgW10gICAgICAgICAgICB8IDI0Ci0tICAgICBpc29fNjM5ICAgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgW10gIFtdICAgICBbXSAgICBbXSAgICAgICAgICAgIHwgMjYKLS0gICAgIGpwaWxvdCAgICAgICAgICAgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgfCAgNwotLSAgICAganRhZyAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAzCi0tICAgICBqd2hvaXMgICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICBbXSAgICAgIHwgMTMKLS0gICAgIGtiZCAgICAgICAgICAgICAgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxMwotLSAgICAga2V5dG91Y2ggICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA4Ci0tICAgICBrZXl0b3VjaC1lZGl0b3IgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDUKLS0gICAgIGtleXRvdWNoLWtleWJvYS4uLiB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNQotLSAgICAgbGF0cmluZSAgICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA1Ci0tICAgICBsZCAgICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMTAKLS0gICAgIGxlYWZwYWQgICAgICAgICAgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgIFtdICAgICAgICAgIFtdICAgICAgfCAyNAotLSAgICAgbGliYyAgICAgICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgW10gICAgICB8IDE5Ci0tICAgICBsaWJleGlmICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDUKLS0gICAgIGxpYmV4dHJhY3RvciAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNQotLSAgICAgbGliZ3Bld2lkZ2V0ICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICBbXSAgICAgW10gICAgICAgICAgICAgICAgICB8IDIwCi0tICAgICBsaWJncGctZXJyb3IgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDYKLS0gICAgIGxpYmdwaG90bzIgICAgICAgICB8ICAgICAgICAgICAgIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgOQotLSAgICAgbGliZ3Bob3RvMl9wb3J0ICAgIHwgICAgICAgICAgICAgW10gICAgIFtdICAgICAgICAgICAgICAgICAgICAgW10gICAgICB8IDExCi0tICAgICBsaWJnc2FzbCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDgKLS0gICAgIGxpYmljb252ICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgW10gICAgICAgICAgICAgICAgICAgICAgICAgfCAxMQotLSAgICAgbGliaWRuICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgICB8IDExCi0tICAgICBsaWZlbGluZXMgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDQKLS0gICAgIGxpbHlwb25kICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNgotLSAgICAgbGluZ290ZWFjaCAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA2Ci0tICAgICBscHJuZyAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDIKLS0gICAgIGx5bnggICAgICAgICAgICAgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxNQotLSAgICAgbTQgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgW10gICAgICB8IDE4Ci0tICAgICBtYWlsZnJvbWQgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDMKLS0gICAgIG1haWx1dGlscyAgICAgICAgICB8ICAgICAgICAgICAgIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgOAotLSAgICAgbWFrZSAgICAgICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgICB8IDIwCi0tICAgICBtYW4tZGIgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDkKLS0gICAgIG1pbmljb20gICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxNAotLSAgICAgbmFubyAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgW10gICAgICB8IDIwCi0tICAgICBvcGNvZGVzICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTAKLS0gICAgIHBhcnRlZCAgICAgICAgICAgICB8ICAgICAgICAgIFtdIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtdICAgICAgfCAxMQotLSAgICAgcGlsb3QtcW9mICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAxCi0tICAgICBwb3B0ICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMTgKLS0gICAgIHBzbWlzYyAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgfCAxMAotLSAgICAgcHdkdXRpbHMgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAzCi0tICAgICBxb2YgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDQKLS0gICAgIHJhZGl1cyAgICAgICAgICAgICB8ICAgICAgICAgICAgIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNwotLSAgICAgcmVjb2RlICAgICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgICAgICAgICB8IDI1Ci0tICAgICBycG0gICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICBbXSAgICAgIHwgMTMKLS0gICAgIHNjcmVlbSAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMgotLSAgICAgc2Nyb2xsa2VlcGVyICAgICAgIHwgICAgICAgICAgW10gW10gICAgIFtdICAgICAgICAgICAgICAgICAgICAgW10gICAgICB8IDI2Ci0tICAgICBzZWQgICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMjMKLS0gICAgIHNoYXJlZC1taW1lLWluZm8gICB8ICAgICAgICAgICAgIFtdICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgfCAyOQotLSAgICAgc2hhcnV0aWxzICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgW10gICAgICB8IDIzCi0tICAgICBzaGlzaGkgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDMKLS0gICAgIHNrZW5jaWwgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgNwotLSAgICAgc29sZmVnZSAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAzCi0tICAgICBzb3VuZHRyYWNrZXIgICAgICAgfCAgICAgICAgICBbXSAgICAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDkKLS0gICAgIHNwICAgICAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMwotLSAgICAgc3lzdGVtLXRvb2xzLWJhLi4uIHwgICAgW10gICAgW10gW10gICAgIFtdICAgICBbXSAgW10gICAgICAgICAgW10gICAgICB8IDM4Ci0tICAgICB0YXIgICAgICAgICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMTcKLS0gICAgIHRleGluZm8gICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgIFtdICAgICAgICAgICAgICAgICAgfCAxNQotLSAgICAgdGluICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAxCi0tICAgICB0dXhwYWludCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgW10gIFtdICAgICAgICAgICAgICAgICBbXSAgICAgIHwgMTkKLS0gICAgIHVuaWNvZGUtaGFuLXRyYS4uLiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgMAotLSAgICAgdW5pY29kZS10cmFuc2xhLi4uIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAyCi0tICAgICB1dGlsLWxpbnV4ICAgICAgICAgfCAgICAgICAgICBbXSBbXSAgICAgW10gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMjAKLS0gICAgIHV0aWwtbGludXgtbmcgICAgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAyMAotLSAgICAgdm9yYmlzLXRvb2xzICAgICAgIHwgICAgICAgICAgICAgW10gICAgIFtdICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICA0Ci0tICAgICB3YXN0ZXNlZGdlICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgIDEKLS0gICAgIHdkaWZmICAgICAgICAgICAgICB8ICAgICAgICAgIFtdICAgICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAyMwotLSAgICAgd2dldCAgICAgICAgICAgICAgIHwgICAgICAgICAgW10gICAgICAgIFtdICAgICAgICAgICAgICAgICAgICAgW10gICAgICB8IDIwCi0tICAgICB4Y2hhdCAgICAgICAgICAgICAgfCAgICAgICAgICAgICBbXSAgICAgW10gICAgICAgICBbXSAgICAgICAgICBbXSAgICAgIHwgMjkKLS0gICAgIHhrZXlib2FyZC1jb25maWcgICB8ICAgICAgICAgIFtdIFtdICAgICBbXSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAxNAotLSAgICAgeHBhZCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIFtdICAgICAgICAgW10gICAgICAgICAgW10gICAgICB8IDE1Ci0tICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLS0gICAgICAgNzYgdGVhbXMgICAgICAgICAgIHRnIHRoIHRrIHRyIHVrIHZlbiB2aSAgd2EgeGggemhfQ04gemhfSEsgemhfVFcgenUKLS0gICAgICAxNjMgZG9tYWlucyAgICAgICAgICAwICAzICAxIDc0IDUxICAwICAxNDMgMjEgIDEgIDU3ICAgICA3ICAgIDQ1ICAgIDAgIDIwMzYKLS0KLS0gICBTb21lIGNvdW50ZXJzIGluIHRoZSBwcmVjZWRpbmcgbWF0cml4IGFyZSBoaWdoZXIgdGhhbiB0aGUgbnVtYmVyIG9mCi0tdmlzaWJsZSBibG9ja3MgbGV0IHVzIGV4cGV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fTElCSU5UTEAnID0geWVzOyB0aGVuIFwKLS0JICAkKG1rZGlyX3ApICQoREVTVERJUikkKGxpYmRpcikgJChERVNURElSKSQoaW5jbHVkZWRpcik7IFwKLS0JICAkKElOU1RBTExfREFUQSkgbGliaW50bC5oICQoREVTVERJUikkKGluY2x1ZGVkaXIpL2xpYmludGwuaDsgXAotLQkgICQoTElCVE9PTCkgLS1tb2RlPWluc3RhbGwgXAotLQkgICAgJChJTlNUQUxMX0RBVEEpIGxpYmludGwuJGxhICQoREVTVERJUikkKGxpYmRpcikvbGliaW50bC4kbGE7IFwKLS0JICBpZiB0ZXN0ICJAUkVMT0NBVEFCTEVAIiA9IHllczsgdGhlbiBcCi0tCSAgICBkZXBlbmRlbmNpZXM9YHNlZCAtbiAtZSAncyxeZGVwZW5kZW5jeV9saWJzPVwoLipcKSxcMSxwJyA8ICQoREVTVERJUikkKGxpYmRpcikvbGliaW50bC5sYSB8IHNlZCAtZSAicyxeJywsIiAtZSAicywnXCQkLCwiYDsgXAotLQkgICAgaWYgdGVzdCAtbiAiJCRkZXBlbmRlbmNpZXMiOyB0aGVuIFwKLS0JICAgICAgcm0gLWYgJChERVNURElSKSQobGliZGlyKS9saWJpbnRsLmxhOyBcCi0tCSAgICBmaTsgXAotLQkgIGZpOyBcCi0tCWVsc2UgXAotLQkgIDogOyBcCi0tCWZpCi0tCWlmIHRlc3QgIiQoUEFDS0FHRSkiID0gImdldHRleHQtdG9vbHMiIFwKLS0JICAgJiYgdGVzdCAnQFVTRV9JTkNMVURFRF9MSUJJTlRMQCcgPSBubyBcCi0tCSAgICYmIHRlc3QgQEdMSUJDMkAgIT0gbm87IHRoZW4gXAotLQkgICQobWtkaXJfcCkgJChERVNURElSKSQobGliZGlyKTsgXAotLQkgICQoTElCVE9PTCkgLS1tb2RlPWluc3RhbGwgXAotLQkgICAgJChJTlNUQUxMX0RBVEEpIGxpYmdudWludGwuJGxhICQoREVTVERJUikkKGxpYmRpcikvbGliZ251aW50bC4kbGE7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b2xhcmlzIGRhcndpbgotLSMgICBJU08tODg1OS0xMyAgICAgICAgICAgICAgICAgZ2xpYmMgbmV0YnNkIGRhcndpbgotLSMgICBJU08tODg1OS0xNCAgICAgICAgICAgICAgICAgZ2xpYmMKLS0jICAgSVNPLTg4NTktMTUgICAgICAgICAgICAgICAgIGdsaWJjIGFpeCBvc2Ygc29sYXJpcyBmcmVlYnNkIGRhcndpbgotLSMgICBLT0k4LVIgICAgICAgICAgICAgICAgICBZICAgZ2xpYmMgc29sYXJpcyBmcmVlYnNkIG5ldGJzZCBkYXJ3aW4KLS0jICAgS09JOC1VICAgICAgICAgICAgICAgICAgWSAgIGdsaWJjIGZyZWVic2QgbmV0YnNkIGRhcndpbgotLSMgICBLT0k4LVQgICAgICAgICAgICAgICAgICAgICAgZ2xpYmMKLS0jICAgQ1A0MzcgICAgICAgICAgICAgICAgICAgICAgIGRvcwotLSMgICBDUDc3NSAgICAgICAgICAgICAgICAgICAgICAgZG9zCi0tIyAgIENQODUwICAgICAgICAgICAgICAgICAgICAgICBhaXggb3NmIGRvcwotLSMgICBDUDg1MiAgICAgICAgICAgICAgICAgICAgICAgZG9zCi0tIyAgIENQODU1ICAgICAgICAgICAgICAgICAgICAgICBkb3MKLS0jICAgQ1A4NTYgICAgICAgICAgICAgICAgICAgICAgIGFpeAotLSMgICBDUDg1NyAgICAgICAgICAgICAgICAgICAgICAgZG9zCi0tIyAgIENQODYxICAgICAgICAgICAgICAgICAgICAgICBkb3MKLS0jICAgQ1A4NjIgICAgICAgICAgICAgICAgICAgICAgIGRvcwotLSMgICBDUDg2NCAgICAgICAgICAgICAgICAgICAgICAgZG9zCi0tIyAgIENQODY1ICAgICAgICAgICAgICAgICAgICAgICBkb3MKLS0jICAgQ1A4NjYgICAgICAgICAgICAgICAgICAgICAgIGZyZWVic2QgbmV0YnNkIGRhcndpbiBkb3MKLS0jICAgQ1A4NjkgICAgICAgICAgICAgICAgICAgICAgIGRvcwotLSMgICBDUDg3NCAgICAgICAgICAgICAgICAgICAgICAgd29lMzIgZG9zCi0tIyAgIENQOTIyICAgICAgICAgICAgICAgICAgICAgICBhaXgKLS0jICAgQ1A5MzIgICAgICAgICAgICAgICAgICAgICAgIGFpeCB3b2UzMiBkb3MKLS0jICAgQ1A5NDMgICAgICAgICAgICAgICAgICAgICAgIGFpeAotLSMgICBDUDk0OSAgICAgICAgICAgICAgICAgICAgICAgb3NmIHdvZTMyIGRvcwotLSMgICBDUDk1MCAgICAgICAgICAgICAgICAgICAgICAgd29lMzIgZG9zCi0tIyAgIENQMTA0NiAgICAgICAgICAgICAgICAgICAgICBhaXgKLS0jICAgQ1AxMTI0ICAgICAgICAgICAgICAgICAgICAgIGFpeAotLSMgICBDUDExMjUgICAgICAgICAgICAgICAgICAgICAgZG9zCi0tIyAgIENQMTEyOSAgICAgICAgICAgICAgICAgICAgICBhaXgKLS0jICAgQ1AxMjUwICAgICAgICAgICAgICAgICAgICAgIHdvZTMyCi0tIyAgIENQMTI1MSAgICAgICAgICAgICAgICAgICAgICBnbGliYyBzb2xhcmlzIG5ldGJzZCBkYXJ3aW4gd29lMzIKLS0jICAgQ1AxMjUyICAgICAgICAgICAgICAgICAgICAgIGFpeCB3b2UzMgotLSMgICBDUDEyNTMgICAgICAgICAgICAgICAgICAgICAgd29lMzIKLS0jICAgQ1AxMjU0ICAgICAgICAgICAgICAgICAgICAgIHdvZTMyCi0tIyAgIENQMTI1NSAgICAgICAgICAgICAgICAgICAgICBnbGliYyB3b2UzMgotLSMgICBDUDEyNTYgICAgICAgICAgICAgICAgICAgICAgd29lMzIKLS0jICAgQ1AxMjU3ICAgICAgICAgICAgICAgICAgICAgIHdvZTMyCi0tIyAgIEdCMjMxMiAgICAgICAgICAgICAgICAgIFkgICBnbGliYyBhaXggaHB1eCBpcml4IHNvbGFyaXMgZnJlZWJzZCBuZXRic2QgZGFyd2luCi0tIyAgIEVVQy1KUCAgICAgICAgICAgICAgICAgIFkgICBnbGliYyBhaXggaHB1eCBpcml4IG9zZiBzb2xhcmlzIGZyZWVic2QgbmV0YnNkIGRhcndpbgotLSMgICBFVUMtS1IgICAgICAgICAgICAgICAgICBZICAgZ2xpYmMgYWl4IGhwdXggaXJpeCBvc2Ygc29sYXJpcyBmcmVlYnNkIG5ldGJzZCBkYXJ3aW4KLS0jICAgRVVDLVRXICAgICAgICAgICAgICAgICAgICAgIGdsaWJjIGFpeCBocHV4IGlyaXggb3NmIHNvbGFyaXMgbmV0YnNkCi0tIyAgIEJJRzUgICAgICAgICAgICAgICAgICAgIFkgICBnbGliYyBhaXggaHB1eCBvc2Ygc29sYXJpcyBmcmVlYnNkIG5ldGJzZCBkYXJ3aW4KLS0jICAgQklHNS1IS1NDUyAgICAgICAgICAgICAgICAgIGdsaWJjIHNvbGFyaXMKLS0jICAgR0JLICAgICAgICAgICAgICAgICAgICAgICAgIGdsaWJjIGFpeCBvc2Ygc29sYXJpcyB3b2UzMiBkb3MKLS0jICAgR0IxODAzMCAgICAgICAgICAgICAgICAgICAgIGdsaWJjIHNvbGFyaXMgbmV0YnNkCi0tIyAgIFNISUZUX0pJUyAgICAgICAgICAgICAgIFkgICBocHV4IG9zZiBzb2xhcmlzIGZyZWVic2QgbmV0YnNkIGRhcndpbgotLSMgICBKT0hBQiAgICAgICAgICAgICAgICAgICAgICAgZ2xpYmMgc29sYXJpcyB3b2UzMgotLSMgICBUSVMtNjIwICAgICAgICAgICAgICAgICAgICAgZ2xpYmMgYWl4IGhwdXggb3NmIHNvbGFyaXMKLS0jICAgVklTQ0lJICAgICAgICAgICAgICAgICAgWSAgIGdsaWJjCi0tIyAgIFRDVk41NzEyLTEgICAgICAgICAgICAgICAgICBnbGliYwotLSMgICBHRU9SR0lBTi1QUyAgICAgICAgICAgICAgICAgZ2xpYmMKLS0jICAgSFAtUk9NQU44ICAgICAgICAgICAgICAgICAgIGhwdXgKLS0jICAgSFAtQVJBQklDOCAgICAgICAgICAgICAgICAgIGhwdXgKLS0jICAgSFAtR1JFRUs4ICAgICAgICAgIC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yAiSVNPODg1OS0xNSBJU08tODg1OS0xNSIKLS0JZWNobyAiSUJNLTg1MCBDUDg1MCIKLS0JZWNobyAiSUJNLTg1NiBDUDg1NiIKLS0JZWNobyAiSUJNLTkyMSBJU08tODg1OS0xMyIKLS0JZWNobyAiSUJNLTkyMiBDUDkyMiIKLS0JZWNobyAiSUJNLTkzMiBDUDkzMiIKLS0JZWNobyAiSUJNLTk0MyBDUDk0MyIKLS0JZWNobyAiSUJNLTEwNDYgQ1AxMDQ2IgotLQllY2hvICJJQk0tMTEyNCBDUDExMjQiCi0tCWVjaG8gIklCTS0xMTI5IENQMTEyOSIKLS0JZWNobyAiSUJNLTEyNTIgQ1AxMjUyIgotLQllY2hvICJJQk0tZXVjQ04gR0IyMzEyIgotLQllY2hvICJJQk0tZXVjSlAgRVVDLUpQIgotLQllY2hvICJJQk0tZXVjS1IgRVVDLUtSIgotLQllY2hvICJJQk0tZXVjVFcgRVVDLVRXIgotLQllY2hvICJiaWc1IEJJRzUiCi0tCWVjaG8gIkdCSyBHQksiCi0tCWVjaG8gIlRJUy02MjAgVElTLTYyMCIKLS0JZWNobyAiVVRGLTggVVRGLTgiCi0tCTs7Ci0tICAgIGhwdXgqKQotLQllY2hvICJpc284ODU5MSBJU08tODg1OS0xIgotLQllY2hvICJpc284ODU5MiBJU08tODg1OS0yIgotLQllY2hvICJpc284ODU5NSBJU08tODg1OS01IgotLQllY2hvICJpc284ODU5NiBJU08tODg1OS02IgotLQllY2hvICJpc284ODU5NyBJU08tODg1OS03IgotLQllY2hvICJpc284ODU5OCBJU08tODg1OS04IgotLQllY2hvICJpc284ODU5OSBJU08tODg1OS05IgotLQllY2hvICJpc284ODU5MTUgSVNPLTg4NTktMTUiCi0tCWVjaG8gInJvbWFuOCBIUC1ST01BTjgiCi0tCWVjaG8gImFyYWJpYzggSFAtQVJBQklDOCIKLS0JZWNobyAiZ3JlZWs4IEhQLUdSRUVLOCIKLS0JZWNobyAiaGVicmV3OCBIUC1IRUJSRVc4IgotLQllY2hvICJ0dXJraXNoOCBIUC1UVVJLSVNIOCIKLS0JZWNobyAia2FuYTggSFAtS0FOQTgiCi0tCWVjaG8gInRpczYyMCBUSVMtNjIwIgotLQllY2hvICJiaWc1IEJJRzUiCi0tCWVjaG8gImV1Y0pQIEVVQy1KUCIKLS0JZWNobyAiZXVjS1IgRVVDLUtSIgotLQllY2hvICJldWNUVyBFVUMtVFciCi0tCWVjaG8gImhwMTVDTiBHQjIzMTIiCi0tCSNlY2hvICJjY2RjID8iICMgd2hhdCBpcyB0aGlzPwotLQllY2hvICJTSklTIFNISUZUX0pJUyIKLS0JZWNobyAidXRmOCBVVEYtOCIKLS0JOzsKLS0gICAgaXJpeCopCi0tCWVjaG8gIklTTzg4NTktMSBJU08tODg1OS0xIgotLQllY2hvICJJU084ODU5LTIgSVNPLTg4NTktMiIKLS0JZWNobyAiSVNPODg1OS01IElTTy04ODU5LTUiCi0tCWVjaG8gIklTTzg4NTktNyBJU08tODg1OS03IgotLQllY2hvICJJU084ODU5LTkgSVNPLTg4NTktOSIKLS0JZWNobyAiZXVjQ04gR0IyMzEyIgotLQllY2hvICJldWNKUCBFVUMtSlAiCi0tCWVjaG8gImV1Y0tSIEVVQy1LUiIKLS0JZWNobyAiZXVjVFcgRVVDLVRXIgotLQk7OwotLSAgICBvc2YqKQotLQllY2hvICJJU084ODU5LTEgSVNPLTg4NTktMSIKLS0JZWNobyAiSVNPODg1OS0yIElTTy04ODU5LTIiCi0tCWVjaG8gIklTTzg4NTktNCBJU08tODg1OS00IgotLQllY2hvICJJU084ODU5LTUgSVNPLTg4NTktNSIKLS0JZWNobyAiSVNPODg1OS03IElTTy04ODU5LTciCi0tCWVjaG8gIklTTzg4NTktOCBJU08tODg1OS04IgotLQllY2hvICJJU084ODU5LTkgSVNPLTg4NTktOSIKLS0JZWNobyAiSVNPODg1OS0xNSBJU08tODg1OS0xNSIKLS0JZWNobyAiY3A4NTAgQ1A4NTAiCi0tCWVjaG8gImJpZzUgQklHN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zVdID09ICc2JyAmJiBuYW1lWzZdID09ICdcMCcpCi0tCSAgICB7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdkJykKLS0JCXJldHVybiBQUklkMTY7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdpJykKLS0JCXJldHVybiBQUklpMTY7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdvJykKLS0JCXJldHVybiBQUklvMTY7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICd1JykKLS0JCXJldHVybiBQUkl1MTY7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICd4JykKLS0JCXJldHVybiBQUkl4MTY7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdYJykKLS0JCXJldHVybiBQUklYMTY7Ci0tCSAgICAgIGFib3J0ICgpOwotLQkgICAgfQotLQkgIGlmIChuYW1lWzRdID09ICczJyAmJiBuYW1lWzVdID09ICcyJyAmJiBuYW1lWzZdID09ICdcMCcpCi0tCSAgICB7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdkJykKLS0JCXJldHVybiBQUklkMzI7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdpJykKLS0JCXJldHVybiBQUklpMzI7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdvJykKLS0JCXJldHVybiBQUklvMzI7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICd1JykKLS0JCXJldHVybiBQUkl1MzI7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICd4JykKLS0JCXJldHVybiBQUkl4MzI7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdYJykKLS0JCXJldHVybiBQUklYMzI7Ci0tCSAgICAgIGFib3J0ICgpOwotLQkgICAgfQotLQkgIGlmIChuYW1lWzRdID09ICc2JyAmJiBuYW1lWzVdID09ICc0JyAmJiBuYW1lWzZdID09ICdcMCcpCi0tCSAgICB7Ci0tCSAgICAgIGlmIChuYW1lWzNdID09ICdkJykKLS0JCXJldHVybiBQU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dWd1ZXNlIiwgICJwdF9CUiIgfSwKLS0gICAgeyAiQnJldG9uIiwgICAgICAgICAgICAgICAgImJyIiB9LAotLSAgICB7ICJCdWxnYXJpYW4iLCAgICAgICAgICAgICAiYmciIH0sCi0tICAgIHsgIkJ1cm1lc2UiLCAgICAgICAgICAgICAgICJteSIgfSwKLS0gICAgeyAiQnllbG9ydXNzaWFuIiwgICAgICAgICAgImJlIiB9LAotLSAgICB7ICJDYXRhbGFuIiwgICAgICAgICAgICAgICAiY2EiIH0sCi0tICAgIHsgIkNoZXdhIiwgICAgICAgICAgICAgICAgICJueSIgfSwKLS0gICAgeyAiQ2hpY2hld2EiLCAgICAgICAgICAgICAgIm55IiB9LAotLSAgICB7ICJDaGluZXNlIiwgICAgICAgICAgICAgICAiemgiIH0sCi0tICAgIHsgIkNoaW5lc2UsIFNpbXBsaWZpZWQiLCAgICJ6aF9DTiIgfSwKLS0gICAgeyAiQ2hpbmVzZSwgVHJhZGl0aW9uYWwiLCAgInpoX1RXIiB9LAotLSAgICB7ICJDaGluZXNlLCBUcmFkdGlvbmFsIiwgICAiemhfVFciIH0sCi0tICAgIHsgIkNyb2F0aWFuIiwgICAgICAgICAgICAgICJociIgfSwKLS0gICAgeyAiQ3plY2giLCAgICAgICAgICAgICAgICAgImNzIiB9LAotLSAgICB7ICJEYW5pc2giLCAgICAgICAgICAgICAgICAiZGEiIH0sCi0tICAgIHsgIkR1dGNoIiwgICAgICAgICAgICAgICAgICJubCIgfSwKLS0gICAgeyAiRHpvbmdraGEiLCAgICAgICAgICAgICAgImR6IiB9LAotLSAgICB7ICJFbmdsaXNoIiwgICAgICAgICAgICAgICAiZW4iIH0sCi0tICAgIHsgIkVzcGVyYW50byIsICAgICAgICAgICAgICJlbyIgfSwKLS0gICAgeyAiRXN0b25pYW4iLCAgICAgICAgICAgICAgImV0IiB9LAotLSAgICB7ICJGYXJvZXNlIiwgICAgICAgICAgICAgICAiZm8iIH0sCi0tICAgIHsgIkZhcnNpIiwgICAgICAgICAgICAgICAgICJmYSIgfSwKLS0gICAgeyAiRmlubmlzaCIsICAgICAgICAgICAgICAgImZpIiB9LAotLSAgICB7ICJGbGVtaXNoIiwgICAgICAgICAgICAgICAibmxfQkUiIH0sCi0tICAgIHsgIkZyZW5jaCIsICAgICAgICAgICAgICAgICJmciIgfSwKLS0gICAgeyAiR2FsaWNpYW4iLCAgICAgICAgICAgICAgImdsIiB9LAotLSAgICB7ICJHYWxsZWdhbiIsICAgICAgICAgICAgICAiZ2wiIH0sCi0tICAgIHsgIkdlb3JnaWFuIiwgICAgICAgICAgICAgICJrYSIgfSwKLS0gICAgeyAiR2VybWFuIiwgICAgICAgICAgICAgICAgImRlIiB9LAotLSAgICB7ICJHcmVlayIsICAgICAgICAgICAgICAgICAiZWwiIH0sCi0tICAgIHsgIkdyZWVubGFuZGljIiwgICAgICAgICAgICJrbCIgfSwKLS0gICAgeyAiR3VhcmFuaSIsICAgICAgICAgICAgICAgImduIiB9LAotLSAgICB7ICJHdWphcmF0aSIsICAgICAgICAgICAgICAiZ3UiIH0sCi0tICAgIHsgIkhhd2FpaWFuIiwgICAgICAgICAgICAgICJoYXciIH0sIC8qIFllcywgImhhdyIsIG5vdCAiY3BlIi4gICovCi0tICAgIHsgIkhlYnJldyIsICAgICAgICAgICAgICAgICJoZSIgfSwKLS0gICAgeyAiSGluZGkiLCAgICAgICAgICAgICAgICAgImhpIiB9LAotLSAgICB7ICJIdW5nYXJpYW4iLCAgICAgICAgICAgICAiaHUiIH0sCi0tICAgIHsgIkljZWxhbmRpYyIsICAgICAgICAgICAgICJpcyIgfSwKLS0gICAgeyAiSW5kb25lc2lhbiIsICAgICAgICAgICAgImlkIiB9LAotLSAgICB7ICJJbnVrdGl0dXQiLCAgICAgICAgICAgICAiaXUiIH0sCi0tICAgIHsgIklyaXNoIiwgICAgICAgICAgICAgICAgICJnYSIgfSwKLS0gICAgeyAiSXRhbGlhbiIsICAgICAgICAgICAgICAgIml0IiB9LAotLSAgICB7ICJKYXBhbmVzZSIsICAgICAgICAgICAgICAiamEiIH0sCi0tICAgIHsgIkphdmFuZXNlIiwgICAgICAgICAgICAgICJqdiIgfSwKLS0gICAgeyAiS2FsYWFsbGlzdXQiLCAgICAgICAgICAgImtsIiB9LAotLSAgICB7ICJLYW5uYWRhIiwgICAgICAgICAgICAgICAia24iIH0sCi0tICAgIHsgIkthc2htaXJpIiwgICAgICAgICAgICAgICJrcyIgfSwKLS0gICAgeyAiS2F6YWtoIiwgICAgICAgICAgICAgICAgImtrIiB9LAotLSAgICB7ICJLaG1lciIsICAgICAgICAgICAgICAgICAia20iIH0sCi0tICAgIHsgIktpbnlhcndhbmRhIiwgICAgICAgICAgICJydyIgfSwKLS0gICAgeyAiS2lyZ2hpeiIsICAgICAgICAgICAgICAgImt5IiB9LAotLSAgICB7ICJLb3JlYW4iLCAgICAgICAgICAgICAgICAia28iIH0sCi0tICAgIHsgIkt1cmRpc2giLCAgICAgICAgICAgICAgICJrdSIgfSwKLS0gICAgeyAiTGF0aW4iLCAgICAgICAgICAgICAgICAgImxhIiB9LAotLSAgICB7ICJMYXR2aWFuIiwgICAgICAgICAgICAgICAibHYiIH0sCi0tICAgIHsgIkxpdGh1YW5pYW4iLCAgICAgICAgICAgICJsdCIgfSwKLS0gICAgeyAiTWFjZWRvbmlhbiIsICAgICAgICAgICAgIm1rIiB9LAotLSAgICB7ICJNYWxhZ2FzeSIsICAgICAgICAgICAgICAibWciIH0sCi0tICAgIHsgIk1hbGF5IiwgICAgICAgICAgICAgICAgICJtcyIgfSwKLS0gICAgeyAiTWFsYXlhbGFtIiwgICAgICAgICAgICAgIm1sIiB9LAotLSAgICB7ICJNYWx0ZXNlIiwgICAgICAgICAgICAgICAibXQiIH0sCi0tICAgIHsgIk1hbngiLCAgICAgICAgICAgICAgICAgICJndiIgfSwKLS0gICAgeyAiTWFyYXRoaSIsICAgICAgICAgICAgICAgIm1yIiB9LAotLSAgICB7ICJNb2xkYXZpYW4iLCAgICAgICAgICAgICAibW8iIH0sCi0tICAgIHsgIk1vbmdvbGlhbiIsICAgICAgICAgICAgICJtbiIgfSwKLS0gICAgeyAiTmVwYWxpIiwgICAgICAgICAgICAgICAgIm5lIiB9LAotLSAgICB7ICJOb3J3ZWdpYW4iLCAgICAgICAgICAgICAibmIiIH0sIC8qIFllcywgIm5iIiwgbm90IHRoZSBvYnNvbGV0ZSAibm8iLiAgKi8KLS0gICAgeyAiTnlhbmphIiwgICAgICAgICAgICAgICAgIm55IiB9LAotLSAgICB7ICJOeW5vcnNrIiwgICAgICAgICAgICAgICAibm4iIH0sCi0tICAgIHsgIk9yaXlhIiwgICAgICAgICAgICAgICAgICJvciIgfSwKLS0gICAgeyAiT3JvbW8iLCAgICAgICAgICAgICAgICAgIm9tIiB9LAotLSAgICB7ICJQYW5qYWJpIiwgICAgICAgICAgICAgICAicGEiIH0sCi0tICAgIHsgIlBhc2h0byIsICAgICAgICAgICAgICAgICJwcyIgfSwKLS0gICAgeyAiUGVyc2lhbiIsICAgICAgICAgICAgICAgImZhIiB9LAotLSAgICB7ICJQb2xpc2giLCAgICAgICAgICAgICAgICAicGwiIH0sCi0tICAgIHsgIlBvcnR1Z3Vlc2UiLCAgICAgICAgICAgICJwdCIgfSwKLS0gICAgeyAiUG9ydHVndWVzZSwgQnJhemlsaWFuIiwgInB0X0JSIiB9LAotLSAgICB7ICJQdW5qYWJpIiwgICAgICAgICAgICAgICAicGEiIH0sCi0tICAgIHsgIlB1c2h0byIsICAgICAgICAgICAgICAgICJwcyIgfSwKLS0gICAgeyAiUXVlY2h1YSIsICAgICAgICAgICAgICAgInF1IiB9LAotLSAgICB7ICJSb21hbmlhbiIsICAgICAgICAgICAgICAicm8iIH0sCi0tICAgIHsgIlJ1YW5kYSIsICAgICAgICAgICAgICAgICJydyIgfSwKLS0gICAgeyAiUnVuZGkiLCAgICAgICAgICAgICAgICAgInJuIiB9LAotLSAgICB7ICJSdXNzaWFuIiwgICAgICAgICAgICAgICAicnUiIH0sCi0tICAgIHsgIlNhbWkiLCAgICAgICAgICAgICAgICAgICJzZV9OTyIgfSwgLyogTm90IGp1c3QgInNlIi4gICovCi0tICAgIHsgIlNhbnNrcml0IiwgICAgICAgICAgICAgICJzYSIgfSwKLS0gICAgeyAiU2NvdHRpc2giLCAgICAgICAgICAgICAgImdkIiB9LAotLSAgICB7ICJTZXJiaWFuIiwgICAgICAgICAgICAgICAic3IiIH0sCi0tICAgIHsgIlNpbXBsaWZpZWQgQ2hpbmVzZSIsICAgICJ6aF9DTiIgfSwKLS0gICAgeyAiU2luZGhpIiwgICAgICAgICAgICAgICAgInNkIiB9LAotLSAgICB7ICJTaW5oYWxlc2UiLCAgICAgICAgICAgICAic2kiIH0sCi0tICAgIHsgIlNsb3ZhayIsICAgICAgICAgICAgICAgICJzayIgfSwKLS0gICAgeyAiU2xvdmVuaWFuIiwgICAgICAgICAgICAgInNsIiB9LAotLSAgICB7ICJTb21hbGkiLCAgICAgICAgICAgICAgICAic28iIH0sCi0tICAgIHsgIlNwYW5pc2giLCAgICAgICAgICAgICAgICJlcyIgfSwKLS0gICAgeyAiU3VuZGFuZXNlIiwgICAgICAgICAgICAgInN1IiB9LAotLSAgICB7ICJTd2FoaWxpIiwgICAgICAgICAgICAgICAic3ciIH0sCi0tICAgIHsgIlN3ZWRpc2giLCAgICAgICAgICAgICAgICJzdiIgfSwKLS0gICAgeyAiVGFnYWxvZyIsICAgICAgICAgICAgICAgInRsIiB9LAotLSAgICB7ICJUYWppayIsICAgICAgICAgICAgICAgICAidGciIH0sCi0tICAgIHsgIlRhamlraSIsICAgICAgICAgICAgICAgICJ0ZyIgfSwKLS0gICAgeyAiVGFtaWwiLCAgICAgICAgICAgICAgICAgInRhIiB9LAotLSAgICB7ICJUYXRhciIsICAgICAgICAgICAgICAgICAidHQiIH0sCi0tICAgIHsgIlRlbHVndSIsICAgICAgICAgICAgICAgICJ0ZSIgfSwKLS0gICAgeyAiVGhhaSIsICAgICAgICAgICAgICAgICAgInRoIiB9LAotLSAgICB7ICJUaWJldGFuIiwgICAgICAgICAgICAgICAiYm8iIH0sCi0tICAgIHsgIlRpZ3JpbnlhIiwgICAgICAgICAgICAgICJ0aSIgfSwKLS0gICAgeyAiVG9uZ2FuIiwgICAgICAgICAgICAgICAgInRvIiB9LAotLSAgICB7ICJUcmFkaXRpb25hbCBDaGluZXNlIiwgICAiemhfVFciIH0sCi0tICAgIHsgIlR1cmtpc2giLCAgICAgICAgICAgICAgICJ0ciIgfSwKLS0gICAgeyAiVHVya21lbiIsICAgICAgICAgICAgICAgInRrIiB9LAotLSAgICB7ICJVaWdodXIiLCAgICAgICAgICAgICAgICAidWciIH0sCi0tICAgIHsgIlVrcmFpbmlhbiIsICAgICAgICAgICAgICJ1ayIgfSwKLS0gICAgeyAiVXJkdSIsICAgICAgICAgICAgICAgICAgInVyIiB9LAotLSAgICB7ICJVemJlayIsICAgICAgICAgICAgICAgICAidXoiIH0sCi0tICAgIHsgIlZpZXRuYW1lc2UiLCAgICAgICAgICAgICJ2aSIgfSwKLS0gICAgeyAiV2Vsc2giLCAgICAgICAgICAgICAgICAgImN5IiB9LAotLSAgICB7ICJZaWRkaXNoIiwgICAgICAgICAgICAgICAieWkiIH0KLS0gIH07Ci0tCi0tICAvKiBDb252ZXJ0IG5ldy1zdHlsZSBsb2NhbGUgbmFtZXMgd2l0aCBsYW5ndWFnZSB0YWdzIChJU08gNjM5IGFuZCBJU08gMTU5MjQpCi0tICAgICB0byBVbml4IChJU08gNjM5IGFuZCBJU08gMzE2NikgbmFtZXMuICAqLwotLSAgdHlwZWRlZiBzdHJ1Y3QgeyBjb25zdCBjaGFyIGxhbmd0YWdbNysxXTsgY29uc3QgY2hhciB1bml4eVsxMisxXTsgfQotLQkgIGxhbmd0YWdfZW50cnk7Ci0tICBzdGF0aWMgY29uc3QgbGFuZ3RhZ19lbnRyeSBsYW5ndGFnX3RhYmxlW10gPSB7Ci0tICAgIC8qIE1hY09TIFggaGFzICJhei1BcmFiIiwgImF6LUN5cmwiLC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S0jIGRlZmluZSBnbF9sb2NrX2luaXRpYWxpemVyIFwKLS0gICAgUFRIUkVBRF9NVVRFWF9JTklUSUFMSVpFUgotLSMgZGVmaW5lIGdsX2xvY2tfaW5pdChOQU1FKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSAmJiBwdGhyZWFkX211dGV4X2luaXQgKCZOQU1FLCBOVUxMKSAhPSAwKSBcCi0tICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tIyBkZWZpbmUgZ2xfbG9ja19sb2NrKE5BTUUpIFwKLS0gICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgaWYgKHB0aHJlYWRfaW5fdXNlICgpICYmIHB0aHJlYWRfbXV0ZXhfbG9jayAoJk5BTUUpICE9IDApIFwKLS0gICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICB3aGlsZSAoMCkKLS0jIGRlZmluZSBnbF9sb2NrX3VubG9jayhOQU1FKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkgJiYgcHRocmVhZF9tdXRleF91bmxvY2sgKCZOQU1FKSAhPSAwKSBcCi0tICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLSMgZGVmaW5lIGdsX2xvY2tfZGVzdHJveShOQU1FKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSAmJiBwdGhyZWFkX211dGV4X2Rlc3Ryb3kgKCZOQU1FKSAhPSAwKSBcCi0tICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tCi0tLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSBnbF9yd2xvY2tfdCBkYXRhdHlwZSAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCi0tCi0tIyBpZiBIQVZFX1BUSFJFQURfUldMT0NLCi0tCi0tIyAgaWZkZWYgUFRIUkVBRF9SV0xPQ0tfSU5JVElBTElaRVIKLS0KLS10eXBlZGVmIHB0aHJlYWRfcndsb2NrX3QgZ2xfcndsb2NrX3Q7Ci0tIyAgIGRlZmluZSBnbF9yd2xvY2tfZGVmaW5lKFNUT1JBR0VDTEFTUywgTkFNRSkgXAotLSAgICAgIFNUT1JBR0VDTEFTUyBwdGhyZWFkX3J3bG9ja190IE5BTUU7Ci0tIyAgIGRlZmluZSBnbF9yd2xvY2tfZGVmaW5lX2luaXRpYWxpemVkKFNUT1JBR0VDTEFTUywgTkFNRSkgXAotLSAgICAgIFNUT1JBR0VDTEFTUyBwdGhyZWFkX3J3bG9ja190IE5BTUUgPSBnbF9yd2xvY2tfaW5pdGlhbGl6ZXI7Ci0tIyAgIGRlZmluZSBnbF9yd2xvY2tfaW5pdGlhbGl6ZXIgXAotLSAgICAgIFBUSFJFQURfUldMT0NLX0lOSVRJQUxJWkVSCi0tIyAgIGRlZmluZSBnbF9yd2xvY2tfaW5pdChOQU1FKSBcCi0tICAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgaWYgKHB0aHJlYWRfaW5fdXNlICgpICYmIHB0aHJlYWRfcndsb2NrX2luaXQgKCZOQU1FLCBOVUxMKSAhPSAwKSBcCi0tICAgICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB3aGlsZSAoMCkKLS0jICAgZGVmaW5lIGdsX3J3bG9ja19yZGxvY2soTkFNRSkgXAotLSAgICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkgJiYgcHRocmVhZF9yd2xvY2tfcmRsb2NrICgmTkFNRSkgIT0gMCkgXAotLSAgICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHdoaWxlICgwKQotLSMgICBkZWZpbmUgZ2xfcndsb2NrX3dybG9jayhOQU1FKSBcCi0tICAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSAmJiBwdGhyZWFkX3J3bG9ja193cmxvY2sgKCZOQU1FKSAhPSAwKSBcCi0tICAgICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgd2hpbGUgKDApCi0tIyAgIGRlZmluZSBnbF9yd2xvY2tfdW5sb2NrKE5BTUUpIFwKLS0gICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgaWYgKHB0aHJlYWRfaW5fdXNlICgpICYmIHB0aHJlYWRfcndsb2NrX3VubG9jayAoJk5BTUUpICE9IDApIFwKLS0gICAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB3aGlsZSAoMCkKLS0jICAgZGVmaW5lIGdsX3J3bG9ja19kZXN0cm95KE5BTUUpIFwKLS0gICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkgJiYgcHRocmVhZF9yd2xvY2tfZGVzdHJveSAoJk5BTUUpICE9IDApIFwKLS0gICAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHdoaWxlICgwKQotLQotLSMgIGVsc2UKLS0KLS10eXBlZGVmIHN0cnVjdAotLSAgICAgICAgewotLSAgICAgICAgICBpbnQgaW5pdGlhbGl6ZWQ7Ci0tICAgICAgICAgIHB0aHJlYWRfbXV0ZXhfdCBndWFyZDsgICAvKiBwcm90ZWN0cyB0aGUgaW5pdGlhbGl6YXRpb24gKi8KLS0gICAgICAgICAgcHRocmVhZF9yd2xvY2tfdCByd2xvY2s7IC8qIHJlYWQtd3JpdGUgbG9jayAqLwotLSAgICAgICAgfQotLSAgICAgICAgZ2xfcndsb2NrX3Q7Ci0tIyAgIGRlZmluZSBnbF9yd2xvY2tfZGVmaW5lKFNUT1JBR0VDTEFTUywgTkFNRSkgXAotLSAgICAgIFNUT1JBR0VDTEFTUyBnbF9yd2xvY2tfdCBOQU1FOwotLSMgICBkZWZpbmUgZ2xfcndsb2NrX2RlZmluZV9pbml0aWFsaXplZChTVE9SQUdFQ0xBU1MsIE5BTUUpIFwKLS0gICAgICBTVE9SQUdFQ0xBU1MgZ2xfcndsb2NrX3QgTkFNRSA9IGdsX3J3bG9ja19pbml0aWFsaXplcjsKLS0jICAgZGVmaW5lIGdsX3J3bG9ja19pbml0aWFsaXplciBcCi0tICAgICAgeyAwLCBQVEhSRUFEX01VVEVYX0lOSVRJQUxJWkVSIH0KLS0jICAgZGVmaW5lIGdsX3J3bG9ja19pbml0KE5BTUUpIFwKLS0gICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgIFwKLS0gICAgICAgICAgICBnbHRocmVhZF9yd2xvY2tfaW5pdCAoJk5BTUUpOyBcCi0tICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHdoaWxlICgwKQotLSMgICBkZWZpbmUgZ2xfcndsb2NrX3JkbG9jayhOQU1FKSBcCi0tICAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSkgICAgICAgICAgICBcCi0tICAgICAgICAgICAgZ2x0aHJlYWRfcndsb2NrX3JkbG9jayAoJk5BTUUpOyBcCi0tICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgd2hpbGUgKDApCi0tIyAgIGRlZmluZSBnbF9yd2xvY2tfd3Jsb2NrKE5BTUUpIFwKLS0gICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgaWYgKHB0aHJlYWRfaW5fdXNlICgpKSAgICAgICAgICAgIFwKLS0gICAgICAgICAgICBnbHRocmVhZF9yd2xvY2tfd3Jsb2NrICgmTkFNRSk7IFwKLS0gICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB3aGlsZSAoMCkKLS0jICAgZGVmaW5lIGdsX3J3bG9ja191bmxvY2soTkFNRSkgXAotLSAgICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgICAgXAotLSAgICAgICAgICAgIGdsdGhyZWFkX3J3bG9ja191bmxvY2sgKCZOQU1FKTsgXAotLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHdoaWxlICgwKQotLSMgICBkZWZpbmUgZ2xfcndsb2NrX2Rlc3Ryb3koTkFNRSkgXAotLSAgICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSkgICAgICAgICAgICAgXAotLSAgICAgICAgICAgIGdsdGhyZWFkX3J3bG9ja19kZXN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maW5lIGdsX3J3bG9ja19kZWZpbmUoU1RPUkFHRUNMQVNTLCBOQU1FKSBcCi0tICAgIFNUT1JBR0VDTEFTUyBnbF9yd2xvY2tfdCBOQU1FOwotLSMgZGVmaW5lIGdsX3J3bG9ja19kZWZpbmVfaW5pdGlhbGl6ZWQoU1RPUkFHRUNMQVNTLCBOQU1FKSBcCi0tICAgIFNUT1JBR0VDTEFTUyBnbF9yd2xvY2tfdCBOQU1FID0gZ2xfcndsb2NrX2luaXRpYWxpemVyOwotLSMgZGVmaW5lIGdsX3J3bG9ja19pbml0aWFsaXplciBcCi0tICAgIHsgUFRIUkVBRF9NVVRFWF9JTklUSUFMSVpFUiwgUFRIUkVBRF9DT05EX0lOSVRJQUxJWkVSLCBQVEhSRUFEX0NPTkRfSU5JVElBTElaRVIsIDAsIDAgfQotLSMgZGVmaW5lIGdsX3J3bG9ja19pbml0KE5BTUUpIFwKLS0gICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgIFwKLS0gICAgICAgICAgZ2x0aHJlYWRfcndsb2NrX2luaXQgKCZOQU1FKTsgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLSMgZGVmaW5lIGdsX3J3bG9ja19yZGxvY2soTkFNRSkgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgICAgXAotLSAgICAgICAgICBnbHRocmVhZF9yd2xvY2tfcmRsb2NrICgmTkFNRSk7IFwKLS0gICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLSMgZGVmaW5lIGdsX3J3bG9ja193cmxvY2soTkFNRSkgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgICAgXAotLSAgICAgICAgICBnbHRocmVhZF9yd2xvY2tfd3Jsb2NrICgmTkFNRSk7IFwKLS0gICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLSMgZGVmaW5lIGdsX3J3bG9ja191bmxvY2soTkFNRSkgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgICAgXAotLSAgICAgICAgICBnbHRocmVhZF9yd2xvY2tfdW5sb2NrICgmTkFNRSk7IFwKLS0gICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLSMgZGVmaW5lIGdsX3J3bG9ja19kZXN0cm95KE5BTUUpIFwKLS0gICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgICAgIFwKLS0gICAgICAgICAgZ2x0aHJlYWRfcndsb2NrX2Rlc3Ryb3kgKCZOQU1FKTsgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLWV4dGVybiB2b2lkIGdsdGhyZWFkX3J3bG9ja19pbml0ICh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dGlhbGl6ZXI7Ci0tIyAgIGlmZGVmIFBUSFJFQURfUkVDVVJTSVZFX01VVEVYX0lOSVRJQUxJWkVSCi0tIyAgICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfaW5pdGlhbGl6ZXIgXAotLSAgICAgICBQVEhSRUFEX1JFQ1VSU0lWRV9NVVRFWF9JTklUSUFMSVpFUgotLSMgICBlbHNlCi0tIyAgICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfaW5pdGlhbGl6ZXIgXAotLSAgICAgICBQVEhSRUFEX1JFQ1VSU0lWRV9NVVRFWF9JTklUSUFMSVpFUl9OUAotLSMgICBlbmRpZgotLSMgICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfaW5pdChOQU1FKSBcCi0tICAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSAmJiBwdGhyZWFkX211dGV4X2luaXQgKCZOQU1FLCBOVUxMKSAhPSAwKSBcCi0tICAgICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgd2hpbGUgKDApCi0tIyAgIGRlZmluZSBnbF9yZWN1cnNpdmVfbG9ja19sb2NrKE5BTUUpIFwKLS0gICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgaWYgKHB0aHJlYWRfaW5fdXNlICgpICYmIHB0aHJlYWRfbXV0ZXhfbG9jayAoJk5BTUUpICE9IDApIFwKLS0gICAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB3aGlsZSAoMCkKLS0jICAgZGVmaW5lIGdsX3JlY3Vyc2l2ZV9sb2NrX3VubG9jayhOQU1FKSBcCi0tICAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkgJiYgcHRocmVhZF9tdXRleF91bmxvY2sgKCZOQU1FKSAhPSAwKSBcCi0tICAgICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHdoaWxlICgwKQotLSMgICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfZGVzdHJveShOQU1FKSBcCi0tICAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSAm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ICAgZGVmaW5lIGdsX3JlY3Vyc2l2ZV9sb2NrX2luaXQoTkFNRSkgXAotLSAgICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICAgIGdsdGhyZWFkX3JlY3Vyc2l2ZV9sb2NrX2luaXQgKCZOQU1FKTsgXAotLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHdoaWxlICgwKQotLSMgICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfbG9jayhOQU1FKSBcCi0tICAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSkgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgICAgZ2x0aHJlYWRfcmVjdXJzaXZlX2xvY2tfbG9jayAoJk5BTUUpOyBcCi0tICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgd2hpbGUgKDApCi0tIyAgIGRlZmluZSBnbF9yZWN1cnNpdmVfbG9ja191bmxvY2soTkFNRSkgXAotLSAgICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgaWYgKHB0aHJlYWRfaW5fdXNlICgpKSAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICAgIGdsdGhyZWFkX3JlY3Vyc2l2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U1FKTsgXAotLSAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICB3aGlsZSAoMCkKLS0jICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfbG9jayhOQU1FKSBcCi0tICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgIGlmIChwdGhyZWFkX2luX3VzZSAoKSkgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgICBnbHRocmVhZF9yZWN1cnNpdmVfbG9ja19sb2NrICgmTkFNRSk7IFwKLS0gICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgd2hpbGUgKDApCi0tIyAgZGVmaW5lIGdsX3JlY3Vyc2l2ZV9sb2NrX3VubG9jayhOQU1FKSBcCi0tICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgICBnbHRocmVhZF9yZWN1cnNpdmVfbG9ja191bmxvY2sgKCZOQU1FKTsgXAotLSAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgIHdoaWxlICgwKQotLSMgIGRlZmluZSBnbF9yZWN1cnNpdmVfbG9ja19kZXN0cm95KE5BTUUpIFwKLS0gICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgaWYgKHB0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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAocHRocmVhZF9pbl91c2UgKCkpICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgICBpZiAocHRocmVhZF9vbmNlICgmTkFNRSwgSU5JVEZVTkNUSU9OKSAhPSAwKSBcCi0tICAgICAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICAgIGlmIChnbHRocmVhZF9vbmNlX3NpbmdsZXRocmVhZGVkICgmTkFNRSkpICAgIFwKLS0gICAgICAgICAgICAgIElOSVRGVU5DVElPTiAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tZXh0ZXJuIGludCBnbHRocmVhZF9vbmNlX3NpbmdsZXRocmVhZGVkIChwdGhyZWFkX29uY2VfdCAqb25jZV9jb250cm9sKTsKLS0KLS0jIGlmZGVmIF9fY3BsdXNwbHVzCi0tfQotLSMgZW5kaWYKLS0KLS0jZW5kaWYKLS0KLS0vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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E5BTUUpIFwKLS0gICAgU1RPUkFHRUNMQVNTIHB0aF9tdXRleF90IE5BTUU7Ci0tIyBkZWZpbmUgZ2xfbG9ja19kZWZpbmVfaW5pdGlhbGl6ZWQoU1RPUkFHRUNMQVNTLCBOQU1FKSBcCi0tICAgIFNUT1JBR0VDTEFTUyBwdGhfbXV0ZXhfdCBOQU1FID0gZ2xfbG9ja19pbml0aWFsaXplcjsKLS0jIGRlZmluZSBnbF9sb2NrX2luaXRpYWxpemVyIFwKLS0gICAgUFRIX01VVEVYX0lOSVQKLS0jIGRlZmluZSBnbF9sb2NrX2luaXQoTkFNRSkgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgaWYgKHB0aF9pbl91c2UoKSAmJiAhcHRoX211dGV4X2luaXQgKCZOQU1FKSkgXAotLSAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICB3aGlsZSAoMCkKLS0jIGRlZmluZSBnbF9sb2NrX2xvY2soTkFNRSkgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgaWYgKHB0aF9pbl91c2UoKSAmJiAhcHRoX211dGV4X2FjcXVpcmUgKCZOQU1FLCAwLCBOVUxMKSkgXAotLSAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICB3aGlsZSAoMCkKLS0jIGRlZmluZSBnbF9sb2NrX3VubG9jayhOQU1FKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAocHRoX2luX3VzZSgpICYmICFwdGhfbXV0ZXhfcmVsZWFzZSAoJk5BTUUpKSBcCi0tICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLSMgZGVmaW5lIGdsX2xvY2tfZGVzdHJveShOQU1FKSBcCi0tICAgICh2b2lkKSgmTkFNRSkKLS0KLS0vKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIGdsX3J3bG9ja190IGRhdGF0eXBlIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KLS0KLS10eXBlZGVmIHB0aF9yd2xvY2tfdCBnbF9yd2xvY2tfdDsKLS0jICBkZWZpbmUgZ2xfcndsb2NrX2RlZmluZShTVE9SQUdFQ0xBU1MsIE5BTUUpIFwKLS0gICAgIFNUT1JBR0VDTEFTUyBwdGhfcndsb2NrX3QgTkFNRTsKLS0jICBkZWZpbmUgZ2xfcndsb2NrX2RlZmluZV9pbml0aWFsaXplZChTVE9SQUdFQ0xBU1MsIE5BTUUpIFwKLS0gICAgIFNUT1JBR0VDTEFTUyBwdGhfcndsb2NrX3QgTkFNRSA9IGdsX3J3bG9ja19pbml0aWFsaXplcjsKLS0jICBkZWZpbmUgZ2xfcndsb2NrX2luaXRpYWxpemVyIFwKLS0gICAgIFBUSF9SV0xPQ0tfSU5JVAotLSMgIGRlZmluZSBnbF9yd2xvY2tfaW5pdChOQU1FKSBcCi0tICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgIGlmIChwdGhfaW5fdXNlKCkgJiYgIXB0aF9yd2xvY2tfaW5pdCAoJk5BTUUpKSBcCi0tICAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgd2hpbGUgKDApCi0tIyAgZGVmaW5lIGdsX3J3bG9ja19yZGxvY2soTkFNRSkgXAotLSAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgaWYgKHB0aF9pbl91c2UoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICAgICAmJiAhcHRoX3J3bG9ja19hY3F1aXJlICgmTkFNRSwgUFRIX1JXTE9DS19SRCwgMCwgTlVMTCkpIFwKLS0gICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgd2hpbGUgKDApCi0tIyAgZGVmaW5lIGdsX3J3bG9ja193cmxvY2soTkFNRSkgXAotLSAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgaWYgKHB0aF9pbl91c2UoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICAgICAmJiAhcHRoX3J3bG9ja19hY3F1aXJlICgmTkFNRSwgUFRIX1JXTE9DS19SVywgMCwgTlVMTCkpIFwKLS0gICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgd2hpbGUgKDApCi0tIyAgZGVmaW5lIGdsX3J3bG9ja191bmxvY2soTkFNRSkgXAotLSAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICBpZiAocHRoX2luX3VzZSgpICYmICFwdGhfcndsb2NrX3JlbGVhc2UgKCZOQU1FKSkgXAotLSAgICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgIHdoaWxlICgwKQotLSMgIGRlZmluZSBnbF9yd2xvY2tfZGVzdHJveShOQU1FKSBcCi0tICAgICAodm9pZCkoJk5BTUUpCi0tCi0tLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tIGdsX3JlY3Vyc2l2ZV9sb2NrX3QgZGF0YXR5cGUgLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCi0tCi0tLyogSW4gUHRoLCBtdXRleGVzIGFyZSByZWN1cnNpdmUgYnkgZGVmYXVsdC4gICovCi0tdHlwZWRlZiBwdGhfbXV0ZXhfdCBnbF9yZWN1cnNpdmVfbG9ja190OwotLSMgIGRlZmluZSBnbF9yZWN1cnNpdmVfbG9ja19kZWZpbmUoU1RPUkFHRUNMQVNTLCBOQU1FKSBcCi0tICAgICBTVE9SQUdFQ0xBU1MgcHRoX211dGV4X3QgTkFNRTsKLS0jICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfZGVmaW5lX2luaXRpYWxpemVkKFNUT1JBR0VDTEFTUywgTkFNRSkgXAotLSAgICAgU1RPUkFHRUNMQVNTIHB0aF9tdXRleF90IE5BTUUgPSBnbF9yZWN1cnNpdmVfbG9ja19pbml0aWFsaXplcjsKLS0jICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfaW5pdGlhbGl6ZXIgXAotLSAgICAgUFRIX01VVEVYX0lOSVQKLS0jICBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfaW5pdChOQU1FKSBcCi0tICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICBpZiAocHRoX2luX3VzZSgpICYmICFwdGhfbXV0ZXhfaW5pdCAoJk5BTUUpKSBcCi0tICAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgIHdoaWxlICgwKQotLSMgIGRlZmluZSBnbF9yZWN1cnNpdmVfbG9ja19sb2NrKE5BTUUpIFwKLS0gICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgIGlmIChwdGhfaW5fdXNlKCkgJiYgIXB0aF9tdXRleF9hY3F1aXJlICgmTkFNRSwgMCwgTlVMTCkpIFwKLS0gICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgd2hpbGUgKDApCi0tIyAgZGVmaW5lIGdsX3JlY3Vyc2l2ZV9sb2NrX3VubG9jayhOQU1FKSBcCi0tICAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICBpZiAocHRoX2luX3VzZSgpICYmICFwdGhfbXV0ZXhfcmVsZWFzZSAoJk5BTUUpKSBcCi0tICAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgIHdoaWxlICgwKQotLSMgIGRlZmluZSBnbF9yZWN1cnNpdmVfbG9ja19kZXN0cm95KE5BTUUpIFwKLS0gICAgICh2b2lkKSgmTkFNRSkKLS0KLS0vKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSBnbF9vbmNlX3QgZGF0YXR5cGUgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KLS0KLS10eXBlZGVmIHB0aF9vbmNlX3QgZ2xfb25jZV90OwotLSMgZGVmaW5lIGdsX29uY2VfZGVmaW5lKFNUT1JBR0VDTEFTUywgTkFNRSkgXAotLSAgICBTVE9SQUdFQ0xBU1MgcHRoX29uY2VfdCBOQU1FID0gUFRIX09OQ0VfSU5JVDsKLS0jIGRlZmluZSBnbF9vbmNlKE5BTUUsIElOSVRGVU5DVElPTikgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmIChwdGhfaW5fdXNlICgpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgICAgdm9pZCAoKmdsX29uY2VfdGVtcCkgKHZvaWQpID0gSU5JVEZVTkNUSU9OOyAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgICBpZiAoIXB0aF9vbmNlICgmTkFNRSwgZ2x0aHJlYWRfb25jZV9jYWxsLCAmZ2xfb25jZV90ZW1wKSkgXAotLSAgICAgICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgICAgaWYgKGdsdGhyZWFkX29uY2Vfc2luZ2xldGhyZWFkZWQgKCZOQU1FKSkgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgICAgIElOSVRGVU5DVElPTiAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tZXh0ZXJuIHZvaWQgZ2x0aHJlYWRfb25jZV9jYWxsICh2b2lkICphcmcpOwotLWV4dGVybiBpbnQgZ2x0aHJlYWRfb25jZV9zaW5nbGV0aHJlYWRlZCAocHRoX29uY2VfdCAqb25jZV9jb250cm9sKTsKLS0KLS0jIGlmZGVmIF9fY3BsdXNwbHVzCi0tfQotLSMgZW5kaWYKLS0KLS0jZW5kaWYKLS0KLS0vKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCi0tCi0tI2lmIFVTRV9TT0xBUklTX1RIUkVBRFMKLS0KLS0vKiBVc2UgdGhlIG9sZCBTb2xhcmlzIHRocmVhZHMgbGlicmFyeS4gICovCi0tCi0tIyBpbmNsdWRlIDx0aHJlYWQuaD4KLS0jIGluY2x1ZGUgPHN5bmNoLmg+Ci0tIyBpbmNsdWRlIDxzdGRsaWIuaD4KLS0KLS0jIGlmZGVmIF9fY3BsdXNwbHVzCi0tZXh0ZXJuICJDIiB7Ci0tIyBlbmRpZgotLQotLSMgaWYgVVNFX1NPTEFSSVNfVEhSRUFEU19XRUFLCi0tCi0tLyogVXNlIHdlYWsgcmVmZXJlbmNlcyB0byB0aGUgb2xkIFNvbGFyaXMgdGhyZWFkcyBsaWJyYXJ5LiAgKi8KLS0KLS0jICBwcmFnbWEgd2VhayBtdXRleF9pbml0Ci0tIyAgcHJhZ21hIHdlYWsgbXV0ZXhfbG9jawotLS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gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgaWYgKHRocmVhZF9pbl91c2UgKCkgJiYgbXV0ZXhfaW5pdCAoJk5BTUUsIFVTWU5DX1RIUkVBRCwgTlVMTCkgIT0gMCkgXAotLSAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICB3aGlsZSAoMCkKLS0jIGRlZmluZSBnbF9sb2NrX2xvY2soTkFNRSkgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAodGhyZWFkX2luX3VzZSAoKSAmJiBtdXRleF9sb2NrICgmTkFNRSkgIT0gMCkgXAotLSAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLSMgZGVmaW5lIGdsX2xvY2tfdW5sb2NrKE5BTUUpIFwKLS0gICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmICh0aHJlYWRfaW5fdXNlICgpICYmIG11dGV4X3VubG9jayAoJk5BTUUpICE9IDApIFwKLS0gICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tIyBkZWZpbmUgZ2xfbG9ja19kZXN0cm95KE5BTUUpIFwKLS0gICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgaWYgKHRocmVhZF9pbl91c2UgKCkgJiYgbXV0ZXhfZGVzdHJveSAoJk5BTUUpICE9IDApIFwKLS0gICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICB3aGlsZSAoMCkKLS0KLS0vKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIGdsX3J3bG9ja190IGRhdGF0eXBlIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KLS0KLS10eXBlZGVmIHJ3bG9ja190IGdsX3J3bG9ja190OwotLSMgZGVmaW5lIGdsX3J3bG9ja19kZWZpbmUoU1RPUkFHRUNMQVNTLCBOQU1FKSBcCi0tICAgIFNUT1JBR0VDTEFTUyByd2xvY2tfdCBOQU1FOwotLSMgZGVmaW5lIGdsX3J3bG9ja19kZWZpbmVfaW5pdGlhbGl6ZWQoU1RPUkFHRUNMQVNTLCBOQU1FKSBcCi0tICAgIFNUT1JBR0VDTEFTUyByd2xvY2tfdCBOQU1FID0gZ2xfcndsb2NrX2luaXRpYWxpemVyOwotLSMgZGVmaW5lIGdsX3J3bG9ja19pbml0aWFsaXplciBcCi0tICAgIERFRkFVTFRSV0xPQ0sKLS0jIGRlZmluZSBnbF9yd2xvY2tfaW5pdChOQU1FKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmICh0aHJlYWRfaW5fdXNlICgpICYmIHJ3bG9ja19pbml0ICgmTkFNRSwgVVNZTkNfVEhSRUFELCBOVUxMKSAhPSAwKSBcCi0tICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tIyBkZWZpbmUgZ2xfcndsb2NrX3JkbG9jayhOQU1FKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBpZiAodGhyZWFkX2luX3VzZSAoKSAmJiByd19yZGxvY2sgKCZOQU1FKSAhPSAwKSBcCi0tICAgICAgICAgIGFib3J0ICgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLSMgZGVmaW5lIGdsX3J3bG9ja193cmxvY2soTkFNRSkgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgaWYgKHRocmVhZF9pbl91c2UgKCkgJiYgcndfd3Jsb2NrICgmTkFNRSkgIT0gMCkgXAotLSAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICB3aGlsZSAoMCkKLS0jIGRlZmluZSBnbF9yd2xvY2tfdW5sb2NrKE5BTUUpIFwKLS0gICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmICh0aHJlYWRfaW5fdXNlICgpICYmIHJ3X3VubG9jayAoJk5BTUUpICE9IDApIFwKLS0gICAgICAgICAgYWJvcnQgKCk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tIyBkZWZpbmUgZ2xfcndsb2NrX2Rlc3Ryb3koTkFNRSkgXAotLSAgICBkbyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmICh0aHJlYWRfaW5fdXNlICgpICYmIHJ3bG9ja19kZXN0cm95ICgmTkFNRSkgIT0gMCkgXAotLSAgICAgICAgICBhYm9ydCAoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICA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tfaW5pdChOQU1FKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmICh0aHJlYWRfaW5fdXNlICgpKSAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIGdsdGhyZWFkX3JlY3Vyc2l2ZV9sb2NrX2luaXQgKCZOQU1FKTsgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tIyBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfbG9jayhOQU1FKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmICh0aHJlYWRfaW5fdXNlICgpKSAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIGdsdGhyZWFkX3JlY3Vyc2l2ZV9sb2NrX2xvY2sgKCZOQU1FKTsgXAotLSAgICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tIyBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfdW5sb2NrKE5BTUUpIFwKLS0gICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmICh0aHJlYWRfaW5fdXNlICgpKSAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgZ2x0aHJlYWRfcmVjdXJzaXZlX2xvY2tfdW5sb2NrICgmTkFNRSk7IFwKLS0gICAgICB9ICAgICAgICAgICAgICAg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gICBtdXRleF90IG11dGV4OwotLSAgICAgICAgfQotLSAgICAgICAgZ2xfb25jZV90OwotLSMgZGVmaW5lIGdsX29uY2VfZGVmaW5lKFNUT1JBR0VDTEFTUywgTkFNRSkgXAotLSAgICBTVE9SQUdFQ0xBU1MgZ2xfb25jZV90IE5BTUUgPSB7IDAsIERFRkFVTFRNVVRFWCB9OwotLSMgZGVmaW5lIGdsX29uY2UoTkFNRSwgSU5JVEZVTkNUSU9OKSBcCi0tICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmICh0aHJlYWRfaW5fdXNlICgpKSAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICAgIGdsdGhyZWFkX29uY2UgKCZOQU1FLCBJTklURlVOQ1RJT04pOyAgICAgIFwKLS0gICAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgICAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgICBpZiAoZ2x0aHJlYWRfb25jZV9zaW5nbGV0aHJlYWRlZCAoJk5BTUUpKSBcCi0tICAgICAgICAgICAgICBJTklURlVOQ1RJT04gKCk7ICAgICAgICAgICAgICAgICAgICAgICAgXAotLSAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0tICAgIHdoaWxlICgwKQotLWV4dGV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IE5BTUUpCi0tIyBkZWZpbmUgZ2xfcmVjdXJzaXZlX2xvY2tfaW5pdChOQU1FKQotLSMgZGVmaW5lIGdsX3JlY3Vyc2l2ZV9sb2NrX2xvY2soTkFNRSkKLS0jIGRlZmluZSBnbF9yZWN1cnNpdmVfbG9ja191bmxvY2soTkFNRSkKLS0KLS0vKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSBnbF9vbmNlX3QgZGF0YXR5cGUgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KLS0KLS10eXBlZGVmIGludCBnbF9vbmNlX3Q7Ci0tIyBkZWZpbmUgZ2xfb25jZV9kZWZpbmUoU1RPUkFHRUNMQVNTLCBOQU1FKSBcCi0tICAgIFNUT1JBR0VDTEFTUyBnbF9vbmNlX3QgTkFNRSA9IDA7Ci0tIyBkZWZpbmUgZ2xfb25jZShOQU1FLCBJTklURlVOQ1RJT04pIFwKLS0gICAgZG8gICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB7ICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgIGlmIChOQU1FID09IDApICAgICAgIFwKLS0gICAgICAgICAgeyAgICAgICAgICAgICAgICAgIFwKLS0gICAgICAgICAgICBOQU1FID0gfiAwOyAgICAgIFwKLS0gICAgICAgICAgICBJTklURlVOQ1RJT04gKCk7IFwKLS0gICAgICAgICAgfSAgICAgICAgICAgICAgICAgIFwKLS0gICAgICB9ICAgICAgICAgICAgICAgICAgICAgIFwKLS0gICAgd2hpbGUgKDApCi0tCi0tI2VuZGlmCi0tCi0tLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwotLQotLSNlbmRpZiAvKiBfTE9DS19IICovCi0tLS0gYS9pbnRsL2xvZy5jCi0rKysgL2Rldi9udWxsCi1AQCAtMSwxMTYgKzAsMCBAQAotLS8qIExvZyBmaWxlIG91dHB1dC4KL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i0tICAoKHVuc2lnbmVkIGludCkgKFlZWCkgPD0gWVlNQVhVVE9LID8geXl0cmFuc2xhdGVbWVlYXSA6IFlZVU5ERUZUT0spCi0tCi0tLyogWVlUUkFOU0xBVEVbWVlMRVhdIC0tIEJpc29uIHN5bWJvbCBudW1iZXIgY29ycmVzcG9uZGluZyB0byBZWUxFWC4gICovCi0tc3RhdGljIGNvbnN0IHl5dHlwZV91aW50OCB5eXRyYW5zbGF0ZVtdID0KLS17Ci0tICAgICAgIDAsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgMTAsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgNSwgICAgIDIsCi0tICAgICAgMTQsICAgIDE1LCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAxMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDMsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgMTMsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICA0LCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCi0tICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDEsICAgICAyLCAgICAgNiwgICAgIDcsCi0tICAgICAgIDgsICAgICA5LCAgICAxMQotLX07Ci0tCi0tI2lmIFlZREVCVUcKLS0vKiBZWVBSSFNbWVlOXSAtLSBJbmRleCBvZiB0aGUgZmlyc3QgUkhTIHN5bWJvbCBvZiBydWxlIG51bWJlciBZWU4gaW4KLS0gICBZWVJIUy4gICovCi0tc3RhdGljIGNvbnN0IHl5dHlwZV91aW50OCB5eXByaHNbXSA9Ci0tewotLSAgICAgICAwLCAgICAgMCwgICAgIDMsICAgICA1LCAgICAxMSwgICAgMTUsICAgIDE5LCAgICAyMywgICAgMjcsICAgIDMxLAotLSAgICAgIDM1LCAgICAzOCwgICAgNDAsICAgIDQyCi0tfTsKLS0KLS0vKiBZWVJIUyAtLSBBIGAtMSctc2VwYXJhdGVkIGxpc3Qgb2YgdGhlIHJ1bGVzJyBSSFMuICAqLwotLXN0YXRpYyBjb25zdCB5eXR5cGVfaW50OCB5eXJoc1tdID0KLS17Ci0tICAgICAgMTcsICAgICAwLCAgICAtMSwgICAgMTgsICAgIC0xLCAgICAxOCwgICAgIDMsICAgIDE4LCAgICAxMiwgICAgMTgsCi0tICAgICAgLTEsICAgI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2LCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwKLS0gICAgICAxNiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYKLS19OwotLQotLXN0YXRpYyBjb25zdCB5eXR5cGVfaW50OCB5eWNoZWNrW10gPQotLXsKLS0gICAgICAgMSwgICAgMTAsICAgIDExLCAgICAgNCwgICAgMTMsICAgIDE0LCAgICAgOCwgICAgIDksICAgICAwLCAgICAxMCwKLS0gICAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAgMywgICAgIDQsICAgICA1LCAgICAgNiwKLS0gICAgICAgNywgICAgIDgsICAgICA5LCAgICAgOSwgICAgMjUsICAgICA3LCAgICAgOCwgICAgIDksICAgIDE1LCAgICAgMywKLS0gICAgICAgNCwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAtMSwgICAgLTEsICAgIDEyLCAgICAgMywKLS0gICAgICAgNCwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwKLS0gICAgICAgOSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDkKLS19OwotLQotLS8qIFlZU1RPU1tTVEFURS1OVU1dIC0tIFRoZSAoaW50ZXJuYWwgbnVtYmVyIG9mIHRoZSkgYWNjZXNzaW5nCi0tICAgc3ltYm9sIG9mIHN0YXRlIFNUQVRFLU5VTS4gICovCi0tc3RhdGljIGNvbnN0IHl5dHlwZV91aW50OCB5eXN0b3NbXSA9Ci0tewotLSAgICAgICAwLCAgICAxMCwgICAgMTEsICAgIDEzLCAgICAxNCwgICAgMTcsICAgIDE4LCAgICAxOCwgICAgMTgsICAgICAwLAotLSAgICAgICAzLCAgICAgNCwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxNSwgICAgMTgsICAgIDE4LAotLSAgICAgIDE4LCAgICAxOCwgICAgMTgsICAgIDE4LCAgICAx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lcmUgMCA8PSBjMiA8IGMzIDwgYmV0YV4yfQotLSAgICAgICAgICAgICBQdXQgcSogOj0gcSogLSAxLCBjMiA6PSBjMiArIGJbbi0xXSpiZXRhLCBjMyA6PSBjMyAtIGJbbi0yXS4KLS0gICAgICAgICAgIElmIHEqID4gMDoKLS0gICAgICAgICAgICAgUHV0IHIgOj0gciAtIGIgKiBxKiAqIGJldGFeai4gSW4gZGV0YWlsOgotLSAgICAgICAgICAgICAgIFtyW24ral0sLi4uLHJbal1dIDo9IFtyW24ral0sLi4uLHJbal1dIC0gcSogKiBbYltuLTFdLC4uLixiWzBdXS4KLS0gICAgICAgICAgICAgICBoZW5jZTogdTo9MCwgZm9yIGk6PTAgdG8gbi0xIGRvCi0tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA6PSB1ICsgcSogKiBiW2ldLAotLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJbaitpXTo9cltqK2ldLSh1IG1vZCBiZXRhKSAoKyBiZXRhLCBpZiBjYXJyeSksCi0tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTo9dSBkaXYgYmV0YSAoKyAxLCBpZiBjYXJyeSBpbiBzdWJ0cmFjdGlvbikKLS0gICAgICAgICAgICAgICAgICAgICAgcltuK2pdOj1yW24ral0tdS4KLS0gICAgICAgICAgICAgICB7U2luY2UgYWx3YXlzIHUgPSAocSogKiBbYltpLTFdLC4uLixiWzBdXSBkaXYgYmV0YV5pKSArIDEKLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPCBxKiArIDEgPD0gYmV0YSwKLS0gICAgICAgICAgICAgICAgdGhlIGNhcnJ5IHUgZG9lcyBub3Qgb3ZlcmZsb3cufQotLSAgICAgICAgICAgICBJZiBhIG5lZ2F0aXZlIGNhcnJ5IG9jY3VycywgcHV0IHEqIDo9IHEqIC0gMQotLSAgICAgICAgICAgICAgIGFuZCBbcltuK2pdLC4uLixyW2pdXSA6PSBbcltuK2pdLC4uLixyW2pdXSAr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gICAgICAgICAgICAgIHVuaXRkaXI9JHtzeXN0ZW1kX3N5c3RlbV91bml0ZGlyfSBcCisgICAgICAgICAgICAgICAgbGlidWRldmRpcj0ke25vbmFyY2hfYmFzZV9saWJkaXJ9L3VkZXYgXAogICAgICAgICAgICAgICAgICR7QGJiLnV0aWxzLmNvbnRhaW5zKCJESVNUUk9fRkVBVFVSRVMiLCAic3lzdGVtZCIsICJTWVNURU1EPTIxNiIsICIiLCBkKX0gXAogICAgICAgICAgICAgICAgJwogCkBAIC04Niw2ICs4Nyw5IEBACiAgICAgICAgIGNwICR7V09SS0RJUn0vbXVsdGlwYXRoZC5vZSAke0R9JHtzeXNjb25mZGlyfS9pbml0LmQvbXVsdGlwYXRoZAogICAgIGZpCiAKKyAgICBzZWQgLWkgInM6L3Vzci9saWIvdWRldi9rcGFydHhfaWQ6JHtub25hcmNoX2Jhc2VfbGliZGlyfS91ZGV2L2twYXJ0eF9pZDpnIiBcCisgICAgICAgICR7RH0ke25vbmFyY2hfYmFzZV9saWJkaXJ9L3VkZXYvcnVsZXMuZC8xMS1kbS1tcGF0aC5ydWxlcworCiAgICAgaW5zdGFsbCAtZCAke0R9JHtzeXNjb25mZGlyfQogICAgIGluc3RhbGwgLW0gMDY0NCAke1dPUktESVJ9L211bHRpcGF0aC5jb25mLmV4YW1wbGUgXAogICAgICR7RH0ke3N5c2NvbmZkaXJ9L211bHRpcGF0aC5jb25mLmV4YW1wbGUKQEAgLTEwNiw3ICsxMTAsNyBAQAogCiBQQUNLQUdFUyA9KyAia3BhcnR4IgogRklMRVNfa3BhcnR4ID0gIiR7YmFzZV9zYmluZGlyfS9rcGFydHggXAotICAgICAgICAgICAgICAgICR7bm9uYXJjaF9saWJkaXJ9L3VkZXYva3BhcnR4X2lkIFwKKyAgICAgICAgICAgICAgICAke25vbmFyY2hfYmFzZV9saWJkaXJ9L3VkZXYva3BhcnR4X2lkIFwKICAgICAgICAgICAgICAgICIKIAogUkRFUEVORFNfJHtQTn0gKz0gIm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