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JBVywgICAgICAgICAgMCwgICAgMCwgMCwgICAgIDEsICAgIDEsCisJfSwKKworCS8qIEJhbmsxICovCisJW0NQQ0FQX0FEQ19BRDhdID0geworCQlJSU9fQ0hBTl9JTkZPX1JBVywgICAgICAgICAgMCwgICAgMCwgMCwgICAgIDEsICAgIDEsCisJfSwKKwlbQ1BDQVBfQURDX0FEOV0gPSB7CisJCUlJT19DSEFOX0lORk9fUkFXLCAgICAgICAgICAwLCAgICAwLCAwLCAgICAgMSwgICAgMSwKKwl9LAorCVtDUENBUF9BRENfTElDRUxMXSA9IHsKKwkJSUlPX0NIQU5fSU5GT19QUk9DRVNTRUQsICAgIDAsICAgIDAsIDAsICAzNDAwLCAxMDIzLAorCX0sCisJW0NQQ0FQX0FEQ19IVl9CQVRUUF0gPSB7CisJCUlJT19DSEFOX0lORk9fUkFXLCAgICAgICAgICAwLCAgICAwLCAwLCAgICAgMSwgICAgMSwKKwl9LAorCVtDUENBUF9BRENfVFNYMV9BRDEyXSA9IHsKKwkJSUlPX0NIQU5fSU5GT19SQVcsICAgICAgICAgIDAsICAgIDAsIDAsICAgICAxLCAgICAxLAorCX0sCisJW0NQQ0FQX0FEQ19UU1gyX0FEMTNdID0geworCQlJSU9fQ0hBTl9JTkZPX1JBVywgICAgICAgICAgMCwgICAgMCwgMCwgICAgIDEsICAgIDEsCisJfSwKKwlbQ1BDQVBfQURDX1RTWTFfQUQxNF0gPSB7CisJCUlJT19DSEFOX0lORk9fUkFXLCAgICAgICAgICAwLCAgICAwLCAwLCAgICAgMSwgICAgMSwKKwl9LAorCVtDUENBUF9BRENfVFNZMl9BRDE1XSA9IHsKKwkJSUlPX0NIQU5fSU5GT19SQVcsICAgICAgICAgIDAsICAgIDAsIDAsICAgICAxLCAgICAxLAorCX0sCit9OworCisvKgorICogVGVtcGVyYXR1cmUgbG9va3VwIHRhYmxlIG9mIHJlZ2lzdGVyIHZhbHVlcyB0byBtaWxsaUNlbGNpdXMuCisgKiBSRVZJU0lUOiBDa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sb29rcyBsaWtlOgorICoKKyAqICAgICAgICAgICstLS0rCisgKiBHUElPICAgICB8ICAgfAorICogdHJpZzogIC0tKyAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAqICAgICAgICAgIF4gICBeCisgKiAgICAgICAgICB8PC0+fAorICogICAgICAgICB1ZGVsYXkoMTApCisgKgorICogdWx0cmEgICAgICAgICAgICstKyArLSsgKy0rCisgKiBzb25pYyAgICAgICAgICAgfCB8IHwgfCB8IHwKKyAqIGJ1cnN0OiAtLS0tLS0tLS0rICstKyArLSsgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIC4KKyAqIHVsdHJhICAgICAgICAgICAgICAgICAgICAgLiAgICAgICAgICAgICAgKy0rICstKyArLSsKKyAqIHNvbmljICAgICAgICAgICAgICAgICAgICAgLiAgICAgICAgICAgICAgfCB8IHwgfCB8IHwKKyAqIGVjaG86ICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyArLSsgKy0rICstLS0tLS0tLS0tLS0tLS0tCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIC4gICAgICAgICAgICAgICAgICAgICAgICAuCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCisgKiBHUElPICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICB8CisgKiBlY2hvOiAgLS0tLS0tLS0tLS0tLS0tLS0tLSsgICAgICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIF4gICAgICAgICAgICAgICAgICAgICAgICBeCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIGludGVycnVwdCAgICAgICAgICAgICAgICBpbnRlcnJ1cHQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRzX3Jpc2luZykgICAgICAgICAgICAgICh0c19mYWxsaW5nKQorICogICAgICAgICAgICAgICAgICAgICAgICAgICB8PC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0+fAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdWxzZSB0aW1lIG1lYXN1cmVkCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tPiBvbmUgcm91bmQgdHJpcCBvZiB1bHRyYSBzb25pYyB3YXZlcworICovCisjaW5jbHVkZSA8bGludXgvZXJyLmg+CisjaW5jbHVkZSA8bGludXgvZ3Bpby9jb25zdW1lci5oPgorI2luY2x1ZGUgPGxpbnV4L2tlcm5lbC5oPgorI2luY2x1ZGUgPGxpbnV4L21vZHVsZS5oPgorI2luY2x1ZGUgPGxpbnV4L29mLmg+CisjaW5jbHVkZSA8bGludXgvcGxhdGZvcm1fZGV2aWNlLmg+CisjaW5jbHVkZSA8bGludXgvcHJvcGVydHkuaD4KKyNpbmNsdWRlIDxsaW51eC9zY2hlZC5oPgorI2luY2x1ZGUgPGxpbnV4L2ludGVycnVwdC5oPgorI2luY2x1ZGUgPGxpbnV4L2RlbGF5Lmg+CisjaW5jbHVkZSA8bGludXgvaWlvL2lpby5oPgorI2luY2x1ZGUgPGxpbnV4L2lpby9zeXNmcy5oPgorCitzdHJ1Y3Qgc3JmMDRfZGF0YSB7CisJc3RydWN0IGRldmljZQkJKmRldjsKKwlzdHJ1Y3QgZ3Bpb19kZXNjCSpncGlvZF90cmlnOworCXN0cnVjdCBncGlvX2Rlc2MJKmdwaW9kX2VjaG87CisJc3RydWN0IG11dGV4CQlsb2NrOworCWludAkJCWlycW5yOworCWt0aW1lX3QJCQl0c19yaXNpbmc7CisJa3RpbWVfdAkJCXRzX2ZhbGxpbmc7CisJc3RydWN0IGNvbXBsZXRpb24JcmlzaW5nOworCXN0cnVjdCBjb21wbGV0aW9u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IFwKLQlyZXQgPSBwYXItPmZidGZ0b3BzLndyaXRlKHBhciwgcGFyLT5idWYsIHNpemVvZih0eXBlKSArIG9mZnNldCk7ICAgICAgXAotCWlmIChyZXQgPCAwKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCXZhX2VuZChhcmdzKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQlkZXZfZXJyKHBhci0+aW5mby0+ZGV2aWNlLCAiJXM6IHdyaXRlKCkgZmFpbGVkIGFuZCByZXR1cm5lZCAlZFxuIiwgX19mdW5jX18sIHJldCk7IFwKLQkJcmV0dXJuOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlyZXQgPSBmYnRmdF93cml0ZV9idWZfZGMocGFyLCBwYXItPmJ1Ziwgc2l6ZW9mKHR5cGUpICsgb2Zmc2V0LCAwKTsgICAgXAorCWlmIChyZXQgPCAwKQkJCQkJCQkgICAgICBcCisJCWdvdG8gb3V0OwkJCQkJCSAgICAgIFwKIAlsZW4tLTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJCQkJCQkJICAgICAgXAogCWlmIChwYXItPnN0YXJ0Ynl0ZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC01MSwxOSArNDYsMTIgQEAKIAkJCQkJCQkJCSAgICAgIFwKIAlpZiAobGVuKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlpID0gbGVuOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJd2hpbGUgKGktLSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCXdoaWxlIChpLS0pCQkJCQkJICAgICAgXAogCQkJKmJ1ZisrID0gbW9kaWZpZXIoKHR5cGUpdmFfYXJnKGFyZ3MsIHVuc2lnbmVkIGludCkpOyAgXAotCQl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJaWYgKHBhci0+Z3Bpby5kYyAhPSAtMSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQlncGlvX3NldF92YWx1ZShwYXItPmdwaW8uZGMsIDEpOyAgICAgICAgICAgICAgICAgICAgICBcCi0JCXJldCA9IHBhci0+ZmJ0ZnRvcHMud3JpdGUocGFyLCBwYXItPmJ1ZiwJCSAgICAgIFwKLQkJCQkJICBsZW4gKiAoc2l6ZW9mKHR5cGUpICsgb2Zmc2V0KSk7ICAgICBcCi0JCWlmIChyZXQgPCAwKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJdmFfZW5kKGFyZ3MpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJZGV2X2VycihwYXItPmluZm8tPmRldmljZSwgIiVzOiB3cml0ZSgpIGZhaWxlZCBhbmQgcmV0dXJuZWQgJWRcbiIsIF9fZnVuY19fLCByZXQpOyBcCi0JCQlyZXR1cm47ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlmYnRmdF93cml0ZV9idWZfZGMocGFyLCBwYXItPmJ1ZiwJCQkgICAgICBcCisJCQkJICAgbGVuICogKHNpemVvZih0eXBlKSArIG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XIgY29uc2lzdHMgb2YgMyBwcmltYXJ5IGNvbXBvbmVudHMtLQorICAgRFBJTyBvYmplY3QgZHJpdmVyLS0gZnNsLW1jIGRyaXZlciB0aGF0IG1hbmFnZXMgdGhlIERQSU8gb2JqZWN0CisgICBEUElPIHNlcnZpY2UtLSBwcm92aWRlcyBBUElzIHRvIG90aGVyIExpbnV4IGRyaXZlcnMgZm9yIHNlcnZpY2VzCisgICBRQm1hbiBwb3J0YWwgaW50ZXJmYWNlLS0gc2VuZHMgcG9ydGFsIGNvbW1hbmRzLCBnZXRzIHJlc3BvbnNlcworCisgICAgICAgICAgZnNsLW1jICAgICAgICAgIG90aGVyCisgICAgICAgICAgIGJ1cyAgICAgICAgICAgZHJpdmVycworICAgICAgICAgICAgfCAgICAgICAgICAgICAgIHwKKyAgICAgICAgKy0tLSstLS0tKyAgICstLS0tLS0rLS0tLS0rCisgICAgICAgIHxEUElPIG9ianwgICB8RFBJTyBzZXJ2aWNlfAorICAgICAgICB8IGRyaXZlciB8LS0tfCAgKERQSU8pICAgIHwKKyAgICAgICAgKy0tLS0tLS0tKyAgICstLS0tLS0rLS0tLS0rCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLSstLS0tLSsKKyAgICAgICAgICAgICAgICAgICAgIHwgICAgUUJtYW4gICB8CisgICAgICAgICAgICAgICAgICAgICB8IHBvcnRhbCBpL2YgfAorICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgICAgICAgaGFyZHdhcmUKKworVGhlIGRpYWdyYW0gYmVsb3cgc2hvd3MgaG93IHRoZSBEUElPIGRyaXZlciBjb21wb25lbnRzIGZpdCB3aXRoIHRoZSBvdGhlcgorRFBBQTIgTGludXggZHJpdmVyIGNvbXBvbmVudHM6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBPUyBOZXR3b3JrIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICBTdGFjayAgICB8CisgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0rICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tKworICAgICAgICAgICAgICAgICB8IEFsbG9jYXRvciAgfC4gLiAuIC4gLiAuIC4gICAgICAgfCAgRXRoZXJuZXQgIHwKKyAgICAgICAgICAgICAgICAgfChEUE1DUCxEUEJQKXwgICAgICAgICAgICAgICAgICAgIHwgICAoRFBOSSkgICB8CisgICAgICAgICAgICAgICAgICstLi0tLS0tLS0tLS0rICAgICAgICAgICAgICAgICAgICArLS0tKy0tLSstLS0tKworICAgICAgICAgICAgICAgICAgLiAgICAgICAgICAuICAgICAgICAgICAgICAgICAgICAgICAgIF4gICB8CisgICAgICAgICAgICAgICAgIC4gICAgICAgICAgICAuICAgICAgICAgICA8ZGF0YSBhdmFpbCwgfCAgIHw8ZW5xdWV1ZSwKKyAgICAgICAgICAgICAgICAuICAgICAgICAgICAgICAuICAgICAgICAgICB0eCBjb25maXJtPiB8ICAgfCBkZXF1ZXVlPgorICAgICstLS0tLS0tLS0tLS0tKyAgICAgICAgICAgICAuICAgICAgICAgICAgICAgICAgICAgIHwgICB8CisgICAgfCBEUFJDIGRyaXZlciB8ICAgICAgICAgICAgICAuICAgICstLS0tLS0tLSsgKy0tLS0tLS0tLS0tLSsKKyAgICB8ICAgKERQUkMpICAgIHwgICAgICAgICAgICAgICAuIC4gfERQSU8gb2JqfCB8RFBJTyBzZXJ2aWNlfAorICAgICstLS0tLS0tLS0tKy0tKyAgICAgICAgICAgICAgICAgICB8IGRyaXZlciB8LXwgIChEUElPKSAgICB8CisgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLSsgKy0tLS0tLSstLS0tLSsKKyAgICAgICAgICAgICAgIHw8ZGV2IGFkZC9yZW1vdmU+ICAgICAgICAgICAgICAgICArLS0tLS0tfC0tLS0tKworICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICBRQm1hbiAgICB8CisgICAgICAgICAgKy0tLS0rLS0tLS0tLS0tLS0tLS0rICAgICAgICAgICAgICAgICAgfCBwb3J0YWwgaS9mIHwKKyAgICAgICAgICB8ICAgTUMtYnVzIGRyaXZlciAgIHwgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tKworICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICB8IC9zb2MvZnNsLW1jICAgICAgIHwgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0rICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PXw9PT09PT09PT18PT09PT09PT09PT09PT09PT09PT09PT09CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKy0rLS1EUElPLS0tfC0tLS0tLS0tLS0tKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICBRQm1hbiBQb3J0YWwgICB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKworCisgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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jAKKworLyogQWxhcm0gMiBhbXBsaXR1ZGUgdGhyZXNob2xkICovCisjZGVmaW5lIEFESVMxNjIwMV9BTE1fTUFHMiAgICAgICAweDIyCisKKy8qIEFsYXJtIDEsIHNhbXBsZSBwZXJpb2QgKi8KKyNkZWZpbmUgQURJUzE2MjAxX0FMTV9TTVBMMSAgICAgIDB4MjQKKworLyogQWxhcm0gMiwgc2FtcGxlIHBlcmlvZCAqLworI2RlZmluZSBBRElTMTYyMDFfQUxNX1NNUEwyICAgICAgMHgyNgorCisvKiBBbGFybSBjb250cm9sICovCisjZGVmaW5lIEFESVMxNjIwMV9BTE1fQ1RSTCAgICAgICAweDI4CisKKy8qIEF1eGlsaWFyeSBEQUMgZGF0YSAqLworI2RlZmluZSBBRElTMTYyMDFfQVVYX0RBQyAgICAgICAgMHgzMAorCisvKiBHZW5lcmFsLXB1cnBvc2UgZGlnaXRhbCBpbnB1dC9vdXRwdXQgY29udHJvbCAqLworI2RlZmluZSBBRElTMTYyMDFfR1BJT19DVFJMICAgICAgMHgzMgorCisvKiBNaXNjZWxsYW5lb3VzIGNvbnRyb2wgKi8KKyNkZWZpbmUgQURJUzE2MjAxX01TQ19DVFJMICAgICAgIDB4MzQKKworLyogSW50ZXJuYWwgc2FtcGxlIHBlcmlvZCAocmF0ZSkgY29udHJvbCAqLworI2RlZmluZSBBRElTMTYyMDFfU01QTF9QUkQgICAgICAgMHgzNgorCisvKiBPcGVyYXRpb24sIGZpbHRlciBjb25maWd1cmF0aW9uICovCisjZGVmaW5lIEFESVMxNjIwMV9BVkdfQ05UICAgICAgICAweDM4CisKKy8qIE9wZXJhdGlvbiwgc2xlZXAgbW9kZSBjb250cm9sICovCisjZGVmaW5lIEFESVMxNjIwMV9TTFBfQ05UICAgICAgICAweDNBCisKKy8qIERpYWdub3N0aWNzLCBzeXN0ZW0gc3RhdHVzIHJlZ2lzdGVyICovCisjZGVmaW5lIEFESVMxNjIwMV9ESUFHX1NUQVQgICAgICAweDNDCisKKy8q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BKSAgKCgoQSAmIFJBVEVfTUFTSykgPT0gVFhfUkFURV85TSkgfHwgKChBICYgUkFURV9NQVNLKSA9PSBUWF9SQVRFXzE4TSkgfHwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKEEgJiBSQVRFX01BU0spID09IFRYX1JBVEVfMzZNKSB8fCAoKEEgJiBSQVRFX01BU0spID09IFRYX1JBVEVfNDhNKSB8fCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoQSAmIFJBVEVfTUFTSykgPT0gVFhfUkFURV81NE0pKQorI2RlZmluZSBJU19PRkRNX0VYVF9SQVRFKEEpICgoKEEgJiBSQVRFX01BU0spID09IFRYX1JBVEVfOU0pIHx8ICgoQSAmIFJBVEVfTUFTSykgPT0gVFhfUkFURV8xOE0pIHx8IFwKKwkJCSAgICAgKChBICYgUkFURV9NQVNLKSA9PSBUWF9SQVRFXzM2TSkgfHwgKChBICYgUkFURV9NQVNLKSA9PSBUWF9SQVRFXzQ4TSkgfHwgXAorCQkJICAgICAoKEEgJiBSQVRFX01BU0spID09IFRYX1JBVEVfNTRNKSkKIAogZW51bSB7CiAJQ09OTkVDVF9TVEFUVVMgPSAwLApAQCAtNjAzLDM0ICs2MzMsMzIgQEAKIC8qIG1hY3JvIGZ1bmN0aW9uICovCiAjZGVmaW5lIEhJRl9FVkVOVF9NQVNLIDB4RTgwMAogI2RlZmluZSBJU19ISUZfSU5EKF9FVkVOVCkgICgoX0VWRU5UICYgSElGX0VWRU5UX01BU0spID09IDB4RTgwMCAgJiYgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKF9FVkVOVCAmIH5ISUZfRVZFTlRfTUFTSykgPT0gMHgwMDAxIHx8IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChfRVZFTlQgJiB+SElGX0VWRU5UX01BU0spID09IDB4MDAwNiB8fCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoX0VWRU5UICYgfkhJRl9FVkVOVF9NQVNLKSA9PSAweDAwMEMgfHwgXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKF9FVkVOVCAmIH5ISUZfRVZFTlRfTUFTSykgPT0gMHgwMDExIHx8IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChfRVZFTlQgJiB+SElGX0VWRU5UX01BU0spID09IDB4MDAxMikpCisJCQkgICAgICgoX0VWRU5UICYgfkhJRl9FVkVOVF9NQVNLKSA9PSAweDAwMDEgfHwgXAorCQkJICAgICAoX0VWRU5UICYgfkhJRl9FVkVOVF9NQVNLKSA9PSAweDAwMDYgfHwgXAorCQkJICAgICAoX0VWRU5UICYgfkhJRl9FVkVOVF9NQVNLKSA9PSAweDAwMEMgfHwgXAorCQkJICAgICAoX0VWRU5UICYgfkhJRl9FVkVOVF9NQVNLKSA9PSAweDAwMTEgfHwgXAorCQkJICAgICAoX0VWRU5UICYgfkhJRl9FVkVOVF9NQVNLKSA9PSAweDAwMTIpKQogCiAjZGVmaW5lIElTX0hJRl9DT05GKF9FVkVOVCkgKChfRVZFTlQgJiBISUZfRVZFTlRfTUFTSykgPT0gMHhFODAwICAmJiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIChfRVZFTlQgJiB+SElGX0VWRU5UX01BU0spID4gMHgwMDAwICAmJiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIChfRVZFTlQgJiB+SElGX0VWRU5UX01BU0spIDwgMHgwMDEyICAmJiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICFJU19ISUZfSU5EKF9FVkVOVCkgKQorCQkJICAgICAoX0VWRU5UICYgfkhJRl9FVkVOVF9NQVNLKSA+IDB4MDAwMCAgJiYgXAorCQkJICAgICAoX0VWRU5UICYgfkhJRl9FVkVOVF9NQVNLKSA8IDB4MDAxMiAgJiYgXAorCQkJICAgICAhSVNfSElGX0lORChfRVZFTlQpKQogCiAjaWZkZWYgX19LRVJORUxfXwogCiAjaW5jbHVkZSAia3Nfd2xhb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IHNlbnNvciBzdXBwb3J0IgorICAgICAgIGRlcGVuZHMgb24gSTJDICYmIFZJREVPX1Y0TDIKKyAgICAgICAtLS1oZWxwLS0tCisgICAgICAgICBUaGlzIGlzIGEgVmlkZW80TGludXgyIHNlbnNvci1sZXZlbCBkcml2ZXIgZm9yIHRoZSBPVlQKKyAgICAgICAgIEdDMjIzNSByYXcgY2FtZXJhLgorCisgICAgICAgICBHQzIyMzUgaXMgYSAyTSByYXcgc2Vuc29yLgorCisgICAgICAgICBJdCBjdXJyZW50bHkgb25seSB3b3JrcyB3aXRoIHRoZSBhdG9taXNwIGRyaXZlci4KKworY29uZmlnIFZJREVPX09WODg1OAorICAgICAgIHRyaXN0YXRlICJPbW5pdmlzaW9uIG92ODg1OCBzZW5zb3Igc3VwcG9ydCIKKyAgICAgICBkZXBlbmRzIG9uIEkyQyAmJiBWSURFT19WNEwyICYmIFZJREVPX0FUT01JU1AKKyAgICAgICAtLS1oZWxwLS0tCisgICAgICAgICBUaGlzIGlzIGEgVmlkZW80TGludXgyIHNlbnNvci1sZXZlbCBkcml2ZXIgZm9yIHRoZSBPbW5pdmlzaW9uCisgICAgICAgICBvdjg4NTggUkFXIHNlbnNvci4KKworCSBPVjg4NTggaXMgYSA4TSByYXcgc2Vuc29yLgorCisgICAgICAgICBJdCBjdXJyZW50bHkgb25seSB3b3JrcyB3aXRoIHRoZSBhdG9taXNwIGRyaXZlci4KKworY29uZmlnIFZJREVPX01TUkxJU1RfSEVMUEVSCisgICAgICAgdHJpc3RhdGUgIkhlbHBlciBsaWJyYXJ5IHRvIGxvYWQsIHBhcnNlIGFuZCBhcHBseSBsYXJnZSByZWdpc3RlciBsaXN0cy4iCisgICAgICAgZGVwZW5kcyBvbiBJMkMKKyAgICAgICAtLS1oZWxwLS0tCisgICAgICAgICBUaGlzIGlzIGEgaGVscGVyIGxpYnJhcnkgdG8gYmUgdXNlZCBmcm9tIGEgc2Vuc29yIGRyaXZlciB0byBsb2FkLCBwYXJzZQorICAgICAgICAgYW5kIGFwcGx5IGxhcmdlIHJlZ2lzdGVyIGxpc3RzLgorCisgICAgICAgICBUbyBjb21waWxlIHRoaXMgZHJpdmVyIGFzIGEgbW9kdWxlLCBjaG9vc2UgTSBoZXJlOiB0aGUKKyAgICAgICAgIG1vZHVsZSB3aWxsIGJlIGNhbGxlZCBsaWJtc3JsaXN0aGVscGVyLgorCitjb25maWcgVklERU9fTVQ5TTExNAorICAgICAgIHRyaXN0YXRlICJBcHRpbmEgbXQ5bTExNCBzZW5zb3Igc3VwcG9ydCIKKyAgICAgICBkZXBlbmRzIG9uIEkyQyAmJiBWSURFT19WNEwyCisgICAgICAgLS0taGVscC0tLQorICAgICAgICAgVGhpcyBpcyBhIFZpZGVvNExpbnV4MiBzZW5zb3ItbGV2ZWwgZHJpdmVyIGZvciB0aGUgTWljcm9uCisgICAgICAgICBtdDltMTE0IDEuMyBNcGl4ZWwgY2FtZXJhLgorCisgICAgICAgICBtdDltMTE0IGlzIHZpZGVvIGNhbWVyYSBzZW5zb3IuCisKKyAgICAgICAgIEl0IGN1cnJlbnRseSBvbmx5IHdvcmtzIHdpdGggdGhlIGF0b21pc3AgZHJpdmVyLgorCitjb25maWcgVklERU9fQVAxMzAyCisgICAgICAgdHJpc3RhdGUgIkFQMTMwMiBleHRlcm5hbCBJU1Agc3VwcG9ydCIKKyAgICAgICBkZXBlbmRzIG9uIEkyQyAmJiBWSURFT19WNEwyCisgICAgICAgc2VsZWN0IFJFR01BUF9JMkMKKyAgICAgICAtLS1oZWxwLS0tCisgICAgICAgICBUaGlzIGlzIGEgVmlkZW80TGludXgyIHNlbnNvci1sZXZlbCBkcml2ZXIgZm9yIHRoZSBleHRlcm5hbAorICAgICAgICAgSVNQIEFQMTMwMi4KKworICAgICAgICAgQVAxMzAyIGlzIGFuIGV4dGVyYWwgSVNQLgorCisgICAgICAgICBJdCBjdXJyZW50bHkgb25seSB3b3JrcyB3aXRoIHRoZSBhdG9taXNwIGRyaXZlci4KKworY29uZmlnIFZJREVPX0dDMDMxMAorCXRyaXN0YXRlICJHQzAzMTAgc2Vuc29yIHN1cHBvcnQiCisgICAgICAgIGRlcGVuZHMgb24gSTJDICYmIFZJREVPX1Y0TDIKKyAgICAgICAgLS0taGVscC0tLQorICAgICAgICAgVGhpcyBpcyBhIFZpZGVvNExpbnV4MiBzZW5zb3ItbGV2ZWwgZHJpdmVyIGZvciB0aGUgR2FsYXh5Y29yZQorICAgICAgICAgR0MwMzEwIDAuM01QIHNlbnNvci4KKwkgCitjb25maWcgVklERU9fT1YyNjgwCisgICAgICAgdHJpc3RhdGUgIk9tbml2aXNpb24gT1YyNjgwIHNlbnNvciBzdXBwb3J0IgorICAgICAgIGRlcGVuZHMgb24gSTJDICYmIFZJREVPX1Y0TDIKKyAgICAgICAtLS1oZWxwLS0tCisgICAgICAgICBUaGlzIGlzIGEgVmlkZW80TGludXgyIHNlbnNvci1sZXZlbCBkcml2ZXIgZm9yIHRoZSBPbW5pdmlzaW9uCisgICAgICAgICBPVjI2ODAgcmF3IGNhbWVyYS4KKworICAgICAgICAgb3YyNjgwIGlzIGEgMk0gcmF3IHNlbnNvci4KKworICAgICAgICAgSXQgY3VycmVudGx5IG9ubHkgd29ya3Mgd2l0aCB0aGUgYXRvbWlzcCBkcml2ZXIuCisKKyMKKyMgS2NvbmZpZyBmb3IgZmxhc2ggZHJpdmVycworIworCitjb25maWcgVklERU9fTE0zNTU0CisgICAgICAgdHJpc3RhdGUgIkxNMzU1NCBmbGFzaCBsaWdodCBkcml2ZXIiCisgICAgICAgZGVwZW5kcyBvbiBWSURFT19WNEwyICYmIEkyQworICAgICAgIC0tLWhlbHAtLS0KKyAgICAgICAgIFRoaXMgaXMgYSBWaWRlbzRMaW51eDIgc3ViLWRldiBkcml2ZXIgZm9yIHRoZSBMTTM1NTQKKyAgICAgICAgIGZsYXNoIGxpZ2h0IGRyaXZlci4KKworICAgICAgICAgVG8gY29tcGlsZSB0aGlzIGRyaXZlciBhcyBhIG1vZHVsZSw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ZW50LT5kZXYsCisJCQkibm8gY2FtZXJhX3NlbnNvcl9wbGF0Zm9ybV9kYXRhIik7CisJCXJldHVybiAtRU5PREVWOworCX0KKworCS8qIGdwaW8gY3RybCAqLworCXJldCA9IGdwaW9fY3RybChzZCwgMCk7CisJaWYgKHJldCkgeworCQlyZXQgPSBncGlvX2N0cmwoc2QsIDApOworCQlpZiAocmV0KQorCQkJZGV2X2VycigmY2xpZW50LT5kZXYsICJncGlvIGZhaWxlZCAyXG4iKTsKKwl9CisKKwlyZXQgPSBkZXYtPnBsYXRmb3JtX2RhdGEtPmZsaXNjbGtfY3RybChzZCwgMCk7CisJaWYgKHJldCkKKwkJZGV2X2VycigmY2xpZW50LT5kZXYsICJmbGlzY2xrIGZhaWxlZFxuIik7CisKKwkvKiBwb3dlciBjb250cm9sICovCisJcmV0ID0gcG93ZXJfY3RybChzZCwgMCk7CisJaWYgKHJldCkKKwkJZGV2X2VycigmY2xpZW50LT5kZXYsICJ2cHJvZyBmYWlsZWQuXG4iKTsKKworCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyBpbnQgZ2MwMzEwX3NfcG93ZXIoc3RydWN0IHY0bDJfc3ViZGV2ICpzZCwgaW50IG9uKQoreworCWludCByZXQ7CisJaWYgKG9uID09IDApCisJCXJldHVybiBwb3dlcl9kb3duKHNkKTsKKwllbHNlIHsKKwkJcmV0ID0gcG93ZXJfdXAoc2QpOworCQlpZiAoIXJldCkKKwkJCXJldHVybiBnYzAzMTBfaW5pdChzZCk7CisJfQorCXJldHVybiByZXQ7Cit9CisKKy8qCisgKiBkaXN0YW5jZSAtIGNhbGN1bGF0ZSB0aGUgZGlzdGFuY2UKKyAqIEByZXM6IHJlc29sdXRpb24KKyAqIEB3OiB3aWR0aAorICogQGg6IGhlaWdodAorICoKKyAqIEdldCB0aGUgZ2FwIGJldHdlZW4gcmVzb2x1dGlvbiBhbmQgdy9oLgorICogcmVzLT53aWR0aC9oZWlnaHQgc21hbGxlciB0aGFuIHcvaCB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mgKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uY2YzNTE5NwotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9hdG9taXNwL2kyYy9pbXgvaW14MTM0LmgKQEAgLTAsMCArMSwyNDY0IEBACisjaWZuZGVmIF9fSU1YMTM0X0hfXworI2RlZmluZSBfX0lNWDEzNF9IX18KKworLyoqKioqKioqKioqKioqKioqKioqKiogaW14MTM0IHNldHRpbmcgLSB2ZXJzaW9uIDEgKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHN0cnVjdCBpbXhfcmVnIGNvbnN0IGlteDEzNF9pbml0X3NldHRpbmdzW10gPSB7CisJR1JPVVBFRF9QQVJBTUVURVJfSE9MRF9FTkFCTEUsCisJLyogQmFzaWMgc2V0dGluZ3MgKi8KKwl7IElNWF84QklULCAweDAxMDUsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAyMjAsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDMzMDIsIDB4MTEgfSwKKwl7IElNWF84QklULCAweDM4MzMsIDB4MjAgfSwKKwl7IElNWF84QklULCAweDM4OTMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDM5MDYsIDB4MDggfSwKKwl7IElNWF84QklULCAweDM5MDcsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDM5MUIsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDNDMDksIDB4MDEgfSwKKwl7IElNWF84QklULCAweDYwMEEsIDB4MDAgfSwKKworCS8qIEFuYWxvZyBzZXR0aW5ncyAqLworCXsgSU1YXzhCSVQsIDB4MzAwOCwgMHhCMCB9LAorCXsgSU1YXzhCSVQsIDB4MzIwQSwgMHgwMSB9LAorCXsgSU1YXzhCSVQsIDB4MzIwRCwgMHgxMCB9LAorCXsgSU1YXzhCSVQsIDB4MzIxNiwgMHgyRSB9LAorCXsgSU1YXzhCSVQsIDB4MzIyQywgMHgwMiB9LAorCXsg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IH0sCisJeyBJTVhfOEJJVCwgMHgwMzA5LCAweDA1IH0sCisJeyBJTVhfOEJJVCwgMHgwMzBCLCAweDAxIH0sCisJeyBJTVhfOEJJVCwgMHgwMzBDLCAweDAxIH0sCisJeyBJTVhfOEJJVCwgMHgwMzBELCAweEE5IH0sCisJeyBJTVhfOEJJVCwgMHgwMzBFLCAweDAxIH0sCisJeyBJTVhfOEJJVCwgMHgzQTA2LCAweDExIH0sCisKKwkvKiBNb2RlIHNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAxMDgsIDB4MDMgfSwKKwl7IElNWF84QklULCAweDAxMTIsIDB4MEEgfSwKKwl7IElNWF84QklULCAweDAxMTMsIDB4MEEgfSwKKwl7IElNWF84QklULCAweDAzODEsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODMsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODUsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODcsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzOTAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzOTEsIDB4MTEgfSwKKwl7IElNWF84QklULCAweDAzOTIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDA0MDEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDA0MDQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDA0MDUsIDB4MTAgfSwgLyogZG93biBzY2FsaW5nIDE2LzE2ID0gMSAqLworCXsgSU1YXzhCSVQsIDB4NDA4MiwgMHgwMSB9LAorCXsgSU1YXzhCSVQsIDB4NDA4MywgMHgwMSB9LAorCXsgSU1YXzhCSVQsIDB4NzAwNiwgMHgwNCB9LAorCisJLyogb3B0aW9ubmFsIEZ1bmN0aW9uIHNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDA3MDAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDNBNjMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQxMDAsIDB4RjggfSwKKwl7IElNWF84Qkl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KKwl7IElNWF84QklULCAweDAzNTAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTQsIDB4MEMgfSwKKwl7IElNWF84QklULCAweDAzNTUsIDB4RDAgfSwKKwl7IElNWF84QklULCAweDAzNTYsIDB4MDkgfSwKKwl7IElNWF84QklULCAweDAzNTcsIDB4QTAgfSwKKwl7IElNWF84QklULCAweDMwMUQsIDB4MzAgfSwKKwl7IElNWF84QklULCAweDMzMTAsIDB4MEMgfSwKKwl7IElNWF84QklULCAweDMzMTEsIDB4RDAgfSwKKwl7IElNWF84QklULCAweDMzMTIsIDB4MDkgfSwKKwl7IElNWF84QklULCAweDMzMTMsIDB4QTAgfSwKKwl7IElNWF84QklULCAweDMzMUMsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDMzMUQsIDB4QUUgfSwKKwl7IElNWF84QklULCAweDQwODQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODUsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODYsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODcsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQ0MDAsIDB4MDAgfSwKKworCS8qIEdsb2JhbCB0aW1pbmcgc2V0dGluZyAqLworCXsgSU1YXzhCSVQsIDB4MDgzMCwgMHg3NyB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMSwgMHgyRiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMiwgMHg0RiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMywgMHgzNyB9LAorCXsgSU1YXzhCSVQsIDB4MDgzNCwgMHgyRiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzNSwgMHgzNyB9LAorCXsgSU1YXzhCSVQsIDB4MDgzNiwgMHhBRiB9LAorCXsgSU1YXzhCSVQ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AweDAwIH0sCisJeyBJTVhfOEJJVCwgMHg0MDg3LCAweDAwIH0sCisJeyBJTVhfOEJJVCwgMHg0NDAwLCAweDAwIH0sCisKKwkvKiBHbG9iYWwgVGltaW5nIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDA4MzAsIDB4NzcgfSwKKwl7IElNWF84QklULCAweDA4MzEsIDB4MkYgfSwKKwl7IElNWF84QklULCAweDA4MzIsIDB4NEYgfSwKKwl7IElNWF84QklULCAweDA4MzMsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzQsIDB4MkYgfSwKKwl7IElNWF84QklULCAweDA4MzUsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzYsIDB4QUYgfSwKKwl7IElNWF84QklULCAweDA4MzcsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzksIDB4MUYgfSwKKwl7IElNWF84QklULCAweDA4M0EsIDB4MTcgfSwKKwl7IElNWF84QklULCAweDA4M0IsIDB4MDIgfSwKKworCS8qIEludGVncmF0aW9uIFRpbWUgU2V0dGluZyAqLworCXsgSU1YXzhCSVQsIDB4MDIwMiwgMHgwOSB9LAorCXsgSU1YXzhCSVQsIDB4MDIwMywgMHhEMiB9LAorCisJLyogSERSIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAyMzAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzUsIDB4NDAgfSwKKwl7IElNWF84QklULCAweDAyMzgsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzksIDB4MDQgfSwKKwl7IElNWF84QklULCAweDAyM0IsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyM0MsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDMzQjAsIDB4MDQgfSwKKwl7IElNWF84QklULCAweDMzQjEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDMzQjMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDMzQjQsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDM4MDAsIDB4MDAgfSwKKwl7IElNWF9UT0tfVEVSTSwgMCwgMCB9Cit9OworCisvKiA0IGxhbmUsIDEvNCBiaW5uaW5nIDMwZnBzIDgyMHg2MTYsIHZlbmRvciBwcm92aWRlICovCitzdGF0aWMgc3RydWN0IGlteF9yZWcgY29uc3QgaW14MTM0XzgyMF82MTZfMzBmcHNbXSA9IHsKKwlHUk9VUEVEX1BBUkFNRVRFUl9IT0xEX0VOQUJMRSwKKwkvKiBtb2RlIHNldCBjbGVhciAqLworCXsgSU1YXzhCSVQsIDB4M0E0MywgMHgwMSB9LAorCS8qIENsb2NrIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAxMUUsIDB4MTMgfSwKKwl7IElNWF84QklULCAweDAxMUYsIDB4MzMgfSwKKwl7IElNWF84QklULCAweDAzMDEsIDB4MDUgfSwKKwl7IElNWF84QklULCAweDAzMDMsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzMDUsIDB4MEMgfSwKKwl7IElNWF84QklULCAweDAzMDksIDB4MDUgfSwKKwl7IElNWF84QklULCAweDAzMEIsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzMEMsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzMEQsIDB4QTkgfSwKKwl7IElNWF84QklULCAweDAzMEUsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDNBMDYsIDB4MTEgfSwKKworCS8qIE1vZGUgc2V0dGluZyAqLworCXsgSU1YXzhCSVQsIDB4MDEwOCwgMHgwMyB9LAorCXsgSU1YXzhCSVQsIDB4MDExMiwgMHgwQSB9LAorCXsgSU1YXzhCSVQsIDB4MDExMywgMHgwQSB9LAorCXsgSU1YXzhCSVQsIDB4MDM4MSwgMHgwMSB9LAorCXsgSU1YXzhCSVQsIDB4MDM4MywgMHg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NWF84QklULCAweDAzNTAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTQsIDB4MDMgfSwKKwl7IElNWF84QklULCAweDAzNTUsIDB4MzQgfSwKKwl7IElNWF84QklULCAweDAzNTYsIDB4MDIgfSwKKwl7IElNWF84QklULCAweDAzNTcsIDB4MjggfSwKKwl7IElNWF84QklULCAweDMwMUQsIDB4MzAgfSwKKwl7IElNWF84QklULCAweDMzMTAsIDB4MDMgfSwKKwl7IElNWF84QklULCAweDMzMTEsIDB4MzQgfSwKKwl7IElNWF84QklULCAweDMzMTIsIDB4MDIgfSwKKwl7IElNWF84QklULCAweDMzMTMsIDB4MjggfSwKKwl7IElNWF84QklULCAweDMzMUMsIDB4MDIgfSwKKwl7IElNWF84QklULCAweDMzMUQsIDB4RDAgfSwKKwl7IElNWF84QklULCAweDQwODQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODUsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODYsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODcsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQ0MDAsIDB4MDAgfSwKKworCS8qIEdsb2JhbCBUaW1pbmcgU2V0dGluZyAqLworCXsgSU1YXzhCSVQsIDB4MDgzMCwgMHg3NyB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMSwgMHgyRiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMiwgMHg0RiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMywgMHgzNyB9LAorCXsgSU1YXzhCSVQsIDB4MDgzNCwgMHgyRiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzNSwgMHgzNyB9LAorCXsgSU1YXzhCSVQsIDB4MDgzNiwgMHhBRiB9LAorCXsgSU1YXzhCSVQsIDB4MDgz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xMSwgMHhGMCB9LAorCXsgSU1YXzhCSVQsIDB4MzMxMiwgMHgwMiB9LAorCXsgSU1YXzhCSVQsIDB4MzMxMywgMHg2OCB9LAorCisJeyBJTVhfOEJJVCwgMHgzMzFDLCAweDAyIH0sCisJeyBJTVhfOEJJVCwgMHgzMzFELCAweEQwIH0sCisJeyBJTVhfOEJJVCwgMHg0MDg0LCAweDAwIH0sCisJeyBJTVhfOEJJVCwgMHg0MDg1LCAweDAwIH0sCisJeyBJTVhfOEJJVCwgMHg0MDg2LCAweDAwIH0sCisJeyBJTVhfOEJJVCwgMHg0MDg3LCAweDAwIH0sCisJeyBJTVhfOEJJVCwgMHg0NDAwLCAweDAwIH0sCisKKwkvKiBHbG9iYWwgVGltaW5nIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDA4MzAsIDB4NzcgfSwKKwl7IElNWF84QklULCAweDA4MzEsIDB4MkYgfSwKKwl7IElNWF84QklULCAweDA4MzIsIDB4NEYgfSwKKwl7IElNWF84QklULCAweDA4MzMsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzQsIDB4MkYgfSwKKwl7IElNWF84QklULCAweDA4MzUsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzYsIDB4QUYgfSwKKwl7IElNWF84QklULCAweDA4MzcsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzksIDB4MUYgfSwKKwl7IElNWF84QklULCAweDA4M0EsIDB4MTcgfSwKKwl7IElNWF84QklULCAweDA4M0IsIDB4MDIgfSwKKworCS8qIEludGVncmF0aW9uIFRpbWUgU2V0dGluZyAqLworCXsgSU1YXzhCSVQsIDB4MDIwMiwgMHgwOSB9LAorCXsgSU1YXzhCSVQsIDB4MDIwMywgMHhEMiB9LAorCisJLyogSERSIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAyMzAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzMsIDB4MDA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wgMHgwMzBCLCAweDAxIH0sCisJeyBJTVhfOEJJVCwgMHgwMzBDLCAweDAxIH0sCisJeyBJTVhfOEJJVCwgMHgwMzBELCAweEE5IH0sCisJeyBJTVhfOEJJVCwgMHgwMzBFLCAweDAxIH0sCisJeyBJTVhfOEJJVCwgMHgzQTA2LCAweDExIH0sCisKKwkvKiBNb2RlIHNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAxMDgsIDB4MDMgfSwKKwl7IElNWF84QklULCAweDAxMTIsIDB4MEEgfSwKKwl7IElNWF84QklULCAweDAxMTMsIDB4MEEgfSwKKwl7IElNWF84QklULCAweDAzODEsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODMsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODUsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODcsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzOTAsIDB4MDAgfSwgLyogZGlzYWJsZSBiaW5uaW5nICovCisJeyBJTVhfOEJJVCwgMHgwMzkxLCAweDExIH0sCisJeyBJTVhfOEJJVCwgMHgwMzkyLCAweDAwIH0sCisJeyBJTVhfOEJJVCwgMHgwNDAxLCAweDAyIH0sIC8qIEgvViByZXNpemUgKi8KKwl7IElNWF84QklULCAweDA0MDQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDA0MDUsIDB4MUIgfSwgLyogZG93bnNjYWxpbmcgMTYvMjcqLworCXsgSU1YXzhCSVQsIDB4NDA4MiwgMHgwMCB9LAorCXsgSU1YXzhCSVQsIDB4NDA4MywgMHgwMCB9LAorCXsgSU1YXzhCSVQsIDB4NzAwNiwgMHgwNCB9LAorCisJLyogT3B0aW9ubmFsIEZ1bmN0aW9uIHNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDA3MDAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDNBNjMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQxMDAsIDB4RjggfSwKKwl7IElNWF84QklULCAweDQyMDMsI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7IElNWF84QklULCAweDAzNTEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTQsIDB4MEMgfSwgLyogY3JvcCB4OjMxNDYgKi8KKwl7IElNWF84QklULCAweDAzNTUsIDB4QzQgfSwKKwl7IElNWF84QklULCAweDAzNTYsIDB4MDcgfSwgLyogeHJvcCB5OjE3ODIgKi8KKwl7IElNWF84QklULCAweDAzNTcsIDB4M0EgfSwKKwl7IElNWF84QklULCAweDMwMUQsIDB4MzAgfSwKKwl7IElNWF84QklULCAweDMzMTAsIDB4MDcgfSwgLyogZGVjaWRlIGJ5IG1vZGUgYW5kIG91dHB1dCBzaXplICovCisJeyBJTVhfOEJJVCwgMHgzMzExLCAweDkwIH0sCisJeyBJTVhfOEJJVCwgMHgzMzEyLCAweDA0IH0sCisJeyBJTVhfOEJJVCwgMHgzMzEzLCAweDQ4IH0sCisJeyBJTVhfOEJJVCwgMHgzMzFDLCAweDA0IH0sCisJeyBJTVhfOEJJVCwgMHgzMzFELCAweDFFIH0sCisJeyBJTVhfOEJJVCwgMHg0MDg0LCAweDA3IH0sCisJeyBJTVhfOEJJVCwgMHg0MDg1LCAweDkwIH0sCisJeyBJTVhfOEJJVCwgMHg0MDg2LCAweDA0IH0sCisJeyBJTVhfOEJJVCwgMHg0MDg3LCAweDQ4IH0sCisJeyBJTVhfOEJJVCwgMHg0NDAwLCAweDAwIH0sCisKKwkvKiBHbG9iYWwgVGltaW5nIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDA4MzAsIDB4NzcgfSwKKwl7IElNWF84QklULCAweDA4MzEsIDB4MkYgfSwKKwl7IElNWF84QklULCAweDA4MzIsIDB4NEYgfSwKKwl7IElNWF84QklULCAweDA4MzMsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzQsIDB4MkYgfSwKKwl7IElNWF84QklULCAweDA4MzUsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzYsIDB4QUYgfSwKKwl7IElNWF84QklULCAweDA4MzcsIDB4MzcgfSwKKwl7IElNWF84QklULCAweDA4MzksIDB4MUYgfSwKKwl7IElNWF84QklULCAweDA4M0EsIDB4MTcgfSwKKwl7IElNWF84QklULCAweDA4M0IsIDB4MDIgfSwKKworCS8qIEludGVncmF0aW9uIFRpbWUgU2V0dGluZyAqLworCXsgSU1YXzhCSVQsIDB4MDIwMiwgMHgwOSB9LAorCXsgSU1YXzhCSVQsIDB4MDIwMywgMHhEMiB9LAorCisJLyogSERSIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAyMzAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzUsIDB4NDAgfSwKKwl7IElNWF84QklULCAweDAyMzgsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzksIDB4MDQgfSwKKwl7IElNWF84QklULCAweDAyM0IsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyM0MsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDMzQjAsIDB4MDQgfSwKKwl7IElNWF84QklULCAweDMzQjEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDMzQjMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDMzQjQsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDM4MDAsIDB4MDAgfSwKKwl7IElNWF9UT0tfVEVSTSwgMCwgMCB9Cit9OworCisvKiA0IGxhbmUgMTI5Nng3MzYsIDMwZnBzLCBmb3IgNzIwcCBzdGlsbCBjYXB0dXJlLCAgdmVuZG9yIHByb3ZpZGUgKi8KK3N0YXRpYyBzdHJ1Y3QgaW14X3JlZyBjb25zdCBpbXgxMzRfMTI5Nl83MzZfMzBmcHNfdjJbXSA9IHs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DB4NkMgfSwgICAgICAvKgl5X291dHB1dF9zaXplWzc6MF0JKi8KKwl7IElNWF84QklULCAweDAzNTAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTQsIDB4MDYgfSwKKwl7IElNWF84QklULCAweDAzNTUsIDB4MjAgfSwKKwl7IElNWF84QklULCAweDAzNTYsIDB4MDMgfSwKKwl7IElNWF84QklULCAweDAzNTcsIDB4NkMgfSwKKwl7IElNWF84QklULCAweDMwMUQsIDB4MzAgfSwKKwl7IElNWF84QklULCAweDMzMTAsIDB4MDYgfSwKKwl7IElNWF84QklULCAweDMzMTEsIDB4MjAgfSwKKwl7IElNWF84QklULCAweDMzMTIsIDB4MDMgfSwKKwl7IElNWF84QklULCAweDMzMTMsIDB4NkMgfSwKKwl7IElNWF84QklULCAweDMzMUMsIDB4MDMgfSwKKwl7IElNWF84QklULCAweDMzMUQsIDB4RjIgfSwKKwl7IElNWF84QklULCAweDQwODQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODUsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODYsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODcsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQ0MDAsIDB4MDAgfSwKKworCS8qIEdsb2JhbCBUaW1pbmcgU2V0dGluZyAqLworCXsgSU1YXzhCSVQsIDB4MDgzMCwgMHg2RiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMSwgMHgyNyB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMiwgMHg0RiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzMywgMHgyRiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzNCwgMHgyRiB9LAorCXsgSU1YXzhCSVQsIDB4MDgzNSwgMHgyRiB9LAorCXsgSU1YX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dGlvbiBUaW1lIFNldHRpbiAqLworCXsgSU1YXzhCSVQsIDB4MDIwMiwgMHgwNSB9LAorCXsgSU1YXzhCSVQsIDB4MDIwMywgMHg0MiB9LAorCisJLyogSERSIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAyMzAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzUsIDB4NDAgfSwKKwl7IElNWF84QklULCAweDAyMzgsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyMzksIDB4MDQgfSwKKwl7IElNWF84QklULCAweDAyM0IsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAyM0MsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDMzQjAsIDB4MDQgfSwKKwl7IElNWF84QklULCAweDMzQjEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDMzQjMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDMzQjQsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDM4MDAsIDB4MDAgfSwKKwl7IElNWF9UT0tfVEVSTSwgMCwgMCB9Cit9Oworc3RhdGljIHN0cnVjdCBpbXhfcmVnIGNvbnN0IGlteDEzNF8yMzM2XzEzMDhfNjBmcHNbXSA9IHsKKwlHUk9VUEVEX1BBUkFNRVRFUl9IT0xEX0VOQUJMRSwKKwkvKiBtb2RlIHNldCBjbGVhciAqLworCXsgSU1YXzhCSVQsIDB4M0E0MywgMHgwMSB9LAorCS8qIENsb2NrIFNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAxMUUsIDB4MTMgfSwKKwl7IElNWF84QklULCAweDAxMUYsIDB4MzMgfSwKKwl7IElNWF84QklULCAweDAzMDEsIDB4MDUgfSwKKwl7IElNWF84QklULCAweDAzMDMsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzMD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EgfSwKKwl7IElNWF84QklULCAweDAzODcsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzOTAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzOTEsIDB4MTEgfSwKKwl7IElNWF84QklULCAweDAzOTIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDA0MDEsIDB4MDIgfSwKKwl7IElNWF84QklULCAweDA0MDQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDA0MDUsIDB4MUMgfSwKKwl7IElNWF84QklULCAweDQwODIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDcwMDYsIDB4MDQgfSwKKwkvKiBzaXplIHNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAzNDQsIDB4MDAgfSwgLyogNjAsNDA0LDQxNDcsMjcxNTogNDA4OHgyMzEyICovCisJeyBJTVhfOEJJVCwgMHgwMzQ1LCAweDNDIH0sCisJeyBJTVhfOEJJVCwgMHgwMzQ2LCAweDAxIH0sCisJeyBJTVhfOEJJVCwgMHgwMzQ3LCAweDk0IH0sCisJeyBJTVhfOEJJVCwgMHgwMzQ4LCAweDEwIH0sCisJeyBJTVhfOEJJVCwgMHgwMzQ5LCAweDMzIH0sCisJeyBJTVhfOEJJVCwgMHgwMzRBLCAweDBBIH0sCisJeyBJTVhfOEJJVCwgMHgwMzRCLCAweDlCIH0sCisJeyBJTVhfOEJJVCwgMHgwMzRDLCAweDA5IH0sIC8qMjMzNiB4IDEzMjAgKi8KKwl7IElNWF84QklULCAweDAzNEQsIDB4MjAgfSwKKwl7IElNWF84QklULCAweDAzNEUsIDB4MDUgfSwKKwl7IElNWF84QklULCAweDAzNEYsIDB4MjggfSwKKwl7IElNWF84QklULCAweDAzNTAsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTEsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDAzNTMsIDB4M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JUElfMjA5XzZNSFpfU0FMVEJBWSwKKwkvKiBtb2RlIHNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAxMDgsIDB4MDMgfSwKKwl7IElNWF84QklULCAweDAxMTIsIDB4MEEgfSwKKwl7IElNWF84QklULCAweDAxMTMsIDB4MEEgfSwKKwl7IElNWF84QklULCAweDAzODEsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODMsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODUsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzODcsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzOTAsIDB4MDEgfSwKKwl7IElNWF84QklULCAweDAzOTEsIDB4MjIgfSwKKwl7IElNWF84QklULCAweDAzOTIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDA0MDEsIDB4MDIgfSwKKwl7IElNWF84QklULCAweDA0MDQsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDA0MDUsIDB4MTUgfSwKKwl7IElNWF84QklULCAweDQwODIsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDQwODMsIDB4MDAgfSwKKwl7IElNWF84QklULCAweDcwMDYsIDB4MDQgfSwKKwkvKiBzaXplIHNldHRpbmcgKi8KKwl7IElNWF84QklULCAweDAzNDQsIDB4MDAgfSwgLyogNDYsNDA0LDQxNjEsMjcxNTogNDExNngyMzEyICovCisJeyBJTVhfOEJJVCwgMHgwMzQ1LCAweDJlIH0sCisJeyBJTVhfOEJJVCwgMHgwMzQ2LCAweDAxIH0sCisJeyBJTVhfOEJJVCwgMHgwMzQ3LCAweDk0IH0sCisJeyBJTVhfOEJJVCwgMHgwMzQ4LCAweDEwIH0sCisJeyBJTVhfOEJJVCwgMHgwMzQ5LCAweDQxIH0sCisJeyBJTVhfOEJJVCwgMHgwMzRBLCAweDBBIH0sCisJeyBJTVhfOEJJVCwgMHgwMzRCLCAweDlCIH0sCisJeyBJTVhfOEJJVCwgMHgwMzRDLCAweDA2IH0sIC8qMTU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ZGF0YV9sZW5ndGggPT0gTUlTRU5TT1JfMTZCSVQpCisJCQkqdmFsID0gZGF0YVsxXSArIChkYXRhWzBdIDw8IDgpOworCQllbHNlCisJCQkqdmFsID0gZGF0YVszXSArIChkYXRhWzJdIDw8IDgpICsKKwkJCSAgICAoZGF0YVsxXSA8PCAxNikgKyAoZGF0YVswXSA8PCAyNCk7CisKKwkJcmV0dXJuIDA7CisJfQorCisJZGV2X2VycigmY2xpZW50LT5kZXYsICJyZWFkIGZyb20gb2Zmc2V0IDB4JXggZXJyb3IgJWQiLCByZWcsIGVycik7CisJcmV0dXJuIGVycjsKK30KKworc3RhdGljIGludAorbXQ5bTExNF93cml0ZV9yZWcoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgdTE2IGRhdGFfbGVuZ3RoLCB1MTYgcmVnLCB1MzIgdmFsKQoreworCWludCBudW1fbXNnOworCXN0cnVjdCBpMmNfbXNnIG1zZzsKKwl1bnNpZ25lZCBjaGFyIGRhdGFbNl0gPSB7MH07CisJdTE2ICp3cmVnOworCWludCByZXRyeSA9IDA7CisKKwlpZiAoIWNsaWVudC0+YWRhcHRlcikgeworCQl2NGwyX2VycihjbGllbnQsICIlcyBlcnJvciwgbm8gY2xpZW50LT5hZGFwdGVyXG4iLCBfX2Z1bmNfXyk7CisJCXJldHVybiAtRU5PREVWOworCX0KKworCWlmIChkYXRhX2xlbmd0aCAhPSBNSVNFTlNPUl84QklUICYmIGRhdGFfbGVuZ3RoICE9IE1JU0VOU09SXzE2QklUCisJCQkJCSAmJiBkYXRhX2xlbmd0aCAhPSBNSVNFTlNPUl8zMkJJVCkgeworCQl2NGwyX2VycihjbGllbnQsICIlcyBlcnJvciwgaW52YWxpZCBkYXRhX2xlbmd0aFxuIiwgX19mdW5jX18pOworCQlyZXR1cm4gLUVJTlZBTDsKKwl9CisKKwltZW1zZXQoJm1zZywgMCwgc2l6ZW9mKG1zZykpOworCithZ2FpbjoKKwltc2cuYWRkciA9IGNsaWVudC0+YWR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yICovCisjZGVmaW5lIE1JU0VOU09SX0FXQl9TVEFUVVMJMHhBQzAwCisvKiBzZW5zb3IgY29hcnNlIGludGVncmF0aW9uIHRpbWUgcmVnaXN0ZXIgKi8KKyNkZWZpbmUgTUlTRU5TT1JfQ09BUlNFX0lOVEVHUkFUSU9OX1RJTUUgMHhDODNDCisKKy8qIHJlZ2lzdGVycyAqLworI2RlZmluZSBSRUdfU1dfUkVTRVQgICAgICAgICAgICAgICAgICAgIDB4MzAxQQorI2RlZmluZSBSRUdfU1dfU1RSRUFNICAgICAgICAgICAgICAgICAgIDB4REMwMAorI2RlZmluZSBSRUdfU0NDQl9DVFJMICAgICAgICAgICAgICAgICAgIDB4MzEwMAorI2RlZmluZSBSRUdfU0NfQ01NTl9DSElQX0lEICAgICAgICAgICAgIDB4MDAwMAorI2RlZmluZSBSRUdfVl9TVEFSVCAgICAgICAgICAgICAgICAgICAgIDB4YzgwMCAvKiAxNmJpdHMgKi8KKyNkZWZpbmUgUkVHX0hfU1RBUlQgICAgICAgICAgICAgICAgICAgICAweGM4MDIgLyogMTZiaXRzICovCisjZGVmaW5lIFJFR19WX0VORCAgICAgICAgICAgICAgICAgICAgICAgMHhjODA0IC8qIDE2Yml0cyAqLworI2RlZmluZSBSRUdfSF9FTkQgICAgICAgICAgICAgICAgICAgICAgIDB4YzgwNiAvKiAxNmJpdHMgKi8KKyNkZWZpbmUgUkVHX1BJWEVMX0NMSyAgICAgICAgICAgICAgICAgICAweGM4MDggLyogMzJiaXRzICovCisjZGVmaW5lIFJFR19USU1JTkdfVlRTICAgICAgICAgICAgICAgICAgMHhjODEyIC8qIDE2Yml0cyAqLworI2RlZmluZSBSRUdfVElNSU5HX0hUUyAgICAgICAgICAgICAgICAgIDB4YzgxNCAvKiAxNmJpdHMgKi8KKyNkZWZpbmUgUkVHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAweEM4NjggLyogMTZiaXRzICovCisjZGVmaW5lIFJFR19IRUlHSFQgICAgICAgICAgICAgICAgICAgICAgMHhDODZBIC8qIDE2Yml0cyAqLworI2RlZmluZSBSRUdfRVhQT19DT0FSU0UgICAgICAgICAgICAgICAgIDB4MzAxMiAvKiAxNmJpdHMgKi8KKyNkZWZpbmUgUkVHX0VYUE9fRklORSAgICAgICAgICAgICAgICAgICAweDMwMTQgLyogMTZiaXRzICovCisjZGVmaW5lIFJFR19HQUlOICAgICAgICAgICAgICAgICAgICAgICAgMHgzMDVFCisjZGVmaW5lIFJFR19BTkFMT0dHQUlOICAgICAgICAgICAgICAgICAgMHgzMDVGCisjZGVmaW5lIFJFR19BRERSX0FDRVNTUyAgICAgICAgICAgICAgICAgMHgwOThFIC8qIGxvZ2ljYWxfYWRkcmVzc19hY2Nlc3MgKi8KKyNkZWZpbmUgUkVHX0NPTU1fUmVnaXN0ZXIgICAgICAgICAgICAgICAweDAwODAgLyogY29tbWFuZF9yZWdpc3RlciAqLworCisjZGVmaW5lIFNFTlNPUl9ERVRFQ1RFRAkJMQorI2RlZmluZSBTRU5TT1JfTk9UX0RFVEVDVEVECTAKKworI2RlZmluZSBJMkNfUkVUUllfQ09VTlQJCTUKKyNkZWZpbmUgTVNHX0xFTl9PRkZTRVQJCTIKKworI2lmbmRlZiBNSVBJX0NPTlRST0wKKyNkZWZpbmUgTUlQSV9DT05UUk9MCQkweDM0MDAJLyogTUlQSV9Db250cm9sICovCisjZW5kaWYKKworLyogR1BJTyBwaW4gb24gTW9vcmVzdG93biAqLworI2RlZmluZSBHUElPX1NDTEtfMjUJCTQ0CisjZGVmaW5lIEdQSU9fU1RCX1BJTgkJNDcKKworI2RlZmluZSBHUElPX1NUREJZX1BJTgkJNDkgICAvKiBhYjpuZXcgKi8KKyNkZWZpbmUgR1BJT19SRVNFVF9QSU4JCTUwCisKKy8qIFN5c3RlbSBjb250cm9sIHJlZ2lzdGVyIGZvciBBcHRpbmEgQS0xMDQwU09DKi8KKyNkZWZpbmUgTVQ5TTExNF9QSUQJCTB4MAorCisvKiBNVDlQMTExX0R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isJe01JU0VOU09SXzE2QklULAkweEQwNzAsIDB4MDRFMn0sCisJe01JU0VOU09SXzE2QklULAkweEQwNzIsIDB4MjFDQX0sCisJe01JU0VOU09SXzE2QklULAkweEQwNzQsIDB4MDA2Mn0sCisJe01JU0VOU09SXzE2QklULAkweEQwNzYsIDB4RTU4MH0sCisJe01JU0VOU09SXzE2QklULAkweEQwNzgsIDB4RDkwMX0sCisJe01JU0VOU09SXzE2QklULAkweEQwN0EsIDB4NzlDMH0sCisJe01JU0VOU09SXzE2QklULAkweEQwN0MsIDB4RDgwMH0sCisJe01JU0VOU09SXzE2QklULAkweEQwN0UsIDB4MEJFNn0sCisJe01JU0VOU09SXzE2QklULAkweEQwODAsIDB4MDRFMH0sCisJe01JU0VOU09SXzE2QklULAkweEQwODIsIDB4Qjg5RX0sCisJe01JU0VOU09SXzE2QklULAkweEQwODQsIDB4NzBDRn0sCisJe01JU0VOU09SXzE2QklULAkweEQwODYsIDB4RkZGRn0sCisJe01JU0VOU09SXzE2QklULAkweEQwODgsIDB4QzhENH0sCisJe01JU0VOU09SXzE2QklULAkweEQwOEEsIDB4OTAwMn0sCisJe01JU0VOU09SXzE2QklULAkweEQwOEMsIDB4MDg1N30sCisJe01JU0VOU09SXzE2QklULAkweEQwOEUsIDB4MDI1RX0sCisKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDA5MCwgMHhGRkRDfSwKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDA5MiwgMHhFMDgwfSwKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDA5NCwgMHgyNUNDfSwKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDA5NiwgMHg5MDIyfSwKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDA5OCwgMHhGMjI1fSwKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDA5QSwgMHgxNzAwfSwKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDA5QywgMHgxMDhBfSwKKwl7TUlTRU5TT1JfMTZC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E2QklULAkweEQwRjYsIDB4MjFDQX0sCisJe01JU0VOU09SXzE2QklULAkweEQwRjgsIDB4MDA2Mn0sCisJe01JU0VOU09SXzE2QklULAkweEQwRkEsIDB4MjBGMH0sCisJe01JU0VOU09SXzE2QklULAkweEQwRkMsIDB4MDA0MH0sCisJe01JU0VOU09SXzE2QklULAkweEQwRkUsIDB4MEIwMn0sCisJe01JU0VOU09SXzE2QklULAkweEQxMDAsIDB4MDMyMH0sCisJe01JU0VOU09SXzE2QklULAkweEQxMDIsIDB4RDkwMX0sCisJe01JU0VOU09SXzE2QklULAkweEQxMDQsIDB4MDdGMX0sCisJe01JU0VOU09SXzE2QklULAkweEQxMDYsIDB4MDVFMH0sCisJe01JU0VOU09SXzE2QklULAkweEQxMDgsIDB4QzBBMX0sCisJe01JU0VOU09SXzE2QklULAkweEQxMEEsIDB4NzhFMH0sCisJe01JU0VOU09SXzE2QklULAkweEQxMEMsIDB4QzBGMX0sCisJe01JU0VOU09SXzE2QklULAkweEQxMEUsIDB4NzFDRn0sCisJe01JU0VOU09SXzE2QklULAkweEQxMTAsIDB4RkZGRn0sCisJe01JU0VOU09SXzE2QklULAkweEQxMTIsIDB4QzdDMH0sCisJe01JU0VOU09SXzE2QklULAkweEQxMTQsIDB4RDg0MH0sCisJe01JU0VOU09SXzE2QklULAkweEQxMTYsIDB4QTkwMH0sCisJe01JU0VOU09SXzE2QklULAkweEQxMTgsIDB4NzFDRn0sCisJe01JU0VOU09SXzE2QklULAkweEQxMUEsIDB4RkZGRn0sCisJe01JU0VOU09SXzE2QklULAkweEQxMUMsIDB4RDAyQ30sCisJe01JU0VOU09SXzE2QklULAkweEQxMUUsIDB4RDgxRX0sCisKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDEyMCwgMHgwQTVBfSwKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDEyMiwgMHgwNEUwfSwKKwl7TUlTRU5TT1JfMTZCSVQsCTB4RDEyNCwgMHhEQTAwfSwKKwl7TUlTR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JCWlmIChlcnIgPj0gMCkKKwkJCWVyciA9IC1FSU87CisJCWRldl9lcnIoJmNsaWVudC0+ZGV2LAorCQkJInJlYWQgZnJvbSBvZmZzZXQgMHgleCBlcnJvciAlZCIsIHJlZywgZXJyKTsKKwkJcmV0dXJuIGVycjsKKwl9CisJCisJKnZhbCA9IDA7CisJLyogaGlnaCBieXRlIGNvbWVzIGZpcnN0ICovCisJaWYgKGRhdGFfbGVuZ3RoID09IE9WMjY4MF84QklUKQorCQkqdmFsID0gKHU4KWRhdGFbMF07CisJZWxzZSBpZiAoZGF0YV9sZW5ndGggPT0gT1YyNjgwXzE2QklUKQorCQkqdmFsID0gYmUxNl90b19jcHUoKih1MTYgKikmZGF0YVswXSk7CisJZWxzZQorCQkqdmFsID0gYmUzMl90b19jcHUoKih1MzIgKikmZGF0YVswXSk7CisJLy9kZXZfZGJnKCZjbGllbnQtPmRldiwgICIrKysraTJjIHJlYWQgYWRyJXggPSAleFxuIiwgcmVnLCp2YWwpOworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IG92MjY4MF9pMmNfd3JpdGUoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgdTE2IGxlbiwgdTggKmRhdGEpCit7CisJc3RydWN0IGkyY19tc2cgbXNnOworCWNvbnN0IGludCBudW1fbXNnID0gMTsKKwlpbnQgcmV0OworCisJbXNnLmFkZHIgPSBjbGllbnQtPmFkZHI7CisJbXNnLmZsYWdzID0gMDsKKwltc2cubGVuID0gbGVuOworCW1zZy5idWYgPSBkYXRhOworCXJldCA9IGkyY190cmFuc2ZlcihjbGllbnQtPmFkYXB0ZXIsICZtc2csIDEpOworCS8vZGV2X2RiZygmY2xpZW50LT5kZXYsICAiKysraTJjIHdyaXRlIHJlZz0leC0+JXhcbiIsIGRhdGFbMF0qMjU2ICtkYXRhWzFdLGRhdGFbMl0pOworCXJldHVybiByZXQgPT0gbnVtX21zZyA/IDAgOiAtRUlPOworfQorCitzdGF0aWMgaW50IG92MjY4MF93cml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ljIHN0cnVjdCBvdjI2ODBfcmVnIGNvbnN0IG92MjY4MF8xNjE2eDEwODJfMzBmcHNbXSA9IHsKKyAgICAgICB7T1YyNjgwXzhCSVQsIDB4MzA4NiwgMHgwMH0sCisgICAgICAge09WMjY4MF84QklULCAweDM1MDEsIDB4NDh9LAorICAgICAgIHtPVjI2ODBfOEJJVCwgMHgzNTAyLCAweGUwfSwKKyAgICAgICB7T1YyNjgwXzhCSVQsIDB4MzcwYSwgMHgyMX0sCisgICAgICAge09WMjY4MF84QklULCAweDM4MDEsIDB4MDB9LAorICAgICAgIHtPVjI2ODBfOEJJVCwgMHgzODAyLCAweDAwfSwKKyAgICAgICB7T1YyNjgwXzhCSVQsIDB4MzgwMywgMHg4Nn0sCisgICAgICAge09WMjY4MF84QklULCAweDM4MDQsIDB4MDZ9LAorICAgICAgIHtPVjI2ODBfOEJJVCwgMHgzODA1LCAweDRmfSwKKyAgICAgICB7T1YyNjgwXzhCSVQsIDB4MzgwNiwgMHgwNH0sCisgICAgICAge09WMjY4MF84QklULCAweDM4MDcsIDB4YmZ9LAorICAgICAgIHtPVjI2ODBfOEJJVCwgMHgzODA4LCAweDA2fSwKKyAgICAgICB7T1YyNjgwXzhCSVQsIDB4MzgwOSwgMHg1MH0sCisgICAgICAge09WMjY4MF84QklULCAweDM4MGEsIDB4MDR9LAorICAgICAgIHtPVjI2ODBfOEJJVCwgMHgzODBiLCAweDNhfSwKKyAgICAgICB7T1YyNjgwXzhCSVQsIDB4MzgwYywgMHgwNn0sCisgICAgICAge09WMjY4MF84QklULCAweDM4MGQsIDB4YTh9LAorICAgICAgIHtPVjI2ODBfOEJJVCwgMHgzODBlLCAweDA1fSwKKyAgICAgICB7T1YyNjgwXzhCSVQsIDB4MzgwZiwgMHgwZX0sCisgICAgICAge09WMjY4MF84QklULCAweDM4MTAsIDB4MDB9LAorICAgICAgIHtPVjI2ODBfOEJJVCwgMHgzODExLCAweDAwfSwKKyAgICAgICB7T1YyNjgwXzhCSVQsID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AqLworCXtPVjg4NThfOEJJVCwgMHgzNTExLCAweDAyfSwgLyogc2hvcnQgZXhwb3N1cmUgPSAweDAwMDIwMCAqLworCXtPVjg4NThfOEJJVCwgMHgzNTEyLCAweDAwfSwgLyogc2hvcnQgZXhwb3N1cmUgPSAweDAwMDIwMCAqLworCisJe09WODg1OF84QklULCAweDM2MDAsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDEsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDIsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDMsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDQsIDB4MjJ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDUsIDB4MzB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDYsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDcsIDB4MjB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDgsIDB4MTF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MDksIDB4Mjh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MEEsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MEIsIDB4MDZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MEMsIDB4REN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MEQsIDB4NDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MEUsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MEYsIDB4MjB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTAsIDB4MDd9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTEsIDB4MjB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTIsIDB4ODh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTMsIDB4ODB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTQsIDB4NTh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTUsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTYsIDB4NEF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTcsIDB4OTB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTgsIDB4NTZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MTksIDB4NzB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MUEsIDB4OTl9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MUIsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MUMsIDB4MDd9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MUQsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MUUsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MUYsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MzMsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MzQsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MzUsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MzYsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2MzgsIDB4RkZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2NDUsIDB4MTN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM2NDYs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7T1Y4ODU4XzhCSVQsIDB4MzgwOSwgMHhDMH0sIC8qIGhfb3V0cHV0X3NpemUgbG93ICovCisJe09WODg1OF84QklULCAweDM4MEEsIDB4MDl9LCAvKiB2X291dHB1dF9zaXplIGhpZ2ggKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgwQiwgMHg5MH0sIC8qIHZfb3V0cHV0X3NpemUgbG93ICovCisJe09WODg1OF84QklULCAweDM4MEMsIDB4MDd9LCAvKiBob3Jpem9udGFsIHRpbWluZyBzaXplIGhpZ2ggKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgwRCwgMHg5NH0sIC8qIGhvcml6b250YWwgdGltaW5nIHNpemUgbG93ICovCisJe09WODg1OF84QklULCAweDM4MEUsIDB4MEF9LCAvKiB2ZXJ0aWNhbCB0aW1pbmcgc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEYsIDB4MER9LCAvKiB2ZXJ0aWNhbCB0aW1pbmcgc2l6ZSBsb3cgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgxMCwgMHgwMH0sIC8qIGhfd2luIG9mZnNldCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MTEsIDB4MDR9LCAvKiBoX3dpbiBvZmZzZXQgbG93ICovCisJe09WODg1OF84QklULCAweDM4MTIsIDB4MDB9LCAvKiB2X3dpbiBvZmZzZXQgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODEzLCAweDAyfSwgLyogdl93aW4gb2Zmc2V0IGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODE0LCAweDAxfSwgLyogaF9vZGRfaW5jICovCisJe09WODg1OF84QklULCAweDM4MTUsIDB4MDF9LCAvKiBoX2V2ZW5faW5jICovCisJe09WODg1OF84QklULCAweDM4MjAsIDB4MDB9LCAvKiBmb3JtYXQxICovCisJe09WODg1OF84QklULCAweDM4MjEsIDB4NDB9LCAvKiBmb3JtYXQyICovCisJe09WODg1OF84QklULCAweDM4MkEsIDB4MD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DM4MDIsIDB4MDF9LCAvKiB2X2Nyb3Bfc3RhcnQgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODAzLCAweDQyfSwgLyogdl9jcm9wX3N0YXJ0IGxvdyAzZS0+NDIqLworCXtPVjg4NThfOEJJVCwgMHgzODA0LCAweDBDfSwgLyogaF9jcm9wX2VuZCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDUsIDB4RDN9LCAvKiBoX2Nyb3BfZW5kIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA2LCAweDA4fSwgLyogdl9jcm9wX2VuZCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDcsIDB4NzF9LCAvKiB2X2Nyb3BfZW5kIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA4LCAweDBDfSwgLyogaF9vdXRwdXRfc2l6ZSBoaWdoIDMyNzYgeCAxODQ4ICovCisJe09WODg1OF84QklULCAweDM4MDksIDB4Q0N9LCAvKiBoX291dHB1dF9zaXplIGxvdyBkMC0+Y2MqLworCXtPVjg4NThfOEJJVCwgMHgzODBBLCAweDA3fSwgLyogdl9vdXRwdXRfc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEIsIDB4Mzh9LCAvKiB2X291dHB1dF9zaXplIGxvdyAzYy0+MzgqLworCXtPVjg4NThfOEJJVCwgMHgzODBDLCAweDA3fSwgLyogaG9yaXpvbnRhbCB0aW1pbmcgc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEQsIDB4OTR9LCAvKiBob3Jpem9udGFsIHRpbWluZyBzaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBFLCAweDBBfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODBGLCAweDBEfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgbG93ICovCisJe09WODg1OF84QklULCAweDM4MTQsIDB4MDF9LCAvKiBoX29kZF9pbmM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MDEsIDB4MEN9LCAvKiBoX2Nyb3Bfc3RhcnQgbG93ICovCisJe09WODg1OF84QklULCAweDM4MDIsIDB4MDF9LCAvKiB2X2Nyb3Bfc3RhcnQgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODAzLCAweDNFfSwgLyogdl9jcm9wX3N0YXJ0IGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA0LCAweDBDfSwgLyogaF9jcm9wX2VuZCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDUsIDB4RDN9LCAvKiBoX2Nyb3BfZW5kIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA2LCAweDA4fSwgLyogdl9jcm9wX2VuZCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDcsIDB4NzF9LCAvKiB2X2Nyb3BfZW5kIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA4LCAweDBDfSwgLyogaF9vdXRwdXRfc2l6ZSBoaWdoIDMyODAgeCAxODUyICovCisJe09WODg1OF84QklULCAweDM4MDksIDB4RDB9LCAvKiBoX291dHB1dF9zaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBBLCAweDA3fSwgLyogdl9vdXRwdXRfc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEIsIDB4M0N9LCAvKiB2X291dHB1dF9zaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBDLCAweDA3fSwgLyogaG9yaXpvbnRhbCB0aW1pbmcgc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEQsIDB4OTR9LCAvKiBob3Jpem9udGFsIHRpbWluZyBzaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBFLCAweDBBfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODBGLCAweDBEfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgbG93ICovCisJe09WODg1OF84QklULCAweD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CAweDA0fSwgLyogVG9wIGJsYWNrIGxpbmUgc3RhcnQgPSA0ICovCisJe09WODg1OF84QklULCAweDQwMkIsIDB4MDh9LCAvKiBUb3AgYmxhY2sgbGluZSBudW1iZXIgPSA4ICovCisJe09WODg1OF84QklULCAweDQwMkMsIDB4MDJ9LCAvKiBCb3R0b20gemVybyBzdGFydCBsaW5lID0gMiAqLworCXtPVjg4NThfOEJJVCwgMHg0MDJELCAweDAyfSwgLyogQm90dG9tIHplcm8gbGluZSBudW1iZXIgPSAyICovCisJe09WODg1OF84QklULCAweDQwMkUsIDB4MEN9LCAvKiBCb3R0b20gYmxhY2sgbGluZSBzdGFydCA9IDEyICovCisJe09WODg1OF84QklULCAweDQwMkYsIDB4MDJ9LCAvKiBCb3R0b20gYmxhY2sgbGluZSBudW1iZXIgPSAyICovCisJe09WODg1OF84QklULCAweDQwMzQsIDB4M0Z9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQwM0QsIDB4MDR9LCAvKiBCTEMgQ1RSTDNEICovCisJe09WODg1OF84QklULCAweDQ2MDAsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ2MDEsIDB4ZWZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ4MzcsIDB4MTZ9LCAvKiBwY2xrX3BlcmlvZCA9IDB4MTYgKi8KKwl7T1Y4ODU4X1RPS19URVJNLCAwLCAwfQorfTsKKworc3RhdGljIGNvbnN0IHN0cnVjdCBvdjg4NThfcmVnIG92ODg1OF8xMDgwUF8zMFtdID0geworCXtPVjg4NThfOEJJVCwgMHgwMTAwLCAweDAwfSwgLyogc29mdHdhcmVfc3RhbmRieSAqLworCXtPVjg4NThfOEJJVCwgMHgzNzc4LCAweDE3fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzODAwLCAweDAyfSwgLyogaF9jcm9wX3N0YXJ0IGhpZ2ggKi8KKwl7T1Y4ODU4XzhCSVQsIDB4Mzg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ovCisJe09WODg1OF84QklULCAweDQwMjksIDB4MDJ9LCAvKiBUb3AgemVybyBsaW5lIG51bWJlciA9IDIgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4NDAyQSwgMHgwNH0sIC8qIFRvcCBibGFjayBsaW5lIHN0YXJ0ID0gNCAqLworCXtPVjg4NThfOEJJVCwgMHg0MDJCLCAweDA0fSwgLyogVG9wIGJsYWNrIGxpbmUgbnVtYmVyID0gOCAqLworCXtPVjg4NThfOEJJVCwgMHg0MDJDLCAweDAyfSwgLyogQm90dG9tIHplcm8gc3RhcnQgbGluZSA9IDIgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4NDAyRCwgMHgwMn0sIC8qIEJvdHRvbSB6ZXJvIGxpbmUgbnVtYmVyID0gMiAqLworCXtPVjg4NThfOEJJVCwgMHg0MDJFLCAweDA4fSwgLyogQm90dG9tIGJsYWNrIGxpbmUgc3RhcnQgPSA4ICovCisJe09WODg1OF84QklULCAweDQwMkYsIDB4MDJ9LCAvKiBCb3R0b20gYmxhY2sgbGluZSBudW1iZXIgPSAyICovCisJe09WODg1OF84QklULCAweDQwMzQsIDB4M0Z9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQwM0QsIDB4MDR9LCAvKiBCTEMgQ1RSTDNEICovCisJe09WODg1OF84QklULCAweDQ2MDAsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ2MDEsIDB4Q0J9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ4MzcsIDB4MTR9LCAvKiBwY2xrX3BlcmlvZCA9IDB4MTQgKi8KKwl7T1Y4ODU4X1RPS19URVJNLCAwLCAwfQorfTsKKworCitzdGF0aWMgY29uc3Qgc3RydWN0IG92ODg1OF9yZWcgb3Y4ODU4XzE2NDB4OTI2W10gPSB7CisJe09WODg1OF84QklULCAweDAxMDAsIDB4MDB9LCAvKiBzb2Z0d2FyZV9zdGFuZGJ5ICovCisJe09WODg1OF84QklULCA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cyfSwKKwkvKiBDbG9jayBzd2l0Y2ggb3V0cHV0ID0gbm9ybWFsLCBwY2xrX2RpdiA9IC8xICovCisJe09WODg1OF84QklULCAweDMwMjAsIDB4OTN9LAorCS8qCisJICogbHZkc19tb2RlX28gPSAwLCBjbG9jayBsYW5lIGRpc2FibGUgd2hlbiBwZF9taXBpID0gMCwKKwkgKiBwZF9taXBpIGVuYWJsZSB3aGVuIHJzdF9zeW5jID0gMQorCSAqLworCXtPVjg4NThfOEJJVCwgMHgzMDIyLCAweDAxfSwKKwl7T1Y4ODU4XzhCSVQsIDB4MzAzMSwgMHgwQX0sIC8qIG1pcGlfYml0X3NlbCA9IDEwICovCisJe09WODg1OF84QklULCAweDMwMzQsIDB4MDB9LCAvKiBVbmtub3duICovCisJLyogc2Nsa19kaXYgPSAvMSwgc2Nsa19wcmVfZGl2ID0gLzEsIGNoaXAgZGVidWcgPSAxICovCisJe09WODg1OF84QklULCAweDMxMDYsIDB4MDF9LAorCisJe09WODg1OF84QklULCAweDMzMDUsIDB4RjF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMDcsIDB4MDR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMDgsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMDksIDB4Mjh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMEEsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMEIsIDB4MjB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMEMsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMEQsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMEUsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDMzMEYsIDB4NDB9LCAvKiBVbmtub3duICovCisKKwl7T1Y4ODU4XzhCSVQsIDB4MzUw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PVjg4NThfOEJJVCwgMHgzNjBCLCAweDA2fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjBDLCAweERDfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjBELCAweDQwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjBFLCAweDBDfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjBGLCAweDIwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjEwLCAweDA3fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjExLCAweDIwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjEyLCAweDg4fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjEzLCAweDgwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjE0LCAweDU4fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjE1LCAweDAwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjE2LCAweDRBfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjE3LCAweDkwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjE4LCAweDU2fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjE5LCAweDcwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjFBLCAweDk5fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjFCLCAweDAwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjFDLCAweDA3fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjFELCAweDAwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjFFLCAweDAwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjFGLCAweDAwfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjMzLCAweDBDfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjM0LCAweDBDfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjM1LCAweDBDfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjM2LCAweDBDfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjM4LCAweEZGfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjQ1LCAweDEzfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjQ2LCAweDgzfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzNjRBLCAweDA3fSwgLyogVW5rbm93biAqLworCisJe09WODg1OF84QklULCAweDM3MDAsIDB4MzB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDEsIDB4MTh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDIsIDB4NTB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDMsIDB4MzJ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDQsIDB4Mjh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDUsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDYsIDB4NkF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDcsIDB4MDh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDgsIDB4NDh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MDksIDB4NjZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MEEsIDB4MDF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MEIsIDB4NkF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MEMsIDB4MDd9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MTIsIDB4NDR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MTQsIDB4MjR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MTgsIDB4MTR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MTksIDB4MzF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MUUsIDB4MzF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MUYsIDB4N0Z9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MjAsIDB4MEF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MjEsIDB4MEF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MjQsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MjUsIDB4MDJ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MjYsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MjgsIDB4MEF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MjksIDB4MDN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MkEsIDB4MDZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MkIsIDB4QTZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MkMsIDB4QTZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MkQsIDB4QTZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MkUsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MkYsIDB4MjB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MzAsIDB4MDJ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MzEsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MzIsIDB4Mjh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MzMsIDB4MTB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MzQsIDB4NDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3MzYsIDB4MzB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3M0EsIDB4MEF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3M0IsIDB4MEJ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3M0MsIDB4MTR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3M0UsIDB4MDZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NTUsIDB4MTB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NTgsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NTksIDB4NEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NUEsIDB4MEN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NUIsIDB4MjZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NUMsIDB4MjB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NUQsIDB4MDR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NUUsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NUYsIDB4Mjh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NjAsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NjEsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NjIsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NjMsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NjYsIDB4RkZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NjgsIDB4MjJ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NjksIDB4NDR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NkEsIDB4NDR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NkIsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NkYsIDB4MDF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NzIsIDB4NDZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NzMsIDB4MDR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NzQsIDB4MkN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NzUsIDB4MTN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NzYsIDB4MDh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NzcsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3NzgsIDB4MTZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTAsIDB4ODh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTEsIDB4N0F9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTIsIDB4N0F9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTMsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTQsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTUsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTYsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTcsIDB4ODh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTgsIDB4OTh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QTksIDB4OTh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QUEsIDB4ODh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QUIsIDB4NUN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QUMsIDB4NUN9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QUQsIDB4NTV9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QUUsIDB4MTl9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QUYsIDB4MTl9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjAsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjEsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjIsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjMsIDB4ODR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjQsIDB4ODR9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjUsIDB4NjZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjYsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjcsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjgsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM3QjksIDB4RkZ9LCAvKiBVbmtub3duICovCisKKwl7T1Y4ODU4XzhCSVQsIDB4MzgwMCwgMHgwMH0sIC8qIGhfY3JvcF9zdGFydCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDEsIDB4MEN9LCAvKiBoX2Nyb3Bfc3RhcnQgbG93ICovCisJe09WODg1OF84QklULCAweDM4MDIsIDB4MDB9LCAvKiB2X2Nyb3Bfc3RhcnQgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODAzLCAweDBDfSwgLyogdl9jcm9wX3N0YXJ0IGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA0LCAweDBDfSwgLyogaF9jcm9wX2VuZCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDUsIDB4RDN9LCAvKiBoX2Nyb3BfZW5kIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA2LCAweDA5fSwgLyogdl9jcm9wX2VuZCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDcsIDB4QTN9LCAvKiB2X2Nyb3BfZW5kIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA4LCAweDBDfSwgLyogaF9vdXRwdXRfc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDksIDB4QzB9LCAvKiBoX291dHB1dF9zaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBBLCAweDA5fSwgLyogdl9vdXRwdXRfc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEIsIDB4OTB9LCAvKiB2X291dHB1dF9zaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBDLCAweDA3fSwgLyogaG9yaXpvbnRhbCB0aW1pbmcgc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEQsIDB4OTR9LCAvKiBob3Jpem9udGFsIHRpbWluZyBzaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBFLCAweDBBfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgaGlnaCAqLworC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CisJe09WODg1OF84QklULCAweDQwMkQsIDB4MDJ9LCAvKiBCb3R0b20gemVybyBsaW5lIG51bWJlciA9IDIgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4NDAyRSwgMHgwNH0sIC8qIEJvdHRvbSBibGFjayBsaW5lIHN0YXJ0ID0gNCAqLworCXtPVjg4NThfOEJJVCwgMHg0MDJGLCAweDA4fSwgLyogQm90dG9tIGJsYWNrIGxpbmUgbnVtYmVyID0gOCAqLworCisJe09WODg1OF84QklULCAweDQwMzQsIDB4M0Z9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQwM0QsIDB4MDR9LCAvKiBCTEMgQ1RSTDNEICovCisJe09WODg1OF84QklULCAweDQzMDAsIDB4RkZ9LCAvKiBjbGlwX21heFsxMTo0XSA9IDB4RkZGICovCisJe09WODg1OF84QklULCAweDQzMDEsIDB4MDB9LCAvKiBjbGlwX21pblsxMTo0XSA9IDAgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4NDMwMiwgMHgwRn0sIC8qIGNsaXBfbWluL21heFszOjBdICovCisJe09WODg1OF84QklULCAweDQzMDcsIDB4MDF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQzMTYsIDB4MDB9LCAvKiBDVFJMMTYgPSBkZWZhdWx0ICovCisJe09WODg1OF84QklULCAweDQ1MDMsIDB4MTh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ1MDAsIDB4Mzh9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ2MDAsIDB4MDF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ2MDEsIDB4OTd9LCAvKiBVbmtub3duICovCisJLyogd2t1cF9kbHkgPSBNYXJrMSB3YWtldXAgZGVsYXkvMl4xMCA9IDB4MjUgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4NDgwOCwgMHgyNX0sCisJe09WODg1OF84QklULCAweDQ4MTYsIDB4NTJ9LCAvKiBFbWJlZGR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Je09WODg1OF84QklULCAweDM4MDksIDB4RDB9LCAvKiBoX291dHB1dF9zaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBBLCAweDA5fSwgLyogdl9vdXRwdXRfc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEIsIDB4YTB9LCAvKiB2X291dHB1dF9zaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBDLCAweDA3fSwgLyogaG9yaXpvbnRhbCB0aW1pbmcgc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEQsIDB4OTR9LCAvKiBob3Jpem9udGFsIHRpbWluZyBzaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBFLCAweDBBfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODBGLCAweDBEfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgbG93ICovCisJe09WODg1OF84QklULCAweDM4MTQsIDB4MDF9LCAvKiBoX29kZF9pbmMgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgxNSwgMHgwMX0sIC8qIGhfZXZlbl9pbmMgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgyMCwgMHgwMH0sIC8qIGZvcm1hdDEgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgyMSwgMHg0MH0sIC8qIGZvcm1hdDIgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgyQSwgMHgwMX0sIC8qIHZfb2RkX2luYyAqLworCXtPVjg4NThfOEJJVCwgMHgzODJCLCAweDAxfSwgLyogdl9ldmVuX2luYyAqLworCXtPVjg4NThfOEJJVCwgMHgzODMwLCAweDA2fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzODM2LCAweDAxfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzRDg1LCAweDE0fSwgLyogT1RQX1JFRzg1ICovCisJe09WODg1OF84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hcnQgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODAzLCAweDNFfSwgLyogdl9jcm9wX3N0YXJ0IGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA0LCAweDBDfSwgLyogaF9jcm9wX2VuZCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDUsIDB4RDN9LCAvKiBoX2Nyb3BfZW5kIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA2LCAweDA4fSwgLyogdl9jcm9wX2VuZCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDcsIDB4NzF9LCAvKiB2X2Nyb3BfZW5kIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODA4LCAweDBDfSwgLyogaF9vdXRwdXRfc2l6ZSBoaWdoIDMyODAgeCAxODUyICovCisJe09WODg1OF84QklULCAweDM4MDksIDB4RDB9LCAvKiBoX291dHB1dF9zaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBBLCAweDA3fSwgLyogdl9vdXRwdXRfc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEIsIDB4M0N9LCAvKiB2X291dHB1dF9zaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBDLCAweDA3fSwgLyogaG9yaXpvbnRhbCB0aW1pbmcgc2l6ZSBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MEQsIDB4OTR9LCAvKiBob3Jpem9udGFsIHRpbWluZyBzaXplIGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODBFLCAweDBBfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODBGLCAweDBEfSwgLyogdmVydGljYWwgdGltaW5nIHNpemUgbG93ICovCisJe09WODg1OF84QklULCAweDM4MTQsIDB4MDF9LCAvKiBoX29kZF9pbmMgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgxNSwgMHgwMX0sIC8qIGhfZXZlbl9pbmMgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgyMCwgMHgwMH0sIC8qIGZvcm1hdDEgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgyMSwgMHg0MH0sIC8qIGZvcm1hdDIgKi8KKwl7T1Y4ODU4XzhCSVQsIDB4MzgyQSwgMHgwMX0sIC8qIHZfb2RkX2luYyAqLworCXtPVjg4NThfOEJJVCwgMHgzODJCLCAweDAxfSwgLyogdl9ldmVuX2luYyAqLworCXtPVjg4NThfOEJJVCwgMHgzODMwLCAweDA2fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzODM2LCAweDAxfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzRDg1LCAweDE0fSwgLyogT1RQX1JFRzg1ICovCisJe09WODg1OF84QklULCAweDNGMDgsIDB4MTB9LCAvKiBQU1JBTSBjb250cm9sIHJlZ2lzdGVyICovCisJe09WODg1OF84QklULCAweDQwMzQsIDB4M0Z9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQwM0QsIDB4MDR9LCAvKiBCTEMgQ1RSTDNEICovCisJe09WODg1OF84QklULCAweDQ2MDAsIDB4MDF9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ2MDEsIDB4OTd9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ4MzcsIDB4MTR9LCAvKiBwY2xrX3BlcmlvZCA9IDB4MTQgKi8KKwl7T1Y4ODU4X1RPS19URVJNLCAwLCAwfQorfTsKKworc3RhdGljIGNvbnN0IHN0cnVjdCBvdjg4NThfcmVnIG92ODg1OF8xMDgwUF82MFtdID0geworCXtPVjg4NThfOEJJVCwgMHgwMTAwLCAweDAwfSwgLyogc29mdHdhcmVfc3RhbmRieSAqLworCXtPVjg4NThfOEJJVCwgMHgzNzc4LCAweDE3fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzODAwLCAweDAyfSwgLyogaF9jcm9wX3N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JVCwgMHgzODMwLCAweDA4fSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzODM2LCAweDAyfSwgLyogVW5rbm93biAqLworCXtPVjg4NThfOEJJVCwgMHgzRDg1LCAweDE2fSwgLyogT1RQX1JFRzg1ICovCisJe09WODg1OF84QklULCAweDNGMDgsIDB4MDh9LCAvKiBQU1JBTSBjb250cm9sIHJlZ2lzdGVyICovCisJe09WODg1OF84QklULCAweDQwMzQsIDB4M0Z9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQwM0QsIDB4MDR9LCAvKiBCTEMgQ1RSTDNEICovCisJe09WODg1OF84QklULCAweDQ2MDAsIDB4MDB9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ2MDEsIDB4Q0J9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDQ4MzcsIDB4MTR9LCAvKiBwY2xrX3BlcmlvZCA9IDB4MTQgKi8KKwl7T1Y4ODU4X1RPS19URVJNLCAwLCAwfQorfTsKKworCitzdGF0aWMgY29uc3Qgc3RydWN0IG92ODg1OF9yZWcgb3Y4ODU4XzE2NDB4OTI2W10gPSB7CisJe09WODg1OF84QklULCAweDAxMDAsIDB4MDB9LCAvKiBzb2Z0d2FyZV9zdGFuZGJ5ICovCisJe09WODg1OF84QklULCAweDM3NzgsIDB4MTZ9LCAvKiBVbmtub3duICovCisJe09WODg1OF84QklULCAweDM4MDAsIDB4MDB9LCAvKiBoX2Nyb3Bfc3RhcnQgaGlnaCAqLworCXtPVjg4NThfOEJJVCwgMHgzODAxLCAweDBDfSwgLyogaF9jcm9wX3N0YXJ0IGxvdyAqLworCXtPVjg4NThfOEJJVCwgMHgzODAyLCAweDAwfSwgIC8qIHZfY3JvcF9zdGFydCBoaWdoICovCisJe09WODg1OF84QklULCAweDM4MDMsIDB4MEN9LCAvKiB2X2Nyb3Bfc3RhcnQgbG93ICovCisJe09WODg1OF84QklULCAweDM4MDQsIDB4MEN9LCAvKi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V9yZXNvbHV0aW9uIGVudmVsb3BlX2JxOworCS8qIGlzcCBwaXBlIGZpbHRlciBzaXplIFtCUV0gKi8KKwlzdHJ1Y3QgZHZzMl9icV9yZXNvbHV0aW9uIGlzcGZpbHRlcl9icTsKKwkvKiBHREMgc2hpdCBzaXplIFtCUV0gKi8KKwlzdHJ1Y3QgZHZzMl9icV9yZXNvbHV0aW9uIGdkY19zaGlmdF9icTsKK307CisKK3N0cnVjdCBhdG9taXNwX2R2c182YXhpc19jb25maWcgeworCXVpbnQzMl90IGV4cF9pZDsKKwl1aW50MzJfdCB3aWR0aF95OworCXVpbnQzMl90IGhlaWdodF95OworCXVpbnQzMl90IHdpZHRoX3V2OworCXVpbnQzMl90IGhlaWdodF91djsKKwl1aW50MzJfdCAqeGNvb3Jkc195OworCXVpbnQzMl90ICp5Y29vcmRzX3k7CisJdWludDMyX3QgKnhjb29yZHNfdXY7CisJdWludDMyX3QgKnljb29yZHNfdXY7Cit9OworCitzdHJ1Y3QgYXRvbWlzcF9mb3JtYXRzX2NvbmZpZyB7CisJdWludDMyX3QgdmlkZW9fZnVsbF9yYW5nZV9mbGFnOworfTsKKworc3RydWN0IGF0b21pc3BfcGFyYW1ldGVycyB7CisJc3RydWN0IGF0b21pc3Bfd2JfY29uZmlnICAgKndiX2NvbmZpZzsgIC8qIFdoaXRlIEJhbGFuY2UgY29uZmlnICovCisJc3RydWN0IGF0b21pc3BfY2NfY29uZmlnICAgKmNjX2NvbmZpZzsgIC8qIENvbG9yIENvcnJlY3Rpb24gY29uZmlnICovCisJc3RydWN0IGF0b21pc3BfdG5yX2NvbmZpZyAgKnRucl9jb25maWc7IC8qIFRlbXBvcmFsIE5vaXNlIFJlZHVjdGlvbiAqLworCXN0cnVjdCBhdG9taXNwX2VjZF9jb25maWcgICplY2RfY29uZmlnOyAvKiBFaWdlbiBDb2xvciBEZW1vc2FpY2luZyAqLworCXN0cnVjdCBhdG9taXNwX3lucl9jb25maWcgICp5bnJfY29uZmlnOyAv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iAoVE5SKQorICovCitpbnQgYXRvbWlzcF90bnIoc3RydWN0IGF0b21pc3Bfc3ViX2RldmljZSAqYXNkLCBpbnQgZmxhZywKKwkJc3RydWN0IGF0b21pc3BfdG5yX2NvbmZpZyAqY29uZmlnKQoreworCS8qIEdldCB0bnIgY29uZmlnIGZyb20gY3VycmVudCBzZXR1cCAqLworCWlmIChmbGFnID09IDApIHsKKwkJLyogR2V0IHRuciBjb25maWcgZnJvbSBjdXJyZW50IHNldHVwICovCisJCWlmIChhdG9taXNwX2Nzc19nZXRfdG5yX2NvbmZpZyhhc2QsIGNvbmZpZykpCisJCQlyZXR1cm4gLUVJTlZBTDsKKwl9IGVsc2UgeworCQkvKiBTZXQgdG5yIGNvbmZpZyB0byBpc3AgcGFyYW1ldGVycyAqLworCQltZW1jcHkoJmFzZC0+cGFyYW1zLmNzc19wYXJhbS50bnJfY29uZmlnLCBjb25maWcsCisJCQlzaXplb2Yoc3RydWN0IGF0b21pc3BfY3NzX3Rucl9jb25maWcpKTsKKwkJYXRvbWlzcF9jc3Nfc2V0X3Rucl9jb25maWcoYXNkLCAmYXNkLT5wYXJhbXMuY3NzX3BhcmFtLnRucl9jb25maWcpOworCQlhc2QtPnBhcmFtcy5jc3NfdXBkYXRlX3BhcmFtc19uZWVkZWQgPSB0cnVlOworCX0KKworCXJldHVybiAwOworfQorCisvKgorICogRnVuY3Rpb24gdG8gY29uZmlndXJlIGJsYWNrIGxldmVsIGNvbXBlbnNhdGlvbgorICovCitpbnQgYXRvbWlzcF9ibGFja19sZXZlbChzdHJ1Y3QgYXRvbWlzcF9zdWJfZGV2aWNlICphc2QsIGludCBmbGFnLAorCQkJc3RydWN0IGF0b21pc3Bfb2JfY29uZmlnICpjb25maWcpCit7CisJaWYgKGZsYWcgPT0gMCkgeworCQkvKiBHZXQgb2IgY29uZmlnIGZyb20gY3VycmVudCBzZXR1cCAqLworCQlpZiAoYXRvbWlzcF9jc3NfZ2V0X29iX2NvbmZpZyhhc2QsIGNvb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fY29uZmlnLT53aWR0aF91diB8fAorCSAgICAgb2xkXzZheGlzX2NvbmZpZy0+aGVpZ2h0X3V2ICE9IHNvdXJjZV82YXhpc19jb25maWctPmhlaWdodF91dikpIHsKKyNlbHNlCisJICAgIChvbGRfNmF4aXNfY29uZmlnLT53aWR0aF95ICE9IHRfNmF4aXNfY29uZmlnLndpZHRoX3kgfHwKKwkgICAgIG9sZF82YXhpc19jb25maWctPmhlaWdodF95ICE9IHRfNmF4aXNfY29uZmlnLmhlaWdodF95IHx8CisJICAgICBvbGRfNmF4aXNfY29uZmlnLT53aWR0aF91diAhPSB0XzZheGlzX2NvbmZpZy53aWR0aF91diB8fAorCSAgICAgb2xkXzZheGlzX2NvbmZpZy0+aGVpZ2h0X3V2ICE9IHRfNmF4aXNfY29uZmlnLmhlaWdodF91dikpIHsKKyNlbmRpZgorCQlpYV9jc3NfZHZzMl82YXhpc19jb25maWdfZnJlZShjc3NfcGFyYW0tPmR2c182YXhpcyk7CisJCWNzc19wYXJhbS0+ZHZzXzZheGlzID0gTlVMTDsKKworCQlkdnNfNmF4aXNfY29uZmlnID0gaWFfY3NzX2R2czJfNmF4aXNfY29uZmlnX2FsbG9jYXRlKHN0cmVhbSk7CisJCWlmICghZHZzXzZheGlzX2NvbmZpZykKKwkJCXJldHVybiAtRU5PTUVNOworCX0gZWxzZSBpZiAoIWR2c182YXhpc19jb25maWcpIHsKKwkJZHZzXzZheGlzX2NvbmZpZyA9IGlhX2Nzc19kdnMyXzZheGlzX2NvbmZpZ19hbGxvY2F0ZShzdHJlYW0pOworCQlpZiAoIWR2c182YXhpc19jb25maWcpCisJCQlyZXR1cm4gLUVOT01FTTsKKwl9CisKKyNpZm5kZWYgSVNQMjQwMQorCWR2c182YXhpc19jb25maWctPmV4cF9pZCA9IHNvdXJjZV82YXhpc19jb25maWctPmV4cF9pZDsKKyNlbHNlCisJZHZzXzZheGlzX2NvbmZpZy0+ZXhwX2lkID0gdF82YXhpc19jb25maWcuZXhwX2lkOwor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ZnJvbV91c2VyKSkKKwkJZ290byBlcnJvcjsKKwlpZiAoY29weV9mcm9tX2NvbXBhdGlibGUoZHZzXzZheGlzX2NvbmZpZy0+eGNvb3Jkc191diwKKyNpZm5kZWYgSVNQMjQwMQorCQkJICAgc291cmNlXzZheGlzX2NvbmZpZy0+eGNvb3Jkc191diwKKwkJCSAgIHNvdXJjZV82YXhpc19jb25maWctPndpZHRoX3V2ICoKKwkJCSAgIHNvdXJjZV82YXhpc19jb25maWctPmhlaWdodF91diAqCisJCQkgICBzaXplb2YoKnNvdXJjZV82YXhpc19jb25maWctPnhjb29yZHNfdXYpLAorI2Vsc2UKKwkJCSAgIHRfNmF4aXNfY29uZmlnLnhjb29yZHNfdXYsCisJCQkgICB0XzZheGlzX2NvbmZpZy53aWR0aF91diAqCisJCQkgICB0XzZheGlzX2NvbmZpZy5oZWlnaHRfdXYgKgorCQkJICAgc2l6ZW9mKCpkdnNfNmF4aXNfY29uZmlnLT54Y29vcmRzX3V2KSwKKyNlbmRpZgorCQkJICAgZnJvbV91c2VyKSkKKwkJZ290byBlcnJvcjsKKwlpZiAoY29weV9mcm9tX2NvbXBhdGlibGUoZHZzXzZheGlzX2NvbmZpZy0+eWNvb3Jkc191diwKKyNpZm5kZWYgSVNQMjQwMQorCQkJICAgc291cmNlXzZheGlzX2NvbmZpZy0+eWNvb3Jkc191diwKKwkJCSAgIHNvdXJjZV82YXhpc19jb25maWctPndpZHRoX3V2ICoKKwkJCSAgIHNvdXJjZV82YXhpc19jb25maWctPmhlaWdodF91diAqCisJCQkgICBzaXplb2YoKnNvdXJjZV82YXhpc19jb25maWctPnljb29yZHNfdXYpLAorI2Vsc2UKKwkJCSAgIHRfNmF4aXNfY29uZmlnLnljb29yZHNfdXYsCisJCQkgICB0XzZheGlzX2NvbmZpZy53aWR0aF91diAqCisJCQkgICB0XzZheGlzX2NvbmZpZy5oZWlnaHRfdXYgKgorCQkJICAgc2l6ZW9mKCpkdnNfNmF4aXNfY29uZmlnLT55Y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rpb24gY29uZmlnICovCisJY29tcGF0X3VwdHJfdCBtYWNjX3RhYmxlOworCWNvbXBhdF91cHRyX3QgZ2FtbWFfdGFibGU7CisJY29tcGF0X3VwdHJfdCBjdGNfdGFibGU7CisJY29tcGF0X3VwdHJfdCB4bnJfdGFibGU7CisJY29tcGF0X3VwdHJfdCByX2dhbW1hX3RhYmxlOworCWNvbXBhdF91cHRyX3QgZ19nYW1tYV90YWJsZTsKKwljb21wYXRfdXB0cl90IGJfZ2FtbWFfdGFibGU7CisJY29tcGF0X3VwdHJfdCBtb3Rpb25fdmVjdG9yOyAvKiBGb3IgMi1heGlzIERWUyAqLworCWNvbXBhdF91cHRyX3Qgc2hhZGluZ190YWJsZTsKKwljb21wYXRfdXB0cl90IG1vcnBoX3RhYmxlOworCWNvbXBhdF91cHRyX3QgZHZzX2NvZWZzOyAvKiBEVlMgMS4wIGNvZWZmaWNpZW50cyAqLworCWNvbXBhdF91cHRyX3QgZHZzMl9jb2VmczsgLyogRFZTIDIuMCBjb2VmZmljaWVudHMgKi8KKwljb21wYXRfdXB0cl90IGNhcHR1cmVfY29uZmlnOworCWNvbXBhdF91cHRyX3QgYW5yX3RocmVzOworCisJY29tcGF0X3VwdHJfdAlsaW5fMjUwMF9jb25maWc7ICAgICAgIC8qIFNreWxha2U6IExpbmVhcml6YXRpb24gY29uZmlnICovCisJY29tcGF0X3VwdHJfdAlvYmdyaWRfMjUwMF9jb25maWc7ICAgIC8qIFNreWxha2U6IE9CR1JJRCBjb25maWcgKi8KKwljb21wYXRfdXB0cl90CWJucl8yNTAwX2NvbmZpZzsgICAgICAgLyogU2t5bGFrZTogYmF5ZXIgZGVub2lzZSBjb25maWcgKi8KKwljb21wYXRfdXB0cl90CXNoZF8yNTAwX2NvbmZpZzsgICAgICAgLyogU2t5bGFrZTogc2hhZGluZyBjb25maWcgKi8KKwljb21wYXRfdXB0cl90CWRtXzI1MDBfY29uZmlnOyAgICAgICAgLyogU2t5bGFrZTogZGVtb3NhaWMg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lhX2Nzc19jZV9jb25maWcgICBjZV9jb25maWc7CisJc3RydWN0IGlhX2Nzc19vYl9jb25maWcgICBvYl9jb25maWc7CisJc3RydWN0IGlhX2Nzc19kcF9jb25maWcgICBkcF9jb25maWc7CisJc3RydWN0IGlhX2Nzc19kZV9jb25maWcgICBkZV9jb25maWc7CisJc3RydWN0IGlhX2Nzc19nY19jb25maWcgICBnY19jb25maWc7CisJc3RydWN0IGlhX2Nzc19ucl9jb25maWcgICBucl9jb25maWc7CisJc3RydWN0IGlhX2Nzc19lZV9jb25maWcgICBlZV9jb25maWc7CisJc3RydWN0IGlhX2Nzc19hbnJfY29uZmlnICBhbnJfY29uZmlnOworCXN0cnVjdCBpYV9jc3NfM2FfY29uZmlnICAgczNhX2NvbmZpZzsKKwlzdHJ1Y3QgaWFfY3NzX3hucl9jb25maWcgIHhucl9jb25maWc7CisJc3RydWN0IGlhX2Nzc19kel9jb25maWcgICBkel9jb25maWc7CisJc3RydWN0IGlhX2Nzc19jY19jb25maWcgeXV2MnJnYl9jY19jb25maWc7CisJc3RydWN0IGlhX2Nzc19jY19jb25maWcgcmdiMnl1dl9jY19jb25maWc7CisJc3RydWN0IGlhX2Nzc19tYWNjX3RhYmxlICBtYWNjX3RhYmxlOworCXN0cnVjdCBpYV9jc3NfZ2FtbWFfdGFibGUgZ2FtbWFfdGFibGU7CisJc3RydWN0IGlhX2Nzc19jdGNfdGFibGUgICBjdGNfdGFibGU7CisKKwlzdHJ1Y3QgaWFfY3NzX3hucl90YWJsZSAgIHhucl90YWJsZTsKKwlzdHJ1Y3QgaWFfY3NzX3JnYl9nYW1tYV90YWJsZSByX2dhbW1hX3RhYmxlOworCXN0cnVjdCBpYV9jc3NfcmdiX2dhbW1hX3RhYmxlIGdfZ2FtbWFfdGFibGU7CisJc3RydWN0IGlhX2Nzc19yZ2JfZ2FtbWFfdGFibGUgYl9nYW1tYV90YWJsZTsKKworCXN0cnVjdCBpYV9jc3NfdmVjdG9yICAgICAgbW90aW9uX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cmJpdHJhcnkgcG9pc3Rpb24gaW4gdGhlIGNpcmN1bGFyCisgKiBidWZmZXIuIFRoZSB1c2VyIHNob3VsZCBjYWxsICJpYV9jc3NfY2lyY2J1Zl9pc19lbXB0eSgpIgorICogdG8gYXZvaWQgYWNjZXNzaW5nIHRvIGFuIGVtcHR5IGJ1ZmZlci4KKyAqCisgKiBAcGFyYW0gY2IJIFRoZSBwb2ludGVyIHRvIHRoZSBjaXJjdWxhciBidWZmZXIuCisgKiBAcGFyYW0gb2Zmc2V0IFRoZSBvZmZzZXQgZnJvbSAic3RhcnQiIHRvIHRoZSB0YXJnZXQgcG9zaXRpb24uCisgKgorICogQHJldHVybiB0aGUgZXh0cmFjdGVkIHZhbHVlLgorICovCitTVE9SQUdFX0NMQVNTX0VYVEVSTiB1aW50MzJfdCBpYV9jc3NfY2lyY2J1Zl9leHRyYWN0KAorCWlhX2Nzc19jaXJjYnVmX3QgKmNiLAorCWludCBvZmZzZXQpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIElubGluZSBmdW5jdGlvbnMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioKKyAqIEBicmllZiBTZXQgdGhlICJ2YWwiIGZpZWxkIGluIHRoZSBlbGVtZW50LgorICoKKyAqIEBwYXJhbSBlbGVtIFRoZSBwb2ludGVyIHRvIHRoZSBlbGVtZW50LgorICogQHBhcmFtIHZhbCAgVGhlIHZhbHVlIHRvIGJlIHNldC4KKyAqLworU1RPUkFHRV9DTEFTU19JTkxJTkUgdm9pZCBpYV9jc3NfY2lyY2J1Zl9lbGVtX3NldF92YWwoCisJaWFfY3NzX2NpcmNidWZfZWxlbV90ICplbGVtLAorCXVpbnQzMl90IHZhbCkKK3sKKwlPUF9fX2Fzc2VydChlbGVtICE9IE5VTEwpOworCisJZWxlbS0+d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AqIEByZXR1cm4gdGhlICJ2YWwiIGZpZWxkLgorICovCitzdGF0aWMgaW5saW5lIHVpbnQzMl90CitpYV9jc3NfY2lyY2J1Zl9lbGVtX2dldF92YWwoaWFfY3NzX2NpcmNidWZfZWxlbV90ICplbGVtKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBOb24taW5saW5lIGZ1bmN0aW9ucy4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKgorICogQGJyaWVmIENyZWF0ZSB0aGUgY2lyY3VsYXIgYnVmZmVyLgorICogUmVmZXIgdG8gImlhX2Nzc19jaXJjYnVmLmgiIGZvciBkZXRhaWxzLgorICovCit2b2lkCitpYV9jc3NfY2lyY2J1Zl9jcmVhdGUoaWFfY3NzX2NpcmNidWZfdCAqY2IsCisJCQkgICBpYV9jc3NfY2lyY2J1Zl9lbGVtX3QgKmVsZW1zLAorCQkJICAgaWFfY3NzX2NpcmNidWZfZGVzY190ICpkZXNjKQoreworCXVpbnQzMl90IGk7CisKKwlPUF9fX2Fzc2VydChkZXNjKTsKKworCWNiLT5kZXNjID0gZGVzYzsKKwkvKiBJbml0aWFsaXplIHRvIGRlZmF1bHRzICovCisJY2ItPmRlc2MtPnN0YXJ0ID0gMDsKKwljYi0+ZGVzYy0+ZW5kID0gMDsKKwljYi0+ZGVzYy0+c3RlcCA9IDA7CisKKwlmb3IgKGkgPSAwOyBpIDwgY2ItPmRlc2MtPnNpemU7IGkrKykKKwkJaWFfY3NzX2NpcmNidWZfZWxlbV9pbml0KCZlbGVtc1tpXSk7CisKKwljYi0+ZWxlbXMgPSBlbGVtczsKK30KKworLyoqCisgKiBAYnJpZWYgRGVzdHJveSB0aGUgY2lyY3VsYXIgYnVmZmVyLgorICogUmVmZXIgdG8gImlhX2Nzc19jaX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ZWQgaW50IGJkc19mYWN0b3IsCisJdW5zaWduZWQgaW50ICpiZHNfZmFjdG9yX251bWVyYXRvciwKKwl1bnNpZ25lZCBpbnQgKmJkc19mYWN0b3JfZGVub21pbmF0b3IpOworCisvKiogQGJyaWVmIEdldCBhIGJpbmFyeSBkZXNjcmlwdG9yIGZvciBwcmV2aWV3IHN0YWdlLgorICoKKyAqIEBwYXJhbVtpbl0gcGlwZQorICogQHBhcmFtW291dF0gcHJldmlld19kZXNjcgorICogQHBhcmFtW2luL291dF0gaW5faW5mbworICogQHBhcmFtW2luL291dF0gYmRzX291dF9pbmZvCisgKiBAcGFyYW1baW4vb3V0XSBvdXRfaW5mbworICogQHBhcmFtW2luL291dF0gdmZfaW5mbworICogQHJldHVybglJQV9DU1NfU1VDQ0VTUyBvciBlcnJvciBjb2RlIHVwb24gZXJyb3IuCisgKgorICovCitleHRlcm4gZW51bSBpYV9jc3NfZXJyIGlhX2Nzc19waXBlX2dldF9wcmV2aWV3X2JpbmFyeWRlc2MoCisJc3RydWN0IGlhX2Nzc19waXBlICogY29uc3QgcGlwZSwKKwlzdHJ1Y3QgaWFfY3NzX2JpbmFyeV9kZXNjciAqcHJldmlld19kZXNjciwKKwlzdHJ1Y3QgaWFfY3NzX2ZyYW1lX2luZm8gKmluX2luZm8sCisJc3RydWN0IGlhX2Nzc19mcmFtZV9pbmZvICpiZHNfb3V0X2luZm8sCisJc3RydWN0IGlhX2Nzc19mcmFtZV9pbmZvICpvdXRfaW5mbywKKwlzdHJ1Y3QgaWFfY3NzX2ZyYW1lX2luZm8gKnZmX2luZm8pOworCisvKiogQGJyaWVmIEdldCBhIGJpbmFyeSBkZXNjcmlwdG9yIGZvciB2aWRlbyBzdGFnZS4KKyAqCisgKiBAcGFyYW1baW4vb3V0XSBwaXBlCisgKiBAcGFyYW1bb3V0XSB2aWRlb19kZXNjcgorICogQHBhcmFtW2luL291dF0gaW5faW5mbworICogQHBhcmFtW2luL291dF0gYmRzX291dF9pbmZvCisgK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Ki8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9ZVVY0MjBfOCAgICAgICAgICAyNCAgIC8qIDAxIDEwMDAgWVVWNDIwIDgtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfWVVWNDIwXzEwICAgICAgICAgMjUgICAvKiAwMSAxMDAxICBZVVY0MjAgMTAtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1lVVjQyMF84TCAgICAgICAgIDI2ICAgLyogMDEgMTAxMCAgIFlVVjQyMCA4LWJpdCBsZWdhY3kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9ZVVY0MjJfOCAgICAgICAgICAzMCAgIC8qIDAxIDExMTAgICBZVVY0MjIgOC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfWVVWNDIyXzEwICAgICAgICAgMzEgICAvKiAwMSAxMTExICAgWVVWNDIyIDEwLWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JHQjQ0NCAgICAgICAgICAgIDMyICAgLyogMTAgMDAwMCAgIFJHQjQ0NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SR0I1NTUgICAgICAgICAgICAzMyAgIC8qIDEwIDAwMDEgICBSR0I1NTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkdCNTY1ICAgICAgICAgICAgMzQgICAvKiAxMCAwMDEwICAgUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JHQjY2NiAgICAgICAgICAgIDM1ICAgLyogMTAgMDAxMSAgIFJHQjY2NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SR0I4ODggICAgICAgICAgICAzNiAgIC8qIDEwIDAxMDAgICBSR0I4ODggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkFXNiAgICAgICAgICAgICAgNDAgICAvKiAxMCAxMDAwICAgUkFXNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JBVzcgICAgICAgICAgICAgIDQxICAgLyogMTAgMTAwMSAgIFJBVzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SQVc4ICAgICAgICAgICAgICA0MiAgIC8qIDEwIDEwMTAgICBSQVc4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkFXMTAgICAgICAgICAgICAgNDMgICAvKiAxMCAxMDExICAgUkFXMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JBVzEyICAgICAgICAgICAgIDQ0ICAgLyogMTAgMTEwMCAgIFJBVzEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SQVcxNCAgICAgICAgICAgICA0NSAgIC8qIDEwIDExMDEgICBSQVcxNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfVVNSX0RFRl8xICAgICAgICAgNDggICAvKiAxMSAwMDAwICAgIEpQRUcgW1VzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgMV0gICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1VTUl9ERUZfMiAgICAgICAgIDQ5ICAgLyogMTEgMDAwMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDIgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9VU1JfREVGXzMgICAgICAgICA1MCAgIC8qIDExIDAwMTAgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSAzICAgICAgICAgICAgICAgICAgICov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JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfU09GICAgICAgICAgICAgICAgIDAgICAvKiAwMCAwMDAwICAgIGZyYW1lIHN0YXJ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX0VPRiAgICAgICAgICAgICAgICAxICAgLyogMDAgMDAwMSAgICBmcmFtZSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9TT0wgICAgICAgICAgICAgICAgMiAgIC8qIDAwIDAwMTAgICAgbGluZSBzdGFydCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfRU9MICAgICAgICAgICAgICAgIDMgICAvKiAwMCAwMDExICAgIGxpbmUgZW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX0dFTl9TSDEgICAgICAgICAgICA4ICAgLyogMDAgMTAwMCAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSAxICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9HRU5fU0gyICAgICAgICAgICAgOSAgIC8qIDAwIDEwMDEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSAyICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfR0VOX1NIMyAgICAgICAgICA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AwX0JFX1JBVzE4X0RBVEFJRF9JRFggICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9SQVcxOF9PUFRJT05fSURYICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfQkVfUkFXMThfRU5fSURYICAgICAgICAgICAgICAgICAgICAgOAorCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfQkVfQ09NUF9OT19DT01QICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0JFX0NPTVBfMTBfNl8xMCAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9DT01QXzEwXzdfMTAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfQkVfQ09NUF8xMF84XzEwICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0JFX0NPTVBfMTJfNl8xMiAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9DT01QXzEyXzdfMTIgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfQkVfQ09NUF8xMl84XzEyICAgICAgICAgICAgICAgICAgICAgNgorCisKKy8qIHBhY2tldCBiaXQgZGVmaW5pdGlvbiAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BLVF9TT1BfSURYICAgICAgICAgICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QS1RfU09QX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX0NIX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgICAyMgorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BLVF9DSF9JRF9CSVRTICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QS1RfRk1UX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX0ZNVF9JRF9CSVRTICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BIX0RBVEFfRklFTERfSURYICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QSF9EQVRBX0ZJRUxEX0JJVFMgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX1BBWUxPQURfSURYICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BLVF9QQVlMT0FEX0JJVFMgICAgICAgICAgICAgICAgICAgMzIKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIEN1c3RvbSBEZWNvZGluZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogVGhlc2UgQ3VzdG9tIERlZnMgYXJlIGRlZmluZWQgYmFzZWQgb24gZGVzaWduLXRpbWUgY29uZmlnIGluICJjc2lfYmVfcGl4ZWxfZm9ybWF0dGVyLmNoZGwiICEhICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgQkVfQ1VTVF9FTl9JRFggICAgICAgICAgICAgICAgICAgICAwICAgICAvKiAyYml0cyAqLworI2RlZmluZSBCRV9DVVNUX0VOX0RBVEFJRF9JRFggICAgICAgICAgICAgIDIgICAgIC8qIDZiaXRzIE1JUEkgREFUQSBJRCAqLyAKKyNkZWZpbmUgQkVfQ1VTVF9FTl9XSURUSCAgICAgICAgICAgICAgICAgICA4ICAgICAKKyNkZWZpbmUgQkVfQ1VTVF9NT0RFX0FMTCAgICAgICAgICAgICAgICAgICAxICAgICAvKiBFbmFibGUgQ3VzdG9tIERlY29kaW5nIGZvciBhbGwgREFUQSBJRHMgKi8KKyNkZWZpbmUgQkVfQ1VTVF9NT0RFX09ORSAgICAgICAgICAgICAgICAgICAzICAgICAvKiBFbmFibGUgQ3VzdG9tIERlY29kaW5nIGZvciBPTkUgREFUQSBJRCwgcHJvZ3JhbW1lZCBpbiBDVVNUX0VOX0RBVEFfSUQgKi8KKworLyogRGF0YSBTdGF0ZSBjb25maWcgPSB7Z2V0X2JpdHMoNmJpdHMpLCB2YWxpZCgxYml0KX0gICovCisjZGVmaW5lIEJFX0NVU1RfREFUQV9TVEFURV9TMF9JRFggICAgICAgICAgMCAgICAgLyogN2JpdHMgKi8gCisjZGVmaW5lIEJFX0NVU1RfREFUQV9TVEFURV9TMV9JRFggICAgICAgICAgNyAgICAgLyogN2JpdHMgKi8gCisjZGVmaW5lIEJFX0NVU1RfREFUQV9TVEFURV9TMl9JRFggICAgICAgICAgMTQgICAgLyogN2JpdHMgKi8KKyNkZWZpbmUgQkVfQ1VTVF9EQVRBX1NUQVRFX1dJRFRIICAgICAgICAgICAyMSAgICAKKyNkZWZpbmUgQkVfQ1VTVF9EQVRBX1NUQVRFX1ZBTElEX0lEWCAgICAgICAwICAgIC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0CisjZGVmaW5lIENTU19SRUNFSVZFUl9SRl9XT1JEICAgICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX0lNR19QUk9DX1JGX0FERFIgICAgICAgICAxMAorI2RlZmluZSBDU1NfUkVDRUlWRVJfQ1NJX1JGX0FERFIgICAgICAgICAgICAgICA0CisjZGVmaW5lIENTU19SRUNFSVZFUl9EQVRBX09VVCAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX0NITl9OTyAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDU1NfUkVDRUlWRVJfRFdPUkRfQ05UICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIENTU19SRUNFSVZFUl9GT1JNQVRfVFlQICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX0hSRVNQT05TRSAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDU1NfUkVDRUlWRVJfU1RBVEVfV0lEVEggICAgICAgICAgICAgICAzCisjZGVmaW5lIENTU19SRUNFSVZFUl9GSUZPX0RBVCAgICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX0NOVF9WQUwgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDU1NfUkVDRUlWRVJfUFJFRDEwX1ZBTCAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIENTU19SRUNFSVZFUl9QUkVEMTJfVkFMICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX0NOVF9XSURUSCAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBDU1NfUkVDRUlWRVJfV09SRF9DTlQgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIENTU19SRUNFSVZFUl9QSVhFTF9MRU4gICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX1BJWEVMX0NOVCAgICAgICAgICAgICAgICAg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ICAgMiAgICAgIAorI2RlZmluZSBfRE1BX1YyX01PVkVfQjJBX0JMT0NLX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgICAgICAgIDMgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9NT1ZFX0EyQl9DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAgICAgCisjZGVmaW5lIF9ETUFfVjJfTU9WRV9BMkJfQkxPQ0tfQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAgNSAgICAgIAorI2RlZmluZSBfRE1BX1YyX01PVkVfQTJCX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgICAgICAgICAgICAgIDYgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9NT1ZFX0EyQl9CTE9DS19OT19TWU5DX0NIS19DT01NQU5EICAgICAgICAgICA3ICAgICAgCisjZGVmaW5lIF9ETUFfVjJfSU5JVF9BX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgICAgIAorI2RlZmluZSBfRE1BX1YyX0lOSVRfQV9CTE9DS19DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgIDkgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9JTklUX0FfTk9fU1lOQ19DSEtfQ09NTUFORCAgICAgICAgICAgICAgICAgIDEwICAgICAgCisjZGVmaW5lIF9ETUFfVjJfSU5JVF9BX0JMT0NLX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgICAgICAgICAxMSAgICAgIAorI2RlZmluZSBfRE1BX1YyX0lOSVRfQl9DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9JTklUX0JfQkxPQ0tfQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAgIDEzICAgICAgCisjZGVmaW5lIF9ETUFfVjJfSU5JVF9CX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgICAgICAgICAgICAgICAxNCAgICAgIAorI2RlZmluZSBf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IS19DT01NQU5EICAgICAgICAgKyAxNikgCisjZGVmaW5lIF9ETUFfVjJfTk9fQUNLX0lOSVRfQl9CTE9DS19OT19TWU5DX0NIS19DT01NQU5EICAgICAoX0RNQV9WMl9JTklUX0JfQkxPQ0tfTk9fU1lOQ19DSEtfQ09NTUFORCAgICsgMTYpIAorI2RlZmluZSBfRE1BX1YyX0NPTkZJR19DSEFOTkVMX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgMzIgICAKKyNkZWZpbmUgX0RNQV9WMl9TRVRfQ0hBTk5FTF9QQVJBTV9DT01NQU5EICAgICAgICAgICAgICAgICAgIDMzICAgCisjZGVmaW5lIF9ETUFfVjJfU0VUX0NSVU5fQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAgICAgICA2MiAgIAorCisvKiBDaGFubmVsIFBhcmFtZXRlciBJRHMgKi8KKyNkZWZpbmUgX0RNQV9WMl9QQUNLSU5HX1NFVFVQX1BBUkFNICAgICAgICAgICAgICAgICAgICAgMCAgCisjZGVmaW5lIF9ETUFfVjJfU1RSSURFX0FfUEFSQU0gICAgICAgICAgICAgICAgICAgICAgICAgIDEgIAorI2RlZmluZSBfRE1BX1YyX0VMRU1fQ1JPUFBJTkdfQV9QQVJBTSAgICAgICAgICAgICAgICAgICAyICAKKyNkZWZpbmUgX0RNQV9WMl9XSURUSF9BX1BBUkFNICAgICAgICAgICAgICAgICAgICAgICAgICAgMyAgCisjZGVmaW5lIF9ETUFfVjJfU1RSSURFX0JfUEFSQU0gICAgICAgICAgICAgICAgICAgICAgICAgIDQgIAorI2RlZmluZSBfRE1BX1YyX0VMRU1fQ1JPUFBJTkdfQl9QQVJBTSAgICAgICAgICAgICAgICAgICA1ICAKKyNkZWZpbmUgX0RNQV9WMl9XSURUSF9CX1BBUkFNICAgICAgICAgICAgICAgICAgICAgICAgICAgNiAgCisjZGVmaW5lIF9ETUFfVjJfSEVJR0hUX1BBUkFNICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcgIAorI2RlZmluZSBfRE1BX1YyX1FVRVVFRF9DTURTICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAKKworLyogUGFyYW1ldGVyIENvbnN0YW50cyAqLworI2RlZmluZSBfRE1BX1YyX1pFUk9fRVhURU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIF9ETUFfVjJfU0lHTl9FWFRFTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworICAvKiBTTEFWRSBhZGRyZXNzIG1hcCAqLworI2RlZmluZSBfRE1BX1YyX1NFTF9GU01fQ01EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIF9ETUFfVjJfU0VMX0NIX1JFRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgX0RNQV9WMl9TRUxfQ09OTl9HUk9VUCAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBfRE1BX1YyX1NFTF9ERVZfSU5URVJGICAgICAgICAgICAgICAgICAgICAgICAgICAzCisKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9DT01QX0lEWCAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0NPTVBfQklUUyAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfQ0hfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9DSF9SRUdfQklUUyAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX1BBUkFNX0lEWCAgICAgICAgICAgICAgICAgICAgICAoX0RNQV9WMl9BRERSX1NFTF9DSF9SRUdfQklUUytfRE1BX1YyX0FERFJfU0VMX0NIX1JFR19JRFgpCisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfUEFSQU1fQklUUyAgICAgICAgICAgICAgICAgICAgIDQKKworI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0dST1VQX0NPTVBfSURYICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfR1JPVVBfQ09NUF9CSVRTICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9HUk9VUF9DT01QX0lORk9fSURYICAgICAgICAgICAgKF9ETUFfVjJfQUREUl9TRUxfR1JPVVBfQ09NUF9CSVRTICsgX0RNQV9WMl9BRERSX1NFTF9HUk9VUF9DT01QX0lEWCkKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9HUk9VUF9DT01QX0lORk9fQklUUyAgICAgICAgICAgNAorCisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfREVWX0lOVEVSRl9JRFhfSURYICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9ERVZfSU5URVJGX0lEWF9CSVRTICAgICAgICAgICAgNgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0RFVl9JTlRFUkZfSU5GT19JRFggICAgICAgICAgICAoX0RNQV9WMl9BRERSX1NFTF9ERVZfSU5URVJGX0lEWF9JRFgrX0RNQV9WMl9BRERSX1NFTF9ERVZfSU5URVJGX0lEWF9CSVRTKQorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0RFVl9JTlRFUkZfSU5GT19CSVRTICAgICAgICAgICA0CisKKyNkZWZpbmUgX0RNQV9WMl9GU01fR1JPVVBfQ01EX0lEWCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBfRE1BX1YyX0ZTTV9HUk9VUF9BRERSX1NSQ19JRFggICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIF9ETUFfVjJfRlNNX0dST1VQX0FERFJfREVTVF9JRFggICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0RNQV9WMl9GU01fR1JPVVBfQ01EX0NUUkxfSURYICAgICAgICA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DT0VGX0JJVFMtMikpICAvKiBXZSByZXByZXNlbnQgc2lnbmVkIDEwIGJpdCBjb2VmZmljaWVudHMuICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogVGhlIHN1cHBvcnRlZCByYW5nZSBpcyBbLTI1NiwgLi4sICsyNTZdICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGluIDE0LWJpdCBzaWduZWQgbm90YXRpb24sICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBXZSBuZWVkIGFsbCB0ZW4gYml0cyAoTVNCIG11c3QgYmUgemVybykuICAgICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogLXMgaXMgaW5zZXJ0ZWQgdG8gc29sdmUgdGhpcyBpc3N1ZSwgYW5kICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRoZXJlZm9yZSAiMSIgaXMgZXF1YWwgdG8gKzI1Ni4gICAgICAgICAgICAgICovCisjZGVmaW5lIEhSVF9HRENfQkNJX0NPRUZfTUFTSyAgICAgICAgICAgICgoMSA8PCBIUlRfR0RDX0JDSV9DT0VGX0JJVFMpIC0gMSkgCisKKyNkZWZpbmUgSFJUX0dEQ19MVVRfQllURVMgICAgICAgICAgICAgICAgKEhSVF9HRENfTio0KjIpICAgICAgICAgICAgICAgIC8qIDEwMjQgYWRkcmVzc2VzLCA0IGNvZWZmaWNpZW50cyBwZXIgYWRkcmVzcywgICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAyIGJ5dGVzIHBlciBjb2VmZmljaWVudCAgICAgICAgICAgICAgICAgICAgICAqLworCisjZGVmaW5lIF9IUlRfR0RDX1JFR19BTElHTiAgICAgICAgICAgICAgIDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKworICAvLyAgICAgMzEgIDMwICAyOSAgICAyNSAyNCAgICAgICAgICAgICAgICAgICAgIDAKKyAgLy8gIHwtLS0tLXwtLS18LS0tLS0tLS18LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfAorICAvLyAgfCBDTUQgfCBDIHwgUmVnX0lEIHwgICAgICAgIFZhbHVlICAgICAgICAgICB8CisKKworICAvLyBUaGVyZSBhcmUganVzdCB0d28gY29tbWFuZHMgcG9zc2libGUgZm9yIHRoZSBHREMgYmxvY2s6CisgIC8vIDEgLSBDb25maWd1cmUgcmVnIAorICAvLyAwIC0gRGF0YSB0b2tlbiAgICAKKyAgCisgIC8vIEMgICAgICAtIFJlc2VydmVkIGJpdAorICAvLyAgICAgICAgICBVc2VkIGluIHByb3RvY29sIHRvIGluZGljYXRlIHdoZXRoZXIgaXQgaXMgQy1ydW4gb3Igb3RoZXIgdHlwZSBvZiBydW5zCisgIC8vICAgICAgICAgIEluIGNhc2Ugb2YgQy1ydW4sIHRoaXMgYml0IGhhcyBhIHZhbHVlIG9mIDEsIGZvciBhbGwgdGhlIG90aGVyIHJ1bnMsIGl0IGlzIDAuCisKKyAgLy8gUmVnX0lEIC0gQWRkcmVzcyBvZiB0aGUgcmVnaXN0ZXIgdG8gYmUgY29uZmlndXJlZAorICAKKyAgLy8gVmFsdWUgIC0gVmFsdWUgdG8gc3RvcmUgdG8gdGhlIGFkZHJlc3NlZCByZWdpc3RlciwgbWF4aW11bSBvZiAyNCBiaXRzCisKKyAgLy8gQ29uZmlndXJlIHJlZyBjb21tYW5kIGlzIG5vdCBmb2xsb3dlZCBieSBhbnkgb3R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CBYWFhYIHwgICBGUlkgICAgfCAgSVBYIHwgICBGUlggICAgfAorCisKKyNkZWZpbmUgSFJUX0dEQ19DRV9GU00wX1BPUyAgICAgICAgICAgMAorI2RlZmluZSBIUlRfR0RDX0NFX0ZTTTBfTEVOICAgICAgICAgICAyCisjZGVmaW5lIEhSVF9HRENfQ0VfT1BZX1BPUyAgICAgICAgICAgIDIKKyNkZWZpbmUgSFJUX0dEQ19DRV9PUFlfTEVOICAgICAgICAgICAxNAorI2RlZmluZSBIUlRfR0RDX0NFX09QWF9QT1MgICAgICAgICAgIDE2CisjZGVmaW5lIEhSVF9HRENfQ0VfT1BYX0xFTiAgICAgICAgICAgMTYKKy8vIENIS19FTkdJTkUgcmVnaXN0ZXIgYml0LW1hcDoKKy8vICAgMzEgICAgICAgICAgICAxNiAxNSAgICAgICAgMiAxICAwCisvLyAgfC0tLS0tLS0tLS0tLS0tLS18LS0tLS0tLS0tLS18LS0tLXwKKy8vICB8ICAgICAgT1BYICAgICAgIHwgICAgT1BZICAgIHxGU00wfAorLy8gSG93ZXZlciwgZm9yIHRoZSB0aW1lIGJlaW5nIGF0IGxlYXN0LCAKKy8vIHRoaXMgaW1wbGVtZW50YXRpb24gaXMgbWVhbmluZ2xlc3MgaW4gaHNzIG1vZGVsLAorLy8gU28sIHdlIGp1c3QgcmV0dXJuIDAKKworCisjZGVmaW5lIEhSVF9HRENfQ0hLX0VOR0lORV9JRFggICAgICAgIDAKKyNkZWZpbmUgSFJUX0dEQ19XT0lYX0lEWCAgICAgICAgICAgICAgMQorI2RlZmluZSBIUlRfR0RDX1dPSVlfSURYICAgICAgICAgICAgICAyCisjZGVmaW5lIEhSVF9HRENfQlBQX0lEWCAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSFJUX0dEQ19GUllJUFhGUlhfSURYICAgICAgICAgNAorI2RlZmluZSBIUlRfR0RDX09YRElNX0lEWCAgICAgICAgICAgICA1CisjZGVmaW5lIEhSVF9HRENfT1lESU1fSURYICAgICAgICAgICAgIDYKKyNkZWZpbmUgSFJUX0dEQ19TUkNfQUREUl9JRFggICAgICAgICAgNworI2RlZmluZSBIUlRfR0RDX1NSQ19FTkRfQUREUl9JRFggICAgICA4CisjZGVmaW5lIEhSVF9HRENfU1JDX1dSQVBfQUREUl9JRFggICAgIDkKKyNkZWZpbmUgSFJUX0dEQ19TUkNfU1RSSURFX0lEWCAgICAgICAxMAorI2RlZmluZSBIUlRfR0RDX0RTVF9BRERSX0lEWCAgICAgICAgIDExCisjZGVmaW5lIEhSVF9HRENfRFNUX1NUUklERV9JRFggICAgICAgMTIKKyNkZWZpbmUgSFJUX0dEQ19EWF9JRFggICAgICAgICAgICAgICAxMworI2RlZmluZSBIUlRfR0RDX0RZX0lEWCAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhSVF9HRENfUDBYX0lEWCAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgSFJUX0dEQ19QMFlfSURYICAgICAgICAgICAgICAxNgorI2RlZmluZSBIUlRfR0RDX1AxWF9JRFggICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhSVF9HRENfUDFZX0lEWCAgICAgICAgICAgICAgMTgKKyNkZWZpbmUgSFJUX0dEQ19QMlhfSURYICAgICAgICAgICAgICAxOQorI2RlZmluZSBIUlRfR0RDX1AyWV9JRFggICAgICAgICAgICAgIDIwCisjZGVmaW5lIEhSVF9HRENfUDNYX0lEWCAgICAgICAgICAgICAgMjEKKyNkZWZpbmUgSFJUX0dEQ19QM1lfSURYICAgICAgICAgICAgICAyMgorI2RlZmluZSBIUlRfR0RDX1BFUkZfUE9JTlRfSURYICAgICAgIDIzICAvLyAxeDEgOyAxeDIgOyAyeDEgOyAyeDIgcGl4ZWxzIHBlciBjYworI2RlZmluZSBIUlRfR0RDX0lOVEVSUF9UWVBFX0lEWCAgICAgIDI0ICAvLyBOTkQgOyBCTEkgOyBCQ0kgOyBMVVQKKyNkZWZpbmUgSFJUX0dEQ19TQ0FOX0lEWCAgICAgICAgICAgICA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1RBVF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1BfU1RSRUFNX1NUQVRfQl9JRFggICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9HUF9SRUdTX0lTUF9TVFJFQU1fU1RBVF9JRFggICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfR1BfUkVHU19NT0RfU1RSRUFNX1NUQVRfSURYICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBISVZFX0dQX1JFR1NfU1BfU1RSRUFNX1NUQVRfSVJRX0NPTkRfSURYICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NQX1NUUkVBTV9TVEFUX0JfSVJRX0NPTkRfSURYICAgICAgICAgICAgICA5CisjZGVmaW5lIEhJVkVfR1BfUkVHU19JU1BfU1RSRUFNX1NUQVRfSVJRX0NPTkRfSURYICAgICAgICAgICAgICAxMAorI2RlZmluZSBISVZFX0dQX1JFR1NfTU9EX1NUUkVBTV9TVEFUX0lSUV9DT05EX0lEWCAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NQX1NUUkVBTV9TVEFUX0lSUV9FTkFCTEVfSURYICAgICAgICAgICAgIDEyCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUF9TVFJFQU1fU1RBVF9CX0lSUV9FTkFCTEVfSURYICAgICAgICAgICAxMworI2RlZmluZSBISVZFX0dQX1JFR1NfSVNQX1NUUkVBTV9TVEFUX0lSUV9FTkFCTEVfSURYICAgICAgICAgICAgMTQKKyNkZWZpbmUgSElWRV9HUF9SRUdTX01PRF9TVFJFQU1fU1RBVF9JUlFfRU5BQkxFX0lEWCAgICAgICAgICAgIDE1CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TV0lUQ0hfUFJJTV9JRl9JRFggICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBISVZFX0dQX1JFR1NfU1dJVENIX0dEQzFfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMTcKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NXSVRDSF9HREMyX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOQorI2RlZmluZSBISVZFX0dQX1JFR1NfU0xWX1JFR19TUlNUX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgMjAKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1ZJU0FfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxCisKKy8qIEJpdCBudW1iZXJzIG9mIHRoZSBzb2Z0IHJlc2V0IHJlZ2lzdGVyICovCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lTWVNfQ0JVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9JU0VMX0NCVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfSUZNVF9DQlVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0dQREVWX0NCVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfVEMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0dQVElNRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9GQUNFTExGSUZPUyAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfRF9PU1lTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lGVF9TRUNfUElQRSAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9HREMxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfR0RDMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1ZFQ19CVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9JU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0xWX0dSUF9CVVMgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9JU1BfU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0ZfUElGX0NFTExTICAgICAgICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NGX1NJRl9TUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9NQ19TUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTkKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0ZfSVNZU19TUCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NGX0RNQV9DRUxMUyAgICAgICAgICAgICAgICAgICAgICAgICAyMQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9HREMxX0NFTExTICAgICAgICAgICAgICAgICAgICAgICAgMjIKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0ZfR0RDMl9DRUxMUyAgICAgICAgICAgICAgICAgICAgICAgIDIzCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9PQ1AyQ0lPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjUKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfTkJVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0hPU1QxMkJVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNworI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9XQlVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjgKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfSUNfT1NZUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1dCVVNfSUMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMAorCisvKiBCaXQgbnVtYmVycyBvZiB0aGUgc2xhdmUgcmVnaXN0ZXIgc29mdCByZXNldCByZWdpc3RlciAqLworI2RlZmluZSBISVZFX0dQX1JFR1NfU0xWX1JFR19TUlNUX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NMVl9SRUdfU1JTVF9HREMxICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TTFZfUkVHX1NSU1RfR0RDMiAgICAgICAgICAgICAgICAgICAgICAgICAgMgorCisvKiBvcmRlciBvZiB0aGUgaW5wdXQgYml0cyBmb3IgdGhlIGlycSBjb250cm9sbGVyICovCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8wX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzJfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8zX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fNF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzVfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl82X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fN19CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzhfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl85X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMTBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzExX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9TUF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSVNQX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0lTWVNfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9JU0VMX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSUZNVF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX1NQX1NUUkVBTV9NT05fQklUX0lEICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9JU1BfU1RSRUFNX01PTl9CSVRfSUQgICAgICAgICAgICAgICAgICAxOAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfTU9EX1NUUkVBTV9NT05fQklUX0lEICAgICAgICAgICAgICAgICAgMTkKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0lTUF9QTUVNX0VSUk9SX0JJVF9JRCAgICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9JU1BfQkFNRU1fRVJST1JfQklUX0lEICAgICAgICAgICAgICAgICAyMQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSVNQX0RNRU1fRVJST1JfQklUX0lEICAgICAgICAgICAgICAgICAgMjIKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX1NQX0lDQUNIRV9NRU1fRVJST1JfQklUX0lEICAgICAgICAgICAgIDIzCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9TUF9ETUVNX0VSUk9SX0JJVF9JRCAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfTU1VX0NBQ0hFX01FTV9FUlJPUl9CSVRfSUQgICAgICAgICAgICAgMjUKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQX1RJTUVSXzBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgIDI2CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUF9USU1FUl8xX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAyNworI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfU1dfUElOXzBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgMjgKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX1NXX1BJTl8xX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDI5CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9ETUFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfU1BfU1RSRUFNX01PTl9CX0JJVF9JRCAgICAgICAgICAgICAgICAgMzEKKworI2RlZmluZSBISVZFX0dQX1JFR1NfTlVNX1NXX0lSUV9SRUdTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKworLyogb3JkZXIgb2YgdGhlIGlucHV0IGJpdHMgZm9yIHRoZSB0aW1lZCBjb250cm9sbGVyICovCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzJfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzNfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzRfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzVfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzZfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzdfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzhfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzlfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzEwX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzExX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX1NQX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lTUF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lTWVNfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lTRUxfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lGTVRfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQX1RJTUVSXzBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQX1RJTUVSXzFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgIDE4CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX01JUElfU09MX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDE5CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX01JUElfRU9MX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX01JUElfU09GX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDIxCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX01JUElfRU9GX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lOUFNZU19TTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzCisKKy8qIGRlZmluaXRpb25zIGZvciB0aGUgZ3BfdGltZXIgYmxvY2sgKi8KKyNkZWZpbmUgSElWRV9HUF9USU1FUl8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQX1RJTUVSXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9HUF9USU1FUl8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX0dQX1RJTUVSXzUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9HUF9USU1FUl82ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBISVZFX0dQX1RJTUVSX05VTV9DT1VOVEVSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKworI2RlZmluZSBISVZFX0dQX1RJTUVSX0lSUV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JUlFfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfTlVNX0lSUVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT18wX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzJfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT18zX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fNF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzVfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT182X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fN19CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzhfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT185X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fMTBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzExX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSU5QX1NZU19JUlEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTRUxfSVJRICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JRk1UX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfU1BfU1RSTU9OX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBISVZFX0dQX1RJTUVSX1NQX0JfU1RSTU9OX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfU1RSTU9OX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfTU9EX1NUUk1PTl9JUlEgICAgICAgICAgICAgICAgICAgICAgICAgICAxOAorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTUF9QTUVNX0VSUk9SX0lSUSAgICAgICAgICAgICAgICAgICAgICAgMTkKKyNkZWZpbmUgSElWRV9HUF9USU1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fSVNQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0kyX0kyICAgICAgICA0NQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTUF9XSVJFX0RFQlVHX0xNX01TSU5LX1JVTl9JMl9JMyAgICAgICAgNDYKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfV0lSRV9ERUJVR19MTV9NU0lOS19SVU5fSTJfSTQgICAgICAgIDQ3CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0kyX0k1ICAgICAgICA0OAorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTUF9XSVJFX0RFQlVHX0xNX01TSU5LX1JVTl9JMl9JNiAgICAgICAgNDkKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfV0lSRV9ERUJVR19MTV9NU0lOS19SVU5fSTNfSTAgICAgICAgIDUwCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0k0X0kwICAgICAgICA1MQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTUF9XSVJFX0RFQlVHX0xNX01TSU5LX1JVTl9JNV9JMCAgICAgICAgNTIKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfV0lSRV9ERUJVR19MTV9NU0lOS19SVU5fSTZfSTAgICAgICAgIDUzCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0k3X0kwICAgICAgICA1NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorI2RlZmluZSBISVZFX0dQX1RJTUVSX01JUElfU09MX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgNTUKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9NSVBJX0VPTF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgIDU2CisjZGVmaW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UUl9NT05fUE9SVF9SQ1ZfR0RDICAgICAgICAgMTMKKworCisvKiB0ZXN0YmVuY2ggc2lnbmFsczogICAgICAgKi8KKworLyogdGVzdGJlbmNoIEdQIGFkYXB0ZXIgcmVnaXN0ZXIgaWRzICAqLworI2RlZmluZSBISVZFX1RFU1RCRU5DSF9HUElPX0RBVEFfT1VUX1JFR19JRFggICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfR1BJT19ESVJfT1VUX1JFR19JRFggICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0lSUV9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TRFJBTV9XQUtFVVBfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfSURMRV9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0dQSU9fREFUQV9JTl9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9NSVBJX0JGTV9FTl9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfQ1NJX0NPTkZJR19SRUdfSURYICAgICAgICAgICAgICAgICAgICAgICA3IAorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9ERFJfU1RBTExfRU5fUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgIDgKKworI2RlZmluZSBISVZFX1RFU1RCRU5DSF9JU1BfUE1FTV9FUlJPUl9JUlFfUkVHX0lEWCAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfSVNQX0JBTUVNX0VSUk9SX0lSUV9SRUdfSURYICAgICAgICAgICAgIDEwCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0lTUF9ETUVNX0VSUk9SX0lSUV9SRUdfSURYICAgICAgICAgICAgICAxMQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TUF9JQ0FDSEVfTUVNX0VSUk9SX0lSUV9SRUdfSURYICAgICAgICAgMTIKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU1BfRE1FTV9FUlJPUl9JUlFfUkVHX0lEWCAgICAgICAgICAgICAgIDEzCisKKy8qIFNpZ25hbCBtb25pdG9yIGlucHV0IGJpdCBpZHMgKi8KKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl9PX0JJVF9JRCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fMV9CSVRfSUQgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOXzJfQklUX0lEICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl8zX0JJVF9JRCAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fNF9CSVRfSUQgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOXzVfQklUX0lEICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl82X0JJVF9JRCAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fN19CSVRfSUQgICAgICAgICAgICAgICAgNworI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOXzhfQklUX0lEICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgSElWRV9UR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oLgorICoKKyAqIFRoZSBkZWZpbml0aW9ucyBhcmUgdGFrZW4gZnJvbSA8c3lzdGVtPl9kZWZzLmgKKyAqLwordHlwZWRlZiBlbnVtIGhydF9pc3BfY3NzX2lycSB7CisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl8wICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8wX0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl8xICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8xX0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl8yICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8yX0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl8zICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8zX0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl80ICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl80X0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl81ICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl81X0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl82ICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl82X0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl83ICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl83X0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl84ICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl84X0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl85ICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl85X0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl8xMCAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8xMF9CSVRfSUQgICAgICAgICAsICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzExICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzExX0JJVF9JRCAgICAgICAgICwgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfc3AgICAgICAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfU1BfQklUX0lEICAgICAgICAgICAgICAgICAgLCAgICAgICAgICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9pc3AgICAgICAgICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9JU1BfQklUX0lEICAgICAgICAgICAgICAgICAsICAgICAgICAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfaXN5cyAgICAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSVNZU19CSVRfSUQgICAgICAgICAgICAgICAgLCAgICAgICAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfaXNlbCAgICAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSVNFTF9CSVRfSUQgICAgICAgICAgICAgICAgLCAgICAgICAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfaWZtdCAgICAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSUZNVF9CSVRfSUQgICAgICAgICAgICAgICAgLCAgICAgICAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfc3Bfc3RyZWFtX21vbiAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfU1BfU1RSRUFNX01PTl9CSVRfSUQgICAgICAgLCAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfaXNwX3N0cmVhbV9tb24gICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSVNQX1NUUkVBTV9NT05fQklUX0lEICAgICAgLCAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9tb2Rfc3RyZWFtX21vbiAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9NT0RfU1RSRUFNX01PTl9CSVRfSUQgICAgICAsCisjaWZkZWYgX0hJVkVfSVNQX0NTU18yNDAxX1NZU1RFTQorICBocnRfaXNwX2Nzc19pcnFfaXMyNDAxICAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSVMyNDAxX0JJVF9JRCAgICAgICAgICAgICAgLCAgICAgICAgICAgCisjZWxzZQorICBocnRfaXNwX2Nzc19pcnFfaXNwX3BtZW1fZXJyb3IgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSVNQX1BNRU1fRVJST1JfQklUX0lEICAgICAgLCAgICAgICAgICAgCisjZW5kaWYKKyAgaHJ0X2lzcF9jc3NfaXJxX2lzcF9iYW1lbV9lcnJvciAgICAgID0gSElWRV9HUF9ERVZfSVJRX0lTUF9CQU1FTV9FUlJPUl9CSVRfSUQgICAgICwgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9pc3BfZG1lbV9lcnJvciAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9JU1BfRE1FTV9FUlJPUl9CSVRfSUQgICAgICAsICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX3NwX2ljYWNoZV9tZW1fZXJyb3IgID0gSElWRV9HUF9ERVZfSVJRX1NQX0lDQUNIRV9NRU1fRVJST1JfQklUX0lEICwgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX3NwX2RtZW1fZXJyb3IgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX1NQX0RNRU1fRVJST1JfQklUX0lEICAgICAgICwgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX21tdV9jYWNoZV9tZW1fZXJyb3IgID0gSElWRV9HUF9ERVZfSVJRX01NVV9DQUNIRV9NRU1fRVJST1JfQklUX0lEICwgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwX3RpbWVyXzAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQX1RJTUVSXzBfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwX3RpbWVyXzEgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQX1RJTUVSXzFfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX3N3X3Bpbl8wICAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX1NXX1BJTl8wX0JJVF9JRCAgICAgICAgICAgICwgICAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfc3dfcGluXzEgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfU1dfUElOXzFfQklUX0lEICAgICAgICAgICAgLCAgICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9kbWEgICAgICAgICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9ETUFfQklUX0lEICAgICAgICAgICAgICAgICAsCisgIGhydF9pc3BfY3NzX2lycV9zcF9zdHJlYW1fbW9uX2IgICAgICA9IEhJVkVfR1BfREVWX0lSUV9TUF9TVFJFQU1fTU9OX0JfQklUX0lEICAgICAsCisgIC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ICAgMAorI2RlZmluZSBISVZFX0lGTVRfSVJRX0lGVF9QUklNX0JfQklUX0lEICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0lGTVRfSVJRX0lGVF9TRUNfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX0lGTVRfSVJRX01FTV9DUFlfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0lGTVRfSVJRX1NJREVCQU5EX0NIQU5HRURfQklUX0lEICAgICAgICAgICAgICAgNAorCisvKiBvcmRlciBvZiB0aGUgaW5wdXQgYml0cyBmb3IgdGhlIGlmbXQgU29mdCByZXNldCByZWdpc3RlciAqLworI2RlZmluZSBISVZFX0lGTVRfR1BfUkVHU19TUlNUX0lGVF9QUklNX0JJVF9JRFggICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0lGTVRfR1BfUkVHU19TUlNUX0lGVF9QUklNX0JfQklUX0lEWCAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0lGTVRfR1BfUkVHU19TUlNUX0lGVF9TRUNfQklUX0lEWCAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX0lGTVRfR1BfUkVHU19TUlNUX01FTV9DUFlfQklUX0lEWCAgICAgICAgICAgICAgMworCisvKiBvcmRlciBvZiB0aGUgaW5wdXQgYml0cyBmb3IgdGhlIGlmbXQgU29mdCByZXNldCByZWdpc3RlciAqLworI2RlZmluZSBISVZFX0lGTVRfR1BfUkVHU19TTFZfUkVHX1NSU1RfSUZUX1BSSU1fQklUX0lEWCAgICAgMAorI2RlZmluZSBISVZFX0lGTVRfR1BfUkVHU19TTFZfUkVHX1NSU1RfSUZUX1BSSU1fQl9CSVRfSURYICAgMQorI2RlZmluZSBISVZFX0lGTVRfR1BfUkVHU19TTFZfUkVHX1NSU1RfSUZUX1NFQ19CSVRfSURYICAgICAgMgorI2RlZmluZSBISVZFX0lGTVRfR1BfUkVHU19TTFZfUkVHX1NS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AgICAgICAgIDIKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1lOQ0dFTl9OUl9GUkFNRVNfSURYICAgICAgICAgICAgICAgICAzIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TWU5DR0VOX05SX1BJWF9JRFggICAgICAgICAgICAgICAgICAgIDQgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1lOQ0dFTl9OUl9MSU5FU19JRFggICAgICAgICAgICAgICAgICA1ICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NZTkNHRU5fSEJMQU5LX0NZQ0xFU19JRFggICAgICAgICAgICAgNiAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TWU5DR0VOX1ZCTEFOS19DWUNMRVNfSURYICAgICAgICAgICAgIDcgICAgICAKKworI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TT0ZfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDggCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX0VPRl9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOSAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU09MX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19FT0xfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEgCisKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfUFJCU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDEyICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1BSQlNfRU5BQkxFX1BPUlRfQiAgICAgICAgICAgICAgICAgICAxMyAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19QUkJTX0xGU1JfUkVTRVRfVkFMVUUgICAgICAgICAgICAgICAgMTQgICAgICAKKworI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX0VOQUJMRV9QT1JUX0IgICAgICAgICAgICAgICAgICAgIDE2ICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19IT1JfQ05UX01BU0tfSURYICAgICAgICAgICAgICAgICAxNyAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfVkVSX0NOVF9NQVNLX0lEWCAgICAgICAgICAgICAgICAgMTggICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX1hZX0NOVF9NQVNLX0lEWCAgICAgICAgICAgICAgICAgIDE5ICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19IT1JfQ05UX0RFTFRBX0lEWCAgICAgICAgICAgICAgICAyMCAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfVkVSX0NOVF9ERUxUQV9JRFggICAgICAgICAgICAgICAgMjEgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX01PREVfSURYICAgICAgICAgICAgICAgICAgICAgICAgIDIyICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX1IxX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfRzFfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjQKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX0IxX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1CisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19SMl9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAyNgorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfRzJfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjcKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX0IyX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4CisKKworI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19DSF9JRF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgMjkKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfRk1UX1RZUEVfSURYICAgICAgICAgICAgICAgICAgICAgICAgIDMwCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX0RBVEFfU0VMX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAzMQorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TQkFORF9TRUxfSURYICAgICAgICAgICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1lOQ19TRUxfSURYICAgICAgICAgICAgICAgICAgICAgICAgIDMzCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NSU1RfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzNworCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NSU1RfU1lOQ0dFTl9CSVQgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TUlNUX1BSQlNfQklUICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1JTVF9UUEdfQklUICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NSU1RfRklGT19CSVQgICAgICAgICAgICAgICAgICAgICAgICAgMworCisvKiBncF9yZWdpc3RlciByZWdpc3RlciBpZCdzIC0tIElucHV0cyAgICovCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NZTkNHRU5fSE9SX0NO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mluZSBJU1lTX0NUUkxfQ0FQVF9OVU1fTUVNX1JFR0lPTlNfQl9SRUdfSUQgICAgICAgICA3CisjZGVmaW5lIElTWVNfQ1RSTF9DQVBUX05VTV9NRU1fUkVHSU9OU19DX1JFR19JRCAgICAgICAgIDgKKyNkZWZpbmUgSVNZU19DVFJMX0FDUV9TVEFSVF9BRERSX1JFR19JRCAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJU1lTX0NUUkxfQUNRX01FTV9SRUdJT05fU0laRV9SRUdfSUQgICAgICAgICAgICAxMAorI2RlZmluZSBJU1lTX0NUUkxfQUNRX05VTV9NRU1fUkVHSU9OU19SRUdfSUQgICAgICAgICAgICAxMQorI2RlZmluZSBJU1lTX0NUUkxfSU5JVF9SRUdfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBJU1lTX0NUUkxfTEFTVF9DT01NQU5EX1JFR19JRCAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBJU1lTX0NUUkxfTkVYVF9DT01NQU5EX1JFR19JRCAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBJU1lTX0NUUkxfTEFTVF9BQ0tOT1dMRURHRV9SRUdfSUQgICAgICAgICAgICAgICAxNQorI2RlZmluZSBJU1lTX0NUUkxfTkVYVF9BQ0tOT1dMRURHRV9SRUdfSUQgICAgICAgICAgICAgICAxNgorI2RlZmluZSBJU1lTX0NUUkxfRlNNX1NUQVRFX0lORk9fUkVHX0lEICAgICAgICAgICAgICAgICAxNworI2RlZmluZSBJU1lTX0NUUkxfQ0FQVF9BX0ZTTV9TVEFURV9JTkZPX1JFR19JRCAgICAgICAgICAxOAorI2RlZmluZSBJU1lTX0NUUkxfQ0FQVF9CX0ZTTV9TVEFURV9JTkZPX1JFR19JRCAgICAgICAgICAxOQorI2RlZmluZSBJU1lTX0NUUkxfQ0FQVF9DX0ZTTV9TVEFURV9JTkZPX1JFR19JRCAgICAgICAgICAyMAorI2RlZmluZSBJU1lTX0NU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XSAtICdiMDEwMCwgCitbNzo0XSAtIG92ZXJydWxlIHBvcnQgaWQgKG9waWQpCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBCisgICAgICAgICAgICdiMDAwMSAtIENhcHRCCisgICAgICAgICAgICdiMDAxMCAtIENhcHRDCisgICAgICAgICAgICdiMDAxMSAtIEFjcQorICAgICAgICAgICAnYjAxMDAgLSBETUEKKworCitJbnBTeXNPdmVycnVsZUNtZCAgMi8wICBbMzowXSAtICdiMDEwMSwgCitbNzo0XSAtIG92ZXJydWxlIHBvcnQgaWQgKG9waWQpCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBCisgICAgICAgICAgICdiMDAwMSAtIENhcHRCCisgICAgICAgICAgICdiMDAxMCAtIENhcHRDCisgICAgICAgICAgICdiMDAxMSAtIEFjcQorICAgICAgICAgICAnYjAxMDAgLSBETUEKKworCisgIDIvMSAgWzMxOjBdIC0gY29tbWFuZCB0b2tlbiB2YWx1ZSBmb3IgcG9ydCBvcGlkCisKKworYWNrbm93bGVkZ2UgdG9rZW5zOgorCitJbnBTeXNBY2tDRkEgIDEvMCAgIFszOjBdIC0gJ2IwMDAwCisgWzc6NF0gLSBDYXB0UG9ydElkLAorICAgICAgICAgICBDYXB0QS0nYjAwMDAKKyAgICAgICAgICAgQ2FwdEItICdiMDAwMQorICAgICAgICAgICBDYXB0Qy0nYjAwMTAKKyBbMzE6MTZdIC0gTk9GX2ZyYW1lcworSW5wU3lzQWNrQ0ZFICAxLzAgIFszOjBdIC0gJ2IwMDAxJworWzc6NF0gLSBDYXB0UG9ydElkLAorICAgICAgICAgICAnYjAwMDAgLSBDYXB0QSAKKyAgICAgICAgICAgJ2IwMDAxIC0gQ2FwdEIKKyAgICAgICAgICAgJ2IwMDEwIC0gQ2FwdEMKKworSW5wU3lzQWNrQUYgIDEvMCAgWzM6MF0gLSAnYjAwMTAKK0lucFN5c0Fja092ZXJydWxlT04gIDEvMCAgWzM6MF0gLSAnYjAwMTEsIAorWzc6NF0gLSBvdmVycnVsZSBwb3J0IGlkIChvcGlkKQorICAgICAgICAgICAnYjAwMDAgLSBDYXB0QQorICAgICAgICAgICAnYjAwMDEgLSBDYXB0QgorICAgICAgICAgICAnYjAwMTAgLSBDYXB0QworICAgICAgICAgICAnYjAwMTEgLSBBY3EKKyAgICAgICAgICAgJ2IwMTAwIC0gRE1BCisKKworSW5wU3lzQWNrT3ZlcnJ1bGVPRkYgIDEvMCAgWzM6MF0gLSAnYjAxMDAsIAorWzc6NF0gLSBvdmVycnVsZSBwb3J0IGlkIChvcGlkKQorICAgICAgICAgICAnYjAwMDAgLSBDYXB0QQorICAgICAgICAgICAnYjAwMDEgLSBDYXB0QgorICAgICAgICAgICAnYjAwMTAgLSBDYXB0QworICAgICAgICAgICAnYjAwMTEgLSBBY3EKKyAgICAgICAgICAgJ2IwMTAwIC0gRE1BCisKKworSW5wU3lzQWNrT3ZlcnJ1bGUgIDIvMCAgWzM6MF0gLSAnYjAxMDEsIAorWzc6NF0gLSBvdmVycnVsZSBwb3J0IGlkIChvcGlkKQorICAgICAgICAgICAnYjAwMDAgLSBDYXB0QQorICAgICAgICAgICAnYjAwMDEgLSBDYXB0QgorICAgICAgICAgICAnYjAwMTAgLSBDYXB0QworICAgICAgICAgICAnYjAwMTEgLSBBY3EKKyAgICAgICAgICAgJ2IwMTAwIC0gRE1BCisKKworICAyLzEgIFszMTowXSAtIGFja25vd2xlZGdlIHRva2VuIHZhbHVlIGZyb20gcG9ydCBvcGlkCisKKworCisqLworCisKKy8qIENvbW1hbmQgYW5kIGFja25vd2xlZGdlIHRva2VucyBJRHMgKi8KKyNkZWZpbmUgSVNZU19DVFJMX0NBUFRfRlJBTUVTX0FDUV9UT0tFTl9JRCAgICAgICAgMCAvKiAwMDAwYiAqLworI2RlZmluZSBJU1lTX0NUUkxfQ0FQVF9GUkFNRV9FWFRfVE9LRU5fSUQgICAgICAgICAxIC8qIDAwMDFiICovCisjZGVmaW5lIElTWVNfQ1RSTF9BQ1FfRlJ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fTk9GX0NBUFRfVE9LRU5fTVNCICAgICAgICAgICAgICAzMQorI2RlZmluZSBJU1lTX0NUUkxfTk9GX0NBUFRfVE9LRU5fTFNCICAgICAgICAgICAgICAxNgorI2RlZmluZSBJU1lTX0NUUkxfTk9GX0VYVF9UT0tFTl9NU0IgICAgICAgICAgICAgICAzMQorI2RlZmluZSBJU1lTX0NUUkxfTk9GX0VYVF9UT0tFTl9MU0IgICAgICAgICAgICAgICA4CisKKyNkZWZpbmUgSVNZU19DVFJMX1RPS0VOX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1lTX0NUUkxfVE9LRU5fSURfQklUUyAgICAgICAgICAgICAgICAgICAoSVNZU19DVFJMX1RPS0VOX0lEX01TQiAtIElTWVNfQ1RSTF9UT0tFTl9JRF9MU0IgKyAxKQorI2RlZmluZSBJU1lTX0NUUkxfUE9SVF9JRF9JRFggICAgICAgICAgICAgICAgICAgICAoSVNZU19DVFJMX1RPS0VOX0lEX0lEWCArIElTWVNfQ1RSTF9UT0tFTl9JRF9CSVRTKQorI2RlZmluZSBJU1lTX0NUUkxfUE9SVF9JRF9CSVRTICAgICAgICAgICAgICAgICAgICAoSVNZU19DVFJMX1BPUlRfSURfVE9LRU5fTVNCIC0gSVNZU19DVFJMX1BPUlRfSURfVE9LRU5fTFNCICsxKQorI2RlZmluZSBJU1lTX0NUUkxfTk9GX0NBUFRfSURYICAgICAgICAgICAgICAgICAgICBJU1lTX0NUUkxfTk9GX0NBUFRfVE9LRU5fTFNCICAgIAorI2RlZmluZSBJU1lTX0NUUkxfTk9GX0NBUFRfQklUUyAgICAgICAgICAgICAgICAgICAoSVNZU19DVFJMX05PRl9DQVBUX1RPS0VOX01TQiAtIElTWVNfQ1RSTF9OT0ZfQ0FQVF9UT0tFTl9MU0IgKyAxKQorI2RlZmluZSBJU1lTX0NUUkxfTk9GX0VYVF9JRFggICAgICAgICAgICAgICAgICAgICBJU1lTX0NUUkxfTk9GX0VYVF9UT0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V9JU1lTX0dQUkVHX01VTFRJQ0FTVF9DX0lEWCAgICAgICAgICAgMgorCisvKiBTdHJlYW0gTXV4IHNlbGVjdCBtb2RlcyAqLworI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfTVVYX0lEWCAgICAgICAgICAgICAgICAgICAzCisKKy8qIHN0cmVhbWluZyBtb25pdG9yIHN0YXR1cyBhbmQgY29udHJvbCAqLworI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfU1RSTU9OX1NUQVRfSURYICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TVFJNT05fQ09ORF9JRFggICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX1NUUk1PTl9JUlFfRU5fSURYICAgICAgICAgNgorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfU1JTVF9JRFggICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TTFZfUkVHX1NSU1RfSURYICAgICAgICAgIDgKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX1JFR19QT1JUX0FfSURYICAgICAgICAgICAgOQorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfUkVHX1BPUlRfQl9JRFggICAgICAgICAgICAxMAorCisvKiBCaXQgbnVtYmVycyBvZiB0aGUgc29mdCByZXNldCByZWdpc3RlciAqLworI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfU1JTVF9DQVBUX0ZJRk9fQV9CSVQgICAgICAwCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TUlNUX0NBUFRfRklGT19CX0JJVCAgICAgIDEKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX1NSU1RfQ0FQVF9GSUZPX0NfQklUICAgICAgMgorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfU1JTVF9NVUxUSUNBU1RfQV9CSVQgICAgICAzCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TUlNUX01VTFRJQ0FTVF9CX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pbmUgX0hSVF9JU1BfVk1FTSAgICAgICAgICAgICAgICAgICAgICAgICAgaXNwMjQwMF9tYW1vaWFkYV9zaW1kX3ZtZW0KKworLyogaW5zdHJ1Y3Rpb24gcGlwZWxpbmUgZGVwdGggKi8KKyNkZWZpbmUgSVNQX0JSQU5DSERFTEFZICAgICAgICAgICAgICAgICAgICAgICAgNQorCisvKiBidXMgKi8KKyNkZWZpbmUgSVNQX0JVU19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgSVNQX0JVU19BRERSX1dJRFRIICAgICAgICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgSVNQX0JVU19CVVJTVF9TSVpFICAgICAgICAgICAgICAgICAgICAgMQorCisvKiBkYXRhLXBhdGggKi8KKyNkZWZpbmUgSVNQX1NDQUxBUl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgSVNQX1NMSUNFX05FTEVNUyAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBJU1BfVkVDX05FTEVNUyAgICAgICAgICAgICAgICAgICAgICAgICA2NAorI2RlZmluZSBJU1BfVkVDX0VMRU1CSVRTICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBJU1BfVkVDX0VMRU04QklUUyAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBJU1BfQ0xPTkVfREFUQVBBVEhfSVNfMTYgICAgICAgICAgICAgICAxCisKKy8qIG1lbW9yaWVzICovCisjZGVmaW5lIElTUF9ETUVNX0RFUFRIICAgICAgICAgICAgICAgICAgICAgICAgIDQwOTYKKyNkZWZpbmUgSVNQX0RNRU1fQlNFTF9ET1dOU0FNUExFICAgICAgICAgICAgICAgOAorI2RlZmluZSBJU1BfVk1FTV9ERVBUSCAgICAgICAgICAgICAgICAgICAgICAgICAzMDcyCisjZGVmaW5lIElTUF9WTUVNX0JTRUxfRE9XTlNBTVBMRSAgICAgICAgICAgICAgIDgKKyNkZWZp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k1FTV9CQU1FTV9WRUNfUExVU19TTElDRSAgICAgICAgMQorICAjZGVmaW5lIElTUF9WTUVNX0JBTUVNX0FSQl9TRVJWSUNFX0NZQ0xFX0JJVFMgMQorICAjZGVmaW5lIElTUF9WTUVNX0JBTUVNX0xVVF9FTEVNUyAgICAgICAgICAgICAxNgorICAjZGVmaW5lIElTUF9WTUVNX0JBTUVNX0xVVF9BRERSX1dJRFRIICAgICAgICAxNAorICAjZGVmaW5lIElTUF9WTUVNX0JBTUVNX0hBTEZfQkxPQ0tfV1JJVEUgICAgICAxCisgICNkZWZpbmUgSVNQX1ZNRU1fQkFNRU1fU01BUlRfRkVUQ0ggICAgICAgICAgIDEKKyAgI2RlZmluZSBJU1BfVk1FTV9CQU1FTV9CSUdfRU5ESUFOTkVTUyAgICAgICAgMAorI2VuZGlmIC8qIElTUF9WTUVNX0lTX0JBTUVNICovCisjZGVmaW5lIElTUF9QTUVNX0RFUFRIICAgICAgICAgICAgICAgICAgICAgICAgIDIwNDgKKyNkZWZpbmUgSVNQX1BNRU1fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgNjQwCisjZGVmaW5lIElTUF9WQU1FTV9BRERSRVNTX0JJVFMgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIElTUF9WQU1FTV9FTEVNQklUUyAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIElTUF9WQU1FTV9ERVBUSCAgICAgICAgICAgICAgICAgICAgICAgIDIwNDgKKyNkZWZpbmUgSVNQX1ZBTUVNX0FMSUdOTUVOVCAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJU1BfVkFfQUREUkVTU19XSURUSCAgICAgICAgICAgICAgICAgICA4OTYKKyNkZWZpbmUgSVNQX1ZFQ19WQUxTVV9MQVRFTkNZICAgICAgICAgICAgICAgICAgSVNQX1ZFQ19ORUxFTVMKKyNkZWZpbmUgSVNQX0hJU1RfQUREUkVTU19CSVRTICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSVNQX0hJU1RfQUxJR05NRU5UICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBJU1BfSElTVF9DT01QX0lOX1BSRUMgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBJU1BfSElTVF9ERVBUSCAgICAgICAgICAgICAgICAgICAgICAgICAxMDI0CisjZGVmaW5lIElTUF9ISVNUX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDI0CisjZGVmaW5lIElTUF9ISVNUX0NPTVBPTkVOVFMgICAgICAgICAgICAgICAgICAgIDQKKworLyogcHJvZ3JhbSBjb3VudGVyICovCisjZGVmaW5lIElTUF9QQ19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzCisKKy8qIFRlbXBsYXRlIHN3aXRjaGVzICovCisjZGVmaW5lIElTUF9TSElFTERfSU5QVVRfRE1FTSAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX1NISUVMRF9PVVRQVVRfRE1FTSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfU0hJRUxEX0lOUFVUX1ZNRU0gICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9TSElFTERfT1VUUFVUX1ZNRU0gICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX1NISUVMRF9JTlBVVF9QTUVNICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfU0hJRUxEX09VVFBVVF9QTUVNICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TSElFTERfSU5QVVRfSElTVCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX1NISUVMRF9PVVRQVVRfSElTVCAgICAgICAgICAgICAgICAgMQorLyogV2hlbiBMVVQgaXMgc2VsZWN0IHRoZSBzaGllbGRpbmcgaXMgYWx3YXlzIG9uICovCisjZGVmaW5lIElTUF9TSElFTERfSU5QVVRfVkFNRU0gICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX1NISUVMRF9PVVRQVVRfVkFNRU0gICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIElTUF9IQVNfSVJRICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU19TT0ZUX1JFU0VUICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSEFTX1ZFQ19ESVYgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9IQVNfVkZVX1dfMk8gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU19ERUlOVDMgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSEFTX0xVVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9IQVNfSElTVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU19WQUxTVSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSEFTXzNyZFZBTFNVICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9WUkYxX0hBU18yUCAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJU1BfU1JVX0dVQVJESU5HICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9WTFNVX0dVQVJESU5HICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJU1BfVlJGX1JBTSAgICAgCSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX1NSRl9SQU0gICAgIAkgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSVNQX1NQTElUX1ZNVUxfVkFERF9JUyAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfUkZTUExJVF9GUEdBICAgICAgICAgICAgICAgICAgICAgICAwCisKKy8qIFJTTiBvciBCdXMgcGlwZWxpbmluZyAqLworI2RlZmluZSBJU1BfUlNOX1BJUEUgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9WU0ZfQlVTX1BJUEUgICAgICAgICAgICAgICAgICAgICAgIDAKKworLyogZXh0cmEgc2xhdmUgcG9ydCB0byB2bWVtICovCisjZGVmaW5lIElTUF9JRl9WTUVNICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0dEQ19WTUVNICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorCisvKiBTdHJlYW1pbmcgcG9ydHMgKi8KKyNkZWZpbmUgSVNQX0lGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSUZfQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9HREMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX1NDTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfR1BGSUZPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworLyogUmVtb3ZpbmcgSXNzdWUgU2xvdChzKSAqLworI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTMiAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9IQVNfTk9UX1NJTURfSVMzICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0hBU19OT1RfU0lNRF9JUzQgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTNF9WQUREICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9IQVNfTk9UX1NJTURfSVM1ICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0hBU19OT1RfU0lNRF9JUzYgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTNyAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9IQVNfTk9UX1NJTURfSVM4ICAgICAgICAgICAgICAgICAgIDAKKworLyogSUNhY2hlICAqLworI2RlZmluZSBJU1BfSUNBQ0hFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9JQ0FDSEVfT05MWSAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0lDQUNIRV9QUkVGRVRDSCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSUNBQ0hFX0lOREVYX0JJVFMgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIElTUF9JQ0FDSEVfU0VUX0JJVFMgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSVNQX0lDQUNIRV9CTE9DS1NfUEVSX1NFVF9CSVRTICAgICAgICAgMQorCisvKiBFeHBlcmltZW50YWwgRmxhZ3MgKi8KKyNkZWZpbmUgSVNQX0VYUF8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfRVhQXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9FWFBfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0VYUF80ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfRVhQXzUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9FWFBfNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKworLyogRGVyaXZlZCB2YWx1ZXMgKi8KKyNkZWZpbmUgSVNQX0xPRzJfUE1FTV9XSURUSCAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgSVNQX1ZFQ19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgODk2CisjZGVmaW5lIElTUF9TTElDRV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgIDU2CisjZGVmaW5lIElTUF9WTUVNX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDg5NgorI2RlZmluZSBJU1BfVk1FTV9BTElHTiAgICAgICAgICAgICAgICAgICAgICAgICAxMjgKKyNpZiBJU1BfVk1FTV9JU19CQU1FTQorICAjZGVmaW5lIElTUF9WTUVNX0FMSUdOX0VMRU0gICAgICAgICAgICAgICAgICAyCisjZW5kaWYgLyogSVNQX1ZNRU1fSVNfQkFNRU0gKi8KKyNkZWZpbmUgSVNQX1NJTURMU1UgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfTFNVX0lNTV9CSVRTICAgICAgICAgICAgICAgICAgICAgICAxMgorCisvKiBjb252ZW5pZW50IHNob3J0Y3V0cyBmb3Igc29mdHdhcmUqLworI2RlZmluZSBJU1BfTldBWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJU1BfVkVDX05FTEVNUworI2RlZmluZSBOQklUUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJU1BfVkVDX0VMRU1CSVRTCisKKyNkZWZpbmUgX2lzcF9jZWlsX2RpdihhLGIpICAgICAgICAgICAgICAgICAgICAgKCgoYSkrKGIpLTEpLyhiKSkKKworI2RlZmluZSBJU1BfVkVDX0FMSUdOICAgICAgICAgICAgICAgICAgICAgICAgICBJU1BfVk1FTV9BTElHTgorCisvKiBIUlQgc3BlY2lmaWMgdmVjdG9yIHN1cHBvcnQgKi8KKyNkZWZpbmUgaXNwMjQwMF9tYW1vaWFkYV92ZWN0b3JfYWxpZ25tZW50ICAgICAgICAgSVNQX1ZFQ19BTElHTgorI2RlZmluZSBpc3AyNDAwX21hbW9pYWRhX3ZlY3Rvcl9lbGVtX2JpdHMgICAgICAgICBJU1BfVk1FTV9FTEVNQklUUworI2RlZmluZSBpc3AyNDAwX21hbW9pYWRhX3ZlY3Rvcl9lbGVtX3ByZWNpc2lvbiAgICBJU1BfVk1FTV9FTEVNX1BSRUNJU0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FR19JRCAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQUNRX05FWFRfQUNLTk9XTEVER0VfUkVHX0lEICAgICAgICAgICAgICAgOQorI2RlZmluZSBBQ1FfRlNNX1NUQVRFX0lORk9fUkVHX0lEICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBBQ1FfSU5UX0NOVFJfSU5GT19SRUdfSUQgICAgICAgICAgICAgICAgICAxMQorIAorLy8gUmVnaXN0ZXIgd2lkdGgKKyNkZWZpbmUgQUNRX1NUQVJUX0FERFJfUkVHX1dJRFRIICAgICAgICAgICAgICAgICAgOSAgICAgICAgICAgICAgIAorI2RlZmluZSBBQ1FfTUVNX1JFR0lPTl9TSVpFX1JFR19XSURUSCAgICAgICAgICAgICA5ICAKKyNkZWZpbmUgQUNRX05VTV9NRU1fUkVHSU9OU19SRUdfV0lEVEggICAgICAgICAgICAgOSAgCisjZGVmaW5lIEFDUV9JTklUX1JFR19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgIDMgIAorI2RlZmluZSBBQ1FfUkVDRUlWRURfU0hPUlRfUEFDS0VUU19SRUdfV0lEVEggICAgICAzMiAKKyNkZWZpbmUgQUNRX1JFQ0VJVkVEX0xPTkdfUEFDS0VUU19SRUdfV0lEVEggICAgICAgMzIgIAorI2RlZmluZSBBQ1FfTEFTVF9DT01NQU5EX1JFR19XSURUSCAgICAgICAgICAgICAgICAzMiAgCisjZGVmaW5lIEFDUV9ORVhUX0NPTU1BTkRfUkVHX1dJRFRIICAgICAgICAgICAgICAgIDMyICAKKyNkZWZpbmUgQUNRX0xBU1RfQUNLTk9XTEVER0VfUkVHX1dJRFRIICAgICAgICAgICAgMzIgIAorI2RlZmluZSBBQ1FfTkVYVF9BQ0tOT1dMRURHRV9SRUdfV0lEVEggICAgICAgICAgICAzMiAgCisjZGVmaW5lIEFDUV9GU01fU1RBVEVfSU5GT19SRUdfV0lEVEggICAgICAgICAgICAgICgoTUVNMlNUUkVBTV9GU01fU1RBVEVfQklUUyA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UNRX0lOSVRfUlNUX1JFR19CSVQgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1FfSU5JVF9SRVNZTkNfQklUICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFDUV9JTklUX1JTVF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgIEFDUV9JTklUX1JTVF9SRUdfQklUCisjZGVmaW5lIEFDUV9JTklUX1JTVF9CSVRTICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUNRX0lOSVRfUkVTWU5DX0lEWCAgICAgICAgICAgICAgICAgICAgICAgQUNRX0lOSVRfUkVTWU5DX0JJVAorI2RlZmluZSBBQ1FfSU5JVF9SRVNZTkNfQklUUyAgICAgICAgICAgICAgICAgICAgICAxCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIFRPS0VOIElORk8gKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKyNkZWZpbmUgQUNRX1RPS0VOX0lEX0xTQiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1FfVE9LRU5fSURfTVNCICAgICAgICAgICAgICAgICAgICAgICAgICAzICAgICAgICAgICAgCisjZGVmaW5lIEFDUV9UT0tFTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgIChBQ1FfVE9LRU5fSURfTVNCIC0gQUNRX1RPS0VOX0lEX0xTQiAgKyAxKSAvLyA0CisjZGVmaW5lIEFDUV9UT0tFTl9JRF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNRX1RPS0VOX0lEX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAgQUNRX1RPS0VOX1dJRFRICisjZGVmaW5lIEFDUV9JTklUX0NNRF9JTklUX0lEWCAgICAgICAgICAg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ZmluZSBBQ1FfVE9LRU5fTk9GV09SRFNfTFNCICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBBQ1FfVE9LRU5fU1RBUlRBRERSX01TQiAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBBQ1FfVE9LRU5fU1RBUlRBRERSX0xTQiAgICAgICAgICAgICAgICAgICA0ICAKKworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvKiBNSVBJICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKyNkZWZpbmUgV09SRF9DT1VOVF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgUEtUX0NPREVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgNiAgICAgICAgICAgIAorI2RlZmluZSBDSE5fTk9fV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyICAKKyNkZWZpbmUgRVJST1JfSU5GT19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgOAorICAKKyNkZWZpbmUgTE9OR19QS1RDT0RFX01BWCAgICAgICAgICAgICAgICAgICAgICAgICAgNjMKKyNkZWZpbmUgTE9OR19QS1RDT0RFX01JTiAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0hPUlRfUEtUQ09ERV9NQVggICAgICAgICAgICAgICAgICAgICAgICAgMTUKKworI2RlZmluZSBFT0ZfQ09ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIFBhY2tldCBJbmZvICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjZGVmaW5lIEFDUV9TVEFSVF9PRl9GUkFNRSAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNRX0VORF9PRl9GUkFNRSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBQ1FfU1RBUlRfT0ZfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFDUV9FTkRfT0ZfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQUNRX0xJTkVfUEFZTE9BRCAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBBQ1FfR0VOX1NIX1BLVCAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisKKworLyogYml0IGRlZmluaXRpb24gKi8KKyNkZWZpbmUgQUNRX1BLVF9UWVBFX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQUNRX1BLVF9UWVBFX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBBQ1FfUEtUX1NPUF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBBQ1FfV09SRF9DTlRfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUV9XT1JEX0NOVF9CSVRTICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFDUV9QS1RfSU5GT19JRFggICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFDUV9QS1RfSU5GT19CSVRTICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQUNRX0hFQURFUl9EQVRBX0lEWCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1FfSEVBREVSX0RBVEFfQklUUyAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBQ1FfQUNLX1RPS0VOX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgICBBQ1FfVE9LRU5fSURfSURYCisjZGVmaW5lIEFDUV9BQ0tfVE9LRU5fSURfQklUUyAgICAgICAgICAgICAgICAgICAgIEFDUV9UT0tFTl9JRF9CSVRTCisjZGVmaW5lIEFDUV9BQ0tfTk9GV09SRFNfSURYICAgICAgICAgICAgICAgICAgICAgIDEzCisjZGVmaW5lIEFDUV9BQ0tfTk9GV09SRFNfQklUUyAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgQUNRX0FDS19QS1RfTEVOX0lEWCAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBBQ1FfQUNLX1BLVF9MRU5fQklUUyAgICAgICAgICAgICAgICAgICAgICAxNgorCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIFBhY2tldCBEYXRhIFR5cGUgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworCisjZGVmaW5lIEFDUV9ZVVY0MjBfOF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAyNCAgIC8qIDAxIDEwMDAgWVVWNDIwIDgtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9ZVVY0MjBfMTBfREFUQSAgICAgICAgICAgICAgICAgICAgICAyNSAgIC8qIDAxIDEwMDEgIFlVVjQyMCAxMC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9ZVVY0MjBfOExfREFUQSAgICAgICAgICAgICAgICAgICAgICAyNiAgIC8qIDAxIDEwMTAgICBZVVY0MjAgOC1iaXQgbGVnYWN5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9ZVVY0MjJfOF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAzMCAgIC8qIDAxIDExMTAgICBZVVY0MjIgOC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9ZVVY0MjJfMTBfREFUQSAgICAgICAgICAgICAgICAgICAgICAzMSAgIC8qIDAxIDExMTEgICBZVVY0MjIgMTAtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SR0I0NDRfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAzMiAgIC8qIDEwIDAwMDAgICBSR0I0NDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SR0I1NTVfREFUQSAgICAgICAgICAgICAgCQkJCQkgMzMgICAvKiAxMCAwMDAxICAgUkdCNTU1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkdCNTY1X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDM0ICAgLyogMTAgMDAxMCAgIFJHQjU2NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JHQjY2Nl9EQVRBICAgICAgICAgICAgICAJCQkJCSAzNSAgIC8qIDEwIDAwMTEgICBSR0I2NjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SR0I4ODhfREFUQSAgICAgICAgICAgICAgCQkJCQkgMzYgICAvKiAxMCAwMTAwICAgUkdCODg4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkFXNl9EQVRBICAgICAgICAgICAgICAgIAkJCQkJIDQwICAgLyogMTAgMTAwMCAgIFJBVzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JBVzdfREFUQSAgICAgICAgICAgICAgICAJCQkJCSA0MSAgIC8qIDEwIDEwMDEgICBSQVc3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SQVc4X0RBVEEgICAgICAgICAgICAgICAgCQkJCQkgNDIgICAvKiAxMCAxMDEwICAgUkFXOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkFXMTBfREFUQSAgICAgICAgICAgICAgIAkJCQkJIDQzICAgLyogMTAgMTAxMSAgIFJBVzEwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JBVzEyX0RBVEEgICAgICAgICAgICAgICAJCQkJCSA0NCAgIC8qIDEwIDExMDAgICBSQVcxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SQVcxNF9EQVRBICAgICAgICAgICAgICAgCQkJCQkgNDUgICAvKiAxMCAxMTAxICAgUkFXMTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl8xX0RBVEEgICAgICAgICAgIAkJCQkJIDQ4ICAgLyogMTEgMDAwMCAgICBKUEVHIFtVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDFdICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1VTUl9ERUZfMl9EQVRBICAgICAgICAgICAJCQkJCSA0OSAgIC8qIDExIDAwMDEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSAyICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9VU1JfREVGXzNfREFUQSAgICAgICAgICAgCQkJCQkgNTAgICAvKiAxMSAwMDEwICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgMyAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl80X0RBVEEgICAgICAgICAgIAkJCQkJIDUxICAgLyogMTEgMDAxMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDQgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1VTUl9ERUZfNV9EQVRBICAgICAgICAgICAJCQkJCSA1MiAgIC8qIDExIDAxMDAgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA1ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9VU1JfREVGXzZfREFUQSAgICAgICAgICAgCQkJCQkgNTMgICAvKiAxMSAwMTAxICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNiAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl83X0RBVEEgICAgICAgICAgIAkJCQkJIDU0ICAgLyogMTEgMDExMCAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDcgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1VTUl9ERUZfOF9EQVRBICAgICAgICAgICAJCQkJCSA1NSAgIC8qIDExIDAxMTEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA4ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9FbWJfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMTggICAvKiAwMSAwMDEwICAgIGVtYmVkZGVkIGVpZ2h0IGJpdCBub24gaW1hZ2UgZGF0YSAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfU09GX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDAgICAvKiAwMCAwMDAwICAgIGZyYW1lIHN0YXJ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfRU9GX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDEgICAvKiAwMCAwMDAxICAgIGZyYW1lIGVuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfU09MX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDIgICAvKiAwMCAwMDEwICAgIGxpbmUgc3RhcnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfRU9MX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDMgICAvKiAwMCAwMDExICAgIGxpbmUgZW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfR0VOX1NIMV9EQVRBICAgICAgICAgICAgIAkJCQkJIDggICAvKiAwMCAxMDAwICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDEgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfR0VOX1NIMl9EQVRBICAgICAgICAgICAgIAkJCQkJIDkgICAvKiAwMCAxMDAxICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMiAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfR0VOX1NIM19EQVRBICAgICAgICAgICAgIAkJCQkJIDEwICAgLyogMDAgMTAxMCAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDMgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX0dFTl9TSDRfREFUQSAgICAgICAgICAgICAJCQkJCSAxMSAgIC8qIDAwIDEwMTEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA0ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0g1X0RBVEEgICAgICAgICAgICAgCQkJCQkgMTIgICAvKiAwMCAxMTAwICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgNSAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfR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ICAgIDMyCQkvKiAyNTYvOCAqLwkKKyNkZWZpbmUgX0lTUF9DQVBUVVJFX0VMRU1fUEVSX1dPUkQgICAgICAgICAgICAgICAgX0lTUF9DQVBUVVJFX0JZVEVTX1BFUl9XT1JEIC8gX0lTUF9DQVBUVVJFX0JZVEVTX1BFUl9FTEVNCQkgICAgICAgICAgIAorCisvLyNkZWZpbmUgQ0FQVF9SQ1ZfQUNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorLy8jZGVmaW5lIENBUFRfV1JUX0FDSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgICAgICAgICAgICAgICAKKy8vI2RlZmluZSBDQVBUX0lSUV9BQ0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzICAgICAgICAgICAgICAgICAgICAgICAgCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworI2RlZmluZSBOT0ZfSVJRUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIFJFR0lTVEVSIElORk8gKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworLy8gTnVtYmVyIG9mIHJlZ2lzdGVycworI2RlZmluZSBDQVBUX05PRl9SRUdTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorCisvLyBSZWdpc3RlciBpZCdzIG9mIE1NSU8gc2xhdmUgYWNjZXNpYmxlIHJlZ2lzdGVycworI2RlZmluZSBDQVBUX1NUQVJUX01PREVfUkVHX0lEICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfU1RBUlRfQUREUl9SRUdfSUQgICAgICAgICAgICAgICAgICAgIDEgCisjZGVmaW5lIENBUFRfTUVNX1JFR0lPTl9TSVpFX1JFR19JRCAgICAgICAgICAgICAgIDIgCisjZGVmaW5lIENBUFRfTlVNX01FTV9SRUdJT05TX1JFR19JRCAgICAgICAgICAgICAgIDMgCisjZGVmaW5lIENBUFRfSU5JVF9SRUdfSUQgICAgICAgICAgICAgICAgICAgICAgICAgIDQgCisjZGVmaW5lIENBUFRfU1RBUlRfUkVHX0lEICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgQ0FQVF9TVE9QX1JFR19JRCAgICAgICAgICAgICAgICAgICAgICAgICAgNiAgCisKKyNkZWZpbmUgQ0FQVF9QQUNLRVRfTEVOR1RIX1JFR19JRCAgICAgICAgICAgICAgICAgNworI2RlZmluZSBDQVBUX1JFQ0VJVkVEX0xFTkdUSF9SRUdfSUQgICAgICAgICAgICAgICA4IAorI2RlZmluZSBDQVBUX1JFQ0VJVkVEX1NIT1JUX1BBQ0tFVFNfUkVHX0lEICAgICAgICA5IAorI2RlZmluZSBDQVBUX1JFQ0VJVkVEX0xPTkdfUEFDS0VUU19SRUdfSUQgICAgICAgICAxMCAKKyNkZWZpbmUgQ0FQVF9MQVNUX0NPTU1BTkRfUkVHX0lEICAgICAgICAgICAgICAgICAgMTEgICAgICAgIAorI2RlZmluZSBDQVBUX05FWFRfQ09NTUFORF9SRUdfSUQgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBDQVBUX0xBU1RfQUNLTk9XTEVER0VfUkVHX0lEICAgICAgICAgICAgICAxMworI2RlZmluZSBDQVBUX05FWFRfQUNLTk9XTEVER0VfUkVHX0lEICAgICAgICAgICAgICAxNAorI2RlZmluZSBDQVBUX0ZTTV9TVEFURV9JTkZPX1JFR19JRCAgICAgICAgICAgICAgICAxNQorCisvLyBSZWdpc3RlciB3aWR0aAorI2RlZmluZSBDQVBUX1NUQVJUX01PREVfUkVHX1dJRFRIICAgICAgICAgICAgICAgICAxIAorI2RlZmluZSBDQVBUX1NUQVJUX0FERFJfUkVHX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fV0lEVEggICAgICAgICAgICAgICAzMiAqLyAgCisjZGVmaW5lIENBUFRfTEFTVF9BQ0tOT1dMRURHRV9SRUdfV0lEVEggICAgICAgICAgIDMyCisjZGVmaW5lIENBUFRfTkVYVF9BQ0tOT1dMRURHRV9SRUdfV0lEVEggICAgICAgICAgIDMyCisjZGVmaW5lIENBUFRfRlNNX1NUQVRFX0lORk9fUkVHX1dJRFRIICAgICAgICAgICAgICgoQ0FQVF9XUklURTJNRU1fRlNNX1NUQVRFX0JJVFMgKiAzKSArIChDQVBUX1NZTkNIUk9OSVpFUl9GU01fU1RBVEVfQklUUyAqIDMpKQorCisjZGVmaW5lIENBUFRfSU5JVF9SRVNUQVJUX01FTV9BRERSX1dJRFRIICAgICAgICAgIDkgICAKKyNkZWZpbmUgQ0FQVF9JTklUX1JFU1RBUlRfTUVNX1JFR0lPTl9XSURUSCAgICAgICAgOSAKKworLyogcmVnaXN0ZXIgcmVzZXQgdmFsdWUgKi8KKyNkZWZpbmUgQ0FQVF9TVEFSVF9NT0RFX1JFR19SU1RWQUwgICAgICAgICAgICAgICAgMCAgIAorI2RlZmluZSBDQVBUX1NUQVJUX0FERFJfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfTUVNX1JFR0lPTl9TSVpFX1JFR19SU1RWQUwgICAgICAgICAgIDEyOAorI2RlZmluZSBDQVBUX05VTV9NRU1fUkVHSU9OU19SRUdfUlNUVkFMICAgICAgICAgICAzIAorI2RlZmluZSBDQVBUX0lOSVRfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQ0FQVF9TVEFSVF9SRUdfUlNUVkFMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1NUT1BfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQ0FQVF9QQUNLRVRfTEVOR1RIX1JFR19SU1RWQUwgICAgICAgICAgICAgMAorI2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9NRU1fUkVHSU9OX0JJVFMgICAgICAgICAoQ0FQVF9JTklUX1JFU1RBUlRfTUVNX1JFR0lPTl9NU0IgLSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fUkVHSU9OX0xTQiArIDEpCisKKworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvKiBUT0tFTiBJTkZPICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjZGVmaW5lIENBUFRfVE9LRU5fSURfTFNCICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9UT0tFTl9JRF9NU0IgICAgICAgICAgICAgICAgICAgICAgICAgMyAgICAgICAgICAgIAorI2RlZmluZSBDQVBUX1RPS0VOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIChDQVBUX1RPS0VOX0lEX01TQiAtIENBUFRfVE9LRU5fSURfTFNCICArIDEpIC8qIDQgKi8KKworLyogQ29tbWFuZCB0b2tlbnMgSURzICovCisjZGVmaW5lIENBUFRfU1RBUlRfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgIDAgLyogMDAwMGIgKi8KKyNkZWZpbmUgQ0FQVF9TVE9QX1RPS0VOX0lEICAgICAgICAgICAgICAgICAgICAgICAgMSAvKiAwMDAxYiAqLworI2RlZmluZSBDQVBUX0ZSRUVaRV9UT0tFTl9JRCAgICAgICAgICAgICAgICAgICAgICAyIC8qIDAwMTBiICovICAKKyNkZWZpbmUgQ0FQVF9SRVNVTUVfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgMyAvKiAwMDExYiAqLworI2RlZmluZSBDQVBUX0lOSVRfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgICA4IC8qIDEwMDBiICovCisKKyNkZWZpbmUgQ0FQVF9TVEFSVF9UT0tFTl9CSVQgICAgICAgICAgICAgICAgICAgICAgMCAgICAgIAorI2RlZmluZSBDQVBUX1NUT1BfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfRlJFRVpFX1RPS0VOX0JJVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9SRVNVTUVfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX0lOSVRfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgICAwCisKKy8qIEFja25vd2xlZGdlIHRva2VuIElEcyAqLworI2RlZmluZSBDQVBUX0VORF9PRl9QQUNLRVRfUkVDRUlWRURfVE9LRU5fSUQgICAgICAwIC8qIDAwMDBiICovCisjZGVmaW5lIENBUFRfRU5EX09GX1BBQ0tFVF9XUklUVEVOX1RPS0VOX0lEICAgICAgIDEgLyogMDAwMWIgKi8KKyNkZWZpbmUgQ0FQVF9FTkRfT0ZfUkVHSU9OX1dSSVRURU5fVE9LRU5fSUQgICAgICAgMiAvKiAwMDEwYiAqLworI2RlZmluZSBDQVBUX0ZMVVNIX0RPTkVfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAzIC8qIDAwMTFiICovCisjZGVmaW5lIENBUFRfUFJFTUFUVVJFX1NPUF9UT0tFTl9JRCAgICAgICAgICAgICAgIDQgLyogMDEwMGIgKi8KKyNkZWZpbmUgQ0FQVF9NSVNTSU5HX1NPUF9UT0tFTl9JRCAgICAgICAgICAgICAgICAgNSAvKiAwMTAxYiAqLworI2RlZmluZSBDQVBUX1VOREVGX1BIX1RPS0VOX0lEICAgICAgICAgICAgICAgICAgICA2IC8qIDAxMTBiICovCisjZGVmaW5lIENBUFRfU1RPUF9BQ0tfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgIDcgLyogMDExMWIgKi8KKworI2RlZmluZSBDQVBUX1BBQ0tFVF9MRU5HVEhfVE9LRU5fTVNCICAgICAgICAgICAgIDE5CisjZGVmaW5lIENBUFRfUEFDS0VUX0xFTkdUSF9UT0tFTl9MU0IgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQ0FQVF9TVVBFUl9QQUNLRVRfTEVOR1RIX1RPS0VOX01TQiAgICAgICAyMAorI2RlZmluZSBDQVBUX1NVUEVSX1BBQ0tFVF9MRU5HVEhfVE9LRU5fTFNCICAgICAgICA0CisjZGVmaW5lIENBUFRfUEFDS0VUX0RBVEFfRk9STUFUX0lEX1RPS0VOX01TQiAgICAgMjUKKyNkZWZpbmUgQ0FQVF9QQUNLRVRfREFUQV9GT1JNQVRfSURfVE9LRU5fTFNCICAgICAyMAorI2RlZmluZSBDQVBUX1BBQ0tFVF9DSF9JRF9UT0tFTl9NU0IgICAgICAgICAgICAgIDI3CisjZGVmaW5lIENBUFRfUEFDS0VUX0NIX0lEX1RPS0VOX0xTQiAgICAgICAgICAgICAgMjYKKyNkZWZpbmUgQ0FQVF9QQUNLRVRfTUVNX1JFR0lPTl9JRF9UT0tFTl9NU0IgICAgICAyOQkJCisjZGVmaW5lIENBUFRfUEFDS0VUX01FTV9SRUdJT05fSURfVE9LRU5fTFNCICAgICAgMjEJCQorCisvKiAgYml0IGRlZmluaXRpb24gKi8KKyNkZWZpbmUgQ0FQVF9DTURfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ0FQVF9UT0tFTl9JRF9MU0IKKyNkZWZpbmUJQ0FQVF9DTURfQklUUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKENBUFRfVE9LRU5fSURfTVNCIC0gQ0FQVF9UT0tFTl9JRF9MU0IgKyAxKQorI2RlZmluZSBDQVBUX1NPUF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBDQVBUX1NPUF9CSVRTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENBUFRfUEtUX0lORk9fSURYICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIENBUFRfUEtUX0lORk9fQklUUyAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQ0FQVF9QS1RfVFlQRV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1BLVF9UWVBFX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIENBUFRfSEVBREVSX0RBVEFfSURYICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9IRUFERVJfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQ0FQVF9QS1RfREFUQV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1BLVF9EQVRBX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBDQVBUX1dPUkRfQ05UX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfV09SRF9DTlRfQklUUyAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIENBUFRfQUNLX1RPS0VOX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9BQ0tfVE9LRU5fSURfQklUUyAgICAgICAgICAgICAgICAgICAgNAorLy8jZGVmaW5lIENBUFRfQUNLX1BLVF9MRU5fSURYICAgICAgICAgICAgICAgICAgICAgIENBUFRfUEFDS0VUX0xFTkdUSF9UT0tFTl9MU0IKKy8vI2RlZmluZSBDQVBUX0FDS19QS1RfTEVOX0JJVFMgICAgICAgICAgICAgICAgICAgICAoQ0FQVF9QQUNLRVRfTEVOR1RIX1RPS0VOX01TQiAtIENBUFRfUEFDS0VUX0xFTkdUSF9UT0tFTl9MU0IgKyAxKQorLy8jZGVmaW5lIENBUFRfQUNLX1BLVF9JTkZPX0lEWCAgICAgICAgICAgICAgICAgICAgIDIwCisvLyNkZWZpbmUgQ0FQVF9BQ0tfUEtUX0lORk9fQklUUyAgICAgICAgICAgICAgICAgICA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19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAyICAgICAgICAKKyNkZWZpbmUgQ0FQVF9FUlJPUl9JTkZPX1dJRFRIICAgICAgICAgICAgICAgICAgICAgOCAgICAgICAKKworI2RlZmluZSBMT05HX1BLVENPREVfTUFYICAgICAgICAgICAgICAgICAgICAgICAgICA2MworI2RlZmluZSBMT05HX1BLVENPREVfTUlOICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSE9SVF9QS1RDT0RFX01BWCAgICAgICAgICAgICAgICAgICAgICAgICAxNQorCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIFBhY2tldCBJbmZvICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjZGVmaW5lIENBUFRfU1RBUlRfT0ZfRlJBTUUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9FTkRfT0ZfRlJBTUUgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX1NUQVJUX09GX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfRU5EX09GX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ0FQVF9MSU5FX1BBWUxPQUQgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBDQVBUX0dFTl9TSF9QS1QgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogUGFja2V0IERhdGEgVHlwZSAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisjZGVmaW5lIENBUFRfWVVWNDIwXzhfREFUQSAgICAgICAgICAgICAgICAgICAgICAgMjQgICAvKiAwMSAxMDAwIFlVVjQyMCA4LWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1lVVjQyMF8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDI1ICAgLyogMDEgMTAwMSAgWVVWNDIwIDEwLWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9ZVVY0MjBfOExfREFUQSAgICAgICAgICAgICAgICAgICAgICAyNiAgIC8qIDAxIDEwMTAgICBZVVY0MjAgOC1iaXQgbGVnYWN5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfWVVWNDIyXzhfREFUQSAgICAgICAgICAgICAgICAgICAgICAgMzAgICAvKiAwMSAxMTEwICAgWVVWNDIyIDgtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1lVVjQyMl8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDMxICAgLyogMDEgMTExMSAgIFlVVjQyMiAxMC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SR0I0NDRfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAzMiAgIC8qIDEwIDAwMDAgICBSR0I0NDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkdCNTU1X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDMzICAgLyogMTAgMDAwMSAgIFJHQjU1NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SR0I1NjVfREFUQSAgICAgICAgICAgICAgCQkJCQkgMzQgICAvKiAxMCAwMDEwICAgUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JHQjY2Nl9EQVRBICAgICAgICAgICAgICAJCQkJCSAzNSAgIC8qIDEwIDAwMTEgICBSR0I2NjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkdCODg4X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDM2ICAgLyogMTAgMDEwMCAgIFJHQjg4OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SQVc2X0RBVEEgICAgICAgICAgICAgICAgCQkJCQkgNDAgICAvKiAxMCAxMDAwICAgUkFXNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JBVzdfREFUQSAgICAgICAgICAgICAgICAJCQkJCSA0MSAgIC8qIDEwIDEwMDEgICBSQVc3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkFXOF9EQVRBICAgICAgICAgICAgICAgIAkJCQkJIDQyICAgLyogMTAgMTAxMCAgIFJBVzggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SQVcxMF9EQVRBICAgICAgICAgICAgICAgCQkJCQkgNDMgICAvKiAxMCAxMDExICAgUkFXMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JBVzEyX0RBVEEgICAgICAgICAgICAgICAJCQkJCSA0NCAgIC8qIDEwIDExMDAgICBSQVcxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkFXMTRfREFUQSAgICAgICAgICAgICAgIAkJCQkJIDQ1ICAgLyogMTAgMTEwMSAgIFJBVzE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzFfREFUQSAgICAgICAgICAgCQkJCQkgNDggICAvKiAxMSAwMDAwICAgIEpQRUcgW1VzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgMV0gICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfMl9EQVRBICAgICAgICAgICAJCQkJCSA0OSAgIC8qIDExIDAwMDEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSAyICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfVVNSX0RFRl8zX0RBVEEgICAgICAgICAgIAkJCQkJIDUwICAgLyogMTEgMDAxMCAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDMgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzRfREFUQSAgICAgICAgICAgCQkJCQkgNTEgICAvKiAxMSAwMDExICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNCAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfNV9EQVRBICAgICAgICAgICAJCQkJCSA1MiAgIC8qIDExIDAxMDAgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA1ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfVVNSX0RFRl82X0RBVEEgICAgICAgICAgIAkJCQkJIDUzICAgLyogMTEgMDEwMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDYgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzdfREFUQSAgICAgICAgICAgCQkJCQkgNTQgICAvKiAxMSAwMTEwICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNyAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfOF9EQVRBICAgICAgICAgICAJCQkJCSA1NSAgIC8qIDExIDAxMTEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA4ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfRW1iX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDE4ICAgLyogMDEgMDAxMCAgICBlbWJlZGRlZCBlaWdodCBiaXQgbm9uIGltYWdlIGRhdGEgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9TT0ZfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMCAgIC8qIDAwIDAwMDAgICAgZnJhbWUgc3RhcnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfRU9GX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDEgICAvKiAwMCAwMDAxICAgIGZyYW1lIGVuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1NPTF9EQVRBICAgICAgICAgICAgICAgICAJCQkJCSAyICAgLyogMDAgMDAxMCAgICBsaW5lIHN0YXJ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9FT0xfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMyAgIC8qIDAwIDAwMTEgICAgbGluZSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NIMV9EQVRBICAgICAgICAgICAgIAkJCQkJIDggICAvKiAwMCAxMDAwICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDEgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDJfREFUQSAgICAgICAgICAgICAJCQkJCSA5ICAgLyogMDAgMTAwMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDIgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9HRU5fU0gzX0RBVEEgICAgICAgICAgICAgCQkJCQkgMTAgICAvKiAwMCAxMDEwICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMyAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDRfREFUQSAgICAgICAgICAgICAJCQkJCSAxMSAgIC8qIDAwIDEwMTEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA0ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NINV9EQVRBICAgICAgICAgICAgIAkJCQkJIDEyICAgLyogMDAgMTEwMCAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDUgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9HRU5fU0g2X0RBVEEgICAgICAgICAgICAgCQkJCQkgMTMgICAvKiAwMCAxMTAxICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgNiAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDdfREFUQSAgICAgICAgICAgICAJCQkJCSAxNCAgIC8qIDAwIDExMTAgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA3ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NIOF9EQVRBICAgICAgICAgICAgIAkJCQkJIDE1ICAgLyogMDAgMTExMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDggICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9ZVVY0MjBfOF9DU1BTX0RBVEEgICAgICAgCQkJCQkgMjggICAvKiAwMSAxMTAwICAgWVVWNDIwIDgtYml0IChDaHJvbWEgU2hpZnRlZ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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfWVVWNDIyXzEwICAgICAgICAgMzEgICAvKiAwMSAxMTExICAgWVVWNDIyIDEwLWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JHQjQ0NCAgICAgICAgICAgIDMyICAgLyogMTAgMDAwMCAgIFJHQjQ0NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SR0I1NTUgICAgICAgICAgICAzMyAgIC8qIDEwIDAwMDEgICBSR0I1NTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkdCNTY1ICAgICAgICAgICAgMzQgICAvKiAxMCAwMDEwICAgUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JHQjY2NiAgICAgICAgICAgIDM1ICAgLyogMTAgMDAxMSAgIFJHQjY2NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SR0I4ODggICAgICAgICAgICAzNiAgIC8qIDEwIDAxMDAgICBSR0I4ODggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkFXNiAgICAgICAgICAgICAgNDAgICAvKiAxMCAxMDAwICAgUkFXNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JBVzcgICAgICAgICAgICAgIDQxICAgLyogMTAgMTAwMSAgIFJBVzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SQVc4ICAgICAgICAgICAgICA0MiAgIC8qIDEwIDEwMTAgICBSQVc4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkFXMTAgICAgICAgICAgICAgNDMgICAvKiAxMCAxMDExICAgUkFXMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JBVzEyICAgICAgICAgICAgIDQ0ICAgLyogMTAgMTEwMCAgIFJBVzEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SQVcxNCAgICAgICAgICAgICA0NSAgIC8qIDEwIDExMDEgICBSQVcxNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfVVNSX0RFRl8xICAgICAgICAgNDggICAvKiAxMSAwMDAw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WJpdCBEYXRhIFR5cGUgNyAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1VTUl9ERUZfOCAgICAgICAgIDU1ICAgLyogMTEgMDExMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDggICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9FbWIgICAgICAgICAgICAgICAxOCAgIC8qIDAxIDAwMTAgICAgZW1iZWRkZWQgZWlnaHQgYml0IG5vbiBpbWFnZSBkYXRhICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfU09GICAgICAgICAgICAgICAgIDAgICAvKiAwMCAwMDAwICAgIGZyYW1lIHN0YXJ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX0VPRiAgICAgICAgICAgICAgICAxICAgLyogMDAgMDAwMSAgICBmcmFtZSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9TT0wgICAgICAgICAgICAgICAgMiAgIC8qIDAwIDAwMTAgICAgbGluZSBzdGFydCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfRU9MICAgICAgICAgICAgICAgIDMgICAvKiAwMCAwMDExICAgIGxpbmUgZW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJU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NFSVZFUl8yNDAwX1BLVF9QQVlMT0FEX0JJVFMgICAgICAgICAgICAgICAgICAgMzIKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIEN1c3RvbSBEZWNvZGluZyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogVGhlc2UgQ3VzdG9tIERlZnMgYXJlIGRlZmluZWQgYmFzZWQgb24gZGVzaWduLXRpbWUgY29uZmlnIGluICJjc2lfYmVfcGl4ZWxfZm9ybWF0dGVyLmNoZGwiICEhICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgQkVfQ1VTVF9FTl9JRFggICAgICAgICAgICAgICAgICAgICAwICAgICAvKiAyYml0cyAqLworI2RlZmluZSBCRV9DVVNUX0VOX0RBVEFJRF9JRFggICAgICAgICAgICAgIDIgICAgIC8qIDZiaXRzIE1JUEkgREFUQSBJRCAqLyAKKyNkZWZpbmUgQkVfQ1VTVF9FTl9XSURUSCAgICAgICAgICAgICAgICAgICA4ICAgICAKKyNkZWZpbmUgQkVfQ1VTVF9NT0RFX0FMTCAgICAgICAgICAgICAgICAgICAxICAgICAvKiBFbmFibGUgQ3VzdG9tIERlY29kaW5nIGZvciBhbGwgREFUQSBJRHMgKi8KKyNkZWZpbmUgQkVfQ1VTVF9NT0RFX09ORSAgICAgICAgICAgICAgICAgICAzICAgICAvKiBFbmFibGUgQ3VzdG9tIERlY29kaW5nIGZvciBPTkUgREFUQSBJRCwgcHJvZ3JhbW1lZCBpbiBDVVNUX0VOX0RBVEFfSUQgKi8KKworLyogRGF0YSBTdGF0ZSBjb25maWc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EVEhfQklUUyAgICAgICAgIDE2CisKKyNkZWZpbmUgX0RNQV9WMl9IRUlHSFRfSURYICAgICAgICAgIDAKKyNkZWZpbmUgX0RNQV9WMl9IRUlHSFRfQklUUyAgICAgICAgMTYKKworI2RlZmluZSBfRE1BX1YyX1NUUklERV9JRFggICAgICAgICAgMAorI2RlZmluZSBfRE1BX1YyX1NUUklERV9CSVRTICAgICAgICAzMgorCisvKiBDb21tYW5kIElEcyAqLworI2RlZmluZSBfRE1BX1YyX01PVkVfQjJBX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9NT1ZFX0IyQV9CTE9DS19DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAxICAgICAgCisjZGVmaW5lIF9ETUFfVjJfTU9WRV9CMkFfTk9fU1lOQ19DSEtfQ09NTUFORCAgICAgICAgICAgICAgICAgMiAgICAgIAorI2RlZmluZSBfRE1BX1YyX01PVkVfQjJBX0JMT0NLX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgICAgICAgIDMgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9NT1ZFX0EyQl9DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAgICAgCisjZGVmaW5lIF9ETUFfVjJfTU9WRV9BMkJfQkxPQ0tfQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAgNSAgICAgIAorI2RlZmluZSBfRE1BX1YyX01PVkVfQTJCX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgICAgICAgICAgICAgIDYgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9NT1ZFX0EyQl9CTE9DS19OT19TWU5DX0NIS19DT01NQU5EICAgICAgICAgICA3ICAgICAgCisjZGVmaW5lIF9ETUFfVjJfSU5JVF9BX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgICAgIAorI2RlZmluZSBfRE1BX1YyX0lOSVRfQV9CTE9DS19DT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FSQU0gICAgICAgICAgICAgICAgICAgICAgICAgIDEgIAorI2RlZmluZSBfRE1BX1YyX0VMRU1fQ1JPUFBJTkdfQV9QQVJBTSAgICAgICAgICAgICAgICAgICAyICAKKyNkZWZpbmUgX0RNQV9WMl9XSURUSF9BX1BBUkFNICAgICAgICAgICAgICAgICAgICAgICAgICAgMyAgCisjZGVmaW5lIF9ETUFfVjJfU1RSSURFX0JfUEFSQU0gICAgICAgICAgICAgICAgICAgICAgICAgIDQgIAorI2RlZmluZSBfRE1BX1YyX0VMRU1fQ1JPUFBJTkdfQl9QQVJBTSAgICAgICAgICAgICAgICAgICA1ICAKKyNkZWZpbmUgX0RNQV9WMl9XSURUSF9CX1BBUkFNICAgICAgICAgICAgICAgICAgICAgICAgICAgNiAgCisjZGVmaW5lIF9ETUFfVjJfSEVJR0hUX1BBUkFNICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcgIAorI2RlZmluZSBfRE1BX1YyX1FVRVVFRF9DTURTICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAKKworLyogUGFyYW1ldGVyIENvbnN0YW50cyAqLworI2RlZmluZSBfRE1BX1YyX1pFUk9fRVhURU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIF9ETUFfVjJfU0lHTl9FWFRFTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworICAvKiBTTEFWRSBhZGRyZXNzIG1hcCAqLworI2RlZmluZSBfRE1BX1YyX1NFTF9GU01fQ01EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIF9ETUFfVjJfU0VMX0NIX1JFRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgX0RNQV9WMl9TRUxfQ09OTl9HUk9VUCAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBfRE1BX1YyX1NFTF9ERVZfSU5URVJGICAgICAgICAgICAgICAgICAgICAgICAgICAzCisKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9DT01QX0lEWCAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0NPTVBfQklUUyAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfQ0hfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9DSF9SRUdfQklUUyAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX1BBUkFNX0lEWCAgICAgICAgICAgICAgICAgICAgICAoX0RNQV9WMl9BRERSX1NFTF9DSF9SRUdfQklUUytfRE1BX1YyX0FERFJfU0VMX0NIX1JFR19JRFgpCisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfUEFSQU1fQklUUyAgICAgICAgICAgICAgICAgICAgIDQKKworI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0dST1VQX0NPTVBfSURYICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfR1JPVVBfQ09NUF9CSVRTICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9HUk9VUF9DT01QX0lORk9fSURYICAgICAgICAgICAgKF9ETUFfVjJfQUREUl9TRUxfR1JPVVBfQ09NUF9CSVRTICsgX0RNQV9WMl9BRERSX1NFTF9HUk9VUF9DT01QX0lEWCkKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9HUk9VUF9DT01QX0lORk9fQklUUyAgICAgICAgICAgNAorCisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfREVWX0lOVEVSRl9JRFhfSURYICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9ERVZfSU5URVJGX0lEWF9CSVRTICAgICAgICAgICAgNgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0RFVl9JTlRFUkZfSU5GT19JRFggICAgICAgICAgICAoX0RNQV9WMl9BRERSX1NFTF9ERVZfSU5URVJGX0lEWF9JRFgrX0RNQV9WMl9BRERSX1NFTF9ERVZfSU5URVJGX0lEWF9CSVRTKQorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0RFVl9JTlRFUkZfSU5GT19CSVRTICAgICAgICAgICA0CisKKyNkZWZpbmUgX0RNQV9WMl9GU01fR1JPVVBfQ01EX0lEWCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBfRE1BX1YyX0ZTTV9HUk9VUF9BRERSX1NSQ19JRFggICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIF9ETUFfVjJfRlNNX0dST1VQX0FERFJfREVTVF9JRFggICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0RNQV9WMl9GU01fR1JPVVBfQ01EX0NUUkxfSURYICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBfRE1BX1YyX0ZTTV9HUk9VUF9GU01fQ1RSTF9JRFggICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIF9ETUFfVjJfRlNNX0dST1VQX0ZTTV9QQUNLX0lEWCAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgX0RNQV9WMl9GU01fR1JPVVBfRlNNX1JFUV9JRFggICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBfRE1BX1YyX0ZTTV9HUk9VUF9GU01fV1JfSURYICAgICAgICAgICAgICAgICAgICA3CisgIAorI2RlZmluZSBfRE1BX1YyX0ZTTV9HUk9VUF9GU01fQ1RSTF9TVEFURV9JRFggICAgICAgICAgICAwCisjZGVmaW5lIF9ETUFfVjJfRlNNX0dST1VQX0ZTTV9DVFJMX1JFUV9ERVZfSURYICAgICAgICAgIDEKKyNkZWZpbmUgX0RNQV9WMl9GU01fR1JPVVBfRlNNX0NUUkxfUkVRX0FERFJfSURYICAgICAgICAgMgorI2RlZmluZSBfRE1BX1YyX0ZTTV9HUk9VUF9GU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W4gYnkgdGhlIHNpemUgb2YgdGhlIExVVCAqLworCisjZGVmaW5lIEhSVF9HRENfQkxJX0ZSQUNfQklUUyAgICAgICAgICAgIDQgLyogTnVtYmVyIG9mIGZyYWN0aW9uYWwgYml0cyBmb3IgdGhlIGJpLWxpbmVhciBpbnRlcnBvbGF0aW9uIHR5cGUgICAgICAgICAgICAqLworI2RlZmluZSBIUlRfR0RDX0JMSV9DT0VGX09ORSAgICAgICAgICAgICAoMSA8PCBIUlRfR0RDX0JMSV9GUkFDX0JJVFMpCisKKyNkZWZpbmUgSFJUX0dEQ19CQ0lfQ09FRl9CSVRTICAgICAgICAgICAxNCAvKiAxNCBiaXRzIHBlciBjb2VmZmljaWVudCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEhSVF9HRENfQkNJX0NPRUZfT05FICAgICAgICAgICAgICgxIDw8IChIUlRfR0RDX0JDSV9DT0VGX0JJVFMtMikpICAvKiBXZSByZXByZXNlbnQgc2lnbmVkIDEwIGJpdCBjb2VmZmljaWVudHMuICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogVGhlIHN1cHBvcnRlZCByYW5nZSBpcyBbLTI1NiwgLi4sICsyNTZdICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGluIDE0LWJpdCBzaWduZWQgbm90YXRpb24sICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBXZSBuZWVkIGFsbCB0ZW4gYml0cyAoTVNCIG11c3QgYmUgemVybykuICAgICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogLXMgaXMgaW5zZXJ0ZWQgdG8gc29sdmUgdGhpcyBpc3N1ZSwgYW5kICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRoZXJlZm9yZSAiMSIgaXMgZXF1YWwgdG8gKzI1Ni4gICAgICAgICAgICAgICovCisjZGVmaW5lIEhSVF9HRENfQkNJX0NPRUZfTUFTSyAgICAgICAgICAgICgoMSA8PCBIUlRfR0RDX0JDSV9DT0VGX0JJVFMpIC0gMSkgCisKKyNkZWZpbmUgSFJUX0dEQ19MVVRfQllURVMgICAgICAgICAgICAgICAgKEhSVF9HRENfTio0KjIpICAgICAgICAgICAgICAgIC8qIDEwMjQgYWRkcmVzc2VzLCA0IGNvZWZmaWNpZW50cyBwZXIgYWRkcmVzcywgICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAyIGJ5dGVzIHBlciBjb2VmZmljaWVudCAgICAgICAgICAgICAgICAgICAgICAqLworCisjZGVmaW5lIF9IUlRfR0RDX1JFR19BTElHTiAgICAgICAgICAgICAgIDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKworICAvLyAgICAgMzEgIDMwICAyOSAgICAyNSAyNCAgICAgICAgICAgICAgICAgICAgIDAKKyAgLy8gIHwtLS0tLXwtLS18LS0tLS0tLS18LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfAorICAvLyAgfCBDTUQgfCBDIHwgUmVnX0lEIHwgICAgICAgIFZhbHVlICAgICAgICAgICB8CisKKworICAvLyBUaGVyZSBhcmUganVzdCB0d28gY29tbWFuZHMgcG9zc2libGUgZm9yIHRoZSBHREMgYmxvY2s6CisgIC8vIDEgLSBDb25maWd1cmUgcmVnIAorICAvLyAwIC0gRGF0YSB0b2tlbiAgICAKKyAgCisgIC8vIEMg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sb3dpbmcgbWVhbmluZyBmb2xsb3c6CisgIC8vICAgMS4gdHdvICB0b2tlbnM6IFNSQyBhZGRyZXNzIDsgRFNUIGFkZHJlc3MKKyAgLy8gICAyLiBuaW5lIHRva2VuczogUDAnWSwgLi4sIFAzJ1kgOyBTUkMgYWRkcmVzcyA7IERTVCBhZGRyZXNzCisgIAorI2RlZmluZSBIUlRfR0RDX0NPTkZJR19DTUQgICAgICAgICAgICAgMQorI2RlZmluZSBIUlRfR0RDX0RBVEFfQ01EICAgICAgICAgICAgICAgMAorCisKKyNkZWZpbmUgSFJUX0dEQ19DTURfUE9TICAgICAgICAgICAgICAgMzEKKyNkZWZpbmUgSFJUX0dEQ19DTURfQklUUyAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSFJUX0dEQ19DUlVOX1BPUyAgICAgICAgICAgICAgMzAKKyNkZWZpbmUgSFJUX0dEQ19SRUdfSURfUE9TICAgICAgICAgICAgMjUKKyNkZWZpbmUgSFJUX0dEQ19SRUdfSURfQklUUyAgICAgICAgICAgIDUKKyNkZWZpbmUgSFJUX0dEQ19EQVRBX1BPUyAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSFJUX0dEQ19EQVRBX0JJVFMgICAgICAgICAgICAgMjUKKworI2RlZmluZSBIUlRfR0RDX0ZSWUlQWEZSWF9CSVRTICAgICAgICAyNgorI2RlZmluZSBIUlRfR0RDX1AwWF9CSVRTICAgICAgICAgICAgICAyMworCisKKyNkZWZpbmUgSFJUX0dEQ19NQVhfT1hESU0gICAgICAgICAgICg4MTkyLTY0KQorI2RlZmluZSBIUlRfR0RDX01BWF9PWURJTSAgICAgICAgICAgNDA5NQorI2RlZmluZSBIUlRfR0RDX01BWF9JWERJTSAgICAgICAgICAgKDgxOTItNjQpCisjZGVmaW5lIEhSVF9HRENfTUFYX0lZRElNICAgICAgICAgICA0MDk1CisjZGVmaW5lIEhSVF9HRENfTUFYX0RTX0ZBQyAgICAgICAgICAgIDE2CisjZGVmaW5lIEhSV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wfAorLy8gSG93ZXZlciwgZm9yIHRoZSB0aW1lIGJlaW5nIGF0IGxlYXN0LCAKKy8vIHRoaXMgaW1wbGVtZW50YXRpb24gaXMgbWVhbmluZ2xlc3MgaW4gaHNzIG1vZGVsLAorLy8gU28sIHdlIGp1c3QgcmV0dXJuIDAKKworCisjZGVmaW5lIEhSVF9HRENfQ0hLX0VOR0lORV9JRFggICAgICAgIDAKKyNkZWZpbmUgSFJUX0dEQ19XT0lYX0lEWCAgICAgICAgICAgICAgMQorI2RlZmluZSBIUlRfR0RDX1dPSVlfSURYICAgICAgICAgICAgICAyCisjZGVmaW5lIEhSVF9HRENfQlBQX0lEWCAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSFJUX0dEQ19GUllJUFhGUlhfSURYICAgICAgICAgNAorI2RlZmluZSBIUlRfR0RDX09YRElNX0lEWCAgICAgICAgICAgICA1CisjZGVmaW5lIEhSVF9HRENfT1lESU1fSURYICAgICAgICAgICAgIDYKKyNkZWZpbmUgSFJUX0dEQ19TUkNfQUREUl9JRFggICAgICAgICAgNworI2RlZmluZSBIUlRfR0RDX1NSQ19FTkRfQUREUl9JRFggICAgICA4CisjZGVmaW5lIEhSVF9HRENfU1JDX1dSQVBfQUREUl9JRFggICAgIDkKKyNkZWZpbmUgSFJUX0dEQ19TUkNfU1RSSURFX0lEWCAgICAgICAxMAorI2RlZmluZSBIUlRfR0RDX0RTVF9BRERSX0lEWCAgICAgICAgIDExCisjZGVmaW5lIEhSVF9HRENfRFNUX1NUUklERV9JRFggICAgICAgMTIKKyNkZWZpbmUgSFJUX0dEQ19EWF9JRFggICAgICAgICAgICAgICAxMworI2RlZmluZSBIUlRfR0RDX0RZX0lEWCAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhSVF9HRENfUDBYX0lEWCAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgSFJUX0dEQ19QMFlfSURYICAgICAgICAgICAgICAxNgorI2RlZmluZSBIUlRfR0RDX1AxWF9JRFggICAgIC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X1NFTEVDVF9SRUdfSURYKHRpbWVyLHRpbWVycykgICAgICAgKEhJVkVfR1BfVElNRVJfQ09VTlRfVFlQRV9SRUdfSURYKHRpbWVycywgdGltZXJzKSArIHRpbWVyKQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lSUV9UUklHR0VSX1ZBTFVFX1JFR19JRFgoaXJxLHRpbWVycykgICAgIChISVZFX0dQX1RJTUVSX1NJR05BTF9TRUxFQ1RfUkVHX0lEWCh0aW1lcnMsIHRpbWVycykgKyBpcnEpCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVJRX1RJTUVSX1NFTEVDVF9SRUdfSURYKGlycSx0aW1lcnMsaXJxcykgKEhJVkVfR1BfVElNRVJfSVJRX1RSSUdHRVJfVkFMVUVfUkVHX0lEWChpcnFzLCB0aW1lcnMpICsgaXJxKQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lSUV9FTkFCTEVfUkVHX0lEWChpcnEsdGltZXJzLGlycXMpICAgICAgIChISVZFX0dQX1RJTUVSX0lSUV9USU1FUl9TRUxFQ1RfUkVHX0lEWChpcnFzLCB0aW1lcnMsIGlycXMpICsgaXJxKQorCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfQ09VTlRfVFlQRV9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9DT1VOVF9UWVBFX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0NPVU5UX1RZUEVfUE9TRURHRSAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfQ09VTlRfVFlQRV9ORUdFREdFICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9DT1VOVF9UWVBFUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorCisjZW5kaWYgLyogX2dwX3RpbWVyX2Rl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VuIGZyb20gPHN5c3RlbT5fZGVmcy5oCisgKi8KK3R5cGVkZWYgZW51bSBocnRfaXNwX2Nzc19pcnEgeworICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fMCAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMF9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fMSAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMV9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fMiAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMl9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fMyAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fM19CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fNCAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fNF9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fNSAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fNV9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fNiAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fNl9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fNyAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fN19CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fOCAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fOF9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fOSAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fOV9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fMTAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMTBfQklUX0lEICAgICAgICAgLCAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncGlvX3Bpbl8xMSAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8xMV9CSVRfSUQgICAgICAgICAsICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX3NwICAgICAgICAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX1NQX0JJVF9JRCAgICAgICAgICAgICAgICAgICwgICAgICAgICAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfaXNwICAgICAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSVNQX0JJVF9JRCAgICAgICAgICAgICAgICAgLCAgICAgICAgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2lzeXMgICAgICAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0lTWVNfQklUX0lEICAgICAgICAgICAgICAgICwgICAgICAgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2lzZWwgICAgICAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0lTRUxfQklUX0lEICAgICAgICAgICAgICAgICwgICAgICAgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2lmbXQgICAgICAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0lGTVRfQklUX0lEICAgICAgICAgICAgICAgICwgICAgICAgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX3NwX3N0cmVhbV9tb24gICAgICAgID0gSElWRV9HUF9ERVZfSVJRX1NQX1NUUkVBTV9NT05fQklUX0lEICAgICAgICwgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2lzcF9zdHJlYW1fbW9uICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0lTUF9TVFJFQU1fTU9OX0JJVF9JRCAgICAgICwgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfbW9kX3N0cmVhbV9tb24gICAgICAgPSBISVZFX0dQX0RFVl9JUlFfTU9EX1NUUkVBTV9NT05fQklUX0lEICAgICAgLAorICBocnRfaXNwX2Nzc19pcnFfaXMyNDAxICAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSVMyNDAxX0JJVF9JRCAgICAgICAgICAgICAgLCAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9pc3BfYmFtZW1fZXJyb3IgICAgICA9IEhJVkVfR1BfREVWX0lSUV9JU1BfQkFNRU1fRVJST1JfQklUX0lEICAgICAsICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfaXNwX2RtZW1fZXJyb3IgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfSVNQX0RNRU1fRVJST1JfQklUX0lEICAgICAgLCAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9zcF9pY2FjaGVfbWVtX2Vycm9yICA9IEhJVkVfR1BfREVWX0lSUV9TUF9JQ0FDSEVfTUVNX0VSUk9SX0JJVF9JRCAsICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9zcF9kbWVtX2Vycm9yICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9TUF9ETUVNX0VSUk9SX0JJVF9JRCAgICAgICAsICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9tbXVfY2FjaGVfbWVtX2Vycm9yICA9IEhJVkVfR1BfREVWX0lSUV9NTVVfQ0FDSEVfTUVNX0VSUk9SX0JJVF9JRCAsICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncF90aW1lcl8wICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUF9USU1FUl8wX0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9ncF90aW1lcl8xICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9HUF9USU1FUl8xX0JJVF9JRCAgICAgICAgICAsICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9zd19waW5fMCAgICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9TV19QSU5fMF9CSVRfSUQgICAgICAgICAgICAsICAgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX3N3X3Bpbl8xICAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX1NXX1BJTl8xX0JJVF9JRCAgICAgICAgICAgICwgICAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZG1hICAgICAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfRE1BX0JJVF9JRCAgICAgICAgICAgICAgICAgLAorICBocnRfaXNwX2Nzc19pcnFfc3Bfc3RyZWFtX21vbl9iICAgICAgPSBISVZFX0dQX0RFVl9JUlFfU1BfU1RSRUFNX01PTl9CX0JJVF9JRCAgICAgLAorICAvKiB0aGlzIG11c3QgKG9idmlvdXNseSkgYmUgdGhlIGxhc3Qgb24gaW4gdGhlIGVudW0gKi8KKyAgaHJ0X2lzcF9jc3NfaXJxX251bV9pcnFzCit9IGhydF9pc3BfY3NzX2lycV90OworCit0eXBlZGVmIGVudW0gaHJ0X2lzcF9jc3NfaXJxX3N0YXR1cyB7CisgIGhydF9pc3BfY3NzX2lycV9zdGF0d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ICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX0dQX1JFR1NfSVJRXzFfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NQX1NUUkVBTV9TVEFUX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUF9TVFJFQU1fU1RBVF9CX0lEWCAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBISVZFX0dQX1JFR1NfSVNQX1NUUkVBTV9TVEFUX0lEWCAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSElWRV9HUF9SRUdTX01PRF9TVFJFQU1fU1RBVF9JRFggICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUF9TVFJFQU1fU1RBVF9JUlFfQ09ORF9JRFggICAgICAgICAgICAgICAgOAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1BfU1RSRUFNX1NUQVRfQl9JUlFfQ09ORF9JRFggICAgICAgICAgICAgIDkKKyNkZWZpbmUgSElWRV9HUF9SRUdTX0lTUF9TVFJFQU1fU1RBVF9JUlFfQ09ORF9JRFggICAgICAgICAgICAgIDEwCisjZGVmaW5lIEhJVkVfR1BfUkVHU19NT0RfU1RSRUFNX1NUQVRfSVJRX0NPTkRfSURYICAgICAgICAgICAgICAxMQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1BfU1RSRUFNX1NUQVRfSVJRX0VOQUJMRV9JRFggICAgICAgICAgICAgMTIKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NQX1NUUkVBTV9TVEFUX0JfSVJRX0VOQUJMRV9JRFggICAgICAgICAgIDEzCisjZGVmaW5lIEhJVkVfR1BfUkVHU19JU1BfU1RSRUFNX1NUQVRfSVJRX0VOQUJMRV9JRFggICAgICAgICAgICAxNAorI2RlZmluZSBISVZFX0dQX1JFR1NfTU9EX1NUUkVBTV9TVEFUX0lSUV9FTkFCTEVfSURYICAgICAgICAgICAgMTUKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NXSVRDSF9QUklNX0lGX0lEWCAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TV0lUQ0hfR0RDMV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAxNworI2RlZmluZSBISVZFX0dQX1JFR1NfU1dJVENIX0dEQzJfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMTgKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE5CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TTFZfUkVHX1NSU1RfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAyMAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1dJVENIX0lTWVNfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjEKKworLyogQml0IG51bWJlcnMgb2YgdGhlIHNvZnQgcmVzZXQgcmVnaXN0ZXIgKi8KKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfSVNZU19DQlVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lTRUxfQ0JVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9JRk1UX0NCVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfR1BERVZfQ0JVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9UQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfR1BUSU1FUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0ZBQ0VMTEZJRk9TICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9EX09TWVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfSUZUX1NFQ19QSVBFICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0dEQzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9HREMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfVkVDX0JVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lTUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TTFZfR1JQX0JVUyAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfRE1BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NGX0lTUF9TUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9QSUZfQ0VMTFMgICAgICAgICAgICAgICAgICAgICAgICAgMTcKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0ZfU0lGX1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NGX01DX1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9JU1lTX1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgMjAKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0ZfRE1BX0NFTExTICAgICAgICAgICAgICAgICAgICAgICAgIDIxCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NGX0dEQzFfQ0VMTFMgICAgICAgICAgICAgICAgICAgICAgICAyMgorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9HREMyX0NFTExTICAgICAgICAgICAgICAgICAgICAgICAgMjMKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX09DUDJDSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9OQlVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjYKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfSE9TVDEyQlVTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1dCVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9JQ19PU1lTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjkKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfV0JVU19JQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMwCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lTWVNfSU5QX0JVRl9CVVMgICAgICAgICAgICAgICAgICAgICAzMQorCisvKiBCaXQgbnVtYmVycyBvZiB0aGUgc2xhdmUgcmVnaXN0ZXIgc29mdCByZXNldCByZWdpc3RlciAqLworI2RlZmluZSBISVZFX0dQX1JFR1NfU0xWX1JFR19TUlNUX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NMVl9SRUdfU1JTVF9HREMxICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TTFZfUkVHX1NSU1RfR0RDMiAgICAgICAgICAgICAgICAgICAgICAgICAgMgorCisvKiBvcmRlciBvZiB0aGUgaW5wdXQgYml0cyBmb3IgdGhlIGlycSBjb250cm9sbGVyICovCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8wX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzJfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8zX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fNF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzVfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl82X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fN19CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzhfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl85X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMTBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzExX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9TUF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSVNQX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0lTWVNfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9JU0VMX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSUZNVF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX1NQX1NUUkVBTV9NT05fQklUX0lEICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9JU1BfU1RSRUFNX01PTl9CSVRfSUQgICAgICAgICAgICAgICAgICAxOAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfTU9EX1NUUkVBTV9NT05fQklUX0lEICAgICAgICAgICAgICAgICAgMTkKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0lTMjQwMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9JU1BfQkFNRU1fRVJST1JfQklUX0lEICAgICAgICAgICAgICAgICAyMQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSVNQX0RNRU1fRVJST1JfQklUX0lEICAgICAgICAgICAgICAgICAgMjIKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX1NQX0lDQUNIRV9NRU1fRVJST1JfQklUX0lEICAgICAgICAgICAgIDIzCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9TUF9ETUVNX0VSUk9SX0JJVF9JRCAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfTU1VX0NBQ0hFX01FTV9FUlJPUl9CSVRfSUQgICAgICAgICAgICAgMjUKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQX1RJTUVSXzBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgIDI2CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUF9USU1FUl8xX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAyNworI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfU1dfUElOXzBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgMjgKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX1NXX1BJTl8xX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDI5CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9ETUFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfU1BfU1RSRUFNX01PTl9CX0JJVF9JRCAgICAgICAgICAgICAgICAgMzEKKworI2RlZmluZSBISVZFX0dQX1JFR1NfTlVNX1NXX0lSUV9SRUdTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKworLyogb3JkZXIgb2YgdGhlIGlucHV0IGJpdHMgZm9yIHRoZSB0aW1lZCBjb250cm9sbGVyICovCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzJfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzNfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzRfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzVfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzZfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzdfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzhfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzlfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzEwX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQSU9fUElOXzExX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX1NQX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lTUF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lTWVNfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lTRUxfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lGTVRfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQX1RJTUVSXzBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0dQX1RJTUVSXzFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgIDE4CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX01JUElfU09MX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDE5CisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX01JUElfRU9MX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX01JUElfU09GX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDIxCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX01JUElfRU9GX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIEhJVkVfR1BfREVWX1RDX0lOUFNZU19TTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzCisKKy8qIGRlZmluaXRpb25zIGZvciB0aGUgZ3BfdGltZXIgYmxvY2sgKi8KKyNkZWZpbmUgSElWRV9HUF9USU1FUl8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQX1RJTUVSXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9HUF9USU1FUl8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX0dQX1RJTUVSXzUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9HUF9USU1FUl82ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBISVZFX0dQX1RJTUVSX05VTV9DT1VOVEVSUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKworI2RlZmluZSBISVZFX0dQX1RJTUVSX0lSUV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JUlFfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfTlVNX0lSUVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT18wX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzJfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT18zX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fNF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzVfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT182X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fN19CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzhfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT185X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fMTBfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzExX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSU5QX1NZU19JUlEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTRUxfSVJRICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JRk1UX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfU1BfU1RSTU9OX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBISVZFX0dQX1RJTUVSX1NQX0JfU1RSTU9OX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfU1RSTU9OX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfTU9EX1NUUk1PTl9JUlEgICAgICAgICAgICAgICAgICAgICAgICAgICAxOAorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTMjQwMV9JUlEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTkKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfQkFNRU1fRVJST1JfSVJRICAgICAgICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX0RNRU1fRVJST1JfSVJRICAgICAgICAgICAgICAgICAgICAgICAyMQorI2RlZmluZSBISVZFX0dQX1RJTUVSX1NQX0lDQUNIRV9NRU1fRVJST1JfSVJRICAgICAgICAgICAgICAgICAgMjIKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9TUF9ETUVNX0VSUk9SX0lSUSAgICAgICAgICAgICAgICAgICAgICAgIDIzCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfU1BfT1VUX1JVTl9EUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBISVZFX0dQX1RJTUVSX1NQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0kwX0kwICAgICAgICAgMjUKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9TUF9XSVJFX0RFQlVHX0xNX01TSU5LX1JVTl9JMF9JMSAgICAgICAgIDI2CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfU1BfV0lSRV9ERUJVR19MTV9NU0lOS19SVU5fSTBfSTIgICAgICAgICAyNworI2RlZmluZSBISVZFX0dQX1RJTUVSX1NQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0kwX0kzICAgICAgICAgMjgKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9TUF9XSVJFX0RFQlVHX0xNX01TSU5LX1JVTl9JMF9JNCAgICAgICAgIDI5CisjZGVmaW5lIEhJVkVfR1BfVElNRVJ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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorI2RlZmluZSBISVZFX0dQX1RJTUVSX01JUElfU09MX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgNTUKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9NSVBJX0VPTF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgIDU2CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfTUlQSV9TT0ZfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICA1NworI2RlZmluZSBISVZFX0dQX1RJTUVSX01JUElfRU9GX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgNTgKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JTlBTWVNfU00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU5CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX1BNRU1fRVJST1JfSVJRICAgICAgICAgICAgICAgICAgICAgICA2MAorCisvKiBwb3J0IGRlZmluaXRpb25zIGZvciB0aGUgc3RyZWFtaW5nIG1vbml0b3JzICovCisvKiBwb3J0IGRlZmluaXRpdGlvbnMgU1Agc3RyZWFtaW5nIG1vbml0b3IsIG1vbml0b3JzIHRoZSBzdGF0dXMgb2Ygc3RyZWFtaW5nIHBvcnRzIGF0IHRoZSBTUCBzaWRlIG9mIHRoZSBzdHJlYW1pbmcgRklGTydzICovCisjZGVmaW5lIFNQX1NUUl9NT05fUE9SVF9TUDJTSUYgICAgICAgICAgICAwCisjZGVmaW5lIFNQX1NUUl9NT05fUE9SVF9TSUYyU1AgICAgICAgICAgICAxCisjZGVmaW5lIFNQX1NUUl9NT05fUE9SVF9TUDJNQyAgICAgICAgICAgICAyIAorI2RlZmluZSBTUF9TVFJfTU9OX1BPUlRfTUMyU1AgICAgICAgICAgICAgMworI2RlZmluZSBTUF9TVFJfTU9OX1BPUlRfU1AyRE1BICAgICAgICAgICAgNCAKKyNkZWZpbmUgU1B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GVmaW5lIE1PRF9TVFJfTU9OX1BPUlRfU05EX0RNQTJTUCAgICAgIDEwCisjZGVmaW5lIE1PRF9TVFJfTU9OX1BPUlRfUkNWX0RNQV9GUl9TUCAgIDExCisjZGVmaW5lIE1PRF9TVFJfTU9OX1BPUlRfU05EX0dEQyAgICAgICAgIDEyCisjZGVmaW5lIE1PRF9TVFJfTU9OX1BPUlRfUkNWX0dEQyAgICAgICAgIDEzCisKKworLyogdGVzdGJlbmNoIHNpZ25hbHM6ICAgICAgICovCisKKy8qIHRlc3RiZW5jaCBHUCBhZGFwdGVyIHJlZ2lzdGVyIGlkcyAgKi8KKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfR1BJT19EQVRBX09VVF9SRUdfSURYICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0dQSU9fRElSX09VVF9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9JUlFfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0RSQU1fV0FLRVVQX1JFR19JRFggICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0lETEVfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9HUElPX0RBVEFfSU5fUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfTUlQSV9CRk1fRU5fUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0NTSV9DT05GSUdfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBISVZFX1RFU1RCRU5DSF9ERFJfU1RBTExfRU5fUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgIDgKKworI2RlZmluZSBISVZFX1RFU1RCRU5DSF9JU1BfUE1FTV9FUlJPUl9JUlFfUkVHX0lEWCAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfSVNQX0JBTUVNX0VSUk9SX0lSUV9SRUdfSURYICAgICAgICAgICAgIDEwCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0lTUF9ETUVNX0VSUk9SX0lSUV9SRUdfSURYICAgICAgICAgICAgICAxMQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TUF9JQ0FDSEVfTUVNX0VSUk9SX0lSUV9SRUdfSURYICAgICAgICAgMTIKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU1BfRE1FTV9FUlJPUl9JUlFfUkVHX0lEWCAgICAgICAgICAgICAgIDEzCisKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfTUlQSV9QQVJQQVRIRU5fUkVHX0lEWCAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0ZCX0hQTExfRlJFUV9SRUdfSURYICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9JU0NMS19SQVRJT19SRUdfSURYICAgICAgICAgICAgICAgICAgICAgMTYKKworLyogU2lnbmFsIG1vbml0b3IgaW5wdXQgYml0IGlkcyAqLworI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOX09fQklUX0lEICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl8xX0JJVF9JRCAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fMl9CSVRfSUQgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOXzNfQklUX0lEICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl80X0JJVF9JRCAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fNV9CSVRfSUQgICAgICAgICAgICAgICAgNQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOXzZfQklUX0lEICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl83X0JJVF9JRCAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fOF9CSVRfSUQgICAgICAgICAgICAgICAgOAorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOXzlfQklUX0lEICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl8xMF9CSVRfSUQgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fMTFfQklUX0lEICAgICAgICAgICAgICAxMQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0lSUV9QSU5fQklUX0lEICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9TRFJBTV9XQUtFVVBfUElOX0JJVF9JRCAgICAgICAgIDEzCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fSURMRV9QSU5fQklUX0lEICAgICAgICAgICAgICAgICAxNAorCisjZGVmaW5lIElTUDI0MDBfREVCVUdfTkVUV09SSyAgICAxCisKKyNlbmRpZiAvKiBfaGl2ZV9pc3BfY3NzX2RlZnNfaF9fICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpb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TWU5DR0VOX05SX0ZSQU1FU19JRFggICAgICAgICAgICAgICAgIDMgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NZTkNHRU5fTlJfUElYX0lEWCAgICAgICAgICAgICAgICAgICAgNCAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TWU5DR0VOX05SX0xJTkVTX0lEWCAgICAgICAgICAgICAgICAgIDUgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1lOQ0dFTl9IQkxBTktfQ1lDTEVTX0lEWCAgICAgICAgICAgICA2ICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NZTkNHRU5fVkJMQU5LX0NZQ0xFU19JRFggICAgICAgICAgICAgNyAgICAgIAorCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NPRl9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfRU9GX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5IAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TT0xfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX0VPTF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMSAKKworI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19QUkJTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMTIgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfUFJCU19FTkFCTEVfUE9SVF9CICAgICAgICAgICAgICAgICAgIDEzICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1BSQlNfTEZTUl9SRVNFVF9WQUxVRSAgICAgICAgICAgICAgICAxNCAgICAgIAorCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAxNSAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfRU5BQkxFX1BPUlRfQiAgICAgICAgICAgICAgICAgICAgMTYgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX0hPUl9DTlRfTUFTS19JRFggICAgICAgICAgICAgICAgIDE3ICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19WRVJfQ05UX01BU0tfSURYICAgICAgICAgICAgICAgICAxOCAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfWFlfQ05UX01BU0tfSURYICAgICAgICAgICAgICAgICAgMTkgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX0hPUl9DTlRfREVMVEFfSURYICAgICAgICAgICAgICAgIDIwICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19WRVJfQ05UX0RFTFRBX0lEWCAgICAgICAgICAgICAgICAyMSAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfTU9ERV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMjIgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfUjFfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjMgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19HMV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfQjFfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjUKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX1IyX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2CisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19HMl9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAyNworI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfQjJfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjgKKworCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX0NIX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOQorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19GTVRfVFlQRV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMzAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfREFUQV9TRUxfSURYICAgICAgICAgICAgICAgICAgICAgICAgIDMxCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NCQU5EX1NFTF9JRFggICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TWU5DX1NFTF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMzMKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1JTVF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM3CisKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1JTVF9TWU5DR0VOX0JJVCAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NSU1RfUFJCU19CSVQgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TUlNUX1RQR19CSVQgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1JTVF9GSUZPX0JJVCAgICAgICAgICAgICAgICAgICAgICAgICAzCisKKy8qIGdwX3JlZ2lzdGVyIHJlZ2lzdGVyIGlkJ3MgLS0gSW5wdXRzICAgKi8KKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1lOQ0dFTl9IT1JfQ05UX0lEWCAgICAgICAgICAgICAgICAgIDM0CisjZ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RSTF9BQ1FfU1RBUlRfQUREUl9SRUdfV0lEVEggICAgICAgICAgICAgICA5IAorI2RlZmluZSBJU1lTX0NUUkxfQUNRX01FTV9SRUdJT05fU0laRV9SRUdfV0lEVEggICAgICAgICAgOSAKKyNkZWZpbmUgSVNZU19DVFJMX0FDUV9OVU1fTUVNX1JFR0lPTlNfUkVHX1dJRFRIICAgICAgICAgIDkgCisjZGVmaW5lIElTWVNfQ1RSTF9JTklUX1JFR19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAzIAorI2RlZmluZSBJU1lTX0NUUkxfTEFTVF9DT01NQU5EX1JFR19XSURUSCAgICAgICAgICAgICAgICAgMzIgICAgLyogc2xhdmUgZGF0YSB3aWR0aCAqLworI2RlZmluZSBJU1lTX0NUUkxfTkVYVF9DT01NQU5EX1JFR19XSURUSCAgICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgSVNZU19DVFJMX0xBU1RfQUNLTk9XTEVER0VfUkVHX1dJRFRIICAgICAgICAgICAgIDMyCisjZGVmaW5lIElTWVNfQ1RSTF9ORVhUX0FDS05PV0xFREdFX1JFR19XSURUSCAgICAgICAgICAgICAzMgorI2RlZmluZSBJU1lTX0NUUkxfRlNNX1NUQVRFX0lORk9fUkVHX1dJRFRIICAgICAgICAgICAgICAgMzIKKyNkZWZpbmUgSVNZU19DVFJMX0NBUFRfQV9GU01fU1RBVEVfSU5GT19SRUdfV0lEVEggICAgICAgIDMyCisjZGVmaW5lIElTWVNfQ1RSTF9DQVBUX0JfRlNNX1NUQVRFX0lORk9fUkVHX1dJRFRIICAgICAgICAzMgorI2RlZmluZSBJU1lTX0NUUkxfQ0FQVF9DX0ZTTV9TVEFURV9JTkZPX1JFR19XSURUSCAgICAgICAgMzIKKyNkZWZpbmUgSVNZU19DVFJMX0FDUV9GU01fU1RBVEVfSU5GT19SRUdfV0lEVEggICAgICAgICAgIDMyCisjZGVmaW5lIElTWVNfQ1RSTF9DQVBUX1JFU0VSVkVfT05FX01FTV9SR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DYXB0QworCitJbnBTeXNBY2tBRiAgMS8wICBbMzowXSAtICdiMDAxMAorSW5wU3lzQWNrT3ZlcnJ1bGVPTiAgMS8wICBbMzowXSAtICdiMDAxMSwgCitbNzo0XSAtIG92ZXJydWxlIHBvcnQgaWQgKG9waWQpCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBCisgICAgICAgICAgICdiMDAwMSAtIENhcHRCCisgICAgICAgICAgICdiMDAxMCAtIENhcHRDCisgICAgICAgICAgICdiMDAxMSAtIEFjcQorICAgICAgICAgICAnYjAxMDAgLSBETUEKKworCitJbnBTeXNBY2tPdmVycnVsZU9GRiAgMS8wICBbMzowXSAtICdiMDEwMCwgCitbNzo0XSAtIG92ZXJydWxlIHBvcnQgaWQgKG9waWQpCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBCisgICAgICAgICAgICdiMDAwMSAtIENhcHRCCisgICAgICAgICAgICdiMDAxMCAtIENhcHRDCisgICAgICAgICAgICdiMDAxMSAtIEFjcQorICAgICAgICAgICAnYjAxMDAgLSBETUEKKworCitJbnBTeXNBY2tPdmVycnVsZSAgMi8wICBbMzowXSAtICdiMDEwMSwgCitbNzo0XSAtIG92ZXJydWxlIHBvcnQgaWQgKG9waWQpCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBCisgICAgICAgICAgICdiMDAwMSAtIENhcHRCCisgICAgICAgICAgICdiMDAxMCAtIENhcHRDCisgICAgICAgICAgICdiMDAxMSAtIEFjcQorICAgICAgICAgICAnYjAxMDAgLSBETUEKKworCisgIDIvMSAgWzMxOjBdIC0gYWNrbm93bGVkZ2UgdG9rZW4gdmFsdWUgZnJvbSBwb3J0IG9waWQKKworCisKKyovCisKKworLyogQ29tbWFuZCBhbmQgYWNrbm93bGVkZ2UgdG9rZW5zIElEcyAqLworI2RlZmluZSBJU1lTX0NUUkxfQ0FQVF9GUkFNRVNfQUNRX1RPS0VOX0lEICAgICAgICAwIC8qIDAwMDBiICovCisjZGVmaW5lIElTWVNfQ1RSTF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qgc2VsZWN0IG1vZGVzICovCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19NVUxUSUNBU1RfQV9JRFggICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX01VTFRJQ0FTVF9CX0lEWCAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfTVVMVElDQVNUX0NfSURYICAgICAgICAgICAyCisKKy8qIFN0cmVhbSBNdXggc2VsZWN0IG1vZGVzICovCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19NVVhfSURYICAgICAgICAgICAgICAgICAgIDMKKworLyogc3RyZWFtaW5nIG1vbml0b3Igc3RhdHVzIGFuZCBjb250cm9sICovCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TVFJNT05fU1RBVF9JRFggICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX1NUUk1PTl9DT05EX0lEWCAgICAgICAgICAgNQorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfU1RSTU9OX0lSUV9FTl9JRFggICAgICAgICA2CisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TUlNUX0lEWCAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX1NMVl9SRUdfU1JTVF9JRFggICAgICAgICAgOAorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfUkVHX1BPUlRfQV9JRFggICAgICAgICAgICA5CisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19SRUdfUE9SVF9CX0lEWCAgICAgICAgICAgIDEwCisKKy8qIEJpdCBudW1iZXJzIG9mIHRoZSBzb2Z0IHJlc2V0IHJlZ2lzdGVyICovCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TUlNUX0NBUFRfRklGT19BX0JJVCAgICAgIDAKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX1NSU1RfQ0FQVF9GSUZPX0JfQklUICAgICAgMQorI2RlZmluZSBISVZ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W5lIEhJVkVfSVNZU19JUlFfSU5QX0NUUkxfQ0FQQyAgICAgICAgICAgMTUKKyNkZWZpbmUgSElWRV9JU1lTX0lSUV9DSU8yQUhCICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBISVZFX0lTWVNfSVJRX0RNQV9CSVRfSUQgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfSVNZU19JUlFfU1RSRUFNX01PTl9CSVRfSUQgICAgICAgMTgKKyNkZWZpbmUgSElWRV9JU1lTX0lSUV9OVU1fQklUUyAgICAgICAgICAgICAgICAxOQorCisvKiBETUEgKi8KKyNkZWZpbmUgSElWRV9JU1lTX0RNQV9DSEFOTkVMICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0lTWVNfRE1BX0lCVUZfRERSX0NPTk4gICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfSVNZU19ETUFfSEVJR0hUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9JU1lTX0RNQV9FTEVNUyAgICAgICAgICAgICAgICAgICAgMSAvKiBib3RoIG1hc3RlciBidXNlcyBvZiBzYW1lIHdpZHRoICovCisjZGVmaW5lIEhJVkVfSVNZU19ETUFfU1RSSURFICAgICAgICAgICAgICAgICAgIDAgLyogbm8gc3RyaWRlIHJlcXVpcmVkIGFzIGhlaWdodCBpcyBmaXhlZCB0byAxICovCisjZGVmaW5lIEhJVkVfSVNZU19ETUFfQ1JPUCAgICAgICAgICAgICAgICAgICAgIDAgLyogbm8gY3JvcHBpbmcgKi8KKyNkZWZpbmUgSElWRV9JU1lTX0RNQV9FWFRFTlNJT04gICAgICAgICAgICAgICAgMCAvKiBubyBleHRlbnNpb24gYXMgZWxlbSB3aWR0aCBpcyBzYW1lIG9uIGJvdGggc2lkZSAqLworCisjZW5kaWYgLyogX2lucHV0X3N5c3RlbV9kZWZzX2ggKi8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9hdG9taXNwL3B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gICAgICAgIDMyCisjZGVmaW5lIElTUF9CVVNfQUREUl9XSURUSCAgICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIElTUF9CVVNfQlVSU1RfU0laRSAgICAgICAgICAgICAgICAgICAgIDEKKworLyogZGF0YS1wYXRoICovCisjZGVmaW5lIElTUF9TQ0FMQVJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIElTUF9TTElDRV9ORUxFTVMgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSVNQX1ZFQ19ORUxFTVMgICAgICAgICAgICAgICAgICAgICAgICAgNjQKKyNkZWZpbmUgSVNQX1ZFQ19FTEVNQklUUyAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgSVNQX1ZFQ19FTEVNOEJJVFMgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSVNQX0NMT05FX0RBVEFQQVRIX0lTXzE2ICAgICAgICAgICAgICAgMQorCisvKiBtZW1vcmllcyAqLworI2RlZmluZSBJU1BfRE1FTV9ERVBUSCAgICAgICAgICAgICAgICAgICAgICAgICA0MDk2CisjZGVmaW5lIElTUF9ETUVNX0JTRUxfRE9XTlNBTVBMRSAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgSVNQX1ZNRU1fREVQVEggICAgICAgICAgICAgICAgICAgICAgICAgMzA3MgorI2RlZmluZSBJU1BfVk1FTV9CU0VMX0RPV05TQU1QTEUgICAgICAgICAgICAgICA4CisjZGVmaW5lIElTUF9WTUVNX0VMRU1CSVRTICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIElTUF9WTUVNX0VMRU1fUFJFQ0lTSU9OICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIElTUF9WTUVNX0lTX0JBTUVNICAgICAgICAgICAgICAgICAgICAgIDEKKyNpZiBJU1BfVk1FTV9JU19CQU1FTQorICAjZGVmaW5lIElTUF9WTUVNX0JBTUVNX01BWF9CT0lfSEV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U1BfVk1FTV9CQU1FTV9IQUxGX0JMT0NLX1dSSVRFICAgICAgMQorICAjZGVmaW5lIElTUF9WTUVNX0JBTUVNX1NNQVJUX0ZFVENIICAgICAgICAgICAxCisgICNkZWZpbmUgSVNQX1ZNRU1fQkFNRU1fQklHX0VORElBTk5FU1MgICAgICAgIDAKKyNlbmRpZiAvKiBJU1BfVk1FTV9JU19CQU1FTSAqLworI2RlZmluZSBJU1BfUE1FTV9ERVBUSCAgICAgICAgICAgICAgICAgICAgICAgICAyMDQ4CisjZGVmaW5lIElTUF9QTUVNX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDY0MAorI2RlZmluZSBJU1BfVkFNRU1fQUREUkVTU19CSVRTICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBJU1BfVkFNRU1fRUxFTUJJVFMgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBJU1BfVkFNRU1fREVQVEggICAgICAgICAgICAgICAgICAgICAgICAyMDQ4CisjZGVmaW5lIElTUF9WQU1FTV9BTElHTk1FTlQgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVNQX1ZBX0FERFJFU1NfV0lEVEggICAgICAgICAgICAgICAgICAgODk2CisjZGVmaW5lIElTUF9WRUNfVkFMU1VfTEFURU5DWSAgICAgICAgICAgICAgICAgIElTUF9WRUNfTkVMRU1TCisjZGVmaW5lIElTUF9ISVNUX0FERFJFU1NfQklUUyAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIElTUF9ISVNUX0FMSUdOTUVOVCAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSVNQX0hJU1RfQ09NUF9JTl9QUkVDICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSVNQX0hJU1RfREVQVEggICAgICAgICAgICAgICAgICAgICAgICAgMTAyNAorI2RlZmluZSBJU1BfSElTVF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBJU1BfSElTVF9DT01QT05FTlRTICAgICAgICAgICAgICAgICAgICA0CisKKy8qIHByb2dyYW0gY291bnRlciAqLworI2RlZmluZSBJU1BfUENfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAxMworCisvKiBUZW1wbGF0ZSBzd2l0Y2hlcyAqLworI2RlZmluZSBJU1BfU0hJRUxEX0lOUFVUX0RNRU0gICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9TSElFTERfT1VUUFVUX0RNRU0gICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX1NISUVMRF9JTlBVVF9WTUVNICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfU0hJRUxEX09VVFBVVF9WTUVNICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9TSElFTERfSU5QVVRfUE1FTSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX1NISUVMRF9PVVRQVVRfUE1FTSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfU0hJRUxEX0lOUFVUX0hJU1QgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TSElFTERfT1VUUFVUX0hJU1QgICAgICAgICAgICAgICAgIDEKKy8qIFdoZW4gTFVUIGlzIHNlbGVjdCB0aGUgc2hpZWxkaW5nIGlzIGFsd2F5cyBvbiAqLworI2RlZmluZSBJU1BfU0hJRUxEX0lOUFVUX1ZBTUVNICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TSElFTERfT1VUUFVUX1ZBTUVNICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJU1BfSEFTX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9IQVNfU09GVF9SRVNFVCAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU19WRUNfRElWICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX1ZGVV9XXzJPICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9IQVNfREVJTlQzICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU19MVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSEFTX0hJU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9IQVNfVkFMU1UgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU18zcmRWQUxTVSAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfVlJGMV9IQVNfMlAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSVNQX1NSVV9HVUFSRElORyAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfVkxTVV9HVUFSRElORyAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSVNQX1ZSRl9SQU0gICAgIAkgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TUkZfUkFNICAgICAJICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIElTUF9TUExJVF9WTVVMX1ZBRERfSVMgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX1JGU1BMSVRfRlBHQSAgICAgICAgICAgICAgICAgICAgICAgMAorCisvKiBSU04gb3IgQnVzIHBpcGVsaW5pbmcgKi8KKyNkZWZpbmUgSVNQX1JTTl9QSVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfVlNGX0JVU19QSVBFICAgICAgICAgICAgICAgICAgICAgICAwCisKKy8qIGV4dHJhIHNsYXZlIHBvcnQgdG8gdm1lbSAqLworI2RlZmluZSBJU1BfSUZfVk1FTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9HRENfVk1FTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKworLyogU3RyZWFtaW5nIHBvcnRzICovCisjZGVmaW5lIElTUF9JRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0lGX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfR0RDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TQ0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0dQRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKy8qIFJlbW92aW5nIElzc3VlIFNsb3QocykgKi8KKyNkZWZpbmUgSVNQX0hBU19OT1RfU0lNRF9JUzIgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTMyAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9IQVNfTk9UX1NJTURfSVM0ICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0hBU19OT1RfU0lNRF9JUzRfVkFERCAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTNSAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9IQVNfTk9UX1NJTURfSVM2ICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0hBU19OT1RfU0lNRF9JUzcgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTOCAgICAgICAgICAgICAgICAgICAwCisKKy8qIElDYWNoZSAgKi8KKyNkZWZpbmUgSVNQX0lDQUNIRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSUNBQ0hFX09OTFkgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9JQ0FDSEVfUFJFRkVUQ0ggICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0lDQUNIRV9JTkRFWF9CSVRTICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBJU1BfSUNBQ0hFX1NFVF9CSVRTICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIElTUF9JQ0FDSEVfQkxPQ0tTX1BFUl9TRVRfQklUUyAgICAgICAgIDEKKworLyogRXhwZXJpbWVudGFsIEZsYWdzICovCisjZGVmaW5lIElTUF9FWFBfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0VYUF8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfRVhQXzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9FWFBfNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0VYUF81ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfRVhQXzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisKKy8qIERlcml2ZWQgdmFsdWVzICovCisjZGVmaW5lIElTUF9MT0cyX1BNRU1fV0lEVEggICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIElTUF9WRUNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDg5NgorI2RlZmluZSBJU1BfU0xJQ0VfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICA1NgorI2RlZmluZSBJU1BfVk1FTV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICA4OTYKKyNkZWZpbmUgSVNQX1ZNRU1fQUxJR04gICAgICAgICAgICAgICAgICAgICAgICAgMTI4CisjaWYgSVNQX1ZNRU1fSVNfQkFNRU0KKyAgI2RlZmluZSBJU1BfVk1FTV9BTElHTl9FTEVNICAgICAgICAgICAgICAgICAgMgorI2VuZGlmIC8qIElTUF9WTUVNX0lTX0JBTUVNICovCisjZGVmaW5lIElTUF9TSU1ETFNVICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0xTVV9JTU1fQklUUyAgICAgICAgICAgICAgICAgICAgICAgMTIKKworLyogY29udmVuaWVudCBzaG9ydGN1dHMgZm9yIHNvZnR3YXJlKi8KKyNkZWZpbmUgSVNQX05XQVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSVNQX1ZFQ19ORUxFTVMKKyNkZWZpbmUgTkJJVFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSVNQX1ZFQ19FTEVNQklUUworCisjZGVmaW5lIF9pc3BfY2VpbF9kaXYoYSxiKSAgICAgICAgICAgICAgICAgICAgICgoKGEpKyhiKS0xKS8oYikpCisKKyNpZmRlZiBDX1JVTgorI2RlZmluZSBJU1BfVkVDX0FMSUdOICAgICAgICAgICAgICAgICAgICAgICAgICAoX2lzcF9jZWlsX2RpdihJU1BfVkVDX1dJRFRILCA2NCkqOCkKKyNlbHNlCisjZGVmaW5lIElTUF9WRUNfQUxJR04gICAgICAgICAgICAgICAgICAgICAgICAgIElTUF9WTUVNX0FMSUdOCisjZW5kaWYKKworLyogSFJUIHNwZWNpZmljIHZlY3RvciBzdXBwb3J0ICovCisjZGVmaW5lIGlzcDI0MDFfbWFtb2lhZGFfdmVjdG9yX2FsaWdubWVudCAgICAgICAgIElTUF9WRUNfQUxJR04KKyNkZWZpbmUgaXNwMjQwMV9tYW1vaWFkYV92ZWN0b3JfZWxlbV9iaXRzICAgICAgICAgSVNQX1ZNRU1fRUxFTUJJVFMKKyNkZWZpbmUgaXNwMjQwMV9tYW1vaWFkYV92ZWN0b3JfZWxlbV9wcmVjaXNpb24gICAgSVNQX1ZNRU1fRUxFTV9QUkVDSVNJT04KKyNkZWZpbmUgaXNwMjQwMV9tYW1vaWFkYV92ZWN0b3JfbnVtX2VsZW1zICAgICAgICAgSVNQX1ZFQ19ORUxFTVMKKworLyogcmVnaXN0ZXIgZmlsZSBzaX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NX01FTV9SRUdJT05TX1JFR19JRCAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFDUV9JTklUX1JFR19JRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgCisjZGVmaW5lIEFDUV9SRUNFSVZFRF9TSE9SVF9QQUNLRVRTX1JFR19JRCAgICAgICAgIDQKKyNkZWZpbmUgQUNRX1JFQ0VJVkVEX0xPTkdfUEFDS0VUU19SRUdfSUQgICAgICAgICAgNQorI2RlZmluZSBBQ1FfTEFTVF9DT01NQU5EX1JFR19JRCAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEFDUV9ORVhUX0NPTU1BTkRfUkVHX0lEICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgQUNRX0xBU1RfQUNLTk9XTEVER0VfUkVHX0lEICAgICAgICAgICAgICAgOAorI2RlZmluZSBBQ1FfTkVYVF9BQ0tOT1dMRURHRV9SRUdfSUQgICAgICAgICAgICAgICA5CisjZGVmaW5lIEFDUV9GU01fU1RBVEVfSU5GT19SRUdfSUQgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEFDUV9JTlRfQ05UUl9JTkZPX1JFR19JRCAgICAgICAgICAgICAgICAgIDExCisgCisvLyBSZWdpc3RlciB3aWR0aAorI2RlZmluZSBBQ1FfU1RBUlRfQUREUl9SRUdfV0lEVEggICAgICAgICAgICAgICAgICA5ICAgICAgICAgICAgICAgCisjZGVmaW5lIEFDUV9NRU1fUkVHSU9OX1NJWkVfUkVHX1dJRFRIICAgICAgICAgICAgIDkgIAorI2RlZmluZSBBQ1FfTlVNX01FTV9SRUdJT05TX1JFR19XSURUSCAgICAgICAgICAgICA5ICAKKyNkZWZpbmUgQUNRX0lOSVRfUkVHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgMyAgCisjZGVmaW5lIEFDUV9SRUNFSVZFRF9TSE9SVF9QQUNLRVRTX1JFR19XSURUSCAgICAgIDMyIAorI2RlZmluZSBBQ1FfUkVDRUlWRURfTE9OR19QQUNLRVRTX1JFR19XSURUSCAgICAgICAzMiAgCisjZGVmaW5lIEFDUV9MQVNUX0NPTU1BTkRfUkVHX1dJRFRIICAgICAgICAgICAgICAgIDMyICAKKyNkZWZpbmUgQUNRX05FWFRfQ09NTUFORF9SRUdfV0lEVEggICAgICAgICAgICAgICAgMzIgIAorI2RlZmluZSBBQ1FfTEFTVF9BQ0tOT1dMRURHRV9SRUdfV0lEVEggICAgICAgICAgICAzMiAgCisjZGVmaW5lIEFDUV9ORVhUX0FDS05PV0xFREdFX1JFR19XSURUSCAgICAgICAgICAgIDMyICAKKyNkZWZpbmUgQUNRX0ZTTV9TVEFURV9JTkZPX1JFR19XSURUSCAgICAgICAgICAgICAgKChNRU0yU1RSRUFNX0ZTTV9TVEFURV9CSVRTICogMykgKyAoQUNRX1NZTkNIUk9OSVpFUl9GU01fU1RBVEVfQklUUyAqMykpCisjZGVmaW5lIEFDUV9JTlRfQ05UUl9JTkZPX1JFR19XSURUSCAgICAgICAgICAgICAgIDMyCisKKy8qIHJlZ2lzdGVyIHJlc2V0IHZhbHVlICovCisjZGVmaW5lIEFDUV9TVEFSVF9BRERSX1JFR19SU1RWQUwgICAgICAgICAgICAgICAgIDAgICAgICAgICAgICAgIAorI2RlZmluZSBBQ1FfTUVNX1JFR0lPTl9TSVpFX1JFR19SU1RWQUwgICAgICAgICAgICAxMjgKKyNkZWZpbmUgQUNRX05VTV9NRU1fUkVHSU9OU19SRUdfUlNUVkFMICAgICAgICAgICAgMworI2RlZmluZSBBQ1FfSU5JVF9SRUdfUlNUVkFMICAgICAgICAgICAgICAgICAgICAgICAwICAgICAgICAgICAgICAgICAgICAgICAgICAgCisjZGVmaW5lIEFDUV9SRUNFSVZFRF9TSE9SVF9QQUNLRVRTX1JFR19SU1RWQUwgICAgIDAKKyNkZWZpbmUgQUNRX1JFQ0VJVkVEX0xPTkdfUEFDS0VUU19SRUdfUlNUVkFMICAgICAgMAorI2RlZmluZSBBQ1FfTEFTVF9DT01NQU5EX1JFR19SU1RWQUwgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUV9ORVhUX0NPTU1BTkRfUkVHX1JTVFZBTCAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNRX0xBU1RfQUNLTk9XTEVER0VfUkVHX1JTVFZBTCAgICAgICAgICAgMAorI2RlZmluZSBBQ1FfTkVYVF9BQ0tOT1dMRURHRV9SRUdfUlNUVkFMICAgICAgICAgICAwIAorI2RlZmluZSBBQ1FfRlNNX1NUQVRFX0lORk9fUkVHX1JTVFZBTCAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUV9JTlRfQ05UUl9JTkZPX1JFR19SU1RWQUwgICAgICAgICAgICAgIDAgCisKKy8qIGJpdCBkZWZpbml0aW9ucyAqLworI2RlZmluZSBBQ1FfSU5JVF9SU1RfUkVHX0JJVCAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUV9JTklUX1JFU1lOQ19CSVQgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQUNRX0lOSVRfUlNUX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgQUNRX0lOSVRfUlNUX1JFR19CSVQKKyNkZWZpbmUgQUNRX0lOSVRfUlNUX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBQ1FfSU5JVF9SRVNZTkNfSURYICAgICAgICAgICAgICAgICAgICAgICBBQ1FfSU5JVF9SRVNZTkNfQklUCisjZGVmaW5lIEFDUV9JTklUX1JFU1lOQ19CSVRTICAgICAgICAgICAgICAgICAgICAgIDEKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogVE9LRU4gSU5GTyAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworI2RlZmluZSBBQ1FfVE9LRU5fSURfTFNCICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUV9UT0tFTl9JRF9NU0IgICAgICAgICAgICAgICAgICAgICAgICAgIDMgICAgICAgICAgICAKKyNkZWZpbmUgQUNRX1RPS0VOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgKEFDUV9UT0tFTl9JRF9NU0IgLSBBQ1FfVE9LRU5fSURfTFNCICArIDEpIC8vIDQKKyNkZWZpbmUgQUNRX1RPS0VOX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1FfVE9LRU5fSURfQklUUyAgICAgICAgICAgICAgICAgICAgICAgICBBQ1FfVE9LRU5fV0lEVEgKKyNkZWZpbmUgQUNRX0lOSVRfQ01EX0lOSVRfSURYICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBBQ1FfSU5JVF9DTURfSU5JVF9CSVRTICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEFDUV9DTURfU1RBUlRfQUREUl9JRFggICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQUNRX0NNRF9TVEFSVF9BRERSX0JJVFMgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBBQ1FfQ01EX05PRldPUkRTX0lEWCAgICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBBQ1FfQ01EX05PRldPUkRTX0JJVFMgICAgICAgICAgICAgICAgICAgICA5ICAKKyNkZWZpbmUgQUNRX01FTV9SRUdJT05fSURfSURYICAgICAgICAgICAgICAgICAgICAgMjIKKyNkZWZpbmUgQUNRX01FTV9SRUdJT05fSURfQklUUyAgICAgICAgICAgICAgICAgICAgOSAKKyNkZWZpbmUgQUNRX1BBQ0tFVF9MRU5HVEhfVE9LRU5fTVNCICAgICAgICAgICAgICAgMjEKKyNkZWZpbmUgQUNRX1BBQ0tFVF9MRU5HVEhfVE9LRU5fTFNCICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgQUNRX1BBQ0tFVF9EQVRBX0ZPU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R0lPTl9UT0tFTl9JRCAgICAgICAgICAgICAgICA1IC8vMDEwMWIKKyNkZWZpbmUgQUNRX1NPUF9NSVNNQVRDSF9UT0tFTl9JRCAgICAgICAgICAgICAgICAgNiAvLzAxMTBiCisjZGVmaW5lIEFDUV9VTkRFRl9QSF9UT0tFTl9JRCAgICAgICAgICAgICAgICAgICAgIDcgLy8wMTExYgorCisjZGVmaW5lIEFDUV9UT0tFTl9NRU1SRUdJT05JRF9NU0IgICAgICAgICAgICAgICAgIDMwCisjZGVmaW5lIEFDUV9UT0tFTl9NRU1SRUdJT05JRF9MU0IgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIEFDUV9UT0tFTl9OT0ZXT1JEU19NU0IgICAgICAgICAgICAgICAgICAgIDIxCisjZGVmaW5lIEFDUV9UT0tFTl9OT0ZXT1JEU19MU0IgICAgICAgICAgICAgICAgICAgIDEzCisjZGVmaW5lIEFDUV9UT0tFTl9TVEFSVEFERFJfTVNCICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEFDUV9UT0tFTl9TVEFSVEFERFJfTFNCICAgICAgICAgICAgICAgICAgIDQgIAorCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIE1JUEkgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworI2RlZmluZSBXT1JEX0NPVU5UX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBQS1RfQ09ERV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICA2ICAgICAgICAgICAgCisjZGVmaW5lIENITl9OT19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgIAorI2RlZmluZSBFUlJPUl9JTkZPX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA4CisgIAorI2RlZmluZSBMT05HX1BLVENPREVfTUFYICAgICAgICAgICAgICAgICAgICAgICAgICA2MworI2RlZmluZSBMT05HX1BLVENPREVfTUlOICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSE9SVF9QS1RDT0RFX01BWCAgICAgICAgICAgICAgICAgICAgICAgICAxNQorCisjZGVmaW5lIEVPRl9DT0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogUGFja2V0IEluZm8gKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKyNkZWZpbmUgQUNRX1NUQVJUX09GX0ZSQU1FICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1FfRU5EX09GX0ZSQU1FICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFDUV9TVEFSVF9PRl9MSU5FICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQUNRX0VORF9PRl9MSU5FICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBQ1FfTElORV9QQVlMT0FEICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEFDUV9HRU5fU0hfUEtUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKworCisvKiBiaXQgZGVmaW5pdGlvbiAqLworI2RlZmluZSBBQ1FfUEtUX1RZUEVfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBQ1FfUEtUX1RZUEVfQklUUyAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEFDUV9QS1RfU09QX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIEFDUV9XT1JEX0NOVF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNRX1dPUkRfQ05UX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQUNRX1BLVF9JTkZPX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQUNRX1BLVF9JTkZPX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBBQ1FfSEVBREVSX0RBVEFfSURYICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUV9IRUFERVJfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFDUV9BQ0tfVE9LRU5fSURfSURYICAgICAgICAgICAgICAgICAgICAgIEFDUV9UT0tFTl9JRF9JRFgKKyNkZWZpbmUgQUNRX0FDS19UT0tFTl9JRF9CSVRTICAgICAgICAgICAgICAgICAgICAgQUNRX1RPS0VOX0lEX0JJVFMKKyNkZWZpbmUgQUNRX0FDS19OT0ZXT1JEU19JRFggICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgQUNRX0FDS19OT0ZXT1JEU19CSVRTICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBBQ1FfQUNLX1BLVF9MRU5fSURYICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEFDUV9BQ0tfUEtUX0xFTl9CSVRTICAgICAgICAgICAgICAgICAgICAgIDE2CisKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogUGFja2V0IERhdGEgVHlwZSAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKKyNkZWZpbmUgQUNRX1lVVjQyMF84X0RBVEEgICAgICAgICAgICAgICAgICAgICAgIDI0ICAgLyogMDEgMTAwMCBZVVY0MjAgOC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1lVVjQyMF8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDI1ICAgLyogMDEgMTAwMSAgWVVWNDIwIDEwLWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1lVVjQyMF84TF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDI2ICAgLyogMDEgMTAxMCAgIFlVVjQyMCA4LWJpdCBsZWdhY3kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1lVVjQyMl84X0RBVEEgICAgICAgICAgICAgICAgICAgICAgIDMwICAgLyogMDEgMTExMCAgIFlVVjQyMiA4LWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1lVVjQyMl8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDMxICAgLyogMDEgMTExMSAgIFlVVjQyMiAxMC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JHQjQ0NF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDMyICAgLyogMTAgMDAwMCAgIFJHQjQ0NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JHQjU1NV9EQVRBICAgICAgICAgICAgICAJCQkJCSAzMyAgIC8qIDEwIDAwMDEgICBSR0I1NTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SR0I1NjVfREFUQSAgICAgICAgICAgICAgCQkJCQkgMzQgICAvKiAxMCAwMDEwICAgUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkdCNjY2X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDM1ICAgLyogMTAgMDAxMSAgIFJHQjY2NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JHQjg4OF9EQVRBICAgICAgICAgICAgICAJCQkJCSAzNiAgIC8qIDEwIDAxMDAgICBSR0I4ODggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SQVc2X0RBVEEgICAgICAgICAgICAgICAgCQkJCQkgNDAgICAvKiAxMCAxMDAwICAgUkFXNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkFXN19EQVRBICAgICAgICAgICAgICAgIAkJCQkJIDQxICAgLyogMTAgMTAwMSAgIFJBVzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JBVzhfREFUQSAgICAgICAgICAgICAgICAJCQkJCSA0MiAgIC8qIDEwIDEwMTAgICBSQVc4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SQVcxMF9EQVRBICAgICAgICAgICAgICAgCQkJCQkgNDMgICAvKiAxMCAxMDExICAgUkFXMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkFXMTJfREFUQSAgICAgICAgICAgICAgIAkJCQkJIDQ0ICAgLyogMTAgMTEwMCAgIFJBVzEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JBVzE0X0RBVEEgICAgICAgICAgICAgICAJCQkJCSA0NSAgIC8qIDEwIDExMDEgICBSQVcxNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9VU1JfREVGXzFfREFUQSAgICAgICAgICAgCQkJCQkgNDggICAvKiAxMSAwMDAwICAgIEpQRUcgW1VzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgMV0gICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl8yX0RBVEEgICAgICAgICAgIAkJCQkJIDQ5ICAgLyogMTEgMDAwMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDIgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1VTUl9ERUZfM19EQVRBICAgICAgICAgICAJCQkJCSA1MCAgIC8qIDExIDAwMTAgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSAzICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9VU1JfREVGXzRfREFUQSAgICAgICAgICAgCQkJCQkgNTEgICAvKiAxMSAwMDExICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNCAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl81X0RBVEEgICAgICAgICAgIAkJCQkJIDUyICAgLyogMTEgMDEwMCAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDUgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1VTUl9ERUZfNl9EQVRBICAgICAgICAgICAJCQkJCSA1MyAgIC8qIDExIDAxMDEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA2ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9VU1JfREVGXzdfREFUQSAgICAgICAgICAgCQkJCQkgNTQgICAvKiAxMSAwMTEwICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNyAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl84X0RBVEEgICAgICAgICAgIAkJCQkJIDU1ICAgLyogMTEgMDExMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDggICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX0VtYl9EQVRBICAgICAgICAgICAgICAgICAJCQkJCSAxOCAgIC8qIDAxIDAwMTAgICAgZW1iZWRkZWQgZWlnaHQgYml0IG5vbiBpbWFnZSBkYXRhICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9TT0ZfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMCAgIC8qIDAwIDAwMDAgICAgZnJhbWUgc3RhcnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9FT0ZfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMSAgIC8qIDAwIDAwMDEgICAgZnJhbWUgZW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9TT0xfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMiAgIC8qIDAwIDAwMTAgICAgbGluZSBzdGFydCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9FT0xfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMyAgIC8qIDAwIDAwMTEgICAgbGluZSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0gxX0RBVEEgICAgICAgICAgICAgCQkJCQkgOCAgIC8qIDAwIDEwMDAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMSAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0gyX0RBVEEgICAgICAgICAgICAgCQkJCQkgOSAgIC8qIDAwIDEwMDEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSAyICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0gzX0RBVEEgICAgICAgICAgICAgCQkJCQkgMTAgICAvKiAwMCAxMDEwICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMyAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfR0VOX1NINF9EQVRBICAgICAgICAgICAgIAkJCQkJIDExICAgLyogMDAgMTAxMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDQgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX0dFTl9TSDVfREFUQSAgICAgICAgICAgICAJCQkJCSAxMiAgIC8qIDAwIDExMDAgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA1ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0g2X0RBVEEgICAgICAgICAgICAgCQkJCQkgMTMgICAvKiAwMCAxMTAxICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgNiAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfR0VOX1NIN19EQVRBICAgICAgICAgICAgIAkJCQkJIDE0ICAgLyogMDAgMTExMCAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDcgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX0dFTl9TSDhfREFUQSAgICAgICAgICAgICAJCQkJCSAxNSAgIC8qIDAwIDExMTEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA4ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9ZVVY0MjBfOF9DU1BTX0RBVEEgICAgICAgCQkJCQkgMjggICAvKiAwMSAxMTAwICAgWVVWNDIwIDgtYml0IChDaHJvbWEgU2hpZnRlZCBQaXhlbCBTYW1wbGluZykgICAgICAqLworI2RlZmluZSBBQ1FfWVVWNDIwXzEwX0NTUFNfREFUQSAgICAgIAkJCQkJIDI5ICAgLyogMDEgMTEwMSAgIFlVVjQyMCAxMC1i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2lzcF9jYXB0dXJlX2RlZnNfaAorCisjZGVmaW5lIF9JU1BfQ0FQVFVSRV9SRUdfQUxJR04gICAgICAgICAgICAgICAgICAgIDQgIC8qIGFzc3VtaW5nIDMyIGJpdCBjb250cm9sIGJ1cyB3aWR0aCAqLworI2RlZmluZSBfSVNQX0NBUFRVUkVfQklUU19QRVJfRUxFTSAgICAgICAgICAgICAgICAzMiAgLyogb25seSBmb3IgZGF0YSwgbm90IFNPUCAqLwkJCQkJCSAgICAgICAgICAgCisjZGVmaW5lIF9JU1BfQ0FQVFVSRV9CWVRFU19QRVJfRUxFTSAgICAgICAgICAgICAgIChfSVNQX0NBUFRVUkVfQklUU19QRVJfRUxFTS84CSkJCQkJICAgICAgICAgICAKKyNkZWZpbmUgX0lTUF9DQVBUVVJFX0JZVEVTX1BFUl9XT1JEICAgICAgICAgICAgICAgMzIJCS8qIDI1Ni84ICovCQorI2RlZmluZSBfSVNQX0NBUFRVUkVfRUxFTV9QRVJfV09SRCAgICAgICAgICAgICAgICBfSVNQX0NBUFRVUkVfQllURVNfUEVSX1dPUkQgLyBfSVNQX0NBUFRVUkVfQllURVNfUEVSX0VMRU0JCSAgICAgICAgICAgCisKKy8vI2RlZmluZSBDQVBUX1JDVl9BQ0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisvLyNkZWZpbmUgQ0FQVF9XUlRfQUNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgICAgICAgICAgICAgIAorLy8jZGVmaW5lIENBUFRfSVJRX0FDSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgICAgICAgICAgICAgICAgICAgICAgICAKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisjZGVmaW5lIE5PRl9JUlFTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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X0xBU1RfQ09NTUFORF9SRUdfSUQgICAgICAgICAgICAgICAgICAxMSAgICAgICAgCisjZGVmaW5lIENBUFRfTkVYVF9DT01NQU5EX1JFR19JRCAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIENBUFRfTEFTVF9BQ0tOT1dMRURHRV9SRUdfSUQgICAgICAgICAgICAgIDEzCisjZGVmaW5lIENBUFRfTkVYVF9BQ0tOT1dMRURHRV9SRUdfSUQgICAgICAgICAgICAgIDE0CisjZGVmaW5lIENBUFRfRlNNX1NUQVRFX0lORk9fUkVHX0lEICAgICAgICAgICAgICAgIDE1CisKKy8vIFJlZ2lzdGVyIHdpZHRoCisjZGVmaW5lIENBUFRfU1RBUlRfTU9ERV9SRUdfV0lEVEggICAgICAgICAgICAgICAgIDEgCisvLyNkZWZpbmUgQ0FQVF9TVEFSVF9BRERSX1JFR19XSURUSCAgICAgICAgICAgICAgICAgOQorLy8jZGVmaW5lIENBUFRfTUVNX1JFR0lPTl9TSVpFX1JFR19XSURUSCAgICAgICAgICAgIDkKKy8vI2RlZmluZSBDQVBUX05VTV9NRU1fUkVHSU9OU19SRUdfV0lEVEggICAgICAgICAgICA5CisjZGVmaW5lIENBUFRfSU5JVF9SRUdfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICgyMiArIDQpCisKKyNkZWZpbmUgQ0FQVF9TVEFSVF9SRUdfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX1NUT1BfUkVHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIEZTTSAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworI2RlZmluZSBDQVBUX1dSSVRFMk1FTV9GU01fU1RBVEVfQklUUyAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfU1lOQ0hST05JWkVSX0ZTTV9TVEFURV9CSVRTICAgICAgICAgIDMKKworCisjZGVmaW5lIENBUFRfUEFDS0VUX0xFTkdUSF9SRUdfV0lEVEggICAgICAgICAgICAgIDE3CisjZGVmaW5lIENBUFRfUkVDRUlWRURfTEVOR1RIX1JFR19XSURUSCAgICAgICAgICAgIDE3ICAgCisjZGVmaW5lIENBUFRfUkVDRUlWRURfU0hPUlRfUEFDS0VUU19SRUdfV0lEVEggICAgIDMyCisjZGVmaW5lIENBUFRfUkVDRUlWRURfTE9OR19QQUNLRVRTX1JFR19XSURUSCAgICAgIDMyCisjZGVmaW5lIENBUFRfTEFTVF9DT01NQU5EX1JFR19XSURUSCAgICAgICAgICAgICAgIDMyCisvKiAjZGVmaW5lIENBUFRfTkVYVF9DT01NQU5EX1JFR19XSURUSCAgICAgICAgICAgICAgIDMyICovICAKKyNkZWZpbmUgQ0FQVF9MQVNUX0FDS05PV0xFREdFX1JFR19XSURUSCAgICAgICAgICAgMzIKKyNkZWZpbmUgQ0FQVF9ORVhUX0FDS05PV0xFREdFX1JFR19XSURUSCAgICAgICAgICAgMzIKKyNkZWZpbmUgQ0FQVF9GU01fU1RBVEVfSU5GT19SRUdfV0lEVEggICAgICAgICAgICAgKChDQVBUX1dSSVRFMk1FTV9GU01fU1RBVEVfQklUUyAqIDMpICsgKENBUFRfU1lOQ0hST05JWkVSX0ZTTV9TVEFURV9CSVRTICogMykpCisKKy8vI2RlZmluZSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fQUREUl9XSURUSCAgICAgICAgICA5ICAgCisvLyNkZWZpbmUgQ0FQVF9JTklUX1JFU1RBUlRfTUVNX1JFR0lPTl9XSURUSCAgICAgICAgOSAKKworLyogcmVnaXN0ZXIgcmVzZXQgdmFsdWUgKi8KKyNkZWZpbmUgQ0FQVF9TVEFSVF9NT0RFX1JFR19SU1RWQUwgICAgICAgICAgICAgICAgMCAgIAorI2RlZmluZSBDQVBUX1NUQVJUX0FERFJfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfTUVNX1JFR0lPTl9TSVpFX1JFR19SU1RWQUwgICAgICAgICAgIDEyOAorI2RlZmluZSBDQVBUX05VTV9NRU1fUkVHSU9OU19SRUdfUlNUVkFMICAgICAgICAgICAzIAorI2RlZmluZSBDQVBUX0lOSVRfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQ0FQVF9TVEFSVF9SRUdfUlNUVkFMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1NUT1BfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQ0FQVF9QQUNLRVRfTEVOR1RIX1JFR19SU1RWQUwgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1JFQ0VJVkVEX0xFTkdUSF9SRUdfUlNUVkFMICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfUkVDRUlWRURfU0hPUlRfUEFDS0VUU19SRUdfUlNUVkFMICAgIDAKKyNkZWZpbmUgQ0FQVF9SRUNFSVZFRF9MT05HX1BBQ0tFVFNfUkVHX1JTVFZBTCAgICAgMAorI2RlZmluZSBDQVBUX0xBU1RfQ09NTUFORF9SRUdfUlNUVkFMICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfTkVYVF9DT01NQU5EX1JFR19SU1RWQUwgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9MQVNUX0FDS05PV0xFREdFX1JFR19SU1RWQUwgICAgICAgICAgMAorI2RlZmluZSBDQVBUX05FWFRfQUNLTk9XTEVER0VfUkVHX1JTVFZBTCAgICAgICAgICAwCisjZGVmaW5lIENBUFRfRlNNX1NUQVRFX0lORk9fUkVHX1JTVFZBTCAgICAgICAgICAgIDAKKworLyogYml0IGRlZmluaXRpb25zICovCisjZGVmaW5lIENBUFRfSU5JVF9SU1RfUkVHX0JJVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9JTklUX0ZMVVNIX0JJVCAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX0lOSVRfUkVTWU5DX0JJVCAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfSU5JVF9SRVNUQVJUX0JJVCAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ0FQVF9JTklUX1JFU1RBUlRfTUVNX0FERFJfTFNCICAgICAgICAgICAgNAorI2RlZmluZSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fQUREUl9NU0IgICAgICAgICAgICAxNAorI2RlZmluZSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fUkVHSU9OX0xTQiAgICAgICAgICAxNQorI2RlZmluZSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fUkVHSU9OX01TQiAgICAgICAgICAyNQorCisKKyNkZWZpbmUgQ0FQVF9JTklUX1JTVF9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgQ0FQVF9JTklUX1JTVF9SRUdfQklUCisjZGVmaW5lIENBUFRfSU5JVF9SU1RfUkVHX0JJVFMgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ0FQVF9JTklUX0ZMVVNIX0lEWCAgICAgICAgICAgICAgICAgICAgICAgQ0FQVF9JTklUX0ZMVVNIX0JJVAorI2RlZmluZSBDQVBUX0lOSVRfRkxVU0hfQklUUyAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENBUFRfSU5JVF9SRVNZTkNfSURYICAgICAgICAgICAgICAgICAgICAgIENBUFRfSU5JVF9SRVNZTkNfQklUCisjZGVmaW5lIENBUFRfSU5JVF9SRVNZTkNfQklUUyAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ0FQVF9JTklUX1JFU1RBUlRfSURYICAgICAgICAgICAgICAgICAgICAgQ0FQVF9JTklUX1JFU1RBUlRfQklUCisjZGVmaW5lI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SURzICovCisjZGVmaW5lIENBUFRfU1RBUlRfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgIDAgLyogMDAwMGIgKi8KKyNkZWZpbmUgQ0FQVF9TVE9QX1RPS0VOX0lEICAgICAgICAgICAgICAgICAgICAgICAgMSAvKiAwMDAxYiAqLworI2RlZmluZSBDQVBUX0ZSRUVaRV9UT0tFTl9JRCAgICAgICAgICAgICAgICAgICAgICAyIC8qIDAwMTBiICovICAKKyNkZWZpbmUgQ0FQVF9SRVNVTUVfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgMyAvKiAwMDExYiAqLworI2RlZmluZSBDQVBUX0lOSVRfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgICA4IC8qIDEwMDBiICovCisKKyNkZWZpbmUgQ0FQVF9TVEFSVF9UT0tFTl9CSVQgICAgICAgICAgICAgICAgICAgICAgMCAgICAgIAorI2RlZmluZSBDQVBUX1NUT1BfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfRlJFRVpFX1RPS0VOX0JJVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9SRVNVTUVfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX0lOSVRfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgICAwCisKKy8qIEFja25vd2xlZGdlIHRva2VuIElEcyAqLworI2RlZmluZSBDQVBUX0VORF9PRl9QQUNLRVRfUkVDRUlWRURfVE9LRU5fSUQgICAgICAwIC8qIDAwMDBiICovCisjZGVmaW5lIENBUFRfRU5EX09GX1BBQ0tFVF9XUklUVEVOX1RPS0VOX0lEICAgICAgIDEgLyogMDAwMWIgKi8KKyNkZWZpbmUgQ0FQVF9FTkRfT0ZfUkVHSU9OX1dSSVRURU5fVE9LRU5fSUQgICAgICAgMiAvKiAwMDEwYiAqLworI2RlZmluZSBDQVBUX0ZMVVNIX0RPTkVf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EJCQorCisvKiAgYml0IGRlZmluaXRpb24gKi8KKyNkZWZpbmUgQ0FQVF9DTURfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ0FQVF9UT0tFTl9JRF9MU0IKKyNkZWZpbmUJQ0FQVF9DTURfQklUUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKENBUFRfVE9LRU5fSURfTVNCIC0gQ0FQVF9UT0tFTl9JRF9MU0IgKyAxKQorI2RlZmluZSBDQVBUX1NPUF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBDQVBUX1NPUF9CSVRTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENBUFRfUEtUX0lORk9fSURYICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIENBUFRfUEtUX0lORk9fQklUUyAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQ0FQVF9QS1RfVFlQRV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1BLVF9UWVBFX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIENBUFRfSEVBREVSX0RBVEFfSURYICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9IRUFERVJfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQ0FQVF9QS1RfREFUQV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1BLVF9EQVRBX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBDQVBUX1dPUkRfQ05UX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfV09SRF9DTlRfQklUUyAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIENBUFRfQUNLX1RPS0VOX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgIDAKK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TklUX0lEWCAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQ0FQVF9JTklUX1RPS0VOX0lOSVRfQklUUyAgICAgICAgICAgICAgICAgMjIKKworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvKiBNSVBJICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKyNkZWZpbmUgQ0FQVF9XT1JEX0NPVU5UX1dJRFRIICAgICAgICAgICAgICAgICAgICAgMTYgICAgICAKKyNkZWZpbmUgQ0FQVF9QS1RfQ09ERV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgNiAgICAgICAgICAgICAgICAgIAorI2RlZmluZSBDQVBUX0NITl9OT19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAyICAgICAgICAKKyNkZWZpbmUgQ0FQVF9FUlJPUl9JTkZPX1dJRFRIICAgICAgICAgICAgICAgICAgICAgOCAgICAgICAKKworI2RlZmluZSBMT05HX1BLVENPREVfTUFYICAgICAgICAgICAgICAgICAgICAgICAgICA2MworI2RlZmluZSBMT05HX1BLVENPREVfTUlOICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSE9SVF9QS1RDT0RFX01BWCAgICAgICAgICAgICAgICAgICAgICAgICAxNQorCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIFBhY2tldCBJbmZvICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjZGVmaW5lIENBUFRfU1RBUlRfT0ZfRlJBTUUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9FTkRfT0ZfRlJBTUUgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX1NUQVJUX09GX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfRU5EX09GX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ0FQVF9MSU5FX1BBWUxPQUQgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBDQVBUX0dFTl9TSF9QS1QgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogUGFja2V0IERhdGEgVHlwZSAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisjZGVmaW5lIENBUFRfWVVWNDIwXzhfREFUQSAgICAgICAgICAgICAgICAgICAgICAgMjQgICAvKiAwMSAxMDAwIFlVVjQyMCA4LWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1lVVjQyMF8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDI1ICAgLyogMDEgMTAwMSAgWVVWNDIwIDEwLWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9ZVVY0MjBfOExfREFUQSAgICAgICAgICAgICAgICAgICAgICAyNiAgIC8qIDAxIDEwMTAgICBZVVY0MjAgOC1iaXQgbGVnYWN5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfWVVWNDIyXzhfREFUQSAgICAgICAgICAgICAgICAgICAgICAgMzAgICAvKiAwMSAxMTEwICAgWVVWNDIyIDgtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1lVVjQyMl8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDMxICAgLyogMDEgMTExMSAgIFlVVjQyMiAxMC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SR0I0NDRfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAzMiAgIC8qIDEwIDAwMDAgICBSR0I0NDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkdCNTU1X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDMzICAgLyogMTAgMDAwMSAgIFJHQjU1NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SR0I1NjVfREFUQSAgICAgICAgICAgICAgCQkJCQkgMzQgICAvKiAxMCAwMDEwICAgUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JHQjY2Nl9EQVRBICAgICAgICAgICAgICAJCQkJCSAzNSAgIC8qIDEwIDAwMTEgICBSR0I2NjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkdCODg4X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDM2ICAgLyogMTAgMDEwMCAgIFJHQjg4OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SQVc2X0RBVEEgICAgICAgICAgICAgICAgCQkJCQkgNDAgICAvKiAxMCAxMDAwICAgUkFXNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JBVzdfREFUQSAgICAgICAgICAgICAgICAJCQkJCSA0MSAgIC8qIDEwIDEwMDEgICBSQVc3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkFXOF9EQVRBICAgICAgICAgICAgICAgIAkJCQkJIDQyICAgLyogMTAgMTAxMCAgIFJBVzggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SQVcxMF9EQVRBICAgICAgICAgICAgICAgCQkJCQkgNDMgICAvKiAxMCAxMDExICAgUkFXMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JBVzEyX0RBVEEgICAgICAgICAgICAgICAJCQkJCSA0NCAgIC8qIDEwIDExMDAgICBSQVcxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkFXMTRfREFUQSAgICAgICAgICAgICAgIAkJCQkJIDQ1ICAgLyogMTAgMTEwMSAgIFJBVzE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzFfREFUQSAgICAgICAgICAgCQkJCQkgNDggICAvKiAxMSAwMDAwICAgIEpQRUcgW1VzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgMV0gICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfMl9EQVRBICAgICAgICAgICAJCQkJCSA0OSAgIC8qIDExIDAwMDEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSAyICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfVVNSX0RFRl8zX0RBVEEgICAgICAgICAgIAkJCQkJIDUwICAgLyogMTEgMDAxMCAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDMgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzRfREFUQSAgICAgICAgICAgCQkJCQkgNTEgICAvKiAxMSAwMDExICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNCAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfNV9EQVRBICAgICAgICAgICAJCQkJCSA1MiAgIC8qIDExIDAxMDAgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA1ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfVVNSX0RFRl82X0RBVEEgICAgICAgICAgIAkJCQkJIDUzICAgLyogMTEgMDEwMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDYgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzdfREFUQSAgICAgICAgICAgCQkJCQkgNTQgICAvKiAxMSAwMTEwICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNyAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfOF9EQVRBICAgICAgICAgICAJCQkJCSA1NSAgIC8qIDExIDAxMTEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA4ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfRW1iX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDE4ICAgLyogMDEgMDAxMCAgICBlbWJlZGRlZCBlaWdodCBiaXQgbm9uIGltYWdlIGRhdGEgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9TT0ZfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMCAgIC8qIDAwIDAwMDAgICAgZnJhbWUgc3RhcnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfRU9GX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDEgICAvKiAwMCAwMDAxICAgIGZyYW1lIGVuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1NPTF9EQVRBICAgICAgICAgICAgICAgICAJCQkJCSAyICAgLyogMDAgMDAxMCAgICBsaW5lIHN0YXJ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9FT0xfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMyAgIC8qIDAwIDAwMTEgICAgbGluZSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NIMV9EQVRBICAgICAgICAgICAgIAkJCQkJIDggICAvKiAwMCAxMDAwICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDEgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDJfREFUQSAgICAgICAgICAgICAJCQkJCSA5ICAgLyogMDAgMTAwMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDIgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9HRU5fU0gzX0RBVEEgICAgICAgICAgICAgCQkJCQkgMTAgICAvKiAwMCAxMDEwICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMyAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDRfREFUQSAgICAgICAgICAgICAJCQkJCSAxMSAgIC8qIDAwIDEwMTEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA0ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NINV9EQVRBICAgICAgICAgICAgIAkJCQkJIDEyICAgLyogMDAgMTEwMCAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDUgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9HRU5fU0g2X0RBVEEgICAgICAgICAgICAgCQkJCQkgMTMgICAvKiAwMCAxMTAxICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgNiAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDdfREFUQSAgICAgICAgICAgICAJCQkJCSAxNCAgIC8qIDAwIDExMTAgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA3ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NIOF9EQVRBICAgICAgICAgICAgIAkJCQkJIDE1ICAgLyogMDAgMTExMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDggICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9ZVVY0MjBfOF9DU1BTX0RBVEEgICAgICAgCQkJCQkgMjggICAvKiAwMSAxMTAwICAgWVVWNDIwIDgtYml0IChDaHJvbWEgU2hpZnRlZCBQaXhlbCBTYW1wbGluZykgICAgICAqLworI2RlZmluZSBDQVBUX1lVVjQyMF8xMF9DU1BTX0RBVEEgICAgICAJCQkJCSAyOSAgIC8qIDAxIDExMDEgICBZVVY0MjAgMTAtYml0IChDaHJvbWEgU2hpZnRlZCBQaXhlbCBTYW1wbGluZykgICAgICovCisjZGVmaW5lIENBUFRfUkVTRVJWRURfREFUQV9UWVBFX01JTiAgICAgICAgICAgICAgNTYKKyNkZWZpbmUgQ0FQVF9SRVNFUlZFRF9EQVRBX1RZUEVfTUFYICAgICAgICAgICAgICA2MworI2RlZmluZSBDQVBUX0dFTl9MT05HX1JFU0VSVkVEX0RBVEFfVFlQRV9NSU4gICAgIDE5CisjZGVmaW5lIENBUFRfR0VOX0xPTkdfUkVTRVJWRURfREFUQV9UWVBFX01BWCAgICAgMjMKKyNkZWZpbmUgQ0FQVF9ZVVZfUkVTRVJWRURfREFUQV9UWVBFICAgICAgICAgICAgICAyNworI2RlZmluZSBDQVBUX1JHQl9SRVNFUlZFRF9EQVRBX1RZUEVfTUlOICAgICAgICAgIDM3CisjZGVmaW5lIENBUFRfUkdCX1JFU0VSVkVEX0RBVEFfVFlQRV9NQVggICAgICAgICAgMzkKKyNkZWZpbmUgQ0FQVF9SQVdfUkVTRVJWRURfREFUQV9UWVBFX01JTiAgICAgICAgICA0NgorI2RlZmluZSBDQVBUX1JBV19SRVNFUlZFRF9EQVRBX1RZUEVfTUFYICAgICAgICAgIDQ3CisKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogQ2FwdHVyZSBVbml0IFN0YXRlICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjZGVmaW5lIENBUFRfRlJFRV9SVU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9OT19TWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX1NZTkNfU1dQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfU1lOQ19NV1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ0FQVF9TWU5DX1dBSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBDQVBUX0ZSRUVaRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIENBUFRfUlVOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKyNlbmRpZiAvKiBfaXNwX2NhcHR1cmVfZGVmc19oICovIAorCisKKworCisKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9hdG9taXNwL3BjaS9hdG9taXNwMi9jc3MyNDAwL2Nzc18yNDAxX2NzaTJwX3N5c3RlbS9ocnQvbWlw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ZiBkYXRhIGZvcm1hdCBJRCBhdCB0aGUgaW50ZXJmYWNlIENTU19yZWNlaXZlciBjYXB0dXJlL2FjcXVpc2l0aW9uIHVuaXRzICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfWVVWNDIwXzggICAgICAgICAgMjQgICAvKiAwMSAxMDAwIFlVVjQyMCA4LWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1lVVjQyMF8xMCAgICAgICAgIDI1ICAgLyogMDEgMTAwMSAgWVVWNDIwIDEwLWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9ZVVY0MjBfOEwgICAgICAgICAyNiAgIC8qIDAxIDEwMTAgICBZVVY0MjAgOC1iaXQgbGVnYWN5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfWVVWNDIyXzggICAgICAgICAgMzAgICAvKiAwMSAxMTEwICAgWVVWNDIyIDgtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1lVVjQyMl8xMCAgICAgICAgIDMxICAgLyogMDEgMTExMSAgIFlVVjQyMiAxMC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SR0I0NDQgICAgICAgICAgICAzMiAgIC8qIDEwIDAwMDAgICBSR0I0NDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkdCNTU1ICAgICAgICAgICAgMzMgICAvKiAxMCAwMDAxICAgUkdCNTU1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JHQjU2NSAgICAgICAgICAgIDM0ICAgLyogMTAgMDAxMCAgIFJHQjU2NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SR0I2NjYgICAgICAgICAgICAzNSAgIC8qIDEwIDAwMTEgICBSR0I2NjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkdCODg4ICAgICAgICAgICAgMzYgICAvKiAxMCAwMTAwICAgUkdCODg4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JBVzYgICAgICAgICAgICAgIDQwICAgLyogMTAgMTAwMCAgIFJBVzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SQVc3ICAgICAgICAgICAgICA0MSAgIC8qIDEwIDEwMDEgICBSQVc3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkFXOCAgICAgICAgICAgICAgNDIgICAvKiAxMCAxMDEwICAgUkFXOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JBVzEwICAgICAgICAgICAgIDQzICAgLyogMTAgMTAxMSAgIFJBVzEwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SQVcxMiAgICAgICAgICAgICA0NCAgIC8qIDEwIDExMDAgICBSQVcxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkFXMTQgICAgICAgICAgICAgNDUgICAvKiAxMCAxMTAxICAgUkFXMTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1VTUl9ERUZfMSAgICAgICAgIDQ4ICAgLyogMTEgMDAwMCAgICBKUEVHIFtVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDFdICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9VU1JfREVGXzIgICAgICAgICA0OSAgIC8qIDExIDAwMDEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSAyICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfVVNSX0RFRl8zICAgIC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tYmVkZGVkIGVpZ2h0IGJpdCBub24gaW1hZ2UgZGF0YSAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1NPRiAgICAgICAgICAgICAgICAwICAgLyogMDAgMDAwMCAgICBmcmFtZSBzdGFydCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9FT0YgICAgICAgICAgICAgICAgMSAgIC8qIDAwIDAwMDEgICAgZnJhbWUgZW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfU09MICAgICAgICAgICAgICAgIDIgICAvKiAwMCAwMDEwICAgIGxpbmUgc3RhcnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX0VPTCAgICAgICAgICAgICAgICAzICAgLyogMDAgMDAxMSAgICBsaW5lIGVuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9HRU5fU0gxICAgICAgICAgICAgOCAgIC8qIDAwIDEwMDAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMSAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfR0VOX1NIMiAgICAgICAgICAgIDkgICAvKiAwMCAxMDAxICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMiAgICAgICAgICAgICAgICAgICAgICA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2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0JFX1JBVzE2X0RBVEFJRF9JRFggICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9SQVcxNl9FTl9JRFggICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfQkVfUkFXMThfREFUQUlEX0lEWCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0JFX1JBVzE4X09QVElPTl9JRFggICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9SQVcxOF9FTl9JRFggICAgICAgICAgICAgICAgICAgICA4CisKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9DT01QX05PX0NPTVAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfQkVfQ09NUF8xMF82XzEwICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0JFX0NPTVBfMTBfN18xMCAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9DT01QXzEwXzhfMTAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfQkVfQ09NUF8xMl82XzEyICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0JFX0NPTVBfMTJfN18xMiAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9DT01QXzEyXzhfMTIgICAgICAgICAgICAgICAgICAgICA2CisKKworLyogcGFja2V0IGJpdCBkZWZpbml0aW9uICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX1NPUF9JRFggICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BLVF9TT1BfQklUUyAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QS1RfQ0hfSURfSURYICAgICAgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX0NIX0lEX0JJVFMgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BLVF9GTVRfSURfSURYICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QS1RfRk1UX0lEX0JJVFMgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEhfREFUQV9GSUVMRF9JRFggICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BIX0RBVEFfRklFTERfQklUUyAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QS1RfUEFZTE9BRF9JRFggICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX1BBWUxPQURfQklUUyAgICAgICAgICAgICAgICAgICAzMgorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogQ3VzdG9tIERlY29kaW5nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBUaGVzZSBDdXN0b20gRGVmcyBhcmUgZGVmaW5lZCBiYXNlZCBvbiBkZXNpZ24tdGltZSBjb25maWcgaW4gIm1pcGlfYmFja2VuZF9waXhlbF9mb3JtYXR0ZXIuY2hkbCIgISEgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoKKyNkZWZpbmUgQkVfQ1VTVF9FTl9JRFggICAgICAgICAgICAgICAgICAgICAwICAgICAvLyAyYml0cyAKKyNkZWZpbmUgQkVfQ1VTVF9FTl9EQVRBSURfSURYICAgICAgICAgICAgICAyICAgICAvLyA2Yml0cyBNSVBJIERBVEEgSUQgCisjZGVmaW5lIEJFX0NVU1RfRU5fV0lEVEggICAgICAgICAgICAgICAgICAgOCAgICAgCisjZGVmaW5lIEJFX0NVU1RfTU9ERV9BTEwgICAgICAgICAgICAgICAgICAgMSAgICAgLy8gRW5hYmxlIEN1c3RvbSBEZWNvZGluZyBmb3IgYWxsIERBVEEgSURzIAorI2RlZmluZSBCRV9DVVNUX01PREVfT05FICAgICAgICAgICAgICAgICAgIDMgICAgIC8vIEVuYWJsZSBDdXN0b20gRGVjb2RpbmcgZm9yIE9ORSBEQVRBIElELCBwcm9ncmFtbWVkIGluIENVU1RfRU5fREFUQV9JRCAKKworLy8gRGF0YSBTdGF0ZSBjb25maWcgPSB7Z2V0X2JpdHMoNmJpdHMpLCB2YWxpZCgxYml0KX0gIC8vCisjZGVmaW5lIEJFX0NVU1RfREFUQV9TVEFURV9TMF9JRFggICAgICAgICAgMCAgICAgLy8gN2JpdHMKKyNkZWZpbmUgQkVfQ1VTVF9EQVRBX1NUQVRFX1MxX0lEWCAgICAgICAgICA4IC8vNyAgICAgIC8vIDdiaXRzIAorI2RlZm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0tFTkRfU1RSRUFNSU5HX1NPUF9CSVQocGl4X3dpZHRoKSAgICAgICAoX0hSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNSU5HX1BJWF9CX1ZBTF9CSVQocGl4X3dpZHRoKSArIDEpCisjZGVmaW5lIF9IUlRfTUlQSV9CQUNLRU5EX1NUUkVBTUlOR19FT1BfQklUKHBpeF93aWR0aCkgICAgICAgKF9IUlRfTUlQSV9CQUNLRU5EX1NUUkVBTUlOR19TT1BfQklUKHBpeF93aWR0aCkgKyAxKQorI2RlZmluZSBfSFJUX01JUElfQkFDS0VORF9TVFJFQU1JTkdfV0lEVEgocGl4X3dpZHRoKSAgICAgICAgIChfSFJUX01JUElfQkFDS0VORF9TVFJFQU1JTkdfRU9QX0JJVChwaXhfd2lkdGgpICsgMSkKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBDdXN0b20gRGVjb2RpbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qIFRoZXNlIEN1c3RvbSBEZWZzIGFyZSBkZWZpbmVkIGJhc2VkIG9uIGRlc2lnbi10aW1lIGNvbmZpZyBpbiAibWlwaV9iYWNrZW5kX3BpeGVsX2Zvcm1hdHRlci5jaGRsIiAhISAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIF9IUlRfTUlQSV9CQUNLRU5EX0NVU1RfRU5fSURYICAgICAgICAgICAgICAgICAgICAgMCAgICAgLyogMmJpdHMgKi8KKyNkZWZpbmUgX0hSVF9NSVBJX0JBQ0tFTkRfQ1VTVF9FTl9EQVRBSURfSURYICAgICAgICAg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gaW50ZXJmYWNlIGRlZmluaXRpb24gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBUaGVzZSBwYXJhbWV0ZXJzIGRlZmluZSB0aGUgZmllbGRzIHdpdGhpbiB0aGUgc3RyZWFtaW5nIGJ1cy4gVGhlc2Ugc2hvdWxkIGFsc28gYmUgdXNlZCBieSB0aGUgKi8KKy8qIHN1YnNlcXVlbnQgYmxvY2ssIGllIHN0cmVhbTJtbWlvLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBUaGUgcGlwZSBiYWNrZW5kIC0gc3RyZWFtMm1taW8gc2hvdWxkIGJlIGRlc2lnbiB0aW1lIGNvbmZpZ3VyYWJsZSBpbiAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qICAgUGl4V2lkdGggLSBOdW1iZXIgb2YgYml0cyBwZXIgcGl4ZWwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogICBQUEMgICAgICAtIFBpeGVsIHBlciBDbG9ja3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAgIE51bVNpZHMgIC0gTWF4IG51bWJlciBvZiBzb3VyY2UgSWRzIChpZmMncykgIGFuZCBkZXJpdmVkIGZyb20gdGhhdDogICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qICAgU2lkV2lkdGggLSBOdW1iZXIgb2YgYml0cyByZXF1aXJlZCBmb3IgdGhlIHNpZCBwYXJhbWV0ZXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogSW4gb3JkZXIgdG8ga2VlcCB0aGlzIGNvbmZpZ3VyYWJpbGl0eSwgYmVsb3cgTWFjcm8ncyBoYXZlIHRoZXNlIGFzIGEgcGFyYW1ldGVyICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9FT1BfQklUICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fU09QX0JJVCAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX0VPRl9CSVQgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9TT0ZfQklUICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fQ0hJRF9MU19CSVQgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX0NISURfTVNfQklUKHNpZF93aWR0aCkgICAgICAoSFJUX01JUElfQkFDS0VORF9TVFJFQU1fQ0hJRF9MU19CSVQrKHNpZF93aWR0aCktMSkKKyNkZWZpbmUgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fUElYX1ZBTF9CSVQoc2lkX3dpZHRoLHApICAgIChIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9DSElEX01TX0JJVChzaWRfd2lkdGgpKzErcCkKKworI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhfTFNfQklUKHNpZF93aWR0aCxwcGMscGl4X3dpZHRoLHApIChIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhfVkFMX0JJVChzaWRfd2lkdGgscHBjKSsgKChwaXhfd2lkdGgpKnApKQorI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhfTVNfQklUKHNpZF93aWR0aCxwcGMscGl4X3dpZHRoLHApIChIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhfTFNfQklUKHNpZF93aWR0aCxwcGMscGl4X3dpZHRoLHApICsgKHBpeF93aWR0aCkgLSAxKQorCisjaWYgMAorLy8jZGVmaW5lIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX1BJWF9CSVRTICAgICAgICAgICAgICAgICAgICAxNAorLy8jZGVmaW5lIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX0NISURfQklUUyAgICAgICAgICAgICAgICAgICAgNAorLy8jZGVmaW5lIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX1BQQyAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2VuZGlmCisKKyNkZWZpbmUgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fQklUUyhzaWRfd2lkdGgscHBjLHBpeF93aWR0aCkgICAgICAgICAoSFJUX01JUElfQkFDS0VORF9TVFJFQU1fUElYX01TX0JJVChzaWRfd2lkdGgscHBjLHBpeF93aWR0aCwocHBjLTEpKSsxKQorCisKKy8qIFNQIGFuZCBMUCBMVVQgQklUIFBPU0lUSU9OUyAqLworI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX0xVVF9QS1RfRElTUkVHQVJEX0JJVCAgICAgICAgICAgICAgMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAwICAgIAorI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX0xVVF9TSURfTFNfQklUICAgICAgICAgICAgICAgICAgICAgSFJUX01JUElfQkFDS0VORF9MVVRfUEtUX0RJU1JFR0FSRF9CSVQgKyAxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAxICAgIAorI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX0xVVF9TSURfTVNfQklUKHNpZF93aWR0aCkgICAgICAgICAgKEhSVF9NSVBJX0JBQ0tFTkRfTFVUX1NJRF9MU19CSVQrKHNpZF93aWR0aCktMSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAxICsgKDQpIC0gMSA9IDQgIAorI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX0xVVF9NSVBJX0NIX0lEX0xTX0JJVChzaWRfd2lkdGgpICAgSFJUX01JUElfQkFDS0VORF9MVVRfU0lEX01TX0JJVChzaWRfd2lkdGgpICsgMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA1CisjZGVmaW5lIEhSVF9NSVBJX0JBQ0tFTkRfTFVUX01JUElfQ0hfSURfTVNfQklUKHNpZF93aWR0aCkgICBIUlRfTUlQSV9CQUNLRU5EX0xVVF9NSVBJX0NIX0lEX0xTX0JJVChzaWRfd2lkdGgpICsgX0hSVF9NSVBJX0JBQ0tFTkRfQ0hBTk5FTF9JRF9XSURUSCAtIDEgIC8vIDYKKyNkZWZpbmUgSFJUX01JUElfQkFDS0VORF9MVVRfTUlQSV9GTVRfTFNfQklUKHNpZF93aWR0aCkgICAgIEhSVF9NSVBJX0JBQ0tFTkRfTFVUX01JUElfQ0hfSURfTVNfQklUKHNpZF93aWR0aCkgKyAxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gNworI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX0xVVF9NSVBJX0ZNVF9NU19CSVQoc2lkX3dpZHRoKSAgICAgSFJUX01JUElfQkFDS0VORF9MVVRfTUlQSV9GTVRfTFNfQklUKHNpZF93aWR0aCkgKyBfSFJUX01JUElfQkFDS0VORF9GT1JNQVRfVFlQRV9XSURUSCAtIDEgICAvLyAxMiAgICAKKworLyogI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NQX0xVVF9CSVRTKHNpZF93aWR0aCkgICAgICAgICAgICAgSFJUX01JUElfQkFDS0VORF9MVVRfTUlQSV9DSF9JRF9NU19CSVQoc2lkX3dpZHRoKSArIDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyA3ICAgICAgICAgICovCisKKyNkZWZpbmUgSFJUX01JUElfQkFDS0VORF9TUF9MVVRfQklUUyhzaWRfd2lkdGgpICAgICAgICAgICAgIEhSVF9NSVBJX0JBQ0tFTkRfTFVUX1NJRF9NU19CSVQoc2lkX3dpZHRoKSArIDEgIAorI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX0xQX0xVVF9CSVRTKHNpZF93aWR0aCkgICAgICAgICAgICAgSFJUX01JUElfQkFDS0VORF9MVVRfTUlQSV9GTVRfTVNfQklUKHNpZF93aWR0aCkgKyAxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAxMworCisKKy8vIHRlbXAgc29sdXRpb24KKy8vI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhBX1ZBTF9CSVQgICAgICAgICAgICAgICAgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fQ0hJRF9NU19CSVQgICsgMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDggICAgICAgICAgICAgICAgICAgICAKKy8vI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhCX1ZBTF9CSVQgICAgICAgICAgICAgICAgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fUElYQV9WQUxfQklUICsgMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDkKKy8vI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhDX1ZBTF9CSVQgICAgICAgICAgICAgICAgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fUElYQl9WQUxfQklUICsgMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDEwCisvLyNkZWZpbmUgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fUElYRF9WQUxfQklUICAgICAgICAgICAgICAgIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX1BJWENfVkFMX0JJVCArIDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAxMQorLy8jZGVmaW5lIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX1BJWEFfTFNfQklUICAgICAgICAgICAgICAgICBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhEX1ZBTF9CSVQgKyAxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gMTIKKy8vI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhBX01TX0JJVCAgICAgICAgICAgICAgICAgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fUElYQV9MU19CSVQgICsgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fUElYX0JJVFMgLSAxIC8vIDI1CisvLyNkZWZpbmUgSFJUX01JUElfQkFDS0VORF9TVFJFQU1fUElYQl9MU19CSVQgICAgICAgICAgICAgICAgIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX1BJWEFfTVNfQklUICsgMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAyNgorLy8jZGVmaW5lIEhSVF9NSVBJX0JBQ0tFTkRfU1RSRUFNX1BJWEJfTVNfQklUICAgICAgICAgICAgICAgICBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhCX0xTX0JJVCAgKyBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhfQklUUyAtIDEgLy8gMzkKKy8vI2RlZmluZSBIUlRfTUlQSV9CQUNLRU5EX1NUUkVBTV9QSVhDX0xTX0JJVCAgICAgICAgICAgICAgICAgSFJUX01JUElfQk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FVTX0RMQU5FX0xQX1RSSUdHRVJFU0MwX0xBTkUzICAgIDE2CisjZGVmaW5lIF9IUlRfQ1NJX1JYX1NUQVRVU19ETEFORV9MUF9UUklHR0VSRVNDMV9MQU5FMyAgICAxNworI2RlZmluZSBfSFJUX0NTSV9SWF9TVEFUVVNfRExBTkVfTFBfVFJJR0dFUkVTQzJfTEFORTMgICAgMTgKKyNkZWZpbmUgX0hSVF9DU0lfUlhfU1RBVFVTX0RMQU5FX0xQX1RSSUdHRVJFU0MzX0xBTkUzICAgIDE5CisjZGVmaW5lIF9IUlRfQ1NJX1JYX1NUQVRVU19ETEFORV9MUF9VTFBTRVNDX0xBTkUwICAgICAgICAyMAorI2RlZmluZSBfSFJUX0NTSV9SWF9TVEFUVVNfRExBTkVfTFBfVUxQU0VTQ19MQU5FMSAgICAgICAgMjEKKyNkZWZpbmUgX0hSVF9DU0lfUlhfU1RBVFVTX0RMQU5FX0xQX1VMUFNFU0NfTEFORTIgICAgICAgIDIyCisjZGVmaW5lIF9IUlRfQ1NJX1JYX1NUQVRVU19ETEFORV9MUF9VTFBTRVNDX0xBTkUzICAgICAgICAyMworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKiBSZWxldmFudCBkZWNsYXJhdGlvbnMgZnJvbSByeF9jc2lfY29tbW9uX2RlZnMuaCAqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBwYWNrZXQgYml0IGRlZmluaXRpb24gKi8KKyNkZWZpbmUgX0hSVF9SWF9DU0lfUEtUX1NPUF9CSVRQT1MgICAgICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIF9IUlRfUlhfQ1NJX1BLVF9FT1BfQklUUE9TICAgICAgICAgICAgICAgICAgICAgICAzMworI2RlZmluZSBfSFJUX1JYX0NTSV9QS1RfUEFZTE9BRF9CSVRQT1MgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgX0hSVF9SWF9DU0lfUEhfQ0hfSURfQklUUE9TICAgICAgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIF9IUlRfUlhfQ1NJX1BIX0ZNVF9JRF9CSVRQT1MgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBfSFJUX1JYX0NTSV9QSF9EQVRBX0ZJRUxEX0JJVFBPUyAgICAgICAgICAgICAgICAgIDAKKworI2RlZmluZSBfSFJUX1JYX0NTSV9QS1RfU09QX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgX0hSVF9SWF9DU0lfUEtUX0VPUF9CSVRTICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIF9IUlRfUlhfQ1NJX1BLVF9QQVlMT0FEX0JJVFMgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBfSFJUX1JYX0NTSV9QSF9DSF9JRF9CSVRTICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0hSVF9SWF9DU0lfUEhfRk1UX0lEX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIF9IUlRfUlhfQ1NJX1BIX0RBVEFfRklFTERfQklUUyAgICAgICAgICAgICAgICAgICAxNgorCisvKiBEZWZpbml0aW9uIG9mIGRhdGEgZm9ybWF0IElEIGF0IHRoZSBpbnRlcmZhY2UgQ1NTX3JlY2VpdmVyIHVuaXRzICovCisjZGVmaW5lIF9IUlRfUlhfQ1NJX0RBVEFfRk9STUFUX0lEX1NPRiAgICAgICAgICAgICAgICAwICAgLyogMDAgMDAwMCAgICBmcmFtZSBzdGFydCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9SWF9DU0lfREFUQV9GT1JNQVRfSURfRU9GICAgICAgICAgICAgICAgIDEgICAvKiAwMCAwMDAxICAgIGZyYW1lIGVuZCAgICAgICAgIC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Mk1NSU9fUEFDS19OVU1fSVRFTVNfQklUUy0xKQorI2RlZmluZSBfU1RSRUFNMk1NSU9fQUNLX1RPS0VOX0VPUF9CSVQgICAgICAgICBfU1RSRUFNMk1NSU9fUEFDS19BQ0tfRU9QX0JJVAorI2RlZmluZSBfU1RSRUFNMk1NSU9fQUNLX1RPS0VOX0VPRl9CSVQgICAgICAgICBfU1RSRUFNMk1NSU9fUEFDS19BQ0tfRU9GX0JJVAorI2RlZmluZSBfU1RSRUFNMk1NSU9fQUNLX1RPS0VOX1ZBTElEX0JJVCAgICAgICAoX1NUUkVBTTJNTUlPX0FDS19UT0tFTl9FT0ZfQklUKzEpICAgICAgLyogdGhpcyBiaXQgaW5kaWNhdGVzIGEgdmFsaWQgYWNrICAgICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBpZiB0aGVyZSBpcyBubyB2YWxpZCBhY2ssIGEgcmVhZCAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9uIHRoZSBhY2sgcmVnaXN0ZXIgcmV0dXJucyAwICAgICAqLworI2RlZmluZSBfU1RSRUFNMk1NSU9fQUNLX1RPS0VOX1dJRFRIICAgICAgICAgICAoX1NUUkVBTTJNTUlPX0FDS19UT0tFTl9WQUxJRF9CSVQrMSkKKworLyogY29tbWFuZHMgZm9yIHBhY2tlciBtb2R1bGUgKi8KKyNkZWZpbmUgX1NUUkVBTTJNTUlPX1BBQ0tfQ01EX1NUT1JFX1dPUkRTICAgICAgICAwCisjZGVmaW5lIF9TVFJFQU0yTU1JT19QQUNLX0NNRF9TVE9SRV9MT05HX1BBQ0tFVCAgMQorI2RlZmluZSBfU1RSRUFNMk1NSU9fUEFDS19DTURfU1RPUkVfU0hPUlRfUEFDS0VUIDIKK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IFlVVjQyMiA4LWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9ZVVY0MjJfMTAgICAgICAgICAzMSAgIC8qIDAxIDExMTEgICBZVVY0MjIgMTAtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkdCNDQ0ICAgICAgICAgICAgMzIgICAvKiAxMCAwMDAwICAgUkdCNDQ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JHQjU1NSAgICAgICAgICAgIDMzICAgLyogMTAgMDAwMSAgIFJHQjU1NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SR0I1NjUgICAgICAgICAgICAzNCAgIC8qIDEwIDAwMTAgICBSR0I1NjUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkdCNjY2ICAgICAgICAgICAgMzUgICAvKiAxMCAwMDExICAgUkdCNjY2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JHQjg4OCAgICAgICAgICAgIDM2ICAgLyogMTAgMDEwMCAgIFJHQjg4OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SQVc2ICAgICAgICAgICAgICA0MCAgIC8qIDEwIDEwMDAgICBSQVc2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkFXNyAgICAgICAgICAgICAgNDEgICAvKiAxMCAxMDAxICAgUkFXNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JBVzggICAgICAgICAgICAgIDQyICAgLyogMTAgMTAxMCAgIFJBVzggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9SQVcxMCAgICAgICAgICAgICA0MyAgIC8qIDEwIDEwMTEgICBSQVcxMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfUkFXMTIgICAgICAgICAgICAgNDQgICAvKiAxMCAxMTAwICAgUkFXMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1JBVzE0ICAgICAgICAgICAgIDQ1ICAgLyogMTAgMTEwMSAgIFJBVzE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9VU1Jf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IDExIDAxMTAgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA3ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfVVNSX0RFRl84ICAgICAgICAgNTUgICAvKiAxMSAwMTExICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgOCAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX0VtYiAgICAgICAgICAgICAgIDE4ICAgLyogMDEgMDAxMCAgICBlbWJlZGRlZCBlaWdodCBiaXQgbm9uIGltYWdlIGRhdGEgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9TT0YgICAgICAgICAgICAgICAgMCAgIC8qIDAwIDAwMDAgICAgZnJhbWUgc3RhcnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfRU9GICAgICAgICAgICAgICAgIDEgICAvKiAwMCAwMDAxICAgIGZyYW1lIGVuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX1NPTCAgICAgICAgICAgICAgICAyICAgLyogMDAgMDAxMCAgICBsaW5lIHN0YXJ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9FT0wgICAgICAgICAgICAgICAgMyAgIC8qIDAwIDAwMTEgICAgbGluZSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfR0VOX1NIMSAgICAgICAgICAgIDggICAvKiAwMCAxMDAwICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDEgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX0dFTl9TSDIgICAgICAgICAgICA5ICAgLyogMDAgMTAwMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDIgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9HRU5fU0gzICAgICAgICAgICAxMCAgIC8qIDAwIDEwMTAgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSAzICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfREFUQV9GT1JNQVRfSURfR0VOX1NINCAgICAgICAgICAgMTEgICAvKiAwMCAxMDExICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgNCAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0RBVEFfRk9STUFUX0lEX0dFTl9TSDUgICAgICAgICAgIDEyICAgLyogMDAgMTEwMCAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDUgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9EQVRBX0ZPUk1BVF9JRF9HRU5fU0g2ICAgICAgICAgICAxMyAgIC8qIDAwIDExMDEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA2ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIF9IUlR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gICAgICAgICAgNAorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX0JFX0NPTVBfMTJfN18xMiAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9CRV9DT01QXzEyXzhfMTIgICAgICAgICAgICAgICAgICAgICA2CisKKworLyogcGFja2V0IGJpdCBkZWZpbml0aW9uICovCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX1NPUF9JRFggICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BLVF9TT1BfQklUUyAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QS1RfQ0hfSURfSURYICAgICAgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX0NIX0lEX0JJVFMgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BLVF9GTVRfSURfSURYICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QS1RfRk1UX0lEX0JJVFMgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEhfREFUQV9GSUVMRF9JRFggICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBfSFJUX0NTU19SRUNFSVZFUl8yNDAwX1BIX0RBVEFfRklFTERfQklUUyAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgX0hSVF9DU1NfUkVDRUlWRVJfMjQwMF9QS1RfUEFZTE9BRF9JRFggICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIF9IUlRfQ1NTX1JFQ0VJVkVSXzI0MDBfUEtUX1BBWUxPQURfQklUUyAgICAgICAgICAgICAgICAgICAzMgorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogQ3VzdG9tIERlY29kaW5nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBUaGVzZSBDdXN0b20gRGVmcyBhcmUgZGVmaW5lZCBiYXNlZCBvbiBkZXNpZ24tdGltZSBjb25maWcgaW4gImNzaV9iZV9waXhlbF9mb3JtYXR0ZXIuY2hkbCIgISEgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBCRV9DVVNUX0VOX0lEWCAgICAgICAgICAgICAgICAgICAgIDAgICAgIC8qIDJiaXRzICovCisjZGVmaW5lIEJFX0NVU1RfRU5fREFUQUlEX0lEWCAgICAgICAgICAgICAgMiAgICAgLyogNmJpdHMgTUlQSSBEQVRBIElEICovIAorI2RlZmluZSBCRV9DVVNUX0VOX1dJRFRIICAgICAgICAgICAgICAgICAgIDggICAgIAorI2RlZmluZSBCRV9DVVNUX01PREVfQUxMICAgICAgICAgICAgICAgICAgIDEgICAgIC8qIEVuYWJsZSBDdXN0b20gRGVjb2RpbmcgZm9yIGFsbCBEQVRBIElEcyAqLworI2RlZmluZSBCRV9DVVNUX01PREVfT05FICAgICAgICAgICAgICAgICAgIDMgICAgIC8qIEVuYWJsZSBDdXN0b20gRGVjb2RpbmcgZm9yIE9ORSBEQVRBIElELCBwcm9ncmFtbWVkIGluIENVU1RfRU5fREFUQV9JRCAqLworCisvKiBEYXRhIFN0YXRlIGNvbmZpZyA9IHtnZXRfYml0cyg2Yml0cyksIHZhbGlk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1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisgKiBtb3JlIGRldGFpbHMuCisgKi8KKworI2lmbmRlZiBfY3NzX3JlY2VpdmVyXzI0MDBfZGVmc19oXworI2RlZmluZSBfY3NzX3JlY2VpdmVyXzI0MDBfZGVmc19oXworCisjaW5jbHVkZSAiY3NzX3JlY2VpdmVyXzI0MDBfY29tbW9uX2RlZnMuaCIKKworI2RlZmluZSBDU1NfUkVDRUlWRVJfREFUQV9XSURUSCAgICAgICAgICAgICAgICA4CisjZGVmaW5lIENTU19SRUNFSVZFUl9SWF9UUklHICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX1JGX1dPUkQgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBDU1NfUkVDRUlWRVJfSU1HX1BST0NfUkZfQUREUiAgICAgICAgIDEwCisjZGVmaW5lIENTU19SRUNFSVZFUl9DU0lfUkZfQUREUiAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX0RBVEFfT1VUICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBDU1NfUkVDRUlWRVJfQ0hOX05PICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENTU19SRUNFSVZFUl9EV09SRF9DTlQgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX0ZPUk1BVF9UWVAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBDU1NfUkVDRUlWRVJfSFJFU1BPTlNFICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENTU19SRUNFSVZFUl9TVEFURV9XSURUSCAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ1NTX1JFQ0VJVkVSX0ZJRk9fREFUICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBDU1NfUkVDRUlWRVJfQ05UX1ZBTCAgICAgICAgICAgICAgICAgICA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ICAgICAgICAwCisjZGVmaW5lIF9ETUFfVjJfU1RSSURFX0JJVFMgICAgICAgIDMyCisKKy8qIENvbW1hbmQgSURzICovCisjZGVmaW5lIF9ETUFfVjJfTU9WRV9CMkFfQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgICAgIAorI2RlZmluZSBfRE1BX1YyX01PVkVfQjJBX0JMT0NLX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgIDEgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9NT1ZFX0IyQV9OT19TWU5DX0NIS19DT01NQU5EICAgICAgICAgICAgICAgICAyICAgICAgCisjZGVmaW5lIF9ETUFfVjJfTU9WRV9CMkFfQkxPQ0tfTk9fU1lOQ19DSEtfQ09NTUFORCAgICAgICAgICAgMyAgICAgIAorI2RlZmluZSBfRE1BX1YyX01PVkVfQTJCX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9NT1ZFX0EyQl9CTE9DS19DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICA1ICAgICAgCisjZGVmaW5lIF9ETUFfVjJfTU9WRV9BMkJfTk9fU1lOQ19DSEtfQ09NTUFORCAgICAgICAgICAgICAgICAgNiAgICAgIAorI2RlZmluZSBfRE1BX1YyX01PVkVfQTJCX0JMT0NLX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgICAgICAgIDcgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9JTklUX0FfQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4ICAgICAgCisjZGVmaW5lIF9ETUFfVjJfSU5JVF9BX0JMT0NLX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgICAgOSAgICAgIAorI2RlZmluZSBfRE1BX1YyX0lOSVRfQV9OT19TWU5DX0NIS19DT01NQU5EICAgICAgICAgICAgICAgICAgMTAgICAgICAKKyNkZWZpbmUgX0RNQV9WMl9JTklUX0Ff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gICAgIChfRE1BX1YyX0lOSVRfQV9OT19TWU5DX0NIS19DT01NQU5EICAgICAgICAgKyAxNikgCisjZGVmaW5lIF9ETUFfVjJfTk9fQUNLX0lOSVRfQV9CTE9DS19OT19TWU5DX0NIS19DT01NQU5EICAgICAoX0RNQV9WMl9JTklUX0FfQkxPQ0tfTk9fU1lOQ19DSEtfQ09NTUFORCAgICsgMTYpIAorI2RlZmluZSBfRE1BX1YyX05PX0FDS19JTklUX0JfTk9fU1lOQ19DSEtfQ09NTUFORCAgICAgICAgICAgKF9ETUFfVjJfSU5JVF9CX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgICAgICArIDE2KSAKKyNkZWZpbmUgX0RNQV9WMl9OT19BQ0tfSU5JVF9CX0JMT0NLX05PX1NZTkNfQ0hLX0NPTU1BTkQgICAgIChfRE1BX1YyX0lOSVRfQl9CTE9DS19OT19TWU5DX0NIS19DT01NQU5EICAgKyAxNikgCisjZGVmaW5lIF9ETUFfVjJfQ09ORklHX0NIQU5ORUxfQ09NTUFORCAgICAgICAgICAgICAgICAgICAgICAzMiAgIAorI2RlZmluZSBfRE1BX1YyX1NFVF9DSEFOTkVMX1BBUkFNX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgMzMgICAKKyNkZWZpbmUgX0RNQV9WMl9TRVRfQ1JVTl9DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYyICAgCisKKy8qIENoYW5uZWwgUGFyYW1ldGVyIElEcyAqLworI2RlZmluZSBfRE1BX1YyX1BBQ0tJTkdfU0VUVVBfUEFSQU0gICAgICAgICAgICAgICAgICAgICAwICAKKyNkZWZpbmUgX0RNQV9WMl9TVFJJREVfQV9QQVJBTSAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgCisjZGVmaW5lIF9ETUFfVjJfRUxFTV9DUk9QUElOR19BX1BBUkFNICAgICAgICAgICAgICAgICAgIDIgIAorI2RlZmluZSBfRE1BX1YyX1dJRFRIX0FfUEFSQU0gICAgICAgICAgICAgICAgICAgICAgICAgICAzICAKKyNkZWZpbmUgX0RNQV9WMl9TVFJJREVfQl9QQVJBTSAgICAgICAgICAgICAgICAgICAgICAgICAgNCAgCisjZGVmaW5lIF9ETUFfVjJfRUxFTV9DUk9QUElOR19CX1BBUkFNICAgICAgICAgICAgICAgICAgIDUgIAorI2RlZmluZSBfRE1BX1YyX1dJRFRIX0JfUEFSQU0gICAgICAgICAgICAgICAgICAgICAgICAgICA2ICAKKyNkZWZpbmUgX0RNQV9WMl9IRUlHSFRfUEFSQU0gICAgICAgICAgICAgICAgICAgICAgICAgICAgNyAgCisjZGVmaW5lIF9ETUFfVjJfUVVFVUVEX0NNRFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDggIAorCisvKiBQYXJhbWV0ZXIgQ29uc3RhbnRzICovCisjZGVmaW5lIF9ETUFfVjJfWkVST19FWFRFTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgX0RNQV9WMl9TSUdOX0VYVEVORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisgIC8qIFNMQVZFIGFkZHJlc3MgbWFwICovCisjZGVmaW5lIF9ETUFfVjJfU0VMX0ZTTV9DTUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgX0RNQV9WMl9TRUxfQ0hfUkVHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBfRE1BX1YyX1NFTF9DT05OX0dST1VQICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIF9ETUFfVjJfU0VMX0RFVl9JTlRFUkYgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKworI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0NPTVBfSURYICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfQ09NUF9CSVRTICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9DSF9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0NIX1JFR19CSVRTICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfUEFSQU1fSURYICAgICAgICAgICAgICAgICAgICAgIChfRE1BX1YyX0FERFJfU0VMX0NIX1JFR19CSVRTK19ETUFfVjJfQUREUl9TRUxfQ0hfUkVHX0lEWCkKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9QQVJBTV9CSVRTICAgICAgICAgICAgICAgICAgICAgNAorCisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfR1JPVVBfQ09NUF9JRFggICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9HUk9VUF9DT01QX0JJVFMgICAgICAgICAgICAgICAgNgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0dST1VQX0NPTVBfSU5GT19JRFggICAgICAgICAgICAoX0RNQV9WMl9BRERSX1NFTF9HUk9VUF9DT01QX0JJVFMgKyBfRE1BX1YyX0FERFJfU0VMX0dST1VQX0NPTVBfSURYKQorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0dST1VQX0NPTVBfSU5GT19CSVRTICAgICAgICAgICA0CisKKyNkZWZpbmUgX0RNQV9WMl9BRERSX1NFTF9ERVZfSU5URVJGX0lEWF9JRFggICAgICAgICAgICAgMgorI2RlZmluZSBfRE1BX1YyX0FERFJfU0VMX0RFVl9JTlRFUkZfSURYX0JJVFMgICAgICAgICAgICA2CisjZGVmaW5lIF9ETUFfVjJfQUREUl9TRUxfREVWX0lOVEVSRl9JTkZPX0lEWCAgICAgICAgICAgIChfRE1BX1YyX0FERFJfU0VMX0RFVl9JTlRFUkZfSURYX0lEWCtfRE1BX1YyX0FERFJfU0VMX0RFVl9JTlRFUkZfSURYX0JJVFMpCisjZGVmaW5lIF9ETUFfVjJfQURE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ICAgICovCisjZGVmaW5lIEhSVF9HRENfQkxJX0NPRUZfT05FICAgICAgICAgICAgICgxIDw8IEhSVF9HRENfQkxJX0ZSQUNfQklUUykKKworI2RlZmluZSBIUlRfR0RDX0JDSV9DT0VGX0JJVFMgICAgICAgICAgIDE0IC8qIDE0IGJpdHMgcGVyIGNvZWZmaWNpZW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgSFJUX0dEQ19CQ0lfQ09FRl9PTkUgICAgICAgICAgICAgKDEgPDwgKEhSVF9HRENfQkNJX0NPRUZfQklUUy0yKSkgIC8qIFdlIHJlcHJlc2VudCBzaWduZWQgMTAgYml0IGNvZWZmaWNpZW50cy4gICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBUaGUgc3VwcG9ydGVkIHJhbmdlIGlzIFstMjU2LCAuLiwgKzI1Nl0gICAgICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogaW4gMTQtYml0IHNpZ25lZCBub3RhdGlvbiwgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFdlIG5lZWQgYWxsIHRlbiBiaXRzIChNU0IgbXVzdCBiZSB6ZXJvKS4gICAgICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAtcyBpcyBpbnNlcnRlZCB0byBzb2x2ZSB0aGlzIGlzc3VlLCBhbmQgICAgICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogdGhlcmVmb3JlICIxIiBpcyBlcXVhbCB0byArMjU2LiAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgSFJUX0dEQ19CQ0lfQ09FRl9NQVNLICAgICAgICAgICAgKCgxIDw8IEhSVF9HRENfQkNJX0NPRUZfQklUUykgLSAxKSAKKworI2RlZmluZSBIUlRfR0RDX0xVVF9CWVRFUyAgICAgICAgICAgICAgICAoSFJUX0dEQ19OKjQqMikgICAgICAgICAgICAgICAgLyogMTAyNCBhZGRyZXNzZXMsIDQgY29lZmZpY2llbnRzIHBlciBhZGRyZXNzLCAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDIgYnl0ZXMgcGVyIGNvZWZmaWNpZW50ICAgICAgICAgICAgICAgICAgICAgICovCisKKyNkZWZpbmUgX0hSVF9HRENfUkVHX0FMSUdOICAgICAgICAgICAgICAgNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorCisgIC8vICAgICAzMSAgMzAgIDI5ICAgIDI1IDI0ICAgICAgICAgICAgICAgICAgICAgMAorICAvLyAgfC0tLS0tfC0tLXwtLS0tLS0tLXwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18CisgIC8vICB8IENNRCB8IEMgfCBSZWdfSUQgfCAgICAgICAgVmFsdWUgICAgICAgICAgIHwKKworCisgIC8vIFRoZXJlIGFyZSBqdXN0IHR3byBjb21tYW5kcyBwb3NzaWJsZSBmb3IgdGhlIEdEQyBibG9jazoKKyAgLy8gMSAtIENvbmZpZ3VyZSByZWcgCisgIC8vIDAgLSBEYXRhIHRva2VuICAgIAorICAKKyAgLy8gQyAgICAgIC0gUmVzZXJ2ZWQgYml0CisgIC8vICAgICAgICAgIFVzZWQgaW4gcHJvdG9jb2wgdG8gaW5kaWNhdGUgd2hldGhlciBpdCBpcyBDLXJ1biBvciBvdGhlciB0eXBlIG9mIHJ1bnMKKyAgLy8gICAgICAgICAgSW4gY2FzZSB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NzIDsgRFNUIGFkZHJlc3MKKyAgCisjZGVmaW5lIEhSVF9HRENfQ09ORklHX0NNRCAgICAgICAgICAgICAxCisjZGVmaW5lIEhSVF9HRENfREFUQV9DTUQgICAgICAgICAgICAgICAwCisKKworI2RlZmluZSBIUlRfR0RDX0NNRF9QT1MgICAgICAgICAgICAgICAzMQorI2RlZmluZSBIUlRfR0RDX0NNRF9CSVRTICAgICAgICAgICAgICAgMQorI2RlZmluZSBIUlRfR0RDX0NSVU5fUE9TICAgICAgICAgICAgICAzMAorI2RlZmluZSBIUlRfR0RDX1JFR19JRF9QT1MgICAgICAgICAgICAyNQorI2RlZmluZSBIUlRfR0RDX1JFR19JRF9CSVRTICAgICAgICAgICAgNQorI2RlZmluZSBIUlRfR0RDX0RBVEFfUE9TICAgICAgICAgICAgICAgMAorI2RlZmluZSBIUlRfR0RDX0RBVEFfQklUUyAgICAgICAgICAgICAyNQorCisjZGVmaW5lIEhSVF9HRENfRlJZSVBYRlJYX0JJVFMgICAgICAgIDI2CisjZGVmaW5lIEhSVF9HRENfUDBYX0JJVFMgICAgICAgICAgICAgIDIzCisKKworI2RlZmluZSBIUlRfR0RDX01BWF9PWERJTSAgICAgICAgICAgKDgxOTItNjQpCisjZGVmaW5lIEhSVF9HRENfTUFYX09ZRElNICAgICAgICAgICA0MDk1CisjZGVmaW5lIEhSVF9HRENfTUFYX0lYRElNICAgICAgICAgICAoODE5Mi02NCkKKyNkZWZpbmUgSFJUX0dEQ19NQVhfSVlESU0gICAgICAgICAgIDQwOTUKKyNkZWZpbmUgSFJUX0dEQ19NQVhfRFNfRkFDICAgICAgICAgICAgMTYKKyNkZWZpbmUgSFJUX0dEQ19NQVhfRFggICAgICAgICAgICAgICAgIChIUlRfR0RDX01BWF9EU19GQUMqSFJUX0dEQ19OIC0gMSkKKyNkZWZpbmUgSFJUX0dEQ19NQVhfRFkgICAgICAgICAgICAgICAgIEhSVF9HRENfTUFYX0RYCisKKworLyogR0RDIGxvb2t1cCB0YWJ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JUX0dEQ19DSEtfRU5HSU5FX0lEWCAgICAgICAgMAorI2RlZmluZSBIUlRfR0RDX1dPSVhfSURYICAgICAgICAgICAgICAxCisjZGVmaW5lIEhSVF9HRENfV09JWV9JRFggICAgICAgICAgICAgIDIKKyNkZWZpbmUgSFJUX0dEQ19CUFBfSURYICAgICAgICAgICAgICAgMworI2RlZmluZSBIUlRfR0RDX0ZSWUlQWEZSWF9JRFggICAgICAgICA0CisjZGVmaW5lIEhSVF9HRENfT1hESU1fSURYICAgICAgICAgICAgIDUKKyNkZWZpbmUgSFJUX0dEQ19PWURJTV9JRFggICAgICAgICAgICAgNgorI2RlZmluZSBIUlRfR0RDX1NSQ19BRERSX0lEWCAgICAgICAgICA3CisjZGVmaW5lIEhSVF9HRENfU1JDX0VORF9BRERSX0lEWCAgICAgIDgKKyNkZWZpbmUgSFJUX0dEQ19TUkNfV1JBUF9BRERSX0lEWCAgICAgOQorI2RlZmluZSBIUlRfR0RDX1NSQ19TVFJJREVfSURYICAgICAgIDEwCisjZGVmaW5lIEhSVF9HRENfRFNUX0FERFJfSURYICAgICAgICAgMTEKKyNkZWZpbmUgSFJUX0dEQ19EU1RfU1RSSURFX0lEWCAgICAgICAxMgorI2RlZmluZSBIUlRfR0RDX0RYX0lEWCAgICAgICAgICAgICAgIDEzCisjZGVmaW5lIEhSVF9HRENfRFlfSURYICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgSFJUX0dEQ19QMFhfSURYICAgICAgICAgICAgICAxNQorI2RlZmluZSBIUlRfR0RDX1AwWV9JRFggICAgICAgICAgICAgIDE2CisjZGVmaW5lIEhSVF9HRENfUDFYX0lEWCAgICAgICAgICAgICAgMTcKKyNkZWZpbmUgSFJUX0dEQ19QMVlfSURYICAgICAgICAgICAgICAxOAorI2RlZmluZSBIUlRfR0RDX1AyWF9JRFggICAgICAgICAgICAgIDE5CisjZGVmaW5lIEhSVF9HRENfUDJZX0lEWCAgICAgICAgICAgICAgMjAKKyNkZWZpbmUgSFJ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FVSUE9TRS4gIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisgKiBtb3JlIGRldGFpbHMuCisgKi8KKworI2lmbmRlZiBfZ3BfdGltZXJfZGVmc19oCisjZGVmaW5lIF9ncF90aW1lcl9kZWZzX2gKKworI2RlZmluZSBfSFJUX0dQX1RJTUVSX1JFR19BTElHTiA0CisKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9SRVNFVF9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX1RJTUVSX09WRVJBTExfRU5BQkxFX1JFR19JRFggICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfRU5BQkxFX1JFR19JRFgodGltZXIpICAgICAgICAgICAgICAgICAgICAgKEhJVkVfR1BfVElNRVJfT1ZFUkFMTF9FTkFCTEVfUkVHX0lEWCArIDEgKyB0aW1lcikKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9WQUxVRV9SRUdfSURYKHRpbWVyLHRpbWVycykgICAgICAgICAgICAgICAoSElWRV9HUF9USU1FUl9FTkFCTEVfUkVHX0lEWCh0aW1lcnMpICsgdGltZXIpCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfQ09VTlRfVFlQRV9SRUdfSURYKHRpbWVyLHRpbWVycykgICAgICAgICAgKEhJVkVfR1BfVElNRVJfVkFMVUVfUkVHX0lEWCh0aW1lcnMsIHRpbWVycykgKyB0aW1lcikKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9TSUdOQUxfU0VMRUNUX1JFR19JRFgodGltZXIsdGltZXJzKSAgICAgICAoSElWRV9HUF9USU1FUl9DT1VOVF9UWVBFX1JFR19JRFgodGltZXJzLCB0aW1lcnMpICsgdGltZXIpCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVJRX1RSSUdHRVJfVkFMVUVfUkVHX0lEWChpcnEsdGltZXJzKSAgICAgKEhJVkVfR1BfVElNRVJfU0lHTkFMX1NFTEVDVF9SRUdfSURYKHRpbWVycywgdGltZXJzKSArIGlycSkKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JUlFfVElNRVJfU0VMRUNUX1JFR19JRFgoaXJxLHRpbWVycyxpcnFzKSAoSElWRV9HUF9USU1FUl9JUlFfVFJJR0dFUl9WQUxVRV9SRUdfSURYKGlycXMsIHRpbWVycykgKyBpcnEpCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVJRX0VOQUJMRV9SRUdfSURYKGlycSx0aW1lcnMsaXJxcykgICAgICAgKEhJVkVfR1BfVElNRVJfSVJRX1RJTUVSX1NFTEVDVF9SRUdfSURYKGlycXMsIHRpbWVycywgaXJxcykgKyBpcnEpCisKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9DT1VOVF9UWVBFX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX1RJTUVSX0NPVU5UX1RZUEVfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfQ09VTlRfVFlQRV9QT1NFREdFICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9DT1VOVF9UWVBFX05FR0VER0UgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX1RJTUVSX0NPVU5UX1RZUEVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisKKyNlbmRpZiAvKiBfZ3BfdGltZXJfZGVmc19oICovICAgCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvbWVkaWEvYXRvbWlzcC9wY2kvYXRvbWlzcDIvY3NzMjQwMC9jc3NfMjQwMV9zeXN0ZW0vaHJ0L2dwaW9fYmxvY2tfZGVmcy5oIGIvZHJpdmVycy9zdGFnaW5nL21lZGlhL2F0b21pc3AvcGNpL2F0b21pc3AyL2NzczI0MDAvY3Nz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gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzFfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzIgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzJfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzMgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzNfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzQgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzRfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzUgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzVfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzYgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzZfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzcgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzdfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzggICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzhfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzkgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzlfQklUX0lEICAgICAgICAgICwgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2dwaW9fcGluXzEwICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzEwX0JJVF9JRCAgICAgICAgICwgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfZ3Bpb19waW5fMTEgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMTFfQklUX0lEICAgICAgICAgLCAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9zcCAgICAgICAgICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9TUF9CSVRfSUQgICAgICAgICAgICAgICAgICAsICAgICAgICAgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2lzcCAgICAgICAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0lTUF9CSVRfSUQgICAgICAgICAgICAgICAgICwgICAgICAgICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9pc3lzICAgICAgICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9JU1lTX0JJVF9JRCAgICAgICAgICAgICAgICAsICAgICAgICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9pc2VsICAgICAgICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9JU0VMX0JJVF9JRCAgICAgICAgICAgICAgICAsICAgICAgICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9pZm10ICAgICAgICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9JRk1UX0JJVF9JRCAgICAgICAgICAgICAgICAsICAgICAgICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9zcF9zdHJlYW1fbW9uICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9TUF9TVFJFQU1fTU9OX0JJVF9JRCAgICAgICAsICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9pc3Bfc3RyZWFtX21vbiAgICA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wX2Nzc19pcnFfZ3BfdGltZXJfMSAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfR1BfVElNRVJfMV9CSVRfSUQgICAgICAgICAgLCAgICAgICAgICAgICAgIAorICBocnRfaXNwX2Nzc19pcnFfc3dfcGluXzAgICAgICAgICAgICAgPSBISVZFX0dQX0RFVl9JUlFfU1dfUElOXzBfQklUX0lEICAgICAgICAgICAgLCAgICAgICAgICAgICAgICAgCisgIGhydF9pc3BfY3NzX2lycV9zd19waW5fMSAgICAgICAgICAgICA9IEhJVkVfR1BfREVWX0lSUV9TV19QSU5fMV9CSVRfSUQgICAgICAgICAgICAsICAgICAgICAgICAgICAgICAKKyAgaHJ0X2lzcF9jc3NfaXJxX2RtYSAgICAgICAgICAgICAgICAgID0gSElWRV9HUF9ERVZfSVJRX0RNQV9CSVRfSUQgICAgICAgICAgICAgICAgICwKKyAgaHJ0X2lzcF9jc3NfaXJxX3NwX3N0cmVhbV9tb25fYiAgICAgID0gSElWRV9HUF9ERVZfSVJRX1NQX1NUUkVBTV9NT05fQl9CSVRfSUQgICAgICwKKyAgLyogdGhpcyBtdXN0IChvYnZpb3VzbHkpIGJlIHRoZSBsYXN0IG9uIGluIHRoZSBlbnVtICovCisgIGhydF9pc3BfY3NzX2lycV9udW1faXJxcworfSBocnRfaXNwX2Nzc19pcnFfdDsKKwordHlwZWRlZiBlbnVtIGhydF9pc3BfY3NzX2lycV9zdGF0dXMgeworICBocnRfaXNwX2Nzc19pcnFfc3RhdHVzX2Vycm9yLAorICBocnRfaXNwX2Nzc19pcnFfc3RhdHVzX21vcmVfaXJxcywKKyAgaHJ0X2lzcF9jc3NfaXJxX3N0YXR1c19zdWNjZXNzCit9IGhydF9pc3BfY3NzX2lycV9zdGF0dXNfdDsKKworI2VuZGlmIC8qIF9ISVZFX0lTUF9DU1NfMjQwMV9JUlFfVFlQRVNfSFJUX0hfICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvbWVkaWEvYXRv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x1ZSB3YXMgIDggKi8KKyNkZWZpbmUgSElWRV9ETUFfQ01EX0ZJRk9fREVQVEggICAgIDI0IC8qIG9sZCB2YWx1ZSB3YXMgMTIgKi8KKworI2RlZmluZSBISVZFX0lGX1BJWEVMX1dJRFRIIDEyCisKKyNkZWZpbmUgSElWRV9NTVVfVExCX1NFVFMgICAgICAgICAgIDgKKyNkZWZpbmUgSElWRV9NTVVfVExCX1NFVF9CTE9DS1MgICAgIDgKKyNkZWZpbmUgSElWRV9NTVVfVExCX0JMT0NLX0VMRU1FTlRTIDgKKyNkZWZpbmUgSElWRV9NTVVfUEFHRV9UQUJMRV9MRVZFTFMgIDIKKyNkZWZpbmUgSElWRV9NTVVfUEFHRV9CWVRFUyAgICAgICAgIEhJVkVfSVNQX1BBR0VfU0laRQorCisjZGVmaW5lIEhJVkVfSVNQX0NIX0lEX0JJVFMgICAgMgorI2RlZmluZSBISVZFX0lTUF9GTVRfVFlQRV9CSVRTIDUKKyNkZWZpbmUgSElWRV9JU1BfSVNFTF9TRUxfQklUUyAyCisKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NEUkFNX1dBS0VVUF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BfUkVHU19JRExFX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQX1JFR1NfSVJRXzBfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9HUF9SRUdTX0lSUV8xX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUF9TVFJFQU1fU1RBVF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1BfU1RSRUFNX1NUQVRfQl9JRFggICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9HUF9SRUdTX0lTUF9TVFJFQU1fU1RBVF9JRFggICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfR1BfUkVHU19NT0RfU1RSRUFNX1NUQVRfSURYICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBISVZFX0dQX1JFR1NfU1BfU1RSRUFNX1NUQVRfSVJRX0NPTkRfSURYICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NQX1NUUkVBTV9TVEFUX0JfSVJRX0NPTkRfSURYICAgICAgICAgICAgICA5CisjZGVmaW5lIEhJVkVfR1BfUkVHU19JU1BfU1RSRUFNX1NUQVRfSVJRX0NPTkRfSURYICAgICAgICAgICAgICAxMAorI2RlZmluZSBISVZFX0dQX1JFR1NfTU9EX1NUUkVBTV9TVEFUX0lSUV9DT05EX0lEWCAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NQX1NUUkVBTV9TVEFUX0lSUV9FTkFCTEVfSURYICAgICAgICAgICAgIDEyCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUF9TVFJFQU1fU1RBVF9CX0lSUV9FTkFCTEVfSURYICAgICAgICAgICAxMworI2RlZmluZSBISVZFX0dQX1JFR1NfSVNQX1NUUkVBTV9TVEFUX0lSUV9FTkFCTEVfSURYICAgICAgICAgICAgMTQKKyNkZWZpbmUgSElWRV9HUF9SRUdTX01PRF9TVFJFQU1fU1RBVF9JUlFfRU5BQkxFX0lEWCAgICAgICAgICAgIDE1CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TV0lUQ0hfUFJJTV9JRl9JRFggICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBISVZFX0dQX1JFR1NfU1dJVENIX0dEQzFfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMTcKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NXSVRDSF9HREMyX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOQorI2RlZmluZSBISVZFX0dQX1JFR1NfU0xWX1JFR19TUlNUX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgMjAKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NXSVRDSF9JU1lTX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxCisKKy8qIEJpdCBudW1iZXJzIG9mIHRoZSBzb2Z0IHJlc2V0IHJlZ2lzdGVyICovCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lTWVNfQ0JVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9JU0VMX0NCVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfSUZNVF9DQlVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0dQREVWX0NCVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfVEMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0dQVElNRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9GQUNFTExGSUZPUyAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfRF9PU1lTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0lGVF9TRUNfUElQRSAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9HREMxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfR0RDMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1ZFQ19CVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9JU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0xWX0dSUF9CVVMgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9JU1BfU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0ZfUElGX0NFTExTICAgICAgICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NGX1NJRl9TUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9NQ19TUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTkKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0ZfSVNZU19TUCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NGX0RNQV9DRUxMUyAgICAgICAgICAgICAgICAgICAgICAgICAyMQorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9TRl9HREMxX0NFTExTICAgICAgICAgICAgICAgICAgICAgICAgMjIKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfU0ZfR0RDMl9DRUxMUyAgICAgICAgICAgICAgICAgICAgICAgIDIzCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9PQ1AyQ0lPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjUKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfTkJVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX0hPU1QxMkJVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNworI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9XQlVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjgKKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NSU1RfSUNfT1NZUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5CisjZGVmaW5lIEhJVkVfR1BfUkVHU19TUlNUX1dCVVNfSUMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMAorI2RlZmluZSBISVZFX0dQX1JFR1NfU1JTVF9JU1lTX0lOUF9CVUZfQlVTICAgICAgICAgICAgICAgICAgICAgMzEKKworLyogQml0IG51bWJlcnMgb2YgdGhlIHNsYXZlIHJlZ2lzdGVyIHNvZnQgcmVzZXQgcmVnaXN0ZXIgKi8KKyNkZWZpbmUgSElWRV9HUF9SRUdTX1NMVl9SRUdfU1JTVF9ETUEgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BfUkVHU19TTFZfUkVHX1NSU1RfR0RDMSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQX1JFR1NfU0xWX1JFR19TUlNUX0dEQzIgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKworLyogb3JkZXIgb2YgdGhlIGlucHV0IGJpdHMgZm9yIHRoZSBpcnEgY29udHJvbGxlciAqLworI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fMF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8yX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fM19CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzRfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl81X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fNl9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzdfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl84X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fOV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzEwX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl8xMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfU1BfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0lTUF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9JU1lTX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSVNFTF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0lGTVRfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9TUF9TVFJFQU1fTU9OX0JJVF9JRCAgICAgICAgICAgICAgICAgICAxNworI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSVNQX1NUUkVBTV9NT05fQklUX0lEICAgICAgICAgICAgICAgICAgMTgKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX01PRF9TVFJFQU1fTU9OX0JJVF9JRCAgICAgICAgICAgICAgICAgIDE5CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9JUzI0MDFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAyMAorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfSVNQX0JBTUVNX0VSUk9SX0JJVF9JRCAgICAgICAgICAgICAgICAgMjEKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX0lTUF9ETUVNX0VSUk9SX0JJVF9JRCAgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9TUF9JQ0FDSEVfTUVNX0VSUk9SX0JJVF9JRCAgICAgICAgICAgICAyMworI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfU1BfRE1FTV9FUlJPUl9CSVRfSUQgICAgICAgICAgICAgICAgICAgMjQKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX01NVV9DQUNIRV9NRU1fRVJST1JfQklUX0lEICAgICAgICAgICAgIDI1CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9HUF9USU1FUl8wX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAyNgorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfR1BfVElNRVJfMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgMjcKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX1NXX1BJTl8wX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgIDI4CisjZGVmaW5lIEhJVkVfR1BfREVWX0lSUV9TV19QSU5fMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAyOQorI2RlZmluZSBISVZFX0dQX0RFVl9JUlFfRE1BX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzAKKyNkZWZpbmUgSElWRV9HUF9ERVZfSVJRX1NQX1NUUkVBTV9NT05fQl9CSVRfSUQgICAgICAgICAgICAgICAgIDMxCisKKyNkZWZpbmUgSElWRV9HUF9SRUdTX05VTV9TV19JUlFfUkVHUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisKKy8qIG9yZGVyIG9mIHRoZSBpbnB1dCBiaXRzIGZvciB0aGUgdGltZWQgY29udHJvbGxlciAqLworI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl8wX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl8xX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl8yX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl8zX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl80X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl81X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl82X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl83X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl84X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl85X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl8xMF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUElPX1BJTl8xMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19TUF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19JU1BfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBISVZFX0dQX0RFVl9UQ19JU1lTX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19JU0VMX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19JRk1UX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUF9USU1FUl8wX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAxNworI2RlZmluZSBISVZFX0dQX0RFVl9UQ19HUF9USU1FUl8xX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAxOAorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19NSVBJX1NPTF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAxOQorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19NSVBJX0VPTF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAyMAorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19NSVBJX1NPRl9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAyMQorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19NSVBJX0VPRl9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAyMgorI2RlZmluZSBISVZFX0dQX0RFVl9UQ19JTlBTWVNfU00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMworCisvKiBkZWZpbml0aW9ucyBmb3IgdGhlIGdwX3RpbWVyIGJsb2NrICovCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0dQX1RJTUVSXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9HUF9USU1FUl8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX0dQX1RJTUVSXzQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9HUF9USU1FUl81ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX0dQX1RJTUVSXzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9OVU1fQ09VTlRFUlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JUlFfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVJRXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQX1RJTUVSX05VTV9JUlFTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKworI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fMF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT18yX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fM19CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzRfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT181X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fNl9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzdfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT184X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBISVZFX0dQX1RJTUVSX0dQSU9fOV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9HUElPXzEwX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfR1BJT18xMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lOUF9TWVNfSVJRICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU0VMX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSUZNVF9JUlEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBISVZFX0dQX1RJTUVSX1NQX1NUUk1PTl9JUlEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9TUF9CX1NUUk1PTl9JUlEgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX1NUUk1PTl9JUlEgICAgICAgICAgICAgICAgICAgICAgICAgICAxNworI2RlZmluZSBISVZFX0dQX1RJTUVSX01PRF9TVFJNT05fSVJRICAgICAgICAgICAgICAgICAgICAgICAgICAgMTgKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JUzI0MDFfSVJRICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE5CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX0JBTUVNX0VSUk9SX0lSUSAgICAgICAgICAgICAgICAgICAg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gICAgICAgNDUKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfV0lSRV9ERUJVR19MTV9NU0lOS19SVU5fSTJfSTMgICAgICAgIDQ2CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0kyX0k0ICAgICAgICA0NworI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTUF9XSVJFX0RFQlVHX0xNX01TSU5LX1JVTl9JMl9JNSAgICAgICAgNDgKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfV0lSRV9ERUJVR19MTV9NU0lOS19SVU5fSTJfSTYgICAgICAgIDQ5CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0kzX0kwICAgICAgICA1MAorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTUF9XSVJFX0RFQlVHX0xNX01TSU5LX1JVTl9JNF9JMCAgICAgICAgNTEKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9JU1BfV0lSRV9ERUJVR19MTV9NU0lOS19SVU5fSTVfSTAgICAgICAgIDUyCisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSVNQX1dJUkVfREVCVUdfTE1fTVNJTktfUlVOX0k2X0kwICAgICAgICA1MworI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTUF9XSVJFX0RFQlVHX0xNX01TSU5LX1JVTl9JN19JMCAgICAgICAgNTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9NSVBJX1NPTF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgIDU1CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfTUlQSV9FT0xfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICA1NgorI2RlZmluZSBISVZFX0dQX1RJTUVSX01JUElfU09GX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgICAgNTcKKyNkZWZpbmUgSElWRV9HUF9USU1FUl9NSVBJX0VPRl9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgICAgIDU4CisjZGVmaW5lIEhJVkVfR1BfVElNRVJfSU5QU1lTX1NNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OQorI2RlZmluZSBISVZFX0dQX1RJTUVSX0lTUF9QTUVNX0VSUk9SX0lSUSAgICAgICAgICAgICAgICAgICAgICAgNjAKKworLyogcG9ydCBkZWZpbml0aW9ucyBmb3IgdGhlIHN0cmVhbWluZyBtb25pdG9ycyAqLworLyogcG9ydCBkZWZpbml0aXRpb25zIFNQIHN0cmVhbWluZyBtb25pdG9yLCBtb25pdG9ycyB0aGUgc3RhdHVzIG9mIHN0cmVhbWluZyBwb3J0cyBhdCB0aGUgU1Agc2lkZSBvZiB0aGUgc3RyZWFtaW5nIEZJRk8ncyAqLworI2RlZmluZSBTUF9TVFJfTU9OX1BPUlRfU1AyU0lGICAgICAgICAgICAgMAorI2RlZmluZSBTUF9TVFJfTU9OX1BPUlRfU0lGMlNQICAgICAgICAgICAgMQorI2RlZmluZSBTUF9TVFJfTU9OX1BPUlRfU1AyTUMgICAgICAgICAgICAgMiAKKyNkZWZpbmUgU1BfU1RSX01PTl9QT1JUX01DMlNQICAgICAgICAgICAgIDMKKyNkZWZpbmUgU1BfU1RSX01PTl9QT1JUX1NQMkRNQSAgICAgICAgICAgIDQgCisjZGVmaW5lIFNQX1NUUl9NT05fUE9SVF9ETUEyU1AgICAgICAgICAgICA1CisjZGVmaW5lIFNQX1NUUl9NT05fUE9SVF9TUDJJU1AgICAgICAgICAgICA2IAorI2RlZmluZSBTUF9TVFJfTU9OX1BPUlRfSVNQMlNQICAgICAgICAgICAgNworI2RlZmluZSBTUF9TVFJfTU9OX1BPUlRfU1AyR1BEICAgICAgICAgICAgOAorI2RlZmluZSBTUF9TVFJfTU9OX1BPUlRfRkEyU1AgICAgICAgICAgICAgO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NkZWZpbmUgTU9EX1NUUl9NT05fUE9SVF9HREMxMkNFTExTICAgICAgMTIKKyNkZWZpbmUgTU9EX1NUUl9NT05fUE9SVF9DRUxMUzJHREMxICAgICAgMTMKKyNkZWZpbmUgTU9EX1NUUl9NT05fUE9SVF9HREMyMkNFTExTICAgICAgMTQKKyNkZWZpbmUgTU9EX1NUUl9NT05fUE9SVF9DRUxMUzJHREMyICAgICAgMTUKKworI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1NORF9QSUZfQSAgICAgICAgMAorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1JDVl9QSUZfQSAgICAgICAgMQorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1NORF9QSUZfQiAgICAgICAgMgorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1JDVl9QSUZfQiAgICAgICAgMworI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1NORF9TSUYgICAgICAgICAgNAorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1JDVl9TSUYgICAgICAgICAgNQorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1NORF9NQyAgICAgICAgICAgNgorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1JDVl9NQyAgICAgICAgICAgNworI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1NORF9ETUEySVNQICAgICAgOAorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1JDVl9ETUFfRlJfSVNQICAgOQorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1NORF9ETUEyU1AgICAgICAxMAorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1JDVl9ETUFfRlJfU1AgICAxMQorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1NORF9HREMgICAgICAgICAxMgorI2RlZmluZSBNT0RfU1RSX01PTl9QT1JUX1JDVl9HREMgICAgICAgICAxMworCisKKy8qIHRlc3RiZW5jaCBzaWduYWxzOiAgICAgICAqLworCisvKiB0ZXN0YmVuY2ggR1AgYWRhcHRlciByZWdpc3RlciBpZHMgICovCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0dQSU9fREFUQV9PVVRfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9HUElPX0RJUl9PVVRfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfSVJRX1JFR19JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NEUkFNX1dBS0VVUF9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBISVZFX1RFU1RCRU5DSF9JRExFX1JFR19JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfR1BJT19EQVRBX0lOX1JFR19JRFggICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX01JUElfQkZNX0VOX1JFR19JRFggICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9DU0lfQ09ORklHX1JFR19JRFggICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfRERSX1NUQUxMX0VOX1JFR19JRFggICAgICAgICAgICAgICAgICAgICA4CisKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfSVNQX1BNRU1fRVJST1JfSVJRX1JFR19JRFggICAgICAgICAgICAgICA5CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX0lTUF9CQU1FTV9FUlJPUl9JUlFfUkVHX0lEWCAgICAgICAgICAgICAxMAorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9JU1BfRE1FTV9FUlJPUl9JUlFfUkVHX0lEWCAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU1BfSUNBQ0hFX01FTV9FUlJPUl9JUlFfUkVHX0lEWCAgICAgICAgIDEyCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NQX0RNRU1fRVJST1JfSVJRX1JFR19JRFggICAgICAgICAgICAgICAxMworCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX01JUElfUEFSUEFUSEVOX1JFR19JRFggICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9GQl9IUExMX0ZSRVFfUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfSVNDTEtfUkFUSU9fUkVHX0lEWCAgICAgICAgICAgICAgICAgICAgIDE2CisKKy8qIFNpZ25hbCBtb25pdG9yIGlucHV0IGJpdCBpZHMgKi8KKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl9PX0JJVF9JRCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fMV9CSVRfSUQgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOXzJfQklUX0lEICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl8zX0JJVF9JRCAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR19NT05fR1BJT19QSU5fNF9CSVRfSUQgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX1RFU1RCRU5DSF9TSUdfTU9OX0dQSU9fUElOXzVfQklUX0lEICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSElWRV9URVNUQkVOQ0hfU0lHX01PTl9HUElPX1BJTl82X0JJVF9JRCAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEhJVkVfVEVTVEJFTkNIX1NJR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ElWRV9JU0VMX0dQX1JFR1NfU1lOQ0dFTl9GUkVFX1JVTk5JTkdfSURYICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NZTkNHRU5fUEFVU0VfSURYICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TWU5DR0VOX05SX0ZSQU1FU19JRFggICAgICAgICAgICAgICAgIDMgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NZTkNHRU5fTlJfUElYX0lEWCAgICAgICAgICAgICAgICAgICAgNCAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TWU5DR0VOX05SX0xJTkVTX0lEWCAgICAgICAgICAgICAgICAgIDUgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1lOQ0dFTl9IQkxBTktfQ1lDTEVTX0lEWCAgICAgICAgICAgICA2ICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NZTkNHRU5fVkJMQU5LX0NZQ0xFU19JRFggICAgICAgICAgICAgNyAgICAgIAorCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NPRl9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfRU9GX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5IAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TT0xfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX0VPTF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMSAKKworI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19QUkJTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMTIgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfUFJCU19FTkFCTEVfUE9SVF9CICAgICAgICAgICAgICAgICAgIDEzICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1BSQlNfTEZTUl9SRVNFVF9WQUxVRSAgICAgICAgICAgICAgICAxNCAgICAgIAorCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAxNSAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfRU5BQkxFX1BPUlRfQiAgICAgICAgICAgICAgICAgICAgMTYgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX0hPUl9DTlRfTUFTS19JRFggICAgICAgICAgICAgICAgIDE3ICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19WRVJfQ05UX01BU0tfSURYICAgICAgICAgICAgICAgICAxOCAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfWFlfQ05UX01BU0tfSURYICAgICAgICAgICAgICAgICAgMTkgICAgICAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX0hPUl9DTlRfREVMVEFfSURYICAgICAgICAgICAgICAgIDIwICAgICAgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19WRVJfQ05UX0RFTFRBX0lEWCAgICAgICAgICAgICAgICAyMSAgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfTU9ERV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMjIgICAgIAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfUjFfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjMgCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19HMV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfQjFfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjUKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfVFBHX1IyX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2CisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1RQR19HMl9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAyNworI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19UUEdfQjJfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgMjgKKworCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX0NIX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOQorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19GTVRfVFlQRV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMzAKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfREFUQV9TRUxfSURYICAgICAgICAgICAgICAgICAgICAgICAgIDMxCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NCQU5EX1NFTF9JRFggICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TWU5DX1NFTF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMzMKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1JTVF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM3CisKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1JTVF9TWU5DR0VOX0JJVCAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfSVNFTF9HUF9SRUdTX1NSU1RfUFJCU19CSVQgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0lTRUxfR1BfUkVHU19TUlNUX1RQR19CSVQgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSElWRV9JU0VMX0dQX1JFR1NfU1JTVF9GSUZPX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EvMCAgWzM6MF0gLSAnYjAwMDEnCitbNzo0XSAtIENhcHRQb3J0SWQsCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBIAorICAgICAgICAgICAnYjAwMDEgLSBDYXB0QgorICAgICAgICAgICAnYjAwMTAgLSBDYXB0QworCitJbnBTeXNBY2tBRiAgMS8wICBbMzowXSAtICdiMDAxMAorSW5wU3lzQWNrT3ZlcnJ1bGVPTiAgMS8wICBbMzowXSAtICdiMDAxMSwgCitbNzo0XSAtIG92ZXJydWxlIHBvcnQgaWQgKG9waWQpCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBCisgICAgICAgICAgICdiMDAwMSAtIENhcHRCCisgICAgICAgICAgICdiMDAxMCAtIENhcHRDCisgICAgICAgICAgICdiMDAxMSAtIEFjcQorICAgICAgICAgICAnYjAxMDAgLSBETUEKKworCitJbnBTeXNBY2tPdmVycnVsZU9GRiAgMS8wICBbMzowXSAtICdiMDEwMCwgCitbNzo0XSAtIG92ZXJydWxlIHBvcnQgaWQgKG9waWQpCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBCisgICAgICAgICAgICdiMDAwMSAtIENhcHRCCisgICAgICAgICAgICdiMDAxMCAtIENhcHRDCisgICAgICAgICAgICdiMDAxMSAtIEFjcQorICAgICAgICAgICAnYjAxMDAgLSBETUEKKworCitJbnBTeXNBY2tPdmVycnVsZSAgMi8wICBbMzowXSAtICdiMDEwMSwgCitbNzo0XSAtIG92ZXJydWxlIHBvcnQgaWQgKG9waWQpCisgICAgICAgICAgICdiMDAwMCAtIENhcHRBCisgICAgICAgICAgICdiMDAwMSAtIENhcHRCCisgICAgICAgICAgICdiMDAxMCAtIENhcHRDCisgICAgICAgICAgICdiMDAxMSAtIEFjcQorICAgICAgICAgICAnYjAxMDAgLSBETUEKKworCisgIDIvMSAgWzMxOjBdIC0gYWNrbm93bGVkZ2UgdG9rZW4gdmFsdWUgZnJvbSBwb3J0IG9waWQKKworCisKKyovCisKKworLyogQ29tbWFuZCBhbm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DU0lfQ09ORklHX1NURVJFTzIgICAgICAgICAgICAgICAgOAorCisvKiBnZW5lcmFsIHB1cnBvc2UgcmVnaXN0ZXIgSURzICovCisKKy8qIFN0cmVhbSBNdWx0aWNhc3Qgc2VsZWN0IG1vZGVzICovCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19NVUxUSUNBU1RfQV9JRFggICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX01VTFRJQ0FTVF9CX0lEWCAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfTVVMVElDQVNUX0NfSURYICAgICAgICAgICAyCisKKy8qIFN0cmVhbSBNdXggc2VsZWN0IG1vZGVzICovCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19NVVhfSURYICAgICAgICAgICAgICAgICAgIDMKKworLyogc3RyZWFtaW5nIG1vbml0b3Igc3RhdHVzIGFuZCBjb250cm9sICovCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TVFJNT05fU1RBVF9JRFggICAgICAgICAgIDQKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX1NUUk1PTl9DT05EX0lEWCAgICAgICAgICAgNQorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfU1RSTU9OX0lSUV9FTl9JRFggICAgICAgICA2CisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19TUlNUX0lEWCAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9JU1lTX0dQUkVHX1NMVl9SRUdfU1JTVF9JRFggICAgICAgICAgOAorI2RlZmluZSBISVZFX0lTWVNfR1BSRUdfUkVHX1BPUlRfQV9JRFggICAgICAgICAgICA5CisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR19SRUdfUE9SVF9CX0lEWCAgICAgICAgICAgIDEwCisKKy8qIEJpdCBudW1iZXJzIG9mIHRoZSBzb2Z0IHJlc2V0IHJlZ2lzdGVyICovCisjZGVmaW5lIEhJVkVfSVNZU19HUFJFR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ElWRV9JU1lTX0lSUV9JTlBfQ1RSTF9DQVBBICAgICAgICAgICAxMworI2RlZmluZSBISVZFX0lTWVNfSVJRX0lOUF9DVFJMX0NBUEIgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfSVNZU19JUlFfSU5QX0NUUkxfQ0FQQyAgICAgICAgICAgMTUKKyNkZWZpbmUgSElWRV9JU1lTX0lSUV9DSU8yQUhCICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBISVZFX0lTWVNfSVJRX0RNQV9CSVRfSUQgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfSVNZU19JUlFfU1RSRUFNX01PTl9CSVRfSUQgICAgICAgMTgKKyNkZWZpbmUgSElWRV9JU1lTX0lSUV9OVU1fQklUUyAgICAgICAgICAgICAgICAxOQorCisvKiBETUEgKi8KKyNkZWZpbmUgSElWRV9JU1lTX0RNQV9DSEFOTkVMICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBISVZFX0lTWVNfRE1BX0lCVUZfRERSX0NPTk4gICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfSVNZU19ETUFfSEVJR0hUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSElWRV9JU1lTX0RNQV9FTEVNUyAgICAgICAgICAgICAgICAgICAgMSAvKiBib3RoIG1hc3RlciBidXNlcyBvZiBzYW1lIHdpZHRoICovCisjZGVmaW5lIEhJVkVfSVNZU19ETUFfU1RSSURFICAgICAgICAgICAgICAgICAgIDAgLyogbm8gc3RyaWRlIHJlcXVpcmVkIGFzIGhlaWdodCBpcyBmaXhlZCB0byAxICovCisjZGVmaW5lIEhJVkVfSVNZU19ETUFfQ1JPUCAgICAgICAgICAgICAgICAgICAgIDAgLyogbm8gY3JvcHBpbmcgKi8KKyNkZWZpbmUgSElWRV9JU1lTX0RNQV9FWFRFTlNJT04gICAgICAgICAgICAgICAgMCAvKiBubyBleHRlbnNpb24gYXMgZWxlbSB3aWR0aCBpcyBzYW1lIG9uIGJv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ovCisjZGVmaW5lIElTUF9CVVNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIElTUF9CVVNfQUREUl9XSURUSCAgICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIElTUF9CVVNfQlVSU1RfU0laRSAgICAgICAgICAgICAgICAgICAgIDEKKworLyogZGF0YS1wYXRoICovCisjZGVmaW5lIElTUF9TQ0FMQVJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIElTUF9TTElDRV9ORUxFTVMgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSVNQX1ZFQ19ORUxFTVMgICAgICAgICAgICAgICAgICAgICAgICAgNjQKKyNkZWZpbmUgSVNQX1ZFQ19FTEVNQklUUyAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgSVNQX1ZFQ19FTEVNOEJJVFMgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSVNQX0NMT05FX0RBVEFQQVRIX0lTXzE2ICAgICAgICAgICAgICAgMQorCisvKiBtZW1vcmllcyAqLworI2RlZmluZSBJU1BfRE1FTV9ERVBUSCAgICAgICAgICAgICAgICAgICAgICAgICA0MDk2CisjZGVmaW5lIElTUF9ETUVNX0JTRUxfRE9XTlNBTVBMRSAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgSVNQX1ZNRU1fREVQVEggICAgICAgICAgICAgICAgICAgICAgICAgMzA3MgorI2RlZmluZSBJU1BfVk1FTV9CU0VMX0RPV05TQU1QTEUgICAgICAgICAgICAgICA4CisjZGVmaW5lIElTUF9WTUVNX0VMRU1CSVRTICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIElTUF9WTUVNX0VMRU1fUFJFQ0lTSU9OICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIElTUF9WTUVNX0lTX0JBTUVNICAgICAgICAgICAgICAgICAgICAgIDEKKyNpZiBJU1BfVk1FTV9JU19CQU1F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TV9MVVRfQUREUl9XSURUSCAgICAgICAgMTQKKyAgI2RlZmluZSBJU1BfVk1FTV9CQU1FTV9IQUxGX0JMT0NLX1dSSVRFICAgICAgMQorICAjZGVmaW5lIElTUF9WTUVNX0JBTUVNX1NNQVJUX0ZFVENIICAgICAgICAgICAxCisgICNkZWZpbmUgSVNQX1ZNRU1fQkFNRU1fQklHX0VORElBTk5FU1MgICAgICAgIDAKKyNlbmRpZiAvKiBJU1BfVk1FTV9JU19CQU1FTSAqLworI2RlZmluZSBJU1BfUE1FTV9ERVBUSCAgICAgICAgICAgICAgICAgICAgICAgICAyMDQ4CisjZGVmaW5lIElTUF9QTUVNX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDY0MAorI2RlZmluZSBJU1BfVkFNRU1fQUREUkVTU19CSVRTICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBJU1BfVkFNRU1fRUxFTUJJVFMgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBJU1BfVkFNRU1fREVQVEggICAgICAgICAgICAgICAgICAgICAgICAyMDQ4CisjZGVmaW5lIElTUF9WQU1FTV9BTElHTk1FTlQgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVNQX1ZBX0FERFJFU1NfV0lEVEggICAgICAgICAgICAgICAgICAgODk2CisjZGVmaW5lIElTUF9WRUNfVkFMU1VfTEFURU5DWSAgICAgICAgICAgICAgICAgIElTUF9WRUNfTkVMRU1TCisjZGVmaW5lIElTUF9ISVNUX0FERFJFU1NfQklUUyAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIElTUF9ISVNUX0FMSUdOTUVOVCAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSVNQX0hJU1RfQ09NUF9JTl9QUkVDICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSVNQX0hJU1RfREVQVEggICAgICAgICAgICAgICAgICAgICAgICAgMTAyNAorI2RlZmluZSBJU1BfSElTVF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAyNAorI2RlZmluZSBJU1BfSElTVF9DT01QT05FTlRTICAgICAgICAgICAgICAgICAgICA0CisKKy8qIHByb2dyYW0gY291bnRlciAqLworI2RlZmluZSBJU1BfUENfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAxMworCisvKiBUZW1wbGF0ZSBzd2l0Y2hlcyAqLworI2RlZmluZSBJU1BfU0hJRUxEX0lOUFVUX0RNRU0gICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9TSElFTERfT1VUUFVUX0RNRU0gICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX1NISUVMRF9JTlBVVF9WTUVNICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfU0hJRUxEX09VVFBVVF9WTUVNICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9TSElFTERfSU5QVVRfUE1FTSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX1NISUVMRF9PVVRQVVRfUE1FTSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfU0hJRUxEX0lOUFVUX0hJU1QgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TSElFTERfT1VUUFVUX0hJU1QgICAgICAgICAgICAgICAgIDEKKy8qIFdoZW4gTFVUIGlzIHNlbGVjdCB0aGUgc2hpZWxkaW5nIGlzIGFsd2F5cyBvbiAqLworI2RlZmluZSBJU1BfU0hJRUxEX0lOUFVUX1ZBTUVNICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TSElFTERfT1VUUFVUX1ZBTUVNICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJU1BfSEFTX0lSUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9IQVNfU09GVF9SRVNFVCAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU19WRUNfRElWICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX1ZGVV9XXzJPICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9IQVNfREVJTlQzICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU19MVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSEFTX0hJU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9IQVNfVkFMU1UgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0hBU18zcmRWQUxTVSAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfVlJGMV9IQVNfMlAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSVNQX1NSVV9HVUFSRElORyAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfVkxTVV9HVUFSRElORyAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgSVNQX1ZSRl9SQU0gICAgIAkgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TUkZfUkFNICAgICAJICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIElTUF9TUExJVF9WTVVMX1ZBRERfSVMgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX1JGU1BMSVRfRlBHQSAgICAgICAgICAgICAgICAgICAgICAgMAorCisvKiBSU04gb3IgQnVzIHBpcGVsaW5pbmcgKi8KKyNkZWZpbmUgSVNQX1JTTl9QSVBFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfVlNGX0JVU19QSVBFICAgICAgICAgICAgICAgICAgICAgICAwCisKKy8qIGV4dHJhIHNsYXZlIHBvcnQgdG8gdm1lbSAqLworI2RlZmluZSBJU1BfSUZfVk1FTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9HRENfVk1FTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKworLyogU3RyZWFtaW5nIHBvcnRzICovCisjZGVmaW5lIElTUF9JRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0lGX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfR0RDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElTUF9TQ0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0dQRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKy8qIFJlbW92aW5nIElzc3VlIFNsb3QocykgKi8KKyNkZWZpbmUgSVNQX0hBU19OT1RfU0lNRF9JUzIgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTMyAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9IQVNfTk9UX1NJTURfSVM0ICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0hBU19OT1RfU0lNRF9JUzRfVkFERCAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTNSAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9IQVNfTk9UX1NJTURfSVM2ICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0hBU19OT1RfU0lNRF9JUzcgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfSEFTX05PVF9TSU1EX0lTOCAgICAgICAgICAgICAgICAgICAwCisKKy8qIElDYWNoZSAgKi8KKyNkZWZpbmUgSVNQX0lDQUNIRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJU1BfSUNBQ0hFX09OTFkgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9JQ0FDSEVfUFJFRkVUQ0ggICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0lDQUNIRV9JTkRFWF9CSVRTICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBJU1BfSUNBQ0hFX1NFVF9CSVRTICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIElTUF9JQ0FDSEVfQkxPQ0tTX1BFUl9TRVRfQklUUyAgICAgICAgIDEKKworLyogRXhwZXJpbWVudGFsIEZsYWdzICovCisjZGVmaW5lIElTUF9FWFBfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0VYUF8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfRVhQXzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElTUF9FWFBfNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSVNQX0VYUF81ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJU1BfRVhQXzYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisKKy8qIERlcml2ZWQgdmFsdWVzICovCisjZGVmaW5lIElTUF9MT0cyX1BNRU1fV0lEVEggICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIElTUF9WRUNfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDg5NgorI2RlZmluZSBJU1BfU0xJQ0VfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICA1NgorI2RlZmluZSBJU1BfVk1FTV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICA4OTYKKyNkZWZpbmUgSVNQX1ZNRU1fQUxJR04gICAgICAgICAgICAgICAgICAgICAgICAgMTI4CisjaWYgSVNQX1ZNRU1fSVNfQkFNRU0KKyAgI2RlZmluZSBJU1BfVk1FTV9BTElHTl9FTEVNICAgICAgICAgICAgICAgICAgMgorI2VuZGlmIC8qIElTUF9WTUVNX0lTX0JBTUVNICovCisjZGVmaW5lIElTUF9TSU1ETFNVICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVNQX0xTVV9JTU1fQklUUyAgICAgICAgICAgICAgICAgICAgICAgMTIKKworLyogY29udmVuaWVudCBzaG9ydGN1dHMgZm9yIHNvZnR3YXJlKi8KKyNkZWZpbmUgSVNQX05XQVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSVNQX1ZFQ19ORUxFTVMKKyNkZWZpbmUgTkJJVFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSVNQX1ZFQ19FTEVNQklUUworCisjZGVmaW5lIF9pc3BfY2VpbF9kaXYoYSxiKSAgICAgICAgICAgICAgICAgICAgICgoKGEpKyhiKS0xKS8oYikpCisKKyNpZmRlZiBDX1JVTgorI2RlZmluZSBJU1BfVkVDX0FMSUdOICAgICAgICAgICAgICAgICAgICAgICAgICAoX2lzcF9jZWlsX2RpdihJU1BfVkVDX1dJRFRILCA2NCkqOCkKKyNlbHNlCisjZGVmaW5lIElTUF9WRUNfQUxJR04gICAgICAgICAgICAgICAgICAgICAgICAgIElTUF9WTUVNX0FMSUdOCisjZW5kaWYKKworLyogSFJUIHNwZWNpZmljIHZlY3RvciBzdXBwb3J0ICovCisjZGVmaW5lIGlzcDI0MDFfbWFtb2lhZGFfdmVjdG9yX2FsaWdubWVudCAgICAgICAgIElTUF9WRUNfQUxJR04KKyNkZWZpbmUgaXNwMjQwMV9tYW1vaWFkYV92ZWN0b3JfZWxlbV9iaXRzICAgICAgICAgSVNQX1ZNRU1fRUxFTUJJVFMKKyNkZWZpbmUgaXNwMjQwMV9tYW1vaWFkYV92ZWN0b3JfZWxlbV9wcmVjaXNpb24gICAgSVNQX1ZNRU1fRUxFTV9QUkVDSVNJT04KKyNkZWZpbmUgaXNwMjQwMV9tYW1vaWFkYV92ZWN0b3JfbnVtX2VsZW1zICAgICAgICAgSV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ICAgMQorI2RlZmluZSBBQ1FfTlVNX01FTV9SRUdJT05TX1JFR19JRCAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFDUV9JTklUX1JFR19JRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgCisjZGVmaW5lIEFDUV9SRUNFSVZFRF9TSE9SVF9QQUNLRVRTX1JFR19JRCAgICAgICAgIDQKKyNkZWZpbmUgQUNRX1JFQ0VJVkVEX0xPTkdfUEFDS0VUU19SRUdfSUQgICAgICAgICAgNQorI2RlZmluZSBBQ1FfTEFTVF9DT01NQU5EX1JFR19JRCAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEFDUV9ORVhUX0NPTU1BTkRfUkVHX0lEICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgQUNRX0xBU1RfQUNLTk9XTEVER0VfUkVHX0lEICAgICAgICAgICAgICAgOAorI2RlZmluZSBBQ1FfTkVYVF9BQ0tOT1dMRURHRV9SRUdfSUQgICAgICAgICAgICAgICA5CisjZGVmaW5lIEFDUV9GU01fU1RBVEVfSU5GT19SRUdfSUQgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEFDUV9JTlRfQ05UUl9JTkZPX1JFR19JRCAgICAgICAgICAgICAgICAgIDExCisgCisvLyBSZWdpc3RlciB3aWR0aAorI2RlZmluZSBBQ1FfU1RBUlRfQUREUl9SRUdfV0lEVEggICAgICAgICAgICAgICAgICA5ICAgICAgICAgICAgICAgCisjZGVmaW5lIEFDUV9NRU1fUkVHSU9OX1NJWkVfUkVHX1dJRFRIICAgICAgICAgICAgIDkgIAorI2RlZmluZSBBQ1FfTlVNX01FTV9SRUdJT05TX1JFR19XSURUSCAgICAgICAgICAgICA5ICAKKyNkZWZpbmUgQUNRX0lOSVRfUkVHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgMyAgCisjZGVmaW5lIEFDUV9SRUNFSVZFRF9TSE9SVF9QQUNLRVRTX1JFR19XSURUSCAgICAgIDMyIAorI2RlZmluZSBBQ1FfUkVDRUlWRURfTE9OR19QQUNLRVRTX1JFR19XSURUSCAgICAgICAzMiAgCisjZGVmaW5lIEFDUV9MQVNUX0NPTU1BTkRfUkVHX1dJRFRIICAgICAgICAgICAgICAgIDMyICAKKyNkZWZpbmUgQUNRX05FWFRfQ09NTUFORF9SRUdfV0lEVEggICAgICAgICAgICAgICAgMzIgIAorI2RlZmluZSBBQ1FfTEFTVF9BQ0tOT1dMRURHRV9SRUdfV0lEVEggICAgICAgICAgICAzMiAgCisjZGVmaW5lIEFDUV9ORVhUX0FDS05PV0xFREdFX1JFR19XSURUSCAgICAgICAgICAgIDMyICAKKyNkZWZpbmUgQUNRX0ZTTV9TVEFURV9JTkZPX1JFR19XSURUSCAgICAgICAgICAgICAgKChNRU0yU1RSRUFNX0ZTTV9TVEFURV9CSVRTICogMykgKyAoQUNRX1NZTkNIUk9OSVpFUl9GU01fU1RBVEVfQklUUyAqMykpCisjZGVmaW5lIEFDUV9JTlRfQ05UUl9JTkZPX1JFR19XSURUSCAgICAgICAgICAgICAgIDMyCisKKy8qIHJlZ2lzdGVyIHJlc2V0IHZhbHVlICovCisjZGVmaW5lIEFDUV9TVEFSVF9BRERSX1JFR19SU1RWQUwgICAgICAgICAgICAgICAgIDAgICAgICAgICAgICAgIAorI2RlZmluZSBBQ1FfTUVNX1JFR0lPTl9TSVpFX1JFR19SU1RWQUwgICAgICAgICAgICAxMjgKKyNkZWZpbmUgQUNRX05VTV9NRU1fUkVHSU9OU19SRUdfUlNUVkFMICAgICAgICAgICAgMworI2RlZmluZSBBQ1FfSU5JVF9SRUdfUlNUVkFMICAgICAgICAgICAgICAgICAgICAgICAwICAgICAgICAgICAgICAgICAgICAgICAgICAgCisjZGVmaW5lIEFDUV9SRUNFSVZFRF9TSE9SVF9QQUNLRVRTX1JFR19SU1RWQUwgICAgIDAKKyNkZWZpbmUgQUNRX1JFQ0VJVkVEX0xPTkdfUEFDS0VUU19SRUdfUlNUVkFMICAgICAgMAorI2RlZm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9LRU5fSURfTFNCICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUV9UT0tFTl9JRF9NU0IgICAgICAgICAgICAgICAgICAgICAgICAgIDMgICAgICAgICAgICAKKyNkZWZpbmUgQUNRX1RPS0VOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgKEFDUV9UT0tFTl9JRF9NU0IgLSBBQ1FfVE9LRU5fSURfTFNCICArIDEpIC8vIDQKKyNkZWZpbmUgQUNRX1RPS0VOX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1FfVE9LRU5fSURfQklUUyAgICAgICAgICAgICAgICAgICAgICAgICBBQ1FfVE9LRU5fV0lEVEgKKyNkZWZpbmUgQUNRX0lOSVRfQ01EX0lOSVRfSURYICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBBQ1FfSU5JVF9DTURfSU5JVF9CSVRTICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEFDUV9DTURfU1RBUlRfQUREUl9JRFggICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQUNRX0NNRF9TVEFSVF9BRERSX0JJVFMgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBBQ1FfQ01EX05PRldPUkRTX0lEWCAgICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBBQ1FfQ01EX05PRldPUkRTX0JJVFMgICAgICAgICAgICAgICAgICAgICA5ICAKKyNkZWZpbmUgQUNRX01FTV9SRUdJT05fSURfSURYICAgICAgICAgICAgICAgICAgICAgMjIKKyNkZWZpbmUgQUNRX01FTV9SRUdJT05fSURfQklUUyAgICAgICAgICAgICAgICAgICAgOSAKKyNkZWZpbmUgQUNRX1BBQ0tFVF9MRU5HVEhfVE9LRU5fTVNCICAgICAgICAgICAgICAgMjEKKyNkZWZpbmUgQUNRX1BBQ0tFVF9MRU5HVEhfVE9LRU5fTFNCICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgQU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RlZmluZSBBQ1FfRU5EX09GX1JFR0lPTl9UT0tFTl9JRCAgICAgICAgICAgICAgICA1IC8vMDEwMWIKKyNkZWZpbmUgQUNRX1NPUF9NSVNNQVRDSF9UT0tFTl9JRCAgICAgICAgICAgICAgICAgNiAvLzAxMTBiCisjZGVmaW5lIEFDUV9VTkRFRl9QSF9UT0tFTl9JRCAgICAgICAgICAgICAgICAgICAgIDcgLy8wMTExYgorCisjZGVmaW5lIEFDUV9UT0tFTl9NRU1SRUdJT05JRF9NU0IgICAgICAgICAgICAgICAgIDMwCisjZGVmaW5lIEFDUV9UT0tFTl9NRU1SRUdJT05JRF9MU0IgICAgICAgICAgICAgICAgIDIyCisjZGVmaW5lIEFDUV9UT0tFTl9OT0ZXT1JEU19NU0IgICAgICAgICAgICAgICAgICAgIDIxCisjZGVmaW5lIEFDUV9UT0tFTl9OT0ZXT1JEU19MU0IgICAgICAgICAgICAgICAgICAgIDEzCisjZGVmaW5lIEFDUV9UT0tFTl9TVEFSVEFERFJfTVNCICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEFDUV9UT0tFTl9TVEFSVEFERFJfTFNCICAgICAgICAgICAgICAgICAgIDQgIAorCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIE1JUEkgKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKworI2RlZmluZSBXT1JEX0NPVU5UX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBQS1RfQ09ERV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICA2ICAgICAgICAgICAgCisjZGVmaW5lIENITl9OT19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgIAorI2RlZmluZSBFUlJPUl9JTkZPX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA4CisgIAorI2RlZmluZSBMT05HX1BLVENPREVfTUFYICAgICAgICAgICAgICAgICAgICAgICAgICA2MworI2RlZmluZSBMT05HX1BLVENPREVfTUlOICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSE9SVF9QS1RDT0RFX01BWCAgICAgICAgICAgICAgICAgICAgICAgICAxNQorCisjZGVmaW5lIEVPRl9DT0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogUGFja2V0IEluZm8gKi8KKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKyNkZWZpbmUgQUNRX1NUQVJUX09GX0ZSQU1FICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBQ1FfRU5EX09GX0ZSQU1FICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFDUV9TVEFSVF9PRl9MSU5FICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQUNRX0VORF9PRl9MSU5FICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBQ1FfTElORV9QQVlMT0FEICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEFDUV9HRU5fU0hfUEtUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKworCisvKiBiaXQgZGVmaW5pdGlvbiAqLworI2RlZmluZSBBQ1FfUEtUX1RZUEVfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBQ1FfUEtUX1RZUEVfQklUUyAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIEFDUV9QS1RfU09QX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIEFDUV9XT1JEX0NOVF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUNRX1dPUkRfQ05UX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQUNRX1BLVF9JTkZPX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQUNRX1BLVF9JTkZPX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBBQ1FfSEVBREVSX0RBVEFfSURYICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFDUV9IRUFERVJfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFDUV9BQ0tfVE9LRU5fSURfSURYICAgICAgICAgICAgICAgICAgICAgIEFDUV9UT0tFTl9JRF9JRFgKKyNkZWZpbmUgQUNRX0FDS19UT0tFTl9JRF9CSVRTICAgICAgICAgICAgICAgICAgICAgQUNRX1RPS0VOX0lEX0JJVFMKKyNkZWZpbmUgQUNRX0FDS19OT0ZXT1JEU19JRFggICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgQUNRX0FDS19OT0ZXT1JEU19CSVRTICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBBQ1FfQUNLX1BLVF9MRU5fSURYICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEFDUV9BQ0tfUEtUX0xFTl9CSVRTICAgICAgICAgICAgICAgICAgICAgIDE2CisKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogUGFja2V0IERhdGEgVHlwZSAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisKKyNkZWZpbmUgQUNRX1lVVjQyMF84X0RBVEEgICAgICAgICAgICAgICAgICAgICAgIDI0ICAgLyogMDEgMTAwMCBZVVY0MjAgOC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1lVVjQyMF8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDI1ICAgLyogMDEgMTAwMSAgWVVWNDIwIDEwLWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1lVVjQyMF84TF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDI2ICAgLyogMDEgMTAxMCAgIFlVVjQyMCA4LWJpdCBsZWdhY3kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1lVVjQyMl84X0RBVEEgICAgICAgICAgICAgICAgICAgICAgIDMwICAgLyogMDEgMTExMCAgIFlVVjQyMiA4LWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1lVVjQyMl8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDMxICAgLyogMDEgMTExMSAgIFlVVjQyMiAxMC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JHQjQ0NF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDMyICAgLyogMTAgMDAwMCAgIFJHQjQ0NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JHQjU1NV9EQVRBICAgICAgICAgICAgICAJCQkJCSAzMyAgIC8qIDEwIDAwMDEgICBSR0I1NTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SR0I1NjVfREFUQSAgICAgICAgICAgICAgCQkJCQkgMzQgICAvKiAxMCAwMDEwICAgUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkdCNjY2X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDM1ICAgLyogMTAgMDAxMSAgIFJHQjY2NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JHQjg4OF9EQVRBICAgICAgICAgICAgICAJCQkJCSAzNiAgIC8qIDEwIDAxMDAgICBSR0I4ODggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SQVc2X0RBVEEgICAgICAgICAgICAgICAgCQkJCQkgNDAgICAvKiAxMCAxMDAwICAgUkFXNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkFXN19EQVRBICAgICAgICAgICAgICAgIAkJCQkJIDQxICAgLyogMTAgMTAwMSAgIFJBVzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JBVzhfREFUQSAgICAgICAgICAgICAgICAJCQkJCSA0MiAgIC8qIDEwIDEwMTAgICBSQVc4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9SQVcxMF9EQVRBICAgICAgICAgICAgICAgCQkJCQkgNDMgICAvKiAxMCAxMDExICAgUkFXMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfUkFXMTJfREFUQSAgICAgICAgICAgICAgIAkJCQkJIDQ0ICAgLyogMTAgMTEwMCAgIFJBVzEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1JBVzE0X0RBVEEgICAgICAgICAgICAgICAJCQkJCSA0NSAgIC8qIDEwIDExMDEgICBSQVcxNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9VU1JfREVGXzFfREFUQSAgICAgICAgICAgCQkJCQkgNDggICAvKiAxMSAwMDAwICAgIEpQRUcgW1VzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgMV0gICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl8yX0RBVEEgICAgICAgICAgIAkJCQkJIDQ5ICAgLyogMTEgMDAwMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDIgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1VTUl9ERUZfM19EQVRBICAgICAgICAgICAJCQkJCSA1MCAgIC8qIDExIDAwMTAgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSAzICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9VU1JfREVGXzRfREFUQSAgICAgICAgICAgCQkJCQkgNTEgICAvKiAxMSAwMDExICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNCAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl81X0RBVEEgICAgICAgICAgIAkJCQkJIDUyICAgLyogMTEgMDEwMCAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDUgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX1VTUl9ERUZfNl9EQVRBICAgICAgICAgICAJCQkJCSA1MyAgIC8qIDExIDAxMDEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA2ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9VU1JfREVGXzdfREFUQSAgICAgICAgICAgCQkJCQkgNTQgICAvKiAxMSAwMTEwICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNyAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfVVNSX0RFRl84X0RBVEEgICAgICAgICAgIAkJCQkJIDU1ICAgLyogMTEgMDExMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDggICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX0VtYl9EQVRBICAgICAgICAgICAgICAgICAJCQkJCSAxOCAgIC8qIDAxIDAwMTAgICAgZW1iZWRkZWQgZWlnaHQgYml0IG5vbiBpbWFnZSBkYXRhICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9TT0ZfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMCAgIC8qIDAwIDAwMDAgICAgZnJhbWUgc3RhcnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9FT0ZfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMSAgIC8qIDAwIDAwMDEgICAgZnJhbWUgZW5kICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9TT0xfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMiAgIC8qIDAwIDAwMTAgICAgbGluZSBzdGFydCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9FT0xfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMyAgIC8qIDAwIDAwMTEgICAgbGluZSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0gxX0RBVEEgICAgICAgICAgICAgCQkJCQkgOCAgIC8qIDAwIDEwMDAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMSAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0gyX0RBVEEgICAgICAgICAgICAgCQkJCQkgOSAgIC8qIDAwIDEwMDEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSAyICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0gzX0RBVEEgICAgICAgICAgICAgCQkJCQkgMTAgICAvKiAwMCAxMDEwICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMyAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfR0VOX1NINF9EQVRBICAgICAgICAgICAgIAkJCQkJIDExICAgLyogMDAgMTAxMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDQgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX0dFTl9TSDVfREFUQSAgICAgICAgICAgICAJCQkJCSAxMiAgIC8qIDAwIDExMDAgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA1ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9HRU5fU0g2X0RBVEEgICAgICAgICAgICAgCQkJCQkgMTMgICAvKiAwMCAxMTAxICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgNiAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBBQ1FfR0VOX1NIN19EQVRBICAgICAgICAgICAgIAkJCQkJIDE0ICAgLyogMDAgMTExMCAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDcgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQUNRX0dFTl9TSDhfREFUQSAgICAgICAgICAgICAJCQkJCSAxNSAgIC8qIDAwIDExMTEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA4ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIEFDUV9ZVVY0MjBfOF9DU1BTX0RBVEEgICAgICAgCQkJCQkgMjggICAvKiAwMSAxMTAwICAgWVVWNDIwIDgtYml0IChDaHJvbWEgU2hpZnRlZCBQaXhlbCBTYW1wbGluZykgICAgICAqLworI2RlZmluZSBBQ1FfWVVWNDIwXzEwX0NTUFNfREFUQSAgICAgIAkJCQkJIDI5ICAgLyogMDE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UgX2lzcF9jYXB0dXJlX2RlZnNfaAorCisjZGVmaW5lIF9JU1BfQ0FQVFVSRV9SRUdfQUxJR04gICAgICAgICAgICAgICAgICAgIDQgIC8qIGFzc3VtaW5nIDMyIGJpdCBjb250cm9sIGJ1cyB3aWR0aCAqLworI2RlZmluZSBfSVNQX0NBUFRVUkVfQklUU19QRVJfRUxFTSAgICAgICAgICAgICAgICAzMiAgLyogb25seSBmb3IgZGF0YSwgbm90IFNPUCAqLwkJCQkJCSAgICAgICAgICAgCisjZGVmaW5lIF9JU1BfQ0FQVFVSRV9CWVRFU19QRVJfRUxFTSAgICAgICAgICAgICAgIChfSVNQX0NBUFRVUkVfQklUU19QRVJfRUxFTS84CSkJCQkJICAgICAgICAgICAKKyNkZWZpbmUgX0lTUF9DQVBUVVJFX0JZVEVTX1BFUl9XT1JEICAgICAgICAgICAgICAgMzIJCS8qIDI1Ni84ICovCQorI2RlZmluZSBfSVNQX0NBUFRVUkVfRUxFTV9QRVJfV09SRCAgICAgICAgICAgICAgICBfSVNQX0NBUFRVUkVfQllURVNfUEVSX1dPUkQgLyBfSVNQX0NBUFRVUkVfQllURVNfUEVSX0VMRU0JCSAgICAgICAgICAgCisKKy8vI2RlZmluZSBDQVBUX1JDVl9BQ0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisvLyNkZWZpbmUgQ0FQVF9XUlRfQUNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgICAgICAgICAgICAgIAorLy8jZGVmaW5lIENBUFRfSVJRX0FDSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMgICAgICAgICAgICAgICAgICAgICAgICAKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisjZGVmaW5lIE5PRl9JUlFTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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VBUX0xBU1RfQ09NTUFORF9SRUdfSUQgICAgICAgICAgICAgICAgICAxMSAgICAgICAgCisjZGVmaW5lIENBUFRfTkVYVF9DT01NQU5EX1JFR19JRCAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIENBUFRfTEFTVF9BQ0tOT1dMRURHRV9SRUdfSUQgICAgICAgICAgICAgIDEzCisjZGVmaW5lIENBUFRfTkVYVF9BQ0tOT1dMRURHRV9SRUdfSUQgICAgICAgICAgICAgIDE0CisjZGVmaW5lIENBUFRfRlNNX1NUQVRFX0lORk9fUkVHX0lEICAgICAgICAgICAgICAgIDE1CisKKy8vIFJlZ2lzdGVyIHdpZHRoCisjZGVmaW5lIENBUFRfU1RBUlRfTU9ERV9SRUdfV0lEVEggICAgICAgICAgICAgICAgIDEgCisvLyNkZWZpbmUgQ0FQVF9TVEFSVF9BRERSX1JFR19XSURUSCAgICAgICAgICAgICAgICAgOQorLy8jZGVmaW5lIENBUFRfTUVNX1JFR0lPTl9TSVpFX1JFR19XSURUSCAgICAgICAgICAgIDkKKy8vI2RlZmluZSBDQVBUX05VTV9NRU1fUkVHSU9OU19SRUdfV0lEVEggICAgICAgICAgICA5CisjZGVmaW5lIENBUFRfSU5JVF9SRUdfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICgyMiArIDQpCisKKyNkZWZpbmUgQ0FQVF9TVEFSVF9SRUdfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX1NUT1BfUkVHX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAxCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIEZTTSAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworI2RlZmluZSBDQVBUX1dSSVRFMk1FTV9GU01fU1RBVEVfQklUUyAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfU1lOQ0hST05JWkVSX0ZTTV9TVEFURV9CSVRTICAgICAgICAgIDMKKworCisjZGVmaW5lIENBUFRfUEFDS0VUX0xFTkdUSF9SRUdfV0lEVEggICAgICAgICAgICAgIDE3CisjZGVmaW5lIENBUFRfUkVDRUlWRURfTEVOR1RIX1JFR19XSURUSCAgICAgICAgICAgIDE3ICAgCisjZGVmaW5lIENBUFRfUkVDRUlWRURfU0hPUlRfUEFDS0VUU19SRUdfV0lEVEggICAgIDMyCisjZGVmaW5lIENBUFRfUkVDRUlWRURfTE9OR19QQUNLRVRTX1JFR19XSURUSCAgICAgIDMyCisjZGVmaW5lIENBUFRfTEFTVF9DT01NQU5EX1JFR19XSURUSCAgICAgICAgICAgICAgIDMyCisvKiAjZGVmaW5lIENBUFRfTkVYVF9DT01NQU5EX1JFR19XSURUSCAgICAgICAgICAgICAgIDMyICovICAKKyNkZWZpbmUgQ0FQVF9MQVNUX0FDS05PV0xFREdFX1JFR19XSURUSCAgICAgICAgICAgMzIKKyNkZWZpbmUgQ0FQVF9ORVhUX0FDS05PV0xFREdFX1JFR19XSURUSCAgICAgICAgICAgMzIKKyNkZWZpbmUgQ0FQVF9GU01fU1RBVEVfSU5GT19SRUdfV0lEVEggICAgICAgICAgICAgKChDQVBUX1dSSVRFMk1FTV9GU01fU1RBVEVfQklUUyAqIDMpICsgKENBUFRfU1lOQ0hST05JWkVSX0ZTTV9TVEFURV9CSVRTICogMykpCisKKy8vI2RlZmluZSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fQUREUl9XSURUSCAgICAgICAgICA5ICAgCisvLyNkZWZpbmUgQ0FQVF9JTklUX1JFU1RBUlRfTUVNX1JFR0lPTl9XSURUSCAgICAgICAgOSAKKworLyogcmVnaXN0ZXIgcmVzZXQgdmFsdWUgKi8KKyNkZWZpbmUgQ0FQVF9TVEFSVF9NT0RFX1JFR19SU1RWQUwgICAgICAgICAgICAgICAgMCAgIAorI2RlZmluZSBDQVBUX1NUQVJUX0FERFJfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfTUVNX1JFR0lPTl9TSVpFX1JFR19SU1RWQUwgICAgICAgICAgIDEyOAorI2RlZmluZSBDQVBUX05VTV9NRU1fUkVHSU9OU19SRUdfUlNUVkFMICAgICAgICAgICAzIAorI2RlZmluZSBDQVBUX0lOSVRfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQ0FQVF9TVEFSVF9SRUdfUlNUVkFMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1NUT1BfUkVHX1JTVFZBTCAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQ0FQVF9QQUNLRVRfTEVOR1RIX1JFR19SU1RWQUwgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1JFQ0VJVkVEX0xFTkdUSF9SRUdfUlNUVkFMICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfUkVDRUlWRURfU0hPUlRfUEFDS0VUU19SRUdfUlNUVkFMICAgIDAKKyNkZWZpbmUgQ0FQVF9SRUNFSVZFRF9MT05HX1BBQ0tFVFNfUkVHX1JTVFZBTCAgICAgMAorI2RlZmluZSBDQVBUX0xBU1RfQ09NTUFORF9SRUdfUlNUVkFMICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfTkVYVF9DT01NQU5EX1JFR19SU1RWQUwgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9MQVNUX0FDS05PV0xFREdFX1JFR19SU1RWQUwgICAgICAgICAgMAorI2RlZmluZSBDQVBUX05FWFRfQUNLTk9XTEVER0VfUkVHX1JTVFZBTCAgICAgICAgICAwCisjZGVmaW5lIENBUFRfRlNNX1NUQVRFX0lORk9fUkVHX1JTVFZBTCAgICAgICAgICAgIDAKKworLyogYml0IGRlZmluaXRpb25zICovCisjZGVmaW5lIENBUFRfSU5JVF9SU1RfUkVHX0JJVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9JTklUX0ZMVVNIX0JJVCAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX0lOSVRfUkVTWU5DX0JJVCAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfSU5JVF9SRVNUQVJUX0JJVCAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ0FQVF9JTklUX1JFU1RBUlRfTUVNX0FERFJfTFNCICAgICAgICAgICAgNAorI2RlZmluZSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fQUREUl9NU0IgICAgICAgICAgICAxNAorI2RlZmluZSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fUkVHSU9OX0xTQiAgICAgICAgICAxNQorI2RlZmluZSBDQVBUX0lOSVRfUkVTVEFSVF9NRU1fUkVHSU9OX01TQiAgICAgICAgICAyNQorCisKKyNkZWZpbmUgQ0FQVF9JTklUX1JTVF9SRUdfSURYICAgICAgICAgICAgICAgICAgICAgQ0FQVF9JTklUX1JTVF9SRUdfQklUCisjZGVmaW5lIENBUFRfSU5JVF9SU1RfUkVHX0JJVFMgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ0FQVF9JTklUX0ZMVVNIX0lEWCAgICAgICAgICAgICAgICAgICAgICAgQ0FQVF9JTklUX0ZMVVNIX0JJVAorI2RlZmluZSBDQVBUX0lOSVRfRkxVU0hfQklUUyAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENBUFRfSU5JVF9SRVNZTkNfSURYICAgICAgICAgICAgICAgICAgICAgIENBUFRfSU5JVF9SRVNZTkNfQklUCisjZGVmaW5lIENBUFRfSU5JVF9SRVNZTkNfQklUUyAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ0FQVF9JTklUX1JFU1RBUlRfSURYICAgICAgICAgICAgICAgICAgICAgQ0FQVF9JTklUX1JFU1RBUlRfQklUCisjZGVmaW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nMgSURzICovCisjZGVmaW5lIENBUFRfU1RBUlRfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgIDAgLyogMDAwMGIgKi8KKyNkZWZpbmUgQ0FQVF9TVE9QX1RPS0VOX0lEICAgICAgICAgICAgICAgICAgICAgICAgMSAvKiAwMDAxYiAqLworI2RlZmluZSBDQVBUX0ZSRUVaRV9UT0tFTl9JRCAgICAgICAgICAgICAgICAgICAgICAyIC8qIDAwMTBiICovICAKKyNkZWZpbmUgQ0FQVF9SRVNVTUVfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgMyAvKiAwMDExYiAqLworI2RlZmluZSBDQVBUX0lOSVRfVE9LRU5fSUQgICAgICAgICAgICAgICAgICAgICAgICA4IC8qIDEwMDBiICovCisKKyNkZWZpbmUgQ0FQVF9TVEFSVF9UT0tFTl9CSVQgICAgICAgICAgICAgICAgICAgICAgMCAgICAgIAorI2RlZmluZSBDQVBUX1NUT1BfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfRlJFRVpFX1RPS0VOX0JJVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9SRVNVTUVfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX0lOSVRfVE9LRU5fQklUICAgICAgICAgICAgICAgICAgICAgICAwCisKKy8qIEFja25vd2xlZGdlIHRva2VuIElEcyAqLworI2RlZmluZSBDQVBUX0VORF9PRl9QQUNLRVRfUkVDRUlWRURfVE9LRU5fSUQgICAgICAwIC8qIDAwMDBiICovCisjZGVmaW5lIENBUFRfRU5EX09GX1BBQ0tFVF9XUklUVEVOX1RPS0VOX0lEICAgICAgIDEgLyogMDAwMWIgKi8KKyNkZWZpbmUgQ0FQVF9FTkRfT0ZfUkVHSU9OX1dSSVRURU5fVE9LRU5fSUQgICAgICAgMiAvKiAwMDEwYiAqLworI2RlZmluZSBDQVBUX0ZMVVNIX0RPT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gMjEJCQorCisvKiAgYml0IGRlZmluaXRpb24gKi8KKyNkZWZpbmUgQ0FQVF9DTURfSURYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ0FQVF9UT0tFTl9JRF9MU0IKKyNkZWZpbmUJQ0FQVF9DTURfQklUUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKENBUFRfVE9LRU5fSURfTVNCIC0gQ0FQVF9UT0tFTl9JRF9MU0IgKyAxKQorI2RlZmluZSBDQVBUX1NPUF9JRFggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBDQVBUX1NPUF9CSVRTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENBUFRfUEtUX0lORk9fSURYICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIENBUFRfUEtUX0lORk9fQklUUyAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQ0FQVF9QS1RfVFlQRV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1BLVF9UWVBFX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIENBUFRfSEVBREVSX0RBVEFfSURYICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9IRUFERVJfREFUQV9CSVRTICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQ0FQVF9QS1RfREFUQV9JRFggICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDQVBUX1BLVF9EQVRBX0JJVFMgICAgICAgICAgICAgICAgICAgICAgICAzMgorI2RlZmluZSBDQVBUX1dPUkRfQ05UX0lEWCAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENBUFRfV09SRF9DTlRfQklUUyAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIENBUFRfQUNLX1RPS0VOX0lEX0lEWCAgICAgICAgICAgICAgICAgICAgID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l9JTklUX0lEWCAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQ0FQVF9JTklUX1RPS0VOX0lOSVRfQklUUyAgICAgICAgICAgICAgICAgMjIKKworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvKiBNSVBJICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKyNkZWZpbmUgQ0FQVF9XT1JEX0NPVU5UX1dJRFRIICAgICAgICAgICAgICAgICAgICAgMTYgICAgICAKKyNkZWZpbmUgQ0FQVF9QS1RfQ09ERV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgNiAgICAgICAgICAgICAgICAgIAorI2RlZmluZSBDQVBUX0NITl9OT19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAyICAgICAgICAKKyNkZWZpbmUgQ0FQVF9FUlJPUl9JTkZPX1dJRFRIICAgICAgICAgICAgICAgICAgICAgOCAgICAgICAKKworI2RlZmluZSBMT05HX1BLVENPREVfTUFYICAgICAgICAgICAgICAgICAgICAgICAgICA2MworI2RlZmluZSBMT05HX1BLVENPREVfTUlOICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSE9SVF9QS1RDT0RFX01BWCAgICAgICAgICAgICAgICAgICAgICAgICAxNQorCisKKy8qIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qIFBhY2tldCBJbmZvICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjZGVmaW5lIENBUFRfU1RBUlRfT0ZfRlJBTUUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9FTkRfT0ZfRlJBTUUgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX1NUQVJUX09GX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfRU5EX09GX0xJTkUgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ0FQVF9MSU5FX1BBWUxPQUQgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBDQVBUX0dFTl9TSF9QS1QgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogUGFja2V0IERhdGEgVHlwZSAqLworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisjZGVmaW5lIENBUFRfWVVWNDIwXzhfREFUQSAgICAgICAgICAgICAgICAgICAgICAgMjQgICAvKiAwMSAxMDAwIFlVVjQyMCA4LWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1lVVjQyMF8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDI1ICAgLyogMDEgMTAwMSAgWVVWNDIwIDEwLWJpdCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9ZVVY0MjBfOExfREFUQSAgICAgICAgICAgICAgICAgICAgICAyNiAgIC8qIDAxIDEwMTAgICBZVVY0MjAgOC1iaXQgbGVnYWN5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfWVVWNDIyXzhfREFUQSAgICAgICAgICAgICAgICAgICAgICAgMzAgICAvKiAwMSAxMTEwICAgWVVWNDIyIDgtYml0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1lVVjQyMl8xMF9EQVRBICAgICAgICAgICAgICAgICAgICAgIDMxICAgLyogMDEgMTExMSAgIFlVVjQyMiAxMC1iaXQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SR0I0NDRfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAzMiAgIC8qIDEwIDAwMDAgICBSR0I0NDQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkdCNTU1X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDMzICAgLyogMTAgMDAwMSAgIFJHQjU1NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SR0I1NjVfREFUQSAgICAgICAgICAgICAgCQkJCQkgMzQgICAvKiAxMCAwMDEwICAgUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JHQjY2Nl9EQVRBICAgICAgICAgICAgICAJCQkJCSAzNSAgIC8qIDEwIDAwMTEgICBSR0I2NjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkdCODg4X0RBVEEgICAgICAgICAgICAgIAkJCQkJIDM2ICAgLyogMTAgMDEwMCAgIFJHQjg4OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SQVc2X0RBVEEgICAgICAgICAgICAgICAgCQkJCQkgNDAgICAvKiAxMCAxMDAwICAgUkFXNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JBVzdfREFUQSAgICAgICAgICAgICAgICAJCQkJCSA0MSAgIC8qIDEwIDEwMDEgICBSQVc3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkFXOF9EQVRBICAgICAgICAgICAgICAgIAkJCQkJIDQyICAgLyogMTAgMTAxMCAgIFJBVzggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9SQVcxMF9EQVRBICAgICAgICAgICAgICAgCQkJCQkgNDMgICAvKiAxMCAxMDExICAgUkFXMTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1JBVzEyX0RBVEEgICAgICAgICAgICAgICAJCQkJCSA0NCAgIC8qIDEwIDExMDAgICBSQVcxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfUkFXMTRfREFUQSAgICAgICAgICAgICAgIAkJCQkJIDQ1ICAgLyogMTAgMTEwMSAgIFJBVzE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzFfREFUQSAgICAgICAgICAgCQkJCQkgNDggICAvKiAxMSAwMDAwICAgIEpQRUcgW1VzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgMV0gICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfMl9EQVRBICAgICAgICAgICAJCQkJCSA0OSAgIC8qIDExIDAwMDEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSAyICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfVVNSX0RFRl8zX0RBVEEgICAgICAgICAgIAkJCQkJIDUwICAgLyogMTEgMDAxMCAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDMgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzRfREFUQSAgICAgICAgICAgCQkJCQkgNTEgICAvKiAxMSAwMDExICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNCAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfNV9EQVRBICAgICAgICAgICAJCQkJCSA1MiAgIC8qIDExIDAxMDAgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA1ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfVVNSX0RFRl82X0RBVEEgICAgICAgICAgIAkJCQkJIDUzICAgLyogMTEgMDEwMSAgICBVc2VyIERlZmluZWQgOC1iaXQgRGF0YSBUeXBlIDYgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9VU1JfREVGXzdfREFUQSAgICAgICAgICAgCQkJCQkgNTQgICAvKiAxMSAwMTEwICAgIFVzZXIgRGVmaW5lZCA4LWJpdCBEYXRhIFR5cGUgNyAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1VTUl9ERUZfOF9EQVRBICAgICAgICAgICAJCQkJCSA1NSAgIC8qIDExIDAxMTEgICAgVXNlciBEZWZpbmVkIDgtYml0IERhdGEgVHlwZSA4ICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfRW1iX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDE4ICAgLyogMDEgMDAxMCAgICBlbWJlZGRlZCBlaWdodCBiaXQgbm9uIGltYWdlIGRhdGEgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9TT0ZfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMCAgIC8qIDAwIDAwMDAgICAgZnJhbWUgc3RhcnQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfRU9GX0RBVEEgICAgICAgICAgICAgICAgIAkJCQkJIDEgICAvKiAwMCAwMDAxICAgIGZyYW1lIGVuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX1NPTF9EQVRBICAgICAgICAgICAgICAgICAJCQkJCSAyICAgLyogMDAgMDAxMCAgICBsaW5lIHN0YXJ0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9FT0xfREFUQSAgICAgICAgICAgICAgICAgCQkJCQkgMyAgIC8qIDAwIDAwMTEgICAgbGluZSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NIMV9EQVRBICAgICAgICAgICAgIAkJCQkJIDggICAvKiAwMCAxMDAwICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDEgICAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDJfREFUQSAgICAgICAgICAgICAJCQkJCSA5ICAgLyogMDAgMTAwMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDIgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9HRU5fU0gzX0RBVEEgICAgICAgICAgICAgCQkJCQkgMTAgICAvKiAwMCAxMDEwICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgMyAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDRfREFUQSAgICAgICAgICAgICAJCQkJCSAxMSAgIC8qIDAwIDEwMTEgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA0ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NINV9EQVRBICAgICAgICAgICAgIAkJCQkJIDEyICAgLyogMDAgMTEwMCAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDUgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9HRU5fU0g2X0RBVEEgICAgICAgICAgICAgCQkJCQkgMTMgICAvKiAwMCAxMTAxICAgIEdlbmVyaWMgU2hvcnQgUGFja2V0IENvZGUgNiAgICAgICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBDQVBUX0dFTl9TSDdfREFUQSAgICAgICAgICAgICAJCQkJCSAxNCAgIC8qIDAwIDExMTAgICAgR2VuZXJpYyBTaG9ydCBQYWNrZXQgQ29kZSA3ICAgICAgICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENBUFRfR0VOX1NIOF9EQVRBICAgICAgICAgICAgIAkJCQkJIDE1ICAgLyogMDAgMTExMSAgICBHZW5lcmljIFNob3J0IFBhY2tldCBDb2RlIDggICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0FQVF9ZVVY0MjBfOF9DU1BTX0RBVEEgICAgICAgCQkJCQkgMjggICAvKiAwMSAxMTAwICAgWVVWNDIwIDgtYml0IChDaHJvbWEgU2hpZnRlZCBQaXhlbCBTYW1wbGluZykgICAgICAqLworI2RlZmluZSBDQVBUX1lVVjQyMF8xMF9DU1BTX0RBVEEgICAgICAJCQkJCSAyOSAgIC8qIDAxIDExMDEgICBZVVY0MjAgMTAtYml0IChDaHJvbWEgU2hpZnRlZCBQaXhlbCBTYW1wbGluZykgICAgICovCisjZGVmaW5lIENBUFRfUkVTRVJWRURfREFUQV9UWVBFX01JTiAgICAgICAgICAgICAgNTYKKyNkZWZpbmUgQ0FQVF9SRVNFUlZFRF9EQVRBX1RZUEVfTUFYICAgICAgICAgICAgICA2MworI2RlZmluZSBDQVBUX0dFTl9MT05HX1JFU0VSVkVEX0RBVEFfVFlQRV9NSU4gICAgIDE5CisjZGVmaW5lIENBUFRfR0VOX0xPTkdfUkVTRVJWRURfREFUQV9UWVBFX01BWCAgICAgMjMKKyNkZWZpbmUgQ0FQVF9ZVVZfUkVTRVJWRURfREFUQV9UWVBFICAgICAgICAgICAgICAyNworI2RlZmluZSBDQVBUX1JHQl9SRVNFUlZFRF9EQVRBX1RZUEVfTUlOICAgICAgICAgIDM3CisjZGVmaW5lIENBUFRfUkdCX1JFU0VSVkVEX0RBVEFfVFlQRV9NQVggICAgICAgICAgMzkKKyNkZWZpbmUgQ0FQVF9SQVdfUkVTRVJWRURfREFUQV9UWVBFX01JTiAgICAgICAgICA0NgorI2RlZmluZSBDQVBUX1JBV19SRVNFUlZFRF9EQVRBX1RZUEVfTUFYICAgICAgICAgIDQ3CisKKworLyogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworLyogQ2FwdHVyZSBVbml0IFN0YXRlICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisjZGVmaW5lIENBUFRfRlJFRV9SVU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ0FQVF9OT19TWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDQVBUX1NZTkNfU1dQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIENBUFRfU1lOQ19NV1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ0FQVF9TWU5DX1dBSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBDQVBUX0ZSRUVaRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIENBUFRfUlVOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKworCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKyNlbmRpZiAvKiBfaXNwX2NhcHR1cmVfZGVmc19oICovIAorCisKKworCisKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9hdG9taXNwL3BjaS9hdG9taXNwMi9jc3MyNDAwL2Nzc18yNDAxX3N5c3RlbS9ocnQvbW11X2RlZn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V9UUkFOU0ZFUl9SRUFECQlETUFfVFJBTlNGRVJfQjJBCisjZGVmaW5lIERNQV9UUkFOU0ZFUl9XUklURQkJRE1BX1RSQU5TRkVSX0EyQgorLyogc3RvcmUvbG9hZCBmcm9tIHRoZSBQb1Ygb2YgdGhlIHN5c3RlbShtZW1vcnkpICovCisjZGVmaW5lIERNQV9UUkFOU0ZFUl9TVE9SRQkJRE1BX1RSQU5TRkVSX0IyQQorI2RlZmluZSBETUFfVFJBTlNGRVJfTE9BRAkJRE1BX1RSQU5TRkVSX0EyQgorI2RlZmluZSBETUFfVFJBTlNGRVJfQ0xFQVIJCURNQV9UUkFOU0ZFUl9DTEVBUl9BCisKK3R5cGVkZWYgZW51bSB7CisJRE1BX1RSQU5TRkVSX0NMRUFSX0EgPSBETUFfQ0xFQVJfQ01EQklULCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDggKi8KKwlETUFfVFJBTlNGRVJfQ0xFQVJfQiA9IERNQV9DTEVBUl9DTURCSVQgfCBETUFfUldfQ01EQklULCAgICAgICAgICAgICAgICAgICAgICAgLyogMTIgKi8KKwlETUFfVFJBTlNGRVJfQTJCID0gRE1BX1JXX0NNREJJVCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogNCAqLworCURNQV9UUkFOU0ZFUl9CMkEgPSAwLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAwICovCisJRE1BX1RSQU5TRkVSX0NMRUFSX0FfTk9BQ0sgPSBETUFfQ0xFQVJfQ01EQklUIHwgRE1BX05PQUNLX0NNRCwgICAgICAgICAgICAgICAgIC8qIDI2ICovCisJRE1BX1RSQU5TRkVSX0NMRUFSX0JfTk9BQ0sgPSBETUFfQ0xFQVJfQ01EQklUIHwgRE1BX1JXX0NNREJJVCB8IERNQV9OT0FDS19DTUQsIC8qIDMwICovCisJRE1BX1RSQU5TRkVSX0Ey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lZmluZXMgKi8KKy8qI2RlZmluZSBISVZFX0dQSU9fQ0FNRVJBX0JPQVJEX1JFU0VUX1BJTl9OUiAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEhJVkVfR1BJT19MQ0RfQ0xPQ0tfU0VMRUNUX1BJTl9OUiAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSElWRV9HUElPX0hETUlfQ0xPQ0tfU0VMRUNUX1BJTl9OUiAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBISVZFX0dQSU9fTENEX1ZFUlRfRkxJUF9QSU5fTlIgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEhJVkVfR1BJT19MQ0RfSE9SX0ZMSVBfUElOX05SICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgSElWRV9HUElPX0FTMzY4M19HUElPX1AwX1BJTl9OUiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQSU9fQVMzNjgzX0RBVEFfUDFfUElOX05SICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEhJVkVfR1BJT19BUzM2ODNfQ0xLX1AyX1BJTl9OUiAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSElWRV9HUElPX0FTMzY4M19UMV9GMF9QSU5fTlIgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBISVZFX0dQSU9fQVMzNjgzX1NGTF9GMV9QSU5fTlIgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEhJVkVfR1BJT19BUzM2ODNfU1RST0JFX0YyX1BJTl9OUiAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSElWRV9HUElPX01BWDE1NzdfRU4xX1BJTl9OUiAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBISVZFX0dQSU9fTUFYMTU3N19FTjJfUElOX05SICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE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RVEsCisJRE1BX1JXX1NUQVRFX05FWFRfTElORSwKKwlETUFfUldfU1RBVEVfVU5MT0NLX0NIQU5ORUwsCisJTl9ETUFfUldfU1RBVEVTCit9IGRtYV9yd19zdGF0ZXNfdDsKKwordHlwZWRlZiBlbnVtIHsKKwlETUFfRklGT19TVEFURV9XSUxMX0JFX0ZVTEwsCisJRE1BX0ZJRk9fU1RBVEVfRlVMTCwKKwlETUFfRklGT19TVEFURV9FTVBUWSwKKwlOX0RNQV9GSUZPX1NUQVRFUworfSBkbWFfZmlmb19zdGF0ZXNfdDsKKworLyogdHlwZWRlZiBzdHJ1Y3QgZG1hX3N0YXRlX3MJCQlkbWFfc3RhdGVfdDsgKi8KK3R5cGVkZWYgc3RydWN0IGRtYV9jaGFubmVsX3N0YXRlX3MJZG1hX2NoYW5uZWxfc3RhdGVfdDsKK3R5cGVkZWYgc3RydWN0IGRtYV9wb3J0X3N0YXRlX3MJCWRtYV9wb3J0X3N0YXRlX3Q7CisKK3N0cnVjdCBkbWFfcG9ydF9zdGF0ZV9zIHsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICByZXFfY3M7CisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgcmVxX3dlX247CisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgcmVxX3J1bjsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICByZXFfYWNrOworCWJvb2wgICAgICAgICAgICAgICAgICAgICAgIHNlbmRfY3M7CisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgc2VuZF93ZV9uOworCWJvb2wgICAgICAgICAgICAgICAgICAgICAgIHNlbmRfcnVuOworCWJvb2wgICAgICAgICAgICAgICAgICAgICAgIHNlbmRfYWNrOworCWRtYV9maWZvX3N0YXRlc190ICAgICAgICAgIGZpZm9fc3RhdGU7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgZmlmb19jb3VudGVyOworfTsKKworc3RydWN0IGRtYV9jaGFubmVsX3N0YXRlX3MgeworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGNvbm5lY3Rpb247CisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgc2lnbl9leHRlbmQ7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OworCWludCAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlkZV9hOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1zX2E7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgY3JvcHBpbmdfYTsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aF9hOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIHN0cmlkZV9iOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGVsZW1zX2I7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgY3JvcHBpbmdfYjsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICB3aWR0aF9iOworfTsKKworc3RydWN0IGRtYV9zdGF0ZV9zIHsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICBmc21fY29tbWFuZF9pZGxlOworCWJvb2wgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jb21tYW5kX3J1bjsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICBmc21fY29tbWFuZF9zdGFsbGluZzsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICBmc21fY29tbWFuZF9lcnJvcjsKKwlkbWFfY29tbWFuZHNfdCAgICAgICAgICAgICBsYXN0X2NvbW1hbmQ7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9jb21tYW5kX2NoYW5uZWw7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgbGFzdF9jb21tYW5kX3BhcmFtOworCWRtYV9jb21tYW5kc190ICAgICAgICAgICAgIGN1cnJlbnRfY29tbWFuZDsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X2FkZHJfYTsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50X2FkZHJfYjsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICBmc21fY3RybF9pZGxlOworCWJvb2wgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3J1bjsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICBmc21fY3RybF9zdGFsbGluZzsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICBmc21fY3RybF9lcnJvcjsKKwlkbWFfY3RybF9zdGF0ZXNfdCAgICAgICAgICBmc21fY3RybF9zdGF0ZTsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICBmc21fY3RybF9zb3VyY2VfZGV2OworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3NvdXJjZV9hZGRyOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3NvdXJjZV9zdHJpZGU7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgZnNtX2N0cmxfc291cmNlX3dpZHRoOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3NvdXJjZV9oZWlnaHQ7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgZnNtX2N0cmxfcGFja19zb3VyY2VfZGV2OworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3BhY2tfZGVzdF9kZXY7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgZnNtX2N0cmxfZGVzdF9hZGRyOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX2Rlc3Rfc3RyaWRlOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3BhY2tfc291cmNlX3dpZHRoOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3BhY2tfZGVzdF9oZWlnaHQ7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgZnNtX2N0cmxfcGFja19kZXN0X3dpZHRoOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3BhY2tfc291cmNlX2VsZW1zOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGZzbV9jdHJsX3BhY2tfZGVzdF9lbGVtczsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICBmc21fY3RybF9wYWNrX2V4dGVuc2lvbjsKKwlpbnQJCQkJCQkgICBwYWNrX2lkbGU7CisJaW50CSAgICAgICAgICAgICAgICAgICAgICAgcGFja19ydW47CisJaW50CQkgICAgICAgICAgICAgICAJICAgcGFja19zdGFsbGluZzsKKwlpbnQJCSAgICAgICAgICAgICAgICAgICBwYWNrX2Vycm9yOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIHBhY2tfY250X2hlaWdodDsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICBwYWNrX3NyY19jbnRfd2lkdGg7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgcGFja19kZXN0X2NudF93aWR0aDsKKwlkbWFfcndfc3RhdGVzX3QgICAgICAgICAgICByZWFkX3N0YXRlOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRfY250X2hlaWdodDsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICByZWFkX2NudF93aWR0aDsKKwlkbWFfcndfc3RhdGVzX3QgICAgICAgICAgICB3cml0ZV9zdGF0ZTsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICB3cml0ZV9oZWlnaHQ7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgd3JpdGVfd2lkdGg7CisJZG1hX3BvcnRfc3RhdGVfdCAgICAgICAgICAgcG9ydF9zdGF0ZXNbSElWRV9JU1BfTlVNX0RNQV9DT05OU107CisJZG1hX2NoYW5uZWxfc3RhdGVfdCAgICAgICAgY2hhbm5lbF9zdGF0ZXNbSElWRV9ETUFfTlVNX0NIQU5ORUxTXTsKK307CisKKyNlbmRpZiAvKiBfX0RNQV9MT0NBTF9IX0lOQ0xVREVEX18gKi8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9hdG9taX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lpbnQgc3luY2dlbl9wYXVzZTsKKwlpbnQgbnJfZnJhbWVzOworCWludCBzeW5nZW5fbnJfcGl4OworCWludCBzeW5nZW5fbnJfbGluZXM7CisJaW50IHN5bmdlbl9oYmxhbmtfY3ljbGVzOworCWludCBzeW5nZW5fdmJsYW5rX2N5Y2xlczsKKwlpbnQgaXNlbF9zb2Y7CisJaW50IGlzZWxfZW9mOworCWludCBpc2VsX3NvbDsKKwlpbnQgaXNlbF9lb2w7CisJaW50IGlzZWxfbGZzcl9lbmFibGU7CisJaW50IGlzZWxfbGZzcl9lbmFibGVfYjsKKwlpbnQgaXNlbF9sZnNyX3Jlc2V0X3ZhbHVlOworCWludCBpc2VsX3RwZ19lbmFibGU7CisJaW50IGlzZWxfdHBnX2VuYWJsZV9iOworCWludCBpc2VsX2hvcl9jbnRfbWFzazsKKwlpbnQgaXNlbF92ZXJfY250X21hc2s7CisJaW50IGlzZWxfeHlfY250X21hc2s7CisJaW50IGlzZWxfaG9yX2NudF9kZWx0YTsKKwlpbnQgaXNlbF92ZXJfY250X2RlbHRhOworCWludCBpc2VsX3RwZ19tb2RlOworCWludCBpc2VsX3RwZ19yZWQxOworCWludCBpc2VsX3RwZ19ncmVlbjE7CisJaW50IGlzZWxfdHBnX2JsdWUxOworCWludCBpc2VsX3RwZ19yZWQyOworCWludCBpc2VsX3RwZ19ncmVlbjI7CisJaW50IGlzZWxfdHBnX2JsdWUyOworCWludCBpc2VsX2NoX2lkOworCWludCBpc2VsX2ZtdF90eXBlOworCWludCBpc2VsX2RhdGFfc2VsOworCWludCBpc2VsX3NiYW5kX3NlbDsKKwlpbnQgaXNlbF9zeW5jX3NlbDsKKwlpbnQgc3luY2dlbl9ob3JfY250OworCWludCBzeW5jZ2VuX3Zlcl9jbnQ7CisJaW50IHN5bmNnZW5fZnJhbWVfY250OworCWludCBzb2Z0X3Jlc2V0OworfTsKKworI2VuZGlmIC8qIF9fR1BfREVWSUNFX0xPQ0FMX0hfSU5DTFVERURfXyAq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cGluXzQgICAgICAgICAgICA9IElSUTBfSURfT0ZGU0VUICsgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzRfQklUX0lELAorCXZpcnFfZ3Bpb19waW5fNSAgICAgICAgICAgID0gSVJRMF9JRF9PRkZTRVQgKyBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fNV9CSVRfSUQsCisJdmlycV9ncGlvX3Bpbl82ICAgICAgICAgICAgPSBJUlEwX0lEX09GRlNFVCArIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl82X0JJVF9JRCwKKwl2aXJxX2dwaW9fcGluXzcgICAgICAgICAgICA9IElSUTBfSURfT0ZGU0VUICsgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzdfQklUX0lELAorCXZpcnFfZ3Bpb19waW5fOCAgICAgICAgICAgID0gSVJRMF9JRF9PRkZTRVQgKyBISVZFX0dQX0RFVl9JUlFfR1BJT19QSU5fOF9CSVRfSUQsCisJdmlycV9ncGlvX3Bpbl85ICAgICAgICAgICAgPSBJUlEwX0lEX09GRlNFVCArIEhJVkVfR1BfREVWX0lSUV9HUElPX1BJTl85X0JJVF9JRCwKKwl2aXJxX2dwaW9fcGluXzEwICAgICAgICAgICA9IElSUTBfSURfT0ZGU0VUICsgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzEwX0JJVF9JRCwKKwl2aXJxX2dwaW9fcGluXzExICAgICAgICAgICA9IElSUTBfSURfT0ZGU0VUICsgSElWRV9HUF9ERVZfSVJRX0dQSU9fUElOXzExX0JJVF9JRCwKKwl2aXJxX3NwICAgICAgICAgICAgICAgICAgICA9IElSUTBfSURfT0ZGU0VUICsgSElWRV9HUF9ERVZfSVJRX1NQX0JJVF9JRCwKKwl2aXJxX2lzcCAgICAgICAgICAgICAgICAgICA9IElSUTBfSURfT0ZGU0VUICsgSElWRV9HUF9ERVZfSVJRX0lTUF9CSVRfSUQsCisJdmlycV9pc3lzICAgICAgICAgICAgICAgICAgPSBJUlEwX0lEX09G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SBkZXRhaWxzLgorICovCisKKyNpZm5kZWYgX19USU1FRF9DVFJMX0dMT0JBTF9IX0lOQ0xVREVEX18KKyNkZWZpbmUgX19USU1FRF9DVFJMX0dMT0JBTF9IX0lOQ0xVREVEX18KKworI2RlZmluZSBJU19USU1FRF9DVFJMX1ZFUlNJT05fMQorCisjaW5jbHVkZSA8dGltZWRfY29udHJvbGxlcl9kZWZzLmg+CisKKy8qKgorICogT3JkZXIgb2YgdGhlIGlucHV0IGJpdHMgZm9yIHRoZSB0aW1lZCBjb250cm9sbGVyIHRha2VuIGZyb20KKyAqIElTUF9DU1NfMjQwMSBTeXN0ZW0gQXJjaGl0ZWN0dXJlIERlc2NyaXB0aW9uIHZhbGlkIGZvcgorICogMjQwMCwgMjQwMS4KKyAqCisgKiBDaGVjayBmb3Igb3RoZXIgc3lzdGVtcy4KKyAqLworI2RlZmluZSBISVZFX1RJTUVEX0NUUkxfR1BJT19QSU5fMF9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSElWRV9USU1FRF9DVFJMX0dQSU9fUElOXzFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEhJVkVfVElNRURfQ1RSTF9HUElPX1BJTl8yX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBISVZFX1RJTUVEX0NUUkxfR1BJT19QSU5fM19CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgSElWRV9USU1FRF9DVFJMX0dQSU9fUElOXzRfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEhJVkVfVElNRURfQ1RSTF9HUElPX1BJTl81X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBISVZFX1RJTUVEX0NUUkxfR1BJT19QSU5fNl9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSElWRV9USU1FRF9DVFJMX0dQSU9fUElOXzdfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIEhJVkVfVElNRURfQ1RSTF9HUElPX1BJTl84X0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBISVZFX1RJTUVEX0NUUkxfR1BJT19QSU5fOV9CSVRfSUQgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgSElWRV9USU1FRF9DVFJMX0dQSU9fUElOXzEwX0JJVF9JRCAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBISVZFX1RJTUVEX0NUUkxfR1BJT19QSU5fMTFfQklUX0lEICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEhJVkVfVElNRURfQ1RSTF9JUlFfU1BfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSElWRV9USU1FRF9DVFJMX0lSUV9JU1BfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBISVZFX1RJTUVEX0NUUkxfSVJRX0lOUFVUX1NZU1RFTV9CSVRfSUQgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIEhJVkVfVElNRURfQ1RSTF9JUlFfSU5QVVRfU0VMRUNUT1JfQklUX0lEICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgSElWRV9USU1FRF9DVFJMX0lSUV9JRl9CTE9DS19CSVRfSUQgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBISVZFX1RJTUVEX0NUUkxfSVJRX0dQX1RJTUVSXzBfQklUX0lEICAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEhJVkVfVElNRURfQ1RSTF9JUlFfR1BfVElNRVJfMV9CSVRfSUQgICAgICAgICAgICAgICAgICAgMTgKKyNkZWZpbmUgSElWRV9USU1FRF9DVFJMX0NTSV9TT0xfQklUX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAxOQorI2RlZmluZSBISVZFX1RJTUVEX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k5FTF9fIHNwZWNpZmljIG5vdCBjb3ZlcmVkIGluCisgKiAiZXJybm8uaCIKKyAqLworI2RlZmluZSBFTk9UU1VQIDI1MgorCisjZWxpZiBkZWZpbmVkKF9fR05VQ19fKQorI2luY2x1ZGUgPGVycm5vLmg+CisvKgorICogUHV0IGhlcmUgZXZlcnl0aGluZyBfX0dOVUNfXyBzcGVjaWZpYyBub3QgY292ZXJlZCBpbgorICogImVycm5vLmgiCisgKi8KKworI2Vsc2UgLyogZGVmYXVsdCBpcyBmb3IgdGhlIEZJU1QgZW52aXJvbm1lbnQgKi8KKyNpbmNsdWRlIDxlcnJuby5oPgorLyoKKyAqIFB1dCBoZXJlIGV2ZXJ5dGhpbmcgRklTVCBzcGVjaWZpYyBub3QgY292ZXJlZCBpbgorICogImVycm5vLmgiCisgKi8KKworI2VuZGlmCisKKyNkZWZpbmUgdmVyaWZleGl0KGNvbmQsZXJyb3JfdGFnKSAgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJaWYgKCEoY29uZCkpeyAgICAgICAgICAgICAgXAorCQlnb3RvIEVYSVQ7ICAgICAgICAgXAorCX0gICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUoMCkKKworI2RlZmluZSB2ZXJpZmptcGV4aXQoY29uZCkgICAgICAgICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpZiAoIShjb25kKSl7ICAgICAgICAgICAgICBcCisJCWdvdG8gRVhJVDsgICAgICAgICBcCisJfSAgICAgICAgICAgICAgICAgICAgICAgICAgXAorfSB3aGlsZSgwKQorCisjZW5kaWYgLyogX19FUlJPUl9TVVBQT1JUX0hfSU5DTFVERURfXyAqLwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL21lZGlhL2F0b21pc3AvcGNpL2F0b21pc3AyL2NzczI0MDAvaGl2ZV9pc3BfY3NzX2luY2x1ZGUvZXZlbnRfZmlmby5oIGIvZHJpdm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CFJU19PREQoYSkpCisKKy8qIGZvcmNlIGEgdmFsdWUgdG8gYSBsb3dlciBldmVuIHZhbHVlICovCisjZGVmaW5lIEVWRU5fRkxPT1IoeCkgICAgICAgICgoeCkgJiB+MSkKKworI2lmZGVmIElTUDI0MDEKKy8qIElmIHRoZSBudW1iZXIgaXMgb2RkLCBmaW5kIHRoZSBuZXh0IGV2ZW4gbnVtYmVyICovCisjZGVmaW5lIEVWRU5fQ0VJTCh4KSAgICAgICAgICgoSVNfT0REKHgpKSA/ICgoeCkgKyAxKSA6ICh4KSkKKworI2VuZGlmCisvKiBBID0+IEIgKi8KKyNkZWZpbmUgSU1QTElFUyhhLCBiKSAgICAgICAgKCEoYSkgfHwgKGIpKQorCisjZGVmaW5lIEFCUyhhKSAgICAgICAgICAgICAgICgoYSkgPj0gMCA/IChhKSA6IC0oYSkpCisKKy8qIGZvciBwcmVwcm9jZXNzb3IgYW5kIGFycmF5IHNpemluZyB1c2UgTUlOIGFuZCBNQVgKKyAgIG90aGVyd2lzZSB1c2UgbWluIGFuZCBtYXggKi8KKyNkZWZpbmUgTUFYKGEsIGIpICAgICAgICAgICAgKCgoYSkgPiAoYikpID8gKGEpIDogKGIpKQorI2RlZmluZSBNSU4oYSwgYikgICAgICAgICAgICAoKChhKSA8IChiKSkgPyAoYSkgOiAoYikpCisjaWZkZWYgSVNQMjQwMQorI2RlZmluZSBST1VORF9ESVYoYSwgYikgICAgICAoKGIpID8gKChhKSArICgoYikgPj4gMSkpIC8gKGIpIDogMCkKKyNlbmRpZgorI2RlZmluZSBDRUlMX0RJVihhLCBiKSAgICAgICAoKGIpID8gKChhKSArIChiKSAtIDEpIC8gKGIpIDogMCkKKyNkZWZpbmUgQ0VJTF9NVUwoYSwgYikgICAgICAgKENFSUxfRElWKGEsIGIpICogKGIpKQorI2RlZmluZSBDRUlMX01VTDIoYSwgYikgICAgICAoKChhKSArIChiKSAtIDEpICYgfigoYikgLSAxKSkKKyNkZWZpbmUgQ0VJTF9TSElG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fQ0xBU1NfTVBNQVRIX0ZVTkNfSCBtcHNkYXRhX3QgbXBfYWJzICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IGJpdGRlcHRoX3QgICAgICAgICAgICBiaXRkZXB0aCk7CisKK1NUT1JBR0VfQ0xBU1NfTVBNQVRIX0ZVTkNfSCBtcHNkYXRhX3QgbXBfbGltaXQgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBibmRfbG93LAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGJuZF9oaWdoLAorICAgIGNvbnN0IGJpdGRlcHRoX3QgICAgICAgICAgICBiaXRkZXB0aCk7CisKK1NUT1JBR0VfQ0xBU1NfTVBNQVRIX0ZVTkNfSCBtcHNkYXRhX3QgbXBfbWF4ICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjEsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9taW4gKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggbXBzZGF0YV90IG1wX211eCAoCisgICAgY29uc3Qgc3B1ZGF0YV90ICAgICAgICAgICAgIHNlbCwKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjEsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9ybXV4ICgKKyAgICBjb25zdCBzcHVkYXRhX3QgICAgICAgICAgICAgc2VsLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggbXBzZGF0YV90IG1wX2FkZCAoCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMCwKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4xLAorICAgIGNvbnN0IGJpdGRlcHRoX3QgICAgICAgICAgICBiaXRkZXB0aCk7CisKK1NUT1JBR0VfQ0xBU1NfTVBNQVRIX0ZVTkNfSCBtcHNkYXRhX3QgbXBfc2FkZCAoCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMCwKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4xLAorICAgIGNvbnN0IGJpdGRlcHRoX3QgICAgICAgICAgICBiaXRkZXB0aCk7CisKK1NUT1JBR0VfQ0xBU1NfTVBNQVRIX0ZVTkNfSCBtcHNkYXRhX3QgbXBfc3ViICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjEsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9zc3ViICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjEsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9hZGRhc3IxICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjEsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9zdWJhc3IxICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjEsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9sc3IgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3Qgc3BzZGF0YV90ICAgICAgICAgICAgIHNoZnQsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9hc3IgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3Qgc3BzZGF0YV90ICAgICAgICAgICAgIHNoZnQsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9yYXNyICgKKyAgICBjb25zdCBtcHNkYXRhX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AgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggbXBzZGF0YV90IG1wX2RpdiAoCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMCwKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4xLAorICAgIGNvbnN0IGJpdGRlcHRoX3QgICAgICAgICAgICBiaXRkZXB0aCk7CisKK1NUT1JBR0VfQ0xBU1NfTVBNQVRIX0ZVTkNfSCBtcHNkYXRhX3QgbXBfZGl2aCAoCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMCwKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4xLAorICAgIGNvbnN0IGJpdGRlcHRoX3QgICAgICAgICAgICBiaXRkZXB0aCk7CisKK1NUT1JBR0VfQ0xBU1NfTVBNQVRIX0ZVTkNfSCBtcHNkYXRhX3QgbXBfYW5kICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjEsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF9jb21wbCAoCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMCwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggbXBzZGF0YV90IG1wX29yICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjEsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIG1wc2RhdGFfdCBtcF94b3IgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggc3B1ZGF0YV90IG1wX2lzRVEgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggc3B1ZGF0YV90IG1wX2lzTkUgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggc3B1ZGF0YV90IG1wX2lzR1QgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggc3B1ZGF0YV90IG1wX2lzR0UgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggc3B1ZGF0YV90IG1wX2lzTFQgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggc3B1ZGF0YV90IG1wX2lzTEUgKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMSwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggc3B1ZGF0YV90IG1wX2lzRVFaICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IGJpdGRlcHRoX3QgICAgICAgICAgICBiaXRkZXB0aCk7CisKK1NUT1JBR0VfQ0xBU1NfTVBNQVRIX0ZVTkNfSCBzcHVkYXRhX3QgbXBfaXNORVogKAorICAgIGNvbnN0IG1wc2RhdGFfdCAgICAgICAgICAgICBpbjAsCisgICAgY29uc3QgYml0ZGVwdGhfdCAgICAgICAgICAgIGJpdGRlcHRoKTsKKworU1RPUkFHRV9DTEFTU19NUE1BVEhfRlVOQ19IIHNwdWRhdGFfdCBtcF9pc0dUWiAoCisgICAgY29uc3QgbXBzZGF0YV90ICAgICAgICAgICAgIGluMCwKKyAgICBjb25zdCBiaXRkZXB0aF90ICAgICAgICAgICAgYml0ZGVwdGgpOworCitTVE9SQUdFX0NMQVNTX01QTUFUSF9GVU5DX0ggc3B1ZGF0YV90IG1wX2lzR0VaICgKKyAgICBjb25zdCBtcHNkYXRhX3QgICAgICAgICAgICAgaW4wLAorICAgIGNvbnN0IGJpdGRlcHRoX3QgICAgICAgICAgICBiaX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1lcyAqLworCWVudW0gaWFfY3NzX2JheWVyX29yZGVyIHJhd19iYXllcl9vcmRlcjsgLyoqPCBiYXllciBvcmRlciwgb25seSB2YWxpZAorCQkJCQkJICAgICAgZm9yIFJBVyBiYXllciBmcmFtZXMgKi8KKwkvKiB0aGUgcGFyYW1zIGJlbG93IGFyZSBjb21wdXRlZCBiYXNlZCBvbiBiYXllcl9vcmRlcgorCSAqIHdlIGNhbiByZW1vdmUgdGhlIHJhd19iYXllcl9vcmRlciBpZiBpdCBpcyByZWR1bmRhbnQKKwkgKiBrZWVwaW5nIGl0IGZvciBub3cgYXMgYnh0IGFuZCBmcG4gY29kZSBzZWVtIHRvIHVzZSBpdAorCSAqLworCXN0cnVjdCBpYV9jc3NfY3JvcF9pbmZvIGNyb3BfaW5mbzsKK307CisKKyNkZWZpbmUgSUFfQ1NTX0JJTkFSWV9ERUZBVUxUX0ZSQU1FX0lORk8gXAoreyBcCisJezAsICAgICAgICAgICAgICAgICAgICAgIC8qIHdpZHRoICovIFwKKwkgMH0sICAgICAgICAgICAgICAgICAgICAgLyogaGVpZ2h0ICovIFwKKwkwLCAgICAgICAgICAgICAgICAgICAgICAgLyogcGFkZGVkX3dpZHRoICovIFwKKwlJQV9DU1NfRlJBTUVfRk9STUFUX05VTSwgLyogZm9ybWF0ICovIFwKKwkwLCAgICAgICAgICAgICAgICAgICAgICAgLyogcmF3X2JpdF9kZXB0aCAqLyBcCisJSUFfQ1NTX0JBWUVSX09SREVSX05VTSwgIC8qIHJhd19iYXllcl9vcmRlciAqLyBcCisJezAsICAgICAgICAgICAgICAgICAgICAgICAvKnN0YXJ0IGNvbCAqLyBcCisJIDB9LCAgICAgICAgICAgICAgICAgICAgICAgLypzdGFydCBsaW5lICovIFwKK30KKworLyoqCisgKiAgU3BlY2lmaWVzIHRoZSBEVlMgbG9vcCBkZWxheSBpbiAiZnJhbWUgcGVyaW9kcyIKKyAqLworZW51bSBpYV9jc3NfZnJhbWVfZGVsYXkgeworCUlBX0N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AgICAgICAgICAgICAgIGNzaV9yeF9jb25maWc7CisjZW5kaWYKKwlib29sICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjb25maWd1cmVfY3NzX3J4OworCXN0cnVjdCBpYV9jc3NfcGlwZSAgICAgICAgICAgICpsYXN0X3BpcGU7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bV9waXBlczsKKwlzdHJ1Y3QgaWFfY3NzX3BpcGUgICAgICAgICAgICoqcGlwZXM7CisJc3RydWN0IGlhX2Nzc19waXBlICAgICAgICAgICAgKmNvbnRpbnVvdXNfcGlwZTsKKwlzdHJ1Y3QgaWFfY3NzX2lzcF9wYXJhbWV0ZXJzICAqaXNwX3BhcmFtc19jb25maWdzOworCXN0cnVjdCBpYV9jc3NfaXNwX3BhcmFtZXRlcnMgICpwZXJfZnJhbWVfaXNwX3BhcmFtc19jb25maWdzOworCisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRfY2FwdDsKKwlib29sICAgICAgICAgICAgICAgICAgICAgICAgICAgZGlzYWJsZV9jb250X3ZmOworI2lmbmRlZiBJU1AyNDAxCisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0b3BfY29weV9wcmV2aWV3OworI2VuZGlmCisJYm9vbCAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YXJ0ZWQ7Cit9OworCisvKiogQGJyaWVmIEdldCBhIGJpbmFyeSBpbiB0aGUgc3RyZWFtLCB3aGljaCBiaW5hcnkgaGFzIHRoZSBzaGFkaW5nIGNvcnJlY3Rpb24uCisgKgorICogQHBhcmFtW2luXSBzdHJlYW06IFRoZSBzdHJlYW0uCisgKiBAcmV0dXJuCVRoZSBiaW5hcnkgd2hpY2ggaGFzIHRoZSBzaGFkaW5nIGNvcnJlY3Rpb24uCisgKgorICovCitzdHJ1Y3QgaWFfY3NzX2JpbmFyeSAqCitpYV9jc3Nfc3RyZWFtX2dldF9zaGFkaW5nX2NvcnJlY3Rpb25fYm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iAgaXMgZXhwcmVzc2VkIGJ5IHRoaXMgcGFyYW1ldGVyLgorCQkgKiAgVGhlIHNpemUgb2YgdGhpcyBhcmVhIGFzc3VtZXMgdGhlIHNpemUgQUZURVIgdGhlIGJheWVyIHNjYWxpbmcgaXMgYXBwbGllZAorCQkgKiAgdG8gdGhlIGlzcF9pbnB1dF9zZW5zb3JfZGF0YV9yZXNvbHV0aW9uX2Jxcy4KKwkJICogICAgOS4gc3RydWN0IGlhX2Nzc19jb29yZGluYXRlIHNlbnNvcl9kYXRhX29yaWdpbl9icXNfb25fc2N0Ymw7CisJCSAqCisJCSAqICAqKioqKiogRGVmaW5pdGlvbnMgb2YgdGhlIHNoYWRpbmcgdGFibGUgYW5kIHRoZSBzZW5zb3IgZGF0YSBhdCB0aGUgc2hhZGluZyBjb3JyZWN0aW9uICoqKioqKgorCQkgKgorCQkgKiAoMCwwKS0tLS0tLS0tLS0tLS0tLS0tLS0tLSBUVyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisJCSAqICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hhZGluZyB0YWJsZSB8CisJCSAqICAgfCAgICAgIChveCxveSktLS0tLS0tLS0tIFcgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gICAgICB8CisJCSAqICAgfCAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZW5zb3IgZGF0YSB8ICAgICB8CisJCSAqICAgfCAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICB8CisJCSAqICBUSCAgICAgICAgSCAgICAgICAgICAgICBzZW5zb3IgZGF0YSBjZW50ZXIgICAgICAgICAgICB8ICAgICB8CisJCSAqICAgfCAgICAgICAgfCAgICAgICAgICAgICAgICAgIChjeCxjeSkgICAgICAgICAgICAgICAgICB8ICAgICB8CisJCSAqICAgfCAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICB8CisJCSAqICAgfCAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICB8CisJCSAqICAgfCAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICB8CisJCSAqICAgfCAgICAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gICAgICB8CisJCSAqICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisJCSAqICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKwkJICoKKwkJICogICAgRXhhbXBsZSBvZiBzdGlsbCBtb2RlIGZvciBvdXRwdXQgMTA4MHA6CisJCSAqCisJCSAqICAgIG51bV9ob3JfZ3JpZHMgPSA2NgorCQkgKiAgICBudW1fdmVyX2dyaWRzID0gMzcKKwkJICogICAgYnFzX3Blcl9ncmlkX2NlbGwgPSAxNgorCQkgKiAgICBiYXllcl9zY2FsZV9ob3JfcmF0aW9faW4gPSAxCisJCSAqICAgIGJheWVyX3NjYWxlX2hvcl9yYXRpb19vdXQgPSAxCisJCSAqICAgIGJheWVyX3NjYWxlX3Zlcl9yYXRpb19pbiA9IDEKKwkJICogICAgYmF5ZXJfc2NhbGVfdmVyX3JhdGlvX291dCA9IDEKKwkJICogICAgaXNwX2lucHV0X3NlbnNvcl9kYXRhX3Jlc29sdXRpb25fYnFzID0gezk2NiwgNTQ2fQorCQkgKiAgICBzZW5zb3JfZGF0YV9vcmlnaW5fYnFzX29uX3NjdGJsID0gezYxLCAxNX0KKwkJICoKKwkJICogICAgVFcsIFRIIFticXNdOiB3aWR0aCBhbmQgaGVpZ2h0IG9mIHNoYWRpbmcgdGFibGUK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E0MywKKyAxNDIsICAxNDEsICAxNDAsICAxNDEsICAxMzksICAxMzgsICAxMzgsICAxMzgsCisgMTM3LCAgMTM2LCAgMTM2LCAgMTM1LCAgMTM0LCAgMTM0LCAgMTM0LCAgMTMzLAorIDEzMiwgIDEzMiwgIDEzMSwgIDEzMCwgIDEzMSwgIDEzMCwgIDEyOSwgIDEyOCwKKyAxMjksICAxMjcsICAxMjcsICAxMjcsICAxMjcsICAxMjUsICAxMjUsICAxMjUsCisgMTIzLCAgMTIzLCAgMTIyLCAgMTIwLCAgMTE4LCAgMTE1LCAgMTE0LCAgMTExLAorIDExMCwgIDEwOCwgIDEwNiwgIDEwNSwgIDEwMywgIDEwMiwgIDEwMCwgICA5OSwKKyAgOTcsICAgOTcsICAgOTYsICAgOTUsICAgOTQsICAgOTMsICAgOTMsICAgOTEsCisgIDkxLCAgIDkxLCAgIDkwLCAgIDkwLCAgIDg5LCAgIDg5LCAgIDg4LCAgIDg4LAorICA4OSwgICA4OCwgICA4OCwgICA4NywgICA4NywgICA4NywgICA4NywgICA4NiwKKyAgODcsICAgODcsICAgODYsICAgODcsICAgODYsICAgODYsICAgODQsICAgODQsCisgIDgyLCAgIDgwLCAgIDc4LCAgIDc2LCAgIDc0LCAgIDcyLCAgIDcwLCAgIDY4LAorICA2NywgICA2NSwgICA2MiwgICA2MCwgICA1OCwgICA1NiwgICA1NSwgICA1NCwKKyAgNTMsICAgNTEsICAgNDksICAgNDksICAgNDcsICAgNDUsICAgNDUsICAgNDUsCisgIDQxLCAgIDQwLCAgIDM5LCAgIDM5LCAgIDM0LCAgIDMzLCAgIDM0LCAgIDMyLAorICAyNSwgICAyMywgICAyNCwgICAyMCwgICAxMywgICAgOSwgICAxMiwgICAgMCwKKyAgIDAKK307CisKKyNlbGlmIGRlZmluZWQoSEFTX1ZBTUVNX1ZFUlNJT05fMSkKKworLyogRGVmYXVsdCBQYXJhbWV0ZXJzICovCitzdGF0aWMgY29uc3QgdWludDE2X3QKK2RlZmF1bH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KQorICogICAgICAgICAgICAgTUFDQzFfNSAoTUFDQyBieSBtYXRyaXggYW5kIGV4cG9uZW50KGlhX2Nzc19tYWNjX2NvbmZpZykpCisgKiAgSVNQMTogTUFDQyBpcyB1c2VkLgorICogIElTUDI6IE1BQ0MxXzUgaXMgdXNlZC4KKyAqCisgKiAgW01BQ0NdCisgKiAgIE91dFUgPSAoZGF0YTAwICogSW5VICsgZGF0YTAxICogSW5WKSA+PiAxMworICogICBPdXRWID0gKGRhdGExMCAqIEluVSArIGRhdGExMSAqIEluVikgPj4gMTMKKyAqCisgKiAgIGRlZmF1bHQvaW5lZmZlY3RpdmU6CisgKiAgIE91dFUgPSAoODE5MiAqIEluVSArICAgIDAgKiBJblYpID4+IDEzCisgKiAgIE91dFYgPSAoICAgMCAqIEluVSArIDgxOTIgKiBJblYpID4+IDEzCisgKgorICogIFtNQUNDMV81XQorICogICBPdXRVID0gKGRhdGEwMCAqIEluVSArIGRhdGEwMSAqIEluVikgPj4gKDEzIC0gZXhwKQorICogICBPdXRWID0gKGRhdGExMCAqIEluVSArIGRhdGExMSAqIEluVikgPj4gKDEzIC0gZXhwKQorICoKKyAqICAgZGVmYXVsdC9pbmVmZmVjdGl2ZTogKGV4cD0xKQorICogICBPdXRVID0gKDQwOTYgKiBJblUgKyAgICAwICogSW5WKSA+PiAoMTMgLSAxKQorICogICBPdXRWID0gKCAgIDAgKiBJblUgKyA0MDk2ICogSW5WKSA+PiAoMTMgLSAxKQorICovCitzdHJ1Y3QgaWFfY3NzX21hY2MxXzVfdGFibGUgeworCWludDE2X3QgZGF0YVtJQV9DU1NfTUFDQ19OVU1fQ09FRlMgKiBJQV9DU1NfTUFDQ19OVU1fQVhFU107CisJLyoqPCAxNiBvZiAyeDIgbWF0aXgKKwkgIE1BQ0MxXzU6IHNbbWFjY19jb25maWcuZXhwXS5bMTMtbWFjY19jb25maWcuZXhwXSwgWy04MTkyLDgxOTFdCisJICAgIGRlZmF1bHQvaW5lZmZlY3RpdmU6IChz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AgICAyMgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfRFMgICAgICAgICAgICAgICAyMworI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfVkFSICAgICAgICAgICAgICAyNAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfVkFSX0lTUDIgICAgICAgICAyNQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfU01BTEwgICAgICAgICAgICAyNgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfU1RSSVBFRCAgICAgICAgICAyNworI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfU1RSSVBFRF9JU1AyICAgICAyOAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfOE1QICAgICAgICAgICAgICAyOQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfMTRNUCAgICAgICAgICAgICAzMAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfMTZNUCAgICAgICAgICAgICAzMQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfUkVGICAgICAgICAgICAgICAzMgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfSVNQMjYxX1NUQUdFMCAgICAgICAgMzMKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9QUklNQVJZX0lTUDI2MV9TVEFHRTEgICAgICAgIDM0CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfUFJJTUFSWV9JU1AyNjFfU1RBR0UyICAgICAgICAzNQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1BSSU1BUllfSVNQMjYxX1NUQUdFMyAgICAgICAgMzYKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9QUklNQVJZX0lTUDI2MV9TVEFHRTQgICAgICAgIDM3CisjZGVmaW5lIFNIX0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AxNjcKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9DT1BZX0tFUk5FTFRFU1RfT1VUUFVUX1NZU1RFTSAgICAgIDE2OAorI2VuZGlmCisKKy8qIHNreWNhbSBwYXJ0aWFsIHRlc3QgcGlwZWxpbmVzKi8KKyNpZm5kZWYgSVNQMjQwMQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0RQQyAgICAgICAgICAgICAgICAgICAgICAgICAgMjAxCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fQkRTICAgICAgICAgICAgICAgICAgICAgICAgICAyMDIKKyNlbHNlCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fQkRTICAgICAgICAgICAgICAgICAgICAgICAgICAyMDEKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19CRFNfU1RSSVBFRCAgICAgICAgICAgICAgICAgIDIwMgorI2VuZGlmCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fTk9STSAgICAgICAgICAgICAgICAgICAgICAgICAyMDMKKyNpZm5kZWYgSVNQMjQwMQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX09CICAgICAgICAgICAgICAgICAgICAgICAgICAgMjA0CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fTElOICAgICAgICAgICAgICAgICAgICAgICAgICAyMDUKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19TSEQgICAgICAgICAgICAgICAgICAgICAgICAgIDIwNgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0JOUiAgICAgICAgICAgICAgICAgICAgICAgICAgMjA3CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fUkdCUFBfTlYxMl8xNiAgICAgICAgICAgICAgICAyMDgKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19SR0JQUCAgICAgICAgICAgICAgICAgICAgICAgIDIxMAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1lVVlAxICAgICAgICAgICAgICAgICAgICAgICAgMjExCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fRE0gICAgICAgICAgICAgICAgICAgICAgICAgICAyMTQKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19ZVVZQMl9DMCAgICAgICAgICAgICAgICAgICAgIDIxNgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1lVVlAyX0FOUl9WSUFfSVNQICAgICAgICAgICAgMjE3CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfVklERU9fSUZfVE9fRFZTICAgICAgICAgICAgICAgICAgICAyMTgKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9WSURFT19JRl9UT19UTlIgICAgICAgICAgICAgICAgICAgIDIxOQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0JEU19TVFJJUEVEICAgICAgICAgICAgICAgICAgMjI0CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfVklERU9fVEVTVF9BQ0NfQU5SX1NUUklQRUQgICAgICAgICAyMjUKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9WSURFT19URVNUX0FDQ19ZVVZQMl9TVFJJUEVEICAgICAgIDIyNworI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0JEU19SR0JQX0RWU19TVEFUX0MwICAgICAgICAgMjI4CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fQkRTX1JHQlBfRFZTX1NUQVRfQzBfU1RSSVBFRCAyMjkKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19SRUYgICAgICAgICAgICAgICAgICAgICAgICAgIDIzNgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0RWU19TVFJJUEVEICAgICAgICAgICAgICAgICAgMjM3CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fWVVWUDJfU1RSSVBFRCAgICAgICAgICAgICAgICAyMzgKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19ZVVZQMV9TVFJJUEVEICAgICAgICAgICAgICAgIDIzOQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1JHQlBQX1NUUklQRUQgICAgICAgICAgICAgICAgMjQwCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fQU5SX1NUUklQRUQgICAgICAgICAgICAgICAgICAyNDEKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19CTlJfU1RSSVBFRCAgICAgICAgICAgICAgICAgIDI0MgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1NIRF9TVFJJUEVEICAgICAgICAgICAgICAgICAgMjQzCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fTElOX1NUUklQRUQgICAgICAgICAgICAgICAgICAyNDQKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19PQl9TVFJJUEVEICAgICAgICAgICAgICAgICAgIDI0NQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX05PUk1fU1RSSVBFRCAgICAgICAgICAgICAgICAgMjQ4CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfQ09QWV9LRVJORUxURVNUX09VVFBVVF9TWVNURU0gICAgICAyNTMKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19YTlIgICAgICAgICAgICAgICAgICAgICAgICAgIDI1NgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1hOUl9TVFJJUEVEICAgICAgICAgICAgICAgICAgMjU3CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fUkVGX1NUUklQRUQgICAgICAgICAgICAgICAgICAyNTgKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9WSURFT19JRl9UT19PU1lTICAgICAgICAgICAgICAgICAgIDI1OQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1lVVlAxX0MwICAgICAgICAgICAgICAgICAgICAgMjYyCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fWE5SX1BSSU1BUlkgICAgICAgICAgICAgICAgICAyNjMKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19YTlJfUFJJTUFSWV9TVFJJUEVEICAgICAgICAgIDI2NAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0FOUiAgICAgICAgICAgICAgICAgICAgICAgICAgMjY1CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfVklERU9fVEVTVF9BQ0NfRFZTX1NUQVRfQzAgICAgICAgICAyNjYKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9WSURFT19JRl9UT19PU1lTX1NUUklQRUQgICAgICAgICAgIDI3MAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX09TWVNfUFJJTUFSWSAgICAgICAgICAgICAgICAgMjc2CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fT1NZU19QUklNQVJZX1NUUklQRUQgICAgICAgICAyNzcKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19ZVVZQMV9DMF9TVFJJUEVEICAgICAgICAgICAgIDI3OAorI2Vsc2UKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19OT1JNX1NUUklQRUQgICAgICAgICAgICAgICAgIDIwNAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX09CICAgICAgICAgICAgICAgICAgICAgICAgICAgMjA1CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fT0JfU1RSSVBFRCAgICAgICAgICAgICAgICAgICAyMDYKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19MSU4gICAgICAgICAgICAgICAgICAgICAgICAgIDIwNworI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0xJTl9TVFJJUEVEICAgICAgICAgICAgICAgICAgMjA4CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fU0hEICAgICAgICAgICAgICAgICAgICAgICAgICAyMDkKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19TSERfU1RSSVBFRCAgICAgICAgICAgICAgICAgIDIxMAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0JOUiAgICAgICAgICAgICAgICAgICAgICAgICAgMjExCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fQk5SX1NUUklQRUQgICAgICAgICAgICAgICAgICAyMTIKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19BTlIgICAgICAgICAgICAgICAgICAgICAgICAgIDIxMworI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0FOUl9TVFJJUEVEICAgICAgICAgICAgICAgICAgMjE0CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fRE0gICAgICAgICAgICAgICAgICAgICAgICAgICAyMTUKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19CRFNfUkdCUF9EVlNfU1RBVF9DMCAgICAgICAgIDIxNgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX0JEU19SR0JQX0RWU19TVEFUX0MwX1NUUklQRUQgMjE3CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fUkdCUFAgICAgICAgICAgICAgICAgICAgICAgICAyMTgKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19SR0JQUF9OVjEyXzE2ICAgICAgICAgICAgICAgIDIxOQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1JHQlBQX1NUUklQRUQgICAgICAgICAgICAgICAgMjIwCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fWVVWUDEgICAgICAgICAgICAgICAgICAgICAgICAyMjEKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19ZVVZQMV9TVFJJUEVEICAgICAgICAgICAgICAgIDIyMgorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1lVVlAxX0MwICAgICAgICAgICAgICAgICAgICAgMjIzCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fWVVWUDJfQzAgICAgICAgICAgICAgICAgICAgICAyMjQKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19ZVVZQMl9TVFJJUEVEICAgICAgICAgICAgICAgIDIyNQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1hOUiAgICAgICAgICAgICAgICAgICAgICAgICAgMjI2CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fWE5SX1NUUklQRUQgICAgICAgICAgICAgICAgICAyMjcKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19YTlJfUFJJTUFSWSAgICAgICAgICAgICAgICAgIDIyOAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX1hOUl9QUklNQVJZX1NUUklQRUQgICAgICAgICAgMjI5CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fUkVGICAgICAgICAgICAgICAgICAgICAgICAgICAyMzAKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19SRUZfU1RSSVBFRCAgICAgICAgICAgICAgICAgIDIzMQorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1ZJREVPX0lGX1RPX0RWUyAgICAgICAgICAgICAgICAgICAgMjMyCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fRFZTX1NUUklQRUQgICAgICAgICAgICAgICAgICAyMzMKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9WSURFT19JRl9UT19UTlIgICAgICAgICAgICAgICAgICAgIDIzNAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1ZJREVPX0lGX1RPX09TWVMgICAgICAgICAgICAgICAgICAgMjM1CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfVklERU9fSUZfVE9fT1NZU19TVFJJUEVEICAgICAgICAgICAyMzYKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JRl9UT19PU1lTX1BSSU1BUlkgICAgICAgICAgICAgICAgIDIzNworI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX09TWVNfUFJJTUFSWV9TVFJJUEVEICAgICAgICAgMjM4CisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fWVVWUDFfQzBfU1RSSVBFRCAgICAgICAgICAgICAyMzkKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9WSURFT19ZVVZQMV9UT19PU1lTICAgICAgICAgICAgICAgIDI0MAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX0lGX1RPX09TWVNfUFJFVklFVyAgICAgICAgICAgICAgICAgMjQxCisjZGVmaW5lIFNIX0NTU19CSU5BUllfSURfSUZfVE9fT1NZU19QUkVWSUVXX1NUUklQRUQgICAgICAgICAyNDIKKyNlbmRpZgorCisvKiBTa3ljYW0gSVIgY2FtZXJhIGJpbmFyaWVzICovCisjaWZuZGVmIElTUDI0MDEKKyNkZWZpbmUgU0hfQ1NTX0JJTkFSWV9JRF9JUl9JRl9UT19PU1lTX05PX1hOUiAgICAgICAgICAgICAgIDMwMAorI2RlZmluZSBTSF9DU1NfQklOQVJZX0lEX1ZJREVPX0lSX0lGX1RPX09TWVNfTk9fRFZTX05PX1ROUl9OT19YTlIgICAgMzAxCis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cit9OworCitzdHJ1Y3QgaWFfY3NzX2JpbmFyeSB7CisJY29uc3Qgc3RydWN0IGlhX2Nzc19iaW5hcnlfeGluZm8gKmluZm87CisJZW51bSBpYV9jc3Nfc3RyZWFtX2Zvcm1hdCBpbnB1dF9mb3JtYXQ7CisJc3RydWN0IGlhX2Nzc19mcmFtZV9pbmZvIGluX2ZyYW1lX2luZm87CisJc3RydWN0IGlhX2Nzc19mcmFtZV9pbmZvIGludGVybmFsX2ZyYW1lX2luZm87CisJc3RydWN0IGlhX2Nzc19mcmFtZV9pbmZvIG91dF9mcmFtZV9pbmZvW0lBX0NTU19CSU5BUllfTUFYX09VVFBVVF9QT1JUU107CisJc3RydWN0IGlhX2Nzc19yZXNvbHV0aW9uIGVmZmVjdGl2ZV9pbl9mcmFtZV9yZXM7CisJc3RydWN0IGlhX2Nzc19mcmFtZV9pbmZvIHZmX2ZyYW1lX2luZm87CisJaW50ICAgICAgICAgICAgICAgICAgICAgIGlucHV0X2J1Zl92ZWN0b3JzOworCWludCAgICAgICAgICAgICAgICAgICAgICBkZWNpX2ZhY3Rvcl9sb2cyOworCWludCAgICAgICAgICAgICAgICAgICAgICB2Zl9kb3duc2NhbGVfbG9nMjsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgczNhdGJsX3dpZHRoOworCWludCAgICAgICAgICAgICAgICAgICAgICBzM2F0YmxfaGVpZ2h0OworCWludCAgICAgICAgICAgICAgICAgICAgICBzM2F0YmxfaXNwX3dpZHRoOworCWludCAgICAgICAgICAgICAgICAgICAgICBzM2F0YmxfaXNwX2hlaWdodDsKKwl1bnNpZ25lZCBpbnQgICAgICAgICAgICAgbW9ycGhfdGJsX3dpZHRoOworCXVuc2lnbmVkIGludCAgICAgICAgICAgICBtb3JwaF90YmxfYWxpZ25lZF93aWR0aDsKKwl1bnNpZ25lZCBpbnQgICAgICAgICAgICAgbW9ycGhfdGJsX2hlaWdodDsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgc2N0Ymxfd2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ogM0EvU2hhZGluZyBkZWNpbWF0aW9uIGZhY3RvciBzcGNpZmljYXRpb24gKGF0IEF1Z3VzdCAyMDA4KQorICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgKiBbSW1hZ2UgV2lkdGggKEJRKV0gW0RlY2ltYXRpb24gRmFjdG9yIChCUSldIFtSZXN1bHRpbmcgZ3JpZCBjZWxsc10KKyNpZm5kZWYgSVNQMjQwMQorICogMTI4MCA/YyAgICAgICAgICAgICAzMiAgICAgICAgICAgICAgICAgICAgICAgNDAgP2MKKyAqICA2NDAgP2MgMTI3OSAgICAgICAgMTYgICAgICAgICAgICAgICAgICAgICAgIDQwID9jIDgwCisgKiAgICAgID9jICA2MzkgICAgICAgICA4ICAgICAgICAgICAgICAgICAgICAgICAgICA/YyA4MAorI2Vsc2UKKyAqIGZyb20gMTI4MCAgICAgICAgICAgICAgICAgICAzMiAgICAgICAgICAgICAgICAgZnJvbSA0MAorICogZnJvbSAgNjQwIHRvIDEyNzkgICAgICAgICAgIDE2ICAgICAgICAgICAgICAgICBmcm9tIDQwIHRvIDgwCisgKiAgICAgICAgICAgdG8gIDYzOSAgICAgICAgICAgIDggICAgICAgICAgICAgICAgICAgICAgICAgdG8gODAKKyNlbmRpZgorICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgKi8KKy8qIE1heGltdW0gYW5kIG1pbmltdW0gZGVjaW1hdGlvbiBmYWN0b3IgYnkgdGhlIHNwZWNpZmljYXRpb24gKi8KKyNkZWZpbmUgTUFYX1NQRUNfREVDSV9GQUNUX0xPRzIJCTUKKyNkZWZpbmUgTUlOX1NQRUNfREVDSV9GQUNUX0xPRzIJCTMKKy8qIHRoZSBzbWFsbGVzdCBmcmFtZSB3aWR0aCBpbiBiYXllci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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqKiogU3RhdGljIGZ1bmN0aW9ucworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBtYXBfYnVmZmVyX3R5cGVfdG9fcXVldWVfaWQoCisJdW5zaWduZWQgaW50IHRocmVhZF9pZCwKKwllbnVtIGlhX2Nzc19idWZmZXJfdHlwZSBidWZfdHlwZQorCSk7CitzdGF0aWMgdm9pZCB1bm1hcF9idWZmZXJfdHlwZV90b19xdWV1ZV9pZCgKKwl1bnNpZ25lZCBpbnQgdGhyZWFkX2lkLAorCWVudW0gaWFfY3NzX2J1ZmZlcl90eXBlIGJ1Zl90eXBlCisJKTsKKworc3RhdGljIGlhX2Nzc19xdWV1ZV90ICpidWZxX2dldF9xaGFuZGxlKAorCWVudW0gc2hfY3NzX3F1ZXVlX3R5cGUgdHlwZSwKKwllbnVtIHNoX2Nzc19xdWV1ZV9pZCBpZCwKKwlpbnQgdGhyZWFkCisJKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoqKiBQdWJsaWMgZnVuY3Rpb25zCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3ZvaWQgaWFfY3NzX3F1ZXVlX21hcF9pbml0KHZvaWQpCit7CisJdW5zaWduZWQgaW50IGksIGo7CisKKwlmb3IgKGkgPSAwOyBpIDwgU0hfQ1NTX01BWF9TUF9USFJFQURTOyBpKyspIHsKKwkJZm9yIChqID0gMDsgaiA8IFNIX0NTU19NQVhfTlVNX1FVRVVFUzsgaisrKQorCQkJcXVldWVfYXZhaWxhYmlsaXR5W2ldW2pdID0gdHJ1ZTsKKwl9CisKKwlmb3IgKGkgPSAwOyBpIDwgU0hfQ1NTX01BWF9TUF9USFJFQURTOyBpKyspIHsKKw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IGluaXRpYWxpemVkCisgKiBAcmV0dXJuCVRoZSBlcnJvciBjb2RlLgorICovCitlbnVtIGlhX2Nzc19lcnIgaWFfY3NzX2ZyYW1lX2NoZWNrX2luZm8oY29uc3Qgc3RydWN0IGlhX2Nzc19mcmFtZV9pbmZvICppbmZvKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKioqKglGcmFtZSBBUElzCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiogQGJyaWVmIEluaXRpYWxpemUgdGhlIHBsYW5lIGRlcGVuZGluZyBvbiB0aGUgZnJhbWUgdHlwZQorICoKKyAqIEBwYXJhbQorICogQHBhcmFtW2luXQlmcmFtZSAgICAgICAgICAgVGhlIGZyYW1lIGF0dHJpYnV0ZXMgdG8gYmUgaW5pdGlhbGl6ZWQKKyAqIEByZXR1cm4JVGhlIGVycm9yIGNvZGUuCisgKi8KK2VudW0gaWFfY3NzX2VyciBpYV9jc3NfZnJhbWVfaW5pdF9wbGFuZXMoc3RydWN0IGlhX2Nzc19mcmFtZSAqZnJhbWUpOworCisvKiogQGJyaWVmIEZyZWUgYW4gYXJyYXkgb2YgZnJhbWVzCisgKgorICogQHBhcmFtCisgKiBAcGFyYW1baW5dCW51bV9mcmFtZXMgICAgICBUaGUgbnVtYmVyIG9mIGZyYW1lcyB0byBiZSBmcmVlZCBpbiB0aGUgYXJyYXkKKyAqIEBwYXJhbVtpbl0gICAqKmZyYW1lc19hcnJheSAgVGhlIGFycmF5IG9mIGZyYW1lcyB0byBiZSByZW1vdmVkCisgKiBAcmV0dXJuCisgKi8KK3ZvaWQgaWFfY3NzX2ZyYW1lX2ZyZWVfbXVsdGlwbGUodW5zaWduZWQgaW50IG51bV9mcmFtZXMsCisJc3RydWN0IGlhX2Nzc19mcmFtZSAqKmZyYW1lc19hcnJheS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oImZyYW1lID0gJXAiLCBmcmFtZSk7CisKKwlpZiAoZnJhbWUgIT0gTlVMTCkgeworCQltbWdyX2ZyZWUoZnJhbWUtPmRhdGEpOworCQlzaF9jc3NfZnJlZShmcmFtZSk7CisJfQorCisJSUFfQ1NTX0xFQVZFX1BSSVZBVEUoInZvaWQiKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqKglNb2R1bGUgcHVibGljIGZ1bmN0aW9ucworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2VudW0gaWFfY3NzX2VyciBpYV9jc3NfZnJhbWVfY2hlY2tfaW5mbyhjb25zdCBzdHJ1Y3QgaWFfY3NzX2ZyYW1lX2luZm8gKmluZm8pCit7CisJYXNzZXJ0KGluZm8gIT0gTlVMTCk7CisJaWYgKGluZm8tPnJlcy53aWR0aCA9PSAwIHx8IGluZm8tPnJlcy5oZWlnaHQgPT0gMCkKKwkJcmV0dXJuIElBX0NTU19FUlJfSU5WQUxJRF9BUkdVTUVOVFM7CisJcmV0dXJuIElBX0NTU19TVUNDRVNTOworfQorCitlbnVtIGlhX2Nzc19lcnIgaWFfY3NzX2ZyYW1lX2luaXRfcGxhbmVzKHN0cnVjdCBpYV9jc3NfZnJhbWUgKmZyYW1lKQoreworCWFzc2VydChmcmFtZSAhPSBOVUxMKTsKKworCXN3aXRjaCAoZnJhbWUtPmluZm8uZm9ybWF0KSB7CisJY2FzZSBJQV9DU1NfRlJBTUVfRk9STUFUX01JUEk6CisJCWZyYW1lX2luaXRfbWlwaV9wbGFuZShmcmFtZSwgJmZyYW1lLT5wbGFuZXMucmF3LAorCQkJZnJhbWUtPmluZm8ucmVzLmhlaWdodCwKKwkJCWZyYW1lLT5pbmZvLnBhZGRlZF93aWR0aCwKKwkJCWZyYW1lLT5pbmZvLnJh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lcnIgaWZtdHJfaW5wdXRfc3RhcnRfbGluZSgKKwkJY29uc3Qgc3RydWN0IGlhX2Nzc19zdHJlYW1fY29uZmlnICpjb25maWcsCisJCXVuc2lnbmVkIGludCBiaW5faW4sCisJCXVuc2lnbmVkIGludCAqc3RhcnRfbGluZSk7CisKK3N0YXRpYyB2b2lkIGlmbXRyX3NldF9pZl9ibG9ja2luZ19tb2RlKAorCQljb25zdCBpbnB1dF9mb3JtYXR0ZXJfY2ZnX3QgKiBjb25zdCBjb25maWdfYSwKKwkJY29uc3QgaW5wdXRfZm9ybWF0dGVyX2NmZ190ICogY29uc3QgY29uZmlnX2IpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBQdWJsaWMgZnVuY3Rpb25zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBJU1AgZXhwZWN0cyBHUkJHIGJheWVyIG9yZGVyLCB3ZSBza2lwIG9uZSBsaW5lIGFuZC9vciBvbmUgcm93CisgKiB0byBjb3JyZWN0IGluIGNhc2UgdGhlIGlucHV0IGJheWVyIG9yZGVyIGlzIGRpZmZlcmVudC4KKyAqLwordW5zaWduZWQgaW50IGlhX2Nzc19pZm10cl9saW5lc19uZWVkZWRfZm9yX2JheWVyX29yZGVyKAorCQljb25zdCBzdHJ1Y3QgaWFfY3NzX3N0cmVhbV9jb25maWcgKmNvbmZpZykKK3sKKwlhc3NlcnQoY29uZmlnICE9IE5VTEwpOworCWlmICgoSUFfQ1NTX0JBWUVSX09SREVSX0JHR1IgPT0gY29uZmlnLT5pbnB1dF9jb25maWcuYmF5ZXJfb3JkZXIpCisJICAgIHx8IChJQV9DU1NfQkFZRVJfT1JERVJfR0JSRyA9PSBjb25maWctPmlucHV0X2NvbmZpZy5iYXllcl9vcmRlcikpCisJCXJldHVybiAxOworCisJcmV0dXJuIDA7Cit9CisKK3V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RyX3NldF9pZl9ibG9ja2luZ19tb2RlKCZpZl9hX2NvbmZpZywgJmlmX2JfY29uZmlnKTsKKwkJCS8qIFNldCB0aGUgaWZjb25maWdzIHRvIFNQIGdyb3VwICovCisJCQlzaF9jc3Nfc3Bfc2V0X2lmX2NvbmZpZ3MoJmlmX2FfY29uZmlnLCAmaWZfYl9jb25maWcsCisJCQkJCQkgaWZfY29uZmlnX2luZGV4KTsKKwkJfQorCX0gZWxzZSB7CisJCWlmIChTSF9DU1NfSUZfQ09ORklHX05PVF9ORUVERUQgIT0gaWZfY29uZmlnX2luZGV4KSB7CisJCQlhc3NlcnQoaWZfY29uZmlnX2luZGV4IDw9IFNIX0NTU19NQVhfSUZfQ09ORklHUyk7CisKKwkJCWlmbXRyX3NldF9pZl9ibG9ja2luZ19tb2RlKCZpZl9hX2NvbmZpZywgTlVMTCk7CisJCQkvKiBTZXQgdGhlIGlmY29uZmlncyB0byBTUCBncm91cCAqLworCQkJc2hfY3NzX3NwX3NldF9pZl9jb25maWdzKCZpZl9hX2NvbmZpZywgTlVMTCwKKwkJCQkJCSBpZl9jb25maWdfaW5kZXgpOworCQl9CisJfQorCisJcmV0dXJuIElBX0NTU19TVUNDRVNTOworfQorCitib29sIGlmbXRyX3NldF9pZl9ibG9ja2luZ19tb2RlX3Jlc2V0ID0gdHJ1ZTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogU3RhdGljIGZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB2b2lkIGlmbXRyX3NldF9pZl9ibG9ja2luZ19tb2RlKAorCQljb25zdCBpbnB1dF9mb3JtYXR0ZXJfY2ZnX3QgKiBjb25zdCBjb25maWdfYSwKKwkJY29uc3QgaW5wdXRfZm9ybWF0dGVyX2NmZ190ICogY29uc3QgY29uZmlnX2IpCit7CisJa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KKyNkZWZpbmUgUElQRUxJTkVfTlVNX1VOTUFQUEVEICAgICAgICAgICAgICAgICAgICh+MFUpCisjZGVmaW5lIFBJUEVMSU5FX1NQX1RIUkVBRF9FTVBUWV9UT0tFTiAgICAgICAgICAoMHgwKQorI2RlZmluZSBQSVBFTElORV9TUF9USFJFQURfUkVTRVJWRURfVE9LRU4gICAgICAgKDB4MSkKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKioqIFN0YXRpYyB2YXJpYWJsZXMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHVuc2lnbmVkIGludCBwaXBlbGluZV9udW1fdG9fc3BfdGhyZWFkX21hcFtJQV9DU1NfUElQRUxJTkVfTlVNX01BWF07CitzdGF0aWMgdW5zaWduZWQgaW50IHBpcGVsaW5lX3NwX3RocmVhZF9saXN0W1NIX0NTU19NQVhfU1BfVEhSRUFEU107CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqKiogU3RhdGljIGZ1bmN0aW9ucworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBwaXBlbGluZV9pbml0X3NwX3RocmVhZF9tYXAodm9pZCk7CitzdGF0aWMgdm9pZCBwaXBlbGluZV9tYXBfbnVtX3RvX3NwX3RocmVhZCh1bnNpZ25lZCBpbnQgcGlwZV9udW0pOworc3RhdGljIHZvaWQgcGlwZWxpbmVfdW5tYXBfbnVtX3RvX3NwX3RocmVhZCh1bnNpZ25lZCBpbnQgcGlwZV9udW0pOworc3RhdGljIHZvaWQgcGlwZWxpbmVfaW5pdF9kZWZhdWx0cygKKwlzdHJ1Y3QgaWFfY3NzX3BpcGVsaW5lICpwaXBlbGluZSwKKwllbnVtIGlhX2Nzc19waXBlX2lkIH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IHJldCA9IGZhbHNlOworCisJSUFfQ1NTX0VOVEVSX1BSSVZBVEUoImtleSA9ICVkIiwga2V5KTsKKworCWlmICgoa2V5ID49IElBX0NTU19QSVBFTElORV9OVU1fTUFYKSB8fCAoa2V5ID49IElBX0NTU19QSVBFX0lEX05VTSkpIHsKKwkJSUFfQ1NTX0VSUk9SKCJJbnZhbGlkIGtleSEhIik7CisJCUlBX0NTU19MRUFWRV9QUklWQVRFKCJyZXR1cm4gPSAlZCIsIGZhbHNlKTsKKwkJcmV0dXJuIGZhbHNlOworCX0KKworCXJldCA9IChib29sKShwaXBlbGluZV9udW1fdG9fc3BfdGhyZWFkX21hcFtrZXldICE9ICh1bnNpZ25lZClQSVBFTElORV9OVU1fVU5NQVBQRUQpOworCisJSUFfQ1NTX0xFQVZFX1BSSVZBVEUoInJldHVybiA9ICVkIiwgcmV0KTsKKwlyZXR1cm4gcmV0OworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKioqIFN0YXRpYyBmdW5jdGlvbnMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBQaXBlbGluZToKKyAqIFRvIG9yZ2FuaXplIHRoZSBzZXZlcmFsIGRpZmZlcmVudCBiaW5hcmllcyBmb3IgZWFjaCB0eXBlIG9mIG1vZGUsCisgKiB3ZSB1c2UgYSBwaXBlbGluZS4gQSBwaXBlbGluZSBjb250YWlucyBhIG51bWJlciBvZiBzdGFnZXMsIGVhY2ggd2l0aAorICogdGhlaXIgb3duIGJpbmFyeSBhbmQgZnJhbWUgcG9pbnRlcnMuCisgKiBXaGVuIHN0YWdlcyBhcmUgYWRkZWQgdG8gYSBwaXBlbGluZSwgb3V0cHV0IGZyYW1lcyB0aGF0IGFyZSBub3QgcGFzc2VkCisgKiBmcm9tIG91dHNpZGUgYXJlIGF1dG9tYXRpY2FsbHkgYWxsb2NhdGVkLgorICog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c2VnbWVudCBhZGRyZXNzIGluIGRtZW0gICovCisJdWludDMyX3QgICAgICAgIGRhdGFfc2l6ZTsgICAgICAgICAgICAgLyoqPCBkYXRhIHNlZ21lbnQgc2l6ZSAgICAgICAgICAgICovCisJdWludDMyX3QgICAgICAgIGJzc19zaXplOyAgICAgICAgICAgICAgLyoqPCBic3Mgc2VnbWVudCBzaXplICAgICAgICAgICAgICovCisJdWludDMyX3QgICAgICAgIHNwY3RybF9jb25maWdfZG1lbV9hZGRyOyAvKiogPGxvY2F0aW9uIG9mIGRtZW1fY2ZnICBpbiBTUCBkbWVtICovCisJdWludDMyX3QgICAgICAgIHNwY3RybF9zdGF0ZV9kbWVtX2FkZHI7ICAvKiogPCBsb2NhdGlvbiBvZiBzdGF0ZSAgaW4gU1AgZG1lbSAqLworCXVuc2lnbmVkIGludCAgICBzcF9lbnRyeTsgICAgICAgICAgICAgICAgLyoqIDwgZW50cnkgZnVuY3Rpb24gcHRyIG9uIFNQICovCisJY29uc3Qgdm9pZCAgICAgICpjb2RlOyAgICAgICAgICAgICAgICAgICAvKio8IGxvY2F0aW9uIG9mIGZpcm13YXJlICovCisJdWludDMyX3QgICAgICAgICBjb2RlX3NpemU7CisJY2hhciAgICAgICpwcm9ncmFtX25hbWU7ICAgIC8qKjwgbm90IHVzZWQgb24gaGFyZHdhcmUsIG9ubHkgZm9yIHNpbXVsYXRpb24gKi8KK30gaWFfY3NzX3NwY3RybF9jZmc7CisKKy8qIEdldCB0aGUgY29kZSBhZGRyIGluIEREUiBvZiBTUCAqLworaHJ0X3ZhZGRyZXNzIGdldF9zcF9jb2RlX2FkZHIoc3BfSURfdCAgc3BfaWQpOworCisvKiAhIExvYWQgZmlybXdhcmUgb24gdG8gc3BlY2ZpZWQgU1AKKyovCitlbnVtIGlhX2Nzc19lcnIgaWFfY3NzX3NwY3RybF9sb2FkX2Z3KHNwX0lEX3Qgc3BfaWQsCisJCQlpYV9jc3Nfc3BjdHJsX2NmZyAqc3BjdHJsX2N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SA9IE5VTEw7CisJCX0KKworCQlpZiAoKCpkdnNfNmF4aXNfY29uZmlnKS0+eWNvb3Jkc195ICE9IE5VTEwpCisJCXsKKwkJCXNoX2Nzc19mcmVlKCgqZHZzXzZheGlzX2NvbmZpZyktPnljb29yZHNfeSk7CisJCQkoKmR2c182YXhpc19jb25maWcpLT55Y29vcmRzX3kgPSBOVUxMOworCQl9CisKKwkJLyogRnJlZSB1cCBVViBidWZmZXJzICovCisJCWlmICgoKmR2c182YXhpc19jb25maWcpLT54Y29vcmRzX3V2ICE9IE5VTEwpCisJCXsKKwkJCXNoX2Nzc19mcmVlKCgqZHZzXzZheGlzX2NvbmZpZyktPnhjb29yZHNfdXYpOworCQkJKCpkdnNfNmF4aXNfY29uZmlnKS0+eGNvb3Jkc191diA9IE5VTEw7CisJCX0KKworCQlpZiAoKCpkdnNfNmF4aXNfY29uZmlnKS0+eWNvb3Jkc191diAhPSBOVUxMKQorCQl7CisJCQlzaF9jc3NfZnJlZSgoKmR2c182YXhpc19jb25maWcpLT55Y29vcmRzX3V2KTsKKwkJCSgqZHZzXzZheGlzX2NvbmZpZyktPnljb29yZHNfdXYgPSBOVUxMOworCQl9CisKKwkJSUFfQ1NTX0xFQVZFX1BSSVZBVEUoImR2c182YXhpc19jb25maWcgJXAiLCAoKmR2c182YXhpc19jb25maWcpKTsKKwkJc2hfY3NzX2ZyZWUoKmR2c182YXhpc19jb25maWcpOworCQkqZHZzXzZheGlzX2NvbmZpZyA9IE5VTEw7CisJfQorfQorCit2b2lkIGNvcHlfZHZzXzZheGlzX3RhYmxlKHN0cnVjdCBpYV9jc3NfZHZzXzZheGlzX2NvbmZpZyAqZHZzX2NvbmZpZ19kc3QsCisJCQljb25zdCBzdHJ1Y3QgaWFfY3NzX2R2c182YXhpc19jb25maWcgKmR2c19jb25maWdfc3JjKQoreworCXVuc2lnbmVkIGludCB3aWR0aF95OworCXVuc2lnbmVkIGludCBoZWlnaHRfeTsKKwl1bnNpZ25lZCBpbnQgd2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C00OCwgIC00OCwgIC00OSwgIC00OSwKKwkJIC01MCwgIC01MCwgIC01MSwgIC01MSwgIC01MiwgIC01MiwgIC01MywgIC01MywKKwkJIC01NCwgIC01NCwgIC01NSwgIC01NSwgIC01NiwgIC01NiwgIC01NywgIC01NywKKwkJIC01OCwgIC01OSwgIC01OSwgIC02MCwgIC02MCwgIC02MSwgIC02MSwgIC02MiwKKwkJIC02MiwgIC02MywgIC02MywgIC02NCwgIC02NSwgIC02NSwgIC02NiwgIC02NiwKKwkJIC02NywgIC02NywgIC02OCwgIC02OSwgIC02OSwgIC03MCwgIC03MCwgIC03MSwKKwkJIC03MSwgIC03MiwgIC03MywgIC03MywgIC03NCwgIC03NCwgIC03NSwgIC03NSwKKwkJIC03NiwgIC03NywgIC03NywgIC03OCwgIC03OCwgIC03OSwgIC04MCwgIC04MCwKKwkJIC04MSwgIC04MSwgIC04MiwgIC04MywgIC04MywgIC04NCwgIC04NCwgIC04NSwKKwkJIC04NiwgIC04NiwgIC04NywgIC04NywgIC04OCwgIC04OSwgIC04OSwgIC05MCwKKwkJIC05MSwgIC05MSwgIC05MiwgIC05MiwgIC05MywgIC05NCwgIC05NCwgIC05NSwKKwkJIC05NiwgIC05NiwgIC05NywgIC05NywgIC05OCwgIC05OSwgIC05OSwgLTEwMCwKKwkJLTEwMSwgLTEwMSwgLTEwMiwgLTEwMiwgLTEwMywgLTEwNCwgLTEwNCwgLTEwNSwKKwkJLTEwNiwgLTEwNiwgLTEwNywgLTEwOCwgLTEwOCwgLTEwOSwgLTEwOSwgLTExMCwKKwkJLTExMSwgLTExMSwgLTExMiwgLTExMywgLTExMywgLTExNCwgLTExNSwgLTExNSwKKwkJLTExNiwgLTExNywgLTExNywgLTExOCwgLTExOSwgLTExOSwgLTEyMCwgLTEyMSwKKwkJLTEyMSwgLTEyMiwgLTEyMiwgLTEyMywgLTEyNCwgLTEyNCwgLTEyNSwgLTEyNiwKKwkJLTEyNiwgLTEyNywgLTEyOCwgLTEyOCwgLT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wNjcsIDEwNjIsIDEwNTYsIDEwNTEsCisJCTEwNDYsIDEwNDEsIDEwMzYsIDEwMzEsIDEwMjYsIDEwMjEsIDEwMTYsIDEwMTEsCisJCTEwMDYsIDEwMDEsICA5OTYsICA5OTEsICA5ODYsICA5ODIsICA5NzcsICA5NzIsCisJCSA5NjcsICA5NjIsICA5NTcsICA5NTIsICA5NDcsICA5NDIsICA5MzcsICA5MzIsCisJCSA5MjgsICA5MjMsICA5MTgsICA5MTMsICA5MDgsICA5MDMsICA4OTgsICA4OTQsCisJCSA4ODksICA4ODQsICA4NzksICA4NzQsICA4NzAsICA4NjUsICA4NjAsICA4NTUsCisJCSA4NTAsICA4NDYsICA4NDEsICA4MzYsICA4MzEsICA4MjcsICA4MjIsICA4MTcsCisJCSA4MTMsICA4MDgsICA4MDMsICA3OTgsICA3OTQsICA3ODksICA3ODQsICA3ODAsCisJCSA3NzUsICA3NzEsICA3NjYsICA3NjEsICA3NTcsICA3NTIsICA3NDcsICA3NDMsCisJCSA3MzgsICA3MzQsICA3MjksICA3MjUsICA3MjAsICA3MTYsICA3MTEsICA3MDcsCisJCSA3MDIsICA2OTgsICA2OTMsICA2ODksICA2ODQsICA2ODAsICA2NzUsICA2NzEsCisJCSA2NjYsICA2NjIsICA2NTcsICA2NTMsICA2NDksICA2NDQsICA2NDAsICA2MzUsCisJCSA2MzEsICA2MjcsICA2MjIsICA2MTgsICA2MTQsICA2MDksICA2MDUsICA2MDEsCisJCSA1OTYsICA1OTIsICA1ODgsICA1ODQsICA1NzksICA1NzUsICA1NzEsICA1NjcsCisJCSA1NjIsICA1NTgsICA1NTQsICA1NTAsICA1NDYsICA1NDEsICA1MzcsICA1MzMsCisJCSA1MjksICA1MjUsICA1MjEsICA1MTYsICA1MTIsICA1MDgsICA1MDQsICA1MDAsCisJCSA0OTYsICA0OTIsICA0ODgsICA0ODQsICA0ODAsICA0NzYsICA0NzIsICA0NjgsCisJCSA0NjQsICA0NjAsICA0NTYsICA0NTIsICA0NDgsICA0NDQsICA0NDAsICA0MzYsCisJCSA0MzIsICA0MjksICA0MjUsICA0MjEsICA0MTcsICA0MTMsICA0MDksICA0MDUsCisJCSA0MDIsICAzOTgsICAzOTQsICAzOTAsICAzODYsICAzODMsICAzNzksICAzNzUsCisJCSAzNzIsICAzNjgsICAzNjQsICAzNjAsICAzNTcsICAzNTMsICAzNDksICAzNDYsCisJCSAzNDIsICAzMzgsICAzMzUsICAzMzEsICAzMjgsICAzMjQsICAzMjEsICAzMTcsCisJCSAzMTMsICAzMTAsICAzMDYsICAzMDMsICAyOTksICAyOTYsICAyOTIsICAyODksCisJCSAyODYsICAyODIsICAyNzksICAyNzUsICAyNzIsICAyNjksICAyNjUsICAyNjIsCisJCSAyNTgsICAyNTUsICAyNTIsICAyNDgsICAyNDUsICAyNDIsICAyMzksICAyMzUsCisJCSAyMzIsICAyMjksICAyMjYsICAyMjIsICAyMTksICAyMTYsICAyMTMsICAyMTAsCisJCSAyMDcsICAyMDMsICAyMDAsICAxOTcsICAxOTQsICAxOTEsICAxODgsICAxODUsCisJCSAxODIsICAxNzksICAxNzYsICAxNzMsICAxNzAsICAxNjcsICAxNjQsICAxNjEsCisJCSAxNTgsICAxNTUsICAxNTIsICAxNDksICAxNDYsICAxNDQsICAxNDEsICAxMzgsCisJCSAxMzUsICAxMzIsICAxMjksICAxMjcsICAxMjQsICAxMjEsICAxMTgsICAxMTYsCisJCSAxMTMsICAxMTAsICAxMDcsICAxMDUsICAxMDIsICAgOTksICAgOTcsICAgOTQsCisJCSAgOTIsICAgODksICAgODYsICAgODQsICAgODEsICAgNzksICAgNzYsICAgNzQsCisJCSAgNzEsICAgNjksICAgNjYsICAgNjQsICAgNjEsICAgNTksICAgNTcsICAgNTQsCisJCSAgNTIsICAgNTAsICAgNDcsICAgNDUsICAgNDMsICAgNDAsICAgMzgsICAgMzYsCisJCSAgMzMsICAgMzEsICAgMjksICAgMjcsICAgMjUsICAgMjIsICAgMjAsICAgMTgsCisJCSAgMTYsIC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LTExMywgLTExMSwgLTExMSwKKwkJLTExMCwgLTExMCwgLTEwOSwgLTEwOSwgLTEwOCwgLTEwNywgLTEwNywgLTEwNiwKKwkJLTEwNSwgLTEwNCwgLTEwNCwgLTEwMywgLTEwMiwgLTEwMywgLTEwMiwgLTEwMSwKKwkJLTEwMSwgLTEwMCwgIC05OSwgIC05OSwgIC05OCwgIC05NywgIC05NywgIC05NiwKKwkJIC05NiwgIC05NSwgIC05NCwgIC05NCwgIC05MywgIC05MiwgIC05MiwgIC05MSwKKwkJIC05MSwgIC05MCwgIC04OSwgIC04OCwgIC04OCwgIC04OCwgIC04NywgIC04NiwKKwkJIC04NSwgIC04NiwgIC04NCwgIC04NCwgIC04MywgIC04MiwgIC04MiwgIC04MSwKKwkJIC04MSwgIC04MCwgIC04MCwgIC03OCwgIC03OSwgIC03NywgIC03NywgIC03NywKKwkJIC03NiwgIC03NiwgIC03NSwgIC03NCwgIC03NCwgIC03MywgIC03MiwgIC03MiwKKwkJIC03MiwgIC03MSwgIC03MCwgIC03MCwgIC02OSwgIC02OCwgIC02OCwgIC02OCwKKwkJIC02NiwgIC02NywgIC02NiwgIC02NSwgIC02NSwgIC02NSwgIC02MywgIC02MywKKwkJIC02MiwgIC02MiwgIC02MSwgIC02MSwgIC02MCwgIC02MCwgIC02MCwgIC01OCwKKwkJIC01OCwgIC01OCwgIC01NiwgIC01NiwgIC01NiwgIC01NSwgIC01NCwgIC01NSwKKwkJIC01NCwgIC01NCwgIC01MywgIC01MiwgIC01MSwgIC01MSwgIC01MSwgIC01MCwKKwkJIC00OSwgIC00OSwgIC00OSwgIC00OSwgIC00OCwgIC00NywgIC00NiwgIC00NiwKKwkJIC00NiwgIC00NiwgIC00NSwgIC00MywgIC00MywgIC00MywgIC00MywgIC00MiwKKwkJIC00MiwgIC00MiwgIC00MCwgIC00MCwgIC00MCwgIC0zOSwgIC0zOSwgIC0zOCwKKwkJIC0zOCwgIC0zOCwgIC0zNywgIC0zNywgIC0zNiwgIC0zN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maWc9JXAiLCBkdnNfY29uZmlnKTsKKworCWlmICgocGlwZS0+bW9kZSA8IElBX0NTU19QSVBFX0lEX05VTSkgJiYKKwkgICAgKGR2c19jb25maWctPndpZHRoX3kgPT0gcGFyYW1zLT5waXBlX2R2c182YXhpc19jb25maWdbcGlwZS0+bW9kZV0tPndpZHRoX3kpICYmCisJICAgIChkdnNfY29uZmlnLT5oZWlnaHRfeSA9PSBwYXJhbXMtPnBpcGVfZHZzXzZheGlzX2NvbmZpZ1twaXBlLT5tb2RlXS0+aGVpZ2h0X3kpICYmCisJICAgIChkdnNfY29uZmlnLT53aWR0aF91diA9PSBwYXJhbXMtPnBpcGVfZHZzXzZheGlzX2NvbmZpZ1twaXBlLT5tb2RlXS0+d2lkdGhfdXYpICYmCisJICAgIChkdnNfY29uZmlnLT5oZWlnaHRfdXYgPT0gcGFyYW1zLT5waXBlX2R2c182YXhpc19jb25maWdbcGlwZS0+bW9kZV0tPmhlaWdodF91dikgJiYKKwkgICAgIGR2c19jb25maWctPnhjb29yZHNfeSAmJgorCSAgICAgZHZzX2NvbmZpZy0+eWNvb3Jkc195ICYmCisJICAgICBkdnNfY29uZmlnLT54Y29vcmRzX3V2ICYmCisJICAgICBkdnNfY29uZmlnLT55Y29vcmRzX3V2KQorCXsKKwkJY29weV9kdnNfNmF4aXNfdGFibGUoZHZzX2NvbmZpZywgcGFyYW1zLT5waXBlX2R2c182YXhpc19jb25maWdbcGlwZS0+bW9kZV0pOworCX0KKworCUlBX0NTU19MRUFWRV9QUklWQVRFKCJ2b2lkIik7Cit9CisKK3N0YXRpYyB2b2lkCitzaF9jc3Nfc2V0X2JhYV9jb25maWcoc3RydWN0IGlhX2Nzc19pc3BfcGFyYW1ldGVycyAqcGFyYW1zLAorCQkJY29uc3Qgc3RydWN0IGlhX2Nzc19hYV9jb25maWcgKmNvbmZpZykKK3sKKwlpZiAoY29uZmlnID09IE5VTEwpCisJCXJldHVybjsKKwlhc3NlcnQocGFyYW1zICE9IE5VTEw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ZW5jeSAoMC0yNSBNSHooWFRBTCksIDEtMTkuMiBNSHooUExMKSApCisgKi8KK2ludCB2bHYyX3BsYXRfc2V0X2Nsb2NrX2ZyZXEoaW50IGNsa19udW0sIGludCBmcmVxX3R5cGUpCit7CisJdm9pZCBfX2lvbWVtICphZGRyOworCisJaWYgKGNsa19udW0gPCAwICYmIGNsa19udW0gPiBNQVhfQ0xLX0NPVU5UKSB7CisJCXByX2VycigiQ2xvY2sgbnVtYmVyIG91dCBvZiByYW5nZSAoJWQpXG4iLCBjbGtfbnVtKTsKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJaWYgKGZyZXFfdHlwZSAhPSBDTEtfRlJFUV9UWVBFX1hUQUwgJiYKKwkgICAgZnJlcV90eXBlICE9IENMS19GUkVRX1RZUEVfUExMKSB7CisJCXByX2Vycigid3JvbmcgY2xvY2sgdHlwZVxuIik7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCWlmICghcG1jX2Jhc2UpIHsKKwkJcHJfZXJyKCJtZW1pbyBtYXAgaXMgbm90IHNldFxuIik7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCWFkZHIgPSBwbWNfYmFzZSArIFBMVF9DTEtfQ1RMX09GRlNFVChjbGtfbnVtKTsKKworCW11dGV4X2xvY2soJmNsa19tdXRleCk7CisJd3JpdGVsKFJFR19TRVRfRklFTEQocmVhZGwoYWRkciksIENMS19GUkVRX1RZUEUsIGZyZXFfdHlwZSksIGFkZHIpOworCW11dGV4X3VubG9jaygmY2xrX211dGV4KTsKKworCXJldHVybiAwOworfQorRVhQT1JUX1NZTUJPTF9HUEwodmx2Ml9wbGF0X3NldF9jbG9ja19mcmVxKTsKKworLyoKKyAqIHZsdjJfcGxhdF9nZXRfY2xvY2tfZnJlcSAtIEdldCB0aGUgc3RhdHVzIG9mIHNwZWNpZmllZCBwbGF0Zm9ybSBjbG9jaworICogQGNsa19udW06IFBsYXRmb3JtIGNsb2NrIG51bWJlciAoaS5lLiAwLCAxLCA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VhdOworCXN0cnVjdCBlZml2YXJfZW50cnkgKmV2OworCXUzMiBlZmlhdHRyX2R1bW15OworCWludCBpLCBqLCByZXQ7CisJdW5zaWduZWQgbG9uZyBlZmlsZW47CisKKyAgICAgICAgaWYgKGRldiAmJiBBQ1BJX0NPTVBBTklPTihkZXYpKQorICAgICAgICAgICAgICAgIGRldiA9ICZBQ1BJX0NPTVBBTklPTihkZXYpLT5kZXY7CisKKyAgICAgICAgaWYgKGRldikKKyAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50Zih2YXI4LCBzaXplb2YodmFyOCksICIlc18lcyIsIGRldl9uYW1lKGRldiksIHZhcik7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICByZXQgPSBzbnByaW50Zih2YXI4LCBzaXplb2YodmFyOCksICJnbWluXyVzIiwgdmFyKTsKKworCWlmIChyZXQgPCAwIHx8IHJldCA+PSBzaXplb2YodmFyOCkgLSAxKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCS8qIEZpcnN0IGNoZWNrIGEgaGFyZC1jb2RlZCBsaXN0IG9mIGJvYXJkLXNwZWNpZmljIHZhcmlhYmxlcy4KKwkgKiBTb21lIGRldmljZSBmaXJtd2FyZXMgbGFjayB0aGUgYWJpbGl0eSB0byBzZXQgRUZJIHZhcmlhYmxlcyBhdAorCSAqIHJ1bnRpbWUuICovCisJZm9yIChpID0gMDsgaSA8IEFSUkFZX1NJWkUoaGFyZF92YXJzKTsgaSsrKSB7CisJCWlmIChkbWlfbWF0Y2goRE1JX0JPQVJEX05BTUUsIGhhcmRfdmFyc1tpXS5kbWlfYm9hcmRfbmFtZSkpIHsKKwkJCWZvciAoaiA9IDA7IGhhcmRfdmFyc1tpXS52YXJzW2pdLm5hbWU7IGorKykgeworCQkJCXNpemVfdCB2bDsKKwkJCQljb25zdCBzdHJ1Y3QgZ21pbl9jZmdfdmFyICpndjsKKworCQkJCWd2ID0gJmhhcmRfdmFyc1tpXS52YXJzW2pdOworCQkJCXZsID0gc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N1YmRldiAqc2QsIHUzMiBwb3J0LAorCQkgICAgICB1MzIgbGFuZXMsIHUzMiBmb3JtYXQsIHUzMiBiYXllcl9vcmRlciwgaW50IGZsYWcpCit7CisgICAgICAgIHN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQgPSB2NGwyX2dldF9zdWJkZXZkYXRhKHNkKTsKKyAgICAgICAgc3RydWN0IGNhbWVyYV9taXBpX2luZm8gKmNzaSA9IE5VTEw7CisKKyAgICAgICAgaWYgKGZsYWcpIHsKKyAgICAgICAgICAgICAgICBjc2kgPSBremFsbG9jKHNpemVvZigqY3NpKSwgR0ZQX0tFUk5FTCk7CisgICAgICAgICAgICAgICAgaWYgKCFjc2kpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGRldl9lcnIoJmNsaWVudC0+ZGV2LCAib3V0IG9mIG1lbW9yeVxuIik7CisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVOT01FTTsKKyAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgY3NpLT5wb3J0ID0gcG9ydDsKKyAgICAgICAgICAgICAgICBjc2ktPm51bV9sYW5lcyA9IGxhbmVzOworICAgICAgICAgICAgICAgIGNzaS0+aW5wdXRfZm9ybWF0ID0gZm9ybWF0OworICAgICAgICAgICAgICAgIGNzaS0+cmF3X2JheWVyX29yZGVyID0gYmF5ZXJfb3JkZXI7CisgICAgICAgICAgICAgICAgdjRsMl9zZXRfc3ViZGV2X2hvc3RkYXRhKHNkLCAodm9pZCAqKWNzaSk7CisgICAgICAgICAgICAgICAgY3NpLT5tZXRhZGF0YV9mb3JtYXQgPSBBVE9NSVNQX0lOUFVUX0ZPUk1BVF9FTUJFRERFRDsKKyAgICAgICAgICAgICAgICBjc2ktPm1ldGFkYXRhX2VmZmVjdGl2ZV93aWR0aCA9IE5VTEw7CisgICAgICAgICAgICAgICAgZGV2X2luZm8oJmNsaWVudC0+ZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICJjYW1lcmE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W5jaV92cGZlX3VzZXIuaApAQCAtMTU1LDggKzE1NSw4IEBACiB9OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qICAgRGlnaXRhbC9CbGFjayBjbGFtcCBvciBEQyBTdWJ0cmFjdCBwYXJhbWV0ZXJzCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKiAgIERpZ2l0YWwvQmxhY2sgY2xhbXAgb3IgREMgU3VidHJhY3QgcGFyYW1ldGVycworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qKgogICogSG9yaXpvbnRhbCBCbGFjayBDbGFtcCBtb2RlcwogICovCkBAIC0zMDksOCArMzA5LDggQEAKIH07CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKiBDb2xvciBTcGFjZSBDb252ZXJzaW9uIChDU0MpCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoqIENvbG9yIFNwYWNlIENvbnZlcnNpb24gKENTQykKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoqCiAgKiBOdW1iZXIgb2YgQ29lZmZpY2llbnQgdmFsdWVzIHVzZWQgZm9yIENTQwogICovCkBAIC0zMzEsOCArMzMxLDggQEAKIH07CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKiAgQ29sb3IgU3BhY2UgQ29udmVyc2lvbiBwYXJhbWV0ZXJzCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoqICBDb2xvciBTcGFjZSBDb252ZXJzaW9uIHBhcmFtZXRlcnMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoqCiAgKiBTdHJ1Y3R1cmUgdXNlZCBmb3IgQ1NDIGNvbmZpZyBwYXJhbXMKICAqLwpAQCAtMzY1LDggKzM2NSw4IEBACiAKICNkZWZpbmUgVlBGRV9JU0lGX0xJTkVBUl9UQUJfU0laRQkJMTkyCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiogIExpbmVhcml6YXRpb24gcGFyYW1ldGVycwotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKiAgTGluZWFyaXphdGlvbiBwYXJhbWV0ZXJzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qKgogICogU3RydWN0dXJlIGZvciBTZW5zb3IgZGF0YSBsaW5lYXJpemF0aW9uCiAgKi8KQEAgLTM4Miw4ICszODIsOCBAQAogfTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqICBJU0lGIFJhdyBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKiogIElTSUYgUmF3IGNvbmZpZ3VyYXRpb24gcGFyYW1ldGVycworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBlbnVtIHZwZmVfaXNpZl9mbXRfbW9kZSB7CiAJVlBGRV9JU0lGX1NQTElULAogCVZQRkVfSVNJRl9DT01CSU5FCkBAIC0xMTg5LDggKzExODksOCBAQAogfTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSoqICBSZXNpemVyIEFQSSBzdHJ1Y3R1cmVzCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoqICBSZXNpemVyIEFQSSBzdHJ1Y3R1cmVzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qIEludGVycG9sYXRpb24gdHlwZXMgdXNlZCBmb3IgaG9yaXpvbnRhbCByZXNjYWxlICovCiBlbnVtIHZwZmVfcnN6X2ludHBfdCB7CiAJVlBGRV9SU1pfSU5UUF9DVUJJQywKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9kYXZpbmNpX3ZwZmUvZG0zNjVfaXBpcGUuYyBiL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9kYXZpbmNpX3ZwZmUvZG0zNjVfaXBpcGUuYwppbmRleCBmZjQ3YThmMy4uNmEzNDM0YyAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL21lZGlhL2RhdmluY2lfdnBmZS9kbTM2NV9pcGlwZS5jCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9tZWRpYS9kYXZpbmNpX3ZwZmUvZG0zNjVfaXBpcGUuYwpAQCAtMTgwMywxNCArMTgwMywxNCBAQAogCQlyZXR1cm4gLUVCVVNZOwogCWlwaXBlLT5iYXNlX2FkZHIgPSBpb3JlbWFwX25v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SUYJCQkJMHg4NAogI2RlZmluZSBDQ0RDRkcJCQkJCTB4ODgKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiBEZWZlY3QgQ29ycmVjdGlvbiByZWdpc3RlcnMKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICogRGVmZWN0IENvcnJlY3Rpb24gcmVnaXN0ZXJzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAjZGVmaW5lIERGQ0NUTAkJCQkJMHg4YwogI2RlZmluZSBWREZTQVRMVgkJCQkweDkwCiAjZGVmaW5lIERGQ01FTUNUTAkJCQkweDk0CkBAIC03MCw4ICs3MCw4IEBACiAjZGVmaW5lIERGQ01FTTMJCQkJCTB4YTQKICNkZWZpbmUgREZDTUVNNAkJCQkJMHhhOAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSogQmxhY2sgQ2xhbXAgcmVnaXN0ZXJzCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICogQmxhY2sgQ2xhbXAgcmVnaXN0ZXJzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNkZWZpbmUgQ0xBTVBDRkcJCQkJMHhhYwogI2RlZmluZSBDTERDT0ZTVAkJCQkweGIwCiAjZGVmaW5lIENMU1YJCQkJCTB4YjQKQEAgLTg0LDggKzg0LDggQEAKICNkZWZpbmUgQ0xWV0lOMgkJCQkJMHhkMAogI2RlZmluZSBDTFZXSU4zCQkJCQkweGQ0CiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiBMZW5zZSBTaGFkaW5nIENvcnJlY3Rpb24KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKiBMZW5zZSBTaGFkaW5nIENvcnJlY3Rpb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogI2RlZmluZSBEQVRBSE9GU1QJCQkJMHhkOAogI2RlZmluZSBEQVRBVk9GU1QJCQkJMHhkYwogI2RlZmluZSBMU0NIVkFMCQkJCQkweGUwCkBAIC0xMDIsOCArMTAyLDggQEAKICNkZWZpbmUgVFdPRExTQ0lSUUVOCQkJCTB4MTBjCiAjZGVmaW5lIFRXT0RMU0NJUlFTVAkJCQkweDExMAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSogRGF0YSBmb3JtYXR0ZXIKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKiBEYXRhIGZvcm1hdHRlcgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAjZGVmaW5lIEZNVENGRwkJCQkJMHgxMTQKICNkZWZpbmUgRk1UUExFTgkJCQkJMHgxMTgKICNkZWZpbmUgRk1UU1BICQkJCQkweDExYwpAQCAtMTI4LDggKzEyOCw4IEBACiAjZGVmaW5lIEZNVFBHTUFQUzYJCQkJMHgxOWMKICNkZWZpbmUgRk1UUEdNQVBTNwkJCQkweDFhMAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKiBDb2xvciBTcGFjZSBDb252ZXJ0ZXIKLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqIENvbG9yIFNwYWNlIENvbnZlcnRlcgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNkZWZpbmUgQ1NDQ1RMCQkJCQkweDFhNAogI2RlZmluZSBDU0NNMAkJCQkJMHg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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogI2lmbmRlZiBSVEw4MjI1SAogI2RlZmluZSBSVEw4MjI1SApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9jbWRwa3QuYyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9yODE5MkVfY21kcGt0LmMKaW5kZXggNzU3ZmZkNC4uNDY3Mjg3YSAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9jbWRwa3QuYworKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX2NtZHBrdC5jCkBAIC0xMSw3ICsxMSw3IEBACiAgKgogICogQ29udGFjdCBJbmZvcm1hdGlvbjoKICAqIHdsYW5mYWUgPHdsYW5mYWVAcmVhbHRlay5jb20+Ci0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKICNpbmNsdWRlICJydGxfY29yZS5oIgogI2luY2x1ZGUgInI4MTkyRV9ody5oIgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9jbWRwa3QuaCBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9yODE5MkVfY21kcGt0LmgKaW5kZXggN2RkMTVkOS4uYThjNjNhZCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9jbWRwa3QuaAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX2NtZHBrdC5oCkBAIC0xMSw3ICsxMSw3IEBACiAgKgogICogQ29udGFjdCBJbmZvcm1hdGlvbjoKICAqIHdsYW5mYWUgPHdsYW5mYWVAcmVhbHRlay5jb20+Ci0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAjaWZuZGVmIFI4MTlYVVNCX0NNRFBLVF9ICiAjZGVmaW5lIFI4MTlYVVNCX0NNRFBLVF9ICiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9yODE5MkVfZGV2LmMgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX2Rldi5jCmluZGV4IDhkNmJjYTYuLjQ3MjNhMGIgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9yODE5MkVfZGV2LmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9kZXYuYwpAQCAtMTcsNyArMTcsNyBAQAogICoKICAqIENvbnRhY3QgSW5mb3JtYXRpb246CiAgKiB3bGFuZmFlIDx3bGFuZmFlQHJlYWx0ZWsuY29tPgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNpZm5kZWYgX1JUTDgxOTJFX0gKICNkZWZpbmUgX1JUTDgxOTJFX0gKIApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9maXJtd2FyZS5jIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9maXJtd2FyZS5jCmluZGV4IGJiZTM5OTAuLjNjNzgzMTIgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9yODE5MkVfZmlybXdhcmUuYworKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX2Zpcm13YXJlLmMKQEAgLTExLDcgKzExLDcgQEAKICAqCiAgKiBDb250YWN0IEluZm9ybWF0aW9uOgogICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogI2luY2x1ZGUgInJ0bF9jb3JlLmgiCiAjaW5jbHVkZSAicjgxOTJFX2h3LmgiCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX2Zpcm13YXJlLmggYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX2Zpcm13YXJlLmgKaW5kZXggYjQ4ZWM5NC4uNjFjOGRhYyAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9maXJtd2FyZS5oCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9yODE5MkVfZmlybXdhcmUuaApAQCAtMTEsNyArMTEsNyBAQAogICoKICAqIENvbnRhY3QgSW5mb3JtYXRpb246CiAgKiB3bGFuZmFlIDx3bGFuZmFlQHJlYWx0ZWsuY29tPgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogI2lmbmRlZiBfX0lOQ19GSVJNV0FSRV9ICiAjZGVmaW5lIF9fSU5DX0ZJUk1XQVJFX0gKIApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9ody5oIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9ody5oCmluZGV4IGQyOTgwMjMuLjVjMjBjYjQgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9yODE5MkVfaHcuaAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX2h3LmgKQEAgLTExLDcgKzExLDcgQEAKICAqCiAgKiBDb250YWN0IEluZm9ybWF0aW9uOgogICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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VfcGh5LmMKQEAgLTExLDcgKzExLDcgQEAKICAqCiAgKiBDb250YWN0IEluZm9ybWF0aW9uOgogICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogI2luY2x1ZGUgPGxpbnV4L2JpdG9wcy5oPgogI2luY2x1ZGUgInJ0bF9jb3JlLmgiCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX3BoeS5oIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3I4MTkyRV9waHkuaAppbmRleCA5ZGRmZDRlLi5iNTM0ZDcyIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcjgxOTJFX3BoeS5oCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9yODE5MkVfcGh5LmgKQEAgLTExLDcgKzExLDcgQEAKICAqCiAgKiBDb250YWN0IEluZm9ybWF0aW9uOgogICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNpZm5kZWYgX1I4MTlYVV9QSFlfSAogI2RlZmluZSBfUjgxOVhVX1BIWV9ICiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9yd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ODFmIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcnRsX2NhbS5jCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfY2FtLmMKQEAgLTE3LDcgKzE3LDcgQEAKICAqCiAgKiBDb250YWN0IEluZm9ybWF0aW9uOgogICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNpbmNsdWRlICJydGxfY29yZS5oIgogI2luY2x1ZGUgInI4MTkyRV9waHkuaCIKICNpbmNsdWRlICJyODE5MkVfcGh5cmVnLmgiCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcnRsX2NhbS5oIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9jYW0uaAppbmRleCBhYTEyOTQxLi4xMmYwMWYxIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcnRsX2NhbS5oCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfY2FtLmgKQEAgLTE3LDcgKzE3LDcgQEAKICAqCiAgKiBDb250YWN0IEluZm9ybWF0aW9uOgogICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNpZm5kZWYgX1JUTF9DQU1fSAogI2RlZmluZSBfUlRMX0NBTV9ICiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfY29yZS5jIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9jb3JlLmMKaW5kZXggNGMwY2FhNi4uYTRkMWJhYyAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9jb3JlLmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9jb3JlLmMKQEAgLTE3LDcgKzE3LDcgQEAKICAqCiAgKiBDb250YWN0IEluZm9ybWF0aW9uOgogICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KICNpbmNsdWRlIDxsaW51eC91YWNjZXNzLmg+CiAjaW5jbHVkZSA8bGludXgvcGNpLmg+CiAjaW5jbHVkZSA8bGludXgvdm1hbGxvYy5oPgpAQCAtMTAxLDggKzEwMSw4IEBACiBzdGF0aWMgdm9pZCBfcnRsOTJlX3Jlc3RhcnQodm9pZCAqZGF0YSk7CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLUlPIFNUVUZGLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKiAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1JTyBTVFVGRi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiB1OCBydGw5MmVfcmVhZGIoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgaW50IHgpCiB7CkBAIC0xNDEsOCArMTQxLDggQEAKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tR0VORVJBTCBGVU5DVElPTi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tR0VORVJBTCBGVU5DVElPTi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogYm9vbCBydGw5MmVfc2V0X3JmX3N0YXRlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCiAJCQkgZW51bSBydF9yZl9wb3dlcl9zdGF0ZSBTdGF0ZVRvU2V0LAogCQkJIFJUX1JGX0NIQU5HRV9TT1VSQ0UgQ2hhbmdlU291cmNlKQpAQCAtMzQ2LDcgKzM0Niw3IEBACiAJCX0KIAl9CiAKLQlpZiAobmV0LT5tb2RlICYgKElFRUVfR3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CZwcml2LT5zdGF0cywgMCwgc2l6ZW9mKHN0cnVjdCBydF9zdGF0cykpOwogCiAJX3J0bDkyZV9pbml0X3ByaXZfaGFuZGxlcihkZXYpOwogCV9ydGw5MmVfaW5pdF9wcml2X2NvbnN0YW50KGRldik7CkBAIC0xMDc3LDcgKzEwNzcsNyBAQAogCiAJc2V0dXBfdGltZXIoJnByaXYtPndhdGNoX2RvZ190aW1lciwKIAkJICAgIF9ydGw5MmVfd2F0Y2hkb2dfdGltZXJfY2IsCi0JCSAgICAodW5zaWduZWQgbG9uZykgZGV2KTsKKwkJICAgICh1bnNpZ25lZCBsb25nKWRldik7CiAKIAlzZXR1cF90aW1lcigmcHJpdi0+Z3Bpb19wb2xsaW5nX3RpbWVyLAogCQkgICAgcnRsOTJlX2NoZWNrX3JmY3RybF9ncGlvX3RpbWVyLApAQCAtMTEwMiw4ICsxMTAyLDggQEAKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotCS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1XQVRDSERPRyBTVFVGRi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICogLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVdBVENIRE9HIFNUVUZGLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBzdGF0aWMgc2hvcnQgX3J0bDkyZV9pc190eF9xdWV1ZV9lbXB0eShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewogCWludCBpID0gMDsKQEAgLTExMzQsNyArMTEzNCw3IEBAC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93eF9hc3NvY19ldmVudChpZWVlKTsKIAogCQkJaWYgKCEoaWVlZS0+cnRsbGliX2FwX3NlY190eXBlKGllZWUpICYKLQkJCSAgICAgKFNFQ19BTEdfQ0NNUHxTRUNfQUxHX1RLSVApKSkKKwkJCSAgICAgKFNFQ19BTEdfQ0NNUCB8IFNFQ19BTEdfVEtJUCkpKQogCQkJCXNjaGVkdWxlX2RlbGF5ZWRfd29yaygKIAkJCQkJJmllZWUtPmFzc29jaWF0ZV9wcm9jZWR1cmVfd3EsIDApOwogCkBAIC0xNTQxLDggKzE1NDEsOCBAQAogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gTklDIFRYL1JYIFNUVUZGLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gTklDIFRYL1JYIFNUVUZGLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHZvaWQgcnRsOTJlX3J4X2VuYWJsZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewogCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gcnRsbGliX3ByaXYoZGV2KTsKQEAgLTE2MDMsNyArMTYwMyw3IEBACiAJCXJpbmctPmlkeCA9IChyaW5nLT5pZHggKyAxKSAlIHJpbmctPmVudHJpZXM7CiAJfQogCi0JcGNpX2ZyZWVfY29uc2lzdGVudChwcml2LT5wZGV2LCBzaXplb2YoKnJpbmctPmRlc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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBzdGF0aWMgdm9pZCBfcnRsOTJlX2NhbmNlbF9kZWZlcnJlZF93b3JrKHN0cnVjdCByODE5Ml9wcml2ICpwcml2KQogewogCWNhbmNlbF9kZWxheWVkX3dvcmtfc3luYygmcHJpdi0+d2F0Y2hfZG9nX3dxKTsKQEAgLTIzNDgsOCArMjM0OCw5IEBACiAJCQkJCQkJICAgICAgIDAsIGtleSk7CiAJCQkJCX0KIAkJCQl9Ci0JCQkJaWYgKChpZWVlLT5wYWlyd2lzZV9rZXlfdHlwZSA9PSBLRVlfVFlQRV9DQ01QKQotCQkJCSAgICAgJiYgaWVlZS0+cEhUSW5mby0+YkN1cnJlbnRIVFN1cHBvcnQpIHsKKwkJCQlpZiAoKGllZWUtPnBhaXJ3aXNlX2tleV90eXBlID09CisJCQkJICAgICBLRVlfVFlQRV9DQ01QKSAmJgorCQkJCSAgICAgaWVlZS0+cEhUSW5mby0+YkN1cnJlbnRIVFN1cHBvcnQpIHsKIAkJCQkJcnRsOTJlX3dyaXRlYihkZXYsIDB4MTczLCAxKTsKIAkJCQl9CiAKQEAgLTI1MzUsOCArMjUzNiw4IEBACiAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLQktLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIFBDSV9TVFVGRi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tIFBDSV9TVFVGRi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICoqKioqKioqKioqKioqKioqKioq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SBpbml0IC8gZXhpdCBzdHVicyAtLS0tLS0tLS0tLS0tLS0tCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICogLS0tLS0tLS0tLS0tLS0tLS0tLSBtb2R1bGUgaW5pdCAvIGV4aXQgc3R1YnMgLS0tLS0tLS0tLS0tLS0tLQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIE1PRFVMRV9ERVNDUklQVElPTigiTGludXggZHJpdmVyIGZvciBSZWFsdGVrIFJUTDgxOXggV2lGaSBjYXJkcyIpOwogTU9EVUxFX0FVVEhPUihEUlZfQ09QWVJJR0hUICIgIiBEUlZfQVVUSE9SKTsKIE1PRFVMRV9WRVJTSU9OKERSVl9WRVJTSU9OKTsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfY29yZS5oIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9jb3JlLmgKaW5kZXggYmFiYzBiMy4uMDMzNTgyMyAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9jb3JlLmgKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9jb3JlLmgKQEAgLTE3LDcgKzE3LDcgQEAKICAqCiAgKiBDb250YWN0IEluZm9ybWF0aW9uOgogICogd2xhbmZhZSA8d2xhbmZhZUByZWFsdGVrLmNvbT4KLSoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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sODE5MmUvcnRsX2RtLmgKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9kbS5oCkBAIC0xMSw3ICsxMSw3IEBACiAgKgogICogQ29udGFjdCBJbmZvcm1hdGlvbjoKICAqIHdsYW5mYWUgPHdsYW5mYWVAcmVhbHRlay5jb20+Ci0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAjaWZuZGVmCV9fUjgxOTJVRE1fSF9fCiAjZGVmaW5lIF9fUjgxOTJVRE1fSF9fCiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfZWVwcm9tLmMgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcnRsX2VlcHJvbS5jCmluZGV4IDE2MmUwNmMuLmUxZDMwNWQgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfZWVwcm9tLmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9lZXByb20uYwpAQCAtMTcsNyArMTcsNyBAQAogICoKICAqIENvbnRhY3QgSW5mb3JtYXRpb246CiAgKiB3bGFuZmFlIDx3bGFuZmFlQHJlYWx0ZWsuY29tPgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogI2luY2x1ZGUgInJ0bF9jb3JlLm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bGFuZmFlQHJlYWx0ZWsuY29tPgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAjaW5jbHVkZSAicnRsX2NvcmUuaCIKICNpbmNsdWRlICJyODE5MkVfaHcuaCIKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfcG0uaCBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfcG0uaAppbmRleCA3NjI1ZTNmLi4wM2ZlNzlmIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsODE5MmUvcnRsX3BtLmgKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bDgxOTJlL3J0bF9wbS5oCkBAIC0xMSw3ICsxMSw3IEBACiAgKgogICogQ29udGFjdCBJbmZvcm1hdGlvbjoKICAqIHdsYW5mYWUgPHdsYW5mYWVAcmVhbHRlay5jb20+Ci0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKICNpZm5kZWYgUjgxOTJFX1BNX0gKICNkZWZpbmUgUjgxOTJFX1BNX0gKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfcHMuYyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGw4MTkyZS9ydGxfcHMuYwppbmRleCBhYTRiMDE1Li45Mj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ogCXU2NCBtYWNfdGltZTsKIAlzOCAgcnNzaTsKQEAgLTExMzgsNyArMTEzOSw4IEBACiAKICNkZWZpbmUJRVRIRVJfQUREUl9MRU4JCTYJLyogbGVuZ3RoIG9mIGFuIEV0aGVybmV0IGFkZHJlc3MgKi8KICNkZWZpbmUgRVRIRVJORVRfSEVBREVSX1NJWkUgICAgMTQgICAgICAvKiBsZW5ndGggb2YgdHdvIEV0aGVybmV0IGFkZHJlc3MKLQkJCQkJICogcGx1cyBldGhlciB0eXBlKi8KKwkJCQkJICogcGx1cyBldGhlciB0eXBlCisJCQkJCSAqLwogCiBlbnVtIGVycF90IHsKIAlFUlBfTm9uRVJQcHJlc2VudAk9IDB4MDEsCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsbGliX2RlYnVnLmggYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MmUvcnRsbGliX2RlYnVnLmgKaW5kZXggZjFjMzljMy4uN2IwZTZlOSAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJlL3J0bGxpYl9kZWJ1Zy5oCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGxsaWJfZGVidWcuaApAQCAtMTcsNyArMTcsNyBAQAogICoKICAqIENvbnRhY3QgSW5mb3JtYXRpb246CiAgKiB3bGFuZmFlIDx3bGFuZmFlQHJlYWx0ZWsuY29tPgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogI2lmbmRlZiBfUlRMX0RFQlVHX0gKICNkZWZpbmUgX1JUTF9ERUJVR19ICiAKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkyZS9ydGxsaW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pZWxlbiA9IDQ7CisKKwkJKmRzdF9pZSsrID0gdGltX2llbGVuOworCisJCSpkc3RfaWUrKyA9IDA7LyogRFRJTSBjb3VudCAqLworCQkqZHN0X2llKysgPSAxOy8qIERUSU0gcGVyb2lkICovCisKKwkJaWYgKHBzdGFwcml2LT50aW1fYml0bWFwJkJJVCgwKSkvKiBmb3IgYmMvbWMgZnJhbWVzICovCisJCQkqZHN0X2llKysgPSBCSVQoMCk7LyogYml0bWFwIGN0cmwgKi8KKwkJZWxzZQorCQkJKmRzdF9pZSsrID0gMDsKKworCQlpZiAodGltX2llbGVuID09IDQpIHsKKworCQkJX19sZTE2IHB2YjsKKworCQkJaWYgKHBzdGFwcml2LT50aW1fYml0bWFwJjB4ZmYwMCkKKwkJCQlwdmIgPSBjcHVfdG9fbGUxNihwc3RhcHJpdi0+dGltX2JpdG1hcCA+PiA4KTsKKwkJCWVsc2UKKwkJCQlwdmIgPSB0aW1fYml0bWFwX2xlOworCisJCQkqZHN0X2llKysgPSBsZTE2X3RvX2NwdShwdmIpOworCisJCX0gZWxzZSBpZiAodGltX2llbGVuID09IDUpIHsKKworCisJCQltZW1jcHkoZHN0X2llLCAmdGltX2JpdG1hcF9sZSwgMik7CisJCQlkc3RfaWUgKz0gMjsKKwkJfQorCisJCS8qIGNvcHkgcmVtYWluZGVyIElFICovCisJCWlmIChwYmFja3VwX3JlbWFpbmRlcl9pZSkgeworCisJCQltZW1jcHkoZHN0X2llLCBwYmFja3VwX3JlbWFpbmRlcl9pZSwgcmVtYWluZGVyX2llbGVuKTsKKworCQkJa2ZyZWUocGJhY2t1cF9yZW1haW5kZXJfaWUpOworCQl9CisKKwkJb2Zmc2V0ID0gICh1aW50KShkc3RfaWUgLSBwaWUpOworCQlwbmV0d29ya19tbG1lZXh0LT5JRUxlbmd0aCA9IG9mZnNldCArIHJlbWFpbmRlcl9pZWxlbjsKKworCX0KK30KKwordTggY2hrX3N0YV9pc19hbGl2ZShzdHJ1Y3Qgc3RhX2luZm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lkZWZhdWx0OgorCQlrZXlsZW4gPSAxNjsKKwl9CisKKwltZW1jcHkoJihwc2V0a2V5cGFybS0+a2V5WzBdKSwga2V5LCBrZXlsZW4pOworCisJcGNtZC0+Y21kY29kZSA9IF9TZXRLZXlfQ01EXzsKKwlwY21kLT5wYXJtYnVmID0gKHU4ICopcHNldGtleXBhcm07CisJcGNtZC0+Y21kc3ogPSAgKHNpemVvZihzdHJ1Y3Qgc2V0a2V5X3Bhcm0pKTsKKwlwY21kLT5yc3AgPSBOVUxMOworCXBjbWQtPnJzcHN6ID0gMDsKKworCisJSU5JVF9MSVNUX0hFQUQoJnBjbWQtPmxpc3QpOworCisJcmVzID0gcnR3X2VucXVldWVfY21kKHBjbWRwcml2LCBwY21kKTsKKworZXhpdDoKKworCXJldHVybiByZXM7Cit9CisKK2ludCBydHdfYXBfc2V0X2dyb3VwX2tleShzdHJ1Y3QgYWRhcHRlciAqcGFkYXB0ZXIsIHU4ICprZXksIHU4IGFsZywgaW50IGtleWlkKQoreworCURCR184NzFYKCIlc1xuIiwgX19mdW5jX18pOworCisJcmV0dXJuIHJ0d19hcF9zZXRfa2V5KHBhZGFwdGVyLCBrZXksIGFsZywga2V5aWQsIDEpOworfQorCitpbnQgcnR3X2FwX3NldF93ZXBfa2V5KAorCXN0cnVjdCBhZGFwdGVyICpwYWRhcHRlciwKKwl1OCAqa2V5LAorCXU4IGtleWxlbiwKKwlpbnQga2V5aWQsCisJdTggc2V0X3R4CispCit7CisJdTggYWxnOworCisJc3dpdGNoIChrZXlsZW4pIHsKKworCWNhc2UgNToKKwkJYWxnID0gX1dFUDQwXzsKKwkJYnJlYWs7CisJY2FzZSAxMzoKKwkJYWxnID0gX1dFUDEwNF87CisJCWJyZWFrOworCWRlZmF1bHQ6CisJCWFsZyA9IF9OT19QUklWQUNZXzsKKwl9CisKKwlEQkdfODcxWCgiJXNcbiIsIF9fZnVuY19fKTsKKworCXJldHVybiBydHdfYXBfc2V0X2tleShwYWRhcHRlciwga2V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KKwkJCQkJfQorCQkJCX0KKworCQkJCSp3cGFfbGVuID0gaW5faWVbY250KzFdKzI7CisJCQkJY250ICs9IGluX2llW2NudCsxXSsyOyAgLyogZ2V0IG5leHQgKi8KKwkJfSBlbHNleworCQkJaWYgKGF1dGhtb2RlID09IF9XUEEyX0lFX0lEXykgeworCQkJCVJUX1RSQUNFKF9tb2R1bGVfcnRsODcxeF9tbG1lX2NfLCBfZHJ2X2luZm9fLCAoIlxuIGdldF9yc25faWU6IHNlY19pZHggPSVkIGluX2llW2NudCsxXSsyID0lZFxuIiwgc2VjX2lkeCwgaW5faWVbY250KzFdKzIpKTsKKworCQkJCWlmIChyc25faWUpIHsKKwkJCQltZW1jcHkocnNuX2llLCAmaW5faWVbY250XSwgaW5faWVbY250KzFdKzIpOworCisJCQkJZm9yIChpID0gMDsgaSA8IChpbl9pZVtjbnQrMV0rMik7IGkgPSBpKzgpIHsKKwkJCQkJCVJUX1RSQUNFKF9tb2R1bGVfcnRsODcxeF9tbG1lX2NfLCBfZHJ2X2luZm9fLCAoIlxuICUyeCwlMngsJTJ4LCUyeCwlMngsJTJ4LCUyeCwlMnhcbiIsCisJCQkJCQkJCQlyc25faWVbaV0sIHJzbl9pZVtpKzFdLCByc25faWVbaSsyXSwgcnNuX2llW2krM10sIHJzbl9pZVtpKzRdLAorCQkJCQkJCQkJcnNuX2llW2krNV0sIHJzbl9pZVtpKzZdLCByc25faWVbaSs3XSkpOworCQkJCQl9CisJCQkJfQorCisJCQkJKnJzbl9sZW4gPSBpbl9pZVtjbnQrMV0rMjsKKwkJCQljbnQgKz0gaW5faWVbY250KzFdKzI7ICAvKiBnZXQgbmV4dCAqLworCQkJfSBlbHNleworCQkJCWNudCArPSBpbl9pZVtjbnQrMV0rMjsgICAvKiBnZXQgbmV4dCAqLworCQkJfQorCQl9CisKKwl9CisKKwlyZXR1cm4gKCpyc25fbGVuICsgKndwYV9sZW4pOworfQorCit1OCBydHdfaXNfd3BzX2llKHU4ICppZV9wdHIs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CB1aW50IGluX2xlbiwgdWludCBpbml0aWFsX291dF9sZW4pCit7CisJdW5zaWduZWQJaW50IGllbGVuZ3RoID0gMDsKKwl1bnNpZ25lZCBpbnQgaSwgajsKKworCWkgPSAxMjsgLyogYWZ0ZXIgdGhlIGZpeGVkIElFICovCisJd2hpbGUgKGkgPCBpbl9sZW4pIHsKKwkJaWVsZW5ndGggPSBpbml0aWFsX291dF9sZW47CisKKwkJaWYgKGluX2llW2ldID09IDB4REQgJiYgaW5faWVbaSsyXSA9PSAweDAwICYmIGluX2llW2krM10gPT0gMHg1MCAgJiYgaW5faWVbaSs0XSA9PSAweEYyICYmIGluX2llW2krNV0gPT0gMHgwMiAmJiBpKzUgPCBpbl9sZW4pIHsgLyogV01NIGVsZW1lbnQgSUQgYW5kIE9VSSAqLworCQkJZm9yIChqID0gaTsgaiA8IGkgKyA5OyBqKyspIHsKKwkJCQkJb3V0X2llW2llbGVuZ3RoXSA9IGluX2llW2pdOworCQkJCQlpZWxlbmd0aCsrOworCQkJfQorCQkJb3V0X2llW2luaXRpYWxfb3V0X2xlbiArIDFdID0gMHgwNzsKKwkJCW91dF9pZVtpbml0aWFsX291dF9sZW4gKyA2XSA9IDB4MDA7CisJCQlvdXRfaWVbaW5pdGlhbF9vdXRfbGVuICsgOF0gPSAweDAwOworCisJCQlicmVhazsKKwkJfQorCisJCWkgKz0gKGluX2llW2krMV0rMik7IC8qICB0byB0aGUgbmV4dCBJRSBlbGVtZW50ICovCisJfQorCisJcmV0dXJuIGllbGVuZ3RoOworCit9CisKKworLyogICovCisvKiAgUG9ydGVkIGZyb20gODE4NTogSXNJblByZUF1dGhLZXlMaXN0KCkuIChSZW5hbWVkIGZyb20gU2VjSXNJblByZUF1dGhLZXlMaXN0KCksIDIwMDYtMTAtMTMuKSAqLworLyogIEFkZGVkIGJ5IEFubmllLCAyMDA2LTA1LTA3LiAqLworLyogICovCisvKiAgU2VhcmNoIGJ5IEJTU0lELCAqLworLyogIFJldHVybiBWYWx1Z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ml0aW9ucyBmb3IgdGhlIHZlbmRvciBzcGVjaWZpYyBJRQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordW5zaWduZWQgY2hhciBSVFdfV1BBX09VSVtdID0gezB4MDAsIDB4NTAsIDB4ZjIsIDB4MDF9OwordW5zaWduZWQgY2hhciBXTU1fT1VJW10gPSB7MHgwMCwgMHg1MCwgMHhmMiwgMHgwMn07Cit1bnNpZ25lZCBjaGFyIFdQU19PVUlbXSA9IHsweDAwLCAweDUwLCAweGYyLCAweDA0fTsKK3Vuc2lnbmVkIGNoYXIgUDJQX09VSVtdID0gezB4NTAsIDB4NkYsIDB4OUEsIDB4MDl9OwordW5zaWduZWQgY2hhciBXRkRfT1VJW10gPSB7MHg1MCwgMHg2RiwgMHg5QSwgMHgwQX07CisKK3Vuc2lnbmVkIGNoYXIgV01NX0lORk9fT1VJW10gPSB7MHgwMCwgMHg1MCwgMHhmMiwgMHgwMiwgMHgwMCwgMHgwMX07Cit1bnNpZ25lZCBjaGFyIFdNTV9QQVJBX09VSVtdID0gezB4MDAsIDB4NTAsIDB4ZjIsIDB4MDIsIDB4MDEsIDB4MDF9OworCitzdGF0aWMgdW5zaWduZWQgY2hhciBSRUFMVEVLXzk2Ql9JRVtdID0gezB4MDAsIDB4ZTAsIDB4NGMsIDB4MDIsIDB4MDEsIDB4MjB9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKK0NoYW5uZWxQbGFuIGRlZmluaXRpb25zCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgUlRfQ0hBTk5FTF9QTEFOXzJHCVJUV19DaGFubmVsUGxhbjJHW1JUX0NIQU5ORUxfRE9NQUlOXzJHX01BWF0gPSB7CisJe3sxLCAyLCAzLCA0LCA1LCA2LCA3LCA4LCA5LCAxMCwgMTEsIDEyLCAxM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CAweGZmfTsKKworCS8qIERCR184NzFYKCIlc1xuIiwgX19mdW5jX18pOyAqLworCisJcG1nbnRmcmFtZSA9IGFsbG9jX21ndHhtaXRmcmFtZShweG1pdHByaXYpOworCWlmIChwbWdudGZyYW1lID09IE5VTEwpIHsKKwkJREJHXzg3MVgoIiVzLCBhbGxvYyBtZ250IGZyYW1lIGZhaWxcbiIsIF9fZnVuY19fKTsKKwkJcmV0dXJuOworCX0KKworCXNwaW5fbG9ja19iaCgmcG1sbWVwcml2LT5iY25fdXBkYXRlX2xvY2spOworCisJLyogdXBkYXRlIGF0dHJpYnV0ZSAqLworCXBhdHRyaWIgPSAmcG1nbnRmcmFtZS0+YXR0cmliOworCXVwZGF0ZV9tZ250ZnJhbWVfYXR0cmliKHBhZGFwdGVyLCBwYXR0cmliKTsKKwlwYXR0cmliLT5xc2VsID0gMHgxMDsKKworCW1lbXNldChwbWdudGZyYW1lLT5idWZfYWRkciwgMCwgV0xBTkhEUl9PRkZTRVQgKyBUWERFU0NfT0ZGU0VUKTsKKworCXBmcmFtZSA9ICh1OCAqKShwbWdudGZyYW1lLT5idWZfYWRkcikgKyBUWERFU0NfT0ZGU0VUOworCXB3bGFuaGRyID0gKHN0cnVjdCBpZWVlODAyMTFfaGRyICopcGZyYW1lOworCisKKwlmY3RybCA9ICYocHdsYW5oZHItPmZyYW1lX2NvbnRyb2wpOworCSooZmN0cmwpID0gMDsKKworCW1lbWNweShwd2xhbmhkci0+YWRkcjEsIGJjX2FkZHIsIEVUSF9BTEVOKTsKKwltZW1jcHkocHdsYW5oZHItPmFkZHIyLCBteWlkKCYocGFkYXB0ZXItPmVlcHJvbXByaXYpKSwgRVRIX0FMRU4pOworCW1lbWNweShwd2xhbmhkci0+YWRkcjMsIGdldF9teV9ic3NpZChjdXJfbmV0d29yayksIEVUSF9BTEVOKTsKKworCVNldFNlcU51bShwd2xhbmhkciwgMC8qcG1sbWVleHQtPm1nbnRfc2VxKi8pOworCS8qIHBtbG1lZXh0LT5t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udF9wcmVoYW5kbGUocGFkYXB0ZXIsICh1OCAqKSZwam9pbmJzc19ldnQtPm5ldHdvcmspOworCisKKwlydHdfZW5xdWV1ZV9jbWQocGNtZHByaXYsIHBjbWRfb2JqKTsKKworCXJldHVybjsKKworfQorCit2b2lkIHJlcG9ydF93bW1fZWRjYV91cGRhdGUoc3RydWN0IGFkYXB0ZXIgKnBhZGFwdGVyKQoreworCXN0cnVjdCBjbWRfb2JqICpwY21kX29iajsKKwl1OCAqcGV2dGNtZDsKKwl1MzIgY21kc3o7CisJc3RydWN0IHdtbV9ldmVudAkJKnB3bW1fZXZlbnQ7CisJc3RydWN0IEMySEV2ZW50X0hlYWRlcgkqcGMyaF9ldnRfaGRyOworCXN0cnVjdCBtbG1lX2V4dF9wcml2IAkqcG1sbWVleHQgPSAmcGFkYXB0ZXItPm1sbWVleHRwcml2OworCXN0cnVjdCBjbWRfcHJpdiAqcGNtZHByaXYgPSAmcGFkYXB0ZXItPmNtZHByaXY7CisKKwlwY21kX29iaiA9IChzdHJ1Y3QgY21kX29iaiAqKXJ0d196bWFsbG9jKHNpemVvZihzdHJ1Y3QgY21kX29iaikpOworCWlmIChwY21kX29iaiA9PSBOVUxMKQorCQlyZXR1cm47CisKKwljbWRzeiA9IChzaXplb2Yoc3RydWN0IHdtbV9ldmVudCkgKyBzaXplb2Yoc3RydWN0IEMySEV2ZW50X0hlYWRlcikpOworCXBldnRjbWQgPSAodTggKilydHdfem1hbGxvYyhjbWRzeik7CisJaWYgKHBldnRjbWQgPT0gTlVMTCkgeworCQlrZnJlZSgodTggKilwY21kX29iaik7CisJCXJldHVybjsKKwl9CisKKwlJTklUX0xJU1RfSEVBRCgmcGNtZF9vYmotPmxpc3QpOworCisJcGNtZF9vYmotPmNtZGNvZGUgPSBHRU5fQ01EX0NPREUoX1NldF9NTE1FX0VWVCk7CisJcGNtZF9vYmotPmNtZHN6ID0gY21kc3o7CisJcGNtZF9vYmotPnBhcm1idWYgPSBwZXZ0Y21kOworCisJ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2V2ZW50OiBhZGQgU1RBXG4iKTsKKworCXJ0d19lbnF1ZXVlX2NtZChwY21kcHJpdiwgcGNtZF9vYmopOworCisJcmV0dXJuOworfQorCisKK2Jvb2wgcnR3X3BvcnRfc3dpdGNoX2NoayhzdHJ1Y3QgYWRhcHRlciAqYWRhcHRlcikKK3sKKwlib29sIHN3aXRjaF9uZWVkZWQgPSBmYWxzZTsKKwlyZXR1cm4gc3dpdGNoX25lZWRlZDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKworRm9sbG93aW5nIGFyZSB0aGUgZXZlbnQgY2FsbGJhY2sgZnVuY3Rpb25zCisKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBmb3Igc3RhL2FkaG9jIG1vZGUgKi8KK3ZvaWQgdXBkYXRlX3N0YV9pbmZvKHN0cnVjdCBhZGFwdGVyICpwYWRhcHRlciwgc3RydWN0IHN0YV9pbmZvICpwc3RhKQoreworCXN0cnVjdCBtbG1lX3ByaXYgKnBtbG1lcHJpdiA9ICYocGFkYXB0ZXItPm1sbWVwcml2KTsKKwlzdHJ1Y3QgbWxtZV9leHRfcHJpdiAqcG1sbWVleHQgPSAmcGFkYXB0ZXItPm1sbWVleHRwcml2OworCXN0cnVjdCBtbG1lX2V4dF9pbmZvICpwbWxtZWluZm8gPSAmKHBtbG1lZXh0LT5tbG1leHRfaW5mbyk7CisKKwkvKiBFUlAgKi8KKwlWQ1NfdXBkYXRlKHBhZGFwdGVyLCBwc3RhKTsKKworCS8qIEhUICovCisJaWYgKHBtbG1lcHJpdi0+aHRwcml2Lmh0X29wdGlvbikgeworCQlwc3RhLT5odHByaXYuaHRfb3B0aW9uID0gdHJ1ZTsKKworCQlwc3RhLT5odHByaXYuYW1wZHVfZW5hYmxlID0gcG1sbWVwc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RhcHRlciAqcGFkYXB0ZXIpCit7CisJaWYgKGlzX2NsaWVudF9hc3NvY2lhdGVkX3RvX2FwKHBhZGFwdGVyKSB8fCBpc19JQlNTX2VtcHR5KHBhZGFwdGVyKSkKKwkJcnR3X21sbWVleHRfZGlzY29ubmVjdChwYWRhcHRlcik7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisKK0ZvbGxvd2luZyBhcmUgdGhlIGZ1bmN0aW9ucyBmb3IgdGhlIHRpbWVyIGhhbmRsZXJzCisKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordm9pZCBfbGlua2VkX2luZm9fZHVtcChzdHJ1Y3QgYWRhcHRlciAqcGFkYXB0ZXIpCit7CisJaW50IGk7CisJc3RydWN0IG1sbWVfZXh0X3ByaXYgICAgKnBtbG1lZXh0ID0gJnBhZGFwdGVyLT5tbG1lZXh0cHJpdjsKKwlzdHJ1Y3QgbWxtZV9leHRfaW5mbyAgICAqcG1sbWVpbmZvID0gJihwbWxtZWV4dC0+bWxtZXh0X2luZm8pOworCWludCBVbmRlY29yYXRlZFNtb290aGVkUFdEQjsKKwlzdHJ1Y3QgZHZvYmpfcHJpdiAqcGR2b2JqID0gYWRhcHRlcl90b19kdm9iaihwYWRhcHRlcik7CisKKwlpZiAocGFkYXB0ZXItPmJMaW5rSW5mb0R1bXApIHsKKworCQlEQkdfODcxWCgiXG4gPT09PT09PT09PT09WyJBRFBUX0ZNVCJdIGxpbmtlZCBzdGF0dXMgY2hlY2sgPT09PT09PT09PT09PT09PT09PVxuIiwgQURQVF9BUkcocGFkYXB0ZXIpKTsKKworCQlpZiAoKHBtbG1laW5mby0+c3RhdGUmMHgwMykgPT0gV0lGSV9GV19TVEFUSU9OX1NUQVRFKSB7CisJCQlydHdfaGFsX2dldF9kZW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y3B3bSA8IFBTX1NUQVRFX1MyKSAmJiAocHNsdiA+PSBQU19TVEFURV9TMikpCisJCXJwd20gfD0gUFNfQUNLOworCVJUX1RSQUNFKF9tb2R1bGVfcnRsODcxeF9wd3JjdHJsX2NfLCBfZHJ2X25vdGljZV8sCisJCQkgKCJydHdfc2V0X3Jwd206IHJwd20gPSAweCUwMnggY3B3bSA9IDB4JTAyeFxuIiwgcnB3bSwgcHdycHJpdi0+Y3B3bSkpOworCisJcHdycHJpdi0+cnB3bSA9IHBzbHY7CisKKwljcHdtX29yaWcgPSAwOworCWlmIChycHdtICYgUFNfQUNLKQorCQlydHdfaGFsX2dldF9od3JlZyhwYWRhcHRlciwgSFdfVkFSX0NQV00sICZjcHdtX29yaWcpOworCisJaWYgKHJwd20gJiBQU19BQ0spCisJCV9zZXRfdGltZXIoJnB3cnByaXYtPnB3cl9ycHdtX3RpbWVyLCBMUFNfUlBXTV9XQUlUX01TKTsKKwlydHdfaGFsX3NldF9od3JlZyhwYWRhcHRlciwgSFdfVkFSX1NFVF9SUFdNLCAodTggKikoJnJwd20pKTsKKworCXB3cnByaXYtPnRvZyArPSAweDgwOworCisJLyogIE5vIExQUyAzMkssIE5vIEFjayAqLworCWlmIChycHdtICYgUFNfQUNLKSB7CisJCXVuc2lnbmVkIGxvbmcgc3RhcnRfdGltZTsKKwkJdTggY3B3bV9ub3c7CisJCXU4IHBvbGxfY250ID0gMDsKKworCQlzdGFydF90aW1lID0gamlmZmllczsKKworCQkvKiAgcG9sbGluZyBjcHdtICovCisJCWRvIHsKKwkJCW1kZWxheSgxKTsKKwkJCXBvbGxfY250Kys7CisJCQlydHdfaGFsX2dldF9od3JlZyhwYWRhcHRlciwgSFdfVkFSX0NQV00sICZjcHdtX25vdyk7CisJCQlpZiAoKGNwd21fb3JpZyBeIGNwd21fbm93KSAmIDB4ODApIHsKKwkJCQlwd3Jwcml2LT5jcHdtID0gUFNfU1RBVEVfUzQ7CisJCQkJcHdycHJpdi0+Y3B3bV90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ybF90eXBlID0gKih1MTYqKShwdHIrcm12X2xlbis2KTsgKi8KKworCQkJCS8qIERCR184NzFYKCJSQzogbGVuID0gMHgleCwgY3RybF90eXBlID0gMHgleFxuIiwgbGVuLCBjdHJsX3R5cGUpOyAqLworCQkJCURCR184NzFYKCJSQzogbGVuID0gMHgleFxuIiwgbGVuKTsKKworCQkJCWZvciAoaSA9IDA7IGkgPCBsZW4gOyBpKyspCisJCQkJCURCR184NzFYKCIweCV4XG4iLCAqKHB0citybXZfbGVuKzYraSkpOworCQkJCQkvKiBEQkdfODcxWCgiMHgleFxuIiwgKihwdHIrcm12X2xlbis4K2kpKTsgKi8KKworCQkJCURCR184NzFYKCJSQy1lbmRcbiIpOworCQkJfQorCQl9CisJfQorI2VuZGlmIC8qIENPTkZJR19BVVRPX0FQX01PREUgKi8KKworCWlmICgoY2hlY2tfZndzdGF0ZShwbWxtZXByaXYsIFdJRklfTVBfU1RBVEUpID09IHRydWUpKSB7CisJCXB0ciArPSBybXZfbGVuOworCQkqcHRyID0gMHg4NzsKKwkJKihwdHIrMSkgPSAweDEyOworCisJCWV0aF90eXBlID0gMHg4NzEyOworCQkvKiAgYXBwZW5kIHJ4IHN0YXR1cyBmb3IgbXAgdGVzdCBwYWNrZXRzICovCisJCXB0ciA9IHJlY3ZmcmFtZV9wdWxsKHByZWN2ZnJhbWUsIChybXZfbGVuLXNpemVvZihzdHJ1Y3QgZXRoaGRyKSsyKS0yNCk7CisJCW1lbWNweShwdHIsIGdldF9yeG1lbShwcmVjdmZyYW1lKSwgMjQpOworCQlwdHIgKz0gMjQ7CisJfSBlbHNlCisJCXB0ciA9IHJlY3ZmcmFtZV9wdWxsKHByZWN2ZnJhbWUsIChybXZfbGVuLXNpemVvZihzdHJ1Y3QgZXRoaGRyKSArIChic25hcGhkcj8yOjApKSk7CisKKwltZW1jcHkocHRyLCBwYXR0cmliLT5kc3QsIEVUSF9BTEVOKTsKKwltZW1jcHkocHRyK0VUSF9BTEVOLCBwYXR0cmli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ZW4gVEEsIFRLLCBJVjMyCisqCisqIElucHV0czoKKyogICAgIHRrW10gICAgICA9IHRlbXBvcmFsIGtleSAgICAgICAgICAgICAgICAgICAgICAgICBbMTI4IGJpdHNdCisqICAgICB0YVtdICAgICAgPSB0cmFuc21pdHRlcidzIE1BQyBhZGRyZXNzICAgICAgICAgICAgWyA0OCBiaXRzXQorKiAgICAgaXYzMiAgICAgID0gdXBwZXIgMzIgYml0cyBvZiBJViAgICAgICAgICAgICAgICAgIFsgMzIgYml0c10KKyogT3V0cHV0OgorKiAgICAgcDFrW10gICAgID0gUGhhc2UgMSBrZXkgICAgICAgICAgICAgICAgICAgICAgICAgIFsgODAgYml0c10KKyoKKyogTm90ZToKKyogICAgIFRoaXMgZnVuY3Rpb24gb25seSBuZWVkcyB0byBiZSBjYWxsZWQgZXZlcnkgMioqMTYgcGFja2V0cywKKyogICAgIGFsdGhvdWdoIGluIHRoZW9yeSBpdCBjb3VsZCBiZSBjYWxsZWQgZXZlcnkgcGFja2V0LgorKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKi8KK3N0YXRpYyB2b2lkIHBoYXNlMSh1MTYgKnAxaywgY29uc3QgdTggKnRrLCBjb25zdCB1OCAqdGEsIHUzMiBpdjMyKQoreworCXNpbnQgIGk7CisKKwkvKiBJbml0aWFsaXplIHRoZSA4MCBiaXRzIG9mIFAxS1tdIGZyb20gSVYzMiBhbmQgVEFbMC4uNV0gICAgICovCisJcDFrWzBdICAgICAgPSBMbzE2KGl2MzIpOworCXAxa1sxXSAgICAgID0gSGkxNihpdjMyKTsKKwlwMWtbMl0gICAgICA9IE1rMTYodGFbMV0sIHRhWzBdKTsgLyogdXNlIFRBW10gYXMgbGl0dGxlLWVuZGlhbiAqLworCXAxa1szXSAgICAgID0gTWsxNih0YVszXSwgdGFbMl0pOworCXAxa1s0XSAgICAgID0gTWsxNih0YVs1XSwgdGFbNF0pOworCisJLyogTm93IGNvbXB1dGUgYW4gdW5iYWxhbmNlZCBGZWlzdGVsIGNpcGhlciB3aXRoIDgwLWJpdCBibG9jayAqLworCS8qIHNpemUgb24gdGhlIDgwLWJpdCBibG9jayBQMUtbXSwgdXNpbmcgdGhlIDEyOC1iaXQga2V5IFRLW10gKi8KKwlmb3IgKGkgPSAwOyBpIDwgUEhBU0UxX0xPT1BfQ05UOyBpKyspIHsKKwkJLyogRWFjaCBhZGQgb3BlcmF0aW9uIGhlcmUgaXMgbW9kIDIqKjE2ICovCisJCXAxa1swXSArPSBfU18ocDFrWzRdIF4gVEsxNigoaSYxKSswKSk7CisJCXAxa1sxXSArPSBfU18ocDFrWzBdIF4gVEsxNigoaSYxKSsyKSk7CisJCXAxa1syXSArPSBfU18ocDFrWzFdIF4gVEsxNigoaSYxKSs0KSk7CisJCXAxa1szXSArPSBfU18ocDFrWzJdIF4gVEsxNigoaSYxKSs2KSk7CisJCXAxa1s0XSArPSBfU18ocDFrWzNdIF4gVEsxNigoaSYxKSswKSk7CisJCXAxa1s0XSArPSAgKHVuc2lnbmVkIHNob3J0KWk7ICAgICAgICAgIC8qIGF2b2lkICJzbGlkZSBhdHRhY2tzIiAqLworCX0KK30KKworCisvKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBSb3V0aW5lOiBQaGFzZSAyIC0tIGdlbmVyYXRlIFJDNEtFWSwgZ2l2ZW4gVEssIFAxSywgSVYxNgorKgorKiBJbnB1dHM6CisqICAgICB0a1tdICAgICAgPSBUZW1wb3JhbCBrZXkgICAgICAgICAgICAgICAgICAgICAgICAgWzEyOCBiaXRzXQorKiAgICAgcDFrW10gICAgID0gUGhhc2UgMSBvdXRwdXQga2V5ICAgICAgICAgICAgICAgICAgIFsgODAgYml0c10KKyogICAgIGl2MTYgICAgICA9IGxvdyAxNiBiaXRzIG9mIElWIGNvdW50ZXIgICAgICAgICAgICBbI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N0YXRpYyB2b2lkIHNoaWZ0X3Jvdyh1OCAqaW4sIHU4ICpvdXQpOworc3RhdGljIHZvaWQgbWl4X2NvbHVtbih1OCAqaW4sIHU4ICpvdXQpOworc3RhdGljIHZvaWQgYWVzMTI4azEyOGQodTggKmtleSwgdTggKmRhdGEsIHU4ICpjaXBoZXJ0ZXh0KTsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIGFlczEyOGsxMjhkKCkgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogUGVyZm9ybXMgYSAxMjggYml0IEFFUyBlbmNyeXB0IHdpdGggICovCisvKiAxMjggYml0IGRhdGEuICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgeG9yXzEyOCh1OCAqYSwgdTggKmIsIHU4ICpvdXQpCit7CisJCXNpbnQgaTsKKworCQlmb3IgKGkgPSAwOyBpIDwgMTY7IGkrKykgeworCQkJb3V0W2ldID0gYVtpXSBeIGJbaV07CisJCX0KK30KKworCitzdGF0aWMgdm9pZCB4b3JfMzIodTggKmEsIHU4ICpiLCB1OCAqb3V0KQoreworCQlzaW50IGk7CisKKwkJZm9yIChpID0gMDsgaSA8IDQ7IGkrKykgeworCQkJb3V0W2ldID0gYVtpXSBeIGJbaV07CisJCX0KK30KKworCitzdGF0aWMgdTggc2JveCh1OCBhKQoreworCQlyZXR1cm4gc2JveF90YWJsZVsoc2ludClhXTsKK30KKworCitzdGF0aWMgdm9pZCBuZXh0X2tleSh1OCAqa2V5LCBzaW50IHJvdW5kKQoreworCQl1OCByY29uOworCQl1OCBzYm94X2tleVs0XTsKKwkJdTggcmNvbl90YWJsZVsxMl0gPSB7CisJCQkweDAxLCAweDAyLCAweDA0LCAweDA4LAorCQkJMHgxMCwgMHgyMCwgMHg0MCwgMHg4MCwKKwkJCTB4MWIsIDB4MzYsIDB4MzYsIDB4MzYKKwkJfTsKKwkJc2JveF9rZXlbMF0gPSBzYm94KGtleVsxM10pOworCQlzYm94X2tleVsxXSA9IHNib3goa2V5WzE0XSk7CisJCXNib3hfa2V5WzJdID0gc2JveChrZXlbMTVdKTsKKwkJc2JveF9rZXlbM10gPSBzYm94KGtleVsxMl0pOworCisJCXJjb24gPSByY29uX3RhYmxlW3JvdW5kXTsKKworCQl4b3JfMzIoJmtleVswXSwgc2JveF9rZXksICZrZXlbMF0pOworCQlrZXlbMF0gPSBrZXlbMF0gXiByY29uOworCisJCXhvcl8zMigma2V5WzRdLCAma2V5WzBdLCAma2V5WzRdKTsKKwkJeG9yXzMyKCZrZXlbOF0sICZrZXlbNF0sICZrZXlbOF0pOworCQl4b3JfMzIoJmtleVsxMl0sICZrZXlbOF0sICZrZXlbMTJdKTsKK30KKworCitzdGF0aWMgdm9pZCBieXRlX3N1Yih1OCAqaW4sIHU4ICpvdXQpCit7CisJCXNpbnQgaTsKKworCQlmb3IgKGkgPSAwOyBpIDwgMTY7IGkrKykgeworCQkJb3V0W2ldID0gc2JveChpbltpXSk7CisJCX0KK30KKworCitzdGF0aWMgdm9pZCBzaGlmdF9yb3codTggKmluLCB1OCAqb3V0KQoreworCQlvdXRbMF0gPSAgaW5bMF07CisJCW91dFsxXSA9ICBpbls1XTsKKwkJb3V0WzJdID0gIGluWzEwXTsKKwkJb3V0WzNdID0gIGluWzE1XTsKKwkJb3V0WzRdID0gIGluWzRdOworCQlvdXRbNV0gPSAgaW5bOV07CisJCW91dFs2XSA9ICBpblsxNF07CisJCW91dFs3XSA9ICBpblszXTsKKwkJb3V0WzhdID0gIGluWzhdOworCQlvdXRbOV0gPSAgaW5bMTNdOworCQlvdXRbMTBdID0gaW5bMl07CisJCW91dFsxMV0gPSBpbls3XTsKKwkJb3V0WzEyXSA9IGluWzEyXTsKKwkJb3V0WzEzXSA9IGluWzFdOworCQlvdXRbMTRdID0gaW5bNl07CisJCW91dFsxNV0gPSBpblsxMV07Cit9CisKKworc3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LCBpbnRlcm1lZGlhdGViKTsKKwkJCQl4b3JfMTI4KGludGVybWVkaWF0ZWIsIHJvdW5kX2tleSwgY2lwaGVydGV4dCk7CisJCQl9IGVsc2V7ICAgLyogMSAtIDkgKi8KKwkJCQlieXRlX3N1YihjaXBoZXJ0ZXh0LCBpbnRlcm1lZGlhdGVhKTsKKwkJCQlzaGlmdF9yb3coaW50ZXJtZWRpYXRlYSwgaW50ZXJtZWRpYXRlYik7CisJCQkJbWl4X2NvbHVtbigmaW50ZXJtZWRpYXRlYlswXSwgJmludGVybWVkaWF0ZWFbMF0pOworCQkJCW1peF9jb2x1bW4oJmludGVybWVkaWF0ZWJbNF0sICZpbnRlcm1lZGlhdGVhWzRdKTsKKwkJCQltaXhfY29sdW1uKCZpbnRlcm1lZGlhdGViWzhdLCAmaW50ZXJtZWRpYXRlYVs4XSk7CisJCQkJbWl4X2NvbHVtbigmaW50ZXJtZWRpYXRlYlsxMl0sICZpbnRlcm1lZGlhdGVhWzEyXSk7CisJCQkJeG9yXzEyOChpbnRlcm1lZGlhdGVhLCByb3VuZF9rZXksIGNpcGhlcnRleHQpOworCQkJCW5leHRfa2V5KHJvdW5kX2tleSwgcm91bmQpOworCQkJfQorCQl9Cit9CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIGNvbnN0cnVjdF9taWNfaXYoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBCdWlsZHMgdGhlIE1JQyBJViBmcm9tIGhlYWRlciBmaWVsZHMgYW5kIFBOICAqLworLyogQmFyb24gdGhpbmsgdGhlIGZ1bmN0aW9uIGlzIGNvbnN0cnVjdCBDQ00gICAgKi8KKy8qIG5vbmNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgY29uc3RydWN0X21pY19pdigKKwl1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ljX2l2W2ldID0gcG5fdmVjdG9yWzEzIC0gaV07ICAgICAgICAgIC8qIG1pY19pdls4OjEzXSA9IFBOWzU6MF0gKi8KKwkJI2VuZGlmCisJCW1pY19pdlsxNF0gPSAodW5zaWduZWQgY2hhcikgKHBheWxvYWRfbGVuZ3RoIC8gMjU2KTsKKwkJbWljX2l2WzE1XSA9ICh1bnNpZ25lZCBjaGFyKSAocGF5bG9hZF9sZW5ndGggJSAyNTYpOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBjb25zdHJ1Y3RfbWljX2hlYWRlcjEoKSAgICAgICAgICAgICAgICAgICAgICAqLworLyogQnVpbGRzIHRoZSBmaXJzdCBNSUMgaGVhZGVyIGJsb2NrIGZyb20gICAgICAgKi8KKy8qIGhlYWRlciBmaWVsZHMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBCdWlsZCBBQUQgU0MsIEExLCBBMiAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQgY29uc3RydWN0X21pY19oZWFkZXIxKAorCXU4ICptaWNfaGVhZGVyMSwKKwlzaW50IGhlYWRlcl9sZW5ndGgsCisJdTggKm1wZHUsCisJdWludCBmcnR5cGUvKiAgYWRkIGZvciBDT05GSUdfSUVFRTgwMjExVywgbm9uZSAxMXcgYWxzbyBjYW4gdXNlICovCispCit7CisJCW1pY19oZWFkZXIxWzBdID0gKHU4KSgoaGVhZGVyX2xlbmd0aCAtIDIpIC8gMjU2KTsKKwkJbWljX2hlYWRlcjFbMV0gPSAodTgpKChoZWFkZXJfbGVuZ3RoIC0gMikgJSAyNTYpOworCisJCS8qIDgwMi4xMXcgbWFuYWdlbWVudCBmcmFtZSBkb24ndCBBTkQgc3VidHlwZSBiaXRzIDQsIDUsIDYgb2YgZnJhbWUgY29udHJvbCBmaWVsZCAqLworCQlpZiAoZnJ0eXBlID09IFdJRklfTUdUX1RZUEUpCisJCQltaWNfaGVhZGVyMVsyXSA9IG1wZHVbMF07CisJCWVsc2UKKwkJCW1pY19oZWFkZXIxWzJdID0gbXBkdVswXSAmIDB4Y2Y7ICAgIC8qIE11dGUgQ0YgcG9sbCAmIENGIGFjayBiaXRzICovCisKKwkJbWljX2hlYWRlcjFbM10gPSBtcGR1WzFdICYgMHhjNzsgICAgLyogTXV0ZSByZXRyeSwgbW9yZSBkYXRhIGFuZCBwd3IgbWd0IGJpdHMgKi8KKwkJbWljX2hlYWRlcjFbNF0gPSBtcGR1WzRdOyAgICAgICAvKiBBMSAqLworCQltaWNfaGVhZGVyMVs1XSA9IG1wZHVbNV07CisJCW1pY19oZWFkZXIxWzZdID0gbXBkdVs2XTsKKwkJbWljX2hlYWRlcjFbN10gPSBtcGR1WzddOworCQltaWNfaGVhZGVyMVs4XSA9IG1wZHVbOF07CisJCW1pY19oZWFkZXIxWzldID0gbXBkdVs5XTsKKwkJbWljX2hlYWRlcjFbMTBdID0gbXBkdVsxMF07ICAgICAvKiBBMiAqLworCQltaWNfaGVhZGVyMVsxMV0gPSBtcGR1WzExXTsKKwkJbWljX2hlYWRlcjFbMTJdID0gbXBkdVsxMl07CisJCW1pY19oZWFkZXIxWzEzXSA9IG1wZHVbMTNdOworCQltaWNfaGVhZGVyMVsxNF0gPSBtcGR1WzE0XTsKKwkJbWljX2hlYWRlcjFbMTVdID0gbXBkdVsxNV07Cit9CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIGNvbnN0cnVjdF9taWNfaGVhZGVyMigpICAgICAgICAgICAgICAgICAgICAgICovCisvKiBCdWlsZHMgdGhlIGxhc3QgTUlDIGhlYWRlciBibG9jayBmcm9tICAgICAgICAqLworLyogaGVhZGVyIGZpZWxkcy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBjb25zdHJ1Y3RfbWljX2hlYWRlcjIoCisJdTggKm1pY19oZWFkZXIyLAorCXU4ICptcGR1LAorCXNpbnQgYTRfZXhpc3RzLAorCXNpbnQgcWNfZXhpc3RzCispCit7CisJCXNpbnQgaTsKKworCQlmb3IgKGkgPSAwOyBpIDwgMTY7IGkrKykKKwkJCW1pY19oZWFkZXIyW2ldID0gMHgwMDsKKworCQltaWNfaGVhZGVyMlswXSA9IG1wZHVbMTZdOyAgICAvKiBBMyAqLworCQltaWNfaGVhZGVyMlsxXSA9IG1wZHVbMTddOworCQltaWNfaGVhZGVyMlsyXSA9IG1wZHVbMThdOworCQltaWNfaGVhZGVyMlszXSA9IG1wZHVbMTldOworCQltaWNfaGVhZGVyMls0XSA9IG1wZHVbMjBdOworCQltaWNfaGVhZGVyMls1XSA9IG1wZHVbMjFdOworCisJCW1pY19oZWFkZXIyWzZdID0gMHgwMDsKKwkJbWljX2hlYWRlcjJbN10gPSAweDAwOyAvKiBtcGR1WzIzXTsgKi8KKworCisJCWlmICghcWNfZXhpc3RzICYmIGE0X2V4aXN0cykgeworCQkJZm9yIChpID0gMDsgaSA8IDY7IGkrKykKKwkJCQltaWNfaGVhZGVyMls4K2ldID0gbXBkdVsyNCtpXTsgICAvKiBBNCAqLworCisJCX0KKworCQlpZiAocWNfZXhpc3RzICYmICFhNF9leGlzdHMpIHsKKwkJCW1pY19oZWFkZXIyWzhdID0gbXBkdVsyNF0gJiAweDBmOyAvKiBtdXRlIGJpdHMgMTUgLSA0ICovCisJCQltaWNfaGVhZGVyMls5XSA9IG1wZHVbMjVdICYgMHgwMDsKKwkJfQorCisJCWlmIChxY19leGlzdHMgJiYgYTRfZXhpc3RzKSB7CisJCQlmb3IgKGkgPSAwOyBpIDwgNjsgaSsrKQorCQkJCW1pY19oZWFkZXIyWzgraV0gPSBtcGR1WzI0K2ldOyAgIC8qIEE0ICovCisKKwkJCW1pY19oZWFkZXIyWzE0XSA9IG1wZHVbMzBdICYgMHgwZjsKKwkJCW1pY19oZWFkZXIyWzE1XSA9IG1wZHVbMzFdICYgMHgwMDsKKwkJfQorCit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBjb25zdHJ1Y3RfbWljX2hlYWRlcjIoKSAgICAgICAgICAgICAgICAgICAgICAqLworLyogQnVpbGRzIHRoZSBsYXN0IE1JQyBoZWFkZXIgYmxvY2sgZnJvbSAgICAgICAgKi8KKy8qIGhlYWRlciBmaWVsZHMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBCYXJvbiB0aGluayB0aGUgZnVuY3Rpb24gaXMgY29uc3RydWN0IENDTSAgICAqLworLyogbm9uY2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBjb25zdHJ1Y3RfY3RyX3ByZWxvYWQoCisJdTggKmN0cl9wcmVsb2FkLAorCXNpbnQgYTRfZXhpc3RzLAorCXNpbnQgcWNfZXhpc3RzLAorCXU4ICptcGR1LAorCXU4ICpwbl92ZWN0b3IsCisJc2ludCBjLAorCXVpbnQgZnJ0eXBlIC8qICBhZGQgZm9yIENPTkZJR19JRUVFODAyMTFXLCBub25lIDExdyBhbHNvIGNhbiB1c2UgKi8KKykKK3sKKwlzaW50IGkgPSAwOworCisJZm9yIChpID0gMDsgaSA8IDE2OyBpKyspCisJCWN0cl9wcmVsb2FkW2ldID0gMHgwMDsKKwlpID0gMDsKKworCWN0cl9wcmVsb2FkWzBdID0gMHgwMTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZmxhZyAqLworCWlmIChxY19leGlzdHMgJiYgYTRfZXhpc3RzKQorCQljdHJfcHJlbG9hZFsxXSA9IG1wZHVbMzBdICYg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jODcyM2IxYW50X0luaXRId0NvbmZpZyhwQnRDb2V4aXN0LCBmYWxzZSwgZmFsc2UpOworCQloYWxidGM4NzIzYjFhbnRfSW5pdENvZXhEbShwQnRDb2V4aXN0KTsKKwkJaGFsYnRjODcyM2IxYW50X1F1ZXJ5QnRJbmZvKHBCdENvZXhpc3QpOworCX0KK30KKwordm9pZCBFWGhhbGJ0Yzg3MjNiMWFudF9QZXJpb2RpY2FsKFBCVENfQ09FWElTVCBwQnRDb2V4aXN0KQoreworCXN0YXRpYyB1OCBkaXNWZXJJbmZvQ250ID0gMDsKKwl1MzIgZndWZXIgPSAwLCBidFBhdGNoVmVyID0gMDsKKworCUJUQ19QUklOVChCVENfTVNHX0FMR09SSVRITSwgQUxHT19UUkFDRSwgKCJbQlRDb2V4XSwgPT09PT09PT09PT09PT09PT09PT09PT09PT1QZXJpb2RpY2FsID09PT09PT09PT09PT09PT09PT09PT09PT09PVxuIikpOworCisJaWYgKGRpc1ZlckluZm9DbnQgPD0gNSkgeworCQlkaXNWZXJJbmZvQ250ICs9IDE7CisJCUJUQ19QUklOVChCVENfTVNHX0lOVEVSRkFDRSwgSU5URl9JTklULCAoIltCVENvZXhdLCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4iKSk7CisJCXBCdENvZXhpc3QtPmZCdGNHZXQocEJ0Q29leGlzdCwgQlRDX0dFVF9VNF9CVF9QQVRDSF9WRVIsICZidFBhdGNoVmVyKTsKKwkJcEJ0Q29leGlzdC0+ZkJ0Y0dldChwQnRDb2V4aXN0LCBCVENfR0VUX1U0X1dJRklfRldfVkVSLCAmZndWZXIpOworCQlCVENfUFJJTlQoQlRDX01TR19JTlRFUkZBQ0UsIElOVEZfSU5JVCwgKCJbQlRDb2V4XSwgQ29leFZlci8gRndWZXIvIFBhdGNoVmVyID0gJWRfJXgvIDB4JXgvIDB4JXgoJWQpXG4iLCBcCisJCQlHTENvZXhWZXJEYXRlODcyM2IxQW50LCBHTENvZXhWZXI4NzIzYjFBbnQsIGZ3VmVyLCBidFBhdGNoVmVyLCBidFBhdGNoVmVyKSk7CisJCUJUQ19QUklOVChCVENfTVNHX0lOVEVSRkFDRSwgSU5URl9JTklULCAoIltCVENvZXhdLCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4iKSk7CisJfQorCisJaGFsYnRjODcyM2IxYW50X01vbml0b3JCdEN0cihwQnRDb2V4aXN0KTsKKwloYWxidGM4NzIzYjFhbnRfTW9uaXRvcldpRmlDdHIocEJ0Q29leGlzdCk7CisKKwlpZiAoCisJCWhhbGJ0Yzg3MjNiMWFudF9Jc1dpZmlTdGF0dXNDaGFuZ2VkKHBCdENvZXhpc3QpIHx8CisJCXBDb2V4RG0tPmJBdXRvVGRtYUFkanVzdAorCSkKKwkJaGFsYnRjODcyM2IxYW50X1J1bkNvZXhpc3RNZWNoYW5pc20ocEJ0Q29leGlzdCk7CisKKwlwQ29leFN0YS0+c3BlY2lhbFBrdFBlcmlvZENudCsrOworfQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvSGFsQnRjODcyM2IxQW50LmggYi9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2hhbC9IYWxCdGM4NzIzYjFBbnQuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi44ODBiZDYzCi0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvSGFsQnRjODcyM2IxQW50LmgKQEAgLTAsMCArMSwxOTMgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBDb3B5cmlnaHQoYykgMjAwNyAtIDIwMTIgUmVhbHRlayBDb3Jwb3Jhd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IGkgPCBBcnJheUxlbi0yKSB7CisJCQkJCVJFQURfTkVYVF9QQUlSKHYxLCB2MiwgaSk7CisJCQkJCWNDb25kID0gKHU4KSgodjEgJiAoQklUMjl8QklUMjgpKSA+PiAyOCk7CisJCQkJfQorCQkJfQorCQl9CisJfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgUEhZX1JFRy5UWFQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHUzMiBBcnJheV9NUF84NzIzQl9QSFlfUkVHW10gPSB7CisJCTB4ODAwLCAweDgwMDQwMDAwLAorCQkweDgwNCwgMHgwMDAwMDAwMywKKwkJMHg4MDgsIDB4MDAwMEZDMDAsCisJCTB4ODBDLCAweDAwMDAwMDBBLAorCQkweDgxMCwgMHgxMDAwMTMzMSwKKwkJMHg4MTQsIDB4MDIwQzNEMTAsCisJCTB4ODE4LCAweDAyMjAwMzg1LAorCQkweDgxQywgMHgwMDAwMDAwMCwKKwkJMHg4MjAsIDB4MDEwMDAxMDAsCisJCTB4ODI0LCAweDAwMTkwMjA0LAorCQkweDgyOCwgMHgwMDAwMDAwMCwKKwkJMHg4MkMsIDB4MDAwMDAwMDAsCisJCTB4ODMwLCAweDAwMDAwMDAwLAorCQkweDgzNCwgMHgwMDAwMDAwMCwKKwkJMHg4MzgsIDB4MDAwMDAwMDAsCisJCTB4ODNDLCAweDAwMDAwMDAwLAorCQkweDg0MCwgMHgwMDAxMDAwMCwKKwkJMHg4NDQsIDB4MDAwMDAwMDAsCisJCTB4ODQ4LCAweDAwMDAwMDAwLAorCQkweDg0QywgMHgwMDAwMDAwMCwKKwkJMHg4NTAsIDB4MDAwMDAwMDAsCisJCTB4ODU0LCAweDAwMDAwMDA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IFNvZnR3YXJlIEZvdW5kYXRpb24uCisqCisqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVAorKiBBTlkgV0FSUkFOVFk7IHdpdGhvdXQgZXZlbiB0aGUgaW1wbGllZCB3YXJyYW50eSBvZiBNRVJDSEFOVEFCSUxJVFkgb3IKKyogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisqIG1vcmUgZGV0YWlscy4KKyoKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmbmRlZiBfX0lOQ19NUF9CQl9IV19JTUdfODcyM0JfSAorI2RlZmluZSBfX0lOQ19NUF9CQl9IV19JTUdfODcyM0JfSAorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgICAgICAgICAgICBBR0NfVEFCLlRYVAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkCitPRE1fUmVhZEFuZENvbmZpZ19NUF84NzIzQl9BR0NfVEFCKC8qICBUQzogVGVzdCBDaGlwLCBNUDogTVAgQ2hpcCAqLworCVBETV9PRE1fVCAgcERNX09kbQorKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgIFBIWV9SRUcuVFhUCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQKK09ETV9SZWFkQW5kQ29uZmlnX01QXzg3MjNCX1BIWV9SRUcoLyogIFRDOiBUZXN0IENoaXAsIE1QOiBNUCBDaGlwICovCisJUERNX09ETV9UICBwRE1fT2RtCispOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgUEhZX1JFR19QRy5UWFQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZAorT0RNX1JlYWRBbmRDb25maWdfTVBfODcyM0JfUEhZX1JFR19QRygvKiAgVEM6IFRlc3QgQ2hpcCwgTVA6IE1QIENoaXAgKi8KKwlQRE1fT0RNX1QgIHBETV9PZG0KKyk7Cit1MzIgT0RNX0dldFZlcnNpb25fTVBfODcyM0JfUEhZX1JFR19QRyh2b2lkKTsKKworI2VuZGlmCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2hhbC9IYWxIV0ltZzg3MjNCX01BQy5jIGIvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvSGFsSFdJbWc4NzIzQl9NQUMuYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5iODY4ZTI2Ci0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvSGFsSFdJbWc4NzIzQl9NQUMuYwpAQCAtMCwwICsxLDMwMiBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKgorKiBDb3B5cmlnaHQoYykgMjAwNyAtIDIwMTEgUm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mUgWzMxOjI4XSBhbmQgWzIzOjIwXSAqLworCS8qICAqLworCWNvbmQxICAgJj0gMHgwMDBGMEZGRjsKKwlkcml2ZXIxICY9IDB4MDAwRjBGRkY7CisKKwlpZiAoKGNvbmQxICYgZHJpdmVyMSkgPT0gY29uZDEpIHsKKwkJdTMyIGJpdE1hc2sgPSAwOworCQlpZiAoKGNvbmQxICYgMHgwRikgPT0gMCkgLyogIEJvYXJkVHlwZSBpcyBET05UQ0FSRSAqLworCQkJcmV0dXJuIHRydWU7CisKKwkJaWYgKChjb25kMSAmIEJJVDApICE9IDApIC8qIEdMTkEgKi8KKwkJCWJpdE1hc2sgfD0gMHgwMDAwMDBGRjsKKwkJaWYgKChjb25kMSAmIEJJVDEpICE9IDApIC8qIEdQQSAqLworCQkJYml0TWFzayB8PSAweDAwMDBGRjAwOworCQlpZiAoKGNvbmQxICYgQklUMikgIT0gMCkgLyogQUxOQSAqLworCQkJYml0TWFzayB8PSAweDAwRkYwMDAwOworCQlpZiAoKGNvbmQxICYgQklUMykgIT0gMCkgLyogQVBBICovCisJCQliaXRNYXNrIHw9IDB4RkYwMDAwMDA7CisKKwkJaWYgKChjb25kMiAmIGJpdE1hc2spID09IChkcml2ZXIyICYgYml0TWFzaykpIC8qICBCb2FyZFR5cGUgb2YgZWFjaCBSRiBwYXRoIGlzIG1hdGNoZWQgKi8KKwkJCXJldHVybiB0cnVlOworCX0KKwlyZXR1cm4gZmFsc2U7Cit9CisKK3N0YXRpYyBib29sIENoZWNrTmVnYXRpdmUoCisJUERNX09ETV9UIHBETV9PZG0sIGNvbnN0IHUzMiBDb25kaXRpb24xLCBjb25zdCB1MzIgQ29uZGl0aW9uMgorKQoreworCXJldHVybiB0cnVlOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgTUFDX1JFRy5UWFQKKyoqKioqK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G9mIE1FUkNIQU5UQUJJTElUWSBvcgorKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IKKyogbW9yZSBkZXRhaWxzLgorKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fSU5DX01QX01BQ19IV19JTUdfODcyM0JfSAorI2RlZmluZSBfX0lOQ19NUF9NQUNfSFdfSU1HXzg3MjNCX0gKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgTUFDX1JFRy5UWFQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZAorT0RNX1JlYWRBbmRDb25maWdfTVBfODcyM0JfTUFDX1JFRygvKiAgVEM6IFRlc3QgQ2hpcCwgTVA6IE1QIENoaXAgKi8KKwlQRE1fT0RNX1QgIHBETV9PZG0KKyk7CisjZW5kaWYKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4NzIzYnMvaGFsL0hhbEhXSW1nODcyM0JfUkYuYyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4NzIzYnMvaGFsL0hhbEhXSW1nODcyM0JfUkYuYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi44NGEwYmU3Ci0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvSGFsSFdJbWc4NzIzQl9SRi5jCkBAIC0wLDAgKzEsNzk5IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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c2U7CisKKwkvKiAgQml0IERlZmluZWQgQ2hlY2sgPT09PT09PT09PT09PT09PSAqLworCS8qICBXZSBkb24ndCBjYXJlIFszMToyOF0gYW5kIFsyMzoyMF0gKi8KKwljb25kMSAgICY9IDB4MDAwRjBGRkY7CisJZHJpdmVyMSAmPSAweDAwMEYwRkZGOworCisJaWYgKChjb25kMSAmIGRyaXZlcjEpID09IGNvbmQxKSB7CisJCXUzMiBiaXRNYXNrID0gMDsKKworCQlpZiAoKGNvbmQxICYgMHgwRikgPT0gMCkgLyogIEJvYXJkVHlwZSBpcyBET05UQ0FSRSAqLworCQkJcmV0dXJuIHRydWU7CisKKwkJaWYgKChjb25kMSAmIEJJVDApICE9IDApIC8qIEdMTkEgKi8KKwkJCWJpdE1hc2sgfD0gMHgwMDAwMDBGRjsKKwkJaWYgKChjb25kMSAmIEJJVDEpICE9IDApIC8qIEdQQSAqLworCQkJYml0TWFzayB8PSAweDAwMDBGRjAwOworCQlpZiAoKGNvbmQxICYgQklUMikgIT0gMCkgLyogQUxOQSAqLworCQkJYml0TWFzayB8PSAweDAwRkYwMDAwOworCQlpZiAoKGNvbmQxICYgQklUMykgIT0gMCkgLyogQVBBICovCisJCQliaXRNYXNrIHw9IDB4RkYwMDAwMDA7CisKKwkJLyogIEJvYXJkVHlwZSBvZiBlYWNoIFJGIHBhdGggaXMgbWF0Y2hlZCAqLworCQlpZiAoKGNvbmQyICYgYml0TWFzaykgPT0gKGRyaXZlcjIgJiBiaXRNYXNrKSkKKwkJCXJldHVybiB0cnVlOworCisJCXJldHVybiBmYWxzZTsKKwl9CisKKwlyZXR1cm4gZmFsc2U7Cit9CisKK3N0YXRpYyBib29sIENoZWNrTmVnYXRpdmUoCisJUERNX09ETV9UIHBETV9PZG0sIGNvbnN0IHUzMiAgQ29uZGl0aW9uMSwgY29uc3QgdTMyIENvbmRpdGlvbjIKKykKK3sKKwlyZXR1cm4gdHJ1ZTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioq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U4KSgodjEgJiAoQklUMjl8QklUMjgpKSA+PiAyOCk7CisJCQkJfQorCQkJfQorCQl9CisJfQorfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgVHhQb3dlclRyYWNrX1NESU8uVFhUCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB1OCBnRGVsdGFTd2luZ1RhYmxlSWR4X01QXzVHQl9OX1R4UG93ZXJUcmFja19TRElPXzg3MjNCW11bREVMVEFfU1dJTkdJRFhfU0laRV0gPSB7CisJeworCQkwLCAxLCAxLCAyLCAyLCAzLCA0LCA1LCA1LCA2LCAgNiwgIDcsICA3LCAgOCwgIDgsICA5LAorCQk5LCAxMCwgMTEsIDEyLCAxMiwgMTMsIDEzLCAxNCwgMTQsIDE0LCAxNCwgMTQsIDE0LCAxNAorCX0sCisJeworCQkwLCAxLCAyLCAzLCAzLCA0LCA1LCA2LCA2LCA3LCAgNywgIDgsICA4LCAgOSwgIDksIDEwLAorCQkxMCwgMTEsIDExLCAxMiwgMTIsIDEzLCAxMywgMTQsIDE0LCAxNCwgMTQsIDE0LCAxNCwgMTQKKwl9LAorCXsKKwkJMCwgMSwgMiwgMywgMywgNCwgNSwgNiwgNiwgNywgIDcsICA4LCAgOCwgIDksICA5LCAxMCwKKwkJMTAsIDExLCAxMSwgMTIsIDEyLCAxMywgMTMsIDE0LCAxNCwgMTQsIDE0LCAxNCwgMTQsIDE0CisJfSwKK307CitzdGF0aWMgdTggZ0RlbHRhU3dpbmdUYWJsZUlkeF9NUF81R0JfUF9UeFBvd2VyVHJhY2tfU0RJT184NzIzQltdW0RFTFRBX1NXSU5HSURYX1NJWkVdID0geworCXsKKwkJMCwgMSwgMiwgMywgMywgNCwgNSwgN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bnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvcgorKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IKKyogbW9yZSBkZXRhaWxzLgorKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fSU5DX01QX1JGX0hXX0lNR184NzIzQl9ICisjZGVmaW5lIF9fSU5DX01QX1JGX0hXX0lNR184NzIzQl9ICisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgIFJhZGlvQS5UWFQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZAorT0RNX1JlYWRBbmRDb25maWdfTVBfODcyM0JfUmFkaW9BKC8qICBUQzogVGVzdCBDaGlwLCBNUDogTVAgQ2hpcCAqLworCVBETV9PRE1fVCAgcERNX09kbQorKTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiAgICAgICAgICAgICAgICAgICAgICAgICAgIFR4UG93ZXJUcmFja19TRElPLlRYVAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkCitPRE1fUmVhZEFuZENvbmZpZ19NUF84NzIzQl9UeFBvd2VyVHJhY2tfU0RJTygvKiAgVEM6IFRlc3QgQ2hpcCwgTVA6IE1QIENoaXAgKi8KKwlQRE1fT0RNX1QgIHBETV9PZG0KKyk7Cit1MzIgT0RNX0dldFZlcnNpb25fTVBfODcyM0JfVHhQb3dlclRyYWNrX1NESU8odm9pZCk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogICAgICAgICAgICAgICAgICAgICAgICAgICBUWFBXUl9MTVQuVFhUCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3ZvaWQKK09ETV9SZWFkQW5kQ29uZmlnX01QXzg3MjNCX1RYUFdSX0xNVCgvKiAgVEM6IFRlc3QgQ2hpcCwgTVA6IE1QIENoaXAgKi8KKwlQRE1fT0RNX1QgIHBETV9PZG0KKyk7Cit1MzIgT0RNX0dldFZlcnNpb25fTVBfODcyM0JfVFhQV1JfTE1UKHZvaWQpOworCisjZW5kaWYKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4NzIzYnMvaGFsL0hhbFBoeVJmLmMgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2hhbC9IYWxQaHlSZi5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjlhZGNjMzAKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2hhbC9IYWxQaHlSZi5jCkBAIC0wLDAgKzEsNjYyIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ29weXJpZ2h0KGMpIDIwMDcgLSAyMDExIFJlYWx0ZWsgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVzZXJ2ZWQuCisgKgorICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIG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sIDgsIDksIDksIDksIDksIDkKK307CisKKy8qIDMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIFR4IFBvd2VyIFRyYWNraW5nICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisKK3N0YXRpYyB2b2lkIHNldElxa01hdHJpeF84NzIzQigKKwlQRE1fT0RNX1QgcERNX09kbSwKKwl1OCBPRkRNX2luZGV4LAorCXU4IFJGUGF0aCwKKwlzMzIgSXFrUmVzdWx0X1gsCisJczMyIElxa1Jlc3VsdF9ZCispCit7CisJczMyIGVsZV9BID0gMCwgZWxlX0QsIGVsZV9DID0gMCwgdmFsdWUzMjsKKworCWlmIChPRkRNX2luZGV4ID49IE9GRE1fVEFCTEVfU0laRSkKKwkJT0ZETV9pbmRleCA9IE9GRE1fVEFCTEVfU0laRS0xOworCisJZWxlX0QgPSAoT0ZETVN3aW5nVGFibGVfTmV3W09GRE1faW5kZXhdICYgMHhGRkMwMDAwMCk+PjIyOworCisJLyogbmV3IGVsZW1lbnQgQSA9IGVsZW1lbnQgRCB4IFggKi8KKwlpZiAoKElxa1Jlc3VsdF9YICE9IDApICYmICgqKHBETV9PZG0tPnBCYW5kVHlwZSkgPT0gT0RNX0JBTkRfMl80RykpIHsKKwkJaWYgKChJcWtSZXN1bHRfWCAmIDB4MDAwMDAyMDApICE9IDApCS8qIGNvbnNpZGVyIG1pbnVzICovCisJCQlJcWtSZXN1bHRfWCA9IElxa1Jlc3VsdF9YIHwgMHhGRkZGRkMwMDsKKwkJZWxlX0EgPSAoKElxa1Jlc3VsdF9YICogZWxlX0QpPj44KSYweDAwMDAwM0ZGOworCisJCS8qIG5ldyBlbGVtZW50IEMgPSBlbGVtZW50IEQgeCBZICovCisJCWlmICgoSXFrUmVzdWx0X1kgJiAweDAwMDAwMjAwKSAhPSAwKQorCQkJSXFrU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WNlbnNlIGZvcgorICogbW9yZSBkZXRhaWxzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaWZuZGVmIF9fTVBfUFJFQ09NUF9IX18KKyNkZWZpbmUgX19NUF9QUkVDT01QX0hfXworCisjaW5jbHVkZSA8ZHJ2X3R5cGVzLmg+CisjaW5jbHVkZSA8aGFsX2RhdGEuaD4KKworI2RlZmluZSBCVF9UTVBfQlVGX1NJWkUJMTAwCisKKyNkZWZpbmUgRENNRF9QcmludGYJCQlEQkdfQlRfSU5GTworCisjaWZkZWYgYkVuYWJsZQorI3VuZGVmIGJFbmFibGUKKyNlbmRpZgorCisjaW5jbHVkZSAiSGFsQnRjT3V0U3JjLmgiCisjaW5jbHVkZSAiSGFsQnRjODcyM2IxQW50LmgiCisjaW5jbHVkZSAiSGFsQnRjODcyM2IyQW50LmgiCisKKyNlbmRpZiAvKiAgX19NUF9QUkVDT01QX0hfXyAqLwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvaGFsX2J0Y29leC5jIGIvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvaGFsX2J0Y29leC5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmNjN2UwOTAKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2hhbC9oYWxfYnRjb2V4LmMKQEAgLTAsMCArMSwxNzIwIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ29weXJpZ2h0KGMpIDIwMTMgUmVhbHRlayBDb3Jwb3JhdGlvbi4gQWxsIHJpZ2h0cyByZXNlcnZlZC4KKyAqCisgKiBUaGlzIHByb2dyYW0g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VnYWxDaGFubmVsKHN0cnVjdCBhZGFwdGVyICpBZGFwdGVyLCB1MzIgQ2hhbm5lbCkKK3sKKwlib29sIGJMZWdhbENoYW5uZWwgPSB0cnVlOworCisJaWYgKENoYW5uZWwgPiAxNCkgeworCQliTGVnYWxDaGFubmVsID0gZmFsc2U7CisJCURCR184NzFYKCJDaGFubmVsID4gMTQgYnV0IHdpcmVsZXNzX21vZGUgZG8gbm90IHN1cHBvcnQgNUdcbiIpOworCX0gZWxzZSBpZiAoKENoYW5uZWwgPD0gMTQpICYmIChDaGFubmVsID49IDEpKSB7CisJCWlmIChJc1N1cHBvcnRlZDI0RyhBZGFwdGVyLT5yZWdpc3RyeXByaXYud2lyZWxlc3NfbW9kZSkgPT0gZmFsc2UpIHsKKwkJCWJMZWdhbENoYW5uZWwgPSBmYWxzZTsKKwkJCURCR184NzFYKCIoQ2hhbm5lbCA8PSAxNCkgJiYgKENoYW5uZWwgPj0gMSkgYnV0IHdpcmVsZXNzX21vZGUgZG8gbm90IHN1cHBvcnQgMi40R1xuIik7CisJCX0KKwl9IGVsc2UgeworCQliTGVnYWxDaGFubmVsID0gZmFsc2U7CisJCURCR184NzFYKCJDaGFubmVsIGlzIEludmFsaWQgISEhXG4iKTsKKwl9CisKKwlyZXR1cm4gYkxlZ2FsQ2hhbm5lbDsKK30KKwordTggTVJhdGVUb0h3UmF0ZSh1OCByYXRlKQoreworCXU4IHJldCA9IERFU0NfUkFURTFNOworCisJc3dpdGNoIChyYXRlKSB7CisJY2FzZSBNR05fMU06CisJCXJldCA9IERFU0NfUkFURTFNOworCQlicmVhazsKKwljYXNlIE1HTl8yTToKKwkJcmV0ID0gREVTQ19SQVRFMk07CisJCWJyZWFrOworCWNhc2UgTUdOXzVfNU06CisJCXJldCA9IERFU0NfUkFURTVfNU07CisJCWJyZWFrOworCWNhc2UgTUdOXzExTToKKwkJcmV0ID0gREVTQ19SQVRFMTFNOworCQlicmVhazsKKwljYXNlIE1HTl82TToKKwkJcmV0ID0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BjaGFyICpPdXQsIGNoYXIgTGVmdFF1YWxpZmllciwgY2hhciBSaWdodFF1YWxpZmllcgorKQoreworCXUzMiBpID0gMCwgaiA9IDA7CisJY2hhciBjID0gSW5bKCpTdGFydCkrK107CisKKwlpZiAoYyAhPSBMZWZ0UXVhbGlmaWVyKQorCQlyZXR1cm4gZmFsc2U7CisKKwlpID0gKCpTdGFydCk7CisJd2hpbGUgKChjID0gSW5bKCpTdGFydCkrK10pICE9IFJpZ2h0UXVhbGlmaWVyKQorCQk7IC8qICBmaW5kICddJyAqLworCWogPSAoKlN0YXJ0KSAtIDI7CisJc3RybmNweSgoY2hhciAqKU91dCwgKGNvbnN0IGNoYXIgKikoSW4raSksIGotaSsxKTsKKworCXJldHVybiB0cnVlOworfQorCitib29sIGlzQWxsU3BhY2VPclRhYih1OCAqZGF0YSwgdTggc2l6ZSkKK3sKKwl1OCBjbnQgPSAwLCBOdW1PZlNwYWNlQW5kVGFiID0gMDsKKworCXdoaWxlIChzaXplID4gY250KSB7CisJCWlmIChkYXRhW2NudF0gPT0gJyAnIHx8IGRhdGFbY250XSA9PSAnXHQnIHx8IGRhdGFbY250XSA9PSAnXDAnKQorCQkJKytOdW1PZlNwYWNlQW5kVGFiOworCisJCSsrY250OworCX0KKworCXJldHVybiBzaXplID09IE51bU9mU3BhY2VBbmRUYWI7Cit9CisKKwordm9pZCBydHdfaGFsX2NoZWNrX3J4Zmlmb19mdWxsKHN0cnVjdCBhZGFwdGVyICphZGFwdGVyKQoreworCXN0cnVjdCBkdm9ial9wcml2ICpwc2Rwcml2ID0gYWRhcHRlci0+ZHZvYmo7CisJc3RydWN0IGRlYnVnX3ByaXYgKnBkYmdwcml2ID0gJnBzZHByaXYtPmRydl9kYmc7CisJaW50IHNhdmVfY250ID0gZmFsc2U7CisKKwkvKiBzd2l0Y2ggY291bnRlciB0byBSWCBmaWZvICovCisJLyogcHJpbnRrKCI4NzIzYiBvciA4MTkyZSAsIE1BQ182Njcgc2V0IDB4ZjBc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XRoLCBSYXRlLCBwRE1fT2RtLT5SZW1uYW50X09GRE1Td2luZ0lkeFtSRlBhdGhdKTsgKi8KKworCX0KKworCXJldHVybiBvZmZzZXQ7Cit9CisKK3U4IFBIWV9HZXRSYXRlSW5kZXhPZlR4UG93ZXJCeVJhdGUodTggUmF0ZSkKK3sKKwl1OCBpbmRleCA9IDA7CisJc3dpdGNoIChSYXRlKSB7CisJY2FzZSBNR05fMU06CisJCWluZGV4ID0gMDsKKwkJYnJlYWs7CisJY2FzZSBNR05fMk06CisJCWluZGV4ID0gMTsKKwkJYnJlYWs7CisJY2FzZSBNR05fNV81TToKKwkJaW5kZXggPSAyOworCQlicmVhazsKKwljYXNlIE1HTl8xMU06CisJCWluZGV4ID0gMzsKKwkJYnJlYWs7CisJY2FzZSBNR05fNk06CisJCWluZGV4ID0gNDsKKwkJYnJlYWs7CisJY2FzZSBNR05fOU06CisJCWluZGV4ID0gNTsKKwkJYnJlYWs7CisJY2FzZSBNR05fMTJNOgorCQlpbmRleCA9IDY7CisJCWJyZWFrOworCWNhc2UgTUdOXzE4TToKKwkJaW5kZXggPSA3OworCQlicmVhazsKKwljYXNlIE1HTl8yNE06CisJCWluZGV4ID0gODsKKwkJYnJlYWs7CisJY2FzZSBNR05fMzZNOgorCQlpbmRleCA9IDk7CisJCWJyZWFrOworCWNhc2UgTUdOXzQ4TToKKwkJaW5kZXggPSAxMDsKKwkJYnJlYWs7CisJY2FzZSBNR05fNTRNOgorCQlpbmRleCA9IDExOworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MwOgorCQlpbmRleCA9IDEyOworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MxOgorCQlpbmRleCA9IDEzOworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MyOgorCQlpbmRleCA9IDE0OworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MzOgorCQlpbmRleCA9IDE1OworCQlicmVhazsKKwljYXNlIE1HTl9NQ1M0OgorCQlpbmRleCA9IDE2OworCQlicmVhazsKKwljYXNlIE1HTl9NQ1M1OgorCQlpbmRleCA9IDE3OworCQlicmVhazsKKwljYXNlIE1HTl9NQ1M2OgorCQlpbmRleCA9IDE4OworCQlicmVhazsKKwljYXNlIE1HTl9NQ1M3OgorCQlpbmRleCA9IDE5OworCQlicmVhazsKKwljYXNlIE1HTl9NQ1M4OgorCQlpbmRleCA9IDIwOworCQlicmVhazsKKwljYXNlIE1HTl9NQ1M5OgorCQlpbmRleCA9IDIxOworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MxMDoKKwkJaW5kZXggPSAyMjsKKwkJYnJlYWs7CisJY2FzZSBNR05fTUNTMTE6CisJCWluZGV4ID0gMjM7CisJCWJyZWFrOworCWNhc2UgTUdOX01DUzEyOgorCQlpbmRleCA9IDI0OworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MxMzoKKwkJaW5kZXggPSAyNTsKKwkJYnJlYWs7CisJY2FzZSBNR05fTUNTMTQ6CisJCWluZGV4ID0gMjY7CisJCWJyZWFrOworCWNhc2UgTUdOX01DUzE1OgorCQlpbmRleCA9IDI3OworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MxNjoKKwkJaW5kZXggPSAyODsKKwkJYnJlYWs7CisJY2FzZSBNR05fTUNTMTc6CisJCWluZGV4ID0gMjk7CisJCWJyZWFrOworCWNhc2UgTUdOX01DUzE4OgorCQlpbmRleCA9IDMwOworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MxOToKKwkJaW5kZXggPSAzMTsKKwkJYnJlYWs7CisJY2FzZSBNR05fTUNTMjA6CisJCWluZGV4ID0gMzI7CisJCWJyZWFrOworCWNhc2UgTUdOX01DUzIxOgorCQlpbmRleCA9IDMzOworCQlicmVhazsKKwljYXNlIE1HTl9NQ1MyMjoKKwkJaW5kZXggPSAzNDsKKwkJYnJlYWs7CisJY2FzZSBNR05fTUNTMjM6CisJCWluZGV4ID0gMzU7CisJCWJyZWFrOworCWNhc2UgTUdOX01DUzI0OgorCQlpbmRleCA9I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AweDAzfSwgLyogIDQsIC0yLjBkQiAqLworCXsweDI4LCAweDI4LCAweDIyLCAweDFjLCAweDE1LCAweDBkLCAweDA3LCAweDAzfSwgLyogIDUsIC0yLjVkQiAqLworCXsweDI2LCAweDI1LCAweDIxLCAweDFiLCAweDE0LCAweDBkLCAweDA2LCAweDAzfSwgLyogIDYsIC0zLjBkQiAqLworCXsweDI0LCAweDIzLCAweDFmLCAweDE5LCAweDEzLCAweDBjLCAweDA2LCAweDAzfSwgLyogIDcsIC0zLjVkQiAqLworCXsweDIyLCAweDIxLCAweDFkLCAweDE4LCAweDExLCAweDBiLCAweDA2LCAweDAyfSwgLyogIDgsIC00LjBkQiAqLworCXsweDIwLCAweDIwLCAweDFiLCAweDE2LCAweDExLCAweDA4LCAweDA1LCAweDAyfSwgLyogIDksIC00LjVkQiAqLworCXsweDFmLCAweDFlLCAweDFhLCAweDE1LCAweDEwLCAweDBhLCAweDA1LCAweDAyfSwgLyogIDEwLCAtNS4wZEIgKi8KKwl7MHgxZCwgMHgxYywgMHgxOCwgMHgxNCwgMHgwZiwgMHgwYSwgMHgwNSwgMHgwMn0sIC8qICAxMSwgLTUuNWRCICovCisJezB4MWIsIDB4MWEsIDB4MTcsIDB4MTMsIDB4MGUsIDB4MDksIDB4MDQsIDB4MDJ9LCAvKiAgMTIsIC02LjBkQiA8PT0gZGVmYXVsdCAqLworCXsweDFhLCAweDE5LCAweDE2LCAweDEyLCAweDBkLCAweDA5LCAweDA0LCAweDAyfSwgLyogIDEzLCAtNi41ZEIgKi8KKwl7MHgxOCwgMHgxNywgMHgxNSwgMHgxMSwgMHgwYywgMHgwOCwgMHgwNCwgMHgwMn0sIC8qICAxNCwgLTcuMGRCICovCisJezB4MTcsIDB4MTYsIDB4MTMsIDB4MTAsIDB4MGMsIDB4MDgsIDB4MDQsIDB4MDJ9LCAvKiAgMTUsIC03LjVkQiAqLworCXsweDE2LCAweDE1LCAweDEyLCAweDBmLCAweDBiLCAweDA3LCAweDA0LCAweD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HBETV9PZG0sCisJdTMyIE9GRE1fQW50MV9DbnQsCisJdTMyIE9GRE1fQW50Ml9DbnQsCisJdTMyIENDS19BbnQxX0NudCwKKwl1MzIgQ0NLX0FudDJfQ250LAorCXU4ICpwRGVmQW50CispOworCit2b2lkIG9kbV9TZXRSeElkbGVBbnQoUERNX09ETV9UIHBETV9PZG0sIHU4IEFudCwgYm9vbCBiRHVhbFBhdGgpOworCisKKwordm9pZCBvZG1fSHdBbnREaXYoUERNX09ETV9UIHBETV9PZG0pOworCisKKy8qICAqLworLyogMyBFeHBvcnQgSW50ZXJmYWNlICovCisvKiAgKi8KKworLyogICovCisvKiAgMjAxMS8wOS8yMSBNSCBBZGQgdG8gZGVzY3JpYmUgZGlmZmVyZW50IHRlYW0gbmVjZXNzYXJ5IHJlc291cmNlIGFsbG9jYXRlPz8gKi8KKy8qICAqLwordm9pZCBPRE1fRE1Jbml0KFBETV9PRE1fVCBwRE1fT2RtKQoreworCisJb2RtX0NvbW1vbkluZm9TZWxmSW5pdChwRE1fT2RtKTsKKwlvZG1fQ21uSW5mb0luaXRfRGVidWcocERNX09kbSk7CisJb2RtX0RJR0luaXQocERNX09kbSk7CisJb2RtX05ITUNvdW50ZXJTdGF0aXN0aWNzSW5pdChwRE1fT2RtKTsKKwlvZG1fQWRhcHRpdml0eUluaXQocERNX09kbSk7CisJb2RtX1JhdGVBZGFwdGl2ZU1hc2tJbml0KHBETV9PZG0pOworCU9ETV9DZm9UcmFja2luZ0luaXQocERNX09kbSk7CisJT0RNX0VkY2FUdXJib0luaXQocERNX09kbSk7CisJb2RtX1JTU0lNb25pdG9ySW5pdChwRE1fT2RtKTsKKwlvZG1fVFhQb3dlclRyYWNraW5nSW5pdChwRE1fT2RtKTsKKworCU9ETV9DbGVhclR4UG93ZXJUcmFja2luZ1N0YXRlKHBETV9PZG0pOworCisJaWYgKCoocERNX09kbS0+bXBfbW9kZSkgIT0gMSkKKwkJb2RtX1BhdGhEaXZlcnNpdHlJbml0KHBETV9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BPRE1fQ09NUF9DT01NT04sIE9ETV9EQkdfTE9VRCwgKCJSeFJhdGUgPSAweCV4LCBSU1NJX0EgPSAlZCwgUlNTSV9CID0gJWRcbiIsCisJCXBETV9PZG0tPlJ4UmF0ZSwgcERNX09kbS0+UlNTSV9BLCBwRE1fT2RtLT5SU1NJX0IpKTsKK30KKworLyogMyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qIDMgRElHICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICogRnVuY3Rpb246CW9kbV9ESUdJbml0KCkKKyAqCisgKiBPdmVydmlldzoJU2V0IERJRyBzY2hlbWUgaW5pdCB2YWx1ZS4KKyAqCisgKiBJbnB1dDoJCU5PTkUKKyAqCisgKiBPdXRwdXQ6CQlOT05FCisgKgorICogUmV0dXJuOgkJTk9ORQorICoKKyAqIFJldmlzZWQgSGlzdG9yeToKKyAqV2hlbgkJV2hvCQlSZW1hcmsKKyAqCisgKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICovCisKKy8qIFJlbW92ZSBESUcgYnkgeXVjaGVuICovCisKKy8qIFJlbW92ZSBESUcgYW5kIEZBIGNoZWNrIGJ5IFl1IENoZW4gKi8KKworCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBCQiBQb3dlciBTYXZlICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisvKiBSZW1vdmUgQkIgcG93ZXIgc2F2aW5nIGJ5IFl1Y2hlbiAqLworCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBSQVRSIE1BU0sgKi8KKy8qIDMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBSYXRlIEFkYXB0aXZlICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCit2b2lkIG9kbV9SYXRlQWRhcHRpdmVNYXNrSW5pdChQRE1fT0RNX1QgcERNX09kbSkKK3sKKwlQT0RNX1JBVEVfQURBUFRJVkUgcE9kbVJBID0gJnBETV9PZG0tPlJhdGVBZGFwdGl2ZTsKKworCXBPZG1SQS0+VHlwZSA9IERNX1R5cGVfQnlEcml2ZXI7CisJaWYgKHBPZG1SQS0+VHlwZSA9PSBETV9UeXBlX0J5RHJpdmVyKQorCQlwRE1fT2RtLT5iVXNlUkFNYXNrID0gdHJ1ZTsKKwllbHNlCisJCXBETV9PZG0tPmJVc2VSQU1hc2sgPSBmYWxzZTsKKworCXBPZG1SQS0+UkFUUlN0YXRlID0gRE1fUkFUUl9TVEFfSU5JVDsKKwlwT2RtUkEtPkxkcGNUaHJlcyA9IDM1OworCXBPZG1SQS0+YlVzZUxkcGMgPSBmYWxzZTsKKwlwT2RtUkEtPkhpZ2hSU1NJVGhyZXNoID0gNTA7CisJcE9kbVJBLT5Mb3dSU1NJVGhyZXNoID0gMjA7Cit9CisKK3UzMiBPRE1fR2V0X1JhdGVfQml0bWFwKAorCVBETV9PRE1fVCBwRE1fT2RtLAorCXUzMiBtYWNpZCwKKwl1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udHJ5TWluUFdEQjsKKwllbHNlCisJCXBkbXByaXYtPkVudHJ5TWluVW5kZWNvcmF0ZWRTbW9vdGhlZFBXREIgPSAwOworCisJRmluZE1pbmltdW1SU1NJKEFkYXB0ZXIpOy8qIGdldCBwZG1wcml2LT5NaW5VbmRlY29yYXRlZFBXREJGb3JETSAqLworCisJcERNX09kbS0+UlNTSV9NaW4gPSBwZG1wcml2LT5NaW5VbmRlY29yYXRlZFBXREJGb3JETTsKKwkvKiBPRE1fQ21uSW5mb1VwZGF0ZSgmcEhhbERhdGEtPm9kbXByaXYgLCBPRE1fQ01OSU5GT19SU1NJX01JTiwgcGRtcHJpdi0+TWluVW5kZWNvcmF0ZWRQV0RCRm9yRE0pOyAqLworfQorCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBUeCBQb3dlciBUcmFja2luZyAqLworLyogMyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKwordm9pZCBvZG1fVFhQb3dlclRyYWNraW5nSW5pdChQRE1fT0RNX1QgcERNX09kbSkKK3sKKwlvZG1fVFhQb3dlclRyYWNraW5nVGhlcm1hbE1ldGVySW5pdChwRE1fT2RtKTsKK30KKworc3RhdGljIHU4IGdldFN3aW5nSW5kZXgoUERNX09ETV9UIHBETV9PZG0pCit7CisJc3RydWN0IGFkYXB0ZXIgKkFkYXB0ZXIgPSBwRE1fT2RtLT5BZGFwdGVyOworCXU4IGkgPSAwOworCXUzMiBiYlN3aW5nOworCXUzMiBzd2luZ1RhYmxlU2l6ZTsKKwl1MzIgKnBTd2luZ1RhYmxlOworCisJYmJTd2luZyA9IFBIWV9RdWVyeUJCUmVnKEFkYXB0ZXIsIHJPRkRNMF9YQVR4SVFJbWJhbGFuY2UsIDB4RkZDMDAwMDApOworCisJcFN3aW5nVGFibGUgPSBPRkRNU3dpbmdUYWJsZV9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CXBETV9PZG0tPlJGQ2FsaWJyYXRlSW5mby5UTV9UcmlnZ2VyID0gMDsKKwl9Cit9CisKKy8qIDMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIFNXIEFudGVubmEgRGl2ZXJzaXR5ICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwordm9pZCBvZG1fU3dBbnREZXRlY3RJbml0KFBETV9PRE1fVCBwRE1fT2RtKQoreworCXBTV0FUX1QgcERNX1NXQVRfVGFibGUgPSAmcERNX09kbS0+RE1fU1dBVF9UYWJsZTsKKworCXBETV9TV0FUX1RhYmxlLT5TV0FTX05vTGlua19CS19SZWc5MmMgPSBydHdfcmVhZDMyKHBETV9PZG0tPkFkYXB0ZXIsIHJEUERUX2NvbnRyb2wpOworCXBETV9TV0FUX1RhYmxlLT5QcmVBbnRlbm5hID0gTUFJTl9BTlQ7CisJcERNX1NXQVRfVGFibGUtPkN1ckFudGVubmEgPSBNQUlOX0FOVDsKKwlwRE1fU1dBVF9UYWJsZS0+U1dBU19Ob0xpbmtfU3RhdGUgPSAwOworfQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvb2RtLmggYi9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2hhbC9vZG0uaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi4wYjM1NDFhCi0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9oYWwvb2RtLmgKQEAgLTAsMCArMSwxNDY1IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ29weXJpZ2h0KGMpIDIwMDcgLSAyMDExIFJlYWx0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luY2x1ZGUgIm9kbV9Ob2lzZU1vbml0b3IuaCIKKworI2RlZmluZQlUUF9NT0RFCQkwCisjZGVmaW5lCVJTU0lfTU9ERQkJMQorI2RlZmluZQlUUkFGRklDX0xPVwkwCisjZGVmaW5lCVRSQUZGSUNfSElHSAkxCisjZGVmaW5lCU5PTkUJCQkwCisKKworLyogMyBUeCBQb3dlciBUcmFja2luZyAqLworLyogMyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKyNkZWZpbmUJCURQS19ERUxUQV9NQVBQSU5HX05VTQkxMworI2RlZmluZQkJaW5kZXhfbWFwcGluZ19IUF9OVU0JMTUKKyNkZWZpbmUJT0ZETV9UQUJMRV9TSVpFCQk0MworI2RlZmluZQlDQ0tfVEFCTEVfU0laRQkJCTMzCisjZGVmaW5lIFRYU0NBTEVfVEFCTEVfU0laRQkJMzcKKyNkZWZpbmUgVFhQV1JfVFJBQ0tfVEFCTEVfU0laRQkzMAorI2RlZmluZSBERUxUQV9TV0lOR0lEWF9TSVpFICAgICAzMAorI2RlZmluZSBCQU5EX05VTQkJCQk0CisKKy8qIDMgUFNEIEhhbmRsZXIgKi8KKy8qIDMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisKKyNkZWZpbmUJQUZIX1BTRAkJMQkvKiAwOm5vcm1hbCBQU0Qgc2NhbiwgMTogb25seSBkbyAyMCBwdHMgUFNEICovCisjZGVmaW5lCU1PREVfNDBNCQkwCS8qIDA6MjBNLCAxOjQwTSAqLworI2RlZmluZQlQU0RfVEgyCQkzCisjZGVmaW5lCVBTRF9DSE1JTgkJMjAgICAvKiAgTWluaW11bSBjaGFubmVsIG51bWJlciBmb3IgQlQgQUZIICovCisjZGVmaW5lCVNJUl9TVEVQX1NJWkUJMworI2RlZmluZSAgIFNtb290aF9TaXplXzEJCTUKKyNkZWZpbmUJU21vb3RoX1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1cmU/PyAqLworCisJLyogICovCisJLyogVFhfUlRQX0NNTgkJVFhfcmV0cnBvOyAqLworCS8qIFRYX1JUUF84OEUJCVRYX3JldHJwbzsgKi8KKwkvKiBUWF9SVFBfODE5NQkJVFhfcmV0cnBvOyAqLworCisJLyogICovCisJLyogT0RNIFN0cnVjdHVyZSAqLworCS8qICAqLworCUZBVF9UIERNX0ZhdFRhYmxlOworCURJR19UIERNX0RpZ1RhYmxlOworCVBTX1QgRE1fUFNUYWJsZTsKKwlQcmlfQ0NBX1QgRE1fUHJpQ0NBOworCVJYSFBfVCBETV9SWEhQX1RhYmxlOworCVJBX1QgRE1fUkFfVGFibGU7CisJZmFsc2VfQUxBUk1fU1RBVElTVElDUyBGYWxzZUFsbUNudDsKKwlmYWxzZV9BTEFSTV9TVEFUSVNUSUNTIEZsYXNlQWxtQ250QnVkZHlBZGFwdGVyOworCVNXQVRfVCBETV9TV0FUX1RhYmxlOworCWJvb2wgUlNTSV90ZXN0OworCUNGT19UUkFDS0lORyBETV9DZm9UcmFjazsKKworCUVEQ0FfVCBETV9FRENBX1RhYmxlOworCXUzMiBXTU1FRENBX0JFOworCVBBVEhESVZfVCBETV9QYXRoRGl2OworCS8qICBDb3B5IGZyb20gU0Q0IHN0cnVjdHVyZSAqLworCS8qICAqLworCS8qICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCS8qICAqLworCisJLyogY29tbW9uICovCisJLyogdTggRE1fVHlwZTsgKi8KKwkvKiB1OCAgICBQU0RfUmVwb3J0X1JYSFBbODBdOyAgICBBZGQgQnkgR2FyeSAqLworCS8qIHU4ICAgIFBTRF9mdW5jX2ZsYWc7ICAgICAgICAgICAgICAgIEFkZCBCeSBHYXJ5ICovCisJLyogZm9yIERJRyAqLworCS8qIHU4IGJETUluaXRpYWxHYWluRW5hYmxlOyAqLworCS8qIHU4IGJpbml0aWFsaXplZDsgIGZvciBkbV9pbml0aWFsX2dhaW5fTXVsd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lZiBSRU1PVkVfUEFDSworI3ByYWdtYSBwYWNrKCkKKyNlbmRpZgorCisvKiBpbmNsdWRlICJvZG1fZnVuY3Rpb24uaCIgKi8KKworLyogMyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBESUcgKi8KKy8qIDMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworLyogUmVtb3ZlIERJRyBieSBZdWNoZW4gKi8KKworLyogMyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBBR0MgUlggSGlnaCBQb3dlciBNb2RlICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisjZGVmaW5lICAgICAgICAgIExOQV9Mb3dfR2Fpbl8xICAgICAgICAgICAgICAgICAgICAgIDB4NjQKKyNkZWZpbmUgICAgICAgICAgTE5BX0xvd19HYWluXzIgICAgICAgICAgICAgICAgICAgICAgMHg1QQorI2RlZmluZSAgICAgICAgICBMTkFfTG93X0dhaW5fMyAgICAgICAgICAgICAgICAgICAgICAweDU4CisKKyNkZWZpbmUgICAgICAgICAgRkFfUlhIUF9USDEgICAgICAgICAgICAgICAgICAgICAgICAgICA1MDAwCisjZGVmaW5lICAgICAgICAgIEZBX1JYSFBfVEgyICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUwMAorI2RlZmluZSAgICAgICAgICBGQV9SWEhQX1RIMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODAwCisjZGVmaW5lICAgICAgICAgIEZBX1JYSFBfVEg0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2MDAKKyNkZWZpbmUgICAgICAgICAgRkFfUlhIUF9USDUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUwMAorCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIEVEQ0EgKi8KKy8qIDMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworLyogMyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBEeW5hbWljIFR4IFBvd2VyICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiBEeW5hbWljIFR4IFBvd2VyIENvbnRyb2wgVGhyZXNob2xkICovCisKKy8qIDMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qIDMgUmF0ZSBBZGFwdGl2ZSAqLworLyogMyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworI2RlZmluZQkJRE1fUkFUUl9TVEFfSU5JVAkJCTAKKyNkZWZpbmUJCURNX1JBVFJfU1RBX0hJR0gJCQkxCisjZGVmaW5lCQlETV9SQVRSX1NUQV9NSURETEUJCQkyCisjZGVmaW5lCQlETV9SQVRSX1NUQV9MT1cJCQkJMworCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIEJCIFBvd2VyIFNhdmUgKi8KKy8qIDMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKwordHlwZWRlZiBlbnVtIHRhZ18xUl9DQ0FfVHlwZV9EZWZpbml0aW9uIHsKKwlDQ0FfMVIgPSAwLAorCUNDQV8yUiA9IDEsCisJQ0NBX01BWCA9IDIsCit9IERNXzFSX0NDQV9FOworCit0eXBlZGVmIGVudW0gdGFnX1JGX1R5cGVfRGVmaW5pdGlvbiB7CisJUkZfU2F2ZSA9IDAsCisJUkZfTm9ybWFsID0gMSwKKwlSRl9NQVggPSAyLAorfSBETV9SRl9FOworCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiAzIEFudGVubmEgRGl2ZXJzaXR5ICovCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCit0eXBlZGVmIGVudW0gdGFnX1NXX0FudGVubmFfU3dpdGNoX0RlZmluaXRpb24geworCUFudGVubmFfQSA9IDEsCisJQW50ZW5uYV9CID0gMiwKKwlBbnRlbm5hX01BWCA9IDMsCit9IERNX1NXQVNfRTsKKworCisvKiAgTWF4aW1hbCBudW1iZXIgb2YgYW50ZW5uYSBkZXRlY3Rpb24gbWVjaGFuaXNtIG5lZWRzIHRvIHBlcmZvcm0sIGFkZGVkIGJ5IFJvZ2VyLCAyMDExLjEyLjI4LiAqLworI2RlZmluZQlNQVhfQU5URU5OQV9ERVRFQ1RJT05fQ05UCTEwCisKKy8qICAqLworLyogIEV4dGVybiBHbG9iYWwgVmFyaWFibGVzLiAqLworLyogICovCitleHRlcm4JdTMyIE9GRE1Td2luZ1RhYmxlW09GRE1fVEFCTEVfU0laRV07CitleHRlcm4JdTggQ0NLU3dpbmdUYWJsZV9DaDFfQ2gxM1tDQ0tfVEFCTEVfU0laRV1bOF07CitleHRlcm4JdTggQ0NLU3dpbmdUYWJsZV9DaDE0W0NDS19UQUJMRV9TSVpFXVs4XTsKKworZXh0ZXJuCXUzMiBPRkRNU3dpbmdUYWJsZV9OZXdbT0ZETV9UQUJMRV9TSVpFXTsKK2V4dGVybgl1OCBDQ0tTd2luZ1RhYmxlX0NoMV9DaDEzX05ld1tDQ0tfVEFCTEVfU0laRV1bOF07CitleHRlcm4JdTggQ0NLU3dpbmdUYWJsZV9DaDE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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ29weXJpZ2h0KGMpIDIwMDcgLSAyMDExIFJlYWx0ZWsgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVzZXJ2ZWQuCisgKgorICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkgaXQKKyAqIHVuZGVyIHRoZSB0ZXJtcyBvZiB2ZXJzaW9uIDIgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzCisgKiBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbi4KKyAqCisgKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQKKyAqIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvcgorICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisgKiBtb3JlIGRldGFpbHMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKy8vIGluY2x1ZGUgZmlsZXMKKy8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKKyNpbmNsdWRlICJvZG1fcHJlY29tcC5oIgorCisvLz09PT09PT09PT09PT09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0RJRyhwRE1fT2RtLCBwRE1fRGlnVGFibGUtPkN1cklHVmFsdWUpOyAqLworfQorCisvKiAzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogMyBGQVNMRSBBTEFSTSBDSEVDSyAqLworLyogMyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKwordm9pZCBvZG1fRmFsc2VBbGFybUNvdW50ZXJTdGF0aXN0aWNzKHZvaWQgKnBETV9WT0lEKQoreworCVBETV9PRE1fVCBwRE1fT2RtID0gKFBETV9PRE1fVClwRE1fVk9JRDsKKwlQZmFsc2VfQUxBUk1fU1RBVElTVElDUyBGYWxzZUFsbUNudCA9ICYocERNX09kbS0+RmFsc2VBbG1DbnQpOworCXUzMiByZXRfdmFsdWU7CisKKwlpZiAoIShwRE1fT2RtLT5TdXBwb3J0QWJpbGl0eSAmIE9ETV9CQl9GQV9DTlQpKQorCQlyZXR1cm47CisKKwkvKiBob2xkIG9mZG0gY291bnRlciAqLworCS8qIGhvbGQgcGFnZSBDIGNvdW50ZXIgKi8KKwlQSFlfU2V0QkJSZWcocERNX09kbS0+QWRhcHRlciwgT0RNX1JFR19PRkRNX0ZBX0hPTERDXzExTiwgQklUMzEsIDEpOworCS8qIGhvbGQgcGFnZSBEIGNvdW50ZXIgKi8KKwlQSFlfU2V0QkJSZWcocERNX09kbS0+QWRhcHRlciwgT0RNX1JFR19PRkRNX0ZBX1JTVERfMTFOLCBCSVQzMSwgMSk7CisKKwlyZXRfdmFsdWUgPSBQSFlfUXVlcnlCQlJlZygKKwkJcERNX09kbS0+QWRhcHRlciwgT0RNX1JFR19PRkRNX0ZBX1RZUEUxXzExTiwgYk1hc2tEV29yZAorCSk7CisJRmFsc2VBbG1DbnQtPkNudF9GYXN0X0ZzeW5jID0gKHJldF92YWx1ZSYweGZmZmYpOworCUZhbHNlQWxtQ250LT5Db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TlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IKKyAqIG1vcmUgZGV0YWlscy4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaW5jbHVkZSAib2RtX3ByZWNvbXAuaCIKKworLyogIFRoaXMgZnVuY3Rpb24gaXMgZm9yIGluYmFuZCBub2lzZSB0ZXN0IHV0aWxpdHkgb25seSAqLworLyogIFRvIG9idGFpbiB0aGUgaW5iYW5kIG5vaXNlIGxldmVsKGRibSksIGRvIHRoZSBmb2xsb3dpbmcuICovCisvKiAgMS4gZGlzYWJsZSBESUcgYW5kIFBvd2VyIFNhdmluZyAqLworLyogIDIuIFNldCBpbml0aWFsIGdhaW4gPSAweDFhICovCisvKiAgMy4gU3RvcCB1cGRhdGluZyBpZGxlIHRpbWUgcHdlciByZXBvcnQgKGZvciBkcml2ZXIgcmVhZCkgKi8KKy8qIC0gMHg4MGNbMjVdICovCisKKyNkZWZpbmUgVmFsaWRfTWluCQkJCS0zNQorI2RlZmluZSBWYWxpZF9NYXgJCQkxMAorI2RlZmluZSBWYWxpZENudAkJCQk1CisKK3N0YXRpYyBzMTYgb2RtX0luYmFuZE5vaXNlX01vbml0b3JfTlNlcmllcygKKwlQRE1fT0RNX1QgcERNX09kbSwKKwl1OCBiUGF1c2VESUcsCisJdTggSUdJVmFsdWUsCisJdTMyIG1heF90aW1lCispCit7CisJdTMyIHRtcDRiOworCXU4IG1heF9yZl9wYXRoID0gMCwgcmZfcGF0aDsKKwl1OCByZWdfYzUwLCByZWdfYzU4LCB2YWxpZF9kb25lID0gMDsKKwlzdHJ1Y3Qgbm9pc2VfbGV2ZWwgbm9pc2VfZGF0YTsKKwl1MzIgc3RhcnQgID0gMCwgZnVuY19zdGFydCA9IDAsIGZ1bmNfZW5kID0gMDsKKworCWZ1bmNfc3RhcnQgPSBqaWZmaWVzOworCXBETV9PZG0tPm5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IHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvcgorICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisgKiBtb3JlIGRldGFpbHMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmbmRlZglfX09ETVBBVEhESVZfSF9fCisjZGVmaW5lICAgIF9fT0RNUEFUSERJVl9IX18KKwordm9pZAorb2RtX1BhdGhEaXZlcnNpdHlJbml0KAorCXZvaWQgKnBETV9WT0lECisJKTsKKwordm9pZAorb2RtX1BhdGhEaXZlcnNpdHkoCisJdm9pZCAqcERNX1ZPSUQKKwkpOworCisgI2VuZGlmCQkgLyogaWZuZGVmICBfX09ETVBBVEhESVZfSF9fICovCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2hhbC9vZG1fUlRMODcyM0IuYyBiL2RyaXZlcnMvc3RhZ2luZy9ydGw4NzIzYnMvaGFsL29kbV9SVEw4NzIzQi5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjBlNGNlMjcKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2hhbC9vZG1fUlRMODcyM0IuYwpAQCAtMCwwICsxLDQ1IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ29weXJpZ2h0KGMpIDIwMDcgLSAyMDExIFJlYWx0ZWsgQ29ycG9yYXRpb24uIEFsbCByaWdodHMgcmVzZXJ2ZWQuCisgKgorICogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcm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E1FUkNIQU5UQUJJTElUWSBvcgorICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisgKiBtb3JlIGRldGFpbHMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCisjaWZuZGVmCV9fT0RNX0lOVEVSRkFDRV9IX18KKyNkZWZpbmUgX19PRE1fSU5URVJGQUNFX0hfXworCisKKworLyogID09PT09PT09PT09IENvbnN0YW50L1N0cnVjdHVyZS9FbnVtLy4uLiBEZWZpbmUgKi8KKworLyogID09PT09PT09PT09IE1hY3JvIERlZmluZSAqLworCisjZGVmaW5lIF9yZWdfYWxsKF9uYW1lKQkJCU9ETV8jI19uYW1lCisjZGVmaW5lIF9yZWdfaWMoX25hbWUsIF9pYykJCU9ETV8jI19uYW1lIyNfaWMKKyNkZWZpbmUgX2JpdF9hbGwoX25hbWUpCQkJQklUXyMjX25hbWUKKyNkZWZpbmUgX2JpdF9pYyhfbmFtZSwgX2ljKQkJQklUXyMjX25hbWUjI19pYworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKKyNkZWZpbmUgT0RNX1JFR19ESUdfMTFOCQkweEM1MAorI2RlZmluZSBPRE1fUkVHX0RJR18xMUFDCTB4RERECisKK09ETV9SRUcoRElHLCBfcERNX09kbSkKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisjZGVmaW5lIF9yZWdfMTFOKF9uYW1lKQkJCU9ETV9SRUdfIyNfbmFtZSMjXzExTgorI2RlZmluZSBfYml0XzExTihfbmFtZSkJCQlPRE1fQklUXyMjX25hbWUjI18xMU4KKworI2RlZmluZSBfY2F0KF9uYW1lLCBfaWNfdHlwZSwgX2Z1bmMpIF9mdW5jIyNfMTFOKF9uYW1lKQorCisvKi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HVzOworfQorCitzdGF0aWMgdm9pZCBwaHlfTENLXzg3MjNCKHN0cnVjdCBhZGFwdGVyICpBZGFwdGVyKQoreworCVBIWV9TZXRSRlJlZyhBZGFwdGVyLCBSRl9QQVRIX0EsIDB4QjAsIGJSRlJlZ09mZnNldE1hc2ssIDB4REZCRTApOworCVBIWV9TZXRSRlJlZyhBZGFwdGVyLCBSRl9QQVRIX0EsIFJGX0NITkxCVywgYlJGUmVnT2Zmc2V0TWFzaywgMHg4QzAxKTsKKwltZGVsYXkoMjAwKTsKKwlQSFlfU2V0UkZSZWcoQWRhcHRlciwgUkZfUEFUSF9BLCAweEIwLCBiUkZSZWdPZmZzZXRNYXNrLCAweERGRkUwKTsKK30KKworaW50IFBIWV9SRkNvbmZpZzg3MjNCKHN0cnVjdCBhZGFwdGVyICpBZGFwdGVyKQoreworCWludCBydFN0YXR1cyA9IF9TVUNDRVNTOworCisJLyogICovCisJLyogIFJGIGNvbmZpZyAqLworCS8qICAqLworCXJ0U3RhdHVzID0gUEhZX1JGNjA1Ml9Db25maWc4NzIzQihBZGFwdGVyKTsKKworCXBoeV9MQ0tfODcyM0IoQWRhcHRlcik7CisJLyogUEhZX0JCODcyM0JfQ29uZmlnXzFUKEFkYXB0ZXIpOyAqLworCisJcmV0dXJuIHJ0U3RhdHVzOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgRGVzY3JpcHRpb246CisgKiAgICAgICBUaGUgbG93LWxldmVsIGludGVyZmFjZSB0byBzZXQgVHhBR0MgLCBjYWxsZWQgYnkgYm90aCBNUCBhbmQgTm9ybWFsIERyaXZlci4KKyAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwyMDEyMDgzMC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B2ZXJzaW9uIDIgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzCisgKiBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbi4KKyAqCisgKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bCwgYnV0IFdJVEhPVVQKKyAqIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mIE1FUkNIQU5UQUJJTElUWSBvcgorICogRklUTkVTUyBGT1IgQSBQQVJUSUNVTEFSIFBVUlBPU0UuIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yCisgKiBtb3JlIGRldGFpbHMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKgorICogTW9kdWxlOglydGw4MTkyY19yZjYwNTIuYwkoU291cmNlIEMgRmlsZSkKKyAqCisgKiBOb3RlOglQcm92aWRlIFJGIDYwNTIgc2VyaWVzIHJlbGF0aXZlIEFQSS4KKyAqCisgKiBGdW5jdGlvbjoKKyAqCisgKiBFeHBvcnQ6CisgKgorICogQWJicmV2OgorICoKKyAqIEhpc3Rvcnk6CisgKiBEYXRhCQkJV2hvCQlSZW1hcmsKKyAqCisgKiAwOS8yNS8yMDA4CU1IQwkJQ3JlYXRlIGluaXRpYWwgdmVyc2lvbi4KKyAqIDExLzA1LzIwMDgJTUhDCQlBZGQgQVBJIGZvciB0dyBwb3dlciBzZXR0aW5nLgorICoKKyAqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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5MkNQaHlSZWcuaApAQCAtMCwwICsxLDExMjYgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBDb3B5cmlnaHQoYykgMjAwNyAtIDIwMTEgUmVhbHRlayBDb3Jwb3JhdGlvbi4gQWxsIHJpZ2h0cyByZXNlcnZlZC4KKyAqCisgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdAorICogdW5kZXIgdGhlIHRlcm1zIG9mIHZlcnNpb24gMiBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMKKyAqIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLgorICoKKyAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQgV0lUSE9VVAorICogQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YgTUVSQ0hBTlRBQklMSVRZIG9yCisgKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gU2VlIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IKKyAqIG1vcmUgZGV0YWlscy4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogTW9kdWxlOglfX0lOQ19IQUw4MTkyQ1BIWVJFR19ICisgKgorICoKKyAq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jZGVmaW5lIElNUl9CQ05ET0syXzg4RQkJCUJJVDE1CQkvKiAgQmVhY29uIFF1ZXVlIERNQSBPSyBJbnRlcnJ1cCAyICovCisjZGVmaW5lIElNUl9CQ05ET0sxXzg4RQkJCUJJVDE0CQkvKiAgQmVhY29uIFF1ZXVlIERNQSBPSyBJbnRlcnJ1cCAxICovCisjZGVmaW5lIElNUl9BVElNRU5EX0VfODhFCQkJQklUMTMJCS8qICBBVElNIFdpbmRvdyBFbmQgRXh0ZW5zaW9uIGZvciBXaW43ICovCisjZGVmaW5lIElNUl9UWEVSUl84OEUJCQkJQklUMTEJCS8qICBUeCBFcnJvciBGbGFnIEludGVycnVwdCBTdGF0dXMsIHdyaXRlIDEgY2xlYXIuICovCisjZGVmaW5lIElNUl9SWEVSUl84OEUJCQkJQklUMTAJCS8qICBSeCBFcnJvciBGbGFnIElOVCBTdGF0dXMsIFdyaXRlIDEgY2xlYXIgKi8KKyNkZWZpbmUgSU1SX1RYRk9WV184OEUJCQkJQklUOQkJCS8qICBUcmFuc21pdCBGSUZPIE92ZXJmbG93ICovCisjZGVmaW5lIElNUl9SWEZPVldfODhFCQkJCUJJVDgJCQkvKiAgUmVjZWl2ZSBGSUZPIE92ZXJmbG93ICovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CitIZXJlIHRoZSByZWdpc3RlciBkZWZpbmVzIGFyZSBmb3IgOTJDLiBXaGVuIHRoZSBkZWZpbmUgaXMgYXMgc2FtZSB3aXRoIDkyQywKK3dlIHdpbGwgdXNlIHRoZSA5MkMncyBkZWZpbmUgZm9yIHRoZSBjb25zaXN0ZW5jeQorU28gdGhlIGZvbGxvd2luZyBkZWZpbmVzIGZvciA5MkMgaXMgbm90IGVudGlyZSEhISEhIQorPT09PT09PT09P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XM7CisJdWludCB0eF9mcmFnbWVudHM7CisJdWludCB0eF91bmljYXN0X29jdGV0czsKKwl1aW50IHR4X211bHRpY2FzdF9vY3RldHM7CisJdWludCB0eF9kZWZlcnJlZF90cmFuc21pc3Npb25zOworCXVpbnQgdHhfc2luZ2xlX3JldHJ5X2ZyYW1lczsKKwl1aW50IHR4X211bHRpcGxlX3JldHJ5X2ZyYW1lczsKKwl1aW50IHR4X3JldHJ5X2xpbWl0X2V4Y2VlZGVkOworCXVpbnQgdHhfZGlzY2FyZHM7CisJdWludCByeF91bmljYXN0X2ZyYW1lczsKKwl1aW50IHJ4X211bHRpY2FzdF9mcmFtZXM7CisJdWludCByeF9mcmFnbWVudHM7CisJdWludCByeF91bmljYXN0X29jdGV0czsKKwl1aW50IHJ4X211bHRpY2FzdF9vY3RldHM7CisJdWludCByeF9mY3NfZXJyb3JzOworCXVpbnQgcnhfZGlzY2FyZHNfbm9fYnVmZmVyOworCXVpbnQgdHhfZGlzY2FyZHNfd3Jvbmdfc2E7CisJdWludCByeF9kaXNjYXJkc191bmRlY3J5cHRhYmxlOworCXVpbnQgcnhfbWVzc2FnZV9pbl9tc2dfZnJhZ21lbnRzOworCXVpbnQgcnhfbWVzc2FnZV9pbl9iYWRfbXNnX2ZyYWdtZW50czsKK307CisKK3N0cnVjdCBpZWVlODAyMTFfc29mdG1hY19zdGF0cyB7CisJdWludCByeF9hc3Nfb2s7CisJdWludCByeF9hc3NfZXJyOworCXVpbnQgcnhfcHJvYmVfcnE7CisJdWludCB0eF9wcm9iZV9yczsKKwl1aW50IHR4X2JlYWNvbnM7CisJdWludCByeF9hdXRoX3JxOworCXVpbnQgcnhfYXV0aF9yc19vazsKKwl1aW50IHJ4X2F1dGhfcnNfZXJyOworCXVpbnQgdHhfYXV0aF9ycTsKKwl1aW50IG5vX2F1dGhfcnM7CisJdWludCBub19hc3NfcnM7CisJdWludCB0eF9hc3NfcnE7CisJdWludCByeF9hc3NfcnE7CisJdWludCB0eF9wcm9iZ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HZvaWQgKnBhcmczLCB2b2lkICpwYXJnNCkKK3sKKwlpbnQgcmV0ID0gdHJ1ZTsKKworCXJldHVybiByZXQ7CisKK30KKworI2RlZmluZSBfUk5EKHN6LCByKSAoKCgoc3opKygociktMSkpLyhyKSkqKHIpKQorI2RlZmluZSBSTkQ0KHgpCSgoKHggPj4gMikgKyAoKCh4ICYgMykgPT0gMCkgPyAgMDogMSkpIDw8IDIpCisKK19faW5saW5lIHN0YXRpYyB1MzIgX1JORDQodTMyIHN6KQoreworCisJdTMyIHZhbDsKKworCXZhbCA9ICgoc3ogPj4gMikgKyAoKHN6ICYgMykgPyAxOiAwKSkgPDwgMjsKKworCXJldHVybiB2YWw7CisKK30KKworX19pbmxpbmUgc3RhdGljIHUzMiBfUk5EOCh1MzIgc3opCit7CisKKwl1MzIgdmFsOworCisJdmFsID0gKChzeiA+PiAzKSArICgoc3ogJiA3KSA/IDE6IDApKSA8PCAzOworCisJcmV0dXJuIHZhbDsKKworfQorCisjaWZuZGVmIE1BQ19GTVQKKyNkZWZpbmUgTUFDX0ZNVCAiJTAyeDolMDJ4OiUwMng6JTAyeDolMDJ4OiUwMngiCisjZW5kaWYKKyNpZm5kZWYgTUFDX0FSRworI2RlZmluZSBNQUNfQVJHKHgpICgodTggKikoeCkpWzBdLCAoKHU4ICopKHgpKVsxXSwgKCh1OCAqKSh4KSlbMl0sICgodTggKikoeCkpWzNdLCAoKHU4ICopKHgpKVs0XSwgKCh1OCAqKSh4KSlbNV0KKyNlbmRpZgorCisKKyNpZmRlZiBDT05GSUdfQVBfV09XTEFOCitleHRlcm4gdm9pZCBydHdfc29mdGFwX2xvY2tfc3VzcGVuZCh2b2lkKTsKK2V4dGVybiB2b2lkIHJ0d19zb2Z0YXBfdW5sb2NrX3N1c3BlbmQodm9pZCk7CisjZW5kaWYKKworLyogRmlsZSBvcGVyYXRpb24gQVBJcywganVzdCBmb3IgbGludXggbm93ICovCitleHRlcm4gaW50IHJ0d19pc19maWxlX3JlYWRhY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FsIFB1YmxpYyBMaWNlbnNlIGZvcgorICogbW9yZSBkZXRhaWxzLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2lmbmRlZiBfX1JUTDg3MjNCX1NQRUNfSF9fCisjZGVmaW5lIF9fUlRMODcyM0JfU1BFQ19IX18KKworI2luY2x1ZGUgPGF1dG9jb25mLmg+CisKKworI2RlZmluZSBIQUxfTkFWX1VQUEVSX1VOSVRfODcyM0IJCTEyOAkJLyogIG1pY3JvLXNlY29uZCAqLworCisvKiAgKi8KKy8qICAqLworLyogCTB4MDAwMGggfiAweDAwRkZoCVN5c3RlbSBDb25maWd1cmF0aW9uICovCisvKiAgKi8KKy8qICAqLworI2RlZmluZSBSRUdfUlNWX0NUUkxfODcyM0IJCQkJMHgwMDFDCS8qICAzIEJ5dGUgKi8KKyNkZWZpbmUgUkVHX0JUX1dJRklfQU5URU5OQV9TV0lUQ0hfODcyM0IJMHgwMDM4CisjZGVmaW5lIFJFR19IU0lTUl84NzIzQgkJCQkJMHgwMDVjCisjZGVmaW5lIFJFR19QQURfQ1RSTDFfODcyM0IJCTB4MDA2NAorI2RlZmluZSBSRUdfQUZFX0NUUkxfNF84NzIzQgkJMHgwMDc4CisjZGVmaW5lIFJFR19ITUVCT1hfREJHXzBfODcyM0IJMHgwMDg4CisjZGVmaW5lIFJFR19ITUVCT1hfREJHXzFfODcyM0IJMHgwMDhBCisjZGVmaW5lIFJFR19ITUVCT1hfREJHXzJfODcyM0IJMHgwMDhDCisjZGVmaW5lIFJFR19ITUVCT1hfREJHXzNfODcyM0IJMHgwMDhFCisjZGVmaW5lIFJFR19ISU1SMF84NzIzQgkJCQkJMHgwMEIwCisjZGVmaW5lIFJFR19ISVNSMF84NzIzQgkJCQkJMHgwMEI0CisjZGVmaW5lIFJFR19ISU1SMV84NzIzQgkJCQkJMHgwMEI4CisjZGVmaW5lIFJFR19ISVNSMV84NzIzQgkJCQkJMHgwMEJDCisjZGVmaW5lIFJFR19QTUNfREJHX0NUUkwyXzg3MjNCCQkJMHgwMENDCisKKy8qICAqLworLyogICovCisvKiAJMHgwMTAwaCB+IDB4MDFGRmgJTUFDVE9QIEdlbmVyYWwgQ29uZmlndXJhdGlvbiAqLworLyogICovCisvKiAgKi8KKyNkZWZpbmUgUkVHX0MySEVWVF9DTURfSURfODcyM0IJMHgwMUEwCisjZGVmaW5lIFJFR19DMkhFVlRfQ01EX0xFTl84NzIzQgkweDAxQUUKKyNkZWZpbmUgUkVHX1dPV0xBTl9XQUtFX1JFQVNPTiAweDAxQzcKKyNkZWZpbmUgUkVHX1dPV0xBTl9HVEtfREJHMQkweDYzMAorI2RlZmluZSBSRUdfV09XTEFOX0dUS19EQkcyCTB4NjM0CisKKyNkZWZpbmUgUkVHX0hNRUJPWF9FWFQwXzg3MjNCCQkJMHgwMUYwCisjZGVmaW5lIFJFR19ITUVCT1hfRVhUMV84NzIzQgkJCTB4MDFGNAorI2RlZmluZSBSRUdfSE1FQk9YX0VYVDJfODcyM0IJCQkweDAxRjgKKyNkZWZpbmUgUkVHX0hNRUJPWF9FWFQzXzg3MjNCCQkJMHgwMUZDCisKKy8qICAqLworLyogICovCisvKiAJMHgwMjAwaCB+IDB4MDI3RmgJVFhETUEgQ29uZmlndXJhdGlvbiAqLworLyogICovCisvKiAgKi8KKworLyogICovCisvKiAgKi8KKy8qIAkweDAyODBoIH4gMHgwMkZGaAlSWERNQSBDb25maWd1cmF0aW9uICovCisvKiAgKi8KKy8qICAqLworI2RlZmluZSBSRUdfUlhETUFfQ09OVFJPTF84NzIzQgkJMHgwMjg2IC8qICBDb250cm9sIHRoZSBSWCBETUEuICovCisjZGVmaW5lIFJFR19SWERNQV9NT0RFX0NUUkxfODcyM0IJCTB4MDI5MAorCisvKiAgKi8KKy8qICAqLworLyogCTB4MDMwMGggfiAweDAzRkZoCVBDSWUgKi8KKy8qICAqLworLyogICovCisjZGVma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0xBTgorI2RlZmluZSBSRUdfVFhQS1RCVUZfSVZfTE9XICAgICAgICAgICAgIDB4MDQ4NAorI2RlZmluZSBSRUdfVFhQS1RCVUZfSVZfSElHSCAgICAgICAgICAgIDB4MDQ4OAorI2VuZGlmCisjZGVmaW5lIFJFR19BTVBEVV9CVVJTVF9NT0RFXzg3MjNCCTB4MDRCQworCisvKiAgKi8KKy8qICAqLworLyogCTB4MDUwMGggfiAweDA1RkZoCUVEQ0EgQ29uZmlndXJhdGlvbiAqLworLyogICovCisvKiAgKi8KKyNkZWZpbmUgUkVHX1NFQ09OREFSWV9DQ0FfQ1RSTF84NzIzQgkweDA1NzcKKworLyogICovCisvKiAgKi8KKy8qIAkweDA2MDBoIH4gMHgwN0ZGaAlXTUFDIENvbmZpZ3VyYXRpb24gKi8KKy8qICAqLworLyogICovCisKKworLyogICovCisvKiAgU0RJTyBCdXMgU3BlY2lmaWNhdGlvbiAqLworLyogICovCisKKy8qICAqLworLyogIFNESU8gQ01EIEFkZHJlc3MgTWFwcGluZyAqLworLyogICovCisKKy8qICAqLworLyogIEkvTyBidXMgZG9tYWluIChIb3N0KSAqLworLyogICovCisKKy8qICAqLworLyogIFNESU8gcmVnaXN0ZXIgKi8KKy8qICAqLworI2RlZmluZSBTRElPX1JFR19IQ1BXTTFfODcyM0IJMHgwMjUgLyogIEhDSSBDdXJyZW50IFBvd2VyIE1vZGUgMSAqLworCisKKy8qICAqLworLyogCTg3MjMgUmVnc2l0ZXIgQml0IGFuZCBDb250ZW50IGRlZmluaXRpb24gKi8KKy8qICAqLworCisvKiAyIEhTSVNSICovCisvKiAgaW50ZXJydXB0IG1hc2sgd2hpY2ggbmVlZHMgdG8gY2xlYXIgKi8KKyNkZWZpbmUgTUFTS19IU0lTUl9DTEVBUgkJKEhTSVNSX0dQSU8xMl8wX0lOVCB8XAorCQkJCQkJCQlIU0lTUl9TUFNfT0NQX0lOVCB8XAorCQkJCQkJCQlIU0lTUl9ST05fSU5UIHxcCisJCQkJCQkJCUhTSVNSX1BETklOVCB8XAorCQkJCQkJCQlIU0lTUl9HUElPOV9JTlQpCisKKy8qICAqLworLyogICovCisvKiAJMHgwMTAwaCB+IDB4MDFGRmgJTUFDVE9QIEdlbmVyYWwgQ29uZmlndXJhdGlvbiAqLworLyogICovCisvKiAgKi8KKworCisvKiAgKi8KKy8qICAqLworLyogCTB4MDIwMGggfiAweDAyN0ZoCVRYRE1BIENvbmZpZ3VyYXRpb24gKi8KKy8qICAqLworLyogICovCisKKy8qICAqLworLyogICovCisvKiAJMHgwMjgwaCB+IDB4MDJGRmgJUlhETUEgQ29uZmlndXJhdGlvbiAqLworLyogICovCisvKiAgKi8KKyNkZWZpbmUgQklUX1VTQl9SWERNQV9BR0dfRU4JQklUKDMxKQorI2RlZmluZSBSWERNQV9BR0dfTU9ERV9FTgkJQklUKDEpCisKKyNpZmRlZiBDT05GSUdfV09XTEFOCisjZGVmaW5lIFJYUEtUX1JFTEVBU0VfUE9MTAkJQklUKDE2KQorI2RlZmluZSBSWERNQV9JRExFCQkJCUJJVCgxNykKKyNkZWZpbmUgUldfUkVMRUFTRV9FTgkJCUJJVCgxOCkKKyNlbmRpZgorCisvKiAgKi8KKy8qICAqLworLyogCTB4MDQwMGggfiAweDA0N0ZoCVByb3RvY29sIENvbmZpZ3VyYXRpb24gKi8KKy8qICAqLworLyogICovCisKKy8qICAqLworLyogICAgICAgIDg3MjNCIFJFR19DQ0tfQ0hFQ0sJCQkJCQkob2Zmc2V0IDB4NDU0KSAqLworLyogICovCisjZGVmaW5lIEJJVF9CQ05fUE9SVF9TRUwJCUJJVDUKKworLyogICovCisvKiAgKi8KKy8qIAkweDA1MDBoIH4gMHgwNUZGaAlFRENBIENvbmZpZ3VyYXRpb24gKi8KKy8qICAqLworLyogICovCisKKy8qICAqLworLyogICovCisvKiAJMHgwNjAwaCB+IDB4MDdGRmgJV01BQyBDb25maWd1cmF0aW9uICovCisvKiAgKi8KKy8qICAqLworI2RlZmluZSBFRVBST01fUkZ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aG06IHdlcDQwLCB3ZXAxMDQsIHRraXAgJiBhZXMKK2IuIGtleXR5cGU6IGdycCBrZXkvdW5pY2FzdCBrZXkKK2MuIGtleSBjb250ZW50cworCit3aGVuIHNoYXJlZCBrZXkgPT0+IGtleWlkIGlzIHRoZSBjYW1pZAord2hlbiA4MDIuMXggPT0+IGtleWlkIFswOjFdID09PiBncnAga2V5Cit3aGVuIDgwMi4xeCA9PT4ga2V5aWQgPiAyID09PiB1bmljYXN0IGtleQorCisqLworc3RydWN0IHNldGtleV9wYXJtIHsKKwl1OCBhbGdvcml0aG07CS8qICBlbmNyeXB0aW9uIGFsZ29yaXRobSwgY291bGQgYmUgbm9uZSwgd2VwNDAsIFRLSVAsIENDTVAsIHdlcDEwNCAqLworCXU4IGtleWlkOworCXU4IGdycGtleTsJCS8qICAxOiB0aGlzIGlzIHRoZSBncnBrZXkgZm9yIDgwMi4xeC4gMDogdGhpcyBpcyB0aGUgdW5pY2FzdCBrZXkgZm9yIDgwMi4xeCAqLworCXU4IHNldF90eDsJCS8qICAxOiBtYWluIHR4IGtleSBmb3Igd2VwLiAwOiBvdGhlciBrZXkuICovCisJdTgga2V5WzE2XTsJLyogIHRoaXMgY291bGQgYmUgNDAgb3IgMTA0ICovCit9OworCisvKgorV2hlbiBpbiBBUCBvciBBZC1Ib2MgbW9kZSwgdGhpcyBpcyB1c2VkIHRvCithbGxvY2F0ZSBhbiBzdy9odyBlbnRyeSBmb3IgYSBuZXdseSBhc3NvY2lhdGVkIHN0YS4KKworQ29tbWFuZAorCit3aGVuIHNoYXJlZCBrZXkgPT0+IGFsZ29yaXRobS9rZXlpZAorCisqLworc3RydWN0IHNldF9zdGFrZXlfcGFybSB7CisJdTggYWRkcltFVEhfQUxFTl07CisJdTggYWxnb3JpdGhtOworCXU4IGtleWlkOworCXU4IGtleVsxNl07Cit9OworCitzdHJ1Y3Qgc2V0X3N0YWtleV9yc3AgeworCXU4IGFkZHJbRVRIX0FMRU5dOworCXU4IGtleWlkOwor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xMk1fUkFURV8JNgorI2RlZmluZQkJXzE4TV9SQVRFXwk3CisjZGVmaW5lCQlfMjRNX1JBVEVfCTgKKyNkZWZpbmUJCV8zNk1fUkFURV8JOQorI2RlZmluZQkJXzQ4TV9SQVRFXwkxMAorI2RlZmluZQkJXzU0TV9SQVRFXwkxMQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKK01DUyByYXRlIGRlZmluaXRpb25zCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIE1DU19SQVRFXzFSCSgweDAwMDAwMGZmKQorI2RlZmluZSBNQ1NfUkFURV8yUgkoMHgwMDAwZmZmZikKKyNkZWZpbmUgTUNTX1JBVEVfM1IJKDB4MDBmZmZmZmYpCisjZGVmaW5lIE1DU19SQVRFXzRSCSgweGZmZmZmZmZmKQorI2RlZmluZSBNQ1NfUkFURV8yUl8xM1RPMTVfT0ZGCSgweDAwMDAxZmZmKQorCisKK2V4dGVybiB1bnNpZ25lZCBjaGFyIFJUV19XUEFfT1VJW107CitleHRlcm4gdW5zaWduZWQgY2hhciBXTU1fT1VJW107CitleHRlcm4gdW5zaWduZWQgY2hhciBXUFNfT1VJW107CitleHRlcm4gdW5zaWduZWQgY2hhciBXRkRfT1VJW107CitleHRlcm4gdW5zaWduZWQgY2hhciBQMlBfT1VJW107CisKK2V4dGVybiB1bnNpZ25lZCBjaGFyIFdNTV9JTkZPX09VSVtdOworZXh0ZXJuIHVuc2lnbmVkIGNoYXIgV01NX1BBUkFfT1VJW107CisKKworLyogICovCisvKiAgQ2hhbm5lbCBQbGFuIFR5cGUuICovCisvKiAgTm90ZTogKi8KKy8qIAlXZSBqdXN0IGFkZCBuZXcgY2hhbm5lbCBwbGFuIHdoZW4gdGhlIG5ldyBjaGFubmVsIHBsYW4gaXMgZGlmZmVyZW50IGZyb20gYW55IG9mIHRoZSBmb2xsb3dpbm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KK307CisjZW5kaWYKKworc3RydWN0IHJ4X3BrdF9hdHRyaWIJeworCXUxNiBwa3RfbGVuOworCXU4IHBoeXN0OworCXU4IGRydmluZm9fc3o7CisJdTggc2hpZnRfc3o7CisJdTggaGRybGVuOyAvKiB0aGUgV0xBTiBIZWFkZXIgTGVuICovCisJdTggdG9fZnJfZHM7CisJdTggYW1zZHU7CisJdTggcW9zOworCXU4IHByaW9yaXR5OworCXU4IHB3X3NhdmU7CisJdTggbWRhdGE7CisJdTE2IHNlcV9udW07CisJdTggZnJhZ19udW07CisJdTggbWZyYWc7CisJdTggb3JkZXI7CisJdTggcHJpdmFjeTsgLyogaW4gZnJhbWVfY3RybCBmaWVsZCAqLworCXU4IGJkZWNyeXB0ZWQ7CisJdTggZW5jcnlwdDsgLyogd2hlbiAwIGluZGljYXRlIG5vIGVuY3J5cHQuIHdoZW4gbm9uLXplcm8sIGluZGljYXRlIHRoZSBlbmNyeXB0IGFsZ29yaXRoICovCisJdTggaXZfbGVuOworCXU4IGljdl9sZW47CisJdTggY3JjX2VycjsKKwl1OCBpY3ZfZXJyOworCisJdTE2IGV0aF90eXBlOworCisJdTggZHN0W0VUSF9BTEVOXTsKKwl1OCBzcmNbRVRIX0FMRU5dOworCXU4IHRhW0VUSF9BTEVOXTsKKwl1OCByYVtFVEhfQUxFTl07CisJdTggYnNzaWRbRVRIX0FMRU5dOworCisJdTggYWNrX3BvbGljeTsKKworLyogaWZkZWYgQ09ORklHX1RDUF9DU1VNX09GRkxPQURfUlggKi8KKwl1OCB0Y3BjaGtfdmFsaWQ7IC8qICAwOiBpbnZhbGlkLCAxOiB2YWxpZCAqLworCXU4IGlwX2Noa3JwdDsgLyogMDogaW5jb3JyZWN0LCAxOiBjb3JyZWN0ICovCisJdTggdGNwX2Noa3JwdDsgLyogMDogaW5jb3JyZWN0LCAxOiBjb3JyZWN0ICovCisvKiBlbmRpZiAqLworCXU4IGtleV9pbmRleDsKKworCXU4IGRhdGFfcmF0ZTsKKwl1OC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lIGRldGFpbHMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZm5kZWYgX19TRElPX0hBTF9IX18KKyNkZWZpbmUgX19TRElPX0hBTF9IX18KKworCitleHRlcm4gdTggc2RfaGFsX2J1c19pbml0KHN0cnVjdCBhZGFwdGVyICpwYWRhcHRlcik7CitleHRlcm4gdTggc2RfaGFsX2J1c19kZWluaXQoc3RydWN0IGFkYXB0ZXIgKnBhZGFwdGVyKTsKKwordTggc2RfaW50X2lzcihzdHJ1Y3QgYWRhcHRlciAqcGFkYXB0ZXIpOwordm9pZCBzZF9pbnRfZHBjKHN0cnVjdCBhZGFwdGVyICpwYWRhcHRlcik7Cit2b2lkIHJ0d19zZXRfaGFsX29wcyhzdHJ1Y3QgYWRhcHRlciAqcGFkYXB0ZXIpOworCit2b2lkIHJ0bDg3MjNic19zZXRfaGFsX29wcyhzdHJ1Y3QgYWRhcHRlciAqcGFkYXB0ZXIpOworCisjZW5kaWYgLyogX19TRElPX0hBTF9IX18gKi8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4NzIzYnMvaW5jbHVkZS9zZGlvX29wcy5oIGIvZHJpdmVycy9zdGFnaW5nL3J0bDg3MjNicy9pbmNsdWRlL3NkaW9fb3BzLmgKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOGZmZmM2NTIKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODcyM2JzL2luY2x1ZGUvc2Rpb19vcHMuaApAQCAtMCwwICsxLDQ5IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ29weXJpZ2h0KGMpIDIwMDcgLSAyMDExIFJlYWx0ZWsgQ29ycG9yYXRp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B3cGFfcGFpcndpc2VfY2lwaGVyOworCWludCB3cGEyX3BhaXJ3aXNlX2NpcGhlcjsKKworCXU4IGJwYWlyd2lzZV9rZXlfaW5zdGFsbGVkOworCisJdTggd3BhX2llWzMyXTsKKworCXU4IG5vbmVycF9zZXQ7CisJdTggbm9fc2hvcnRfc2xvdF90aW1lX3NldDsKKwl1OCBub19zaG9ydF9wcmVhbWJsZV9zZXQ7CisJdTggbm9faHRfZ2Zfc2V0OworCXU4IG5vX2h0X3NldDsKKwl1OCBodF8yMG1oel9zZXQ7CisKKwl1bnNpZ25lZCBpbnQgdHhfcmFfYml0bWFwOworCXU4IHFvc19pbmZvOworCisJdTggbWF4X3NwX2xlbjsKKwl1OCB1YXBzZF9iazsvKiBCSVQoMCk6IERlbGl2ZXJ5IGVuYWJsZWQsIEJJVCgxKTogVHJpZ2dlciBlbmFibGVkICovCisJdTggdWFwc2RfYmU7CisJdTggdWFwc2Rfdmk7CisJdTggdWFwc2Rfdm87CisKKwl1OCBoYXNfbGVnYWN5X2FjOworCXVuc2lnbmVkIGludCBzbGVlcHFfYWNfbGVuOworCisJdTggdW5kZXJfZXhpc3RfY2hlY2tpbmc7CisKKwl1OCBrZWVwX2FsaXZlX3RyeWNudDsKKworI2lmZGVmIENPTkZJR19BVVRPX0FQX01PREUKKwl1OCBpc3JjOyAvKiB0aGlzIGRldmljZSBpcyByYyAqLworCXUxNiBwaWQ7IC8qICBwYWlyaW5nIGlkICovCisjZW5kaWYKKworCXU4ICpwYXNzb2NfcmVxOworCXUzMiBhc3NvY19yZXFfbGVuOworCisJLyogZm9yIERNICovCisJUlNTSV9TVEEJIHJzc2lfc3RhdDsKKworCS8qIE9ETV9TVEFfSU5GT19UICovCisJLyogID09PT09PT09PT09PT09PT1PRE0gUmVsYXRpdmUgSW5mbyA9PT09PT09PT09PT09PT09PT09PT09PSAqLworCS8qICBQbGVhc2UgYmUgY2FyZSwgZG9udCBkZWNsYXJlIHRvbyBtdWNoIHN0cnVjdHVyZ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ZXF1ZXN0SUVMZW5ndGg7CisgICAgdTMyICAgICAgICAgICAgICAgICAgIE9mZnNldFJlcXVlc3RJRXM7CisgICAgdTE2ICAgICAgICAgICAgICAgICAgQXZhaWxhYmxlUmVzcG9uc2VGaXhlZElFczsKKyAgICBzdHJ1Y3QgbmRpc184MDFfMTFfYWlfcmVzZmkgICAgUmVzcG9uc2VGaXhlZElFczsKKyAgICB1MzIgICAgICAgICAgICAgICAgICAgUmVzcG9uc2VJRUxlbmd0aDsKKyAgICB1MzIgICAgICAgICAgICAgICAgICAgT2Zmc2V0UmVzcG9uc2VJRXM7Cit9IE5ESVNfODAyXzExX0FTU09DSUFUSU9OX0lORk9STUFUSU9OLCAqUE5ESVNfODAyXzExX0FTU09DSUFUSU9OX0lORk9STUFUSU9OOworCitlbnVtIE5ESVNfODAyXzExX1JFTE9BRF9ERUZBVUxUUyB7CisJTmRpczgwMl8xMVJlbG9hZFdFUEtleXMKK307CisKKworLyogIEtleSBtYXBwaW5nIGtleXMgcmVxdWlyZSBhIEJTU0lEICovCit0eXBlZGVmIHN0cnVjdCBfTkRJU184MDJfMTFfS0VZCit7CisgICAgdTMyICAgICAgICAgICBMZW5ndGg7ICAgICAgICAgICAgIC8qICBMZW5ndGggb2YgdGhpcyBzdHJ1Y3R1cmUgKi8KKyAgICB1MzIgICAgICAgICAgIEtleUluZGV4OworICAgIHUzMiAgICAgICAgICAgS2V5TGVuZ3RoOyAgICAgICAgICAvKiAgbGVuZ3RoIG9mIGtleSBpbiBieXRlcyAqLworICAgIE5ESVNfODAyXzExX01BQ19BRERSRVNTIEJTU0lEOworICAgIHVuc2lnbmVkIGxvbmcgbG9uZyBLZXlSU0M7CisgICAgdTggICAgICAgICAgIEtleU1hdGVyaWFsWzMyXTsgICAgIC8qICB2YXJpYWJsZSBsZW5ndGggZGVwZW5kaW5nIG9uIGFib3ZlIGZpZWxkICovCit9IE5ESVNfODAyXzExX0tFWSwgKlBORElTXzgwMl8xMV9LRVk7CisKK3R5cG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NfSUVfKSAmJiAoIW1lbWNtcCgmYnVmW2NudCsyXSwgd3BzX291aSwgNCkpKQorCQkJCXsKKwkJCQkJREJHXzg3MVgoIlNFVCBXUFNfSUVcbiIpOworCisJCQkJCXBhZGFwdGVyLT5zZWN1cml0eXByaXYud3BzX2llX2xlbiA9ICgoYnVmW2NudCsxXSsyKSA8IE1BWF9XUFNfSUVfTEVOKSA/IChidWZbY250KzFdKzIpOk1BWF9XUFNfSUVfTEVOOworCisJCQkJCW1lbWNweShwYWRhcHRlci0+c2VjdXJpdHlwcml2Lndwc19pZSwgJmJ1ZltjbnRdLCBwYWRhcHRlci0+c2VjdXJpdHlwcml2Lndwc19pZV9sZW4pOworCisJCQkJCXNldF9md3N0YXRlKCZwYWRhcHRlci0+bWxtZXByaXYsIFdJRklfVU5ERVJfV1BTKTsKKworCQkJCQljbnQgKz0gYnVmW2NudCsxXSsyOworCisJCQkJCWJyZWFrOworCQkJCX0gZWxzZSB7CisJCQkJCWNudCArPSBidWZbY250KzFdKzI7IC8qIGdvdG8gbmV4dCAqLworCQkJCX0KKwkJCX0KKwkJfQorCX0KKworCS8qIFRLSVAgYW5kIEFFUyBkaXNhbGxvdyBtdWx0aWNhc3QgcGFja2V0cyB1bnRpbCBpbnN0YWxsaW5nIGdyb3VwIGtleSAqLworICAgICAgICBpZiAocGFkYXB0ZXItPnNlY3VyaXR5cHJpdi5kb3QxMVByaXZhY3lBbGdydGhtID09IF9US0lQXworICAgICAgICAgICAgICAgIHx8IHBhZGFwdGVyLT5zZWN1cml0eXByaXYuZG90MTFQcml2YWN5QWxncnRobSA9PSBfVEtJUF9XVE1JQ18KKyAgICAgICAgICAgICAgICB8fCBwYWRhcHRlci0+c2VjdXJpdHlwcml2LmRvdDExUHJpdmFjeUFsZ3J0aG0gPT0gX0FFU18pCisgICAgICAgICAgICAgICAgLyogV1BTIG9wZW4gbmVlZCB0byBlbmFibGUgbXVsdGljYXN0ICovCisgICAgICAgICAgICAgICAgLyogIGNoZWNrX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isgICAgICAgIElmIGNtZCBpcyBJV19QTUtTQV9SRU1PVkUsIGl0IG1lYW5zIHRoZSB3cGFfc3VwcGxpY2FudCB3YW50cyB0byByZW1vdmUgYSBQTUtJRC9CU1NJRCBmcm9tIGRyaXZlci4KKyAgICAgICAgKi8KKworCW1lbWNweShzdHJJc3N1ZUJzc2lkLCBwUE1LLT5ic3NpZC5zYV9kYXRhLCBFVEhfQUxFTik7CisgICAgICAgIGlmIChwUE1LLT5jbWQgPT0gSVdfUE1LU0FfQUREKQorICAgICAgICB7CisgICAgICAgICAgICAgICAgREJHXzg3MVgoIltydHdfd3hfc2V0X3Bta2lkXSBJV19QTUtTQV9BREQhXG4iKTsKKyAgICAgICAgICAgICAgICBpZiAoIW1lbWNtcChzdHJJc3N1ZUJzc2lkLCBzdHJaZXJvTWFjQWRkcmVzcywgRVRIX0FMRU4pKQorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgcmV0dXJuKGludFJldHVybik7CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgIGludFJldHVybiA9IHRydWU7CisgICAgICAgICAgICAgICAgfQorCQlibEluc2VydGVkID0gZmFsc2U7CisKKwkJLyogb3ZlcndyaXRlIFBNS0lEICovCisJCWZvciAoaiA9IDAgOyBqPE5VTV9QTUtJRF9DQUNIRTsgaisrKQorCQl7CisJCQlpZiAoIW1lbWNtcChwc2VjdXJpdHlwcml2LT5QTUtJRExpc3Rbal0uQnNzaWQsIHN0cklzc3VlQnNzaWQsIEVUSF9BTEVOKSkKKwkJCXsgLyogIEJTU0lEIGlzIG1hdGNoZWQsIHRoZSBzYW1lIEFQID0+IHJld3JpdGUgd2l0aCBuZXcgUE1LSUQuICovCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgREJHXzg3MVgoIltydHdfd3hfc2V0X3Bta2lkXSBCU1NJRCBleGlzdHMgaW4gdGhlIFBNS0xpc3QuXG4iKTsKKworCQkJCW1lbWNweShwc2VjdXJpdHlwcml2LT5QTUtJRExpc3Rbal0uUE1LSUQsIHBQTUstPnBta2lkLCBJV19QTUtJRF9MRU4pOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwc2VjdXJpdHlwcml2LT5QTUtJRExpc3RbIGogXS5iVXNlZCA9IHRydWU7CisJCQkJcHNlY3VyaXR5cHJpdi0+UE1LSURJbmRleCA9IGorMTsKKwkJCQlibEluc2VydGVkID0gdHJ1ZTsKKwkJCQlicmVhazsKKwkJCX0KKwkgICAgICAgIH0KKworCSAgICAgICAgaWYgKCFibEluc2VydGVkKQorICAgICAgICAgICAgICAgIHsKKwkJICAgIC8qICBGaW5kIGEgbmV3IGVudHJ5ICovCisgICAgICAgICAgICAgICAgICAgIERCR184NzFYKCJbcnR3X3d4X3NldF9wbWtpZF0gVXNlIHRoZSBuZXcgZW50cnkgaW5kZXggPSAlZCBmb3IgdGhpcyBQTUtJRC5cbiIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHNlY3VyaXR5cHJpdi0+UE1LSURJbmRleCk7CisKKwkgICAgICAgICAgICBtZW1jcHkocHNlY3VyaXR5cHJpdi0+UE1LSURMaXN0W3BzZWN1cml0eXByaXYtPlBNS0lESW5kZXhdLkJzc2lkLCBzdHJJc3N1ZUJzc2lkLCBFVEhfQUxFTik7CisJCSAgICBtZW1jcHkocHNlY3VyaXR5cHJpdi0+UE1LSURMaXN0W3BzZWN1cml0eXByaXYtPlBNS0lESW5kZXhdLlBNS0lELCBwUE1LLT5wbWtpZCwgSVdfUE1LSURfTEVOKTsKKworICAgICAgICAgICAgICAgICAgICBwc2VjdXJpdHlwcml2LT5QTUtJRExpc3RbIHBzZWN1cml0eXByaXYtPlBNS0lESW5kZXggXS5iVXNlZCA9IHRydWU7CisJCSAgICBwc2VjdXJpdHlwcml2LT5QTUtJREluZGV4KysgOworCQkgICAgaWYgKHBzZWN1cml0eXByaXYtPlBNS0lESW5kZXggPT0gMTYpCisgICAgICAgICAgICAgICAgICAgIHsKKwkJICAgICAgICBwc2VjdXJpdHlwcml2LT5QTUtJREluZGV4ID0gMDsKKyAgICAgICAgICAgICAgICAgICAgfQorCQl9CisgICAgICAgIH0KKyAgICAgICAgZWxzZSBpZiAocFBNSy0+Y21kID09IElXX1BNS1NBX1JFTU9WRSkKKyAgICAgICAgeworICAgICAgICAgICAgICAgIERCR184NzFYKCJbcnR3X3d4X3NldF9wbWtpZF0gSVdfUE1LU0FfUkVNT1ZFIVxuIik7CisgICAgICAgICAgICAgICAgaW50UmV0dXJuID0gdHJ1ZTsKKwkJZm9yIChqID0gMCA7IGo8TlVNX1BNS0lEX0NBQ0hFOyBqKyspCisJCXsKKwkJCWlmICghbWVtY21wKHBzZWN1cml0eXByaXYtPlBNS0lETGlzdFtqXS5Cc3NpZCwgc3RySXNzdWVCc3NpZCwgRVRIX0FMRU4pKQorCQkJeyAvKiAgQlNTSUQgaXMgbWF0Y2hlZCwgdGhlIHNhbWUgQVAgPT4gUmVtb3ZlIHRoaXMgUE1LSUQgaW5mb3JtYXRpb24gYW5kIHJlc2V0IGl0LiAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZW1zZXQocHNlY3VyaXR5cHJpdi0+UE1LSURMaXN0WyBqIF0uQnNzaWQsIDB4MDAsIEVUSF9BTEVOKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHNlY3VyaXR5cHJpdi0+UE1LSURMaXN0WyBqIF0uYlVzZWQgPSBmYWxzZTsKKwkJCQlicmVhazsKKwkJCX0KKwkgICAgICAgIH0KKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChwUE1LLT5jbWQgPT0gSVdfUE1LU0FfRkxVU0gpCisgICAgICAgIHsKKyAgICAgICAgICAgIERCR184NzFYKCJbcnR3X3d4X3NldF9wbWtpZF0gSVdfUE1LU0FfRkxVU0ghXG4iKTsKKyAgICAgICAgICAgIG1lbXNldC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x5IHdoZW4gd2lyZWxlc3MgcHJpdmF0ZSBpb2N0bCBpcyBhdCBvZGQgb3JkZXIsCisJICogImV4dHJhIiB3b3VsZCBiZSBjb3BpZWQgdG8gdXNlciBzcGFjZS4KKwkgKi8KKwlzcHJpbnRmKGV4dHJhLCAiMHglMDV4IiwgZGF0YTMyKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHJ0d193eF93cml0ZV9yZihzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pb24gaXdyZXFfZGF0YSAqd3JxdSwgY2hhciAqZXh0cmEpCit7CisJc3RydWN0IGFkYXB0ZXIgKnBhZGFwdGVyID0gKHN0cnVjdCBhZGFwdGVyICopcnR3X25ldGRldl9wcml2KGRldik7CisJdTMyIHBhdGgsIGFkZHIsIGRhdGEzMjsKKworCisJcGF0aCA9ICoodTMyKilleHRyYTsKKwlhZGRyID0gKigodTMyKilleHRyYSArIDEpOworCWRhdGEzMiA9ICooKHUzMiopZXh0cmEgKyAyKTsKKy8qIAlEQkdfODcxWCgiJXM6IHBhdGggPSVkIGFkZHIgPSAweCUwMnggZGF0YSA9IDB4JTA1eFxuIiwgX19mdW5jX18sIHBhdGgsIGFkZHIsIGRhdGEzMik7ICovCisJcnR3X2hhbF93cml0ZV9yZnJlZyhwYWRhcHRlciwgcGF0aCwgYWRkciwgMHhGRkZGRiwgZGF0YTMyKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHJ0d193eF9wcml2X251bGwoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgc3RydWN0IGl3X3JlcXVlc3RfaW5mbyAqYSwKKwkJIHVuaW9uIGl3cmVxX2RhdGEgKndycXUsIGNoYXIgKmIpCit7CisJcmV0dXJuIC0xOworfQorCitzdGF0aWMgaW50IGR1bW15KHN0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gICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaW9uIGl3cmVxX2RhdGEgKndycXUsIGNoYXIgKmV4dHJhKQoreworCisJaW50IHJldCA9IDA7CisKKwlyZXR1cm4gcmV0OworCit9CisKK3N0YXRpYyBpbnQgcnR3X3AycF9nZXQoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuaW9uIGl3cmVxX2RhdGEgKndycXUsIGNoYXIgKmV4dHJhKQoreworCisJaW50IHJldCA9IDA7CisKKwlyZXR1cm4gcmV0OworCit9CisKK3N0YXRpYyBpbnQgcnR3X3AycF9nZXQyKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsCisJCQkJCQlzdHJ1Y3QgaXdfcmVxdWVzdF9pbmZvICppbmZvLAorCQkJCQkJdW5pb24gaXdyZXFfZGF0YSAqd3JxdSwgY2hhciAqZXh0cmEpCit7CisKKwlpbnQgcmV0ID0gMDsKKworCXJldHVybiByZXQ7CisKK30KKworc3RhdGljIGludCBydHdfcmVyZWdfbmRfbmFtZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpd19yZXF1ZXN0X2luZm8gKmluZm8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5pb24gaXdyZXFfZGF0YSAqd3JxdSwgY2hhciAqZXh0cmEpCit7CisJaW50IHJldCA9IDA7CisJc3RydWN0IGFkYXB0ZXIgKnBhZGFwdGVyID0gcnR3X25ldGRldl9wcml2KGRldik7CisJc3RydWN0IHJlcmVnX25kX25hbWVfZGF0YSAqcmVyZWdfcHJpdiA9ICZwYWRhcHRlci0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Xzg3MVgoInR1cm4gJXMgdGhlIGJOb3RpZnlDaGFubmVsQ2hhbmdlIFZhcmlhYmxlXG4iLCAoZXh0cmFfYXJnID09IDEpPyJvbiI6Im9mZiIpOworCQkJCQkJcGFkYXB0ZXItPmJOb3RpZnlDaGFubmVsQ2hhbmdlID0gZXh0cmFfYXJnOworCQkJCQkJYnJlYWs7CisJCQkJCX0KKwkJCQljYXNlIDB4MjQ6CisJCQkJCXsKKwkJCQkJCWJyZWFrOworCQkJCQl9CisjaWZkZWYgQ09ORklHX0dQSU9fQVBJCisJCSAgICAgICAgICAgIGNhc2UgMHgyNTogLyogR2V0IEdQSU8gcmVnaXN0ZXIgKi8KKwkJICAgICAgICAgICAgICAgICAgICB7CisJCQkgICAgICAgICAgICAgICAgICAgIC8qCisJCQkgICAgICAgICAgICAgICAgICAgICogZGJnIDB4N2YyNTAwMDAgW2dwaW9fbnVtXSwgR2V0IGdwaW8gdmFsdWUsIGdwaW9fbnVtOjB+NworCQkJICAgICAgICAgICAgICAgICAgICAqLworCisJCQkgICAgICAgICAgICAgICAgICAgIGludCB2YWx1ZTsKKwkJCSAgICAgICAgICAgICAgICAgICAgREJHXzg3MVgoIlJlYWQgR1BJTyBWYWx1ZSAgZXh0cmFfYXJnID0gJWRcbiIsIGV4dHJhX2FyZyk7CisJCQkgICAgICAgICAgICAgICAgICAgIHZhbHVlID0gcnR3X2dldF9ncGlvKGRldiwgZXh0cmFfYXJnKTsKKwkJCSAgICAgICAgICAgICAgICAgICAgREJHXzg3MVgoIlJlYWQgR1BJTyBWYWx1ZSA9ICVkXG4iLCB2YWx1ZSk7CisJCQkgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCQkgICAgICAgICAgICAgICAgICAgIH0KKwkJICAgICAgICAgICAgY2FzZSAweDI2OiAvKiBTZXQgR1BJTyBkaXJlY3Rpb24gKi8KKwkJICAgICAgICAgICAgICAgICAgICB7CisKKwkJCSAgICAgICAgICAgICAgICAgICAgLyogZGJnIDB4N2YyNj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IgfCAxMDI0LCAwLCAiYXBfd293X21vZGUiIH0sIC8qIHNldCAqLworI2VuZGlmCit9OworCitzdGF0aWMgaXdfaGFuZGxlciBydHdfcHJpdmF0ZV9oYW5kbGVyW10gPQoreworCXJ0d193eF93cml0ZTMyLAkJCQkJLyogMHgwMCAqLworCXJ0d193eF9yZWFkMzIsCQkJCQkvKiAweDAxICovCisJcnR3X2RydmV4dF9oZGwsCQkJCQkvKiAweDAyICovCisJcnR3X21wX2lvY3RsX2hkbCwJCQkJLyogMHgwMyAqLworCisvKiAgZm9yIE1NIERUViBwbGF0Zm9ybSAqLworCXJ0d19nZXRfYXBfaW5mbywJCQkJCS8qIDB4MDQgKi8KKworCXJ0d19zZXRfcGlkLAkJCQkJCS8qIDB4MDUgKi8KKwlydHdfd3BzX3N0YXJ0LAkJCQkJLyogMHgwNiAqLworCisvKiAgZm9yIFBMQVRGT1JNX01UNTNYWCAqLworCXJ0d193eF9nZXRfc2Vuc2l0aXZpdHksCQkJLyogMHgwNyAqLworCXJ0d193eF9zZXRfbXRrX3dwc19wcm9iZV9pZSwJLyogMHgwOCAqLworCXJ0d193eF9zZXRfbXRrX3dwc19pZSwJCQkvKiAweDA5ICovCisKKy8qICBmb3IgUlRLX0RNUF9QTEFURk9STSAqLworLyogIFNldCBDaGFubmVsIGRlcGVuZCBvbiB0aGUgY291bnRyeSBjb2RlICovCisJcnR3X3d4X3NldF9jaGFubmVsX3BsYW4sCQkvKiAweDBBICovCisKKwlydHdfZGJnX3BvcnQsCQkJCQkvKiAweDBCICovCisJcnR3X3d4X3dyaXRlX3JmLAkJCQkJLyogMHgwQyAqLworCXJ0d193eF9yZWFkX3JmLAkJCQkJLyogMHgwRCAqLworCXJ0d193eF9wcml2X251bGwsCQkJCS8qIDB4MEUgKi8KKwlydHdfd3hfcHJpdl9udWxsLAkJCQkvKiAweDBGICovCisJcnR3X3AycF9zZXQsCQkJCQkvKiAweDEwICovCisJcnR3X3AycF9nZXQsCQkJCQkvKiAweDExIC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9IHNpemVvZihydHdfcHJpdmF0ZV9oYW5kbGVyKSAvIHNpemVvZihpd19oYW5kbGVyKSwKKwkubnVtX3ByaXZhdGVfYXJncyA9IHNpemVvZihydHdfcHJpdmF0ZV9hcmdzKSAvIHNpemVvZihzdHJ1Y3QgaXdfcHJpdl9hcmdzKSwKKyNlbmRpZgorCS5nZXRfd2lyZWxlc3Nfc3RhdHMgPSBydHdfZ2V0X3dpcmVsZXNzX3N0YXRzLAorfTsKKworLyogIGNvcHkgZnJvbSBuZXQvd2lyZWxlc3Mvd2V4dC5jIHN0YXJ0ICovCisvKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCisvKgorICogQ2FsY3VsYXRlIHNpemUgb2YgcHJpdmF0ZSBhcmd1bWVudHMKKyAqLworc3RhdGljIGNvbnN0IGNoYXIgaXdfcHJpdl90eXBlX3NpemVbXSA9IHsKKwkwLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIElXX1BSSVZfVFlQRV9OT05FICovCisJMSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBJV19QUklWX1RZUEVfQllURSAqLworCTEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogSVdfUFJJVl9UWVBFX0NIQVIgKi8KKwkwLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIE5vdCBkZWZpbmVkICovCisJc2l6ZW9mKF9fdTMyKSwgICAgICAgICAgICAgICAgICAvKiBJV19QUklWX1RZUEVfSU5UICovCisJc2l6ZW9mKHN0cnVjdCBpd19mcmVxKSwgICAgICAgICAvKiBJV19QUklWX1RZUEVfRkxPQVQgKi8KKwlzaXplb2Yoc3RydWN0IHNvY2thZGRyKSwgICAgICAgIC8qIElXX1BSSVZfVFlQRV9BRERSICovCisJMCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBOb3QgZGVmaW5lZCAqLwor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ydGw4NzIzYnMvb3NfZGVwL3dpZmlfcmVnZC5jCkBAIC0wLDAgKzEsMTY0IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ29weXJpZ2h0KGMpIDIwMDktMjAxMCAgUmVhbHRlayBDb3Jwb3JhdGlvbi4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpbmNsdWRlIDxkcnZfdHlwZXMuaD4KKyNpbmNsdWRlIDxydHdfZGVidWcuaD4KKworI2luY2x1ZGUgPHJ0d193aWZpX3JlZ2QuaD4KKworLyoKKyAqIFJFR19SVUxFKGZyZXEgc3RhcnQsIGZyZXEgZW5kLCBiYW5kd2lkdGgsIG1heCBnYWluLCBlaXJwLCByZWdfZmxhZ3MpCisgKi8KKworLyoKKyAqT25seSB0aGVzZSBjaGFubmVscyBhbGwgYWxsb3cgYWN0aXZlCisgKnNjYW4gb24gYWxsIHdvcmxkIHJlZ3VsYXRvcnkgZG9tYWlucworICovCisKKy8qIDJHIGNoYW4gMDEgLSBjaGFuIDExICovCisjZGVmaW5lIFJUV18yR0haX0NIMDFfMTEJXAorCVJFR19SVUxFKDI0MTItMTAsIDI0NjIrMTAsIDQwLCAwLCAyMCwgMCkKKworLyoKKyAqV2UgZW5hYmxlIGFjdGl2ZSBzY2FuIG9uIHRoZXNlIGEgY2FzZQorICpieSBjYXNlIGJhc2lzIGJ5IHJlZ3VsYXRvcnkgZG9tYWluCisgKi8KKworLyogMkcgY2hhbiAxMiAtIGNoYW4gMTMsIFBBU1NJViBTQ0FOICovCisjZGVmaW5lIFJUV18yR0haX0NIMTJfMTMJXAorCVJFR19SVUxFKDI0NjctMTAsIDI0NzIrMTAsIDQwLCAwLCAyMCwJXAorCU5MODAyMTFfUlJGX1BBU1NJVkVfU0NBT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AgICAgQklUKDE3KQogI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjUgICAgICAgICAgICAgICAgICAgICAgICBCSVQoMTYpCiAKLQogI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMDAKICNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1JFU0VSVkVEX01BU0sgICAgICAgICAgICAgIDB4YzBmMDgwMDAKICNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1NFTEVDVF9TSElGVCAgICAgICAgICAgICAgIDI4CkBAIC0xMjc5LDcgKzEyNzgsNiBAQAogI2RlZmluZSBJMkNfREFUQTE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA1MgogI2RlZmluZSBJMkNfREFUQTE1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA1MwogCi0KICNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMDAKICNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GSUVMRF9JTlBVVCAgICAgICAgICAgICAgICAgICAgQklUKDI3KQogI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1NDQU4gICAgICAgICAgICAgICAgICAgICAgICAgICBCSVQoMjYpCkBAIC0xNDQ1LDcgKzE0NDMsNiBAQAogI2RlZmluZSBERUZBVUxUX0kyQ19TQ0wgICAgICAgICAgICAgICAgICAgICAzMAogI2RlZmluZSBERUZBVUxUX0kyQ19TREEgICAgICAgICAgICAgICAgICAgICAzMQogCi0KICNkZWZpbmUgR1BJT19EQVRBX1NNNzUwTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwMTgKICNkZWZpbmUgR1BJT19EQVRBX1NNNzUwTEVfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQklUKDEpCiAjZ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MjgzNV9BVURJT19TVE9QICAgICAgICAgICAwCisjZGVmaW5lIEJDTTI4MzVfQVVESU9fU1RBUlQgICAgICAgICAgMQorI2RlZmluZSBCQ00yODM1X0FVRElPX1dSSVRFICAgICAgICAgIDIKKworLyogTG9nZ2luZyBtYWNyb3MgKGZvciByZW1hcHBpbmcgdG8gb3RoZXIgbG9nZ2luZyBtZWNoYW5pc21zLCBpLmUuLCBwcmludGYpICovCisjaWZkZWYgQVVESU9fREVCVUdfRU5BQkxFCisjZGVmaW5lIExPR19FUlIoZm10LCBhcmcuLi4pICAgcHJfZXJyKCIlczolZCAiIGZtdCwgX19mdW5jX18sIF9fTElORV9fLCAjI2FyZykKKyNkZWZpbmUgTE9HX1dBUk4oZm10LCBhcmcuLi4pICBwcl9pbmZvKCIlczolZCAiIGZtdCwgX19mdW5jX18sIF9fTElORV9fLCAjI2FyZykKKyNkZWZpbmUgTE9HX0lORk8oZm10LCBhcmcuLi4pICBwcl9pbmZvKCIlczolZCAiIGZtdCwgX19mdW5jX18sIF9fTElORV9fLCAjI2FyZykKKyNkZWZpbmUgTE9HX0RCRyhmbXQsIGFyZy4uLikgICBwcl9pbmZvKCIlczolZCAiIGZtdCwgX19mdW5jX18sIF9fTElORV9fLCAjI2FyZykKKyNlbHNlCisjZGVmaW5lIExPR19FUlIoZm10LCBhcmcuLi4pICAgcHJfZXJyKCIlczolZCAiIGZtdCwgX19mdW5jX18sIF9fTElORV9fLCAjI2FyZykKKyNkZWZpbmUgTE9HX1dBUk4oZm10LCBhcmcuLi4pCSBub19wcmludGsoZm10LCAjI2FyZykKKyNkZWZpbmUgTE9HX0lORk8oZm10LCBhcmcuLi4pCSBub19wcmludGsoZm10LCAjI2FyZykKKyNkZWZpbmUgTE9HX0RCRyhmbXQsIGFyZy4uLikJIG5vX3ByaW50ayhmbXQsICMjYXJnKQorI2VuZGlmCisKK3N0cnVjdCBiY20yODM1X2F1ZGlvX2luc3RhbmNlIHsKKwl1bnNpZ25lZCBpbnQgb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gJ0EnLCAnICcpCisjZGVmaW5lIE1NQUxfRU5DT0RJTkdfQk1QICAgICAgICAgICAgICBNTUFMX0ZPVVJDQygnQicsICdNJywgJ1AnLCAnICcpCisKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19JNDIwICAgICAgICAgICAgIE1NQUxfRk9VUkNDKCdJJywgJzQnLCAnMicsICcwJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19JNDIwX1NMSUNFICAgICAgIE1NQUxfRk9VUkNDKCdTJywgJzQnLCAnMicsICcwJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19ZVjEyICAgICAgICAgICAgIE1NQUxfRk9VUkNDKCdZJywgJ1YnLCAnMScsICcyJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19JNDIyICAgICAgICAgICAgIE1NQUxfRk9VUkNDKCdJJywgJzQnLCAnMicsICcyJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19JNDIyX1NMSUNFICAgICAgIE1NQUxfRk9VUkNDKCdTJywgJzQnLCAnMicsICcyJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19ZVVlWICAgICAgICAgICAgIE1NQUxfRk9VUkNDKCdZJywgJ1UnLCAnWScsICdWJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19ZVllVICAgICAgICAgICAgIE1NQUxfRk9VUkNDKCdZJywgJ1YnLCAnWScsICdVJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19VWVZZICAgICAgICAgICAgIE1NQUxfRk9VUkNDKCdVJywgJ1knLCAnVicsICdZJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19WWVVZICAgICAgICAgICAgIE1NQUxfRk9VUkNDKCdWJywgJ1knLCAnVScsICdZJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19OVjEyICAgICAgICAgICAgIE1NQUxfRk9VUkNDKCdOJywgJ1YnLCAnMScsICcyJykKKyNkZWZpbmUgTU1BTF9FTkNPRElOR19OVjIxICAgICAgICAgICAgIE1NQ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mcm1zZ19oYW5kbGUpOworCisJcmV0dXJuIHJldDsKK30KKworLyogZW5hYmxlIGEgY29tcG9uZW50IG9uIHZjICovCitzdGF0aWMgaW50IGVuYWJsZV9jb21wb25lbnQoc3RydWN0IHZjaGlxX21tYWxfaW5zdGFuY2UgKmluc3RhbmNlLAorCQkJICAgIHN0cnVjdCB2Y2hpcV9tbWFsX2NvbXBvbmVudCAqY29tcG9uZW50KQoreworCWludCByZXQ7CisJc3RydWN0IG1tYWxfbXNnIG07CisJc3RydWN0IG1tYWxfbXNnICpybXNnOworCVZDSElfSEVMRF9NU0dfVCBybXNnX2hhbmRsZTsKKworCW0uaC50eXBlID0gTU1BTF9NU0dfVFlQRV9DT01QT05FTlRfRU5BQkxFOworCW0udS5jb21wb25lbnRfZW5hYmxlLmNvbXBvbmVudF9oYW5kbGUgPSBjb21wb25lbnQtPmhhbmRsZTsKKworCXJldCA9IHNlbmRfc3luY2hyb25vdXNfbW1hbF9tc2coaW5zdGFuY2UsICZtLAorCQkJCQlzaXplb2YobS51LmNvbXBvbmVudF9lbmFibGUpLAorCQkJCQkmcm1zZywgJnJtc2dfaGFuZGxlKTsKKwlpZiAocmV0KQorCQlyZXR1cm4gcmV0OworCisJaWYgKHJtc2ctPmgudHlwZSAhPSBtLmgudHlwZSkgeworCQkvKiBnb3QgYW4gdW5leHBlY3RlZCBtZXNzYWdlIHR5cGUgaW4gcmVwbHkgKi8KKwkJcmV0ID0gLUVJTlZBTDsKKwkJZ290byByZWxlYXNlX21zZzsKKwl9CisKKwlyZXQgPSAtcm1zZy0+dS5jb21wb25lbnRfZW5hYmxlX3JlcGx5LnN0YXR1czsKKworcmVsZWFzZV9tc2c6CisJdmNoaV9oZWxkX21zZ19yZWxlYXNlKCZybXNnX2hhbmRsZSk7CisKKwlyZXR1cm4gcmV0OworfQorCisvKiBkaXNhYmxlIGEgY29tcG9uZW50IG9uIHZjICovCitzdGF0aWMgaW50IGRpc2FibGVfY29tcG9uZW50KHN0cnVjdCB2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XJldCA9IHBvcnRfaW5mb19nZXQoaW5zdGFuY2UsICZjb21wb25lbnQtPmNsb2NrW2lkeF0pOworCQlpZiAocmV0IDwgMCkKKwkJCWdvdG8gcmVsZWFzZV9jb21wb25lbnQ7CisJfQorCisJaW5zdGFuY2UtPmNvbXBvbmVudF9pZHgrKzsKKworCSpjb21wb25lbnRfb3V0ID0gY29tcG9uZW50OworCisJbXV0ZXhfdW5sb2NrKCZpbnN0YW5jZS0+dmNoaXFfbXV0ZXgpOworCisJcmV0dXJuIDA7CisKK3JlbGVhc2VfY29tcG9uZW50OgorCWRlc3Ryb3lfY29tcG9uZW50KGluc3RhbmNlLCBjb21wb25lbnQpOwordW5sb2NrOgorCW11dGV4X3VubG9jaygmaW5zdGFuY2UtPnZjaGlxX211dGV4KTsKKworCXJldHVybiByZXQ7Cit9CisKKy8qCisgKiBjYXVzZSBhIG1tYWwgY29tcG9uZW50IHRvIGJlIGRlc3Ryb3llZAorICovCitpbnQgdmNoaXFfbW1hbF9jb21wb25lbnRfZmluYWxpc2Uoc3RydWN0IHZjaGlxX21tYWxfaW5zdGFuY2UgKmluc3RhbmNlLAorCQkJCSAgc3RydWN0IHZjaGlxX21tYWxfY29tcG9uZW50ICpjb21wb25lbnQpCit7CisJaW50IHJldDsKKworCWlmIChtdXRleF9sb2NrX2ludGVycnVwdGlibGUoJmluc3RhbmNlLT52Y2hpcV9tdXRleCkpCisJCXJldHVybiAtRUlOVFI7CisKKwlpZiAoY29tcG9uZW50LT5lbmFibGVkKQorCQlyZXQgPSBkaXNhYmxlX2NvbXBvbmVudChpbnN0YW5jZSwgY29tcG9uZW50KTsKKworCXJldCA9IGRlc3Ryb3lfY29tcG9uZW50KGluc3RhbmNlLCBjb21wb25lbnQpOworCisJbXV0ZXhfdW5sb2NrKCZpbnN0YW5jZS0+dmNoaXFfbXV0ZXgpOworCisJcmV0dXJuIHJldDsKK30KKworLyoKKyAqIGNhdXNlIGEgbW1hbCBjb21wb25lbnQgdG8gYmUgZW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