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9zZwkJCT0gZXRodG9vbF9vcF9nZXRfc2csCi0JLnNldF9zZwkJCT0gZXRodG9vbF9vcF9zZXRfc2csCisJLmdldF9wYXVzZXBhcmFtICAgICAgICAgPSBlMTAwMF9nZXRfcGF1c2VwYXJhbSwKKwkuc2V0X3BhdXNlcGFyYW0gICAgICAgICA9IGUxMDAwX3NldF9wYXVzZXBhcmFtLAorCS5nZXRfcnhfY3N1bSAgICAgICAgICAgID0gZTEwMDBfZ2V0X3J4X2NzdW0sCisJLnNldF9yeF9jc3VtICAgICAgICAgICAgPSBlMTAwMF9zZXRfcnhfY3N1bSwKKwkuZ2V0X3R4X2NzdW0gICAgICAgICAgICA9IGUxMDAwX2dldF90eF9jc3VtLAorCS5zZXRfdHhfY3N1bSAgICAgICAgICAgID0gZTEwMDBfc2V0X3R4X2NzdW0sCisJLmdldF9zZyAgICAgICAgICAgICAgICAgPSBldGh0b29sX29wX2dldF9zZywKKwkuc2V0X3NnICAgICAgICAgICAgICAgICA9IGV0aHRvb2xfb3Bfc2V0X3NnLAogI2lmZGVmIE5FVElGX0ZfVFNPCi0JLmdldF90c28JCT0gZXRodG9vbF9vcF9nZXRfdHNvLAotCS5zZXRfdHNvCQk9IGUxMDAwX3NldF90c28sCisJLmdldF90c28gICAgICAgICAgICAgICAgPSBldGh0b29sX29wX2dldF90c28sCisJLnNldF90c28gICAgICAgICAgICAgICAgPSBlMTAwMF9zZXRfdHNvLAogI2VuZGlmCiAJLnNlbGZfdGVzdF9jb3VudCAgICAgICAgPSBlMTAwMF9kaWFnX3Rlc3RfY291bnQsCiAJLnNlbGZfdGVzdCAgICAgICAgICAgICAgPSBlMTAwMF9kaWFnX3Rlc3QsCkBAIC0xOTIyLDcgKzE5NTcsNyBAQAogCS5waHlzX2lkICAgICAgICAgICAgICAgID0gZTEwMDBfcGh5c19pZCwKIAkuZ2V0X3N0YXRzX2NvdW50ICAgICAgICA9IGUxMDAwX2dldF9zdGF0c19jb3VudCwKIAkuZ2V0X2V0aHR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X0lEOgogICAgIGNhc2UgTTg4RTEwMDBfSV9QSFlfSUQ6CiAgICAgY2FzZSBNODhFMTAxMV9JX1BIWV9JRDoKQEAgLTE3NywxMCArMTc4LDEwIEBACiAgICAgICAgIGh3LT5waHlfdHlwZSA9IGUxMDAwX3BoeV9tODg7CiAgICAgICAgIGJyZWFrOwogICAgIGNhc2UgSUdQMDFFMTAwMF9JX1BIWV9JRDoKLSAgICAgICAgaWYoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQxIHx8Ci0gICAgICAgICAgIGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0MV9yZXZfMiB8fAotICAgICAgICAgICBody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDcgfHwKLSAgICAgICAgICAgaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQ3X3Jldl8yKSB7CisgICAgICAgIGlmIChody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDEgfHwKKyAgICAgICAgICAgIGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0MV9yZXZfMiB8fAorICAgICAgICAgICAgaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQ3IHx8CisgICAgICAgICAgICBody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDdfcmV2XzIpIHsKICAgICAgICAgICAgIGh3LT5waHlfdHlwZSA9IGUxMDAwX3BoeV9pZ3A7CiAgICAgICAgICAgICBicmVhazsKICAgICAgICAgfQpAQCAtMjA3LDYgKzIwOCw3IEBACiAgICAgcmV0dXJuIEUxMDAwX1NVQ0NFU1M7CiB9CiAKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogSUdQIHBoeSBpbml0IHNjcmlwdCAtIGluaXRpYWxpemVzIHRoZSBHYkUgUEhZCiAgKgpAQCAtMjIwLDcgKzIyMiw3IEBACiAKICAgICBERUJVR0ZVTkMoImUxMDAwX3BoeV9pb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iAKICAgICAvKiBGb3IgODI1NDIgKHJldiAyLjApLCBkaXNhYmxlIE1XSSBiZWZvcmUgaXNzdWluZyBhIGRldmljZSByZXNldCAqLwotICAgIGlmKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0Ml9yZXYyXzApIHsKKyAgICBpZiAoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQyX3JldjJfMCkgewogICAgICAgICBERUJVR09VVCgiRGlzYWJsaW5nIE1XSSBvbiA4MjU0MiByZXYgMi4wXG4iKTsKICAgICAgICAgZTEwMDBfcGNpX2NsZWFyX213aShodyk7CiAgICAgfQogCi0gICAgaWYoaHctPmJ1c190eXBlID09IGUxMDAwX2J1c190eXBlX3BjaV9leHByZXNzKSB7CisgICAgaWYgKGh3LT5idXNfdHlwZSA9PSBlMTAwMF9idXNfdHlwZV9wY2lfZXhwcmVzcykgewogICAgICAgICAvKiBQcmV2ZW50IHRoZSBQQ0ktRSBidXMgZnJvbSBzdGlja2luZyBpZiB0aGVyZSBpcyBubyBUTFAgY29ubmVjdGlvbgogICAgICAgICAgKiBvbiB0aGUgbGFzdCBUTFAgcmVhZC93cml0ZSB0cmFuc2FjdGlvbiB3aGVuIE1BQyBpcyByZXNldC4KICAgICAgICAgICovCi0gICAgICAgIGlmKGUxMDAwX2Rpc2FibGVfcGNpZXhfbWFzdGVyKGh3KSAhPSBFMTAwMF9TVUNDRVNTKSB7CisgICAgICAgIGlmIChlMTAwMF9kaXNhYmxlX3BjaWV4X21hc3RlcihodykgIT0gRTEwMDBfU1VDQ0VTUykgewogICAgICAgICAgICAgREVCVUdPVVQoIlBDSS1FIE1hc3RlciBkaXNhYmxlIHBvbGxpbmcgaGFzIGZhaWxlZC5cbiIpOwogICAgICAgICB9CiAgICAgfQpAQCAtNTUzLDE0ICs1NTYsMTQgQEAKICAgICBjdHJsID0gRTEwMDBfUkVBRF9SRUcoaHcsIENUUkwpOwogCiAgICAgLyogTXVzdCByZXNldCB0aGUgUEhZIGJlZm9yZ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ZWFrOwogICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgIGV4dGNuZl9jdHJsIHw9IEUxMDAwX0VYVENORl9DVFJMX01ESU9fU1dfT1dORVJTSElQOwogCiAgICAgICAgICAgICBtc2VjX2RlbGF5KDIpOwogICAgICAgICAgICAgdGltZW91dC0tOwotICAgICAgICB9IHdoaWxlKHRpbWVvdXQpOworICAgICAgICB9IHdoaWxlICh0aW1lb3V0KTsKICAgICB9CiAKICAgICAvKiBXb3JrYXJvdW5kIGZvciBJQ0g4IGJpdCBjb3JydXB0aW9uIGlzc3VlIGluIEZJRk8gbWVtb3J5ICovCkBAIC01OTUsNyArNTk4LDcgQEAKICAgICAgKi8KICAgICBERUJVR09VVCgiSXNzdWluZyBhIGdsb2JhbCByZXNldCB0byBNQUNcbiIpOwogCi0gICAgc3dpdGNoKGh3LT5tYWNfdHlwZSkgeworICAgIHN3aXRjaCAoaHctPm1hY190eXBlKSB7CiAgICAgICAgIGNhc2UgZTEwMDBfODI1NDQ6CiAgICAgICAgIGNhc2UgZTEwMDBfODI1NDA6CiAgICAgICAgIGNhc2UgZTEwMDBfODI1NDU6CkBAIC02MzQsNyArNjM3LDcgQEAKICAgICAgKiBkZXZpY2UuICBMYXRlciBjb250cm9sbGVycyByZWxvYWQgdGhlIEVFUFJPTSBhdXRvbWF0aWNhbGx5LCBzbyBqdXN0IHdhaXQKICAgICAgKiBmb3IgcmVsb2FkIHRvIGNvbXBsZXRlLgogICAgICAqLwotICAgIHN3aXRjaChody0+bWFjX3R5cGUpIHsKKyAgICBzd2l0Y2ggKGh3LT5tYWNfdHlwZSkgewogICAgICAgICBjYXNlIGUxMDAwXzgyNTQyX3JldjJfMDoKICAgICAgICAgY2FzZSBlMTAwMF84MjU0Ml9yZXYyXzE6CiAgICAgICAgIGNhc2UgZTEwMDBfODI1NDM6CkBAIC02NjksNyArNjcyLDcgQEAKICAgICAgICAgY2FzZSBlMTAwMF9pY2g4bGFuOgogICAgICAgICBjYXNlIGU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SByZXNldCAqLwpAQCAtNzA0LDggKzcwNyw4IEBACiAgICAgaWNyID0gRTEwMDBfUkVBRF9SRUcoaHcsIElDUik7CiAKICAgICAvKiBJZiBNV0kgd2FzIHByZXZpb3VzbHkgZW5hYmxlZCwgcmVlbmFibGUgaXQuICovCi0gICAgaWYoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQyX3JldjJfMCkgewotICAgICAgICBpZihody0+cGNpX2NtZF93b3JkICYgQ01EX01FTV9XUlRfSU5WQUxJREFURSkKKyAgICBpZiAoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQyX3JldjJfMCkgeworICAgICAgICBpZiAoaHctPnBjaV9jbWRfd29yZCAmIENNRF9NRU1fV1JUX0lOVkFMSURBVEUpCiAgICAgICAgICAgICBlMTAwMF9wY2lfc2V0X213aShodyk7CiAgICAgfQogCkBAIC03NDUsOSArNzQ4LDIwIEBACiAKICAgICBERUJVR0ZVTkMoImUxMDAwX2luaXRfaHciKTsKIAorICAgIC8qIGZvcmNlIGZ1bGwgRE1BIGNsb2NrIGZyZXF1ZW5jeSBmb3IgMTAvMTAwIG9uIElDSDggQTAtQjAgKi8KKyAgICBpZiAoaHctPm1hY190eXBlID09IGUxMDAwX2ljaDhsYW4pIHsKKyAgICAgICAgcmVnX2RhdGEgPSBFMTAwMF9SRUFEX1JFRyhodywgVEFSQzApOworICAgICAgICByZWdfZGF0YSB8PSAweDMwMDAwMDAwOworICAgICAgICBFMTAwMF9XUklURV9SRUcoaHcsIFRBUkMwLCByZWdfZGF0YSk7CisKKyAgICAgICAgcmVnX2RhdGEgPSBFMTAwMF9SRUFEX1JFRyhodywgU1RBVFVTKTsKKyAgICAgICAgcmVnX2RhdGEgJj0gfjB4ODAwMDAwMDA7CisgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgU1RBVFVTLCByZWdfZGF0YSk7CisgICAgfQorCiAgICAgLyogSW5pdGlhbGl6ZSBJZGVudGlmaWNhdGlvbiBMRUQgKi8KICAgICByZ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EsMTIgKzEwNjQsMTIgQEAKICAgICAgKiBvciBlMTAwMF9waHlfc2V0dXAoKSBpcyBjYWxsZWQuCiAgICAgICovCiAgICAgaWYgKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0MykgewotCQlyZXRfdmFsID0gZTEwMDBfcmVhZF9lZXByb20oaHcsIEVFUFJPTV9JTklUX0NPTlRST0wyX1JFRywKLQkJCQkJCQkJCTEsICZlZXByb21fZGF0YSk7Ci0JCWlmIChyZXRfdmFsKSB7Ci0JCQlERUJVR09VVCgiRUVQUk9NIFJlYWQgRXJyb3JcbiIpOwotCQkJcmV0dXJuIC1FMTAwMF9FUlJfRUVQUk9NOwotCQl9CisgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX2VlcHJvbShodywgRUVQUk9NX0lOSVRfQ09OVFJPTDJfUkVHLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgJmVlcHJvbV9kYXRhKTsKKyAgICAgICAgaWYgKHJldF92YWwpIHsKKyAgICAgICAgICAgIERFQlVHT1VUKCJFRVBST00gUmVhZCBFcnJvclxuIik7CisgICAgICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9FRVBST007CisgICAgICAgIH0KICAgICAgICAgY3RybF9leHQgPSAoKGVlcHJvbV9kYXRhICYgRUVQUk9NX1dPUkQwRl9TV1BESU9fRVhUKSA8PAogICAgICAgICAgICAgICAgICAgICBTV0RQSU9fX0VYVF9TSElGVCk7CiAgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgQ1RSTF9FWFQsIGN0cmxfZXh0KTsKQEAgLTEwODksMTQgKzExMDIsMTQgQEAKICAgICAgKiBhYmlsaXR5IHRvIHRyYW5zbWl0IHBhdXNlIGZyYW1lcyBpbiBub3QgZW5hYmxlZCwgdGhlbiB0aGVzZQogICAgICAqIHJlZ2lzdGVycyB3aWxsIGJlIHNldCB0byAwLgogICAgICAqLwotICAgIGlmKCEoaHctPmZjICYgZTEwMDBfZmNf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TktfVVBfVElNRU9VVCAvIDEwKTsgaSsrKSB7CiAgICAgICAgICAgICBtc2VjX2RlbGF5KDEwKTsKICAgICAgICAgICAgIHN0YXR1cyA9IEUxMDAwX1JFQURfUkVHKGh3LCBTVEFUVVMpOwotICAgICAgICAgICAgaWYoc3RhdHVzICYgRTEwMDBfU1RBVFVTX0xVKSBicmVhazsKKyAgICAgICAgICAgIGlmIChzdGF0dXMgJiBFMTAwMF9TVEFUVVNfTFUpIGJyZWFrOwogICAgICAgICB9Ci0gICAgICAgIGlmKGkgPT0gKExJTktfVVBfVElNRU9VVCAvIDEwKSkgeworICAgICAgICBpZiAoaSA9PSAoTElOS19VUF9USU1FT1VUIC8gMTApKSB7CiAgICAgICAgICAgICBERUJVR09VVCgiTmV2ZXIgZ290IGEgdmFsaWQgbGluayBmcm9tIGF1dG8tbmVnISEhXG4iKTsKICAgICAgICAgICAgIGh3LT5hdXRvbmVnX2ZhaWxlZCA9IDE7CiAgICAgICAgICAgICAvKiBBdXRvTmVnIGZhaWxlZCB0byBhY2hpZXZlIGEgbGluaywgc28gd2UnbGwgY2FsbApAQCAtMTI0Myw3ICsxMjU2LDcgQEAKICAgICAgICAgICAgICAqIG5vbi1hdXRvbmVnb3RpYXRpbmcgbGluayBwYXJ0bmVycy4KICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX2NoZWNrX2Zvcl9saW5rKGh3KTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpIHsKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKSB7CiAgICAgICAgICAgICAgICAgREVCVUdPVVQoIkVycm9yIHdoaWxlIGNoZWNraW5nIGZvciBsaW5rXG4iKTsKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgICAgIH0KQEAgLTEyNzcsNyArMTI5MCw3IEBACiAgICAgICogdGhlIFBIWSBzcGVlZCBhbmQgZHVwbGV4IGNvbmZpZ3VyYXRpb24gaXMuIE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gIHJldF92YWwgPSBlMTAwMF9zZXRfZDNfbHBsdV9zdGF0ZShodywgRkFMU0UpOworICAgICAgICBpZiAocmV0X3ZhbCkgeworICAgICAgICAgICAgREVCVUdPVVQoIkVycm9yIERpc2FibGluZyBMUExVIEQzXG4iKTsKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworICAgICAgICB9CiAgICAgfQogCiAgICAgLyogZGlzYWJsZSBscGx1IGQwIGR1cmluZyBkcml2ZXIgaW5pdCAqLwpAQCAtMTM5Myw0NSArMTQwOSw0NSBAQAogICAgICAgICB9CiAgICAgfQogICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NUUkwsIHBoeV9kYXRhKTsKLSAgICBpZihyZXRfdmFsKQorICAgIGlmIChyZXRfdmFsKQogICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgIC8qIHNldCBhdXRvLW1hc3RlciBzbGF2ZSByZXNvbHV0aW9uIHNldHRpbmdzICovCi0gICAgaWYoaHctPmF1dG9uZWcpIHsKKyAgICBpZiAoaHctPmF1dG9uZWcpIHsKICAgICAgICAgZTEwMDBfbXNfdHlwZSBwaHlfbXNfc2V0dGluZyA9IGh3LT5tYXN0ZXJfc2xhdmU7CiAKLSAgICAgICAgaWYoaHctPmZmZV9jb25maWdfc3RhdGUgPT0gZTEwMDBfZmZlX2NvbmZpZ19hY3RpdmUpCisgICAgICAgIGlmIChody0+ZmZlX2NvbmZpZ19zdGF0ZSA9PSBlMTAwMF9mZmVfY29uZmlnX2FjdGl2ZSkKICAgICAgICAgICAgIGh3LT5mZmVfY29uZmlnX3N0YXRlID0gZTEwMDBfZmZlX2NvbmZpZ19lbmFibGVkOwogCi0gICAgICAgIGlmKGh3LT5kc3BfY29uZmlnX3N0YXRlID09IGUxMDAwX2RzcF9jb25maWdfYWN0aXZhdGVkKQorICAgICAgICBpZiAoaHctPmRzcF9jb25maWdfc3RhdGUgPT0gZTEwMDBfZHNwX2NvbmZpZ19hY3RpdmF0ZWQpCiAgICAgICAgICAgICBody0+ZHNwX2NvbmZpZ19zdGF0ZSA9IGUxMDAwX2RzcF9jb25maWdfZW5hYmxlZDsKIAogICAgICAgICAvKiB3aGVuIGF1dG9uZWdvdGlhdGlvbiBhZHZlcnRpc21lbnQgaXMgb25seSAxMDAwTWJwcyB0aGVuIHdlCiAgICAgICAgICAgKiBzaG91bGQgZGlzYWJsZSBTbWFydFNwZWVkIGFuZCBlbmFibGUgQXV0byBNYXN0ZXJTbGF2ZQogICAgICAgICAgICogcmVzb2x1dGlvbiBhcyBoYXJkd2FyZSBkZWZhdWx0LiAqLwotICAgICAgICBpZihody0+YXV0b25lZ19hZHZlcnRpc2VkID09IEFEVkVSVElTRV8xMDAwX0ZVTEwpIHsKKyAgICAgICAgaWYgKGh3LT5hdXRvbmVnX2FkdmVydGlzZWQgPT0gQURWRVJUSVNFXzEwMDBfRlVMTCkgewogICAgICAgICAgICAgLyogRGlzYWJsZSBTbWFydFNwZWVkICovCi0gICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NPTkZJRywgJnBoeV9kYXRhKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NPTkZJRywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnBoeV9kYXRhKTsKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAgICAgcGh5X2RhdGEgJj0gfklHUDAxRTEwMDBfUFNDRlJfU01BUlRfU1BFRUQ7Ci0gICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSUdQMDFFMTAwMF9QSFlfUE9SVF9DT05GSUcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBoeV9kYXRhKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgSUdQMDFFMTAwMF9QSFlfUE9SVF9DT05GSUcsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaHlfZGF0YSk7CisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgICAgIC8qIFNldCBhdXRvIE1hc3Rlci9TbGF2ZSByZXNvbHV0aW9uIHByb2Nlc3MgKi8KICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIFBIWV8xMDAwVF9DVFJMLCAmcGh5X2RhdGEpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAgICAgcGh5X2RhdGEgJj0gfkNSXzEwMDBUX01TX0VOQUJMRTsKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBQSFlfMTAwMFRfQ1RSTCwgcGh5X2RhdGEpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICB9CiAKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZXzEwMDBUX0NUUkwsICZwaHlfZGF0YSk7Ci0gICAgICAgIGlmKHJldF92YWwpCisgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgLyogbG9hZCBkZWZhdWx0cyBmb3IgZnV0dXJlIHVzZSAqLwpAQCAtMTQ1NSw3ICsxNDcxLDcgQEAKICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICB9CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBQSFlfMTAwMFRfQ1RSTCwgcGh5X2RhdGEpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIH0KIApAQCAtMTQ3NiwxMiArMTQ5MiwxMiBAQAogCiAgICAgREVCVUdGVU5DKCJlMTAwMF9jb3BwZXJfbGlua19nZ3Bfc2V0dXAiKTsKIAotICAgIGlmKCFody0+cGh5X3Jlc2V0X2Rpc2FibGUpIHsKKyAgICBpZiAoIWh3LT5waHlfcmVzZXRfZGlzYWJsZSkgewogCiAgICAgICAgIC8qIEVuYWJsZSBDUlMgb24gVFggZm9yIGhhbGYtZHVwbGV4IG9wZXJhdGlvbi4gKi8KICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgR0c4MjU2M19QSFlfTUFDX1NQRUNfQ1RSTCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcGh5X2RhdGEpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgIHBoeV9kYXRhIHw9IEdHODI1NjNfTVNDUl9BU1NFUlRfQ1JTX09OX1RYOwpAQCAtMTQ5MCw3ICsxNTA2LDcgQEAKIAogICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgR0c4MjU2M19QSFlfTUFDX1NQRUNfQ1RSTCwKICAgICAgICA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kKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAvKiBTVyBSZXNldCB0aGUgUEhZIHNvIGFsbCBjaGFuZ2VzIHRha2UgZWZmZWN0ICovCkBAIC0xNTg2LDkgKzE2MDIsOSBAQAogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgICAgICBwaHlfZGF0YSAmPSB+R0c4MjU2M19LTUNSX1BBU1NfRkFMU0VfQ0FSUklFUjsKLQogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIEdHODI1NjNfUEhZX0tNUk5fTU9ERV9DVFJMLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGh5X2RhdGEpOworCiAgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgfQpAQCAtMTYyMywxMiArMTYzOSwxMiBAQAogCiAgICAgREVCVUdGVU5DKCJlMTAwMF9jb3BwZXJfbGlua19tZ3Bfc2V0dXAiKTsKIAotICAgIGlmKGh3LT5waHlfcmVzZXRfZGlzYWJsZSkKKyAgICBpZiAoaHctPnBoeV9yZXNldF9kaXNhYmxlKQogICAgICAgICByZXR1cm4gRTEwMDBfU1VDQ0VTUzsKIAogICAgIC8qIEVuYWJsZSBDUlMgb24gVFguIFRoaXMgbXVzdCBiZSBzZXQgZm9yIGhhbGYtZHVwbGV4IG9wZXJhdGlvbi4gKi8KICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBNODhFMTAwMF9QSFlfU1BFQ19DVFJMLCAmcGh5X2RhdGEpOwotICAgIGlmKHJldF92YWwpCisgICAgaWYgKHJldF92YWwpCiAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgcGh5X2RhdGEgfD0gTTg4RTEwMDBfUFNDUl9BU1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gZm9yIEF1dG8tTmVnIHRvIGNvbXBsZXRlIGhlcmUsIG9yCiAgICAgICogY2hlY2sgYXQgYSBsYXRlciB0aW1lIChmb3IgZXhhbXBsZSwgY2FsbGJhY2sgcm91dGluZSkuCiAgICAgICovCi0gICAgaWYoaHctPndhaXRfYXV0b25lZ19jb21wbGV0ZSkgeworICAgIGlmIChody0+d2FpdF9hdXRvbmVnX2NvbXBsZXRlKSB7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF93YWl0X2F1dG9uZWcoaHcpOwotICAgICAgICBpZihyZXRfdmFsKSB7CisgICAgICAgIGlmIChyZXRfdmFsKSB7CiAgICAgICAgICAgICBERUJVR09VVCgiRXJyb3Igd2hpbGUgd2FpdGluZyBmb3IgYXV0b25lZyB0byBjb21wbGV0ZVxuIik7CiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgfQpAQCAtMTc3OCw3ICsxNzk0LDYgQEAKICAgICByZXR1cm4gRTEwMDBfU1VDQ0VTUzsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqIENvbmZpZyB0aGUgTUFDIGFuZCB0aGUgUEhZIGFmdGVyIGxpbmsgaXMgdXAuCiAqICAgMSkgU2V0IHVwIHRoZSBNQUMgdG8gdGhlIGN1cnJlbnQgUEhZIHNwZWVkL2R1cGxleApAQCAtMTc5NywyNSArMTgxMiwyNSBAQAogICAgIGludDMyX3QgcmV0X3ZhbDsKICAgICBERUJVR0ZVTkMoImUxMDAwX2NvcHBlcl9saW5rX3Bvc3Rjb25maWciKTsKIAotICAgIGlmKGh3LT5tYWNfdHlwZSA+PSBlMTAwMF84MjU0NCkgeworICAgIGlmIChody0+bWFjX3R5cGUgPj0gZTEwMDBfODI1NDQpIHsKICAgICAgICAgZTEwMDBfY29uZmlnX2NvbGxpc2lvbl9kaXN0KGh3KTsKICAgICB9IGVsc2UgewogICAgICAgICByZXRfdmFsID0gZTEwMDBfY29uZmlnX21hY190b19waHkoaHcpOwotICAgICAgICBpZihyZXRfdmFsKSB7CisgICAgICAgIGlmIChyZXRfdmFsKSB7CiAgICAgICAgICAgICBERUJVR09VVCgiRXJyb3IgY29uZmlndXJpbmcgTUFDIHRvIFBIWSBzZXR0aW5nc1xuIik7CiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgfQogICAgIH0KICAgICByZXRfdmFsID0gZTEwMDBfY29uZmlnX2ZjX2FmdGVyX2xpbmtfdXAoaHcpOwotICAgIGlmKHJldF92YWwpIHsKKyAgICBpZiAocmV0X3ZhbCkgewogICAgICAgICBERUJVR09VVCgiRXJyb3IgQ29uZmlndXJpbmcgRmxvdyBDb250cm9sXG4iKTsKICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgfQogCiAgICAgLyogQ29uZmlnIERTUCB0byBpbXByb3ZlIEdpZ2EgbGluayBxdWFsaXR5ICovCi0gICAgaWYoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3ApIHsKKyAgICBpZiAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3ApIHsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX2NvbmZpZ19kc3BfYWZ0ZXJfbGlua19jaGFuZ2UoaHcsIFRSVUUpOwotICAgICAgICBpZihyZXRfdmFsKSB7CisgICAgICAgIGlmIChyZXRfdmFsKSB7CiAgICAgICAgICAgICBERUJVR09VVCgiRXJyb3IgQ29uZmlndXJpbmcgRFNQIGFmdGVyIGxpbmsgdXBcbiIpOwogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgIH0KQEAgLTE4NjEsNyArMTg3Niw3IEBACiAKICAgICAvKiBDaGVjayBpZiBpdCBpcyBhIHZhbGlkIFBIWSBhbmQgc2V0IFBIWSBtb2RlIGlmIG5lY2Vzc2FyeS4gKi8KICAgICByZXRfdmFsID0gZTEwMDBfY29wcGVyX2xpbmtfcHJlY29uZmlnKGh3KTsKLSAgICBpZihyZXRfdmFsKQorICAgIGlmIChyZXRfdmFsKQogICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgIHN3aXRjaCAoaHctPm1hY190eXBlKSB7CkBAIC0xODgyLDMwICsxODk3LDMwIEBACiAgICAgICAgIGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfaWdwXzMgfHwKICAgICAgICAgaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3BfMikgewogICAgICAgICByZXRfdmFsID0gZTEwMDBfY29wcGVyX2xpbmtfaWdwX3NldHVwKGh3KTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICB9IGVsc2UgaWYgKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfbTg4KSB7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9jb3BwZXJfbGlua19tZ3Bfc2V0dXAoaHcpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIH0gZWxzZSBpZiAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9nZzgyNTYzKSB7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9jb3BwZXJfbGlua19nZ3Bfc2V0dXAoaHcpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIH0KIAotICAgIGlmKGh3LT5hdXRvbmVnKSB7CisgICAgaWYgKGh3LT5hdXRvbmVnKSB7CiAgICAgICAgIC8qIFNldHVwIGF1dG9uZWcgYW5kIGZsb3cgY29udHJvbCBhZHZlcnRpc2VtZW50CiAgICAgICAgICAgKiBhbmQgcGVyZm9ybSBhdXRvbmVnb3RpYX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bGV0ZSBiaXQKICAgICAgICAgICAgICAqIHRvIGJlIHNldC4KICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZX1NUQVRVUywgJm1paV9zdGF0dXNfcmVnKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZX1NUQVRVUywgJm1paV9zdGF0dXNfcmVnKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAotICAgICAgICAgICAgaWYobWlpX3N0YXR1c19yZWcgJiBNSUlfU1JfTElOS19TVEFUVVMpIGJyZWFrOworICAgICAgICAgICAgaWYgKG1paV9zdGF0dXNfcmVnICYgTUlJX1NSX0xJTktfU1RBVFVTKSBicmVhazsKICAgICAgICAgICAgIG1zZWNfZGVsYXkoMTAwKTsKICAgICAgICAgfQotICAgICAgICBpZigoaSA9PSAwKSAmJgorICAgICAgICBpZiAoKGkgPT0gMCkgJiYKICAgICAgICAgICAgKChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X204OCkgfHwKICAgICAgICAgICAgIChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X2dnODI1NjMpKSkgewogICAgICAgICAgICAgLyogV2UgZGlkbid0IGdldCBsaW5rLiAgUmVzZXQgdGhlIERTUCBhbmQgd2FpdCBhZ2FpbiBmb3IgbGluay4gKi8KICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9waHlfcmVzZXRfZHNwKGh3KTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpIHsKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKSB7CiAgICAgICAgICAgICAgICAgREVCVUdPVVQoIkVycm9yIFJlc2V0dGluZyBQSFkgRFNQXG4iKTsKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgICAgIH0KICAgICAgICAgfQogICAgICAgICAvKiBUaGlzIGxvb3Agd2lsbCBlYXJseS1vdXQgaWYgdGhlIGxpbmsgY29uZGl0aW9uIGhhcyBiZWVuIG1ldC4gICovCi0gICAgICAgIGZvcihpID0gUEhZX0ZPUkNFX1RJTUU7IGkgPiAwOyBpLS0pIHsKLSAgICAgICAgICAgIGlmKG1paV9zdGF0dXNfcmVnICYgTUlJX1NSX0xJTktfU1RBVFVTKSBicmVhazsKKyAgICAgICAgZm9yIChpID0gUEhZX0ZPUkNFX1RJTUU7IGkgPiAwOyBpLS0pIHsKKyAgICAgICAgICAgIGlmIChtaWlfc3RhdHVzX3JlZyAmIE1JSV9TUl9MSU5LX1NUQVRVUykgYnJlYWs7CiAgICAgICAgICAgICBtc2VjX2RlbGF5KDEwMCk7CiAgICAgICAgICAgICAvKiBSZWFkIHRoZSBNSUkgU3RhdHVzIFJlZ2lzdGVyIGFuZCB3YWl0IGZvciBBdXRvLU5lZyBDb21wbGV0ZSBiaXQKICAgICAgICAgICAgICAqIHRvIGJlIHNldC4KICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZX1NUQVRVUywgJm1paV9zdGF0dXNfcmVnKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZX1NUQVRVUywgJm1paV9zdGF0dXNfcmVnKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCk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ICAgICBwaHlfZGF0YSB8PSBNODhFMTAwMF9QU0NSX0FTU0VSVF9DUlNfT05fVFg7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBNODhFMTAwMF9QSFlfU1BFQ19DVFJMLCBwaHlfZGF0YSk7Ci0gICAgICAgIGlmKHJldF92YWwpCisgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKLSAgICAgICAgaWYoKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0NCB8fCBody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDMpICYmCi0gICAgICAgICAgICghaHctPmF1dG9uZWcpICYmCi0gICAgICAgICAgIChody0+Zm9yY2VkX3NwZWVkX2R1cGxleCA9PSBlMTAwMF8xMF9mdWxsIHx8Ci0gICAgICAgICAgICBody0+Zm9yY2VkX3NwZWVkX2R1cGxleCA9PSBlMTAwMF8xMF9oYWxmKSkgeworICAgICAgICBpZiAoKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0NCB8fCBody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDMpICYmCisgICAgICAgICAgICAoIWh3LT5hdXRvbmVnKSAmJiAoaHctPmZvcmNlZF9zcGVlZF9kdXBsZXggPT0gZTEwMDBfMTBfZnVsbCB8fAorICAgICAgICAgICAgIGh3LT5mb3JjZWRfc3BlZWRfZHVwbGV4ID09IGUxMDAwXzEwX2hhbGYpKSB7CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcG9sYXJpdHlfcmV2ZXJzYWxfd29ya2Fyb3VuZChodyk7Ci0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgIH0KICAgICB9IGVsc2UgaWYgKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfZ2c4MjU2MykgewpAQ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AgKi8KICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZX1NUQVRVUywgJm1paV9zdGF0dXNfcmVnKTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZX1NUQVRVUywgJm1paV9zdGF0dXNfcmVnKTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAotICAgICAgICBpZihtaWlfc3RhdHVzX3JlZyAmIE1JSV9TUl9BVVRPTkVHX0NPTVBMRVRFKSB7CisgICAgICAgIGlmIChtaWlfc3RhdHVzX3JlZyAmIE1JSV9TUl9BVVRPTkVHX0NPTVBMRVRFKSB7CiAgICAgICAgICAgICAvKiBUaGUgQXV0b05lZyBwcm9jZXNzIGhhcyBjb21wbGV0ZWQsIHNvIHdlIG5vdyBuZWVkIHRvCiAgICAgICAgICAgICAgKiByZWFkIGJvdGggdGhlIEF1dG8gTmVnb3RpYXRpb24gQWR2ZXJ0aXNlbWVudCBSZWdpc3RlcgogICAgICAgICAgICAgICogKEFkZHJlc3MgNCkgYW5kIHRoZSBBdXRvX05lZ290aWF0aW9uIEJhc2UgUGFnZSBBYmlsaXR5CkBAIC0yNjIzLDExICsyNjM4LDExIEBACiAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIFBIWV9BVVRPTkVHX0FEViwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJm1paV9ud2F5X2Fkdl9yZWcpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZX0xQX0FCSUxJVFksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZtaWlfbndheV9scF9hYmlsaXR5X3JlZyk7Ci0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgICAgIC8qIFR3byBiaXRzIGluIHRoZSBBdXRvIE5lZ290aWF0aW9uIEFkdmVydGlzZW1lbnQgUmVnaXN0ZXIKQEAgLTI2NjQsMTUgKzI2NzksMTUgQEAKICAgICAgICAgICAgICAqICAgMSAgIHwgICBEQyAgICB8ICAgMSAgIHwgICBEQyAgICB8IGUxMDAwX2ZjX2Z1bGwKICAgICAgICAgICAgICAqCiAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgIGlmKChtaWlfbndheV9hZHZfcmVnICYgTldBWV9BUl9QQVVTRSkgJiYKLSAgICAgICAgICAgICAgIChtaWlfbndheV9scF9hYmlsaXR5X3JlZyAmIE5XQVlfTFBBUl9QQVVTRSkpIHsKKyAgICAgICAgICAgIGlmICgobWlpX253YXlfYWR2X3JlZyAmIE5XQVlfQVJfUEFVU0UpICYmCisgICAgICAgICAgICAgICAgKG1paV9ud2F5X2xwX2FiaWxpdHlfcmVnICYgTldBWV9MUEFSX1BBVVNFKSkgewogICAgICAgICAgICAgICAgIC8qIE5vdyB3ZSBuZWVkIHRvIGNoZWNrIGlmIHRoZSB1c2VyIHNlbGVjdGVkIFJYIE9OTFkKICAgICAgICAgICAgICAgICAgKiBvZiBwYXVzZSBmcmFtZXMuICBJbiB0aGlzIGNhc2UsIHdlIGhhZCB0byBhZHZlcnRpc2UKICAgICAgICAgICAgICAgICAgKiBGVUxMIGZsb3cgY29udHJvbCBiZWNhdXNlIHdlIGNvdWxkIG5vdCBhZHZlcnRpc2UgUlgKICAgICAgICAgICAgICAgICAgKiBPTkxZLiBIZW5jZSwgd2UgbXVzdCBub3cgY2hlY2sgdG8gc2VlIGlmIHdlIG5lZWQgdG8KICAgICAgICAgICAgICAgICAgKiB0dXJuIE9GRiAgdGhlIFRSQU5TTUlTU0lPTiBvZiBQQVVTRSBmcmFtZXMuCiAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgaWYoaHctPm9yaWdpbmFsX2ZjID09IGUxMDAwX2ZjX2Z1bGwpIHsKKyAgICAgICAgICAgICAgICBpZiAoaHctPm9yaWdpbmFsX2ZjID09IGUxMDAwX2ZjX2Z1bGwpIHsKICAgICAgICAgICAgICAgICAgICAgaHctPmZjID0gZTEwMDBfZmNfZnVsbDsKICAgICAgICAgICAgICAgICAgICAgREVCVUdPVVQoIkZsb3cgQ29udHJvbCA9IEZVTEwuXG4iKTsKICAgICAgICAgICAgICAgICB9IGVsc2UgewpAQCAtMjY4OCwxMCArMjcwMywxMCBAQAogICAgICAgICAgICAgICogICAwICAgfCAgICAxICAgIHwgICAxICAgfCAgICAxICAgIHwgZTEwMDBfZmNfdHhfcGF1c2UKICAgICAgICAgICAgICAqCiAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgIGVsc2UgaWYoIShtaWlfbndheV9hZHZfcmVnICYgTldBWV9BUl9QQVVTRSkgJiYKLSAgICAgICAgICAgICAgICAgICAgKG1paV9ud2F5X2Fkdl9yZWcgJiBOV0FZX0FSX0FTTV9ESVIpICYmCi0gICAgICAgICAgICAgICAgICAgIChtaWlfbndheV9scF9hYmlsaXR5X3JlZyAmIE5XQVlfTFBBUl9QQVVTRSkgJiYKLSAgICAgICAgICAgICAgICAgICAgKG1paV9ud2F5X2xwX2FiaWxpdHlfcmVnICYgTldBWV9MUEFSX0FTTV9ESVIpKSB7CisgICAgICAgICAgICBlbHNlIGlmICghKG1paV9ud2F5X2Fkdl9yZWcgJiBOV0FZX0FSX1BBVVNFKSAmJgorICAgICAgICAgICAgICAgICAgICAgKG1paV9ud2F5X2Fkdl9yZWcgJiBOV0FZX0FSX0FTTV9ESVIpICYmCisgICAgICAgICAgICAgICAgICAgICAobWlpX253YXlfbHBfYWJpbGl0eV9yZWcgJiBOV0FZX0xQQVJfUEFVU0UpICYmCisgICAgICAgICAgICAgICAgICAgICAobWlpX253YXlfbHBfYWJpbGl0eV9yZWcgJiBOV0FZX0xQQVJfQVNNX0RJUikpIHsKICAgICAgICAgICAgICAgICBody0+ZmMgPSBlMTAwMF9mY190eF9wYXVzZTsKICAgICAgICAgICAgICAgICBERUJVR09VVCgiRmxvdyBDb250cm9sID0gVFggUEFVU0UgZnJhbWVzIG9ubHkuXG4iKTsKICAgICAgICAgICAgIH0KQEAgLTI3MDMsMTAgKzI3MTgsMTAgQEAKICAgICAgICAgICAgICAqICAgMSAgIHwgICAgMSAgICB8ICAgMCAgIHwgICAgMSAgICB8IGUxMDAwX2ZjX3J4X3BhdXNlCiAgICAgICAgICAgICAgKgogICAgICAgICAgICAgICovCi0gICAgICAgICAgICBlbHNlIGlmKChtaWlfbndheV9hZHZfcmVnICYgTldBWV9BUl9QQVVTRSkgJiYKLSAgICAgICAgICAgICAgICAgICAgKG1paV9ud2F5X2Fkdl9yZWcgJiBOV0FZX0FSX0FTTV9ESVIpICYmCi0gICAgICAgICAgICAgICAgICAgICEobWlpX253YXlfbHBfYWJpbGl0eV9yZWcgJiBOV0FZX0xQQVJfUEFVU0UpICYmCi0gICAgICAgICAgICAgICAgICAgIChtaWlfbndheV9scF9hYmlsaXR5X3JlZyAmIE5XQVlfTFBBUl9BU01fRElSKSkgeworICAgICAgICAgICAgZWxzZSBpZiAoKG1paV9ud2F5X2Fkdl9yZWcgJiBOV0FZX0FSX1BBVVNFKSAmJgorICAgICAgICAgICAgICAgICAgICAgKG1paV9ud2F5X2Fkdl9yZWcgJiBOV0FZX0FSX0FTTV9ESVIpICYmCisgICAgICAgICAgICAgICAgICAgICAhKG1paV9ud2F5X2xwX2FiaWxpdHlfcmVnICYgTldBWV9MUEFSX1BBVVNFKSAmJgorICAgICAgICAgICAgICAgICAgICAgKG1paV9ud2F5X2xwX2FiaWxpdHlfcmVnICYgTldBWV9MUEFSX0FTTV9ESVIpKSB7CiAgICAgICAgICAgICAgICAgaHctPmZjID0gZTEwMDBfZmNfcnhfcGF1c2U7CiAgICAgICAgICAgICAgICAgREVCVUdPVVQoIkZsb3cgQ29udHJvbCA9IFJYIFBBVVNFIGZyYW1lcyBvbmx5LlxuIik7CiAgICAgICAgICAgICB9CkBAIC0yNzMwLDkgKzI3NDUsOSBAQAogICAgICAgICAgICAgICogYmUgYXNrZWQgdG8gZGVsYXkgdHJhbnNtaXNzaW9uIG9mIHBhY2tldHMgdGhhbiBhc2tpbmcKICAgICAgICAgICAgICAqIG91ciBsaW5rIHBhcnRuZXIgdG8gcGF1c2UgdHJhbnNtaXNzaW9uIG9mIGZyYW1lcy4KICAgICAgICAgICAgICAqLwotICAgICAgICAgICAgZWxzZSBpZigoaHctPm9yaWdpbmFsX2ZjID09IGUxMDAwX2ZjX25vbmUgfHwKLSAgICAgICAgICAgICAgICAgICAgIGh3LT5vcmlnaW5hbF9mYyA9PSBlMTAwMF9mY190eF9wYXVzZSkgfHwKLSAgICAgICAgICAgICAgICAgICAgaHctPmZjX3N0cmljdF9pZWVlKSB7CisgICAgICAgICAgICBlbHNlIGlmICgoaHctPm9yaWdpbmFsX2ZjID09IGUxMDAwX2ZjX25vbmUgfHwKKyAgICAgICAgICAgICAgICAgICAgICBody0+b3JpZ2luYWxfZmMgPT0gZTEwMDBfZmNfdHhfcGF1c2UpIHx8CisgICAgICAgICAgICAgICAgICAgICAgaHctPmZjX3N0cmljdF9pZWVlKSB7CiAgICAgICAgICAgICAgICAgaHctPmZjID0gZTEwMDBfZmNfbm9uZTsKICAgICAgICAgICAgICAgICBERUJVR09VVCgiRmxvdyBDb250cm9sID0gTk9ORS5cbiIpOwogICAgICAgICAgICAgfSBlbHNlIHsKQEAgLTI3NDUsMTkgKzI3NjAsMTkgQEAKICAgICAgICAgICAgICAqIGVuYWJsZWQgcGVyIElFRUUgODAyLjMgc3BlYy4KICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX2dldF9zcGVlZF9hbmRfZHVwbGV4KGh3LCAmc3BlZWQsICZkdXBsZXgpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkgeworICAgICAgICAgICAgaWYgKHJldF92YWwpIHsKICAgICAgICAgICAgICAgICBERUJVR09VVCgiRXJyb3IgZ2V0dGluZyBsaW5rIHNwZWVkIGFuZCBkdXBsZXhcbiIpOwogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAgICAgfQogCi0gICAgICAgICAgICBpZihkdXBsZXggPT0gSEFMRl9EVVBMRVgpCisgICAgICAgICAgICBpZiAoZHVwbGV4ID09IEhBTEZfRFVQTEVYKQogICAgICAgICAgICAgICAgIGh3LT5mYyA9IGUxMDAwX2ZjX25vbmU7CiAKICAgICAgICAgICAgIC8qIE5vdyB3ZSBjYWxsIGEgc3Vicm91dGluZSB0byBhY3R1YWxseSBmb3JjZSB0aGUgTUFDCiAgICAgICAgICAgICAgKiBjb250cm9sbGVyIHRvIHVzZSB0aGUgY29ycmVjdCBmbG93IGNvbnRyb2wgc2V0dGluZ3MuCiAgICAgICAgICAgICAgKi8KICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9mb3JjZV9tYWNfZmMoaHcpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkgeworICAgICAgICAgICAgaWYgKHJldF92YWwpIHsKICAgICAgICAgICAgICAgICBERUJVR09VVCgiRXJyb3IgZm9yY2luZyBmbG93IGNvbnRyb2wgc2V0dGluZ3NcbiIpOwogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAgICAgfQpAQCAtMjc5NiwxMyArMjgxMSwxMyBAQAogICAgICAqIHNldCB3aGVuIHRoZSB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UnggU2VxdWVuY2UKICAgICAgKiBFcnJvcnMuCiAgICAgICovCi0gICAgaWYoKGh3LT5tZWRpYV90eXBlID09IGUxMDAwX21lZGlhX3R5cGVfY29wcGVyKSAmJiBody0+Z2V0X2xpbmtfc3RhdHVzKSB7CisgICAgaWYgKChody0+bWVkaWFfdHlwZSA9PSBlMTAwMF9tZWRpYV90eXBlX2NvcHBlcikgJiYgaHctPmdldF9saW5rX3N0YXR1cykgewogICAgICAgICAvKiBGaXJzdCB3ZSB3YW50IHRvIHNlZSBpZiB0aGUgTUlJIFN0YXR1cyBSZWdpc3RlciByZXBvcnRzCiAgICAgICAgICAqIGxpbmsuICBJZiBzbywgdGhlbiB3ZSB3YW50IHRvIGdldCB0aGUgY3VycmVudCBzcGVlZC9kdXBsZXgKICAgICAgICAgICogb2YgdGhlIFBIWS4KICAgICAgICAgICogUmVhZCB0aGUgcmVnaXN0ZXIgdHdpY2Ugc2luY2UgdGhlIGxpbmsgYml0IGlzIHN0aWNreS4KICAgICAgICAgICovCiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIFBIWV9TVEFUVVMsICZwaHlfZGF0YSk7Ci0gICAgICAgIGlmKHJldF92YWwpCisgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIFBIWV9TVEFUVVMsICZwaHlfZGF0YSk7Ci0gICAgICAgIGlmKHJldF92YWwpCisgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKLSAgICAgICAgaWYocGh5X2RhdGEgJiBNSUlfU1JfTElOS19TVEFUVVMpIHsKKyAgICAgICAgaWYgKHBoeV9kYXRhICYgTUlJX1NSX0xJTktfU1RBVFVTKSB7CiAgICAgICAgICAgICBody0+Z2V0X2xpbmtfc3RhdHVzID0gRkFMU0U7CiAgICAgICAgICAgICAvKiBDaGVjayBpZiB0aGVyZSB3YXMgRG93blNoaWZ0LCBtdXN0IGJlIGNoZWNrZWQgaW1tZWRpYXRlbHkgYWZ0ZXIKICAgICAgICAgICAgICAqIGxpbmstdXAgKi8KQEAgLTI4NDAsMTAgKzI4NTUsMTAgQEAKICAgICAgICAgICAgICAqIGhhcHBlbiBkdWUgdG8gdGhlIGV4ZWN1dGlvbiBvZiB0aGlzIHdvcmthcm91bmQuCiAgICAgICAgICAgICAgKi8KIAotICAgICAgICAgICAgaWYoKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0NCB8fCBody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDMpICYmCi0gICAgICAgICAgICAgICAoIWh3LT5hdXRvbmVnKSAmJgotICAgICAgICAgICAgICAgKGh3LT5mb3JjZWRfc3BlZWRfZHVwbGV4ID09IGUxMDAwXzEwX2Z1bGwgfHwKLSAgICAgICAgICAgICAgICBody0+Zm9yY2VkX3NwZWVkX2R1cGxleCA9PSBlMTAwMF8xMF9oYWxmKSkgeworICAgICAgICAgICAgaWYgKChody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDQgfHwgaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQzKSAmJgorICAgICAgICAgICAgICAgICghaHctPmF1dG9uZWcpICYmCisgICAgICAgICAgICAgICAgKGh3LT5mb3JjZWRfc3BlZWRfZHVwbGV4ID09IGUxMDAwXzEwX2Z1bGwgfHwKKyAgICAgICAgICAgICAgICAgaHctPmZvcmNlZF9zcGVlZF9kdXBsZXggPT0gZTEwMDBfMTBfaGFsZikpIHsKICAgICAgICAgICAgICAgICBFMTAwMF9XUklURV9SRUcoaHcsIElNQywgMHhmZmZmZmZmZik7CiAgICAgICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3BvbGFyaXR5X3JldmVyc2FsX3dvcmthcm91bmQoaHcpOwogICAgICAgICAgICAgICAgIGljciA9IEUxMDAwX1JFQURfUkVHKGh3LC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dGluZ3NcbiIpOwogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAgICAgfQpAQCAtMjg4OCw3ICsyOTAzLDcgQEAKICAgICAgICAgICogaGF2ZSBoYWQgdG8gcmUtYXV0b25lZyB3aXRoIGEgZGlmZmVyZW50IGxpbmsgcGFydG5lci4KICAgICAgICAgICovCiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9jb25maWdfZmNfYWZ0ZXJfbGlua191cChodyk7Ci0gICAgICAgIGlmKHJldF92YWwpIHsKKyAgICAgICAgaWYgKHJldF92YWwpIHsKICAgICAgICAgICAgIERFQlVHT1VUKCJFcnJvciBjb25maWd1cmluZyBmbG93IGNvbnRyb2xcbiIpOwogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgIH0KQEAgLTI5MDAsNyArMjkxNSw3IEBACiAgICAgICAgICAqIGF0IGdpZ2FiaXQgc3BlZWQsIHRoZW4gVEJJIGNvbXBhdGliaWxpdHkgaXMgbm90IG5lZWRlZC4gIElmIHdlIGFyZQogICAgICAgICAgKiBhdCBnaWdhYml0IHNwZWVkLCB3ZSB0dXJuIG9uIFRCSSBjb21wYXRpYmlsaXR5LgogICAgICAgICAgKi8KLSAgICAgICAgaWYoaHctPnRiaV9jb21wYXRpYmlsaXR5X2VuKSB7CisgICAgICAgIGlmIChody0+dGJpX2NvbXBhdGliaWxpdHlfZW4pIHsKICAgICAgICAgICAgIHVpbnQxNl90IHNwZWVkLCBkdXBsZXg7CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfZ2V0X3NwZWVkX2FuZF9kdXBsZXgoaHcsICZzcGVlZCwgJmR1cGxleCk7CiAgICAgICAgICAgICBpZiAocmV0X3ZhbCkgewpAQCAtMjkxMSw3ICsyOTI2LDcgQEAKICAgICAgICAgICAgICAgICAvKiBJZiBsaW5rIHNwZWVkIGlzIG5vdCBzZXQgdG8gZ2lnYWJpdCBzcGVlZCwgd2UgZG8gbm90IG5lZWQKICAgICAgICAgICAgICAgICAgKiB0byBlbmFibGUgVEJJIGNvbXBhdGliaWxpdHkuCiAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgaWYoaHctPnRiaV9jb21wYXRpYmlsaXR5X29uKSB7CisgICAgICAgICAgICAgICAgaWYgKGh3LT50YmlfY29tcGF0aWJpbGl0eV9vbikgewogICAgICAgICAgICAgICAgICAgICAvKiBJZiB3ZSBwcmV2aW91c2x5IHdlcmUgaW4gdGhlIG1vZGUsIHR1cm4gaXQgb2ZmLiAqLwogICAgICAgICAgICAgICAgICAgICByY3RsID0gRTEwMDBfUkVBRF9SRUcoaHcsIFJDVEwpOwogICAgICAgICAgICAgICAgICAgICByY3RsICY9IH5FMTAwMF9SQ1RMX1NCUDsKQEAgLTI5MjQsNyArMjkzOSw3IEBACiAgICAgICAgICAgICAgICAgICogcGFja2V0cy4gU29tZSBmcmFtZXMgaGF2ZSBhbiBhZGRpdGlvbmFsIGJ5dGUgb24gdGhlIGVuZCBhbmQKICAgICAgICAgICAgICAgICAgKiB3aWxsIGxvb2sgbGlrZSBDUkMgZXJyb3JzIHRvIHRvIHRoZSBoYXJkd2FyZS4KICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICBpZighaHctPnRiaV9jb21wYXRpYmlsaXR5X29uKSB7CisgICAgICAgICAgICAgICAgaWYgKCFody0+dGJpX2NvbXBhdGliaWxpdHlfb24pIHsKICAgICAgICAgICAgICAgICAgICAgaHctPnRiaV9jb21wYXRpYmlsaXR5X29uID0gVFJVRTsKICAgICAgICAgICAgICAgICAgICAgcmN0bCA9IEUxMDAwX1JFQURfUkVHKGh3LCBSQ1RMKTsKICAgICAgICAgICAgICAgICAgICAgcmN0bCB8PSBFMTAwMF9SQ1RMX1NCUDsKQEAgLTI5NDAsMTIgKzI5NTUsMTIgQEAKICAgICAgKiBhdXRvLW5lZ290aWF0aW9uIHRpbWUgdG8gY29tcGxldGUsIGluIGNhc2UgdGhlIGNhYmxl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ENoZWNrIHRvIHNlZSBpZiB3ZSBzaGlmdGVkIGluIGEgIjEiLiAqLwotICAgICAgICBpZihjdHJsICYgRTEwMDBfQ1RSTF9NRElPKSBkYXRhIHw9IDE7CisgICAgICAgIGlmIChjdHJsICYgRTEwMDBfQ1RSTF9NRElPKQorICAgICAgICAgICAgZGF0YSB8PSAxOwogICAgICAgICBlMTAwMF9sb3dlcl9tZGlfY2xrKGh3LCAmY3RybCk7CiAgICAgfQogCkBAIC0zMjc2LDcgKzMyOTQsNyBAQAogICAgIGlmICghaHctPnN3Zndfc3luY19wcmVzZW50KQogICAgICAgICByZXR1cm4gZTEwMDBfZ2V0X2h3X2VlcHJvbV9zZW1hcGhvcmUoaHcpOwogCi0gICAgd2hpbGUodGltZW91dCkgeworICAgIHdoaWxlICh0aW1lb3V0KSB7CiAgICAgICAgICAgICBpZiAoZTEwMDBfZ2V0X2h3X2VlcHJvbV9zZW1hcGhvcmUoaHcpKQogICAgICAgICAgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX1NXRldfU1lOQzsKIApAQCAtMzM2NSw3ICszMzgzLDcgQEAKICAgICAgICAocmVnX2FkZHIgPiBNQVhfUEhZX01VTFRJX1BBR0VfUkVHKSkgewogICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZ19leChodywgSUdQMDFFMTAwMF9QSFlfUEFHRV9TRUxFQ1QsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1aW50MTZfdClyZWdfYWRkcik7Ci0gICAgICAgIGlmKHJldF92YWwpIHsKKyAgICAgICAgaWYgKHJldF92YWwpIHsKICAgICAgICAgICAgIGUxMDAwX3N3Zndfc3luY19yZWxlYXNlKGh3LCBzd2Z3KTsKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICB9CkBAIC0zNDEwLDEyICszNDI4LDEyIEBACiAKICAgICBERUJVR0ZVTkMoImUxMDAwX3JlYWRfcGh5X3JlZ19leCIpOwogCi0gICAgaWYocmVnX2FkZHIgPiBNQVhfUEhZX1JFR19BRERSRVNTKSB7CisgICAgaWYgKHJlZ19hZGRyID4gTUFYX1BIWV9SRUdfQUREUkVTUykgewogICAgICAgICBERUJVR09VVDEoIlBIWSBBZGRyZXNzICVkIGlzIG91dCBvZiByYW5nZVxuIiwgcmVnX2FkZHIpOwogICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9QQVJBTTsKICAgICB9CiAKLSAgICBpZihody0+bWFjX3R5cGUgPiBlMTAwMF84MjU0MykgeworICAgIGlmIChody0+bWFjX3R5cGUgPiBlMTAwMF84MjU0MykgewogICAgICAgICAvKiBTZXQgdXAgT3AtY29kZSwgUGh5IEFkZHJlc3MsIGFuZCByZWdpc3RlciBhZGRyZXNzIGluIHRoZSBNREkKICAgICAgICAgICogQ29udHJvbCByZWdpc3Rlci4gIFRoZSBNQUMgd2lsbCB0YWtlIGNhcmUgb2YgaW50ZXJmYWNpbmcgd2l0aCB0aGUKICAgICAgICAgICogUEhZIHRvIHJldHJpZXZlIHRoZSBkZXNpcmVkIGRhdGEuCkBAIC0zNDI3LDE2ICszNDQ1LDE2IEBACiAgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgTURJQywgbWRpYyk7CiAKICAgICAgICAgLyogUG9sbCB0aGUgcmVhZHkgYml0IHRvIHNlZSBpZiB0aGUgTURJIHJlYWQgY29tcGxldGVkICovCi0gICAgICAgIGZvcihpID0gMDsgaSA8IDY0OyBpKyspIHsKKyAgICAgICAgZm9yIChpID0gMDsgaSA8IDY0OyBpKyspIHsKICAgICAgICAgICAgIHVkZWxheSg1MCk7CiAgICAgICAgICAgICBtZGljID0gRTEwMDBfUkVBRF9SRUcoaHcsIE1ESUMpOwotICAgICAgICAgICAgaWYobWRpYyAmIEUxMDAwX01ESUNfUkVBRFkpIGJyZWFrOworICAgICAgICAgICAgaWYgKG1kaWMgJiBFMTAwMF9NRElDX1JFQURZKSBicmVhazsKICAgICAgICAgfQotICAgICAgICBpZighKG1kaWMgJiBFMTAwMF9NRElDX1JFQURZKSkgeworICAgICAgICBpZiAoIShtZGljICYgRTEwMDBfTURJQ19SRUFEWSkpIHsKICAgICAgICAgICAgIERFQlVHT1VUKCJNREkgUmVhZCBkaWQgbm90IGNvbXBsZXRlXG4iKTsKICAgICAgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX1BIWTsKICAgICAgICAgfQotICAgICAgICBpZihtZGljICYgRTEwMDBfTURJQ19FUlJPUikgeworICAgICAgICBpZiAobWRpYyAmIEUxMDAwX01ESUNfRVJST1IpIHsKICAgICAgICAgICAgIERFQlVHT1VUKCJNREkgRXJyb3JcbiIpOwogICAgICAgICAgICAgcmV0dXJuIC1FMTAwMF9FUlJfUEhZOwogICAgICAgICB9CkBAIC0zNTA1LDcgKzM1MjMsNyBAQAogICAgICAgIChyZWdfYWRkciA+IE1BWF9QSFlfTVVMVElfUEFHRV9SRUcpKSB7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnX2V4KGh3LCBJR1AwMUUxMDAwX1BIWV9QQUdFX1NFTEVDVCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVpbnQxNl90KXJlZ19hZGRyKTsKLSAgICAgICAgaWYocmV0X3ZhbCkgeworICAgICAgICBpZiAocmV0X3ZhbCkgewogICAgICAgICAgICAgZTEwMDBfc3dmd19zeW5jX3JlbGVhc2UoaHcsIHN3ZncpOwogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgIH0KQEAgLTM1NTAsMTIgKzM1NjgsMTIgQEAKIAogICAgIERFQlVHRlVOQygiZTEwMDBfd3JpdGVfcGh5X3JlZ19leCIpOwogCi0gICAgaWYocmVnX2FkZHIgPiBNQVhfUEhZX1JFR19BRERSRVNTKSB7CisgICAgaWYgKHJlZ19hZGRyID4gTUFYX1BIWV9SRUdfQUREUkVTUykgewogICAgICAgICBERUJVR09VVDEoIlBIWSBBZGRyZXNzICVkIGlzIG91dCBvZiByYW5nZVxuIiwgcmVnX2FkZHIpOwogICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9QQVJBTTsKICAgICB9CiAKLSAgICBpZihody0+bWFjX3R5cGUgPiBlMTAwMF84MjU0MykgeworICAgIGlmIChody0+bWFjX3R5cGUgPiBlMTAwMF84MjU0MykgewogICAgICAgICAvKiBTZXQgdXAgT3AtY29kZSwgUGh5IEFkZHJlc3MsIHJlZ2lzdGVyIGFkZHJlc3MsIGFuZCBkYXRhIGludGVuZGVkCiAgICAgICAgICAqIGZvciB0aGUgUEhZIHJlZ2lzdGVyIGluIHRoZSBNREkgQ29udHJvbCByZWdpc3Rlci4gIFRoZSBNQUMgd2lsbCB0YWtlCiAgICAgICAgICAqIGNhcmUgb2YgaW50ZXJmYWNpbmcgd2l0aCB0aGUgUEhZIHRvIHNlbmQgdGhlIGRlc2lyZWQgZGF0YS4KQEAgLTM1NjgsMTIgKzM1ODYsMTIgQEAKICAgICAgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBNRElDLCBtZGljKTsKIAogICAgICAgICAvKiBQb2xsIHRoZSByZWFkeSBiaXQgdG8gc2VlIGlmIHRoZSBNREkgcmVhZCBjb21wbGV0ZWQgKi8KLSAgICAgICAgZm9yKGkgPSAwOyBpIDwgNjQwOyBpKyspIHsKKyAgICAgICAgZm9yIChpID0gMDsgaSA8IDY0MTsgaSsrKSB7CiAgICAgICAgICAgICB1ZGVsYXkoNSk7CiAgICAgICAgICAgICBtZGljID0gRTEwMDBfUkVBRF9SRUcoaHcsIE1ESUMpOwotICAgICAgICAgICAgaWYobWRpYyAmIEUxMDAwX01ESUNfUkVBRFkpIGJyZWFrOworICAgICAgICAgICAgaWYgKG1kaWMgJiBFMTAwMF9NRElDX1JFQURZKSBicmVhazsKICAgICAgICAgfQotICAgICAgICBpZighKG1kaWMgJiBFMTAwMF9NRElDX1JFQURZKSkgeworICAgICAgICBpZiAoIShtZGljICYgRTEwMDBfTURJQ19SRUFEWSkpIHsKICAgICAgICAgICAgIERFQlVHT1VUKCJNREkgV3JpdGUgZGlkIG5vdCBjb21wbGV0ZVxuIik7CiAgICAgICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9QSFk7CiAgICAgICAgIH0KQEAgLTM2ODUsNyArMzcwMyw3IEBACiAKICAgICBERUJVR09VVCgiUmVzZXR0aW5nIFBoeS4uLlxuIik7CiAKLSAgICBpZihody0+bWFjX3R5cGUgPiBlMTAwMF84MjU0MykgeworICAgIGlmIChody0+bWFjX3R5cGUgPiBlMTAwMF84MjU0MykgewogICAgICAgICBpZiAoKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MDAwM2VzMmxhbikgJiYKICAgICAgICAgICAgIChFMTAwMF9SRUFEX1JFRyhodywgU1RBVFVTKSAmIEUxMDAwX1NUQVRVU19GVU5DXzEpKSB7CiAgICAgICAgICAgICBzd2Z3ID0gRTEwMDBfU1dGV19QSFkxX1NNOwpAQCAtMzczMyw3ICszNzUxLDcgQEAKICAgICB9CiAgICAgdWRlbGF5KDE1MCk7CiAKLSAgICBpZigoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQxKSB8fCAoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQ3KSkgeworICAgIGlmICgoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQxKSB8fCAoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQ3KSkgewogICAgICAgICAvKiBDb25maWd1cmUgYWN0aXZpdHkgTEVEIGFmdGVyIFBIWSByZXNldCAqLwogICAgICAgICBsZWRfY3RybCA9IEUxMDAwX1JFQURfUkVHKGh3LCBMRURDVEwpOwogICAgICAgICBsZWRfY3RybCAmPSBJR1BfQUNUSVZJVFlfTEVEX01BU0s7CkBAIC0zNzQzLDE0ICszNzYxLDEzIEBACiAKICAgICAvKiBXYWl0IGZvciBGVyB0byBmaW5pc2ggUEhZIGNvbmZpZ3VyYXRpb24uICovCiAgICAgcmV0X3ZhbCA9IGUxMDAwX2dldF9waHlfY2ZnX2RvbmUoaHcpOworICAgIGlmIChyZXRfdmFsICE9IEUxMDAwX1NVQ0NFU1MpCisgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIGUxMDAwX3JlbGVhc2Vfc29mdHdhcmVfc2VtYXBob3JlKGh3KTsKIAotICAgICAgICBpZiAoKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF9pY2g4bGFuKSAmJgotICAgICAgICAgICAgKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfaWdwXzMpKSB7Ci0gICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfaW5pdF9sY2RfZnJvbV9udm0oaHcpOwotICAgICAgICAgICAgaWYgKHJldF92YWwpCi0gICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7Ci0gICAgICAgIH0KKyAgICBpZiAoKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF9pY2g4bGFuKSAmJiAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3BfMykpCisgICAgICAgIHJldF92YWwgPSBlMTAwMF9pbml0X2xjZF9mcm9tX252bShodyk7CisKICAgICByZXR1cm4gcmV0X3ZhbDsKIH0KIApAQCAtMzc4MSwyNSArMzc5OCwyNSBAQAogICAgIGNhc2UgZTEwMDBfODI1NzI6CiAgICAgY2FzZSBlMTAwMF9pY2g4bGFuOgogICAgICAgICByZXRfdmFsID0gZTEwMDBfcGh5X2h3X3Jlc2V0KGh3KTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICBicmVhazsKICAgICBkZWZhdWx0OgogICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBQSFlfQ1RSTCwgJnBoeV9kYXRhKTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gc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ogICAgIGNhc2UgZTEwMDBfODI1NDA6CiAgICAgY2FzZSBlMTAwMF84MjU0NToKICAgICBjYXNlIGUxMDAwXzgyNTQ1X3Jldl8zOgogICAgIGNhc2UgZTEwMDBfODI1NDY6CiAgICAgY2FzZSBlMTAwMF84MjU0Nl9yZXZfMzoKLSAgICAgICAgaWYoaHctPnBoeV9pZCA9PSBNODhFMTAxMV9JX1BIWV9JRCkgbWF0Y2ggPSBUUlVFOworICAgICAgICBpZiAoaHctPnBoeV9pZCA9PSBNODhFMTAxMV9JX1BIWV9JRCkgbWF0Y2ggPSBUUlVFOwogICAgICAgICBicmVhazsKICAgICBjYXNlIGUxMDAwXzgyNTQxOgogICAgIGNhc2UgZTEwMDBfODI1NDFfcmV2XzI6CiAgICAgY2FzZSBlMTAwMF84MjU0NzoKICAgICBjYXNlIGUxMDAwXzgyNTQ3X3Jldl8yOgotICAgICAgICBpZihody0+cGh5X2lkID09IElHUDAxRTEwMDBfSV9QSFlfSUQpIG1hdGNoID0gVFJVRTsKKyAgICAgICAgaWYgKGh3LT5waHlfaWQgPT0gSUdQMDFFMTAwMF9JX1BIWV9JRCkgbWF0Y2ggPSBUUlVFOwogICAgICAgICBicmVhazsKICAgICBjYXNlIGUxMDAwXzgyNTczOgotICAgICAgICBpZihody0+cGh5X2lkID09IE04OEUxMTExX0lfUEhZX0lEKSBtYXRjaCA9IFRSVUU7CisgICAgICAgIGlmIChody0+cGh5X2lkID09IE04OEUxMTExX0lfUEhZX0lEKSBtYXRjaCA9IFRSVUU7CiAgICAgICAgIGJyZWFrOwogICAgIGNhc2UgZTEwMDBfODAwMDNlczJsYW46CiAgICAgICAgIGlmIChody0+cGh5X2lkID09IEdHODI1NjNfRV9QSFlfSUQpIG1hdGNoID0gVFJVRTsKQEAgLTQwMjEsMTQgKzQwMzgsMTQgQEAKICAgICBkbyB7CiAgICAgICAgIGlmIChody0+cGh5X3R5cGUgIT0gZTEwMDBfcGh5X2dnODI1NjMpIHsKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCAyOSwgMHgwMDFkKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpIGJyZWFrOworICAgICAgICAgICAgaWYgKHJldF92YWwpIGJyZWFrOwogICAgICAgICB9CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCAzMCwgMHgwMGMxKTsKLSAgICAgICAgaWYocmV0X3ZhbCkgYnJlYWs7CisgICAgICAgIGlmIChyZXRfdmFsKSBicmVhazsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIDMwLCAweDAwMDApOwotICAgICAgICBpZihyZXRfdmFsKSBicmVhazsKKyAgICAgICAgaWYgKHJldF92YWwpIGJyZWFrOwogICAgICAgICByZXRfdmFsID0gRTEwMDBfU1VDQ0VTUzsKLSAgICB9IHdoaWxlKDApOworICAgIH0gd2hpbGUgKDApOwogCiAgICAgcmV0dXJuIHJldF92YWw7CiB9CkBAIC00MDYwLDIzICs0MDc3LDIzIEBACiAKICAgICAvKiBDaGVjayBwb2xhcml0eSBzdGF0dXMgKi8KICAgICByZXRfdmFsID0gZTEwMDBfY2hlY2tfcG9sYXJpdHkoaHcsICZwb2xhcml0eSk7Ci0gICAgaWYocmV0X3ZhbCkKKyAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICBwaHlfaW5mby0+Y2FibGVfcG9sYXJpdHkgPSBwb2xhcml0eTsKIAogICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfUEhZX1BPUlRfU1RBVFVTLCAmcGh5X2RhdGEpOwotICAgIGlmKHJldF92YWwpCisgICAgaWYgKHJldF92YWwpCiAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgcGh5X2luZm8tPm1kaXhfbW9kZSA9IChwaHlfZGF0YSAmIElHUDAxRTEwMD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KSA9PSBGQUxTRSkgewogICAgICAgICAgICAgZWVwcm9tLT50eXBlID0gZTEwMDBfZWVwcm9tX2ZsYXNoOwogICAgICAgICAgICAgZWVwcm9tLT53b3JkX3NpemUgPSAyMDQ4OwogCkBAIC00NDYwLDE3ICs0NDc3LDE3IEBACiAgICAgICAgIC8qIGVlcHJvbV9zaXplIHdpbGwgYmUgYW4gZW51bSBbMC4uOF0gdGhhdCBtYXBzIHRvIGVlcHJvbSBzaXplcyAxMjhCIHRvCiAgICAgICAgICAqIDMyS0IgKGluY3JlbWVudGVkIGJ5IHBvd2VycyBvZiAyKS4KICAgICAgICAgICovCi0gICAgICAgIGlmKGh3LT5tYWNfdHlwZSA8PSBlMTAwMF84MjU0N19yZXZfMikgeworICAgICAgICBpZiAoaHctPm1hY190eXBlIDw9IGUxMDAwXzgyNTQ3X3Jldl8yKSB7CiAgICAgICAgICAgICAvKiBTZXQgdG8gZGVmYXVsdCB2YWx1ZSBmb3IgaW5pdGlhbCBlZXByb20gcmVhZC4gKi8KICAgICAgICAgICAgIGVlcHJvbS0+d29yZF9zaXplID0gNjQ7CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9lZXByb20oaHcsIEVFUFJPTV9DRkcsIDEsICZlZXByb21fc2l6ZSk7Ci0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgICAgICBlZXByb21fc2l6ZSA9IChlZXByb21fc2l6ZSAmIEVFUFJPTV9TSVpFX01BU0spID4+IEVFUFJPTV9TSVpFX1NISUZUOwogICAgICAgICAgICAgLyogMjU2QiBlZXByb20gc2l6ZSB3YXMgbm90IHN1cHBvcnRlZCBpbiBlYXJsaWVyIGhhcmR3YXJlLCBzbyB3ZQogICAgICAgICAgICAgICogYnVtcCBlZXByb21fc2l6ZSB1cCBvbmUgdG8gZW5zdXJlIHRoYXQgIjEiICh3a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kYXRhID0gZGF0YSA8PCAxOwogICAgICAgICBlMTAwMF9yYWlzZV9lZV9jbGsoaHcsICZlZWNkKTsKIAogICAgICAgICBlZWNkID0gRTEwMDBfUkVBRF9SRUcoaHcsIEVFQ0QpOwogCiAgICAgICAgIGVlY2QgJj0gfihFMTAwMF9FRUNEX0RJKTsKLSAgICAgICAgaWYoZWVjZCAmIEUxMDAwX0VFQ0RfRE8pCisgICAgICAgIGlmIChlZWNkICYgRTEwMDBfRUVDRF9ETykKICAgICAgICAgICAgIGRhdGEgfD0gMTsKIAogICAgICAgICBlMTAwMF9sb3dlcl9lZV9jbGsoaHcsICZlZWNkKTsKQEAgLTQ2MzgsMTcgKzQ2NTUsMTcgQEAKIAogICAgIGlmIChody0+bWFjX3R5cGUgIT0gZTEwMDBfODI1NzMpIHsKICAgICAgICAgLyogUmVxdWVzdCBFRVBST00gQWNjZXNzICovCi0gICAgICAgIGlmKGh3LT5tYWNfdHlwZSA+IGUxMDAwXzgyNTQ0KSB7CisgICAgICAgIGlmIChody0+bWFjX3R5cGUgPiBlMTAwMF84MjU0NCkgewogICAgICAgICAgICAgZWVjZCB8PSBFMTAwMF9FRUNEX1JFUTsKICAgICAgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgRUVDRCwgZWVjZCk7CiAgICAgICAgICAgICBlZWNkID0gRTEwMDBfUkVBRF9SRUcoaHcsIEVFQ0QpOwotICAgICAgICAgICAgd2hpbGUoKCEoZWVjZCAmIEUxMDAwX0VFQ0RfR05UKSkgJiYKKyAgICAgICAgICAgIHdoaWxlICgoIShlZWNkICYgRTEwMDBfRUVDRF9HTlQpKSAmJgogICAgICAgICAgICAgICAgICAgKGkgPCBFMTAwMF9FRVBST01fR1JBTlRfQVRURU1QVFMpKSB7CiAgICAgICAgICAgICAgICAgaSsrOwogICAgICAgICAgICAgICAgIHVkZWxheSg1KTsKICAgICAgICAgICAgICAgICBlZWNkID0gRTEwMDBfUkVBRF9SRUcoaHcsIEVFQ0QpOwogIC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b20gMC0yMG1TZWMgb24gMy4zViBkZXZpY2VzIChhbmQKICAgICAgKiBvbmx5IDAtNW1TZWMgb24gNVYgZGV2aWNlcykKICAgICAgKi8KLSAgICBpZihyZXRyeV9jb3VudCA+PSBFRVBST01fTUFYX1JFVFJZX1NQSSkgeworICAgIGlmIChyZXRyeV9jb3VudCA+PSBFRVBST01fTUFYX1JFVFJZX1NQSSkgewogICAgICAgICBERUJVR09VVCgiU1BJIEVFUFJPTSBTdGF0dXMgZXJyb3JcbiIpOwogICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9FRVBST007CiAgICAgfQpAQCAtNDg0NCw3ICs0ODYxLDcgQEAKICAgICAvKiBBIGNoZWNrIGZvciBpbnZhbGlkIHZhbHVlczogIG9mZnNldCB0b28gbGFyZ2UsIHRvbyBtYW55IHdvcmRzLCBhbmQgbm90CiAgICAgICogZW5vdWdoIHdvcmRzLgogICAgICAqLwotICAgIGlmKChvZmZzZXQgPj0gZWVwcm9tLT53b3JkX3NpemUpIHx8ICh3b3JkcyA+IGVlcHJvbS0+d29yZF9zaXplIC0gb2Zmc2V0KSB8fAorICAgIGlmICgob2Zmc2V0ID49IGVlcHJvbS0+d29yZF9zaXplKSB8fCAod29yZHMgPiBlZXByb20tPndvcmRfc2l6ZSAtIG9mZnNldCkgfHwKICAgICAgICAod29yZHMgPT0gMCkpIHsKICAgICAgICAgREVCVUdPVVQoIlwid29yZHNcIiBwYXJhbWV0ZXIgb3V0IG9mIGJvdW5kc1xuIik7CiAgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX0VFUFJPTTsKQEAgLTQ4NTIsNyArNDg2OSw3IEBACiAKICAgICAvKiBGTEFTSCByZWFkcyB3aXRob3V0IGFjcXVpcmluZyB0aGUgc2VtYXBob3JlIGFyZSBzYWZlICovCiAgICAgaWYgKGUxMDAwX2lzX29uYm9hcmRfbnZtX2VlcHJvbShodykgPT0gVFJVRSAmJgotICAgIGh3LT5lZXByb20udXNlX2VlcmQgPT0gRkF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HMoaHcsIDE2KTsKICAgICAgICAgICAgIGRhdGFbaV0gPSAod29yZF9pbiA+PiA4KSB8ICh3b3JkX2luIDw8IDgpOwogICAgICAgICB9Ci0gICAgfSBlbHNlIGlmKGVlcHJvbS0+dHlwZSA9PSBlMTAwMF9lZXByb21fbWljcm93aXJlKSB7CisgICAgfSBlbHNlIGlmIChlZXByb20tPnR5cGUgPT0gZTEwMDBfZWVwcm9tX21pY3Jvd2lyZSkgewogICAgICAgICBmb3IgKGkgPSAwOyBpIDwgd29yZHM7IGkrKykgewogICAgICAgICAgICAgLyogU2VuZCB0aGUgUkVBRCBjb21tYW5kIChvcGNvZGUgKyBhZGRyKSAgKi8KICAgICAgICAgICAgIGUxMDAwX3NoaWZ0X291dF9lZV9iaXRzKGh3LCBFRVBST01fUkVBRF9PUENPREVfTUlDUk9XSVJFLApAQCAtNDk0OCw3ICs0OTY1LDcgQEAKICAgICAgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBFRVJELCBlZXJkKTsKICAgICAgICAgZXJyb3IgPSBlMTAwMF9wb2xsX2VlcmRfZWV3cl9kb25lKGh3LCBFMTAwMF9FRVBST01fUE9MTF9SRUFEKTsKIAotICAgICAgICBpZihlcnJvcikgeworICAgICAgICBpZiAoZXJyb3IpIHsKICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICB9CiAgICAgICAgIGRhdGFbaV0gPSAoRTEwMDBfUkVBRF9SRUcoaHcsIEVFUkQpID4+IEUxMDAwX0VFUFJPTV9SV19SRUdfREFUQSk7CkBAIC00OTg1LDcgKzUwMDIsNyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgIEUxMDAwX0VFUFJPTV9SV19SRUdfU1RBUlQ7CiAKICAgICAgICAgZXJyb3IgPSBlMTAwMF9wb2xsX2VlcmRfZWV3cl9kb25lKGh3LCBFMTAwMF9FRVBST01fUE9MTF9XUklURSk7Ci0gICAgICAgIGlmKGVycm9yKSB7CisgICAgICAgIGlmIChlcnJvcikgewogICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIH0KIApAQCAtNDk5Myw3ICs1MDEwLDcgQEAKIAogICAgICAgICBlcnJvciA9IGUxMDAwX3BvbGxfZWVyZF9lZXdyX2RvbmUoaHcsIEUxMDAwX0VFUFJPTV9QT0xMX1dSSVRFKTsKIAotICAgICAgICBpZihlcnJvcikgeworICAgICAgICBpZiAoZXJyb3IpIHsKICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICB9CiAgICAgfQpAQCAtNTAxNCwxMyArNTAzMSwxMyBAQAogICAgIHVpbnQzMl90IGksIHJlZyA9IDA7CiAgICAgaW50MzJfdCBkb25lID0gRTEwMDBfRVJSX0VFUFJPTTsKIAotICAgIGZvcihpID0gMDsgaSA8IGF0dGVtcHRzOyBpKyspIHsKLSAgICAgICAgaWYoZWVyZCA9PSBFMTAwMF9FRVBST01fUE9MTF9SRUFEKQorICAgIGZvciAoaSA9IDA7IGkgPCBhdHRlbXB0czsgaSsrKSB7CisgICAgICAgIGlmIChlZXJkID09IEUxMDAwX0VFUFJPTV9QT0xMX1JFQUQpCiAgICAgICAgICAgICByZWcgPSBFMTAwMF9SRUFEX1JFRyhodywgRUVSRCk7CiAgICAgICAgIGVsc2UKICAgICAgICAgICAgIHJlZyA9IEUxMDAwX1JFQURfUkVHKGh3LCBFRVdSKTsKIAotICAgICAgICBpZihyZWcgJiBFMTAwMF9FRVBST01fUldfUkVHX0RPTkUpIHsKKyAgICAgICAgaWYgKHJlZyAmIEUxMDAwX0VFUFJPTV9SV19SRUdfRE9ORSkgewogICAgICAgICAgICAgZG9uZSA9IEUxMDAwX1NVQ0NFU1M7CiAgICAgICAgICAgICBicmVhazsKICAgICAgICAgfQpAQCAtNTA1Miw3ICs1MDY5LDcgQEAKICAgICAgICAgZWVjZCA9ICgoZWVjZCA+PiAxNSkgJiAweDAzKTsKIAogICAgICAgICAvKiBJZiBib3RoIGJpdHMgYXJlIHNldCwgZGV2aWNlIGlzIEZsYXNoIHR5cGUgKi8KLSAgIC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Vycm9yIG91dC4KICAgICAgICAgICovCi0gICAgICAgIGZvcihpID0gMDsgaSA8IDIwMDsgaSsrKSB7CisgICAgICAgIGZvciAoaSA9IDA7IGkgPCAyMDA7IGkrKykgewogICAgICAgICAgICAgZWVjZCA9IEUxMDAwX1JFQURfUkVHKGh3LCBFRUNEKTsKLSAgICAgICAgICAgIGlmKGVlY2QgJiBFMTAwMF9FRUNEX0RPKSBicmVhazsKKyAgICAgICAgICAgIGlmIChlZWNkICYgRTEwMDBfRUVDRF9ETykgYnJlYWs7CiAgICAgICAgICAgICB1ZGVsYXkoNTApOwogICAgICAgICB9Ci0gICAgICAgIGlmKGkgPT0gMjAwKSB7CisgICAgICAgIGlmIChpID09IDIwMCkgewogICAgICAgICAgICAgREVCVUdPVVQoIkVFUFJPTSBXcml0ZSBkaWQgbm90IGNvbXBsZXRlXG4iKTsKICAgICAgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX0VFUFJPTTsKICAgICAgICAgfQpAQCAtNTU0MCw0MCArNTU1Nyw2IEBACiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFJlYWRzIHRoZSBhZGFwdGVyJ3MgcGFydCBudW1iZXIgZnJvbSB0aGUgRUVQUk9NCi0gKgotICogaHcgLSBTdHJ1Y3QgY29udGFpbmluZyB2YXJpYWJsZXMgYWNjZXNzZWQgYnkgc2hhcmVkIGNvZGUKLSAqIHBhcnRfbnVtIC0gQWRhcHRlcidzIHBhcnQgbnVtYmVyCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQzMl90Ci1lMTAwMF9yZWFkX3BhcnRfbnVtKHN0cnVjdCBlMTAwMF9odyAqaHcsCi0gICAgICAgICAgICAgICAgICAgIHVpbnQzMl90ICpwYXJ0X251bSkKLXsKLSAg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bV9tdGFfZW50cnkgPSBFMTAwMF9OVU1fTVRBX1JFR0lTVEVSUzsKICAgICBpZiAoaHctPm1hY190eXBlID09IGUxMDAwX2ljaDhsYW4pCiAgICAgICAgIG51bV9tdGFfZW50cnkgPSBFMTAwMF9OVU1fTVRBX1JFR0lTVEVSU19JQ0g4TEFOOwotICAgIGZvcihpID0gMDsgaSA8IG51bV9tdGFfZW50cnk7IGkrKykgeworICAgIGZvciAoaSA9IDA7IGkgPCBudW1fbXRhX2VudHJ5OyBpKyspIHsKICAgICAgICAgRTEwMDBfV1JJVEVfUkVHX0FSUkFZKGh3LCBNVEEsIGksIDApOwogICAgICAgICBFMTAwMF9XUklURV9GTFVTSChodyk7CiAgICAgfQogCiAgICAgLyogQWRkIHRoZSBuZXcgYWRkcmVzc2VzICovCi0gICAgZm9yKGkgPSAwOyBpIDwgbWNfYWRkcl9jb3VudDsgaSsrKSB7CisgICAgZm9yIChpID0gMDsgaSA8IG1jX2FkZHJfY291bnQ7IGkrKykgewogICAgICAgICBERUJVR09VVCgiIEFkZGluZyB0aGUgbXVsdGljYXN0IGFkZHJlc3NlczpcbiIpOwogICAgICAgICBERUJVR09VVDcoIiBNQyBBZGRyICMlZCA9JS4yWCAlLjJYICUuMlggJS4yWCAlLjJYICUuMlhcbiIsIGksCiAgICAgICAgICAgICAgICAgICBtY19hZGRyX2xpc3RbaSAqIChFVEhfTEVOR1RIX09GX0FERFJFU1MgKyBwYWQpXSwKQEAgLTU4NDksNyArNTgzMiw3IEBACiAgICAgICogaW4gdGhlIE1UQSwgc2F2ZSBvZmYgdGhlIHByZXZpb3VzIGVudHJ5IGJlZm9yZSB3cml0aW5nIGFuZAogICAgICAqIHJlc3RvcmUgdGhlIG9sZCB2YWx1ZSBhZnRlciB3cml0aW5nLgogICAgICAqLwotICAgIGlmKChody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDQpICYmICgoaGFzaF9yZWcgJiAweDEpID09IDEpKSB7CisgICAgaWYgKChody0+bWFjX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IHRlbXAgPSAoZWVwcm9tX2RhdGEgPj4gKGkgPDwgMikpICYgbGVkX21hc2s7Ci0gICAgICAgIHN3aXRjaCh0ZW1wKSB7CisgICAgICAgIHN3aXRjaCAodGVtcCkgewogICAgICAgICBjYXNlIElEX0xFRF9PTjFfREVGMjoKICAgICAgICAgY2FzZSBJRF9MRURfT04xX09OMjoKICAgICAgICAgY2FzZSBJRF9MRURfT04xX09GRjI6CkBAIC02MDQzLDcgKzYwMjYsNyBAQAogICAgICAgICAgICAgLyogRG8gbm90aGluZyAqLwogICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIH0KLSAgICAgICAgc3dpdGNoKHRlbXApIHsKKyAgICAgICAgc3dpdGNoICh0ZW1wKSB7CiAgICAgICAgIGNhc2UgSURfTEVEX0RFRjFfT04yOgogICAgICAgICBjYXNlIElEX0xFRF9PTjFfT04yOgogICAgICAgICBjYXNlIElEX0xFRF9PRkYxX09OMjoKQEAgLTYwNzcsNyArNjA2MCw3IEBACiAKICAgICBERUJVR0ZVTkMoImUxMDAwX3NldHVwX2xlZCIpOwogCi0gICAgc3dpdGNoKGh3LT5tYWNfdHlwZSkgeworICAgIHN3aXRjaCAoaHctPm1hY190eXBlKSB7CiAgICAgY2FzZSBlMTAwMF84MjU0Ml9yZXYyXzA6CiAgICAgY2FzZSBlMTAwMF84MjU0Ml9yZXYyXzE6CiAgICAgY2FzZSBlMTAwMF84MjU0MzoKQEAgLTYwOTEsMTYgKzYwNzQsMTYgQEAKICAgICAgICAgLyogVHVybiBvZmYgUEhZIFNtYXJ0IFBvd2VyIERvd24gKGlmIGVuYWJsZWQpICovCiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfR01JSV9GSUZPLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZody0+cGh5X3NwZF9kZWZhdWx0KTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfR01JSV9GSUZPLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodWludDE2X3QpKGh3LT5waHlfc3BkX2RlZmF1bHQgJgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB+SUdQMDFFMTAwMF9HTUlJX1NQRCkpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAvKiBGYWxsIFRocm91Z2ggKi8KICAgICBkZWZhdWx0OgotICAgICAgICBpZihody0+bWVkaWFfdHlwZSA9PSBlMTAwMF9tZWRpYV90eXBlX2ZpYmVyKSB7CisgICAgICAgIGlmIChody0+bWVkaWFfdHlwZSA9PSBlMTAwMF9tZWRpYV90eXBlX2ZpYmVyKSB7CiAgICAgICAgICAgICBsZWRjdGwgPSBFMTAwMF9SRUFEX1JFRyhodywgTEVEQ1RMKTsKICAgICAgICAgICAgIC8qIFNhdmUgY3VycmVudCBMRURDVEwgc2V0dGluZ3MgKi8KICAgICAgICAgICAgIGh3LT5sZWRjdGxfZGVmYXVsdCA9IGxlZGN0bDsKQEAgLTYxMTEsNyArNjA5NCw3IEBACiAgICAgICAgICAgICBsZWRjdGwgfD0gKEUxMDAwX0xFRENUTF9NT0RFX0xFRF9PRkYgPDwKICAgICAgICAgICAgICAgICAgICAgICAgRTEwMDBfTEVEQ1RMX0xFRDBfTU9ERV9TSElGVCk7CiAgICAgICAgICAgICBFMTAwMF9XUklURV9SRUcoaHcsIExFRENUTCwgbGVkY3RsKTsKLSAgICAgICAgfSBlbHNlIGlmKGh3LT5tZWRpYV90eXBlID09IGUxMDAwX21lZGlhX3R5cGVfY29wcGVyKQorICAgICAgICB9IGVsc2UgaWYgKGh3LT5tZWRpYV90eXBlID09IGUxMDAwX21lZGlhX3R5cGVfY29wcGVyKQogICAgICAgICAgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBMRURDVEwsIGh3LT5sZWRjdGxfbW9kZTEpOwogICAgICAgICBicmVhazsKICAgICB9CkBAIC02MTE5LDYgKzYxMDIsNyBAQAogICAgIHJldHVybiBFMTAwMF9TVUNDRVNTOwogfQogCisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFVzZWQgb24gODI1NzEgYW5kIGxhdGVyIFNpIHRoYXQgaGFzIExFRCBibGluayBiaXRzLgogICogQ2FsbGVycyBtdXN0IHVzZSB0aGVpciBvd24gdGltZXIgYW5kIHNob3VsZCBoYXZlIGFscmVhZHkgY2FsbGVkCkBAIC02MTY5LDcgKzYxNTMsNyBAQAogCiAgICAgREVCVUdGVU5DKCJlMTAwMF9jbGVhbnVwX2xlZCIpOwogCi0gICAgc3dpdGNoKGh3LT5tYWNfdHlwZSkgeworICAgIHN3aXRjaCAoaHctPm1hY190eXBlKSB7CiAgICAgY2FzZSBlMTAwMF84MjU0Ml9yZXYyXzA6CiAgICAgY2FzZSBlMTAwMF84MjU0Ml9yZXYyXzE6CiAgICAgY2FzZSBlMTAwMF84MjU0MzoKQEAgLTYxODMsNyArNjE2Nyw3IEBACiAgICAgICAgIC8qIFR1cm4gb24gUEhZIFNtYXJ0IFBvd2VyIERvd24gKGlmIHByZXZpb3VzbHkgZW5hYmxlZCkgKi8KICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfR01JSV9GSUZPLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBody0+cGh5X3NwZF9kZWZhdWx0KTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgIC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gICAgICAgICAgaWYoaHctPnR4X3BhY2tldF9kZWx0YSA+IE1JTl9OVU1fWE1JVFMpIHsKKyAgICBpZiAoaHctPmFkYXB0aXZlX2lmcykgeworICAgICAgICBpZiAoKGh3LT5jb2xsaXNpb25fZGVsdGEgKiBody0+aWZzX3JhdGlvKSA+IGh3LT50eF9wYWNrZXRfZGVsdGEpIHsKKyAgICAgICAgICAgIGlmIChody0+dHhfcGFja2V0X2RlbHRhID4gTUlOX05VTV9YTUlUUykgewogICAgICAgICAgICAgICAgIGh3LT5pbl9pZnNfbW9kZSA9IFRSVUU7Ci0gICAgICAgICAgICAgICAgaWYoaHctPmN1cnJlbnRfaWZzX3ZhbCA8IGh3LT5pZnNfbWF4X3ZhbCkgewotICAgICAgICAgICAgICAgICAgICBpZihody0+Y3VycmVudF9pZnNfdmFsID09IDApCisgICAgICAgICAgICAgICAgaWYgKGh3LT5jdXJyZW50X2lmc192YWwgPCBody0+aWZzX21heF92YWwpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGh3LT5jdXJyZW50X2lmc192YWwgPT0gMCkKICAgICAgICAgICAgICAgICAgICAgICAgIGh3LT5jdXJyZW50X2lmc192YWwgPSBody0+aWZzX21pbl92YWw7CiAgICAgICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICAgICAgICAgIGh3LT5jdXJyZW50X2lmc192YWwgKz0gaHctPmlmc19zdGVwX3NpemU7CkBAIC02NDU2LDcgKzY0NDAsNyBAQAogICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgIH0KICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgIGlmKGh3LT5pbl9pZnNfbW9kZSAmJiAoaHctPnR4X3BhY2tldF9kZWx0YSA8PSBNSU5fTlVNX1hNSVRTKSkgeworICAgICAgICAgICAgaWYgKGh3LT5pbl9pZnNfbW9kZSAmJiAoaHctPnR4X3BhY2tldF9kZWx0YSA8PSBNSU5fTlVNX1hNSVRTKSkgewogICAgICAgICAgICA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fcGNpKSB7CisgICAgICAgIH0gZWxzZSBpZiAoaHctPmJ1c190eXBlID09IGUxMDAwX2J1c190eXBlX3BjaSkgewogICAgICAgICAgICAgaHctPmJ1c19zcGVlZCA9IChzdGF0dXMgJiBFMTAwMF9TVEFUVVNfUENJNjYpID8KICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlMTAwMF9idXNfc3BlZWRfNjYgOiBlMTAwMF9idXNfc3BlZWRfMzM7CiAgICAgICAgIH0gZWxzZSB7CkBAIC02NjgwLDExICs2NjY0LDExIEBACiAgICAgKm1pbl9sZW5ndGggPSAqbWF4X2xlbmd0aCA9IDA7CiAKICAgICAvKiBVc2Ugb2xkIG1ldGhvZCBmb3IgUGh5IG9sZGVyIHRoYW4gSUdQICovCi0gICAgaWYoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9tODgpIHsKKyAgICBpZiAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9tODgpIHsKIAogICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBNODhFMTAwMF9QSFlfU1BFQ19TVEFUVVMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnBoeV9kYXRhKTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgY2FibGVfbGVuZ3RoID0gKHBoeV9kYXRhICYgTTg4RTEwMDBfUFNTUl9DQUJMRV9MRU5HVEgpID4+CiAgICAgICAgICAgICAgICAgICAgICAgIE04OEUxMDAwX1BTU1JfQ0FCTEVfTEVOR1RIX1NISUZUOwpAQCAtNjc0Myw3ICs2NzI3LDcgQEAKICAgICAgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX1BIWTsKICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICB9Ci0gICAgfSBlbHNlIGlmKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfaWdwKSB7IC8qIEZvciBJR1AgUEhZICovCisgICAgfSBlbHNlIGlmIChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X2lncCkgeyAvKiBGb3IgSUdQIFBIWSAqLwogICAgICAgICB1aW50MTZfdCBjdXJfYWdjX3ZhbHVlOwogICAgICAgICB1aW50MTZfdCBtaW5fYWdjX3ZhbHVlID0gSUdQMDFFMTAwMF9BR0NfTEVOR1RIX1RBQkxFX1NJWkU7CiAgICAgICAgIHVpbnQxNl90IGFnY19yZWdfYXJyYXlbSUdQMDFFMTAwMF9QSFlfQ0hBTk5FTF9OVU1dID0KQEAgLTY3NTIsMTAgKzY3MzYsMTAgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJR1AwMUUxMDAwX1BIWV9BR0NfQywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJR1AwMUUxMDAwX1BIWV9BR0NfRH07CiAgICAgICAgIC8qIFJlYWQgdGhlIEFHQyByZWdpc3RlcnMgZm9yIGFsbCBjaGFubmVscyAqLwotICAgICAgICBmb3IoaSA9IDA7IGkgPCBJR1AwMUUxMDAwX1BIWV9DSEFOTkVMX05VTTsgaSsrKSB7CisgICAgICAgIGZvciAoaSA9IDA7IGkgPCBJR1AwMUUxMDAwX1BIWV9DSEFOTkVMX05VTTsgaSsrKSB7CiAKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIGFnY19yZWdfYXJyYXlbaV0sICZwaHlfZGF0YSk7Ci0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgICAgIGN1cl9hZ2NfdmFsdWUgPSBwaHlfZGF0YSA+PiBJR1AwMUUxMDAwX0FHQ19MRU5HVEhfU0hJRlQ7CkBAIC02ODA1LDcgKzY3ODksNyBAQAogICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKLQkgICAgLyogR2V0dGluZyBiaXRzIDE1OjksIHdoaWNoIHJlcHJlc2VudCB0aGUgY29tYmluYXRpb24gb2YgY291cnNlIGFuZAorICAgICAgICAgICAgLyogR2V0dGluZyBiaXRzIDE1OjksIHdoaWNoIHJlcHJlc2VudCB0aGUgY29tYmluYXRpb24gb2YgY291cnNlIGFuZAogICAgICAgICAgICAgICogZmluZSBnYWluIHZhbHVlcy4gIFRoZSByZXN1bHQgaXMgYSBudW1iZXIgdGhhdCBjYW4gYmUgcHV0IGludG8KICAgICAgICAgICAgICAqIHRoZSBsb29rdXAgdGFibGUgdG8gb2J0YWluIHRoZSBhcHByb3hpbWF0ZSBjYWJsZSBsZW5ndGguICovCiAgICAgICAgICAgICBjdXJfYWdjX2luZGV4ID0gKHBoeV9kYXRhID4+IElHUDAyRTEwMDBfQUdDX0xFTkdUSF9TSElGVCkgJgpAQCAtNjg3MCw3ICs2ODU0LDcgQEAKICAgICAgICAgLyogcmV0dXJuIHRoZSBQb2xhcml0eSBiaXQgaW4gdGhlIFN0YXR1cyByZWdpc3Rlci4gKi8KICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX1NQRUNfU1RBVFVTLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7Ci0gICAgICAgIGlmKHJldF92YWwpCisgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgICpwb2xhcml0eSA9IChwaHlfZGF0YSAmIE04OEUxMDAwX1BTU1JfUkVWX1BPTEFSSVRZKSA+PgogICAgICAgICAgICAgICAgICAgICBNODhFMTAwMF9QU1NSX1JFVl9QT0xBUklUWV9TSElGVDsKQEAgLTY4ODAsMTggKzY4NjQsMTggQEAKICAgICAgICAgLyogUmVhZCB0aGUgU3RhdHVzIHJlZ2lzdGVyIHRvIGNoZWNrIHRoZSBzcGVlZCAqLwogICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX1NUQVRVUywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcGh5X2RhdGEpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgIC8qIElmIHNwZWVkIGlzIDEwMDAgTWJwcywgbXVzdCByZWFkIHRoZSBJR1AwMUUxMDAwX1BIWV9QQ1NfSU5JVF9SRUcgdG8KICAgICAgICAgICogZmluZCB0aGUgcG9sYXJpdHkgc3RhdHVzICovCi0gICAgICAgIGlmKChwaHlfZGF0YSAmIElHUDAxRTEwMDBfUFNTUl9TUEVFRF9NQVNLKSA9PQorICAgICAgICBpZiAoKHBoeV9kYXRhICYgSUdQMDFFMTAwMF9QU1NSX1NQRUVEX01BU0spID09CiAgICAgICAgICAgIElHUDAxRTEwMDBfUFNTUl9TUEVFRF8xMDAwTUJQUykgewogCiAgICAgICAgICAgICAvKiBSZWFkIHRoZSBHSUcgaW5pdGlhbGl6YXRpb24gUENTIHJlZ2lzdGVyICgweDAwQjQpICovCiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QQ1NfSU5JVF9SRUcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7Ci0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgICAgIC8qIENoZWNrIHRoZSBwb2xhcml0eSBiaXRzICovCkBAIC02OTQwLDcgKzY5MjQsNyBAQAogICAgICAgICBody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X2lncF8yKSB7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfUEhZX0xJTktfSEVBTFRILAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7Ci0gICAgICAgIGlmKHJldF92YWwpCisgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgaHctPnNwZWVkX2Rvd25ncmFkZWQgPSAocGh5X2RhdGEgJiBJR1AwMUUxMDAwX1BMSFJfU1NfRE9XTkdSQURFKSA/IDEgOiAwOwpAQCAtNjk0OCw3ICs2OTMyLDcgQEAKICAgICAgICAgICAgICAgIChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X2dnODI1NjMpKSB7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIE04OEUxMDAwX1BIWV9TUEVDX1NUQVRVUywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcGh5X2RhdGEpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgIGh3LT5zcGVlZF9kb3duZ3JhZGVkID0gKHBoeV9kYXRhICYgTTg4RTEwMDBfUFNTUl9ET1dOU0hJRlQpID4+CkBAIC02OTg4LDQyICs2OTcyLDQyIEBACiAKICAgICBERUJVR0ZVTkMoImUxMDAwX2NvbmZpZ19kc3BfYWZ0ZXJfbGlua19jaGFuZ2UiKTsKIAotICAgIGlmKGh3LT5waHlfdHlwZSAhPSBlMTAwMF9waHlfaWdwKQorICAgIGlmIChody0+cGh5X3R5cGUgIT0gZTEwMDBfcGh5X2lncCkKICAgICAgICAgcmV0dXJuIEUxMDAwX1NVQ0NFU1M7CiAKLSAgICBpZihsaW5rX3VwKSB7CisgICAgaWYgKGxpbmtfdXApIHsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX2dldF9zcGVlZF9hbmRfZHVwbGV4KGh3LCAmc3BlZWQsICZkdXBsZXgpOwotICAgICAgICBpZihyZXRfdmFsKSB7CisgICAgICAgIGlmIChyZXRfdmFsKSB7CiAgICAgICAgICAgICBERUJVR09VVCgiRXJyb3IgZ2V0dGluZyBsaW5rIHNwZWVkIGFuZCBkdXBsZXhcbiIpOwogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgIH0KIAotICAgICAgICBpZihzcGVlZCA9PSBTUEVFRF8xMDAwKSB7CisgICAgICAgIGlmIChzcGVlZCA9PSBTUEVFRF8xMDAwKSB7CiAKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9nZXRfY2FibGVfbGVuZ3RoKGh3LCAmbWluX2xlbmd0aCwgJm1heF9sZW5ndGgpOwogICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKLSAgICAgICAgICAgIGlmKChody0+ZHNwX2NvbmZpZ19zdGF0ZSA9PSBlMTAwMF9kc3BfY29uZmlnX2VuYWJsZWQpICYmCisgICAgICAgICAgICBpZiAoKGh3LT5kc3BfY29uZmlnX3N0YXRlID09IGUxMDAwX2RzcF9jb25maWdfZW5hYmxlZCkgJiYKICAgICAgICAgICAgICAgICBtaW5fbGVuZ3RoID49IGUxMDAwX2lncF9jYWJsZV9sZW5ndGhfNTApIHsKIAotICAgICAgICAgICAgICAgIGZvcihpID0gMDsgaSA8IElHUDAxRTEwMDBfUEhZX0NIQU5ORUxfTlVNOyBpKyspIHsKKyAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgSUdQMDFFMTAwMF9QSFlfQ0hBTk5FTF9OVU07IGkrKykgewogICAgICAgICAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBkc3BfcmVnX2FycmF5W2ldLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7Ci0gICAgICAgICAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgICAgICAgICAgICAgcGh5X2RhdGEgJj0gfklHUDAxRTEwMDBfUEhZX0VEQUNfTVVfSU5ERVg7CiAKICAgICAgICAgICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIGRzcF9yZWdfYXJyYXlbaV0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBoeV9kYXRhKTsKLSAgICAgICAgICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgaHctPmRzcF9jb25maWdfc3RhdGUgPSBlMTAwMF9kc3BfY29uZmlnX2FjdGl2YXRlZDsKICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgaWYoKGh3LT5mZmVfY29uZmlnX3N0YXRlID09IGUxMDAwX2ZmZV9jb25maWdfZW5hYmxlZCkgJiYKKyAgICAgICAgICAgIGlmICgoaHctPmZmZV9jb25maWdfc3RhdGUgPT0gZTEwMDBfZmZlX2NvbmZpZ19lbmFibGVkKSAmJgogICAgICAgICAgICAgICAgKG1pbl9sZW5ndGggPCBlMTAwMF9pZ3BfY2FibGVfbGVuZ3RoXzUwKSkgewogCiAgICAgICAgICAgICAgICAgdWludDE2X3QgZmZlX2lkbGVfZXJyX3RpbWVvdXQgPSBGRkVfSURMRV9FUlJfQ09VTlRfVElNRU9VVF8yMDsKQEAgLTcwMzIsNzAgKzcwMTYsNzAgQEAKICAgICAgICAgICAgICAgICAvKiBjbGVhciBwcmV2aW91cyBpZGxlIGVycm9yIGNvdW50cyAqLwogICAgICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIFBIWV8xMDAwVF9TVEFUVVMsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcGh5X2RhdGEpOwotICAgICAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCi0gICAgICAgICAgICAgICAgZm9yKGkgPSAwOyBpIDwgZmZlX2lkbGVfZXJyX3RpbWVvdXQ7IGkrKykgeworICAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBmZmVfaWRsZV9lcnJfdGltZW91dDsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgIHVkZWxheSgxMDAwKTsKICAgICAgICAgICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgUEhZXzEwMDBUX1NUQVRVUywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcGh5X2RhdGEpOwotICAgICAgICAgICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgICAgICAgICAgICAgIGlkbGVfZXJycyArPSAocGh5X2RhdGEgJiBTUl8xMDAwVF9JRExFX0VSUk9SX0NOVCk7Ci0gICAgICAgICAgICAgICAgICAgIGlmKGlkbGVfZXJycyA+IFNSXzEwMDBUX1BIWV9FWENFU1NJVkVfSURMRV9FUlJfQ09VTlQpIHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGlkbGVfZXJycyA+IFNSXzEwMDBUX1BIWV9FWENFU1NJVkVfSURMRV9FUlJfQ09VTlQpIHsKICAgICAgICAgICAgICAgICAgICAgICAgIGh3LT5mZmVfY29uZmlnX3N0YXRlID0gZTEwMDBfZmZlX2NvbmZpZ19hY3RpdmU7CiAKICAgICAgICAgICAgICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSUdQMDFFMTAwMF9QSFlfRFNQX0ZGRSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElHUDAxRTEwMDBfUEhZX0RTUF9GRkVfQ01fQ1ApOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgICAgICBpZihpZGxlX2VycnMpCisgICAgICAgICAgICAgICAgICAgIGlmIChpZGxlX2VycnMpCiAgICAgICAgICAgICAgICAgICAgICAgICBmZmVfaWRsZV9lcnJfdGltZW91dCA9IEZGRV9JRExFX0VSUl9DT1VOVF9USU1FT1VUXzEwMDsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9CiAgICAgICAgIH0KICAgICB9IGVsc2UgewotICAgICAgICBpZihody0+ZHNwX2NvbmZpZ19zdGF0ZSA9PSBlMTAwMF9kc3BfY29uZmlnX2FjdGl2YXRlZCkgeworICAgICAgICBpZiAoaHctPmRzcF9jb25maWdfc3RhdGUgPT0gZTEwMDBfZHNwX2NvbmZpZ19hY3RpdmF0ZWQpIHsKICAgICAgICAgICAgIC8qIFNhdmUgb2ZmIHRoZSBjdXJyZW50IHZhbHVlIG9mIHJlZ2lzdGVyIDB4MkY1QiB0byBiZSByZXN0b3JlZCBhdAogICAgICAgICAgICAgICogdGhlIGVuZCBvZiB0aGUgcm91dGluZXMuICovCiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCAweDJGNUIsICZwaHlfc2F2ZWRfZGF0YSk7CiAKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAgICAgLyogRGlzYWJsZSB0aGUgUEhZIHRyYW5zbWl0dGVyICovCiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgMHgyRjVCLCAweDAwMDMpOwogCi0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgICAgIG1zZWNfZGVsYXlfaXJxKDIwKTsKIAogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIDB4MDAwMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElHUDAxRTEwMDBfSUVFRV9GT1JDRV9HSUdBKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKLSAgICAgICAgICAgIGZvcihpID0gMDsgaSA8IElHUDAxRTEwMDBfUEhZX0NIQU5ORUxfTlVNOyBpKyspIHsKKyAgICAgICAgICAgIGZvciAoaSA9IDA7IGkgPCBJR1AwMUUxMDAwX1BIWV9DSEFOTkVMX05VTTsgaSsrKSB7CiAgICAgICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgZHNwX3JlZ19hcnJheVtpXSwgJnBoeV9kYXRhKTsKLSAgICAgICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAgICAgICAgIHBoeV9kYXRhICY9IH5JR1AwMUUxMDAwX1BIWV9FREFDX01VX0lOREVYOwogICAgICAgICAgICAgICAgIHBoeV9kYXRhIHw9ICBJR1AwMUUxMDAwX1BIWV9FREFDX1NJR05fRVhUXzlfQklUUzsKIAogICAgICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LGRzcF9yZWdfYXJyYXlbaV0sIHBoeV9kYXRhKTsKLSAgICAgICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIDB4MDAwMCwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElHUDAxRTEwMDBfSUVFRV9SRVNUQVJUX0FVVE9ORUcpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgICAgICBtc2VjX2RlbGF5X2lycSgyMCk7CkBAIC03MTAzLDQwICs3MDg3LDQwIEBACiAgICAgICAgICAgICAvKiBOb3cgZW5hYmxlIHRoZSB0cmFuc21pdHRlciAqLwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIDB4MkY1QiwgcGh5X3NhdmVkX2RhdGEpOwogCi0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgICAgIGh3LT5kc3BfY29uZmlnX3N0YXRlID0gZTEwMDBfZHNwX2NvbmZpZ19lbmFibGVkOwogICAgICAgICB9CiAKLSAgICAgICAgaWYoaHctPmZmZV9jb25maWdfc3RhdGUgPT0gZTEwMDBfZmZlX2NvbmZpZ19hY3RpdmUpIHsKKyAgICAgICAgaWYgKGh3LT5mZmVfY29uZmlnX3N0YXRlID09IGUxMDAwX2ZmZV9jb25maWdfYWN0aXZlKSB7CiAgICAgICAgICAgICAvKiBTYXZlIG9mZiB0aGUgY3VycmVudCB2YWx1ZSBvZiByZWdpc3RlciAweDJGNUIgdG8gYmUgcmVzdG9yZWQgYXQKICAgICAgICAgICAgICAqIHRoZSBlbmQgb2YgdGhlIHJvdXRpbmVzLiAqLwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgMHgyRjVCLCAmcGh5X3NhdmVkX2RhdGEpOwogCi0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgICAgIC8qIERpc2FibGUgdGhlIFBIWSB0cmFuc21pdHRlciAqLwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIDB4MkY1QiwgMHgwMDAzKTsKIAotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgICAgICBtc2VjX2RlbGF5X2lycSgyMCk7CiAKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCAweDAwMDAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJR1AwMUUxMDAwX0lFRUVfRk9SQ0VfR0lHQSk7Ci0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgSUdQMDFFMTAwMF9QSFlfRFNQX0ZGRSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElHUDAxRTEwMDBfUEhZX0RTUF9GRkVfREVGQVVMVCk7Ci0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCAweDAwMDAsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJR1AwMUUxMDAwX0lFRUVfUkVTVEFSVF9BVVRPTkVHKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAgICAgbXNlY19kZWxheV9pcnEoMjApOwpAQCAtNzE0NCw3ICs3MTI4LDcgQEAKICAgICAgICAgICAgIC8qIE5vdyBlbmFibGUgdGhlIHRyYW5zbWl0dGVyICovCiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgMHgyRjVCLCBwaHlfc2F2ZWRfZGF0YSk7CiAKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAgICAgaHctPmZmZV9jb25maWdfc3RhdGUgPSBlMTAwMF9mZmVfY29uZmlnX2VuYWJsZWQ7CkBAIC03MTY5LDIwICs3MTUzLDIwIEBACiAKICAgICBERUJVR0ZVTkMoImUxMDAwX3NldF9waHlfbW9kZSIpOwogCi0gICAgaWYoKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0NV9yZXZfMykgJiYKLSAgICAgICAoaHctPm1lZGlhX3R5cGUgPT0gZTEwMDBfbWVkaWFfdHlwZV9jb3BwZXIpKSB7CisgICAgaWYgKChody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDVfcmV2XzMpICYmCisgICAgICAgIChody0+bWVkaWFfdHlwZSA9PSBlMTAwMF9tZWRpYV90eXBlX2NvcHBlcikpIHsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfZWVwcm9tKGh3LCBFRVBST01fUEhZX0NMQVNTX1dPUkQsIDEsICZlZXByb21fZGF0YSk7Ci0gICAgICAgIGlmKHJldF92YWwpIHsKKyAgICAgICAgaWYgKHJldF92YWwpIHsKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICB9CiAKLSAgICAgICAgaWYoKGVlcHJvbV9kYXRhICE9IEVFUFJPTV9SRVNFUlZFRF9XT1JEKSAmJgotICAgICAgICAgICAoZWVwcm9tX2RhdGEgJiBFRVBST01fUEhZX0NMQVNTX0EpKSB7CisgICAgICAgIGlmICgoZWVwcm9tX2RhdGEgIT0gRUVQUk9NX1JFU0VSVkVEX1dPUkQpICYmCisgICAgICAgICAgICAoZWVwcm9tX2RhdGEgJiBFRVBST01fUEhZX0NMQVNTX0EpKSB7CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX1BBR0VfU0VMRUNULCAweDAwMEIpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIE04OEUxMDAwX1BIWV9HRU5fQ09OVFJPTCwgMHg4MTA0KTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAgICAgaHctPnBoeV9yZXNldF9kaXNhYmxlID0gRkFMU0U7CkBAIC03MjMzLDE2ICs3MjE3LDE2IEBACiAgICAgICAgIHBoeV9jdHJsID0gRTEwMDBfUkVBRF9SRUcoaHcsIFBIWV9DVFJMKTsKICAgICB9IGVsc2UgewogICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMkUxMDAwX1BIWV9QT1dFUl9NR01ULCAmcGh5X2RhdGEpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIH0KIAotICAgIGlmKCFhY3RpdmUpIHsKLSAgICAgICAgaWYoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQxX3Jldl8yIHx8Ci0gICAgICAgICAgIGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0N19yZXZfMikgeworICAgIGlmICghYWN0aXZlKSB7CisgICAgICAgIGlmIChody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDFfcmV2XzIgfHwKKyAgICAgICAgICAgIGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0N19yZXZfMikgewogICAgICAgICAgICAgcGh5X2RhdGEgJj0gfklHUDAxRTEwMDBfR01JSV9GTEVYX1NQRDsKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX0dNSUlfRklGTywgcGh5X2RhdGEpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgaWYgKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF9pY2g4bGFuKSB7CkBAIC03MjY0LDEzICs3MjQ4LDEzIEBACiAgICAgICAgIGlmIChody0+c21hcnRfc3BlZWQgPT0gZTEwMDBfc21hcnRfc3BlZWRfb24pIHsKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfUEhZX1BPUlRfQ09ORklHLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcGh5X2RhdGEpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgICAgICBwaHlfZGF0YSB8PSBJR1AwMUUxMDAwX1BTQ0ZSX1NNQVJUX1NQRUVEOwogICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfUEhZX1BPUlRfQ09ORklHLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGh5X2RhdGEpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICB9IGVsc2UgaWYgKGh3LT5zbWFydF9zcGVlZCA9PSBlMTAwMF9zbWFydF9zcGVlZF9vZmYpIHsKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfUEhZX1BPUlRfQ09ORklHLApAQCAtNzI4MSwxOSArNzI2NSwxOSBAQAogICAgICAgICAgICAgcGh5X2RhdGEgJj0gfklHUDAxRTEwMDBfUFNDRlJfU01BUlRfU1BFRUQ7CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgSUdQMDFFMTAwMF9QSFlfUE9SVF9DT05GSUcsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaHlfZGF0YSk7Ci0gICAgICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgIH0KIAotICAgIH0gZWxzZSBpZigoaHctPmF1dG9uZWdfYWR2ZXJ0aXNlZCA9PSBBVVRPTkVHX0FEVkVSVElTRV9TUEVFRF9ERUZBVUxUKSB8fAotICAgICAgICAgICAgICAoaHctPmF1dG9uZWdfYWR2ZXJ0aXNlZCA9PSBBVVRPTkVHX0FEVkVSVElTRV8xMF9BTEwgKSB8fAotICAgICAgICAgICAgICAoaHctPmF1dG9uZWdfYWR2ZXJ0aXNlZCA9PSBBVVRPTkVHX0FEVkVSVElTRV8xMF8xMDBfQUxMKSkgeworICAgIH0gZWxzZSBpZiAoKGh3LT5hdXRvbmVnX2FkdmVydGlzZWQgPT0gQVVUT05FR19BRFZFUlRJU0VfU1BFRURfREVGQVVMVCkgfHwKKyAgICAgICAgICAgICAgIChody0+YXV0b25lZ19hZHZlcnRpc2VkID09IEFVVE9ORUdfQURWRVJUSVNFXzEwX0FMTCApIHx8CisgICAgICAgICAgICAgICAoaHctPmF1dG9uZWdfYWR2ZXJ0aXNlZCA9PSBBVVRPTkVHX0FEVkVSVElTRV8xMF8xMDBfQUxMKSkgewogCi0gICAgICAgIGlmKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0MV9yZXZfMiB8fAorICAgICAgICBpZiAoaHctPm1hY190eXBlID09IGUxMDAwXzgyNTQxX3Jldl8yIHx8CiAgICAgICAgICAgICBody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDdfcmV2XzIpIHsKICAgICAgICAgICAgIHBoeV9kYXRhIHw9IElHUDAxRTEwMDBfR01JSV9GTEVYX1NQRDsKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX0dNSUlfRklGTywgcGh5X2RhdGEpOwotICAgICAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgaWYgKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF9pY2g4bGFuKSB7CkBAIC03MzEwLDEyICs3Mjk0LDEyIEBACiAKICAgICAgICAgLyogV2hlbiBMUExVIGlzIGVuYWJsZWQgd2Ugc2hvdWxkIGRpc2FibGUgU21hcnRTcGVlZCAqLwogICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NPTkZJRywgJnBoeV9kYXRhKTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICBwaHlfZGF0YSAmPSB+SUdQMDFFMTAwMF9QU0NGUl9TTUFSVF9TUEVFRDsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIElHUDAxRTEwMDBfUEhZX1BPUlRfQ09ORklHLCBwaHlfZGF0YSk7Ci0gICAgICAgIGlmKHJldF92YWwpCisgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICB9CkBAIC03MzQ1LDE0ICs3MzI5LDE0IEBACiAgICAgdWludDE2X3QgcGh5X2RhdGE7CiAgICAgREVCVUdGVU5DKCJlMTAwMF9zZXRfZDBfbHBsdV9zdGF0ZSIpOwogCi0gICAgaWYoaHctPm1hY190eXBlIDw9IGUxMDAwXzgyNTQ3X3Jldl8yKQorICAgIGlmIChody0+bWFjX3R5cGUgPD0gZTEwMDBfODI1NDdfcmV2XzIpCiAgICAgICAgIHJldHVybiBFMTAwMF9TVUNDRVNTOwogCiAgICAgaWYgKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF9pY2g4bGFuKSB7CiAgICAgICAgIHBoeV9jdHJsID0gRTEwMDBfUkVBRF9SRUcoaHcsIFBIWV9DVFJMKTsKICAgICB9IGVsc2UgewogICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMkUxMDAwX1BIWV9QT1dFUl9NR01ULCAmcGh5X2RhdGEpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIH0KIApAQCAtNzM3NCwxMyArNzM1OCwxMyBAQAogICAgICAgICBpZiAoaHctPnNtYXJ0X3NwZWVkID09IGUxMDAwX3NtYXJ0X3NwZWVkX29uKSB7CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NPTkZJRywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnBoeV9kYXRhKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICAgICAgcGh5X2RhdGEgfD0gSUdQMDFFMTAwMF9QU0NGUl9TTUFSVF9TUEVFRDsKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NPTkZJRywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBoeV9kYXRhKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgfSBlbHNlIGlmIChody0+c21hcnRfc3BlZWQgPT0gZTEwMDBfc21hcnRfc3BlZWRfb2ZmKSB7CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NPTkZJRywKQEAgLTczOTEsNyArNzM3NSw3IEBACiAgICAgICAgICAgICBwaHlfZGF0YSAmPSB+SUdQMDFFMTAwMF9QU0NGUl9TTUFSVF9TUEVFRDsKICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NPTkZJRywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBoeV9kYXRhKTsKLSAgICAgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgfQogCkBAIC03NDEwLDEyICs3Mzk0LDEyIEBACiAKICAgICAgICAgLyogV2hlbiBMUExVIGlzIGVuYWJsZWQgd2Ugc2hvdWxkIGRpc2FibGUgU21hcnRTcGVlZCAqLwogICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBJR1AwMUUxMDAwX1BIWV9QT1JUX0NPTkZJRywgJnBoeV9kYXRhKTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgICAgICBwaHlfZGF0YSAmPSB+SUdQMDFFMTAwM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lZyhodywgUEhZX1NUQVRVUywgJm1paV9zdGF0dXNfcmVnKTsKLSAgICAgICAgaWYocmV0X3ZhbCkKKyAgICAgICAgaWYgKHJldF92YWwpCiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAotICAgICAgICBpZigobWlpX3N0YXR1c19yZWcgJiB+TUlJX1NSX0xJTktfU1RBVFVTKSA9PSAwKSBicmVhazsKKyAgICAgICAgaWYgKChtaWlfc3RhdHVzX3JlZyAmIH5NSUlfU1JfTElOS19TVEFUVVMpID09IDApIGJyZWFrOwogICAgICAgICBtc2VjX2RlbGF5X2lycSgxMDApOwogICAgIH0KIApAQCAtNzg2OCw0MCArNzg1MSw0MCBAQAogICAgIC8qIE5vdyB3ZSB3aWxsIHJlLWVuYWJsZSB0aCB0cmFuc21pdHRlciBvbiB0aGUgUEhZICovCiAKICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX1BBR0VfU0VMRUNULCAweDAwMTkpOwotICAgIGlmKHJldF92YWwpCisgICAgaWYgKHJldF92YWwpCiAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIG1zZWNfZGVsYXlfaXJxKDUwKTsKICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX0dFTl9DT05UUk9MLCAweEZGRjApOwotICAgIGlmKHJldF92YWwpCisgICAgaWYgKHJldF92YWwpCiAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIG1zZWNfZGVsYXlfaXJxKDUwKTsKICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX0dFTl9DT05UUk9MLCAweEZGMDApOwotICAgIGlmKHJldF92YWwpCisgICAgaWYgKHJldF92YWwpCiAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIG1zZWNfZGVsYXlfaXJxKDUwKTsKICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX0dFTl9DT05UUk9MLCAweDAwMDApOwotICAgIGlmKHJldF92YWwpCisgICAgaWYgKHJldF92YWwpCiAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIE04OEUxMDAwX1BIWV9QQUdFX1NFTEVDVCwgMHgwMDAwKTsKLSAgICBpZihyZXRfdmFsKQorICAgIGlmIChyZXRfdmFsKQogICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAogICAgIC8qIFRoaXMgbG9vcCB3aWxsIGVhcmx5LW91dCBpZiB0aGUgbGluayBjb25kaXRpb24gaGFzIGJlZW4gbWV0LiAqLwotICAgIGZvcihpID0gUEhZX0ZPUkNFX1RJTUU7IGkgPiAwOyBpLS0pIHsKKyAgICBmb3IgKGkgPSBQSFlfRk9SQ0VfVElNRTsgaSA+IDA7IGktLSkgewogICAgICAgICAvKiBSZWFkIHRoZSBNSUkgU3RhdHVzIFJlZ2lzdGVyIGFuZCB3YWl0IGZvciBMaW5rIFN0YXR1cyBiaXQKICAgICAgICAgICogdG8gYmUgc2V0LgogICAgICAgICAgKi8KIAogICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBQSFlfU1RBVFVTLCAmbWlpX3N0YXR1c19yZWcpOwotICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICBpZiAocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogCiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIFBIWV9TVEFUVVMsICZtaWlfc3RhdHVzX3JlZyk7Ci0gICAgICAgIGlmKHJldF92YWwpCisgICAgICAgIGlmIChyZXRfdmFsKQogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKLSAgICAgICAgaWYobWlpX3N0YXR1c19yZWcgJiBNSUlf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wogICAgICAgICAgICAgcmV0dXJuIC1FMTAwMF9FUlJfUkVTRVQ7CiAgICAgICAgIH0KQEAgLTgxMTAsNyArODA5Myw3IEBACiAKICAgICBERUJVR0ZVTkMoImUxMDAwX2dldF9od19lZXByb21fc2VtYXBob3JlIik7CiAKLSAgICBpZighaHctPmVlcHJvbV9zZW1hcGhvcmVfcHJlc2VudCkKKyAgICBpZiAoIWh3LT5lZXByb21fc2VtYXBob3JlX3ByZXNlbnQpCiAgICAgICAgIHJldHVybiBFMTAwMF9TVUNDRVNTOwogCiAgICAgaWYgKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MDAwM2VzMmxhbikgewpAQCAtODEyMSwyMCArODEwNCwyMCBAQAogCiAgICAgLyogR2V0IHRoZSBGVyBzZW1hcGhvcmUuICovCiAgICAgdGltZW91dCA9IGh3LT5lZXByb20ud29yZF9zaXplICsgMTsKLSAgICB3aGlsZSh0aW1lb3V0KSB7CisgICAgd2hpbGUgKHRpbWVvdXQpIHsKICAgICAgICAgc3dzbSA9IEUxMDAwX1JFQURfUkVHKGh3LCBTV1NNKTsKICAgICAgICAgc3dzbSB8PSBFMTAwMF9TV1NNX1NXRVNNQkk7CiAgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgU1dTTSwgc3dzbSk7CiAgICAgICAgIC8qIGlmIHdlIG1hbmFnZWQgdG8gc2V0IHRoZSBiaXQgd2UgZ290IHRoZSBzZW1hcGhvcmUuICovCiAgICAgICAgIHN3c20gPSBFMTAwMF9SRUFEX1JFRyhodywgU1dTTSk7Ci0gICAgICAgIGlmKHN3c20gJiBFMTAwMF9TV1NNX1NXRVNNQkkpCisgICAgICAgIGlmIChzd3NtICYgRTEwMDBfU1dTTV9TV0VTTUJJKQogICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgdWRlbGF5KDUwKTsKICAgICAgICAgdGltZW91dC0tOwogICAgIH0KIAotICAgIGlmKCF0aW1lb3V0KSB7CisgICAgaWYgKCF0aW1lb3V0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UgZGlzYWJsZSAqLwogCiAvKiBFRVBST00gQ29tbWFuZHMgLSBTUEkgKi8KLSNkZWZpbmUgRUVQUk9NX01BWF9SRVRSWV9TUEkgICAgNTAwMCAvKiBNYXggd2FpdCBvZiA1bXMsIGZvciBSRFkgc2lnbmFsICovCisjZGVmaW5lIEVFUFJPTV9NQVhfUkVUUllfU1BJICAgICAgICA1MDAwIC8qIE1heCB3YWl0IG9mIDVtcywgZm9yIFJEWSBzaWduYWwgKi8KICNkZWZpbmUgRUVQUk9NX1JFQURfT1BDT0RFX1NQSSAgICAgIDB4MDMgIC8qIEVFUFJPTSByZWFkIG9wY29kZSAqLwogI2RlZmluZSBFRVBST01fV1JJVEVfT1BDT0RFX1NQSSAgICAgMHgwMiAgLyogRUVQUk9NIHdyaXRlIG9wY29kZSAqLwogI2RlZmluZSBFRVBST01fQThfT1BDT0RFX1NQSSAgICAgICAgMHgwOCAgLyogb3Bjb2RlIGJpdC0zID0gYWRkcmVzcyBiaXQtOCAqLwpAQCAtMzA4MiwxMCArMzA4NCwxMCBAQAogCiAvKiBEU1AgRGlzdGFuY2UgUmVnaXN0ZXIgKFBhZ2UgNSwgUmVnaXN0ZXIgMjYpICovCiAjZGVmaW5lIEdHODI1NjNfRFNQRF9DQUJMRV9MRU5HVEggICAgICAgICAgICAgICAweDAwMDcgLyogMCA9IDw1ME07Ci0JCQkJCQkJICAgICAgMSA9IDUwLTgwTTsKLQkJCQkJCQkgICAgICAyID0gODAtMTEwTTsKLQkJCQkJCQkgICAgICAzID0gMTEwLTE0ME07Ci0JCQkJCQkJICAgICAgNCA9ID4xNDBNICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IDUwLTgwTTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyID0gODAtMTEwTTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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aV9zdGFydF9uZWdfZXgocWRldiwgbWFjX2luZGV4KTsKK30KKworc3RhdGljIGludCBxbF9pc19wZXRiaV9uZWdfcGF1c2Uoc3RydWN0IHFsM19hZGFwdGVyICpxZGV2KQoreworCXUxNiByZWc7CisKKwlpZiAocWxfbWlpX3JlYWRfcmVnKHFkZXYsIFBFVEJJX05FR19QQVJUTkVSLCAmcmVnKSA8IDApCisJCXJldHVybiAwOworCisJcmV0dXJuIChyZWcgJiBQRVRCSV9ORUdfUEFVU0VfTUFTSykgPT0gUEVUQklfTkVHX1BBVVNFOworfQorCitzdGF0aWMgaW50IHFsX3BoeV9nZXRfc3BlZWQoc3RydWN0IHFsM19hZGFwdGVyICpxZGV2KQoreworCXUxNiByZWc7CisKKwlpZiAocWxfbWlpX3JlYWRfcmVnKHFkZXYsIEFVWF9DT05UUk9MX1NUQVRVUywgJnJlZykgPCAwKQorCQlyZXR1cm4gMDsKKworCXJlZyA9ICgoKHJlZyAmIDB4MTgpID4+IDMpICYgMyk7CisKKwlpZiAocmVnID09IDIpCisJCXJldHVybiBTUEVFRF8xMDAwOworCWVsc2UgaWYgKHJlZyA9PSAxKQorCQlyZXR1cm4gU1BFRURfMTAwOworCWVsc2UgaWYgKHJlZyA9PSAwKQorCQlyZXR1cm4gU1BFRURfMTA7CisJZWxzZQorCQlyZXR1cm4gLTE7Cit9CisKK3N0YXRpYyBpbnQgcWxfaXNfZnVsbF9kdXAoc3RydWN0IHFsM19hZGFwdGVyICpxZGV2KQoreworCXUxNiByZWc7CisKKwlpZiAocWxfbWlpX3JlYWRfcmVnKHFkZXYsIEFVWF9DT05UUk9MX1NUQVRVUywgJnJlZykgPCAwKQorCQlyZXR1cm4gMDsKKworCXJldHVybiAocmVnICYgUEhZX0FVWF9EVVBMRVhfU1RBVCkgIT0gMDsKK30KKworc3RhdGljIGludCBxbF9pc19waHlfbmVnX3BhdXNlKHN0cnVjdCBxbDNfYWRhcHRlciAqcWRldikKK3sKKwl1MTYgcmVnOworCisJ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FU09VUkNFX0JJVFNfQkFTRV9DT0RFIHwgKHFkZXYtPm1hY19pbmRleCkgKgorCQkJIDIpIDw8IDcpKQorCQlyZXR1cm4gLTE7CisKKwlpZiAocWxfaXNfZmliZXIocWRldikpIHsKKwkJcWxfcGV0YmlfaW5pdChxZGV2KTsKKwl9IGVsc2UgeworCQkvKiBDb3BwZXIgcG9ydCAqLworCQlxbF9waHlfaW5pdF9leChxZGV2LCBxZGV2LT5tYWNfaW5kZXgpOworCX0KKworCXFsX3NlbV91bmxvY2socWRldiwgUUxfUEhZX0dJT19TRU1fTUFTSyk7CisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgcWxfZmluaXNoX2F1dG9fbmVnKHN0cnVjdCBxbDNfYWRhcHRlciAqcWRldikKK3sKKworCWlmKHFsX3NlbV9zcGlubG9jayhxZGV2LCBRTF9QSFlfR0lPX1NFTV9NQVNLLAorCQkoUUxfUkVTT1VSQ0VfQklUU19CQVNFX0NPREUgfCAocWRldi0+bWFjX2luZGV4KSAqCisJCQkgMikgPDwgNykpCisJCXJldHVybiAtMTsKKworCWlmICghcWxfYXV0b19uZWdfZXJyb3IocWRldikpIHsKKwkJaWYgKHRlc3RfYml0KFFMX0xJTktfTUFTVEVSLCZxZGV2LT5mbGFncykpIHsKKwkJCS8qIGNvbmZpZ3VyZSB0aGUgTUFDICovCisJCQlpZiAobmV0aWZfbXNnX2xpbmsocWRldikpCisJCQkJcHJpbnRrKEtFUk5fREVCVUcgUEZYCisJCQkJICAgICAgICIlczogQ29uZmlndXJpbmcgbGluay5cbiIsCisJCQkJICAgICAgIHFkZXYtPm5kZXYtPgorCQkJCSAgICAgICBuYW1lKTsKKwkJCXFsX21hY19jZmdfc29mdF9yZXNldChxZGV2LCAxKTsKKwkJCXFsX21hY19jZmdfZ2lnKHFkZXYsCisJCQkJICAgICAgIChxbF9nZXRfbGlua19zcGVlZAorCQkJCQkocWRldikgPT0KKwkJCQkJU1BFRURfMTAwMCkpOworCQkJcWx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