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gICBhbmQgdGVzdGVkIHdpdGggdGhlc2Ugc29mdHdhcmUgZW52aXJvbm1lbnRzCi0gICAKLSAgICAgKiBSZWQgSGF0IExpbnV4IHZlcnNpb24gNi4yCi0gICAgICogTGludXgga2VybmVsIHZlcnNpb24gMi40LjAKLSAgICAgKiBOZXRzY2FwZSB2ZXJzaW9uIDQuNgotICAgICAqIE5jRlRQIDMuMC4wIGJldGEgMTgKLSAgICAgKiBTYW1iYSB2ZXJzaW9uIDIuMC4zCi0gICAgIF9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCi0gICAKLUNoYXB0ZXIgNC4gRmlsZXMgaW4gVGhpcyBQYWNrYWdlCi0KLSAgIEluIHRoZSBwYWNrYWdlIHlvdSBjYW4gZmluZCB0aGVzZSBmaWxlczoKLSAgIAotICAgc2lzOTAwLmMKLSAgICAgICAgICBEcml2ZXIgc291cmNlIGZpbGUgaW4gQwotICAgICAgICAgIAotICAgc2lzOTAwLmgKLSAgICAgICAgICBIZWFkZXIgZmlsZSBmb3Igc2lzOTAwLmMKLSAgICAgICAgICAKLSAgIHNpczkwMC5zZ21sCi0gICAgICAgICAgRG9jQm9vayBTR01MIHNvdXJjZSBvZiB0aGUgZG9jdW1lbnQKLSAgICAgICAgICAKLSAgIHNpczkwMC50eHQKLSAgICAgICAgICBEcml2ZXIgZG9jdW1lbnQgaW4gcGxhaW4gdGV4dAotICAgICBfX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXwotICAgCi1DaGFwdGVyIDUuIEluc3RhbGxhdGlvbgotCi0gICBTaWxpY29uIEludGVncmF0ZWQgU3lzdGVtIENvcnAuIGlzIGNvb3BlcmF0aW5nIGNsb3NlbHkgd2l0aCBjb3JlIExpbnV4Ci0gICBLZXJuZWwgZGV2ZWxvcGVycy4gVGhlIHJldmlzaW9ucyBvZiBTaVMgOTAwIGRyaXZl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dGFibGUgKi8KIHN0YXRpYyBjb25zdApAQCAtMTUzLDYgKzE1NSwxMSBAQAogICAgICAgICAgICAgaHctPnBoeV90eXBlID0gZTEwMDBfcGh5X2lncDsKICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICB9CisgICAgY2FzZSBHRzgyNTYzX0VfUEhZX0lEOgorICAgICAgICBpZiAoaHctPm1hY190eXBlID09IGUxMDAwXzgwMDAzZXMybGFuKSB7CisgICAgICAgICAgICBody0+cGh5X3R5cGUgPSBlMTAwMF9waHlfZ2c4MjU2MzsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CiAgICAgICAgIC8qIEZhbGwgVGhyb3VnaCAqLwogICAgIGRlZmF1bHQ6CiAgICAgICAgIC8qIFNob3VsZCBuZXZlciBoYXZlIGxvYWRlZCBvbiB0aGlzIGRldmljZSAqLwpAQCAtMzUzLDEyICszNjAsMTkgQEAKICAgICBjYXNlIEUxMDAwX0RFVl9JRF84MjU3M0w6CiAgICAgICAgIGh3LT5tYWNfdHlwZSA9IGUxMDAwXzgyNTczOwogICAgICAgICBicmVhazsKKyAgICBjYXNlIEUxMDAwX0RFVl9JRF84MDAwM0VTMkxBTl9DT1BQRVJfRFBUOgorICAgIGNhc2UgRTEwMDBfREVWX0lEXzgwMDAzRVMyTEFOX1NFUkRFU19EUFQ6CisgICAgICAgIGh3LT5tYWNfdHlwZSA9IGUxMDAwXzgwMDAzZXMybGFuOworICAgICAgICBicmVhazsKICAgICBkZWZhdWx0OgogICAgICAgICAvKiBTaG91bGQgbmV2ZXIgaGF2ZSBsb2FkZWQgb24gdGhpcyBkZXZpY2UgKi8KICAgICAgICAgcmV0dXJuIC1FMTAwMF9FUlJfTUFDX1RZUEU7CiAgICAgfQogCiAgICAgc3dpdGNoKGh3LT5tYWNfdHlwZSkgeworICAgIGNhc2UgZTEwMDBfODAwMDNlczJsYW46CisgICAgICAgIGh3LT5zd2Z3X3N5bmNfcHJlc2VudCA9IFRSVUU7CisgICAgICAgIC8qIGZhbGwgdGhyb3VnaCAqLwogICAgIGNhc2UgZTEwMDBfODI1NzE6CiAgICAgY2FzZSBlMTAwMF84MjU3MjoKICAgICBjYXNlIGUxMDAwXzgyNTczOgpAQCAtMzk5LDYgKzQxMyw3IEBACiAgICAgY2FzZSBFMTAwMF9ERVZfSURfODI1NDZHQl9TRVJERVM6CiAgICAgY2FzZSBFMTAwMF9ERVZfSURfODI1NzFFQl9TRVJERVM6CiAgICAgY2FzZSBFMTAwMF9ERVZfSURfODI1NzJFSV9TRVJERVM6CisgICAgY2FzZSBFMTAwMF9ERVZfSURfODAwMDNFUzJMQU5fU0VSREVTX0RQVDoKICAgICAgICAgaHctPm1lZGlhX3R5cGUgPSBlMTAwMF9tZWRpYV90eXBlX2ludGVybmFsX3NlcmRlczsKICAgICAgICAgYnJlYWs7CiAgICAgZGVmYXVsdDoKQEAgLTU3NSw2ICs1OTAsNyBAQAogICAgICAgICAgICAgLyogZmFsbCB0aHJvdWdoICovCiAgICAgICAgIGNhc2UgZTEwMDBfODI1NzE6CiAgICAgICAgIGNhc2UgZTEwMDBfODI1NzI6CisgICAgICAgIGNhc2UgZTEwMDBfODAwMDNlczJsYW46CiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfZ2V0X2F1dG9fcmRfZG9uZShodyk7CiAgICAgICAgICAgICBpZihyZXRfdmFsKQogICAgICAgICAgICAgICAgIC8qIFdlIGRvbid0IHdhbnQgdG8gY29udGludWUgYWNjZXNzaW5nIE1BQyByZWdpc3RlcnMuICovCkBAIC02NDEsNiArNjU3LDcgQEAKICAgICB1aW50MTZfdCBjbWRfbW1yYmM7CiAgICAgdWludDE2X3Qgc3RhdF9tbXJiYzsKICAgICB1aW50MzJfdCBtdGFfc2l6ZTsKKyAgICB1aW50MzJfdCByZWdfZGF0YTsKICAgICB1aW50MzJfdCBjdHJsX2V4dDsKIAogICAgIERFQlVHRlVOQygiZTEwMDBfaW5pdF9odyIpOwpAQCAtNzM5LDYgKzc1Niw3IEBACiAgICAgICAgIGNhc2UgZTEwMDBfODI1NzE6CiAgICAgICAgIGNhc2UgZTEwMDBfODI1NzI6CiAgICAgICAgIGNhc2UgZTEwMDBfODI1NzM6CisgICAgICAgIGNhc2UgZTEwMDBfODAwMDNlczJsYW46CiAgICAgICAgICAgICBjdHJsIHw9IEUxMDAwX1RYRENUTF9DT1VOVF9ERVNDOwogICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgIH0KQEAgLTc1MiwxMiArNzcwLDM0IEBACiAgICAgc3dpdGNoIChody0+bWFjX3R5cGUpIHsKICAgICBkZWZhdWx0OgogICAgICAgICBicmVhazsKKyAgICBjYXNlIGUxMDAwXzgwMDAzZXMybGFuOgorICAgICAgICAvKiBFbmFibGUgcmV0cmFuc21pdCBvbiBsYXRlIGNvbGxpc2lvbnMgKi8KKyAgICAgICAgcmVnX2RhdGEgPSBFMTAwMF9SRUFEX1JFRyhodywgVENUTCk7CisgICAgICAgIHJlZ19kYXRhIHw9IEUxMDAwX1RDVExfUlRMQzsKKyAgICAgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBUQ1RMLCByZWdfZGF0YSk7CisKKyAgICAgICAgLyogQ29uZmlndXJlIEdpZ2FiaXQgQ2FycnkgRXh0ZW5kIFBhZGRpbmcgKi8KKyAgICAgICAgcmVnX2RhdGEgPSBFMTAwMF9SRUFEX1JFRyhodywgVENUTF9FWFQpOworICAgICAgICByZWdfZGF0YSAmPSB+RTEwMDBfVENUTF9FWFRfR0NFWF9NQVNLOworICAgICAgICByZWdfZGF0YSB8PSBERUZBVUxUXzgwMDAzRVMyTEFOX1RDVExfRVhUX0dDRVg7CisgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgVENUTF9FWFQsIHJlZ19kYXRhKTsKKworICAgICAgICAvKiBDb25maWd1cmUgVHJhbnNtaXQgSW50ZXItUGFja2V0IEdhcCAqLworICAgICAgICByZWdfZGF0YSA9IEUxMDAwX1JFQURfUkVHKGh3LCBUSVBHKTsKKyAg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TbyB0aGlzIHNob3VsZCBiZSBkb25lIGJlZm9yZSBlMTAwMF9zZXR1cF9wY3NfbGluaygpCiAgICAgICogb3IgZTEwMDBfcGh5X3NldHVwKCkgaXMgY2FsbGVkLgogICAgICAqLwotICAgIGlmKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MjU0MykgeworICAgIGlmIChody0+bWFjX3R5cGUgPT0gZTEwMDBfODI1NDMpIHsKKwkJcmV0X3ZhbCA9IGUxMDAwX3JlYWRfZWVwcm9tKGh3LCBFRVBST01fSU5JVF9DT05UUk9MMl9SRUcsCisJCQkJCQkJCQkxLCAmZWVwcm9tX2RhdGEpOworCQlpZiAocmV0X3ZhbCkgeworCQkJREVCVUdPVVQoIkVFUFJPTSBSZWFkIEVycm9yXG4iKTsKKwkJCXJldHVybiAtRTEwMDBfRVJSX0VFUFJPTTsKKwkJfQogICAgICAgICBjdHJsX2V4dCA9ICgoZWVwcm9tX2RhdGEgJiBFRVBST01fV09SRDBGX1NXUERJT19FWFQpIDw8CiAgICAgICAgICAgICAgICAgICAgIFNXRFBJT19fRVhUX1NISUZUKTsKICAgICAgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBDVFJMX0VYVCwgY3RybF9leHQpOwpAQCAtMTMwOCw2ICsxMzU0LDE1NCBAQAogICAgIHJldHVybiBFMTAwMF9TVUNDRVNTOwogfQogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogQ29wcGVyIGxpbmsgc2V0dXAgZm9yIGUxMDAwX3BoeV9nZzgyNTYzIHNlcmllcy4KKyoKKyogaHcgLSBTdHJ1Y3QgY29udGFpbmluZyB2YXJpYWJsZXMgYWNjZXNzZWQgYnkgc2hhcmVkIGNvZGUKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQzMl90CitlMTAwMF9jb3BwZXJfbGlua19nZ3Bfc2V0dXAoc3RydWN0IGUxMDAwX2h3ICpodykKK3sKKyAgICBpbnQzMl90IHJldF92YWw7CisgICAgdWludDE2X3QgcGh5X2RhdGE7CisgICAgdWludDMyX3QgcmVnX2RhdGE7CisKKyAgICBERUJVR0ZVTkMoImUxMDAwX2NvcHBlcl9saW5rX2dncF9zZXR1cCIpOworCisgICAgaWYoIWh3LT5waHlfcmVzZXRfZGlzYWJsZSkgeworICAgICAgICAKKyAgICAgICAgLyogRW5hYmxlIENSUyBvbiBUWCBmb3IgaGFsZi1kdXBsZXggb3BlcmF0aW9uLiAqLworICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBHRzgyNTYzX1BIWV9NQUNfU1BFQ19DVFJMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7CisgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKKworICAgICAgICBwaHlfZGF0YSB8PSBHRzgyNTYzX01TQ1JfQVNTRVJUX0NSU19PTl9UWDsKKyAgICAgICAgLyogVXNlIDI1TUh6IGZvciBib3RoIGxpbmsgZG93biBhbmQgMTAwMEJBU0UtVCBmb3IgVHggY2xvY2sgKi8KKyAgICAgICAgcGh5X2RhdGEgfD0gR0c4MjU2M19NU0NSX1RYX0NMS18xMDAwTUJQU18yNU1IWjsKKworICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgR0c4MjU2M19QSFlfTUFDX1NQRUNfQ1RSTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGh5X2RhdGEpOworICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CisKKyAgICAgICAgLyogT3B0aW9uczoKKyAgICAgICAgICogICBNREkvTURJLVggPSAwIChkZWZhdWx0KQorICAgICAgICAgKiAgIDAgLSBBdXRvIGZvciBhbGwgc3BlZWRzCisgICAgICAgICAqICAgMSAtIE1ESSBtb2RlCisgICAgICAgICAqICAgMiAtIE1ESS1YIG1vZGUKKyAgICAgICAgICogICAzIC0gQXV0byBmb3IgMTAwMEJhc2UtVCBvbmx5IChNREktWCBmb3IgMTAvMTAwQmFzZS1UIG1vZGVzKQorICAgICAgICAgKi8KKyAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgR0c4MjU2M19QSFlfU1BFQ19DVFJMLCAmcGh5X2RhdGEpOworICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CisKKyAgICAgICAgcGh5X2RhdGEgJj0gfkdHODI1NjNfUFNDUl9DUk9TU09WRVJfTU9ERV9NQVNLOworCisgICAgICAgIHN3aXRjaCAoaHctPm1kaXgpIHsKKyAgICAgICAgY2FzZSAxOgorICAgICAgICAgICAgcGh5X2RhdGEgfD0gR0c4MjU2M19QU0NSX0NST1NTT1ZFUl9NT0RFX01ESTsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIDI6CisgICAgICAgICAgICBwaHlfZGF0YSB8PSBHRzgyNTYzX1BTQ1JfQ1JPU1NPVkVSX01PREVfTURJWDsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIDA6CisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICBwaHlfZGF0YSB8PSBHRzgyNTYzX1BTQ1JfQ1JPU1NPVkVSX01PREVfQVVUTzsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisKKyAgICAgICAgLyogT3B0aW9uczoKKyAgICAgICAgICogICBkaXNhYmxlX3BvbGFyaXR5X2NvcnJlY3Rpb24gPSAwIChkZWZhdWx0KQorICAgICAgICAgKiAgICAgICBBdXRvbWF0aWMgQ29ycmVjdGlvbiBmb3IgUmV2ZXJzZWQgQ2FibGUgUG9sYXJpdHkKKyAgICAgICAgICogICAwIC0gRGlzYWJsZWQKKyAgICAgICAgICogICAxIC0gRW5hYmxlZAorICAgICAgICAgKi8KKyAgICAgICAgcGh5X2RhdGEgJj0gfkdHODI1NjNfUFNDUl9QT0xBUklUWV9SRVZFUlNBTF9ESVNBQkxFOworICAgICAgICBpZihody0+ZGlzYWJsZV9wb2xhcml0eV9jb3JyZWN0aW9uID09IDEpCisgICAgICAgICAgICBwaHlfZGF0YSB8PSBHRzgyNTYzX1BTQ1JfUE9MQVJJVFlfUkVWRVJTQUxfRElTQUJMRTsKKyAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIEdHODI1NjNfUEhZX1NQRUNfQ1RSTCwgcGh5X2RhdGEpOworCisgICAgICAgIGlmKHJldF92YWwpCisgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKKworICAgICAgICAvKiBTVyBSZXNldCB0aGUgUEhZIHNvIGFsbCBjaGFuZ2VzIHRha2UgZWZmZWN0ICovCisgICAgICAgIHJldF92YWwgPSBlMTAwMF9waHlfcmVzZXQoaHcpOworICAgICAgICBpZiAocmV0X3ZhbCkgeworICAgICAgICAgICAgREVCVUdPVVQoIkVycm9yIFJlc2V0dGluZyB0aGUgUEhZXG4iKTsKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworICAgICAgICB9CisgICAgfSAvKiBwaHlfcmVzZXRfZGlzYWJsZSAqLworCisgICAgaWYgKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MDAwM2VzMmxhbikgeworICAgICAgICAvKiBCeXBhc3MgUlggYW5kIFRYIEZJRk8ncyAqLworICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfa21ybl9yZWcoaHcsIEUxMDAwX0tVTUNUUkxTVEFfT0ZGU0VUX0ZJRk9fQ1RSTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEUxMDAwX0tVTUNUUkxTVEFfRklGT19DVFJMX1JYX0JZUEFTUyB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFMTAwMF9LVU1DVFJMU1RBX0ZJRk9fQ1RSTF9UWF9CWVBBU1MpOworICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworCisgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIEdHODI1NjNfUEhZX1NQRUNfQ1RSTF8yLCAmcGh5X2RhdGEpOworICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworCisgICAgICAgIHBoeV9kYXRhICY9IH5HRzgyNTYzX1BTQ1IyX1JFVkVSU0VfQVVUT19ORUc7CisgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCBHRzgyNTYzX1BIWV9TUEVDX0NUUkxfMiwgcGh5X2RhdGEpOworCisgICAgICAgIGlmIChyZXRfdmFsKQorICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CisKKyAgICAgICAgcmVnX2RhdGEgPSBFMTAwMF9SRUFEX1JFRyhodywgQ1RSTF9FWFQpOworICAgICAgICByZWdfZGF0YSAmPSB+KEUxMDAwX0NUUkxfRVhUX0xJTktfTU9ERV9NQVNLKTsKKyAgICAgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBDVFJMX0VYVCwgcmVnX2RhdGEpOworCisgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIEdHODI1NjNfUEhZX1BXUl9NR01UX0NUUkwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcGh5X2RhdGEpOworICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworCisgICAgICAgIC8qIERvIG5vdCBpbml0IHRoZXNlIHJlZ2lzdGVycyB3aGVuIHRoZSBIVyBpcyBpbiBJQU1UIG1vZGUsIHNpbmNlIHRoZQorICAgICAgICAgKiBmaXJtd2FyZSB3aWxsIGhhdmUgYWxyZWFkeSBpbml0aWFsaXplZCB0aGVtLiAgV2Ugb25seSBpbml0aWFsaXplCisgICAgICAgICAqIHRoZW0gaWYgdGhlIEhXIGlzIG5vdCBpbiBJQU1UIG1vZGUuCisgICAgICAgICAqLworICAgICAgICBpZiAoZTEwMDBfY2hlY2tfbW5nX21vZGUoaHcpID09IEZBTFNFKSB7CisgICAgICAgICAgICAvKiBFbmFibGUgRWxlY3RyaWNhbCBJZGxlIG9uIHRoZSBQSFkgKi8KKyAgICAgICAgICAgIHBoeV9kYXRhIHw9IEdHODI1NjNfUE1DUl9FTkFCTEVfRUxFQ1RSSUNBTF9JRExFOworICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIEdHODI1NjNfUEhZX1BXUl9NR01UX0NUUkwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaHlfZGF0YSk7CisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKKworICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgR0c4MjU2M19QSFlfS01STl9NT0RFX0NUUkwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7CisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKKworICAgICAgICAgICAgLyogRW5hYmxlIFBhc3MgRmFsc2UgQ2FycmllciBvbiB0aGUgUEhZICovCisgICAgICAgICAgICBwaHlfZGF0YSB8PSBHRzgyNTYzX0tNQ1JfUEFTU19GQUxTRV9DQVJSSUVSOworCisgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgR0c4MjU2M19QSFlfS01STl9NT0RFX0NUUkwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaHlfZGF0YSk7CisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKKyAgICAgICAgfQorCisgICAgICAgIC8qIFdvcmthcm91bmQ6IERpc2FibGUgcGFkZGluZyBpbiBLdW1lcmFuIGludGVyZmFjZSBpbiB0aGUgTUFDCisgICAgICAgICAqIGFuZCBpbiB0aGUgUEhZIHRvIGF2b2lkIENSQyBlcnJvcnMuCisgICAgICAgICAqLworICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBHRzgyNTYzX1BIWV9JTkJBTkRfQ1RSTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcGh5X2RhdGEpOworICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworICAgICAgICBwaHlfZGF0YSB8PSBHRzgyNTYzX0lDUl9ESVNfUEFERElORzsKKyAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWcoaHcsIEdHODI1NjNfUEhZX0lOQkFORF9DVFJMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaHlfZGF0YSk7CisgICAgICAgIGlmIChyZXRfdmFsKQorICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CisgICAgfQorCisgICAgcmV0dXJuIEUxMDAwX1NVQ0NFU1M7Cit9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiBDb3BwZXIgbGluayBzZXR1cCBmb3IgZTEwMDBfcGh5X204OCBzZXJpZXMuCkBAIC0xNTE4LDYgKzE3MTIsNyBAQAogICAgIGludDMyX3QgcmV0X3ZhbDsKICAgICB1aW50MTZfdCBpOwogICAgIHVpbnQxNl90IHBoeV9kYXRhOworICAgIHVpbnQxNl90IHJlZ19kYXRhOwogCiAgICAgREVCVUdGVU5DKCJlMTAwMF9zZXR1cF9jb3BwZXJfbGluayIpOwogCkBAIC0xNTI2LDYgKzE3MjEsMjIgQEAKICAgICBpZihyZXRfdmFsKQogICAgICAgICByZXR1cm4gcmV0X3ZhbDsKIAorICAgIHN3aXRjaCAoaHctPm1hY190eXBlKSB7CisgICAgY2FzZSBlMTAwMF84MDAwM2VzMmxhbjoKKyAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfa21ybl9yZWcoaHcsIEUxMDAwX0tVTUNUUkxTVEFfT0ZGU0VUX0lOQl9DVFJMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmcmVnX2RhdGEpOworICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworICAgICAgICByZWdfZGF0YSB8PSBFMTAwMF9LVU1DVFJMU1RBX0lOQl9DVFJMX0RJU19QQURESU5HOworICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfa21ybl9yZWcoaHcsIEUxMDAwX0tVTUNUUkxTVEFfT0ZGU0VUX0lOQl9DVFJMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVnX2RhdGEpOworICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworICAgICAgICBicmVhazsKKyAgICBkZWZhdWx0OgorICAgICAgICBicmVhazsKKyAgICB9CisKICAgICBpZiAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3AgfHwKICAgICAgICAgaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3BfMikgewogICAgICAgICByZXRfdmFsID0gZTEwMDBfY29wcGVyX2xpbmtfaWdwX3NldHVwKGh3KTsKQEAgLTE1MzUsNiArMTc0NiwxMCBAQAogICAgICAgICByZXRfdmFsID0gZTEwMDBfY29wcGVyX2xpbmtfbWdwX3NldHVwKGh3KTsKICAgICAgICAgaWYocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworICAgIH0gZWxzZSBpZiAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9nZzgyNTYzKSB7CisgICAgICAgIHJldF92YWwgPSBlMTAwMF9jb3BwZXJfbGlua19nZ3Bfc2V0dXAoaHcpOworICAgICAgICBpZihyZXRfdmFsKQorICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgfQogCiAgICAgaWYoaHctPmF1dG9uZWcpIHsKQEAgLTE1ODIsNiArMTc5Nyw1OSBAQAogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIENvbmZpZ3VyZSB0aGUgTUFDLXRvLVBIWSBpbnRlcmZhY2UgZm9yIDEwLzEwME1icHMKKyoKKyogaHcgLSBTdHJ1Y3QgY29udGFpbmluZyB2YXJpYWJsZXMgYWNjZXNzZWQgYnkgc2hhcmVkIGNvZGUKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQzMl90CitlMTAwMF9jb25maWd1cmVfa21ybl9mb3JfMTBfMTAwKHN0cnVjdCBlMTAwMF9odyAqaHcpCit7CisgICAgaW50MzJfdCByZXRfdmFsID0gRTEwMDBfU1VDQ0VTUzsKKyAgICB1aW50MzJfdCB0aXBnOworICAgIHVpbnQxNl90IHJlZ19kYXRhOworCisgICAgREVCVUdGVU5DKCJlMTAwMF9jb25maWd1cmVfa21ybl9mb3JfMTBfMTAwIik7CisKKyAgICByZWdfZGF0YSA9IEUxMDAwX0tVTUNUUkxTVEFfSERfQ1RSTF8xMF8xMDBfREVGQVVMVDsKKyAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfa21ybl9yZWcoaHcsIEUxMDAwX0tVTUNUUkxTVEFfT0ZGU0VUX0hEX0NUUkwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZ19kYXRhKTsKKyAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgcmV0dXJuIHJldF92YWw7CisKKyAgICAvKiBDb25maWd1cmUgVHJhbnNtaXQgSW50ZXItUGFja2V0IEdhcCAqLworICAgIHRpcGcgPSBFMTAwMF9SRUFEX1JFRyhodywgVElQRyk7CisgICAgdGlwZyAmPSB+RTEwMDBfVElQR19JUEdUX01BU0s7CisgICAgdGlwZyB8PSBERUZBVUxUXzgwMDAzRVMyTEFOX1RJUEdfSVBHVF8xMF8xMDA7CisgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBUSVBHLCB0aXBnKTsKKworICAgIHJldHVybiByZXRfdmFsOworfQorCitzdGF0aWMgaW50MzJfdAorZTEwMDBfY29uZmlndXJlX2ttcm5fZm9yXzEwMDAoc3RydWN0IGUxMDAwX2h3ICpodykKK3sKKyAgICBpbnQzMl90IHJldF92YWwgPSBFMTAwMF9TVUNDRVNTOworICAgIHVpbnQxNl90IHJlZ19kYXRhOworICAgIHVpbnQzMl90IHRpcGc7CisKKyAgICBERUJVR0ZVTkMoImUxMDAwX2NvbmZpZ3VyZV9rbXJuX2Zvcl8xMDAwIik7CisKKyAgICByZWdfZGF0YSA9IEUxMDAwX0tVTUNUUkxTVEFfSERfQ1RSTF8xMDAwX0RFRkFVTFQ7CisgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX2ttcm5fcmVnKGh3LCBFMTAwMF9LVU1DVFJMU1RBX09GRlNFVF9IRF9DVFJMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWdfZGF0YSk7CisgICAgaWYgKHJldF92YWwpCisgICAgICAgIHJldHVybiByZXRfdmFsOworCisgICAgLyogQ29uZmlndXJlIFRyYW5zbWl0IEludGVyLVBhY2tldCBHYXAgKi8KKyAgICB0aXBnID0gRTEwMDBfUkVBRF9SRUcoaHcsIFRJUEcpOworICAgIHRpcGcgJj0gfkUxMDAwX1RJUEdfSVBHVF9NQVNLOworICAgIHRpcGcgfD0gREVGQVVMVF84MDAwM0VTMkxBTl9USVBHX0lQR1RfMTAwMDsKKyAgICBFMTAwMF9XUklURV9SRUcoaHcsIFRJUEcsIHRpcGcpOworCisgICAgcmV0dXJuIHJldF92YWw7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICogQ29uZmlndXJlcyBQSFkgYXV0b25lZyBhbmQgZmxvdyBjb250cm9sIGFkdmVydGlzZW1lbnQgc2V0dGluZ3MKICoKICogaHcgLSBTdHJ1Y3QgY29udGFpbmluZyB2YXJpYWJsZXMgYWNjZXNzZWQgYnkgc2hhcmVkIGNvZGUKQEAgLTE4MDIsNyArMjA3MCw4IEBACiAgICAgLyogV3JpdGUgdGhlIGNvbmZpZ3VyZWQgdmFsdWVzIGJhY2sgdG8gdGhlIERldmljZSBDb250cm9sIFJlZy4gKi8KICAgICBFMTAwMF9XUklURV9SRUcoaHcsIENUUkwsIGN0cmwpOwogCi0gICAgaWYgKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfbTg4KSB7CisgICAgaWYgKChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X204OCkgfHwKKyAgICAgICAgKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfZ2c4MjU2MykpIHsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX1NQRUNfQ1RSTCwgJnBoeV9kYXRhKTsKICAgICAgICAgaWYocmV0X3ZhbCkKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwpAQCAtMTg3MSw3ICsyMTQwLDggQEAKICAgICAgICAgICAgIG1zZWNfZGVsYXkoMTAwKTsKICAgICAgICAgfQogICAgICAgICBpZigoaSA9PSAwKSAmJgotICAgICAgICAgICAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9tODgpKSB7CisgICAgICAgICAgICgoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9tODgpIHx8CisgICAgICAgICAgICAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9nZzgyNTYzKSkpIHsKICAgICAgICAgICAgIC8qIFdlIGRpZG4ndCBnZXQgbGluay4gIFJlc2V0IHRoZSBEU1AgYW5kIHdhaXQgYWdhaW4gZm9yIGxpbmsuICovCiAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcGh5X3Jlc2V0X2RzcChodyk7CiAgICAgICAgICAgICBpZihyZXRfdmFsKSB7CkBAIC0xOTMwLDYgKzIyMDAsMjcgQEAKICAgICAgICAgICAgIGlmKHJldF92YWwpCiAgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAgICAgICAgIH0KKyAgICB9IGVsc2UgaWYgKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfZ2c4MjU2MykgeworICAgICAgICAvKiBUaGUgVFhfQ0xLIG9mIHRoZSBFeHRlbmRlZCBQSFkgU3BlY2lmaWMgQ29udHJvbCBSZWdpc3RlciBkZWZhdWx0cworICAgICAgICAgKiB0byAyLjVNSHogb24gYSByZXNldC4gIFdlIG5lZWQgdG8gcmUtZm9yY2UgaXQgYmFjayB0byAyNU1IeiwgaWYKKyAgICAgICAgICogd2UncmUgbm90IGluIGEgZm9yY2VkIDEwL2R1cGxleCBjb25maWd1cmF0aW9uLiAqLworICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBHRzgyNTYzX1BIWV9NQUNfU1BFQ19DVFJMLCAmcGh5X2RhdGEpOworICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworCisgICAgICAgIHBoeV9kYXRhICY9IH5HRzgyNTYzX01TQ1JfVFhfQ0xLX01BU0s7CisgICAgICAgIGlmICgoaHctPmZvcmNlZF9zcGVlZF9kdXBsZXggPT0gZTEwMDBfMTBfZnVsbCkgfHwKKyAgICAgICAgICAgIChody0+Zm9yY2VkX3NwZWVkX2R1cGxleCA9PSBlMTAwMF8xMF9oYWxmKSkKKyAgICAgICAgICAgIHBoeV9kYXRhIHw9IEdHODI1NjNfTVNDUl9UWF9DTEtfMTBNQlBTXzJfNU1IWjsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgcGh5X2RhdGEgfD0gR0c4MjU2M19NU0NSX1RYX0NMS18xMDBNQlBTXzI1TUhaOworCisgICAgICAgIC8qIEFsc28gZHVlIHRvIHRoZSByZXNldCwgd2UgbmVlZCB0byBlbmFibGUgQ1JTIG9uIFR4LiAqLworICAgICAgICBwaHlfZGF0YSB8PSBHRzgyNTYzX01TQ1JfQVNTRVJUX0NSU19PTl9UWDsKKworICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZyhodywgR0c4MjU2M19QSFlfTUFDX1NQRUNfQ1RSTCwgcGh5X2RhdGEpOworICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgIH0KICAgICByZXR1cm4gRTEwMDBfU1VDQ0VTUzsKIH0KQEAgLTI1OTIsNiArMjg4MywxNiBAQAogICAgICAgICB9CiAgICAgfQogCisgICAgaWYgKChody0+bWFjX3R5cGUgPT0gZTEwMDBfODAwMDNlczJsYW4pICYmIAorICAgICAgICAoaHctPm1lZGlhX3R5cGUgPT0gZTEwMDBfbWVkaWFfdHlwZV9jb3BwZXIpKSB7CisgICAgICAgIGlmICgqc3BlZWQgPT0gU1BFRURfMTAwMCkKKyAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9jb25maWd1cmVfa21ybl9mb3JfMTAwMChodyk7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF9jb25maWd1cmVfa21ybl9mb3JfMTBfMTAwKGh3KTsKKyAgICAgICAgaWYgKHJldF92YWwpCisgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKKyAgICB9CisKICAgICByZXR1cm4gRTEwMDBfU1VDQ0VTUzsKIH0KIApAQCAtMjc2Nyw2ICszMDY4LDcyIEBACiAgICAgcmV0dXJuIGRhdGE7CiB9CiAKK2ludDMyX3QKK2UxMDAwX3N3Zndfc3luY19hY3F1aXJlKHN0cnVjdCBlMTAwMF9odyAqaHcsIHVpbnQxNl90IG1hc2spCit7CisgICAgdWludDMyX3Qgc3dmd19zeW5jID0gMDsKKyAgICB1aW50MzJfdCBzd21hc2sgPSBtYXNrOworICAgIHVpbnQzMl90IGZ3bWFzayA9IG1hc2sgPDwgMTY7CisgICAgaW50MzJfdCB0aW1lb3V0ID0gMjAwOworCisgICAgREVCVUdGVU5DKCJlMTAwMF9zd2Z3X3N5bmNfYWNxdWlyZSIpOworCisgICAgaWYgKCFody0+c3dmd19zeW5jX3ByZXNlbnQpCisgICAgICAgIHJldHVybiBlMTAwMF9nZXRfaHdfZWVwcm9tX3NlbWFwaG9yZShodyk7CisKKyAgICB3aGlsZSh0aW1lb3V0KSB7CisgICAgICAgICAgICBpZiAoZTEwMDBfZ2V0X2h3X2VlcHJvbV9zZW1hcGhvcmUoaHcpKQorICAgICAgICAgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX1NXRldfU1lOQzsKKworICAgICAgICAgICAgc3dmd19zeW5jID0gRTEwMDBfUkVBRF9SRUcoaHcsIFNXX0ZXX1NZTkMpOworICAgICAgICAgICAgaWYgKCEoc3dmd19zeW5jICYgKGZ3bWFzayB8IHN3bWFzaykpKSB7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIC8qIGZpcm13YXJlIGN1cnJlbnRseSB1c2luZyByZXNvdXJjZSAoZndtYXNrKSAqLworICAgICAgICAgICAgLyogb3Igb3RoZXIgc29mdHdhcmUgdGhyZWFkIGN1cnJlbnRseSB1c2luZyByZXNvdXJjZSAoc3dtYXNrKSAqLworICAgICAgICAgICAgZTEwMDBfcHV0X2h3X2VlcHJvbV9zZW1hcGhvcmUoaHcpOworICAgICAgICAgICAgbXNlY19kZWxheV9pcnEoNSk7CisgICAgICAgICAgICB0aW1lb3V0LS07CisgICAgfQorCisgICAgaWYgKCF0aW1lb3V0KSB7CisgICAgICAgIERFQlVHT1VUKCJEcml2ZXIgY2FuJ3QgYWNjZXNzIHJlc291cmNlLCBTV19GV19TWU5DIHRpbWVvdXQuXG4iKTsKKyAgICAgICAgcmV0dXJuIC1FMTAwMF9FUlJfU1dGV19TWU5DOworICAgIH0KKworICAgIHN3Zndfc3luYyB8PSBzd21hc2s7CisgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBTV19GV19TWU5DLCBzd2Z3X3N5bmMpOworCisgICAgZTEwMDBfcHV0X2h3X2VlcHJvbV9zZW1hcGhvcmUoaHcpOworICAgIHJldHVybiBFMTAwMF9TVUNDRVNTOworfQorCit2b2lkCitlMTAwMF9zd2Z3X3N5bmNfcmVsZWFzZShzdHJ1Y3QgZTEwMDBfaHcgKmh3LCB1aW50MTZfdCBtYXNrKQoreworICAgIHVpbnQzMl90IHN3Zndfc3luYzsKKyAgICB1aW50MzJfdCBzd21hc2sgPSBtYXNrOworCisgICAgREVCVUdGVU5DKCJlMTAwMF9zd2Z3X3N5bmNfcmVsZWFzZSIpOworCisgICAgaWYgKCFody0+c3dmd19zeW5jX3ByZXNlbnQpIHsKKyAgICAgICAgZTEwMDBfcHV0X2h3X2VlcHJvbV9zZW1hcGhvcmUoaHcpOworICAgICAgICByZXR1cm47CisgICAgfQorCisgICAgLyogaWYgKGUxMDAwX2dldF9od19lZXByb21fc2VtYXBob3JlKGh3KSkKKyAgICAgKiAgICByZXR1cm4gLUUxMDAwX0VSUl9TV0ZXX1NZTkM7ICovCisgICAgd2hpbGUgKGUxMDAwX2dldF9od19lZXByb21fc2VtYXBob3JlKGh3KSAhPSBFMTAwMF9TVUNDRVNTKTsKKyAgICAgICAgLyogZW1wdHkgKi8KKworICAgIHN3Zndfc3luYyA9IEUxMDAwX1JFQURfUkVHKGh3LCBTV19GV19TWU5DKTsKKyAgICBzd2Z3X3N5bmMgJj0gfnN3bWFzazsKKyAgICBFMTAwMF9XUklURV9SRUcoaHcsIFNXX0ZXX1NZTkMsIHN3Zndfc3luYyk7CisKKyAgICBlMTAwMF9wdXRfaHdfZWVwcm9tX3NlbWFwaG9yZShodyk7Cit9CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiBSZWFkcyB0aGUgdmFsdWUgZnJvbSBhIFBIWSByZWdpc3RlciwgaWYgdGhlIHZhbHVlIGlzIG9uIGEgc3BlY2lmaWMgbm9uIHplcm8KICogcGFnZSwgc2V0cyB0aGUgcGFnZSBmaXJzdC4KQEAgLTI3NzksMjIgKzMxNDYsNTUgQEAKICAgICAgICAgICAgICAgICAgICB1aW50MTZfdCAqcGh5X2RhdGEpCiB7CiAgICAgdWludDMyX3QgcmV0X3ZhbDsKKyAgICB1aW50MTZfdCBzd2Z3OwogCiAgICAgREVCVUdGVU5DKCJlMTAwMF9yZWFkX3BoeV9yZWciKTsKIAorICAgIGlmICgoaHctPm1hY190eXBlID09IGUxMDAwXzgwMDAzZXMybGFuKSAmJgorICAgICAgICAoRTEwMDBfUkVBRF9SRUcoaHcsIFNUQVRVUykgJiBFMTAwMF9TVEFUVVNfRlVOQ18xKSkgeworICAgICAgICBzd2Z3ID0gRTEwMDBfU1dGV19QSFkxX1NNOworICAgIH0gZWxzZSB7CisgICAgICAgIHN3ZncgPSBFMTAwMF9TV0ZXX1BIWTBfU007CisgICAgfQorICAgIGlmIChlMTAwMF9zd2Z3X3N5bmNfYWNxdWlyZShodywgc3dmdykpCisgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX1NXRldfU1lOQzsKKwogICAgIGlmKChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X2lncCB8fCAKICAgICAgICAgaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3BfMikgJiYKICAgICAgICAocmVnX2FkZHIgPiBNQVhfUEhZX01VTFRJX1BBR0VfUkVHKSkgewogICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZ19leChodywgSUdQMDFFMTAwMF9QSFlfUEFHRV9TRUxFQ1QsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1aW50MTZfdClyZWdfYWRkcik7CiAgICAgICAgIGlmKHJldF92YWwpIHsKKyAgICAgICAgICAgIGUxMDAwX3N3Zndfc3luY19yZWxlYXNlKGh3LCBzd2Z3KTsKICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOwogICAgICAgICB9CisgICAgfSBlbHNlIGlmIChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X2dnODI1NjMpIHsKKyAgICAgICAgaWYgKCgocmVnX2FkZHIgJiBNQVhfUEhZX1JFR19BRERSRVNTKSA+IE1BWF9QSFlfTVVMVElfUEFHRV9SRUcpIHx8CisgICAgICAgICAgICAoaHctPm1hY190eXBlID09IGUxMDAwXzgwMDAzZXMybGFuKSkgeworICAgICAgICAgICAgLyogU2VsZWN0IENvbmZpZ3VyYXRpb24gUGFnZSAqLworICAgICAgICAgICAgaWYgKChyZWdfYWRkciAmIE1BWF9QSFlfUkVHX0FERFJFU1MpIDwgR0c4MjU2M19NSU5fQUxUX1JFRykgeworICAgICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnX2V4KGh3LCBHRzgyNTYzX1BIWV9QQUdFX1NFTEVDVCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKHVpbnQxNl90KSgodWludDE2X3QpcmVnX2FkZHIgPj4gR0c4MjU2M19QQUdFX1NISUZUKSk7CisgICAgICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIC8qIFVzZSBBbHRlcm5hdGl2ZSBQYWdlIFNlbGVjdCByZWdpc3RlciB0byBhY2Nlc3MKKyAgICAgICAgICAgICAgICAgKiByZWdpc3RlcnMgMzAgYW5kIDMxCisgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWdfZXgoaHcsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR0c4MjU2M19QSFlfUEFHRV9TRUxFQ1RfQUxULAorICAgICAgICAgICAgICAgICAgICAgICAgICAodWludDE2X3QpKCh1aW50MTZfdClyZWdfYWRkciA+PiBHRzgyNTYzX1BBR0VfU0hJRlQpKTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgaWYgKHJldF92YWwpIHsKKyAgICAgICAgICAgICAgICBlMTAwMF9zd2Z3X3N5bmNfcmVsZWFzZShodywgc3dmdyk7CisgICAgICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CisgICAgICAgICAgICB9CisgICAgICAgIH0KICAgICB9CiAKICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnX2V4KGh3LCBNQVhfUEhZX1JFR19BRERSRVNTICYgcmVnX2FkZHIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaHlfZGF0YSk7CiAKKyAgICBlMTAwMF9zd2Z3X3N5bmNfcmVsZWFzZShodywgc3dmdyk7CiAgICAgcmV0dXJuIHJldF92YWw7CiB9CiAKQEAgLTI4ODUsMjIgKzMyODUsNTUgQEAKICAgICAgICAgICAgICAgICAgICAgdWludDE2X3QgcGh5X2RhdGEpCiB7CiAgICAgdWludDMyX3QgcmV0X3ZhbDsKKyAgICB1aW50MTZfdCBzd2Z3OwogCiAgICAgREVCVUdGVU5DKCJlMTAwMF93cml0ZV9waHlfcmVnIik7CiAKKyAgICBpZiAoKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MDAwM2VzMmxhbikgJiYKKyAgICAgICAgKEUxMDAwX1JFQURfUkVHKGh3LCBTVEFUVVMpICYgRTEwMDBfU1RBVFVTX0ZVTkNfMSkpIHsKKyAgICAgICAgc3dmdyA9IEUxMDAwX1NXRldfUEhZMV9TTTsKKyAgICB9IGVsc2UgeworICAgICAgICBzd2Z3ID0gRTEwMDBfU1dGV19QSFkwX1NNOworICAgIH0KKyAgICBpZiAoZTEwMDBfc3dmd19zeW5jX2FjcXVpcmUoaHcsIHN3ZncpKQorICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9TV0ZXX1NZTkM7CisKICAgICBpZigoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3AgfHwgCiAgICAgICAgIGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfaWdwXzIpICYmCiAgICAgICAgKHJlZ19hZGRyID4gTUFYX1BIWV9NVUxUSV9QQUdFX1JFRykpIHsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWdfZXgoaHcsIElHUDAxRTEwMDBfUEhZX1BBR0VfU0VMRUNULAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodWludDE2X3QpcmVnX2FkZHIpOwogICAgICAgICBpZihyZXRfdmFsKSB7CisgICAgICAgICAgICBlMTAwMF9zd2Z3X3N5bmNfcmVsZWFzZShodywgc3dmdyk7CiAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKICAgICAgICAgfQorICAgIH0gZWxzZSBpZiAoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9nZzgyNTYzKSB7CisgICAgICAgIGlmICgoKHJlZ19hZGRyICYgTUFYX1BIWV9SRUdfQUREUkVTUykgPiBNQVhfUEhZX01VTFRJX1BBR0VfUkVHKSB8fAorICAgICAgICAgICAgKGh3LT5tYWNfdHlwZSA9PSBlMTAwMF84MDAwM2VzMmxhbikpIHsKKyAgICAgICAgICAgIC8qIFNlbGVjdCBDb25maWd1cmF0aW9uIFBhZ2UgKi8KKyAgICAgICAgICAgIGlmICgocmVnX2FkZHIgJiBNQVhfUEhZX1JFR19BRERSRVNTKSA8IEdHODI1NjNfTUlOX0FMVF9SRUcpIHsKKyAgICAgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfd3JpdGVfcGh5X3JlZ19leChodywgR0c4MjU2M19QSFlfUEFHRV9TRUxFQ1QsCisgICAgICAgICAgICAgICAgICAgICAgICAgICh1aW50MTZfdCkoKHVpbnQxNl90KXJlZ19hZGRyID4+IEdHODI1NjNfUEFHRV9TSElGVCkpOworICAgICAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAvKiBVc2UgQWx0ZXJuYXRpdmUgUGFnZSBTZWxlY3QgcmVnaXN0ZXIgdG8gYWNjZXNzCisgICAgICAgICAgICAgICAgICogcmVnaXN0ZXJzIDMwIGFuZCAzMQorICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnX2V4KGh3LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdHODI1NjNfUEhZX1BBR0VfU0VMRUNUX0FMVCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgKHVpbnQxNl90KSgodWludDE2X3QpcmVnX2FkZHIgPj4gR0c4MjU2M19QQUdFX1NISUZUKSk7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIGlmIChyZXRfdmFsKSB7CisgICAgICAgICAgICAgICAgZTEwMDBfc3dmd19zeW5jX3JlbGVhc2UoaHcsIHN3ZncpOworICAgICAgICAgICAgICAgIHJldHVybiByZXRfdmFsOworICAgICAgICAgICAgfQorICAgICAgICB9CiAgICAgfQogCiAgICAgcmV0X3ZhbCA9IGUxMDAwX3dyaXRlX3BoeV9yZWdfZXgoaHcsIE1BWF9QSFlfUkVHX0FERFJFU1MgJiByZWdfYWRkciwKICAgICAgICAgICAgICAgICAg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U1RBX09GRlNFVCkgfCBkYXRhOworICAgIEUxMDAwX1dSSVRFX1JFRyhodywgS1VNQ1RSTFNUQSwgcmVnX3ZhbCk7CisgICAgdWRlbGF5KDIpOworCisgICAgZTEwMDBfc3dmd19zeW5jX3JlbGVhc2UoaHcsIHN3ZncpOworICAgIHJldHVybiBFMTAwMF9TVUNDRVNTOworfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqIFJldHVybnMgdGhlIFBIWSB0byB0aGUgcG93ZXItb24gcmVzZXQgc3RhdGUKQEAgLTI5NzksNiArMzQ3MSw3IEBACiAgICAgdWludDMyX3QgY3RybCwgY3RybF9leHQ7CiAgICAgdWludDMyX3QgbGVkX2N0cmw7CiAgICAgaW50MzJfdCByZXRfdmFsOworICAgIHVpbnQxNl90IHN3Znc7CiAKICAgICBERUJVR0ZVTkMoImUxMDAwX3BoeV9od19yZXNldCIpOwogCkBAIC0yOTkxLDExICszNDg0LDIxIEBACiAgICAgREVCVUdPVVQoIlJlc2V0dGluZyBQaHkuLi5cbiIpOwogCiAgICAgaWYoaHctPm1hY190eXBlID4gZTEwMDBfODI1NDMpIHsKKyAgICAgICAgaWYgKChody0+bWFjX3R5cGUgPT0gZTEwMDBfODAwMDNlczJsYW4pICYmCisgICAgICAgICAgICAoRTEwMDBfUkVBRF9SRUcoaHcsIFNUQVRVUykgJiBFMTAwMF9TVEFUVVNfRlVOQ18xKSkgeworICAgICAgICAgICAgc3dmdyA9IEUxMDAwX1NXRldfUEhZMV9TTTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgIHN3ZncgPSBFMTAwMF9TV0ZXX1BIWTBfU007CisgICAgICAgIH0KKyAgICAgICAgaWYgKGUxMDAwX3N3Zndfc3luY19hY3F1aXJlKGh3LCBzd2Z3KSkgeworICAgICAgICAgICAgZTEwMDBfcmVsZWFzZV9zb2Z0d2FyZV9zZW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fcmVnKGh3LCAzMCwgMHgwMGMxKTsKICAgICAgICAgaWYocmV0X3ZhbCkgYnJlYWs7CiAgICAgICAgIHJldF92YWwgPSBlMTAwMF93cml0ZV9waHlfcmVnKGh3LCAzMCwgMHgwMDAwKTsKQEAgLTMzMTAsOCArMzgyOSwxNyBAQAogICAgICAgICAvKiBDYWJsZSBMZW5ndGggRXN0aW1hdGlvbiBhbmQgTG9jYWwvUmVtb3RlIFJlY2VpdmVyIEluZm9ybWF0aW9uCiAgICAgICAgICAqIGFyZSBvbmx5IHZhbGlkIGF0IDEwMDAgTWJwcy4KICAgICAgICAgICovCi0gICAgICAgIHBoeV9pbmZvLT5jYWJsZV9sZW5ndGggPSAoKHBoeV9kYXRhICYgTTg4RTEwMDBfUFNTUl9DQUJMRV9MRU5HVEgpID4+Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTTg4RTEwMDBfUFNTUl9DQUJMRV9MRU5HVEhfU0hJRlQpOworICAgICAgICBpZiAoaHctPnBoeV90eXBlICE9IGUxMDAwX3BoeV9nZzgyNTYzKSB7CisgICAgICAgICAgICBwaHlfaW5mby0+Y2FibGVfbGVuZ3RoID0gKChwaHlfZGF0YSAmIE04OEUxMDAwX1BTU1JfQ0FCTEVfTEVOR1RIKSA+PgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNODhFMTAwMF9QU1NSX0NBQkxFX0xFTkdUSF9TSElGVCk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICByZXRfdmFsID0gZTEwMDBfcmVhZF9waHlfcmVnKGh3LCBHRzgyNTYzX1BIWV9EU1BfRElTVEFOQ0UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7CisgICAgICAgICAgICBpZiAocmV0X3ZhbCkKKyAgICAgICAgICAgICAgICByZXR1cm4gcmV0X3ZhbDsKKworICAgICAgICAgICAgcGh5X2luZm8tPmNhYmxlX2xlbmd0aCA9IHBoeV9kYXRhICYgR0c4MjU2M19EU1BEX0NBQkxFX0xFTkdUSDsKKyAgICAgICAgfQogCiAgICAgICAgIHJldF92YWwgPSBlMTAwMF9yZWFkX3BoeV9yZWcoaHcsIFBIWV8xMDAwVF9TVEFUVVMsICZwaHlfZGF0YSk7CiAgICAgICAgIGlmKHJldF92YWwpCkBAIC0zMzkyLDcgKzM5MjAsOCBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBTZXRzIHVwIGVlcHJvbSB2YXJpYWJsZXMgaW4gdGhlIGh3IHN0cnVjdC4gIE11c3QgYmUgY2FsbGVkIGFmdGVyIG1hY190eXBlCi0gKiBpcyBjb25maWd1cmVkLgorICogaXMgY29uZmlndXJlZC4gIEFkZGl0aW9uYWxseSwgaWYgdGhpcyBpcyBJQ0g4LCB0aGUgZmxhc2ggY29udHJvbGxlciBHYkUKKyAqIHJlZ2lzdGVycyBtdXN0IGJlIG1hcHBlZCwgb3IgdGhpcyB3aWxsIGNyYXNoLgogICoKICAqIGh3IC0gU3RydWN0IGNvbnRhaW5pbmcgdmFyaWFibGVzIGFjY2Vzc2VkIGJ5IHNoYXJlZCBjb2RlCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0zNTA1LDYgKzQwMzQsMjAgQEAKICAgICAgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgRUVDRCwgZWVjZCk7CiAgICAgICAgIH0KICAgICAgICAgYnJlYWs7CisgICAgY2FzZSBlMTAwMF84MDAwM2VzMmxhbjoKKyAgICAgICAgZWVwcm9tLT50eXBlID0gZTEwMDBfZWVwcm9tX3NwaTsKKyAgICAgICAgZWVwcm9tLT5vcGNvZGVfYml0cyA9IDg7CisgICAgICAgIGVlcHJvbS0+ZGVsYXlfdXNlYyA9IDE7CisgICAgICAgIGlmIChlZWNkICYgRTEwMDBfRUVDRF9BRERSX0JJVFMpIHsKKyAgICAgICAgICAgIGVlcHJvbS0+cGFnZV9zaXplID0gMzI7CisgICAgICAgICAgICBlZXByb20tPmFkZHJlc3NfYml0cyA9IDE2OworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgZWVwcm9tLT5wYWdlX3NpemUgPSA4OworICAgICAgICAgICAgZWVwcm9tLT5hZGRyZXNzX2JpdHMgPSA4OworICAgICAgICB9CisgICAgICAgIGVlcHJvbS0+dXNlX2VlcmQgPSBUUlVFOworICAgICAgICBlZXByb20tPnVzZV9lZXdyID0gRkFMU0U7CisgICAgICAgIGJyZWFrOwogICAgIGRlZmF1bHQ6CiAgICAgICAgIGJyZWFrOwogICAgIH0KQEAgLTM2ODUsOSArNDIyOCw4IEBACiAKICAgICBERUJVR0ZVTkMoImUxMDAwX2FjcXVpcmVfZWVwcm9tIik7CiAKLSAgICBpZihlMTAwMF9nZXRfaHdfZWVwcm9tX3NlbWFwaG9yZShodykpCi0gICAgICAgIHJldHVybiAtRTEwMDBfRVJSX0VFUFJPTTsKLQorICAgIGlmIChlMTAwMF9zd2Z3X3N5bmNfYWNxdWlyZShodywgRTEwMDBfU1dGV19FRVBfU00pKQorICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9TV0ZXX1NZTkM7CiAgICAgZWVjZCA9IEUxMDAwX1JFQURfUkVHKGh3LCBFRUNEKTsKIAogICAgIGlmIChody0+bWFjX3R5cGUgIT0gZTEwMDBfODI1NzMpIHsKQEAgLTM3MDYsNyArNDI0OCw3IEBACiAgICAgICAgICAgICAgICAgZWVjZCAmPSB+RTEwMDBfRUVDRF9SRVE7CiAgICAgICAgICAgICAgICAgRTEwMDBfV1JJVEVfUkVHKGh3LCBFRUNELCBlZWNkKTsKICAgICAgICAgICAgICAgICBERUJVR09VVCgiQ291bGQgbm90IGFjcXVpcmUgRUVQUk9NIGdyYW50XG4iKTsKLSAgICAgICAgICAgICAgICBlMTAwMF9wdXRfaHdfZWVwcm9tX3NlbWFwaG9yZShodyk7CisgICAgICAgICAgICAgICAgZTEwMDBfc3dmd19zeW5jX3JlbGVhc2UoaHcsIEUxMDAwX1NXRldfRUVQX1NNKTsKICAgICAgICAgICAgICAgICByZXR1cm4gLUUxMDAwX0VSUl9FRVBST007CiAgICAgICAgICAgICB9CiAgICAgICAgIH0KQEAgLTM4MjksNyArNDM3MSw3IEBACiAgICAgICAgIEUxMDAwX1dSSVRFX1JFRyhodywgRUVDRCwgZWVjZCk7CiAgICAgfQogCi0gICAgZTEwMDBfcHV0X2h3X2VlcHJvbV9zZW1hcGhvcmUoaHcpOworICAgIGUxMDAwX3N3Zndfc3luY19yZWxlYXNlKGh3LCBFMTAwMF9TV0ZXX0VFUF9TTSk7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTM5MDgsNiArNDQ1MCw4IEBACiAgICAgaWYgKGUxMDAwX2lzX29uYm9hcmRfbnZtX2VlcHJvbShodykgPT0gVFJVRSAmJgogICAgIGh3LT5lZXByb20udXNlX2VlcmQgPT0gRkFMU0UpIHsKICAgICAgICAgc3dpdGNoIChody0+bWFjX3R5cGUpIHsKKyAgICAgICAgY2FzZSBlMTAwMF84MDAwM2VzMmxhbjoKKyAgICAgICAgICAgIGJyZWFrOwogICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgLyogUHJlcGFyZSB0aGUgRUVQUk9NIGZvciByZWFkaW5nICAqLwogICAgICAgICAgICAgaWYgKGUxMDAwX2FjcXVpcmVfZWVwcm9tKGh3KSAhPSBFMTAwMF9TVUNDRVNTKQpAQCAtNDAyNSw2ICs0NTY5LDkgQEAKICAgICB1aW50MzJfdCAgICBpICAgICAgICAgICAgICA9IDA7CiAgICAgaW50MzJfdCAgICAgZXJyb3IgICAgICAgICAgPSAwOwogCisgICAgaWYgKGU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MDBfV1JJVEVfUkVHX0FSUkFZKGh3LCBSQSwgKGluZGV4IDw8IDEpLCByYXJfbG93KTsKICAgICBFMTAwMF9XUklURV9SRUdfQVJSQVkoaHcsIFJBLCAoKGluZGV4IDw8IDEpICsgMSksIHJhcl9oaWdoKTsKQEAgLTUzMzAsNiArNTkxMCw3IEBACiAgICAgICAgIGh3LT5idXNfd2lkdGggPSBlMTAwMF9idXNfd2lkdGhfcGNpZXhfMTsKICAgICAgICAgYnJlYWs7CiAgICAgY2FzZSBlMTAwMF84MjU3MToKKyAgICBjYXNlIGUxMDAwXzgwMDAzZXMybGFuOgogICAgICAgICBody0+YnVzX3R5cGUgPSBlMTAwMF9idXNfdHlwZV9wY2lfZXhwcmVzczsKICAgICAgICAgaHctPmJ1c19zcGVlZCA9IGUxMDAwX2J1c19zcGVlZF8yNTAwOwogICAgICAgICBody0+YnVzX3dpZHRoID0gZTEwMDBfYnVzX3dpZHRoX3BjaWV4XzQ7CkBAIC01NDc1LDYgKzYwNTYsMzQgQEAKICAgICAgICAgICAgIHJldHVybiAtRTEwMDBfRVJSX1BIWTsKICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICB9CisgICAgfSBlbHNlIGlmIChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X2dnODI1NjMpIHsKKyAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgR0c4MjU2M19QSFlfRFNQX0RJU1RBTkNFLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7CisgICAgICAgIGlmIChyZXRfdmFsKQorICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CisgICAgICAgIGNhYmxlX2xlbmd0aCA9IHBoeV9kYXRhICYgR0c4MjU2M19EU1BEX0NBQkxFX0xFTkdUSDsKKworICAgICAgICBzd2l0Y2ggKGNhYmxlX2xlbmd0aCkgeworICAgICAgICBjYXNlIGUxMDAwX2dnX2NhYmxlX2xlbmd0aF82MDoKKyAgICAgICAgICAgICptaW5fbGVuZ3RoID0gMDsKKyAgICAgICAgICAgICptYXhfbGVuZ3RoID0gZTEwMDBfaWdwX2NhYmxlX2xlbmd0aF82MDsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIGUxMDAwX2dnX2NhYmxlX2xlbmd0aF82MF8xMTU6CisgICAgICAgICAgICAqbWluX2xlbmd0aCA9IGUxMDAwX2lncF9jYWJsZV9sZW5ndGhfNjA7CisgICAgICAgICAgICAqbWF4X2xlbmd0aCA9IGUxMDAwX2lncF9jYWJsZV9sZW5ndGhfMTE1OworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgZTEwMDBfZ2dfY2FibGVfbGVuZ3RoXzExNV8xNTA6CisgICAgICAgICAgICAqbWluX2xlbmd0aCA9IGUxMDAwX2lncF9jYWJsZV9sZW5ndGhfMTE1OworICAgICAgICAgICAgKm1heF9sZW5ndGggPSBlMTAwMF9pZ3BfY2FibGVfbGVuZ3RoXzE1MDsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIGUxMDAwX2dnX2NhYmxlX2xlbmd0aF8xNTA6CisgICAgICAgICAgICAqbWluX2xlbmd0aCA9IGUxMDAwX2lncF9jYWJsZV9sZW5ndGhfMTUwOworICAgICAgICAgICAgKm1heF9sZW5ndGggPSBlMTAwMF9pZ3BfY2FibGVfbGVuZ3RoXzE4MDsKKyAgICAgICAgICAgIGJyZWFrOworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgcmV0dXJuIC1FMTAwMF9FUlJfUEhZOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KICAgICB9IGVsc2UgaWYoaHctPnBoeV90eXBlID09IGUxMDAwX3BoeV9pZ3ApIHsgLyogRm9yIElHUCBQSFkgKi8KICAgICAgICAgdWludDE2X3QgYWdjX3JlZ19hcnJheVtJR1AwMUUxMDAwX1BIWV9DSEFOTkVMX05VTV0gPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge0lHUDAxRTEwMDBfUEhZX0FHQ19BLApAQCAtNTU4NCw3ICs2MTkzLDggQEAKIAogICAgIERFQlVHRlVOQygiZTEwMDBfY2hlY2tfcG9sYXJpdHkiKTsKIAotICAgIGlmKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfbTg4KSB7CisgICAgaWYgKChody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X204OCkgfHwKKyAgICAgICAgKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfZ2c4MjU2MykpIHsKICAgICAgICAgLyogcmV0dXJuIHRoZSBQb2xhcml0eSBiaXQgaW4gdGhlIFN0YXR1cyByZWdpc3Rlci4gKi8KICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX1NQRUNfU1RBVFVTLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7CkBAIC01NjUzLDcgKzYyNjMsOCBAQAogICAgICAgICAgICAgcmV0dXJuIHJldF92YWw7CiAKICAgICAgICAgaHctPnNwZWVkX2Rvd25ncmFkZWQgPSAocGh5X2RhdGEgJiBJR1AwMUUxMDAwX1BMSFJfU1NfRE9XTkdSQURFKSA/IDEgOiAwOwotICAgIH0gZWxzZSBpZihody0+cGh5X3R5cGUgPT0gZTEwMDBfcGh5X204OCkgeworICAgIH0gZWxzZSBpZiAoKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfbTg4KSB8fAorICAgICAgICAgICAgICAgKGh3LT5waHlfdHlwZSA9PSBlMTAwMF9waHlfZ2c4MjU2MykpIHsKICAgICAgICAgcmV0X3ZhbCA9IGUxMDAwX3JlYWRfcGh5X3JlZyhodywgTTg4RTEwMDBfUEhZX1NQRUNfU1RBVFVTLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZwaHlfZGF0YSk7C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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBPYnRhaW5pbmcgc29mdHdhcmUgc2VtYXBob3JlIGJpdCAoU01CSSkgYmVmb3JlIHJlc2V0dGluZyBQSFkuCisgKgorICogaHc6IFN0cnVjdCBjb250YWluaW5nIHZhcmlhYmxlcyBhY2Nlc3NlZCBieSBzaGFyZWQgY29kZQorICoKKyAqIHJldHVybnM6IC0gRTEwMDBfRVJSX1JFU0VUIGlmIGZhaWwgdG8gb2J0YWluIHNlbWFwaG9yZS4KKyAqICAgICAgICAgICAgRTEwMDBfU1VDQ0VTUyBhdCBhbnkgb3RoZXIgY2FzZS4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50MzJfdAorZTEwMDBfZ2V0X3NvZnR3YXJlX3NlbWFwaG9yZShzdHJ1Y3QgZTEwMDBfaHcgKmh3KQoreworICAgIGludDMyX3QgdGltZW91dCA9IGh3LT5lZXByb20ud29yZF9zaXplICsgMTsKKyAgICB1aW50MzJfdCBzd3NtOworCisgICAgREVCVUdGVU5DKCJlMTAwMF9nZXRfc29mdHdhcmVfc2VtYXBob3JlIik7CisKKyAgICBpZiAoaHctPm1hY190eXBlICE9IGUxMDAwXzgwMDAzZXMybGFuKQorICAgICAgICByZXR1cm4gRTEwMDBfU1VDQ0VTUzsKKworICAgIHdoaWxlKHRpbWVvdXQpIHsKKyAgICAgICAgc3dzbSA9IEUxMDAwX1JFQURfUkVHKGh3LCBTV1NNKTsKKyAgICAgICAgLyogSWYgU01CSSBiaXQgY2xlYXJlZCwgaXQgaXMgbm93IHNldCBhbmQgd2UgaG9sZCB0aGUgc2VtYXBob3JlICovCisgICAgICAgIGlmKCEoc3dzbSAmIEUxMDAwX1NXU01fU01CSSkpCisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgbXNlY19kZWxheV9pcnEoMSk7CisgICAgICAgIHRpbWVvdXQtLTsKKyAgICB9CisKKyAgICBpZighdGltZW91dCkgeworICAgICAgICBERUJVR09VVCgiRHJpdmVyIGNhbid0IGFjY2VzcyBkZXZpY2UgLSBTTUJJIGJpdCBpcyBzZXQuXG4iKTsKKyAgICAgICAgcmV0dXJuIC1FMTAwMF9FUlJfUkVTRVQ7CisgICAgfQorCisgICAgcmV0dXJuIEUxMDAwX1NVQ0NFU1M7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBSZWxlYXNlIHNlbWFwaG9yZSBiaXQgKFNNQkkpLgorICoKKyAqIGh3OiBTdHJ1Y3QgY29udGFpbmluZyB2YXJpYWJsZXMgYWNjZXNzZWQgYnkgc2hhcmVkIGNvZGUKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZAorZTEwMDBfcmVsZWFzZV9zb2Z0d2FyZV9zZW1hcGhvcmUoc3RydWN0IGUxMDAwX2h3ICpodykKK3sKKyAgICB1aW50MzJfdCBzd3NtOworCisgICAgREVCVUdGVU5DKCJlMTAwMF9yZWxlYXNlX3NvZnR3YXJlX3NlbWFwaG9yZSIpOworCisgICAgaWYgKGh3LT5tYWNfdHlwZSAhPSBlMTAwMF84MDAwM2VzMmxhbikKKyAgICAgICAgcmV0dXJuOworCisgICAgc3dzbSA9IEUxMDAwX1JFQURfUkVHKGh3LCBTV1NNKTsKKyAgICAvKiBSZWxlYXNlIHRoZSBTVyBzZW1hcGhvcmVzLiovCisgICAgc3dzbSAmPSB+RTEwMDBfU1dTTV9TTUJJOworICAgIEUxMDAwX1dSSVRFX1JFRyhodywgU1dTTSwgc3dzbSk7Cit9CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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aWVzICsgT09NX1JFRklMTCk7CisJCQlzcGluX3VubG9jaygmbnAtPmxvY2spOworCQl9CisJCQorCQlpZiAoaSA+IG1heF9pbnRlcnJ1cHRfd29yaykgeworCQkJc3Bpbl9sb2NrKCZucC0+bG9jayk7CisJCQkvKiBkaXNhYmxlIGludGVycnVwdHMgb24gdGhlIG5pYyAqLworCQkJd3JpdGVsKE5WUkVHX0lSUV9SWF9BTEwsIGJhc2UgKyBOdlJlZ0lycU1hc2spOworCQkJcGNpX3B1c2goYmFzZSk7CisKKwkJCWlmICghbnAtPmluX3NodXRkb3duKSB7CisJCQkJbnAtPm5pY19wb2xsX2lycSB8PSBOVlJFR19JUlFfUlhfQUxMOworCQkJCW1vZF90aW1lcigmbnAtPm5pY19wb2xsLCBqaWZmaWVzICsgUE9MTF9XQUlUKTsKKwkJCX0KKwkJCXByaW50ayhLRVJOX0RFQlVHICIlczogdG9vIG1hbnkgaXRlcmF0aW9ucyAoJWQpIGluIG52X25pY19pcnFfcnguXG4iLCBkZXYtPm5hbWUsIGkpOworCQkJc3Bpbl91bmxvY2soJm5wLT5sb2NrKTsKKwkJCWJyZWFrOworCQl9CisKKwl9CisJZHByaW50ayhLRVJOX0RFQlVHICIlczogbnZfbmljX2lycV9yeCBjb21wbGV0ZWRcbiIsIGRldi0+bmFtZSk7CisKKwlyZXR1cm4gSVJRX1JFVFZBTChpKTsKK30KKworc3RhdGljIGlycXJldHVybl90IG52X25pY19pcnFfb3RoZXIoaW50IGZvbywgdm9pZCAqZGF0YSwgc3RydWN0IHB0X3JlZ3MgKnJlZ3MpCit7CisJc3RydWN0IG5ldF9kZXZpY2UgKmRldiA9IChzdHJ1Y3QgbmV0X2RldmljZSAqKSBkYXRhOworCXN0cnVjdCBmZV9wcml2ICpucCA9IG5ldGRldl9wcml2KGRldik7CisJdTggX19pb21lbSAqYmFzZSA9IGdldF9od2Jhc2UoZGV2KTsKKwl1MzIgZXZlbnRzOworCWludCBpOworCisJZHByaW50ayhLRVJOX0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VtYmVyLAorCQkJICAgICBpbnQgRmxhZ3MpOworc3RhdGljIGludCBTa0FkZHJYbWFjTWNVcGRhdGUoU0tfQUMgKnBBQywgU0tfSU9DIElvQywgU0tfVTMyIFBvcnROdW1iZXIpOworc3RhdGljIGludCBTa0FkZHJYbWFjUHJvbWlzY3VvdXNDaGFuZ2UoU0tfQUMgKnBBQywgU0tfSU9DIElvQywKKwkJCQkgICAgICAgU0tfVTMyIFBvcnROdW1iZXIsIGludCBOZXdQcm9tTW9kZSk7CisKIC8qIGZ1bmN0aW9ucyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTM3Miw3ICszODcsNyBAQAogICoJU0tfQUREUl9TVUNDRVNTCiAgKglTS19BRERSX0lMTEVHQUxfUE9SVAogICovCi1pbnQJU2tBZGRyWG1hY01jQ2xlYXIoCitzdGF0aWMgaW50CVNrQWRkclhtYWNNY0NsZWFyKAogU0tfQUMJKnBBQywJCS8qIGFkYXB0ZXIgY29udGV4dCAqLwogU0tfSU9DCUlvQywJCS8qIEkvTyBjb250ZXh0ICovCiBTS19VMzIJUG9ydE51bWJlciwJLyogSW5kZXggb2YgYWZmZWN0ZWQgcG9ydCAqLwpAQCAtNDI5LDcgKzQ0NCw3IEBACiAgKglTS19BRERSX1NVQ0NFU1MKICAqCVNLX0FERFJfSUxMRUdBTF9QT1JUCiAgKi8KLWludAlTa0FkZHJHbWFjTWNDbGVhcigKK3N0YXRpYyBpbnQJU2tBZGRyR21hY01jQ2xlYXIoCiBTS19BQwkqcEFDLAkJLyogYWRhcHRlciBjb250ZXh0ICovCiBTS19JT0MJSW9DLAkJLyogSS9PIGNvbnRleHQgKi8KIFNLX1UzMglQb3J0TnVtYmVyLAkvKiBJbmRleCBvZiBhZmZl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VzYyByeGZpZHNbTVBJX01BWF9GSURTXTsgLy8gcngvdHgvY29uZmlnIE1QSTM1MCBkZXNjcmlwdG9ycwogCUhvc3RUeERlc2MgdHhmaWRzW01QSV9NQVhfRklEU107CiAJSG9zdFJpZERlc2MgY29uZmlnX2Rlc2M7CkBAIC0xMjI5LDcgKzEyMTYsNiBAQAogc3RhdGljIGludCBmbGFzaHB1dGJ1ZihzdHJ1Y3QgYWlyb19pbmZvICphaSk7CiBzdGF0aWMgaW50IGZsYXNocmVzdGFydChzdHJ1Y3QgYWlyb19pbmZvICphaSxzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KTsKIAotI2lmZGVmIE1JQ1NVUFBPUlQKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNSUMgUk9VVElORVMgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTE2ODYsNyArMTY3Miw2IEBACiAJZGlnZXN0WzJdID0gKHZhbD4+OCkgJiAweEZGOwogCWRpZ2VzdFszXSA9IHZhbCAmIDB4RkY7CiB9Ci0jZW5kaWYKIAogc3RhdGljIGludCByZWFkQlNTTGlzdFJpZChzdHJ1Y3QgYWlyb19pbmZvICphaSwgaW50IGZpcnN0LAogCQkgICAgICBCU1NMaXN0UmlkICpsaXN0KSB7CkBAIC0yMDA1LDcgKzE5OTAsNiBAQAogCSAqIEZpcm13YXJlIGF1dG9tYXRpY2x5IHB1dHMgODAyIGhlYWRlciBvbiBzbwogCSAqIHdlIGRvbid0IG5lZWQgdG8gYWNjb3VudCBmb3IgaXQgaW4gdGhlIGxlbmd0aAogCSAqLwotI2lmZGVmIE1JQ1NVUFBPUlQKIAlpZiAodGVzdF9iaXQoRkxBR19NSUNf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gMQotI2RlZmluZSBBVVRIX0lHTk9SRSAgICAgMworI2RlZmluZSBBVVRIX09QRU4JMAorI2RlZmluZSBBVVRIX1NIQVJFRF9LRVkJMQorI2RlZmluZSBBVVRIX0xFQVAJMgorI2RlZmluZSBBVVRIX0lHTk9SRQkzCiAKICNkZWZpbmUgSENfQVNTT0NJQVRFICAgICAgMAogI2RlZmluZSBIQ19SRUFTU09DSUFURSAgICAxCkBAIC0xODYwLDcgKzE4NzEsNyBAQAogCXU4IGNtZDsKIAl1OCBsZW47CiAJdTE2IHJlc2VydmVkOwotCXUzMiBwYXJhbVtURkRfQ01EX0lNTUVESUFURV9QQVlMT0FEX0xFTkdUSF07CisJdTMyICpwYXJhbTsKIH0gX19hdHRyaWJ1dGVfXyAoKHBhY2tlZCkpOwogCiBzdHJ1Y3QgaXB3X2NtZF9sb2cgewpAQCAtMTg2OSwyMSArMTg4MCwyNCBAQAogCXN0cnVjdCBob3N0X2NtZCBjbWQ7CiB9OwogCi0jZGVmaW5lIENGR19CVF9DT0VYSVNURU5DRV9NSU4gICAgICAgICAgICAgICAgICAweDAwCi0jZGVmaW5lIENGR19CVF9DT0VYSVNURU5DRV9ERUZFUiAgICAgICAgICAgICAgICAweDAyCi0jZGVmaW5lIENGR19CVF9DT0VYSVNURU5DRV9LSUxMICAgICAgICAgICAgICAgICAweDA0Ci0jZGVmaW5lIENGR19CVF9DT0VYSVNURU5DRV9XTUVfT1ZFUl9CVCAgICAgICAgICAweDA4Ci0jZGVmaW5lIENGR19CVF9DT0VYSVNURU5DRV9PT0IgICAgICAgICAgICAgICAgICAweDEwCi0jZGVmaW5lIENGR19CVF9DT0VYSVNURU5DRV9NQVggICAgICAgICAgICAgICAgICAweEZGCi0jZGVmaW5lIENGR19CVF9DT0VYSVNURU5DRV9ERUYgICAgICAgICAgICAgICAgICAweDgwCS8qIHJlYWQgQnQgZnJvbSBFRVBST00gKi8KKy8qIFN5c0NvbmZpZyBjb21tYW5kIHBhcmFtZXRlcnMgLi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ICAgICAgICAgICAgICAgICAgICBgLS0tLS4tLS0tJwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICAgICAgLi0gJ0ZyYW1lIGRhdGEnIGV4cGFuZHMgdG8gPC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLScKKyAgICAgICAuLSAnRnJhbWUgZGF0YScgZXhwYW5kcywgaWYgV0VQIGVuYWJsZWQsIHRvIDwtLS0tLS0tLS0tJworICAgICAgIHwKKyAgICAgICBWCisgICAgICAsLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0uCitCeXRlcyB8ICA0ICB8ICAgMC0yMjk2ICB8ICA0ICB8CisgICAgICB8LS0tLS18LS0tLS0tLS0tLS18LS0tLS18CitEZXNjLiB8IElWICB8IEVuY3J5cHRlZCB8IElDViB8CisgICAgICB8ICAgICB8IFBhY2tldCAgICB8ICAgICB8CisgICAgICBgLS0tLS18ICAgICAgICAgICB8LS0tLS0nCisgICAgICAgICAgICBgLS0tLS0uLS0tLS0nCisgICAgICAgICAgICAgICAgICB8CisgICAgICAgLi0gJ0VuY3J5cHRlZCBQYWNrZXQnIGV4cGFuZHMgdG8KICAgICAgICB8CiAgICAgICAgVgogICAgICAgLC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS4KQEAgLTY1LDE4ICs3Niw3IEBACiBEZXNjLiB8IFNOQVAgfCBTTkFQIHwgQ29udHJvbCB8RXRoIFR1bm5lbHwgVHlwZSB8IElQICAgICAgfAogICAgICAgfCBEU0FQIHwgU1NBUCB8ICAgICAgICAgfCAgICAgICAgICB8ICAgICAgfCBQYWNrZXQgIHwKICAgICAgIHwgMHhBQSB8IDB4QUEgfDB4MDMgKFVJKXwweDAwLTAwLUY4fCAgICAgIHwgICAgICAgICB8Ci0gICAgICBgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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