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AgICAgICAgICAgICAgICAgVGhlIGZvbGxvd2luZyBzdHJpbmdzIGFyZSBhY2NlcHRlZDoKLSAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0ID0gZG9uJ3Qgb3ZlcnJpZGUgdGhlIGRlZmF1bHQgc2V0dGluZwotICAgICAgICAgICAgICAgICAgICAgIGRpc2FibGUgPSBkaXNhYmxlIHRoZSBxdWlyawotICAgICAgICAgICAgICAgICAgICAgIGhwX29ubHkgPSB1c2UgaGVhZHBob25lIGNvbnRyb2wgYXMgbWFzdGVyCi0gICAgICAgICAgICAgICAgICAgICAgc3dhcF9ocCA9IHN3YXAgaGVhZHBob25lIGFuZCBtYXN0ZXIgY29udHJvbHMKLSAgICAgICAgICAgICAgICAgICAgICBzd2FwX3N1cnJvdW5kID0gc3dhcCBtYXN0ZXIgYW5kIHN1cnJvdW5kIGNvbnRyb2xzCi0gICAgICAgICAgICAgICAgICAgICAgYWRfc2hhcmluZyA9IGZvciBBRDE5ODUsIHR1cm4gb24gT01TIGJpdCBhbmQgdXNlIGhlYWRwaG9uZQotICAgICAgICAgICAgICAgICAgICAgIGFsY19qYWNrID0gZm9yIEFMQzY1eCwgdHVybiBvbiB0aGUgamFjayBzZW5zZSBtb2RlCi0gICAgICAgICAgICAgICAgICAgICAgaW52X2VhcGQgPSBpbnZlcnRlZCBFQVBEIGltcGxlbWVudGF0aW9uCi0gICAgICAgICAgICAgICAgICAgICAgbXV0ZV9sZWQgPSBiaW5kIEVBUEQgYml0IGZvciB0dXJuaW5nIG9uL29mZiBtdXRlIExFRAotICAgICAgICAgICAgICAgICAgICBGb3IgYmFja3dhcmQgY29tcGF0aWJpbGl0eSwgdGhlIGNvcnJlc3BvbmRpbmcgaW50ZWdlcgotICAgICAgICAgICAgICAgICAgICB2YWx1ZSAtMSwgMCwgLi4uIGFyZSBhY2NlcHRlZCwgdG9vLgorCQkgICAgU2VlICJBQzk3IFF1aXJrIE9wdGlvbiIgc2VjdGlvbiBiZWxvdy4KICAg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jMxLAorICAgICAgICAueHJlcyAgICAgICAgICAgPSA0ODAsCisgICAgICAgIC55cmVzICAgICAgICAgICA9IDY0MCwKKyAgICAgICAgLmJwcCAgICAgICAgICAgID0gMTYsCisgICAgICAgIC5oc3luY19sZW4gICAgICA9IDQwLAorICAgICAgICAubGVmdF9tYXJnaW4gICAgPSA0NiwKKyAgICAgICAgLnJpZ2h0X21hcmdpbiAgID0gMTI1LAorICAgICAgICAudnN5bmNfbGVuICAgICAgPSAzLAorICAgICAgICAudXBwZXJfbWFyZ2luICAgPSAxLAorICAgICAgICAubG93ZXJfbWFyZ2luICAgPSAwLAorICAgICAgICAuc3luYyAgICAgICAgICAgPSAwLAorICAgICAgICAubGNjcjAgICAgICAgICAgPSBMQ0NSMF9Db2xvciB8IExDQ1IwX1NuZ2wgfCBMQ0NSMF9BY3QgfCBMQ0NSMF9MRERBTFQgfCBMQ0NSMF9PVUMgfCBMQ0NSMF9DTURJTSB8IExDQ1IwX1JEU1RNLAorICAgICAgICAubGNjcjMgICAgICAgICAgPSBMQ0NSM19QaXhSc0VkZyB8IExDQ1IzX091dEVuSCwKKyAgICAgICAgLnB4YWZiX2xjZF9wb3dlciA9IHNwaXR6X2xjZF9wb3dlciwKK307CisKKworc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgKmRldmljZXNbXSBfX2luaXRkYXRhID0geworCSZzcGl0enNjb29wX2RldmljZSwKKwkmc3BpdHpzc3BfZGV2aWNlLAorCSZzcGl0emtiZF9kZXZpY2UsCisJJnNwaXR6dHNfZGV2aWNlLAorCSZzcGl0emJsX2RldmljZSwKKwkmc3BpdHpiYXR0ZXJ5X2RldmljZSwKK307CisKK3N0YXRpYyB2b2lkIF9faW5pdCBjb21tb25faW5pdCh2b2lkKQoreworCVBNQ1IgPSAweDAwOworCisJLyogc2V0dXAgc2xlZXAgbW9kZSB2YWx1ZXMgKi8KKwlQV0VSICA9IDB4MDAwMDAwMDI7CisJUEZFUiAgPSAweDAwMDAw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y5nbG9iYWwgX3F1aWNjX2Jhc2UKKy5nbG9iYWwgX3BlcmlwaF9iYXNlCisKKyNkZWZpbmUgUkVHQiAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMAorI2RlZmluZSBQRVBBUiAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAxNikKKyNkZWZpbmUgR01SICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwNDApCisjZGVmaW5lIE9SMCAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDU0KQorI2RlZmluZSBCUjAgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDA1MCkKKyNkZWZpbmUgT1IxICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwNjQpCisjZGVmaW5lIEJSMSAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDYwKQorI2RlZmluZSBPUjQgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDA5NCkKKyNkZWZpbmUgQlI0ICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwOTApCisjZGVmaW5lIE9SNiAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMGI0KQorI2RlZmluZSBCUjYgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDBiMCkKKyNkZWZpbmUgT1I3ICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwYzQpCisjZGVmaW5lIEJSNyAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMGMwKQorCisjZGVmaW5lIE1DUiAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDAwKQorI2RlZmluZSBBVlIgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAwOCkKKworI2RlZmluZSBTWVBDUiAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAyMikKKworI2RlZmluZSBQTExDUiAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAxMCkKKyNkZWZpbmUgQ0xLT0NSICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwMEMpCisjZGVmaW5lIENEVkNSICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDE0KQorCisjZGVmaW5lIEJLQVIgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDMwKQorI2RlZmluZSBCS0NSICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAzNCkKKyNkZWZpbmUgU1dJViAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwMjMpCisjZGVmaW5lIFBJQ1IgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDI2KQorI2RlZmluZSBQSVRSICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAyQSkKKworLyogRGVmaW5lIGZvciBhbGwgbWVtb3J5IGNvbmZpZ3VyYXRpb24gKi8KKyNkZWZpbmUgTUNVX1NJTV9HTVIgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAKKyNkZWZpbmUgU0lNX09SX01BU0sgICAgICAgICAgICAgICAgIDB4MGZmZmZmZmYKKworLyogRGVmaW5lcyBmb3IgY2hpcCBzZWxlY3QgemVybyAtIHRoZSBmbGFzaCAqLworI2RlZmluZSBTSU1fT1IwX01BU0sgICAgICAgICAgICAgICAgMHgyMDAwMDAwMgorI2RlZmluZSBTSU1fQlIwX01BU0sgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorCisKKy8qIERlZmluZXMgZm9yIGNoaXAgc2VsZWN0IG9uZSAtIHRoZSBSQU0gKi8KKyNkZWZpbmUgU0lNX09SMV9NQVNLICAgICAgICAgICAgICAgIDB4MTAwMDAwMDAKKyNkZWZpbmUgU0lNX0JSMV9NQVNLICAgICAgICAgICAgICAgIDB4MDAwMDAwMDEKKworI2RlZmluZSBNQ1VfU0lNX01CQVJfQURSUyAgICAgICAgICAgMHgwMDAzZmYwMAorI2RlZmluZSBNQ1VfU0lNX01CQVJfQkFfTUFTSyAgICAgICAgMHhmZmZmZjAwMAorI2RlZmluZSBNQ1VfU0lNX01CQVJfQVNfTUFTSyAgICAgICAgMHgwMDAwMDAwMQorCisjZGVmaW5lIE1DVV9TSU1fUEVQQVIgICAgICAgICAgICAgICAweDAwQjQKKyAgICAKKyNkZWZpbmUgTUNVX0RJU0FCTEVfSU5UUlBUUyAgICAgICAgIDB4MjcwMAorI2RlZmluZSBNQ1VfU0lNX0FWUiAgICAgICAgICAgICAgICAgMHgwMAorICAgIAorI2RlZmluZSBNQ1VfU0lNX01DUiAgICAgICAgICAgICAgICAgMHgwMDAwNWNmZgorCisjZGVmaW5lIE1DVV9TSU1fQ0xLT0NSICAgICAgICAgICAgICAweDAwCisjZGVmaW5lIE1DVV9TSU1fUExMQ1IgICAgICAgICAgICAgICAweDgwMDAKKyNkZWZpbmUgTUNVX1NJTV9DRFZDUiAgICAgICAgICAgICAgIDB4MDAwMAorCisjZGVmaW5lIE1DVV9TSU1fU1lQQ1IgICAgICAgICAgICAgICAweDAwMDAKKyNkZWZpbmUgTUNVX1NJTV9TV0lWICAgICAgICAgICAgICAgIDB4MDAKKyNkZWZpbmUgTUNVX1NJTV9QSUNSICAgICAgICAgICAgICAgIDB4MDAwMAorI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3JvbV9lbmQsICVkMAorCXN1Yi5sCSNfX3JvbV9zdGFydCwgJWQwCisJbW92ZS5sCSVkMCwgcm9tX2xlbmd0aAorICAgIAorCXBlYQkwCisJcGVhCWVudgorCXBlYQklc3BAKDQpCisJcGVhCTAKKworCWxlYQlpbml0X3RocmVhZF91bmlvbiwgJWEyCisJbGVhCTB4MjAwMCglYTIpLCAlc3AKKworbHA6CisJanNyCXN0YXJ0X2tlcm5lbAorCitfZXhpdDoKKwlqbXAJX2V4aXQKKworCisJLmRhdGEKKwkuYWxpZ24gNAorZW52OgorCS5sb25nCTAKK19xdWljY19iYXNlOgorCS5sb25nCTAKK19wZXJpcGhfYmFzZToKKwkubG9uZwkwCitfcmFtdmVjOgorCS5sb25nICAgMAorX3JhbWJhc2U6CisJLmxvbmcgICAwCitfcmFtc3RhcnQ6CisJLmxvbmcgICAwCitfcmFtZW5kOgorCS5sb25nICAgMAorX2RwcmJhc2U6CisJLmxvbmcJMHhmZmZmZTAwMAorCisJLnRleHQKKworICAgIC8qCisgICAgICogVGhlc2UgYXJlIHRoZSBleGNlcHRpb24gdmVjdG9ycyBhdCBib290IHVwLCB0aGV5IGFyZSBjb3BpZWQgaW50byBSQU0KKyAgICAgKiBhbmQgdGhlbiBvdmVyd3JpdHRlbiBhcyBuZWVkZWQuCisgICAgICovCisgCisuc2VjdGlvbiAiLmRhdGEuaW5pdHZlY3QiLCJhd3giCisgICAgLmxvbmcgICBfX3JhbWVuZAkvKiBSZXNldDogSW5pdGlhbCBTdGFjayBQb2ludGVyICAgICAgICAgICAgICAgICAtIDAuICAqLworICAgIC5sb25nICAgX3N0YXJ0ICAgICAgLyogUmVzZXQ6IEluaXRpYWwgUHJvZ3JhbSBDb3VudGVyICAgICAgICAgICAgICAgLSAxLiAgKi8KKyAgICAubG9uZyAgIGJ1c2VyciAgICAgIC8qIEJ1cyBFcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gMi4gICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBBZGRyZXNzIEVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIDMuICAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogSWxsZWdhbCBJbnN0cnVjdGlvbiAgICAgICAgICAgICAgICAgICAgICAgICAgLSA0LiAgKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIERpdmlkZSBieSB6ZXJvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gNS4gICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBDSEssIENISzIgSW5zdHJ1Y3Rpb25zICAgICAgICAgICAgICAgICAgICAgICAtIDYuICAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVFJBUGNjLCBUUkFQViBJbnN0cnVjdGlvbnMgICAgICAgICAgICAgICAgICAgLSA3LiAgKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFByaXZpbGVnZSBWaW9sYXRpb24gICAgICAgICAgICAgICAgICAgICAgICAgIC0gOC4gICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFjZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIDkuICAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogTGluZSAxMDEwIEVtdWxhdG9yICAgICAgICAgICAgICAgICAgICAgICAgICAgLSAxMC4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIExpbmUgMTExMSBFbXVhbHRvciAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gMTEuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBIYXJ3YXJlIEJyZWFrcG9pbnQgICAgICAgICAgICAgICAgICAgICAgICAgICAtIDEyLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogKFJlc2VydmVkIGZvciBDb3Byb2Nlc3NvciBQcm90b2NvbCBWaW9sYXRpb24pLSAxMy4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIEZvcm1hdCBFcnJvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gMTQuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBVbmluaXRpYWxpemVkIEludGVycnVwdCAgICAgICAgICAgICAgICAgICAgICAtIDE1LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVyKSAgICAgICAgICAgICAgICAgICAgICAgLSAxNi4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlcikgICAgICAgICAgICAgICAgICAgICAgIC0gMTcuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiAoVW5hc3NpZ25lZCwgUmVzZXJ2ZXIpICAgICAgICAgICAgICAgICAgICAgICAtIDE4LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVyKSAgICAgICAgICAgICAgICAgICAgICAgLSAxOS4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlcikgICAgICAgICAgICAgICAgICAgICAgIC0gMjAuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiAoVW5hc3NpZ25lZCwgUmVzZXJ2ZXIpICAgICAgICAgICAgICAgICAgICAgICAtIDIxLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVyKSAgICAgICAgICAgICAgICAgICAgICAgLSAyMi4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlcikgICAgICAgICAgICAgICAgICAgICAgIC0gMjMuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBTcHVyaW91cyBJbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgICAgICAgICAtIDI0LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogTGV2ZWwgMSBJbnRlcnJ1cHQgQXV0b3ZlY3RvciAgICAgICAgICAgICAgICAgLSAyNS4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIExldmVsIDIgSW50ZXJydXB0IEF1dG92ZWN0b3IgICAgICAgICAgICAgICAgIC0gMjYuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBMZXZlbCAzIEludGVycnVwdCBBdXRvdmVjdG9yICAgICAgICAgICAgICAgICAtIDI3LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogTGV2ZWwgNCBJbnRlcnJ1cHQgQXV0b3ZlY3RvciAgICAgICAgICAgICAgICAgLSAyOC4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIExldmVsIDUgSW50ZXJydXB0IEF1dG92ZWN0b3IgICAgICAgICAgICAgICAgIC0gMjkuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBMZXZlbCA2IEludGVycnVwdCBBdXRvdmVjdG9yICAgICAgICAgICAgICAgICAtIDMwLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogTGV2ZWwgNyBJbnRlcnJ1cHQgQXV0b3ZlY3RvciAgICAgICAgICAgICAgICAgLSAzMS4gKi8KKyAgICAubG9uZyAgIHN5c3RlbV9jYWxsIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyAwICAgICAgICAgICAgICAgICAgIC0gMzIuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgMSAgICAgICAgICAgICAgICAgICAtIDMzLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDIgICAgICAgICAgICAgICAgICAgLSAzNC4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyAzICAgICAgICAgICAgICAgICAgIC0gMzUuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgNCAgICAgICAgICAgICAgICAgICAtIDM2LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDUgICAgICAgICAgICAgICAgICAgLSAzNy4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyA2ICAgICAgICAgICAgICAgICAgIC0gMzguICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgNyAgICAgICAgICAgICAgICAgICAtIDM5LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDggICAgICAgICAgICAgICAgICAgLSA0MC4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyA5ICAgICAgICAgICAgICAgICAgIC0gNDEuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgMTAgICAgICAgICAgICAgICAgICAtIDQyLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDExICAgICAgICAgICAgICAgICAgLSA0My4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyAxMiAgICAgICAgICAgICAgICAgIC0gNDQuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgMTMgICAgICAgICAgICAgICAgICAtIDQ1LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDE0ICAgICAgICAgICAgICAgICAgLSA0Ni4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyAxNSAgICAgICAgICAgICAgICAgIC0gNDcuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yKSAgICAgICAgICAgICAgICAgICAtIDQ4LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFJlc2VydmVkIGZvciBDb3Byb2Nlc3NvcikgICAgICAgICAgICAgICAgICAgLSA0OS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChSZXNlcnZlZCBmb3IgQ29wcm9jZXNzb3IpICAgICAgICAgICAgICAgICAgIC0gNTAuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yKSAgICAgICAgICAgICAgICAgICAtIDUxLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFJlc2VydmVkIGZvciBDb3Byb2Nlc3NvcikgICAgICAgICAgICAgICAgICAgLSA1Mi4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChSZXNlcnZlZCBmb3IgQ29wcm9jZXNzb3IpICAgICAgICAgICAgICAgICAgIC0gNTMuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yKSAgICAgICAgICAgICAgICAgICAtIDU0LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFJlc2VydmVkIGZvciBDb3Byb2Nlc3NvcikgICAgICAgICAgICAgICAgICAgLSA1NS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChSZXNlcnZlZCBmb3IgQ29wcm9jZXNzb3IpICAgICAgICAgICAgICAgICAgIC0gNTYuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yKSAgICAgICAgICAgICAgICAgICAtIDU3LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFJlc2VydmVkIGZvciBDb3Byb2Nlc3NvcikgICAgICAgICAgICAgICAgICAgLSA1OC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlZCkgICAgICAgICAgICAgICAgICAgICAgIC0gNTkuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVW5hc3NpZ25lZCwgUmVzZXJ2ZWQpICAgICAgICAgICAgICAgICAgICAgICAtIDYwLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVkKSAgICAgICAgICAgICAgICAgICAgICAgLSA2MS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlZCkgICAgICAgICAgICAgICAgICAgICAgIC0gNjIuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVW5hc3NpZ25lZCwgUmVzZXJ2ZWQpICAgICAgICAgICAgICAgICAgICAgICAtIDYzLiAqLworICAgIC8qICAgICAgICAgICAgICAgICAgVGhlIGFzc2lnbm1lbnQgb2YgdGhlc2UgdmVjdG9ycyB0byB0aGUgQ1BNIGlzICAgICAgICAgKi8KKyAgICAvKiAgICAgICAgICAgICAgICAgIGRlcGVuZGVudCBvbiB0aGUgY29uZmlndXJhdGlvbiBvZiB0aGUgQ1BNIHZiYSAgICAgICAgICovCisgICAgLyogICAgICAgICAgICAgICAgICAgICAgICAgIGZpZWxkcy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDEpIENQTSBFcnJvciAgICAgICAgICAgLSA2NC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAyKSBDUE0gUGFyYWxsZWwgSU8gUEMxMS0gNjUuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMykgQ1BNIFBhcmFsbGVsIElPIFBDMTAtIDY2LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDQpIENQTSBTTUMyIC8gUElQICAgICAgLSA2Ny4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyA1KSBDUE0gU01DMSAgICAgICAgICAgIC0gNjguICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgNikgQ1BNIFNQSSAgICAgICAgICAgICAtIDY5LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDcpIENQTSBQYXJhbGxlbCBJTyBQQzkgLSA3MC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyA4KSBDUE0gVGltZXIgNCAgICAgICAgIC0gNzEuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgOSkgQ1BNIFJlc2VydmVkICAgICAgICAtIDcyLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDEwKSBDUE0gUGFyYWxsZWwgSU8gUEM4LSA3My4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAxMSkgQ1BNIFBhcmFsbGVsIElPIFBDNy0gNzQuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMTIpIENQTSBQYXJhbGxlbCBJTyBQQzYtIDc1LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDEzKSBDUE0gVGltZXIgMyAgICAgICAgLSA3Ni4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAxNCkgQ1BNIFJlc2VydmVkICAgICAgIC0gNzcuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMTUpIENQTSBQYXJhbGxlbCBJTyBQQzUtIDc4LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDE2KSBDUE0gUGFyYWxsZWwgSU8gUEM0LSA3OS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAxNykgQ1BNIFJlc2VydmVkICAgICAgIC0gODAuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMTgpIENQTSBSSVNDIFRpbWVyIFRibCAtIDgxLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDE5KSBDUE0gVGltZXIgMiAgICAgICAgLSA4Mi4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAyMSkgQ1BNIFJlc2VydmVkICAgICAgIC0gODMuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMjIpIENQTSBJRE1BMiAgICAgICAgICAtIDg0LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDIzKSBDUE0gSURNQTEgICAgICAgICAgLSA4NS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAyNCkgQ1BNIFNETUEgQnVzIEVyciAgIC0gODYuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMjUpIENQTSBQYXJhbGxlbCBJTyBQQzMtIDg3LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDI2KSBDUE0gUGFyYWxsZWwgSU8gUEMyLSA4OC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAyNykgQ1BNIFRpbWVyIDEgICAgICAgIC0gODkuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMjgpIENQTSBQYXJhbGxlbCBJTyBQQzEtIDkwLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDI5KSBDUE0gU0NDIDQgICAgICAgICAgLSA5MS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAzMCkgQ1BNIFNDQyAzICAgICAgICAgIC0gOTIuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMzEpIENQTSBTQ0MgMiAgICAgICAgICAtIDkzLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDMyKSBDUE0gU0NDIDEgICAgICAgICAgLSA5NC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAzMykgQ1BNIFBhcmFsbGVsIElPIFBDMC0gOTUuICovCisgICAgLyogICAgICAgICAgICA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lICsgUkVHQiArIDB4MDAxNikKKyNkZWZpbmUgR01SICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwNDApCisjZGVmaW5lIE9SMCAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDU0KQorI2RlZmluZSBCUjAgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDA1MCkKKworI2RlZmluZSBPUjEgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDA2NCkKKyNkZWZpbmUgQlIxICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwNjApCisKKyNkZWZpbmUgT1IyICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwNzQpCisjZGVmaW5lIEJSMiAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDcwKQorCisjZGVmaW5lIE9SMyAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDg0KQorI2RlZmluZSBCUjMgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDA4MCkKKworI2RlZmluZSBPUjQgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDA5NCkKKyNkZWZpbmUgQlI0ICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwOTApCisKKyNkZWZpbmUgT1I1ICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwQTQpCisjZGVmaW5lIEJSNSAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMEEwKQorCisjZGVmaW5lIE9SNiAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMGI0KQorI2RlZmluZSBCUjYgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDBiMCkKKworI2RlZmluZSBPUjcgICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDBjNCkKKyNkZWZpbmUgQlI3ICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwYzApCisKKyNkZWZpbmUgTUNSICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwMDApCisjZGVmaW5lIEFWUiAgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDA4KQorCisjZGVmaW5lIFNZUENSICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDIyKQorCisjZGVmaW5lIFBMTENSICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDEwKQorI2RlZmluZSBDTEtPQ1IgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAwQykKKyNkZWZpbmUgQ0RWQ1IgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwMTQpCisKKyNkZWZpbmUgQktBUiAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwMzApCisjZGVmaW5lIEJLQ1IgICAgICAgICAgICAgICAgICAgICAgICAoX2RwcmJhc2UgKyBSRUdCICsgMHgwMDM0KQorI2RlZmluZSBTV0lWICAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAyMykKKyNkZWZpbmUgUElDUiAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwMjYpCisjZGVmaW5lIF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IKKyAgICAubG9uZyAgIF9fcmFtZW5kCS8qIFJlc2V0OiBJbml0aWFsIFN0YWNrIFBvaW50ZXIgICAgICAgICAgICAgICAgIC0gMC4gICovCisgICAgLmxvbmcgICBfc3RhcnQgICAgICAvKiBSZXNldDogSW5pdGlhbCBQcm9ncmFtIENvdW50ZXIgICAgICAgICAgICAgICAtIDEuICAqLworICAgIC5sb25nICAgYnVzZXJyICAgICAgLyogQnVzIEVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSAyLiAgKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIEFkZHJlc3MgRXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gMy4gICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBJbGxlZ2FsIEluc3RydWN0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAtIDQuICAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogRGl2aWRlIGJ5IHplcm8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSA1LiAgKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIENISywgQ0hLMiBJbnN0cnVjdGlvbnMgICAgICAgICAgICAgICAgICAgICAgIC0gNi4gICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUUkFQY2MsIFRSQVBWIEluc3RydWN0aW9ucyAgICAgICAgICAgICAgICAgICAtIDcuICAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogUHJpdmlsZWdlIFZpb2xhdGlvbiAgICAgICAgICAgICAgICAgICAgICAgICAgLSA4LiAgKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYWNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gOS4gICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBMaW5lIDEwMTAgRW11bGF0b3IgICAgICAgICAgICAgICAgICAgICAgICAgICAtIDEwLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogTGluZSAxMTExIEVtdWFsdG9yICAgICAgICAgICAgICAgICAgICAgICAgICAgLSAxMS4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIEhhcndhcmUgQnJlYWtwb2ludCAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gMTIuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yIFByb3RvY29sIFZpb2xhdGlvbiktIDEzLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogRm9ybWF0IEVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSAxNC4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFVuaW5pdGlhbGl6ZWQgSW50ZXJydXB0ICAgICAgICAgICAgICAgICAgICAgIC0gMTUuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiAoVW5hc3NpZ25lZCwgUmVzZXJ2ZXIpICAgICAgICAgICAgICAgICAgICAgICAtIDE2LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVyKSAgICAgICAgICAgICAgICAgICAgICAgLSAxNy4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlcikgICAgICAgICAgICAgICAgICAgICAgIC0gMTguICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiAoVW5hc3NpZ25lZCwgUmVzZXJ2ZXIpICAgICAgICAgICAgICAgICAgICAgICAtIDE5LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVyKSAgICAgICAgICAgICAgICAgICAgICAgLSAyMC4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlcikgICAgICAgICAgICAgICAgICAgICAgIC0gMjEuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiAoVW5hc3NpZ25lZCwgUmVzZXJ2ZXIpICAgICAgICAgICAgICAgICAgICAgICAtIDIyLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVyKSAgICAgICAgICAgICAgICAgICAgICAgLSAyMy4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFNwdXJpb3VzIEludGVycnVwdCAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gMjQuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBMZXZlbCAxIEludGVycnVwdCBBdXRvdmVjdG9yICAgICAgICAgICAgICAgICAtIDI1LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogTGV2ZWwgMiBJbnRlcnJ1cHQgQXV0b3ZlY3RvciAgICAgICAgICAgICAgICAgLSAyNi4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIExldmVsIDMgSW50ZXJydXB0IEF1dG92ZWN0b3IgICAgICAgICAgICAgICAgIC0gMjcuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBMZXZlbCA0IEludGVycnVwdCBBdXRvdmVjdG9yICAgICAgICAgICAgICAgICAtIDI4LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogTGV2ZWwgNSBJbnRlcnJ1cHQgQXV0b3ZlY3RvciAgICAgICAgICAgICAgICAgLSAyOS4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIExldmVsIDYgSW50ZXJydXB0IEF1dG92ZWN0b3IgICAgICAgICAgICAgICAgIC0gMzAuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBMZXZlbCA3IEludGVycnVwdCBBdXRvdmVjdG9yICAgICAgICAgICAgICAgICAtIDMxLiAqLworICAgIC5sb25nICAgc3lzdGVtX2NhbGwgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDAgICAgICAgICAgICAgICAgICAgLSAzMi4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyAxICAgICAgICAgICAgICAgICAgIC0gMzMuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgMiAgICAgICAgICAgICAgICAgICAtIDM0LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDMgICAgICAgICAgICAgICAgICAgLSAzNS4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyA0ICAgICAgICAgICAgICAgICAgIC0gMzYuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgNSAgICAgICAgICAgICAgICAgICAtIDM3LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDYgICAgICAgICAgICAgICAgICAgLSAzOC4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyA3ICAgICAgICAgICAgICAgICAgIC0gMzkuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgOCAgICAgICAgICAgICAgICAgICAtIDQwLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDkgICAgICAgICAgICAgICAgICAgLSA0MS4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyAxMCAgICAgICAgICAgICAgICAgIC0gNDIuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgMTEgICAgICAgICAgICAgICAgICAtIDQzLiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDEyICAgICAgICAgICAgICAgICAgLSA0NC4gKi8KKyAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIFRyYXAgSW5zdHJ1Y3Rpb24gVmVjdG9ycyAxMyAgICAgICAgICAgICAgICAgIC0gNDUuICovCisgICAgLmxvbmcgICB0cmFwICAgICAgICAvKiBUcmFwIEluc3RydWN0aW9uIFZlY3RvcnMgMTQgICAgICAgICAgICAgICAgICAtIDQ2LiAqLworICAgIC5sb25nICAgdHJhcCAgICAgICAgLyogVHJhcCBJbnN0cnVjdGlvbiBWZWN0b3JzIDE1ICAgICAgICAgICAgICAgICAgLSA0Ny4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChSZXNlcnZlZCBmb3IgQ29wcm9jZXNzb3IpICAgICAgICAgICAgICAgICAgIC0gNDguICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yKSAgICAgICAgICAgICAgICAgICAtIDQ5LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFJlc2VydmVkIGZvciBDb3Byb2Nlc3NvcikgICAgICAgICAgICAgICAgICAgLSA1MC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChSZXNlcnZlZCBmb3IgQ29wcm9jZXNzb3IpICAgICAgICAgICAgICAgICAgIC0gNTEuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yKSAgICAgICAgICAgICAgICAgICAtIDUyLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFJlc2VydmVkIGZvciBDb3Byb2Nlc3NvcikgICAgICAgICAgICAgICAgICAgLSA1My4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChSZXNlcnZlZCBmb3IgQ29wcm9jZXNzb3IpICAgICAgICAgICAgICAgICAgIC0gNTQuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yKSAgICAgICAgICAgICAgICAgICAtIDU1LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFJlc2VydmVkIGZvciBDb3Byb2Nlc3NvcikgICAgICAgICAgICAgICAgICAgLSA1Ni4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChSZXNlcnZlZCBmb3IgQ29wcm9jZXNzb3IpICAgICAgICAgICAgICAgICAgIC0gNTcuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoUmVzZXJ2ZWQgZm9yIENvcHJvY2Vzc29yKSAgICAgICAgICAgICAgICAgICAtIDU4LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVkKSAgICAgICAgICAgICAgICAgICAgICAgLSA1OS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlZCkgICAgICAgICAgICAgICAgICAgICAgIC0gNjAuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVW5hc3NpZ25lZCwgUmVzZXJ2ZWQpICAgICAgICAgICAgICAgICAgICAgICAtIDYxLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVuYXNzaWduZWQsIFJlc2VydmVkKSAgICAgICAgICAgICAgICAgICAgICAgLSA2Mi4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVbmFzc2lnbmVkLCBSZXNlcnZlZCkgICAgICAgICAgICAgICAgICAgICAgIC0gNjMuICovCisgICAgLyogICAgICAgICAgICAgICAgICBUaGUgYXNzaWdubWVudCBvZiB0aGVzZSB2ZWN0b3JzIHRvIHRoZSBDUE0gaXMgICAgICAgICAqLworICAgIC8qICAgICAgICAgICAgICAgICAgZGVwZW5kZW50IG9uIHRoZSBjb25maWd1cmF0aW9uIG9mIHRoZSBDUE0gdmJhICAgICAgICAgKi8KKyAgICAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgZmllbGRzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMSkgQ1BNIEVycm9yICAgICAgICAgICAtIDY0LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDIpIENQTSBQYXJhbGxlbCBJTyBQQzExLSA2NS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAzKSBDUE0gUGFyYWxsZWwgSU8gUEMxMC0gNjYuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgNCkgQ1BNIFNNQzIgLyBQSVAgICAgICAtIDY3LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDUpIENQTSBTTUMxICAgICAgICAgICAgLSA2OC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyA2KSBDUE0gU1BJICAgICAgICAgICAgIC0gNjkuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgNykgQ1BNIFBhcmFsbGVsIElPIFBDOSAtIDcwLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDgpIENQTSBUaW1lciA0ICAgICAgICAgLSA3MS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyA5KSBDUE0gUmVzZXJ2ZWQgICAgICAgIC0gNzIuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMTApIENQTSBQYXJhbGxlbCBJTyBQQzgtIDczLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDExKSBDUE0gUGFyYWxsZWwgSU8gUEM3LSA3NC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAxMikgQ1BNIFBhcmFsbGVsIElPIFBDNi0gNzUuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMTMpIENQTSBUaW1lciAzICAgICAgICAtIDc2LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDE0KSBDUE0gUmVzZXJ2ZWQgICAgICAgLSA3Ny4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAxNSkgQ1BNIFBhcmFsbGVsIElPIFBDNS0gNzguICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMTYpIENQTSBQYXJhbGxlbCBJTyBQQzQtIDc5LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDE3KSBDUE0gUmVzZXJ2ZWQgICAgICAgLSA4MC4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAxOCkgQ1BNIFJJU0MgVGltZXIgVGJsIC0gODEuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMTkpIENQTSBUaW1lciAyICAgICAgICAtIDgyLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDIxKSBDUE0gUmVzZXJ2ZWQgICAgICAgLSA4My4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAyMikgQ1BNIElETUEyICAgICAgICAgIC0gODQuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMjMpIENQTSBJRE1BMSAgICAgICAgICAtIDg1LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDI0KSBDUE0gU0RNQSBCdXMgRXJyICAgLSA4Ni4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAyNSkgQ1BNIFBhcmFsbGVsIElPIFBDMy0gODcuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMjYpIENQTSBQYXJhbGxlbCBJTyBQQzItIDg4LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDI3KSBDUE0gVGltZXIgMSAgICAgICAgLSA4OS4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAyOCkgQ1BNIFBhcmFsbGVsIElPIFBDMS0gOTAuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMjkpIENQTSBTQ0MgNCAgICAgICAgICAtIDkxLiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDMwKSBDUE0gU0NDIDMgICAgICAgICAgLSA5Mi4gKi8KKyAgICAubG9uZyAgIDAgICAgICAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyAzMSkgQ1BNIFNDQyAyICAgICAgICAgIC0gOTMuICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMzIpIENQTSBTQ0MgMSAgICAgICAgICAtIDk0LiAqLworICAgIC5sb25nICAgMCAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDMzKSBDUE0gUGFyYWxsZWwgSU8gUEMwLSA5NS4gKi8KKyAgICAvKiAgICAgICAgICAgICAgICAgIEkgZG9uJ3QgdGhpbmsgYW55dGhpbmcgdXNlcyB0aGUgdmVjdG9ycyBhZnRlciBoZXJlLiAgICovCisgICAgLmxvbmcgICAwICAgICAgICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgMzQpICAgICAgICAgICAgICAgICAgICAtIDk2LiAqLworICAgIC5sb25nICAgMCwwLDAsMCwwICAgICAgICAgICAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDM1ICAtICAzOSkuICovCisgICAgLmxvbmcgICAwLDAsMCwwLDAsMCwwLDAsMCwwICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgNDAgIC0gIDQ5KS4gKi8KKyAgICAubG9uZyAgIDAsMCwwLDAsMCwwLDAsMCwwLDAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyA1MCAgLSAgNTkpLiAqLworICAgIC5sb25nICAgMCwwLDAsMCwwLDAsMCwwLDAsMCAgICAgLyogKFVzZXItRGVmaW5lZCBWZWN0b3JzIDYwICAtICA2OSkuICovCisgICAgLmxvbmcgICAwLDAsMCwwLDAsMCwwLDAsMCwwICAgICAvKiAoVXNlci1EZWZpbmVkIFZlY3RvcnMgNzAgIC0gIDc5KS4gKi8KKyAgICAubG9uZyAgIDAsMCwwLDAsMCwwLDAsMCwwLDAgICAgIC8qIChVc2VyLURlZmluZWQgVmVjdG9ycyA4M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GxvdyBJTyBhY2Nlc3MgdG8gcGFnZXMgdGhhdCBhcmUgaW4gdGhlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICBJU0EgcmFuZ2UgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdGFydCA8IE1BWF9JU0FfUE9SVCkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZW5kID4gTUFYX0lTQV9QT1JUKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVuZCA9IE1BWF9JU0FfUE9SVDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGFydCA+Pj0gUEFHRV9TSElGVDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZW5kID4+PSBQQUdFX1NISUZUOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGdldCB0aGUgcmFuZ2Ugb2YgcGFnZXMgZm9yIHRoZSBtYXAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWFzayA9ICgoMSA8PCAoZW5kKzEpKS0xKSBeICgoMSA8PCBzdGFydCktMSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlvX3BhZ2VfbWFzayB8PSBtYXNrOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotCQl9Ci0gICAgICAgICAgICAgICAgZWxzZSBpZiAoZGV2LT5yZXNvdXJjZVtpXS5mbGFncyAmIElPUkVTT1VSQ0VfTUVNKSB7Ci0JCQlkZXYtPnJlc291cmNlW2ldLnN0YXJ0ICs9IGhvc2UtPnBjaV9tZW1fb2Zmc2V0OwotCQkJZGV2LT5yZXNvdXJjZVtpXS5lbmQgKz0gaG9zZS0+cGNpX21lbV9vZmZzZXQ7Ci0JCX0KLSAgICAgICAgfQorCWZvciAoaSA9IDA7IGkgPCBQQ0lfTlVNX1JFU09VUkNFUzsgaSsrKQorCQlpZiAoZGV2LT5yZXNvdXJjZVtpXS5mbG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FU0JfUkVMT0FEX1JFRyAgQkFTRUFERFIgKyAweDBjIC8qIFJlbG9hZCByZWdpc3RlciAgICAgICAgICAgICAgICAgICAqLworCisvKiBMb2NrIHJlZ2lzdGVyIGJpdHMgKi8KKyNkZWZpbmUgRVNCX1dEVF9GVU5DICAgICggMHgwMSA8PCAyICkgICAvKiBXYXRjaGRvZyBmdW5jdGlvbmFsaXR5ICAgICAgICAgICAgKi8KKyNkZWZpbmUgRVNCX1dEVF9FTkFCTEUgICggMHgwMSA8PCAxICkgICAvKiBFbmFibGUgV0RUICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgRVNCX1dEVF9MT0NLICAgICggMHgwMSA8PCAwICkgICAvKiBMb2NrIChub3dheW91dCkgICAgICAgICAgICAgICAgICAgKi8KKworLyogQ29uZmlnIHJlZ2lzdGVyIGJpdHMgKi8KKyNkZWZpbmUgRVNCX1dEVF9SRUJPT1QgICggMHgwMSA8PCA1ICkgICAvKiBFbmFibGUgcmVib290IG9uIHRpbWVvdXQgICAgICAgICAgKi8KKyNkZWZpbmUgRVNCX1dEVF9GUkVRICAgICggMHgwMSA8PCAyICkgICAvKiBEZWNyZW1lbnQgZnJlcXVlbmN5ICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgRVNCX1dEVF9JTlRUWVBFICggMHgxMSA8PCAwICkgICAvKiBJbnRlcnJ1cHQgdHlwZSBvbiB0aW1lcjEgdGltZW91dCAgKi8KKworLyogUmVsb2FkIHJlZ2lzdGVyIGJpdHMgKi8KKyNkZWZpbmUgRVNCX1dEVF9SRUxPQUQgKCAweDAxIDw8IDggKSAgICAvKiBwcmV2ZW50IHRpbWVvdXQgICAgICAgICAgICAgICAgICAgKi8KKworLyogTWFnaWMgY29uc3RhbnRzICovCisjZGVmaW5lIEVTQl9VTkxPQ0sxICAgICAweDgwICAgICAgICAgICAgLyogU3RlcCAxIHRvIHVubG9jayByZXNldCByZWdpc3RlcnMgICovCisjZGVmaW5lIEVTQl9VTk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gaGFuZGxpbmcKKyAqLworCitzdGF0aWMgaW50IGVzYl9vcGVuIChzdHJ1Y3QgaW5vZGUgKmlub2RlLCBzdHJ1Y3QgZmlsZSAqZmlsZSkKK3sKKyAgICAgICAgLyogL2Rldi93YXRjaGRvZyBjYW4gb25seSBiZSBvcGVuZWQgb25jZSAqLworICAgICAgICBpZiAodGVzdF9hbmRfc2V0X2JpdCgwLCAmdGltZXJfYWxpdmUpKQorICAgICAgICAgICAgICAgIHJldHVybiAtRUJVU1k7CisKKyAgICAgICAgLyogUmVsb2FkIGFuZCBhY3RpdmF0ZSB0aW1lciAqLworICAgICAgICBlc2JfdGltZXJfa2VlcGFsaXZlICgpOworICAgICAgICBlc2JfdGltZXJfc3RhcnQgKCk7CisKKwlyZXR1cm4gbm9uc2Vla2FibGVfb3Blbihpbm9kZSwgZmlsZSk7Cit9CisKK3N0YXRpYyBpbnQgZXNiX3JlbGVhc2UgKHN0cnVjdCBpbm9kZSAqaW5vZGUsIHN0cnVjdCBmaWxlICpmaWxlKQoreworICAgICAgICAvKiBTaHV0IG9mZiB0aGUgdGltZXIuICovCisgICAgICAgIGlmIChlc2JfZXhwZWN0X2Nsb3NlID09IDQyKSB7CisgICAgICAgICAgICAgICAgZXNiX3RpbWVyX3N0b3AgKCk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgcHJpbnRrKEtFUk5fQ1JJVCBQRlggIlVuZXhwZWN0ZWQgY2xvc2UsIG5vdCBzdG9wcGluZyB3YXRjaGRvZyFcbiIpOworICAgICAgICAgICAgICAgIGVzYl90aW1lcl9rZWVwYWxpdmUgKCk7CisgICAgICAgIH0KKyAgICAgICAgY2xlYXJfYml0KDAsICZ0aW1lcl9hbGl2ZSk7CisgICAgICAgIGVzYl9leHBlY3RfY2xvc2UgPSAwOworICAgICAgICByZXR1cm4gMDsKK30KKworc3RhdGljIHNzaXplX3QgZXNiX3dyaXRlIChzdHJ1Y3QgZmlsZSAqZmlsZSwgY29uc3QgY2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opYXJnOworCWludCBfX3VzZXIgKnAgPSBhcmdwOworCXN0YXRpYyBzdHJ1Y3Qgd2F0Y2hkb2dfaW5mbyBpZGVudCA9IHsKKwkJLm9wdGlvbnMgPSAgICAgICAgICAgICAgV0RJT0ZfU0VUVElNRU9VVCB8CisJCQkJCVdESU9GX0tFRVBBTElWRVBJTkcgfAorCQkJCQlXRElPRl9NQUdJQ0NMT1NFLAorCQkuZmlybXdhcmVfdmVyc2lvbiA9ICAgICAwLAorCQkuaWRlbnRpdHkgPSAgICAgICAgICAgICBFU0JfTU9EVUxFX05BTUUsCisJfTsKKworCXN3aXRjaCAoY21kKSB7CisJCWNhc2UgV0RJT0NfR0VUU1VQUE9SVDoKKwkJCXJldHVybiBjb3B5X3RvX3VzZXIoYXJncCwgJmlkZW50LAorCQkJCQkgICAgc2l6ZW9mIChpZGVudCkpID8gLUVGQVVMVCA6IDA7CisKKwkJY2FzZSBXRElPQ19HRVRTVEFUVVM6CisJCQlyZXR1cm4gcHV0X3VzZXIgKGVzYl90aW1lcl9yZWFkKCksIHApOworCisJCWNhc2UgV0RJT0NfR0VUQk9PVFNUQVRVUzoKKwkJCXJldHVybiBwdXRfdXNlciAodHJpZ2dlcmVkLCBwKTsKKworICAgICAgICAgICAgICAgIGNhc2UgV0RJT0NfS0VFUEFMSVZFOgorICAgICAgICAgICAgICAgICAgICAgICAgZXNiX3RpbWVyX2tlZXBhbGl2ZSAoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwOworCisgICAgICAgICAgICAgICAgY2FzZSBXRElPQ19TRVRPUFRJT05TOgorICAgICAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChnZXRfdXNlciAobmV3X29wdGlvbnMsIHApKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsKKworICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5ld19vcHRpb25zICYgV0RJT1NfRElTQUJMRUNBUkQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNiX3RpbWVyX3N0b3AgKCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHZhbCA9IDA7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuZXdfb3B0aW9ucyAmIFdESU9TX0VOQUJMRUNBUkQpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNiX3RpbWVyX2tlZXBhbGl2ZSAoKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXNiX3RpbWVyX3N0YXJ0ICgpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR2YWwgPSAwOworICAgICAgICAgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0dmFsOworICAgICAgICAgICAgICAgIH0KKworICAgICAgICAgICAgICAgIGNhc2UgV0RJT0NfU0VUVElNRU9VVDoKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZ2V0X3VzZXIobmV3X2hlYXJ0YmVhdCwgcCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUZBVUxUOworCisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZXNiX3RpbWVyX3NldF9oZWFydGJlYXQobmV3X2hlYXJ0YmVhdCkpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGVzYl90aW1lcl9rZWVwYWxpdmUgKCk7CisgICAgICAgICAgICAgICAgICAgICAgICAvKiBGYWxsICovCisgICAgICAgICAgICAgICAgfQorCisgICAgICAgICAgICAgICAgY2FzZSBXRElPQ19HRVRUSU1FT1VUOgorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHB1dF91c2VyKGhlYXJ0YmVhdCwgcCk7CisKKyAgICAgICAgICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9JT0NUTENNRDsKKyAgICAgICAgfQorfQorCisvKgorICogICAgICBOb3RpZnkgc3lzdGVtCisgKi8KKworc3RhdGljIGludCBlc2Jfbm90aWZ5X3N5cyAoc3RydWN0IG5vdGlmaWVyX2Jsb2NrICp0aGlzLCB1bnNpZ25lZCBsb25nIGNvZGUsIHZvaWQgKnVudXNlZCkKK3sKKyAgICAgICAgaWYgKGNvZGU9PVNZU19ET1dOIHx8IGNvZGU9PVNZU19IQUxUKSB7CisgICAgICAgICAgICAgICAgLyogVHVybiB0aGUgV0RUIG9mZiAqLworICAgICAgICAgICAgICAgIGVzYl90aW1lcl9zdG9wICgpOworICAgICAgICB9CisKKyAgICAgICAgcmV0dXJuIE5PVElGWV9ET05FOworfQorCisvKgorICogICAgICBLZXJuZWwgSW50ZXJmYWNlcworICovCisKK3N0YXRpYyBzdHJ1Y3QgZmlsZV9vcGVyYXRpb25zIGVzYl9mb3BzID0geworICAgICAgICAub3duZXIgPSAgICAgICAgVEhJU19NT0RVTEUsCisgICAgICAgIC5sbHNlZWsgPSAgICAgICBub19sbHNlZWssCisgICAgICAgIC53cml0ZSA9ICAgICAgICBlc2Jfd3JpdGUsCisgICAgICAgIC5pb2N0bCA9ICAgICAgICBlc2JfaW9jdGwsCisgICAgICAgIC5vcGVuID0gICAgICAgICBlc2Jfb3BlbiwKKyAgICAgICAgLnJlbGVhc2UgPSAgICAgIGVzYl9yZWxlYXNlLAorfTsKKworc3RhdGljIHN0cnVjdCBtaXNjZGV2aWNlIGVzYl9taXNjZGV2ID0geworICAgICAgICAubWlub3IgPSAgICAgICAgV0FUQ0hET0dfTUlOT1IsCisgICAgICAgIC5uYW1lID0gICAgICAgICAid2F0Y2hkb2ciLAorICAgICAgICAuZm9wcyA9ICAgICAgICAgJmVzYl9mb3BzLAorfTsKKworc3RhdGljIHN0cnVjdCBub3RpZmllcl9ibG9jayBlc2Jfbm90aWZpZXIgPSB7CisgICAgICAgIC5ub3RpZmllcl9jYWxsID0gICAgICAgIGVzYl9ub3RpZnlfc3lzLAorfTsKKworLyoKKyAqIERhdGEgZm9yIFBDSSBkcml2ZXIgaW50ZXJmYWNlCisgKgorICogVGhpcyBkYXRhIG9ubHkgZXhpc3RzIGZvciBleHBvcnRpbmcgdGhlIHN1cHBvcnRlZAorICogUENJIGlkcyB2aWEgTU9EVUxFX0RFVklDRV9UQUJMRS4gIFdlIGRvIG5vdCBhY3R1YWxseQorICogcmVnaXN0ZXIgYSBwY2lfZHJpdmVyLCBiZWNhdXNlIHNvbWVvbmUgZWxzZSBtaWdodCBvbmUgZGF5CisgKiB3YW50IHRvIHJlZ2lzdGVyIGFub3RoZXIgZHJpdmVyIG9uIHRoZSBzYW1lIFBDSSBpZC4KKyAqLworc3RhdGljIHN0cnVjdCBwY2lfZGV2aWNlX2lkIGVzYl9wY2lfdGJsW10gPSB7CisgICAgICAgIHsgUENJX0RFVklDRShQQ0lfVkVORE9SX0lEX0lOVEVMLCBQQ0lfREVWSUNFX0lEX0lOVEVMX0VTQl85KSwgfSwKKyAgICAgICAgeyAwLCB9LCAgICAgICAgICAgICAgICAgLyogRW5kIG9mIGxpc3QgKi8KK307CitNT0RVTEVfREVWSUNFX1RBQkxFIChwY2ksIGVzYl9wY2lfdGJsKTsKKworLyoKKyAqICAgICAgSW5pdCAmIGV4aXQgcm91dGluZXMKKyAqLworCitzdGF0aWMgdW5zaWduZWQgY2hhciBfX2luaXQgZXNiX2dldGRldmljZSAodm9pZCkKK3sKKwl1OCB2YWwxOworCXVuc2lnbmVkIHNob3J0IHZhbDI7CisKKyAgICAgICAgc3RydWN0IHBjaV9kZXYgKmRldiA9IE5VTEw7CisgICAgICAgIC8qCisgICAgICAgICAqICAgICAgRmluZCB0aGUgUENJIGRldmljZQorICAgICAgICAgKi8KKworICAgICAgICBmb3JfZWFjaF9wY2lfZGV2KGRldikgeworICAgICAgICAgICAgICAgIGlmIChwY2lfbWF0Y2hfaWQoZXNiX3BjaV90YmwsIGRldikpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIGVzYl9wY2kgPSBkZXY7CisgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICB9CisJfQorCisgICAgICAgIGlmIChlc2JfcGNpKSB7CisgICAgICAgIAlpZiAocGNpX2VuYWJsZV9kZXZpY2UoZXNiX3BjaSkpIHsKKwkJCXByaW50ayAoS0VSTl9FUlIgUEZYICJmYWlsZWQgdG8gZW5hYmxlIGRldmljZVxuIik7CisJCQlnb3RvIGVycl9kZXZwdXQ7CisJCX0KKworCQlpZiAocGNpX3JlcXVlc3RfcmVnaW9uKGVzYl9wY2ksIDAsIEVTQl9NT0RVTEVfTkFNRSkpIHsKKwkJCXByaW50ayAoS0VSTl9FUlIgUEZYICJmYWlsZWQgdG8gcmVxdWVzdCByZWdpb25cbiIpOworCQkJZ290byBlcnJfZGlzYWJsZTsKKwkJfQorCisJCUJBU0VBRERSID0gaW9yZW1hcChwY2lfcmVzb3VyY2Vfc3RhcnQoZXNiX3BjaSwgMCksCisJCQkJICAgcGNpX3Jlc291cmNlX2xlbihlc2JfcGNpLCAwKSk7CisJCWlmIChCQVNFQUREUiA9PSBOVUxMKSB7CisgICAgICAgICAgICAgICAgCS8qIFNvbWV0aGluZydzIHdyb25nIGhlcmUsIEJBU0VBRERSIGhhcyB0byBiZSBzZXQgKi8KKwkJCXByaW50ayAoS0VSTl9FUlIgUEZYICJmYWlsZWQgdG8gZ2V0IEJBU0VBRERSXG4iKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gZXJyX3JlbGVhc2U7CisgICAgICAgICAgICAgICAgfQorCisJCS8qCisJCSAqIFRoZSB3YXRjaGRvZyBoYXMgdHdvIHRpbWVycywgaXQgY2FuIGJlIHNldHVwIHNvIHRoYXQgdGhlCisJCSAqIGV4cGlyeSBvZiB0aW1lcjEgcmVzd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CB2YWx1ZSBtdXN0IGJlIDE8aGVhcnRiZWF0PDIwNDYsIHVzaW5nICVkXG4iLAorCQkgICAgICAgaGVhcnRiZWF0KTsKKyAgICAgICAgfQorCisgICAgICAgIHJldCA9IHJlZ2lzdGVyX3JlYm9vdF9ub3RpZmllcigmZXNiX25vdGlmaWVyKTsKKyAgICAgICAgaWYgKHJldCAhPSAwKSB7CisgICAgICAgICAgICAgICAgcHJpbnRrKEtFUk5fRVJSIFBGWCAiY2Fubm90IHJlZ2lzdGVyIHJlYm9vdCBub3RpZmllciAoZXJyPSVkKVxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldCk7CisgICAgICAgICAgICAgICAgZ290byBlcnJfdW5tYXA7CisgICAgICAgIH0KKworICAgICAgICByZXQgPSBtaXNjX3JlZ2lzdGVyKCZlc2JfbWlzY2Rldik7CisgICAgICAgIGlmIChyZXQgIT0gMCkgeworICAgICAgICAgICAgICAgIHByaW50ayhLRVJOX0VSUiBQRlggImNhbm5vdCByZWdpc3RlciBtaXNjZGV2IG9uIG1pbm9yPSVkIChlcnI9JWQpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgV0FUQ0hET0dfTUlOT1IsIHJldCk7CisgICAgICAgICAgICAgICAgZ290byBlcnJfbm90aWZpZXI7CisgICAgICAgIH0KKworICAgICAgICBlc2JfdGltZXJfc3RvcCAoKTsKKworICAgICAgICBwcmludGsgKEtFUk5fSU5GTyBQRlggImluaXRpYWxpemVkICgweCVwKS4gaGVhcnRiZWF0PSVkIHNlYyAobm93YXlvdXQ9JWQpXG4iLAorICAgICAgICAgICAgICAgIEJBU0VBRERSLCBoZWFydGJlYXQsIG5vd2F5b3V0KTsKKworICAgICAgICByZXR1cm4gMDsKKworZXJyX25vdGlmaWVyOgorICAgICAgICB1bnJlZ2lzdGVyX3JlYm9vdF9ub3RpZmllcigmZXNiX25vdGlmaWVyKTsKK2Vycl91bm1hcDoKKwlpb3VubWFwKEJBU0VBRERSKTsKKy8qIGVyc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TQwMHMKKyAqCUUgfAk3LjVzCTc1cwk3NTBzCTE1MDBzCisgKglGIHwJOHMJODBzIAk4MDBzIAkxNjAwcworICoKKyAqIEFub3RoZXIgd2F5IHRvIHNheSB0aGUgc2FtZSB0aGluZ3MgaXM6CisgKiAgRm9yIE49MSwgVGltZW91dCA9IChNKzEpICogMC41cworICogIEZvciBOPTIsIFRpbWVvdXQgPSAoTSsxKSAqIDVzCisgKiAgRm9yIE49MywgVGltZW91dCA9IChNKzEpICogNTBzCisgKiAgRm9yIE49NCwgVGltZW91dCA9IChNKzEpICogMTAwcworICoKKyAqLworCitzdGF0aWMgaW50IHdkX3RpbWVzWzY0XVsyXSA9IHsKKwl7MCwgMX0sCQkJLyogMCAgPSAwLjVzICovCisJezEsIDF9LAkJCS8qIDEgID0gMXMgICAqLworCXsyLCAxfSwJCQkvKiAyICA9IDEuNXMgKi8KKwl7MywgMX0sCQkJLyogMyAgPSAycyAgICovCisJezQsIDF9LAkJCS8qIDQgID0gMi41cyAqLworCXs1LCAxfSwJCQkvKiA1ICA9IDNzICAgKi8KKwl7NiwgMX0sCQkJLyogNiAgPSAzLjVzICovCisJezcsIDF9LAkJCS8qIDcgID0gNHMgICAqLworCXs4LCAxfSwJCQkvKiA4ICA9IDQuNXMgKi8KKwl7OSwgMX0sCQkJLyogOSAgPSA1cyAgICovCisJezB4QSwgMX0sCQkvKiAxMCA9IDUuNXMgKi8KKwl7MHhCLCAxfSwJCS8qIDExID0gNnMgICAqLworCXsweEMsIDF9LAkJLyogMTIgPSA2LjVzICovCisJezB4RCwgMX0sCQkvKiAxMyA9IDdzICAgKi8KKwl7MHhFLCAxfSwJCS8qIDE0ID0gNy41cyAqLworCXsweEYsIDF9LAkJLyogMTUgPSA4cyAgICovCisJezAsIDJ9LAkJCS8qIDE2ID0gNXMgICovCisJezEsIDJ9LAkJCS8qIDE3ID0gMTBzICovCisJezIsIDJ9LAkJCS8qIDE4ID0gMTVzICovCisJezMsIDJ9LAkJCS8qIDE5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VybiAweDAxLgorCSAqCisJICogVGhlIDB4MDIgdmFsdWUgb2NjdXJzIHdoZW4gdGhlIGNoaXAgaGFzIGJlZW4gcHJldmlvdXNseSBpbml0aWFsaXplZC4KKwkgKi8KKwlpZiAoX19jaGVja19sYXRjaCgweDE2MTEsIDB4MDMpICYmCisJCSAgICAgX19jaGVja19sYXRjaCgweDE2MTEsIDB4MDIpICYmCisJCSAgICAgX19jaGVja19sYXRjaCgweDE2MTEsIDB4MDEpKQorCQlnb3RvIG91dDsKKworCXByaW50ayhLRVJOX0RFQlVHICJoZGFwczogaW5pdGlhbCBsYXRjaCBjaGVjayBnb29kICgweCUwMngpLlxuIiwKKwkgICAgICAgX19nZXRfbGF0Y2goMHgxNjExKSk7CisKKwlvdXRiKDB4MTcsIDB4MTYxMCk7CisJb3V0YigweDgxLCAweDE2MTEpOworCW91dGIoMHgwMSwgMHgxNjFmKTsKKwlpZiAoX193YWl0X2xhdGNoKDB4MTYxZiwgMHgwMCkpCisJCWdvdG8gb3V0OworCWlmIChfX3dhaXRfbGF0Y2goMHgxNjExLCAweDAwKSkKKwkJZ290byBvdXQ7CisJaWYgKF9fd2FpdF9sYXRjaCgweDE2MTIsIDB4NjApKQorCQlnb3RvIG91dDsKKwlpZiAoX193YWl0X2xhdGNoKDB4MTYxMywgMHgwMCkpCisJCWdvdG8gb3V0OworCW91dGIoMHgxNCwgMHgxNjEwKTsKKwlvdXRiKDB4MDEsIDB4MTYxMSk7CisJb3V0YigweDAxLCAweDE2MWYpOworCWlmIChfX3dhaXRfbGF0Y2goMHgxNjFmLCAweDAwKSkKKwkJZ290byBvdXQ7CisJb3V0YigweDEwLCAweDE2MTApOworCW91dGIoMHhjOCwgMHgxNjExKTsKKwlvdXRiKDB4MDAsIDB4MTYxMik7CisJb3V0YigweDAyLCAweDE2MTMpOworCW91dGIoMHgwMSwgMHgxNjFmKTsKKwlpZiAoX193YWl0X2xhdGNoKDB4MTYxZiwgMHgwMCkpCisJCWdvdG8gb3V0Owor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N0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByKQoreworCVNpU19Qci0+U2lTX01vZGVSZXNJbmZvICAgPSBTaVNVU0JfTW9kZVJlc0luZm87CisJU2lTX1ByLT5TaVNfU3RhbmRUYWJsZSAgICA9IFNpU1VTQl9TdGFuZFRhYmxlOworCisJU2lTX1ByLT5TaVNfU01vZGVJRFRhYmxlICA9IFNpU1VTQl9TTW9kZUlEVGFibGU7CisJU2lTX1ByLT5TaVNfRU1vZGVJRFRhYmxlICA9IFNpU1VTQl9FTW9kZUlEVGFibGU7CisJU2lTX1ByLT5TaVNfUmVmSW5kZXggICAgICA9IFNpU1VTQl9SZWZJbmRleDsKKwlTaVNfUHItPlNpU19DUlQxVGFibGUgICAgID0gU2lTVVNCX0NSVDFUYWJsZTsKKworCVNpU19Qci0+U2lTX1ZDTEtEYXRhICAgICAgPSBTaVNVU0JfVkNMS0RhdGE7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgIEhFTFBFUjogR2V0IE1vZGVJRCAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordW5zaWduZWQgc2hvcnQKK1NpU1VTQl9HZXRNb2RlSUQoaW50IEhEaXNwbGF5LCBpbnQgVkRpc3BsYXksIGludCBEZXB0aCkKK3sKKwl1bnNpZ25lZCBzaG9ydCBNb2RlSW5kZXggPSAwOworCisJc3dpdGNoIChIRGlzcGxheSkKKwl7CisJCWNhc2UgMzIwOgorCQkJaWYgKFZEaXNwbGF5ID09IDIwMCkKKwkJCQlNb2RlSW5kZXggPSBNb2RlSW5kZXhfMzIweDIwMFtEZXB0aF07CisJCQllbHNlIGlmIChWRGlzcGxheSA9PSAyNDApCisJCQkJTW9kZUluZGV4ID0gTW9kZUluZGV4XzMyMHgyNDBbRGVwdGhdOworCQkJYnJlYWs7CisJCWNhc2UgNDAwOgorCQ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itTaVNfRGlzcGxheU9uKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByKQoreworCVNpU19TZXRSZWdBTkQoU2lTX1ByLCBTaVNfUHItPlNpU19QM2M0LCAweDAxLCAweERGKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICAgICBIRUxQRVI6IEluaXQgUG9ydCBBZGRyZXNzZXMgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkCitTaVNVU0JSZWdJbml0KHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByLCB1bnNpZ25lZCBsb25nIEJhc2VBZGRyKQoreworCVNpU19Qci0+U2lTX1AzYzQgPSBCYXNlQWRkciArIDB4MTQ7CisJU2lTX1ByLT5TaVNfUDNkNCA9IEJhc2VBZGRyICsgMHgyNDsKKwlTaVNfUHItPlNpU19QM2MwID0gQmFzZUFkZHIgKyAweDEwOworCVNpU19Qci0+U2lTX1AzY2UgPSBCYXNlQWRkciArIDB4MWU7CisJU2lTX1ByLT5TaVNfUDNjMiA9IEJhc2VBZGRyICsgMHgxMjsKKwlTaVNfUHItPlNpU19QM2NhID0gQmFzZUFkZHIgKyAweDFhOworCVNpU19Qci0+U2lTX1AzYzYgPSBCYXNlQWRkciArIDB4MTY7CisJU2lTX1ByLT5TaVNfUDNjNyA9IEJhc2VBZGRyICsgMHgxNzsKKwlTaVNfUHItPlNpU19QM2M4ID0gQmFzZUFkZHIgKyAweDE4OworCVNpU19Qci0+U2lTX1AzYzkgPSBCYXNlQWRkciArIDB4MTk7CisJU2lTX1ByLT5TaVNfUDNjYiA9IEJhc2VBZGRyICsgMHgxYjsKKwlTaVNfUHItPlNpU19QM2NjID0gQmFzZUFkZHIgKyAweDFjOworCVNpU19Qci0+U2lTX1AzY2QgPSBCYXNlQWRkciArIDB4MWQ7CisJU2lTX1ByLT5TaVNfUDNkYSA9IEJhc2VBZGRyICsgMHgyYTsKKwlTaVNfUHItPlNpU19QYXJ0MVBvcnQgPSBCYXNlQWRkciArIFNJU19DUlQyX1BPUlRfMDQ7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgICBIRUxQRVI6IEdldFN5c0ZsYWdzICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQKK1NpU19HZXRTeXNGbGFncyhzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QcikKK3sKKwlTaVNfUHItPlNpU19NeUNSNjMgPSAweDYzOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogICAgICAgICBIRUxQRVI6IEluaXQgUENJICYgRW5naW5lcyAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkCitTaVNJbml0UENJZXRjKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByKQoreworCVNpU19TZXRSZWcoU2lTX1ByLCBTaVNfUHItPlNpU19QM2M0LCAweDIwLCAweGExKTsKKwkvKiAgLSBFbmFibGUgMkQgKDB4NDApCisJICogIC0gRW5hYmxlIDNEICgweDAyKQorCSAqICAtIEVuYWJsZSAzRCB2ZXJ0ZXggY29tbWFuZCBmZXRjaCAoMHgxMCkKKwkgKiAgLSBFbmFibGUgM0QgY29tbWFuZCBwYXJzZXIgKDB4MDgpCisJICogIC0gRW5hYmxlIDNEIEcvTCB0cmFuc2Zvcm1hdGlvbiBlbmdpbmUgKDB4ODApCisJICovCisJU2lTX1NldFJlZ09SKFNpU19QciwgU2lTX1ByLT5TaVNfUDNjNCwgMHgxRSwgMHhEQSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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WVudFJlZyhTaVNfUHIpOworCVNpU19SZXNldFNlZ21lbnRSZWdPdmVyKFNpU19Qcik7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgSEVMUEVSOiBTZWFyY2hNb2RlSUQgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIGludAorU2lTX1NlYXJjaE1vZGVJRChzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QciwgdW5zaWduZWQgc2hvcnQgKk1vZGVObywKKwkJCQkJCXVuc2lnbmVkIHNob3J0ICpNb2RlSWRJbmRleCkKK3sKKwlpZiAoKCpNb2RlTm8pIDw9IDB4MTMpIHsKKworCQlpZiAoKCpNb2RlTm8pICE9IDB4MDMpCisJCQlyZXR1cm4gMDsKKworCQkoKk1vZGVJZEluZGV4KSA9IDA7CisKKwl9IGVsc2UgeworCisJCWZvcigqTW9kZUlkSW5kZXggPSAwOyA7KCpNb2RlSWRJbmRleCkrKykgeworCisJCQlpZiAoU2lTX1ByLT5TaVNfRU1vZGVJRFRhYmxlWypNb2RlSWRJbmRleF0uRXh0X01vZGVJRCA9PSAoKk1vZGVObykpCisJCQkJYnJlYWs7CisKKwkJCWlmIChTaVNfUHItPlNpU19FTW9kZUlEVGFibGVbKk1vZGVJZEluZGV4XS5FeHRfTW9kZUlEID09IDB4RkYpCisJCQkJcmV0dXJuIDA7CisJCX0KKworCX0KKworCXJldHVybiAxOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogICAgICAgICAgICBIRUxQRVI6IEVOQUJMRSBDUlQxICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkCitTaVNfSGFuZGxlQ1JUMShzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QcikKK3sKKwkvKiBFbmFibGUgQ1JUMSBnYXRpbmcgKi8KKwlTaVNfU2V0UmVnQU5EKFNpU19QciwgU2lTX1ByLT5TaVNfUDNkNCwgU2lTX1ByLT5TaVNfTXlDUjYzLCAweGJmKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICAgICAgICBIRUxQRVI6IEdldENvbG9yRGVwdGggICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdW5zaWduZWQgc2hvcnQKK1NpU19HZXRDb2xvckRlcHRoKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByLCB1bnNpZ25lZCBzaG9ydCBNb2RlTm8sCisJCXVuc2lnbmVkIHNob3J0IE1vZGVJZEluZGV4KQoreworCXN0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBDb2xvckRlcHRoWzZdID0geyAxLCAyLCA0LCA0LCA2LCA4fTsKKwl1bnNpZ25lZCBzaG9ydCBtb2RlZmxhZzsKKwlzaG9ydCBpbmRleDsKKworCWlmIChNb2RlTm8gPD0gMHgxMykgeworCQltb2RlZmxhZyA9IFNpU19Qci0+U2lTX1NNb2RlSURUYWJsZVtNb2RlSWRJbmRleF0uU3RfTW9kZUZsYWc7CisJfSBlbHNlIHsKKwkJbW9kZWZsYWcgPSBTaVNfUHItPlNpU19FTW9kZUlEVGFibGVbTW9kZUlkSW5kZXhdLkV4dF9Nb2RlRmxhZzsKKwl9CisKKwlpbmRleCA9IChtb2RlZmxhZyAmIE1vZGVUeXBlTWFzaykgLSBNb2RlRUdBOworCWlmIChpbmRleCA8IDApIGluZGV4ID0gMDsKKwlyZXR1cm4gQ29sb3JEZXB0aFtpbmRleF07Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgICBIRUxQRVI6IEdldE9mZnNldCAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHVuc2lnbmVkIHNob3J0CitTaVNfR2V0T2Zmc2V0KHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByLCB1bnNpZ25lZCBzaG9ydCBNb2RlTm8sCisJCXVuc2lnbmVkIHNob3J0IE1vZGVJZEluZGV4LCB1bnNpZ25lZCBzaG9ydCBycnRpKQoreworCXVuc2lnbmVkIHNob3J0IHhyZXMsIHRlbXAsIGNvbG9yZGVwdGgsIGluZm9mbGFnOworCisJaW5mb2ZsYWcgPSBTaVNfUHItPlNpU19SZWZJbmRleFtycnRpXS5FeHRfSW5mb0ZsYWc7CisJeHJlcyA9IFNpU19Qci0+U2lTX1JlZkluZGV4W3JydGldLlhSZXM7CisKKwljb2xvcmRlcHRoID0gU2lTX0dldENvbG9yRGVwdGgoU2lTX1ByLCBNb2RlTm8sIE1vZGVJZEluZGV4KTsKKworCXRlbXAgPSB4cmVzIC8gMTY7CisKKwlpZiAoaW5mb2ZsYWcgJiBJbnRlcmxhY2VNb2RlKQorCQl0ZW1wIDw8PSAxOworCisJdGVtcCAqPSBjb2xvcmRlcHRoOworCisJaWYgKHhyZXMgJSAxNikKKwkJdGVtcCArPSAoY29sb3JkZXB0aCA+PiAxKTsKKworCXJldHVybiB0ZW1wOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogICAgICAgICAgICAgICAgICAgU0VRICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkCitTaVNfU2V0U2VxUmVncyhzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QciwgdW5zaWduZWQgc2hvcnQgU3RhbmRUYWJsZUluZGV4KQoreworCXVuc2lnbmVkIGNoYXIgU1JkYXRhOworCWludCBpOworCisJU2lTX1NldFJlZyhTaVNfUHIsIFNpU19Qci0+U2lTX1AzYzQsIDB4MDAsIDB4MDMpOworCisJU1JkYXRhID0gU2lTX1ByLT5TaVNfU3RhbmRUYWJsZVtTdGFuZFRhYmxlSW5kZXhdLlNSWzBdIHwgMHgyMDsKKwlTaVNfU2V0UmVnKFNpU19QciwgU2lTX1ByLT5TaVNfUDNjNCwgMHgwMSwgU1JkYXRhKTsKKworCWZvcihpID0gMjsgaSA8PSA0OyBpKyspIHsKKwkJU1JkYXRhID0gU2lTX1ByLT5TaVNfU3RhbmRUYWJsZVtTdGFuZFRhYmxlSW5kZXhdLlNSW2ktMV07CisJCVNpU19TZXRSZWcoU2lTX1ByLCBTaVNfUHItPlNpU19QM2M0LCBpLCBTUmRhdGEpOworCX0KK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICAgICAgICAgICAgICAgTUlTQyAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAorU2lTX1NldE1pc2NSZWdzKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByLCB1bnNpZ25lZCBzaG9ydCBTdGFuZFRhYmxlSW5kZXgpCit7CisJdW5zaWduZWQgY2hhciBNaXNjZGF0YSA9IFNpU19Qci0+U2lTX1N0YW5kVGFibGVbU3RhbmRUYWJsZUluZGV4XS5NSVNDOworCisJU2lTX1NldFJlZ0J5dGUoU2lTX1ByLCBTaVNfUHItPlNpU19QM2MyLCBNaXNjZGF0YSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgICAgICAgIENSVEMgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc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RSZWdBTkQoU2lTX1ByLCBTaVNfUHItPlNpU19QM2NlLCAweDA1LCAweEJGKTsKKwl9Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICBDTEVBUiBFWFRFTkRFRCBSRUdJU1RFUlMgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQKK1NpU19DbGVhckV4dDFSZWdzKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByLCB1bnNpZ25lZCBzaG9ydCBNb2RlTm8pCit7CisJaW50IGk7CisKKwlmb3IoaSA9IDB4MEE7IGkgPD0gMHgwRTsgaSsrKSB7CisJCVNpU19TZXRSZWcoU2lTX1ByLCBTaVNfUHItPlNpU19QM2M0LCBpLCAweDAwKTsKKwl9CisKKwlTaVNfU2V0UmVnQU5EKFNpU19QciwgU2lTX1ByLT5TaVNfUDNjNCwgMHgzNywgMHhGRSk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgICAgR2V0IHJhdGUgaW5kZXggICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHVuc2lnbmVkIHNob3J0CitTaVNfR2V0UmF0ZVB0cihzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QciwgdW5zaWduZWQgc2hvcnQgTW9kZU5vLAorCQkJCQl1bnNpZ25lZCBzaG9ydCBNb2RlSWRJbmRleCkKK3sKKwl1bnNpZ25lZCBzaG9ydCBycnRpLCBpLCBpbmRleCwgdGVtcDsKKworCWlmIChNb2RlTm8gPD0gMHgxMykKKwkJcmV0dXJuIDB4RkZGRjsKKworCWluZGV4ID0gU2lTX0dldFJlZyhTaVNfUHIsU2lTX1ByLT5TaVNfUDNkNCwgMHgzMykgJiAweDBGOworCWlmIChpbmRleCA+IDApIGluZGV4LS07CisKKwlycnRpID0gU2lTX1ByLT5TaVNfRU1vZGVJRFRhYmxlW01vZGVJZEluZGV4XS5SRUZpbmRleDsKKwlNb2RlTm8gPSBTaVNfUHItPlNpU19SZWZJbmRleFtycnRpXS5Nb2RlSUQ7CisKKwlpID0gMDsKKwlkbyB7CisJCWlmIChTaVNfUHItPlNpU19SZWZJbmRleFtycnRpICsgaV0uTW9kZUlEICE9IE1vZGVObykKKwkJCWJyZWFrOworCisJCXRlbXAgPSBTaVNfUHItPlNpU19SZWZJbmRleFtycnRpICsgaV0uRXh0X0luZm9GbGFnICYgTW9kZVR5cGVNYXNrOworCQlpZiAodGVtcCA8IFNpU19Qci0+U2lTX01vZGVUeXBlKQorCQkJYnJlYWs7CisKKwkJaSsrOworCQlpbmRleC0tOworCX0gd2hpbGUoaW5kZXggIT0gMHhGRkZGKTsKKworCWktLTsKKworCXJldHVybiAocnJ0aSArIGkpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogICAgICAgICAgICAgICAgICBTWU5DICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkCitTaVNfU2V0Q1JUMVN5bmMoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIHVuc2lnbmVkIHNob3J0IHJydGkpCit7CisJdW5zaWduZWQgc2hvcnQgc3luYyA9IFNpU19Qci0+U2lTX1JlZkluZGV4W3JydGldLkV4dF9JbmZvRmxhZyA+PiA4OworCXN5bmMgJj0gMHhDMDsKKwlzeW5jIHw9IDB4MmY7CisJU2lTX1NldFJlZ0J5dGUoU2lTX1ByLCBTaVNfUHItPlNpU19QM2MyLCBzeW5jKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICA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YmxlW2luZGV4XS5DUltpXSk7CisJfQorCWZvcihqID0gMHgwQTsgaSA8PSAxNTsgaSsrLCBqKyspIHsKKwkJU2lTX1NldFJlZyhTaVNfUHIsIFNpU19Qci0+U2lTX1AzYzQsIGosCisJCQkJU2lTX1ByLT5TaVNfQ1JUMVRhYmxlW2luZGV4XS5DUltpXSk7CisJfQorCisJdGVtcCA9IFNpU19Qci0+U2lTX0NSVDFUYWJsZVtpbmRleF0uQ1JbMTZdICYgMHhFMDsKKwlTaVNfU2V0UmVnKFNpU19QcixTaVNfUHItPlNpU19QM2M0LCAweDBFLCB0ZW1wKTsKKworCXRlbXAgPSAoKFNpU19Qci0+U2lTX0NSVDFUYWJsZVtpbmRleF0uQ1JbMTZdKSAmIDB4MDEpIDw8IDU7CisJaWYgKG1vZGVmbGFnICYgRG91YmxlU2Nhbk1vZGUpICB0ZW1wIHw9IDB4ODA7CisJU2lTX1NldFJlZ0FORE9SKFNpU19QciwgU2lTX1ByLT5TaVNfUDNkNCwgMHgwOSwgMHg1RiwgdGVtcCk7CisKKwlpZiAoU2lTX1ByLT5TaVNfTW9kZVR5cGUgPiBNb2RlVkdBKQorCQlTaVNfU2V0UmVnKFNpU19QciwgU2lTX1ByLT5TaVNfUDNkNCwgMHgxNCwgMHg0Rik7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgICAgICAgICAgICAgIE9GRlNFVCAmIFBJVENIICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAocGFydGx5IG92ZXJydWxlZCBieSBTZXRQaXRjaCgpIGluIFhGODYpICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAorU2lTX1NldENSVDFPZmZzZXQoc3RydWN0IFNpU19Qcml2YXRlICpTaVNfUHIsIHVuc2lnbmVkIHNob3J0IE1vZGVObywKKwkJCXVuc2lnbmVkIHNob3J0IE1vZGVJZEluZGV4LCB1bnNpZ25lZCBzaG9ydCBycnRpKQoreworCXVuc2lnbmVkIHNob3J0IGR1ID0gU2lTX0dldE9mZnNldChTaVNfUHIsIE1vZGVObywgTW9kZUlkSW5kZXgsIHJydGkpOworCXVuc2lnbmVkIHNob3J0IGluZm9mbGFnID0gIFNpU19Qci0+U2lTX1JlZkluZGV4W3JydGldLkV4dF9JbmZvRmxhZzsKKwl1bnNpZ25lZCBzaG9ydCB0ZW1wOworCisJdGVtcCA9IChkdSA+PiA4KSAmIDB4MGY7CisJU2lTX1NldFJlZ0FORE9SKFNpU19QciwgU2lTX1ByLT5TaVNfUDNjNCwgMHgwRSwgMHhGMCwgdGVtcCk7CisKKwlTaVNfU2V0UmVnKFNpU19QciwgU2lTX1ByLT5TaVNfUDNkNCwgMHgxMywgKGR1ICYgMHhGRikpOworCisJaWYgKGluZm9mbGFnICYgSW50ZXJsYWNlTW9kZSkgZHUgPj49IDE7CisKKwlkdSA8PD0gNTsKKwl0ZW1wID0gKGR1ID4+IDgpICYgMHhmZjsKKwlpZiAoZHUgJiAweGZmKSB0ZW1wKys7CisJdGVtcCsrOworCVNpU19TZXRSZWcoU2lTX1ByLCBTaVNfUHItPlNpU19QM2M0LCAweDEwLCB0ZW1wKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICAgICAgICAgICAgICAgVkNMSyAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAorU2lTX1NldENSVDFWQ0xLKHN0cnVjdCBTaVNfUHJpdmF0ZSAqU2lTX1ByLCB1bnNpZ25lZCBzaG9ydCBNb2RlTm8sCisJCQkJCQl1bnNpZ25lZCBzaG9ydCBycnRpKQoreworCXVuc2lnbmVkIHNob3J0IGluZGV4ID0gU2lTX1ByLT5TaVNfUmVmSW5kZXhbcnJ0aV0uRXh0X0NSVFZDTEs7CisJdW5zaWduZWQgc2hvcnQgY2xrYSA9IFNpU19Qci0+U2lTX1ZDTEtEYXRhW2luZGV4XS5TUjJCOworCXVuc2lnbmVkIHNob3J0IGNsa2IgPSBTaVNfUHItPlNpU19WQ0xLRGF0YVtpbmRleF0uU1IyQzsKKworCVNpU19TZXRSZWdBTkQoU2lTX1ByLCBTaVNfUHItPlNpU19QM2M0LDB4MzEsMHhDRik7CisKKwlTaVNfU2V0UmVnKFNpU19QcixTaVNfUHItPlNpU19QM2M0LDB4MkIsY2xrYSk7CisJU2lTX1NldFJlZyhTaVNfUHIsU2lTX1ByLT5TaVNfUDNjNCwweDJDLGNsa2IpOworCVNpU19TZXRSZWcoU2lTX1ByLFNpU19Qci0+U2lTX1AzYzQsMHgyRCwweDAxKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICAgICAgICAgICAgICAgRklGTyAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAorU2lTX1NldENSVDFGSUZPXzMxMChzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QciwgdW5zaWduZWQgc2hvcnQgTW9kZU5vLAorCQkJCQkJCXVuc2lnbmVkIHNob3J0IG1pKQoreworCXVuc2lnbmVkIHNob3J0IG1vZGVmbGFnID0gU2lTX1ByLT5TaVNfRU1vZGVJRFRhYmxlW21pXS5FeHRfTW9kZUZsYWc7CisKKwkvKiBkaXNhYmxlIGF1dG8tdGhyZXNob2xkICovCisJU2lTX1NldFJlZ0FORChTaVNfUHIsIFNpU19Qci0+U2lTX1AzYzQsIDB4M0QsIDB4RkUpOworCisJU2lTX1NldFJlZyhTaVNfUHIsIFNpU19Qci0+U2lTX1AzYzQsIDB4MDgsIDB4QUUpOworCVNpU19TZXRSZWd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isJCQlkYXRhID4+PSAyOworCQl9CisJfQorCisJaWYgKHRpbWUgPT0gMjU2KSB7CisJCWZvcihpID0gMTY7IGkgPCAzMjsgaSsrKSB7CisJCQlkYXRhID0gdGFibGVbaV0gPDwgc2Y7CisJCQlmb3IoayA9IDA7IGsgPCAzOyBrKyspCisJCQkJU2lTX1NldFJlZ0J5dGUoU2lTX1ByLCBEQUNEYXRhLCBkYXRhKTsKKwkJfQorCQlzaSA9IDMyOworCQlmb3IobSA9IDA7IG0gPCA5OyBtKyspIHsKKwkJCWRpID0gc2k7CisJCQlieCA9IHNpICsgNDsKKwkJCWZvcihuID0gMDsgbiA8IDM7IG4rKykgeworCQkJCWZvcihvID0gMDsgbyA8IDU7IG8rKykgeworCQkJCQlTaVNfV3JpdGVEQUMoU2lTX1ByLCBEQUNEYXRhLCBzZiwgbiwKKwkJCQkJCXRhYmxlW2RpXSwgdGFibGVbYnhdLCB0YWJsZVtzaV0pOworCQkJCQlzaSsrOworCQkJCX0KKwkJCQlzaSAtPSAyOworCQkJCWZvcihvID0gMDsgbyA8IDM7IG8rKykgeworCQkJCQlTaVNfV3JpdGVEQUMoU2lTX1ByLCBEQUNEYXRhLCBzZiwgbiwKKwkJCQkJCXRhYmxlW2RpXSwgdGFibGVbc2ldLCB0YWJsZVtieF0pOworCQkJCQlzaS0tOworCQkJCX0KKwkJCX0KKwkJc2kgKz0gNTsKKwkJfQorCX0KK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICAgICAgICAgU0VUIENSVDEgUkVHSVNURVIgR1JPVVAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZAorU2lTX1NldENSVDFHcm91cChzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QciwgdW5zaWduZWQgc2hvcnQgTW9kZU5vLAorCQkJCQl1bnNpZ25lZCBzaG9ydCBNb2Rl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W9kZU5vLCBNb2RlSWRJbmRleCwgcnJ0aSk7CisKKwlTaVNfTG9hZERBQyhTaVNfUHIsIE1vZGVObywgTW9kZUlkSW5kZXgpOworCisJU2lTX0Rpc3BsYXlPbihTaVNfUHIpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogICAgICAgICAgICAgICAgIFNpU1NldE1vZGUoKSAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2ludAorU2lTVVNCU2V0TW9kZShzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QciwgdW5zaWduZWQgc2hvcnQgTW9kZU5vKQoreworCXVuc2lnbmVkIHNob3J0IE1vZGVJZEluZGV4OworCXVuc2lnbmVkIGxvbmcgIEJhc2VBZGRyID0gU2lTX1ByLT5JT0FkZHJlc3M7CisKKwlTaVNVU0JfSW5pdFB0cihTaVNfUHIpOworCVNpU1VTQlJlZ0luaXQoU2lTX1ByLCBCYXNlQWRkcik7CisJU2lTX0dldFN5c0ZsYWdzKFNpU19Qcik7CisKKwlpZiAoIShTaVNfU2VhcmNoTW9kZUlEKFNpU19QciwgJk1vZGVObywgJk1vZGVJZEluZGV4KSkpCisJCXJldHVybiAwOworCisJU2lTX1NldFJlZyhTaVNfUHIsIFNpU19Qci0+U2lTX1AzYzQsIDB4MDUsIDB4ODYpOworCisJU2lTSW5pdFBDSWV0YyhTaVNfUHIpOworCisJTW9kZU5vICY9IDB4N2Y7CisKKwlTaVNfUHItPlNpU19Nb2RlVHlwZSA9CisJCVNpU19Qci0+U2lTX0VNb2RlSURUYWJsZVtNb2RlSWRJbmRleF0uRXh0X01vZGVGbGFnICYgTW9kZVR5cGVNYXNrOworCisJU2lTX1ByLT5TaVNfU2V0RmxhZyA9IExvd01vZGVUZXN0czsKKworCS8qIFNldCBtb2RlIG9uIENSVDEgKi8KKwlTaVNfU2V0Q1JUMUdyb3VwK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DAwLCAweDAwfSwgLyogMHg0ICovCisJezB4MDA0NywweDEyLDB4MGQsMHgwMCwweDA1LDB4MzAsIDgwMCwgNjAwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHg1ICovCisJezB4MDA0NywweDEzLDB4MTMsMHgwMCwweDA1LDB4MzAsIDgwMCwgNjAwLCAweDIwLCAweDAwLCAweDAwfSwgLyogMHg2ICovCisJezB4MDEwNywweDE0LDB4MWMsMHgwMCwweDA1LDB4MzAsIDgwMCwgNjAwLCAweDIwLCAweDAwLCAweDAwfSwgLyogMHg3ICovCisJezB4Yzg1ZiwweDA1LDB4MDAsMHgwNCwweDA0LDB4MmUsIDY0MCwgNDgwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHg4ICovCisJezB4YzA2NywweDA2LDB4MDIsMHgwNCwweDA0LDB4MmUsIDY0MCwgNDgwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHg5ICovCisJezB4YzA2NywweDA3LDB4MDIsMHg0NywweDA0LDB4MmUsIDY0MCwgNDgwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHhhICovCisJezB4YzA2NywweDA4LDB4MDMsMHg4YSwweDA0LDB4MmUsIDY0MCwgNDgwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHhiICovCisJezB4YzA0NywweDA5LDB4MDUsMHgwMCwweDA0LDB4MmUsIDY0MCwgNDgwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHhjICovCisJezB4YzA0NywweDBhLDB4MDksMHgwMCwweDA0LDB4MmUsIDY0MCwgNDgwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHhkICovCisJezB4YzA0NywweDBiLDB4MGUsMHgwMCwweDA0LDB4MmUsIDY0MCwgNDgwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHhlICovCisJezB4YzA0NywweDBjLDB4MTUsMHgwMCwweDA0LDB4MmUsIDY0MCwgNDgwLCAweDQwLCAweDAwLCAweDAwfSwgLyogMHhmICovCisJezB4NDg3Ziwwe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ywweDEwLDB4MDAsMHgwNywKKyAgIDB4MDF9fSwgLyogMHgzYiAqLworIHt7MHg2YiwweDU5LDB4NTksMHg4ZiwweDVlLDB4OGMsMHgwYiwweDNlLAorICAgMHhlOSwweDhiLDB4ZGYsMHhlNywweDA0LDB4MDAsMHgwMCwweDA1LAorICAgMHgwMH19LCAvKiAweDNjICovCisge3sweDZkLDB4NTksMHg1OSwweDkxLDB4NjAsMHg4OSwweDUzLDB4ZjAsCisgICAweDQxLDB4ODQsMHgzZiwweDNmLDB4NTQsMHgwMCwweDAwLDB4MDUsCisgICAweDQxfX0sIC8qIDB4M2QgKi8KKyB7ezB4ODYsMHg2YSwweDZhLDB4OGEsMHg3NCwweDA2LDB4OGMsMHgxNSwKKyAgIDB4NGYsMHg4MywweGVmLDB4ZWYsMHg4ZCwweDMwLDB4MDAsMHgwMiwKKyAgIDB4MDB9fSwgLyogMHgzZSAqLworIHt7MHg4MSwweDZhLDB4NmEsMHg4NSwweDcwLDB4MDAsMHgwZiwweDNlLAorICAgMHhlYiwweDhlLDB4ZGYsMHhkZiwweDEwLDB4MDAsMHgwMCwweDAyLAorICAgMHgwMH19LCAvKiAweDNmICovCisge3sweGEzLDB4N2YsMHg3ZiwweDg3LDB4ODYsMHg5NywweDFlLDB4ZjEsCisgICAweGFlLDB4ODUsMHg1NywweDU3LDB4MWYsMHgzMCwweDAwLDB4MDIsCisgICAweDAxfX0sICAvKiAweDQwICovCisge3sweGEzLDB4N2YsMHg3ZiwweDg3LDB4ODYsMHg5NywweDI0LDB4ZjUsCisgICAweDAyLDB4ODgsMHhmZiwweGZmLDB4MjUsMHgxMCwweDAwLDB4MDIsCisgICAweDAxfX0sICAvKiAweDQxICovCisge3sweGNlLDB4OWYsMHg5ZiwweDkyLDB4YTksMHgxNywweDIwLDB4ZjUsCisgICAweDAzLDB4ODgsMHhmZiwweGZmLDB4MjEsMHgxMCwweDAwLDB4MDcsCisgICAweDAxfX0sICAvKiAweDQyICovCisge3sweGU2LDB4YWUsMHhhZSwweDhhLDB4YmQsMHg5MCwweDNkLDB4MTAsCisgICAweDFhLDB4OGQsMHgxOSwweDE5LDB4M2UsMHgyZiwweDAwLDB4MDMsCisgICAweDAwfX0sICAvKiAweDQzICovCisge3sweGMzLDB4OGYsMHg4ZiwweDg3LDB4OWIsMHgwYiwweDgyLDB4ZWYsCisgICAweDYwLDB4ODMsMHg1ZiwweDVmLDB4ODMsMHgxMCwweDAwLDB4MDcsCisgICAweDAxfX0sICAvKiAweDQ0ICovCisge3sweDg2LDB4NjksMHg2OSwweDhBLDB4NzQsMHgwNiwweDhDLDB4MTUsCisgICAweDRGLDB4ODMsMHhFRiwweEVGLDB4OEQsMHgzMCwweDAwLDB4MDIsCisgICAweDAwfX0sICAvKiAweDQ1ICovCisge3sweDgzLDB4NjksMHg2OSwweDg3LDB4NmYsMHgxZCwweDAzLDB4M0UsCisgICAweEU1LDB4OGQsMHhERiwweGU0LDB4MDQsMHgwMCwweDAwLDB4MDYsCisgICAweDAwfX0sICAvKiAweDQ2ICovCisge3sweDg2LDB4NkEsMHg2QSwweDhBLDB4NzQsMHgwNiwweDhDLDB4MTUsCisgICAweDRGLDB4ODMsMHhFRiwweEVGLDB4OEQsMHgzMCwweDAwLDB4MDIsCisgICAweDAwfX0sICAvKiAweDQ3ICovCisge3sweDgxLDB4NkEsMHg2QSwweDg1LDB4NzAsMHgwMCwweDBGLDB4M0UsCisgICAweEVCLDB4OEUsMHhERiwweERGLDB4MTAsMHgwMCwweDAwLDB4MDIsCisgICAweDAwfX0sICAvKiAweDQ4ICovCisge3sweGRkLDB4YTksMHhhOSwweDgxLDB4YjQsMHg5NywweDI2LDB4ZmQsCisgICAweDAxLDB4OGQsMHhmZiwweDAwLDB4MjcsMHgxMCwweDAwLDB4MDMsCisgICAweDAxfX0sICAvKiAweDQ5ICovCisge3sweGQ5LDB4OGYsMHg4ZiwweDlkLDB4YmEsMHgwYSwweDhhLDB4ZmYsCisgICAweDYwLDB4OGIsMHg1ZiwweDVmLDB4OGIsMHgxMCwweDAwLDB4MDMsCisgICAweDAxfX0sICAvKiAweDRhICovCisge3sweGVhLDB4YWUsMHhhZSwweDhlLDB4YmEsMHg4MiwweDQwLDB4MTAsCisgICAweDFiLDB4ODcsMHgxOSwweDFhLDB4NDEsMHgwZiwweDAwLDB4MDMsCisgICAweDAwfX0sICAvKiAweDRiICovCisge3sweGQzLDB4OWYsMHg5ZiwweDk3LDB4YWIsMHgxZiwweGYxLDB4ZmYsCisgICAweGMwLDB4ODMsMHhiZiwweGJmLDB4ZjIsMHgxMCwweDAwLDB4MDcsCisgICAweDAxfX0sICAvKiAweDRjICovCisge3sweDc1LDB4NWYsMHg1ZiwweDk5LDB4NjYsMHg5MCwweDUzLDB4ZjAsCisgICAweDQxLDB4ODQsMHgzZiwweDNmLDB4NTQsMHgwMCwweDAwLDB4MDUsCisgICAweDQxfX0sCisge3sweDJkLDB4MjcsMHgyOCwweDkwLDB4MmMsMHg4MCwweDBiLDB4M2UsCisgICAweGU5LDB4OGIsMHhkZiwweGU3LDB4MDQsMHgwMCwweDAwLDB4MDAsCisgICAweDAwfX0sICAvKiAweDRlICovCisge3sweGNkLDB4OWYsMHg5ZiwweDkxLDB4YWIsMHgxYywweDNhLDB4ZmYsCisgICAweDIwLDB4ODMsMHgxZiwweDFmLDB4M2IsMHgxMCwweDAwLDB4MDcsCisgICAweDIxfX0sICAvKiAweDRmICovCisge3sweDE1LDB4ZDEsMHhkMSwweDk5LDB4ZTIsMHgxOSwweDNkLDB4MTAsCisgICAweDFhLDB4OGQsMHgxOSwweDE5LDB4M2UsMHgyZiwweDAxLDB4MGMsCisgICAweDIwfX0sICAvKiAweDUwICovCisge3sweDBlLDB4ZWYsMHhlZiwweDkyLDB4ZmUsMHgwMywweDMwLDB4ZjAsCisgICAweDFlLDB4ODMsMHgxYiwweDFjLDB4MzEsMHgwMCwweDAxLDB4MDAsCisgICAweDYxfX0sICAvKiAweDUxICovCisge3sweDg1LDB4NzcsMHg3NywweDg5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gU1BJVFpfR1BJT19VU0JfSE9TVCAgICAgICAgKDM3KQorI2RlZmluZSBTUElUWl9HUElPX1VTQl9DT05ORUNUICAgICAoNDEpCisjZGVmaW5lIFNQSVRaX0dQSU9fTENEQ09OX0NTICAgICAgICg1MykKKyNkZWZpbmUgU1BJVFpfR1BJT19uUENFICAgICAgICAgICAgKDU0KQorI2RlZmluZSBTUElUWl9HUElPX25TRF9XUCAgICAgICAgICAoODEpCisjZGVmaW5lIFNQSVRaX0dQSU9fT05fUkVTRVQgICAgICAgICg4OSkKKyNkZWZpbmUgU1BJVFpfR1BJT19CQVRfQ09WRVIgICAgICAgKDkwKQorI2RlZmluZSBTUElUWl9HUElPX0NGX0NEICAgICAgICAgICAoOTQpCisjZGVmaW5lIFNQSVRaX0dQSU9fT05fS0VZICAgICAgICAgICg5NSkKKyNkZWZpbmUgU1BJVFpfR1BJT19TV0EgICAgICAgICAgICAgKDk3KQorI2RlZmluZSBTUElUWl9HUElPX1NXQiAgICAgICAgICAgICAoOTYpCisjZGVmaW5lIFNQSVRaX0dQSU9fQ0hSR19GVUxMICAgICAgICgxMDEpCisjZGVmaW5lIFNQSVRaX0dQSU9fQ08gICAgICAgICAgICAgICgxMDEpCisjZGVmaW5lIFNQSVRaX0dQSU9fQ0ZfSVJRICAgICAgICAgICgxMDUpCisjZGVmaW5lIFNQSVRaX0dQSU9fQUNfSU4gICAgICAgICAgICgxMTUpCisjZGVmaW5lIFNQSVRaX0dQSU9fSFBfSU4gICAgICAgICAgICgxMTYpCisKKy8qIFNwaXR6IE9ubHkgR1BJT3MgKi8KKworI2RlZmluZSBTUElUWl9HUElPX0NGMl9JUlEgICAgICAgICAoMTA2KSAvKiBDRiBzbG90MSBSZWFkeSAqLworI2RlZmluZSBTUElUWl9HUElPX0NGMl9DRCAgICAgICAgICAoOTMpCisKKworLyogU3BpdHovQWtpdGEgS2V5Ym9hcmQgRGVmaW5pdGlvbnMgKi8KKworI2RlZmluZSBTUElUWl9LRVlfU1RST0J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rbm93bGVkZ2UKKworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoKKyogUXVldWVkIFNlcmlhbCBQZXJpcGhlcmFsIEludGVyZmFjZSAoUVNQSSkgTW9kdWxlCisqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBEZXJlayAtIDIxIEZlYiAyMDA1ICovCisvKiBjaGFuZ2UgdG8gdGhlIGZvcm1hdCB1c2VkIGluIEkyQyAqLworLyogUmVhZC9Xcml0ZSBhY2Nlc3MgbWFjcm9zIGZvciBnZW5lcmFsIHVzZSAqLworI2RlZmluZSBNQ0Y1MjgyX1FTUElfUU1SICAgICAgICBNQ0ZfSVBTQkFSICsgMHgwMzQwCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RRExZUiAgICAgIE1DRl9JUFNCQVIgKyAweDAzNDQKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FXUiAgICAgICAgTUNGX0lQU0JBUiArIDB4MDM0OAorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSICAgICAgICBNQ0ZfSVBTQkFSICsgMHgwMzRDCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RQVIgICAgICAgIE1DRl9JUFNCQVIgKyAweDAzNTAKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FEUiAgICAgICAgTUNGX0lQU0JBUiArIDB4MDM1NAorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUNSICAgICAgICBNQ0ZfSVBTQkFSICsgMHgwMzU0CisKKy8qIEJpdCBsZXZlbCBkZWZpbml0aW9ucyBhbmQgbWFjcm9zICovCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfTVNUUiAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDgwMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfRE9ISUUgICAgICAgICAgICAgICAgICAgICAgICAgICgweDQwMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU18xNiAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU184ICAgICAgICAgICAgICAgICAgICAgICAgICgweDIwMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU185ICAgICAgICAgICAgICAgICAgICAgICAgICgweDI0MDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU18xMCAgICAgICAgICAgICAgICAgICAgICAgICgweDI4MDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU18xMSAgICAgICAgICAgICAgICAgICAgICAgICgweDJDMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU18xMiAgICAgICAgICAgICAgICAgICAgICAgICgweDMwMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU18xMyAgICAgICAgICAgICAgICAgICAgICAgICgweDM0MDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU18xNCAgICAgICAgICAgICAgICAgICAgICAgICgweDM4MDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQklUU18xNSAgICAgICAgICAgICAgICAgICAgICAgICgweDNDMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQ1BPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAyMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQ1BIQSAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAxMDApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RTVJfQkFVRCh4KSAgICAgICAgICAgICAgICAgICAgICAgICgoKHgpJjB4MDBGRikpCisKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FETFlSX1NQRSAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ODApCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RRExZUl9RQ0QoeCkgICAgICAgICAgICAgICAgICAgICAgICgoKHgpJjB4MDA3Rik8PDgpCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RRExZUl9EVEwoeCkgICAgICAgICAgICAgICAgICAgICAgICgoKHgpJjB4MDBGRikpCisKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FXUl9IQUxUICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ODAwMCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FXUl9XUkVOICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4NDAwMCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FXUl9XUlRPICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MjAwMCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FXUl9DU0lWICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MTAwMCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FXUl9FTkRRUCh4KSAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMDBGKTw8OCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FXUl9DUFRRUCh4KSAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMDBGKTw8NCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FXUl9ORVdRUCh4KSAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMDBGKSkKKworI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX1dDRUZCICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg4MDAwKQorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX0FCUlRCICAgICAgICAgICAgICAgICAgICAgICAgICAoMHg0MDAwKQorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX0FCUlRMICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxMDAwKQorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX1dDRUZFICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwODAwKQorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX0FCUlRFICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwNDAwKQorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX1NQSUZFICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwMTAwKQorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX1dDRUYgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwMDA4KQorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX0FCUlQgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwMDA0KQorI2RlZmluZSBNQ0Y1MjgyX1FTUElfUUlSX1NQSUYgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwMDAxKQorCisjZGVmaW5lIE1DRjUyODJfUVNQSV9RQVJfQUREUih4KSAgICAgICAgICAgICAgICAgICAgICAgICgoKHgpJjB4MDAzRikpCisKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FEUl9DT01NQU5EKHgpICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHhGRjAwKSkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FDUl9EQVRBKHgpICAgICAgICAgICAgICAgICAgICAgICAgKCgoeCkmMHgwMEZGKTw8OCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FDUl9DT05UICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4ODAwMCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FDUl9CSVRTRSAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4NDAwMCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FDUl9EVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MjAwMCkKKyNkZWZpbmUgTUNGNTI4Ml9RU1BJX1FDUl9EU0NLICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MTAwM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eyBpbnQgcmV0X187CQkJXAorCWFzbSB2b2xhdGlsZSgiMjogd3Jtc3IgOyB4b3JsICUwLCUwXG4iCQkJXAorCQkgICAgICIxOlxuXHQiCQkJCQlcCisJCSAgICAgIi5zZWN0aW9uIC5maXh1cCxcImF4XCJcblx0IgkJXAorCQkgICAgICIzOiAgbW92bCAlNCwlMCA7IGptcCAxYlxuXHQiCQlcCisJCSAgICAgIi5wcmV2aW91c1xuXHQiCQkJCVwKKyAJCSAgICAgIi5zZWN0aW9uIF9fZXhfdGFibGUsXCJhXCJcbiIJCVwKKwkJICAgICAiICAgLmFsaWduIDhcblx0IgkJCQlcCisJCSAgICAgIiAgIC5xdWFkIAkyYiwzYlxuXHQiCQkJXAorCQkgICAgICIucHJldmlvdXMiCQkJCVwKKwkJICAgICA6ICI9YSIgKHJldF9fKQkJCQlcCisJCSAgICAgOiAiYyIgKG1zciksICIwIiAoYSksICJkIiAoYiksICJpIiAoLUVGQVVMVCkpOyBcCiAJcmV0X187IH0pCiAKICNkZWZpbmUgY2hlY2tpbmdfd3Jtc3JsKG1zcix2YWwpIHdybXNyX3NhZmUobXNyLCh1MzIpKHZhbCksKHUzMikoKHZhbCk+PjMyKSkKIAorI2RlZmluZSByZG1zcl9zYWZlKG1zcixhLGIpIFwKKwkoeyBpbnQgcmV0X187CQkJCQkJXAorCSAgYXNtIHZvbGF0aWxlICgiMTogICAgICAgcmRtc3JcbiIJCQlcCisgICAgICAgICAgICAgICAgICAgICAgIjI6XG4iCQkJCQlcCisgICAgICAgICAgICAgICAgICAgICAgIi5zZWN0aW9uIC5maXh1cCxcImF4XCJcbiIJCVwKKyAgICAgICAgICAgICAgICAgICAgICAiMzogICAgICAgbW92bCAlNCwlMFxuIgkJCVwKKyAgICAgICAgICAgICAgICAgICAgICAiIGptcCAyYlxuIgkJCQlcCisgICAgICAgICAgICAgICAgICAgICAgIi5wcmV2aW91c1xuIgkJCQlcCisgICAgICAgICAgICAgICAgICAgICAgIi5zZWN0aW9uIF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FRJT05fNTI1KQorI2RlZmluZSBWNEwyX1NMSUNFRF9WQklfNjI1ICAgICAgICAgICAgIChWNEwyX1NMSUNFRF9URUxFVEVYVF9CIHwgVjRMMl9TTElDRURfVlBTIHwgVjRMMl9TTElDRURfV1NTXzYyNSkKKworc3RydWN0IHY0bDJfc2xpY2VkX3ZiaV9jYXAKK3sKKyAgICAgICAgX191MTYgICBzZXJ2aWNlX3NldDsKKyAgICAgICAgLyogc2VydmljZV9saW5lc1swXVsuLi5dIHNwZWNpZmllcyBsaW5lcyAwLTIzICgxLTIzIHVzZWQpIG9mIHRoZSBmaXJzdCBmaWVsZAorICAgICAgICAgICBzZXJ2aWNlX2xpbmVzWzFdWy4uLl0gc3BlY2lmaWVzIGxpbmVzIDAtMjMgKDEtMjMgdXNlZCkgb2YgdGhlIHNlY29uZCBmaWVsZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVxdWFscyBmcmFtZSBsaW5lcyAzMTMtMzM2IGZvciA2MjUgbGluZSB2aWRlbworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0YW5kYXJkcywgMjYzLTI4NiBmb3IgNTI1IGxpbmUgc3RhbmRhcmRzKSAqLworICAgICAgICBfX3UxNiAgIHNlcnZpY2VfbGluZXNbMl1bMjRdOworICAgICAgICBfX3UzMiAgIHJlc2VydmVkWzRdOyAgICAvKiBtdXN0IGJlIDAgKi8KK307CisKK3N0cnVjdCB2NGwyX3NsaWNlZF92YmlfZGF0YQoreworICAgICAgICBfX3UzMiAgIGlkOworICAgICAgICBfX3UzMiAgIGZpZWxkOyAgICAgICAgICAvKiAwOiBmaXJzdCBmaWVsZCwgMTogc2Vjb25kIGZpZWxkICovCisgICAgICAgIF9fdTMyICAgbGluZTsgICAgICAgICAgIC8qIDEtMjMgKi8KKyAgICAgICAgX191MzIgICByZXNlcnZlZDsgICAgICAgLyogbXVzdCBiZSAwICovCisgICAgICAgIF9fdTggICAgZGF0YVs0OF07Cit9OworI2VuZ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X21zYml0cyhzbmRfcGNtX3J1bnRpbWVfdCAqcnVudGltZSwgCiAJCQkJIHVuc2lnbmVkIGludCBjb25kLApAQCAtMTEwMSw2ICsxMTYwLDEwIEBACiAKIC8qKgogICogc25kX3BjbV9od19jb25zdHJhaW50X3N0ZXAKKyAqIEBydW50aW1lOiBQQ00gcnVudGltZSBpbnN0YW5jZQorICogQGNvbmQ6IGNvbmRpdGlvbiBiaXRzCisgKiBAdmFyOiBod19wYXJhbXMgdmFyaWFibGUgdG8gYXBwbHkgdGhlIHN0ZXAgY29uc3RyYWludAorICogQHN0ZXA6IHN0ZXAgc2l6ZQogICovCiBpbnQgc25kX3BjbV9od19jb25zdHJhaW50X3N0ZXAoc25kX3BjbV9ydW50aW1lX3QgKnJ1bnRpbWUsCiAJCQkgICAgICAgdW5zaWduZWQgaW50IGNvbmQsCkBAIC0xMTI2LDYgKzExODksOSBAQAogCiAvKioKICAqIHNuZF9wY21faHdfY29uc3RyYWludF9wb3cyCisgKiBAcnVudGltZTogUENNIHJ1bnRpbWUgaW5zdGFuY2UKKyAqIEBjb25kOiBjb25kaXRpb24gYml0cworICogQHZhcjogaHdfcGFyYW1zIHZhcmlhYmxlIHRvIGFwcGx5IHRoZSBwb3dlci1vZi0yIGNvbnN0cmFpbnQKICAqLwogaW50IHNuZF9wY21faHdfY29uc3RyYWludF9wb3cyKHNuZF9wY21fcnVudGltZV90ICpydW50aW1lLAogCQkJICAgICAgIHVuc2lnbmVkIGludCBjb25kLApAQCAtMTE2Miw3ICsxMjI4LDcgQEAKIH0KIAogI2lmIDAKLS8qKgorLyoKICAqIHNuZF9wY21faHdfcGFyYW1fYW55CiAgKi8KIGludCBzbmRfcGNtX2h3X3BhcmFtX2FueShzbmRfcGNtX3QgKnBjbSwgc25kX3BjbV9od19wYXJhbXNfdCAqcGFyYW1zLApAQCAtMTE4NSw3ICsxMjUxLDcgQEAKIH0KIAogI2lmIDAKLS8qKgorLyoKICAqIHNuZF9wY21faHdfcGFyYW1zX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KworCXJldHVybiAwOworCitmcmVlX2FuZF9yZXQ6CisJaWYgKGNoaXApCisJCWtmcmVlKGNoaXApOworCXBjaV9kaXNhYmxlX2RldmljZShwY2kpOworCisJcmV0dXJuIGVycjsKK30KKworc3RhdGljIGludCBfX2RldmluaXQKK3NuZF9hZDE4ODlfcHJvYmUoc3RydWN0IHBjaV9kZXYgKnBjaSwKKwkJIGNvbnN0IHN0cnVjdCBwY2lfZGV2aWNlX2lkICpwY2lfaWQpCit7CisJaW50IGVycjsKKwlzdGF0aWMgaW50IGRldm5vOworCXNuZF9jYXJkX3QgKmNhcmQ7CisJc3RydWN0IHNuZF9hZDE4ODkgKmNoaXA7CisKKwkvKiAoMSkgKi8KKwlpZiAoZGV2bm8gPj0gU05EUlZfQ0FSRFMpCisJCXJldHVybiAtRU5PREVWOworCWlmICghZW5hYmxlW2Rldm5vXSkgeworCQlkZXZubysrOworCQlyZXR1cm4gLUVOT0VOVDsKKwl9CisKKwkvKiAoMikgKi8KKwljYXJkID0gc25kX2NhcmRfbmV3KGluZGV4W2Rldm5vXSwgaWRbZGV2bm9dLCBUSElTX01PRFVMRSwgMCk7CisJLyogWFhYIFJFVklTSVQ6IHdlIGNhbiBwcm9iYWJseSBhbGxvY2F0ZSBjaGlwIGluIHRoaXMgY2FsbCAqLworCWlmIChjYXJkID09IE5VTEwpCisJCXJldHVybiAtRU5PTUVNOworCisJc3RyY3B5KGNhcmQtPmRyaXZlciwgIkFEMTg4OSIpOworCXN0cmNweShjYXJkLT5zaG9ydG5hbWUsICJBbmFsb2cgRGV2aWNlcyBBRDE4ODkiKTsKKworCS8qICgzKSAqLworCWVyciA9IHNuZF9hZDE4ODlfY3JlYXRlKGNhcmQsIHBjaSwgJmNoaXApOworCWlmIChlcnIgPCAwKQorCQlnb3RvIGZyZWVfYW5kX3JldDsKKworCS8qICg0KSAqLworCXNwcmludGYoY2FyZC0+bG9uZ25hbWUsICIlcyBhdCAweCVseCBpcnEgJWkiLAorCQljYXJkLT5za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dF9zcGRpZl9mcm9udApAQCAtNTIyLDcgKzUyMiw3IEBACiBzdGF0aWMgc25kX2tjb250cm9sX25ld190IHNuZF9jYTAxMDZfdm9sdW1lX2NvbnRyb2xfc3BkaWZfY2VudGVyX2xmZSA9CiB7CiAgICAgICAgIC5pZmFjZSA9ICAgICAgICBTTkRSVl9DVExfRUxFTV9JRkFDRV9NSVhFUiwKLSAgICAgICAgLm5hbWUgPSAgICAgICAgICJTUERJRiBDZW50ZXIvTEZFIFZvbHVtZSIsCisgICAgICAgIC5uYW1lID0gICAgICAgICAiU1BESUYgQ2VudGVyL0xGRSBQbGF5YmFjayBWb2x1bWUiLAogICAgICAgICAuaW5mbyA9ICAgICAgICAgc25kX2NhMDEwNl92b2x1bWVfaW5mbywKICAgICAgICAgLmdldCA9ICAgICAgICAgIHNuZF9jYTAxMDZfdm9sdW1lX2dldF9zcGRpZl9jZW50ZXJfbGZlLAogICAgICAgICAucHV0ID0gICAgICAgICAgc25kX2NhMDEwNl92b2x1bWVfcHV0X3NwZGlmX2NlbnRlcl9sZmUKQEAgLTUzMCw3ICs1MzAsNyBAQAogc3RhdGljIHNuZF9rY29udHJvbF9uZXdfdCBzbmRfY2EwMTA2X3ZvbHVtZV9jb250cm9sX3NwZGlmX3Vua25vd24gPQogewogICAgICAgICAuaWZhY2UgPSAgICAgICAgU05EUlZfQ1RMX0VMRU1fSUZBQ0VfTUlYRVIsCi0gICAgICAgIC5uYW1lID0gICAgICAgICAiU1BESUYgVW5rbm93biBWb2x1bWUiLAorICAgICAgICAubmFtZSA9ICAgICAgICAgIlNQRElGIFVua25vd24gUGxheWJhY2sgVm9sdW1lIiwKICAgICAgICAgLmluZm8gPSAgICAgICAgIHNuZF9jYTAxMDZfdm9sdW1lX2luZm8sCiAgICAgICAgIC5nZXQgPSAgICAgICAgICBzbmRfY2EwMTA2X3ZvbHVtZV9nZXRfc3BkaWZfdW5rbm93biwKICAgICAgICAgLnB1dCA9ICAgICAgICAgIHNuZF9jYTAxM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