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kFOTElCKSAkKERFU1RESVIpJChsaWJkaXIpL2xpYnBjYXAuYQorCVsgLWQgJChERVNURElSKSQoaW5jbHVkZWRpcikgXSB8fCBcCisJICAgIChta2RpciAtcCAkKERFU1RESVIpJChpbmNsdWRlZGlyKTsgY2htb2QgNzU1ICQoREVTVERJUikkKGluY2x1ZGVkaXIpKQorCSQoSU5TVEFMTF9EQVRBKSAkKHNyY2RpcikvcGNhcC5oICQoREVTVERJUikkKGluY2x1ZGVkaXIpL3BjYXAuaAorCSQoSU5TVEFMTF9EQVRBKSAkKHNyY2RpcikvcGNhcC1icGYuaCBcCisJICAgICQoREVTVERJUikkKGluY2x1ZGVkaXIpL3BjYXAtYnBmLmgKKwkkKElOU1RBTExfREFUQSkgJChzcmNkaXIpL3BjYXAtbmFtZWRiLmggXAorCSAgICAkKERFU1RESVIpJChpbmNsdWRlZGlyKS9wY2FwLW5hbWVkYi5oCisJWyAtZCAkKERFU1RESVIpJChtYW5kaXIpL21hbjMgXSB8fCBcCisJCShta2RpciAtcCAkKERFU1RESVIpJChtYW5kaXIpL21hbjM7IGNobW9kIDc1NSAkKERFU1RESVIpJChtYW5kaXIpL21hbjMpCisJJChJTlNUQUxMX0RBVEEpICQoc3JjZGlyKS9wY2FwLjMgXAorCSAgICAkKERFU1RESVIpJChtYW5kaXIpL21hbjMvcGNhcC4zCisKK2luc3RhbGwtc2hhcmVkOiBpbnN0YWxsLXNoYXJlZC0kKERZRVhUKQoraW5zdGFsbC1zaGFyZWQtc286IGxpYnBjYXAuc28KKwkkKElOU1RBTExfUFJPR1JBTSkgbGlicGNhcC5zby5gY2F0IFZFUlNJT05gICQoREVTVERJUikkKGxpYmRpcikvbGlicGNhcC5zby5gY2F0IFZFUlNJT05gCitpbnN0YWxsLXNoYXJlZC1keWxpYjogbGlicGNhcC5keWxpYgorCSQoSU5TVEFMTF9QUk9HUkFNKSBsaWJwY2FwLmBjYXQgVkVSU0lPTmAuZHlsaWIgJChERVNURElSKSQobGliZGlyKS9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Oi91c3Ivc2JpbjovdXNyL2JpbjovdXNyL2NvbnRyaWIvYmluCitleHBvcnQgUEFUSAorCisKKyMjIyMjIyMjIyMKKyMgIG1haW4gICMKKyMjIyMjIyMjIyMKKworY2FzZSAkMSBpbgorICAgc3RhcnRfbXNnKQorICAgICAgcHJpbnQgIlR1bmUgSVAtU3RhY2sgZm9yIHNlY3VyaXR5IgorICAgICAgZXhpdCAkT0tBWQorICAgICAgOzsKKworICAgc3RvcF9tc2cpCisgICAgICBwcmludCAiVGhpcyBhY3Rpb24gaXMgbm90IGFwcGxpY2FibGUiCisgICAgICBleGl0ICRPS0FZCisgICAgICA7OworCisgICBzdG9wKQorICAgICAgZXhpdCAkT0tBWQorICAgICAgOzsKKworICAgc3RhcnQpCisgICAgICA7OyAgIyBmYWxsIHRocm91Z2gKKworICAgKikKKyAgICAgIHByaW50ICJVU0FHRTogJDAge3N0YXJ0X21zZyB8IHN0b3BfbXNnIHwgc3RhcnQgfCBzdG9wfSIgPiYyCisgICAgICBleGl0ICRFUlJPUgorICAgICAgOzsKKyAgIGVzYWMKKworIyMjIyMjIyMjIyMKKyMgIHN0YXJ0ICAjCisjIyMjIyMjIyMjIworCisjCisjIHRjcC1TZXF1ZW5jZS1OdW1iZXJzIG5pY2h0IG1laHIgaW5rcmVtZW50aWVyZW4gc29uZGVybiByYW5kb20KKyMgU3luLUZsb29kLVByb3RlY3Rpb24gYW4KKyMgaXBfZm9yd2FyZGluZyBhdXMKKyMgU291cmNlLVJvdXRpbmcgYXVzCisjIEF1c2dlaGVuZGUgUGFja2V0cyBhbiBldGhlcmVhbC90Y3BkdW1wIGV0Yy4KKworL3Vzci9jb250cmliL2Jpbi9uZXR0dW5lIC1zIHRjcF9yYW5kb21fc2VxIDIgfHwgZXhpdCAkRVJST1IKKy91c3IvY29udHJpYi9iaW4vbmV0dHVuZSAtcyBocF9zeW5fcHJvdGVjdCAxIHx8IGV4aXQgJEVSUk9SCisvdXNyL2NvbnRyaWIvYmluL25ldHR1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joKKwkJCWsgPSBwYy0+azsKKwkJCWlmIChrID49IGJ1ZmxlbikgeworI2lmIGRlZmluZWQoS0VSTkVMKSB8fCBkZWZpbmVkKF9LRVJORUwpCisJCQkJaWYgKG0gPT0gTlVMTCkKKwkJCQkJcmV0dXJuIDA7CisJCQkJbiA9IG07CisJCQkJTUlOREVYKGxlbiwgbiwgayk7CisJCQkJWCA9IChtdG9kKG4sIGNoYXIgKilba10gJiAweGYpIDw8IDI7CisJCQkJY29udGludWU7CisjZWxzZQorCQkJCXJldHVybiAwOworI2VuZGlmCisJCQl9CisJCQlYID0gKHBbcGMtPmtdICYgMHhmKSA8PCAyOworCQkJY29udGludWU7CisKKwkJY2FzZSBCUEZfTER8QlBGX0lNTToKKwkJCUEgPSBwYy0+azsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX0xEWHxCUEZfSU1NOgorCQkJWCA9IHBjLT5rOworCQkJY29udGludWU7CisKKwkJY2FzZSBCUEZfTER8QlBGX01FTToKKwkJCUEgPSBtZW1bcGMtPmtdOworCQkJY29udGludWU7CisKKwkJY2FzZSBCUEZfTERYfEJQRl9NRU06CisJCQlYID0gbWVtW3BjLT5rXTsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX1NUOgorCQkJbWVtW3BjLT5rXSA9IEE7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9TVFg6CisJCQltZW1bcGMtPmtdID0gWDsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX0pNUHxCUEZfSkE6CisJCQlwYyArPSBwYy0+azsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX0pNUHxCUEZfSkdUfEJQRl9LOgorCQkJcGMgKz0gKEEgPiBwYy0+aykgPyBwYy0+anQgOiBwYy0+amY7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9KTVB8QlBGX0pHRXxCUEZfSzoKKwkJCXBjICs9IChBID49IHBjLT5rKSA/IHBjLT5qdCA6IHBjLT5qZjsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX0pNUHxCUEZfSkVRfEJQRl9LOgorCQkJcGMgKz0gKEEgPT0gcGMtPmspID8gcGMtPmp0IDogcGMtPmpmOworCQkJY29udGludWU7CisKKwkJY2FzZSBCUEZfSk1QfEJQRl9KU0VUfEJQRl9LOgorCQkJcGMgKz0gKEEgJiBwYy0+aykgPyBwYy0+anQgOiBwYy0+amY7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9KTVB8QlBGX0pHVHxCUEZfWDoKKwkJCXBjICs9IChBID4gWCkgPyBwYy0+anQgOiBwYy0+amY7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9KTVB8QlBGX0pHRXxCUEZfWDoKKwkJCXBjICs9IChBID49IFgpID8gcGMtPmp0IDogcGMtPmpmOworCQkJY29udGludWU7CisKKwkJY2FzZSBCUEZfSk1QfEJQRl9KRVF8QlBGX1g6CisJCQlwYyArPSAoQSA9PSBYKSA/IHBjLT5qdCA6IHBjLT5qZjsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX0pNUHxCUEZfSlNFVHxCUEZfWDoKKwkJCXBjICs9IChBICYgWCkgPyBwYy0+anQgOiBwYy0+amY7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX0FERHxCUEZfWDoKKwkJCUEgKz0gWDsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX0FMVXxCUEZfU1VCfEJQRl9YOgorCQkJQSAtPSBYOworCQkJY29udGludWU7CisKKwkJY2FzZSBCUEZfQUxVfEJQRl9NVUx8QlBGX1g6CisJCQlBICo9IFg7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX0RJVnxCUEZfWDoKKwkJCWlmIChYID09IDApCisJCQkJcmV0dXJuIDA7CisJCQlBIC89IFg7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX0FORHxCUEZfWDoKKwkJCUEgJj0gWDsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX0FMVXxCUEZfT1J8QlBGX1g6CisJCQlBIHw9IFg7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX0xTSHxCUEZfWDoKKwkJCUEgPDw9IFg7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX1JTSHxCUEZfWDoKKwkJCUEgPj49IFg7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX0FERHxCUEZfSzoKKwkJCUEgKz0gcGMtPms7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX1NVQnxCUEZfSzoKKwkJCUEgLT0gcGMtPms7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX01VTHxCUEZfSzoKKwkJCUEgKj0gcGMtPms7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX0RJVnxCUEZfSzoKKwkJCUEgLz0gcGMtPms7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX0FORHxCUEZfSzoKKwkJCUEgJj0gcGMtPms7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX09SfEJQRl9LOgorCQkJQSB8PSBwYy0+azsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX0FMVXxCUEZfTFNIfEJQRl9LOgorCQkJQSA8PD0gcGMtPms7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9BTFV8QlBGX1JTSHxCUEZfSzoKKwkJCUEgPj49IHBjLT5rOworCQkJY29udGludWU7CisKKwkJY2FzZSBCUEZfQUxVfEJQRl9ORUc6CisJCQlBID0gLUE7CisJCQljb250aW51ZTsKKworCQljYXNlIEJQRl9NSVNDfEJQRl9UQVg6CisJCQlYID0gQTsKKwkJCWNvbnRpbnVlOworCisJCWNhc2UgQlBGX01JU0N8QlBGX1RYQToKKwkJCUEgPSBYOworCQkJY29udGludWU7C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JSFBVWF9SRVY9YGVjaG8gJHtVTkFNRV9SRUxFQVNFfXxzZWQgLWUgJ3MvW14uXSouWzBCXSovLydgCisJY2FzZSAiJHtVTkFNRV9NQUNISU5FfSIgaW4KKwkgICAgOTAwMC8zMT8gKSAgICAgICAgICAgIEhQX0FSQ0g9bTY4MDAwIDs7CisJICAgIDkwMDAvWzM0XT8/ICkgICAgICAgICBIUF9BUkNIPW02OGsgOzsKKwkgICAgOTAwMC9bNjc4XVswLTldWzAtOV0pCisJCWlmIFsgLXggL3Vzci9iaW4vZ2V0Y29uZiBdOyB0aGVuCisJCSAgICBzY19jcHVfdmVyc2lvbj1gL3Vzci9iaW4vZ2V0Y29uZiBTQ19DUFVfVkVSU0lPTiAyPi9kZXYvbnVsbGAKKyAgICAgICAgICAgICAgICAgICAgc2Nfa2VybmVsX2JpdHM9YC91c3IvYmluL2dldGNvbmYgU0NfS0VSTkVMX0JJVFMgMj4vZGV2L251bGxgCisgICAgICAgICAgICAgICAgICAgIGNhc2UgIiR7c2NfY3B1X3ZlcnNpb259IiBpbgorICAgICAgICAgICAgICAgICAgICAgIDUyMykgSFBfQVJDSD0iaHBwYTEuMCIgOzsgIyBDUFVfUEFfUklTQzFfMAorICAgICAgICAgICAgICAgICAgICAgIDUyOCkgSFBfQVJDSD0iaHBwYTEuMSIgOzsgIyBDUFVfUEFfUklTQzFfMQorICAgICAgICAgICAgICAgICAgICAgIDUzMikgICAgICAgICAgICAgICAgICAgICAgIyBDUFVfUEFfUklTQzJfMAorICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAiJHtzY19rZXJuZWxfYml0c30iIGluCisgICAgICAgICAgICAgICAgICAgICAgICAgIDMyKSBIUF9BUkNIPSJocHBhMi4wbiIgOzsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgNjQpIEhQX0FSQ0g9ImhwcGEyLjB3IiA7OworCQkJICAnJykgSFBfQVJDSD0iaHBwYTIuMCIgOzsgICAjIEhQLVVYIDEwLjIwCisgICAgICAgICAgICAgICAgICAgICAgICBlc2FjIDs7CisgICAgICAgICAgICAgICAgICAgIGVzYWMKKwkJZmkKKwkJaWYgWyAiJHtIUF9BUkNIfSIgPSAiIiBdOyB0aGVuCisJCSAgICBldmFsICRzZXRfY2NfZm9yX2J1aWxkCisJCSAgICBzZWQgJ3MvXiAgICAgICAgICAgICAgLy8nIDw8IEVPRiA+JGR1bW15LmMKKworICAgICAgICAgICAgICAjZGVmaW5lIF9IUFVYX1NPVVJDRQorICAgICAgICAgICAgICAjaW5jbHVkZSA8c3RkbGliLmg+CisgICAgICAgICAgICAgICNpbmNsdWRlIDx1bmlzdGQuaD4KKworICAgICAgICAgICAgICBpbnQgbWFpbiAoKQorICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICNpZiBkZWZpbmVkKF9TQ19LRVJORUxfQklUUykKKyAgICAgICAgICAgICAgICAgIGxvbmcgYml0cyA9IHN5c2NvbmYoX1NDX0tFUk5FTF9CSVRTKTsKKyAgICAgICAgICAgICAgI2VuZGlmCisgICAgICAgICAgICAgICAgICBsb25nIGNwdSAgPSBzeXNjb25mIChfU0NfQ1BVX1ZFUlNJT04pOworCisgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGNwdSkKKyAgICAgICAgICAgICAgCXsKKyAgICAgICAgICAgICAgCWNhc2UgQ1BVX1BBX1JJU0MxXzA6IHB1dHMgKCJocHBhMS4wIik7IGJyZWFrOworICAgICAgICAgICAgICAJY2FzZSBDUFVfUEFfUklTQzFfMTogcHV0cyAoImhwcGExLjEiKTsgYnJlYWs7CisgICAgICAgICAgICAgIAljYXNlIENQVV9QQV9SSVNDMl8wOgorICAgICAgICAgICAgICAjaWYgZGVmaW5lZChfU0NfS0VSTkVMX0JJVFMpCisgICAgICAgICAgICAgIAkgICAgc3dpdGNoIChiaXRzKQorICAgICAgICAgICAgICAJCXsKKyAgICAgICAgICAgICAgCQljYXNlIDY0OiBwdXRzICgiaHBwYTIuMHciKTsgYnJlYWs7CisgICAgICAgICAgICA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kFNRV9NQUNISU5FPWFscGhhcGNhNTYgOzsKKwkgIFBDQTU3KSBVTkFNRV9NQUNISU5FPWFscGhhcGNhNTYgOzsKKwkgIEVWNikgICBVTkFNRV9NQUNISU5FPWFscGhhZXY2IDs7CisJICBFVjY3KSAgVU5BTUVfTUFDSElORT1hbHBoYWV2NjcgOzsKKwkgIEVWNjgqKSBVTkFNRV9NQUNISU5FPWFscGhhZXY2OCA7OworICAgICAgICBlc2FjCisJb2JqZHVtcCAtLXByaXZhdGUtaGVhZGVycyAvYmluL3NoIHwgZ3JlcCBsZC5zby4xID4vZGV2L251bGwKKwlpZiB0ZXN0ICIkPyIgPSAwIDsgdGhlbiBMSUJDPSJsaWJjMSIgOyBlbHNlIExJQkM9IiIgOyBmaQorCWVjaG8gJHtVTkFNRV9NQUNISU5FfS11bmtub3duLWxpbnV4LWdudSR7TElCQ30KKwlleGl0IDAgOzsKKyAgICBwYXJpc2M6TGludXg6KjoqIHwgaHBwYTpMaW51eDoqOiopCisJIyBMb29rIGZvciBDUFUgbGV2ZWwKKwljYXNlIGBncmVwICdeY3B1W15hLXpdKjonIC9wcm9jL2NwdWluZm8gMj4vZGV2L251bGwgfCBjdXQgLWQnICcgLWYyYCBpbgorCSAgUEE3KikgZWNobyBocHBhMS4xLXVua25vd24tbGludXgtZ251IDs7CisJICBQQTgqKSBlY2hvIGhwcGEyLjAtdW5rbm93bi1saW51eC1nbnUgOzsKKwkgICopICAgIGVjaG8gaHBwYS11bmtub3duLWxpbnV4LWdudSA7OworCWVzYWMKKwlleGl0IDAgOzsKKyAgICBwYXJpc2M2NDpMaW51eDoqOiogfCBocHBhNjQ6TGludXg6KjoqKQorCWVjaG8gaHBwYTY0LXVua25vd24tbGludXgtZ251CisJZXhpdCAwIDs7CisgICAgczM5MDpMaW51eDoqOiogfCBzMzkweDpMaW51eDoqOiopCisJZWNobyAke1VOQU1FX01BQ0hJTkV9LWlibS1saW51eAorCWV4aXQgMCA7OworICAgIHNoNjQqOkxpbnV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GFycmlzKQorCQliYXNpY19tYWNoaW5lPW04OGstaGFycmlzCisJCW9zPS1zeXN2MworCQk7OworCWhwMzAwLSopCisJCWJhc2ljX21hY2hpbmU9bTY4ay1ocAorCQk7OworCWhwMzAwYnNkKQorCQliYXNpY19tYWNoaW5lPW02OGstaHAKKwkJb3M9LWJzZAorCQk7OworCWhwMzAwaHB1eCkKKwkJYmFzaWNfbWFjaGluZT1tNjhrLWhwCisJCW9zPS1ocHV4CisJCTs7CisJaHAzazlbMC05XVswLTldIHwgaHA5WzAtOV1bMC05XSkKKwkJYmFzaWNfbWFjaGluZT1ocHBhMS4wLWhwCisJCTs7CisJaHA5azJbMC05XVswLTldIHwgaHA5azMxWzAtOV0pCisJCWJhc2ljX21hY2hpbmU9bTY4MDAwLWhwCisJCTs7CisJaHA5azNbMi05XVswLTldKQorCQliYXNpY19tYWNoaW5lPW02OGstaHAKKwkJOzsKKwlocDlrNlswLTldWzAtOV0gfCBocDZbMC05XVswLTldKQorCQliYXNpY19tYWNoaW5lPWhwcGExLjAtaHAKKwkJOzsKKwlocDlrN1swLTc5XVswLTldIHwgaHA3WzAtNzldWzAtOV0pCisJCWJhc2ljX21hY2hpbmU9aHBwYTEuMS1ocAorCQk7OworCWhwOWs3OFswLTldIHwgaHA3OFswLTldKQorCQkjIEZJWE1FOiByZWFsbHkgaHBwYTIuMC1ocAorCQliYXNpY19tYWNoaW5lPWhwcGExLjEtaHAKKwkJOzsKKwlocDlrOFs2N10xIHwgaHA4WzY3XTEgfCBocDlrODBbMjRdIHwgaHA4MFsyNF0gfCBocDlrOFs3OF05IHwgaHA4Wzc4XTkgfCBocDlrODkzIHwgaHA4OTMpCisJCSMgRklYTUU6IHJlYWxseSBocHBhMi4wLWhwCisJCWJhc2ljX21hY2hpbmU9aHBwYTEuMS1ocAorCQk7OworCWhwOWs4WzAtOV1bMTM2NzldIHwgaHA4WzAtOV1bMTM2NzldKQorCQliYXNpY19tYWNoaW5lPWhwcGExLjEtaHAKKwkJOz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hY192YXIKKyAgICBjYXNlICRhY192YWwgaW4gIygKKyAgICAqJHthc19ubH0qKQorICAgICAgY2FzZSAkYWNfdmFyIGluICMoCisgICAgICAqX2N2XyopIHsgZWNobyAiJGFzX21lOiRMSU5FTk86IFdBUk5JTkc6IENhY2hlIHZhcmlhYmxlICRhY192YXIgY29udGFpbnMgYSBuZXdsaW5lLiIgPiY1CitlY2hvICIkYXNfbWU6IFdBUk5JTkc6IENhY2hlIHZhcmlhYmxlICRhY192YXIgY29udGFpbnMgYSBuZXdsaW5lLiIgPiYyO30gOzsKKyAgICAgIGVzYWMKKyAgICAgIGNhc2UgJGFjX3ZhciBpbiAjKAorICAgICAgXyB8IElGUyB8IGFzX25sKSA7OyAjKAorICAgICAgKikgJGFzX3Vuc2V0ICRhY192YXIgOzsKKyAgICAgIGVzYWMgOzsKKyAgICBlc2FjCisgIGRvbmUKKyAgKHNldCkgMj4mMSB8CisgICAgY2FzZSAkYXNfbmxgKGFjX3NwYWNlPSdcJycgJ1wnJzsgc2V0KSAyPiYxYCBpbiAjKAorICAgICoke2FzX25sfWFjX3NwYWNlPVwgKikKKyAgICAgIHNlZCAtbiBcCisJInMvJ1wnJy8nXCcnXFxcXCdcJycnXCcnL2c7CisJICBzL15cXChbXyRhc19jcl9hbG51bV0qX2N2X1tfJGFzX2NyX2FsbnVtXSpcXCk9XFwoLipcXCkvXFwxPSdcJydcXDInXCcnL3AiCisgICAgICA7OyAjKAorICAgICopCisgICAgICBzZWQgLW4gIi9eW18kYXNfY3JfYWxudW1dKl9jdl9bXyRhc19jcl9hbG51bV0qPS9wIgorICAgICAgOzsKKyAgICBlc2FjIHwKKyAgICBzb3J0CispCisgICAgZWNobworCisgICAgY2F0IDw8XF9BU0JPWAorIyMgLS0tLS0tLS0tLS0tLS0tLS0gIyMKKyMjIE91dHB1dCB2YXJpYWJsZXMuICMjCisjIyAtLS0tLS0tLS0tLS0tLS0tLSAjIworX0FTQk9YCisgICAgZWNobworICAgIGZvciBhY192YXI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JC8vCitzL15bXj1dKj1bCSBdKiQvLworfScKK2ZpCisKK2NhdCA+PiRDT05GSUdfU1RBVFVTIDw8XF9BQ0VPRgorZmkgIyB0ZXN0IC1uICIkQ09ORklHX0ZJTEVTIgorCisKK2ZvciBhY190YWcgaW4gIDpGICRDT05GSUdfRklMRVMgIDpIICRDT05GSUdfSEVBREVSUworZG8KKyAgY2FzZSAkYWNfdGFnIGluCisgIDpbRkhMQ10pIGFjX21vZGU9JGFjX3RhZzsgY29udGludWU7OworICBlc2FjCisgIGNhc2UgJGFjX21vZGUkYWNfdGFnIGluCisgIDpbRkhMXSo6Kik7OworICA6TCogfCA6Qyo6KikgeyB7IGVjaG8gIiRhc19tZTokTElORU5POiBlcnJvcjogSW52YWxpZCB0YWcgJGFjX3RhZy4iID4mNQorZWNobyAiJGFzX21lOiBlcnJvcjogSW52YWxpZCB0YWcgJGFjX3RhZy4iID4mMjt9CisgICB7IChleGl0IDEpOyBleGl0IDE7IH07IH07OworICA6W0ZIXS0pIGFjX3RhZz0tOi07OworICA6W0ZIXSopIGFjX3RhZz0kYWNfdGFnOiRhY190YWcuaW47OworICBlc2FjCisgIGFjX3NhdmVfSUZTPSRJRlMKKyAgSUZTPToKKyAgc2V0IHggJGFjX3RhZworICBJRlM9JGFjX3NhdmVfSUZTCisgIHNoaWZ0CisgIGFjX2ZpbGU9JDEKKyAgc2hpZnQKKworICBjYXNlICRhY19tb2RlIGluCisgIDpMKSBhY19zb3VyY2U9JDE7OworICA6W0ZIXSkKKyAgICBhY19maWxlX2lucHV0cz0KKyAgICBmb3IgYWNfZgorICAgIGRvCisgICAgICBjYXNlICRhY19mIGluCisgICAgICAtKSBhY19mPSIkdG1wL3N0ZGluIjs7CisgICAgICAqKSAjIExvb2sgZm9yIHRoZSBmaWxlIGZpcnN0IGluIHRoZSBidWlsZCB0cmVlLCB0aGVuIGluIHRoZSBzb3VyY2UgdHJlZQorCSAjIChpZiB0aGUgcGF0aCBpcyBub3QgYWJzb2x1dGUp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gICRjb25maWd1cmVfaW5wdXQiCisgICAgICB7IGVjaG8gIiRhc19tZTokTElORU5POiBjcmVhdGluZyAkYWNfZmlsZSIgPiY1CitlY2hvICIkYXNfbWU6IGNyZWF0aW5nICRhY19maWxlIiA+JjY7fQorICAgIGZpCisKKyAgICBjYXNlICRhY190YWcgaW4KKyAgICAqOi06KiB8ICo6LSkgY2F0ID4iJHRtcC9zdGRpbiI7OworICAgIGVzYWMKKyAgICA7OworICBlc2FjCisKKyAgYWNfZGlyPWAkYXNfZGlybmFtZSAtLSAiJGFjX2ZpbGUiIHx8CiskYXNfZXhwciBYIiRhY19maWxlIiA6ICdYXCguKlteL11cKS8vKlteL11bXi9dKi8qJCcgXHwgXAorCSBYIiRhY19maWxlIiA6ICdYXCgvL1wpW14vXScgXHwgXAorCSBYIiRhY19maWxlIiA6ICdYXCgvL1wpJCcgXHwgXAorCSBYIiRhY19maWxlIiA6ICdYXCgvXCknIFx8IC4gMj4vZGV2L251bGwgfHwKK2VjaG8gWCIkYWNfZmlsZSIgfAorICAgIHNlZCAnL15YXCguKlteL11cKVwvXC8qW14vXVteL10qXC8qJC97CisJICAgIHMvL1wxLworCSAgICBxCisJICB9CisJICAvXlhcKFwvXC9cKVteL10uKi97CisJICAgIHMvL1wxLworCSAgICBxCisJICB9CisJICAvXlhcKFwvXC9cKSQveworCSAgICBzLy9cMS8KKwkgICAgcQorCSAgfQorCSAgL15YXChcL1wpLioveworCSAgICBzLy9cMS8KKwkgICAgcQorCSAgfQorCSAgcy8uKi8uLzsgcSdgCisgIHsgYXNfZGlyPSIkYWNfZGlyIgorICBjYXNlICRhc19kaXIgaW4gIygKKyAgLSopIGFzX2Rpcj0uLyRhc19kaXI7OworICBlc2FjCisgIHRlc3QgLWQgIiRhc19kaXIiIHx8IHsgJGFzX21rZGlyX3AgJiYgbWtkaXIgLXAgIiRhc19kaXIiOyB9IHx8IHsKKyAgICBhc19kaXJzPQorICAgIHdoaWxlIDo7IGRvCisgICAgICBjYXNlICRhc19kaXIgaW4gIygKKyAgICAgICpcJyopIGFzX3FkaXI9YGVjaG8gIiRhc19kaXIiIHwgc2VkICJzLycvJ1xcXFxcXFxcJycvZyJgOzsgIygKKyAgICAgICopIGFzX3FkaXI9JGFzX2Rpcjs7CisgICAgICBlc2FjCisgICAgICBhc19kaXJzPSInJGFzX3FkaXInICRhc19kaXJzIgorICAgICAgYXNfZGlyPWAkYXNfZGlybmFtZSAtLSAiJGFzX2RpciIgfHwKKyRhc19leHByIFgiJGFzX2RpciIgOiAnWFwoLipbXi9dXCkvLypbXi9dW14vXSovKiQnIFx8IFwKKwkgWCIkYXNfZGlyIiA6ICdYXCgvL1wpW14vXScgXHwgXAorCSBYIiRhc19kaXIiIDogJ1hcKC8vXCkkJyBcfCBcCisJIFgiJGFzX2RpciIgOiAnWFwoL1wpJyBcfCAuIDI+L2Rldi9udWxsIHx8CitlY2hvIFgiJGFzX2RpciIgfAorICAgIHNlZCAnL15YXCguKlteL11cKVwvXC8qW14vXVteL10qXC8qJC97CisJICAgIHMvL1wxLworCSAgICBxCisJICB9CisJICAvXlhcKFwvXC9cKVteL10uKi97CisJICAgIHMvL1wxLworCSAgICBxCisJICB9CisJICAvXlhcKFwvXC9cKSQveworCSAgICBzLy9cMS8KKwkgICAgcQorCSAgfQorCSAgL15YXChcL1wpLioveworCSAgICBzLy9cMS8KKwkgICAgcQorCSAgfQorCSAgcy8uKi8uLzsgcSdgCisgICAgICB0ZXN0IC1kICIkYXNfZGlyIiAmJiBicmVhaworICAgIGRvbmUKKyAgICB0ZXN0IC16ICIkYXNfZGlycyIgfHwgZXZhbCAibWtkaXIgJGFzX2RpcnMiCisgIH0gfHwgdGVzdCAtZCAiJGFzX2RpciIgfHwgeyB7IGVjaG8gIiRhc19tZTokTElORU5POiBlcnJvcjogY2Fubm90IGNyZWF0ZSBkaXJlY3RvcnkgJGFzX2RpciIgPiY1CitlY2hvICIkYXNfbWU6IGVycm9yOiBjYW5ub3QgY3JlYXRlIGRpcmVj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I+RmlndXJlIDE8L2E+LgorPC9wPjxiciAvPjxociAvPgorPGEgbmFtZT0iZm9ybWF0YmxvY2siPjwvYT4KKzxwcmU+CisgICAgMCAgICAgICAgICAgICAgICAgICAxICAgICAgICAgICAgICAgICAgIDIgICAgICAgICAgICAgICAgICAgMyAgIAorICAgIDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBCbG9jayBUeXBlICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgQmxvY2sgVG90YWwgTGVuZ3RoICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgQmxvY2sgQm9keSAgICAgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgIC8gICAgICAgICAgLyogdmFyaWFibGUgbGVuZ3RoLCBhbGlnbmVkIHRvIDMyIGJpdHMgKi8gICAgICAgICAgICAvCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICBCbG9jayBUb3RhbCBMZW5ndGggICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstK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Bvbmx5IHZlcnNpb24gMS4wIG9mIHRoZSBmaWxlIGZvcm1hdCBza2lwcyB0aGUgaW50ZXJtZWRpYXRlIHNlY3Rpb24gYW5kIHJlc3RhcnQgcHJvY2Vzc2luZyB0aGUgcGFja2V0cyBhZnRlciB0aGUgdGhpcmQgU2VjdGlvbiBIZWFkZXIuCis8L3A+PGJyIC8+PGhyIC8+Cis8YSBuYW1lPSJmc3NhbXBsZS1TSEIiPjwvYT4KKzxwcmU+CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCBTSEIgdjEuMCAgfCAgICAgICAgICAgICAgICAgICAgICBEYXRhICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICBUeXBpY2FsIGNvbmZpZ3VyYXRpb24gd2l0aCBhIHNpbmdsZSBTZWN0aW9uIEhlYWRlciBCbG9jayAKKworCisgICB8LS0gICAxc3QgU2VjdGlvbiAgIC0tfC0tICAgMm5kIFNlY3Rpb24gICAtLXwtLSAgM3JkIFNlY3Rpb24gIC0tfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8IFNIQiB2MS4wICB8ICBEYXRhICAgfCBTSEIgVjEuMSAgfCAgRGF0YSAgIHwgU0hCIFYxLjAgIHwgIERhdGEgfCAgCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgQ29uZmlndXJhdGlvbiB3aXRoIHRocmVlIGRpZmZlcmVudCBTZ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XMgdGhlIGJlZ2lubmluZyBvZiBhIHNlY3Rpb24gb2YgdGhlIGNhcHR1cmUgZHVtcCBmaWxlLiBJdHMgZm9ybWF0IGlzIHNob3duIGluIDxhIGhyZWY9IiNmb3JtYXRTSEIiPkZpZ3VyZSAzPC9hPi4KKzwvcD48YnIgLz48aHIgLz4KKzxhIG5hbWU9ImZvcm1hdFNIQiI+PC9hPgorPHByZT4KKyAgICAwICAgICAgICAgICAgICAgICAgIDEgICAgICAgICAgICAgICAgICAgMiAgICAgICAgICAgICAgICAgICAzICAgCisgICAgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgTWFnaWMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgTWFqb3IgICAgICAgICAgICB8ICAgICAgICAgICAgIE1pbm9yICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgT3B0aW9ucyAodmFyaWFibGUpICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSst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cmlwdGlvbiBCbG9jayBpcyBzaG93biBpbiA8YSBocmVmPSIjZm9ybWF0aWRiIj5GaWd1cmUgNDwvYT4uCis8L3A+PGJyIC8+PGhyIC8+Cis8YSBuYW1lPSJmb3JtYXRpZGIiPjwvYT4KKzxwcmU+CisgICAgMCAgICAgICAgICAgICAgICAgICAxICAgICAgICAgICAgICAgICAgIDIgICAgICAgICAgICAgICAgICAgMyAgIAorICAgIDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgIEludGVyZmFjZSBJRCAgICAgICAgIHwgICAgICAgICAgIExpbmtUeXBlICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgU25hcExlbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICAvICAgICAgICAgICAgICAgICAgICAgIE9wdGlvbnMgKHZhcmlhYmxlKSAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyA8L3ByZT4KKzx0YW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SA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgIEludGVyZmFjZSBJRCAgICAgICAgICB8ICAgICAgICAgIERyb3BzIENvdW50ICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgVGltZXN0YW1wIChIaWdoKSAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICBUaW1lc3RhbXAgKExvdykgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBDYXB0dXJlZCBMZW4gICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgTGVuICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgRGF0YSAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgLyAgICAgICAgICAgICAgICAgICAgICBPcHRpb25zICh2YXJpYWJsZSkgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCis8L3ByZT4KKzx0YWJsZSBib3JkZXI9IjAiIGNlbGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iMiIgYWxpZ249ImNlbnRlciI+PHRyPjx0ZCBhbGlnbj0iY2VudGVyIj48Zm9udCBmYWNlPSJtb25hY28sIE1TIFNhbnMgU2VyaWYiIHNpemU9IjEiPjxiPiZuYnNwO1BhY2tldCBCbG9jayBmb3JtYXQuJm5ic3A7PC9iPjwvZm9udD48YnIgLz48L3RkPjwvdHI+PC90YWJsZT48aHIgc2l6ZT0iMSIgc2hhZGU9IjAiPgorCis8cD5UaGUgUGFja2V0IEJsb2NrIGhhcyB0aGUgZm9sbG93aW5nIGZpZWxkczoK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IgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgTGVuICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgRGF0YSAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyA8L3ByZT4KKzx0YWJsZSBib3JkZXI9IjAiIGNlbGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iMiIgYWxpZ249ImNlbnRlciI+PHRyPjx0ZCBhbGlnbj0iY2VudGVyIj48Zm9udCBmYWNlPSJtb25hY28sIE1TIFNhbnMgU2VyaWYiIHNpemU9IjEiPjxiPiZuYnNwO1NpbXBsZSBQYWNrZXQgQmxvY2sgZm9ybWF0LiZuYnNwOzwvYj48L2ZvbnQ+PGJyIC8+PC90ZD48L3RyPjwvdGF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bHNvIHdoZW4gcmVhZGluZyB0aGUgY2FwdHVyZSB3aXRoIGEgbWFjaGluZSBub3QgY29ubmVjdGVkIHRvIHRoZSBuZXR3b3JrLgorPC9wPgorPHA+VGhlIGZvcm1hdCBvZiB0aGUgTmFtZSBSZXNvbHV0aW9uIEJsb2NrIGlzIHNob3duIGluIDxhIGhyZWY9IiNmb3JtYXRucmIiPkZpZ3VyZSA3PC9hPi4KKzwvcD48YnIgLz48aHIgLz4KKzxhIG5hbWU9ImZvcm1hdG5yYiI+PC9hPgorPHByZT4KKyAgICAwICAgICAgICAgICAgICAgICAgIDEgICAgICAgICAgICAgICAgICAgMiAgICAgICAgICAgICAgICAgICAzICAgCisgICAgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICBSZWNvcmQgVHlwZSAgICAgICAgICAgICAgfCAgICAgICAgIFJlY29yZCBMZW5ndGggICAgICAgICB8IAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgIFJlY29yZCBWYWx1ZSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAvKiB2YXJpYWJsZSBsZW5ndGgsIGJ5dGUtYWxpZ25lZCAqLyAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsKKyAgIHwgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKworICAgICAgICAgICAgIC4gLiAuIG90aGVyIHJlY29yZHMgLiAuIC4KKyAgIHwgIFJlY29yZCBUeXBlID09IGVuZF9vZl9yZWNzICAgfCAgUmVjb3JkIExlbmd0aCA9PSAwMCAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICAvICAgICAgICAgICAgICAgICAgICAgIE9wdGlvbnMgKHZhcmlhYmxlKSAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyA8L3ByZT4KKzx0YWJsZSBib3JkZXI9IjAiIGNlbGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iMiIgYWxpZ249ImNlbnRlciI+PHRyPjx0ZCBhbGlnbj0iY2VudGVyIj48Zm9udCBmYWNlPSJtb25hY28sIE1TIFNhbnMgU2VyaWYiIHNpemU9IjEiPjxiPiZuYnNwO05hbWUgUmVzb2x1dGlvbiBCbG9jayBmb3JtYXQuJm5ic3A7PC9iPjwvZm9udD48YnIgLz48L3RkPjwvdHI+PC90YWJsZT48aHIgc2l6ZT0iMSIgc2hhZGU9IjAiPgorCis8cD5BIE5hbWUgUmVzb2x1dGlvbiBCbG9jayBpcyBhIHplcm8tdGVybWluYXRlZCBsaXN0IG9mIHJlY29yZHMgKGluIHRoZSBUTFYgZm9ybWF0KSwgZWFjaCBvZiB3aGljaCBjb250YWlucyBhbiBhc3NvY2lhd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RhdGlzdGljcyBhcmUgcmVmZXJyZWQgdG8gdGhlIGludGVyZmFjZSBkZWZpbmVkIGluIHRoZSBjdXJyZW50IFNlY3Rpb24gaWRlbnRpZmllZCBieSB0aGUgSW50ZXJmYWNlIElEIGZpZWxkLgorPC9wPgorPHA+VGhlIGZvcm1hdCBvZiB0aGUgSW50ZXJmYWNlIFN0YXRpc3RpY3MgQmxvY2sgaXMgc2hvd24gaW4gPGEgaHJlZj0iI2Zvcm1hdGlzYiI+RmlndXJlIDg8L2E+LgorPC9wPjxiciAvPjxociAvPgorPGEgbmFtZT0iZm9ybWF0aXNiIj48L2E+Cis8cHJlPgorICAgIDAgICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgICAgICAyICAgICAgICAgICAgICAgICAgIDMgICAKKyAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBJZlJlY3YgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgIChoaWdoICsgbG93KSAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBJZkRyb3AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgIChoaWdoICsgbG93KSAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBGaWx0ZXJBY2NlcHQgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgIChoaWdoICsgbG93KSAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBPU0Ryb3AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgIChoaWdoICsgbG93KSAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBVc3JEZWxpdmVyZWQgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgIChoaWdoICsgbG93KSAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICBJbnRlcmZhY2UgSUQgICAgICAgICB8ICAgICAgICAgICBSZXNlcnZlZCAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgT3B0aW9ucyAodmFyaWFibGUpICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgLyAgICAgICAgICAgICAgICAgICAgICAg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gICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKworICAgfCAgICAgICAgICAgICAgIC8gICAgICAgICAgICAgICAvICAgICAgICAgICAgICAgLyAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLworICAgLyAgICAgICAgICAgICAgICAgLiAuIC4gb3RoZXIgb3B0aW9ucyAuIC4gLiAgICAgICAgICAgICAgICAgICAgIC8KKyAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgIE9wdGlvbiBDb2RlID09IG9wdF9lbmRvZm9wdCAgfCAgT3B0aW9uIExlbmd0aCA9PSAwICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgPC9wcmU+Cis8dGFibGUgYm9yZGVyPSIwIiBjZWxscGFkZGluZz0iMCIgY2VsbHNwYWNpbmc9IjIiIGFsaWduPSJjZW50ZXIiPjx0cj48dGQgYWxpZ249ImNlbnRlciI+PGZvbnQgZmFjZT0ibW9uYWNvLCBNUyBTYW5zIFNlcmlmIiBzaXplPSIxIj48Yj4mbmJzcDtPcHRpb25zIGZvcm1hdC4mbmJzcDs8L2I+PC9mb250PjxiciAvPjw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QSBDb21wcmVzc2lvbiBCbG9jaywgYXMgdGhlIG5hbWUgc2F5cywgaXMgdXNlZCB0byBzdG9yZSBjb21wcmVzc2VkIGRhdGEuIEl0cyBmb3JtYXQgaXMgc2hvd24gaW4gPGEgaHJlZj0iI2Zvcm1hdGNiIj5GaWd1cmUgMTA8L2E+LgorPC9wPjxiciAvPjxociAvPgorPGEgbmFtZT0iZm9ybWF0Y2IiPjwvYT4KKzxwcmU+CisgICAgMCAgICAgICAgICAgICAgICAgICAxICAgICAgICAgICAgICAgICAgIDIgICAgICAgICAgICAgICAgICAgMyAgIAorICAgIDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICBDb21wci4gVHlwZSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICBDb21wcmVzc2VkIERhdGEgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstK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YnNwO0VuY3J5cHRpb24gQmxvY2sgKGV4cGVyaW1lbnRhbCk8L2g0PgorCis8cD5UaGUgRW5jcnlwdGlvbiBCbG9jayBpcyBvcHRpb25hbC4gQSBmaWxlIGNhbiBjb250YWluIGFuIGFyYml0cmFyeSBudW1iZXIgb2YgdGhlc2UgYmxvY2tzLiBBbiBFbmNyeXB0aW9uIEJsb2NrIGlzIHVzZWQgdG8gc290cmUgZW5jcnlwdGVkIGRhdGEuIEl0cyBmb3JtYXQgaXMgc2hvd24gaW4gPGEgaHJlZj0iI2Zvcm1hdGViIj5GaWd1cmUgMTE8L2E+LgorPC9wPjxiciAvPjxociAvPgorPGEgbmFtZT0iZm9ybWF0ZWIiPjwvYT4KKzxwcmU+CisgICAgMCAgICAgICAgICAgICAgICAgICAxICAgICAgICAgICAgICAgICAgIDIgICAgICAgICAgICAgICAgICAgMyAgIAorICAgIDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgRW5jci4gVHlwZSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICBDb21wcmVzc2VkIERhdGEgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcml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AzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgQ2VsbCBTaXplICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICBGaXhlZCBTaXplIERhdGEgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgLyogdmFyaWFibGUgbGVuZ3RoLCBieXRlLWFsaWduZWQgKi8gICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyA8L3ByZT4KKzx0YWJsZSBib3JkZXI9IjAiIGNlbGxwYWRkaW5nPSIwIiBjZWxsc3BhY2luZz0iMiIgYWxpZ249ImNlbnRlciI+PHRyPjx0ZCBhbGlnbj0iY2VudGVyIj48Zm9udCBmYWNlPSJtb25hY28sIE1TIFNhbnMgU2VyaWYiIHNpemU9IjEiPjxiPiZuYnNwO0ZpeGVkIExlbmd0aCBCbG9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gorRnVuZGluZyBmb3IgdGhlIFJGQyBFZGl0b3IgZnVuY3Rpb24gaXMgY3VycmVudGx5IHByb3ZpZGVkIGJ5IHRoZQorSW50ZXJuZXQgU29jaWV0eS48L3A+Cis8L2JvZHk+PC9odG1sPgpkaWZmIC0tZ2l0IGEvZG9jL3BjYXAudHh0IGIvZG9jL3BjYXAudHh0Cm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmNmYTY2NDUKLS0tIC9kZXYvbnVsbAorKysgYi9kb2MvcGNhcC50eHQKQEAgLTAsMCArMSwxNjgwIEBACisKKworTmV0d29yayBXb3JraW5nIEdyb3VwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTC4gRGVnaW9hbm5pCitJbnRlcm5ldC1EcmFmdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRi4gUmlzc28KK0V4cGlyZXM6IEF1Z3VzdCAzMCwgMjAwNCAgICAgICAgICAgICAgICAgICAgICAgICAgIFBvbGl0ZWNuaWNvIGRpIFRvcmlubworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNYXJjaCAyMDA0CisKKworICAgICAgICAgICAgICAgICAgUENBUCBOZXcgR2VuZXJhdGlvbiBEdW1wIEZpbGUgRm9ybWF0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGNhcAorCitTdGF0dXMgb2YgdGhpcyBNZW1vCisKKyAgIFRoaXMgZG9jdW1lbnQgaXMgYW4gSW50ZXJuZXQtRHJhZnQgYW5kIGlzIGluIGZ1bGwgY29uZm9ybWFuY2Ugd2l0aAorICAgYWxsIHByb3Zpc2lvbnMgb2YgU2VjdGlvbiAxMCBvZiBSRkMyMDI2LgorCisgICBJbnRlcm5ldC1EcmFmdHMgYXJlIHdvcmtpbmcgZG9jdW1lbnRzIG9mIHRoZSBJbnRlcm5ldCBFbmdpbm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gMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxCisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgQmxvY2sgVHlwZSAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgIEJsb2NrIFRvdGFsIExlbmd0aCAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgIEJsb2NrIEJvZHkgICAgICAgICAgICAgICAgICAgICAgICAgICAvCisgICAgICAvICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYWxpZ25lZCB0byAzMiBiaXRzICovICAgICAgICAgICAgLworICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgQmxvY2sgVG90YWwgTGVuZ3RoICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworCisgICAgICAgICAgICAgICAgICAgIEZpZ3VyZSAxOiBCYXNpYyBibG9jayBzdHJ1Y3R1cmUuCisKKyAgIFRoZSBmaWVsZHMgaGF2ZSB0aGUgZm9sbG93aW5nIG1lYW5pbmc6CisKKyAgIG8gIEJsb2NrIFR5cGU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LSstKy0rLSstKworICAgICAgfCBTSEIgdjEuMCAgfCAgICAgICAgICAgICAgICAgICAgICBEYXRhICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICBUeXBpY2FsIGNvbmZpZ3VyYXRpb24gd2l0aCBhIHNpbmdsZSBTZWN0aW9uIEhlYWRlciBCbG9jaworCisKKyAgICAgIHwtLSAgIDFzdCBTZWN0aW9uICAgLS18LS0gICAybmQgU2VjdGlvbiAgIC0tfC0tICAzcmQgU2VjdGlvbiAgLS18CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgU0hCIHYxLjAgIHwgIERhdGEgICB8IFNIQiBWMS4xICB8ICBEYXRhICAgfCBTSEIgVjEuMCAgfCAgRGF0YSB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgQ29uZmlndXJhdGlvbiB3aXRoIHRocmVlIGRpZmZlcmVudCBTZWN0aW9uIEhlYWRlciBCbG9ja3MKKworICAgICAgRmlndXJlIDI6IEZpbGUgc3RydWN0dXJlIGV4YW1wbGU6IHRoZSBTZWN0aW9uIEhlYWRlciBCbG9jay4KKworICAgTk9URTogVE8gQkUgQ09NUExFVEVEIHdpdGggc29tZSBleGFtcGxlcyBvZiBvdGhlciBibG9ja3MKKworMi40IERhdGEgZm9ybWF0CisKKyAgIERhdGEgY29udGFpbmVkIGluIGVhY2ggc2VjdGlvbiB3aWxsIGFsd2F5cyBiZSBzYXZlZCBhY2NvcmRpbmcg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Wdpb2FubmkgJiBSaXNzbyAgICAgICBFeHBpcmVzIEF1Z3VzdCAzMCwgMjAwNCAgICAgICAgICAgICAgICAgW1BhZ2UgN10KKwwKK0ludGVybmV0LURyYWZ0ICAgIFBDQVAgTmV3IEdlbmVyYXRpb24gRHVtcCBGaWxlIEZvcm1hdCAgICAgICAgTWFyY2ggMjAwNAorCisKKzMuIEJsb2NrIERlZmluaXRpb24KKworICAgVGhpcyBzZWN0aW9uIGRldGFpbHMgdGhlIGZvcm1hdCBvZiB0aGUgYm9keSBvZiB0aGUgYmxvY2tzIGN1cnJlbnRseQorICAgZGVmaW5lZC4KKworMy4xIFNlY3Rpb24gSGVhZGVyIEJsb2NrIChtYW5kYXRvcnkpCisKKyAgIFRoZSBTZWN0aW9uIEhlYWRlciBCbG9jayBpcyBtYW5kYXRvcnkuIEl0IGlkZW50aWZpZXMgdGhlIGJlZ2lubmluZyBvZgorICAgYSBzZWN0aW9uIG9mIHRoZSBjYXB0dXJlIGR1bXAgZmlsZS4gSXRzIGZvcm1hdCBpcyBzaG93biBpbiBGaWd1cmUgMy4KKworICAgICAgIDAgICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgICAgICAyICAgICAgICAgICAgICAgICAgIDMKKyAgICAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1hZ2ljICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgIE1ham9yICAgICAgICAgICAgfCAgICAgICAgICAgICBNaW5vciAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICAgT3B0aW9ucyAodmFyaWFibGUpICAgICAgICAgICAgICAgICAgICAgICAvCisgICAgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLworICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKworICAgICAgICAgICAgICAgICBGaWd1cmUgMzogU2VjdGlvbiBIZWFkZXIgQmxvY2sgZm9ybWF0LgorCisgICBUaGUgbWVhbmluZyBvZiB0aGUgZmllbGRzIGlzOgorCisgICBvICBNYWdpYzogbWFnaWMgbnVtYmVyLCB3aG9zZSB2YWx1ZSBpcyB0aGUgaGV4YWRlY2ltYWwgbnVtYmVyCisgICAgICAweDFBMkIzQzRELiBUaGlzIG51bWJlciBjYW4gYmUgdXNlZCB0byBkaXN0aW5ndWlzaCBzZWN0aW9uIHRoYXQKKyAgICAgIGhhdmUgYmVlbiBzYXZlZCBvbiBsaXR0bGUtZW5kaWFuIG1hY2hpbmVzIGZyb20gdGhlIG9uZSBzYXZlZCBvbgorICAgICAgYmlnLWVuZGlhbiBtYWNoaW5lcy4KKworICAgbyAgTWFqb3I6IG51bWJlciBvZiB0aGUgY3VycmVudCBtYXlvciB2ZXJzaW9uIG9mIHRoZSBmb3JtYXQuIEN1cnJlbnQKKyAgICAgIHZhbHVlIGlzIDEuCisKKyAgIG8gIE1pbm9yOiBudW1iZXIgb2YgdGhlIGN1cnJlbnQgbWlub3IgdmVyc2lvbiBvZiB0a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ICAgICAgICAgICAgICAgIHwgY29udGFpbmluZyB0aGUgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBkZXNjcmlwdGlvbiBvZiB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRoZSBoYXJkd2FyZSAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdXNlZCB0byBjcmVhdGUgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB0aGlzIHNlY3Rpb24uICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAgIHwgT3BlcmF0aW5nICAgICAgfCAzICAgICAgICAgICAgICB8IHZhcmlhYmxlICAgICAgIHwgQW4gYXNjaWkgICAgICAgfAorICAgfCBTeXN0ZW0gICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzdHJpbmcgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGNvbnRhaW5pbmcgdGhlIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbmFtZSBvZiB0aGUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBvcGVyYXRpbmcgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHN5c3RlbSB1c2VkIHRvIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgY3JlYXRlIHRoaXMgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzZWN0aW9uLiAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAgIHwgVXNlciAgICAgICAgICAgfCAzICAgICAgICAgICAgICB8IHZhcmlhYmxlICAgICAgIHwgQW4gYXNjaWkgICAgICAgfAorICAgfCBBcHBsaWNhdGlvbiAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzdHJpbmcgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGNvbnRhaW5pbmcgdGhlIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbmFtZSBvZiB0aGUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBhcHBsaWNhdGlvbiAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHVzZWQgdG8gY3JlYXRlIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdGhpcyBzZWN0aW9uLiAgfAorICAgKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGFibGUgMQorCisgICBUaGUgU2VjdGlvbiBIZWFkZXIgQmxvY2sgZG9lcyBub3QgY29udGFpbiBkYXRhIGJ1dCBpdCByYXRoZXIKKyAgIGlkZW50aWZpZXMgYSBsaXN0IG9mIGJsb2NrcyAoaW50Z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vdGhlciBibG9jayB0aGF0IHVzZXMgaXQ7IHRoZXJlZm9yZSwgdGhpcworICAgYmxvY2sgaXMgdXN1YWxseSBwbGFjZWQgaW1tZWRpYXRlbHkgYWZ0ZXIgdGhlIFNlY3Rpb24gSGVhZGVyIEJsb2NrLgorCisgICBBbiBJbnRlcmZhY2UgRGVzY3JpcHRpb24gQmxvY2sgaXMgdmFsaWQgb25seSBpbnNpZGUgdGhlIHNlY3Rpb24gd2hpY2gKKyAgIGl0IGJlbG9uZ3MgdG8uIFRoZSBzdHJ1Y3R1cmUgb2YgYSBJbnRlcmZhY2UgRGVzY3JpcHRpb24gQmxvY2sgaXMKKyAgIHNob3duIGluIEZpZ3VyZSA0LgorCisKKworCitEZWdpb2FubmkgJiBSaXNzbyAgICAgICBFeHBpcmVzIEF1Z3VzdCAzMCwgMjAwNCAgICAgICAgICAgICAgICAgW1BhZ2UgOV0KKwwKK0ludGVybmV0LURyYWZ0ICAgIFBDQVAgTmV3IEdlbmVyYXRpb24gRHVtcCBGaWxlIEZvcm1hdCAgICAgICAgTWFyY2ggMjAwNAorCisKKyAgICAgICAwICAgICAgICAgICAgICAgICAgIDEgICAgICAgICAgICAgICAgICAgMiAgICAgICAgICAgICAgICAgICAzCisgICAgICAgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxCisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgfCAgICAgICAgICBJbnRlcmZhY2UgSUQgICAgICAgICB8ICAgICAgICAgICBMaW5rVHlwZSAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNuYXBMZW4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvCisgICAgICAvICAgICAgICAgICAgICAgICAgICAgIE9wdGlvbnMgKHZhcmlhYmxlKSAgICAgICAgICAgICAgICAgICAgICAgLworICAgICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisKKyAgICAgICAgICAgICBGaWd1cmUgNDogSW50ZXJmYWNlIERlc2NyaXB0aW9uIEJsb2NrIGZvcm1hdC4KKworICAgVGhlIG1lYW5pbmcgb2YgdGhlIGZpZWxkcyBpczoKKworICAgbyAgSW50ZXJmYWNlIElEOiBhIHByb2dyZXNzaXZlIG51bWJlciB0aGF0IGlkZW50aWZpZXMgdW5pcXVlbHkgYW55CisgICAgICBpbnRlcmZhY2UgaW5zaWRlIGN1cnJlbnQgc2VjdGlvbi4gVHdvIEludGVyZmFjZSBEZXNjcmlwdGlvbiBCbG9ja3MKKyAgICAgIGNhbiBoYXZlIHRoZSBzYW1lIEludGVyZmFjZSBJRCBvbmx5IGlmIHRoZXkgYXJlIGluIGRpZmZlcmVudAorICAgICAgc2VjdGlvbnMgb2YgdGhlIGZpbGUuIFRoZSBJbnRlcmZhY2UgSUQgaXMgcmVmZXJlbmNlZCBieSB0aGUgcGFja2V0CisgICAgICBibG9ja3MuCisKKyAgIG8gIExpbmtUeXBlOiBhIHZhbHVlIHRoYXQgZGVmaW5lcyB0aGUgbGluayBsYXllciB0eXBlIG9mIHRoaXMKKyAgICAgIGludGVy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gfCBjYXB0dXJlIGRhdGEuICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAgIHwgaWZfSVB2NGFkZHIgICAgfCAzICAgICAgICAgICAgICB8IDggICAgICAgICAgICAgIHwgSW50ZXJmYWNlICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBuZXR3b3JrICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGFkZHJlc3MgYW5kICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbmV0bWFzay4gICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8CisgICB8IGlmX0lQdjZhZGRyICAgIHwgNCAgICAgICAgICAgICAgfCAxNyAgICAgICAgICAgICB8IEludGVyZmFjZSAgICAgIHwKKworCisKK0RlZ2lvYW5uaSAmIFJpc3NvICAgICAgIEV4cGlyZXMgQXVndXN0IDMwLCAyMDA0ICAgICAgICAgICAgICAgIFtQYWdlIDEwXQorDAorSW50ZXJuZXQtRHJhZnQgICAgUENBUCBOZXcgR2VuZXJhdGlvbiBEdW1wIEZpbGUgRm9ybWF0ICAgICAgICBNYXJjaCAyMDA0CisKKworICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBuZXR3b3JrICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGFkZHJlc3MgYW5kICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgcHJlZml4IGxlbmd0aCAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAoc3RvcmVkIGluIHRoZSB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGxhc3QgYnl0ZSkuICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfAorICAgfCBpZl9NQUNhZGRyICAgICB8IDUgICAgICAgICAgICAgIHwgNiAgICAgICAgICAgICAgfCBJbnRlcmZhY2UgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IEhhcmR3YXJlIE1BQyAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYWRkcmVzcyAoNDggICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBiaXRzKS4gICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAgIHwgaWZfRVVJYWRkciAgICAgfCA2ICAgICAgICAgICAgICB8IDggICAgICAgICAgICAgIHwgSW50ZXJmYWNlICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBIYXJkd2FyZSBFVUkgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGFkZHJlc3MgKDY0ICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYml0cyksIGlmICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBhdmFpbGFibGUuICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAgIHwgaWZfc3BlZWQgICAgICAgfCA3ICAgICAgICAgICAgICB8IDggICAgICAgICAgICAgIHwgSW50ZXJmYWNlICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzcGVlZCAoaW4gICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGJwcykuICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfAorICAgfCBpZl90c2FjY3VyICAgICB8IDggICAgICAgICAgICAgIHwgMSAgICAgICAgICAgICAgfCBQcmVjaXNpb24gb2YgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRpbWVzdGFtcHMuIElmIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdGhlIE1vc3QgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBTaWduaWZpY2FudCAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IEJpdCBpcyBlcXVhbCAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdG8gemVybywgdGhlICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCByZW1haW5pbmcgYml0cyB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGluZGljYXRlcyB0aGUgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYWNjdXJhY3kgYXMgYXMgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBhIG5lZ2F0aXZlICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHBvd2VyIG9mIDEwICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgKGUuZy4gNiBtZWFucyAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBtaWNyb3NlY29uZCAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGFjY3VyYWN5KS4gSWYgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdGhlIE1vc3QgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBTaWduaWZpY2FudCAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IEJpdCBpcyBlcXVhbCAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdG8gemVybywgdGhlICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCByZW1haW5pbmcgYml0cyB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGluZGljYXRlcyB0aGUgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYWNjdXJhY3kgYXMgYXMgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBuZWdhdGl2ZSBwb3dlciB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IG9mIDIgKGUuZy4gMTAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbWVhbnMgMS8xMDI0ICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBvZiBzZWNvbmQpLiBJZiB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRoaXMgb3B0aW9uIGlzIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbm90IHByZXNlbnQsIGEgfAorCisKKworRGVnaW9hbm5pICYgUmlzc28gICAgICAgRXhwaXJlcyBBdWd1c3QgMzAsIDIwMDQgICAgICAgICAgICAgICAgW1BhZ2UgMTFdCisMCitJbnRlcm5ldC1EcmFmdCAgICBQQ0FQIE5ldyBHZW5lcmF0aW9uIER1bXAgRmlsZSBGb3JtYXQgICAgICAgIE1hcmNoIDIwMDQKKworCisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHByZWNpc2lvbiBvZiAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgMTBeLTYgaXMgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBhc3N1bWVkLiAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAgIHwgaWZfdHpvbmUgICAgICAgfCA5ICAgICAgICAgICAgICB8IDQgICAgICAgICAgICAgIHwgVGltZSB6b25lIGZvciAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBHTVQgc3VwcG9ydCAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IChUT0RPOiBzcGVjaWZ5IHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYmV0dGVyKS4gICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8CisgICB8IGlmX2ZsYWdzICAgICAgIHwgMTAgICAgICAgICAgICAgfCA0ICAgICAgICAgICAgICB8IEludGVyZmFjZSAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgZmxhZ3MuIChUT0RPOiAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzcGVjaWZ5ICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGJldHRlci4gICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgUG9zc2libGUgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBmbGFnczogICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHByb21pc2N1b3VzLCAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgaW5ib3VuZC9vdXRib3UgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBuZCwgdHJhZmZpYyAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGZpbHRlcmVkICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgZHVyaW5nICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBjYXB0dXJlKS4gICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAgIHwgaWZfZmlsdGVyICAgICAgfCAxMSAgICAgICAgICAgICB8IHZhcmlhYmxlICAgICAgIHwgVGhlIGZpbHRlciAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAoZS5nLiAiY2FwdHVyZSB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IG9ubHkgVENQICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdHJhZmZpYyIpIHVzZWQgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB0byBjYXB0dXJlICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRyYWZmaWMuIFRoZSAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgZmlyc3QgYnl0ZSBvZiAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB0aGUgT3B0aW9uICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IERhdGEga2VlcHMgYSAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgY29kZSBvZiB0aGUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBmaWx0ZXIgdXNlZCAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IChlLmcuIGlmIHRoaXMgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgaXMgYSBsaWJwY2FwICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzdHJpbmcsIG9yIEJQRiB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGJ5dGVjb2RlLCBhbmQgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbW9yZSkuIE1vcmUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBkZXRhaWxzIGFib3V0ICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRoaXMgZm9ybWF0ICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgd2lsbCBiZSAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBwcmVzZW50ZWQgaW4gICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IEFwcGVuZGl4IFhYWCAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgKFRPRE8pLiAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8CisgICB8IGlmX29wZXJzeXN0ZW0gIHwgMTIgICAgICAgICAgICAgfCB2YXJpYWJsZSAgICAgICB8IEFuIGFzY2lpICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgc3RyaW5nICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBjb250YWluaW5nIHRoZSB8CisKKworCitEZWdpb2FubmkgJiBSaXNzbyAgICAgICBFeHBpcmVzIEF1Z3VzdCAzMCwgMjAwNCAgICAgICAgICAgICAgICBbUGFnZSAxMl0KKwwKK0ludGVybmV0LURyYWZ0ICAgIFBDQVAgTmV3IEdlbmVyYXRpb24gRHVtcCBGaWxlIEZvcm1hdCAgICAgICAgTWFyY2ggMjAwNAorCisKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbmFtZSBvZiB0aGUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBvcGVyYXRpbmcgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHN5c3RlbSBvZiB0aGUgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbWFjaGluZSB0aGF0ICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBob3N0cyB0aGlzICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGludGVyZmFjZS4gICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgVGhpcyBjYW4gYmUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBkaWZmZXJlbnQgZnJvbSB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRoZSBzYW1lICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgaW5mb3JtYXRpb24gICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB0aGF0IGNhbiBiZSAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGNvbnRhaW5lZCBieSAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdGhlIFNlY3Rpb24gICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBIZWFkZXIgQmxvY2sgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IChTZWN0aW9uIDMuMSkgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYmVjYXVzZSB0aGUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBjYXB0dXJlIGNhbiAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGhhdmUgYmVlbiBkb25lIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgb24gYSByZW1vdGUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBtYWNoaW5lLiAgICAgICB8CisgICArLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUYWJsZSAyCisKKworMy4zIFBhY2tldCBCbG9jayAob3B0aW9uYWwpCisKKyAgIEEgUGFja2V0IEJsb2NrIGlzIHRoZSBzdGFuZGFyZCBjb250YWluZXIgZm9yIHN0b3JpbmcgdGhlIHBhY2tldHMKKyAgIGNvbWluZyBmcm9tIHRoZSBuZXR3b3JrLiBUaGUgUGFja2V0IEJsb2NrIGlzIG9wdGlvbmFsIGJlY2F1c2UgcGFja2V0cworICAgY2FuIGJlIHN0b3JlZCBlaXRoZXIgYnkgbWVhbnMgb2YgdGhpcyBibG9jayBvciB0aGUgU2ltcGxlIFBhY2tldAorICAgQmxvY2ssIHdoaWNoIGNhbiBiZSB1c2VkIHRvIHNwZWVkIHVwIGR1bXAgZ2VuZXJhdGlvbi4gVGhlIGZvcm1hdCBvZiBhCisgICBwYWNrZXQgYmxvY2sgaXMgc2hvd24gaW4gRmlndXJlIDUuCisKKworCisKKworCisKKworCisKKworCisKKworCisKKworCisKK0RlZ2lvYW5uaSAmIFJpc3NvICAgICAgIEV4cGlyZXMgQXVndXN0IDMwLCAyMDA0ICAgICAgICAgICAgICAgIFtQYWdlIDEzXQorDAorSW50ZXJuZXQtRHJhZnQgICAgUENBUCBOZXcgR2VuZXJhdGlvbiBEdW1wIEZpbGUgRm9ybWF0ICAgICAgICBNYXJjaCAyMDA0CisKKworICAgICAgIDAgICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgICAgICAyICAgICAgICAgICAgICAgICAgIDMKKyAgICAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgICAgICAgSW50ZXJmYWNlIElEICAgICAgICAgIHwgICAgICAgICAgRHJvcHMgQ291bnQgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICBUaW1lc3RhbXAgKEhpZ2gpICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgIFRpbWVzdGFtcCAoTG93KSAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIENhcHR1cmVkIExlbiAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgIFBhY2tldCBMZW4gICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgIFBhY2tldCBEYXRhICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgfCAgICAgICAgICAgICAgLyogdmFyaWFibGUgbGVuZ3RoLCBieXRlLWFsaWduZWQgKi8gICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICAgT3B0aW9ucyAodmFyaWFibGUpICAgICAgICAgICAgICAgICAgICAgICAvCisgICAgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLworICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rL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CAyMDA0ICAgICAgICAgICAgICAgIFtQYWdlIDE1XQorDAorSW50ZXJuZXQtRHJhZnQgICAgUENBUCBOZXcgR2VuZXJhdGlvbiBEdW1wIEZpbGUgRm9ybWF0ICAgICAgICBNYXJjaCAyMDA0CisKKworICAgICAgIDAgICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgICAgICAyICAgICAgICAgICAgICAgICAgIDMKKyAgICAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgTGVuICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgRGF0YSAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKwor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cHR1cmUgd2l0aCBhIG1hY2hpbmUgbm90CisgICBjb25uZWN0ZWQgdG8gdGhlIG5ldHdvcmsuCisKKyAgIFRoZSBmb3JtYXQgb2YgdGhlIE5hbWUgUmVzb2x1dGlvbiBCbG9jayBpcyBzaG93biBpbiBGaWd1cmUgNy4KKworCisKKworRGVnaW9hbm5pICYgUmlzc28gICAgICAgRXhwaXJlcyBBdWd1c3QgMzAsIDIwMDQgICAgICAgICAgICAgICAgW1BhZ2UgMTZdCisMCitJbnRlcm5ldC1EcmFmdCAgICBQQ0FQIE5ldyBHZW5lcmF0aW9uIER1bXAgRmlsZSBGb3JtYXQgICAgICAgIE1hcmNoIDIwMDQKKworCisgICAgICAgMCAgICAgICAgICAgICAgICAgICAxICAgICAgICAgICAgICAgICAgIDIgICAgICAgICAgICAgICAgICAgMworICAgICAgIDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMQorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICBSZWNvcmQgVHlwZSAgICAgICAgICAgICAgfCAgICAgICAgIFJlY29yZCBMZW5ndGggICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgUmVjb3JkIFZhbHVlICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKworICAgICAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArCisgICAgICAgICAgICAgICAgLiAuIC4gb3RoZXIgcmVjb3JkcyAuIC4gLgorICAgICAgfCAgUmVjb3JkIFR5cGUgPT0gZW5kX29mX3JlY3MgICB8ICBSZWNvcmQgTGVuZ3RoID09IDAwICAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLworICAgICAgLyAgICAgICAgICAgICAgICAgICAgICBPcHRpb25zICh2YXJpYWJsZSkgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvCisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworCisgICAgICAgICAgICAgICAgRmlndXJlIDc6IE5hbWUgUmVzb2x1dGlvbiBCbG9jayBmb3JtYXQuCisKKyAgIEEgTmFtZSBSZXNvbHV0aW9uIEJsb2NrIGlzIGEgemVyby10ZXJtaW5hdGVkIGxpc3Qgb2YgcmVjb3JkcyAoaW4gdGhlCisgICBUTFYgZm9ybWF0KSwgZWFjaCBvZiB3aGljaCBjb250YWlucyBhbiBhc3NvY2lhdGlvbiBiZXR3ZWVuIGEgbmV0d29yaworICAgYWRkcmVzcyBhbmQgYSBuYW1lLiBUaGVyZSBhcmUgdGhyZWUgcG9zc2libGUgdHlwZXMgb2YgcmVjb3JkczoKKworICAgKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rCisgICB8IE5hbWUgICAgICAgICAgIHwgQ29kZSAgICAgICAgICAgfCBMZW5ndGggICAgICAgICB8IERlc2NyaXB0aW9uICAgIHwKKyAgICstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKworICAgfCBlbmRfb2ZfcmVjcyAgICB8IDAgICAgICAgICAgICAgIHwgMCAgICAgICAgICAgICAgfCBFbmQgb2YgcmVjb3JkcyB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwKKyAgIHwgaXA0X3JlYyAgICAgICAgfCAxICAgICAgICAgICAgICB8IFZhcmlhYmxlICAgICAgIHwgU3BlY2lmaWVzIGFuICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBJUHY0IGFkZHJlc3MgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IChjb250YWluZWQgaW4gIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdGhlIGZpcnN0IDQgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBieXRlcyksICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGZvbGxvd2VkIGJ5ICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgb25lIG9yIG1vcmUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB6ZXJvLXRlcm1pbmF0ZSB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGQgc3RyaW5ncyAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgY29udGFpbmluZyB0aGUgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBETlMgZW50cmllcyAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGZvciB0aGF0ICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYWRkcmVzcy4gICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8CisgICB8IGlwNl9yZWMgICAgICAgIHwgMSAgICAgICAgICAgICAgfCBWYXJpYWJsZSAgICAgICB8IFNwZWNpZmllcyBhbiAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgSVB2NiBhZGRyZXNzICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAoY29udGFpbmVkIGluICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRoZSBmaXJzdCAxNiAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYnl0ZXMpLCAgICAgICAgfAorCisKKworRGVnaW9hbm5pICYgUmlzc28gICAgICAgRXhwaXJlcyBBdWd1c3QgMzAsIDIwMDQgICAgICAgICAgICAgICAgW1BhZ2UgMTddCisMCitJbnRlcm5ldC1EcmFmdCAgICBQQ0FQIE5ldyBHZW5lcmF0aW9uIER1bXAgRmlsZSBGb3JtYXQgICAgICAgIE1hcmNoIDIwMDQKKworCisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGZvbGxvd2VkIGJ5ICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgb25lIG9yIG1vcmUgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB6ZXJvLXRlcm1pbmF0ZSB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGQgc3RyaW5ncyAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgY29udGFpbmluZyB0aGUgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBETlMgZW50cmllcyAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGZvciB0aGF0ICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYWRkcmVzcy4gICAgICAgfAorICAgKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGFibGUgMworCisgICBBZnRlciB0aGUgbGlzdCBvciBOYW1lIFJlc29sdXRpb24gUmVjb3Jkcywgb3B0aW9uYWxseSwgYSBsaXN0IG9mCisgICBvc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fCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBjb250YWluaW5nIHRoZSB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IG5hbWUgb2YgdGhlICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbWFjaGluZSAoRE5TICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzZXJ2ZXIpIHVzZWQgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRvIHBlcmZvcm0gdGhlIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgbmFtZSAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCByZXNvbHV0aW9uLiAgICB8CisgICArLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSsKKworCiszLjYgSW50ZXJmYWNlIFN0YXRpc3RpY3MgQmxvY2sgKG9wdGlvbmFsKQorCisgICBUaGUgSW50ZXJmYWNlIFN0YXRpc3RpY3MgQmxvY2sgY29udGFpbnMgdGhlIGNhcHR1cmUgc3RhdGlzdGljcyBmb3IgYQorICAgZ2l2ZW4gaW50ZXJmYWNlIGFuZCBpdCBpcyBvcHRpb25hbC4gVGhlIHN0YXRpc3RpY3MgYXJlIHJlZmVycmVkIHRvCisgICB0aGUgaW50ZXJmYWNlIGRlZmluZWQgaW4gdGhlIGN1cnJlbnQgU2VjdGlvbiBpZGVudGlmaWVkIGJ5IHRoZQorICAgSW50ZXJmYWNlIElEIGZpZWxkLgorCisgICBUaGUgZm9ybWF0IG9mIHRoZSBJbnRlcmZhY2UgU3RhdGlzdGljcyBCbG9jayBpcyBzaG93biBpbiBGaWd1cmUgOC4KKworCisKKworRGVnaW9hbm5pICYgUmlzc28gICAgICAgRXhwaXJlcyBBdWd1c3QgMzAsIDIwMDQgICAgICAgICAgICAgICAgW1BhZ2UgMThdCisMCitJbnRlcm5ldC1EcmFmdCAgICBQQ0FQIE5ldyBHZW5lcmF0aW9uIER1bXAgRmlsZSBGb3JtYXQgICAgICAgIE1hcmNoIDIwMDQKKworCisgICAgICAgMCAgICAgICAgICAgICAgICAgICAxICAgICAgICAgICAgICAgICAgIDIgICAgICAgICAgICAgICAgICAgMworICAgICAgIDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMQorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgSWZSZWN2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoaGlnaCArIGxvdykgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgSWZEcm9wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoaGlnaCArIGxvdykgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgRmlsdGVyQWNjZXB0ICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoaGlnaCArIGxvdykgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgT1NEcm9wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoaGlnaCArIGxvdykgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgVXNyRGVsaXZlcmVkICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAoaGlnaCArIGxvdykgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIHwgICAgICAgICAgSW50ZXJmYWNlIElEICAgICAgICAgfCAgICAgICAgICAgUmVzZXJ2ZWQgICAgICAgICAgICB8CisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICAgT3B0aW9ucyAodmFyaWFibGUpICAgICAgICAgICAgICAgICAgICAgICAvCisgICAgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLworICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKworICAgICAgICAgICAgICBGaWd1cmUgODogSW50ZXJmYWNlIFN0YXRpc3RpY3MgQmxvY2sgZm9ybWF0LgorCisgICBUaGUgZmllbGRzIGhhdmUgdGhlIGZvbGxvd2luZyBtZWFuaW5nOgorCisgICBvICBJZlJlY3Y6IG51bWJlciBvZiBwYWNrZXRzIHJlY2VpdmVkIGZyb20gdGhlIGludGVyZmFjZSBkdXJpbmcgdGhlCisgICAgICBjYXB0dXJlLiBUaGlzIG51bWJlciBpcyByZXBvcnRlZCBhcyBhIDY0IGJpdHMgdmFsdWUsIGluIHdoaWNoIHRoZQorICAgICAgbW9zdCBzaWduaWZpY2F0IGJpdHMgYXJlIGxvY2F0ZWQgaW4gdGhlIGZpcnN0IGZvdXIgYnl0ZXMgb2YgdGhlCisgICAgICBmaWVsZC4KKworICAgbyAgSWZEcm9wOiBudW1iZXIgb2YgcGFja2V0cyBkcm9wcGVkIGJ5IHRoZSBpbnRlcmZhY2UgZHVyaW5nIHRoZQorICAgICAgY2FwdHVyZSBkdWUgdG8gbGFjayBvZiByZXNvdXJjZXMuCisKKyAgIG8gIEZpbHRlckFjY2VwdDogbnVtYmVyIG9mIHBhY2tldHMgYWNjZXBldGVkIGJ5IGZpbHRlciBkdXJpbmcgY3VycmVudAorICAgICAgY2FwdHVyZS4KKworICAgbyAgT1NEcm9wOiBudW1iZXIgb2YgcGFja2V0cyBkcm9wcGVkIGJ5IHRoZSBvcGVyYXRpbmcgc3lzdGVtIGR1cmluZworICAgICAgdGhlIGNhcHR1cmUuCisKKyAgIG8gIFVzckRlbGl2ZXJlZDogbnVtYmVyIG9mIHBhY2tldHMgZGVsaXZlcmVkIHRvIHRoZSB1c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XB0aW9uICAgIHwKKyAgICstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKworICAgfCBpc2Jfc3RhcnR0aW1lICB8IDIgICAgICAgICAgICAgIHwgOCAgICAgICAgICAgICAgfCBUaW1lIGluIHdoaWNoICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRoZSBjYXB0dXJlICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgc3RhcnRlZDsgdGltZSAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB3aWxsIGJlIHN0b3JlZCB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGluIHR3byBibG9ja3MgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgb2YgZm91ciBieXRlcyAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBlYWNoLCAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGNvbnRhaW5pbmcgdGhlIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdGltZXN0YW1wIGluICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzZWNvbmRzIGFuZCAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IG5hbm9zZWNvbmRzLiAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfAorICAgfCBpc2JfZW5kdGltZSAgICB8IDMgICAgICAgICAgICAgIHwgOCAgICAgICAgICAgICAgfCBUaW1lIGluIHdoaWNoICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRoZSBjYXB0dXJlICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgc3RhcnRlZDsgdGltZSAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB3aWxsIGJlIHN0b3JlZCB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGluIHR3byBibG9ja3MgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgb2YgZm91ciBieXRlcyAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBlYWNoLCAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGNvbnRhaW5pbmcgdGhlIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdGltZXN0YW1wIGluICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzZWNvbmRzIGFuZCAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IG5hbm9zZWNvbmRzLiAgIHwKKyAgICstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rL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RoIG9mIHRoaXMgZmllbGQgYXMgYmVlbiBzcGVjaWZpZWQgYnkgdGhlIE9wdGlvbgorICAgICAgTGVuZ3RoIGZpZWxkLgorCisgICBPcHRpb25zIG1heSBiZSByZXBlYXRlZCBzZXZlcmFsIHRpbWVzIChlLmcuIGFuIGludGVyZmFjZSB0aGF0IGhhcworICAgc2V2ZXJhbCBJUCBhZGRyZXNzZXMgYXNzb2NpYXRlZCB0byBpdCkuIFRoZSBvcHRpb24gbGlzdCBpcyB0ZXJtaW5hdGVkCisgICBieSBhIHNwZWNpYWwgY29kZSB3aGljaCBpcyB0aGUgJ0VuZCBvZiBPcHRpb24nLgorCisgICBUaGUgZm9ybWF0IG9mIHRoZSBvcHRpb25hbCBmaWVsZHMgaXMgc2hvd24gaW4gRmlndXJlIDkuCisKKworCisKKworCisKKworCisKKworCisKKworCitEZWdpb2FubmkgJiBSaXNzbyAgICAgICBFeHBpcmVzIEF1Z3VzdCAzMCwgMjAwNCAgICAgICAgICAgICAgICBbUGFnZSAyMV0KKwwKK0ludGVybmV0LURyYWZ0ICAgIFBDQVAgTmV3IEdlbmVyYXRpb24gRHVtcCBGaWxlIEZvcm1hdCAgICAgICAgTWFyY2ggMjAwNAorCisKKyAgICAgICAwICAgICAgICAgICAgICAgICAgIDEgICAgICAgICAgICAgICAgICAgMiAgICAgICAgICAgICAgICAgICAzCisgICAgICAgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxCisgICAgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgICAgfCAgICAgIE9wdGlvbiBDb2RlICAgICAgICAgICAgICB8ICAgICAgICAgT3B0aW9uIExlbmd0aCAgICAgICAgIHwKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICBPcHRpb24gVmFsdWUgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgfCAgICAgICAgICAgICAgLyogdmFyaWFibGUgbGVuZ3RoLCBieXRlLWFsaWduZWQgKi8gICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgICArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArCisgICAgICB8ICAgICAgICAgICAgICAgLyAgICAgICAgICAgICAgIC8gICAgICAgICAgICAgICAvICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgICAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvCisgICAgICAvICAgICAgICAgICAgICAgICAuIC4gLiBvdGhlciBvcHRpb25zIC4gLiAuICAgICAgICAgICAgICAgICAgICAgLworICAgICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgT3B0aW9uIENvZGUgPT0gb3B0X2VuZG9mb3B0ICB8ICBPcHRpb24gTGVuZ3RoID09IDAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKworICAgICAgICAgICAgICAgICAgICAgICBGaWd1cmUgOTogT3B0aW9ucyBmb3JtYXQuCisKKyAgIFRoZSBmb2xsb3dpbmcgY29kZXMgY2FuIGFsd2F5cyBiZSBwcmVzZW50IGluIGFueSBvcHRpb25hbCBmaWVsZDoKKworICAgKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rCisgICB8IE5hbWUgICAgICAgICAgIHwgQ29kZSAgICAgICAgICAgfCBMZW5ndGggICAgICAgICB8IERlc2NyaXB0aW9uICAgIHwKKyAgICstLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tKworICAgfCBvcHRfZW5kb2ZvcHQgICB8IDAgICAgICAgICAgICAgIHwgMCAgICAgICAgICAgICAgfCBFbmQgb2YgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IG9wdGlvbnM6IGl0IGlzIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgdXNlZCB0byAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBkZWxpbWl0IHRoZSAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGVuZCBvZiB0aGUgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgb3B0aW9uYWwgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBmaWVsZHMuIFRoaXMgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGJsb2NrIGNhbm5vdCAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYmUgcmVwZWF0ZWQgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCB3aXRoaW4gYSBnaXZlbiB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGxpc3Qgb2YgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgb3B0aW9ucy4gICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8CisgICB8IG9wdF9jb21tZW50ICAgIHwgMSAgICAgICAgICAgICAgfCB2YXJpYWJsZSAgICAgICB8IENvbW1lbnQ6IGl0IGlzIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYW4gYXNjaWkgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBzdHJpbmcgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IGNvbnRhaW5pbmcgYSAgIHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgY29tbWVudCB0aGF0ICAgfAorICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCBpcyBhc3NvY2lhdGVkICB8CisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8IHRvIHRoZSBjdXJyZW50IHwKKyAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgYmxvY2suICAgICAgICAgfAorICAgKy0tLS0tLS0tLS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yAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICBDb21wci4gVHlwZSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICBDb21wcmVzc2VkIERhdGEgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKworICAgICAgICAgICAgICAgICAgRmlndXJlIDEwOiBDb21wcmVzc2lvbiBCbG9jayBmb3JtYXQuCisKKyAgIFRoZSBmaWVsZHMgaGF2ZSB0aGUgZm9sbG93aW5nIG1lYW5pbmc6CisKKyAgIG8gIENvbXByZXNzaW9uIFR5cGU6IHNwZWNpZmllcyB0aGUgY29tcHJlc3Npb24gYWxnb3JpdGhtLiBQb3NzaWJsZQorICAgICAgdmFsdWVzIGZvciB0aGlzIGZpZWxkIGFyZSAwICh1bmNvbXByZXNzZWQpLCAxIChMZW1wZWwgWml2KSwgMgorICAgICAgKEd6aXAp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rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgRW5jci4gVHlwZSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICBDb21wcmVzc2VkIERhdGEgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKworICAgICAgICAgICAgICAgICAgRmlndXJlIDExOiBFbmNyeXB0aW9uIEJsb2NrIGZvcm1hdC4KKworICAgVGhlIGZpZWxkcyBoYXZlIHRoZSBmb2xsb3dpbmcgbWVhbmluZzoKKworICAgbyAgQ29tcHJlc3Npb24gVHlwZTogc3BlY2lmaWVzIHRoZSBlbmNyeXB0aW9uIGFsZ29yaXRobS4gUG9zc2libGUKKyAgICAgIHZhbHVlcyBmb3IgdGhpcyBmaWVsZCBhcmUgPz8/IE5PVEU6IHRoaXMgYmxvY2sgc2hvdWxkIHByb2JhYmx5CisgICAgICBjb250YWluIG90aGVyIGZpZWxkcywgZGVwZW5kaW5nIG9uIHRoZSBlbmN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MgQXVndXN0IDMwLCAyMDA0ICAgICAgICAgICAgICAgIFtQYWdlIDI0XQorDAorSW50ZXJuZXQtRHJhZnQgICAgUENBUCBOZXcgR2VuZXJhdGlvbiBEdW1wIEZpbGUgRm9ybWF0ICAgICAgICBNYXJjaCAyMDA0CisKKworICAgICAgIDAgICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgICAgICAyICAgICAgICAgICAgICAgICAgIDMKKyAgICAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEKKyAgICAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAgICB8ICAgICAgICAgIENlbGwgU2l6ZSAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgRml4ZWQgU2l6ZSBEYXRhICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHw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+MTAxMjk8L2NvZGU+CisgICAgICAgICAgICAgICA8Y291bnRyeT5JdGFseTwvY291bnRyeT4KKyAgICAgICAgICAgIDwvcG9zdGFsPgorICAgICAgICAgICAgPHBob25lPiszOSAwMTEgNTY0IDcwMDg8L3Bob25lPgorICAgICAgICAgICAgPGVtYWlsPmxvcmlzLmRlZ2lvYW5uaUBwb2xpdG8uaXQ8L2VtYWlsPgorICAgICAgICAgICAgPHVyaT5odHRwOi8vbmV0Z3JvdXAucG9saXRvLml0L2xvcmlzLzwvdXJpPgorICAgICAgICAgPC9hZGRyZXNzPgorICAgICAgPC9hdXRob3I+CisgICAgICAgPGF1dGhvciBpbml0aWFscz0iRi4iIHN1cm5hbWU9IlJpc3NvIiBmdWxsbmFtZT0iRnVsdmlvIFJpc3NvIj4KKyAgICAgICAgIDxvcmdhbml6YXRpb24+UG9saXRlY25pY28gZGkgVG9yaW5vPC9vcmdhbml6YXRpb24+CisgICAgICAgICA8YWRkcmVzcz4KKyAgICAgICAgICAgIDxwb3N0YWw+CisgICAgICAgICAgICAgICA8c3RyZWV0PkNvcnNvIER1Y2EgZGVnbGkgQWJydXp6aSwgMjQ8L3N0cmVldD4KKyAgICAgICAgICAgICAgIDxjaXR5PlRvcmlubzwvY2l0eT4KKyAgICAgICAgICAgICAgIDxjb2RlPjEwMTI5PC9jb2RlPgorICAgICAgICAgICAgICAgPGNvdW50cnk+SXRhbHk8L2NvdW50cnk+CisgICAgICAgICAgICA8L3Bvc3RhbD4KKyAgICAgICAgICAgIDxwaG9uZT4rMzkgMDExIDU2NCA3MDA4PC9waG9uZT4KKyAgICAgICAgICAgIDxlbWFpbD5mdWx2aW8ucmlzc29AcG9saXRvLml0PC9lbWFpbD4KKyAgICAgICAgICAgIDx1cmk+aHR0cDovL25ldGdyb3VwLnBvbGl0by5pdC9mdWx2aW8ucmlzc28vPC91cmk+CisgICAgICAgICA8L2FkZHJlc3M+CisgICAgICA8L2F1dGhvcj4KKworICAgPCEtLSBPdGhlciBh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dD4KKworPC9zZWN0aW9uPgorCisKKzxzZWN0aW9uIHRpdGxlPSJHZW5lcmFsIEZpbGUgU3RydWN0dXJlIj4KKworPHNlY3Rpb24gYW5jaG9yPSJzZWN0aW9uYmxvY2siIHRpdGxlPSJHZW5lcmFsIEJsb2NrIFN0cnVjdHVyZSI+Cis8dD5BIGNhcHR1cmUgZmlsZSBpcyBvcmdhbml6ZWQgaW4gYmxvY2tzLCB0aGF0IGFyZSBhcHBlbmRlZCBvbmUgdG8gYW5vdGhlciB0byBmb3JtIHRoZSBmaWxlLiBBbGwgdGhlIGJsb2NrcyBzaGFyZSBhIGNvbW1vbiBmb3JtYXQsIHdoaWNoIGlzIHNob3duIGluIDx4cmVmIHRhcmdldD0iZm9ybWF0YmxvY2siLz4uPC90PgorCis8ZmlndXJlIGFuY2hvcj0iZm9ybWF0YmxvY2siIHRpdGxlPSJCYXNpYyBibG9jayBzdHJ1Y3R1cmUuIj4KKzxhcnR3b3JrPgorICAgIDAgICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgICAgICAyICAgICAgICAgICAgICAgICAgIDMgICAKKyAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgQmxvY2sgVHlwZSAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgIEJsb2NrIFRvdGFsIExlbmd0aCAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0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BvZiB0aGUgZmlsZSBmb3JtYXQgc2tpcHMgdGhlIGludGVybWVkaWF0ZSBzZWN0aW9uIGFuZCByZXN0YXJ0IHByb2Nlc3NpbmcgdGhlIHBhY2tldHMgYWZ0ZXIgdGhlIHRoaXJkIFNlY3Rpb24gSGVhZGVyLjwvdD4KKworPGZpZ3VyZSBhbmNob3I9ImZzc2FtcGxlLVNIQiIgdGl0bGU9IkZpbGUgc3RydWN0dXJlIGV4YW1wbGU6IHRoZSBTZWN0aW9uIEhlYWRlciBCbG9jay4iPgorPGFydHdvcms+CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCBTSEIgdjEuMCAgfCAgICAgICAgICAgICAgICAgICAgICBEYXRhICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICBUeXBpY2FsIGNvbmZpZ3VyYXRpb24gd2l0aCBhIHNpbmdsZSBTZWN0aW9uIEhlYWRlciBCbG9jayAKKworCisgICB8LS0gICAxc3QgU2VjdGlvbiAgIC0tfC0tICAgMm5kIFNlY3Rpb24gICAtLXwtLSAgM3JkIFNlY3Rpb24gIC0tfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8IFNIQiB2MS4wICB8ICBEYXRhICAgfCBTSEIgVjEuMSAgfCAgRGF0YSAgIHwgU0hCIFYxLjAgIHwgIERhdGEgfCAgCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgQ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Ky0rCisgICB8ICAgICAgICAgICAgICBNYWpvciAgICAgICAgICAgIHwgICAgICAgICAgICAgTWlub3IgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgLyAgICAgICAgICAgICAgICAgICAgICBPcHRpb25zICh2YXJpYWJsZSkgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCis8L2FydHdvcms+Cis8L2ZpZ3VyZT4KKworPHQ+VGhlIG1lYW5pbmcgb2YgdGhlIGZpZWxkcyBpczo8L3Q+Cis8bGlzdCBzdHlsZT0ic3ltYm9scyI+Cis8dD5NYWdpYzogbWFnaWMgbnVtYmVyLCB3aG9zZSB2YWx1ZSBpcyB0aGUgaGV4YWRlY2ltYWwgbnVtYmVyIDB4MUEyQjNDNEQuIFRoaXMgbnVtYmVyIGNhbiBiZSB1c2VkIHRvIGRpc3Rpbmd1aXNoIHNlY3Rpb24gdGhhdCBoYXZlIGJlZW4gc2F2ZWQgb24gbGl0dGxlLWVuZGlhbiBtYWNoaW5lcyBmcm9tIHRoZSBvbmUgc2F2ZWQgb24gYmlnLWVuZGlhbiBtYWNoaW5lcy48L3Q+Cis8dD5NYWpvcjogbnVtYmVyIG9mIHRoZSBjdXJyZW50IG1heW9yIHZlcnNpb24gb2YgdGhlIGZvcm1hdC4gQ3VycmVudCB2YWx1ZSBpcyAxLjwvdD4KKzx0Pk1pbm9yOiBudW1iZXIgb2YgdGhlIGN1cnJlbnQgbWl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SstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICBJbnRlcmZhY2UgSUQgICAgICAgICB8ICAgICAgICAgICBMaW5rVHlwZSAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNuYXBMZW4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgLyAgICAgICAgICAgICAgICAgICAgICBPcHRpb25zICh2YXJpYWJsZSkgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgPC9hcnR3b3JrPgorPC9maWd1cmU+CisKKzx0PlRoZSBtZWFuaW5nIG9mIHRoZSBmaWVsZHMgaXM6PC90PgorPGxpc3Qgc3R5bGU9InN5bWJvbHMiPgorPHQ+SW50ZXJmYWNlIElEOiBhIHByb2dyZXNzaXZlIG51bWJlciB0aGF0IGlkZW50aWZpZXMgdW5pcXVlbHkgYW55IGludGVyZmFjZSBpbnNpZGUgY3VycmVudCBzZWN0aW9uLiBUd28gSW50ZXJmYWNlIERlc2NyaXB0aW9uIEJsb2NrcyBjYW4gaGF2ZSB0aGUgc2FtZSBJbnRlcmZhY2UgSUQgb25seSBpZiB0aGV5IGFyZSBpb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JtYXRwYiIvPi48L3Q+CisKKzxmaWd1cmUgYW5jaG9yPSJmb3JtYXRwYiIgdGl0bGU9IlBhY2tldCBCbG9jayBmb3JtYXQuIj4KKzxhcnR3b3JrPgorICAgIDAgICAgICAgICAgICAgICAgICAgMSAgICAgICAgICAgICAgICAgICAyICAgICAgICAgICAgICAgICAgIDMgICAKKyAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgIEludGVyZmFjZSBJRCAgICAgICAgICB8ICAgICAgICAgIERyb3BzIENvdW50ICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgVGltZXN0YW1wIChIaWdoKSAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICBUaW1lc3RhbXAgKExvdykgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgICBDYXB0dXJlZCBMZW4gICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgTGVuICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgRGF0YSAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgLyAgICAgICAgICAgICAgICAgICAgICBPcHRpb25zICh2YXJpYWJsZSkgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCis8L2FydHdvcms+Cis8L2ZpZ3VyZT4KKworPHQ+VGhlIFBhY2tldCBCbG9jayBoYXMgdGhlIGZvbGxvd2luZyBmaWVsZHM6PC90PgorCis8bGlzdCBzdHlsZT0ic3ltYm9scyI+Cis8dD5JbnRlcmZhY2UgSUQ6IFNwZW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AgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICBQYWNrZXQgRGF0YSAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyA8L2FydHdvcms+Cis8L2ZpZ3VyZT4KKworPHQ+VGhlIFBhY2tldCBCbG9jayBoYXMgdGhlIGZvbGxvd2luZyBmaWVsZHM6PC90PgorPGxpc3Qgc3R5bGU9InN5bWJvbHMiPgorPHQ+UGFja2V0IExlbjogYWN0dWFsIGxlbmd0aCBvZiB0aGUgcGFja2V0IHdoZW4gaXQgd2FzIHRyYW5zbWl0dGVkIG9uIHRoZSBuZXR3b3JrLiBDYW4gYmUgZGlmZmVyZW50IGZyb20gY2FwdHVyZWQgbGVuIGlmIHRoZSBwYWNrZXQgaGFzIGJlZW4gdHJ1bmNhdGVkLjwvdD4KKzx0PlBhY2tldCBkYXRhOiB0aGUgZGF0YSBjb21pbmcgZnJvbSB0aGUgbmV0d29yaywgaW5jbHVkaW5nIGxpbmstbGF5ZXJzIGhlYWRlcnMuIFRoZSBsZW5ndGggb2YgdGhpcyBmaWVsZCBjYW4gYmUgZGVyaXZlZ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LSstKy0rLSstKy0rLSstKworICAgfCAgICAgIFJlY29yZCBUeXBlICAgICAgICAgICAgICB8ICAgICAgICAgUmVjb3JkIExlbmd0aCAgICAgICAgIHwgCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICAgICAgICAgICAgICAgUmVjb3JkIFZhbHVlICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKworICAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArCisgICAgICAgICAgICAgLiAuIC4gb3RoZXIgcmVjb3JkcyAuIC4gLgorICAgfCAgUmVjb3JkIFR5cGUgPT0gZW5kX29mX3JlY3MgICB8ICBSZWNvcmQgTGVuZ3RoID09IDAwICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgT3B0aW9ucyAodmFyaWFibGUpICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rL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stKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIElmUmVjdiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgKGhpZ2ggKyBsb3cpICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIElmRHJvcCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgKGhpZ2ggKyBsb3cpICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIEZpbHRlckFjY2VwdCAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgKGhpZ2ggKyBsb3cpICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIE9TRHJvcCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgKGhpZ2ggKyBsb3cpICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgIFVzckRlbGl2ZXJlZCAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgKGhpZ2ggKyBsb3cpICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICAgICAgICAgIEludGVyZmFjZSBJRCAgICAgICAgIHwgICAgICAgICAgIFJlc2VydmVkICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIC8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvIAorICAgLyAgICAgICAgICAgICAgICAgICAgICBPcHRpb25zICh2YXJpYWJsZSkgICAgICAgICAgICAgICAgICAgICAgIC8gCisgICAvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgPC9hcnR3b3JrPgorPC9maWd1cmU+CisKKzx0PlRoZSBmaWVsZHMgaGF2ZSB0aGUgZm9sbG93aW5nIG1lYW5pbmc6PC90PgorCis8bGlzdCBzdHlsZT0ic3ltYm9scyI+Cis8dD5JZlJlY3Y6IG51bWJlciBvZiBwYWNrZXRzIHJlY2VpdmVkIGZyb20gdGhlIGludGVyZmFjZSBkdXJpbmcgdGhlIGNhcHR1cmUuIFRoaXMgbnVtYmVyIGlzIHJlcG9ydGVkIGFzIGEgNjQgYml0cyB2YWx1ZSwgaW4gd2hpY2ggdGhlIG1vc3Qgc2lnbmlmaWNhdCBiaXRzIGFyZSBsb2NhdGVkIGluIHRoZSBmaXJzdCBmb3VyIGJ5dGVzIG9mIHRoZSBmaWV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cmVmIHRhcmdldD0iZm9ybWF0b3B0Ii8+LjwvdD4KKworPGZpZ3VyZSBhbmNob3I9ImZvcm1hdG9wdCIgdGl0bGU9Ik9wdGlvbnMgZm9ybWF0LiI+Cis8YXJ0d29yaz4KKyAgICAwICAgICAgICAgICAgICAgICAgIDEgICAgICAgICAgICAgICAgICAgMiAgICAgICAgICAgICAgICAgICAzICAgCisgICAgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICBPcHRpb24gQ29kZSAgICAgICAgICAgICAgfCAgICAgICAgIE9wdGlvbiBMZW5ndGggICAgICAgICB8IAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgIE9wdGlvbiBWYWx1ZSAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAvKiB2YXJpYWJsZSBsZW5ndGgsIGJ5dGUtYWxpZ25lZCAqLyAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsgKyArICsKKyAgIHwgICAgICAgICAgICAgICAvICAgICAgICAgICAgICAgLyAgICAgICAgICAgICAgIC8gICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8KKyAgIC8gICAgICAgICAgICAgICAgIC4gLiAuI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DAgMSAKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rCisgICB8ICBDb21wci4gVHlwZSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICBDb21wcmVzc2VkIERhdGEgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgIC8qIHZhcmlhYmxlIGxlbmd0aCwgYnl0ZS1hbGlnbmVkICovICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyA8L2FydHdvcms+Cis8L2ZpZ3VyZT4KKworPHQ+VGhlIGZpZWxkcyBoYXZlIHRoZSBmb2xsb3dpbmcgbWVhbmluZzo8L3Q+CisKKzxsaXN0IHN0eWxlPSJzeW1ib2xzIj4KKzx0PkNvbXByZXNzaW9uIFR5cGU6IHNwZWNpZmllcyB0aGUgY29tcHJlc3Npb24gYWxnb3JpdGhtLiBQb3NzaWJsZSB2YWx1ZXMgZm9yIHRoaXMgZmllbGQgYXJlIDAgKHVuY29tcHJlc3NlZCksIDEgKExlbXBlbCBaaXYpLCAyIChHemlwKSwgb3RoZXI/PyBQcm9iYWJseSBzb21lIG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ICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgIENvbXByZXNzZWQgRGF0YSAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgLyogdmFyaWFibGUgbGVuZ3RoLCBieXRlLWFsaWduZWQgKi8gICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworIDwvYXJ0d29yaz4KKzwvZmlndXJlPgorCis8dD5UaGUgZmllbGRzIGhhdmUgdGhlIGZvbGxvd2luZyBtZWFuaW5nOjwvdD4KKzxsaXN0IHN0eWxlPSJzeW1ib2xzIj4KKzx0PkNvbXByZXNzaW9uIFR5cGU6IHNwZWNpZmllcyB0aGUgZW5jcnlwdGlvbiBhbGdvcml0aG0uIFBvc3NpYmxlIHZhbHVlcyBmb3IgdGhpcyBmaWVsZCBhcmUgPz8/IE5PVEU6IHRoaXMgYmxvY2sgc2hvdWxkIHByb2JhYmx5IGNvbnRhaW4gb3RoZXIgZmllbGRzLCBkZXBlbmRpbmcgb24gdGhlIGVuY3J5cHRpb24gYWxnb3JpdGhtLiBUbyBiZSBkZWZpbmUgcHJlY2lzZWx5LjwvdD4KKzx0PkVuY3J5cHRlZCBEYXRhOiBkYXRhIG9mIHRoaXMgYmxvY2suIE9uY2UgZGVjcm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AgICAgICAgICAgIDMgICAKKyAgICAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgCisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICAgfCAgICAgICAgICBDZWxsIFNpemUgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgIEZpeGVkIFNpemUgRGF0YSAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICB8ICAgICAgICAgICAgICAvKiB2YXJpYWJsZSBsZW5ndGgsIGJ5dGUtYWxpZ25lZCAqLyAgICAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworIDwvYXJ0d29yaz4KKzwvZmlndXJlPgorCis8dD5UaGUgZmllbGRzIGhhdmUgdGhlIGZvbGxvd2luZyBtZWFuaW5nOjwvdD4KKzxsaXN0IHN0eWxlPSJzeW1ib2xzIj4KKzx0PkNlbGwgc2l6ZTogdGhlIHNpemUgb2Ygd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CQkJYyA9IGdldGMoZnApOworCQl9CisJCWlmIChjID09IEVPRikKKwkJCWJyZWFrOworCisJCS8qIE11c3QgYmUgd2hpdGVzcGFjZSAqLworCQlpZiAoIWlzc3BhY2UoYykpIHsKKwkJCWMgPSBza2lwX2xpbmUoZnApOworCQkJY29udGludWU7CisJCX0KKwkJYyA9IHNraXBfc3BhY2UoZnApOworCisJCS8qIGhpdCBlbmQgb2YgbGluZS4uLiAqLworCQlpZiAoYyA9PSAnXG4nKQorCQkJY29udGludWU7CisKKwkJaWYgKGMgPT0gJyMnKSB7CisJCQljID0gc2tpcF9saW5lKGZwKTsKKwkJCWNvbnRpbnVlOworCQl9CisKKwkJLyogcGljayB1cCBuYW1lICovCisJCWJwID0gZS5uYW1lOworCQkvKiBVc2UgJ2QnIHRvIHByZXZlbnQgYnVmZmVyIG92ZXJmbG93LiAqLworCQlkID0gc2l6ZW9mKGUubmFtZSkgLSAxOworCQlkbyB7CisJCQkqYnArKyA9IGM7CisJCQljID0gZ2V0YyhmcCk7CisJCX0gd2hpbGUgKCFpc3NwYWNlKGMpICYmIGMgIT0gRU9GICYmIC0tZCA+IDApOworCQkqYnAgPSAnXDAnOworCisJCS8qIEVhdCB0cmFpbGluZyBqdW5rICovCisJCWlmIChjICE9ICdcbicpCisJCQkodm9pZClza2lwX2xpbmUoZnApOworCisJCXJldHVybiAmZTsKKworCX0gd2hpbGUgKGMgIT0gRU9GKTsKKworCXJldHVybiAoTlVMTCk7Cit9CmRpZmYgLS1naXQgYS9ldGhlcnR5cGUuaCBiL2V0aGVydHlwZS5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjJkMjFjNmQKLS0tIC9kZXYvbnVsbAorKysgYi9ldGhlcnR5cGUuaApAQCAtMCwwICsxLDExOSBAQAorLyoKKyAqIENvcHlyaWdodCAoYykgMTk5MywgMTk5NCwgMTk5NgorICoJVGhlIFJlZ2VudHMgb2YgdGhlIFVuaXZlcnNpdHkgb2Y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QgbiA9IHN0cmxlbihzKSArIDE7CisJY2hhciAqY3AgPSBuZXdjaHVuayhuKTsKKworCXN0cmxjcHkoY3AsIHMsIG4pOworCXJldHVybiAoY3ApOworfQorCitzdGF0aWMgaW5saW5lIHN0cnVjdCBibG9jayAqCituZXdfYmxvY2soY29kZSkKKwlpbnQgY29kZTsKK3sKKwlzdHJ1Y3QgYmxvY2sgKnA7CisKKwlwID0gKHN0cnVjdCBibG9jayAqKW5ld2NodW5rKHNpemVvZigqcCkpOworCXAtPnMuY29kZSA9IGNvZGU7CisJcC0+aGVhZCA9IHA7CisKKwlyZXR1cm4gcDsKK30KKworc3RhdGljIGlubGluZSBzdHJ1Y3Qgc2xpc3QgKgorbmV3X3N0bXQoY29kZSkKKwlpbnQgY29kZTsKK3sKKwlzdHJ1Y3Qgc2xpc3QgKnA7CisKKwlwID0gKHN0cnVjdCBzbGlzdCAqKW5ld2NodW5rKHNpemVvZigqcCkpOworCXAtPnMuY29kZSA9IGNvZGU7CisKKwlyZXR1cm4gcDsKK30KKworc3RhdGljIHN0cnVjdCBibG9jayAqCitnZW5fcmV0YmxrKHYpCisJaW50IHY7Cit7CisJc3RydWN0IGJsb2NrICpiID0gbmV3X2Jsb2NrKEJQRl9SRVR8QlBGX0spOworCisJYi0+cy5rID0gdjsKKwlyZXR1cm4gYjsKK30KKworc3RhdGljIGlubGluZSB2b2lkCitzeW50YXgoKQoreworCWJwZl9lcnJvcigic3ludGF4IGVycm9yIGluIGZpbHRlciBleHByZXNzaW9uIik7Cit9CisKK3N0YXRpYyBicGZfdV9pbnQzMiBuZXRtYXNrOworc3RhdGljIGludCBzbmFwbGVuOworaW50IG5vX29wdGltaXplOworCitpbnQKK3BjYXBfY29tcGlsZShwY2FwX3QgKnAsIHN0cnVjdCBicGZfcHJvZ3JhbSAqcHJvZ3JhbSwKKwkgICAgIGNvbnN0IGNoYXIgKmJ1ZiwgaW50IG9wdGltaXplLCBicGZfdV9pbnQzMiBtYXNrKQoreworCWV4dGV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WNik7IAorCisJCWRlZmF1bHQ6CisJCQlicGZfZXJyb3IoInVuc3VwcG9ydGVkIHByb3RvY29sIG92ZXIgbXBscyIpOworCQkJLyogTk9UUkVBQ0hFRCAqLworCQl9CisJfQorCisJc3dpdGNoIChsaW5rdHlwZSkgeworCisJY2FzZSBETFRfRU4xME1COgorCQlyZXR1cm4gZ2VuX2V0aGVyX2xpbmt0eXBlKHByb3RvKTsKKwkJLypOT1RSRUFDSEVEKi8KKwkJYnJlYWs7CisKKwljYXNlIERMVF9DX0hETEM6CisJCXN3aXRjaCAocHJvdG8pIHsKKworCQljYXNlIExMQ1NBUF9JU09OUzoKKwkJCXByb3RvID0gKHByb3RvIDw8IDggfCBMTENTQVBfSVNPTlMpOworCQkJLyogZmFsbCB0aHJvdWdoICovCisKKwkJZGVmYXVsdDoKKwkJCXJldHVybiBnZW5fY21wKE9SX0xJTkssIG9mZl9saW5rdHlwZSwgQlBGX0gsCisJCQkgICAgKGJwZl9pbnQzMilwcm90byk7CisJCQkvKk5PVFJFQUNIRUQqLworCQkJYnJlYWs7CisJCX0KKwkJYnJlYWs7CisKKwljYXNlIERMVF9QUEk6CisJY2FzZSBETFRfRkRESToKKwljYXNlIERMVF9JRUVFODAyOgorCWNhc2UgRExUX0lFRUU4MDJfMTE6CisJY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJT19BVlM6CisJY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJTzoKKwljYXNlIERMVF9QUklTTV9IRUFERVI6CisJY2FzZSBETFRfQVRNX1JGQzE0ODM6CisJY2FzZSBETFRfQVRNX0NMSVA6CisJY2FzZSBETFRfSVBfT1ZFUl9GQzoKKwkJcmV0dXJuIGdlbl9sbGNfbGlua3R5cGUocHJvdG8pOworCQkvKk5PVFJFQUNIRUQqLworCQlicmVhazsKKworCWNhc2UgRExUX1NVTkFUTToKKwkJLyoKKwkJICogSWYgImlzX2xhbmUiIGlzIHNldCwgY2hlY2sgZm9yIGEgTEFORS1lbmNhcHN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AgICAgYjAgPSBnZW5fbWNtcChPUl9ORVQsIC0yLCBCUEZfQiwgMHgwMSwgMHgwMSk7CisgICAgICAgICAgICAgICAgLyogbWF0Y2ggdGhlIElQdjQgdmVyc2lvbiBudW1iZXIgKi8KKyAgICAgICAgICAgICAgICBiMSA9IGdlbl9tY21wKE9SX05FVCwgMCwgQlBGX0IsIDB4NDAsIDB4ZjApOworICAgICAgICAgICAgICAgIGdlbl9hbmQoYjAsIGIxKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gYjE7CisgCisgICAgICAgY2FzZSBRX0lQVjY6CisgICAgICAgICAgICAgICAgLyogbWF0Y2ggdGhlIGJvdHRvbS1vZi1zdGFjayBiaXQgKi8KKyAgICAgICAgICAgICAgICBiMCA9IGdlbl9tY21wKE9SX05FVCwgLTIsIEJQRl9CLCAweDAxLCAweDAxKTsKKyAgICAgICAgICAgICAgICAvKiBtYXRjaCB0aGUgSVB2NCB2ZXJzaW9uIG51bWJlciAqLworICAgICAgICAgICAgICAgIGIxID0gZ2VuX21jbXAoT1JfTkVULCAwLCBCUEZfQiwgMHg2MCwgMHhmMCk7CisgICAgICAgICAgICAgICAgZ2VuX2FuZChiMCwgYjEpOworICAgICAgICAgICAgICAgIHJldHVybiBiMTsKKyAKKyAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgIGFib3J0KCk7CisgICAgICAgIH0KK30KKworc3RhdGljIHN0cnVjdCBibG9jayAqCitnZW5faG9zdChhZGRyLCBtYXNrLCBwcm90bywgZGlyLCB0eXBlKQorCWJwZl91X2ludDMyIGFkZHI7CisJYnBmX3VfaW50MzIgbWFzazsKKwlpbnQgcHJvdG87CisJaW50IGRpcjsKKwlpbnQgdHlwZTsKK3sKKwlzdHJ1Y3QgYmxvY2sgKmIwLCAqYjE7CisJY29uc3QgY2hhciAqdHlwZXN0cjsKKworCWlmICh0eXBlID09IFFfTkVUKQorCQl0eXBlc3RyID0gIm5ldCI7CisJZWxzZQorCQl0eXBlc3RyID0gIm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gICAgICAgICAgICAgICAgYjAgPSBnZW5fZmhvc3RvcChlYWRkciwgUV9PUik7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCQljYXNlIERMVF9JRUVFODAyOgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl90aG9zdG9wKGVhZGRyLCBRX09SKTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisJCWNhc2UgRExUX0lFRUU4MDJfMTE6CisJCWNhc2UgRExUX0lFRUU4MDJfMTFfUkFESU9fQVZTOgorCQljYXNlIERMVF9QUEk6CisJCWNhc2UgRExUX0lFRUU4MDJfMTFfUkFESU86CisJCWNhc2UgRExUX1BSSVNNX0hFQURFUjoKKyAgICAgICAgICAgICAgICAgICAgYjAgPSBnZW5fd2xhbmhvc3RvcChlYWRkciwgUV9PUik7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGNhc2UgRExUX1NVTkFUTToKKyAgICAgICAgICAgICAgICAgICAgaWYgKGlzX2xhbmUpIHsKKwkJCS8qCisJCQkgKiBDaGVjayB0aGF0IHRoZSBwYWNrZXQgZG9lc24ndCBiZWdpbiB3aXRoIGFuCisJCQkgKiBMRSBDb250cm9sIG1hcmtlci4gIChXZSd2ZSBhbHJlYWR5IGdlbmVyYXRlZAorCQkJICogYSB0ZXN0IGZvciBMQU5FLikKKwkJCSAqLworCQkJYjEgPSBnZW5fY21wKE9SX0xJTkssIFNVTkFUTV9QS1RfQkVHSU5fUE9TLCBCUEZfSCwKKwkJCSAgICAweEZGMDApOworCQkJZ2VuX25vdChiMSk7CisKKwkJCS8qCisJCQkgKiBOb3cgY2hlY2sgdGhlIE1BQyBhZGRyZXNzLgorCQkJICovCisJCQliMCA9IGdlbl9laG9zdG9wKGVhZGRyLCBRX09SKTsKKwkJCWdlbl9hbmQoYjEsIGIwKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKwkJY2FzZSBETFRfSVBf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KKwlyZWdpc3RlciBjb25zdCBjaGFyICpuYW1lOworCXN0cnVjdCBxdWFsIHE7Cit7CisJaW50IHByb3RvID0gcS5wcm90bzsKKwlpbnQgZGlyID0gcS5kaXI7CisJaW50IHRwcm90bzsKKwl1X2NoYXIgKmVhZGRyOworCWJwZl91X2ludDMyIG1hc2ssIGFkZHI7CisjaWZuZGVmIElORVQ2CisJYnBmX3VfaW50MzIgKiphbGlzdDsKKyNlbHNlCisJaW50IHRwcm90bzY7CisJc3RydWN0IHNvY2thZGRyX2luICpzaW40OworCXN0cnVjdCBzb2NrYWRkcl9pbjYgKnNpbjY7CisJc3RydWN0IGFkZHJpbmZvICpyZXMsICpyZXMwOworCXN0cnVjdCBpbjZfYWRkciBtYXNrMTI4OworI2VuZGlmIC8qSU5FVDYqLworCXN0cnVjdCBibG9jayAqYiwgKnRtcDsKKwlpbnQgcG9ydCwgcmVhbF9wcm90bzsKKwlpbnQgcG9ydDEsIHBvcnQyOworCisJc3dpdGNoIChxLmFkZHIpIHsKKworCWNhc2UgUV9ORVQ6CisJCWFkZHIgPSBwY2FwX25hbWV0b25ldGFkZHIobmFtZSk7CisJCWlmIChhZGRyID09IDApCisJCQlicGZfZXJyb3IoInVua25vd24gbmV0d29yayAnJXMnIiwgbmFtZSk7CisJCS8qIExlZnQganVzdGlmeSBuZXR3b3JrIGFkZHIgYW5kIGNhbGN1bGF0ZSBpdHMgbmV0d29yayBtYXNrICovCisJCW1hc2sgPSAweGZmZmZmZmZmOworCQl3aGlsZSAoYWRkciAmJiAoYWRkciAmIDB4ZmYwMDAwMDApID09IDApIHsKKwkJCWFkZHIgPDw9IDg7CisJCQltYXNrIDw8PSA4OworCQl9CisJCXJldHVybiBnZW5faG9zdChhZGRyLCBtYXNrLCBwcm90bywgZGlyLCBxLmFkZHIpOworCisJY2FzZSBRX0RFRkFVTFQ6CisJY2FzZSBRX0hPU1Q6CisJCWlmIChwcm90byA9PSBRX0xJTkspIHsKKwkJCXN3aXRjaCAobGlua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G9ubHkiKTsKKwkJLyogRkFMTFRIUk9VR0ggKi8KKworCWNhc2UgUV9ORVQ6CisJCWIgPSBnZW5faG9zdDYoYWRkciwgJm1hc2ssIHEucHJvdG8sIHEuZGlyLCBxLmFkZHIpOworCQlmcmVlYWRkcmluZm8ocmVzKTsKKwkJcmV0dXJuIGI7CisKKwlkZWZhdWx0OgorCQlicGZfZXJyb3IoImludmFsaWQgcXVhbGlmaWVyIGFnYWluc3QgSVB2NiBhZGRyZXNzIik7CisJCS8qIE5PVFJFQUNIRUQgKi8KKwl9CisJcmV0dXJuIE5VTEw7Cit9CisjZW5kaWYgLypJTkVUNiovCisKK3N0cnVjdCBibG9jayAqCitnZW5fZWNvZGUoZWFkZHIsIHEpCisJcmVnaXN0ZXIgY29uc3QgdV9jaGFyICplYWRkcjsKKwlzdHJ1Y3QgcXVhbCBxOworeworCXN0cnVjdCBibG9jayAqYiwgKnRtcDsKKworCWlmICgocS5hZGRyID09IFFfSE9TVCB8fCBxLmFkZHIgPT0gUV9ERUZBVUxUKSAmJiBxLnByb3RvID09IFFfTElOSykgeworICAgICAgICAgICAgc3dpdGNoIChsaW5rdHlwZSkgeworICAgICAgICAgICAgY2FzZSBETFRfRU4xME1COgorICAgICAgICAgICAgICAgIHJldHVybiBnZW5fZWhvc3RvcChlYWRkciwgKGludClxLmRpcik7CisgICAgICAgICAgICBjYXNlIERMVF9GRERJOgorICAgICAgICAgICAgICAgIHJldHVybiBnZW5fZmhvc3RvcChlYWRkciwgKGludClxLmRpcik7CisgICAgICAgICAgICBjYXNlIERMVF9JRUVFODAyOgorICAgICAgICAgICAgICAgIHJldHVybiBnZW5fdGhvc3RvcChlYWRkciwgKGludClxLmRpcik7CisJCQljYXNlIERMVF9JRUVFODAyXzExOgorCQkJY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJT19BVlM6CisJCQljYXNlIERMVF9JRUVFODAyXzExX1JBRElPOgorCQkJY2FzZSBETFRfUFJJU01fSEVBREVSOgorCQkJY2FzZ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Y2sgKgorZ2VuX2Jyb2FkY2FzdChwcm90bykKKwlpbnQgcHJvdG87Cit7CisJYnBmX3VfaW50MzIgaG9zdG1hc2s7CisJc3RydWN0IGJsb2NrICpiMCwgKmIxLCAqYjI7CisJc3RhdGljIHVfY2hhciBlYnJvYWRjYXN0W10gPSB7IDB4ZmYsIDB4ZmYsIDB4ZmYsIDB4ZmYsIDB4ZmYsIDB4ZmYgfTsKKworCXN3aXRjaCAocHJvdG8pIHsKKworCWNhc2UgUV9ERUZBVUxUOgorCWNhc2UgUV9MSU5LOgorICAgICAgICAgICAgICAgIHN3aXRjaCAobGlua3R5cGUpIHsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9BUkNORVQ6CisgICAgICAgICAgICAgICAgY2FzZSBETFRfQVJDTkVUX0xJTlVYOgorICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2VuX2Fob3N0b3AoYWJyb2FkY2FzdCwgUV9EU1QpOworICAgICAgICAgICAgICAgIGNhc2UgRExUX0VOMTBNQjogICAgCisgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZW5fZWhvc3RvcChlYnJvYWRjYXN0LCBRX0RTVCk7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfRkRESToKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdlbl9maG9zdG9wKGVicm9hZGNhc3QsIFFfRFNUKTsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9JRUVFODAyOgorICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2VuX3Rob3N0b3AoZWJyb2FkY2FzdCwgUV9EU1QpOworICAgICAgICAgICAgICAgIGNhc2UgRExUX0lFRUU4MDJfMTE6CisgICAgICAgICAgICAgICAgY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJT19BVlM6CisgICAgICAgICAgICAgICAgY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJTzoKKwkJCQljYXNlIERMVF9QUEk6CisgICAgICAgICAgICAgICAgY2FzZSBETFRfUFJJU01fSEVBREVSOgorICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2VuX3dsYW5ob3N0b3AoZWJyb2FkY2FzdCwgUV9EU1QpOworICAgICAgICAgICAgICAgIGNhc2UgRExUX0lQX09WRVJfRkM6CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZW5faXBmY2hvc3RvcChlYnJvYWRjYXN0LCBRX0RTVCk7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfU1VOQVRNOgorICAgICAgICAgICAgICAgICAgICBpZiAoaXNfbGFuZSkgeworCQkJLyoKKwkJCSAqIENoZWNrIHRoYXQgdGhlIHBhY2tldCBkb2Vzbid0IGJlZ2luIHdpdGggYW4KKwkJCSAqIExFIENvbnRyb2wgbWFya2VyLiAgKFdlJ3ZlIGFscmVhZHkgZ2VuZXJhdGVkCisJCQkgKiBhIHRlc3QgZm9yIExBTkUuKQorCQkJICovCisJCQliMSA9IGdlbl9jbXAoT1JfTElOSywgU1VOQVRNX1BLVF9CRUdJTl9QT1MsIEJQRl9ILAorCQkJICAgIDB4RkYwMCk7CisJCQlnZW5fbm90KGIxKTsKKworCQkJLyoKKwkJCSAqIE5vdyBjaGVjayB0aGUgTUFDIGFkZHJlc3MuCisJCQkgKi8KKwkJCWIwID0gZ2VuX2Vob3N0b3AoZWJyb2FkY2FzdCwgUV9EU1QpOworCQkJZ2VuX2FuZChiMSwgYjApOworCQkJcmV0dXJuIGIwOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgICAgIGJwZl9lcnJvcigibm90IGEgYnJvYWRjYXN0IGxpbmsiKTsKKyAgICAgICAgICAgICAgICB9CisJCWJyZWFrOworCisJY2FzZSBRX0lQOgorCQliMCA9IGdlbl9saW5rdHlwZShFVEhFUlRZUEVfSVApOworCQlob3N0bWFzayA9IH5uZXRtYXNrOworCQliMSA9IGdlbl9tY21wKE9SX05FVCwgMTY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gUV9ERUZBVUxUOgorCWNhc2UgUV9MSU5LOgorICAgICAgICAgICAgICAgIHN3aXRjaCAobGlua3R5cGUpIHsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9BUkNORVQ6CisgICAgICAgICAgICAgICAgY2FzZSBETFRfQVJDTkVUX0xJTlVYOgorICAgICAgICAgICAgICAgICAgICAvKiBhbGwgQVJDbmV0IG11bHRpY2FzdHMgdXNlIHRoZSBzYW1lIGFkZHJlc3MgKi8KKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdlbl9haG9zdG9wKGFicm9hZGNhc3QsIFFfRFNUKTsKKyAgICAgICAgICAgICAgICBjYXNlICBETFRfRU4xME1COgorICAgICAgICAgICAgICAgICAgICAvKiBldGhlclswXSAmIDEgIT0gMCAqLworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2VuX21hY19tdWx0aWNhc3QoMCk7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfRkRESToKKyAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICogWFhYIFRFU1QgVEhJUzogTUlHSFQgTk9UIFBPUlQgUFJPUEVSTFkgWFhYCisgICAgICAgICAgICAgICAgICAgICAqCisgICAgICAgICAgICAgICAgICAgICAqIFhYWCAtIHdhcyB0aGF0IHJlZmVycmluZyB0byBiaXQtb3JkZXIgaXNzdWVzPworICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgLyogZmRkaVsxXSAmIDEgIT0gMCAqLworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2VuX21hY19tdWx0aWNhc3QoMSk7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfSUVFRTgwMjoKKyAgICAgICAgICAgICAgICAgICAgLyogdHJbMl0gJiAxICE9IDAgKi8KKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdlbl9tYWNfbXVsdGljYXN0KDIpOworICAgICAgICAgICAgICAgIGNhc2UgRExUX0lFRUU4MDJfMTE6CisgICAgICAgICAgICAgICAgY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJT19BVlM6CisJCQkJY2FzZSBETFRfUFBJOgorICAgICAgICAgICAgICAgIGNhc2UgRExUX0lFRUU4MDJfMTFfUkFESU86CisgICAgICAgICAgICAgICAgY2FzZSBETFRfUFJJU01fSEVBREVSOgorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBPaCwgeXVrLgorICAgICAgICAgICAgICAgICAgICAgKgorICAgICAgICAgICAgICAgICAgICAgKglGb3IgY29udHJvbCBmcmFtZXMsIHRoZXJlIGlzIG5vIERBLgorICAgICAgICAgICAgICAgICAgICAgKgorICAgICAgICAgICAgICAgICAgICAgKglGb3IgbWFuYWdlbWVudCBmcmFtZXMsIERBIGlzIGF0IGFuCisgICAgICAgICAgICAgICAgICAgICAqCW9mZnNldCBvZiA0IGZyb20gdGhlIGJlZ2lubmluZyBvZgorICAgICAgICAgICAgICAgICAgICAgKgl0aGUgcGFja2V0LgorICAgICAgICAgICAgICAgICAgICAgKgorICAgICAgICAgICAgICAgICAgICAgKglGb3IgZGF0YSBmcmFtZXMsIERBIGlzIGF0IGFuIG9mZnNldAorICAgICAgICAgICAgICAgICAgICAgKglvZiA0IGZyb20gdGhlIGJlZ2lubmluZyBvZiB0aGUgcGFja2V0CisgICAgICAgICAgICAgICAgICAgICAqCWlmIFRvIERTIGlzIGNsZWFyIGFuZCBhdCBhbiBvZmZzZXQgb2YKKyAgICAgICAgICAgICAgICAgICAgICoJMTYgZnJvbSB0aGUgYmVnaW5uaW5nIG9mIHRoZSBwYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICoJaWYgVG8gRFMgaXMgc2V0LgorICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIEdlbmVyYXRlIHRoZSB0ZXN0cyB0byBiZSBkb25lIGZvciBkYXRhIGZyYW1lcy4KKyAgICAgICAgICAgICAgICAgICAgICoKKyAgICAgICAgICAgICAgICAgICAgICogRmlyc3QsIGNoZWNrIGZvciBUbyBEUyBzZXQsIGkuZS4gImxpbmtbMV0gJiAweDAxIi4KKyAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIHMgPSBnZW5fbG9hZF9hKE9SX0xJTkssIDEsIEJQRl9CKTsKKyAgICAgICAgICAgICAgICAgICAgYjEgPSBuZXdfYmxvY2soSk1QKEJQRl9KU0VUKSk7CisgICAgICAgICAgICAgICAgICAgIGIxLT5zLmsgPSAweDAxOwkvKiBUbyBEUyAqLworICAgICAgICAgICAgICAgICAgICBiMS0+c3RtdHMgPSBzOworICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICogSWYgVG8gRFMgaXMgc2V0LCB0aGUgREEgaXMgYXQgMTYuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl9tYWNfbXVsdGljYXN0KDE2KTsKKyAgICAgICAgICAgICAgICAgICAgZ2VuX2FuZChiMSwgYjApOworICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICogTm93LCBjaGVjayBmb3IgVG8gRFMgbm90IHNldCwgaS5lLiBjaGVjaworICAgICAgICAgICAgICAgICAgICAgKiAiIShsaW5rWzFdICYgMHgwMSkiLgorICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgcyA9IGdlbl9sb2FkX2EoT1JfTElOSywgMSwgQlBGX0IpOworICAgICAgICAgICAgICAgICAgICBiMiA9IG5ld19ibG9jayhKTVAoQlBGX0pTRVQpKTsKKyAgICAgICAgICAgICAgICAgICAgYjItPnMuayA9IDB4MDE7CS8qIFRvIERTICovCisgICAgICAgICAgICAgICAgICAgIGIyLT5zdG10cyA9IHM7CisgICAgICAgICAgICAgICAgICAgIGdlbl9ub3QoYjIpOworICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICogSWYgVG8gRFMgaXMgbm90IHNldCwgdGhlIERBIGlzIGF0IDQuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBiMSA9IGdlbl9tYWNfbXVsdGljYXN0KDQpOworICAgICAgICAgICAgICAgICAgICBnZW5fYW5kKGIyLCBiMSk7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBOb3cgT1IgdG9nZXRoZXIgdGhlIGxhc3QgdHdvIGNoZWNrcy4gIFRoYXQgZ2l2ZXMKKyAgICAgICAgICAgICAgICAgICAgICogdGhlIGNvbXBsZXRlIHNldCBvZiBjaGVja3MgZm9yIGRhdGEgZnJhbWVzLgorICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgZ2VuX29yKGIxLCBiMCk7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBOb3cgY2hlY2sgZm9yIGEgZGF0YSBmcmFtZS4KKyAgICAgICAgICAgICAgICAgICAgICogSS5lLCBjaGVjayAibGlua1swXSAmIDB4MDgiLgorICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgcyA9IGdlbl9sb2FkX2EoT1JfTElOSywgMCwgQlBGX0IpOworICAgICAgICAgICAgICAgICAgICBiMSA9IG5ld19ibG9jayhKTVAoQlBGX0pTRVQpKTsKKyAgICAgICAgICAgICAgICAgICAgYjEtPnMuayA9IDB4MDg7CisgICAgICAgICAgICAgICAgICAgIGIxLT5zdG10cyA9IHM7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBBTkQgdGhhdCB3aXRoIHRoZSBjaGVja3MgZG9uZSBmb3IgZGF0YSBmcmFtZXMuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBnZW5fYW5kKGIxLCBiMCk7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBJZiB0aGUgaGlnaC1vcmRlciBiaXQgb2YgdGhlIHR5cGUgdmFsdWUgaXMgMCwgdGhpcworICAgICAgICAgICAgICAgICAgICAgKiBpcyBhIG1hbmFnZW1lbnQgZnJhbWUuCisgICAgICAgICAgICAgICAgICAgICAqIEkuZSwgY2hlY2sgIiEobGlua1swXSAmIDB4MDgpIi4KKyAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIHMgPSBnZW5fbG9hZF9hKE9SX0xJTkssIDAsIEJQRl9CKTsKKyAgICAgICAgICAgICAgICAgICAgYjIgPSBuZXdfYmxvY2soSk1QKEJQRl9KU0VUKSk7CisgICAgICAgICAgICAgICAgICAgIGIyLT5zLmsgPSAweDA4OworICAgICAgICAgICAgICAgICAgICBiMi0+c3RtdHMgPSBzOworICAgICAgICAgICAgICAgICAgICBnZW5fbm90KGIyKTsKKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIEZvciBtYW5hZ2VtZW50IGZyYW1lcywgdGhlIERBIGlzIGF0IDQuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBiMSA9IGdlbl9tYWNfbXVsdGljYXN0KDQpOworICAgICAgICAgICAgICAgICAgICBnZW5fYW5kKGIyLCBiMSk7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBPUiB0aGF0IHdpdGggdGhlIGNoZWNrcyBkb25lIGZvciBkYXRhIGZyYW1lcy4KKyAgICAgICAgICAgICAgICAgICAgICogVGhhdCBnaXZlcyB0aGUgY2hlY2tzIGRvbmUgZm9yIG1hbmFnZW1lbnQgYW5kCisgICAgICAgICAgICAgICAgICAgICAqIGRhdGEgZnJhbWVzLgorICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgZ2VuX29yKGIxLCBiMCk7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBJZiB0aGUgbG93LW9yZGVyIGJpdCBvZiB0aGUgdHlwZSB2YWx1ZSBpcyAxLAorICAgICAgICAgICAgICAgICAgICAgKiB0aGlzIGlzIGVpdGhlciBhIGNvbnRyb2wgZnJhbWUgb3IgYSBmcmFtZQorICAgICAgICAgICAgICAgICAgICAgKiB3aXRoIGEgcmVzZXJ2ZWQgdHlwZSwgYW5kIHRodXMgbm90IGEKKyAgICAgICAgICAgICAgICAgICAgICogZnJhbWUgd2l0aCBhbiBTQS4KKyAgICAgICAgICAgICAgICAgICAgICoKKyAgICAgICAgICAgICAgICAgICAgICogSS5lLiwgY2hlY2sgIiEobGlua1swXSAmIDB4MDQpIi4KKyAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIHMgPSBnZW5fbG9hZF9hKE9SX0xJTkssIDAsIEJQRl9CKTsKKyAgICAgICAgICAgICAgICAgICAgYjEgPSBuZXdfYmxvY2soSk1QKEJQRl9KU0VUKSk7CisgICAgICAgICAgICAgICAgICAgIGIxLT5zLmsgPSAweDA0OworICAgICAgICAgICAgICAgICAgICBiMS0+c3RtdHMgPSBzOworICAgICAgICAgICAgICAgICAgICBnZW5fbm90KGIxKTsKKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIEFORCB0aGF0IHdpdGggdGhlIGNoZWNrcyBmb3IgZGF0YSBhbmQgbWFuYWdlbWVudAorICAgICAgICAgICAgICAgICAgICAgKiBmcmFtZXMuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBnZW5fYW5kKGIxLCBiMCk7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBiMDsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9JUF9PVkVSX0ZDOgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl9tYWNfbXVsdGljYXN0KDIpOworICAgICAgICAgICAgICAgICAgICByZXR1cm4gYjA7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfU1VOQVRNOgorICAgICAgICAgICAgICAgICAgICBpZiAoaXNfbGFuZSkgeworCQkJLyoKKwkJCSAqIENoZWNrIHRoYXQgdGhlIHBhY2tldCBkb2Vzbid0IGJlZ2luIHdpdGggYW4KKwkJCSAqIExFIENvbnRyb2wgbWFya2VyLiAgKFdlJ3ZlIGFscmVhZHkgZ2VuZXJhdGVkCisJCQkgKiBhIHRlc3QgZm9yIExBTkUuKQorCQkJICovCisJCQliMSA9IGdlbl9jbXAoT1JfTElOSywgU1VOQVRNX1BLVF9CRUdJTl9QT1MsIEJQRl9ILAorCQkJICAgIDB4RkYwMCk7CisJCQlnZW5fbm90KGIxKTsKKworCQkJLyogZXRoZXJbb2ZmX21hY10gJiAxICE9IDAgKi8KKwkJCWIwID0gZ2VuX21hY19tdWx0aWNhc3Qob2ZmX21hYyk7CisJCQlnZW5fYW5kKGIxLCBiMCk7CisJCQlyZXR1cm4gYjA7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIC8qIExpbmsgbm90IGtub3duIHRvIHN1cHBvcnQgbXVsdGljYXN0cyAqLworICAgICAgICAgICAgICAgIGJyZWFrOworCisJY2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X2FuZChiMCwgYjEpOworCQliMCA9IGIxOworCX0KKworCXJldHVybiAoYjApOworfQorCisvKgorICogc3VwcG9ydCBmb3IgTVBMUworICovCitzdHJ1Y3QgYmxvY2sgKgorZ2VuX21wbHMobGFiZWxfbnVtKQorCWludCBsYWJlbF9udW07Cit7CisJc3RydWN0CWJsb2NrCSpiMCwqYjE7CisKKwkvKgorCSAqIENoYW5nZSB0aGUgb2Zmc2V0cyB0byBwb2ludCB0byB0aGUgdHlwZSBhbmQgZGF0YSBmaWVsZHMgd2l0aGluCisJICogdGhlIE1QTFMgcGFja2V0LiAgSnVzdCBpbmNyZW1lbnQgdGhlIG9mZnNldHMsIHNvIHRoYXQgd2UKKwkgKiBjYW4gc3VwcG9ydCBhIGhpZXJhcmNoeSwgZS5nLiAibXBscyAxMDAwMDAgJiYgbXBscyAxMDI0IiB0bworCSAqIGNhcHR1cmUgcGFja2V0cyB3aXRoIGFuIG91dGVyIGxhYmVsIG9mIDEwMDAwMCBhbmQgYW4gaW5uZXIKKwkgKiBsYWJlbCBvZiAxMDI0LgorCSAqCisJICogWFhYIC0gdGhpcyBpcyBhIGJpdCBvZiBhIGtsdWRnZS4gIFNlZSBjb21tZW50cyBpbiBnZW5fdmxhbigpLgorCSAqLworICAgICAgICBvcmlnX25sID0gb2ZmX25sOworCisgICAgICAgIGlmIChsYWJlbF9zdGFja19kZXB0aCA+IDApIHsKKyAgICAgICAgICAgIC8qIGp1c3QgbWF0Y2ggdGhlIGJvdHRvbS1vZi1zdGFjayBiaXQgY2xlYXIgKi8KKyAgICAgICAgICAgIGIwID0gZ2VuX21jbXAoT1JfTElOSywgb3JpZ19ubC0yLCBCUEZfQiwgMCwgMHgwMSk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAvKgorICAgICAgICAgICAgICogSW5kaWNhdGUgdGhhdCB3ZSdyZSBjaGVja2luZyBNUExTLWVuY2Fwc3VsYXRlZCBoZWFkZXJzLAorICAgICAgICAgICAgICogdG8gbWFrZSBzdXJlIGhpZ2hlciBsZXZlbCBjb2RlIGdlbmVyYXRvcnMgZG9uJ3QgdHJ5IHRvCisgICAgICAgICAgICAgKiBtYXRjaCBhZ2FpbnN0IElQLXJlbGF0ZWQgcHJvdG9jb2xzIHN1Y2ggYXMgUV9BUlAsIFFfUkFSUAorICAgICAgICAgICAgICogZXRjLgorICAgICAgICAgICAgICovCisgICAgICAgICAgICBzd2l0Y2ggKGxpbmt0eXBlKSB7CisgICAgICAgICAgICAgICAgCisgICAgICAgICAgICBjYXNlIERMVF9DX0hETEM6IC8qIGZhbGwgdGhyb3VnaCAqLworICAgICAgICAgICAgY2FzZSBETFRfRU4xME1COgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl9saW5rdHlwZShFVEhFUlRZUEVfTVBMUyk7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgY2FzZSBETFRfUFBQOgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl9saW5rdHlwZShQUFBfTVBMU19VQ0FTVCk7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKiBGSVhNRSBhZGQgb3RoZXIgRExUX3MgLi4uCisgICAgICAgICAgICAgICAgICAgICAqIGZvciBGcmFtZS1SZWxheS9hbmQgQVRNIHRoaXMgbWF5IGdldCBtZXNzeSBkdWUgdG8gU05BUCBoZWFkZXJzCisgICAgICAgICAgICAgICAgICAgICAqIGxlYXZlIGl0IGZvciBub3cgKi8KKyAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgICAgIGJwZl9lcnJvcigibm8gTVBMUyBzdXBwb3J0IGZvciBkYXRhIGxpbmsgdHlwZSAlZCIsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmt0eXBlKTsKKyAgICAgICAgICAgICAgICAgICAgYjAgPSBOVUxMOworICAgIC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eW50YXgoKQoreworCWJwZl9lcnJvcigic3ludGF4IGVycm9yIGluIGZpbHRlciBleHByZXNzaW9uIik7Cit9CisKK3N0YXRpYyBicGZfdV9pbnQzMiBuZXRtYXNrOworc3RhdGljIGludCBzbmFwbGVuOworaW50IG5vX29wdGltaXplOworCitpbnQKK3BjYXBfY29tcGlsZShwY2FwX3QgKnAsIHN0cnVjdCBicGZfcHJvZ3JhbSAqcHJvZ3JhbSwKKwkgICAgIGNvbnN0IGNoYXIgKmJ1ZiwgaW50IG9wdGltaXplLCBicGZfdV9pbnQzMiBtYXNrKQoreworCWV4dGVybiBpbnQgbl9lcnJvcnM7CisJY29uc3QgY2hhciAqIHZvbGF0aWxlIHhidWYgPSBidWY7CisJaW50IGxlbjsKKworCW5vX29wdGltaXplID0gMDsKKwluX2Vycm9ycyA9IDA7CisJcm9vdCA9IE5VTEw7CisJYnBmX3BjYXAgPSBwOworCWlmIChzZXRqbXAodG9wX2N0eCkpIHsKKwkJbGV4X2NsZWFudXAoKTsKKwkJZnJlZWNodW5rcygpOworCQlyZXR1cm4gKC0xKTsKKwl9CisKKwluZXRtYXNrID0gbWFzazsKKworCXNuYXBsZW4gPSBwY2FwX3NuYXBzaG90KHApOworCWlmIChzbmFwbGVuID09IDApIHsKKwkJc25wcmludGYocC0+ZXJyYnVmLCBQQ0FQX0VSUkJVRl9TSVpFLAorCQkJICJzbmFwbGVuIG9mIDAgcmVqZWN0cyBhbGwgcGFja2V0cyIpOworCQlyZXR1cm4gLTE7CisJfQorCisJbGV4X2luaXQoeGJ1ZiA/IHhidWYgOiAiIik7CisJaW5pdF9saW5rdHlwZShwKTsKKwkodm9pZClwY2FwX3BhcnNlKCk7CisKKwlpZiAobl9lcnJvcnMpCisJCXN5bnRheCgpOworCisJaWYgKHJvb3QgPT0gTlVMTCkKKwkJcm9vdCA9IGdlbl9yZXRibGsoc25hcGxlbik7CisKKwlpZiAob3B0aW1pemUgJiYgIW5vX29wdGltaXplKSB7CisJCWJwZl9vc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Bsc19saW5rdHlwZShwcm90bykKKwlpbnQgcHJvdG87Cit7CisJc3RydWN0IGJsb2NrICpiMCwgKmIxOworCisgICAgICAgIHN3aXRjaCAocHJvdG8pIHsKKworICAgICAgICBjYXNlIFFfSVA6CisgICAgICAgICAgICAgICAgLyogbWF0Y2ggdGhlIGJvdHRvbS1vZi1zdGFjayBiaXQgKi8KKyAgICAgICAgICAgICAgICBiMCA9IGdlbl9tY21wKE9SX05FVCwgLTIsIEJQRl9CLCAweDAxLCAweDAxKTsKKyAgICAgICAgICAgICAgICAvKiBtYXRjaCB0aGUgSVB2NCB2ZXJzaW9uIG51bWJlciAqLworICAgICAgICAgICAgICAgIGIxID0gZ2VuX21jbXAoT1JfTkVULCAwLCBCUEZfQiwgMHg0MCwgMHhmMCk7CisgICAgICAgICAgICAgICAgZ2VuX2FuZChiMCwgYjEpOworICAgICAgICAgICAgICAgIHJldHVybiBiMTsKKyAKKyAgICAgICBjYXNlIFFfSVBWNjoKKyAgICAgICAgICAgICAgICAvKiBtYXRjaCB0aGUgYm90dG9tLW9mLXN0YWNrIGJpdCAqLworICAgICAgICAgICAgICAgIGIwID0gZ2VuX21jbXAoT1JfTkVULCAtMiwgQlBGX0IsIDB4MDEsIDB4MDEpOworICAgICAgICAgICAgICAgIC8qIG1hdGNoIHRoZSBJUHY0IHZlcnNpb24gbnVtYmVyICovCisgICAgICAgICAgICAgICAgYjEgPSBnZW5fbWNtcChPUl9ORVQsIDAsIEJQRl9CLCAweDYwLCAweGYwKTsKKyAgICAgICAgICAgICAgICBnZW5fYW5kKGIwLCBiMSk7CisgICAgICAgICAgICAgICAgcmV0dXJuIGIxOworIAorICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgYWJvcnQoKTsKKyAgICAgICAgfQorfQorCitzdGF0aWMgc3RydWN0IGJsb2NrICoKK2dlbl9ob3N0KGFkZHIsIG1hc2ssIHByb3RvLCBkaXIsIHR5cGUpCisJYnBmX3VfaW50MzIgYWRkcjsKKwl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AgICBjYXNlIERMVF9FTjEwTUI6CisgICAgICAgICAgICAgICAgICAgIGIwID0gZ2VuX2Vob3N0b3AoZWFkZHIsIFFfT1IpOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9GRERJOgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl9maG9zdG9wKGVhZGRyLCBRX09SKTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisJCWNhc2UgRExUX0lFRUU4MDI6CisgICAgICAgICAgICAgICAgICAgIGIwID0gZ2VuX3Rob3N0b3AoZWFkZHIsIFFfT1IpOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKwkJY2FzZSBETFRfSUVFRTgwMl8xMToKKwkJY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJT19BVlM6CisJCWNhc2UgRExUX1BQSToKKwkJY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJTzoKKwkJY2FzZSBETFRfUFJJU01fSEVBREVSOgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl93bGFuaG9zdG9wKGVhZGRyLCBRX09SKTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfU1VOQVRNOgorICAgICAgICAgICAgICAgICAgICBpZiAoaXNfbGFuZSkgeworCQkJLyoKKwkJCSAqIENoZWNrIHRoYXQgdGhlIHBhY2tldCBkb2Vzbid0IGJlZ2luIHdpdGggYW4KKwkJCSAqIExFIENvbnRyb2wgbWFya2VyLiAgKFdlJ3ZlIGFscmVhZHkgZ2VuZXJhdGVkCisJCQkgKiBhIHRlc3QgZm9yIExBTkUuKQorCQkJICovCisJCQliMSA9IGdlbl9jbXAoT1JfTElOSywgU1VOQVRNX1BLVF9CRUdJTl9QT1MsIEJQRl9ILAorCQkJICAgIDB4RkYwMCk7CisJCQlnZW5fbm90KGIxKTsKKworCQkJLyoKKwkJCSAqIE5vdyBjaGVjayB0aGUgTUFDIGFkZHJlc3MuCisJCQkgKi8KKwkJCWIwID0gZ2VuX2Vob3N0b3AoZWFkZHIsIFFfT1IpOworCQkJZ2VuX2FuZChiMSwgYjApOworICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCQljYXNlIERMVF9JUF9PVkVSX0ZDOgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl9pcGZjaG9zdG9wKGVhZGRyLCBRX09SKTsKKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICAgICAgYnBmX2Vycm9yKAorCQkJICAgICInZ2F0ZXdheScgc3VwcG9ydGVkIG9ubHkgb24gZXRoZXJuZXQvRkRESS90b2tlbiByaW5nLzgwMi4xMS9GaWJyZSBDaGFubmVsIik7CisgICAgICAgICAgICAgICAgfQorCQliMSA9IGdlbl9ob3N0KCoqYWxpc3QrKywgMHhmZmZmZmZmZiwgcHJvdG8sIFFfT1IsIFFfSE9TVCk7CisJCXdoaWxlICgqYWxpc3QpIHsKKwkJCXRtcCA9IGdlbl9ob3N0KCoqYWxpc3QrKywgMHhmZmZmZmZmZiwgcHJvdG8sIFFfT1IsCisJCQkgICAgUV9IT1NUKTsKKwkJCWdlbl9vcihiMSwgdG1wKTsKKwkJCWIxID0gdG1wOworCQl9CisJCWdlbl9ub3QoYjEpOworCQlnZW5fYW5kKGIwLCBiMSk7CisJCXJldHVybiBiMTsKKwl9CisJYnBmX2Vycm9yKCJpbGxlZ2FsIG1vZGlmaWVyIG9mICdnYXRld2F5JyIpOworCS8qIE5PVFJFQUNIRUQgKi8KK30KKyNlbmRpZgorCitzdHJ1Y3QgYmxvY2sgKgorZ2VuX3Byb3RvX2FiYnJldihwcm90bykKKwlpbnQgcHJvdG87Cit7CisJc3RydWN0IGJsb2NrICpiMDsKKwlzdHJ1Y3QgYmxvY2sgKmIxOworCisJc3dpdGNoIChwcm90bykgeworCisJY2FzZSB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W47CisJCQkJbWFzayA8PD0gMzIgLSB2bGVuOworCQkJfQorCQkJcmV0dXJuIGdlbl9ob3N0KHYsIG1hc2ssIHByb3RvLCBkaXIsIHEuYWRkcik7CisJCX0KKworCWNhc2UgUV9QT1JUOgorCQlpZiAocHJvdG8gPT0gUV9VRFApCisJCQlwcm90byA9IElQUFJPVE9fVURQOworCQllbHNlIGlmIChwcm90byA9PSBRX1RDUCkKKwkJCXByb3RvID0gSVBQUk9UT19UQ1A7CisJCWVsc2UgaWYgKHByb3RvID09IFFfU0NUUCkKKwkJCXByb3RvID0gSVBQUk9UT19TQ1RQOworCQllbHNlIGlmIChwcm90byA9PSBRX0RFRkFVTFQpCisJCQlwcm90byA9IFBST1RPX1VOREVGOworCQllbHNlCisJCQlicGZfZXJyb3IoImlsbGVnYWwgcXVhbGlmaWVyIG9mICdwb3J0JyIpOworCisjaWZuZGVmIElORVQ2CisJCXJldHVybiBnZW5fcG9ydCgoaW50KXYsIHByb3RvLCBkaXIpOworI2Vsc2UKKwkgICAgeworCQlzdHJ1Y3QgYmxvY2sgKmI7CisJCWIgPSBnZW5fcG9ydCgoaW50KXYsIHByb3RvLCBkaXIpOworCQlnZW5fb3IoZ2VuX3BvcnQ2KChpbnQpdiwgcHJvdG8sIGRpciksIGIpOworCQlyZXR1cm4gYjsKKwkgICAgfQorI2VuZGlmIC8qIElORVQ2ICovCisKKwljYXNlIFFfUE9SVFJBTkdFOgorCQlpZiAocHJvdG8gPT0gUV9VRFApCisJCQlwcm90byA9IElQUFJPVE9fVURQOworCQllbHNlIGlmIChwcm90byA9PSBRX1RDUCkKKwkJCXByb3RvID0gSVBQUk9UT19UQ1A7CisJCWVsc2UgaWYgKHByb3RvID09IFFfU0NUUCkKKwkJCXByb3RvID0gSVBQUk9UT19TQ1RQOworCQllbHNlIGlmIChwcm90byA9PSBRX0RFRkFVTFQpCisJCQlwcm90byA9IFBST1RPX1VOREVGOworCQllbHNlCisJCQlicGZfZXJyb3IoImlsbGVnYWwg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bm5lbCIpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorCX0KKwlicGZfZXJyb3IoImV0aGVybmV0IGFkZHJlc3MgdXNlZCBpbiBub24tZXRoZXIgZXhwcmVzc2lvbiIpOworCS8qIE5PVFJFQUNIRUQgKi8KKwlyZXR1cm4gTlVMTDsKK30KKwordm9pZAorc2FwcGVuZChzMCwgczEpCisJc3RydWN0IHNsaXN0ICpzMCwgKnMxOworeworCS8qCisJICogVGhpcyBpcyBkZWZpbml0ZWx5IG5vdCB0aGUgYmVzdCB3YXkgdG8gZG8gdGhpcywgYnV0IHRoZQorCSAqIGxpc3RzIHdpbGwgcmFyZWx5IGdldCBsb25nLgorCSAqLworCXdoaWxlIChzMC0+bmV4dCkKKwkJczAgPSBzMC0+bmV4dDsKKwlzMC0+bmV4dCA9IHMxOworfQorCitzdGF0aWMgc3RydWN0IHNsaXN0ICoKK3hmZXJfdG9feChhKQorCXN0cnVjdCBhcnRoICphOworeworCXN0cnVjdCBzbGlzdCAqczsKKworCXMgPSBuZXdfc3RtdChCUEZfTERYfEJQRl9NRU0pOworCXMtPnMuayA9IGEtPnJlZ25vOworCXJldHVybiBzOworfQorCitzdGF0aWMgc3RydWN0IHNsaXN0ICoKK3hmZXJfdG9fYShhKQorCXN0cnVjdCBhcnRoICphOworeworCXN0cnVjdCBzbGlzdCAqczsKKworCXMgPSBuZXdfc3RtdChCUEZfTER8QlBGX01FTSk7CisJcy0+cy5rID0gYS0+cmVnbm87CisJcmV0dXJuIHM7Cit9CisKKy8qCisgKiBNb2RpZnkgImluZGV4IiB0byB1c2UgdGhlIHZhbHVlIHN0b3JlZCBpbnRvIGl0cyByZWdpc3RlciBhcyBhbgorICogb2Zmc2V0IHJlbGF0aXZlIHRvIHRoZSBiZWdpbm5pbmcgb2YgdGhlIGhlYWRlciBmb3IgdGhlIHByb3RvY29sCisgKiAicHJvdG8iLCBhbmQgYWxsb2NhdGUgYSByZWdpc3RlciBhbmQgcHV0IG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yIGFicm9hZGNhc3RbXSA9IHsgMHgwIH07CisKK3N0cnVjdCBibG9jayAqCitnZW5fYnJvYWRjYXN0KHByb3RvKQorCWludCBwcm90bzsKK3sKKwlicGZfdV9pbnQzMiBob3N0bWFzazsKKwlzdHJ1Y3QgYmxvY2sgKmIwLCAqYjEsICpiMjsKKwlzdGF0aWMgdV9jaGFyIGVicm9hZGNhc3RbXSA9IHsgMHhmZiwgMHhmZiwgMHhmZiwgMHhmZiwgMHhmZiwgMHhmZiB9OworCisJc3dpdGNoIChwcm90bykgeworCisJY2FzZSBRX0RFRkFVTFQ6CisJY2FzZSBRX0xJTks6CisgICAgICAgICAgICAgICAgc3dpdGNoIChsaW5rdHlwZSkgeworICAgICAgICAgICAgICAgIGNhc2UgRExUX0FSQ05FVDoKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9BUkNORVRfTElOVVg6CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZW5fYWhvc3RvcChhYnJvYWRjYXN0LCBRX0RTVCk7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfRU4xME1COiAgICAKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdlbl9laG9zdG9wKGVicm9hZGNhc3QsIFFfRFNUKTsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9GRERJOgorICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2VuX2Zob3N0b3AoZWJyb2FkY2FzdCwgUV9EU1QpOworICAgICAgICAgICAgICAgIGNhc2UgRExUX0lFRUU4MDI6CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZW5fdGhvc3RvcChlYnJvYWRjYXN0LCBRX0RTVCk7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfSUVFRTgwMl8xMToKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9JRUVFODAyXzExX1JBRElPX0FWUzoKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9JRUVFODAyXzExX1JBRElPOgorCQkJCWNhc2UgRExUX1BQSToKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9QUklTTV9IRUFERVI6CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZW5fd2xhbmhvc3RvcChlYnJvYWRjYXN0LCBRX0RTVCk7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfSVBfT1ZFUl9GQzoKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGdlbl9pcGZjaG9zdG9wKGVicm9hZGNhc3QsIFFfRFNUKTsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9TVU5BVE06CisgICAgICAgICAgICAgICAgICAgIGlmIChpc19sYW5lKSB7CisJCQkvKgorCQkJICogQ2hlY2sgdGhhdCB0aGUgcGFja2V0IGRvZXNuJ3QgYmVnaW4gd2l0aCBhbgorCQkJICogTEUgQ29udHJvbCBtYXJrZXIuICAoV2UndmUgYWxyZWFkeSBnZW5lcmF0ZWQKKwkJCSAqIGEgdGVzdCBmb3IgTEFORS4pCisJCQkgKi8KKwkJCWIxID0gZ2VuX2NtcChPUl9MSU5LLCBTVU5BVE1fUEtUX0JFR0lOX1BPUywgQlBGX0gsCisJCQkgICAgMHhGRjAwKTsKKwkJCWdlbl9ub3QoYjEpOworCisJCQkvKgorCQkJICogTm93IGNoZWNrIHRoZSBNQUMgYWRkcmVzcy4KKwkJCSAqLworCQkJYjAgPSBnZW5fZWhvc3RvcChlYnJvYWRjYXN0LCBRX0RTVCk7CisJCQlnZW5fYW5kKGIxLCBiMCk7CisJCQlyZXR1cm4gYjA7CisgICAgICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICAgICAgYnBmX2Vycm9yKCJub3QgYSBicm9hZGNhc3QgbGluayIpOworICAgICAgICAgICAgICAgIH0KKwkJYnJlYWs7CisKKwljYXNlIFFfSVA6CisJCWIwID0gZ2VuX2xpbmt0eXBlKEVUSEVSVFlQRV9JUCk7CisJCWhvc3RtY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ydWN0IHNsaXN0ICpzOworCisJc3dpdGNoIChwcm90bykgeworCisJY2FzZSBRX0RFRkFVTFQ6CisJY2FzZSBRX0xJTks6CisgICAgICAgICAgICAgICAgc3dpdGNoIChsaW5rdHlwZSkgeworICAgICAgICAgICAgICAgIGNhc2UgRExUX0FSQ05FVDoKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9BUkNORVRfTElOVVg6CisgICAgICAgICAgICAgICAgICAgIC8qIGFsbCBBUkNuZXQgbXVsdGljYXN0cyB1c2UgdGhlIHNhbWUgYWRkcmVzcyAqLworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2VuX2Fob3N0b3AoYWJyb2FkY2FzdCwgUV9EU1QpOworICAgICAgICAgICAgICAgIGNhc2UgIERMVF9FTjEwTUI6CisgICAgICAgICAgICAgICAgICAgIC8qIGV0aGVyWzBdICYgMSAhPSAwICovCisgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZW5fbWFjX211bHRpY2FzdCgwKTsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9GRERJOgorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBYWFggVEVTVCBUSElTOiBNSUdIVCBOT1QgUE9SVCBQUk9QRVJMWSBYWFgKKyAgICAgICAgICAgICAgICAgICAgICoKKyAgICAgICAgICAgICAgICAgICAgICogWFhYIC0gd2FzIHRoYXQgcmVmZXJyaW5nIHRvIGJpdC1vcmRlciBpc3N1ZXM/CisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICAvKiBmZGRpWzFdICYgMSAhPSAwICovCisgICAgICAgICAgICAgICAgICAgIHJldHVybiBnZW5fbWFjX211bHRpY2FzdCgxKTsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9JRUVFODAyOgorICAgICAgICAgICAgICAgICAgICAvKiB0clsyXSAmIDEgIT0gMCAqLworICAgICAgICAgICAgICAgICAgICByZXR1cm4gZ2VuX21hY19tdWx0aWNhc3QoMik7CisgICAgICAgICAgICAgICAgY2FzZSBETFRfSUVFRTgwMl8xMToKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9JRUVFODAyXzExX1JBRElPX0FWUzoKKwkJCQljYXNlIERMVF9QUEk6CisgICAgICAgICAgICAgICAgY2FzZSBETFRfSUVFRTgwMl8xMV9SQURJTzoKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9QUklTTV9IRUFERVI6CisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIE9oLCB5dWsuCisgICAgICAgICAgICAgICAgICAgICAqCisgICAgICAgICAgICAgICAgICAgICAqCUZvciBjb250cm9sIGZyYW1lcywgdGhlcmUgaXMgbm8gREEuCisgICAgICAgICAgICAgICAgICAgICAqCisgICAgICAgICAgICAgICAgICAgICAqCUZvciBtYW5hZ2VtZW50IGZyYW1lcywgREEgaXMgYXQgYW4KKyAgICAgICAgICAgICAgICAgICAgICoJb2Zmc2V0IG9mIDQgZnJvbSB0aGUgYmVnaW5uaW5nIG9mCisgICAgICAgICAgICAgICAgICAgICAqCXRoZSBwYWNrZXQuCisgICAgICAgICAgICAgICAgICAgICAqCisgICAgICAgICAgICAgICAgICAgICAqCUZvciBkYXRhIGZyYW1lcywgREEgaXMgYXQgYW4gb2Zmc2V0CisgICAgICAgICAgICAgICAgICAgICAqCW9mIDQgZnJvbSB0aGUgYmVnaW5uaW5nIG9mIHRoZSBwYWNrZXQKKyAgICAgICAgICAgICAgICAgICAgICoJaWYgVG8gRFMgaXMgY2xlYXIgYW5kIGF0IGFuIG9mZnNldCBvZgorICAgICAgICAgICAgICAgICAgICAgKgkxNiBmcm9tIHRoZSBiZWdpbm5pbmcgb2YgdGhlIHBhY2tldAorICAgICAgICAgICAgICAgICAgICAgKglpZiBUbyBEUyBpcyBzZXQuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICogR2VuZXJhdGUgdGhlIHRlc3RzIHRvIGJlIGRvbmUgZm9yIGRhdGEgZnJhbWVzLgorICAgICAgICAgICAgICAgICAgICAgKgorICAgICAgICAgICAgICAgICAgICAgKiBGaXJzdCwgY2hlY2sgZm9yIFRvIERTIHNldCwgaS5lLiAibGlua1sxXSAmIDB4MDEiLgorICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgcyA9IGdlbl9sb2FkX2EoT1JfTElOSywgMSwgQlBGX0IpOworICAgICAgICAgICAgICAgICAgICBiMSA9IG5ld19ibG9jayhKTVAoQlBGX0pTRVQpKTsKKyAgICAgICAgICAgICAgICAgICAgYjEtPnMuayA9IDB4MDE7CS8qIFRvIERTICovCisgICAgICAgICAgICAgICAgICAgIGIxLT5zdG10cyA9IHM7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBJZiBUbyBEUyBpcyBzZXQsIHRoZSBEQSBpcyBhdCAxNi4KKyAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIGIwID0gZ2VuX21hY19tdWx0aWNhc3QoMTYpOworICAgICAgICAgICAgICAgICAgICBnZW5fYW5kKGIxLCBiMCk7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBOb3csIGNoZWNrIGZvciBUbyBEUyBub3Qgc2V0LCBpLmUuIGNoZWNrCisgICAgICAgICAgICAgICAgICAgICAqICIhKGxpbmtbMV0gJiAweDAxKSIuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBzID0gZ2VuX2xvYWRfYShPUl9MSU5LLCAxLCBCUEZfQik7CisgICAgICAgICAgICAgICAgICAgIGIyID0gbmV3X2Jsb2NrKEpNUChCUEZfSlNFVCkpOworICAgICAgICAgICAgICAgICAgICBiMi0+cy5rID0gMHgwMTsJLyogVG8gRFMgKi8KKyAgICAgICAgICAgICAgICAgICAgYjItPnN0bXRzID0gczsKKyAgICAgICAgICAgICAgICAgICAgZ2VuX25vdChiMik7CisgICAgICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAgICAgKiBJZiBUbyBEUyBpcyBub3Qgc2V0LCB0aGUgREEgaXMgYXQgNC4KKyAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIGIxID0gZ2VuX21hY19tdWx0aWNhc3QoNCk7CisgICAgICAgICAgICAgICAgICAgIGdlbl9hbmQoYjIsIGIxKTsKKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIE5vdyBPUiB0b2dldGhlciB0aGUgbGFzdCB0d28gY2hlY2tzLiAgVGhhdCBnaXZlcworICAgICAgICAgICAgICAgICAgICAgKiB0aGUgY29tcGxldGUgc2V0IG9mIGNoZWNrcyBmb3IgZGF0YSBmcmFtZXMuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBnZW5fb3IoYjEsIGIwKTsKKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIE5vdyBjaGVjayBmb3IgYSBkYXRhIGZyYW1lLgorICAgICAgICAgICAgICAgICAgICAgKiBJLmUsIGNoZWNrICJsaW5rWzBdICYgMHgwOCIuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBzID0gZ2VuX2xvYWRfYShPUl9MSU5LLCAwLCBCUEZfQik7CisgICAgICAgICAgICAgICAgICAgIGIxID0gbmV3X2Jsb2NrKEpNUChCUEZfSlNFVCkpOworICAgICAgICAgICAgICAgICAgICBiMS0+cy5rID0gMHgwODsKKyAgICAgICAgICAgICAgICAgICAgYjEtPnN0bXRzID0gczsKKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIEFORCB0aGF0IHdpdGggdGhlIGNoZWNrcyBkb25lIGZvciBkYXRhIGZyYW1lcy4KKyAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIGdlbl9hbmQoYjEsIGIwKTsKKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIElmIHRoZSBoaWdoLW9yZGVyIGJpdCBvZiB0aGUgdHlwZSB2YWx1ZSBpcyAwLCB0aGlzCisgICAgICAgICAgICAgICAgICAgICAqIGlzIGEgbWFuYWdlbWVudCBmcmFtZS4KKyAgICAgICAgICAgICAgICAgICAgICogSS5lLCBjaGVjayAiIShsaW5rWzBdICYgMHgwOCkiLgorICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgcyA9IGdlbl9sb2FkX2EoT1JfTElOSywgMCwgQlBGX0IpOworICAgICAgICAgICAgICAgICAgICBiMiA9IG5ld19ibG9jayhKTVAoQlBGX0pTRVQpKTsKKyAgICAgICAgICAgICAgICAgICAgYjItPnMuayA9IDB4MDg7CisgICAgICAgICAgICAgICAgICAgIGIyLT5zdG10cyA9IHM7CisgICAgICAgICAgICAgICAgICAgIGdlbl9ub3QoYjIpOworICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICogRm9yIG1hbmFnZW1lbnQgZnJhbWVzLCB0aGUgREEgaXMgYXQgNC4KKyAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIGIxID0gZ2VuX21hY19tdWx0aWNhc3QoNCk7CisgICAgICAgICAgICAgICAgICAgIGdlbl9hbmQoYjIsIGIxKTsKKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIE9SIHRoYXQgd2l0aCB0aGUgY2hlY2tzIGRvbmUgZm9yIGRhdGEgZnJhbWVzLgorICAgICAgICAgICAgICAgICAgICAgKiBUaGF0IGdpdmVzIHRoZSBjaGVja3MgZG9uZSBmb3IgbWFuYWdlbWVudCBhbmQKKyAgICAgICAgICAgICAgICAgICAgICogZGF0YSBmcmFtZXMuCisgICAgICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgICAgICBnZW5fb3IoYjEsIGIwKTsKKyAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICAgICAqIElmIHRoZSBsb3ctb3JkZXIgYml0IG9mIHRoZSB0eXBlIHZhbHVlIGlzIDEsCisgICAgICAgICAgICAgICAgICAgICAqIHRoaXMgaXMgZWl0aGVyIGEgY29udHJvbCBmcmFtZSBvciBhIGZyYW1lCisgICAgICAgICAgICAgICAgICAgICAqIHdpdGggYSByZXNlcnZlZCB0eXBlLCBhbmQgdGh1cyBub3QgYQorICAgICAgICAgICAgICAgICAgICAgKiBmcmFtZSB3aXRoIGFuIFNBLgorICAgICAgICAgICAgICAgICAgICAgKgorICAgICAgICAgICAgICAgICAgICAgKiBJLmUuLCBjaGVjayAiIShsaW5rWzBdICYgMHgwNCkiLgorICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgcyA9IGdlbl9sb2FkX2EoT1JfTElOSywgMCwgQlBGX0IpOworICAgICAgICAgICAgICAgICAgICBiMSA9IG5ld19ibG9jayhKTVAoQlBGX0pTRVQpKTsKKyAgICAgICAgICAgICAgICAgICAgYjEtPnMuayA9IDB4MDQ7CisgICAgICAgICAgICAgICAgICAgIGIxLT5zdG10cyA9IHM7CisgICAgICAgICAgICAgICAgICAgIGdlbl9ub3QoYjEpOworICAgICAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgICAgICogQU5EIHRoYXQgd2l0aCB0aGUgY2hlY2tzIGZvciBkYXRhIGFuZCBtYW5hZ2VtZW50CisgICAgICAgICAgICAgICAgICAgICAqIGZyYW1lcy4KKyAgICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgIGdlbl9hbmQoYjEsIGIwKTsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGIwOworICAgICAgICAgICAgICAgIGNhc2UgRExUX0lQX09WRVJfRkM6CisgICAgICAgICAgICAgICAgICAgIGIwID0gZ2VuX21hY19tdWx0aWNhc3QoMik7CisgICAgICAgICAgICAgICAgICAgIHJldHVybiBiMDsKKyAgICAgICAgICAgICAgICBjYXNlIERMVF9TVU5BVE06CisgICAgICAgICAgICAgICAgICAgIGlmIChpc19sYW5lKSB7CisJCQkvKgorCQkJICogQ2hlY2sgdGhhdCB0aGUgcGFja2V0IGRvZXNuJ3QgYmVnaW4gd2l0aCBhbgorCQkJICogTEUgQ29udHJvbCBtYXJrZXIuICAoV2UndmUgYWxyZWFkeSBnZW5lcmF0ZWQKKwkJCSAqIGEgdGVzdCBmb3IgTEFORS4pCisJCQkgKi8KKwkJCWIxID0gZ2VuX2NtcChPUl9MSU5LLCBTVU5BVE1fUEtUX0JFR0lOX1BPUywgQlBGX0gsCisJCQkgICAgMHhGRjAwKTsKKwkJCWdlbl9ub3QoYjEpOworCisJCQkvKiBldGhlcltvZmZfbWFjXSAmIDEgIT0gMCAqLworCQkJYjAgPSBnZW5fbWFjX211bHRpY2FzdChvZmZfbWFjKTsKKwkJCWdlbl9hbmQoYjEsIGIwKTsKKwkJCXJldHVybiBiMDsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgLyogTGluayBub3Qga25vd24gdG8gc3VwcG9ydCBtdWx0a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kaXIgPT0gMCkgPyBQRl9JTiA6IFBGX09VVCkpOworCQlicmVhazsKKworCWNhc2UgRExUX1BQUF9QUFBEOgorCQlpZiAoZGlyKSB7CisJCQkvKiBtYXRjaCBvdXRnb2luZyBwYWNrZXRzICovCisJCQliMCA9IGdlbl9jbXAoT1JfTElOSywgMCwgQlBGX0IsIFBQUF9QUFBEX09VVCk7CisJCX0gZWxzZSB7CisJCQkvKiBtYXRjaCBpbmNvbWluZyBwYWNrZXRzICovCisJCQliMCA9IGdlbl9jbXAoT1JfTElOSywgMCwgQlBGX0IsIFBQUF9QUFBEX0lOKTsKKwkJfQorCQlicmVhazsKKworICAgICAgICBjYXNlIERMVF9KVU5JUEVSX01GUjoKKyAgICAgICAgY2FzZSBETFRfSlVOSVBFUl9NTEZSOgorICAgICAgICBjYXNlIERMVF9KVU5JUEVSX01MUFBQOgorCWNhc2UgRExUX0pVTklQRVJfQVRNMToKKwljYXNlIERMVF9KVU5JUEVSX0FUTTI6CisJY2FzZSBETFRfSlVOSVBFUl9QUFBPRToKKwljYXNlIERMVF9KVU5JUEVSX1BQUE9FX0FUTToKKyAgICAgICAgY2FzZSBETFRfSlVOSVBFUl9HR1NOOgorICAgICAgICBjYXNlIERMVF9KVU5JUEVSX0VTOgorICAgICAgICBjYXNlIERMVF9KVU5JUEVSX01PTklUT1I6CisgICAgICAgIGNhc2UgRExUX0pVTklQRVJfU0VSVklDRVM6CisgICAgICAgIGNhc2UgRExUX0pVTklQRVJfRVRIRVI6CisgICAgICAgIGNhc2UgRExUX0pVTklQRVJfUFBQOgorICAgICAgICBjYXNlIERMVF9KVU5JUEVSX0ZSRUxBWToKKyAgICAgICAgY2FzZSBETFRfSlVOSVBFUl9DSERMQzoKKyAgICAgICAgY2FzZSBETFRfSlVOSVBFUl9WUDoKKwkJLyoganVuaXBlciBmbGFncyAoaW5jbHVkaW5nIGRpcmVjdGlvbikgYXJlIHN0b3JlZAorCQkgKiB0aGUgYnl0ZSBhZnRlciB0aGUgMy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gICAgICAgICAgICAgICAgCisgICAgICAgICAgICBjYXNlIERMVF9DX0hETEM6IC8qIGZhbGwgdGhyb3VnaCAqLworICAgICAgICAgICAgY2FzZSBETFRfRU4xME1COgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl9saW5rdHlwZShFVEhFUlRZUEVfTVBMUyk7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgY2FzZSBETFRfUFBQOgorICAgICAgICAgICAgICAgICAgICBiMCA9IGdlbl9saW5rdHlwZShQUFBfTVBMU19VQ0FTVCk7CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAvKiBGSVhNRSBhZGQgb3RoZXIgRExUX3MgLi4uCisgICAgICAgICAgICAgICAgICAgICAqIGZvciBGcmFtZS1SZWxheS9hbmQgQVRNIHRoaXMgbWF5IGdldCBtZXNzeSBkdWUgdG8gU05BUCBoZWFkZXJzCisgICAgICAgICAgICAgICAgICAgICAqIGxlYXZlIGl0IGZvciBub3cgKi8KKyAgICAgICAgICAgICAgICAKKyAgICAgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICAgICAgICAgIGJwZl9lcnJvcigibm8gTVBMUyBzdXBwb3J0IGZvciBkYXRhIGxpbmsgdHlwZSAlZCIsCisgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmt0eXBlKTsKKyAgICAgICAgICAgICAgICAgICAgYjAgPSBOVUxMOworICAgICAgICAgICAgICAgICAgICAvKk5PVFJFQUNIRUQqLworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisJLyogSWYgYSBzcGVjaWZpYyBNUExTIGxhYmVsIGlzIHJlcXVlc3RlZCwgY2hlY2sgaXQgKi8KKwlpZiAobGFiZWxfbnVtID49IDApIHsKKwkJbGFiZWxfbnVtID0gbGFiZWxfbnVtIDw8IDEyOyAvKiB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TsKK3VfaW50CWZyZWFkKHZvaWQgKiwgdV9pbnQsIHVfaW50LCBGSUxFICopOworaW50CWZzZWVrKEZJTEUgKiwgbG9uZywgaW50KTsKK3VfaW50CWZ3cml0ZShjb25zdCB2b2lkICosIHVfaW50LCB1X2ludCwgRklMRSAqKTsKK2ludAlwY2xvc2UoRklMRSAqKTsKK3ZvaWQJcmV3aW5kKEZJTEUgKik7Cit2b2lkCXNldGJ1ZihGSUxFICosIGNoYXIgKik7CitpbnQJc2V0bGluZWJ1ZihGSUxFICopOworaW50CXVuZ2V0YyhpbnQsIEZJTEUgKik7CitpbnQJdmZwcmludGYoRklMRSAqLCBjb25zdCBjaGFyICosIC4uLik7CitpbnQJdnByaW50Zihjb25zdCBjaGFyICosIC4uLik7CisjZW5kaWYKKworI2lmIF9fR05VQ19fIDw9IDEKK2ludAlyZWFkKGludCwgY2hhciAqLCB1X2ludCk7CitpbnQJd3JpdGUoaW50LCBjaGFyICosIHVfaW50KTsKKyNlbmRpZgorCitsb25nCWE2NGwoY29uc3QgY2hhciAqKTsKKyNpZmRlZiBfX1NURENfXworc3RydWN0CXNvY2thZGRyOworI2VuZGlmCitpbnQJYWNjZXB0KGludCwgc3RydWN0IHNvY2thZGRyICosIGludCAqKTsKK2ludAliaW5kKGludCwgc3RydWN0IHNvY2thZGRyICosIGludCk7CitpbnQJYmNtcChjb25zdCB2b2lkICosIGNvbnN0IHZvaWQgKiwgdV9pbnQpOwordm9pZAliY29weShjb25zdCB2b2lkICosIHZvaWQgKiwgdV9pbnQpOwordm9pZAliemVybyh2b2lkICosIGludCk7CitpbnQJY2hyb290KGNvbnN0IGNoYXIgKik7CitpbnQJY2xvc2UoaW50KTsKK3ZvaWQJY2xvc2Vsb2codm9pZCk7CitpbnQJY29ubmVjdChpbnQsIHN0cnVjdCBzb2NrYWRkciAqLCBpbnQpOworY2hhcgkqY3J5cHQoY29uc3QgY2hhciAqLCBjb25zdCBjaGFyICopOworaW50CWRhZW1vbihpbnQsIGludCk7CitpbnQJZmNobW9kKGludCwgaW50KTsKK2ludAlmY2hvd24oaW50LCBpbnQsIGludCk7Cit2b2lkCWVuZGdyZW50KHZvaWQpOwordm9pZAllbmRwd2VudCh2b2lkKTsKK3ZvaWQJZW5kc2VydmVudCh2b2lkKTsKKyNpZmRlZiBfX1NURENfXworc3RydWN0CWV0aGVyX2FkZHI7CisjZW5kaWYKK3N0cnVjdAlldGhlcl9hZGRyICpldGhlcl9hdG9uKGNvbnN0IGNoYXIgKik7CitpbnQJZmxvY2soaW50LCBpbnQpOworI2lmZGVmIF9fU1REQ19fCitzdHJ1Y3QJc3RhdDsKKyNlbmRpZgoraW50CWZzdGF0KGludCwgc3RydWN0IHN0YXQgKik7CisjaWZkZWYgX19TVERDX18KK3N0cnVjdCBzdGF0ZnM7CisjZW5kaWYKK2ludAlmc3RhdGZzKGludCwgc3RydWN0IHN0YXRmcyAqKTsKK2ludAlmc3luYyhpbnQpOworI2lmZGVmIF9fU1REQ19fCitzdHJ1Y3QgdGltZWI7CisjZW5kaWYKK2ludAlmdGltZShzdHJ1Y3QgdGltZWIgKik7CitpbnQJZnRydW5jYXRlKGludCwgb2ZmX3QpOworaW50CWdldGR0YWJsZXNpemUodm9pZCk7Citsb25nCWdldGhvc3RpZCh2b2lkKTsKK2ludAlnZXRob3N0bmFtZShjaGFyICosIGludCk7CitpbnQJZ2V0b3B0KGludCwgY2hhciAqIGNvbnN0ICosIGNvbnN0IGNoYXIgKik7CitpbnQJZ2V0cGFnZXNpemUodm9pZCk7CitjaGFyCSpnZXRwYXNzKGNoYXIgKik7CitpbnQJZ2V0cGVlcm5hbWUoaW50LCBzdHJ1Y3Qgc29ja2FkZHIgKiwgaW50ICopOworaW50CWdldHByaW9yaXR5KGludCwgaW50KTsKKyNpZmRlZiBfX1NURENfXworc3RydWN0CXJsaW1pdDsKKyNlbmRpZgoraW50CWdldHJsaW1pdChpbnQsIHN0cnVjdCBybGltaXQgKik7CitpbnQJZ2V0c29ja25hbWUoaW50L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gaW50KTsKKyNpZmRlZiBfX1NURENfXworc3RydWN0CWlvdmVjOworI2VuZGlmCitpbnQJcmVhZHYoaW50LCBzdHJ1Y3QgaW92ZWMgKiwgaW50KTsKK2ludAlyZWN2KGludCwgY2hhciAqLCB1X2ludCwgaW50KTsKK2ludAlyZWN2ZnJvbShpbnQsIGNoYXIgKiwgdV9pbnQsIGludCwgc3RydWN0IHNvY2thZGRyICosIGludCAqKTsKK2ludAlyZW5hbWUoY29uc3QgY2hhciAqLCBjb25zdCBjaGFyICopOworaW50CXJjbWQoY2hhciAqKiwgdV9zaG9ydCwgY2hhciAqLCBjaGFyICosIGNoYXIgKiwgaW50ICopOworaW50CXJyZXN2cG9ydChpbnQgKik7CitpbnQJc2VuZChpbnQsIGNoYXIgKiwgdV9pbnQsIGludCk7CitpbnQJc2VuZHRvKGludCwgY2hhciAqLCB1X2ludCwgaW50LCBzdHJ1Y3Qgc29ja2FkZHIgKiwgaW50KTsKK2ludAlzZXRlbnYoY29uc3QgY2hhciAqLCBjb25zdCBjaGFyICosIGludCk7CitpbnQJc2V0ZXVpZChpbnQpOworaW50CXNldHByaW9yaXR5KGludCwgaW50LCBpbnQpOworaW50CXNlbGVjdChpbnQsIGZkX3NldCAqLCBmZF9zZXQgKiwgZmRfc2V0ICosIHN0cnVjdCB0aW1ldmFsICopOworaW50CXNldHBncnAoaW50LCBpbnQpOwordm9pZAlzZXRwd2VudCh2b2lkKTsKK2ludAlzZXRybGltaXQoaW50LCBzdHJ1Y3QgcmxpbWl0ICopOwordm9pZAlzZXRzZXJ2ZW50KGludCk7CitpbnQJc2V0c29ja29wdChpbnQsIGludCwgaW50LCBjaGFyICosIGludCk7CitpbnQJc2h1dGRvd24oaW50LCBpbnQpOworaW50CXNpZ2Jsb2NrKGludCk7Cit2b2lkCSgqc2lnbmFsIChpbnQsIHZvaWQgKCopIChpbnQpKSkgKGludCk7CitpbnQJc2lncGF1c2UoaW50KTsKK2ludAlzaWdzZXRtYXNrKGludCk7Cisja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9mbGFnICYmIChiYXNlID09IDE2IHx8IGJhc2UgPT0gOCkpeworICAgIGlmKGJhc2UgPT0gMTYpCisgICAgICBpZigoKnN0YXRlLT5hcHBlbmRfY2hhcikoc3RhdGUsIHJlcFsxMF0gKyAyMykpIC8qIFhYWCAqLworCXJldHVybiAxOworICAgIGlmKCgqc3RhdGUtPmFwcGVuZF9jaGFyKShzdGF0ZSwgJzAnKSkKKyAgICAgIHJldHVybiAxOworICB9CisgIC8qIGFkZCBzaWduICovCisgIGlmKG1pbnVzcCl7CisgICAgaWYoKCpzdGF0ZS0+YXBwZW5kX2NoYXIpKHN0YXRlLCAnLScpKQorICAgICAgcmV0dXJuIDE7CisgICAgbGVuKys7CisgIH0gZWxzZSBpZihmbGFncyAmIHBsdXNfZmxhZykgeworICAgIGlmKCgqc3RhdGUtPmFwcGVuZF9jaGFyKShzdGF0ZSwgJysnKSkKKyAgICAgIHJldHVybiAxOworICAgIGxlbisrOworICB9IGVsc2UgaWYoZmxhZ3MgJiBzcGFjZV9mbGFnKSB7CisgICAgaWYoKCpzdGF0ZS0+YXBwZW5kX2NoYXIpKHN0YXRlLCAnICcpKQorICAgICAgcmV0dXJuIDE7CisgICAgbGVuKys7CisgIH0KKyAgaWYoZmxhZ3MgJiBtaW51c19mbGFnKQorICAgIC8qIHN3YXAgYmVmb3JlIHBhZGRpbmcgd2l0aCBzcGFjZXMgKi8KKyAgICBmb3IoaSA9IDA7IGkgPCBsZW4gLyAyOyBpKyspeworICAgICAgY2hhciBjID0gc3RhdGUtPnNbLWktMV07CisgICAgICBzdGF0ZS0+c1staS0xXSA9IHN0YXRlLT5zWy1sZW4raV07CisgICAgICBzdGF0ZS0+c1stbGVuK2ldID0gYzsKKyAgICB9CisgIHdpZHRoIC09IGxlbjsKKyAgd2hpbGUod2lkdGgtLSA+IDApeworICAgIGlmKCgqc3RhdGUtPmFwcGVuZF9jaGFyKShzdGF0ZSwgICcgJykpCisgICAgICByZXR1cm4gMTsKKyAgICBsZW4rK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J1Y3Qgc3RhdGUgKnN0YXRlLCBjb25zdCBjaGFyICpjaGFyX2Zvcm1hdCwgdmFfbGlzdCBhcCkKK3sKKyAgY29uc3QgdW5zaWduZWQgY2hhciAqZm9ybWF0ID0gKGNvbnN0IHVuc2lnbmVkIGNoYXIgKiljaGFyX2Zvcm1hdDsKKyAgdW5zaWduZWQgY2hhciBjOworCisgIHdoaWxlKChjID0gKmZvcm1hdCsrKSkgeworICAgIGlmIChjID09ICclJykgeworICAgICAgaW50IGZsYWdzICAgICAgPSAwOworICAgICAgaW50IHdpZHRoICAgICAgPSAwOworICAgICAgaW50IHByZWMgICAgICAgPSAtMTsKKyAgICAgIGludCBsb25nX2ZsYWcgID0gMDsKKyAgICAgIGludCBzaG9ydF9mbGFnID0gMDsKKworICAgICAgLyogZmxhZ3MgKi8KKyAgICAgIHdoaWxlKChjID0gKmZvcm1hdCsrKSl7CisJaWYoYyA9PSAnLScpCisJICBmbGFncyB8PSBtaW51c19mbGFnOworCWVsc2UgaWYoYyA9PSAnKycpCisJICBmbGFncyB8PSBwbHVzX2ZsYWc7CisJZWxzZSBpZihjID09ICcgJykKKwkgIGZsYWdzIHw9IHNwYWNlX2ZsYWc7CisJZWxzZSBpZihjID09ICcjJykKKwkgIGZsYWdzIHw9IGFsdGVybmF0ZV9mbGFnOworCWVsc2UgaWYoYyA9PSAnMCcpCisJICBmbGFncyB8PSB6ZXJvX2ZsYWc7CisJZWxzZQorCSAgYnJlYWs7CisgICAgICB9CisKKyAgICAgIGlmKChmbGFncyAmIHNwYWNlX2ZsYWcpICYmIChmbGFncyAmIHBsdXNfZmxhZykpCisJZmxhZ3MgXj0gc3BhY2VfZmxhZzsKKworICAgICAgaWYoKGZsYWdzICYgbWludXNfZmxhZykgJiYgKGZsYWdzICYgemVyb19mbGFnKSkKKwlmbGFncyBePSB6ZXJvX2ZsYWc7CisKKyAgICAgIC8qIHdpZHRoICovCisgICAgICBpZiAoaXNkaWdpdChjKSkKKwlkbyB7CisJICB3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gIHJldHVybiAtMTsKKwlicmVhazsKKyAgICAgIH0KKyAgICB9IGVsc2UKKyAgICAgIGlmICgoKnN0YXRlLT5hcHBlbmRfY2hhcikgKHN0YXRlLCBjKSkKKwlyZXR1cm4gLTE7CisgIH0KKyAgcmV0dXJuIDA7Cit9CisKKyNpZm5kZWYgSEFWRV9TTlBSSU5URgoraW50CitzbnByaW50ZiAoY2hhciAqc3RyLCBzaXplX3Qgc3osIGNvbnN0IGNoYXIgKmZvcm1hdCwgLi4uKQoreworICB2YV9saXN0IGFyZ3M7CisgIGludCByZXQ7CisKKyAgdmFfc3RhcnQoYXJncywgZm9ybWF0KTsKKyAgcmV0ID0gdnNucHJpbnRmIChzdHIsIHN6LCBmb3JtYXQsIGFyZ3MpOworCisjaWZkZWYgUEFSQU5PSUEKKyAgeworICAgIGludCByZXQyOworICAgIGNoYXIgKnRtcDsKKworICAgIHRtcCA9IG1hbGxvYyAoc3opOworICAgIGlmICh0bXAgPT0gTlVMTCkKKyAgICAgIGFib3J0ICgpOworCisgICAgcmV0MiA9IHZzcHJpbnRmICh0bXAsIGZvcm1hdCwgYXJncyk7CisgICAgaWYgKHJldCAhPSByZXQyIHx8IHN0cmNtcChzdHIsIHRtcCkpCisgICAgICBhYm9ydCAoKTsKKyAgICBmcmVlICh0bXApOworICB9CisjZW5kaWYKKworICB2YV9lbmQoYXJncyk7CisgIHJldHVybiByZXQ7Cit9CisjZW5kaWYKKworI2lmIDAKKyNpZm5kZWYgSEFWRV9BU1BSSU5URgoraW50Cithc3ByaW50ZiAoY2hhciAqKnJldCwgY29uc3QgY2hhciAqZm9ybWF0LCAuLi4pCit7CisgIHZhX2xpc3QgYXJnczsKKyAgaW50IHZhbDsKKworICB2YV9zdGFydChhcmdzLCBmb3JtYXQpOworICB2YWwgPSB2YXNwcmludGYgKHJldCwgZm9ybWF0LCBhcmdzKTsKKworI2lmZGVmIFBBUkFOT0lBCisgIHsKKyAgICBpbnQgcmV0MjsKKyAgICBjaGFyICp0bX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ICBldGhlcmVudC5jIGdlbmNvZGUuYyBuYW1ldG9hZC5jIHBjYXAtZG9zLmMgb3B0aW1pemUuYyBcDQorICAgICAgICAgc2F2ZWZpbGUuYyBwY2FwLmMgaW5ldC5jIG1zZG9zXG5kaXMyLmMgbXNkb3NccGt0ZHJ2ci5jIFwNCisgICAgICAgICBtaXNzaW5nXHNucHJpbnRmLmMNCisNCitCT1JMQU5EX09CSiA9ICQoU09VUkNFOi5jPS5vYmopIG1zZG9zXHBrdF9yeDAub2JqIG1zZG9zXG5kaXNfMC5vYmoNCisNCitISUdIQ19PQkogICA9ICQoU09VUkNFOi5jPS5vMzIpIG1zZG9zXHBrdF9yeDAubzMyDQorDQorYWxsOg0KKyAgICAgICAgICAgIEBlY2hvIFVzYWdlOiBtYWtlIHBjYXBfYmMubGliIG9yIHBjYXBfaGMubGliDQorDQorDQorcGNhcF9iYy5saWI6IGJjYy5hcmcgJChCT1JMQU5EX09CSikgcGNhcF9iYw0KKw0KKw0KK3BjYXBfaGMubGliOiBoYzM4Ni5hcmcgJChISUdIQ19PQkopDQorICAgICAgICAgICAgMzg2bGliICQ8IEAmJnwNCisgICAgICAgICAgICAgICAtbm93YXJuIC1ub2JhY2t1cCAtdHdvY2FzZSAtcmVwbGFjZSAkKEhJR0hDX09CSikNCit8DQorDQorcGNhcF9iYzogICAgJChCT1JMQU5EX09CSikNCisgICAgICAgICAgICBAdGxpYiBwY2FwX2JjLmxpYiAvQyBAJiZ8DQorICAgICAgICAgICAgICAgLSskKCoqOi5vYmo9LSspDQorfA0KKw0KKy5jLm9iajoNCisgICAgICAgICAgICBiY2MuZXhlIEBiY2MuYXJnIC1vJCoub2JqICQqLmMNCisNCisuYy5vMzI6DQorICAgICAgICAgICAgaGMzODYuZXhlIEBoYzM4Ni5hcmcgLW8gJCoubzMyICQqLmMNCisNCisuYXNtLm9iajoNCisgICAgICAgICAgICAkKEFTTSkgJCouYXNtLCAkKi5vYmoNCisNCisuYXNtLm8zMjoNCisgICAgICAgICAgICAkKEFTTSkgLURET1NYPTEgJCouYXNtLCAkKi5vMzINCisNCitzY2FubmVyLmM6IHNjYW5uZXIubA0KKyAgICAgICAgICAgIGZsZXggLVBwY2FwXyAtNyAtb3NjYW5uZXIuYyBzY2FubmVyLmwNCisNCitncmFtbWFyLmMgdG9rZGVmcy5oOiBncmFtbWFyLnkNCisgICAgICAgICAgICBiaXNvbiAtLW5hbWUtcHJlZml4PXBjYXBfIC0teWFjYyAtLWRlZmluZXMgZ3JhbW1hci55DQorICAgICAgICAgICAgLSBAZGVsIGdyYW1tYXIuYw0KKyAgICAgICAgICAgIC0gQGRlbCB0b2tkZWZzLmgNCisgICAgICAgICAgICByZW4geV90YWIuYyBncmFtbWFyLmMNCisgICAgICAgICAgICByZW4geV90YWIuaCB0b2tkZWZzLmgNCisNCitiY2MuYXJnOiAgICBtc2Rvc1xNYWtlZmlsZQ0KKyAgICAgICAgICAgIEBjb3B5ICYmfA0KKyAgICAgICAgICAgICAgJChERUZTKSAtbWwgLWMgLXYgLTMgLU8yIC1wbyAtUlQtIC13LQ0KKyAgICAgICAgICAgICAgLUkkKFdBVFRfSU5DKSAtSS4gLUkuXG1zZG9zXHBtX2RydnIgLUg9JChURU1QKVxiY2Muc3ltDQorfCAkPA0KKw0KK2hjMzg2LmFyZzogIG1zZG9zXE1ha2VmaWxlDQorICAgICAgICAgICAgQGNvcHkgJiZ8DQorICAgICAgICAgICAgIyAtRFVTRV8zMkJJVF9EUklWRVJTDQorICAgICAgICAgICAgICAkKERFRlMpIC1ERE9TWD0xIC13MyAtYyAtZyAtTzUNCisgICAgICAgICAgICAgIC1JJChXQVRUX0lOQykgLUkuIC1JLlxtc2Rvc1xwbV9kcnZyDQorICAgICAgICAgICAgICAtSHN1ZmZpeD0ubzMyDQorICAgICAgICAgICAgICAtSG5vY29weXINCisgICAgICAgICAgICAgIC1IcHJhZ21hPU9mZndhcm4oNDkxLDU1Myw1NzIpDQorICAgICAgICAgICAgICAtSG9uPVJlY29nbml6ZV9saWJyYXJ5ICAjIG1ha2UgbWVtY3B5L3N0cmxlbiBldGMuIGlubGluZQ0KKyAgICAgICAgICAgICAgLUhvZmY9QmVoYXZlZCAgICAgICAgICAgIyB0dXJuIG9mZiBzb21lIG9wdGltaXNlciB3YXJuaW5ncw0KK3wgJDwNCisNCitjbGVhbjoNCisgICAgICAgICAgICBAZGVsICoub2JqDQorICAgICAgICAgICAgQGRlbCAqLm8zMg0KKyAgICAgICAgICAgIEBkZWwgKi5sc3QNCisgICAgICAgICAgICBAZGVsICoubWFwDQorICAgICAgICAgICAgQGRlbCBiY2MuYXJnDQorICAgICAgICAgICAgQGRlbCBoYzM4Ni5hcmcNCisgICAgICAgICAgICBAZGVsIGdyYW1tYXIuYw0KKyAgICAgICAgICAgIEBkZWwgdG9rZGVmcy5oDQorICAgICAgICAgICAgQGRlbCBzY2FubmVyLmMNCisgICAgICAgICAgICBAZWNobyBDbGVhbmVkDQorDQorIw0KKyMgZGVwZW5kZW5jaWVzDQorIyAgICAgICAgICAgICANCitwa3RfcngwLm9iajogIG1zZG9zXHBrdF9yeDAuYXNtDQorDQorYnBmX2ZpbHQub2JqOiBicGZfZmlsdC5jIHBjYXAtaW50LmggcGNhcC5oIHBjYXAtYnBmLmggZ251Yy5oDQorDQorYnBmX2ltYWcub2JqOiBicGZfaW1hZy5jIHBjYXAtaW50LmggcGNhcC5oIHBjYXAtYnBmLmgNCisNCiticGZfZHVtcC5vYmo6IGJwZl9kdW1wLmMgcGNhcC5oIHBjYXAtYnBmLmgNCisNCitldGhlcmVudC5vYmo6IGV0aGVyZW50LmMgcGNhcC1pbnQuaCBwY2FwLmggcGNhcC1icGYuaCBwY2FwLW5hbWVkYi5oDQorDQorb3B0aW1pemUub2JqOiBvcHRpbWl6ZS5jIHBjYXAtaW50LmggcGNhcC5oIHBjYXAtYnBmLmggZ2VuY29kZS5oDQorDQorc2F2ZWZpbGUub2JqOiBzYXZlZmlsZS5jIHBjYXAtaW50LmggcGNhcC5oIHB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aiAkKE9CSkRJUilcaW5ldC5vYmogICAgICQoT0JKRElSKVxuZGlzMi5vYmoNCisNCitDRkxBR1MgPSAkKERFRlMpICQoWVlERUZTKSAtSS4gLUkkKCV3YXR0X3Jvb3QpXGluYyAtSS5cbXNkb3NccG1fZHJ2ciAmDQorICAgICAgICAgLSQoTU9ERUwpIC1tZiAtemZmIC16Z2YgLXpxIC1idD1kb3MgLWZyPW51bCAtdzYgLWZwaSAgICAgICAgJg0KKyAgICAgICAgIC1vaWxydGYgLXptDQorDQorVEVNUEJJTiA9IHRtcC5iaW4NCisNCithbGw6ICQoT0JKRElSKSAkKE9CSkRJUilccGNhcC5saWINCisNCiskKE9CSkRJUik6DQorICAgICAgICAgIC0gbWtkaXIgJChPQkpESVIpDQorDQorJChPQkpESVIpXHBjYXAubGliOiAkKE9CSlMpIHdsaWIuYXJnDQorICAgICAgICAgIHdsaWIgLXEgLWIgLWMgJChPQkpESVIpXHBjYXAubGliIEB3bGliLmFyZw0KKw0KK3dsaWIuYXJnOiBtc2Rvc1xtYWtlZmlsZS53Yw0KKyAgICAgICAgICAlY3JlYXRlICReQA0KKyAgICAgICAgICBmb3IgJWYgaW4gKCQoT0JKUykpIGRvICVhcHBlbmQgJF5AICstICVmDQorDQorJChPQkpESVIpXHBrdGRydnIub2JqOiBtc2Rvc1xwa3Rfc3R1Yi5pbmMgbXNkb3NccGt0ZHJ2ci5jIGdudWMuaCAmDQorICBwY2FwLWRvcy5oIHBjYXAtaW50LmggcGNhcC5oIG1zZG9zXHBrdGRydnIuaA0KKyAgICAgICAgICAqJChDQykgJChDRkxBR1MpIG1zZG9zXHBrdGRydnIuYyAtZm89JEANCisNCiskKE9CSkRJUilcbmRpczIub2JqOiBtc2Rvc1xuZGlzMi5jDQorICAgICAgICAgICokKENDKSAkKENGTEFHUykgbXNkb3NcbmRpczIuYyAtZm89JEANCisNCisuRVJBU0UNCisuY3skKE9CSkRJUil9Lm9iajoNCisgICAgICAgICAgKiQoQ0MpICQoQ0ZMQUdTKSAkW0AgLWZvPSRADQorDQorZ3JhbW1hci5jIHRva2RlZnMuaDogZ3JhbW1hci55IA0KKyAgICAgICAgICBiaXNvbiAtLW5hbWUtcHJlZml4PXBjYXBfIC0teWFjYyAtLWRlZmluZXMgJFtADQorICAgICAgICAgIC0gQGRlbCBncmFtbWFyLmMNCisgICAgICAgICAgLSBAZGVsIHRva2RlZnMuaA0KKyAgICAgICAgICByZW4geV90YWIuYyBncmFtbWFyLmMNCisgICAgICAgICAgcmVuIHlfdGFiLmggdG9rZGVmcy5oDQorDQorc2Nhbm5lci5jOiBzY2FubmVyLmwNCisgICAgICAgICAgZmxleCAtUHBjYXBfIC03IC1vJEAgJFtADQorDQorbXNkb3NccGt0X3N0dWIuaW5jOiBiaW4yYy5leGUgbXNkb3NccGt0X3J4MS5TDQorICAgICAgICAgIG5hc20gLWZiaW4gLWRERUJVRyAtbyAkKFRFTVBCSU4pIC1sbXNkb3NccGt0X3J4MS5sc3QgbXNkb3NccGt0X3J4MS5TDQorICAgICAgICAgIGJpbjJjLmV4ZSAgJChURU1QQklOKSA+ICRADQorICAgICAgICAgIEBkZWwgJChURU1QQklOKQ0KKw0KK2JpbjJjLmV4ZTogbXNkb3NcYmluMmMuYw0KKyAgICAgICAgICB3Y2wgJFtADQorDQorY2xlYW4gcmVhbGNsZWFuIHZjbGVhbjogLlNZTUJPTElDDQorICAgICAgICAgIGZvciAlZiBpbiAoZG9zNGcudzNyIGRvczRnLnczcyBwaGFybGFwLnczciBwaGFybGFwLnczcykgZG8gJg0KKyAgICAgICAgICAgIEBkZWwgJWZcKi5vYmoNCisgICAgICAgICAgQGRlbCBncmFtbWFyLmMNCisgICAgICAgICAgQGRlbCB0b2tkZWZzLmgNCisgICAgICAgICAgQGRlbCBzY2FubmVyLmMNCisgICAgICAgICAgQGRlbCBiaW4yYy5leGUNCisgICAgICAgICAgQGRlbCBiaW4yYy5vYmoNCisgICAgICAgICAgQGRlbCBtc2Rvc1xwa3Rfc3R1Y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GludCAgICAgICAgICAgIGJpbmRFbnRyeSA9IDA7DQorICBzdHJ1Y3QgX0NvbW1vbkNoYXJzICAqbWFjQ29tbW9uOw0KKyAgdm9sYXRpbGUgV09SRCByZXN1bHQ7DQorDQorICBzd2l0Y2ggKG9wY29kZSkNCisgIHsNCisgICAgY2FzZSBSRVFfSU5JVElBVEVfQklORDoNCisgICAgICAgICBtYWNDb21tb24gPSAoc3RydWN0IF9Db21tb25DaGFycyopIHBhcmFtMjsNCisgICAgICAgICBpZiAobWFjQ29tbW9uID09IE5VTEwpDQorCSB7DQorICAgICAgICAgICBwcmludGYgKCJUaGVyZSBpcyBhbiBORElTIG1pc2NvbmZpZ3VyYXRpb24uXG4iKTsNCisgICAgICAgICAgIHJlc3VsdCA9IEVSUl9HRU5FUkFMX0ZBSUxVUkU7DQorCSAgIGJyZWFrOw0KKwkgfQ0KKyAgICAgICAgIERFQlVHMiAoIm1vZHVsZSBuYW1lICVzXG4iDQorICAgICAgICAgICAgICAgICAibW9kdWxlIHR5cGUgJXNcbiIsDQorICAgICAgICAgICAgICAgICBtYWNDb21tb24tPm1vZHVsZU5hbWUsDQorICAgICAgICAgICAgICAgICAoKE1hY0NoYXJzKikgbWFjQ29tbW9uLT5zZXJ2aWNlQ2hhcnMpLT5tYWNOYW1lKTsNCisNCisgICAgICAgICAvKiBCaW5kaW5nIHRvIHRoZSBNQUMgKi8NCisgICAgICAgICByZXN1bHQgPSBtYWNDb21tb24tPnN5c3RlbVJlcXVlc3QgKChEV09SRCkmY29tbW9uLCAoRFdPUkQpJm1hY0NvbW1vbiwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIFJFUV9CSU5ELA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFjQ29tbW9uLT5tb2R1bGVEUyk7DQorDQorICAgICAgICAgaWYgKCFzdHJjbXAoYmluZGluZ3MubW9kdWxlTmFtZVtiaW5kRW50cnldLCBoYW5kbGUtPm1vZHVsZU5hbWUpKQ0KKyAgICAgICAgICAgICAgaGFuZGxlLT5jb21tb24gPSBtYWNDb21tb247DQorICAgICAgICAgZWxzZSBQRVJST1IgKCJ1bmtub3duIG1vZHVsZSIpOw0KKyAgICAgICAgICsrYmluZEVudHJ5Ow0KKwkgYnJlYWs7DQorDQorICAgIGNhc2UgUkVRX0lOSVRJQVRFX1VOQklORDoNCisgICAgICAgICBtYWNDb21tb24gPSAoc3RydWN0IF9Db21tb25DaGFycyopIHBhcmFtMjsNCisgICAgICAgICByZXN1bHQgPSBtYWNDb21tb24tPnN5c3RlbVJlcXVlc3QgKChEV09SRCkmY29tbW9uLCAwLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgUkVRX1VOQklORCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1hY0NvbW1vbi0+bW9kdWxlRFMpOw0KKyAgICAgICAgIGJyZWFrOw0KKw0KKyAgICBkZWZhdWx0Og0KKyAgICAgICAgIHJlc3VsdCA9IEVSUl9HRU5FUkFMX0ZBSUxVUkU7DQorCSBicmVhazsNCisgIH0NCisgIEFSR1NVU0VEIChwYXJhbTEpOw0KKyAgQVJHU1VTRUQgKHBhcmFtMyk7DQorICBBUkdTVVNFRCAodGFyZ2V0RFMpOw0KKyAgcmV0dXJuIChyZXN1bHQpOw0KK30NCisNCitDQUxMQkFDSyAoTmRpc1JlcXVlc3RDb25maXJtIChXT1JEIHByb3RJZCwgV09SRCBtYWNJZCwgICBXT1JEIHJlcUhhbmRsZSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXT1JEIHN0YXR1cywgV09SRCByZXF1ZXN0LCBXT1JEIHByb3REUykpDQorew0KKyAgQVJHU1VTRUQgKHByb3RJZCk7ICAgIEFSR1NVU0VEIChtYWNJZCk7DQorICBBUkdTVVNFRCAocmVxSGFuZGxlKTsgQVJHU1VTRUQgKHN0YXR1cyk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goaGFuZGxlKS0+dHJhbnNtaXRDaGFpbiAoY29tbW9uLm1vZHVsZUlkLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBrdEJ1Zi0+aGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZ0eEJ1ZkRlc2NyLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhhbmRsZS0+Y29tbW9uLT5tb2R1bGVEUyk7DQorICBzd2l0Y2ggKHJlc3VsdCkNCisgIHsNCisgICAgY2FzZSBFUlJfT1VUX09GX1JFU09VUkNFOg0KKyAgICAgICAgIC8qIE5vdGUgdGhhdCB0aGlzIHNob3VsZCBub3QgaGFwcGVuIGJ1dCBpZiBpdCBkb2VzIHRoZXJlIGlzIG5vdA0KKyAgICAgICAgICAqIG11Y2ggd2UgY2FuIGRvIGFib3V0IGl0DQorICAgICAgICAgICovDQorICAgICAgICAgcHJpbnRmICgiRVJST1I6IHRyYW5zbWl0IHF1ZXVlIG92ZXJmbG93ZWRcbiIpOw0KKyAgICAgICAgIHJldHVybiAoMCk7DQorDQorICAgIGNhc2UgRVJSX1NVQ0NFU1M6DQorICAgICAgICAgLyogRXZlcnl0aGluZyB3YXMgaHVua3kgZG9yeSBhbmQgc3luY2hyb25vdXMuIEZyZWUgdXAgdGhlIA0KKyAgICAgICAgICAqIHBhY2tldCBidWZmZXINCisgICAgICAgICAgKi8NCisgICAgICAgICB4bWl0UGVuZGluZy0tOw0KKyAgICAgICAgIEZyZWVQa3RCdWYgKHBrdEJ1Zik7DQorICAgICAgICAgcmV0dXJuICgxKTsNCisNCisgICAgY2FzZSBFUlJfUkVRVUVTVF9RVUVVRUQ6DQorICAgICAgICAgLyogRXZlcnl0aGluZyB3YXMgaHVua3kgZG9yeSBhbmQgYXN5bmNocm9ub3VzLiBEbyBub3RoaW5nDQorICAgICAgICAgICovDQorICAg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7DQorDQorICBwcmludGYgKCJIYXJkd2FyZSBhZGRyZXNzOiAlMDJYOiUwMlg6JTAyWDolMDJYOiUwMlg6JTAyWFxuIiwNCisgICAgICAgICAgbWFjX2FkZHJbMF0sIG1hY19hZGRyWzFdLCBtYWNfYWRkclsyXSwNCisgICAgICAgICAgbWFjX2FkZHJbM10sIG1hY19hZGRyWzRdLCBtYWNfYWRkcls1XSk7DQorICByZXR1cm4gKDEpOw0KK30NCisNCitzdGF0aWMgaW50IE5kaXNTdGFydE1hYyAoQ2FyZEhhbmRsZSAqY2FyZCkNCit7DQorICBXT1JEIHJlc3VsdDsNCisNCisgIC8qIFNldCB0aGUgbG9va2FoZWFkIGxlbmd0aA0KKyAgICovDQorICByZXN1bHQgPSBNQUNfRElTUEFUQ0goaGFuZGxlKS0+cmVxdWVzdCAoY29tbW9uLm1vZHVsZUlkLCAwLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlclNpemUsIDAsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUkVRX1NFVF9MT09LQUhFQUQsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FyZC0+Y29tbW9uLT5tb2R1bGVEUyk7DQorDQorICAvKiBXZSBhc3N1bWUgdGhhdCBpZiB3ZSBnb3QgSU5WQUxJRCBQQVJBTUVURVIgdGhlbiBlaXRoZXIgdGhpcw0KKyAgICogaXMgbm90IHN1cHBvcnRlZCBvciB3aWxsIHdvcmsgYW55d2F5LiBORTIwMDAgZG9lcyB0aGlzLg0KKyAgICovDQorICBpZiAocmVzdWx0ICE9IEVSUl9TVUNDRVNTICYmIHJlc3VsdCAhPSBFUlJfSU5WQUxJRF9QQVJBTUVURVIpDQorICB7DQorICAgIERFQlVHMSAoIlNldCBsb29rYWhlYWQgZmFpbGVkOiAlc1xuIiwgTmRpc19zdHJlcnJvcihyZXN1bHQpKTsNCisgICAgcmV0dXJu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U19QVFIgKFJlY2VpdmVSZWxlYXNlLChXT1JELCBXT1JEKSk7DQorUEFTX1BUUiAoSW5kaWNhdGlvbk9uLCAgKFdPUkQpKTsNCitQQVNfUFRSIChJbmRpY2F0aW9uT2ZmLCAoV09SRCkpOw0KKw0KKw0KK3R5cGVkZWYgZW51bSB7DQorICAgICAgICBIQVJEV0FSRV9OT1RfSU5TVEFMTEVEICA9IDAsDQorICAgICAgICBIQVJEV0FSRV9GQUlMRURfRElBRyAgICA9IDEsDQorICAgICAgICBIQVJEV0FSRV9GQUlMRURfQ09ORklHICA9IDIsDQorICAgICAgICBIQVJEV0FSRV9IQVJEX0ZBVUxUICAgICA9IDMsDQorICAgICAgICBIQVJEV0FSRV9TT0ZUX0ZBVUxUICAgICA9IDQsDQorICAgICAgICBIQVJEV0FSRV9PSyAgICAgICAgICAgICA9IDcsDQorICAgICAgICBIQVJEV0FSRV9NQVNLICAgICAgICAgICA9IDB4MDAwNywNCisgICAgICAgIE1BQ19CT1VORCAgICAgICAgICAgICAgID0gMHgwMDA4LA0KKyAgICAgICAgTUFDX09QRU4gICAgICAgICAgICAgICAgPSAweDAwMTAsDQorICAgICAgICBESUFHX0lOX1BST0dSRVNTICAgICAgICA9IDB4MDAyMA0KKyAgICAgIH0gTmRpc01hY1N0YXR1czsNCisNCit0eXBlZGVmIGVudW0gew0KKyAgICAgICAgU1RBVFVTX1JJTkdfU1RBVFVTICAgICAgPSAxLA0KKyAgICAgICAgU1RBVFVTX0FEQVBURVJfQ0hFQ0sgICAgPSAyLA0KKyAgICAgICAgU1RBVFVTX1NUQVJUX1JFU0VUICAgICAgPSAzLA0KKyAgICAgICAgU1RBVFVTX0lOVEVSUlVQVCAgICAgICAgPSA0LA0KKyAgICAgICAgU1RBVFVTX0VORF9SRVNFVCAgICAgICAgPSA1DQorICAgICAgfSBOZGlzU3RhdHVzOw0KKw0KK3R5cGVkZWYgZW51bSB7DQorICAgICAgICBGSUxURVJfRElSRUNURUQgICAgICAgICA9IDEsDQorICAgICAgICBGSUxURVJfQlJPQURDQVNUICAgICAgICA9IDIsDQorICAgICAgICBGSUxURVJfUFJPTUlTQ1VPVVMgICAgICA9IDQsDQorICAgICAgICBGSUxURVJfU09VUkNFX1JPVVRFICAgICA9IDgNCisgICAgICB9IE5kaXNQYWNrZXRGaWx0ZXI7DQorDQordHlwZWRlZiBlbnVtIHsNCisgICAgICAgIFJFUV9JTklUSUFURV9ESUFHTk9TVElDUyAgICAgPSAxLA0KKyAgICAgICAgUkVRX1JFQURfRVJST1JfTE9HICAgICAgICAgICA9IDIsDQorICAgICAgICBSRVFfU0VUX1NUQVRJT05fQUREUkVTUyAgICAgID0gMywNCisgICAgICAgIFJFUV9PUEVOX0FEQVBURVIgICAgICAgICAgICAgPSA0LA0KKyAgICAgICAgUkVRX0NMT1NFX0FEQVBURVIgICAgICAgICAgICA9IDUsDQorICAgICAgICBSRVFfUkVTRVRfTUFDICAgICAgICAgICAgICAgID0gNiwNCisgICAgICAgIFJFUV9TRVRfUEFDS0VUX0ZJTFRFUiAgICAgICAgPSA3LA0KKyAgICAgICAgUkVRX0FERF9NVUxUSUNBU1RfQUREUkVTUyAgICA9IDgsDQorICAgICAgICBSRVFfREVMRVRFX01VTFRJQ0FTVF9BRERSRVNTID0gOSwNCisgICAgICAgIFJFUV9VUERBVEVfU1RBVElTVElDUyAgICAgICAgPSAxMCwNCisgICAgICAgIFJFUV9DTEVBUl9TVEFUSVNUSUNTICAgICAgICAgPSAxMSwNCisgICAgICAgIFJFUV9JTlRFUlJVUFRfUkVRVUVTVCAgICAgICAgPSAxMiwNCisgICAgICAgIFJFUV9TRVRfRlVOQ1RJT05BTF9BRERSRVNTICAgPSAxMywNCisgICAgICAgIFJFUV9TRVRfTE9PS0FIRUFEICAgICAgICAgICAgPSAxNA0KKyAgICAgIH0gTmRpc0dlbmVyYWxSZXF1ZXN0Ow0KKw0KK3R5cGVkZWYgZW51bSB7DQorICAgICAgICBTRl9CUk9BRENBU1QgICAgICAgICAgICAgPSAweDAwMDAwMDAxTCwNCisgICAgICAgIFNGX01VTFRJQ0FTVCAgICAgICAgICAgICA9IDB4MDAwMDAwMDJMLA0KKyAgICAgICAgU0ZfRlVOQ1RJT05BTCAgICAgICAgICAgID0gMHgwMDAwMDAwNEwsDQorICAgICAgICBTRl9QUk9NSVNDVU9VUyAgICAgICAgICAgPSAweDAwMDAwMDA4TCwNCisgICAgICAgIFNGX1NPRlRfQUREUkVTUyAgICAgICAgICA9IDB4MDAwMDAwMTBMLA0KKyAgICAgICAgU0ZfU1RBVFNfQ1VSUkVOVCAgICAgICAgID0gMHgwMDAwMDAyMEwsDQorICAgICAgICBTRl9JTklUSUFURV9ESUFHUyAgICAgICAgPSAweDAwMDAwMDQwTCwNCisgICAgICAgIFNGX0xPT1BCQUNLICAgICAgICAgICAgICA9IDB4MDAwMDAwODBMLA0KKyAgICAgICAgU0ZfUkVDRUlWRV9DSEFJTiAgICAgICAgID0gMHgwMDAwMDEwMEwsDQorICAgICAgICBTRl9TT1VSQ0VfUk9VVElORyAgICAgICAgPSAweDAwMDAwMjAwTCwNCisgICAgICAgIFNGX1JFU0VUX01BQyAgICAgICAgICAgICA9IDB4MDAwMDA0MDBMLA0KKyAgICAgICAgU0ZfT1BFTl9DTE9TRSAgICAgICAgICAgID0gMHgwMDAwMDgwMEwsDQorICAgICAgICBTRl9JTlRFUlJVUFRfUkVRVUVTVCAgICAgPSAweDAwMDAxMDAwTCwNCisgICAgICAgIFNGX1NPVVJDRV9ST1VUSU5HX0JSSURHRSA9IDB4MDAwMDIwMDBMLA0KKyAgICAgICAgU0ZfVklSVFVBTF9BRERSRVNTRVMgICAgID0gMHgwMDAwNDAwMEwNCisgICAgICB9IE5kaXNNYWNTZXJ2aWNlRmxhZ3M7DQorDQordHlwZWRlZiBlbnVtIHsNCisgICAgICAgIFJFUV9JTklUSUFURV9CSU5EICAgICAgICA9IDEsDQorICAgICAgICBSRVFfQklORCAgICAgICAgICAgICAgICAgPSAyLA0KKyAgICAgICAgUkVRX0lOSVRJQVRFX1BSRUJJTkQgICAgID0gMywNCisgICAgICAgIFJFUV9JTklUSUFURV9VTkJJTkQgICAgICA9IDQsDQorICAgICAgICBSRVFfVU5CSU5EICAgICAgICAgICAgICAgPSA1DQorICAgICAgfSBOZGlzU3lzUmVxdWVzdDsNCisNCit0eXBlZGVmIGVudW0gIHsNCisgICAgICAgIFBNX0dFVF9QUk9UT0NPTF9NQU5BR0VSX0lORk8gICAgICA9IDEsDQorICAgICAgICBQTV9SRUdJU1RFUl9NT0RVTEUgICAgICAgICAgICAgICAgPSAyLA0KKyAgICAgICAgUE1fQklORF9BTkRfU1RBUlQgICAgICAgICAgICAgICAgID0gMywNCisgICAgICAgIFBNX0dFVF9QUk9UT0NPTF9NQU5BR0VSX0xJTktBR0UgICA9IDQsDQorICAgICAgICBQTV9HRVRfUFJPVE9DT0xfSU5JX1BBVEggICAgICAgICAgPSA1LA0KKyAgICAgICAgUE1fUkVHSVNURVJfUFJPVE9DT0xfTUFOQUdFUl9JTkZPID0gNiwNCisgICAgICAgIFBNX0lOSVRfQU5EX1JFR0lTVEVSICAgICAgICAgICAgICA9IDcsDQorICAgICAgICBQTV9VTkJJTkRfQU5EX1NUT1AgICAgICAgICAgICAgICAgPSA4LA0KKyAgICAgICAgUE1fQklORF9TVEFUVVMgICAgICAgICAgICAgICAgICAgID0gOSwNCisgICAgICAgIFBNX1JFR0lTVEVSX1NUQVRVUyAgICAgICAgICAgICAgICA9IDEwDQorICAgICAgfSBOZGlzUHJvdE1hbmFnZXI7DQorDQorDQordHlwZWRlZiBlbnVtIHsNCisgICAgICAgIEVSUl9TVUNDRVNTICAgICAgICAgICAgICAgICAgICAgID0gMHgwMCwNCisgICAgICAgIEVSUl9XQUlUX0ZPUl9SRUxFQVNFICAgICAgICAgICAgID0gMHgwMSwNCisgICAgICAgIEVSUl9SRVFVRVNUX1FVRVVFRCAgICAgICAgICAgICAgID0gMHgwMiwNCisgICAgICAgIEVSUl9GUkFNRV9OT1RfUkVDT0dOSVpFRCAgICAgICAgID0gMHgwMywNCisgICAgICAgIEVSUl9GUkFNRV9SRUpFQ1RFRCAgICAgICAgICAgICAgID0gMHgwNCwNCisgICAgICAgIEVSUl9GT1JXQVJEX0ZSQU1FICAgICAgICAgICAgICAgID0gMHgwNSwNCisgICAgICAgIEVSUl9PVVRfT0ZfUkVTT1VSQ0UgICAgICAgICAgICAgID0gMHgwNiwNCisgICAgICAgIEVSUl9JTlZBTElEX1BBUkFNRVRFUiAgICAgICAgICAgID0gMHgwNywNCisgICAgICAgIEVSUl9JTlZBTElEX0ZVTkNUSU9OICAgICAgICAgICAgID0gMHgwOCwNCisgICAgICAgIEVSUl9OT1RfU1VQUE9SVEVEICAgICAgICAgICAgICAgID0gMHgwOSwNCisgICAgICAgIEVSUl9IQVJEV0FSRV9FUlJPUiAgICAgICAgICAgICAgID0gMHgwQSwNCisgICAgICAgIEVSUl9UUkFOU01JVF9FUlJPUiAgICAgICAgICAgICAgID0gMHgwQiwNCisgICAgICAgIEVSUl9OT19TVUNIX0RFU1RJTkFUSU9OICAgICAgICAgID0gMHgwQywNCisgICAgICAgIEVSUl9CVUZGRVJfVE9PX1NNQUxMICAgICAgICAgICAgID0gMHgwRCwNCisgICAgICAgIEVSUl9BTFJFQURZX1NUQVJURUQgICAgICAgICAgICAgID0gMHgyMCwNCisgICAgICAgIEVSUl9JTkNPTVBMRVRFX0JJTkRJTkcgICAgICAgICAgID0gMHgyMSwNCisgICAgICAgIEVSUl9EUklWRVJfTk9UX0lOSVRJQUxJWkVEICAgICAgID0gMHgyMiwNCisgICAgICAgIEVSUl9IQVJEV0FSRV9OT1RfRk9VTkQgICAgICAgICAgID0gMHgyMywNCisgICAgICAgIEVSUl9IQVJEV0FSRV9GQUlMVVJFICAgICAgICAgICAgID0gMHgyNCwNCisgICAgICAgIEVSUl9DT05GSUdVUkFUSU9OX0ZBSUxVUkUgICAgICAgID0gMHgyNSwNCisgICAgICAgIEVSUl9JTlRFUlJVUFRfQ09ORkxJQ1QgICAgICAgICAgID0gMHgyNiwNCisgICAgICAgIEVSUl9JTkNPTVBBVElCTEVfTUFDICAgICAgICAgICAgID0gMHgyNywNCisgICAgICAgIEVSUl9JTklUSUFMSVpBVElPTl9GQUlMRUQgICAgICAgID0gMHgyOCwNCisgICAgICAgIEVSUl9OT19CSU5ESU5HICAgICAgICAgICAgICAgICAgID0gMHgyOSwNCisgICAgICAgIEVSUl9ORVRXT1JLX01BWV9OT1RfQkVfQ09OTkVDVEVEID0gMHgyQSwNCisgICAgICAgIEVSUl9JTkNPTVBBVElCTEVfT1NfVkVSU0lPTiAgICAgID0gMHgyQiwNCisgICAgICAgIEVSUl9BTFJFQURZX1JFR0lTVEVSRUQgICAgICAgICAgID0gMHgyQywNCisgICAgICAgIEVSUl9QQVRIX05PVF9GT1VORCAgICAgICAgICAgICAgID0gMHgyRCwNCisgICAgICAgIEVSUl9JTlNVRkZJQ0lFTlRfTUVNT1JZICAgICAgICAgID0gMHgyRSwNCisgICAgICAgIEVSUl9JTkZPX05PVF9GT1VORCAgICAgICAgICAgICAgID0gMHgyRiwNCisgICAgICAgIEVSUl9HRU5FUkFMX0ZBSUxVUkUgICAgICAgICAgICAgID0gMHhGRg0KKyAgICAgIH0gTmRpc0Vycm9yOw0KKw0KKyNkZWZpbmUgTkRJU19QQVJBTV9JTlRFR0VSICAgMA0KKyNkZWZpbmUgTkRJU19QQVJBTV9TVFJJTkcgICAgMQ0KKw0KKyNkZWZpbmUgTkRJU19UWF9CVUZfTEVOR1RIICAgOA0KKyNkZWZpbmUgTkRJU19URF9CVUZfTEVOR1RIICAgMQ0KKyNkZWZpbmUgTkRJU19SWF9CVUZfTEVOR1RIICAgOA0KKw0KKyNkZWZpbmUgTkRJU19QVFJfUEhZU0lDQUwgICAgMA0KKyNkZWZpbmUgTkRJU19QVFJfVklSVFVBTCAgICAgMg0KKw0KKyNkZWZpbmUgTkRJU19QQVRIICAgICJQUk9UTUFOJCINCisNCisNCit0eXBlZGVmIHN0cnVjdCBfQ29tbW9uQ2hhcnMgew0KKyAgICAgICAgV09SRCAgdGFibGVTaXplOw0KKyAgICAgICAgQllURSAgbWFqb3JOZGlzVmVyc2lvbjsgICAgICAgIC8qIDIgLSBMYXRlc3QgdmVyc2lvbiAqLw0KKyAgICAgICAgQllURSAgbWlub3JOZGlzVmVyc2lvbjsgICAgICAgIC8qIDAgICAgICAgICAgICAgICAgICAqLw0KKyAgICAgICAgV09SRCAgcmVzZXJ2ZWQxOw0KKyAgICAgICAgQllURSAgbWFqb3JNb2R1bGVWZXJzaW9uOw0KKyAgICAgICAgQllURSAgbWlub3JNb2R1bGVWZXJzaW9uOw0KKyAgICAgICAgRFdPUkQgbW9kdWxlRmxhZ3M7DQorICAgICAgICAvKiAwIC0gQmluZGluZyBhdCB1cHBlciBib3VuZGFyeSBzdXBwb3J0ZWQNCisgICAgICAgICAqIDEgLSBCaW5kaW5nIGF0IGxvd2VyIGJvdW5kYXJ5IHN1cHBvcnRlZA0KKyAgICAgICAgICogMiAtIER5bmFtaWNhbGx5IGJvdW5kLg0KKyAgICAgICAgICogMy0zMSAtIFJlc2VydmVkLCBtdXN0IGJlIHplcm8uDQorICAgICAgICAgKi8NCisgICAgICAgIEJZVEUgIG1vZHVsZU5hbWVbMTZdOw0KKyAgICAgICAgQllURSAgcHJvdG9jb2xMZXZlbFVwcGVyOw0KKyAgICAgICAgLyogMSAtIE1BQw0KKyAgICAgICAgICogMiAtIERhdGEgTGluaw0KKyAgICAgICAgICogMyAtIE5ldHdvcmsNCisgICAgICAgICAqIDQgLSBUcmFuc3BvcnQNCisgICAgICAgICAqIDUgLSBTZXNzaW9uDQorICAgICAgICAgKiAtMSAtIE5vdCBzcGVjaWZpZWQNCisgICAgICAgICAqLw0KKyAgICAgICAgQllURSAgaW50ZXJmYWNlVXBwZXI7DQorICAgICAgICBCWVRFICBwcm90b2NvbExldmVsTG93ZXI7DQorICAgICAgICAvKiAwIC0gUGh5c2ljYWwNCisgICAgICAgICAqIDEgLSBNQUMNCisgICAgICAgICAqIDIgLSBEYXRhIExpbmsNCisgICAgICAgICAqIDMgLSBOZXR3b3JrDQorICAgICAgICAgKiA0IC0gVHJhbnNwb3J0DQorICAgICAgICAgKiA1IC0gU2Vzc2lvbg0KKyAgICAgICAgICogLTEgLSBOb3Qgc3BlY2lmaWVkDQorICAgICAgICAgKi8NCisgICAgICAgIEJZVEUgIGludGVyZmFjZUxvd2VyOw0KKyAgICAgICAgV09SRCAgbW9kdWxlSWQ7DQorICAgICAgICBXT1JEICBtb2R1bGVEUzsNCisgICAgICAgIFN5c3RlbVJlcXVlc3Qgc3lzdGVtUmVxdWVzdDsNCisgICAgICAgIEJZVEUgKnNlcnZpY2VDaGFyczsNCisgICAgICAgIEJZVEUgKnNlcnZpY2VTdGF0dXM7DQorICAgICAgICBCWVRFICp1cHBlckRpc3BhdGNoVGFibGU7DQorICAgICAgICBCWVRFICpsb3dlckRpc3BhdGNoVGFibGU7DQorICAgICAgICBCWVRFICpyZXNlcnZlZDI7ICAgICAgICAgICAgLyogTXVzdCBiZSBOVUxMICovDQorICAgICAgICBCWVRFICpyZXNlcnZlZDM7ICAgICAgICAgICAgLyogTXVzdCBiZSBOVUxMICovDQorICAgICAgfSBDb21tb25DaGFyczsNCisNCisNCit0eXBlZGVmIHN0cnVjdCBfTXVsdGljYXN0TGlzdCB7DQorICAgICAgICBXT1JEICAgbWF4TXVsdGljYXN0QWRkcmVzc2VzOw0KKyAgICAgICAgV09SRCAgIG51bWJlck11bHRpY2FzdEFkZHJlc3NlczsNCisgICAgICAgIEJZVEUgICBtdWx0aWNhc3RBZGRyZXNzWzE2XVsxNl07DQorICAgICAgfSBNdWx0aWNhc3RMaXN0Ow0KKw0KKw0KK3R5cGVkZWYgc3RydWN0IF9NYWNDaGFycyB7DQorICAgICAgICBXT1JEICAgdGFibGVTaXplOw0KKyAgICAgICAgQllURSAgIG1hY05hbWVbMTZdOw0KKyAgICAgICAgV09SRCAgIGFkZHJlc3NMZW5ndGg7DQorICAgICAgICBCWVRFICAgcGVybWFuZW50QWRkcmVzc1sxNl07DQorICAgICAgICBCWVRFICAgY3VycmVudEFkZHJlc3NbMTZdOw0KKyAgICAgICAgRFdPUkQgIGN1cnJlbnRGdW5jdGlvbmFsQWRkcmVzczsNCisgICAgICAgIE11bHRpY2FzdExpc3QgKm11bHRpY2FzdExpc3Q7DQorICAgICAgICBEV09SRCAgbGlua1NwZWVkOw0KKyAgICAgICAgRFdPUkQgIHNlcnZpY2VGbGFnczsNCisgICAgICAgIFdPUkQgICBtYXhGcmFtZVNpemU7DQorICAgICAgICBEV09SRCAgdHhCdWZmZXJTaXplOw0KKyAgICAgICAgV09SRCAgIHR4QnVmZmVyQWxsb2NTaXplOw0KKyAgICAgICAgRFdPUkQgIHJ4QnVmZmVyU2l6ZTsNCisgICAgICAgIFdPUkQgICByeEJ1ZmZlckFsbG9jU2l6ZTsNCisgICAgICAgIEJZVEUgICBpZWVlVmVuZG9yWzNdOw0KKyAgICAgICAgQllURSAgIHZlbmRvckFkYXB0ZXI7DQorICAgICAgICBCWVRFICAqdmVuZG9yQWRhcHRlckRlc2NyaXB0aW9uOw0KKyAgICAgICAgV09SRCAgIGludGVycnVwdExldmVsOw0KKyAgICAgICAgV09SRCAgIHR4UXVldWVEZXB0aDsNCisgICAgICAgIFdPUkQgICBtYXhEYXRhQmxvY2tzOw0KKyAgICAgIH0gTWFjQ2hhcnM7DQorDQorDQordHlwZWRlZiBzdHJ1Y3QgX1Byb3RvY29sQ2hhcnMgew0KKyAgICAgICAgV09SRCAgIGxlbmd0aDsNCisgICAgICAgIEJZVEUgICBuYW1lWzE2XTsNCisgICAgICAgIFdPUkQgICB0eXBlOw0KKyAgICAgIH0gUHJvdG9jb2xDaGFyczsNCisNCisNCit0eXBlZGVmIHN0cnVjdCBfTWFjVXBwZXJEaXNwYXRjaCB7DQorICAgICAgICBDb21tb25DaGFycyAgICAgICpiYWNrUG9pbnRlcjsNCisgICAgICAgIFJlcXVlc3QgICAgICAgICAgIHJlcXVlc3Q7DQorICAgICAgICBUcmFuc21pdENoYWluICAgICB0cmFuc21pdENoYWluOw0KKyAgICAgICAgVHJhbnNmZXJEYXRhICAgICAgdHJhbnNmZXJEYXRhOw0KKyAgICAgICAgUmVjZWl2ZVJlbGVhc2UgICAgcmVjZWl2ZVJlbGVhc2U7DQorICAgICAgICBJbmRpY2F0aW9uT24gICAgICBpbmRpY2F0aW9uT247DQorICAgICAgICBJbmRpY2F0aW9uT2ZmICAgICBpbmRpY2F0aW9uT2ZmOw0KKyAgICAgIH0gTWFjVXBwZXJEaXNwYXRjaDsNCisNCisNCit0eXBlZGVmIHN0cnVjdCBfTWFjU3RhdHVzVGFibGUgew0KKyAgICAgICAgV09SRCAgIHRhYmxlU2l6ZTsNCisgICAgICAgIERXT1JEICBsYXN0RGlhZzsNCisgICAgICAgIERXT1JEICBtYWNTdGF0dXM7DQorICAgICAgICBXT1JEICAgcGFja2V0RmlsdGVyOw0KKyAgICAgICAgQllURSAgKm1lZGlhU3BlY2lmaWNTdGF0czsNCisgICAgICAgIERXT1JEICBsYXN0Q2xlYXI7DQorICAgICAgICBEV09SRCAgdG90YWxGcmFtZXNSeDsNCisgICAgICAgIERXT1JEICB0b3RhbEZyYW1lc0NyYzsNCisgICAgICAgIERXT1JEICB0b3RhbEJ5dGVzUng7DQorICAgICAgICBEV09SRCAgdG90YWxEaXNjYXJkQnVmU3BhY2VSeDsNCisgICAgICAgIERXT1JEICB0b3RhbE11bHRpY2FzdFJ4Ow0KKyAgICAgICAgRFdPUkQgIHRvdGFsQnJvYWRjYXN0Ung7DQorICAgICAgICBEV09SRCAgb2Jzb2xldGUxWzVdOw0KKyAgICAgICAgRFdPUkQgIHRvdGFsRGlzY2FyZEh3RXJyb3JSeDsNCisgICAgICAgIERXT1JEICB0b3RhbEZyYW1lc1R4Ow0KKyAgICAgICAgRFdPUkQgIHRvdGFsQnl0ZXNUeDsNCisgICAgICAgIERXT1JEICB0b3RhbE11bHRpY2FzdFR4Ow0KKyAgICAgICAgRFdPUkQgIHRvdGFsQnJvYWRjYXN0VHg7DQorICAgICAgICBEV09SRCAgb2Jzb2xldGUyWzJdOw0KKyAgICAgICAgRFdPUkQgIHRvdGFsRGlzY2FyZFRpbWVvdXRUeDsNCisgICAgICAgIERXT1JEICB0b3RhbERpc2NhcmRId0Vycm9yVHg7DQorICAgICAgfSBNYWNTdGF0dXNUYWJsZTsNCisNCisNCit0eXBlZGVmIHN0cnVjdCBfUHJvdERpc3BhdGNoIHsNCisgICAgICAgIENvbW1vbkNoYXJzICpiYWNrUG9pbnRlcjsNCisgICAgICAgIERXT1JEICAgICAgICBmbGFnczsNCisgICAgICAgIC8qIDAgLSBoYW5kbGVzIG5vbi1MTEMgZnJhbWVzDQorICAgICAgICAgKiAxIC0gaGFuZGxlcyBzcGVjaWZpYy1MU0FQIExMQyBmcmFtZXMNCisgICAgICAgICAqIDIgLSBoYW5kbGVzIHNwZWNpZmljLUxTQVAgTExDIGZyYW1lcw0KKyAgICAgICAgICogMy0zMSAtIHJlc2VydmVkIG11c3QgYmUgMA0KKyAgICAgICAgICovDQorICAgICAgICB2b2lkICAoKnJlcXVlc3RDb25maXJtKSAodm9pZCk7DQorICAgICAgICB2b2lkICAoKnRyYW5zbWl0Q29uZmlybSkgKHZvaWQpOw0KKyAgICAgICAgdm9pZCAgKCpyZWNlaXZlTG9va2FoZWFkKSAodm9pZCk7DQorICAgICAgICB2b2lkICAoKmluZGljYXRpb25Db21wbGV0ZSkgKHZvaWQpOw0KKyAgICAgICAgdm9pZCAgKCpyZWNlaXZlQ2hhaW4pICh2b2lkKTsNCisgICAgICAgIHZvaWQgICgqc3RhdHVzKSAodm9pZCk7DQorICAgICAgfSBQcm90RGlzcGF0Y2g7DQorDQorDQordHlwZWRlZiBzdHJ1Y3QgX1JlcUJsb2NrIHsNCisgICAgICAgIFdPUkQgICAgICBvcGNvZGU7DQorICAgICAgICBXT1JEICAgICAgc3RhdHVzOw0KKyAgICAgICAgQllURSBGQVIgKnBvaW50ZXIxOw0KKyAgICAgICAgQllURSBGQVIgKnBvaW50ZXIyOw0KKyAgICAgICAgV09SRCAgICAgIHdvcmQxOw0KKyAgICAgIH0gUmVxQmxvY2s7DQorDQorDQordHlwZWRlZiBzdHJ1Y3QgX1R4QnVmRGVzY3JSZWMgew0KKyAgICAgICAgQllURSAgIHR4UHRyVHlwZTsNCisgICAgICAgIEJZVEUgICBkdW1teTsNCisgICAgICAgIFdPUkQgICB0eERhdGFMZW47DQorICAgICAgICBCWVRFICAqdHhEYXRhUHRyOw0KKyAgICAgIH0gVHhCdWZEZXNjclJlYzsNCisNCisNCit0eXBlZGVmIHN0cnVjdCBfVHhCdWZEZXNjciB7DQorICAgICAgICBXT1JEICAgICAgICAgIHR4SW1tZWRMZW47DQorICAgICAgICBCWVRFICAgICAgICAgKnR4SW1tZWRQdHI7DQorICAgICAgICBXT1JEICAgICAgICAgIHR4RGF0YUNvdW50Ow0KKyAgICAgICAgVHhCdWZEZXNjclJlYyB0eEJ1ZkRlc2NyUmVjW05ESVNfVFhfQlVGX0xFTkdUSF07DQorICAgICAgfSBUeEJ1ZkRlc2NyOw0KKw0KKw0KK3R5cGVkZWYgc3RydWN0IF9UREJ1ZkRlc2NyUmVjIHsNCisgICAgICAgIEJZVEUgICB0RFB0clR5cGU7DQorICAgICAgICBCWVRFICAgZHVtbXk7DQorICAgICAgICBXT1JEICAgdEREYXRhTGVuOw0KKyAgICAgICAgQllURSAgKnRERGF0YVB0cjsNCisgICAgICB9IFREQnVmRGVzY3JSZWM7DQorDQorDQordHlwZWRlZiBzdHJ1Y3QgX1REQnVmRGVzY3Igew0KKyAgICAgICAgV09SRCAgICAgICAgICB0RERhdGFDb3VudDsNCisgICAgICAgIFREQnVmRGVzY3JSZWMgdERCdWZEZXNjclJlY1tORElTX1REX0JVRl9MRU5HVEhdOw0KKyAgICAgIH0gVERCdWZEZXNjcjsNCisNCisNCit0eXBlZGVmIHN0cnVjdCBfUnhCd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EhlYWRlciB7DQorICAgICAgICBCWVRFICBkc2FwOyAgICAgICAgICAgICAgICAgICAgICAvKiAweEFBICovDQorICAgICAgICBCWVRFICBzc2FwOyAgICAgICAgICAgICAgICAgICAgICAvKiAweEFBICovDQorICAgICAgICBCWVRFICBjb250cm9sOyAgICAgICAgICAgICAgICAgICAvKiAzICAgICovDQorICAgICAgICBCWVRFIHByb3RvY29sSWRbNV07DQorICAgICAgfSBJZWVlODAyRG90MlNuYXBIZWFkZXI7DQorDQorDQorLyoNCisgKiAgUHJvdG90eXBlcw0KKyAqLw0KK2V4dGVybiBjaGFyICpOZGlzTGFzdEVycm9yICAgICAgICAodm9pZCk7DQorZXh0ZXJuIGludCAgIE5kaXNPcGVuICAgICAgICAgICAgICh2b2lkKTsNCitleHRlcm4gaW50ICAgTmRpc0luaXQgICAgICAgICAgICAgKGludCBwcm9taXMpOw0KK2V4dGVybiBpbnQgICBOZGlzUmVnaXN0ZXJBbmRCaW5kICAoaW50IHByb21pcyk7DQorZXh0ZXJuIHZvaWQgIE5kaXNTaHV0ZG93biAgICAgICAgICh2b2lkKTsNCitleHRlcm4gdm9pZCAgTmRpc0NoZWNrTWFjRmVhdHVyZXMgKHN0cnVjdCBfQ2FyZEhhbmRsZSAqY2FyZCk7DQorZXh0ZXJuIGludCAgIE5kaXNTZW5kUGFja2V0ICAgICAgIChzdHJ1Y3QgX1BrdEJ1ZiAqcGt0QnVmLCBpbnQgbWFjSWQpOw0KKw0KKy8qDQorICogIEFzc2VtYmx5ICJnbHVlIiBmdW5jdGlvbnMNCisgKi8NCitleHRlcm4gaW50IHN5c3RlbVJlcXVlc3RHbHVlKCk7DQorZXh0ZXJuIGludCByZXF1ZXN0Q29uZmlybUdsdWUoKTsNCitleHRlcm4gaW50IHRyYW5zbWl0Q29uZmlybUdsdWUoKTsNCitleHRlcm4gaW50IHJlY2VpdmVMb29rYWhlYWRHbHVlKCk7DQorZXh0ZXJuIGludCBpbmRpY2F0aW9uQ29tcGxldGVHbH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NQcm9jICAgICAgICAgOiBuZWFyDQorRVhUUk4gX05kaXNBbGxvY1N0YWNrICAgICAgICAgOiBuZWFyDQorRVhUUk4gX05kaXNGcmVlU3RhY2sgICAgICAgICAgOiBuZWFyDQorDQorOw0KKzsgKkFMTCogaW50ZXJydXB0IHRocmVhZHMgY29tZSB0aHJvdWdoIHRoaXMgbWFjcm8uDQorOw0KK0NBTExCQUNLIG1hY3JvIGNhbGxiYWNrUHJvYywgYXJnc1NpemUNCisNCisgICAgIHB1c2hmDQorICAgICBQVVNIUkVHUyAgICAgICAgICAgICAgICA7OyBTYXZlIHRoZSByZWdpc3RlcnMNCisNCisgICAgIHB1c2ggZXMNCisgICAgIHB1c2ggZHMNCisgICAgIG1vdiAgYXgsQ0JfRFNFRyAgICAgICAgIDs7IExvYWQgRFMNCisgICAgIG1vdiAgZHMsYXgNCisgICAgIGNhbGwgX05kaXNBbGxvY1N0YWNrICAgIDs7IEdldCBhbmQgaW5zdGFsbCBhIHN0YWNrLg0KKw0KKyAgICAgbW92ICBieCxzcyAgICAgICAgICAgICAgOzsgU2F2ZSBvZmYgdGhlIG9sZCBzdGFjayBpbiBvdGhlciByZWdzDQorICAgICBtb3YgIGN4LHNwDQorICAgICBtb3YgIHNzLGR4ICAgICAgICAgICAgICA7OyBJbnN0YWxsIHRoZSBuZXcgb25lDQorICAgICBtb3YgIHNwLGF4DQorICAgICBwdXNoIGJ4ICAgICAgICAgICAgICAgICA7OyBTYXZlIHRoZSBvbGQgb25lIG9uIHRvIHRoZSBuZXcgc3RhY2sNCisgICAgIHB1c2ggY3gNCisgICAgIHN1YiAgc3AsJmFyZ3NTaXplICAgICAgIDs7IEFsbG9jYXRlIHNwYWNlIGZvciBhcmd1bWVudHMgb24gdGhlIHN0YWNrDQorDQorICAgICBtb3YgIGF4LHNzICAgICAgICAgICAgICA7OyBTZXQgdXAgdGhlIGRlc3RpbmF0aW9uIGZvciB0aGUgbW92ZQ0KKyAgICAgbW92ICBlcyxheA0KKyAgIC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GludCBzaXplKTsNCis7DQorDQoraWZkZWYgRE9TWA0KKyAgUFVCUFJPQyBOZGlzR2V0TGlua2FnZQ0KKyAgICAgICAgICBwdXNoIGVieA0KKyAgICAgICAgICBtb3YgZWJ4LCBbZXNwKzhdICAgICAgICAgICAgICA7IGRldmljZSBoYW5kbGUNCisgICAgICAgICAgbW92IGVheCwgNDQwMmggICAgICAgICAgICAgICAgOyBJT0NUUkwgcmVhZCBmdW5jdGlvbg0KKyAgICAgICAgICBtb3YgZWR4LCBbZXNwKzEyXSAgICAgICAgICAgICA7IERTOkVEWCAtPiByZXN1bHQgZGF0YQ0KKyAgICAgICAgICBtb3YgZWN4LCBbZXNwKzE2XSAgICAgICAgICAgICA7IEVDWCA9IGxlbmd0aA0KKyAgICAgICAgICBpbnQgMjFoDQorICAgICAgICAgIHBvcCBlYngNCisgICAgICAgICAgamMgIEBmYWlsDQorICAgICAgICAgIHhvciBlYXgsIGVheA0KKyAgQGZhaWw6ICByZXQNCisNCitlbHNlDQorICBQVUJQUk9DIE5kaXNHZXRMaW5rYWdlDQorICAgICAgICAgIGVudGVyIDAsIDANCisgICAgICAgICAgbW92IGJ4LCBbYnArNl0NCisgICAgICAgICAgbW92IGF4LCA0NDAyaA0KKyAgICAgICAgICBtb3YgZHgsIFticCs4XQ0KKyAgICAgICAgICBtb3YgY3gsIFticCsxMl0NCisgICAgICAgICAgaW50IDIxaA0KKyAgICAgICAgICBqYyAgQGZhaWwNCisgICAgICAgICAgeG9yIGF4LCBheA0KKyAgQGZhaWw6ICBsZWF2ZQ0KKyAgICAgICAgICByZXRmDQorZW5kaWYNCisNCitFTkRTDQorDQorRU5EDQpkaWZmIC0tZ2l0IGEvbXNkb3MvcGt0X3J4MC5hc20gYi9tc2Rvcy9wa3RfcngwLmFzbQpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi45NGYzZDA5Ci0tLSAvZGV2L251bGwKKysrIGIvbXNkb3MvcGt0X3J4MC5hc20KQE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ORFMNCisgIERfU0VHICAgRVFVIDxfREFUQSBTRUdNRU5UPg0KKyAgRF9FTkQgICBFUVUgPF9EQVRBIEVORFM+DQorICBBU1NVTUUgIENTOl9URVhULERTOl9EQVRBDQorZW5kaWYNCisNCis7LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KKw0KK0RfU0VHDQorDQorUlhfRUxFTUVOVCAgICAgU1RSVUMNCisgICBmaXJzdENvdW50ICBkdyAgMCAgICAgICAgICAgICAgICAgICAgICAgICAgOyAjIG9mIGJ5dGVzIG9uIDFzdCBjYWxsDQorICAgc2Vjb25kQ291bnQgZHcgIDAgICAgICAgICAgICAgICAgICAgICAgICAgIDsgIyBvZiBieXRlcyBvbiAybmQgY2FsbA0KKyAgIGhhbmRsZSAgICAgIGR3ICAwICAgICAgICAgICAgICAgICAgICAgICAgICA7IGhhbmRsZSBmb3IgdXBjYWxsDQorICAgZGVzdGluQWRyICAgZGIgIDYgICAgICAgICAgIGR1cCAoMCkgICAgICAgIDsgcGFja2V0IGRlc3RpbmF0aW9uIGFkZHJlc3MNCisgICBzb3VyY2VBZHIgICBkYiAgNiAgICAgICAgICAgZHVwICgwKSAgICAgICAgOyBwYWNrZXQgc291cmNlIGFkZHJlc3MNCisgICBwcm90b2NvbCAgICBkdyAgMCAgICAgICAgICAgICAgICAgICAgICAgICAgOyBwYWNrZXQgcHJvdG9jb2wgbnVtYmVyDQorICAgcnhCdWZmZXIgICAgZGIgIFJYX0JVRl9TSVpFIGR1cCAoMCkgICAgICAgIDsgUlggYnVmZmVyDQorRU5EUw0KKyAgICAgICAgICAgICAgIGFsaWduIDQNCitfcnhPdXRPZnMgICAgICBkdyAgb2Zmc2V0IF9wa3RSeEJ1ZiAgICAgICAgICAgOyByaW5nIGJ1ZmZlciBvZmZzZXRzDQorX3J4SW5PZnMgICAgICAgZHcgIG9mZnNldCBfcGt0UnhCdWYgICAgICAgICAgIDsgaW50byBfcGt0UnhCdWYNCitfcGt0RHJvcCAgICAgICBkdyAgMCwwICAgICAgICAgICAgICAgICAgICAgICAgOyBwYWNrZXQgZHJvcCBjb3VudGVyDQorX3BrdFRlbXAgICAgICAgZGIgIDIwICAgICAgICAgICAgICAgIGR1cCAoMCkgIDsgdGVtcCB3b3JrIGFyZWENCitfcGt0VHhCdWYgICAgICBkYiAgKFRYX0JVRl9TSVpFKzE0KSAgZHVwICgwKSAgOyBUWCBidWZmZXINCitfcGt0UnhCdWYgICAgICBSWF9FTEVNRU5UIE5VTV9SWF9CVUYgZHVwICg8PikgOyBSWCBzdHJ1Y3R1cmVzDQorIExBU1RfT0ZTICAgICAgPSBvZmZzZXQgJA0KKw0KKyBzY3JlZW5TZWcgICAgIGR3ICAwQjgwMGgNCisgbmV3SW5PZmZzZXQgICBkdyAgMA0KKw0KKyBmYW5DaGFycyAgICAgIGRiICAnLVx8LycNCisgZmFuSW5kZXggICAgICBkdyAgMA0KKw0KK0RfRU5EDQorDQorX1RFWFQgU0VHTUVOVA0KKw0KKw0KK1NIT1dfUlggIE1BQ1JPDQorICAgICAgICAgcHVzaCBlcw0KKyAgICAgICAgIHB1c2ggYngNCisgICAgICAgICBtb3YgYngsIHNjcmVlblNlZw0KKyAgICAgICAgIG1vdiBlcywgYnggICAgICAgICAgICAgICAgICAgIDs7IHItbW9kZSBzZWdtZW50IG9mIGNvbG91ciBzY3JlZW4NCisgICAgICAgICBtb3YgZGksIDE1OCAgICAgICAgICAgICAgICAgICA7OyB1cHBlciByaWdodCBjb3JuZXIgLSAxDQorICAgICAgICAgbW92IGJ4LCBmYW5JbmRleA0KKyAgICAgICAgIG1vdiBhbCwgZmFuQ2hhcnNbYnhdICAgICAgICAgIDs7IGdldCB3cml0ZSBjaGFyDQorICAgICAgICAgbW92IGFoLCAxNSAgICAgICAgICAgICAgICAgICAgOzsgIGFuZCB3aGl0ZSBjb2xvdXINCisgICAgICAgICBzdG9zdyAgICAgICAgICAgICAgICAgICAgICAgICA7OyB3cml0ZSB0byBzY3JlZW4gYXQgRVM6RURJDQorICAgICAgICAgaW5jIGZhbkluZGV4ICAgICAgICAgICAgICAgICAgOzsgdXBkYXRlIG5leHQgaW5kZXgNCisgICAgICAgICBhbmQgZmFuSW5kZXgsIDMNCisgICAgICAgICBwb3AgYngNCisgICAgICAgICBwb3AgZXMNCitFTkRNDQorDQorOy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KKzsNCis7IFRoaXMgbWFjcm8gcmV0dXJuIEVTOkRJIHRvIHRhaWwgb2YgUnggcXVldWUNCisNCitFTlFVRVVFICBNQUNSTw0KKyAgICAgICAgIExPQ0FMIEBub1dyYXANCisgICAgICAgICBtb3YgYXgsIF9yeEluT2ZzICAgICAgICAgICAgICA7OyBESSA9IGN1cnJlbnQgaW4tb2Zmc2V0DQorICAgICAgICAgYWRkIGF4LCBTSVpFIFJYX0VMRU1FTlQgICAgICAgOzsgcG9pbnQgdG8gbmV4dCBfcGt0UnhCdWYgYnVmZmVyDQorICAgICAgICAgY21wIGF4LCBMQVNUX09GUyAgICAgICAgICAgICAgOzsgcG9pbnRpbmcgcGFzdCBsYXN0ID8NCisgICAgICAgICBqYiAgQG5vV3JhcCAgICAgICAgICAgICAgICAgICA7OyBubyAtIGp1bXANCisgICAgICAgICBsZWEgYXgsIF9wa3RSeEJ1ZiAgICAgICAgICAgICA7OyB5ZXMsIHBvaW50IHRvIDFzdCBidWZmZXINCisgICAgICAgICBhbGlnbiA0DQorQG5vV3JhcDogY21wIGF4LCBfcnhPdXRPZnMgICAgICAgICAgICAgOzsgaW4tb2ZzID0gb3V0LW9mcyA/DQorICAgICAgICAgamUgIEBkdW1wICAgICAgICAgICAgICAgICAgICAgOzsgeWVzLCBxdWV1ZSBpcyBmdWxsDQorICAgICAgICAgbW92IGRpLCBfcnhJbk9mcyAgICAgICAgICAgICAgOzsgRVM6RE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W25dLnJ4QnVmZmVyW0NYXS4gVGhlc2UgdmFsdWVzIGFyZSBjaGVja2VkIGluICJQa3RSZWNlaXZlIg0KKzsgKFBLVERSVlIuQykNCis7DQorOy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQ0KKw0KK19Qa3RSZWNlaXZlcjoNCisgICAgICAgICBwdXNoZg0KKyAgICAgICAgIGNsaSAgICAgICAgICAgICAgICAgICAgICAgICA7IG5vIGRpc3RyYWN0aW9uIHdhbnRlZCAhDQorICAgICAgICAgcHVzaCBkcw0KKyAgICAgICAgIHB1c2ggYngNCitpZmRlZiBET1NYDQorICAgICAgICAgbW92IGJ4LCBjcw0KK2Vsc2UNCisgICAgICAgICBtb3YgYngsIFNFRyBfREFUQQ0KK2VuZGlmDQorICAgICAgICAgbW92IGRzLCBieA0KKyAgICAgICAgIG1vdiBlcywgYnggICAgICAgICAgICAgICAgICA7IEVTID0gRFMgPSBDUyBvciBzZWcgX0RBVEENCisgICAgICAgICBwb3AgYnggICAgICAgICAgICAgICAgICAgICAgOyByZXN0b3JlIGhhbmRsZQ0KKw0KKyAgICAgICAgIGNtcCBheCwgMCAgICAgICAgICAgICAgICAgICA7IGZpcnN0IGNhbGw/IChBWD0wKQ0KKyAgICAgICAgIGpuZSBAcG9zdCAgICAgICAgICAgICAgICAgICA7IEFYPTE6IHNlY29uZCBjYWxsLCBkbyBwb3N0IHByb2Nlc3MNCisNCitpZmRlZiBERUJVRw0KKyAgICAgICAgIFNIT1dfUlggICAgICAgICAgICAgICAgICAgICA7IHNob3cgdGhhdCBhIHBhY2tldCBpcyByZWNlaXZlZA0KK2VuZGlmDQorICAgICAgICAgY21wIGN4LCBSWF9CVUZfU0laRSsxNCAgICAgIDsgc2l6ZSBPSyA/DQorICAgICAgICAgamEgIEBza2lwICAgICAgICAgICAgICAgICAgIDsgbm8sIHBhY2tldCB0byBsYXJnZSBmb3IgdXMNCisNCisgICAgICAgICBFTlFVRVVFICAgICAgICAgICAgICAgICAgICAgOyBFUzpESSAtPiBfcGt0UnhCdWZbbl0NCisNCisgICAgICAgICBtb3YgW2RpXS5maXJzdENvdW50LCBjeCAgICAgOyByZW1lbWJlciB0aGUgZmlyc3QgY291bnQuDQorICAgICAgICAgbW92IFtkaV0uaGFuZGxlLCBieCAgICAgICAgIDsgcmVtZW1iZXIgdGhlIGhhbmRsZS4NCisgICAgICAgICBhZGQgZGksIDYgICAgICAgICAgICAgICAgICAgOyBFUzpESSAtPiBfcGt0UnhCdWZbbl0uZGVzdGluQWRyDQorICAgICAgICAgcG9wIGRzDQorICAgICAgICAgcG9wZg0KKyAgICAgICAgIHJldGYgICAgICAgICAgICAgICAgICAgICAgICA7IGZhciByZXR1cm4gdG8gZHJpdmVyIHdpdGggRVM6REkNCisNCisgICAgICAgICBhbGlnbiA0DQorQGR1bXA6ICAgaW5jIF9wa3REcm9wWzBdICAgICAgICAgICAgIDsgZGlzY2FyZCB0aGUgcGFja2V0IG9uIDFzdCBjYWxsDQorICAgICAgICAgYWRjIF9wa3REcm9wWzJdLCAwICAgICAgICAgIDsgaW5jcmVtZW50IHBhY2tldHMgbG9zdA0KKw0KK0Bza2lwOiAgIHhvciBkaSwgZGkgICAgICAgICAgICAgICAgICA7IHJldHVybiBFUzpESSA9IE5JTCBwb2ludGVyDQorICAgICAgICAgeG9yIGF4LCBheA0KKyAgICAgICAgIG1vdiBlcywgYXgNCisgICAgICAgICBwb3AgZHMNCisgICAgICAgICBwb3BmDQorICAgICAgICAgcmV0Zg0KKw0KKyAgICAgICAgIGFsaWduIDQNCitAcG9zdDogICBvciBzaSwgc2kgICAgICAgICAgICAgICAgICAgOyBEUzpTSS0+X3BrdFJ4QnVmW25dW25dLmRlc3RpbkFkcg0KKyAgICAgICAgIGp6IEBkaXNjYXJkICAgICAgICAgICAgICAgICA7IG1ha2Ugc3VyZSB3ZSBkb24ndCB1c2UgTlVMT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TNEdXIHRhcmdldHMNCis7DQorOyB0aGVzZSBzaXplcyBNVVNUIGJlIGVxdWFsIHRvIHRoZSBzaXplcyBpbiBQS1REUlZSLkgNCis7DQorJWRlZmluZSAgRVRIX01UVSAgICAgMTUwMCAgICAgICAgICAgICAgICAgIDsgbWF4IGRhdGEgc2l6ZSBvbiBFdGhlcm5ldA0KKyVkZWZpbmUgIEVUSF9NSU4gICAgIDYwICAgICAgICAgICAgICAgICAgICA7IG1pbi9tYXggdG90YWwgZnJhbWUgc2l6ZQ0KKyVkZWZpbmUgIEVUSF9NQVggICAgIChFVEhfTVRVKzIqNisyKQ0KKyVkZWZpbmUgIE5VTV9SWF9CVUYgIDMyICAgICAgICAgICAgICAgICAgICA7ICMgb2YgUlggZWxlbWVudCBidWZmZXJzDQorJWRlZmluZSAgUlhfU0laRSAgICAgKEVUSF9NQVgrNikgICAgICAgICAgIDsgc2l6ZW9mKFJYX0VMRU1FTlQpID0gMTUxNCs2DQorJWlkZWZpbmUgb2Zmc2V0DQorDQorc3RydWMgUlhfRUxFTUVOVA0KKyAgICAgIC5maXJzdENvdW50ICByZXN3IDEgICAgICAgICAgICAgICAgICA7ICMgb2YgYnl0ZXMgb24gMXN0IGNhbGwNCisgICAgICAuc2Vjb25kQ291bnQgcmVzdyAxICAgICAgICAgICAgICAgICAgOyAjIG9mIGJ5dGVzIG9uIDJuZCBjYWxsDQorICAgICAgLmhhbmRsZSAgICAgIHJlc3cgMSAgICAgICAgICAgICAgICAgIDsgaGFuZGxlIGZvciB1cGNhbGwNCisgICAgOyAudGltZVN0YW1wICAgcmVzdyA0ICAgICAgICAgICAgICAgICAgOyA2NC1iaXQgUkRUU0MgdmFsdWUNCisgICAgICAuZGVzdGluQWRyICAgcmVzYiA2ICAgICAgICAgICAgICAgICAgOyBwYWNrZXQgZGVzdGluYXRpb24gYWRkcmVzcw0KKyAgICAgIC5zb3VyY2VBZHIgICByZXNiIDYgICAgICAgICAgICAgICAgICA7IHBhY2tldCBzb3VyY2UgYWRkcmVzcw0KKyAgICAgIC5wcm90b2NvbCAgICByZXN3IDEgICAgICAgICAgICAgICAgICA7IHBhY2tldCBwcm90b2NvbCBudW1iZXINCisgICAgICAucnhCdWZmZXIgICAgcmVzYiBFVEhfTVRVICAgICAgICAgICAgOyBSWCBidWZmZXINCitlbmRzdHJ1Yw0KKw0KKzstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tDQorDQorW29yZyAwXSAgOyBhc3NlbWJsZSB0byAuYmluIGZpbGUNCisNCitfcnhPdXRPZnMgICBkdyAgIG9mZnNldCBfcGt0UnhCdWYgICAgICAgICAgOyByaW5nIGJ1ZmZlciBvZmZzZXRzDQorX3J4SW5PZnMgICAgZHcgICBvZmZzZXQgX3BrdFJ4QnVmICAgICAgICAgIDsgaW50byBfcGt0UnhCdWYNCitfcGt0RHJvcCAgICBkdyAgIDAsMCAgICAgICAgICAgICAgICAgICAgICAgOyBwYWNrZXQgZHJvcCBjb3VudGVyDQorX3BrdFRlbXAgICAgcmVzYiAyMCAgICAgICAgICAgICAgICAgICAgICAgIDsgdGVtcCB3b3JrIGFyZWENCitfcGt0VHhCdWYgICByZXNiIChFVEhfTUFYKSAgICAgICAgICAgICAgICAgOyBUWCBidWZmZXINCitfcGt0UnhCdWYgICByZXNiIChSWF9TSVpFKk5VTV9SWF9CVUYpICAgICAgOyBSWCBzdHJ1Y3R1cmVzDQorIExBU1RfT0ZTICAgZXF1ICAkDQorDQorc2NyZWVuU2VnICAgZHcgIDBCODAwaA0KK25ld0luT2Zmc2V0IGR3ICAwDQorDQorZmFuQ2hhcnMgICAgZGIgICctXHwvJw0KK2ZhbkluZGV4ICAgIGR3ICAwDQorDQorJW1hY3JvIFNIT1dfUlggMA0KKyAgICAgICBwdXNoIGVzDQorICAgICAgIHB1c2ggYngNCisgICAgICAgbW92IGJ4LCBbc2NyZWVuU2VnXQ0KKyAgICAgICBtb3YgZXMsIGJ4ICAgICAgICAg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bXAgYXgsIDAgICAgICAgICAgICAgICAgICAgOyBmaXJzdCBjYWxsPyAoQVg9MCkNCisgICAgICAgICBqbmUgQHBvc3QgICAgICAgICAgICAgICAgICAgOyBBWD0xOiBzZWNvbmQgY2FsbCwgZG8gcG9zdCBwcm9jZXNzDQorDQorJWlmZGVmIERFQlVHDQorICAgICAgICAgU0hPV19SWCAgICAgICAgICAgICAgICAgICAgIDsgc2hvdyB0aGF0IGEgcGFja2V0IGlzIHJlY2VpdmVkDQorJWVuZGlmDQorDQorICAgICAgICAgY21wIGN4LCBFVEhfTUFYICAgICAgICAgICAgIDsgc2l6ZSBPSyA/DQorICAgICAgICAgamEgIEBza2lwICAgICAgICAgICAgICAgICAgIDsgbm8sIHRvbyBiaWcNCisNCisgICAgICAgICBtb3YgYXgsIFtfcnhJbk9mc10NCisgICAgICAgICBhZGQgYXgsIFJYX1NJWkUNCisgICAgICAgICBjbXAgYXgsIExBU1RfT0ZTDQorICAgICAgICAgamIgIEBub1dyYXANCisgICAgICAgICBtb3YgYXgsIG9mZnNldCBfcGt0UnhCdWYNCitAbm9XcmFwOg0KKyAgICAgICAgIGNtcCBheCwgW19yeE91dE9mc10NCisgICAgICAgICBqZSAgQGR1bXANCisgICAgICAgICBtb3YgZGksIFtfcnhJbk9mc10gICAgICAgICAgOyBFUzpESSAtPiBfcGt0UnhCdWZbbl0NCisgICAgICAgICBtb3YgW25ld0luT2Zmc2V0XSwgYXgNCisNCisgICAgICAgICBtb3YgW2RpXSwgY3ggICAgICAgICAgICAgICAgOyByZW1lbWJlciBmaXJzdENvdW50Lg0KKyAgICAgICAgIG1vdiBbZGkrNF0sIGJ4ICAgICAgICAgICAgICA7IHJlbWVtYmVyIGhhbmRsZS4NCisgICAgICAgICBhZGQgZGksIDYgICAgICAgICAgICAgICAgICAgOyBFUzpESSAtPiBfcGt0UnhCdWZbbl0uZGVzdGluQWRyDQorICAgICAgICAgcG9wIGRzDQorICAgICAgICAgcG9wZg0KKyAgICAgICAgIHJldGYgICAgICAgICAgICAgICAgICAgICAgICA7IGZhciByZXR1cm4gdG8gZHJpdmVyIHdpdGggRVM6REkNCisNCitAZHVtcDogICBhZGQgd29yZCBbX3BrdERyb3ArMF0sIDEgICAgOyBkaXNjYXJkIHRoZSBwYWNrZXQgb24gMXN0IGNhbGwNCisgICAgICAgICBhZGMgd29yZCBbX3BrdERyb3ArMl0sIDAgICAgOyBpbmNyZW1lbnQgcGFja2V0cyBsb3N0DQorDQorQHNraXA6ICAgeG9yIGRpLCBkaSAgICAgICAgICAgICAgICAgIDsgcmV0dXJuIEVTOkRJID0gTklMIHBvaW50ZXINCisgICAgICAgICB4b3IgYXgsIGF4DQorICAgICAgICAgbW92IGVzLCBheA0KKyAgICAgICAgIHBvcCBkcw0KKyAgICAgICAgIHBvcGYNCisgICAgICAgICByZXRmDQorDQorQHBvc3Q6ICAgb3Igc2ksIHNpICAgICAgICAgICAgICAgICAgIDsgRFM6U0ktPl9wa3RSeEJ1ZltuXVtuXS5kZXN0aW5BZHINCisgICAgICAgICBqeiBAZGlzY2FyZCAgICAgICAgICAgICAgICAgOyBtYWtlIHN1cmUgd2UgZG9uJ3QgdXNlIE5VTEwtcG9pbnRlcg0KKw0KKyAgICAgICA7DQorICAgICAgIDsgcHVzaCBzaQ0KKyAgICAgICA7IGNhbGwgYnBmX2ZpbHRlcl9tYXRjaCAgICAgICA7IHJ1biB0aGUgZmlsdGVyIGhlcmUgc29tZSBkYXkNCisgICAgICAgOyBwb3Agc2kNCisgICAgICAgOyBjbXAgYXgsIDANCisgICAgICAgOyBqZSAgQGRpc2NhcmQNCisNCisgICAgICAgICBtb3YgW3NpLTYrMl0sIGN4ICAgICAgICAgICAgOyBzdG9yZSBfcGt0UnhCdWZbbl0uc2Vjb25kQ291bnQNCisgICAgICAgICBtb3YgYXgsIFtuZXdJbk9mZnNldF0NCisgICAgICAgICBtb3YgW19yeEluT2ZzXSwgYXggICAgICAgICAgOyB1cGRhdGUgX3BrdFJ4QnVmIGlucH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ZmljYXRpb24uIHJldiAxLjA5DQorICogICAgICAgICAgICAgICAgIEZUUCBTb2Z0d2FyZSBJbmMuDQorICoNCisgKi8NCisNCisjaW5jbHVkZSA8c3RkaW8uaD4NCisjaW5jbHVkZSA8c3RkbGliLmg+DQorI2luY2x1ZGUgPHN0cmluZy5oPg0KKyNpbmNsdWRlIDxkb3MuaD4NCisNCisjaW5jbHVkZSAiZ251Yy5oIg0KKyNpbmNsdWRlICJwY2FwLWRvcy5oIg0KKyNpbmNsdWRlICJwY2FwLWludC5oIg0KKyNpbmNsdWRlICJtc2Rvcy9wa3RkcnZyLmgiDQorDQorI2lmIChET1NYKQ0KKyNkZWZpbmUgTlVNX1JYX0JVRiAgMzIgICAgICAvKiAjIG9mIGJ1ZmZlcnMgaW4gUnggRklGTyBxdWV1ZSAqLw0KKyNlbHNlDQorI2RlZmluZSBOVU1fUlhfQlVGICAxMA0KKyNlbmRpZg0KKw0KKyNkZWZpbmUgRElNKHgpICAgKHNpemVvZigoeCkpIC8gc2l6ZW9mKHhbMF0pKQ0KKyNkZWZpbmUgUFVUUyhzKSAgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcDQorICAgICAgICAgICAgICAgICAgIGlmICghcGt0SW5mby5xdWlldCkgICAgICAgICAgICAgICAgICAgICAgICAgIFwNCisgICAgICAgICAgICAgICAgICAgICAgcGt0SW5mby5lcnJvciA/ICAgICAgICAgICAgICAgICAgICAgICAgICAgXA0KKyAgICAgICAgICAgICAgICAgICAgICAgIHByaW50ZiAoIiVzOiAlc1xuIiwgcywgcGt0SW5mby5lcnJvcikgOiBcDQorICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRmICgiJXNcbiIsIHBrdEluZm8uZXJyb3IgPSBzKTsgICAgIFwNCisgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApDQorDQorI2lmIGRlZmluZWQoX19ISUdIQ19fKQ0KKyAgZXh0ZXJuIFVJTlQgX213ZW52Ow0KKw0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YSAgKi8NCisNCisgICNkZWZpbmUgRklSU1RfUlhfQlVGIChXT1JEKSAmcGt0UnhCdWYgWzBdDQorICAjZGVmaW5lIExBU1RfUlhfQlVGICAoV09SRCkgJnBrdFJ4QnVmIFtOVU1fUlhfQlVGLTFdDQorI2VuZGlmDQorDQorDQorI2lmZGVmIF9fQk9STEFORENfXyAgICAgICAgICAgLyogVXNlIEJvcmxhbmQncyBpbmxpbmUgZnVuY3Rpb25zICovDQorICAjZGVmaW5lIG1lbWNweSAgX19tZW1jcHlfXw0KKyAgI2RlZmluZSBtZW1jbXAgIF9fbWVtY21wX18NCisgICNkZWZpbmUgbWVtc2V0ICBfX21lbXNldF9fDQorI2VuZGlmDQorDQorDQorI2lmIChET1NYICYgUEhBUkxBUCkNCisgIGV4dGVybiB2b2lkIFBrdFJlY2VpdmVyICh2b2lkKTsgICAgIC8qIGluIHBrdF9yeDAuYXNtICovDQorICBzdGF0aWMgaW50ICBSZWFsQ29weSAgICAoVUxPTkcsIFVMT05HLCBSRUFMUFRSKiwgRkFSUFRSKiwgVVNIT1JUKik7DQorDQorICAjdW5kZWYgIEZQX1NFRw0KKyAgI3VuZGVmICBGUF9PRkYNCisgICNkZWZpbmUgRlBfT0ZGKHgpICAgICAoKFdPUkQpKHgpKQ0KKyAgI2RlZmluZSBGUF9TRUcoeCkgICAgICgoV09SRCkocmVhbEJhc2UgPj4gMTYpKQ0KKyAgI2RlZmluZSBET1NfQUREUihzLG8pICgoKERXT1JEKShzKSA8PCAxNikgKyAoV09SRCkobykpDQorICAjZGVmaW5lIHJfYXggICAgICAgICAgZWF4DQorICAjZGVmaW5lIHJfYnggICAgICAgICAgZWJ4DQorICAjZGVmaW5lIHJfZHggICAgICAgICAgZWR4DQorICAjZGVmaW5lIHJfY3ggICAgICAgICAgZWN4DQorICAjZGVmaW5lIHJfc2kgICAgICAgICAgZXNpDQorICAjZGVmaW5lIHJfZGkgICAgICAgICAgZWRpDQorICAjZGVmaW5lIHJfZHMgICAgICAgICAgZHMNCisgICNkZWZpbmUgcl9lcyAgICAgICAgICBlcw0KKyAgTE9DQUwgRkFSUFRSICAgICAgICAgIHByb3RCYXNlOw0KKyAgTE9DQUwgUkVBTFBUUiAgICAgICAgIHJlYWxCYXNlOw0KKyAgTE9DQUwgV09SRCAgICAgICAgICAgIHJlYWxTZWc7ICAgLyogRE9TIHBhcmEtYWRkcmVzcyBvZiBhbGxvY2F0ZWQgYXJlYSAqLw0KKyAgTE9DQUwgU1dJX1JFR1MgICAgICAgIHJlZzsNCisNCisgIHN0YXRpYyBXT1JEIF9mYXIgKnJ4T3V0T2ZzRnAsICpyeEluT2ZzRnA7DQorDQorI2VsaWYgKERPU1ggJiBESkdQUCkNCisgIHN0YXRpYyBfZ28zMl9kcG1pX3NlZ2luZm8gcm1fbWVtOw0KKyAgc3RhdGljIF9fZHBtaV9yZWdzICAgICAgICByZWc7DQorICBzdGF0aWMgRFdPUkQgICAgICAgICAgICAgIHJlYWxCYXNlOw0KKyAgc3RhdGljIGludCAgICAgICAgICAgICAgICBwYXJhX3NraXAgPSAwOw0KKw0KKyAgI2RlZmluZSBET1NfQUREUihzLG8pICAgICAoKChXT1JEKShzKSA8PCA0KSArIChvKSkNCisgICNkZWZpbmUgcl9heCAgICAgICAgICAgICAgeC5heA0KKyAgI2RlZmluZSByX2J4ICAgICAgICAgICAgICB4LmJ4DQorICAjZGVmaW5lIHJfZHggICAgICAgICAgICAgIHguZHgNCisgICNkZWZpbmUgcl9jeCAgICAgICAgICAgICAgeC5jeA0KKyAgI2RlZmluZSByX3NpICAgICAgICAgICAgICB4LnNpDQorICAjZGVmaW5lIHJfZGkgICAgICAgICAgICAgIHguZGkNCisgICNkZWZpbmUgcl9kcyAgICAgICAgICAgICAgeC5kcw0KKyAgI2RlZmluZSByX2VzICAgICAgICAgICAgICB4LmVzDQorDQorI2VsaWYgKERPU1ggJiBET1M0R1cpDQorICBMT0NBTCBzdHJ1Y3QgRFBNSV9yZWdzICAgIHJlZzsNCisgIEx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bk9mcyIpDQorICAjcHJhZ21hIEFsaWFzIChwa3RSeEVuZCwgICAiX3BrdFJ4RW5kIikNCisgICNwcmFnbWEgQWxpYXMgKFBrdFJlY2VpdmVyLCJfUGt0UmVjZWl2ZXIiKQ0KKyNlbmRpZg0KKw0KKw0KK1BVQkxJQyBQS1RfU1RBVCAgICBwa3RTdGF0OyAgICAvKiBzdGF0aXN0aWNzIGZvciBwYWNrZXRzICAgICovDQorUFVCTElDIFBLVF9JTkZPICAgIHBrdEluZm87ICAgIC8qIHBhY2tldC1kcml2ZXIgaW5mb3JtYXRpb24gKi8NCisNCitQVUJMSUMgUEtUX1JYX01PREUgcmVjZWl2ZU1vZGUgID0gUERSWF9ESVJFQ1Q7DQorUFVCTElDIEVUSEVSICAgICAgIG15QWRkcmVzcyAgICA9IHsgICAwLCAgMCwgIDAsICAwLCAgMCwgIDAgfTsNCitQVUJMSUMgRVRIRVIgICAgICAgZXRoQnJvYWRjYXN0ID0geyAyNTUsMjU1LDI1NSwyNTUsMjU1LDI1NSB9Ow0KKw0KK0xPQ0FMICBzdHJ1Y3QgeyAgICAgICAgICAgICAvKiBpbnRlcm5hbCBzdGF0aXN0aWNzICovDQorICAgICAgIERXT1JEICB0b29TbWFsbDsgICAgIC8qIHNpemUgPCBFVEhfTUlOICovDQorICAgICAgIERXT1JEICB0b29MYXJnZTsgICAgIC8qIHNpemUgPiBFVEhfTUFYICovDQorICAgICAgIERXT1JEICBiYWRTeW5jOyAgICAgIC8qIGNvdW50XzEgIT0gY291bnRfMiAqLw0KKyAgICAgICBEV09SRCAgd3JvbmdIYW5kbGU7ICAvKiB1cGNhbGwgdG8gd3JvbmcgaGFuZGxlICovDQorICAgICB9IGludFN0YXQ7ICANCisNCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KKw0KK1BVQkxJQyBjb25zdCBjaGFyICpQa3RHZXRFcnJvclN0ciAoaW50IGVyck51bSkNCit7DQorICBzdGF0aWMgY29uc3QgY2hhciAqZXJyU3RyW10gPSB7DQorICAgICAgICAgICAgICAgICAgICAiIiwNCisgICAgICAgICAgICAgICAgICAgICJJbnZhbGlkIGhhbmRsZSBudW1iZXIiLA0KKyAgICAgICAgICAgICAgICAgICAgIk5vIGludGVyZmFjZXMgb2Ygc3BlY2lmaWVkIGNsYXNzIGZvdW5kIiwNCisgICAgICAgICAgICAgICAgICAgICJObyBpbnRlcmZhY2VzIG9mIHNwZWNpZmllZCB0eXBlIGZvdW5kIiwNCisgICAgICAgICAgICAgICAgICAgICJObyBpbnRlcmZhY2VzIG9mIHNwZWNpZmllZCBudW1iZXIgZm91bmQiLA0KKyAgICAgICAgICAgICAgICAgICAgIkJhZCBwYWNrZXQgdHlwZSBzcGVjaWZpZWQiLA0KKyAgICAgICAgICAgICAgICAgICAgIkludGVyZmFjZSBkb2VzIG5vdCBzdXBwb3J0IG11bHRpY2FzdCIsDQorICAgICAgICAgICAgICAgICAgICAiUGFja2V0IGRyaXZlciBjYW5ub3QgdGVybWluYXRlIiwNCisgICAgICAgICAgICAgICAgICAgICJJbnZhbGlkIHJlY2VpdmVyIG1vZGUgc3BlY2lmaWVkIiwNCisgICAgICAgICAgICAgICAgICAgICJJbnN1ZmZpY2llbnQgbWVtb3J5IHNwYWNlIiwNCisgICAgICAgICAgICAgICAgICAgICJUeXBlIHByZXZpb3VzbHkgYWNjZXNzZWQsIGFuZCBub3QgcmVsZWFzZWQiLA0KKyAgICAgICAgICAgICAgICAgICAgIkNvbW1hbmQgb3V0IG9mIHJhbmdlLCBvciBub3QgaW1wbGVtZW50ZWQiLA0KKyAgICAgICAgICAgICAgICAgICAgIkNhbm5vdCBzZW5kIHBhY2tldCAodXN1YWxseSBoYXJkd2FyZSBlcnJvcikiLA0KKyAgICAgICAgICAgICAgICAgICAgIkNhbm5vdCBjaGFuZ2UgaGFyZHdhcmUgYWRkcmVzcyAoID4gMSBoYW5kbGUgb3BlbikiLA0KKyAgICAgICAgICAgICAgICAgICAgIkhhcmR3YXJlIGFkZHJlc3MgaGFzIGJhZCBsZW5ndGggb3IgZm9ybWF0IiwNCisgICAgICAgICAgICAgICAgICAgICJDYW5ub3QgcmVzZXQgaW50ZXJmYWNlIChtb3JlIHRoYW4gMSBoYW5kbGUgb3BlbikiLA0KKyAgICAgICAgICAgICAgICAgICAgIkJhZCBDaGVjay1zdW0iLA0KKyAgICAgICAgICAgICAgICAgICAgIkJhZCBzaXplIiwNCisgICAgICAgICAgICAgICAgICAgICJCYWQgc3luYyIgLA0KKyAgICAgICAgICAgICAgICAgICAgIlNvdXJjZSBoaXQiDQorICAgICAgICAgICAgICAgICAgfTsNCisNCisgIGlmIChlcnJOdW0gPCAwIHx8IGVyck51bSA+PSBESU0oZXJyU3RyKSkNCisgICAgIHJldHVybiAoIlVua25vd24gZHJpdmVyIGVycm9yLiIpOw0KKyAgcmV0dXJuIChlcnJTdHIgW2Vyck51bV0pOw0KK30NCisNCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorDQorUFVCTElDIGNvbnN0IGNoYXIgKlBrdEdldENsYXNzTmFtZSAoV09SRCBjbGFzcykNCit7DQorICBzd2l0Y2ggKGNsYXNzKQ0KKyAgeyANCisgICAgY2FzZSBQRF9FVEhFUjoNCisgICAgICAgICByZXR1cm4gKCJESVgtRXRoZXIiKTsNCisgICAgY2FzZSBQRF9QUk9ORVQxMDoNCisgICAgICAgICByZXR1cm4gKCJQcm9ORVQtMTAiKTsNCisgICAgY2FzZSBQRF9JRUVFODAyNToNCisgICAgICAgICByZXR1cm4gKCJJRUVFIDgwMi41Iik7DQorICAgIGNhc2UgUERfT01OSU5FVDoNCisgICAgICAgICByZXR1cm4gKCJPbW5pTmV0Iik7DQorICAgIGNhc2UgUERfQVBQTEVUQUxLOg0KKyAgICAgICAgIHJldHVybiAoIkFwcGxlVGFsayIpOw0KKyAgICBjYXNlIFBEX1NMSVA6DQorICAgICAgICAgcmV0dXJuICgiU0xJUCIpOw0KKyAgICBjYXNlIFBEX1NUQVJUTEFOOg0KKyAgICAgICAgIHJldHVybiAoIlN0YXJ0TEFOIik7DQorICAgIGNhc2UgUERfQVJDTkVUOg0KKyAgICAgICAgIHJldHVybiAoIkFyY05ldCIpOw0KKyAgICBjYXNlIFBEX0FYMjU6DQorICAgICAgICAgcmV0dXJuICgiQVguMjUiKTsNCisgICAgY2FzZSBQRF9LSVNTOg0KKyAgICAgICAgIHJldHVybiAoIktJU1MiKTsNCisgICAgY2FzZSBQRF9JRUVFODAyM18yOg0KKyAgICAgICAgIHJldHVybiAoIklFRUUgODAyLjMgdy84MDIuMiBoZHIiKTsNCisgICAgY2FzZSBQRF9GRERJODAyMjoNCisgICAgICAgICByZXR1cm4gKCJGRERJIHcvODAyLjIgaGRyIik7DQorICAgIGNhc2UgUERfWDI1Og0KKyAgICAgICAgIHJldHVybiAoIlguMjUiKTsNCisgICAgY2FzZSBQRF9MQU5zdGFyOg0KKyAgICAgICAgIHJldHVybiAoIkxBTnN0YXIiKTsNCisgICAgY2FzZSBQRF9QUFA6DQorICAgICAgICAgcmV0dXJuICgiUFBQIik7DQorICAgIGRlZmF1bHQ6DQorICAgICAgICAgcmV0dXJuICgidW5rbm93biIpOw0KKyAgfQ0KK30NCisNCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorDQorUFVCTElDIGNoYXIgY29uc3QgKlBrdFJYbW9kZVN0ciAoUEtUX1JYX01PREUgbW9kZSkNCit7DQorICBzdGF0aWMgY29uc3QgY2hhciAqbW9kZVN0ciBbXSA9IHsNCisgICAgICAgICAgICAgICAgICAgICJSZWNlaXZlciB0dXJuZWQgb2ZmIiwNCisgICAgICAgICAgICAgICAgICAgICJSZWNlaXZlIG9ubHkgZGlyZWN0bHkgYWRkcmVzc2VkIHBhY2tldHMiLA0KKyAgICAgICAgICAgICAgICAgICAgIlJlY2VpdmUgZGlyZWN0ICYgYnJvYWRjYXN0IHBhY2tldHMiLA0KKyAgICAgICAgICAgICAgICAgICAgIlJlY2VpdmUgZGlyZWN0LGJyb2FkY2FzdCBhbmQgbGltaXRlZCBtdWx0aWNhc3QgcGFja2V0cyIsDQorICAgICAgICAgICAgICAgICAgICAiUmVjZWl2ZSBkaXJlY3QsYnJvYWRjYXN0IGFuZCBhbGwgbXVsdGljYXN0IHBhY2tldHMiLA0KKyAgICAgICAgICAgICAgICAgICAgIlJlY2VpdmUgYWxsIHBhY2tldHMgKHByb21pc2N1b3VvcyBtb2RlKSINCisgICAgICAgICAgICAgICAgICB9Ow0KKw0KKyAgaWYgKG1vZGUgPiBESU0obW9kZVN0cikpDQorICAgICByZXR1cm4gKCI/PyIpOw0KKyAgcmV0dXJuIChtb2RlU3RyIFttb2RlLTFdKTsNCit9DQorDQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KKw0KK0xPQ0FMIF9faW5saW5lIEJPT0wgUGt0SW50ZXJydXB0ICh2b2lkKQ0KK3sNCisgIEJPT0wgb2theTsNCisNCisjaWYgKERPU1ggJiBQSEFSTEFQKQ0KKyAgX2R4X3JlYWxfaW50ICgoVUlOVClwa3RJbmZvLmludHIsICZyZWcpOw0KKyAgb2theSA9ICgocmVnLmZsYWdzICYgMSkgPT0gMCk7ICAvKiBPSyBpZiBjYXJyeSBjbGVhciAqLw0KKw0KKyNlbGlmIChET1NYICYgREpHUFApDQorICBfX2RwbWlfaW50ICgoaW50KXBrdEluZm8uaW50ciwgJnJlZyk7DQorICBva2F5ID0gKChyZWcueC5mbGFncyAmIDEpID09IDApOw0KKw0KKyNlbGlmIChET1NYICYgRE9TNEdXKQ0KKyAgdW5pb24gIFJFR1MgIHI7DQorICBzdHJ1Y3QgU1JFR1MgczsNCisNCisgIG1lbXNldCAoJnIsIDAsIHNpemVvZihyKSk7DQorICBzZWdyZWFkICgmcyk7DQorICByLncuYXggID0gMHgzMDA7DQorICByLnguZWJ4ID0gcGt0SW5mby5pbnRyOw0KKyAgci53LmN4ICA9IDA7DQorICBzLmVzICAgID0gRlBfU0VHICgmcmVnKTsNCisgIHIueC5lZGkgPSBGUF9PRkYgKCZyZWcpOw0KKyAgcmVnLnJfZmxhZ3MgPSAwOw0KKyAgcmVnLnJfc3MgPSByZWcucl9zcCA9IDA7ICAgICAvKiBEUE1JIGhvc3QgcHJvdmlkZXMgc3RhY2sgKi8NCisNCisgIGludDM4NnggKDB4MzEsICZyLCAmciwgJnMpOw0KKyAgb2theSA9ICghci53LmNmbGFnKTsNCisNCisjZWxzZQ0KKyAgcmVnLnJfZmxhZ3MgPSAwOw0KKyAgaW50ciAocGt0SW5mby5pbnRyLCAoc3RydWN0IFJFR1BBQ0sqKSZyZWcpOw0KKyAgb2theSA9ICgocmVnLnJfZmxhZ3MgJiAxKSA9PSAwKTsNCisjZW5kaWYNCisNCisgIGlmIChva2F5KQ0KKyAgICAgICBwa3RJbmZvLmVycm9yID0gTlVMTDsNCisgIGVsc2UgcGt0SW5mby5lcnJvciA9IFBrdEdldEVycm9yU3RyIChyZWcucl9keCA+PiA4KTsNCisgIHJldHVybiAob2theSk7DQorfQ0KKw0KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisNCisvKg0KKyAqIFNlYXJjaCBmb3IgcGFja2V0IGRyaXZlciBhdCBpbnRlcnJ1cHQgNjBoIHRocm91Z2ggODBoLiBJZiBBU0NJSVoNCisgKiBzdHJpbmcgIlBLVCBEUlZSIiBmb3VuZCBhdCBvZmZzZXQgMyBpbiB0aGUgaW50ZXJydXB0IGhhbmRsZXIsIHJldHVybg0KKyAqIGludGVycnVwdCBudW1iZXIsIGVsc2UgcmV0dXJuIHplcm8gaW4gcGt0S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3QoaW50ciksIHNpemVvZihzdHIpKTsNCisjZW5kaWYNCisNCisgICAgZm91bmQgPSBtZW1jbXAgKCZzdHJbM10sJnBrdFN0cixzaXplb2YocGt0U3RyKSkgPT0gMDsNCisgICAgaW50cisrOw0KKyAgfQ0KKyAgcGt0SW5mby5pbnRyID0gKGZvdW5kID8gaW50ci0xIDogMCk7DQorICByZXR1cm4gKGZvdW5kKTsNCit9DQorDQorDQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KKw0KK3N0YXRpYyBCT09MIFBrdFNldEFjY2VzcyAodm9pZCkNCit7DQorICByZWcucl9heCA9IDB4MDIwMCArIHBrdEluZm8uY2xhc3M7DQorICByZWcucl9ieCA9IDB4RkZGRjsNCisgIHJlZy5yX2R4ID0gMDsNCisgIHJlZy5yX2N4ID0gMDsNCisNCisjaWYgKERPU1ggJiBQSEFSTEFQKQ0KKyAgcmVnLmRzICA9IDA7DQorICByZWcuZXNpID0gMDsNCisgIHJlZy5lcyAgPSBSUF9TRUcgKHJlYWxCYXNlKTsNCisgIHJlZy5lZGkgPSAoV09SRCkgJlBrdFJlY2VpdmVyOw0KKw0KKyNlbGlmIChET1NYICYgREpHUFApDQorICByZWcueC5kcyA9IDA7DQorICByZWcueC5zaSA9IDA7DQorICByZWcueC5lcyA9IHJtX21lbS5ybV9zZWdtZW50Ow0KKyAgcmVnLnguZGkgPSBQa3RSZWNlaXZlcjsNCisNCisjZWxpZiAoRE9TWCAmIERPUzRHVykNCisgIHJlZy5yX2RzID0gMDsNCisgIHJlZy5yX3NpID0gMDsNCisgIHJlZy5yX2VzID0gcm1fYmFzZV9zZWc7DQorICByZWcucl9kaSA9IFBrdFJlY2VpdmVyOw0KKw0KKyNlbHNlDQorICByZWcucl9kcyA9IDA7DQorICByZWcucl9zaSA9IDA7DQorICByZWcucl9lcyA9IEZQX1NFRyAoJlBrdFJlY2VpdmVyKTsNCisgIHJlZy5yX2RpID0gRlBfT0ZGICgmUGt0UmVjZWl2ZXIpOw0KKyNlbmRpZg0KKw0KKyAgaWYgKCFQa3RJbnRlcnJ1cHQoKSkNCisgICAgIHJldHVybiAoRkFMU0UpOw0KKw0KKyAgcGt0SW5mby5oYW5kbGUgPSByZWcucl9heDsNCisgIHJldHVybiAoVFJVRSk7DQorfQ0KKw0KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisNCitQVUJMSUMgQk9PTCBQa3RSZWxlYXNlSGFuZGxlIChXT1JEIGhhbmRsZSkNCit7DQorICByZWcucl9heCA9IDB4MDMwMDsNCisgIHJlZy5yX2J4ID0gaGFuZGxlOw0KKyAgcmV0dXJuIFBrdEludGVycnVwdCgpOw0KK30NCisNCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorDQorUFVCTElDIEJPT0wgUGt0VHJhbnNtaXQgKGNvbnN0IHZvaWQgKmV0aCwgaW50IGxlbikNCit7DQorICBpZiAobGVuID4gRVRIX01UVSkNCisgICAgIHJldHVybiAoRkFMU0UpOw0KKw0KKyAgcmVnLnJfYXggPSAweDA0MDA7ICAgICAgICAgICAgIC8qIEZ1bmN0aW9uIDQsIHNlbmQgcGt0ICovDQorICByZWcucl9jeCA9IGxlbjsgICAgICAgICAgICAgICAgLyogdG90YWwgc2l6ZSBvZiBmcmFtZSAgKi8NCisNCisjaWYgKERPU1ggJiBESkdQUCkNCisgIGRvc21lbXB1dCAoZXRoLCBsZW4sIHJlYWxCYXNlK3BrdFR4QnVmKTsNCisgIHJlZy54LmRzID0gcm1fbWVtLnJtX3NlZ21lbnQ7ICAvKiBET1MgZGF0YSBzZWdtZW50IGFuZCAqLw0KKyAgcmVnLnguc2kgPSBwa3RUeEJ1ZjsgICAgICAgICAgIC8qIERPUyBvZmZz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orfQ0KKw0KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisNCitQVUJMSUMgQk9PTCBQa3RSZXNldEludGVyZmFjZSAoV09SRCBoYW5kbGUpDQorew0KKyAgcmVnLnJfYXggPSAweDA3MDA7DQorICByZWcucl9ieCA9IGhhbmRsZTsNCisgIHJldHVybiBQa3RJbnRlcnJ1cHQoKTsNCit9DQorDQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KKw0KK1BVQkxJQyBCT09MIFBrdFNldFJlY2VpdmVyTW9kZSAoUEtUX1JYX01PREUgbW9kZSkNCit7DQorICBpZiAocGt0SW5mby5jbGFzcyA9PSBQRF9TTElQIHx8IHBrdEluZm8uY2xhc3MgPT0gUERfUFBQKQ0KKyAgICAgcmV0dXJuIChUUlVFKTsNCisNCisgIHJlZy5yX2F4ID0gMHgxNDAwOw0KKyAgcmVnLnJfYnggPSBwa3RJbmZvLmhhbmRsZTsNCisgIHJlZy5yX2N4ID0gKFdPUkQpbW9kZTsNCisNCisgIGlmICghUGt0SW50ZXJydXB0KCkpDQorICAgICByZXR1cm4gKEZBTFNFKTsNCisNCisgIHJlY2VpdmVNb2RlID0gbW9kZTsNCisgIHJldHVybiAoVFJVRSk7DQorfQ0KKw0KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisNCitQVUJMSUMgQk9PTCBQa3RHZXRSZWNlaXZlck1vZGUgKFBLVF9SWF9NT0RFICptb2RlKQ0KK3sNCisgIHJlZy5yX2F4ID0gMHgxNTAwOw0KKyAgcmVnLnJfYnggPSBwa3RJbmZvLmhhbmRsZTsNCisNCisgIGlmICghUGt0SW50ZXJydXB0KCkpDQorICAgICByZXR1cm4gKEZBTFNFKTsN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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovDQorDQorUFVCTElDIEJPT0wgUGt0U2Vzc1N0YXRpc3RpY3MgKFdPUkQgaGFuZGxlKQ0KK3sNCisgIGlmICghUGt0R2V0U3RhdGlzdGljcyhwa3RJbmZvLmhhbmRsZSkpDQorICAgICByZXR1cm4gKEZBTFNFKTsNCisNCisgIGlmIChyZXNldFN0YXQpDQorICB7DQorICAgIHBrdFN0YXQuaW5QYWNrZXRzICAtPSBpbml0aWFsU3RhdC5pblBhY2tldHM7DQorICAgIHBrdFN0YXQub3V0UGFja2V0cyAtPSBpbml0aWFsU3RhdC5vdXRQYWNrZXRzOw0KKyAgICBwa3RTdGF0LmluQnl0ZXMgICAgLT0gaW5pdGlhbFN0YXQuaW5CeXRlczsNCisgICAgcGt0U3RhdC5vdXRCeXRlcyAgIC09IGluaXRpYWxTdGF0Lm91dEJ5dGVzOw0KKyAgICBwa3RTdGF0LmluRXJyb3JzICAgLT0gaW5pdGlhbFN0YXQuaW5FcnJvcnM7DQorICAgIHBrdFN0YXQub3V0RXJyb3JzICAtPSBpbml0aWFsU3RhdC5vdXRFcnJvcnM7DQorICAgIHBrdFN0YXQub3V0RXJyb3JzICAtPSBpbml0aWFsU3RhdC5vdXRFcnJvcnM7DQorICAgIHBrdFN0YXQubG9zdCAgICAgICAtPSBpbml0aWFsU3RhdC5sb3N0Ow0KKyAgfQ0KKyAgcmV0dXJuIChUUlVFKTsNCit9DQorDQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KKw0KK1BVQkxJQyBCT09MIFBrdFJlc2V0U3RhdGlzdGljcyAoV09SRCBoYW5kbGUpDQorew0KKyAgaWYgKCFQa3RHZXRTdGF0aXN0aWNzKHBrdEluZm8uaGFuZGxlKSkNCisgICAgIHJldHVybiAoRkFMU0UpOw0KKw0KKyA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HVykNCisgIG1lbWNweSAoYWRkciwgKHZvaWQqKShyZWFsQmFzZStwa3RUZW1wKSwgc2l6ZW9mKCphZGRyKSk7DQorDQorI2Vsc2UNCisgIG1lbWNweSAoKHZvaWQqKWFkZHIsICZwa3RUZW1wLCBzaXplb2YoKmFkZHIpKTsNCisjZW5kaWYNCisNCisgIHJldHVybiAoVFJVRSk7DQorfQ0KKw0KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisNCitQVUJMSUMgQk9PTCBQa3RTZXRBZGRyZXNzIChjb25zdCBFVEhFUiAqYWRkcikNCit7DQorICAvKiBjb3B5IGFkZHIgdG8gcmVhbC1tb2RlIHNjcmF0aCBhcmVhICovDQorDQorI2lmIChET1NYICYgUEhBUkxBUCkNCisgIFdyaXRlUmVhbE1lbSAocmVhbEJhc2UgKyAoV09SRCkmcGt0VGVtcCwgKHZvaWQqKWFkZHIsIHNpemVvZigqYWRkcikpOw0KKw0KKyNlbGlmIChET1NYICYgREpHUFApDQorICBkb3NtZW1wdXQgKGFkZHIsIHNpemVvZigqYWRkciksIHJlYWxCYXNlK3BrdFRlbXApOw0KKw0KKyNlbGlmIChET1NYICYgRE9TNEdXKQ0KKyAgbWVtY3B5ICgodm9pZCopKHJlYWxCYXNlK3BrdFRlbXApLCBhZGRyLCBzaXplb2YoKmFkZHIpKTsNCisNCisjZWxzZQ0KKyAgbWVtY3B5ICgmcGt0VGVtcCwgKHZvaWQqKWFkZHIsIHNpemVvZigqYWRkcikpOw0KKyNlbmRpZg0KKw0KKyAgcmVnLnJfYXggPSAweDE5MDA7DQorICByZWcucl9jeCA9IHNpemVvZiAoKmFkZHIpOyAgICAgIC8qIGFkZHJlc3MgbGVuZ3RoICAgICAgICovDQorDQorI2lmIChET1NYICYgREpHUFApDQorICByZWcueC5lcyA9IHJtX21lbS5ybV9zZWdtZW50OyAgIC8qIERPUyBvZmZzZXQgdG8gcGFyYW0gICovDQorICByZWcueC5kaSA9IHBrdFRlbXA7ICAgICAgICAgICAgIC8qIERPUyBzZWdtZW50IHRvIHBhcmFtICovDQorI2VsaWYgKERPU1ggJiBET1M0R1cpDQorICByZWcucl9lcyA9IHJtX2Jhc2Vfc2VnOw0KKyAgcmVnLnJfZGkgPSBwa3RUZW1wOw0KKyNlbHNlDQorICByZWcucl9lcyA9IEZQX1NFRyAoJnBrdFRlbXApOw0KKyAgcmVnLnJfZGkgPSBGUF9PRkYgKCZwa3RUZW1wKTsNCisjZW5kaWYNCisNCisgIHJldHVybiBQa3RJbnRlcnJ1cHQoKTsNCit9DQorDQorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KKw0KK1BVQkxJQyBCT09MIFBrdEdldERyaXZlckluZm8gKHZvaWQpDQorew0KKyAgcGt0SW5mby5tYWpWZXIgPSAwOw0KKyAgcGt0SW5mby5taW5WZXIgPSAwOw0KKyAgbWVtc2V0ICgmcGt0SW5mby5uYW1lLCAwLCBzaXplb2YocGt0SW5mby5uYW1lKSk7DQorICByZWcucl9heCA9IDB4MDFGRjsNCisgIHJlZy5yX2J4ID0gMDsNCisNCisgIGlmICghUGt0SW50ZXJydXB0KCkpDQorICAgICByZXR1cm4gKEZBTFNFKTsNCisNCisgIHBrdEluZm8ubnVtYmVyID0gcmVnLnJfY3ggJiAweEZGOw0KKyAgcGt0SW5mby5jbGFzcyAgPSByZWcucl9jeCA+PiA4Ow0KKyNpZiAwDQorICBwa3RJbmZvLm1pblZlciA9IHJlZy5yX2J4ICUgMTA7DQorICBwa3RJbmZvLm1halZlciA9IHJlZy5yX2J4IC8gMTA7DQorI2Vsc2UNCisgIHBrdEluZm8ubWFqVmVyID0gcmVnLnJfYng7ICAvLyAhIQ0KKyNlbmRpZg0KKyAgcGt0SW5mby5mdW5jcyAgPSByZWcucl9heCAmIDB4RkY7DQorICBwa3RJbmZvLnR5cGUgICA9IHJlZy5yX2R4ICYgMHhGRjsNCisNCisjaWYgKERPU1ggJiBQSEFSTEFQKQ0KKyAgUmVhZFJlYWxNZW0gKCZwa3RJbmZvLm5hbWUsIERPU19BRERSKHJlZy5kcyxyZWcuZXNpKSwgc2l6ZW9mKHBrdEluZm8ubmFtZSkpOw0KKw0KKyNlbGlmIChET1NYICYgREpHUFApDQorICBkb3NtZW1nZXQgKERPU19BRERSKHJlZy54LmRzLHJlZy54LnNpKSwgc2l6ZW9mKHBrdEluZm8ubmFtZSksICZwa3RJbmZvLm5hbWUpOw0KKw0KKyNlbGlmIChET1NYICYgRE9TNEdXKQ0KKyAgbWVtY3B5ICgmcGt0SW5mby5uYW1lLCAodm9pZCopRE9TX0FERFIocmVnLnJfZHMscmVnLnJfc2kpLCBzaXplb2YocGt0SW5mby5uYW1lKSk7DQorDQorI2Vsc2UNCisgIF9mbWVtY3B5ICgmcGt0SW5mby5uYW1lLCBNS19GUChyZWcucl9kcyxyZWcucl9zaSksIHNpemVvZihwa3RJbmZvLm5hbWUpKTsNCisjZW5kaWYNCisgIHJldHVybiAoVFJVRSk7DQorfQ0KKw0KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8NCisNCitQVUJMSUMgQk9PTCBQa3RHZXREcml2ZXJQYXJhbSAodm9pZCkNCit7DQorICByZWcucl9heCA9IDB4MEEwMDsNCisNCisgIGlmICghUGt0SW50ZXJydXB0KCkpDQorICAgICByZXR1cm4gKEZBTFNFKTsNCisNCisjaWYgKERPU1ggJiBQSEFSTEFQKQ0KKyAgUmVhZFJlYWxNZW0gKCZwa3RJbmZvLm1halZlciwgRE9TX0FERFIocmVnLmVzLHJlZy5lZGkpLCBQS1RfUEFSQU1fU0laRSk7DQorDQorI2VsaWYgKERPU1ggJiBESkdQUCkNCisgIGRvc21lbWdldCAoRE9TX0FERFIocmVnLnguZXMscmVnLnguZGk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HVybiAoRkFMU0UpOw0KKyAgfQ0KKw0KKyAgaWYgKHdyaXRlSW5mbykNCisgICAgIHByaW50ZiAoIlBrdC1kcml2ZXIgaW5mb3JtYXRpb246XG4iDQorICAgICAgICAgICAgICIgIFZlcnNpb24gIDogJWQuJWRcbiINCisgICAgICAgICAgICAgIiAgTmFtZSAgICAgOiAlLjE1c1xuIg0KKyAgICAgICAgICAgICAiICBDbGFzcyAgICA6ICV1ICglcylcbiINCisgICAgICAgICAgICAgIiAgVHlwZSAgICAgOiAldVxuIg0KKyAgICAgICAgICAgICAiICBOdW1iZXIgICA6ICV1XG4iDQorICAgICAgICAgICAgICIgIEZ1bmNzICAgIDogJXVcbiINCisgICAgICAgICAgICAgIiAgSW50ciAgICAgOiAlWGhcbiINCisgICAgICAgICAgICAgIiAgSGFuZGxlICAgOiAldVxuIg0KKyAgICAgICAgICAgICAiICBFeHRlbmRlZCA6ICVzXG4iDQorICAgICAgICAgICAgICIgIEhpLXBlcmYgIDogJXNcbiINCisgICAgICAgICAgICAgIiAgUlggbW9kZSAgOiAlc1xuIg0KKyAgICAgICAgICAgICAiICBFdGgtYWRkciA6ICUwMlg6JTAyWDolMDJYOiUwMlg6JTAyWDolMDJYXG4iLA0KKw0KKyAgICAgICAgICAgICBwa3RJbmZvLm1halZlciwgcGt0SW5mby5taW5WZXIsIHBrdEluZm8ubmFtZSwNCisgICAgICAgICAgICAgcGt0SW5mby5jbGFzcywgIFBrdEdldENsYXNzTmFtZShwa3RJbmZvLmNsYXNzKSwNCisgICAgICAgICAgICAgcGt0SW5mby50eXBlLCAgIHBrdEluZm8ubnVtYmVyLA0KKyAgICAgICAgICAgICBwa3RJbmZvLmZ1bmNzLCAgcGt0SW5mby5pbnRyLCAgIHBrdEluZm8uaGFuZGxlLA0KKyAgICAgICAgICAgICBwa3RJbmZvLmZ1bmNzID09IDIgfHwgcGt0SW5mby5mdW5jcyA9PSA2ID8gIlllcyIgOiAiTm8iLA0KKyAgICAgICAgICAgICBwa3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ICAgICAgICAgICAgICAgIHByb3RlY3RlZCBtb2RlIHByb2dyYW0gc2VnbWVudA0KKyAqICAgICBwcm90X2Jhc2VwICAgICAgcmV0dXJuZWQ7ICBwcm90IG1vZGUgcHRyIHRvIHVzZSBhcyBhIGJhc2UgZm9yIGdldHRpbmcNCisgKiAgICAgICAgICAgICAgICAgICAgICAgIHRvIHRoZSBjb252ZW50aW9uYWwgbWVtb3J5LCBhbHNvIGNvbnN0cnVjdGVkDQorICogICAgICAgICAgICAgICAgICAgICAgICBzbyB0aGF0IGFkZGluZyB0aGUgcHJvdCBtb2RlIG9mZnNldCBvZiBhDQorICogICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBvciB2YXJpYWJsZSB0byB0aGUgYmFzZSBnZXRzIHlvdSBhDQorICogICAgICAgICAgICAgICAgICAgICAgICBwdHIgdG8gdGhlIGZ1bmN0aW9uIG9yIHZhcmlhYmxlIGluIHRoZQ0KKyAqICAgICAgICAgICAgICAgICAgICAgICAgY29udmVudGlvbmFsIG1lbW9yeSBibG9jay4NCisgKiAgICAgcm1lbV9hZHJwICAgICAgIHJldHVybmVkOyAgcmVhbCBtb2RlIHBhcmEgYWRkciBvZiBhbGxvY2F0ZWQNCisgKiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnZlbnRpb25hbCBtZW1vcnkgYmxvY2ssIHRvIGJlIHVzZWQgdG8gZnJlZQ0KKyAqICAgICAgICAgICAgICAgICAgICAgICAgdXAgdGhlIGNvbnZlbnRpb25hbCBtZW1vcnkgd2hlbiBkb25lLiAgRE8gTk9UDQorICogICAgICAgICAgICAgICAgICAgICAgICBVU0UgVEhJUyBUTyBDT05TVFJVQ1QgQSBSRUFMIE1PREUgUFRSLCBVU0UNCisgKiAgICAgICAgICAgICAgICAgICAgICAgIFJFQUxfQkFTRVAgSU5TVEVBRCBTTyBUSEFUIE9GRlNFVFMgV09SSyBPVVQNCisgKiAgICAgICAgICAgICAgICAgICAgICAgIENPUlJFQ1RMWS4NCisgKg0KKyAqIFJldHVybmVkIHZhbHVlczoNCisgKiAgICAgMCAgICAgIGlmIGVycm9yDQorICogICAgIDEgICAgICBpZiBzdWNjZXNzDQorICovDQoraW50IFJlYWxDb3B5IChVTE9ORyAgICBzdGFydF9vZmZzLA0KKyAgICAgICAgICAgICAgVUxPTkcgICAgZW5kX29mZnMsDQorICAgICAgICAgICAgICBSRUFMUFRSICpyZWFsX2Jhc2VwLA0KKyAgICAgICAgICAgICAgRkFSUFRSICAqcHJvdF9iYXNlcCwNCisgICAgICAgICAgICAgIFVTSE9SVCAgKnJtZW1fYWRycCkNCit7DQorICBVTE9ORyAgIHJtX2Jhc2U7ICAgIC8qIGJhc2UgcmVhbCBtb2RlIHBhcmEgYWRkciBmb3IgYWNjZXNzaW5nICovDQorICAgICAgICAgICAgICAgICAgICAgIC8qIGFsbG9jYXRlZCBjb252ZW50aW9uYWwgbWVtb3J5ICAgICAgICAgICovDQorICBVQ0hBUiAgKnNvdXJjZTsgICAgIC8qIHNvdXJjZSBwb2ludGVyIGZvciBjb3B5ICAgICAgICAgICAgICAgICovDQorICBGQVJQVFIgIGRlc3RpbjsgICAgIC8qIGRlc3RpbmF0aW9uIHBvaW50ZXIgZm9yIGNvcHkgICAgICAgICAgICovDQorICBVTE9ORyAgIGxlbjsgICAgICAgIC8qIG51bWJlciBvZiBieXRlcyB0byBjb3B5ICAgICAgICAgICAgICAgICovDQorICBVTE9ORyAgIHRlbXA7DQorICBVU0hPUlQgIHN0ZW1wOw0KKw0KKyAgLyogRmlyc3QgY2hlY2sgZm9yIHZhbGlkIGlucHV0cw0KKyAgICovDQorICBpZiAoc3RhcnRfb2ZmcyA+PSBlbmRfb2ZmcyB8fCBlbmRfb2ZmcyA+IDB4MTAwMDApDQorICAgICByZXR1cm4gKEZBTFNFKTsNCisNCisgIC8qIFJvdW5kIHN0YXJ0X29mZnMgZG93biB0byBhIHBhcmFncmFwaCAoMTYtYnl0ZSkgYm91bmRhcnkgc28gd2UgY2FuIHN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0KKw0KKyNkZWZpbmUgUlhfQlVGX1NJWkUgIEVUSF9NVFUgICAvKiBidWZmZXIgc2l6ZSB2YXJpYWJsZXMuIE5CICEhICovDQorI2RlZmluZSBUWF9CVUZfU0laRSAgRVRIX01UVSAgIC8qIG11c3QgYmUgc2FtZSBhcyBpbiBwa3RfcngqLiogKi8NCisNCisjaWZkZWYgX19ISUdIQ19fDQorI3ByYWdtYSBPZmYoQWxpZ25fbWVtYmVycykNCisjZWxzZQ0KKyNwcmFnbWEgcGFjaygxKQ0KKyNlbmRpZg0KKw0KK3R5cGVkZWYgZW51bSAgeyAgICAgICAgICAgICAgICAvKiBQYWNrZXQtZHJpdmVyIGNsYXNzZXMgKi8NCisgICAgICAgIFBEX0VUSEVSICAgICAgPSAxLA0KKyAgICAgICAgUERfUFJPTkVUMTAgICA9IDIsDQorICAgICAgICBQRF9JRUVFODAyNSAgID0gMywNCisgICAgICAgIFBEX09NTklORVQgICAgPSA0LA0KKyAgICAgICAgUERfQVBQTEVUQUxLICA9IDUsDQorICAgICAgICBQRF9TTElQICAgICAgID0gNiwNCisgICAgICAgIFBEX1NUQVJUTEFOICAgPSA3LA0KKyAgICAgICAgUERfQVJDTkVUICAgICA9IDgsDQorICAgICAgICBQRF9BWDI1ICAgICAgID0gOSwNCisgICAgICAgIFBEX0tJU1MgICAgICAgPSAxMCwNCisgICAgICAgIFBEX0lFRUU4MDIzXzIgPSAxMSwNCisgICAgICAgIFBEX0ZEREk4MDIyICAgPSAxMiwNCisgICAgICAgIFBEX1gyNSAgICAgICAgPSAxMywNCisgICAgICAgIFBEX0xBTnN0YXIgICAgPSAxNCwNCisgICAgICAgIFBEX1BQUCAgICAgICAgPSAxOA0KKyAgICAgIH0gUEtUX0NMQVNTOw0KKw0KK3R5cGVkZWYgZW51bSAgeyAgICAgICAgICAgICAvKiBQYWNrZXQtZHJpdmVyIHJlY2VpdmUgbW9kZXMgICAgKi8NCisgICAgICAgIFBEUlhfT0ZGICAgID0gMSwgICAgLyogdHVybiBvZmYgcmVjZWl2ZXIgICAgICAgICAgICAgICovDQorICAgICAgICBQRFJYX0RJUkVDVCwgICAgICAgIC8qIHJlY2VpdmUgb25seSB0byB0aGlzIGludGVyZmFjZSAqLw0KKyAgICAgICAgUERSWF9CUk9BRENBU1QsICAgICAvKiBESVJFQ1QgKyBicm9hZGNhc3QgcGFja2V0cyAgICAgKi8NCisgICAgICAgIFBEUlhfTVVMVElDQVNUMSwgICAgLyogQlJPQURDQVNUICsgbGltaXRlZCBtdWx0aWNhc3QgICovDQorICAgICAgICBQRFJYX01VTFRJQ0FTVDIsICAgIC8qIEJST0FEQ0FTVCArIGFsbCBtdWx0aWNhc3QgICAgICAqLw0KKyAgICAgICAgUERSWF9BTExfUEFDS0VUUywgICAvKiByZWNlaXZlIGFsbCBwYWNrZXRzIG9uIG5ldHdvcmsgKi8NCisgICAgICB9IFBLVF9SWF9NT0RFOw0KKw0KK3R5cGVkZWYgc3RydWN0IHsNCisgICAgICAgIGNoYXIgdHlwZVs4XTsNCisgICAgICAgIGNoYXIgbGVuOw0KKyAgICAgIH0gUEtUX0ZSQU1FOw0KKw0KKw0KK3R5cGVkZWYgc3RydWN0IHsNCisgICAgICAgIEJZVEUgIGNsYXNzOyAgICAgICAgLyogPSAxIGZvciBERUMvSW50ZXJsL1hlcm94IEV0aGVybmV0ICovDQorICAgICAgICBCWVRFICBudW1iZXI7ICAgICAgIC8qID0gMCBmb3Igc2luZ2xlIExBTiBhZGFwdGVyICAgICAgICAqLw0KKyAgICAgICAgV09SRCAgdHlwZTsgICAgICAgICAvKiA9IDEzIGZvciAzQzUyMyAgICAgICAgICAgICAgICAgICAgKi8NCisgICAgICAgIEJZVEUgIGZ1bmNzOyAgICAgICAgLyogQmFzaWMvRXh0ZW5kZWQvSGlQZXJmIGZ1bmN0aW9ucyAgICovDQorICAgICAgICBXT1JEICBpbnRyOyAgICAgICAgIC8qIHVzZXIgaW50ZXJydXB0IHZlY3RvciBudW1iZXIgICAgICAqLw0KKyAgICAgICAgV09SRCAgaGFuZGxlOyAgICAgICAvKiBIYW5kbGUgYXNzb2NpYXRlZCB3aXRoIHNlc3Npb24gICAgKi8NCisgICAgICAgIEJZVEUgIG5hbWUgWzE1XTsgICAgLyogTmFtZSBvZiBhZGFwdGVyIGludGVyZmFjZSxpZS4zQzUyMyovDQorICAgICAgICBCT09MICBxdWlldDsgICAgICAgIC8qIChkb24ndCkgcHJpbnQgZXJyb3JzIHRvIHN0ZG91dCAgICAqLw0KKyAgICAgICAgY29uc3QgY2hhciAqZXJyb3I7ICAvKiBhZGRyZXNzIG9mIGVycm9yIHN0cmluZyAgICAgICAgICAgKi8NCisgICAgICAgIEJZVEUgIG1halZlcjsgICAgICAgLyogTWFqb3IgZHJpdmVyIGltcGxlbWVudGF0aW9uIHZlci4gICovDQorICAgICAgICBCWVRFICBtaW5WZXI7ICAgICAgIC8qIE1pbm9yIGRyaXZlciBpbXBsZW1lbnRhdGlvbiB2ZXIuICAqLw0KKyAgICAgICAgQllURSAgZHVtbXlMZW47ICAgICAvKiBsZW5ndGggb2YgZm9sbG93aW5nIGRhdGEgICAgICAgICAgKi8NCisgICAgICAgIFdPUkQgIE1BQ2xlbmd0aDsgICAgLyogSGlQZXJmb3JtYW5jZSBkYXRhLCBOL0EgICAgICAgICAgICovDQorICAgICAgICBXT1JEICBNVFU7ICAgICAgICAgIC8qIEhpUGVyZm9ybWFuY2UgZGF0YSwgTi9BICAgICAgICAgICAqLw0KKyAgICAgICAgV09SRCAgbXVsdGljYXN0OyAgICAvKiBIaVBlcmZvcm1hbmNlIGRhdGEsIE4vQSAgICAgICAgICAgKi8NCisgICAgICAgIFdPUkQgIHJjdnJCdWZmZXJzOyAgLyogdmFsaWQgZm9yICAgICAgICAgICAgICAgICAgICAgICAgICovDQorICAgICAgICBXT1JEICBVTVRidWZzOyAgICAgIC8qICAgSGlnaCBQZXJmb3JtYW5jZSBkcml2ZXJzIG9ubHkgICAqLw0KKyAgICAgICAgV09SRCAgcG9zdEVPSWludHI7ICAvKiAgICAgICAgICAgICAgICAgIFVzYWdlID8/ICAgICAgICAgKi8NCisgICAgICB9IFBLVF9JTkZPOw0KKw0KKyNkZWZpbmUgUEtUX1BBUkFNX1NJWkUgIDE0ICAgIC8qIG1lbWJlcnMgbWFqVmVyIC0gcG9zdEVPSWludHIgKi8NCisNCisNCit0eXBlZGVmIHN0cnVjdCB7DQorICAgICAgICBEV09SRCBpblBhY2tldHM7ICAgICAgICAgIC8qICMgb2YgcGFja2V0cyByZWNlaXZlZCAgICAqLw0KKyAgICAgICAgRFdPUkQgb3V0UGFja2V0czsgICAgICAgICAvKiAjIG9mIHBhY2tldHMgdHJhbnNtaXR0ZWQgKi8NCisgICAgICAgIERXT1JEIGluQnl0ZXM7ICAgICAgICAgICAgLyogIyBvZiBieXRlcyByZWNlaXZlZCAgICAgICovDQorICAgICAgICBEV09SRCBvdXRCeXRlczsgICAgICAgICAgIC8qICMgb2YgYnl0ZXMgdHJhbnNtaXR0ZWQgICAqLw0KKyAgICAgICAgRFdPUkQgaW5FcnJvcnM7ICAgICAgICAgICAvKiAjIG9mIHJlY2VwdGlvbiBlcnJvcnMgICAgKi8NCisgICAgICAgIERXT1JEIG91dEVycm9yczsgICAgICAgICAgLyogIyBvZiB0cmFuc21pc3Npb24gZXJyb3JzICovDQorICAgICAgICBEV09SRCBsb3N0OyAgICAgICAgICAgICAgIC8qICMgb2YgcGFja2V0cyBsb3N0IChSWCkgICAqLw0KKyAgICAgIH0gUEtUX1NUQVQ7DQorICAgICAgICAgICAgICAgICAgIA0KKw0KK3R5cGVkZWYgc3RydWN0IHsNCisgICAgICAgIEVUSEVSIGRlc3RpbjsNCisgICAgICAgIEVUSEVSIHNvdXJjZTsNCisgICAgICAgIFdPUkQgIHByb3RvOw0KKyAgICAgICAgQllURSAgZGF0YSBbVFhfQlVGX1NJWkVdOw0KKyAgICAgIH0gVFhfRUxFTUVOVDsNCisNCit0eXBlZGVmIHN0cnVjdCB7DQorICAgICAgICBXT1JEICBmaXJzdENvdW50OyAgICAgICAgIC8qICMgb2YgYnl0ZXMgb24gMXN0ICAgICAgICAgKi8NCisgICAgICAgIFdPUkQgIHNlY29uZENvdW50OyAgICAgICAgLyogYW5kIDJuZCB1cGNhbGwgICAgICAgICAgICAqLw0KKyAgICAgICAgV09SRCAgaGFuZGxlOyAgICAgICAgICAgICAvKiBpbnN0YW5jZSB0aGF0IHVwY2FsbGVkICAgICovDQorICAgICAgICBFVEhFUiBkZXN0aW47ICAgICAgICAgICAgIC8qIEUtbmV0IGRlc3RpbmF0aW9uIGFkZHJlc3MgKi8NCisgICAgICAgIEVUSEVSIHNvdXJjZTsgICAgICAgICAgICAgLyogRS1uZXQgc291cmNlIGFkZHJlc3MgICAgICAqLw0KKyAgICAgICAgV09SRCAgcHJvdG87ICAgICAgICAgICAgICAvKiBwcm90b2NvbCBudW1iZXIgICAgICAgICAgICovDQorICAgICAgICBCWVRFICBkYXRhIFtSWF9CVUZfU0laRV07DQorICAgICAgfSBSWF9FTEVNRU5UOw0KKw0KKw0KKyNpZmRlZiBfX0hJR0hDX18NCisjcHJhZ21hIHBvcChBbGlnbl9tZW1iZXJzKQ0KKyNlbHNlDQorI3ByYWdtYSBwYWNrKCkNCisjZW5kaWYNCisNCisNCisvKg0KKyAqIFByb3RvdHlwZXMgZm9yIHB1YmxpY3MNCisgKi8NCisNCisjaWZkZWYgX19jcGx1c3BsdXMNCitleHRlcm4gIkMiIHsNCisjZW5kaWYNCisNCitleHRlcm4gUEtUX1NUQVQgICAgcGt0U3RhdDsgICAgIC8qIHN0YXRpc3RpY3MgZm9yIHBhY2tldHMgKi8NCitleHRlcm4gUEtUX0lORk8gICAgcGt0SW5mbzsgICAgIC8qIHBhY2tldC1kcml2ZXIgaW5mb3JtYXRpb24gKi8NCisNCitleHRlcm4gUEtUX1JYX01PREUgcmVjZWl2ZU1vZGU7DQorZXh0ZXJuIEVUSEVSICAgICAgIG15QWRkcmVzcywgZXRoQnJvYWRjYXN0Ow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50Cit4ZHRvaShjKQorCXJlZ2lzdGVyIGludCBjOworeworCWlmIChpc2RpZ2l0KGMpKQorCQlyZXR1cm4gYyAtICcwJzsKKwllbHNlIGlmIChpc2xvd2VyKGMpKQorCQlyZXR1cm4gYyAtICdhJyArIDEwOworCWVsc2UKKwkJcmV0dXJuIGMgLSAnQScgKyAxMDsKK30KKworaW50CitfX3BjYXBfYXRvaW4oY29uc3QgY2hhciAqcywgYnBmX3VfaW50MzIgKmFkZHIpCit7CisJdV9pbnQgbjsKKwlpbnQgbGVuOworCisJKmFkZHIgPSAwOworCWxlbiA9IDA7CisJd2hpbGUgKDEpIHsKKwkJbiA9IDA7CisJCXdoaWxlICgqcyAmJiAqcyAhPSAnLicpCisJCQluID0gbiAqIDEwICsgKnMrKyAtICcwJzsKKwkJKmFkZHIgPDw9IDg7CisJCSphZGRyIHw9IG4gJiAweGZmOworCQlsZW4gKz0gODsKKwkJaWYgKCpzID09ICdcMCcpCisJCQlyZXR1cm4gbGVuOworCQkrK3M7CisJfQorCS8qIE5PVFJFQUNIRUQgKi8KK30KKworaW50CitfX3BjYXBfYXRvZG4oY29uc3QgY2hhciAqcywgYnBmX3VfaW50MzIgKmFkZHIpCit7CisjZGVmaW5lIEFSRUFTSElGVCAxMAorI2RlZmluZSBBUkVBTUFTSyAwMTc2MDAwCisjZGVmaW5lIE5PREVNQVNLIDAxNzc3CisKKwl1X2ludCBub2RlLCBhcmVhOworCisJaWYgKHNzY2FuZihzLCAiJWQuJWQiLCAmYXJlYSwgJm5vZGUpICE9IDIpCisJCWJwZl9lcnJvcigibWFsZm9ybWVkIGRlY25ldCBhZGRyZXNzICclcyciLCBzKTsKKworCSphZGRyID0gKGFyZWEgPDwgQVJFQVNISUZUKSAmIEFSRUFNQVNLOworCSphZGRyIHw9IChub2RlICYgTk9ERU1BU0spOworCisJcmV0dXJuKDMyKTsKK30KKworLyoKKyAqIENvbnZlcnQgJ3MnIHdoaWNoIGhhcyB0aGUgZm9ybSAieHg6eHg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lkCitmaW5kX2xldmVsc19yKGIpCisJc3RydWN0IGJsb2NrICpiOworeworCWludCBsZXZlbDsKKworCWlmIChpc01hcmtlZChiKSkKKwkJcmV0dXJuOworCisJTWFyayhiKTsKKwliLT5saW5rID0gMDsKKworCWlmIChKVChiKSkgeworCQlmaW5kX2xldmVsc19yKEpUKGIpKTsKKwkJZmluZF9sZXZlbHNfcihKRihiKSk7CisJCWxldmVsID0gTUFYKEpUKGIpLT5sZXZlbCwgSkYoYiktPmxldmVsKSArIDE7CisJfSBlbHNlCisJCWxldmVsID0gMDsKKwliLT5sZXZlbCA9IGxldmVsOworCWItPmxpbmsgPSBsZXZlbHNbbGV2ZWxdOworCWxldmVsc1tsZXZlbF0gPSBiOworfQorCisvKgorICogTGV2ZWwgZ3JhcGguICBUaGUgbGV2ZWxzIGdvIGZyb20gMCBhdCB0aGUgbGVhdmVzIHRvCisgKiBOX0xFVkVMUyBhdCB0aGUgcm9vdC4gIFRoZSBsZXZlbHNbXSBhcnJheSBwb2ludHMgdG8gdGhlCisgKiBmaXJzdCBub2RlIG9mIHRoZSBsZXZlbCBsaXN0LCB3aG9zZSBlbGVtZW50cyBhcmUgbGlua2VkCisgKiB3aXRoIHRoZSAnbGluaycgZmllbGQgb2YgdGhlIHN0cnVjdCBibG9jay4KKyAqLworc3RhdGljIHZvaWQKK2ZpbmRfbGV2ZWxzKHJvb3QpCisJc3RydWN0IGJsb2NrICpyb290OworeworCW1lbXNldCgoY2hhciAqKWxldmVscywgMCwgbl9ibG9ja3MgKiBzaXplb2YoKmxldmVscykpOworCXVuTWFya0FsbCgpOworCWZpbmRfbGV2ZWxzX3Iocm9vdCk7Cit9CisKKy8qCisgKiBGaW5kIGRvbWluYXRvciByZWxhdGlvbnNoaXBzLgorICogQXNzdW1lcyBncmFwaCBoYXMgYmVlbiBsZXZlbGVkLgorICovCitzdGF0aWMgdm9pZAorZmluZF9kb20ocm9vdCkKKwlzdHJ1Y3QgYmxvY2sgKnJvb3Q7Cit7Cis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tcChyb290KTsKKwl9CisjZW5kaWYKKwlkbyB7CisJCWRvbmUgPSAxOworCQlmaW5kX2xldmVscyhyb290KTsKKwkJZmluZF9kb20ocm9vdCk7CisJCWZpbmRfY2xvc3VyZShyb290KTsKKwkJZmluZF91ZChyb290KTsKKwkJZmluZF9lZG9tKHJvb3QpOworCQlvcHRfYmxrcyhyb290LCBkb19zdG10cyk7CisjaWZkZWYgQkRFQlVHCisJCWlmIChkZmxhZyA+IDEpIHsKKwkJCXByaW50Zigib3B0X2xvb3Aocm9vdCwgJWQpIGJvdHRvbSwgZG9uZT0lZFxuIiwgZG9fc3RtdHMsIGRvbmUpOworCQkJb3B0X2R1bXAocm9vdCk7CisJCX0KKyNlbmRpZgorCX0gd2hpbGUgKCFkb25lKTsKK30KKworLyoKKyAqIE9wdGltaXplIHRoZSBmaWx0ZXIgY29kZSBpbiBpdHMgZGFnIHJlcHJlc2VudGF0aW9uLgorICovCit2b2lkCiticGZfb3B0aW1pemUocm9vdHApCisJc3RydWN0IGJsb2NrICoqcm9vdHA7Cit7CisJc3RydWN0IGJsb2NrICpyb290OworCisJcm9vdCA9ICpyb290cDsKKworCW9wdF9pbml0KHJvb3QpOworCW9wdF9sb29wKHJvb3QsIDApOworCW9wdF9sb29wKHJvb3QsIDEpOworCWludGVybl9ibG9ja3Mocm9vdCk7CisjaWZkZWYgQkRFQlVHCisJaWYgKGRmbGFnID4gMSkgeworCQlwcmludGYoImFmdGVyIGludGVybl9ibG9ja3MoKVxuIik7CisJCW9wdF9kdW1wKHJvb3QpOworCX0KKyNlbmRpZgorCW9wdF9yb290KHJvb3RwKTsKKyNpZmRlZiBCREVCVUcKKwlpZiAoZGZsYWcgPiAxKSB7CisJCXByaW50ZigiYWZ0ZXIgb3B0X3Jvb3QoKVxuIik7CisJCW9wdF9kdW1wKHJvb3QpOworCX0KKyNlbmRpZgorCW9wdF9jbGVhbnVwKCk7Cit9CisKK3N0YXRpYyB2b2lkCittYWtlX21hcmtzKHApCisJc3Ryd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JaWYgKEpUKHApLT5saW5rKSB7CisJCQlkb25lMSA9IDA7CisJCQlKVChwKSA9IEpUKHApLT5saW5rOworCQl9CisJCWlmIChKRihwKS0+bGluaykgeworCQkJZG9uZTEgPSAwOworCQkJSkYocCkgPSBKRihwKS0+bGluazsKKwkJfQorCX0KKwlpZiAoIWRvbmUxKQorCQlnb3RvIHRvcDsKK30KKworc3RhdGljIHZvaWQKK29wdF9jbGVhbnVwKCkKK3sKKwlmcmVlKCh2b2lkICopdm5vZGVfYmFzZSk7CisJZnJlZSgodm9pZCAqKXZtYXApOworCWZyZWUoKHZvaWQgKillZGdlcyk7CisJZnJlZSgodm9pZCAqKXNwYWNlKTsKKwlmcmVlKCh2b2lkICopbGV2ZWxzKTsKKwlmcmVlKCh2b2lkICopYmxvY2tzKTsKK30KKworLyoKKyAqIFJldHVybiB0aGUgbnVtYmVyIG9mIHN0bXRzIGluICdzJy4KKyAqLworc3RhdGljIGludAorc2xlbmd0aChzKQorCXN0cnVjdCBzbGlzdCAqczsKK3sKKwlpbnQgbiA9IDA7CisKKwlmb3IgKDsgczsgcyA9IHMtPm5leHQpCisJCWlmIChzLT5zLmNvZGUgIT0gTk9QKQorCQkJKytuOworCXJldHVybiBuOworfQorCisvKgorICogUmV0dXJuIHRoZSBudW1iZXIgb2Ygbm9kZXMgcmVhY2hhYmxlIGJ5ICdwJy4KKyAqIEFsbCBub2RlcyBzaG91bGQgYmUgaW5pdGlhbGx5IHVubWFya2VkLgorICovCitzdGF0aWMgaW50Citjb3VudF9ibG9ja3MocCkKKwlzdHJ1Y3QgYmxvY2sgKnA7Cit7CisJaWYgKHAgPT0gMCB8fCBpc01hcmtlZChwKSkKKwkJcmV0dXJuIDA7CisJTWFyayhwKTsKKwlyZXR1cm4gY291bnRfYmxvY2tzKEpUKHApKSArIGNvdW50X2Jsb2NrcyhKRihwKSkgKyAxOworfQorCisvKgorICogRG8gYSBkZXB0aCBmaXJzdCBzZWFyY2ggb24gdGhlIGZsb3cgZ3J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b2RtaW5pdChjaGFyICplcnJidWYpCit7CisJY2hhciAqZXJyc3RyOworCisJaWYgKG9kbV9pbml0aWFsaXplKCkgPT0gLTEpIHsKKwkJaWYgKG9kbV9lcnJfbXNnKG9kbWVycm5vLCAmZXJyc3RyKSA9PSAtMSkKKwkJCWVycnN0ciA9ICJVbmtub3duIGVycm9yIjsKKwkJc25wcmludGYoZXJyYnVmLCBQQ0FQX0VSUkJVRl9TSVpFLAorCQkgICAgImJwZl9sb2FkOiBvZG1faW5pdGlhbGl6ZSBmYWlsZWQ6ICVzIiwKKwkJICAgIGVycnN0cik7CisJCXJldHVybiAoLTEpOworCX0KKworCWlmICgob2RtbG9ja2lkID0gb2RtX2xvY2soIi9ldGMvb2JqcmVwb3MvY29uZmlnX2xvY2siLCBPRE1fV0FJVCkpID09IC0xKSB7CisJCWlmIChvZG1fZXJyX21zZyhvZG1lcnJubywgJmVycnN0cikgPT0gLTEpCisJCQllcnJzdHIgPSAiVW5rbm93biBlcnJvciI7CisJCXNucHJpbnRmKGVycmJ1ZiwgUENBUF9FUlJCVUZfU0laRSwKKwkJICAgICJicGZfbG9hZDogb2RtX2xvY2sgb2YgL2V0Yy9vYmpyZXBvcy9jb25maWdfbG9jayBmYWlsZWQ6ICVzIiwKKwkJICAgIGVycnN0cik7CisJCXJldHVybiAoLTEpOworCX0KKworCXJldHVybiAoMCk7Cit9CisKK3N0YXRpYyBpbnQgCiticGZfb2RtY2xlYW51cChjaGFyICplcnJidWYpCit7CisJY2hhciAqZXJyc3RyOworCisJaWYgKG9kbV91bmxvY2sob2RtbG9ja2lkKSA9PSAtMSkgeworCQlpZiAob2RtX2Vycl9tc2cob2RtZXJybm8sICZlcnJzdHIpID09IC0xKQorCQkJZXJyc3RyID0gIlVua25vd24gZXJyb3IiOworCQlzbnByaW50ZihlcnJidWYsIFBDQVBfRVJSQlVGX1NJWkUsCisJCSAgICAiYnBmX2xvYWQ6IG9kbV91bmxvY2sgZmFpbGVkOiAlcyIsCisJCSAg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azsKKworCWNhc2UgSUZUX0ZEREk6CisJCXYgPSBETFRfRkRESTsKKwkJYnJlYWs7CisKKwljYXNlIElGVF9JU084ODAyNToKKwkJdiA9IERMVF9JRUVFODAyOworCQlicmVhazsKKworCWNhc2UgSUZUX0xPT1A6CisJCXYgPSBETFRfTlVMTDsKKwkJYnJlYWs7CisKKwlkZWZhdWx0OgorCQkvKgorCQkgKiBXZSBkb24ndCBrbm93IHdoYXQgdG8gbWFwIHRoaXMgdG8geWV0LgorCQkgKi8KKwkJc25wcmludGYoZWJ1ZiwgUENBUF9FUlJCVUZfU0laRSwgInVua25vd24gaW50ZXJmYWNlIHR5cGUgJXUiLAorCQkgICAgdik7CisJCWdvdG8gYmFkOworCX0KKyNlbmRpZgorI2lmIF9CU0RJX1ZFUlNJT04gLSAwID49IDE5OTUxMAorCS8qIFRoZSBTTElQIGFuZCBQUFAgbGluayBsYXllciBoZWFkZXIgY2hhbmdlZCBpbiBCU0QvT1MgMi4xICovCisJc3dpdGNoICh2KSB7CisKKwljYXNlIERMVF9TTElQOgorCQl2ID0gRExUX1NMSVBfQlNET1M7CisJCWJyZWFrOworCisJY2FzZSBETFRfUFBQOgorCQl2ID0gRExUX1BQUF9CU0RPUzsKKwkJYnJlYWs7CisKKwljYXNlIDExOgkvKkRMVF9GUiovCisJCXYgPSBETFRfRlJFTEFZOworCQlicmVhazsKKworCWNhc2UgMTI6CS8qRExUX0NfSERMQyovCisJCXYgPSBETFRfQ0hETEM7CisJCWJyZWFrOworCX0KKyNlbmRpZgorI2lmZGVmIFBDQVBfRkRESVBBRAorCWlmICh2ID09IERMVF9GRERJKQorCQlwLT5mZGRpcGFkID0gUENBUF9GRERJUEFEOworCWVsc2UKKwkJcC0+ZmRkaXBhZCA9IDA7CisjZW5kaWYKKwlwLT5saW5rdHlwZSA9IHY7CisKKyNpZmRlZiBCSU9DR0RMVExJU1QKKwkvKgorCSAqIFdlIGtub3cgdGhlIGRlZmF1bHQgbGluayB0eXBlIC0tIG5vd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IGludCBkbHByb21pc2NvbnJlcShpbnQsIGJwZl91X2ludDMyLCBjaGFyICopOworc3RhdGljIGludCBkbG9rYWNrKGludCwgY29uc3QgY2hhciAqLCBjaGFyICosIGNoYXIgKik7CitzdGF0aWMgaW50IGRsaW5mb3JlcShpbnQsIGNoYXIgKik7CitzdGF0aWMgaW50IGRsaW5mb2FjayhpbnQsIGNoYXIgKiwgY2hhciAqKTsKKyNpZmRlZiBETF9IUF9SQVdETFMKK3N0YXRpYyBpbnQgZGxyYXdkYXRhcmVxKGludCwgY29uc3QgdV9jaGFyICosIGludCk7CisjZW5kaWYKK3N0YXRpYyBpbnQgcmVjdl9hY2soaW50LCBpbnQsIGNvbnN0IGNoYXIgKiwgY2hhciAqLCBjaGFyICosIGludCAqKTsKK3N0YXRpYyBjaGFyICpkbHN0cmVycm9yKGJwZl91X2ludDMyKTsKK3N0YXRpYyBjaGFyICpkbHByaW0oYnBmX3VfaW50MzIpOworI2lmIGRlZmluZWQoSEFWRV9TT0xBUklTKSAmJiBkZWZpbmVkKEhBVkVfU1lTX0JVRk1PRF9IKQorc3RhdGljIGNoYXIgKmdldF9yZWxlYXNlKGJwZl91X2ludDMyICosIGJwZl91X2ludDMyICosIGJwZl91X2ludDMyICopOworI2VuZGlmCitzdGF0aWMgaW50IHNlbmRfcmVxdWVzdChpbnQsIGNoYXIgKiwgaW50LCBjaGFyICosIGNoYXIgKik7CisjaWZkZWYgSEFWRV9TWVNfQlVGTU9EX0gKK3N0YXRpYyBpbnQgc3RyaW9jdGwoaW50LCBpbnQsIGludCwgY2hhciAqKTsKKyNlbmRpZgorI2lmZGVmIEhBVkVfSFBVWDkKK3N0YXRpYyBpbnQgZGxwaV9rcmVhZChpbnQsIG9mZl90LCB2b2lkICosIHVfaW50LCBjaGFyICopOworI2VuZGlmCisjaWZkZWYgSEFWRV9ERVZfRExQSQorc3RhdGljIGludCBnZXRfZGxwaV9wcGEoaW50LCBjb25zdCBjaGFyICosIGludCwgY2hhciAqKTsKK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UVEFDSF9SRVE6CisJCXJldHVybiAoIkRMX0FUVEFDSF9SRVEiKTsKKworCWNhc2UgRExfREVUQUNIX1JFUToKKwkJcmV0dXJuICgiRExfREVUQUNIX1JFUSIpOworCisJY2FzZSBETF9CSU5EX1JFUToKKwkJcmV0dXJuICgiRExfQklORF9SRVEiKTsKKworCWNhc2UgRExfQklORF9BQ0s6CisJCXJldHVybiAoIkRMX0JJTkRfQUNLIik7CisKKwljYXNlIERMX1VOQklORF9SRVE6CisJCXJldHVybiAoIkRMX1VOQklORF9SRVEiKTsKKworCWNhc2UgRExfT0tfQUNLOgorCQlyZXR1cm4gKCJETF9PS19BQ0siKTsKKworCWNhc2UgRExfRVJST1JfQUNLOgorCQlyZXR1cm4gKCJETF9FUlJPUl9BQ0siKTsKKworCWNhc2UgRExfU1VCU19CSU5EX1JFUToKKwkJcmV0dXJuICgiRExfU1VCU19CSU5EX1JFUSIpOworCisJY2FzZSBETF9TVUJTX0JJTkRfQUNLOgorCQlyZXR1cm4gKCJETF9TVUJTX0JJTkRfQUNLIik7CisKKwljYXNlIERMX1VOSVREQVRBX1JFUToKKwkJcmV0dXJuICgiRExfVU5JVERBVEFfUkVRIik7CisKKwljYXNlIERMX1VOSVREQVRBX0lORDoKKwkJcmV0dXJuICgiRExfVU5JVERBVEFfSU5EIik7CisKKwljYXNlIERMX1VERVJST1JfSU5EOgorCQlyZXR1cm4gKCJETF9VREVSUk9SX0lORCIpOworCisJY2FzZSBETF9VRFFPU19SRVE6CisJCXJldHVybiAoIkRMX1VEUU9TX1JFUSIpOworCisJY2FzZSBETF9DT05ORUNUX1JFUToKKwkJcmV0dXJuICgiRExfQ09OTkVDVF9SRVEiKTsKKworCWNhc2UgRExfQ09OTkVDVF9JTkQ6CisJCXJldHVybiAoIkRMX0NPTk5FQ1RfSU5EIik7CisKKwljYXNlIERMX0NPTk5FQ1RfUkVTOgorCQlyZXR1cm4gKCJETF9DT05ORUNUX1JFUyIpOworCisJY2FzZSBETF9DT05ORU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KGNvbnN0IGNoYXIgKm5hbWUsIGNoYXIgKmVidWYsIGludCBwcm9taXNjKTsKKworc3RhdGljIHZvaWQgd2F0dDMyX3JlY3ZfaG9vayAodV9jaGFyICpkdW1teSwgY29uc3Qgc3RydWN0IHBjYXBfcGt0aGRyICpwY2FwLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdV9jaGFyICpidWYpOworCisvKgorICogVGhlc2UgYXJlIHRoZSBkZXZpY2Ugd2UgYWx3YXlzIHN1cHBvcnQKKyAqLworc3RhdGljIHN0cnVjdCBkZXZpY2UgbmRpc19kZXYgPSB7CisgICAgICAgICAgICAgICJuZGlzIiwKKyAgICAgICAgICAgICAgIk5ESVMyIExhbk1hbmFnZXIiLAorICAgICAgICAgICAgICAwLAorICAgICAgICAgICAgICAwLDAsMCwwLDAsMCwKKyAgICAgICAgICAgICAgTkRJU19ORVhUX0RFViwgIC8qIE5VTEwgb3IgYSAzMi1iaXQgZGV2aWNlICovCisgICAgICAgICAgICAgIG5kaXNfcHJvYmUKKyAgICAgICAgICAgIH07CisKK3N0YXRpYyBzdHJ1Y3QgZGV2aWNlIHBrdF9kZXYgPSB7CisgICAgICAgICAgICAgICJwa3QiLAorICAgICAgICAgICAgICAiUGFja2V0LURyaXZlciIsCisgICAgICAgICAgICAgIDAsCisgICAgICAgICAgICAgIDAsMCwwLDAsMCwwLAorICAgICAgICAgICAgICAmbmRpc19kZXYsCisgICAgICAgICAgICAgIHBrdF9wcm9iZQorICAgICAgICAgICAgfTsKKworc3RhdGljIHN0cnVjdCBkZXZpY2UgKmdldF9kZXZpY2UgKGludCBmZCkKK3sKKyAgaWYgKGZkIDw9IDAgfHwgZmQgPj0gc2l6ZW9mKGhhbmRsZV90b19kZXZpY2UpL3NpemVvZihoYW5kbGVfdG9fZGV2aWNlWzBdKSkKKyAgICAgcmV0dXJuIChOVUxMKTsKKyAgcmV0dXJuIGhhbmRsZV90b19kZXZpY2UgW2ZkLTFdOworfQorCisvKgorICogT3BlbiBNQUMtZHJpdmVyIHdpdGggbmFtZSAnZGV2aWNlX25hbWUnIGZvciBsaXZlIGNhcHR1cmUgb2YKKyAqIG5ldHdvcmsgcGFja2V0cy4KKyAqLworcGNhcF90ICpwY2FwX29wZW5fbGl2ZSAoY29uc3QgY2hhciAqZGV2aWNlX25hbWUsIGludCBzbmFwbGVuLCBpbnQgcHJvbWlzYywKKyAgICAgICAgICAgICAgICAgICAgICAgIGludCB0aW1lb3V0X21zLCBjaGFyICplcnJidWYpCit7IAorICBzdHJ1Y3QgcGNhcCAqcGNhcDsKKworICBpZiAoc25hcGxlbiA8IEVUSF9NSU4pCisgICAgICBzbmFwbGVuID0gRVRIX01JTjsKKworICBpZiAoc25hcGxlbiA+IEVUSF9NQVgpICAgLyogc2lsZW50bHkgYWNjZXB0IGFuZCB0cnVuY2F0ZSBsYXJnZSBNVFVzICovCisgICAgICBzbmFwbGVuID0gRVRIX01BWDsKKworICBwY2FwID0gY2FsbG9jIChzaXplb2YoKnBjYXApLCAxKTsKKyAgaWYgKCFwY2FwKQorICB7CisgICAgc3RyY3B5IChlcnJidWYsICJOb3QgZW5vdWdoIG1lbW9yeSAocGNhcCkiKTsKKyAgICByZXR1cm4gKE5VTEwpOworICB9CisKKyAgcGNhcC0+c25hcHNob3QgICAgICAgICAgPSBtYXggKEVUSF9NSU4rOCwgc25hcGxlbik7CisgIHBjYXAtPmxpbmt0eXBlICAgICAgICAgID0gRExUX0VOMTBNQjsgIC8qICEhICovCisgIHBjYXAtPmludGVyX3BhY2tldF93YWl0ID0gdGltZW91dF9tczsKKyAgcGNhcC0+Y2xvc2Vfb3AgICAgICAgICAgPSBwY2FwX2Nsb3NlX2RvczsKKyAgcGNhcC0+cmVhZF9vcCAgICAgICAgICAgPSBwY2FwX3JlYWRfZG9zOworICBwY2FwLT5zdGF0c19vcCAgICAgICAgICA9IHBjYXBfc3RhdHNfZG9zOworICBwY2FwLT5pbmplY3Rfb3AgICAgICAgICA9IHBjYXBfc2V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KKyAgICAgKiBmaWx0ZXIgaXQsIGRvIHRoZSBjYWxsYmFjayBhbmQgcmVsZWFzZSB0aGUgYnVmZmVyLgorICAgICAqLworICAgIGlmIChkZXYtPnBlZWtfcnhfYnVmKQorICAgIHsKKyAgICAgIFBDQVBfQVNTRVJUIChkZXYtPnJlbGVhc2VfcnhfYnVmKTsKKyAgICAgIHJ4X2xlbiA9ICgqZGV2LT5wZWVrX3J4X2J1ZikgKCZyeF9idWYpOworICAgIH0KKyAgICBlbHNlCisgICAgeworICAgICAgQllURSBidWYgW0VUSF9NQVgrMTAwXTsgLyogYWRkIHNvbWUgbWFyZ2luICovCisgICAgICByeF9sZW4gPSAoKmRldi0+Y29weV9yeF9idWYpIChidWYsIHAtPnNuYXBzaG90KTsKKyAgICAgIHJ4X2J1ZiA9IGJ1ZjsKKyAgICB9CisKKyAgICBpZiAocnhfbGVuID4gMCkgIC8qIGdvdCBhIHBhY2tldCAqLworICAgIHsKKyAgICAgIG1hY19jb3VudCsrOworCisgICAgICBGTFVTSEsoKTsKKworICAgICAgcGNhcC5jYXBsZW4gPSBtaW4gKHJ4X2xlbiwgcC0+c25hcHNob3QpOworICAgICAgcGNhcC5sZW4gICAgPSByeF9sZW47CisKKyAgICAgIGlmIChjYWxsYmFjayAmJgorICAgICAgICAgICghZmNvZGUgfHwgYnBmX2ZpbHRlcihmY29kZSwgcnhfYnVmLCBwY2FwLmxlbiwgcGNhcC5jYXBsZW4pKSkKKyAgICAgIHsKKyAgICAgICAgZmlsdGVyX2NvdW50Kys7CisKKyAgICAgICAgLyogRml4LW1lISEgU2hvdWxkIGJlIHRpbWUgb2YgYXJyaXZhbC4gTm90IHRpbWUgb2YKKyAgICAgICAgICogY2FwdHVyZS4KKyAgICAgICAgICovCisgICAgICAgIGdldHRpbWVvZmRheTIgKCZwY2FwLnRzLCBOVUxMKTsKKyAgICAgICAgKCpjYWxsYmFjaykgKGRhdGEsICZwY2FwLCByeF9idWYpOworICAgICAgfQorCisgICAgICBpZiAoZGV2LT5yZWxlYXNlX3J4X2J1ZikKKyAgICAgICAgKCpkZXYtPnJlbGVhc2VfcnhfYnVmKSAocnhfYnVmKTsKKworICAgICAgaWYgKHBjYXBfcGt0X2RlYnVnID4gMCkKKyAgICAgIHsKKyAgICAgICAgaWYgKGNhbGxiYWNrID09IHdhdHQzMl9yZWN2X2hvb2spCisgICAgICAgICAgICAgZGJ1Z193cml0ZSAoInBjYXBfcmVjdl9ob29rXG4iKTsKKyAgICAgICAgZWxzZSBkYnVnX3dyaXRlICgicGNhcF9yZWFkX29wXG4iKTsKKyAgICAgIH0KKyAgICAgIEZMVVNISygpOworICAgICAgcmV0dXJuICgxKTsKKyAgICB9CisKKyAgICAvKiBJZiBub3QgdG8gd2FpdCBmb3IgYSBwYWNrZXQgb3IgcGNhcF9jbG9zZSgpIGNhbGxlZCBmcm9tCisgICAgICogZS5nLiBTSUdJTlQgaGFuZGxlciwgZXhpdCBsb29wIG5vdy4KKyAgICAgKi8KKyAgICBpZiAocC0+aW50ZXJfcGFja2V0X3dhaXQgPD0gMCB8fCAodm9sYXRpbGUgaW50KXAtPmZkIDw9IDApCisgICAgICAgYnJlYWs7CisKKyAgICBnZXR0aW1lb2ZkYXkyICgmbm93LCBOVUxMKTsKKworICAgIGlmICh0aW1lcmNtcCgmbm93LCAmZXhwaXJ5LCA+KSkKKyAgICAgICBicmVhazsKKworI2lmbmRlZiBESkdQUAorICAgIGtiaGl0KCk7ICAgIC8qIGEgcmVhbCBDUFUgaG9nICovCisjZW5kaWYKKworICAgIGlmIChwLT53YWl0X3Byb2MpCisgICAgICAoKnAtPndhaXRfcHJvYykoKTsgICAgIC8qIGNhbGwgeWllbGQgZnVuYyAqLworICB9CisKKyAgaWYgKHJ4X2xlbiA8IDApICAgICAgICAgICAgLyogcmVjZWl2ZSBlcnJvciAqLworICB7CisgICAgcC0+bWQuc3RhdC5wc19kcm9wKys7CisjaWZkZWYgVVNFXzMyQklUX0RSSVZFUlMKKyAgICBpZiAocGN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DbG9zZSBwY2FwIGRldmljZS4gTm90IGNhbGxlZCBmb3Igb2ZmbGluZSBjYXB0dXJlcy4KKyAqLworc3RhdGljIHZvaWQgcGNhcF9jbG9zZV9kb3MgKHBjYXBfdCAqcCkKK3sKKyAgaWYgKHAgJiYgIWV4Y19vY2N1cmVkKQorICB7CisgICAgaWYgKHBjYXBfc3RhdHMocCxOVUxMKSA8IDApCisgICAgICAgcC0+bWQuc3RhdC5wc19kcm9wID0gMDsKKyAgICBpZiAoIWdldF9kZXZpY2UocC0+ZmQpKQorICAgICAgIHJldHVybjsKKworICAgIGhhbmRsZV90b19kZXZpY2UgW3AtPmZkLTFdID0gTlVMTDsKKyAgICBwLT5mZCA9IDA7CisgICAgaWYgKHJlZl9jb3VudCA+IDApCisgICAgICAgIHJlZl9jb3VudC0tOworICAgIGlmIChyZWZfY291bnQgPiAwKQorICAgICAgIHJldHVybjsKKyAgfQorICBjbG9zZV9kcml2ZXIoKTsKK30KKworLyoKKyAqIFJldHVybiB0aGUgbmFtZSBvZiB0aGUgMXN0IG5ldHdvcmsgaW50ZXJmYWNlLAorICogb3IgTlVMTCBpZiBub25lIGNhbiBiZSBmb3VuZC4KKyAqLworY2hhciAqcGNhcF9sb29rdXBkZXYgKGNoYXIgKmVidWYpCit7CisgIHN0cnVjdCBkZXZpY2UgKmRldjsKKworI2lmZGVmIFVTRV8zMkJJVF9EUklWRVJTCisgIGluaXRfMzJiaXQoKTsKKyNlbmRpZgorCisgIGZvciAoZGV2ID0gKHN0cnVjdCBkZXZpY2UqKWRldl9iYXNlOyBkZXY7IGRldiA9IGRldi0+bmV4dCkKKyAgeworICAgIFBDQVBfQVNTRVJUIChkZXYtPnByb2JlKTsKKworICAgIGlmICgoKmRldi0+cHJvYmUpKGRldikpCisgICAgeworICAgICAgRkxVU0hLKCk7CisgICAgICBwcm9iZWRfZGV2ID0gKHN0cnVjdCBkZXZpY2UqKSBkZXY7IC8qIHJlbWVtYmVyIGxhc3QgcHJvYmVkIGRldmljZSAqLworICAgICAgcmV0dXJuIChjaGFyKikgZGV2LT5uYW1lOworICAgIH0KKyAgfQorCisgIGlmIChlYnVmKQorICAgICBzdHJjcHkgKGVidWYsICJObyBkcml2ZXIgZm91bmQiKTsKKyAgcmV0dXJuIChOVUxMKTsKK30KKworLyoKKyAqIEdldHMgbG9jYWxuZXQgJiBuZXRtYXNrIGZyb20gV2F0dC0zMi4KKyAqLworaW50IHBjYXBfbG9va3VwbmV0IChjb25zdCBjaGFyICpkZXZpY2UsIGJwZl91X2ludDMyICpsb2NhbG5ldCwKKyAgICAgICAgICAgICAgICAgICAgYnBmX3VfaW50MzIgKm5ldG1hc2ssIGNoYXIgKmVycmJ1ZikKK3sKKyAgaWYgKCFfd2F0dF9pc19pbml0KQorICB7CisgICAgc3RyY3B5IChlcnJidWYsICJwY2FwX29wZW5fb2ZmbGluZSgpIG9yIHBjYXBfb3Blbl9saXZlKCkgbXVzdCBiZSAiCisgICAgICAgICAgICAgICAgICAgICJjYWxsZWQgZmlyc3QiKTsKKyAgICByZXR1cm4gKC0xKTsKKyAgfQorCisgICpuZXRtYXNrICA9IF93MzJfc2luX21hc2s7CisgICpsb2NhbG5ldCA9IG15X2lwX2FkZHIgJiAqbmV0bWFzazsKKyAgaWYgKCpsb2NhbG5ldCA9PSAwKQorICB7CisgICAgaWYgKElOX0NMQVNTQSgqbmV0bWFzaykpCisgICAgICAgKmxvY2FsbmV0ID0gSU5fQ0xBU1NBX05FVDsKKyAgICBlbHNlIGlmIChJTl9DTEFTU0IoKm5ldG1hc2spKQorICAgICAgICpsb2NhbG5ldCA9IElOX0NMQVNTQl9ORVQ7CisgICAgZWxzZSBpZiAoSU5fQ0xBU1NDKCpuZXRtYXNrKSkKKyAgICAgICAqbG9jYWxuZXQgPSBJTl9DTEFTU0NfTkVUOworICAgIGVsc2UKKyAgICB7CisgICAgICBzcHJpbnRmIChlcnJidWYsICJpbmV0IGNsYXNzIGZvciAweCVseCB1bmtub3duIiwgKm5ldG1hc2sp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Lworc3RhdGljIHN0cnVjdCBkZXZpY2UgKgorb3Blbl9kcml2ZXIgKGNvbnN0IGNoYXIgKmRldl9uYW1lLCBjaGFyICplYnVmLCBpbnQgcHJvbWlzYykKK3sKKyAgc3RydWN0IGRldmljZSAqZGV2OworCisgIGZvciAoZGV2ID0gKHN0cnVjdCBkZXZpY2UqKWRldl9iYXNlOyBkZXY7IGRldiA9IGRldi0+bmV4dCkKKyAgeworICAgIFBDQVBfQVNTRVJUIChkZXYtPm5hbWUpOworCisgICAgaWYgKHN0cmNtcCAoZGV2X25hbWUsZGV2LT5uYW1lKSkKKyAgICAgICBjb250aW51ZTsKKworICAgIGlmICghcHJvYmVkX2RldikgICAvKiB1c2VyIGRpZG4ndCBjYWxsIHBjYXBfbG9va3VwZGV2KCkgZmlyc3QgKi8KKyAgICB7CisgICAgICBQQ0FQX0FTU0VSVCAoZGV2LT5wcm9iZSk7CisKKyAgICAgIGlmICghKCpkZXYtPnByb2JlKShkZXYpKSAgICAvKiBjYWxsIHRoZSB4eF9wcm9iZSgpIGZ1bmN0aW9uICovCisgICAgICB7CisgICAgICAgIHNwcmludGYgKGVidWYsICJmYWlsZWQgdG8gZGV0ZWN0IGRldmljZSBgJXMnIiwgZGV2X25hbWUpOworICAgICAgICByZXR1cm4gKE5VTEwpOworICAgICAgfQorICAgICAgcHJvYmVkX2RldiA9IGRldjsgIC8qIGRldmljZSBpcyBwcm9iZWQgb2theSBhbmQgbWF5IGJlIHVzZWQgKi8KKyAgICB9CisgICAgZWxzZSBpZiAoZGV2ICE9IHByb2JlZF9kZXYpCisgICAgeworICAgICAgZ290byBub3RfcHJvYmVkOworICAgIH0KKworICAgIEZMVVNISygpOworCisgICAgLyogU2VsZWN0IHdoYXQgdHJhZmZpYyB0byByZWNlaXZlCisgICAgICovCisgICAgaWYgKHByb21pc2MpCisgICAgICAgICBkZXYtPmZsYWdzIHw9ICAoSUZGX0FMTE1VTFRJIHwgSUZGX1BST01JU0MpOworICAgIGVsc2UgZGV2LT5mbGFncyAmPSB+KElGRl9BTExNVUxUSSB8IElGRl9QUk9NSVNDKTsKKworICAgIFBDQVBfQVNTRVJUIChkZXYtPm9wZW4pOworCisgICAgaWYgKCEoKmRldi0+b3BlbikoZGV2KSkKKyAgICB7CisgICAgICBzcHJpbnRmIChlYnVmLCAiZmFpbGVkIHRvIGFjdGl2YXRlIGRldmljZSBgJXMnIiwgZGV2X25hbWUpOworICAgICAgaWYgKHBrdEluZm8uZXJyb3IgJiYgIXN0cm5jbXAoZGV2LT5uYW1lLCJwa3QiLDMpKQorICAgICAgeworICAgICAgICBzdHJjYXQgKGVidWYsICI6ICIpOworICAgICAgICBzdHJjYXQgKGVidWYsIHBrdEluZm8uZXJyb3IpOworICAgICAgfQorICAgICAgcmV0dXJuIChOVUxMKTsKKyAgICB9CisKKyAgICAvKiBTb21lIGRldmljZXMgbmVlZCB0aGlzIHRvIG9wZXJhdGUgaW4gcHJvbWlzY291cyBtb2RlCisgICAgICovCisgICAgaWYgKHByb21pc2MgJiYgZGV2LT5zZXRfbXVsdGljYXN0X2xpc3QpCisgICAgICAgKCpkZXYtPnNldF9tdWx0aWNhc3RfbGlzdCkgKGRldik7CisKKyAgICBhY3RpdmVfZGV2ID0gZGV2OyAgIC8qIHJlbWVtYmVyIG91ciBhY3RpdmUgZGV2aWNlICovCisgICAgYnJlYWs7CisgIH0KKworICAvKiAnZGV2X25hbWUnIG5vdCBtYXRjaGVkIGluICdkZXZfYmFzZScgbGlzdC4KKyAgICovCisgIGlmICghZGV2KQorICB7CisgICAgc3ByaW50ZiAoZWJ1ZiwgImRldmljZSBgJXMnIG5vdCBzdXBwb3J0ZWQiLCBkZXZfbmFtZSk7CisgICAgcmV0dXJuIChOVUxMKTsKKyAgfQorCitub3RfcHJvYmVkOgorICBpZiAoIXByb2JlZF9kZXYpCisgIHsKKyAgICBzcHJpbnRmIChlYnVmLCAiZGV2aWNlIGAlcycgbm90IHByb2JlZCIsIGRldl9uYW1lKTsKKyAgICByZXR1cm4gKE5VTEwpOworICB9CisgIHJldHVybiAoZGV2KTsKK30KKworLyoKKyAqIERlaW5pdGlhbGlzZSBNQUMgZHJpdmVyLgorICogU2V0IHJlY2VpdmUgbW9kZSBiYWNrIHRvIGRlZmF1bHQgbW9kZS4KKyAqLworc3RhdGljIHZvaWQgY2xvc2VfZHJpdmVyICh2b2lkKQoreworICAvKiAhIXRvZG86IGxvb3Agb3ZlciBhbGwgJ2hhbmRsZV90b19kZXZpY2VbXScgPyAqLworICBzdHJ1Y3QgZGV2aWNlICpkZXYgPSBhY3RpdmVfZGV2OworCisgIGlmIChkZXYgJiYgZGV2LT5jbG9zZSkKKyAgeworICAgICgqZGV2LT5jbG9zZSkgKGRldik7CisgICAgRkxVU0hLKCk7CisgIH0KKworICBhY3RpdmVfZGV2ID0gTlVMTDsKKworI2lmZGVmIFVTRV8zMkJJVF9EUklWRVJTCisgIGlmIChyeF9wb29sKQorICB7CisgICAga19mcmVlIChyeF9wb29sKTsKKyAgICByeF9wb29sID0gTlVMTDsKKyAgfQorICBpZiAoZGV2KQorICAgICBwY2liaW9zX2V4aXQoKTsKKyNlbmRpZgorfQorCisKKyNpZmRlZiBfX0RKR1BQX18KK3N0YXRpYyB2b2lkIHNldHVwX3NpZ25hbHMgKHZvaWQgKCpoYW5kbGVyKShpbnQpKQoreworICBzaWduYWwgKFNJR1NFR1YsaGFuZGxlcik7CisgIHNpZ25hbCAoU0lHSUxMLCBoYW5kbGVyKTsKKyAgc2lnbmFsIChTSUdGUEUsIGhhbmRsZXIpOworfQorCitzdGF0aWMgdm9pZCBleGNfaGFuZGxlciAoaW50IHNpZykKK3sKKyNpZmRlZiBVU0VfMzJCSVRfRFJJVkVSUworICBpZiAoYWN0aXZlX2Rldi0+aXJxID4gMCkgICAgLyogZXhjbHVkZXMgSVJRIDAgKi8KKyAgeworICAgIGRpc2FibGVfaXJxIChhY3RpdmVfZGV2LT5pcnEpOworICAgIGlycV9lb2lfY21kIChhY3RpdmVfZGV2LT5pc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K30KKworI2lmZGVmIFVTRV8zMkJJVF9EUklWRVJTCitzdGF0aWMgdm9pZCBpbml0XzMyYml0ICh2b2lkKQoreworICBzdGF0aWMgaW50IGluaXRfcGNpID0gMDsKKworICBpZiAoIV9wcmludGtfZmlsZSkKKyAgICAgX3ByaW50a19pbml0ICg2NCoxMDI0LCBOVUxMKTsgLyogY2FsbHMgYXRleGl0KHByaW50a19leGl0KSAqLworCisgIGlmICghaW5pdF9wY2kpCisgICAgICh2b2lkKXBjaV9pbml0KCk7ICAgICAgICAgICAgIC8qIGluaXQgQklPUzMyK1BDSSBpbnRlcmZhY2UgKi8KKyAgaW5pdF9wY2kgPSAxOworfQorI2VuZGlmCisKKworLyoKKyAqIEhvb2sgZnVuY3Rpb25zIGZvciB1c2luZyBXYXR0LTMyIHRvZ2V0aGVyIHdpdGggcGNhcAorICovCitzdGF0aWMgY2hhciByeGJ1ZiBbRVRIX01BWCsxMDBdOyAvKiByeC1idWZmZXIgd2l0aCBzb21lIG1hcmdpbiAqLworc3RhdGljIFdPUkQgZXR5cGU7CitzdGF0aWMgcGNhcF90IHBjYXBfc2F2ZTsKKworc3RhdGljIHZvaWQgd2F0dDMyX3JlY3ZfaG9vayAodV9jaGFyICpkdW1teSwgY29uc3Qgc3RydWN0IHBjYXBfcGt0aGRyICpwY2FwLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdV9jaGFyICpidWYpCit7CisgIC8qIEZpeCBtZTogYXNzdW1lcyBFdGhlcm5ldCBJSSBvbmx5ICovCisgIHN0cnVjdCBldGhlcl9oZWFkZXIgKmVwID0gKHN0cnVjdCBldGhlcl9oZWFkZXIqKSBidWY7CisKKyAgbWVtY3B5IChyeGJ1ZiwgYnVmLCBwY2FwLT5jYXBsZW4pOworICBldHlwZSA9IGVwLT5ldGhlcl90eXBlOworICBBUkdTVVNFRCAoZHVtbXkpOworfQorCisjaWYgKFdBVFRDUF9WRVIgPj0gMHgwMjI0KQorLyoKKyAqIFRoaXM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hbmQgcmVzb2x2ZV9pcCgpCisgICAqLworICBsYXN0X25hbWVzZXJ2ZXIgPSAwOworI2VuZGlmCisgIHJldHVybiAoMSk7Cit9CisKK2ludCBFSVNBX2J1cyA9IDA7ICAvKiBXaGVyZSBpcyBuYXR1cmFsIHBsYWNlIGZvciB0aGlzPyAqLworCisvKgorICogQXBwbGljYXRpb24gY29uZmlnIGhvb2tzIHRvIHNldCB2YXJpb3VzIGRyaXZlciBwYXJhbWV0ZXJzLgorICovCisKK3N0YXRpYyBzdHJ1Y3QgY29uZmlnX3RhYmxlIGRlYnVnX3RhYltdID0geworICAgICAgICAgICAgeyAiUEtULkRFQlVHIiwgICAgICAgQVJHX0FUT0ksICAgJnBjYXBfcGt0X2RlYnVnICAgIH0sCisgICAgICAgICAgICB7ICJQS1QuVkVDVE9SIiwgICAgICBBUkdfQVRPWF9XLCBOVUxMICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIHsgIk5ESVMuREVCVUciLCAgICAgIEFSR19BVE9JLCAgIE5VTEwgICAgICAgICAgICAgICB9LAorI2lmZGVmIFVTRV8zMkJJVF9EUklWRVJTCisgICAgICAgICAgICB7ICIzQzUwMy5ERUJVRyIsICAgICBBUkdfQVRPSSwgICAmZWlfZGVidWcgICAgICAgICAgfSwKKyAgICAgICAgICAgIHsgIjNDNTAzLklPX0JBU0UiLCAgIEFSR19BVE9YX1csICZlbDJfZGV2LmJhc2VfYWRkciB9LAorICAgICAgICAgICAgeyAiM0M1MDMuTUVNT1JZIiwgICAgQVJHX0FUT1hfVywgJmVsMl9kZXYubWVtX3N0YXJ0IH0sCisgICAgICAgICAgICB7ICIzQzUwMy5JUlEiLCAgICAgICBBUkdfQVRPSSwgICAmZWwyX2Rldi5pcnEgICAgICAgfSwKKyAgICAgICAgICAgIHsgIjNDNTA1LkRFQlVHIiwgICAgIEFSR19BVE9JLCAgIE5VTEwgICAgICAgICAgICAgICB9LAorICAgICAgICAgICAgeyAiM0M1MDUuQkFTRSIsICAgICAgQVJHX0FUT1hfVywgTlVMTCAgICAgICAgICAgICAgIH0sCisgICAgICAgICAgICB7ICIzQzUwNy5ERUJVRyIsICAgICBBUkdfQVRPSSwgICBOVUxMICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIHsgIjNDNTA5LkRFQlVHIiwgICAgIEFSR19BVE9JLCAgICZlbDNfZGVidWcgICAgICAgICB9LAorICAgICAgICAgICAgeyAiM0M1MDkuSUxPT1AiLCAgICAgQVJHX0FUT0ksICAgJmVsM19tYXhfbG9vcCAgICAgIH0sCisgICAgICAgICAgICB7ICIzQzUyOS5ERUJVRyIsICAgICBBUkdfQVRPSSwgICBOVUxMICAgICAgICAgICAgICAgfSwKKyAgICAgICAgICAgIHsgIjNDNTc1LkRFQlVHIiwgICAgIEFSR19BVE9JLCAgICZkZWJ1Z18zYzU3NSAgICAgICB9LAorICAgICAgICAgICAgeyAiM0M1OVguREVCVUciLCAgICAgQVJHX0FUT0ksICAgJnZvcnRleF9kZWJ1ZyAgICAgIH0sCisgICAgICAgICAgICB7ICIzQzU5WC5JRkFDRTAiLCAgICBBUkdfQVRPSSwgICAmdm9ydGV4X29wdGlvbnNbMF0gfSwKKyAgICAgICAgICAgIHsgIjNDNTlYLklGQUNFMSIsICAgIEFSR19BVE9JLCAgICZ2b3J0ZXhfb3B0aW9uc1sxXSB9LAorICAgICAgICAgICAgeyAiM0M1OVguSUZBQ0UyIiwgICAgQVJHX0FUT0ksICAgJnZvcnRleF9vcHRpb25zWzJdIH0sCisgICAgICAgICAgICB7ICIzQzU5WC5JRkFDRTMiLCAgICBBUkdfQVRPSSwgICAmdm9ydGV4X29wdGlvbnNbM10gfSwKKyAgICAgICAgICAgIHsgIjNDOTBYLkRFQlVHIiwgICAgIEFSR19BVE9YX1csICZ0YzkweGJjX2RlYnVnICAgICB9LAorICAgICAgICAgICAgeyAiQUNDVC5ERUJVRyIsICAgICAgQVJHX0FUT0ksICAgJmV0aHBrX2RlYnVnICAgICAgIH0sCisgICAgICAgICAgICB7ICJDUzg5LkRFQlVHIiwgICAgICBBUkdfQVRPSSwgICAmY3M4OV9kZWJ1ZyAgICAgICAgfSwKKyAgICAgICAgICAgIHsgIlJUTDgxMzkuREVCVUciLCAgIEFSR19BVE9JLCAgICZydGw4MTM5X2RlYnVnICAgICB9LAorICAgICAgICAvKiAgeyAiUlRMODEzOS5GRFVQTEVYIiwgQVJHX0FUT0ksICAgJnJ0bDgxMzlfb3B0aW9ucyAgIH0sICovCisgICAgICAgICAgICB7ICJTTUMuREVCVUciLCAgICAgICBBUkdfQVRPSSwgICAmZWlfZGVidWcgICAgICAgICAgfSwKKyAgICAgICAgLyogIHsgIkUxMDAuREVCVUciLCAgICAgIEFSR19BVE9JLCAgICZlMTAwX2RlYnVnICAgICAgICB9LCAqLworICAgICAgICAgICAgeyAiUENJLkRFQlVHIiwgICAgICAgQVJHX0FUT0ksICAgJnBjaV9kZWJ1ZyAgICAgICAgIH0sCisgICAgICAgICAgICB7ICJCSU9TMzIuREVCVUciLCAgICBBUkdfQVRPSSwgICAmYmlvczMyX2RlYnVnICAgICAgfSwKKyAgICAgICAgICAgIHsgIklSUS5ERUJVRyIsICAgICAgIEFSR19BVE9JLCAgICZpcnFfZGVidWcgICAgICAgICB9LAorICAgICAgICAgICAgeyAiVElNRVIuSVJRIiwgICAgICAgQVJHX0FUT0ksICAgJnRpbWVyX2lycSAgICAgICAgIH0sCisjZW5kaWYKKyAgICAgICAgICAgIHsgTlVMTCB9CisgICAgICAgICAgfTsKKworLyoKKyAqIHBjYXBfY29uZmlnX2hvb2soKSBpcyBhbiBleHRlbnNpb24gdG8gYXBwbGljYXRpb24ncyBjb25maWcKKyAqIGhhbmRsaW5nLiBVc2VzIFdhdHQtMzIncyBjb25maWctdGFibGUgZnVuY3Rpb24uCisgKi8KK2ludCBwY2FwX2NvbmZpZ19ob29rIChjb25zdCBjaGFyICpuYW1lLCBjb25zdCBjaGFyICp2YWx1ZSkKK3sKKyAgcmV0dXJuIHBhcnNl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IGlmICghUGt0U2VhcmNoRHJpdmVyKCkpCisgICAgIHJldHVybiAoMCk7CisKKyAgZGV2LT5vcGVuICAgICAgICAgICA9IHBrdF9vcGVuOworICBkZXYtPnhtaXQgICAgICAgICAgID0gcGt0X3htaXQ7CisgIGRldi0+Y2xvc2UgICAgICAgICAgPSBwa3RfY2xvc2U7CisgIGRldi0+Z2V0X3N0YXRzICAgICAgPSBwa3Rfc3RhdHM7CisgIGRldi0+Y29weV9yeF9idWYgICAgPSBQa3RSZWNlaXZlOyAgLyogZmFybWVtIHBlZWsgYW5kIGNvcHkgcm91dGluZSAqLworICBkZXYtPmdldF9yeF9idWYgICAgID0gTlVMTDsKKyAgZGV2LT5wZWVrX3J4X2J1ZiAgICA9IE5VTEw7CisgIGRldi0+cmVsZWFzZV9yeF9idWYgPSBOVUxMOworICBkZXYtPnByaXYgICAgICAgICAgID0gY2FsbG9jIChzaXplb2Yoc3RydWN0IG5ldF9kZXZpY2Vfc3RhdHMpLCAxKTsKKyAgaWYgKCFkZXYtPnByaXYpCisgICAgIHJldHVybiAoMCk7CisgIHJldHVybiAoMSk7Cit9CisKKy8qCisgKiBORElTIGRldmljZSBmdW5jdGlvbnMKKyAqLworc3RhdGljIHZvaWQgbmRpc19jbG9zZSAoc3RydWN0IGRldmljZSAqZGV2KQoreworI2lmZGVmIFVTRV9ORElTMgorICBOZGlzU2h1dGRvd24oKTsKKyNlbmRpZgorICBBUkdTVVNFRCAoZGV2KTsKK30KKworc3RhdGljIGludCBuZGlzX29wZW4gKHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKyAgaW50IHByb21pcyA9IChkZXYtPmZsYWdzICYgSUZGX1BST01JU0MpOworCisjaWZkZWYgVVNFX05ESVMyCisgIGlmICghTmRpc0luaXQocHJvbWlzKSkKKyAgICAgcmV0dXJuICgwKTsKKyAgcmV0dXJuICgxKTsKKyNlbHNlCisgIEFSR1NVU0VEIChwcm9taXMpOworICByZXR1cm4gKDApOworI2VuZGlmCit9CisKK3N0YXRpYyB2b2lkICpuZGlzX3N0YXRzIChzdHJ1Y3QgZGV2aWNlICpkZXYpCit7CisgIHN0YXRpYyBzdHJ1Y3QgbmV0X2RldmljZV9zdGF0cyBzdGF0czsKKworICAvKiB0by1kbyAqLworICBBUkdTVVNFRCAoZGV2KTsKKyAgcmV0dXJuICgmc3RhdHMpOworfQorCitzdGF0aWMgaW50IG5kaXNfcHJvYmUgKHN0cnVjdCBkZXZpY2UgKmRldikKK3sKKyNpZmRlZiBVU0VfTkRJUzIKKyAgaWYgKCFOZGlzT3BlbigpKQorICAgICByZXR1cm4gKDApOworI2VuZGlmCisKKyAgZGV2LT5vcGVuICAgICAgICAgICA9IG5kaXNfb3BlbjsKKyAgZGV2LT54bWl0ICAgICAgICAgICA9IE5VTEw7CisgIGRldi0+Y2xvc2UgICAgICAgICAgPSBuZGlzX2Nsb3NlOworICBkZXYtPmdldF9zdGF0cyAgICAgID0gbmRpc19zdGF0czsKKyAgZGV2LT5jb3B5X3J4X2J1ZiAgICA9IE5VTEw7ICAgICAgIC8qIHRvLWRvICovCisgIGRldi0+Z2V0X3J4X2J1ZiAgICAgPSBOVUxMOyAgICAgICAvKiB1cGNhbGwgaXMgZnJvbSBybW9kZSBkcml2ZXIgKi8KKyAgZGV2LT5wZWVrX3J4X2J1ZiAgICA9IE5VTEw7CisgIGRldi0+cmVsZWFzZV9yeF9idWYgPSBOVUxMOworICByZXR1cm4gKDApOworfQorCisvKgorICogU2VhcmNoICYgcHJvYmUgZm9yIHN1cHBvcnRlZCAzMi1iaXQgKHBtb2RlKSBwY2FwIGRldmljZXMKKyAqLworI2lmIGRlZmluZWQoVVNFXzMyQklUX0RSSVZFUlMpCisKK3N0cnVjdCBkZXZpY2UgZWwyX2RldiBMT0NLRURfVkFSID0geworICAgICAgICAgICAgICAiM2M1MDMiLAorICAgICAgICAgICAgICAiRXRoZXJMaW5rIElJIiwKKyAgICAgICAgICAgICAgMCwKKyAgICAgICAgICAgICAgMCwwLDAsMCwwLDAsCisgICAgICAgICAgICAgIE5VTEwsCisgICAgICAgICAgICAgIGVsMl9wcm9iZQorICAgICAgICAgICAgfTsKKworc3RydWN0IGRldmljZSBlbDNfZGV2IExPQ0tFRF9WQVIgPSB7CisgICAgICAgICAgICAgICIzYzUwOSIsCisgICAgICAgICAgICAgICJFdGhlckxpbmsgSUlJIiwKKyAgICAgICAgICAgICAgMCwKKyAgICAgICAgICAgICAgMCwwLDAsMCwwLDAsCisgICAgICAgICAgICAgICZlbDJfZGV2LAorICAgICAgICAgICAgICBlbDNfcHJvYmUKKyAgICAgICAgICAgIH07CisKK3N0cnVjdCBkZXZpY2UgdGM1MTVfZGV2IExPQ0tFRF9WQVIgPSB7CisgICAgICAgICAgICAgICIzYzUxNSIsCisgICAgICAgICAgICAgICJFdGhlckxpbmsgUENJIiwKKyAgICAgICAgICAgICAgMCwKKyAgICAgICAgICAgICAgMCwwLDAsMCwwLDAsCisgICAgICAgICAgICAgICZlbDNfZGV2LAorICAgICAgICAgICAgICB0YzUxNV9wcm9iZQorICAgICAgICAgICAgfTsKKworc3RydWN0IGRldmljZSB0YzU5X2RldiBMT0NLRURfVkFSID0geworICAgICAgICAgICAgICAiM2M1OXgiLAorICAgICAgICAgICAgICAiRXRoZXJMaW5rIFBDSSIsCisgICAgICAgICAgICAgIDAsCisgICAgICAgICAgICAgIDAsMCwwLDAsMCwwLAorICAgICAgICAgICAgICAmdGM1MTVfZGV2LAorICAgICAgICAgICAgICB0YzU5eF9wcm9iZQorICAgICAgICAgICAgfTsKKworc3RydWN0IGRldmljZSB0YzkweGJjX2RldiBMT0NLRURfVkFSID0geworICAgICAgICAgICAgICAiM2M5MHgiLAorICAgICAgICAgICAgICAiRXRoZXJMaW5rIDkwWCIsCisgICAgICAgICAgICAgIDAsCisgICAgICAgICAgICAgIDAsMCwwLDAsMCwwLAorICAgICAgICAgICAgICAmdGM1OV9kZXYsCisgICAgICAgICAgICAgIHRjOTB4YmNfcHJvYmUKKyAgICAgICAgICAgIH07CisKK3N0cnVjdCBkZXZpY2Ugd2RfZGV2IExPQ0tFRF9WQVIgPSB7CisgICAgICAgICAgICAgICJ3ZCIsCisgICAgICAgICAgICAgICJXZXN0ZW4gRGlnaXRhbCIsCisgICAgICAgICAgICAgIDAsCisgICAgICAgICAgICAgIDAsMCwwLDAsMCwwLAorICAgICAgICAgICAgICAmdGM5MHhiY19kZXYsCisgICAgICAgICAgICAgIHdkX3Byb2JlCisgICAgICAgICAgICB9OworCitzdHJ1Y3QgZGV2aWNlIG5lX2RldiBMT0NLRURfVkFSID0geworICAgICAgICAgICAgICAibmUiLAorICAgICAgICAgICAgICAiTkV4MDAwIiwKKyAgICAgICAgICAgICAgMCwKKyAgICAgICAgICAgICAgMCwwLDAsMCwwLDAsCisgICAgICAgICAgICAgICZ3ZF9kZXYsCisgICAgICAgICAgICAgIG5lX3Byb2JlCisgICAgICAgICAgICB9OworCitzdHJ1Y3QgZGV2aWNlIGFjY3RfZGV2IExPQ0tFRF9WQVIgPSB7CisgICAgICAgICAgICAgICJhY2N0IiwKKyAgICAgICAgICAgICAgIkFjY3RvbiBFdGhlclBvY2tldCIsCisgICAgICAgICAgICAgIDAsCisgICAgICAgICAgICAgIDAsMCwwLDAsMCwwLAorICAgICAgICAgICAgICAmbmVfZGV2LAorICAgICAgICAgICAgICBldGhwa19wcm9iZQorICAgICAgICAgICAgfTsKKworc3RydWN0IGRldmljZSBjczg5X2RldiBMT0NLRURfVkFSID0geworICAgICAgICAgICAgICAiY3M4OSIsCisgICAgICAgICAgICAgICJDcnlzdGFsIFNlbWljb25kdWN0b3IiLAorICAgICAgICAgICAgICAwLAorICAgICAgICAgICAgICAwLDAsMCwwLDAsMCwKKyAgICAgICAgICAgICAgJmFjY3RfZGV2LAorICAgICAgICAgICAgICBjczg5eDBfcHJvYmUKKyAgICAgICAgICAgIH07CisKK3N0cnVjdCBkZXZpY2UgcnRsODEzOV9kZXYgTE9DS0VEX1ZBUiA9IHsKKyAgICAgICAgICAgICAgInJ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ldHVybiAoMSk7Cit9CisKK3N0YXRpYyBpbnQgcGt0cV9pbml0IChzdHJ1Y3QgcnhfcmluZ2J1ZiAqcSwgaW50IHNpemUsIGludCBudW0sIGNoYXIgKnBvb2wpCit7CisgIGludCBpOworCisgIHEtPmVsZW1fc2l6ZSA9IHNpemU7CisgIHEtPm51bV9lbGVtICA9IG51bTsKKyAgcS0+YnVmX3N0YXJ0ID0gcG9vbDsKKyAgcS0+aW5faW5kZXggID0gMDsKKyAgcS0+b3V0X2luZGV4ID0gMDsKKworICBQQ0FQX0FTU0VSVCAoc2l6ZSA+PSBzaXplb2Yoc3RydWN0IHJ4X2VsZW0pICsgc2l6ZW9mKERXT1JEKSk7CisgIFBDQVBfQVNTRVJUIChudW0pOworICBQQ0FQX0FTU0VSVCAocG9vbCk7CisKKyAgZm9yIChpID0gMDsgaSA8IG51bTsgaSsrKQorICB7CisjaWYgMAorICAgIHN0cnVjdCByeF9lbGVtICplbGVtID0gKHN0cnVjdCByeF9lbGVtKikgcG9vbDsKKworICAgIC8qIGFzc2VydCBkd29yZCBhbGlnbmVkIGVsZW1lbnRzCisgICAgICovCisgICAgUENBUF9BU1NFUlQgKCgodW5zaWduZWQpKCZlbGVtLT5kYXRhWzBdKSAmIDMpID09IDApOworI2VuZGlmCisgICAgcG9vbCArPSBzaXplOworICAgICooRFdPUkQqKSAocG9vbCAtIHNpemVvZihEV09SRCkpID0gUEtUUV9NQVJLRVI7CisgIH0KKyAgcmV0dXJuICgxKTsKK30KKworLyoKKyAqIEluY3JlbWVudCB0aGUgcXVldWUgJ291dF9pbmRleCcgKHRhaWwpLgorICogQ2hlY2sgZm9yIHdyYXBzLgorICovCitzdGF0aWMgaW50IHBrdHFfaW5jX291dCAoc3RydWN0IHJ4X3JpbmdidWYgKnEpCit7CisgIHEtPm91dF9pbmRleCsrOworICBpZiAocS0+b3V0X2luZGV4ID49IHEtPm51bV9lbGVtKQorICAgICAgcS0+b3V0X2luZGV4ID0gMDsKKyAgcmV0dXJ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worICAgICAgICAgaW50ICAgICAgICAgIG51bV9lbGVtOyAgIC8qIG51bWJlciBvZiBlbGVtZW50cyAqLworICAgICAgICAgY2hhciAgICAgICAgKmJ1Zl9zdGFydDsgIC8qIHN0YXJ0IG9mIGJ1ZmZlciBwb29sICovCisgICAgICAgfTsKKworICBzdHJ1Y3QgcnhfZWxlbSB7CisgICAgICAgICBEV09SRCBzaXplOyAgICAgICAgICAgICAgLyogc2l6ZSBjb3BpZWQgdG8gdGhpcyBlbGVtZW50ICovCisgICAgICAgICBCWVRFICBkYXRhW0VUSF9NQVgrMTBdOyAgLyogYWRkIHNvbWUgbWFyZ2luLiBkYXRhWzBdIHNob3VsZCBiZSAqLworICAgICAgIH07ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGR3b3JkIGFsaWduZWQgKi8KKworICBleHRlcm4gQllURSAqZ2V0X3J4YnVmICAgICAoaW50IGxlbikgTE9DS0VEX0ZVTkM7CisgIGV4dGVybiBpbnQgICBwZWVrX3J4YnVmICAgIChCWVRFICoqYnVmKTsKKyAgZXh0ZXJuIGludCAgIHJlbGVhc2VfcnhidWYgKEJZVEUgICpidWYpOworCisjZWxzZQorICAjZGVmaW5lIExPQ0tFRF9WQVIKKyAgI2RlZmluZSBMT0NLRURfRlVOQworCisgIHN0cnVjdCBkZXZpY2UgeworICAgICAgICAgY29uc3QgY2hhciAqbmFtZTsKKyAgICAgICAgIGNvbnN0IGNoYXIgKmxvbmdfbmFtZTsKKyAgICAgICAgIERXT1JEICBiYXNlX2FkZHI7ICAgICAgLyogZGV2aWNlIEkvTyBhZGRyZXNzICAgICAgICovCisgICAgICAgICBpbnQgICAgaXJxOyAgICAgICAgICAgIC8qIGRldmljZSBJUlEgbnVtYmVyICAgICAgICAqLworICAgICAgICAgaW50ICAgIGRtYTsgICAgICAgICAgICAvKiBETUEgY2hhbm5lbCAgICAgICAgICAgICAgKi8KKyAgICAgICAgIERXT1JEICBtZW1fc3RhcnQ7ICAgICAgLyogc2hhcmVkIG1lbSBzdGFydCAgICAgICAgICovCisgICAgICAgICBEV09SRCAgbWVtX2VuZDsgICAgICAgIC8qIHNoYXJlZCBtZW0gZW5kICAgICAgICAgICAqLworICAgICAgICAgRFdPUkQgIHJtZW1fc3RhcnQ7ICAgICAvKiBzaG1lbSAicmVjdiIgc3RhcnQgICAgICAgKi8KKyAgICAgICAgIERXT1JEICBybWVtX2VuZDsgICAgICAgLyogc2hhcmVkICJyZWN2IiBlbmQgICAgICAgICovCisKKyAgICAgICAgIHN0cnVjdCBkZXZpY2UgKm5leHQ7ICAgLyogbmV4dCBkZXZpY2UgaW4gbGlzdCAgICAgICovCisKKyAgICAgICAgIC8qIGludGVyZmFjZSBzZXJ2aWNlIHJvdXRpbmVzICovCisgICAgICAgICBpbnQgICAoKnByb2JlKShzdHJ1Y3QgZGV2aWNlICpkZXYpOworICAgICAgICAgaW50ICAgKCpvcGVuKSAoc3RydWN0IGRldmljZSAqZGV2KTsKKyAgICAgICAgIHZvaWQgICgqY2xvc2UpKHN0cnVjdCBkZXZpY2UgKmRldik7CisgICAgICAgICBpbnQgICAoKnhtaXQpIChzdHJ1Y3QgZGV2aWNlICpkZXYsIGNvbnN0IHZvaWQgKmJ1ZiwgaW50IGxlbik7CisgICAgICAgICB2b2lkICooKmdldF9zdGF0cykoc3RydWN0IGRldmljZSAqZGV2KTsKKyAgICAgICAgIHZvaWQgICgqc2V0X211bHRpY2FzdF9saXN0KShzdHJ1Y3QgZGV2aWNlICpkZXYpOworCisgICAgICAgICAvKiBkcml2ZXItdG8tcGNhcCByZWNlaXZlIGJ1ZmZlciByb3V0aW5lcyAqLworICAgICAgICAgaW50ICAgKCpjb3B5X3J4X2J1ZikgKEJZVEUgKmJ1ZiwgaW50IG1heCk7IC8qIHJ4LWNvcHkgKHBrdGRydnIgb25seSkgKi8KKyAgICAgICAgIEJZVEUgKigqZ2V0X3J4X2J1ZikgKGludCBsZW4pOyAgICAgICAgICAgICAvKiByeC1idWYgZmV0Y2gvZW5xdWV1ZSAqLworICAgICAgICAgaW50ICAgKCpwZWVrX3J4X2J1ZikgKEJZVEUgKipidWYpOyAgICAgICAgIC8qIHJ4LW5vbi1jb3B5IGF0IHF1ZXVlICovCisgICAgICAgICBpbnQgICAoKnJlbGVhc2VfcnhfYnVmKSAoQllURSAqYnVmKTsgICAgICAgLyogcmVsZWFzZSBhZnRlciBwZWVrICovCisKKyAgICAgICAgIFdPUkQgICBmbGFnczsgICAgICAgICAgLyogTG93LWxldmVsIHN0YXR1cyBmbGFncy4gKi8KKyAgICAgICAgIHZvaWQgICpwcml2OyAgICAgICAgICAgLyogcHJpdmF0ZSBkYXRhICovCisgICAgICAgfTsKKworICAvKgorICAgKiBOZXR3b3JrIGRldmljZSBzdGF0aXN0aWNzCisgICAqLworICB0eXBlZGVmIHN0cnVjdCBuZXRfZGV2aWNlX3N0YXRzIHsKKyAgICAgICAgICBEV09SRCAgcnhfcGFja2V0czsgICAgICAgICAgICAvKiB0b3RhbCBwYWNrZXRzIHJlY2VpdmVkICAgICAgICovCisgICAgICAgICAgRFdPUkQgIHR4X3BhY2tldHM7ICAgICAgICAgICAgLyogdG90YWwgcGFja2V0cyB0cmFuc21pdHRlZCAgICAqLworICAgICAgICAgIERXT1JEICByeF9ieXRlczsgICAgICAgICAgICAgIC8qIHRvdGFsIGJ5dGVzIHJlY2VpdmVkICAgICAgICAgKi8KKyAgICAgICAgICBEV09SRCAgdHhfYnl0ZXM7ICAgICAgICAgICAgICAvKiB0b3RhbCBieXRlcyB0cmFuc21pdHRlZCAgICAgICovCisgICAgICAgICAgRFdPUkQgIHJ4X2Vycm9yczsgICAgICAgICAgICAgLyogYmFkIHBhY2tldHMgcmVjZWl2ZWQgICAgICAgICAqLworICAgICAgICAgIERXT1JEICB0eF9lcnJvcnM7ICAgICAgICAgICAgIC8qIHBhY2tldCB0cmFuc21pdCBwcm9ibGVtcyAgICAgKi8KKyAgICAgICAgICBEV09SRCAgcnhfZHJvcHBlZDsgICAgICAgICAgICAvKiBubyBzcGFjZSBpbiBSeCBidWZmZXJzICAgICAgICovCisgICAgICAgICAgRFdPUkQgIHR4X2Ryb3BwZWQ7ICAgICAgICAgICAgLyogbm8gc3BhY2UgYXZhaWxhYmxlIGZvciBUeCAgICAqLworICAgICAgICAgIERXT1JEICBtdWx0aWNhc3Q7ICAgICAgICAgICAgIC8qIG11bHRpY2FzdCBwYWNrZXRzIHJlY2VpdmVkICAgKi8KKworICAgICAgICAgIC8qIGRldGFpbGVkIHJ4X2Vycm9yczogKi8KKyAgICAgICAgICBEV09SRCAgcnhfbGVuZ3RoX2Vycm9yczsKKyAgICAgICAgICBEV09SRCAgcnhfb3Zlcl9lcnJvcnM7ICAgICAgICAvKiByZWN2J3Igb3ZlcnJ1biBlcnJvciAgICAgICAgICovCisgICAgICAgICAgRFdPUkQgIHJ4X29zaXplX2Vycm9yczsgICAgICAgLyogcmVjdidyIG92ZXItc2l6ZSBlcnJvciAgICAgICAqLworICAgICAgICAgIERXT1JEICByeF9jcmNfZXJyb3JzOyAgICAgICAgIC8qIHJlY3YnZCBwa3Qgd2l0aCBjcmMgZXJyb3IgICAgKi8KKyAgICAgICAgICBEV09SRCAgcnhfZnJhbWVfZXJyb3JzOyAgICAgICAvKiByZWN2J2QgZnJhbWUgYWxpZ25tZW50IGVycm9yICovCisgICAgICAgICAgRFdPUkQgIHJ4X2ZpZm9fZXJyb3JzOyAgICAgICAgLyogcmVjdidyIGZpZm8gb3ZlcnJ1biAgICAgICAgICAqLworICAgICAgICAgIERXT1JEICByeF9taXNzZWRfZXJyb3JzOyAgICAgIC8qIHJlY3YnciBtaXNzZWQgcGFja2V0ICAgICAgICAgKi8KKworICAgICAgICAgIC8qIGRldGFpbGVkIHR4X2Vycm9ycyAqLworICAgICAgICAgIERXT1JEICB0eF9hYm9ydGVkX2Vycm9yczsKKyAgICAgICAgICBEV09SRCAgdHhfY2Fycmllcl9lcnJvcnM7CisgICAgICAgICAgRFdPUkQgIHR4X2ZpZm9fZXJyb3JzOworICAgICAgICAgIERXT1JEICB0eF9oZWFydGJlYXRfZXJyb3JzOworICAgICAgICAgIERXT1JEICB0eF93aW5kb3dfZXJyb3JzOworICAgICAgICAgIERXT1JEICB0eF9jb2xsaXNpb25zOworICAgICAgICAgIERXT1JEICB0eF9qYWJiZXJzOworICAgICAgICB9IE5FVF9TVEFUUzsKKyNlbmRpZgorCitleHRlcm4gc3RydWN0IGRldmljZSAgICAgICAqYWN0aXZlX2RldiAgTE9DS0VEX1ZBUjsKK2V4dGVybiBjb25zdCBzdHJ1Y3QgZGV2aWNlICpkZXZfYmFzZSAgICBMT0NLRURfVkFSOworZXh0ZXJuIHN0cnVjdCBkZXZpY2UgICAgICAgKnByb2JlZF9kZXY7CisKK2V4dGVybiBpbnQgcGNhcF9wa3RfZGVidWc7CisKK2V4dGVybiB2b2lkIF93MzJfb3NfeWllbGQgKHZvaWQpOyAvKiBXYXR0LTMyJ3MgbWlzYy5jICovCisKKyNpZmRlZiBOREVCVUcKKyAgI2RlZmluZSBQQ0FQX0FTU0VSVCh4KSAoKHZvaWQpMCkKKworI2Vsc2UKKyAgdm9pZCBwY2FwX2Fzc2VydCAoY29uc3QgY2hhciAqd2hhdCwgY29uc3QgY2hhciAqZmlsZSwgdW5zaWduZWQgbGluZSk7ICAKKworICAjZGVmaW5lIFBDQVBfQVNTRVJUKHgpIGRvIHsgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEoeCkpIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBjYXBfYXNzZXJ0ICgjeCwgX19GSUxFX18sIF9fTElORV9fKTsgXAorICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApCisjZW5kaWYKKworI2VuZGlmICAvKiBfX1BDQVBfRE9TX0ggKi8KZGlmZiAtLWdpdCBhL3BjYXAtZW5ldC5jIGIvcGNhcC1lbmV0LmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uYTQ4NDIwNw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zIyIDA2OjQzOjU4IGd1eSBFeHAgJCAoTEJMKQorICovCisKKyNpZm5kZWYgcGNhcF9pbnRfaAorI2RlZmluZSBwY2FwX2ludF9oCisKKyNpZmRlZiBfX2NwbHVzcGx1cworZXh0ZXJuICJDIiB7CisjZW5kaWYKKworI2luY2x1ZGUgPHBjYXAuaD4KKworI2lmZGVmIFdJTjMyCisjaW5jbHVkZSA8UGFja2V0MzIuaD4KKyNlbmRpZiAvKiBXSU4zMiAqLworCisjaWZkZWYgTVNET1MKKyNpbmNsdWRlIDxmY250bC5oPgorI2luY2x1ZGUgPGlvLmg+CisjZW5kaWYKKworLyoKKyAqIFN3YXAgYnl0ZSBvcmRlcmluZyBvZiB1bnNpZ25lZCBsb25nIGxvbmcgdGltZXN0YW1wIG9uIGEgYmlnIGVuZGlhbgorICogbWFjaGluZS4KKyAqLworI2RlZmluZSBTV0FQTEwodWxsKSAgKCh1bGwgJiAweGZmMDAwMDAwMDAwMDAwMDBMTCkgPj4gNTYpIHwgXAorICAgICAgICAgICAgICAgICAgICAgICgodWxsICYgMHgwMGZmMDAwMDAwMDAwMDAwTEwpID4+IDQwKSB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAoKHVsbCAmIDB4MDAwMGZmMDAwMDAwMDAwMExMKSA+PiAyNCkgfCBcCisgICAgICAgICAgICAgICAgICAgICAgKCh1bGwgJiAweDAwMDAwMGZmMDAwMDAwMDBMTCkgPj4gOCkgIHwgXAorICAgICAgICAgICAgICAgICAgICAgICgodWxsICYgMHgwMDAwMDAwMGZmMDAwMDAwTEwpIDw8IDgpICB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAoKHVsbCAmIDB4MDAwMDAwMDAwMGZmMDAwMExMKSA8PCAyNCkgfCBcCisgICAgICAgICAgICAgICAgICAgICAgKCh1bGwgJiAweDAwMDAwMDAwMDAwMGZmMDBMTCkgPDwgNDApIHwgXAorICAgICAgICAgICAgICAgICAgICAgICgodWxsICYgMHgwMDAwMDAwMDAwMDAwM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ludGVyIHRvIE1TRyBwYXJhbWV0ZXIgYXJlYSAobS0+cGFyYW0pICovCisgICAgICBwYWNrZXRfbGVuID0gbS0+bGVuOworICAgICAgY2FwbGVuID0gIHAtPnNuYXBzaG90IDsKKworCisgICAgICBpZiAoY2FwbGVuID4gcGFja2V0X2xlbikgeworCisgICAgICAgIGNhcGxlbiA9IHBhY2tldF9sZW47CisgICAgICB9CisgICAgICAvKiBSdW4gdGhlIHBhY2tldCBmaWx0ZXIgaWYgdGhlcmUgaXMgb25lLiAqLworICAgICAgaWYgKChwLT5mY29kZS5iZl9pbnNucyA9PSBOVUxMKSB8fCBicGZfZmlsdGVyKHAtPmZjb2RlLmJmX2luc25zLCBkcCwgcGFja2V0X2xlbiwgY2FwbGVuKSkgeworCisKKyAgICAgICAgLyogIGdldCBhIHRpbWUgc3RhbXAgLCBjb25zaXN0aW5nIG9mIDoKKyAgICAgICAgICoKKyAgICAgICAgICogIHBjYXBfaGVhZGVyLnRzLnR2X3NlYzoKKyAgICAgICAgICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICAgICAgICogICBhIFVOSVggZm9ybWF0IHRpbWUtaW4tc2Vjb25kcyB3aGVuIGhlIHBhY2tldCB3YXMgY2FwdHVyZWQsCisgICAgICAgICAqICAgaS5lLiB0aGUgbnVtYmVyIG9mIHNlY29uZHMgc2luY2UgRXBvY2ggdGltZSAoSmFudWFyeSAxLDE5NzAsIDAwOjAwOjAwIEdNVCkKKyAgICAgICAgICoKKyAgICAgICAgICogIHBjYXBfaGVhZGVyLnRzLnR2X3VzZWMgOgorICAgICAgICAgKiAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgICAgICAgICAqICAgdGhlIG51bWJlciBvZiBtaWNyb3NlY29uZHMgc2luY2UgdGhhdCBzZWNvbmQKKyAgICAgICAgICogICB3aGVuIHRoZSBwYWNrZXQgd2FzIGNhcHR1cmVkCisgICAgICAgICAqLworCisgICAgICAgICh2b2lkKWdldHRpbWV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ywgKHVfY2hhciknXDM0MycsCisJKHVfY2hhciknXDM0NCcsICh1X2NoYXIpJ1wzNDUnLCAodV9jaGFyKSdcMzQ2JywgKHVfY2hhciknXDM0NycsCisJKHVfY2hhciknXDM1MCcsICh1X2NoYXIpJ1wzNTEnLCAodV9jaGFyKSdcMzUyJywgKHVfY2hhciknXDM1MycsCisJKHVfY2hhciknXDM1NCcsICh1X2NoYXIpJ1wzNTUnLCAodV9jaGFyKSdcMzU2JywgKHVfY2hhciknXDM1NycsCisJKHVfY2hhciknXDM2MCcsICh1X2NoYXIpJ1wzNjEnLCAodV9jaGFyKSdcMzYyJywgKHVfY2hhciknXDM2MycsCisJKHVfY2hhciknXDM2NCcsICh1X2NoYXIpJ1wzNjUnLCAodV9jaGFyKSdcMzY2JywgKHVfY2hhciknXDM2NycsCisJKHVfY2hhciknXDM3MCcsICh1X2NoYXIpJ1wzNzEnLCAodV9jaGFyKSdcMzcyJywgKHVfY2hhciknXDM3MycsCisJKHVfY2hhciknXDM3NCcsICh1X2NoYXIpJ1wzNzUnLCAodV9jaGFyKSdcMzc2JywgKHVfY2hhciknXDM3NycsCit9OworCitpbnQKK3BjYXBfc3RyY2FzZWNtcChjb25zdCBjaGFyICpzMSwgY29uc3QgY2hhciAqczIpCit7CisJcmVnaXN0ZXIgY29uc3QgdV9jaGFyCSpjbSA9IGNoYXJtYXAsCisJCQkJKnVzMSA9IChjb25zdCB1X2NoYXIgKilzMSwKKwkJCQkqdXMyID0gKGNvbnN0IHVfY2hhciAqKXMyOworCisJd2hpbGUgKGNtWyp1czFdID09IGNtWyp1czIrK10pCisJCWlmICgqdXMxKysgPT0gJ1wwJykKKwkJCXJldHVybigwKTsKKwlyZXR1cm4gKGNtWyp1czFdIC0gY21bKi0tdXMyXSk7Cit9CisKK2ludAorcGNhcF9kYXRhbGlua19uYW1lX3RvX3ZhbChjb25zdCBjaGFyICpuYW1lKQoreworCWludCBpOworCisJZm9yIChpID0gMDsgZGx0X2Nob2ljZXNbaV0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aW9uKHBjYXBfdCAqcCkKK3sKKwlyZXR1cm4gKHAtPnNmLnZlcnNpb25fbWlub3IpOworfQorCitGSUxFICoKK3BjYXBfZmlsZShwY2FwX3QgKnApCit7CisJcmV0dXJuIChwLT5zZi5yZmlsZSk7Cit9CisKK2ludAorcGNhcF9maWxlbm8ocGNhcF90ICpwKQoreworI2lmbmRlZiBXSU4zMgorCXJldHVybiAocC0+ZmQpOworI2Vsc2UKKwlpZiAocC0+YWRhcHRlciAhPSBOVUxMKQorCQlyZXR1cm4gKChpbnQpKERXT1JEKXAtPmFkYXB0ZXItPmhGaWxlKTsKKwllbHNlCisJCXJldHVybiAoLTEpOworI2VuZGlmCit9CisKKyNpZiAhZGVmaW5lZChXSU4zMikgJiYgIWRlZmluZWQoTVNET1MpCitpbnQKK3BjYXBfZ2V0X3NlbGVjdGFibGVfZmQocGNhcF90ICpwKQoreworCXJldHVybiAocC0+c2VsZWN0YWJsZV9mZCk7Cit9CisjZW5kaWYKKwordm9pZAorcGNhcF9wZXJyb3IocGNhcF90ICpwLCBjaGFyICpwcmVmaXgpCit7CisJZnByaW50ZihzdGRlcnIsICIlczogJXNcbiIsIHByZWZpeCwgcC0+ZXJyYnVmKTsKK30KKworY2hhciAqCitwY2FwX2dldGVycihwY2FwX3QgKnApCit7CisJcmV0dXJuIChwLT5lcnJidWYpOworfQorCitpbnQKK3BjYXBfZ2V0bm9uYmxvY2socGNhcF90ICpwLCBjaGFyICplcnJidWYpCit7CisJcmV0dXJuIHAtPmdldG5vbmJsb2NrX29wKHAsIGVycmJ1Zik7Cit9CisKKy8qCisgKiBHZXQgdGhlIGN1cnJlbnQgbm9uLWJsb2NraW5nIG1vZGUgc2V0dGluZywgdW5kZXIgdGhlIGFzc3VtcHRpb24gdGhhdAorICogaXQncyBqdXN0IHRoZSBzdGFuZGFyZCBQT1NJWCBub24tYmxvY2tpbmcgZmxhZy4KKyAqCisgKiBXZSBkb24ndCBsb29rIGF0ICJwLT5ub25ibG9jayIsIGlu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AgICAgKi8KKyAgICAgICB1X2xvbmcgIHR4X2Vycm9yczsgICAgICAgICAvKiBwYWNrZXQgdHJhbnNtaXQgcHJvYmxlbXMgICAgICovCisgICAgICAgdV9sb25nICByeF9kcm9wcGVkOyAgICAgICAgLyogbm8gc3BhY2UgaW4gUnggYnVmZmVycyAgICAgICAqLworICAgICAgIHVfbG9uZyAgdHhfZHJvcHBlZDsgICAgICAgIC8qIG5vIHNwYWNlIGF2YWlsYWJsZSBmb3IgVHggICAgKi8KKyAgICAgICB1X2xvbmcgIG11bHRpY2FzdDsgICAgICAgICAvKiBtdWx0aWNhc3QgcGFja2V0cyByZWNlaXZlZCAgICovCisgICAgICAgdV9sb25nICBjb2xsaXNpb25zOworCisgICAgICAgLyogZGV0YWlsZWQgcnhfZXJyb3JzOiAqLworICAgICAgIHVfbG9uZyAgcnhfbGVuZ3RoX2Vycm9yczsKKyAgICAgICB1X2xvbmcgIHJ4X292ZXJfZXJyb3JzOyAgICAvKiByZWNlaXZlciByaW5nIGJ1ZmYgb3ZlcmZsb3cgICovCisgICAgICAgdV9sb25nICByeF9jcmNfZXJyb3JzOyAgICAgLyogcmVjdidkIHBrdCB3aXRoIGNyYyBlcnJvciAgICAqLworICAgICAgIHVfbG9uZyAgcnhfZnJhbWVfZXJyb3JzOyAgIC8qIHJlY3YnZCBmcmFtZSBhbGlnbm1lbnQgZXJyb3IgKi8KKyAgICAgICB1X2xvbmcgIHJ4X2ZpZm9fZXJyb3JzOyAgICAvKiByZWN2J3IgZmlmbyBvdmVycnVuICAgICAgICAgICovCisgICAgICAgdV9sb25nICByeF9taXNzZWRfZXJyb3JzOyAgLyogcmVjdidyIG1pc3NlZCBwYWNrZXQgICAgICAgICAqLworCisgICAgICAgLyogZGV0YWlsZWQgdHhfZXJyb3JzICovCisgICAgICAgdV9sb25nICB0eF9hYm9ydGVkX2Vycm9yczsKKyAgICAgICB1X2xvbmcgIHR4X2NhcnJpZXJfZXJyb3JzOworICAgICAgIHVfbG9uZyA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2FwX2RpcmVjdGlvbl90KTsKK2ludAlwY2FwX2dldG5vbmJsb2NrKHBjYXBfdCAqLCBjaGFyICopOworaW50CXBjYXBfc2V0bm9uYmxvY2socGNhcF90ICosIGludCwgY2hhciAqKTsKK3ZvaWQJcGNhcF9wZXJyb3IocGNhcF90ICosIGNoYXIgKik7CitpbnQJcGNhcF9pbmplY3QocGNhcF90ICosIGNvbnN0IHZvaWQgKiwgc2l6ZV90KTsKK2ludAlwY2FwX3NlbmRwYWNrZXQocGNhcF90ICosIGNvbnN0IHVfY2hhciAqLCBpbnQpOworY29uc3QgY2hhciAqcGNhcF9zdHJlcnJvcihpbnQpOworY2hhcgkqcGNhcF9nZXRlcnIocGNhcF90ICopOworaW50CXBjYXBfY29tcGlsZShwY2FwX3QgKiwgc3RydWN0IGJwZl9wcm9ncmFtICosIGNvbnN0IGNoYXIgKiwgaW50LAorCSAgICBicGZfdV9pbnQzMik7CitpbnQJcGNhcF9jb21waWxlX25vcGNhcChpbnQsIGludCwgc3RydWN0IGJwZl9wcm9ncmFtICosCisJICAgIGNvbnN0IGNoYXIgKiwgaW50LCBicGZfdV9pbnQzMik7Cit2b2lkCXBjYXBfZnJlZWNvZGUoc3RydWN0IGJwZl9wcm9ncmFtICopOworaW50CXBjYXBfZGF0YWxpbmsocGNhcF90ICopOworaW50CXBjYXBfbGlzdF9kYXRhbGlua3MocGNhcF90ICosIGludCAqKik7CitpbnQJcGNhcF9zZXRfZGF0YWxpbmsocGNhcF90ICosIGludCk7CitpbnQJcGNhcF9kYXRhbGlua19uYW1lX3RvX3ZhbChjb25zdCBjaGFyICopOworY29uc3QgY2hhciAqcGNhcF9kYXRhbGlua192YWxfdG9fbmFtZShpbnQpOworY29uc3QgY2hhciAqcGNhcF9kYXRhbGlua192YWxfdG9fZGVzY3JpcHRpb24oaW50KTsKK2ludAlwY2FwX3NuYXBzaG90KHBjYXBfdCAqKTsKK2ludAlwY2FwX2lzX3N3YXBwZWQocGNhcF90ICopOworaW50CXBj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mRlZiBnZXRjCisjZGVmaW5lIGdldGMoZnApICAoKmluX2J1ZmZlciA9PSAwID8gRU9GIDogKmluX2J1ZmZlcisrKQorI2VuZGlmCisKKyNkZWZpbmUgeXlsdmFsIHBjYXBfbHZhbAorZXh0ZXJuIFlZU1RZUEUgeXlsdmFsOworCislfQorCitOCQkoWzAtOV0rfCgwWHwweClbMC05QS1GYS1mXSspCitCCQkoWzAtOUEtRmEtZl1bMC05QS1GYS1mXT8pCitXCQkoWzAtOUEtRmEtZl1bMC05QS1GYS1mXT9bMC05QS1GYS1mXT9bMC05QS1GYS1mXT8pCisKKyVhIDE4NDAwCislbyAyMTUwMAorJWUgNzYwMAorJWsgNDU1MAorJXAgMjc2MDAKKyVuIDIwMDAKKworVjY4MAkJe1d9OntXfTp7V306e1d9OntXfTp7V306e1d9OntXfQorCitWNjcwCQk6OntXfTp7V306e1d9OntXfTp7V306e1d9OntXfQorVjY3MQkJe1d9Ojp7V306e1d9OntXfTp7V306e1d9OntXfQorVjY3MgkJe1d9OntXfTo6e1d9OntXfTp7V306e1d9OntXfQorVjY3MwkJe1d9OntXfTp7V306OntXfTp7V306e1d9OntXfQorVjY3NAkJe1d9OntXfTp7V306e1d9Ojp7V306e1d9OntXfQorVjY3NQkJe1d9OntXfTp7V306e1d9OntXfTo6e1d9OntXfQorVjY3NgkJe1d9OntXfTp7V306e1d9OntXfTp7V306OntXfQorVjY3NwkJe1d9OntXfTp7V306e1d9OntXfTp7V306e1d9OjoKKworVjY2MAkJOjp7V306e1d9OntXfTp7V306e1d9OntXfQorVjY2MQkJe1d9Ojp7V306e1d9OntXfTp7V306e1d9CitWNjYyCQl7V306e1d9Ojp7V306e1d9OntXfTp7V30KK1Y2NjMJCXtXfTp7V306e1d9Ojp7V306e1d9OntXfQorVjY2NAkJe1d9OntXfTp7V306e1d9Ojp7V306e1d9CitWNjY1CQl7V306e1d9OntXfTp7V306e1d9Ojp7V30KK1Y2NjYJCXtXfTp7V306e1d9OntXfTp7V306e1d9OjoKKworVjY1MAkJOjp7V306e1d9OntXfTp7V306e1d9CitWNjUxCQl7V306OntXfTp7V306e1d9OntXfQorVjY1MgkJe1d9OntXfTo6e1d9OntXfTp7V30KK1Y2NTMJCXtXfTp7V306e1d9Ojp7V306e1d9CitWNjU0CQl7V306e1d9OntXfTp7V306OntXfQorVjY1NQkJe1d9OntXfTp7V306e1d9OntXfTo6CisKK1Y2NDAJCTo6e1d9OntXfTp7V306e1d9CitWNjQxCQl7V306OntXfTp7V306e1d9CitWNjQyCQl7V306e1d9Ojp7V306e1d9CitWNjQzCQl7V306e1d9OntXfTo6e1d9CitWNjQ0CQl7V306e1d9OntXfTp7V306OgorCitWNjMwCQk6OntXfTp7V306e1d9CitWNjMxCQl7V306OntXfTp7V30KK1Y2MzIJCXtXfTp7V306OntXfQorVjYzMwkJe1d9OntXfTp7V306OgorCitWNjIwCQk6OntXfTp7V30KK1Y2MjEJCXtXfTo6e1d9CitWNjIyCQl7V306e1d9OjoKKworVjYxMAkJOjp7V30KK1Y2MTEJCXtXfTo6CisKK1Y2MDAJCTo6CisKK1Y2NjA0CQl7V306e1d9OntXfTp7V306e1d9OntXfTp7Tn1cLntOfVwue059XC57Tn0KKworVjY1MDQJCTo6e1d9OntXfTp7V306e1d9OntXfTp7Tn1cLntOfVwue059XC57Tn0KK1Y2NTE0CQl7V306OntXfTp7V306e1d9OntXfTp7Tn1cLntOfVwue059XC57Tn0KK1Y2NTI0CQl7V306e1d9Ojp7V306e1d9OntXfTp7Tn1cLntOfVwue059XC57Tn0KK1Y2NTM0CQl7V306e1d9OntXfTo6e1d9OntXfTp7Tn1cLntOfVwue059XC57Tn0KK1Y2NTQ0CQl7V306e1d9OntXfTp7V306OntXfTp7Tn1cLntOfVwue059XC57Tn0KK1Y2NTU0CQl7V306e1d9OntXfTp7V306e1d9Ojp7Tn1cLntOfVwue059XC57Tn0KKworVjY0MDQJCTo6e1d9OntXfTp7V306e1d9OntOfVwue059XC57Tn1cLntOfQorVjY0MTQJCXtXfTo6e1d9OntXfTp7V306e059XC57Tn1cLntOfVwue059CitWNjQyNAkJe1d9OntXfTo6e1d9OntXfTp7Tn1cLntOfVwue059XC57Tn0KK1Y2NDM0CQl7V306e1d9OntXfTo6e1d9OntOfVwue059XC57Tn1cLntOfQorVjY0NDQJCXtXfTp7V306e1d9OntXfTo6e059XC57Tn1cLntOfVwue059CisKK1Y2MzA0CQk6OntXfTp7V306e1d9OntOfVwue059XC57Tn1cLntOfQorVjYzMTQJCXtXfTo6e1d9OntXfTp7Tn1cLntOfVwue059XC57Tn0KK1Y2MzI0CQl7V306e1d9Ojp7V306e059XC57Tn1cLntOfVwue059CitWNjMzNAkJe1d9OntXfTp7V306OntOfVwue059XC57Tn1cLntOfQorCitWNjIwNAkJOjp7V306e1d9OntOfVwue059XC57Tn1cLntOfQorVjYyMTQJCXtXfTo6e1d9OntOfVwue059XC57Tn1cLntOfQorVjYyMjQJCXtXfTp7V306OntOfVwue059XC57Tn1cLntOfQorCitWNjEwNAkJOjp7V306e059XC57Tn1cLntOfVwue059CitWNjExNAkJe1d9Ojp7Tn1cLntOfVwue059XC57Tn0KKworVjYwMDQJCTo6e059XC57Tn1cLntOfVwue059CisKKworVjYJCSh7VjY4MH18e1Y2NzB9fHtWNjcxfXx7VjY3Mn18e1Y2NzN9fHtWNjc0fXx7VjY3NX18e1Y2NzZ9fHtWNjc3fXx7VjY2MH18e1Y2NjF9fHtWNjYyfXx7VjY2M318e1Y2NjR9fHtWNjY1fXx7VjY2Nn18e1Y2NTB9fHtWNjUxfXx7VjY1Mn18e1Y2NTN9fHtWNjU0fXx7VjY1NX18e1Y2NDB9fHtWNjQxfXx7VjY0Mn18e1Y2NDN9fHtWNjQ0fXx7VjYzMH18e1Y2MzF9fHtWNjMyfXx7VjYzM318e1Y2MjB9fHtWNjIxfXx7VjYyMn18e1Y2MTB9fHtWNjExfXx7VjYwMH18e1Y2NjA0fXx7VjY1MDR9fHtWNjUxNH18e1Y2NTI0fXx7VjY1Mz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0NBOworbW9wcmMJCXJldHVybiBNT1BSQzsKK21vcGRsCQlyZXR1cm4gTU9QREw7CisKK2lzbwkJcmV0dXJuIElTTzsKK2VzaXMJCXJldHVybiBFU0lTOworZXMtaXMJCXJldHVybiBFU0lTOworaXNpcwkJcmV0dXJuIElTSVM7Citpcy1pcwkJcmV0dXJuIElTSVM7CitsMSAgICAgICAgICAgICAgcmV0dXJuIEwxOworbDIgICAgICAgICAgICAgIHJldHVybiBMMjsKK2lpaCAgICAgICAgICAgICByZXR1cm4gSUlIOworbHNwICAgICAgICAgICAgIHJldHVybiBMU1A7CitzbnAgICAgICAgICAgICAgcmV0dXJuIFNOUDsKK2NzbnAgICAgICAgICAgICByZXR1cm4gQ1NOUDsKK3BzbnAgICAgICAgICAgICByZXR1cm4gUFNOUDsKKworY2xucAkJcmV0dXJuIENMTlA7CisKK3N0cAkJcmV0dXJuIFNUUDsKKworaXB4CQlyZXR1cm4gSVBYOworCituZXRiZXVpCQlyZXR1cm4gTkVUQkVVSTsKKworaG9zdAkJcmV0dXJuIEhPU1Q7CituZXQJCXJldHVybiBORVQ7CittYXNrCQlyZXR1cm4gTkVUTUFTSzsKK3BvcnQJCXJldHVybiBQT1JUOworcG9ydHJhbmdlCXJldHVybiBQT1JUUkFOR0U7Citwcm90bwkJcmV0dXJuIFBST1RPOworcHJvdG9jaGFpbgl7CisjaWZkZWYgTk9fUFJPVE9DSEFJTgorCQkgIGJwZl9lcnJvcigiJXMgbm90IHN1cHBvcnRlZCIsIHl5dGV4dCk7CisjZWxzZQorCQkgIHJldHVybiBQUk9UT0NIQUlOOworI2VuZGlmCisJCX0KKworZ2F0ZXdheQkJcmV0dXJuIEdBVEVXQVk7CisKK2xlc3MJCXJldHVybiBMRVNTOworZ3JlYXRlcgkJcmV0dXJuIEdSRUFURVI7CitieXRlCQlyZXR1cm4gQ0JZVEU7Citicm9hZGNhc3QJcmV0dXJuIFRLX0JST0FEQ0FTVDsKK211bHRpY2FzdAlyZXR1cm4gVEt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