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SSBhcHBsaWNhYmxlIHRvIHRoZSBjaXBoZXIgdHlwZQorICAgICAgc3BlY2lmaWVkIGZvciB0aGUgYmxvY2suCisgICAgIDwvcGFyYT4KKworICAgICA8cHJvZ3JhbWxpc3Rpbmc+Cis8IVtDREFUQVsKK2tlcm5lbCBjcnlwdG8gQVBJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgSVBTRUMgTGF5ZXIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisrLS0tLS0tLS0tLS0rICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorfCAgICAgICAgICAgfCAgICAgICAgICAgICgxKQorfCBnaXZjaXBoZXIgfCA8LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gIGVzcF9vdXRwdXQKK3wgIChzZXFpdikgIHwgLS0tKworKy0tLS0tLS0tLS0tKyAgICB8CisgICAgICAgICAgICAgICAgIHwgKDIpCisrLS0tLS0tLS0tLS0rICAgIHwKK3wgICAgICAgICAgIHwgPC0tKyAgICAgICAgICAgICAgICAoMikKK3wgICBhZWFkICAgIHwgPC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBlc3BfaW5wdXQKK3wgICAoZ2NtKSAgIHwgLS0tLS0tLS0tLS0tKworKy0tLS0tLS0tLS0tKyAgICAgICAgICAgICB8CisgICAgICB8ICgzKSAgICAgICAgICAgICAgIHwgKDUpCisgICAgICB2ICAgICAgICAgICAgICAgICAgIHYKKystLS0tLS0tLS0tLSsgICAgICAgKy0tLS0tLS0tLS0tKworfCAgICAgICAgICAgfCAgICAgICB8ICAgICAgICAgICB8Cit8IGFibGtjaXBoZXJ8ICAgICAgIHwgICBhaGFzaCAgIHwKK3wgICAoY3RyKSAgIHwgLS0tKyAgfCAgKGdoYXNoKSAgfAorKy0tLS0tLS0tLS0tKyAgICB8ICArLS0tLS0tLS0tLS0rCisgIC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ICAgICAgICAgIF4gICAgICAgICAgICAgICAgXiAgICAgICAgICAgXgorICB8ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICB8CisgYW5hbG9nICAgICAgICAgbGluayAgICAgICAgICAgIGRtYSAgICAgICAgICAgICAgYXBwICAgICAgIEZ1bGxCdWZmZXIKKyB0aW1lICAgICAgICAgICB0aW1lICAgICAgICAgICB0aW1lICAgICAgICAgICAgICB0aW1lICAgICAgICB0aW1lCisgIHwgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgIHwKKyAgfDwgY29kZWMgZGVsYXkgPnw8LS1odyBkZWxheS0tPnw8cXVldWVkIHNhbXBsZXM+fDwtLS1hdmFpbC0+fAorICB8PC0tLS0tLS0tLS0tLS0tLS0tIGRlbGF5LS0tLS0tLS0tLS0tLS0tLS0tLS0tLT58ICAgICAgICAgICB8CisJCQkgICAgICAgICB8PC0tLS1yaW5nIGJ1ZmZlciBsZW5ndGgtLS0tPnwKKworVGhlIGFuYWxvZyB0aW1lIGlzIHRha2VuIGF0IHRoZSBsYXN0IHN0YWdlIG9mIHRoZSBwbGF5YmFjaywgYXMgY2xvc2UKK2FzIHBvc3NpYmxlIHRvIHRoZSBhY3R1YWwgdHJhbnNkdWNlcgorCitUaGUgbGluayB0aW1lIGlzIHRha2VuIGF0IHRoZSBvdXRwdXQgb2YgdGhlIFNPQy9jaGlwc2V0IGFzIHRoZSBzYW1wbGVzCithcmUgcHVzaGVkIG9uIGEgbGluay4gVGhlIGxpbmsgdGltZSBjYW4gYmUgZGlyZWN0bHkgbWVhc3VyZWQgaWYKK3N1cHBvcnRlZCBpbiBoYXJkd2FyZSBieSBzYW1wbGUgY291bnRlcnMgb3Igd2FsbGNsb2NrcyAoZS5nLiB3aXRoCitIREF1ZGlvIDI0TUh6IG9yIFBUUCBjbG9jayBmb3IgbmV0d29ya2VkIHNvbHV0aW9uc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lTSVpFXzE5MiAmJgorCSAgICBrZXlfbGVuICE9IEFFU19LRVlTSVpFXzI1NikKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwltZW1jcHkoY3R4LT5rZXlfZW5jLCBpbl9rZXksIGtleV9sZW4pOworCWN0eC0+a2V5X2xlbmd0aCA9IGtleV9sZW47CisKKwlrZXJuZWxfbmVvbl9iZWdpbigpOworCWZvciAoaSA9IDA7IGkgPCBzaXplb2YocmNvbik7IGkrKykgeworCQl1MzIgKnJraSA9IGN0eC0+a2V5X2VuYyArIChpICoga3dvcmRzKTsKKwkJdTMyICpya28gPSBya2kgKyBrd29yZHM7CisKKwkJcmtvWzBdID0gcm9yMzIoY2VfYWVzX3N1Yihya2lba3dvcmRzIC0gMV0pLCA4KTsKKwkJcmtvWzBdID0gcmtvWzBdIF4gcmtpWzBdIF4gcmNvbltpXTsKKwkJcmtvWzFdID0gcmtvWzBdIF4gcmtpWzFdOworCQlya29bMl0gPSBya29bMV0gXiBya2lbMl07CisJCXJrb1szXSA9IHJrb1syXSBeIHJraVszXTsKKworCQlpZiAoa2V5X2xlbiA9PSBBRVNfS0VZU0laRV8xOTIpIHsKKwkJCWlmIChpID49IDcpCisJCQkJYnJlYWs7CisJCQlya29bNF0gPSBya29bM10gXiBya2lbNF07CisJCQlya29bNV0gPSBya29bNF0gXiBya2lbNV07CisJCX0gZWxzZSBpZiAoa2V5X2xlbiA9PSBBRVNfS0VZU0laRV8yNTYpIHsKKwkJCWlmIChpID49IDYpCisJCQkJYnJlYWs7CisJCQlya29bNF0gPSBjZV9hZXNfc3ViKHJrb1szXSkgXiBya2lbNF07CisJCQlya29bNV0gPSBya29bNF0gXiBya2lbNV07CisJCQlya29bNl0gPSBya29bNV0gXiBya2lbNl07CisJCQlya29bN10gPSBya29bNl0gXiBya2lbN107CisJCX0KKwl9CisKKwkvKgorCSAqIEdlbmVyYXRlIHRoZSBkZWNyeXB0aW9uIGtleXMgZm9yIHRoZSBFcXVpdmFsZW50IEludmVy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JZW9yCXIwLHIwLHI0LHJvciMyMAorCWFkZAlyMTEscjExLHIyCisJdmFkZC5pMzIJcTgscTgscTAKKwlsZHIJcjIsW3NwLCM0XQorCWFuZAlyMyxyMyxyMTIKKwlhZGQJcjcscjcscjExCisJYWRkCXIxMSxyMTEscjAscm9yIzIKKwllb3IJcjMscjMscjUKKwlhZGQJcjEwLHIxMCxyMgorCWVvcglyMixyOCxyOQorCWVvcglyMCxyNyxyNyxyb3IjNQorCWFkZAlyMTEscjExLHIzCisJYW5kCXIyLHIyLHI3CisJZW9yCXIzLHIwLHI3LHJvciMxOQorCWVvcglyMCxyMTEscjExLHJvciMxMQorCWVvcglyMixyMixyOQorCWFkZAlyMTAscjEwLHIzLHJvciM2CisJZW9yCXIzLHIxMSxyNAorCWVvcglyMCxyMCxyMTEscm9yIzIwCisJYWRkCXIxMCxyMTAscjIKKwlsZHIJcjIsW3NwLCM4XQorCWFuZAlyMTIscjEyLHIzCisJYWRkCXI2LHI2LHIxMAorCWFkZAlyMTAscjEwLHIwLHJvciMyCisJZW9yCXIxMixyMTIscjQKKwlhZGQJcjkscjkscjIKKwllb3IJcjIscjcscjgKKwllb3IJcjAscjYscjYscm9yIzUKKwlhZGQJcjEwLHIxMCxyMTIKKwlhbmQJcjIscjIscjYKKwllb3IJcjEyLHIwLHI2LHJvciMxOQorCWVvcglyMCxyMTAscjEwLHJvciMxMQorCWVvcglyMixyMixyOAorCWFkZAlyOSxyOSxyMTIscm9yIzYKKwllb3IJcjEyLHIxMCxyMTEKKwllb3IJcjAscjAscjEwLHJvciMyMAorCWFkZAlyOSxyOSxyMgorCWxkcglyMixbc3AsIzEyXQorCWFuZAlyMyxyMyxyMTIKKwlhZGQJcjUscjUscjkKKwlhZGQJcjkscjkscjAscm9yIzIKKwllb3IJcjMscjMscjExCisJYWRkCXI4LHI4LHIyCisJZW9yCXIyLHI2LHI3CisJZW9yCXIwLHI1LHI1LHJvciM1CisJYWRkCXI5LHI5LHIzCisJYW5kCXIyLH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cjIsW3NwLCMyNF0KKwlhbmQJcjEyLHIxMixyMworCWFkZAlyMTAscjEwLHI2CisJYWRkCXI2LHI2LHIwLHJvciMyCisJZW9yCXIxMixyMTIscjgKKwlhZGQJcjUscjUscjIKKwllb3IJcjIscjExLHI0CisJZW9yCXIwLHIxMCxyMTAscm9yIzUKKwlhZGQJcjYscjYscjEyCisJYW5kCXIyLHIyLHIxMAorCWVvcglyMTIscjAscjEwLHJvciMxOQorCWVvcglyMCxyNixyNixyb3IjMTEKKwllb3IJcjIscjIscjQKKwlhZGQJcjUscjUscjEyLHJvciM2CisJZW9yCXIxMixyNixyNworCWVvcglyMCxyMCxyNixyb3IjMjAKKwlhZGQJcjUscjUscjIKKwlsZHIJcjIsW3NwLCMyOF0KKwlhbmQJcjMscjMscjEyCisJYWRkCXI5LHI5LHI1CisJYWRkCXI1LHI1LHIwLHJvciMyCisJZW9yCXIzLHIzLHI3CisJYWRkCXI0LHI0LHIyCisJZW9yCXIyLHIxMCxyMTEKKwllb3IJcjAscjkscjkscm9yIzUKKwlhZGQJcjUscjUscjMKKwlhbmQJcjIscjIscjkKKwllb3IJcjMscjAscjkscm9yIzE5CisJZW9yCXIwLHI1LHI1LHJvciMxMQorCWVvcglyMixyMixyMTEKKwlhZGQJcjQscjQscjMscm9yIzYKKwllb3IJcjMscjUscjYKKwllb3IJcjAscjAscjUscm9yIzIwCisJYWRkCXI0LHI0LHIyCisJbGRyCXIyLFtzcCwjMzJdCisJYW5kCXIxMixyMTIscjMKKwlhZGQJcjgscjgscjQKKwlhZGQJcjQscjQscjAscm9yIzIKKwllb3IJcjEyLHIxMixyNgorCXZzdDEuMzIJe3E4fSxbcjEsOjEyOF0hCisJYWRkCXIxMSxyMTEscjIKKwllb3IJcjIscjkscjEwCisJZW9yCXIwLHI4LHI4LHJvciM1CisJYWRkCXI0LHI0LHIxMgorCXZsZDEuMzIJe3E4fSxbcjE0LDoxMjhdIQorCWFuZAlyMixyMixyOAorCWVvcglyMTIscjAscjgsc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I5LHI5LHIwLHJvciMyCisJZW9yCXIzLHIzLHIxMQorCWFkZAlyOCxyOCxyMgorCWVvcglyMixyNixyNworCWVvcglyMCxyNSxyNSxyb3IjNQorCWFkZAlyOSxyOSxyMworCWFuZAlyMixyMixyNQorCWVvcglyMyxyMCxyNSxyb3IjMTkKKwllb3IJcjAscjkscjkscm9yIzExCisJZW9yCXIyLHIyLHI3CisJYWRkCXI4LHI4LHIzLHJvciM2CisJZW9yCXIzLHI5LHIxMAorCWVvcglyMCxyMCxyOSxyb3IjMjAKKwlhZGQJcjgscjgscjIKKwlsZHIJcjIsW3NwLCM0OF0KKwlhbmQJcjEyLHIxMixyMworCWFkZAlyNCxyNCxyOAorCWFkZAlyOCxyOCxyMCxyb3IjMgorCWVvcglyMTIscjEyLHIxMAorCXZzdDEuMzIJe3E4fSxbcjEsOjEyOF0hCisJYWRkCXI3LHI3LHIyCisJZW9yCXIyLHI1LHI2CisJZW9yCXIwLHI0LHI0LHJvciM1CisJYWRkCXI4LHI4LHIxMgorCXZsZDEuMzIJe3E4fSxbcjE0LDoxMjhdIQorCWFuZAlyMixyMixyNAorCWVvcglyMTIscjAscjQscm9yIzE5CisJZW9yCXIwLHI4LHI4LHJvciMxMQorCWVvcglyMixyMixyNgorCXZyZXYzMi44CXEzLHEzCisJYWRkCXI3LHI3LHIxMixyb3IjNgorCWVvcglyMTIscjgscjkKKwllb3IJcjAscjAscjgscm9yIzIwCisJYWRkCXI3LHI3LHIyCisJdmFkZC5pMzIJcTgscTgscTMKKwlsZHIJcjIsW3NwLCM1Ml0KKwlhbmQJcjMscjMscjEyCisJYWRkCXIxMSxyMTEscjcKKwlhZGQJcjcscjcscjAscm9yIzIKKwllb3IJcjMscjMscjkKKwlhZGQJcjYscjYscjIKKwllb3IJcjIscjQscjUKKwllb3IJcjAscjExLHIxMSxyb3IjNQorCWFkZAlyNyxyNyxyMworCWFuZAlyMixyMixyMTEKKwllb3IJcjMscjAscjExLHJvciMxOQorCWVvcglyMCxyN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bGFnczsgICAgICAgICAgLyogbG93IGxldmVsIGZsYWdzICovCiAJX191MzIgICAgICAgICAgICAgICAgICAgY3B1OyAgICAgICAgICAgIC8qIGN1cnJlbnQgY3B1ICovCiAJaW50ICAgICAgICAgICAgICAgICAgICAgcHJlZW1wdF9jb3VudDsgIC8qIDA9PnByZWVtcHRpYmxlLDwwPT5CVUcgKi8KQEAgLTc3LDcgKzc2LDYgQEAKICNkZWZpbmUgSU5JVF9USFJFQURfSU5GTyh0c2spICAgICAgICAgICAgICAgICAgIFwKIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkudGFzayAgICAgICAgICAgPSAmdHNrLCAgICAgICAgICAgICAgICAgXAotCS5leGVjX2RvbWFpbiAgICA9ICZkZWZhdWx0X2V4ZWNfZG9tYWluLCBcCiAJLmZsYWdzICAgICAgICAgID0gMCwgICAgICAgICAgICAgICAgICAgIFwKIAkuY3B1ICAgICAgICAgICAgPSAwLCAgICAgICAgICAgICAgICAgICAgXAogCS5wcmVlbXB0X2NvdW50ICA9IDEsICAgICAgICAgICAgICAgICAgICBcCmRpZmYgLS1naXQgYS9hcmNoL2lhNjQvaW5jbHVkZS9hc20vdGhyZWFkX2luZm8uaCBiL2FyY2gvaWE2NC9pbmNsdWRlL2FzbS90aHJlYWRfaW5mby5oCmluZGV4IGMxNmYyMWEuLmFhOTk1YjYgMTAwNjQ0Ci0tLSBhL2FyY2gvaWE2NC9pbmNsdWRlL2FzbS90aHJlYWRfaW5mby5oCisrKyBiL2FyY2gvaWE2NC9pbmNsdWRlL2FzbS90aHJlYWRfaW5mby5oCkBAIC0yMCw3ICsyMCw2IEBACiAgKi8KIHN0cnVjdCB0aHJlYWRfaW5mbyB7CiAJc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrOwkvKiBYWFggbm90IHJlYWxseSBuZWVkZWQsIGV4Y2VwdCBmb3IgZHVwX3Rhc2tfc3RydWN0KCkgKi8KLQlzdHJ1Y3Qg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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jZGVmaW5lIFJOR19DVFJMCQkJMHgwMAotI2RlZmluZSBSTkdfRU4JCQkJKDEgPDwgMCkKLQotI2RlZmluZSBSTkdfU1RBVAkJCTB4MDQKLSNkZWZpbmUgUk5HX0FWQUlMX01BU0sJCQkoMHhmZjAwMDAwMCkKLQotI2RlZmluZSBSTkdfREFUQQkJCTB4MDgKLSNkZWZpbmUgUk5HX1RIUkVTCQkJMHgwYwotI2RlZmluZSBSTkdfTUFTSwkJCTB4MTAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIF9SRUcgcmVsYXRpdmUgdG8gUlNFVF9TUEkKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCmRpZmYgLS1naXQgYS9hcmNoL21pcHMvaW5jbHVkZS9hc20vdGhyZWFkX2luZm8uaCBiL2FyY2gvbWlwcy9pbmNsdWRlL2FzbS90aHJlYWRfaW5mby5oCmluZGV4IDU1ZWQ2NjAuLjg0MDhhMzAgMTAwNjQ0Ci0tLSBhL2FyY2gvbWlwcy9pbmNsdWRlL2FzbS90aHJlYWRfaW5mby5oCisrKyBiL2FyY2gvbWlwcy9pbmNsdWRlL2FzbS90aHJlYWRfaW5mby5oCkBAIC0yMyw3ICsyMyw2IEBACiAgKi8KIHN0cnVjdCB0aHJlYWRfaW5mbyB7CiAJc3RydWN0IHRhc2tfc3RydWN0CSp0YXNrOwkJLyogbWFpbiB0YXNrIHN0cnVjdHVyZSAqLwotCXN0cnVjdCBleGVjX2RvbWFpbgkqZXhlY19kb21haW47CS8qIGV4ZWN1dGlvbiBkb21haW4gKi8KIAl1bnNpZ25lZCBsb25nCQlmbGFnczsJCS8qIGxvdyBsZXZ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oYTFfbWFpbjoKKwlSXzAwXzE1KHJIMCwgckgxLCBySDIsIHJIMywgckg0LCByVzEsIHJXMCwgMSwgMCkKKwlSXzAwXzE1KHJIMywgckg0LCBySDAsIHJIMSwgckgyLCByVzIsIHJXMSwgMCwgOCkKKwlSXzAwXzE1KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVzMsIHJXMiwgMCwgMTYpCisJUl8wMF8xNShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclc0LCByVzMsIDAsIDI0KQorCVJfMDBfMTUockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXNSwgclc0LCAwLCAzMikKKwlSXzAwXzE1KHJIMCwgckgxLCBySDIsIHJIMywgckg0LCByVzYsIHJXNSwgMCwgNDApCisJUl8wMF8xNShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclQzLCByVzYsIDAsIDQ4KQorCVJfMDBfMTUockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJUMywgclc3LCAwLCA1NikKKworCVJfMTZfMTkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXMCwgclcxLCByVzQsIHJXNiwgclc3LCAwKQorCVJfMTZfMTkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXMSwgclcyLCByVzUsIHJXNywgclcwLCAyKQorCisJUl8yMF8zOShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclcyLCByVzMsIHJXNiwgclcwLCByVzEsIDApCisJUl8yMF8zOShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclczLCByVzQsIHJXNywgclcxLCByVzIsIDApCisJUl8yMF8zOShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclc0LCByVzUsIHJXMCwgclcyLCByVzMsIDApCisJUl8yMF8zOShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclc1LCByVzYsIHJXMSwgclczLCByVzQsIDApCisJUl8yMF8zOShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclc2LCByVzcsIHJXMiwgclc0LCByVzUsIDApCisJUl8yMF8zOShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclc3LCByVzAsIHJXMywgclc1LCByVzYsIDApCisJUl8yMF8zOShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclcwLCByVzEsIHJXNCwgclc2LCByVzcsIDApCisJUl8yMF8zOShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclcxLCByVzIsIHJXNSwgclc3LCByVzAsIDApCisJUl8yMF8zOShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclcyLCByVzMsIHJXNiwgclcwLCByVzEsIDApCisJUl8yMF8zOShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclczLCByVzQsIHJXNywgclcxLCByVzIsIDMpCisKKwlSXzQwXzU5KHJIMCwgckgxLCBySDIsIHJIMywgckg0LCByVzQsIHJXNSwgclcwLCByVzIsIHJXMywgMCkKKwlSXzQwXzU5KHJIMywgckg0LCBySDAsIHJIMSwgckgyLCByVzUsIHJXNiwgclcxLCByVzMsIHJXNCwgMCkKKwlSXzQwXzU5KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVzYsIHJXNywgclcyLCByVzQsIHJXNSwgMCkKKwlSXzQwXzU5KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzcsIHJXMCwgclczLCByVzUsIHJXNiwgMCkKKwlSXzQwXzU5KHJIMiwgckgzLCBySDQsIHJIMCwgckgxLCByVzAsIHJXMSwgclc0LCByVzYsIHJXNywgMCkKKwlSXzQwXzU5KHJIMCwgckgxLCBySDIsIHJIMywgckg0LCByVzEsIHJXMiwgclc1LCByVzcsIHJXMCwgMCkKKwlSXzQwXzU5KHJIMywgckg0LCBySDAsIHJIMSwgckgyLCByVzIsIHJXMywgclc2LCByVzAsIHJXMSwgMCkKKwlSXzQwXzU5KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVzMsIHJXNCwgclc3LCByVzEsIHJXMiwgMCkKKwlSXzQwXzU5KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzQsIHJXNSwgclcwLCByVzIsIHJXMywgMCkKKwlSXzQwXzU5KHJIMiwgckgzLCBySDQsIHJIMCwgckgxLCByVzUsIHJXNiwgclcxLCByVzMsIHJXNCwgNCkKKworCVJfNjBfNzkockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXNiwgclc3LCByVzIsIHJXNCwgclc1LCAwKQorCVJfNjBfNzkockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXNywgclcwLCByVzMsIHJXNSwgclc2LCAwKQorCVJfNjBfNzkockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXMCwgclcxLCByVzQsIHJXNiwgclc3LCAwKQorCVJfNjBfNzkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXMSwgclcyLCByVzUsIHJXNywgclcwLCAwKQorCVJfNjBfNzkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXMiwgclczLCByVzYsIHJXMCwgclcxLCAwKQorCVJfNjBfNzkockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXMywgclc0LCByVzcsIHJXMSwgclcyLCAwKQorCVJfNjBfNzkockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXNCwgclc1LCByVzAsIHJXMiwgclczLCAwKQorCWx3egkJclQzLDAockhQKQorCVJfNjBfNzkockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXNSwgclc2LCByVzEsIHJXMywgclc0LCAwKQorCWx3egkJclcxLDQockhQKQorCVJfNjBfNzkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNiwgclc3LCByVzIsIHJXNCwgclc1LCAwKQorCWx3egkJclcyLDgockhQKQorCVJfNjBfNzkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXNywgclcwLCByVzMsIHJXNSwgclc2LCAwKQorCWx3egkJclczLDEyKHJIUCkKKwlORVhUX0JMT0NLCisJbHd6CQlyVzQsMTYockhQKQorCisJYWRkCQlySDAsckgwLHJUMworCXN0dwkJckgwLDAockhQKQorCWFkZAkJckgxLHJI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FMwIHhvciBTMCIJCSovIFwKKwlvcgkJclQyLHJUMSxyVDI7CS8qIDI6IG1haiA9IG1haiBvciBtYWonCQkqLyBcCisJYWRkCQljLGMsZzsJCS8qIDI6IGQgPSBkICsgdGVtcDEJCSovIFwKKwlhZGQJCXJUMyxyVDMsclQyOwkvKiAyOiB0ZW1wMiA9IFMwICsgbWFqCQkqLyBcCisJYWRkCQlnLGcsclQzCQkvKiAyOiBoID0gdGVtcDEgKyB0ZW1wMgkJKi8KKworX0dMT0JBTChwcGNfc3BlX3NoYTI1Nl90cmFuc2Zvcm0pCisJSU5JVElBTElaRQorCisJbXRjdHIJCXI1CisJbHd6CQlySDAsMChySFApCisJbHd6CQlySDEsNChySFApCisJbHd6CQlySDIsOChySFApCisJbHd6CQlySDMsMTIockhQKQorCWx3egkJckg0LDE2KHJIUCkKKwlsd3oJCXJINSwyMChySFApCisJbHd6CQlySDYsMjQockhQKQorCWx3egkJckg3LDI4KHJIUCkKKworcHBjX3NwZV9zaGEyNTZfbWFpbjoKKwlsaXMJCXJLUCxQUENfU1BFX1NIQTI1Nl9LQGhhCisJYWRkaQkJcktQLHJLUCxQUENfU1BFX1NIQTI1Nl9LQGwKKworCVJfTE9BRF9XKHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LCByVzAsIDApCisJUl9MT0FEX1cockg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsIHJXMSwgOCkKKwlSX0xPQURfVyhySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywgclcyLCAxNikKKwlSX0xPQURfVyhySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwgclczLCAyNCkKKwlSX0xPQURfVyhySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgclc0LCAzMikKKwlSX0xPQURfVyhySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwgclc1LCA0MCkKKwlSX0xPQURfVyhySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywgclc2LCA0OCkKKwlSX0xPQURfVyhySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwgclc3LCA1NikKK3BwY19zcGVfc2hhMjU2XzE2X3JvdW5kczoKKwlhZGRpCQlyS1AscktQLDY0CisJUl9DQUxDX1cockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsCisJCSByVzAsIHJXMSwgclc0LCByVzUsIHJXNywgTiwgMCkKKwlSX0NBTENfVyhySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwKKwkJIHJXMSwgclcyLCByVzUsIHJXNiwgclcwLCBOLCA4KQorCVJfQ0FMQ19XKHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLAorCQkgclcyLCByVzMsIHJXNiwgclc3LCByVzEsIE4sIDE2KQorCVJfQ0FMQ19XKHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLAorCQkgclczLCByVzQsIHJXNywgclcwLCByVzIsIE4sIDI0KQorCVJfQ0FMQ19XKHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LAorCQkgclc0LCByVzUsIHJXMCwgclcxLCByVzMsIE4sIDMyKQorCVJfQ0FMQ19XKHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LAorCQkgclc1LCByVzYsIHJXMSwgclcyLCByVzQsIE4sIDQwKQorCVJfQ0FMQ19XKHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLAorCQkgclc2LCByVzcsIHJXMiwgclczLCByVzUsIE4sIDQ4KQorCVJfQ0FMQ19XKHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLAorCQkgclc3LCByVzAsIHJXMywgclc0LCByVzYsIEMs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4LT5ieXRlcyArPSBzcmNsZW47CisgICAgICAgICAgICAgICAgcmV0dXJuIDA7CisgICAgICAgICAgICB9CisgICAgICAgICAgICBtZW1jcHkoZGN0eC0+YnVmZmVyICsgZGN0eC0+Ynl0ZXMsIHNyYywKKyAgICAgICAgICAgICAgICAgICAgR0hBU0hfRElHRVNUX1NJWkUgLSBkY3R4LT5ieXRlcyk7CisgICAgICAgICAgICBwYWdlZmF1bHRfZGlzYWJsZSgpOworICAgICAgICAgICAgZW5hYmxlX2tlcm5lbF9hbHRpdmVjKCk7CisgICAgICAgICAgICBlbmFibGVfa2VybmVsX2ZwKCk7CisgICAgICAgICAgICBnY21fZ2hhc2hfcDgoZGN0eC0+c2hhc2gsIGN0eC0+aHRhYmxlLCBkY3R4LT5idWZmZXIsCisgICAgICAgICAgICAgICAgICAgIEdIQVNIX0RJR0VTVF9TSVpFKTsKKyAgICAgICAgICAgIHBhZ2VmYXVsdF9lbmFibGUoKTsKKyAgICAgICAgICAgIHNyYyArPSBHSEFTSF9ESUdFU1RfU0laRSAtIGRjdHgtPmJ5dGVzOworICAgICAgICAgICAgc3JjbGVuIC09IEdIQVNIX0RJR0VTVF9TSVpFIC0gZGN0eC0+Ynl0ZXM7CisgICAgICAgICAgICBkY3R4LT5ieXRlcyA9IDA7CisgICAgICAgIH0KKyAgICAgICAgbGVuID0gc3JjbGVuICYgfihHSEFTSF9ESUdFU1RfU0laRSAtIDEpOworICAgICAgICBpZiAobGVuKSB7CisgICAgICAgICAgICBwYWdlZmF1bHRfZGlzYWJsZSgpOworICAgICAgICAgICAgZW5hYmxlX2tlcm5lbF9hbHRpdmVjKCk7CisgICAgICAgICAgICBlbmFibGVfa2VybmVsX2ZwKCk7CisgICAgICAgICAgICBnY21fZ2hhc2hfcDgoZGN0eC0+c2hhc2gsIGN0eC0+aHRhYmxlLCBzcmMsIGxlbik7CisgICAgICAgICAgICBwYWdlZmF1bHRfZW5hYmxlKCk7CisgICAgICAgICAgICBzcmMgKz0gbGV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AgICAgICAgICAgICAgICgqYWxnX2l0KS0+Y3JhX25hbWUsIHJldCk7CisgICAgICAgIGlmIChyZXQpIHsKKyAgICAgICAgICAgIGZvciAoYWxnX2l0LS07IGFsZ19pdCA+PSBhbGdzOyBhbGdfaXQtLSkKKyAgICAgICAgICAgICAgICBjcnlwdG9fdW5yZWdpc3Rlcl9hbGcoKmFsZ19pdCk7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgIH0KKyAgICBpZiAocmV0KQorICAgICAgICByZXR1cm4gcmV0OworCisgICAgcmV0ID0gY3J5cHRvX3JlZ2lzdGVyX3NoYXNoKCZwOF9naGFzaF9hbGcpOworICAgIGlmIChyZXQpIHsKKyAgICAgICAgZm9yIChhbGdfaXQgPSBhbGdzOyAqYWxnX2l0OyBhbGdfaXQrKykKKyAgICAgICAgICAgIGNyeXB0b191bnJlZ2lzdGVyX2FsZygqYWxnX2l0KTsKKyAgICB9CisgICAgcmV0dXJuIHJldDsKK30KKwordm9pZCBfX2V4aXQgcDhfZXhpdCh2b2lkKQoreworICAgIHN0cnVjdCBjcnlwdG9fYWxnICoqYWxnX2l0OworCisgICAgZm9yIChhbGdfaXQgPSBhbGdzOyAqYWxnX2l0OyBhbGdfaXQrKykgeworICAgICAgICBwcmludGsoS0VSTl9JTkZPICJSZW1vdmluZyAnJXMnXG4iLCAoKmFsZ19pdCktPmNyYV9uYW1lKTsKKyAgICAgICAgY3J5cHRvX3VucmVnaXN0ZXJfYWxnKCphbGdfaXQpOworICAgIH0KKyAgICBjcnlwdG9fdW5yZWdpc3Rlcl9zaGFzaCgmcDhfZ2hhc2hfYWxnKTsKK30KKworbW9kdWxlX2luaXQocDhfaW5pdCk7Cittb2R1bGVfZXhpdChwOF9leGl0KTsKKworTU9EVUxFX0FVVEhPUigiTWFyY2VsbyBDZXJyaTxtaGNlcnJpQGJyLmlibS5jb20+Iik7CitNT0RVTEVfREVTQ1JJUFRJT04oIklCTSBWTVggY3J5cHRvZ2FwaGljIG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jay0+ZmxfZW5kID0gT0ZGU0VUX01BWDsKIH0KIAotc3RhdGljIHZvaWQgbmZzZDRfZmxfZ2V0X293bmVyKHN0cnVjdCBmaWxlX2xvY2sgKmRzdCwgc3RydWN0IGZpbGVfbG9jayAqc3JjKQorc3RhdGljIGZsX293bmVyX3QKK25mc2Q0X2ZsX2dldF9vd25lcihmbF9vd25lcl90IG93bmVyKQogewotCXN0cnVjdCBuZnM0X2xvY2tvd25lciAqbG8gPSAoc3RydWN0IG5mczRfbG9ja293bmVyICopc3JjLT5mbF9vd25lcjsKLQlkc3QtPmZsX293bmVyID0gKGZsX293bmVyX3QpbG9ja293bmVyKG5mczRfZ2V0X3N0YXRlb3duZXIoJmxvLT5sb19vd25lcikpOworCXN0cnVjdCBuZnM0X2xvY2tvd25lciAqbG8gPSAoc3RydWN0IG5mczRfbG9ja293bmVyICopb3duZXI7CisKKwluZnM0X2dldF9zdGF0ZW93bmVyKCZsby0+bG9fb3duZXIpOworCXJldHVybiBvd25lcjsKIH0KIAotc3RhdGljIHZvaWQgbmZzZDRfZmxfcHV0X293bmVyKHN0cnVjdCBmaWxlX2xvY2sgKmZsKQorc3RhdGljIHZvaWQKK25mc2Q0X2ZsX3B1dF9vd25lcihmbF9vd25lcl90IG93bmVyKQogewotCXN0cnVjdCBuZnM0X2xvY2tvd25lciAqbG8gPSAoc3RydWN0IG5mczRfbG9ja293bmVyICopZmwtPmZsX293bmVyOworCXN0cnVjdCBuZnM0X2xvY2tvd25lciAqbG8gPSAoc3RydWN0IG5mczRfbG9ja293bmVyICopb3duZXI7CiAKLQlpZiAobG8pIHsKKwlpZiAobG8pCiAJCW5mczRfcHV0X3N0YXRlb3duZXIoJmxvLT5sb19vd25lcik7Ci0JCWZsLT5mbF9vd25lciA9IE5VTEw7Ci0JfQogfQogCiBzdGF0aWMgY29uc3Qgc3RydWN0IGxvY2tfbWFuYWdlcl9vcGVyYXRpb25zIG5mc2RfcG9zaXhfbW5nX29wcyAgPSB7CmRpZmYg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gKGMpLT52aS51YmlfbnVtLCAoYyktPnZpLnZvbF9pZCwgIyNfX1ZBX0FSR1NfXykKIC8qIFVCSUZTIGVycm9yIG1lc3NhZ2VzICovCi0jZGVmaW5lIHViaWZzX2VycihmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlwcl9lcnIoIlVCSUZTIGVycm9yIChwaWQgJWQpOiAlczogIiBmbXQgIlxuIiwgY3VycmVudC0+cGlkLCBcCisjZGVmaW5lIHViaWZzX2VycihjLCBmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlwcl9lcnIoIlVCSUZTIGVycm9yICh1YmklZDolZCBwaWQgJWQpOiAlczogIiBmbXQgIlxuIiwgICAgICBcCisJICAgICAgIChjKS0+dmkudWJpX251bSwgKGMpLT52aS52b2xfaWQsIGN1cnJlbnQtPnBpZCwgICAgICAgXAogCSAgICAgICBfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKIC8qIFVCSUZTIHdhcm5pbmcgbWVzc2FnZXMgKi8KLSNkZWZpbmUgdWJpZnNfd2FybihmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXByX3dhcm4oIlVCSUZTIHdhcm5pbmcgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgICAgICAgICAgIFwKLQkJY3VycmVudC0+cGlkLCBfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKKyNkZWZpbmUgdWJpZnNfd2FybihjLCBmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByX3dhcm4oIlVCSUZTIHdhcm5pbmcgKHViaSVkOiVkIHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgIFwKKwkJKGMpLT52aS51YmlfbnVtLCAoYyktPnZpLnZvbF9pZCwgY3VycmVudC0+cGlkLCAgICAgIFwKKwkJX19mdW5jX18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mZpZyAkKEtjb25maWcpOwlcCisJCQkgJChvYmopL2NvbmYgJChzaWxlbnQpIC0tc2lsZW50b2xkY29uZmlnICQoS2NvbmZpZyk7IFwKIAkJCSBtdiAtZiAuY29uZmlnLm9sZC4xIC5jb25maWcub2xkKQkJXAogCWVsc2UJCQkJCQkJCVwKIAkJCW12IC1mIC50bXAuY29uZmlnIC5jb25maWc7CQkJXAotCQkJJChvYmopL2NvbmYgLS1zaWxlbnRvbGRjb25maWcgJChLY29uZmlnKTsJXAorCQkJJChvYmopL2NvbmYgJChzaWxlbnQpIC0tc2lsZW50b2xkY29uZmlnICQoS2NvbmZpZyk7IFwKIAlmaQogCSQoUSlybSAtZiAudG1wLmNvbmZpZwogCiAjIENyZWF0ZSBuZXcgbGludXgucG90IGZpbGUKICMgQWRqdXN0IGNoYXJzZXQgdG8gVVRGLTggaW4gLnBvIGZpbGUgdG8gYWNjZXB0IFVURi04IGluIEtjb25maWcgZmlsZXMKIHVwZGF0ZS1wby1jb25maWc6ICQob2JqKS9reGdldHRleHQgJChvYmopL2djb25mLmdsYWRlLmgKLQkkKFEpZWNobyAiICBHRU4gICAgIGNvbmZpZy5wb3QiCisJJChRKSQoa2VjaG8pICIgIEdFTiAgICAgY29uZmlnLnBvdCIKIAkkKFEpeGdldHRleHQgLS1kZWZhdWx0LWRvbWFpbj1saW51eCAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJICAgIC0tYWRkLWNvbW1lbnRzIC0ta2V5d29yZD1fIC0ta2V5d29yZD1OXyAgICAgICAgICAgICAgICAgXAogCSAgICAtLWZyb20tY29kZT1VVEYtOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTY1LDYxICs2Niw1OCBAQAogCSQoUSkoZm9yIGkgaW4gYGxzICQoc3JjdHJlZSkvYXJjaC8qL0tjb25maWcgICAgICBcCiAJICAgICQoc3JjdHJlZSkvYXJjaC8qL3VtL0tjb25maWdgOyAgICAgICAgICAgICAgIFwKIAkgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQllY2hvICIgIEdFTiAgICAgJCRpIjsgICAgICAgICAgICAgICAgICAgIFwKKwkJJChrZWNobykgIiAgR0VOICAgICAkJGkiOyAgICAgICAgICAgICAgICAgICAgXAogCQkkKG9iaikva3hnZXR0ZXh0ICQkaSAgICAgICAgICAgICAgICAgICAgIFwKIAkJICAgICA+PiAkKG9iaikvY29uZmlnLnBvdDsgICAgICAgICAgICAgICBcCiAJICAgIGRvbmUgKQotCSQoUSllY2hvICIgIEdFTiAgICAgbGludXgucG90IgorCSQoUSkkKGtlY2hvKSAiICBHRU4gICAgIGxpbnV4LnBvdCIKIAkkKFEpbXNndW5pcSAtLXNvcnQtYnktZmlsZSAtLXRvLWNvZGU9VVRGLTggJChvYmopL2NvbmZpZy5wb3QgXAogCSAgICAtLW91dHB1dCAkKG9iaikvbGludXgucG90CiAJJChRKXJtIC1mICQob2JqKS9jb25maWcucG90CiAKLVBIT05ZICs9IGFsbG5vY29uZmlnIGFsbHllc2NvbmZpZyBhbGxtb2Rjb25maWcgYWxsZGVmY29uZmlnIHJhbmRjb25maWcKKyMgVGhlc2UgdGFyZ2V0cyBtYXAgMToxIHRvIHRoZSBjb21tYW5kbGluZSBvcHRpb25zIG9mICdjb25mJworc2ltcGxlLXRhcmdldHMgOj0gb2xkY29uZmlnIGFsbG5vY29uZmlnIGFsbHllc2NvbmZpZyBhbGxtb2Rjb25maWcgXAorCWFsbGRlZmNvbmZpZyByYW5kY29uZmlnIGxpc3RuZXdjb25maWcgb2xkZGVmY29uZmlnCitQSE9OWSArPSAkKHNpbXBsZS10YXJnZXRzKQogCi1hbGxub2NvbmZpZyBhbGx5ZXNjb25maWcgYWxsbW9kY29uZmlnIGFsbGRlZmNvbmZpZyByYW5kY29uZmlnOiAkKG9iaikvY29uZgotCSQ8IC0tJEAgJChLY29uZmlnKQorJChzaW1wbGUtdGFyZ2V0cyk6ICQob2JqKS9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X2NwdV9kYWlfcHJvYmUsCisJLm9wcyAgICA9ICZscGFzc19jcHVfZGFpX29wcywKK307CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3Qgc25kX3NvY19jb21wb25lbnRfZHJpdmVyIGxwYXNzX2NwdV9jb21wX2RyaXZlciA9IHsKKwkubmFtZSA9ICJscGFzcy1jcHUiLAorfTsKKworc3RhdGljIGJvb2wgbHBhc3NfY3B1X3JlZ21hcF93cml0ZWFibGUoc3RydWN0IGRldmljZSAqZGV2LCB1bnNpZ25lZCBpbnQgcmVnKQoreworCWludCBpOworCisJZm9yIChpID0gMDsgaSA8IExQQUlGX0kyU19QT1JUX05VTTsgKytpKQorCQlpZiAocmVnID09IExQQUlGX0kyU0NUTF9SRUcoaSkpCisJCQlyZXR1cm4gdHJ1ZTsKKworCWZvciAoaSA9IDA7IGkgPCBMUEFJRl9JUlFfUE9SVF9OVU07ICsraSkgeworCQlpZiAocmVnID09IExQQUlGX0lSUUVOX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCQlpZiAocmVnID09IExQQUlGX0lSUUNMRUFSX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCX0KKworCWZvciAoaSA9IDA7IGkgPCBMUEFJRl9SRE1BX0NIQU5fTlVNOyArK2kpIHsKKwkJaWYgKHJlZyA9PSBMUEFJRl9SRE1BQ1RMX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCQlpZiAocmVnID09IExQQUlGX1JETUFCQVNFX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCQlpZiAocmVnID09IExQQUlGX1JETUFCVUZGX1JFRyhpKSkKKwkJCXJldHVybiB0cnVlOworCQlpZiAocmVnID09IExQQUlGX1JETUFQRVJfUkVHKGkpKQorCQkJcmV0dXJuIHRydWU7CisJfQorCisJcmV0dXJuIGZhbHNlOworfQorCitzdGF0aWMgYm9vbCBscGFzc19jcHVfcmVnbWFwX3JlYWRhYmxlKHN0cnVjdCBkZXZpY2UgKmRldiwgdW5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