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AgICAqLworCTB4NTU1NSwJCQkvKiBWQyAgICAgICAgICAgICAgICAgICAgICovCisJMHgwQzBDLAkJCS8qIEhJID09IEMgc2V0ICYmIFogY2xlYXIgKi8KKwkweEYzRjMsCQkJLyogTFMgPT0gQyBjbGVhciB8fCBaIHNldCAqLworCTB4QUE1NSwJCQkvKiBHRSA9PSAoTj09VikgICAgICAgICAgICovCisJMHg1NUFBLAkJCS8qIExUID09IChOIT1WKSAgICAgICAgICAgKi8KKwkweDBBMDUsCQkJLyogR1QgPT0gKCFaICYmIChOPT1WKSkgICAqLworCTB4RjVGQSwJCQkvKiBMRSA9PSAoWiB8fCAoTiE9VikpICAgICovCisJMHhGRkZGLAkJCS8qIEFMIGFsd2F5cyAgICAgICAgICAgICAgKi8KKwkwCQkJLyogTlYgICAgICAgICAgICAgICAgICAgICAqLworfTsKKworLyoKKyAqIFJldHVybnM6CisgKiBBUk1fT1BDT0RFX0NPTkRURVNUX0ZBSUwgICAtIGlmIGNvbmRpdGlvbiBmYWlscworICogQVJNX09QQ09ERV9DT05EVEVTVF9QQVNTICAgLSBpZiBjb25kaXRpb24gcGFzc2VzIChpbmNsdWRpbmcgQUwpCisgKiBBUk1fT1BDT0RFX0NPTkRURVNUX1VOQ09ORCAtIGlmIE5WIGNvbmRpdGlvbiwgb3Igc2VwYXJhdGUgdW5jb25kaXRpb25hbAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcGNvZGUgc3BhY2UgZnJvbSB2NSBvbndhcmRzCisgKgorICogQ29kZSB0aGF0IHRlc3RzIHdoZXRoZXIgYSBjb25kaXRpb25hbCBpbnN0cnVjdGlvbiB3b3VsZCBwYXNzIGl0cyBjb25kaXRpb24KKyAqIGNoZWNrIHNob3VsZCBjaGVjayB0aGF0IHJldHVybiB2YWx1ZSA9PSBBUk1fT1BDT0RFX0NPTkRURVNUX1BBU1MuCisgKgorICogQ29kZSB0aGF0IHRlc3RzIGlmIGEgY29uZGl0aW9uIG1lYW5zIHRoYXQg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9hcm0vbWFjaC1weGEvY29saWJyaS1weGEyNzAtaW5jb21lLmMKKysrIGIvYXJjaC9hcm0vbWFjaC1weGEvY29saWJyaS1weGEyNzAtaW5jb21lLmMKQEAgLTE4Myw3ICsxODMsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogQmFja2xpZ2h0CiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2lmIGRlZmluZWQoQ09ORklHX0JBQ0tMSUdIVF9QV00pIHx8IGRlZmluZWQoQ09ORklHX0JBQ0tMSUdIVF9QV01fX01PRFVMRSkKKyNpZiBkZWZpbmVkKENPTkZJR19CQUNLTElHSFRfUFdNKSB8fCBkZWZpbmVkKENPTkZJR19CQUNLTElHSFRfUFdNX01PRFVMRSkKIHN0YXRpYyBzdHJ1Y3QgcGxhdGZvcm1fcHdtX2JhY2tsaWdodF9kYXRhIGluY29tZV9iYWNrbGlnaHRfZGF0YSA9IHsKIAkucHdtX2lkCQk9IDAsCiAJLm1heF9icmlnaHRuZXNzCT0gMHgzZmYsCmRpZmYgLS1naXQgYS9hcmNoL2FybS9tYWNoLXB4YS9jb2xpYnJpLXB4YTI3MC5jIGIvYXJjaC9hcm0vbWFjaC1weGEvY29saWJyaS1weGEyNzAuYwppbmRleCAwNWJmYTFiLi42YTY4NTE2IDEwMDY0NAotLS0gYS9hcmNoL2FybS9tYWNoLXB4YS9jb2xpYnJpLXB4YTI3MC5jCisrKyBiL2FyY2gvYXJtL21hY2gtcHhhL2NvbGlicmktcHhhMjcwLmMKQEAgLTMxMyw2ICszMTMsNyBAQAogCS5pbml0X2lycQk9IHB4YTI3eF9pbml0X2lycSwKIAkuaGFuZGxlX2lycQk9IHB4YTI3eF9oYW5kbGVfaXJxLAogCS50aW1lcgkJPSAmcHhhX3RpbW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gICAgMgogI2RlZmluZSBDUFVCXzY4MDYwICAgICAzCisjZGVmaW5lIENQVUJfQ09MREZJUkUgIDQKIAogI2RlZmluZSBDUFVfNjgwMjAgICAgICAoMTw8Q1BVQl82ODAyMCkKICNkZWZpbmUgQ1BVXzY4MDMwICAgICAgKDE8PENQVUJfNjgwMzApCiAjZGVmaW5lIENQVV82ODA0MCAgICAgICgxPDxDUFVCXzY4MDQwKQogI2RlZmluZSBDUFVfNjgwNjAgICAgICAoMTw8Q1BVQl82ODA2MCkKKyNkZWZpbmUgQ1BVX0NPTERGSVJFICAgKDE8PENQVUJfQ09MREZJUkUpCiAKICNkZWZpbmUgRlBVQl82ODg4MSAgICAgMAogI2RlZmluZSBGUFVCXzY4ODgyICAgICAxCiAjZGVmaW5lIEZQVUJfNjgwNDAgICAgIDIgICAgICAgICAgICAgICAgICAgICAgIC8qIEludGVybmFsIEZQVSAqLwogI2RlZmluZSBGUFVCXzY4MDYwICAgICAzICAgICAgICAgICAgICAgICAgICAgICAvKiBJbnRlcm5hbCBGUFUgKi8KICNkZWZpbmUgRlBVQl9TVU5GUEEgICAgNCAgICAgICAgICAgICAgICAgICAgICAgLyogU3VuLTMgRlBBICovCisjZGVmaW5lIEZQVUJfQ09MREZJUkUgIDUgICAgICAgICAgICAgICAgICAgICAgIC8qIENvbGRGaXJlIEZQVSAqLwogCiAjZGVmaW5lIEZQVV82ODg4MSAgICAgICgxPDxGUFVCXzY4ODgxKQogI2RlZmluZSBGUFVfNjg4ODIgICAgICAoMTw8RlBVQl82ODg4MikKICNkZWZpbmUgRlBVXzY4MDQwICAgICAgKDE8PEZQVUJfNjgwNDApCiAjZGVmaW5lIEZQVV82ODA2MCAgICAgICgxPDxGUFVCXzY4MDYwKQogI2RlZmluZSBGUFVfU1VORlBBICAgICAoMTw8RlBVQl9TVU5GUEEpCisjZGVmaW5lIEZQVV9DT0xERklSRSAgICgxPDxGUFVCX0NPTERGSVJFKQogCiAjZGVmaW5lIE1NVUJfNjg4NTEgICAgIDAKICNkZWZpbmUgTU1VQl82ODAzMCAgICAgMSAgICAgICAgICAgICAgICAgICAgICAgLyogSW50ZXJuYWwgTU1VICovCkBAIC0yMzUsNiArMjQwLDcgQEAKICNkZWZpbmUgTU1VQl82ODA2MCAgICAgMyAgICAgICAgICAgICAgICAgICAgICAgLyogSW50ZXJuYWwgTU1VICovCiAjZGVmaW5lIE1NVUJfQVBPTExPICAgIDQgICAgICAgICAgICAgICAgICAgICAgIC8qIEN1c3RvbSBBcG9sbG8gKi8KICNkZWZpbmUgTU1VQl9TVU4zICAgICAgNSAgICAgICAgICAgICAgICAgICAgICAgLyogQ3VzdG9tIFN1bi0zICovCisjZGVmaW5lIE1NVUJfQ09MREZJUkUgIDYgICAgICAgICAgICAgICAgICAgICAgIC8qIEludGVybmFsIE1NVSAqLwogCiAjZGVmaW5lIE1NVV82ODg1MSAgICAgICgxPDxNTVVCXzY4ODUxKQogI2RlZmluZSBNTVVfNjgwMzAgICAgICAoMTw8TU1VQl82ODAzMCkKQEAgLTI0Miw2ICsyNDgsNyBAQAogI2RlZmluZSBNTVVfNjgwNjAgICAgICAoMTw8TU1VQl82ODA2MCkKICNkZWZpbmUgTU1VX1NVTjMgICAgICAgKDE8PE1NVUJfU1VOMykKICNkZWZpbmUgTU1VX0FQT0xMTyAgICAgKDE8PE1NVUJfQVBPTExPKQorI2RlZmluZSBNTVVfQ09MREZJUkUgICAoMTw8TU1VQl9DT0xERklSRSkKIAogI2lmZGVmIF9fS0VSTkVMX18KIApAQCAtMzQxLDYgKzM0OCwxMyBAQAogIyAgZW5kaWYKICNlbmRpZgogCisjaWYgIWRlZmluZWQoQ09ORklHX0NPTERGSVJFKQorIyAgZGVmaW5lIENQVV9JU19DT0xERklSRSAoMCkKKyNlbHNlCisjICBkZWZpbmUgQ1BVX0lTX0NPTERGSVJFICgxKQorIyAgZGVmaW5lIE1NVV9JU19DT0xERklSRSAoMSkKKyNlbmRpZgorCiAjZGVmaW5lIENQVV9UWVBFICh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GZyYW1lIGludG8gdGhlIGVycm9yX2NvZGUgdmFsdWUgbmVlZGVkIGJ5CisgKglkb19mYXVsdC4KKyovCitzdGF0aWMgY29uc3QgdW5zaWduZWQgY2hhciBmc19lcnJfY29kZVtdID0geworCTAsICAvKiAwMDAwICovCisJMCwgIC8qIDAwMDEgKi8KKwkwLCAgLyogMDAxMCAqLworCTAsICAvKiAwMDExICovCisJMSwgIC8qIDAxMDAgKi8KKwkwLCAgLyogMDEwMSAqLworCTAsICAvKiAwMTEwICovCisJMCwgIC8qIDAxMTEgKi8KKwkyLCAgLyogMTAwMCAqLworCTMsICAvKiAxMDAxICovCisJMiwgIC8qIDEwMTAgKi8KKwkwLCAgLyogMTAxMSAqLworCTEsICAvKiAxMTAwICovCisJMSwgIC8qIDExMDEgKi8KKwkwLCAgLyogMTExMCAqLworCTAgICAvKiAxMTExICovCit9OworCitzdGF0aWMgaW5saW5lIHZvaWQgYWNjZXNzX2Vycm9yY2YodW5zaWduZWQgaW50IGZzLCBzdHJ1Y3QgZnJhbWUgKmZwKQoreworCXVuc2lnbmVkIGxvbmcgbW11c3IsIGFkZHI7CisJdW5zaWduZWQgaW50IGVycl9jb2RlOworCWludCBuZWVkX3BhZ2VfZmF1bHQ7CisKKwltbXVzciA9IG1tdV9yZWFkKE1NVVNSKTsKKwlhZGRyID0gbW11X3JlYWQoTU1VQVIpOworCisJLyoKKwkgKiBlcnJvcl9jb2RlOgorCSAqCWJpdCAwID09IDAgbWVhbnMgbm8gcGFnZSBmb3VuZCwgMSBtZWFucyBwcm90ZWN0aW9uIGZhdWx0CisJICoJYml0IDEgPT0gMCBtZWFucyByZWFkLCAxIG1lYW5zIHdyaXRlCisJICovCisJc3dpdGNoIChmcykgeworCWNhc2UgIDU6ICAvKiAwMTAxIFRMQiBvcHdvcmQgWCBtaXNzICovCisJCW5lZWRfcGFnZV9mYXVsdCA9IGNmX3RsYl9taXNzKCZmcC0+cHRyZWdzLCAwLCAwLCAwKTsKKwkJYWRkciA9I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DxsaW51eC9pby5oPgorI2luY2x1ZGUgPGxpbnV4L21tLmg+CisjaW5jbHVkZSA8bGludXgvYm9vdG1lbS5oPgorI2luY2x1ZGUgPGFzbS9wZ2FsbG9jLmg+CiAjaW5jbHVkZSA8YXNtL21hY2hkZXAuaD4KICNpbmNsdWRlIDxhc20vY29sZGZpcmUuaD4KICNpbmNsdWRlIDxhc20vbTU0eHhzaW0uaD4KICNpbmNsdWRlIDxhc20vbWNmdWFydC5oPgogI2luY2x1ZGUgPGFzbS9tNTR4eGdwdC5oPgorI2lmZGVmIENPTkZJR19NTVUKKyNpbmNsdWRlIDxhc20vbW11X2NvbnRleHQuaD4KKyNlbmRpZgogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCkBAIC05NSw4ICsxMDEsNDkgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAorI2lmZGVmIENPTkZJR19NTVUKKwordW5zaWduZWQgbG9uZyBudW1fcGFnZXM7CisKK3N0YXRpYyB2b2lkIF9faW5pdCBtY2Y1NHh4X2Jvb3RtZW1fYWxsb2Modm9pZCkKK3sKKwl1bnNpZ25lZCBsb25nIHN0YXJ0X3BmbjsKKwl1bnNpZ25lZCBsb25nIG1lbXN0YXJ0OworCisJLyogX3JhbWJhc2UgYW5kIF9yYW1lbmQgd2lsbCBiZSBuYXR1cmFsbHkgcGFnZSBhbGlnbmVkICovCisJbTY4a19tZW1vcnlbMF0uYWRkciA9IF9yYW1iYXNlOworCW02OGtfbWVtb3J5WzBdLnNpemUgPSBfcmFtZW5kIC0gX3JhbWJhc2U7CisKKwkvKiBjb21wdXRlIHRvdGFsIHBhZ2VzIGluIHN5c3RlbSAqLworCW51bV9wYWdlcyA9IChfcmFtZW5kIC0gX3JhbWJhc2UpID4+IFBBR0VfU0hJR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MTUyMDA+OworCQkJCWludGVycnVwdC1wYXJlbnQgPSA8Jk1QSUM+OworCQkJCWludGVycnVwdHMgPSA8MzQgMj47CisJCQl9OworCisJCQlJSUMwOiBpMmNAMDAwMDAwMDAgeworCQkJCWNvbXBhdGlibGUgPSAiaWJtLGlpYy1jdXJyaXR1Y2siLCAiaWJtLGlpYyI7CisJCQkJcmVnID0gPDB4MCAweDAwMDAwMDE0PjsKKwkJCQlpbnRlcnJ1cHQtcGFyZW50ID0gPCZNUElDPjsKKwkJCQlpbnRlcnJ1cHRzID0gPDc5IDI+OworCQkJCSNhZGRyZXNzLWNlbGxzID0gPDE+OworCQkJCSNzaXplLWNlbGxzID0gPDA+OworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBydGNANjggeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbXBhdGlibGUgPSAic3RtLG00MXQ4MCIsICJtNDFzdDg1IjsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWcgPSA8MHg2OD47CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH07CisJCQl9OworCQl9OworCisJCVBDSUUwOiBwY2lleEAxMDEwMDAwMDAwMCB7CQkvLyA0eEdCSUYxCisJCQlkZXZpY2VfdHlwZSA9ICJwY2kiOworCQkJI2ludGVycnVwdC1jZWxscyA9IDwxPjsKKwkJCSNzaXplLWNlbGxzID0gPDI+OworCQkJI2FkZHJlc3MtY2VsbHMgPSA8Mz47CisJCQljb21wYXRpYmxlID0gImlibSxwbGItcGNpZXgtNDc2ZnBlIiwgImlibSxwbGItcGNpZXgiOworCQkJcHJpbWFyeTsKKwkJCXBvcnQgPSA8MHgwPjsgLyogcG9ydCBudW1iZXIgKi8KKwkJCXJlZyA9IDwweDAwMDAwMTAxIDB4MDAwMDAwMDAgMHgwIDB4MTAwMDAwMDAJCS8qIENvbmZpZyBzcGFjZSBhY2Nlc3MgKi8KKwkJCSAgICAgICAweDAwMDA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kiOworCWRldmljZV90eXBlID0gInBjaSI7CisJaW50ZXJydXB0cyA9IDwyNSAweDIgMCAwPjsKKwlidXMtcmFuZ2UgPSA8MCAweGZmPjsKKwkjaW50ZXJydXB0LWNlbGxzID0gPDE+OworCSNzaXplLWNlbGxzID0gPDI+OworCSNhZGRyZXNzLWNlbGxzID0gPDM+OworfTsKKworLyogY29udHJvbGxlciBhdCAweGEwMDAgKi8KKyZwY2kyIHsKKwljb21wYXRpYmxlID0gImZzbCxtcGM4NTQ4LXBjaWUiOworCWRldmljZV90eXBlID0gInBjaSI7CisJI3NpemUtY2VsbHMgPSA8Mj47CisJI2FkZHJlc3MtY2VsbHMgPSA8Mz47CisJYnVzLXJhbmdlID0gPDAgMjU1PjsKKwljbG9jay1mcmVxdWVuY3kgPSA8MzMzMzMzMzM+OworCWludGVycnVwdHMgPSA8MjYgMiAwIDA+OworCisJcGNpZUAwIHsKKwkJcmVnID0gPDAgMCAwIDAgMD47CisJCSNpbnRlcnJ1cHQtY2VsbHMgPSA8MT47CisJCSNzaXplLWNlbGxzID0gPDI+OworCQkjYWRkcmVzcy1jZWxscyA9IDwzPjsKKwkJZGV2aWNlX3R5cGUgPSAicGNpIjsKKwkJaW50ZXJydXB0cyA9IDwyNiAyIDAgMD47CisJCWludGVycnVwdC1tYXAtbWFzayA9IDwweGY4MDAgMCAwIDc+OworCQlpbnRlcnJ1cHQtbWFwID0gPAorCQkJLyogSURTRUwgMHgwICovCisJCQkwMDAwIDB4MCAweDAgMHgxICZtcGljIDB4MCAweDEgMHgwIDB4MAorCQkJMDAwMCAweDAgMHgwIDB4MiAmbXBpYyAweDEgMHgxIDB4MCAweDAKKwkJCTAwMDAgMHgwIDB4MCAweDMgJm1waWMgMHgyIDB4MSAweDAgMHgwCisJCQkwMDAwIDB4MCAweDAgMHg0ICZtcGljIDB4MyAweDEgMHgwIDB4MAorCQkJPjsKKwl9OworfTsKKworJnNvYyB7CisJI2FkZHJlc3MtY2VsbHMgPSA8MT47CisJI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29udHJvbGxlcjsKKwkJY29tcGF0aWJsZSA9ICJmc2wscWUtaWMiOworCQkjYWRkcmVzcy1jZWxscyA9IDwwPjsKKwkJI2ludGVycnVwdC1jZWxscyA9IDwxPjsKKwkJcmVnID0gPDB4ODAgMHg4MD47CisJCWludGVycnVwdHMgPSA8NDYgMiAwIDAgNDYgMiAwIDA+OyAvL2hpZ2g6MzAgbG93OjMwCisJCWludGVycnVwdC1wYXJlbnQgPSA8Jm1waWM+OworCX07CisKKwl0aW1lckA0NDAgeworCQljb21wYXRpYmxlID0gImZzbCxtcGM4NTY5LXFlLWd0bSIsCisJCQkgICAgICJmc2wscWUtZ3RtIiwgImZzbCxndG0iOworCQlyZWcgPSA8MHg0NDAgMHg0MD47CisJCWludGVycnVwdHMgPSA8MTIgMTMgMTQgMTU+OworCQlpbnRlcnJ1cHQtcGFyZW50ID0gPCZxZWljPjsKKwkJLyogRmlsbGVkIGluIGJ5IFUtQm9vdCAqLworCQljbG9jay1mcmVxdWVuY3kgPSA8MD47CisJfTsKKworCXNwaUA0YzAgeworCQkjYWRkcmVzcy1jZWxscyA9IDwxPjsKKwkJI3NpemUtY2VsbHMgPSA8MD47CisJCWNvbXBhdGlibGUgPSAiZnNsLG1wYzg1NjktcWUtc3BpIiwgImZzbCxzcGkiOworCQlyZWcgPSA8MHg0YzAgMHg0MD47CisJCWNlbGwtaW5kZXggPSA8MD47CisJCWludGVycnVwdHMgPSA8Mj47CisJCWludGVycnVwdC1wYXJlbnQgPSA8JnFlaWM+OworCX07CisKKwlzcGlANTAwIHsKKwkJI2FkZHJlc3MtY2VsbHMgPSA8MT47CisJCSNzaXplLWNlbGxzID0gPDA+OworCQljZWxsLWluZGV4ID0gPDE+OworCQljb21wYXRpYmxlID0gImZzbCxzcGkiOworCQlyZWcgPSA8MHg1MDAgMHg0MD47CisJCWludGVycnVwdHMgPSA8MT47CisJCWludGVycnVwdC1wYXJlbnQgPSA8JnFlaWM+OworCX07CisKKwl1c2JANmMwIHsKKwk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Kwkjc2l6ZS1jZWxscyA9IDwxPjsKKwljb21wYXRpYmxlID0gImZzbCxwMTAyMC1lbGJjIiwgImZzbCxlbGJjIiwgInNpbXBsZS1idXMiOworCWludGVycnVwdHMgPSA8MTkgMiAwIDA+OworfTsKKworLyogY29udHJvbGxlciBhdCAweDkwMDAgKi8KKyZwY2kwIHsKKwljb21wYXRpYmxlID0gImZzbCxtcGM4NTQ4LXBjaWUiOworCWRldmljZV90eXBlID0gInBjaSI7CisJI3NpemUtY2VsbHMgPSA8Mj47CisJI2FkZHJlc3MtY2VsbHMgPSA8Mz47CisJYnVzLXJhbmdlID0gPDAgMjU1PjsKKwljbG9jay1mcmVxdWVuY3kgPSA8MzMzMzMzMzM+OworCWludGVycnVwdHMgPSA8MTYgMiAwIDA+OworCisJcGNpZUAwIHsKKwkJcmVnID0gPDAgMCAwIDAgMD47CisJCSNpbnRlcnJ1cHQtY2VsbHMgPSA8MT47CisJCSNzaXplLWNlbGxzID0gPDI+OworCQkjYWRkcmVzcy1jZWxscyA9IDwzPjsKKwkJZGV2aWNlX3R5cGUgPSAicGNpIjsKKwkJaW50ZXJydXB0cyA9IDwxNiAyIDAgMD47CisJCWludGVycnVwdC1tYXAtbWFzayA9IDwweGY4MDAgMCAwIDc+OworCQlpbnRlcnJ1cHQtbWFwID0gPAorCQkJLyogSURTRUwgMHgwICovCisJCQkwMDAwIDB4MCAweDAgMHgxICZtcGljIDB4NCAweDEgMHgwIDB4MAorCQkJMDAwMCAweDAgMHgwIDB4MiAmbXBpYyAweDUgMHgxIDB4MCAweDAKKwkJCTAwMDAgMHgwIDB4MCAweDMgJm1waWMgMHg2IDB4MSAweDAgMHgwCisJCQkwMDAwIDB4MCAweDAgMHg0ICZtcGljIDB4NyAweDEgMHgwIDB4MAorCQkJPjsKKwl9OworfTsKKworLyogY29udHJvbGxlciBhdCAweGEwMDAgKi8KKyZwY2kxIHsKKwljb21wYXRpYmxlID0gImZzbCxtcGM4NTQ4LXBjaWUiOworCWRldmlj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UgPSAiZnNsLHAzMDQxLWRjc3ItZHBhYSIsICJmc2wsZGNzci1kcGFhIjsKKwkJcmVnID0gPDB4OTAwMCAweDEwMDA+OworCX07CisJZGNzci1vY25AMTEwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxwMzA0MS1kY3NyLW9jbiIsICJmc2wsZGNzci1vY24iOworCQlyZWcgPSA8MHgxMTAwMCAweDEwMDA+OworCX07CisJZGNzci1kZHJAMTIwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxkY3NyLWRkciI7CisJCWRldi1oYW5kbGUgPSA8JmRkcjE+OworCQlyZWcgPSA8MHgxMjAwMCAweDEwMDA+OworCX07CisJZGNzci1uYWxAMTgwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxwMzA0MS1kY3NyLW5hbCIsICJmc2wsZGNzci1uYWwiOworCQlyZWcgPSA8MHgxODAwMCAweDEwMDA+OworCX07CisJZGNzci1yY3BtQDIyMDAwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wscDMwNDEtZGNzci1yY3BtIiwgImZzbCxkY3NyLXJjcG0iOworCQlyZWcgPSA8MHgyMjAwMCAweDEwMDA+OworCX07CisJZGNzci1jcHUtc2ItcHJveHlANDAwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxkY3NyLWU1MDBtYy1zYi1wcm94eSIsICJmc2wsZGNzci1jcHUtc2ItcHJveHkiOworCQljcHUtaGFuZGxlID0gPCZjcHUwPjsKKwkJcmVnID0gPDB4NDAwMDAgMHgxMDAwPjsKKwl9OworCWRjc3ItY3B1LXNiLXByb3h5QDQxMDAwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wsZGNzci1lNTAwbWMtc2ItcHJveHkiLCAiZnNsLGRjc3ItY3B1LXNiLXByb3h5IjsKKwkJY3B1LWhhbmRsZSA9IDwmY3B1MT47CisJCXJlZyA9IDwweDQxMDAwIDB4MTAwMD47CisJfTsKKwlkY3NyLWNwdS1zYi1wcm94eUA0MjAwMCB7CisJCWNvbXBhdG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cmFtLWVycm9yIjsKKwkJaW50ZXJydXB0cyA9IDwxNiAyIDEgMjk+OworCX07CisKKwljb3JlbmV0LWxhd0AwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wsY29yZW5ldC1sYXciOworCQlyZWcgPSA8MHgwIDB4MTAwMD47CisJCWZzbCxudW0tbGF3cyA9IDwzMj47CisJfTsKKworCWRkcjE6IG1lbW9yeS1jb250cm9sbGVyQDgwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxxb3JpcS1tZW1vcnktY29udHJvbGxlci12NC40IiwgImZzbCxxb3JpcS1tZW1vcnktY29udHJvbGxlciI7CisJCXJlZyA9IDwweDgwMDAgMHgxMDAwPjsKKwkJaW50ZXJydXB0cyA9IDwxNiAyIDEgMjM+OworCX07CisKKwljcGM6IGwzLWNhY2hlLWNvbnRyb2xsZXJAMTAwMDAgeworCQljb21wYXRpYmxlID0gImZzbCxwMzA2MC1sMy1jYWNoZS1jb250cm9sbGVyIiwgImNhY2hlIjsKKwkJcmVnID0gPDB4MTAwMDAgMHgxMDAwCisJCSAgICAgICAweDExMDAwIDB4MTAwMD47CisJCWludGVycnVwdHMgPSA8MTYgMiAxIDI3CisJCQkgICAgICAxNiAyIDEgMjY+OworCX07CisKKwljb3JlbmV0LWNmQDE4MDAwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wsY29yZW5ldC1jZiI7CisJCXJlZyA9IDwweDE4MDAwIDB4MTAwMD47CisJCWludGVycnVwdHMgPSA8MTYgMiAxIDMxPjsKKwkJZnNsLGNjZi1udW0tY3NkaWRzID0gPDMyPjsKKwkJZnNsLGNjZi1udW0tc25vb3BpZHMgPSA8MzI+OworCX07CisKKwlpb21tdUAyMDAwMCB7CisJCWNvbXBhdGlibGUgPSAiZnNsLHBhbXUtdjEuMCIsICJmc2wscGFtdSI7CisJCXJlZyA9IDwweDIwMDAwIDB4NTAwMD47CisJCWludGVycnVwdHMgPSA8CisJCQkyNCAyIDAgMAorCQkJMTYgMiAxIDMwP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isJCXJlZyA9IDwweDMgMHgwIDB4MzA+OworCX07CisKKwluYW5kQDQsMCB7CisJCWNvbXBhdGlibGUgPSAiZnNsLGVsYmMtZmNtLW5hbmQiOworCQlyZWcgPSA8MHg0IDB4MCAweDQwMDAwPjsKKwl9OworCisJbmFuZEA1LDAgeworCQljb21wYXRpYmxlID0gImZzbCxlbGJjLWZjbS1uYW5kIjsKKwkJcmVnID0gPDB4NSAweDAgMHg0MDAwMD47CisJfTsKKworCW5hbmRANiwwIHsKKwkJY29tcGF0aWJsZSA9ICJmc2wsZWxiYy1mY20tbmFuZCI7CisJCXJlZyA9IDwweDYgMHgwIDB4NDAwMDA+OworCX07Cit9OworCismYm9hcmRfc29jIHsKKwl1c2JAMjIwMDAgeworCQlwaHlfdHlwZSA9ICJ1bHBpIjsKKwl9OworCisJbWRpb0AyNDUyMCB7CisJCXBoeTA6IGV0aGVybmV0LXBoeUAwIHsKKwkJCWludGVycnVwdHMgPSA8MyAxIDAgMD47CisJCQlyZWcgPSA8MHgwPjsKKwkJfTsKKwkJcGh5MTogZXRoZXJuZXQtcGh5QDEgeworCQkJaW50ZXJydXB0cyA9IDwzIDEgMCAwPjsKKwkJCXJlZyA9IDwweDE+OworCQl9OworCQlwaHkyOiBldGhlcm5ldC1waHlAMiB7CisJCQlpbnRlcnJ1cHRzID0gPDMgMSAwIDA+OworCQkJcmVnID0gPDB4Mj47CisJCX07CisJCXRiaTA6IHRiaS1waHlAMTEgeworCQkJcmVnID0gPDB4MTE+OworCQkJZGV2aWNlX3R5cGUgPSAidGJpLXBoeSI7CisJCX07CisKKwl9OworCisJbWRpb0AyNTUyMCB7CisJCXRiaTE6IHRiaS1waHlAMTEgeworCQkJcmVnID0gPDB4MTE+OworCQkJZGV2aWNlX3R5cGUgPSAidGJpLXBoeSI7CisJCX07CisJfTsKKworCW1kaW9AMjY1MjAgeworCQl0YmkyOiB0YmktcGh5QDExIHsKKwkJCXJlZyA9IDwweDExPjsKKwkJCWRldmljZV90eXBlID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EFSPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorQ09ORklHX01URF9DRkk9eQorQ09ORklHX01URF9KRURFQ1BST0JFPXkKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CitDT05GSUdfTVREX1BIWVNNQVBfT0Y9eQorQ09ORklHX01URF9OQU5EPXkKK0NPTkZJR19NVERfTkFORF9OREZDPXkKK0NPTkZJR19QUk9DX0RFVklDRVRSRUU9eQorQ09ORklHX0JMS19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9TSVpFPTM1MDAwCitDT05GSUdfTkVUREVWSUNFUz15CitDT05GSUdfSUJNX0VNQUM9eQorQ09ORklHX0lCTV9FTUFDX1JYQj0yNTYKK0NPTkZJR19JQk1fRU1BQ19UWEI9MjU2CisjIENPTkZJR19JTlBVVCBpcyBub3Qgc2V0CisjIENPTkZJR19TRVJJTyBpcyBub3Qgc2V0CisjIENPTkZJR19WVCBpcyBub3Qgc2V0CitDT05GSUdfU0VSSUFMXzgyNTA9eQorQ09ORklHX1NFUklBTF84MjUwX0NPTlNPTEU9eQorQ09ORklHX1NFUklBTF84MjUwX0VYVEVOREVEPXkKK0NPTkZJR19TRVJJQUxfODI1MF9TSEFSRV9JUlE9eQorQ09ORklHX1NFUklBTF9PRl9QTEFURk9STT15CisjIENPTkZJR19IV19SQU5ET00gaXMgbm90IHNldAorQ09ORklHX0kyQz15CitDT05GSUdfSTJDX0NIQVJERVY9eQorQ09ORklHX0kyQ19JQk1fSUlDPXkKK0NPTkZJR19TRU5TT1JTX0xNNzU9eQorQ09ORklHX1RIRVJNQUw9eQorIyBDT05GSUdfVVNCX1NVUFBPUlQgaXMgbm90IHNldAorQ09ORklHX1JUQ19DTEFTUz15CitDT05GSUdfUlRDX0RSVl9EUzEzMDc9eQorQ09ORklHX0VYVDJfRlM9eQorQ09ORklHX1BST0NfS0NPUkU9eQorQ09ORklHX1RNUEZTPXkKK0NPTkZJR19DUkFNRlM9eQorQ09ORklHX05GU19GUz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NPTkZJR19QUENfNDd4PXkKKyMgQ09ORklHX0VCT05ZIGlzIG5vdCBzZXQKK0NPTkZJR19DVVJSSVRVQ0s9eQorQ09ORklHX0hJR0hNRU09eQorQ09ORklHX0haXzEwMD15CitDT05GSUdfTUFUSF9FTVVMQVRJT049eQorQ09ORklHX0lSUV9BTExfQ1BVUz15CitDT05GSUdfQ01ETElORV9CT09MPXkKK0NPTkZJR19DTURMSU5FPSIiCisjIENPTkZJR19TVVNQRU5EIGlzIG5vdCBzZXQKK0NPTkZJR19ORVQ9eQorQ09ORklHX1BBQ0tFVD15CitDT05GSUdfVU5JWD15CitDT05GSUdfSU5FVD15CitDT05GSUdfSVBfUE5QPXkKK0NPTkZJR19JUF9QTlBfREhDUD15CitDT05GSUdfSVBfUE5QX0JPT1RQPXkKKyMgQ09ORklHX0lORVRfWEZSTV9NT0RFX1RSQU5TUE9SVCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkVUX1hGUk1fTU9ERV9UVU5ORUwgaXMgbm90IHNldAorIyBDT05GSUdfSU5FVF9YRlJNX01PREVfQkVFVCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkVUX0xSTyBpcyBub3Qgc2V0CisjIENPTkZJR19JUFY2IGlzIG5vdCBzZXQKK0NPTkZJR19VRVZFTlRfSEVMUEVSX1BBVEg9Ii9zYmluL2hvdHBsdWciCitDT05GSUdfREVWVE1QRlM9eQorQ09ORklHX0RFVlRNUEZTX01PVU5UPXkKK0NPTkZJR19DT05ORUNUT1I9eQorQ09ORklHX01URD15CitDT05GSUdfTVREX0NIQVI9eQorQ09ORklHX01URF9CTE9DSz15CitDT05GSUdfTVREX0pFREVDUFJPQkU9eQorQ09ORklHX01URF9DRklfQU1EU1REPXkKK0NPTkZJR19NVERfUEhZU01BUF9PRj15CitDT05GSUdfUFJPQ19ERVZJQ0VUUkVFPXkKK0NPTkZJR19CTEtfREVWX1JBTT15CitDT05GSUdfQkxLX0RFVl9SQU1fU0laRT0zNTAwMAorIyBDT05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CitDT05GSUdfTURfTElORUFSPXkKK0NPTkZJR19CTEtfREVWX0RNPXkKK0NPTkZJR19ETV9DUllQVD15CitDT05GSUdfRE1fU05BUFNIT1Q9eQorQ09ORklHX0RNX01JUlJPUj15CitDT05GSUdfRE1fWkVSTz15CitDT05GSUdfRE1fVUVWRU5UPXkKK0NPTkZJR19ORVRERVZJQ0VTPXkKK0NPTkZJR19UVU49eQorQ09ORklHX0UxMDAwRT15CitDT05GSUdfVElHT04zPXkKKyMgQ09ORklHX1dMQU4gaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVQgaXMgbm90IHNldAorIyBDT05GSUdfU0VSSU8gaXMgbm90IHNldAorIyBDT05GSUdfVlQgaXMgbm90IHNldAorQ09ORklHX0RFVlBUU19NVUxUSVBMRV9JTlNUQU5DRVM9eQorQ09ORklHX1NFUklBTF84MjUwPXkKK0NPTkZJR19TRVJJQUxfODI1MF9DT05TT0xFPXkKK0NPTkZJR19IV19SQU5ET009eQorQ09ORklHX1JBV19EUklWRVI9eQorQ09ORklHX01BWF9SQVdfREVWUz0xMDI0CisjIENPTkZJR19IV01PTiBpcyBub3Qgc2V0CisjIENPTkZJR19WR0FfQVJCIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9TVVBQT1JUIGlzIG5vdCBzZXQKK0NPTkZJR19FREFDPXkKK0NPTkZJR19FREFDX01NX0VEQUM9eQorQ09ORklHX1JUQ19DTEFTUz15CitDT05GSUdfUlRDX0RSVl9EUzE1MTE9eQorQ09ORklHX1JUQ19EUlZfRFMxNTUzPXkKK0NPTkZJR19FWFQyX0ZTPXkKK0NPTkZJR19FWFQyX0ZTX1hBVFRSPXkKK0NPTkZJR19FWFQyX0ZTX1BPU0lYX0FDTD15CitDT05GSUdfRVhUMl9GU19TRUNVUklUWT15CitDT05GSUdfRVhUMl9GU19YSVA9eQorQ09ORklHX0VYVDNfRlM9eQorIyBDT05GSUdfRVhUM19ERUZBVUxUU19UT19PUkRFUkVEIGlzIG5vdCBz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fZW50cmllcywgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDUsICA5NSApCkBAIC0yNzYsNyArMjc2LDcgQEAKIExWMV9DQUxMKGRlc3RydWN0X2lvX2lycV9vdXRsZXQsICAgICAgICAgICAgICAgICAgICAgICAgMSwgMCwgMTIxICkKIExWMV9DQUxMKG1hcF9odGFiLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgMSwgMTIyICkKIExWMV9DQUxMKHVubWFwX2h0YWIsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgMCwgMTIzICkKLUxWMV9DQUxMKGdldF92ZXJzaW9uX2luZm8sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMSwgMTI3ICkKK0xWMV9DQUxMKGdldF92ZXJzaW9uX2luZm8sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCwgMiwgMTI3ICkKIExWMV9DQUxMKGluc2VydF9odGFiX2VudHJ5LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNiwgMywgMTU4ICkKIExWMV9DQUxMKHJlYWRfdmlydHVhbF91YXJ0LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMywgMSwgMTYyICkKIExWMV9DQUxMKHdyaXRlX3ZpcnR1YWxfdWFydCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMywgMSwgMTYzICkKQEAgLTI5NCw5ICsyOTQsOSBAQAogTFYxX0NBTEwobmV0X2FkZF9tdWx0aWNhc3RfYWRkcmVzcywgICAgICAgICAgICAgICAgICAgICA0LCAwLCAxODUgKQogTFYxX0NBTEwobmV0X3JlbW92ZV9tdWx0aWNhc3RfYWRkcmVzcywgICAgICAgICAgICAgICAgICA0LCAwLCAxODYgKQogTFYxX0NBTEwobmV0X3N0YXJ0X3R4X2RtYSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0LCAwLCAxODcgKQotTFYxX0NBTEwobmV0X3N0b3BfdHhfZG1hLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzLCAwLCAxODggKQorTFYxX0NBTEwobmV0X3N0b3BfdHhfZG1hLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyLCAwLCAxODggKQogTFYxX0NBTEwobmV0X3N0YXJ0X3J4X2RtYSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0LCAwLCAxODkgKQotTFYxX0NBTEwobmV0X3N0b3BfcnhfZG1hLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzLCAwLCAxOTAgKQorTFYxX0NBTEwobmV0X3N0b3BfcnhfZG1hLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyLCAwLCAxOTAgKQogTFYxX0NBTEwobmV0X3NldF9pbnRlcnJ1cHRfc3RhdHVzX2luZGljYXRvciwgICAgICAgICAgICA0LCAwLCAxOTEgKQogTFYxX0NBTEwobmV0X3NldF9pbnRlcnJ1cHRfbWFzaywgICAgICAgICAgICAgICAgICAgICAgICA0LCAwLCAxOTMgKQogTFYxX0NBTEwobmV0X2NvbnRyb2wsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2LCAyLCAxOTQgKQpkaWZmIC0tZ2l0IGEvYXJjaC9wb3dlcnBjL2luY2x1ZGUvYXNtL21hY2hkZXAuaCBiL2FyY2gvcG93ZXJwYy9pbmNsdWRlL2FzbS9tYWNoZGVwLmgKaW5kZXggYjU0MGQ2Zi4uYmYzNzkzMWQgMTAwNjQ0Ci0tLSBhL2FyY2gvcG93ZXJwYy9pbmNsdWRlL2FzbS9tYWNoZGVwLmgKKysrIGIvYXJjaC9wb3dlcnBjL2luY2x1ZGUvYXNtL21hY2hkZXAuaApAQCAtMjEzLDYgKzIxMyw5IEBACiAJICogYWxsb3cgYXNzaWdubWVudC9lbmFibGluZyBvZiB0aGUgZGV2aWNlLiAqLwogCWludCAgKCpwY2liaW9zX2VuYWJsZV9kZXZpY2VfaG9vaykoc3RydWN0IHBjaV9kZXYgKik7CiAKKwkvKiBDYWxs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GRyMzsKKwl1aW50MzJfdCB0bHBIZHI0OworCXVpbnQzMl90IHNvdXJjZUlkOworCisJdWludDMyX3QgcnN2MzsKKworCS8vIFJlY29yZCBkYXRhIGFib3V0IHRoZSBjYWxsIHRvIGFsbG9jYXRlIGEgYnVmZmVyLgorCXVpbnQ2NF90IGVycm9yQ2xhc3M7CisJdWludDY0X3QgY29ycmVsYXRvcjsKKworCS8vUDdJT0MgTU1JTyBFcnJvciBSZWdzCisJdWludDY0X3QgcDdpb2NQbHNzcjsgICAgICAgICAgICAgICAgLy8gbjEyMAorCXVpbnQ2NF90IHA3aW9jQ3NyOyAgICAgICAgICAgICAgICAgIC8vIG4xMTAKKwl1aW50NjRfdCBsZW1GaXI7ICAgICAgICAgICAgICAgICAgICAvLyBuQzAwCisJdWludDY0X3QgbGVtRXJyb3JNYXNrOyAgICAgICAgICAgICAgLy8gbkMxOAorCXVpbnQ2NF90IGxlbVdPRjsgICAgICAgICAgICAgICAgICAgIC8vIG5DNDAKKwl1aW50NjRfdCBwaGJFcnJvclN0YXR1czsgICAgICAgICAgICAvLyBuQzgwCisJdWludDY0X3QgcGhiRmlyc3RFcnJvclN0YXR1czsgICAgICAgLy8gbkM4OAorCXVpbnQ2NF90IHBoYkVycm9yTG9nMDsgICAgICAgICAgICAgIC8vIG5DQzAKKwl1aW50NjRfdCBwaGJFcnJvckxvZzE7ICAgICAgICAgICAgICAvLyBuQ0M4CisJdWludDY0X3QgbW1pb0Vycm9yU3RhdHVzOyAgICAgICAgICAgLy8gbkQwMAorCXVpbnQ2NF90IG1taW9GaXJzdEVycm9yU3RhdHVzOyAgICAgIC8vIG5EMDgKKwl1aW50NjRfdCBtbWlvRXJyb3JMb2cwOyAgICAgICAgICAgICAvLyBuRDQwCisJdWludDY0X3QgbW1pb0Vycm9yTG9nMTsgICAgICAgICAgICAgLy8gbkQ0OAorCXVpbnQ2NF90IGRtYTBFcnJvclN0YXR1czsgICAgICAgICAgIC8vIG5EODAKKwl1aW50NjRfdC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aCIKKworI2RlZmluZSBDT1BfUElEX01JTiAoQ09QX1BJRF9OT05FICsgMSkKKyNkZWZpbmUgQ09QX1BJRF9NQVggKDB4RkZGRikKKworc3RhdGljIERFRklORV9TUElOTE9DSyhtbXVfY29udGV4dF9hY29wX2xvY2spOworc3RhdGljIERFRklORV9JREEoY29wX2lkYSk7CisKK3N0YXRpYyBpbnQgbmV3X2NvcF9waWQoc3RydWN0IGlkYSAqaWRhLCBpbnQgbWluX2lkLCBpbnQgbWF4X2lkLAorCQkgICAgICAgc3BpbmxvY2tfdCAqbG9jaykKK3sKKwlpbnQgaW5kZXg7CisJaW50IGVycjsKKworYWdhaW46CisJaWYgKCFpZGFfcHJlX2dldChpZGEsIEdGUF9LRVJORUwpKQorCQlyZXR1cm4gLUVOT01FTTsKKworCXNwaW5fbG9jayhsb2NrKTsKKwllcnIgPSBpZGFfZ2V0X25ld19hYm92ZShpZGEsIG1pbl9pZCwgJmluZGV4KTsKKwlzcGluX3VubG9jayhsb2NrKTsKKworCWlmIChlcnIgPT0gLUVBR0FJTikKKwkJZ290byBhZ2FpbjsKKwllbHNlIGlmIChlcnIpCisJCXJldHVybiBlcnI7CisKKwlpZiAoaW5kZXggPiBtYXhfaWQpIHsKKwkJc3Bpbl9sb2NrKGxvY2spOworCQlpZGFfcmVtb3ZlKGlkYSwgaW5kZXgpOworCQlzcGluX3VubG9jayhsb2NrKTsKKwkJcmV0dXJuIC1FTk9NRU07CisJfQorCisJcmV0dXJuIGluZGV4OworfQorCitpbnQgZ2V0X2NvcF9waWQoc3RydWN0IG1tX3N0cnVjdCAqbW0pCit7CisJaW50IHBpZDsKKworCWlmIChtbS0+Y29udGV4dC5jb3BfcGlkID09IENPUF9QSURfTk9ORSkgeworCQlwaWQgPSBuZXdfY29wX3BpZCgmY29wX2lkYSwgQ09QX1BJRF9NSU4sIENPUF9QSURfTUFYLAorCQkJCSAgJm1tdV9jb250ZXh0X2Fjb3BfbG9jayk7CisJCWlmIChwaWQgPj0gMCk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9mZnNldCkpOworfQorCitzdGF0aWMgaW5saW5lIHVuc2lnbmVkIGludCByZWFkX2xjc3IodW5zaWduZWQgbG9uZyBvZmZzZXQpCit7CisJcmV0dXJuIHN3YWIzMihyZWFkbChsY3NyX2FkZHJlc3Mob2Zmc2V0KSkpOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgd3JpdGVfbGNzcih1bnNpZ25lZCBsb25nIG9mZnNldCwgdW5zaWduZWQgaW50IHZhbCkKK3sKKwl3cml0ZWwoc3dhYjMyKHZhbCksIGxjc3JfYWRkcmVzcyhvZmZzZXQpKTsKK30KKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogICAgICAgICAgICAgICAgICAgQ1NSX0cwX1NUQVRFX0NMRUFSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisjZGVmaW5lIENTUl9HMF9TVEFURV9DTEVBUiAoMHgwMDAgKyAoMCA8PCAxMikpCit1bmlvbiBudW1hY2hpcF9jc3JfZzBfc3RhdGVfY2xlYXIgeworCXVuc2lnbmVkIGludCB2OworCXN0cnVjdCBudW1hY2hpcF9jc3JfZzBfc3RhdGVfY2xlYXJfcyB7CisJCXVuc2lnbmVkIGludCBfc3RhdGU6MjsKKwkJdW5zaWduZWQgaW50IF9yc3ZkXzJfNjo1OworCQl1bnNpZ25lZCBpbnQgX2xvc3Q6MTsKKwkJdW5zaWduZWQgaW50IF9yc3ZkXzhfMzE6MjQ7CisJfSBzOworfTsKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogICAgICAgICAgICAgICAgICAgQ1NSX0cwX05PREVfSURTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisjZGVmaW5lIENTUl9HMF9OT0RFX0lEUyAoMHgwMDggKyAoMCA8PCAxMikpCit1bmlvbiBudW1hY2hpcF9jc3JfZzBfbm9kZV9pZHMgeworCXVuc2lnbmVkIGludCB2OworCXN0cnVjdCBudW1hY2hpcF9jc3JfZzBfbm9kZV9pZHNfcyB7CisJCXVuc2lnbmVkIGludCBfaW5pdGlhbGlkOjE2OworCQl1bnNpZ25lZCBpbnQgX25vZGVpZDoxMjsKKwkJdW5zaWduZWQgaW50IF9yc3ZkXzI4XzMxOjQ7CisJfSBzOworfTsKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogICAgICAgICAgICAgICAgICAgQ1NSX0czX0VYVF9JUlFfR0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisjZGVmaW5lIENTUl9HM19FWFRfSVJRX0dFTiAoMHgwMzAgKyAoMyA8PCAxMikpCit1bmlvbiBudW1hY2hpcF9jc3JfZzNfZXh0X2lycV9nZW4geworCXVuc2lnbmVkIGludCB2OworCXN0cnVjdCBudW1hY2hpcF9jc3JfZzNfZXh0X2lycV9nZW5fcyB7CisJCXVuc2lnbmVkIGludCBfdmVjdG9yOjg7CisJCXVuc2lnbmVkIGludCBfbXNndHlwZTozOworCQl1bnNpZ25lZCBpbnQgX2luZGV4OjU7CisJCXVuc2lnbmVkIGludCBfZGVzdGluYXRpb25fYXBpY19pZDoxNjsKKwl9IHM7Cit9OworCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAgICAgICAgICAgICAgICAgICBDU1JfRzNfRVhUX0lSUV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisKKyNkZWZpbmUgQ1NSX0czX0VYVF9JUlFfU1RBVFVTICgweDAzNCArICgzIDw8IDEyKSkKK3VuaW9uIG51bWFjaGlwX2Nzcl9nM19leHRfaXJxX3N0YXR1cyB7CisJdW5zaWduZWQgaW50IHY7CisJc3RydWN0IG51bWFjaGlwX2Nzcl9nM19leHRfaXJxX3N0YXR1c19zIHsKKwkJdW5zaWduZWQgaW50IF9yZXN1bHQ6MzI7CisJfSBzOworfTsKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogICAgICAgICAgICAgICAgICAgQ1NSX0czX0VYVF9JUlFfREVTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisjZGVmaW5lIENTUl9HM19FWFRfSVJRX0RFU1QgKDB4MDM4ICsgKDMgPDwgMTIpKQordW5pb24gbnVtYWNoaXBfY3NyX2czX2V4dF9pcnFfZGVzdCB7CisJdW5zaWduZWQgaW50IHY7CisJc3RydWN0IG51bWFjaGlwX2Nzcl9nM19leHRfaXJxX2Rlc3RfcyB7CisJCXVuc2lnbmVkIGludCBfaXJxOjg7CisJCXVuc2lnbmVkIGludCBfcnN2ZF84XzMxOjI0OworCX0gczsKK307CisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qICAgICAgICAgICAgICAgICAgIENTUl9HM19OQ19BVFRfTUFQX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworI2RlZmluZSBDU1JfRzNfTkNfQVRUX01BUF9TRUxFQ1QgKDB4N2ZjICsgKDMgPDwgMTIpKQordW5pb24gbnVtYWNoaXBfY3NyX2czX25jX2F0dF9tYXBfc2VsZWN0IHsKKwl1bnNpZ25lZCBpbnQgdjsKKwlzdHJ1Y3QgbnVtYWNoaXBfY3NyX2czX25jX2F0dF9tYXBfc2VsZWN0X3MgeworCQl1bnNpZ25lZCBpbnQgX3VwcGVyX2FkZHJlc3NfYml0czo0OworCQl1bnNpZ25lZCBpbnQgX3NlbGVjdF9yYW06NDsKKwkJdW5zaWduZWQgaW50IF9yc3ZkXzhfMzE6MjQ7CisJfSBzOworfTsKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogICAgICAgICAgICAgICAgICAgQ1NSX0czX05DX0FUVF9NQVBfU0VMRUNUXzAtMjU1ICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisjZGVmaW5lIENTUl9HM19OQ19BVFRfTUFQX1NFTEVDVF8wICgweDgwMCArICgzIDw8IDEyKSkKKworI2VuZGlmIC8qIF9BU01fWDg2X05VTUFDSElQX05VTUFDSElQX0NTUl9IICovCisKZGlmZiAtLWdpdCBhL2FyY2gveDg2L2luY2x1ZGUvYXNtL3BlcmNwdS5oIGIvYXJjaC94ODYvaW5jbHVkZS9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KKwkJfSBlbHNlIHsKKwkJCW8gPSBpbnRpZDJvYmooaW50aWQpOworCisJCQlpZiAobyA+PSBDQzc3MF9PQkpfTUFYKSB7CisJCQkJbmV0ZGV2X2VycihkZXYsICJVbmV4cGVjdGVkIGludGVycnVwdCBpZCAlZFxuIiwKKwkJCQkJICAgaW50aWQpOworCQkJCWNvbnRpbnVlOworCQkJfQorCisJCQlpZiAocHJpdi0+b2JqX2ZsYWdzW29dICYgQ0M3NzBfT0JKX0ZMQUdfUlRSKQorCQkJCWNjNzcwX3J0cl9pbnRlcnJ1cHQoZGV2LCBvKTsKKwkJCWVsc2UgaWYgKHByaXYtPm9ial9mbGFnc1tvXSAmIENDNzcwX09CSl9GTEFHX1JYKQorCQkJCWNjNzcwX3J4X2ludGVycnVwdChkZXYsIG8pOworCQkJZWxzZQorCQkJCWNjNzcwX3R4X2ludGVycnVwdChkZXYsIG8pOworCQl9CisJfQorCisJaWYgKHByaXYtPnBvc3RfaXJxKQorCQlwcml2LT5wb3N0X2lycShwcml2KTsKKworCWlmIChuID49IENDNzcwX01BWF9JUlEpCisJCW5ldGRldl9kYmcoZGV2LCAiJWQgbWVzc2FnZXMgaGFuZGxlZCBpbiBJU1IiLCBuKTsKKworCXJldHVybiAobikgPyBJUlFfSEFORExFRCA6IElSUV9OT05FOworfQorCitzdGF0aWMgaW50IGNjNzcwX29wZW4oc3RydWN0IG5ldF9kZXZpY2UgKmRldikKK3sKKwlzdHJ1Y3QgY2M3NzBfcHJpdiAqcHJpdiA9IG5ldGRldl9wcml2KGRldik7CisJaW50IGVycjsKKworCS8qIHNldCBjaGlwIGludG8gcmVzZXQgbW9kZSAqLworCXNldF9yZXNldF9tb2RlKGRldik7CisKKwkvKiBjb21tb24gb3BlbiAqLworCWVyciA9IG9wZW5fY2FuZGV2KGRldik7CisJaWYgKGVycikKKwkJcmV0dXJuIGVycjsKKworCWVyciA9IHJlcXVlc3RfaXJxKGRldi0+aXJxLCAmY2M3NzBfaW50ZXJydXB0L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1dBUF9DRkdfUlhfU0hJRlQpOwpAQCAtNTM1Niw3ICs1NDQ5LDYgQEAKIAkJCQkgICAgICBzdHJ1Y3QgbGlua19wYXJhbXMgKnBhcmFtcywKIAkJCQkgICAgICBzdHJ1Y3QgbGlua192YXJzICp2YXJzKQogewotCiAJc3RydWN0IGJueDJ4ICpicCA9IHBhcmFtcy0+YnA7CiAKIAl1MTYgZ3Bfc3RhdHVzLCBkdXBsZXggPSBEVVBMRVhfSEFMRiwgbGlua191cCA9IDAsIHNwZWVkX21hc2s7CkBAIC01NDAzLDkgKzU0OTUsNyBAQAogCQkJCSAgICAgc3RydWN0IGxpbmtfcGFyYW1zICpwYXJhbXMsCiAJCQkJICAgICBzdHJ1Y3QgbGlua192YXJzICp2YXJzKQogewotCiAJc3RydWN0IGJueDJ4ICpicCA9IHBhcmFtcy0+YnA7Ci0KIAl1OCBsYW5lOwogCXUxNiBncF9zdGF0dXMxLCBncF9zcGVlZCwgbGlua191cCwgZHVwbGV4ID0gRFVQTEVYX0ZVTEw7CiAJaW50IHJjID0gMDsKQEAgLTY2NzgsNyArNjc2OCw2IEBACiAJcmV0dXJuIHJjOwogfQogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qCQkJICAgIEV4dGVybmFsIFBoeSBzZWN0aW9uCQkJICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtODEwMyw3ICs4MTkyLDE1IEBACiBzdGF0aWMgdm9pZCBibngyeF93YXJwY29yZV9od19yZXNldChzdHJ1Y3QgYm54MnhfcGh5ICpwaHksCiAJCQkJICAgIHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zKQogeworCXN0cnVjdCBibngyeCAqYnAgPSBwYXJhbXMtPmJwOwogCWJueDJ4X3dhcnB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Y3IoZW50cnksIERNQV9UWF9SSU5HX1NaKTsKKworCQlpZiAoIXNrYikgeworCQkJY29udGludWU7CisJCX0KKworCQlmb3IgKGkgPSAwOyBpIDwgc2tiX3NoaW5mbyhza2IpLT5ucl9mcmFnczsgaSsrKSB7CisJCQllbnRyeSA9IHByaXYtPnR4X3RhaWwgPSBkbWFfcmluZ19pbmNyKHByaXYtPnR4X3RhaWwsCisJCQkJCQkJICAgICAgRE1BX1RYX1JJTkdfU1opOworCQkJcCA9IHByaXYtPmRtYV90eCArIHByaXYtPnR4X3RhaWw7CisKKwkJCWRtYV91bm1hcF9wYWdlKHByaXYtPmRldmljZSwgZGVzY19nZXRfYnVmX2FkZHIocCksCisJCQkJICAgICAgIGRlc2NfZ2V0X2J1Zl9sZW4ocCksIERNQV9UT19ERVZJQ0UpOworCQl9CisKKwkJLyoKKwkJICogSWYgdGhlcmUncyByb29tIGluIHRoZSBxdWV1ZSAobGltaXQgaXQgdG8gc2l6ZSkKKwkJICogd2UgYWRkIHRoaXMgc2tiIGJhY2sgaW50byB0aGUgcG9vbCwKKwkJICogaWYgaXQncyB0aGUgcmlnaHQgc2l6ZS4KKwkJICovCisJCWlmICgoc2tiX3F1ZXVlX2xlbigmcHJpdi0+cnhfcmVjeWNsZSkgPAorCQkJRE1BX1JYX1JJTkdfU1opICYmCisJCQlza2JfcmVjeWNsZV9jaGVjayhza2IsIHByaXYtPmRtYV9idWZfc3opKQorCQkJX19za2JfcXVldWVfaGVhZCgmcHJpdi0+cnhfcmVjeWNsZSwgc2tiKTsKKwkJZWxzZQorCQkJZGV2X2tmcmVlX3NrYihza2IpOworCX0KKworCWlmIChkbWFfcmluZ19zcGFjZShwcml2LT50eF9oZWFkLCBwcml2LT50eF90YWlsLCBETUFfVFhfUklOR19TWikgPgorCSAgICBUWF9USFJFU0gpCisJCW5ldGlmX3dha2VfcXVldWUocHJpdi0+ZGV2KTsKK30KKworLyoqCisgKiB4Z21hY190eF9lcnI6CisgKiBAcHJpdjogc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QkVfRUVQUk9NX1dSX0JVRkZFUl9NQVhfQ09VTlQgMjU2IC8qIEVFUFJPTSB3b3JkcyAjIHdyIGluIGJ1cnN0ICovCkBAIC0yODAyLDkgKzI4MDIsOSBAQAogc3RydWN0IGl4Z2JlX21hY19pbmZvIHsKIAlzdHJ1Y3QgaXhnYmVfbWFjX29wZXJhdGlvbnMgICAgIG9wczsKIAllbnVtIGl4Z2JlX21hY190eXBlICAgICAgICAgICAgIHR5cGU7Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyW0lYR0JFX0VUSF9MRU5HVEhfT0ZfQUREUkVTU107Ci0JdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZXJtX2FkZHJbSVhHQkVfRVRIX0xFTkdUSF9PRl9BRERSRVNTXTsKLQl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNhbl9hZGRyW0lYR0JFX0VUSF9MRU5HVEhfT0ZfQUREUkVTU107CisJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyW0VUSF9BTEVOXTsKKwl1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlcm1fYWRkcltFVEhfQUxFTl07CisJdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzYW5fYWRkcltFVEhfQUxFTl07CiAJLyogcHJlZml4IGZvciBXb3JsZCBXaWRlIE5vZGUgTmFtZSAoV1dOTikgKi8KIAl1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHd3bm5fcHJlZml4OwogCS8qIHByZWZpeCBmb3IgV29ybGQgV2lkZSBQb3J0IE5hbWUgKFdXUE4pICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL25ldC9ldGhlcm5ldC9pbnRlbC9peGdiZS9peGdiZV94NTQwLmMgYi9kcml2ZXJzL25ldC9ldGhlcm5ldC9pbnRlbC9peGdiZS9peGdiZV94NTQwLmMKaW5kZXggZTUxMDFlOS4uOGNjNWVjYyAxMDA2NDQKLS0tIGEvZ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sIGl4Z2JldmZfZHJpdmVyX3ZlcnNpb24sCisJCXNpemVvZihkcnZpbmZvLT52ZXJzaW9uKSk7CisJc3RybGNweShkcnZpbmZvLT5idXNfaW5mbywgcGNpX25hbWUoYWRhcHRlci0+cGRldiksCisJCXNpemVvZihkcnZpbmZvLT5idXNfaW5mbykpOwogfQogCiBzdGF0aWMgdm9pZCBpeGdiZXZmX2dldF9yaW5ncGFyYW0oc3RydWN0IG5ldF9kZXZpY2UgKm5ldGRldiwKQEAgLTU0OSw4ICs1NTEsOCBAQAogCXdyaXRlbCgoVyAmIE0pLCAoYWRhcHRlci0+aHcuaHdfYWRkciArIFIpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJdmFsID0gcmVhZGwoYWRhcHRlci0+aHcuaHdfYWRkciArIFIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAlpZiAoKFcgJiBNKSAhPSAodmFsICYgTSkpIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQlwcmludGsoS0VSTl9FUlIgInNldC9jaGVjayByZWcgJTA0WCB0ZXN0IGZhaWxlZDogZ290IDB4JTA4WCAiIFwKLQkJCQkgImV4cGVjdGVkIDB4JTA4WFxuIiwgUiwgKHZhbCAmIE0pLCAoVyAmIE0pKTsgXAorCQlwcl9lcnIoInNldC9jaGVjayByZWcgJTA0WCB0ZXN0IGZhaWxlZDogZ290IDB4JTA4WCBleHBlY3RlZCAiIFwKKwkJICAgICAgICIweCUwOFhcbiIsIFIsICh2YWwgJiBNKSwgKFcgJiBNKSk7ICAgICAgICAgICAgICAgICAgICBcCiAJCSpkYXRhID0gUjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQl3cml0ZWwoYmVmb3JlLCAoYWRhcHRlci0+aHcuaHdfYWRkciArIFIpKTsgICAgICAgICAgICAgICAgICAgIFwKIAkJcmV0dXJuIDE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCmRpZmYgLS1naXQgYS9kcml2ZXJzL25ldC9ldGhlcm5ldC9pbnRlbC9peGdiZXZmL2l4Z2JldmZfbWFpbi5jIGIvZHJpdmVycy9uZXQvZXRoZXJuZXQvaW50ZWwvaXhnYmV2Zi9peGdiZXZmX21haW4uYwppbmRleCA0YzhlMTk5Li44OTExNjJkIDEwMDY0NAotLS0gYS9kcml2ZXJzL25ldC9ldGhlcm5ldC9pbnRlbC9peGdiZXZmL2l4Z2JldmZfbWFpbi5jCisrKyBiL2RyaXZlcnMvbmV0L2V0aGVybmV0L2ludGVsL2l4Z2JldmYvaXhnYmV2Zl9tYWluLmMKQEAgLTI5LDYgKzI5LDkgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICBDb3B5cmlnaHQgKGMpMjAwNiAtIDIwMDcgTXlyaWNvbSwgSW5jLiBmb3Igc29tZSBMUk8gc3BlY2lmaWMgY29kZQogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjZGVmaW5lIHByX2ZtdChmbXQpIEtCVUlMRF9NT0ROQU1FICI6ICIgZm10CisKICNpbmNsdWRlIDxsaW51eC90eXBlcy5oPgogI2luY2x1ZGUgPGxpbnV4L2JpdG9wcy5oPgogI2luY2x1ZGUgPGxpbnV4L21vZHVsZS5oPgpAQCAtMzYzLDcgKzM2Niw3IEBACiAJCWlmICghYmktPnBhZ2VfZG1hICYmCiAJCSAgICAoYWRhcHRlci0+ZmxhZ3MgJiBJWEdCRV9GTEFHX1JYX1BTX0VOQUJMRUQpKSB7CiAJCQlpZiAoIWJpLT5wYWdlKSB7Ci0JCQkJYmktPnBhZ2UgPSBuZXRkZXZfYWxsb2NfcGFnZShhZGFwdGVyLT5uZXRkZX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BVEVEIjsKKwlkZWZhdWx0OiByZXR1cm4gIlVua25vd24iOworCX0KK30KKworc3RydWN0IHJlc19tdHQgeworCXN0cnVjdCByZXNfY29tbW9uCWNvbTsKKwlpbnQJCQlvcmRlcjsKKwlhdG9taWNfdAkJcmVmX2NvdW50OworfTsKKworZW51bSByZXNfbXB0X3N0YXRlcyB7CisJUkVTX01QVF9CVVNZID0gUkVTX0FOWV9CVVNZLAorCVJFU19NUFRfUkVTRVJWRUQsCisJUkVTX01QVF9NQVBQRUQsCisJUkVTX01QVF9IVywKK307CisKK3N0cnVjdCByZXNfbXB0IHsKKwlzdHJ1Y3QgcmVzX2NvbW1vbgljb207CisJc3RydWN0IHJlc19tdHQJICAgICAgICptdHQ7CisJaW50CQkJa2V5OworfTsKKworZW51bSByZXNfZXFfc3RhdGVzIHsKKwlSRVNfRVFfQlVTWSA9IFJFU19BTllfQlVTWSwKKwlSRVNfRVFfUkVTRVJWRUQsCisJUkVTX0VRX0hXLAorfTsKKworc3RydWN0IHJlc19lcSB7CisJc3RydWN0IHJlc19jb21tb24JY29tOworCXN0cnVjdCByZXNfbXR0CSAgICAgICAqbXR0OworfTsKKworZW51bSByZXNfY3Ffc3RhdGVzIHsKKwlSRVNfQ1FfQlVTWSA9IFJFU19BTllfQlVTWSwKKwlSRVNfQ1FfQUxMT0NBVEVELAorCVJFU19DUV9IVywKK307CisKK3N0cnVjdCByZXNfY3EgeworCXN0cnVjdCByZXNfY29tbW9uCWNvbTsKKwlzdHJ1Y3QgcmVzX210dAkgICAgICAgKm10dDsKKwlhdG9taWNfdAkJcmVmX2NvdW50OworfTsKKworZW51bSByZXNfc3JxX3N0YXRlcyB7CisJUkVTX1NSUV9CVVNZID0gUkVTX0FOWV9CVVNZLAorCVJFU19TUlFfQUxMT0NBVEVELAorCVJFU19TUlFfSFcsCit9OworCitzdGF0aWMgaW5saW5lIGNvbnN0IGNoYXIgKnNycV9zdGF0ZXNfc3RyKGVudW0gcmVzX3NycV9zdGF0ZXM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ci0+c3RhdGUgPT0gUkVTX0FOWV9CVVNZKSB7CisJCWVyciA9IC1FQlVTWTsKKwkJZ290byBleGl0OworCX0KKworCWlmIChyLT5vd25lciAhPSBzbGF2ZSkgeworCQllcnIgPSAtRVBFUk07CisJCWdvdG8gZXhpdDsKKwl9CisKKwlyLT5mcm9tX3N0YXRlID0gci0+c3RhdGU7CisJci0+c3RhdGUgPSBSRVNfQU5ZX0JVU1k7CisJbWx4NF9kYmcoZGV2LCAicmVzICVzIGlkIDB4JXggdG8gYnVzeVxuIiwKKwkJIFJlc291cmNlVHlwZSh0eXBlKSwgci0+cmVzX2lkKTsKKworCWlmIChyZXMpCisJCSooKHN0cnVjdCByZXNfY29tbW9uICoqKXJlcykgPSByOworCitleGl0OgorCXNwaW5fdW5sb2NrX2lycShtbHg0X3Rsb2NrKGRldikpOworCXJldHVybiBlcnI7Cit9CisKK2ludCBtbHg0X2dldF9zbGF2ZV9mcm9tX3Jlc291cmNlX2lkKHN0cnVjdCBtbHg0X2RldiAqZGV2LAorCQkJCSAgICBlbnVtIG1seDRfcmVzb3VyY2UgdHlwZSwKKwkJCQkgICAgaW50IHJlc19pZCwgaW50ICpzbGF2ZSkKK3sKKworCXN0cnVjdCByZXNfY29tbW9uICpyOworCWludCBlcnIgPSAtRU5PRU5UOworCWludCBpZCA9IHJlc19pZDsKKworCWlmICh0eXBlID09IFJFU19RUCkKKwkJaWQgJj0gMHg3ZmZmZmY7CisJc3Bpbl9sb2NrKG1seDRfdGxvY2soZGV2KSk7CisKKwlyID0gZmluZF9yZXMoZGV2LCBpZCwgdHlwZSk7CisJaWYgKHIpIHsKKwkJKnNsYXZlID0gci0+b3duZXI7CisJCWVyciA9IDA7CisJfQorCXNwaW5fdW5sb2NrKG1seDRfdGxvY2soZGV2KSk7CisKKwlyZXR1cm4gZXJyOworfQorCitzdGF0aWMgdm9pZCBwdXRfcmVzKHN0cnVjdCBtbHg0X2RldiAqZGV2LCBpbnQgc2xhdmUsIGludCByZXNfaWQ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c3RydWN0IHJlc19jb21tb24gKmFsbG9jX21wdF90cihpbnQgaWQsIGludCBrZXkpCit7CisJc3RydWN0IHJlc19tcHQgKnJldDsKKworCXJldCA9IGt6YWxsb2Moc2l6ZW9mICpyZXQsIEdGUF9LRVJORUwpOworCWlmICghcmV0KQorCQlyZXR1cm4gTlVMTDsKKworCXJldC0+Y29tLnJlc19pZCA9IGlkOworCXJldC0+Y29tLnN0YXRlID0gUkVTX01QVF9SRVNFUlZFRDsKKwlyZXQtPmtleSA9IGtleTsKKworCXJldHVybiAmcmV0LT5jb207Cit9CisKK3N0YXRpYyBzdHJ1Y3QgcmVzX2NvbW1vbiAqYWxsb2NfZXFfdHIoaW50IGlkKQoreworCXN0cnVjdCByZXNfZXEgKnJldDsKKworCXJldCA9IGt6YWxsb2Moc2l6ZW9mICpyZXQsIEdGUF9LRVJORUwpOworCWlmICghcmV0KQorCQlyZXR1cm4gTlVMTDsKKworCXJldC0+Y29tLnJlc19pZCA9IGlkOworCXJldC0+Y29tLnN0YXRlID0gUkVTX0VRX1JFU0VSVkVEOworCisJcmV0dXJuICZyZXQtPmNvbTsKK30KKworc3RhdGljIHN0cnVjdCByZXNfY29tbW9uICphbGxvY19jcV90cihpbnQgaWQpCit7CisJc3RydWN0IHJlc19jcSAqcmV0OworCisJcmV0ID0ga3phbGxvYyhzaXplb2YgKnJldCwgR0ZQX0tFUk5FTCk7CisJaWYgKCFyZXQpCisJCXJldHVybiBOVUxMOworCisJcmV0LT5jb20ucmVzX2lkID0gaWQ7CisJcmV0LT5jb20uc3RhdGUgPSBSRVNfQ1FfQUxMT0NBVEVEOworCWF0b21pY19zZXQoJnJldC0+cmVmX2NvdW50LCAwKTsKKworCXJldHVybiAmcmV0LT5jb207Cit9CisKK3N0YXRpYyBzdHJ1Y3QgcmVzX2NvbW1vbiAqYWxsb2Nfc3JxX3RyKGludCBpZCkKK3sKKwlzdHJ1Y3QgcmVzX3NycSAqcmV0OworCisJcmV0ID0ga3phbGxvYyhzaXplb2YgKnJldCwgR0ZQX0tFUk5FTCk7CisJaWYgKCFyZXQpCisJCXJldHVybiBOVUxMOworCisJcmV0LT5jb20ucmVzX2lkID0gaWQ7CisJcmV0LT5jb20uc3RhdGUgPSBSRVNfU1JRX0FMTE9DQVRFRDsKKwlhdG9taWNfc2V0KCZyZXQtPnJlZl9jb3VudCwgMCk7CisKKwlyZXR1cm4gJnJldC0+Y29tOworfQorCitzdGF0aWMgc3RydWN0IHJlc19jb21tb24gKmFsbG9jX2NvdW50ZXJfdHIoaW50IGlkKQoreworCXN0cnVjdCByZXNfY291bnRlciAqcmV0OworCisJcmV0ID0ga3phbGxvYyhzaXplb2YgKnJldCwgR0ZQX0tFUk5FTCk7CisJaWYgKCFyZXQpCisJCXJldHVybiBOVUxMOworCisJcmV0LT5jb20ucmVzX2lkID0gaWQ7CisJcmV0LT5jb20uc3RhdGUgPSBSRVNfQ09VTlRFUl9BTExPQ0FURUQ7CisKKwlyZXR1cm4gJnJldC0+Y29tOworfQorCitzdGF0aWMgc3RydWN0IHJlc19jb21tb24gKmFsbG9jX3RyKGludCBpZCwgZW51bSBtbHg0X3Jlc291cmNlIHR5cGUsIGludCBzbGF2ZSwKKwkJCQkgICBpbnQgZXh0cmEpCit7CisJc3RydWN0IHJlc19jb21tb24gKnJldDsKKworCXN3aXRjaCAodHlwZSkgeworCWNhc2UgUkVTX1FQOgorCQlyZXQgPSBhbGxvY19xcF90cihpZCk7CisJCWJyZWFrOworCWNhc2UgUkVTX01QVDoKKwkJcmV0ID0gYWxsb2NfbXB0X3RyKGlkLCBleHRyYSk7CisJCWJyZWFrOworCWNhc2UgUkVTX01UVDoKKwkJcmV0ID0gYWxsb2NfbXR0X3RyKGlkLCBleHRyYSk7CisJCWJyZWFrOworCWNhc2UgUkVTX0VROgorCQlyZXQgPSBhbGxvY19lcV90cihpZCk7CisJCWJyZWFrOworCWNhc2UgUkVTX0NROgorCQlyZXQgPSBhbGxvY19jcV90cihpZCk7CisJCWJyZWFrOworC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cHUocXBjLT5mbGFncykgPj4gMTMpICYgMTsKKwlpbnQgeHJjID0gKGJlMzJfdG9fY3B1KHFwYy0+bG9jYWxfcXBuKSA+PiAyMykgJiAxOworCWludCBzcV9zaXplOworCWludCBycV9zaXplOworCWludCB0b3RhbF9wYWdlczsKKwlpbnQgdG90YWxfbWVtOworCWludCBwYWdlX29mZnNldCA9IChiZTMyX3RvX2NwdShxcGMtPnBhcmFtczIpID4+IDYpICYgMHgzZjsKKworCXNxX3NpemUgPSAxIDw8IChsb2dfc3Ffc2l6ZSArIGxvZ19zcV9zcmlkZSArIDQpOworCXJxX3NpemUgPSAoc3JxfHJzc3x4cmMpID8gMCA6ICgxIDw8IChsb2dfcnFfc2l6ZSArIGxvZ19ycV9zdHJpZGUgKyA0KSk7CisJdG90YWxfbWVtID0gc3Ffc2l6ZSArIHJxX3NpemU7CisJdG90YWxfcGFnZXMgPQorCQlyb3VuZHVwX3Bvd19vZl90d28oKHRvdGFsX21lbSArIChwYWdlX29mZnNldCA8PCA2KSkgPj4KKwkJCQkgICBwYWdlX3NoaWZ0KTsKKworCXJldHVybiB0b3RhbF9wYWdlczsKK30KKworc3RhdGljIGludCBxcF9nZXRfcGRuKHN0cnVjdCBtbHg0X3FwX2NvbnRleHQgKnFwYykKK3sKKwlyZXR1cm4gYmUzMl90b19jcHUocXBjLT5wZCkgJiAweGZmZmZmZjsKK30KKworc3RhdGljIGludCBwZG4yc2xhdmUoaW50IHBkbikKK3sKKwlyZXR1cm4gKHBkbiA+PiBOT1RfTUFTS0VEX1BEX0JJVFMpIC0gMTsKK30KKworc3RhdGljIGludCBjaGVja19tdHRfcmFuZ2Uoc3RydWN0IG1seDRfZGV2ICpkZXYsIGludCBzbGF2ZSwgaW50IHN0YXJ0LAorCQkJICAgaW50IHNpemUsIHN0cnVjdCByZXNfbXR0ICptdHQpCit7CisJaW50IHJlc19zdGFydCA9IG10dC0+Y29tLnJlc19pZDsKKwlpbnQgcmVzX3NpemUgPSAoMSA8PCBt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kIEtvdHNiYWsgPG1hcml1c0Brb3RzYmFrLmNvbT4iKTsKIE1PRFVMRV9ERVNDUklQVElPTigiU2Ftc3VuZyBLYWxtaWEgVVNCIG5ldHdvcmsgZHJpdmVyIik7CmRpZmYgLS1naXQgYS9kcml2ZXJzL25ldC91c2Iva2F3ZXRoLmMgYi9kcml2ZXJzL25ldC91c2Iva2F3ZXRoLmMKaW5kZXggNTgyY2EyZC4uZDAzNGQ5YyAxMDA2NDQKLS0tIGEvZHJpdmVycy9uZXQvdXNiL2thd2V0aC5jCisrKyBiL2RyaXZlcnMvbmV0L3VzYi9rYXdldGguYwpAQCAtMTMyNCwzMiArMTMyNCw0IEBACiAJfQogfQogCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgICAga2F3ZXRoX2luaXQKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIGludCBfX2luaXQga2F3ZXRoX2luaXQodm9pZCkKLXsKLQlkYmcoIkRyaXZlciBsb2FkaW5nIik7Ci0JcmV0dXJuIHVzYl9yZWdpc3Rlcigma2F3ZXRoX2RyaXZlcik7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgICAga2F3ZXRoX2V4aXQKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RhdGljIHZvaWQgX19leGl0IGthd2V0aF9leGl0KHZvaWQpCi17Ci0JdXNiX2RlcmVnaXN0ZXIoJmthd2V0aF9kcml2ZXIpOwotfQotCi1tb2R1bGVfaW5pdChrYXdldGhfaW5pdCk7Ci1tb2R1bGVfZXhpdChrYXdldGhfZXhpdCk7Ci0KLQotCi0KLQotCi0KLQotCittb2R1bGVfd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wgICAgIC8qIHdsYW4gY29ubmVjdCAqLwotCUFUSDZLTF9EQkdfV0xBTl9TQ0FOICAgID0gQklUKDEpLCAgICAgLyogd2xhbiBzY2FuICovCisJQVRINktMX0RCR19DUkVESVQJPSBCSVQoMCksCisJLyogaG9sZSAqLwogCUFUSDZLTF9EQkdfV0xBTl9UWCAgICAgID0gQklUKDIpLCAgICAgLyogd2xhbiB0eCAqLwogCUFUSDZLTF9EQkdfV0xBTl9SWCAgICAgID0gQklUKDMpLCAgICAgLyogd2xhbiByeCAqLwogCUFUSDZLTF9EQkdfQk1JCQk9IEJJVCg0KSwgICAgIC8qIGJtaSB0cmFjaW5nICovCi0JQVRINktMX0RCR19IVENfU0VORCAgICAgPSBCSVQoNSksICAgICAvKiBodGMgc2VuZCAqLwotCUFUSDZLTF9EQkdfSFRDX1JFQ1YgICAgID0gQklUKDYpLCAgICAgLyogaHRjIHJlY3YgKi8KKwlBVEg2S0xfREJHX0hUQwkJPSBCSVQoNSksCisJQVRINktMX0RCR19ISUYJCT0gQklUKDYpLAogCUFUSDZLTF9EQkdfSVJRCQk9IEJJVCg3KSwgICAgIC8qIGludGVycnVwdCBwcm9jZXNzaW5nICovCi0JQVRINktMX0RCR19QTSAgICAgICAgICAgPSBCSVQoOCksICAgICAvKiBwb3dlciBtYW5hZ2VtZW50ICovCi0JQVRINktMX0RCR19XTEFOX05PREUgICAgPSBCSVQoOSksICAgICAvKiBnZW5lcmFsIHdsYW4gbm9kZSB0cmFjaW5nICovCisJLyogaG9sZSAqLworCS8qIGhvbGUgKi8KIAlBVEg2S0xfREJHX1dNSSAgICAgICAgICA9IEJJVCgxMCksICAgIC8qIHdtaSB0cmFjaW5nICovCiAJQVRINktMX0RCR19UUkMJICAgICAgICA9IEJJVCgxMSksICAgIC8qIGdlbmVyaWMgZnVuYyB0cmFjaW5nICovCiAJQVRINktMX0RCR19TQ0FUVEVSCT0gQklUKDEyKSwgICAgLyogaGlmIHNjYXR0ZXIgdHJhY2luZyAqLw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jA7CisJCQkJdmFsID0gdmFsdWUgPDwgNTsKKwkJCX0gZWxzZSB7CisJCQkJdG1wID0gMHgwMDEwOworCQkJCXZhbCA9IHZhbHVlIDw8IDQ7CisJCQl9CisJCQliNDNfcGh5X21hc2tzZXQoZGV2LCByZWcsIH50bXAsIHZhbCk7CisJCQlicmVhazsKKwkJY2FzZSAzOgorCQkJaWYgKGI0M19jdXJyZW50X2JhbmQoZGV2LT53bCkgPT0gSUVFRTgwMjExX0JBTkRfNUdIWikgeworCQkJCXRtcCA9IDB4MDAwMTsKKwkJCQl2YWwgPSB2YWx1ZTsKKwkJCX0gZWxzZSB7CisJCQkJdG1wID0gMHgwMDA0OworCQkJCXZhbCA9IHZhbHVlIDw8IDI7CisJCQl9CisJCQliNDNfcGh5X21hc2tzZXQoZGV2LCByZWcsIH50bXAsIHZhbCk7CisJCQlicmVhazsKKwkJY2FzZSA0OgorCQkJaWYgKGI0M19jdXJyZW50X2JhbmQoZGV2LT53bCkgPT0gSUVFRTgwMjExX0JBTkRfNUdIWikgeworCQkJCXRtcCA9IDB4MDAwMjsKKwkJCQl2YWwgPSB2YWx1ZSA8PCAxOworCQkJfSBlbHNlIHsKKwkJCQl0bXAgPSAweDAwMDg7CisJCQkJdmFsID0gdmFsdWUgPDwgMzsKKwkJCX0KKwkJCWI0M19waHlfbWFza3NldChkZXYsIHJlZywgfnRtcCwgdmFsKTsKKwkJCWJyZWFrOworCQl9CisJfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFZhcmlvdXMgUEhZIG9wcworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBodHRwOi8vYmNtLXY0LnNpcHNvbHV0aW9ucy5uZXQvODAyLjExL1BIWS9OL2NsaXAtZGV0ZWN0aW9uICovCitzdGF0aWMgdm9pZCBiNDNfbnBoeV93cml0ZV9jbGlwX2RldGVjdGlvbihzdHJ1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XRpb25zLm5ldC84MDIuMTEvUEhZL04vUlNTSVNlbCAqLwogc3RhdGljIHZvaWQgYjQzX25waHlfcnNzaV9zZWxlY3Qoc3RydWN0IGI0M193bGRldiAqZGV2LCB1OCBjb2RlLCB1OCB0eXBlKQogewpAQCAtMjY4Niw2ICsxNDkzLDE0MTMgQEAKIAl9CiB9CiAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogV29ya2Fyb3VuZHMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgYjQzX25waHlfZ2Fpbl9jdGxfd29ya2Fyb3VuZHNfcmV2M3BsdXMoc3RydWN0IGI0M193bGRldiAqZGV2KQoreworCXN0cnVjdCBzc2Jfc3Byb20gKnNwcm9tID0gZGV2LT5kZXYtPmJ1c19zcHJvbTsKKworCWJvb2wgZ2h6NTsKKwlib29sIGV4dF9sbmE7CisJdTE2IHJzc2lfZ2FpbjsKKwlzdHJ1Y3QgbnBoeV9nYWluX2N0bF93b3JrYXJvdW5kX2VudHJ5ICplOworCXU4IGxwZl9nYWluWzZdID0geyAweDAwLCAweDA2LCAweDBDLCAweDEyLCAweDEyLCAweDEyIH07CisJdTggbHBmX2JpdHNbNl0gPSB7IDAsIDEsIDIsIDMsIDMsIDMgfTsKKworCS8qIFByZXBhcmUgdmFsdWVzICovCisJZ2h6NSA9IGI0M19waHlfcmVhZChkZXYsIEI0M19OUEhZX0JBTkRDVEwpCisJCSYgQjQzX05QSFlfQkFORENUTF81R0haOworCWV4dF9sbmEgPSBnaHo1ID8gc3Byb20tPmJvYXJkZmxhZ3NfaGkgJiBCNDNfQkZIX0VYVExOQV81R0haIDoKKwkJc3Byb20tPmJvYXJkZmxhZ3NfbG8gJiBCNDNfQkZMX0VYVExOQTsKKwllID0gYjQzX25waHlfZ2V0X2dhaW5fY3RsX3dvcmthcm91bmRfZW50KGRldiwgZ2h6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mRldi0+cGh5OworCXN0cnVjdCBiNDNfcGh5X24gKm5waHkgPSBwaHktPm47CisKKwlpZiAoYjQzX2N1cnJlbnRfYmFuZChkZXYtPndsKSA9PSBJRUVFODAyMTFfQkFORF81R0haKQorCQliNDNfbnBoeV9jbGFzc2lmaWVyKGRldiwgMSwgMCk7CisJZWxzZQorCQliNDNfbnBoeV9jbGFzc2lmaWVyKGRldiwgMSwgMSk7CisKKwlpZiAobnBoeS0+aGFuZ19hdm9pZCkKKwkJYjQzX25waHlfc3RheV9pbl9jYXJyaWVyX3NlYXJjaChkZXYsIDEpOworCisJYjQzX3BoeV9zZXQoZGV2LCBCNDNfTlBIWV9JUUZMSVAsCisJCSAgICBCNDNfTlBIWV9JUUZMSVBfQURDMSB8IEI0M19OUEhZX0lRRkxJUF9BREMyKTsKKworCWlmIChkZXYtPnBoeS5yZXYgPj0gMykKKwkJYjQzX25waHlfd29ya2Fyb3VuZHNfcmV2M3BsdXMoZGV2KTsKKwllbHNlCisJCWI0M19ucGh5X3dvcmthcm91bmRzX3JldjFfMihkZXYpOworCisJaWYgKG5waHktPmhhbmdfYXZvaWQpCisJCWI0M19ucGh5X3N0YXlfaW5fY2Fycmllcl9zZWFyY2goZGV2LCAwKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBUeC9SeCBjb21tb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIFRyYW5zbWl0cyBhIGtub3duIHZhbHVlIGZvciBMTyBjYWxpYnJhdGlvbgorICogaHR0cDovL2JjbS12NC5zaXBzb2x1dGlvbnMubmV0LzgwMi4xMS9QSFkvTi9UWFRvbmUKKyAqLworc3RhdGljIGludCBiNDNfbnBoeV90eF90b25lKHN0cnVjdCBiNDNfd2xkZXYgKmRldiwgdTMyIGZyZXEsIHUxNiBtYXhfdmFsLAorCQkJCWJvb2wgaXFtb2RlL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5uY29yclt0eXBlXSA8PCA4KSB8IDB4NjY7CkBAIC0zNzMwLDEwICszODg4LDEwNCBAQAogCWI0M19tYWNfZW5hYmxlKGRldik7CiB9CiAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogTi1QSFkgaW5pdAorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCiAvKgotICogSW5pdCBOLVBIWQotICogaHR0cDovL2JjbS12NC5zaXBzb2x1dGlvbnMubmV0LzgwMi4xMS9QSFkvSW5pdC9OCisgKiBVcGxvYWQgdGhlIE4tUEhZIHRhYmxlcy4KKyAqIGh0dHA6Ly9iY20tdjQuc2lwc29sdXRpb25zLm5ldC84MDIuMTEvUEhZL04vSW5pdFRhYmxlcwogICovCitzdGF0aWMgdm9pZCBiNDNfbnBoeV90YWJsZXNfaW5pdChzdHJ1Y3QgYjQzX3dsZGV2ICpkZXYpCit7CisJaWYgKGRldi0+cGh5LnJldiA8IDMpCisJCWI0M19ucGh5X3JldjBfMV8yX3RhYmxlc19pbml0KGRldik7CisJZWxzZQorCQliNDNfbnBoeV9yZXYzcGx1c190YWJsZXNfaW5pdChkZXYpOworfQorCisvKiBodHRwOi8vYmNtLXY0LnNpcHNvbHV0aW9ucy5uZXQvODAyLjExL1BIWS9OL01JTU9Db25maWcgKi8KK3N0YXRpYyB2b2lkIGI0M19ucGh5X3VwZGF0ZV9taW1vX2NvbmZpZyhzdHJ1Y3QgYjQzX3dsZGV2ICpkZXYsIHMzMiBwcmVhbWJsZSkKK3sKKwl1MTYgbWltb2NmZyA9IGI0M19waHlfcmVhZChkZXYsIEI0M19OUEhZX01JTU9DRkcpOworCisJbWltb2NmZyB8PSBCNDNfTlBIWV9NSU1PQ0ZHX0FVVE87CisJaWYgKHByZWFtYmxlID09IDEpCisJCW1pbW9jZmcgfD0gQjQzX05QSFlfTUlNT0NGR19HRk1JWDsKKwllbHNlCisJCW1pbW9j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0hPUlRfUFJFQU1CTEU7CisJCX0KKwl9Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiB1Q29kZSBkb3dubG9hZCBmdW5jdGlvbnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAoraWwzOTQ1X2RlYWxsb2NfdWNvZGVfcGNpKHN0cnVjdCBpbF9wcml2ICppbCkKK3sKKwlpbF9mcmVlX2Z3X2Rlc2MoaWwtPnBjaV9kZXYsICZpbC0+dWNvZGVfY29kZSk7CisJaWxfZnJlZV9md19kZXNjKGlsLT5wY2lfZGV2LCAmaWwtPnVjb2RlX2RhdGEpOworCWlsX2ZyZWVfZndfZGVzYyhpbC0+cGNpX2RldiwgJmlsLT51Y29kZV9kYXRhX2JhY2t1cCk7CisJaWxfZnJlZV9md19kZXNjKGlsLT5wY2lfZGV2LCAmaWwtPnVjb2RlX2luaXQpOworCWlsX2ZyZWVfZndfZGVzYyhpbC0+cGNpX2RldiwgJmlsLT51Y29kZV9pbml0X2RhdGEpOworCWlsX2ZyZWVfZndfZGVzYyhpbC0+cGNpX2RldiwgJmlsLT51Y29kZV9ib290KTsKK30KKworLyoqCisgKiBpbDM5NDVfdmVyaWZ5X2luc3RfZnVsbCAtIHZlcmlmeSBydW50aW1lIHVDb2RlIGltYWdlIGluIGNhcmQgdnMuIGhvc3QsCisgKiAgICAgbG9va2luZyBhdCBhbGwgZGF0YS4KKyAqLworc3RhdGljIGludAoraWwzOTQ1X3ZlcmlmeV9pbnN0X2Z1bGwoc3RydWN0IGlsX3ByaXYgKmlsLCBfX2xlMzIgKiBpbWFnZSwgdTMyIGxlbikKK3sKKwl1MzIgdmFsOworCXUzMiBzYXZlX2xlbiA9IGxlbjsKKwlpbnQgcmMg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2UgYWZ0ZXIgJWQgYXR0ZW1wdHMuXG4iLCBpKTsKKwlyZXR1cm4gLUVJTzsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogV29ya3F1ZXVlIGNhbGxiYWNrcworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQKK2lsMzk0NV9iZ19pbml0X2FsaXZlX3N0YXJ0KHN0cnVjdCB3b3JrX3N0cnVjdCAqZGF0YSkKK3sKKwlzdHJ1Y3QgaWxfcHJpdiAqaWwgPQorCSAgICBjb250YWluZXJfb2YoZGF0YSwgc3RydWN0IGlsX3ByaXYsIGluaXRfYWxpdmVfc3RhcnQud29yayk7CisKKwltdXRleF9sb2NrKCZpbC0+bXV0ZXgpOworCWlmICh0ZXN0X2JpdChTX0VYSVRfUEVORElORywgJmlsLT5zdGF0dXMpKQorCQlnb3RvIG91dDsKKworCWlsMzk0NV9pbml0X2FsaXZlX3N0YXJ0KGlsKTsKK291dDoKKwltdXRleF91bmxvY2soJmlsLT5tdXRleCk7Cit9CisKK3N0YXRpYyB2b2lkCitpbDM5NDVfYmdfYWxpdmVfc3RhcnQoc3RydWN0IHdvcmtfc3RydWN0ICpkYXRhKQoreworCXN0cnVjdCBpbF9wcml2ICppbCA9CisJICAgIGNvbnRhaW5lcl9vZihkYXRhLCBzdHJ1Y3QgaWxfcHJpdiwgYWxpdmVfc3RhcnQud29yayk7CisKKwltdXRleF9sb2NrKCZpbC0+bXV0ZXgpOworCWlmICh0ZXN0X2JpdChTX0VYSVRfUEVORElORywgJmlsLT5zdGF0dXMpKQorCQlnb3RvIG91dDsKKworCWlsMzk0NV9hbGl2ZV9zdGFydChpbCk7CitvdXQ6CisJbXV0ZXhfdW5sb2NrKCZpbC0+bXV0ZXg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lY3RseSBiZWNhdXNlIGhhcmR3YXJlIGNhbiBwZXJmb3JtIGEgc2NhbiwKKwkgKiBidXQgZXZlbiBpZiBodyBpcyByZWFkeSwgY29tbWl0dGluZyBoZXJlIGJyZWFrcyBmb3Igc29tZSByZWFzb24sCisJICogd2UnbGwgZXZlbnR1YWxseSBjb21taXQgdGhlIGZpbHRlciBmbGFncyBjaGFuZ2UgYW55d2F5LgorCSAqLworCisJbXV0ZXhfdW5sb2NrKCZpbC0+bXV0ZXgpOworCisJLyoKKwkgKiBSZWNlaXZpbmcgYWxsIG11bHRpY2FzdCBmcmFtZXMgaXMgYWx3YXlzIGVuYWJsZWQgYnkgdGhlCisJICogZGVmYXVsdCBmbGFncyBzZXR1cCBpbiBpbF9jb25uZWN0aW9uX2luaXRfcnhfY29uZmlnKCkKKwkgKiBzaW5jZSB3ZSBjdXJyZW50bHkgZG8gbm90IHN1cHBvcnQgcHJvZ3JhbW1pbmcgbXVsdGljYXN0CisJICogZmlsdGVycyBpbnRvIHRoZSBkZXZpY2UuCisJICovCisJKnRvdGFsX2ZsYWdzICY9CisJICAgIEZJRl9PVEhFUl9CU1MgfCBGSUZfQUxMTVVMVEkgfCBGSUZfUFJPTUlTQ19JTl9CU1MgfAorCSAgICBGSUZfQkNOX1BSQlJFU1BfUFJPTUlTQyB8IEZJRl9DT05UUk9MOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBzeXNmcyBhdHRyaWJ1dGVzCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZkZWYgQ09ORklHX0lXTEVHQUNZX0RFQlVHCisKKy8qCisgKiBUaGUgZm9sbG93aW5nIGFkZHMgYSBuZXcgYXR0cmlidXRlIHRvIHRoZSBzeXNmcyByZXByZXNlbnRhdGl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KmlsID0gZGV2X2dldF9kcnZkYXRhKGQpOworCWlmICghaWxfaXNfYWxpdmUoaWwpKQorCQlyZXR1cm4gLUVBR0FJTjsKKwlyZXR1cm4gc3ByaW50ZihidWYsICIweCUwOHhcbiIsIChpbnQpaWwtPnN0YXR1cyk7Cit9CisKK3N0YXRpYyBERVZJQ0VfQVRUUihzdGF0dXMsIFNfSVJVR08sIGlsMzk0NV9zaG93X3N0YXR1cywgTlVMTCk7CisKK3N0YXRpYyBzc2l6ZV90CitpbDM5NDVfZHVtcF9lcnJvcl9sb2coc3RydWN0IGRldmljZSAqZCwgc3RydWN0IGRldmljZV9hdHRyaWJ1dGUgKmF0dHIsCisJCSAgICAgIGNvbnN0IGNoYXIgKmJ1Ziwgc2l6ZV90IGNvdW50KQoreworCXN0cnVjdCBpbF9wcml2ICppbCA9IGRldl9nZXRfZHJ2ZGF0YShkKTsKKwljaGFyICpwID0gKGNoYXIgKilidWY7CisKKwlpZiAocFswXSA9PSAnMScpCisJCWlsMzk0NV9kdW1wX25pY19lcnJvcl9sb2coaWwpOworCisJcmV0dXJuIHN0cm5sZW4oYnVmLCBjb3VudCk7Cit9CisKK3N0YXRpYyBERVZJQ0VfQVRUUihkdW1wX2Vycm9ycywgU19JV1VTUiwgTlVMTCwgaWwzOTQ1X2R1bXBfZXJyb3JfbG9nKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogZHJpdmVyIHNldHVwIGFuZCB0ZWFyIGRvd24KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkCitpbDM5NDVfc2V0dXBfZGVmZXJyZWRfd29yayhzdHJ1Y3QgaWxfcHJpdiAqaWwpCit7CisJaWwtPndvcmtxdWV1ZSA9IGNyZWF0ZV9zaW5nb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Byb20gPSAoc3RydWN0IGlsMzk0NV9lZXByb20gKilpbC0+ZWVwcm9tOworCURfSU5GTygiTUFDIGFkZHJlc3M6ICVwTVxuIiwgZWVwcm9tLT5tYWNfYWRkcmVzcyk7CisJU0VUX0lFRUU4MDIxMV9QRVJNX0FERFIoaWwtPmh3LCBlZXByb20tPm1hY19hZGRyZXNzKTsKKworCS8qKioqKioqKioqKioqKioqKioqKioqKgorCSAqIDUuIFNldHVwIEhXIENvbnN0YW50cworCSAqICoqKioqKioqKioqKioqKioqKioqLworCS8qIERldmljZS1zcGVjaWZpYyBzZXR1cCAqLworCWlmIChpbDM5NDVfaHdfc2V0X2h3X3BhcmFtcyhpbCkpIHsKKwkJSUxfRVJSKCJmYWlsZWQgdG8gc2V0IGh3IHNldHRpbmdzXG4iKTsKKwkJZ290byBvdXRfZWVwcm9tX2ZyZWU7CisJfQorCisJLyoqKioqKioqKioqKioqKioqKioqKioqCisJICogNi4gU2V0dXAgaWwKKwkgKiAqKioqKioqKioqKioqKioqKioqKi8KKworCWVyciA9IGlsMzk0NV9pbml0X2RydihpbCk7CisJaWYgKGVycikgeworCQlJTF9FUlIoImluaXRpYWxpemluZyBkcml2ZXIgZmFpbGVkXG4iKTsKKwkJZ290byBvdXRfdW5zZXRfaHdfcGFyYW1zOworCX0KKworCUlMX0lORk8oIkRldGVjdGVkIEludGVsIFdpcmVsZXNzIFdpRmkgTGluayAlc1xuIiwgaWwtPmNmZy0+bmFtZSk7CisKKwkvKioqKioqKioqKioqKioqKioqKioqKioKKwkgKiA3LiBTZXR1cCBTZXJ2aWNlcworCSAqICoqKioqKioqKioqKioqKioqKioqLworCisJc3Bpbl9sb2NrX2lycXNhdmUoJmlsLT5sb2NrLCBmbGFncyk7CisJaWxfZGlzYWJsZV9pbnRlcnJ1cHRzKGlsKTsKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZpbC0+bG9jaywgZmxhZ3MpOworCisJcGNpX2VuYWJsZV9tc2koaWwtPnBjaV9kZX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bCk7CisJcGNpX2Rpc2FibGVfbXNpKHBkZXYpOworCisJcGNpX2lvdW5tYXAocGRldiwgaWwtPmh3X2Jhc2UpOworCXBjaV9yZWxlYXNlX3JlZ2lvbnMocGRldik7CisJcGNpX2Rpc2FibGVfZGV2aWNlKHBkZXYpOworCXBjaV9zZXRfZHJ2ZGF0YShwZGV2LCBOVUxMKTsKKworCWlsX2ZyZWVfY2hhbm5lbF9tYXAoaWwpOworCWlsX2ZyZWVfZ2VvcyhpbCk7CisJa2ZyZWUoaWwtPnNjYW5fY21kKTsKKwlpZiAoaWwtPmJlYWNvbl9za2IpCisJCWRldl9rZnJlZV9za2IoaWwtPmJlYWNvbl9za2IpOworCisJaWVlZTgwMjExX2ZyZWVfaHcoaWwtPmh3KTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogZHJpdmVyIGFuZCBtb2R1bGUgZW50cnkgcG9pbnQKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBzdHJ1Y3QgcGNpX2RyaXZlciBpbDM5NDVfZHJpdmVyID0geworCS5uYW1lID0gRFJWX05BTUUsCisJLmlkX3RhYmxlID0gaWwzOTQ1X2h3X2NhcmRfaWRzLAorCS5wcm9iZSA9IGlsMzk0NV9wY2lfcHJvYmUsCisJLnJlbW92ZSA9IF9fZGV2ZXhpdF9wKGlsMzk0NV9wY2lfcmVtb3ZlKSwKKwkuZHJpdmVyLnBtID0gSUxfTEVHQUNZX1BNX09QUywKK307CisKK3N0YXRpYyBpbnQgX19pbml0CitpbDM5NDVfaW5pdCh2b2lkKQoreworCisJaW50IHJldDsKKwlwcl9pbmZvKERSVl9ERVNDUklQVElPTiAiLCAiIERSVl9WRVJTSU9OICJcbiIpOworCXByX2luZm8oRFJWX0NP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sZW1lbnRhdGlvbnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWZkZWYgQ09ORklHX0lXTEVHQUNZX0RFQlVHRlMKK3N0YXRpYyB2b2lkCitpbDM5NDVfYWNjdW11bGF0aXZlX3N0YXRzKHN0cnVjdCBpbF9wcml2ICppbCwgX19sZTMyICogc3RhdHMpCit7CisJaW50IGk7CisJX19sZTMyICpwcmV2X3N0YXRzOworCXUzMiAqYWNjdW1fc3RhdHM7CisJdTMyICpkZWx0YSwgKm1heF9kZWx0YTsKKworCXByZXZfc3RhdHMgPSAoX19sZTMyICopICZpbC0+XzM5NDUuc3RhdHM7CisJYWNjdW1fc3RhdHMgPSAodTMyICopICZpbC0+XzM5NDUuYWNjdW1fc3RhdHM7CisJZGVsdGEgPSAodTMyICopICZpbC0+XzM5NDUuZGVsdGFfc3RhdHM7CisJbWF4X2RlbHRhID0gKHUzMiAqKSAmaWwtPl8zOTQ1Lm1heF9kZWx0YTsKKworCWZvciAoaSA9IHNpemVvZihfX2xlMzIpOyBpIDwgc2l6ZW9mKHN0cnVjdCBpbDM5NDVfbm90aWZfc3RhdHMpOworCSAgICAgaSArPQorCSAgICAgc2l6ZW9mKF9fbGUzMiksIHN0YXRzKyssIHByZXZfc3RhdHMrKywgZGVsdGErKywgbWF4X2RlbHRhKyssCisJICAgICBhY2N1bV9zdGF0cysrKSB7CisJCWlmIChsZTMyX3RvX2NwdSgqc3RhdHMpID4gbGUzMl90b19jcHUoKnByZXZfc3RhdHMpKSB7CisJCQkqZGVsdGEgPQorCQkJICAgIChsZTMyX3RvX2NwdSgqc3RhdHMpIC0gbGUzMl90b19jcHUoKnByZXZfc3RhdHMpKTsKKwkJCSphY2N1bV9zdGF0cyArPSAqZGVsdGE7CisJCQlpZiAoKmRlbHRhID4gKm1heF9kZWx0YSkKKwkJCQkqbWF4X2RlbHRhID0gKmRlbHRh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JRF9CSVRfUlRQICAgICAgICAgICAgICAgICAgICAgICgweDgwKQkvKiBiaXQgNyAgICAqLworCisvKiA0IERBVEEgKyAxIENNRC4gVGhlcmUgYXJlIDIgSENDQSBxdWV1ZXMgdGhhdCBhcmUgbm90IHVzZWQuICovCisjZGVmaW5lIElMMzlfTlVNX1FVRVVFUyAgICAgICAgNQorI2RlZmluZSBJTDM5X0NNRF9RVUVVRV9OVU0JNAorCisjZGVmaW5lIElMX0RFRkFVTFRfVFhfUkVUUlkgIDE1CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNkZWZpbmUgUkZEX1NJWkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIE5VTV9URkRfQ0hVTktTICAgICAgICAgICAgICAgICAgICAgICAgNAorCisjZGVmaW5lIFRGRF9DVExfQ09VTlRfU0VUKG4pICAgICAgIChuIDw8IDI0KQorI2RlZmluZSBURkRfQ1RMX0NPVU5UX0dFVChjdGwpICAgICAoKGN0bCA+PiAyNCkgJiA3KQorI2RlZmluZSBURkRfQ1RMX1BBRF9TRVQobikgICAgICAgICAobiA8PCAyOCkKKyNkZWZpbmUgVEZEX0NUTF9QQURfR0VUKGN0bCkgICAgICAgKGN0bCA+PiAyOCkKKworLyogU2l6ZXMgYW5kIGFkZHJlc3NlcyBmb3IgaW5zdHJ1Y3Rpb24gYW5kIGRhdGEgbWVtb3J5IChTUkFNKSBpbgorICogMzk0NSdzIGVtYmVkZGVkIHByb2Nlc3Nvci4gIERyaXZlciBhY2Nlc3MgaXMgdmlhIEhCVVNfVEFSR19NRU1fKiByZWdzLiAqLworI2RlZmluZSBJTDM5X1JUQ19JTlNUX0xPV0VSX0JPVU5ECQkoMHgwMDAwMDApCisjZGVmaW5lIElMMzlfUlRDX0lOU1RfVVBQRVJfQk9VTkQJCSgweDAxNDAwMCkKKworI2RlZmluZSBJTDM5X1JUQ19EQVRBX0xPV0VSX0JPVU5ECQ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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogSU5JVCBjYWxpYnJhdGlvbnMgZnJhbWV3b3JrCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnVjdCBzdGF0c19nZW5lcmFsX2RhdGEgeworCXUzMiBiZWFjb25fc2lsZW5jZV9yc3NpX2E7CisJdTMyIGJlYWNvbl9zaWxlbmNlX3Jzc2lfYjsKKwl1MzIgYmVhY29uX3NpbGVuY2VfcnNzaV9jOworCXUzMiBiZWFjb25fZW5lcmd5X2E7CisJdTMyIGJlYWNvbl9lbmVyZ3lfYjsKKwl1MzIgYmVhY29uX2VuZXJneV9jOworfTsKKwordm9pZAoraWw0OTY1X2NhbGliX2ZyZWVfcmVzdWx0cyhzdHJ1Y3QgaWxfcHJpdiAqaWwpCit7CisJaW50IGk7CisKKwlmb3IgKGkgPSAwOyBpIDwgSUxfQ0FMSUJfTUFYOyBpKyspIHsKKwkJa2ZyZWUoaWwtPmNhbGliX3Jlc3VsdHNbaV0uYnVmKTsKKwkJaWwtPmNhbGliX3Jlc3VsdHNbaV0uYnVmID0gTlVMTDsKKwkJaWwtPmNhbGliX3Jlc3VsdHNbaV0uYnVmX2xlbiA9IDA7CisJfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFJVTlRJTUUgY2FsaWJyYXRpb25zIGZyYW1ld29yaworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiAiZmFsc2UgYWxhcm1zIiBhcmUgc2lnbmFscyB0aGF0IG91ciBEU1AgdHJpZXMgdG8gbG9jayBvbnRvLAorICogICBid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X05BTUUgICAgICAgICJpd2w0OTY1IgorCisjaW5jbHVkZSAiY29tbW9uLmgiCisjaW5jbHVkZSAiNDk2NS5oIgorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogbW9kdWxlIGJvaWxlciBwbGF0ZQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBtb2R1bGUgbmFtZSwgY29weXJpZ2h0LCB2ZXJzaW9uLCBldGMuCisgKi8KKyNkZWZpbmUgRFJWX0RFU0NSSVBUSU9OCSJJbnRlbChSKSBXaXJlbGVzcyBXaUZpIDQ5NjUgZHJpdmVyIGZvciBMaW51eCIKKworI2lmZGVmIENPTkZJR19JV0xFR0FDWV9ERUJVRworI2RlZmluZSBWRCAiZCIKKyNlbHNlCisjZGVmaW5lIFZECisjZW5kaWYKKworI2RlZmluZSBEUlZfVkVSU0lPTiAgICAgSVdMV0lGSV9WRVJTSU9OIFZECisKK01PRFVMRV9ERVNDUklQVElPTihEUlZfREVTQ1JJUFRJT04pOworTU9EVUxFX1ZFUlNJT04oRFJWX1ZFUlNJT04pOworTU9EVUxFX0FVVEhPUihEUlZfQ09QWVJJR0hUICIgIiBEUlZfQVVUSE9SKTsKK01PRFVMRV9MSUNFTlNFKCJHUEwiKTsKK01PRFVMRV9BTElBUygiaXdsNDk2NSIpOworCit2b2lkCitpbDQ5NjVfY2hlY2tfYWJvcnRfc3RhdHVzKHN0cnVjdCBpbF9wcml2ICppbCwgdTggZnJhbWVfY291bnQsIHUzMiBzdGF0dXMpCit7CisJaWYgKGZyYW1lX2NvdW50ID09IDEgJiYgc3RhdHVzID09IFRYX1NUQVRVU19GQUlMX1JGS0lMTF9GTFVTSCkgeworCQlJTF9FUlIoIlR4IGZsdXNoIGNvbW1hbmQgdG8gZm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sIDEwLCAmdmFsKTsKKwlpZiAocmV0KQorCQlJTF9JTkZPKCIlcyBpcyBub3QgaW4gZGVjaW1hbCBmb3JtLlxuIiwgYnVmKTsKKwllbHNlIHsKKwkJcmV0ID0gaWxfc2V0X3R4X3Bvd2VyKGlsLCB2YWwsIGZhbHNlKTsKKwkJaWYgKHJldCkKKwkJCUlMX0VSUigiZmFpbGVkIHNldHRpbmcgdHggcG93ZXIgKDB4JWQpLlxuIiwgcmV0KTsKKwkJZWxzZQorCQkJcmV0ID0gY291bnQ7CisJfQorCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyBERVZJQ0VfQVRUUih0eF9wb3dlciwgU19JV1VTUiB8IFNfSVJVR08sIGlsNDk2NV9zaG93X3R4X3Bvd2VyLAorCQkgICBpbDQ5NjVfc3RvcmVfdHhfcG93ZXIpOworCitzdGF0aWMgc3RydWN0IGF0dHJpYnV0ZSAqaWxfc3lzZnNfZW50cmllc1tdID0geworCSZkZXZfYXR0cl90ZW1wZXJhdHVyZS5hdHRyLAorCSZkZXZfYXR0cl90eF9wb3dlci5hdHRyLAorI2lmZGVmIENPTkZJR19JV0xFR0FDWV9ERUJVRworCSZkZXZfYXR0cl9kZWJ1Z19sZXZlbC5hdHRyLAorI2VuZGlmCisJTlVMTAorfTsKKworc3RhdGljIHN0cnVjdCBhdHRyaWJ1dGVfZ3JvdXAgaWxfYXR0cmlidXRlX2dyb3VwID0geworCS5uYW1lID0gTlVMTCwJCS8qIHB1dCBpbiBkZXZpY2UgZGlyZWN0b3J5ICovCisJLmF0dHJzID0gaWxfc3lzZnNfZW50cmllcywKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiB1Q29kZSBkb3dubG9hZCBmdW5jdGlvbnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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XJldCA9IGlsLT5jZmctPm9wcy0+bGliLT5sb2FkX3Vjb2RlKGlsKTsKKworCQlpZiAocmV0KSB7CisJCQlJTF9FUlIoIlVuYWJsZSB0byBzZXQgdXAgYm9vdHN0cmFwIHVDb2RlOiAlZFxuIiwgcmV0KTsKKwkJCWNvbnRpbnVlOworCQl9CisKKwkJLyogc3RhcnQgY2FyZDsgImluaXRpYWxpemUiIHdpbGwgbG9hZCBydW50aW1lIHVjb2RlICovCisJCWlsNDk2NV9uaWNfc3RhcnQoaWwpOworCisJCURfSU5GTyhEUlZfTkFNRSAiIGlzIGNvbWluZyB1cFxuIik7CisKKwkJcmV0dXJuIDA7CisJfQorCisJc2V0X2JpdChTX0VYSVRfUEVORElORywgJmlsLT5zdGF0dXMpOworCV9faWw0OTY1X2Rvd24oaWwpOworCWNsZWFyX2JpdChTX0VYSVRfUEVORElORywgJmlsLT5zdGF0dXMpOworCisJLyogdHJpZWQgdG8gcmVzdGFydCBhbmQgY29uZmlnIHRoZSBkZXZpY2UgZm9yIGFzIGxvbmcgYXMgb3VyCisJICogcGF0aWVuY2UgY291bGQgd2l0aHN0YW5kICovCisJSUxfRVJSKCJVbmFibGUgdG8gaW5pdGlhbGl6ZSBkZXZpY2UgYWZ0ZXIgJWQgYXR0ZW1wdHMuXG4iLCBpKTsKKwlyZXR1cm4gLUVJTzsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogV29ya3F1ZXVlIGNhbGxiYWNrcworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQKK2lsNDk2NV9iZ19pbml0X2FsaXZlX3N0YXJ0KHN0cnVjdCB3b3JrX3N0cnVjdCAqZGF0YSkKK3sKKwlzdHJ1Y3QgaWxfcHJpdiAqaWwgP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lc3Nlc1swXS5hZGRyKTsKKwlEX0lORk8oIk1BQyBhZGRyZXNzOiAlcE1cbiIsIGlsLT5hZGRyZXNzZXNbMF0uYWRkcik7CisJaWwtPmh3LT53aXBoeS0+YWRkcmVzc2VzID0gaWwtPmFkZHJlc3NlczsKKwlpbC0+aHctPndpcGh5LT5uX2FkZHJlc3NlcyA9IDE7CisKKwkvKioqKioqKioqKioqKioqKioqKioqKioqCisJICogNS4gU2V0dXAgSFcgY29uc3RhbnRzCisJICoqKioqKioqKioqKioqKioqKioqKioqKi8KKwlpZiAoaWw0OTY1X3NldF9od19wYXJhbXMoaWwpKSB7CisJCUlMX0VSUigiZmFpbGVkIHRvIHNldCBodyBwYXJhbWV0ZXJzXG4iKTsKKwkJZ290byBvdXRfZnJlZV9lZXByb207CisJfQorCisJLyoqKioqKioqKioqKioqKioqKioKKwkgKiA2LiBTZXR1cCBpbAorCSAqKioqKioqKioqKioqKioqKioqLworCisJZXJyID0gaWw0OTY1X2luaXRfZHJ2KGlsKTsKKwlpZiAoZXJyKQorCQlnb3RvIG91dF9mcmVlX2VlcHJvbTsKKwkvKiBBdCB0aGlzIHBvaW50IGJvdGggaHcgYW5kIGlsIGFyZSBpbml0aWFsaXplZC4gKi8KKworCS8qKioqKioqKioqKioqKioqKioqKgorCSAqIDcuIFNldHVwIHNlcnZpY2VzCisJICoqKioqKioqKioqKioqKioqKioqLworCXNwaW5fbG9ja19pcnFzYXZlKCZpbC0+bG9jaywgZmxhZ3MpOworCWlsX2Rpc2FibGVfaW50ZXJydXB0cyhpbCk7CisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmaWwtPmxvY2ssIGZsYWdzKTsKKworCXBjaV9lbmFibGVfbXNpKGlsLT5wY2lfZGV2KTsKKworCWVyciA9IHJlcXVlc3RfaXJxKGlsLT5wY2lfZGV2LT5pcnEsIGlsX2lzciwgSVJRRl9TSEFSRUQsIERSVl9OQU1FLCBpbCk7CisJaWYgKGVycikgeworCQlJTF9FUlIo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m95X3dvcmtxdWV1ZShpbC0+d29ya3F1ZXVlKTsKKwlpbC0+d29ya3F1ZXVlID0gTlVMTDsKKwlpbF9mcmVlX3RyYWZmaWNfbWVtKGlsKTsKKworCWZyZWVfaXJxKGlsLT5wY2lfZGV2LT5pcnEsIGlsKTsKKwlwY2lfZGlzYWJsZV9tc2koaWwtPnBjaV9kZXYpOworCXBjaV9pb3VubWFwKHBkZXYsIGlsLT5od19iYXNlKTsKKwlwY2lfcmVsZWFzZV9yZWdpb25zKHBkZXYpOworCXBjaV9kaXNhYmxlX2RldmljZShwZGV2KTsKKwlwY2lfc2V0X2RydmRhdGEocGRldiwgTlVMTCk7CisKKwlpbDQ5NjVfdW5pbml0X2RydihpbCk7CisKKwlkZXZfa2ZyZWVfc2tiKGlsLT5iZWFjb25fc2tiKTsKKworCWllZWU4MDIxMV9mcmVlX2h3KGlsLT5odyk7Cit9CisKKy8qCisgKiBBY3RpdmF0ZS9EZWFjdGl2YXRlIFR4IERNQS9GSUZPIGNoYW5uZWxzIGFjY29yZGluZyB0eCBmaWZvcyBtYXNrCisgKiBtdXN0IGJlIGNhbGxlZCB1bmRlciBpbC0+bG9jayBhbmQgbWFjIGFjY2VzcworICovCit2b2lkCitpbDQ5NjVfdHhxX3NldF9zY2hlZChzdHJ1Y3QgaWxfcHJpdiAqaWwsIHUzMiBtYXNrKQoreworCWlsX3dyX3BycGgoaWwsIElMNDlfU0NEX1RYRkFDVCwgbWFzayk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIGRyaXZlciBhbmQgbW9kdWxlIGVudHJ5IHBvaW50CisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBIYXJkd2FyZSBzcGVjaWZpYyBmaWxlIGRlZmluZXMgdGhlIFBD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TUlOX1RYX0dBSU5fSURYCQkoMCkJLyogaGlnaGVzdCBnYWluLCBsb3dlc3QgaWR4LCAyLjQgKi8KKyNkZWZpbmUgTUlOX1RYX0dBSU5fSURYXzUyR0haX0VYVAkoLTkpCS8qIGhpZ2hlc3QgZ2FpbiwgbG93ZXN0IGlkeCwgNSAqLworCisvKioKKyAqIDIuNCBHSHogZ2FpbiB0YWJsZQorICoKKyAqIEluZGV4ICAgIERzcCBnYWluICAgUmFkaW8gZ2FpbgorICogICAwICAgICAgICAxMTAgICAgICAgICAweDNmICAgICAgKGhpZ2hlc3QgZ2FpbikKKyAqICAgMSAgICAgICAgMTA0ICAgICAgICAgMHgzZgorICogICAyICAgICAgICAgOTggICAgICAgICAweDNmCisgKiAgIDMgICAgICAgIDExMCAgICAgICAgIDB4M2UKKyAqICAgNCAgICAgICAgMTA0ICAgICAgICAgMHgzZQorICogICA1ICAgICAgICAgOTggICAgICAgICAweDNlCisgKiAgIDYgICAgICAgIDExMCAgICAgICAgIDB4M2QKKyAqICAgNyAgICAgICAgMTA0ICAgICAgICAgMHgzZAorICogICA4ICAgICAgICAgOTggICAgICAgICAweDNkCisgKiAgIDkgICAgICAgIDExMCAgICAgICAgIDB4M2MKKyAqICAxMCAgICAgICAgMTA0ICAgICAgICAgMHgzYworICogIDExICAgICAgICAgOTggICAgICAgICAweDNjCisgKiAgMTIgICAgICAgIDExMCAgICAgICAgIDB4M2IKKyAqICAxMyAgICAgICAgMTA0ICAgICAgICAgMHgzYgorICogIDE0ICAgICAgICAgOTggICAgICAgICAweDNiCisgKiAgMTUgICAgICAgIDExMCAgICAgICAgIDB4M2EKKyAqICAxNiAgICAgICAgMTA0ICAgICAgICAgMHgzYQorICogIDE3ICAgICAgICAgOTggICAgICAgICAweDNhCisgKiAgMTggICAgICAgIDExMCAgICAgICAgIDB4MzkKKyAqICAxOSAgICAgICAgMTA0ICAgICAgICAgMHgzOQorICogIDIwICAgICAgICAgOTggICAgICAgICAweDM5CisgKiAgMjEgICAgICAgIDExMCAgICAgICAgIDB4MzgKKyAqICAyMiAgICAgICAgMTA0ICAgICAgICAgMHgzOAorICogIDIzICAgICAgICAgOTggICAgICAgICAweDM4CisgKiAgMjQgICAgICAgIDExMCAgICAgICAgIDB4MzcKKyAqICAyNSAgICAgICAgMTA0ICAgICAgICAgMHgzNworICogIDI2ICAgICAgICAgOTggICAgICAgICAweDM3CisgKiAgMjcgICAgICAgIDExMCAgICAgICAgIDB4MzYKKyAqICAyOCAgICAgICAgMTA0ICAgICAgICAgMHgzNgorICogIDI5ICAgICAgICAgOTggICAgICAgICAweDM2CisgKiAgMzAgICAgICAgIDExMCAgICAgICAgIDB4MzUKKyAqICAzMSAgICAgICAgMTA0ICAgICAgICAgMHgzNQorICogIDMyICAgICAgICAgOTggICAgICAgICAweDM1CisgKiAgMzMgICAgICAgIDExMCAgICAgICAgIDB4MzQKKyAqICAzNCAgICAgICAgMTA0ICAgICAgICAgMHgzNAorICogIDM1ICAgICAgICAgOTggICAgICAgICAweDM0CisgKiAgMzYgICAgICAgIDExMCAgICAgICAgIDB4MzMKKyAqICAzNyAgICAgICAgMTA0ICAgICAgICAgMHgzMworICogIDM4ICAgICAgICAgOTggICAgICAgICAweDMzCisgKiAgMzkgICAgICAgIDExMCAgICAgICAgIDB4MzIKKyAqICA0MCAgICAgICAgMTA0ICAgICAgICAgMHgzMgorICogIDQxICAgICAgICAgOTggICAgICAgICAweDMyCisgKiAgNDIgICAgICAgIDExMCAgICAgICAgIDB4MzEKKyAqICA0MyAgICAgICAgMTA0ICAgICAgICAgMHgzMQorICogIDQ0ICAgICAgICAgOTggICAgICAgICAweDMxCisgKiAgNDUgICAgICAgIDExMCAgICAgICAgIDB4MzAKKyAqICA0NiAgICAgICAgMTA0ICAgICAgICAgMHgzMAorICogIDQ3ICAgICAgICAgOTggICAgICAgICAweDMwCisgKiAgNDggICAgICAgIDExMCAgICAgICAgICAweDYKKyAqICA0OSAgICAgICAgMTA0ICAgICAgICAgIDB4NgorICogIDUwICAgICAgICAgOTggICAgICAgICAgMHg2CisgKiAgNTEgICAgICAgIDExMCAgICAgICAgICAweDUKKyAqICA1MiAgICAgICAgMTA0ICAgICAgICAgIDB4NQorICogIDUzICAgICAgICAgOTggICAgICAgICAgMHg1CisgKiAgNTQgICAgICAgIDExMCAgICAgICAgICAweDQKKyAqICA1NSAgICAgICAgMTA0ICAgICAgICAgIDB4NAorICogIDU2ICAgICAgICAgOTggICAgICAgICAgMHg0CisgKiAgNTcgICAgICAgIDExMCAgICAgICAgICAweDMKKyAqICA1OCAgICAgICAgMTA0ICAgICAgICAgIDB4MworICogIDU5ICAgICAgICAgOTggICAgICAgICAgMHgzCisgKiAgNjAgICAgICAgIDExMCAgICAgICAgICAweDIKKyAqICA2MSAgICAgICAgMTA0ICAgICAgICAgIDB4MgorICogIDYyICAgICAgICAgOTggICAgICAgICAgMHgyCisgKiAgNjMgICAgICAgIDExMCAgICAgICAgICAweDEKKyAqICA2NCAgICAgICAgMTA0ICAgICAgICAgIDB4MQorICogIDY1ICAgICAgICAgOTggICAgICAgICAgMHgxCisgKiAgNjYgICAgICAgIDExMCAgICAgICAgICAweDAKKyAqICA2NyAgICAgICAgMTA0ICAgICAgICAgIDB4MAorICogIDY4ICAgICAgICAgOTggICAgICAgICAgMHgwCisgKiAgNjkgICAgICAgICA5NyAgICAgICAgICAgIDAKKyAqICA3MCAgICAgICAgIDk2ICAgICAgICAgICAgMAorICogIDcxICAgICAgICAgOTUgICAgICAgICAgICAwCisgKiAgNzIgICAgICAgICA5NCAgICAgICAgICAgIDAKKyAqICA3MyAgICAgICAgIDkzICAgICAgICAgICAgMAorICogIDc0ICAgICAgICAgOTIgICAgICAgICAgICAwCisgKiAgNzUgICAgICAgICA5MSAgICAgICAgICAgIDAKKyAqICA3NiAgICAgICAgIDkwICAgICAgICAgICAgMAorICogIDc3ICAgICAgICAgODkgICAgICAgICAgICAwCisgKiAgNzggICAgICAgICA4OCAgICAgICAgICAgIDAKKyAqICA3OSAgICAgICAgIDg3ICAgICAgICAgICAgMAorICogIDgwICAgICAgICAgODYgICAgICAgICAgICAwCisgKiAgODEgICAgICAgICA4NSAgICAgICAgICAgIDAKKyAqICA4MiAgICAgICAgIDg0ICAgICAgICAgICAgMAorICogIDgzICAgICAgICAgODMgICAgICAgICAgICAwCisgKiAgODQgICAgICAgICA4MiAgICAgICAgICAgIDAKKyAqICA4NSAgICAgICAgIDgxICAgICAgICAgICAgMAorICogIDg2ICAgICAgICAgODAgICAgICAgICAgICAwCisgKiAgODcgICAgICAgICA3OSAgICAgICAgICAgIDAKKyAqICA4OCAgICAgICAgIDc4ICAgICAgICAgICAgMAorICogIDg5ICAgICAgICAgNzcgICAgICAgICAgICAwCisgKiAgOTAgICAgICAgICA3NiAgICAgICAgICAgIDAKKyAqICA5MSAgICAgICAgIDc1ICAgICAgICAgICAgMAorICogIDkyICAgICAgICAgNzQgICAgICAgICAgICAwCisgKiAgOTMgICAgICAgICA3MyAgICAgICAgICAgIDAKKyAqICA5NCAgICAgICAgIDcyICAgICAgICAgICAgMAorICogIDk1ICAgICAgICAgNzEgICAgICAgICAgICAwCisgKiAgOTYgICAgICAgICA3MCAgICAgICAgICAgIDAKKyAqICA5NyAgICAgICAgIDY5ICAgICAgICAgICAgMAorICogIDk4ICAgICAgICAgNjggICAgICAgICAgICAwCisgKi8KKworLyoqCisgKiA1IEdIeiBnYWluIHRhYmxlCisgKgorICogSW5kZXggICAgRHNwIGdhaW4gICBSYWRpbyBnYWluCisgKiAgLTkgCSAgICAgIDEyMyAgICAgICAgIDB4M0YgICAgICAoaGlnaGVzdCBnYWluKQorICogIC04IAkgICAgICAxMTcgICAgICAgICAweDNGCisgKiAgLTcgICAgICAgIDExMCAgICAgICAgIDB4M0YKKyAqICAtNiAgICAgICAgMTA0ICAgICAgICAgMHgzRgorICogIC01ICAgICAgICAgOTggICAgICAgICAweDNGCisgKiAgLTQgICAgICAgIDExMCAgICAgICAgIDB4M0UKKyAqICAtMyAgICAgICAgMTA0ICAgICAgICAgMHgzRQorICogIC0yICAgICAgICAgOTggICAgICAgICAweDNFCisgKiAgLTEgICAgICAgIDExMCAgICAgICAgIDB4M0QKKyAqICAgMCAgICAgICAgMTA0ICAgICAgICAgMHgzRAorICogICAxICAgICAgICAgOTggICAgICAgICAweDNECisgKiAgIDIgICAgICAgIDExMCAgICAgICAgIDB4M0MKKyAqICAgMyAgICAgICAgMTA0ICAgICAgICAgMHgzQworICogICA0ICAgICAgICAgOTggICAgICAgICAweDNDCisgKiAgIDUgICAgICAgIDExMCAgICAgICAgIDB4M0IKKyAqICAgNiAgICAgICAgMTA0ICAgICAgICAgMHgzQgorICogICA3ICAgICAgICAgOTggICAgICAgICAweDNCCisgKiAgIDggICAgICAgIDExMCAgICAgICAgIDB4M0EKKyAqICAgOSAgICAgICAgMTA0ICAgICAgICAgMHgzQQorICogIDEwICAgICAgICAgOTggICAgICAgICAweDNBCisgKiAgMTEgICAgICAgIDExMCAgICAgICAgIDB4MzkKKyAqICAxMiAgICAgICAgMTA0ICAgICAgICAgMHgzOQorICogIDEzICAgICAgICAgOTggICAgICAgICAweDM5CisgKiAgMTQgICAgICAgIDExMCAgICAgICAgIDB4MzgKKyAqICAxNSAgICAgICAgMTA0ICAgICAgICAgMHgzOAorICogIDE2ICAgICAgICAgOTggICAgICAgICAweDM4CisgKiAgMTcgICAgICAgIDExMCAgICAgICAgIDB4MzcKKyAqICAxOCAgICAgICAgMTA0ICAgICAgICAgMHgzNworICogIDE5ICAgICAgICAgOTggICAgICAgICAweDM3CisgKiAgMjAgICAgICAgIDExMCAgICAgICAgIDB4MzYKKyAqICAyMSAgICAgICAgMTA0ICAgICAgICAgMHgzNgorICogIDIyICAgICAgICAgOTggICAgICAgICAweDM2CisgKiAgMjMgICAgICAgIDExMCAgICAgICAgIDB4MzUKKyAqICAyNCAgICAgICAgMTA0ICAgICAgICAgMHgzNQorICogIDI1ICAgICAgICAgOTggICAgICAgICAweDM1CisgKiAgMjYgICAgICAgIDExMCAgICAgICAgIDB4MzQKKyAqICAyNyAgICAgICAgMTA0ICAgICAgICAgMHgzNAorICogIDI4ICAgICAgICAgOTggICAgICAgICAweDM0CisgKiAgMjkgICAgICAgIDExMCAgICAgICAgIDB4MzMKKyAqICAzMCAgICAgICAgMTA0ICAgICAgICAgMHgzMworICogIDMxICAgICAgICAgOTggICAgICAgICAweDMzCisgKiAgMzIgICAgICAgIDExMCAgICAgICAgIDB4MzIKKyAqICAzMyAgICAgICAgMTA0ICAgICAgICAgMHgzMgorICogIDM0ICAgICAgICAgOTggICAgICAgICAweDMyCisgKiAgMzUgICAgICAgIDExMCAgICAgICAgIDB4MzEKKyAqICAzNiAgICAgICAgMTA0ICAgICAgICAgMHgzMQorICogIDM3ICAgICAgICAgOTggICAgICAgICAweDMxCisgKiAgMzggICAgICAgIDExMCAgICAgICAgIDB4MzAKKyAqICAzOSAgICAgICAgMTA0ICAgICAgICAgMHgzMAorICogIDQwICAgICAgICAgOTggICAgICAgICAweDMwCisgKiAgNDEgICAgICAgIDExMCAgICAgICAgIDB4MjUKKyAqICA0MiAgICAgICAgMTA0ICAgICAgICAgMHgyNQorICogIDQzICAgICAgICAgOTggICAgICAgICAweDI1CisgKiAgNDQgICAgICAgIDExMCAgICAgICAgIDB4MjQKKyAqICA0NSAgICAgICAgMTA0ICAgICAgICAgMHgyNAorICogIDQ2ICAgICAgICAgOTggICAgICAgICAweDI0CisgKiAgNDcgICAgICAgIDExMCAgICAgICAgIDB4MjMKKyAqICA0OCAgICAgICAgMTA0ICAgICAgICAgMHgyMworICogIDQ5ICAgICAgICAgOTggICAgICAgICAweDIzCisgKiAgNTAgICAgICAgIDExMCAgICAgICAgIDB4MjIKKyAqICA1MSAgICAgICAgMTA0ICAgICAgICAgMHgxOAorICogIDUyICAgICAgICAgOTggICAgICAgICAweDE4CisgKiAgNTMgICAgICAgIDExMCAgICAgICAgIDB4MTcKKyAqICA1NCAgICAgICAgMTA0ICAgICAgICAgMHgxNworICogIDU1ICAgICAgICAgOTggICAgICAgICAweDE3CisgKiAgNTYgICAgICAgIDExMCAgICAgICAgIDB4MTYKKyAqICA1NyAgICAgICAgMTA0ICAgICAgICAgMHgxNgorICogIDU4ICAgICAgICAgOTggICAgICAgICAweDE2CisgKiAgNTkgICAgICAgIDExMCAgICAgICAgIDB4MTUKKyAqICA2MCAgICAgICAgMTA0ICAgICAgICAgMHgxNQorICogIDYxICAgICAgICAgOTggICAgICAgICAweDE1CisgKiAgNjIgICAgICAgIDExMCAgICAgICAgIDB4MTQKKyAqICA2MyAgICAgICAgMTA0ICAgICAgICAgMHgxNAorICogIDY0ICAgICAgICAgOTggICAgICAgICAweDE0CisgKiAgNjUgICAgICAgIDExMCAgICAgICAgIDB4MTMKKyAqICA2NiAgICAgICAgMTA0ICAgICAgICAgMHgxMworICogIDY3ICAgICAgICAgOTggICAgICAgICAweDEzCisgKiAgNjggICAgICAgIDExMCAgICAgICAgIDB4MTIKKyAqICA2OSAgICAgICAgMTA0ICAgICAgICAgMHgwOAorICogIDcwICAgICAgICAgOTggICAgICAgICAweDA4CisgKiAgNzEgICAgICAgIDExMCAgICAgICAgIDB4MDcKKyAqICA3MiAgICAgICAgMTA0ICAgICAgICAgMHgwNworICogIDczICAgICAgICAgOTggICAgICAgICAweDA3CisgKiAgNzQgICAgICAgIDExMCAgICAgICAgIDB4MDYKKyAqICA3NSAgICAgICAgMTA0ICAgICAgICAgMHgwNgorICogIDc2ICAgICAgICAgOTggICAgICAgICAweDA2CisgKiAgNzcgICAgICAgIDExMCAgICAgICAgIDB4MDUKKyAqICA3OCAgICAgICAgMTA0ICAgICAgICAgMHgwNQorICogIDc5ICAgICAgICAgOTggICAgICAgICAweDA1CisgKiAgODAgICAgICAgIDExMCAgICAgICAgIDB4MDQKKyAqICA4MSAgICAgICAgMTA0ICAgICAgICAgMHgwNAorICogIDgyICAgICAgICAgOTggICAgICAgICAweDA0CisgKiAgODMgICAgICAgIDExMCAgICAgICAgIDB4MDMKKyAqICA4NCAgICAgICAgMTA0ICAgICAgICAgMHgwMworICogIDg1ICAgICAgICAgOTggICAgICAgICAweDAzCisgKiAgODYgICAgICAgIDExMCAgICAgICAgIDB4MDIKKyAqICA4NyAgICAgICAgMTA0ICAgICAgICAgMHgwMgorICogIDg4ICAgICAgICAgOTggICAgICAgICAweDAyCisgKiAgODkgICAgICAgIDExMCAgICAgICAgIDB4MDEKKyAqICA5MCAgICAgICAgMTA0ICAgICAgICAgMHgwMQorICogIDkxICAgICAgICAgOTggICAgICAgICAweDAxCisgKiAgOTIgICAgICAgIDExMCAgICAgICAgIDB4MDAKKyAqICA5MyAgICAgICAgMTA0ICAgICAgICAgMHgwMAorICogIDk0ICAgICAgICAgOTggICAgICAgICAweDAwCisgKiAgOTUgICAgICAgICA5MyAgICAgICAgIDB4MDAKKyAqICA5NiAgICAgICAgIDg4ICAgICAgICAgMHgwMAorICogIDk3ICAgICAgICAgODMgICAgICAgICAweDAwCisgKiAgOTggICAgICAgICA3OCAgICAgICAgIDB4MDAKKyAqLworCisvKioKKyAqIFNhbml0eSBjaGVja3MgYW5kIGRlZmF1bHQgdmFsdWVzIGZvciBFRVBST00gcmVndWxhdG9yeSBsZXZlbHMuCisgKiBJZiBFRVBST00gdmFsdWVzIGZhbGwgb3V0c2lkZSBNSU4vTUFYIHJhbmdlLCB1c2UgZGVmYXVsdCB2YWx1ZXMuCisgKgorICogUmVndWxhdG9yeSBsaW1pdHMgcmVmZXIgdG8gdGhlIG1heGltdW0gYXZlcmFnZSB0eHBvd2VyIGFsbG93ZWQgYnkKKyAqIHJlZ3VsYXRvcnkgYWdlbmNpZXMgaW4gdGhlIGdlb2dyYXBoaWVzIGluIHdoaWNoIHRoZSBkZXZpY2UgaXMgbWVhbnQKKyAqIHRvIGJlIG9wZXJhdGVkLiAgVGhlc2UgbGltaXRzIGFyZSBTS1Utc3BlY2lmaWMgKGkuZS4gZ2VvZ3JhcGh5LXNwZWNpZmljKSwKKyAqIGFuZCBjaGFubmVsLXNwZWNpZmljOyBl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Ci0JUkVQTFlfTUFYID0gMHhmZgorCUlMX0NOX01BWCA9IDB4ZmYKIH07CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTE2MywyNSArMTU5LDI1IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0vKiBpd2xfY21kX2hlYWRlciBmbGFncyB2YWx1ZSAqLwotI2RlZmluZSBJV0xfQ01EX0ZBSUxFRF9NU0sgMHg0MAorLyogaWxfY21kX2hlYWRlciBmbGFncyB2YWx1ZSAqLworI2RlZmluZSBJTF9DTURfRkFJTEVEX01TSyAweDQwCiAKICNkZWZpbmUgU0VRX1RPX1FVRVVFKHMpCSgoKHMpID4+IDgpICYgMHgxZikKICNkZWZpbmUgUVVFVUVfVE9fU0VRKHEpCSgoKHEpICYgMHgxZikgPDwgOCkKLSNkZWZpbmUgU0VRX1RPX0lOREVYKHMpCSgocykgJiAweGZmKQotI2RlZmluZSBJTkRFWF9UT19TRVEoaSkJKChpKSAmIDB4ZmYpCisjZGVmaW5lIFNFUV9UT19JRFgocykJKChzKSAmIDB4ZmYpCisjZGVmaW5lIElEWF9UT19TRVEoaSkJKChpKSAmIDB4ZmYpCiAjZGVmaW5lIFNFUV9IVUdFX0ZSQU1FCWNwdV90b19sZTE2KDB4NDAwMCkKICNkZWZpbmUgU0VRX1JYX0ZSQU1FCWNwdV90b19sZTE2KDB4ODAwMCkKIAogLyoqCi0gKiBzdHJ1Y3QgaXdsX2NtZF9oZWFkZXIKKyAqIHN0cnVjdCBpbF9jbWRfaGVhZGVyCiAgKgogICogVGhpcyBoZWFkZXIgZm9ybWF0IGFwcGVhcnMgaW4gdGhlIGJlZ2lubmluZyBvZiBlYWNoIGNvbW1hbmQgc2VudCBmcm9tIHRoZQogICogZHJpdmVyLCBh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DMyLWJpdHMgb2YgVFNGICovCi0JX19sZTMyIHN0YXR1czsJCS8qIHNlZSBpd2xfbWVhc3VyZW1lbnRfc3RhdHVzICovCisJX19sZTMyIHN0YXR1czsJCS8qIHNlZSBpbF9tZWFzdXJlbWVudF9zdGF0dXMgKi8KIH0gX19wYWNrZWQ7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTIyNjAsMTAgKzIyNDEsMTAgQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogLyoqCi0gKiBzdHJ1Y3QgaXdsX3Bvd2VydGFibGVfY21kIC0gUG93ZXIgVGFibGUgQ29tbWFuZAorICogc3RydWN0IGlsX3Bvd2VydGFibGVfY21kIC0gUG93ZXIgVGFibGUgQ29tbWFuZAogICogQGZsYWdzOiBTZWUgYmVsb3c6CiAgKgotICogUE9XRVJfVEFCTEVfQ01EID0gMHg3NyAoY29tbWFuZCwgaGFzIHNpbXBsZSBnZW5lcmljIHJlc3BvbnNlKQorICogQ19QT1dFUl9UQkwgPSAweDc3IChjb21tYW5kLCBoYXMgc2ltcGxlIGdlbmVyaWMgcmVzcG9uc2UpCiAgKgogICogUE0gYWxsb3c6CiAgKiAgIGJpdCAwIC0gJzAnIERyaXZlciBub3QgYWxsb3cgcG93ZXIgbWFuYWdlbWVudApAQCAtMjI5MCwzOCArMjI3MSwzOCBAQAogICogICAgICAgICAgICAgICcxMCcgZm9yY2UgeHRhbCBzbGVlcAogICogICAgICAgICAgICAgICcxMScgSWxsZWdhbCBzZXQKICAqCi0gKiBOT1RFOiBpZiBzbGVlcF9pbnRlcnZhbFtTTEVFUF9JTlRSVkxfVEFCTEVfU0laRS0xXSA+IERUSU0gcGVyaW9kIHRoZW4KKyAqIE5PVEU6IGlmIHNsZWVwX2ludGVydm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CRVJfT0ZfU1RBVElTVElDU107CisJX19sZTMyIHN0YXRzW05VTUJFUl9PRl9TVEFUU107CiB9IF9fcGFja2VkOwogCiAvKgotICogU0NBTl9DT01QTEVURV9OT1RJRklDQVRJT04gPSAweDg0IChub3RpZmljYXRpb24gb25seSwgbm90IGEgY29tbWFuZCkKKyAqIE5fU0NBTl9DT01QTEVURSA9IDB4ODQgKG5vdGlmaWNhdGlvbiBvbmx5LCBub3QgYSBjb21tYW5kKQogICovCi1zdHJ1Y3QgaXdsX3NjYW5jb21wbGV0ZV9ub3RpZmljYXRpb24geworc3RydWN0IGlsX3NjYW5jb21wbGV0ZV9ub3RpZmljYXRpb24gewogCXU4IHNjYW5uZWRfY2hhbm5lbHM7CiAJdTggc3RhdHVzOwogCXU4IGxhc3RfY2hhbm5lbDsKQEAgLTI2NTEsNTAgKzI2MzIsNDkgQEAKIAlfX2xlMzIgdHNmX2hpZ2g7CiB9IF9fcGFja2VkOwogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqICg5KQogICogSUJTUy9BUCBDb21tYW5kcyBhbmQgTm90aWZpY2F0aW9uczoKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWVudW0gaXdsX2lic3NfbWFuYWdlciB7Ci0JSVdMX05PVF9JQlNTX01BTkFHRVIgPSAwLAotCUlXTF9JQlNTX01BTkFHRVIgPSAxLAorZW51bSBpbF9pYnNzX21hbmFnZXIgeworCUlMX05PVF9JQlNTX01BTkFHRVIgPSAwLAorCUlMX0lCU1NfTUFOQUdFUiA9IDEsCiB9OwogCiAvKgotICogQkVBQ09OX05PVElGSUNBVElPTiA9IDB4OTAgKG5vdGlmaWNhdGlvbiBvbmx5LCBub3QgYSBjb21tYW5kKQorICogTl9CRUFDT04gPSAweDkw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VEhSRVNIT0xEX0RFRgogCi1zdHJ1Y3QgaXdsX21pc3NlZF9iZWFjb25fbm90aWYgeworc3RydWN0IGlsX21pc3NlZF9iZWFjb25fbm90aWYgewogCV9fbGUzMiBjb25zZWN1dGl2ZV9taXNzZWRfYmVhY29uczsKIAlfX2xlMzIgdG90YWxfbWlzc2VkX2JlY29uczsKIAlfX2xlMzIgbnVtX2V4cGVjdGVkX2JlYWNvbnM7CiAJX19sZTMyIG51bV9yZWN2ZF9iZWFjb25zOwogfSBfX3BhY2tlZDsKIAotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiAoMTEpCiAgKiBSeCBDYWxpYnJhdGlvbiBDb21tYW5kczoKQEAgLTMwNjIsNyArMzA0MCw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIC8qKgotICogU0VOU0lUSVZJVFlfQ01EID0gMHhhOCAoY29tbWFuZCwgaGFzIHNpbXBsZSBnZW5lcmljIHJlc3BvbnNlKQorICogQ19TRU5TSVRJVklUWSA9IDB4YTggKGNvbW1hbmQsIGhhcyBzaW1wbGUgZ2VuZXJpYyByZXNwb25zZSkKICAqCiAgKiBUaGlzIGNvbW1hbmQgc2V0cyB1cCB0aGUgUnggc2lnbmFsIGRldGVjdG9yIGZvciBhIHNlbnNpdGl2aXR5IGxldmVsIHRoYXQKICAqIGlzIGhpZ2ggZW5vdWdoIHRvIGxvY2sgb250byBhbGwgc2lnbmFscyB3aXRoaW4gdGhlIGFzc29jaWF0ZWQgbmV0d29yaywKQEAgLTMwNzYsMTIgKzMwNTQsMTIgQEAKICAqIHRpbWUgbGlzdGVuaW5nLCBub3QgdHJhbnNtaXR0aW5nKS4gIERyaXZlciBtdXN0IGFkanVzdCBzZW5zaXRpdml0eSBzbyB0aGF0CiAgK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yBzdXJlIHRoYXQgdGhlIHZhbHVlCi0gKiAgIGluIEhEX01JTl9FTkVSR1lfQ0NLX0RFVF9JTkRFWCBpcyBhdCBvciAqYWJvdmUqICJNYXggY2NrIGVuZXJneSIuCisgKiAgIGluIEhEX01JTl9FTkVSR1lfQ0NLX0RFVF9JRFggaXMgYXQgb3IgKmFib3ZlKiAiTWF4IGNjayBlbmVyZ3kiLgogICoKICAqLwogCiAvKgotICogVGFibGUgZW50cmllcyBpbiBTRU5TSVRJVklUWV9DTUQgKHN0cnVjdCBpd2xfc2Vuc2l0aXZpdHlfY21kKQorICogVGFibGUgZW50cmllcyBpbiBDX1NFTlNJVElWSVRZIChzdHJ1Y3QgaWxfc2Vuc2l0aXZpdHlfY21kKQogICovCi0jZGVmaW5lIEhEX1RBQkxFX1NJWkUgICgxMSkJLyogbnVtYmVyIG9mIGVudHJpZXMgKi8KLSNkZWZpbmUgSERfTUlOX0VORVJHWV9DQ0tfREVUX0lOREVYICAgICAgICAgICAgICAgICAoMCkJLyogdGFibGUgaW5kZXhlcyAqLwotI2RlZmluZSBIRF9NSU5fRU5FUkdZX09GRE1fREVUX0lOREVYICAgICAgICAgICAgICAgICgxKQotI2RlZmluZSBIRF9BVVRPX0NPUlIzMl9YMV9USF9BRERfTUlOX0lOREVYICAgICAgICAgICgyKQotI2RlZmluZSBIRF9BVVRPX0NPUlIzMl9YMV9USF9BRERfTUlOX01SQ19JTkRFWCAgICAgICgzKQotI2RlZmluZSBIRF9BVVRPX0NPUlI0MF9YNF9USF9BRERfTUlOX01SQ19JTkRFWCAgICAgICg0KQotI2RlZmluZSBIRF9BVVRPX0NPUlIzMl9YNF9USF9BRERfTUlOX0lOREVYICAgICAgICAgICg1KQotI2RlZmluZSBIRF9BVVRPX0NPUlIzMl9YNF9USF9BRERfTUlOX01SQ19JTkRFWCAgICAgICg2KQotI2RlZmluZSBIRF9CQVJLRVJfQ09SUl9USF9BRERfTUlOX0lOREVYICAgICAgICAgICAgICg3KQotI2RlZmluZSBIRF9CQVJLRVJfQ09SUl9USF9BRERfTUlOX01SQ19JTkRFWCAgICAgICAgICg4KQotI2RlZmluZSBIRF9BVVRPX0NPUlI0MF9YNF9USF9BRERfTUlOX0lOREVYICAgICAgICAgICg5KQotI2RlZmluZSBIRF9PRkRNX0VORVJHWV9USF9JTl9JTkRFWCAgICAgICAgICAgICAgICAgICgxMCkKKyNkZWZpbmUgSERfVEJMX1NJWkUgICgxMSkJLyogbnVtYmVyIG9mIGVudHJpZXMgKi8KKyNkZWZpbmUgSERfTUlOX0VORVJHWV9DQ0tfREVUX0lEWCAgICAgICAgICAgICAgICAgKDApCS8qIHRhYmxlIGlkeGVzICovCisjZGVmaW5lIEhEX01JTl9FTkVSR1lfT0ZETV9ERVRfSURYICAgICAgICAgICAgICAgICgxKQorI2RlZmluZSBIRF9BVVRPX0NPUlIzMl9YMV9USF9BRERfTUlOX0lEWCAgICAgICAgICAoMikKKyNkZWZpbmUgSERfQVVUT19DT1JSMzJfWDFfVEhfQUREX01JTl9NUkNfSURYICAgICAgKDMpCisjZGVmaW5lIEhEX0FVVE9fQ09SUjQwX1g0X1RIX0FERF9NSU5fTVJDX0lEWCAgICAgICg0KQorI2RlZmluZSBIRF9BVVRPX0NPUlIzMl9YNF9USF9BRERfTUlOX0lEWCAgICAgICAgICAoNSkKKyNkZWZpbmUgSERfQVVUT19DT1JSMzJfWDRfVEhfQUREX01JTl9NUkNfSURYICAgICAgKDYpCisjZGVmaW5lIEhEX0JBUktFUl9DT1JSX1RIX0FERF9NSU5fSURYICAgICAgICAgICAgICg3KQorI2RlZmluZSBIRF9CQVJLRVJfQ09SUl9USF9BRERfTUlOX01SQ19JRFggICAgICAgICAoOCkKKyNkZWZpbmUgSERfQVVUT19DT1JSNDBfWDRfVEhfQUREX01JTl9JRFggICAgICAgICAgKDkpCisjZGVmaW5lIEhEX09GRE1fRU5FUkdZX1RIX0lOX0lEWCAgICAgICAgICAgICAgICAgICgxMCkKIAotLyogQ29udHJvbCB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bF9lZXByb21fYmFuZF8zW10gPSB7CS8qIDUxNzAtNTMyME1IeiAqLworCTM0LCAzNiwgMzgsIDQwLCA0MiwgNDQsIDQ2LCA0OCwgNTIsIDU2LCA2MCwgNjQKK307CisKK3N0YXRpYyBjb25zdCB1OCBpbF9lZXByb21fYmFuZF80W10gPSB7CS8qIDU1MDAtNTcwME1IeiAqLworCTEwMCwgMTA0LCAxMDgsIDExMiwgMTE2LCAxMjAsIDEyNCwgMTI4LCAxMzIsIDEzNiwgMTQwCit9OworCitzdGF0aWMgY29uc3QgdTggaWxfZWVwcm9tX2JhbmRfNVtdID0gewkvKiA1NzI1LTU4MjVNSHogKi8KKwkxNDUsIDE0OSwgMTUzLCAxNTcsIDE2MSwgMTY1Cit9OworCitzdGF0aWMgY29uc3QgdTggaWxfZWVwcm9tX2JhbmRfNltdID0gewkvKiAyLjQgaHQ0MCBjaGFubmVsICovCisJMSwgMiwgMywgNCwgNSwgNiwgNworfTsKKworc3RhdGljIGNvbnN0IHU4IGlsX2VlcHJvbV9iYW5kXzdbXSA9IHsJLyogNS4yIGh0NDAgY2hhbm5lbCAqLworCTM2LCA0NCwgNTIsIDYwLCAxMDAsIDEwOCwgMTE2LCAxMjQsIDEzMiwgMTQ5LCAxNTcKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBFRVBST00gcmVsYXRlZCBmdW5jdGlvbnMKKyAqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQKK2lsX2VlcHJvbV92ZXJpZnlfc2lnbmF0dXJlKHN0cnVjdCBpbF9wcml2ICppbCkKK3sKKwl1MzIgZ3AgPSBfaWxfcmQoaWwsIENTUl9FRVBST01fR1ApICYgQ1NSX0VFUFJPTV9HUF9WQUxJRF9NU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GludCBzbG90c19udW0sCisJCSAgICAgdTMyIHR4cV9pZCk7Cit2b2lkIGlsX3R4X3F1ZXVlX3Jlc2V0KHN0cnVjdCBpbF9wcml2ICppbCwgc3RydWN0IGlsX3R4X3F1ZXVlICp0eHEsCisJCSAgICAgICBpbnQgc2xvdHNfbnVtLCB1MzIgdHhxX2lkKTsKK3ZvaWQgaWxfdHhfcXVldWVfdW5tYXAoc3RydWN0IGlsX3ByaXYgKmlsLCBpbnQgdHhxX2lkKTsKK3ZvaWQgaWxfdHhfcXVldWVfZnJlZShzdHJ1Y3QgaWxfcHJpdiAqaWwsIGludCB0eHFfaWQpOwordm9pZCBpbF9zZXR1cF93YXRjaGRvZyhzdHJ1Y3QgaWxfcHJpdiAqaWwpOworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBUWCBwb3dlcgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgaWxfc2V0X3R4X3Bvd2VyKHN0cnVjdCBpbF9wcml2ICppbCwgczggdHhfcG93ZXIsIGJvb2wgZm9yY2UpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUmF0ZQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordTggaWxfZ2V0X2xvd2VzdF9wbGNwKHN0cnVjdCBpbF9wcml2ICppbCwgc3RydWN0IGlsX3J4b25fY29udGV4dCAqY3R4KTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFNjYW5uaW5nCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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QgYnVmc3ogPSAzMCArIHNpemVvZihjaGFyKSAqIDUwMCAqIChpbC0+bnVtX3N0YXRpb25zKTsKKworCWJ1ZiA9IGttYWxsb2MoYnVmc3osIEdGUF9LRVJORUwpOworCWlmICghYnVmKQorCQlyZXR1cm4gLUVOT01FTTsKKworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgIm51bSBvZiBzdGF0aW9uczogJWRcblxuIiwKKwkJICAgICAgaWwtPm51bV9zdGF0aW9ucyk7CisKKwlmb3IgKGkgPSAwOyBpIDwgbWF4X3N0YTsgaSsrKSB7CisJCXN0YXRpb24gPSAmaWwtPnN0YXRpb25zW2ldOworCQlpZiAoIXN0YXRpb24tPnVzZWQpCisJCQljb250aW51ZTsKKwkJcG9zICs9CisJCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywKKwkJCSAgICAgICJzdGF0aW9uICVkIC0gYWRkcjogJXBNLCBmbGFnczogJSN4XG4iLCBpLAorCQkJICAgICAgc3RhdGlvbi0+c3RhLnN0YS5hZGRyLAorCQkJICAgICAgc3RhdGlvbi0+c3RhLnN0YXRpb25fZmxhZ3NfbXNrKTsKKwkJcG9zICs9CisJCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywKKwkJCSAgICAgICJUSURcdHNlcV9udW1cdHR4cV9pZFx0ZnJhbWVzXHR0ZmRzXHQiKTsKKwkJcG9zICs9CisJCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywKKwkJCSAgICAgICJzdGFydF9pZHhcdGJpdG1hcFx0XHRcdHJhdGVfbl9mbGFnc1xuIik7CisKKwkJZm9yIChqID0gMDsgaiA8IE1BWF9USURfQ09VTlQ7IGorKykgeworCQkJcG9zICs9CisJCQkgICAgc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsCisJCQkJICAgICAgIiVkOlx0JSN4XHQlI3hcdCV1X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ldVxuIiwKKwkJICAgICAgZGF0YS0+Y2hhaW5fc2lnbmFsX2EpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgImNoYWluX3NpZ25hbF9iOlx0XHRcdCAldVxuIiwKKwkJICAgICAgZGF0YS0+Y2hhaW5fc2lnbmFsX2IpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgImNoYWluX3NpZ25hbF9jOlx0XHRcdCAldVxuIiwKKwkJICAgICAgZGF0YS0+Y2hhaW5fc2lnbmFsX2MpOworCXBvcyArPQorCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgImJlYWNvbl9jb3VudDpcdFx0XHQgJXVcbiIsCisJCSAgICAgIGRhdGEtPmJlYWNvbl9jb3VudCk7CisKKwlwb3MgKz0gc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsICJkaXNjb25uX2FycmF5Olx0XHRcdCIpOworCWZvciAoY250ID0gMDsgY250IDwgTlVNX1JYX0NIQUlOUzsgY250KyspIHsKKwkJcG9zICs9CisJCSAgICBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgIiAldSIsCisJCQkgICAgICBkYXRhLT5kaXNjb25uX2FycmF5W2NudF0pOworCX0KKwlwb3MgKz0gc2NucHJpbnRmKGJ1ZiArIHBvcywgYnVmc3ogLSBwb3MsICJcbiIpOworCXBvcyArPSBzY25wcmludGYoYnVmICsgcG9zLCBidWZzeiAtIHBvcywgImRlbHRhX2dhaW5fY29kZTpcdFx0Iik7CisJZm9yIChjbnQgPSAwOyBjbnQgPCBOVU1fUlhfQ0hBSU5TOyBjbnQrKykgeworCQlwb3MgKz0KKwkJICAgIHNjbnByaW50ZihidWYgKyBwb3MsIGJ1ZnN6IC0gcG9zLCAiICV1IiwKKwkJCSAgICAgIGRhdGEtPmRlbHRhX2dhaW5fY29kZVtjbnRdKTsKKw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3RhdHVzLT5ydHNfcmV0cnlfY291bnQgPSB0eF9yZXNwLT5mYWlsdXJlX3J0czsgKi8KLQlpbmZvLT5mbGFncyB8PSAoKHN0YXR1cyAmIFRYX1NUQVRVU19NU0spID09IFRYX1NUQVRVU19TVUNDRVNTKSA/Ci0JCQkJSUVFRTgwMjExX1RYX1NUQVRfQUNLIDogMDsKLQotCUlXTF9ERUJVR19UWChwcml2LCAiVHggcXVldWUgJWQgU3RhdHVzICVzICgweCUwOHgpIHBsY3AgcmF0ZSAlZCByZXRyaWVzICVkXG4iLAotCQkJdHhxX2lkLCBpd2wzOTQ1X2dldF90eF9mYWlsX3JlYXNvbihzdGF0dXMpLCBzdGF0dXMsCi0JCQl0eF9yZXNwLT5yYXRlLCB0eF9yZXNwLT5mYWlsdXJlX2ZyYW1lKTsKLQotCUlXTF9ERUJVR19UWF9SRVBMWShwcml2LCAiVHggcXVldWUgcmVjbGFpbSAlZFxuIiwgaW5kZXgpOwotCWl3bDM5NDVfdHhfcXVldWVfcmVjbGFpbShwcml2LCB0eHFfaWQsIGluZGV4KTsKLQotCWlmIChzdGF0dXMgJiBUWF9BQk9SVF9SRVFVSVJFRF9NU0spCi0JCUlXTF9FUlIocHJpdiwgIlRPRE86ICBJbXBsZW1lbnQgVHggQUJPUlQgUkVRVUlSRUQhISFcbiIpOwotfQotCi0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogSW50ZWwgUFJPL1dpcmVsZXNzIDM5NDVBQkcvQkcgTmV0d29yayBDb25uZWN0aW9uCi0gKgotICogIFJYIGhhbmRsZXIgaW1wbGVtZW50YXRpb25zCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2lmZGVmIENPTkZJR19JV0xXSUZJX0xFR0FDWV9ERUJVR0ZTC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SAiaXdsLTQ5NjUtY2FsaWIuaCIKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBJTklUIGNhbGlicmF0aW9ucyBmcmFtZXdvcmsKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RydWN0IHN0YXRpc3RpY3NfZ2VuZXJhbF9kYXRhIHsKLQl1MzIgYmVhY29uX3NpbGVuY2VfcnNzaV9hOwotCXUzMiBiZWFjb25fc2lsZW5jZV9yc3NpX2I7Ci0JdTMyIGJlYWNvbl9zaWxlbmNlX3Jzc2lfYzsKLQl1MzIgYmVhY29uX2VuZXJneV9hOwotCXUzMiBiZWFjb25fZW5lcmd5X2I7Ci0JdTMyIGJlYWNvbl9lbmVyZ3lfYzsKLX07Ci0KLXZvaWQgaXdsNDk2NV9jYWxpYl9mcmVlX3Jlc3VsdHMoc3RydWN0IGl3bF9wcml2ICpwcml2KQotewotCWludCBpOwotCi0JZm9yIChpID0gMDsgaSA8IElXTF9DQUxJQl9NQVg7IGkrKykgewotCQlrZnJlZShwcml2LT5jYWxpYl9yZXN1bHRzW2ldLmJ1Zik7Ci0JCXByaXYtPmNhbGliX3Jlc3VsdHNbaV0uYnVmID0gTlVMTDsKLQkJcHJpdi0+Y2FsaWJfcmVzdWx0c1tpXS5idWZfbGVuID0gMDsKLQl9Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUlVOVElNRSBjYWxpYnJhdGlvbnMgZnJhbWV3b3JrCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qICJmYWxzZSBhbGFybXMiIG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lVQVElPTikgSE9XRVZFUiBDQVVTRUQgQU5EIE9OIEFOWQotICogVEhFT1JZIE9GIExJQUJJTElUWSwgV0hFVEhFUiBJTiBDT05UUkFDVCwgU1RSSUNUIExJQUJJTElUWSwgT1IgVE9SVAotICogKElOQ0xVRElORyBORUdMSUdFTkNFIE9SIE9USEVSV0lTRSkgQVJJU0lORyBJTiBBTlkgV0FZIE9VVCBPRiBUSEUgVVNFCi0gKiBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQgT0YgVEhFIFBPU1NJQklMSVRZIE9GIFNVQ0ggREFNQUdFLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0KLSNpbmNsdWRlIDxsaW51eC9rZXJuZWwuaD4KLSNpbmNsdWRlIDxsaW51eC9tb2R1bGUuaD4KLSNpbmNsdWRlIDxsaW51eC9zbGFiLmg+Ci0jaW5jbHVkZSA8bGludXgvaW5pdC5oPgotCi0jaW5jbHVkZSA8bmV0L21hYzgwMjExLmg+Ci0KLSNpbmNsdWRlICJpd2wtY29tbWFuZHMuaCIKLSNpbmNsdWRlICJpd2wtZGV2LmgiCi0jaW5jbHVkZSAiaXdsLWNvcmUuaCIKLSNpbmNsdWRlICJpd2wtZGVidWcuaCIKLSNpbmNsdWRlICJpd2wtNDk2NS5oIgotI2luY2x1ZGUgIml3bC1pby5oIgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRUVQUk9NIHJlbGF0ZWQgZnVuY3Rpb25zCi0gKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKgotICogVGhlIGRldmljZSdzIEVFUFJPTSBzZW1hcGhvcmUgcHJldmVudHMgY29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IG9mICI0MCIKLSAqIGNvcnJlc3BvbmRzIHRvIHRoZSA0OXRoIGVudHJ5IGluIHRoZSB0YWJsZSB1c2VkIGJ5IHRoZSBkcml2ZXIuCi0gKi8KLSNkZWZpbmUgTUlOX1RYX0dBSU5fSU5ERVgJCSgwKSAgLyogaGlnaGVzdCBnYWluLCBsb3dlc3QgaWR4LCAyLjQgKi8KLSNkZWZpbmUgTUlOX1RYX0dBSU5fSU5ERVhfNTJHSFpfRVhUCSgtOSkgLyogaGlnaGVzdCBnYWluLCBsb3dlc3QgaWR4LCA1ICovCi0KLS8qKgotICogMi40IEdIeiBnYWluIHRhYmxlCi0gKgotICogSW5kZXggICAgRHNwIGdhaW4gICBSYWRpbyBnYWluCi0gKiAgIDAgICAgICAgIDExMCAgICAgICAgIDB4M2YgICAgICAoaGlnaGVzdCBnYWluKQotICogICAxICAgICAgICAxMDQgICAgICAgICAweDNmCi0gKiAgIDIgICAgICAgICA5OCAgICAgICAgIDB4M2YKLSAqICAgMyAgICAgICAgMTEwICAgICAgICAgMHgzZQotICogICA0ICAgICAgICAxMDQgICAgICAgICAweDNlCi0gKiAgIDUgICAgICAgICA5OCAgICAgICAgIDB4M2UKLSAqICAgNiAgICAgICAgMTEwICAgICAgICAgMHgzZAotICogICA3ICAgICAgICAxMDQgICAgICAgICAweDNkCi0gKiAgIDggICAgICAgICA5OCAgICAgICAgIDB4M2QKLSAqICAgOSAgICAgICAgMTEwICAgICAgICAgMHgzYwotICogIDEwICAgICAgICAxMDQgICAgICAgICAweDNjCi0gKiAgMTEgICAgICAgICA5OCAgICAgICAgIDB4M2MKLSAqICAxMiAgICAgICAgMTEwICAgICAgICAgMHgzYgotICogIDEzICAgICAgICAxMDQgICAgICAgICAweDNiCi0gKiAgMTQgICAgICAgICA5OCAgICAgICAgIDB4M2IKLSAqICAxNSAgICAgICAgMTEwICAgICAgICAgMHgzYQotICogIDE2ICAgICAgICAxMDQgICAgICAgICAweDNhCi0gKiAgMTcgICAgICAgICA5OCAgICAgICAgIDB4M2EKLSAqICAxOCAgICAgICAgMTEwICAgICAgICAgMHgzOQotICogIDE5ICAgICAgICAxMDQgICAgICAgICAweDM5Ci0gKiAgMjAgICAgICAgICA5OCAgICAgICAgIDB4MzkKLSAqICAyMSAgICAgICAgMTEwICAgICAgICAgMHgzOAotICogIDIyICAgICAgICAxMDQgICAgICAgICAweDM4Ci0gKiAgMjMgICAgICAgICA5OCAgICAgICAgIDB4MzgKLSAqICAyNCAgICAgICAgMTEwICAgICAgICAgMHgzNwotICogIDI1ICAgICAgICAxMDQgICAgICAgICAweDM3Ci0gKiAgMjYgICAgICAgICA5OCAgICAgICAgIDB4MzcKLSAqICAyNyAgICAgICAgMTEwICAgICAgICAgMHgzNgotICogIDI4ICAgICAgICAxMDQgICAgICAgICAweDM2Ci0gKiAgMjkgICAgICAgICA5OCAgICAgICAgIDB4MzYKLSAqICAzMCAgICAgICAgMTEwICAgICAgICAgMHgzNQotICogIDMxICAgICAgICAxMDQgICAgICAgICAweDM1Ci0gKiAgMzIgICAgICAgICA5OCAgICAgICAgIDB4MzUKLSAqICAzMyAgICAgICAgMTEwICAgICAgICAgMHgzNAotICogIDM0ICAgICAgICAxMDQgICAgICAgICAweDM0Ci0gKiAgMzUgICAgICAgICA5OCAgICAgICAgIDB4MzQKLSAqICAzNiAgICAgICAgMTEwICAgICAgICAgMHgzMwotICogIDM3ICAgICAgICAxMDQgICAgICAgICAweDMzCi0gKiAgMzggICAgICAgICA5OCAgICAgICAgIDB4MzMKLSAqICAzOSAgICAgICAgMTEwICAgICAgICAgMHgzMgotICogIDQwICAgICAgICAxMDQgICAgICAgICAweDMyCi0gKiAgNDEgICAgICAgICA5OCAgICAgICAgIDB4MzIKLSAqICA0MiAgICAgICAgMTEwICAgICAgICAgMHgzMQotICogIDQzICAgICAgICAxMDQgICAgICAgICAweDMxCi0gKiAgNDQgICAgICAgICA5OCAgICAgICAgIDB4MzEKLSAqICA0NSAgICAgICAgMTEwICAgICAgICAgMHgzMAotICogIDQ2ICAgICAgICAxMDQgICAgICAgICAweDMwCi0gKiAgNDcgICAgICAgICA5OCAgICAgICAgIDB4MzAKLSAqICA0OCAgICAgICAgMTEwICAgICAgICAgIDB4NgotICogIDQ5ICAgICAgICAxMDQgICAgICAgICAgMHg2Ci0gKiAgNTAgICAgICAgICA5OCAgICAgICAgICAweDYKLSAqICA1MSAgICAgICAgMTEwICAgICAgICAgIDB4NQotICogIDUyICAgICAgICAxMDQgICAgICAgICAgMHg1Ci0gKiAgNTMgICAgICAgICA5OCAgICAgICAgICAweDUKLSAqICA1NCAgICAgICAgMTEwICAgICAgICAgIDB4NAotICogIDU1ICAgICAgICAxMDQgICAgICAgICAgMHg0Ci0gKiAgNTYgICAgICAgICA5OCAgICAgICAgICAweDQKLSAqICA1NyAgICAgICAgMTEwICAgICAgICAgIDB4MwotICogIDU4ICAgICAgICAxMDQgICAgICAgICAgMHgzCi0gKiAgNTkgICAgICAgICA5OCAgICAgICAgICAweDMKLSAqICA2MCAgICAgICAgMTEwICAgICAgICAgIDB4MgotICogIDYxICAgICAgICAxMDQgICAgICAgICAgMHgyCi0gKiAgNjIgICAgICAgICA5OCAgICAgICAgICAweDIKLSAqICA2MyAgICAgICAgMTEwICAgICAgICAgIDB4MQotICogIDY0ICAgICAgICAxMDQgICAgICAgICAgMHgxCi0gKiAgNjUgICAgICAgICA5OCAgICAgICAgICAweDEKLSAqICA2NiAgICAgICAgMTEwICAgICAgICAgIDB4MAotICogIDY3ICAgICAgICAxMDQgICAgICAgICAgMHgwCi0gKiAgNjggICAgICAgICA5OCAgICAgICAgICAweDAKLSAqICA2OSAgICAgICAgIDk3ICAgICAgICAgICAgMAotICogIDcwICAgICAgICAgOTYgICAgICAgICAgICAwCi0gKiAgNzEgICAgICAgICA5NSAgICAgICAgICAgIDAKLSAqICA3MiAgICAgICAgIDk0ICAgICAgICAgICAgMAotICogIDczICAgICAgICAgOTMgICAgICAgICAgICAwCi0gKiAgNzQgICAgICAgICA5MiAgICAgICAgICAgIDAKLSAqICA3NSAgICAgICAgIDkxICAgICAgICAgICAgMAotICogIDc2ICAgICAgICAgOTAgICAgICAgICAgICAwCi0gKiAgNzcgICAgICAgICA4OSAgICAgICAgICAgIDAKLSAqICA3OCAgICAgICAgIDg4ICAgICAgICAgICAgMAotICogIDc5ICAgICAgICAgODcgICAgICAgICAgICAwCi0gKiAgODAgICAgICAgICA4NiAgICAgICAgICAgIDAKLSAqICA4MSAgICAgICAgIDg1ICAgICAgICAgICAgMAotICogIDgyICAgICAgICAgODQgICAgICAgICAgICAwCi0gKiAgODMgICAgICAgICA4MyAgICAgICAgICAgIDAKLSAqICA4NCAgICAgICAgIDgyICAgICAgICAgICAgMAotICogIDg1ICAgICAgICAgODEgICAgICAgICAgICAwCi0gKiAgODYgICAgICAgICA4MCAgICAgICAgICAgIDAKLSAqICA4NyAgICAgICAgIDc5ICAgICAgICAgICAgMAotICogIDg4ICAgICAgICAgNzggICAgICAgICAgICAwCi0gKiAgODkgICAgICAgICA3NyAgICAgICAgICAgIDAKLSAqICA5MCAgICAgICAgIDc2ICAgICAgICAgICAgMAotICogIDkxICAgICAgICAgNzUgICAgICAgICAgICAwCi0gKiAgOTIgICAgICAgICA3NCAgICAgICAgICAgIDAKLSAqICA5MyAgICAgICAgIDczICAgICAgICAgICAgMAotICogIDk0ICAgICAgICAgNzIgICAgICAgICAgICAwCi0gKiAgOTUgICAgICAgICA3MSAgICAgICAgICAgIDAKLSAqICA5NiAgICAgICAgIDcwICAgICAgICAgICAgMAotICogIDk3ICAgICAgICAgNjkgICAgICAgICAgICAwCi0gKiAgOTggICAgICAgICA2OCAgICAgICAgICAgIDAKLSAqLwotCi0vKioKLSAqIDUgR0h6IGdhaW4gdGFibGUKLSAqCi0gKiBJbmRleCAgICBEc3AgZ2FpbiAgIFJhZGlvIGdhaW4KLSAqICAtOSAJICAgICAgMTIzICAgICAgICAgMHgzRiAgICAgIChoaWdoZXN0IGdhaW4pCi0gKiAgLTggCSAgICAgIDExNyAgICAgICAgIDB4M0YKLSAqICAtNyAgICAgICAgMTEwICAgICAgICAgMHgzRgotICogIC02ICAgICAgICAxMDQgICAgICAgICAweDNGCi0gKiAgLTUgICAgICAgICA5OCAgICAgICAgIDB4M0YKLSAqICAtNCAgICAgICAgMTEwICAgICAgICAgMHgzRQotICogIC0zICAgICAgICAxMDQgICAgICAgICAweDNFCi0gKiAgLTIgICAgICAgICA5OCAgICAgICAgIDB4M0UKLSAqICAtMSAgICAgICAgMTEwICAgICAgICAgMHgzRAotICogICAwICAgICAgICAxMDQgICAgICAgICAweDNECi0gKiAgIDEgICAgICAgICA5OCAgICAgICAgIDB4M0QKLSAqICAgMiAgICAgICAgMTEwICAgICAgICAgMHgzQwotICogICAzICAgICAgICAxMDQgICAgICAgICAweDNDCi0gKiAgIDQgICAgICAgICA5OCAgICAgICAgIDB4M0MKLSAqICAgNSAgICAgICAgMTEwICAgICAgICAgMHgzQgotICogICA2ICAgICAgICAxMDQgICAgICAgICAweDNCCi0gKiAgIDcgICAgICAgICA5OCAgICAgICAgIDB4M0IKLSAqICAgOCAgICAgICAgMTEwICAgICAgICAgMHgzQQotICogICA5ICAgICAgICAxMDQgICAgICAgICAweDNBCi0gKiAgMTAgICAgICAgICA5OCAgICAgICAgIDB4M0EKLSAqICAxMSAgICAgICAgMTEwICAgICAgICAgMHgzOQotICogIDEyICAgICAgICAxMDQgICAgICAgICAweDM5Ci0gKiAgMTMgICAgICAgICA5OCAgICAgICAgIDB4MzkKLSAqICAxNCAgICAgICAgMTEwICAgICAgICAgMHgzOAotICogIDE1ICAgICAgICAxMDQgICAgICAgICAweDM4Ci0gKiAgMTYgICAgICAgICA5OCAgICAgICAgIDB4MzgKLSAqICAxNyAgICAgICAgMTEwICAgICAgICAgMHgzNwotICogIDE4ICAgICAgICAxMDQgICAgICAgICAweDM3Ci0gKiAgMTkgICAgICAgICA5OCAgICAgICAgIDB4MzcKLSAqICAyMCAgICAgICAgMTEwICAgICAgICAgMHgzNgotICogIDIxICAgICAgICAxMDQgICAgICAgICAweDM2Ci0gKiAgMjIgICAgICAgICA5OCAgICAgICAgIDB4MzYKLSAqICAyMyAgICAgICAgMTEwICAgICAgICAgMHgzNQotICogIDI0ICAgICAgICAxMDQgICAgICAgICAweDM1Ci0gKiAgMjUgICAgICAgICA5OCAgICAgICAgIDB4MzUKLSAqICAyNiAgICAgICAgMTEwICAgICAgICAgMHgzNAotICogIDI3ICAgICAgICAxMDQgICAgICAgICAweDM0Ci0gKiAgMjggICAgICAgICA5OCAgICAgICAgIDB4MzQKLSAqICAyOSAgICAgICAgMTEwICAgICAgICAgMHgzMwotICogIDMwICAgICAgICAxMDQgICAgICAgICAweDMzCi0gKiAgMzEgICAgICAgICA5OCAgICAgICAgIDB4MzMKLSAqICAzMiAgICAgICAgMTEwICAgICAgICAgMHgzMgotICogIDMzICAgICAgICAxMDQgICAgICAgICAweDMyCi0gKiAgMzQgICAgICAgICA5OCAgICAgICAgIDB4MzIKLSAqICAzNSAgICAgICAgMTEwICAgICAgICAgMHgzMQotICogIDM2ICAgICAgICAxMDQgICAgICAgICAweDMxCi0gKiAgMzcgICAgICAgICA5OCAgICAgICAgIDB4MzEKLSAqICAzOCAgICAgICAgMTEwICAgICAgICAgMHgzMAotICogIDM5ICAgICAgICAxMDQgICAgICAgICAweDMwCi0gKiAgNDAgICAgICAgICA5OCAgICAgICAgIDB4MzAKLSAqICA0MSAgICAgICAgMTEwICAgICAgICAgMHgyNQotICogIDQyICAgICAgICAxMDQgICAgICAgICAweDI1Ci0gKiAgNDMgICAgICAgICA5OCAgICAgICAgIDB4MjUKLSAqICA0NCAgICAgICAgMTEwICAgICAgICAgMHgyNAotICogIDQ1ICAgICAgICAxMDQgICAgICAgICAweDI0Ci0gKiAgNDYgICAgICAgICA5OCAgICAgICAgIDB4MjQKLSAqICA0NyAgICAgICAgMTEwICAgICAgICAgMHgyMwotICogIDQ4ICAgICAgICAxMDQgICAgICAgICAweDIzCi0gKiAgNDkgICAgICAgICA5OCAgICAgICAgIDB4MjMKLSAqICA1MCAgICAgICAgMTEwICAgICAgICAgMHgyMgotICogIDUxICAgICAgICAxMDQgICAgICAgICAweDE4Ci0gKiAgNTIgICAgICAgICA5OCAgICAgICAgIDB4MTgKLSAqICA1MyAgICAgICAgMTEwICAgICAgICAgMHgxNwotICogIDU0ICAgICAgICAxMDQgICAgICAgICAweDE3Ci0gKiAgNTUgICAgICAgICA5OCAgICAgICAgIDB4MTcKLSAqICA1NiAgICAgICAgMTEwICAgICAgICAgMHgxNgotICogIDU3ICAgICAgICAxMDQgICAgICAgICAweDE2Ci0gKiAgNTggICAgICAgICA5OCAgICAgICAgIDB4MTYKLSAqICA1OSAgICAgICAgMTEwICAgICAgICAgMHgxNQotICogIDYwICAgICAgICAxMDQgICAgICAgICAweDE1Ci0gKiAgNjEgICAgICAgICA5OCAgICAgICAgIDB4MTUKLSAqICA2MiAgICAgICAgMTEwICAgICAgICAgMHgxNAotICogIDYzICAgICAgICAxMDQgICAgICAgICAweDE0Ci0gKiAgNjQgICAgICAgICA5OCAgICAgICAgIDB4MTQKLSAqICA2NSAgICAgICAgMTEwICAgICAgICAgMHgxMwotICogIDY2ICAgICAgICAxMDQgICAgICAgICAweDEzCi0gKiAgNjcgICAgICAgICA5OCAgICAgICAgIDB4MTMKLSAqICA2OCAgICAgICAgMTEwICAgICAgICAgMHgxMgotICogIDY5ICAgICAgICAxMDQgICAgICAgICAweDA4Ci0gKiAgNzAgICAgICAgICA5OCAgICAgICAgIDB4MDgKLSAqICA3MSAgICAgICAgMTEwICAgICAgICAgMHgwNwotICogIDcyICAgICAgICAxMDQgICAgICAgICAweDA3Ci0gKiAgNzMgICAgICAgICA5OCAgICAgICAgIDB4MDcKLSAqICA3NCAgICAgICAgMTEwICAgICAgICAgMHgwNgotICogIDc1ICAgICAgICAxMDQgICAgICAgICAweDA2Ci0gKiAgNzYgICAgICAgICA5OCAgICAgICAgIDB4MDYKLSAqICA3NyAgICAgICAgMTEwICAgICAgICAgMHgwNQotICogIDc4ICAgICAgICAxMDQgICAgICAgICAweDA1Ci0gKiAgNzkgICAgICAgICA5OCAgICAgICAgIDB4MDUKLSAqICA4MCAgICAgICAgMTEwICAgICAgICAgMHgwNAotICogIDgxICAgICAgICAxMDQgICAgICAgICAweDA0Ci0gKiAgODIgICAgICAgICA5OCAgICAgICAgIDB4MDQKLSAqICA4MyAgICAgICAgMTEwICAgICAgICAgMHgwMwotICogIDg0ICAgICAgICAxMDQgICAgICAgICAweDAzCi0gKiAgODUgICAgICAgICA5OCAgICAgICAgIDB4MDMKLSAqICA4NiAgICAgICAgMTEwICAgICAgICAgMHgwMgotICogIDg3ICAgICAgICAxMDQgICAgICAgICAweDAyCi0gKiAgODggICAgICAgICA5OCAgICAgICAgIDB4MDIKLSAqICA4OSAgICAgICAgMTEwICAgICAgICAgMHgwMQotICogIDkwICAgICAgICAxMDQgICAgICAgICAweDAxCi0gKiAgOTEgICAgICAgICA5OCAgICAgICAgIDB4MDEKLSAqICA5MiAgICAgICAgMTEwICAgICAgICAgMHgwMAotICogIDkzICAgICAgICAxMDQgICAgICAgICAweDAwCi0gKiAgOTQgICAgICAgICA5OCAgICAgICAgIDB4MDAKLSAqICA5NSAgICAgICAgIDkzICAgICAgICAgMHgwMAotICogIDk2ICAgICAgICAgODggICAgICAgICAweDAwCi0gKiAgOTcgICAgICAgICA4MyAgICAgICAgIDB4MDAKLSAqICA5OCAgICAgICAgIDc4ICAgICAgICAgMHgwMAotICovCi0KLQotLyoqCi0gKiBTYW5pdHkgY2hlY2tzIGFuZCBkZWZhdWx0IHZhbHVlcyBmb3IgRUVQUk9NIHJlZ3VsYXRvcnkgbGV2ZWxzLgotICogSWYgRUVQUk9NIHZhbHVlcyBmYWxsIG91dHNpZGUgTUlOL01BWCByYW5nZSwgdXNlIGRlZmF1bHQgdmFsdWVzLgotICoKLSAqIFJlZ3VsYXRvcnkgbGltaXRzIHJlZmVyIHRvIHRoZSBtYXhpbXVtIGF2ZXJhZ2UgdHh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CQkJc3RydWN0IGl3bF90eF9xdWV1ZSAqdHhxLAotCQkJaW50IHNsb3RzX251bSwgdTMyIHR4cV9pZCk7Ci12b2lkIGl3bF9sZWdhY3lfdHhfcXVldWVfdW5tYXAoc3RydWN0IGl3bF9wcml2ICpwcml2LCBpbnQgdHhxX2lkKTsKLXZvaWQgaXdsX2xlZ2FjeV90eF9xdWV1ZV9mcmVlKHN0cnVjdCBpd2xfcHJpdiAqcHJpdiwgaW50IHR4cV9pZCk7Ci12b2lkIGl3bF9sZWdhY3lfc2V0dXBfd2F0Y2hkb2coc3RydWN0IGl3bF9wcml2ICpwcml2KTsKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogVFggcG93ZXIKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IGl3bF9sZWdhY3lfc2V0X3R4X3Bvd2VyKHN0cnVjdCBpd2xfcHJpdiAqcHJpdiwgczggdHhfcG93ZXIsIGJvb2wgZm9yY2UpOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogUmF0ZQotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotdTggaXdsX2xlZ2FjeV9nZXRfbG93ZXN0X3BsY3Aoc3RydWN0IGl3bF9wcml2ICpwcml2LAotCQkJICAgIHN0cnVjdCBpd2xfcnhvbl9jb250ZXh0ICpjdHgpOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogU2Nhbm5pbmcKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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otCi0jZGVmaW5lIERSVl9OQU1FICAgICAgICAiaXdsNDk2NSIKLQotI2luY2x1ZGUgIml3bC1lZXByb20uaCIKLSNpbmNsdWRlICJpd2wtZGV2LmgiCi0jaW5jbHVkZSAiaXdsLWNvcmUuaCIKLSNpbmNsdWRlICJpd2wtaW8uaCIKLSNpbmNsdWRlICJpd2wtaGVscGVycy5oIgotI2luY2x1ZGUgIml3bC1zdGEuaCIKLSNpbmNsdWRlICJpd2wtNDk2NS1jYWxpYi5oIgotI2luY2x1ZGUgIml3bC00OTY1LmgiCi0jaW5jbHVkZSAiaXdsLTQ5NjUtbGVkLmgiCi0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIG1vZHVsZSBib2lsZXIgcGxhdGUKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKgotICogbW9kdWxlIG5hbWUsIGNvcHlyaWdodCwgdmVyc2lvbiwgZXRjLgotICovCi0jZGVmaW5lIERSVl9ERVNDUklQVElPTgkiSW50ZWwoUikgV2lyZWxlc3MgV2lGaSA0OTY1IGRyaXZlciBmb3IgTGludXgiCi0KLSNpZmRlZiBDT05GSUdfSVdMV0lGSV9MRUdBQ1lfREVCVUcKLSNkZWZpbmUgVkQgImQiCi0jZWxzZQotI2RlZmluZSBWRAotI2VuZGlmCi0KLSNkZWZpbmUgRFJWX1ZFUlNJT04gICAgIElXTFdJRklfVkVSU0lPTiBWRAotCi0KLU1PRFVMRV9ERVNDUklQVElPTihEUlZfREVTQ1JJUFRJT04pOwotTU9EVUxFX1ZFUlNJT04oRFJWX1ZFUlNJT04pOwotTU9EVUxFX0FVVEhPUihEUlZfQ09QWVJJR0hUICIgIiBEUlZfQVVUSE9SKTsKLU1PRFVMRV9MSUNFTlNFKCJHUEwi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0KLQlzZXRfYml0KFNUQVRVU19FWElUX1BFTkRJTkcsICZwcml2LT5zdGF0dXMpOwotCV9faXdsNDk2NV9kb3duKHByaXYpOwotCWNsZWFyX2JpdChTVEFUVVNfRVhJVF9QRU5ESU5HLCAmcHJpdi0+c3RhdHVzKTsKLQotCS8qIHRyaWVkIHRvIHJlc3RhcnQgYW5kIGNvbmZpZyB0aGUgZGV2aWNlIGZvciBhcyBsb25nIGFzIG91cgotCSAqIHBhdGllbmNlIGNvdWxkIHdpdGhzdGFuZCAqLwotCUlXTF9FUlIocHJpdiwgIlVuYWJsZSB0byBpbml0aWFsaXplIGRldmljZSBhZnRlciAlZCBhdHRlbXB0cy5cbiIsIGkpOwotCXJldHVybiAtRUlPOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIFdvcmtxdWV1ZSBjYWxsYmFja3MKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXN0YXRpYyB2b2lkIGl3bDQ5NjVfYmdfaW5pdF9hbGl2ZV9zdGFydChzdHJ1Y3Qgd29ya19zdHJ1Y3QgKmRhdGEpCi17Ci0Jc3RydWN0IGl3bF9wcml2ICpwcml2ID0KLQkgICAgY29udGFpbmVyX29mKGRhdGEsIHN0cnVjdCBpd2xfcHJpdiwgaW5pdF9hbGl2ZV9zdGFydC53b3JrKTsKLQotCW11dGV4X2xvY2soJnByaXYtPm11dGV4KTsKLQlpZiAodGVzdF9iaXQoU1RBVFVTX0VYSVRfUEVORElORywgJnByaXYtPnN0YXR1cykpCi0JCWdvdG8gb3V0OwotCi0JcHJpdi0+Y2ZnLT5vcHMtPmxpYi0+aW5pdF9hbGl2ZV9zdGFydChwcml2KTsKLW91dDoKLQltdXRleF91bmxvY2soJnByaXYtPm11dGV4K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C0xNTU5LDExNzIgKzE0NTgsOCBAQAogCX0KIH0KIAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogbWFjODAyMTEgZW50cnkgcG9pbnQgZnVuY3Rpb25zCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1zdGF0aWMgY29uc3Qgc3RydWN0IGllZWU4MDIxMV9pZmFjZV9saW1pdCBpd2xhZ25fc3RhX2FwX2xpbWl0c1tdID0gewotCXsKLQkJLm1heCA9IDEsCi0JCS50eXBlcyA9IEJJVChOTDgwMjExX0lGVFlQRV9TVEFUSU9OKSwKLQl9LAotCXsKLQkJLm1heCA9IDEsCi0JCS50eXBlcyA9IEJJVChOTDgwMjExX0lGVFlQRV9BUCksCi0JfSwKLX07Ci0KLXN0YXRpYyBjb25zdCBzdHJ1Y3QgaWVlZTgwMjExX2lmYWNlX2xpbWl0IGl3bGFnbl8yc3RhX2xpbWl0c1tdID0gewotCXsKLQkJLm1heCA9IDIsCi0JCS50eXBlcyA9IEJJVChOTDgwMjExX0lGVFlQRV9TVEFUSU9OKSwKLQl9LAotfTsKLQotc3RhdGljIGNvbnN0IHN0cnVjdCBpZWVlODAyMTFfaWZhY2VfbGltaXQgaXdsYWduX3AycF9zdGFfZ29fbGltaXRzW10gPSB7Ci0JewotCQkubWF4ID0gMSwKLQkJLnR5cGVzID0gQklUKE5MODAyMTFfSUZUWVBFX1NUQVRJT04pLAotCX0sCi0JewotCQkubWF4ID0gMSwKLQkJLnR5cGVzID0gQklUKE5MODAyMTFfSUZUWVBFX1AyUF9HTykgfAotCQkJIEJJVChOTDgwMjExX0lGVFlQRV9BUCksCi0JfSwKLX07Ci0KLXN0YXRpYyBjb25zdCBzdHJ1Y3QgaWVlZTgwMjExX2lmYWNlX2xpbWl0IGl3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NpbmNsdWRlIDxsaW51eC9uZXRkZXZpY2UuaD4KKyNpbmNsdWRlIDxsaW51eC9maXJtd2FyZS5oPgorI2luY2x1ZGUgPGxpbnV4L2V0aGVyZGV2aWNlLmg+CisjaW5jbHVkZSA8bGludXgvaWZfYXJwLmg+CisKKyNpbmNsdWRlIDxuZXQvbWFjODAyMTEuaD4KKworI2luY2x1ZGUgPGFzbS9kaXY2NC5oPgorCisjaW5jbHVkZSAiaXdsLWVlcHJvbS5oIgorI2luY2x1ZGUgIml3bC13aWZpLmgiCisjaW5jbHVkZSAiaXdsLWRldi5oIgorI2luY2x1ZGUgIml3bC1jb3JlLmgiCisjaW5jbHVkZSAiaXdsLWlvLmgiCisjaW5jbHVkZSAiaXdsLWFnbi1jYWxpYi5oIgorI2luY2x1ZGUgIml3bC1hZ24uaCIKKyNpbmNsdWRlICJpd2wtc2hhcmVkLmgiCisjaW5jbHVkZSAiaXdsLWJ1cy5oIgorI2luY2x1ZGUgIml3bC10cmFucy5oIgorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBtYWM4MDIxMSBlbnRyeSBwb2ludCBmdW5jdGlvbnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgaWVlZTgwMjExX2lmYWNlX2xpbWl0IGl3bGFnbl9zdGFfYXBfbGltaXRzW10gPSB7CisJeworCQkubWF4ID0gMSwKKwkJLnR5cGVzID0gQklUKE5MODAyMTFfSUZUWVBFX1NUQVRJT04pLAorCX0sCisJeworCQkubWF4ID0gMSwKKwkJLnR5cGVzID0gQklUKE5MODAyMTFfSUZUWVBFX0FQKSwKKwl9LAorfTsKKworc3RhdGljIGNvbnN0IHN0cnVjdCBpZWVlODAyMTFfaWZhY2Vf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fQorCQlwcml2LT5od19yb2Nfc2V0dXAgPSB0cnVlOworCX0KKworCWVyciA9IGl3bF9zY2FuX2luaXRpYXRlKHByaXYsIGN0eC0+dmlmLCBJV0xfU0NBTl9ST0MsIGNoYW5uZWwtPmJhbmQpOworCWlmIChlcnIpCisJCWl3bGFnbl9kaXNhYmxlX3JvYyhwcml2KTsKKworIG91dDoKKwltdXRleF91bmxvY2soJnByaXYtPnNocmQtPm11dGV4KTsKKwlJV0xfREVCVUdfTUFDODAyMTEocHJpdiwgImxlYXZlXG4iKTsKKworCXJldHVybiBlcnI7Cit9CisKK3N0YXRpYyBpbnQgaXdsYWduX21hY19jYW5jZWxfcmVtYWluX29uX2NoYW5uZWwoc3RydWN0IGllZWU4MDIxMV9odyAqaHcpCit7CisJc3RydWN0IGl3bF9wcml2ICpwcml2ID0gaHctPnByaXY7CisKKwlpZiAoIShwcml2LT5zaHJkLT52YWxpZF9jb250ZXh0cyAmIEJJVChJV0xfUlhPTl9DVFhfUEFOKSkpCisJCXJldHVybiAtRU9QTk9UU1VQUDsKKworCUlXTF9ERUJVR19NQUM4MDIxMShwcml2LCAiZW50ZXJcbiIpOworCW11dGV4X2xvY2soJnByaXYtPnNocmQtPm11dGV4KTsKKwlpd2xfc2Nhbl9jYW5jZWxfdGltZW91dChwcml2LCBwcml2LT5od19yb2NfZHVyYXRpb24pOworCWl3bGFnbl9kaXNhYmxlX3JvYyhwcml2KTsKKwltdXRleF91bmxvY2soJnByaXYtPnNocmQtPm11dGV4KTsKKwlJV0xfREVCVUdfTUFDODAyMTEocHJpdiwgImxlYXZlXG4iKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IGl3bGFnbl9tYWNfdHhfc3luYyhzdHJ1Y3QgaWVlZTgwMjExX2h3ICpodywKKwkJCSAgICAgIHN0cnVjdCBpZWVlODAyMTFfdmlmICp2aWYsCisJCQkgICAgICBjb25zdCB1OCAqYnNzaWQsCisJCQkgICAgICBlbnVtIGllZWU4MDIxMV90eF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tMSBmb3IgbnVsIHRlcm1pbmF0aW9uKQotICogdXNlZCBpbiBpb2N0bCgpICovCi0jZGVmaW5lIEhPU1RBUF9DUllQVF9BTEdfTkFNRV9MRU4gMTYKLQotc3RydWN0IHByaXNtMl9ob3N0YXBkX3BhcmFtIHsKLQl1MzIgY21kOwotCXU4IHN0YV9hZGRyW0VUSF9BTEVOXTsKLQl1bmlvbiB7Ci0JICAgICAgIHN0cnVjdCB7Ci0JCSAgICAgICB1OCBhbGdbSE9TVEFQX0NSWVBUX0FMR19OQU1FX0xFTl07Ci0JCSAgICAgICB1MzIgZmxhZ3M7Ci0JCSAgICAgICB1MzIgZXJyOwotCQkgICAgICAgdTggaWR4OwotCQkgICAgICAgdTggc2VxWzhdOyAvKiBzZXF1ZW5jZSBjb3VudGVyIChzZXQ6IFJYLCBnZXQ6IFRYKSAqLwotCQkgICAgICAgdTE2IGtleV9sZW47Ci0JCSAgICAgICB1OCBrZXlbMF07Ci0JCSAgICAgICB9IGNyeXB0OwotICAgICAgICAgICAgICAgc3RydWN0IHsKLSAgICAgICAgICAgICAgICAgICAgICAgdTggbGVuOwotICAgICAgICAgICAgICAgICAgICAgICB1OCBkYXRhWzBdOwotICAgICAgICAgICAgICAgfSBnZW5lcmljX2VsZW07Ci0gICAgICAgICAgICAgICBzdHJ1Y3QgewotI2RlZmluZSBNTE1FX1NUQV9ERUFVVEggMAotI2RlZmluZSBNTE1FX1NUQV9ESVNBU1NPQyAxCi0gICAgICAgICAgICAgICAgICAgICAgIHUxNiBjbWQ7Ci0gICAgICAgICAgICAgICAgICAgICAgIHUxNiByZWFzb25fY29kZTsKLSAgICAgICAgICAgICAgIH0gbWxtZTsKLSAgICAgICAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICAgICAgICAgICAgIHU4IHNzaWRfbGVuOwotICAgICAgICAgICAgICAgICAgICAgICB1OCBzc2lkWzMyXTsKLSAgICAgICAgICAgICAgIH0gc2Nhbl9yZXE7Ci0gICAgICAgfSB1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N0XG4iLAotCQkJICAgICAgIG5kZXYtPm5hbWUpOwotICAgICAgICAgICAgICAgcmV0ID0gcHJpc20yX2lvY3RsX3NldF9nZW5lcmljX2VsZW1lbnQobmRldiwgcGFyYW0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwLT5sZW5ndGgpOwotICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgY2FzZSBQUklTTTJfSE9TVEFQRF9NTE1FOgotCSAgICAgICBwcmludGsoS0VSTl9ERUJVRyAiJXM6IENhdWdodCBXUEEgc3VwcGxpY2FudCBNTE1FIHJlcXVlc3RcbiIsCi0JCQkgICAgICAgbmRldi0+bmFtZSk7Ci0gICAgICAgICAgICAgICByZXQgPSBwcmlzbTJfaW9jdGxfbWxtZShuZGV2LCBwYXJhbSk7Ci0gICAgICAgICAgICAgICBicmVhazsKLSAgICAgICBjYXNlIFBSSVNNMl9IT1NUQVBEX1NDQU5fUkVROgotCSAgICAgICBwcmludGsoS0VSTl9ERUJVRyAiJXM6IENhdWdodCBXUEEgc3VwcGxpY2FudCBzY2FuIHJlcXVlc3RcbiIsCi0JCQkgICAgICAgbmRldi0+bmFtZSk7Ci0gICAgICAgICAgICAgICByZXQgPSBwcmlzbTJfaW9jdGxfc2Nhbl9yZXEobmRldiwgcGFyYW0pOwotICAgICAgICAgICAgICAgYnJlYWs7Ci0JY2FzZSBQUklTTTU0X1NFVF9XUEE6Ci0JICAgICAgIHByaW50ayhLRVJOX0RFQlVHICIlczogQ2F1Z2h0IFdQQSBzdXBwbGljYW50IHdwYSBpbml0IHJlcXVlc3RcbiIsCi0JCQkgICAgICAgbmRldi0+bmFtZSk7Ci0JICAgICAgIHV3cnEgPSAxOwotCSAgICAgICByZXQgPSBwcmlzbTU0X3NldF93cGEobmRldiwgTlVMTCwgJnV3cnEsIE5VTEwpOwotCSAgICAgICBicmVhazsKLQljYXNlIFBSSVNNNTRfRFJPUF9VTkVOQ1JZUFR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OQU1FICI6ICIKKworZW51bSB7CisJREVCVUdfTk9ORQk9IDAsCisJREVCVUdfSVJRCT0gQklUKDApLAorCURFQlVHX1NQSQk9IEJJVCgxKSwKKwlERUJVR19CT09UCT0gQklUKDIpLAorCURFQlVHX01BSUxCT1gJPSBCSVQoMyksCisJREVCVUdfVEVTVE1PREUJPSBCSVQoNCksCisJREVCVUdfRVZFTlQJPSBCSVQoNSksCisJREVCVUdfVFgJPSBCSVQoNiksCisJREVCVUdfUlgJPSBCSVQoNyksCisJREVCVUdfU0NBTgk9IEJJVCg4KSwKKwlERUJVR19DUllQVAk9IEJJVCg5KSwKKwlERUJVR19QU00JPSBCSVQoMTApLAorCURFQlVHX01BQzgwMjExCT0gQklUKDExKSwKKwlERUJVR19DTUQJPSBCSVQoMTIpLAorCURFQlVHX0FDWAk9IEJJVCgxMyksCisJREVCVUdfU0RJTwk9IEJJVCgxNCksCisJREVCVUdfRklMVEVSUyAgID0gQklUKDE1KSwKKwlERUJVR19BREhPQyAgICAgPSBCSVQoMTYpLAorCURFQlVHX0FQCT0gQklUKDE3KSwKKwlERUJVR19NQVNURVIJPSAoREVCVUdfQURIT0MgfCBERUJVR19BUCksCisJREVCVUdfQUxMCT0gfjAsCit9OworCitleHRlcm4gdTMyIHdsMTJ4eF9kZWJ1Z19sZXZlbDsKKworI2RlZmluZSBERUJVR19EVU1QX0xJTUlUIDEwMjQKKworI2RlZmluZSB3bDEyNzFfZXJyb3IoZm10LCBhcmcuLi4pIFwKKwlwcl9lcnIoRFJJVkVSX1BSRUZJWCAiRVJST1IgIiBmbXQgIlxuIiwgIyNhcmcpCisKKyNkZWZpbmUgd2wxMjcxX3dhcm5pbmcoZm10LCBhcmcuLi4pIFwKKwlwcl93YXJuaW5nKERSSVZFUl9QUkVGSVggIldBUk5JTkcgIiBmbXQgIlxuIiwgIyNhcmcpCisKKyNkZWZpbmUgd2wxMjcxX25vdGljZShmbXQsIGFyZy4uLikgXAorCXByX2luZm8oRFJJVkVSX1BS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ICAgICAgICAgICAgICAgICAgICAqLwogLyogICBJbml0aWFsaXplIGEgQ0NCIHRvIGRlZmF1bHQgdmFsdWVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIEFTU1VNRUQgdG8gYmUgY2FsbGxlZCBmcm9tIHdpdGhpbiBhIGxvY2sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogQVNTVU1FRCB0byBiZSBjYWxsZWQgZnJvbSB3aXRoaW4gYSBsb2NrICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBzdGF0aWMgaXBzX3NjYl90ICoKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9pc2NzaV9ib290X3N5c2ZzLmMgYi9kcml2ZXJzL3Njc2kvaXNjc2lfYm9vdF9zeXNmcy5jCmluZGV4IDg5NzAwY2IuLjE0YzFjOGYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9pc2NzaV9ib290X3N5c2ZzLmMKKysrIGIvZHJpdmVycy9zY3NpL2lzY3NpX2Jvb3Rfc3lzZnMuYwpAQCAtMTEyLDcgKzExMiw3IEBACiAJTlVMTAogfTsKIAotc3RhdGljIG1vZGVfdCBpc2NzaV9ib290X3RndF9hdHRyX2lzX3Zpc2libGUoc3RydWN0IGtvYmplY3QgKmtvYmosCitzdGF0aWMgdW1vZGVfdCBpc2NzaV9ib290X3RndF9hdHRyX2lzX3Zpc2libGUoc3RydWN0IGtvYmplY3QgKmtvYmosCiAJ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bW91bnRfdHJlZShjaGlsZCwgMCwgJnVtb3VudF9saXN0KTsKIAl9CiAJYnJfd3JpdGVfdW5sb2NrKHZmc21vdW50X2xvY2spOwpAQCAtMjg2LDcgKzI3MCw3IEBACiAvKgogICogcmV0dXJuIHRydWUgaWYgdGhlIHJlZmNvdW50IGlzIGdyZWF0ZXIgdGhhbiBjb3VudAogICovCi1zdGF0aWMgaW5saW5lIGludCBkb19yZWZjb3VudF9jaGVjayhzdHJ1Y3QgdmZzbW91bnQgKm1udCwgaW50IGNvdW50KQorc3RhdGljIGlubGluZSBpbnQgZG9fcmVmY291bnRfY2hlY2soc3RydWN0IG1vdW50ICptbnQsIGludCBjb3VudCkKIHsKIAlpbnQgbXljb3VudCA9IG1udF9nZXRfY291bnQobW50KSAtIG1udC0+bW50X2dob3N0czsKIAlyZXR1cm4gKG15Y291bnQgPiBjb3VudCk7CkBAIC0zMDIsMTAgKzI4NiwxMCBAQAogICoKICAqIHZmc21vdW50IGxvY2sgbXVzdCBiZSBoZWxkIGZvciB3cml0ZQogICovCi1pbnQgcHJvcGFnYXRlX21vdW50X2J1c3koc3RydWN0IHZmc21vdW50ICptbnQsIGludCByZWZjbnQpCitpbnQgcHJvcGFnYXRlX21vdW50X2J1c3koc3RydWN0IG1vdW50ICptbnQsIGludCByZWZjbnQpCiB7Ci0Jc3RydWN0IHZmc21vdW50ICptLCAqY2hpbGQ7Ci0Jc3RydWN0IHZmc21vdW50ICpwYXJlbnQgPSBtbnQtPm1udF9wYXJlbnQ7CisJc3RydWN0IG1vdW50ICptLCAqY2hpbGQ7CisJc3RydWN0IG1vdW50ICpwYXJlbnQgPSBtbnQtPm1udF9wYXJlbnQ7CiAJaW50IHJldCA9IDA7CiAKIAlpZiAobW50ID09IHBhcmVudCkKQEAgLTMyMSw3ICszMDUsNyBAQAogCiAJZm9yIChtID0gcHJvcGFnYXRpb25fbmV4dChwYXJlbnQsIHBhcmVudCk7IG07CiAJICAgICAJCW0gPSBwcm9wYWdhdGlv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vY19tb3VudHMgKnAgPSBtLT5wcml2YXRlOworCXN0cnVjdCBtb3VudCAqciA9IHJlYWxfbW91bnQobW50KTsKKwlzdHJ1Y3Qgc3VwZXJfYmxvY2sgKnNiID0gbW50LT5tbnRfc2I7CisJc3RydWN0IHBhdGggbW50X3BhdGggPSB7IC5kZW50cnkgPSBtbnQtPm1udF9yb290LCAubW50ID0gbW50IH07CisJc3RydWN0IHBhdGggcm9vdCA9IHAtPnJvb3Q7CisJaW50IGVyciA9IDA7CisKKwlzZXFfcHJpbnRmKG0sICIlaSAlaSAldToldSAiLCByLT5tbnRfaWQsIHItPm1udF9wYXJlbnQtPm1udF9pZCwKKwkJICAgTUFKT1Ioc2ItPnNfZGV2KSwgTUlOT1Ioc2ItPnNfZGV2KSk7CisJaWYgKHNiLT5zX29wLT5zaG93X3BhdGgpCisJCWVyciA9IHNiLT5zX29wLT5zaG93X3BhdGgobSwgbW50LT5tbnRfcm9vdCk7CisJZWxzZQorCQlzZXFfZGVudHJ5KG0sIG1udC0+bW50X3Jvb3QsICIgXHRcblxcIik7CisJaWYgKGVycikKKwkJZ290byBvdXQ7CisJc2VxX3B1dGMobSwgJyAnKTsKKworCS8qIG1vdW50cG9pbnRzIG91dHNpZGUgb2YgY2hyb290IGphaWwgd2lsbCBnaXZlIFNFUV9TS0lQIG9uIHRoaXMgKi8KKwllcnIgPSBzZXFfcGF0aF9yb290KG0sICZtbnRfcGF0aCwgJnJvb3QsICIgXHRcblxcIik7CisJaWYgKGVycikKKwkJZ290byBvdXQ7CisKKwlzZXFfcHV0cyhtLCBtbnQtPm1udF9mbGFncyAmIE1OVF9SRUFET05MWSA/ICIgcm8iIDogIiBydyIpOworCXNob3dfbW50X29wdHMobSwgbW50KTsKKworCS8qIFRhZ2dlZCBmaWVsZHMgKCJmb286WCIgb3IgImJhciIpICovCisJaWYgKElTX01OVF9TSEFSRUQocikpCisJCXNlcV9wcmludGYobSwgIiBzaGFyZWQ6JWkiLCByLT5tbnRfZ3JvdX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cmV0dXJuIGVycjsKK30KKworc3RhdGljIGludCBtb3VudHNfb3Blbl9jb21tb24oc3RydWN0IGlub2RlICppbm9kZSwgc3RydWN0IGZpbGUgKmZpbGUsCisJCQkgICAgICBpbnQgKCpzaG93KShzdHJ1Y3Qgc2VxX2ZpbGUgKiwgc3RydWN0IHZmc21vdW50ICopKQoreworCXN0cnVjdCB0YXNrX3N0cnVjdCAqdGFzayA9IGdldF9wcm9jX3Rhc2soaW5vZGUpOworCXN0cnVjdCBuc3Byb3h5ICpuc3A7CisJc3RydWN0IG1udF9uYW1lc3BhY2UgKm5zID0gTlVMTDsKKwlzdHJ1Y3QgcGF0aCByb290OworCXN0cnVjdCBwcm9jX21vdW50cyAqcDsKKwlpbnQgcmV0ID0gLUVJTlZBTDsKKworCWlmICghdGFzaykKKwkJZ290byBlcnI7CisKKwlyY3VfcmVhZF9sb2NrKCk7CisJbnNwID0gdGFza19uc3Byb3h5KHRhc2spOworCWlmICghbnNwKSB7CisJCXJjdV9yZWFkX3VubG9jaygpOworCQlwdXRfdGFza19zdHJ1Y3QodGFzayk7CisJCWdvdG8gZXJyOworCX0KKwlucyA9IG5zcC0+bW50X25zOworCWlmICghbnMpIHsKKwkJcmN1X3JlYWRfdW5sb2NrKCk7CisJCXB1dF90YXNrX3N0cnVjdCh0YXNrKTsKKwkJZ290byBlcnI7CisJfQorCWdldF9tbnRfbnMobnMpOworCXJjdV9yZWFkX3VubG9jaygpOworCXRhc2tfbG9jayh0YXNrKTsKKwlpZiAoIXRhc2stPmZzKSB7CisJCXRhc2tfdW5sb2NrKHRhc2spOworCQlwdXRfdGFza19zdHJ1Y3QodGFzayk7CisJCXJldCA9IC1FTk9FTlQ7CisJCWdvdG8gZXJyX3B1dF9uczsKKwl9CisJZ2V0X2ZzX3Jvb3QodGFzay0+ZnMsICZyb290KTsKKwl0YXNrX3VubG9jayh0YXNrKTsKKwlwdXRfdGFza19zdHJ1Y3QodGFzayk7CisKKwlyZXQgPSAtRU5PTUVNOwor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c2sgZ29lcyBkb3duIGJ5IH4xMCUgdGhlbgotICogdGhlIHJlbGF0aXZlIGRpc3RhbmNlIGJldHdlZW4gdGhlbSBpcyB+MjUlLikKLSAqLwotc3RhdGljIGNvbnN0IGludCBwcmlvX3RvX3dlaWdodFs0MF0gPSB7Ci0gLyogLTIwICovICAgICA4ODc2MSwgICAgIDcxNzU1LCAgICAgNTY0ODMsICAgICA0NjI3MywgICAgIDM2MjkxLAotIC8qIC0xNSAqLyAgICAgMjkxNTQsICAgICAyMzI1NCwgICAgIDE4NzA1LCAgICAgMTQ5NDksICAgICAxMTkxNiwKLSAvKiAtMTAgKi8gICAgICA5NTQ4LCAgICAgIDc2MjAsICAgICAgNjEwMCwgICAgICA0OTA0LCAgICAgIDM5MDYsCi0gLyogIC01ICovICAgICAgMzEyMSwgICAgICAyNTAxLCAgICAgIDE5OTEsICAgICAgMTU4NiwgICAgICAxMjc3LAotIC8qICAgMCAqLyAgICAgIDEwMjQsICAgICAgIDgyMCwgICAgICAgNjU1LCAgICAgICA1MjYsICAgICAgIDQyMywKLSAvKiAgIDUgKi8gICAgICAgMzM1LCAgICAgICAyNzIsICAgICAgIDIxNSwgICAgICAgMTcyLCAgICAgICAxMzcsCi0gLyogIDEwICovICAgICAgIDExMCwgICAgICAgIDg3LCAgICAgICAgNzAsICAgICAgICA1NiwgICAgICAgIDQ1LAotIC8qICAxNSAqLyAgICAgICAgMzYsICAgICAgICAyOSwgICAgICAgIDIzLCAgICAgICAgMTgsICAgICAgICAxNSwKLX07Ci0KLS8qCi0gKiBJbnZlcnNlICgyXjMyL3gpIHZhbHVlcyBvZiB0aGUgcHJpb190b193ZWlnaHRbXSBhcnJheSwgcHJlY2FsY3VsYXRlZC4KLSAqCi0gKiBJbiBjYXNlcyB3aGVyZSB0aGUgd2VpZ2h0IGRvZXMgbm90IGNoYW5nZSBvZnRlbiwgd2UgY2FuIHVzZSB0aGUKLSAqIHByZWNhbGN1bGF0ZWQgaW52ZXJzZSB0byBzcGV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NiwgICAgICAxMjc3LAorIC8qICAgMCAqLyAgICAgIDEwMjQsICAgICAgIDgyMCwgICAgICAgNjU1LCAgICAgICA1MjYsICAgICAgIDQyMywKKyAvKiAgIDUgKi8gICAgICAgMzM1LCAgICAgICAyNzIsICAgICAgIDIxNSwgICAgICAgMTcyLCAgICAgICAxMzcsCisgLyogIDEwICovICAgICAgIDExMCwgICAgICAgIDg3LCAgICAgICAgNzAsICAgICAgICA1NiwgICAgICAgIDQ1LAorIC8qICAxNSAqLyAgICAgICAgMzYsICAgICAgICAyOSwgICAgICAgIDIzLCAgICAgICAgMTgsICAgICAgICAxNSwKK307CisKKy8qCisgKiBJbnZlcnNlICgyXjMyL3gpIHZhbHVlcyBvZiB0aGUgcHJpb190b193ZWlnaHRbXSBhcnJheSwgcHJlY2FsY3VsYXRlZC4KKyAqCisgKiBJbiBjYXNlcyB3aGVyZSB0aGUgd2VpZ2h0IGRvZXMgbm90IGNoYW5nZSBvZnRlbiwgd2UgY2FuIHVzZSB0aGUKKyAqIHByZWNhbGN1bGF0ZWQgaW52ZXJzZSB0byBzcGVlZCB1cCBhcml0aG1ldGljcyBieSB0dXJuaW5nIGRpdmlzaW9ucworICogaW50byBtdWx0aXBsaWNhdGlvbnM6CisgKi8KK3N0YXRpYyBjb25zdCB1MzIgcHJpb190b193bXVsdFs0MF0gPSB7CisgLyogLTIwICovICAgICA0ODM4OCwgICAgIDU5ODU2LCAgICAgNzYwNDAsICAgICA5MjgxOCwgICAgMTE4MzQ4LAorIC8qIC0xNSAqLyAgICAxNDczMjAsICAgIDE4NDY5OCwgICAgMjI5NjE2LCAgICAyODczMDgsICAgIDM2MDQzNywKKyAvKiAtMTAgKi8gICAgNDQ5ODI5LCAgICA1NjM2NDQsICAgIDcwNDA5MywgICAgODc1ODA5LCAgIDEwOTk1ODIsCisgLyogIC01ICovICAgMTM3NjE1MSwgICAxNzE3MzAwLCAgIDIxNTcxOTEsICAgMjcwODA1MCwgICAzMzYzMzI2LAorIC8qICA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1bS1pcC1nZW5lcmljIiwKLQkvKiBORVRJRl9GX0lQVjZfQ1NVTSAqLyAgICAgICAidHgtY2hlY2tzdW0taXB2NiIsCi0JLyogTkVUSUZfRl9ISUdIRE1BICovICAgICAgICAgImhpZ2hkbWEiLAotCS8qIE5FVElGX0ZfRlJBR0xJU1QgKi8gICAgICAgICJ0eC1zY2F0dGVyLWdhdGhlci1mcmFnbGlzdCIsCi0JLyogTkVUSUZfRl9IV19WTEFOX1RYICovICAgICAgInR4LXZsYW4taHctaW5zZXJ0IiwKLQotCS8qIE5FVElGX0ZfSFdfVkxBTl9SWCAqLyAgICAgICJyeC12bGFuLWh3LXBhcnNlIiwKLQkvKiBORVRJRl9GX0hXX1ZMQU5fRklMVEVSICovICAicngtdmxhbi1maWx0ZXIiLAotCS8qIE5FVElGX0ZfVkxBTl9DSEFMTEVOR0VEICovICJ2bGFuLWNoYWxsZW5nZWQiLAotCS8qIE5FVElGX0ZfR1NPICovICAgICAgICAgICAgICJ0eC1nZW5lcmljLXNlZ21lbnRhdGlvbiIsCi0JLyogTkVUSUZfRl9MTFRYICovICAgICAgICAgICAgInR4LWxvY2tsZXNzIiwKLQkvKiBORVRJRl9GX05FVE5TX0xPQ0FMICovICAgICAibmV0bnMtbG9jYWwiLAotCS8qIE5FVElGX0ZfR1JPICovICAgICAgICAgICAgICJyeC1ncm8iLAotCS8qIE5FVElGX0ZfTFJPICovICAgICAgICAgICAgICJyeC1scm8iLAotCi0JLyogTkVUSUZfRl9UU08gKi8gICAgICAgICAgICAgInR4LXRjcC1zZWdtZW50YXRpb24iLAotCS8qIE5FVElGX0ZfVUZPICovICAgICAgICAgICAgICJ0eC11ZHAtZnJhZ21lbnRhdGlvbiIsCi0JLyogTkVUSUZfRl9HU09fUk9CVVNUICovICAgICAgInR4LWdzby1yb2J1c3QiLAotCS8qIE5FVElGX0ZfVFNPX0VDTiAqLyAgICAgICAgICJ0eC10Y3AtZWNuLXNlZ21lbnRhdGlvbiIsCi0JLyogTkV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N0IGZyYWdtZW50ICovCisJaGxlbiA9IChwbGVuID09IDAgPyBMT1dQQU5fRlJBRzFfSEVBRF9TSVpFIDogIExPV1BBTl9GUkFHTl9IRUFEX1NJWkUpOworCisJbG93cGFuX3Jhd19kdW1wX2lubGluZShfX2Z1bmNfXywgIjZsb3dwYW4gZnJhZ21lbnQgaGVhZGVyIiwgaGVhZCwgaGxlbik7CisKKwlmcmFnID0gZGV2X2FsbG9jX3NrYihobGVuICsgbWxlbiArIHBsZW4gKyBJRUVFODAyMTU0X01GUl9TSVpFKTsKKwlpZiAoIWZyYWcpCisJCXJldHVybiAtRU5PTUVNOworCisJZnJhZy0+cHJpb3JpdHkgPSBza2ItPnByaW9yaXR5OworCWZyYWctPmRldiA9IHNrYi0+ZGV2OworCisJLyogY29weSBoZWFkZXIsIE1GUiBhbmQgcGF5bG9hZCAqLworCW1lbWNweShza2JfcHV0KGZyYWcsIG1sZW4pLCBza2ItPmRhdGEsIG1sZW4pOworCW1lbWNweShza2JfcHV0KGZyYWcsIGhsZW4pLCBoZWFkLCBobGVuKTsKKworCWlmIChwbGVuKQorCQlza2JfY29weV9mcm9tX2xpbmVhcl9kYXRhX29mZnNldChza2IsIG9mZnNldCArIG1sZW4sCisJCQkJCXNrYl9wdXQoZnJhZywgcGxlbiksIHBsZW4pOworCisJbG93cGFuX3Jhd19kdW1wX3RhYmxlKF9fZnVuY19fLCAiIHJhdyBmcmFnbWVudCBkdW1wIiwgZnJhZy0+ZGF0YSwKKwkJCQkJCQkJZnJhZy0+bGVuKTsKKworCXJldCA9IGRldl9xdWV1ZV94bWl0KGZyYWcpOworCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludAorbG93cGFuX3NrYl9mcmFnbWVudGF0aW9uKHN0cnVjdCBza19idWZmICpza2IpCit7CisJaW50ICBlcnIsIGhlYWRlcl9sZW5ndGgsIHBheWxvYWRfbGVuZ3RoLCB0YWcsIG9mZnNldCA9IDA7CisJdTggaGVhZFs1XTsKKworCWhlYW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Ck7CisJd2hpbGUgKCEobmV3X3NrID0gbmZjX2xsY3BfYWNjZXB0X2RlcXVldWUoc2ssIG5ld3NvY2spKSkgeworCQlzZXRfY3VycmVudF9zdGF0ZShUQVNLX0lOVEVSUlVQVElCTEUpOworCisJCWlmICghdGltZW8pIHsKKwkJCXJldCA9IC1FQUdBSU47CisJCQlicmVhazsKKwkJfQorCisJCWlmIChzaWduYWxfcGVuZGluZyhjdXJyZW50KSkgeworCQkJcmV0ID0gc29ja19pbnRyX2Vycm5vKHRpbWVvKTsKKwkJCWJyZWFrOworCQl9CisKKwkJcmVsZWFzZV9zb2NrKHNrKTsKKwkJdGltZW8gPSBzY2hlZHVsZV90aW1lb3V0KHRpbWVvKTsKKwkJbG9ja19zb2NrX25lc3RlZChzaywgU0lOR0xFX0RFUFRIX05FU1RJTkcpOworCX0KKwlfX3NldF9jdXJyZW50X3N0YXRlKFRBU0tfUlVOTklORyk7CisJcmVtb3ZlX3dhaXRfcXVldWUoc2tfc2xlZXAoc2spLCAmd2FpdCk7CisKKwlpZiAocmV0KQorCQlnb3RvIGVycm9yOworCisJbmV3c29jay0+c3RhdGUgPSBTU19DT05ORUNURUQ7CisKKwlwcl9kZWJ1ZygibmV3IHNvY2tldCAlcFxuIiwgbmV3X3NrKTsKKworZXJyb3I6CisJcmVsZWFzZV9zb2NrKHNrKTsKKworCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyBpbnQgbGxjcF9zb2NrX2dldG5hbWUoc3RydWN0IHNvY2tldCAqc29jaywgc3RydWN0IHNvY2thZGRyICphZGRyLAorCQkJICAgICBpbnQgKmxlbiwgaW50IHBlZXIpCit7CisJc3RydWN0IHNvY2thZGRyX25mY19sbGNwICpsbGNwX2FkZHIgPSAoc3RydWN0IHNvY2thZGRyX25mY19sbGNwICopIGFkZHI7CisJc3RydWN0IHNvY2sgKnNrID0gc29jay0+c2s7CisJc3RydWN0IG5mY19sbGNwX3NvY2sgKmxsY3Bfc29jayA9IG5mY19sbGNwX3N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aywgc2ssIGZsYWdzKTsKKworCWlmICghYWRkciB8fCBsZW4gPCBzaXplb2Yoc3RydWN0IHNvY2thZGRyX25mYykgfHwKKwkJCWFkZHItPnNhX2ZhbWlseSAhPSBBRl9ORkMpIHsKKwkJcHJfZXJyKCJJbnZhbGlkIHNvY2tldFxuIik7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCWlmIChhZGRyLT5zZXJ2aWNlX25hbWVfbGVuID09IDAgJiYgYWRkci0+ZHNhcCA9PSAwKSB7CisJCXByX2VycigiTWlzc2luZyBzZXJ2aWNlIG5hbWUgb3IgZHNhcFxuIik7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCXByX2RlYnVnKCJhZGRyIGRldl9pZHg9JXUgdGFyZ2V0X2lkeD0ldSBwcm90b2NvbD0ldVxuIiwgYWRkci0+ZGV2X2lkeCwKKwkJCQkJYWRkci0+dGFyZ2V0X2lkeCwgYWRkci0+bmZjX3Byb3RvY29sKTsKKworCWxvY2tfc29jayhzayk7CisKKwlpZiAoc2stPnNrX3N0YXRlID09IExMQ1BfQ09OTkVDVEVEKSB7CisJCXJldCA9IC1FSVNDT05OOworCQlnb3RvIGVycm9yOworCX0KKworCWRldiA9IG5mY19nZXRfZGV2aWNlKGFkZHItPmRldl9pZHgpOworCWlmIChkZXYgPT0gTlVMTCkgeworCQlyZXQgPSAtRU5PREVWOworCQlnb3RvIGVycm9yOworCX0KKworCWxvY2FsID0gbmZjX2xsY3BfZmluZF9sb2NhbChkZXYpOworCWlmIChsb2NhbCA9PSBOVUxMKSB7CisJCXJldCA9IC1FTk9ERVY7CisJCWdvdG8gcHV0X2RldjsKKwl9CisKKwlkZXZpY2VfbG9jaygmZGV2LT5kZXYpOworCWlmIChkZXYtPmRlcF9saW5rX3VwID09IGZhbHNlKSB7CisJCXJldCA9IC1FTk9MSU5LOworCQlkZXZpY2VfdW5sb2NrKCZkZXYtPmRldik7CisJCWdvdG8gcHV0X2RldjsKKwl9CisJZGV2aWNlX3VubG9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IHJsZW47CisKKwlyZXR1cm4gY29waWVkOworfQorCitzdGF0aWMgY29uc3Qgc3RydWN0IHByb3RvX29wcyBsbGNwX3NvY2tfb3BzID0geworCS5mYW1pbHkgICAgICAgICA9IFBGX05GQywKKwkub3duZXIgICAgICAgICAgPSBUSElTX01PRFVMRSwKKwkuYmluZCAgICAgICAgICAgPSBsbGNwX3NvY2tfYmluZCwKKwkuY29ubmVjdCAgICAgICAgPSBsbGNwX3NvY2tfY29ubmVjdCwKKwkucmVsZWFzZSAgICAgICAgPSBsbGNwX3NvY2tfcmVsZWFzZSwKKwkuc29ja2V0cGFpciAgICAgPSBzb2NrX25vX3NvY2tldHBhaXIsCisJLmFjY2VwdCAgICAgICAgID0gbGxjcF9zb2NrX2FjY2VwdCwKKwkuZ2V0bmFtZSAgICAgICAgPSBsbGNwX3NvY2tfZ2V0bmFtZSwKKwkucG9sbCAgICAgICAgICAgPSBsbGNwX3NvY2tfcG9sbCwKKwkuaW9jdGwgICAgICAgICAgPSBzb2NrX25vX2lvY3RsLAorCS5saXN0ZW4gICAgICAgICA9IGxsY3Bfc29ja19saXN0ZW4sCisJLnNodXRkb3duICAgICAgID0gc29ja19ub19zaHV0ZG93biwKKwkuc2V0c29ja29wdCAgICAgPSBzb2NrX25vX3NldHNvY2tvcHQsCisJLmdldHNvY2tvcHQgICAgID0gc29ja19ub19nZXRzb2Nrb3B0LAorCS5zZW5kbXNnICAgICAgICA9IHNvY2tfbm9fc2VuZG1zZywKKwkucmVjdm1zZyAgICAgICAgPSBsbGNwX3NvY2tfcmVjdm1zZywKKwkubW1hcCAgICAgICAgICAgPSBzb2NrX25vX21tYXAsCit9OworCitzdGF0aWMgdm9pZCBsbGNwX3NvY2tfZGVzdHJ1Y3Qoc3RydWN0IHNvY2sgKnNrKQoreworCXN0cnVjdCBuZmNfbGxjcF9zb2NrICpsbGNwX3NvY2sgPSBuZmNfbGxjcF9zb2NrKHNrKTsKKworCXByX2RlYnVnKCIlcFxuIiwgc2spOworC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V4dHJhY3Qoc3RydWN0IHNrX2J1ZmYgKiwgdTE2IGluX3BvcnQsIHN0cnVjdCBzd19mbG93X2tleSAqLAorCQkgICAgIGludCAqa2V5X2xlbnApOwordm9pZCBvdnNfZmxvd191c2VkKHN0cnVjdCBzd19mbG93ICosIHN0cnVjdCBza19idWZmICopOwordTY0IG92c19mbG93X3VzZWRfdGltZSh1bnNpZ25lZCBsb25nIGZsb3dfamlmZmllcyk7CisKKy8qIFVwcGVyIGJvdW5kIG9uIHRoZSBsZW5ndGggb2YgYSBubGF0dHItZm9ybWF0dGVkIGZsb3cga2V5LiAgVGhlIGxvbmdlc3QKKyAqIG5sYXR0ci1mb3JtYXR0ZWQgZmxvdyBrZXkgd291bGQgYmU6CisgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0ICBwYWQgIG5sIGhkciAgdG90YWwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgIC0tLS0tLSAgLS0tICAtLS0tLS0gIC0tLS0tCisgKiAgT1ZTX0tFWV9BVFRSX1BSSU9SSVRZICAgICAgNCAgICAtLSAgICAgNCAgICAgIDgKKyAqICBPVlNfS0VZX0FUVFJfSU5fUE9SVCAgICAgICA0ICAgIC0tICAgICA0ICAgICAgOAorICogIE9WU19LRVlfQVRUUl9FVEhFUk5FVCAgICAgMTIgICAgLS0gICAgIDQgICAgIDE2CisgKiAgT1ZTX0tFWV9BVFRSXzgwMjFRICAgICAgICAgNCAgICAtLSAgICAgNCAgICAgIDgKKyAqICBPVlNfS0VZX0FUVFJfRVRIRVJUWVBFICAgICAyICAgICAyICAgICA0ICAgICAgOAorICogIE9WU19LRVlfQVRUUl9JUFY2ICAgICAgICAgNDAgICAgLS0gICAgIDQgICAgIDQ0CisgKiAgT1ZTX0tFWV9BVFRSX0lDTVBWNiAgICAgICAgMiAgICAgMiAgICAgNCAgICAgIDgKKyAqICBPVlNfS0VZX0FUVFJfTkQgICAgICAgICAgIDI4ICAgIC0tICAgICA0ICAgICAzMgorICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAqICB0b3RhbCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzMgorICovCisjZGVmaW5lIEZMT1dfQlVGU0laRSAxMzIKKworaW50IG92c19mbG93X3RvX25sYXR0cnMoY29uc3Qgc3RydWN0IHN3X2Zsb3dfa2V5ICosIHN0cnVjdCBza19idWZmICopOworaW50IG92c19mbG93X2Zyb21fbmxhdHRycyhzdHJ1Y3Qgc3dfZmxvd19rZXkgKnN3a2V5LCBpbnQgKmtleV9sZW5wLAorCQkgICAgICBjb25zdCBzdHJ1Y3QgbmxhdHRyICopOworaW50IG92c19mbG93X21ldGFkYXRhX2Zyb21fbmxhdHRycyh1MzIgKnByaW9yaXR5LCB1MTYgKmluX3BvcnQsCisJCQkgICAgICAgY29uc3Qgc3RydWN0IG5sYXR0ciAqKTsKKworI2RlZmluZSBUQkxfTUlOX0JVQ0tFVFMJCTEwMjQKKworc3RydWN0IGZsb3dfdGFibGUgeworCXN0cnVjdCBmbGV4X2FycmF5ICpidWNrZXRzOworCXVuc2lnbmVkIGludCBjb3VudCwgbl9idWNrZXRzOworCXN0cnVjdCByY3VfaGVhZCByY3U7CisJaW50IG5vZGVfdmVyOworCXUzMiBoYXNoX3NlZWQ7CisJYm9vbCBrZWVwX2Zsb3dzOworfTsKKworc3RhdGljIGlubGluZSBpbnQgb3ZzX2Zsb3dfdGJsX2NvdW50KHN0cnVjdCBmbG93X3RhYmxlICp0YWJsZSkKK3sKKwlyZXR1cm4gdGFibGUtPmNvdW50OworfQorCitzdGF0aWMgaW5saW5lIGludCBvdnNfZmxvd190YmxfbmVlZF90b19leHBhbmQoc3RydWN0IGZsb3dfdGFibGUgKnRhYmxlKQoreworCXJldHVybiAodGFibGUtPmNvdW50ID4gdGFibGUtPm5fYnVja2V0cyk7Cit9CisKK3N0cnVjdCBzd19mbG93ICpvdnNfZmxv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