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kZCAgICAgICAgICAgICgwMjAwKSAgV3JpdGUgYSBibG9jayBkZXZpY2UgaWQgKG1ham9yOm1pbm9yKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgdG8gY3JlYXRlIGEgbmV3IHBrdGNkdmQgZGV2aWNlIGFuZCBtYXAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0IHRvIHRoZSBibG9jayBkZXZpY2UuCisKKyAgICByZW1vdmUgICAgICAgICAoMDIwMCkgIFdyaXRlIHRoZSBwa3RjZHZkIGRldmljZSBpZCAobWFqb3I6bWlub3IpCisgICAgICAgICAgICAgICAgICAgICAgICAgICB0byBpdCB0byByZW1vdmUgdGhlIHBrdGNkdmQgZGV2aWNlLgorCisgICAgZGV2aWNlX21hcCAgICAgKDA0NDQpICBTaG93cyB0aGUgZGV2aWNlIG1hcHBpbmcgaW4gZm9ybWF0OgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwa3RjZHZkWzAtN10gPHBrdGRldmlkPiA8YmxrZGV2aWQ+CisKKy9zeXMvY2xhc3MvcGt0Y2R2ZC9wa3RjZHZkWzAtN10vCisgICAgZGV2ICAgICAgICAgICAgICAgICAgICgwNDQ0KSBEZXZpY2UgaWQKKyAgICB1ZXZlbnQgICAgICAgICAgICAgICAgKDAyMDApIFRvIHNlbmQgYW4gdWV2ZW50LgorCisvc3lzL2NsYXNzL3BrdGNkdmQvcGt0Y2R2ZFswLTddL3N0YXQvCisgICAgcGFja2V0c19zdGFydGVkICAgICAgICgwNDQ0KSBOdW1iZXIgb2Ygc3RhcnRlZCBwYWNrZXRzLgorICAgIHBhY2tldHNfZmluaXNoZWQgICAgICAoMDQ0NCkgTnVtYmVyIG9mIGZpbmlzaGVkIHBhY2tldHMuCisKKyAgICBrYl93cml0dGVuICAgICAgICAgICAgKDA0NDQpIGtCeXRlcyB3cml0dGVuLgorICAgIGtiX3JlYWQgICAgICAgICAgICAgICAoMDQ0NCkga0J5dGVzIHJlYWQuCisgICAga2JfcmVhZF9nYXRoZXIgICAgICAgICgwNDQ0KSBrQnl0ZXMgcmVhZCB0byBmaWxsIHdyaXRlIHBhY2tldHMuCisKKyAgICByZXNldCAgICAgICAgICAgICAgICAgKDAyMDApIFdyaXRlIGFueSB2YWx1ZSB0byBpdCB0byByZXNldAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGt0Y2R2ZCBkZXZpY2Ugc3RhdGlzdGljIHZhbHVlcywgbGlrZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXMgcmVhZC93cml0dGVuLgorCisvc3lzL2NsYXNzL3BrdGNkdmQvcGt0Y2R2ZFswLTddL3dyaXRlX3F1ZXVlLworICAgIHNpemUgICAgICAgICAgICAgICAgICAoMDQ0NCkgQ29udGFpbnMgdGhlIHNpemUgb2YgdGhlIGJpbyB3cml0ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVldWUuCisKKyAgICBjb25nZXN0aW9uX29mZiAgICAgICAgKDA2NDQpIElmIGJpbyB3cml0ZSBxdWV1ZSBzaXplIGlzIGJlbG93CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIG1hcmssIGFjY2VwdCBuZXcgYmlvIHJlcXVlc3RzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHRoZSBibG9jayBsYXllci4KKworICAgIGNvbmdlc3Rpb25fb24gICAgICAgICAoMDY0NCkgSWYgYmlvIHdyaXRlIHF1ZXVlIHNpemUgaXMgaGlnaGVyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcyB0aGlzIG1hcmssIGRvIG5vIGxvbmdlciBhY2NlcHQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpbyB3cml0ZSByZXF1ZXN0cyBmcm9tIHRoZSBibG9jaworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGF5ZXIgYW5kIHdhaXQgdGlsbCB0aGUgcGt0Y2R2ZAorICAgIC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cHBpbmcgdGhlIGRpZmZlcmVudCBjb250ZXh0IGNoYW5nZXMsCitiZWluZyBlYWNoIG1vdW50LCBlYWNoIG1vZGlmaWNhdGlvbiAodHJhbnNhY3Rpb24pIGFuZCBlYWNoIGNoYW5nZWQgYnVmZmVyCit0byB0ZWxsIHRoZSBqb3VybmFsbGluZyBsYXllciBhYm91dCB0aGVtLgorPC9wYXJhPgorCis8cGFyYT4KK0hlcmUgaXMgYSBzb21lIHBzZXVkbyBjb2RlIHRvIGdpdmUgeW91IGFuIGlkZWEgb2YgaG93IGl0IHdvcmtzLCBhcworYW4gZXhhbXBsZS4KKzwvcGFyYT4KKworPHByb2dyYW1saXN0aW5nPgorICBqb3VybmFsX3QqIG15X2pucmwgPSBqb3VybmFsX2NyZWF0ZSgpOworICBqb3VybmFsX2luaXRfe2Rldixpbm9kZX0oam5ybCwuLi4pCisgIGlmIChjbGVhbikgam91cm5hbF93aXBlKCk7CisgIGpvdXJuYWxfbG9hZCgpOworCisgICBmb3JlYWNoKHRyYW5zYWN0aW9uKSB7IC8qdHJhbnNhY3Rpb25zIG11c3QgYmUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZWQgYmVmb3JlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSBzeXNjYWxsIHJldHVybnMgdG8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICB1c2Vyc3BhY2UqLworCisgICAgICAgICAgaGFuZGxlX3QgKiB4Y3Q9am91cm5hbF9zdGFydChteV9qbnJsKTsKKyAgICAgICAgICBmb3JlYWNoKGJoKSB7CisgICAgICAgICAgICAgICAgam91cm5hbF9nZXRfe2NyZWF0ZSx3cml0ZSx1bmRvfV9hY2Nlc3MoeGFjdCxiaCk7CisgICAgICAgICAgICAgICAgaWYgKCBteWZzX21vZGlmeShiaCkgKSB7IC8qIHJldHVybnMgdHJ1ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIG1ha2VzIGNoYW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nMgbXVzdCBiZSAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb21wbGV0ZWQgYmVmb3JlCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYSBzeXNjYWxsIHJldHVybnMgdG8gCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlcnNwYWNlKi8KLQotICAgICAgICAgIGhhbmRsZV90ICogeGN0PWpvdXJuYWxfc3RhcnQobXlfam5ybCk7Ci0gICAgICAgICAgZm9yZWFjaChiaCkgewotICAgICAgICAgICAgICAgIGpvdXJuYWxfZ2V0X3tjcmVhdGUsd3JpdGUsdW5kb31fYWNjZXNzKHhhY3QsYmgpOwotICAgICAgICAgICAgICAgIGlmICggbXlmc19tb2RpZnkoYmgpICkgeyAvKiByZXR1cm5zIHRydWUgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgbWFrZXMgY2hhbmdlcyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgam91cm5hbF9kaXJ0eV97bWV0YSx9ZGF0YSh4YWN0LGJoKTsKLSAgICAgICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgam91cm5hbF9mb3JnZXQoYmgpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICB9Ci0gICAgICAgICAgam91cm5hbF9zdG9wKHhjdCk7Ci0gICB9Ci0gICBqb3VybmFsX2Rlc3Ryb3kobXlfanJubCk7Ci08L3Byb2dyYW1saXN0aW5nPgotPC9zZWN0MT4KLQotPC9jaGFwdGVyPgotCi0gIDxjaGFwdGVyIGlkPSJhZHQiPgotICAgICA8dGl0bGU+RGF0YSBUeXBlczwvdGl0bGU+Ci0gICAgIDxwYXJhPgkKLQlUaGUgam91cm5hbGxpbmcgbGF5ZXIgdXNlcyB0eXBlZGVmcyB0byAnaGlkZScgdGhlIGNvbmNyZXRlIGRlZmluaXRpb25zCi0Jb2YgdGhlIHN0cnVjdHVyZXMgdXNlZC4gQXMgY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2lnbmVkIHNob3J0IHNfbnpvbmVzOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX2ltYXBfYmxvY2tzOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX3ptYXBfYmxvY2tzOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX2ZpcnN0ZGF0YXpvbmU7CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IHNfbG9nX3pvbmVfc2l6ZTsKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBzX21heF9zaXplOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX21hZ2ljOworICAtIFhlbml4IEZTLCBTeXN0ZW1WIEZTLCBDb2hlcmVudCBGUworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX2ZpcnN0ZGF0YXpvbmU7CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIHNfbnpvbmVzOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX2Z6b25lX2NvdW50OworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBzX2Z6b25lc1tOSUNGUkVFXTsKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgc19maW5vZGVfY291bnQ7CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IHNfZmlub2Rlc1tOSUNJTk9EXTsKKyAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgICAgc19mbG9jazsKKyAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgICAgc19pbG9jazsKKyAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgICAgc19tb2RpZmllZDsKKyAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgICAgc19yZG9ubHk7CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIHNfdGltZTsKKyAgICAgICAgICAgICAgICAgICAgc2hvcnQgICAgICAgICAgc19kaW5mb1s0XTsgLS0gU3lzdGVtViBGUyBvbmx5CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIHNfZnJlZV96b25lczsKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgc19mcmVlX2lub2RlczsKKyAgICAgICAgICAgICAgICAgICAgc2hvcnQgICAgICAgICAgc19kaW5mb1s0XTsgLS0gWGVuaXggRlMgb25seQorICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX2ludGVybGVhdmVfbSxzX2ludGVybGVhdmVfbjsgLS0gQ29oZXJlbnQgRlMgb25seQorICAgICAgICAgICAgICAgICAgICBjaGFyICAgICAgICAgICBzX2ZuYW1lWzZdOworICAgICAgICAgICAgICAgICAgICBjaGFyICAgICAgICAgICBzX2ZwYWNrWzZdOworICAgIHRoZW4gdGhleSBkaWZmZXIgY29uc2lkZXJhYmx5OgorICAgICAgICBYZW5peCBGUworICAgICAgICAgICAgICAgICAgICBjaGFyICAgICAgICAgICBzX2NsZWFuOworICAgICAgICAgICAgICAgICAgICBjaGFyICAgICAgICAgICBzX2ZpbGxbMzcxXTsKKyAgICAgICAgICAgICAgICAgICAgbG9uZyAgICAgICAgICAgc19tYWdpYzsKKyAgICAgICAgICAgICAgICAgICAgbG9uZyAgICAgICAgICAgc190eXBlOworICAgICAgICBTeXN0ZW1WIEZTCisgICAgICAgICAgICAgICAgICAgIGxvbmcgICAgICAgICAgIHNfZmlsbFsxMiBvciAxNF07CisgICAgICAgICAgICAgICAgICAgIGxvbmcgICAgICAgICAgIHNfc3RhdGU7CisgICAgICAgICAgICAgICAgICAgIGxvbmcgICAgICAgICAgIHNfbWFnaWM7CisgICAgICAgICAgICAgICAgICAgIGxvbmcgICAgICAgICAgIHNfdHlwZTsKKyAgICAgICAgQ29oZXJlbnQgRlMKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyAgc191bmlxdWU7CisgICAgTm90ZSB0aGF0IENvaGVyZW50IEZTIGhhcyBubyBtYWdpYy4KKworKiBJbm9kZSBsYXlvdXQ6CisgIC0gTWluaXggRlMKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgaV9tb2RlOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBpX3VpZDsKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyAgaV9zaXplOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBpX3RpbWU7CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgIGlfZ2lkOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICBpX25saW5rczsKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgaV96b25lWzcrMSsxXTsKKyAgLSBYZW5peCBGUywgU3lzdGVtViBGUywgQ29oZXJlbnQgRlMKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgaV9tb2RlOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBpX25saW5rOworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBpX3VpZDsKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgaV9naWQ7CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIGlfc2l6ZTsKKyAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAgaV96b25lWzMqKDEwKzErMSsxKV07CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIGlfYXRpbWU7CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIGlfbXRpbWU7CisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIGlfY3RpbWU7CisKKyogUmVndWxhciBmaWxlIGRhdGEgYmxvY2tzIGFyZSBvcmdhbml6ZWQgYXMKKyAgLSBNaW5peCBGUworICAgICAgICAgICAgICAgNyBkaXJlY3QgYmxvY2tzCisgICAgICAgICAgICAgICAxIGluZGlyZWN0IGJsb2NrIChwb2ludGVycyB0byBibG9ja3MpCisgICAgICAgICAgICAgICAxIGRvdWJsZS1pbmRpcmVjdCBibG9jayAocG9pbnRlciB0byBwb2ludGVycyB0byBibG9ja3MpCisgIC0gWGVuaXggRlMsIFN5c3RlbVYgRlMsIENvaGVyZW50IEZTCisgICAgICAgICAgICAgIDEwIGRpcmVjdCBibG9ja3MKKyAgICAgICAgICAgICAgIDEgaW5kaXJlY3QgYmxvY2sgKHBvaW50ZXJzIHRvIGJsb2NrcykKKyAgICAgICAgICAgICAgIDEgZG91YmxlLWluZGlyZWN0IGJsb2NrIChwb2ludGVyIHRvIHBvaW50ZXJzIHRvIGJsb2NrcykKKyAgICAgICAgICAgICAgIDEgdHJpcGxlLWluZGlyZWN0IGJsb2NrIChwb2ludGVyIHRvIHBvaW50ZXJzIHRvIHBvaW50ZXJzIHRvIGJsb2NrcykKKworKiBJbm9kZSBzaXplLCBpbm9kZXMgcGVyIGJsb2NrCisgIC0gTWluaXggRlMgICAgICAgIDMyICAgMzIKKyAgLSBYZW5peCBGUyAgICAgICAgNjQgICAxNgorICAtIFN5c3RlbVYgRlMgICAgICA2NCAgIDE2CisgIC0gQ29oZXJlbnQgRlMgICAgIDY0ICAgIDgKKworKiBEaXJlY3RvcnkgZW50cnkgb24gZGlzaworICAtIE1pbml4IEZTCisgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IGlub2RlOworICAgICAgICAgICAgICAgICAgICBjaGFyIG5hbWVbMTQvMzBdOworICAtIFhlbml4IEZTLCBTeXN0ZW1WIEZTLCBDb2hlcmVudCBGUworICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBpbm9kZTsKKyAgICAgICAgICAgICAgICAgICAgY2hhciBu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x0eXNpYWsgPHNvbHRAZG5zLnRveGljZmlsbXMudHY+CmRpZmYgLS1naXQgYS9Eb2N1bWVudGF0aW9uL2lucHV0L2FtaWpveS50eHQgYi9Eb2N1bWVudGF0aW9uL2lucHV0L2FtaWpveS50eHQKaW5kZXggNGYwZTg5ZC4uN2RjNGYxNyAxMDA2NDQKLS0tIGEvRG9jdW1lbnRhdGlvbi9pbnB1dC9hbWlqb3kudHh0CisrKyBiL0RvY3VtZW50YXRpb24vaW5wdXQvYW1pam95LnR4dApAQCAtOTEsOCArOTEsOCBAQAogICAgICAgICAgfCAgIDEgICAgfCBNMEhRICAgICB8IEpPWTBEQVQgSG9yaXpvbnRhbCBDbG9jayAocXVhZHJhdHVyZSkgICB8CiAgICAgICAgICB8ICAgMiAgICB8IE0wViAgICAgIHwgSk9ZMERBVCBWZXJ0aWNhbCBDbG9jayAgICAgICAgICAgICAgICAgIHwKICAgICAgICAgIHwgICAzICAgIHwgTTBWUSAgICAgfCBKT1kwREFUIFZlcnRpY2FsIENsb2NrICAocXVhZHJhdHVyZSkgICAgfAotICAgICAgICAgfCAgIDQgICAgfCBNMVYgICAgICB8IEpPWTFEQVQgSG9yaXpvbnRhbGwgQ2xvY2sgICAgICAgICAgICAgICB8Ci0gICAgICAgICB8ICAgNSAgICB8IE0xVlEgICAgIHwgSk9ZMURBVCBIb3Jpem9udGFsbCBDbG9jayAocXVhZHJhdHVyZSkgIHwKKyAgICAgICAgIHwgICA0ICAgIHwgTTFWICAgICAgfCBKT1kxREFUIEhvcml6b250YWwgQ2xvY2sgICAgICAgICAgICAgICAgfAorICAgICAgICAgfCAgIDUgICAgfCBNMVZRICAgICB8IEpPWTFEQVQgSG9yaXpvbnRhbCBDbG9jayAocXVhZHJhdHVyZSkgICB8CiAgICAgICAgICB8ICAgNiAgICB8IE0xViAgICAgIHwgSk9ZMURBVCBWZXJ0aWNhbCBDbG9jayAgICAgICAgICAgICAgICAgIHwKICAgICAgICAgIHwgICA3ICAgIHwgTTFW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5IEJydWNlIDxiZWNreS5icnVjZSBhdCBmcmVlc2NhbGUuY29tPiwKICAgICBGcmVlc2NhbGUgU2VtaWNvbmR1Y3RvciwgRlNMIFNPQyBhbmQgMzItYml0IGFkZGl0aW9ucworKGMpIDIwMDYgTW9udGFWaXN0YSBTb2Z0d2FyZSwgSW5jLgorICAgIEZsYXNoIGNoaXAgbm9kZSBkZWZpbml0aW9uCiAKICAgIE1heSAxOCwgMjAwNTogUmV2IDAuMSAtIEluaXRpYWwgZHJhZnQsIG5vIGNoYXB0ZXIgSUlJIHlldC4KIApAQCAtMzMsMTMgKzM1LDEzIEBACiAgICAgICAgICAgICAgICAgICAgICAgICAgLSBDaGFuZ2UgdmVyc2lvbiAxNiBmb3JtYXQgdG8gYWx3YXlzIGFsaWduCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcm9wZXJ0eSBkYXRhIHRvIDQgYnl0ZXMuIFNpbmNlIHRva2VucyBhcmUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFscmVhZHkgYWxpZ25lZCwgdGhhdCBtZWFucyBubyBzcGVjaWZpYwotICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWlyZWQgYWxpZ25lbWVudCBiZXR3ZWVuIHByb3BlcnR5IHNpemUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVpcmVkIGFsaWdubWVudCBiZXR3ZWVuIHByb3BlcnR5IHNpemUKICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCBwcm9wZXJ0eSBkYXRhLiBUaGUgb2xkIHN0eWxlIHZhcmlhYmxlCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnbm1lbnQgd291bGQgbWFrZSBpdCBpbXBvc3NpYmxlIHRvIGRvCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAic2ltcGxlIiBpbnNlcnRpb24gb2YgcHJvcGVydGllcyB1c2luZwogICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtb3ZlICh0aGFua3MgTWlsdG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aW50ZihzdGRlcnIsCisJCQkJCSJcbi4uLlBlcmlvZGljIElSUSByYXRlIGlzIGZpeGVkXG4iKTsKKwkJCQlnb3RvIGRvbmU7CisJCQl9CisJCSAgICAgICAgcGVycm9yKCJpb2N0bCIpOworCQkgICAgICAgIGV4aXQoZXJybm8pOworCQl9CisKKwkJZnByaW50ZihzdGRlcnIsICJcbiVsZEh6Olx0IiwgdG1wKTsKKwkJZmZsdXNoKHN0ZGVycik7CisKKwkJLyogRW5hYmxlIHBlcmlvZGljIGludGVycnVwdHMgKi8KKwkJcmV0dmFsID0gaW9jdGwoZmQsIFJUQ19QSUVfT04sIDApOworCQlpZiAocmV0dmFsID09IC0xKSB7CisJCSAgICAgICAgcGVycm9yKCJpb2N0bCIpOworCQkgICAgICAgIGV4aXQoZXJybm8pOworCQl9CisKKwkJZm9yIChpPTE7IGk8MjE7IGkrKykgeworCQkgICAgICAgIC8qIFRoaXMgYmxvY2tzICovCisJCSAgICAgICAgcmV0dmFsID0gcmVhZChmZCwgJmRhdGEsIHNpemVvZih1bnNpZ25lZCBsb25nKSk7CisJCSAgICAgICAgaWYgKHJldHZhbCA9PSAtMSkgeworCQkJCSAgICAgICBwZXJyb3IoInJlYWQiKTsKKwkJCQkgICAgICAgZXhpdChlcnJubyk7CisJCSAgICAgICAgfQorCQkgICAgICAgIGZwcmludGYoc3RkZXJyLCAiICVkIixpKTsKKwkJICAgICAgICBmZmx1c2goc3RkZXJyKTsKKwkJICAgICAgICBpcnFjb3VudCsrOworCQl9CisKKwkJLyogRGlzYWJsZSBwZXJpb2RpYyBpbnRlcnJ1cHRzICovCisJCXJldHZhbCA9IGlvY3RsKGZkLCBSVENfUElFX09GRiwgMCk7CisJCWlmIChyZXR2YWwgPT0gLTEpIHsKKwkJICAgICAgICBwZXJyb3IoImlvY3RsIik7CisJCSAgICAgICAgZXhpdChlcnJubyk7CisJCX0KKwl9CisKK2RvbmU6CisJZnByaW50ZihzdGRlcnIsICJcblxuXHRcdFx0ICoq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MjUvMjUKLQkrLXMrLSstKy0rLSstKy0rLSstKy0rLSstKy0rLXMrLSstKy0rLSstKy0rLSstKy0rLSstIDI1LzI1Ci0JKy1zKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy1zKy0rLSstKy0rLSstKy0rLSstKy0rLSAyNS8yNQotCSstcystKy0rLSstKy0rLSstKy0rLSstKy0rLSstcystKy0rLSstKy0rLSstKy0rLSstKy0gMjUvMjUKLQkrLXMrLSstKy0rLSstKy0rLSstKy0rLSstKy0rLXMrLSstKy0rLSstKy0rLSstKy0rLSstIDI1LzI1Ci0JKy1zKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy1zKy0rLSstKy0rLSstKy0rLSstKy0rLSAyNS8yNQotCSstcystKy0rLSstKy0rLSstKy0rLSstKy0rLSstcystKy0rLSstKy0rLSstKy0rLSstKy0gMjUvMjUKLQkrLXMrLSstKy0rLSstKy0rLSstKy0rLSstKy0rLXMrLSstKy0rLSstKy0rLSstKy0rLSstIDI1LzI1Ci0JKy1zKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy1zKy0rLSstKy0rLSstKy0rLSstKy0rLSAyNS8yNQotCSstcystKy0rLSstKy0rLSstKy0rLSstKy0rLSstcystKy0rLSstKy0rLSstKy0rLSstKy0gMjUvMjUKLQkrLXMrLSstKy0rLSstKy0rLSstKy0rLSstKy0rLXMrLSstKy0rLSstKy0rLSstKy0rLSstIDI1LzI1Ci0JKy1zKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy1zKy0rLSstKy0rLSstKy0rLSstKy0rLQotCXN5bmNlcjogZG9uZQotCXdyaXRlcjogZG9uZQotKG5vdGUgdGhlIC9kZXYvbnVsbCBpcyBwcnVkZW50IGhlcmUsIG15IHN5c3RlbSBpcyBub3QgYWJsZSB0bwotIGdyYWIgL2FuZC8gd3JpdGUgMjUgZnBzIHRvIGEgZmlsZS4uLiBnaWZ0cyB3ZWxjb21lIDopICkKLVRoZSB0ZWNobmljYWwgcmVhc29uaW5nIGZ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MKKyMKKyMgQ09ORklHX1NPRlRfV0FUQ0hET0cgaXMgbm90IHNldAorCisjCisjIFVTQi1iYXNlZCBXYXRjaGRvZyBDYXJkcworIworIyBDT05GSUdfVVNCUENXQVRDSERPRyBpcyBub3Qgc2V0CitDT05GSUdfSFdfUkFORE9NPXkKKyMgQ09ORklHX05WUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RUTEsgaXMgbm90IHNldAorIyBDT05GSUdfUjM5NjQgaXMgbm90IHNldAorCisjCisjIEZ0YXBlLCB0aGUgZmxvcHB5IHRhcGUgZGV2aWNlIGRyaXZlcgorIworIyBDT05GSUdfUkFXX0RSSVZFUiBpcyBub3Qgc2V0CisKKyMKKyMgVFBNIGRldmljZXMKKyMKKyMgQ09ORklHX1RDR19UUE0gaXMgbm90IHNldAorCisjCisjIEkyQyBzdXBwb3J0CisjCisjIENPTkZJR19JMkMgaXMgbm90IHNldAorCisjCisjIFNQSSBzdXBwb3J0CisjCisjIENPTkZJR19TUEkgaXMgbm90IHNldAorIyBDT05GSUdfU1BJX01BU1RFUiBpcyBub3Qgc2V0CisKKyMKKyMgRGFsbGFzJ3MgMS13aXJlIGJ1cworIworIyBDT05GSUdfVzEgaXMgbm90IHNldAorCisjCisjIEhhcmR3YXJlIE1vbml0b3Jpbmcgc3VwcG9ydAorIworIyBDT05GSUdfSFdNT04gaXMgbm90IHNldAorIyBDT05GSUdfSFdNT05fVklEIGlzIG5vdCBzZXQKKworIworIyBNaXNjIGRldmljZXMKKyMKKyMgQ09ORklHX1RJRk1fQ09SRSBpcyBub3Qgc2V0CisKKyMKKyMgTEVEIGRldmljZXMKKyMKKyMgQ09ORklHX05FV19MRURTIGlzIG5vdCBzZXQKKworIworIyBMRUQgZHJpdmVycworIworCisjCisjIExFRCBUcmlnZ2VycworIworCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJ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09ORklHX05MU19DT0RFUEFHRV84NzQgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfOCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfMTI1MCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfMTI1MSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQVNDSUkgaXMgbm90IHNldAorQ09ORklHX05MU19JU084ODU5XzE9eQorIyBDT05GSUdfTkxTX0lTTzg4NTlfMiBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8zIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzQgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV82IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzcgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfOSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xMyBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfS09JOF9SIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19LT0k4X1UgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX1VURjggaXMgbm90IHNldAorCisjCisjIFByb2ZpbGluZyBzdXBwb3J0CisjCisjIENPTkZJR19QUk9GSUxJTkcgaXMgbm90IHNldAorCisjCisjIEtlcm5lbCBoYWNraW5nCisjCisjIENPTkZJR19QUklOVEtfVElNRSBpcyBub3Qgc2V0CitDT05GSUdfRU5BQkxFX01VU1RfQ0hFQ0s9eQorIyBDT05GSUdfTUFHSUNfU1lTUlEgaXMgbm90IHNldAorIyBDT05GSUdfVU5VU0VEX1NZT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X1BLVEdFTiBpcyBub3Qgc2V0CisjIENPTkZJR19IQU1SQURJTyBpcyBub3Qgc2V0CisjIENPTkZJR19JUkRBIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JUIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lFRUU4MDIxMSBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCitDT05GSUdfU1RBTkRBTE9ORT15CitDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CisjIENPTkZJR19GV19MT0FERVIgaXMgbm90IHNldAorIyBDT05GSUdfREVCVUdfRFJJVkVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NZU19IWVBFUlZJU09SIGlzIG5vdCBzZXQKKworIworIyBDb25uZWN0b3IgLSB1bmlmaWVkIHVzZXJzcGFjZSA8LT4ga2VybmVsc3BhY2UgbGlua2VyCisjCisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorCisjCisjIE1lbW9yeSBUZWNobm9sb2d5IERldmljZXMgKE1URCkKKyMKK0NPTkZJR19NVEQ9eQorIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DT05DQVQgaXMgbm90IHNldAorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ01ETElORV9QQVJUUz15CisjIENPTkZJR19NVERfQUZTX1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworIyBDT05GSUdfTVREX0NIQVIgaXMgbm90IHNldAorQ09ORklHX01URF9CTE9DSz15CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Q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ldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CisKKyMKKyMgTkFORCBGbGFzaCBEZXZpY2UgRHJpdmVycworIworQ09ORklHX01URF9OQU5EPXkKKyMgQ09ORklHX01URF9OQU5EX1ZFUklGWV9XUklURSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORF9FQ0NfU01DIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTkFORF9JRFM9eQorIyBDT05GSUdfTVREX05BTkRfRElTS09OQ0hJUCBpcyBub3Qgc2V0CitDT05GSUdfTVREX05BTkRfQVQ5MT15CisjIENPTkZJR19NVERfTkFORF9OQU5EU0lNIGlzIG5vdCBzZXQKKworIworIyBPbmVOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKKworIworIyBQbHVnIGFuZCBQbGF5IHN1cHBvcnQKKyMKKworIworIyBCbG9jayBkZXZpY2VzCisjCisjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9MT09QIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfTkJEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfVUIgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9DT1VOVD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XMgbm90IHNldAorIyBDT05GSUdfU0NTSV9TQVNfQVRUUlMgaXMgbm90IHNldAorIyBDT05GSUdfU0NTSV9TQVNfTElCU0FTIGlzIG5vdCBzZXQKKworIworIyBTQ1NJIGxvdy1sZXZlbCBkcml2ZXJzCisjCisjIENPTkZJR19JU0NTSV9UQ1AgaXMgbm90IHNldAorIyBDT05GSUdfU0NTSV9ERUJVRyBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGktZGV2aWNlIHN1cHBvcnQgKFJBSUQgYW5kIExWTSkKKyMKKyMgQ09ORklHX01EIGlzIG5vdCBzZXQKKworIworIyBGdXNpb24gTVBUIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19GVVNJT04gaXMgbm90IHNldAorCisjCisjIElFRUUgMTM5NCAoRmlyZVdpcmUpIHN1cHBvcnQKKyMKKworIworIyBJMk8gZGV2aWNlIHN1cHBvcnQKKyMKKworIworIyBOZXR3b3JrIGRldmljZSBzdXBwb3J0CisjCitDT05GSUdfTkVUREVWSUNFUz15CisjIENPTkZJR19EVU1NWSBpcyBub3Qgc2V0CisjIENPTkZJR19CT05ESU5HIGlzIG5vdCBzZXQKKyMgQ09ORklHX0VRVUFMSVpFUiBpcyBub3Qgc2V0CisjIENPTkZJR19UVU4gaXMgbm90IHNldAorCisjCisjIFBIWSBkZXZpY2Ugc3VwcG9ydAorIworIyBDT05GSUdfUEhZTElCIGlzIG5vdCBzZXQKKworIworIyBFdGhlcm5ldCAoMTAgb3IgMTAwTWJpdCkKKyMKK0NPTkZJR19ORVRfRVRIRVJORVQ9eQorQ09ORklHX01JST15CisjIENPTkZJR19TTUM5MVggaXMgbm90IHNldAorQ09ORklHX0RNOTAwMD15CisKKyMKKyMgRXRoZXJuZXQgKDEwMDAgTWJpdCkKKyMKKworIworIyBFdGhlcm5ldCAoMTAwMDAgTWJpdCkKKyMKKworIworIyBUb2tlbiBSaW5nIGRldmljZXMKKyMKKworIworIyBXaXJlbGVzcyBMQU4gKG5vbi1o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TRU5TT1JTX0VFUFJPTSBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX1BDRjg1NzQgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19QQ0E5NTM5IGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfUENGODU5MSBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX01BWDY4NzUgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0RFQlVHX0NPUkUgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0RFQlVHX0FMR08gaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0RFQlVHX0JVUyBpcyBub3Qgc2V0CisjIENPTkZJR19JMkNfREVCVUdfQ0hJUCBpcyBub3Qgc2V0CisKKyMKKyMgU1BJIHN1cHBvcnQKKyMKKyMgQ09ORklHX1NQSSBpcyBub3Qgc2V0CisjIENPTkZJR19TUElfTUFTVEVSIGlzIG5vdCBzZXQKKworIworIyBEYWxsYXMncyAxLXdpcmUgYnVzCisjCisjIENPTkZJR19XMSBpcyBub3Qgc2V0CisKKyMKKyMgSGFyZHdhcmUgTW9uaXRvcmluZyBzdXBwb3J0CisjCisjIENPTkZJR19IV01PTiBpcyBub3Qgc2V0CisjIENPTkZJR19IV01PTl9WSUQgaXMgbm90IHNldAorCisjCisjIE1pc2MgZGV2aWNlcworIworIyBDT05GSUdfVElGTV9DT1JFIGlzIG5vdCBzZXQKKworIworIyBMRUQgZGV2aWNlcworIworIyBDT05GSUdfTkVXX0xFRFMgaXMgbm90IHNldAorCisjCisjIExFRCBkcml2ZXJzCisjCisKKyMKKyMgTEVEIFRyaWdnZXJzCisjCisKKyMKKyMgTXVsdGltZWRpYSBkZXZpY2VzCisjCisjIENPTkZJR19WSURFT19ERVYgaXMgbm90IHNldAorCisjCisjIERpZ2l0YWwgVmlkZW8gQnJvYWRjYXN0aW5nIERldmljZXMKKyMKKyMgQ09ORklHX0RWQiBpcyBub3Qgc2V0CisjIENPTkZJR19VU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NTAgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzkzMiBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfOTQ5IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19DT0RFUEFHRV84NzQgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfOCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfMTI1MCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfMTI1MSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQVNDSUkgaXMgbm90IHNldAorQ09ORklHX05MU19JU084ODU5XzE9eQorIyBDT05GSUdfTkxTX0lTTzg4NTlfMiBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8zIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzQgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV82IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzcgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfOSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xMyBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfS09JOF9SIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19LT0k4X1UgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX1VURjggaXMgbm90IHNldAorCisjCisjIFByb2ZpbGluZyBzdXBwb3J0CisjCisjIENPTkZJR19QUk9GSUxJTkcgaXMgbm90IHNldAorCisjCisjIEtlcm5lbCBoYWNraW5nCisjCisjIENPTkZJR19QUklOVEtfVElN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Q0ZJX0JFX0JZVEVfU1dBUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0xFX0JZVEVfU1dBUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0dFT01FVFJZIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PVFAgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSU5URUxFWFQ9eQorIyBDT05GSUdfTVREX0NGSV9BTURTVEQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09CU09MRVRFX0NISVBTIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9QSFlTTUFQX1NUQVJUPTB4ZmEwMDAwMDAKK0NPTkZJR19NVERfUEhZU01BUF9MRU49MHgwCitDT05GSUdfTVREX1BIWVNNQVBfQkFOS1dJRFRIPTIKKyMgQ09ORklHX01URF9BUk1fSU5URUdSQVRPUiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfUE1DNTUxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CisKKyMKKyMgTkFORCBGbGFzaCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX05BTkQgaXMgbm90IHNldAorCisjCisjIE9uZU5BTkQgRmxhc2ggRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9PTkVOQU5EIGlzIG5vdCBzZXQKKworIworIyBQYXJhbGxlbCBwb3J0IHN1cHBvcnQKKyMKKyMgQ09ORklHX1BBUlBPUlQgaXMgbm90IHNldAorCisjCisjIFBsdWcgYW5kIFBsYXkgc3VwcG9ydAorIworCisjCisjIEJsb2NrIGRldmljZXMKKyMKKyMgQ09ORklHX0JMS19DUFFfREEgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0NQUV9DSVNTX0RBIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfREFDOTYwIGlz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X1NZU19IWVBFUlZJU09SIGlzIG5vdCBzZXQKKworIworIyBDb25uZWN0b3IgLSB1bmlmaWVkIHVzZXJzcGFjZSA8LT4ga2VybmVsc3BhY2UgbGlua2VyCisjCisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorCisjCisjIE1lbW9yeSBUZWNobm9sb2d5IERldmljZXMgKE1URCkKKyMKK0NPTkZJR19NVEQ9eQorIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DT05DQVQgaXMgbm90IHNldAorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ01ETElORV9QQVJUUz15CisjIENPTkZJR19NVERfQUZTX1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKK0NPTkZJR19NVERfQ0ZJPXkKKyMgQ09ORklHX01URF9KRURFQ1BST0JFIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfR0VOX1BST0JFPXkKKyMgQ09ORklHX01URF9DRklfQURWX09QVElPTlMgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSU5URUxFWFQ9eQorQ09ORklHX01URF9DRklfQU1EU1REPXkKKyMgQ09ORklHX01URF9DRklfU1RBQSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PQlNPTEVURV9DSElQUyBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIWVNNQVAgaXMgbm90IHNldAorQ09ORklHX01URF9BUk1fSU5URUdSQVRPUj15CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVER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NldAorCisjCisjIElFRUUgMTM5NCAoRmlyZVdpcmUpIHN1cHBvcnQKKyMKKworIworIyBJMk8gZGV2aWNlIHN1cHBvcnQKKyMKKworIworIyBOZXR3b3JrIGRldmljZSBzdXBwb3J0CisjCitDT05GSUdfTkVUREVWSUNFUz15CisjIENPTkZJR19EVU1NWSBpcyBub3Qgc2V0CisjIENPTkZJR19CT05ESU5HIGlzIG5vdCBzZXQKKyMgQ09ORklHX0VRVUFMSVpFUiBpcyBub3Qgc2V0CisjIENPTkZJR19UVU4gaXMgbm90IHNldAorCisjCisjIFBIWSBkZXZpY2Ugc3VwcG9ydAorIworIyBDT05GSUdfUEhZTElCIGlzIG5vdCBzZXQKKworIworIyBFdGhlcm5ldCAoMTAgb3IgMTAwTWJpdCkKKyMKK0NPTkZJR19ORVRfRVRIRVJORVQ9eQorQ09ORklHX01JST15CitDT05GSUdfU01DOTFYPXkKKyMgQ09ORklHX0RNOTAwMCBpcyBub3Qgc2V0CisKKyMKKyMgRXRoZXJuZXQgKDEwMDAgTWJpdCkKKyMKKworIworIyBFdGhlcm5ldCAoMTAwMDAgTWJpdCkKKyMKKworIworIyBUb2tlbiBSaW5nIGRldmljZXMKKyMKKworIworIyBXaXJlbGVzcyBMQU4gKG5vbi1oYW1yYWRpbykKKyMKKyMgQ09ORklHX05FVF9SQURJTyBpcyBub3Qgc2V0CisKKyMKKyMgV2FuIGludGVyZmFjZXMKKyMKKyMgQ09ORklHX1dBTiBpcyBub3Qgc2V0CisjIENPTkZJR19QUFAgaXMgbm90IHNldAorIyBDT05GSUdfU0xJUCBpcyBub3Qgc2V0CisjIENPTkZJR19TSEFQRVIgaXMgbm90IHNldAorIyBDT05GSUdfTkVUQ09OU09MRSBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRQT0xMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVF9QT0xMX0NPTlRST0xMRVIgaXMgbm90IHNldAorCisjCisjIElTRE4gc3Vic3lzdGVtCisjCisjIENPTkZJR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XMgbm90IHNldAorIyBDT05GSUdfSFdfUkFORE9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX05WUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RUTEsgaXMgbm90IHNldAorIyBDT05GSUdfUjM5NjQgaXMgbm90IHNldAorCisjCisjIEZ0YXBlLCB0aGUgZmxvcHB5IHRhcGUgZGV2aWNlIGRyaXZlcgorIworIyBDT05GSUdfUkFXX0RSSVZFUiBpcyBub3Qgc2V0CisKKyMKKyMgVFBNIGRldmljZXMKKyMKKyMgQ09ORklHX1RDR19UUE0gaXMgbm90IHNldAorCisjCisjIEkyQyBzdXBwb3J0CisjCisjIENPTkZJR19JMkMgaXMgbm90IHNldAorCisjCisjIFNQSSBzdXBwb3J0CisjCisjIENPTkZJR19TUEkgaXMgbm90IHNldAorIyBDT05GSUdfU1BJX01BU1RFUiBpcyBub3Qgc2V0CisKKyMKKyMgRGFsbGFzJ3MgMS13aXJlIGJ1cworIworIyBDT05GSUdfVzEgaXMgbm90IHNldAorCisjCisjIEhhcmR3YXJlIE1vbml0b3Jpbmcgc3VwcG9ydAorIworIyBDT05GSUdfSFdNT04gaXMgbm90IHNldAorIyBDT05GSUdfSFdNT05fVklEIGlzIG5vdCBzZXQKKworIworIyBNaXNjIGRldmljZXMKKyMKKyMgQ09ORklHX1NHSV9JT0M0IGlzIG5vdCBzZXQKKyMgQ09ORklHX1RJRk1fQ09SRSBpcyBub3Qgc2V0CisKKyMKKyMgTEVEIGRldmljZXMKKyMKKyMgQ09ORklHX05FV19MRURTIGlzIG5vdCBzZXQKKworIworIyBMRUQgZHJpdmVycworIworCisjCisjIExFRCBUcmlnZ2VycworIworCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJyb2FkY2FzdGluZyBEZXZpY2VzCisjCisjIENPTkZJR19EVkIgaXMgbm90IHNldAorCisjCisjIEdyYX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VTkQ9eQorCisjCisjIEFkdmFuY2VkIExpbnV4IFNvdW5kIEFyY2hpdGVjdHVyZQorIworQ09ORklHX1NORD15CitDT05GSUdfU05EX1RJTUVSPXkKK0NPTkZJR19TTkRfUENNPXkKKyMgQ09ORklHX1NORF9TRVFVRU5DRVIgaXMgbm90IHNldAorQ09ORklHX1NORF9PU1NFTVVMPXkKK0NPTkZJR19TTkRfTUlYRVJfT1NTPXkKK0NPTkZJR19TTkRfUENNX09TUz15CitDT05GSUdfU05EX1BDTV9PU1NfUExVR0lOUz15CisjIENPTkZJR19TTkRfRFlOQU1JQ19NSU5PUlMgaXMgbm90IHNldAorQ09ORklHX1NORF9TVVBQT1JUX09MRF9BUEk9eQorQ09ORklHX1NORF9WRVJCT1NFX1BST0NGUz15CisjIENPTkZJR19TTkRfVkVSQk9TRV9QUklOVEsgaXMgbm90IHNldAorIyBDT05GSUdfU05EX0RFQlVHIGlzIG5vdCBzZXQKKworIworIyBHZW5lcmljIGRldmljZXMKKyMKK0NPTkZJR19TTkRfQUM5N19DT0RFQz1tCitDT05GSUdfU05EX0FDOTdfQlVTPW0KKyMgQ09ORklHX1NORF9EVU1NWSBpcyBub3Qgc2V0CisjIENPTkZJR19TTkRfTVRQQVYgaXMgbm90IHNldAorIyBDT05GSUdfU05EX1NFUklBTF9VMTY1NTAgaXMgbm90IHNldAorIyBDT05GSUdfU05EX01QVTQwMSBpcyBub3Qgc2V0CisKKyMKKyMgQUxTQSBBUk0gZGV2aWNlcworIworQ09ORklHX1NORF9BUk1BQUNJPW0KKworIworIyBPcGVuIFNvdW5kIFN5c3RlbQorIworIyBDT05GSUdfU09VTkRfUFJJTUUgaXMgbm90IHNldAorCisjCisjIFVTQiBzdXBwb3J0CisjCitDT05GSUdfVVNCX0FSQ0hfSEFTX0hDRD15CisjIENPTkZJR19VU0JfQVJDSF9IQVNfT0hDSSBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfQVJDSF9IQVNfRUhDSSBpcyBub3Qgc2V0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dF9yZXNvdXJjZSgmaW9tZW1fcmVzb3VyY2UsICZyZXNbMV0pOworCisJc3lzLT5yZXNvdXJjZVswXSA9ICZyZXNbMF07CisJc3lzLT5yZXNvdXJjZVsxXSA9ICZyZXNbMV07CisJc3lzLT5yZXNvdXJjZVsyXSA9IE5VTEw7CisKKwlyZXR1cm4gMTsKK30KKwordTE2IGlvcDEzeHhfZGV2X2lkKHZvaWQpCit7CisJaWYgKF9fcmF3X3JlYWRsKElPUDEzWFhfRVNTUjApICYgSU9QMTNYWF9JTlRFUkZBQ0VfU0VMX1BDSVgpCisJCXJldHVybiBfX3Jhd19yZWFkdyhJT1AxM1hYX0FUVUVfRElEKTsKKwllbHNlCisJCXJldHVybiBfX3Jhd19yZWFkdyhJT1AxM1hYX0FUVVhfRElEKTsKK30KKworc3RhdGljIGludCBfX2luaXQgaW9wMTN4eF9pbml0X2F0dV9zZXR1cChjaGFyICpzdHIpCit7CisgICAgICAgIGluaXRfYXR1ID0gSU9QMTNYWF9JTklUX0FUVV9OT05FOworICAgICAgICBpZiAoc3RyKSB7CisgICAgICAgICAgICAgICAgd2hpbGUgKCpzdHIgIT0gJ1wwJykgeworICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoICgqc3RyKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd4JzoKKyAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ1gnOgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbml0X2F0dSB8PSBJT1AxM1hYX0lOSVRfQVRVX0FUVVg7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaXRfYXR1ICY9IH5JT1AxM1hYX0lOSVRfQVRVX05PTkU7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnZSc6CisgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdFJzoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5pdF9hdHUgfD0gSU9QMTNYWF9JTklUX0FUVV9BVFVFOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbml0X2F0dSAmPSB+SU9QMTNYWF9JTklUX0FUVV9OT05FOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJywnOgorICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnPSc6CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUFJJTlRLKCJcImlvcDEzeHhfaW5pdF9hdHVcIiBtYWxmb3JtZWQgYXQgIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiY2hhcmFjdGVyOiBcJyVjXCciLCAqc3RyKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKihzdHIgKyAxKSA9ICdcMCc7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaXRfYXR1ID0gSU9QMTNYWF9JTklUX0FUVV9ERUZBVUxUOworICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgc3RyKys7CisgICAgICAgICAgICAgICAgfQorICAgICAgICB9CisgICAgICAgIHJldHVybiAxOworfQorCitfX3NldHVwKCJpb3AxM3h4X2luaXRfYXR1IiwgaW9wMTN4eF9pbml0X2F0dV9zZXR1cCk7CmRpZmYgLS1naXQgYS9hcmNoL2FybS9tYWNoLWlvcDEzeHgvc2V0dXAuYyBiL2FyY2gvYXJtL21hY2gtaW9wMTN4eC9zZXR1cC5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjM3NTZkMmMKLS0tIC9kZXYvbnVsbAorKysgYi9hcmNoL2FybS9tYWNoLWlvcDEzeHgvc2V0dX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AxM1hYX1VBUlQwX1ZJUlQpLAorICAgICAgIC5tYXBiYXNlICAgICA9IChJT1AxM1hYX1VBUlQwX1BIWVMpLAorICAgICAgIC5pcnEgICAgICAgICA9IElSUV9JT1AxM1hYX1VBUlQwLAorICAgICAgIC51YXJ0Y2xrICAgICA9IElPUDEzWFhfVUFSVF9YVEFMLAorICAgICAgIC5yZWdzaGlmdCAgICA9IDIsCisgICAgICAgLmlvdHlwZSAgICAgID0gVVBJT19NRU0sCisgICAgICAgLmZsYWdzICAgICAgID0gVVBGX1NLSVBfVEVTVCwKKwl9LAorCXsgIH0sCit9OworCitzdGF0aWMgc3RydWN0IHBsYXRfc2VyaWFsODI1MF9wb3J0IGlvcDEzeHhfdWFydDFfZGF0YVtdID0geworCXsKKyAgICAgICAubWVtYmFzZSAgICAgPSAoY2hhciopKElPUDEzWFhfVUFSVDFfVklSVCksCisgICAgICAgLm1hcGJhc2UgICAgID0gKElPUDEzWFhfVUFSVDFfUEhZUyksCisgICAgICAgLmlycSAgICAgICAgID0gSVJRX0lPUDEzWFhfVUFSVDEsCisgICAgICAgLnVhcnRjbGsgICAgID0gSU9QMTNYWF9VQVJUX1hUQUwsCisgICAgICAgLnJlZ3NoaWZ0ICAgID0gMiwKKyAgICAgICAuaW90eXBlICAgICAgPSBVUElPX01FTSwKKyAgICAgICAuZmxhZ3MgICAgICAgPSBVUEZfU0tJUF9URVNULAorCX0sCisJeyAgfSwKK307CisKKy8qIFRoZSBpZHMgYXJlIGZpeGVkIHVwIGxhdGVyIGluIGlvcDEzeHhfcGxhdGZvcm1faW5pdCAqLworc3RhdGljIHN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgaW9wMTN4eF91YXJ0MCA9IHsKKyAgICAgICAubmFtZSA9ICJzZXJpYWw4MjUwIiwKKyAgICAgICAuaWQgPSAwLAorICAgICAgIC5kZXYucGxhdGZvcm1fZGF0YSA9IGlvcDEzeHhfdWFydDBfZGF0YSwKKyAgICAgICAubnVtX3Jlc291cmNl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IyBDT05GSUdfTVREX0NPTkNBVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorQ09ORklHX01URF9DTURMSU5FX1BBUlRTPXkKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKK0NPTkZJR19NVERfQ0ZJPXkKKyMgQ09ORklHX01URF9KRURFQ1BST0JFIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfR0VOX1BST0JFPXkKKyMgQ09ORklHX01URF9DRklfQURWX09QVElPTlMgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JTlRFTEVYVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09CU09MRVRFX0NISVBTIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9QSFlTTUFQX1NUQVJUPTB4ODAwMDAwMAorQ09ORklHX01URF9QSFlTTUFQX0xFTj0weDAKK0NPTkZJR19NVERfUEhZU01BUF9CQU5LV0lEVEg9MgorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKworIworIyBOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgT25l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0dXJuOworCQl9CisKKwkJZTgyMC5tYXBbeF0uYWRkciA9IHN0YXJ0OworCQllODIwLm1hcFt4XS5zaXplID0gc2l6ZTsKKwkJZTgyMC5tYXBbeF0udHlwZSA9IHR5cGU7CisJCWU4MjAubnJfbWFwKys7CisJfQorfSAvKiBhZGRfbWVtb3J5X3JlZ2lvbiAqLworCisvKgorICogU2FuaXRpemUgdGhlIEJJT1MgZTgyMCBtYXAuCisgKgorICogU29tZSBlODIwIHJlc3BvbnNlcyBpbmNsdWRlIG92ZXJsYXBwaW5nIGVudHJpZXMuICBUaGUgZm9sbG93aW5nCisgKiByZXBsYWNlcyB0aGUgb3JpZ2luYWwgZTgyMCBtYXAgd2l0aCBhIG5ldyBvbmUsIHJlbW92aW5nIG92ZXJsYXBzLgorICoKKyAqLworaW50IF9faW5pdCBzYW5pdGl6ZV9lODIwX21hcChzdHJ1Y3QgZTgyMGVudHJ5ICogYmlvc21hcCwgY2hhciAqIHBucl9tYXApCit7CisJc3RydWN0IGNoYW5nZV9tZW1iZXIgKmNoYW5nZV90bXA7CisJdW5zaWduZWQgbG9uZyBjdXJyZW50X3R5cGUsIGxhc3RfdHlwZTsKKwl1bnNpZ25lZCBsb25nIGxvbmcgbGFzdF9hZGRyOworCWludCBjaGdpZHgsIHN0aWxsX2NoYW5naW5nOworCWludCBvdmVybGFwX2VudHJpZXM7CisJaW50IG5ld19iaW9zX2VudHJ5OworCWludCBvbGRfbnIsIG5ld19uciwgY2hnX25yOworCWludCBpOworCisJLyoKKwkJVmlzdWFsbHkgd2UncmUgcGVyZm9ybWluZyB0aGUgZm9sbG93aW5nICgxLDIsMyw0ID0gbWVtb3J5IHR5cGVzKS4uLgorCisJCVNhbXBsZSBtZW1vcnkgbWFwICh3L292ZXJsYXBzKToKKwkJICAgX19fXzIyX19fX19fX19fX19fX19fX19fCisJCSAgIF9fX19fX19fX19fX19fX19fX19fX180XworCQkgICBfX19fMTExMV9fX19fX19fX19fX19fX18KKwkJICAgXzQ0X19fX19fX19fX19fX19fX19fX19fCisJCSAgIDExMTExMTExX19fX19fX19fX19fX19fXworCQkgICBfX19fX19fX19fX19fX19fX19fXzMzX18KKwkJICAgX19fX19fX19fX180NF9fX19fX19fX19fCisJCSAgIF9fX19fX19fX18zMzMzM19fX19fX19fXworCQkgICBfX19fX19fX19fX19fXzIyX19fX19fX18KKwkJICAgX19fX19fX19fX19fX19fX19fXzIyMjJfCisJCSAgIF9fX19fX19fXzExMTExMTExMV9fX19fXworCQkgICBfX19fX19fX19fX19fX19fX19fX18xMV8KKwkJICAgX19fX19fX19fX19fX19fX180X19fX19fCisKKwkJU2FuaXRpemVkIGVxdWl2YWxlbnQgKG5vIG92ZXJsYXApOgorCQkgICAxX19fX19fX19fX19fX19fX19fX19fX18KKwkJICAgXzQ0X19fX19fX19fX19fX19fX19fX19fCisJCSAgIF9fXzFfX19fX19fX19fX19fX19fX19fXworCQkgICBfX19fMjJfX19fX19fX19fX19fX19fX18KKwkJICAgX19fX19fMTFfX19fX19fX19fX19fX19fCisJCSAgIF9fX19fX19fXzFfX19fX19fX19fX19fXworCQkgICBfX19fX19fX19fM19fX19fX19fX19fX18KKwkJICAgX19fX19fX19fX180NF9fX19fX19fX19fCisJCSAgIF9fX19fX19fX19fX18zM19fX19fX19fXworCQkgICBfX19fX19fX19fX19fX18yX19fX19fX18KKwkJICAgX19fX19fX19fX19fX19fXzFfX19fX19fCisJCSAgIF9fX19fX19fX19fX19fX19fNF9fX19fXworCQkgICBfX19fX19fX19fX19fX19fX19fMl9fX18KKwkJICAgX19fX19fX19fX19fX19fX19fX18zM19fCisJCSAgIF9fX19fX19fX19fX19fX19fX19fX180XworCSovCisJcHJpbnRrKCJzYW5pdGl6ZSBzdGFydFxuIik7CisJLyogaWYgdGhlcmUncyBvbmx5IG9uZSBtZW1vcnkgcmVnaW9uLCBkb24ndCBib3RoZXIgKi8KKwlpZiAoKnBucl9tYXAgPCAyKSB7CisJCXByaW50aygic2FuaXRpemUgYmFpbCAwXG4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19fX19fX19fX18KLQkJICAgX19fX19fX19fX19fX19fX19fX18zM19fCi0JCSAgIF9fX19fX19fX19fNDRfX19fX19fX19fXwotCQkgICBfX19fX19fX19fMzMzMzNfX19fX19fX18KLQkJICAgX19fX19fX19fX19fX18yMl9fX19fX19fCi0JCSAgIF9fX19fX19fX19fX19fX19fX18yMjIyXwotCQkgICBfX19fX19fX18xMTExMTExMTFfX19fX18KLQkJICAgX19fX19fX19fX19fX19fX19fX19fMTFfCi0JCSAgIF9fX19fX19fX19fX19fX19fNF9fX19fXwotCi0JCVNhbml0aXplZCBlcXVpdmFsZW50IChubyBvdmVybGFwKToKLQkJICAgMV9fX19fX19fX19fX19fX19fX19fX19fCi0JCSAgIF80NF9fX19fX19fX19fX19fX19fX19fXwotCQkgICBfX18xX19fX19fX19fX19fX19fX19fX18KLQkJICAgX19fXzIyX19fX19fX19fX19fX19fX19fCi0JCSAgIF9fX19fXzExX19fX19fX19fX19fX19fXwotCQkgICBfX19fX19fX18xX19fX19fX19fX19fX18KLQkJICAgX19fX19fX19fXzNfX19fX19fX19fX19fCi0JCSAgIF9fX19fX19fX19fNDRfX19fX19fX19fXwotCQkgICBfX19fX19fX19fX19fMzNfX19fX19fX18KLQkJICAgX19fX19fX19fX19fX19fMl9fX19fX19fCi0JCSAgIF9fX19fX19fX19fX19fX18xX19fX19fXwotCQkgICBfX19fX19fX19fX19fX19fXzRfX19fX18KLQkJICAgX19fX19fX19fX19fX19fX19fXzJfX19fCi0JCSAgIF9fX19fX19fX19fX19fX19fX19fMzNfXwotCQkgICBfX19fX19fX19fX19fX19fX19fX19fNF8KLQkqLwotCi0JLyogaWYgdGhlcmUncyBvbmx5IG9uZSBtZW1vcnkgcmVnaW9uLCBkb24ndCBib3RoZXIgKi8KLQlpZiAoKnBucl9tYXAgPCAyKQotCQlyZXR1cm4gLTE7Ci0KLQlvbGRfbnIgPSAqcG5yX21hcDsKLQotCS8qIGJhaWwgb3V0IGlmIHdlIGZpbmQgYW55IHVucmV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9cjgKKwk7OworICAgICAgICBtb3YgY3IuaXBzcj1yMTYKKyAgICAgICAgbW92IGNyLmlpcD1yMworICAgICAgICBtb3YgY3IuaWZzPXIwCisJc3Jsei5pCisJOzsKKwltb3YgYXIucm5hdD1yMTgKKwlyZmkKKwk7OworMToKKwkvL3BoeXNpY2FsIG1vZGUgY29kZSBiZWdpbgorCW1vdiBiNj1pbjEKKwlkZXAgcjI4PTAsaW4yLDYxLDMJLy90byBwaHlzaWNhbCBhZGRyZXNzCisKKwkvLyBwdXJnZSBhbGwgVEMgZW50cmllcworI2RlZmluZSBPKG1lbWJlcikgICAgICAgSUE2NF9DUFVJTkZPXyMjbWVtYmVyIyNfT0ZGU0VUCisgICAgICAgIEdFVF9USElTX1BBRERSKHIyLCBjcHVfaW5mbykgICAgLy8gbG9hZCBwaHlzIGFkZHIgb2YgY3B1X2luZm8gaW50byByMgorICAgICAgICA7OworICAgICAgICBhZGRsIHIxNz1PKFBUQ0VfU1RSSURFKSxyMgorICAgICAgICBhZGRsIHIyPU8oUFRDRV9CQVNFKSxyMgorICAgICAgICA7OworICAgICAgICBsZDggcjE4PVtyMl0sKE8oUFRDRV9DT1VOVCktTyhQVENFX0JBU0UpKTs7ICAgIAkvLyByMTg9cHRjZV9iYXNlCisgICAgICAgIGxkNCByMTk9W3IyXSw0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHIxOT1wdGNlX2NvdW50WzBdCisgICAgICAgIGxkNCByMjE9W3IxN10sNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHIyMT1wdGNlX3N0cmlkZVswXQorICAgICAgICA7OworICAgICAgICBsZDQgcjIwPVtyMl0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByMjA9cHRjZV9jb3VudFsxXQorICAgICAgICBsZDQgcjIyPVtyMTddICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByMjI9cHRjZV9zdHJpZGVbMV0KKyAgICAgICAgbW92IHIyND1yMAorICAgICAgICA7OworICAgICAgICBhZGRzIHIyMD0tMSxyMjAKKyAgICAgICAgOzsKKyN1bmRlZiBPCisyOgorICAgICAgICBjbXAubHR1IHA2LHA3PXIyNCxyMTkKKyhwNykgICAgYnIuY29uZC5kcG50LmZldyA0ZgorICAgICAgICBtb3YgYXIubGM9cjIwCiszOgorICAgICAgICBwdGMuZSByMTgKKyAgICAgICAgOzsKKyAgICAgICAgYWRkIHIxOD1yMjIscjE4CisgICAgICAgIGJyLmNsb29wLnNwdGsuZmV3IDNiCisgICAgICAgIDs7CisgICAgICAgIGFkZCByMTg9cjIxLHIxOAorICAgICAgICBhZGQgcjI0PTEscjI0CisgICAgICAgIDs7CisgICAgICAgIGJyLnNwdGsuZmV3IDJiCis0OgorICAgICAgICBzcmx6LmkKKyAgICAgICAgOzsKKwkvL3B1cmdlIFRSIGVudHJ5IGZvciBrZXJuZWwgdGV4dCBhbmQgZGF0YQorICAgICAgICBtb3ZsIHIxNj1LRVJORUxfU1RBUlQKKyAgICAgICAgbW92IHIxOD1LRVJORUxfVFJfUEFHRV9TSElGVDw8MgorICAgICAgICA7OworICAgICAgICBwdHIuaSByMTYsIHIxOAorICAgICAgICBwdHIuZCByMTYsIHIxOAorICAgICAgICA7OworICAgICAgICBzcmx6LmkKKyAgICAgICAgOzsKKworCS8vIHB1cmdlIFRSIGVudHJ5IGZvciBwZXJjcHUgZGF0YQorICAgICAgICBtb3ZsIHIxNj1QRVJDUFVfQUREUgorICAgICAgICBtb3YgcjE4PVBFUkNQVV9QQUdFX1NISUZUPDwyCisgICAgICAgIDs7CisgICAgICAgIHB0ci5kIHIxNixyMTgKKyAgICAgICAgOzsKKyAgICAgICAgc3Jsei5kCisJOzsKKworICAgICAgICAvLyBwdXJnZSBUUiBlbnRyeSBmb3IgcGFsIGNvZGUKKyAgICAgICAgbW92IHIxNj1pbjMKKyAgICAgICAgbW92IHIxOD1JQTY0X0dSQU5VTEVfU0hJRlQ8PDIKKyAgICAgICAgOzsKKyAgICAgICAgcHRyLmkgcjE2LHIxOAorICAgICAgICA7OworICAgICAgICBzcmx6LmkKKwk7OworCisgICAgICAgIC8vIHB1cmdlIFRSIGVudHJ5IGZvciBzdGFjaworICAgICAgICBtb3YgcjE2PUlBNjRfS1IoQ1VSUkVOVF9TVEFDSykKKyAgICAgICAgOzsKKyAgICAgICAgc2hsIHIxNj1yMTYsSUE2NF9HUkFOVUxFX1NISUZUCisgICAgICAgIG1vdmwgcjE5PVBBR0VfT0ZGU0VUCisgICAgICAgIDs7CisgICAgICAgIGFkZCByMTY9cjE5LHIxNgorICAgICAgICBtb3YgcjE4PUlBNjRfR1JBTlVMRV9TSElGVDw8MgorICAgICAgICA7OworICAgICAgICBwdHIuZCByMTYscjE4CisgICAgICAgIDs7CisgICAgICAgIHNybHouaQorCTs7CisKKwkvL2NvcHkgc2VnbWVudHMKKwltb3ZsIHIxNj1QQUdFX01BU0sKKyAgICAgICAgbW92ICByMzA9aW4wICAgICAgICAgICAgICAgICAgICAvLyBpbjAgaXMgcGFnZV9saXN0CisgICAgICAgIGJyLnNwdGsuZmV3IC5kZXN0X3BhZ2UKKwk7OworLmxvb3A6CisJbGQ4ICByMzA9W2luMF0sIDg7OworLmRlc3RfcGFnZToKKwl0Yml0LnogcDAsIHA2PXIzMCwgMDs7ICAgIAkvLyAweDEgZGVzdCBwYWdlCisocDYpCWFuZCByMTc9cjMwLCByMTYKKyhwNikJYnIuY29uZC5zcHRrLmZldyAubG9vcDs7CisKKwl0Yml0LnogcDAsIHA2PXIzMCwgMTs7CQkvLyAweDIgaW5kaXJlY3QgcGFnZQorKHA2KQlhbmQgaW4wPXIzMCwgcjE2CisocDYpCWJyLmNvbmQuc3B0ay5mZXcgLmxvb3A7OworCisJdGJpdC56IHAwLCBwNj1yMzAsIDI7OwkJLy8gMHg0IGVuZCBmbGFnCisocDYpCWJyLmNvbmQuc3B0ay5mZXcgLmVuZF9sb29wOzsKKworCXRiaXQueiBwNiwgcDA9cj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gICAgICAgICAgICAvLyBwdXQgUlNFIGluIGVuZm9yY2VkIGxhenkgbW9kZQorICAgICAgICBhZGQgICAgIGxvYzE9NCo4LCBpbjAgICAgICAgICAgIC8vIHNhdmUgcjQgYW5kIHI1IGZpcnN0CisgICAgICAgIDs7Cit7CisgICAgICAgIGZsdXNocnMgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZmx1c2ggZGlydHkgcmVncyB0byBiYWNraW5nIHN0b3JlCisgICAgICAgIHNybHouaQorfQorICAgICAgICBzdDggW2xvYzFdPXI0LCA4CisgICAgICAgIDs7CisgICAgICAgIHN0OCBbbG9jMV09cjUsIDgKKyAgICAgICAgOzsKKyAgICAgICAgYWRkIGxvYzE9MzIqOCwgaW4wCisgICAgICAgIG1vdiByND1hci5ybmF0CisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yMCwgOAkJCS8vIHIwCisgICAgICAgIHN0OCBbbG9jMV09cjQsIDgJCS8vIHJuYXQKKyAgICAgICAgbW92IHI1PXByCisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yMSwgOAkJCS8vIHIxCisgICAgICAgIHN0OCBbbG9jMV09cjUsIDgJCS8vIHByCisgICAgICAgIG1vdiByND1iMAorICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjIsIDgJCQkvLyByMgorICAgICAgICBzdDggW2xvYzFdPXI0LCA4CQkvLyBiMAorICAgICAgICBtb3YgcjU9YjE7CisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yMywgMjQJCS8vIHIzCisgICAgICAgIHN0OCBbbG9jMV09cjUsIDgJCS8vIGIxCisgICAgICAgIG1vdiByND1iMgorICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjYsIDgJCQkvLyByNgorICAgICAgICBzdDggW2xvYzFdPXI0LCA4CQkvLyBiMgorCW1vdiByNT1iMworICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjcsIDgJCQkvLyByNworICAgICAgICBzdDggW2xvYzFdPXI1LCA4CQkvLyBiMworICAgICAgICBtb3YgcjQ9YjQKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXI4LCA4CQkJLy8gcjgKKyAgICAgICAgc3Q4IFtsb2MxXT1yNCwgOAkJLy8gYjQKKyAgICAgICAgbW92IHI1PWI1CisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yOSwgOAkJCS8vIHI5CisgICAgICAgIHN0OCBbbG9jMV09cjUsIDgJCS8vIGI1CisgICAgICAgIG1vdiByND1iNgorICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjEwLCA4CQkvLyByMTAKKyAgICAgICAgc3Q4IFtsb2MxXT1yNSwgOAkJLy8gYjYKKyAgICAgICAgbW92IHI1PWI3CisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yMTEsIDgJCS8vIHIxMQorICAgICAgICBzdDggW2xvYzFdPXI1LCA4CQkvLyBiNworICAgICAgICBtb3YgcjQ9YjAKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIxMiwgOAkJLy8gcjEyCisgICAgICAgIHN0OCBbbG9jMV09cjQsIDgJCS8vIGlwCisgICAgICAgIG1vdiByNT1sb2MwCisJOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIxMywgOAkJLy8gcjEzCisgICAgICAgIGV4dHIudSByNT1yNSwgMCwgMzgJCS8vIGFyLnBmcy5wZm0KKwltb3YgcjQ9cjAJCQkvLyB1c2VyIG1hc2sKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIxNCwgOAkJLy8gcjE0CisgICAgICAgIHN0OCBbbG9jMV09cjUsIDgJCS8vIGNmbQorICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjE1LCA4CQkvLyByMTUKKyAgICAgICAgc3Q4IFtsb2MxXT1yNCwgOCAgICAgICAgCS8vIHVzZXIgbWFzaworCW1vdiByNT1hci5yc2MKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIxNiwgOAkJLy8gcjE2CisgICAgICAgIHN0OCBbbG9jMV09cjUsIDggICAgICAgIAkvLyBhci5yc2MKKyAgICAgICAgbW92IHI0PWFyLmJzcAorICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjE3LCA4CQkvLyByMTcKKyAgICAgICAgc3Q4IFtsb2MxXT1yNCwgOCAgICAgICAgCS8vIGFyLmJzcAorICAgICAgICBtb3YgcjU9YXIuYnNwc3RvcmUKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIxOCwgOAkJLy8gcjE4CisgICAgICAgIHN0OCBbbG9jMV09cjUsIDggICAgICAgIAkvLyBhci5ic3BzdG9yZQorICAgICAgICBtb3YgcjQ9YXIucm5hdAorICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjE5LCA4CQkvLyByMTkKKyAgICAgICAgc3Q4IFtsb2MxXT1yNCwgOCAgICAgICAgCS8vIGFyLnJuYXQKKyAgICAgICAgbW92IHI1PWFyLmNjdgorICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjIwLCA4CQkvLyByMjAKKwlzdDggW2xvYzFdPXI1LCA4ICAgICAgICAJLy8gYXIuY2N2CisgICAgICAgIG1vdiByND1hci51bmF0CisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yMjEsIDgJCS8vIHIyMQorICAgICAgICBzdDggW2xvYzFdPXI0LCA4ICAgICAgICAJLy8gYXIudW5hdAorICAgICAgICBtb3YgcjUgPSBhci5mcHNyCisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yMjIsIDgJCS8vIHIyMgorICAgICAgICBzdDggW2xvYzFdPXI1LCA4ICAgICAgICAJLy8gYXIuZnBzcgorICAgICAgICBtb3YgcjQgPSBhci51bmF0CisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yMjMsIDgJCS8vIHIyMworICAgICAgICBzdDggW2xvYzFdPXI0LCA4ICAgICAgICAJLy8gdW5hdAorICAgICAgICBtb3YgcjUgPSBhci5mcHNyCisgICAgICAgIDs7CisgICAgICAgIHN0OCBbaW4wXT1yMjQsIDgJCS8vIHIyNAorICAgICAgICBzdDggW2xvYzFdPXI1LCA4ICAgICAgICAJLy8gZnBzcgorICAgICAgICBtb3YgcjQgPSBhci5wZnMKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIyNSwgOAkJLy8gcjI1CisgICAgICAgIHN0OCBbbG9jMV09cjQsIDggICAgICAgIAkvLyBhci5wZnMKKyAgICAgICAgbW92IHI1ID0gYXIubGMKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIyNiwgOAkJLy8gcjI2CisgICAgICAgIHN0OCBbbG9jMV09cjUsIDggICAgICAgIAkvLyBhci5sYworICAgICAgICBtb3YgcjQgPSBhci5lYworICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjI3LCA4CQkvLyByMjcKKyAgICAgICAgc3Q4IFtsb2MxXT1yNCwgOCAgICAgICAgCS8vIGFyLmVjCisgICAgICAgIG1vdiByNSA9IGFyLmNzZAorICAgICAgICA7OworICAgICAgICBzdDggW2luMF09cjI4LCA4CQkvLyByMjgKKyAgICAgICAgc3Q4IFtsb2MxXT1yNSwgOCAgICAgICAgCS8vIGFyLmNzZAorICAgICAgICBtb3YgcjQgPSBhci5zc2QKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIyOSwgOAkJLy8gcjI5CisgICAgICAgIHN0OCBbbG9jMV09cjQsIDggICAgICAgIAkvLyBhci5zc2QKKyAgICAgICAgOzsKKyAgICAgICAgc3Q4IFtpbjBdPXIzMCwgOAkJLy8gcjMwCisgICAgICAgIDs7CisJc3Q4IFtpbjBdPXIzMSwgOAkJLy8gcjMxCisgICAgICAgIG1vdiBhci5wZnM9bG9jMAorICAgICAgICA7OworICAgICAgICBici5yZXQuc3B0ay5tYW55IHJwCitFTkQoaWE2NF9kdW1wX2NwdV9yZWdzKQorCisKZGlmZiAtLWdp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wotICogICAgICAgQCgweDYwLHNwKSAtIGZwIChyMTMpCQlkaXR0bwotICogICAgICAgQCgweDY0LHNwKSAtIGxyIChyMTQpCQlkaXR0bwotICogICAgICAgQCgweDY4LHNwKSAtIHNwaSAoY3IyKQkJZGl0dG8KLSAqICAgICAgIEAoMHg2YyxzcCkgLSBvcmlnX3IwCQlkaXR0bworICogTTMyUi9NMzJSeC9NMzJSMgorICogICAgICAgQChzcCkgICAgICAtIHI0CisgKiAgICAgICBAKDB4MDQsc3ApIC0gcjUKKyAqICAgICAgIEAoMHgwOCxzcCkgLSByNgorICogICAgICAgQCgweDBjLHNwKSAtICpwdF9yZWdzCisgKiAgICAgICBAKDB4MTAsc3ApIC0gcjAKKyAqICAgICAgIEAoMHgxNCxzcCkgLSByMQorICogICAgICAgQCgweDE4LHNwKSAtIHIyCisgKiAgICAgICBAKDB4MWMsc3ApIC0gcjMKKyAqICAgICAgIEAoMHgyMCxzcCkgLSByNworICogICAgICAgQCgweDI0LHNwKSAtIHI4CisgKiAgICAgICBAKDB4Mjgsc3ApIC0gcjkKKyAqICAgICAgIEAoMHgyYyxzcCkgLSByMTAKKyAqICAgICAgIEAoMHgzMCxzcCkgLSByMTEKKyAqICAgICAgIEAoMHgzNCxzcCkgLSByMTIKKyAqICAgICAgIEAoMHgzOCxzcCkgLSBzeXNjYWxsX25yCisgKiAgICAgICBAKDB4M2Msc3ApIC0gYWNjMGgKKyAqICAgICAgIEAoMHg0MCxzcCkgLSBhY2MwbAorICogICAgICAgQCgweDQ0LHNwKSAtIGFjYzFoCQk7IElTQV9EU1BfTEVWRUwyIG9ubHkKKyAqICAgICAgIEAoMHg0OCxzcCkgLSBhY2MxbAkJOyBJU0FfRFNQX0xFVkVMMiBvbmx5CisgKiAgICAgICBAKDB4NGMsc3ApIC0gcHN3CisgKiAgICAgICBAKDB4NTAsc3ApIC0gYnBjCisgKiAgICAgICBAKDB4NTQsc3ApIC0gYmJwc3cKKyAqICAgICAgIEAoMHg1OCxzcCk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0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0lOVEVMRVhUPXkKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CitDT05GSUdfTVREX0NGSV9TVEFBPXkKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09CU09MRVRFX0NISVBTIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9QSFlTTUFQX1NUQVJUPTB4MAorQ09ORklHX01URF9QSFlTTUFQX0xFTj0weDAKK0NPTkZJR19NVERfUEhZU01BUF9CQU5LV0lEVEg9MAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1BNQzU1MSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMVVMgaXMgbm90IHNldAorCisjCisjIE5BTkQgRmxhc2ggRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9OQU5EIGlzIG5vdCBzZXQKKworIworIyBPbmVOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CiAKICMKICMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CmRpZmYgLS1naXQgYS9hcmNoL21pcHMvY29uZmlncy9taXBzc2ltX2RlZmNvbmZpZyBiL2FyY2gvbWlwcy9jb25maWdzL21pcHNzaW1fZGVmY29uZmlnCmluZGV4IGEzY2JkMjNiLi4wM2VmY2ZkIDEwMDY0NAotLS0gYS9hcmNoL21pcHMvY29uZmlncy9taXBzc2ltX2RlZmNvbmZpZworKysgYi9hcmNoL21pcHMvY29uZmlncy9taXBzc2ltX2RlZmNvbmZpZwpAQCAtNTksNyArNTksNyBAQAogIyBDT05GSUdfU0lCWVRFX0xJVFRMRVNVUiBpcyBub3Qgc2V0CiAjIENPTkZJR19TSUJZVEVfQ1JISU5FIGlzIG5vdCBzZXQKICMgQ09ORklHX1NJQllURV9DUkhPTkUgaXMgbm90IHNldAotIyBDT05GSUdfU05JX1JNMjAwX1BDSSBpcyBub3Qgc2V0CisjIENPTkZJR19TTklfUk0gaXMgbm90IHNldAogIyBDT05GS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TkZJR19TR0lfSU9DNCBpcyBub3Qgc2V0CisjIENPTkZJR19USUZNX0NPUkUgaXMgbm90IHNldAorCisjCisjIEFUQS9BVEFQSS9NRk0vUkxMIHN1cHBvcnQKKyMKK0NPTkZJR19JREU9eQorQ09ORklHX0lERV9NQVhfSFdJRlM9NAorQ09ORklHX0JMS19ERVZfSURFPXkKKworIworIyBQbGVhc2Ugc2VlIERvY3VtZW50YXRpb24vaWRlLnR4dCBmb3IgaGVscC9pbmZvIG9uIElERSBkcml2ZXMKKyMKKyMgQ09ORklHX0JMS19ERVZfSURFX1NBVEEgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfSURFRElTSz15CisjIENPTkZJR19JREVESVNLX01VTFRJX01PREUgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfSURFQ0Q9bQorIyBDT05GSUdfQkxLX0RFVl9JREVUQVBFIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfSURFRkxPUFBZIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWX0lERVNDU0k9eQorIyBDT05GSUdfSURFX1RBU0tfSU9DVEwgaXMgbm90IHNldAorCisjCisjIElERSBjaGlwc2V0IHN1cHBvcnQvYnVnZml4ZXMKKyMKK0NPTkZJR19JREVfR0VORVJJQz15CitDT05GSUdfQkxLX0RFVl9JREVQQ0k9eQorQ09ORklHX0lERVBDSV9TSEFSRV9JUlE9eQorQ09ORklHX0JMS19ERVZfT0ZGQk9BUkQ9eQorQ09ORklHX0JMS19ERVZfR0VORVJJQz15CisjIENPTkZJR19CTEtfREVWX09QVEk2MjEgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfSURFRE1BX1BDST15CisjIENPTkZJR19CTEtfREVWX0lERURNQV9GT1JDRUQgaXMgbm90IHNldAorIyBDT05GSUdfSURFRE1BX1BDSV9BVVRPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfQUVDNjJYWCBpcyBub3Qgc2V0CisjIENPTkZJR19CTE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YXJkIHN1cHBvcnQKKyMKKyMgQ09ORklHX01NQyBpcyBub3Qgc2V0CisKKyMKKyMgTEVEIGRldmljZXMKKyMKKyMgQ09ORklHX05FV19MRURTIGlzIG5vdCBzZXQKKworIworIyBMRUQgZHJpdmVycworIworCisjCisjIExFRCBUcmlnZ2VycworIworCisjCisjIEluZmluaUJhbmQgc3VwcG9ydAorIworIyBDT05GSUdfSU5GSU5JQkFORCBpcyBub3Qgc2V0CisKKyMKKyMgRURBQyAtIGVycm9yIGRldGVjdGlvbiBhbmQgcmVwb3J0aW5nIChSQVMpIChFWFBFUklNRU5UQUwpCisjCisKKyMKKyMgUmVhbCBUaW1lIENsb2NrCisjCisjIENPTkZJR19SVENfQ0xBU1MgaXMgbm90IHNldAorCisjCisjIERNQSBFbmdpbmUgc3VwcG9ydAorIworIyBDT05GSUdfRE1BX0VOR0lORSBpcyBub3Qgc2V0CisKKyMKKyMgRE1BIENsaWVudHMKKyMKKworIworIyBETUEgRGV2aWNlcworIworCisjCisjIEZpbGUgc3lzdGVtcworIworQ09ORklHX0VYVDJfRlM9eQorIyBDT05GSUdfRVhUMl9GU19YQVRUUiBpcyBub3Qgc2V0CisjIENPTkZJR19FWFQyX0ZTX1hJUCBpcyBub3Qgc2V0CisjIENPTkZJR19FWFQzX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0VYVDRERVZfRlMgaXMgbm90IHNldAorIyBDT05GSUdfUkVJU0VSRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfSkZTX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZTX1BPU0lYX0FDTCBpcyBub3Qgc2V0CisjIENPTkZJR19YRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfR0ZTMl9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19PQ0ZTMl9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19NSU5JWF9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19ST01GU19GUyBpcyBub3Qgc2V0C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CisjIENPTkZJR19OTFNfQ09ERVBBR0VfOTUwIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19DT0RFUEFHRV85MzIgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzk0OSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfQ09ERVBBR0VfODc0IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzggaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzEyNTAgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0NPREVQQUdFXzEyNTEgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0FTQ0lJIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzEgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfMiBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8zIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzQgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV82IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzcgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfOSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xMyBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNCBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV8xNSBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfS09JOF9SIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19LT0k4X1UgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX1VURjggaXMgbm90IHNldAorCisjCisjIFByb2ZpbGluZyBzdXBwb3J0CisjCisjIENPTkZJR19QUk9GSUxJTkcgaXMgbm90IHNldAorCisjCisjIEtlcm5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ICAgIHJlcyA9IFVTRUNTX1BFUl9KSUZGWSAtIDE7Ci0gICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgIC8qIGNvbnZlcnQgdG8gdXNlYyAqLwotICAgICAgICAgICAgICAgLyogcmVzID0gY291bnQgLyAoSk1SMzkyN19USU1FUl9DTEsgLyAxMDAwMDAwKTsgKi8KLSAgICAgICAgICAgICAgIHJlcyA9IChjb3VudCA8PCA3KSAvICgoSk1SMzkyN19USU1FUl9DTEsgPDwgNykgLyAxMDAwMDAwKTsKLQotICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAqIER1ZSB0byBwb3NzaWJsZSBqaWZmaWVzIGluY29uc2lzdGVuY2llcywgd2UgbmVlZCB0byBjaGVjawotICAgICAgICAgICAgICAgICogdGhlIHJlc3VsdCBzbyB0aGF0IHdlJ2xsIGdldCBhIHRpbWVyIHRoYXQgaXMgbW9ub3RvbmljLgotICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICBpZiAocmVzID49IFVTRUNTX1BFUl9KSUZGWSkKLSAgICAgICAgICAgICAgICAgICAgICAgcmVzID0gVVNFQ1NfUEVSX0pJRkZZLTE7Ci0gICAgICAgfQotCi0gICAgICAgcmV0dXJuIHJlczsKLX0KLQotCiAvLyN1bmRlZiBET19XUklURV9USFJPVUdICiAjZGVmaW5lIERPX1dSSVRFX1RIUk9VR0gKICNkZWZpbmUgRE9fRU5BQkxFX0NBQ0hFCmRpZmYgLS1naXQgYS9hcmNoL21pcHMva2VybmVsL01ha2VmaWxlIGIvYXJjaC9taXBzL2tlcm5lbC9NYWtlZmlsZQppbmRleCBjZDljZWM5Li5iYmJiOGQ3IDEwMDY0NAotLS0gYS9hcmNoL21pcHMva2VybmVsL01ha2VmaWxlCisrKyBiL2FyY2gvbWlwcy9rZXJuZWwvTWFrZWZpbGUKQEAgLTYsNyArNiw3IEBACiAKIG9iai15CQkrPSBjcHUtcHJvYmUubyBicmFuY2gubyBlbnRyeS5vIGdl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ZWZpbmUgU01TQ19GREMzN004MVhfUENOVCAgICAgICAgICAweDIyCisjZGVmaW5lIFNNU0NfRkRDMzdNODFYX1BNR1QgICAgICAgICAgMHgyMworI2RlZmluZSBTTVNDX0ZEQzM3TTgxWF9PU0MgICAgICAgICAgIDB4MjQKKyNkZWZpbmUgU01TQ19GREMzN004MVhfQ09ORlBBMCAgICAgICAweDI2CisjZGVmaW5lIFNNU0NfRkRDMzdNODFYX0NPTkZQQTEgICAgICAgMHgyNworI2RlZmluZSBTTVNDX0ZEQzM3TTgxWF9URVNUNCAgICAgICAgIDB4MkIKKyNkZWZpbmUgU01TQ19GREMzN004MVhfVEVTVDUgICAgICAgICAweDJDCisjZGVmaW5lIFNNU0NfRkRDMzdNODFYX1RFU1QxICAgICAgICAgMHgyRAorI2RlZmluZSBTTVNDX0ZEQzM3TTgxWF9URVNUMiAgICAgICAgIDB4MkUKKyNkZWZpbmUgU01TQ19GREMzN004MVhfVEVTVDMgICAgICAgICAweDJGCisKKy8qIExvZ2ljYWwgZGV2aWNlIG51bWJlcnMgKi8KKyNkZWZpbmUgU01TQ19GREMzN004MVhfRkREICAgICAgICAgICAweDAwCisjZGVmaW5lIFNNU0NfRkRDMzdNODFYX1NFUklBTDEgICAgICAgMHgwNAorI2RlZmluZSBTTVNDX0ZEQzM3TTgxWF9TRVJJQUwyICAgICAgIDB4MDUKKyNkZWZpbmUgU01TQ19GREMzN004MVhfS0JEICAgICAgICAgICAweDA3CisKKy8qIExvZ2ljYWwgZGV2aWNlIENvbmZpZyBSZWdpc3RlcnMgKi8KKyNkZWZpbmUgU01TQ19GREMzN004MVhfQUNUSVZFICAgICAgICAweDMwCisjZGVmaW5lIFNNU0NfRkRDMzdNODFYX0JBU0VBRERSMCAgICAgMHg2MAorI2RlZmluZSBTTVNDX0ZEQzM3TTgxWF9CQVNFQUREUjEgICAgIDB4NjEKKyNkZWZpbmUgU01TQ19GREMzN004MVhfSU5UICAgICAgICAgICAweDcwCisjZGVmaW5lIFNN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bXNjX2ZkYzM3bTgxeF9iYXNlICsgU01TQ19GREMzN004MVhfQ09ORklHX0lOREVYKTsKKwl9Cit9CisKK3ZvaWQgc21zY19mZGMzN204MXhfY29uZmlnX2VuZCh2b2lkKQoreworCWlmIChnX3Ntc2NfZmRjMzdtODF4X2Jhc2UpCisJCW91dGIoU01TQ19GREMzN004MVhfQ09ORklHX0VYSVQsCisJCSAgICAgZ19zbXNjX2ZkYzM3bTgxeF9iYXNlICsgU01TQ19GREMzN004MVhfQ09ORklHX0lOREVYKTsKK30KKwordTggc21zY19mZGMzN204MXhfY29uZmlnX2dldCh1OCByZWcpCit7CisJdTggdmFsID0gMDsKKworCWlmIChnX3Ntc2NfZmRjMzdtODF4X2Jhc2UpCisJCXZhbCA9IHNtc2NfZmRjMzdtODF4X3JkKHJlZyk7CisKKwlyZXR1cm4gdmFsOworfQorCit2b2lkIHNtc2NfZmRjMzdtODF4X2NvbmZpZ19zZXQodTggcmVnLCB1OCB2YWwpCit7CisJaWYgKGdfc21zY19mZGMzN204MXhfYmFzZSkKKwkJc21zY19kYzM3bTgxeF93cihyZWcsIHZhbCk7Cit9CisKK3Vuc2lnbmVkIGxvbmcgX19pbml0IHNtc2NfZmRjMzdtODF4X2luaXQodW5zaWduZWQgbG9uZyBwb3J0KQoreworCWNvbnN0IGludCBmaWVsZCA9IHNpemVvZih1bnNpZ25lZCBsb25nKSAqIDI7CisJdTggY2hpcF9pZDsKKworCWlmIChnX3Ntc2NfZmRjMzdtODF4X2Jhc2UpCisJCXByaW50aygic21zY19mZGMzN204MXhfaW5pdCgpIHN0ZXBwaW5nIG9uIG9sZCBiYXNlPTB4JTAqbHhcbiIsCisJCSAgICAgICBmaWVsZCwgZ19zbXNjX2ZkYzM3bTgxeF9iYXNlKTsKKworCWdfc21zY19mZGMzN204MXhfYmFzZSA9IHBvcnQ7CisKKwlzbXNjX2ZkYzM3bTgxeF9jb25maWdfYmVnKCk7CisKKwljaGlwX2lkID0gc21zY19mZGMzN204MXhf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2RlZmluZSBUWDQ5MjdfSVJRX1BJQ19ESVNBQkxFICAoIDEgPDwgMjQgKQotI2RlZmluZSBUWDQ5MjdfSVJRX1BJQ19NQVNLICAgICAoIDEgPDwgMjUgKQotI2RlZmluZSBUWDQ5MjdfSVJRX1BJQ19FTkRJUlEgICAoIDEgPDwgMjYgKQogCiAjZGVmaW5lIFRYNDkyN19JUlFfQUxMICAgICAgICAgMHhmZmZmZmZmZgogI2VuZGlmCkBAIC04NywxOSArNzksMTEgQEAKIAkJCQkJICB8IFRYNDkyN19JUlFfSU5GTwogCQkJCQkgIHwgVFg0OTI3X0lSUV9XQVJOIHwgVFg0OTI3X0lSUV9FUk9SCiAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVFg0OTI3X0lSUV9DUDBfSU5JVAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRYNDkyN19JUlFfQ1AwX1NUQVJUVVAKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUWDQ5MjdfSVJRX0NQMF9TSFVURE9XTgogLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRYNDkyN19JUlFfQ1AwX0VOQUJMRQotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRYNDkyN19JUlFfQ1AwX0RJU0FCTEUKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUWDQ5MjdfSVJRX0NQMF9NQVNLCiAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVFg0OTI3X0lSUV9DUDBfRU5ESVJRCiAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVFg0OTI3X0lSUV9QSUNfSU5JVAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRYNDkyN19JUlFfUElDX1NUQVJUVVAKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUWDQ5MjdfSVJRX1BJQ19TSFVURE9XTgogLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRYNDkyN19JUlFfUElDX0VOQUJMRQogLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRYNDkyN19JUlFfUElDX0RJU0FCTEUKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUWDQ5MjdfSVJRX1BJQ19NQVNLCi0vLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVFg0OTI3X0lSUV9QSUNfRU5ESVJRCiAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVFg0OTI3X0lSUV9JTklUCiAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVFg0OTI3X0lSUV9ORVNUMQogLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRYNDkyN19JUlFfTkVTVDIKQEAgLTEyNCw0OSArMTA4LDMyIEBACiAgKiBGb3J3YWQgZGVmaW5pdGlvbnMgZm9yIGFsbCBwaWMncwogICovCiAKLXN0YXRpYyB1bnNpZ25lZCBpbnQgdHg0OTI3X2lycV9jcDBfc3RhcnR1cCh1bnNpZ25lZCBpbnQgaXJxKTsKLXN0YXRpYyB2b2lkIHR4NDkyN19pcnFfY3AwX3NodXRkb3duKHVuc2lnbmVkIGludCBpcnEpOwogc3RhdGljIHZvaWQgdHg0OTI3X2lycV9jcDBfZW5hYmxlKHVuc2lnbmVkIGludCBpcnEpOwogc3RhdGljIHZvaWQgdHg0OTI3X2lycV9jcDBfZGlzYWJsZSh1bnNpZ25lZCBpbnQgaXJxKTsKLXN0YXRpYyB2b2lkIHR4NDkyN19pcnFfY3AwX21hc2tfYW5kX2Fjayh1bnNpZ25lZCBpbnQgaXJxKTsKLX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gICAgICAgICAgIHwgVE9TSElCQV9SQlRYNDkyN19JUlFfSU9DX1NUQVJUVVAKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVE9TSElCQV9SQlRYNDkyN19JUlFfSU9DX1NIVVRET1dOCiAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IFRPU0hJQkFfUkJUWDQ5MjdfSVJRX0lPQ19FTkFCTEUKIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVE9TSElCQV9SQlRYNDkyN19JUlFfSU9DX0RJU0FCTEUKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVE9TSElCQV9SQlRYNDkyN19JUlFfSU9DX01BU0sKLS8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVE9TSElCQV9SQlRYNDkyN19JUlFfSU9DX0VORElSUQogLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUT1NISUJBX1JCVFg0OTI3X0lSUV9JU0FfSU5JVAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUT1NISUJBX1JCVFg0OTI3X0lSUV9JU0FfU1RBUlRVUAotLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUT1NISUJBX1JCVFg0OTI3X0lSUV9JU0FfU0hVVERPV04KIC8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgVE9TSElCQV9SQlRYNDkyN19JUlFfSVNBX0VOQUJMRQogLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBUT1NISUJBX1JCVFg0OTI3X0lSUV9JU0FfRElTQUJMRQogL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IGlycSk7CiBzdGF0aWMgdm9pZCB0eDQ5MzhfaXJxX3BpY19lbmFibGUodW5zaWduZWQgaW50IGlycSk7CiBzdGF0aWMgdm9pZCB0eDQ5MzhfaXJxX3BpY19kaXNhYmxlKHVuc2lnbmVkIGludCBpcnEpOwotc3RhdGljIHZvaWQgdHg0OTM4X2lycV9waWNfbWFza19hbmRfYWNrKHVuc2lnbmVkIGludCBpcnEpOwotc3RhdGljIHZvaWQgdHg0OTM4X2lycV9waWNfZW5kKHVuc2lnbmVkIGludCBpcnEpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qIEtlcm5lbCBzdHJ1Y3RzIGZvciBhbGwgcGljJ3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1ERUZJTkVfU1BJTkxPQ0sodHg0OTM4X2NwMF9sb2NrKTsKLURFRklORV9TUElOTE9DSyh0eDQ5MzhfcGljX2xvY2spOwogCiAjZGVmaW5lIFRYNDkzOF9DUDBfTkFNRSAiVFg0OTM4LUNQMCIKIHN0YXRpYyBzdHJ1Y3QgaXJxX2NoaXAgdHg0OTM4X2lycV9jcDBfdHlwZSA9IHsKIAkudHlwZW5hbWUgPSBUWDQ5MzhfQ1AwX05BTUUsCi0JLnN0YXJ0dXAgPSB0eDQ5MzhfaXJxX2NwMF9zdGFydHVwLAotCS5zaHV0ZG93biA9IHR4NDkzOF9pcnFfY3AwX3NodXRkb3duLAotCS5lbmFibGUgPSB0eDQ5MzhfaXJxX2NwMF9lbmFibGUsCi0JLmRpc2FibGUgPSB0eDQ5MzhfaXJxX2NwMF9kaXNhYmxlLAotCS5hY2sgPSB0eDQ5MzhfaXJxX2Nw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R19NVERfT1RQIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSU5URUxFWFQgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfQU1EU1REPXkKKyMgQ09ORklHX01URF9DRklfU1RBQSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PQlNPTEVURV9DSElQUyBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorQ09ORklHX01URF9QSFlTTUFQPXkKK0NPTkZJR19NVERfUEhZU01BUF9TVEFSVD0weGZmYzAwMDAwCitDT05GSUdfTVREX1BIWVNNQVBfTEVOPTB4NDAwMDAwCitDT05GSUdfTVREX1BIWVNNQVBfQkFOS1dJRFRIPTEKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9QTUM1NTEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5v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R19XSU5ERkFSTSBpcyBub3Qgc2V0CisKKyMKKyMgTmV0d29yayBkZXZpY2Ugc3VwcG9ydAorIworQ09ORklHX05FVERFVklDRVM9eQorIyBDT05GSUdfRFVNTVkgaXMgbm90IHNldAorIyBDT05GSUdfQk9ORElORyBpcyBub3Qgc2V0CisjIENPTkZJR19FUVVBTElaRVIgaXMgbm90IHNldAorQ09ORklHX1RVTj1tCisKKyMKKyMgQVJDbmV0IGRldmljZXMKKyMKKyMgQ09ORklHX0FSQ05FVCBpcyBub3Qgc2V0CisKKyMKKyMgUEhZIGRldmljZSBzdXBwb3J0CisjCisKKyMKKyMgRXRoZXJuZXQgKDEwIG9yIDEwME1iaXQpCisjCisjIENPTkZJR19ORVRfRVRIRVJORVQgaXMgbm90IHNldAorCisjCisjIEV0aGVybmV0ICgxMDAwIE1iaXQpCisjCisjIENPTkZJR19BQ0VOSUMgaXMgbm90IHNldAorIyBDT05GSUdfREwySyBpcyBub3Qgc2V0CisjIENPTkZJR19FMTAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19OUzgzODIwIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hBTUFDSEkgaXMgbm90IHNldAorIyBDT05GSUdfWUVMTE9XRklOIGlzIG5vdCBzZXQKK0NPTkZJR19SODE2OT15CisjIENPTkZJR19SODE2OV9OQVBJIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NJUzE5MCBpcyBub3Qgc2V0CisjIENPTkZJR19TS0dFIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NLWTIgaXMgbm90IHNldAorIyBDT05GSUdfU0s5OExJTiBpcyBub3Qgc2V0CisjIENPTkZJR19USUdPTjMgaXMgbm90IHNldAorIyBDT05GSUdfQk5YMiBpcyBub3Qgc2V0CisjIENPTkZJR19RTEEzWFhYIGlzIG5vdCBzZXQKKworIworIyBFdGhlcm5ldCAoMTAwMDAgTWJpdCkKKyMKKyMgQ09ORklHX0NIRUxTSU9fVDEgaXMgbm90IHNldAorIyBDT05GSU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GlzIG5vdCBzZXQKKyMgQ09ORklHX1BQUCBpcyBub3Qgc2V0CisjIENPTkZJR19TTElQIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVF9GQyBpcyBub3Qgc2V0CisjIENPTkZJR19TSEFQRVIgaXMgbm90IHNldAorQ09ORklHX05FVENPTlNPTEU9eQorQ09ORklHX05FVFBPTEw9eQorIyBDT05GSUdfTkVUUE9MTF9SWCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRQT0xMX1RSQVAgaXMgbm90IHNldAorQ09ORklHX05FVF9QT0xMX0NPTlRST0xMRVI9eQorCisjCisjIElTRE4gc3Vic3lzdGVtCisjCisjIENPTkZJR19JU0ROIGlzIG5vdCBzZXQKKworIworIyBUZWxlcGhvbnkgU3VwcG9ydAorIworIyBDT05GSUdfUEhPTkUgaXMgbm90IHNldAorCisjCisjIElucHV0IGRldmljZSBzdXBwb3J0CisjCitDT05GSUdfSU5QVVQ9eQorIyBDT05GSUdfSU5QVVRfRkZfTUVNTEVTUyBpcyBub3Qgc2V0CisKKyMKKyMgVXNlcmxhbmQgaW50ZXJmYWNlcworIworQ09ORklHX0lOUFVUX01PVVNFREVWPXkKKyMgQ09ORklHX0lOUFVUX01PVVNFREVWX1BTQVVYIGlzIG5vdCBzZXQKK0NPTkZJR19JTlBVVF9NT1VTRURFVl9TQ1JFRU5fWD0xMDI0CitDT05GSUdfSU5QVVRfTU9VU0VERVZfU0NSRUVOX1k9NzY4CisjIENPTkZJR19JTlBVVF9KT1lERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfVFNERVYgaXMgbm90IHNldAorQ09ORklHX0lOUFVUX0VWREVWPW0KKyMgQ09ORklHX0lOUFVUX0VWQlVHIGlzIG5vdCBzZXQKKworIworIyBJbnB1dCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfSU5QVVRfS0VZQk9BUkQgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfTU9VU0UgaXMgbm90IHNldAorIyBDT05G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XMgbm90IHNldAorIyBDT05GSUdfTkVURklMVEVSIGlzIG5vdCBzZXQKKworIworIyBEQ0NQIENvbmZpZ3VyYXRpb24gKEVYUEVSSU1FTlRBTCkKKyMKKyMgQ09ORklHX0lQX0RDQ1AgaXMgbm90IHNldAorCisjCisjIFNDVFAgQ29uZmlndXJhdGlvbiAoRVhQRVJJTUVOVEFMKQorIworIyBDT05GSUdfSVBfU0NUUCBpcyBub3Qgc2V0CisKKyMKKyMgVElQQyBDb25maWd1cmF0aW9uIChFWFBFUklNRU5UQUwpCisjCisjIENPTkZJR19USVBDIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FUTSBpcyBub3Qgc2V0CisjIENPTkZJR19CUklER0UgaXMgbm90IHNldAorIyBDT05GSUdfVkxBTl84MDIxUSBpcyBub3Qgc2V0CisjIENPTkZJR19ERUNORVQgaXMgbm90IHNldAorIyBDT05GSUdfTExDMiBpcyBub3Qgc2V0CisjIENPTkZJR19JUFggaXMgbm90IHNldAorIyBDT05GSUdfQVRBTEsgaXMgbm90IHNldAorIyBDT05GSUdfWDI1IGlzIG5vdCBzZXQKKyMgQ09ORklHX0xBUEIgaXMgbm90IHNldAorIyBDT05GSUdfRUNPTkVUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dBTl9ST1VURVIgaXMgbm90IHNldAorCisjCisjIFFvUyBhbmQvb3IgZmFpciBxdWV1ZWluZworIworIyBDT05GSUdfTkVUX1NDSEVEIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JrIHRlc3RpbmcKKyMKKyMgQ09ORklHX05FVF9QS1RHRU4gaXMgbm90IHNldAorIyBDT05GSUdfSEFNUkFESU8gaXMgbm90IHNldAorIyBDT05GSUdfSVJEQSBpcyBub3Qgc2V0CisjIENPTkZJR19CVCBpcyBub3Qgc2V0CisjIENPTkZJR19JRUVFODAyMTEgaXMgbm90IHNldAorCisjCisjIERldmljZSBEcml2ZXJzCisjCisKKyMKKyMgR2VuZXJpYyBEcml2ZXIgT3B0aW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HX1NLR0UgaXMgbm90IHNldAorIyBDT05GSUdfU0tZMiBpcyBub3Qgc2V0CisjIENPTkZJR19TSzk4TElOIGlzIG5vdCBzZXQKKyMgQ09ORklHX1RJR09OMyBpcyBub3Qgc2V0CisjIENPTkZJR19CTlgyIGlzIG5vdCBzZXQKKyMgQ09ORklHX01WNjQzWFhfRVRIIGlzIG5vdCBzZXQKKyMgQ09ORklHX1FMQTNYWFggaXMgbm90IHNldAorCisjCisjIEV0aGVybmV0ICgxMDAwMCBNYml0KQorIworIyBDT05GSUdfQ0hFTFNJT19UMSBpcyBub3Qgc2V0CisjIENPTkZJR19JWEdCIGlzIG5vdCBzZXQKKyMgQ09ORklHX1MySU8gaXMgbm90IHNldAorIyBDT05GSUdfTVlSSTEwR0UgaXMgbm90IHNldAorCisjCisjIFRva2VuIFJpbmcgZGV2aWNlcworIworIyBDT05GSUdfVFIgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBXYW4gaW50ZXJmYWNlcworIworIyBDT05GSUdfV0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZEREkgaXMgbm90IHNldAorIyBDT05GSUdfSElQUEkgaXMgbm90IHNldAorIyBDT05GSUdfUFBQIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NMSVAgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX0ZDIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NIQVBFUiBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRDT05TT0xFIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVFBPTEwgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX1BPTExfQ09OVFJPTExFUiBpcyBub3Qgc2V0CisKKyMKKyMgSVNETiBzdWJzeXN0ZW0KKyMKKyMgQ09ORklHX0lTRE4gaXMgbm90IHNldAorCisjCisjIFRlbGVwaG9ueSBTdX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WN0b3IgLSB1bmlmaWVkIHVzZXJzcGFjZSA8LT4ga2VybmVsc3BhY2UgbGlua2VyCisjCisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorCisjCisjIE1lbW9yeSBUZWNobm9sb2d5IERldmljZXMgKE1URCkKKyMKKyMgQ09ORklHX01URCBpcyBub3Qgc2V0CisKKyMKKyMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKKworIworIyBQbHVnIGFuZCBQbGF5IHN1cHBvcnQKKyMKKworIworIyBCbG9jayBkZXZpY2VzCisjCisjIENPTkZJR19CTEtfREVWX0ZEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfQ09XX0NPTU1PTiBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9JTklUUkQgaXMgbm90IHNldAorIyBDT05GSUdfQ0RST01fUEtUQ0RWRCBpcyBub3Qgc2V0CisjIENPTkZJR19BVEFfT1ZFUl9FVEggaXMgbm90IHNldAorCisjCisjIE1pc2MgZGV2aWNlcworIworIyBDT05GSUdfVElGTV9DT1JFIGlzIG5vdCBzZXQKKworIworIyBBVEEvQVRBUEkvTUZNL1JMTCBzdXBwb3J0CisjCisjIENPTkZJR19JREUgaXMgbm90IHNldAorCisjCisjIFNDU0kgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX1JBSURfQVRUUlMgaXMgbm90IHNldAorQ09ORklHX1NDU0k9eQorIyBDT05GSUdfU0NTSV9ORVRMSU5LIGlzIG5vdCBzZXQKK0NPTkZJR19TQ1NJX1BST0NfRlM9eQorCisjCisjIFNDU0kgc3VwcG9ydCB0eXBlIChkaXNrLCB0YXBlLCBDRC1ST00p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Bub3Qgc2V0CisjIENPTkZJR19TRVJJQUxfTk9OU1RBTkRBUkQgaXMgbm90IHNldAorCisjCisjIFNlcmlhbCBkcml2ZXJzCisjCisjIENPTkZJR19TRVJJQUxfODI1MCBpcyBub3Qgc2V0CisKKyMKKyMgTm9uLTgyNTAgc2VyaWFsIHBvcnQgc3VwcG9ydAorIworQ09ORklHX1VOSVg5OF9QVFlTPXkKKyMgQ09ORklHX0xFR0FDWV9QVFlTIGlzIG5vdCBzZXQKKworIworIyBJUE1JCisjCisjIENPTkZJR19JUE1JX0hBTkRMRVIgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIENhcmRzCisjCisjIENPTkZJR19XQVRDSERPRyBpcyBub3Qgc2V0CisjIENPTkZJR19IV19SQU5ET00gaXMgbm90IHNldAorQ09ORklHX0dFTl9SVEM9eQorIyBDT05GSUdfR0VOX1JUQ19YIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RUTEsgaXMgbm90IHNldAorIyBDT05GSUdfUjM5NjQgaXMgbm90IHNldAorCisjCisjIEZ0YXBlLCB0aGUgZmxvcHB5IHRhcGUgZGV2aWNlIGRyaXZlcgorIworIyBDT05GSUdfUkFXX0RSSVZFUiBpcyBub3Qgc2V0CisjIENPTkZJR19IQU5HQ0hFQ0tfVElNRVIgaXMgbm90IHNldAorCisjCisjIFRQTSBkZXZpY2VzCisjCisjIENPTkZJR19UQ0dfVFBNIGlzIG5vdCBzZXQKKworIworIyBJMkMgc3VwcG9ydAorIworIyBDT05GSUdfSTJDIGlzIG5vdCBzZXQKKworIworIyBTUEkgc3VwcG9ydAorIworIyBDT05GSUdfU1BJIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NQSV9NQVNURVIgaXMgbm90IHNldAorCisjCisjIERhbGxhcydzIDEtd2lyZSBidXMKKyMKKyMgQ09ORklHX1cxIGlzIG5vdCBzZXQKKworIworIyBIYXJkd2FyZSBNb25pdG9yaW5nIHN1cHBvcnQKKyMKKyMgQ09ORklHX0hXTU9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MRUQgZHJpdmVycworIworCisjCisjIExFRCBUcmlnZ2VycworIworCisjCisjIEluZmluaUJhbmQgc3VwcG9ydAorIworCisjCisjIEVEQUMgLSBlcnJvciBkZXRlY3Rpb24gYW5kIHJlcG9ydGluZyAoUkFTKSAoRVhQRVJJTUVOVEFMKQorIworCisjCisjIFJlYWwgVGltZSBDbG9jaworIworIyBDT05GSUdfUlRDX0NMQVNTIGlzIG5vdCBzZXQKKworIworIyBETUEgRW5naW5lIHN1cHBvcnQKKyMKKyMgQ09ORklHX0RNQV9FTkdJTkUgaXMgbm90IHNldAorCisjCisjIERNQSBDbGllbnRzCisjCisKKyMKKyMgRE1BIERldmljZXMKKyMKKworIworIyBGaWxlIHN5c3RlbXMKKyMKKyMgQ09ORklHX0VYVDJfRlMgaXMgbm90IHNldAorIyBDT05GSUdfRVhUM19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19FWFQ0REVWX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JFSVNFUkZTX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0pGU19GUyBpcyBub3Qgc2V0CisjIENPTkZJR19GU19QT1NJWF9BQ0wgaXMgbm90IHNldAorIyBDT05GSUdfWEZTX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0dGUzJfRlMgaXMgbm90IHNldAorIyBDT05GSUdfT0NGUzJfRlMgaXMgbm90IHNldAorIyBDT05GSUdfTUlOSVhfRlMgaXMgbm90IHNldAorIyBDT05GSUdfUk9NRlNfRlMgaXMgbm90IHNldAorQ09ORklHX0lOT1RJRlk9eQorQ09ORklHX0lOT1RJRllfVVNFUj15CisjIENPTkZJR19RVU9UQSBpcyBub3Qgc2V0CitDT05GSUdfRE5PVElGWT15CisjIENPTkZJR19BVVRPRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQVVUT0ZTNF9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19GVVNFX0ZTIGlzIG5vdCBzZXQKKworIworIyBDRC1ST00vR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A9IHJ0YXNfY2FsbChydGFzX3Rva2VuKCJ3cml0ZS1wY2ktY29uZmlnIiksIDMsIDEsIE5VTEwsCisJCQkgYWRkciwgbGVuLCB2YWwpOworCXJldHVybiBydmFsID8gUENJQklPU19ERVZJQ0VfTk9UX0ZPVU5EIDogUENJQklPU19TVUNDRVNTRlVMOworfQorCitzdGF0aWMgc3RydWN0IHBjaV9vcHMgcnRhc19wY2lfb3BzID0geworCXJ0YXNfcmVhZF9jb25maWcsCisJcnRhc193cml0ZV9jb25maWcKK307CisKK3ZvaWQgX19pbml0IGVmaWthX3BjaXNldHVwKHZvaWQpCit7CisJY29uc3QgaW50ICpidXNfcmFuZ2U7CisJaW50IGxlbjsKKwlzdHJ1Y3QgcGNpX2NvbnRyb2xsZXIgKmhvc2U7CisJc3RydWN0IGRldmljZV9ub2RlICpyb290OworCXN0cnVjdCBkZXZpY2Vfbm9kZSAqcGNpY3RybDsKKworCXJvb3QgPSBvZl9maW5kX25vZGVfYnlfcGF0aCgiLyIpOworCWlmIChyb290ID09IE5VTEwpIHsKKwkJcHJpbnRrKEtFUk5fV0FSTklORyBFRklLQV9QTEFURk9STV9OQU1FCisJCSAgICAgICAiOiBVbmFibGUgdG8gZmluZCB0aGUgcm9vdCBub2RlXG4iKTsKKwkJcmV0dXJuOworCX0KKworCWZvciAocGNpY3RybCA9IE5VTEw7OykgeworCQlwY2ljdHJsID0gb2ZfZ2V0X25leHRfY2hpbGQocm9vdCwgcGNpY3RybCk7CisJCWlmICgocGNpY3RybCA9PSBOVUxMKSB8fCAoc3RyY21wKHBjaWN0cmwtPm5hbWUsICJwY2kiKSA9PSAwKSkKKwkJCWJyZWFrOworCX0KKworCW9mX25vZGVfcHV0KHJvb3QpOworCisJaWYgKHBjaWN0cmwgPT0gTlVMTCkgeworCQlwcmludGsoS0VSTl9XQVJOSU5HIEVGSUtBX1BMQVRGT1JNX05BTUUKKwkJICAgICAgICI6IFVuYWJsZSB0byBmaW5kIHRoZSBQQ0kgYnJp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HJ1Y3QgaXJxX2Rlc2MgKmRlc2MpCit7CisJc3RydWN0IG1waWMgKm1waWMgPSBkZXNjLT5oYW5kbGVyX2RhdGE7CisJdW5zaWduZWQgaW50IHZpcnE7CisKKwl2aXJxID0gbXBpY19nZXRfb25lX2lycShtcGljKTsKKwlpZiAodmlycSAhPSBOT19JUlEpCisJCWdlbmVyaWNfaGFuZGxlX2lycSh2aXJxKTsKKwlkZXNjLT5jaGlwLT5lb2koaXJxKTsKK30KKworc3RhdGljIHZvaWQgX19pbml0IG1waWNfaW5pdF9JUlEodm9pZCkKK3sKKwlzdHJ1Y3QgZGV2aWNlX25vZGUgKmRuOworCXN0cnVjdCBtcGljICptcGljOworCXVuc2lnbmVkIGludCB2aXJxOworCisJZm9yIChkbiA9IE5VTEw7CisJICAgICAoZG4gPSBvZl9maW5kX25vZGVfYnlfbmFtZShkbiwgImludGVycnVwdC1jb250cm9sbGVyIikpOykgeworCQlpZiAoIWRldmljZV9pc19jb21wYXRpYmxlKGRuLCAiQ0JFQSxwbGF0Zm9ybS1vcGVuLXBpYyIpKQorCQkJY29udGludWU7CisKKwkJLyogVGhlIE1QSUMgZHJpdmVyIHdpbGwgZ2V0IGV2ZXJ5dGhpbmcgaXQgbmVlZHMgZnJvbSB0aGUKKwkJICogZGV2aWNlLXRyZWUsIGp1c3QgcGFzcyAwIHRvIGFsbCBhcmd1bWVudHMKKwkJICovCisJCW1waWMgPSBtcGljX2FsbG9jKGRuLCAwLCAwLCAwLCAwLCAiIE1QSUMgICAgICIpOworCQlpZiAobXBpYyA9PSBOVUxMKQorCQkJY29udGludWU7CisJCW1waWNfaW5pdChtcGljKTsKKworCQl2aXJxID0gaXJxX29mX3BhcnNlX2FuZF9tYXAoZG4sIDApOworCQlpZiAodmlycSA9PSBOT19JUlEpCisJCQljb250aW51ZTsKKworCQlwcmludGsoS0VSTl9JTkZPICIlcyA6IGhvb2tpbmcgdXAgdG8gSVJRICVkXG4iLAorCQkgICAgICAgZG4tPmZ1bG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ywgRFVBUlQuCisgKi8KK3N0YXRpYyB2b2lkIF9faW5pdCBsaW5rc3RhdGlvbl9pbml0X0lSUSh2b2lkKQoreworCXN0cnVjdCBtcGljICptcGljOworCXN0cnVjdCBkZXZpY2Vfbm9kZSAqZG5wOworCXZvaWQgKnByb3A7CisJaW50IHNpemU7CisJcGh5c19hZGRyX3QgcGFkZHI7CisKKwlkbnAgPSBvZl9maW5kX25vZGVfYnlfdHlwZShOVUxMLCAib3Blbi1waWMiKTsKKwlpZiAoZG5wID09IE5VTEwpCisJCXJldHVybjsKKworCXByb3AgPSAoc3RydWN0IGRldmljZV9ub2RlICopZ2V0X3Byb3BlcnR5KGRucCwgInJlZyIsICZzaXplKTsKKwlwYWRkciA9IChwaHlzX2FkZHJfdClvZl90cmFuc2xhdGVfYWRkcmVzcyhkbnAsIHByb3ApOworCisJbXBpYyA9IG1waWNfYWxsb2MoZG5wLCBwYWRkciwgTVBJQ19QUklNQVJZIHwgTVBJQ19XQU5UU19SRVNFVCwgNCwgMzIsICIgRVBJQyAgICAgIik7CisJQlVHX09OKG1waWMgPT0gTlVMTCk7CisKKwkvKiBQQ0kgSVJRcyAqLworCW1waWNfYXNzaWduX2lzdShtcGljLCAwLCBwYWRkciArIDB4MTAyMDApOworCisJLyogSTJDICovCisJbXBpY19hc3NpZ25faXN1KG1waWMsIDEsIHBhZGRyICsgMHgxMTAwMCk7CisKKwkvKiB0dHlTMCwgdHR5UzEgKi8KKwltcGljX2Fzc2lnbl9pc3UobXBpYywgMiwgcGFkZHIgKyAweDExMTAwKTsKKworCW1waWNfaW5pdChtcGljKTsKK30KKworZXh0ZXJuIHZvaWQgYXZyX3VhcnRfY29uZmlndXJlKHZvaWQpOworZXh0ZXJuIHZvaWQgYXZyX3VhcnRfc2VuZChjb25zdCBjaGFyKTsKKworc3RhdGljIHZvaWQgbGlua3N0YXRpb25fcmVzdGFydChjaGFyICpjbWQpCit7CisJbG9jYWxfaXJxX2Rpc2FibGUoKTsKKworCS8qIFJ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GV0OworCXVuc2lnbmVkIGxvbmcgbHBhcl9hZGRyOworCisJQlVHX09OKCFpc19rZXJuZWxfYWRkcigodW5zaWduZWQgbG9uZyl2aXJ0X2FkZHJfYm1wKSk7CisKKwlscGFyX2FkZHIgPSBwczNfbW1fcGh5c190b19scGFyKF9fcGEodmlydF9hZGRyX2JtcCkpOworCisJcmVzdWx0ID0gbHYxX2NvbmZpZ3VyZV92aXJ0dWFsX3VhcnRfaXJxKGxwYXJfYWRkciwgJm91dGxldCk7CisKKwlpZiAocmVzdWx0KSB7CisJCXByX2RlYnVnKCIlczolZDogbHYxX2NvbmZpZ3VyZV92aXJ0dWFsX3VhcnRfaXJxIGZhaWxlZDogJXNcbiIsCisJCQlfX2Z1bmNfXywgX19MSU5FX18sIHBzM19yZXN1bHQocmVzdWx0KSk7CisJCXJldHVybiByZXN1bHQ7CisJfQorCisJKnZpcnEgPSBpcnFfY3JlYXRlX21hcHBpbmcoTlVMTCwgb3V0bGV0KTsKKworCXByX2RlYnVnKCIlczolZDogb3V0bGV0ICVsdSwgdmlycSAldVxuIiwgX19mdW5jX18sIF9fTElORV9fLAorCQlvdXRsZXQsICp2aXJxKTsKKworCXJldHVybiAwOworfQorCitpbnQgcHMzX2ZyZWVfdnVhcnRfaXJxKHVuc2lnbmVkIGludCB2aXJxKQoreworCWludCByZXN1bHQ7CisKKwlyZXN1bHQgPSBsdjFfZGVjb25maWd1cmVfdmlydHVhbF91YXJ0X2lycSgpOworCisJaWYgKHJlc3VsdCkgeworCQlwcl9kZWJ1ZygiJXM6JWQ6IGx2MV9jb25maWd1cmVfdmlydHVhbF91YXJ0X2lycSBmYWlsZWQ6ICVzXG4iLAorCQkJX19mdW5jX18sIF9fTElORV9fLCBwczNfcmVzdWx0KHJlc3VsdCkpOworCQlyZXR1cm4gcmVzdWx0OworCX0KKworCWlycV9kaXNwb3NlX21hcHBpbmcodmlycSk7CisKKwlyZXR1cm4gcmVzdWx0OworfQorCisvKioKKyAqIHBzM19hbGxvY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BRERSKQorCVVTRV9MUEFSX0FERFIgPSAxLAorI2Vsc2UKKwlVU0VfTFBBUl9BRERSID0gMCwKKyNlbmRpZgorI2lmIGRlZmluZWQoQ09ORklHX1BTM19EWU5BTUlDX0RNQSkKKwlVU0VfRFlOQU1JQ19ETUEgPSAxLAorI2Vsc2UKKwlVU0VfRFlOQU1JQ19ETUEgPSAwLAorI2VuZGlmCit9OworCitlbnVtIHsKKwlQQUdFX1NISUZUXzRLID0gMTJVLAorCVBBR0VfU0hJRlRfNjRLID0gMTZVLAorCVBBR0VfU0hJRlRfMTZNID0gMjRVLAorfTsKKworc3RhdGljIHVuc2lnbmVkIGxvbmcgbWFrZV9wYWdlX3NpemVzKHVuc2lnbmVkIGxvbmcgYSwgdW5zaWduZWQgbG9uZyBiKQoreworCXJldHVybiAoYSA8PCA1NikgfCAoYiA8PCA0OCk7Cit9CisKK2VudW0geworCUFMTE9DQVRFX01FTU9SWV9UUllfQUxUX1VOSVQgPSAwWDA0LAorCUFMTE9DQVRFX01FTU9SWV9BRERSX1pFUk8gPSAwWDA4LAorfTsKKworLyogdmFsaWQgaHRhYiBzaXplcyBhcmUgezE4LDE5LDIwfSA9IDI1NkssIDUxMkssIDFNICovCisKK2VudW0geworCUhUQUJfU0laRV9NQVggPSAyMFUsIC8qIEhWIGxpbWl0IG9mIDFNQiAqLworCUhUQUJfU0laRV9NSU4gPSAxOFUsIC8qIENQVSBsaW1pdCBvZiAyNTZLQiAqLworfTsKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qIHZpcnR1YWwgYWRkcmVzcyBzcGFjZSByb3V0aW5lcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKK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worCQlnb3RvIGZhaWw7CisJfQorCisJcmVzdWx0ID0gbHYxX3NlbGVjdF92aXJ0dWFsX2FkZHJlc3Nfc3BhY2UobWFwLnZhc19pZCk7CisKKwlpZiAocmVzdWx0KSB7CisJCURCRygiJXM6JWQ6IGx2MV9zZWxlY3RfdmlydHVhbF9hZGRyZXNzX3NwYWNlIGZhaWxlZDogJXNcbiIsCisJCQlfX2Z1bmNfXywgX19MSU5FX18sIHBzM19yZXN1bHQocmVzdWx0KSk7CisJCWdvdG8gZmFpbDsKKwl9CisKKwkqaHRhYl9zaXplID0gbWFwLmh0YWJfc2l6ZTsKKworCWRlYnVnX2R1bXBfbWFwKCZtYXApOworCisJcmV0dXJuOworCitmYWlsOgorCXBhbmljKCJwczNfbW1fdmFzX2NyZWF0ZSBmYWlsZWQiKTsKK30KKworLyoqCisgKiBwczNfbW1fdmFzX2Rlc3Ryb3kgLQorICovCisKK3ZvaWQgcHMzX21tX3Zhc19kZXN0cm95KHZvaWQpCit7CisJaWYgKG1hcC52YXNfaWQpIHsKKwkJbHYxX3NlbGVjdF92aXJ0dWFsX2FkZHJlc3Nfc3BhY2UoMCk7CisJCWx2MV9kZXN0cnVjdF92aXJ0dWFsX2FkZHJlc3Nfc3BhY2UobWFwLnZhc19pZCk7CisJCW1hcC52YXNfaWQgPSAwOworCX0KK30KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qIG1lbW9yeSBob3RwbHVnIHJvdXRpbmVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyAqIHBzM19tbV9yZWdpb25fY3JlYXRlIC0gY3JlYXRlIGEgbWVtb3J5IHJlZ2lvbiBpbiB0aG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pZ25lZCBsb25nIG5yX3BhZ2VzOworCisJaWYgKCFmaXJtd2FyZV9oYXNfZmVhdHVyZShGV19GRUFUVVJFX1BTM19MVjEpKQorCQlyZXR1cm4gMDsKKworCUJVR19PTighbWVtX2luaXRfZG9uZSk7CisKKwlzdGFydF9hZGRyID0gVVNFX0xQQVJfQUREUiA/IG1hcC5yMS5iYXNlIDogbWFwLnJtLnNpemU7CisJc3RhcnRfcGZuID0gc3RhcnRfYWRkciA+PiBQQUdFX1NISUZUOworCW5yX3BhZ2VzID0gKG1hcC5yMS5zaXplICsgUEFHRV9TSVpFIC0gMSkgPj4gUEFHRV9TSElGVDsKKworCURCRygiJXM6JWQ6IHN0YXJ0X2FkZHIgJWx4aCwgc3RhcnRfcGZuICVseGgsIG5yX3BhZ2VzICVseGhcbiIsCisJCV9fZnVuY19fLCBfX0xJTkVfXywgc3RhcnRfYWRkciwgc3RhcnRfcGZuLCBucl9wYWdlcyk7CisKKwlyZXN1bHQgPSBhZGRfbWVtb3J5KDAsIHN0YXJ0X2FkZHIsIG1hcC5yMS5zaXplKTsKKworCWlmIChyZXN1bHQpIHsKKwkJREJHKCIlczolZDogYWRkX21lbW9yeSBmYWlsZWQ6ICglZClcbiIsCisJCQlfX2Z1bmNfXywgX19MSU5FX18sIHJlc3VsdCk7CisJCXJldHVybiByZXN1bHQ7CisJfQorCisJcmVzdWx0ID0gb25saW5lX3BhZ2VzKHN0YXJ0X3BmbiwgbnJfcGFnZXMpOworCisJaWYgKHJlc3VsdCkKKwkJREJHKCIlczolZDogb25saW5lX3BhZ2VzIGZhaWxlZDogKCVkKVxuIiwKKwkJCV9fZnVuY19fLCBfX0xJTkVfXywgcmVzdWx0KTsKKworCXJldHVybiByZXN1bHQ7Cit9CisKK2NvcmVfaW5pdGNhbGwocHMzX21tX2FkZF9tZW1vcnkpOworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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pZ25lZCBsb25nIGxlbiwgdW5zaWduZWQgbG9uZyAqYnVzX2FkZHIpCit7CisJcmV0dXJuIChVU0VfRFlOQU1JQ19ETUEpCisJCT8gZG1hX21hcF9hcmVhKHIsIHZpcnRfYWRkciwgbGVuLCBidXNfYWRkcikKKwkJOiBkbWFfbWFwX2FyZWFfbGluZWFyKHIsIHZpcnRfYWRkciwgbGVuLCBidXNfYWRkcik7Cit9CisKK2ludCBwczNfZG1hX3VubWFwKHN0cnVjdCBwczNfZG1hX3JlZ2lvbiAqciwgdW5zaWduZWQgbG9uZyBidXNfYWRkciwKKwl1bnNpZ25lZCBsb25nIGxlbikKK3sKKwlyZXR1cm4gKFVTRV9EWU5BTUlDX0RNQSkgPyBkbWFfdW5tYXBfYXJlYShyLCBidXNfYWRkciwgbGVuKQorCQk6IGRtYV91bm1hcF9hcmVhX2xpbmVhcihyLCBidXNfYWRkciwgbGVuKTsKK30KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qIHN5c3RlbSBzdGFydHVwIHJvdXRpbmVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyAqIHBzM19tbV9pbml0IC0gaW5pdGlhbGl6ZSB0aGUgYWRkcmVzcyBzcGFjZSBzdGF0ZSB2YXJpYWJsZXMKKyAqLworCit2b2lkIF9faW5pdCBwczNfbW1faW5pdCh2b2lkKQoreworCWludCByZXN1bHQ7CisKKwlEQkcoIiAtPiAlczolZFxuIiwgX19mdW5jX18sIF9fTElORV9fKTsKKworCXJlc3VsdCA9IHBzM19yZXBvc2l0b3J5X3JlYWRfbW1faW5mbygmbWFwLnJtLmJhc2UsICZtYXAucm0uc2l6ZSwK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19pZCA9IHYxOworCXJldHVybiByZXN1bHQ7Cit9CisKK2ludCBwczNfcmVwb3NpdG9yeV9yZWFkX2J1c190eXBlKHVuc2lnbmVkIGludCBidXNfaW5kZXgsCisJZW51bSBwczNfYnVzX3R5cGUgKmJ1c190eXBlKQoreworCWludCByZXN1bHQ7CisJdTY0IHYxOworCisJcmVzdWx0ID0gcmVhZF9ub2RlKFBTM19MUEFSX0lEX1BNRSwKKwkJbWFrZV9maXJzdF9maWVsZCgiYnVzIiwgYnVzX2luZGV4KSwKKwkJbWFrZV9maWVsZCgidHlwZSIsIDApLAorCQkwLCAwLAorCQkmdjEsIDApOworCSpidXNfdHlwZSA9IHYxOworCXJldHVybiByZXN1bHQ7Cit9CisKK2ludCBwczNfcmVwb3NpdG9yeV9yZWFkX2J1c19udW1fZGV2KHVuc2lnbmVkIGludCBidXNfaW5kZXgsCisJdW5zaWduZWQgaW50ICpudW1fZGV2KQoreworCWludCByZXN1bHQ7CisJdTY0IHYxOworCisJcmVzdWx0ID0gcmVhZF9ub2RlKFBTM19MUEFSX0lEX1BNRSwKKwkJbWFrZV9maXJzdF9maWVsZCgiYnVzIiwgYnVzX2luZGV4KSwKKwkJbWFrZV9maWVsZCgibnVtX2RldiIsIDApLAorCQkwLCAwLAorCQkmdjEsIDApOworCSpudW1fZGV2ID0gdjE7CisJcmV0dXJuIHJlc3VsdDsKK30KKworaW50IHBzM19yZXBvc2l0b3J5X3JlYWRfZGV2X3N0cih1bnNpZ25lZCBpbnQgYnVzX2luZGV4LAorCXVuc2lnbmVkIGludCBkZXZfaW5kZXgsIGNvbnN0IGNoYXIgKmRldl9zdHIsIHU2NCAqdmFsdWUpCit7CisJcmV0dXJuIHJlYWRfbm9kZShQUzNfTFBBUl9JRF9QTUUsCisJCW1ha2VfZmlyc3RfZmllbGQoImJ1cyIsIGJ1c19pbmRleCksCisJCW1ha2VfZmllbGQoImRldiIsIGRldl9pbmRleCksCisJCW1ha2VfZmllbGQoZGV2X3N0ciwgMCks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BuZWVkcyB0byBiZSBzZXR1cC4KKwkgKi8KKworCUJVSUxEX0JVR19PTihQUENfTVNHX0NBTExfRlVOQ1RJT04gICE9IDApOworCUJVSUxEX0JVR19PTihQUENfTVNHX1JFU0NIRURVTEUgICAgICE9IDEpOworCUJVSUxEX0JVR19PTihQUENfTVNHX0RFQlVHR0VSX0JSRUFLICE9IDMpOworCisJZm9yIChpID0gMDsgaSA8IE1TR19DT1VOVDsgaSsrKSB7CisJCXJlc3VsdCA9IHBzM19hbGxvY19ldmVudF9pcnEoJnZpcnFzW2ldKTsKKworCQlpZiAocmVzdWx0KQorCQkJY29udGludWU7CisKKwkJREJHKCIlczolZDogKCVkLCAlZCkgPT4gdmlycSAldVxuIiwKKwkJCV9fZnVuY19fLCBfX0xJTkVfXywgY3B1LCBpLCB2aXJxc1tpXSk7CisKKworCQlyZXF1ZXN0X2lycSh2aXJxc1tpXSwgaXBpX2Z1bmN0aW9uX2hhbmRsZXIsIElSUUZfRElTQUJMRUQsCisJCQluYW1lc1tpXSwgKHZvaWQqKShsb25nKWkpOworCX0KKworCXBzM19yZWdpc3Rlcl9pcGlfZGVidWdfYnJrKGNwdSwgdmlycXNbUFBDX01TR19ERUJVR0dFUl9CUkVBS10pOworCisJREJHKCIgPC0gJXM6JWQ6ICglZClcbiIsIF9fZnVuY19fLCBfX0xJTkVfXywgY3B1KTsKK30KKwordm9pZCBwczNfc21wX2NsZWFudXBfY3B1KGludCBjcHUpCit7CisJdW5zaWduZWQgaW50ICp2aXJxcyA9IHBlcl9jcHUodmlycXMsIGNwdSk7CisJaW50IGk7CisKKwlEQkcoIiAtPiAlczolZDogKCVkKVxuIiwgX19mdW5jX18sIF9fTElORV9fLCBjcHUpOworCWZvciAoaSA9IDA7IGkgPCBNU0dfQ09VTlQ7IGkrKykgeworCQlwczNfZnJlZV9ldmVudF9pcnEodmlycXNbaV0pOworCQlmcmVlX2lycSh2aXJxc1tpXSwgKHZvaWQqKShsb25nKWkpOworCQl2aXJxc1tp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c1tpc3VdLAogCQkgICAgcmVnICsgKGlkeCAqIE1QSUNfSU5GTyhJUlFfU1RSSURFKSksIHZhbHVlKTsKIH0KIAotI2RlZmluZSBtcGljX3JlYWQoYixyKQkJX21waWNfcmVhZChtcGljLT5mbGFncyAmIE1QSUNfQklHX0VORElBTiwoYiksKHIpKQotI2RlZmluZSBtcGljX3dyaXRlKGIscix2KQlfbXBpY193cml0ZShtcGljLT5mbGFncyAmIE1QSUNfQklHX0VORElBTiwoYiksKHIpLCh2KSkKKyNkZWZpbmUgbXBpY19yZWFkKGIscikJCV9tcGljX3JlYWQobXBpYy0+cmVnX3R5cGUsJihiKSwocikpCisjZGVmaW5lIG1waWNfd3JpdGUoYixyLHYpCV9tcGljX3dyaXRlKG1waWMtPnJlZ190eXBlLCYoYiksKHIpLCh2KSkKICNkZWZpbmUgbXBpY19pcGlfcmVhZChpKQlfbXBpY19pcGlfcmVhZChtcGljLChpKSkKICNkZWZpbmUgbXBpY19pcGlfd3JpdGUoaSx2KQlfbXBpY19pcGlfd3JpdGUobXBpYywoaSksKHYpKQogI2RlZmluZSBtcGljX2NwdV9yZWFkKGkpCV9tcGljX2NwdV9yZWFkKG1waWMsKGkpKQpAQCAtMjM4LDYgKzI1NSwzOCBAQAogICovCiAKIAorc3RhdGljIHZvaWQgX21waWNfbWFwX21taW8oc3RydWN0IG1waWMgKm1waWMsIHVuc2lnbmVkIGxvbmcgcGh5c19hZGRyLAorCQkJICAgc3RydWN0IG1waWNfcmVnX2JhbmsgKnJiLCB1bnNpZ25lZCBpbnQgb2Zmc2V0LAorCQkJICAgdW5zaWduZWQgaW50IHNpemUpCit7CisJcmItPmJhc2UgPSBpb3JlbWFwKHBoeXNfYWRkciArIG9mZnNldCwgc2l6ZSk7CisJQlVHX09OKHJiLT5iYXNlID09IE5VTEwpOworfQorCisjaWZkZWYgQ09ORklHX1BQQ19EQ1IKK3N0YXRpYyB2b2lkIF9tcGljX21hcF9kY3Ioc3RydWN0IG1waWMgKm1waWM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leDsKKworICBpZiAoKGluZGV4ID0gc3B1X2Rpc2Fzc2VtYmxlX3RhYmxlW29wY29kZSAmIDB4N2ZmXSkgIT0gMCkKKyAgICByZXR1cm4gaW5kZXg7CisKKyAgcmV0dXJuIDA7Cit9CisKKy8qIFByaW50IGEgU3B1IGluc3RydWN0aW9uLiAgKi8KKworaW50CitwcmludF9pbnNuX3NwdSAodW5zaWduZWQgbG9uZyBpbnNuLCB1bnNpZ25lZCBsb25nIG1lbWFkZHIpCit7CisgIGludCB2YWx1ZTsKKyAgaW50IGhleF92YWx1ZTsKKyAgY29uc3Qgc3RydWN0IHNwdV9vcGNvZGUgKmluZGV4OworICBlbnVtIHNwdV9pbnNucyB0YWc7CisKKyAgaW5kZXggPSBnZXRfaW5kZXhfZm9yX29wY29kZSAoaW5zbik7CisKKyAgaWYgKGluZGV4ID09IDApCisgICAgeworICAgICAgcHJpbnRmKCIubG9uZyAweCV4IiwgaW5zbik7CisgICAgfQorICBlbHNlCisgICAgeworICAgICAgaW50IGk7CisgICAgICBpbnQgcGFyZW4gPSAwOworICAgICAgdGFnID0gKGVudW0gc3B1X2luc25zKShpbmRleCAtIHNwdV9vcGNvZGVzKTsKKyAgICAgIHByaW50ZigiJXMiLCBpbmRleC0+bW5lbW9uaWMpOworICAgICAgaWYgKHRhZyA9PSBNX0JJIHx8IHRhZyA9PSBNX0JJU0wgfHwgdGFnID09IE1fSVJFVCB8fCB0YWcgPT0gTV9CSVNMRUQKKwkgIHx8IHRhZyA9PSBNX0JJSE5aIHx8IHRhZyA9PSBNX0JJSFogfHwgdGFnID09IE1fQklOWiB8fCB0YWcgPT0gTV9CSVoKKyAgICAgICAgICB8fCB0YWcgPT0gTV9TWU5DIHx8IHRhZyA9PSBNX0hCUikKKwl7CisJICBpbnQgZmIgPSAoaW5zbiA+PiAoMzItMTgpKSAmIDB4N2Y7CisJICBpZiAoZmIgJiAweDQwKQorCSAgICBwcmludGYodGFnID09IE1fU1lOQyA/ICJjIiA6ICJwIik7CisJICBpZiAoZmIgJiAweDIwKQorCSAgICBwcmludGYoImQiKTsKKwkgIGlmIChmYiAmIDB4MTApCisJICAgIHByaW50ZigiZSIpOworCX0KKyAgICAgIGlmIChpbmRleC0+YXJnWzBdICE9IDApCisJcHJpbnRmKCJcdCIpOworICAgICAgaGV4X3ZhbHVlID0gMDsKKyAgICAgIGZvciAoaSA9IDE7ICBpIDw9IGluZGV4LT5hcmdbMF07IGkrKykKKwl7CisJICBpbnQgYXJnID0gaW5kZXgtPmFyZ1tpXTsKKwkgIGlmIChhcmcgIT0gQV9QICYmICFwYXJlbiAmJiBpID4gMSkKKwkgICAgcHJpbnRmKCIsIik7CisKKwkgIHN3aXRjaCAoYXJnKQorCSAgICB7CisJICAgIGNhc2UgQV9UOgorCSAgICAgIHByaW50ZigiJCVkIiwKKwkJCQkgICAgIERFQ09ERV9JTlNOX1JUIChpbnNuKSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgQV9BOgorCSAgICAgIHByaW50ZigiJCVkIiwKKwkJCQkgICAgIERFQ09ERV9JTlNOX1JBIChpbnNuKSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgQV9COgorCSAgICAgIHByaW50ZigiJCVkIiwKKwkJCQkgICAgIERFQ09ERV9JTlNOX1JCIChpbnNuKSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgQV9DOgorCSAgICAgIHByaW50ZigiJCVkIiwKKwkJCQkgICAgIERFQ09ERV9JTlNOX1JDIChpbnNuKSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgQV9TOgorCSAgICAgIHByaW50ZigiJHNwJWQiLAorCQkJCSAgICAgREVDT0RFX0lOU05fUkEgKGluc24pKTsKKwkgICAgICBicmVhazsKKwkgICAgY2FzZSBBX0g6CisJICAgICAgcHJpbnRmKCIkY2glZCIsCisJCQkJICAgICBERUNPREVfSU5TTl9SQSAoaW5zbikpOworCSAgICAgIGJyZWFrOworCSAgICBjYXNlIEFfUDoKKwkgICAgICBwYXJlbisrOworCSAgICAgIHByaW50ZigiKCIpOworCSAgICAgIGJyZWFrOworCSAgICBjYXNlIEFfVTdBOgorCSAgICAgIHByaW50ZigiJWQiLAorCQkJCSAgICAgMTczIC0gREVDT0RFX0lOU05fVTggKGluc24pKTsKKwkgICAgICBicmVhazsKKwkgICAgY2FzZSBBX1U3QjoKKwkgICAgICBwcmludGYoIiVkIiwKKwkJCQkgICAgIDE1NSAtIERFQ09ERV9JTlNOX1U4IChpbnNuKSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgQV9TMzoKKwkgICAgY2FzZSBBX1M2OgorCSAgICBjYXNlIEFfUzc6CisJICAgIGNhc2UgQV9TN046CisJICAgIGNhc2UgQV9VMzoKKwkgICAgY2FzZSBBX1U1OgorCSAgICBjYXNlIEFfVTY6CisJICAgIGNhc2UgQV9VNzoKKwkgICAgICBoZXhfdmFsdWUgPSBERUNPREVfSU5TTl9JNyAoaW5zbik7CisJICAgICAgcHJpbnRmKCIlZCIsIGhleF92YWx1ZSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgQV9TMTE6CisJICAgICAgcHJpbnRfYWRkcmVzcyhtZW1hZGRyICsgREVDT0RFX0lOU05fSTlhIChpbnNuKSAqIDQpOworCSAgICAgIGJyZWFrOworCSAgICBjYXNlIEFfUzExSToKKwkgICAgICBwcmludF9hZGRyZXNzKG1lbWFkZHIgKyBERUNPREVfSU5TTl9JOWIgKGluc24pICogNCk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgQV9TMTA6CisJICAgIGNhc2UgQV9TMTBCOgorCSAgICAgIGhleF92YWx1ZSA9IERFQ09ERV9JTlNOX0kxMCAoaW5zbik7CisJICAgICAgcHJpbnRmKCIlZCIsIGhleF92YWx1ZSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgQV9TMTQ6CisJICAgICAgaGV4X3ZhbHVlID0gREVDT0RFX0lOU05fSTEwIChpbnNuKSAqIDE2OworCSAgICAgIHByaW50Zig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gfCAgSTcgICB8ICBSQSAgIHwgIFJUICAgfAorICAgICAgICstLS0tKy0tLS0tLS0rLS0tLS0tLSstLS0tLS0tKy0tLS0tLS0rCQkgICAgICAgKy0tLS0tLS0tLS0tLSstLS0tLS0tKy0tLS0tLS0rLS0tLS0tLSsKKyAgICAgICAgMCAgMyAgICAgICAxICAgICAgIDEgICAgICAgMiAgICAgICAzCQkgICAgICAgIDAgICAgICAgICAgMSAgICAgICAxICAgICAgIDIgICAgICAgMyAKKyAgICAgICAgICAgICAgICAgICAwICAgICAgIDcgICAgICAgNCAgICAgICAxCQkgICAgICAgICAgICAgICAgICAgMCAgICAgICA3ICAgICAgIDQgICAgICAgMSAKKworICAgICAgICstLS0tLS0tLS0tLSstLS0tLS0tLSstLS0tLS0tKy0tLS0tLS0rCQkgICAgICAgKy0tLS0tLS0tLSstLS0tLS0tLS0tKy0tLS0tLS0rLS0tLS0tLSsKK1JJOCAgICB8IG9wICAgICAgICB8ICAgSTggICB8ICBSQSAgIHwgIFJUICAgfAkJUkkxMCAgIHwgb3AgICAgICB8ICAgSTEwICAgIHwgIFJBICAgfCAgUlQgICB8CisgICAgICAgKy0tLS0tLS0tLS0tKy0tLS0tLS0tKy0tLS0tLS0rLS0tLS0tLSsJCSAgICAgICArLS0tLS0tLS0tKy0tLS0tLS0tLS0rLS0tLS0tLSstLS0tLS0tKworICAgICAgICAwICAgICAgICAgOSAgICAgICAgMSAgICAgICAyICAgICAgIDMJCSAgICAgICAgMCAgICAgICA3ICAgICAgICAgIDEgICAgICAgMiAgICAgICAzIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgNyAgICAgICA0ICAgICAgIDEJCSAgICAgICAgICAgICAgICAgICAgICAgICAgIDcgICAgICAgNCAgICAgICAxIAorCisgICAgICAgKy0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLSsJCSAgICAgICArLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tKworUkkxNiAgIHwgb3AgICAgICAgfCAgICAgICBJMTYgICAgICAgfCAgUlQgICB8CQlSSTE4ICAgfCBvcCAgICAgfCAgICAgICBJMTggICAgICAgICB8ICBSVCAgIHwKKyAgICAgICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLSstLS0tLS0tKwkJICAgICAgICstLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0rCisgICAgICAgIDAgICAgICAgIDggICAgICAgICAgICAgICAgIDIgICAgICAgMwkJICAgICAgICAwICAgICAgNiAgICAgICAgICAgICAgICAgICAyICAgICAgIDMgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgICAgICAgMQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0ICAgICAgIDEgCisKKyAgICAgICArLS0tLS0tLS0tLS0tKy0tLS0tLS0rLS0tLS0tLSstLS0tLS0tKwkJICAgICAgICstLS0tLS0tKy0tKy0tLS0tLS0tLS0tLS0tLS0tKy0tLS0tLS0rCitSUiAgICAgfCBvcCAgICAgICAgIHwgIFJCICAgfCAgUkEgICB8ICBSVCAgIHwJCUxCVCAgICB8IG9wICAgIHxST3wgICAgICAgSTE2ICAgICAgIHwgIFJPICAgfAorICAgICAgICstLS0tLS0tLS0tLS0rLS0tLS0tLSstLS0tLS0tKy0tLS0tLS0rCQkgICAgICAgKy0tLS0tLS0rLS0rLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLSsKKyAgICAgICAgMCAgICAgICAgICAxICAgICAgIDEgICAgICAgMiAgICAgICAzCQkgICAgICAgIDAgICAgIDYgIDggICAgICAgICAgICAgICAgIDIgICAgICAgMyAKKyAgICAgICAgICAgICAgICAgICAwICAgICAgIDcgICAgICAgNCAgICAgICAxCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgICAgICAgMSAKKworCQkJCQkJCSAgICAgICArLS0tLS0tLS0tLS0tKy0tLS0rLS0rLS0tLS0tLS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VCwgUkEsIEk3CisKK1JJOCBjYXRlZ29yeQkJCQkJCVJJMTAgY2F0ZWdvcnkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisJQVNNX1JVSTgJbW5lbW9uaWMgUlQsIFJBLCBVSTgJCSAgICAgICAgQVNNX0FJMTAgICAgICAgIG1uZW1vbmljIFJBLCBJMTAgICAgCisJCQkJCQkJICAgICAgICBBU01fUkkxMCAgICAgICAgbW5lbW9uaWMgUlQsIFJBLCBSMTAKKwkJCQkJCQkgICAgICAgIEFTTV9SSTEwSURYICAgICBtbmVtb25pYyBSVCwgSTEwKFJBKQorCitSSTE2IGNhdGVnb3J5CQkJCQkJUkkxOCBjYXRlZ29yeSAgICAgICAgICAgICAgICAgICAgICAgICAgIAorCUFTTV9JMTZXCW1uZW1vbmljIEkxNlcJCQkgICAgICAgIEFTTV9SSTE4ICAgICAgICBtbmVtb25pYyBSVCwgSTE4CisJQVNNX1JJMTYJbW5lbW9uaWMgUlQsIEkxNgorCUFTTV9SSTE2VwltbmVtb25pYyBSVCwgSTE2VworCitSUiBjYXRlZ29yeQkJCQkJCUxCVCBjYXRlZ29yeSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAorCUFTTV9NRlNQUgltbmVtb25pYyBSVCwgU0EJCQkgICAgICAgIEFTTV9MQlQgICAgICAgICBtbmVtb25pYyBicmluc3QsIGJydGFyZyAKKwlBU01fTVRTUFIJbW5lbW9uaWMgU0EsIFJUCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCisJQVNNX05PT1AJbW5lbW9uaWMJCQlMQlRJIGNhdGVnb3J5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKwlBU01fUkEJCW1uZW1vbmljIFJBCQkJICAgICAgICBBU01fTEJUSSAgICAgICAgbW5lbW9uaWMgYnJpbnN0LCBSQSAgICAgCisJQVNNX1JBQgkJbW5lbW9uaWMgUkEsIFJCCisJQVNNX1JEQ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m9fZW5kX3BmbiA9IFBGTl9VUCgodW5zaWduZWQgbG9uZykmX19lbmRfcm9kYXRhKTsKLQogCW1lbXNldChtYXhfem9uZV9wZm5zLCAwLCBzaXplb2YobWF4X3pvbmVfcGZucykpOwogCW1heF96b25lX3BmbnNbWk9ORV9ETUFdID0gUEZOX0RPV04oTUFYX0RNQV9BRERSRVNTKTsKIAltYXhfem9uZV9wZm5zW1pPTkVfTk9STUFMXSA9IG1heF9sb3dfcGZuOwogCWZyZWVfYXJlYV9pbml0X25vZGVzKG1heF96b25lX3BmbnMpOwotCi0JLyoKLQkgKiBtYXAgd2hvbGUgcGh5c2ljYWwgbWVtb3J5IHRvIHZpcnR1YWwgbWVtb3J5IChpZGVudGl0eSBtYXBwaW5nKSAKLQkgKi8KLQotICAgICAgICBwZ19kaXIgPSBzd2FwcGVyX3BnX2RpcjsKLQkKLSAgICAgICAgZm9yIChpID0gMCA7IGkgPCBQVFJTX1BFUl9QR0QgOyBpKysscGdfZGlyKyspIHsKLQkKLSAgICAgICAgICAgICAgICBpZiAocGZuID49IG1heF9sb3dfcGZuKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwZ2RfY2xlYXIocGdfZGlyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICAgICAgICAgIH0gICAgICAgICAgCi0gICAgICAgIAotCQlwbV9kaXIgPSAocG1kX3QgKikgYWxsb2NfYm9vdG1lbV9wYWdlcyhQQUdFX1NJWkUgKiA0KTsKLSAgICAgICAgICAgICAgICBwZ2RfcG9wdWxhdGUoJmluaXRfbW0sIHBnX2RpciwgcG1fZGlyKTsKLQotICAgICAgICAgICAgICAgIGZvciAoaiA9IDAgOyBqIDwgUFRSU19QRVJfUE1EIDsgaisrLHBtX2RpcisrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAocGZuID49IG1heF9sb3dfcGZuKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBtZF9jbGVhcihwbV9kaXIpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgCi0gICAgICAgICAgICAgICAgICAgICAgICB9ICAgICAgICAgIAotICAgICAgICAgICAgICAgICAgICAgICAgCi0JCQlwdF9kaXIgPSAocHRlX3QgKikgYWxsb2NfYm9vdG1lbV9wYWdlcyhQQUdFX1NJWkUpOwotICAgICAgICAgICAgICAgICAgICAgICAgcG1kX3BvcHVsYXRlX2tlcm5lbCgmaW5pdF9tbSwgcG1fZGlyLCBwdF9kaXIpOwotCQotICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChrID0gMCA7IGsgPCBQVFJTX1BFUl9QVEUgOyBrKysscHRfZGlyKyspIHsKLQkJCQlpZiAocGZuID49IHJvX3N0YXJ0X3BmbiAmJiBwZm4gPCByb19lbmRfcGZuKQotCQkJCQlwdGUgPSBwZm5fcHRlKHBmbiwgX19wZ3Byb3QoX1BBR0VfUk8pKTsKLQkJCQllbHNlCi0JCQkJCXB0ZSA9IHBmbl9wdGUocGZuLCBQQUdFX0tFUk5FTCk7Ci0JCQkJaWYgKHBmbiA+PSBtYXhfbG93X3BmbikKLQkJCQkJcHRlX3ZhbChwdGUpID0gX1BBR0VfVFlQRV9FTVBUWTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0X3B0ZShwdF9kaXIsIHB0ZSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBmbisrOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQotCi0JUzM5MF9sb3djb3JlLmtlcm5lbF9hc2NlID0gcGdkaXJfazsKLQotICAgICAgICAvKiBlbmFibGUgdmlydHVhbCBtYXBwaW5nIGluIGtlcm5lbCBtb2RlICovCi0JX19jdGxfbG9hZChwZ2Rpcl9rLCAxLCAxKTsKLQlfX2N0bF9sb2FkKHBnZGlyX2ssIDcsIDcpOwotCV9fY3RsX2xvYWQocGdk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BfSVJROgorCQltc2swICY9IH4weDAwMTA7CisJCWJyZWFrOworCWNhc2UgSVJRMV9JUlE6CisJCW1zazAgJj0gfjB4MDAwZjsKKwkJYnJlYWs7CisJY2FzZSBJUlEzX0lSUToKKwkJbXNrMCAmPSB+MHgwZjAwOworCQltc2sxICY9IH4weDAwZmY7CisJCWJyZWFrOworCX0KKwljdHJsX291dHcobXNrMCwgSU5UTVNLMCk7CisJY3RybF9vdXR3KG1zazEsIElOVE1TSzEpOworfQorCitzdGF0aWMgdm9pZCBlb2lfc2U3MjA2X2lycSh1bnNpZ25lZCBpbnQgaXJxKQoreworCXVuc2lnbmVkIHNob3J0IHN0czAsc3RzMTsKKworCWlmICghKGlycV9kZXNjW2lycV0uc3RhdHVzICYgKElSUV9ESVNBQkxFRHxJUlFfSU5QUk9HUkVTUykpKQorCQllbmFibGVfc2U3MjA2X2lycShpcnEpOworCS8qIEZQR0EgaXNyIGNsZWFyICovCisJc3RzMCA9IGN0cmxfaW53KElOVFNUUzApOworCXN0czEgPSBjdHJsX2ludyhJTlRTVFMxKTsKKworCXN3aXRjaCAoaXJxKSB7CisJY2FzZSBJUlEwX0lSUToKKwkJc3RzMCAmPSB+MHgwMDEwOworCQlicmVhazsKKwljYXNlIElSUTFfSVJROgorCQlzdHMwICY9IH4weDAwMGY7CisJCWJyZWFrOworCWNhc2UgSVJRM19JUlE6CisJCXN0czAgJj0gfjB4MGYwMDsKKwkJc3RzMSAmPSB+MHgwMGZmOworCQlicmVhazsKKwl9CisJY3RybF9vdXR3KHN0czAsIElOVFNUUzApOworCWN0cmxfb3V0dyhzdHMxLCBJTlRTVFMxKTsKK30KKworc3RhdGljIHN0cnVjdCBpcnFfY2hpcCBzZTcyMDZfaXJxX2NoaXAgX19yZWFkX21vc3RseSA9IHsKKwkubmFtZQkJPSAiU0U3MjA2LUZQR0EiLAorCS5tYXNrCQk9IGRpc2FibGVfc2U3MjA2X2lycSwKKwkudW5tYXNrCQk9IGVuYWJsZV9zZTcyMD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DT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09CU09MRVRFX0NISVBTIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9QSFlTTUFQX1NUQVJUPTB4MjAwMDAwMDAKK0NPTkZJR19NVERfUEhZU01BUF9MRU49MHgwMTAwMDAwMAorQ09ORklHX01URF9QSFlTTUFQX0JBTktXSURUSD00CisjIENPTkZJR19NVERfU09MVVRJT05FTkdJTkUgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1VDTElOVVggaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKworIworIyBOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgT25lTkFORCBGbGFzaCBEZXZpY2UgRHJpdmVycworIworI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ZJR19IV01PTiBpcyBub3Qgc2V0CisjIENPTkZJR19IV01PTl9WSUQgaXMgbm90IHNldAorCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJyb2FkY2FzdGluZyBEZXZpY2VzCisjCisjIENPTkZJR19EVkIgaXMgbm90IHNldAorCisjCisjIEdyYXBoaWNzIHN1cHBvcnQKKyMKKyMgQ09ORklHX0ZJUk1XQVJFX0VESUQgaXMgbm90IHNldAorIyBDT05GSUdfRkIgaXMgbm90IHNldAorCisjCisjIFNvdW5kCisjCisjIENPTkZJR19TT1VORCBpcyBub3Qgc2V0CisKKyMKKyMgVVNCIHN1cHBvcnQKKyMKKyMgQ09ORklHX1VTQl9BUkNIX0hBU19IQ0QgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0FSQ0hfSEFTX09IQ0kgaXMgbm90IHNldAorIyBDT05GSUdfVVNCX0FSQ0hfSEFTX0VIQ0kgaXMgbm90IHNldAorCisjCisjIE5PVEU6IFVTQl9TVE9SQUdFIGVuYWJsZXMgU0NTSSwgYW5kICdTQ1NJIGRpc2sgc3VwcG9ydCcKKyMKKworIworIyBVU0IgR2FkZ2V0IFN1cHBvcnQKKyMKKyMgQ09ORklHX1VTQl9HQURHRVQgaXMgbm90IHNldAorCisjCisjIE1NQy9TRCBDYXJkIHN1cHBvcnQKKyMKKyMgQ09ORklHX01NQyBpcyBub3Qgc2V0CisKKyMKKyMgTEVEIGRldmljZXMKKyMKKyMgQ09ORklHX05FV19MRURTIGlzIG5vdCBzZXQKKworIworIyBMRUQgZHJpdmVycworIworCisjCisjIExFRCBUcmlnZ2VycworIworCisjCisjIEluZmluaUJhbmQgc3VwcG9ydAorIworCisjCisjIEVEQUMgLSBlcnJvciBkZXRlY3Rpb24gYW5kIHJlcG9ydGluZyAoUkFTKSAoRVhQRVJJTUVOVEFMKQorIworCisjCisjIFJlYWwgVG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R19LRVhFQyBpcyBub3Qgc2V0CisjIENPTkZJR19TTVAgaXMgbm90IHNldAorQ09ORklHX1BSRUVNUFRfTk9ORT15CisjIENPTkZJR19QUkVFTVBUX1ZPTFVOVEFSWSBpcyBub3Qgc2V0CisjIENPTkZJR19QUkVFTVBUIGlzIG5vdCBzZXQKKworIworIyBCb290IG9wdGlvbnMKKyMKK0NPTkZJR19aRVJPX1BBR0VfT0ZGU0VUPTB4MDAwMDEwMDAKK0NPTkZJR19CT09UX0xJTktfT0ZGU0VUPTB4MDA4MDAwMDAKKyMgQ09ORklHX1VCQ19XQUtFVVAgaXMgbm90IHNldAorIyBDT05GSUdfQ01ETElORV9CT09MIGlzIG5vdCBzZXQKKworIworIyBCdXMgb3B0aW9ucworIworIyBDT05GSUdfUENJIGlzIG5vdCBzZXQKKworIworIyBQQ0NBUkQgKFBDTUNJQS9DYXJkQnVzKSBzdXBwb3J0CisjCisKKyMKKyMgUENJIEhvdHBsdWcgU3VwcG9ydAorIworCisjCisjIEV4ZWN1dGFibGUgZmlsZSBmb3JtYXRzCisjCitDT05GSUdfQklORk1UX0ZMQVQ9eQorQ09ORklHX0JJTkZNVF9aRkxBVD15CisjIENPTkZJR19CSU5GTVRfU0hBUkVEX0ZMQVQgaXMgbm90IHNldAorIyBDT05GSUdfQklORk1UX01JU0MgaXMgbm90IHNldAorCisjCisjIFBvd2VyIG1hbmFnZW1lbnQgb3B0aW9ucyAoRVhQRVJJTUVOVEFMKQorIworIyBDT05GSUdfUE0gaXMgbm90IHNldAorCisjCisjIE5ldHdvcmtpbmcKKyMKKyMgQ09ORklHX05FVCBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCisjIENPTkZJR19TVEFOREFMT05FIGlzIG5vdCBzZXQKKyMgQ09ORklHX1BSRVZFTlRfRklSTVdBUkVfQlVJTEQgaXMgbm90IHNldAorIyBDT05GSUdfU1lTX0hZUEVSVklTT1IgaXMgbm90IHNldAorCisjCisjIENvbm5lY3RvciAtIHVuaWZpZWQgdXNlcnNwYWNlIDwtPiBrZXJuZWxzcGFjZSBsaW5rZXIKKyMKKworIworIyBNZW1vcnkgVGVjaG5vbG9neSBEZXZpY2VzIChNVEQpCisjCitDT05GSUdfTVREPXkKKyMgQ09ORklHX01URF9ERUJVRyBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NPTkNBVD15CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorQ09ORklHX01URF9SRURCT09UX1BBUlRTPXkKK0NPTkZJR19NVERfUkVEQk9PVF9ESVJFQ1RPUllfQkxPQ0s9LTEKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTX1VOQUxMT0NBVEVEIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTX1JFQURPTkxZIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DTURMSU5FX1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxPQ0s9eQorIyBDT05GSUdfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKK0NPTkZJR19NVERfQ0ZJPXkKKyMgQ09ORklHX01URF9KRURFQ1BST0JFIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfR0VOX1BST0JFPXkKKyMgQ09ORklHX01URF9DRklfQURWX09QVElPTlMgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JTlRFTEVYVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9BTURTVEQ9eQorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09CU09MRVRFX0NISVBTIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9QSFlTTUFQX1NUQVJUPTB4YTAwMDAwMDAKK0NPTkZJR19NVERfUEhZU01BUF9MRU49MHgwMTAwMDAwMAorQ09ORklHX01URF9QSFlTTUFQX0JBTktXSURUSD0yCisjIENPTkZJR19NVERfU09MVVRJT05FTkdJTkUgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1VDTElOVVggaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKworIworIyBOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgT25lTkFORCBGbGFzaCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIFBhcmFsbGVsIHBvcnQgc3VwcG9ydAorIworIyBDT05GSUdfUEFSUE9SVCBpcyBub3Qgc2V0CisKKyMKKyMgUGx1ZyBhbmQgUGxheSBzdXBwb3J0CisjCisKKyMKKyMgQmxvY2sgZGV2aWNlcworIworIyBDT05GSUdfQkxLX0RFVl9DT1dfQ09NTU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfTE9PUCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0lOSVRSRCBpcyBub3Qgc2V0CisjIENPTkZJR19DRFJPTV9QS1RDRFZEIGlzIG5vdCBzZXQKKworIworIyBNaXNjIGRldmljZXMKKyMKKyMgQ09ORklHX1RJRk1fQ09SRSBpcyBub3Qgc2V0CisKKyMKKyMgQVRBL0FUQVBJL01GTS9STEwgc3VwcG9ydAorIworIyBDT05GSUdfSURFIGlzIG5vdCBzZXQKKworIworIyBTQ1NJIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19SQUlEX0FUVFJTIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NDU0kgaXMgbm90IHNldAorIyBDT05GSUdfU0NTSV9ORVRMSU5LIGlzIG5vdCBzZXQKKworIworIyBTZXJpYWwgQVRBIChwcm9kKSBhbmQgUGFyYWxsZWwgQVRBIChleHBlcmltZW50YWwpIGRyaXZlcnMKKyMKKyMgQ09ORklHX0FUQSBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGktZGV2aWNlIHN1cHBvcnQgKFJBSUQgYW5kIExWTSkKKyMKKyMgQ09ORklHX01EIGlzIG5vdCBzZXQKKworIworIyBGdXNpb24gTVBUIGRldmljZSBzdXBwb3J0CisjCisjIENPTkZJR19GVVNJT04gaXMgbm90IHNldAorCisjCisjIElFRUUgMTM5NCAoRmlyZVdpcmUpIHN1cHBvcnQKKyMKKworIworIyBJMk8gZGV2aWNlIHN1cHBvcnQKKyMKKworIworIyBJU0ROIHN1YnN5c3RlbQorIworCisjCisjIFRlbGVwaG9ueSBTdXBwb3J0CisjCisjIENPTkZJR19QSE9ORSBpcyBub3Qgc2V0CisKKyMKKyMgSW5wdXQgZGV2aWNlIHN1cHBvcnQKKyMKK0NPTkZJR19JTlBVVD15CisjIENPTkZJR19JTlBVVF9GRl9NRU1MRVNTIGlzIG5vdCBzZXQKKworIworIyBVc2VybGFuZCBpbnRlcmZhY2VzCisjCisjIENPTkZJR19JTlBVVF9NT1VTRURFViBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfVFNERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZCVUcgaXMgbm90IHNldAorCisjCisjIElucHV0IERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19JTlBVVF9LRV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gQ09ORklHX1IzOTY0IGlzIG5vdCBzZXQKKworIworIyBGdGFwZSwgdGhlIGZsb3BweSB0YXBlIGRldmljZSBkcml2ZXIKKyMKKyMgQ09ORklHX1JBV19EUklWRVIgaXMgbm90IHNldAorCisjCisjIFRQTSBkZXZpY2VzCisjCisjIENPTkZJR19UQ0dfVFBNIGlzIG5vdCBzZXQKKworIworIyBJMkMgc3VwcG9ydAorIworIyBDT05GSUdfSTJDIGlzIG5vdCBzZXQKKworIworIyBTUEkgc3VwcG9ydAorIworIyBDT05GSUdfU1BJIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NQSV9NQVNURVIgaXMgbm90IHNldAorCisjCisjIERhbGxhcydzIDEtd2lyZSBidXMKKyMKKyMgQ09ORklHX1cxIGlzIG5vdCBzZXQKKworIworIyBIYXJkd2FyZSBNb25pdG9yaW5nIHN1cHBvcnQKKyMKKyMgQ09ORklHX0hXTU9OIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hXTU9OX1ZJRCBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGltZWRpYSBkZXZpY2VzCisjCisjIENPTkZJR19WSURFT19ERVYgaXMgbm90IHNldAorCisjCisjIERpZ2l0YWwgVmlkZW8gQnJvYWRjYXN0aW5nIERldmljZXMKKyMKKworIworIyBHcmFwaGljcyBzdXBwb3J0CisjCisjIENPTkZJR19GSVJNV0FSRV9FRElEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZCIGlzIG5vdCBzZXQKKworIworIyBTb3VuZAorIworIyBDT05GSUdfU09VTkQgaXMgbm90IHNldAorCisjCisjIFVTQiBzdXBwb3J0CisjCisjIENPTkZJR19VU0JfQVJDSF9IQVNfSENEIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9BUkNIX0hBU19PSENJIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9BUkNIX0hBU19FSENJIGlzIG5vdCBzZXQKKworIworIyBOT1RFOiBVU0JfU1RPUkFHRSBlbmFibGVzIFN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C1yMTUKKwltb3YubAlyOSxALXIxNQorCW1vdi5sCXI4LEAtcjE1CisJbW92LmwJcjcsQC1yMTUKKwltb3YubAlyNixALXIxNQorCW1vdi5sCXI1LEAtcjE1CisJbW92LmwJcjQsQC1yMTUKKwltb3YJcjIscjgJCSEgY29weSB1c2VyIC0+IGtlcm5lbCBzdGFjaworCW1vdi5sCUByOCsscjMKKwltb3YubAlyMyxALXIxNQorCW1vdi5sCUByOCsscjIKKwltb3YubAlyMixALXIxNQorCW1vdi5sCUByOCsscjEKKwltb3YubAlyMSxALXIxNQorCW1vdi5sCUByOCsscjAKKwlicmEJMmYKKwkgbW92LmwJcjAsQC1yMTUKKzE6CisJISBpbiBrZXJuZWwgZXhjZXB0aW9uCisJbW92CSMoMjItNC00LTEpKjQrNCxyMAorCW1vdglyMTUscjIKKwlzdWIJcjAscjE1CisJbW92LmwJQHIyKyxyMAkJISBvbGQgUjMKKwltb3YubAlyMCxALXIxNQkKKwltb3YubAlAcjIrLHIwCQkhIG9sZCBSMgorCW1vdi5sCXIwLEAtcjE1CQorCW1vdi5sCUByMisscjAJCSEgb2xkIFIxCisJbW92LmwJcjAsQC1yMTUJCisJbW92LmwJQHIyKyxyMAkJISBvbGQgUjAKKwltb3YubAlyMCxALXIxNQkKKwltb3YubAlAcjIrLHIzCQkhIG9sZCBQQworCW1vdi5sCUByMisscjAJCSEgb2xkIFNSCisJYWRkCSMtNCxyMgkJISBleGNlcHRpb24gZnJhbWUgc3R1YiAoc3IpCisJbW92LmwJcjEsQC1yMgkJISBUUkEKKwlzdHMubAltYWNsLCBALXIyCisJc3RzLmwJbWFjaCwgQC1yMgorCXN0Yy5sCWdiciwgQC1yMgorCW1vdi5sCXIwLEAtcjIJCSEgc2F2ZSBvbGQgU1IKKwlzdHMubAlwcixALXIyCisJbW92LmwJcjMsQC1yMgkJISBzYXZlIG9sZCBQQworCW1vdglyMixyMAorCWFkZAkjOCo0LHIwCisJbW92LmwJcjAsQC1yMgkJISBzYXZlIG9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wJQHIyLHIyCisJc3RjCXNyLHIzCisJbW92LmwJcjIsQHIwCisJbW92LmwJcjMsQHIwCisJbW92LmwJcjEsQCg4LHIwKQkKKwltb3YubAlAcjE1KywgcjAKKwltb3YubAlAcjE1KywgcjEKKwltb3YubAlAcjE1KywgcjIKKwltb3YubAlAcjE1KywgcjMKKwltb3YubAlAcjE1KywgcjQKKwltb3YubAlAcjE1KywgcjUKKwltb3YubAlAcjE1KywgcjYKKwltb3YubAlAcjE1KywgcjcKKwltb3YubAlAcjE1KywgcjgKKwltb3YubAlAcjE1KywgcjkKKwltb3YubAlAcjE1KywgcjEwCisJbW92LmwJQHIxNSssIHIxMQorCW1vdi5sCUByMTUrLCByMTIKKwltb3YubAlAcjE1KywgcjEzCisJbW92LmwJQHIxNSssIHIxNAorCWFkZAkjOCxyMTUKKwlsZHMubAlAcjE1KywgcHIKKwlydGUKKwkgbW92LmwJQHIxNSsscjE1CisJLmFsaWduCTIKKzE6CS5sb25nCWdkYl92YnJfdmVjdG9yCisjZW5kaWYgLyogQ09ORklHX1NIX1NUQU5EQVJEX0JJT1MgKi8KKworRU5UUlkoYWRkcmVzc19lcnJvcl9oYW5kbGVyKQorCW1vdglyMTUscjQJCQkJISByZWdzCisJYWRkCSM0LHI0CisJbW92CSNPRkZfUEMscjAKKwltb3YubAlAKHIwLHIxNSkscjYJCQkhIHBjCisJbW92LmwJMWYscjAKKwlqbXAJQHIwCisJIG1vdgkjMCxyNQkJCQkhIHdyaXRlYWNjZXNzIGlzIHVua25vd24KKwkuYWxpZ24JMgorCisxOgkubG9uZwlkb19hZGRyZXNzX2Vycm9yCisKK3Jlc3RvcmVfYWxsOgorCWNsaQorI2lmZGVmIENPTkZJR19UUkFDRV9JUlFGTEFHUworCW1vdi5sCTFmLCByMAorCWpzcglAcjAKKwkgbm9wCisjZW5kaWYKKwltb3YJcjE1LHIwCisJbW92LmwJJGNwdV9tb2RlLHIyCisJbW92CSNPRkZfU1IscjMKKwltb3YubAlAKHIwLHIzKSxyMQorCW1vdi5sCXIxLEByMgorCXNobGwyCXIxCQkJCSEgY2xlYXIgTUQgYml0CisJc2hscjIJcjEKKwltb3YubAlAKE9GRl9TUCxyMCkscjIKKwlhZGQJIy04LHIyCisJbW92LmwJcjIsQChPRkZfU1AscjApCQkJISBwb2ludCBleGNlcHRpb24gZnJhbWUgdG9wCisJbW92LmwJcjEsQCg0LHIyKQkJCSEgc2V0IHNyCisJbW92CSNPRkZfUEMscjMKKwltb3YubAlAKHIwLHIzKSxyMQorCW1vdi5sCXIxLEByMgkJCQkhIHNldCBwYworCWFkZAkjNCoxNis0LHIwCisJbGRzLmwJQHIwKyxwcgorCWFkZAkjNCxyMAkJCQkhIHNraXAgc3IKKwlsZGMubAlAcjArLGdicgorCWxkcy5sCUByMCssbWFjaAorCWxkcy5sCUByMCssbWFjbAorCWdldF9jdXJyZW50X3RocmVhZF9pbmZvIHIwLCByMQorCW1vdi5sCSRjdXJyZW50X3RocmVhZF9pbmZvLHIxCisJbW92LmwJcjAsQHIxCisJbW92LmwJQHIxNSsscjAKKwltb3YubAlAcjE1KyxyMQorCW1vdi5sCUByMTUrLHIyCisJbW92LmwJQHIxNSsscjMKKwltb3YubAlAcjE1KyxyNAorCW1vdi5sCUByMTUrLHI1CisJbW92LmwJQHIxNSsscjYKKwltb3YubAlAcjE1KyxyNworCW1vdi5sCUByMTUrLHI4CisJbW92LmwJQHIxNSsscjkKKwltb3YubAlAcjE1KyxyMTAKKwltb3YubAlAcjE1KyxyMTEKKwltb3YubAlAcjE1KyxyMTIKKwltb3YubAlAcjE1KyxyMTMKKwltb3YubAlAcjE1KyxyMTQKKwltb3YubAlAcjE1LHIxNQorCXJ0ZQorCSBub3AKKworI2lmZGVmIENPTkZJR19UUkFDRV9JUlFGTEFHUworMTogICAgIC5sb25nICAgdHJhY2VfaGFyZGlycXNfb2ZmCisjZW5kaWYKKyRjdXJyZW50X3RocmVhZF9pbmZvOgorCS5sb25nCV9fY3VycmVudF90aHJlYWRfaW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xNSssIHIxMAorCW1vdi5sCUByMTUrLCByMTEKKwltb3YubAlAcjE1KywgcjEyCisJbW92LmwJQHIxNSssIHIxMworCW1vdi5sCUByMTUrLCByMTQKKwltb3YubAlAcjE1KywgazAKKwlsZGMubAlAcjE1Kywgc3BjCisJbGRzLmwJQHIxNSssIHByCisJbW92LmwJQHIxNSssIGsxCisJbGRjLmwJQHIxNSssIGdicgorCWxkcy5sCUByMTUrLCBtYWNoCisJbGRzLmwJQHIxNSssIG1hY2wKKwltb3YJazAsIHIxNQorCSEKKwltb3YubAkyZiwgazAKKwltb3YubAlAazAsIGswCisJam1wCUBrMAorCSBsZGMJazEsIHNzcgorCS5hbGlnbgkyCisxOgkubG9uZwkweDMwMDAwMGYwCisyOgkubG9uZwlnZGJfdmJyX3ZlY3RvcgorI2VuZGlmIC8qIENPTkZJR19TSF9TVEFOREFSRF9CSU9TICovCisKK3Jlc3RvcmVfYWxsOgorCW1vdi5sCUByMTUrLCByMAorCW1vdi5sCUByMTUrLCByMQorCW1vdi5sCUByMTUrLCByMgorCW1vdi5sCUByMTUrLCByMworCW1vdi5sCUByMTUrLCByNAorCW1vdi5sCUByMTUrLCByNQorCW1vdi5sCUByMTUrLCByNgorCW1vdi5sCUByMTUrLCByNworCSEKKwlzdGMJc3IsIHI4CisJbW92LmwJN2YsIHI5CisJb3IJcjksIHI4CQkJISBCTCA9MSwgUkI9MQorCWxkYwlyOCwgc3IJCQkhIGhlcmUsIGNoYW5nZSB0aGUgcmVnaXN0ZXIgYmFuaworCSEKKwltb3YubAlAcjE1KywgcjgKKwltb3YubAlAcjE1KywgcjkKKwltb3YubAlAcjE1KywgcjEwCisJbW92LmwJQHIxNSssIHIxMQorCW1vdi5sCUByMTUrLCByMTIKKwltb3YubAlAcjE1KywgcjEzCisJbW92LmwJQHIxNSssIHIxNAorCW1vdi5sCUByMTUrLCBrNAkJISBvcmlnaW5hbCBzdGFjayBwb2ludGVyCisJbGRjLmwJQHIxNSssIHNwYworCWxkcy5s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F9fdXNlciAqc3JjLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2b2lkICpkc3QsIGludCBsZW4sIF9fd3N1bSBzdW0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCAqZXJyX3B0cikKIHsKLSAgICAgICAgaWYoY29weV9mcm9tX3VzZXIoZHN0LCBzcmMsIGxlbikpeworICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoZHN0LCBzcmMsIGxlbikpIHsKICAgICAgICAgICAgICAgICAqZXJyX3B0ciA9IC1FRkFVTFQ7Ci0gICAgICAgICAgICAgICAgcmV0dXJuKC0xKTsKKyAgICAgICAgICAgICAgICByZXR1cm4gKF9fZm9yY2UgX193c3VtKS0xOwogICAgICAgICB9CiAgICAgICAgIHJldHVybiBjc3VtX3BhcnRpYWwoZHN0LCBsZW4sIHN1bSk7CiB9CkBAIC00OCwxNSArNDcsMTYgQEAKICAqIHRoZSBsYXN0IHN0ZXAgYmVmb3JlIHB1dHRpbmcgYSBjaGVja3N1bSBpbnRvIGEgcGFja2V0LgogICogTWFrZSBzdXJlIG5vdCB0byBtaXggd2l0aCA2NGJpdCBjaGVja3N1bXMuCiAgKi8KLXN0YXRpYyBpbmxpbmUgdW5zaWduZWQgaW50IGNzdW1fZm9sZCh1bnNpZ25lZCBpbnQgc3VtKQorc3RhdGljIGlubGluZSBfX3N1bTE2IGNzdW1fZm9sZChfX3dzdW0gc3VtKQogewogCV9fYXNtX18oCiAJCSIgIGFkZGwgJTEsJTBcbiIKIAkJIiAgYWRjbCAkMHhmZmZmLCUwIgogCQk6ICI9ciIgKHN1bSkKLQkJOiAiciIgKHN1bSA8PCAxNiksICIwIiAoc3VtICYgMHhmZmZmMDAwMCkKKwkJOiAiciIgKChfX2ZvcmNlIHUzMilzdW0gPDwgMTYpLAorCQkgICIwIiAoKF9fZm9yY2UgdTMyKXN1bSAmIDB4ZmZmZjAwMDApCiAJKTsKLQlyZXR1cm4g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NCBhID0gYmU2NF90b19jcHUoeC0+YSk7CisJdTY0IGIgPSBiZTY0X3RvX2NwdSh4LT5iKTsKKwl1NjQgX3R0ID0gZ2YxMjhtdWxfdGFibGVfYmJlW2EgPj4gNTZdOworCisJeC0+YSA9IGNwdV90b19iZTY0KChhIDw8IDgpIHwgKGIgPj4gNTYpKTsKKwl4LT5iID0gY3B1X3RvX2JlNjQoKGIgPDwgOCkgXiBfdHQpOworfQorCit2b2lkIGdmMTI4bXVsX2xsZShiZTEyOCAqciwgY29uc3QgYmUxMjggKmIpCit7CisJYmUxMjggcFs4XTsKKwlpbnQgaTsKKworCXBbMF0gPSAqcjsKKwlmb3IgKGkgPSAwOyBpIDwgNzsgKytpKQorCQlnZjEyOG11bF94X2xsZSgmcFtpICsgMV0sICZwW2ldKTsKKworCW1lbXNldChyLCAwLCBzaXplb2YocikpOworCWZvciAoaSA9IDA7OykgeworCQl1OCBjaCA9ICgodTggKiliKVsxNSAtIGldOworCisJCWlmIChjaCAmIDB4ODApCisJCQliZTEyOF94b3IociwgciwgJnBbMF0pOworCQlpZiAoY2ggJiAweDQwKQorCQkJYmUxMjhfeG9yKHIsIHIsICZwWzFdKTsKKwkJaWYgKGNoICYgMHgyMCkKKwkJCWJlMTI4X3hvcihyLCByLCAmcFsyXSk7CisJCWlmIChjaCAmIDB4MTApCisJCQliZTEyOF94b3IociwgciwgJnBbM10pOworCQlpZiAoY2ggJiAweDA4KQorCQkJYmUxMjhfeG9yKHIsIHIsICZwWzRdKTsKKwkJaWYgKGNoICYgMHgwNCkKKwkJCWJlMTI4X3hvcihyLCByLCAmcFs1XSk7CisJCWlmIChjaCAmIDB4MDIpCisJCQliZTEyOF94b3IociwgciwgJnBbNl0pOworCQlpZiAoY2ggJiAweDAxKQorCQkJYmUxMjhfeG9yKHIsIHIsICZwWzddKTsKKworCQlpZiAoKytpID49IDE2KQorCQkJYnJlYWs7CisKKwkJZ2YxMjhtdWxfeDhfbGxlKHIpOworCX0KK30KK0VYUE9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kJCQlhdGFfc3RhdHVzID0gcmVhZGIobnZfYWRtYV9jdGxfYmxvY2soYXApICsgKEFUQV9SRUdfU1RBVFVTICogNCkpOworCisJCQlpZihoYXZlX2VyciB8fCBmb3JjZV9lcnIpCisJCQkJYXRhX3N0YXR1cyB8PSBBVEFfRVJSOworCisJCQlxYy0+ZXJyX21hc2sgfD0gYWNfZXJyX21hc2soYXRhX3N0YXR1cyk7CisJCQlEUFJJTlRLKCJDb21wbGV0aW5nIHFjIGZyb20gdGFnICVkIHdpdGggZXJyX21hc2sgJXVcbiIsY3BiX251bSwKKwkJCQlxYy0+ZXJyX21hc2spOworCQkJYXRhX3FjX2NvbXBsZXRlKHFjKTsKKwkJfQorCX0KK30KKworc3RhdGljIGludCBudl9ob3N0X2ludHIoc3RydWN0IGF0YV9wb3J0ICphcCwgdTggaXJxX3N0YXQpCit7CisJc3RydWN0IGF0YV9xdWV1ZWRfY21kICpxYyA9IGF0YV9xY19mcm9tX3RhZyhhcCwgYXAtPmFjdGl2ZV90YWcpOworCWludCBoYW5kbGVkOworCisJLyogZnJlZXplIGlmIGhvdHBsdWdnZWQgKi8KKwlpZiAodW5saWtlbHkoaXJxX3N0YXQgJiAoTlZfSU5UX0FEREVEIHwgTlZfSU5UX1JFTU9WRUQpKSkgeworCQlhdGFfcG9ydF9mcmVlemUoYXApOworCQlyZXR1cm4gMTsKKwl9CisKKwkvKiBiYWlsIG91dCBpZiBub3Qgb3VyIGludGVycnVwdCAqLworCWlmICghKGlycV9zdGF0ICYgTlZfSU5UX0RFVikpCisJCXJldHVybiAwOworCisJLyogREVWIGludGVycnVwdCB3LyBubyBhY3RpdmUgcWM/ICovCisJaWYgKHVubGlrZWx5KCFxYyB8fCAocWMtPnRmLmZsYWdzICYgQVRBX1RGTEFHX1BPTExJTkcpKSkgeworCQlhdGFfY2hlY2tfc3RhdHVzKGFwKTsKKwkJcmV0dXJuIDE7CisJfQorCisJLyogaGFuZGxlIGludGVycnVwdCAqLworCWhhbmRsZW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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNkZWZpbmUgREVGX0FUVFIoX29iaixfbmFtZSxfbW9kZSkgXAorCXN0YXRpYyBzdHJ1Y3QgYXR0cmlidXRlIF9vYmogPSB7IFwKKwkJLm5hbWUgPSBfbmFtZSwgLm93bmVyID0gVEhJU19NT0RVTEUsIC5tb2RlID0gX21vZGUgfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICAvc3lzL2NsYXNzL3BrdGNkdmQvcGt0Y2R2ZFswLTddLworICAgICAgICAgICAgICAgICAgICAgc3RhdC9yZXNldAorICAgICAgICAgICAgICAgICAgICAgc3RhdC9wYWNrZXRzX3N0YXJ0ZWQKKyAgICAgICAgICAgICAgICAgICAgIHN0YXQvcGFja2V0c19maW5pc2hlZAorICAgICAgICAgICAgICAgICAgICAgc3RhdC9rYl93cml0dGVuCisgICAgICAgICAgICAgICAgICAgICBzdGF0L2tiX3JlYWQKKyAgICAgICAgICAgICAgICAgICAgIHN0YXQva2JfcmVhZF9nYXRoZXIKKyAgICAgICAgICAgICAgICAgICAgIHdyaXRlX3F1ZXVlL3NpemUKKyAgICAgICAgICAgICAgICAgICAgIHdyaXRlX3F1ZXVlL2Nvbmdlc3Rpb25fb2ZmCisgICAgICAgICAgICAgICAgICAgICB3cml0ZV9xdWV1ZS9jb25nZXN0aW9uX29uCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworREVGX0FUVFIoa29ial9wa3RfYXR0cl9zdDEsICJyZXNldCIsIDAyMDApOworREVGX0FUVFIoa29ial9wa3RfYXR0cl9zdDIsICJwYWNrZXRzX3N0YXJ0ZWQiLCAwNDQ0KTsKK0RFRl9BVFRSKGtvYmpfcGt0X2F0dHJfc3QzLCAicGFja2V0c19maW5pc2hlZCIsIDA0NDQpOworREVGX0FUVFIoa29ial9wa3RfYXR0cl9zd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GFkX3dvcmsrKzsKLSAgICAgICAgICAgICAgICAvKiBUaGUgcHVycG9zZSBvZiB0aGUgZm9sbG93aW5nIHRlc3QgaXMgdG8gZW5zdXJlIHRoYXQKLSAgICAgICAgICAgICAgICAgICBubyBjaGlwIGNhbiBtb25vcG9saXplIHRoZSBkcml2ZXIuICBUaGlzIGZvcmNlcyB0aGUKLSAgICAgICAgICAgICAgICAgICBjaGlwcyB0byBiZSBjaGVja2VkIGluIGEgcm91bmQtcm9iaW4gZmFzaGlvbiAoYWZ0ZXIKLSAgICAgICAgICAgICAgICAgICBkcmFpbmluZyBlYWNoIG9mIGEgYnVuY2ggKDEwMDApIG9mIGNoYXJhY3RlcnMpLgotICAgICAgICAgICAgICAgICAqLwotICAgICAgICAgICAgICAgIGlmKDEwMDA8dG9vX21hbnkrKyl7Ci0gICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBpZiAoc3RhdHVzICYgQ3lTUlJlY2VpdmUpIHsgLyogcmVjZXB0aW9uIGludGVycnVwdCAqLwotI2lmZGVmIENZX0RFQlVHX0lOVEVSUlVQVFMKLQkJICAgIHByaW50aygiY3l5X2ludGVycnVwdDogcmN2ZCBpbnRyLCBjaGlwICVkXG5cciIsIGNoaXApOwotI2VuZGlmCi0gICAgICAgICAgICAgICAgICAgIC8qIGRldGVybWluZSB0aGUgY2hhbm5lbCAmIGNoYW5nZSB0byB0aGF0IGNvbnRleHQgKi8KLQkJICAgIHNwaW5fbG9jaygmY2luZm8tPmNhcmRfbG9jayk7Ci0gICAgICAgICAgICAgICAgICAgIHNhdmVfeGlyID0gKHVfY2hhcikgY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVJJUjw8aW5kZXgpKTsKLSAgICAgICAgICAgICAgICAgICAgY2hhbm5lbCA9ICh1X3Nob3J0ICkgKHNhdmVfeGlyICYgQ3lJUkNoYW5uZWwpOwotICAgICAgICAgICAgICAgICAgICBpID0gY2hhbm5lbCArIGNoaXAgKiA0ICsgY2luZm8tPmZpcnN0X2xpbmU7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8gPSAmY3lfcG9ydFtpXTsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+bGFzdF9hY3RpdmUgPSBqaWZmaWVzOwotICAgICAgICAgICAgICAgICAgICBzYXZlX2NhciA9IGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lDQVI8PGluZGV4KSk7Ci0gICAgICAgICAgICAgICAgICAgIGN5X3dyaXRlYihiYXNlX2FkZHIrKEN5Q0FSPDxpbmRleCksIHNhdmVfeGlyKTsKLQotICAgICAgICAgICAgICAgICAgICAvKiBpZiB0aGVyZSBpcyBub3doZXJlIHRvIHB1dCB0aGUgZGF0YSwgZGlzY2FyZCBpdCAqLwotICAgICAgICAgICAgICAgICAgICBpZihpbmZvLT50dHkgPT0gMCl7Ci0gICAgICAgICAgICAgICAgICAgICAgICBqID0gKGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lSSVZSPDxpbmRleCkpICYgQ3lJVlJNYXNrKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmICggaiA9PSBDeUlWUlJ4RXggKSB7IC8qIGV4Y2VwdGlvbiAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBjeV9yZWFkYihiYXNlX2FkZHIrKEN5UkRTUjw8aW5kZXgpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7IC8qIG5vcm1hbCBjaGFyYWN0ZXIgcmVjZXB0aW9uICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hhcl9jb3VudCA9IGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lSRENSPDxpbmRleCkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlKGNoYXJfY291bnQtLSl7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBjeV9yZWFkYihiYXNlX2FkZHIrKEN5UkRTUjw8aW5kZXgpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIH1lbHNleyAvKiB0aGVyZSBpcyBhbiBvcGVuIHBvcnQgZm9yIHRoaXMgZGF0YSAqLwotICAgICAgICAgICAgICAgICAgICAgICAgdHR5ID0gaW5mby0+dHR5OwotICAgICAgICAgICAgICAgICAgICAgICAgaiA9IChjeV9yZWFkYihiYXNlX2FkZHIrKEN5UklWUjw8aW5kZXgpKSAmIEN5SVZSTWFzayk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIGogPT0gQ3lJVlJSeEV4ICkgeyAvKiBleGNlcHRpb24gKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVJEU1I8PGluZGV4KSk7Ci0KLQkJCSAgICAvKiBGb3Igc3RhdGlzdGljcyBvbmx5ICovCi0JCQkgICAgaWYgKGRhdGEgJiBDeUJSRUFLKQotCQkJCWluZm8tPmljb3VudC5icmsrKzsKLQkJCSAgICBlbHNlIGlmKGRhdGEgJiBDeUZSQU1FKQotCQkJCWluZm8tPmljb3VudC5mcmFtZSsrOwotCQkJICAgIGVsc2UgaWYoZGF0YSAmIEN5UEFSSVRZKQotCQkJCWluZm8tPmljb3VudC5wYXJpdHkrKzsKLQkJCSAgICBlbHNlIGlmKGRhdGEgJiBDeU9WRVJSVU4pCi0JCQkJaW5mby0+aWNvdW50Lm92ZXJydW4rKzsKLQotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEgJiBpbmZvLT5pZ25vcmVfc3RhdHVzX21hc2spewotCQkJCWluZm8tPmljb3VudC5yeCsrOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR0eV9idWZmZXJfcmVxdWVzdF9yb29tKHR0eSwgMSkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRhdGEgJiBpbmZvLT5yZWFkX3N0YXR1c19tYXNrKXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGRhdGEgJiBDeUJSRUFLKXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0dHlfaW5zZXJ0X2ZsaXBfY2hhcih0dHksIGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lSRFNSPDxpbmRleCkpLCBUVFlfQlJFQUspOworCQkJCWlmIChkYXRhICYgaW5mby0+aWdub3JlX3N0YXR1c19tYXNrKSB7CiAJCQkJCWluZm8tPmljb3VudC5yeCsrOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpbmZvLT5mbGFncyAmIEFTWU5DX1NBSyl7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvX1NBSyh0dHkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRhdGEgJiBDeUZSQU1FKXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0dHlfaW5zZXJ0X2ZsaXBfY2hhcih0dHksIGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lSRFNSPDxpbmRleCkpLCBUVFlfRlJBTUUpOwotCQkJCQlpbmZvLT5pY291bnQucngrKzsKLQkJCQkJaW5mby0+aWRsZV9zdGF0cy5mcmFtZV9lcnJzKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZSBpZihkYXRhICYgQ3lQQVJJVFkpewotCQkJCQkvKiBQaWVjZXMgb2Ygc2V2ZW4uLi4gKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0dHlfaW5zZXJ0X2ZsaXBfY2hhcih0dHksIGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lSRFNSPDxpbmRleCkpLCBUVFlfUEFSSVRZKTsKLQkJCQkJaW5mby0+aWNvdW50LnJ4Kys7Ci0JCQkJCWluZm8tPmlkbGVfc3RhdHMucGFyaXR5X2VycnMrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIGlmKGRhdGEgJiBDeU9WRVJSVU4pewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR0eV9pbnNlcnRfZmxpcF9jaGFyKHR0eSwgMCwgVFRZX09WRVJSVU4pOwotCQkJCQlpbmZvLT5pY291bnQucngrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBJZiB0aGUgZmxpcCBidWZmZXIgaXRzZWxmIGlzCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3ZlcmZsb3dpbmcsIHdlIHN0aWxsIGxvc2UKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbmV4dCBpbmNvbWluZyBjaGFyYWN0ZXIuCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHR5X2luc2VydF9mbGlwX2NoYXIodHR5LCBjeV9yZWFkYihiYXNlX2FkZHIrKEN5UkRTUjw8aW5kZXgpKSwgVFRZX0ZSQU1FKTsKLQkJCQkgICAgICAgIGluZm8tPmljb3VudC5yeCsrOworCQkJCQlyZXR1cm47CisJCQkJfQorCQkJCWlmICh0dHlfYnVmZmVyX3JlcXVlc3Rfcm9vbSh0dHksIDEpKSB7CisJCQkJCWlmIChkYXRhICYgaW5mby0+cmVhZF9zdGF0dXNfbWFzaykgeworCQkJCQkJaWYgKGRhd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orCQkJCQkJCQlUVFlfTk9STUFMKTsKKwkJCQkJCWluZm8tPmljb3VudC5yeCsrOworCQkJCQl9CisJCQkJfSBlbHNlIHsKKwkJCQkJLyogdGhlcmUgd2FzIGEgc29mdHdhcmUgYnVmZmVyCisJCQkJCSAgIG92ZXJydW4gYW5kIG5vdGhpbmcgY291bGQgYmUKKwkJCQkJICAgZG9uZSBhYm91dCBpdCEhISAqLworCQkJCQlpbmZvLT5pY291bnQuYnVmX292ZXJydW4rKzsKIAkJCQkJaW5mby0+aWRsZV9zdGF0cy5vdmVycnVucysrOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogVGhlc2UgdHdvIGNvbmRpdGlvbnMgbWF5IGltcGx5ICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBhIG5vcm1hbCByZWFkIHNob3VsZCBiZSBkb25lLiAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogfWVsc2UgaWYoZGF0YSAmIEN5VElNRU9VVCl7ICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiB9ZWxzZSBpZihkYXRhICYgQ3lTUEVDSEFSKXsgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNlIHsKLQkJCQkJdHR5X2luc2VydF9mbGlwX2NoYXIodHR5LCAwLCBUVFlfTk9STUFMKTsKLQkJCQkgICAgICAgIGluZm8tPmljb3VudC5yeCsrOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKLQkJCQkgICAgdHR5X2luc2VydF9mbGlwX2NoYXIodHR5LCAwLCBUVFlfTk9STUFMKTsKLQkJCQkgICAgaW5mby0+aWNvdW50LnJ4Kys7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogdGhlcmUgd2FzIGEgc29mdHdhcmUgYnVmZmVyCi0JCQkJICAgb3ZlcnJ1biBhbmQgbm90aGluZyBjb3VsZCBiZQotCQkJCSAgIGRvbmUgYWJvdXQgaXQhISEgKi8KLQkJCQlpbmZvLT5pY291bnQuYnVmX292ZXJydW4rKzsKLQkJCQlpbmZvLT5pZGxlX3N0YXRzLm92ZXJydW5zKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsgLyogbm9ybWFsIGNoYXJhY3RlciByZWNlcHRpb24gKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBsb2FkICMgY2hhcnMgYXZhaWxhYmxlIGZyb20gdGhlIGNoaXAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyX2NvdW50ID0gY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVJEQ1I8PGluZGV4KSk7CisJCQkJfQorCQkJfSBlbHNlIHsJLyogbm9ybWFsIGNoYXJhY3RlciByZWNlcHRpb24gKi8KKwkJCQkvKiBsb2FkICMgY2hhcnMgYXZhaWxhYmxlIGZyb20gdGhlIGNoaXAgKi8KKwkJCQljaGFyX2NvdW50ID0gY3lfcmVhZGIoYmFzZV9hZGRyICsKKwkJCQkJCShDeVJEQ1IgPDwgaW5kZXgpKTsKIAogI2lmZGVmIENZX0VOQUJMRV9NT05JVE9SSU5HCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgKytpbmZvLT5tb24uaW50X2NvdW50OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm8tPm1vbi5jaGFyX2NvdW50ICs9IGNoYXJfY291bnQ7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNoYXJfY291bnQgPiBpbmZvLT5tb24uY2hhcl9tYXgpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAga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C5yeCsrOwogI2lmZGVmIENZXzE2WV9IQUNLCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVkZWxheSgxMEwpOworCQkJCQl1ZGVsYXkoMTBMKTsKICNlbmRpZgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+aWRsZV9zdGF0cy5yZWN2X2lkbGUgPSBqaWZmaWVzOwotICAgICAgICAgICAgICAgICAgICAgICAgfQorCQkJCX0KKwkJCQlpbmZvLT5pZGxlX3N0YXRzLnJlY3ZfaWRsZSA9IGppZmZpZXM7CisJCQl9CiAJCQl0dHlfc2NoZWR1bGVfZmxpcCh0dHkpOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIC8qIGVuZCBvZiBzZXJ2aWNlICovCi0gICAgICAgICAgICAgICAgICAgIGN5X3dyaXRlYihiYXNlX2FkZHIrKEN5UklSPDxpbmRleCksIChzYXZlX3hpciAmIDB4M2YpKTsKLSAgICAgICAgICAgICAgICAgICAgY3lfd3JpdGViKGJhc2VfYWRkcisoQ3lDQVI8PGluZGV4KSwgKHNhdmVfY2FyKSk7Ci0JCSAgICBzcGluX3VubG9jaygmY2luZm8tPmNhcmRfbG9jayk7Ci0gICAgICAgICAgICAgICAgfQorCQl9CisJCS8qIGVuZCBvZiBzZXJ2aWNlICovCisJCWN5X3dyaXRlYihiYXNlX2FkZHIgKyAoQ3lSSVIgPDwgaW5kZXgpLCAoc2F2ZV94aXIgJiAweDNmKSk7CisJCWN5X3dyaXRlYihiYXNlX2FkZHIgKyAoQ3lDQVIgPDwgaW5kZXgpLCAoc2F2ZV9jYXIpKTsKKwkJc3Bpbl91bmxvY2soJmNpbmZvLT5jYXJkX2xvY2spOworCX0KIAotCi0gICAgICAgICAgICAgICAgaWYgKHN0YXR1cyAmIEN5U1JUcmFuc21pdCkgeyAvKiB0cmFuc21pc3Npb24gaW50ZXJydXB0ICovCi0gICA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T5maXJzdF9saW5lOwotICAgICAgICAgICAgICAgICAgICBzYXZlX2NhciA9IGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lDQVI8PGluZGV4KSk7Ci0gICAgICAgICAgICAgICAgICAgIGN5X3dyaXRlYihiYXNlX2FkZHIrKEN5Q0FSPDxpbmRleCksIHNhdmVfeGlyKTsKKwkJLyogZGV0ZXJtaW5lIHRoZSBjaGFubmVsICYgY2hhbmdlIHRvIHRoYXQgY29udGV4dCAqLworCQlzcGluX2xvY2soJmNpbmZvLT5jYXJkX2xvY2spOworCQlzYXZlX3hpciA9ICh1X2NoYXIpIGN5X3JlYWRiKGJhc2VfYWRkciArIChDeVRJUiA8PCBpbmRleCkpOworCQljaGFubmVsID0gKHVfc2hvcnQpIChzYXZlX3hpciAmIEN5SVJDaGFubmVsKTsKKwkJaSA9IGNoYW5uZWwgKyBjaGlwICogNCArIGNpbmZvLT5maXJzdF9saW5lOworCQlzYXZlX2NhciA9IGN5X3JlYWRiKGJhc2VfYWRkciArIChDeUNBUiA8PCBpbmRleCkpOworCQljeV93cml0ZWIoYmFzZV9hZGRyICsgKEN5Q0FSIDw8IGluZGV4KSwgc2F2ZV94aXIpOwogCi0gICAgICAgICAgICAgICAgICAgIC8qIHZhbGlkYXRlIHRoZSBwb3J0IyAoYXMgY29uZmlndXJlZCBhbmQgb3BlbikgKi8KLSAgICAgICAgICAgICAgICAgICAgaWYoIChpIDwgMCkgfHwgKE5SX1BPUlRTIDw9IGkpICl7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjeV93cml0ZWIoYmFzZV9hZGRyKyhDeVNSRVI8PGluZGV4KSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVNSRVI8PGluZGV4KSkgJiB+Q3lUeFJkeSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBnb3RvIHR4ZW5kOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAg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ICBjaGFyX2NvdW50ID0gaW5mby0+eG1pdF9maWZvX3NpemU7CisJCS8qIGxvYWQgdGhlIG9uLWNoaXAgc3BhY2UgZm9yIG91dGJvdW5kIGRhdGEgKi8KKwkJY2hhcl9jb3VudCA9IGluZm8tPnhtaXRfZmlmb19zaXplOwogCi0gICAgICAgICAgICAgICAgICAgIGlmKGluZm8tPnhfY2hhcikgeyAvKiBzZW5kIHNwZWNpYWwgY2hhciAqLwotICAgICAgICAgICAgICAgICAgICAgICAgb3V0Y2ggPSBpbmZvLT54X2NoYXI7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjeV93cml0ZWIoYmFzZV9hZGRyKyhDeVREUjw8aW5kZXgpLCBvdXRjaCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjaGFyX2NvdW50LS07CisJCWlmIChpbmZvLT54X2NoYXIpIHsJLyogc2VuZCBzcGVjaWFsIGNoYXIgKi8KKwkJCW91dGNoID0gaW5mby0+eF9jaGFyOworCQkJY3lfd3JpdGViKGJhc2VfYWRkciArIChDeVREUiA8PCBpbmRleCksIG91dGNoKTsKKwkJCWNoYXJfY291bnQtLTsKIAkJCWluZm8tPmljb3VudC50eCsrOwotICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+eF9jaGFyID0gMDsKLSAgICAgICAgICAgICAgICAgICAgfQorCQkJaW5mby0+eF9jaGFyID0gMDsKKwkJfQogCi0gICAgICAgICAgICAgICAgICAgIGlmIChpbmZvLT5icmVha29uIHx8IGluZm8tPmJyZWFrb2ZmKSB7CisJCWlmIChpbmZvLT5icmVha29uIHx8IGluZm8tPmJyZWFrb2ZmKSB7CiAJCQlpZiAoaW5mby0+YnJlYWtvbikgewotCQkJICAgIGN5X3dyaXRlYihiYXNlX2FkZHIgKyAoQ3lURFI8PGluZGV4KSwgMCk7IAotCQkJICAgIGN5X3dyaXRlYihiYXNlX2FkZHIgKyAoQ3lURFI8PGluZGV4KSwgMHg4MSk7Ci0JCQkgICAgaW5mby0+YnJlYWt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ElmIGl0CiAJCQkgICBpcywgd2UgbXVzdCBlbnN1cmUgdGhhdCB0aGVyZSBpcyByb29tIGZvciBpdAogCQkJICAgdG8gYmUgZG91YmxlZCBpbiB0aGUgb3V0cHV0IHN0cmVhbS4gIFRoZXJlZm9yZQpAQCAtMTMyMSwxMjUgKzEzMTMsMTgyIEBACiAJCQkgICBhZnRlciB0aGUgY2hlY2sgZm9yIGEgTlVMTCBvdXRwdXQgY2hhcmFjdGVyLgogCQkJICAgVGhpcyBpcyBuZWNlc3NhcnkgYmVjYXVzZSB0aGVyZSBtYXkgbm90IGJlCiAJCQkgICByb29tIGZvciB0aGUgdHdvIGNoYXJzIG5lZWRlZCB0byBzZW5kIGEgTlVMTC4pCi0gICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIG91dGNoID0gaW5mby0+eG1pdF9idWZbaW5mby0+eG1pdF90YWlsXTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBvdXRjaCApewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluZm8tPnhtaXRfY250LS07Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+eG1pdF90YWlsID0gKGluZm8tPnhtaXRfdGFpbCArIDEpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmIChTRVJJQUxfWE1JVF9TSVpFIC0gMSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3lfd3JpdGViKGJhc2VfYWRkcisoQ3lURFI8PGluZGV4KSwgb3V0Y2gpOwotCQkJICAgIGluZm8tPmljb3VudC50eCsrOwotICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoY2hhcl9jb3VudCA+IDEpewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT54bWl0X2NudC0tOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT54bWl0X3RhaWwgPSAoaW5mby0+eG1pdF90YWlsICsgMSkKLQkJCQkJCSAgICAgICYgKFNFUklBTF9YTUlUX1NJWkUgLSAxKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3lfd3JpdGViKGJhc2VfYWRkcisoQ3lURFI8PGluZGV4KSwgCi0JCQkJCSAgb3V0Y2gpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjeV93cml0ZWIoYmFzZV9hZGRyKyhDeVREUjw8aW5kZXgpLCAwKTsKKwkJCSAqLworCQkJb3V0Y2ggPSBpbmZvLT54bWl0X2J1ZltpbmZvLT54bWl0X3RhaWxdOworCQkJaWYgKG91dGNoKSB7CisJCQkJaW5mby0+eG1pdF9jbnQtLTsKKwkJCQlpbmZvLT54bWl0X3RhaWwgPSAoaW5mby0+eG1pdF90YWlsICsgMSkgJgorCQkJCQkJKFNFUklBTF9YTUlUX1NJWkUgLSAxKTsKKwkJCQljeV93cml0ZWIoYmFzZV9hZGRyICsgKEN5VERSIDw8IGluZGV4KSwgb3V0Y2gpOwogCQkJCWluZm8tPmljb3VudC50eCsrOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGFyX2NvdW50LS07Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgfWVsc2V7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICB9CisJCQl9IGVsc2UgeworCQkJCWlmIChjaGFyX2NvdW50ID4gMSkgeworCQkJCQlpbmZvLT54bWl0X2NudC0tOworCQkJCQlpbmZvLT54bWl0X3RhaWwgPSAoaW5mby0+eG1pdF90YWlsICsgMSkmCisJCQkJCQkoU0VSSUFMX1hNSVRfU0laRSAtIDEpOworCQkJCQljeV93cml0ZWIoYmFzZV9hZGRyICsgKEN5VERSIDw8IGluZGV4KSwKKwkJCQkJCW91dGNoKTsKKwkJCQkJY3lfd3JpdGViKGJhc2VfYWRkciArIChDeVREUiA8PCBpbmRleCksCisJCQkJCQkwKTsKKwkJCQkJaW5mby0+aWNvdW50LnR4Kys7CisJCQkJCWNoYXJfY291bnQtLTsKKwkJCQl9IGVsc2UgeworCQkJCX0KKwkJCX0KKwkJfQogCi0gICAgICAgIHR4ZG9uZToKLSAgICAgICAgICAgICAgICAgICAgaWYgKGluZm8tPnhtaXRfY250IDwgV0FLRVVQX0NIQVJTKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjeV9zY2hlZF9ldmVudChpbmZvLCBDeV9FVkVOVF9XUklURV9XQUtFVVApOwotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgIHR4ZW5kOgotICAgICAgICAgICAgICAgICAgICAvKiBlbmQgb2Ygc2VydmljZSAqLwotICAgICAgICAgICAgICAgICAgICBjeV93cml0ZWIoYmFzZV9hZGRyKyhDeVRJUjw8aW5kZXgpLCAKLQkJCSAgICAgIChzYXZlX3hpciAmIDB4M2YpKTsKLSAgICAgICAgICAgICAgICAgICAgY3lfd3JpdGViKGJhc2VfYWRkcisoQ3lDQVI8PGluZGV4KSwgKHNhdmVfY2FyKSk7Ci0JCSAgICBzcGluX3VubG9jaygmY2luZm8tPmNhcmRfbG9jayk7Ci0gICAgICAgICAgICAgICAgfQordHhkb25lOgorCQlpZiAoaW5mby0+eG1pdF9jbnQgPCBXQUtFVVBfQ0hBUlMpIHsKKwkJCWN5X3NjaGVkX2V2ZW50KGluZm8sIEN5X0VWRU5UX1dSSVRFX1dBS0VVUCk7CisJCX0KK3R4ZW5kOgorCQkvKiBlbmQgb2Ygc2VydmljZSAqLworCQljeV93cml0ZWIoYmFzZV9hZGRyICsgKEN5VElSIDw8IGluZGV4KSwgKHNhdmVfeGlyICYgMHgzZikpOworCQljeV93cml0ZWIoYmFzZV9hZGRyICsgKEN5Q0FSIDw8IGluZGV4KSwgKHNhdmVfY2FyKSk7CisJCXNwaW5fdW5sb2NrKCZjaW5mby0+Y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AgICAgICAgY3lfc2NoZWRfZXZlbnQoaW5mbywKLQkJCQkgICAgQ3lfRVZFTlRfSEFOR1VQKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZigobWRtX2NoYW5nZSAmIEN5Q1RTKQotICAgICAgICAgICAgICAgICAgICAgICAgJiYgKGluZm8tPmZsYWdzICYgQVNZTkNfQ1RTX0ZMT1cpKXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihpbmZvLT50dHktPmh3X3N0b3BwZWQpewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihtZG1fc3RhdHVzICYgQ3lDVFMpewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogY3lfc3RhcnQgaXNuJ3QgdXNlZAotCQkJCSAgICAgICAgIGJlY2F1c2UuLi4gISEhICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT50dHktPmh3X3N0b3BwZWQgPSAwOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN5X3dyaXRlYihiYXNlX2FkZHIrKEN5U1JFUjw8aW5kZXgpLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3lfcmVhZGIoYmFzZV9hZGRyKyhDeVNSRVI8PGluZGV4KSkgfCAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEN5VHhSZHkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3lfc2NoZWRfZXZlbnQoaW5mbywKLQkJCQkgICAgICAgIEN5X0VWRU5UX1dSSVRFX1dBS0VVUCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9ZWxzZXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIShtZG1fc3RhdHVzICYgQ3lDVFMpKXsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGN5X3N0b3AgaXNuJ3QgdXNlZAotCQkJCSAgICAgICAgIGJlY2F1c2UgLi4uICEhISAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+dHR5LT5od19zdG9wcGVkID0gMTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjeV93cml0ZWIoYmFzZV9hZGRyKyhDeVNSRVI8PGluZGV4KSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN5X3JlYWRiKGJhc2VfYWRkcisoQ3lTUkVSPDxpbmRleCkpICYgCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB+Q3lUeFJkeSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZihtZG1fY2hhbmdlICYgQ3lEU1IpewotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgaWYobWRtX2NoYW5nZSAmIEN5UkkpewotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgIC8qIGVuZCBvZiBzZXJ2aWNlICovCi0gICAgICAgICAgICAgICAgICAgIGN5X3dyaXRlYihiYXNlX2FkZHIrKEN5TUlSPDxpbmRleCksIAotCQkJICAgICAgKHNhdmVfeGlyICYgMHgzZikpOwotICAgICAgICAgICAgICAgICAgICBjeV93cml0ZWIoYmFzZV9hZGRyKyhDeUNBUjw8aW5kZXgpLCBzYXZlX2Nhcik7Ci0JCSAgICBzcGluX3VubG9jaygmY2luZm8tPmNhcmRfbG9jayk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgIC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aW5mbywgYXJncCk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBDWVNFVFRIUkVTSDoKLSAgICAgICAgICAgIHJldF92YWwgPSBzZXRfdGhyZXNob2xkKGluZm8sIGFyZyk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBDWUdFVERFRlRIUkVTSDoKLSAgICAgICAgICAgIHJldF92YWwgPSBnZXRfZGVmYXVsdF90aHJlc2hvbGQoaW5mbywgYXJncCk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBDWVNFVERFRlRIUkVTSDoKLSAgICAgICAgICAgIHJldF92YWwgPSBzZXRfZGVmYXVsdF90aHJlc2hvbGQoaW5mbywgYXJnKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIENZR0VUVElNRU9VVDoKLSAgICAgICAgICAgIHJldF92YWwgPSBnZXRfdGltZW91dChpbmZvLCBhcmdwKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIENZU0VUVElNRU9VVDoKLSAgICAgICAgICAgIHJldF92YWwgPSBzZXRfdGltZW91dChpbmZvLCBhcmcpOwotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgQ1lHRVRERUZUSU1FT1VUOgotICAgICAgICAgICAgcmV0X3ZhbCA9IGdldF9kZWZhdWx0X3RpbWVvdXQoaW5mbywgYXJncCk7Ci0gICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSBDWVNFVERFRlRJTUVPVVQ6Ci0gICAgICAgICAgICByZXRfdmFsID0gc2V0X2RlZmF1bHRfdGltZW91dChpbmZvLCBhcmcpOwotICAgICAgICAgICAgYnJlYWs7Ci0JY2FzZSBDWVNFVFJGTE9XOgotICAgIAkgICAgaW5mby0+cmZsb3cgPSAoaW50KWFyZzsKLQkgICAgcmV0X3ZhbCA9IDA7Ci0JICAgIGJyZWFrOwotCWNhc2UgQ1lHRVRSRkxPVzoKLQkgICA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lpZiAoaXNhX2FkZHJlc3MgPT0gMHgwMDAwKSB7CisJCQlyZXR1cm4gbmJvYXJkOworCQl9CiAKLSAgICAgICAgICAgICAgICAvKiBwcm9iZSBmb3IgQ0QxNDAwLi4uICovCisJCS8qIHByb2JlIGZvciBDRDE0MDAuLi4gKi8KIAkJY3lfaXNhX2FkZHJlc3MgPSBpb3JlbWFwKGlzYV9hZGRyZXNzLCBDeUlTQV9Zd2luKTsKLSAgICAgICAgICAgICAgICBjeV9pc2FfbmNoYW4gPSBDeVBPUlRTX1BFUl9DSElQICogCi0gICAgICAgICAgICAgICAgICAgICBjeXlfaW5pdF9jYXJkKGN5X2lzYV9hZGRyZXNzLDApOwotICAgICAgICAgICAgICAgIGlmIChjeV9pc2FfbmNoYW4gPT0gMCkgewotICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgICAgfQotCisJCWN5X2lzYV9uY2hhbiA9IEN5UE9SVFNfUEVSX0NISVAgKgorCQkJY3l5X2luaXRfY2FyZChjeV9pc2FfYWRkcmVzcywgMCk7CisJCWlmIChjeV9pc2FfbmNoYW4gPT0gMCkgeworCQkJY29udGludWU7CisJCX0KICNpZmRlZiBNT0RVTEUKIAkJaWYgKGlzcGFyYW0gJiYgaXJxW2ldKQotCQkgICAgY3lfaXNhX2lycSA9IGlycVtpXTsKKwkJCWN5X2lzYV9pcnEgPSBpcnFbaV07CiAJCWVsc2UKICNlbmRpZgotICAgICAgICAgICAgICAgIC8qIGZpbmQgb3V0IHRoZSBib2FyZCdzIGlycSBieSBwcm9iaW5nICovCi0gICAgICAgICAgICAgICAgY3lfaXNhX2lycSA9IGRldGVjdF9pc2FfaXJxKGN5X2lzYV9hZGRyZXNzKTsKLSAgICAgICAgICAgICAgICBpZiAoY3lfaXNhX2lycSA9PSAwKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoIkN5Y2xvbS1ZL0lTQSBmb3VuZCBhdCAweCVseCAiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgbG9uZykgY3lfaXNhX2FkZHJlc3MpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJidXQgdGhlIElSUSBjb3VsZCBub3QgYmUgZGV0ZWN0ZWQuXG4iKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOwotICAgICAgICAgICAgICAgIH0KKwkJCS8qIGZpbmQgb3V0IHRoZSBib2FyZCdzIGlycSBieSBwcm9iaW5nICovCisJCQljeV9pc2FfaXJxID0gZGV0ZWN0X2lzYV9pcnEoY3lfaXNhX2FkZHJlc3MpOworCQlpZiAoY3lfaXNhX2lycSA9PSAwKSB7CisJCQlwcmludGsoIkN5Y2xvbS1ZL0lTQSBmb3VuZCBhdCAweCVseCAiLAorCQkJCSh1bnNpZ25lZCBsb25nKWN5X2lzYV9hZGRyZXNzKTsKKwkJCXByaW50aygiYnV0IHRoZSBJUlEgY291bGQgbm90IGJlIGRldGVjdGVkLlxuIik7CisJCQljb250aW51ZTsKKwkJfQogCi0gICAgICAgICAgICAgICAgaWYoKGN5X25leHRfY2hhbm5lbCtjeV9pc2FfbmNoYW4pID4gTlJfUE9SVFMpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiQ3ljbG9tLVkvSVNBIGZvdW5kIGF0IDB4JWx4ICIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKSBjeV9pc2FfYWRkcmVzcyk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoImJ1dCBubyBtb3JlIGNoYW5uZWxzIGFyZSBhdmFpbGFibGUuXG4iKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiQ2hhbmdlIE5SX1BPUlRTIGluIGN5Y2xhZGVzLmMgYW5kIHJlY29tcGlsZSBrZXJuZWwuXG4iKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybihuYm9hcmQpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAvKiBmaWxsIHRoZSBuZXh0IGN5X2NhcmQgc3RydWN0dXJlIGF2YWlsYWJsZSAqLwotICAgICAgICAgICAgICAgIGZvciAoaiA9IDAgOyBqIDwgTlJfQ0FSRFMgOyBqKyspIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjeV9jYXJkW2pdLmJhc2VfYWRkciA9PSAwKSAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGlmIChqID09IE5SX0NBUkRTKSB7ICAgIC8qIG5vIG1vcmUgY3lfY2FyZHMgYXZhaWxhYmxlICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoIkN5Y2xvbS1ZL0lTQSBmb3VuZCBhdCAweCVseCAiLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgbG9uZykgY3lfaXNhX2FkZHJlc3MpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJidXQgbm8gbW9yZSBjYXJkcyBjYW4gYmUgdXNlZCAuXG4iKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiQ2hhbmdlIE5SX0NBUkRTIGluIGN5Y2xhZGVzLmMgYW5kIHJlY29tcGlsZSBrZXJuZWwuXG4iKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybihuYm9hcmQpOwotICAgICAgICAgICAgICAgIH0KKwkJaWYgKChjeV9uZXh0X2NoYW5uZWwgKyBjeV9pc2FfbmNoYW4pID4gTlJfUE9SVFMpIHsKKwkJCXByaW50aygiQ3ljbG9tLVkvSVNBIGZvdW5kIGF0IDB4JWx4ICIsCisJCQkJKHVuc2lnbmVkIGxvbmcpY3lfaXNhX2FkZHJlc3MpOworCQkJcHJpbnRrKCJidXQgbm8gbW9yZSBjaGFubmVscyBhcmUgYXZhaWxhYmxlLlxuIik7CisJCQlwcmludGsoIkNoYW5nZSBOUl9QT1JUUyB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CBhbGxvY2F0ZSBJUlEjJWQuXG4iLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjeV9pc2FfaXJxKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybihuYm9hcmQpOwotICAgICAgICAgICAgICAgIH0KKwkJLyogYWxsb2NhdGUgSVJRICovCisJCWlmIChyZXF1ZXN0X2lycShjeV9pc2FfaXJxLCBjeXlfaW50ZXJydXB0LAorCQkJCUlSUUZfRElTQUJMRUQsICJDeWNsb20tWSIsICZjeV9jYXJkW2pdKSkgeworCQkJcHJpbnRrKCJDeWNsb20tWS9JU0EgZm91bmQgYXQgMHglbHggIiwKKwkJCQkodW5zaWduZWQgbG9uZyljeV9pc2FfYWRkcmVzcyk7CisJCQlwcmludGsoImJ1dCBjb3VsZCBub3QgYWxsb2NhdGUgSVJRIyVkLlxuIiwgY3lfaXNhX2lycSk7CisJCQlyZXR1cm4gbmJvYXJkOworCQl9CiAKLSAgICAgICAgICAgICAgICAvKiBzZXQgY3lfY2FyZCAqLwotICAgICAgICAgICAgICAgIGN5X2NhcmRbal0uYmFzZV9hZGRyID0gY3lfaXNhX2FkZHJlc3M7Ci0gICAgICAgICAgICAgICAgY3lfY2FyZFtqXS5jdGxfYWRkciA9IE5VTEw7Ci0gICAgICAgICAgICAgICAgY3lfY2FyZFtqXS5pcnEgPSAoaW50KSBjeV9pc2FfaXJxOwotICAgICAgICAgICAgICAgIGN5X2NhcmRbal0uYnVzX2luZGV4ID0gMDsKLSAgICAgICAgICAgICAgICBjeV9jYXJkW2pdLmZpcnN0X2xpbmUgPSBjeV9uZXh0X2NoYW5uZWw7Ci0gICAgICAgICAgICAgICAgY3lfY2FyZFtqXS5udW1fY2hpcHMgPSBjeV9pc2FfbmNoYW4vNDsKLSAgICAgICAgICAgICAgICBuYm9hcmQrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgIAotICAgICAgICAgICAgICAgIC8qIHByaW50IG1lc3NhZ2UgKi8KLSAgICAgICAgICAg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QgcGNpX2RldiAqWmVfcGRldltOUl9DQVJEU107CiAKLSAgICAgICAgZm9yIChpID0gMDsgaSA8IE5SX0NBUkRTOyBpKyspIHsKLSAgICAgICAgICAgICAgICAvKiBsb29rIGZvciBhIEN5Y2xhZGVzIGNhcmQgYnkgdmVuZG9yIGFuZCBkZXZpY2UgaWQgKi8KLSAgICAgICAgICAgICAgICB3aGlsZSgoZGV2aWNlX2lkID0gY3lfcGNpX2Rldl9pZFtkZXZfaW5kZXhdKSAhPSAwKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZigocGRldiA9IHBjaV9nZXRfZGV2aWNlKFBDSV9WRU5ET1JfSURfQ1lDTEFERVMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlX2lkLCBwZGV2KSkgPT0gTlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXZfaW5kZXgrKzsgICAgLyogdHJ5IG5leHQgZGV2aWNlIGlkICovCi0gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsgICAgICAgICAgLyogZm91bmQgYSBib2FyZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KKwlmb3IgKGkgPSAwOyBpIDwgTlJfQ0FSRFM7IGkrKykgeworCQkvKiBsb29rIGZvciBhIEN5Y2xhZGVzIGNhcmQgYnkgdmVuZG9yIGFuZCBkZXZpY2UgaWQgKi8KKwkJd2hpbGUgKChkZXZpY2VfaWQgPSBjeV9wY2lfZGV2X2lkW2Rldl9pbmRleF0pICE9IDApIHsKKwkJCWlmICgocGRldiA9IHBjaV9nZXRfZGV2aWNlKFBDSV9WRU5ET1JfSURfQ1lDTEFERVMsCisJCQkJCQkgICBkZXZpY2VfaWQsIHBkZXYpKSA9PSBOVUxMKSB7CisJCQkJZGV2X2luZGV4Kys7CS8qIHRyeSBuZXh0IGRld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25nKSBjeV9wY2lfcGh5czIpOwotICAgICAgICAgICAgICAgICAgICAgICAgaS0tOwotICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGlmKChjeV9uZXh0X2NoYW5uZWwrY3lfcGNpX25jaGFuKSA+IE5SX1BPUlRTKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoIkN5Y2xvbS1ZL1BDSSBmb3VuZCBhdCAweCVseCAiLAotCQkJICAgICh1bG9uZykgY3lfcGNpX3BoeXMyKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiYnV0IG5vIGNoYW5uZWxzIGFyZSBhdmFpbGFibGUuXG4iKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiQ2hhbmdlIE5SX1BPUlRTIGluIGN5Y2xhZGVzLmMgYW5kIHJlY29tcGlsZSBrZXJuZWwuXG4iKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybihpKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgLyogZmlsbCB0aGUgbmV4dCBjeV9jYXJkIHN0cnVjdHVyZSBhdmFpbGFibGUgKi8KLSAgICAgICAgICAgICAgICBmb3IgKGogPSAwIDsgaiA8IE5SX0NBUkRTIDsgaisrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3lfY2FyZFtqXS5iYXNlX2FkZHIgPT0gMCkgIGJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBpZiAoaiA9PSBOUl9DQVJEUykgeyAgICAvKiBubyBtb3JlIGN5X2NhcmRzIGF2YWlsYWJsZSAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJDeWNsb20tWS9QQ0kgZm91bmQgYXQgMHglbHggIiwKLQkJCSAgICAodWxvbmcpIGN5X3BjaV9waHlzMik7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcmlud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9IFpFX1YxX05QT1JUUzsKLQotICAgICAgICAgICAgICAgIGlmKChjeV9uZXh0X2NoYW5uZWwrY3lfcGNpX25jaGFuKSA+IE5SX1BPUlRTKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoIkN5Y2xhZGVzLVplL1BDSSBmb3VuZCBhdCAweCVseCAiLAotCQkJICAgICh1bG9uZyljeV9wY2lfcGh5czIpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJidXQgbm8gY2hhbm5lbHMgYXJlIGF2YWlsYWJsZS5cbiIpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJDaGFuZ2UgTlJfUE9SVFMgaW4gY3ljbGFkZXMuYyBhbmQgcmVjb21waWxlIGtlcm5lbC5cbiIpOwotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuKGkpOwotICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgIC8qIGZpbGwgdGhlIG5leHQgY3lfY2FyZCBzdHJ1Y3R1cmUgYXZhaWxhYmxlICovCi0gICAgICAgICAgICAgICAgZm9yIChqID0gMCA7IGogPCBOUl9DQVJEUyA7IGorKykgewotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN5X2NhcmRbal0uYmFzZV9hZGRyID09IDApICBicmVhazsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgaWYgKGogPT0gTlJfQ0FSRFMpIHsgICAgLyogbm8gbW9yZSBjeV9jYXJkcyBhdmFpbGFibGUgKi8KLQkJICAgIHByaW50aygiQ3ljbGFkZXMtWmUvUENJIGZvdW5kIGF0IDB4JWx4ICIsCi0JCQkodWxvbmcpY3lfcGNpX3BoeXMyKTsKLQkJICAgIHByaW50aygiYnV0IG5vIG1vcmUgY2FyZHMgY2FuIGJlIHVzZWQuXG4iKTsKLSAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJDaGFuZ2UgTlJfQ0FSRFMgaW4gY3ljbGFkZXMuYyBhbmQgcmVjb21waWxlIGtlcm5lbC5cbiIpOwotCQkgICAgcmV0dXJuKGkpOwotICAgICAgICAgICAgICAgIH0KLQotI2lmZGVmIENPTkZJR19DWVpfSU5UUgotICAgICAgICAgICAgICAgIC8qIGFsbG9jYXRlIElSUSBvbmx5IGlmIGJvYXJkIGhhcyBhbiBJUlEgKi8KLQkJaWYoIChjeV9wY2lfaXJxICE9IDApICYmIChjeV9wY2lfaXJxICE9IDI1NSkgKSB7Ci0JCSAgICBpZihyZXF1ZXN0X2lycShjeV9wY2lfaXJxLCBjeXpfaW50ZXJydXB0LAotCQkJSVJRRl9TSEFSRUQsICJDeWNsYWRlcy1aIiwgJmN5X2NhcmRbal0pKQotCQkgICAgewotICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJDeWNsb20tWmUvUENJIGZvdW5kIGF0IDB4JWx4ICIsCi0JCQkgICAgKHVsb25nKSBjeV9wY2lfcGh5czIpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJidXQgY291bGQgbm90IGFsbG9jYXRlIElSUSVkLlxuIiwKLQkJCSAgICBjeV9wY2lfaXJxKTsKLQkJCXJldHVybihpKTsKLQkJICAgIH0KLQkJfQotI2VuZGlmIC8qIENPTkZJR19DWVpfSU5UUiAqLwotCi0gICAgICAgICAgICAgICAgLyogc2V0IGN5X2NhcmQgKi8KLSAgICAgICAgICAgICAgICBjeV9jYXJkW2pdLmJhc2VfcGh5cyA9IGN5X3BjaV9waHlzMjsKLSAgICAgICAgICAgICAgICBjeV9jYXJkW2pdLmN0bF9waHlzID0gY3lfcGNpX3BoeXMwOwotICAgICAgICAgICAgICAgIGN5X2NhcmRbal0uYmFzZV9hZGRyID0gY3lfcGNpX2FkZHIyOwotICAgICAgICAgICAgICAgIGN5X2NhcmRbal0uY3RsX2FkZHIgPSBjeV9wY2lfYWRkcjA7Ci0gICAgICAgICAgICAgICAgY3lfY2FyZFtqXS5pcnEgPSAoaW50KSBjeV9wY2lfaXJxOwotICA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ICAgICAgICAgICBwb3J0IDwgY2luZm8tPmZpcnN0X2xpbmUgKyBucG9ydHM7Ci0gICAgICAgICAgICAgICAgICAgICBwb3J0KyspCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBpbmZvID0gJmN5X3BvcnRbcG9ydF07Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPm1hZ2ljID0gQ1lDTEFERVNfTUFHSUM7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPnR5cGUgPSBQT1JUX1NUQVJURUNIOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT5jYXJkID0gYm9hcmQ7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmxpbmUgPSBwb3J0OwotCQkgICAgaW5mby0+Y2hpcF9yZXYgPSAwOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT5mbGFncyA9IFNURF9DT01fRkxBR1M7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPnR0eSA9IE5VTEw7Ci0JCSAgICBpZiAobWFpbGJveCA9PSBaT19WMSkKLQkJCWluZm8tPnhtaXRfZmlmb19zaXplID0gQ1laX0ZJRk9fU0laRTsKLQkJICAgIGVsc2UKLQkJCWluZm8tPnhtaXRfZmlmb19zaXplID0gNCAqIENZWl9GSUZPX1NJWkU7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmNvcjEgPSAwOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT5jb3IyID0gMDsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+Y29yMyA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmNvcjQgPSAwOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT5jb3I1ID0gMDsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+dGJwciA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPnRjbyA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPnJicHIgPSAwOwotICAgICAgICAgICAgICAgICAgICBpb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gaW5pdF93YWl0cXVldWVfaGVhZCgmaW5mby0+ZGVsdGFfbXNyX3dhaXQpOwotICAgICAgICAgICAgICAgICAgICAvKiBpbmZvLT5zZXNzaW9uICovCi0gICAgICAgICAgICAgICAgICAgIC8qIGluZm8tPnBncnAgKi8KLSAgICAgICAgICAgICAgICAgICAgaW5mby0+cmVhZF9zdGF0dXNfbWFzayA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIC8qIGluZm8tPnRpbWVvdXQgKi8KLQkJICAgIC8qIEJlbnRzb24ncyB2YXJzICovCi0gICAgICAgICAgICAgICAgICAgIGluZm8tPmppZmZpZXNbMF0gPSAwOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT5qaWZmaWVzWzFdID0gMDsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+amlmZmllc1syXSA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPnJmbHVzaF9jb3VudCA9IDA7CisJLyogaW52YWxpZGF0ZSByZW1haW5pbmcgY3lfY2FyZCBzdHJ1Y3R1cmVzICovCisJZm9yIChpID0gMDsgaSA8IE5SX0NBUkRTOyBpKyspIHsKKwkJaWYgKGN5X2NhcmRbaV0uYmFzZV9hZGRyID09IDApIHsKKwkJCWN5X2NhcmRbaV0uZmlyc3RfbGluZSA9IC0xOworCQkJY3lfY2FyZFtpXS5jdGxfYWRkciA9IE5VTEw7CisJCQljeV9jYXJkW2ldLmlycSA9IDA7CisJCQljeV9jYXJkW2ldLmJ1c19pbmRleCA9IDA7CisJCQljeV9jYXJkW2ldLmZpcnN0X2xpbmUgPSAwOworCQkJY3lfY2FyZFtpXS5udW1fY2hpcHMgPSAwOworCQl9CisJfQorCS8qIGludmFsaWRhdGUgcmVtYWluaW5nIGN5X3BvcnQgc3RydWN0dXJlcyAqLworCWZvciAoaSA9IGN5X25leHRfY2hhbm5lbDsgaSA8IE5SX1BPUlRTOyBpKyspIHsKKwkJY3lfcG9ydFtpXS5saW5lID0gLTE7CisJCWN5X3Bvcn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ICAgICB9ZWxzZXsgLyogQ3ljbG9tLVkgb2Ygc29tZSBraW5kKi8KLSAgICAgICAgICAgICAgICBpbmRleCA9IGNpbmZvLT5idXNfaW5kZXg7Ci0JCXNwaW5fbG9ja19pbml0KCZjaW5mby0+Y2FyZF9sb2NrKTsKLQkJY2luZm8tPm5wb3J0cyA9IEN5UE9SVFNfUEVSX0NISVAgKiBjaW5mby0+bnVtX2NoaXBzOwotICAgICAgICAgICAgICAgIGZvciAocG9ydCA9IGNpbmZvLT5maXJzdF9saW5lIDsKLSAgICAgICAgICAgICAgICAgICAgIHBvcnQgPCBjaW5mby0+Zmlyc3RfbGluZSArIGNpbmZvLT5ucG9ydHMgOwotICAgICAgICAgICAgICAgICAgICAgcG9ydCsrKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgaW5mbyA9ICZjeV9wb3J0W3BvcnRdOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT5tYWdpYyA9IENZQ0xBREVTX01BR0lDOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT50eXBlID0gUE9SVF9DSVJSVVM7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmNhcmQgPSBib2FyZDsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+bGluZSA9IHBvcnQ7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmZsYWdzID0gU1REX0NPTV9GTEFHUzsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+dHR5ID0gTlVMTDsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+eG1pdF9maWZvX3NpemUgPSBDeU1BWF9DSEFSX0ZJRk87Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmNvcjEgPSBDeVBBUklUWV9OT05FfEN5XzFfU1RPUHxDeV84X0JJVFM7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmNvcjIgPSBDeUVUQzsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+Y29yMyA9IDB4MDg7IC8qIF92ZXJ5XyBzbWFsbCByY3YgdGhyZXNob2xkICovCi0gICAgICAgICAgICAgICAgICAgIGluZm8tPmNvcjQgPSAwOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT5jb3I1ID0gMDsKLQkJICAgIGluZm8tPmN1c3RvbV9kaXZpc29yID0gMDsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+Y2xvc2VfZGVsYXkgPSA1KkhaLzEwOwotCQkgICAgaW5mby0+Y2xvc2luZ193YWl0ID0gQ0xPU0lOR19XQUlUX0RFTEFZOwotCQkgICAgaW5mby0+aWNvdW50LmN0cyA9IGluZm8tPmljb3VudC5kc3IgPSAKLQkJCWluZm8tPmljb3VudC5ybmcgPSBpbmZvLT5pY291bnQuZGNkID0gMDsKLQkJICAgIGluZm8tPmljb3VudC5yeCA9IGluZm8tPmljb3VudC50eCA9IDA7Ci0JCSAgICBpbmZvLT5pY291bnQuZnJhbWUgPSBpbmZvLT5pY291bnQucGFyaXR5ID0gMDsKLQkJICAgIGluZm8tPmljb3VudC5vdmVycnVuID0gaW5mby0+aWNvdW50LmJyayA9IDA7Ci0JCSAgICBjaGlwX251bWJlciA9IChwb3J0IC0gY2luZm8tPmZpcnN0X2xpbmUpIC8gNDsKLQkJICAgIGlmICgoaW5mby0+Y2hpcF9yZXYgPQotCQkJIGN5X3JlYWRiKGNpbmZvLT5iYXNlX2FkZHIgKwotCQkJCSAgKGN5X2NoaXBfb2Zmc2V0W2NoaXBfbnVtYmVyXTw8aW5kZXgpICsKLQkJCQkgIChDeUdGUkNSPDxpbmRleCkpKSA+PSBDRDE0MDBfUkVWX0opIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8qIEl0IGlzIGEgQ0QxNDAwIHJldi4gSiBvciBsYXRlciAqLwotICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+dGJwciA9IGJhdWRfYnByXzYwWzEzXTsgLyogVHggQlBSICovCi0gICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT50Y28gPSBiYXVkX2NvXzYwWzEzXTsgLyogVHggQ08gKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIGluZm8tPnJicHIgPSBiYXVkX2Jwcl82MFsxM107IC8qIFJ4IEJQUiAqLwotICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+cmNvID0gYmF1ZF9jb182MFsxM107IC8qIFJ4IENPICovCi0gICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT5yZmxvdyA9IDA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT5ydHNkdHJfaW52ID0gMTsKLSAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGluZm8tPnRicHIgPSBiYXVkX2Jwcl8yNVsxM107IC8qIFR4IEJQUiAqLwotICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+dGNvID0gYmF1ZF9jb18yNVsxM107IC8qIFR4IENPICovCi0gICAgICAgICAgICAgICAgICAgICAgICBpbmZvLT5yYnByID0gYmF1ZF9icHJfMjVbMTNdOyAvKiBSeCBCUFIgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIGluZm8tPnJjbyA9IGJhdWRfY29fMjVbMTNdOyAvKiBSeCBDTyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+cmZsb3cgPSAwOwotICAgICAgICAgICAgICAgICAgICAgICAgaW5mby0+cnRzZHRyX2ludiA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgaW5mby0+eF9jaGFyID0gMDsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+ZXZlbnQgPSAwOwotICAgICAgICAgICAgICAgICAgICBpbmZvLT5jb3VudCA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmJsb2NrZWRfb3BlbiA9IDA7Ci0gICAgICAgICAgICAgICAgICAgIGluZm8tPmRlZmF1bHRfdGhyZXNob2xkID0gMDsKLSAgICAgICAgICAgICAgICAgICAgaW5mby0+ZGVmYXVsdF90aW1lb3V0ID0gMDsKLQkJICAgIElOSVRfV09SSygmaW5mby0+dHF1ZXVlLCBkb19zb2Z0aW50LCBpbmZvKTsKLQkJICAgIGluaXRfd2FpdHF1ZXVlX2hlYWQoJmluZm8tPm9wZW5fd2FpdCk7Ci0JCSAgICBpbml0X3dhaXRxdWV1ZV9oZWFkKCZpbmZvLT5jbG9zZV93YWl0KTsKLQkJICAgIGluaXRfd2FpdHF1ZXVlX2hlYWQoJmluZm8tPnNodXRkb3duX3dhaXQpOwotCQkgICAgaW5pdF93YWl0cXVldWVfaGVhZCgmaW5mby0+ZGVsdGFfbXNyX3dhaXQpOwotICAgICAgICAgICAgICAgICAgICAvKiBpbmZvLT5zZXNzaW9uICovCi0gICAgICAgICAgICAgICAgICAgIC8qIGluZm8tPnBncnAgKi8KLSAgICAgICAgICAgICAgICAgICAgaW5mby0+cmVhZF9zdGF0dXNfbWFzayA9Ci0JCSAgICAgICAgICAgICAgICAgIEN5VElNRU9VVHwgQ3lTUEVDSEFSfCBDeUJSRUFLCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCBDeVBBUklUWXwgQ3lGUkFNRXwgQ3lPVkVSUlVOOwotICAgICAgICAgICAgICAgICAgICAvKiBpbmZvLT50aW1lb3V0ICovCi0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgIH0KKwkJCX0KKwkJCWNvbnRpbnVlOworCQl9IGVsc2UgewkvKiBDeWNsb20tWSBvZiBzb21lIGtpbmQgKi8KKwkJCWluZGV4ID0gY2luZm8tPmJ1c19pbmRleDsKKwkJCXNwaW5fbG9ja19pbml0KCZjaW5mby0+Y2FyZF9sb2NrKTsKKwkJCWNpbmZvLT5ucG9ydHMgPSBDeVBPUlRTX1BFUl9DSElQICogY2luZm8tPm51bV9jaGlwczsKKwkJCWZvciAocG9ydCA9IGNpbmZvLT5maXJzdF9saW5lOworCQkJICAgICBwb3J0IDwgY2luZm8tPmZpcnN0X2xpbmUg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RhcGUvY29tcHJlc3Nvci9senJ3My5jIGIvZHJpdmVycy9jaGFyL2Z0YXBlL2NvbXByZXNzb3IvbHpydzMuYwpkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggYTAzMmEwZS4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvZnRhcGUvY29tcHJlc3Nvci9senJ3My5jCisrKyAvZGV2L251bGwKQEAgLTEsNzQzICswLDAgQEAKLS8qCi0gKiAkU291cmNlOiAvaG9tZXMvY3ZzL2Z0YXBlLXN0YWNrZWQvZnRhcGUvY29tcHJlc3Nvci9senJ3My5jLHYgJAotICogJFJldmlzaW9uOiAxLjEgJAotICogJERhdGU6IDE5OTcvMTAvMDUgMTk6MTI6MjkgJAotICoKLSAqIEltcGxlbWVudGF0aW9uIG9mIFJvc3MgV2lsbGlhbXMgbHpydzMgYWxnb3JpdGhtLiBBZGFwdGlvbiBmb3IgemZ0YXBlLgotICoKLSAqLwotCi0jaW5jbHVkZSAiLi4vY29tcHJlc3Nvci9senJ3My5oIiAgICAgICAvKiBEZWZpbmVzIHNpbmdsZSBleHBvcnRlZCBmdW5jdGlvbiAiY29tcHJlc3MiLiAgICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMWlJXMy5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIEF1dGhvciAgOiBSb3NzIFdpbGxpYW1zLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBEYXRlICAgIDogMzAtSnVuLTE5OTEuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogUmVsZWFzZSA6IDEuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFRoaXMgZmlsZSBjb250YWlucyBhbiBpbXBsZW1lbnRhdGlvbiBvZiB0aGUgTFpSVzMgZGF0YSBjb21wcmVzc2lvbiAgICAgICAgICovCi0vKiBhbGdvcml0aG0gaW4gQy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFRoZSBhbGdvcml0aG0gaXMgYSBnZW5lcmFsIHB1cnBvc2UgY29tcHJlc3Npb24gYWxnb3JpdGhtIHRoYXQgcnVucyBmYXN0ICAgICovCi0vKiBhbmQgZ2l2ZXMgcmVhc29uYWJsZSBjb21wcmVzc2lvbi4gVGhlIGFsZ29yaXRobSBpcyBhIG1lbWJlciBvZiB0aGUgTGVtcGVsICAqLwotLyogWml2IGZhbWlseSBvZiBhbGdvcml0aG1zIGFuZCBiYXNlcyBpdHMgY29tcHJlc3Npb24gb24gdGhlIHByZXNlbmNlIGluIHRoZSAgKi8KLS8qIGRhdGEgb2YgcmVwZWF0ZWQgc3Vic3RyaW5ncy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogVGhpcyBhbGdvcml0aG0gaXMgdW5wYXRlbnRlZCBhbmQgdGhlIGNvZGUgaXMgcHVibGljIGRvbWFpbi4gQXMgdGhlICAgICAgICAgKi8KLS8qIGFsZ29yaXRobSBpcyBiYXNlZCBvbiB0aGUgTFo3NyBjbGFzcyBvZiBhbGdvcml0aG1zLCBpdCBpcyB1bmxpa2VseSB0byBiZSAgICovCi0vKiB0aGUgc3ViamVjdCBvZiBhIHBhdGVudCBjaGFsbGVuZ2UuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFVubGlrZSB0aGUgTFpSVzEgYW5kIExaUlcxLUEgYWxnb3JpdGhtcywgdGhlIExaUlczIGFsZ29yaXRobSBpcyAgICAgICAgICAgICovCi0vKiBkZXRlcm1pbmlzdGljIGFuZCBpcyBndWFyYW50ZWVkIHRvIHlpZWxkIHRoZSBzYW1lIGNvbXByZXNzZWQgICAgICAgICAgICAgICAqLwotLyogcmVwcmVzZW50YXRpb24gZm9yIGEgZ2l2ZW4gZmlsZSBlYWNoIHRpbWUgaXQgaXMgcnVuLiAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBUaGUgTFpSVzMgYWxnb3JpdGhtIHdhcyBvcmlnaW5hbGx5IGRlc2lnbmVkIGFuZCBpbXBsZW1lbnRlZCAgICAgICAgICAgICAgICAqLwotLyogYnkgUm9zcyBXaWxsaWFtcyBvbiAzMS1EZWMtMTk5MC4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBIZXJlIGFyZSB0aGUgcmVzdWx0cyBvZiBhcHBseWluZyB0aGlzIGNvZGUsIGNvbXBpbGVkIHVuZGVyIFRISU5LIEMgNC4wICAgICAqLwotLyogYW5kIHJ1bm5pbmcgb24gYSBNYWMtU0UgKDhNSHogNjgwMDApLCB0byB0aGUgc3RhbmRhcmQgY2FsZ2FyeSBjb3JwdXMuICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsgICAgICAqLwotLyogICAgfCBEQVRBIENPTVBSRVNTSU9OIFRFU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgKi8KLS8qICAgIHwgPT09PT09PT09PT09PT09PT09PT09ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICovCi0vKiAgICB8IFRpbWUgb2YgcnVuICAgICA6IFN1biAzMC1KdW4tMTk5MSAwOTozMVBNICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAqLwotLyogICAgfCBUaW1pbmcgYWNjdXJhY3kgOiBPbmUgcGFydCBpbiAxMDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgKi8KLS8qICAgIHwgQ29udGV4dCBsZW5ndGggIDogMjYyMTQ0IGJ5dGVzICg9IDI1Ni4wMDAwSykgICAgICAgICAgICAgICAgICAgfCAgICAgICovCi0vKiAgICB8IFRlc3Qgc3VpdGUgICAgICA6IENhbGdhcnkgQ29ycHVzIFN1aXRlICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAqLwotLyogICAgfCBGaWxlcyBpbiBzdWl0ZSAgOiAxNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgKi8KLS8qICAgIHwgQWxnb3JpdGhtICAgICAgIDogTFpSVzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICovCi0vKiAgICB8IE5vdGU6IEFsbCBhdmVyYWdlcyBhcmUgY2FsY3VsYXRlZCBmcm9tIHRoZSB1bi1yb3VuZGVkIHZhbHVlcy4gIHwgICAgICAqLwotLyogICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rICAgICAgKi8KLS8qICAgIHwgRmlsZSBOYW1lICAgTGVuZ3RoICBDeEIgIENvbUxlbiAgJVJlbW4gIEJpdHMgIENvbSBLL3MgIERlYyBLL3MgfCAgICAgICovCi0vKiAgICB8IC0tLS0tLS0tLS0gIC0tLS0tLSAgLS0tICAtLS0tLS0gIC0tLS0tICAtLS0tICAtLS0tLS0tICAtLS0tLS0tIHwgICAgICAqLwotLyogICAgfCBycHVzOkJpYi5EICAxMTEyNjEgICAgMSAgIDU1MDMzICAgNDkuNSAgMy45NiAgICAxOS40NiAgICAzMi4yNyB8ICAgICAgKi8KLS8qICAgIHwgdXM6Qm9vazEuRCAgNzY4NzcxICAg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ICAzLjE1ICAgIDI0LjM0ICAgIDQwLjY2IHwgICAgICAqLwotLyogICAgfCB1czpQcm9ncC5EICAgNDkzNzkgICAgMSAgIDE5Mzc3ICAgMzkuMiAgMy4xNCAgICAyMy45MSAgICAzOS4yMyB8ICAgICAgKi8KLS8qICAgIHwgdXM6VHJhbnMuRCAgIDkzNjk1ICAgIDEgICAzMzQ4MSAgIDM1LjcgIDIuODYgICAgMjUuNDggICAgNDAuMzcgfCAgICAgICovCi0vKiAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsgICAgICAqLwotLyogICAgfCBBdmVyYWdlICAgICAyMjQ0MDEgICAgMSAgMTEwOTUzICAgNTAuMCAgNC4wMCAgICAyMC4xNyAgICAzMi43MiB8ICAgICAgKi8KLS8qICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKyAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogVGhlIGZvbGxvd2luZyBzdHJ1Y3R1cmUgaXMgcmV0dXJuZWQgYnkgdGhlICJjb21wcmVzcyIgZnVuY3Rpb24gYmVsb3cgd2hlbiAgKi8KLS8qIHRoZSB1c2VyIGFza3MgdGhlIGZ1bmN0aW9uIHRvIHJldHVybiBpZGVudGlmeWluZyBpbmZvcm1hdGlvbi4gICAgICAgICAgICAgICovCi0vKiBUa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XVpcmVkLiAqLwotICJMWlJXMyIsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogTmFtZSBvZiBhbGdvcml0aG0uICAgICAgICAgICAgICAgKi8KLSAiMS4wIiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFZlcnNpb24gbnVtYmVyIG9mIGFsZ29yaXRobS4gICAgICovCi0gIjMxLURlYy0xOTkwIiwgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBEYXRlIG9mIGFsZ29yaXRobS4gICAgICAgICAgICAgICAqLwotICJQdWJsaWMgRG9tYWluIiwgICAgICAgICAgICAgICAgICAgICAgICAgLyogQ29weXJpZ2h0IG5vdGljZS4gICAgICAgICAgICAgICAgKi8KLSAiUm9zcyBOLiBXaWxsaWFtcyIsICAgICAgICAgICAgICAgICAgICAgIC8qIEF1dGhvciBvZiBhbGdvcml0aG0uICAgICAgICAgICAgICovCi0gIlJlbmFpc3NhbmNlIFNvZnR3YXJlIiwgICAgICAgICAgICAgICAgICAvKiBBZmZpbGlhdGlvbiBvZiBhdXRob3IuICAgICAgICAgICAqLwotICJQdWJsaWMgRG9tYWluIiAgICAgICAgICAgICAgICAgICAgICAgICAgLyogVmVuZG9yIG9mIGFsZ29yaXRobS4gICAgICAgICAgICAgKi8KLX07Ci0gCi1MT0NBTCB2b2lkIGNvbXByZXNzX2NvbXByZXNzICAoVUJZVEUgKixVQllURSAqLFVMT05HLFVCWVRFICosIExPTkcgKik7Ci1MT0NBTCB2b2lkIGNvbXByZXNzX2RlY29tcHJlc3MoVUJZVEUgKixVQllURSAqLExPTkcsIFVCWVRFICosIFVMT05HICopOwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiBUaGlzIGZ1bmN0aW9uIGlzIHRoZSBvbmx5IGZ1bmN0aW9uIGV4cG9ydGVkIGJ5IHRoaXMgbW9kdWxlLiAg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RVNTOgotICAgICAgIGNvbXByZXNzX2NvbXByZXNzKHdya19tZW0sc3JjX2FkcixzcmNfbGVuLGRzdF9hZHIsKExPTkcgKilwX2RzdF9sZW4pOwotICAgICAgIGJyZWFrOwotICAgIGNhc2UgQ09NUFJFU1NfQUNUSU9OX0RFQ09NUFJFU1M6Ci0gICAgICAgY29tcHJlc3NfZGVjb21wcmVzcyh3cmtfbWVtLHNyY19hZHIsc3JjX2xlbixkc3RfYWRyLChMT05HICopcF9kc3RfbGVuKTsKLSAgICAgICBicmVhazsKLSAgIH0KLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBCUklFRiBERVNDUklQVElPTiBPRiBUSEUgTFpSVzMgQUxHT1JJVEhNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFRoZSBMWlJXMyBhbGdvcml0aG0gaXMgaWRlbnRpY2FsIHRvIHRoZSBMWlJXMS1BIGFsZ29yaXRobSBleGNlcHQgdGhhdCAgICAgICovCi0vKiBpbnN0ZWFkIG9mIHRyYW5zbWl0dGluZyBoaXN0b3J5IG9mZnNldHMsIGl0IHRyYW5zbWl0cyBoYXNoIHRhYmxlIGluZGV4ZXMuICAqLwotLyogSW4gb3JkZXIgdG8gZGVjb2RlIHRoZSBpbmRleGVzLCB0aGUgZGVjb21wcmVzc29yIG11c3QgbWFpbnRhaW4gYW4gICAgICAgICAgKi8KLS8qIGlkZW50aWNhbCBoYXNoIHRhYmxlLiBDb3B5IGl0ZW1zIGFyZSBzdHJhaWdodGZvcndhcmQ6d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zLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFJlcGxhY2VtZW50IG9mIG9mZnNldHMgYnkgaGFzaCB0YWJsZSBpbmRleGVzIHlpZWxkcyBhIGZldyBwZXJjZW50IGV4dHJhICAgICovCi0vKiBjb21wcmVzc2lvbiBhdCB0aGUgY29zdCBvZiBzb21lIHNwZWVkLiBMWlJXMyBpcyBzbG93ZXIgdGhhbiBMWlJXMSwgTFpSVzEtQSAqLwotLyogYW5kIExaUlcyLCBidXQgeWllbGRzIGJldHRlciBjb21wcmVzc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBFeHRyYSBjb21wcmVzc2lvbiBjb3VsZCBiZSBvYnRhaW5lZCBieSB1c2luZyBhIGhhc2ggdGFibGUgb2YgZGVwdGggdHdvLiAgICAqLwotLyogSG93ZXZlciwgaW5jcmVhc2luZyB0aGUgZGVwdGggYWJvdmUgb25lIGluY3VycyBhIHNpZ25pZmljYW50IGRlY3JlYXNlIGluICAgKi8KLS8qIGNvbXByZXNzaW9uIHNwZWVkIHdoaWNoIHdhcyBub3QgY29uc2lkZXJlZCB3b3J0aHdoaWxlLiBBbm90aGVyIHJlYXNvbiBmb3IgICovCi0vKiBrZWVwaW5nIHRoZSBkZXB0aCBkb3duIHRvIG9uZSB3YXMgdG8gYWxsb3cgZWFzeSBjb21wYXJpc29uIHdpdGggdGhlICAgICAgICAqLwotLyogTFpSVzEtQSBhbmQgTFpSVzIgYWxnb3JpdGhtcyBzbyBhcyB0byBkZW1vbnN0cmF0ZSB0aGUgZXhhY3QgZWZmZWN0IG9mIHRoZSAgKi8KLS8qIHVzZSBvZiBkaXJlY3QgaGFzaCBpbmRleGVzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKy0tLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHxfX198NDA5NSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8X19ffCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0qX3w8LS0tKyAgIC8tLS0tKy0tLVwgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgIHxfX198ICAgICstLS18SGFzaCAgICB8ICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8X19ffCAgICAgICAgfEZ1bmN0aW9ufCAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgfF9fX3wgICAgICAgIFwtLS0tLS0tLS8gICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgIHxfX198MCAgICAgICAgICAgIF4gICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICArLS0tKyAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgSGFzaCAgICAgICAgKy0tLS0tKyAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgIFRhYmxlICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgIHYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBeXl4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS18LS0tLS0tLS0tLS0tLS0tLSsgICAgICAgICAgICAgICovCi0vKiAgICAgIHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8fHx8ICAgICAgICAgICAgICAqLwotLyogICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLXwtLS0tLS0tLS0tLS0tLS0tKyAgICAgICAgICAgICAgKi8KLS8qICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8MS4uLi4uLjE4fCAgICAgIHwgICAgICAgICAgICAgICovCi0vKiAgICAgIHw8LS0tLS0tLSBMZW1wZWw9SGlzdG9yeSAtLS0tLS0tLS0tLS0+fDwtLVppdi0tPnwgICAgICB8ICAgICAgICAgICAgICAqLwotLyogICAgICB8ICAgICAoPWJ5dGVzIGFscmVhZHkgcHJvY2Vzc2VkKSAgICAgIHw8LVN0aWxsIHRvIGdvLS0+fCAgICAgICAgICAgICAgKi8KLS8qICAgICAgfDwtLS0tLS0tLS0tLS0tLS0tLS0tLSBJTlBVVCBCTE9DSyAtLS0tLS0tLS0tLS0tLS0tLS0tPnwgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogVGhlIGRpYWdyYW0gYWJvdmUgZm9yIExaUlczIGxvb2tzIGFsbW9zdCBpZGVudGljYWwgdG8gdGhlIGRpYWdyYW0gZm9yICAgICAgKi8KLS8qIExaUlcxLiBUaGUgZGlmZmVyZW5jZSBpcyB0aGF0IGluIExaUlczLCB0aGUgY29tcHJlc3NvciB0cmFuc21pdHMgaGFzaCAgICAgICovCi0vKiB0YWJsZSBpbmRpY2VzIGluc3RlYWQgb2YgTGVtcGVsIG9mZnNldHMuIEZvciB0aGlzIHRvIHdvcmssIHRoZSAgICAgICAgICAgICAqLwotLyogZGVjb21wcmVzc29yIG11c3QgbWFpbnRhaW4gYSBoYXNoIHRhYmxlIGFzIHdlbGwgYXMgdGhlIGNvbXByZXNzb3IgYW5kIGJvdGggKi8KLS8qIGNvbXByZXNzb3IgYW5kIGRlY29tcHJlc3NvciBtdXN0ICJidWZmZXIiIGxpdGVyYWxzLCBhcyB0aGUgZGVjb21wcmVzc29yICAgICovCi0vKiBjYW5ub3QgaGFzaCBwaHJhc2VzIGNvbW1lbmNpbmcgd2l0aCBhIGxpdGVyYWwgdW50aWwgYW5vdGhlciB0d28gYnl0ZXMgaGF2ZSAqLwotLyogYXJyaXZlZC4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgTFpSVzMgQWxnb3JpdGhtIEV4ZWN1dGlvbiBTdW1tYXJ5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAxLiBIYXN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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgREVGSU5JVElPTiBPRiBDT01QUkVTU0VEIEZJTEUgRk9STUFUICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAgICAgICAgICAgICAgICAgICAqLwotLyogICogQSBjb21wcmVzc2VkIGZpbGUgY29uc2lzdHMgb2YgYSBDT1BZIEZMQUcgZm9sbG93ZWQgYnkgYSBSRU1BSU5ERVIuICAgICAgKi8KLS8qICAqIFRoZSBjb3B5IGZsYWcgQ0YgdXNlcyB1cCBmb3VyIGJ5dGVzIHdpdGggdGhlIGZpcnN0IGJ5dGUgYmVpbmcgdGhlICAgICAgICovCi0vKiAgICBsZWFzdCBzaWduaWZpY2FudC4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICogSWYgQ0Y9MSwgdGhlbiB0aGUgY29tcHJlc3NlZCBmaWxlIHJlcHJlc2VudHMgdGhlIHJlbWFpbmRlciBvZiB0aGUgZmlsZSAgKi8KLS8qICAgIGV4YWN0bHkuIE90aGVyd2lzZSBDRj0wIGFuZCB0aGUgcmVtYWluZGVyIG9mIHRoZSBmaWxlIGNvbnNpc3RzIG9mIHplcm8gICovCi0vKiAgICBvciBtb3JlIEdST1VQUywgZWFjaCBvZiB3aGljaCByZXByZXNlbnRzIG9uZSBvciBtb3JlIGJ5dGVzLiAgICAgICAgICAgICAqLwotLyogICogRWFjaCBncm91cCBjb25zaXN0cyBvZiB0d28gYnl0ZXMgb2YgQ09OVFJPTCBpbmZvcm1hdGlvbiBmb2xsb3dlZCBieSAgICAgKi8KLS8qICAgIHNpeHRlZW4gSVRFTXMgZXhjZXB0IGZvciB0aGUgbGFzdCBncm91cCB3aGljaCBjYW4gY29udGFpbiBmcm9tIG9uZSAgICAgICovCi0vKiAgICB0byBzaXh0ZWVuIGl0ZW1zLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICogQW4gaXRlbSBjYW4gYmUgZWl0aGVyIGEgTElURVJBTCBpdGVtIG9yIGEgQ09QWSBpdGVtLiAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAqIEVhY2ggaXRlbSBjb3JyZXNwb25kcyB0byBhIGJpdCBpbiB0aGUgY29udHJvbCBieXRlcy4gICAgICAgICAgICAgICAgICAgICovCi0vKiAgKiBUaGUgZmlyc3QgY29udHJvbCBieXRlIGNvcnJlc3BvbmRzIHRvIHRoZSBmaXJzdCA4IGl0ZW1zIGluIHRoZSBncm91cCAgICAqLwotLyogICAgd2l0aCBiaXQgMCBjb3JyZXNwb25kaW5nIHRvIHRoZSBmaXJzdCBpdGVtIGluIHRoZSBncm91cCBhbmQgYml0IDcgdG8gICAgKi8KLS8qICAgIHRoZSBlaWdodGggaXRlbSBpbiB0aGUgZ3JvdXAuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgKiBUaGUgc2Vjb25kIGNvbnRyb2wgYnl0ZSBjb3JyZXNwb25kcyB0byB0aGUgc2Vjb25kIDggaXRlbXMgaW4gdGhlIGdyb3VwICAqLwotLyogICAgd2l0aCBiaXQgMCBjb3JyZXNwb25kaW5nIHRvIHRoZSBuaW50aCBpdGVtIGluIHRoZSBncm91cCBhbmQgYml0IDcgdG8gICAgKi8KLS8qICAgIHRoZSBzaXh0ZWVudGggaXRlbSBpbiB0aGUgZ3JvdXAuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgKiBBIHplcm8gYml0IGluIGEgY29udHJvbCB3b3JkIG1lYW5zIHRoYXQgdGhlIGNvcnJlc3BvbmRpbmcgaXRlbSBpcyBhICAgICAqLwotLyogICAgbGl0ZXJhbCBpdGVtLiBBIG9uZSBiaXQgY29ycmVzcG9uZHMgdG8gYSBjb3B5IGl0ZW0uICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAqIEEgbGl0ZXJhbCBpdGVtIGNvbnNpc3RzIG9mIGEgc2luZ2xlIGJ5dGUgd2hpY2ggcmVwcmVzZW50cyBpdHNlbGYuICAgICAgICovCi0vKiAgKiBBIGNvcHkgaXRlbSBjb25zaXN0cyBvZiB0d28gYnl0ZXMgdGhhdCByZXByZXNlbnQgZnJvbSAzIHRvIDE4IGJ5dGVzLiAgICAqLwotLyogICogVGhlIGZpcnN0ICBieXRlIGluIGEgY29weSBpdGVtIHdpbGwgYmUgZGVub3RlZCBDMS4gICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAqIFRoZSBzZWNvbmQgYnl0ZSBpbiBhIGNvcHkgaXRlbSB3aWxsIGJlIGRlbm90ZWQgQzIuICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgKiBCaXRzIHdpbGwgYmUgc2VsZWN0ZWQgdXNpbmcgc3F1YXJlIGJyYWNrZXRzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgRm9yIGV4YW1wbGU6IEMxWzAuLjNdIGlzIHRoZSBsb3cgbmliYmxlIG9mIHRoZSBmaXJzdCBjb250cm9sIGJ5dGUuICAgICAgKi8KLS8qICAgIG9mIGNvcHkgaXRlbSBDMS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgKiBUaGUgTEVOR1RIIG9mIGEgY29weSBpdGVtIGlzIGRlZmluZWQgdG8gYmUgQzFbMC4uM10rMyB3aGljaCBpcyBhIG51bWJlciAqLwotLyogICAgaW4gdGhlIHJhbmdlIFszLDE4XS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAqIFRoZSBJTkRFWCBvZiBhIGNvcHkgaXRlbSBpcyBkZWZpbmVkIHRvIGJlIEMxWzQuLjddKjI1NitDMlswLi44XSB3aGljaCAgICovCi0vKiAgICBpcyBhIG51bWJlciBpbiB0aGUgcmFuZ2UgWzAsNDA5NV0uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICogQSBjb3B5IGl0ZW0gcmVwcmVzZW50cyB0aGUgc2VxdWVuY2Ugb2YgYnl0ZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgIHRleHRbUE9TLU9GRlNFVC4uUE9TLU9GRlNFVCtMRU5HVEgtMV0gd2hlcmUgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICB0ZXh0ICAgaXMgdGhlIGVudGlyZSB0ZXh0IG9mIHRoZSB1bmNvbXByZXNzZWQgc3RyaW5nLiAgICAgICAgICAgICAqLwotLyogICAgICAgICAgUE9TICAgIGlzIHRoZSBpbmRleCBpbiB0aGUgdGV4dCBvZiB0aGUgY2hhcmFjdGVyIGZvbGxvd2luZyB0aGUgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgIHN0cmluZyByZXByZXNlbnRlZCBieSBhbGwgdGhlIGl0ZW1zIHByZWNlZWRpbmcgdGhlIGl0ZW0gICovCi0vKiAgICAgICAgICAgICAgICAgICBiZWluZyBkZWZpbmVkLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgT0ZGU0VUIGlzIG9idGFpbmVkIGZyb20gSU5ERVggYnkgbG9va2luZyB1cCB0aGUgaGFzaCB0YWJsZS4gICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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VyZSB3aXRoaW4gdGhlIGZpcnN0IHRocmVlIGJ5dGVzIGF1dG9tYXRpY2FsbHkgICAgKi8KLSAgICAgICAvKiByZXN1bHRzIGluIHRoZSBsaXRlcmFsIGJyYW5jaCBiZWluZyB0YWtlbi4gVGhlIGNvZGluZyBpcyBzaW1wbGUuICAgICovCi0gICAgICAgLyogcF96aXYgc2F2ZXMgcF9zcmMgc28gd2UgY2FuIGxldCBwX3NyYyB3YW5kZXIuICAgICAgICAgICAgICAgICAgICAgICAqLwotIyAgICAgICBkZWZpbmUgUFMgKnArKyE9KnBfc3JjKysKLSAgICAgICBwX3ppdj1wX3NyYzsKLSAgICAgICBpZiAoUFMgfHwgUFMgfHwgUFMpCi0gICAgICAgICB7Ci0gICAgICAgICAgLyogTGl0ZXJhbC4gKi8KLSAgICAgICAgICAKLSAgICAgICAgICAvKiBDb2RlIHRoZSBsaXRlcmFsIGJ5dGUgYXMgaXRzZWxmIGFuZCBhIHplcm8gY29udHJvbCBiaXQuICAgICAgICAgICovCi0gICAgICAgICAgcF9zcmM9cF96aXY7IGxpdGVyYWw6ICpwX2RzdCsrPSpwX3NyYysrOyBjb250cm9sJj0weEZGRkVGRkZGOwotICAgICAgICAgIAotICAgICAgICAgIC8qIFdlIGhhdmUganVzdCBjb2RlZCBhIGxpdGVyYWwuIElmIHdlIGhhZCB0d28gcGVuZGluZyBvbmVzLCB0aGF0ICAgKi8KLSAgICAgICAgICAvKiBtYWtlcyB0aHJlZSBhbmQgd2UgY2FuIHVwZGF0ZSB0aGUgaGFzaCB0YWJsZS4gICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgaWYgKHBfaDIhPTApCi0gICAgICAgICAgICAgeypwX2gyPXBfeml2LTI7fQotICAgICAgICAgICAgIAotICAgICAgICAgIC8qIEluIGFueSBjYXNlLCByb3RhdGUgdGhlIGhhc2ggdGFibGUgcG9pbnRlcnMgZm9yIG5leHQgdGltZS4gKi8KLSAgICAgICAgICBwX2gyPXBfaDE7IHB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Y29weSB3b3JkLiBXb3JrIG91dCBmcm9tIHdoZXJlIHRvIGNvcHkuICAgKi8KLSAgICAgICAgICBsZW5tdD0qcF9zcmMrKzsKLSAgICAgICAgICBwX2h0ZT0maGFzaFsoKGxlbm10JjB4RjApPDw0KXwqcF9zcmMrK107Ci0gICAgICAgICAgcD0qcF9odGU7Ci0gICAgICAgICAgbGVubXQmPTB4RjsKLSAgICAgICAgICAKLSAgICAgICAgICAvKiBOb3cgcGVyZm9ybSB0aGUgY29weSB1c2luZyBhIGhhbGYgdW5yb2xsZWQgbG9vcC4gKi8KLSAgICAgICAgICAqcF9kc3QrKz0qcCsrOwotICAgICAgICAgICpwX2RzdCsrPSpwKys7Ci0gICAgICAgICAgKnBfZHN0Kys9KnArKzsKLSAgICAgICAgICB3aGlsZSAobGVubXQtLSkKLSAgICAgICAgICAgICAqcF9kc3QrKz0qcCsrOwotICAgICAgICAgICAgICAgICAKLSAgICAgICAgICAvKiBCZWNhdXNlIHdlIGhhdmUganVzdCByZWNlaXZlZCAzIG9yIG1vcmUgYnl0ZXMgaW4gYSBjb3B5IGl0ZW0gICAgICovCi0gICAgICAgICAgLyogKHdob3NlIGJ5dGVzIHdlIGhhdmUganVzdCBpbnN0YWxsZWQgaW4gdGhlIG91dHB1dCksIHdlIGFyZSBub3cgICAqLwotICAgICAgICAgIC8qIGluIGEgcG9zaXRpb24gdG8gZmx1c2ggYWxsIHRoZSBwZW5kaW5nIGxpdGVyYWwgaGFzaGluZ3MgdGhhdCBoYWQgKi8KLSAgICAgICAgICAvKiBiZWVuIHBvc3Rwb25lZCBmb3IgbGFjayBvZiBieXRlcy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgaWYgKGxpdGVyYWxzPjApCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgcmVnaXN0ZXIgVUJZVEUgKnI9cF96aXYtbGl0ZXJhbHM7Ci0gICAgICAgICAgICAgaGFzaFtIQVNIKHIpXT1yOwotICAgICAgICAgICAgIGlmIChsaXRlcmFscz09MikKLSAgICAgICAgICAgICAgICB7cisrOyBoYXNoW0hBU0gocildPXI7fQotICAgICAgICAgICAgIGxpdGVyYWxzPTA7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICAKLSAgICAgICAgICAvKiBJbiBhbnkgY2FzZSwgd2UgY2FuIGltbWVkaWF0ZWx5IHVwZGF0ZSB0aGUgaGFzaCB0YWJsZSB3aXRoIHRoZSAgICovCi0gICAgICAgICAgLyogY3VycmVudCBwb3NpdGlvbi4gV2UgZG9uJ3QgbmVlZCB0byBkbyBhIEhBU0goLi4uKSB0byB3b3JrIG91dCAgICAqLwotICAgICAgICAgIC8qIHdoZXJlIHRvIHB1dCB0aGUgcG9pbnRlciwgYXMgdGhlIGNvbXByZXNzb3IganVzdCB0b2xkIHVzISEhICAgICAgKi8KLSAgICAgICAgICAqcF9odGU9cF96aXY7Ci0gICAgICAgICAgCi0gICAgICAgICB9Ci0gICAgICAgZWxzZQotICAgICAgICAgewotICAgICAgICAgIC8qIExpdGVyYWwgaXRlbS4gKi8KLSAgICAgICAgICAKLSAgICAgICAgICAvKiBDb3B5IG92ZXIgdGhlIGxpdGVyYWwgYnl0ZS4gKi8KLSAgICAgICAgICAqcF9kc3QrKz0qcF9zcmMrKzsKLSAgICAgICAgICAKLSAgICAgICAgICAvKiBJZiB3ZSBub3cgaGF2ZSB0aHJlZSBsaXRlcmFscyB3YWl0aW5nIHRvIGJlIGhhc2hlZCBpbnRvIHRoZSBoYXNoICovCi0gICAgICAgICAgLyogdGFibGUsIHdlIGNhbiBkbyBvbmUgb2YgdGhlbSBub3cgKGJlY2F1c2UgdGhlcmUgYXJlIHRocmVlKS4gICAgICAqLwotICAgICAgICAgIGlmICgrK2xpdGVyYWxzID09IDMpCi0gICAgICAgICAgICAge3JlZ2lzdGVyIFVCWVRFICpwPXBfZHN0LTM7IGhhc2hbSEFTSChwKV09cDsgbGl0ZXJhbHM9Mjt9Ci0gICAgICAgICB9Ci0gICAgICAgICAgCi0gICAgICAgLyogU2hpZnQgdGhlIGNvbnRyb2wgYnVmZmVyIHNvIHRoZSBuZXh0IGNvbnRyb2wgYml0IGlzIGluIGJpdCAwLiAqLwotICAgICAgIGNvbnRyb2w+Pj0xOwotI2lmIDEKLSAgICAgICBpZiAocF9kc3QgPiBwX2RzdF9wb3N0KSAKLSAgICAgICB7Ci0JICAgICAgIC8qIFNoaXQ6IHdlIHRyaWVkIHRvIGRlY29tcHJlc3MgY29ycnVwdCBkYXRhICovCi0JICAgICAgICpwX2RzdF9sZW4gPSAwOwotCSAgICAgICByZXR1cm47Ci0gICAgICAgfQotI2VuZGlmCi0gICAgICB9IC8qIEVuZCB1bnJvbGxlZCBpbm5lciBsb29wLiAqLwotICAgICAgICAgICAgICAgCi0gICB9IC8qIEVuZCBvZiBvdXRlciBsb29wICovCi0gICAKLSAvKiBXcml0ZSB0aGUgbGVuZ3RoIG9mIHRoZSBkZWNvbXByZXNzZWQgZGF0YSBiZWZvcmUgcmV0dXJuaW5nLiAqLwotICAqcF9kc3RfbGVuPXBfZHN0LXBfZHN0X2ZpcnN0OwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5kIG9mIExaUlczLkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCmRpZmYgLS1naXQgYS9kcml2ZXJzL2NoYXIvZnRhcGUvY29tcHJlc3Nvci9senJ3My5oIGIvZHJpdmVycy9jaGFyL2Z0YXBlL2NvbXByZXNzb3IvbHpydzMuaApkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggNTMzZmViYS4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvZnRhcGUvY29tcHJlc3Nvci9senJ3My5oCisrKyAvZGV2L251bGwKQEAgLTEsMjUzICswLDAgQEAKLSNpZm5kZWYgX0xaUlczX0gKLSNkZWZpbmUgX0xaUlczX0gKLS8qCi0gKiAkU291cmNlOiAvaG9tZXMvY3ZzL2Z0YXBlLXN0YWNrZWQvZnRhcGUvY29tcHJlc3Nvci9senJ3My5oLHYgJAotICogJFJldmlzaW9uOiAxLjEgJAotICogJERhdGU6IDE5OTcvMTAvMDUgMTk6MTI6MzAgJAotICoKLSAqICBpbmNsdWRlIGZpbGVzIGZvciBsenJ3My4gT25seSBzbGlnaHR5IG1vZGlmaWVkIGZyb20gdGhlIG9yaWdpbmFsCi0gKiAgdmVyc2lvbi4gQXNzZW1ibGVzIHRoZSB0aHJlZSBpbmNsdWRlIGZpbGVzIGNvbXByZXNzLmgsIHBvcnQuaCBhbmQKLSAqICBmYXN0Y29weS5oIGZyb20gdGhlIG9yaWdpbmFsIGx6cnczIHBhY2thZ2UuCi0gKgotICovCi0KLSNpbmNsdWRlIDxsaW51eC90eXBlcy5oPgotI2luY2x1ZGUgPGxpbnV4L3N0cmluZy5oPgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ09NUFJFU1MuSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBBdXRob3IgOiBSb3NzIFdpbGxpYW1zLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogRGF0ZSAgIDogRGVjZW1iZXIgMTk4OS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBUaGlzIGhlYWRlciBmaWxlIGRlZmluZXMgdGhlIGludGVyZmFjZSB0byBhIHNldCBvZiBmdW5jdGlvbnMgY2FsbGVkICAgICAgICAqLwotLyogJ2NvbXByZXNzJywgZWFjaCBtZW1iZXIgb2Ygd2hpY2ggaW1wbGVtZW50cyBhIHBhcnRpY3VsYXIgZGF0YSBjb21wcmVzc2lvbiAgKi8KLS8qIGFsZ29yaXRobS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogTm9ybWFsbHkgaW4gQyBwcm9ncmFtbWluZywgZm9yIGVhY2ggLkggZmlsZSwgdGhlcmUgaXMgYSBjb3JyZXNwb25kaW5nIC5DICAgKi8KLS8qIGZpbGUgdGhhdCBpbXBsZW1lbnRzIHRoZSBmdW5jdGlvbnMgcHJvbWlzZWQgaW4gdGhlIC5IIGZpbGUuICAgICAgICAgICAgICAgICovCi0vKiBIZXJlLCB0aGVyZSBhcmUgbWFueSAuQyBmaWxlcyBjb3JyZXNwb25kaW5nIHRvIHRoaXMgaGVhZGVyIGZpbGUuICAgICAgICAgICAqLwotLyogRWFjaCBjb21mb3JtaW5nIGltcGxlbWVudGF0aW9uIGZpbGUgY29udGFpbnMgYSBzaW5nbGUgZnVuY3Rpb24gICAgICAgICAgICAgKi8KLS8qIGNhbGxlZCAnY29tcHJlc3MnIHRoYXQgaW1wbGVtZW50cyBhIHNpbmdsZSBkYXRhIGNvbXByZXNzaW9uICAgICAgICAgICAgICAgICovCi0vKiBhbGdvcml0aG0gdGhhdCBjb25mb3JtcyB3aXRoIHRoZSBpbnRlcmZhY2Ugc3BlY2lmaWVkIGluIHRoaXMgaGVhZGVyIGZpbGUuICAqLwotLyogT25seSBvbmUgYWxnb3JpdGhtIGNhbiBiZSBsaW5rZWQgaW4gYXQgYSB0aW1lIGluIHRoaXMgb3JnYW5pemF0aW9uLiAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICBERUZJTklUSU9OIE9GIEZVTkNUSU9OIENPTVBSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFN1bW1hcnkgb2YgRnVuY3Rpb24gQ29tcHJlc3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogVGhlIGFjdGlvbiB0aGF0ICdjb21wcmVzcycgdGFrZXMgZGVwZW5kcyBvbiBpdHMgZmlyc3QgYXJndW1lbnQgY2FsbGVkICAgICAgKi8KLS8qICdhY3Rpb24nLiAgVGhlIGZ1bmN0aW9uIHByb3ZpZGVzIHRocmVlIGFjdGlvbnM6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgLSBSZXR1cm4gaW5mb3JtYXRpb24gYWJvdXQgdGhlIGFsZ29yaXRobS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgIC0gQ29tcHJlc3MgICBhIGJsb2NrIG9mIG1lbW9yeS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAtIERlY29tcHJlc3MgYSBibG9jayBvZiBtZW1vcnkuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFBhcmFtZXRlcnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAtLS0tLS0tLS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogU2VlIHRoZSBmb3JtYWwgQyBkZWZpbml0aW9uIGxhdGVyIGZvciBhIGRlc2NyaXB0aW9uIG9mIHRoZSBwYXJhbWV0ZXJzLiAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBDb25zdGFudHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogLS0tLS0tLS0tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIENPTVBSRVNTX09WRVJSVU46IFRoZSBjb25zdGFudCBDT01QUkVTU19PVkVSUlVOIGRlZmluZXMgYnkgaG93IG1hbnkgYnl0ZXMgICovCi0vKiBhbiBhbGdvcml0aG0gaXMgYWxsb3dlZCB0byBleHBhbmQgYSBibG9jayBkdXJpbmcgYSBjb21wcmVzc2lvbiBvcGVyYXRpb24uICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIEFsdGhvdWdoIGNvbXByZXNzaW9uIGFsZ29yaXRobXMgdXN1YWxseSBjb21wcmVzcyBkYXRhLCB0aGVyZSB3aWxsIGFsd2F5cyAgICovCi0vKiBiZSBkYXRhIHRoYXQgYSBnaXZlbiBjb21wcmVzc29yIHdpbGwgZXhwYW5kICh0aGlzIGNhbiBiZSBwcm92ZW4pLiAgICAgICAgICAqLwotLyogRm9ydHVuYXRlbHksIHRoZSBkZWdyZWUgb2YgZXhwYW5zaW9uIGNhbiBiZSBsaW1pdGVkIHRvIGEgc2luZ2xlIGJpdCwgYnkgICAgKi8KLS8qIGNvcHlpbmcgb3ZlciB0aGUgaW5wdXQgZGF0YSBpZiB0aGUgZGF0YSBnZXRzIGJpZ2dlciBkdXJpbmcgY29tcHJlc3Npb24uICAgICovCi0vKiBUbyBhbGxvdyBmb3IgdGhpcyBwb3NzaWJpbGl0eSwgdGhlIGZpcnN0IGJpdCBvZiBhIGNvbXByZXNzZWQgICAgICAgICAgICAgICAqLwotLyogcmVwcmVzZW50YXRpb24gY2FuIGJlIHVzZWQgYXMgYSBmbGFnIGluZGljYXRpbmcgd2hldGhlciB0aGUgICAgICAgICAgICAgICAgKi8KLS8qIGlucHV0IGRhdGEgd2FzIGNvcGllZCBvdmVyLCBvciB0cnVseSBjb21wcmVzc2VkLiBJbiBwcmFjdGljZSwgdGhlIGZpcnN0ICAgICovCi0vKiBieXRlIHdvdWxkIGJlIHVzZWQgdG8gc3RvcmUgdGhpcyBiaXQgc28gYXMgdG8gbWFpbnRhaW4gYnl0ZSBhbGlnbm1lbnQuICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFVuZm9ydHVuYXRlbHksIGluIGdlbmVyYWwsIHRoZSBvbmx5IHdheSB0byB0ZWxsIGlmIGFuIGFsZ29yaXRobSB3aWxsICAgICAgICovCi0vKiBleHBhbmQgYSBwYXJ0aWN1bGFyIGJsb2NrIG9mIGRhdGEgaXMgdG8gcnVuIHRoZSBhbGdvcml0aG0gb24gdGhlIGRhdGEuICAgICAqLwotLyogSWYgdGhlIGFsZ29yaXRobSBkb2VzIG5vdCBjb250aW51b3VzbHkgbW9uaXRvciBob3cgbWFueSBvdXRwdXQgYnl0ZXMgaXQgICAgKi8KLS8qIGhhcyB3cml0dGVuLCBpdCBtaWdodCB3cml0ZSBhbiBvdXRwdXQgYmxvY2sgZmFyIGxhcmdlciB0aGFuIHRoZSBpbnB1dCAgICAgICovCi0vKiBibG9jayBiZWZvcmUgcmVhbGl6aW5nIHRoYXQgaXQgaGFzIGRvbmUgc28uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogT24gdGhlIG90aGVyIGhhbmQsIGNvbnRpbnVvdXMgY2hlY2tzIG9uIG91dHB1dCBsZW5ndGggYXJlIGluZWZmaWNpZW50LiAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBUbyBjYXRlciBmb3IgYWxsIHRoZXNlIHByb2JsZW1zLCB0aGlzIGludGVyZmFjZSBkZWZpbml0aW9uOiAgICAgICAgICAgICAgICAqLwotLyogPiBBbGxvd3MgYSBjb21wcmVzc2lvbiBhbGdvcml0aG0gdG8gcmV0dXJuIGFuIG91dHB1dCBibG9jayB0aGF0IGlzIHVwIHRvICAgKi8KLS8qICAgQ09NUFJFU1NfT1ZFUlJVTiBieXRlcyBsb25nZXIgdGhhbiB0aGUgaW5wdXQgYmxvY2suICAgICAgICAgICAgICAgICAgICAgICovCi0vKiA+IEFsbG93cyBhIGNvbXByZXNzaW9uIGFsZ29yaXRobSB0byB3cml0ZSB1cCB0byBDT01QUkVTU19PVkVSUlVOIGJ5dGVzICAgICAqLwotLyogICBtb3JlIHRoYW4gdGhlIGxlbmd0aCBvZiB0aGUgaW5wdXQgYmxvY2sgdG8gdGhlIG1lbW9yeSBvZiB0aGUgb3V0cHV0ICAgICAgKi8KLS8qICAgYmxvY2sgcmVnYXJkbGVzcyBvZiB0aGUgbGVuZ3RoIG9mIHRoZSBvdXRwdXQgYmxvY2sgZXZlbnR1YWxseSByZXR1cm5lZC4gICovCi0vKiAgIFRoaXMgYWxsb3dzIGFuIGFsZ29yaXRobSB0byBvdmVycnVuIHRoZSBsZW5ndGggb2YgdGhlIGlucHV0IGJsb2NrIGluIHRoZSAqLwotLyogICBvdXRwdXQgYmxvY2sgYnkgdXAgdG8gQ09NUFJFU1NfT1ZFUlJVTiBieXRlcyBiZXR3ZWVuIGV4cGFuc2lvbiBjaGVja3MuICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiBUaGUgcHJvYmxlbSBkb2VzIG5vdCBhcmlzZSBmb3IgZGVjb21wcmVzc2lvbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIElkZW50aXR5IEFjdGlvbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAtLS0tLS0tLS0tLS0tLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogPiBhY3Rpb24gbXVzdCBiZSBDT01QUkVTU19BQ1RJT05fSURFTlRJVFkuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qID4gcF9kc3RfbGVuIG11c3QgcG9pbnQgdG8gYSBsb25nd29yZCB0byByZWNlaXZlIGEgbG9uZ3dvcmQgYWRkcmVzcy4gICAgICAgICovCi0vKiA+IFRoZSB2YWx1ZSBvZiB0aGUgb3RoZXIgcGFyYW1ldGVycyBkb2VzIG5vdCBtYXR0ZXIuICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogPiBBZnRlciBleGVjdXRpb24sIHRoZSBsb25nd29yZCB0aGF0IHBfZHN0X2xlbiBwb2ludHMgdG8gd2lsbCBiZSBhIHBvaW50ZXIgKi8KLS8qICAgdG8gYSBzdHJ1Y3R1cmUgb2YgdHlwZSBjb21wcmVzc19pZGVudGl0eS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgIFRodXMsIGZvciBleGFtcGxlLCBhZnRlciB0aGUgY2FsbCwgKCpwX2RzdF9sZW4pLT5tZW1vcnkgd2lsbCByZXR1cm4gdGhlICAqLwotLyogICBudW1iZXIgb2YgYnl0ZXMgb2Ygd29ya2luZyBtZW1vcnkgdGhhdCB0aGUgYWxnb3JpdGhtIHJlcXVpcmVzIHRvIHJ1bi4gICAgKi8KLS8qID4gVGhlIHZhbHVlcyBvZiB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3MsIG9ubHkgd3JpdHRlbi4gICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogPiBUaGUgdmFsdWUgb2YgZHN0X2xlbiBpcyBkZWZpbmVkIG9ubHkgdXBvbiB0ZXJtaW5hdGlvbi4gICAgICAgICAgICAgICAgICAgKi8KLS8qID4gVGhlIE9VVFBVVCBCTE9DSyBpcyBkZWZpbmVkIHRvIGJlIE1lbW9yeVtkc3RfYWRkcixkc3RfYWRkcitkc3RfbGVuLTFdLiAgICovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogQ29tcHJlc3Npb24gQWN0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIC0tLS0tLS0tLS0tLS0tLS0tLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiA+IGFjdGlvbiBtdXN0IGJlIENPTVBSRVNTX0FDVElPTl9DT01QUkVTUy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogPiBzcmNfbGVuIG11c3QgYmUgaW4gdGhlIHJhbmdlIFswLENPTVBSRVNTX01BWF9PUkddLiAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qID4gVGhlIE9VVFBVVCBaT05FIGlzIGRlZmluZWQgdG8gYmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAgICAgIE1lbW9yeVtkc3RfYWRkcixkc3RfYWRkcitzcmNfbGVuLTErQ09NUFJFU1NfT1ZFUlJVTl0uICAgICAgICAgICAgICAgICAqLwotLyogPiBUaGUgZnVuY3Rpb24gY2FuIG1vZGlmeSBhbnkgcGFydCBvZiB0aGUgb3V0cHV0IHpvbmUgcmVnYXJkbGVzcyBvZiB0aGUgICAgKi8KLS8qICAgZmluYWwgbGVuZ3RoIG9mIHRoZSBvdXRwdXQgYmxvY2suICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiA+IFRoZSBpbnB1dCBibG9jayBhbmQgdGhlIG91dHB1dCB6b25lIG11c3Qgbm90IG92ZXJsYXAuICAgICAgICAgICAgICAgICAgICAqLwotLyogPiBkc3RfbGVuIHdpbGwgYmUgaW4gdGhlIHJhbmdlIFswLHNyY19sZW4rQ09NUFJFU1NfT1ZFUlJVTl0uICAgICAgICAgICAgICAgKi8KLS8qID4gZHN0X2xlbiB3aWxsIGJlIGluIHRoZSByYW5nZSBbMCxDT01QUkVTU19NQVhfQ09NXSAoZnJvbSBwcmV2IGZhY3QpLiAgICAgICovCi0vKiA+IFRoZSBvdXRwdXQgYmxvY2sgd2lsbCBjb25zaXN0IG9mIGEgcmVwcmVzZW50YXRpb24gb2YgdGhlIGlucHV0IGJsb2NrLiAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIERlY29tcHJlc3Npb24gQWN0aW9uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKiAtLS0tLS0tLS0tLS0tLS0tLS0tLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogPiBhY3Rpb24gbXVzdCBiZSBDT01QUkVTU19BQ1RJT05fREVDT01QUkVTUy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qID4gVGhlIGlucHV0IGJsb2NrIG11c3QgYmUgdGhlIHJlc3VsdCBvZiBhbiBlYXJsaWVyIGNvbXByZXNzaW9uIG9wZXJhdGlvbi4gICovCi0vKiA+IElmIHRoZSBwcmV2aW91cyBmYWN0IGlzIHRydWUsIHRoZSBmb2xsb3dpbmcgZmFjdHMgbXVzdCBhbHNvIGJlIHRydWU6ICAgICAqLwotLyogICA+IHNyY19sZW4gd2lsbCBiZSBpbiB0aGUgcmFuZ2UgWzAsQ09NUFJFU1NfTUFYX0NPTV0uICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgPiBkc3RfbGVuIHdpbGwgYmUgaW4gdGhlIHJhbmdlIFswLENPTVBSRVNTX01BWF9PUkddLiAgICAgICAgICAgICAgICAgICAgICovCi0vKiA+IFRoZSBpbnB1dCBhbmQgb3V0cHV0IGJsb2NrcyBtdXN0IG5vdCBvdmVybGFwLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogPiBPbmx5IHRoZSBvdXRwdXQgYmxvY2sgaXMgbW9kaWZpZWQuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qID4gVXBvbiB0ZXJtaW5hdGlvbiwgdGhlIG91dHB1dCBibG9jayB3aWxsIGNvbnNpc3Qgb2YgdGhlIGJ5dGVzIGNvbnRhaW5lZCAgICovCi0vKiAgIGluIHRoZSBpbnB1dCBibG9jayBwYXNzZWQgdG8gdGhlIGVhcmxpZXIgY29tcHJlc3Npb24gb3BlcmF0aW9uLiAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQT1JULkggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFRoaXMgbW9kdWxlIGNvbnRhaW5zIG1hY3JvIGRlZmluaXRpb25zIGFuZCB0eXBlcyB0aGF0IGFyZSBsaWtlbHkgdG8gICAgICAgICovCi0vKiBjaGFuZ2UgYmV0d2VlbiBjb21wdXRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNpZm5kZWYgRE9ORV9QT1JUICAgICAgIC8qIE9ubHkgZG8gdGhpcyBpZiBub3QgcHJldmlvdXNseSBkb25lLiAgICAgICAgICAgICAgICovCi0KLSAgICNpZmRlZiBUSElOS19DCi0gICAgICAjZGVmaW5lIFVCWVRFIHVuc2lnbmVkIGNoYXIgICAgICAvKiBVbnNpZ25lZCBieXRlICAgICAgICAgICAgICAgICAgICAgICAqLwotICAgICAgI2RlZmluZSBVV09SRCB1bnNpZ25lZCBpbnQgICAgICAgLyogVW5zaWduZWQgd29yZCAoMiBieXRlcykgICAgICAgICAgICAgKi8KLSAgICAgICNkZWZpbmUgVUxPTkcgdW5zaWduZWQgbG9uZyAgICAgIC8qIFVuc2lnbmVkIHdvcmQgKDQgYnl0ZXMpICAgICAgICAgICAgICovCi0gICAgICAjZGVmaW5lIEJPT0wgIHVuc2lnbmVkIGNoYXIgICAgICAvKiBCb29sZWFuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotICAgICAgI2RlZmluZSBGT1BFTl9CSU5BUllfUkVBRCAgInJiIiAgLyogTW9kZSBzdHJpbmcgZm9yIGJpbmFyeSByZWFkaW5nLiAgICAgKi8KLSAgICAgICNkZWZpbmUgRk9QRU5fQklOQVJZX1dSSVRFICJ3YiIgIC8qIE1vZGUgc3RyaW5nIGZvciBiaW5hcnkgd3JpdGluZy4gICAgICovCi0gICAgICAjZGVmaW5lIEZPUEVOX1RFWFRfQVBQRU5EICAiYSIgICAvKiBNb2RlIHN0cmluZyBmb3IgdGV4dCBhcHBlbmRpbmcuICAgICAqLwotICAgICAgI2RlZmluZSBSRUFMIGRvdWJsZSAgICAgICAgICAgICAgLyogVVNlZCBmb3IgZmxvYXRpbmcgcG9pbnQgc3R1ZmYuICAgICAgKi8KLSAgICNlbmRpZgotICAgI2lmIGRlZmluZWQoTElOVVgpIHx8IGRlZmluZWQobGludXgpCi0gICAgICAjZGVmaW5lIFVCWVRFIF9fdTggICAgICAgICAgICAgICAvKiBVbnNpZ25lZCBieXRlICAgICAgICAgICAgICAgICAgICAgICAqLwotICAgICAgI2RlZmluZSBVV09SRCBfX3UxNiAgICAgICAgICAgICAgLyogVW5zaWduZWQgd29yZCAoMiBieXRlcykgICAgICAgICAgICAgKi8KLSAgICAgICNkZWZpbmUgVUxPTkcgX191MzIgICAgICAgICAgICAgIC8qIFVuc2lnbmVkIHdvcmQgKDQgYnl0ZXMpICAgICAgICAgICAgICovCi0gICAgICAjZGVmaW5lIExPTkcgIF9fczMyICAgICAgICAgICAgICAvKiBTaWduZWQgICB3b3JkICg0IGJ5dGVzKSAgICAgICAgICAgICAqLwotICAgICAgI2RlZmluZSBCT09MICBpcyBub3QgdXNlZCBoZXJlICAgLyogQm9vbGVhbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICNkZWZpbmUgRk9QRU5fQklOQVJZX1JFQUQgIG5vdCB1c2VkICAvKiBNb2RlIHN0cmluZyBmb3IgYmluYXJ5IHJlYWRpbmcuICovCi0gICAgICAjZGVmaW5lIEZPUEVOX0JJTkFSWV9XUklURSBub3QgdXNlZCAgLyogTW9kZSBzdHJpbmcgZm9yIGJpbmFyeSB3cml0aW5nLiAqLwotICAgICAgI2RlZmluZSBGT1BFTl9URVhUX0FQUEVORCAgbm90IHVzZWQgIC8qIE1vZGUgc3RyaW5nIGZvciB0ZXh0IGFwcGVuZGluZy4gKi8KLSAgICAgICNkZWZpbmUgUkVBTCBub3QgdXNlZCAgICAgICAgICAgICAgICAvKiBVU2VkIGZvciBmbG9hdGluZyBwb2ludCBzdHVmZi4gICovCi0gICAgICAjaWZuZGVmIFRSVUUKLSAgICAgICNkZWZpbmUgVFJVRSAxCi0gICAgICAjZW5kaWYKLSAgICNlbmRpZgotCi0gICAjZGVmaW5lIERPTkVfUE9SVCAgICAgICAgICAgICAgICAgICAvKiBEb24ndCBkbyBhbGwgdGhpcyBhZ2Fpbi4gICAgICAgICAgICAqLwotICAgI2RlZmluZSBNQUxMT0NfRkFJTCBOVUxMICAgICAgICAgICAgLyogRmFpbHVyZSBzdGF0dXMgZnJvbSBtYWxsb2MoKSAgICAgICAgKi8KLSAgICNkZWZpbmUgTE9DQUwgc3RhdGljICAgICAgICAgICAgICAgIC8qIEZvciBub24tZXhwb3J0ZWQgcm91dGluZXMuICAgICAgICAgICovCi0gICAjZGVmaW5lIEVYUE9SVCAgICAgICAgICAgICAgICAgICAgICAvKiBTaWduYWxzIGV4cG9ydGVkIGZ1bmN0aW9uLiAgICAgICAgICAqLwotICAgI2RlZmluZSB0aGVuICAgICAgICAgICAgICAgICAgICAgICAgLyogVXNlZnVsIGZvciBhbGlnbmluZyBpZnMuICAgICAgICAgICAgKi8KLQotI2VuZGlmCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVuZCBvZiBQT1JULkggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2RlZmluZSBDT01QUkVTU19BQ1RJT05fSURFTlRJVFkgICAwCi0jZGVmaW5lIENPTVBSRVNTX0FDVElPTl9DT01QUkVTUyAgIDEKLSNkZWZpbmUgQ09NUFJFU1NfQUNUSU9OX0RFQ09NUFJFU1MgMgotCi0jZGVmaW5lIENPTVBSRVNTX09WRVJSVU4gMTAyNAotI2RlZmluZSBDT01QUkVTU19NQVhfQ09NIDB4NzAwMDAwMDAKLSNkZWZpbmUgQ09NUFJFU1NfTUFYX09SRyAoQ09NUFJFU1NfTUFYX0NPTS1DT01QUkVTU19PVkVSUlVOKQotCi0jZGVmaW5lIENPTVBSRVNTX01BWF9TVFJMRU4gMjU1Ci0KLS8qIFRoZSBmb2xsb3dpbmcgc3RydWN0dXJlIHByb3ZpZGVzIGluZm9ybWF0aW9uIGFib3V0IHRoZSBhbGdvcml0aG0uICAgICAgICAgKi8KLS8qID4gVGhlIHRvcCBiaXQgb2YgaWQgbXVzdCBiZSB6ZXJvLiBUaGUgcmVtYWluaW5nIGJpdHMgbXVzdCBiZSBjaG9zZW4gYnkgICAgKi8KLS8qICAgdGhlIGF1dGhvciBvZiB0aGUgYWxnb3JpdGhtIGJ5IHRvc3NpbmcgYSBjb2luIDMxIHRpbWVzLiAgICAgICAgICAgICAgICAgKi8KLS8qID4gVGhlIGFtb3VudCBvZiBtZW1vcnkgcmVxdWVzdGVkIGJ5IHRoZSBhbGdvcml0aG0gaXMgc3BlY2lmaWVkIGluIGJ5dGVzICAgKi8KLS8qICAgYW5kIG11c3QgYmUgaW4gdGhlIHJhbmdlIFswLDB4NzAwMDAwMDBdLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qID4gQWxsIHN0cmluZ3MgcyBtdXN0IGJlIHN1Y2ggdGhhdCBzdHJsZW4ocyk8PUNPTVBSRVNTX01BWF9TVFJMRU4uICAgICAgICAgKi8KLXN0cnVjdCBjb21wcmVzc19pZGVudGl0eQotICB7Ci0gICBVTE9ORyBpZDsgICAgICAgICAgIC8qIElkZW50aWZ5aW5nIG51bWJlciBvZiBhbGdvcml0aG0uICAgICAgICAgICAgKi8KLSAgIFVMT05HIG1lbW9yeTsgICAgICAgLyogTnVtYmVyIG9mIGJ5dGVzIG9mIHdvcmtpbmcgbWVtb3J5IHJlcXVpcmVkLiAqLwotCi0gICBjaGFyICAqbmFtZTsgICAgICAgIC8qIE5hbWUgb2YgYWxnb3JpdGhtLiAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgIGNoYXIgICp2ZXJzaW9uOyAgICAgLyogVmVyc2lvbiBudW1iZXIuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotICAgY2hhciAgKmRhdGU7ICAgICAgICAvKiBEYXRlIG9mIHJlbGVhc2Ugb2YgdGhpcyB2ZXJzaW9uLiAgICAgICAgICAgICovCi0gICBjaGFyICAqY29weXJpZ2h0OyAgIC8qIENvcHlyaWdodCBtZXNzYWdlLiAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQotICAgY2hhciAgKmF1dGhvcjsgICAgICAvKiBBdXRob3Igb2YgYWxnb3JpdGhtLiAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICBjaGFyICAqYWZmaWxpYXRpb247IC8qIEFmZmlsaWF0aW9uIG9mIGF1dGhvci4gICAgICAgICAgICAgICAgICAgICAgKi8KLSAgIGNoYXIgICp2ZW5kb3I7ICAgICAgLyogV2hlcmUgdGhlIGFsZ29yaXRobSBjYW4gYmUgb2J0YWluZWQuICAgICAgICAqLwotICB9OwotCi12b2lkICBsenJ3M19jb21wcmVzcyggICAgICAgIC8qIFNpbmdsZSBmdW5jdGlvbiBpbnRlcmZhY2UgdG8gY29tcHJlc3Npb24gYWxnb3JpdGhtLiAqLwotVVdPUkQgICAgIGFjdGlvbiwgICAgICAvKiBBY3Rpb24gdG8gYmUgcGVyZm9ybWVkLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLVVCWVRFICAgKndya19tZW0sICAgICAgLyogV29ya2luZyBtZW1vcnkgdGVtcG9yYXJpbHkgZ2l2ZW4gdG8gcm91dGluZSB0byB1c2UuICovCi1VQllURSAgICpzcmNfYWRyLCAgICAgIC8qIEFkZHJlc3Mgb2YgaW5wdXQgIGRhdGEuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotTE9ORyAgICAgc3JjX2xlbiwgICAgICAvKiBMZW5ndGggIG9mIGlucHV0ICBkYXRhLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLVVCWVRFICAgKmRzdF9hZHIsICAgICAgLyogQWRkcmVzcyBvZiBvdXRwdXQgZGF0YS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi12b2lkICAqcF9kc3RfbGVuICAgICAgIC8qIFBvaW50ZXIgdG8gYSBsb25nd29yZCB3aGVyZSByb3V0aW5lIHdpbGwgd3JpdGU6ICAgICAqLwotICAgICAgICAgICAgICAgICAgICAgICAvKiAgICBJZiBhY3Rpb249Li5JREVOVElUWSAgID0+IEFkciBvZiBpZCBzdHJ1Y3R1cmUuICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgLyogICAgSWYgYWN0aW9uPS4uQ09NUFJFU1MgICA9PiBMZW5ndGggb2Ygb3V0cHV0IGRhdGEuICovCi0gICAgICAgICAgICAgICAgICAgICAgIC8qICAgIElmIGFjdGlvbj0uLkRFQ09NUFJFU1MgPT4gTGVuZ3RoIG9mIG91dHB1dCBkYXRhLiAqLwotKTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFbmQgb2YgQ09NUFJFU1MuSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmYXN0X2NvcHkuaCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotLyogVGhpcyBmdW5jdGlvbiBjb3BpZXMgYSBibG9jayBvZiBtZW1vcnkgdmVyeSBxdWlja2x5LiAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFRoZSBleGFjdCBzcGVlZCBkZXBlbmRzIG9uIHRoZSByZWxhdGl2ZSBhbGlnbm1lbnQgb2YgdGhlIGJsb2NrcyBvZiBtZW1vcnkuICovCi0vKiBQUkUgIDogMDw9c3JjX2xlbjw9KDJeMzIpLTEgLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyogUFJFICA6IFNvdXJjZSBhbmQgZGVzdGluYXRpb24gYmxvY2tzIG11c3Qgbm90IG92ZXJsYXAuICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFBPU1QgOiBNRU1bZHN0X2Fkcixkc3RfYWRyK3NyY19sZW4tMV09TUVNW3NyY19hZHIsc3JjX2FkcitzcmNfbGVuLTFdLiAgICAgICovCi0vKiBQT1NUIDogTUVNW2RzdF9hZHIsZHN0X2FkcitzcmNfbGVuLTFdIGlzIHRoZSBvbmx5IG1lbW9yeSBjaGFuZ2VkLiAgICAgICAgICAqLwotCi0jZGVmaW5lIGZhc3RfY29weShzcmMsZHN0LGxlbikgbWVtY3B5KGRzdCxzcmMsbGVuKQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRW5kIG9mIGZhc3RfY29weS5oICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNlbmRpZgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9jaGFyL2Z0YXBlL2NvbXByZXNzb3IvemZ0YXBlLWNvbXByZXNzLmMgYi9kcml2ZXJzL2NoYXIvZnRhcGUvY29tcHJlc3Nvci96ZnRhcGUtY29tcHJlc3MuYwpkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggNjVmZmMwYi4uMDAwMDAwMAotLS0gYS9kcml2ZXJzL2NoYXIvZnRhcGUvY29tcHJlc3Nvci96ZnRhcGUtY29tcHJlc3MuYworKysgL2Rldi9udWxsCkBAIC0xLDEyMDMgKzAsMCBAQAotLyoKLSAqICAgICAgQ29weXJpZ2h0IChDKSAxOTk0LTE5OTcgQ2xhdXMtSnVzdHVzIEhlaW5lCi0KLSBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yCi0gbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMKLSBwdWJsaXNoZWQgYnkgdGhlIEZyZWUgU29mdHdhcmUgRm91bmRhdGlvbjsgZWl0aGVyIHZlcnNpb24gMiwgb3Ig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IHBvc2l0aW9uIGluIGNvbXByZXNzaW9uIGJ1ZmZlciAqLwotCWludCBjbXByX3N6OyAgICAgICAgICAgICAgLyogd2hhdCBpcyBsZWZ0IGluIHRoZSBjb21wcmVzc2lvbiBidWZmZXIKLQkJCQkgICAqIHdoZW4gY29weWluZyB0aGUgY29tcHJlc3NlZCBkYXRhIHRvIHRoZQotCQkJCSAgICogZGVibG9jayBidWZmZXIKLQkJCQkgICAqLwotCXVuc2lnbmVkIGludCBmaXJzdF9ibG9jazsgLyogbG9jYXRpb24gb2YgaGVhZGVyIGluZm9ybWF0aW9uIGluCi0JCQkJICAgKiB0aGlzIHNlZ21lbnQKLQkJCQkgICAqLwotCXVuc2lnbmVkIGludCBjb3VudDsgICAgICAgLyogYW1vdW50IG9mIGRhdGEgb2YgY3VycmVudCBibG9jawotCQkJCSAgICogY29udGFpbmVkIGluIGN1cnJlbnQgc2VnbWVudCAKLQkJCQkgICAqLwotCXVuc2lnbmVkIGludCBvZmZzZXQ7ICAgICAgLyogb2Zmc2V0IGluIGN1cnJlbnQgc2VnbWVudCAqLwotCXVuc2lnbmVkIGludCBzcGFuczoxOyAgICAgLyogbWlnaHQgY29udGludWUgaW4gbmV4dCBzZWdtZW50ICovCi0JdW5zaWduZWQgaW50IHVuY21wcjsgICAgICAvKiAweDgwMDAgaWYgdGhpcyBibG9jayBjb250YWlucwotCQkJCSAgICogdW5jb21wcmVzc2VkIGRhdGEgCi0JCQkJICAgKi8KLQlfX3M2NCBmb2ZmczsgICAgICAgICAgICAgIC8qIGZpbGUgc2V0IGJ5dGUgb2Zmc2V0LCBzYW1lIGFzIGluIAotCQkJCSAgICogY29tcHJlc3Npb24gbWFwIHNlZ21lbnQKLQkJCQkgICAqLwotfSBjbXByX2luZm87Ci0KLXN0YXRpYyBjbXByX2luZm8gY3NlZzsgLyogc3RhdGljIGRhdGEuIE11c3QgYmUga2VwdCB1cHRvZGF0ZSBhbmQgc2hhcmVkIGJ5IAotCQkJKiByZWFkLCB3c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cHJlc3MoKSIgYXJlIHRoZSBpbnRlcmZhY2UgdG8gdGhlIGFjdHVhbCBjb21wcmVzc2lvbiAgICAgICAgICoKLSAqICBhbGdvcml0aG0gKGkuZS4gdGhleSBhcmUgY2FsbGluZyB0aGUgImNvbXByZXNzKCkiIGZ1bmN0aW9uIGZyb20gICAgICAgICAgKgotICogIHRoZSBsenJ3MyBwYWNrYWdlIGZvciBub3cpLiBUaGVzZSByb3V0aW5lcyBjb3VsZCBxdWl0ZSBlYXNpbHkgYmUgICAgICAgICAqCi0gKiAgY2hhbmdlZCB0byBhZG9wdCBhbm90aGVyIGNvbXByZXNzaW9uIGFsZ29yaXRobSBpbnN0ZWFkIG9mIGx6cnczLCAgICAgICAgICoKLSAqICB3aGljaCBjdXJyZW50bHkgaXMgdXNlZC4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIGNhbGxlZCBieSB6ZnRfY29tcHJlc3Nfd3JpdGUoKSB0byBwZXJmb3JtIHRoZSBjb21wcmVzc2lvbi4gTXVzdAotICogcmV0dXJuIHRoZSBzaXplIG9mIHRoZSBjb21wcmVzc2VkIGRhdGEuCi0gKgotICogTk9URTogVGhlIHNpemUgb2YgdGhlIGNvbXByZXNzZWQgZGF0YSBzaG91bGQgbm90IGV4Y2VlZCB0aGUgc2l6ZSBvZgotICogICAgICAgdGhlIHVuY29tcHJlc3NlZCBkYXRhLiBNb3N0IGNvbXByZXNzaW9uIGFsZ29yaXRobXMgaGF2ZSBtZWFucwotICogICAgICAgdG8gc3RvcmUgZGF0YSB1bmNoYW5nZWQgaWYgdGhlICJjb21wcmVzc2VkIiBkYXRhIG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zIG9mIHRoaXMgYnVmZmVycwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvZXMgdG8gYSBzcGVjaWZpYyBzZWdtZW50LgotICogIGNvbnN0IGludCBzZWdfc3ogICAgICAgICA6IHRoZSBzaXplIG9mIHRoZSBzZWdtZW50IGRzdF9idWYgd2lsbCBiZQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcGllZCB0by4KLSAqICBjb25zdCB6ZnRfcG9zaXRpb24gKnBvcyAgOiBzdHJ1Y3QgY29udGFpbmluZyB0aGUgY29vcmRpbmF0ZXMgaW4KLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgY3VycmVudCB2b2x1bWUgKGJ5dGUgcG9zaXRpb24sCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VnbWVudCBpZCBvZiBjdXJyZW50IHNlZ21lbnQgZXRjKQotICogIGNvbnN0IHpmdF92b2xpbmZvICp2b2x1bWU6IGluZm9ybWF0aW9uIGFib3V0IHRoZSBjdXJyZW50IHZvbHVtZSwKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplIGV0Yy4KLSAqICBjb25zdCBfX3U4ICpzcmNfYnVmICAgICAgOiB1c2VyIHNwYWNlIGJ1ZmZlciB0aGF0IGNvbnRhaW5zIHRoZQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgdGhlIHVzZXIgd2FudHMgdG8gYmUgd3JpdHRlbiB0bwotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRhcGUuCi0gKiAgY29uc3QgaW50IHJlcV9sZW4gICAgICAgIDogdGhlIGFtb3VudCBvZiBkYXRhIHRoZSB1c2VyIHdhbnRzIHRvIGJlCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd3JpdHRlbiB0byB0YXBlLgotICovCi1zdGF0aWMgaW50IHpmdGNfd3JpdGUoaW50ICp3cml0ZV9jbnQsCi0JCSAgICAgIF9fdTggKmRzdF9idW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AvODAgc3BlYzogICAgICAgICAgICAgICAgIHRhcGVfcGFyYW1ldGVyczoKLQkgKgotCSAqICAgIHNlZ21lbnRzLXBlci10cmFjayAgICAgICAgICAgICAgc2VnbWVudHNfcGVyX3RyYWNrCi0JICogICAgdHJhY2tzLXBlci1jYXJ0cmlkZ2UgICAgICAgICAgICB0cmFja3NfcGVyX3RhcGUKLQkgKiAgICBtYXgtZmxvcHB5LXNpZGUgICAgICAgICAgICAgICAgIChzZWdtZW50c19wZXJfdHJhY2sgKgotCSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHJhY2tzX3Blcl90YXBlIC0gMSkgLwotCSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnRhcGVfc2VnbWVudHNfcGVyX2hlYWQKLQkgKiAgICBtYXgtZmxvcHB5LXRyYWNrICAgICAgICAgICAgICAgIGZ0YXBlX3NlZ21lbnRzX3Blcl9oZWFkIC8KLQkgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ0YXBlX3NlZ21lbnRzX3Blcl9jeWxpbmRlciAtIDEKLQkgKiAgICBtYXgtZmxvcHB5LXNlY3RvciAgICAgICAgICAgICAgIGZ0YXBlX3NlZ21lbnRzX3Blcl9jeWxpbmRlciAqCi0JICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGVF9TRUNUT1JTX1BFUl9TRUdNRU5UCi0JICovCi0JZnRfc2VnbWVudHNfcGVyX3RyYWNrID0gR0VUMihhZGRyZXNzLCBGVF9TUFQpOwotCWZ0X3RyYWNrc19wZXJfdGFwZSAgICA9IGFkZHJlc3NbRlRfVFBDXTsKLQltYXhfZmxvcHB5X3NpZGUgICAgICAgPSBhZGRyZXNzW0ZUX0ZITV07Ci0JbWF4X2Zsb3BweV90cmFjayAgICAgID0gYWRkcmVzc1tGVF9GVE1dOwotCW1heF9mbG9wcHlfc2VjdG9yICAgICA9IGFkZHJlc3NbRlRfRlNNXTsKLQlUU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E4OjI3ICQKLSAqCi0gKiAgICAgIFRoaXMgZmlsZSBjb250YWlucyB0aGUgcmVhZGluZyBjb2RlCi0gKiAgICAgIGZvciB0aGUgUUlDLTExNyBmbG9wcHktdGFwZSBkcml2ZXIgZm9yIExpbnV4LgotICovCi0KLSNpbmNsdWRlIDxsaW51eC9mdGFwZS5oPgotI2luY2x1ZGUgIi4uL2xvd2xldmVsL2Z0YXBlLXRyYWNpbmcuaCIKLQotLyogICAgICBHbG9iYWwgdmFycy4KLSAqLwotLyogICAgICB0cmFjaW5nCi0gKiAgICAgIHNldCBpdCB0bzogICAgIHRvIGxvZyA6Ci0gKiAgICAgICAwICAgICAgICAgICAgICBidWdzCi0gKiAgICAgICAxICAgICAgICAgICAgICArIGVycm9ycwotICogICAgICAgMiAgICAgICAgICAgICAgKyB3YXJuaW5ncwotICogICAgICAgMyAgICAgICAgICAgICAgKyBpbmZvcm1hdGlvbgotICogICAgICAgNCAgICAgICAgICAgICAgKyBtb3JlIGluZm9ybWF0aW9uCi0gKiAgICAgICA1ICAgICAgICAgICAgICArIHByb2dyYW0gZmxvdwotICogICAgICAgNiAgICAgICAgICAgICAgKyBmZGMvZG1hIGluZm8KLSAqICAgICAgIDcgICAgICAgICAgICAgICsgZGF0YSBmbG93Ci0gKiAgICAgICA4ICAgICAgICAgICAgICArIGV2ZXJ5dGhpbmcgZWxzZQotICovCi1mdF90cmFjZV90IGZ0YXBlX3RyYWNpbmcgPSBmdF90X2luZm87IC8qIERlZmF1bHQgbGV2ZWw6IGluZm9ybWF0aW9uIGFuZCB1cCAqLwotaW50ICBmdGFwZV9mdW5jdGlvbl9uZXN0X2xldmVsOwotCi0vKiAgICAgIExvY2FsIHZhcnMuCi0gKi8KLXN0YXRpYyBfX3U4IHRyYWNlX2lkOwotc3RhdGljIGNoYXIgc3BhY2luZ1tdID0gIiogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiOwotCi12b2lkIGZ0YXBlX3RyYWNlX2NhbGwoY29uc3QgY2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6ZnRfemFwX3JlYWRfYnVmZmVycygpOwotCXpmdF9pb19zdGF0ZSA9IHpmdF9pZGxlOwotCVRSQUNFX0VYSVQgcmVzdWx0OwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogIGZ1bmN0aW9ucyBmb3IgdGhlIE1USU9DVE9QIGNvbW1hbmRzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIGludCBtdF9kdW1teShpbnQgKmR1bW15KQotewotCVRSQUNFX0ZVTihmdF90X2Zsb3cpOwotCQotCVRSQUNFX0VYSVQgLUVOT1NZUzsKLX0KLQotc3RhdGljIGludCBtdF9yZXNldChpbnQgKmR1bW15KQoteyAgICAgICAgCi0JVFJBQ0VfRlVOKGZ0X3RfZmxvdyk7Ci0JCi0JKHZvaWQpZnRhcGVfc2Vla190b19ib3QoKTsKLQlUUkFDRV9DQVRDSChmdGFwZV9yZXNldF9kcml2ZSgpLAotCQkgICAgemZ0X2luaXRfZHJpdmVyKCk7IHpmdF91bmluaXRfbWVtKCk7IHpmdF9vZmZsaW5lID0gMSk7Ci0JLyogIGZha2UgYSByZS1vcGVuIG9mIHRoZSBkZXZpY2UuIFRoaXMgd2lsbCBzZXQgYWxsIGZsYWdlIGFuZCAKLQkgKiAgYWxsb2NhdGUgYnVmZmVycyBhcyBhcHByb3ByaWF0ZS4gVGhlIG5ldyB0YXBlIGN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9pbnRlcnJ1cHRfYmgpOwogCXJldHVybjsKIAogZXJyX3JlbGVhc2VfcmVnaW9uOgpAQCAtMTEyNSw4ICsxMTI1LDggQEAKIAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogRnVuY3Rpb246ICAgaXAyX2ludGVycnVwdF9iaChwQikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qIFBhcmFtZXRlcnM6IHBCIC0gcG9pbnRlciB0byB0aGUgYm9hcmQgc3RydWN0dXJlICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiBGdW5jdGlvbjogICBpcDJfaW50ZXJydXB0X2JoKHdvcmspICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogUGFyYW1ldGVyczogd29yayAtIHBvaW50ZXIgdG8gdGhlIGJvYXJkIHN0cnVjdHVyZSAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qIFJldHVybnM6ICAgIE5vdGhpbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyogRGVzY3JpcHRpb246ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KQEAgLTExMzUsOCArMTEzNSw5IEBACiAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyB2b2lkCi1pcDJfaW50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ggPSBwOworCWkyQ2hhblN0clB0ciBwQ2ggPSBjb250YWluZXJfb2Yod29yaywgaTJDaGFuU3RyLCB0cXVldWVfc3RhdHVzKTsKIAlpbnQgc3RhdHVzOwogCiAJc3RhdHVzID0gIGkyR2V0U3RhdHVzKCBwQ2gsIChJMl9CUkt8STJfUEFSfEkyX0ZSQXxJMl9PVlIpICk7CkBAIC0yMzk3LDcgKzIzOTgsNyBAQAogLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBzdGF0aWMgdm9pZAotaXAyX3NldF90ZXJtaW9zKCBQVFRZIHR0eSwgc3RydWN0IHRlcm1pb3MgKm9sZF90ZXJtaW9zICkKK2lwMl9zZXRfdGVybWlvcyggUFRUWSB0dHksIHN0cnVjdCBrdGVybWlvcyAqb2xkX3Rlcm1pb3MgKQogewogCWkyQ2hhblN0clB0ciBwQ2ggPSAoaTJDaGFuU3RyUHRyKXR0eS0+ZHJpdmVyX2RhdGE7CiAKQEAgLTI0MzksMTEgKzI0NDAsMTEgQEAKIC8qIGNoYW5nZS4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RhdGljIHZvaWQKLXNldF9wYXJhbXMoIGkyQ2hhblN0clB0ciBwQ2gsIHN0cnVjdCB0ZXJtaW9zICpvX3Rpb3MgKQorc2V0X3BhcmFtcyggaTJDaGFuU3RyUHRyIHBDaCwgc3RydWN0IGt0ZXJtaW9zICpvX3Rpb3MgKQogewogCXRjZmxhZ190IGNmbGFnLCBpZmxhZywg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kb3duIGhvb2sgdXNlZCIpOworCisgICAgICAgIHNlbmRfbXNnLm5ldGZuID0gSVBNSV9ORVRGTl9PRU07CisgICAgICAgIHNlbmRfbXNnLmNtZCA9IElQTUlfQVRDQV9QUFNfR1JBQ0VGVUxfUkVTVEFSVDsKKyAgICAgICAgc2VuZF9tc2cuZGF0YSA9IElQTUlfQVRDQV9QUFNfSUFOQTsKKyAgICAgICAgc2VuZF9tc2cuZGF0YV9sZW4gPSAzOworICAgICAgICBydiA9IGlwbWlfcmVxdWVzdF9pbl9yY19tb2RlKHVzZXIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHN0cnVjdCBpcG1pX2FkZHIgKikgJnNtaV9hZGRyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmc2VuZF9tc2cpOworICAgICAgICBpZiAocnYgJiYgcnYgIT0gSVBNSV9VTktOT1dOX0VSUl9DT01QTEVUSU9OX0NPREUpIHsKKyAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9FUlIgUEZYICJVbmFibGUgdG8gc2VuZCBBVENBICwiCisgICAgICAgICAgICAgICAgICAgICAgICIgSVBNSSBlcnJvciAweCV4XG4iLCBydik7CisgICAgICAgIH0KKwlyZXR1cm47Cit9CisKIHN0YXRpYyBpbnQgaXBtaV9hdGNhX2RldGVjdCAoaXBtaV91c2VyX3QgdXNlcikKIHsKIAlzdHJ1Y3QgaXBtaV9zeXN0ZW1faW50ZXJmYWNlX2FkZHIgc21pX2FkZHI7CkBAIC0xNjcsNiArMjM3LDEzIEBACiAJcnYgPSBpcG1pX3JlcXVlc3Rfd2FpdF9mb3JfcmVzcG9uc2UodXNlciwKIAkJCQkJICAgIChzdHJ1Y3QgaXBtaV9hZGRyICopICZzbWlfYWRkciwKIAkJCQkJICAgICZzZW5kX21zZyk7CisKKyAgICAgICAgcHJpbnRrKEtFUk5fSU5GTyBQRlggIkFUQ0EgRGV0ZWN0IG1mZyAweCVYIHByb2QgMHglWFxuIiw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lfdGJsKTsKIAotI2VuZGlmIC8qIENPTkZJR19QQ0kgKi8KK3N0YXRpYyBzdHJ1Y3QgcGNpX2RyaXZlciBzdGxpX3BjaWRyaXZlcjsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCkBAIC02MTUsMjIgKzU5MSwxMCBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICoJRGVmaW5lIHNvbWUgaGFuZHkgbG9jYWwgbWFjcm9zLi4uCi0gKi8KLSN1bmRlZiBNSU4KLSNkZWZpbmUJTUlOKGEsYikJKCgoYSkgPD0gKGIpKSA/IChhKSA6IChiKSkKLQotI3VuZGVmCVRPTE9XRVIKLSNkZWZpbmUJVE9MT1dFUih4KQkoKCgoeCkgPj0gJ0EnKSAmJiAoKHgpIDw9ICdaJykpID8gKCh4KSArIDB4MjApIDogKHgpKQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qCiAgKglQcm90b3R5cGUgYWxsIGZ1bmN0aW9ucyBpbiB0aGlzIGRyaXZlciEKICAqLwogCi1zdGF0aWMgaW50CXN0bGlfcGFyc2VicmQoc3RsY29uZl90ICpjb25mcCwgY2hhciAqKmFyZ3ApOwotc3RhdGljIGludAlzdGxpX2luaXQodm9pZCk7CitzdGF0aWMgaW50CXN0bGlfcGFyc2VicmQoc3RydWN0IHN0bGNvbmYgKmNvbmZwLCBjaGFyICoqYXJncCk7CiBzdGF0aWMgaW50CXN0bGlfb3BlbihzdHJ1Y3QgdHR5X3N0cnVjdCAqdHR5LCBzdHJ1Y3QgZmlsZSAqZmlscCk7CiBzdGF0aWMgdm9pZAlzdGxpX2Nsb3NlKHN0cnVjdCB0dHl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gKmRldnApOworc3RhdGljIGludAlzdGxpX2luaXRlY3Aoc3RydWN0IHN0bGlicmQgKmJyZHApOworc3RhdGljIGludAlzdGxpX2luaXRvbmIoc3RydWN0IHN0bGlicmQgKmJyZHApOworI2lmIFNUTElfRUlTQVBST0JFICE9IDAKK3N0YXRpYyBpbnQJc3RsaV9laXNhbWVtcHJvYmUoc3RydWN0IHN0bGlicmQgKmJyZHApOwogI2VuZGlmCitzdGF0aWMgaW50CXN0bGlfaW5pdHBvcnRzKHN0cnVjdCBzdGxpYnJkICpicmRwKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCkBAIC03NjYsMTU0ICs3MjgsMzcgQEAKIAogc3RhdGljIHN0cnVjdCBjbGFzcyAqaXN0YWxsaW9uX2NsYXNzOwogCi0vKgotICoJTG9hZGFibGUgbW9kdWxlIGluaXRpYWxpemF0aW9uIHN0dWZmLgotICovCi0KLXN0YXRpYyBpbnQgX19pbml0IGlzdGFsbGlvbl9tb2R1bGVfaW5pdCh2b2lkKQorc3RhdGljIHZvaWQgc3RsaV9jbGVhbnVwX3BvcnRzKHN0cnVjdCBzdGxpYnJkICpicmRwKQogewotCXN0bGlfaW5pdCgpOwotCXJldHVybiAwOwotfQorCXN0cnVjdCBzdGxpcG9ydCAqcG9ydHA7CisJdW5zaWduZWQgaW50IGo7CiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotc3RhdGljIHZvaWQgX19leGl0IGlzdGFsbGlvbl9tb2R1bGVfZXhpdCh2b2lkKQotewotCXN0bGlicmRfdAkqYnJkcDsKLQlzdGxpcG9ydF90CSpwb3J0cDsKLQlpbnQJCWksIGo7Ci0KLQlwcmludGsoS0VSTl9JTkZPICJVbmxvYWRpbmcgJXM6IHZlcnNpb24gJXNcbiIsIH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HN0bGlicmQgKmJyZHApCiB7CQogCW91dGIoRUNQX0FURU5BQkxFLCAoYnJkcC0+aW9iYXNlICsgRUNQX0FUQ09ORlIpKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZCBzdGxpX2VjcGRpc2FibGUoc3RsaWJyZF90ICpicmRwKQorc3RhdGljIHZvaWQgc3RsaV9lY3BkaXNhYmxlKHN0cnVjdCBzdGxpYnJkICpicmRwKQogewkKIAlvdXRiKEVDUF9BVERJU0FCTEUsIChicmRwLT5pb2Jhc2UgKyBFQ1BfQVRDT05GUikpOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB2b2lkIF9faW9tZW0gKnN0bGlfZWNwZ2V0bWVtcHRyKHN0bGlicmRfdCAqYnJkcCwgdW5zaWduZWQgbG9uZyBvZmZzZXQsIGludCBsaW5lKQorc3RhdGljIHZvaWQgX19pb21lbSAqc3RsaV9lY3BnZXRtZW1wdHIoc3RydWN0IHN0bGlicmQgKmJyZHAsIHVuc2lnbmVkIGxvbmcgb2Zmc2V0LCBpbnQgbGluZSkKIHsJCiAJdm9pZCBfX2lvbWVtICpwdHI7CiAJdW5zaWduZWQgY2hhciB2YWw7CkBAIC0yOTY5LDcgKzI4MTMsNyBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB2b2lkIHN0bGlfZWNwcmVzZXQoc3RsaWJyZF90ICpicmRwKQorc3RhdGljIHZvaWQgc3RsaV9lY3ByZXNldChzdHJ1Y3Qgc3RsaWJyZCAqYnJkcCkKIHsJCiAJb3V0YihFQ1BfQVRTVE9QLCAoYnJkcC0+aW9iYXNlICsgRUNQX0FUQ09ORlIpKTsKIAl1ZGVsYXkoMTApOwpAQCAtMjk3OSw3ICsyODIzLDcgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZCBzdGxpX2VjcGludHIoc3RsaWJyZF90ICpicmRwKQorc3RhdGljIHZvaWQgc3RsaV9lY3BpbnRyKHN0cnVjdCBzdGxpYnJkICpicmRwKQogewkKIAlvdXRiKDB4MSwgYnJkcC0+aW9iYXNlKTsKIH0KQEAgLTI5OTAsNyArMjgzNCw3IEBACiAgKglUaGUgZm9sbG93aW5nIHNldCBvZiBmdW5jdGlvbnMgYWN0IG9uIEVDUCBFSVNBIGJvYXJkcy4KICAqLwogCi1zdGF0aWMgdm9pZCBzdGxpX2VjcGVpaW5pdChzdGxpYnJkX3QgKmJyZHApCitzdGF0aWMgdm9pZCBzdGxpX2VjcGVpaW5pdChzdHJ1Y3Qgc3RsaWJyZCAqYnJkcCkKIHsKIAl1bnNpZ25lZCBsb25nCW1lbWNvbmY7CiAKQEAgLTMwMDgsMjEgKzI4NTIsMjEgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZCBzdGxpX2VjcGVpZW5hYmxlKHN0bGlicmRfdCAqYnJkcCkKK3N0YXRpYyB2b2lkIHN0bGlfZWNwZWllbmFibGUoc3RydWN0IHN0bGlicmQgKmJyZHApCiB7CQogCW91dGIoRUNQX0VJRU5BQkxFLCAoYnJkcC0+aW9iYXNlICsgRUNQX0VJQ09ORlIpKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9p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wogCi1zdGF0aWMgdm9pZCBzdGxpX2VjcG1jZW5hYmxlKHN0bGlicmRfdCAqYnJkcCkKK3N0YXRpYyB2b2lkIHN0bGlfZWNwbWNlbmFibGUoc3RydWN0IHN0bGlicmQgKmJyZHApCiB7CQogCW91dGIoRUNQX01DRU5BQkxFLCAoYnJkcC0+aW9iYXNlICsgRUNQX01DQ09ORlIpKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZCBzdGxpX2VjcG1jZGlzYWJsZShzdGxpYnJkX3QgKmJyZHApCitzdGF0aWMgdm9pZCBzdGxpX2VjcG1jZGlzYWJsZShzdHJ1Y3Qgc3RsaWJyZCAqYnJkcCkKIHsJCiAJb3V0YihFQ1BfTUNESVNBQkxFLCAoYnJkcC0+aW9iYXNlICsgRUNQX01DQ09ORlIpKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZCBfX2lvbWVtICpzdGxpX2VjcG1jZ2V0bWVtcHRyKHN0bGlicmRfdCAqYnJkcCwgdW5zaWduZWQgbG9uZyBvZmZzZXQsIGludCBsaW5lKQorc3RhdGljIHZvaWQgX19pb21lbSAqc3RsaV9lY3BtY2dldG1lbXB0cihzdHJ1Y3Qgc3RsaWJyZCAqYnJkcCwgdW5zaWduZWQgbG9uZyBvZmZzZXQsIGludCBsaW5lKQogewkKIAl2b2lkIF9faW9tZW0gKnB0cjsKIAl1bnNpZ25lZCBjaGFyIHZhbDsKQEAgLTMwOTUsNyArMjkzOSw3IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQgc3RsaV9l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qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQgc3RsaV9lY3BwY2lyZXNldChzdGxpYnJkX3QgKmJyZHApCitzdGF0aWMgdm9pZCBzdGxpX2VjcHBjaXJlc2V0KHN0cnVjdCBzdGxpYnJkICpicmRwKQogewkKIAlvdXRiKEVDUF9QQ0lTVE9QLCAoYnJkcC0+aW9iYXNlICsgRUNQX1BDSUNPTkZSKSk7CiAJdWRlbGF5KDEwKTsKQEAgLTMxNTQsNyArMjk5OCw3IEBACiAgKglUaGUgZm9sbG93aW5nIHJvdXRpbmVzIGFjdCBvbiBPTmJvYXJkcy4KICAqLwogCi1zdGF0aWMgdm9pZCBzdGxpX29uYmluaXQoc3RsaWJyZF90ICpicmRwKQorc3RhdGljIHZvaWQgc3RsaV9vbmJpbml0KHN0cnVjdCBzdGxpYnJkICpicmRwKQogewogCXVuc2lnbmVkIGxvbmcJbWVtY29uZjsKIApAQCAtMzE3MSwyMSArMzAxNSwyMSBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB2b2lkIHN0bGlfb25iZW5hYmxlKHN0bGlicmRfdCAqYnJkcCkKK3N0YXRpYyB2b2lkIHN0bGlfb25iZW5hYmxlKHN0cnVjdCBzdGxpYnJkICpicmRwKQogewkKIAlvdXRiKChicmRwLT5lbmFidmFsIHwgT05CX0FURU5BQkxFKSwgKGJyZHAtPmlvYmFzZSArIE9OQl9BVENPTkZSKSk7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQgc3RsaV9vbmJkaXNhYmxlKHN0bGlicmRfdCAqYnJkcCkKK3N0YXRpYyB2b2lkIHN0bGlfb25iZGlzYWJsZShzdHJ1Y3Qgc3RsaWJyZC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W1jb25mOwogCkBAIC0zMjM2LDIxICszMDgwLDIxIEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQgc3RsaV9vbmJlZW5hYmxlKHN0bGlicmRfdCAqYnJkcCkKK3N0YXRpYyB2b2lkIHN0bGlfb25iZWVuYWJsZShzdHJ1Y3Qgc3RsaWJyZCAqYnJkcCkKIHsJCiAJb3V0YihPTkJfRUlFTkFCTEUsIChicmRwLT5pb2Jhc2UgKyBPTkJfRUlDT05GUikpOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB2b2lkIHN0bGlfb25iZWRpc2FibGUoc3RsaWJyZF90ICpicmRwKQorc3RhdGljIHZvaWQgc3RsaV9vbmJlZGlzYWJsZShzdHJ1Y3Qgc3RsaWJyZCAqYnJkcCkKIHsJCiAJb3V0YihPTkJfRUlESVNBQkxFLCAoYnJkcC0+aW9iYXNlICsgT05CX0VJQ09ORlIpKTsKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZCBfX2lvbWVtICpzdGxpX29uYmVnZXRtZW1wdHIoc3RsaWJyZF90ICpicmRwLCB1bnNpZ25lZCBsb25nIG9mZnNldCwgaW50IGxpbmUpCitzdGF0aWMgdm9pZCBfX2lvbWVtICpzdGxpX29uYmVnZXRtZW1wdHIoc3RydWN0IHN0bGlicmQgKmJyZHAsIHVuc2lnbmVkIGxvbmcgb2Zmc2V0LCBpbnQgbGluZSkKIHsJCiAJdm9pZCBfX2lvbWVtICpwdHI7CiAJdW5zaWduZWQgY2hhciB2YWw7CkBAIC0zMjc0LDcgKzMxMTgsNyBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLXN0YXRpYyB2b2lkIHN0bGlfb25iZXJlc2V0KHN0bGlicmRfdCAqYnJkcCkKK3N0YXRpYyB2b2lkIHN0bGlfb25iZXJlc2V0KHN0cnVjdCBzdGxpYnJkICpicmRwKQogewkKIAlvdXRiKE9OQl9FSVNUT1AsIChicmRwLT5pb2Jhc2UgKyBPTkJfRUlDT05GUikpOwogCXVkZWxheSgxMCk7CkBAIC0zMjg4LDcgKzMxMzIsNyBAQAogICoJVGhlIGZvbGxvd2luZyByb3V0aW5lcyBhY3Qgb24gQnJ1bWJ5IGJvYXJkcy4KICAqLwogCi1zdGF0aWMgdm9pZCBzdGxpX2JieWluaXQoc3RsaWJyZF90ICpicmRwKQorc3RhdGljIHZvaWQgc3RsaV9iYnlpbml0KHN0cnVjdCBzdGxpYnJkICpicmRwKQogewogCW91dGIoQkJZX0FUU1RPUCwgKGJyZHAtPmlvYmFzZSArIEJCWV9BVENPTkZSKSk7CiAJdWRlbGF5KDEwKTsKQEAgLTMzMDAsNyArMzE0NCw3IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQgX19pb21lbSAqc3RsaV9iYnlnZXRtZW1wdHIoc3RsaWJyZF90ICpicmRwLCB1bnNpZ25lZCBsb25nIG9mZnNldCwgaW50IGxpbmUpCitzdGF0aWMgdm9pZCBfX2lvbWVtICpzdGxpX2JieWdldG1lbXB0cihzdHJ1Y3Qgc3RsaWJyZCAqYnJkcCwgdW5zaWduZWQgbG9uZyBvZmZzZXQsIGludCBsaW5lKQogewkKIAl2b2lkIF9faW9tZW0gKnB0cjsKIAl1bnNpZ25lZCBjaGFyIHZhbDsKQEAgLTMzMTUsNyArMzE1OSw3IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIHZvaWQgc3RsaV9iYnlyZXNldChzdGxpYnJkX3QgKmJyZHApCitzdGF0aWMgdm9pZCBzdGxpX2JieXJlc2V0KHN0cnVjdCBzdGxpYnJkICpicmRwKQogewkKIAlvdXRiKEJCWV9BVFNUT1AsIChicmRwLT5pb2Jhc2UgKyBCQllfQVRDT05GUikpOwogCXVkZWxheSgxMCk7CkBAIC0zMzI5LDcgKzMxNzMsNyBAQAogICoJVGhlIGZvbGxvd2luZyByb3V0aW5lcyBhY3Qgb24gb3JpZ2luYWwgb2xkIFN0YWxsaW9uIGJvYXJkcy4KICAqLwogCi1zdGF0aWMgdm9pZCBzdGxpX3N0YWxpbml0KHN0bGlicmRfdCAqYnJkcCkKK3N0YXRpYyB2b2lkIHN0bGlfc3RhbGluaXQoc3RydWN0IHN0bGlicmQgKmJyZHApCiB7CiAJb3V0YigweDEsIGJyZHAtPmlvYmFzZSk7CiAJbWRlbGF5KDEwMDApOwpAQCAtMzMzNyw3ICszMTgxLDcgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgdm9pZCBfX2lvbWVtICpzdGxpX3N0YWxnZXRtZW1wdHIoc3RsaWJyZF90ICpicmRwLCB1bnNpZ25lZCBsb25nIG9mZnNldCwgaW50IGxpbmUpCitzdGF0aWMgdm9pZCBfX2lvbWVtICpzdGxpX3N0YWxnZXRtZW1wdHIoc3RydWN0IHN0bGlicmQgKmJyZHAsIHVuc2lnbmVkIGxvbmcgb2Zmc2V0LCBpbnQgbGluZSkKIHsJCiAJQlVHX09OKG9mZnNldCA+IGJyZHAtPm1lbXNpemUpOwogCXJldHVybiBicmRwLT5tZW1iYXNlICsgKG9mZnNldCAlIFNUQUx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UTF9NQVhQT1JUUyArIGksIE5VTEwpOwogCX0KIAotCXJldHVybiAwOworCXJldHVybiBmb3VuZDsKIH0KKyNlbHNlCitzdGF0aWMgaW5saW5lIGludCBzdGxpX2ZpbmRlaXNhYnJkcyh2b2lkKSB7IHJldHVybiAwOyB9CisjZW5kaWYKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCkBAIC00MDEzLDcyICszODY0LDEwNCBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLSNpZmRlZglDT05GSUdfUENJCi0KIC8qCiAgKglXZSBoYXZlIGEgU3RhbGxpb24gYm9hcmQuIEFsbG9jYXRlIGEgYm9hcmQgc3RydWN0dXJlIGFuZAogICoJaW5pdGlhbGl6ZSBpdC4gUmVhZCBpdHMgSU8gYW5kIE1FTU9SWSByZXNvdXJjZXMgZnJvbSBQQ0kKICAqCWNvbmZpZ3VyYXRpb24gc3BhY2UuCiAgKi8KIAotc3RhdGljIGludCBzdGxpX2luaXRwY2licmQoaW50IGJyZHR5cGUsIHN0cnVjdCBwY2lfZGV2ICpkZXZwKQorc3RhdGljIGludCBfX2RldmluaXQgc3RsaV9wY2lwcm9iZShzdHJ1Y3QgcGNpX2RldiAqcGRldiwKKwkJY29uc3Qgc3RydWN0IHBjaV9kZXZpY2VfaWQgKmVudCkKIHsKLQlzdGxpYnJkX3QgKmJyZHA7CisJc3RydWN0IHN0bGlicmQgKmJyZHA7CisJdW5zaWduZWQgaW50IGk7CisJaW50IGJyZG5yLCByZXR2YWwgPSAtRUlPOwogCi0JaWYgKHBjaV9lbmFibGVfZGV2aWNlKGRldnApKQotCQlyZXR1cm4gLUVJTzsKLQlpZiAoKGJyZHAgPSBzdGxpX2FsbG9jYnJkKCkpID09IE5VTEwpCi0JCXJldHVybiAt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fRUNIUENJIH0sCisJeyB9CiB9OwotCi1zdGF0aWMgaW50CXN0bF9ucnBjaWJyZHMgPSBBUlJBWV9TSVpFKHN0bF9wY2licmRzKTsKLQotI2VuZGlmCitNT0RVTEVfREVWSUNFX1RBQkxFKHBjaSwgc3RsX3BjaWJyZHMpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKQEAgLTQ0MiwxMzQgKzM5OCw3NCBAQAogCTk2MDAsIDE5MjAwLCAzODQwMCwgNTc2MDAsIDExNTIwMCwgMjMwNDAwLCA0NjA4MDAsIDkyMTYwMAogfTsKIAotLyoKLSAqCURlZmluZSBzb21lIGhhbmR5IGxvY2FsIG1hY3Jvcy4uLgotICovCi0jdW5kZWYJTUlOCi0jZGVmaW5lCU1JTihhLGIpCSgoKGEpIDw9IChiKSkgPyAoYSkgOiAoYikpCi0KLSN1bmRlZglUT0xPV0VSCi0jZGVmaW5lCVRPTE9XRVIoeCkJKCgoKHgpID49ICdBJykgJiYgKCh4KSA8PSAnWicpKSA/ICgoeCkgKyAweDIwKSA6ICh4KSkKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgogICoJRGVjbGFyZSBhbGwgdGhvc2UgZnVuY3Rpb25zIGluIHRoaXMgZHJpdmVyIQogICovCiAKLXN0YXRpYyB2b2lkCXN0bF9hcmdicmRzKHZvaWQpOwotc3RhdGljIGludAlzdGxfcGFyc2VicmQoc3RsY29uZl90ICpjb25mcCwgY2hhciAqKmFyZ3ApOwotCi1zdGF0aWMgdW5zaWduZWQgbG9uZyBzdGxfYXRvbChjaGFyICpzdHIpOwotCi1zdGF0aWMgaW50CXN0bF9pbml0KHZvaWQpOwotc3RhdGljIGludAlzdGxfb3BlbihzdHJ1Y3QgdHR5X3N0cnVjdCAqdHR5L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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAorc3RhdGljIHZvaWQgc3RsX2ZsdXNoYnVmZmVyKHN0cnVjdCB0dHlfc3RydWN0ICp0dHkpCit7CisJc3RydWN0IHN0bHBvcnQJKnBvcnRwOworCisJcHJfZGVidWcoInN0bF9mbHVzaGJ1ZmZlcih0dHk9JXApXG4iLCB0dHkpOworCisJaWYgKHR0eSA9PSBOVUxMKQorCQlyZXR1cm47CisJcG9ydHAgPSB0dHktPmRyaXZlcl9kYXRhOworCWlmIChwb3J0cCA9PSBOVUxMKQorCQlyZXR1cm47CisKKwlzdGxfZmx1c2gocG9ydHApOworCXR0eV93YWtldXAodHR5KTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBzdGxfd2FpdHVudGlsc2VudChzdHJ1Y3QgdHR5X3N0cnVjdCAqdHR5LCBpbnQgdGltZW91dCkKK3sKKwlzdHJ1Y3Qgc3RscG9ydAkqcG9ydHA7CisJdW5zaWduZWQgbG9uZwl0ZW5kOworCisJcHJfZGVidWcoInN0bF93YWl0dW50aWxzZW50KHR0eT0lcCx0aW1lb3V0PSVkKVxuIiwgdHR5LCB0aW1lb3V0KTsKKworCWlmICh0dHkgPT0gTlVMTCkKKwkJcmV0dXJuOworCXBvcnRwID0gdHR5LT5kcml2ZXJfZGF0YTsKKwlpZiAocG9ydHAgPT0gTlVMTCkKKwkJcmV0dXJuOworCisJaWYgKHRpbWVvdXQgPT0gMCkKKwkJdGltZW91dCA9IEhaOworCXRlbmQgPSBqaWZmaWVzICsgdGltZW91dDsKKworCXdoaWxlIChzdGxfZGF0YXN0YXRlKHBvcnRwKSkgeworCQlpZiAoc2lnbmFsX3BlbmRpbmcoY3VycmVudCkpCisJCQlicmVhazsKKwkJbXNsZWVwX2ludGVycnVwdGlibGU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WYgKHJlcXVlc3RfaXJxKGJyZHAtPmlycSwgc3RsX2ludHIsIElSUUZfU0hBUkVELCBuYW1lLCBicmRwKSAhPSAwKSB7CiAJCXByaW50aygiU1RBTExJT046IGZhaWxlZCB0byByZWdpc3RlciBpbnRlcnJ1cHQgIgogCQkgICAgInJvdXRpbmUgZm9yICVzIGlycT0lZFxuIiwgbmFtZSwgYnJkcC0+aXJxKTsKLQkJcmMgPSAtRU5PREVWOwotCX0gZWxzZSB7Ci0JCXJjID0gMDsKKwkJcmV0dmFsID0gLUVOT0RFVjsKKwkJZ290byBlcnJfZnI7CiAJfQotCXJldHVybiByYzsKKworCXJldHVybiAwOworZXJyX2ZyOgorCXN0bF9jbGVhbnVwX3BhbmVscyhicmRwKTsKK2Vycl9yZWwyOgorCWlmIChicmRwLT5pb3NpemUyID4gMCkKKwkJcmVsZWFzZV9yZWdpb24oYnJkcC0+aW9hZGRyMiwgYnJkcC0+aW9zaXplMik7CitlcnJfcmVsMToKKwlyZWxlYXNlX3JlZ2lvbihicmRwLT5pb2FkZHIxLCBicmRwLT5pb3NpemUxKTsKK2VycjoKKwlyZXR1cm4gcmV0dmFsOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0yMzE4LDE2ICsyMDM3LDE0IEBACiAgKglkZWFsaW5nIHdpdGggYWxsIHR5cGVzIG9mIEVDSCBib2FyZC4KICAqLwogCi1zdGF0aWMgaW5saW5lIGludCBzdGxfaW5pdGVjaChzdGxicmRfdCAqYnJkcCkKK3N0YXRpYyBpbnQgX19kZXZpbml0IHN0bF9pbml0ZWNoKHN0cnVjdCBzdGxicmQgKmJyZHApCiB7Ci0Jc3RscGFuZWxfdAkqcGFuZWxwOwotCXVuc2lnbmVkIGludAlzdGF0dXMsIG54dGlkLCBpb2FkZHIsIGNvbmZsaWN0OwotCWludAkJcGFuZWxuciwgYmFua25yLCBpOwor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OwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0yNTgxLDU5ICsyMzIzLDYyIEBACiAgKglGaW5kIHRoZSBuZXh0IGF2YWlsYWJsZSBib2FyZCBudW1iZXIgdGhhdCBpcyBmcmVlLgogICovCiAKLXN0YXRpYyBpbmxpbmUgaW50IHN0bF9nZXRicmRucih2b2lkKQorc3RhdGljIGludCBfX2RldmluaXQgc3RsX2dldGJyZG5yKHZvaWQpCiB7Ci0JaW50CWk7CisJdW5zaWduZWQgaW50IGk7CiAKLQlmb3IgKGkgPSAwOyAoaSA8IFNUTF9NQVhCUkRTKTsgaSsrKSB7Ci0JCWlmIChzdGxfYnJkc1tpXSA9PSAoc3RsYnJkX3QgKikgTlVMTCkgeworCWZvciAoaSA9IDA7IGkgPCBTVExfTUFYQlJEUzsgaSsrKQorCQlpZiAoc3RsX2JyZHNbaV0gPT0gTlVMTCkgewogCQkJaWYgKGkgPj0gc3RsX25yYnJkcykKIAkJCQlzdGxfbnJicmRzID0gaSArIDE7Ci0JCQlyZXR1cm4oaSk7CisJCQlyZXR1cm4gaTsKIAkJfQotCX0KLQlyZXR1cm4oLTEpOworCisJcmV0dXJuIC0xOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNpZmRlZglDT05GSUdfUENJCi0KIC8qCiAgKglXZSBoYXZlIGEgU3RhbGxpb24gYm9hcmQuIEFsbG9jYXRlIGEgYm9hcmQgc3RydWN0dXJlIGFuZAogICoJaW5pdGlhbGl6ZSBpdC4gUmVhZCBpdHMgSU8gYW5kIElSUSByZXNvdXJjZXMgZnJvbSBQQ0kKICAqCWNvbmZpZ3VyYXRpb24gc3BhY2UuCiAgKi8KIAotc3RhdGljIGlubGluZSBpbnQgc3RsX2luaXRwY2licmQoaW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ml2ZXJcbiIpOwotCQlyZXR1cm4gLTE7Ci0JfQotCi0JcmV0dXJuIDA7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qICAgICAgICAgICAgICAgICAgICAgICBDRDE0MDAgSEFSRFdBUkUgRlVOQ1RJT05TICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtMzA3NSwyMSArMjcyMywyMSBAQAogICoJKE1heWJlIHNob3VsZCBtYWtlIHRoaXMgaW5saW5lLi4uKQogICovCiAKLXN0YXRpYyBpbnQgc3RsX2NkMTQwMGdldHJlZyhzdGxwb3J0X3QgKnBvcnRwLCBpbnQgcmVnbnIpCitzdGF0aWMgaW50IHN0bF9jZDE0MDBnZXRyZWcoc3RydWN0IHN0bHBvcnQgKnBvcnRwLCBpbnQgcmVnbnIpCiB7CiAJb3V0YigocmVnbnIgKyBwb3J0cC0+dWFydGFkZHIpLCBwb3J0cC0+aW9hZGRyKTsKIAlyZXR1cm4gaW5iKHBvcnRwLT5pb2FkZHIgKyBFUkVHX0RBVEEpOwogfQogCi1zdGF0aWMgdm9pZCBzdGxfY2QxNDAwc2V0cmVnKHN0bHBvcnRfdCAqcG9ydHAsIGludCByZWduciwgaW50IHZhbHVlKQorc3RhdGljIHZvaWQgc3RsX2NkMTQwMHNldHJlZyhzdHJ1Y3Qgc3RscG9ydCAqcG9ydHAsIGludCByZWduciwgaW50IHZhbHVlKQogewotCW91dGIoKHJlZ25yICsgcG9ydHAtPnVhcnRhZGRyKSwgcG9ydHAtPmlvYWRkcik7CisJb3V0YihyZWduciArIHBvcnRwLT51YXJ0YWRkciwgcG9ydHAtPmlvYWRkcik7CiAJb3V0Yih2YWx1ZSwgcG9ydHAtPmlvY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SB7CiAJCWNsZWFyX2JpdChUVFlfSFdfQ09PS19PVVQsICZwb3J0LT5ncy50dHktPmZsYWdzKTsKIAl9Ci0Jc3hfZHByaW50ayAoU1hfREVCVUdfVEVSTUlPUywgIm9mbGFnczogJXgoJWQpXG4iLAotCSAgICAgICAgICAgIHBvcnQtPmdzLnR0eS0+dGVybWlvcy0+Y19vZmxhZywgCi0JICAgICAgICAgICAgT19PVEhFUihwb3J0LT5ncy50dHkpKTsKKwlzeF9kcHJpbnRrKFNYX0RFQlVHX1RFUk1JT1MsICJvZmxhZ3M6ICV4KCVkKVxuIiwKKwkJCXBvcnQtPmdzLnR0eS0+dGVybWlvcy0+Y19vZmxhZywgT19PVEhFUihwb3J0LT5ncy50dHkpKTsKIAkvKiBwb3J0LT5jX2RjZCA9IHN4X2dldF9DRCAocG9ydCk7ICovCi0JZnVuY19leGl0ICgpOworCWZ1bmNfZXhpdCgpOwogCXJldHVybiAwOwogfQogCi0KLQogLyogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqCiAgKiAgICAgICAgICAgICAgICAgICB0aGUgaW50ZXJydXB0IHJlbGF0ZWQgcm91dGluZXMgICAgICAgICAgICAgICAgICAgICAgICoKICAqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KQEAgLTk5NiwyNDUgKzEwMzEsMjYwIEBACiAgICBrbm93IEknbSBkZWFkIGFnYWluc3QgdGhhdCwgYnV0IEkgdGhpbmsgaXQgaXMgcmVxdWlyZWQgaW4gdGhpcwogICAgY2FzZS4gICovCiAKLQotc3RhdGljIHZvaWQgc3hfdHJhbnNtaXRfY2hhcnMgKHN0cnVjdCBzeF9wb3J0ICpwb3J0KQorc3RhdGljIHZvaWQgc3hfdHJhbnNtaXRfY2hhcnMoc3RydWN0IHN4X3BvcnQgKnBvcnQpCiB7CiAJaW50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SVZFOwogCWlmIChwb3J0LT5ncy50dHkgJiYgKHBvcnQtPmdzLnR0eS0+dGVybWlvcy0+Y19jZmxhZyAmIEhVUENMKSkgewotCQlzeF9zZXRzaWduYWxzIChwb3J0LCAwLCAwKTsKKwkJc3hfc2V0c2lnbmFscyhwb3J0LCAwLCAwKTsKIAkJc3hfcmVjb25maWd1cmVfcG9ydChwb3J0KTsKIAl9CiAKIAlmdW5jX2V4aXQoKTsKIH0KIAotCi0KLQotCiAvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICoKICAqICAgICAgICAgICAgICAgIEhlcmUgYXJlIHRoZSByb3V0aW5lcyB0aGF0IGFjdHVhbGx5ICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICBpbnRlcmZhY2Ugd2l0aCB0aGUgcmVzdCBvZiB0aGUgc3lzdGVtICAgICAgICAgICAgICAgICAgICAqCiAgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCiAKLXN0YXRpYyBpbnQgc3hfb3BlbiAgKHN0cnVjdCB0dHlfc3RydWN0ICogdHR5LCBzdHJ1Y3QgZmlsZSAqIGZpbHApCitzdGF0aWMgaW50IHN4X29wZW4oc3RydWN0IHR0eV9zdHJ1Y3QgKnR0eSwgc3RydWN0IGZpbGUgKmZpbHApCiB7CiAJc3RydWN0IHN4X3BvcnQgKnBvcnQ7CiAJaW50IHJldHZhbCwgbGluZTsKQEAgLTE0MjksMTggKzE0NjYsMTggQEAKIAl9CiAKIAlsaW5lID0gdHR5LT5pbmRleDsKLQlzeF9kcHJpbnRrIChTWF9ERUJVR19PUEVOLCAiJWQ6IG9wZW5pbmcgbGluZSAlZC4gdHR5PSVwIGN0dHk9JXAsIG5wPSVkKVxuIiwgCi0JICAgICAgICAgICAgY3VycmVudC0+cGlkLCBsaW5lLCB0dHksI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GVybWlvcy0+Y19jZmxhZyAmIENSVFNDVFMpIHx8IChJX0lYT0ZGKHR0eSkpICkgeworCWlmICgodHR5LT50ZXJtaW9zLT5jX2NmbGFnICYgQ1JUU0NUUykgfHwgKElfSVhPRkYodHR5KSkpIHsKIAkJcG9ydC0+Z3MuZmxhZ3MgfD0gU1hfUlhfVEhST1RUTEU7CiAJfQogCWZ1bmNfZXhpdCgpOwogfQogCi0KLXN0YXRpYyB2b2lkIHN4X3VudGhyb3R0bGUgKHN0cnVjdCB0dHlfc3RydWN0ICogdHR5KQorc3RhdGljIHZvaWQgc3hfdW50aHJvdHRsZShzdHJ1Y3QgdHR5X3N0cnVjdCAqdHR5KQogewogCXN0cnVjdCBzeF9wb3J0ICpwb3J0ID0gKHN0cnVjdCBzeF9wb3J0ICopdHR5LT5kcml2ZXJfZGF0YTsKIApAQCAtMTg3MywxNSArMTk2NCwxMSBAQAogCXJldHVybjsKIH0KIAotCiAvKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICoKICAqICAgICAgICAgICAgICAgICAgICBIZXJlIGFyZSB0aGUgaW5pdGlhbGl6YXRpb24gcm91dGluZXMuICAgICAgICAgICAgICAgKgogICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwogCi0KLQotCi1zdGF0aWMgaW50IHN4X2luaXRfYm9hcmQgKHN0cnVjdCBzeF9ib2FyZCAqYm9hcmQpCitzdGF0aWMgaW50IHN4X2luaXRfYm9hcmQoc3RydWN0IHN4X2JvYXJkICpib2FyZCkKIHsKIAlpbnQgYWRkcjsKIAlpbnQgY2hhbnM7CkBAIC0xODkzLDM2ICsxOTgwLDM4IEBACiAKIAlib2FyZC0+ZmxhZ3MgfD0gU1hfQk9BUkRfSU5JVElBTElaRUQ7CiAKLQlpZiAocmVhZF9zeF9ieXRlIChib2FyZCwgM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fY29uZmlnKCk7CisJc3Bpbl91bmxvY2soJmlvX2xvY2spOworfQorCisvKiBzaHV0ZG93biB0aGUgd2F0Y2hkb2cgKi8KKworc3RhdGljIHZvaWQgd2Jfc21zY193ZHRfc2h1dGRvd24odm9pZCkKK3sKKwlzcGluX2xvY2soJmlvX2xvY2spOworICAgICAgICBvcGVuX2lvX2NvbmZpZygpOworICAgICAgICBzZWxlY3RfaW9fZGV2aWNlKElPREVWX05PKTsKKworCS8vIGRpc2FibGUgdGhlIHdhdGNoZG9nCisgICAgICAgIGdwaW9fYml0MTMoMHgwOSk7CisgICAgICAgIGdwaW9fYml0MTIoMHgwOSk7CisKKwkvLyByZXNldCB3YXRjaGRvZyBjb25maWcgcmVnaXN0ZXIKKwl3ZHRfdGltZXJfY29uZigweDAwKTsKKworCS8vIHJlc2V0IHdhdGNoZG9nIGNvbnRyb2wgcmVnaXN0ZXIKKyAgICAgICAgd2R0X3RpbWVyX2N0cmwoMHgwMCk7CisKKwkvLyBkaXNhYmxlIHRpbWVvdXQKKyAgICAgICAgd2R0X3RpbWVvdXRfdmFsdWUoMHgwMCk7CisKKyAgICAgICAgY2xvc2VfaW9fY29uZmlnKCk7CisJc3Bpbl91bmxvY2soJmlvX2xvY2spOworfQorCisvKiBzZXQgdGltZW91dCA9PiBlbmFibGUgd2F0Y2hkb2cgKi8KKworc3RhdGljIHZvaWQgd2Jfc21zY193ZHRfc2V0X3RpbWVvdXQodW5zaWduZWQgY2hhciBuZXdfdGltZW91dCkKK3sKKwlzcGluX2xvY2soJmlvX2xvY2spOworICAgICAgICBvcGVuX2lvX2NvbmZpZygpOworICAgICAgICBzZWxlY3RfaW9fZGV2aWNlKElPREVWX05PKTsKKworCS8vIHNldCBQb3dlciBMRUQgdG8gYmxpbmssIGlmIHdlIGVuYWJsZSB0aGUgdGltZW91dAorICAgICAgICB3ZHRfdGltZXJfY3RybCgobmV3X3RpbWVvdXQgPT0gMCkgPyAweDAwIDogMHgwMik7CisKKwkvLyBzZXQgdGltZW91dCB2YWx1ZQorICAgICAgICB3ZHRfdGltZW91dF92YWx1ZShuZXdfdGltZW91dCk7CisKKyAgICAgICAgY2xvc2VfaW9fY29uZmlnKCk7CisJc3Bpbl91bmxvY2soJmlvX2xvY2spOworfQorCisvKiBnZXQgdGltZW91dCAqLworCitzdGF0aWMgdW5zaWduZWQgY2hhciB3Yl9zbXNjX3dkdF9nZXRfdGltZW91dCh2b2lkKQoreworICAgICAgICB1bnNpZ25lZCBjaGFyIHNldF90aW1lb3V0OworCisJc3Bpbl9sb2NrKCZpb19sb2NrKTsKKyAgICAgICAgb3Blbl9pb19jb25maWcoKTsKKyAgICAgICAgc2VsZWN0X2lvX2RldmljZShJT0RFVl9OTyk7CisgICAgICAgIHNldF90aW1lb3V0ID0gcmVhZF9pb19jcigweEYyKTsKKyAgICAgICAgY2xvc2VfaW9fY29uZmlnKCk7CisJc3Bpbl91bmxvY2soJmlvX2xvY2spOworCisgICAgICAgIHJldHVybiBzZXRfdGltZW91dDsKK30KKworLyogZGlzYWJsZSB3YXRjaGRvZyAqLworCitzdGF0aWMgdm9pZCB3Yl9zbXNjX3dkdF9kaXNhYmxlKHZvaWQpCit7CisgICAgICAgIC8vIHNldCB0aGUgdGltZW91dCB0byAwIHRvIGRpc2FibGUgdGhlIHdhdGNoZG9nCisgICAgICAgIHdiX3Ntc2Nfd2R0X3NldF90aW1lb3V0KDApOworfQorCisvKiBlbmFibGUgd2F0Y2hkb2cgYnkgc2V0dGluZyB0aGUgY3VycmVudCB0aW1lb3V0ICovCisKK3N0YXRpYyB2b2lkIHdiX3Ntc2Nfd2R0X2VuYWJsZSh2b2lkKQoreworICAgICAgICAvLyBzZXQgdGhlIGN1cnJlbnQgdGltZW91dC4uLgorICAgICAgICB3Yl9zbXNjX3dkdF9zZXRfdGltZW91dCh0aW1lb3V0KTsKK30KKworLyogcmVzZXQgdGhlIHRpbWVyICovCisKK3N0YXRpYyB2b2lkIHdiX3Ntc2Nfd2R0X3Jlc2V0X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VTOwogCi0gICAgICAgIC8qIFNjYW4gZWFjaCBub2RlIG9uIHRoZSBidXMgKi8KLSAgICAgICAgZm9yIChjb3VudCA9IGhvc3QtPnNlbGZpZF9jb3VudDsgY291bnQ7IGNvdW50LS0sIHNpZCsrKSB7Ci0gICAgICAgICAgICAgICAgaWYgKHNpZC0+ZXh0ZW5kZWQpCi0gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKwkvKiBTY2FuIGVhY2ggbm9kZSBvbiB0aGUgYnVzICovCisJZm9yIChjb3VudCA9IGhvc3QtPnNlbGZpZF9jb3VudDsgY291bnQ7IGNvdW50LS0sIHNpZCsrKSB7CisJCWlmIChzaWQtPmV4dGVuZGVkKQorCQkJY29udGludWU7CiAKLSAgICAgICAgICAgICAgICBpZiAoIXNpZC0+bGlua19hY3RpdmUpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIG5vZGVpZCsrOwotICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIG5vZGVtZ3Jfbm9kZV9zY2FuX29uZShoaSwgbm9kZWlkKyssIGdlbmVyYXRpb24pOwotICAgICAgICB9CisJCWlmICghc2lkLT5saW5rX2FjdGl2ZSkgeworCQkJbm9kZWlkKys7CisJCQljb250aW51ZTsKKwkJfQorCQlub2RlbWdyX25vZGVfc2Nhbl9vbmUoaGksIG5vZGVpZCsrLCBnZW5lcmF0aW9uKTsKKwl9CiB9CiAKIAotLyogQ2FsbGVyIG5lZWRzIHRvIGhvbGQgbm9kZW1ncl91ZF9jbGFzcy5zdWJzeXMucndzZW0gYXMgcmVhZGVyLiAqLwogc3RhdGljIHZvaWQgbm9kZW1ncl9zdXNwZW5kX25lKHN0cnVjdCBub2RlX2VudHJ5ICpuZSkKIHsKIAlzdHJ1Y3QgY2xhc3NfZGV2aWNlICpjZGV2OwpAQCAtMTMyNiwyMSArMTQyNSwyMiBAQAogCQkgICBOT0RFX0JVU19BUkd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aGNhX2hhbmRsZSwgcmJsb2NrKSAhPSBIX1NVQ0NFU1MpIHsgXAogCQlkZXZfZXJyKGRldiwgIkNhbid0IHF1ZXJ5IGRldmljZSBwcm9wZXJ0aWVzIik7CSAgIAkgICBcCi0JCWtmcmVlKHJibG9jayk7CQkJCQkgICAJICAgXAorCQllaGNhX2ZyZWVfZndfY3RybGJsb2NrKHJibG9jayk7CQkJICAgCSAgIFwKIAkJcmV0dXJuIDA7CQkJCQkgICAJICAgXAogCX0JCQkJCQkJCSAgIFwKIAkJCQkJCQkJCSAgIFwKIAlkYXRhID0gcmJsb2NrLT5uYW1lOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCWtmcmVlKHJibG9jayk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJZWhjYV9mcmVlX2Z3X2N0cmxibG9jayhyYmxvY2spOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCQkJCQkJCSAgIFwKIAlpZiAoKHN0cmNtcCgjbmFtZSwgIm51bV9wb3J0cyIpID09IDApICYmIChlaGNhX25yX3BvcnRzID09IDEpKQkgICBcCiAJCXJldHVybiBzbnByaW50ZihidWYsIDI1NiwgIjFcbiIpOwkJCSAgIFwKQEAgLTc1Miw3ICs3OTAsNyBAQAogCWludCByZXQ7CiAKIAlwcmludGsoS0VSTl9JTkZPICJlSENBIEluZmluaWJhbmQgRGV2aWNlIERyaXZlciAiCi0JICAgICAgICAgICAgICAgICAiKFJlbC46IFNWTkVIQ0FfMDAxNylcbiIpOworCSAgICAgICAgICAgICAgICAgIihSZWwuOiBTVk5FSENBXzAwMTkpXG4iKTsKIAlpZHJfaW5pdCgmZWhjYV9xcF9pZHIpOwogCWlkcl9pbml0KCZlaGNhX2NxX2lkcik7CiAJc3Bpbl9sb2NrX2luaXQoJmVoY2FfcXBfaWRyX2xvY2spOwpkaWZmIC0tZ2l0IGE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ZjAgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvaW5wdXQvbW91c2UvbGlmZWJvb2suYworKysgYi9kcml2ZXJzL2lucHV0L21vdXNlL2xpZmVib29rLmMKQEAgLTIxLDQ3ICsyMSw1MSBAQAogI2luY2x1ZGUgImxpZmVib29rLmgiCiAKIHN0YXRpYyBzdHJ1Y3QgZG1pX3N5c3RlbV9pZCBsaWZlYm9va19kbWlfdGFibGVbXSA9IHsKLSAgICAgICB7Ci0gICAgICAgICAgICAgICAuaWRlbnQgPSAiTGlmZUJvb2sgQiIsCi0gICAgICAgICAgICAgICAubWF0Y2hlcyA9IHsKLSAgICAgICAgICAgICAgICAgICAgICAgRE1JX01BVENIKERNSV9QUk9EVUNUX05BTUUsICJMaWZlQm9vayBCIFNlcmllcyIpLAotICAgICAgICAgICAgICAgfSwKLSAgICAgICB9LAotICAgICAgIHsKLSAgICAgICAgICAgICAgIC5pZGVudCA9ICJMaWZlYm9vayBCIiwKLSAgICAgICAgICAgICAgIC5tYXRjaGVzID0gewotICAgICAgICAgICAgICAgICAgICAgICBETUlfTUFUQ0goRE1JX1BST0RVQ1RfTkFNRSwgIkxJRkVCT09LIEIgU2VyaWVzIiksCi0gICAgICAgICAgICAgICB9LAotICAgICAgIH0sCi0gICAgICAgewotICAgICAgICAgICAgICAgLmlkZW50ID0gIkxpZmVib29rIEIyMTN4L0IyMTUwIiwKLSAgICAgICAgICAgICAgIC5tYXRjaGVzID0gewotICAgICAgICAgICAgICAgICAgICAgICBETUlfTUFUQ0goRE1JX1BST0RVQ1RfTkFNRSwgIkxpZmVCb29rIEIyMTMxL0IyMTMzL0IyMTUwIiksCi0gICAgICAgICAgICAgICB9LAotICAgICAgIH0sCi0gICAgICAgewotICAgICAgICAgICAgICAgLmlkZW50ID0gIlplcGh5ciIsCi0gICAgICAgICAgICAgICAubWF0Y2hlcyA9IHsKLSAgICAgICAgICAgICAgICAgICAgICAgRE1JX01BVENIKERNSV9QUk9EVUNUX05BTUUsICJaR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JYXNtICgibW92ICUlZHIwLCAlJXJheCBcblx0IgorCSAgICAgIm1vdiAlJXJheCwgJVtkcjBdIFxuXHQiCisJICAgICAibW92ICUlZHIxLCAlJXJheCBcblx0IgorCSAgICAgIm1vdiAlJXJheCwgJVtkcjFdIFxuXHQiCisJICAgICAibW92ICUlZHIyLCAlJXJheCBcblx0IgorCSAgICAgIm1vdiAlJXJheCwgJVtkcjJdIFxuXHQiCisJICAgICAibW92ICUlZHIzLCAlJXJheCBcblx0IgorCSAgICAgIm1vdiAlJXJheCwgJVtkcjNdIFxuXHQiCisJICAgICA6IFtkcjBdICI9bSIoZGJfcmVnc1swXSksCisJICAgICAgIFtkcjFdICI9bSIoZGJfcmVnc1sxXSksCisJICAgICAgIFtkcjJdICI9bSIoZGJfcmVnc1syXSksCisJICAgICAgIFtkcjNdICI9bSIoZGJfcmVnc1szXSkKKwkgICAgIDogOiAicmF4Iik7CisjZWxzZQorCWFzbSAoIm1vdiAlJWRyMCwgJSVlYXggXG5cdCIKKwkgICAgICJtb3YgJSVlYXgsICVbZHIwXSBcblx0IgorCSAgICAgIm1vdiAlJWRyMSwgJSVlYXggXG5cdCIKKwkgICAgICJtb3YgJSVlYXgsICVbZHIxXSBcblx0IgorCSAgICAgIm1vdiAlJWRyMiwgJSVlYXggXG5cdCIKKwkgICAgICJtb3YgJSVlYXgsICVbZHIyXSBcblx0IgorCSAgICAgIm1vdiAlJWRyMywgJSVlYXggXG5cdCIKKwkgICAgICJtb3YgJSVlYXgsICVbZHIzXSBcblx0IgorCSAgICAgOiBbZHIwXSAiPW0iKGRiX3JlZ3NbMF0pLAorCSAgICAgICBbZHIxXSAiPW0iKGRiX3JlZ3NbMV0pLAorCSAgICAgICBbZHIyXSAiPW0iKGRiX3JlZ3NbMl0pLAorCSAgICAgICBbZHIzXSAiPW0iKGRiX3JlZ3NbM10pCisJICAgICA6IDogImVheCIpOworI2VuZGlmCit9CisKK3N0YXRpYyB2b2lkIGxvYWRfZGJfcmVncyh1bn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X01PVl9EUl9FWElUSU5HICAgICAgICAweDAwODAwMDAwCisjZGVmaW5lIENQVV9CQVNFRF9VTkNPTkRfSU9fRVhJVElORyAgICAgMHgwMTAwMDAwMAorI2RlZmluZSBDUFVfQkFTRURfQUNUSVZBVEVfSU9fQklUTUFQICAgIDB4MDIwMDAwMDAKKyNkZWZpbmUgQ1BVX0JBU0VEX01TUl9CSVRNQVBTICAgICAgICAgICAweDEwMDAwMDAwCisjZGVmaW5lIENQVV9CQVNFRF9NT05JVE9SX0VYSVRJTkcgICAgICAgMHgyMDAwMDAwMAorI2RlZmluZSBDUFVfQkFTRURfUEFVU0VfRVhJVElORyAgICAgICAgIDB4NDAwMDAwMDAKKworI2RlZmluZSBQSU5fQkFTRURfRVhUX0lOVFJfTUFTSyAweDEKKyNkZWZpbmUgUElOX0JBU0VEX05NSV9FWElUSU5HICAgMHg4CisKKyNkZWZpbmUgVk1fRVhJVF9BQ0tfSU5UUl9PTl9FWElUICAgICAgICAweDAwMDA4MDAwCisjZGVmaW5lIFZNX0VYSVRfSE9TVF9BRERfU1BBQ0VfU0laRSAgICAgMHgwMDAwMDIwMAorCisKKy8qIFZNQ1MgRW5jb2RpbmdzICovCitlbnVtIHZtY3NfZmllbGQgeworCUdVRVNUX0VTX1NFTEVDVE9SICAgICAgICAgICAgICAgPSAweDAwMDAwODAwLAorCUdVRVNUX0NTX1NFTEVDVE9SICAgICAgICAgICAgICAgPSAweDAwMDAwODAyLAorCUdVRVNUX1NTX1NFTEVDVE9SICAgICAgICAgICAgICAgPSAweDAwMDAwODA0LAorCUdVRVNUX0RTX1NFTEVDVE9SICAgICAgICAgICAgICAgPSAweDAwMDAwODA2LAorCUdVRVNUX0ZTX1NFTEVDVE9SICAgICAgICAgICAgICAgPSAweDAwMDAwODA4LAorCUdVRVNUX0dTX1NFTEVDVE9SICAgICAgICAgICAgICAgPSAweDAwMDAwODBhLAorCUdVRVNUX0xEVFJfU0VMRUNUT1IgICAgICAgICAgICAgPSAweDAwMDAwODBjLAorCUdVRVNUX1RSX1NFTEVDVE9SICAgICAgICAgICAgICAgPSAweDAwMDAwODBlLAorCUhPU1RfRVNfU0VMRUNUT1IgICAgICAgICAgICAgICAgPSAweDAwMDAwYzAwLAorCUhPU1RfQ1NfU0VMRUNUT1IgICAgICAgICAgICAgICAgPSAweDAwMDAwYzAyLAorCUhPU1RfU1NfU0VMRUNUT1IgICAgICAgICAgICAgICAgPSAweDAwMDAwYzA0LAorCUhPU1RfRFNfU0VMRUNUT1IgICAgICAgICAgICAgICAgPSAweDAwMDAwYzA2LAorCUhPU1RfRlNfU0VMRUNUT1IgICAgICAgICAgICAgICAgPSAweDAwMDAwYzA4LAorCUhPU1RfR1NfU0VMRUNUT1IgICAgICAgICAgICAgICAgPSAweDAwMDAwYzBhLAorCUhPU1RfVFJfU0VMRUNUT1IgICAgICAgICAgICAgICAgPSAweDAwMDAwYzBjLAorCUlPX0JJVE1BUF9BICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAyMDAwLAorCUlPX0JJVE1BUF9BX0hJR0ggICAgICAgICAgICAgICAgPSAweDAwMDAyMDAxLAorCUlPX0JJVE1BUF9CICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAyMDAyLAorCUlPX0JJVE1BUF9CX0hJR0ggICAgICAgICAgICAgICAgPSAweDAwMDAyMDAzLAorCU1TUl9CSVRNQVAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAyMDA0LAorCU1TUl9CSVRNQVBfSElHSCAgICAgICAgICAgICAgICAgPSAweDAwMDAyMDA1LAorCVZNX0VYSVRfTVNSX1NUT1JFX0FERFIgICAgICAgICAgPSAweDAwMDAyMDA2LAorCVZNX0VYSVRfTVNSX1NUT1JFX0FERFJfSElHSCAgICAgPSAweDAwMDAyMDA3LAorCVZNX0VYSVRfTVNSX0xPQURfQUREUiAgICAgICAgICAgPSAweDAwMDAyMDA4LAorCVZNX0VYSVRfTVNSX0xPQURfQUREUl9ISUdIICAgICAgPSAweDAwMDAyMDA5LAorCVZNX0VOVFJZX01TUl9MT0FEX0FERFIgICAgICAgICAgPSAweDAwMDAyMDBhLAorCVZNX0VOVFJZX01TUl9MT0FEX0FERFJfSElHSCAgICAgPSAweDAwMDAyMDBiLAorCVRTQ19PRkZTRVQgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDAyMDEwLAorCVRTQ19PRkZTRVRfSElHSCAgICAgICAgICAgICAgICAgPSAweDAwMDAyMDExLAorCVZJUlRVQUxfQVBJQ19QQUdFX0FERFIgICAgICAgICAgPSAweDAwMDAyMDEyLAorCVZJUlRVQUxfQVBJQ19QQUdFX0FERFJfSElHSCAgICAgPSAweDAwMDAyMDEzLAorCVZNQ1NfTElOS19QT0lOVEVSICAgICAgICAgICAgICAgPSAweDAwMDAyODAwLAorCVZNQ1NfTElOS19QT0lOVEVSX0hJR0ggICAgICAgICAgPSAweDAwMDAyODAxLAorCUdVRVNUX0lBMzJfREVCVUdDVEwgICAgICAgICAgICAgPSAweDAwMDAyODAyLAorCUdVRVNUX0lBMzJfREVCVUdDVExfSElHSCAgICAgICAgPSAweDAwMDAyODAzLAorCVBJTl9CQVNFRF9WTV9FWEVDX0NPTlRST0wgICAgICAgPSAweDAwMDA0MDAwLAorCUNQVV9CQVNFRF9WTV9FWEVDX0NPTlRST0wgICAgICAgPSAweDAwMDA0MDAyLAorCUVYQ0VQVElPTl9CSVRNQVAgICAgICAgICAgICAgICAgPSAweDAwMDA0MDA0LAorCVBBR0VfRkFVTFRfRVJST1JfQ09ERV9NQVNLICAgICAgPSAweDAwMDA0MDA2LAorCVBBR0VfRkFVTFRfRVJST1JfQ09ERV9NQVRDSCAgICAgPSAweDAwMDA0MDA4LAorCUNSM19UQVJHRVRfQ09VTlQgICAgICAgICAgICAgICAgPSAweDAwMDA0MDBhLAorCVZNX0VYSVRfQ09OVFJPTFMgICAgICAgICAgICAgICAgPSAweDAwMDA0MDBjLAorCVZNX0VYSVRfTVNSX1NUT1JFX0NPVU5UICAgICAgICAgPSAweDAwMDA0MDBlLAorCVZNX0VYSVRfTVNSX0xPQURfQ09VTlQgICAgICAgICAgPSAweDAwMDA0MDEwLAorCVZNX0VOVFJZX0NPTlRST0xTICAgICAgICAgICAgICAgPSAweDAwMDA0MDEyLAorCVZNX0VOVFJZX01TUl9MT0FEX0NPVU5UICAgICAgICAgPSAweDAwMDA0MDE0LAorCVZNX0VOVFJZX0lOVFJfSU5GT19GSUVMRCAgICAgICAgPSAweDAwMDA0MDE2LAorCVZNX0VOVFJZX0VYQ0VQVElPTl9FUlJPUl9DT0RFICAgPSAweDAwMDA0MDE4LAorCVZNX0VOVFJZX0lOU1RSVUNUSU9OX0xFTiAgICAgICAgPSAweDAwMDA0MDFhLAorCVRQUl9USFJFU0hPTEQgICAgICAgICAgICAgICAgICAgPSAweDAwMDA0MDFjLAorCVNFQ09OREFSWV9WTV9FWEVDX0NPTlRST0wgICAgICAgPSAweDAwMDA0MDFlLAorCVZNX0lOU1RSVUNUSU9OX0VSUk9SICAgICAgICAgICAgPSAweDAwMDA0NDAwLAorCVZNX0VYSVRfUkVBU09OICAgICAgICAgICAgICAgICAgPSAweDAwMDA0NDAyLAorCVZNX0VYSVRfSU5UUl9JTkZPICAgICAgICAgICAgICAgPSAweDAwMDA0NDA0LAorCVZNX0VYSVRfSU5UUl9FUlJPUl9DT0RFICAgICAgICAgPSAweDAwMDA0NDA2LAorCUlEVF9WRUNUT1JJTkdfSU5GT19GSUVMRCAgICAgICAgPSAweDAwMDA0NDA4LAorCUlEVF9WRUNUT1JJTkdfRVJST1JfQ09ERSAgICAgICAgPSAweDAwMDA0NDBhLAorCVZNX0VYSVRfSU5TVFJVQ1RJT05fTEVOICAgICAgICAgPSAweDAwMDA0NDBjLAorCVZNWF9JTlNUUlVDVElPTl9JTkZPICAgICAgICAgICAgPSAweDAwMDA0NDBlLAorCUdVRVNUX0VTX0xJTUlUICAgICAgICAgICAgICAgICAgPSAweDAwMDA0ODAwLAorCUdVRVNUX0NTX0xJTUlUICAgICAgICAgICAgICAgICAgPSAweDAwMDA0ODAyLAorCUdVRVNUX1NTX0xJTUlUICAgICAgICAgICAgICAgICAgPSAweDAwMDA0ODA0LAorCUdVRVNUX0RTX0xJTUlUICAgICAgICAgICAgICAgICAgPSAweDAwMDA0ODA2LAorCUdVRVNUX0ZTX0xJTUlUICAgICAgICAgICAgICAgICAgPSAweDAwMDA0ODA4LAorCUdVRVNUX0dTX0xJTUlUICAgICAgICAgICAgICAgICAgPSAweDAwMDA0ODBhLAorCUdVRVNUX0xEVFJfTElNSVQgICAgICAgICAgICAgICAgPSAweDAwMDA0ODBjLAorCUdVRVNUX1RSX0xJTUlUICAgICAgICAgICAgICAgICAgPSAweDAwMDA0ODBlLAorCUdVRVNUX0dEVFJfTElNSVQgICAgICAgICAgICAgICAgPSAweDAwMDA0ODEwLAorCUdVRVNUX0lEVFJfTElNSVQgICAgICAgICAgICAgICAgPSAweDAwMDA0ODEyLAorCUdVRVNUX0VTX0FSX0JZVEVTICAgICAgICAgICAgICAgPSAweDAwMDA0ODE0LAorCUdVRVNUX0NTX0FSX0JZVEVTICAgICAgICAgICAgICAgPSAweDAwMDA0ODE2LAorCUdVRVNUX1NTX0FSX0JZVEVTICAgICAgICAgICAgICAgPSAweDAwMDA0ODE4LAorCUdVRVNUX0RTX0FSX0JZVEVTICAgICAgICAgICAgICAgPSAweDAwMDA0ODFhLAorCUdVRVNUX0ZTX0FSX0JZVEVTICAgICAgICAgICAgICAgPSAweDAwMDA0ODFjLAorCUdVRVNUX0dTX0FSX0JZVEVTICAgICAgICAgICAgICAgPSAweDAwMDA0ODFlLAorCUdVRVNUX0xEVFJfQVJfQllURVMgICAgICAgICAgICAgPSAweDAwMDA0ODIwLAorCUdVRVNUX1RSX0FSX0JZVEVTICAgICAgICAgICAgICAgPSAweDAwMDA0ODIyLAorCUdVRVNUX0lOVEVSUlVQVElCSUxJVFlfSU5GTyAgICAgPSAweDAwMDA0ODI0LAorCUdVRVNUX0FDVElWSVRZX1NUQVRFICAgICAgICAgICAgPSAwWDAwMDA0ODI2LAorCUdVRVNUX1NZU0VOVEVSX0NTICAgICAgICAgICAgICAgPSAweDAwMDA0ODJBLAorCUhPU1RfSUEzMl9TWVNFTlRFUl9DUyAgICAgICAgICAgPSAweDAwMDA0YzAwLAorCUNSMF9HVUVTVF9IT1NUX01BU0sgICAgICAgICAgICAgPSAweDAwMDA2MDAwLAorCUNSNF9HVUVTVF9IT1NUX01BU0sgICAgICAgICAgICAgPSAweDAwMDA2MDAyLAorCUNSMF9SRUFEX1NIQURPVyAgICAgICAgICAgICAgICAgPSAweDAwMDA2MDA0LAorCUNSNF9SRUFEX1NIQURPVyAgICAgICAgICAgICAgICAgPSAweDAwMDA2MDA2LAorCUNSM19UQVJHRVRfVkFMVUUwICAgICAgICAgICAgICAgPSAweDAwMDA2MDA4LAorCUNSM19UQVJHRVRfVkFMVUUxICAgICAgICAgICAgICAgPSAweDAwMDA2MDBhLAorCUNSM19UQVJHRVRfVkFMVUUyICAgICAgICAgICAgICAgPSAweDAwMDA2MDBjLAorCUNSM19UQVJHRVRfVkFMVUUzICAgICAgICAgICAgICAgPSAweDAwMDA2MDBlLAorCUVYSVRfUVVBTElGSUNBVElPTiAgICAgICAgICAgICAgPSAweDAwMDA2NDAwLAorCUdVRVNUX0xJTkVBUl9BRERSRVNTICAgICAgICAgICAgPSAweDAwMDA2NDBhLAorCUdVRVNUX0NSMCAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODAwLAorCUdVRVNUX0NSMyAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODAyLAorCUdVRVNUX0NSNCAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODA0LAorCUdVRVNUX0VTX0JBU0UgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODA2LAorCUdVRVNUX0NTX0JBU0UgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODA4LAorCUdVRVNUX1NTX0JBU0UgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODBhLAorCUdVRVNUX0RTX0JBU0UgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODBjLAorCUdVRVNUX0ZTX0JBU0UgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODBlLAorCUdVRVNUX0dTX0JBU0UgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODEwLAorCUdVRVNUX0xEVFJfQkFTRSAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODEyLAorCUdVRVNUX1RSX0JBU0UgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODE0LAorCUdVRVNUX0dEVFJfQkFTRSAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODE2LAorCUdVRVNUX0lEVFJfQkFTRSAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODE4LAorCUdVRVNUX0RSNyAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODFhLAorCUdVRVNUX1JTUCAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODFjLAorCUdVRVNUX1JJUCAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODFlLAorCUdVRVNUX1JGTEFHUyAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2ODIwLAorCUdVRVNUX1BFTkRJTkdfREJHX0VYQ0VQVElPTlMgICAgPSAweDAwMDA2ODIyLAorCUdVRVNUX1NZU0VOVEVSX0VTUCAgICAgICAgICAgICAgPSAweDAwMDA2ODI0LAorCUdVRVNUX1NZU0VOVEVSX0VJUCAgICAgICAgICAgICAgPSAweDAwMDA2ODI2LAorCUhPU1RfQ1IwICAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzAwLAorCUhPU1RfQ1IzICAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzAyLAorCUhPU1RfQ1I0ICAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzA0LAorCUhPU1RfRlNfQkFTRSAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzA2LAorCUhPU1RfR1NfQkFTRSAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzA4LAorCUhPU1RfVFJfQkFTRSAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzBhLAorCUhPU1RfR0RUUl9CQVNFICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzBjLAorCUhPU1RfSURUUl9CQVNFICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzBlLAorCUhPU1RfSUEzMl9TWVNFTlRFUl9FU1AgICAgICAgICAgPSAweDAwMDA2YzEwLAorCUhPU1RfSUEzMl9TWVNFTlRFUl9FSVAgICAgICAgICAgPSAweDAwMDA2YzEyLAorCUhPU1RfUlNQICAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzE0LAorCUhPU1RfUklQICAgICAgICAgICAgICAgICAgICAgICAgPSAweDAwMDA2YzE2LAorfTsKKworI2RlZmluZSBWTVhfRVhJVF9SRUFTT05TX0ZBSUxFRF9WTUVOVFJZICAgICAgICAgMHg4MDAwMDAwMAorCisjZGVmaW5lIEVYSVRfUkVBU09OX0VYQ0VQVElPTl9OTUkgICAgICAgMAorI2RlZmluZSBFWElUX1JFQVNPTl9FWFRFUk5BTF9JTlRFUlJVUFQgIDEKKworI2RlZmluZSBFWElUX1JFQVNPTl9QRU5ESU5HX0lOVEVSUlVQVCAgIDcKKworI2RlZmluZSBFWElUX1JFQVNPTl9UQVNLX1NXSVRDSCAgICAgICAgIDkKKyNkZWZpbmUgRVhJVF9SRUFTT05fQ1BVSUQgICAgICAgICAgICAgICAxMAorI2RlZmluZSBFWElUX1JFQVNPTl9ITFQgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEVYSVRfUkVBU09OX0lOVkxQRyAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgRVhJVF9SRUFTT05fUkRQTUMgICAgICAgICAgICAgICAxNQorI2RlZmluZSBFWElUX1JFQVNPTl9SRFRTQyAgICAgICAgICAgICAgIDE2CisjZGVm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VNLICAgICAgICAweDcwMCAgICAgICAgICAgLyogMTA6OCAqLworI2RlZmluZSBJTlRSX0lORk9fREVMSUVWRVJfQ09ERV9NQVNLICAgIDB4ODAwICAgICAgICAgICAvKiAxMSAqLworI2RlZmluZSBJTlRSX0lORk9fVkFMSURfTUFTSyAgICAgICAgICAgIDB4ODAwMDAwMDAgICAgICAvKiAzMSAqLworCisjZGVmaW5lIFZFQ1RPUklOR19JTkZPX1ZFQ1RPUl9NQVNLICAgICAgICAgICAJSU5UUl9JTkZPX1ZFQ1RPUl9NQVNLCisjZGVmaW5lIFZFQ1RPUklOR19JTkZPX1RZUEVfTUFTSyAgICAgICAgCUlOVFJfSU5GT19JTlRSX1RZUEVfTUFTSworI2RlZmluZSBWRUNUT1JJTkdfSU5GT19ERUxJRVZFUl9DT0RFX01BU0sgICAgCUlOVFJfSU5GT19ERUxJRVZFUl9DT0RFX01BU0sKKyNkZWZpbmUgVkVDVE9SSU5HX0lORk9fVkFMSURfTUFTSyAgICAgICAJSU5UUl9JTkZPX1ZBTElEX01BU0sKKworI2RlZmluZSBJTlRSX1RZUEVfRVhUX0lOVFIgICAgICAgICAgICAgICgwIDw8IDgpIC8qIGV4dGVybmFsIGludGVycnVwdCAqLworI2RlZmluZSBJTlRSX1RZUEVfRVhDRVBUSU9OICAgICAgICAgICAgICgzIDw8IDgpIC8qIHByb2Nlc3NvciBleGNlcHRpb24gKi8KKworLyoKKyAqIEV4aXQgUXVhbGlmaWNhdGlvbnMgZm9yIE1PViBmb3IgQ29udHJvbCBSZWdpc3RlciBBY2Nlc3MKKyAqLworI2RlZmluZSBDT05UUk9MX1JFR19BQ0NFU1NfTlVNICAgICAgICAgIDB4NyAgICAgLyogMjowLCBudW1iZXIgb2YgY29udHJvbCByZWdpc3RlciAqLworI2RlZmluZSBDT05UUk9MX1JFR19BQ0NFU1NfVFlQRSAgICAgICAgIDB4MzAgICAgLyogNTo0LCBhY2Nlc3MgdHlwZSAqLworI2RlZmluZSBDT05UUk9MX1JFR19BQ0NFU1NfUkVHICAgICAgICAgIDB4ZjAwICAgLyogMTA6OCwgZ2VuZXJhbCBwdXJwb3NlIHJlZ2lzdGVyICovCisjZGVmaW5lIExNU1dfU09VUkNFX0RBVEFfU0hJRlQgMTYKKyNkZWZpbmUgTE1TV19TT1VSQ0VfREFUQSAgKDB4RkZGRiA8PCBMTVNXX1NPVVJDRV9EQVRBX1NISUZUKSAvKiAxNjozMSBsbXN3IHNvdXJjZSAqLworI2RlZmluZSBSRUdfRUFYICAgICAgICAgICAgICAgICAgICAgICAgICgwIDw8IDgpCisjZGVmaW5lIFJFR19FQ1ggICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgOCkKKyNkZWZpbmUgUkVHX0VEWCAgICAgICAgICAgICAgICAgICAgICAgICAoMiA8PCA4KQorI2RlZmluZSBSRUdfRUJYICAgICAgICAgICAgICAgICAgICAgICAgICgzIDw8IDgpCisjZGVmaW5lIFJFR19FU1AgICAgICAgICAgICAgICAgICAgICAgICAgKDQgPDwgOCkKKyNkZWZpbmUgUkVHX0VCUCAgICAgICAgICAgICAgICAgICAgICAgICAoNSA8PCA4KQorI2RlZmluZSBSRUdfRVNJICAgICAgICAgICAgICAgICAgICAgICAgICg2IDw8IDgpCisjZGVmaW5lIFJFR19FREkgICAgICAgICAgICAgICAgICAgICAgICAgKDcgPDwgOCkKKyNkZWZpbmUgUkVHX1I4ICAgICAgICAgICAgICAgICAgICAgICAgICg4IDw8IDgpCisjZGVmaW5lIFJFR19SOSAgICAgICAgICAgICAgICAgICAgICAgICAoOSA8PCA4KQorI2RlZmluZSBSRUdfUjEwICAgICAgICAgICAgICAgICAgICAgICAgKDEwIDw8IDgpCisjZGVmaW5lIFJFR19SMTEgICAgICAgICAgICAgICAgICAgICAgICAoMTEgPDwgOCkKKyNkZWZpbmUgUkVHX1IxMiAgICAgICAgICAgICAgICAgICAgICAgICgxMiA8PCA4KQorI2RlZmluZSBSRUdfUjEzICAgICAgICAgICAgICAgICAgICAgIC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gKi8KKwltYWNpb19yZWxlYXNlX3Jlc291cmNlcyhtZGV2KTsKKyNlbmRpZgorCisJLyogR2V0IHJpZCBvZiBtZSAqLworCWtmcmVlKHJtKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHJhY2ttZXRlcl9zaHV0ZG93bihzdHJ1Y3QgbWFjaW9fZGV2KiBtZGV2KQoreworCXN0cnVjdCByYWNrbWV0ZXIgKnJtID0gZGV2X2dldF9kcnZkYXRhKCZtZGV2LT5vZmRldi5kZXYpOworCisJaWYgKHJtID09IE5VTEwpCisJCXJldHVybiAtRU5PREVWOworCisJLyogU3RvcCBDUFUgc25pZmZlciB0aW1lciAmIHdvcmsgcXVldWVzICovCisJcmFja21ldGVyX3N0b3BfY3B1X3NuaWZmZXIocm0pOworCisJLyogU3RvcC9yZXNldCBkYmRtYSAqLworCURCRE1BX0RPX1JFU0VUKHJtLT5kbWFfcmVncyk7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIHN0cnVjdCBvZl9kZXZpY2VfaWQgcmFja21ldGVyX21hdGNoW10gPSB7CisJeyAubmFtZSA9ICJpMnMiIH0sCisJeyB9Cit9OworCitzdGF0aWMgc3RydWN0IG1hY2lvX2RyaXZlciByYWNrbWV0ZXJfZHJ2ID0geworCS5uYW1lID0gInJhY2ttZXRlciIsCisJLm93bmVyID0gVEhJU19NT0RVTEUsCisJLm1hdGNoX3RhYmxlID0gcmFja21ldGVyX21hdGNoLAorCS5wcm9iZSA9IHJhY2ttZXRlcl9wcm9iZSwKKwkucmVtb3ZlID0gcmFja21ldGVyX3JlbW92ZSwKKwkuc2h1dGRvd24gPSByYWNrbWV0ZXJfc2h1dGRvd24sCit9OworCisKK3N0YXRpYyBpbnQgX19pbml0IHJhY2ttZXRlcl9pbml0KHZvaWQpCit7CisJcHJfZGVidWcoInJhY2ttZXRlcl9pbml0KClcbiIpOworCisJcmV0dXJuIG1hY2lvX3JlZ2lzdGVyX2RyaXZlcigmcmFja21ldGVyX2R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1hdHJpeFs1XSpjb3N0aCAtIG1hdHJpeFsyXSpzaW50aCkvMTAwMDsKKwl9Cit9CisKKworCitzdGF0aWMgaW50IG92NzY3MF90X3NhdChzdHJ1Y3QgaTJjX2NsaWVudCAqY2xpZW50LCBpbnQgdmFsdWUpCit7CisJc3RydWN0IG92NzY3MF9pbmZvICppbmZvID0gaTJjX2dldF9jbGllbnRkYXRhKGNsaWVudCk7CisJaW50IG1hdHJpeFtDTUFUUklYX0xFTl07CisJaW50IHJldDsKKworCWluZm8tPnNhdCA9IHZhbHVlOworCW92NzY3MF9jYWxjX2NtYXRyaXgoaW5mbywgbWF0cml4KTsKKwlyZXQgPSBvdjc2NzBfc3RvcmVfY21hdHJpeChjbGllbnQsIG1hdHJpeCk7CisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCBvdjc2NzBfcV9zYXQoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgX19zMzIgKnZhbHVlKQoreworCXN0cnVjdCBvdjc2NzBfaW5mbyAqaW5mbyA9IGkyY19nZXRfY2xpZW50ZGF0YShjbGllbnQpOworCisJKnZhbHVlID0gaW5mby0+c2F0OworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IG92NzY3MF90X2h1ZShzdHJ1Y3QgaTJjX2NsaWVudCAqY2xpZW50LCBpbnQgdmFsdWUpCit7CisJc3RydWN0IG92NzY3MF9pbmZvICppbmZvID0gaTJjX2dldF9jbGllbnRkYXRhKGNsaWVudCk7CisJaW50IG1hdHJpeFtDTUFUUklYX0xFTl07CisJaW50IHJldDsKKworCWlmICh2YWx1ZSA8IC0xODAgfHwgdmFsdWUgPiAxODApCisJCXJldHVybiAtRUlOVkFMOworCWluZm8tPmh1ZSA9IHZhbHVlOworCW92NzY3MF9jYWxjX2NtYXRyaXgoaW5mbywgbWF0cml4KTsKKwlyZXQgPSBvdjc2NzBfc3RvcmVfY21hdHJpeChjbGllbnQsIG1hdHJpeCk7CisJcmV0dXJuIHJldDsKK30KKworCitzdGF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dWUpOworCWlmIChyZXQgPj0gMCkKKwkJcmV0dXJuIDA7CisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCBvdjc2NzBfc19jdHJsKHN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQsIHN0cnVjdCB2NGwyX2NvbnRyb2wgKmN0cmwpCit7CisJc3RydWN0IG92NzY3MF9jb250cm9sICpvY3RybCA9IG92NzY3MF9maW5kX2NvbnRyb2woY3RybC0+aWQpOworCWludCByZXQ7CisKKwlpZiAob2N0cmwgPT0gTlVMTCkKKwkJcmV0dXJuIC1FSU5WQUw7CisJcmV0ID0gIG9jdHJsLT50d2VhayhjbGllbnQsIGN0cmwtPnZhbHVlKTsKKwlpZiAocmV0ID49IDApCisJCXJldHVybiAwOworCXJldHVybiByZXQ7Cit9CisKKworCisKKworCisvKgorICogQmFzaWMgaTJjIHN0dWZmLgorICovCitzdGF0aWMgc3RydWN0IGkyY19kcml2ZXIgb3Y3NjcwX2RyaXZlcjsKKworc3RhdGljIGludCBvdjc2NzBfYXR0YWNoKHN0cnVjdCBpMmNfYWRhcHRlciAqYWRhcHRlcikKK3sKKwlpbnQgcmV0OworCXN0cnVjdCBpMmNfY2xpZW50ICpjbGllbnQ7CisJc3RydWN0IG92NzY3MF9pbmZvICppbmZvOworCisJLyoKKwkgKiBGb3Igbm93OiBvbmx5IGRlYWwgd2l0aCBhZGFwdGVycyB3ZSByZWNvZ25pemUuCisJICovCisJaWYgKGFkYXB0ZXItPmlkICE9IEkyQ19IV19TTUJVU19DQUZFKQorCQlyZXR1cm4gLUVOT0RFVjsKKworCWNsaWVudCA9IGt6YWxsb2Moc2l6ZW9mIChzdHJ1Y3QgaTJjX2NsaWVudCksIEdGUF9LRVJORUwpOworCWlmICghIGNsaWVudCkKKwkJcmV0dXJuIC1FTk9NRU07CisJY2xpZW50LT5hZGFwdGVyID0gYWRhcHRlcjsKKwljbGllbnQtPmFkZHIgPSBPVjc2NzBfSTJDX0FERFI7CisJY2xpZW50LT5k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iAqLwogCQkubmFtZSAgICAgICAgICAgPSAiQVZlck1lZGlhIFRWIEh5YnJpZCBBMTZBUiIsCiAJCS5hdWRpb19jbG9jayAgICA9IDB4MTg3ZGU3LAotCQkudHVuZXJfdHlwZSAgICAgPSBUVU5FUl9QSElMSVBTX1REQTgyOTAsIC8qIHVudGVzdGVkICovCisJCS50dW5lcl90eXBlICAgICA9IFRVTkVSX1BISUxJUFNfVEQxMzE2LCAvKiB1bnRlc3RlZCAqLwogCQkucmFkaW9fdHlwZSAgICAgPSBUVU5FUl9URUE1NzY3LCAvKiB1bnRlc3RlZCAqLwogCQkudHVuZXJfYWRkciAgICAgPSBBRERSX1VOU0VULAogCQkucmFkaW9fYWRkciAgICAgPSBBRERSX1VOU0VULApAQCAtMzAyMiw2ICszMDI1LDE1OCBAQAogCQkJLmFtdXggICA9IExJTkUxLAogCQl9LAogCX0sCisJW1NBQTcxMzRfQk9BUkRfUElOTkFDTEVfUENUVl8zMTBpXSA9IHsKKwkJLm5hbWUgICAgICAgICAgID0gIlBpbm5hY2xlIFBDVFYgMzEwaSIsCisJCS5hdWRpb19jbG9jayAgICA9IDB4MDAxODdkZTcsCisJCS50dW5lcl90eXBlICAgICA9IFRVTkVSX1BISUxJUFNfVERBODI5MCwKKwkJLnJhZGlvX3R5cGUgICAgID0gVU5TRVQsCisJCS50dW5lcl9hZGRyICAgICA9IEFERFJfVU5TRVQsCisJCS5yYWRpb19hZGRyICAgICA9IEFERFJfVU5TRVQsCisJCS5tcGVnICAgICAgICAgICA9IFNBQTcxMzRfTVBFR19EVkIsCisJCS5ncGlvbWFzayAgICAgICA9IDB4MDAwMjAwMDAwLAorCQkuaW5wdXRzICAgICAgICAgPSB7eworCQkJLm5hbWUgPSBuYW1lX3R2LAorCQkJLnZtdXggPSA0LAorCQkJLmFtdXggPSBUViwKKwkJCS50diAgID0gMSwKKwkJfSx7CisJCQkubmFtZSA9IG5hbWVfY29tcDEsCisJCQkudm11eCA9IDEsCisJCQkuYW11eCA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USU9OX18sIElGQl9zaXplKTsKKwkJcmV0dXJuIC1FTk9NRU07CisJfQorCXJldHVybiAwOworfQorCisvKgorICogdXNidmlzaW9uX2RlY29tcHJlc3NfZnJlZSgpCisgKgorICogZnJlZXMgaW50ZXJtZWRpYXRlIGJ1ZmZlciBmb3IgZGVjb21wcmVzc2lvbgorICovCit2b2lkIHVzYnZpc2lvbl9kZWNvbXByZXNzX2ZyZWUoc3RydWN0IHVzYl91c2J2aXNpb24gKnVzYnZpc2lvbikKK3sKKwlpZiAodXNidmlzaW9uLT5JbnRyYUZyYW1lQnVmZmVyICE9IE5VTEwpIHsKKwkJdmZyZWUodXNidmlzaW9uLT5JbnRyYUZyYW1lQnVmZmVyKTsKKwkJdXNidmlzaW9uLT5JbnRyYUZyYW1lQnVmZmVyID0gTlVMTDsKKwl9Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEhlcmUgY29tZXMgdGhlIGRhdGEgcGFyc2luZyBzdHVmZiB0aGF0IGlzIHJ1biBhcyBpbnRlcnJ1cHQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKgorICogdXNidmlzaW9uX2ZpbmRfaGVhZGVyKCkKKyAqCisgKiBMb2NhdGUgb25lIG9mIHN1cHBvcnRlZCBoZWFkZXIgbWFya2VycyBpbiB0aGUgc2NyYXRjaCBidWZmZXIuCisgKi8KK3N0YXRpYyBlbnVtIFBhcnNlU3RhdGUgdXNidmlzaW9uX2ZpbmRfaGVhZGVyKHN0cnVjdCB1c2JfdXNidmlzaW9uICp1c2J2aXNpb24pCit7CisJc3RydWN0IHVzYnZpc2lvbl9mcmFtZSAqZnJhbWU7CisJaW50IGZvdW5kSGVhZGVyID0gMDsKKworCWZyYW1lID0gdXNidmlzaW9uLT5jdXJGcmFtZTsKKworCXdoaWxlIChzY3JhdGNoX2dldF9oZWFk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JlcXVlc3RfaW50cmEgKHN0cnVjdCB1c2JfdXNidmlzaW9uICp1c2J2aXNpb24pCit7CisJaW50IGVyckNvZGUgPSAwOworCXVuc2lnbmVkIGNoYXIgYnVmZmVyWzFdOworCisJUERFQlVHKERCR19JUlEsICIiKTsKKwl1c2J2aXNpb24tPnJlcXVlc3RJbnRyYSA9IDA7CisJYnVmZmVyWzBdID0gMDsKKwl1c2J2aXNpb25fd3JpdGVfcmVnX2lycSh1c2J2aXNpb24sIFVTQlZJU0lPTl9GT1JDRV9JTlRSQSwgYnVmZmVyLCAxKTsKKwlyZXR1cm4gZXJyQ29kZTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIHVzYnZpc2lvbiB1dGlsaXR5IGZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2ludCB1c2J2aXNpb25fcG93ZXJfb2ZmKHN0cnVjdCB1c2JfdXNidmlzaW9uICp1c2J2aXNpb24pCit7CisJaW50IGVyckNvZGUgPSAwOworCisJUERFQlVHKERCR19GVU5DLCAiIik7CisKKwllcnJDb2RlID0gdXNidmlzaW9uX3dyaXRlX3JlZyh1c2J2aXNpb24sIFVTQlZJU0lPTl9QV1JfUkVHLCBVU0JWSVNJT05fU1NQTkRfRU4pOworCWlmIChlcnJDb2RlID09IDEpIHsKKwkJdXNidmlzaW9uLT5wb3dlciA9IDA7CisJfQorCVBERUJVRyhEQkdfRlVOQywgIiVzOiBlcnJDb2RlICVkIiwgKGVyckNvZGUhPTEpPyJFUlJPUiI6InBvd2VyIGlzIG9mZiIsIGVyckNvZGUpOworCXJldHVybiBlcnJDb2RlOworfQorCisvKgorICogdXNidmlzaW9uX3NldF92aWRlb19mb3JtYXQoKQorICoKKyAqLworc3RhdGljIGludCB1c2J2aXNpb25fc2V0X3ZpZGVvX2Zvcm1hdChzdHJ1Y3QgdXNiX3VzYnZpc2lvbiAqdXNidmlzaW9uLCBpbnQgZm9ybWF0KQore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aWR4IDwgbGVuOyBpZHgrKykgeworCQkJUERFQlVHKERCR19JMkMsIndyb3RlICV4IGF0IGFkZHJlc3MgJXgiLCAodW5zaWduZWQgY2hhcilidWZbaWR4XSwgYWRkcik7CisJCX0KKwl9CisJcmV0dXJuIGxlbjsKK30KKworc3RhdGljIGludCB1c2J2aXNpb25faTJjX3dyaXRlKHZvaWQgKmRhdGEsIHVuc2lnbmVkIGNoYXIgYWRkciwgY2hhciAqYnVmLAorCQkJICAgIHNob3J0IGxlbikKK3sKKwljaGFyICpidWZQdHIgPSBidWY7CisJaW50IHJldHZhbDsKKwlpbnQgd3Jjb3VudCA9IDA7CisJaW50IGNvdW50OworCWludCBtYXhMZW4gPSA0OworCXN0cnVjdCB1c2JfdXNidmlzaW9uICp1c2J2aXNpb24gPSAoc3RydWN0IHVzYl91c2J2aXNpb24gKikgZGF0YTsKKworCXdoaWxlIChsZW4gPiAwKSB7CisJCWNvdW50ID0gKGxlbiA+IG1heExlbikgPyBtYXhMZW4gOiBsZW47CisJCXJldHZhbCA9IHVzYnZpc2lvbl9pMmNfd3JpdGVfbWF4NCh1c2J2aXNpb24sIGFkZHIsIGJ1ZlB0ciwgY291bnQpOworCQlpZiAocmV0dmFsID4gMCkgeworCQkJbGVuIC09IGNvdW50OworCQkJYnVmUHRyICs9IGNvdW50OworCQkJd3Jjb3VudCArPSBjb3VudDsKKwkJfSBlbHNlCisJCQlyZXR1cm4gKHJldHZhbCA8IDApID8gcmV0dmFsIDogLUVGQVVMVDsKKwl9CisJcmV0dXJuIHdyY291bnQ7Cit9CisKK3N0YXRpYyBpbnQgdXNidmlzaW9uX2kyY19yZWFkKHZvaWQgKmRhdGEsIHVuc2lnbmVkIGNoYXIgYWRkciwgY2hhciAqYnVmLAorCQkJICAgc2hvcnQgbGVuKQoreworCWNoYXIgdGVtcFs0XTsKKwlpbnQgcmV0dmFsLCBpOworCWludCByZGNvdW50ID0gMDsKKwlpbnQgY291bnQ7CisJc3RydWN0IHVzYl91c2J2aXNpb24gKnVzYnZpc2lvbiA9IChzdHJ1Y3QgdXNiX3VzYnZpc2lvbiAqKSBkYXRhOworCisJd2hpbGUgKGxlbiA+IDApIHsKKwkJY291bnQgPSAobGVuID4gMykgPyA0IDogbGVuOworCQlyZXR2YWwgPSB1c2J2aXNpb25faTJjX3JlYWRfbWF4NCh1c2J2aXNpb24sIGFkZHIsIHRlbXAsIGNvdW50KTsKKwkJaWYgKHJldHZhbCA+IDApIHsKKwkJCWZvciAoaSA9IDA7IGkgPCBsZW47IGkrKykKKwkJCQlidWZbcmRjb3VudCArIGldID0gdGVtcFtpXTsKKwkJCWxlbiAtPSBjb3VudDsKKwkJCXJkY291bnQgKz0gY291bnQ7CisJCX0gZWxzZQorCQkJcmV0dXJuIChyZXR2YWwgPCAwKSA/IHJldHZhbCA6IC1FRkFVTFQ7CisJfQorCXJldHVybiByZGNvdW50OworfQorCitzdGF0aWMgc3RydWN0IGkyY19hbGdvX3VzYl9kYXRhIGkyY19hbGdvX3RlbXBsYXRlID0geworCS5kYXRhCQk9IE5VTEwsCisJLmluYgkJPSB1c2J2aXNpb25faTJjX3JlYWQsCisJLm91dGIJCT0gdXNidmlzaW9uX2kyY193cml0ZSwKKwkudWRlbGF5CQk9IDEwLAorCS5tZGVsYXkJCT0gMTAsCisJLnRpbWVvdXQJPSAxMDAsCit9OworCitzdGF0aWMgc3RydWN0IGkyY19hZGFwdGVyIGkyY19hZGFwX3RlbXBsYXRlID0geworCS5vd25lciA9IFRISVNfTU9EVUxFLAorCS5uYW1lICAgICAgICAgICAgICA9ICJ1c2J2aXNpb24iLAorCS5pZCAgICAgICAgICAgICAgICA9IEkyQ19IV19CX0JUODQ4LCAvKiBGSVhNRSAqLworCS5hbGdvICAgICAgICAgICAgICA9IE5VTEwsCisJLmFsZ29fZGF0YSAgICAgICAgID0gTlVMTCwKKwkuY2xpZW50X3JlZ2lzdGVyICAgPSBhdHRhY2hfaW5mb3JtLAorCS5jbGllbnRfdW5yZWdpc3RlciA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V9ERVNDKEN1c3RvbURldmljZSwgIiBEZWZpbmUgdGhlIGZpbmUgdHVuaW5nIHBhcmFtZXRlcnMgZm9yIHRoZSBkZXZpY2UuICBEZWZhdWx0OiBudWxsIik7CisKKworLy8gTWlzYyBzdHVmZgorTU9EVUxFX0FVVEhPUihEUklWRVJfQVVUSE9SKTsKK01PRFVMRV9ERVNDUklQVElPTihEUklWRVJfREVTQyk7CitNT0RVTEVfTElDRU5TRShEUklWRVJfTElDRU5TRSk7CitNT0RVTEVfVkVSU0lPTihVU0JWSVNJT05fVkVSU0lPTl9TVFJJTkcpOworTU9EVUxFX0FMSUFTKERSSVZFUl9BTElBUyk7CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBTWVNGUyBDb2RlIC0gQ29waWVkIGZyb20gdGhlIHN0djY4MC5jIHVzYiBtb2R1bGUuCQkJCQkqLworLyogRGV2aWNlIGluZm9ybWF0aW9uIGlzIGxvY2F0ZWQgYXQgL3N5cy9jbGFzcy92aWRlbzRsaW51eC92aWRlbzAJCQkqLworLyogRGV2aWNlIHBhcmFtZXRlcnMgaW5mb3JtYXRpb24gaXMgbG9jYXRlZCBhdCAvc3lzL21vZHVsZS91c2J2aXNpb24gICAgICAgICAgICAgICAgICAgICovCisvKiBEZXZpY2UgVVNCIEluZm9ybWF0aW9uIGlzIGxvY2F0ZWQgYXQgL3N5cy9idXMvdXNiL2RyaXZlcnMvVVNCVmlzaW9uIFZpZGVvIEdyYWJiZXIgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisKKyNkZWZpbmUgWUVTX05PKHgpICgoeCkgPyAiWWVzIiA6ICJObyIpCisKK3N0YXRpYyBpbmxpbmUgc3RydWN0IHVzYl91c2J2aXNpb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zYnZpc2lvbl9yZWxlYXNlKHN0cnVjdCB1c2JfdXNidmlzaW9uICp1c2J2aXNpb24pCit7CisJUERFQlVHKERCR19QUk9CRSwgIiIpOworCisJZG93bigmdXNidmlzaW9uLT5sb2NrKTsKKworCXVzYnZpc2lvbl9yZXNldF9wb3dlck9mZlRpbWVyKHVzYnZpc2lvbik7CisKKwl1c2J2aXNpb24tPmluaXRpYWxpemVkID0gMDsKKworCXVwKCZ1c2J2aXNpb24tPmxvY2spOworCisJdXNidmlzaW9uX3JlbW92ZV9zeXNmcyh1c2J2aXNpb24tPnZkZXYpOworCXVzYnZpc2lvbl91bnJlZ2lzdGVyX3ZpZGVvKHVzYnZpc2lvbik7CisKKwlpZiAodXNidmlzaW9uLT5jdHJsVXJiKSB7CisJCXVzYl9mcmVlX3VyYih1c2J2aXNpb24tPmN0cmxVcmIpOworCX0KKworCWtmcmVlKHVzYnZpc2lvbik7CisKKwlQREVCVUcoREJHX1BST0JFLCAic3VjY2VzcyIpOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiB1c2IgaW50ZXJmYWNlICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCB1c2J2aXNpb25fY29uZmlndXJlX3ZpZGVvKHN0cnVjdCB1c2JfdXNidmlzaW9uICp1c2J2aXNpb24pCit7CisJaW50IG1vZGVsLGk7CisKKwlpZiAodXNidmlzaW9uID09IE5VTEwpCisJCXJldHVybjsKKworCW1vZGVsID0gdXNidmlzaW9uLT5EZXZNb2RlbDsKKwl1c2J2aXNpb24tPnBhbGV0dGUgPSB1c2J2aXNpb25fdjRsMl9mb3JtYXRbMl07IC8vIFY0TDJfUElYX0ZNVF9SR0IyNDsKKworCWlmICh1c2J2aXNpb25fZGV2aWNlX2RhdGFbdXNidmlzaW9uLT5EZXZNb2RlbF0uVmluX1JlZzIgPj0gMCkgeworCQl1c2J2aXNpb24tPlZpbl9SZWcyX1ByZXNld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9TVERfUEFMX0RLOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX0IpID09IFY0TDJfU1REX1BBTF9CKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1BBTF9COworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX0IxKSA9PSBWNEwyX1NURF9QQUxfQjEpIHsKKwkJCQljdXJyX2lkID0gVjRMMl9TVERfUEFMX0IxOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX0cpID09IFY0TDJfU1REX1BBTF9HKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1BBTF9HOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX0gpID09IFY0TDJfU1REX1BBTF9IKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1BBTF9IOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX0kpID09IFY0TDJfU1REX1BBTF9JKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1BBTF9JOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX0QpID09IFY0TDJfU1REX1BBTF9EKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1BBTF9EOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX0QxKSA9PSBWNEwyX1NURF9QQUxfRDEpIHsKKwkJCQljdXJyX2lkID0gVjRMMl9TVERfUEFMX0QxOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX0spID09IFY0TDJfU1REX1BBTF9LKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1BBTF9LOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX00pID09IFY0TDJfU1REX1BBTF9NKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1BBTF9NOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX04pID09IFY0TDJfU1REX1BBTF9OKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1BBTF9OOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMX05jKSA9PSBWNEwyX1NURF9QQUxfTmMpIHsKKwkJCQljdXJyX2lkID0gVjRMMl9TVERfUEFMX05jOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfUEFMXzYwKSA9PSBWNEwyX1NURF9QQUxfNjApIHsKKwkJCQljdXJyX2lkID0gVjRMMl9TVERfUEFMXzYwOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfTlRTQykgPT0gVjRMMl9TVERfTlRTQykgeworCQkJCWN1cnJfaWQgPSBWNEwyX1NURF9OVFNDOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfTlRTQ19NKSA9PSBWNEwyX1NURF9OVFNDX00pIHsKKwkJCQljdXJyX2lkID0gVjRMMl9TVERfTlRTQ19NOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfTlRTQ19NX0pQKSA9PSBWNEwyX1NURF9OVFNDX01fSlApIHsKKwkJCQljdXJyX2lkID0gVjRMMl9TVERfTlRTQ19NX0pQOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfTlRTQ180NDMpID09IFY0TDJfU1REX05UU0NfNDQzKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX05UU0NfNDQzOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfTlRTQ19NX0tSKSA9PSBWNEwyX1NURF9OVFNDX01fS1IpIHsKKwkJCQljdXJyX2lkID0gVjRMMl9TVERfTlRTQ19NX0tSOworCQkJfSBlbHNlIGlmICggKGlkICYgVjRMMl9TVERfU0VDQU0pID09IFY0TDJfU1REX1NFQ0FNKSB7CisJCQkJY3Vycl9pZCA9IFY0TDJfU1REX1NFQ0FNOworCQkJfSBlbHNlIGlmIC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VF9SUEwgICAgICAgICA9IDB4QywKKwlDUExfUEVFUl9DTE9TRSAgICAgICAgPSAweEQsCisJQ1BMX0FDVF9FU1RBQkxJU0ggICAgID0gMHgxNywKKworCUNQTF9HRVRfVENCICAgICAgICAgICA9IDB4MjQsCisJQ1BMX0dFVF9UQ0JfUlBMICAgICAgID0gMHgyNSwKKwlDUExfU0VUX1RDQiAgICAgICAgICAgPSAweDI2LAorCUNQTF9TRVRfVENCX0ZJRUxEICAgICA9IDB4MjcsCisJQ1BMX1NFVF9UQ0JfUlBMICAgICAgID0gMHgyOCwKKwlDUExfUENNRCAgICAgICAgICAgICAgPSAweDI5LAorCisJQ1BMX1BDTURfUkVBRCAgICAgICAgID0gMHgzMSwKKwlDUExfUENNRF9SRUFEX1JQTCAgICAgPSAweDMyLAorCisKKwlDUExfUlhfREFUQSAgICAgICAgICAgPSAweEEwLAorCUNQTF9SWF9EQVRBX0REUCAgICAgICA9IDB4QTEsCisJQ1BMX1JYX0RBVEFfQUNLICAgICAgID0gMHhBMywKIAlDUExfUlhfUEtUICAgICAgICAgICAgPSAweEFELAorCUNQTF9SWF9JU0NTSV9IRFIgICAgICA9IDB4QUYsCisJQ1BMX1RYX0RBVEFfQUNLICAgICAgID0gMHhCMCwKKwlDUExfVFhfREFUQSAgICAgICAgICAgPSAweEIxLAogCUNQTF9UWF9QS1QgICAgICAgICAgICA9IDB4QjIsCiAJQ1BMX1RYX1BLVF9MU08gICAgICAgID0gMHhCNiwKKworCUNQTF9SVEVfREVMRVRFX1JFUSAgICA9IDB4QzAsCisJQ1BMX1JURV9ERUxFVEVfUlBMICAgID0gMHhDMSwKKwlDUExfUlRFX1dSSVRFX1JFUSAgICAgPSAweEMyLAorCUNQTF9SVEVfV1JJVEVfUlBMICAgICA9IDB4RDMsCisJQ1BMX1JURV9SRUFEX1JFUSAgICAgID0gMHhDMywKKwlDUExfUlRFX1JFQURfUlBMICAgICAgPSAweEM0LAorCUNQTF9MMlRfV1JJVEVfUkVRICAgICA9IDB4QzUsCisJQ1BMX0wyVF9XUklURV9SUEwgICAgID0gMHhENCwKKwlDUExfTDJUX1JFQURfUkVRICAgICAgPSAweEM2LAorCUNQTF9MMlRfUkVBRF9SUEwgICAgICA9IDB4QzcsCisJQ1BMX1NNVF9XUklURV9SRVEgICAgID0gMHhDOCwKKwlDUExfU01UX1dSSVRFX1JQTCAgICAgPSAweEQ1LAorCUNQTF9TTVRfUkVBRF9SRVEgICAgICA9IDB4QzksCisJQ1BMX1NNVF9SRUFEX1JQTCAgICAgID0gMHhDQSwKKwlDUExfQVJQX01JU1NfUkVRICAgICAgPSAweENELAorCUNQTF9BUlBfTUlTU19SUEwgICAgICA9IDB4Q0UsCisJQ1BMX01JR1JBVEVfQzJUX1JFUSAgID0gMHhEQywKKwlDUExfTUlHUkFURV9DMlRfUlBMICAgPSAweERELAorCUNQTF9FUlJPUiAgICAgICAgICAgICA9IDB4RDcsCisKKyAgICAvKiBpbnRlcm5hbDogZHJpdmVyIC0+IFRPTSAqLworCUNQTF9NU1NfQ0hBTkdFICAgICAgICA9IDB4RTEKIH07CiAKLWVudW0geyAgICAgICAgICAgICAgICAvKiBUWF9QS1RfTFNPIGV0aGVybmV0IHR5cGVzICovCisjZGVmaW5lIE5VTV9DUExfQ01EUyAyNTYKKworZW51bSBDUExfZXJyb3IgeworCUNQTF9FUlJfTk9ORSAgICAgICAgICAgICAgID0gMCwKKwlDUExfRVJSX1RDQU1fUEFSSVRZICAgICAgICA9IDEsCisJQ1BMX0VSUl9UQ0FNX0ZVTEwgICAgICAgICAgPSAzLAorCUNQTF9FUlJfQ09OTl9SRVNFVCAgICAgICAgID0gMjAsCisJQ1BMX0VSUl9DT05OX0VYSVNUICAgICAgICAgPSAyMiwKKwlDUExfRVJSX0FSUF9NSVNTICAgICAgICAgICA9IDIzLAorCUNQTF9FUlJfQkFEX1NZTiAgICAgICAgICAgID0gMjQsCisJQ1BMX0VSUl9DT05OX1RJTUVET1VUICAgICAgPSAzMCwKKwlDUEx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ZXJfdCAqYWRhcHRlciwgdTMyICp2YWxwLCB1OCB3YWl0KQoreworICAgICAgICBzdHJ1Y3QgcGVlc3BpICplc3BpID0gYWRhcHRlci0+ZXNwaTsKKwl1OCBpLCBucG9ydCA9ICh1OClhZGFwdGVyLT5wYXJhbXMubnBvcnRzOworCisgICAgICAgIGlmICghd2FpdCkgeworICAgICAgICAgICAgICAgIGlmICghc3Bpbl90cnlsb2NrKCZlc3BpLT5sb2NrKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtMTsKKyAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAgICAgc3Bpbl9sb2NrKCZlc3BpLT5sb2NrKTsKKworCWlmICggKGVzcGktPm1pc2NfY3RybCAmIE1PTl9NQVNLKSAhPSBGX01PTklUT1JFRF9ESVJFQ1RJT04gKSB7CisJCWVzcGktPm1pc2NfY3RybCA9IChlc3BpLT5taXNjX2N0cmwgJiB+TU9OX01BU0spIHwKKwkJCQkJRl9NT05JVE9SRURfRElSRUNUSU9OOworICAgICAgICAgICAgICAgIHdyaXRlbChlc3BpLT5taXNjX2N0cmwsIGFkYXB0ZXItPnJlZ3MgKyBBX0VTUElfTUlTQ19DT05UUk9MKTsKKyAJfQorCWZvciAoaSA9IDAgOyBpIDwgbnBvcnQ7IGkrKywgdmFscCsrKSB7CisJCWlmIChpKSB7CisJCQl3cml0ZWwoZXNwaS0+bWlzY19jdHJsIHwgVl9NT05JVE9SRURfUE9SVF9OVU0oaSksCisJCQkgICAgICAgYWRhcHRlci0+cmVncyArIEFfRVNQSV9NSVNDX0NPTlRST0wpOworCQl9CisgICAgICAgICAgICAgICAgKnZhbHAgPSByZWFkbChhZGFwdGVyLT5yZWdzICsgQV9FU1BJX1NDSF9UT0tFTjMpOworICAgICAgICB9CisKKyAgICAgICAgd3JpdGVsKGVzcGktPm1pc2NfY3RybCwgYWRhcHRlci0+cmVncyArIEFfRVNQSV9NSVNDX0NPTlRST0wpOworICAgICAgICBzcGluX3VubG9ja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SBGUEdBX1BDSVhfQUREUl9WRVJTSU9OICAgICAgICAgICAgICAgMHhBMDgKKyNkZWZpbmUgRlBHQV9QQ0lYX0FERFJfU1RBVCAgICAgICAgICAgICAgICAgIDB4QTBDCisKKy8qIEZQR0EgbWFzdGVyIGludGVycnVwdCBDYXVzZS9FbmFibGUgYml0cyAqLworI2RlZmluZSBGUEdBX1BDSVhfSU5URVJSVVBUX1NHRV9FUlJPUiAgICAgICAgMHgxCisjZGVmaW5lIEZQR0FfUENJWF9JTlRFUlJVUFRfU0dFX0RBVEEgICAgICAgICAweDIKKyNkZWZpbmUgRlBHQV9QQ0lYX0lOVEVSUlVQVF9UUCAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSBGUEdBX1BDSVhfSU5URVJSVVBUX01DMyAgICAgICAgICAgICAgMHg4CisjZGVmaW5lIEZQR0FfUENJWF9JTlRFUlJVUFRfR01BQyAgICAgICAgICAgICAweDEwCisjZGVmaW5lIEZQR0FfUENJWF9JTlRFUlJVUFRfUENJWCAgICAgICAgICAgICAweDIwCisKKy8qIFRQIGludGVycnVwdCByZWdpc3RlciBhZGRyZXNzZXMgKi8KKyNkZWZpbmUgRlBHQV9UUF9BRERSX0lOVEVSUlVQVF9FTkFCTEUgICAgICAgIDB4QTEwCisjZGVmaW5lIEZQR0FfVFBfQUREUl9JTlRFUlJVUFRfQ0FVU0UgICAgICAgICAweEExNAorI2RlZmluZSBGUEdBX1RQX0FERFJfVkVSU0lPTiAgICAgICAgICAgICAgICAgMHhBMTgKKworLyogVFAgaW50ZXJydXB0IENhdXNlL0VuYWJsZSBiaXRzICovCisjZGVmaW5lIEZQR0FfVFBfSU5URVJSVVBUX01DNCAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgRlBHQV9UUF9JTlRFUlJVUFRfTUM1ICAgICAgICAgICAgICAgIDB4MgorCisvKgorICogUE0gaW50ZXJydXB0IHJlZ2lzdGVyIGFkZHJlc3NlcworICovCisjZGVmaW5lIEZQR0FfTUMzX1JFR19JTlRSRU5BQkxFICAgICAgICAgICAgICAweEEyMAorI2RlZmluZSBGUEdBX01DM19SRUdfSU5UUkNBVVNFICAgICAgICAgICAgICAgMHhBMjQKKyNkZWZpbmUgRlBHQV9NQzNfUkVHX1ZFUlNJT04gICAgICAgICAgICAgICAgIDB4QTI4CisKKy8qCisgKiBHTUFDIGludGVycnVwdCByZWdpc3RlciBhZGRyZXNzZXMKKyAqLworI2RlZmluZSBGUEdBX0dNQUNfQUREUl9JTlRFUlJVUFRfRU5BQkxFICAgICAgMHhBMzAKKyNkZWZpbmUgRlBHQV9HTUFDX0FERFJfSU5URVJSVVBUX0NBVVNFICAgICAgIDB4QTM0CisjZGVmaW5lIEZQR0FfR01BQ19BRERSX1ZFUlNJT04gICAgICAgICAgICAgICAweEEzOAorCisvKiBHTUFDIENhdXNlL0VuYWJsZSBiaXRzICovCisjZGVmaW5lIEZQR0FfR01BQ19JTlRFUlJVUFRfUE9SVDAgICAgICAgICAgICAweDEKKyNkZWZpbmUgRlBHQV9HTUFDX0lOVEVSUlVQVF9QT1JUMSAgICAgICAgICAgIDB4MgorI2RlZmluZSBGUEdBX0dNQUNfSU5URVJSVVBUX1BPUlQyICAgICAgICAgICAgMHg0CisjZGVmaW5lIEZQR0FfR01BQ19JTlRFUlJVUFRfUE9SVDMgICAgICAgICAgICAweDgKKworLyogTUkwIHJlZ2lzdGVycyAqLworI2RlZmluZSBBX01JMF9DTEsgMHhiMDAKKworI2RlZmluZSBTX01JMF9DTEtfRElWICAgIDAKKyNkZWZpbmUgTV9NSTBfQ0xLX0RJViAgICAweGZmCisjZGVmaW5lIFZfTUkwX0NMS19ESVYoeCkgKCh4KSA8PCBTX01JMF9DTEtfRElWKQorI2RlZmluZSBHX01JMF9DTEtfRElWKHgpICgoKHgpID4+IFNfTUkwX0NMS19ESVYpICYgTV9NSTBfQ0xLX0RJVikKKworI2RlZmluZSBTX01JMF9DTEtfQ05UICAgIDgKKyNkZWZpbmUgTV9NSTBfQ0xLX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yBpeGYxMDEwX29wcyA9IHsKKwkuZGVzdHJveSAgICAgICAgICAgICAgICAgID0gbWFjX2Rlc3Ryb3ksCisJLnJlc2V0ICAgICAgICAgICAgICAgICAgICA9IG1hY19yZXNldCwKKwkuaW50ZXJydXB0X2VuYWJsZSAgICAgICAgID0gbWFjX2ludHJfb3AsCisJLmludGVycnVwdF9kaXNhYmxlICAgICAgICA9IG1hY19pbnRyX29wLAorCS5pbnRlcnJ1cHRfY2xlYXIgICAgICAgICAgPSBtYWNfaW50cl9vcCwKKwkuZW5hYmxlICAgICAgICAgICAgICAgICAgID0gbWFjX2VuYWJsZSwKKwkuZGlzYWJsZSAgICAgICAgICAgICAgICAgID0gbWFjX2Rpc2FibGUsCisJLnNldF9tdHUgICAgICAgICAgICAgICAgICA9IG1hY19zZXRfbXR1LAorCS5zZXRfcnhfbW9kZSAgICAgICAgICAgICAgPSBtYWNfc2V0X3J4X21vZGUsCisJLnNldF9zcGVlZF9kdXBsZXhfZmMgICAgICA9IG1hY19zZXRfc3BlZWRfZHVwbGV4X2ZjLAorCS5nZXRfc3BlZWRfZHVwbGV4X2ZjICAgICAgPSBtYWNfZ2V0X3NwZWVkX2R1cGxleF9mYywKKwkuc3RhdGlzdGljc191cGRhdGUgICAgICAgID0gbWFjX3VwZGF0ZV9zdGF0aXN0aWNzLAorCS5tYWNhZGRyZXNzX2dldCAgICAgICAgICAgPSBtYWNfZ2V0X2FkZHJlc3MsCisJLm1hY2FkZHJlc3Nfc2V0ICAgICAgICAgICA9IG1hY19zZXRfYWRkcmVzcywKK307CisKK3N0YXRpYyBpbnQgaXhmMTAxMF9tYWNfcmVzZXQoYWRhcHRlcl90ICphZGFwdGVyKQoreworCXUzMiB2YWw7CisKKwl0MV90cGlfcmVhZChhZGFwdGVyLCBBX0VMTUVSMF9HUE8sICZ2YWwpOworCWlmICgodmFsICYgMSkgIT0gMCkgeworCQl2YWwgJj0gfjE7CisJCXQxX3RwaV93cml0ZShhZGFwdGVyLCBBX0VM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wKKwkgICAgICAgbWFjLT5hZGFwdGVyLT5yZWdzICsgTUFDX1JFR19STUNOVChtYWMtPmluc3RhbmNlLT5pbmRleCkpOworCisJZm9yIChpID0gMDsgaSA8IHNpemVvZihzdCkgLyBzaXplb2YodTMyKTsgaSsrKQorCQkqcCsrID0gcmVhZGwobWFjLT5hZGFwdGVyLT5yZWdzCisJCQkgICAgICsgTUFDX1JFR19STURBVEEobWFjLT5pbnN0YW5jZS0+aW5kZXgpKTsKKworCS8qIFhYWCBjb252ZXJ0IHN0YXRzICovCisJcmV0dXJuICZtYWMtPnN0YXRzOworfQorCitzdGF0aWMgdm9pZCBtYWNfZGVzdHJveShzdHJ1Y3QgY21hYyAqbWFjKQoreworCWtmcmVlKG1hYyk7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgY21hY19vcHMgY2hlbHNpb19tYWNfb3BzID0geworCS5kZXN0cm95ICAgICAgICAgICAgICAgICA9IG1hY19kZXN0cm95LAorCS5yZXNldCAgICAgICAgICAgICAgICAgICA9IG1hY19yZXNldCwKKwkuaW50ZXJydXB0X2VuYWJsZSAgICAgICAgPSBtYWNfaW50cl9lbmFibGUsCisJLmludGVycnVwdF9kaXNhYmxlICAgICAgID0gbWFjX2ludHJfZGlzYWJsZSwKKwkuaW50ZXJydXB0X2NsZWFyICAgICAgICAgPSBtYWNfaW50cl9jbGVhciwKKwkuZW5hYmxlICAgICAgICAgICAgICAgICAgPSBtYWNfZW5hYmxlLAorCS5kaXNhYmxlICAgICAgICAgICAgICAgICA9IG1hY19kaXNhYmxlLAorCS5zZXRfbXR1ICAgICAgICAgICAgICAgICA9IG1hY19zZXRfbXR1LAorCS5zZXRfcnhfbW9kZSAgICAgICAgICAgICA9IG1hY19zZXRfcnhfbW9kZSwKKwkuc2V0X3NwZWVkX2R1cGxleF9mYyAgICAgPSBtYWNfc2V0X3NwZWVkX2R1cGxleF9mYywKKwkubWFjYWRkcmVzc19nZXQgICAgICAgICAgPSBtYWNfZ2V0X2FkZHJlc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FvcnVuZAogICovCi1zdGF0aWMgdm9pZCBlc3BpYnVnX3dvcmthcm91bmQodm9pZCAqZGF0YSkKK3N0YXRpYyB2b2lkIGVzcGlidWdfd29ya2Fyb3VuZF90MjA0KHVuc2lnbmVkIGxvbmcgZGF0YSkKK3sKKwlzdHJ1Y3QgYWRhcHRlciAqYWRhcHRlciA9IChzdHJ1Y3QgYWRhcHRlciAqKWRhdGE7CisJc3RydWN0IHNnZSAqc2dlID0gYWRhcHRlci0+c2dlOworCXVuc2lnbmVkIGludCBucG9ydHMgPSBhZGFwdGVyLT5wYXJhbXMubnBvcnRzOworCXUzMiBzZW9wW01BWF9OUE9SVFNdOworCisJaWYgKGFkYXB0ZXItPm9wZW5fZGV2aWNlX21hcCAmIFBPUlRfTUFTSykgeworCQlpbnQgaTsKKwkJaWYgKHQxX2VzcGlfZ2V0X21vbl90MjA0KGFkYXB0ZXIsICYoc2VvcFswXSksIDApIDwgMCkgeworCQkJcmV0dXJuOworCQl9CisJCWZvciAoaSA9IDA7IGkgPCBucG9ydHM7IGkrKykgeworCSAgICAgICAgCXN0cnVjdCBza19idWZmICpza2IgPSBzZ2UtPmVzcGlidWdfc2tiW2ldOworCQkJaWYgKCAobmV0aWZfcnVubmluZyhhZGFwdGVyLT5wb3J0W2ldLmRldikpICYmCisJCQkgICAgICEobmV0aWZfcXVldWVfc3RvcHBlZChhZGFwdGVyLT5wb3J0W2ldLmRldikpICYmCisJCQkgICAgIChzZW9wW2ldICYmICgoc2VvcFtpXSAmIDB4ZmZmKSA9PSAwKSkgJiYKKwkJCSAgICAgc2tiICkgeworCSAgICAgICAgICAgICAgICAJaWYgKCFza2ItPmNiWzBdKSB7CisJICAgICAgICAgICAgICAgICAgICAgICAgCXU4IGNoX21hY19hZGRyW0VUSF9BTEVOXSA9CisJICAgICAgICAgICAgICAgICAgICAgICAgICAgIAl7MHgwLCAweDcsIDB4NDMsIDB4MCwgMHgwLCAweDB9OworCSAgICAgICAgICAgICAgICAgICAgICAgIA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worCSAgICAgICAgc3RydWN0IHNrX2J1ZmYgKnNrYiA9IHNnZS0+ZXNwaWJ1Z19za2JbMF07CisJICAgICAgICB1MzIgc2VvcCA9IHQxX2VzcGlfZ2V0X21vbihhZGFwdGVyLCAweDkzMCwgMCk7CiAKLQkJdTMyIHNlb3AgPSB0MV9lc3BpX2dldF9tb24oYWRhcHRlciwgMHg5MzAsIDApOworCSAgICAgICAgaWYgKChzZW9wICYgMHhmZmYwZmZmKSA9PSAweGZmZiAmJiBza2IpIHsKKwkgICAgICAgICAgICAgICAgaWYgKCFza2ItPmNiWzBdKSB7CisJICAgICAgICAgICAgICAgICAgICAgICAgdTggY2hfbWFjX2FkZHJbRVRIX0FMRU5dID0KKwkgICAgICAgICAgICAgICAgICAgICAgICAgICAgezB4MCwgMHg3LCAweDQzLCAweDAsIDB4MCwgMHgwfTsKKwkgICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoc2tiLT5kYXRhICsgc2l6ZW9mKHN0cnVjdCBjcGxfdHhfcGt0KSwKKwkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hfbWFjX2FkZHIsIEVUSF9BTEVOKTsKKwkgICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoc2tiLT5kYXRhICsgc2tiLT5sZW4gLSAxMCwgY2hfbWFjX2FkZHIsCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVUSF9BTEVOKTsKKwkgICAgICAgICAgICAgICAgICAgICAgICBza2ItPmNiWzBdID0gMHhmZjsKKwkgICAgICAgICAgICAgICAgfQogCi0JCWlmICgoc2VvcCAmIDB4ZmZmMGZmZikgPT0gMHhmZmYgJiYgc2tiKSB7Ci0JCQlpZiAoIXNrYi0+Y2JbMF0pIHsKLQkJCQl1OCBjaF9tYWNfYWRkcltFVEhfQUxFTl0gPQotCQkJCSAgICB7MHgwLCAweDcsIDB4NDMsIDB4MCwgMHgwLCAweDB9OwotCQkJCW1lbWNweShza2ItPmRhdGEgKyBzaXplb2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AwMDMKKworI2RlZmluZSBtU1VOSTF4MTBHRVhQX01BQ19GSUxURVJfT0ZGU0VUKGZpbHRlcklkKSAgICAgICAoIChmaWx0ZXJJZCkgKiBTVU5JMXgxMEdFWFBfUkVHX1NJWkVPRl9NQUNfRklMVEVSICkKKworLyoKKyoqIFNwYWNlIGFsbG9jYXRlZCBmb3IgVkxBTi1JZCBGaWx0ZXIKKyoqICAgICAgVGhlcmUgYXJlIDggZmlsdGVyIGNvbmZpZ3VyYXRpb25zCisqLworI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1NJWkVPRl9NQUNfVklEX0ZJTFRFUiAweDAwMDEKKworI2RlZmluZSBtU1VOSTF4MTBHRVhQX01BQ19WSURfRklMVEVSX09GRlNFVChmaWx0ZXJJZCkgICAoIChmaWx0ZXJJZCkgKiBTVU5JMXgxMEdFWFBfUkVHX1NJWkVPRl9NQUNfVklEX0ZJTFRFUiApCisKKy8qCisqKiBTcGFjZSBhbGxvY2F0ZWQgZm9yIGVhY2ggTVNUQVQgQ291bnRlcgorKi8KKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19TSVpFT0ZfTVNUQVRfQ09VTlQgMHgwMDA0CisKKyNkZWZpbmUgbVNVTkkxeDEwR0VYUF9NU1RBVF9DT1VOVF9PRkZTRVQoY291bnRJZCkgICAgICAgKCAoY291bnRJZCkgKiBTVU5JMXgxMEdFWFBfUkVHX1NJWkVPRl9NU1RBVF9DT1VOVCApCisKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qKiBTL1VOSS0xeDEwR0UtWFAgUkVHSVNURVIgQUREUkVTUyBNQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMzksMzMgKzYzLDEyNSBAQAogLyogdG8gdGhlIFMvVU5JLTF4MTBHRS1YUCBEYXRhIFNoZWV0IGZvciB0aGUgc2lnbmlmaWNhdGlvbiBvZiBlYWNoIGJpdCAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKKworI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX0lERU5USUZJQ0FUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMAorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1BST0RVQ1RfUkVWSVNJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMQorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX0NPTkZJR19BTkRfUkVTRVRfQ09OVFJPTCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMgorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX0xPT1BCQUNLX01JU0NfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMwogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX0RFVklDRV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwNAorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX0dMT0JBTF9QRVJGT1JNQU5DRV9NT05JVE9SX1VQREFURSAgICAgICAgICAgICAgIDB4MDAwNQorCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfTURJT19DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA2CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfTURJT19JTlRFUlJVUFRfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA3CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfTURJT19JTlRFUlJVUFRfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA4CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfTU1EX1BIWV9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA5CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfTU1EX0NPTlRST0xfQUREUkVTU19EQVRBICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDBBCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfTURJT19SRUFEX1NUQVRVU19EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDBCCisKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19PQU1fSU5URl9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMEMKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NQVNURVJfSU5URVJSVVBUX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMEQKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19HTE9CQUxfSU5URVJSVVBUX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMEUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19GUkVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMEYKKworI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1hURUZfTUlTQ19DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAxMAorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1hSRl9NSVNDX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAxMQorCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfU0VSREVTXzMxMjVfQ09ORklHXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfU0VSREVTXzMxMjVfQ09ORklHXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAxCiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfU0VSREVTXzMxMjVfSU5URVJSVVBUX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgMHgwMTAyCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfU0VSREVTXzMxMjVfSU5URVJSVVBUX1ZJU0lCTEUgICAgICAgICAgICAgICAgICAgMHgwMTAzCiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfU0VSREVTXzMxMjVfSU5URVJSVVBUX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgMHgwMTA0CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfU0VSREVTXzMxMjVfVEVTVF9DT05GSUcgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTA3CisKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWFhHX0NPTkZJR18xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNDAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWFhHX0NPTkZJR18yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNDEKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWFhHX0NPTkZJR18zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNDIKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWFhHX0lOVEVSUlVQVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNDMKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWFhHX01BWF9GUkFNRV9MRU5HVEggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNDUKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWFhHX1NBXzE1XzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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TVU5JMXgxMEdFWFBfUkVHX1JYWEdfTVVMVElDQVNUX0hBU0hfTE9XICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA2QQogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1JYWEdfTVVMVElDQVNUX0hBU0hfTUlETE9XICAgICAgICAgICAgICAgICAgICAgIDB4MjA2QgogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1JYWEdfTVVMVElDQVNUX0hBU0hfTUlESElHSCAgICAgICAgICAgICAgICAgICAgIDB4MjA2QwogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1JYWEdfTVVMVElDQVNUX0hBU0hfSElHSCAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA2RAogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1JYWEdfQUREUkVTU19GSUxURVJfQ09OVFJPTF8wICAgICAgICAgICAgICAgICAgIDB4MjA2RQorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1JYWEdfQUREUkVTU19GSUxURVJfQ09OVFJPTF8xICAgICAgICAgICAgICAgICAgIDB4MjA2RgogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1JYWEdfQUREUkVTU19GSUxURVJfQ09OVFJPTF8yICAgICAgICAgICAgICAgICAgIDB4MjA3MAorCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGX1BBVFRFUk5fR0VOX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDgxCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGXzhCVEJfRVJSX0NPVU5UX0xBTkVfMCAgICAgICAgICAgICAgICAgICAgICAgMHgyMDg0CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGXzhCVEJfRVJSX0NPVU5UX0xBTkVfMSAgICAgICAgICAgICAgICAgICAgICAgMHgyMDg1CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGXzhCVEJfRVJSX0NPVU5UX0xBTkVfMiAgICAgICAgICAgICAgICAgICAgICAgMHgyMDg2CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGXzhCVEJfRVJSX0NPVU5UX0xBTkVfMyAgICAgICAgICAgICAgICAgICAgICAgMHgyMDg3CiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGX0lOVEVSUlVQVF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDg4CiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGX0lOVEVSUlVQVF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDg5CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGX0VSUl9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDhBCiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGX0RJQUdfSU5URVJSVVBUX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMHgyMDhCCiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGX0RJQUdfSU5URVJSVVBUX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgMHgyMDhDCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfWFJGX0NPREVfRVJSX1RIUkVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDkyCisKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9DT05GSUcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9GSUxURVJfMV9DT05GSUcgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9GSUxURVJfMl9DT05GSUcgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9DT05GSUdfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9IRUNfQ09ORklHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9IRUNfRVJSX1RIUkVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzUKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9JTlRFUlJVUFRfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzcKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9JTlRFUlJVUFRfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQzkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9IRUNfRVJSX0NPVU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwQ0EKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9GSUZPX09WRVJGTE9XX0NPVU5UICAgICAgICAgICAgICAgICAgICAgICAweDIwQ0IKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9GSUxURVJfTUlTTUFUQ0hfQ09VTlRfTFNCICAgICAgICAgICAgICAgICAweDIwQ0MKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9GSUxURVJfTUlTTUFUQ0hfQ09VTlRfTVNCICAgICAgICAgICAgICAgICAweDIwQ0QKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19SWE9BTV9GSUxURVJfMV9NSVNNQVRD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DB4MjEwMAogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX01TVEFUX0NPVU5URVJfUk9MTE9WRVJfMCAgICAgICAgICAgICAgICAgICAgICAgIDB4MjEwMQogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX01TVEFUX0NPVU5URVJfUk9MTE9WRVJfMSAgICAgICAgICAgICAgICAgICAgICAgIDB4MjEwMgpAQCAtNzUsNTAgKzE5MSwzMjEgQEAKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9JTlRFUlJVUFRfTUFTS18xICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMDYKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9JTlRFUlJVUFRfTUFTS18yICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMDcKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9JTlRFUlJVUFRfTUFTS18zICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMDgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSX1dSSVRFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAweDIxMDkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSX1dSSVRFX0RBVEFfTE9XICAgICAgICAgICAgICAgICAgICAweDIxMEEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSX1dSSVRFX0RBVEFfTUlERExFICAgICAgICAgICAgICAgICAweDIxMEIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSX1dSSVRFX0RBVEFfSElHSCAgICAgICAgICAgICAgICAgICAweDIxMEMKKyNkZWZpbmUgbVNVTkkxeDEwR0VYUF9SRUdfTVNUQVRfQ09VTlRFUl9MT1coY291bnRJZCkgICAoMHgyMTEwICsgbVNVTkkxeDEwR0VYUF9NU1RBVF9DT1VOVF9PRkZTRVQoY291bnRJZCkpCisjZGVmaW5lIG1TVU5JMXgxMEdFWFBfUkVHX01TVEFUX0NPVU5URVJfTUlEKGNvdW50SWQpICAgKDB4MjExMSArIG1TVU5JMXgxMEdFWFBfTVNUQVRfQ09VTlRfT0ZGU0VUKGNvdW50SWQpKQorI2RlZmluZSBtU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSX0hJR0goY291bnRJZCkgICgweDIxMTIgKyBtU1VOSTF4MTBHRVhQX01TVEFUX0NPVU5UX09GRlNFVChjb3VudElkKSkKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzBfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzBfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzBfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzBfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTMKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzFfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzFfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzFfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzFfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTcKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzJfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzJfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMTkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzJfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMUEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzJfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMUIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzNfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMUMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzNfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMUQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzNfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMUUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzNfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMUYKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzRfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzRfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzRfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzRfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjMKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzVfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzVfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzVfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzVfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjcKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzZfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzZfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMjkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzZfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMkEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzZfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMkIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzdfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMkMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzdfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMkQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzdfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMkUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzdfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMkYKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzhfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzhfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzhfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzhfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzlfTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzlfTUlEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzlfSElHSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzlfUkVTVkQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzcKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEwX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEwX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxMzkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEwX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxM0EKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEwX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxM0IKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzExX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxM0MKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzExX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxM0QKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzExX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxM0UKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzExX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxM0YKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEyX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEyX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEyX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEyX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDMKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEzX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEzX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEzX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzEzX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDcKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE0X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE0X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNDkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE0X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNEEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE0X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNEIKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE1X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNEMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE1X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNEQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE1X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNEUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE1X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNEYKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE2X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE2X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE2X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE2X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTMKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE3X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE3X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE3X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE3X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTcKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE4X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE4X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNTkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE4X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNUEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE4X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNUIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE5X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNUMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE5X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNUQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE5X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNUUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzE5X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNUYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIwX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIwX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIwX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIwX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIxX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIxX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIxX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIxX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjcKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIyX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIyX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNjkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIyX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNkEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIyX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNkIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIzX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNkMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIzX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNkQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIzX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNkUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzIzX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNkYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI0X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI0X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI0X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI0X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI1X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI1X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI1X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI1X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzcKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI2X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI2X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxNzkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI2X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxN2EKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI2X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxN2IKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI3X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxN2MKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI3X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxN2QKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI3X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxN2UKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI3X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxN2YKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI4X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI4X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI4X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI4X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI5X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI5X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI5X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzI5X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODcKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMwX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMwX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxODkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMwX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOEEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMwX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOEIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMxX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOEMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMxX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOEQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMxX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOEUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMxX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOEYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMyX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMyX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMyX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMyX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTMKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMzX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMzX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMzX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzMzX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTcKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM0X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM0X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOTkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM0X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOUEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM0X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOUIKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM1X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOUMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM1X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOUQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM1X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOUUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM1X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxOUYKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM2X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM2X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM2X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM2X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM3X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM3X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM3X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM3X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTcKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM4X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM4X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQTkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM4X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQUEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM4X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQUIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM5X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQUMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM5X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQUQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM5X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQUUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzM5X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQUYKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQwX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQwX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQwX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQwX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQxX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQxX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQxX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQxX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjcKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQyX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQyX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQjkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQyX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQkEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQyX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQkIKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQzX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQkMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQzX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQkQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQzX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQkUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQzX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQkYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ0X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQzAKKyNkZW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SXzQ2X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQ0IKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ3X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQ0MKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ3X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQ0QKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ3X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQ0UKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ3X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxQ0YKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ4X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ4X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ4X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ4X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ5X0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ5X01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ5X0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzQ5X1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDcKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUwX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDgKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUwX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRDkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUwX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxREEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUwX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxREIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUxX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxREMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUxX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxREQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUxX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxREUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUxX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxREYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUyX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRTAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUyX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRTEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUyX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRTIKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUyX1JFU1ZEICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRTMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUzX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRTQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUzX01JRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRTUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NU1RBVF9DT1VOVEVSXzUzX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDIxRTYKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX0NOVFJfTUFDX0VUSEVSTkVUX05VTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1MQorCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfSUZMWF9HTE9CQUxfQ09ORklHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMjAwCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfSUZMWF9DSEFOTkVMX1BST1ZJU0lPTiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMjAxCiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfSUZMWF9GSUZPX09WRVJGTE9XX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMHgyMjA5CiAjZGV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JFR19QTDRNT1NfTUFYQlVSU1QyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIyNDQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19QTDRNT1NfVFJBTlNGRVJfU0laRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIyNDUKKworI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1BMNE9EUF9DT05GSUcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjI4MAogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1BMNE9EUF9JTlRFUlJVUFRfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjI4MgogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1BMNE9EUF9JTlRFUlJVUFQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjI4MworI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1BMNE9EUF9DT05GSUdfTUFYX1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjI4NAorCiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfUEw0SU9fTE9DS19ERVRFQ1RfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgMHgyMzAwCiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfUEw0SU9fTE9DS19ERVRFQ1RfQ0hBTkdFICAgICAgICAgICAgICAgICAgICAgICAgMHgyMzAxCiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfUEw0SU9fTE9DS19ERVRFQ1RfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMzAyCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfUEw0SU9fTE9DS19ERVRFQ1RfTElNSVRTICAgICAgICAgICAgICAgICAgICAgICAgMHgyMzAzCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfUEw0SU9fQ0FMRU5EQVJfUkVQRVRJVElPTlMgICAgICAgICAgICAgICAgICAgICAgMHgyMzA0CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfUEw0SU9fQ09ORklHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMzA1CisKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX0NPTkZJR18xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX0NPTkZJR18yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDEKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX0NPTkZJR18zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDIKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX0lOVEVSUlVQVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDMKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDQKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX01BWF9GUkFNRV9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX01JTl9GUkFNRV9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDYKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX1NBXzE1XzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDcKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX1NBXzMxXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDgKICNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX1NBXzQ3XzMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNDkKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX1BBVVNFX1RJTUVSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNEQKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX1BBVVNFX1RJTUVSX0lOVEVSVkFMICAgICAgICAgICAgICAgICAgICAgICAweDMwNEUKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX0ZJTFRFUl9FUlJPUl9DT1VOVEVSICAgICAgICAgICAgICAgICAgICAgICAweDMwNTEKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19UWFhHX1BBVVNFX1FVQU5UVU1fQ09ORklHICAgICAgICAgICAgICAgICAgICAgICAweDMwNTIKKworI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1hURUZfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzA4MAogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1hURUZfSU5URVJSVVBUX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzA4NAogI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1hURUZfSU5URVJSVVBUX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzA4NQorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX1hURUZfVklTSUJJTElUWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzA4NgorCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fT0FNX0NPTkZJRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEMwCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fTUlOSV9SQVRFX0NPTkZJRyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEMxCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fTUlOSV9HQVBfRklGT19DT05GSUcgICAgICAgICAgICAgICAgICAgICAgMHgzMEMyCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fUDFQMl9TVEFUSUNfVkFMVUVTICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEMzCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fUDNQNF9TVEFUSUNfVkFMVUVTICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEM0CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fUDVQNl9TVEFUSUNfVkFMVUVTICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEM1CiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fSU5URVJSVVBUX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEM2CiAjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fSU5URVJSVVBUX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEM3CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fSU5TRVJUX0NPVU5UX0xTQiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEM4CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fSU5TRVJUX0NPVU5UX01TQiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMEM5CisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fT0FNX01JTklfQ09VTlRfTFNCICAgICAgICAgICAgICAgICAgICAgICAgMHgzMENBCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fT0FNX01JTklfQ09VTlRfTVNCICAgICAgICAgICAgICAgICAgICAgICAgMHgzMENCCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fUDFQMl9NSU5JX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMENDCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fUDNQNF9NSU5JX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMENECisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fUDVQNl9NSU5JX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMENFCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fQ09TRVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMENGCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fRU1QVFlfRklGT19JTlNfT1BfQ05UX0xTQiAgICAgICAgICAgICAgICAgMHgzMEQwCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fRU1QVFlfRklGT19JTlNfT1BfQ05UX01TQiAgICAgICAgICAgICAgICAgMHgzMEQxCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fU1RBVElDX1ZBTFVFX01JTklfQ09VTlRfTFNCICAgICAgICAgICAgICAgMHgzMEQyCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9SRUdfVFhPQU1fU1RBVElDX1ZBTFVFX01JTklfQ09VTlRfTVNCICAgICAgICAgICAgICAgMHgzMEQzCisKKworI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX0VGTFhfR0xPQkFMX0NPTkZJRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzIwMAorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX0VGTFhfRVJDVV9HTE9CQUxfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzIwMQorI2RlZmluZSBTVU5JMXgxMEdFWFBfUkVHX0VGTFhfSU5ESVJfQ0hBTk5FTF9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgIDB4MzIwMgorI2RlZmluZSBTVU5JMX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lVQVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMjgzCiAKKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKyNkZWZpbmUgU1VOSTF4MTBHRVhQX1JFR19NQVhfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM0ODAKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qICAgICAgICAgICAgICAgICAtLSBFbmQgcmVnaXN0ZXIgb2Zmc2V0IGRlZmluaXRpb25zIC0tICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTI3LDYgKzUxNCw4MSBAQAogLyoqIFNVTkktMXgxMEdFLVhQIFJFR0lTVEVSIEJJVCBNQVNLUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX0JJVE1TS19CSVRTXzEgICAweDAwMDAxCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9CSVRNU0tfQklUU18yICAgMHgwMDAwMworI2RlZmluZSBTVU5JMXgxMEdFWFBfQklUTVNLX0JJVFNfMyAgIDB4MDAwMDcKKyNkZWZpbmUgU1VOSTF4MTBHRVhQX0JJVE1TS19CSVRTXzQgICAweDAwMDBmCisjZGVmaW5lIFNVTkkxeDEwR0VYUF9CSVRNU0tfQklUU181ICAgMHgwMDAxZgorI2RlZmluZSBTVU5JMXgxMEdFWFBfQklUTVNLX0JJVFNfNiAgIDB4MDAwM2YKK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FuY2UtPnRpY2tzKys7CisJfQorCXJldHVybiAmbWFjLT5zdGF0czsKK30KKworc3RhdGljIHZvaWQgbWFjX2Rlc3Ryb3koc3RydWN0IGNtYWMgKm1hYykKK3sKKwlrZnJlZShtYWMpOworfQorCitzdGF0aWMgc3RydWN0IGNtYWNfb3BzIHZzYzczMjZfb3BzID0geworCS5kZXN0cm95ICAgICAgICAgICAgICAgICAgPSBtYWNfZGVzdHJveSwKKwkucmVzZXQgICAgICAgICAgICAgICAgICAgID0gbWFjX3Jlc2V0LAorCS5pbnRlcnJ1cHRfaGFuZGxlciAgICAgICAgPSBtYWNfaW50cl9oYW5kbGVyLAorCS5pbnRlcnJ1cHRfZW5hYmxlICAgICAgICAgPSBtYWNfaW50cl9lbmFibGUsCisJLmludGVycnVwdF9kaXNhYmxlICAgICAgICA9IG1hY19pbnRyX2Rpc2FibGUsCisJLmludGVycnVwdF9jbGVhciAgICAgICAgICA9IG1hY19pbnRyX2NsZWFyLAorCS5lbmFibGUgICAgICAgICAgICAgICAgICAgPSBtYWNfZW5hYmxlLAorCS5kaXNhYmxlICAgICAgICAgICAgICAgICAgPSBtYWNfZGlzYWJsZSwKKwkuc2V0X210dSAgICAgICAgICAgICAgICAgID0gbWFjX3NldF9tdHUsCisJLnNldF9yeF9tb2RlICAgICAgICAgICAgICA9IG1hY19zZXRfcnhfbW9kZSwKKwkuc2V0X3NwZWVkX2R1cGxleF9mYyAgICAgID0gbWFjX3NldF9zcGVlZF9kdXBsZXhfZmMsCisJLnN0YXRpc3RpY3NfdXBkYXRlICAgICAgICA9IG1hY191cGRhdGVfc3RhdGlzdGljcywKKwkubWFjYWRkcmVzc19nZXQgICAgICAgICAgID0gbWFjX2dldF9hZGRyZXNzLAorCS5tYWNhZGRyZXNzX3NldCAgICAgICAgICAgPSBtYWNfc2V0X2FkZHJlc3MsCit9OworCitzdGF0aWMgc3RydWN0IGNtYWMgKnZzYzczMjZfbWFjX2NyZWF0ZShhZGFwdGVyX3QgKmFkYX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BhZnRlciB0aGUgd3JpdGUKICAgICAgICAgICAgICAgICAgKiBoYXMgY29tcGxldGVkIHNvIHRoYXQgd2UgZG9uJ3QgbWFyayB0aGUgc2VnbWVudCB2YWxpZAogICAgICAgICAgICAgICAgICAqIHdoaWxlIHRoZSB3cml0ZSBpcyBzdGlsbCBpbiBwcm9ncmVzcyAqLwotICAgICAgICAgICAgICAgIGlmIChpID09IEUxMDAwX0lDSDhfTlZNX1NJR19XT1JEKQotICAgICAgICAgICAgICAgICAgICBoaWdoX2J5dGUgPSBFMTAwMF9JQ0g4X05WTV9TSUdfTUFTSyB8IGhpZ2hfYnl0ZTsKKyAgICAgICAgICAgICAgICBpZiAoaSA9PSBFMTAwMF9JQ0hfTlZNX1NJR19XT1JEKQorICAgICAgICAgICAgICAgICAgICBoaWdoX2J5dGUgPSBFMTAwMF9JQ0hfTlZNX1NJR19NQVNLIHwgaGlnaF9ieXRlOwogCiAgICAgICAgICAgICAgICAgZXJyb3IgPSBlMTAwMF92ZXJpZnlfd3JpdGVfaWNoOF9ieXRlKGh3LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpIDw8IDEpICsgbmV3X2Jhbmtfb2Zmc2V0ICsgMSwgaGlnaF9ieXRlKTsKQEAgLTU2NDMsMTggKzU2NTEsMTggQEAKICAgICAgICAgICAgICAqIGVyYXNlIGFzIHdlbGwgc2luY2UgdGhlc2UgYml0cyBhcmUgMTEgdG8gc3RhcnQgd2l0aAogICAgICAgICAgICAgICogYW5kIHdlIG5lZWQgdG8gY2hhbmdlIGJpdCAxNCB0byAwYiAqLwogICAgICAgICAgICAgZTEwMDBfcmVhZF9pY2g4X2J5dGUoaHcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFMTAwMF9JQ0g4X05WTV9TSUdfV09SRCAqIDIgKyAxICsgbmV3X2Jhbmtfb2Zmc2V0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRTEwMDBfSUNIX05WTV9TSUdfV09SRCAqIDIgKyAxICsgbmV3X2Jhbmtfb2Zmc2V0LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJmhpZ2hfYnl0ZSk7CiAgICAgICAgICAgICBoaWdoX2J5dGUgJj0gMHhCRjsKICAgICAgICAgICAgIGVycm9yID0gZTEwMDBfdmVyaWZ5X3dyaXRlX2ljaDhfYnl0ZShodywKLSAgICAgICAgICAgICAgICAgICAgICAgIEUxMDAwX0lDSDhfTlZNX1NJR19XT1JEICogMiArIDEgKyBuZXdfYmFua19vZmZzZXQsIGhpZ2hfYnl0ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICBFMTAwMF9JQ0hfTlZNX1NJR19XT1JEICogMiArIDEgKyBuZXdfYmFua19vZmZzZXQsIGhpZ2hfYnl0ZSk7CiAgICAgICAgICAgICAvKiBBbmQgaW52YWxpZGF0ZSB0aGUgcHJldmlvdXNseSB2YWxpZCBzZWdtZW50IGJ5IHNldHRpbmcKICAgICAgICAgICAgICAqIGl0cyBzaWduYXR1cmUgd29yZCAoMHgxMykgaGlnaF9ieXRlIHRvIDBiLiBUaGlzIGNhbiBiZQogICAgICAgICAgICAgICogZG9uZSB3aXRob3V0IGFuIGVyYXNlIGJlY2F1c2UgZmxhc2ggZXJhc2Ugc2V0cyBhbGwgYml0cwogICAgICAgICAgICAgICogdG8gMSdzLiBXZSBjYW4gd3JpdGUgMSdzIHRvIDAncyB3aXRob3V0IGFuIGVyYXNlICovCiAgICAgICAgICAgICBpZiAoZXJyb3IgPT0gRTEwMDBfU1VDQ0VTUykgewogICAgICAgICAgICAgICAgIGVycm9yID0gZTEwMDBfdmVyaWZ5X3dyaXRlX2ljaDhfYnl0ZShodywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBFMTAwMF9JQ0g4X05WTV9TSUdfV09SRCAqIDIgKyAxICsgb2xkX2Jhbmtfb2Zmc2V0LCAwKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBFMTAwMF9JQ0hfTlZNX1NJR19X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EX1RJTUVPVVQgICAgICAgICAgICA1MDAwICAgIC8qIDUwMDAgdVNlY3MgLSBhZGp1c3RlZCAqLworI2RlZmluZSBJQ0hfRkxBU0hfRVJBU0VfVElNRU9VVCAgICAgICAgICAgICAgMzAwMDAwMCAvKiBVcCB0byAzIHNlY29uZHMgLSB3b3JzdCBjYXNlICovCisjZGVmaW5lIElDSF9GTEFTSF9DWUNMRV9SRVBFQVRfQ09VTlQgICAgICAgICAxMCAgICAgIC8qIDEwIGN5Y2xlcyAqLworI2RlZmluZSBJQ0hfRkxBU0hfU0VHX1NJWkVfMjU2ICAgICAgICAgICAgICAgMjU2CisjZGVmaW5lIElDSF9GTEFTSF9TRUdfU0laRV80SyAgICAgICAgICAgICAgICA0MDk2CisjZGVmaW5lIElDSF9GTEFTSF9TRUdfU0laRV82NEsgICAgICAgICAgICAgICA2NTUzNgogCi0jZGVmaW5lIElDSDhfQ1lDTEVfUkVBRCAgICAgICAgICAgICAgICAgICAgICAweDAKLSNkZWZpbmUgSUNIOF9DWUNMRV9SRVNFUlZFRCAgICAgICAgICAgICAgICAgIDB4MQotI2RlZmluZSBJQ0g4X0NZQ0xFX1dSSVRFICAgICAgICAgICAgICAgICAgICAgMHgyCi0jZGVmaW5lIElDSDhfQ1lDTEVfRVJBU0UgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgSUNIX0NZQ0xFX1JFQUQgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBJQ0hfQ1lDTEVfUkVTRVJWRUQgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIElDSF9DWUNMRV9XUklURSAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSUNIX0NZQ0xFX0VSQVNFICAgICAgICAgICAgICAgICAgICAgIDB4MwogCi0jZGVmaW5lIElDSDhfRkxBU0hfR0ZQUkVHICAgMHgwMDAwCi0jZGVmaW5lIElDSDhfRkxBU0hfSFNGU1RTICAgMHgwMDA0Ci0jZG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YWRhcHRlcikKK3sKKwlzdHJ1Y3QgZTEwMDBfaHcgKmh3ID0gJmFkYXB0ZXItPmh3OworCXVpbnQxNl90IGN1cnJlbnRfaXRyOworCXVpbnQzMl90IG5ld19pdHIgPSBhZGFwdGVyLT5pdHI7CisKKwlpZiAodW5saWtlbHkoaHctPm1hY190eXBlIDwgZTEwMDBfODI1NDApKQorCQlyZXR1cm47CisKKwkvKiBmb3Igbm9uLWdpZ2FiaXQgc3BlZWRzLCBqdXN0IGZpeCB0aGUgaW50ZXJydXB0IHJhdGUgYXQgNDAwMCAqLworCWlmICh1bmxpa2VseShhZGFwdGVyLT5saW5rX3NwZWVkICE9IFNQRUVEXzEwMDApKSB7CisJCWN1cnJlbnRfaXRyID0gMDsKKwkJbmV3X2l0ciA9IDQwMDA7CisJCWdvdG8gc2V0X2l0cl9ub3c7CisJfQorCisJYWRhcHRlci0+dHhfaXRyID0gZTEwMDBfdXBkYXRlX2l0cihhZGFwdGVyLAorCSAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGFwdGVyLT50eF9pdHIsCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkYXB0ZXItPnRvdGFsX3R4X3BhY2tldHMsCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkYXB0ZXItPnRvdGFsX3R4X2J5dGVzKTsKKwlhZGFwdGVyLT5yeF9pdHIgPSBlMTAwMF91cGRhdGVfaXRyKGFkYXB0ZXIsCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkYXB0ZXItPnJ4X2l0ciwKKwkgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRhcHRlci0+dG90YWxfcnhfcGFja2V0cywKKwkgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRhcHRlci0+dG90YWxfcnhfYnl0ZXMpOworCisJY3VycmVudF9pdHIgPSBtYXgoYWRhcHRlci0+cnhfaXRyLCBhZGFwdGVyLT50eF9pdHIpOworCisJLyogY29uc2VydmF0aXZlIG1vZGUgZWx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BfUEFSQU0oU21hcnRQb3dlckRvd25FbmFibGUsICJFbmFibGUgUEhZIHNtYXJ0IHBvd2VyIGRvd24iKTsKIAogLyogRW5hYmxlIEt1bWVyYW4gTG9jayBMb3NzIHdvcmthcm91bmQKQEAgLTIwNywzMyArMTk0LDggQEAKICAqCiAgKiBEZWZhdWx0IFZhbHVlOiAxIChlbmFibGVkKQogICovCi0KIEUxMDAwX1BBUkFNKEt1bWVyYW5Mb2NrTG9zcywgIkVuYWJsZSBLdW1lcmFuIGxvY2sgbG9zcyB3b3JrYXJvdW5kIik7CiAKLSNkZWZpbmUgQVVUT05FR19BRFZfREVGQVVMVCAgMHgyRgotI2RlZmluZSBBVVRPTkVHX0FEVl9NQVNLICAgICAweDJGCi0jZGVmaW5lIEZMT1dfQ09OVFJPTF9ERUZBVUxUIEZMT1dfQ09OVFJPTF9GVUxMCi0KLSNkZWZpbmUgREVGQVVMVF9SRFRSICAgICAgICAgICAgICAgICAgIDAKLSNkZWZpbmUgTUFYX1JYREVMQVkgICAgICAgICAgICAgICAweEZGRkYKLSNkZWZpbmUgTUlOX1JYREVMQVkgICAgICAgICAgICAgICAgICAgIDAKLQotI2RlZmluZSBERUZBVUxUX1JBRFYgICAgICAgICAgICAgICAgIDEyOAotI2RlZmluZSBNQVhfUlhBQlNERUxBWSAgICAgICAgICAgIDB4RkZGRgotI2RlZmluZSBNSU5fUlhBQlNERUxBWSAgICAgICAgICAgICAgICAgMAotCi0jZGVmaW5lIERFRkFVTFRfVElEViAgICAgICAgICAgICAgICAgIDY0Ci0jZGVmaW5lIE1BWF9UWERFTEFZICAgICAgICAgICAgICAgMHhGRkZGCi0jZGVmaW5lIE1JTl9UWERFTEFZICAgICAgICAgICAgICAgICAgICAwCi0KLSNkZWZpbmUgREVGQVVMVF9UQURWICAgICAgICAgICAgICAgICAgNjQKLSNkZWZpbmUgTUFYX1RYQUJTREVMQVkgICAgICAgICAgICAweEZGRkYKLSNkZWZpbmUgTUlOX1RYQUJTREVMQVk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qIGJldHdlZW4gcmVhZGluZyB0aGUgSVNSIGFuZCBzY2FubmluZyB0aGUKKwkJICogZGVzY3JpcHRvcnMuICBOb3RoaW5nIHRvIHdvcnJ5IGFib3V0LgorCQkgKi8KKwkJcmV0dXJuOworCisJaGVhZCA9IGJwLT50eF9oZWFkOworCWZvciAodGFpbCA9IGJwLT50eF90YWlsOyB0YWlsICE9IGhlYWQ7IHRhaWwgPSBORVhUX1RYKHRhaWwpKSB7CisJCXN0cnVjdCByaW5nX2luZm8gKnJwID0gJmJwLT50eF9za2JbdGFpbF07CisJCXN0cnVjdCBza19idWZmICpza2IgPSBycC0+c2tiOworCQl1MzIgYnVmc3RhdDsKKworCQlCVUdfT04oc2tiID09IE5VTEwpOworCisJCXJtYigpOworCQlidWZzdGF0ID0gYnAtPnR4X3JpbmdbdGFpbF0uY3RybDsKKworCQlpZiAoIShidWZzdGF0ICYgTUFDQl9CSVQoVFhfVVNFRCkpKQorCQkJYnJlYWs7CisKKwkJZGV2X2RiZygmYnAtPnBkZXYtPmRldiwgInNrYiAldSAoZGF0YSAlcCkgVFggY29tcGxldGVcbiIsCisJCQl0YWlsLCBza2ItPmRhdGEpOworCQlkbWFfdW5tYXBfc2luZ2xlKCZicC0+cGRldi0+ZGV2LCBycC0+bWFwcGluZywgc2tiLT5sZW4sCisJCQkJIERNQV9UT19ERVZJQ0UpOworCQlicC0+c3RhdHMudHhfcGFja2V0cysrOworCQlicC0+c3RhdHMudHhfYnl0ZXMgKz0gc2tiLT5sZW47CisJCXJwLT5za2IgPSBOVUxMOworCQlkZXZfa2ZyZWVfc2tiX2lycShza2IpOworCX0KKworCWJwLT50eF90YWlsID0gdGFpbDsKKwlpZiAobmV0aWZfcXVldWVfc3RvcHBlZChicC0+ZGV2KSAmJgorCSAgICBUWF9CVUZGU19BVkFJTChicCkgPiBNQUNCX1RYX1dBS0VVUF9USFJFU0gpCisJCW5ldGlmX3dha2VfcXVldWUoYnAtPmRldik7Cit9CisKK3N0YXRpYyBp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FhFTl9OSUNfUkVHKDB4YTApCisjZGVmaW5lIENSQl9BR0VOVF9UWF9BRERSICAgICAgICAgICBORVRYRU5fTklDX1JFRygweGE0KQorI2RlZmluZSBDUkJfQUdFTlRfVFhfTVNTICAgICAgICAgICAgTkVUWEVOX05JQ19SRUcoMHhhOCkKKyNkZWZpbmUgQ1JCX1RYX1NUQVRFICAgICAgICAgICAgICAgIE5FVFhFTl9OSUNfUkVHKDB4YWMpCS8qIERlYnVnIC1wZXJmb3JtYW5jZSAqLworI2RlZmluZSBDUkJfVFhfQ09VTlQgICAgICAgICAgICAgICAgTkVUWEVOX05JQ19SRUcoMHhiMCkKKyNkZWZpbmUgQ1JCX1JYX1NUQVRFICAgICAgICAgICAgICAgIE5FVFhFTl9OSUNfUkVHKDB4YjQpCisjZGVmaW5lIENSQl9SWF9QRVJGX0RFQlVHXzEgICAgICAgICBORVRYRU5fTklDX1JFRygweGI4KQorI2RlZmluZSBDUkJfUlhfTFJPX0NPTlRST0wgICAgICAgICAgTkVUWEVOX05JQ19SRUcoMHhiYykJLyogTFJPIE9uL09GRiAqLworI2RlZmluZSBDUkJfUlhfTFJPX1NUQVJUX05VTSAgICAgICAgTkVUWEVOX05JQ19SRUcoMHhjMCkKKyNkZWZpbmUgQ1JCX01QT1JUX01PREUgICAgICAgICAgICAgIE5FVFhFTl9OSUNfUkVHKDB4YzQpCS8qIE11bHRpcG9ydCBNb2RlICovCisjZGVmaW5lIENSQl9DTURfUklOR19TSVpFICAgICAgICAgICBORVRYRU5fTklDX1JFRygweGM4KQorI2RlZmluZSBDUkJfSU5UX1ZFQ1RPUiAgICAgICAgICAgICAgTkVUWEVOX05JQ19SRUcoMHhkNCkKKyNkZWZpbmUgQ1JCX0NUWF9SRVNFVCAgICAgICAgICAgICAgIE5FVFhFTl9OSUNfUkVHKDB4ZDgpCisjZGVmaW5lIENSQl9IT1NUX1NUU19QUk9EICAgICAgICAgICBORVRYRU5fTklDX1JFRygweGRjKQorI2RlZmluZSBDUk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uYworKysgYi9kcml2ZXJzL25ldC9zazk4bGluL3NrZGltLmMKQEAgLTI1Miw3ICsyNTIsNyBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiogRnVuY3Rpb24gICAgIDogU2tEaW1EaXNwbGF5TW9kZXJhdGlvblNldHRpbmdzCi0qKiBEZXNjcmlwdGlvbiAgOiBEaXNwbGF5cyB0aGUgY3VycmVudCBzZXR0aW5ncyByZWdhcmluZyBpbnRlcnJ1cHQgbW9kZXJhdGlvbgorKiogRGVzY3JpcHRpb24gIDogRGlzcGxheXMgdGhlIGN1cnJlbnQgc2V0dGluZ3MgcmVnYXJkaW5nIGludGVycnVwdCBtb2RlcmF0aW9uCiAqKiBQcm9ncmFtbWVyICAgOiBSYWxwaCBSb2VzbGVyCiAqKiBMYXN0IE1vZGlmaWVkOiAyMi1tYXItMDMKICoqIFJldHVybnMgICAgICA6IHZvaWQgKCEpCkBAIC01MTAsNyArNTEwLDcgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICoqIEZ1bmN0aW9uICAgICA6IERpc2FibGVJbnRNb2QoKQotKiogRGVzY3JpcHRpb24gIDogRGlzYmxlcyB0aGUgaW50ZXJydXB0IG1vZGVyYXRpb24gaW5kZXBlbmRlbnQgb2Ygd2hhdCBpbnRlci0KKyoqIERlc2NyaXB0aW9uICA6IERpc2FibGVzIHRoZSBpbnRlcnJ1cHQgbW9kZXJhdGlvbiBpbmRlcGVuZGVudCBvZiB3aGF0IGludGVyLQogKiogICAgICAgICAgICAgICAgcnVwdHMgYXJlIHJ1bm5pbmcgb3Igbm90CiAqKiBQcm9ncmFtbWVyICAgOiBSYWxwaCBSb2VzbGVyCiAqKiBMYXN0IE1vZGlmaWVkOiAyMy1tYXItMDMKZGlmZiAtLWd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ldC5oCkBAIC0yNCw3ICsyNCw3IEBACiAjaWZuZGVmIF9TUElERVJfTkVUX0gKICNkZWZpbmUgX1NQSURFUl9ORVRfSAogCi0jZGVmaW5lIFZFUlNJT04gIjEuMSBBIgorI2RlZmluZSBWRVJTSU9OICIxLjYgQSIKIAogI2luY2x1ZGUgInN1bmdlbV9waHkuaCIKIApAQCAtMjE3LDggKzIxNyw3IEBACiAjZGVmaW5lIFNQSURFUl9ORVRfR0RUQlNUQSAgICAgICAgICAgICAweDAwMDAwMzAwCiAjZGVmaW5lIFNQSURFUl9ORVRfR0RURENFSURJUyAgICAgICAgICAweDAwMDAwMDAyCiAjZGVmaW5lIFNQSURFUl9ORVRfRE1BX1RYX1ZBTFVFICAgICAgICBTUElERVJfTkVUX1RYX0RNQV9FTiB8IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNQSURFUl9ORVRfR0RUQlNUQSB8IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNQSURFUl9ORVRfR0RURENFSURJUworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU1BJREVSX05FVF9HRFRCU1RBCiAKICNkZWZpbmUgU1BJREVSX05FVF9ETUFfVFhfRkVORF9WQUxVRQkweDAwMDMwMDAzCiAKQEAgLTMyOCw3ICszMjcsOCBAQAogCVNQSURFUl9ORVRfR1JJU1BETkdJTlQKIH07CiAKLSNkZWZpbmUgU1BJREVSX05FVF9UWElOVAkoICgxIDw8IFNQSURFUl9ORVRfR0RURkRDSU5UKSApCisjZGVmaW5lIFNQSURFUl9ORVRfVFhJTlQJKCAoMSA8PCBTUElERVJfTkVUX0dEVEZEQ0lOVCkgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IFNQSURFUl9ORVRfR0RURENFSU5UKSApCiAKIC8qIFdlIHJlbHkgb24gZmxhZ2dlZCBkZXNjcmlwdG9yIGludGVycnVwdHMgKi8KICNkZWZp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7CisJSU5JVF9XT1JLKCZwcml2LT50bGFuX3RxdWV1ZSwgVExhbl90eF90aW1lb3V0X3dvcmspOwogCiAJc3Bpbl9sb2NrX2luaXQoJnByaXYtPmxvY2spOwogCkBAIC0xMDQwLDYgKzEwNDIsMjUgQEAKIH0KIAogCisJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCSAqIAlUTGFuX3R4X3RpbWVvdXRfd29yaworCSAqCisJICogCVJldHVybnM6IG5vdGhpbmcKKwkgKgorCSAqIAlQYXJhbXM6CisJICogCQl3b3JrCXdvcmsgaXRlbSBvZiBkZXZpY2Ugd2hpY2ggdGltZWQgb3V0CisJICoKKwkgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkIFRMYW5fdHhfdGltZW91dF93b3JrKHN0cnVjdCB3b3JrX3N0cnVjdCAqd29yaykKK3sKKwlUTGFuUHJpdmF0ZUluZm8JKnByaXYgPQorCQljb250YWluZXJfb2Yod29yaywgVExhblByaXZhdGVJbmZvLCB0bGFuX3RxdWV1ZSk7CisKKwlUTGFuX3R4X3RpbWVvdXQocHJpdi0+ZGV2KTsKK30KKworCiAKIAkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAJICoJVExhbl9TdGFydFR4CmRpZmYgLS1naXQgYS9kcml2ZXJzL25ldC90bGFuLmggYi9kcml2ZXJzL25ldC90bGFuLmgKaW5kZXggYTQ0ZTJmMi4uNDFjZTBiNiAxMDA2NDQKLS0tIGEvZHJpdmVycy9uZXQvdGxhbi5oCisrKyBiL2RyaXZlcnMvbmV0L3RsYW4uaApAQCAtMTcwLDYgKzE3MCw3IEBACiB0eXBlZGVmIHN0cnVjdCB0bGFuX3ByaXZhdGVfdGFnIHsKIAlzdHJ1Y3QgbmV0X2Rldmlj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aGVyd2lzZSwgdGhlIHN0cnVjdHVyZXMgd2lsbCBiZSBmcmVlZAogICB3aGVuIHRoZSBkZXZpY2UgaXMgcmVsZWFzZWQuCi0gIAorCiAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiBzdGF0aWMgdm9pZCBhdG1lbF9kZXRhY2goc3RydWN0IHBjbWNpYV9kZXZpY2UgKmxpbmspCkBAIC0yMDIsMTEgKzIwMiwxMSBAQAogfQogCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAgCisKICAgYXRtZWxfY29uZmlnKCkgaXMgc2NoZWR1bGVkIHRvIHJ1biBhZnRlciBhIENBUkRfSU5TRVJUSU9OIGV2ZW50CiAgIGlzIHJlY2VpdmVkLCB0byBjb25maWd1cmUgdGhlIFBDTUNJQSBzb2NrZXQsIGFuZCB0byBtYWtlIHRoZQogICBkZXZpY2UgYXZhaWxhYmxlIHRvIHRoZSBzeXN0ZW0uCi0gIAorCiAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiAjZGVmaW5lIENTX0NIRUNLKGZuLCByZXQpIFwKQEAgLTIzNywyOCArMjM3LDE3IEBACiAJZGlkID0gaGFuZGxlX3RvX2RldihsaW5rKS5kcml2ZXJfZGF0YTsKIAogCURFQlVHKDAsICJhdG1lbF9jb25maWcoMHglcClcbiIsIGxpbmspOwotCQorCiAJdHVwbGUuQXR0cmlidXRlcyA9IDA7CiAJdHVwbGUuVHVwbGVEYXRhID0gYnVmOwogCXR1cGxlLlR1cGxlRGF0YU1heCA9IHNpemVvZihidWYpOwogCXR1cGxlLlR1cGxlT2Zmc2V0ID0gMDsKLQkKLQkvKgotCSAgVGhpcyByZWFkcyB0aGUgY2FyZCdzIENPTkZJRyB0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9IDE7IC8qIG9yaW5vY29faW5pdCgpIG11c3QgY2xlYXIgdGhpcwogCQkJCSAgICogYmVmb3JlIGFueXRoaW5nIGVsc2UgdG91Y2hlcyB0aGUKIAkJCQkgICAqIGhhcmR3YXJlICovCi0JSU5JVF9XT1JLKCZwcml2LT5yZXNldF93b3JrLCAodm9pZCAoKikodm9pZCAqKSlvcmlub2NvX3Jlc2V0LCBkZXYpOwotCUlOSVRfV09SSygmcHJpdi0+am9pbl93b3JrLCAodm9pZCAoKikodm9pZCAqKSlvcmlub2NvX2pvaW5fYXAsIGRldik7Ci0JSU5JVF9XT1JLKCZwcml2LT53ZXZlbnRfd29yaywgKHZvaWQgKCopKHZvaWQgKikpb3Jpbm9jb19zZW5kX3dldmVudHMsIGRldik7CisJSU5JVF9XT1JLKCZwcml2LT5yZXNldF93b3JrLCBvcmlub2NvX3Jlc2V0KTsKKwlJTklUX1dPUksoJnByaXYtPmpvaW5fd29yaywgb3Jpbm9jb19qb2luX2FwKTsKKwlJTklUX1dPUksoJnByaXYtPndldmVudF93b3JrLCBvcmlub2NvX3NlbmRfd2V2ZW50cyk7CiAKIAluZXRpZl9jYXJyaWVyX29mZihkZXYpOwogCXByaXYtPmxhc3RfbGlua3N0YXR1cyA9IDB4ZmZmZjsKQEAgLTI0NTcsNiArMjQ2Myw3IEBACiAvKiBXaXJlbGVzcyBleHRlbnNpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKKy8qIFJldHVybiA6IDwgMCAtPiBlcnJvciBjb2RlIDsgPj0gMCAtPiBsZW5ndGggKi8KIHN0YXRpYyBpbnQgb3Jpbm9jb19od19nZXRfZXNzaWQoc3RydWN0IG9yaW5vY29fcHJpdmF0ZSAqcHJpdiwgaW50ICphY3RpdmUsCiAJCQkJY2hhciBidWZbSVdfRVNTSURf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AgICAgICAgICAgICAgcmVzWzBdLnN0YXJ0ID0gcmVzWzBdLmVuZCA9IHJlc1swXS5mbGFncyA9IDA7Ci0gICAgICAgICAgICAgICByZXNbMV0uc3RhcnQgPSByZXNbMV0uZW5kID0gcmVzWzFdLmZsYWdzID0gMDsKLSAgICAgICAgICAgICAgIGZpcnN0X2JhciA9IDA7Ci0gICAgICAgICAgICAgICBsYXN0X2JhciA9IDE7Ci0gICAgICAgfQotCi0gICAgICAgLyogc2Vjb25kYXJ5IGNoYW5uZWw6IFByb2dJZiBiaXQgMiwgQkFSMiwgQkFSMyAqLwotICAgICAgIGlmICghKGRldi0+Y2xhc3MgJiA0KSAmJiAocmVzWzJdLmZsYWdzIHx8IHJlc1szXS5mbGFncykpIHsgCi0gICAgICAgICAgICAgICByZXNbMl0uc3RhcnQgPSByZXNbMl0uZW5kID0gcmVzWzJdLmZsYWdzID0gMDsKLSAgICAgICAgICAgICAgIHJlc1szXS5zdGFydCA9IHJlc1szXS5lbmQgPSByZXNbM10uZmxhZ3MgPSAwOwotICAgICAgICAgICAgICAgbGFzdF9iYXIgPSAzOwotICAgICAgIH0KLQotICAgICAgIGlmICghbGFzdF9iYXIpCi0gICAgICAgICAgICAgICByZXR1cm47Ci0KLSAgICAgICBwcmludGsoS0VSTl9JTkZPICJQQ0k6IElnbm9yaW5nIEJBUiVkLSVkIG9mIElERSBjb250cm9sbGVyICVzXG4iLAotICAgICAgICAgICAgICBmaXJzdF9iYXIsIGxhc3RfYmFyLCBwY2lfbmFtZShkZXYpKTsKLX0KLURFQ0xBUkVfUENJX0ZJWFVQX0hFQURFUihQQ0lfQU5ZX0lELCBQQ0lfQU5ZX0lELCBxdWlya19pZGVfYmFzZXMpOwotCi0vKgogICoJRW5zdXJlIEMwIHJldiByZXN0cmVhbWluZyBpcyBvZmYuIFRoaXMgaXMgbm9ybWFsbHkgZG9uZSBieQogICoJdGhlIEJJT1MgYnV0IGluIHRoZSBvZGQgY2FzZSBpdCBpcyBub3QgdG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wgdXNlIHBzM192dWFydF93cml0ZS4KKyAqLworCitzdGF0aWMgaW50IHBzM192dWFydF9yYXdfd3JpdGUoc3RydWN0IHBzM192dWFydF9wb3J0X2RldmljZSAqZGV2LAorCWNvbnN0IHZvaWQqIGJ1ZiwgdW5zaWduZWQgaW50IGJ5dGVzLCB1bnNpZ25lZCBsb25nICpieXRlc193cml0dGVuKQoreworCWludCByZXN1bHQ7CisKKwlkZXZfZGJnKCZkZXYtPmNvcmUsICIlczolZDogJXhoXG4iLCBfX2Z1bmNfXywgX19MSU5FX18sIGJ5dGVzKTsKKworCXJlc3VsdCA9IGx2MV93cml0ZV92aXJ0dWFsX3VhcnQoZGV2LT5wb3J0X251bWJlciwKKwkJcHMzX21tX3BoeXNfdG9fbHBhcihfX3BhKGJ1ZikpLCBieXRlcywgYnl0ZXNfd3JpdHRlbik7CisKKwlpZiAocmVzdWx0KSB7CisJCWRldl9kYmcoJmRldi0+Y29yZSwgIiVzOiVkOiBsdjFfd3JpdGVfdmlydHVhbF91YXJ0IGZhaWxlZDogIgorCQkJIiVzXG4iLCBfX2Z1bmNfXywgX19MSU5FX18sIHBzM19yZXN1bHQocmVzdWx0KSk7CisJCXJldHVybiByZXN1bHQ7CisJfQorCisJZGV2LT5zdGF0cy5ieXRlc193cml0dGVuICs9ICpieXRlc193cml0dGVuOworCisJZGV2X2RiZygmZGV2LT5jb3JlLCAiJXM6JWQ6IHdyb3RlICVseGgvJXhoPT4lbHhoXG4iLCBfX2Z1bmNfXywKKwkJX19MSU5FX18sICpieXRlc193cml0dGVuLCBieXRlcywgZGV2LT5zdGF0cy5ieXRlc193cml0dGVuKTsKKworCXJldHVybiByZXN1bHQ7Cit9CisKKy8qKgorICogcHMzX3Z1YXJ0X3Jhd19yZWFkIC0gTG93IGxldmVsIHJlYWQgaGVscGVyLgorICoKKyAqIERvIG5vdCBjYWxsIHBzM192dWFydF9yYXdfcmVhZCBkaXJlY3RseSwgdXNlIHBzM192dWFydF9yZWFkLgorICovCis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BfSVQoIm9fcF9uYy9jPSVsdS8lbHVcbiIsb19wX25jLG9fcF9jKTsKLQlfT1VUUF9JVCgiTnVtYmVyIG9mIHRhc2tsZXQgcnVucyAodG90YWwpICAgICAgICAgICAgICAgICAgOiAldVxuIiwKKwlfT1VUUF9JVCgiTnVtYmVyIG9mIHRhc2tsZXQgcnVucyAodG90YWwpICAgICAgICAgICAgICAgICAgOiAlbHVcbiIsCiAJCSBwZXJmX3N0YXRzLnRsX3J1bnMpOwogCV9PVVRQX0lUKCJcbiIpOwotCV9PVVRQX0lUKCJOdW1iZXIgb2YgU0lHQSBzeW5jJ3MgaXNzdWVkICAgICAgICAgICAgICAgICAgICA6ICV1XG4iLAorCV9PVVRQX0lUKCJOdW1iZXIgb2YgU0lHQSBzeW5jJ3MgaXNzdWVkICAgICAgICAgICAgICAgICAgICA6ICVsdVxuIiwKIAkJIHBlcmZfc3RhdHMuc2lnYV9zeW5jcyk7Ci0JX09VVFBfSVQoIk51bWJlciBvZiBTSUdBIGluJ3MgaXNzdWVkICAgICAgICAgICAgICAgICAgICAgIDogJXVcbiIsCisJX09VVFBfSVQoIk51bWJlciBvZiBTSUdBIGluJ3MgaXNzdWVkICAgICAgICAgICAgICAgICAgICAgIDogJWx1XG4iLAogCQkgcGVyZl9zdGF0cy5zaWdhX2lucyk7Ci0JX09VVFBfSVQoIk51bWJlciBvZiBTSUdBIG91dCdzIGlzc3VlZCAgICAgICAgICAgICAgICAgICAgIDogJXVcbiIsCisJX09VVFBfSVQoIk51bWJlciBvZiBTSUdBIG91dCdzIGlzc3VlZCAgICAgICAgICAgICAgICAgICAgIDogJWx1XG4iLAogCQkgcGVyZl9zdGF0cy5zaWdhX291dHMpOwotCV9PVVRQX0lUKCJOdW1iZXIgb2YgUENJcyBjYXVnaHQgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICV1XG4iLAorCV9PVVRQX0lUKCJOdW1iZXIgb2YgUENJcyBjYXVnaHQgICAgICAgICAgICAgICAgICAgICAgICAg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BkZWZhdWx0CisqICBPQ00gZGlyZWN0b3J5IGRlZmF1bHQKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyBzdHJ1Y3QgYXNkX29jbV9kaXIgT0NNRGlySW5pdCA9CiB7CkBAIC03Myw3ICs3Myw3IEBACiB9OwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qICBPQ00gZGlyY2V0b3J5IEVudHJpZXMgZGVmYXVsdAorKiAgT0NNIGRpcmVjdG9yeSBFbnRyaWVzIGRlZmF1bHQKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyBzdHJ1Y3QgYXNkX29jbV9kaXJfZW50IE9DTURpckVudHJpZXNJbml0W09DTV9JTklUX0RJUl9FTlRSSUVTXSA9CiB7CkBAIC02MzAsMTAgKzYzMCw2IEBACiAKIAlyZWcgPSBhc2RfcmVhZF9yZWdfZHdvcmQoYXNkX2hhLCBFWFNJQ05GR1IpOwogCi0JaWYgKCEocmVnICYgRkxBU0hFWCkpIHsKLQkJQVNEX0RQUklOVEsoImZsYXNoIGRvZXNuJ3QgZXhpc3RcbiIpOwotCQlyZXR1cm4gLUVOT0VOVDsKLQl9CiAJaWYgKHBjaV9yZWFkX2NvbmZpZ19kd29yZChhc2RfaGEtPnBjaWRldiwgUENJX0NPTkZfRkxTSF9CQVIsCiAJCQkJICAmYXNkX2hhLT5od19wcm9mLmZsYXNoLmJhcikpIHsKIAkJYXNkX3ByaW50aygiY291bGRuJ3QgcmVhZCBQQ0lfQ09ORl9GTFNIX0JBUiBvZiAlc1xuIiwKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9haWM5NHh4L2FpYzk0eHhfc2VxLmMgY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BvbGwgPSAwOwogbW9kdWxlX3BhcmFtKGxwZmNfcG9sbCwgaW50LCAwKTsKQEAgLTgwMSwxMiArODY0LDExIEBACiAjIExPR19NQk9YICAgICAgICAgICAgICAgICAgICAgIDB4NCAgICAgICAgTWFpbGJveCBldmVudHMKICMgTE9HX0lOSVQgICAgICAgICAgICAgICAgICAgICAgMHg4ICAgICAgICBJbml0aWFsaXphdGlvbiBldmVudHMKICMgTE9HX0xJTktfRVZFTlQgICAgICAgICAgICAgICAgMHgxMCAgICAgICBMaW5rIGV2ZW50cwotIyBMT0dfSVAgICAgICAgICAgICAgICAgICAgICAgICAweDIwICAgICAgIElQIHRyYWZmaWMgaGlzdG9yeQogIyBMT0dfRkNQICAgICAgICAgICAgICAgICAgICAgICAweDQwICAgICAgIEZDUCB0cmFmZmljIGhpc3RvcnkKICMgTE9HX05PREUgICAgICAgICAgICAgICAgICAgICAgMHg4MCAgICAgICBOb2RlIHRhYmxlIGV2ZW50cwogIyBMT0dfTUlTQyAgICAgICAgICAgICAgICAgICAgICAweDQwMCAgICAgIE1pc2NlbGxhbmVvdXMgZXZlbnRzCiAjIExPR19TTEkgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwICAgICAgU0xJIGV2ZW50cwotIyBMT0dfQ0hLX0NPTkQgICAgICAgICAgICAgICAgICAweDEwMDAgICAgIEZDUCBDaGVjayBjb25kaXRpb24gZmxhZworIyBMT0dfRkNQX0VSUk9SICAgICAgICAgICAgICAgICAweDEwMDAgICAgIE9ubHkgbG9nIEZDUCBlcnJvcnMKICMgTE9HX0xJQkRGQyAgICAgICAgICAgICAgICAgICAgMHgyMDAwICAgICBMSUJERkMgZXZlbnRzCiAjIExPR19BTExfTVNHICAgICAgICAgICAgICAgICAgIDB4ZmZmZiAgICAgTE9HIGFsbCBtZXNzYWdlcwogKi8KQEAgLTkxNSw2ICs5NzcsMjIgQEAKIAkJIlNMSSByaW5ncyB0byBzcHJlYWQgSU9DQiBlbnRyaWVzIGFjcm9zcyI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qaGEsIGNoYXIgKnN0cikKIHsKIAlzcHJpbnRmKHN0ciwgIiVkLiUwMmQuJTAyZCAiLCBoYS0+ZndfbWFqb3JfdmVyc2lvbiwKQEAgLTYyMSw3ICs2MzgsNyBAQAogKiBOb3RlOgogKiAgICBPbmx5IHJldHVybiBGQUlMRUQgaWYgY29tbWFuZCBub3QgcmV0dXJuZWQgYnkgZmlybXdhcmUuCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLWludAorc3RhdGljIGludAogcWxhMnh4eF9laF9hYm9ydChzdHJ1Y3Qgc2NzaV9jbW5kICpjbWQpCiB7CiAJc2NzaV9xbGFfaG9zdF90ICpoYSA9IHRvX3FsYV9ob3N0KGNtZC0+ZGV2aWNlLT5ob3N0KTsKQEAgLTc1OCw3ICs3NzUsNyBAQAogKiAgICBTVUNDRVNTL0ZBSUxVUkUgKGRlZmluZWQgYXMgbWFjcm8gaW4gc2NzaS5oKS4KICoKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50CitzdGF0aWMgaW50CiBxbGEyeHh4X2VoX2RldmljZV9yZXNldChzdHJ1Y3Qgc2NzaV9jbW5kICpjbWQpCiB7CiAJc2NzaV9xbGFfaG9zdF90ICpoYSA9IHRvX3FsYV9ob3N0KGNtZC0+ZGV2aWNlLT5ob3N0KTsKQEAgLTg4OSw3ICs5MDYsNyBAQAogKiAgICBTVUNDRVNTL0ZBSUxVUkUgKGRlZmluZWQgYXMgbWFjcm8gaW4gc2NzaS5oKS4KICoKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50CitzdGF0aWMgaW50CiBxbGEyeHh4X2VoX2J1c19yZXNldChzdHJ1Y3Qgc2NzaV9jbW5kICpjbWQpCi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ICAgIC8qIFJlc2VydmVkICovCisJYXJyW24rK10gPSAwOyAgICAvKiBTdGF0dXMgY29kZSAqLworCWFycltuKytdID0gMDsgICAgLyogVmVuZG9yIHVuaXF1ZSAqLworCWFycltuKytdID0gMHgxOyAgLyogT25lIHBvcnQgcGVyIGdyb3VwICovCisJYXJyW24rK10gPSAwOyAgICAvKiBSZXNlcnZlZCAqLworCWFycltuKytdID0gMDsgICAgLyogUmVzZXJ2ZWQgKi8KKwlhcnJbbisrXSA9IChwb3J0X2EgPj4gOCkgJiAweGZmOworCWFycltuKytdID0gcG9ydF9hICYgMHhmZjsKKwlhcnJbbisrXSA9IDM7ICAgIC8qIFBvcnQgdW5hdmFpbGFibGUgKi8KKwlhcnJbbisrXSA9IDB4MDg7IC8qIGNsYWltOiBvbmx5IHVuYXZhaWxhbGJlIHBhdGhzIGFyZSBzdXBwb3J0ZWQgKi8KKwlhcnJbbisrXSA9IChwb3J0X2dyb3VwX2IgPj4gOCkgJiAweGZmOworCWFycltuKytdID0gcG9ydF9ncm91cF9iICYgMHhmZjsKKwlhcnJbbisrXSA9IDA7ICAgIC8qIFJlc2VydmVkICovCisJYXJyW24rK10gPSAwOyAgICAvKiBTdGF0dXMgY29kZSAqLworCWFycltuKytdID0gMDsgICAgLyogVmVuZG9yIHVuaXF1ZSAqLworCWFycltuKytdID0gMHgxOyAgLyogT25lIHBvcnQgcGVyIGdyb3VwICovCisJYXJyW24rK10gPSAwOyAgICAvKiBSZXNlcnZlZCAqLworCWFycltuKytdID0gMDsgICAgLyogUmVzZXJ2ZWQgKi8KKwlhcnJbbisrXSA9IChwb3J0X2IgPj4gOCkgJiAweGZmOworCWFycltuKytdID0gcG9ydF9iICYgMHhmZjsKKworCXJsZW4gPSBuIC0gNDsKKwlhcnJbMF0gPSAocmxlbiA+PiAyNCkgJiAweGZmOworCWFyclsxXSA9IChybGVuID4+IDE2KSAmIDB4ZmY7CisJYXJyWzJdID0gKHJsZW4gPj4gOCkgJiAweGZmOworCWFy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VzcGFjZV9zZW5kX2V2ZW50KFRHVF9LRVZFTlRfQ01EX0RPTkUsICZldik7CisJaWYgKGVycikKKwkJZXByaW50aygidHggYnVmIGlzIGZ1bGwsIGNvdWxkIG5vdCBzZW5kXG4iKTsKKworCXJldHVybiBlcnI7Cit9CisKK2ludCBzY3NpX3RndF91c3BhY2Vfc2VuZF90c2tfbWdtdChpbnQgaG9zdF9ubywgaW50IGZ1bmN0aW9uLCB1NjQgdGFnLAorCQkJCSAgc3RydWN0IHNjc2lfbHVuICpzY3NpbHVuLCB2b2lkICpkYXRhKQoreworCXN0cnVjdCB0Z3RfZXZlbnQgZXY7CisJaW50IGVycjsKKworCW1lbXNldCgmZXYsIDAsIHNpemVvZihldikpOworCWV2LnAudHNrX21nbXRfcmVxLmhvc3Rfbm8gPSBob3N0X25vOworCWV2LnAudHNrX21nbXRfcmVxLmZ1bmN0aW9uID0gZnVuY3Rpb247CisJZXYucC50c2tfbWdtdF9yZXEudGFnID0gdGFnOworCW1lbWNweShldi5wLnRza19tZ210X3JlcS5sdW4sIHNjc2lsdW4sIHNpemVvZihldi5wLnRza19tZ210X3JlcS5sdW4pKTsKKwlldi5wLnRza19tZ210X3JlcS5taWQgPSAodTY0KSAodW5zaWduZWQgbG9uZykgZGF0YTsKKworCWRwcmludGsoIiVkICV4ICVsbHggJWxseFxuIiwgaG9zdF9ubywgZnVuY3Rpb24sICh1bnNpZ25lZCBsb25nIGxvbmcpIHRhZywKKwkJKHVuc2lnbmVkIGxvbmcgbG9uZykgZXYucC50c2tfbWdtdF9yZXEubWlkKTsKKworCWVyciA9IHRndF91c3BhY2Vfc2VuZF9ldmVudChUR1RfS0VWRU5UX1RTS19NR01UX1JFUSwgJmV2KTsKKwlpZiAoZXJyKQorCQllcHJpbnRrKCJ0eCBidWYgaXMgZnVsbCwgY291bGQgbm90IHNlbmRcbiIpOworCisJcmV0dXJuIGVycjsKK30KKworc3RhdGljIGludCBldmVudF9yZWN2X21zZyhzdHJ1Y3QgdGd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CBTdGF0dXMgUmVnaXN0ZXIuCiAgKi8KICNkZWZpbmUgRFpfVFJEWSAgICAgICAgMHg4MDAwICAgICAgICAgICAgICAgICAvKiBUcmFuc21pdHRlciBlbXB0eSAqLwotI2RlZmluZSBEWl9USUUgICAgICAgICAweDQwMDAgICAgICAgICAgICAgICAgIC8qIFRyYW5zbWl0dGVyIEludGVycnVwdCBFbmFibGUgKi8KKyNkZWZpbmUgRFpfVElFICAgICAgICAgMHg0MDAwICAgICAgICAgICAgICAgICAvKiBUcmFuc21pdHRlciBJbnRlcnJ1cHQgRW5ibCAqLworI2RlZmluZSBEWl9UTElORSAgICAgICAweDAzMDAgICAgICAgICAgICAgICAgIC8qIFRyYW5zbWl0dGVyIExpbmUgTnVtYmVyICovCiAjZGVmaW5lIERaX1JET05FICAgICAgIDB4MDA4MCAgICAgICAgICAgICAgICAgLyogUmVjZWl2ZXIgZGF0YSByZWFkeSAqLwogI2RlZmluZSBEWl9SSUUgICAgICAgICAweDAwNDAgICAgICAgICAgICAgICAgIC8qIFJlY2VpdmUgSW50ZXJydXB0IEVuYWJsZSAqLwogI2RlZmluZSBEWl9NU0UgICAgICAgICAweDAwMjAgICAgICAgICAgICAgICAgIC8qIE1hc3RlciBTY2FuIEVuYWJsZSAqLwpAQCAtMjIsMzIgKzI0LDQ0IEBACiAjZGVmaW5lIERaX01BSU5UICAgICAgIDB4MDAwOCAgICAgICAgICAgICAgICAgLyogTG9vcCBCYWNrIE1vZGUgKi8KIAogLyoKLSAqIERlZmluaXRpb25zIGZvciB0aGUgUmVjZWl2ZWQgYnVmZmVyLiAKKyAqIERlZmluaXRpb25zIGZvciB0aGUgUmVjZWl2ZXIgQnVmZmVyIFJlZ2lzdGVyLgogICovCi0jZGVmaW5lIERaX1JCVUZfTUFTSyAgIDB4MDBGRiAgICAgICAgICAgICAgICAgLyogRGF0YSBNYXNrIGluIHRoZSBSZWNlaXZlIEJ1ZmZlciAqLwotI2RlZmluZSBEWl9MSU5FX01BU0sgICAweDAzMDAgICAgICAgICAgICAgICAgIC8qIExpbmUgTWFzayBpbiB0aGUgUmVjZWl2ZSBCdWZmZXIgKi8KKyNkZWZpbmUgRFpfUkJVRl9NQVNLICAgMHgwMEZGICAgICAgICAgICAgICAgICAvKiBEYXRhIE1hc2sgKi8KKyNkZWZpbmUgRFpfTElORV9NQVNLICAgMHgwMzAwICAgICAgICAgICAgICAgICAvKiBMaW5lIE1hc2sgKi8KICNkZWZpbmUgRFpfRFZBTCAgICAgICAgMHg4MDAwICAgICAgICAgICAgICAgICAvKiBWYWxpZCBEYXRhIGluZGljYXRvciAqLwogI2RlZmluZSBEWl9PRVJSICAgICAgICAweDQwMDAgICAgICAgICAgICAgICAgIC8qIE92ZXJydW4gZXJyb3IgaW5kaWNhdG9yICovCiAjZGVmaW5lIERaX0ZFUlIgICAgICAgIDB4MjAwMCAgICAgICAgICAgICAgICAgLyogRnJhbWUgZXJyb3IgaW5kaWNhdG9yICovCiAjZGVmaW5lIERaX1BFUlIgICAgICAgIDB4MTAwMCAgICAgICAgICAgICAgICAgLyogUGFyaXR5IGVycm9yIGluZGljYXRvciAqLwogCi0jZGVmaW5lIExJTkUoeCkgKHggJiBEWl9MSU5FX01BU0spID4+IDggICAgICAgLyogR2V0IHRoZSBsaW5lIG51bWJlciBmcm9tIHRoZSBpbnB1dCBidWZmZXIgKi8KLSNkZWZpbmUgVUNIQVIoeCkgKHVuc2lnbmVkIGNoYXIpKHggJiBEWl9SQlVGX01BU0spCisjZGVmaW5lIExJTkUoeCkgKCh4ICYgRFpfTElORV9NQVNLKSA+PiA4KSAgICAgLyogR2V0IHRoZSBsaW5lIG51bWJlcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20gdGhlIGlucHV0IGJ1ZmZlciAqLworI2RlZmluZSBVQ0hBUih4KSAoKHVuc2lnbmVkIGNoYXIpKHggJiBEWl9SQlVGX01BU0spKQogCiAvKgotICogRGVmaW5pdGlvbnMgZm9yIHRoZSBUcmFuc21pdCBSZWdpc3Rlci4KKyAqIERlZmluaXRpb25zIGZvciB0aGUgVHJhbnNtaXQgQ29udHJvbCBSZWdpc3Rlci4KICAqLwogI2RlZmluZSBEWl9MSU5FX0tFWUJPQVJEIDB4MDAwMQogI2RlZmluZSBEWl9MSU5FX01PVVNFICAgIDB4MDAwMgogI2RlZmluZSBEWl9MSU5FX01PREVNICAgIDB4MDAwNAogI2RlZmluZSBEWl9MSU5FX1BSSU5URVIgIDB4MDAwOAogCisjZGVmaW5lIERaX01PREVNX1JUUyAgICAgMHgwODAwICAgICAgICAgICAgICAgLyogUlRTIGZvciB0aGUgbW9kZW0gbGluZSAoMikgKi8KICNkZWZpbmUgRFpfTU9ERU1fRFRSICAgICAweDA0MDAgICAgICAgICAgICAgICAvKiBEVFIgZm9yIHRoZSBtb2RlbSBsaW5lICgyKSAqLworI2RlZmluZSBEWl9QUklOVF9SVFMgICAgIDB4MDIwMCAgICAgICAgICAgICAgIC8qIFJUUyBmb3IgdGhlIHBybnRyIGxpbmUgKDMpICovCisjZGVmaW5lIERaX1BSSU5UX0RUUiAgICAgMHgwMTAwICAgICAgICAgICAgICAgLyogRFRSIGZvciB0aGUgcHJudHIgbGluZSAoMykgKi8KKyNkZWZpbmUgRFpfTE5FTkIgICAgICAgICAweDAwMGYgICAgICAgICAgICAgICAvKiBUcmFuc21pdHRlciBMaW5lIEVuYWJsZSAqLwogCiAvKgogICogRGVmaW5pdGlvbnMgZm9yIHRoZSBNb2RlbSBTdGF0dXMgUmVnaXN0ZXIuCiAgKi8KKyNkZWZpbmUgRFpfTU9ERU1fUkkgICAgICAweDA4MDAgICAgICAgICAgICAgICAvKiBSSSBmb3IgdGhlIG1vZGVtIGxpbmUgKDIpICovCisjZGVmaW5lIERaX01PREVNX0NEICAgICAgMHgwNDAwICAgICAgICAgICAgICAgLyogQ0QgZm9yIHRoZSBtb2RlbSBsaW5lICgyKSAqLwogI2RlZmluZSBEWl9NT0RFTV9EU1Ig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F9ub2Rlc1tNUEM1Mnh4X1BTQ19NQVhOVU1dOworCitzdGF0aWMgdm9pZCBtcGM1Mnh4X3VhcnRfb2ZfZW51bWVyYXRlKHZvaWQpOworI2VuZGlmCiAKICNkZWZpbmUgUFNDKHBvcnQpICgoc3RydWN0IG1wYzUyeHhfcHNjIF9faW9tZW0gKikoKHBvcnQpLT5tZW1iYXNlKSkKIApAQCAtOTYsMzIgKzEyNSw0MCBAQAogI2RlZmluZSB1YXJ0X2NvbnNvbGUocG9ydCkJKDApCiAjZW5kaWYKIAorI2lmIGRlZmluZWQoQ09ORklHX1BQQ19NRVJHRSkKK3N0YXRpYyBzdHJ1Y3Qgb2ZfZGV2aWNlX2lkIG1wYzUyeHhfdWFydF9vZl9tYXRjaFtdID0geworCXsgLnR5cGUgPSAic2VyaWFsIiwgLmNvbXBhdGlibGUgPSAibXBjNTJ4eC1wc2MtdWFydCIsIH0sCisJeyAudHlwZSA9ICJzZXJpYWwiLCAuY29tcGF0aWJsZSA9ICJtcGM1MjAwLXBzYyIsIH0sIC8qIEVmaWthIG9ubHkhICovCisJe30sCit9OworI2VuZGlmCisKIAogLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCiAvKiBVQVJUIG9wZXJhdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogCi1zdGF0aWMgdW5zaWduZWQgaW50IAorc3RhdGljIHVuc2lnbmVkIGludAogbXBjNTJ4eF91YXJ0X3R4X2VtcHR5KHN0cnVjdCB1YXJ0X3BvcnQgKnBvcnQpCiB7CiAJaW50IHN0YXR1cyA9IGluX2JlMTYoJlBTQyhwb3J0KS0+bXBjNTJ4eF9wc2Nfc3RhdHVz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AtRUlOVkFMOwogCi0JZXJyID0gcmVxdWVzdF9tZW1fcmVnaW9uKHBvcnQtPm1hcGJhc2UsIE1QQzUyeHhfUFNDX1NJWkUsCisJZXJyID0gcmVxdWVzdF9tZW1fcmVnaW9uKHBvcnQtPm1hcGJhc2UsIHNpemVvZihzdHJ1Y3QgbXBjNTJ4eF9wc2MpLAogCQkJIm1wYzUyeHhfcHNjX3VhcnQiKSAhPSBOVUxMID8gMCA6IC1FQlVTWTsKIAogCWlmIChlcnIgJiYgKHBvcnQtPmZsYWdzICYgVVBGX0lPUkVNQVApKSB7CkBAIC0zNzMsNyArNDExLDcgQEAKIAogCWlmICggKHNlci0+aXJxICE9IHBvcnQtPmlycSkgfHwKIAkgICAgIChzZXItPmlvX3R5cGUgIT0gU0VSSUFMX0lPX01FTSkgfHwKLQkgICAgIChzZXItPmJhdWRfYmFzZSAhPSBwb3J0LT51YXJ0Y2xrKSAgfHwgCisJICAgICAoc2VyLT5iYXVkX2Jhc2UgIT0gcG9ydC0+dWFydGNsaykgIHx8CiAJICAgICAoc2VyLT5pb21lbV9iYXNlICE9ICh2b2lkKilwb3J0LT5tYXBiYXNlKSB8fAogCSAgICAgKHNlci0+aHViNiAhPSAwICkgKQogCQlyZXR1cm4gLUVJTlZBTDsKQEAgLTQwNCwxMSArNDQyLDExIEBACiAJLnZlcmlmeV9wb3J0CT0gbXBjNTJ4eF91YXJ0X3ZlcmlmeV9wb3J0CiB9OwogCi0JCisKIC8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLwogLyogSW50ZXJydXB0IGhhbmRsaW5nICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KLQkKKwogc3RhdGljIGlubGluZS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V9kcml2ZXIgbXBjNTJ4eF91YXJ0X3BsYXRmb3JtX2RyaXZlciA9IHsKIAkucHJvYmUJCT0gbXBjNTJ4eF91YXJ0X3Byb2JlLAogCS5yZW1vdmUJCT0gbXBjNTJ4eF91YXJ0X3JlbW92ZSwKQEAgLTgwMCw2ICs5MTgsMTg0IEBACiAJCS5uYW1lCT0gIm1wYzUyeHgtcHNjIiwKIAl9LAogfTsKKyNlbmRpZiAvKiAhZGVmaW5lZChDT05GSUdfUFBDX01FUkdFKSAqLworCisKKyNpZiBkZWZpbmVkKENPTkZJR19QUENfTUVSR0UpCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qIE9GIFBsYXRmb3JtIERyaXZlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisKK3N0YXRpYyBpbnQgX19kZXZpbml0CittcGM1Mnh4X3VhcnRfb2ZfcHJvYmUoc3RydWN0IG9mX2RldmljZSAqb3AsIGNvbnN0IHN0cnVjdCBvZl9kZXZpY2VfaWQgKm1hdGNoKQoreworCWludCBpZHggPSAtMTsKKwl1bnNpZ25lZCBpbnQgaXBiX2ZyZXE7CisJc3RydWN0IHVhcnRfcG9ydCAqcG9ydCA9IE5VTEw7CisJc3RydWN0IHJlc291cmNlIHJlczsKKwlpbnQgcmV0OworCisJZGV2X2RiZygmb3AtPmRldiwgIm1wYzUyeHhfdWFydF9wcm9iZShvcD0lcCwgbWF0Y2g9JXApXG4iLCBvcCwgbWF0Y2gpOworCisJLyogQ2hlY2sgdmFsaWRpdHkgJiBwcmVzZW5jZSAqLworCWZvciAoaWR4ID0gMDsgaWR4IDwgTVBDNTJ4eF9QU0NfTUFYTlVNOyBpZHgrK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ZpY2UgeworCXN0cnVjdCBoaWRfZGV2aWNlICpoaWQ7CQkJCQkJLyogcG9pbnRlciB0byBjb3JyZXNwb25kaW5nIEhJRCBkZXYgKi8KKworCXN0cnVjdCB1c2JfaW50ZXJmYWNlICppbnRmOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBVU0IgaW50ZXJmYWNlICovCisJaW50IGlmbnVtOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFVTQiBpbnRlcmZhY2UgbnVtYmVyICovCisKKwl1bnNpZ25lZCBpbnQgYnVmc2l6ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogVVJCIGJ1ZmZlciBzaXplICovCisKKwlzdHJ1Y3QgdXJiICp1cmJpbjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogSW5wdXQgVVJCICovCisJY2hhciAqaW5idWY7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIElucHV0IGJ1ZmZlciAqLworCWRtYV9hZGRyX3QgaW5idWZfZG1hOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBJbnB1dCBidWZmZXIgZG1hICovCisJc3BpbmxvY2tfdCBpbmxvY2s7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIElucHV0IGZpZm8gc3BpbmxvY2sgKi8KKworCXN0cnVjdCB1cmIgKnVyYmN0cmw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBDb250cm9sIFVSQiAqLworCXN0cnVjdCB1c2JfY3RybHJlcXVlc3QgKmNyOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBDb250cm9sIHJlcXVlc3Qgc3RydWN0ICovCisJZG1hX2FkZHJfdCBjcl9kbWE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIENvbnRyb2wgcmVxdWVzdCBzdHJ1Y3QgZG1hICovCisJc3RydWN0IGhpZF9jb250cm9sX2ZpZm8gY3RybFtISURfQ09OVFJPTF9GSUZPX1NJWkVdOyAgCQkvKiBDb250cm9sIGZpZm8gKi8KKwl1bnNpZ25lZCBjaGFyIGN0cmxoZWFkLCBjdHJsdGFpbDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogQ29udHJvbCBmaWZvIGhlYWQgJiB0YWlsICovCisJY2hhciAqY3RybGJ1ZjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIENvbnRyb2wgYnVmZmVyICovCisJZG1hX2FkZHJfdCBjdHJsYnVmX2RtYTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIENvbnRyb2wgYnVmZmVyIGRtYSAqLworCXNwaW5sb2NrX3QgY3RybGxvY2s7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBDb250cm9sIGZpZm8gc3BpbmxvY2sgKi8KKworCXN0cnVjdCB1cmIgKnVyYm91dDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBPdXRwdXQgVVJCICovCisJc3RydWN0IGhpZF9yZXBvcnQgKm91dFtISURfQ09OVFJPTF9GSUZPX1NJWkVdOyAgICAgICAgICAgICAgICAgIC8qIE91dHB1dCBwaXBlIGZpZm8gKi8KKwl1bnNpZ25lZCBjaGFyIG91dGhlYWQsIG91dHRhaWw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogT3V0cHV0IHBpcGUgZmlmbyBoZWFkICYgdGFpbCAqLworCWNoYXIgKm91dGJ1ZjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBPdXRwdXQgYnVmZmVyICovCisJZG1hX2FkZHJfdCBvdXRidWZfZG1hOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIE91dHB1dCBidWZmZXIgZG1hICovCisJc3BpbmxvY2tfdCBvdXRsb2NrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIE91dHB1dCBmaWZvIHNwaW5sb2NrICovCisKKwl1bnNpZ25lZCBsb25nIGlvZmw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogSS9PIGZsYWdzIChDVFJMX1JVTk5JTkcsIE9VVF9SVU5OSU5HKSAqLworCXN0cnVjdCB0aW1lcl9saXN0IGlvX3JldHJ5OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBSZXRyeSB0aW1lciAqLworCXVuc2lnbmVkIGxvbmcgc3RvcF9yZXRyeTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBUaW1lIHRvIGdpdmUgdXAsIGluIGppZmZpZXMgKi8KKwl1bnNpZ25lZCBpbnQgcmV0cnlfZGVsYXk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRGVsYXkgbGVuZ3RoIGluIG1zICovCisJc3RydWN0IHdvcmtfc3RydWN0IHJlc2V0X3dvcms7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFRhc2sgY29udGV4dCBmb3IgcmVzZXRzICovCisKK307CisKKyNlbmRpZgorCmRpZmYgLS1naXQgYS9kcml2ZXJzL3VzYi9pbnB1dC91c2JrYmQuYyBiL2RyaXZlcnMvdXNiL2lucHV0L3VzYmtiZC5jCmluZGV4IGM3MzI4NWMuLjg1MDU4MjQgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvdXNiL2lucHV0L3VzYmtiZC5jCisrKyBiL2RyaXZlcnMvdXNiL2lucHV0L3VzYmtiZC5jCkBAIC0xMjIsNyArMTIyLDcg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REVWSUNFLAorCSAgICAgICAgICAgICAgICAgICAgICBUU0MxMF9SQVRFXzE1MCwgMCwgYnVmLCAyLCBVU0JfQ1RSTF9TRVRfVElNRU9VVCk7CisJaWYgKHJldCA8IDApCisJCXJldHVybiByZXQ7CisJaWYgKGJ1ZlswXSAhPSAweDA2IHx8IGJ1ZlsxXSAhPSAweDAwKQorCQlyZXR1cm4gLUVOT0RFVjsKKworCS8qIHN0YXJ0IHNlbmRpbmcgZGF0YSAqLworCXJldCA9IHVzYl9jb250cm9sX21zZyhkZXYsIHVzYl9yY3ZjdHJscGlwZSAoZGV2LCAwKSwKKwkgICAgICAgICAgICAgICAgICAgICAgVFNDMTBfQ01EX0RBVEExLAorCSAgICAgICAgICAgICAgICAgICAgICBVU0JfRElSX09VVCB8IFVTQl9UWVBFX1ZFTkRPUiB8IFVTQl9SRUNJUF9ERVZJQ0UsCisJICAgICAgICAgICAgICAgICAgICAgIDAsIDAsIE5VTEwsIDAsIFVTQl9DVFJMX1NFVF9USU1FT1VUKTsKKwlpZiAocmV0IDwgMCkKKwkJcmV0dXJuIHJldDsKKworCXJldHVybiAwOworfQorCisKK3N0YXRpYyBpbnQgZG1jX3RzYzEwX3JlYWRfZGF0YSh1bnNpZ25lZCBjaGFyICpwa3QsIGludCAqeCwgaW50ICp5LCBpbnQgKnRvdWNoLCBpbnQgKnByZXNzKQoreworCSp4ID0gKChwa3RbMl0gJiAweDAzKSA8PCA4KSB8IHBrdFsxXTsKKwkqeSA9ICgocGt0WzRdICYgMHgwMykgPDwgOCkgfCBwa3RbM107CisJKnRvdWNoID0gcGt0WzBdICYgMHgwMTsKKworCXJldHVybiAxOworfQorI2VuZGlmCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiB0aGUgZGlmZmVyZW50IGRldmljZSBkZXNjcmlwdG9ycwogICovCiBzdGF0aWMgc3RydWN0IHVzYnRvdW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GRpID0gZGF0YTsKKyAgICAgICAgc3RydWN0IHVzYl9mdGRpICpmdGRpID0KKwkJY29udGFpbmVyX29mKHdvcmssIHN0cnVjdCB1c2JfZnRkaSwgY29tbWFuZF93b3JrLndvcmspOworCiAgICAgICAgIGlmIChmdGRpLT5kaXNjb25uZWN0ZWQgPiAwKSB7CiAgICAgICAgICAgICAgICAgZnRkaV9lbGFuX3B1dF9rcmVmKGZ0ZGkpOwogICAgICAgICAgICAgICAgIHJldHVybjsKQEAgLTUwMCw5ICs0NzEsMTAgQEAKICAgICAgICAgcmV0dXJuOwogfQogCi1zdGF0aWMgdm9pZCBmdGRpX2VsYW5fcmVzcG9uZF93b3JrKHZvaWQgKmRhdGEpCitzdGF0aWMgdm9pZCBmdGRpX2VsYW5fcmVzcG9uZF93b3JrKHN0cnVjdCB3b3JrX3N0cnVjdCAqd29yaykKIHsKLSAgICAgICAgc3RydWN0IHVzYl9mdGRpICpmdGRpID0gZGF0YTsKKyAgICAgICAgc3RydWN0IHVzYl9mdGRpICpmdGRpID0KKwkJY29udGFpbmVyX29mKHdvcmssIHN0cnVjdCB1c2JfZnRkaSwgcmVzcG9uZF93b3JrLndvcmspOwogICAgICAgICBpZiAoZnRkaS0+ZGlzY29ubmVjdGVkID4gMCkgewogICAgICAgICAgICAgICAgIGZ0ZGlfZWxhbl9wdXRfa3JlZihmdGRpKTsKICAgICAgICAgICAgICAgICByZXR1cm47CkBAIC01MTMsOCArNDg1LDYgQEAKICAgICAgICAgICAgICAgICAgICAgICAgIGZ0ZGktPmRpc2Nvbm5lY3RlZCArPSAxOwogICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmV0dmFsID09IC1FTk9ERVYpIHsKICAgICAgICAgICAgICAgICAgICAgICAgIGZ0ZGktPmRpc2Nvbm5lY3RlZCArPSAxOwotICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocmV0dmFsID09IC1FTk9ERVYpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGZ0ZGktP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RydWN0IHVzYl9mdGRpICopZmlsZS0+cHJpdmF0ZV9kYXRhOworICAgICAgICBzdHJ1Y3QgdXNiX2Z0ZGkgKmZ0ZGkgPSBmaWxlLT5wcml2YXRlX2RhdGE7CisKICAgICAgICAgaWYgKGZ0ZGktPmRpc2Nvbm5lY3RlZCA+IDApIHsKICAgICAgICAgICAgICAgICByZXR1cm4gLUVOT0RFVjsKICAgICAgICAgfQpAQCAtMTIyMCwyNyArMTE4OCwxOCBAQAogICAgICAgICBpZiAocmV0dmFsKSB7CiAgICAgICAgICAgICAgICAgZGV2X2VycigmZnRkaS0+dWRldi0+ZGV2LCAiZmFpbGVkIHN1Ym1pdHRpbmcgd3JpdGUgdXJiLCBlcnJvciAlIgogICAgICAgICAgICAgICAgICAgICAgICAgImRcbiIsIHJldHZhbCk7Ci0gICAgICAgICAgICAgICAgZ290byBlcnJvcl80OworICAgICAgICAgICAgICAgIGdvdG8gZXJyb3JfMzsKICAgICAgICAgfQogICAgICAgICB1c2JfZnJlZV91cmIodXJiKTsKLSAgICAgIGV4aXQ6OwotICAgICAgICBpZiAoY291bnQgPiBtKSB7Ci0gICAgICAgICAgICAgICAgaW50IEkgPSBtIC0gMTsKLSAgICAgICAgICAgICAgICB3aGlsZSAoSS0tID4gMCkgewotICAgICAgICAgICAgICAgICAgICAgICAgZCArPSBzcHJpbnRmKGQsICIgJTAyWCIsIDB4MDAwMDAwRkYgJiAqcysrKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZCArPSBzcHJpbnRmKGQsICIgLi4iKTsKLSAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICBpbnQgSSA9IGNvdW50OwotICAgICAgICAgICAgICAgIHdoaWxlIChJLS0gPiAwKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBkICs9IHNwcmludGYoZCwgIiAlMDJYIiwgMHgwMDAwMDBGRiAmICpzKyspOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQorCitleGl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IGlmYWNlX2Rlc2MtPmRlc2MuYk51bUVuZHBvaW50czsgKytpKSB7CiAgICAgICAgICAgICAgICAgZW5kcG9pbnQgPSAmaWZhY2VfZGVzYy0+ZW5kcG9pbnRbaV0uZGVzYzsKICAgICAgICAgICAgICAgICBpZiAoIWZ0ZGktPmJ1bGtfaW5fZW5kcG9pbnRBZGRyICYmCi0gICAgICAgICAgICAgICAgICAgICAgICAoKGVuZHBvaW50LT5iRW5kcG9pbnRBZGRyZXNzICYgVVNCX0VORFBPSU5UX0RJUl9NQVNLKQotICAgICAgICAgICAgICAgICAgICAgICAgPT0gVVNCX0RJUl9JTikgJiYgKChlbmRwb2ludC0+Ym1BdHRyaWJ1dGVzICYKLSAgICAgICAgICAgICAgICAgICAgICAgIFVTQl9FTkRQT0lOVF9YRkVSVFlQRV9NQVNLKSA9PSBVU0JfRU5EUE9JTlRfWEZFUl9CVUxLKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIHsKKwkJICAgIHVzYl9lbmRwb2ludF9pc19idWxrX2luKGVuZHBvaW50KSkgewogICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyX3NpemUgPSBsZTE2X3RvX2NwdShlbmRwb2ludC0+d01heFBhY2tldFNpemUpOwogICAgICAgICAgICAgICAgICAgICAgICAgZnRkaS0+YnVsa19pbl9zaXplID0gYnVmZmVyX3NpemU7CiAgICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5idWxrX2luX2VuZHBvaW50QWRkciA9IGVuZHBvaW50LT5iRW5kcG9pbnRBZGRyZXNzOwpAQCAtMjY2MywxMCArMjYxMSw3IEBACiAgICAgICAgICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIGlmICghZnRkaS0+YnVsa19vdXRfZW5kcG9pbnRBZGRyICYmCi0gICAgICAgICAgICAgICAgICAgICAgICAoKGVuZHBvaW50LT5iRW5kcG9pbnRBZGRyZXNzICYgVVNCX0VORFBPSU5UX0RJUl9NQVNLKQotICAgICAgICAgICAgICAgICAgICAgICAgPT0gVVNCX0RJUl9PVVQpICYmICgoZW5kcG9pbnQtPmJtQXR0cmlidXRlcyAmCi0gICAgICAgICAgICAgICAgICAgICAgICBVU0JfRU5EUE9JTlRfWEZFUlRZUEVfTUFTSykgPT0gVVNCX0VORFBPSU5UX1hGRVJfQlVMSykpCi0gICAgICAgICAgICAgICAgICAgICAgICB7CisJCSAgICB1c2JfZW5kcG9pbnRfaXNfYnVsa19vdXQoZW5kcG9pbnQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICBmdGRpLT5idWxrX291dF9lbmRwb2ludEFkZHIgPQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbmRwb2ludC0+YkVuZHBvaW50QWRkcmVzczsKICAgICAgICAgICAgICAgICB9CkBAIC0yNzA1LDEyICsyNjUwLDkgQEAKICAgICAgICAgICAgICAgICBmdGRpLT5jbGFzcyA9IE5VTEw7CiAgICAgICAgICAgICAgICAgZGV2X2luZm8oJmZ0ZGktPnVkZXYtPmRldiwgIlVTQiBGRFRJPSVwIEVMQU4gaW50ZXJmYWNlICVkIG5vdyBhIgogICAgICAgICAgICAgICAgICAgICAgICAgImN0aXZhdGVkXG4iLCBmdGRpLCBpZmFjZV9kZXNjLT5kZXNjLmJJbnRlcmZhY2VOdW1iZXIpOwotICAgICAgICAgICAgICAgIElOSVRfV09SSygmZnRkaS0+c3RhdHVzX3dvcmssIGZ0ZGlfZWxhbl9zdGF0dXNfd29yaywKLSAgICAgICAgICAgICAgICAgICAgICAgICh2b2lkICopZnRkaSk7Ci0gICAgICAgICAgICAgICAgSU5JVF9XT1JLKCZmdGRpLT5jb21tYW5kX3dvcmssIGZ0ZGlfZWxhbl9jb21tYW5kX3dvcmssCi0gICAgICAgICAgICAgICAgICAgICAgICAodm9pZCAqKWZ0ZGkpOwotICAgICAgICAgICAgICAgIElOSVRfV09SSygmZnRkaS0+cmVzcG9uZF93b3JrLCBmdGRpX2VsYW5fcmVz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lmX3N0b3BfcXVldWUobmV0KTsKIApAQCAtODUwLDEwICs4NjksMTAgQEAKIAkJCQlLQVdFVEhfQ09OVFJPTF9USU1FT1VUKTsKIAogCWlmKHJlc3VsdCA8IDApIHsKLQkJa2F3ZXRoX2VycigiRmFpbGVkIHRvIHNldCBSeCBtb2RlOiAlZCIsIHJlc3VsdCk7CisJCWVycigiRmFpbGVkIHRvIHNldCBSeCBtb2RlOiAlZCIsIHJlc3VsdCk7CiAJfQogCWVsc2UgewotCQlrYXdldGhfZGJnKCJTZXQgUnggbW9kZSB0byAlZCIsIHBhY2tldF9maWx0ZXJfYml0bWFwKTsKKwkJZGJnKCJTZXQgUnggbW9kZSB0byAlZCIsIHBhY2tldF9maWx0ZXJfYml0bWFwKTsKIAl9CiAJfQogfQpAQCAtODc0LDcgKzg5Myw3IEBACiB7CiAJc3RydWN0IGthd2V0aF9kZXZpY2UgKmthd2V0aCA9IG5ldGRldl9wcml2KG5ldCk7CiAKLQlrYXdldGhfd2FybigiJXM6IFR4IHRpbWVkIG91dC4gUmVzZXR0aW5nLiIsIG5ldC0+bmFtZSk7CisJd2FybigiJXM6IFR4IHRpbWVkIG91dC4gUmVzZXR0aW5nLiIsIG5ldC0+bmFtZSk7CiAJa2F3ZXRoLT5zdGF0cy50eF9lcnJvcnMrKzsKIAluZXQtPnRyYW5zX3N0YXJ0ID0gamlmZmllczsKIApAQCAtODgyLDYgKzkwMSw0MiBAQAogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogICAgIGthd2V0aF9zdXNwZW5kCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQga2F3ZXRoX3N1c3BlbmQoc3RydWN0IHVzYl9pbnRlcmZhY2UgKmludGYsIHBtX21lc3NhZ2VfdCBtZXNzYWdlKQoreworCXN0cnVjdCBrYXdldGhfZGV2aWNlICprYXdldGggPSB1c2JfZ2V0X2ludGZkYXRhKGludGYpOworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgma2F3ZXRoLT5kZXZpY2VfbG9jaywgZmxhZ3MpOworCWthd2V0aC0+c3RhdHVzIHw9IEtBV0VUSF9TVEFUVVNfU1VTUEVORElORzsKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZrYXdldGgtPmRldmljZV9sb2NrLCBmbGFncyk7CisKKwlrYXdldGhfa2lsbF91cmJzKGthd2V0aCk7CisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAga2F3ZXRoX3Jlc3VtZQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IGthd2V0aF9yZXN1bWUoc3RydWN0IHVzYl9pbnRlcmZhY2UgKmludGYpCit7CisJc3RydWN0IGthd2V0aF9kZXZpY2UgKmthd2V0aCA9IHVzYl9nZXRfaW50ZmRhdGEoaW50Zik7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKworCXNwaW5fbG9ja19pcnFzYXZlKCZrYXdldGgtPmRldmljZV9sb2NrLCBmbGFncyk7CisJa2F3ZXRoLT5zdGF0dXMgJj0gfktBV0VUSF9TVEFUVVNfU1VTUEVORElORzsKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZrYXdldGgtPmRldmljZV9sb2NrLCBmbGFncyk7CisKKwlpZiAoIWthd2V0aC0+b3BlbmVkKQorCQlyZXR1cm4gMDsKKwlrYXdldGhfcmVzdWJtaXRfcnhfdXJiKGthd2V0aCwgR0ZQX05PSU8pOworCWthd2V0aF9yZXN1Ym1pdF9pbnRfdXJiKGthd2V0aCwgR0ZQX05PSU8pOworCisJcmV0dXJuIDA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pZiAobW9zNzcyMF9wb3J0ID09IE5VTEwpCisJCXJldHVybiAtRUlOVkFMOworCisJcG9ydCA9IG1vczc3MjBfcG9ydC0+cG9ydDsKKwlzZXJpYWwgPSBwb3J0LT5zZXJpYWw7CisKKyAgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAqICAgICAgSW5pdCBTZXF1ZW5jZSBmb3IgaGlnaGVyIHJhdGVzCisgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwlkYmcoIlNlbmRpbmcgU2V0dGluZyBDb21tYW5kcyAuLi4uLi4uLi4uIik7CisJcG9ydF9udW1iZXIgPSBwb3J0LT5udW1iZXIgLSBwb3J0LT5zZXJpYWwtPm1pbm9yOworCisJZGF0YSA9IDB4MDAwOworCXNlbmRfbW9zX2NtZChzZXJpYWwsIE1PU19XUklURSwgcG9ydF9udW1iZXIsIDB4MDEsICZkYXRhKTsKKwlkYXRhID0gMHgwMDA7CisJc2VuZF9tb3NfY21kKHNlcmlhbCwgTU9TX1dSSVRFLCBwb3J0X251bWJlciwgMHgwMiwgJmRhdGEpOworCWRhdGEgPSAweDBDRjsKKwlzZW5kX21vc19jbWQoc2VyaWFsLCBNT1NfV1JJVEUsIHBvcnQtPm51bWJlciwgMHgwMiwgJmRhdGEpOworCWRhdGEgPSAweDAwYjsKKyAgICAgICAgbW9zNzcyMF9wb3J0LT5zaGFkb3dNQ1IgID0gZGF0YTsKKwlzZW5kX21vc19jbWQoc2VyaWFsLCBNT1NfV1JJVEUsIHBvcnRfbnVtYmVyLCAweDA0LCAmZGF0YSk7CisJZGF0YSA9IDB4MDBiOworCXNlbmRfbW9zX2NtZChzZXJpYWwsIE1PU19XUklURSwgcG9ydF9udW1iZXIsIDB4MDQsICZkYXRhKTsKKworCWRhdGEgPSAweDAwMDsKKwlzZW5kX21vc19jbWQoc2VyaWFsLCBNT1NfUkVBRCwgTU9TX01BWF9QT1JULCAweDA4LCAmZGF0YSk7CisJZGF0YSA9IDB4MDAwOworCXNlbmRfbW9zX2NtZChzZXJpYWwsIE1PU19XUklURSwgTU9TX01BWF9QT1JULCAweDA4LCAmZGF0YSk7CisKKworICAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICAgICAgICogICAgICAgICAgICAgIFNldCBmb3IgaGlnaGVyIHJhdGVzICAgICAgICAgICAqCisgICAgICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCWRhdGEgPSBiYXVkICogMHgxMDsKKwlzZW5kX21vc19jbWQoc2VyaWFsLCBNT1NfV1JJVEUsIE1PU19NQVhfUE9SVCwgcG9ydF9udW1iZXIgKyAxLCZkYXRhKTsKKworCWRhdGEgPSAweDAwMzsKKwlzZW5kX21vc19jbWQoc2VyaWFsLCBNT1NfUkVBRCwgTU9TX01BWF9QT1JULCAweDA4LCAmZGF0YSk7CisJZGF0YSA9IDB4MDAzOworCXNlbmRfbW9zX2NtZChzZXJpYWwsIE1PU19XUklURSwgTU9TX01BWF9QT1JULCAweDA4LCAmZGF0YSk7CisKKwlkYXRhID0gMHgwMmI7CisgICAgICAgIG1vczc3MjBfcG9ydC0+c2hhZG93TUNSICA9IGRhdGE7CisJc2VuZF9tb3NfY21kKHNlcmlhbCwgTU9TX1dSSVRFLCBwb3J0X251bWJlciwgMHgwNCwgJmRhdGEpOworCWRhdGEgPSAweDAyYjsKKwlzZW5kX21vc19jbWQoc2VyaWFsLCBNT1NfV1JJVEUsIHBvcnRfbnVtYmVyLCAweDA0LCAmZGF0YSk7CisKKyAgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgICAgICAgICAqICAgICAgICAgICAgICBTZXQgRExML0RMTQorICAgICAgICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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ykgJiYgKGNub3cucm5nICE9IGNwcmV2LnJuZykpIHx8CisJCQkgICAgKChhcmcgJiBUSU9DTV9EU1IpICYmIChjbm93LmRzciAhPSBjcHJldi5kc3IpKSB8fAorCQkJICAgICgoYXJnICYgVElPQ01fQ0QpICAmJiAoY25vdy5kY2QgIT0gY3ByZXYuZGNkKSkgfHwKKwkJCSAgICAoKGFyZyAmIFRJT0NNX0NUUykgJiYgKGNub3cuY3RzICE9IGNwcmV2LmN0cykpICkgeworCQkJCXJldHVybiAwOworCQkJfQorCQkJY3ByZXYgPSBjbm93OworCQl9CisJCS8qIE5PVFJFQUNIRUQgKi8KKwkJYnJlYWs7CisKKwljYXNlIFRJT0NHSUNPVU5UOgorCQljbm93ID0gbW9zNzcyMF9wb3J0LT5pY291bnQ7CisJCWljb3VudC5jdHMgPSBjbm93LmN0czsKKwkJaWNvdW50LmRzciA9IGNub3cuZHNyOworCQlpY291bnQucm5nID0gY25vdy5ybmc7CisJCWljb3VudC5kY2QgPSBjbm93LmRjZDsKKwkJaWNvdW50LnJ4ID0gY25vdy5yeDsKKwkJaWNvdW50LnR4ID0gY25vdy50eDsKKwkJaWNvdW50LmZyYW1lID0gY25vdy5mcmFtZTsKKwkJaWNvdW50Lm92ZXJydW4gPSBjbm93Lm92ZXJydW47CisJCWljb3VudC5wYXJpdHkgPSBjbm93LnBhcml0eTsKKwkJaWNvdW50LmJyayA9IGNub3cuYnJrOworCQlpY291bnQuYnVmX292ZXJydW4gPSBjbm93LmJ1Zl9vdmVycnVuOworCisJCWRiZygiJXMgKCVkKSBUSU9DR0lDT1VOVCBSWD0lZCwgVFg9JWQiLCBfX0ZVTkNUSU9OX18sCisJCSAgICBwb3J0LT5udW1iZXIsIGljb3VudC5yeCwgaWNvdW50LnR4ICk7CisJCWlmIChjb3B5X3RvX3VzZXIoKHZvaWQgX191c2VyICopYXJnLCAmaWNvdW50LCBzaXplb2YoaWNvdW50KSkpCisJCQlyZXR1cm4gLUVGQVVMVDsKKwkJcm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nVtX2J1bGtfb3V0ICAgICAgPSAxLAorCS5udW1fcG9ydHMgICAgICAgICA9IDEsCisJLm9wZW4gICAgICAgICAgICAgID0gc2llcnJhX29wZW4sCisJLmNsb3NlICAgICAgICAgICAgID0gc2llcnJhX2Nsb3NlLAorCS53cml0ZSAgICAgICAgICAgICA9IHNpZXJyYV93cml0ZSwKKwkud3JpdGVfcm9vbSAgICAgICAgPSBzaWVycmFfd3JpdGVfcm9vbSwKKwkuY2hhcnNfaW5fYnVmZmVyICAgPSBzaWVycmFfY2hhcnNfaW5fYnVmZmVyLAorCS50aHJvdHRsZSAgICAgICAgICA9IHNpZXJyYV9yeF90aHJvdHRsZSwKKwkudW50aHJvdHRsZSAgICAgICAgPSBzaWVycmFfcnhfdW50aHJvdHRsZSwKKwkuaW9jdGwgICAgICAgICAgICAgPSBzaWVycmFfaW9jdGwsCisJLnNldF90ZXJtaW9zICAgICAgID0gc2llcnJhX3NldF90ZXJtaW9zLAorCS5icmVha19jdGwgICAgICAgICA9IHNpZXJyYV9icmVha19jdGwsCisJLnRpb2NtZ2V0ICAgICAgICAgID0gc2llcnJhX3Rpb2NtZ2V0LAorCS50aW9jbXNldCAgICAgICAgICA9IHNpZXJyYV90aW9jbXNldCwKKwkuYXR0YWNoICAgICAgICAgICAgPSBzaWVycmFfc3RhcnR1cCwKKwkuc2h1dGRvd24gICAgICAgICAgPSBzaWVycmFfc2h1dGRvd24sCisJLnJlYWRfaW50X2NhbGxiYWNrID0gc2llcnJhX2luc3RhdF9jYWxsYmFjaywKIH07CiAKK3N0YXRpYyBzdHJ1Y3QgdXNiX3NlcmlhbF9kcml2ZXIgc2llcnJhXzNwb3J0X2RldmljZSA9IHsKKwkuZHJpdmVyID0geworCQkub3duZXIgPQlUSElTX01PRFVMRSwKKwkJLm5hbWUgPQkJInNpZXJyYTMiLAorCX0sCisJLmRlc2NyaXB0aW9uICAgICAgID0gIlNpZXJyYSBVU0IgbW9kZW0gKDMgcG9ydCkiLAorCS5pZF90YWJsZSAgICAgICAgICA9IGlkX3RhYmxlXzNwb3J0LAorCS5udW1faW50ZXJydXB0X2luICA9IE5VTV9ET05UX0NBUkUsCisJLm51bV9idWxrX2luICAgICAgID0gMywKKwkubnVtX2J1bGtfb3V0ICAgICAgPSAzLAorCS5udW1fcG9ydHMgICAgICAgICA9IDMsCisJLm9wZW4gICAgICAgICAgICAgID0gc2llcnJhX29wZW4sCisJLmNsb3NlICAgICAgICAgICAgID0gc2llcnJhX2Nsb3NlLAorCS53cml0ZSAgICAgICAgICAgICA9IHNpZXJyYV93cml0ZSwKKwkud3JpdGVfcm9vbSAgICAgICAgPSBzaWVycmFfd3JpdGVfcm9vbSwKKwkuY2hhcnNfaW5fYnVmZmVyICAgPSBzaWVycmFfY2hhcnNfaW5fYnVmZmVyLAorCS50aHJvdHRsZSAgICAgICAgICA9IHNpZXJyYV9yeF90aHJvdHRsZSwKKwkudW50aHJvdHRsZSAgICAgICAgPSBzaWVycmFfcnhfdW50aHJvdHRsZSwKKwkuaW9jdGwgICAgICAgICAgICAgPSBzaWVycmFfaW9jdGwsCisJLnNldF90ZXJtaW9zICAgICAgID0gc2llcnJhX3NldF90ZXJtaW9zLAorCS5icmVha19jdGwgICAgICAgICA9IHNpZXJyYV9icmVha19jdGwsCisJLnRpb2NtZ2V0ICAgICAgICAgID0gc2llcnJhX3Rpb2NtZ2V0LAorCS50aW9jbXNldCAgICAgICAgICA9IHNpZXJyYV90aW9jbXNldCwKKwkuYXR0YWNoICAgICAgICAgICAgPSBzaWVycmFfc3RhcnR1cCwKKwkuc2h1dGRvd24gICAgICAgICAgPSBzaWVycmFfc2h1dGRvd24sCisJLnJlYWRfaW50X2NhbGxiYWNrID0gc2llcnJhX2luc3RhdF9jYWxsYmFjaywKK307CisKKy8qIEZ1bmN0aW9ucyB1c2VkIGJ5IG5ldyB1c2Itc2VyaWFsIGNvZGUuICovCiBzdGF0aWMgaW50IF9faW5pdCBzaWVycmFfaW5pdCh2b2lkKQogewogCWludCByZX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JCWdvdG8gZmFpbF9zb2NrOworCXJldHVybiAwOworCitmYWlsX3NvY2s6CisJY2xvc2VfY29ubmVjdGlvbigpOworCXJldHVybiBlcnJvcjsKK30KKwordm9pZCBkbG1fbG93Y29tbXNfc3RvcCh2b2lkKQoreworCWludCBpOworCisJc2N0cF9jb24uZmxhZ3MgPSAweDc7CisJZGFlbW9uc19zdG9wKCk7CisJY2xlYW5fd3JpdGVxdWV1ZXMoKTsKKwljbG9zZV9jb25uZWN0aW9uKCk7CisJZGVhbGxvY19ub2RlaW5mbygpOworCW1heF9ub2RlaWQgPSAwOworCisJZGxtX2xvY2FsX2NvdW50ID0gMDsKKwlkbG1fbG9jYWxfbm9kZWlkID0gMDsKKworCWZvciAoaSA9IDA7IGkgPCBkbG1fbG9jYWxfY291bnQ7IGkrKykKKwkJa2ZyZWUoZGxtX2xvY2FsX2FkZHJbaV0pOworfQorCmRpZmYgLS1naXQgYS9mcy9kbG0vbG93Y29tbXMtdGNwLmMgYi9mcy9kbG0vbG93Y29tbXMtdGNwLmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOGYyNzkxZgotLS0gL2Rldi9udWxsCisrKyBiL2ZzL2RsbS9sb3djb21tcy10Y3AuYwpAQCAtMCwwICsxLDExODkgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoqCisqKiAgQ29weXJpZ2h0IChDKSBTaXN0aW5hIFNvZnR3YXJlLCBJbmMuICAxOTk3LTIwMDMgIEFsbCByaWdodHMgcmVzZXJ2ZWQuCisqKiAgQ29weXJpZ2h0IChDKSAyMDA0LTIwMDYgUmVkIEhhdCwgSW5jLiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4KKyoq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GV2L251bGwKQEAgLTEsMTIzOCArMCwwIEBACi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKgotKiogIENvcHlyaWdodCAoQykgU2lzdGluYSBTb2Z0d2FyZSwgSW5jLiAgMTk5Ny0yMDAzICBBbGwgcmlnaHRzIHJlc2VydmVkLgotKiogIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IFJlZCBIYXQsIEluYy4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuCi0qKgotKiogIFRoaXMgY29weXJpZ2h0ZWQgbWF0ZXJpYWwgaXMgbWFkZSBhdmFpbGFibGUgdG8gYW55b25lIHdpc2hpbmcgdG8gdXNlLAotKiogIG1vZGlmeSwgY29weSwgb3IgcmVkaXN0cmlidXRlIGl0IHN1YmplY3QgdG8gdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zCi0qKiAgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHYuMi4KLSoqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qCi0gKiBsb3djb21tcy5jCi0gKgotICogVGhpcyBpcyB0aGUgImxvdy1sZXZlbCIgY29tbXMgbGF5ZXIuCi0gKgotICogSXQgaXMgcmVzcG9uc2libGUgZm9yIHNlbmRpbmcvcmVjZWl2aW5nIG1lc3NhZ2VzCi0gKiBmcm9tIG90aGVyIG5vZGVzIGluIHRoZSBjbHVzdGVyLgotICoKLSAqIENsdXN0ZXIgbm9kZXM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CQkJZ290byBmb3VuZF9jbGllbnQ7CiAJCWlmIChuZXcpCkBAIC04NDksNiArODU0LDcgQEAKICAqLwogc3RhdGljIGludCBuZnM0X2luaXRfY2xpZW50KHN0cnVjdCBuZnNfY2xpZW50ICpjbHAsCiAJCWludCBwcm90bywgaW50IHRpbWVvLCBpbnQgcmV0cmFucywKKwkJY29uc3QgY2hhciAqaXBfYWRkciwKIAkJcnBjX2F1dGhmbGF2b3JfdCBhdXRoZmxhdm91cikKIHsKIAlpbnQgZXJyb3I7CkBAIC04NjUsNiArODcxLDcgQEAKIAllcnJvciA9IG5mc19jcmVhdGVfcnBjX2NsaWVudChjbHAsIHByb3RvLCB0aW1lbywgcmV0cmFucywgYXV0aGZsYXZvdXIpOwogCWlmIChlcnJvciA8IDApCiAJCWdvdG8gZXJyb3I7CisJbWVtY3B5KGNscC0+Y2xfaXBhZGRyLCBpcF9hZGRyLCBzaXplb2YoY2xwLT5jbF9pcGFkZHIpKTsKIAogCWVycm9yID0gbmZzX2lkbWFwX25ldyhjbHApOwogCWlmIChlcnJvciA8IDApIHsKQEAgLTg4OCw2ICs4OTUsNyBAQAogICovCiBzdGF0aWMgaW50IG5mczRfc2V0X2NsaWVudChzdHJ1Y3QgbmZzX3NlcnZlciAqc2VydmVyLAogCQljb25zdCBjaGFyICpob3N0bmFtZSwgY29uc3Qgc3RydWN0IHNvY2thZGRyX2luICphZGRyLAorCQljb25zdCBjaGFyICppcF9hZGRyLAogCQlycGNfYXV0aGZsYXZvcl90IGF1dGhmbGF2b3VyLAogCQlpbnQgcHJvdG8sIGludCB0aW1lbywgaW50IHJldHJhbnMpCiB7CkBAIC05MDIsNyArOTEwLDcgQEAKIAkJZXJyb3IgPSBQVFJfRVJSKGNscCk7CiAJCWdvdG8gZXJyb3I7CiAJfQotCWVycm9yID0gbmZzNF9pbml0X2NsaWVudChjbHAsIHByb3RvLCB0aW1lbywgcmV0cmFucywgYXV0aGZsYXZvdXIpOworCWVycm9yID0gbmZzNF9pbml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WN0dWFsbHkgY2hhbmdlIGJsb2NrcywKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICBjYWxsIG9jZnMyX3N0YXJ0X3RyYW5zIHdpdGggdGhlIGhhbmRsZSByZXR1cm5lZAotICogICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20gdGhpcyBmdW5jdGlvbi4gWW91IG1heSBjYWxsIG9jZnMyX2NvbW1pdF90cmFucwotICogICAgICAgICAgICAgICAgICAgICAgICAgICBhdCBhbnkgdGltZSBpbiB0aGUgbGlmZXRpbWUgb2YgYSBoYW5kbGUuCiAgKiAgb2NmczJfc3RhcnRfdHJhbnMgICAgICAtIEJlZ2luIGEgdHJhbnNhY3Rpb24uIEdpdmUgaXQgYW4gdXBwZXIgZXN0aW1hdGUgb2YKICAqICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbnVtYmVyIG9mIGJsb2NrcyB0aGF0IHdpbGwgYmUgY2hhbmdlZCBkdXJpbmcKICAqICAgICAgICAgICAgICAgICAgICAgICAgICB0aGlzIGhhbmRsZS4KLSAqICBvY2ZzMl9jb21taXRfdHJhbnMgICAgIC0gQ29tcGxldGUgYSBoYW5kbGUuCisgKiAgb2NmczJfY29tbWl0X3RyYW5zIC0gQ29tcGxldGUgYSBoYW5kbGUuIEl0IG1pZ2h0IHJldHVybiAtRUlPIGlmCisgKiAgICAgICAgICAgICAgICAgICAgICAgdGhlIGpvdXJuYWwgd2FzIGFib3J0ZWQuIFRoZSBtYWpvcml0eSBvZiBwYXRocyBkb24ndAorICogICAgICAgICAgICAgICAgICAgICAgIGNoZWNrIHRoZSByZXR1cm4gdmFsdWUgYXMgYW4gZXJyb3IgdGhlcmUgY29tZXMgdG9vCisgKiAgICAgICAgICAgICAgICAgICAgICAgbGF0ZSB0byBkbyBhbnl0aGluZyAoYW5kIHdpbGwgYmUgcGlja2VkIHVwIGluIGEKKyAqICAgICAgICAgICAgICAgICAgICAgICBsYXRlciB0cmFuc2FjdGlvbikuCiAgKiAgb2Nmcz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gICAgdW5zaWduZWQgc2hvcnQgc196bWFwX2Jsb2NrczsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgc19maXJzdGRhdGF6b25lOwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX2xvZ196b25lX3NpemU7Ci0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgc19tYXhfc2l6ZTsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgc19tYWdpYzsKLSAgLSBYZW5peCBGUywgU3lzdGVtViBGUywgQ29oZXJlbnQgRlMKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgc19maXJzdGRhdGF6b25lOwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBzX256b25lczsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgc19mem9uZV9jb3VudDsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyAgc19mem9uZXNbTklDRlJFRV07Ci0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IHNfZmlub2RlX2NvdW50OwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBzX2Zpbm9kZXNbTklDSU5PRF07Ci0gICAgICAgICAgICAgICAgICAgIGNoYXIgICAgICAgICAgIHNfZmxvY2s7Ci0gICAgICAgICAgICAgICAgICAgIGNoYXIgICAgICAgICAgIHNfaWxvY2s7Ci0gICAgICAgICAgICAgICAgICAgIGNoYXIgICAgICAgICAgIHNfbW9kaWZpZWQ7Ci0gICAgICAgICAgICAgICAgICAgIGNoYXIgICAgICAgICAgIHNfcmRvbmx5OwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBzX3RpbWU7Ci0gICAgICAgICAgICAgICAgICAgIHNob3J0ICAgICAgICAgIHNfZGluZm9bNF07IC0tIFN5c3RlbVYgRlMgb25seQotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBzX2ZyZWVfem9uZXM7Ci0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IHNfZnJlZV9pbm9kZXM7Ci0gICAgICAgICAgICAgICAgICAgIHNob3J0ICAgICAgICAgIHNfZGluZm9bNF07IC0tIFhlbml4IEZTIG9ubHkKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgc19pbnRlcmxlYXZlX20sc19pbnRlcmxlYXZlX247IC0tIENvaGVyZW50IEZTIG9ubHkKLSAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgICAgc19mbmFtZVs2XTsKLSAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgICAgc19mcGFja1s2XTsKLSAgICB0aGVuIHRoZXkgZGlmZmVyIGNvbnNpZGVyYWJseToKLSAgICAgICAgWGVuaXggRlMKLSAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgICAgc19jbGVhbjsKLSAgICAgICAgICAgICAgICAgICAgY2hhciAgICAgICAgICAgc19maWxsWzM3MV07Ci0gICAgICAgICAgICAgICAgICAgIGxvbmcgICAgICAgICAgIHNfbWFnaWM7Ci0gICAgICAgICAgICAgICAgICAgIGxvbmcgICAgICAgICAgIHNfdHlwZTsKLSAgICAgICAgU3lzdGVtViBGUwotICAgICAgICAgICAgICAgICAgICBsb25nICAgICAgICAgICBzX2ZpbGxbMTIgb3IgMTRdOwotICAgICAgICAgICAgICAgICAgICBsb25nICAgICAgICAgICBzX3N0YXRlOwotICAgICAgICAgICAgICAgICAgICBsb25nICAgICAgICAgICBzX21hZ2ljOwotICAgICAgICAgICAgICAgICAgICBsb25nICAgICAgICAgICBzX3R5cGU7Ci0gICAgICAgIENvaGVyZW50IEZTCi0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIHNfdW5pcXVlOwotICAgIE5vdGUgdGhhdCBDb2hlcmVudCBGUyBoYXMgbm8gbWFnaWMuCi0KLSogSW5vZGUgbGF5b3V0OgotICAtIE1pbml4IEZTCi0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IGlfbW9kZTsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgaV91aWQ7Ci0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgIGlfc2l6ZTsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyAgaV90aW1lOwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICBpX2dpZDsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAgaV9ubGlua3M7Ci0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IGlfem9uZVs3KzErMV07Ci0gIC0gWGVuaXggRlMsIFN5c3RlbVYgRlMsIENvaGVyZW50IEZTCi0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IGlfbW9kZTsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgaV9ubGluazsKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgaV91aWQ7Ci0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0IGlfZ2lkOwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBpX3NpemU7Ci0gICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgIGlfem9uZVszKigxMCsxKzErMSldOwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBpX2F0aW1lOwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBpX210aW1lOwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICBpX2N0aW1lOwotCi0qIFJlZ3VsYXIgZmlsZSBkYXRhIGJsb2NrcyBhcmUgb3JnYW5pemVkIGFzCi0gIC0gTWluaXggRlMKLSAgICAgICAgICAgICAgIDcgZGlyZWN0IGJsb2NrcwotICAgICAgICAgICAgICAgMSBpbmRpcmVjdCBibG9jayAocG9pbnRlcnMgdG8gYmxvY2tzKQotICAgICAgICAgICAgICAgMSBkb3VibGUtaW5kaXJlY3QgYmxvY2sgKHBvaW50ZXIgdG8gcG9pbnRlcnMgdG8gYmxvY2tzKQotICAtIFhlbml4IEZTLCBTeXN0ZW1WIEZTLCBDb2hlcmVudCBGUwotICAgICAgICAgICAgICAxMCBkaXJlY3QgYmxvY2tzCi0gICAgICAgICAgICAgICAxIGluZGlyZWN0IGJsb2NrIChwb2ludGVycyB0byBibG9ja3MpCi0gICAgICAgICAgICAgICAxIGRvdWJsZS1pbmRpcmVjdCBibG9jayAocG9pbnRlciB0byBwb2ludGVycyB0byBibG9ja3MpCi0gICAgICAgICAgICAgICAxIHRyaXBsZS1pbmRpcmVjdCBibG9jayAocG9pbnRlciB0byBwb2ludGVycyB0byBwb2ludGVycyB0byBibG9ja3MpCi0KLSogSW5vZGUgc2l6ZSwgaW5vZGVzIHBlciBibG9jawotICAtIE1pbml4IEZTICAgICAgICAzMiAgIDMyCi0gIC0gWGVuaXggRlMgICAgICAgIDY0ICAgMTYKLSAgLSBTeXN0ZW1WIEZTICAgICAgNjQgICAxNgotICAtIENvaGVyZW50IEZTICAgICA2NCAgICA4Ci0KLSogRGlyZWN0b3J5IGVudHJ5IG9uIGRpc2sKLSAgLSBNaW5peCBGUwotICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCBpbm9kZTsKLSAgICAgICAgICAgICAgICAgICAgY2hhciBuYW1lWzE0LzMwXTsKLSAgLSBYZW5peCBGUywgU3lzdGVtViBGUywgQ29oZXJlbnQgRlMKLSAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgaW5vZGU7Ci0gICAgICAgICAgICAgICAgICAgIGNoYXIgbmFtZVsxNF07Ci0KLSogRGlyIGVudHJ5IHNpemUsIGRpciBlbnRyaWVzIHBlciBibG9jawotICAtIE1pbml4IEZT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c3VtICYgMHhmZmZmKSArIChzdW0gPj4gMTYpOwotCXJldHVybiB+c3VtOworCXJldHVybiAoX19mb3JjZSBfX3N1bTE2KX5zdW07CiB9CiAKICNkZWZpbmUgX0hBVkVfQVJDSF9JUFY2X0NTVU0KLWV4dGVybiB1bnNpZ25lZCBzaG9ydCBpbnQgY3N1bV9pcHY2X21hZ2ljKHN0cnVjdCBpbjZfYWRkciAqc2FkZHIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgaW42X2FkZHIgKmRhZGRyLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX191MzIgbGVuLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgcHJvdG8sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgc3VtKTsKLQorZXh0ZXJuIF9fc3VtMTYgY3N1bV9pcHY2X21hZ2ljKGNvbnN0IHN0cnVjdCBpbjZfYWRkciAqc2FkZHIsCisJCQkgICAgICAgY29uc3Qgc3RydWN0IGluNl9hZGRyICpkYWRkciwKKwkJCSAgICAgICBfX3UzMiBsZW4sIHVuc2lnbmVkIHNob3J0IHByb3RvLAorCQkJICAgICAgIF9fd3N1bSBzdW0pOwogI2VuZGlmCmRpZmYgLS1naXQgYS9pbmNsdWRlL2FzbS1hbHBoYS9kZXZpY2UuaCBiL2luY2x1ZGUvYXNtLWFscGhhL2RldmljZS5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmQ4Zjk4NzIKLS0tIC9kZXYvbnVsbAorKysgYi9pbmNsdWRlL2FzbS1hbHBoYS9kZXZpY2UuaApAQCAtMCwwICsxLDcgQEAKKy8qCisgKiBBcmNoIHNwZWNpZmljIGV4dGVuc2lvbnMgdG8gc3RydWN0IGRldmljZQorICoKKyAqIFRoaXMg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AgIGN0eXBlLCBjLCBkdHlwZSwgZCwgZXR5cGUsIGUpCQlcCi10eXBlIG5hbWUoYXR5cGUgYSwgYnR5cGUgYiwgY3R5cGUgYywgZHR5cGUgZCwgZXR5cGUgZSkJXAotewkJCQkJCQlcCi0gIHJlZ2lzdGVyIGxvbmcgX19yZXMgX19hc21fXygiZXIwIik7CQkJXAotICByZWdpc3RlciBsb25nIF9hIF9fYXNtX18oImVyMSIpOwkJCVwKLSAgcmVnaXN0ZXIgbG9uZyBfYiBfX2FzbV9fKCJlcjIiKTsJCQlcCi0gIHJlZ2lzdGVyIGxvbmcgX2MgX19hc21fXygiZXIzIik7CQkJXAotICByZWdpc3RlciBsb25nIF9kIF9fYXNtX18oImVyNCIpOwkJCVwKLSAgcmVnaXN0ZXIgbG9uZyBfZSBfX2FzbV9fKCJlcjUiKTsJCQlcCi0gIF9hID0gKGxvbmcpYTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJXAotICBfYiA9IChsb25nKWI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCVwKLSAgX2MgPSAobG9uZyljOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAlcCi0gIF9kID0gKGxvbmcpZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJXAotICBfZSA9IChsb25nKWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCVwKLSAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCJtb3YubAklMSxlcjBcblx0IgkJXAotICAgICAgICAgICAgICAgICAgICAgICAgInRyYXBhCSMwXG5cdCIJCQlcCi0JCQk6ICI9ciIgKF9fcmVzKQkJCVwKLQkJCTogImciIChfX05SXyMjbmFtZSksCQlcCi0JCQkgICJnIiAoX2EpLAkJCVwKLQkJCSAgImciIChfYiksCQkJXAotCQkJICAiZyIgKF9jKSwJCQlcCi0JCQkgICJnIiAoX2QpLAkJCVwKLQkJCSAgImciIChfZSkJCQlcCi0JCQk6ICJjYyIsICJtZW1vcnkiKTsJCVwKLSAgX19zeXNjYWxsX3JldHVybih0eXBlLCBfX3Jlcyk7CQkJXAotfQotCi0jZGVmaW5lIF9zeXNjYWxsNih0eXBlLCBuYW1lLCBhdHlwZSwgYSwgYnR5cGUsIGIsCVwKLSAgICAgICAgICAgICAgICAgIGN0eXBlLCBjLCBkdHlwZSwgZCwgZXR5cGUsIGUsIGZ0eXBlLCBmKQlcCi10eXBlIG5hbWUoYXR5cGUgYSwgYnR5cGUgYiwgY3R5cGUgYywgZHR5cGUgZCwgZXR5cGUgZSwgZnR5cGUgZikJXAotewkJCQkJCQlcCi0gIHJlZ2lzdGVyIGxvbmcgX19yZXMgX19hc21fXygiZXIwIik7CQkJXAotICByZWdpc3RlciBsb25nIF9hIF9fYXNtX18oImVyMSIpOwkJCVwKLSAgcmVnaXN0ZXIgbG9uZyBfYiBfX2FzbV9fKCJlcjIiKTsJCQlcCi0gIHJlZ2lzdGVyIGxvbmcgX2MgX19hc21fXygiZXIzIik7CQkJXAotICByZWdpc3RlciBsb25nIF9kIF9fYXNtX18oImVyNCIpOwkJCVwKLSAgcmVnaXN0ZXIgbG9uZyBfZSBfX2FzbV9fKCJlcjUiKTsJCQlcCi0gIHJlZ2lzdGVyIGxvbmcgX2YgX19hc21fXygiZXI2Iik7CQkJXAotICBfYSA9IChsb25nKWE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCVwKLSAgX2IgPSAobG9uZyliOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAlcCi0gIF9jID0gKGxvbmcpYzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJXAotICBfZCA9IChsb25nKWQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCVwKLSAgX2UgPSAobG9uZyllOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAlcCi0gI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dCBvZiB0aGUgYnVmZmVyLgogICovCi1leHRlcm4gdW5zaWduZWQgaW50IGNzdW1fcGFydGlhbF9jb3B5X2Zyb21fdXNlcihjb25zdCB1bnNpZ25lZCBjaGFyIF9fdXNlciAqc3JjLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqZHN0LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGxlbiwgdW5zaWduZWQgaW50IHN1bSwKK2V4dGVybiBfX3dzdW0gY3N1bV9wYXJ0aWFsX2NvcHlfZnJvbV91c2VyKGNvbnN0IHZvaWQgX191c2VyICpzcmMsIHZvaWQgKmRzdCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBsZW4sIF9fd3N1bSBzdW0sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgKmVycl9wdHIpOwogCiAvKgogICoJRm9sZCBhIHBhcnRpYWwgY2hlY2tzdW0KICAqLwogCi1zdGF0aWMgaW5saW5lIHVuc2lnbmVkIGludCBjc3VtX2ZvbGQodW5zaWduZWQgaW50IHN1bSkKK3N0YXRpYyBpbmxpbmUgX19zdW0xNiBjc3VtX2ZvbGQoX193c3VtIHN1bSkKIHsKIAl1bnNpZ25lZCBsb25nIHRtcHJlZzsKIAlfX2FzbV9fKApAQCAtNzIsMTYgKzY5LDE3IEBACiAJCTogIjAiICAoc3VtKQogCQk6ICJjYml0IgogCSk7Ci0JcmV0dXJuIHN1bTsKKwlyZXR1cm4gKF9fZm9yY2UgX19zdW0xNilzdW07CiB9CiAKIC8qCiAgKiBUaGlzIGlzIGEgdmVyc2lvbiBvZiBpcF9jb21wdXRlX2NzdW0oKSBvcHRpbWl6ZWQgZm9yIElQIGhlYWRlcnMsCiAgKiB3aGljaCBhbHdheXMgY2hlY2tzdW0gb24gNCBvY3RldC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AgICAgICAgICAgXAorICBleHRlcm4gczY0IF9sdjFfIyNuYW1lKExWMV8jI2luIyNfSU5fIyNvdXQjI19PVVRfQVJHX0RFQ0wpOyAgICAgIFwKKyAgc3RhdGljIGlubGluZSBpbnQgbHYxXyMjbmFtZShMVjFfIyNpbiMjX0lOXyMjb3V0IyNfT1VUX0FSR19ERUNMKSBcCisgICAge3JldHVybiBfbHYxXyMjbmFtZShMVjFfIyNpbiMjX0lOXyMjb3V0IyNfT1VUX0FSR1MpO30KKyNlbmRpZgorCisjZW5kaWYgLyogIWRlZmluZWQoX19BU1NFTUJMWV9fKSAqLworCisvKiBsdjEgY2FsbCB0YWJsZSAqLworCitMVjFfQ0FMTChhbGxvY2F0ZV9tZW1vcnksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQsIDIsICAgMCApCitMVjFfQ0FMTCh3cml0ZV9odGFiX2VudHJ5LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQsIDAsICAgMSApCitMVjFfQ0FMTChjb25zdHJ1Y3RfdmlydHVhbF9hZGRyZXNzX3NwYWNlLCAgICAgICAgICAgICAgIDMsIDIsICAgMiApCitMVjFfQ0FMTChpbnZhbGlkYXRlX2h0YWJfZW50cmllcywgICAgICAgICAgICAgICAgICAgICAgIDUsIDAsICAgMyApCitMVjFfQ0FMTChnZXRfdmlydHVhbF9hZGRyZXNzX3NwYWNlX2lkX29mX3BwZSwgICAgICAgICAgIDEsIDEsICAgNCApCitMVjFfQ0FMTChxdWVyeV9sb2dpY2FsX3BhcnRpdGlvbl9hZGRyZXNzX3JlZ2lvbl9pbmZvLCAgIDEsIDUsICAgNiApCitMVjFfQ0FMTChzZWxlY3RfdmlydHVhbF9hZGRyZXNzX3NwYWNlLCAgICAgICAgICAgICAgICAgIDEsIDAsICAgNyApCitMVjFfQ0FMTChwYXVzZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsICAgOSApCitMVjFfQ0FMTChkZXN0cnVjdF92aXJ0dWFsX2FkZHJlc3Nfc3BhY2UsICAgICAgICAgICAgICAgIDEsIDAsICAxMCApCitMVjFfQ0FMTChjb25maWd1cmVfaXJxX3N0YXRlX2JpdG1hcCwgICAgICAgICAgICAgICAgICAgIDMsIDAsICAxMSApCitMVjFfQ0FMTChjb25uZWN0X2lycV9wbHVnX2V4dCwgICAgICAgICAgICAgICAgICAgICAgICAgIDUsIDAsICAxMiApCitMVjFfQ0FMTChyZWxlYXNlX21lbW9yeSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsICAxMyApCitMVjFfQ0FMTChkaXNjb25uZWN0X2lycV9wbHVnX2V4dCwgICAgICAgICAgICAgICAgICAgICAgIDMsIDAsICAxNyApCitMVjFfQ0FMTChjb25zdHJ1Y3RfZXZlbnRfcmVjZWl2ZV9wb3J0LCAgICAgICAgICAgICAgICAgIDAsIDEsICAxOCApCitMVjFfQ0FMTChkZXN0cnVjdF9ldmVudF9yZWNlaXZlX3BvcnQsICAgICAgICAgICAgICAgICAgIDEsIDAsICAxOSApCitMVjFfQ0FMTChzZW5kX2V2ZW50X2xvY2FsbHksICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsICAyNCApCitMVjFfQ0FMTChlbmRfb2ZfaW50ZXJydXB0LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsICAyNyApCitMVjFfQ0FMTChjb25uZWN0X2lycV9wbHVnLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDAsICAyOCApCitMVjFfQ0FMTChkaXNjb25uZWN0X2lycV9wbHVnLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsICAyOSApCitMVjFfQ0FMTChlbmRfb2ZfaW50ZXJydXB0X2V4dCwgICAgICAgICAgICAgICAgICAgICAgICAgIDMsIDAsICAzMCApCitMVjFfQ0FMTChkaWRfdXBkYXRlX2ludGVycnVwdF9tYXNrLCAgICAgICAgICAgICAgICAgICAgIDIsIDAsICAzMSApCitMVjFfQ0FMTChzaHV0ZG93bl9sb2dpY2FsX3BhcnRpdGlvbiwgICAgICAgICAgICAgICAgICAgIDEsIDAsICA0NCApCitMVjFfQ0FMTChkZXN0cnVjdF9sb2dpY2FsX3NwZSwgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsICA1NCApCitMVjFfQ0FMTChjb25zdHJ1Y3RfbG9naWNhbF9zcGUsICAgICAgICAgICAgICAgICAgICAgICAgIDcsIDYsICA1NyApCitMVjFfQ0FMTChzZXRfc3BlX2ludGVycnVwdF9tYXNrLCAgICAgICAgICAgICAgICAgICAgICAgIDMsIDAsICA2MSApCitMVjFfQ0FMTChzZXRfc3BlX3RyYW5zaXRpb25fbm90aWZpZXIsICAgICAgICAgICAgICAgICAgIDMsIDAsICA2NCApCitMVjFfQ0FMTChkaXNhYmxlX2xvZ2ljYWxfc3BlLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDAsICA2NSApCitMVjFfQ0FMTChjbGVhcl9zcGVfaW50ZXJydXB0X3N0YXR1cywgICAgICAgICAgICAgICAgICAgIDQsIDAsICA2NiApCitMVjFfQ0FMTChnZXRfc3BlX2ludGVycnVwdF9zdGF0dXMsICAgICAgICAgICAgICAgICAgICAgIDIsIDEsICA2NyApCitMVjFfQ0FMTChnZXRfbG9naWNhbF9wcGVfaWQsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIDEsICA2OSApCitMVjFfQ0FMTChzZXRfaW50ZXJydXB0X21hc2ssICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUsIDAsICA3MyApCitMVjFfQ0FMTChnZXRfbG9naWNhbF9wYXJ0aXRpb25faWQsICAgICAgICAgICAgICAgICAgICAgIDAsIDEsICA3NCApCitMVjFfQ0FMTChjb25maWd1cmVfZXhlY3V0aW9uX3RpbWVfdmFyaWFibGUsICAgICAgICAgICAgIDEsIDAsICA3NyApCitMVjFfQ0FMTChnZXRfc3BlX2lycV9vdXRsZXQsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDEsICA3OCApCitMVjFfQ0FMTChzZXRfc3BlX3ByaXZpbGVnZV9zdGF0ZV9hcmVhXzFfcmVnaXN0ZXIsICAgICAgIDMsIDAsICA3OSApCitMVjFfQ0FMTChjcmVhdGVfcmVwb3NpdG9yeV9ub2RlLCAgICAgICAgICAgICAgICAgICAgICAgIDYsIDAsICA5MCApCitMVjFfQ0FMTChnZXRfcmVwb3NpdG9yeV9ub2RlX3ZhbHVlLCAgICAgICAgICAgICAgICAgICAgIDUsIDIsICA5MSApCitMVjFfQ0FMTChtb2RpZnlfcmVwb3NpdG9yeV9ub2RlX3ZhbHVlLCAgICAgICAgICAgICAgICAgIDYsIDAsICA5MiApCitMVjFfQ0FMTChyZW1vdmVfcmVwb3NpdG9yeV9ub2RlLCAgICAgICAgICAgICAgICAgICAgICAgIDQsIDAsICA5MyApCitMVjFfQ0FMTChyZWFkX2h0YWJfZW50cmllcywgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDUsICA5NSApCitMVjFfQ0FMTChzZXRfZGFiciwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDAsICA5NiApCitMVjFfQ0FMTChnZXRfdG90YWxfZXhlY3V0aW9uX3RpbWUsICAgICAgICAgICAgICAgICAgICAgIDIsIDEsIDEwMyApCitMVjFfQ0FMTChjb25zdHJ1Y3RfaW9faXJxX291dGxldCwgICAgICAgICAgICAgICAgICAgICAgIDEsIDEsIDEyMCApCitMVjFfQ0FMTChkZXN0cnVjdF9pb19pcnFfb3V0bGV0LCAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDEyMSApCitMVjFfQ0FMTChtYXBfaHRhYiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDEsIDEyMiApCitMVjFfQ0FMTCh1bm1hcF9odGFiLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDEyMyApCitMVjFfQ0FMTChnZXRfdmVyc2lvbl9pbmZvLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIDEsIDEyNyApCitMVjFfQ0FMTChpbnNlcnRfaHRhYl9lbnRyeSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYsIDMsIDE1OCApCitMVjFfQ0FMTChyZWFkX3ZpcnR1YWxfdWFydCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsIDEsIDE2MiApCitMVjFfQ0FMTCh3cml0ZV92aXJ0dWFsX3VhcnQsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsIDEsIDE2MyApCitMVjFfQ0FMTChzZXRfdmlydHVhbF91YXJ0X3BhcmFtLCAgICAgICAgICAgICAgICAgICAgICAgIDMsIDAsIDE2NCApCitMVjFfQ0FMTChnZXRfdmlydHVhbF91YXJ0X3BhcmFtLCAgICAgICAgICAgICAgICAgICAgICAgIDIsIDEsIDE2NSApCitMVjFfQ0FMTChjb25maWd1cmVfdmlydHVhbF91YXJ0X2lycSwgICAgICAgICAgICAgICAgICAgIDEsIDEsIDE2NiApCitMVjFfQ0FMTChvcGVuX2RldmljZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsIDAsIDE3MCApCitMVjFfQ0FMTChjbG9zZV9kZXZpY2UsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDAsIDE3MSApCitMVjFfQ0FMTChtYXBfZGV2aWNlX21taW9fcmVnaW9uLCAgICAgICAgICAgICAgICAgICAgICAgIDUsIDEsIDE3MiApCitMVjFfQ0FMTCh1bm1hcF9kZXZpY2VfbW1pb19yZWdpb24sICAgICAgICAgICAgICAgICAgICAgIDMsIDAsIDE3MyApCitMVjFfQ0FMTChhbGxvY2F0ZV9kZXZpY2VfZG1hX3JlZ2lvbiwgICAgICAgICAgICAgICAgICAgIDUsIDEsIDE3NCApCitMVjFfQ0FMTChmcmVlX2RldmljZV9kbWFfcmVnaW9uLCAgICAgICAgICAgICAgICAgICAgICAgIDMsIDAsIDE3NSApCitMVjFfQ0FMTChtYXBfZGV2aWNlX2RtYV9yZWdpb24sICAgICAgICAgICAgICAgICAgICAgICAgIDYsIDAsIDE3NiApCitMVjFfQ0FMTCh1bm1hcF9kZXZpY2VfZG1hX3JlZ2lvbiwgICAgICAgICAgICAgICAgICAgICAgIDQsIDAsIDE3NyApCitMVjFfQ0FMTChuZXRfYWRkX211bHRpY2FzdF9hZGRyZXNzLCAgICAgICAgICAgICAgICAgICAgIDQsIDAsIDE4NSApCitMVjFfQ0FMTChuZXRfcmVtb3ZlX211bHRpY2FzdF9hZGRyZXNzLCAgICAgICAgICAgICAgICAgIDQsIDAsIDE4NiApCitMVjFfQ0FMTChuZXRfc3RhcnRfdHhfZG1hLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQsIDAsIDE4NyApCitMVjFfQ0FMTChuZXRfc3RvcF90eF9kbWEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsIDAsIDE4OCApCitMVjFfQ0FMTChuZXRfc3RhcnRfcnhfZG1hLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQsIDAsIDE4OSApCitMVjFfQ0FMTChuZXRfc3RvcF9yeF9kbWEsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsIDAsIDE5MCApCitMVjFfQ0FMTChuZXRfc2V0X2ludGVycnVwdF9zdGF0dXNfaW5kaWNhdG9yLCAgICAgICAgICAgIDQsIDAsIDE5MSApCitMVjFfQ0FMTChuZXRfc2V0X2ludGVycnVwdF9tYXNrLCAgICAgICAgICAgICAgICAgICAgICAgIDQsIDAsIDE5MyApCitMVjFfQ0FMTChuZXRfY29udHJvbCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYsIDIsIDE5NCApCitMVjFfQ0FMTChjb25uZWN0X2ludGVycnVwdF9ldmVudF9yZWNlaXZlX3BvcnQsICAgICAgICAgIDQsIDAsIDE5NyApCitMVjFfQ0FMTChkaXNjb25uZWN0X2ludGVycnVwdF9ldmVudF9yZWNlaXZlX3BvcnQsICAgICAgIDQsIDAsIDE5OCApCitMVjFfQ0FMTChnZXRfc3BlX2FsbF9pbnRlcnJ1cHRfc3RhdHVzZXMsICAgICAgICAgICAgICAgIDEsIDEsIDE5OSApCitMVjFfQ0FMTChkZWNvbmZpZ3VyZV92aXJ0dWFsX3VhcnRfaXJxLCAgICAgICAgICAgICAgICAgIDAsIDAsIDIwMiApCitMVjFfQ0FMTChlbmFibGVfbG9naWNhbF9zcGUsICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDAsIDIwNyApCitMVjFfQ0FMTChncHVfb3BlbiwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDIxMCApCitMVjFfQ0FMTChncHVfY2xvc2UsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIDAsIDIxMSApCitMVjFfQ0FMTChncHVfZGV2aWNlX21hcCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDIsIDIxMiApCitMVjFfQ0FMTChncHVfZGV2aWNlX3VubWFwLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDIxMyApCitMVjFfQ0FMTChncHVfbWVtb3J5X2FsbG9jYXRlLCAgICAgICAgICAgICAgICAgICAgICAgICAgIDUsIDIsIDIxNCApCitMVjFfQ0FMTChncHVfbWVtb3J5X2ZyZWUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDIxNiApCitMVjFfQ0FMTChncHVfY29udGV4dF9hbGxvY2F0ZSwgICAgICAgICAgICAgICAgICAgICAgICAgIDIsIDUsIDIxNyApCitMVjFfQ0FMTChncHVfY29udGV4dF9mcmVlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDIxOCApCitMVjFfQ0FMTChncHVfY29udGV4dF9pb21hcCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUsIDAsIDIyMSApCitMVjFfQ0FMTChncHVfY29udGV4dF9hdHRyaWJ1dGUsICAgICAgICAgICAgICAgICAgICAgICAgIDYsIDAsIDIyNSApCitMVjFfQ0FMTChncHVfY29udGV4dF9pbnRyLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDEsIDIyNyApCitMVjFfQ0FMTChncHVfYXR0cmlidXRlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUsIDAsIDIyOCApCitMVjFfQ0FMTChnZXRfcnRjLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsIDIsIDIzMiApCitMVjFfQ0FMTChzZXRfcHBlX3BlcmlvZGljX3RyYWNlcl9mcmVxdWVuY3ksICAgICAgICAgICAgIDEsIDAsIDI0MCApCitMVjFfQ0FMTChzdGFydF9wcGVfcGVyaW9kaWNfdHJhY2VyLCAgICAgICAgICAgICAgICAgICAgIDUsIDAsIDI0MSApCitMVjFfQ0FMTChzdG9wX3BwZV9wZXJpb2RpY190cmFjZXIsICAgICAgICAgICAgICAgICAgICAgIDEsIDEsIDI0MiApCitMVjFfQ0FMTChzdG9yYWdlX3JlYWQsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYsIDEsIDI0NSApCitMVjFfQ0FMTChzdG9yYWdlX3dyaXRlLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYsIDEsIDI0NiApCitMVjFfQ0FMTChzdG9yYWdlX3NlbmRfZGV2aWNlX2NvbW1hbmQsICAgICAgICAgICAgICAgICAgIDYsIDEsIDI0OCApCitMVjFfQ0FMTChzdG9yYWdlX2dldF9hc3luY19zdGF0dXMsICAgICAgICAgICAgICAgICAgICAgIDEsIDIsIDI0OSApCitMVjFfQ0FMTChzdG9yYWdlX2NoZWNrX2FzeW5jX3N0YXR1cywgICAgICAgICAgICAgICAgICAgIDIsIDEsIDI1NCApCitMVjFfQ0FMTChwYW5pYywgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDI1NSApCitMVjFfQ0FMTChjb25zdHJ1Y3RfbHBtLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYsIDMsIDE0MCApCitMVjFfQ0FMTChkZXN0cnVjdF9scG0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDE0MSApCitMVjFfQ0FMTChzdGFydF9scG0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDAsIDE0MiApCitMVjFfQ0FMTChzdG9wX2xwbSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsIDEsIDE0MyApCitMVjFfQ0FMTChjb3B5X2xwbV90cmFjZV9idWZmZXIsICAgICAgICAgICAgICAgICAgICAgICAgIDMsIDEsIDE0NCApCitMVjFfQ0FMTChhZGRfbHBtX2V2ZW50X2Jvb2ttYXJrLCAgICAgICAgICAgICAgICAgICAgICAgIDUsIDAsIDE0NSApCitMVjFfQ0FMTChkZWxldGVfbHBtX2V2ZW50X2Jvb2ttYXJrLCAgICAgICAgICAgICAgICAgICAgIDMsIDAsIDE0NiApCitMVjFfQ0FMTChzZXRfbHBtX2ludGVycnVwdF9tYXNrLCAgICAgICAgICAgICAgICAgICAgICAgIDMsIDEsIDE0NyApCitMVjFfQ0FMTChnZXRfbHBtX2ludGVycnVwdF9zdGF0dXMsICAgICAgICAgICAgICAgICAgICAgIDEsIDEsIDE0OCApCitMVjFfQ0FMTChzZXRfbHBtX2dlbmVyYWxfY29udHJvbCwgICAgICAgICAgICAgICAgICAgICAgIDUsIDIsIDE0OSApCitMVjFfQ0FMTChzZXRfbHBtX2ludGVydmFsLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMsIDEsIDE1MCApCitMVjFfQ0FMTChzZXRfbHBtX3RyaWdnZXJfY29udHJvbCwgICAgICAgICAgICAgICAgICAgICAgIDMsIDEsIDE1MSApCitMVjFfQ0FMTChzZXRfbHBtX2NvdW50ZXJfY29udHJvbCwgICAgICAgICAgICAg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4eF9IX18KKyNkZWZpbmUgX19BU01fUE9XRVJQQ19NUEM1Mnh4X0hfXworCisjaWZuZGVmIF9fQVNTRU1CTFlfXworI2luY2x1ZGUgPGFzbS90eXBlcy5oPgorI2luY2x1ZGUgPGFzbS9wcm9tLmg+CisjZW5kaWYgLyogX19BU1NFTUJMWV9fICovCisKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiBTdHJ1Y3R1cmVzIG1hcHBpbmcgb2Ygc29tZSB1bml0IHJlZ2lzdGVyIHNldCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCisjaWZuZGVmIF9fQVNTRU1CTFlfXworCisvKiBNZW1vcnkgTWFwcGluZyBDb250cm9sICovCitzdHJ1Y3QgbXBjNTJ4eF9tbWFwX2N0bCB7CisJdTMyIG1iYXI7CQkvKiBNTUFQX0NUUkwgKyAweDAwICovCisKKwl1MzIgY3MwX3N0YXJ0OwkJLyogTU1BUF9DVFJMICsgMHgwNCAqLworCXUzMiBjczBfc3RvcDsJCS8qIE1NQVBfQ1RSTCArIDB4MDggKi8KKwl1MzIgY3MxX3N0YXJ0OwkJLyogTU1BUF9DVFJMICsgMHgwYyAqLworCXUzMiBjczFfc3RvcDsJCS8qIE1NQVBfQ1RSTCArIDB4MTAgKi8KKwl1MzIgY3MyX3N0YXJ0OwkJLyogTU1BUF9DVFJMICsgMHgxNCAqLworCXUzMiBjczJfc3RvcDsJCS8qIE1NQVBfQ1RSTCArIDB4MTggKi8KKwl1MzIgY3MzX3N0YXJ0OwkJLyogTU1BUF9DVFJMICsgMHgxYyAqLworCXUzMiBjczNfc3RvcDsJCS8qIE1NQVBfQ1RSTCArIDB4MjAgKi8KKwl1MzIgY3M0X3N0YXJ0OwkJLyog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XS1VQICsgMHgxMCAqLworCXU4IHJlc2VydmVkNVszXTsJLyogR1BJT19XS1VQICsgMHgxMSAqLworCXU4IHdrdXBfaWludGVuOwkJLyogR1BJT19XS1VQICsgMHgxNCAqLworCXU4IHJlc2VydmVkNlszXTsJLyogR1BJT19XS1VQICsgMHgxNSAqLworCXUxNiB3a3VwX2l0eXBlOwkJLyogR1BJT19XS1VQICsgMHgxOCAqLworCXU4IHJlc2VydmVkN1syXTsJLyogR1BJT19XS1VQICsgMHgxQSAqLworCXU4IHdrdXBfbWFzdGU7CQkvKiBHUElPX1dLVVAgKyAweDFDICovCisJdTggcmVzZXJ2ZWQ4WzNdOwkvKiBHUElPX1dLVVAgKyAweDFEICovCisJdTggd2t1cF9pdmFsOwkJLyogR1BJT19XS1VQICsgMHgyMCAqLworCXU4IHJlc2VydmVkOVszXTsJLyogR1BJT19XS1VQICsgMHgyMSAqLworCXU4IHdrdXBfaXN0YXQ7CQkvKiBHUElPX1dLVVAgKyAweDI0ICovCisJdTggcmVzZXJ2ZWQxMFszXTsJLyogR1BJT19XS1VQICsgMHgyNSAqLworfTsKKworLyogWExCIEJ1cyBjb250cm9sICovCitzdHJ1Y3QgbXBjNTJ4eF94bGIgeworCXU4IHJlc2VydmVkWzB4NDBdOworCXUzMiBjb25maWc7CQkvKiBYTEIgKyAweDQwICovCisJdTMyIHZlcnNpb247CQkvKiBYTEIgKyAweDQ0ICovCisJdTMyIHN0YXR1czsJCS8qIFhMQiArIDB4NDggKi8KKwl1MzIgaW50X2VuYWJsZTsJCS8qIFhMQiArIDB4NGMgKi8KKwl1MzIgYWRkcl9jYXB0dXJlOwkvKiBYTEIgKyAweDUwICovCisJdTMyIGJ1c19zaWdfY2FwdHVyZTsJLyogWExCICsgMHg1NCAqLworCXUzMiBhZGRyX3RpbWVvdXQ7CS8qIFhMQiArIDB4NTggKi8KKwl1MzIgZGF0YV90aW1lb3V0OwkvKiBYTEIgKyAweDVjICovCisJdTMyIGJ1c19hY3RfdGltZW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lbl9kaXZfcHNjMjsJLyogQ0RNICsgMHgyZSAgcmVnMTEgYnl0ZTIsMyAqLworCisJdTE2IHJlc2VydmVkNjsJCS8qIENETSArIDB4MzAgIHJlZzEyIGJ5dGUwLDEgKi8KKwl1MTYgbWNsa2VuX2Rpdl9wc2MzOwkvKiBDRE0gKyAweDMyICByZWcxMiBieXRlMiwzICovCisKKwl1MTYgcmVzZXJ2ZWQ3OwkJLyogQ0RNICsgMHgzNCAgcmVnMTMgYnl0ZTAsMSAqLworCXUxNiBtY2xrZW5fZGl2X3BzYzY7CS8qIENETSArIDB4MzYgIHJlZzEzIGJ5dGUyLDMgKi8KK307CisKKyNlbmRpZiAvKiBfX0FTU0VNQkxZX18gKi8KKworCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiBQcm90b3R5cGVzIGZvciBNUEM1Mnh4IHN5c2RldiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisKKyNpZm5kZWYgX19BU1NFTUJMWV9fCisKK2V4dGVybiB2b2lkIF9faW9tZW0gKiBtcGM1Mnh4X2ZpbmRfYW5kX21hcChjb25zdCBjaGFyICopOworZXh0ZXJuIHVuc2lnbmVkIGludCBtcGM1Mnh4X2ZpbmRfaXBiX2ZyZXEoc3RydWN0IGRldmljZV9ub2RlICpub2RlKTsKK2V4dGVybiB2b2lkIG1wYzUyeHhfc2V0dXBfY3B1KHZvaWQpOworCitleHRlcm4gdm9pZCBtcGM1Mnh4X2luaXRfaXJxKHZvaWQpOworZXh0ZXJuIHVuc2lnbmVkIGludCBtcGM1Mnh4X2dldF9pcnEodm9pZCk7CisKKyNlbmRpZiAvKiBfX0FTU0VNQkxZX18gKi8KKworI2VuZGlmIC8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Kworc3RhdGljIGlubGluZSB2b2lkIHBzM19tbWlvX3JlZ2lvbl9pbml0KHN0cnVjdCBwczNfbW1pb19yZWdpb24gKnIsCisJY29uc3Qgc3RydWN0IHBzM19kZXZpY2VfaWQqIGRpZCwgdW5zaWduZWQgbG9uZyBidXNfYWRkciwKKwl1bnNpZ25lZCBsb25nIGxlbiwgZW51bSBwczNfbW1pb19wYWdlX3NpemUgcGFnZV9zaXplKQoreworCXItPmRpZCA9ICpkaWQ7CisJci0+YnVzX2FkZHIgPSBidXNfYWRkcjsKKwlyLT5sZW4gPSBsZW47CisJci0+cGFnZV9zaXplID0gcGFnZV9zaXplOworfQoraW50IHBzM19tbWlvX3JlZ2lvbl9jcmVhdGUoc3RydWN0IHBzM19tbWlvX3JlZ2lvbiAqcik7CitpbnQgcHMzX2ZyZWVfbW1pb19yZWdpb24oc3RydWN0IHBzM19tbWlvX3JlZ2lvbiAqcik7Cit1bnNpZ25lZCBsb25nIHBzM19tbV9waHlzX3RvX2xwYXIodW5zaWduZWQgbG9uZyBwaHlzX2FkZHIpOworCisvKiBpbnJlcnJ1cHQgcm91dGluZXMgKi8KKworaW50IHBzM19hbGxvY19pb19pcnEodW5zaWduZWQgaW50IGludGVycnVwdF9pZCwgdW5zaWduZWQgaW50ICp2aXJxKTsKK2ludCBwczNfZnJlZV9pb19pcnEodW5zaWduZWQgaW50IHZpcnEpOworaW50IHBzM19hbGxvY19ldmVudF9pcnEodW5zaWduZWQgaW50ICp2aXJxKTsKK2ludCBwczNfZnJlZV9ldmVudF9pcnEodW5zaWduZWQgaW50IHZpcnEpOworaW50IHBzM19zZW5kX2V2ZW50X2xvY2FsbHkodW5zaWduZWQgaW50IHZpcnEpOworaW50IHBzM19jb25uZWN0X2V2ZW50X2lycShjb25zdCBzdHJ1Y3QgcHMzX2RldmljZV9pZCAqZGlkLAorCXVuc2lnbmVkIGludCBpbnRlcnJ1cHRfaWQsIHVuc2lnbmVkIGludCAqdmlycSk7CitpbnQgcHMzX2Rpc2Nvbm5lY3RfZXZlbnRfaXJxKGNvbnN0IHN0cnVjdCBwczNfZGV2aWNlX2lkICpkaWQsCisJdW5zaWduZWQgaW50IGludGVycnVwdF9pZCwgdW5zaWduZWQgaW50IHZpcnEpOworaW50IHBzM19hbGxvY192dWFydF9pcnEodm9pZCogdmlydF9hZGRyX2JtcCwgdW5zaWduZWQgaW50ICp2aXJxKTsKK2ludCBwczNfZnJlZV92dWFydF9pcnEodW5zaWduZWQgaW50IHZpcnEpOworaW50IHBzM19hbGxvY19zcGVfaXJxKHVuc2lnbmVkIGxvbmcgc3BlX2lkLCB1bnNpZ25lZCBpbnQgY2xhc3MsCisJdW5zaWduZWQgaW50ICp2aXJxKTsKK2ludCBwczNfZnJlZV9zcGVfaXJxKHVuc2lnbmVkIGludCB2aXJxKTsKKworLyogbHYxIHJlc3VsdCBjb2RlcyAqLworCitlbnVtIGx2MV9yZXN1bHQgeworCUxWMV9TVUNDRVNTICAgICAgICAgICAgICAgICAgICAgPSAwLAorCS8qIG5vdCB1c2VkICAgICAgICAgICAgICAgICAgICAgICAtMSAqLworCUxWMV9SRVNPVVJDRV9TSE9SVEFHRSAgICAgICAgICAgPSAtMiwKKwlMVjFfTk9fUFJJVklMRUdFICAgICAgICAgICAgICAgID0gLTMsCisJTFYxX0RFTklFRF9CWV9QT0xJQ1kgICAgICAgICAgICA9IC00LAorCUxWMV9BQ0NFU1NfVklPTEFUSU9OICAgICAgICAgICAgPSAtNSwKKwlMVjFfTk9fRU5UUlkgICAgICAgICAgICAgICAgICAgID0gLTYsCisJTFYxX0RVUExJQ0FURV9FTlRSWSAgICAgICAgICAgICA9IC03LAorCUxWMV9UWVBFX01JU01BVENIICAgICAgICAgICAgICAgPSAtOCwKKwlMVjFfQlVTWSAgICAgICAgICAgICAgICAgICAgICAgID0gLTksCisJTFYxX0VNUFRZICAgICAgICAgICAgICAgICAgICAgICA9IC0xMCwKKwlMVjFfV1JPTkdfU1RBVEUgICAgICAgICAgICAgICAgID0gL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9iamVjdCdzIC50ZXh0IHNlY3Rpb24sIHRoZW4KKyAqIGJyYW5jaCBiYWNrIHRvIHJlc3RhcnQgdGhlIG9wZXJhdGlvbi4KKyAqLworc3RhdGljIGlubGluZSB2b2lkIGF0b21pY19hZGQoaW50IGksIGF0b21pY190ICp2KQoreworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisKKwlsb2NhbF9pcnFfc2F2ZShmbGFncyk7CisJKihsb25nICopdiArPSBpOworCWxvY2FsX2lycV9yZXN0b3JlKGZsYWdzKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIGF0b21pY19zdWIoaW50IGksIGF0b21pY190ICp2KQoreworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisKKwlsb2NhbF9pcnFfc2F2ZShmbGFncyk7CisJKihsb25nICopdiAtPSBpOworCWxvY2FsX2lycV9yZXN0b3JlKGZsYWdzKTsKK30KKworc3RhdGljIGlubGluZSBpbnQgYXRvbWljX2FkZF9yZXR1cm4oaW50IGksIGF0b21pY190ICp2KQoreworCXVuc2lnbmVkIGxvbmcgdGVtcCwgZmxhZ3M7CisKKwlsb2NhbF9pcnFfc2F2ZShmbGFncyk7CisJdGVtcCA9ICoobG9uZyAqKXY7CisJdGVtcCArPSBpOworCSoobG9uZyAqKXYgPSB0ZW1wOworCWxvY2FsX2lycV9yZXN0b3JlKGZsYWdzKTsKKworCXJldHVybiB0ZW1wOworfQorCitzdGF0aWMgaW5saW5lIGludCBhdG9taWNfc3ViX3JldHVybihpbnQgaSwgYXRvbWljX3QgKnYpCit7CisJdW5zaWduZWQgbG9uZyB0ZW1wLCBmbGFnczsKKworCWxvY2FsX2lycV9zYXZlKGZsYWdzKTsKKwl0ZW1wID0gKihsb25nICopdjsKKwl0ZW1wIC09IGk7CisJKihsb25nICopdiA9IHRlbXA7CisJbG9jYWxfaXJxX3Jlc3RvcmUoZmxhZ3MpOworCisJcmV0dXJuIHRlbXA7Cit9CisKK3N0YXRpYyBpbmxpbmUgdm9pZCB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0IgorCQkiYW5kCSMweGYwLCAlMFxuXHQiCisJCTogIj0meiIgKGZsYWdzKQorCQk6IC8qIG5vIGlucHV0cyAqLworCQk6ICJtZW1vcnkiCisJKTsKKworCXJldHVybiBmbGFnczsKK30KKworI2RlZmluZSByYXdfbG9jYWxfc2F2ZV9mbGFncyhmbGFncykgXAorCQlkbyB7IChmbGFncykgPSBfX3Jhd19sb2NhbF9zYXZlX2ZsYWdzKCk7IH0gd2hpbGUgKDApCisKK3N0YXRpYyBpbmxpbmUgaW50IHJhd19pcnFzX2Rpc2FibGVkX2ZsYWdzKHVuc2lnbmVkIGxvbmcgZmxhZ3MpCit7CisJcmV0dXJuIChmbGFncyAhPSAwKTsKK30KKworc3RhdGljIGlubGluZSBpbnQgcmF3X2lycXNfZGlzYWJsZWQodm9pZCkKK3sKKwl1bnNpZ25lZCBsb25nIGZsYWdzID0gX19yYXdfbG9jYWxfc2F2ZV9mbGFncygpOworCisJcmV0dXJuIHJhd19pcnFzX2Rpc2FibGVkX2ZsYWdzKGZsYWdzKTsKK30KKworc3RhdGljIGlubGluZSB1bnNpZ25lZCBsb25nIF9fcmF3X2xvY2FsX2lycV9zYXZlKHZvaWQpCit7CisJdW5zaWduZWQgbG9uZyBmbGFncywgX19kdW1teTsKKworCV9fYXNtX18gX192b2xhdGlsZV9fICgKKwkJInN0YwlzciwgJTFcblx0IgorCQkibW92CSUxLCAlMFxuXHQiCisJCSJvcgkjMHhmMCwgJTBcblx0IgorCQkibGRjCSUwLCBzclxuXHQiCisJCSJtb3YJJTEsICUwXG5cdCIKKwkJImFuZAkjMHhmMCwgJTBcblx0IgorCQk6ICI9JnoiIChmbGFncyksICI9JnIiIChfX2R1bW15KQorCQk6IC8qIG5vIGlucHV0cyAqLworCQk6ICJtZW1vcnkiCisJKTsKKworCXJldHVybiBmbGFnczsKK30KKworI2RlZmluZSByYXdfbG9jYWxfaXJxX3NhdmUoZmxhZ3MpIFwKKwkJZG8geyAoZmxhZ3MpID0gX19yYXdf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AgICAgLyogU2VyaWFsIElSUSAqLworI2RlZmluZSBJUlFfUlRDICAgICAgICAgNiAgICAgICAgICAgICAgIC8qIFJUQyBBIC8gQiBJUlEgKi8KKyNkZWZpbmUgSVJRX0VYVEVOVElPTjYgIDcgICAgICAgICAgICAgICAvKiBFWFQ2biBJUlEgKi8KKyNkZWZpbmUgSVJRX0VYVEVOVElPTjUgIDggICAgICAgICAgICAgICAvKiBFWFQ1biBJUlEgKi8KKyNkZWZpbmUgSVJRX0VYVEVOVElPTjQgIDkgICAgICAgICAgICAgICAvKiBFWFQ0biBJUlEgKi8KKyNkZWZpbmUgSVJRX0VYVEVOVElPTjIgIDEwICAgICAgICAgICAgICAvKiBFWFQybiBJUlEgKi8KKyNkZWZpbmUgSVJRX0VYVEVOVElPTjEgIDExICAgICAgICAgICAgICAvKiBFWFQxbiBJUlEgKi8KKyNkZWZpbmUgSVJRX09ORVRIICAgICAgIDEzICAgICAgICAgICAgICAvKiBPbiBib2FyZCBFdGhlcm5ldCBJUlEgKi8KKyNkZWZpbmUgSVJRX1BTVyAgICAgICAgIDE0ICAgICAgICAgICAgICAvKiBQdXNoIFN3aXRjaCBJUlEgKi8KKworI2Vsc2UgLyogUjc3ODBSUCAqLworCisjZGVmaW5lIFBBX0JDUgkJMHhhNTAwMDAwMAkvKiBGUEdBICovCisjZGVmaW5lCVBBX0lSTE1TSwkoUEFfQkNSKzB4MDAwMCkJLyogSW50ZXJydXB0IE1hc2sgY29udHJvbCAqLworI2RlZmluZSBQQV9JUkxNT04JKFBBX0JDUisweDAwMDIpCS8qIEludGVycnVwdCBTdGF0dXMgY29udHJvbCAqLworI2RlZmluZQlQQV9TRFBPVwkoUEFfQkNSKzB4MDAwNCkJLyogU0QgUG93ZXIgY29udHJvbCAqLworI2RlZmluZQlQQV9SU1RDVEwJKFBBX0JDUisweDAwMDYpCS8qIERldmljZSBSZXNldCBjb250cm9sICovCisjZGVmaW5lCVBBX1BDSUJECShQQV9CQ1IrMHgwMDA4KQk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gLyogUENJIFNsb3QgIzIgSVJRICovCi0jZGVmaW5lIElSUV9QQ0lTTE9UMyAgICA2NyAgICAgICAgICAgICAgLyogUENJIFNsb3QgIzMgSVJRICovCi0jZGVmaW5lIElSUV9QQ0lTTE9UNCAgICA2OCAgICAgICAgICAgICAgLyogUENJIFNsb3QgIzQgSVJRICovCi0jZGVmaW5lIElSUV9DRkNBUkQgICAgICAxICAgICAgICAgICAgICAgLyogQ0YgQ2FyZCBJUlEgKi8KLS8vICNkZWZpbmUgSVJRX0NGSU5TVCAgIDAgICAgICAgICAgICAgICAvKiBDRiBDYXJkIEluc2VydCBJUlEgKi8KLSNkZWZpbmUgSVJRX1RQICAgICAgICAgIDIgICAgICAgICAgICAgICAvKiBUb3VjaCBQYW5lbCBJUlEgKi8KLSNkZWZpbmUgSVJRX1NDSTEgICAgICAgIDMgICAgICAgICAgICAgICAvKiBTQ0kxIElSUSAqLwotI2RlZmluZSBJUlFfU0NJMCAgICAgICAgNCAgICAgICAgICAgICAgIC8qIFNDSTAgSVJRICovCi0jZGVmaW5lIElSUV8yU0VSSUFMICAgICA1ICAgICAgICAgICAgICAgLyogU2VyaWFsIElSUSAqLwotI2RlZmluZSBJUlFfUlRDICAgICAgICAgNiAgICAgICAgICAgICAgIC8qIFJUQyBBIC8gQiBJUlEgKi8KLSNkZWZpbmUgSVJRX0VYVEVOVElPTjYgIDcgICAgICAgICAgICAgICAvKiBFWFQ2biBJUlEgKi8KLSNkZWZpbmUgSVJRX0VYVEVOVElPTjUgIDggICAgICAgICAgICAgICAvKiBFWFQ1biBJUlEgKi8KLSNkZWZpbmUgSVJRX0VYVEVOVElPTjQgIDkgICAgICAgICAgICAgICAvKiBFWFQ0biBJUlEgKi8KLSNkZWZpbmUgSVJRX0VYVEVOVElPTjIgIDEwICAgICAgICAgICAgICAvKiBFWFQybiBJUlEgKi8KLSNkZWZpbmUgSVJRX0VYVEVOVElPTjEgIDExICAgICAgICAgICAgICAvKiBFWFQxbiBJUlEgKi8K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bmRlZiBfX0FTTV9SSU9fSAorI2RlZmluZSBfX0FTTV9SSU9fSAorCisjZGVmaW5lIFJJT19UQUJMRV9WRVJTSU9OCTMKKworc3RydWN0IHJpb190YWJsZV9oZHIgeworCXU4IHZlcnNpb247ICAgICAgLyogVmVyc2lvbiBudW1iZXIgb2YgdGhpcyBkYXRhIHN0cnVjdHVyZSAgKi8KKwl1OCBudW1fc2NhbF9kZXY7IC8qICMgb2YgU2NhbGFiaWxpdHkgZGV2aWNlcyAgICAgICAgICAgICAgICovCisJdTggbnVtX3Jpb19kZXY7ICAvKiAjIG9mIFJJTyBJL08gZGV2aWNlcyAgICAgICAgICAgICAgICAgICAqLworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKTsKKworc3RydWN0IHNjYWxfZGV0YWlsIHsKKwl1OCBub2RlX2lkOyAgICAgIC8qIFNjYWxhYmlsaXR5IE5vZGUgSUQgICAgICAgICAgICAgICAgICAgICovCisJdTMyIENCQVI7ICAgICAgICAvKiBBZGRyZXNzIG9mIDFNQiByZWdpc3RlciBzcGFjZSAgICAgICAgICAqLworCXU4IHBvcnQwbm9kZTsgICAgLyogTm9kZSBJRCBwb3J0IGNvbm5lY3RlZCB0bzogMHhGRj1Ob25lICAgKi8KKwl1OCBwb3J0MHBvcnQ7ICAgIC8qIFBvcnQgbnVtIHBvcnQgY29ubmVjdGVkIHRvOiAwLDEsMiwgb3IgICovCisJICAgICAgICAgICAgICAgICAvKiAweEZGPU5vbmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCXU4IHBvcnQxbm9kZTsgICAgLyogTm9kZSBJRCBwb3J0IGNvbm5lY3RlZCB0bzogMHhGRiA9IE5vbmUgKi8KKwl1OCBwb3J0MXBvcnQ7ICAgIC8qIFBvcnQgbnVtIHBvcnQgY29ubmVjdGVkIHRvOiAwLDEsMiwgb3IgICovCisJICAgICAgICAgICAgICAgICAvKiAweEZGPU5vbmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCXU4IHBvcnQybm9kZTsgICAgLyogTm9kZSBJRCBwb3J0IGNvbm5lY3RlZCB0bzogMHhGRiA9IE5vbmUgKi8KKwl1OCBwb3J0MnBvcnQ7ICAgIC8qIFBvcnQgbnVtIHBvcnQgY29ubmVjdGVkIHRvOiAwLDEsMiwgb3IgICovCisJICAgICAgICAgICAgICAgICAvKiAweEZGPU5vbmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCXU4IGNoYXNzaXNfbnVtOyAgLyogMSBiYXNlZCBDaGFzc2lzIG51bWJlciAoMSA9IGJvb3Qgbm9kZSkgKi8KK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSk7CisKK3N0cnVjdCByaW9fZGV0YWlsIHsKKwl1OCBub2RlX2lkOyAgICAgIC8qIFJJTyBOb2RlIElEICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisJdTMyIEJCQVI7ICAgICAgICAvKiBBZGRyZXNzIG9mIDFNQiByZWdpc3RlciBzcGFjZSAgICAgICAgICAqLworCXU4IHR5cGU7ICAgICAgICAgLyogVHlwZSBvZiBkZXZpY2UgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1OCBvd25lcl9pZDsgICAgIC8qIE5vZGUgSUQgb2YgSHVycmljYW5lIHRoYXQgb3ducyB0aGlzICAgICovCisJICAgICAgICAgICAgICAgICAvKiBub2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCXU4IHBvcnQwbm9kZTsgICAgLyogTm9kZSBJRCBwb3J0IGNvbm5lY3RlZCB0bzogMHhGRj1Ob25lICAgKi8KKwl1OCBwb3J0MHBvcnQ7ICAgIC8qIFBvcnQgbnVtIHBvcnQgY29ubmVjdGVkIHRvOiAwLDEsMiwgb3IgICovCisJICAgICAgICAgICAgICAgICAvKiAweEZGPU5vbmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCXU4IHBvcnQxbm9kZTsgICAgLyogTm9kZSBJRCBwb3J0IGNvbm5lY3RlZCB0bzogMHhGRj1Ob25lICAgKi8KKwl1OCBwb3J0MXBvcnQ7ICAgIC8qIFBvcnQgbnVtIHBvcnQgY29ubmVjdGVkIHRvOiAwLDEsMiwgb3IgICovCisJICAgICAgICAgICAgICAgICAvKiAweEZGPU5vbmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCXU4IGZpcnN0X3Nsb3Q7ICAgLyogTG93ZXN0IHNsb3QgbnVtYmVyIGJlbG93IHRoaXMgQ2FsZ2FyeSAgKi8KKwl1OCBzdGF0dXM7ICAgICAgIC8qIEJpdCAwID0gMSA6IHRoZSBYQVBJQyBpcyB1c2VkICAgICAgICAgICovCisJICAgICAgICAgICAgICAgICAvKiAgICAgICA9IDAgOiB0aGUgWEFQSUMgaXMgbm90IHVzZWQsIGllOiAqLworCSAgICAgICAgICAgICAgICAgLyogICAgICAgICAgICBpbnRzIGZ3ZGVkIHRvIGFub3RoZXIgWEFQSUMgKi8KKwkgICAgICAgICAgICAgICAgIC8qICAgICAgICAgICBCaXRzMTo3IFJlc2VydmVkICAgICAgICAgICAgICovCisJdTggV1BfaW5kZXg7ICAgICAvKiBpbnN0YW5jZSBpbmRleCAtIGxvd2VyIG9uZXMgaGF2ZSAgICAgICAqLworCSAgICAgICAgICAgICAgICAgLyogICAgIGxvd2VyIHNsb3QgbnVtYmVycy9QQ0kgYnVzIG51bWJlcnMgKi8KKwl1OCBjaGFzc2lzX251bTsgIC8qIDEgYmFzZWQgQ2hhc3NpcyBudW1iZXIgICAgICAgICAgICAgICAgICovCit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOworCitlbnVtIHsKKwlIVVJSX1NDQUxBQklMVFkJPSAwLCAgLyogSHVycmljYW5lIFNjYWxhYmlsaXR5IGluZm8gKi8KKwlIVVJSX1JJT0lCCT0gMiwgIC8qIEh1cnJpY2FuZSBSSU9JQiBpbmZvICAgICAgICovCisJQ09NUEFUX0NBTEdBUlkJPSA0LCAgLyogQ29tcGF0aWJpbGl0eSBDYW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tIFhDSEFMX0tJT19CWVBBU1NfUEFERFIgKyBYQ0hBTF9LSU9fQllQQVNTX1ZBRERSIDoJICAgICAgXAotICAgICgodW5zaWduZWQpKGEpID49IFhDSEFMX0tJT19DQUNIRURfUEFERFIJCQkJICAgICAgXAotICAgICAmJiAodW5zaWduZWQpKGEpIDwgWENIQUxfS0lPX0NBQ0hFRF9QQUREUiArIFhDSEFMX0tJT19DQUNIRURfU0laRSkgPyAgICAgXAotICAgICAgICAodW5zaWduZWQpKGEpIC0gWENIQUxfS0lPX0NBQ0hFRF9QQUREUiArIFhDSEFMX0tJT19CWVBBU1NfVkFERFIgOiAgICAgXAotICAgICAgICAoKHVuc2lnbmVkKShhKSA+PSBYQ0hBTF9LSU9fQ0FDSEVEX1ZBRERSCQkJICAgICAgXAotICAgICAgICAgJiYgKHVuc2lnbmVkKShhKSA8IFhDSEFMX0tJT19DQUNIRURfVkFERFIgKyBYQ0hBTF9LSU9fQ0FDSEVEX1NJWkUpID8gXAotICAgICAgICAgICAgKHVuc2lnbmVkKShhKSAtIFhDSEFMX0tJT19DQUNIRURfVkFERFIgKyBYQ0hBTF9LSU9fQllQQVNTX1ZBRERSIDogXAotCSAgICAodW5zaWduZWQpKGEpKQotCi0jZGVmaW5lIENBQ0hFRF9BRERSX0lPKGEpCQkJCQkJICAgICAgXAotKCgodW5zaWduZWQpKGEpID49IFhDSEFMX0tJT19CWVBBU1NfUEFERFIJCQkJICAgICAgXAotICAmJiAodW5zaWduZWQpKGEpIDwgWENIQUxfS0lPX0JZUEFTU19QQUREUiArIFhDSEFMX0tJT19CWVBBU1NfU0laRSkgPwkgICAgICBcCi0gICAgKHVuc2lnbmVkKShhKSAtIFhDSEFMX0tJT19CWVBBU1NfUEFERFIgKyBYQ0hBTF9LSU9fQ0FDSEVEX1ZBRERSIDoJICAgICAgXAotICAgICgodW5zaWduZWQpKGEpID49IFhDSEFMX0tJT19DQUNIRURfUEFERFIJCQkJICAgICAgXAotICAgICAmJiAodW5zaWduZ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BU0lEX1JFU0VSVkVEXzIpICAgPDwgMTYpICsgXAotICAgICAgICAgICAgICAgICAgICAgICAgICgoKHgpICYgKEFTSURfTUFTSykpIDw8ICA4KSArIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAoKFhDSEFMX01NVV9BU0lEX0tFUk5FTCkpICAgKQotCi0jZWxpZiAoVVNFUl9SSU5HID09IDIpCi0jZGVmaW5lIEFTSURfSU5TRVJUKHgpICggKChBU0lEX1JFU0VSVkVEXzEpICAgPDwgMjQpICsgXAotICAgICAgICAgICAgICAgICAgICAgICAgICgoKHgpICYgKEFTSURfTUFTSykpIDw8IDE2KSArIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAoKEFTSURfUkVTRVJWRURfMikgICA8PCAgOCkgKyBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgKChYQ0hBTF9NTVVfQVNJRF9LRVJORUwpKSAgICkKLQotI2VsaWYgKFVTRVJfUklORyA9PSAzKQotI2RlZmluZSBBU0lEX0lOU0VSVCh4KSAoICgoKHgpICYgKEFTSURfTUFTSykpIDw8IDI0KSArIFwKLQkJCSAoKEFTSURfUkVTRVJWRURfMSkgICA8PCAxNikgKyBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgKChBU0lEX1JFU0VSVkVEXzIpICAgPDwgIDgpICsgXAotICAgICAgICAgICAgICAgICAgICAgICAgICgoWENIQUxfTU1VX0FTSURfS0VSTkVMKSkgICApCi0KLSNlbHNlCi0jZXJyb3IgR29vZnkgdmFsdWUgZm9yIFVTRVJfUklORwotCi0jZW5kaWYgLyogVVNFUl9SSU5HID09IDEgKi8KLQotCi0vKgotICogIEFsbCB1bnVzZWQgYnkgaGFyZHdhcmUgdXBwZXIgYml0cyB3aWxsIGJlIGNvbnNpZGVyZWQKLSAqICBhcyBhIHNvZnR3YXJlIGFzaWQgZXh0ZW5zaW9uLgotICovCi0KLSNkZWZpbmUgQVNJRF9WRVJTSU9OX01BU0sgICgodW5zaWduZWQgbG9uZyl+KEFT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dCwgaWR0OworCV9fdTY0IGNyMCwgY3IyLCBjcjMsIGNyNCwgY3I4OworCV9fdTY0IGVmZXI7CisJX191NjQgYXBpY19iYXNlOworCV9fdTY0IGludGVycnVwdF9iaXRtYXBbS1ZNX0lSUV9CSVRNQVBfU0laRShfX3U2NCldOworfTsKKworc3RydWN0IGt2bV9tc3JfZW50cnkgeworCV9fdTMyIGluZGV4OworCV9fdTMyIHJlc2VydmVkOworCV9fdTY0IGRhdGE7Cit9OworCisvKiBmb3IgS1ZNX0dFVF9NU1JTIGFuZCBLVk1fU0VUX01TUlMgKi8KK3N0cnVjdCBrdm1fbXNycyB7CisJX191MzIgdmNwdTsKKwlfX3UzMiBubXNyczsgLyogbnVtYmVyIG9mIG1zcnMgaW4gZW50cmllcyAqLworCisJc3RydWN0IGt2bV9tc3JfZW50cnkgZW50cmllc1swXTsKK307CisKKy8qIGZvciBLVk1fR0VUX01TUl9JTkRFWF9MSVNUICovCitzdHJ1Y3Qga3ZtX21zcl9saXN0IHsKKwlfX3UzMiBubXNyczsgLyogbnVtYmVyIG9mIG1zcnMgaW4gZW50cmllcyAqLworCV9fdTMyIGluZGljZXNbMF07Cit9OworCisvKiBmb3IgS1ZNX1RSQU5TTEFURSAqLworc3RydWN0IGt2bV90cmFuc2xhdGlvbiB7CisJLyogaW4gKi8KKwlfX3U2NCBsaW5lYXJfYWRkcmVzczsKKwlfX3UzMiB2Y3B1OworCV9fdTMyIHBhZGRpbmc7CisKKwkvKiBvdXQgKi8KKwlfX3U2NCBwaHlzaWNhbF9hZGRyZXNzOworCV9fdTggIHZhbGlkOworCV9fdTggIHdyaXRlYWJsZTsKKwlfX3U4ICB1c2VybW9kZTsKK307CisKKy8qIGZvciBLVk1fSU5URVJSVVBUICovCitzdHJ1Y3Qga3ZtX2ludGVycnVwdCB7CisJLyogaW4gKi8KKwlfX3UzMiB2Y3B1OworCV9fdTMyIGlycTsKK307CisKK3N0cnVjdCBrdm1fYnJlYWtwb2ludCB7CisJX191MzI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ICAqLworI2RlZmluZSBNTUNfU1dJVENIICAgICAgICAgICAgICAgIDYgICAvKiBhYyAgIFszMTowXSBTZWUgYmVsb3cgICBSMWIgKi8KICNkZWZpbmUgTU1DX1NFTEVDVF9DQVJEICAgICAgICAgICA3ICAgLyogYWMgICBbMzE6MTZdIFJDQSAgICAgICAgUjEgICovCisjZGVmaW5lIE1NQ19TRU5EX0VYVF9DU0QgICAgICAgICAgOCAgIC8qIGFkdGMgICAgICAgICAgICAgICAgICAgIFIxICAqLwogI2RlZmluZSBNTUNfU0VORF9DU0QgICAgICAgICAgICAgIDkgICAvKiBhYyAgIFszMToxNl0gUkNBICAgICAgICBSMiAgKi8KICNkZWZpbmUgTU1DX1NFTkRfQ0lEICAgICAgICAgICAgIDEwICAgLyogYWMgICBbMzE6MTZdIFJDQSAgICAgICAgUjIgICovCiAjZGVmaW5lIE1NQ19SRUFEX0RBVF9VTlRJTF9TVE9QICAxMSAgIC8qIGFkdGMgWzMxOjBdIGRhZHIgICAgICAgIFIxICAqLwpAQCAtODAsNiArODIsNyBAQAogICAvKiBjbGFzcyA4ICovCiAvKiBUaGlzIGlzIGJhc2ljYWxseSB0aGUgc2FtZSBjb21tYW5kIGFzIGZvciBNTUMgd2l0aCBzb21lIHF1aXJrcy4gKi8KICNkZWZpbmUgU0RfU0VORF9SRUxBVElWRV9BRERSICAgICAzICAgLyogYmNyICAgICAgICAgICAgICAgICAgICAgUjYgICovCisjZGVmaW5lIFNEX1NXSVRDSCAgICAgICAgICAgICAgICAgNiAgIC8qIGFkdGMgWzMxOjBdIFNlZSBiZWxvdyAgIFIxICAqLwogCiAgIC8qIEFwcGxpY2F0aW9uIGNvbW1hbmRzICovCiAjZGVmaW5lIFNEX0FQUF9TRVRfQlVTX1dJRFRIICAgICAgNiAgIC8qIGFjICAgWzE6MF0gYnVzIHdpZHRoICAgIFIxICAqLwpAQCAtODgsNiArOTEsMzAgQEAKICNkZWZpbmUgU0RfQVBQX1NFTkRfU0NSICAgICAgICAg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XNzZXMgb25seS4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmbmRlZiBfTkZfQ09OTlRSQUNLX0hFTFBFUl9IMzIzX0FTTjFfSF8KKyNkZWZpbmUgX05GX0NPTk5UUkFDS19IRUxQRVJfSDMyM19BU04xX0hfCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogSC4zMjMgVHlwZXMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2luY2x1ZGUgIm5mX2Nvbm50cmFja19oMzIzX3R5cGVzLmgiCisKK3R5cGVkZWYgc3RydWN0IHsKKwllbnVtIHsKKwkJUTkzMV9OYXRpb25hbEVzY2FwZSA9IDB4MDAsCisJCVE5MzFfQWxlcnRpbmcgPSAweDAxLAorCQlROTMxX0NhbGxQcm9jZWVkaW5nID0gMHgwMiwKKwkJUTkzMV9Db25uZWN0ID0gMHgwNywKKwkJUTkzMV9Db25uZWN0QWNrID0gMHgwRiwKKwkJUTkzMV9Qcm9ncmVzcyA9IDB4MDMsCisJCVE5MzFfU2V0dXAgPSAweDA1LAorCQlROTMxX1NldHVwQWNrID0gMHgwRCwKKwkJUTkzMV9SZXN1bWUgPSAweDI2LAorCQlROTMxX1Jlc3VtZUFjayA9IDB4MkUsCisJCVE5MzFfUmVzdW1lUmVqZWN0ID0gMHgyMiwKKwkJUTkzMV9TdXNwZW5kID0gMHgyNSwKKwkJUTkzMV9TdXNwZW5kQWNrID0gMHgyRCwKKwkJUTkzMV9TdXNwZW5kUmVqZWN0ID0gMHgyMSwKKwkJUTkzMV9Vc2VySW5mb3JtYXRpb24gPSAweDIwLAorCQlROTMxX0Rpc2Nvbm5lY3QgPSAweDQ1LAorCQlROTMxX1JlbGVhc2UgPSAweDRELAorCQlROTMxX1JlbGVhc2VDb21wbGV0ZSA9IDB4NUEsCisJCVE5MzFfUmVzdGFydCA9IDB4NDYsCisJCVE5MzFfUmVzdGFydEFjayA9IDB4NEUsCisJCVE5MzFfU2VnbWVudCA9IDB4NjAsCisJCVE5MzFfQ29uZ2VzdGlvbkN0cmwgPSAweDc5LAorCQlROTMxX0luZm9ybWF0aW9uID0gMHg3QiwKKwkJUTkzMV9Ob3RpZnkgPSAweDZFLAorCQlROTMxX1N0YXR1cyA9IDB4N0QsCisJCVE5MzFfU3RhdHVzRW5xdWlyeSA9IDB4NzUsCisJCVE5MzFfRmFjaWxpdHkgPSAweDYyCisJfSBNZXNzYWdlVHlwZTsKKwlIMzIzX1VzZXJJbmZvcm1hdGlvbiBVVUlFOworfSBROTMxOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIERlY29kZSBGdW5jdGlvbnMgUmV0dXJuIENvZGVzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2RlZmluZSBIMzIzX0VSUk9SX05PTkUgMAkvKiBEZWNvZGVkIHN1Y2Nlc3NmdWxseSAqLworI2RlZmluZSBIMzIzX0VSUk9SX1NUT1AgMQkvKiBEZWNvZGluZyBzdG9wcGVkLCBub3QgcmVhbGx5IGFuIGVycm9yICovCisjZGVmaW5lIEgzMjNfRVJST1JfQk9VTkQgLTEKKyNkZWZpbmUgSDMyM19FUlJPUl9SQU5HRSAtMgorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogRGVjb2RlIEZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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IGFyY2hpdGVjdHVyZXMgdGhhdCBoYXMgbm8gbWlzYWxpZ25lZCBtZW1vcnkgYWNjZXNzCi0gKiAgICBzdXBwb3J0LgotICoKLSAqIExpbWl0YXRpb25zOgotICoKLSAqIDEuIEF0IG1vc3QgMzAgZmFzdHN0YXJ0IGVudHJpZXMuIEFjdHVhbGx5IHRoaXMgaXMgbGltaXRlZCBieSBldGhlcm5ldCdzIE1UVS4KLSAqICAgIElmIGEgU2V0dXAgc2lnbmFsIGNvbnRhaW5zIG1vcmUgdGhhbiAzMCBmYXN0c3RhcnQsIHRoZSBwYWNrZXQgc2l6ZSB3aWxsCi0gKiAgICB2ZXJ5IGxpa2VseSBleGNlZWQgdGhlIE1UVSBzaXplLCB0aGVuIHRoZSBUUEtUIHdpbGwgYmUgZnJhZ21lbnRlZC4gSQotICogICAgZG9uJ3Qga25vdyBob3cgdG8gaGFuZGxlIHRoaXMgaW4gYSBOZXRmaWx0ZXIgbW9kdWxlLiBBbnlib2R5IGNhbiBoZWxwPwotICogICAgQWx0aG91Z2ggSSB0aGluayAzMCBpcyBlbm91Z2ggZm9yIG1vc3Qgb2YgdGhlIGNhc2VzLgotICogMi4gSVB2NCBhZGRyZXNzZXMgb25seS4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotI2lmbmRlZiBfSVBfQ09OTlRSQUNLX0hFTFBFUl9IMzIzX0FTTjFfSF8KLSNkZWZpbmUgX0lQX0NPTk5UUkFDS19IRUxQRVJfSDMyM19BU04xX0hfCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogSC4zMjMgVHlwZXMKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2luY2x1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7Ci0JSDMyM19Vc2VySW5mb3JtYXRpb24gVVVJRTsKLX0gUTkzMTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBEZWNvZGUgRnVuY3Rpb25zIFJldHVybiBDb2RlcwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLSNkZWZpbmUgSDMyM19FUlJPUl9OT05FIDAJLyogRGVjb2RlZCBzdWNjZXNzZnVsbHkgKi8KLSNkZWZpbmUgSDMyM19FUlJPUl9TVE9QIDEJLyogRGVjb2Rpbmcgc3RvcHBlZCwgbm90IHJlYWxseSBhbiBlcnJvciAqLwotI2RlZmluZSBIMzIzX0VSUk9SX0JPVU5EIC0xCi0jZGVmaW5lIEgzMjNfRVJST1JfUkFOR0UgLTIKLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIERlY29kZSBGdW5jdGlvbnMKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1pbnQgRGVjb2RlUmFzTWVzc2FnZSh1bnNpZ25lZCBjaGFyICpidWYsIHNpemVfdCBzeiwgUmFzTWVzc2FnZSAqIHJhcyk7Ci1pbnQgRGVjb2RlUTkzMSh1bnNpZ25lZCBjaGFyICpidWYsIHNpemVfdCBzeiwgUTkzMSAqIHE5MzEpOwotaW50IERlY29kZU11bHRpbWVkaWFTeXN0ZW1Db250cm9sTWVzc2FnZSh1bnNpZ25lZCBjaGFyICpidWYsIHNpemVfdCBzeiwKLQkJCQkJIE11bHRpbWVkaWFTeXN0ZW1Db250cm9sTWVzc2FnZSAqCi0JCQkJCSBtc2NtKTsKLQotI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2NhdG1hcF9zZXRiaXQoCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IG5ldGxibF9sc21fc2VjYXR0cl9jYXRtYXAgKmNhdG1hcCwKKwkJCQkgICAgICB1MzIgYml0LAorCQkJCSAgICAgIGdmcF90IGZsYWdzKQoreworCXJldHVybiAwOworfQorCitzdGF0aWMgaW5saW5lIGludCBuZXRsYmxfc2VjYXR0cl9jYXRtYXBfc2V0cm5nKAorCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBuZXRsYmxfbHNtX3NlY2F0dHJfY2F0bWFwICpjYXRtYXAsCisJCQkJICAgICAgdTMyIHN0YXJ0LAorCQkJCSAgICAgIHUzMiBlbmQsCisJCQkJICAgICAgZ2ZwX3QgZmxhZ3MpCit7CisJcmV0dXJuIDA7Cit9CisjZW5kaWYKKwogLyoKICAqIExTTSBwcm90b2NvbCBvcGVyYXRpb25zCiAgKi8KZGlmZiAtLWdpdCBhL2luY2x1ZGUvbmV0L25ldGxpbmsuaCBiL2luY2x1ZGUvbmV0L25ldGxpbmsuaAppbmRleCBjZTVjYmExLi5iY2FmNjdiIDEwMDY0NAotLS0gYS9pbmNsdWRlL25ldC9uZXRsaW5rLmgKKysrIGIvaW5jbHVkZS9uZXQvbmV0bGluay5oCkBAIC0zLDYgKzMsNyBAQAogCiAjaW5jbHVkZSA8bGludXgvdHlwZXMuaD4KICNpbmNsdWRlIDxsaW51eC9uZXRsaW5rLmg+CisjaW5jbHVkZSA8bGludXgvamlmZmllcy5oPgogCiAvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAqICAgICAgICAgTmV0bGluayBNZXNzYWdlcyBhbmQgQXR0cmlidXRlcyBJbnRlcmZhY2UgKEFzIFNlZW4gT24gVFYpCkBAIC01MDAsMTQgKzUwMSwxNSBAQAogCiAvKioKICAqIG5sbXNnX25ldyAtIEFsbG9jY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gd2hpbGUgYXRvbWljOiAiCiAJCQkiJXMvMHglMDh4LyVkXG4iLAogCQkJY3VycmVudC0+Y29tbSwgcHJlZW1wdF9jb3VudCgpLCBjdXJyZW50LT5waWQpOworCQlkZWJ1Z19zaG93X2hlbGRfbG9ja3MoY3VycmVudCk7CiAJCWR1bXBfc3RhY2soKTsKIAl9CiAJcHJvZmlsZV9oaXQoU0NIRURfUFJPRklMSU5HLCBfX2J1aWx0aW5fcmV0dXJuX2FkZHJlc3MoMCkpOwpAQCAtNDgwNCwxOCArNDkwMCwxOCBAQAogCQlzaG93X3N0YWNrKHAsIE5VTEwpOwogfQogCi12b2lkIHNob3dfc3RhdGUodm9pZCkKK3ZvaWQgc2hvd19zdGF0ZV9maWx0ZXIodW5zaWduZWQgbG9uZyBzdGF0ZV9maWx0ZXIpCiB7CiAJc3RydWN0IHRhc2tfc3RydWN0ICpnLCAqcDsKIAogI2lmIChCSVRTX1BFUl9MT05HID09IDMyKQogCXByaW50aygiXG4iCi0JICAgICAgICIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpYmxpbmdcbiIpOwotCXByaW50aygiICB0YXNrICAgICAgICAgICAgIFBDICAgICAgcGlkIGZhdGhlciBjaGlsZCB5b3VuZ2VyIG9sZGVyXG4iKTsKKwkgICAgICAgIiAgICAgICAgICAgICAgICAgICAgICAgICBmcmVlICAgICAgICAgICAgICAgICAgICAgICAgc2libGluZ1xuIik7CisJcHJpbnRrKCIgIHRhc2sgICAgICAgICAgICAgUEMgICAgc3RhY2sgICBwaWQgZmF0aGVyIGNoaWxkIHlvdW5nZXIgb2xkZXJcbiIpOwogI2Vsc2UKIAlwcmludGsoIlxuIgotCSAgICAgICAiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpYmxpbmdcbiIpOwotCXByaW50aygiICB0YXNrICAgICAgICAgICAgICAgICBQQyAgICAgICAgICBwaWQgZmF0aGVyIGN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m94eS0+dXRzX25zOworCXdoaWNoID0gKHdoaWNoIC0gKGNoYXIgKikmaW5pdF91dHNfbnMpICsgKGNoYXIgKil1dHNfbnM7CisjZW5kaWYKKwlpZiAoIXdyaXRlKQorCQlkb3duX3JlYWQoJnV0c19zZW0pOworCWVsc2UKKwkJZG93bl93cml0ZSgmdXRzX3NlbSk7CisJcmV0dXJuIHdoaWNoOworfQorCitzdGF0aWMgdm9pZCBwdXRfdXRzKGN0bF90YWJsZSAqdGFibGUsIGludCB3cml0ZSwgdm9pZCAqd2hpY2gpCit7CisJaWYgKCF3cml0ZSkKKwkJdXBfcmVhZCgmdXRzX3NlbSk7CisJZWxzZQorCQl1cF93cml0ZSgmdXRzX3NlbSk7Cit9CisKKyNpZmRlZiBDT05GSUdfU1lTVklQQworc3RhdGljIHZvaWQgKmdldF9pcGMoY3RsX3RhYmxlICp0YWJsZSwgaW50IHdyaXRlKQoreworCWNoYXIgKndoaWNoID0gdGFibGUtPmRhdGE7CisJc3RydWN0IGlwY19uYW1lc3BhY2UgKmlwY19ucyA9IGN1cnJlbnQtPm5zcHJveHktPmlwY19uczsKKwl3aGljaCA9ICh3aGljaCAtIChjaGFyICopJmluaXRfaXBjX25zKSArIChjaGFyICopaXBjX25zOworCXJldHVybiB3aGljaDsKK30KKyNlbHNlCisjZGVmaW5lIGdldF9pcGMoVCxXKSAoKFQpLT5kYXRhKQorI2VuZGlmCisKIC8qIC9wcm9jIGRlY2xhcmF0aW9uczogKi8KIAogI2lmZGVmIENPTkZJR19QUk9DX1NZU0NUTApAQCAtMTY4LDcgKzIxNyw3IEBACiBzdGF0aWMgc3NpemVfdCBwcm9jX3dyaXRlc3lzKHN0cnVjdCBmaWxlICosIGNvbnN0IGNoYXIgX191c2VyICosIHNpemVfdCwgbG9mZl90ICopOwogc3RhdGljIGludCBwcm9jX29wZW5zeXMoc3RydWN0IGlub2RlICosIHN0cnVjdCBmaWxlICopOwogCi1zdHJ1Y3QgZmlsZV9vcGVyYXRpb25zI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hLRVJOX0RFQlVHICJ1bndpbmQ6ICIgZm10ICJcbiIsICMjYXJncykpKQorCiBzdGF0aWMgc3RydWN0IHVud2luZF90YWJsZSAqZmluZF90YWJsZSh1bnNpZ25lZCBsb25nIHBjKQogewogCXN0cnVjdCB1bndpbmRfdGFibGUgKnRhYmxlOwpAQCAtMTQ1LDYgKzE2MiwxMiBAQAogCXJldHVybiB0YWJsZTsKIH0KIAorc3RhdGljIHVuc2lnbmVkIGxvbmcgcmVhZF9wb2ludGVyKGNvbnN0IHU4ICoqcExvYywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2b2lkICplbmQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lnbmVkIHB0clR5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyB0ZXh0X2Jhc2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBkYXRhX2Jhc2UpOworCiBzdGF0aWMgdm9pZCBpbml0X3Vud2luZF90YWJsZShzdHJ1Y3QgdW53aW5kX3RhYmxlICp0YWJsZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoYXIgKm5hbWUsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2b2lkICpjb3JlX3N0YXJ0LApAQCAtMTUyLDE0ICsxNzUsMzMgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZvaWQgKmluaXRfc3RhcnQsCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGluaXRfc2l6ZSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHZvaWQgKnRhYmxlX3N0YXJ0LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyB0YWJsZV9zaXplKQorICAgICAgICAgICAgICAgICA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AoY29uc3QgdTggKikoZmRlICsgMSkgKyAqZmRlLAorCQkgICAgICAgICAgICAgICAgICBwdHJUeXBlLCAwLCAwKSkKKwkJCXJldHVybjsKKwkJKytuOworCX0KKworCWlmICh0YWJsZVNpemUgfHwgIW4pCisJCXJldHVybjsKKworCWhkclNpemUgPSA0ICsgc2l6ZW9mKHVuc2lnbmVkIGxvbmcpICsgc2l6ZW9mKHVuc2lnbmVkIGludCkKKwkgICAgICAgICsgMiAqIG4gKiBzaXplb2YodW5zaWduZWQgbG9uZyk7CisJZHByaW50aygyLCAiQmluYXJ5IGxvb2t1cCB0YWJsZSBzaXplIGZvciAlczogJWx1IGJ5dGVzIiwgdGFibGUtPm5hbWUsIGhkclNpemUpOworCWhlYWRlciA9IGFsbG9jKGhkclNpemUpOworCWlmICghaGVhZGVyKQorCQlyZXR1cm47CisJaGVhZGVyLT52ZXJzaW9uICAgICAgICAgID0gMTsKKwloZWFkZXItPmVoX2ZyYW1lX3B0cl9lbmMgPSBEV19FSF9QRV9hYnN8RFdfRUhfUEVfbmF0aXZlOworCWhlYWRlci0+ZmRlX2NvdW50X2VuYyAgICA9IERXX0VIX1BFX2Fic3xEV19FSF9QRV9kYXRhNDsKKwloZWFkZXItPnRhYmxlX2VuYyAgICAgICAgPSBEV19FSF9QRV9hYnN8RFdfRUhfUEVfbmF0aXZlOworCXB1dF91bmFsaWduZWQoKHVuc2lnbmVkIGxvbmcpdGFibGUtPmFkZHJlc3MsICZoZWFkZXItPmVoX2ZyYW1lX3B0cik7CisJQlVJTERfQlVHX09OKG9mZnNldG9mKHR5cGVvZigqaGVhZGVyKSwgZmRlX2NvdW50KQorCSAgICAgICAgICAgICAlIF9fYWxpZ25vZih0eXBlb2YoaGVhZGVyLT5mZGVfY291bnQpKSk7CisJaGVhZGVyLT5mZGVfY291bnQgICAgICAgID0gbjsKKworCUJVSUxEX0JVR19PTihvZmZzZXRvZih0eXBlb2YoKmhlYWRlciksIHRhYmxlKQorCSAgICAgICAgICAgICAlIF9fYWxpZ25vZih0eXBlb2YoKmhlYWRlci0+dGFibGUpKSk7CisJZm9yIChmZGUgPSB0YWJsZS0+YWRkcmVzcywgdGFibGVTaXplID0gdGFibGUtPnNpemUsIG4gPSAwOworCSAgICAgdGFibGVTaXplOworCSAgICAgdGFibGVTaXplIC09IHNpemVvZigqZmRlKSArICpmZGUsIGZkZSArPSAxICsgKmZkZSAvIHNpemVvZigqZmRlKSkgeworCQljb25zdCB1MzIgKmNpZSA9IGZkZSArIDEgLSBmZGVbMV0gLyBzaXplb2YoKmZkZSk7CisKKwkJaWYgKCFmZGVbMV0pCisJCQljb250aW51ZTsgLyogdGhpcyBpcyBhIENJRSAqLworCQlwdHIgPSAoY29uc3QgdTggKikoZmRlICsgMik7CisJCWhlYWRlci0+dGFibGVbbl0uc3RhcnQgPSByZWFkX3BvaW50ZXIoJnB0ciwKKwkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY29uc3QgdTggKikoZmRlICsgMSkgKyAqZmRlLAorCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZkZV9wb2ludGVyX3R5cGUoY2llKSwgMCwgMCk7CisJCWhlYWRlci0+dGFibGVbbl0uZmRlID0gKHVuc2lnbmVkIGxvbmcpZmRlOworCQkrK247CisJfQorCVdBUk5fT04obiAhPSBoZWFkZXItPmZkZV9jb3VudCk7CisKKwlzb3J0KGhlYWRlci0+dGFibGUsCisJICAgICBuLAorCSAgICAgc2l6ZW9mKCpoZWFkZXItPnRhYmxlKSwKKwkgICAgIGNtcF9laF9mcmFtZV9oZHJfdGFibGVfZW50cmllcywKKwkgICAgIHN3YXBfZWhfZnJhbWVfaGRyX3RhYmxlX2VudHJpZXMpOworCisJdGFibGUtPmhkcnN6ID0gaGRyU2l6ZTsKKwlzbXBfd21iKCk7CisJdGFibGUtPmhlYWRlciA9IChjb25zdCB2b2lkICopaGVhZGVyOworfQorCitzdGF0aWMgdm9pZCAqX19pbml0IGJhbGxvYyh1bnNpZ25lZCBsb25nIHN6KQoreworCXJldHVybiBfX2FsbG9jX2Jvb3RtZW1fbm9wYW5pYyhzeiwKKwkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZW9mKHVuc2lnbmVkIGludCksCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fcGEoTUFYX0RNQV9BRERSRVNTKSk7Cit9CisKK3ZvaWQgX19pbml0IHVud2luZF9zZXR1cCh2b2lkKQoreworCXNldHVwX3Vud2luZF90YWJsZSgmcm9vdF90YWJsZSwgYmFsbG9jKTsKIH0KIAogI2lmZGVmIENPTkZJR19NT0RVTEVTCkBAIC0xOTMsNyArMzcyLDggQEAKIAlpbml0X3Vud2luZF90YWJsZSh0YWJsZSwgbW9kdWxlLT5uYW1lLAogCSAgICAgICAgICAgICAgICAgIG1vZHVsZS0+bW9kdWxlX2NvcmUsIG1vZHVsZS0+Y29yZV9zaXplLAogCSAgICAgICAgICAgICAgICAgIG1vZHVsZS0+bW9kdWxlX2luaXQsIG1vZHVsZS0+aW5pdF9zaXplLAotCSAgICAgICAgICAgICAgICAgIHRhYmxlX3N0YXJ0LCB0YWJsZV9zaXplKTsKKwkgICAgICAgICAgICAgICAgICB0YWJsZV9zdGFydCwgdGFibGVfc2l6ZSwKKwkgICAgICAgICAgICAgICAgICBOVUxMLCAwKTsKIAogCWlmIChsYXN0X3RhYmxlKQogCQlsYXN0X3RhYmxlLT5saW5rID0gdGFibGU7CkBAIC0zMDMsOSArNDgzLDMxIEBACiAJcmV0dXJuIHZhbHVlOwogfQogCitzdGF0aWMgY29uc3QgdTMyICpjaWVfZm9yX2ZkZShjb25zdCB1MzIgKmZkZSwgY29uc3Qgc3RydWN0IHVud2luZF90YWJsZSAqdGFibGUpCit7CisJY29uc3QgdTMyICpjaWU7CisKKwlpZiAoISpmZGUgfHwgKCpmZGUgJiAoc2l6ZW9mKCpmZGUpIC0gMSkpKQorCQlyZXR1cm4gJmJhZF9jaWU7CisJaWYgKCFmZGVbMV0pCisJCXJldHVybiAmbm90X2ZkZTsgLyogdGhpcyBpcyBhIENJRSAqLworCWlmICgoZmRlWzFdICYgKHNpemVvZigqZmRlKSAtIDEpKQorCSAgICB8fCBmZGVbMV0gPiAodW5zaWduZWQgbG9uZykoZmRlICsgMSkgLSAodW5zaWduZWQgbG9uZyl0YWJsZS0+YWRkcmVzcykKKwkJcmV0dXJuIE5VTEw7IC8qIHRoaXMgaXMgbm90IGEgdmFsaWQgRkRFICovCisJY2llID0gZmRlICsgMSAtIGZkZVsxXSAvIHNpemVvZigqZmRlKTsKKwlpZiAoKmNpZSA8PSBzaXplb2YoKmNpZSkgKyA0CisJICAgIHx8ICpjaWUgPj0gZmRlWzFdIC0gc2l6ZW9mKCpmZGUpCisJICAgIHx8ICgqY2llICYgKHNpemVvZigqY2llKSAtIDEpKQorCSAgICB8fCBjaWVbMV0pCisJCXJldHVybiBOVUxMOyAvKiB0aGlzIGlzIG5vdCBhICh2YWxpZCkgQ0lFICovCisJcmV0dXJuIGNpZTsKK30KKwogc3RhdGljIHVuc2lnbmVkIGxvbmcgcmVhZF9wb2ludGVyKGNvbnN0IHU4ICoqcExvYywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB2b2lkICplbmQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lnbmVkIHB0clR5cGUpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2lnbmVkIHB0clR5cGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyB0ZXh0X2Jhc2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBkYXRhX2Jhc2UpCiB7CiAJdW5zaWduZWQgbG9uZyB2YWx1ZSA9IDA7CiAJdW5pb24gewpAQCAtMzE3LDEzICs1MTksMTcgQEAKIAkJY29uc3QgdW5zaWduZWQgbG9uZyAqcHVsOwogC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YWJsZVNpemUpKSkgeworCQkJCWRvIHsKKwkJCQkJY29uc3QgdTggKmN1ciA9IHB0ciArIChpIC8gMikgKiAoMiAqIHRhYmxlU2l6ZSk7CisKKwkJCQkJc3RhcnRMb2MgPSByZWFkX3BvaW50ZXIoJmN1ciwKKwkJCQkJICAgICAgICAgICAgICAgICAgICAgICAgY3VyICsgdGFibGVTaXplLAorCQkJCQkgICAgICAgICAgICAgICAgICAgICAgICBoZHJbM10sIDAsCisJCQkJCSAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKWhkcik7CisJCQkJCWlmIChwYyA8IHN0YXJ0TG9jKQorCQkJCQkJaSAvPSAyOworCQkJCQllbHNlIHsKKwkJCQkJCXB0ciA9IGN1ciAtIHRhYmxlU2l6ZTsKKwkJCQkJCWkgPSAoaSArIDEpIC8gMjsKKwkJCQkJfQorCQkJCX0gd2hpbGUgKHN0YXJ0TG9jICYmIGkgPiAxKTsKKwkJCQlpZiAoaSA9PSAxCisJCQkJICAgICYmIChzdGFydExvYyA9IHJlYWRfcG9pbnRlcigmcHRyLAorCQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHRyICsgdGFibGVTaXplLAorCQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGRyWzNdLCAwLAorCQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGxvbmcpaGRyKSkgIT0gMAorCQkJCSAgICAmJiBwYyA+PSBzdGFydExvYykKKwkJCQkJZmRlID0gKHZvaWQgKilyZWFkX3BvaW50ZXIoJnB0ciwKKwkJCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgcHRyICsgdGFibGVTaXplLAorCQkJCQkgICAgICAgICAgICAgICAgICAgICAgICAgICBoZHJbM10sIDAsCisJCQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKWhkcik7CisJCQl9CisJCX0KKwkJaWYoaGRyICYmICFmZGUpCisJCQlkcHJpbnRrKDMsICJCaW5hcnkgbG9va3VwIGZvciAlbHggZmFpbGVkLiIsIHBjKTsKKworCQlpZiAoZmRlICE9IE5VTEwpIHsKKwkJCWNpZSA9IGNpZV9mb3JfZmRlKGZkZSwgdGFibGUpOwogCQkJcHRyID0gKGNvbnN0IHU4ICopKGZkZSArIDIpOwotCQkJc3RhcnRMb2MgPSByZWFkX3BvaW50ZXIoJnB0ciwKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgIChjb25zdCB1OCAqKShmZGUgKyAxKSArICpmZGUsCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICBwdHJUeXBlKTsKLQkJCWVuZExvYyA9IHN0YXJ0TG9jCi0JCQkgICAgICAgICArIHJlYWRfcG9pbnRlcigmcHRyLAotCQkJICAgICAgICAgICAgICAgICAgICAgICAgKGNvbnN0IHU4ICopKGZkZSArIDEpICsgKmZkZSwKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgIHB0clR5cGUgJiBEV19FSF9QRV9pbmRpcmVjdAotCQkJICAgICAgICAgICAgICAgICAgICAgICAgPyBwdHJUeXBlCi0JCQkgICAgICAgICAgICAgICAgICAgICAgICA6IHB0clR5cGUgJiAoRFdfRUhfUEVfRk9STXxEV19FSF9QRV9zaWduZWQpKTsKLQkJCWlmIChwYyA+PSBzdGFydExvYyAmJiBwYyA8IGVuZExvYykKLQkJCQlicmVhazsKLQkJCWNpZSA9IE5VTEw7CisJCQlpZihjaWUgIT0gTlVMTAorCQkJICAgJiYgY2llICE9ICZiYWRfY2llCisJCQkgICAmJiBjaWUgIT0gJm5vdF9mZGUKKwkJCSAgICYmIChwdHJUeXBlID0gZmRlX3BvaW50ZXJfdHlwZShjaWUpKSA+PSAwCisJCQkgICAmJiByZWFkX3BvaW50ZXIoJnB0ciwKKwkJCSAgICAgICAgICAgICAgICAgICAoY29uc3QgdTggKikoZmRlICsgMSkgKyAqZmRlLAorCQkJICAgICAgICAgICAgICAgICAgIHB0clR5cGU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90X2ZkZQorCQkJCSAgICB8fCAocHRyVHlwZSA9IGZkZV9wb2ludGVyX3R5cGUoY2llKSkgPCAwKQorCQkJCQljb250aW51ZTsKKwkJCQlwdHIgPSAoY29uc3QgdTggKikoZmRlICsgMik7CisJCQkJc3RhcnRMb2MgPSByZWFkX3BvaW50ZXIoJnB0ciwKKwkJCQkgICAgICAgICAgICAgICAgICAgICAgICAoY29uc3QgdTggKikoZmRlICsgMSkgKyAqZmRlLAorCQkJCSAgICAgICAgICAgICAgICAgICAgICAgIHB0clR5cGUsIDAsIDApOworCQkJCWlmICghc3RhcnRMb2MpCisJCQkJCWNvbnRpbnVlOworCQkJCWlmICghKHB0clR5cGUgJiBEV19FSF9QRV9pbmRpcmVjdCkpCisJCQkJCXB0clR5cGUgJj0gRFdfRUhfUEVfRk9STXxEV19FSF9QRV9zaWduZWQ7CisJCQkJZW5kTG9jID0gc3RhcnRMb2MKKwkJCQkgICAgICAgICArIHJlYWRfcG9pbnRlcigmcHRyLAorCQkJCSAgICAgICAgICAgICAgICAgICAgICAgIChjb25zdCB1OCAqKShmZGUgKyAxKSArICpmZGUsCisJCQkJICAgICAgICAgICAgICAgICAgICAgICAgcHRyVHlwZSwgMCwgMCk7CisJCQkJaWYgKHBjID49IHN0YXJ0TG9jICYmIHBjIDwgZW5kTG9jKQorCQkJCQlicmVhazsKKwkJCX0KKwkJCWlmKCFmZGUpCisJCQkJZHByaW50aygzLCAiTGluZWFyIGxvb2t1cCBmb3IgJWx4IGZhaWxlZC4iLCBwYyk7CiAJCX0KIAl9CiAJaWYgKGNpZSAhPSBOVUxMKSB7CkBAIC02ODYsNiArMTAwMSw4IEBACiAJCQlpZiAocHRyID49IGVuZCB8fCAqcHRyKQogCQkJCWNpZSA9IE5VTEw7CiAJCX0KKwkJaWYoIWNpZSkKKwkJCWRwcmludGsoMSwgIkNJRSB1bnVzYWJsZSAoJXAsJXApLiIsIHB0ciwgZW5kKTsKIAkJKytwdHI7CiAJfQogCWlmIChjaWUg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CiAJCQkgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGxvbmcgKikoVU5XX0ZQKGZyYW1lKQotCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgRlJBTUVfTElOS19PRkZTRVQpKQorCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgRlJBTUVfTElOS19PRkZTRVQpLAorCQkJCQkJICBsaW5rKQogIyBpZiBGUkFNRV9SRVRBRERSX09GRlNFVCA8IDAKIAkJCSAgICYmIGxpbmsgPiBib3R0b20gJiYgbGluayA8IFVOV19GUChmcmFtZSkKICMgZWxzZQogCQkJICAgJiYgbGluayA+IFVOV19GUChmcmFtZSkgJiYgbGluayA8IGJvdHRvbQogIyBlbmRpZgogCQkJICAgJiYgIShsaW5rICYgKHNpemVvZihsaW5rKSAtIDEpKQotCQkJICAgJiYgIV9fZ2V0X3VzZXIoVU5XX1BDKGZyYW1lKSwKKwkJCSAgICYmICFwcm9iZV9rZXJuZWxfYWRkcmVzcygKIAkJCSAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nICopKFVOV19GUChmcmFtZSkKLQkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsgRlJBTUVfUkVUQUREUl9PRkZTRVQpKSkgeworCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyBGUkFNRV9SRVRBRERSX09GRlNFVCksIFVOV19QQyhmcmFtZSkpKSB7CiAJCQkJVU5XX1NQKGZyYW1lKSA9IFVOV19GUChmcmFtZSkgKyBGUkFNRV9SRVRBRERSX09GRlNFVAogIyBpZiBGUkFNRV9SRVRBRERSX09GRlNFVCA8IDAKIAkJCQkJLQpAQCAtNzc1LDggKzExMDUsMTEgQEAKIAkgICB8fCBzdGF0ZS5yZWdzW3JldEFkZHJSZWddLndoZXJlID09IE5vd2hlcmUKIAkgICB8fCBzdGF0ZS5jZmEucmVnID49IEFSUkFZX1NJWkUocmVnX2luZm8pCiAJICAgf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gICAgICAgICAgIG1hcHBpbmctPnByaXZhdGVfbG9jayAoaW4gX19zZXRfcGFnZV9kaXJ0eV9idWZmZXJzKQotICogICAgICAgICAgICAgaW5vZGVfbG9jayAoaW4gc2V0X3BhZ2VfZGlydHkncyBfX21hcmtfaW5vZGVfZGlydHkpCi0gKiAgICAgICAgICAgICAgIHNiX2xvY2sgKHdpdGhpbiBpbm9kZV9sb2NrIGluIGZzL2ZzLXdyaXRlYmFjay5jKQotICogICAgICAgICAgICAgICBtYXBwaW5nLT50cmVlX2xvY2sgKHdpZGVseSB1c2VkLCBpbiBzZXRfcGFnZV9kaXJ0eSwKLSAqICAgICAgICAgICAgICAgICAgICAgICAgIGluIGFyY2gtZGVwZW5kZW50IGZsdXNoX2RjYWNoZV9tbWFwX2xvY2ssCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoaW4gaW5vZGVfbG9jayBpbiBfX3N5bmNfc2luZ2xlX2lub2RlKQorICogICBpbm9kZS0+aV9hbGxvY19zZW0gKHZtdHJ1bmNhdGVfcmFuZ2UpCisgKiAgIG1tLT5tbWFwX3NlbQorICogICAgIHBhZ2UtPmZsYWdzIFBHX2xvY2tlZCAobG9ja19wYWdlKQorICogICAgICAgbWFwcGluZy0+aV9tbWFwX2xvY2sKKyAqICAgICAgICAgYW5vbl92bWEtPmxvY2sKKyAqICAgICAgICAgICBtbS0+cGFnZV90YWJsZV9sb2NrIG9yIHB0ZV9sb2NrCisgKiAgICAgICAgICAgICB6b25lLT5scnVfbG9jayAoaW4gbWFya19wYWdlX2FjY2Vzc2VkLCBpc29sYXRlX2xydV9wYWdlKQorICogICAgICAgICAgICAgc3dhcF9sb2NrIChpbiBzd2FwX2R1cGxpY2F0ZSwgc3dhcF9pbmZvX2dldCkKKyAqICAgICAgICAgICAgICAgbW1saXN0X2xvY2sgKGluIG1tcHV0LCBkcmFpbl9tbWxpc3QgYW5kIG90aGVycykKKyAqICAgICAgICAgICAgICAgbWFwcGluZy0+cHJpdmF0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ShfX2JlMzIgZHN0X2lwLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbXBvYV9jbGllbnQgKmNsaWVudCk7Ci0gICAgICAgIGluX2NhY2hlX2VudHJ5ICooKmdldCkodWludDMyX3QgZHN0X2lwLCBzdHJ1Y3QgbXBvYV9jbGllbnQgKmNsaWVudCk7Ci0gICAgICAgIGluX2NhY2hlX2VudHJ5ICooKmdldF93aXRoX21hc2spKHVpbnQzMl90IGRzdF9pcCwgCisgICAgICAgIGluX2NhY2hlX2VudHJ5ICooKmdldCkoX19iZTMyIGRzdF9pcCwgc3RydWN0IG1wb2FfY2xpZW50ICpjbGllbnQpOworICAgICAgICBpbl9jYWNoZV9lbnRyeSAqKCpnZXRfd2l0aF9tYXNrKShfX2JlMzIgZHN0X2lwLAogCQkJCQkgc3RydWN0IG1wb2FfY2xpZW50ICpjbGllbnQsCi0JCQkJCSB1aW50MzJfdCBtYXNrKTsKKwkJCQkJIF9fYmUzMiBtYXNrKTsKICAgICAgICAgaW5fY2FjaGVfZW50cnkgKigqZ2V0X2J5X3ZjYykoc3RydWN0IGF0bV92Y2MgKnZjYywgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtcG9hX2NsaWVudCAqY2xpZW50KTsKICAgICAgICAgdm9pZCAgICAgICAgICAgICgqcHV0KShpbl9jYWNoZV9lbnRyeSAqZW50cnkpOwpAQCAtNTYsMTcgKzU2LDE3IEBACiAgICAgICAgIHN0cnVjdCBhdG1fdmNjICAgICAgICpzaG9ydGN1dDsKICAgICAgICAgdWludDMyX3QgICAgICAgICAgICAgcGFja2V0c19yY3ZkOwogICAgICAgICB1aW50MTZfdCAgICAgICAgICAgICBlbnRyeV9zdGF0ZTsKLSAgICAgICAgdWludDMyX3QgICAgICAgICAgICAgbGF0ZXN0X2lwX2FkZHI7ICAgIC8qIFRoZSBzcmMgSVAgYWRkcmVzcyBvZiB0aGUgbGFzdCBw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yIKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIEZ1bmN0aW9ucwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiBBc3N1bWUgYnMgaXMgYWxpZ25lZCAmJiB2IDwgMTYzODQgKi8KLXVuc2lnbmVkIGdldF9sZW4oYml0c3RyX3QgKiBicykKLXsKLQl1bnNpZ25lZCB2OwotCi0JdiA9ICpicy0+Y3VyKys7Ci0KLQlpZiAodiAmIDB4ODApIHsKLQkJdiAmPSAweDNmOwotCQl2IDw8PSA4OwotCQl2ICs9ICpicy0+Y3VyKys7Ci0JfQotCi0JcmV0dXJuIHY7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdW5zaWduZWQgZ2V0X2JpdChiaXRzdHJfdCAqIGJzKQotewotCXVuc2lnbmVkIGIgPSAoKmJzLT5jdXIpICYgKDB4ODAgPj4gYnMtPmJpdCk7Ci0KLQlJTkNfQklUKGJzKTsKLQotCXJldHVybiBiOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qIEFzc3VtZSBiIDw9IDggKi8KLXVuc2lnbmVkIGdldF9iaXRzKGJpdHN0cl90ICogYnMsIHVuc2lnbmVkIGIpCi17Ci0JdW5zaWduZWQgdiwgbDsKLQotCXYgPSAoKmJzLT5jdXIpICYgKDB4ZmZVID4+IGJzLT5iaXQpOwotCWwgPSBiICsgYnMtPmJpdDsKLQotCWlmIChsIDwgOCkgewotCQl2ID4+PSA4IC0gbDsKLQkJYnMtPmJpdCA9IGw7Ci0JfSBlbHNlIGlmIChsID09IDgp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Ql2IHw9ICgqYnMtPmN1cikgPj4gKDggLSBicy0+Yml0KTsKLQkJfQotCi0JCWJzLT5iaXQgPSBsICYgMHg3OwotCX0KLQotCXYgJj0gMHhmZmZmZmZmZiA8PCAoMzIgLSBiKTsKLQotCXJldHVybiB2OwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogQXNzdW1lIGJzIGlzIGFsaWduZWQgYW5kIHNpemVvZih1bnNpZ25lZCBpbnQpID09IDQKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdW5zaWduZWQgZ2V0X3VpbnQoYml0c3RyX3QgKiBicywgaW50IGIpCi17Ci0JdW5zaWduZWQgdiA9IDA7Ci0KLQlzd2l0Y2ggKGIpIHsKLQljYXNlIDQ6Ci0JCXYgfD0gKmJzLT5jdXIrKzsKLQkJdiA8PD0gODsKLQljYXNlIDM6Ci0JCXYgfD0gKmJzLT5jdXIrKzsKLQkJdiA8PD0gODsKLQljYXNlIDI6Ci0JCXYgfD0gKmJzLT5jdXIrKzsKLQkJdiA8PD0gODsKLQljYXNlIDE6Ci0JCXYgfD0gKmJzLT5jdXIrKzsKLQkJYnJlYWs7Ci0JfQotCXJldHVybiB2OwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLWludCBkZWNvZGVfbnVsKGJpdHN0cl90ICogYnMsIGZpZWxkX3QgKiBmLCBjaGFyICpiYXNlLCBpbnQgbGV2ZWwpCi17Ci0JUFJJTlQoIiUqLnMlc1xuIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKLQotCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IGRlY29kZV9ib29sKGJpdHN0cl90ICogYnMsIGZpZWxkX3QgKiBmLCBjaGFyICpiYXNlLCBpbnQgbGV2ZWwpCi17Ci0JUFJJTlQoIiUqLnMlc1xuIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKLQotCUlOQ19CSVQoYnMpOwotCi0JQ0hFQ0tfQk9VTkQoYnMsIDApOwotCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IGRlY29kZV9vaWQoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCkKLXsKLQlpbnQgbGVuOwotCi0JUFJJTlQoIiUqLnMlc1xuIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKLQotCUJZVEVfQUxJR04oYnMpOwotCUNIRUNLX0JPVU5EKGJzLCAxKTsKLQlsZW4gPSAqYnMtPmN1cisrOwotCWJzLT5jdXIgKz0gbGVuOwotCi0JQ0hFQ0tfQk9VTkQoYnMsIDApOwotCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IGRlY29kZV9pbnQoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCkKLXsKLQl1bnNpZ25lZCBsZW47Ci0KLQlQUklOVCgiJSoucyVzIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKLQotCXN3aXRjaCAoZi0+c3opIHsKLQljYX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SBsZW4gJiA3OwotCi0JQ0hFQ0tfQk9VTkQoYnMsIDApOwotCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IGRlY29kZV9udW1zdHIoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCkKLXsKLQl1bnNpZ25lZCBsZW47Ci0KLQlQUklOVCgiJSoucyVzXG4iLCBsZXZlbCAqIFRBQl9TSVpFLCAiICIsIGYtPm5hbWUpOwotCi0JLyogMiA8PSBSYW5nZSA8PSAyNTUgKi8KLQlsZW4gPSBnZXRfYml0cyhicywgZi0+c3opICsgZi0+bGI7Ci0KLQlCWVRFX0FMSUdOKGJzKTsKLQlJTkNfQklUUyhicywgKGxlbiA8PCAyKSk7Ci0KLQlDSEVDS19CT1VORChicywgMCk7Ci0JcmV0dXJuIEgzMjNfRVJST1JfTk9ORTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQgZGVjb2RlX29jdHN0cihiaXRzdHJfdCAqIGJzLCBmaWVsZF90ICogZiwgY2hhciAqYmFzZSwgaW50IGxldmVsKQotewotCXVuc2lnbmVkIGxlbjsKLQotCVBSSU5UKCIlKi5zJXMiLCBsZXZlbCAqIFRBQl9TSVpFLCAiICIsIGYtPm5hbWUpOwotCi0Jc3dpdGNoIChmLT5zeikgewotCWNhc2UgRklYRDoJCS8qIFJhbmdlID09IDEgKi8KLQkJaWYgKGYtPmxiID4gMikgewotCQkJQllURV9BTElHTihicyk7Ci0JCQlpZiAoYmFzZSAmJiAoZi0+YXR0ciAmIERFQ09ERSkpIHsKLQkJCQkvKiBUaGUgSVAgQWRkcmVzcyAqLwotCQkJCUlGVEhFTihmLT5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gLTY0LDcgKzY0LDcgQEAKIAogI2RlZmluZSBTTk1QX1BPUlQgMTYxCiAjZGVmaW5lIFNOTVBfVFJBUF9QT1JUIDE2MgotI2RlZmluZSBOT0NUMShuKSAodV9pbnQ4X3QgKSgobikgJiAweGZmKQorI2RlZmluZSBOT0NUMShuKSAoKih1OCAqKW4pCiAKIHN0YXRpYyBpbnQgZGVidWc7CiBzdGF0aWMgREVGSU5FX1NQSU5MT0NLKHNubXBfbG9jayk7CkBAIC02MTMsNyArNjEzLDcgQEAKIHN0YXRpYyBpbmxpbmUgdm9pZCBtYW5nbGVfYWRkcmVzcyh1bnNpZ25lZCBjaGFyICpiZWdpbiwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICphZGRyLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0cnVjdCBvY3QxX21hcCAqbWFwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVfaW50MTZfdCAqY2hlY2spOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fc3VtMTYgKmNoZWNrKTsKIHN0cnVjdCBzbm1wX2NudgogewogCXVuc2lnbmVkIGludCBjbGFzczsKQEAgLTg3MywzOCArODczLDI0IEBACiAgKiBGYXN0IGNoZWNrc3VtIHVwZGF0ZSBmb3IgcG9zc2libHkgb2RkbHktYWxpZ25lZCBVRFAgYnl0ZSwgZnJvbSB0aGUKICAqIGNvZGUgZXhhbXBsZSBpbiB0aGUgZHJhZnQuCiAgKi8KLXN0YXRpYyB2b2lkIGZhc3RfY3N1bSh1bnNpZ25lZCBjaGFyICpjc3VtLAorc3RhdGljIHZvaWQgZmFzdF9jc3VtKF9fc3VtMTYgKmNzdW0sCiAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdW5zaWduZWQgY2hhciAqb3B0ciwKICAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1bnNpZ25lZCBjaGFyICpucHRyLA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qYWRkciwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHJ1Y3Qgb2N0MV9tYXAgKm1hcCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1X2ludDE2X3QgKmNoZWNrKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fc3VtMTYgKmNoZWNrKQogewotCWlmIChtYXAtPmZyb20gPT0gTk9DVDEoKmFkZHIpKSB7CisJaWYgKG1hcC0+ZnJvbSA9PSBOT0NUMShhZGRyKSkgewogCQl1X2ludDMyX3Qgb2xkOwogCQkKIAkJaWYgKGRlYnVnKQpAQCAtOTI3LDExICs5MTMsOCBAQAogCQkKIAkJLyogVXBkYXRlIFVEUCBjaGVja3N1bSBpZiBiZWluZyB1c2VkICovCiAJCWlmICgqY2hlY2spIHsKLQkJCXVuc2lnbmVkIGNoYXIgb2RkID0gISgoYWRkciAtIGJlZ2luKSAlIDIpOwotCQkJCi0JCQlmYXN0X2NzdW0oKHVuc2lnbmVkIGNoYXIgKiljaGVjaywKLQkJCSAgICAgICAgICAmbWFwLT5mcm9tLCAmbWFwLT50bywgb2RkKTsKLQkJCSAgICAgICAgICAKKwkJCWZhc3RfY3N1bShjaGVjaywKKwkJCSAgICAgICAgICAmbWFwLT5mcm9tLCAmbWFwLT50bywgYWRkciAtIGJlZ2luKTsKIAkJfQogCQkKIAkJaWYgKGRlYnVnKQpAQCAtOTQzLDcgKzkyNiw3IEBACiBzdGF0aWMgdW5zaWduZWQgY2hhciBzbm1wX3RyYXBfZGVjb2RlKHN0cnVjdCBhc24xX2N0eCAqY3R4LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qgc25tcF92MV90cmFwICp0cmFwLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHJ1Y3Qgb2N0MV9tYXAgKm1hcCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdV9pbnQxNl90ICpjaGVjaykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX19zdW0xNiAqY2hlY2spCiB7CiAJdW5zaWduZWQgaW50IGNscywgY29uLCB0YWcsIGxlbjsKIAl1bnNpZ25lZCBjaGFyICplbmQ7CkBAIC0xMDM3LDcgKzEwMjAsNyBAQAogc3RhdGljIGludCBzbm1wX3BhcnNlX21hbmdsZSh1bnNpZ25lZCBjaGFyICptc2csCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVfaW50MTZfdCBsZW4sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0cnVjdCBvY3QxX21hcCAqbWFwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1X2ludDE2X3QgKmNoZWNrKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX3N1bTE2ICpjaGVjaykKIHsKIAl1bnNpZ25lZCBjaGFyICplb2MsICplbmQ7CiAJdW5zaWduZWQgaW50IGNscywgY29uLCB0YWcsIHZlcnMsIHBkdXR5cGU7CkBAIC0xMjIzLDEyICsxMjA2LDEyIEBACiAJICovCiAJaWYgKGRpciA9PSBJUF9DVF9ESVJfT1JJR0lOQUwpIHsKIAkJLyogU05BVCB0cmFwcyAqLwotCQltYXAuZnJvbSA9IE5PQ1QxKGN0LT50dXBsZWhhc2hbSVBfQ1RfRElSX09SSUdJTkFMXS50dXBsZS5zcmMuaXApOwotCQltYXAudG8gPSBOT0NUMShjdC0+dHVwbGVoYXNoW0lQX0NUX0RJUl9SRVBMWV0udHVwbGUuZHN0LmlwKTsKKwkJbWFwLmZyb20gPSBOT0NUMSgmY3QtPnR1cGxlaGFzaFtJUF9DVF9ESVJfT1JJR0lOQUxdLnR1cGxlLnNyYy5pcCk7CisJCW1hcC50byA9IE5PQ1QxKCZjdC0+dHVwbGVoYXNoW0lQX0NUX0RJUl9SRVBMWV0udHVwbGUuZHN0LmlwKTsKIAl9IGVsc2Ugewog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JT04oaGFzaCkpCisJCXJldHVybiAwOworCWlmIChjdC0+dHVwbGVoYXNoW0lQX0NUX0RJUl9PUklHSU5BTF0udHVwbGUuc3JjLmwzbnVtICE9IEFGX0lORVQpCisJCXJldHVybiAwOworCisJbDNwcm90byA9IF9fbmZfY3RfbDNwcm90b19maW5kKGN0LT50dXBsZWhhc2hbSVBfQ1RfRElSX09SSUdJTkFMXQorCQkJCSAgICAgICAudHVwbGUuc3JjLmwzbnVtKTsKKwlORl9DVF9BU1NFUlQobDNwcm90byk7CisJbDRwcm90byA9IF9fbmZfY3RfbDRwcm90b19maW5kKGN0LT50dXBsZWhhc2hbSVBfQ1RfRElSX09SSUdJTkFMXQorCQkJCSAgICAgICAudHVwbGUuc3JjLmwzbnVtLAorCQkJCSAgICAgICBjdC0+dHVwbGVoYXNoW0lQX0NUX0RJUl9PUklHSU5BTF0KKwkJCQkgICAgICAgLnR1cGxlLmRzdC5wcm90b251bSk7CisJTkZfQ1RfQVNTRVJUKGw0cHJvdG8pOworCisJaWYgKHNlcV9wcmludGYocywgIiUtOHMgJXUgJWxkICIsCisJCSAgICAgIGw0cHJvdG8tPm5hbWUsCisJCSAgICAgIGN0LT50dXBsZWhhc2hbSVBfQ1RfRElSX09SSUdJTkFMXS50dXBsZS5kc3QucHJvdG9udW0sCisJCSAgICAgIHRpbWVyX3BlbmRpbmcoJmN0LT50aW1lb3V0KQorCQkgICAgICA/IChsb25nKShjdC0+dGltZW91dC5leHBpcmVzIC0gamlmZmllcykvSFogOiAwKSAhPSAwKQorCQlyZXR1cm4gLUVOT1NQQzsKKworCWlmIChsM3Byb3RvLT5wcmludF9jb25udHJhY2socywgY3QpKQorCQlyZXR1cm4gLUVOT1NQQzsKKworCWlmIChsNHByb3RvLT5wcmludF9jb25udHJhY2socywgY3QpKQorCQlyZXR1cm4gLUVOT1NQQzsKKworCWlmIChwcmludF90dXBsZShzLCAmY3QtPnR1cGxlaGFzaFtJUF9DVF9ESVJfT1JJR0lOQUxdLnR1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5pcC5paGwqNCwKKwkgICAgICAgICAgICAgICAgICAgICAodV9pbnQxNl90KUFGX0lORVQsCisJICAgICAgICAgICAgICAgICAgICAgaW5zaWRlLT5pcC5wcm90b2NvbCwKKwkgICAgICAgICAgICAgICAgICAgICAmaW5uZXIsCisJICAgICAgICAgICAgICAgICAgICAgbDNwcm90bywKKwkJCSAgICAgX19uZl9jdF9sNHByb3RvX2ZpbmQoKHVfaW50MTZfdClQRl9JTkVULAorCQkJICAgICAJCQkgIGluc2lkZS0+aXAucHJvdG9jb2wpKSkKKwkJcmV0dXJuIDA7CisKKwkvKiBDaGFuZ2UgaW5uZXIgYmFjayB0byBsb29rIGxpa2UgaW5jb21pbmcgcGFja2V0LiAgV2UgZG8gdGhlCisJICAgb3Bwb3NpdGUgbWFuaXAgb24gdGhpcyBob29rIHRvIG5vcm1hbCwgYmVjYXVzZSBpdCBtaWdodCBub3QKKwkgICBwYXNzIGFsbCBob29rcyAobG9jYWxseS1nZW5lcmF0ZWQgSUNNUCkuICBDb25zaWRlciBpbmNvbWluZworCSAgIHBhY2tldDogUFJFUk9VVElORyAoRFNUIG1hbmlwKSwgcm91dGluZyBwcm9kdWNlcyBJQ01QLCBnb2VzCisJICAgdGhyb3VnaCBQT1NUUk9VVElORyAod2hpY2ggbXVzdCBjb3JyZWN0IHRoZSBEU1QgbWFuaXApLiAqLworCWlmICghbWFuaXBfcGt0KGluc2lkZS0+aXAucHJvdG9jb2wsIHBza2IsCisJCSAgICAgICAoKnBza2IpLT5uaC5pcGgtPmlobCo0ICsgc2l6ZW9mKGluc2lkZS0+aWNtcCksCisJCSAgICAgICAmY3QtPnR1cGxlaGFzaFshZGlyXS50dXBsZSwKKwkJICAgICAgICFtYW5pcCkpCisJCXJldHVybiAwOworCisJaWYgKCgqcHNrYiktPmlwX3N1bW1lZCAhPSBDSEVDS1NVTV9QQVJUSUFMKSB7CisJCS8qIFJlbG9hZGluZyAiaW5zaWRlIiBoZXJlIHNpbmNlIG1hbmlwX3Br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ybiAwOworCX0KKworCS8qIE1vZGlmeSBzaWduYWwgKi8KKwlpZiAoIXNldF9oMjI1X2FkZHIocHNrYiwgZGF0YSwgZGF0YW9mZiwgdGFkZHIsCisJCQkgICAmY3QtPnR1cGxlaGFzaFshZGlyXS50dXBsZS5kc3QudTMsCisJCQkgICBodG9ucyhuYXRlZF9wb3J0KSkgPT0gMCkgeworCQluZl9jb25udHJhY2tfdW5leHBlY3RfcmVsYXRlZChleHApOworCQlyZXR1cm4gLTE7CisJfQorCisJLyogU3VjY2VzcyAqLworCURFQlVHUCgibmZfbmF0X3E5MzE6IGV4cGVjdCBDYWxsIEZvcndhcmRpbmcgIgorCSAgICAgICAiJXUuJXUuJXUuJXU6JWh1LT4ldS4ldS4ldS4ldTolaHVcbiIsCisJICAgICAgIE5JUFFVQUQoZXhwLT50dXBsZS5zcmMuaXApLCBudG9ocyhleHAtPnR1cGxlLnNyYy51LnRjcC5wb3J0KSwKKwkgICAgICAgTklQUVVBRChleHAtPnR1cGxlLmRzdC5pcCksIG50b2hzKGV4cC0+dHVwbGUuZHN0LnUudGNwLnBvcnQpKTsKKworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgX19pbml0IGluaXQodm9pZCkKK3sKKwlCVUdfT04ocmN1X2RlcmVmZXJlbmNlKHNldF9oMjQ1X2FkZHJfaG9vaykgIT0gTlVMTCk7CisJQlVHX09OKHJjdV9kZXJlZmVyZW5jZShzZXRfaDIyNV9hZGRyX2hvb2spICE9IE5VTEwpOworCUJVR19PTihyY3VfZGVyZWZlcmVuY2Uoc2V0X3NpZ19hZGRyX2hvb2spICE9IE5VTEwpOworCUJVR19PTihyY3VfZGVyZWZlcmVuY2Uoc2V0X3Jhc19hZGRyX2hvb2spICE9IE5VTEwpOworCUJVR19PTihyY3VfZGVyZWZlcmVuY2UobmF0X3J0cF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itzdGF0aWMgaW50IGlwdF9zbmF0X2NoZWNrZW50cnkoY29uc3QgY2hhciAqdGFibGVuYW1lLAorCQkJICAgICAgIGNvbnN0IHZvaWQgKmVudHJ5LAorCQkJICAgICAgIGNvbnN0IHN0cnVjdCB4dF90YXJnZXQgKnRhcmdldCwKKwkJCSAgICAgICB2b2lkICp0YXJnaW5mbywKKwkJCSAgICAgICB1bnNpZ25lZCBpbnQgaG9va19tYXNrKQoreworCXN0cnVjdCBuZl9uYXRfbXVsdGlfcmFuZ2VfY29tcGF0ICptciA9IHRhcmdpbmZvOworCisJLyogTXVzdCBiZSBhIHZhbGlkIHJhbmdlICovCisJaWYgKG1yLT5yYW5nZXNpemUgIT0gMSkgeworCQlwcmludGsoIlNOQVQ6IG11bHRpcGxlIHJhbmdlcyBubyBsb25nZXIgc3VwcG9ydGVkXG4iKTsKKwkJcmV0dXJuIDA7CisJfQorCXJldHVybiAxOworfQorCitzdGF0aWMgaW50IGlwdF9kbmF0X2NoZWNrZW50cnkoY29uc3QgY2hhciAqdGFibGVuYW1lLAorCQkJICAgICAgIGNvbnN0IHZvaWQgKmVudHJ5LAorCQkJICAgICAgIGNvbnN0IHN0cnVjdCB4dF90YXJnZXQgKnRhcmdldCwKKwkJCSAgICAgICB2b2lkICp0YXJnaW5mbywKKwkJCSAgICAgICB1bnNpZ25lZCBpbnQgaG9va19tYXNrKQoreworCXN0cnVjdCBuZl9uYXRfbXVsdGlfcmFuZ2VfY29tcGF0ICptciA9IHRhcmdpbmZvOworCisJLyogTXVzdCBiZSBhIHZhbGlkIHJhbmdlICovCisJaWYgKG1yLT5yYW5nZXNpemUgIT0gMSkgeworCQlwcmludGsoIkROQVQ6IG11bHRpcGxlIHJhbmdlcyBubyBsb25nZXIgc3VwcG9ydGVkXG4iKTsKKwkJcmV0dXJuIDA7CisJfQorCXJldHVybiAxOworfQorCitpbmxpbmUgdW5zaWduZWQgaW50CithbGxvY19udWxsX2JpbmRpbmcoc3RydWN0IG5mX2Nvb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Kwl1X2ludDhfdCB0bzsKK307CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQmFzaWMgQVNOLjEgZGVjb2Rpbmcgcm91dGluZXMgKGd4c25tcCBhdXRob3IgRGlyayBXaXNzZSkKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIENsYXNzICovCisjZGVmaW5lIEFTTjFfVU5JCTAJLyogVW5pdmVyc2FsICovCisjZGVmaW5lIEFTTjFfQVBMCTEJLyogQXBwbGljYXRpb24gKi8KKyNkZWZpbmUgQVNOMV9DVFgJMgkvKiBDb250ZXh0ICovCisjZGVmaW5lIEFTTjFfUFJWCTMJLyogUHJpdmF0ZSAqLworCisvKiBUYWcgKi8KKyNkZWZpbmUgQVNOMV9FT0MJMAkvKiBFbmQgT2YgQ29udGVudHMgKi8KKyNkZWZpbmUgQVNOMV9CT0wJMQkvKiBCb29sZWFuICovCisjZGVmaW5lIEFTTjFfSU5UCTIJLyogSW50ZWdlciAqLworI2RlZmluZSBBU04xX0JUUwkzCS8qIEJpdCBTdHJpbmcgKi8KKyNkZWZpbmUgQVNOMV9PVFMJNAkvKiBPY3RldCBTdHJpbmcgKi8KKyNkZWZpbmUgQVNOMV9OVUwJNQkvKiBOdWxsICovCisjZGVmaW5lIEFTTjFfT0pJCTYJLyogT2JqZWN0IElkZW50aWZpZXIgICovCisjZGVmaW5lIEFTTjFfT0pECTcJLyogT2JqZWN0IERlc2NyaXB0aW9uICovCisjZGVmaW5lIEFTTjFfRVhUCTgJLyogRXh0ZXJuYWwgKi8KKyNkZWZpbmUgQVNOMV9TRVEJMTYJLyogU2VxdWVuY2UgKi8KKyNkZWZpbmUgQVNOMV9TRVQJMTcJLyogU2V0ICovCisjZGVmaW5lIEFTTjFfTlVNU1RSCTE4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KKwl1bnNpZ25lZCBjaGFyIGNoOworCisJKnRhZyA9IDA7CisKKwlkbworCXsKKwkJaWYgKCFhc24xX29jdGV0X2RlY29kZShjdHgsICZjaCkpCisJCQlyZXR1cm4gMDsKKwkJKnRhZyA8PD0gNzsKKwkJKnRhZyB8PSBjaCAmIDB4N0Y7CisJfSB3aGlsZSAoKGNoICYgMHg4MCkgPT0gMHg4MCk7CisJcmV0dXJuIDE7Cit9CisKK3N0YXRpYyB1bnNpZ25lZCBjaGFyIGFzbjFfaWRfZGVjb2RlKHN0cnVjdCBhc24xX2N0eCAqY3R4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpjbHMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmNvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqdGFnKQoreworCXVuc2lnbmVkIGNoYXIgY2g7CisKKwlpZiAoIWFzbjFfb2N0ZXRfZGVjb2RlKGN0eCwgJmNoKSkKKwkJcmV0dXJuIDA7CisKKwkqY2xzID0gKGNoICYgMHhDMCkgPj4gNjsKKwkqY29uID0gKGNoICYgMHgyMCkgPj4gNTsKKwkqdGFnID0gKGNoICYgMHgxRik7CisKKwlpZiAoKnRhZyA9PSAweDFGKSB7CisJCWlmICghYXNuMV90YWdfZGVjb2RlKGN0eCwgdGFnKSkKKwkJCXJldHVybiAwOworCX0KKwlyZXR1cm4gMTsKK30KKworc3RhdGljIHVuc2lnbmVkIGNoYXIgYXNuMV9sZW5ndGhfZGVjb2RlKHN0cnVjdCBhc24xX2N0eCAqY3R4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGVmLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqbGVuKQoreworCXVuc2lnbmVkIGNoYXIgY2gsIGNudDsKKworCWlmICghYXNuMV9vY3RldF9kZWNvZGUoY3R4LCAmY2gpKQorCQlyZXR1cm4gMDsKKworCWlmIChjaCA9PSAweDgwKQorCQkqZGVmID0gMDsKKwllbHNlIHsKKwkJKmRlZiA9IDE7CisKKwkJaWYgKGNoIDwgMHg4MCkKKwkJCSpsZW4gPSBjaDsKKwkJZWxzZSB7CisJCQljbnQgPSAodW5zaWduZWQgY2hhcikgKGNoICYgMHg3Rik7CisJCQkqbGVuID0gMDsKKworCQkJd2hpbGUgKGNudCA+IDApIHsKKwkJCQlpZiAoIWFzbjFfb2N0ZXRfZGVjb2RlKGN0eCwgJmNoKSkKKwkJCQkJcmV0dXJuIDA7CisJCQkJKmxlbiA8PD0gODsKKwkJCQkqbGVuIHw9IGNoOworCQkJCWNudC0tOworCQkJfQorCQl9CisJfQorCXJldHVybiAxOworfQorCitzdGF0aWMgdW5zaWduZWQgY2hhciBhc24xX2hlYWRlcl9kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqKmVvYywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmNscywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmNvbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKnRhZykKK3sKKwl1bnNpZ25lZCBpbnQgZGVmLCBsZW47CisKKwlpZiAoIWFzbjFfaWRfZGVjb2RlKGN0eCwgY2xzLCBjb24sIHRhZykpCisJCXJldHVybiAwOworCisJZGVmID0gbGVuID0gMDsKKwlpZiAoIWFzbjFfbGVuZ3RoX2RlY29kZShjdHgsICZkZWYsICZsZW4pKQorCQlyZXR1cm4gMDsKKworCWlmIChkZWYpCisJCSplb2MgPSBj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2lnbmVkIGNoYXIgKmVvYywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9uZyAqaW50ZWdlcikKK3sKKwl1bnNpZ25lZCBjaGFyIGNoOworCXVuc2lnbmVkIGludCAgbGVuOworCisJaWYgKCFhc24xX29jdGV0X2RlY29kZShjdHgsICZjaCkpCisJCXJldHVybiAwOworCisJKmludGVnZXIgPSAoc2lnbmVkIGNoYXIpIGNoOworCWxlbiA9IDE7CisKKwl3aGlsZSAoY3R4LT5wb2ludGVyIDwgZW9jKSB7CisJCWlmICgrK2xlbiA+IHNpemVvZiAobG9uZykpIHsKKwkJCWN0eC0+ZXJyb3IgPSBBU04xX0VSUl9ERUNfQkFEVkFMVUU7CisJCQlyZXR1cm4gMDsKKwkJfQorCisJCWlmICghYXNuMV9vY3RldF9kZWNvZGUoY3R4LCAmY2gpKQorCQkJcmV0dXJuIDA7CisKKwkJKmludGVnZXIgPDw9IDg7CisJCSppbnRlZ2VyIHw9IGNoOworCX0KKwlyZXR1cm4gMTsKK30KKworc3RhdGljIHVuc2lnbmVkIGNoYXIgYXNuMV91aW50X2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqZW9jLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmludGVnZXIpCit7CisJdW5zaWduZWQgY2hhciBjaDsKKwl1bnNpZ25lZCBpbnQgIGxlbjsKKworCWlmICghYXNuMV9vY3RldF9kZWNvZGUoY3R4LCAmY2gpKQorCQlyZXR1cm4gMDsKKworCSppbnRlZ2VyID0gY2g7CisJaWYgKGNoID09IDApIGxlbiA9IDA7CisJZWxzZSBsZW4gPSAxOworCisJd2hpbGUgKGN0eC0+cG9pbnRlciA8IGVvYykgeworCQlpZiAoKytsZW4gPiBzaXplb2YgKHVuc2lnbmVkIGludCkpIHsKKwkJCWN0eC0+ZXJyb3IgPSBBU04xX0VSUl9ERUNfQkFEVkFMVUU7CisJCQlyZXR1cm4gMDsKKwkJfQorCisJCWlmICghYXNuMV9vY3RldF9kZWNvZGUoY3R4LCAmY2gpKQorCQkJcmV0dXJuIDA7CisKKwkJKmludGVnZXIgPDw9IDg7CisJCSppbnRlZ2VyIHw9IGNoOworCX0KKwlyZXR1cm4gMTsKK30KKworc3RhdGljIHVuc2lnbmVkIGNoYXIgYXNuMV91bG9uZ19kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICplb2MsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICppbnRlZ2VyKQoreworCXVuc2lnbmVkIGNoYXIgY2g7CisJdW5zaWduZWQgaW50ICBsZW47CisKKwlpZiAoIWFzbjFfb2N0ZXRfZGVjb2RlKGN0eCwgJmNoKSkKKwkJcmV0dXJuIDA7CisKKwkqaW50ZWdlciA9IGNoOworCWlmIChjaCA9PSAwKSBsZW4gPSAwOworCWVsc2UgbGVuID0gMTsKKworCXdoaWxlIChjdHgtPnBvaW50ZXIgPCBlb2MpIHsKKwkJaWYgKCsrbGVuID4gc2l6ZW9mICh1bnNpZ25lZCBsb25nKSkgeworCQkJY3R4LT5lcnJvciA9IEFTTjFfRVJSX0RFQ19CQURWQUxVRTsKKwkJCXJldHVybiAwOworCQl9CisKKwkJaWYgKCFhc24xX29jdGV0X2RlY29kZShjdHgsICZjaCkpCisJCQlyZXR1cm4gMDsKKworCQkqaW50ZWdlciA8PD0gODsKKwkJKmludGVnZXIgfD0gY2g7CisJfQorCXJldHVybiAxOworfQorCitzdGF0aWMgdW5zaWduZWQgY2hhciBhc24xX29jdGV0c19kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqZW9jLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKipvY3RldHMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpsZW4pCit7CisJdW5zaWduZWQgY2hhciAqcHRyOworCisJKmxlbiA9IDA7CisKKwkqb2N0ZXRzID0ga21hbGxvYyhlb2MgLSBjdHgtPnBvaW50ZXIsIEdGUF9BVE9NSUMpOworCWlmICgqb2N0ZXRzID09IE5VTEwpIHsKKwkJaWYgKG5ldF9yYXRlbGltaXQoKSkKKwkJCXByaW50aygiT09NIGluIGJzYWxnICglZClcbiIsIF9fTElORV9fKTsKKwkJcmV0dXJuIDA7CisJfQorCisJcHRyID0gKm9jdGV0czsKKwl3aGlsZSAoY3R4LT5wb2ludGVyIDwgZW9jKSB7CisJCWlmICghYXNuMV9vY3RldF9kZWNvZGUoY3R4LCAodW5zaWduZWQgY2hhciAqKXB0cisrKSkgeworCQkJa2ZyZWUoKm9jdGV0cyk7CisJCQkqb2N0ZXRzID0gTlVMTDsKKwkJCXJldHVybiAwOworCQl9CisJCSgqbGVuKSsrOworCX0KKwlyZXR1cm4gMTsKK30KKworc3RhdGljIHVuc2lnbmVkIGNoYXIgYXNuMV9zdWJpZF9kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICpzdWJpZCkKK3sKKwl1bnNpZ25lZCBjaGFyIGNoOworCisJKnN1YmlkID0gMDsKKworCWRvIHsKKwkJaWYgKCFhc24xX29jdGV0X2RlY29kZShjdHgsICZjaCkpCisJCQlyZXR1cm4gMDsKKworCQkqc3ViaWQgPDw9IDc7CisJCSpzdWJpZCB8PSBjaCAmIDB4N0Y7CisJfSB3aGlsZSAoKGNoICYgMHg4MCkgPT0gMHg4MCk7CisJcm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IDI7CisKKwl3aGlsZSAoY3R4LT5wb2ludGVyIDwgZW9jKSB7CisJCWlmICgrKygqbGVuKSA+IHNpemUpIHsKKwkJCWN0eC0+ZXJyb3IgPSBBU04xX0VSUl9ERUNfQkFEVkFMVUU7CisJCQlrZnJlZSgqb2lkKTsKKwkJCSpvaWQgPSBOVUxMOworCQkJcmV0dXJuIDA7CisJCX0KKworCQlpZiAoIWFzbjFfc3ViaWRfZGVjb2RlKGN0eCwgb3B0cisrKSkgeworCQkJa2ZyZWUoKm9pZCk7CisJCQkqb2lkID0gTlVMTDsKKwkJCXJldHVybiAwOworCQl9CisJfQorCXJldHVybiAxOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBTTk1QIGRlY29kaW5nIHJvdXRpbmVzIChneHNubXAgYXV0aG9yIERpcmsgV2lzc2UpCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBTTk1QIFZlcnNpb25zICovCisjZGVmaW5lIFNOTVBfVjEJCQkJMAorI2RlZmluZSBTTk1QX1YyQwkJCTEKKyNkZWZpbmUgU05NUF9WMgkJCQkyCisjZGVmaW5lIFNOTVBfVjMJCQkJMworCisvKiBEZWZhdWx0IFNpemVzICovCisjZGVmaW5lIFNOTVBfU0laRV9DT01NCQkJMjU2CisjZGVmaW5lIFNOTVBfU0laRV9PQkpFQ1RJRAkJMTI4CisjZGVmaW5lIFNOTVBfU0laRV9CVUZDSFIJCTI1NgorI2RlZmluZSBTTk1QX1NJWkVfQlVGSU5UCQkxMjgKKyNkZWZpbmUgU05NUF9TSVpFX1NNQUxMT0JKRUNUSUQJCTE2CisKKy8qIFJlcXVlc3RzICovCisjZGVmaW5lIFNOTVBfUERVX0dFVAkJCTAKKyNkZWZpbmUgU05NUF9QRFVfTkVY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VFJBUF9DT0xEU1RBUlQJCTAKKyNkZWZpbmUgU05NUF9UUkFQX1dBUk1TVEFSVAkJMQorI2RlZmluZSBTTk1QX1RSQVBfTElOS0RPV04JCTIKKyNkZWZpbmUgU05NUF9UUkFQX0xJTktVUAkJMworI2RlZmluZSBTTk1QX1RSQVBfQVVURkFJTFVSRQkJNAorI2RlZmluZSBTTk1QX1RSQVBfRVFQTkVJR0hCT1JMT1NTCTUKKyNkZWZpbmUgU05NUF9UUkFQX0VOVFNQRUNJRklDCQk2CisKKy8qIFNOTVB2MSBUeXBlcyAqLworI2RlZmluZSBTTk1QX05VTEwgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTTk1QX0lOVEVHRVIgICAgICAgICAgICAgMSAgICAvKiBsICAqLworI2RlZmluZSBTTk1QX09DVEVUU1RSICAgICAgICAgICAgMiAgICAvKiBjICAqLworI2RlZmluZSBTTk1QX0RJU1BMQVlTVFIgICAgICAgICAgMiAgICAvKiBjICAqLworI2RlZmluZSBTTk1QX09CSkVDVElEICAgICAgICAgICAgMyAgICAvKiB1bCAqLworI2RlZmluZSBTTk1QX0lQQUREUiAgICAgICAgICAgICAgNCAgICAvKiB1YyAqLworI2RlZmluZSBTTk1QX0NPVU5URVIgICAgICAgICAgICAgNSAgICAvKiB1bCAqLworI2RlZmluZSBTTk1QX0dBVUdFICAgICAgICAgICAgICAgNiAgICAvKiB1bCAqLworI2RlZmluZSBTTk1QX1RJTUVUSUNLUyAgICAgICAgICAgNyAgICAvKiB1bCAqLworI2RlZmluZSBTTk1QX09QQVFVRSAgICAgICAgICAgICAgOCAgICAvKiBjICAqLworCisvKiBBZGRpdGlvbmFsIFNOTVB2MiBUeXBlcyAqLworI2RlZmluZSBTTk1QX1VJTlRFR0VSICAgICAgICAgICAgNSAgICAvKiB1bCAqLworI2RlZmluZSBTTk1QX0JJVFNUUiAgICAgICAgICAgICAgOSAgICAvKiB1YyAqLworI2RlZmluZSBTTk1QX05TQVAgICAgICAgICAgICAgICAxMCAgICAvKiB1YyAqLworI2RlZmluZSBTTk1QX0NPVU5URVI2NCAgICAgICAgICAxMSAgICAvKiB1bCAqLworI2RlZmluZSBTTk1QX05PU1VDSE9CSkVDVCAgICAgICAxMgorI2RlZmluZSBTTk1QX05PU1VDSElOU1RBTkNFICAgICAxMworI2RlZmluZSBTTk1QX0VORE9GTUlCVklFVyAgICAgICAxNAorCit1bmlvbiBzbm1wX3N5bnRheAoreworCXVuc2lnbmVkIGNoYXIgdWNbMF07CS8qIDggYml0IHVuc2lnbmVkICovCisJY2hhciBjWzBdOwkJLyogOCBiaXQgc2lnbmVkICovCisJdW5zaWduZWQgbG9uZyB1bFswXTsJLyogMzIgYml0IHVuc2lnbmVkICovCisJbG9uZyBsWzBdOwkJLyogMzIgYml0IHNpZ25lZCAqLworfTsKKworc3RydWN0IHNubXBfb2JqZWN0Cit7CisJdW5zaWduZWQgbG9uZyAqaWQ7CisJdW5zaWduZWQgaW50IGlkX2xlbjsKKwl1bnNpZ25lZCBzaG9ydCB0eXBlOworCXVuc2lnbmVkIGludCBzeW50YXhfbGVuOworCXVuaW9uIHNubXBfc3ludGF4IHN5bnRheDsKK307CisKK3N0cnVjdCBzbm1wX3JlcXVlc3QKK3sKKwl1bnNpZ25lZCBsb25nIGlkOworCXVuc2lnbmVkIGludCBlcnJvcl9zdGF0dXM7CisJdW5zaWduZWQgaW50IGVycm9yX2luZGV4OworfTsKKworc3RydWN0IHNubXBfdjFfdHJhcAoreworCXVuc2lnbmVkIGxvbmcgKmlkOworCXVuc2lnbmVkIGludCBpZF9sZW47CisJdW5zaWduZWQgbG9uZyBpcF9hZGRyZXNzOwkvKiBwb2ludGVyICAqLworCXVuc2lnbmVkIGludCBnZW5lcmFsOworCXVuc2lnbmVkIGludCBzcGVjaWZpYzsKKwl1bnNpZ25lZCBsb25nIHRpbWU7Cit9OworCisvKiBTTk1QIHR5cGVzICovCisjZGVmaW5lIFNOTVBfSVBBICAgIDAKKyNkZWZpbmUgU05NUF9DTlQgICAgMQorI2RlZmluZSBTTk1QX0dHRSAgICAyCisjZGVmaW5lIFNOTVBfVElUICAgIDMKKyNkZWZpbmUgU05NUF9PUFEgICAgNAorI2RlZmluZSBTTk1QX0M2NCAgICA2CisKKy8qIFNOTVAgZXJyb3JzICovCisjZGVmaW5lIFNFUlJfTlNPICAgIDAKKyNkZWZpbmUgU0VSUl9OU0kgICAgMQorI2RlZmluZSBTRVJSX0VPTSAgICAyCisKK3N0YXRpYyBpbmxpbmUgdm9pZCBtYW5nbGVfYWRkcmVzcyh1bnNpZ25lZCBjaGFyICpiZWdpbiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICphZGRyLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0cnVjdCBvY3QxX21hcCAqbWFwLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fc3VtMTYgKmNoZWNrKTsKK3N0cnVjdCBzbm1wX2NudgoreworCXVuc2lnbmVkIGludCBjbGFzczsKKwl1bnNpZ25lZCBpbnQgdGFnOworCWludCBzeW50YXg7Cit9OworCitzdGF0aWMgc3RydWN0IHNubXBfY252IHNubXBfY29udiBbXSA9Cit7CisJe0FTTjFfVU5JLCBBU04xX05VTCwgU05NUF9OVUxMfSwKKwl7QVNOMV9VTkksIEFTTjFfSU5ULCBTTk1QX0lOVEVHRVJ9LAorCXtBU04xX1VOSSwgQVNOMV9PVFMsIFNOTVBfT0NURVRTVFJ9LAorCXtBU04xX1VOSSwgQVNOMV9PVFMsIFNOTVBfRElTUExBWVNUUn0sCisJe0FTTjFfVU5JLCBBU04xX09KSSwgU05NUF9PQkpFQ1RJRH0sCisJe0FTTjFfQVBMLCBTTk1QX0lQQSwgU05NUF9JUEFERFJ9LAorCXtBU04xX0FQTCwgU05NUF9DTlQsIFNOTVBfQ09VTlRFUn0sCS8qIENvdW50ZXIzMiAqLworCXtBU04xX0FQTCwgU05NUF9HR0UsIFNOTVBfR0FVR0V9LAkvKiBHYXVnZTMyID09IFVuc2lnbmVkMzIgICovCisJe0FTTjFfQVBMLCBTTk1QX1RJVCwgU05NUF9USU1FVElDS1N9LAorCXtBU04xX0FQTCwgU05NUF9PUFEsIFNOTVBfT1BBUVVFfSwKKworCS8qIFNOTVB2MiBkYXRhIHR5cGVzIGFuZCBlcnJvcnMgKi8KKwl7QVNOMV9VTkksIEFTTjFfQlRTLCBTTk1QX0JJVFNUUn0sCisJe0FTTjFfQVBMLCBTTk1QX0M2NCwgU05NUF9DT1VOVEVSNjR9LAorCXtBU04xX0NUWCwgU0VSUl9OU08sIFNOTVBfTk9TVUNIT0JKRUNUfSwKKwl7QVNOMV9DVFgsIFNFUlJfTlNJLCBTTk1QX05PU1VDSElOU1RBTkNFfSwKKwl7QVNOMV9DVFgsIFNFUlJfRU9NLCBTTk1QX0VORE9GTUlCVklFV30sCisJezAsICAgICAgIDAsICAgICAgIC0xfQorfTsKKworc3RhdGljIHVuc2lnbmVkIGNoYXIgc25tcF90YWdfY2xzMnN5bnRheCh1bnNpZ25lZCBpbnQgdGFnLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgY2xzLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBzaG9ydCAqc3ludGF4KQoreworCXN0cnVjdCBzbm1wX2NudiAqY252OworCisJY252ID0gc25tcF9jb252OworCisJd2hpbGUgKGNudi0+c3ludGF4ICE9IC0xKSB7CisJCWlmIChjbnYtPnRhZyA9PSB0YWcgJiYgY252LT5jbGFzcyA9PSBjbHMpIHsKKwkJCSpzeW50YXggPSBjbnYtPnN5bnRheDsKKwkJCXJldHVybiAxOworCQl9CisJCWNudisrOworCX0KKwlyZXR1cm4gMDsKK30KKworc3RhdGljIHVuc2lnbmVkIGNoYXIgc25tcF9vYmplY3RfZGVjb2RlKHN0cnVjdCBhc24xX2N0eCAqY3R4LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBzbm1wX29iamVjdCAqKm9iaikKK3sKKwl1bnNpZ25lZCBpbnQgY2xzLCBjb24sIHRhZywgbGVuLCBpZGxlbjsKKwl1bnNpZ25lZCBzaG9ydCB0eXBlOworCXVuc2lnbmVkIGNoYXIgKmVvYywgKmVuZCwgKnA7CisJdW5zaWduZWQgbG9uZyAqbHAsICppZDsKKwl1bnNpZ25lZCBsb25nIHVsOworCWxvbmcgbDsKKworCSpvYmogPSBOVUxMOworCWlkID0gTlVMTDsKKworCWlmICghYXNuMV9oZWFkZXJfZGVjb2RlKGN0eCwgJmVvYywgJmNscywgJmNvbiwgJnRhZykpCisJCXJldHVybiAwOworCisJaWYgKGNscyAhPSBBU04xX1VOSSB8fCBjb24gIT0gQVNOMV9DT04gfHwgdGFnICE9IEFTTjFfU0VRKQorCQlyZXR1cm4gMDsKKworCWlmICghYXNuMV9oZWFkZXJfZGVjb2RlKGN0eCwgJmVuZCwgJmNscywgJmNvbiwgJnRhZykpCisJCXJldHVybiAwOworCisJaWYgKGNscyAhPSBBU04xX1VOSSB8fCBjb24gIT0gQVNOMV9QUkkgfHwgdGFnICE9IEFTTjFfT0pJKQorCQlyZXR1cm4gMDsKKworCWlmICghYXNuMV9vaWRfZGVjb2RlKGN0eCwgZW5kLCAmaWQsICZpZGxlbikpCisJCXJldHVybiAwOworCisJaWYgKCFhc24xX2hlYWRlcl9kZWNvZGUoY3R4LCAmZW5kLCAmY2xzLCAmY29uLCAmdGFnKSkgeworCQlrZnJlZShpZCk7CisJCXJldHVybiAwOworCX0KKworCWlmIChjb24gIT0gQVNOMV9QUkkpIHsKKwkJa2ZyZWUoaWQpOworCQlyZXR1cm4gMDsKKwl9CisKKwl0eXBlID0gMDsKKwlpZiAoIXNubXBfdGFnX2NsczJzeW50YXgodGFnLCBjbHMsICZ0eXBlKSkgeworCQlrZnJlZShpZCk7CisJCXJldHVybiAwOworCX0KKworCWw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DsKKworCWlmIChjbHMgIT0gQVNOMV9VTkkgfHwgY29uICE9IEFTTjFfUFJJIHx8IHRhZyAhPSBBU04xX0lOVCkKKwkJcmV0dXJuIDA7CisKKwlpZiAoIWFzbjFfdWludF9kZWNvZGUoY3R4LCBlbmQsICZyZXF1ZXN0LT5lcnJvcl9zdGF0dXMpKQorCQlyZXR1cm4gMDsKKworCWlmICghYXNuMV9oZWFkZXJfZGVjb2RlKGN0eCwgJmVuZCwgJmNscywgJmNvbiwgJnRhZykpCisJCXJldHVybiAwOworCisJaWYgKGNscyAhPSBBU04xX1VOSSB8fCBjb24gIT0gQVNOMV9QUkkgfHwgdGFnICE9IEFTTjFfSU5UKQorCQlyZXR1cm4gMDsKKworCWlmICghYXNuMV91aW50X2RlY29kZShjdHgsIGVuZCwgJnJlcXVlc3QtPmVycm9yX2luZGV4KSkKKwkJcmV0dXJuIDA7CisKKwlyZXR1cm4gMTsKK30KKworLyoKKyAqIEZhc3QgY2hlY2tzdW0gdXBkYXRlIGZvciBwb3NzaWJseSBvZGRseS1hbGlnbmVkIFVEUCBieXRlLCBmcm9tIHRoZQorICogY29kZSBleGFtcGxlIGluIHRoZSBkcmFmdC4KKyAqLworc3RhdGljIHZvaWQgZmFzdF9jc3VtKF9fc3VtMTYgKmNzdW0sCisgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdW5zaWduZWQgY2hhciAqb3B0ciwKKyAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1bnNpZ25lZCBjaGFyICpucHRyLAorICAgICAgICAgICAgICAgICAgICAgIGludCBvZmZzZXQpCit7CisJdW5zaWduZWQgY2hhciBzWzRdOworCisJaWYgKG9mZnNldCAmIDEpIHsKKwkJc1swXSA9IHNbMl0gPSAwOworCQlzWzFdID0gfipvcHRyOworCQlzWzNdID0gKm5wdHI7CisJfSBlbHNlIHsKKwkJc1sxXSA9IHNbM10gPSAwOworCQlzWzBdID0gfipvcHRyOworCQlzWzJdID0gKm5wdHI7CisJfQorCisJKmN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CgqYWRkcikpOworCX0KK30KKworc3RhdGljIHVuc2lnbmVkIGNoYXIgc25tcF90cmFwX2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNubXBfdjFfdHJhcCAqdHJhcCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RydWN0IG9jdDFfbWFwICptYXAsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fc3VtMTYgKmNoZWNrKQoreworCXVuc2lnbmVkIGludCBjbHMsIGNvbiwgdGFnLCBsZW47CisJdW5zaWduZWQgY2hhciAqZW5kOworCisJaWYgKCFhc24xX2hlYWRlcl9kZWNvZGUoY3R4LCAmZW5kLCAmY2xzLCAmY29uLCAmdGFnKSkKKwkJcmV0dXJuIDA7CisKKwlpZiAoY2xzICE9IEFTTjFfVU5JIHx8IGNvbiAhPSBBU04xX1BSSSB8fCB0YWcgIT0gQVNOMV9PSkkpCisJCXJldHVybiAwOworCisJaWYgKCFhc24xX29pZF9kZWNvZGUoY3R4LCBlbmQsICZ0cmFwLT5pZCwgJnRyYXAtPmlkX2xlbikpCisJCXJldHVybiAwOworCisJaWYgKCFhc24xX2hlYWRlcl9kZWNvZGUoY3R4LCAmZW5kLCAmY2xzLCAmY29uLCAmdGFnKSkKKwkJZ290byBlcnJfaWRfZnJlZTsKKworCWlmICghKChjbHMgPT0gQVNOMV9BUEwgJiYgY29uID09IEFTTjFfUFJJICYmIHRhZyA9PSBTTk1QX0lQQSkgfHwKKwkgICAgICAoY2xzID09IEFTTjFfVU5JICYmIGNvbiA9PSBBU04xX1BSSSAmJiB0YWcgPT0gQVNOMV9PVFMpKSkKKwkJZ290byBlcnJfaWRfZnJlZTsKKworCWlmICghYXNuMV9vY3RldHNfZGVjb2RlKGN0eCwgZW5kLCAodW5zaWduZWQgY2hhciAqKikmdHJhcC0+aXBfYWR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vbiA9PSBBU04xX1BSSSAmJiB0YWcgPT0gQVNOMV9JTlQpKSkKKwkJZ290byBlcnJfYWRkcl9mcmVlOworCisJaWYgKCFhc24xX3Vsb25nX2RlY29kZShjdHgsIGVuZCwgJnRyYXAtPnRpbWUpKQorCQlnb3RvIGVycl9hZGRyX2ZyZWU7CisKKwlyZXR1cm4gMTsKKworZXJyX2FkZHJfZnJlZToKKwlrZnJlZSgodW5zaWduZWQgbG9uZyAqKXRyYXAtPmlwX2FkZHJlc3MpOworCitlcnJfaWRfZnJlZToKKwlrZnJlZSh0cmFwLT5pZCk7CisKKwlyZXR1cm4gMDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogTWlzYy4gcm91dGluZXMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkIGhleF9kdW1wKHVuc2lnbmVkIGNoYXIgKmJ1Ziwgc2l6ZV90IGxlbikKK3sKKwlzaXplX3QgaTsKKworCWZvciAoaSA9IDA7IGkgPCBsZW47IGkrKykgeworCQlpZiAoaSAmJiAhKGkgJSAxNikpCisJCQlwcmludGsoIlxuIik7CisJCXByaW50aygiJTAyeCAiLCAqKGJ1ZiArIGkpKTsKKwl9CisJcHJpbnRrKCJcbiIpOworfQorCisvKgorICogUGFyc2UgYW5kIG1hbmdsZSBTTk1QIG1lc3NhZ2UgYWNjb3JkaW5nIHRvIG1hcHBpbmcuCisgKiAoQW5kIHRoaXMgaXMgdGhlIGZ1Y2tpbmcgJ2Jhc2ljJyBtZXRob2QpLgorICovCitzdGF0aWMgaW50IHNubXBfcGFyc2VfbWFuZ2xlKHVuc2lnbmVkIGNoYXIgKm1zZywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdV9pbnQxNl90IGxlbiw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srKSB7CisJCQkJaWYgKGkgPiAwKQorCQkJCQlwcmludGsoIi4iKTsKKwkJCQlwcmludGsoIiVsdSIsICgqb2JqKS0+aWRbaV0pOworCQkJfQorCQkJcHJpbnRrKCI6IHR5cGU9JXVcbiIsICgqb2JqKS0+dHlwZSk7CisKKwkJfQorCisJCWlmICgoKm9iaiktPnR5cGUgPT0gU05NUF9JUEFERFIpCisJCQltYW5nbGVfYWRkcmVzcyhjdHguYmVnaW4sIGN0eC5wb2ludGVyIC0gNCAsIG1hcCwgY2hlY2spOworCisJCWtmcmVlKCgqb2JqKS0+aWQpOworCQlrZnJlZSgqb2JqKTsKKwl9CisJa2ZyZWUob2JqKTsKKworCWlmICghYXNuMV9lb2NfZGVjb2RlKCZjdHgsIGVvYykpCisJCXJldHVybiAwOworCisJcmV0dXJuIDE7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIE5BVCByb3V0aW5lcy4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBTTk1QIHRyYW5zbGF0aW9uIHJvdXRpbmUuCisgKi8KK3N0YXRpYyBpbnQgc25tcF90cmFuc2xhdGUoc3RydWN0IG5mX2Nvbm4gKmN0LAorICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGlwX2Nvbm50cmFja19pbmZvIGN0aW5mbywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNrX2J1ZmYgKipwc2tiKQoreworCXN0cnVjdCBpcGhkciAqaXBoID0gKCpwc2tiKS0+bmguaXBoOworCXN0cnVjdCB1ZHBoZHIgKnVkcGggPSAoc3RydWN0IHVkcGhkciAqKSgoX19iZTMyICopaXBoICsgaXBoLT5paGwpOworCXVfaW50MTZfdCB1ZHBsZW4gPSBudG9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zcmMubDNudW0JPSBBRl9JTkVULAorCS50dXBsZS5zcmMudS51ZHAucG9ydAk9IF9fY29uc3RhbnRfaHRvbnMoU05NUF9QT1JUKSwKKwkudHVwbGUuZHN0LnByb3RvbnVtCT0gSVBQUk9UT19VRFAsCisJLm1hc2suc3JjLmwzbnVtCQk9IDB4RkZGRiwKKwkubWFzay5zcmMudS51ZHAucG9ydAk9IF9fY29uc3RhbnRfaHRvbnMoMHhGRkZGKSwKKwkubWFzay5kc3QucHJvdG9udW0JPSAweEZGLAorfTsKKworc3RhdGljIHN0cnVjdCBuZl9jb25udHJhY2tfaGVscGVyIHNubXBfdHJhcF9oZWxwZXIgX19yZWFkX21vc3RseSA9IHsKKwkubWF4X2V4cGVjdGVkCQk9IDAsCisJLnRpbWVvdXQJCT0gMTgwLAorCS5tZQkJCT0gVEhJU19NT0RVTEUsCisJLmhlbHAJCQk9IGhlbHAsCisJLm5hbWUJCQk9ICJzbm1wX3RyYXAiLAorCS50dXBsZS5zcmMubDNudW0JPSBBRl9JTkVULAorCS50dXBsZS5zcmMudS51ZHAucG9ydAk9IF9fY29uc3RhbnRfaHRvbnMoU05NUF9UUkFQX1BPUlQpLAorCS50dXBsZS5kc3QucHJvdG9udW0JPSBJUFBST1RPX1VEUCwKKwkubWFzay5zcmMubDNudW0JCT0gMHhGRkZGLAorCS5tYXNrLnNyYy51LnVkcC5wb3J0CT0gX19jb25zdGFudF9odG9ucygweEZGRkYpLAorCS5tYXNrLmRzdC5wcm90b251bQk9IDB4RkYsCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBNb2R1bGUgc3R1ZmYuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50IF9faW5pdCBuZl9uYXRfc25tcF9iYXNp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CXJldHVybiBuZl9uYXRfcGFja2V0KGN0LCBjdGluZm8sIGhvb2tudW0sIHBza2IpOworfQorCitzdGF0aWMgdW5zaWduZWQgaW50CituZl9uYXRfaW4odW5zaWduZWQgaW50IGhvb2tudW0sCisgICAgICAgICAgc3RydWN0IHNrX2J1ZmYgKipwc2tiLAorICAgICAgICAgIGNvbnN0IHN0cnVjdCBuZXRfZGV2aWNlICppbiwKKyAgICAgICAgICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqb3V0LAorICAgICAgICAgIGludCAoKm9rZm4pKHN0cnVjdCBza19idWZmICopKQoreworCXVuc2lnbmVkIGludCByZXQ7CisJX19iZTMyIGRhZGRyID0gKCpwc2tiKS0+bmguaXBoLT5kYWRkcjsKKworCXJldCA9IG5mX25hdF9mbihob29rbnVtLCBwc2tiLCBpbiwgb3V0LCBva2ZuKTsKKwlpZiAocmV0ICE9IE5GX0RST1AgJiYgcmV0ICE9IE5GX1NUT0xFTiAmJgorCSAgICBkYWRkciAhPSAoKnBza2IpLT5uaC5pcGgtPmRhZGRyKSB7CisJCWRzdF9yZWxlYXNlKCgqcHNrYiktPmRzdCk7CisJCSgqcHNrYiktPmRzdCA9IE5VTEw7CisJfQorCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyB1bnNpZ25lZCBpbnQKK25mX25hdF9vdXQodW5zaWduZWQgaW50IGhvb2tudW0sCisJICAgc3RydWN0IHNrX2J1ZmYgKipwc2tiLAorCSAgIGNvbnN0IHN0cnVjdCBuZXRfZGV2aWNlICppbiwKKwkgICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqb3V0LAorCSAgIGludCAoKm9rZm4pKHN0cnVjdCBza19idWZmICopKQoreworI2lmZGVmIENPTkZJR19YRlJNCisJc3RydWN0IG5mX2Nvbm4gKmN0OworCWVudW0gaXBfY29ubnRyYWNrX2luZm8gY3RpbmZvOworI2VuZGlmCisJdW5zaWduZWQgaW50IHJldDsKKworCS8qIHJvb3QgaXMgcGxhe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U0laRSkKIAkJCWdvdG8gZmFpbDsKIGdvdGl0OgotCQl1ZHBfcG9ydF9yb3ZlciA9IHNudW0gPSByZXN1bHQ7CisJCSpwb3J0X3JvdmVyID0gc251bSA9IHJlc3VsdDsKIAl9IGVsc2UgewotCQloZWFkID0gJnVkcF9oYXNoW3NudW0gJiAoVURQX0hUQUJMRV9TSVpFIC0gMSldOworCQloZWFkID0gJnVkcHRhYmxlW3NudW0gJiAoVURQX0hUQUJMRV9TSVpFIC0gMSldOwogCiAJCXNrX2Zvcl9lYWNoKHNrMiwgbm9kZSwgaGVhZCkKIAkJCWlmIChpbmV0X3NrKHNrMiktPm51bSA9PSBzbnVtICAgICAgICAgICAgICAgICAgICAgICAgJiYKQEAgLTE5NSwxMiArMTkzLDEyIEBACiAJCQkgICAgKCFzazItPnNrX3JldXNlICAgICAgICB8fCAhc2stPnNrX3JldXNlKSAgICAgICAgICYmCiAJCQkgICAgKCFzazItPnNrX2JvdW5kX2Rldl9pZiB8fCAhc2stPnNrX2JvdW5kX2Rldl9pZgogCQkJICAgICB8fCBzazItPnNrX2JvdW5kX2Rldl9pZiA9PSBzay0+c2tfYm91bmRfZGV2X2lmKSAmJgotCQkJICAgICgqc2FkZHJfY21wKShzaywgc2syKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkKKwkJCSAgICAoKnNhZGRyX2NvbXApKHNrLCBzazIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICApCiAJCQkJZ290byBmYWlsOwogCX0KIAlpbmV0X3NrKHNrKS0+bnVtID0gc251bTsKIAlpZiAoc2tfdW5oYXNoZWQoc2spKSB7Ci0JCWhlYWQgPSAmdWRwX2hhc2hbc251bSAmIChVRFBfSFRBQkxFX1NJWkUgLSAxKV07CisJCWhlYWQgPSAmdWRwdGFibGVbc251bSAmIChVRFBfSFRBQkxFX1NJWkUgLSAxKV07CiAJCXNrX2FkZF9ub2RlKHNrLCBoZWFkKTsKIAkJc29ja19wcm90X2luY191c2Uoc2stPnNrX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3sKKwkvKiBQYXJ0IGNvdmVyZWQgYnkgaW50ZXJzZWN0aW9uIG9mIG1hc2tzIG11c3QgYmUgdW5lcXVhbCwKKwkgICBvdGhlcndpc2UgdGhleSBjbGFzaCAqLworCXN0cnVjdCBuZl9jb25udHJhY2tfdHVwbGUgaW50ZXJzZWN0X21hc2s7CisJaW50IGNvdW50OworCisJaW50ZXJzZWN0X21hc2suc3JjLmwzbnVtID0gYS0+bWFzay5zcmMubDNudW0gJiBiLT5tYXNrLnNyYy5sM251bTsKKwlpbnRlcnNlY3RfbWFzay5zcmMudS5hbGwgPSBhLT5tYXNrLnNyYy51LmFsbCAmIGItPm1hc2suc3JjLnUuYWxsOworCWludGVyc2VjdF9tYXNrLmRzdC51LmFsbCA9IGEtPm1hc2suZHN0LnUuYWxsICYgYi0+bWFzay5kc3QudS5hbGw7CisJaW50ZXJzZWN0X21hc2suZHN0LnByb3RvbnVtID0gYS0+bWFzay5kc3QucHJvdG9udW0KKwkJCQkJJiBiLT5tYXNrLmRzdC5wcm90b251bTsKKworCWZvciAoY291bnQgPSAwOyBjb3VudCA8IE5GX0NUX1RVUExFX0wzU0laRTsgY291bnQrKyl7CisJCWludGVyc2VjdF9tYXNrLnNyYy51My5hbGxbY291bnRdID0KKwkJCWEtPm1hc2suc3JjLnUzLmFsbFtjb3VudF0gJiBiLT5tYXNrLnNyYy51My5hbGxbY291bnRdOworCX0KKworCWZvciAoY291bnQgPSAwOyBjb3VudCA8IE5GX0NUX1RVUExFX0wzU0laRTsgY291bnQrKyl7CisJCWludGVyc2VjdF9tYXNrLmRzdC51My5hbGxbY291bnRdID0KKwkJCWEtPm1hc2suZHN0LnUzLmFsbFtjb3VudF0gJiBiLT5tYXNrLmRzdC51My5hbGxbY291bnRdOworCX0KKworCXJldHVybiBuZl9jdF90dXBsZV9tYXNrX2NtcCgmYS0+dHVwbGUsICZiLT50dXBsZSwgJmludGVyc2VjdF9tYXNrKTsKK30KKworc3RhdGljIGlubGluZSBpbnQgZXh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HBlY3QtPnRpbWVvdXQuZnVuY3Rpb24pCisJCXNlcV9wcmludGYocywgIiVsZCAiLCB0aW1lcl9wZW5kaW5nKCZleHBlY3QtPnRpbWVvdXQpCisJCQkgICA/IChsb25nKShleHBlY3QtPnRpbWVvdXQuZXhwaXJlcyAtIGppZmZpZXMpL0haIDogMCk7CisJZWxzZQorCQlzZXFfcHJpbnRmKHMsICItICIpOworCXNlcV9wcmludGYocywgImwzcHJvdG8gPSAldSBwcm90bz0ldSAiLAorCQkgICBleHBlY3QtPnR1cGxlLnNyYy5sM251bSwKKwkJICAgZXhwZWN0LT50dXBsZS5kc3QucHJvdG9udW0pOworCXByaW50X3R1cGxlKHMsICZleHBlY3QtPnR1cGxlLAorCQkgICAgX19uZl9jdF9sM3Byb3RvX2ZpbmQoZXhwZWN0LT50dXBsZS5zcmMubDNudW0pLAorCQkgICAgX19uZl9jdF9sNHByb3RvX2ZpbmQoZXhwZWN0LT50dXBsZS5zcmMubDNudW0sCisJCQkJICAgICAgIGV4cGVjdC0+dHVwbGUuZHN0LnByb3RvbnVtKSk7CisJcmV0dXJuIHNlcV9wdXRjKHMsICdcbicpOworfQorCitzdGF0aWMgc3RydWN0IHNlcV9vcGVyYXRpb25zIGV4cF9zZXFfb3BzID0geworCS5zdGFydCA9IGV4cF9zZXFfc3RhcnQsCisJLm5leHQgPSBleHBfc2VxX25leHQsCisJLnN0b3AgPSBleHBfc2VxX3N0b3AsCisJLnNob3cgPSBleHBfc2VxX3Nob3cKK307CisKK3N0YXRpYyBpbnQgZXhwX29wZW4oc3RydWN0IGlub2RlICppbm9kZSwgc3RydWN0IGZpbGUgKmZpbGUpCit7CisJcmV0dXJuIHNlcV9vcGVuKGZpbGUsICZleHBfc2VxX29wcyk7Cit9CisKK3N0cnVjdCBmaWxlX29wZXJhdGlvbnMgZXhwX2ZpbGVfb3BzID0geworCS5vd25lciAgID0gVEhJU19NT0RVTEUsCisJLm9wZW4gICAgPSBleHBfb3BlbiwKKwkucmVhZCA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BbaV1bal0ubWF4X2V4cGVjdGVkID0gMTsKIAkJCWZ0cFtpXVtqXS50aW1lb3V0ID0gNSAqIDYwOwkvKiA1IE1pbnV0ZXMgKi8KZGlmZiAtLWdpdCBhL25ldC9uZXRmaWx0ZXIvbmZfY29ubnRyYWNrX2gzMjNfYXNuMS5jIGIvbmV0L25ldGZpbHRlci9uZl9jb25udHJhY2tfaDMyM19hc24xLmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uZjZmYWQ3MQotLS0gL2Rldi9udWxsCisrKyBiL25ldC9uZXRmaWx0ZXIvbmZfY29ubnRyYWNrX2gzMjNfYXNuMS5jCkBAIC0wLDAgKzEsODc0IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogaXBfY29ubnRyYWNrX2hlbHBlcl9oMzIzX2FzbjEuYyAtIEJFUiBhbmQgUEVSIGRlY29kaW5nIGxpYnJhcnkgZm9yIEguMzIzCisgKiAJCQkgICAgICAJICAgICBjb25udHJhY2svTkFUIG1vZHVsZS4KKyAqCisgKiBDb3B5cmlnaHQgKGMpIDIwMDYgYnkgSmluZyBNaW4gWmhhbyA8emhhb2ppbmdtaW5AdXNlcnMuc291cmNlZm9yZ2UubmV0PgorICoKKyAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSB2ZXJzaW9uIDIuCisgKgorICogU2VlIGlwX2Nvbm50cmFja19oZWxwZXJfaDMyM19hc24xLmggZm9yIGRldGFpbHMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpZmRlZiBfX0tFUk5FTF9fCisjaW5jbHVkZSA8bGludXgva2VybmVsLmg+CisjZWxzZQorI2luY2x1ZGUgPHN0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7CitzdGF0aWMgaW50IGRlY29kZV9udW1zdHIoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCk7CitzdGF0aWMgaW50IGRlY29kZV9vY3RzdHIoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCk7CitzdGF0aWMgaW50IGRlY29kZV9ibXBzdHIoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCk7CitzdGF0aWMgaW50IGRlY29kZV9zZXEoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCk7CitzdGF0aWMgaW50IGRlY29kZV9zZXFvZihiaXRzdHJfdCAqIGJzLCBmaWVsZF90ICogZiwgY2hhciAqYmFzZSwgaW50IGxldmVsKTsKK3N0YXRpYyBpbnQgZGVjb2RlX2Nob2ljZShiaXRzdHJfdCAqIGJzLCBmaWVsZF90ICogZiwgY2hhciAqYmFzZSwgaW50IGxldmVsKTsKKworLyogRGVjb2RlciBGdW5jdGlvbnMgVmVjdG9yICovCit0eXBlZGVmIGludCAoKmRlY29kZXJfdCkgKGJpdHN0cl90ICosIGZpZWxkX3QgKiwgY2hhciAqLCBpbnQpOworc3RhdGljIGRlY29kZXJfdCBEZWNvZGVyc1tdID0geworCWRlY29kZV9udWwsCisJZGVjb2RlX2Jvb2wsCisJZGVjb2RlX29pZCwKKwlkZWNvZGVfaW50LAorCWRlY29kZV9lbnVtLAorCWRlY29kZV9iaXRzdHIsCisJZGVjb2RlX251bXN0ciwKKwlkZWNvZGVfb2N0c3RyLAorCWRlY29kZV9ibXBzdHIsCisJZGVjb2RlX3NlcSwKKwlkZWNvZGVfc2Vxb2YsCisJZGVjb2RlX2Nob2ljZSwKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBILjMyMyBUeXBlcworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaW5jbHVkZSAibmZfY29ubnRyYWNrX2gzMjNfdHlwZXMuYyIKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBBc3N1bWUgYnMgaXMgYWxpZ25lZCAmJiB2IDwgMTYzODQgKi8KK3Vuc2lnbmVkIGdldF9sZW4oYml0c3RyX3QgKiBicykKK3sKKwl1bnNpZ25lZCB2OworCisJdiA9ICpicy0+Y3VyKys7CisKKwlpZiAodiAmIDB4ODApIHsKKwkJdiAmPSAweDNmOworCQl2IDw8PSA4OworCQl2ICs9ICpicy0+Y3VyKys7CisJfQorCisJcmV0dXJuIHY7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordW5zaWduZWQgZ2V0X2JpdChiaXRzdHJfdCAqIGJzKQoreworCXVuc2lnbmVkIGIgPSAoKmJzLT5jdXIpICYgKDB4ODAgPj4gYnMtPmJpdCk7CisKKwlJTkNfQklUKGJzKTsKKworCXJldHVybiBiOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIEFzc3VtZSBiIDw9IDggKi8KK3Vuc2lnbmVkIGdldF9iaXRzKGJpdHN0cl90ICogYnMsIHVuc2lnbmVkIGIpCit7CisJdW5zaWduZWQgdiwgbDsKKworCXYgPSAoKmJzLT5jdXI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5jdXIpIDw8IHNoaWZ0OworCQkJdiA8PD0gYnMtPmJpdDsKKwkJfSBlbHNlIGlmIChsID4gMzIpIHsKKwkJCXYgPDw9IGJzLT5iaXQ7CisJCQl2IHw9ICgqYnMtPmN1cikgPj4gKDggLSBicy0+Yml0KTsKKwkJfQorCisJCWJzLT5iaXQgPSBsICYgMHg3OworCX0KKworCXYgJj0gMHhmZmZmZmZmZiA8PCAoMzIgLSBiKTsKKworCXJldHVybiB2OworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogQXNzdW1lIGJzIGlzIGFsaWduZWQgYW5kIHNpemVvZih1bnNpZ25lZCBpbnQpID09IDQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordW5zaWduZWQgZ2V0X3VpbnQoYml0c3RyX3QgKiBicywgaW50IGIpCit7CisJdW5zaWduZWQgdiA9IDA7CisKKwlzd2l0Y2ggKGIpIHsKKwljYXNlIDQ6CisJCXYgfD0gKmJzLT5jdXIrKzsKKwkJdiA8PD0gODsKKwljYXNlIDM6CisJCXYgfD0gKmJzLT5jdXIrKzsKKwkJdiA8PD0gODsKKwljYXNlIDI6CisJCXYgfD0gKmJzLT5jdXIrKzsKKwkJdiA8PD0gODsKKwljYXNlIDE6CisJCXYgfD0gKmJzLT5jdXIrKzsKKwkJYnJlYWs7CisJfQorCXJldHVybiB2OworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2ludCBkZWNvZGVfbnVsKGJpdHN0cl90ICogYnMsIGZpZWxkX3QgKiBmLCBjaGFyICpiYXNlLCBpbnQgbGV2ZWwpCit7CisJUFJJTlQoIiUqLnMlc1xuIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKKworCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGRlY29kZV9ib29sKGJpdHN0cl90ICogYnMsIGZpZWxkX3QgKiBmLCBjaGFyICpiYXNlLCBpbnQgbGV2ZWwpCit7CisJUFJJTlQoIiUqLnMlc1xuIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKKworCUlOQ19CSVQoYnMpOworCisJQ0hFQ0tfQk9VTkQoYnMsIDApOworCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGRlY29kZV9vaWQoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCkKK3sKKwlpbnQgbGVuOworCisJUFJJTlQoIiUqLnMlc1xuIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKKworCUJZVEVfQUxJR04oYnMpOworCUNIRUNLX0JPVU5EKGJzLCAxKTsKKwlsZW4gPSAqYnMtPmN1cisrOworCWJzLT5jdXIgKz0gbGVuOworCisJQ0hFQ0tfQk9VTkQoYnMsIDApOworCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGRlY29kZV9pbnQoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCkKK3sKKwl1bnNpZ25lZCBsZW47CisKKwlQUklOVCgiJSoucyVzIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKKworCXN3aXRjaCAoZi0+c3opIHsKKwljYXNlIEJZVEU6CQkvKiBSYW5nZSA9PSAyNTYgKi8KKwkJQllURV9BTElHTihicyk7CisJCWJzLT5jdXIrKzsKKwkJYnJlYWs7CisJY2FzZSBXT1JEOgkJLyogMjU3IDw9IFJhbmdlIDw9IDY0SyAqLworCQlCWVRFX0FMSUdOKGJzKTsKKwkJYnMtPmN1ciArPSAyOworCQlicmVhazsKKwljYXNlIENPTlM6CQkvKiA2NEsgPCBSYW5nZSA8IDRHICovCisJCWxlbiA9IGdldF9iaXRzKGJzLCAyKSArIDE7CisJCUJZVEVfQUxJR04oYnMpOworCQlpZiAoYmFzZSAmJiAoZi0+YXR0ciAmIERFQ09ERSkpIHsJLyogdGltZVRvTGl2ZSAqLworCQkJdW5zaWduZWQgdiA9IGdldF91aW50KGJzLCBsZW4pICsgZi0+bGI7CisJCQlQUklOVCgiID0gJXUiLCB2KTsKKwkJCSooKHVuc2lnbmVkICopIChiYXNlICsgZi0+b2Zmc2V0KSkgPSB2OworCQl9CisJCWJzLT5jdXIgKz0gbGVuOworCQlicmVhazsKKwljYXNlIFVOQ086CisJCUJZVEVfQUxJR04oYnMpOworCQlDSEVDS19CT1VORChicywgMik7CisJCWxlbiA9IGdldF9sZW4oYnMpOworCQlicy0+Y3VyICs9IGxlbjsKKwkJYnJlYWs7CisJZGVmYXVsdDoJCS8qIDIgPD0gUmFuZ2UgPD0gMjU1ICovCisJCUlOQ19CSVRTKGJzLCBmLT5zeik7CisJCWJyZWFrOworCX0KKworCVBSSU5UKCJcbiIpOworCisJQ0hFQ0tfQk9VTkQoYnMsIDApOworCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGRlY29kZV9lbnVtKGJpdHN0cl90ICogYnMsIGZpZWxkX3QgKiBmLCBjaGFyICpiYXNlLCBpbnQgbGV2ZWwpCit7CisJUFJJTlQoIiUqLnMlc1xuIiwgbGV2ZWwgKiBUQUJfU0laRSwgIiAiLCBmLT5uYW1lKTsKKworCWlmICgoZi0+YXR0ciAmIEVYVCkgJiYgZ2V0X2JpdChicykpIHsKKwkJSU5DX0JJVFMoYnMsIDcpOworCX0gZWxzZSB7CisJCUlOQ19CSVRTKGJzLCBmLT5zeik7CisJfQorCisJQ0hFQ0tfQk9VTkQoYnMsIDApOworCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGRlY29kZV9iaXRzdHIoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCkKK3sKKwl1bnNpZ25lZCBsZW47CisKKwlQUklOVCgiJSoucyVzXG4iLCBsZXZlbCAqIFRBQl9TSVpFLCAiICIsIGYtPm5hbWUpOworCisJQllURV9BTElHTihicyk7CisJc3dpdGNoIChmLT5zeikgeworCWNhc2UgRklYRDoJCS8qIGZpeGVkIGxlbmd0aCA+IDE2ICovCisJCWxlbiA9IGYtPmxiOworCQlicmVhazsKKwljYXNlIFdPUkQ6CQkvKiAyLWJ5dGUgbGVuZ3RoICovCisJCUNIRUNLX0JPVU5EKGJzLCAyKTsKKwkJbGVuID0gKCpicy0+Y3VyKyspIDw8IDg7CisJCWxlbiArPSAoKmJzLT5jdXIrKykgKyBmLT5sYjsKKwkJYnJlYWs7CisJY2FzZSBTRU1JOgorCQlDSEVDS19CT1VORChicywgMik7CisJCWxlbiA9IGdldF9sZW4oYnMpOworCQlicmVhazsKKwlkZWZhdWx0OgorCQlsZW4gPSAwOworCQlicmVhazsKKwl9CisKKwlicy0+Y3VyICs9IGxlbiA+PiAzOworCWJzLT5iaXQgPSBsZW4gJiA3OworCisJQ0hFQ0tfQk9VTkQoYnMsIDApOworCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGRlY29kZV9udW1zdHIoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCkKK3sKKwl1bnNpZ25lZCBsZW47CisKKwlQUklOVCgiJSoucyVzXG4iLCBsZXZlbCAqIFRBQl9TSVpFLCAiICIsIGYtPm5hbWUpOworCisJLyogMiA8PSBSYW5nZSA8PSAyNTUgKi8KKwlsZW4gPSBnZXRfYml0cyhicywgZi0+c3opICsgZi0+bGI7CisKKwlCWVRFX0FMSUdOKGJzKTsKKwlJTkNfQklUUyhicywgKGxlbiA8PCAyKSk7CisKKwlDSEVDS19CT1VORChicywgMCk7CisJcmV0dXJuIEgzMjNfRVJST1JfTk9ORTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgZGVjb2RlX29jdHN0cihiaXRzdHJfdCAqIGJzLCBmaWVsZF90ICogZiwgY2hhciAqYmFzZSwgaW50IGxldmVsKQoreworCXVuc2lnbmVkIGxlbjsKKworCVBSSU5UKCIlKi5zJXMiLCBsZXZlbCAqIFRBQl9TSVpFLCAiICIsIGYtPm5hbWUpOworCisJc3dpdGNoIChmLT5zeikgeworCWNhc2UgRklYRDoJCS8qIFJhbmdlID09IDEgKi8KKwkJaWYgKGYtPmxiID4gMikgeworCQkJQllURV9BTElHTihicyk7CisJCQlpZiAoYmFzZSAmJiAoZi0+YXR0ciAmIERFQ09ERSkpIHsKKwkJCQkvKiBUaGUgSVAgQWRkcmVzcyAqLworCQkJCUlGVEhFTihmLT5sYiA9PSA0LAorCQkJCSAgICAgICBQUklOVCgiID0gJWQuJWQuJWQuJWQ6JWQiLAorCQkJCQkgICAgIGJzLT5jdXJbMF0sIGJzLT5jdXJbMV0sCisJCQkJCSAgICAgYnMtPmN1clsyXSwgYnMtPmN1clszXSwKKwkJCQkJICAgICBicy0+Y3VyWzRdICogMjU2ICsgYnMtPmN1cls1XSkpOworCQkJCSooKHVuc2lnbmVkICopIChiYXNlICsgZi0+b2Zmc2V0KSkgPQorCQkJCSAgICBicy0+Y3VyIC0gYnMtPmJ1ZjsKKwkJCX0KKwkJfQorCQlsZW4gPSBmLT5sYjsKKwkJYnJlYWs7CisJY2FzZSBCWVRFOgkJLyogUmFuZ2UgPT0gMjU2ICovCisJCUJZVEVfQUxJR04oYnMpOworCQlDSEVDS19CT1VORChicywgMSk7CisJCWxlbiA9ICgqYnMtPmN1cisrKSArIGYtPmxiOworCQlicmVhazsKKwljYXNlIFNFTUk6CisJCUJZVEVfQUxJR04oYnMpOworCQlDSEVDS19CT1VORChicywgMik7CisJCWxlbiA9IGdldF9sZW4oYnMpICsgZi0+bGI7CisJCWJyZWFrOworCWRlZmF1bHQ6CQkvKiAyIDw9IFJhbmdlIDw9IDI1NSAqLworCQlsZW4gPSBnZXRfYml0cyhicywgZi0+c3opICsgZi0+bGI7CisJCUJZVEVfQUxJR04oYnMpOworCQlicmVhazsKKwl9CisKKwlicy0+Y3VyICs9IGxlbjsKKworCVBSSU5UKCJcbiIpOworCisJQ0hFQ0tfQk9VTkQoYnMsIDApOworCXJldHVybiBIMzIzX0VSUk9SX05PTkU7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IGRlY29kZV9ibXBzdHIoYml0c3RyX3QgKiBicywgZmllbGRfdCAqIGYsIGNoYXIgKmJhc2UsIGludCBsZXZlbCkKK3sKKwl1bnNpZ25lZCBsZW47CisKKwlQUklOVCgiJSoucyVzXG4iLCBsZXZlbCAqIFRBQl9TSVpFLCAiICIsIGYtPm5hbWUpOworCisJc3dpdGNoIChmLT5zeikgeworCWNhc2UgQllURToJCS8qIFJhbmdlID09IDI1NiAqLworCQlCWVRFX0FMSUdOKGJzKTsKKwkJQ0hFQ0tfQk9VTkQoYnMsIDEpOworCQlsZW4gPSAoKmJzLT5jdXIrKykgKyBmLT5sYjsKKwkJYnJlYWs7CisJZGVmYXVsdDoJCS8qIDIgPD0gUmFuZ2UgPD0gMjU1ICovCisJCWxlbiA9IGdldF9iaXRzKGJzLCBmLT5zeikgKyBmLT5sYjsKKwkJQllURV9BTElHTihicyk7CisJCWJyZWFrOworCX0KKworCWJzLT5jdXIgKz0gbGVuIDw8IDE7CisKKwlDSEVDS19CT1VORChicywgMCk7CisJcmV0dXJuIEgzMjNfRVJST1JfTk9ORTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgZGVjb2RlX3NlcShiaXRzdHJfdCAqIGJzLCBmaWVsZF90ICogZiwgY2hhciAqYmFzZSwgaW50IGxldmVsKQoreworCXVuc2lnbmVkIGV4dCwgYm1wLCBpLCBvcHQsIGxlbiA9IDAsIGJtcDIsIGJtcDJfbGVuOworCWludCBlcnI7CisJZmllbGRfdCAqc29uOworCXVuc2lnbmVkIGNoYXIgKmJlZyA9IE5VTEw7CisKKwlQUklOVCgiJSoucyVzXG4iLCBsZXZlbCAqIFRBQl9TSVpFLCAiICIsIGYtPm5hbWUpOworCisJLyogRGVjb2RlPyAqLworCWJhc2UgPSAoYmFzZSAmJiAoZi0+YXR0ciAmIERFQ09ERSkpID8gYmFzZSArIGYtPm9mZnNldCA6IE5VTEw7CisKKwkvKiBFeHRlbnNpYmxlPyAqLworCWV4dCA9IChmLT5hdHRyICYgRVhUKSA/IGdldF9iaXQoYnMpIDogMDsKKworCS8qIEdldCBmaWVsZHMgYml0bWFwICovCisJYm1wID0gZ2V0X2JpdG1hcChicywgZi0+c3op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3NhZ2UiKSBDSE9JQ0UsIDUsIDI0LCAzMiwgREVDT0RFIHwgRVhULAorCQkwLCBfUmFzTWVzc2FnZQorCX07CisJYml0c3RyX3QgYnM7CisKKwlicy5idWYgPSBicy5iZWcgPSBicy5jdXIgPSBidWY7CisJYnMuZW5kID0gYnVmICsgc3o7CisJYnMuYml0ID0gMDsKKworCXJldHVybiBkZWNvZGVfY2hvaWNlKCZicywgJnJhc19tZXNzYWdlLCAoY2hhciAqKSByYXMsIDApOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgRGVjb2RlSDMyM19Vc2VySW5mb3JtYXRpb24odW5zaWduZWQgY2hhciAqYnVmLCB1bnNpZ25lZCBjaGFyICpiZWcsCisJCQkJICAgICAgc2l6ZV90IHN6LCBIMzIzX1VzZXJJbmZvcm1hdGlvbiAqIHV1aWUpCit7CisJc3RhdGljIGZpZWxkX3QgaDMyM191c2VyaW5mb3JtYXRpb24gPSB7CisJCUZOQU1FKCJIMzIzLVVzZXJJbmZvcm1hdGlvbiIpIFNFUSwgMSwgMiwgMiwgREVDT0RFIHwgRVhULAorCQkwLCBfSDMyM19Vc2VySW5mb3JtYXRpb24KKwl9OworCWJpdHN0cl90IGJzOworCisJYnMuYnVmID0gYnVmOworCWJzLmJlZyA9IGJzLmN1ciA9IGJlZzsKKwlicy5lbmQgPSBiZWcgKyBzejsKKwlicy5iaXQgPSAwOworCisJcmV0dXJuIGRlY29kZV9zZXEoJmJzLCAmaDMyM191c2VyaW5mb3JtYXRpb24sIChjaGFyICopIHV1aWUsIDApOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2ludCBEZWNvZGVNdWx0aW1lZGlhU3lzdGVtQ29udHJvbE1lc3NhZ2UodW5zaWduZWQgY2hhciAqYnVmLCBzaXplX3Qgc3osCisJCQkJCSBNdWx0aW1lZGlhU3lzdGVtQ29udHJvbE1lc3NhZ2UgKgorCQkJCQkgbXNjbSkKK3sKKwlzdGF0aWMgZmllbGRfdCBtdWx0aW1lZGlhc3lzdGVtY29udHJvbG1lc3NhZ2UgPSB7CisJCUZOQU1FKCJNdWx0aW1lZGlhU3lzdGVtQ29udHJvbE1lc3NhZ2UiKSBDSE9JQ0UsIDIsIDQsIDQsCisJCURFQ09ERSB8IEVYVCwgMCwgX011bHRpbWVkaWFTeXN0ZW1Db250cm9sTWVzc2FnZQorCX07CisJYml0c3RyX3QgYnM7CisKKwlicy5idWYgPSBicy5iZWcgPSBicy5jdXIgPSBidWY7CisJYnMuZW5kID0gYnVmICsgc3o7CisJYnMuYml0ID0gMDsKKworCXJldHVybiBkZWNvZGVfY2hvaWNlKCZicywgJm11bHRpbWVkaWFzeXN0ZW1jb250cm9sbWVzc2FnZSwKKwkJCSAgICAgKGNoYXIgKikgbXNjbSwgMCk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworaW50IERlY29kZVE5MzEodW5zaWduZWQgY2hhciAqYnVmLCBzaXplX3Qgc3osIFE5MzEgKiBxOTMxKQoreworCXVuc2lnbmVkIGNoYXIgKnAgPSBidWY7CisJaW50IGxlbjsKKworCWlmICghcCB8fCBzeiA8IDEpCisJCXJldHVybiBIMzIzX0VSUk9SX0JPVU5EOworCisJLyogUHJvdG9jb2wgRGlzY3JpbWluYXRvciAqLworCWlmICgqcCAhPSAweDA4KSB7CisJCVBSSU5UKCJVbmtub3duIFByb3RvY29sIERpc2NyaW1pbmF0b3JcbiIpOworCQlyZXR1cm4gSDMyM19FUlJPUl9SQU5HRTsKKwl9CisJcCsrOworCXN6LS07CisKKwkvKiBDYWxsUmVmZXJlbmNlVmFsdWUgKi8KKwlpZiAoc3ogPCAxKQorCQlyZ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0cF9ydGNwKHBza2IsIGN0LCBjdGluZm8sIGRhdGEsIGRhdGFvZmYsCisJCQkJICAgdGFkZHIsIHBvcnQsIHJ0cF9wb3J0LCBydHBfZXhwLCBydGNwX2V4cCk7CisJfSBlbHNlIHsJCS8qIENvbm50cmFjayBvbmx5ICovCisJCWlmIChuZl9jb25udHJhY2tfZXhwZWN0X3JlbGF0ZWQocnRwX2V4cCkgPT0gMCkgeworCQkJaWYgKG5mX2Nvbm50cmFja19leHBlY3RfcmVsYXRlZChydGNwX2V4cCkgPT0gMCkgeworCQkJCURFQlVHUCgibmZfY3RfaDMyMzogZXhwZWN0IFJUUCAiKTsKKwkJCQlORl9DVF9EVU1QX1RVUExFKCZydHBfZXhwLT50dXBsZSk7CisJCQkJREVCVUdQKCJuZl9jdF9oMzIzOiBleHBlY3QgUlRDUCAiKTsKKwkJCQlORl9DVF9EVU1QX1RVUExFKCZydGNwX2V4cC0+dHVwbGUpOworCQkJfSBlbHNlIHsKKwkJCQluZl9jb25udHJhY2tfdW5leHBlY3RfcmVsYXRlZChydHBfZXhwKTsKKwkJCQlyZXQgPSAtMTsKKwkJCX0KKwkJfSBlbHNlCisJCQlyZXQgPSAtMTsKKwl9CisKKwluZl9jb25udHJhY2tfZXhwZWN0X3B1dChydHBfZXhwKTsKKwluZl9jb25udHJhY2tfZXhwZWN0X3B1dChydGNwX2V4cCk7CisKKwlyZXR1cm4gcmV0OworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgZXhwZWN0X3QxMjAoc3RydWN0IHNrX2J1ZmYgKipwc2tiLAorCQkgICAgICAgc3RydWN0IG5mX2Nvbm4gKmN0LAorCQkgICAgICAgZW51bSBpcF9jb25udHJhY2tfaW5mbyBjdGluZm8sCisJCSAgICAgICB1bnNpZ25lZCBjaGFyICoqZGF0YSwgaW50IGRhdGFvZmYsCisJCSAgICA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agd2hlbiBkZWNvZGluZyBlcnJvciAqLworCQkJYnJlYWs7CisJCX0KKworCQkvKiBQcm9jZXNzIEguMjQ1IHNpZ25hbCAqLworCQlpZiAocHJvY2Vzc19oMjQ1KHBza2IsIGN0LCBjdGluZm8sICZkYXRhLCBkYXRhb2ZmLCAmbXNjbSkgPCAwKQorCQkJZ290byBkcm9wOworCX0KKworCXNwaW5fdW5sb2NrX2JoKCZuZl9oMzIzX2xvY2spOworCXJldHVybiBORl9BQ0NFUFQ7CisKKyAgICAgIGRyb3A6CisJc3Bpbl91bmxvY2tfYmgoJm5mX2gzMjNfbG9jayk7CisJaWYgKG5ldF9yYXRlbGltaXQoKSkKKwkJcHJpbnRrKCJuZl9jdF9oMjQ1OiBwYWNrZXQgZHJvcHBlZFxuIik7CisJcmV0dXJuIE5GX0RST1A7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHN0cnVjdCBuZl9jb25udHJhY2tfaGVscGVyIG5mX2Nvbm50cmFja19oZWxwZXJfaDI0NSBfX3JlYWRfbW9zdGx5ID0geworCS5uYW1lCQkJPSAiSC4yNDUiLAorCS5tZQkJCT0gVEhJU19NT0RVTEUsCisJLm1heF9leHBlY3RlZAkJPSBIMzIzX1JUUF9DSEFOTkVMX01BWCAqIDQgKyAyIC8qIFQuMTIwICovLAorCS50aW1lb3V0CQk9IDI0MCwKKwkudHVwbGUuZHN0LnByb3RvbnVtCT0gSVBQUk9UT19VRFAsCisJLm1hc2suc3JjLnUudWRwLnBvcnQJPSBfX2NvbnN0YW50X2h0b25zKDB4RkZGRiksCisJLm1hc2suZHN0LnByb3RvbnVtCT0gMHhGRiwKKwkuaGVscAkJCT0gaDI0NV9oZWxwCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2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1cm4gTlVMTDsKKwkqZGF0YWxlbiA9ICgqcHNrYiktPmxlbiAtIGRhdGFvZmY7CisJcmV0dXJuIHNrYl9oZWFkZXJfcG9pbnRlcigqcHNrYiwgZGF0YW9mZiwgKmRhdGFsZW4sIGgzMjNfYnVmZmVyKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgc3RydWN0IG5mX2Nvbm50cmFja19leHBlY3QgKmZpbmRfZXhwZWN0KHN0cnVjdCBuZl9jb25uICpjdCwKKwkJCQkJICAgICAgIHVuaW9uIG5mX2Nvbm50cmFja19hZGRyZXNzICphZGRyLAorCQkJCQkgICAgICAgX19iZTE2IHBvcnQpCit7CisJc3RydWN0IG5mX2Nvbm50cmFja19leHBlY3QgKmV4cDsKKwlzdHJ1Y3QgbmZfY29ubnRyYWNrX3R1cGxlIHR1cGxlOworCisJbWVtc2V0KCZ0dXBsZS5zcmMudTMsIDAsIHNpemVvZih0dXBsZS5zcmMudTMpKTsKKwl0dXBsZS5zcmMudS50Y3AucG9ydCA9IDA7CisJbWVtY3B5KCZ0dXBsZS5kc3QudTMsIGFkZHIsIHNpemVvZih0dXBsZS5kc3QudTMpKTsKKwl0dXBsZS5kc3QudS50Y3AucG9ydCA9IHBvcnQ7CisJdHVwbGUuZHN0LnByb3RvbnVtID0gSVBQUk9UT19UQ1A7CisKKwlleHAgPSBfX25mX2Nvbm50cmFja19leHBlY3RfZmluZCgmdHVwbGUpOworCWlmIChleHAgJiYgZXhwLT5tYXN0ZXIgPT0gY3QpCisJCXJldHVybiBleHA7CisJcmV0dXJuIE5VTEw7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBzZXRfZXhwZWN0X3RpbWVvdXQoc3RydWN0IG5mX2Nvbm50cmFja19leHBlY3QgKmV4cCwKKwkJCSAgICAgIHVuc2lnbmVkIHRpbWVvdXQpCit7CisJaWYgKCFleHAgfHwgIWRlbF90aW1lcigmZXhwLT50aW1lb3V0KSkKKwkJcmV0dXJuIDA7CisKKwlleHAtPnRpbWVvdXQuZXhwaXJlcyA9IGppZmZpZXMgKyB0aW1lb3V0ICogSFo7CisJYWRkX3RpbWVyKCZleHAtPnRpbWVvdXQpOworCisJcmV0dXJuIDE7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBleHBlY3RfcTkzMShzdHJ1Y3Qgc2tfYnVmZiAqKnBza2IsIHN0cnVjdCBuZl9jb25uICpjdCwKKwkJICAgICAgIGVudW0gaXBfY29ubnRyYWNrX2luZm8gY3RpbmZvLAorCQkgICAgICAgdW5zaWduZWQgY2hhciAqKmRhdGEsCisJCSAgICAgICBUcmFuc3BvcnRBZGRyZXNzICp0YWRkciwgaW50IGNvdW50KQoreworCXN0cnVjdCBuZl9jdF9oMzIzX21hc3RlciAqaW5mbyA9ICZuZmN0X2hlbHAoY3QpLT5oZWxwLmN0X2gzMjNfaW5mbzsKKwlpbnQgZGlyID0gQ1RJTkZPMkRJUihjdGluZm8pOworCWludCByZXQgPSAwOworCWludCBpOworCV9fYmUxNiBwb3J0OworCXVuaW9uIG5mX2Nvbm50cmFja19hZGRyZXNzIGFkZHI7CisJc3RydWN0IG5mX2Nvbm50cmFja19leHBlY3QgKmV4cDsKKwl0eXBlb2YobmF0X3E5MzFfaG9vaykgbmF0X3E5MzE7CisKKwkvKiBMb29rIGZvciB0aGUgZmlyc3QgcmVsYXRlZCBhZGRyZXNzICovCisJZm9yIChpID0gMDsgaSA8IGNvdW50OyBpKyspIHsKKwkJaWYgKGdldF9oMjI1X2FkZHIoY3QsICpkYXRhLCAmdGFkZHJbaV0sICZhZGRyLCAmcG9ydCkgJiYKKw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hwID0gbmZfY29ubnRyYWNrX2V4cGVjdF9hbGxvYyhjdCkpID09IE5VTEwpCisJCXJldHVybiAtMTsKKwluZl9jb25udHJhY2tfZXhwZWN0X2luaXQoZXhwLCBjdC0+dHVwbGVoYXNoWyFkaXJdLnR1cGxlLnNyYy5sM251bSwKKwkJCQkgJmN0LT50dXBsZWhhc2hbIWRpcl0udHVwbGUuc3JjLnUzLCAmYWRkciwKKwkJCQkgSVBQUk9UT19VRFAsIE5VTEwsICZwb3J0KTsKKwlleHAtPmhlbHBlciA9IG5mX2Nvbm50cmFja19oZWxwZXJfcmFzOworCisJaWYgKG5mX2Nvbm50cmFja19leHBlY3RfcmVsYXRlZChleHApID09IDApIHsKKwkJREVCVUdQKCJuZl9jdF9yYXM6IGV4cGVjdCBSQVMgIik7CisJCU5GX0NUX0RVTVBfVFVQTEUoJmV4cC0+dHVwbGUpOworCX0gZWxzZQorCQlyZXQgPSAtMTsKKworCW5mX2Nvbm50cmFja19leHBlY3RfcHV0KGV4cCk7CisKKwlyZXR1cm4gcmV0OworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgcHJvY2Vzc19ycnEoc3RydWN0IHNrX2J1ZmYgKipwc2tiLCBzdHJ1Y3QgbmZfY29ubiAqY3QsCisJCSAgICAgICBlbnVtIGlwX2Nvbm50cmFja19pbmZvIGN0aW5mbywKKwkJICAgICAgIHVuc2lnbmVkIGNoYXIgKipkYXRhLCBSZWdpc3RyYXRpb25SZXF1ZXN0ICpycnEpCit7CisJc3RydWN0IG5mX2N0X2gzMjNfbWFzdGVyICppbmZvID0gJm5mY3RfaGVscChjdCktPmhlbHAuY3RfaDMyM19pbmZvOworCWludCByZXQ7CisJdHlwZW9mKHNldF9yYXNfYWRkcl9ob29rKSBzZXRfcmFzX2FkZHI7CisKKwlERUJVR1AoIm5mX2N0X3JhczogUlJRXG4i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wl9IGVsc2UKKwkJcmV0ID0gLTE7CisKKwluZl9jb25udHJhY2tfZXhwZWN0X3B1dChleHApOworCisJcmV0dXJuIHJldDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IHByb2Nlc3NfbHJxKHN0cnVjdCBza19idWZmICoqcHNrYiwgc3RydWN0IG5mX2Nvbm4gKmN0LAorCQkgICAgICAgZW51bSBpcF9jb25udHJhY2tfaW5mbyBjdGluZm8sCisJCSAgICAgICB1bnNpZ25lZCBjaGFyICoqZGF0YSwgTG9jYXRpb25SZXF1ZXN0ICpscnEpCit7CisJdHlwZW9mKHNldF9yYXNfYWRkcl9ob29rKSBzZXRfcmFzX2FkZHI7CisKKwlERUJVR1AoIm5mX2N0X3JhczogTFJRXG4iKTsKKworCXNldF9yYXNfYWRkciA9IHJjdV9kZXJlZmVyZW5jZShzZXRfcmFzX2FkZHJfaG9vayk7CisJaWYgKHNldF9yYXNfYWRkciAmJiBjdC0+c3RhdHVzICYgSVBTX05BVF9NQVNLKQorCQlyZXR1cm4gc2V0X3Jhc19hZGRyKHBza2IsIGN0LCBjdGluZm8sIGRhdGEsCisJCQkJICAgICZscnEtPnJlcGx5QWRkcmVzcywgMSk7CisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBwcm9jZXNzX2xjZihzdHJ1Y3Qgc2tfYnVmZiAqKnBza2IsIHN0cnVjdCBuZl9jb25uICpjdCwKKwkJICAgICAgIGVudW0gaXBfY29ubnRyYWNrX2luZm8gY3RpbmZvLAorCQkgICAgICAgdW5zaWduZWQgY2hhciAqKmRhdGEsIExvY2F0aW9uQ29uZmlybSAqbGNmKQoreworCWludCBkaXIgPSBDVElORk8yRElSKGN0aW5mby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F0YSwgJnJhcykgPCAwKQorCQlnb3RvIGRyb3A7CisKKyAgICAgIGFjY2VwdDoKKwlzcGluX3VubG9ja19iaCgmbmZfaDMyM19sb2NrKTsKKwlyZXR1cm4gTkZfQUNDRVBUOworCisgICAgICBkcm9wOgorCXNwaW5fdW5sb2NrX2JoKCZuZl9oMzIzX2xvY2spOworCWlmIChuZXRfcmF0ZWxpbWl0KCkpCisJCXByaW50aygibmZfY3RfcmFzOiBwYWNrZXQgZHJvcHBlZFxuIik7CisJcmV0dXJuIE5GX0RST1A7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHN0cnVjdCBuZl9jb25udHJhY2tfaGVscGVyIG5mX2Nvbm50cmFja19oZWxwZXJfcmFzW10gX19yZWFkX21vc3RseSA9IHsKKwl7CisJCS5uYW1lCQkJPSAiUkFTIiwKKwkJLm1lCQkJPSBUSElTX01PRFVMRSwKKwkJLm1heF9leHBlY3RlZAkJPSAzMiwKKwkJLnRpbWVvdXQJCT0gMjQwLAorCQkudHVwbGUuc3JjLmwzbnVtCT0gQUZfSU5FVCwKKwkJLnR1cGxlLnNyYy51LnVkcC5wb3J0CT0gX19jb25zdGFudF9odG9ucyhSQVNfUE9SVCksCisJCS50dXBsZS5kc3QucHJvdG9udW0JPSBJUFBST1RPX1VEUCwKKwkJLm1hc2suc3JjLmwzbnVtCQk9IDB4RkZGRiwKKwkJLm1hc2suc3JjLnUudWRwLnBvcnQJPSBfX2NvbnN0YW50X2h0b25zKDB4RkZGRiksCisJCS5tYXNrLmRzdC5wcm90b251bQk9IDB4RkYsCisJCS5oZWxwCQkJPSByYXNfaGVscCwKKwl9LAorCXsKKwkJLm5hbWUJCQk9ICJSQVMiLAorCQkubWUJCQk9IFRISVNfTU9EVUxFLAorCQkubWF4X2V4cGVjdGVkCQk9IDMyLAorCQkudGltZW91dAkJPSAyNDAsCisJCS50dXBsZS5zcmMubDNudW0JPSBBRl9JTkVUNiwKKwkJLnR1cGxlLnNyYy51LnVkcC5wb3J0CT0gX19jb25zdGFudF9odG9ucyhSQVNfUE9SVCksCisJCS50dXBsZS5kc3QucHJvdG9udW0JPSBJUFBST1RPX1VEUCwKKwkJLm1hc2suc3JjLmwzbnVtCQk9IDB4RkZGRiwKKwkJLm1hc2suc3JjLnUudWRwLnBvcnQJPSBfX2NvbnN0YW50X2h0b25zKDB4RkZGRiksCisJCS5tYXNrLmRzdC5wcm90b251bQk9IDB4RkYsCisJCS5oZWxwCQkJPSByYXNfaGVscCwKKwl9LAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgdm9pZCBfX2V4aXQgbmZfY29ubnRyYWNrX2gzMjNfZmluaSh2b2lkKQoreworCW5mX2Nvbm50cmFja19oZWxwZXJfdW5yZWdpc3RlcigmbmZfY29ubnRyYWNrX2hlbHBlcl9yYXNbMV0pOworCW5mX2Nvbm50cmFja19oZWxwZXJfdW5yZWdpc3RlcigmbmZfY29ubnRyYWNrX2hlbHBlcl9yYXNbMF0pOworCW5mX2Nvbm50cmFja19oZWxwZXJfdW5yZWdpc3RlcigmbmZfY29ubnRyYWNrX2hlbHBlcl9xOTMxWzFdKTsKKwluZl9jb25udHJhY2tfaGVscGVyX3VucmVnaXN0ZXIoJm5mX2Nvbm50cmFja19oZWxwZXJfcTkzMVswXSk7CisJa2ZyZWUoaDMyM19idWZmZXIpOworCURFQlVHUCgibmZfY3RfaDMyMzogZmluaVxuIik7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBfX2luaXQgbmZfY29ubnRyYWNrX2gzMjNfaW5pdCh2b2lkKQoreworCWludCByZXQ7CisKKwloMzIzX2J1ZmZlciA9IGttYWxsb2MoNjU1MzYsIEdGUF9LRVJORUwpOworCWlmICghaDMyM19idWZmZXIpCisJCXJldHVybiAtRU5PTUVNOworCXJldCA9IG5mX2Nvbm50cmFja19oZWxwZXJfcmVnaXN0ZXIoJm5mX2Nvbm50cmFja19oZWxwZXJfcTkzMVswXSk7CisJaWYgKHJldCA8IDApCisJCWdvdG8gZXJyMTsKKwlyZXQgPSBuZl9jb25udHJhY2tfaGVscGVyX3JlZ2lzdGVyKCZuZl9jb25udHJhY2tfaGVscGVyX3E5MzFbMV0pOworCWlmIChyZXQgPCAwKQorCQlnb3RvIGVycjI7CisJcmV0ID0gbmZfY29ubnRyYWNrX2hlbHBlcl9yZWdpc3RlcigmbmZfY29ubnRyYWNrX2hlbHBlcl9yYXNbMF0pOworCWlmIChyZXQgPCAwKQorCQlnb3RvIGVycjM7CisJcmV0ID0gbmZfY29ubnRyYWNrX2hlbHBlcl9yZWdpc3RlcigmbmZfY29ubnRyYWNrX2hlbHBlcl9yYXNbMV0pOworCWlmIChyZXQgPCAwKQorCQlnb3RvIGVycjQ7CisJREVCVUdQKCJuZl9jdF9oMzIzOiBpbml0IHN1Y2Nlc3NcbiIpOworCXJldHVybiAwOworCitlcnI0OgorCW5mX2Nvbm50cmFja19oZWxwZXJfdW5yZWdpc3RlcigmbmZfY29ubnRyYWNrX2hlbHBlcl9yYXNbMF0pOworZXJyMzoKKwluZl9jb25udHJhY2tfaGVscGVyX3VucmVnaXN0ZXIoJm5mX2Nvbm50cmFja19oZWxwZXJfcTkzMVsxXSk7CitlcnIyOgorCW5mX2Nvbm50cmFja19oZWxwZXJfdW5yZWdpc3RlcigmbmZfY29ubnRyYWNrX2hlbHBlcl9xOTMxWzBdKTsKK2VycjE6CisJcmV0dXJuIHJldDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCittb2R1bGVfaW5pdChuZl9jb25udHJh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za2ItPmRldi0+aGFyZF9oZWFkZXJfcGFyc2UpIHsKIAkJc3RydWN0IG5mcW5sX21zZ19wYWNrZXRfaHcgcGh3OwogCi0JCXBody5od19hZGRybGVuID0KLQkJCWVudHNrYi0+ZGV2LT5oYXJkX2hlYWRlcl9wYXJzZShlbnRza2IsCisJCWludCBsZW4gPSBlbnRza2ItPmRldi0+aGFyZF9oZWFkZXJfcGFyc2UoZW50c2tiLAogCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaHcuaHdfYWRkcik7Ci0JCXBody5od19hZGRybGVuID0gaHRvbnMocGh3Lmh3X2FkZHJsZW4pOworCQlwaHcuaHdfYWRkcmxlbiA9IGh0b25zKGxlbik7CiAJCU5GQV9QVVQoc2tiLCBORlFBX0hXQUREUiwgc2l6ZW9mKHBodyksICZwaHcpOwogCX0KIApAQCAtNjIyLDkgKzYyMSwxMCBAQAogCWludCBkaWZmOwogCiAJZGlmZiA9IGRhdGFfbGVuIC0gZS0+c2tiLT5sZW47Ci0JaWYgKGRpZmYgPCAwKQotCQlza2JfdHJpbShlLT5za2IsIGRhdGFfbGVuKTsKLQllbHNlIGlmIChkaWZmID4gMCkgeworCWlmIChkaWZmIDwgMCkgeworCQlpZiAocHNrYl90cmltKGUtPnNrYiwgZGF0YV9sZW4pKQorCQkJcmV0dXJuIC1FTk9NRU07CisJfSBlbHNlIGlmIChkaWZmID4gMCkgewogCQlpZiAoZGF0YV9sZW4gPiAweEZGRkYpCiAJCQlyZXR1cm4gLUVJTlZBTDsKIAkJaWYgKGRpZmYgPiBza2JfdGFpbHJvb20oZS0+c2tiKSkgewpAQCAtODM0LDggKzgzNCw4IEBACiAJfQogCiAJaWYgKG5mcWFbTkZRQV9NQVJLLTFdKQotCQllbnRyeS0+c2tiLT5uZm1hcmsgPSBudG9obCgqKHVfaW50MzJfdCAqKQotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICBORkFfREFUQShuZnFhW05GUUFfTUFSSy0xXSkpOworCQ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MKQEAgLTEzLDcgKzEzLDcgQEAKICogRHVlIENyZWRpdDoKICogICAgICAgICAgICAgICBXYW5waXBlIHNvY2tldCBsYXllciBpcyBiYXNlZCBvbiBQYWNrZXQgYW5kIAogKiAgICAgICAgICAgICAgIHRoZSBYMjUgc29ja2V0IGxheWVycy4gVGhlIGFib3ZlIHNvY2tldHMgd2VyZSAKLSogICAgICAgICAgICAgICB1c2VkIGZvciB0aGUgc3BlY2lmaWMgdXNlIG9mIFNhbmdvbWEgVGVjaG5vbG9pZ2VzIAorKiAgICAgICAgICAgICAgIHVzZWQgZm9yIHRoZSBzcGVjaWZpYyB1c2Ugb2YgU2FuZ29tYSBUZWNobm9sb2dpZXMgCiAqICAgICAgICAgICAgICAgQVBJIHByb2dyYW1zLiAKICogICAgICAgICAgICAgICBQYWNrZXQgc29ja2V0IEF1dGhvcnM6IFJvc3MgQmlybywgRnJlZCBOLiB2YW4gS2VtcGVuIGFuZCAKICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFsYW4gQ294LgpAQCAtMjMsNyArMjMsNyBAQAogKiBBcHIgMjUsIDIwMDAgIE5lbmFkIENvcmJpYyAgICAgbyBBZGRlZCB0aGUgYWJpbGl0eSB0byBzZW5kIHplcm8gbGVuZ3RoIHBhY2tldHMuCiAqIE1hciAxMywgMjAwMCAgTmVuYWQgQ29yYmljCSBvIEFkZGVkIGEgdHggYnVmZmVyIGNoZWNrIHZpYSBpb2N0bCBjYWxsLgogKiBNYXIgMDYsIDIwMDAgIE5lbmFkIENvcmJpYyAgICAgbyBGaXhlZCB0aGUgY29ycnVwdCBzb2NrIGxjbiBwcm9ibGVtLgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTZXJ2ZXIgYW5kIGNsaWVudCBhcHBsaWNhdG9uIGNhbiBydW4KKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2VydmVyIGFuZCBjbGllbnQgYXBwbGljYXRpb24gY2FuIHJ1bgogK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CAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDJVTApAQCAtMzE5LDYgKzMyMSw4IEBACiAjZGVmaW5lIE5FVElGX19VRFBfU0VORCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDhVTAogI2RlZmluZSBORVRJRl9fUkFXSVBfUkVDViAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDEwVUwKICNkZWZpbmUgTkVUSUZfX1JBV0lQX1NFTkQgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAyMFVMCisjZGVmaW5lIE5FVElGX19EQ0NQX1JFQ1YgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwNDBVTAorI2RlZmluZSBORVRJRl9fRENDUF9TRU5EICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDgwVUwKIAogI2RlZmluZSBORVRMSU5LX1NPQ0tFVF9fSU9DVEwgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxVUwKICNkZWZpbmUgTkVUTElOS19TT0NLRVRfX1JFQUQgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMlVMCkBAIC05NzAsMyArOTc0LDMxIEBACiAjZGVmaW5lIEtFWV9fTElOSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTBVTAogI2RlZmluZSBLRVlfX1NFVEFUVFIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDIwVUwKICNkZWZpbmUgS0VZX19DUkVBVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDA0MFVMCisKKyNkZWZpbmUgQ09OVEVYVF9fVFJBTlNMQVRFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMVVMCisjZGVmaW5lIENPTlRFWFRfX0NPTlRBSU5TICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDJVTAorCisjZGVmaW5lIERDQ1BfU09DS0VUX19JT0NUTCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDFVTAorI2RlZmluZSBEQ0NQX1NPQ0tFVF9fUkVBRCAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyVUwKKyNkZWZpbmUgRENDUF9TT0NLRVRfX1dSSVRFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNFVMCisjZGVmaW5lIERDQ1BfU09DS0VUX19DUkVBVEUgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDhVTAorI2RlZmluZSBEQ0NQX1NPQ0tFVF9fR0VUQVRUUiAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDEwVUwKKyNkZWZpbmUgRENDUF9TT0NLRVRfX1NFVEFUVFIgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAyMFVMCisjZGVmaW5lIERDQ1BfU09DS0VUX19MT0NLICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwNDBVTAorI2RlZmluZSBEQ0NQX1NPQ0tFVF9fUkVMQUJFTEZST00gICAgICAgICAgICAgICAgICAweDAwMDAwMDgwVUwKKyNkZWZpbmUgRENDUF9TT0NLRVRfX1JFTEFCRUxUTyAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDEwMFVMCisjZGVmaW5lIERDQ1BfU09DS0VUX19BUFBFTkQgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAyMDBVTAorI2RlZmluZSBEQ0NQX1NPQ0tFVF9fQklORCAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwNDAwVUwKKyNkZWZpbmUgRENDUF9TT0NLRVRfX0NPTk5FQ1QgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDgwMFVMCisjZGVmaW5lIERDQ1BfU09DS0VUX19MSVNURU4gICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDEwMDBVTAorI2RlZmluZSBEQ0NQX1NPQ0tFVF9fQUNDRVBUICAgICAgICAgICAgICAgICAgICAgICAweDA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