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gICAgICAgKi8KKwkweEZGMDAsCQkJLyogTUkgPT0gTiBzZXQgICAgICAgICAgICAqLworCTB4MDBGRiwJCQkvKiBQTCAgICAgICAgICAgICAgICAgICAgICovCisJMHhBQUFBLAkJCS8qIFZTID09IFYgc2V0ICAgICAgICAgICAgKi8KKwkweDU1NTUsCQkJLyogVkMgICAgICAgICAgICAgICAgICAgICAqLworCTB4MEMwQywJCQkvKiBISSA9PSBDIHNldCAmJiBaIGNsZWFyICovCisJMHhGM0YzLAkJCS8qIExTID09IEMgY2xlYXIgfHwgWiBzZXQgKi8KKwkweEFBNTUsCQkJLyogR0UgPT0gKE49PVYpICAgICAgICAgICAqLworCTB4NTVBQSwJCQkvKiBMVCA9PSAoTiE9VikgICAgICAgICAgICovCisJMHgwQTA1LAkJCS8qIEdUID09ICghWiAmJiAoTj09VikpICAgKi8KKwkweEY1RkEsCQkJLyogTEUgPT0gKFogfHwgKE4hPVYpKSAgICAqLworCTB4RkZGRiwJCQkvKiBBTCBhbHdheXMgICAgICAgICAgICAgICovCisJMAkJCS8qIE5WICAgICAgICAgICAgICAgICAgICAgKi8KK307CisKKy8qCisgKiBSZXR1cm5zOgorICogQVJNX09QQ09ERV9DT05EVEVTVF9GQUlMICAgLSBpZiBjb25kaXRpb24gZmFpbHMKKyAqIEFSTV9PUENPREVfQ09ORFRFU1RfUEFTUyAgIC0gaWYgY29uZGl0aW9uIHBhc3NlcyAoaW5jbHVkaW5nIEFMKQorICogQVJNX09QQ09ERV9DT05EVEVTVF9VTkNPTkQgLSBpZiBOViBjb25kaXRpb24sIG9yIHNlcGFyYXRlIHVuY29uZGl0aW9uYWwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3Bjb2RlIHNwYWNlIGZyb20gdjUgb253YXJkcworICoKKyAqIENvZGUgdGhhdCB0ZXN0cyB3aGV0aGVyIGEgY29uZGl0aW9uYWwgaW5zdHJ1Y3Rpb24gd291bGQgcGFzcyBpdHMgY29uZGl0aW9uCisgKiBj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LAorCS5pcnFfbWFzawk9IGludDFfbWFzaywKKwkuaXJxX3VubWFzawk9IGludDFfdW5tYXNrLAorfTsKKworc3RhdGljIHZvaWQgaW50Ml9tYXNrKHN0cnVjdCBpcnFfZGF0YSAqZCkKK3sKKwl1MzIgaW50bXIyOworCisJaW50bXIyID0gY2xwc19yZWFkbChJTlRNUjIpOworCWludG1yMiAmPSB+KDEgPDwgKGQtPmlycSAtIDE2KSk7CisJY2xwc193cml0ZWwoaW50bXIyLCBJTlRNUjIpOworfQorCitzdGF0aWMgdm9pZCBpbnQyX2FjayhzdHJ1Y3QgaXJxX2RhdGEgKmQpCit7CisJdTMyIGludG1yMjsKKworCWludG1yMiA9IGNscHNfcmVhZGwoSU5UTVIyKTsKKwlpbnRtcjIgJj0gfigxIDw8IChkLT5pcnEgLSAxNikpOworCWNscHNfd3JpdGVsKGludG1yMiwgSU5UTVIyKTsKKworCXN3aXRjaCAoZC0+aXJxKSB7CisJY2FzZSBJUlFfS0JESU5UOiBjbHBzX3dyaXRlbCgwLCBLQkRFT0kpOyBicmVhazsKKwl9Cit9CisKK3N0YXRpYyB2b2lkIGludDJfdW5tYXNrKHN0cnVjdCBpcnFfZGF0YSAqZCkKK3sKKwl1MzIgaW50bXIyOworCisJaW50bXIyID0gY2xwc19yZWFkbChJTlRNUjIpOworCWludG1yMiB8PSAxIDw8IChkLT5pcnEgLSAxNik7CisJY2xwc193cml0ZWwoaW50bXIyLCBJTlRNUjIpOworfQorCitzdGF0aWMgc3RydWN0IGlycV9jaGlwIGludDJfY2hpcCA9IHsKKwkuaXJxX2Fjawk9IGludDJfYWNrLAorCS5pcnFfbWFzawk9IGludDJfbWFzaywKKwkuaXJxX3VubWFzawk9IGludDJfdW5tYXNrLAorfTsKKwordm9pZCBfX2luaXQgY2xwczcxMXhfaW5pdF9pcnEodm9pZCkKK3sKKwl1bnNpZ25lZCBpbnQgaTsKKworCWZvciAoaSA9IDA7IGkgPCBOUl9JUlFTOyBpKyspIHsKKwkgICA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IHN0YXRpYyBjaGFyIHNfaHAzNDBbXSBfX2luaXRkYXRhID0gIjM0MCI7CmRpZmYgLS1naXQgYS9hcmNoL202OGsvaW5jbHVkZS9hc20vYW5jaG9yLmggYi9hcmNoL202OGsvaW5jbHVkZS9hc20vYW5jaG9yLmgKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDg3MWMwZDUuLjAwMDAwMDAKLS0tIGEvYXJjaC9tNjhrL2luY2x1ZGUvYXNtL2FuY2hvci5oCisrKyAvZGV2L251bGwKQEAgLTEsMTEyICswLDAgQEAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKgotICoJYW5jaG9yLmggLS0gQW5jaG9yIENPLU1FTSBMaXRlIFBDSSBob3N0IGJyaWRnZSBwYXJ0LgotICoKLSAqCShDKSBDb3B5cmlnaHQgMjAwMCwgTW9yZXRvbiBCYXkgKHd3dy5tb3JldG9uLmNvbS5hdSkKLSAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNpZm5kZWYJYW5jaG9yX2gKLSNkZWZpbmUJYW5jaG9yX2gKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKgotICoJRGVmaW5lIGJhc2ljIGFkZHJlc3NpbmcgaW5mby4KLSAqLwotI2lmIGRlZmluZWQoQ09ORklHX001NDA3QzMpCi0jZGVmaW5lCUNPTUVNX0JBU0UJMHhGRkZGMDAwMAkvKiBCYXNlIG9mIENPLU1FTSBhZGRyZXNzIHNwYWNlICovCi0jZGVmaW5lCUNPTUVNX0lSUQkyNQkJLyogSVJRIG9mIGFuY2hvciBwYXJ0ICovCi0jZWxzZQotI2RlZmluZQlDT01FTV9CQV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BnZDsKKwlwbWRfdCAqcG1kOworCXB0ZV90ICpwdGU7CisJdW5zaWduZWQgbG9uZyBtbXVhcjsKKworCWxvY2FsX2lycV9zYXZlKGZsYWdzKTsKKwltbXVhciA9IHRhc2stPnRocmVhZC5rc3A7CisKKwkvKiBTZWFyY2ggZm9yIGEgdmFsaWQgVExCIGVudHJ5LCBpZiBvbmUgaXMgZm91bmQsIGRvbid0IHJlbWFwICovCisJbW11X3dyaXRlKE1NVUFSLCBtbXVhcik7CisJbW11X3dyaXRlKE1NVU9SLCBNTVVPUl9TVExCIHwgTU1VT1JfQURSKTsKKwlpZiAobW11X3JlYWQoTU1VU1IpICYgTU1VU1JfSElUKQorCQlnb3RvIGVuZDsKKworCWlmIChtbXVhciA+PSBQQUdFX09GRlNFVCkgeworCQltbSA9ICZpbml0X21tOworCX0gZWxzZSB7CisJCXByX2luZm8oImxvYWRfa3NwX21tdTogbm9uLWtlcm5lbCBtbSBmb3VuZDogMHglcFxuIiwgdGFzay0+bW0pOworCQltbSA9IHRhc2stPm1tOworCX0KKworCWlmICghbW0pCisJCWdvdG8gYnVnOworCisJcGdkID0gcGdkX29mZnNldChtbSwgbW11YXIpOworCWlmIChwZ2Rfbm9uZSgqcGdkKSkKKwkJZ290byBidWc7CisKKwlwbWQgPSBwbWRfb2Zmc2V0KHBnZCwgbW11YXIpOworCWlmIChwbWRfbm9uZSgqcG1kKSkKKwkJZ290byBidWc7CisKKwlwdGUgPSAobW11YXIgPj0gUEFHRV9PRkZTRVQpID8gcHRlX29mZnNldF9rZXJuZWwocG1kLCBtbXVhcikKKwkJCQkgICAgIDogcHRlX29mZnNldF9tYXAocG1kLCBtbXVhcik7CisJaWYgKHB0ZV9ub25lKCpwdGUpIHx8ICFwdGVfcHJlc2VudCgqcHRlKSkKKwkJZ290byBidWc7CisKKwlzZXRfcHRlKHB0ZSwgcHRlX21reW91bmcoKnB0ZSkpOworCWFzaWQgPSBtbS0+Y29udGV4dCAmIDB4ZmY7CisJaWYgKC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S9hcmNoL202OGsvaW5jbHVkZS9hc20vc2V0dXAuaAorKysgYi9hcmNoL202OGsvaW5jbHVkZS9hc20vc2V0dXAuaApAQCAtNDAsNiArNDAsNyBAQAogI2RlZmluZSBNQUNIX0hQMzAwICAgIDkKICNkZWZpbmUgTUFDSF9RNDAgICAgIDEwCiAjZGVmaW5lIE1BQ0hfU1VOM1ggICAxMQorI2RlZmluZSBNQUNIX001NFhYICAgMTIKIAogI2RlZmluZSBDT01NQU5EX0xJTkVfU0laRSAyNTYKIApAQCAtMjExLDIzICsyMTIsMjcgQEAKICNkZWZpbmUgQ1BVQl82ODAzMCAgICAgMQogI2RlZmluZSBDUFVCXzY4MDQwICAgICAyCiAjZGVmaW5lIENQVUJfNjgwNjAgICAgIDMKKyNkZWZpbmUgQ1BVQl9DT0xERklSRSAgNAogCiAjZGVmaW5lIENQVV82ODAyMCAgICAgICgxPDxDUFVCXzY4MDIwKQogI2RlZmluZSBDUFVfNjgwMzAgICAgICAoMTw8Q1BVQl82ODAzMCkKICNkZWZpbmUgQ1BVXzY4MDQwICAgICAgKDE8PENQVUJfNjgwNDApCiAjZGVmaW5lIENQVV82ODA2MCAgICAgICgxPDxDUFVCXzY4MDYwKQorI2RlZmluZSBDUFVfQ09MREZJUkUgICAoMTw8Q1BVQl9DT0xERklSRSkKIAogI2RlZmluZSBGUFVCXzY4ODgxICAgICAwCiAjZGVmaW5lIEZQVUJfNjg4ODIgICAgIDEKICNkZWZpbmUgRlBVQl82ODA0MCAgICAgMiAgICAgICAgICAgICAgICAgICAgICAgLyogSW50ZXJuYWwgRlBVICovCiAjZGVmaW5lIEZQVUJfNjgwNjAgICAgIDMgICAgICAgICAgICAgICAgICAgICAgIC8qIEludGVybmFsIEZQVSAqLwogI2RlZmluZSBGUFVCX1NVTkZQQSAgICA0ICAgICAgICAgICAgICAgICAgICAgICAvKiBTdW4tMyBGUEEgKi8KKyNkZWZpbmUgRlBVQl9DT0xERklSRSAgNSAgICAgICAgICAgICAgICAgIC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jay1mcmVxdWVuY3kgPSA8MTAwMDAwMDAwPjsKKworCQkJVUFSVDA6IHNlcmlhbEAxMDAwMDAwMCB7CisJCQkJZGV2aWNlX3R5cGUgPSAic2VyaWFsIjsKKwkJCQljb21wYXRpYmxlID0gIm5zMTY3NTAiLCAibnMxNjU1MCI7CisJCQkJcmVnID0gPDB4MTAwMDAwMDAgMHgwMDAwMDAwOD47CisJCQkJdmlydHVhbC1yZWcgPSA8MHhlMTAwMDAwMD47CisJCQkJY2xvY2stZnJlcXVlbmN5ID0gPDE4NTE4NTE+OyAvLyBQQ0llIHJlZmNsay9NQ0dDMF9DVExbVUFSVF0KKwkJCQljdXJyZW50LXNwZWVkID0gPDExNTIwMD47CisJCQkJaW50ZXJydXB0LXBhcmVudCA9IDwmTVBJQz47CisJCQkJaW50ZXJydXB0cyA9IDwzNCAyPjsKKwkJCX07CisKKwkJCUlJQzA6IGkyY0AwMDAwMDAwMCB7CisJCQkJY29tcGF0aWJsZSA9ICJpYm0saWljLWN1cnJpdHVjayIsICJpYm0saWljIjsKKwkJCQlyZWcgPSA8MHgwIDB4MDAwMDAwMTQ+OworCQkJCWludGVycnVwdC1wYXJlbnQgPSA8Jk1QSUM+OworCQkJCWludGVycnVwdHMgPSA8NzkgMj47CisJCQkJI2FkZHJlc3MtY2VsbHMgPSA8MT47CisJCQkJI3NpemUtY2VsbHMgPSA8MD47CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJ0Y0A2OCB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29tcGF0aWJsZSA9ICJzdG0sbTQxdDgwIiwgIm00MXN0ODUiOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlZyA9IDwweDY4PjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfTsKKwkJCX07CisJCX07CisKKwkJUENJRTA6IHBjaWV4QDEwMTAwMDAwMDAwIHsJCS8vIDR4R0JJRjEKKwkJCWRld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8MHg0NjAwMCAweDEwMDA+OworCX07CisJZGNzci1jcHUtc2ItcHJveHlANDcwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxkY3NyLWU1MDBtYy1zYi1wcm94eSIsICJmc2wsZGNzci1jcHUtc2ItcHJveHkiOworCQljcHUtaGFuZGxlID0gPCZjcHU3PjsKKwkJcmVnID0gPDB4NDcwMDAgMHgxMDAwPjsKKwl9OworCit9OworCismc29jIHsKKwkjYWRkcmVzcy1jZWxscyA9IDwxPjsKKwkjc2l6ZS1jZWxscyA9IDwxPjsKKwlkZXZpY2VfdHlwZSA9ICJzb2MiOworCWNvbXBhdGlibGUgPSAic2ltcGxlLWJ1cyI7CisKKwlzb2Mtc3JhbS1lcnJvciB7CisJCWNvbXBhdGlibGUgPSAiZnNsLHNvYy1zcmFtLWVycm9yIjsKKwkJaW50ZXJydXB0cyA9IDwxNiAyIDEgMjk+OworCX07CisKKwljb3JlbmV0LWxhd0AwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wsY29yZW5ldC1sYXciOworCQlyZWcgPSA8MHgwIDB4MTAwMD47CisJCWZzbCxudW0tbGF3cyA9IDwzMj47CisJfTsKKworCWRkcjE6IG1lbW9yeS1jb250cm9sbGVyQDgwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxxb3JpcS1tZW1vcnktY29udHJvbGxlci12NC40IiwgImZzbCxxb3JpcS1tZW1vcnktY29udHJvbGxlciI7CisJCXJlZyA9IDwweDgwMDAgMHgxMDAwPjsKKwkJaW50ZXJydXB0cyA9IDwxNiAyIDEgMjM+OworCX07CisKKwljcGM6IGwzLWNhY2hlLWNvbnRyb2xsZXJAMTAwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxwMzA2MC1sMy1jYWNoZS1jb250cm9sbGVyIiwgImNhY2hlIjsKKwkJcmVnID0gPDB4MTAwMDAgMHgxMDAwCisJCSAgICAgICAweDExMDAwIDB4MTAwMD47CisJCWludGVycnVwdHMgPSA8MTYgMiAxIDI3CisJCQkg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2Mtc3JhbS1lcnJvciB7CisJCWNvbXBhdGlibGUgPSAiZnNsLHNvYy1zcmFtLWVycm9yIjsKKwkJaW50ZXJydXB0cyA9IDwxNiAyIDEgMjk+OworCX07CisKKwljb3JlbmV0LWxhd0AwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wsY29yZW5ldC1sYXciOworCQlyZWcgPSA8MHgwIDB4MTAwMD47CisJCWZzbCxudW0tbGF3cyA9IDwzMj47CisJfTsKKworCWRkcjE6IG1lbW9yeS1jb250cm9sbGVyQDgwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxxb3JpcS1tZW1vcnktY29udHJvbGxlci12NC40IiwgImZzbCxxb3JpcS1tZW1vcnktY29udHJvbGxlciI7CisJCXJlZyA9IDwweDgwMDAgMHgxMDAwPjsKKwkJaW50ZXJydXB0cyA9IDwxNiAyIDEgMjM+OworCX07CisKKwlkZHIyOiBtZW1vcnktY29udHJvbGxlckA5MDAwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wscW9yaXEtbWVtb3J5LWNvbnRyb2xsZXItdjQuNCIsImZzbCxxb3JpcS1tZW1vcnktY29udHJvbGxlciI7CisJCXJlZyA9IDwweDkwMDAgMHgxMDAwPjsKKwkJaW50ZXJydXB0cyA9IDwxNiAyIDEgMjI+OworCX07CisKKwljcGM6IGwzLWNhY2hlLWNvbnRyb2xsZXJAMTAwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxwNDA4MC1sMy1jYWNoZS1jb250cm9sbGVyIiwgImNhY2hlIjsKKwkJcmVnID0gPDB4MTAwMDAgMHgxMDAwCisJCSAgICAgICAweDExMDAwIDB4MTAwMD47CisJCWludGVycnVwdHMgPSA8MTYgMiAxIDI3CisJCQkgICAgICAxNiAyIDEgMjY+OworCX07CisKKwljb3JlbmV0LWNmQDE4MDAwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wsY29yZW5ldC1jZiI7CisJCXJlZyA9IDwweDE4MDAwIDB4MTAwMD47CisJCWludGVycnVwd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REVWX0JTRyBpcyBub3Qgc2V0CisjIENPTkZJR19XQUxOVVQgaXMgbm90IHNldAorQ09ORklHX09CUzYwMD15CitDT05GSUdfTk9fSFo9eQorQ09ORklHX0hJR0hfUkVTX1RJTUVSUz15CitDT05GSUdfTUFUSF9FTVVMQVRJT049eQorQ09ORklHX05FVD15CitDT05GSUdfUEFDS0VUPXkKK0NPTkZJR19VTklYPXkKK0NPTkZJR19JTkVUPXkKK0NPTkZJR19JUF9QTlA9eQorQ09ORklHX0lQX1BOUF9ESENQPXkKK0NPTkZJR19JUF9QTlBfQk9PVFA9eQorIyBDT05GSUdfSU5FVF9YRlJNX01PREVfVFJBTlNQT1JUIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORVRfWEZSTV9NT0RFX1RVTk5FTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkVUX1hGUk1fTU9ERV9CRUVUIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORVRfTFJPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lQVjYgaXMgbm90IHNldAorQ09ORklHX1VFVkVOVF9IRUxQRVJfUEFUSD0iL3NiaW4vaG90cGx1ZyIKK0NPTkZJR19DT05ORUNUT1I9eQorQ09ORklHX01URD15CitDT05GSUdfTVREX0NNRExJTkVfUEFSVFM9eQorQ09ORklHX01URF9PRl9QQVJUUz15CitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTE9DSz15CitDT05GSUdfTVREX0NGST15CitDT05GSUdfTVREX0pFREVDUFJPQkU9eQorQ09ORklHX01URF9DRklfQU1EU1REPXkKK0NPTkZJR19NVERfUEhZU01BUF9PRj15CitDT05GSUdfTVREX05BTkQ9eQorQ09ORklHX01URF9OQU5EX05ERkM9eQorQ09ORklHX1BST0NfREVWSUNFVFJFRT15CitDT05GSUdfQkxLX0RFVl9SQU09eQorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9MzUwMDAKK0NPTkZJR19ORVRERVZJQ0VTPXkKK0NPTkZJR19JQ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klMVEVSX1hUX01BVENIX0hBU0hMSU1JVD1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0hFTFBFUj1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX0lQUkFOR0U9bQorQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9MRU5HVEg9bQorQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9MSU1JVD1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX01BQz1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX01BUks9bQorQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9NVUxUSVBPUlQ9bQorQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9PV05FUj1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1BPTElDWT1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1BLVFRZUEU9bQorQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9RVU9UQT1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1JBVEVFU1Q9bQorQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9SRUFMTT1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1JFQ0VOVD1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1NDVFA9bQorQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9TVEFURT1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1NUQVRJU1RJQz1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1NUUklORz1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1RDUE1TUz1tCitDT05GSUdfTkVURklMVEVSX1hUX01BVENIX1RJTUU9bQorQ09ORklHX05FVEZJTFRFUl9YVF9NQVRDSF9VMzI9bQorQ09ORklHX05GX0NPTk5UUkFDS19JUFY0PW0KK0NPTkZJR19JUF9ORl9RVUVVRT1tCitDT05GSUdfSVBfTkZfSVBUQUJMRVM9bQorQ09ORklHX0lQX05GX01BVENIX0FIPW0KK0NPTkZJR19JUF9ORl9NQVRDSF9FQ049bQorQ09ORklHX0lQX05GX01BVENIX1RUTD1tCitDT05GSUdfSVBfTkZfRklMVEVSPW0KK0NPTkZJR19JUF9ORl9UQVJHRVRfUkVKRUNUPW0KK0NPTkZJR19JUF9ORl9UQVJHRVRfTE9HPW0KK0NPTkZJR19JUF9ORl9UQVJHRVRfVUxPRz1tCitDT05GSUdfTkZfTkFUPW0KK0NPTkZJR19JUF9ORl9UQVJHRVRfTUFTUVVFUkFERT1tCitDT05GSUdfSVBfTkZfVEFSR0VUX05FVE1BUD1tCitDT05GSUdfSVBfTkZfVEFSR0VUX1JFRElSRUNUPW0KK0NPTkZJR19ORVRfVENQUFJPQkU9eQorIyBDT05GSUdfV0lSRUxFU1MgaXMgbm90IHNldAorQ09ORklHX05FVF85UD15CitDT05GSUdfTkVUXzlQX0RFQlVHPXkKK0NPTkZJR19VRVZFTlRfSEVMUEVSX1BBVEg9Ii9zYmluL2hvdHBsdWciCitDT05GSUdfREVWVE1QRlM9eQorQ09ORklHX01URD15CitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTE9DSz15CitDT05GSUdfTVREX0NGST15CitDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUz15CitDT05GSUdfTVREX0NGSV9MRV9CWVRFX1NXQVA9eQorQ09ORklHX01URF9DRklfSU5URUxFWFQ9eQorQ09ORklHX01URF9DRklfQU1EU1REPXkKK0NPTkZJR19NVERfQ0ZJX1NUQUE9eQorQ09ORklHX01URF9QSFlTTUFQX09GPXkKK0NPTkZJR19QUk9DX0RFVklDRVRSRUU9eQorQ09ORklHX0JMS19ERVZfTE9PUD15CitDT05GSUdfQkxLX0RFVl9DUllQVE9MT09QPXkKK0NPTkZJR19CTEtfREVWX05CRD1tCitDT05GSUdfQkxLX0RFVl9SQU09eQorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9NjU1MzYKK0NPTkZJR19DRFJPTV9QS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J0aXRpb25fYWRkcmVzc19yZWdpb25faW5mbywgICAxLCA1LCAgIDYgKQogTFYxX0NBTEwoc2VsZWN0X3ZpcnR1YWxfYWRkcmVzc19zcGFjZSwgICAgICAgICAgICAgICAgICAxLCAwLCAgIDcgKQogTFYxX0NBTEwocGF1c2UsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLCAwLCAgIDkgKQpAQCAtMjY0LDcgKzI2NCw3IEBACiBMVjFfQ0FMTChnZXRfc3BlX2lycV9vdXRsZXQsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDEsICA3OCApCiBMVjFfQ0FMTChzZXRfc3BlX3ByaXZpbGVnZV9zdGF0ZV9hcmVhXzFfcmVnaXN0ZXIsICAgICAgIDMsIDAsICA3OSApCiBMVjFfQ0FMTChjcmVhdGVfcmVwb3NpdG9yeV9ub2RlLCAgICAgICAgICAgICAgICAgICAgICAgIDYsIDAsICA5MCApCi1MVjFfQ0FMTChnZXRfcmVwb3NpdG9yeV9ub2RlX3ZhbHVlLCAgICAgICAgICAgICAgICAgICAgIDUsIDIsICA5MSApCitMVjFfQ0FMTChyZWFkX3JlcG9zaXRvcnlfbm9kZSwgICAgICAgICAgICAgICAgICAgICAgICAgIDUsIDIsICA5MSApCiBMVjFfQ0FMTChtb2RpZnlfcmVwb3NpdG9yeV9ub2RlX3ZhbHVlLCAgICAgICAgICAgICAgICAgIDYsIDAsICA5MiApCiBMVjFfQ0FMTChyZW1vdmVfcmVwb3NpdG9yeV9ub2RlLCAgICAgICAgICAgICAgICAgICAgICAgIDQsIDAsICA5MyApCiBMVjFfQ0FMTChyZWFkX2h0YWJfZW50cmllcywgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDUsICA5NSApCkBAIC0yNzYsNyArMjc2LDcgQEAKIExWMV9DQUxMKGRlc3RydWN0X2lvX2lycV9vdXRsZXQsICAgICAgICAgICAgICAgICAgICAgICAgMSwgMCwgMTIxICkKIExWMV9DQUxMKG1hcF9odGFiLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgMSwgMTIyICkKIExWMV9DQUxMKHVubWFwX2h0YWIsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgMCwgMTIzICkKLUxWMV9DQUxMKGdldF92ZXJzaW9uX2luZm8sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMSwgMTI3ICkKK0xWMV9DQUxMKGdldF92ZXJzaW9uX2luZm8sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMiwgMTI3ICkKIExWMV9DQUxMKGluc2VydF9odGFiX2VudHJ5LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNiwgMywgMTU4ICkKIExWMV9DQUxMKHJlYWRfdmlydHVhbF91YXJ0LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMywgMSwgMTYyICkKIExWMV9DQUxMKHdyaXRlX3ZpcnR1YWxfdWFydCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMywgMSwgMTYzICkKQEAgLTI5NCw5ICsyOTQsOSBAQAogTFYxX0NBTEwobmV0X2FkZF9tdWx0aWNhc3RfYWRkcmVzcywgICAgICAgICAgICAgICAgICAgICA0LCAwLCAxODUgKQogTFYxX0NBTEwobmV0X3JlbW92ZV9tdWx0aWNhc3RfYWRkcmVzcywgICAgICAgICAgICAgICAgICA0LCAwLCAxODYgKQogTFYxX0NBTEwobmV0X3N0YXJ0X3R4X2RtYSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0LCAwLCAxODcgKQotTFYxX0NBTEwobmV0X3N0b3BfdHhfZG1hLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzLCAwLCAxODggKQorTFYxX0NBTEwobmV0X3N0b3BfdHhfZG1hLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyLCAwLCAxODggKQogTFYxX0NBTEwobmV0X3N0YXJ0X3J4X2RtYSwgICAgICAgICAgICAgICAgICAgICAgICAgIC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hc3M7CisJdWludDY0X3QgY29ycmVsYXRvcjsKKworCS8vUDdJT0MgTU1JTyBFcnJvciBSZWdzCisJdWludDY0X3QgcDdpb2NQbHNzcjsgICAgICAgICAgICAgICAgLy8gbjEyMAorCXVpbnQ2NF90IHA3aW9jQ3NyOyAgICAgICAgICAgICAgICAgIC8vIG4xMTAKKwl1aW50NjRfdCBsZW1GaXI7ICAgICAgICAgICAgICAgICAgICAvLyBuQzAwCisJdWludDY0X3QgbGVtRXJyb3JNYXNrOyAgICAgICAgICAgICAgLy8gbkMxOAorCXVpbnQ2NF90IGxlbVdPRjsgICAgICAgICAgICAgICAgICAgIC8vIG5DNDAKKwl1aW50NjRfdCBwaGJFcnJvclN0YXR1czsgICAgICAgICAgICAvLyBuQzgwCisJdWludDY0X3QgcGhiRmlyc3RFcnJvclN0YXR1czsgICAgICAgLy8gbkM4OAorCXVpbnQ2NF90IHBoYkVycm9yTG9nMDsgICAgICAgICAgICAgIC8vIG5DQzAKKwl1aW50NjRfdCBwaGJFcnJvckxvZzE7ICAgICAgICAgICAgICAvLyBuQ0M4CisJdWludDY0X3QgbW1pb0Vycm9yU3RhdHVzOyAgICAgICAgICAgLy8gbkQwMAorCXVpbnQ2NF90IG1taW9GaXJzdEVycm9yU3RhdHVzOyAgICAgIC8vIG5EMDgKKwl1aW50NjRfdCBtbWlvRXJyb3JMb2cwOyAgICAgICAgICAgICAvLyBuRDQwCisJdWludDY0X3QgbW1pb0Vycm9yTG9nMTsgICAgICAgICAgICAgLy8gbkQ0OAorCXVpbnQ2NF90IGRtYTBFcnJvclN0YXR1czsgICAgICAgICAgIC8vIG5EODAKKwl1aW50NjRfdCBkbWEwRmlyc3RFcnJvclN0YXR1czsgICAgICAvLyBuRDg4CisJdWludDY0X3QgZG1hMEVycm9yTG9nMDsgICAgICAgICAgICAgLy8gbkRDMAorCXVpbnQ2NF90IGRtYTBFcnJvckxvZzE7ICAgICAgICAgICAgIC8vIG5EQzgKKwl1aW50NjRfdCBkbWExR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50IG5ld19jb3BfcGlkKHN0cnVjdCBpZGEgKmlkYSwgaW50IG1pbl9pZCwgaW50IG1heF9pZCwKKwkJICAgICAgIHNwaW5sb2NrX3QgKmxvY2spCit7CisJaW50IGluZGV4OworCWludCBlcnI7CisKK2FnYWluOgorCWlmICghaWRhX3ByZV9nZXQoaWRhLCBHRlBfS0VSTkVMKSkKKwkJcmV0dXJuIC1FTk9NRU07CisKKwlzcGluX2xvY2sobG9jayk7CisJZXJyID0gaWRhX2dldF9uZXdfYWJvdmUoaWRhLCBtaW5faWQsICZpbmRleCk7CisJc3Bpbl91bmxvY2sobG9jayk7CisKKwlpZiAoZXJyID09IC1FQUdBSU4pCisJCWdvdG8gYWdhaW47CisJZWxzZSBpZiAoZXJyKQorCQlyZXR1cm4gZXJyOworCisJaWYgKGluZGV4ID4gbWF4X2lkKSB7CisJCXNwaW5fbG9jayhsb2NrKTsKKwkJaWRhX3JlbW92ZShpZGEsIGluZGV4KTsKKwkJc3Bpbl91bmxvY2sobG9jayk7CisJCXJldHVybiAtRU5PTUVNOworCX0KKworCXJldHVybiBpbmRleDsKK30KKworaW50IGdldF9jb3BfcGlkKHN0cnVjdCBtbV9zdHJ1Y3QgKm1tKQoreworCWludCBwaWQ7CisKKwlpZiAobW0tPmNvbnRleHQuY29wX3BpZCA9PSBDT1BfUElEX05PTkUpIHsKKwkJcGlkID0gbmV3X2NvcF9waWQoJmNvcF9pZGEsIENPUF9QSURfTUlOLCBDT1BfUElEX01BWCwKKwkJCQkgICZtbXVfY29udGV4dF9hY29wX2xvY2spOworCQlpZiAocGlkID49IDApCisJCQltbS0+Y29udGV4dC5jb3BfcGlkID0gcGlkOworCX0KKwlyZXR1cm4gbW0tPmNvbnRleHQuY29wX3BpZDsKK30KKworaW50IGRpc2FibGVfY29wX3BpZChzdHJ1Y3QgbW1fc3RydWN0ICptbSkKK3sKKwlpbnQgZnJlZV9waWQgPSBDT1BfUElEX05PTkU7CisKKwlpZiAoKCFtbS0+Y29udGV4dC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9NRU0gb24gZmFpbHVyZS4KKyAqLworaW50Citmc2xfb3Blbl9vdXRiX21ib3goc3RydWN0IHJpb19tcG9ydCAqbXBvcnQsIHZvaWQgKmRldl9pZCwgaW50IG1ib3gsIGludCBlbnRyaWVzKQoreworCWludCBpLCBqLCByYyA9IDA7CisJc3RydWN0IHJpb19wcml2ICpwcml2ID0gbXBvcnQtPnByaXY7CisJc3RydWN0IGZzbF9ybXUgKnJtdSA9IEdFVF9STU1fSEFORExFKG1wb3J0KTsKKworCWlmICgoZW50cmllcyA8IFJJT19NSU5fVFhfUklOR19TSVpFKSB8fAorCQkoZW50cmllcyA+IFJJT19NQVhfVFhfUklOR19TSVpFKSB8fCAoIWlzX3Bvd2VyX29mXzIoZW50cmllcykpKSB7CisJCXJjID0gLUVJTlZBTDsKKwkJZ290byBvdXQ7CisJfQorCisJLyogSW5pdGlhbGl6ZSBzaGFkb3cgY29weSByaW5nICovCisJcm11LT5tc2dfdHhfcmluZy5kZXZfaWQgPSBkZXZfaWQ7CisJcm11LT5tc2dfdHhfcmluZy5zaXplID0gZW50cmllczsKKworCWZvciAoaSA9IDA7IGkgPCBybXUtPm1zZ190eF9yaW5nLnNpemU7IGkrKykgeworCQlybXUtPm1zZ190eF9yaW5nLnZpcnRfYnVmZmVyW2ldID0KKwkJCWRtYV9hbGxvY19jb2hlcmVudChwcml2LT5kZXYsIFJJT19NU0dfQlVGRkVSX1NJWkUsCisJCQkJJnJtdS0+bXNnX3R4X3JpbmcucGh5c19idWZmZXJbaV0sIEdGUF9LRVJORUwpOworCQlpZiAoIXJtdS0+bXNnX3R4X3JpbmcudmlydF9idWZmZXJbaV0pIHsKKwkJCXJjID0gLUVOT01FTTsKKwkJCWZvciAoaiA9IDA7IGogPCBybXUtPm1zZ190eF9yaW5nLnNpemU7IGorKykKKwkJCQlpZiAocm11LT5tc2dfdHhfcmluZy52aXJ0X2J1ZmZlcltqXSkKKwkJCQkJZG1hX2ZyZWVfY29oZXJlbnQocHJpdi0+Z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B0IHN0YXR1cyAqLworCW91dF9iZTMyKCZybXUtPm1zZ19yZWdzLT5vc3IsIDB4MDAwMDAwYjMpOworCisJLyogSG9vayB1cCBvdXRib3VuZCBtZXNzYWdlIGhhbmRsZXIgKi8KKwlyYyA9IHJlcXVlc3RfaXJxKElSUV9SSU9fVFgobXBvcnQpLCBmc2xfcmlvX3R4X2hhbmRsZXIsIDAsCisJCQkgIm1zZ190eCIsICh2b2lkICopbXBvcnQpOworCWlmIChyYyA8IDApCisJCWdvdG8gb3V0X2lycTsKKworCS8qCisJICogQ29uZmlndXJlIG91dGJvdW5kIG1lc3NhZ2UgdW5pdAorCSAqICAgICAgU25vb3BpbmcKKwkgKiAgICAgIEludGVycnVwdHMgKGFsbCBlbmFibGVkLCBleGNlcHQgUUVJRSkKKwkgKiAgICAgIENoYWluaW5nIG1vZGUKKwkgKiAgICAgIERpc2FibGUKKwkgKi8KKwlvdXRfYmUzMigmcm11LT5tc2dfcmVncy0+b21yLCAweDAwMTAwMjIwKTsKKworCS8qIFNldCBudW1iZXIgb2YgZW50cmllcyAqLworCW91dF9iZTMyKCZybXUtPm1zZ19yZWdzLT5vbXIsCisJCSBpbl9iZTMyKCZybXUtPm1zZ19yZWdzLT5vbXIpIHwKKwkJICgoZ2V0X2JpdG1hc2tfb3JkZXIoZW50cmllcykgLSAyKSA8PCAxMikpOworCisJLyogTm93IGVuYWJsZSB0aGUgdW5pdCAqLworCW91dF9iZTMyKCZybXUtPm1zZ19yZWdzLT5vbXIsIGluX2JlMzIoJnJtdS0+bXNnX3JlZ3MtPm9tcikgfCAweDEpOworCitvdXQ6CisJcmV0dXJuIHJjOworCitvdXRfaXJxOgorCWRtYV9mcmVlX2NvaGVyZW50KHByaXYtPmRldiwKKwkJcm11LT5tc2dfdHhfcmluZy5zaXplICogUklPX01TR19ERVNDX1NJWkUsCisJCXJtdS0+bXNnX3R4X3JpbmcudmlydCwgcm11LT5tc2dfdHhfcmluZy5waHlzKTsKKworb3V0X2RtYToKKw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zZW10aW1lZG9wKGZpcnN0LCAoc3RydWN0IHNlbWJ1ZiBfX3VzZXIgKilwdHIsCi0JCQkJICAgICAgICh1bnNpZ25lZClzZWNvbmQsIE5VTEwpOwotCWNhc2UgU0VNVElNRURPUDoKLQkJcmV0dXJuIHN5c19zZW10aW1lZG9wKGZpcnN0LCAoc3RydWN0IHNlbWJ1ZiBfX3VzZXIgKilwdHIsCi0JCQkJICAgICAgICh1bnNpZ25lZClzZWNvbmQsCi0JCQkJICAgICAgIChjb25zdCBzdHJ1Y3QgdGltZXNwZWMgX191c2VyICopIHRoaXJkKTsKLSAgICAgICAgY2FzZSBTRU1HRVQ6Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHN5c19zZW1nZXQoZmlyc3QsIChpbnQpc2Vjb25kLCB0aGlyZCk7Ci0gICAgICAgIGNhc2UgU0VNQ1RMOiB7Ci0gICAgICAgICAgICAgICAgdW5pb24gc2VtdW4gZm91cnRoOwotICAgICAgICAgICAgICAgIGlmICghcHRyKQotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgaWYgKGdldF91c2VyKGZvdXJ0aC5fX3BhZCwgKHZvaWQgX191c2VyICogX191c2VyICopIHB0cikpCi0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsKLSAgICAgICAgICAgICAgICByZXR1cm4gc3lzX3NlbWN0bChmaXJzdCwgKGludClzZWNvbmQsIHRoaXJkLCBmb3VydGgpOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgTVNHU05EOgotCQlyZXR1cm4gc3lzX21zZ3NuZCAoZmlyc3QsIChzdHJ1Y3QgbXNnYnVmIF9fdXNlciAqKSBwdHIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzaXplX3Qpc2Vjb25kLCB0aGlyZCk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIE1TR1JDVjoKLSAgICAgICAgICAgICAgICBpZiAoIXB0cikKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOwotICAgICAgICAgICAgICAgIGlmIChjb3B5X2Zyb21fdXNlciAoJnRtcCwgKHN0cnVjdCBpcGNfa2x1ZGdlIF9fdXNlciAqKSBwdHIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKHN0cnVjdCBpcGNfa2x1ZGdlKSkpCi0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsKLSAgICAgICAgICAgICAgICByZXR1cm4gc3lzX21zZ3JjdiAoZmlyc3QsIHRtcC5tc2dwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2l6ZV90KXNlY29uZCwgdG1wLm1zZ3R5cCwgdGhpcmQpOwotICAgICAgICBjYXNlIE1TR0dFVDoKLSAgICAgICAgICAgICAgICByZXR1cm4gc3lzX21zZ2dldCgoa2V5X3QpZmlyc3QsIChpbnQpc2Vjb25kKTsKLSAgICAgICAgY2FzZSBNU0dDVEw6Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHN5c19tc2djdGwoZmlyc3QsIChpbnQpc2Vjb25kLAotCQkJCSAgIChzdHJ1Y3QgbXNxaWRfZHMgX191c2VyICopcHRyKTsKLQotCWNhc2UgU0hNQVQ6IHsKLQkJdWxvbmcgcmFkZHI7Ci0JCXJldCA9IGRvX3NobWF0KGZpcnN0LCAoY2hhciBfX3VzZXIgKilwdHIsCi0JCQkJKGludClzZWNvbmQsICZyYWRkcik7Ci0JCWlmIChyZXQpCi0JCQlyZXR1cm4gcmV0OwotCQlyZXR1cm4gcHV0X3VzZXIgKHJhZGRyLCAodWxvbmcgX191c2VyICopIHRoaXJkKTsKLQkJYnJlYWs7Ci0gICAgICAgIH0KLQljYXNlIFNITURUOgotCQlyZXR1cm4gc3lzX3NobWR0ICgoY2hhciBfX3VzZXIgKilwdHIpOwotCWNhc2UgU0hNR0VUOgotCQlyZXR1cm4gc3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worI2RlZmluZSBfX2NtcHhjaGdfZG91YmxlKHBmeCwgcDEsIHAyLCBvMSwgbzIsIG4xLCBuMikJCQlcCisoewkJCQkJCQkJCVwKKwlib29sIF9fcmV0OwkJCQkJCQlcCisJX190eXBlb2ZfXygqKHAxKSkgX19vbGQxID0gKG8xKSwgX19uZXcxID0gKG4xKTsJCQlcCisJX190eXBlb2ZfXygqKHAyKSkgX19vbGQyID0gKG8yKSwgX19uZXcyID0gKG4yKTsJCQlcCisJQlVJTERfQlVHX09OKHNpemVvZigqKHAxKSkgIT0gc2l6ZW9mKGxvbmcpKTsJCQlcCisJQlVJTERfQlVHX09OKHNpemVvZigqKHAyKSkgIT0gc2l6ZW9mKGxvbmcpKTsJCQlcCisJVk1fQlVHX09OKCh1bnNpZ25lZCBsb25nKShwMSkgJSAoMiAqIHNpemVvZihsb25nKSkpOwkJXAorCVZNX0JVR19PTigodW5zaWduZWQgbG9uZykoKHAxKSArIDEpICE9ICh1bnNpZ25lZCBsb25nKShwMikpOwlcCisJYXNtIHZvbGF0aWxlKHBmeCAiY21weGNoZyVjNGIgJTI7IHNldGUgJTAiCQkJXAorCQkgICAgIDogIj1hIiAoX19yZXQpLCAiK2QiIChfX29sZDIpLAkJCVwKKwkJICAgICAgICIrbSIgKCoocDEpKSwgIittIiAoKihwMikpCQkJXAorCQkgICAgIDogImkiICgyICogc2l6ZW9mKGxvbmcpKSwgImEiIChfX29sZDEpLAkJXAorCQkgICAgICAgImIiIChfX25ldzEpLCAiYyIgKF9fbmV3MikpOwkJCVwKKwlfX3JldDsJCQkJCQkJCVwKK30pCisKKyNkZWZpbmUgY21weGNoZ19kb3VibGUocDEsIHAyLCBvMSwgbzIsIG4xLCBuMikgXAorCV9fY21weGNoZ19kb3VibGUoTE9DS19QUkVGSVgsIHAxLCBwMiwgbzEsIG8yLCBuMSwgbjIpCisKKyNkZWZpbmUgY21weGNoZ19kb3VibGVfbG9jYWwocDEsIHAyLCBvMSwgbzIsIG4xLCBuMikgXAor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Sk7Cit9CisKK3N0YXRpYyBpbmxpbmUgdm9pZCB3cml0ZV9nY3NyKGludCBub2RlLCB1bnNpZ25lZCBsb25nIG9mZnNldCwgdW5zaWduZWQgaW50IHZhbCkKK3sKKwl3cml0ZWwoc3dhYjMyKHZhbCksIGdjc3JfYWRkcmVzcyhub2RlLCBvZmZzZXQpKTsKK30KKworc3RhdGljIGlubGluZSB1bnNpZ25lZCBpbnQgcmVhZF9sY3NyKHVuc2lnbmVkIGxvbmcgb2Zmc2V0KQoreworCXJldHVybiBzd2FiMzIocmVhZGwobGNzcl9hZGRyZXNzKG9mZnNldCkpKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHdyaXRlX2xjc3IodW5zaWduZWQgbG9uZyBvZmZzZXQsIHVuc2lnbmVkIGludCB2YWwpCit7CisJd3JpdGVsKHN3YWIzMih2YWwpLCBsY3NyX2FkZHJlc3Mob2Zmc2V0KSk7Cit9CisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qICAgICAgICAgICAgICAgICAgIENTUl9HMF9TVEFURV9DTEVBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworI2RlZmluZSBDU1JfRzBfU1RBVEVfQ0xFQVIgKDB4MDAwICsgKDAgPDwgMTIpKQordW5pb24gbnVtYWNoaXBfY3NyX2cwX3N0YXRlX2NsZWFyIHsKKwl1bnNpZ25lZCBpbnQgdjsKKwlzdHJ1Y3QgbnVtYWNoaXBfY3NyX2cwX3N0YXRlX2NsZWFyX3MgeworCQl1bnNpZ25lZCBpbnQgX3N0YXRlOjI7CisJCXVuc2lnbmVkIGludCBfcnN2ZF8yXzY6NTsKKwkJdW5zaWduZWQgaW50IF9sb3N0OjE7CisJCXVuc2lnbmVkIGludCBfcnN2ZF84XzMxOjI0OworCX0gczsKK307CisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qICAgICAgICAgICAgICAgICAgIENTUl9HMF9OT0RFX0lEUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworI2RlZmluZSBDU1JfRzBfTk9ERV9JRFMgKDB4MDA4ICsgKDAgPDwgMTIpKQordW5pb24gbnVtYWNoaXBfY3NyX2cwX25vZGVfaWRzIHsKKwl1bnNpZ25lZCBpbnQgdjsKKwlzdHJ1Y3QgbnVtYWNoaXBfY3NyX2cwX25vZGVfaWRzX3MgeworCQl1bnNpZ25lZCBpbnQgX2luaXRpYWxpZDoxNjsKKwkJdW5zaWduZWQgaW50IF9ub2RlaWQ6MTI7CisJCXVuc2lnbmVkIGludCBfcnN2ZF8yOF8zMTo0OworCX0gczsKK307CisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qICAgICAgICAgICAgICAgICAgIENTUl9HM19FWFRfSVJRX0dFTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworI2RlZmluZSBDU1JfRzNfRVhUX0lSUV9HRU4gKDB4MDMwICsgKDMgPDwgMTIpKQordW5pb24gbnVtYWNoaXBfY3NyX2czX2V4dF9pcnFfZ2VuIHsKKwl1bnNpZ25lZCBpbnQgdjsKKwlzdHJ1Y3QgbnVtYWNoaXBfY3NyX2czX2V4dF9pcnFfZ2VuX3MgeworCQl1bnNpZ25lZCBpbnQgX3ZlY3Rvcjo4OworCQl1bnNpZ25lZCBpbnQgX21zZ3R5cGU6MzsKKwkJdW5zaWduZWQgaW50IF9pbmRleDo1OworCQl1bnNpZ25lZCBpbnQgX2Rlc3RpbmF0aW9uX2FwaWNfaWQ6MTY7CisJfSBzOworfTsKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogICAgICAgICAgICAgICAgICAgQ1NSX0czX0VYVF9JUlFfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisjZGVmaW5lIENTUl9HM19FWFRfSVJRX1NUQVRVUyAoMHgwMzQgKyAoMyA8PCAxMikpCit1bmlvbiBudW1hY2hpcF9jc3JfZzNfZXh0X2lycV9zdGF0dXMgeworCXVuc2lnbmVkIGludCB2OworCXN0cnVjdCBudW1hY2hpcF9jc3JfZzNfZXh0X2lycV9zdGF0dXNfcyB7CisJCXVuc2lnbmVkIGludCBfcmVzdWx0OjMyOworCX0gczsKK307CisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qICAgICAgICAgICAgICAgICAgIENTUl9HM19FWFRfSVJRX0RFU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworI2RlZmluZSBDU1JfRzNfRVhUX0lSUV9ERVNUICgweDAzOCArICgzIDw8IDEyKSkKK3VuaW9uIG51bWFjaGlwX2Nzcl9nM19leHRfaXJxX2Rlc3QgeworCXVuc2lnbmVkIGludCB2OworCXN0cnVjdCBudW1hY2hpcF9jc3JfZzNfZXh0X2lycV9kZXN0X3MgeworCQl1bnNpZ25lZCBpbnQgX2lycTo4OworCQl1bnNpZ25lZCBpbnQgX3JzdmRfOF8zMToyNDsKKwl9IHM7Cit9OworCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAgICAgICAgICAgICAgICAgICBDU1JfRzNfTkNfQVRUX01BUF9TRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisKKyNkZWZpbmUgQ1NSX0czX05DX0FUVF9NQVBfU0VMRUNUICgweDdmYyArICgzIDw8IDEyKSkKK3VuaW9uIG51bWFjaGlwX2Nzcl9nM19uY19hdHRfbWFwX3NlbGVjdCB7CisJdW5zaWduZWQgaW50IHY7CisJc3RydWN0IG51bWFjaGlwX2Nzcl9nM19uY19hdHRfbWFwX3NlbGVjdF9zIHsKKwkJdW5zaWduZWQgaW50IF91cHBlcl9hZGRyZXNzX2JpdHM6NDsKKwkJdW5zaWduZWQgaW50IF9zZWxlY3RfcmFtOjQ7CisJCXVuc2lnbmVkIGludCBfcnN2ZF84XzMxOjI0OworCX0gczsKK307CisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qICAgICAgICAgICAgICAgICAgIENTUl9HM19OQ19BVFRfTUFQX1NFTEVDVF8wLTI1NSAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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hpcyBvcHRpb24gZW5hYmxlcyBzdXBwb3J0IGZvciBnZW5lcmljIGRpcmVjdGx5IGNvbm5lY3RlZCBBVEEKIAkgIGRldmljZXMgY29tbW9ubHkgZm91bmQgb24gZW1iZWRkZWQgc3lzdGVtcyB3aXRoIE9wZW5GaXJtd2FyZQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9hdG0vaXBoYXNlLmMgYi9kcml2ZXJzL2F0bS9pcGhhc2UuYwppbmRleCAzZDBjMmIwLi45ZTM3M2JhIDEwMDY0NAotLS0gYS9kcml2ZXJzL2F0bS9pcGhhc2UuYworKysgYi9kcml2ZXJzL2F0bS9pcGhhc2UuYwpAQCAtMTMyMCw4ICsxMzIwLDggQEAKICAgICAgICAgICBpZiAoaWFfdmNjID09IE5VTEwpCiAgICAgICAgICAgewogICAgICAgICAgICAgIGF0b21pY19pbmMoJnZjYy0+c3RhdHMtPnJ4X2Vycik7CisgICAgICAgICAgICAgYXRtX3JldHVybih2Y2MsIHNrYi0+dHJ1ZXNpemUpOwogICAgICAgICAgICAgIGRldl9rZnJlZV9za2JfYW55KHNrYik7Ci0gICAgICAgICAgICAgYXRtX3JldHVybih2Y2MsIGF0bV9ndWVzc19wZHUydHJ1ZXNpemUobGVuKSk7CiAgICAgICAgICAgICAgZ290byBJTkNSX0RMRTsKICAgICAgICAgICAgfQogICAgICAgICAgIC8vIGdldCByZWFsIHBrdCBsZW5ndGggIHB3YW5nX3Rlc3QKQEAgLTEzMzQsOCArMTMzNCw4IEBACiAgICAgICAgICAgICAgYXRvbWljX2luYygmdmNjLT5zdGF0cy0+cnhfZXJyKTsKICAgICAgICAgICAgICBJRl9FUlIocHJpbnRrKCJyeF9kbGVfaW50cjogQmFkICBBQUw1IHRyYWlsZXIgJWQgKHNrYiBsZW4gJWQpIiwgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGgsIHNrYi0+bGVuKTspCisgICAgICAgICA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gTDM6IDEzM01IeiAqLworCXsgNSwgMSB9LAorfTsKKworLyoqKiBDbG9jayBEaXZpZGVyIERhdGEgZm9yIEV4eW5vczQyMTIvNDQxMiAqKiovCitzdGF0aWMgdW5zaWduZWQgaW50IGV4eW5vczR4MTJfY2xrZGl2X2RtYzBbXVs2XSA9IHsKKwkvKgorCSAqIENsb2NrIGRpdmlkZXIgdmFsdWUgZm9yIGZvbGxvd2luZworCSAqIHsgRElWQUNQLCBESVZBQ1BfUENMSywgRElWRFBIWSwgRElWRE1DLCBESVZETUNECisJICogICAgICAgICAgICAgIERJVkRNQ1B9CisJICovCisKKwkvKiBETUMgTDA6IDQwME1IeiAqLworCXszLCAxLCAxLCAxLCAxLCAxfSwKKwkvKiBETUMgTDE6IDI2Ni43TUh6ICovCisJezQsIDEsIDEsIDIsIDEsIDF9LAorCS8qIERNQyBMMjogMTYwTUh6ICovCisJezUsIDEsIDEsIDQsIDEsIDF9LAorCS8qIERNQyBMMzogMTMzTUh6ICovCisJezUsIDEsIDEsIDUsIDEsIDF9LAorCS8qIERNQyBMNDogMTAwTUh6ICovCisJezcsIDEsIDEsIDcsIDEsIDF9LAorfTsKK3N0YXRpYyB1bnNpZ25lZCBpbnQgZXh5bm9zNHgxMl9jbGtkaXZfZG1jMVtdWzZdID0geworCS8qCisJICogQ2xvY2sgZGl2aWRlciB2YWx1ZSBmb3IgZm9sbG93aW5nCisJICogeyBHMkRBQ1AsIERJVkMyQywgRElWQzJDX0FDTEsgfQorCSAqLworCisJLyogRE1DIEwwOiA0MDBNSHogKi8KKwl7MywgMSwgMX0sCisJLyogRE1DIEwxOiAyNjYuN01IeiAqLworCXs0LCAyLCAxfSwKKwkvKiBETUMgTDI6IDE2ME1IeiAqLworCXs1LCA0LCAxfSwKKwkvKiBETUMgTDM6IDEzM01IeiAqLworCXs1LCA1LCAxfSwKKwkvKiBETUMgTDQ6IDEwME1IeiAqLworCXs3LCA3LCAxfSwKK307CitzdGF0aWMgdW5zaWduZWQgaW50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vciBmb2xsb3dpbmcKKwkgKiB7IERJVk1GQywgRElWSlBFRywgRElWRklNQzB+M30KKwkgKi8KKworCS8qIFNDTEtfTUZDOiAyMDBNSHogKi8KKwl7MywgMywgNH0sCisJLyogU0NMS19NRkM6IDIwME1IeiAqLworCXszLCAzLCA0fSwKKwkvKiBTQ0xLX01GQzogMTYwTUh6ICovCisJezQsIDQsIDV9LAorCS8qIFNDTEtfTUZDOiAxMzNNSHogKi8KKwl7NSwgNSwgNX0sCisJLyogU0NMS19NRkM6IDEwME1IeiAqLworCXs3LCA3LCA3fSwKK307CisKKworc3RhdGljIGludCBleHlub3M0MjEwX3NldF9idXNjbGsoc3RydWN0IGJ1c2ZyZXFfZGF0YSAqZGF0YSwgc3RydWN0IG9wcCAqb3BwKQoreworCXVuc2lnbmVkIGludCBpbmRleDsKKwl1bnNpZ25lZCBpbnQgdG1wOworCisJZm9yIChpbmRleCA9IExWXzA7IGluZGV4IDwgRVg0MjEwX0xWX05VTTsgaW5kZXgrKykKKwkJaWYgKG9wcF9nZXRfZnJlcShvcHApID09IGV4eW5vczQyMTBfYnVzY2xrX3RhYmxlW2luZGV4XS5jbGspCisJCQlicmVhazsKKworCWlmIChpbmRleCA9PSBFWDQyMTBfTFZfTlVNKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCS8qIENoYW5nZSBEaXZpZGVyIC0gRE1DMCAqLworCXRtcCA9IGRhdGEtPmRtY19kaXZ0YWJsZVtpbmRleF07CisKKwlfX3Jhd193cml0ZWwodG1wLCBTNVBfQ0xLRElWX0RNQzApOworCisJZG8geworCQl0bXAgPSBfX3Jhd19yZWFkbChTNVBfQ0xLRElWX1NUQVRfRE1DMCk7CisJfSB3aGlsZSAodG1wICYgMHgxMTExMTExMSk7CisKKwkvKiBDaGFuZ2UgRGl2aWRlciAtIFRPUCAqLworCXRtcCA9IGRhdGEtPnRvcF9kaXZ0YWJsZVtpbmRleF07CisKKwlfX3Jhd193cml0ZWwodG1wLCBTNVBfQ0xLREl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AsIEtFWV9TRUxFQ1QgfSwgICAgIC8qIFNFTEVDVCAqLworCXsgMHgxOCwgS0VZX0tQRU5URVIgfSwgICAgLyogImNoZWNrIiAqLworCXsgMHgxNiwgS0VZX01FTlUgfSwgICAgICAgLyogIm1lbnUiICovCisJeyAweDAyLCBLRVlfUE9XRVIgfSwgICAgICAvKiBQb3dlciAqLworCXsgMHgwMywgS0VZX1RWIH0sICAgICAgICAgLyogVFYgKi8KKwl7IDB4MDQsIEtFWV9EVkQgfSwgICAgICAgIC8qIERWRCAqLworCXsgMHgwNSwgS0VZX1dXVyB9LCAgICAgICAgLyogV0VCICovCisJeyAweDA2LCBLRVlfQk9PS01BUktTIH0sICAvKiAiYm9vayIgKi8KKwl7IDB4MDcsIEtFWV9FRElUIH0sICAgICAgIC8qICJoYW5kIiAqLworCXsgMHgxYywgS0VZX0NPRkZFRSB9LCAgICAgLyogInRpbWVyIiAqLworCXsgMHgyMCwgS0VZX0ZST05UIH0sICAgICAgLyogIm1heCIgKi8KKwl7IDB4MWQsIEtFWV9MRUZUIH0sICAgICAgIC8qIGxlZnQgKi8KKwl7IDB4MWYsIEtFWV9SSUdIVCB9LCAgICAgIC8qIHJpZ2h0ICovCisJeyAweDIyLCBLRVlfRE9XTiB9LCAgICAgICAvKiBkb3duICovCisJeyAweDFhLCBLRVlfVVAgfSwgICAgICAgICAvKiB1cCAqLworCXsgMHgxZSwgS0VZX09LIH0sICAgICAgICAgLyogIk9LIiAqLworCXsgMHgwOSwgS0VZX1ZPTFVNRURPV04gfSwgLyogVk9MICsgKi8KKwl7IDB4MDgsIEtFWV9WT0xVTUVVUCB9LCAgIC8qIFZPTCAtICovCisJeyAweDBhLCBLRVlfTVVURSB9LCAgICAgICAvKiBNVVRFICAqLworCXsgMHgwYiwgS0VZX0NIQU5ORUxVUCB9LCAgLyogQ0ggKyAqLworCXsgMHgwYywgS0VZX0NIQU5ORUxET1dOIH0sLyogQ0ggLSAqLworCXsgMHgyNywgS0VZX1JFQ09SR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CisJCS5tYXNrID0gREE5MDUyX0lSUV9NQVNLX1BPU18zLAorCX0sCisJW0RBOTA1Ml9JUlFfR1BJMTFdID0geworCQkucmVnX29mZnNldCA9IDMsCisJCS5tYXNrID0gREE5MDUyX0lSUV9NQVNLX1BPU180LAorCX0sCisJW0RBOTA1Ml9JUlFfR1BJMTJdID0geworCQkucmVnX29mZnNldCA9IDMsCisJCS5tYXNrID0gREE5MDUyX0lSUV9NQVNLX1BPU181LAorCX0sCisJW0RBOTA1Ml9JUlFfR1BJMTNdID0geworCQkucmVnX29mZnNldCA9IDMsCisJCS5tYXNrID0gREE5MDUyX0lSUV9NQVNLX1BPU182LAorCX0sCisJW0RBOTA1Ml9JUlFfR1BJMTRdID0geworCQkucmVnX29mZnNldCA9IDMsCisJCS5tYXNrID0gREE5MDUyX0lSUV9NQVNLX1BPU183LAorCX0sCisJW0RBOTA1Ml9JUlFfR1BJMTVdID0geworCQkucmVnX29mZnNldCA9IDMsCisJCS5tYXNrID0gREE5MDUyX0lSUV9NQVNLX1BPU184LAorCX0sCit9OworCitzdGF0aWMgc3RydWN0IHJlZ21hcF9pcnFfY2hpcCBkYTkwNTJfcmVnbWFwX2lycV9jaGlwID0geworCS5uYW1lID0gImRhOTA1Ml9pcnEiLAorCS5zdGF0dXNfYmFzZSA9IERBOTA1Ml9FVkVOVF9BX1JFRywKKwkubWFza19iYXNlID0gREE5MDUyX0lSUV9NQVNLX0FfUkVHLAorCS5hY2tfYmFzZSA9IERBOTA1Ml9FVkVOVF9BX1JFRywKKwkubnVtX3JlZ3MgPSBEQTkwNTJfTlVNX0lSUV9SRUdTLAorCS5pcnFzID0gZGE5MDUyX2lycXMsCisJLm51bV9pcnFzID0gQVJSQVlfU0laRShkYTkwNTJfaXJxcyksCit9OworCitzdHJ1Y3QgcmVnbWFwX2NvbmZpZyBkYTkwNTJfcmVnbWFwX2NvbmZpZyA9IHsKKwkucmVnX2JpdHMgPSA4LAorCS52YWxfYml0cyA9IDgsCisKKwkuY2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1OCBkb250dXNlM1sxNV07CisJCQl1OCBidXNfY29uZmlnOwkJLyogQnVzIENvbmZpZ3VyYXRpb24gUmVnaXN0ZXIgKi8KKwkJCXU4IGRvbnR1c2U0WzE1XTsKKwkJCXU4IGJpdF90aW1pbmdfMDsJLyogQml0IFRpbWluZyBSZWdpc3RlciBieXRlIDAgKi8KKwkJCXU4IGRvbnR1c2U1WzE1XTsKKwkJCXU4IGJpdF90aW1pbmdfMTsJLyogQml0IFRpbWluZyBSZWdpc3RlciBieXRlIDEgKi8KKwkJCXU4IGRvbnR1c2U2WzE1XTsKKwkJCXU4IGludGVycnVwdDsJCS8qIEludGVycnVwdCBSZWdpc3RlciAqLworCQkJdTggZG9udHVzZTdbMTVdOworCQkJdTggcnhfZXJyb3JfY291bnRlcjsJLyogUmVjZWl2ZSBFcnJvciBDb3VudGVyICovCisJCQl1OCBkb250dXNlOFsxNV07CisJCQl1OCB0eF9lcnJvcl9jb3VudGVyOwkvKiBUcmFuc21pdCBFcnJvciBDb3VudGVyICovCisJCQl1OCBkb250dXNlOVszMV07CisJCQl1OCBwMV9jb25mOworCQkJdTggZG9udHVzZTEwWzE1XTsKKwkJCXU4IHAyX2NvbmY7CisJCQl1OCBkb250dXNlMTFbMTVdOworCQkJdTggcDFfaW47CisJCQl1OCBkb250dXNlMTJbMTVdOworCQkJdTggcDJfaW47CisJCQl1OCBkb250dXNlMTNbMTVdOworCQkJdTggcDFfb3V0OworCQkJdTggZG9udHVzZTE0WzE1XTsKKwkJCXU4IHAyX291dDsKKwkJCXU4IGRvbnR1c2UxNVsxNV07CisJCQl1OCBzZXJpYWxfcmVzZXRfYWRkcjsKKwkJfTsKKwl9OworfSBfX3BhY2tlZDsKKworLyogQ29udHJvbCBSZWdpc3RlciAoMHgwMCkgKi8KKyNkZWZpbmUgQ1RSTF9JTkkJMHgwMQkvKiBJbml0aWFsaXphdGlvbiAqLworI2RlZmluZSBDVFJMX0lFCQkweDAyCS8qIEludGVycnVwdCBFbmFibGUg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GEgYXJlIHVzZWQgeW91IHNob3VsZCBoYXZlIHNpbWlsYXIgZGVmaW5pdGlvbnMKKyAqIGluIHlvdXIgYm9hcmQtc3BlY2lmaWMgY29kZToKKyAqCisgKiAgIHN0YXRpYyBzdHJ1Y3QgY2M3NzBfcGxhdGZvcm1fZGF0YSBteWJvYXJkX2NjNzcwX3BkYXRhID0geworICogICAgICAgICAgIC5vc2NfZnJlcSA9IDE2MDAwMDAwLAorICogICAgICAgICAgIC5jaXIgPSAweDQxLAorICogICAgICAgICAgIC5jb3IgPSAweDIwLAorICogICAgICAgICAgIC5iY3IgPSAweDQwLAorICogICB9OworICoKKyAqIFBsZWFzZSBzZWUgaW5jbHVkZS9saW51eC9jYW4vcGxhdGZvcm0vY2M3NzAuaCBmb3IgZGVzY3JpcHRpb24gb2YKKyAqIGFib3ZlIGZpZWxkcy4KKyAqCisgKiBJZiB0aGUgZGV2aWNlIHRyZWUgaXMgdXNlZCwgeW91IG5lZWQgYSBDQU4gbm9kZSBkZWZpbml0aW9uIGluIHlvdXIKKyAqIERUUyBmaWxlIHNpbWlsYXIgdG86CisgKgorICogICBjYW5AMywxMDAgeworICogICAgICAgICAgIGNvbXBhdGlibGUgPSAiYm9zY2gsY2M3NzAiOworICogICAgICAgICAgIHJlZyA9IDwzIDB4MTAwIDB4ODA+OworICogICAgICAgICAgIGludGVycnVwdHMgPSA8MiAwPjsKKyAqICAgICAgICAgICBpbnRlcnJ1cHQtcGFyZW50ID0gPCZtcGljPjsKKyAqICAgICAgICAgICBib3NjaCxleHRlcm5hbC1jbG9jay1mcmVxdWVuY3kgPSA8MTYwMDAwMDA+OworICogICB9OworICoKKyAqIFNlZSAiRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL25ldC9jYW4vY2M3NzAudHh0IiBmb3IgZnVydGhlcgorICogaW5mb3JtYXRpb24uCisgKi8KKworI2luY2x1ZGUgPGxpbnV4L2tlcm5lbC5oPgorI2luY2x1ZGUgPGxpbn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TAsNyArMTMyOSw3IEBACiAJICogZGJnMC0wMTAgICAgIGRiZzEtMDAxICAgICBjb3MxLTEwMCAgICAgY29zMC0wMTEgICAgIE1DUC0wMDAKIAkgKiBkYmcwLTAxMCAgICAgZGJnMS0wMDEgICAgIGNvczAtMDExICAgICBjb3MxLTEwMCAgICAgTUNQLTAwMAogCSAqLwotCXZhbCA9ICgwID09IHN0cmljdF9jb3MpID8gMHgyMzE4IDogMHgyMkUwOworCXZhbCA9ICghc3RyaWN0X2NvcykgPyAweDIzMTggOiAweDIyRTA7CiAJUkVHX1dSKGJwLCBOSUdfUkVHX1AwX1RYX0FSQl9QUklPUklUWV9DTElFTlQsIHZhbCk7CiAKIAlyZXR1cm4gMDsKQEAgLTEyOTgsNyArMTMzNyw2IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoJCQlQRkMgc2VjdGlvbgkJCQkgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCiBzdGF0aWMgdm9pZCBibngyeF91cGRhdGVfcGZjX3htYWMoc3RydWN0IGxpbmtfcGFyYW1zICpwYXJhbXMsCiAJCQkJICBzdHJ1Y3QgbGlua192YXJzICp2YXJzLAogCQkJCSAgdTggaXNfbGIpCkBAIC0xNDAxLDcgKzE0MzksNyBAQAogCWlmICghdmFycy0+bGlua191cCkKIAkJcmV0dXJuOwogCi0JaWYgKE1BQ19UWVBFX0VNQUMgPT0gdmFycy0+bWFjX3R5cGUpIHsKKwlpZiAodmFycy0+bWFjX3R5cGUgPT0gTUFDX1RZUEVfRU1BQykgewogCQlEUChORVRJRl9NU0dfTElOSywgIkFib3V0IHRvIHJlYWQgUEZDIHN0YXRzIGZyb20gRU1BQ1xuIik7CiAJCWJueDJ4X2VtYWNfZ2V0X3BmY19zdGF0KHBhcmFtcywgcGZjX2ZyYW1lc19zZW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kpCiAJCQlibngyeF91cGRhdGVfcGZjX2JtYWMyKHBhcmFtcywgdmFycywgYm1hY19sb29wYmFjayk7CiAJCWVsc2UKQEAgLTMwNTMsNyArMzE1Niw2IEBACiAJCURQKE5FVElGX01TR19MSU5LLCAid3JpdGUgcGh5IHJlZ2lzdGVyIGZhaWxlZFxuIik7CiAJCW5ldGRldl9lcnIoYnAtPmRldiwgICJNREMvTURJTyBhY2Nlc3MgdGltZW91dFxuIik7CiAJCXJjID0gLUVGQVVMVDsKLQogCX0gZWxzZSB7CiAJCS8qIGRhdGEgKi8KIAkJdG1wID0gKChwaHktPmFkZHIgPDwgMjEpIHwgKGRldmFkIDw8IDE2KSB8IHZhbCB8CkBAIC0zMDkwLDggKzMxOTIsNiBAQAogCQkJICAgICAgIEVNQUNfTURJT19TVEFUVVNfMTBNQik7CiAJcmV0dXJuIHJjOwogfQotCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKgkJCUJTQyBhY2Nlc3MgZnVuY3Rpb25zIGZyb20gRTMJICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMzMzOSw3ICszNDM5LDcgQEAKIAkJYWVyX3ZhbCA9IDB4MzgwMCArIG9mZnNldCAtIDE7CiAJZWxzZQogCQlhZXJfdmFsID0gMHgzODAwICsgb2Zmc2V0OwotCURQKE5FVElGX01TR19MSU5LLCAiU2V0IEFFUiB0byAweCV4XG4iLCBhZXJfdmFsKTsKKwogCUNMMjJfV1JfT1ZFUl9DTDQ1KGJwLCBwaHksIE1ESU9fUkVHX0JBTktfQUVSX0JMT0NLLAogCQkJICBNRElPX0FFUl9CTE9DS19BRVJfUkVHLCBhZXJfdmFsKTsKIApAQCAtMzk0MiwxMyArNDA0MiwxMSBAQAogCiBzdGF0aWMgdm9pZCBibngyeF93YXJw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yeCAqYnAgPSBwYXJhbXMtPmJwOwogCiAJdTE2IGdwX3N0YXR1cywgZHVwbGV4ID0gRFVQTEVYX0hBTEYsIGxpbmtfdXAgPSAwLCBzcGVlZF9tYXNrOwpAQCAtNTQwMyw5ICs1NDk1LDcgQEAKIAkJCQkgICAgIHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zLAogCQkJCSAgICAgc3RydWN0IGxpbmtfdmFycyAqdmFycykKIHsKLQogCXN0cnVjdCBibngyeCAqYnAgPSBwYXJhbXMtPmJwOwotCiAJdTggbGFuZTsKIAl1MTYgZ3Bfc3RhdHVzMSwgZ3Bfc3BlZWQsIGxpbmtfdXAsIGR1cGxleCA9IERVUExFWF9GVUxMOwogCWludCByYyA9IDA7CkBAIC02Njc4LDcgKzY3NjgsNiBAQAogCXJldHVybiByYzsKIH0KIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKgkJCSAgICBFeHRlcm5hbCBQaHkgc2VjdGlvbgkJCSAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTgxMDMsNyArODE5MiwxNSBAQAogc3RhdGljIHZvaWQgYm54Mnhfd2FycGNvcmVfaHdfcmVzZXQoc3RydWN0IGJueDJ4X3BoeSAqcGh5LAogCQkJCSAgICBzdHJ1Y3QgbGlua19wYXJhbXMgKnBhcmFtcykKIHsKKwlzdHJ1Y3QgYm54MnggKmJwID0gcGFyYW1zLT5icDsKIAlibngyeF93YXJwY29yZV9wb3dlcl9tb2R1bGUocGFyYW1zLCBwaHksIDApOworCS8qIFB1dCBXYXJwY29yZSBpbiBsb3cgcG93ZXIgbW9kZSAqLworCVJFR19XUihicCwgTUlTQ19SRUdfV0MwX1JFU0VULCAweDBjMGUpOworCisJLyogUHV0IExDUExMI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ItPmh3Lmh3X2FkZHIgKyBSKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCXZhbCA9IHJlYWRsKGFkYXB0ZXItPmh3Lmh3X2FkZHIgKyBSKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJaWYgKChXICYgTSkgIT0gKHZhbCAmIE0pKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJcHJpbnRrKEtFUk5fRVJSICJzZXQvY2hlY2sgcmVnICUwNFggdGVzdCBmYWlsZWQ6IGdvdCAweCUwOFggIiBcCi0JCQkJICJleHBlY3RlZCAweCUwOFhcbiIsIFIsICh2YWwgJiBNKSwgKFcgJiBNKSk7IFwKKwkJcHJfZXJyKCJzZXQvY2hlY2sgcmVnICUwNFggdGVzdCBmYWlsZWQ6IGdvdCAweCUwOFggZXhwZWN0ZWQgIiBcCisJCSAgICAgICAiMHglMDhYXG4iLCBSLCAodmFsICYgTSksIChXICYgTSkpOyAgICAgICAgICAgICAgICAgICAgXAogCQkqZGF0YSA9IFI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJd3JpdGVsKGJlZm9yZSwgKGFkYXB0ZXItPmh3Lmh3X2FkZHIgKyBSKSk7ICAgICAgICAgICAgICAgICAgICBcCiAJCXJldHVybiAxOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvZXRoZXJuZXQvaW50ZWwvaXhnYmV2Zi9peGdiZXZmX21haW4uYyBiL2RyaXZlcnMvbmV0L2V0aGVybmV0L2ludGVsL2l4Z2JldmYvaXhnYmV2Zl9tYWluLmMKaW5kZXggNGM4ZTE5OS4uODkxMTYyZCAxMDA2NDQKLS0tIGEvZHJpdmVycy9uZXQvZXRoZXJuZXQvaW50ZWwvaXhnYmV2Zi9peGdiZXZmX21haW4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HgpKQotI2RlZmluZSBJWEdCRV9WRlJTQ0NUTCh4KSAgICAgICgweDAxMDJDICsgKDB4NDAgKiB4KSkKKyNkZWZpbmUgSVhHQkVfVlRSU0NJTlQoeCkgICAgICAoMHgwMDE4MCArICg0ICogKHgpKSkKKyNkZWZpbmUgSVhHQkVfVkZSREJBTCh4KSAgICAgICAoMHgwMTAwMCArICgweDQwICogKHgpKSkKKyNkZWZpbmUgSVhHQkVfVkZSREJBSCh4KSAgICAgICAoMHgwMTAwNCArICgweDQwICogKHgpKSkKKyNkZWZpbmUgSVhHQkVfVkZSRExFTih4KSAgICAgICAoMHgwMTAwOCArICgweDQwICogKHgpKSkKKyNkZWZpbmUgSVhHQkVfVkZSREgoeCkgICAgICAgICAoMHgwMTAxMCArICgweDQwICogKHgpKSkKKyNkZWZpbmUgSVhHQkVfVkZSRFQoeCkgICAgICAgICAoMHgwMTAxOCArICgweDQwICogKHgpKSkKKyNkZWZpbmUgSVhHQkVfVkZSWERDVEwoeCkgICAgICAoMHgwMTAyOCArICgweDQwICogKHgpKSkKKyNkZWZpbmUgSVhHQkVfVkZTUlJDVEwoeCkgICAgICAoMHgwMTAxNCArICgweDQwICogKHgpKSkKKyNkZWZpbmUgSVhHQkVfVkZSU0NDVEwoeCkgICAgICAoMHgwMTAyQyArICgweDQwICogKHgpKSkKICNkZWZpbmUgSVhHQkVfVkZQU1JUWVBFICAgICAgICAweDAwMzAwCi0jZGVmaW5lIElYR0JFX1ZGVERCQUwoeCkgICAgICAgKDB4MDIwMDAgKyAoMHg0MCAqIHgpKQotI2RlZmluZSBJWEdCRV9WRlREQkFIKHgpICAgICAgICgweDAyMDA0ICsgKDB4NDAgKiB4KSkKLSNkZWZpbmUgSVhHQkVfVkZURExFTih4KSAgICAgICAoMHgwMjAwOCArICgweDQwICogeCkpCi0jZGVmaW5lIElYR0JFX1ZGVERIKHgpICAgICAgICAgKDB4MDIwMTAgKyAoMHg0MCAqIHgpKQotI2RlZmluZSBJWEdCRV9WRl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LAorCQkJICAgICAgdTE2IHBhcmFtLCB1bnNpZ25lZCBsb25nIHRpbWVvdXQpCit7CisJc3RydWN0IG1seDRfY21kICpjbWQgPSAmbWx4NF9wcml2KGRldiktPmNtZDsKKwlzdHJ1Y3QgbWx4NF9jbWRfY29udGV4dCAqY29udGV4dDsKKwlpbnQgZXJyID0gMDsKKworCWRvd24oJmNtZC0+ZXZlbnRfc2VtKTsKKworCXNwaW5fbG9jaygmY21kLT5jb250ZXh0X2xvY2spOworCUJVR19PTihjbWQtPmZyZWVfaGVhZCA8IDApOworCWNvbnRleHQgPSAmY21kLT5jb250ZXh0W2NtZC0+ZnJlZV9oZWFkXTsKKwljb250ZXh0LT50b2tlbiArPSBjbWQtPnRva2VuX21hc2sgKyAxOworCWNtZC0+ZnJlZV9oZWFkID0gY29udGV4dC0+bmV4dDsKKwlzcGluX3VubG9jaygmY21kLT5jb250ZXh0X2xvY2spOworCisJaW5pdF9jb21wbGV0aW9uKCZjb250ZXh0LT5kb25lKTsKKworCW1seDRfY29tbV9jbWRfcG9zdChkZXYsIG9wLCBwYXJhbSk7CisKKwlpZiAoIXdhaXRfZm9yX2NvbXBsZXRpb25fdGltZW91dCgmY29udGV4dC0+ZG9uZSwKKwkJCQkJIG1zZWNzX3RvX2ppZmZpZXModGltZW91dCkpKSB7CisJCWVyciA9IC1FQlVTWTsKKwkJZ290byBvdXQ7CisJfQorCisJZXJyID0gY29udGV4dC0+cmVzdWx0OworCWlmIChlcnIgJiYgY29udGV4dC0+Zndfc3RhdHVzICE9IENNRF9TVEFUX01VTFRJX0ZVTkNfUkVRKSB7CisJCW1seDRfZXJyKGRldiwgImNvbW1hbmQgMHgleCBmYWlsZWQ6IGZ3IHN0YXR1cyA9IDB4JXhcbiIsCisJCQkgb3AsIGNvbnRleHQtPmZ3X3N0YXR1cyk7CisJCWdvdG8gb3V0OworCX0KKworb3V0OgorCXNwaW5fbG9jaygmY21kLT5jb250ZXh0X2xvY2spOworCWNvbnRleHQtPm5leHQ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KwlyZXQtPmNvbS5yZXNfaWQgPSBpZDsKKwlyZXQtPmNvbS5zdGF0ZSA9IFJFU19FUV9SRVNFUlZFRDsKKworCXJldHVybiAmcmV0LT5jb207Cit9CisKK3N0YXRpYyBzdHJ1Y3QgcmVzX2NvbW1vbiAqYWxsb2NfY3FfdHIoaW50IGlkKQoreworCXN0cnVjdCByZXNfY3EgKnJldDsKKworCXJldCA9IGt6YWxsb2Moc2l6ZW9mICpyZXQsIEdGUF9LRVJORUwpOworCWlmICghcmV0KQorCQlyZXR1cm4gTlVMTDsKKworCXJldC0+Y29tLnJlc19pZCA9IGlkOworCXJldC0+Y29tLnN0YXRlID0gUkVTX0NRX0FMTE9DQVRFRDsKKwlhdG9taWNfc2V0KCZyZXQtPnJlZl9jb3VudCwgMCk7CisKKwlyZXR1cm4gJnJldC0+Y29tOworfQorCitzdGF0aWMgc3RydWN0IHJlc19jb21tb24gKmFsbG9jX3NycV90cihpbnQgaWQpCit7CisJc3RydWN0IHJlc19zcnEgKnJldDsKKworCXJldCA9IGt6YWxsb2Moc2l6ZW9mICpyZXQsIEdGUF9LRVJORUwpOworCWlmICghcmV0KQorCQlyZXR1cm4gTlVMTDsKKworCXJldC0+Y29tLnJlc19pZCA9IGlkOworCXJldC0+Y29tLnN0YXRlID0gUkVTX1NSUV9BTExPQ0FURUQ7CisJYXRvbWljX3NldCgmcmV0LT5yZWZfY291bnQsIDApOworCisJcmV0dXJuICZyZXQtPmNvbTsKK30KKworc3RhdGljIHN0cnVjdCByZXNfY29tbW9uICphbGxvY19jb3VudGVyX3RyKGludCBpZCkKK3sKKwlzdHJ1Y3QgcmVzX2NvdW50ZXIgKnJldDsKKworCXJldCA9IGt6YWxsb2Moc2l6ZW9mICpyZXQsIEdGUF9LRVJORUwpOworCWlmICghcmV0KQorCQlyZXR1cm4gTlVMTDsKKworCXJldC0+Y29tLnJlc19pZCA9IGlkOworCXJldC0+Y29tLnN0YXRlID0gUkVTX0NPVU5URVJfQUxMT0NBVEVE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DA7CisKK2Vycl9wdXQ6CisJbWx4NF90YWJsZV9wdXQoZGV2LCAmc3JxX3RhYmxlLT50YWJsZSwgKnNycW4pOworCitlcnJfb3V0OgorCW1seDRfYml0bWFwX2ZyZWUoJnNycV90YWJsZS0+Yml0bWFwLCAqc3Jxbik7CisJcmV0dXJuIGVycjsKK30KKworc3RhdGljIGludCBtbHg0X3NycV9hbGxvY19pY20oc3RydWN0IG1seDRfZGV2ICpkZXYsIGludCAqc3JxbikKK3sKKwl1NjQgb3V0X3BhcmFtOworCWludCBlcnI7CisKKwlpZiAobWx4NF9pc19tZnVuYyhkZXYpKSB7CisJCWVyciA9IG1seDRfY21kX2ltbShkZXYsIDAsICZvdXRfcGFyYW0sIFJFU19TUlEsCisJCQkJICAgUkVTX09QX1JFU0VSVkVfQU5EX01BUCwKKwkJCQkgICBNTFg0X0NNRF9BTExPQ19SRVMsCisJCQkJICAgTUxYNF9DTURfVElNRV9DTEFTU19BLCBNTFg0X0NNRF9XUkFQUEVEKTsKKwkJaWYgKCFlcnIpCisJCQkqc3JxbiA9IGdldF9wYXJhbV9sKCZvdXRfcGFyYW0pOworCisJCXJldHVybiBlcnI7CisJfQorCXJldHVybiBfX21seDRfc3JxX2FsbG9jX2ljbShkZXYsIHNycW4pOworfQorCit2b2lkIF9fbWx4NF9zcnFfZnJlZV9pY20oc3RydWN0IG1seDRfZGV2ICpkZXYsIGludCBzcnFuKQoreworCXN0cnVjdCBtbHg0X3NycV90YWJsZSAqc3JxX3RhYmxlID0gJm1seDRfcHJpdihkZXYpLT5zcnFfdGFibGU7CisKKwltbHg0X3RhYmxlX3B1dChkZXYsICZzcnFfdGFibGUtPmNtcHRfdGFibGUsIHNycW4pOworCW1seDRfdGFibGVfcHV0KGRldiwgJnNycV90YWJsZS0+dGFibGUsIHNycW4pOworCW1seDRfYml0bWFwX2ZyZWUoJnNycV90YWJsZS0+Yml0bWFwLCBzcnFuKTsKK30KKworc3RhdGljIHZvaWQgbWx4NF9zcnFfZnJ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ZCk7CisJc3BpX21lc3NhZ2VfYWRkX3RhaWwoJnRbMF0sICZtKTsKKworCXRbMV0udHhfYnVmID0gYnVmOworCXRbMV0ubGVuID0gY291bnQ7CisJc3BpX21lc3NhZ2VfYWRkX3RhaWwoJnRbMV0sICZtKTsKKworCWNtZFswXSA9IEtTODk5NV9DTURfV1JJVEU7CisJY21kWzFdID0gb2Zmc2V0OworCisJbXV0ZXhfbG9jaygma3MtPmxvY2spOworCWVyciA9IHNwaV9zeW5jKGtzLT5zcGksICZtKTsKKwltdXRleF91bmxvY2soJmtzLT5sb2NrKTsKKworCXJldHVybiBlcnIgPyBlcnIgOiBjb3VudDsKK30KKworc3RhdGljIGlubGluZSBpbnQga3M4OTk1X3JlYWRfcmVnKHN0cnVjdCBrczg5OTVfc3dpdGNoICprcywgdTggYWRkciwgdTggKmJ1ZikKK3sKKwlyZXR1cm4gKGtzODk5NV9yZWFkKGtzLCBidWYsIGFkZHIsIDEpICE9IDEpOworfQorCitzdGF0aWMgaW5saW5lIGludCBrczg5OTVfd3JpdGVfcmVnKHN0cnVjdCBrczg5OTVfc3dpdGNoICprcywgdTggYWRkciwgdTggdmFsKQoreworCWNoYXIgYnVmID0gdmFsOworCisJcmV0dXJuIChrczg5OTVfd3JpdGUoa3MsICZidWYsIGFkZHIsIDEpICE9IDEpOworfQorCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gKi8KKworc3RhdGljIGludCBrczg5OTVfc3RvcChzdHJ1Y3Qga3M4OTk1X3N3aXRjaCAqa3MpCit7CisJcmV0dXJuIGtzODk5NV93cml0ZV9yZWcoa3MsIEtTODk5NV9SRUdfSUQxLCAwKTsKK30KKworc3RhdGljIGludCBrczg5OTVfc3RhcnQoc3RydWN0IGtzODk5NV9zd2l0Y2ggKmtzKQoreworCXJldHVybiBrczg5OTVfd3JpdGVfcmVnKGtzL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XNiX3JlZ2lzdGVyKCZrYWxtaWFfZHJpdmVyKTsKLX0KLW1vZHVsZV9pbml0KCBrYWxtaWFfaW5pdCk7Ci0KLXN0YXRpYyB2b2lkIF9fZXhpdCBrYWxtaWFfZXhpdCh2b2lkKQotewotCXVzYl9kZXJlZ2lzdGVyKCZrYWxtaWFfZHJpdmVyKTsKLX0KLW1vZHVsZV9leGl0KCBrYWxtaWFfZXhpdCk7Cittb2R1bGVfdXNiX2RyaXZlcihrYWxtaWFfZHJpdmVyKTsKIAogTU9EVUxFX0FVVEhPUigiTWFyaXVzIEJqb2VybnN0YWQgS290c2JhayA8bWFyaXVzQGtvdHNiYWsuY29tPiIpOwogTU9EVUxFX0RFU0NSSVBUSU9OKCJTYW1zdW5nIEthbG1pYSBVU0IgbmV0d29yayBkcml2ZXIiKTsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvbmV0L3VzYi9rYXdldGguYyBiL2RyaXZlcnMvbmV0L3VzYi9rYXdldGguYwppbmRleCA1ODJjYTJkLi5kMDM0ZDljIDEwMDY0NAotLS0gYS9kcml2ZXJzL25ldC91c2Iva2F3ZXRoLmMKKysrIGIvZHJpdmVycy9uZXQvdXNiL2thd2V0aC5jCkBAIC0xMzI0LDMyICsxMzI0LDQgQEAKIAl9CiB9CiAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqICAgICBrYXdldGhfaW5pdAotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdGF0aWMgaW50IF9faW5pdCBrYXdldGhfaW5pdCh2b2lkKQotewotCWRiZygiRHJpdmVyIGxvYWRpbmciKTsKLQlyZXR1cm4gdXNiX3JlZ2lzdGVyKCZrYXdldGhfZHJpdmVyKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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mcgdG8gZG8KLSAqIHdpdGggZ2Fpbl9GIGNhbGlicmF0aW9uICovCi1zdGF0aWMgaW50IGF0aDVrX2h3X3JmZ2Fpbl9pbml0KHN0cnVjdCBhdGg1a19odyAqYWgsIGVudW0gaWVlZTgwMjExX2JhbmQgYmFuZCkKKy8qKgorICogYXRoNWtfaHdfcmZnYWluX2luaXQoKSAtIFdyaXRlIGluaXRpYWwgUkYgZ2FpbiBzZXR0aW5ncyB0byBodworICogQGFoOiBUaGUgJnN0cnVjdCBhdGg1a19odworICogQGJhbmQ6IE9uZSBvZiBlbnVtIGllZWU4MDIxMV9iYW5kCisgKgorICogV3JpdGUgaW5pdGlhbCBSRiBnYWluIHRhYmxlIHRvIHNldCB0aGUgUkYgc2Vuc2l0aXZpdHkuCisgKgorICogTk9URTogVGhpcyBvbmUgd29ya3Mgb24gYWxsIFJGIGNoaXBzIGFuZCBoYXMgbm90aGluZyB0byBkbworICogd2l0aCBHYWluX0YgY2FsaWJyYXRpb24KKyAqLworc3RhdGljIGludAorYXRoNWtfaHdfcmZnYWluX2luaXQoc3RydWN0IGF0aDVrX2h3ICphaCwgZW51bSBpZWVlODAyMTFfYmFuZCBiYW5kKQogewogCWNvbnN0IHN0cnVjdCBhdGg1a19pbmlfcmZnYWluICphdGg1a19yZmc7CiAJdW5zaWduZWQgaW50IGksIHNpemUsIGluZGV4OwpAQCAtNjg4LDE2ICs3OTYsMjMgQEAKIH0KIAogCi0KIC8qKioqKioqKioqKioqKioqKioqKlwKICogUkYgUmVnaXN0ZXJzIHNldHVwICoKIFwqKioqKioqKioqKioqKioqKioqKi8KIAotLyoKLSAqIFNldHVwIFJGIHJlZ2lzdGVycyBieSB3cml0aW5nIFJGIGJ1ZmZlciBvbiBodworLyoqCisgKiBhdGg1a19od19yZnJlZ3NfaW5pdCgpIC0gSW5pdGlhbGl6ZSBSRiByZWdpc3RlciBzZXR0aW5ncworICogQGFoOiBUaGUgJnN0cnVjdCBhdGg1a19odworICogQGNoYW5uZW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HgwMCAmJiBwb3NbM10gPT0gMHg1MCAmJgorCQlwb3NbNF0gPT0gMHhmMiAmJiBwb3NbNV0gPT0gMHgwMTsKK30KKworc3RhdGljIGJvb2wgYXRoNmtsX2lzX3Jzbl9pZShjb25zdCB1OCAqcG9zKQoreworCXJldHVybiBwb3NbMF0gPT0gV0xBTl9FSURfUlNOOworfQorCitzdGF0aWMgYm9vbCBhdGg2a2xfaXNfd3BzX2llKGNvbnN0IHU4ICpwb3MpCit7CisJcmV0dXJuIChwb3NbMF0gPT0gV0xBTl9FSURfVkVORE9SX1NQRUNJRklDICYmCisJCXBvc1sxXSA+PSA0ICYmCisJCXBvc1syXSA9PSAweDAwICYmIHBvc1szXSA9PSAweDUwICYmIHBvc1s0XSA9PSAweGYyICYmCisJCXBvc1s1XSA9PSAweDA0KTsKK30KKworc3RhdGljIGludCBhdGg2a2xfc2V0X2Fzc29jX3JlcV9pZXMoc3RydWN0IGF0aDZrbF92aWYgKnZpZiwgY29uc3QgdTggKmllcywKKwkJCQkgICAgc2l6ZV90IGllc19sZW4pCit7CisJc3RydWN0IGF0aDZrbCAqYXIgPSB2aWYtPmFyOworCWNvbnN0IHU4ICpwb3M7CisJdTggKmJ1ZiA9IE5VTEw7CisJc2l6ZV90IGxlbiA9IDA7CisJaW50IHJldDsKKworCS8qCisJICogQ2xlYXIgcHJldmlvdXNseSBzZXQgZmxhZworCSAqLworCisJYXItPmNvbm5lY3RfY3RybF9mbGFncyAmPSB+Q09OTkVDVF9XUFNfRkxBRzsKKworCS8qCisJICogRmlsdGVyIG91dCBSU04vV1BBIElFKHMpCisJICovCisKKwlpZiAoaWVzICYmIGllc19sZW4pIHsKKwkJYnVmID0ga21hbGxvYyhpZXNfbGVuLCBHRlBfS0VSTkVMKTsKKwkJaWYgKGJ1ZiA9PSBOVUxMKQorCQkJcmV0dXJuIC1FTk9NRU07CisJCXBvcyA9IGllczsKKworCQl3aGlsZSAocG9zICsgMSA8IGllcyArIGllc19sZW4pIHsKKwkJ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gQVJfR1BJT19PVVRQVVRfTVVYX0FTX01DSV9CVF9DTEsgICAgICAgICAweDE5CisjZGVmaW5lIEFSX0dQSU9fT1VUUFVUX01VWF9BU19XTF9JTl9UWCAgICAgICAgICAgMHgxNAorI2RlZmluZSBBUl9HUElPX09VVFBVVF9NVVhfQVNfV0xfSU5fUlggICAgICAgICAgIDB4MTMKKyNkZWZpbmUgQVJfR1BJT19PVVRQVVRfTVVYX0FTX0JUX0lOX1RYICAgICAgICAgICA5CisjZGVmaW5lIEFSX0dQSU9fT1VUUFVUX01VWF9BU19CVF9JTl9SWCAgICAgICAgICAgOAorI2RlZmluZSBBUl9HUElPX09VVFBVVF9NVVhfQVNfUlVDS1VTX1NUUk9CRSAgICAgIDB4MWQKKyNkZWZpbmUgQVJfR1BJT19PVVRQVVRfTVVYX0FTX1JVQ0tVU19EQVRBICAgICAgICAweDFlCiAKICNkZWZpbmUgQVJfR1BJT0RfTUFTSyAgICAgICAgICAgICAgIDB4MDAwMDFGRkYKICNkZWZpbmUgQVJfR1BJT19CSVQoX2dwaW8pICAgICAgICAgICgxIDw8IChfZ3BpbykpCkBAIC0xODksMjAgKzE5NiwyNSBAQAogZW51bSBhdGg5a19od19jYXBzIHsKIAlBVEg5S19IV19DQVBfSFQgICAgICAgICAgICAgICAgICAgICAgICAgPSBCSVQoMCksCiAJQVRIOUtfSFdfQ0FQX1JGU0lMRU5UICAgICAgICAgICAgICAgICAgID0gQklUKDEpLAotCUFUSDlLX0hXX0NBUF9DU1QgICAgICAgICAgICAgICAgICAgICAgICA9IEJJVCgyKSwKLQlBVEg5S19IV19DQVBfQVVUT1NMRUVQICAgICAgICAgICAgICAgICAgPSBCSVQoNCksCi0JQVRIOUtfSFdfQ0FQXzRLQl9TUExJVFRSQU5TICAgICAgICAgICAgID0gQklUKDUpLAotCUFUSDlLX0hXX0NBUF9FRE1BCQkJPSBCSVQoNiksCi0JQVRIOUtfSFdfQ0FQX1JBQ19TVVBQT1JURUQJCT0gQklUKDcp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9IGVsc2UgewotCQlkZXZfd2FybigmYXItPnVkZXYtPmRldiwgIlVucHJvdGVjdGVkIGZpcm13YXJlIGltYWdlLlxuIik7CisJCWFyLT5mdy50eF9zZXFfdGFibGUgPSAwOworCX0KKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IGNhcmw5MTcwX2Z3KHN0cnVjdCBhcjkxNzAgKmFyLCBjb25zdCBfX3U4ICpkYXRhLCBzaXplX3QgbGVuKQoreworCWNvbnN0IHN0cnVjdCBjYXJsOTE3MGZ3X290dXNfZGVzYyAqb3R1c19kZXNjOworCWludCBlcnI7CisJdTE2IGlmX2NvbWJfdHlwZXM7CisKKwllcnIgPSBjYXJsOTE3MF9md19jaGVja3N1bShhciwgZGF0YSwgbGVuKTsKKwlpZiAoZXJyKQorCQlyZXR1cm4gZXJyOworCisJb3R1c19kZXNjID0gY2FybDkxNzBfZndfZmluZF9kZXNjKGFyLCBPVFVTX01BR0lDLAorCQlzaXplb2YoKm90dXNfZGVzYyksIENBUkw5MTcwRldfT1RVU19ERVNDX0NVUl9WRVIpOworCWlmICghb3R1c19kZXNjKSB7CisJCXJldHVybiAtRU5PREFUQTsKIAl9CiAKICNkZWZpbmUgU1VQUChmZWF0KQkJCQkJCVwKQEAgLTMyMSwxOSArMzU1LDggQEAKIAogCWFyLT5ody0+d2lwaHktPmludGVyZmFjZV9tb2RlcyB8PSBpZl9jb21iX3R5cGVzOwogCi0JdHhzcV9kZXNjID0gY2FybDkxNzBfZndfZmluZF9kZXNjKGFyLCBUWFNRX01BR0lDLAotCQlzaXplb2YoKnR4c3FfZGVzYyksIENBUkw5MTcwRldfVFhTUV9ERVNDX0NVUl9WRVIpOwotCi0JaWYgKHR4c3FfZGVzYykgewotCQlhci0+ZncudHhfc2VxX3RhYmxlID0gbGUzMl90b19jcHUodHhzcV9kZXNjLT5zZXFfdGFibGVfYWRkcik7Ci0JCWlmICghdmFsaWRfY3B1X2FkZHIoYXItPmZ3LnR4X3NlcV90YWJsZSkpCi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Ql0bXAgPSAweDAwMTA7CisJCQkJdmFsID0gdmFsdWUgPDwgNDsKKwkJCX0KKwkJCWI0M19waHlfbWFza3NldChkZXYsIHJlZywgfnRtcCwgdmFsKTsKKwkJCWJyZWFrOworCQljYXNlIDM6CisJCQlpZiAoYjQzX2N1cnJlbnRfYmFuZChkZXYtPndsKSA9PSBJRUVFODAyMTFfQkFORF81R0haKSB7CisJCQkJdG1wID0gMHgwMDAxOworCQkJCXZhbCA9IHZhbHVlOworCQkJfSBlbHNlIHsKKwkJCQl0bXAgPSAweDAwMDQ7CisJCQkJdmFsID0gdmFsdWUgPDwgMjsKKwkJCX0KKwkJCWI0M19waHlfbWFza3NldChkZXYsIHJlZywgfnRtcCwgdmFsKTsKKwkJCWJyZWFrOworCQljYXNlIDQ6CisJCQlpZiAoYjQzX2N1cnJlbnRfYmFuZChkZXYtPndsKSA9PSBJRUVFODAyMTFfQkFORF81R0haKSB7CisJCQkJdG1wID0gMHgwMDAyOworCQkJCXZhbCA9IHZhbHVlIDw8IDE7CisJCQl9IGVsc2UgeworCQkJCXRtcCA9IDB4MDAwODsKKwkJCQl2YWwgPSB2YWx1ZSA8PCAzOworCQkJfQorCQkJYjQzX3BoeV9tYXNrc2V0KGRldiwgcmVnLCB+dG1wLCB2YWwpOworCQkJYnJlYWs7CisJCX0KKwl9Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVmFyaW91cyBQSFkgb3BzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIGh0dHA6Ly9iY20tdjQuc2lwc29sdXRpb25zLm5ldC84MDIuMTEvUEhZL04vY2xpcC1kZXRlY3Rpb24gKi8KK3N0YXRpYyB2b2lkIGI0M19ucGh5X3dyaXRlX2NsaXBfZGV0ZWN0aW9uKHN0cnVjdCBiNDNfd2xkZXYgKmRldiwKKwkJCQkJICBjb25zdCB1MTYgKmNsaXBf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BpIDwgMTY7IGkrKykgeworCQliNDNfbnRhYl93cml0ZShkZXYsIEI0M19OVEFCOCg3LCBvZmZzZXQxICsgaSksIGVuZCk7CisJCWI0M19udGFiX3dyaXRlKGRldiwgQjQzX05UQUI4KDcsIG9mZnNldDIgKyBpKSwgMSk7CisJfQorCisJaWYgKG5waHktPmhhbmdfYXZvaWQpCisJCWI0M19ucGh5X3N0YXlfaW5fY2Fycmllcl9zZWFyY2goZGV2LCBmYWxzZSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUmFkaW8gMHgyMDU2CisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKIHN0YXRpYyB2b2lkIGI0M19jaGFudGFiX3JhZGlvXzIwNTZfdXBsb2FkKHN0cnVjdCBiNDNfd2xkZXYgKmRldiwKIAkJCQljb25zdCBzdHJ1Y3QgYjQzX25waHlfY2hhbm5lbHRhYl9lbnRyeV9yZXYzICplKQogewpAQCAtMjI4LDEwICs1NTIsOTggQEAKIHN0YXRpYyB2b2lkIGI0M19yYWRpb18yMDU2X3NldHVwKHN0cnVjdCBiNDNfd2xkZXYgKmRldiwKIAkJCQljb25zdCBzdHJ1Y3QgYjQzX25waHlfY2hhbm5lbHRhYl9lbnRyeV9yZXYzICplKQogeworCXN0cnVjdCBzc2Jfc3Byb20gKnNwcm9tID0gZGV2LT5kZXYtPmJ1c19zcHJvbTsKKwllbnVtIGllZWU4MDIxMV9iYW5kIGJhbmQgPSBiNDNfY3VycmVudF9iYW5kKGRldi0+d2wpOworCXUxNiBvZmZzZXQ7CisJdTggaTsKKwl1MTYgYmlhcywgY2JpYXMsIHBhZ19ib29zdCwgcGdhZ19ib29zdCwgbWl4Z19ib29zdCwgcGFkZ19ib29zdDsKKwogCUI0M19XQVJOX09OKGRldi0+cGh5LnJldiA8IDMpOwogCiAJYjQzX2NoYW50YWJfcmFkaW9fMjA1Nl91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0+d2wpID09IElFRUU4MDIxMV9CQU5EXzVHSFopCisJCWI0M19ucGh5X2NsYXNzaWZpZXIoZGV2LCAxLCAwKTsKKwllbHNlCisJCWI0M19ucGh5X2NsYXNzaWZpZXIoZGV2LCAxLCAxKTsKKworCWlmIChucGh5LT5oYW5nX2F2b2lkKQorCQliNDNfbnBoeV9zdGF5X2luX2NhcnJpZXJfc2VhcmNoKGRldiwgMSk7CisKKwliNDNfcGh5X3NldChkZXYsIEI0M19OUEhZX0lRRkxJUCwKKwkJICAgIEI0M19OUEhZX0lRRkxJUF9BREMxIHwgQjQzX05QSFlfSVFGTElQX0FEQzIpOworCisJaWYgKGRldi0+cGh5LnJldiA+PSAzKQorCQliNDNfbnBoeV93b3JrYXJvdW5kc19yZXYzcGx1cyhkZXYpOworCWVsc2UKKwkJYjQzX25waHlfd29ya2Fyb3VuZHNfcmV2MV8yKGRldik7CisKKwlpZiAobnBoeS0+aGFuZ19hdm9pZCkKKwkJYjQzX25waHlfc3RheV9pbl9jYXJyaWVyX3NlYXJjaChkZXYsIDApOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFR4L1J4IGNvbW1vbgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKgorICogVHJhbnNtaXRzIGEga25vd24gdmFsdWUgZm9yIExPIGNhbGlicmF0aW9uCisgKiBodHRwOi8vYmNtLXY0LnNpcHNvbHV0aW9ucy5uZXQvODAyLjExL1BIWS9OL1RYVG9uZQorICovCitzdGF0aWMgaW50IGI0M19ucGh5X3R4X3RvbmUoc3RydWN0IGI0M193bGRldiAqZGV2LCB1MzIgZnJlcSwgdTE2IG1heF92YWwsCisJCQkJYm9vbCBpcW1vZGUsIGJvb2wgZGFjX3Rlc3QpCit7CisJdTE2IHNhbXAgPSBiNDNfbnBoeV9nZW5fbG9hZF9zYW1wbGVzKGRldiwgZnJlcSwgbWF4X3Z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XMtPnBhZCA9IHRibF9pcWNhbF9nYWlucGFyYW1zW2luZHhdW2ldWzNdOworCQlwYXJhbXMtPmNhbF9nYWluID0gKHBhcmFtcy0+dHhnbSA8PCA3KSB8IChwYXJhbXMtPnBnYSA8PCA0KSB8CisJCQkJCShwYXJhbXMtPnBhZCA8PCAyKTsKKwkJZm9yIChqID0gMDsgaiA8IDQ7IGorKykKKwkJCXBhcmFtcy0+bmNvcnJbal0gPSB0YmxfaXFjYWxfZ2FpbnBhcmFtc1tpbmR4XVtpXVs0ICsgal07CisJfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFR4IGFuZCBSeAorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkIGI0M19ucGh5X3NldF9yeGFudGVubmEoc3RydWN0IGI0M193bGRldiAqZGV2LCBpbnQgYW50ZW5uYSkKK3svL1RPRE8KK30KKworc3RhdGljIHZvaWQgYjQzX25waHlfb3BfYWRqdXN0X3R4cG93ZXIoc3RydWN0IGI0M193bGRldiAqZGV2KQorey8vVE9ETworfQorCitzdGF0aWMgZW51bSBiNDNfdHhwd3JfcmVzdWx0IGI0M19ucGh5X29wX3JlY2FsY190eHBvd2VyKHN0cnVjdCBiNDNfd2xkZXYgKmRldiwKKwkJCQkJCQlib29sIGlnbm9yZV90c3NpKQorey8vVE9ETworCXJldHVybiBCNDNfVFhQV1JfUkVTX0RPTkU7Cit9CisKKy8qIGh0dHA6Ly9iY20tdjQuc2lwc29sdXRpb25zLm5ldC84MDIuMTEvUEhZL04vVHhQd3JDdHJsRW5hYmxlICovCitzdGF0aWMgdm9pZCBiNDNfbnBoeV90eF9wb3dlcl9jdHJsKHN0cnVjdCBiNDNfd2xkZXYgKmRldiwgYm9vbCBlbmFibGUpCit7CisJc3RydWN0IGI0M19waHlfbiAqbnBoeSA9IGRldi0+cGh5Lm47CisJdTggaTsKKwl1MTYgY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GUzMl90b19jcHUob2ZkbS0+c2VudF9hY2tfY250KSwgYWNjdW1fb2ZkbS0+c2VudF9hY2tfY250LAorCQkgICAgICBkZWx0YV9vZmRtLT5zZW50X2Fja19jbnQsIG1heF9vZmRtLT5zZW50X2Fja19jbnQpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywKKwkJICAgICAgIiAgJS0zMHMgJTEwdSAgJTEwdSAgJTEwdSAgJTEwdVxuIiwgInNlbnRfY3RzX2NudDoiLAorCQkgICAgICBsZTMyX3RvX2NwdShvZmRtLT5zZW50X2N0c19jbnQpLCBhY2N1bV9vZmRtLT5zZW50X2N0c19jbnQsCisJCSAgICAgIGRlbHRhX29mZG0tPnNlbnRfY3RzX2NudCwgbWF4X29mZG0tPnNlbnRfY3RzX2NudCk7CisKKwlwb3MgKz0KKwkgICAgc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsCisJCSAgICAgICIlLTMycyAgICAgY3VycmVudCIKKwkJICAgICAgImFjdW11bGF0aXZlICAgICAgIGRlbHRhICAgICAgICAgbWF4XG4iLAorCQkgICAgICAiU3RhdGlzdGljc19SeCAtIENDSzoiKTsKKwlwb3MgKz0KKwkgICAgc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsCisJCSAgICAgICIgICUtMzBzICUxMHUgICUxMHUgICUxMHUgICUxMHVcbiIsICJpbmFfY250OiIsCisJCSAgICAgIGxlMzJfdG9fY3B1KGNjay0+aW5hX2NudCksIGFjY3VtX2Njay0+aW5hX2NudCwKKwkJICAgICAgZGVsdGFfY2NrLT5pbmFfY250LCBtYXhfY2NrLT5pbmFfY250KTsKKwlwb3MgKz0KKwkgICAgc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsCisJCSAgICAgICIgICUtMzBzICUxMHUgICUxMHUgICUxMHUgICUxMHVcbiIsICJmaW5hX2NudDoiLAorCQkgICAgICBsZTM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CB3aXRoc3RhbmQgKi8KKwlJTF9FUlIoIlVuYWJsZSB0byBpbml0aWFsaXplIGRldmljZSBhZnRlciAlZCBhdHRlbXB0cy5cbiIsIGkpOworCXJldHVybiAtRUlPOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBXb3JrcXVldWUgY2FsbGJhY2tzCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAoraWwzOTQ1X2JnX2luaXRfYWxpdmVfc3RhcnQoc3RydWN0IHdvcmtfc3RydWN0ICpkYXRhKQoreworCXN0cnVjdCBpbF9wcml2ICppbCA9CisJICAgIGNvbnRhaW5lcl9vZihkYXRhLCBzdHJ1Y3QgaWxfcHJpdiwgaW5pdF9hbGl2ZV9zdGFydC53b3JrKTsKKworCW11dGV4X2xvY2soJmlsLT5tdXRleCk7CisJaWYgKHRlc3RfYml0KFNfRVhJVF9QRU5ESU5HLCAmaWwtPnN0YXR1cykpCisJCWdvdG8gb3V0OworCisJaWwzOTQ1X2luaXRfYWxpdmVfc3RhcnQoaWwpOworb3V0OgorCW11dGV4X3VubG9jaygmaWwtPm11dGV4KTsKK30KKworc3RhdGljIHZvaWQKK2lsMzk0NV9iZ19hbGl2ZV9zdGFydChzdHJ1Y3Qgd29ya19zdHJ1Y3QgKmRhdGEpCit7CisJc3RydWN0IGlsX3ByaXYgKmlsID0KKwkgICAgY29udGFpbmVyX29mKGRhdGEsIHN0cnVjdCBpbF9wcml2LCBhbGl2ZV9zdGFydC53b3JrKTsKKworCW11dGV4X2xvY2soJmlsLT5tdXRleCk7CisJaWYgKHRlc3RfYml0KFNfRVhJVF9QRU5ESU5HLCAmaWwtPnN0YXR1cykpCisJCWdvdG8gb3V0OworCisJaWwzOTQ1X2FsaXZlX3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9hdHRyaWJ1dGUgKmF0dHIsIGNoYXIgKmJ1ZikKK3sKKwlzdHJ1Y3QgaWxfcHJpdiAqaWwgPSBkZXZfZ2V0X2RydmRhdGEoZCk7CisJaWYgKCFpbF9pc19hbGl2ZShpbCkpCisJCXJldHVybiAtRUFHQUlOOworCXJldHVybiBzcHJpbnRmKGJ1ZiwgIjB4JTA4eFxuIiwgKGludClpbC0+c3RhdHVzKTsKK30KKworc3RhdGljIERFVklDRV9BVFRSKHN0YXR1cywgU19JUlVHTywgaWwzOTQ1X3Nob3dfc3RhdHVzLCBOVUxMKTsKKworc3RhdGljIHNzaXplX3QKK2lsMzk0NV9kdW1wX2Vycm9yX2xvZyhzdHJ1Y3QgZGV2aWNlICpkLCBzdHJ1Y3QgZGV2aWNlX2F0dHJpYnV0ZSAqYXR0ciwKKwkJICAgICAgY29uc3QgY2hhciAqYnVmLCBzaXplX3QgY291bnQpCit7CisJc3RydWN0IGlsX3ByaXYgKmlsID0gZGV2X2dldF9kcnZkYXRhKGQpOworCWNoYXIgKnAgPSAoY2hhciAqKWJ1ZjsKKworCWlmIChwWzBdID09ICcxJykKKwkJaWwzOTQ1X2R1bXBfbmljX2Vycm9yX2xvZyhpbCk7CisKKwlyZXR1cm4gc3RybmxlbihidWYsIGNvdW50KTsKK30KKworc3RhdGljIERFVklDRV9BVFRSKGR1bXBfZXJyb3JzLCBTX0lXVVNSLCBOVUxMLCBpbDM5NDVfZHVtcF9lcnJvcl9sb2cpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBkcml2ZXIgc2V0dXAgYW5kIHRlYXIgZG93bgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQKK2lsMzk0NV9zZXR1cF9kZWZlcnJlZF93b3Jr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ICAgICAgIFBDSUVfTElOS19TVEFURV9DTEtQTSk7CisKKwlpZiAocGNpX2VuYWJsZV9kZXZpY2UocGRldikpIHsKKwkJZXJyID0gLUVOT0RFVjsKKwkJZ290byBvdXRfaWVlZTgwMjExX2ZyZWVfaHc7CisJfQorCisJcGNpX3NldF9tYXN0ZXIocGRldik7CisKKwllcnIgPSBwY2lfc2V0X2RtYV9tYXNrKHBkZXYsIERNQV9CSVRfTUFTSygzMikpOworCWlmICghZXJyKQorCQllcnIgPSBwY2lfc2V0X2NvbnNpc3RlbnRfZG1hX21hc2socGRldiwgRE1BX0JJVF9NQVNLKDMyKSk7CisJaWYgKGVycikgeworCQlJTF9XQVJOKCJObyBzdWl0YWJsZSBETUEgYXZhaWxhYmxlLlxuIik7CisJCWdvdG8gb3V0X3BjaV9kaXNhYmxlX2RldmljZTsKKwl9CisKKwlwY2lfc2V0X2RydmRhdGEocGRldiwgaWwpOworCWVyciA9IHBjaV9yZXF1ZXN0X3JlZ2lvbnMocGRldiwgRFJWX05BTUUpOworCWlmIChlcnIpCisJCWdvdG8gb3V0X3BjaV9kaXNhYmxlX2RldmljZTsKKworCS8qKioqKioqKioqKioqKioqKioqKioqKgorCSAqIDMuIFJlYWQgUkVWIFJlZ2lzdGVyCisJICogKioqKioqKioqKioqKioqKioqKiovCisJaWwtPmh3X2Jhc2UgPSBwY2lfaW9tYXAocGRldiwgMCwgMCk7CisJaWYgKCFpbC0+aHdfYmFzZSkgeworCQllcnIgPSAtRU5PREVWOworCQlnb3RvIG91dF9wY2lfcmVsZWFzZV9yZWdpb25zOworCX0KKworCURfSU5GTygicGNpX3Jlc291cmNlX2xlbiA9IDB4JTA4bGx4XG4iLAorCSAgICAgICAodW5zaWduZWQgbG9uZyBsb25nKXBjaV9yZXNvdXJjZV9sZW4ocGRldiwgMCkpOworCURfSU5GTygicGNpX3Jlc291cmNlX2Jhc2UgPSAlcFxuIiwgaWwtPmh3X2Jhc2UpOworCisJLyogV2UgZGlzYWJsZSB0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9yIDM5NDUvNDk2NSAqLworCWVlcHJvbSA9IChzdHJ1Y3QgaWwzOTQ1X2VlcHJvbSAqKWlsLT5lZXByb207CisJRF9JTkZPKCJNQUMgYWRkcmVzczogJXBNXG4iLCBlZXByb20tPm1hY19hZGRyZXNzKTsKKwlTRVRfSUVFRTgwMjExX1BFUk1fQUREUihpbC0+aHcsIGVlcHJvbS0+bWFjX2FkZHJlc3MpOworCisJLyoqKioqKioqKioqKioqKioqKioqKioqCisJICogNS4gU2V0dXAgSFcgQ29uc3RhbnRzCisJICogKioqKioqKioqKioqKioqKioqKiovCisJLyogRGV2aWNlLXNwZWNpZmljIHNldHVwICovCisJaWYgKGlsMzk0NV9od19zZXRfaHdfcGFyYW1zKGlsKSkgeworCQlJTF9FUlIoImZhaWxlZCB0byBzZXQgaHcgc2V0dGluZ3NcbiIpOworCQlnb3RvIG91dF9lZXByb21fZnJlZTsKKwl9CisKKwkvKioqKioqKioqKioqKioqKioqKioqKioKKwkgKiA2LiBTZXR1cCBpbAorCSAqICoqKioqKioqKioqKioqKioqKioqLworCisJZXJyID0gaWwzOTQ1X2luaXRfZHJ2KGlsKTsKKwlpZiAoZXJyKSB7CisJCUlMX0VSUigiaW5pdGlhbGl6aW5nIGRyaXZlciBmYWlsZWRcbiIpOworCQlnb3RvIG91dF91bnNldF9od19wYXJhbXM7CisJfQorCisJSUxfSU5GTygiRGV0ZWN0ZWQgSW50ZWwgV2lyZWxlc3MgV2lGaSBMaW5rICVzXG4iLCBpbC0+Y2ZnLT5uYW1lKTsKKworCS8qKioqKioqKioqKioqKioqKioqKioqKgorCSAqIDcuIFNldHVwIFNlcnZpY2VzCisJICogKioqKioqKioqKioqKioqKioqKiovCisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmaWwtPmxvY2ssIGZsYWdzKTsKKwlpbF9kaXNhYmxlX2ludGVycnVwdHMoaWwpOworCXNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJmlsLT5sb2NrLCBmbGFncyk7CisKKwl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X21lbShpbCk7CisKKwlmcmVlX2lycShwZGV2LT5pcnEsIGlsKTsKKwlwY2lfZGlzYWJsZV9tc2kocGRldik7CisKKwlwY2lfaW91bm1hcChwZGV2LCBpbC0+aHdfYmFzZSk7CisJcGNpX3JlbGVhc2VfcmVnaW9ucyhwZGV2KTsKKwlwY2lfZGlzYWJsZV9kZXZpY2UocGRldik7CisJcGNpX3NldF9kcnZkYXRhKHBkZXYsIE5VTEwpOworCisJaWxfZnJlZV9jaGFubmVsX21hcChpbCk7CisJaWxfZnJlZV9nZW9zKGlsKTsKKwlrZnJlZShpbC0+c2Nhbl9jbWQpOworCWlmIChpbC0+YmVhY29uX3NrYikKKwkJZGV2X2tmcmVlX3NrYihpbC0+YmVhY29uX3NrYik7CisKKwlpZWVlODAyMTFfZnJlZV9odyhpbC0+aHcpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBkcml2ZXIgYW5kIG1vZHVsZSBlbnRyeSBwb2ludAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHN0cnVjdCBwY2lfZHJpdmVyIGlsMzk0NV9kcml2ZXIgPSB7CisJLm5hbWUgPSBEUlZfTkFNRSwKKwkuaWRfdGFibGUgPSBpbDM5NDVfaHdfY2FyZF9pZHMsCisJLnByb2JlID0gaWwzOTQ1X3BjaV9wcm9iZSwKKwkucmVtb3ZlID0gX19kZXZleGl0X3AoaWwzOTQ1X3BjaV9yZW1vdmUpLAorCS5kcml2ZXIucG0gPSBJTF9MRUdBQ1lfUE1fT1BTLAorfTsKKworc3RhdGljIGludCBfX2luaXQKK2lsMzk0NV9pbml0KHZvaWQpCit7CisKKwlpbnQgcmV0OworCXByX2luZm8oRFJWX0RFU0NSSVBUSU9OICIsICIgRFJWX1Z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B4JXhcbiIsCisJCQkgICAgICAgQlNNX1NSQU1fTE9XRVJfQk9VTkQsIHJlZyAtIEJTTV9TUkFNX0xPV0VSX0JPVU5ELAorCQkJICAgICAgIGxlbiwgdmFsLCBsZTMyX3RvX2NwdSgqaW1hZ2UpKTsKKwkJCXJldHVybiAtRUlPOworCQl9CisJfQorCisJRF9JTkZPKCJCU00gYm9vdHN0cmFwIHVDb2RlIGltYWdlIE9LXG4iKTsKKworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRUVQUk9NIHJlbGF0ZWQgZnVuY3Rpb25zCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIENsZWFyIHRoZSBPV05FUl9NU0ssIHRvIGVzdGFibGlzaCBkcml2ZXIgKGluc3RlYWQgb2YgdUNvZGUgcnVubmluZyBvbgorICogZW1iZWRkZWQgY29udHJvbGxlcikgYXMgRUVQUk9NIHJlYWRlcjsgZWFjaCByZWFkIGlzIGEgc2VyaWVzIG9mIHB1bHNlcworICogdG8vZnJvbSB0aGUgRUVQUk9NIGNoaXAsIG5vdCBhIHNpbmdsZSBldmVudCwgc28gZXZlbiByZWFkcyBjb3VsZCBjb25mbGljdAorICogaWYgdGhleSB3ZXJlbid0IGFyYml0cmF0ZWQgYnkgc29tZSBvd25lcnNoaXAgbWVjaGFuaXNtLiAgSGVyZSwgdGhlIGRyaXZlcgorICogc2ltcGx5IGNsYWltcyBvd25lcnNoaXAsIHdoaWNoIHNob3VsZCBiZSBzYWZlIHdoZW4gdGhpcyBmdW5jdGlvbiBpcyBjYWxsZWQKKyAqIChpLmUuIGJlZm9yZSBsb2FkaW5nIHVDb2RlISkuCisgKi8KK3N0YXRpYyBpbnQKK2lsMzk0NV9lZXByb21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UFCTEUgRk9SIEFOWSBESVJFQ1QsIElORElSRUNULCBJTkNJREVOVEFMLAorICogU1BFQ0lBTCwgRVhFTVBMQVJZLCBPUiBDT05TRVFVRU5USUFMIERBTUFHRVMgKElOQ0xVRElORywgQlVUIE5PVAorICogTElNSVRFRCBUTywgUFJPQ1VSRU1FTlQgT0YgU1VCU1RJVFVURSBHT09EUyBPUiBTRVJWSUNFUzsgTE9TUyBPRiBVU0UsCisgKiBEQVRBLCBPUiBQUk9GSVRTOyBPUiBCVVNJTkVTUyBJTlRFUlJVUFRJT04pIEhPV0VWRVIgQ0FVU0VEIEFORCBPTiBBTlkKKyAqIFRIRU9SWSBPRiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQ09OVFJBQ1QsIFNUUklDVCBMSUFCSUxJVFksIE9SIFRPUlQKKyAqIChJTkNMVURJTkcgTkVHTElHRU5DRSBPUiBPVEhFUldJU0UpIEFSSVNJTkcgSU4gQU5ZIFdBWSBPVVQgT0YgVEhFIFVTRQorICogT0YgVEhJUyBTT0ZUV0FSRSwgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRSBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRS4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2luY2x1ZGUgPGxpbnV4L3NsYWIuaD4KKyNpbmNsdWRlIDxuZXQvbWFjODAyMTEuaD4KKworI2luY2x1ZGUgImNvbW1vbi5oIgorI2luY2x1ZGUgIjQ5NjUuaCIKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBJTklUIGNhbGlicmF0aW9ucyBmcmFtZXdvcmsKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RydWN0IHN0YXRzX2dlbmVyYWxfZGF0YSB7CisJdTMyIGJlYWNvbl9zaWxlbmNlX3Jzc2lfYTsKKwl1MzIgYmVhY29uX3NpbGVuY2VfcnNzaV9iOworCXUzMiBiZWFjb25fc2lsZW5jZV9yc3NpX2M7CisJdTMyIGJlYWNvbl9lbmVyZ3lfYTsKKwl1MzIgYmVhY29uX2VuZXJneV9iOworCXUzMiBiZWFjb25fZW5lcmd5X2M7Cit9OworCit2b2lkCitpbDQ5NjVfY2FsaWJfZnJlZV9yZXN1bHRzKHN0cnVjdCBpbF9wcml2ICppbCkKK3sKKwlpbnQgaTsKKworCWZvciAoaSA9IDA7IGkgPCBJTF9DQUxJQl9NQVg7IGkrKykgeworCQlrZnJlZShpbC0+Y2FsaWJfcmVzdWx0c1tpXS5idWYpOworCQlpbC0+Y2FsaWJfcmVzdWx0c1tpXS5idWYgPSBOVUxMOworCQlpbC0+Y2FsaWJfcmVzdWx0c1tpXS5idWZfbGVuID0gMDsKKwl9Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUlVOVElNRSBjYWxpYnJhdGlvbnMgZnJhbWV3b3JrCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qICJmYWxzZSBhbGFybXMiIGFyZSBzaWduYWxzIHRoYXQgb3VyIERTUCB0cmllcyB0byBsb2NrIG9udG8sCisgKiAgIGJ1dCB0aGVuIGRldGVybWluZXMgdGhhdCB0aGV5IGFyZSBlaXRoZXIgbm9pc2UsIG9yIHRyYW5zbWlzc2lvbnMKKyAqICAgZnJvbSBhIGRpc3RhbnQgd2lyZWxlc3MgbmV0d29yayAoYWxzbyAibm9pc2UiLCByZWFsbHkpIHRoYXQgZ2V0CisgKiAgICJzdGVwcGVkIG9uIiBieSBzdHJvbmdlci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2NrLT5zZW50X2Fja19jbnQpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgZm10X3RhYmxlLCAic2VudF9jdHNfY250OiIsCisJCSAgICAgIGxlMzJfdG9fY3B1KGNjay0+c2VudF9jdHNfY250KSwgYWNjdW1fY2NrLT5zZW50X2N0c19jbnQsCisJCSAgICAgIGRlbHRhX2Njay0+c2VudF9jdHNfY250LCBtYXhfY2NrLT5zZW50X2N0c19jbnQpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgZm10X3RhYmxlLCAic2VudF9iYV9yc3BfY250OiIsCisJCSAgICAgIGxlMzJfdG9fY3B1KGNjay0+c2VudF9iYV9yc3BfY250KSwKKwkJICAgICAgYWNjdW1fY2NrLT5zZW50X2JhX3JzcF9jbnQsIGRlbHRhX2Njay0+c2VudF9iYV9yc3BfY250LAorCQkgICAgICBtYXhfY2NrLT5zZW50X2JhX3JzcF9jbnQpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgZm10X3RhYmxlLCAiZHNwX3NlbGZfa2lsbDoiLAorCQkgICAgICBsZTMyX3RvX2NwdShjY2stPmRzcF9zZWxmX2tpbGwpLCBhY2N1bV9jY2stPmRzcF9zZWxmX2tpbGwsCisJCSAgICAgIGRlbHRhX2Njay0+ZHNwX3NlbGZfa2lsbCwgbWF4X2Njay0+ZHNwX3NlbGZfa2lsbCk7CisJcG9zICs9CisJICAgIHNjbnByaW50ZihidWYgKyBwb3MsIGJ1ZnN6IC0gcG9zLCBmbXRfdGFibGUsICJtaF9mb3JtYXRfZXJyOiIsCisJCSAgICAgIGxlMzJfdG9fY3B1KGNjay0+bWhfZm9ybWF0X2VyciksIGFjY3VtX2Njay0+bWhfZm9ybWF0X2VyciwKKwkJICAgICAgZGVsdGFfY2NrLT5taF9mb3JtYXRfZXJyLCBtYXhfY2NrLT5taF9mb3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TY1LmgiCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBtb2R1bGUgYm9pbGVyIHBsYXRlCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIG1vZHVsZSBuYW1lLCBjb3B5cmlnaHQsIHZlcnNpb24sIGV0Yy4KKyAqLworI2RlZmluZSBEUlZfREVTQ1JJUFRJT04JIkludGVsKFIpIFdpcmVsZXNzIFdpRmkgNDk2NSBkcml2ZXIgZm9yIExpbnV4IgorCisjaWZkZWYgQ09ORklHX0lXTEVHQUNZX0RFQlVHCisjZGVmaW5lIFZEICJkIgorI2Vsc2UKKyNkZWZpbmUgVkQKKyNlbmRpZgorCisjZGVmaW5lIERSVl9WRVJTSU9OICAgICBJV0xXSUZJX1ZFUlNJT04gVkQKKworTU9EVUxFX0RFU0NSSVBUSU9OKERSVl9ERVNDUklQVElPTik7CitNT0RVTEVfVkVSU0lPTihEUlZfVkVSU0lPTik7CitNT0RVTEVfQVVUSE9SKERSVl9DT1BZUklHSFQgIiAiIERSVl9BVVRIT1IpOworTU9EVUxFX0xJQ0VOU0UoIkdQTCIpOworTU9EVUxFX0FMSUFTKCJpd2w0OTY1Iik7CisKK3ZvaWQKK2lsNDk2NV9jaGVja19hYm9ydF9zdGF0dXMoc3RydWN0IGlsX3ByaXYgKmlsLCB1OCBmcmFtZV9jb3VudCwgdTMyIHN0YXR1cykKK3sKKwlpZiAoZnJhbWVfY291bnQgPT0gMSAmJiBzdGF0dXMgPT0gVFhfU1RBVFVTX0ZBSUxfUkZLSUxMX0ZMVVNIKSB7CisJCUlMX0VSUigiVHggZmx1c2ggY29tbWFuZCB0byBmbHVzaCBvdXQgYWxsIGZyYW1lc1xuIik7CisJCWlmICghdGVzdF9iaXQoU19FWElU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sLT5pbnRhX21hc2spKSB7CisJCUlMX1dBUk4oIkRpc2FibGVkIElOVEEgYml0cyAweCUwOHggd2VyZSBwZW5kaW5nXG4iLAorCQkJaW50YSAmIH5pbC0+aW50YV9tYXNrKTsKKwkJSUxfV0FSTigiICAgd2l0aCBGSDQ5X0lOVCA9IDB4JTA4eFxuIiwgaW50YV9maCk7CisJfQorCisJLyogUmUtZW5hYmxlIGFsbCBpbnRlcnJ1cHRzICovCisJLyogb25seSBSZS1lbmFibGUgaWYgZGlzYWJsZWQgYnkgaXJxICovCisJaWYgKHRlc3RfYml0KFNfSU5UX0VOQUJMRUQsICZpbC0+c3RhdHVzKSkKKwkJaWxfZW5hYmxlX2ludGVycnVwdHMoaWwpOworCS8qIFJlLWVuYWJsZSBSRl9LSUxMIGlmIGl0IG9jY3VycmVkICovCisJZWxzZSBpZiAoaGFuZGxlZCAmIENTUl9JTlRfQklUX1JGX0tJTEwpCisJCWlsX2VuYWJsZV9yZmtpbGxfaW50KGlsKTsKKworI2lmZGVmIENPTkZJR19JV0xFR0FDWV9ERUJVRworCWlmIChpbF9nZXRfZGVidWdfbGV2ZWwoaWwpICYgKElMX0RMX0lTUikpIHsKKwkJaW50YSA9IF9pbF9yZChpbCwgQ1NSX0lOVCk7CisJCWludGFfbWFzayA9IF9pbF9yZChpbCwgQ1NSX0lOVF9NQVNLKTsKKwkJaW50YV9maCA9IF9pbF9yZChpbCwgQ1NSX0ZIX0lOVF9TVEFUVVMpOworCQlEX0lTUigiRW5kIGludGEgMHglMDh4LCBlbmFibGVkIDB4JTA4eCwgZmggMHglMDh4LCAiCisJCSAgICAgICJmbGFncyAweCUwOGx4XG4iLCBpbnRhLCBpbnRhX21hc2ssIGludGFfZmgsIGZsYWdzKTsKKwl9CisjZW5kaWYKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogc3lzZnMgYXR0cmlidXR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worCQkvKiBzdGFydCBjYXJkOyAiaW5pdGlhbGl6ZSIgd2lsbCBsb2FkIHJ1bnRpbWUgdWNvZGUgKi8KKwkJaWw0OTY1X25pY19zdGFydChpbCk7CisKKwkJRF9JTkZPKERSVl9OQU1FICIgaXMgY29taW5nIHVwXG4iKTsKKworCQlyZXR1cm4gMDsKKwl9CisKKwlzZXRfYml0KFNfRVhJVF9QRU5ESU5HLCAmaWwtPnN0YXR1cyk7CisJX19pbDQ5NjVfZG93bihpbCk7CisJY2xlYXJfYml0KFNfRVhJVF9QRU5ESU5HLCAmaWwtPnN0YXR1cyk7CisKKwkvKiB0cmllZCB0byByZXN0YXJ0IGFuZCBjb25maWcgdGhlIGRldmljZSBmb3IgYXMgbG9uZyBhcyBvdXIKKwkgKiBwYXRpZW5jZSBjb3VsZCB3aXRoc3RhbmQgKi8KKwlJTF9FUlIoIlVuYWJsZSB0byBpbml0aWFsaXplIGRldmljZSBhZnRlciAlZCBhdHRlbXB0cy5cbiIsIGkpOworCXJldHVybiAtRUlPOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBXb3JrcXVldWUgY2FsbGJhY2tzCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAoraWw0OTY1X2JnX2luaXRfYWxpdmVfc3RhcnQoc3RydWN0IHdvcmtfc3RydWN0ICpkYXRhKQoreworCXN0cnVjdCBpbF9wcml2ICppbCA9CisJICAgIGNvbnRhaW5lcl9vZihkYXRhLCBzdHJ1Y3QgaWxfcHJpdiwgaW5pdF9hbGl2ZV9zdGFydC53b3JrKTsKKworCW11dGV4X2xvY2soJmlsLT5tdXRleCk7CisJaWYgKHRlc3RfYml0KFNfRVhJVF9QRU5ESU5HLCAmaWwtPnN0YXR1cyk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CA9IGNvbnRhaW5lcl9vZihkYXRhLCBzdHJ1Y3QgaWxfcHJpdiwgcnhfcmVwbGVuaXNoKTsKKworCWlmICh0ZXN0X2JpdChTX0VYSVRfUEVORElORywgJmlsLT5zdGF0dXMpKQorCQlyZXR1cm47CisKKwltdXRleF9sb2NrKCZpbC0+bXV0ZXgpOworCWlsNDk2NV9yeF9yZXBsZW5pc2goaWwpOworCW11dGV4X3VubG9jaygmaWwtPm11dGV4KTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogbWFjODAyMTEgZW50cnkgcG9pbnQgZnVuY3Rpb25zCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjZGVmaW5lIFVDT0RFX1JFQURZX1RJTUVPVVQJKDQgKiBIWikKKworLyoKKyAqIE5vdCBhIG1hYzgwMjExIGVudHJ5IHBvaW50IGZ1bmN0aW9uLCBidXQgaXQgZml0cyBpbiB3aXRoIGFsbCB0aGUKKyAqIG90aGVyIG1hYzgwMjExIGZ1bmN0aW9ucyBncm91cGVkIGhlcmUuCisgKi8KK3N0YXRpYyBpbnQKK2lsNDk2NV9tYWNfc2V0dXBfcmVnaXN0ZXIoc3RydWN0IGlsX3ByaXYgKmlsLCB1MzIgbWF4X3Byb2JlX2xlbmd0aCkKK3sKKwlpbnQgcmV0OworCXN0cnVjdCBpZWVlODAyMTFfaHcgKmh3ID0gaWwtPmh3OworCisJaHctPnJhdGVfY29udHJvbF9hbGdvcml0aG0gPSAiaXdsLTQ5NjUtcnMiOworCisJLyogVGVsbCBtYWM4MDIxMSBvdXIgY2hhcmFjdGVyaXN0aWNzICovCisJaHctPmZsYWdzID0KKwkgICAgSUVFRTgwMjExX0hXX1NJR05BTF9EQk0gfCBJRUVFODAyMTFfSFdfQU1QRFVfQU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Pm11dGV4KTsKKworCWlsLT5jdHguc3RhZ2luZy5maWx0ZXJfZmxhZ3MgJj0gfmZpbHRlcl9uYW5kOworCWlsLT5jdHguc3RhZ2luZy5maWx0ZXJfZmxhZ3MgfD0gZmlsdGVyX29yOworCisJLyoKKwkgKiBOb3QgY29tbWl0dGluZyBkaXJlY3RseSBiZWNhdXNlIGhhcmR3YXJlIGNhbiBwZXJmb3JtIGEgc2NhbiwKKwkgKiBidXQgd2UnbGwgZXZlbnR1YWxseSBjb21taXQgdGhlIGZpbHRlciBmbGFncyBjaGFuZ2UgYW55d2F5LgorCSAqLworCisJbXV0ZXhfdW5sb2NrKCZpbC0+bXV0ZXgpOworCisJLyoKKwkgKiBSZWNlaXZpbmcgYWxsIG11bHRpY2FzdCBmcmFtZXMgaXMgYWx3YXlzIGVuYWJsZWQgYnkgdGhlCisJICogZGVmYXVsdCBmbGFncyBzZXR1cCBpbiBpbF9jb25uZWN0aW9uX2luaXRfcnhfY29uZmlnKCkKKwkgKiBzaW5jZSB3ZSBjdXJyZW50bHkgZG8gbm90IHN1cHBvcnQgcHJvZ3JhbW1pbmcgbXVsdGljYXN0CisJICogZmlsdGVycyBpbnRvIHRoZSBkZXZpY2UuCisJICovCisJKnRvdGFsX2ZsYWdzICY9CisJICAgIEZJRl9PVEhFUl9CU1MgfCBGSUZfQUxMTVVMVEkgfCBGSUZfUFJPTUlTQ19JTl9CU1MgfAorCSAgICBGSUZfQkNOX1BSQlJFU1BfUFJPTUlTQyB8IEZJRl9DT05UUk9MOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBkcml2ZXIgc2V0dXAgYW5kIHRlYXJkb3duCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAoraWw0OTY1X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ycSwgaWwpOworCXBjaV9kaXNhYmxlX21zaShpbC0+cGNpX2Rldik7CisJcGNpX2lvdW5tYXAocGRldiwgaWwtPmh3X2Jhc2UpOworCXBjaV9yZWxlYXNlX3JlZ2lvbnMocGRldik7CisJcGNpX2Rpc2FibGVfZGV2aWNlKHBkZXYpOworCXBjaV9zZXRfZHJ2ZGF0YShwZGV2LCBOVUxMKTsKKworCWlsNDk2NV91bmluaXRfZHJ2KGlsKTsKKworCWRldl9rZnJlZV9za2IoaWwtPmJlYWNvbl9za2IpOworCisJaWVlZTgwMjExX2ZyZWVfaHcoaWwtPmh3KTsKK30KKworLyoKKyAqIEFjdGl2YXRlL0RlYWN0aXZhdGUgVHggRE1BL0ZJRk8gY2hhbm5lbHMgYWNjb3JkaW5nIHR4IGZpZm9zIG1hc2sKKyAqIG11c3QgYmUgY2FsbGVkIHVuZGVyIGlsLT5sb2NrIGFuZCBtYWMgYWNjZXNzCisgKi8KK3ZvaWQKK2lsNDk2NV90eHFfc2V0X3NjaGVkKHN0cnVjdCBpbF9wcml2ICppbCwgdTMyIG1hc2spCit7CisJaWxfd3JfcHJwaChpbCwgSUw0OV9TQ0RfVFhGQUNULCBtYXNrKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogZHJpdmVyIGFuZCBtb2R1bGUgZW50cnkgcG9pbnQKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIEhhcmR3YXJlIHNwZWNpZmljIGZpbGUgZGVmaW5lcyB0aGUgUENJIElEcyB0YWJsZSBmb3IgdGhhdCBoYXJkd2FyZSBtb2R1bGUgKi8KK3N0YXRpYyBERUZJTkVfUENJX0RFVklDRV9UQUJMRShpbDQ5NjVfaHdfY2FyZF9pZHMpID0geworCXtJTF9QQ0lfRE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worCQlyZXR1cm4gMDsKKwl9CisKKwkvKiBUcnkgcnVudGltZS9wcm90b2NvbCAqLworCWltYWdlID0gKF9fbGUzMiAqKSBpbC0+dWNvZGVfY29kZS52X2FkZHI7CisJbGVuID0gaWwtPnVjb2RlX2NvZGUubGVuOworCXJldCA9IGlsNDk2NV92ZXJpZnlfaW5zdF9zcGFyc2UoaWwsIGltYWdlLCBsZW4pOworCWlmICghcmV0KSB7CisJCURfSU5GTygiUnVudGltZSB1Q29kZSBpcyBnb29kIGluIGluc3QgU1JBTVxuIik7CisJCXJldHVybiAwOworCX0KKworCUlMX0VSUigiTk8gVkFMSUQgVUNPREUgSU1BR0UgSU4gSU5TVFJVQ1RJT04gU1JBTSEhXG4iKTsKKworCS8qIFNpbmNlIG5vdGhpbmcgc2VlbXMgdG8gbWF0Y2gsIHNob3cgZmlyc3Qgc2V2ZXJhbCBkYXRhIGVudHJpZXMgaW4KKwkgKiBpbnN0cnVjdGlvbiBTUkFNLCBzbyBtYXliZSB2aXN1YWwgaW5zcGVjdGlvbiB3aWxsIGdpdmUgYSBjbHVlLgorCSAqIFNlbGVjdGlvbiBvZiBib290c3RyYXAgaW1hZ2UgKHZzLiBvdGhlciBpbWFnZXMpIGlzIGFyYml0cmFyeS4gKi8KKwlpbWFnZSA9IChfX2xlMzIgKikgaWwtPnVjb2RlX2Jvb3Qudl9hZGRyOworCWxlbiA9IGlsLT51Y29kZV9ib290LmxlbjsKKwlyZXQgPSBpbDQ5NjVfdmVyaWZ5X2luc3RfZnVsbChpbCwgaW1hZ2UsIGxlbik7CisKKwlyZXR1cm4gcmV0OworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRUVQUk9NIHJlbGF0ZWQgZnVuY3Rpb25zCisgKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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dGhlIGRyaXZlci4KKyAqLworI2RlZmluZSBNSU5fVFhfR0FJTl9JRFgJCSgwKQkvKiBoaWdoZXN0IGdhaW4sIGxvd2VzdCBpZHgsIDIuNCAqLworI2RlZmluZSBNSU5fVFhfR0FJTl9JRFhfNTJHSFpfRVhUCSgtOSkJLyogaGlnaGVzdCBnYWluLCBsb3dlc3QgaWR4LCA1ICovCisKKy8qKgorICogMi40IEdIeiBnYWluIHRhYmxlCisgKgorICogSW5kZXggICAgRHNwIGdhaW4gICBSYWRpbyBnYWluCisgKiAgIDAgICAgICAgIDExMCAgICAgICAgIDB4M2YgICAgICAoaGlnaGVzdCBnYWluKQorICogICAxICAgICAgICAxMDQgICAgICAgICAweDNmCisgKiAgIDIgICAgICAgICA5OCAgICAgICAgIDB4M2YKKyAqICAgMyAgICAgICAgMTEwICAgICAgICAgMHgzZQorICogICA0ICAgICAgICAxMDQgICAgICAgICAweDNlCisgKiAgIDUgICAgICAgICA5OCAgICAgICAgIDB4M2UKKyAqICAgNiAgICAgICAgMTEwICAgICAgICAgMHgzZAorICogICA3ICAgICAgICAxMDQgICAgICAgICAweDNkCisgKiAgIDggICAgICAgICA5OCAgICAgICAgIDB4M2QKKyAqICAgOSAgICAgICAgMTEwICAgICAgICAgMHgzYworICogIDEwICAgICAgICAxMDQgICAgICAgICAweDNjCisgKiAgMTEgICAgICAgICA5OCAgICAgICAgIDB4M2MKKyAqICAxMiAgICAgICAgMTEwICAgICAgICAgMHgzYgorICogIDEzICAgICAgICAxMDQgICAgICAgICAweDNiCisgKiAgMTQgICAgICAgICA5OCAgICAgICAgIDB4M2IKKyAqICAxNSAgICAgICAgMTEwICAgICAgICAgMHgzYQorICogIDE2ICAgICAgICAxMDQgICAgICAgICAweDNhCisgKiAgMTcgICAgICAgICA5OCAgICAgICAgIDB4M2EKKyAqICAxOCAgICAgICAgMTEwICAgICAgICAgMHgzOQorICogIDE5ICAgICAgICAxMDQgICAgICAgICAweDM5CisgKiAgMjAgICAgICAgICA5OCAgICAgICAgIDB4MzkKKyAqICAyMSAgICAgICAgMTEwICAgICAgICAgMHgzOAorICogIDIyICAgICAgICAxMDQgICAgICAgICAweDM4CisgKiAgMjMgICAgICAgICA5OCAgICAgICAgIDB4MzgKKyAqICAyNCAgICAgICAgMTEwICAgICAgICAgMHgzNworICogIDI1ICAgICAgICAxMDQgICAgICAgICAweDM3CisgKiAgMjYgICAgICAgICA5OCAgICAgICAgIDB4MzcKKyAqICAyNyAgICAgICAgMTEwICAgICAgICAgMHgzNgorICogIDI4ICAgICAgICAxMDQgICAgICAgICAweDM2CisgKiAgMjkgICAgICAgICA5OCAgICAgICAgIDB4MzYKKyAqICAzMCAgICAgICAgMTEwICAgICAgICAgMHgzNQorICogIDMxICAgICAgICAxMDQgICAgICAgICAweDM1CisgKiAgMzIgICAgICAgICA5OCAgICAgICAgIDB4MzUKKyAqICAzMyAgICAgICAgMTEwICAgICAgICAgMHgzNAorICogIDM0ICAgICAgICAxMDQgICAgICAgICAweDM0CisgKiAgMzUgICAgICAgICA5OCAgICAgICAgIDB4MzQKKyAqICAzNiAgICAgICAgMTEwICAgICAgICAgMHgzMworICogIDM3ICAgICAgICAxMDQgICAgICAgICAweDMzCisgKiAgMzggICAgICAgICA5OCAgICAgICAgIDB4MzMKKyAqICAzOSAgICAgICAgMTEwICAgICAgICAgMHgzMgorICogIDQwICAgICAgICAxMDQgICAgICAgICAweDMyCisgKiAgNDEgICAgICAgICA5OCAgICAgICAgIDB4MzIKKyAqICA0MiAgICAgICAgMTEwICAgICAgICAgMHgzMQorICogIDQzICAgICAgICAxMDQgICAgICAgICAweDMxCisgKiAgNDQgICAgICAgICA5OCAgICAgICAgIDB4MzEKKyAqICA0NSAgICAgICAgMTEwICAgICAgICAgMHgzMAorICogIDQ2ICAgICAgICAxMDQgICAgICAgICAweDMwCisgKiAgNDcgICAgICAgICA5OCAgICAgICAgIDB4MzAKKyAqICA0OCAgICAgICAgMTEwICAgICAgICAgIDB4NgorICogIDQ5ICAgICAgICAxMDQgICAgICAgICAgMHg2CisgKiAgNTAgICAgICAgICA5OCAgICAgICAgICAweDYKKyAqICA1MSAgICAgICAgMTEwICAgICAgICAgIDB4NQorICogIDUyICAgICAgICAxMDQgICAgICAgICAgMHg1CisgKiAgNTMgICAgICAgICA5OCAgICAgICAgICAweDUKKyAqICA1NCAgICAgICAgMTEwICAgICAgICAgIDB4NAorICogIDU1ICAgICAgICAxMDQgICAgICAgICAgMHg0CisgKiAgNTYgICAgICAgICA5OCAgICAgICAgICAweDQKKyAqICA1NyAgICAgICAgMTEwICAgICAgICAgIDB4MworICogIDU4ICAgICAgICAxMDQgICAgICAgICAgMHgzCisgKiAgNTkgICAgICAgICA5OCAgICAgICAgICAweDMKKyAqICA2MCAgICAgICAgMTEwICAgICAgICAgIDB4MgorICogIDYxICAgICAgICAxMDQgICAgICAgICAgMHgyCisgKiAgNjIgICAgICAgICA5OCAgICAgICAgICAweDIKKyAqICA2MyAgICAgICAgMTEwICAgICAgICAgIDB4MQorICogIDY0ICAgICAgICAxMDQgICAgICAgICAgMHgxCisgKiAgNjUgICAgICAgICA5OCAgICAgICAgICAweDEKKyAqICA2NiAgICAgICAgMTEwICAgICAgICAgIDB4MAorICogIDY3ICAgICAgICAxMDQgICAgICAgICAgMHgwCisgKiAgNjggICAgICAgICA5OCAgICAgICAgICAweDAKKyAqICA2OSAgICAgICAgIDk3ICAgICAgICAgICAgMAorICogIDcwICAgICAgICAgOTYgICAgICAgICAgICAwCisgKiAgNzEgICAgICAgICA5NSAgICAgICAgICAgIDAKKyAqICA3MiAgICAgICAgIDk0ICAgICAgICAgICAgMAorICogIDczICAgICAgICAgOTMgICAgICAgICAgICAwCisgKiAgNzQgICAgICAgICA5MiAgICAgICAgICAgIDAKKyAqICA3NSAgICAgICAgIDkxICAgICAgICAgICAgMAorICogIDc2ICAgICAgICAgOTAgICAgICAgICAgICAwCisgKiAgNzcgICAgICAgICA4OSAgICAgICAgICAgIDAKKyAqICA3OCAgICAgICAgIDg4ICAgICAgICAgICAgMAorICogIDc5ICAgICAgICAgODcgICAgICAgICAgICAwCisgKiAgODAgICAgICAgICA4NiAgICAgICAgICAgIDAKKyAqICA4MSAgICAgICAgIDg1ICAgICAgICAgICAgMAorICogIDgyICAgICAgICAgODQgICAgICAgICAgICAwCisgKiAgODMgICAgICAgICA4MyAgICAgICAgICAgIDAKKyAqICA4NCAgICAgICAgIDgyICAgICAgICAgICAgMAorICogIDg1ICAgICAgICAgODEgICAgICAgICAgICAwCisgKiAgODYgICAgICAgICA4MCAgICAgICAgICAgIDAKKyAqICA4NyAgICAgICAgIDc5ICAgICAgICAgICAgMAorICogIDg4ICAgICAgICAgNzggICAgICAgICAgICAwCisgKiAgODkgICAgICAgICA3NyAgICAgICAgICAgIDAKKyAqICA5MCAgICAgICAgIDc2ICAgICAgICAgICAgMAorICogIDkxICAgICAgICAgNzUgICAgICAgICAgICAwCisgKiAgOTIgICAgICAgICA3NCAgICAgICAgICAgIDAKKyAqICA5MyAgICAgICAgIDczICAgICAgICAgICAgMAorICogIDk0ICAgICAgICAgNzIgICAgICAgICAgICAwCisgKiAgOTUgICAgICAgICA3MSAgICAgICAgICAgIDAKKyAqICA5NiAgICAgICAgIDcwICAgICAgICAgICAgMAorICogIDk3ICAgICAgICAgNjkgICAgICAgICAgICAwCisgKiAgOTggICAgICAgICA2OCAgICAgICAgICAgIDAKKyAqLworCisvKioKKyAqIDUgR0h6IGdhaW4gdGFibGUKKyAqCisgKiBJbmRleCAgICBEc3AgZ2FpbiAgIFJhZGlvIGdhaW4KKyAqICAtOSAJICAgICAgMTIzICAgICAgICAgMHgzRiAgICAgIChoaWdoZXN0IGdhaW4pCisgKiAgLTggCSAgICAgIDExNyAgICAgICAgIDB4M0YKKyAqICAtNyAgICAgICAgMTEwICAgICAgICAgMHgzRgorICogIC02ICAgICAgICAxMDQgICAgICAgICAweDNGCisgKiAgLTUgICAgICAgICA5OCAgICAgICAgIDB4M0YKKyAqICAtNCAgICAgICAgMTEwICAgICAgICAgMHgzRQorICogIC0zICAgICAgICAxMDQgICAgICAgICAweDNFCisgKiAgLTIgICAgICAgICA5OCAgICAgICAgIDB4M0UKKyAqICAtMSAgICAgICAgMTEwICAgICAgICAgMHgzRAorICogICAwICAgICAgICAxMDQgICAgICAgICAweDNECisgKiAgIDEgICAgICAgICA5OCAgICAgICAgIDB4M0QKKyAqICAgMiAgICAgICAgMTEwICAgICAgICAgMHgzQworICogICAzICAgICAgICAxMDQgICAgICAgICAweDNDCisgKiAgIDQgICAgICAgICA5OCAgICAgICAgIDB4M0MKKyAqICAgNSAgICAgICAgMTEwICAgICAgICAgMHgzQgorICogICA2ICAgICAgICAxMDQgICAgICAgICAweDNCCisgKiAgIDcgICAgICAgICA5OCAgICAgICAgIDB4M0IKKyAqICAgOCAgICAgICAgMTEwICAgICAgICAgMHgzQQorICogICA5ICAgICAgICAxMDQgICAgICAgICAweDNBCisgKiAgMTAgICAgICAgICA5OCAgICAgICAgIDB4M0EKKyAqICAxMSAgICAgICAgMTEwICAgICAgICAgMHgzOQorICogIDEyICAgICAgICAxMDQgICAgICAgICAweDM5CisgKiAgMTMgICAgICAgICA5OCAgICAgICAgIDB4MzkKKyAqICAxNCAgICAgICAgMTEwICAgICAgICAgMHgzOAorICogIDE1ICAgICAgICAxMDQgICAgICAgICAweDM4CisgKiAgMTYgICAgICAgICA5OCAgICAgICAgIDB4MzgKKyAqICAxNyAgICAgICAgMTEwICAgICAgICAgMHgzNworICogIDE4ICAgICAgICAxMDQgICAgICAgICAweDM3CisgKiAgMTkgICAgICAgICA5OCAgICAgICAgIDB4MzcKKyAqICAyMCAgICAgICAgMTEwICAgICAgICAgMHgzNgorICogIDIxICAgICAgICAxMDQgICAgICAgICAweDM2CisgKiAgMjIgICAgICAgICA5OCAgICAgICAgIDB4MzYKKyAqICAyMyAgICAgICAgMTEwICAgICAgICAgMHgzNQorICogIDI0ICAgICAgICAxMDQgICAgICAgICAweDM1CisgKiAgMjUgICAgICAgICA5OCAgICAgICAgIDB4MzUKKyAqICAyNiAgICAgICAgMTEwICAgICAgICAgMHgzNAorICogIDI3ICAgICAgICAxMDQgICAgICAgICAweDM0CisgKiAgMjggICAgICAgICA5OCAgICAgICAgIDB4MzQKKyAqICAyOSAgICAgICAgMTEwICAgICAgICAgMHgzMworICogIDMwICAgICAgICAxMDQgICAgICAgICAweDMzCisgKiAgMzEgICAgICAgICA5OCAgICAgICAgIDB4MzMKKyAqICAzMiAgICAgICAgMTEwICAgICAgICAgMHgzMgorICogIDMzICAgICAgICAxMDQgICAgICAgICAweDMyCisgKiAgMzQgICAgICAgICA5OCAgICAgICAgIDB4MzIKKyAqICAzNSAgICAgICAgMTEwICAgICAgICAgMHgzMQorICogIDM2ICAgICAgICAxMDQgICAgICAgICAweDMxCisgKiAgMzcgICAgICAgICA5OCAgICAgICAgIDB4MzEKKyAqICAzOCAgICAgICAgMTEwICAgICAgICAgMHgzMAorICogIDM5ICAgICAgICAxMDQgICAgICAgICAweDMwCisgKiAgNDAgICAgICAgICA5OCAgICAgICAgIDB4MzAKKyAqICA0MSAgICAgICAgMTEwICAgICAgICAgMHgyNQorICogIDQyICAgICAgICAxMDQgICAgICAgICAweDI1CisgKiAgNDMgICAgICAgICA5OCAgICAgICAgIDB4MjUKKyAqICA0NCAgICAgICAgMTEwICAgICAgICAgMHgyNAorICogIDQ1ICAgICAgICAxMDQgICAgICAgICAweDI0CisgKiAgNDYgICAgICAgICA5OCAgICAgICAgIDB4MjQKKyAqICA0NyAgICAgICAgMTEwICAgICAgICAgMHgyMworICogIDQ4ICAgICAgICAxMDQgICAgICAgICAweDIzCisgKiAgNDkgICAgICAgICA5OCAgICAgICAgIDB4MjMKKyAqICA1MCAgICAgICAgMTEwICAgICAgICAgMHgyMgorICogIDUxICAgICAgICAxMDQgICAgICAgICAweDE4CisgKiAgNTIgICAgICAgICA5OCAgICAgICAgIDB4MTgKKyAqICA1MyAgICAgICAgMTEwICAgICAgICAgMHgxNworICogIDU0ICAgICAgICAxMDQgICAgICAgICAweDE3CisgKiAgNTUgICAgICAgICA5OCAgICAgICAgIDB4MTcKKyAqICA1NiAgICAgICAgMTEwICAgICAgICAgMHgxNgorICogIDU3ICAgICAgICAxMDQgICAgICAgICAweDE2CisgKiAgNTggICAgICAgICA5OCAgICAgICAgIDB4MTYKKyAqICA1OSAgICAgICAgMTEwICAgICAgICAgMHgxNQorICogIDYwICAgICAgICAxMDQgICAgICAgICAweDE1CisgKiAgNjEgICAgICAgICA5OCAgICAgICAgIDB4MTUKKyAqICA2MiAgICAgICAgMTEwICAgICAgICAgMHgxNAorICogIDYzICAgICAgICAxMDQgICAgICAgICAweDE0CisgKiAgNjQgICAgICAgICA5OCAgICAgICAgIDB4MTQKKyAqICA2NSAgICAgICAgMTEwICAgICAgICAgMHgxMworICogIDY2ICAgICAgICAxMDQgICAgICAgICAweDEzCisgKiAgNjcgICAgICAgICA5OCAgICAgICAgIDB4MTMKKyAqICA2OCAgICAgICAgMTEwICAgICAgICAgMHgxMgorICogIDY5ICAgICAgICAxMDQgICAgICAgICAweDA4CisgKiAgNzAgICAgICAgICA5OCAgICAgICAgIDB4MDgKKyAqICA3MSAgICAgICAgMTEwICAgICAgICAgMHgwNworICogIDcyICAgICAgICAxMDQgICAgICAgICAweDA3CisgKiAgNzMgICAgICAgICA5OCAgICAgICAgIDB4MDcKKyAqICA3NCAgICAgICAgMTEwICAgICAgICAgMHgwNgorICogIDc1ICAgICAgICAxMDQgICAgICAgICAweDA2CisgKiAgNzYgICAgICAgICA5OCAgICAgICAgIDB4MDYKKyAqICA3NyAgICAgICAgMTEwICAgICAgICAgMHgwNQorICogIDc4ICAgICAgICAxMDQgICAgICAgICAweDA1CisgKiAgNzkgICAgICAgICA5OCAgICAgICAgIDB4MDUKKyAqICA4MCAgICAgICAgMTEwICAgICAgICAgMHgwNAorICogIDgxICAgICAgICAxMDQgICAgICAgICAweDA0CisgKiAgODIgICAgICAgICA5OCAgICAgICAgIDB4MDQKKyAqICA4MyAgICAgICAgMTEwICAgICAgICAgMHgwMworICogIDg0ICAgICAgICAxMDQgICAgICAgICAweDAzCisgKiAgODUgICAgICAgICA5OCAgICAgICAgIDB4MDMKKyAqICA4NiAgICAgICAgMTEwICAgICAgICAgMHgwMgorICogIDg3ICAgICAgICAxMDQgICAgICAgICAweDAyCisgKiAgODggICAgICAgICA5OCAgICAgICAgIDB4MDIKKyAqICA4OSAgICAgICAgMTEwICAgICAgICAgMHgwMQorICogIDkwICAgICAgICAxMDQgICAgICAgICAweDAxCisgKiAgOTEgICAgICAgICA5OCAgICAgICAgIDB4MDEKKyAqICA5MiAgICAgICAgMTEwICAgICAgICAgMHgwMAorICogIDkzICAgICAgICAxMDQgICAgICAgICAweDAwCisgKiAgOTQgICAgICAgICA5OCAgICAgICAgIDB4MDAKKyAqICA5NSAgICAgICAgIDkzICAgICAgICAgMHgwMAorICogIDk2ICAgICAgICAgODggICAgICAgICAweDAwCisgKiAgOTcgICAgICAgICA4MyAgICAgICAgIDB4MDAKKyAqICA5OCAgICAgICAgIDc4ICAgICAgICAgMHgwMAorICovCisKKy8qKgorICogU2FuaXR5IGNoZWNrcyBhbmQgZGVmYXVsdCB2YWx1ZXMgZm9yIEVFUFJPTSByZWd1bGF0b3J5IGxldmVscy4KKyAqIElmIEVFUFJPTSB2YWx1ZXMgZmFsbCBvdXRzaWRlIE1JTi9NQVggcmFuZ2UsIHVzZSBkZWZhdWx0IHZhbHVlcy4KKyAqCisgKiBSZWd1bGF0b3J5IGxpbWl0cyByZWZlciB0byB0aGUgbWF4aW11bSBhdmVyYWdlIHR4cG93ZXIgYWxsb3dlZCBieQorICogcmVndWxhdG9yeSBhZ2VuY2llcyBpbiB0aGUgZ2VvZ3JhcGhpZXMgaW4gd2hpY2ggdGhlIGRldmljZSBpcyBtZWFudAorICogdG8gYmUgb3BlcmF0ZWQuICBUaGVzZSBsaW1pdHMgYXJlIFNLVS1zcGVjaWZpYyAoaS5lLiBnZW9ncmFwaHktc3BlY2lmaWMpLAorICogYW5k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vKiBzZWUgaWxfbWVhc3VyZW1lbnRfc3RhdHVzICovCiB9IF9fcGFja2VkOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0yMjYwLDEwICsyMjQxLDEwIEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIC8qKgotICogc3RydWN0IGl3bF9wb3dlcnRhYmxlX2NtZCAtIFBvd2VyIFRhYmxlIENvbW1hbmQKKyAqIHN0cnVjdCBpbF9wb3dlcnRhYmxlX2NtZCAtIFBvd2VyIFRhYmxlIENvbW1hbmQKICAqIEBmbGFnczogU2VlIGJlbG93OgogICoKLSAqIFBPV0VSX1RBQkxFX0NNRCA9IDB4NzcgKGNvbW1hbmQsIGhhcyBzaW1wbGUgZ2VuZXJpYyByZXNwb25zZSkKKyAqIENfUE9XRVJfVEJMID0gMHg3NyAoY29tbWFuZCwgaGFzIHNpbXBsZSBnZW5lcmljIHJlc3BvbnNlKQogICoKICAqIFBNIGFsbG93OgogICogICBiaXQgMCAtICcwJyBEcml2ZXIgbm90IGFsbG93IHBvd2VyIG1hbmFnZW1lbnQKQEAgLTIyOTAsMzggKzIyNzEsMzggQEAKICAqICAgICAgICAgICAgICAnMTAnIGZvcmNlIHh0YWwgc2xlZXAKICAqICAgICAgICAgICAgICAnMTEnIElsbGVnYWwgc2V0CiAgKgotICogTk9URTogaWYgc2xlZXBfaW50ZXJ2YWxbU0xFRVBfSU5UUlZMX1RBQkxFX1NJWkUtMV0gPiBEVElNIHBlcmlvZCB0aGVuCisgKiBOT1RFOiBpZiBzbGVlcF9pbnRlcnZhbFtTTEVFUF9JTlRSVkxfVEJMX1NJWkUtMV0gPiBEVElNIHBlcmlvZCB0aGVuCiAgKiB1Y29kZSBhc3N1bWUgc2xlZXAgb3ZlciBEVElNIGlz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UZJQ0FUSU9OID0gMHg4NCAobm90aWZpY2F0aW9uIG9ubHksIG5vdCBhIGNvbW1hbmQpCisgKiBOX1NDQU5fQ09NUExFVEUgPSAweDg0IChub3RpZmljYXRpb24gb25seSwgbm90IGEgY29tbWFuZCkKICAqLwotc3RydWN0IGl3bF9zY2FuY29tcGxldGVfbm90aWZpY2F0aW9uIHsKK3N0cnVjdCBpbF9zY2FuY29tcGxldGVfbm90aWZpY2F0aW9uIHsKIAl1OCBzY2FubmVkX2NoYW5uZWxzOwogCXU4IHN0YXR1czsKIAl1OCBsYXN0X2NoYW5uZWw7CkBAIC0yNjUxLDUwICsyNjMyLDQ5IEBACiAJX19sZTMyIHRzZl9oaWdoOwogfSBfX3BhY2tlZDsKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiAoOSkKICAqIElCU1MvQVAgQ29tbWFuZHMgYW5kIE5vdGlmaWNhdGlvbnM6CiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1lbnVtIGl3bF9pYnNzX21hbmFnZXIgewotCUlXTF9OT1RfSUJTU19NQU5BR0VSID0gMCwKLQlJV0xfSUJTU19NQU5BR0VSID0gMSwKK2VudW0gaWxfaWJzc19tYW5hZ2VyIHsKKwlJTF9OT1RfSUJTU19NQU5BR0VSID0gMCwKKwlJTF9JQlNTX01BTkFHRVIgPSAxLAogfTsKIAogLyoKLSAqIEJFQUNPTl9OT1RJRklDQVRJT04gPSAweDkwIChub3RpZmljYXRpb24gb25seSwgbm90IGEgY29tbWFuZCkKKyAqIE5fQkVBQ09OID0gMHg5MCAobm90aWZpY2F0aW9uIG9ubHksIG5vdCBhIGNvbW1hbmQpCiAgKi8KIAotc3RydWN0IGl3bDM5NDVfYmVhY29uX25vdGlmIHsKLQlzdHJ1Y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jdXRpdmVfbWlzc2VkX2JlYWNvbnM7CiAJX19sZTMyIHRvdGFsX21pc3NlZF9iZWNvbnM7CiAJX19sZTMyIG51bV9leHBlY3RlZF9iZWFjb25zOwogCV9fbGUzMiBudW1fcmVjdmRfYmVhY29uczsKIH0gX19wYWNrZWQ7CiAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogKDExKQogICogUnggQ2FsaWJyYXRpb24gQ29tbWFuZHM6CkBAIC0zMDYyLDcgKzMwNDAsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKioKLSAqIFNFTlNJVElWSVRZX0NNRCA9IDB4YTggKGNvbW1hbmQsIGhhcyBzaW1wbGUgZ2VuZXJpYyByZXNwb25zZSkKKyAqIENfU0VOU0lUSVZJVFkgPSAweGE4IChjb21tYW5kLCBoYXMgc2ltcGxlIGdlbmVyaWMgcmVzcG9uc2UpCiAgKgogICogVGhpcyBjb21tYW5kIHNldHMgdXAgdGhlIFJ4IHNpZ25hbCBkZXRlY3RvciBmb3IgYSBzZW5zaXRpdml0eSBsZXZlbCB0aGF0CiAgKiBpcyBoaWdoIGVub3VnaCB0byBsb2NrIG9udG8gYWxsIHNpZ25hbHMgd2l0aGluIHRoZSBhc3NvY2lhdGVkIG5ldHdvcmssCkBAIC0zMDc2LDEyICszMDU0LDEyIEBACiAgKiB0aW1lIGxpc3RlbmluZywgbm90IHRyYW5zbWl0dGluZykuICBEcml2ZXIgbXVzdCBhZGp1c3Qgc2Vuc2l0aXZpdHkgc28gdGhhdAogICogdGhlIHJhdGlvIG9mIGFjdHVhbCBmYWxzZSBhbGFybXMgdG8gYWN0dWFsIFJ4IHRpbWUgZmFsbHMgd2l0aGluIHRoaXMgcmFuZ2UuCiAgKgotICogV2hpbGUgYXNzb2Np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luZyBDQ0sgdGFibGUgZW50cmllcyBpbiBzdHJ1Y3QgaXdsX3NlbnNpdGl2aXR5X2NtZAorICogVGhlbiwgYWRqdXN0IHRoZSBmb2xsb3dpbmcgQ0NLIHRhYmxlIGVudHJpZXMgaW4gc3RydWN0IGlsX3NlbnNpdGl2aXR5X2NtZAogICogKG5vdGljZSB0aGF0IHRoZSBzdGFydCBwb2ludHMgZm9yIENDSyBhcmUgYXQgbWF4aW11bSBzZW5zaXRpdml0eSk6CiAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTVEFSVCAgLyAgTUlOICAvICBNQVgKLSAqICAgSERfQVVUT19DT1JSNDBfWDRfVEhfQUREX01JTl9JTkRFWCAgICAgICAgIDEyNSAgIC8gIDEyNSAgLyAgMjAwCi0gKiAgIEhEX0FVVE9fQ09SUjQwX1g0X1RIX0FERF9NSU5fTVJDX0lOREVYICAgICAyMDAgICAvICAyMDAgIC8gIDQwMAotICogICBIRF9NSU5fRU5FUkdZX0NDS19ERVRfSU5ERVggICAgICAgICAgICAgICAgMTAwICAgLyAgICAwICAvICAxMDAKKyAqICAgSERfQVVUT19DT1JSNDBfWDRfVEhfQUREX01JTl9JRFggICAgICAgICAxMjUgICAvICAxMjUgIC8gIDIwMAorICogICBIRF9BVVRPX0NPUlI0MF9YNF9USF9BRERfTUlOX01SQ19JRFggICAgIDIwMCAgIC8gIDIwMCAgLyAgNDAwCisgKiAgIEhEX01JTl9FTkVSR1lfQ0NLX0RFVF9JRFggICAgICAgICAgICAgICAgMTAwICAgLyAgICAwICAvICAxMDAKICAqCiAgKiAgIElmIGFjdHVhbCByYXRlIG9mIENDSyBmYWxzZSBhbGFybXMgKCsgcGxjcF9lcnJvcnMpIGlzIHRvbyBoaWdoCiAgKiAgIChncmVhdGVyIHRoYW4gNTAgZm9yIGVhY2ggMjA0LjggbXNlY3MgbGlzdGVuaW5nKSwgbWV0aG9kIGZvciByZWR1Y2luZwogICogICBzZW5za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JTkRFWCAgICAgICAgICAoOSkKLSNkZWZpbmUgSERfT0ZETV9FTkVSR1lfVEhfSU5fSU5ERVggICAgICAgICAgICAgICAgICAoMTApCisjZGVmaW5lIEhEX1RCTF9TSVpFICAoMTEpCS8qIG51bWJlciBvZiBlbnRyaWVzICovCisjZGVmaW5lIEhEX01JTl9FTkVSR1lfQ0NLX0RFVF9JRFggICAgICAgICAgICAgICAgICgwKQkvKiB0YWJsZSBpZHhlcyAqLworI2RlZmluZSBIRF9NSU5fRU5FUkdZX09GRE1fREVUX0lEWCAgICAgICAgICAgICAgICAoMSkKKyNkZWZpbmUgSERfQVVUT19DT1JSMzJfWDFfVEhfQUREX01JTl9JRFggICAgICAgICAgKDIpCisjZGVmaW5lIEhEX0FVVE9fQ09SUjMyX1gxX1RIX0FERF9NSU5fTVJDX0lEWCAgICAgICgzKQorI2RlZmluZSBIRF9BVVRPX0NPUlI0MF9YNF9USF9BRERfTUlOX01SQ19JRFggICAgICAoNCkKKyNkZWZpbmUgSERfQVVUT19DT1JSMzJfWDRfVEhfQUREX01JTl9JRFggICAgICAgICAgKDUpCisjZGVmaW5lIEhEX0FVVE9fQ09SUjMyX1g0X1RIX0FERF9NSU5fTVJDX0lEWCAgICAgICg2KQorI2RlZmluZSBIRF9CQVJLRVJfQ09SUl9USF9BRERfTUlOX0lEWCAgICAgICAgICAgICAoNykKKyNkZWZpbmUgSERfQkFSS0VSX0NPUlJfVEhfQUREX01JTl9NUkNfSURYICAgICAgICAgKDgpCisjZGVmaW5lIEhEX0FVVE9fQ09SUjQwX1g0X1RIX0FERF9NSU5fSURYICAgICAgICAgICg5KQorI2RlZmluZSBIRF9PRkRNX0VORVJHWV9USF9JTl9JRFggICAgICAgICAgICAgICAgICAoMTApCiAKLS8qIENvbnRyb2wgZmllbGQgaW4gc3RydWN0IGl3bF9zZW5zaXRpdml0eV9jbWQgKi8KLSNkZWZpbmUgU0VOU0lUSVZJVFlfQ01EX0NPTlRST0xfREVGQVVMVF9UQUJM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aWMgY29uc3QgdTggaWxfZWVwcm9tX2JhbmRfM1tdID0gewkvKiA1MTcwLTUzMjBNSHogKi8KKwkzNCwgMzYsIDM4LCA0MCwgNDIsIDQ0LCA0NiwgNDgsIDUyLCA1NiwgNjAsIDY0Cit9OworCitzdGF0aWMgY29uc3QgdTggaWxfZWVwcm9tX2JhbmRfNFtdID0gewkvKiA1NTAwLTU3MDBNSHogKi8KKwkxMDAsIDEwNCwgMTA4LCAxMTIsIDExNiwgMTIwLCAxMjQsIDEyOCwgMTMyLCAxMzYsIDE0MAorfTsKKworc3RhdGljIGNvbnN0IHU4IGlsX2VlcHJvbV9iYW5kXzVbXSA9IHsJLyogNTcyNS01ODI1TUh6ICovCisJMTQ1LCAxNDksIDE1MywgMTU3LCAxNjEsIDE2NQorfTsKKworc3RhdGljIGNvbnN0IHU4IGlsX2VlcHJvbV9iYW5kXzZbXSA9IHsJLyogMi40IGh0NDAgY2hhbm5lbCAqLworCTEsIDIsIDMsIDQsIDUsIDYsIDcKK307CisKK3N0YXRpYyBjb25zdCB1OCBpbF9lZXByb21fYmFuZF83W10gPSB7CS8qIDUuMiBodDQwIGNoYW5uZWwgKi8KKwkzNiwgNDQsIDUyLCA2MCwgMTAwLCAxMDgsIDExNiwgMTI0LCAxMzIsIDE0OSwgMTU3Cit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRUVQUk9NIHJlbGF0ZWQgZnVuY3Rpb25zCisgKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50CitpbF9lZXByb21fdmVyaWZ5X3NpZ25hdHVyZShzdHJ1Y3QgaWxfcHJpdiAqaWwpCit7CisJdTMyIGdwID0gX2lsX3JkKGlsLCBDU1JfRUVQUk9NX0dQKSAmIENTUl9FRVBST01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2xkOiB0ZW1wZXJhdHVyZSB0aHJlc2hvbGQKKyAqIEBiZWFjb25fdGltZV90c2ZfYml0czogbnVtYmVyIG9mIHZhbGlkIHRzZiBiaXRzIGZvciBiZWFjb24gdGltZQorICogQHN0cnVjdCBpbF9zZW5zaXRpdml0eV9yYW5nZXM6IHJhbmdlIG9mIHNlbnNpdGl2aXR5IHZhbHVlcworICovCitzdHJ1Y3QgaWxfaHdfcGFyYW1zIHsKKwl1OCBtYXhfdHhxX251bTsKKwl1OCBkbWFfY2hubF9udW07CisJdTE2IHNjZF9iY190YmxzX3NpemU7CisJdTMyIHRmZF9zaXplOworCXU4IHR4X2NoYWluc19udW07CisJdTggcnhfY2hhaW5zX251bTsKKwl1OCB2YWxpZF90eF9hbnQ7CisJdTggdmFsaWRfcnhfYW50OworCXUxNiBtYXhfcnhxX3NpemU7CisJdTE2IG1heF9yeHFfbG9nOworCXUzMiByeF9wYWdlX29yZGVyOworCXUzMiByeF93cnRfcHRyX3JlZzsKKwl1OCBtYXhfc3RhdGlvbnM7CisJdTggaHQ0MF9jaGFubmVsOworCXU4IG1heF9iZWFjb25faXRydmw7CS8qIGluIDEwMjQgbXMgKi8KKwl1MzIgbWF4X2luc3Rfc2l6ZTsKKwl1MzIgbWF4X2RhdGFfc2l6ZTsKKwl1MzIgbWF4X2JzbV9zaXplOworCXUzMiBjdF9raWxsX3RocmVzaG9sZDsJLyogdmFsdWUgaW4gaHctZGVwZW5kZW50IHVuaXRzICovCisJdTE2IGJlYWNvbl90aW1lX3RzZl9iaXRzOworCWNvbnN0IHN0cnVjdCBpbF9zZW5zaXRpdml0eV9yYW5nZXMgKnNlbnM7Cit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRnVuY3Rpb25zIGltcGxlbWVudGVkIGluIGNvcmUgbW9kdWxlIHdoaWNoIGFyZSBmb3J3YXJkIGRlY2xhcm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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVFggcG93ZXIKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGlsX3NldF90eF9wb3dlcihzdHJ1Y3QgaWxfcHJpdiAqaWwsIHM4IHR4X3Bvd2VyLCBib29sIGZvcmNlKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFJhdGUKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3U4IGlsX2dldF9sb3dlc3RfcGxjcChzdHJ1Y3QgaWxfcHJpdiAqaWwsIHN0cnVjdCBpbF9yeG9uX2NvbnRleHQgKmN0eCk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBTY2FubmluZworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgaWxfaW5pdF9zY2FuX3BhcmFtcyhzdHJ1Y3QgaWxfcHJpdiAqaWwpOworaW50IGlsX3NjYW5fY2FuY2VsKHN0cnVjdCBpbF9wcml2ICppbCk7CitpbnQgaWxfc2Nhbl9jYW5jZWxfdGltZW91dChzdHJ1Y3QgaWxfcHJpdiAqaWwsIHVuc2lnbmVkIGxvbmcgbXMpOwordm9pZCBpbF9mb3JjZV9zY2FuX2VuZChzdHJ1Y3QgaWxfcHJpdiAqaWwpOworaW50IGlsX21hY19od19zY2FuKHN0cnVjdCBpZWVlODAyMTFfaHcgKmh3LCBzdHJ1Y3QgaWVlZTgwMjExX3ZpZiAqdmlmLAorCQkgICBzdHJ1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YmFzZSwgdTMyIGFkZG9uLAorCQkJICB1MzIgYmVhY29uX2ludGVydmFsKTsKKworI2lmZGVmIENPTkZJR19QTQoraW50IGlsX3BjaV9zdXNwZW5kKHN0cnVjdCBkZXZpY2UgKmRldmljZSk7CitpbnQgaWxfcGNpX3Jlc3VtZShzdHJ1Y3QgZGV2aWNlICpkZXZpY2UpOworZXh0ZXJuIGNvbnN0IHN0cnVjdCBkZXZfcG1fb3BzIGlsX3BtX29wczsKKworI2RlZmluZSBJTF9MRUdBQ1lfUE1fT1BTCSgmaWxfcG1fb3BzKQorCisjZWxzZSAvKiAhQ09ORklHX1BNICovCisKKyNkZWZpbmUgSUxfTEVHQUNZX1BNX09QUwlOVUxMCisKKyNlbmRpZiAvKiAhQ09ORklHX1BNICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgRXJyb3IgSGFuZGxpbmcgRGVidWdnaW5nCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIGlsNDk2NV9kdW1wX25pY19lcnJvcl9sb2coc3RydWN0IGlsX3ByaXYgKmlsKTsKKyNpZmRlZiBDT05GSUdfSVdMRUdBQ1lfREVCVUcKK3ZvaWQgaWxfcHJpbnRfcnhfY29uZmlnX2NtZChzdHJ1Y3QgaWxfcHJpdiAqaWwsIHN0cnVjdCBpbF9yeG9uX2NvbnRleHQgKmN0eCk7CisjZWxzZQorc3RhdGljIGlubGluZSB2b2lkCitpbF9wcmludF9yeF9jb25maWdfY21kKHN0cnVjdCBpbF9wcml2ICppbCwgc3RydWN0IGlsX3J4b25fY29udGV4dCAqY3R4KQoreworfQorI2VuZGlmCisKK3ZvaWQgaWxfY2xlYXJfaXNyX3N0YXRzKHN0cnVjdCBpbF9wcml2ICppbCk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgR0VP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mdfcHJldl9zdGF0ZSk7CisJcG9zICs9IHNjbnByaW50ZihidWYgKyBwb3MsIGJ1ZnN6IC0gcG9zLCAibnJnX3ZhbHVlOlx0XHRcdCIpOworCWZvciAoY250ID0gMDsgY250IDwgMTA7IGNudCsrKSB7CisJCXBvcyArPQorCQkgICAgc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsICIgJXUiLAorCQkJICAgICAgZGF0YS0+bnJnX3ZhbHVlW2NudF0pOworCX0KKwlwb3MgKz0gc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsICJcbiIpOworCXBvcyArPSBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgIm5yZ19zaWxlbmNlX3Jzc2k6XHRcdCIpOworCWZvciAoY250ID0gMDsgY250IDwgTlJHX05VTV9QUkVWX1NUQVRfTDsgY250KyspIHsKKwkJcG9zICs9CisJCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgIiAldSIsCisJCQkgICAgICBkYXRhLT5ucmdfc2lsZW5jZV9yc3NpW2NudF0pOworCX0KKwlwb3MgKz0gc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsICJcbiIpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgIm5yZ19zaWxlbmNlX3JlZjpcdFx0ICV1XG4iLAorCQkgICAgICBkYXRhLT5ucmdfc2lsZW5jZV9yZWYpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgIm5yZ19lbmVyZ3lfaWR4Olx0XHRcdCAldVxuIiwKKwkJICAgICAgZGF0YS0+bnJnX2VuZXJneV9pZHgpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgIm5yZ19zaWxlbmNlX2lkeDpcdFx0ICV1XG4iLAorCQkgICAgICBkYXRh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dBWSBPVVQgT0YgVEhFIFVTRQotICogT0YgVEhJUyBTT0ZUV0FSRSwgRVZFTiBJRiBBRFZJU0VEIE9GIFRIRSBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRS4KLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCi0jaW5jbHVkZSA8bGludXgva2VybmVsLmg+Ci0jaW5jbHVkZSA8bGludXgvbW9kdWxlLmg+Ci0jaW5jbHVkZSA8bGludXgvc2xhYi5oPgotI2luY2x1ZGUgPGxpbnV4L2luaXQuaD4KLQotI2luY2x1ZGUgPG5ldC9tYWM4MDIxMS5oPgotCi0jaW5jbHVkZSAiaXdsLWNvbW1hbmRzLmgiCi0jaW5jbHVkZSAiaXdsLWRldi5oIgotI2luY2x1ZGUgIml3bC1jb3JlLmgiCi0jaW5jbHVkZSAiaXdsLWRlYnVnLmgiCi0jaW5jbHVkZSAiaXdsLTQ5NjUuaCIKLSNpbmNsdWRlICJpd2wtaW8uaCIKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEVFUFJPTSByZWxhdGVkIGZ1bmN0aW9ucwotICoKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyoKLSAqIFRoZSBkZXZpY2UncyBFRVBST00gc2VtYXBob3JlIHByZXZlbnRzIGNvbmZsaWN0cyBiZXR3ZWVuIGRyaXZlciBhbmQgdUNvZGUKLSAqIHdoZW4gYWNjZXNzaW5nIHRoZSBFRVBST007IGVhY2ggYWNjZXNzIGlzIGEgc2VyaWVzIG9mIHB1bHNlcyB0by9mcm9tIHRoZQotICogRUVQUk9NIGNoaXAsIG5vdCBhIHNpbmdsZSBldmVudCwgc28g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HSHogZ2FpbiB0YWJsZQotICoKLSAqIEluZGV4ICAgIERzcCBnYWluICAgUmFkaW8gZ2FpbgotICogICAwICAgICAgICAxMTAgICAgICAgICAweDNmICAgICAgKGhpZ2hlc3QgZ2FpbikKLSAqICAgMSAgICAgICAgMTA0ICAgICAgICAgMHgzZgotICogICAyICAgICAgICAgOTggICAgICAgICAweDNmCi0gKiAgIDMgICAgICAgIDExMCAgICAgICAgIDB4M2UKLSAqICAgNCAgICAgICAgMTA0ICAgICAgICAgMHgzZQotICogICA1ICAgICAgICAgOTggICAgICAgICAweDNlCi0gKiAgIDYgICAgICAgIDExMCAgICAgICAgIDB4M2QKLSAqICAgNyAgICAgICAgMTA0ICAgICAgICAgMHgzZAotICogICA4ICAgICAgICAgOTggICAgICAgICAweDNkCi0gKiAgIDkgICAgICAgIDExMCAgICAgICAgIDB4M2MKLSAqICAxMCAgICAgICAgMTA0ICAgICAgICAgMHgzYwotICogIDExICAgICAgICAgOTggICAgICAgICAweDNjCi0gKiAgMTIgICAgICAgIDExMCAgICAgICAgIDB4M2IKLSAqICAxMyAgICAgICAgMTA0ICAgICAgICAgMHgzYgotICogIDE0ICAgICAgICAgOTggICAgICAgICAweDNiCi0gKiAgMTUgICAgICAgIDExMCAgICAgICAgIDB4M2EKLSAqICAxNiAgICAgICAgMTA0ICAgICAgICAgMHgzYQotICogIDE3ICAgICAgICAgOTggICAgICAgICAweDNhCi0gKiAgMTggICAgICAgIDExMCAgICAgICAgIDB4MzkKLSAqICAxOSAgICAgICAgMTA0ICAgICAgICAgMHgzOQotICogIDIwICAgICAgICAgOTggICAgICAgICAweDM5Ci0gKiAgMjEgICAgICAgIDExMCAgICAgICAgIDB4MzgKLSAqICAyMiAgICAgICAgMTA0ICAgICAgICAgMHgzOAotICogIDIzICAgICAgICAgOTggICAgICAgICAweDM4Ci0gKiAgMjQgICAgICAgIDExMCAgICAgICAgIDB4MzcKLSAqICAyNSAgICAgICAgMTA0ICAgICAgICAgMHgzNwotICogIDI2ICAgICAgICAgOTggICAgICAgICAweDM3Ci0gKiAgMjcgICAgICAgIDExMCAgICAgICAgIDB4MzYKLSAqICAyOCAgICAgICAgMTA0ICAgICAgICAgMHgzNgotICogIDI5ICAgICAgICAgOTggICAgICAgICAweDM2Ci0gKiAgMzAgICAgICAgIDExMCAgICAgICAgIDB4MzUKLSAqICAzMSAgICAgICAgMTA0ICAgICAgICAgMHgzNQotICogIDMyICAgICAgICAgOTggICAgICAgICAweDM1Ci0gKiAgMzMgICAgICAgIDExMCAgICAgICAgIDB4MzQKLSAqICAzNCAgICAgICAgMTA0ICAgICAgICAgMHgzNAotICogIDM1ICAgICAgICAgOTggICAgICAgICAweDM0Ci0gKiAgMzYgICAgICAgIDExMCAgICAgICAgIDB4MzMKLSAqICAzNyAgICAgICAgMTA0ICAgICAgICAgMHgzMwotICogIDM4ICAgICAgICAgOTggICAgICAgICAweDMzCi0gKiAgMzkgICAgICAgIDExMCAgICAgICAgIDB4MzIKLSAqICA0MCAgICAgICAgMTA0ICAgICAgICAgMHgzMgotICogIDQxICAgICAgICAgOTggICAgICAgICAweDMyCi0gKiAgNDIgICAgICAgIDExMCAgICAgICAgIDB4MzEKLSAqICA0MyAgICAgICAgMTA0ICAgICAgICAgMHgzMQotICogIDQ0ICAgICAgICAgOTggICAgICAgICAweDMxCi0gKiAgNDUgICAgICAgIDExMCAgICAgICAgIDB4MzAKLSAqICA0NiAgICAgICAgMTA0ICAgICAgICAgMHgzMAotICogIDQ3ICAgICAgICAgOTggICAgICAgICAweDMwCi0gKiAgNDggICAgICAgIDExMCAgICAgICAgICAweDYKLSAqICA0OSAgICAgICAgMTA0ICAgICAgICAgIDB4NgotICogIDUwICAgICAgICAgOTggICAgICAgICAgMHg2Ci0gKiAgNTEgICAgICAgIDExMCAgICAgICAgICAweDUKLSAqICA1MiAgICAgICAgMTA0ICAgICAgICAgIDB4NQotICogIDUzICAgICAgICAgOTggICAgICAgICAgMHg1Ci0gKiAgNTQgICAgICAgIDExMCAgICAgICAgICAweDQKLSAqICA1NSAgICAgICAgMTA0ICAgICAgICAgIDB4NAotICogIDU2ICAgICAgICAgOTggICAgICAgICAgMHg0Ci0gKiAgNTcgICAgICAgIDExMCAgICAgICAgICAweDMKLSAqICA1OCAgICAgICAgMTA0ICAgICAgICAgIDB4MwotICogIDU5ICAgICAgICAgOTggICAgICAgICAgMHgzCi0gKiAgNjAgICAgICAgIDExMCAgICAgICAgICAweDIKLSAqICA2MSAgICAgICAgMTA0ICAgICAgICAgIDB4MgotICogIDYyICAgICAgICAgOTggICAgICAgICAgMHgyCi0gKiAgNjMgICAgICAgIDExMCAgICAgICAgICAweDEKLSAqICA2NCAgICAgICAgMTA0ICAgICAgICAgIDB4MQotICogIDY1ICAgICAgICAgOTggICAgICAgICAgMHgxCi0gKiAgNjYgICAgICAgIDExMCAgICAgICAgICAweDAKLSAqICA2NyAgICAgICAgMTA0ICAgICAgICAgIDB4MAotICogIDY4ICAgICAgICAgOTggICAgICAgICAgMHgwCi0gKiAgNjkgICAgICAgICA5NyAgICAgICAgICAgIDAKLSAqICA3MCAgICAgICAgIDk2ICAgICAgICAgICAgMAotICogIDcxICAgICAgICAgOTUgICAgICAgICAgICAwCi0gKiAgNzIgICAgICAgICA5NCAgICAgICAgICAgIDAKLSAqICA3MyAgICAgICAgIDkzICAgICAgICAgICAgMAotICogIDc0ICAgICAgICAgOTIgICAgICAgICAgICAwCi0gKiAgNzUgICAgICAgICA5MSAgICAgICAgICAgIDAKLSAqICA3NiAgICAgICAgIDkwICAgICAgICAgICAgMAotICogIDc3ICAgICAgICAgODkgICAgICAgICAgICAwCi0gKiAgNzggICAgICAgICA4OCAgICAgICAgICAgIDAKLSAqICA3OSAgICAgICAgIDg3ICAgICAgICAgICAgMAotICogIDgwICAgICAgICAgODYgICAgICAgICAgICAwCi0gKiAgODEgICAgICAgICA4NSAgICAgICAgICAgIDAKLSAqICA4MiAgICAgICAgIDg0ICAgICAgICAgICAgMAotICogIDgzICAgICAgICAgODMgICAgICAgICAgICAwCi0gKiAgODQgICAgICAgICA4MiAgICAgICAgICAgIDAKLSAqICA4NSAgICAgICAgIDgxICAgICAgICAgICAgMAotICogIDg2ICAgICAgICAgODAgICAgICAgICAgICAwCi0gKiAgODcgICAgICAgICA3OSAgICAgICAgICAgIDAKLSAqICA4OCAgICAgICAgIDc4ICAgICAgICAgICAgMAotICogIDg5ICAgICAgICAgNzcgICAgICAgICAgICAwCi0gKiAgOTAgICAgICAgICA3NiAgICAgICAgICAgIDAKLSAqICA5MSAgICAgICAgIDc1ICAgICAgICAgICAgMAotICogIDkyICAgICAgICAgNzQgICAgICAgICAgICAwCi0gKiAgOTMgICAgICAgICA3MyAgICAgICAgICAgIDAKLSAqICA5NCAgICAgICAgIDcyICAgICAgICAgICAgMAotICogIDk1ICAgICAgICAgNzEgICAgICAgICAgICAwCi0gKiAgOTYgICAgICAgICA3MCAgICAgICAgICAgIDAKLSAqICA5NyAgICAgICAgIDY5ICAgICAgICAgICAgMAotICogIDk4ICAgICAgICAgNjggICAgICAgICAgICAwCi0gKi8KLQotLyoqCi0gKiA1IEdIeiBnYWluIHRhYmxlCi0gKgotICogSW5kZXggICAgRHNwIGdhaW4gICBSYWRpbyBnYWluCi0gKiAgLTkgCSAgICAgIDEyMyAgICAgICAgIDB4M0YgICAgICAoaGlnaGVzdCBnYWluKQotICogIC04IAkgICAgICAxMTcgICAgICAgICAweDNGCi0gKiAgLTcgICAgICAgIDExMCAgICAgICAgIDB4M0YKLSAqICAtNiAgICAgICAgMTA0ICAgICAgICAgMHgzRgotICogIC01ICAgICAgICAgOTggICAgICAgICAweDNGCi0gKiAgLTQgICAgICAgIDExMCAgICAgICAgIDB4M0UKLSAqICAtMyAgICAgICAgMTA0ICAgICAgICAgMHgzRQotICogIC0yICAgICAgICAgOTggICAgICAgICAweDNFCi0gKiAgLTEgICAgICAgIDExMCAgICAgICAgIDB4M0QKLSAqICAgMCAgICAgICAgMTA0ICAgICAgICAgMHgzRAotICogICAxICAgICAgICAgOTggICAgICAgICAweDNECi0gKiAgIDIgICAgICAgIDExMCAgICAgICAgIDB4M0MKLSAqICAgMyAgICAgICAgMTA0ICAgICAgICAgMHgzQwotICogICA0ICAgICAgICAgOTggICAgICAgICAweDNDCi0gKiAgIDUgICAgICAgIDExMCAgICAgICAgIDB4M0IKLSAqICAgNiAgICAgICAgMTA0ICAgICAgICAgMHgzQgotICogICA3ICAgICAgICAgOTggICAgICAgICAweDNCCi0gKiAgIDggICAgICAgIDExMCAgICAgICAgIDB4M0EKLSAqICAgOSAgICAgICAgMTA0ICAgICAgICAgMHgzQQotICogIDEwICAgICAgICAgOTggICAgICAgICAweDNBCi0gKiAgMTEgICAgICAgIDExMCAgICAgICAgIDB4MzkKLSAqICAxMiAgICAgICAgMTA0ICAgICAgICAgMHgzOQotICogIDEzICAgICAgICAgOTggICAgICAgICAweDM5Ci0gKiAgMTQgICAgICAgIDExMCAgICAgICAgIDB4MzgKLSAqICAxNSAgICAgICAgMTA0ICAgICAgICAgMHgzOAotICogIDE2ICAgICAgICAgOTggICAgICAgICAweDM4Ci0gKiAgMTcgICAgICAgIDExMCAgICAgICAgIDB4MzcKLSAqICAxOCAgICAgICAgMTA0ICAgICAgICAgMHgzNwotICogIDE5ICAgICAgICAgOTggICAgICAgICAweDM3Ci0gKiAgMjAgICAgICAgIDExMCAgICAgICAgIDB4MzYKLSAqICAyMSAgICAgICAgMTA0ICAgICAgICAgMHgzNgotICogIDIyICAgICAgICAgOTggICAgICAgICAweDM2Ci0gKiAgMjMgICAgICAgIDExMCAgICAgICAgIDB4MzUKLSAqICAyNCAgICAgICAgMTA0ICAgICAgICAgMHgzNQotICogIDI1ICAgICAgICAgOTggICAgICAgICAweDM1Ci0gKiAgMjYgICAgICAgIDExMCAgICAgICAgIDB4MzQKLSAqICAyNyAgICAgICAgMTA0ICAgICAgICAgMHgzNAotICogIDI4ICAgICAgICAgOTggICAgICAgICAweDM0Ci0gKiAgMjkgICAgICAgIDExMCAgICAgICAgIDB4MzMKLSAqICAzMCAgICAgICAgMTA0ICAgICAgICAgMHgzMwotICogIDMxICAgICAgICAgOTggICAgICAgICAweDMzCi0gKiAgMzIgICAgICAgIDExMCAgICAgICAgIDB4MzIKLSAqICAzMyAgICAgICAgMTA0ICAgICAgICAgMHgzMgotICogIDM0ICAgICAgICAgOTggICAgICAgICAweDMyCi0gKiAgMzUgICAgICAgIDExMCAgICAgICAgIDB4MzEKLSAqICAzNiAgICAgICAgMTA0ICAgICAgICAgMHgzMQotICogIDM3ICAgICAgICAgOTggICAgICAgICAweDMxCi0gKiAgMzggICAgICAgIDExMCAgICAgICAgIDB4MzAKLSAqICAzOSAgICAgICAgMTA0ICAgICAgICAgMHgzMAotICogIDQwICAgICAgICAgOTggICAgICAgICAweDMwCi0gKiAgNDEgICAgICAgIDExMCAgICAgICAgIDB4MjUKLSAqICA0MiAgICAgICAgMTA0ICAgICAgICAgMHgyNQotICogIDQzICAgICAgICAgOTggICAgICAgICAweDI1Ci0gKiAgNDQgICAgICAgIDExMCAgICAgICAgIDB4MjQKLSAqICA0NSAgICAgICAgMTA0ICAgICAgICAgMHgyNAotICogIDQ2ICAgICAgICAgOTggICAgICAgICAweDI0Ci0gKiAgNDcgICAgICAgIDExMCAgICAgICAgIDB4MjMKLSAqICA0OCAgICAgICAgMTA0ICAgICAgICAgMHgyMwotICogIDQ5ICAgICAgICAgOTggICAgICAgICAweDIzCi0gKiAgNTAgICAgICAgIDExMCAgICAgICAgIDB4MjIKLSAqICA1MSAgICAgICAgMTA0ICAgICAgICAgMHgxOAotICogIDUyICAgICAgICAgOTggICAgICAgICAweDE4Ci0gKiAgNTMgICAgICAgIDExMCAgICAgICAgIDB4MTcKLSAqICA1NCAgICAgICAgMTA0ICAgICAgICAgMHgxNwotICogIDU1ICAgICAgICAgOTggICAgICAgICAweDE3Ci0gKiAgNTYgICAgICAgIDExMCAgICAgICAgIDB4MTYKLSAqICA1NyAgICAgICAgMTA0ICAgICAgICAgMHgxNgotICogIDU4ICAgICAgICAgOTggICAgICAgICAweDE2Ci0gKiAgNTkgICAgICAgIDExMCAgICAgICAgIDB4MTUKLSAqICA2MCAgICAgICAgMTA0ICAgICAgICAgMHgxNQotICogIDYxICAgICAgICAgOTggICAgICAgICAweDE1Ci0gKiAgNjIgICAgICAgIDExMCAgICAgICAgIDB4MTQKLSAqICA2MyAgICAgICAgMTA0ICAgICAgICAgMHgxNAotICogIDY0ICAgICAgICAgOTggICAgICAgICAweDE0Ci0gKiAgNjUgICAgICAgIDExMCAgICAgICAgIDB4MTMKLSAqICA2NiAgICAgICAgMTA0ICAgICAgICAgMHgxMwotICogIDY3ICAgICAgICAgOTggICAgICAgICAweDEzCi0gKiAgNjggICAgICAgIDExMCAgICAgICAgIDB4MTIKLSAqICA2OSAgICAgICAgMTA0ICAgICAgICAgMHgwOAotICogIDcwICAgICAgICAgOTggICAgICAgICAweDA4Ci0gKiAgNzEgICAgICAgIDExMCAgICAgICAgIDB4MDcKLSAqICA3MiAgICAgICAgMTA0ICAgICAgICAgMHgwNwotICogIDczICAgICAgICAgOTggICAgICAgICAweDA3Ci0gKiAgNzQgICAgICAgIDExMCAgICAgICAgIDB4MDYKLSAqICA3NSAgICAgICAgMTA0ICAgICAgICAgMHgwNgotICogIDc2ICAgICAgICAgOTggICAgICAgICAweDA2Ci0gKiAgNzcgICAgICAgIDExMCAgICAgICAgIDB4MDUKLSAqICA3OCAgICAgICAgMTA0ICAgICAgICAgMHgwNQotICogIDc5ICAgICAgICAgOTggICAgICAgICAweDA1Ci0gKiAgODAgICAgICAgIDExMCAgICAgICAgIDB4MDQKLSAqICA4MSAgICAgICAgMTA0ICAgICAgICAgMHgwNAotICogIDgyICAgICAgICAgOTggICAgICAgICAweDA0Ci0gKiAgODMgICAgICAgIDExMCAgICAgICAgIDB4MDMKLSAqICA4NCAgICAgICAgMTA0ICAgICAgICAgMHgwMwotICogIDg1ICAgICAgICAgOTggICAgICAgICAweDAzCi0gKiAgODYgICAgICAgIDExMCAgICAgICAgIDB4MDIKLSAqICA4NyAgICAgICAgMTA0ICAgICAgICAgMHgwMgotICogIDg4ICAgICAgICAgOTggICAgICAgICAweDAyCi0gKiAgODkgICAgICAgIDExMCAgICAgICAgIDB4MDEKLSAqICA5MCAgICAgICAgMTA0ICAgICAgICAgMHgwMQotICogIDkxICAgICAgICAgOTggICAgICAgICAweDAxCi0gKiAgOTIgICAgICAgIDExMCAgICAgICAgIDB4MDAKLSAqICA5MyAgICAgICAgMTA0ICAgICAgICAgMHgwMAotICogIDk0ICAgICAgICAgOTggICAgICAgICAweDAwCi0gKiAgOTUgICAgICAgICA5MyAgICAgICAgIDB4MDAKLSAqICA5NiAgICAgICAgIDg4ICAgICAgICAgMHgwMAotICogIDk3ICAgICAgICAgODMgICAgICAgICAweDAwCi0gKiAgOTggICAgICAgICA3OCAgICAgICAgIDB4MDAKLSAqLwotCi0KLS8qKgotICogU2FuaXR5IGNoZWNrcyBhbmQgZGVmYXVsdCB2YWx1ZXMgZm9yIEVFUFJPTSByZWd1bGF0b3J5IGxldmVscy4KLSAqIElmIEVFUFJPTSB2YWx1ZXMgZmFsbCBvdXRzaWRlIE1JTi9NQVggcmFuZ2UsIHVzZSBkZWZhdWx0IHZhbHVlcy4KLSAqCi0gKiBSZWd1bGF0b3J5IGxpbWl0cyByZWZlciB0byB0aGUgbWF4aW11bSBhdmVyYWdlIHR4cG93ZXIgYWxsb3dlZCBieQotICogcmVndWxhdG9yeSBhZ2VuY2llcyBpbiB0aGUgZ2VvZ3JhcGhpZXMgaW4gd2hpY2ggdGhlIGRldmljZSBpcyBtZWFudAotICogdG8gYmUgb3BlcmF0ZWQuICBUaGVzZSBsaW1pdHMgYXJlIFNLVS1zcGVjaWZpYyAoaS5lLiBnZW9ncmFwaHktc3BlY2lmaWMpLAotICogYW5kIGNoYW5uZWwtc3BlY2lmaWM7IGVhY2ggY2hhbm5lbCBoYXMgYW4gaW5kaXZpZHVhbCByZWd1bGF0b3J5IGxpbWl0Ci0gKiBsaXN0Z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KHN0cnVjdCBpd2xfcHJpdiAqcHJpdiwgaW50IHR4cV9pZCk7Ci12b2lkIGl3bF9sZWdhY3lfdHhfcXVldWVfZnJlZShzdHJ1Y3QgaXdsX3ByaXYgKnByaXYsIGludCB0eHFfaWQpOwotdm9pZCBpd2xfbGVnYWN5X3NldHVwX3dhdGNoZG9nKHN0cnVjdCBpd2xfcHJpdiAqcHJpdik7Ci0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFRYIHBvd2VyCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLWludCBpd2xfbGVnYWN5X3NldF90eF9wb3dlcihzdHJ1Y3QgaXdsX3ByaXYgKnByaXYsIHM4IHR4X3Bvd2VyLCBib29sIGZvcmNlKTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFJhdGUKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXU4IGl3bF9sZWdhY3lfZ2V0X2xvd2VzdF9wbGNwKHN0cnVjdCBpd2xfcHJpdiAqcHJpdiwKLQkJCSAgICBzdHJ1Y3QgaXdsX3J4b25fY29udGV4dCAqY3R4KTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFNjYW5uaW5nCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdm9pZCBpd2xfbGVnYWN5X2luaXRfc2Nhbl9wYXJhbXMoc3RydWN0IGl3bF9wcml2ICpwcml2KTsKLWludCBpd2xfbGVnYWN5X3N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otI2RlZmluZSBFRVBST01fT0VNX01PREUgICAgICAgICAgICAgICAgICAgICAoMioweDQ2KQkvKiAyICBieXRlcyAqLwotI2RlZmluZSBFRVBST01fV09XTEFOX01PREUgICAgICAgICAgICAgICAgICAoMioweDQ3KQkvKiAyICBieXRlcyAqLwotI2RlZmluZSBFRVBST01fUkFESU9fQ09ORklHICAgICAgICAgICAgICAgICAoMioweDQ4KQkvKiAyICBieXRlcyAqLwotI2RlZmluZSBFRVBST01fTlVNX01BQ19BRERSRVNTICAgICAgICAgICAgICAoMioweDRDKQkvKiAyICBieXRlcyAqLwotCi0vKiBUaGUgZm9sbG93aW5nIG1hc2tzIGFyZSB0byBiZSBhcHBsaWVkIG9uIEVFUFJPTV9SQURJT19DT05GSUcgKi8KLSNkZWZpbmUgRUVQUk9NX1JGX0NGR19UWVBFX01TSyh4KSAgICh4ICYgMHgzKSAgICAgICAgIC8qIGJpdHMgMC0xICAgKi8KLSNkZWZpbmUgRUVQUk9NX1JGX0NGR19TVEVQX01TSyh4KSAgICgoeCA+PiAyKSAgJiAweDMpIC8qIGJpdHMgMi0zICAgKi8KLSNkZWZpbmUgRUVQUk9NX1JGX0NGR19EQVNIX01TSyh4KSAgICgoeCA+PiA0KSAgJiAweDMpIC8qIGJpdHMgNC01ICAgKi8KLSNkZWZpbmUgRUVQUk9NX1JGX0NGR19QTlVNX01TSyh4KSAgICgoeCA+PiA2KSAgJiAweDMpIC8qIGJpdHMgNi03ICAgKi8KLSNkZWZpbmUgRUVQUk9NX1JGX0NGR19UWF9BTlRfTVNLKHgpICgoeCA+PiA4KSAgJiAweEYpIC8qIGJpdHMgOC0xMSAgKi8KLSNkZWZpbmUgRUVQUk9NX1JGX0NGR19SWF9BTlRfTVNLKHgpICgoeCA+PiAxMikgJiAweEYpIC8qIGJpdHMgMTItMTUgKi8KLQotI2RlZmluZSBFRVBST01fMzk0NV9SRl9DRkdfVFlQRV9NQVggIDB4MAotI2RlZmluZSBFRVBST01fNDk2NV9SRl9D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ZW5jZToKLSAqCi0gKiBpd2xfbGVnYWN5X3J4X3F1ZXVlX2FsbG9jKCkgICBBbGxvY2F0ZXMgcnhfZnJlZQotICogaXdsX3J4X3JlcGxlbmlzaCgpICAgICBSZXBsZW5pc2hlcyByeF9mcmVlIGxpc3QgZnJvbSByeF91c2VkLCBhbmQgY2FsbHMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl3bF9yeF9xdWV1ZV9yZXN0b2NrCi0gKiBpd2xfcnhfcXVldWVfcmVzdG9jaygpIE1vdmVzIGF2YWlsYWJsZSBidWZmZXJzIGZyb20gcnhfZnJlZSBpbnRvIFJ4Ci0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWV1ZSwgdXBkYXRlcyBmaXJtd2FyZSBwb2ludGVycywgYW5kIHVwZGF0ZXMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBXUklURSBpbmRleC4gIElmIGluc3VmZmljaWVudCByeF9mcmVlIGJ1ZmZlcnMKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZSBhdmFpbGFibGUsIHNjaGVkdWxlcyBpd2xfcnhfcmVwbGVuaXNoCi0gKgotICogLS0gZW5hYmxlIGludGVycnVwdHMgLS0KLSAqIElTUiAtIGl3bF9yeCgpICAgICAgICAgRGV0YWNoIGl3bF9yeF9tZW1fYnVmZmVycyBmcm9tIHBvb2wgdXAgdG8gdGhlCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBSRUFEIElOREVYLCBkZXRhY2hpbmcgdGhlIFNLQiBmcm9tIHRoZSBwb29sLgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgTW92ZXMgdGhlIHBhY2tldCBidWZmZXIgZnJvbSBxdWV1ZSB0byByeF91c2VkLgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2FsbHMgaXdsX3J4X3F1ZXVlX3Jlc3RvY2sgdG8gcmVmaWxsIGFueSBlbXB0eQotICogICAgICAgICAgICAgICAgIC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VhbGxvY191Y29kZShzdHJ1Y3QgaXdsX3RyYW5zICp0cmFucykKK3sKKwlpd2xfZnJlZV9md19pbWcoYnVzKHRyYW5zKSwgJnRyYW5zLT51Y29kZV9ydCk7CisJaXdsX2ZyZWVfZndfaW1nKGJ1cyh0cmFucyksICZ0cmFucy0+dWNvZGVfaW5pdCk7CisJaXdsX2ZyZWVfZndfaW1nKGJ1cyh0cmFucyksICZ0cmFucy0+dWNvZGVfd293bGFuKTsKK30KKworaW50IGl3bF9hbGxvY19md19kZXNjKHN0cnVjdCBpd2xfYnVzICpidXMsIHN0cnVjdCBmd19kZXNjICpkZXNjLAorCQkgICAgICBjb25zdCB2b2lkICpkYXRhLCBzaXplX3QgbGVuKQoreworCWlmICghbGVuKSB7CisJCWRlc2MtPnZfYWRkciA9IE5VTEw7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCWRlc2MtPnZfYWRkciA9IGRtYV9hbGxvY19jb2hlcmVudChidXMtPmRldiwgbGVuLAorCQkJCQkgICZkZXNjLT5wX2FkZHIsIEdGUF9LRVJORUwpOworCWlmICghZGVzYy0+dl9hZGRyKQorCQlyZXR1cm4gLUVOT01FTTsKKworCWRlc2MtPmxlbiA9IGxlbjsKKwltZW1jcHkoZGVzYy0+dl9hZGRyLCBkYXRhLCBsZW4pOworCXJldHVybiAwOworfQorCisvKgorICogdWNvZGUKKyAqLworc3RhdGljIGludCBpd2xfbG9hZF9zZWN0aW9uKHN0cnVjdCBpd2xfdHJhbnMgKnRyYW5zLCBjb25zdCBjaGFyICpuYW1lLAorCQkJCXN0cnVjdCBmd19kZXNjICppbWFnZSwgdTMyIGRzdF9hZGRyKQoreworCXN0cnVjdCBpd2xfYnVzICpidXMgPSBidXModHJhbnMpOworCWRtYV9hZGRyX3QgcGh5X2FkZHIgPSBpbWFnZS0+cF9hZGRyOworCXUzMiBieXRlX2NudCA9IGltYWdlLT5sZW47CisJaW50IHJldDsKKworCXRyYW5zLT51Y29kZV93cml0ZV9jb21wbGV0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ndGgpOwotICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgY2FzZSBQUklTTTJfSE9TVEFQRF9TRVRfR0VORVJJQ19FTEVNRU5UOgotCSAgICAgICBwcmludGsoS0VSTl9ERUJVRyAiJXM6IENhdWdodCBXUEEgc3VwcGxpY2FudCBzZXQgV1BBIElFIHJlcXVlc3RcbiIsCi0JCQkgICAgICAgbmRldi0+bmFtZSk7Ci0gICAgICAgICAgICAgICByZXQgPSBwcmlzbTJfaW9jdGxfc2V0X2dlbmVyaWNfZWxlbWVudChuZGV2LCBwYXJhbSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAtPmxlbmd0aCk7Ci0gICAgICAgICAgICAgICBicmVhazsKLSAgICAgICBjYXNlIFBSSVNNMl9IT1NUQVBEX01MTUU6Ci0JICAgICAgIHByaW50ayhLRVJOX0RFQlVHICIlczogQ2F1Z2h0IFdQQSBzdXBwbGljYW50IE1MTUUgcmVxdWVzdFxuIiwKLQkJCSAgICAgICBuZGV2LT5uYW1lKTsKLSAgICAgICAgICAgICAgIHJldCA9IHByaXNtMl9pb2N0bF9tbG1lKG5kZXYsIHBhcmFtKTsKLSAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgIGNhc2UgUFJJU00yX0hPU1RBUERfU0NBTl9SRVE6Ci0JICAgICAgIHByaW50ayhLRVJOX0RFQlVHICIlczogQ2F1Z2h0IFdQQSBzdXBwbGljYW50IHNjYW4gcmVxdWVzdFxuIiwKLQkJCSAgICAgICBuZGV2LT5uYW1lKTsKLSAgICAgICAgICAgICAgIHJldCA9IHByaXNtMl9pb2N0bF9zY2FuX3JlcShuZGV2LCBwYXJhbSk7Ci0gICAgICAgICAgICAgICBicmVhazsKLQljYXNlIFBSSVNNNTRfU0VUX1dQQToKLQkgICAgICAgcHJpbnRrKEtFUk5fREVCVUcgIiVzOiBDYXVnaHQgV1BBIHN1cHBsaWNhbnQgd3BhIGluaXQgcmV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hdHRyaWJ1dGUgKmF0dHIsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgKmJ1ZikKIHsKIAlyZXR1cm4gc3ByaW50ZihidWYsICIlZFxuIiwgKGludClpb3JlYWQ4KCZydGxfdGFibGUtPnZlcnNpb24pKTsKIH0KIAotc3RhdGljIHNzaXplX3QgcnRsX3Nob3dfc3RhdGUoc3RydWN0IHN5c2Rldl9jbGFzcyAqZGV2LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHN5c2Rldl9jbGFzc19hdHRyaWJ1dGUgKmF0dHIsCitzdGF0aWMgc3NpemVfdCBydGxfc2hvd19zdGF0ZShzdHJ1Y3QgZGV2aWNlICpkZXYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZGV2aWNlX2F0dHJpYnV0ZSAqYXR0ciwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYXIgKmJ1ZikKIHsKIAlyZXR1cm4gc3ByaW50ZihidWYsICIlZFxuIiwgaW9yZWFkOCgmcnRsX3RhYmxlLT5ydF9zdGF0dXMpKTsKIH0KIAotc3RhdGljIHNzaXplX3QgcnRsX3NldF9zdGF0ZShzdHJ1Y3Qgc3lzZGV2X2NsYXNzICpkZXYsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzeXNkZXZfY2xhc3NfYXR0cmlidXRlICphdHRyLAorc3RhdGljIHNzaXplX3QgcnRsX3NldF9zdGF0ZShzdHJ1Y3QgZGV2aWNlICpkZXYsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBkZXZpY2VfYXR0cmlidXRlICphdHRyLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjaGFyICpidWYsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVfdCBjb3VudCkKIHsKQEAgLTIwNSwyNyArMjA0LDI4IEBACiAJcmV0dXJuIHJldDsKIH0K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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIEFTU1VNRUQgdG8gYmUgY2FsbGxlZCBmcm9tIHdpdGhpbiBhIGxvY2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogQVNTVU1FRCB0byBiZSBjYWxsZWQgZnJvbSB3aXRoaW4gYSBsb2NrICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBzdGF0aWMgaXBzX3NjYl90ICoKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9pc2NzaV9ib290X3N5c2ZzLmMgYi9kcml2ZXJzL3Njc2kvaXNjc2lfYm9vdF9zeXNmcy5jCmluZGV4IDg5NzAwY2IuLjE0YzFjOGYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9pc2NzaV9ib290X3N5c2ZzLmMKKysrIGIvZHJpdmVycy9zY3NpL2lzY3NpX2Jvb3Rfc3lzZnMuYwpAQCAtMTEyLDcgKzExMiw3IEBACiAJTlVMTAogfTsKIAotc3RhdGljIG1vZGVfdCBpc2NzaV9ib290X3RndF9hdHRyX2lzX3Zpc2libGUoc3RydWN0IGtvYmplY3QgKmtvYmosCitzdGF0aWMgdW1vZGVfdCBpc2NzaV9ib290X3RndF9hdHRyX2lzX3Zpc2libGUoc3RydWN0IGtvYmplY3QgKmtvYmosCiAJCQkJCSAgICAgc3RydWN0IGF0dHJpYnV0ZSAqYXR0ciwgaW50IGkpCiB7CiAJc3RydWN0IGlzY3NpX2Jvb3Rfa29iaiAqYm9vdF9rb2JqID0KQEAgLTE5Myw3ICsxOTMsNyBAQAogCU5VTEwKIH07CiAKLXN0YXRpYyBtb2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ICAgICBIb2xlcwl8CiAgKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAgKiB8IE1vZHVsZSBJbml0IGFuZCBQcm9iZSAgICAgICAgfCAgICAgICAweDAxMTYgICAgICAgfCAgCQl8Ci0gKiB8IE1haWxib3ggY29tbWFuZHMgICAgICAgICAgICAgfCAgICAgICAweDExMjkgICAgICAgfAkJfAorICogfCBNYWlsYm94IGNvbW1hbmRzICAgICAgICAgICAgIHwgICAgICAgMHgxMTJiICAgICAgIHwJCXwKICAqIHwgRGV2aWNlIERpc2NvdmVyeSAgICAgICAgICAgICB8ICAgICAgIDB4MjA4MyAgICAgICB8CQl8CiAgKiB8IFF1ZXVlIENvbW1hbmQgYW5kIElPIHRyYWNpbmcgfCAgICAgICAweDMwMmUgICAgICAgfCAgICAgMHgzMDA4ICAgICB8CiAgKiB8IERQQyBUaHJlYWQgICAgICAgICAgICAgICAgICAgfCAgICAgICAweDQwMWMgICAgICAgfAkJfAogICogfCBBc3luYyBFdmVudHMgICAgICAgICAgICAgICAgIHwgICAgICAgMHg1MDU5ICAgICAgIHwJCXwKLSAqIHwgVGltZXIgUm91dGluZXMgICAgICAgICAgICAgICB8ICAgICAgIDB4NjAwZCAgICAgICB8CQl8CisgKiB8IFRpbWVyIFJvdXRpbmVzICAgICAgICAgICAgICAgfCAgICAgICAweDYwMTAgICAgICAgfCAweDYwMGUsMHg2MDBmICB8CiAgKiB8IFVzZXIgU3BhY2UgSW50ZXJhY3Rpb25zICAgICAgfCAgICAgICAweDcwOWQgICAgICAgfAkJfAotICogfCBUYXNrIE1hbmFnZW1lbnQgICAgICAgICAgICAgIHwgICAgICAgMHg4MDQxICAgICAgIHwgICAgCQl8CisgKiB8IFRhc2sgTWFuYWdlbWVudCAgICAgICAgICAgICAgfCAgICAgICAweDgwNDEgICAgICAgfCAweDgwMGIgICAgICAgICB8Ci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CB2ZnNtb3VudCAqbW50KQoraW50IHNiX3ByZXBhcmVfcmVtb3VudF9yZWFkb25seShzdHJ1Y3Qgc3VwZXJfYmxvY2sgKnNiKQoreworCXN0cnVjdCBtb3VudCAqbW50OworCWludCBlcnIgPSAwOworCisJLyogUmFjeSBvcHRpbWl6YXRpb24uICBSZWNoZWNrIHRoZSBjb3VudGVyIHVuZGVyIE1OVF9XUklURV9IT0xEICovCisJaWYgKGF0b21pY19sb25nX3JlYWQoJnNiLT5zX3JlbW92ZV9jb3VudCkpCisJCXJldHVybiAtRUJVU1k7CisKKwlicl93cml0ZV9sb2NrKHZmc21vdW50X2xvY2spOworCWxpc3RfZm9yX2VhY2hfZW50cnkobW50LCAmc2ItPnNfbW91bnRzLCBtbnRfaW5zdGFuY2UpIHsKKwkJaWYgKCEobW50LT5tbnQubW50X2ZsYWdzICYgTU5UX1JFQURPTkxZKSkgeworCQkJbW50LT5tbnQubW50X2ZsYWdzIHw9IE1OVF9XUklURV9IT0xEOworCQkJc21wX21iKCk7CisJCQlpZiAobW50X2dldF93cml0ZXJzKG1udCkgPiAwKSB7CisJCQkJZXJyID0gLUVCVVNZOworCQkJCWJyZWFrOworCQkJfQorCQl9CisJfQorCWlmICghZXJyICYmIGF0b21pY19sb25nX3JlYWQoJnNiLT5zX3JlbW92ZV9jb3VudCkpCisJCWVyciA9IC1FQlVTWTsKKworCWlmICghZXJyKSB7CisJCXNiLT5zX3JlYWRvbmx5X3JlbW91bnQgPSAxOworCQlzbXBfd21iKCk7CisJfQorCWxpc3RfZm9yX2VhY2hfZW50cnkobW50LCAmc2ItPnNfbW91bnRzLCBtbnRfaW5zdGFuY2UpIHsKKwkJaWYgKG1udC0+bW50Lm1udF9mbGFncyAmIE1OVF9XUklURV9IT0xEKQorCQkJbW50LT5tbnQubW50X2ZsYWdzICY9IH5NTlRfV1JJVEVfSE9MRDsKKwl9CisJYnJfd3JpdGVfdW5sb2NrKHZmc21vdW50X2xvY2spOworCisJcmV0dXJuIGV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01QCiAJYnJfcmVhZF9sb2NrKHZmc21vdW50X2xvY2spOwogCWlmIChsaWtlbHkoYXRvbWljX3JlYWQoJm1udC0+bW50X2xvbmd0ZXJtKSkpIHsKLQkJbW50X2RlY19jb3VudChtbnQpOworCQltbnRfYWRkX2NvdW50KG1udCwgLTEpOwogCQlicl9yZWFkX3VubG9jayh2ZnNtb3VudF9sb2NrKTsKIAkJcmV0dXJuOwogCX0KIAlicl9yZWFkX3VubG9jayh2ZnNtb3VudF9sb2NrKTsKIAogCWJyX3dyaXRlX2xvY2sodmZzbW91bnRfbG9jayk7Ci0JbW50X2RlY19jb3VudChtbnQpOworCW1udF9hZGRfY291bnQobW50LCAtMSk7CiAJaWYgKG1udF9nZXRfY291bnQobW50KSkgewogCQlicl93cml0ZV91bmxvY2sodmZzbW91bnRfbG9jayk7CiAJCXJldHVybjsKIAl9CiAjZWxzZQotCW1udF9kZWNfY291bnQobW50KTsKKwltbnRfYWRkX2NvdW50KG1udCwgLTEpOwogCWlmIChsaWtlbHkobW50X2dldF9jb3VudChtbnQpKSkKIAkJcmV0dXJuOwogCWJyX3dyaXRlX2xvY2sodmZzbW91bnRfbG9jayk7CkBAIC04MDIsOSArODI3LDEwIEBACiAJCW1udF9hZGRfY291bnQobW50LCBtbnQtPm1udF9waW5uZWQgKyAxKTsKIAkJbW50LT5tbnRfcGlubmVkID0gMDsKIAkJYnJfd3JpdGVfdW5sb2NrKHZmc21vdW50X2xvY2spOwotCQlhY2N0X2F1dG9fY2xvc2VfbW50KG1udCk7CisJCWFjY3RfYXV0b19jbG9zZV9tbnQoJm1udC0+bW50KTsKIAkJZ290byBwdXRfYWdhaW47CiAJfQorCWxpc3RfZGVsKCZtbnQtPm1udF9pbnN0YW5jZSk7CiAJYnJfd3JpdGVfdW5sb2NrKHZmc21vdW50X2xvY2spOwogCW1udGZyZWUobW50KTsKIH0KQEAgLTgxMiwxMCArODM4LDExIEBACiB2b2lkIG1udHB1dChzdHJ1Y3QgdmZzbW91bnQg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HNob3dfdmZzbW50KHN0cnVjdCBzZXFfZmlsZSAqbSwgc3RydWN0IHZmc21vdW50ICptbnQpCit7CisJc3RydWN0IG1vdW50ICpyID0gcmVhbF9tb3VudChtbnQpOworCWludCBlcnIgPSAwOworCXN0cnVjdCBwYXRoIG1udF9wYXRoID0geyAuZGVudHJ5ID0gbW50LT5tbnRfcm9vdCwgLm1udCA9IG1udCB9OworCXN0cnVjdCBzdXBlcl9ibG9jayAqc2IgPSBtbnRfcGF0aC5kZW50cnktPmRfc2I7CisKKwlpZiAoc2ItPnNfb3AtPnNob3dfZGV2bmFtZSkgeworCQllcnIgPSBzYi0+c19vcC0+c2hvd19kZXZuYW1lKG0sIG1udF9wYXRoLmRlbnRyeSk7CisJCWlmIChlcnIpCisJCQlnb3RvIG91dDsKKwl9IGVsc2UgeworCQltYW5nbGUobSwgci0+bW50X2Rldm5hbWUgPyByLT5tbnRfZGV2bmFtZSA6ICJub25lIik7CisJfQorCXNlcV9wdXRjKG0sICcgJyk7CisJc2VxX3BhdGgobSwgJm1udF9wYXRoLCAiIFx0XG5cXCIpOworCXNlcV9wdXRjKG0sICcgJyk7CisJc2hvd190eXBlKG0sIHNiKTsKKwlzZXFfcHV0cyhtLCBfX21udF9pc19yZWFkb25seShtbnQpID8gIiBybyIgOiAiIHJ3Iik7CisJZXJyID0gc2hvd19zYl9vcHRzKG0sIHNiKTsKKwlpZiAoZXJyKQorCQlnb3RvIG91dDsKKwlzaG93X21udF9vcHRzKG0sIG1udCk7CisJaWYgKHNiLT5zX29wLT5zaG93X29wdGlvbnMpCisJCWVyciA9IHNiLT5zX29wLT5zaG93X29wdGlvbnMobSwgbW50X3BhdGguZGVudHJ5KTsKKwlzZXFfcHV0cyhtLCAiIDAgMFxuIik7CitvdXQ6CisJcmV0dXJuIGVycjsKK30KKworc3RhdGljIGludCBzaG93X21vdW50aW5mbyhzdHJ1Y3Qgc2VxX2ZpbGUgKm0sIHN0cnVjdCB2ZnNtb3VudCAqbW50KQoreworC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ZSBsb2NrOlxuIiwKIAkJY3Vyci0+Y29tbSwgdGFza19waWRfbnIoY3VycikpOwpAQCAtMjIyNCw3ICsyMjI0LDcgQEAKIAlwcmludGsoIlxuIik7CiAJcHJpbnRrKCI9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbiIpOwogCXByaW50aygiWyBJTkZPOiBpbmNvbnNpc3RlbnQgbG9jayBzdGF0ZSBdXG4iKTsKLQlwcmludF9rZXJuZWxfdmVyc2lvbigpOworCXByaW50X2tlcm5lbF9pZGVudCgpOwogCXByaW50aygiLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXG4iKTsKIAogCXByaW50aygiaW5jb25zaXN0ZW50IHslc30gLT4geyVzfSB1c2FnZS5cbiIsCkBAIC0yMjg5LDcgKzIyODksNyBAQAogCXByaW50aygiXG4iKTsKIAlwcmludGsoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIik7CiAJcHJpbnRrKCJbIElORk86IHBvc3NpYmxlIGlycSBsb2NrIGludmVyc2lvbiBkZXBlbmRlbmN5IGRldGVjdGVkIF1cbiIpOwotCXByaW50X2tlcm5lbF92ZXJzaW9uKCk7CisJcHJpbnRfa2VybmVsX2lkZW50KCk7CiAJcHJpbnRrKCItLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cbiIpOwogCXByaW50aygiJXMvJWQganVzdCBjaGFuZ2VkIHRoZSBzdGF0ZSBvZiBsb2NrOlxuIiwKIAkJY3Vyci0+Y29tbSwgdGFza19waWRfbnIoY3VycikpOwpAQCAtMzE3NSw2ICszMTc1LDcgQEAKIAlwcmludGsoIlxuIik7CiAJcHJpbnRrKCI9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09XG4iKTsKIAlwcmludGsoIlsgQlVHOiBiYWQgdW5sb2NrIGJhbGFuY2U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c3QgaW50IHByaW9fdG9fd2VpZ2h0WzQwXSA9IHsKKyAvKiAtMjAgKi8gICAgIDg4NzYxLCAgICAgNzE3NTUsICAgICA1NjQ4MywgICAgIDQ2MjczLCAgICAgMzYyOTEsCisgLyogLTE1ICovICAgICAyOTE1NCwgICAgIDIzMjU0LCAgICAgMTg3MDUsICAgICAxNDk0OSwgICAgIDExOTE2LAorIC8qIC0xMCAqLyAgICAgIDk1NDgsICAgICAgNzYyMCwgICAgICA2MTAwLCAgICAgIDQ5MDQsICAgICAgMzkwNiwKKyAvKiAgLTUgKi8gICAgICAzMTIxLCAgICAgIDI1MDEsICAgICAgMTk5MSwgICAgICAxNTg2LCAgICAgIDEyNzcsCisgLyogICAwICovICAgICAgMTAyNCwgICAgICAgODIwLCAgICAgICA2NTUsICAgICAgIDUyNiwgICAgICAgNDIzLAorIC8qICAgNSAqLyAgICAgICAzMzUsICAgICAgIDI3MiwgICAgICAgMjE1LCAgICAgICAxNzIsICAgICAgIDEzNywKKyAvKiAgMTAgKi8gICAgICAgMTEwLCAgICAgICAgODcsICAgICAgICA3MCwgICAgICAgIDU2LCAgICAgICAgNDUsCisgLyogIDE1ICovICAgICAgICAzNiwgICAgICAgIDI5LCAgICAgICAgMjMsICAgICAgICAxOCwgICAgICAgIDE1LAorfTsKKworLyoKKyAqIEludmVyc2UgKDJeMzIveCkgdmFsdWVzIG9mIHRoZSBwcmlvX3RvX3dlaWdodFtdIGFycmF5LCBwcmVjYWxjdWxhdGVkLgorICoKKyAqIEluIGNhc2VzIHdoZXJlIHRoZSB3ZWlnaHQgZG9lcyBub3QgY2hhbmdlIG9mdGVuLCB3ZSBjYW4gdXNlIHRoZQorICogcHJlY2FsY3VsYXRlZCBpbnZlcnNlIHRvIHNwZWVkIHVwIGFyaXRobWV0aWNzIGJ5IHR1cm5pbmcgZGl2aXNpb25zCisgKiBpbnRvIG11bHRpcGxpY2F0aW9uczoKKyAqLworc3RhdGljIGNvbnN0IHUzMiBwcmlvX3RvX3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WVzLXdyaXR0ZW46ICVsdS8lbHUgICAjUDolZFxuIiwKKwkJICAgZW50cmllcywgdG90YWwsIG51bV9vbmxpbmVfY3B1cygpKTsKKwlzZXFfcHV0cyhtLCAiI1xuIik7Cit9CisKK3N0YXRpYyB2b2lkIHByaW50X2Z1bmNfaGVscF9oZWFkZXIoc3RydWN0IHRyYWNlX2FycmF5ICp0ciwgc3RydWN0IHNlcV9maWxlICptKQoreworCXByaW50X2V2ZW50X2luZm8odHIsIG0pOworCXNlcV9wdXRzKG0sICIjICAgICAgICAgICBUQVNLLVBJRCAgIENQVSMgICAgICBUSU1FU1RBTVAgIEZVTkNUSU9OXG4iKTsKIAlzZXFfcHV0cyhtLCAiIyAgICAgICAgICAgICAgfCB8ICAgICAgIHwgICAgICAgICAgfCAgICAgICAgIHxcbiIpOwogfQogCitzdGF0aWMgdm9pZCBwcmludF9mdW5jX2hlbHBfaGVhZGVyX2lycShzdHJ1Y3QgdHJhY2VfYXJyYXkgKnRyLCBzdHJ1Y3Qgc2VxX2ZpbGUgKm0pCit7CisJcHJpbnRfZXZlbnRfaW5mbyh0ciwgbSk7CisJc2VxX3B1dHMobSwgIiMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfLS0tLS09PiBpcnFzLW9mZlxuIik7CisJc2VxX3B1dHMobSwgIiMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8gXy0tLS09PiBuZWVkLXJlc2NoZWRcbiIpOworCXNlcV9wdXRzKG0sICIjICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgLyBfLS0tPT4gaGFyZGlycS9zb2Z0aXJxXG4iKTsKKwlzZXFfcHV0cyhtLCAiIyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8fCAvIF8tLT0+IHByZWVtcHQtZGVwdGhcbiIpOworCXNlcV9wdXRzKG0sICIjICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8fCAvICAgICBkZWxheVxuIik7CisJc2VxX3B1dHMobSwgIiMgICAgICAgICAgIFR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ltdXRleF91bmxvY2soJmxvY2FsLT5zb2NrZXRfbG9jayk7CisKKwkJbG9ja19zb2NrKCZzb2NrLT5zayk7CisKKwkJaWYgKHNvY2stPmRzYXAgPT0gTExDUF9TQVBfU0RQICYmCisJCQkJc29jay0+c2suc2tfc3RhdGUgPT0gTExDUF9MSVNURU4pCisJCQlnb3RvIGVucXVldWU7CisJfSBlbHNlIHsKKwkJdTggKnNuOworCQlzaXplX3Qgc25fbGVuOworCisJCXNuID0gbmZjX2xsY3BfY29ubmVjdF9zbihza2IsICZzbl9sZW4pOworCQlpZiAoc24gPT0gTlVMTCkgeworCQkJcmVhc29uID0gTExDUF9ETV9OT0JPVU5EOworCQkJZ290byBmYWlsOworCQl9CisKKwkJcHJfZGVidWcoIlNlcnZpY2UgbmFtZSBsZW5ndGggJXp1XG4iLCBzbl9sZW4pOworCisJCW11dGV4X2xvY2soJmxvY2FsLT5zb2NrZXRfbG9jayk7CisJCWZvciAoYm91bmRfc2FwID0gMDsgYm91bmRfc2FwIDwgTExDUF9MT0NBTF9TQVBfT0ZGU0VUOworCQkJCQkJCQlib3VuZF9zYXArKykgeworCQkJc29jayA9IGxvY2FsLT5zb2NrZXRzW2JvdW5kX3NhcF07CisJCQlpZiAoc29jayA9PSBOVUxMKQorCQkJCWNvbnRpbnVlOworCisJCQlpZiAoc29jay0+c2VydmljZV9uYW1lID09IE5VTEwgfHwKKwkJCQlzb2NrLT5zZXJ2aWNlX25hbWVfbGVuID09IDApCisJCQkJCWNvbnRpbnVlOworCisJCQlpZiAoc29jay0+c2VydmljZV9uYW1lX2xlbiAhPSBzbl9sZW4pCisJCQkJY29udGludWU7CisKKwkJCWlmIChzb2NrLT5kc2FwID09IExMQ1BfU0FQX1NEUCAmJgorCQkJCQlzb2NrLT5zay5za19zdGF0ZSA9PSBMTENQX0xJU1RFTiAmJgorCQkJCQkhbWVtY21wKHNuLCBzb2NrLT5zZXJ2aWNlX25hbWUsIHNuX2xlbikpIHsKKwkJCQlwcl9kZW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isJZXJyID0gbWFrZV93cml0YWJsZShza2IsIFZMQU5fRVRIX0hMRU4pOworCWlmICh1bmxpa2VseShlcnIpKQorCQlyZXR1cm4gZXJyOworCisJaWYgKHNrYi0+aXBfc3VtbWVkID09IENIRUNLU1VNX0NPTVBMRVRFKQorCQlza2ItPmNzdW0gPSBjc3VtX3N1Yihza2ItPmNzdW0sIGNzdW1fcGFydGlhbChza2ItPmRhdGEKKwkJCQkJKyBFVEhfSExFTiwgVkxBTl9ITEVOLCAwKSk7CisKKwl2aGRyID0gKHN0cnVjdCB2bGFuX2hkciAqKShza2ItPmRhdGEgKyBFVEhfSExFTik7CisJKmN1cnJlbnRfdGNpID0gdmhkci0+aF92bGFuX1RDSTsKKworCW1lbW1vdmUoc2tiLT5kYXRhICsgVkxBTl9ITEVOLCBza2ItPmRhdGEsIDIgKiBFVEhfQUxFTik7CisJX19za2JfcHVsbChza2IsIFZMQU5fSExFTik7CisKKwl2bGFuX3NldF9lbmNhcF9wcm90byhza2IsIHZoZHIpOworCXNrYi0+bWFjX2hlYWRlciArPSBWTEFOX0hMRU47CisJc2tiX3Jlc2V0X21hY19sZW4oc2tiKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHBvcF92bGFuKHN0cnVjdCBza19idWZmICpza2IpCit7CisJX19iZTE2IHRjaTsKKwlpbnQgZXJyOworCisJaWYgKGxpa2VseSh2bGFuX3R4X3RhZ19wcmVzZW50KHNrYikpKSB7CisJCXNrYi0+dmxhbl90Y2kgPSAwOworCX0gZWxzZSB7CisJCWlmICh1bmxpa2VseShza2ItPnByb3RvY29sICE9IGh0b25zKEVUSF9QXzgwMjFRKSB8fAorCQkJICAgICBza2ItPmxlbiA8IFZMQU5fRVRIX0hMRU4pKQorCQkJcmV0dXJuIDA7CisKKwkJZXJyID0gX19wb3Bfdmxhbl90Y2koc2tiLCAmdGNpKTsKKwkJaWYgKGVycikKKwkJCXJldHVybiBlcnI7CisJfQorCS8qIG1vdmUgbmV4dCB2bGF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gICAgIGludCAqa2V5X2xlbnApOwordm9pZCBvdnNfZmxvd191c2VkKHN0cnVjdCBzd19mbG93ICosIHN0cnVjdCBza19idWZmICopOwordTY0IG92c19mbG93X3VzZWRfdGltZSh1bnNpZ25lZCBsb25nIGZsb3dfamlmZmllcyk7CisKKy8qIFVwcGVyIGJvdW5kIG9uIHRoZSBsZW5ndGggb2YgYSBubGF0dHItZm9ybWF0dGVkIGZsb3cga2V5LiAgVGhlIGxvbmdlc3QKKyAqIG5sYXR0ci1mb3JtYXR0ZWQgZmxvdyBrZXkgd291bGQgYmU6CisgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0ICBwYWQgIG5sIGhkciAgdG90YWwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgIC0tLS0tLSAgLS0tICAtLS0tLS0gIC0tLS0tCisgKiAgT1ZTX0tFWV9BVFRSX1BSSU9SSVRZICAgICAgNCAgICAtLSAgICAgNCAgICAgIDgKKyAqICBPVlNfS0VZX0FUVFJfSU5fUE9SVCAgICAgICA0ICAgIC0tICAgICA0ICAgICAgOAorICogIE9WU19LRVlfQVRUUl9FVEhFUk5FVCAgICAgMTIgICAgLS0gICAgIDQgICAgIDE2CisgKiAgT1ZTX0tFWV9BVFRSXzgwMjFRICAgICAgICAgNCAgICAtLSAgICAgNCAgICAgIDgKKyAqICBPVlNfS0VZX0FUVFJfRVRIRVJUWVBFICAgICAyICAgICAyICAgICA0ICAgICAgOAorICogIE9WU19LRVlfQVRUUl9JUFY2ICAgICAgICAgNDAgICAgLS0gICAgIDQgICAgIDQ0CisgKiAgT1ZTX0tFWV9BVFRSX0lDTVBWNiAgICAgICAgMiAgICAgMiAgICAgNCAgICAgIDgKKyAqICBPVlNfS0VZX0FUVFJfTkQgICAgICAgICAgIDI4ICAgIC0tICAgICA0ICAgICAzMgorICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAqICB0b3RhbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzMgorICovCisjZGVmaW5lIEZMT1dfQlVGU0laRSAxMzIKKworaW50IG92c19mbG93X3RvX25sYXR0cnMoY29uc3Qgc3RydWN0IHN3X2Zsb3dfa2V5ICosIHN0cnVjdCBza19idWZmICopOworaW50IG92c19mbG93X2Zyb21fbmxhdHRycyhzdHJ1Y3Qgc3dfZmxvd19rZXkgKnN3a2V5LCBpbnQgKmtleV9sZW5wLAorCQkgICAgICBjb25zdCBzdHJ1Y3QgbmxhdHRyICopOworaW50IG92c19mbG93X21ldGFkYXRhX2Zyb21fbmxhdHRycyh1MzIgKnByaW9yaXR5LCB1MTYgKmluX3BvcnQsCisJCQkgICAgICAgY29uc3Qgc3RydWN0IG5sYXR0ciAqKTsKKworI2RlZmluZSBUQkxfTUlOX0JVQ0tFVFMJCTEwMjQKKworc3RydWN0IGZsb3dfdGFibGUgeworCXN0cnVjdCBmbGV4X2FycmF5ICpidWNrZXRzOworCXVuc2lnbmVkIGludCBjb3VudCwgbl9idWNrZXRzOworCXN0cnVjdCByY3VfaGVhZCByY3U7CisJaW50IG5vZGVfdmVyOworCXUzMiBoYXNoX3NlZWQ7CisJYm9vbCBrZWVwX2Zsb3dzOworfTsKKworc3RhdGljIGlubGluZSBpbnQgb3ZzX2Zsb3dfdGJsX2NvdW50KHN0cnVjdCBmbG93X3RhYmxlICp0YWJsZSkKK3sKKwlyZXR1cm4gdGFibGUtPmNvdW50OworfQorCitzdGF0aWMgaW5saW5lIGludCBvdnNfZmxvd190YmxfbmVlZF90b19leHBhbmQoc3RydWN0IGZsb3dfdGFibGUgKnRhYmxlKQoreworCXJldHVybiAodGFibGUtPmNvdW50ID4gdGFibGUtPm5fYnVja2V0cyk7Cit9CisKK3N0cnVjdCBzd19mbG93ICpvdnNfZmxvd190YmxfbG9va3VwKHN0cnVjdCBmbG93X3RhYmxlICp0YWJsZSwKKwkJCQkgICAgc3RydWN0IHN3X2Zsb3dfa2V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VmaW5lIEJJVFNfUEVSX0JZVEUgICAgICAgICAgIDgKICNkZWZpbmUgQklUU19UT19MT05HUyhucikgICAgICAgRElWX1JPVU5EX1VQKG5yLCBCSVRTX1BFUl9CWVRFICogc2l6ZW9mKGxvbmcpKQogCisjZGVmaW5lIGZvcl9lYWNoX3NldF9iaXQoYml0LCBhZGRyLCBzaXplKSBcCisJZm9yICgoYml0KSA9IGZpbmRfZmlyc3RfYml0KChhZGRyKSwgKHNpemUpKTsJCVwKKwkgICAgIChiaXQpIDwgKHNpemUpOwkJCQkJXAorCSAgICAgKGJpdCkgPSBmaW5kX25leHRfYml0KChhZGRyKSwgKHNpemUpLCAoYml0KSArIDEpKQorCisvKiBzYW1lIGFzIGZvcl9lYWNoX3NldF9iaXQoKSBidXQgdXNlIGJpdCBhcyB2YWx1ZSB0byBzdGFydCB3aXRoICovCisjZGVmaW5lIGZvcl9lYWNoX3NldF9iaXRfY29udChiaXQsIGFkZHIsIHNpemUpIFwKKwlmb3IgKChiaXQpID0gZmluZF9uZXh0X2JpdCgoYWRkciksIChzaXplKSwgKGJpdCkpOwlcCisJICAgICAoYml0KSA8IChzaXplKTsJCQkJCVwKKwkgICAgIChiaXQpID0gZmluZF9uZXh0X2JpdCgoYWRkciksIChzaXplKSwgKGJpdCkgKyAxKSkKKwogc3RhdGljIGlubGluZSB2b2lkIHNldF9iaXQoaW50IG5yLCB1bnNpZ25lZCBsb25nICphZGRyKQogewogCWFkZHJbbnIgLyBCSVRTX1BFUl9MT05HXSB8PSAxVUwgPDwgKG5yICUgQklUU19QRVJfTE9ORyk7CkBAIC0zMCw0ICs0MSwxMTEgQEAKIAlyZXR1cm4gc2l6ZW9mKHcpID09IDQgPyBod2VpZ2h0MzIodykgOiBod2VpZ2h0NjQodyk7CiB9CiAKKyNkZWZpbmUgQklUT1BfV09SRChucikJCSgobnIpIC8gQklUU19QRVJfTE9ORykKKworLyoqCisgKiBfX2ZmcyAtIGZpbmQgZmlyc3QgYml0IGluIHdvcm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