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yX0NJRF9SRl9UVU5FUl9MTkFfR0FJTl9BVVRPPC9jb25zdGFudD4mbmJzcDs8L2VudHJ5PgorICAgICAgICAgICAgICA8ZW50cnk+Ym9vbGVhbjwvZW50cnk+CisgICAgICAgICAgICA8L3Jvdz4KKyAgICAgICAgICAgIDxyb3c+CisgICAgICAgICAgICAgIDxlbnRyeSBzcGFubmFtZT0iZGVzY3IiPkVuYWJsZXMvZGlzYWJsZXMgTE5BIGF1dG9tYXRpYyBnYWluIGNvbnRyb2wgKEFHQyk8L2VudHJ5PgorICAgICAgICAgICAgPC9yb3c+CisgICAgICAgICAgICA8cm93PgorICAgICAgICAgICAgICA8ZW50cnkgc3Bhbm5hbWU9ImlkIj48Y29uc3RhbnQ+VjRMMl9DSURfUkZfVFVORVJfTUlYRVJfR0FJTl9BVVRPPC9jb25zdGFudD4mbmJzcDs8L2VudHJ5PgorICAgICAgICAgICAgICA8ZW50cnk+Ym9vbGVhbjwvZW50cnk+CisgICAgICAgICAgICA8L3Jvdz4KKyAgICAgICAgICAgIDxyb3c+CisgICAgICAgICAgICAgIDxlbnRyeSBzcGFubmFtZT0iZGVzY3IiPkVuYWJsZXMvZGlzYWJsZXMgbWl4ZXIgYXV0b21hdGljIGdhaW4gY29udHJvbCAoQUdDKTwvZW50cnk+CisgICAgICAgICAgICA8L3Jvdz4KKyAgICAgICAgICAgIDxyb3c+CisgICAgICAgICAgICAgIDxlbnRyeSBzcGFubmFtZT0iaWQiPjxjb25zdGFudD5WNEwyX0NJRF9SRl9UVU5FUl9JRl9HQUlOX0FVVE88L2NvbnN0YW50PiZuYnNwOzwvZW50cnk+CisgICAgICAgICAgICAgIDxlbnRyeT5ib29sZWFuPC9lbnRyeT4KKyAgICAgICAgICAgIDwvcm93PgorICAgICAgICAgICAgPHJvdz4KKyAgICAgICAgICAgICAgPGVudHJ5IHNwYW5uYW1lPSJkZXNjciI+RW5hYmxlcy9kaXNhYmxlcyBJRiBhdXRvbWF0aWMgZ2FpbiBjb250cm9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vcnQsIG9yIGEgcG9ydCBub2RlIG5lZWRzIHRvIGJlIGFzc29jaWF0ZWQgd2l0aCBhIHNlbGVjdGVkCitoYXJkd2FyZSBpbnRlcmZhY2UsIGEgY29tbW9uIHNjaGVtZSB1c2luZyAnI2FkZHJlc3MtY2VsbHMnLCAnI3NpemUtY2VsbHMnCithbmQgJ3JlZycgcHJvcGVydGllcyBpcyB1c2VkIG51bWJlciB0aGUgbm9kZXMuCisKK2RldmljZSB7CisgICAgICAgIC4uLgorICAgICAgICAjYWRkcmVzcy1jZWxscyA9IDwxPjsKKyAgICAgICAgI3NpemUtY2VsbHMgPSA8MD47CisKKyAgICAgICAgcG9ydEAwIHsKKwkgICAgICAgICNhZGRyZXNzLWNlbGxzID0gPDE+OworCSAgICAgICAgI3NpemUtY2VsbHMgPSA8MD47CisJCXJlZyA9IDwwPjsKKworICAgICAgICAgICAgICAgIGVuZHBvaW50QDAgeworCQkJcmVnID0gPDA+OworCQkJLi4uCisJCX07CisgICAgICAgICAgICAgICAgZW5kcG9pbnRAMSB7CisJCQlyZWcgPSA8MT47CisJCQkuLi4KKwkJfTsKKyAgICAgICAgfTsKKworICAgICAgICBwb3J0QDEgeworCQlyZWcgPSA8MT47CisKKwkJZW5kcG9pbnQgeyAuLi4gfTsKKwl9OworfTsKKworQWxsICdwb3J0JyBub2RlcyBjYW4gYmUgZ3JvdXBlZCB1bmRlciBhbiBvcHRpb25hbCAncG9ydHMnIG5vZGUsIHdoaWNoCithbGxvd3MgdG8gc3BlY2lmeSAjYWRkcmVzcy1jZWxscywgI3NpemUtY2VsbHMgcHJvcGVydGllcyBmb3IgdGhlICdwb3J0Jworbm9kZXMgaW5kZXBlbmRlbnRseSBmcm9tIGFueSBvdGhlciBjaGlsZCBkZXZpY2Ugbm9kZXMgYSBkZXZpY2UgbWlnaHQKK2hhdmUuCisKK2RldmljZSB7CisgICAgICAgIC4uLgorICAgICAgICBwb3J0cyB7CisgICAgICAgICAgICAgICAgI2FkZHJlc3MtY2VsbHMgPSA8MT47CisgICAgICAgICAgICAgICAgI3NpemUtY2VsbHMgPSA8MD47CisKKyAgICAgICAgICAgICAgICBwb3J0QDAgeworICAgICAgICAgICAgICAgICAgICAgICAgLi4uCisgICAgICAgICAgICAgICAgICAgICAgICBlbmRwb2ludEAwIHsgLi4uIH07CisgICAgICAgICAgICAgICAgICAgICAgICBlbmRwb2ludEAxIHsgLi4uIH07CisgICAgICAgICAgICAgICAgfTsKKworICAgICAgICAgICAgICAgIHBvcnRAMSB7IC4uLiB9OworICAgICAgICB9OworfTsKKworTGlua3MgYmV0d2VlbiBlbmRwb2ludHMKKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisKK0VhY2ggZW5kcG9pbnQgc2hvdWxkIGNvbnRhaW4gYSAncmVtb3RlLWVuZHBvaW50JyBwaGFuZGxlIHByb3BlcnR5IHRoYXQgcG9pbnRzCit0byB0aGUgY29ycmVzcG9uZGluZyBlbmRwb2ludCBpbiB0aGUgcG9ydCBvZiB0aGUgcmVtb3RlIGRldmljZS4gSW4gdHVybiwgdGhlCityZW1vdGUgZW5kcG9pbnQgc2hvdWxkIGNvbnRhaW4gYSAncmVtb3RlLWVuZHBvaW50JyBwcm9wZXJ0eS4gSWYgaXQgaGFzIG9uZSwKK2l0IG11c3Qgbm90IHBvaW50IHRvIGFub3RoZXIgdGhhbiB0aGUgbG9jYWwgZW5kcG9pbnQuIFR3byBlbmRwb2ludHMgd2l0aCB0aGVpcgorJ3JlbW90ZS1lbmRwb2ludCcgcGhhbmRsZXMgcG9pbnRpbmcgYXQgZWFjaCBvdGhlciBmb3JtIGEgbGluayBiZXR3ZWVuIHRoZQorY29udGFpbmluZyBwb3J0cy4KKworZGV2aWNlLTEgeworICAgICAgICBwb3J0IHsKKyAgICAgICAgICAgICAgICBkZXZpY2VfMV9vdXRwdXQ6IGVuZHBvaW50IHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHJlbW90ZS1lbmRwb2ludCA9IDwmZGV2aWNlXzJfaW5wdXQ+OworICAgICAgICAgICAgICAgIH07CisgICAgICAgIH07Cit9OworCitkZXZpY2UtMiB7CisgICAgICAgIHBvcnQgeworICAgICAgICAgICAgICAgIGRldmljZV8yX2lucHV0OiBlbmRwb2ludCB7CisgICAgICAgICAgICAgICAgICAgICAgICByZW1vdGUtZW5kcG9pbnQgPSA8JmRldmljZV8xX291dHB1dD47CisgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgfTsKK307CisKKworUmVxdWlyZWQgcHJvcGVydGllcworLS0tLS0tLS0tLS0tLS0tLS0tLQorCitJZiB0aGVyZSBpcyBtb3JlIHRoYW4gb25lICdwb3J0JyBvciBtb3JlIHRoYW4gb25lICdlbmRwb2ludCcgbm9kZSBvciAncmVnJworcHJvcGVydHkgaXMgcHJlc2VudCBpbiBwb3J0IGFuZC9vciBlbmRwb2ludCBub2RlcyB0aGUgZm9sbG93aW5nIHByb3BlcnRpZXMKK2FyZSByZXF1aXJlZCBpbiBhIHJlbGV2YW50IHBhcmVudCBub2RlOgorCisgLSAjYWRkcmVzcy1jZWxscyA6IG51bWJlciBvZiBjZWxscyByZXF1aXJlZCB0byBkZWZpbmUgcG9ydC9lbmRwb2ludAorICAgICAgICAgICAgICAgICAgICBpZGVudGlmaWVyLCBzaG91bGQgYmUgMS4KKyAtICNzaXplLWNlbGxzICAgIDogc2hvdWxkIGJlIHplcm8uCisKK09wdGlvbmFsIGVuZHBvaW50IHByb3BlcnRpZXMKKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKworLSByZW1vdGUtZW5kcG9pbnQ6IHBoYW5kbGUgdG8gYW4gJ2VuZHBvaW50JyBzdWJub2RlIG9mIGEgcmVtb3RlIGRldmljZSBub2RlLgorCmRpZmYgLS1naXQgYS9Eb2N1bWVudGF0aW9uL2RldmljZXRyZWUvYmluZGluZ3MvaTJjL3RyaXZpYWwtZGV2aWNlcy50eHQgYi9Eb2N1bWVudGF0aW9uL2RldmljZXRyZWUvYmluZGluZ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ZWxsIEFybWFkYSAzNzUgU29DIHBpbmN0cmwgZHJpdmVyIGZvciBtcHAKKworUGxlYXNlIHJlZmVyIHRvIG1hcnZlbGwsbXZlYnUtcGluY3RybC50eHQgaW4gdGhpcyBkaXJlY3RvcnkgZm9yIGNvbW1vbiBiaW5kaW5nCitwYXJ0IGFuZCB1c2FnZS4KKworUmVxdWlyZWQgcHJvcGVydGllczoKKy0gY29tcGF0aWJsZTogIm1hcnZlbGwsODhmNjcyMC1waW5jdHJsIgorLSByZWc6IHJlZ2lzdGVyIHNwZWNpZmllciBvZiBNUFAgcmVnaXN0ZXJzCisKK0F2YWlsYWJsZSBtcHAgcGlucy9ncm91cHMgYW5kIGZ1bmN0aW9uczoKK05vdGU6IGJyYWNrZXRzICh4KSBhcmUgbm90IHBhcnQgb2YgdGhlIG1wcCBuYW1lIGZvciBtYXJ2ZWxsLGZ1bmN0aW9uIGFuZCBnaXZlbgorb25seSBmb3IgbW9yZSBkZXRhaWxlZCBkZXNjcmlwdGlvbiBpbiB0aGlzIGRvY3VtZW50LgorCituYW1lICAgICAgICAgIHBpbnMgICAgIGZ1bmN0aW9ucworPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KK21wcDAgICAgICAgICAgMCAgICAgICAgZ3BpbywgZGV2KGFkMiksIHNwaTAoY3MxKSwgc3BpMShjczEpCittcHAxICAgICAgICAgIDEgICAgICAgIGdwaW8sIGRldihhZDMpLCBzcGkwKG1vc2kpLCBzcGkxKG1vc2kpCittcHAyICAgICAgICAgIDIgICAgICAgIGdwaW8sIGRldihhZDQpLCBwdHAoZXZlbnRyZXEpLCBsZWQoYzApLCBhdWRpbyhzZGkpCittcHAzICAgICAgICAgIDMgICAgICAgIGdwaW8sIGRldihhZDUpLCBwdHAodHJpZ2dlbiksIGxlZChwMyksIGF1ZGlvKG1jbGspCittcHA0ICAgICAgICAgIDQgICAgICAgIGdwaW8sIGRldihhZDYpLCBzcGkwKG1pc28pLCBzcGkxKG1pc28pCittcHA1ICAgICAgICAgIDUgICAgICAgIGdwaW8sIGRldihhZDcpLCBzcGkwKGNzMiksIHNwaTEoY3MyKQorbXBwNiAgICAgICAgICA2ICAgICAgICBncGlvLCBkZXYoYWQwKSwgbGVkKHAxKSwgYXVkaW8ocmNsaykKK21wcDcgICAgICAgICAgNyAgICAgICAgZ3BpbywgZGV2KGFkMSksIHB0cChjbGspLCBsZWQocDIpLCBhdWRpbyhleHRjbGspCittcHA4ICAgICAgICAgIDggICAgICAgIGdwaW8sIGRldiAoYm9vdGNzKSwgc3BpMChjczApLCBzcGkxKGNzMCkKK21wcDkgICAgICAgICAgOSAgICAgICAgZ3BpbywgbmYod2VuKSwgc3BpMChzY2spLCBzcGkxKHNjaykKK21wcDEwICAgICAgICAxMCAgICAgICAgZ3BpbywgbmYocmVuKSwgZHJhbSh2dHRjdHJsKSwgbGVkKGMxKQorbXBwMTEgICAgICAgIDExICAgICAgICBncGlvLCBkZXYoYTApLCBsZWQoYzIpLCBhdWRpbyhzZG8pCittcHAxMiAgICAgICAgMTIgICAgICAgIGdwaW8sIGRldihhMSksIGF1ZGlvKGJjbGspCittcHAxMyAgICAgICAgMTMgICAgICAgIGdwaW8sIGRldihyZWFkeW4pLCBwY2llMChyc3RvdXRuKSwgcGNpZTEocnN0b3V0bikKK21wcDE0ICAgICAgICAxNCAgICAgICAgZ3BpbywgaTJjMChzZGEpLCB1YXJ0MSh0eGQpCittcHAxNSAgICAgICAgMTUgICAgICAgIGdwaW8sIGkyYzAoc2NrKSwgdWFydDEocnhkKQorbXBwMTYgICAgICAgIDE2ICAgICAgICBncGlvLCB1YXJ0MCh0eGQpCittcHAxNyAgICAgICAgMTcgICAgICAgIGdwaW8sIHVhcnQwKHJ4ZCkKK21wcDE4ICAgICAgICAxOCAgICAgICAgZ3BpbywgdGRtKGludG4pCittcHAxOSAgICAgICAgMTkgICAgICAgIGdwaW8sIHRkbShyc3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NwaTEoc2NrKQorbXBwMzUgICAgICAgIDM1ICAgICAgICBncGlvLCBnZTEocnhjdGwpLCBzcGkxKGNzMSksIHNwaTAoY3MyKQorbXBwMzYgICAgICAgIDM2ICAgICAgICBncGlvLCBwY2llMChjbGtyZXEpCittcHAzNyAgICAgICAgMzcgICAgICAgIGdwaW8sIHBjaWUwKGNsa3JlcSksIHRkbShpbnRuKSwgZ2UobWRjKQorbXBwMzggICAgICAgIDM4ICAgICAgICBncGlvLCBwY2llMShjbGtyZXEpLCBnZShtZGlvKQorbXBwMzkgICAgICAgIDM5ICAgICAgICBncGlvLCByZWYoY2xrb3V0KQorbXBwNDAgICAgICAgIDQwICAgICAgICBncGlvLCB1YXJ0MSh0eGQpCittcHA0MSAgICAgICAgNDEgICAgICAgIGdwaW8sIHVhcnQxKHJ4ZCkKK21wcDQyICAgICAgICA0MiAgICAgICAgZ3Bpbywgc3BpMShjczIpLCBsZWQoYzApCittcHA0MyAgICAgICAgNDMgICAgICAgIGdwaW8sIHNhdGEwKHByc250KSwgZHJhbSh2dHRjdHJsKQorbXBwNDQgICAgICAgIDQ0ICAgICAgICBncGlvLCBzYXRhMChwcnNudCkKK21wcDQ1ICAgICAgICA0NSAgICAgICAgZ3Bpbywgc3BpMChjczIpLCBwY2llMChyc3RvdXRuKQorbXBwNDYgICAgICAgIDQ2ICAgICAgICBncGlvLCBsZWQocDApLCBnZTAodHhkMCksIGdlMSh0eGQwKQorbXBwNDcgICAgICAgIDQ3ICAgICAgICBncGlvLCBsZWQocDEpLCBnZTAodHhkMSksIGdlMSh0eGQxKQorbXBwNDggICAgICAgIDQ4ICAgICAgICBncGlvLCBsZWQocDIpLCBnZTAodHhkMiksIGdlMSh0eGQyKQorbXBwNDkgICAgICAgIDQ5ICAgICAgICBncGlvLCBsZWQocDMpLCBnZTAodHhkMyksIGdlMSh0eGQzKQorbXBwNTAgICAgICAgIDUwICAgICAgICBncGlvLCBsZWQoYzApLCBnZTAocnhkMCksIGdlMShyeGQwKQorbXBwNTEgICAgICAgIDUxICAgICAgICBncGlvLCBsZWQoYzEpLCBnZTAocnhkMSksIGdlMShyeGQxKQorbXBwNTIgICAgICAgIDUyICAgICAgICBncGlvLCBsZWQoYzIpLCBnZTAocnhkMiksIGdlMShyeGQyKQorbXBwNTMgICAgICAgIDUzICAgICAgICBncGlvLCBwY2llMShyc3RvdXRuKSwgZ2UwKHJ4ZDMpLCBnZTEocnhkMykKK21wcDU0ICAgICAgICA1NCAgICAgICAgZ3BpbywgcGNpZTAocnN0b3V0biksIGdlMChyeGN0bCksIGdlMShyeGN0bCkKK21wcDU1ICAgICAgICA1NSAgICAgICAgZ3BpbywgZ2UwKHJ4Y2xrKSwgZ2UxKHJ4Y2xrKQorbXBwNTYgICAgICAgIDU2ICAgICAgICBncGlvLCBnZTAodHhjbGtvdXQpLCBnZTEodHhjbGtvdXQpCittcHA1NyAgICAgICAgNTcgICAgICAgIGdwaW8sIGdlMCh0eGN0bCksIGdlMSh0eGN0bCkKK21wcDU4ICAgICAgICA1OCAgICAgICAgZ3BpbywgbGVkKGMwKQorbXBwNTkgICAgICAgIDU5ICAgICAgICBncGlvLCBsZWQoYzEpCittcHA2MCAgICAgICAgNjAgICAgICAgIGdwaW8sIHVhcnQxKHR4ZCksIGxlZChjMikKK21wcDYxICAgICAgICA2MSAgICAgICAgZ3BpbywgaTJjMShzZGEpLCB1YXJ0MShyeGQpLCBzcGkxKGNzMiksIGxlZChwMCkKK21wcDYyICAgICAgICA2MiAgICAgICAgZ3BpbywgaTJjMShzY2spLCBsZWQocDEpCittcHA2MyAgICAgICAgNjMgICAgICAgIGdwaW8sIHB0cCh0cmlnZ2VuKSwgbGVkKHAyKQorbXBwNjQgICAgICAgIDY0ICAgICAgICBncGlvLCBkcmFtKHZ0dGN0cmwpLCBsZWQocDMpCittcHA2NSAgICAgICAgNjUgICAgICAgIGdwaW8sIHNhdGExKHByc250KQorbXBwNjYgICAgICAgIDY2ICAgICAgICBncGlvLCBwdHAoZXZlbn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mb3IgbWFydmVsbCxmdW5jdGlvbiBhbmQgZ2l2ZW4KK29ubHkgZm9yIG1vcmUgZGV0YWlsZWQgZGVzY3JpcHRpb24gaW4gdGhpcyBkb2N1bWVudC4KKworbmFtZSAgICAgICAgICBwaW5zICAgICBmdW5jdGlvbnMKKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CittcHAwICAgICAgICAgIDAgICAgICAgIGdwaW8sIHVhMChyeGQpCittcHAxICAgICAgICAgIDEgICAgICAgIGdwaW8sIHVhMCh0eGQpCittcHAyICAgICAgICAgIDIgICAgICAgIGdwaW8sIGkyYzAoc2NrKQorbXBwMyAgICAgICAgICAzICAgICAgICBncGlvLCBpMmMwKHNkYSkKK21wcDQgICAgICAgICAgNCAgICAgICAgZ3BpbywgZ2UobWRjKSwgdWExKHR4ZCksIHVhMChydHMpCittcHA1ICAgICAgICAgIDUgICAgICAgIGdwaW8sIGdlKG1kaW8pLCB1YTEocnhkKSwgdWEwKGN0cykKK21wcDYgICAgICAgICAgNiAgICAgICAgZ3BpbywgZ2UwKHR4Y2xrb3V0KSwgZ2UwKGNycyksIGRldihjczMpCittcHA3ICAgICAgICAgIDcgICAgICAgIGdwaW8sIGdlMCh0eGQwKSwgZGV2KGFkOSkKK21wcDggICAgICAgICAgOCAgICAgICAgZ3BpbywgZ2UwKHR4ZDEpLCBkZXYoYWQxMCkKK21wcDkgICAgICAgICAgOSAgICAgICAgZ3BpbywgZ2UwKHR4ZDIpLCBkZXYoYWQxMSkKK21wcDEwICAgICAgICAgMTAgICAgICAgZ3BpbywgZ2UwKHR4ZDMpLCBkZXYoYWQxMikKK21wcDExICAgICAgICAgMTEgICAgICAgZ3BpbywgZ2UwKHR4Y3RsKSwgZGV2KGFkMTMpCittcHAxMiAgICAgICAgIDEyICAgICAgIGdwaW8sIGdlMChyeGQwKSwgcGNpZTAocnN0b3V0KSwgcGNpZTEocnN0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EwKHByc250KSwgc2QwKGNtZCksIGRldihib290Y3MpCittcHAyMiAgICAgICAgIDIyICAgICAgIGdwaW8sIHNwaTAobW9zaSksIGRldihhZDApCittcHAyMyAgICAgICAgIDIzICAgICAgIGdwaW8sIHNwaTAoc2NrKSwgZGV2KGFkMikKK21wcDI0ICAgICAgICAgMjQgICAgICAgZ3Bpbywgc3BpMChtaXNvKSwgdWEwKGN0cyksIHVhMShyeGQpLCBzZDAoZDQpLCBkZXYocmVhZHkpCittcHAyNSAgICAgICAgIDI1ICAgICAgIGdwaW8sIHNwaTAoY3MwKSwgdWEwKHJ0cyksIHVhMSh0eGQpLCBzZDAoZDUpLCBkZXYoY3MwKQorbXBwMjYgICAgICAgICAyNiAgICAgICBncGlvLCBzcGkwKGNzMiksIGkyYzEoc2NrKSwgc2QwKGQ2KSwgZGV2KGNzMSkKK21wcDI3ICAgICAgICAgMjcgICAgICAgZ3Bpbywgc3BpMChjczMpLCBnZTEodHhjbGtvdXQpLCBpMmMxKHNkYSksIHNkMChkNyksIGRldihjczIpCittcHAyOCAgICAgICAgIDI4ICAgICAgIGdwaW8sIGdlMSh0eGQwKSwgc2QwKGNsayksIGRldihhZDUpCittcHAyOSAgICAgICAgIDI5ICAgICAgIGdwaW8sIGdlMSh0eGQxKSwgZGV2KGFsZTApCittcHAzMCAgICAgICAgIDMwICAgICAgIGdwaW8sIGdlMSh0eGQyKSwgZGV2KG9lbikKK21wcDMxICAgICAgICAgMzEgICAgICAgZ3BpbywgZ2UxKHR4ZDMpLCBkZXYoYWxlMSkKK21wcDMyICAgICAgICAgMzIgICAgICAgZ3BpbywgZ2UxKHR4Y3RsKSwgZGV2KHdlbjApCittcHAzMyAgICAgICAgIDMzICAgICAgIGdwaW8sIG0oZGVjY19lcnIpLCBkZXYoYWQzKQorbXBwMzQgICAgICAgICAzNCAgICAgICBncGlvLCBkZXYoYWQxKQorbXBwMzUgICAgICAgICAzNSAgICAgICBncGlvLCByZWYoY2xrX291dDEpLCBkZXYoYTEpCittcHAzNiAgICAgICAgIDM2ICAgICAgIGdwaW8sIHB0cCh0cmlnX2dlbiksIGRldihhMCkKK21wcDM3ICAgICAgICAgMzcgICAgICAgZ3BpbywgcHRwKGNsayksIGdlMShyeGNsayksIHNkMChkMyksIGRldihhZDgpCittcHAzOCAgICAgICAgIDM4ICAgICAgIGdwaW8sIHB0cChldmVudF9yZXEpLCBnZTEocnhkMSksIHJlZihjbGtfb3V0MCksIHNkMChkMCksIGRldihhZDQpCittcHAzOSAgICAgICAgIDM5ICAgICAgIGdwaW8sIGkyYzEoc2NrKSwgZ2UxKHJ4ZDIpLCB1YTAoY3RzKSwgc2QwKGQxKSwgZGV2KGEyKQorbXBwNDAgICAgICAgICA0MCAgICAgICBncGlvLCBpMmMxKHNkYSksIGdlMShyeGQzKSwgdWEwKHJ0cyksIHNkMChkMiksIGRldihhZDYpCittcHA0MSAgICAgICAgIDQxICAgICAgIGdwaW8sIHVhMShyeGQpLCBnZTEocnhjdGwpLCB1YTAoY3RzKSwgc3BpMShjczMpLCBkZXYoYnVyc3QvbGFzdCkKK21wcDQyICAgICAgICAgNDIgICAgICAgZ3BpbywgdWExKHR4ZCksIHVhMChydHMpLCBkZXYoYWQ3KQorbXBwNDMgICAgICAgICA0MyAgICAgICBncGlvLCBwY2llMChjbGtyZXEpLCBtKHZ0dF9jdHJsKSwgbShkZWNjX2VyciksIHBjaWUwKHJzdG91dCksIGRldihjbGtvdXQpCittcHA0NCAgICAgICAgIDQ0ICAgICAgIGdwaW8sIHNhdGEwKHByc250KSwgc2F0YTEocHJzbnQpLCBzYXRhMihwcnNudCkgWzJdLCBzYXRhMyhwcnNudCkgWzNdLCBwY2llMChyc3RvdXQpCittcHA0NSAgICAgICAgIDQ1ICAgICAgIGdwaW8sIHJlZihjbGtfb3V0MCksIHBjaWUwKHJzdG91dCksIHBjaWUxKHJzdG91dCkgWzFdLCBwY2llMihyc3RvdXQpLCBwY2llMyhyc3RvdXQpCittcHA0NiAgICAgICAgIDQ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ZWZpbml0aW9ucyBhcyBkZWZpbmVkIGluCisgICBEb2N1bWVudGF0aW9uL2RldmljZXRyZWUvYmluZGluZ3MvbWVkaWEvdmlkZW8taW50ZXJmYWNlcy50eHQsCisgICBjb3JyZXNwb25kaW5nIHRvIHRoZSBmb3VyIGlucHV0cyB0byB0aGUgSERNSSBtdWx0aXBsZXhlci4KKworT3B0aW9uYWwgcHJvcGVydGllczoKKyAtIGRkYy1pMmMtYnVzOiBwaGFuZGxlIG9mIGFuIEkyQyBjb250cm9sbGVyIHVzZWQgZm9yIEREQyBFRElEIHByb2JpbmcKKworZXhhbXBsZToKKworCWdwcjogaW9tdXhjLWdwckAwMjBlMDAwMCB7CisJCS8qIC4uLiAqLworCX07CisKKyAgICAgICAgaGRtaTogaGRtaUAwMTIwMDAwIHsKKyAgICAgICAgICAgICAgICAjYWRkcmVzcy1jZWxscyA9IDwxPjsKKyAgICAgICAgICAgICAgICAjc2l6ZS1jZWxscyA9IDwwPjsKKyAgICAgICAgICAgICAgICBjb21wYXRpYmxlID0gImZzbCxpbXg2cS1oZG1pIjsKKyAgICAgICAgICAgICAgICByZWcgPSA8MHgwMDEyMDAwMCAweDkwMDA+OworICAgICAgICAgICAgICAgIGludGVycnVwdHMgPSA8MCAxMTUgMHgwND47CisgICAgICAgICAgICAgICAgZ3ByID0gPCZncHI+OworICAgICAgICAgICAgICAgIGNsb2NrcyA9IDwmY2xrcyAxMjM+LCA8JmNsa3MgMTI0PjsKKyAgICAgICAgICAgICAgICBjbG9jay1uYW1lcyA9ICJpYWhiIiwgImlzZnIiOworICAgICAgICAgICAgICAgIGRkYy1pMmMtYnVzID0gPCZpMmMyPjsKKworICAgICAgICAgICAgICAgIHBvcnRAMCB7CisgICAgICAgICAgICAgICAgICAgICAgICByZWcgPSA8MD47CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGhkbWlfbXV4XzA6IGVuZHBvaW50IHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3RlLWVuZHBvaW50ID0gPCZpcHUxX2RpMF9oZG1pPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIH07CisgICAgICAgICAgICAgICAgfTsKKworICAgICAgICAgICAgICAgIHBvcnRAMSB7CisgICAgICAgICAgICAgICAgICAgICAgICByZWcgPSA8MT47CisKKyAgICAgICAgICAgICAgICAgICAgICAgIGhkbWlfbXV4XzE6IGVuZHBvaW50IHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3RlLWVuZHBvaW50ID0gPCZpcHUxX2RpMV9oZG1pPjsKKyAgICAgICAgICAgICAgICAgICAgICAgIH07CisgICAgICAgICAgICAgICAgfTsKKyAgICAgICAgfTsKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9zdGFnaW5nL2lteC1kcm0vbGRiLnR4dCBiL0RvY3VtZW50YXRpb24vZGV2aWNldHJlZS9iaW5kaW5ncy9zdGFnaW5nL2lteC1kcm0vbGRiLnR4dAppbmRleCBlZDkzNzc4Li41NzhhMWZjIDEwMDY0NAotLS0gYS9Eb2N1bWVudGF0aW9uL2RldmljZXRyZWUvYmluZGluZ3Mvc3RhZ2luZy9pbXgtZHJtL2xkYi50eHQKKysrIGIvRG9jdW1lbnRhdGlvbi9kZXZpY2V0cmVlL2JpbmRpbmdzL3N0YWdpbmcvaW14LWRybS9sZGIudHh0CkBAIC01MCwxMiArNTAsMTQgQEAKIAogUmVxdWlyZWQgcHJvcGVydGllczoKICAtIHJlZyA6IHNob3VsZCBiZSA8MD4gb3IgPDE+Ci0gLSBjcnRjcyA6IGEgbGlzdCBvZiBwaGFuZGxlcyB3aXRoIGluZGV4IHBvaW50aW5nIHRvIHRoZSBJUFUgZGlzcGxheSBpbnRlcmZhY2VzCi0gICAgICAgICAgIHRoYXQgY2FuIGJlIHVzZWQgYXMgdmlkZW8gc291cmNlIGZvciB0aGlzIGNoYW5uZWwuCiAgLSBmc2wsZGF0YS1tYXBwaW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AgICArLS0tLS0tLS0tLS0rICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgXFwgICAgICAvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcICAgICAgLy8KKyAgICAgICAgKy0tLS0tLS0tLS0tLSsgICAgICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0rCisgICAgICAgIHwgSS9PIERyaXZlciB8ICAgICAgICAgICAgICAgICAgICAgICAgICB8IEkvTyBEcml2ZXIgfAorICAgICAgICArLS0tLS0tLS0tLS0tKyAgICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgfHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHx8CisgICAgICstLS0tLS0tLS0tLS0tLS0tLS0rICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0tKworICAgICB8IFRyYW5zcG9ydCBEcml2ZXIgfCAgICAgICAgICAgICAgICAgICAgfCBUcmFuc3BvcnQgRHJpdmVyIHwKKyAgICAgKy0tLS0tLS0tLS0tLS0tLS0tLSsgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0rCisgICAgICAgICAgICAgICAgICAgICAgIFxfX18gICAgICAgICAgICAgICAgX19fLworICAgICAgICAgICAgICAgICAgICAgICAgICAgXCAgICAgICAgICAgICAgLworICAgICAgICAgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICBISUQgQ29yZSAgICB8CisgICAgICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tKworICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAgfCAgICAgICAgfCAgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAvICAgfCAgICAgICAgfCAgIFwKKyAgICAgICAgICAgICBfX19fX19fX19fX18vICAgIHwgICAgICAgIHwgICAgXF9fX19fX19fX19fX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DIsMTMgKzEwMiwxOCBAQAogICAgICAgICAgICAgICAgICAgICAgICAgIFRoZSAnbWluaW11bScgTUFDIGlzIHdoYXQgeW91IHNldCB3aXRoIGRzdG1hYy4KIAogIHBnc2V0ICJmbGFnIFtuYW1lXSIgICAgIFNldCBhIGZsYWcgdG8gZGV0ZXJtaW5lIGJlaGF2aW91ci4gIEN1cnJlbnQgZmxhZ3MKLSAgICAgICAgICAgICAgICAgICAgICAgICBhcmU6IElQU1JDX1JORCAjSVAgU291cmNlIGlzIHJhbmRvbSAoYmV0d2VlbiBtaW4vbWF4KSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElQRFNUX1JORCwgVURQU1JDX1JORCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVEUERTVF9STkQsIE1BQ1NSQ19STkQsIE1BQ0RTVF9STkQgCisgICAgICAgICAgICAgICAgICAgICAgICAgYXJlOiBJUFNSQ19STkQgIyBJUCBzb3VyY2UgaXMgcmFuZG9tIChiZXR3ZWVuIG1pbi9tYXgpCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJUERTVF9STkQgIyBJUCBkZXN0aW5hdGlvbiBpcyByYW5kb20KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVEUFNSQ19STkQsIFVEUERTVF9STkQsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQUNTUkNfUk5ELCBNQUNEU1RfUk5ECisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUWFNJWkVfUk5ELCBJUFY2LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTVBMU19STkQsIFZJRF9STkQsIFNWSURfUk5ECisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGTE9XX1NFUSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFFVRVVFX01BUF9STkQgIyBxdWV1ZSBtYXAgcmFuZG9tCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBRVUVVRV9NQVBfQ1BVICMgcXVldWUgbWFwIG1pcnJvcnMgc21wX3Byb2Nlc3Nvcl9pZCgpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJUFNFQyAjIE1ha2UgSVBzZWMgZW5jYXBzdWxhdGlvbiBmb3IgcGFja2V0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVRFBDU1VNLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSVBTRUMgIyBJUHNlYyBlbmNhcHN1bGF0aW9uIChuZWVkcyBDT05GSUdfWEZSTSkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5PREVfQUxMT0MgIyBub2RlIHNwZWNpZmljIG1lbW9yeSBhbGxvY2F0aW9uCiAKICBwZ3NldCBzcGkgU1BJX1ZBTFVFICAgICBTZXQgc3BlY2lmaWMgU0EgdXNlZCB0byB0cmFuc2Zvcm0gcGFja2V0LgogCkBAIC0yMzMsMTMgKzIzOCwyMiBAQAogCiBmbGFnCiAgIElQU1JDX1JORAotICBUWFNJWkVfUk5ECiAgIElQRFNUX1JORAogICBVRFBTUkNfUk5ECiAgIFVEUERTVF9STkQKICAgTUFDU1JDX1JORAogICBNQUNEU1RfUk5ECisgIFRYU0laRV9STkQKKyAgSVBWNgorICBNUExTX1JORAorICBWSURfUk5ECisgIFNWSURfUk5ECisgIEZMT1dfU0VRCisgIFFVRVVFX01BUF9STkQKKyAgUVVFVUVfTUFQX0NQVQorICBVRFBDU1VNCiAgIElQU0VDCisgIE5PREVfQUxMT0MKIAogZHN0X21pbgogZHN0X21heApkaWZmIC0tZ2l0IGEvRG9jdW1lbnRhdGlvbi9uZXR3b3JraW5nL3J4cnBjLnR4dCBiL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9yeHJwYy50eHQKaW5kZXggYjg5YmM4MmUuLjE2YTkyNGMgMTAwNjQ0Ci0tLSBhL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9yeHJwYy50eHQKKysrIGIvRG9jdW1lbnRhdGlvbi9uZXR3b3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FZSODc4CmRpZmYgLS1naXQgYS9Eb2N1bWVudGF0aW9uL3ZpZGVvNGxpbnV4L0NBUkRMSVNULmN4MjM4ODUgYi9Eb2N1bWVudGF0aW9uL3ZpZGVvNGxpbnV4L0NBUkRMSVNULmN4MjM4ODUKaW5kZXggOWYwNTZkNS4uZmMwMDlkMCAxMDA2NDQKLS0tIGEvRG9jdW1lbnRhdGlvbi92aWRlbzRsaW51eC9DQVJETElTVC5jeDIzODg1CisrKyBiL0RvY3VtZW50YXRpb24vdmlkZW80bGludXgvQ0FSRExJU1QuY3gyMzg4NQpAQCAtMzEsMTAgKzMxLDEzIEBACiAgMzAgLT4gTmV0VVAgRHVhbCBEVkItVC9DLUNJIFJGICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsxYjU1OmUyZTRdCiAgMzEgLT4gTGVhZHRlayBXaW5mYXN0IFB4RFZSMzIwMCBIIFhDNDAwMCAgICAgICAgICAgICAgICAgIFsxMDdkOjZmMzldCiAgMzIgLT4gTVBYLTg4NQotIDMzIC0+IE15Z2ljYSBYODUwNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTRmMTo4NTAyXQorIDMzIC0+IE15Z2ljYSBYODUwMi9YODUwNyBJU0RCLVQgICAgICAgICAgICAgICAgICAgICAgICAgICBbMTRmMTo4NTAyXQogIDM0IC0+IFRlcnJhVGVjIENpbmVyZ3kgVCBQQ0llIER1YWwgICAgICAgICAgICAgICAgICAgICAgICBbMTUzYjoxMTdlXQogIDM1IC0+IFRlVmlpIFM0NzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbZDQ3MTo5MDIyXQogIDM2IC0+IEhhdXBwYXVnZSBXaW5UVi1IVlIxMjU1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBbMDA3MDoyMjU5XQogIDM3IC0+IFByb2YgUmV2b2x1dGlvbiBEVkItUzIgODAwMCAgICAgICAgICAgICAgICAgICAgICAgICBbODAwMDozMDM0XQogI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ChlbTI4MjAvZW0yODQwKSBbMTg1YjoyMDQxXQorIDU5IC0+IFBpbm5hY2xlIFBDVFYgSEQgTWluaSAgICAgICAgICAgICAgICAgICAgKGVtMjg3NCkgICAgICAgIFsyMzA0OjAyM2ZdCiAgNjAgLT4gSGF1cHBhdWdlIFdpblRWIEhWUiA4NTAgICAgICAgICAgICAgICAgICAoZW0yODgzKSAgICAgICAgWzIwNDA6NjUxZl0KICA2MSAtPiBQaXhlbHZpZXcgUGxheVRWIEJveCA0IFVTQiAyLjAgICAgICAgICAgIChlbTI4MjAvZW0yODQwKQogIDYyIC0+IEdhZG1laSBUVlIyMDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVtMjgyMC9lbTI4NDApCkBAIC04NiwzICs4Nyw4IEBACiAgODYgLT4gUENUViBRdWF0cm9TdGljayBuYW5vICg1MjBlKSAgICAgICAgICAgICAoZW0yODg0KSAgICAgICAgWzIwMTM6MDI1MV0KICA4NyAtPiBUZXJyYXRlYyBDaW5lcmd5IEhUQyBVU0IgWFMgICAgICAgICAgICAgIChlbTI4ODQpICAgICAgICBbMGNjZDowMDhlLDBjY2Q6MDBhY10KICA4OCAtPiBDMyBUZWNoIERpZ2l0YWwgRHVvIEhEVFYvU0RUViBVU0IgICAgICAgIChlbTI4ODQpICAgICAgICBbMWI4MDplNzU1XQorIDg5IC0+IERlbG9jayA2MTk1OSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVtMjg3NCkgICAgICAgIFsxYjgwOmUxY2NdCisgOTAgLT4gS1dvcmxkIFVTQiBBVFNDIFRWIFN0aWNrIFVCNDM1LVEgVjIgICAgICAoZW0yODc0KSAgICAgICAgWzFiODA6ZTM0Nl0KKyA5MSAtPiBTcGVlZExpbmsgVmljaW91cyBBbmQgRGV2aW5lIExhcGxhY2Ugd2ViY2FtIChlbTI3NjUpICAgICAgICBbMWFlNzo5MDAzLDFhZTc6OTAwNF0KKyA5MiAtPiBQQ1RWIERWQi1TMiBTdGljayAoNDYx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ZJR19CVF9SRkNPTU1fVFRZPXkKK0NPTkZJR19CVF9CTkVQPXkKK0NPTkZJR19CVF9CTkVQX01DX0ZJTFRFUj15CitDT05GSUdfQlRfQk5FUF9QUk9UT19GSUxURVI9eQorQ09ORklHX0JUX0hJRFA9eQorQ09ORklHX0JUX0hDSUJUVVNCPXkKK0NPTkZJR19DRkc4MDIxMT15CitDT05GSUdfQ0ZHODAyMTFfV0VYVD15CitDT05GSUdfTUFDODAyMTE9eQorQ09ORklHX0RFVlRNUEZTPXkKK0NPTkZJR19ERVZUTVBGU19NT1VOVD15CitDT05GSUdfTVREPXkKK0NPTkZJR19NVERfQ01ETElORV9QQVJUUz15CitDT05GSUdfTVREX0JMT0NLPXkKK0NPTkZJR19NVERfQ0ZJPXkKK0NPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TPXkKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CitDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9NMjVQODA9eQorQ09ORklHX01URF9TU1QyNUw9eQorQ09ORklHX01URF9OQU5EPXkKK0NPTkZJR19NVERfTkFORF9FQ0NfQkNIPXkKK0NPTkZJR19NVERfTkFORF9BVTE1NTA9eQorQ09ORklHX01URF9OQU5EX1BMQVRGT1JNPXkKK0NPTkZJR19FRVBST01fQVQyND15CitDT05GSUdfRUVQUk9NX0FUMjU9eQorQ09ORklHX1NDU0lfVEdUPXkKK0NPTkZJR19CTEtfREVWX1NEPXkKK0NPTkZJR19DSFJfREVWX1NHPXkKK0NPTkZJR19TQ1NJX01VTFRJX0xVTj15CitDT05GSUdfQVRBPXkKK0NPTkZJR19QQVRBX0hQVDM3WD15CitDT05GSUdfUEFUQV9IUFQzWDJOPXkKK0NPTkZJR19QQVRBX1BDTUNJQT15CitDT05GSUdfUEFUQV9QTEFURk9STT15CitDT05GSUdfTkVUREVWSUNFUz15CitDT05GSUdfTkxNT049eQorQ09ORklHX1BDTUNJQV8zQzU4OT15CitDT05GSUdfTU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NUEZTX1BPU0lYX0FDTD15CitDT05GSUdfQ09ORklHRlNfRlM9eQorQ09ORklHX0pGRlMyX0ZTPXkKK0NPTkZJR19KRkZTMl9TVU1NQVJZPXkKK0NPTkZJR19KRkZTMl9DT01QUkVTU0lPTl9PUFRJT05TPXkKK0NPTkZJR19KRkZTMl9MWk89eQorQ09ORklHX0pGRlMyX1JVQklOPXkKK0NPTkZJR19TUVVBU0hGUz15CitDT05GSUdfU1FVQVNIRlNfRklMRV9ESVJFQ1Q9eQorQ09ORklHX1NRVUFTSEZTX1hBVFRSPXkKK0NPTkZJR19TUVVBU0hGU19MWk89eQorQ09ORklHX1NRVUFTSEZTX1haPXkKK0NPTkZJR19GMkZTX0ZTPXkKK0NPTkZJR19GMkZTX0ZTX1NFQ1VSSVRZPXkKK0NPTkZJR19ORlNfRlM9eQorQ09ORklHX05GU19WM19BQ0w9eQorQ09ORklHX05GU19WND15CitDT05GSUdfTkZTX1Y0XzE9eQorQ09ORklHX05GU19WNF8yPXkKK0NPTkZJR19ORlNfVjRfMV9JTVBMRU1FTlRBVElPTl9JRF9ET01BSU49ImxvY2FsIgorQ09ORklHX05GU19WNF8xX01JR1JBVElPTj15CitDT05GSUdfTkZTRD15CitDT05GSUdfTkZTRF9WM19BQ0w9eQorQ09ORklHX05GU0RfVjQ9eQorQ09ORklHX05MU19DT0RFUEFHRV80Mzc9eQorQ09ORklHX05MU19DT0RFUEFHRV84NTA9eQorQ09ORklHX05MU19DT0RFUEFHRV84NTI9eQorQ09ORklHX05MU19DT0RFUEFHRV8xMjUwPXkKK0NPTkZJR19OTFNfQVNDSUk9eQorQ09ORklHX05MU19JU084ODU5XzE9eQorQ09ORklHX05MU19JU084ODU5XzI9eQorQ09ORklHX05MU19JU084ODU5XzE1PXkKK0NPTkZJR19OTFNfVVRGOD15CitDT05GSUdfTUFHSUNfU1lTUlE9eQorQ09ORklHX1NFQ1VSSVRZRlM9eQorQ09ORklHX0NSWVBUT19VU0VSPXkKK0NPTkZJR19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AgICAgXAotKCgxIDw8IENQMEMxX00pIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICgwIDw8IENQMEMxX0MyKSB8ICgwIDw8IENQMEMxX01EKSB8ICgwIDw8IENQMEMxX1BDKSB8ICAgICAgICAgICAgXAotICgwIDw8IENQMEMxX1dSKSB8ICgwIDw8IENQMEMxX0NBKSB8ICgxIDw8IENQMEMxX0VQKSB8ICAgICAgICAgICAgXAorI2RlZmluZSBNSVBTX0NPTkZJRzEJCQkJCQlcCisoKDEgPDwgQ1AwQzFfTSkgfAkJCQkJCVwKKyAoMCA8PCBDUDBDMV9DMikgfCAoMCA8PCBDUDBDMV9NRCkgfCAoMCA8PCBDUDBDMV9QQykgfAkJXAorICgwIDw8IENQMEMxX1dSKSB8ICgwIDw8IENQMEMxX0NBKSB8ICgxIDw8IENQMEMxX0VQKSB8CQlcCiAgKDAgPDwgQ1AwQzFfRlApKQogCiAvKiBIYXZlIGNvbmZpZzMsIG5vIHRlcnRpYXJ5L3NlY29uZGFyeSBjYWNoZXMgaW1wbGVtZW50ZWQgKi8KLSNkZWZpbmUgTUlQU19DT05GSUcyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyNkZWZpbmUgTUlQU19DT05GSUcyCQkJCQkJXAogKCgxIDw8IENQMEMyX00pKQogCiAvKiBObyBjb25maWc0LCBubyBEU1AgQVNFLCBubyBsYXJnZSBwaHlzYWRkciAoUEFCSVRTKSwKICAgIG5vIGV4dGVybmFsIGludGVycnVwdCBjb250cm9sbGVyLCBubyB2ZWN0b3JlZCBpbnRlcnJ1cHRzLAogICAgbm8gMWtiIHBhZ2VzLCBubyBTbWFydE1JUFMgQVNFLCBubyB0cmFjZSBsb2dpYyAqLwotI2RlZmluZSBNSVBTX0NPTkZJRzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotKCgwIDw8IENQMEMzX00pIHwg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Gljb24gR3JhcGhpY3MsIEluYy4KKyAqIENvcHlyaWdodCAoQykgMjAxNCBJbWFnaW5hdGlvbiBUZWNobm9sb2dpZXMgTHRkLgogICoKICAqIFRoaXMgZmlsZSBjb250YWlucyBleGNlcHRpb24gaGFuZGxlciBmb3IgYWRkcmVzcyBlcnJvciBleGNlcHRpb24gd2l0aCB0aGUKICAqIHNwZWNpYWwgY2FwYWJpbGl0eSB0byBleGVjdXRlIGZhdWx0aW5nIGluc3RydWN0aW9ucyBpbiBzb2Z0d2FyZS4gIFRoZQpAQCAtMTEwLDggKzExMSw4IEBACiAjaWZkZWYgX19CSUdfRU5ESUFOCiAjZGVmaW5lICAgICBMb2FkSFcoYWRkciwgdmFsdWUsIHJlcykgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCIuc2V0XHRub2F0XG4iICAgICAgICBcCi0JCQkiMTpcdGxiXHQlMCwgMCglMilcbiIgICAgICAgICAgICAgICBcCi0JCQkiMjpcdGxidVx0JDEsIDEoJTIpXG5cdCIgICAgICAgICAgICBcCisJCQkiMTpcdCJ1c2VyX2xiKCIlMCIsICIwKCUyKSIpIlxuIiAgICBcCisJCQkiMjpcdCJ1c2VyX2xidSgiJDEiLCAiMSglMikiKSJcblx0IiBcCiAJCQkic2xsXHQlMCwgMHg4XG5cdCIgICAgICAgICAgICAgICAgICBcCiAJCQkib3JcdCUwLCAkMVxuXHQiICAgICAgICAgICAgICAgICAgICBcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0xMzAsOCArMTMxLDggQEAKIAogI2RlZmluZSAgICAgTG9hZFcoYWRkciwgdmFsdWUsIHJlcykgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHRsd2xcdCUwLCAoJTIpXG4iICAgICAgICAgICAgICAgXAotCQkJIjI6XHRsd3JcdCUwLCAzKCUyKVxuXHQiICAgICAgICAgICAgXAorCQkJIjE6XHQidXNlcl9sd2woIiUwIiwgIiglMikiKSJcbiIgICAgXAorCQkJIjI6XHQidXNlcl9sd3IoIiUwIiwgIjMoJTIpIikiXG5cdCIgXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjM6XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5pbnNuXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMTQ5LDggKzE1MCw4IEBACiAjZGVmaW5lICAgICBMb2FkSFdVKGFkZHIsIHZhbHVlLCByZXMpIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0bm9hdFxuIiAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdGxidVx0JTAsIDAoJTIpXG4iICAgICAgICAgICAgICBcCi0JCQkiMjpcdGxidVx0JDEsIDEoJTIpXG5cdCIgICAgICAgICAgICBcCisJCQkiMTpcdCJ1c2VyX2xidSgiJTAiLCAiMCglMikiKSJcbiIgICBcCisJCQkiMjpcdCJ1c2VyX2xidSgiJDEiLCAiMSglMikiKSJcblx0IiBcCiAJCQkic2xsXHQlMCwgMHg4XG5cdCIgICAgICAgICAgICAgICAgICBcCiAJCQkib3JcdCUwLCAkMVxuXHQiICAgICAgICAgICAgICAgICAgICBcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0xNzAsOCArMTcxLDggQEAKIAogI2RlZmluZSAgICAgTG9hZFdVKGFkZHIsIHZhbHVlLCByZXMpICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHRsd2xcdCUwLCAoJTIpXG4iICAgICAgICAgICAgICAgXAotCQkJIjI6XHRsd3JcdCUwLCAzKCUyKVxuXHQiICAgICAgICAgICAgXAorCQkJIjE6XHQidXNlcl9sd2woIiUwIiwgIiglMikiKSJcbiIgICAgXAorCQkJIjI6XHQidXNlcl9sd3IoIiUwIiwgIjMoJTIpIikiXG5cdCIgXAogCQkJImRzbGxcdCUwLCAlMCwgMzJcblx0IiAgICAgICAgICAgICAgXAogCQkJImRzcmxcdCUwLCAlMCwgMzJcblx0IiAgICAgICAgICAgICAgXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMjA5LDkgKzIxMCw5IEBACiAjZGVmaW5lICAgICBTdG9yZUhXKGFkZHIsIHZhbHVlLCByZXMpIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0bm9hdFxuIiAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdHNiXHQlMSwgMSglMilcblx0IiAgICAgICAgICAgICBcCisJCQkiMTpcdCJ1c2VyX3NiKCIlMSIsICIxKCUyKSIpIlxuIiAgICBcCiAJCQkic3JsXHQkMSwgJTEsIDB4OFxuIiAgICAgICAgICAgICAgICBcCi0JCQkiMjpcdHNiXHQkMSwgMCglMilcblx0IiAgICAgICAgICAgICBcCisJCQkiMjpcdCJ1c2VyX3NiKCIkMSIsICIwKCUyKSIpIlxuIiAgICBcCiAJCQkiLnNldFx0YXRcblx0IiAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkibGlcdCUwLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiMzpcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0yMjksOCArMjMwLDggQEAKIAogI2RlZmluZSAgICAgU3RvcmVXKGFkZHIsIHZhbHVlLCByZXMpICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHRzd2xcdCUxLCglMilcbiIgICAgICAgICAgICAgICAgXAotCQkJIjI6XHRzd3JcdCUxLCAzKCUyKVxuXHQiICAgICAgICAgICAgXAorCQkJIjE6XHQidXNlcl9zd2woIiUxIiwgIiglMikiKSJcbiIgICAgXAorCQkJIjI6XHQidXNlcl9zd3IoIiUxIiwgIjMoJTIpIikiXG5cdCIgXAogCQkJImxpXHQlMCwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjM6XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5pbnNuXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMjY3LDggKzI2OCw4IEBACiAjaWZkZWYgX19MSVRUTEVfRU5ESUFOCiAjZGVmaW5lICAgICBMb2FkSFcoYWRkciwgdmFsdWUsIHJlcykgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCIuc2V0XHRub2F0XG4iICAgICAgICBcCi0JCQkiMTpcdGxiXHQlMCwgMSglMilcbiIgICAgICAgICAgICAgICBcCi0JCQkiMjpcdGxidVx0JDEsIDAoJTIpXG5cdCIgICAgICAgICAgICBcCisJCQkiMTpcdCJ1c2VyX2xiKCIlMCIsICIxKCUyKSIpIlxuIiAgICBcCisJCQkiMjpcdCJ1c2VyX2xidSgiJDEiLCAiMCglMikiKSJcblx0IiBcCiAJCQkic2xsXHQlMCwgMHg4XG5cdCIgICAgICAgICAgICAgICAgICBcCiAJCQkib3JcdCUwLCAkMVxuXHQiICAgICAgICAgICAgICAgICAgICBcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0yODcsOCArMjg4LDggQEAKIAogI2RlZmluZSAgICAgTG9hZFcoYWRkciwgdmFsdWUsIHJlcykgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHRsd2xcdCUwLCAzKCUyKVxuIiAgICAgICAgICAgICAgXAotCQkJIjI6XHRsd3JcdCUwLCAoJTIpXG5cdCIgICAgICAgICAgICAgXAorCQkJIjE6XHQidXNlcl9sd2woIiUwIiwgIjMoJTIpIikiXG4iICAgXAorCQkJIjI6XHQidXNlcl9sd3IoIiUwIiwgIiglMikiKSJcblx0IiAgXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjM6XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5pbnNuXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMzA2LDggKzMwNyw4IEBACiAjZGVmaW5lICAgICBMb2FkSFdVKGFkZHIsIHZhbHVlLCByZXMpIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0bm9hdFxuIiAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdGxidVx0JTAsIDEoJTIpXG4iICAgICAgICAgICAgICBcCi0JCQkiMjpcdGxidVx0JDEsIDAoJTIpXG5cdCIgICAgICAgICAgICBcCisJCQkiMTpcdCJ1c2VyX2xidSgiJTAiLCAiMSglMikiKSJcbiIgICBcCisJCQkiMjpcdCJ1c2VyX2xidSgiJDEiLCAiMCglMikiKSJcblx0IiBcCiAJCQkic2xsXHQlMCwgMHg4XG5cdCIgICAgICAgICAgICAgICAgICBcCiAJCQkib3JcdCUwLCAkMVxuXHQiICAgICAgICAgICAgICAgICAgICBcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0zMjcsOCArMzI4LDggQEAKIAogI2RlZmluZSAgICAgTG9hZFdVKGFkZHIsIHZhbHVlLCByZXMpICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHRsd2xcdCUwLCAzKCUyKVxuIiAgICAgICAgICAgICAgXAotCQkJIjI6XHRsd3JcdCUwLCAoJTIpXG5cdCIgICAgICAgICAgICAgXAorCQkJIjE6XHQidXNlcl9sd2woIiUwIiwgIjMoJTIpIikiXG4iICAgXAorCQkJIjI6XHQidXNlcl9sd3IoIiUwIiwgIiglMikiKSJcblx0IiAgXAogCQkJImRzbGxcdCUwLCAlMCwgMzJcblx0IiAgICAgICAgICAgICAgXAogCQkJImRzcmxcdCUwLCAlMCwgMzJcblx0IiAgICAgICAgICAgICAgXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMzY2LDkgKzM2Nyw5IEBACiAjZGVmaW5lICAgICBTdG9yZUhXKGFkZHIsIHZhbHVlLCByZXMpIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0bm9hdFxuIiAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdHNiXHQlMSwgMCglMilcblx0IiAgICAgICAgICAgICBcCisJCQkiMTpcdCJ1c2VyX3NiKCIlMSIsICIwKCUyKSIpIlxuIiAgICBcCiAJCQkic3JsXHQkMSwlMSwgMHg4XG4iICAgICAgICAgICAgICAgICBcCi0JCQkiMjpcdHNiXHQkMSwgMSglMilcblx0IiAgICAgICAgICAgICBcCisJCQkiMjpcdCJ1c2VyX3NiKCIkMSIsICIxKCUyKSIpIlxuIiAgICBcCiAJCQkiLnNldFx0YXRcblx0IiAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkibGlcdCUwLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiMzpcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0zODYsOCArMzg3LDggQEAKIAogI2RlZmluZSAgICAgU3RvcmVXKGFkZHIsIHZhbHVlLCByZXMpICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHRzd2xcdCUxLCAzKCUyKVxuIiAgICAgICAgICAgICAgXAotCQkJIjI6XHRzd3JcdCUxLCAoJTIpXG5cdCIgICAgICAgICAgICAgXAorCQkJIjE6XHQidXNlcl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6IGxpICAgICVbY291bnRdLCAweDEwMCAgICAgICAgICAgICBcbiIgLyogd2FpdCBmb3IgaW5pdCBsb29wICovCisJCSIyOiBibmV6ICAlW2NvdW50XSwgMmIgICAgICAgICAgICAgICAgXG4iIC8qIGxpbWl0IG1haWxib3ggYWNjZXNzICovCisJCSIgICBhZGRpdSAlW2NvdW50XSwgLTEgICAgICAgICAgICAgICAgXG4iCisJCSIgICBsZCAgICAlW2luaXRmdW5jXSwgMHgyMCglW2Jhc2VdKSAgXG4iIC8qIGdldCBQQyB2aWEgbWFpbGJveCAqLworCQkiICAgYmVxeiAgJVtpbml0ZnVuY10sIDFiICAgICAgICAgICAgIFxuIgorCQkiICAgbm9wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuIgorCQkiICAgbGQgICAgJHNwLCAweDI4KCVbYmFzZV0pICAgICAgICAgIFxuIiAvKiBnZXQgU1AgdmlhIG1haWxib3ggKi8KKwkJIiAgIGxkICAgICRncCwgMHgzMCglW2Jhc2VdKSAgICAgICAgICBcbiIgLyogZ2V0IEdQIHZpYSBtYWlsYm94ICovCisJCSIgICBsZCAgICAkYTEsIDB4MzgoJVtiYXNlXSkgICAgICAgICAgXG4iCisJCSIgICBqciAgICAlW2luaXRmdW5jXSAgICAgICAgICAgICAgICAgXG4iIC8qIGp1bXAgdG8gaW5pdGlhbCBQQyAqLworCQkiICAgbm9wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxuIgorCQkiICAgLnNldCBwb3AgICAgICAgICAgICAgICAgICAgICAgICAgIFxuIgorCQk6IFtjb3JlXSAiPSZyIiAoY29yZSksIFtub2RlXSAiPSZyIiAobm9kZSksCisJCSAgW2Jhc2VdICI9JnIiIChiYXNlKSwgW2NwdWlkXSAiPSZyIiAoY3B1aWQpLAorCQkgIFtjb3VudF0gIj0mciIgKGNvdW50KSwgW2luaXRmdW5jXSAiPSZyIiAoaW5pdGZ1bmMpCisJCTogLyogTm8gSW5wdXQgKi8KKwkJOiAiYT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C0gLSAtIC0gfCAtIC0gLSAtIHwgLSAtIC0gLSB8IC0gLSAtIC0gfAotICogICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWyAgICAgIHRocmVzaF9jbXAgICAgIF0gICBbICB0aHJlc2hfY3RsICAgXQotICogICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAqICAgKi0gRUJCIChMaW51eCkgICAgICAgICAgICAgICAgICAgICAgdGhyZXNoIHN0YXJ0L3N0b3AgT1IgRkFCIG1hdGNoIC0qCisgKiAgIHwgfCBbIF0gICAgICAgICAgICAgICAgICAgICAgICAgICBbICAgICAgdGhyZXNoX2NtcCAgICAgXSAgIFsgIHRocmVzaF9jdGwgICBdCisgKiAgIHwgfCAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICogICB8IHwgICotIElGTSAoTGludXgpICAgICAgICAgICAgICAgICB0aHJlc2ggc3RhcnQvc3RvcCBPUiBGQUIgbWF0Y2ggLSoKKyAqICAgfCAqLSBCSFJCIChMaW51eCkKKyAqICAgKi0gRUJCIChMaW51eCkKICAqCiAgKiAgICAgICAgMjggICAgICAgIDI0ICAgICAgICAyMCAgICAgICAgMTYgICAgICAgIDEyICAgICAgICAgOCAgICAgICAgIDQgICAgICAgICAwCiAgKiB8IC0gLSAtIC0gfCAtIC0gLSAtIHwgLSAtIC0gLSB8IC0gLSAtIC0gfCAtIC0gLSAtIHwgLSAtIC0gLSB8IC0gLSAtIC0gfCAtIC0gLSAtIHwKQEAgLTExNCw5ICsxMTgsMTggQEAKICAqCU1NQ1JBWzU3OjU5XSA9IHNhbXBsZVswOjJdCShSQU5EX1NBTVBfRUxJRykKIMKgKglNTUNSQVs2MTo2Ml0gPSBzYW1wbGVbMzo0XQkoUkFORF9TQU1QX01PREUpCiAgKgorICogaWYgRUJCIGFuZCBCSFJCOg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vdW50IG9mIGV2ZW50cyBmb3IgZWFjaCBQTUMuCi0gKiAgICAgIEwxIEkvRCBxdWFsaWZpZXIgLSogICAgICAgICAgICAgICAgICAgICB8ICAgICAgICBwMSwgcDIsIHAzLCBwNCwgcDUsIHA2LgorICogICAgICAgICAgICAgICBbIF0gfCAgIFsgXSAgIFsgIHNhbXBsZSBdICAgWyAgICAgXSAgIFs2XSBbNV0gICBbNF0gWzNdICAgWzJdIFsxXQorICogICAgICAgICAgICAgICAgfCAgfCAgICB8ICAgICAgICAgICAgICAgICAgICAgfAorICogICAgICBCSFJCIElGTSAtKiAgfCAgICB8ICAgICAgICAgICAgICAgICAgICAgfCAgICAgIENvdW50IG9mIGV2ZW50cyBmb3IgZWFjaCBQTUMuCisgKiAgICAgICAgICAgICAgRUJCIC0qICAgIHwgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICBwMSwgcDIsIHAzLCBwNCwgcDUsIHA2LgorICogICAgICBMMSBJL0QgcXVhbGlmaWVyIC0qICAgICAgICAgICAgICAgICAgICAgfAogICogICAgICAgICAgICAgICAgICAgICBuYyAtIG51bWJlciBvZiBjb3VudGVycyAtKgogICoKICAqIFRoZSBQTUMgZmllbGRzIFAxLi5QNiwgYW5kIE5DLCBhcmUgYWRkZXIgZmllbGRzLiBBcyB3ZSBhY2N1bXVsYXRlIGNvbnN0cmFpbnRzCkBAIC0xOTUsNiArMjE1LDkgQEAKICNkZWZpbmUgQ05TVF9FQkJfVkFMKHYpCQkoKCh2KSAmIEVWRU5UX0VCQl9NQVNLKSA8PCAyNCkKICNkZWZpbmUgQ05TVF9FQkJfTUFTSwkJQ05TVF9FQkJfVkFMKEVWRU5UX0VCQl9NQVNLKQogCisjZGVmaW5lIENOU1RfSUZNX1ZBTCh2KQkJKCgodikgJiBFVkVOVF9JRk1fTUFTSykgPDwgMjUpCisjZGVmaW5lIENOU1RfSUZNX01BU0sJCUNOU1RfSUZNX1ZBTChFVkVOVF9JRk1fTUFTSykKKwogI2RlZmluZ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CQVNFLCBCVUZGRVJfUFRSCS8qIGlzIGN1cnJlbnQgYmxvY2sgdGhlIGxhc3Qgb25lPyAqLworCWplCV9sb29wCisKKwltb3YJVEIsIEIKKworCS8qIFByb2Nlc3Mgc2Vjb25kIGJsb2NrICovCisJLyoKKwkgKiByb3VuZHMKKwkgKiAgMCs4MCwgMis4MCwgNCs4MCwgNis4MCwgOCs4MAorCSAqIDEwKzgwLDEyKzgwLDE0KzgwLDE2KzgwLDE4KzgwCisJICovCisKKwkuc2V0IGosIDAKKwkucmVwdCAxMAorCQlSUglqKzgwCisJCS5zZXQgaiwgaisyCisJLmVuZHIKKworCWptcAlfbG9vcDEKK19sb29wMToKKwkvKgorCSAqIHJvdW5kcworCSAqIDIwKzgwLDIyKzgwLDI0KzgwLDI2KzgwLDI4KzgwCisJICogMzArODAsMzIrODAsMzQrODAsMzYrODAsMzgrODAKKwkgKi8KKwkucmVwdCAxMAorCQlSUglqKzgwCisJCS5zZXQgaiwgaisyCisJLmVuZHIKKworCWptcAlfbG9vcDIKK19sb29wMjoKKworCS8qCisJICogcm91bmRzCisJICogNDArODAsNDIrODAsNDQrODAsNDYrODAsNDgrODAKKwkgKiA1MCs4MCw1Mis4MCw1NCs4MCw1Nis4MCw1OCs4MAorCSAqLworCS5yZXB0IDEwCisJCVJSCWorODAKKwkJLnNldCBqLCBqKzIKKwkuZW5kcgorCisJYWRkCSQoMio2NCksIEJVRkZFUl9QVFIyICAgICAgLyogbW92ZSB0byBuZXh0IGV2ZW4tNjQtYnl0ZSBibG9jayAqLworCisJY21wCUJVRkZFUl9FTkQsIEJVRkZFUl9QVFIyICAgLyogaXMgY3VycmVudCBibG9jayB0aGUgbGFzdCBvbmUgKi8KKwljbW92YWUJS19CQVNFLCBCVUZGRVJfUFRSICAgICAgIC8qIHNpZ25hbCB0aGUgbGFzdCBpdGVyYXRpb24gc21hcnRseSAqLworCisJam1wCV9sb29wMworX2xvb3AzOgorCisJLyoKKwkgKiByb3VuZHMKKwkgKiA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ZSBYQVBJQyBpcyB1c2VkICAgICAgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgICAgICAgID0gMCA6IHRoZSBYQVBJQyBpcyBub3QgdXNlZCwgaWU6Ki8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgICAgICAgICAgICBpbnRzIGZ3ZGVkIHRvIGFub3RoZXIgWEFQSUMgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgIEJpdHMxOjcgUmVzZXJ2ZWQgICAgICAgICAgICAgICAgICAgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRm9yIENZQzogIEJpdHMwOjcgUmVzZXJ2ZWQgICAgICAgICAgICAgICAgICAgICAgKi8KLQl1bnNpZ25lZCBjaGFyIFdQX2luZGV4OyAgICAgLyogRm9yIFdQRUc6IFdQRUcgaW5zdGFuY2UgaW5kZXggLSBsb3dlciBvbmVzIGhhdmUgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgIGxvd2VyIHNsb3QgbnVtYmVycy9QQ0kgYnVzIG51bWJlcnMgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRm9yIENZQzogIE5vIG1lYW5pbmcgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQl1bnNpZ25lZCBjaGFyIGNoYXNzaXNfbnVtOyAgLyogMSBiYXNlZCBDaGFzc2lzIG51bWJlciAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRm9yIExvb2tPdXQgV1BFR3MgdGhpcyBmaWVsZCBpbmRpY2F0ZXMgdGhlICAgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogRXhwYW5zaW9uIENoYXNzaXMgIywgZW51bWVyYXRlZCBmcm9tIEJvb3QgICAgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogTm9kZSBXUEVHIGV4dGVybmFsIHBvcnQsIHRoZW4gQm9vdCBOb2RlIENZQyAgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZXh0ZXJuYWwgcG9ydCwgdGhlbiBOZXh0IFZpZ2lsIGNoYXNzaXMgV1BFRyAgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZXh0ZXJuYWwgcG9ydCwgZXRjLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogU2hhcmVkIExvb2tvdXRzIGhhdmUgb25seSAxIGNoYXNzaXMgbnVtYmVyICh0aGUgKi8KLQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZmlyc3Qgb25lIGFzc2lnbmVkKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLX0gX19hdHRyaWJ1dGVfXygocGFja2VkKSk7Ci0KLQotdHlwZWRlZiBlbnVtIHsKLQlDb21wYXRUd2lzdGVyID0gMCwgIC8qIENvbXBhdGliaWxpdHkgVHdpc3RlciAgICAgICAgICAgICAgICovCi0JQWx0VHdpc3RlciAgICA9IDEsICAvKiBBbHRlcm5hdGUgVHdpc3RlciBvZiBpbnRlcm5hbCA4LXdheSAqLwotCUNvbXBhdEN5Y2xvbmUgPSAyLCAgLyogQ29tcGF0aWJpbGl0eSBDeWNsb25lICAgICAgICAgICAgICAgKi8KLQlBbHRDeWNsb25lICAgID0gMywgIC8qIEFsdGVybmF0ZSBDeWNsb25lIG9mIGludGVybmFsIDgtd2F5ICovCi0JQ29tcGF0V1BFRyAgICA9IDQsICAvKiBDb21wYXRpYmlsaXR5IFdQRUcgICAgICAgICAgICAgICAgICAqLwotCUFsdFdQRUcgICAgICAgPSA1LCAgLyogU2Vjb25kIFBsYW5hciBXUEVHICAgICAgICAgICAgICAgICAgKi8KLQlMb29rT3V0QVdQRUcgID0gNiwgIC8qIExv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ltY19ldmVudF9kZWwoc3RydWN0IHBlcmZfZXZlbnQgKmV2ZW50LCBpbnQgZmxhZ3MpCit7CisJc3RydWN0IGludGVsX3VuY29yZV9ib3ggKmJveCA9IHVuY29yZV9ldmVudF90b19ib3goZXZlbnQpOworCWludCBpOworCisJc25iX3VuY29yZV9pbWNfZXZlbnRfc3RvcChldmVudCwgUEVSRl9FRl9VUERBVEUpOworCisJZm9yIChpID0gMDsgaSA8IGJveC0+bl9ldmVudHM7IGkrKykgeworCQlpZiAoZXZlbnQgPT0gYm94LT5ldmVudF9saXN0W2ldKSB7CisJCQktLWJveC0+bl9ldmVudHM7CisJCQlicmVhazsKKwkJfQorCX0KK30KKworc3RhdGljIGludCBzbmJfcGNpMnBoeV9tYXBfaW5pdChpbnQgZGV2aWQpCit7CisJc3RydWN0IHBjaV9kZXYgKmRldiA9IE5VTEw7CisJaW50IGJ1czsKKworCWRldiA9IHBjaV9nZXRfZGV2aWNlKFBDSV9WRU5ET1JfSURfSU5URUwsIGRldmlkLCBkZXYpOworCWlmICghZGV2KQorCQlyZXR1cm4gLUVOT1RUWTsKKworCWJ1cyA9IGRldi0+YnVzLT5udW1iZXI7CisKKwlwY2lidXNfdG9fcGh5c2lkW2J1c10gPSAwOworCisJcGNpX2Rldl9wdXQoZGV2KTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgc3RydWN0IHBtdSBzbmJfdW5jb3JlX2ltY19wbXUgPSB7CisJLnRhc2tfY3R4X25yCT0gcGVyZl9pbnZhbGlkX2NvbnRleHQsCisJLmV2ZW50X2luaXQJPSBzbmJfdW5jb3JlX2ltY19ldmVudF9pbml0LAorCS5hZGQJCT0gc25iX3VuY29yZV9pbWNfZXZlbnRfYWRkLAorCS5kZWwJCT0gc25iX3VuY29yZV9pbWNfZXZlbnRfZGVsLAorCS5zdGFydAkJPSBzbmJfdW5jb3JlX2ltY19ldmVudF9zdGFydCwKKwkuc3RvcAkJPSBzbmJfdW5jb3JlX2ltY19ldmVudF9zdG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gc2VxX2ZpbGUgKm0sIHBncHJvdF90IHByb3QsIGludCBsZXZlbCwgYm9vbCBkbXNnKQogewogCXBncHJvdHZhbF90IHByID0gcGdwcm90X3ZhbChwcm90KTsKIAlzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGxldmVsX25hbWVbXSA9CkBAIC05OSw0NyArMTE4LDQ3IEBACiAKIAlpZiAoIXBncHJvdF92YWwocHJvdCkpIHsKIAkJLyogTm90IHByZXNlbnQgKi8KLQkJc2VxX3ByaW50ZihtLCAiICAgICAgICAgICAgICAgICAgICAgICAgICAiKTsKKwkJcHRfZHVtcF9jb250X3ByaW50ZihtLCBkbXNnLCAiICAgICAgICAgICAgICAgICAgICAgICAgICAiKTsKIAl9IGVsc2UgewogCQlpZiAocHIgJiBfUEFHRV9VU0VSKQotCQkJc2VxX3ByaW50ZihtLCAiVVNSICIpOworCQkJcHRfZHVtcF9jb250X3ByaW50ZihtLCBkbXNnLCAiVVNSICIpOwogCQllbHNlCi0JCQlzZXFfcHJpbnRmKG0sICIgICAgIik7CisJCQlwdF9kdW1wX2NvbnRfcHJpbnRmKG0sIGRtc2csICIgICAgIik7CiAJCWlmIChwciAmIF9QQUdFX1JXKQotCQkJc2VxX3ByaW50ZihtLCAiUlcgIik7CisJCQlwdF9kdW1wX2NvbnRfcHJpbnRmKG0sIGRtc2csICJSVyAiKTsKIAkJZWxzZQotCQkJc2VxX3ByaW50ZihtLCAicm8gIik7CisJCQlwdF9kdW1wX2NvbnRfcHJpbnRmKG0sIGRtc2csICJybyAiKTsKIAkJaWYgKHByICYgX1BBR0VfUFdUKQotCQkJc2VxX3ByaW50ZihtLCAiUFdUICIpOworCQkJcHRfZHVtcF9jb250X3ByaW50ZihtLCBkbXNnLCAiUFdUICIpOwogCQllbHNlCi0JCQlzZXFfcHJpbnRmKG0sICIgICAgIik7CisJCQlwdF9kdW1wX2NvbnRfcHJpbnRmKG0sIGRtc2csICIgICAgIik7CiAJCWlmIChwciAmIF9QQUdFX1B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TEwNTgsOCArOTk0LDQ2IEBACiAJYmxrX21xX3B1dF9jdHgoY3R4KTsKIH0KIAotc3RhdGljIHZvaWQgYmxrX21xX2luaXRfaHdfY29tbWFuZHMoc3RydWN0IGJsa19tcV9od19jdHggKmhjdHgsCi0JCQkJICAgIHZvaWQgKCppbml0KSh2b2lkICosIHN0cnVjdCBibGtfbXFfaHdfY3R4ICosCitzdGF0aWMgaW50IGJsa19tcV9pbml0X2h3X2NvbW1hbmRzKHN0cnVjdCBibGtfbXFfaHdfY3R4ICpoY3R4LAorCQkJCSAgIGludCAoKmluaXQpKHZvaWQgKiwgc3RydWN0IGJsa19tcV9od19jdHggKiwKKwkJCQkJc3RydWN0IHJlcXVlc3QgKiwgdW5zaWduZWQgaW50KSwKKwkJCQkgICB2b2lkICpkYXRhKQoreworCXVuc2lnbmVkIGludCBpOworCWludCByZXQgPSAwOworCisJZm9yIChpID0gMDsgaSA8IGhjdHgtPnF1ZXVlX2RlcHRoOyBpKyspIHsKKwkJc3RydWN0IHJlcXVlc3QgKnJxID0gaGN0eC0+cnFzW2ldOworCisJCXJldCA9IGluaXQoZGF0YSwgaGN0eCwgcnEsIGkpOworCQlpZiAocmV0KQorCQkJYnJlYWs7CisJfQorCisJcmV0dXJuIHJldDsKK30KKworaW50IGJsa19tcV9pbml0X2NvbW1hbmRzKHN0cnVjdCByZXF1ZXN0X3F1ZXVlICpxLAorCQkJIGludCAoKmluaXQpKHZvaWQgKiwgc3RydWN0IGJsa19tcV9od19jdHggKiwKKwkJCQkJc3RydWN0IHJlcXVlc3QgKiwgdW5zaWduZWQgaW50KSwKKwkJCSB2b2lkICpkYXRhKQoreworCXN0cnVjdCBibGtfbXFfaHdfY3R4ICpoY3R4OworCXVuc2lnbmVkIGludCBpOworCWludCByZXQgPSAwOworCisJcXVldWVfZm9yX2VhY2hfaHdfY3R4KHEsIGhjdHgsIGkpIHsKKwkJcmV0ID0gYmxrX21xX2luaXRfaHdfY29tbWFuZHMoaGN0eCwgaW5p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9jb25jdXJyZW50X25vZGVfY291bnQpOworQUNQSV9HTE9CQUwoYWNwaV9zaXplICosIGFjcGlfZ2JsX2VudHJ5X3N0YWNrX3BvaW50ZXIpOworQUNQSV9HTE9CQUwoYWNwaV9zaXplICosIGFjcGlfZ2JsX2xvd2VzdF9zdGFja19wb2ludGVyKTsKK0FDUElfR0xPQkFMKHUzMiwgYWNwaV9nYmxfZGVlcGVzdF9uZXN0aW5nKTsKK0FDUElfSU5JVF9HTE9CQUwodTMyLCBhY3BpX2dibF9uZXN0aW5nX2xldmVsLCAwKTsKICNlbmRpZgogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTM3NCwxMSArMzYzLDExIEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLUFDUElfRVhURVJOIHN0cnVjdCBhY3BpX3RocmVhZF9zdGF0ZSAqYWNwaV9nYmxfY3VycmVudF93YWxrX2xpc3Q7CitBQ1BJX0dMT0JBTChzdHJ1Y3QgYWNwaV90aHJlYWRfc3RhdGUgKiwgYWNwaV9nYmxfY3VycmVudF93YWxrX2xpc3QpOwogCiAvKiBDb250cm9sIG1ldGhvZCBzaW5nbGUgc3RlcCBmbGFnICovCiAKLUFDUElfRVhURVJOIHU4IGFjcGlfZ2JsX2NtX3NpbmdsZV9zdGVwOworQUNQSV9HTE9CQUwodTgsIGFjcGlfZ2JsX2NtX3NpbmdsZV9zdGVwKTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgpAQCAtMzg4LDggKzM3Nyw5IEBACiAKIGV4dGVybiBzdHJ1Y3QgYWNwaV9iaXRfcmVnaXN0ZXJfaW5mbwogICAgIGFjcGlfZ2JsX2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mCisjaW5jbHVkZSAiYWNwYXJzZXIuaCIKKyNpbmNsdWRlICJhbWxjb2RlLmgiCiAKICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX0RJU1BBVENIRVIKIEFDUElfTU9EVUxFX05BTUUoImRzbWV0aG9kIikKIAogLyogTG9jYWwgcHJvdG90eXBlcyAqLwogc3RhdGljIGFjcGlfc3RhdHVzCithY3BpX2RzX2RldGVjdF9uYW1lZF9vcGNvZGVzKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKndhbGtfc3RhdGUsCisJCQkgICAgIHVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICoqb3V0X29wKTsKKworc3RhdGljIGFjcGlfc3RhdHVzCiBhY3BpX2RzX2NyZWF0ZV9tZXRob2RfbXV0ZXgodW5pb24gYWNwaV9vcGVyYW5kX29iamVjdCAqbWV0aG9kX2Rlc2MpOwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2F1dG9fc2VyaWFsaXplX21ldGhvZAorICoKKyAqIFBBUkFNRVRFUlM6ICBub2RlICAgICAgICAgICAgICAgICAgICAgICAgLSBOYW1lc3BhY2UgTm9kZSBvZiB0aGUgbWV0aG9kCisgKiAgICAgICAgICAgICAgb2JqX2Rlc2MgICAgICAgICAgICAgICAgICAgIC0gTWV0aG9kIG9iamVjdCBhdHRhY2hlZCB0byBub2RlCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBQYXJzZSBhIGNvbnRyb2wgbWV0aG9kIEFNTCB0byBzY2FuIGZvciBjb250cm9sIG1ldGhvZHMgdGhhdAorICogICAgICAgICAgICAgIG5lZWQgc2VyaWFsaXphdGlvbiBkdWUgdG8gdGhlIGNyZWF0aW9uIG9mIG5hbWVkIG9iamVjdHM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AQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9leHJlZ2lvbi5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9leHJlZ2lvbi5jCmluZGV4IDlkMjg4NjdlLi5jZDUyODhhIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL2V4cmVnaW9uLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS9leHJlZ2lvbi5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9leHJlc250ZS5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9leHJlc250ZS5jCmluZGV4IDdjYTY5MjUuLmFiMDYwMjYgMTAwNjQ0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RJT046IFJlYWNxdWlyZSB0aGUgaW50ZXJwcmV0ZXIgZXhlY3V0aW9uIHJlZ2lvbiBmcm9tIHdpdGhpbiB0aGUKLSAqICAgICAgICAgICAgICBpbnRlcnByZXRlciBjb2RlLiBGYWlsdXJlIHRvIGVudGVyIHRoZSBpbnRlcnByZXRlciByZWdpb24gaXMgYQotICogICAgICAgICAgICAgIGZhdGFsIHN5c3RlbSBlcnJvci4gVXNlZCBpbiBjb25qdW5jdGlvbiB3aXRoCi0gKiAgICAgICAgICAgICAgcmVsaW5xdWlzaF9pbnRlcnByZXRlcgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXZvaWQgYWNwaV9leF9yZWFjcXVpcmVfaW50ZXJwcmV0ZXIodm9pZCkKLXsKLQlBQ1BJX0ZVTkNUSU9OX1RSQUNFKGV4X3JlYWNxdWlyZV9pbnRlcnByZXRlcik7Ci0KLQkvKgotCSAqIElmIHRoZSBnbG9iYWwgc2VyaWFsaXplZCBmbGFnIGlzIHNldCwgZG8gbm90IHJlbGVhc2UgdGhlIGludGVycHJldGVyLAotCSAqIHNpbmNlIGl0IHdhcyBub3QgYWN0dWFsbHkgcmVsZWFzZWQgYnkgYWNwaV9leF9yZWxpbnF1aXNoX2ludGVycHJldGVyLgotCSAqIFRoaXMgZm9yY2VzIHRoZSBpbnRlcnByZXRlciB0byBiZSBzaW5nbGUgdGhyZWFkZWQuCi0JICovCi0JaWYgKCFhY3BpX2dibF9hbGxfbWV0aG9kc19zZXJpYWxpemVkKSB7Ci0JCWFjcGlfZXhfZW50ZXJfaW50ZXJwcmV0ZXIoKTsKLQl9Ci0KLQlyZXR1cm5fVk9JRDsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCiAgKiBGVU5DVElPT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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtMTYwLDQ0ICsxMzgsNiBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX2V4X3JlbGlucXVpc2hfaW50ZXJwcmV0ZXIKLSAqCi0gKiBQQVJBTUVURVJTOiAgTm9uZQotICoKLSAqIFJFVFVSTjogICAgICBOb25lCi0gKgotICogREVTQ1JJUFRJT046IEV4aXQgdGhlIGludGVycHJldGVyIGV4ZWN1dGlvbiByZWdpb24sIGZyb20gd2l0aGluIHRoZQotICogICAgICAgICAgICAgIGludGVycHJldGVyIC0gYmVmb3JlIGF0dGVtcHRpbmcgYW4gb3BlcmF0aW9uIHRoYXQgd2lsbCBwb3NzaWJseQotICogICAgICAgICAgICAgIGJsb2NrIHRoZSBydW5uaW5nIHRocmVhZC4KLSAqCi0gKiBDYXNlcyB3aGVyZSB0aGUgaW50ZXJwcmV0ZXIgaXMgdW5sb2NrZWQgaW50ZXJuYWxseQotICogICAgICAxKSBNZXRob2QgdG8gYmUgYmxvY2tlZCBvbiBhIFNsZWVwKCkgQU1MIG9wY29kZQotICogICAgICAyKSBNZXRob2QgdG8gYmUgYmxvY2tlZCBvbiBhbiBBY3F1aXJlKCkgQU1MIG9wY29kZQotICogICAgICAzKSBNZXRob2QgdG8gYmUgYmxvY2tlZCBvbiBhIFdhaXQoKSBBTUwgb3Bjb2RlCi0gKiAgICAgIDQpIE1ldGhvZCB0byBiZSBibG9ja2VkIHRvIGFjcXVpcmUgdGhlIGdsb2JhbCBsb2NrCi0gKiAgICAgIDUpIE1ldGhvZCB0byBiZSBibG9ja2VkIHdhaXRpbmcgdG8gZXhlY3V0ZSBhIHNlcmlhbGl6ZWQgY29udHJvbCBtZXRob2QKLSAqICAgICAg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yaXZlcnMvYWNwaS9hY3BpY2EvaHdncGUuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvaHdncGUuYwppbmRleCA5NjU0MDUwLi4yZTZjYWFiIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL2h3Z3BlLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS9od2dwZS5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9od3BjaS5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9od3BjaS5jCmluZGV4IDA4ODlhNjIuLmU3MDFkOGMgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvaHdwY2kuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2h3cGNpLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9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iAJICovCiAJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9JTkZPLAotCQkJICAiKioqKiBCZWdpbiBUYWJsZSBNZXRob2QgUGFyc2luZyBhbmQgT2JqZWN0IEluaXRpYWxpemF0aW9uXG4iKSk7CisJCQkgICIqKioqIEJlZ2luIFRhYmxlIE9iamVjdCBJbml0aWFsaXphdGlvblxuIikpOwogCiAJc3RhdHVzID0gYWNwaV9kc19pbml0aWFsaXplX29iamVjdHModGFibGVfaW5kZXgsIG5vZGUpOwogCiAJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9JTkZPLAotCQkJICAiKioqKiBDb21wbGV0ZWQgVGFibGUgTWV0aG9kIFBhcnNpbmcgYW5kIE9iamVjdCBJbml0aWFsaXphdGlvblxuIikpOworCQkJICAiKioqKiBDb21wbGV0ZWQgVGFibGUgT2JqZWN0IEluaXRpYWxpemF0aW9uXG4iKSk7CiAKIAlyZXR1cm5fQUNQSV9TVEFUVVMoc3RhdHVzKTsKIH0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvbnNuYW1lcy5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9uc25hbWVzLmMKaW5kZXggOTBhMDM4MC4uN2VlZTBhNiAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS9uc25hbWVzLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS9uc25hbWVzLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1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bmRpbmcgb3JkZXIuIElmIGl0IGFwcGVhcnMgdGhhdCB0aGUgbGlzdCBpcwogCSAqIGluY29ycmVjdGx5IHNvcnRlZCwgc29ydCBpdC4gV2Ugc29ydCBieSBjcHVfZnJlcXVlbmN5LCBzaW5jZSB0aGlzCiAJICogc2hvdWxkIGJlIHByb3BvcnRpb25hbCB0byB0aGUgcG93ZXIuCkBAIC03NjcsOSArNzc0LDkgQEAKICAqCiAgKiBQQVJBTUVURVJTOiAgaW5mbyAgICAgICAgICAgICAgICAtIE1ldGhvZCBleGVjdXRpb24gaW5mb3JtYXRpb24gYmxvY2sKICAqICAgICAgICAgICAgICByZXR1cm5fb2JqZWN0ICAgICAgIC0gUG9pbnRlciB0byB0aGUgdG9wLWxldmVsIHJldHVybmVkIG9iamVjdAotICogICAgICAgICAgICAgIHN0YXJ0X2luZGV4ICAgICAgICAgLSBJbmRleCBvZiB0aGUgZmlyc3Qgc3ViLXBhY2thZ2UKLSAqICAgICAgICAgICAgICBleHBlY3RlZF9jb3VudCAgICAgIC0gTWluaW11bSBsZW5ndGggb2YgZWFjaCBzdWItcGFja2FnZQotICogICAgICAgICAgICAgIHNvcnRfaW5kZXggICAgICAgICAgLSBTdWItcGFja2FnZSBlbnRyeSB0byBzb3J0IG9uCisgKiAgICAgICAgICAgICAgc3RhcnRfaW5kZXggICAgICAgICAtIEluZGV4IG9mIHRoZSBmaXJzdCBzdWJwYWNrYWdlCisgKiAgICAgICAgICAgICAgZXhwZWN0ZWRfY291bnQgICAgICAtIE1pbmltdW0gbGVuZ3RoIG9mIGVhY2ggc3VicGFja2FnZQorICogICAgICAgICAgICAgIHNvcnRfaW5kZXggICAgICAgICAgLSBTdWJwYWNrYWdlIGVudHJ5IHRvIHNvcnQgb24KICAqICAgICAgICAgICAgICBzb3J0X2RpcmVjdGlvbiAgICAgIC0gQXNjZW5kaW5nIG9yIGRlc2NlbmRpbmcKICAqICAgICAgICAgICAgICBzb3J0X2tleV9uYW1lICAgICAgIC0gT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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfZ2V0X2RhdGEKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2dldF9kYXRhX2Z1bGwKICAqCiAgKiBQQVJBTUVURVJTOiAgb2JqX2hhbmRsZSAgICAgICAgICAtIE5hbWVzcGFjZSBub2RlCiAgKiAgICAgICAgICAgICAgaGFuZGxlciAgICAgICAgICAgICAtIEhhbmRsZXIgdXNlZCBpbiBjYWxsIHRvIGF0dGFjaF9kYXRhCiAgKiAgICAgICAgICAgICAgZGF0YSAgICAgICAgICAgICAgICAtIFdoZXJlIHRoZSBkYXRhIGlzIHJldHVybmVkCisgKiAgICAgICAgICAgICAgY2FsbGJhY2sgICAgICAgICAgICAtIGZ1bmN0aW9uIHRvIGV4ZWN1dGUgYmVmb3JlIHJldHVybmluZwogICoKICAqIFJFVFVSTjogICAgICBTdGF0dXMKICAqCi0gKiBERVNDUklQVElPTjogUmV0cmlldmUgZGF0YSB0aGF0IHdhcyBwcmV2aW91c2x5IGF0dGFjaGVkIHRvIGEgbmFtZXNwYWNlIG5vZGUuCisgKiBERVNDUklQVElPTjogUmV0cmlldmUgZGF0YSB0aGF0IHdhcyBwcmV2aW91c2x5IGF0dGFjaGVkIHRvIGEgbmFtZXNwYWNlIG5vZGUKKyAqICAgICAgICAgICAgICBhbmQgZXhlY3V0ZSBhIGNhbGxiYWNrIGJlZm9yZSByZXR1cm5pbmcuCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIGFjcGlfc3RhdHVzCi1hY3BpX2dldF9kYXRhKGFjcGlfaGFuZGxlIG9ial9oYW5kbGUsIGFjcGlfb2JqZWN0X2hhbmRsZXIgaGFuZGxlciwgdm9pZCAqKmRhdGEpCithY3BpX2dldF9kYXRhX2Z1bGwoYWNwaV9oYW5kbGUgb2JqX2hhbmRsZSwgYWNwaV9vYmplY3RfaGFuZGxlciBoYW5kbGVyLAorCQkgICB2b2lkICoqZGF0YSwgdm9pZCAoKmNhbGxiYWNrKSh2b2lkICopKQogewogCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOwogCWFjcGlfc3RhdHVzIHN0YXR1czsKQEAgLTk2MCwxMCArOTYzLDM0IEBACiAJfQogCiAJc3RhdHVzID0gYWNwaV9uc19nZXRfYXR0YWNoZWRfZGF0YShub2RlLCBoYW5kbGVyLCBkYXRhKTsKKwlpZiAoQUNQSV9TVUNDRVNTKHN0YXR1cykgJiYgY2FsbGJhY2spIHsKKwkJY2FsbGJhY2soKmRhdGEpOworCX0KIAogdW5sb2NrX2FuZF9leGl0OgogCSh2b2lkKWFjcGlfdXRfcmVsZWFzZV9tdXRleChBQ1BJX01UWF9OQU1FU1BBQ0UpOwogCXJldHVybiAoc3RhdHVzKTsKIH0KIAorQUNQSV9FWFBPUlRfU1lNQk9MKGFjcGlfZ2V0X2RhdGFfZnVsbCkKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV9nZXRfZGF0YQorICoKKyAqIFBBUkFNRVRFUlM6ICBvYmpfaGFuZGxlICAgICAgICAgIC0gTmFtZXNwYWNlIG5vZGUKKyAqICAgICAgICAgICAgICBoYW5kbGVyICAgICAgICAgICAgIC0gSGFuZGxlciB1c2VkIGluIGNhbGwgdG8gYXR0YWNoX2RhdGEKKyAqICAgICAgICAgICAgICBkYXRhICAgICAgICAgICAgICAgIC0gV2hlcmUgdGhlIGRhdGEgaXMgcmV0dXJuZWQKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IFJldHJpZXZlIGRhdGEgdGhhdCB3YXMgcHJldmlv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W5kIGJpbmFyeSBmb3Jtcywgd2l0aCBvciB3aXRob3V0CmRpZmYgLS1naXQgYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3JzbWlzYy5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9yc21pc2MuYwppbmRleCBjOTljZWM5Li40MWVlYTRiIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3JzbWlzYy5jCisrKyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvcnNtaXNjLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS9yc3NlcmlhbC5jIGIvZHJpdmVycy9hY3BpL2FjcGljYS9yc3NlcmlhbC5jCmluZGV4IGZlNDlmYzQuLjllODQwNzIgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvcnNzZXJpYWwuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3Jzc2VyaWFsLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwM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YS91dGVycm9yLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dGVycm9yLmMKQEAgLTUsNyArNSw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGV2YWwuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRldmFsLmMKaW5kZXggMTZmYjkwNS4uOGZlZDE0OCAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGV2YWwuYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0ZXZhbC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGV4Y2VwLmMgYi9kcml2ZXJzL2F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YworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0aW5pdC5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGxvY2suYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRsb2NrLmMKaW5kZXggNWMyNmFkNC4uZGM2ZTk2NSAxMDA2NDQKLS0tIGEvZHJpdmVycy9hY3BpL2FjcGljYS91dGxvY2suYworKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0bG9jay5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApkaWZmIC0tZ2l0IGEvZHJpdmVycy9hY3BpL2FjcGljYS91dG1hdGguYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXR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aHQgKEMpIDIwMDAgLSAyMDE0LCBJbnRlbCBDb3JwLgogICogQWxsIHJpZ2h0cyByZXNlcnZlZC4KICAqCiAgKiBSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXQKZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRvc2kuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRvc2kuYwppbmRleCA4ODU2YmQzLi42ODU3NjZmIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0b3NpLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dG9zaS5jCkBAIC01LDcgKzUsNyBAQAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKgotICogQ29weXJpZ2h0IChDKSAyMDAwIC0gMjAxMywgSW50ZWwgQ29ycC4KKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTQsIEludGVsIENvcnAuCiAgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgogICoKICAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dApAQCAtNDcsNiArNDcsMzEgQEAKICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1VUSUxJVElFUwogQUNQSV9NT0RVTEVfTkFNRSgidXRvc2kiKQogCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQUNQSUNBIHBvbGljeSBmb3IgbmV3IF9PU0kgc3RyaW5nczoKKyAqCisgKiBJdCBpcyB0aGUgc3RhdGVkIHBvbGljeSBvZiBBQ1B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2tfc3RhdGlvbiAqZHMsIGFjcGlfaGFuZGxlIGhhbmRsZSkKK2ZpbmRfZG9ja19kZXBlbmRlbnRfZGV2aWNlKHN0cnVjdCBkb2NrX3N0YXRpb24gKmRzLCBzdHJ1Y3QgYWNwaV9kZXZpY2UgKmFkZXYpCiB7CiAJc3RydWN0IGRvY2tfZGVwZW5kZW50X2RldmljZSAqZGQ7CiAKIAlsaXN0X2Zvcl9lYWNoX2VudHJ5KGRkLCAmZHMtPmRlcGVuZGVudF9kZXZpY2VzLCBsaXN0KQotCQlpZiAoaGFuZGxlID09IGRkLT5oYW5kbGUpCisJCWlmIChhZGV2ID09IGRkLT5hZGV2KQogCQkJcmV0dXJuIGRkOwogCiAJcmV0dXJuIE5VTEw7CiB9CiAKK3ZvaWQgcmVnaXN0ZXJfZG9ja19kZXBlbmRlbnRfZGV2aWNlKHN0cnVjdCBhY3BpX2RldmljZSAqYWRldiwKKwkJCQkgICAgYWNwaV9oYW5kbGUgZHNoYW5kbGUpCit7CisJc3RydWN0IGRvY2tfc3RhdGlvbiAqZHMgPSBmaW5kX2RvY2tfc3RhdGlvbihkc2hhbmRsZSk7CisKKwlpZiAoZHMgJiYgIWZpbmRfZG9ja19kZXBlbmRlbnRfZGV2aWNlKGRzLCBhZGV2KSkKKwkJYWRkX2RvY2tfZGVwZW5kZW50X2RldmljZShkcywgYWRldik7Cit9CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogICAgICAgICAgICAgICAgICAgICAgICAgRG9jayBmdW5jdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdGF0aWMgaW50IF9faW5pdCBpc19iYXR0ZXJ5KGFjcGlfaGFuZGxlIGhhbmRsZSkK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zaWduZWQgaW50IGlycTsKKwlzdHJ1Y3QgY2xrICpjbGs7CisJdW5zaWduZWQgbG9uZyByYXRlOworCisJdTMwMF90aW1lcl9iYXNlID0gb2ZfaW9tYXAobnAsIDApOworCWlmICghdTMwMF90aW1lcl9iYXNlKQorCQlwYW5pYygiY291bGQgbm90IGlvcmVtYXAgc3lzdGVtIHRpbWVyXG4iKTsKKworCS8qIEdldCB0aGUgSVJRIGZvciB0aGUgR1AxIHRpbWVyICovCisJaXJxID0gaXJxX29mX3BhcnNlX2FuZF9tYXAobnAsIDIpOworCWlmICghaXJxKQorCQlwYW5pYygibm8gSVJRIGZvciBzeXN0ZW0gdGltZXJcbiIpOworCisJcHJfaW5mbygiVTMwMCBHUDEgdGltZXIgQCBiYXNlOiAlcCwgSVJROiAldVxuIiwgdTMwMF90aW1lcl9iYXNlLCBpcnEpOworCisJLyogQ2xvY2sgdGhlIGludGVycnVwdCBjb250cm9sbGVyICovCisJY2xrID0gb2ZfY2xrX2dldChucCwgMCk7CisJQlVHX09OKElTX0VSUihjbGspKTsKKwljbGtfcHJlcGFyZV9lbmFibGUoY2xrKTsKKwlyYXRlID0gY2xrX2dldF9yYXRlKGNsayk7CisKKwl1MzAwX2Nsb2NrZXZlbnRfZGF0YS50aWNrc19wZXJfamlmZnkgPSBESVZfUk9VTkRfQ0xPU0VTVChyYXRlLCBIWik7CisKKwlzY2hlZF9jbG9ja19yZWdpc3Rlcih1MzAwX3JlYWRfc2NoZWRfY2xvY2ssIDMyLCByYXRlKTsKKworCXUzMDBfZGVsYXlfdGltZXIucmVhZF9jdXJyZW50X3RpbWVyID0gJnUzMDBfcmVhZF9jdXJyZW50X3RpbWVyOworCXUzMDBfZGVsYXlfdGltZXIuZnJlcSA9IHJhdGU7CisJcmVnaXN0ZXJfY3VycmVudF90aW1lcl9kZWxheSgmdTMwMF9kZWxheV90aW1lcik7CisKKwkvKgorCSAqIERpc2FibGUgdGhlICJPUyIgYW5kICJERCIgdGltZXJzIC0gdGh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DsKKwlzdHJ1Y3Qgc2NhdHRlcmxpc3QJCSpvcmlnX291dDsKKwlpbnQJCQkJc2dzX2NvcGllZDsKKworCXN0cnVjdCBzY2F0dGVyX3dhbGsJCWluX3dhbGs7CisJc3RydWN0IHNjYXR0ZXJfd2FsawkJb3V0X3dhbGs7CisJaW50CQkJZG1hX2luOworCXN0cnVjdCBkbWFfY2hhbgkJKmRtYV9sY2hfaW47CisJaW50CQkJZG1hX291dDsKKwlzdHJ1Y3QgZG1hX2NoYW4JCSpkbWFfbGNoX291dDsKKwlpbnQJCQlpbl9zZ19sZW47CisJaW50CQkJb3V0X3NnX2xlbjsKKwlpbnQJCQlwaW9fb25seTsKKwljb25zdCBzdHJ1Y3Qgb21hcF9kZXNfcGRhdGEJKnBkYXRhOworfTsKKworLyoga2VlcCByZWdpc3RlcmVkIGRldmljZXMgZGF0YSBoZXJlICovCitzdGF0aWMgTElTVF9IRUFEKGRldl9saXN0KTsKK3N0YXRpYyBERUZJTkVfU1BJTkxPQ0sobGlzdF9sb2NrKTsKKworI2lmZGVmIERFQlVHCisjZGVmaW5lIG9tYXBfZGVzX3JlYWQoZGQsIG9mZnNldCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJIGludCBfcmVhZF9yZXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCSBfcmVhZF9yZXQgPSBfX3Jhd19yZWFkbChkZC0+aW9fYmFzZSArIG9mZnNldCk7ICAgICAgICAgIFwKKwkgcHJfZXJyKCJvbWFwX2Rlc19yZWFkKCIgI29mZnNldCAiPSUjeCk9ICUjeFxuIiwgICAgICAgXAorCQkgb2Zmc2V0LCBfcmVhZF9yZXQpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJIF9yZWFkX3JldDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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DE3IGlzIHVuZGVmaW5lZCBpbiB0aGUgZGVmYXVsdCBISUQKKyAqIGRlc2NyaXB0b3IgdGhlIGJ1dHRvbiBhbmQgYXhpcyBkZWZpbml0aW9ucyBtdXN0IGJlIG1vdmVkIHRvIHJlcG9ydCAxNyBvcgorICogdGhlIEhJRCBsYXllciB3b24ndCBwcm9jZXNzIHRoZSByZWNlaXZlZCBpbnB1dCBvbmNlIGEgcmVwb3J0IGlzIHNlbnQuCisgKi8KK3N0YXRpYyB1OCBkdWFsc2hvY2s0X2J0X3JkZXNjW10gPSB7CisJMHgwNSwgMHgwMSwgICAgICAgICAvKiAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDA1LCAgICAgICAgIC8qICBVc2FnZSAoR2FtZXBhZCksICAgICAgICAgICAgICAgICAgICAqLworCTB4QTEsIDB4MDEsICAgICAgICAgLyogIENvbGxlY3Rpb24gKEFwcGxpY2F0aW9uKSwgICAgICAgICAgICovCisJMHg4NSwgMHgwMSwgICAgICAgICAvKiAgICAgIFJlcG9ydCBJRCAoMSksICAgICAgICAgICAgICAgICAgKi8KKwkweDc1LCAweDA4LCAgICAgICAgIC8qICAgICAgUmVwb3J0IFNpemUgKDgpLCAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MEEsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDkpLCAgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweDA2LCAweDA0LCAweEZGLCAgIC8qICAgICAgVXNhZ2UgUGFnZSAoRkYwNGgpLCAgICAgICAgICAgICAqLworCTB4ODUsIDB4MDIsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDIpLCAgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyNCwgICAgICAgICAvKiAgICAgIFVzYWdlICgyNGgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDI0LCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzNiksICAgICAgICAgICAgICAqLworCTB4QjEsIDB4MDIsICAgICAgICAgLyogICAgICBGZWF0dXJlIChWYXJpYWJsZSksICAgICAgICAgICAgICovCisJMHg4NSwgMHhBMywgICAgICAgICAvKiAgICAgIFJlcG9ydCBJRCAoMTYzKSwgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDI1LCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDI1aCksICAgICAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MzAsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDQ4KSwgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDA1LCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICg1KSwgICAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MjYsICAgICAgICAgLyogICAgICBVc2FnZSAoMjZoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgyOCwgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNDApLCAgICAgICAgICAgICAgKi8KKwkweEIxLCAweDAyLCAgICAgICAgIC8qICAgICAgRmVhdHVyZSAoVmFyaWFibGUpLCAgICAgICAgICAgICAqLworCTB4ODUsIDB4MDYsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDYpLCAgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyNywgICAgICAgICAvKiAgICAgIFVzYWdlICgyN2gpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDM0LCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICg1MiksICAgICAgICAgICAgICAqLworCTB4QjEsIDB4MDIsICAgICAgICAgLyogICAgICBGZWF0dXJlIChWYXJpYWJsZSksICAgICAgICAgICAgICovCisJMHg4NSwgMHgwNywgICAgICAgICAvKiAgICAgIFJlcG9ydCBJRCAoNyksICAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDI4LCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDI4aCksICAgICAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MzAsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDQ4KSwgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDA4LCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICg4KSwgICAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MjksICAgICAgICAgLyogICAgICBVc2FnZSAoMjloKSwgICAgICAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgyRiwgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNDcpLCAgICAgICAgICAgICAgKi8KKwkweEIxLCAweDAyLCAgICAgICAgIC8qICAgICAgRmVhdHVyZSAoVmFyaWFibGUpLCAgICAgICAgICAgICAqLworCTB4MDYsIDB4MDMsIDB4RkYsICAgLyogICAgICBVc2FnZSBQYWdlIChGRjAzaCksICAgICAgICAgICAgICovCisJMHg4NSwgMHgwMywgICAgICAgICAvKiAgICAgIFJlcG9ydCBJRCAoMyksICAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDIxLCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDIxaCksICAgICAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MjYsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDM4KSwgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDA0LCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICg0KSwgICAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MjIsICAgICAgICAgLyogICAgICBVc2FnZSAoMjJoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgyRSwgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNDYpLCAgICAgICAgICAgICAgKi8KKwkweEIxLCAweDAyLCAgICAgICAgIC8qICAgICAgRmVhdHVyZSAoVmFyaWFibGUpLCAgICAgICAgICAgICAqLworCTB4ODUsIDB4RjAsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDI0MCksICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHg0NywgICAgICAgICAvKiAgICAgIFVzYWdlICg0N2gpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDNGLCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICg2MyksICAgICAgICAgICAgICAqLworCTB4QjEsIDB4MDIsICAgICAgICAgLyogICAgICBGZWF0dXJlIChWYXJpYWJsZSksICAgICAgICAgICAgICovCisJMHg4NSwgMHhGMSwgICAgICAgICAvKiAgICAgIFJlcG9ydCBJRCAoMjQxKSwgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDQ4LCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDQ4aCksICAgICAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4M0YsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDYzKSwgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweEYyLCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgyNDIpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4NDksICAgICAgICAgLyogICAgICBVc2FnZSAoNDloKSwgICAgICAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwRiwgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMTUpLCAgICAgICAgICAgICAgKi8KKwkweEIxLCAweDAyLCAgICAgICAgIC8qICAgICAgRmVhdHVyZSAoVmFyaWFibGUpLCAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTEsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDE3KSwgICAgICAgICAgICAgICAgICovCisJMHgwNiwgMHgwMCwgMHhGRiwgICAvKiAgICAgIFVzYWdlIFBhZ2UgKEZGMDBoKSwgICAgICAgICAgICAgKi8KKwkweDA5LCAweDIwLCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDIwaCksICAgICAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MDIsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDIpLCAgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweDA1LCAweDAxLCAgICAgICAgIC8qICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAqLworCTB4MDksIDB4MzAsICAgICAgICAgLyogICAgICBVc2FnZSAoWCksICAgICAgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgzMSwgICAgICAgICAvKiAgICAgIFVzYWdlIChZKSwgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDMyLCAgICAgICAgIC8qICAgICAgVXNhZ2UgKFopLCAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzUsICAgICAgICAgLyogICAgICBVc2FnZSAoUnopLCAgICAgICAgICAgICAgICAgICAgICovCisJMHgxNSwgMHgwMCwgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWluaW11bSAoMCksICAgICAgICAgICAgKi8KKwkweDI2LCAweEZGLCAweDAwLCAgIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICgyNTUpLCAgICAgICAgICAqLworCTB4NzUsIDB4MDgsICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoOCksICAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwNCwgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNCksICAgICAgICAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzksICAgICAgICAgLyogICAgICBVc2FnZSAoSGF0IFN3aXRjaCksICAgICAgICAgICAgICovCisJMHgxNSwgMHgwMCwgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWluaW11bSAoMCksICAgICAgICAgICAgKi8KKwkweDI1LCAweDA3LCAgICAgICAgIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICg3KSwgICAgICAgICAgICAqLworCTB4NzUsIDB4MDQsICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoNCksICAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KKwkweDgxLCAweDQyLCAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlLCBOdWxsIFN0YXRlKSwgICAqLworCTB4MDUsIDB4MDksICAgICAgICAgLyogICAgICBVc2FnZSBQYWdlIChCdXR0b24pLCAgICAgICAgICAgICovCisJMHgxOSwgMHgwMSwgICAgICAgICAvKiAgICAgIFVzYWdlIE1pbmltdW0gKDAxaCksICAgICAgICAgICAgKi8KKwkweDI5LCAweDBFLCAgICAgICAgIC8qICAgICAgVXNhZ2UgTWF4aW11bSAoMEVoKSwgICAgICAgICAgICAqLworCTB4MTUsIDB4MDAsICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksICAgICAgICAgICAgKi8KKwkweDc1LCAweDAxLCAgICAgICAgIC8qICAgICAgUmVwb3J0IFNpemUgKDEpLCAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MEUsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDE0KSwgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweDc1LCAweDA2LCAgICAgICAgIC8qICAgICAgUmVwb3J0IFNpemUgKDYpLCAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MDEsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMSwgICAgICAgICAvKiAgICAgIElucHV0IChDb25zdGFudCksICAgICAgICAgICAgICAgKi8KKwkweDA1LCAweDAxLCAgICAgICAgIC8qICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAqLworCTB4MDksIDB4MzMsICAgICAgICAgLyogICAgICBVc2FnZSAoUngpLCAgICAgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgzNCwgICAgICAgICAvKiAgICAgIFVzYWdlIChSeSksICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDE1LCAweDAwLCAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICAgICAqLworCTB4MjYsIDB4RkYsIDB4MDAsICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDI1NSksICAgICAgICAgICovCisJMHg3NSwgMHgwOCwgICAgICAgICAvKiAgICAgIFJlcG9ydCBTaXplICg4KSwgICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDAyLCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgyKSwgICAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwNiwgMHgwMCwgMHhGRiwgICAvKiAgICAgIFVzYWdlIFBhZ2UgKEZGMDBoKSwgICAgICAgICAgICAgKi8KKwkweDA5LCAweDIwLCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDIwaCksICAgICAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDMpLCAgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweDA1LCAweDAxLCAgICAgICAgIC8qICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAqLworCTB4MTksIDB4NDAsICAgICAgICAgLyogICAgICBVc2FnZSBNaW5pbXVtICg0MGgpLCAgICAgICAgICAgICovCisJMHgyOSwgMHg0MiwgICAgICAgICAvKiAgICAgIFVzYWdlIE1heGltdW0gKDQyaCksICAgICAgICAgICAgKi8KKwkweDE2LCAweDAwLCAweDgwLCAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgtMzI3NjgpLCAgICAgICAqLworCTB4MjYsIDB4MDAsIDB4N0YsICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDMyNzY3KSwgICAgICAgICovCisJMHg3NSwgMHgxMCwgICAgICAgICAvKiAgICAgIFJlcG9ydCBTaXplICgxNiksICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDAzLCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgxOSwgMHg0MywgICAgICAgICAvKiAgICAgIFVzYWdlIE1pbmltdW0gKDQzaCksICAgICAgICAgICAgKi8KKwkweDI5LCAweDQ1LCAgICAgICAgIC8qICAgICAgVXNhZ2UgTWF4aW11bSAoNDVoKSwgICAgICAgICAgICAqLworCTB4MTYsIDB4RkYsIDB4QkYsICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKC0xNjM4NSksICAgICAgICovCisJMHgyNiwgMHgwMCwgMHg0MCwgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMTYzODQpLCAgICAgICAgKi8KKwkweDk1LCAweDAzLCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwNiwgMHgwMCwgMHhGRiwgICAvKiAgICAgIFVzYWdlIFBhZ2UgKEZGMDBoKSwgICAgICAgICAgICAgKi8KKwkweDA5LCAweDIwLCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDIwaCksICAgICAgICAgICAgICAgICAgICAqLworCTB4MTUsIDB4MDAsICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgICAgICovCisJMHgyNiwgMHhGRiwgMHgwMCwgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMjU1KSwgICAgICAgICAgKi8KKwkweDc1LCAweDA4LCAgICAgICAgIC8qICAgICAgUmVwb3J0IFNpemUgKDgpLCAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MzEsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDUxKSwgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDIxLCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDIxaCksICAgICAgICAgICAgICAgICAgICAqLworCTB4NzUsIDB4MDgsICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoOCksICAgICAgICAgICAgICAgICovCisJMHg5NSwgMHg0RCwgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNzcpLCAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTIsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDE4KSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyMiwgICAgICAgICAvKiAgICAgIFVzYWdlICgyMmgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDhELCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgxNDEpLCAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyMywgICAgICAgICAvKiAgICAgIFVzYWdlICgyM2gpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTMsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDE5KSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyNCwgICAgICAgICAvKiAgICAgIFVzYWdlICgyNGgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweENELCAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgyMDUpLCAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyNSwgICAgICAgICAvKiAgICAgIFVzYWdlICgyNWgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTQsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDIwKSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyNiwgICAgICAgICAvKiAgICAgIFVzYWdlICgyNmgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk2LCAweDBELCAweDAxLCAgIC8qICAgICAgUmVwb3J0IENvdW50ICgyNjkpLCAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyNywgICAgICAgICAvKiAgICAgIFVzYWdlICgyN2gpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTUsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDIxKSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyOCwgICAgICAgICAvKiAgICAgIFVzYWdlICgyOGgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk2LCAweDRELCAweDAxLCAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzMzMpLCAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyOSwgICAgICAgICAvKiAgICAgIFVzYWdlICgyOWgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTYsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDIyKSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyQSwgICAgICAgICAvKiAgICAgIFVzYWdlICgyQWgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk2LCAweDhELCAweDAxLCAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzOTcpLCAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyQiwgICAgICAgICAvKiAgICAgIFVzYWdlICgyQmgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTcsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDIzKSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyQywgICAgICAgICAvKiAgICAgIFVzYWdlICgyQ2gpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk2LCAweENELCAweDAxLCAgIC8qICAgICAgUmVwb3J0IENvdW50ICg0NjEpLCAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyRCwgICAgICAgICAvKiAgICAgIFVzYWdlICgyRGgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTgsICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDI0KSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyRSwgICAgICAgICAvKiAgICAgIFVzYWdlICgyRWgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk2LCAweDBELCAweDAyLCAgIC8qICAgICAgUmVwb3J0IENvdW50ICg1MjUpLCAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyRiwgICAgICAgICAvKiAgICAgIFVzYWdlICgyRmgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MTksICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDI1KSwgICAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgzMCwgICAgICAgICAvKiAgICAgIFVzYWdlICgzMGgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDk2LCAweDIyLCAweDAyLCAgIC8qICAgICAgUmVwb3J0IENvdW50ICg1NDYpLCAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgzMSwgICAgICAgICAvKiAgICAgIFVzYWdlICgzMWgpLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweDkxLCAweDAyLCAgICAgICAgIC8qICAgICAgT3V0cHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAqLworCTB4MDYsIDB4ODAsIDB4RkYsICAgLyogICAgICBVc2FnZSBQYWdlIChGRjgwaCksICAgICAgICAgICAgICovCisJMHg4NSwgMHg4MiwgICAgICAgICAvKiAgICAgIFJlcG9ydCBJRCAoMTMwKSwgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDIyLCAgICAgICAgIC8qICAgICAgVXNhZ2UgKDIyaCksICAgICAgICAgICAgICAgICAgICAqLworCTB4OTUsIDB4M0YsICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDYzKSwgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDgzLCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgxMzEpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MjMsICAgICAgICAgLyogICAgICBVc2FnZSAoMjNoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDg0LCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgxMzIpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MjQsICAgICAgICAgLyogICAgICBVc2FnZSAoMjRoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDkwLCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgxNDQpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzAsICAgICAgICAgLyogICAgICBVc2FnZSAoMzBoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDkxLCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgxNDUpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzEsICAgICAgICAgLyogICAgICBVc2FnZSAoMzFoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDkyLCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgxNDYpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzIsICAgICAgICAgLyogICAgICBVc2FnZSAoMzJoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweDkzLCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgxNDcpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzMsICAgICAgICAgLyogICAgICBVc2FnZSAoMzNoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweEEwLCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgxNjApLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4NDAsICAgICAgICAgLyogICAgICBVc2FnZSAoNDBoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweDg1LCAweEE0LCAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICgxNjQpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4NDQsICAgICAgICAgLyogICAgICBVc2FnZSAoNDRoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAvKiAgICAgIEZlYXR1cmUgKFZhcmlhYmxlKSwgICAgICAgICAgICAgKi8KKwkweEMwICAgICAgICAgICAgICAgIC8qICBFbmQgQ29sbGVjdGlvbiAgICAgICAgICAgICAgICAgICAgICAqLworfTsKKwogc3RhdGljIF9fdTggcHMzcmVtb3RlX3JkZXNjW10gPSB7CiAJMHgwNSwgMHgwMSwgICAgICAgICAgLyogR1VzYWdlUGFnZSBHZW5lcmljIERlc2t0b3AgKi8KIAkweDA5LCAweDA1LCAgICAgICAgICAvKiBMVXNhZ2UgMHgwNSBbR2FtZSBQYWRdICovCkBAIC00NDksNyArNjcxLDggQEAKIH07CiAKIHN0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgYnV6el9rZXltYXBbXSA9IHsKLQkvKiBUaGUgY29udHJvbGxlciBoYXMgNCByZW1vdGUgYnV6emVycywgZWFjaC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X0JJVF9EQVRBX1JEWV9FTiAgICAgICAgICAgICAgICAgMHgwMQotI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfRE1QX0lOVF9FTiAgICAgICAgICAgICAgICAgIDB4MDIKKyNkZWZpbmUgSU5WX01QVTYwNTBfQklUX0RBVEFfUkRZX0VOICAgICAgICAgMHgwMQorI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfRE1QX0lOVF9FTiAgICAgICAgICAweDAyCiAKICNkZWZpbmUgSU5WX01QVTYwNTBfUkVHX1JBV19BQ0NFTCAgICAgICAgICAgMHgzQgogI2RlZmluZSBJTlZfTVBVNjA1MF9SRUdfVEVNUEVSQVRVUkUgICAgICAgICAweDQxCiAjZGVmaW5lIElOVl9NUFU2MDUwX1JFR19SQVdfR1lSTyAgICAgICAgICAgIDB4NDMKIAogI2RlZmluZSBJTlZfTVBVNjA1MF9SRUdfVVNFUl9DVFJMICAgICAgICAgICAweDZBCi0jZGVmaW5lIElOVl9NUFU2MDUwX0JJVF9GSUZPX1JTVCAgICAgICAgICAgICAgICAgICAgMHgwNAotI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfRE1QX1JTVCAgICAgICAgICAgICAgICAgICAgIDB4MDgKLSNkZWZpbmUgSU5WX01QVTYwNTBfQklUX0kyQ19NU1RfRU4gICAgICAgICAgICAgICAgICAweDIwCi0jZGVmaW5lIElOVl9NUFU2MDUwX0JJVF9GSUZPX0VOICAgICAgICAgICAgICAgICAgICAgMHg0MAotI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfRE1QX0VOICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgSU5WX01QVTYwNTBfQklUX0ZJRk9fUlNUICAgICAgICAgICAgMHgwNAorI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfRE1QX1JTVCAgICAgICAgICAgICAweDA4CisjZGVmaW5lIElOVl9NUFU2MDUwX0JJVF9JMkNfTVNUX0VOICAgICAgICAgIDB4MjAKKyNkZWZpbmUgSU5WX01QVTYwNTBfQklUX0ZJRk9fRU4gICAgICAgICAgICAgMHg0MAorI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfRE1QX0VOICAgICAgICAgICAgICAweDgwCiAKICNkZWZpbmUgSU5WX01QVTYwNTBfUkVHX1BXUl9NR01UXzEgICAgICAgICAgMHg2QgotI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfSF9SRVNFVCAgICAgICAgICAgICAgICAgICAgIDB4ODAKLSNkZWZpbmUgSU5WX01QVTYwNTBfQklUX1NMRUVQICAgICAgICAgICAgICAgICAgICAgICAweDQwCi0jZGVmaW5lIElOVl9NUFU2MDUwX0JJVF9DTEtfTUFTSyAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIElOVl9NUFU2MDUwX0JJVF9IX1JFU0VUICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgSU5WX01QVTYwNTBfQklUX1NMRUVQICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfQ0xLX01BU0sgICAgICAgICAgICAweDcKIAogI2RlZmluZSBJTlZfTVBVNjA1MF9SRUdfUFdSX01HTVRfMiAgICAgICAgICAweDZDCi0jZGVmaW5lIElOVl9NUFU2MDUwX0JJVF9QV1JfQUNDTF9TVEJZICAgICAgICAgICAgICAgMHgzOAotI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfUFdSX0dZUk9fU1RCWSAgICAgICAgICAgICAgIDB4MDcKKyNkZWZpbmUgSU5WX01QVTYwNTBfQklUX1BXUl9BQ0NMX1NUQlkgICAgICAgMHgzOAorI2RlZmluZSBJTlZfTVBVNjA1MF9CSVRfUFdSX0dZUk9fU1RCWSAgICAgICAweDA3CiAKICNkZWZpbmUgSU5WX01QVTYwNTBfUkVHX0ZJRk9fQ09VTlRfSCAgICAgICAgMHg3MgogI2RlZmluZSBJTlZfTVBVNjA1MF9SRUdfRklGT19SX1cgICAgICAgICAgICAweDc0CkBAIC0xODAsM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CBkYXRhX3ZhID0gd3ItPnNnX2xpc3QtPmFkZHI7CisJaW50IHJldDsKKwlpbnQgd3FlX3NpemU7CisKKwlpZiAoIXdyLT53ci5zaWdfaGFuZG92ZXIucHJvdCkgeworCQkvKioKKwkJICogU291cmNlIGRvbWFpbiBkb2Vzbid0IGNvbnRhaW4gc2lnbmF0dXJlIGluZm9ybWF0aW9uCisJCSAqIFNvIG5lZWQgY29uc3RydWN0OgorCQkgKiAgICAgICAgICAgICAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLQorCQkgKiAgICAgICAgICAgICAgICAgfCAgICAgZGF0YV9rbG0gICAgIHwKKwkJICogICAgICAgICAgICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0KKwkJICogICAgICAgICAgICAgICAgIHwgICAgICAgQlNGICAgICAgICB8CisJCSAqICAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tLS0tCisJCSAqKi8KKwkJc3RydWN0IG1seDVfa2xtICpkYXRhX2tsbSA9ICpzZWc7CisKKwkJZGF0YV9rbG0tPmJjb3VudCA9IGNwdV90b19iZTMyKGRhdGFfbGVuKTsKKwkJZGF0YV9rbG0tPmtleSA9IGNwdV90b19iZTMyKGRhdGFfa2V5KTsKKwkJZGF0YV9rbG0tPnZhID0gY3B1X3RvX2JlNjQoZGF0YV92YSk7CisJCXdxZV9zaXplID0gQUxJR04oc2l6ZW9mKCpkYXRhX2tsbSksIDY0KTsKKwl9IGVsc2UgeworCQkvKioKKwkJICogU291cmNlIGRvbWFpbiBjb250YWlucyBzaWduYXR1cmUgaW5mb3JtYXRpb24KKwkJICogU28gbmVlZCBjb25zdHJ1Y3QgYSBzdHJpZGVkIGJsb2NrIGZvcm1hdDoKKwkJICogICAgICAgICAgICAgICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKwkJICogICAgICAgICAgICAgIHwgICAgIHN0cmlkZV9ibG9ja19jdHJsICAgICB8CisJCSAqICAgICAgICAgICAgICAgLS0tLS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KioqKioqKioqKioKKyAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggUm9DRSBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICAqCisgKiBSb0NFIChSRE1BIG92ZXIgQ29udmVyZ2VkIEV0aGVybmV0KSBhZGFwdGVycy4gICAgICAgICAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA4LTIwMTQgRW11bGV4LiBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgICoKKyAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCisgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgICAqCisgKiBtb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHZlcnNpb24gMiBvZiB0aGUgR05VIEdlbmVyYWwgICAgICAgKgorICogUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5IHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb24uICAgICoKKyAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLiAqCisgKiBBTEwgRVhQUkVTUyBPUiBJTVBMSUVEIENPTkRJVElPTlMsIFJFUFJFU0VOVEFUSU9OUyBBTkQgICAgICAgICAgKgorICogV0FSUkFOVElFUywgSU5DTFVESU5HIEFOWSBJTVBMSUVEIFdBUlJBTlRZIE9GIE1FUkNIQU5UQUJJTElUW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GF0cy5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjVmNWUyMGMKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL2luZmluaWJhbmQvaHcvb2NyZG1hL29jcmRtYV9zdGF0cy5oCkBAIC0wLDAgKzEsNTQgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IFJvQ0UgRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAgKgorICogUm9DRSAoUkRNQSBvdmVyIENvbnZlcmdlZCBFdGhlcm5ldCkgYWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwOC0yMDE0IEVtdWxleC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICAqCisgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgorICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yICAgKgorICogbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB2ZXJzaW9uIDIgb2YgdGhlIEdOVSBHZW5lcmFsICAgICAgICoKKyAqIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLiAgICAqCisgKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bC4gKgorICogQUxMIEVYUFJFU1MgT1IgSU1QTElFRCBDT05ESVRJT05TLCBSRVBSRVNFTlRBVElPTlMgQU5EICAgICAgICAgICoKKyAqIFdBUlJBTlRJRVMsIElOQ0xVRElORyBBTlkgSU1QTElFRCBXQVJSQU5UWSBPRiBNRVJDSEFOVEFCSUxJVFksICAqCisgKiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSwgT1IgTk9OLUlORlJJTkdFTUVOVCwgQVJFICAgICAgKgorICogRElTQ0xBSU1FRCwgRVhDRVBUIFRPIFRIRSBFWFRFTlQgVEhBVCBTVUNIIERJU0NMQUlNRVJTIEFSRSBIRUxEICoKKyAqIFRPIEJFIExFR0FMTFkgSU5WQUxJRC4gIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yICAqCisgKiBtb3JlIGRldGFpbHMsIGEgY29weSBvZiB3aGljaCBjYW4gYmUgZm91bmQgaW4gdGhlIGZpbGUgQ09QWUlORyAgKgorICogaW5jbHVkZWQgd2l0aCB0aGlzIHBhY2thZ2UuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqCisgKiBDb250YWN0IEluZm9ybWF0aW9uOgorICogbGludXgtZHJpdmVyc0BlbXVsZXguY29tCisgKgorICogRW11bGV4CisgKiAzMzMzIFN1c2FuIFN0cmVldAorICogQ29zdGEgTWVzYSwgQ0EgOTI2MjYKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fT0NSRE1BX1NUQVRTX0hfXworI2RlZmluZSBfX09DUkRNQV9TVEFUU19IX18KKworI2luY2x1ZGUgPGxpbnV4L2RlYnVnZnMuaD4KKyNpbmNsdWRlICJvY3JkbWEuaCIKKyNpbmNsdWRlICJv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1dHRvbiAqZ3Bpb19rZXlzOworCXN0cnVjdCBncGlvX2tleXNfcGxhdGZvcm1fZGF0YSAqZ3Bpb19rZXlzX3BkYXRhOworCWludCBuX2J1dHRvbnMgPSAwOworCWludCBncGlvOworCWludCBlcnJvcjsKKworCWdwaW9fa2V5c19wZGF0YSA9IGRldm1fa3phbGxvYygmcGRldi0+ZGV2LAorCQkJCSAgICAgICBzaXplb2YoKmdwaW9fa2V5c19wZGF0YSkgKworCQkJCQlzaXplb2YoKmdwaW9fa2V5cykgKiBNQVhfTkJVVFRPTlMsCisJCQkJICAgICAgIEdGUF9LRVJORUwpOworCWdwaW9fa2V5cyA9ICh2b2lkICopKGdwaW9fa2V5c19wZGF0YSArIDEpOworCisJZm9yIChpbmZvID0gYnV0dG9uX2luZm87IGluZm8tPm5hbWU7IGluZm8rKykgeworCQlpZiAoaW5mby0+YXV0b3JlcGVhdCAhPSBhdXRvcmVwZWF0KQorCQkJY29udGludWU7CisKKwkJZ3BpbyA9IHNvY19idXR0b25fbG9va3VwX2dwaW8oJnBkZXYtPmRldiwgaW5mby0+YWNwaV9pbmRleCk7CisJCWlmIChncGlvIDwgMCkKKwkJCWNvbnRpbnVlOworCisJCWdwaW9fa2V5c1tuX2J1dHRvbnNdLnR5cGUgPSBpbmZvLT5ldmVudF90eXBlOworCQlncGlvX2tleXNbbl9idXR0b25zXS5jb2RlID0gaW5mby0+ZXZlbnRfY29kZTsKKwkJZ3Bpb19rZXlzW25fYnV0dG9uc10uZ3BpbyA9IGdwaW87CisJCWdwaW9fa2V5c1tuX2J1dHRvbnNdLmFjdGl2ZV9sb3cgPSAxOworCQlncGlvX2tleXNbbl9idXR0b25zXS5kZXNjID0gaW5mby0+bmFtZTsKKwkJZ3Bpb19rZXlzW25fYnV0dG9uc10ud2FrZXVwID0gaW5mby0+d2FrZXVwOworCQluX2J1dHRvbnMrKzsKKwl9CisKKwlpZiAobl9idXR0b25zID09IDApIHsKKwkJZXJyb3IgPSAtRU5PREVWOworC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GVkLgorKi8KKwlkcnhfc3RhdHVzX3QgZHJ4YnNwX2kyY190ZXJtKHZvaWQpOworCisvKioKKyogXGZuIGRyeF9zdGF0dXNfdCBkcnhic3BfaTJjX3dyaXRlX3JlYWQoIHN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKndfZGV2X2FkZHIsCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTE2IHdfY291bnQsCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTggKndEYXRhLAorKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKnJfZGV2X2FkZHIsCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTE2IHJfY291bnQsCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTggKnJfZGF0YSkKKyogXGJyaWVmIFJlYWQgYW5kL29yIHdyaXRlIGNvdW50IGJ5dGVzIGZyb20gSTJDIGJ1cywgc3RvcmUgdGhlbSBpbiBkYXRhW10uCisqIFxwYXJhbSB3X2Rldl9hZGRyIFRoZSBkZXZpY2UgaTJjIGFkZHJlc3MgYW5kIHRoZSBkZXZpY2UgSUQgdG8gd3JpdGUgdG8KKyogXHBhcmFtIHdfY291bnQgICBUaGUgbnVtYmVyIG9mIGJ5dGVzIHRvIHdyaXRlCisqIFxwYXJhbSB3RGF0YSAgICBUaGUgYXJyYXkgdG8gd3JpdGUgdGhlIGRhdGEgdG8KKyogXHBhcmFtIHJfZGV2X2FkZHIgVGhlIGRldmljZSBpMmMgYWRkcmVzcyBhbmQgdGhlIGRldmljZSBJRCB0byByZWFkIGZyb20KKyogXHBhcmFtIHJfY291bnQgICBUaGUgbnVtYmVyIG9mIGJ5dGVzIHRvIHJlYWQKKyogXHBhcmFtIHJfZGF0YSAgICBUaGUgYXJyYXkgdG8gcmVhZCB0aGUgZGF0YSBmcm9tCisqI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vbmcgYW5kIHNob3J0LgorKiBUaGUgZGVmYXVsdCBzZXR0aW5nIHdpbGwgbmVlZCBubyBjb21waWxlIHN3aXRjaGVzLgorKiBUaGUgZGVmYXVsdCBzZXR0aW5nIG11c3QgYmUgb3ZlcnJpZGRlbiBpZiBjb21waWxlIHN3aXRjaGVzIGFyZSBhbHJlYWR5CisqIGRlZmluZWQuCisqCisqLworCisvKiBzZXQgZGVmYXVsdCAqLworI2lmICFkZWZpbmVkKERSWERBUEZBU0lfTE9OR19BRERSX0FMTE9XRUQpCisjZGVmaW5lICBEUlhEQVBGQVNJX0xPTkdfQUREUl9BTExPV0VEIDEKKyNlbmRpZgorCisvKiBzZXQgZGVmYXVsdCAqLworI2lmICFkZWZpbmVkKERSWERBUEZBU0lfU0hPUlRfQUREUl9BTExPV0VEKQorI2RlZmluZSAgRFJYREFQRkFTSV9TSE9SVF9BRERSX0FMTE9XRUQgMQorI2VuZGlmCisKKy8qIGNoZWNrICovCisjaWYgKChEUlhEQVBGQVNJX0xPTkdfQUREUl9BTExPV0VEID09IDApICYmIFwKKyAgICAgIChEUlhEQVBGQVNJX1NIT1JUX0FERFJfQUxMT1dFRCA9PSAwKSkKKyNlcnJvciAgQXQgbGVhc3Qgb25lIG9mIHNob3J0LSBvciBsb25nLWFkZHJlc3NpbmcgZm9ybWF0IG11c3QgYmUgYWxsb3dlZC4KKyo7CQkJCS8qIGlsbGVnYWwgc3RhdGVtZW50IHRvIGZvcmNlIGNvbXBpbGVyIGVycm9yICovCisjZW5kaWYKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqIFNpbmdsZS9tYXN0ZXIgbXVsdGkgbWFzdGVyIHNldHRpbmcKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoKKyogQ29tbWVudHMgYWJvdXQgU0lOR0xFIE1BU1RFUi9NVUxUSSBNQVNURVIgIG1vZGVzOgorKgorKiBDb25zaWRlciB0aGU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LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworCisvKioKKyogXGZuIGRyeGJzcF9pMmNfaW5pdCgpCisqIFxicmllZiBJbml0aWFsaXplIEkyQyBjb21tdW5pY2F0aW9uIG1vZHVsZS4KKyogXHJldHVybiBpbnQgUmV0dXJuIHN0YXR1cy4KKyogXHJldHZhbCAwIEluaXRpYWxpemF0aW9uIHN1Y2Nlc3NmdWwuCisqIFxyZXR2YWwgLUVJTyBJbml0aWFsaXphdGlvbiBmYWlsZWQuCisqLworaW50IGRyeGJzcF9pMmNfaW5pdCh2b2lkKTsKKworLyoqCisqIFxmbiBkcnhic3BfaTJjX3Rlcm0oKQorKiBcYnJpZWYgVGVybWluYXRlIEkyQyBjb21tdW5pY2F0aW9uIG1vZHVsZS4KKyogXHJldHVybiBpbnQgUmV0dXJuIHN0YXR1cy4KKyogXHJldHZhbCAwIFRlcm1pbmF0aW9uIHN1Y2Nlc3NmdWwuCisqIFxyZXR2YWwgLUVJTyBUZXJtaW5hdGlvbiBmYWlsZWQuCisqLworaW50IGRyeGJzcF9pMmNfdGVybSh2b2lkKTsKKworLyoqCisqIFxmbiBpbnQgZHJ4YnNwX2kyY193cml0ZV9yZWFkKCBzdHJ1Y3QgaTJjX2RldmljZV9hZGRyICp3X2Rldl9hZGRyLAorKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUxNiB3X2NvdW50LAorKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHU4ICogd0RhdGEsCisqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGkyY19kZXZpY2VfYWRkciAqcl9kZXZfYWRkciwKKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1MTYgcl9jb3VudCwKKyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1OCAqIHJfZGF0YSkKKyogXGJyaWVm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KiBcYnJpZWYgIFNBVyBzd2l0Y2ggY2FwYWJpbGl0eSBmbGFnCisqCisqIERldmljZSBoYXMgU0FXIHN3aXRjaAorKgorKi8KKyNkZWZpbmUgRFJYX0NBUEFCSUxJVFlfSEFTX1NBV1NXICAgICAgICAgKDFVTCA8PCAgNikKKy8qKgorKiBcYnJpZWYgIEdQSU8xIGNhcGFiaWxpdHkgZmxhZworKgorKiBEZXZpY2UgaGFzIEdQSU8xCisqCisqLworI2RlZmluZSBEUlhfQ0FQQUJJTElUWV9IQVNfR1BJTzEgICAgICAgICAoMVVMIDw8ICA3KQorLyoqCisqIFxicmllZiAgR1BJTzIgY2FwYWJpbGl0eSBmbGFnCisqCisqIERldmljZSBoYXMgR1BJTzIKKyoKKyovCisjZGVmaW5lIERSWF9DQVBBQklMSVRZX0hBU19HUElPMiAgICAgICAgICgxVUwgPDwgIDgpCisvKioKKyogXGJyaWVmICBJUlFOIGNhcGFiaWxpdHkgZmxhZworKgorKiBEZXZpY2UgaGFzIElSUU4KKyoKKyovCisjZGVmaW5lIERSWF9DQVBBQklMSVRZX0hBU19JUlFOICAgICAgICAgICgxVUwgPDwgIDkpCisvKioKKyogXGJyaWVmICA4VlNCIGNhcGFiaWxpdHkgZmxhZworKgorKiBEZXZpY2UgaGFzIDhWU0IKKyoKKyovCisjZGVmaW5lIERSWF9DQVBBQklMSVRZX0hBU184VlNCICAgICAgICAgICgxVUwgPDwgMTApCisvKioKKyogXGJyaWVmICBTTUEtVFggY2FwYWJpbGl0eSBmbGFnCisqCisqIERldmljZSBoYXMgU01BVFgKKyoKKyovCisjZGVmaW5lIERSWF9DQVBBQklMSVRZX0hBU19TTUFUWCAgICAgICAgICgxVUwgPDwgMTEpCisvKioKKyogXGJyaWVmICBTTUEtUlggY2FwYWJpbGl0eSBmbGFnCisqCisqIERldmljZSBoYXMgU01BUlgKKyoKKyovCisjZGVmaW5lIERSWF9DQVBBQklMSVRZX0hBU19TTUFSWCAgICAgICAgICgxVUwgPDwgM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ICAgICAqLworCURSWF9TVEFOREFSRF9JVFVfQiwgICAgLyoqPCBDYWJsZSBJVFUgQU5ORVggQi4gICAgICAgICAgICAgICAqLworCURSWF9TVEFOREFSRF9JVFVfQywgICAgLyoqPCBDYWJsZSBJVFUgQU5ORVggQy4gICAgICAgICAgICAgICAqLworCURSWF9TVEFOREFSRF9JVFVfRCwgICAgLyoqPCBDYWJsZSBJVFUgQU5ORVggRC4gICAgICAgICAgICAgICAqLworCURSWF9TVEFOREFSRF9GTSwgICAgICAgLyoqPCBUZXJyZXN0cmlhbFxDYWJsZSBGTSByYWRpbyAgICAgICAqLworCURSWF9TVEFOREFSRF9EVE1CLCAgICAgLyoqPCBUZXJyZXN0cmlhbCBEVE1CIHN0YW5kYXJkIChDaGluYSkqLworCURSWF9TVEFOREFSRF9VTktOT1dOID0gRFJYX1VOS05PV04sCisJCQkJLyoqPCBTdGFuZGFyZCB1bmtub3duLiAgICAgICAgICAgICAgICAqLworCURSWF9TVEFOREFSRF9BVVRPID0gRFJYX0FVVE8KKwkJCQkvKio8IEF1dG9kZXRlY3Qgc3RhbmRhcmQuICAgICAgICAgICAgICovCit9OworCisvKioKKyogXGVudW0gZW51bSBkcnhfc3RhbmRhcmQKKyogXGJyaWVmIE1vZHVsYXRpb24gc3ViLXN0YW5kYXJkcy4KKyovCitlbnVtIGRyeF9zdWJzdGFuZGFyZCB7CisJRFJYX1NVQlNUQU5EQVJEX01BSU4gPSAwLCAvKio8IE1haW4gc3VidmFyaWFudCBvZiBzdGFuZGFyZCAgICovCisJRFJYX1NVQlNUQU5EQVJEX0FUVl9CR19TQ0FORElOQVZJQSwKKwlEUlhfU1VCU1RBTkRBUkRfQVRWX0RLX1BPTEFORCwKKwlEUlhfU1VCU1RBTkRBUkRfQVRWX0RLX0NISU5BLAorCURSWF9TVUJTVEFOREFSRF9VTktOT1dOID0gRFJYX1VOS05PV04sCisJCQkJCS8qKjwgU3ViLXN0YW5kYXJkIHVua25vd24uICAgICAgICAgKi8KKw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SBlbnVtIGRyeF90cHNfZnJhbWUKKyogXGJyaWVmIEZyYW1lIG51bWJlciBpbiBjdXJyZW50IHN1cGVyLWZyYW1lLgorKi8KK2VudW0gZHJ4X3Rwc19mcmFtZSB7CisJRFJYX1RQU19GUkFNRTEgPSAwLAkgIC8qKjwgVFBTIGZyYW1lIDEuICAgICAgICovCisJRFJYX1RQU19GUkFNRTIsCQkgIC8qKjwgVFBTIGZyYW1lIDIuICAgICAgICovCisJRFJYX1RQU19GUkFNRTMsCQkgIC8qKjwgVFBTIGZyYW1lIDMuICAgICAgICovCisJRFJYX1RQU19GUkFNRTQsCQkgIC8qKjwgVFBTIGZyYW1lIDQuICAgICAgICovCisJRFJYX1RQU19GUkFNRV9VTktOT1dOID0gRFJYX1VOS05PV04KKwkJCQkJLyoqPCBUUFMgZnJhbWUgdW5rbm93bi4gKi8KK307CisKKy8qKgorKiBcZW51bSBlbnVtIGRyeF9sZHBjCisqIFxicmllZiBUUFMgTERQQyAuCisqLworZW51bSBkcnhfbGRwYyB7CisJRFJYX0xEUENfMF80ID0gMCwJICAvKio8IExEUEMgMC40ICAgICAgICAgICAqLworCURSWF9MRFBDXzBfNiwJCSAgLyoqPCBMRFBDIDAuNiAgICAgICAgICAgKi8KKwlEUlhfTERQQ18wXzgsCQkgIC8qKjwgTERQQyAwLjggICAgICAgICAgICovCisJRFJYX0xEUENfVU5LTk9XTiA9IERSWF9VTktOT1dOLAorCQkJCQkvKio8IExEUEMgdW5rbm93bi4gICAgICAqLworCURSWF9MRFBDX0FVVE8gPSBEUlhfQVVUTyAgLyoqPCBBdXRvZGV0ZWN0IExEUEMgICAgKi8KK307CisKKy8qKgorKiBcZW51bSBlbnVtIGRyeF9waWxvdF9tb2RlCisqIFxicmllZiBQaWxvdCBtb2RlcyBpbiBEVE1CLgorKi8KK2VudW0gZHJ4X3BpbG90X21vZGUgeworCURSWF9QSUxPVF9PTiA9IDAsCSAgLyoqPCBQaWxvdCBPbiAgICAgICAgICAgICAqLworCUR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QlEUlhfTE9DS19TVEFURV8yLAorCQkJICAgICAgKio8IEdlbmVyaWMgbG9jayBzdGF0ZSAgICAgICAgICAgICAgICAgICAgKgorCQlEUlhfTE9DS19TVEFURV8zLAorCQkJICAgICAgKio8IEdlbmVyaWMgbG9jayBzdGF0ZSAgICAgICAgICAgICAgICAgICAgKgorCQlEUlhfTE9DS19TVEFURV80LAorCQkJICAgICAgKio8IEdlbmVyaWMgbG9jayBzdGF0ZSAgICAgICAgICAgICAgICAgICAgKgorCQlEUlhfTE9DS19TVEFURV81LAorCQkJICAgICAgKio8IEdlbmVyaWMgbG9jayBzdGF0ZSAgICAgICAgICAgICAgICAgICAgKgorCQlEUlhfTE9DS19TVEFURV82LAorCQkJICAgICAgKio8IEdlbmVyaWMgbG9jayBzdGF0ZSAgICAgICAgICAgICAgICAgICAgKgorCQlEUlhfTE9DS19TVEFURV83LAorCQkJICAgICAgKio8IEdlbmVyaWMgbG9jayBzdGF0ZSAgICAgICAgICAgICAgICAgICAgKgorCQlEUlhfTE9DS19TVEFURV84LAorCQkJICAgICAgKio8IEdlbmVyaWMgbG9jayBzdGF0ZSAgICAgICAgICAgICAgICAgICAgKgorCQlEUlhfTE9DS19TVEFURV85LAorCQkJICAgICAgKio8IEdlbmVyaWMgbG9jayBzdGF0ZSAgICAgICAgICAgICAgICAgICAgKgorCQlEUlhfTE9DS0VEICAgICoqPCBEZXZpY2UgaXMgaW4gbG9jayAgICAgICAgICAgICAgICAgICAgICoKKyovCisKK2VudW0gZHJ4X2xvY2tfc3RhdHVzIHsKKwlEUlhfTkVWRVJfTE9DSyA9IDAsCisJRFJYX05PVF9MT0NLRUQsCisJRFJYX0xPQ0tfU1RBVEVfMSwKKwlEUlhfTE9DS19TVEFURV8yLAorCURSWF9MT0NLX1NUQVRFXzMsCisJRFJYX0xPQ0tfU1RBVEVfNCwKKwlEUlhfTE9DS19TVEFURV81LAorCURSWF9MT0NLX1NUQVRFXzYsCisJRFJYX0xPQ0tfU1RBVEVfNyw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CQkJICAgIC8qKjwgY29udHJvbGxlZCBieSBmaXJtd2FyZSwgZnVuY3Rpb24gNSAgICovCit9OworCisvKioKKyogXGVudW0gZW51bSBkcnhvb2JfZG93bnN0cmVhbV9zdGFuZGFyZCAqIFxicmllZiBVc2VkIHRvIHNlbGVjdCBPT0Igc3RhbmRhcmQuCisqCisqIEJhc2VkIG9uIEFOU0kgNTUtMSBhbmQgNTUtMgorKi8KK2VudW0gZHJ4b29iX2Rvd25zdHJlYW1fc3RhbmRhcmQgeworCURSWF9PT0JfTU9ERV9BID0gMCwKKwkJICAgICAgIC8qKjwgQU5TSSA1NS0xICAgKi8KKwlEUlhfT09CX01PREVfQl9HUkFERV9BLAorCQkgICAgICAgLyoqPCBBTlNJIDU1LTIgQSAqLworCURSWF9PT0JfTU9ERV9CX0dSQURFX0IKKwkJICAgICAgIC8qKjwgQU5TSSA1NS0yIEIgKi8KK307CisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorU1RSVUNUUworLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSBDVFJMIENGRyByZWxhdGVkIGRhdGEgc3RydWN0dXJlcyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSov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bmV2ZXIgdG8gYmUgdXNlZCAgKi8KKworI2RlZmluZSBEUlhfQ0ZHX1BJTlNfU0FGRV9NT0RFICAgICAgRFJYX0NGR19QSU5TQUZFCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT0gQ1RSTCByZWxhdGVkIGRhdGEgc3RydWN0dXJlcyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworLyoqCisgKiBzdHJ1Y3QgZHJ4dV9jb2RlX2luZm8JUGFyYW1ldGVycyBmb3IgbWljcm9jb2RlIHVwbG9hZCBhbmQgdmVyZml5LgorICoKKyAqIEBtY19maWxlOgltaWNyb2NvZGUgZmlsZSBuYW1lCisgKgorICogVXNlZCBieSBEUlhfQ1RSTF9MT0FEX1VDT0RFIGFuZCBEUlhfQ1RSTF9WRVJJRllfVUNPREUKKyAqLworc3RydWN0IGRyeHVfY29kZV9pbmZvIHsKKwljaGFyIAkJCSptY19maWxlOworfTsKKworLyoqCisqIFxzdHJ1Y3QgZHJ4X21jX3ZlcnNpb25fcmVjX3QKKyogXGJyaWVmIE1pY3JvY29kZSB2ZXJzaW9uIHJlY29yZAorKiBWZXJzaW9uIG51bWJlcnMgYXJlIHN0b3JlZCBpbiBCQ0QgZm9ybWF0LCBhcyB1c3VhbDoKKyogICBvIG1ham9yIG51bWJlciA9IGJpdHMgMzEtMjAgKGZpcnN0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mIG1pY3JvY29kZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1MzIgbWNfYmFzZV92ZXJzaW9uOwkvKiBpbiBjYXNlIG9mIHBhdGNoOiB0aGUgb3JpZ2luYWwgbWljcm9jb2RlIHZlcnNpb24gKi8KK307CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcc3RydWN0IGRyeF9maWx0ZXJfaW5mb190CisqIFxicmllZiBQYXJhbWV0ZXJzIGZvciBsb2FkaW5nIGZpbHRlciBjb2VmZmljaWVudHMKKyoKKyogVXNlZCBieSBEUlhfQ1RSTF9MT0FEX0ZJTFRFUgorKi8KK3N0cnVjdCBkcnhfZmlsdGVyX2luZm8geworCXU4ICpkYXRhX3JlOworCSAgICAgIC8qKjwgcG9pbnRlciB0byBjb2VmZmljaWVudHMgZm9yIFJFICovCisJdTggKmRhdGFfaW07CisJICAgICAgLyoqPCBwb2ludGVyIHRvIGNvZWZmaWNpZW50cyBmb3IgSU0gKi8KKwl1MTYgc2l6ZV9yZTsKKwkgICAgICAvKio8IHNpemUgb2YgY29lZmZpY2llbnRzIGZvciBSRSAgICAqLworCXUxNiBzaXplX2ltOworCSAgICAgIC8qKjwgc2l6ZSBvZiBjb2VmZmljaWVudHMgZm9yIElNICAgICovCit9OworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXHN0cnVjdCBzdHJ1Y3QgZHJ4X2NoYW5uZWwgKiBcYnJpZWYgVGhlIHNldCBvZiBwYXJhbWV0ZXJzIGRlc2NyaWJpbmcgYSBzaW5nbGUgY2hhbm5lbC4KKyoKKyogVXNlZCBieSBEUlhfQ1RSTF9TRVRfQ0hBTk5FTCBhbmQgRFJYX0NUUkxfR0VUX0NIQU5ORUwuCisqIE9ubHkgY2VydGFpbiBmaWVsZHMgbmVlZCB0byBiZSB1c2VkIGZvciBhIHNwZWNmaWMgc3RhbmRhcmQuCisqCisqLworc3RydWN0IGRyeF9jaGFubmVsIHsKKwlzMzIgZnJlcXVlbmN5OworCQkJCS8qKjwgZnJlcXVlbmN5IGluIGtIeiAgICAgICAgICAgICAgICAgKi8KKwllbnVtIGRyeF9iYW5kd2lkdGggYmFuZHdpZHRoOworCQkJCS8qKjwgYmFuZHdpZHRoICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwllbnVtIGRyeF9taXJyb3IgbWlycm9yOwkvKio8IG1pcnJvcmVkIG9yIG5vdCBvbiBSRiAgICAgICAgICAgICovCisJZW51bSBkcnhfbW9kdWxhdGlvbiBjb25zdGVsbGF0aW9uOworCQkJCS8qKjwgY29uc3RlbGxhdGlvbiAgICAgICAgICAgICAgICAgICAgKi8KKwllbnVtIGRyeF9oaWVyYXJjaHkgaGllcmFyY2h5OworCQkJCS8qKjwgaGllcmFyY2h5ICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwllbnVtIGRyeF9wcmlvcml0eSBwcmlvcml0eTsJLyoqPCBwcmlvcml0eSAgICAgICAgICAgICAgICAgICAgICAgICAqLworCWVudW0gZHJ4X2NvZGVyYXRlIGNvZGVyYXRlOwkvKio8IGNvZGVyYXRlICAgICAgICAgICAgICAgICAgICAgICAgICovCisJZW51bSBkcnhfZ3VhcmQgZ3VhcmQ7CS8qKjwgZ3VhcmQgaW50ZXJ2YWwgICAgICAgICAgICAgICAgICAgKi8KKwllbnVtIGRyeF9mZnRfbW9kZSBmZnRtb2RlOwkvKio8IGZmdG1vZGUgICAgICAgICAgICAgICAgICAgICAgICAgICovCisJZW51bSBkcnhfY2xhc3NpZmljYXRpb24gY2xhc3NpZmljYXRpb247CisJCQkJLyoqPCBjbGFzc2lmaWNhdGlvbiAgICAgICAgICAgICAgICAgICAqLworCXUzMiBzeW1ib2xyYXRlOworCQkJCS8qKjwgc3ltYm9scmF0ZSBpbiBzeW1ib2xzL3NlYyAgICAgICAgKi8KKwllbnVtIGRyeF9pbnRlcmxlYXZlX21vZGUgaW50ZXJsZWF2ZW1vZGU7CisJCQkJLyoqPCBpbnRlcmxlYXZlTW9kZSBRQU0gICAgICAgICAgICAgICAqLworCWVudW0gZHJ4X2xkcGMgbGRwYzsJCS8qKjwgbGRwYyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwllbnVtIGRyeF9jYXJyaWVyX21vZGUgY2FycmllcjsJLyoqPCBjYXJyaWVyICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCWVudW0gZHJ4X2ZyYW1lX21vZGUgZnJhbWVtb2RlOworCQkJCS8qKjwgZnJhbWUgbW9kZSAgICAgICAgICAgICAgICAgICAgICAgKi8KKwllbnVtIGRyeF9waWxvdF9tb2RlIHBpbG90OwkvKio8IHBpbG90IG1vZGUgICAgICAgICAgICAgICAgICAgICAgICovCit9OworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCitlbnVtIGRyeF9jZmdfc3FpX3NwZWVkIHsKKwlEUlhfU1FJX1NQRUVEX0ZBU1QgPSAwLAorCURSWF9TUUlfU1BFRURfTUVESVVNLAorCURSWF9TUUlfU1BFRURfU0xPVywKKwlEUlhfU1FJX1NQRUVEX1VOS05PV04gPSBEUlhfVU5LTk9XTgorfTsKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworLyoqCisqIFxzdHJ1Y3Qgc3RydWN0IGRyeF9jb21wbGV4ICogQSBjb21wbGV4IG51bWJlci4KKyoKKyogVXNlZCBieSBEUlhfQ1RSTF9DT05TVEVMLgorKi8KK3N0cnVjdCBkcnhfY29tcGxleCB7CisJczE2IGltOworICAgICAvKio8IEltYWdpbmFyeSBwYXJ0LiAqLworCXMxNiByZTsKKyAgICAgLyoqPCBSZWFsIHBhcnQuICAgICAgKi8KK307CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcc3RydWN0IHN0cnVjdCBkcnhfZnJlcXVlbmN5X3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aW9uICovCisJc3RydWN0IGRyeF92ZXJzaW9uX2xpc3QgKm5leHQ7CisJCQkgICAgICAvKio8IE5leHQgbGlzdCBlbGVtZW50ICAgKi8KK307CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcYnJpZWYgUGFyYW1ldGVycyBuZWVkZWQgdG8gY29uZml1Z3VyZSBhIFVJTy4KKyoKKyogVXNlZCBieSBEUlhfQ1RSTF9VSU9fQ0ZHLgorKi8KKwlzdHJ1Y3QgZHJ4dWlvX2NmZyB7CisJCWVudW0gZHJ4X3VpbyB1aW87CisJCSAgICAgICAvKio8IFVJTyBpZGVudGlmaWVyICAgICAgICovCisJCWVudW0gZHJ4dWlvX21vZGUgbW9kZTsKKwkJICAgICAgIC8qKjwgVUlPIG9wZXJhdGlvbmFsIG1vZGUgKi8KKwl9OworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGJyaWVmIFBhcmFtZXRlcnMgbmVlZGVkIHRvIHJlYWQgZnJvbSBvciB3cml0ZSB0byBhIFVJTy4KKyoKKyogVXNlZCBieSBEUlhfQ1RSTF9VSU9fUkVBRCBhbmQgRFJYX0NUUkxfVUlPX1dSSVRFLgorKi8KKwlzdHJ1Y3QgZHJ4dWlvX2RhdGEgeworCQllbnVtIGRyeF91aW8gdWlvOworCQkgICAvKio8IFVJTyBpZGVudGlmaWVyICAgICAgICAgICAgICAqLworCQlib29sIHZhbHVlOworCQkgICAvKio8IFVJTyB2YWx1ZSAodHJ1ZT0xLCBmYWxzZT0wKSAqLworCX07CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcYnJpZWYgUGFyYW1ldGVycyBuZWVkZWQgdG8gY29uZmlndXJlIE9PQi4KKyoKKyogVXNlZCBieSBEUlhfQ1RSTF9TRVRfT09CLgorKi8KKwlzdHJ1Y3QgZHJ4b29iI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CQkJICAgICBzZXJpYWwgICAqLworCQlib29sIGludmVydF9kYXRhOwkvKio8IElmIHRydWUsIGludmVydCBEQVRBIHNpZ25hbHMgICAgICovCisJCWJvb2wgaW52ZXJ0X2VycjsJLyoqPCBJZiB0cnVlLCBpbnZlcnQgRVJSIHNpZ25hbCAgICAgICAqLworCQlib29sIGludmVydF9zdHI7CS8qKjwgSWYgdHJ1ZSwgaW52ZXJ0IFNUUiBzaWduYWxzICAgICAgKi8KKwkJYm9vbCBpbnZlcnRfdmFsOwkvKio8IElmIHRydWUsIGludmVydCBWQUwgc2lnbmFscyAgICAgICovCisJCWJvb2wgaW52ZXJ0X2NsazsJLyoqPCBJZiB0cnVlLCBpbnZlcnQgQ0xLIHNpZ25hbHMgICAgICAqLworCQlib29sIHN0YXRpY19jbGs7CS8qKjwgSWYgdHJ1ZSwgc3RhdGljIE1QRUcgY2xvY2tyYXRlCisJCQkJCSAgICAgd2lsbCBiZSB1c2VkLCBvdGhlcndpc2UgY2xvY2tyYXRlCisJCQkJCSAgICAgd2lsbCBhZGFwdCB0byB0aGUgYml0cmF0ZSBvZiB0aGUKKwkJCQkJICAgICBUUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCQl1MzIgYml0cmF0ZTsJCS8qKjwgTWF4aW11bSBiaXRyYXRlIGluIGIvcyBpbiBjYXNlCisJCQkJCSAgICAgc3RhdGljIGNsb2NrcmF0ZSBpcyBzZWxlY3RlZCAgICAgKi8KKwkJZW51bSBkcnhtcGVnX3N0cl93aWR0aCB3aWR0aF9zdHI7CisJCQkJCS8qKjwgTVBFRyBzdGFydCB3aWR0aCAgICAgICAgICAgICAgICAgKi8KKwl9OworCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcc3RydWN0IHN0cnVjdCBkcnhpMmNfZGF0YSAqIFxicmllZiBEYXRhIGZvciBJMkMgdmlhIDJuZCBvciAzcmQgb3IgZXRjIEkyQyBwb3J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yZW87CQkgIC8qKjwgc3RlcmVvIGRldGVjdGlvbiAgICAgICAgICAgICAgICovCisJCWJvb2wgY2Fycmllcl9hOwkgIC8qKjwgY2FycmllciBBIGRldGVjdGVkICAgICAgICAgICAgICovCisJCWJvb2wgY2Fycmllcl9iOwkgIC8qKjwgY2FycmllciBCIGRldGVjdGVkICAgICAgICAgICAgICovCisJCWJvb2wgc2FwOwkJICAvKio8IHNhcCAvIGJpbGluZ3VhbCBkZXRlY3Rpb24gICAgICAqLworCQlib29sIHJkczsJCSAgLyoqPCBSRFMgZGF0YSBhcnJheSBwcmVzZW50ICAgICAgICAgKi8KKwkJZW51bSBkcnhfYXVkX25pY2FtX3N0YXR1cyBuaWNhbV9zdGF0dXM7CisJCQkJCSAgLyoqPCBzdGF0dXMgb2YgTklDQU0gY2FycmllciAgICAgICAgKi8KKwkJczggZm1faWRlbnQ7CQkgIC8qKjwgRk0gSWRlbnRpZmljYXRpb24gdmFsdWUgICAgICAgICovCisJfTsKKworLyogQ1RSTF9BVURfUkVBRF9SRFMgICAgICAgLSBEUlhSRFNkYXRhX3QgKi8KKworLyoqCisqIFxzdHJ1Y3QgRFJYUkRTZGF0YV90CisqIFxicmllZiBSYXcgUkRTIGRhdGEgYXJyYXkuCisqLworCXN0cnVjdCBkcnhfY2ZnX2F1ZF9yZHMgeworCQlib29sIHZhbGlkOwkJICAvKio8IFJEUyBkYXRhIHZhbGlkYXRpb24gICAgICAgICAgICAqLworCQl1MTYgZGF0YVsxOF07CQkgIC8qKjwgZGF0YSBmcm9tIG9uZSBSRFMgZGF0YSBhcnJheSAgICovCisJfTsKKworLyogRFJYX0NGR19BVURfVk9MVU1FICAgICAgLSBzdHJ1Y3QgZHJ4X2NmZ19hdWRfdm9sdW1lIC0gc2V0L2dldCAqLworLyoqCisqIFxlbnVtIERSWEF1ZEFWQ0RlY2F5VGltZV90CisqIFxicmllZiBBdXRvbWF0aWMgdm9sdW1lIGNvbnRyb2wgY29uZmlndXJhdGlvbi4KKy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1cmVzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKiBBZGRyZXNzIG9uIGRldmljZSAqLworCXR5cGVkZWYgdTMyIGRyX3hhZGRyX3QsICpwZHJfeGFkZHJfdDsKKworLyogUHJvdG9jb2wgc3BlY2lmaWMgZmxhZ3MgKi8KKwl0eXBlZGVmIHUzMiBkcl94ZmxhZ3NfdCwgKnBkcl94ZmxhZ3NfdDsKKworLyogV3JpdGUgYmxvY2sgb2YgZGF0YSB0byBkZXZpY2UgKi8KKwl0eXBlZGVmIGludCgqZHJ4X3dyaXRlX2Jsb2NrX2Z1bmNfdCkgKHN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKmRldl9hZGRyLAkvKiBhZGRyZXNzIG9mIEkyQyBkZXZpY2UgICAgICAgICovCisJCQkJCQkgICB1MzIgYWRkciwJLyogYWRkcmVzcyBvZiByZWdpc3Rlci9tZW1vcnkgICAqLworCQkJCQkJICAgdTE2IGRhdGFzaXplLAkvKiBzaXplIG9mIGRhdGEgaW4gYnl0ZXMgICAgICAgICovCisJCQkJCQkgICB1OCAqZGF0YSwJLyogZGF0YSB0byBzZW5kICAgICAgICAgICAgICAgICAqLworCQkJCQkJICAgdTMyIGZsYWdzKTsKKworLyogUmVhZCBibG9jayBvZiBkYXRhIGZyb20gZGV2aWNlICovCisJdHlwZWRlZiBpbnQoKmRyeF9yZWFkX2Jsb2NrX2Z1bmNfdCkgKHN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKmRldl9hZGRyLAkvKiBhZGRyZXNzIG9mIEkyQyBkZXZpY2UgICAgICAgICovCisJCQkJCQkgIHUz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mdW5jX3QgcmVhZF9yZWc4ZnVuYzsKKwlkcnhfcmVhZF9tb2RpZnlfd3JpdGVfcmVnOGZ1bmNfdCByZWFkX21vZGlmeV93cml0ZV9yZWc4ZnVuYzsKKwlkcnhfd3JpdGVfcmVnMTZmdW5jX3Qgd3JpdGVfcmVnMTZmdW5jOworCWRyeF9yZWFkX3JlZzE2ZnVuY190IHJlYWRfcmVnMTZmdW5jOworCWRyeF9yZWFkX21vZGlmeV93cml0ZV9yZWcxNmZ1bmNfdCByZWFkX21vZGlmeV93cml0ZV9yZWcxNmZ1bmM7CisJZHJ4X3dyaXRlX3JlZzMyZnVuY190IHdyaXRlX3JlZzMyZnVuYzsKKwlkcnhfcmVhZF9yZWczMmZ1bmNfdCByZWFkX3JlZzMyZnVuYzsKKwlkcnhfcmVhZF9tb2RpZnlfd3JpdGVfcmVnMzJmdW5jX3QgcmVhZF9tb2RpZnlfd3JpdGVfcmVnMzJmdW5jOworfTsKKworLyogUmVnaXN0ZXIgYWRkcmVzcyBhbmQgZGF0YSBmb3IgcmVnaXN0ZXIgZHVtcCBmdW5jdGlvbiAqLworc3RydWN0IGRyeF9yZWdfZHVtcCB7CisJdTMyIGFkZHJlc3M7CisJdTMyIGRhdGE7Cit9OworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT0gRGVtb2QgaW5zdGFuY2UgZGF0YSBzdHJ1Y3R1cmVzID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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U5EQVJEX0lUVV9DKSAgPyAiSVRVLUMiICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX1NUQU5EQVJEX0lUVV9EKSAgPyAiSVRVLUQiICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX1NUQU5EQVJEX0ZNKSAgPyAiRk0iICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX1NUQU5EQVJEX0RUTUIpICA/ICJEVE1CIiAgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfU1RBTkRBUkRfQVVUTykgID8gIkF1dG8iICAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9TVEFOREFSRF9VTktOT1dOKSAgPyAiVW5rbm93biIgICAgICAgICAgOiBcCisJIihJbnZhbGlkKSIpCisKKy8qIGNoYW5uZWwgKi8KKworI2RlZmluZSBEUlhfU1RSX0JBTkRXSURUSCh4KSAoIFwKKwkoeCA9PSBEUlhfQkFORFdJRFRIXzhNSFopICA/ICAiOCBNSHoiICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0JBTkRXSURUSF83TUhaKSAgPyAgIjcgTUh6IiAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9CQU5EV0lEVEhfNk1IWikgID8gICI2IE1IeiIgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfQkFORFdJRFRIX0FVVE8pICA/ICAiQXV0byIgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0JBTkRXSURUSF9VTktOT1dOKSAgPyAgIlVua25vd24iICAgICAgICAgIDogXAorCSIoSW52YWxpZCkiKQorI2RlZmluZSBEUlhfU1RSX0ZGVE1PREUoeCkgKCBcCisJKHggPT0gRFJYX0ZGVE1PREVfMkspICA/ICAiMmsiICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0ZGVE1PREVfNEspICA/ICAiNGsiICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0ZGVE1PREVfOEspICA/ICAiOGsiICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0ZGVE1PREVfQVVUTykgID8gICJBdXRvIiAgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfRkZUTU9ERV9VTktOT1dOKSAgPyAgIlVua25vd24iICAgICAgICAgIDogXAorCSIoSW52YWxpZCkiKQorI2RlZmluZSBEUlhfU1RSX0dVQVJEKHgpICggXAorCSh4ID09IERSWF9HVUFSRF8xRElWMzIpICA/ICAiMS8zMm5kIiAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0dVQVJEXzFESVYxNikgID8gICIxLzE2dGgiICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfR1VBUkRfMURJVjgpICA/ICAiMS84dGgiICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0dVQVJEXzFESVY0KSAgPyAgIjEvNHRoIiAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9HVUFSRF9BVVRPKSAgPyAgIkF1dG8iICAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9HVUFSRF9VTktOT1dOKSAgPyAgIlVua25vd24iICAgICAgICAgIDogXAorCSIoSW52YWxpZCkiKQorI2RlZmluZSBEUlhfU1RSX0NPTlNURUxMQVRJT04oeCkgKCBcCisJKHggPT0gRFJYX0NPTlNURUxMQVRJT05fQlBTSykgID8gICJCUFNLIiAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9DT05TVEVMTEFUSU9OX1FQU0spICA/ICAiUVBTSyIgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfQ09OU1RFTExBVElPTl9QU0s4KSAgPyAgIlBTSzgiICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NPTlNURUxMQVRJT05fUUFNMTYpICA/ICAiUUFNMTYiICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfQ09OU1RFTExBVElPTl9RQU0zMikgID8gICJRQU0zMiIgICAgICAgICAgIDogXAorCSh4ID09IERSWF9DT05TVEVMTEFUSU9OX1FBTTY0KSAgPyAgIlFBTTY0IiAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NPTlNURUxMQVRJT05fUUFNMTI4KSAgPyAgIlFBTTEyOCIgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NPTlNURUxMQVRJT05fUUFNMjU2KSAgPyAgIlFBTTI1NiIgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NPTlNURUxMQVRJT05fUUFNNTEyKSAgPyAgIlFBTTUxMiIgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NPTlNURUxMQVRJT05fUUFNMTAyNCkgID8gICJRQU0xMDI0IiAgICAgICAgIDogXAorCSh4ID09IERSWF9DT05TVEVMTEFUSU9OX1FQU0tfTlIpICA/ICAiUVBTS19OUiIgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfQ09OU1RFTExBVElPTl9BVVRPKSAgPyAgIkF1dG8iICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NPTlNURUxMQVRJT05fVU5LTk9XTikgID8gICJVbmtub3duIiAgICAgICAgIDogXAorCSIoSW52YWxpZCkiKQorI2RlZmluZSBEUlhfU1RSX0NPREVSQVRFKHgpICggXAorCSh4ID09IERSWF9DT0RFUkFURV8xRElWMikgID8gICIxLzJuZCIgICAgICAgICAgIDogXAorCSh4ID09IERSWF9DT0RFUkFURV8yRElWMykgID8gICIyLzNyZCIgICAgICAgICAgIDogXAorCSh4ID09IERSWF9DT0RFUkFURV8zRElWNCkgID8gICIzLzR0aCIgICAgICAgICAgIDogXAorCSh4ID09IERSWF9DT0RFUkFURV81RElWNikgID8gICI1LzZ0aCIgICAgICAgICAgIDogXAorCSh4ID09IERSWF9DT0RFUkFURV83RElWOCkgID8gICI3Lzh0aCIgICAgICAgICAgIDogXAorCSh4ID09IERSWF9DT0RFUkFURV9BVVRPKSAgPyAgIkF1dG8iICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NPREVSQVRFX1VOS05PV04pICA/ICAiVW5rbm93biIgICAgICAgICA6IFwKKwkiKEludmFsaWQpIikKKyNkZWZpbmUgRFJYX1NUUl9ISUVSQVJDSFkoeCkgKCBcCisJKHggPT0gRFJYX0hJRVJBUkNIWV9OT05FKSAgPyAgIk5vbmUiICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0hJRVJBUkNIWV9BTFBIQTEpICA/ICAiQWxwaGE9MSIgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfSElFUkFSQ0hZX0FMUEhBMikgID8gICJBbHBoYT0yIiAgICAgICAgIDogXAorCSh4ID09IERSWF9ISUVSQVJDSFlfQUxQSEE0KSAgPyAgIkFscGhhPTQiICAgICAgICAgOiBcCisJKHggPT0gRFJYX0hJRVJBUkNIWV9BVVRPKSAgPyAgIkF1dG8iICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0hJRVJBUkNIWV9VTktOT1dOKSAgPyAgIlVua25vd24iICAgICAgICAgOiBcCisJIihJbnZhbGlkKSIpCisjZGVmaW5lIERSWF9TVFJfUFJJT1JJVFkoeCkgKCBcCisJKHggPT0gRFJYX1BSSU9SSVRZX0xPVykgID8gICJMb3ciICAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9QUklPUklUWV9ISUdIKSAgPyAgIkhpZ2giICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX1BSSU9SSVRZX1VOS05PV04pICA/ICAiVW5rbm93biIgICAgICAgICA6IFwKKwkiKEludmFsaWQpIikKKyNkZWZpbmUgRFJYX1NUUl9NSVJST1IoeCkgKCBcCisJKHggPT0gRFJYX01JUlJPUl9OTykgID8gICJOb3JtYWwiICAgICAgICAgIDogXAorCSh4ID09IERSWF9NSVJST1JfWUVTKSAgPyAgIk1pcnJvcmVkIiAgICAgICAgOiBcCisJKHggPT0gRFJYX01JUlJPUl9BVVRPKSAgPyAgIkF1dG8iICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX01JUlJPUl9VTktOT1dOKSAgPyAgIlVua25vd24iICAgICAgICAgOiBcCisJIihJbnZhbGlkKSIpCisjZGVmaW5lIERSWF9TVFJfQ0xBU1NJR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eCA9PSBEUlhfSU5URVJMRUFWRU1PREVfQjUyX00yNDApID8gIkI1Ml9NMjQwIiAgICAgICAgOiBcCisJKHggPT0gRFJYX0lOVEVSTEVBVkVNT0RFX0I1Ml9NNzIwKSA/ICJCNTJfTTcyMCIgICAgICAgIDogXAorCSh4ID09IERSWF9JTlRFUkxFQVZFTU9ERV9CNTJfTTQ4KSA/ICJCNTJfTTQ4IiAgICAgICAgIDogXAorCSh4ID09IERSWF9JTlRFUkxFQVZFTU9ERV9CNTJfTTApID8gIkI1Ml9NMCIgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0lOVEVSTEVBVkVNT0RFX1VOS05PV04pID8gIlVua25vd24iICAgICAgICAgOiBcCisJKHggPT0gRFJYX0lOVEVSTEVBVkVNT0RFX0FVVE8pID8gIkF1dG8iICAgICAgICAgICAgOiBcCisJIihJbnZhbGlkKSIpCisKKyNkZWZpbmUgRFJYX1NUUl9MRFBDKHgpICggXAorCSh4ID09IERSWF9MRFBDXzBfNCkgPyAiMC40IiAgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfTERQQ18wXzYpID8gIjAuNiIgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0xEUENfMF84KSA/ICIwLjgiICAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9MRFBDX0FVVE8pID8gIkF1dG8iICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0xEUENfVU5LTk9XTikgPyAiVW5rbm93biIgICAgICAgICA6IFwKKwkiKEludmFsaWQpIikKKworI2RlZmluZSBEUlhfU1RSX0NBUlJJRVIoeCkgKCBcCisJKHggPT0gRFJYX0NBUlJJRVJfTVVMVEkpID8gIk11bHRpIiAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NBUlJJRVJfU0lOR0xFKSA/ICJTaW5nbGUiICAgICAgICAgIDogXAorCSh4ID09IERSWF9DQVJSSUVSX0FVVE8pID8gIkF1dG8iICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0NBUlJJRVJfVU5LTk9XTikgPyAiVW5rbm93biIgICAgICAgICA6IFwKKwkiKEludmFsaWQpIikKKworI2RlZmluZSBEUlhfU1RSX0ZSQU1FTU9ERSh4KSAoIFwKKwkoeCA9PSBEUlhfRlJBTUVNT0RFXzQyMCkgID8gIjQyMCIgICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0ZSQU1FTU9ERV81OTUpICA/ICI1OTUiICAgICAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9GUkFNRU1PREVfOTQ1KSAgPyAiOTQ1IiAgICAgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfRlJBTUVNT0RFXzQyMF9GSVhFRF9QTikgID8gIjQyMCB3aXRoIGZpeGVkIFBOIiAgOiBcCisJKHggPT0gRFJYX0ZSQU1FTU9ERV85NDVfRklYRURfUE4pICA/ICI5NDUgd2l0aCBmaXhlZCBQTiIgIDogXAorCSh4ID09IERSWF9GUkFNRU1PREVfQVVUTykgID8gIkF1dG8iICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0ZSQU1FTU9ERV9VTktOT1dOKSAgPyAiVW5rbm93biIgICAgICAgICAgICA6IFwKKwkiKEludmFsaWQpIikKKworI2RlZmluZSBEUlhfU1RSX1BJTE9UKHgpICggXAorCSh4ID09IERSWF9QSUxPVF9PTikgPyAgICJPbiIgICAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9QSUxPVF9PRkYpID8gICAiT2ZmIiAgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfUElMT1RfQVVUTykgPyAgICJBdXRvIiAgICAgICAgICAgIDogXAorCSh4ID09IERSWF9QSUxPVF9VTktOT1dOKSA/ICAgIlVua25vd24iICAgICAgICAgOiBcCisJIihJbnZhbGlkKSIpCisvKiBUUFMgKi8KKworI2RlZmluZSBEUlhfU1RSX1RQU19GUkFNRSh4KSAgKCBcCisJKHggPT0gRFJYX1RQU19GUkFNRTEpICA/ICAiRnJhbWUxIiAgICAgICAgICA6IF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EUlhfUE9XRVJfTU9ERV8xNiIgOiBcCisJKHggPT0gRFJYX1BPV0VSX0RPV04pICA/ICAiRFJYX1BPV0VSX0RPV04gICIgOiBcCisJIihJbnZhbGlkKSIpCisKKyNkZWZpbmUgRFJYX1NUUl9PT0JfU1RBTkRBUkQoeCkgKCBcCisJKHggPT0gRFJYX09PQl9NT0RFX0EpICA/ICAiQU5TSSA1NS0xICAiIDogXAorCSh4ID09IERSWF9PT0JfTU9ERV9CX0dSQURFX0EpICA/ICAiQU5TSSA1NS0yIEEiIDogXAorCSh4ID09IERSWF9PT0JfTU9ERV9CX0dSQURFX0IpICA/ICAiQU5TSSA1NS0yIEIiIDogXAorCSIoSW52YWxpZCkiKQorCisjZGVmaW5lIERSWF9TVFJfQVVEX1NUQU5EQVJEKHgpICggXAorCSh4ID09IERSWF9BVURfU1RBTkRBUkRfQlRTQykgID8gIkJUU0MiICAgICAgICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0FVRF9TVEFOREFSRF9BMikgID8gIkEyIiAgICAgICAgICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0FVRF9TVEFOREFSRF9FSUFKKSAgPyAiRUlBSiIgICAgICAgICAgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfQVVEX1NUQU5EQVJEX0ZNX1NURVJFTykgID8gIkZNIFN0ZXJlbyIgICAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0FVRF9TVEFOREFSRF9BVVRPKSAgPyAiQXV0byIgICAgICAgICAgICAgICAgICAgICA6IFwKKwkoeCA9PSBEUlhfQVVEX1NUQU5EQVJEX01fTU9OTykgID8gIk0tU3RhbmRhcmQgTW9ubyIgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0FVRF9TVEFOREFSRF9EX0tfTU9OTykgID8gIkQvSyBNb25vIEZNIiAgICAgICAgICAgICAgOiBcCisJKHggPT0gRFJYX0FVRF9TVEFOREFSRF9CR19GTSkgID8gIkIvRy1EdWFsIENhcnJ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R1bmVyX2lmX2FnY19wb2wpCisjZGVmaW5lIERSWF9BVFRSX1RVTkVSU0xPV01PREUoZCkgICAgKChkKS0+bXlfY29tbW9uX2F0dHItPnR1bmVyX3Nsb3dfbW9kZSkKKyNkZWZpbmUgRFJYX0FUVFJfVFVORVJTUE9SVE5SKGQpICAgICAoKGQpLT5teV9jb21tb25fYXR0ci0+dHVuZXJfcG9ydF9ucikKKyNkZWZpbmUgRFJYX0FUVFJfSTJDQUREUihkKSAgICAgICAgICgoZCktPm15X2kyY19kZXZfYWRkci0+aTJjX2FkZHIpCisjZGVmaW5lIERSWF9BVFRSX0kyQ0RFVklEKGQpICAgICAgICAoKGQpLT5teV9pMmNfZGV2X2FkZHItPmkyY19kZXZfaWQpCisjZGVmaW5lIERSWF9JU01DVkVSVFlQRSh4KSAoKHgpID09IEFVWF9WRVJfUkVDT1JEKQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIE1hY3JvcyB3aXRoIGRldmljZS1zcGVjaWZpYyBoYW5kbGluZyBhcmUgY29udmVydGVkIHRvIENGRyBmdW5jdGlvbnMgKi8KKworI2RlZmluZSBEUlhfQUNDRVNTTUFDUk9fU0VUKGRlbW9kLCB2YWx1ZSwgY2ZnX25hbWUsIGRhdGFfdHlwZSkgICAgICAgICAgICAgXAorCWRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCXN0cnVjdCBkcnhfY2ZnIGNvbmZpZzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlkYXRhX3R5cGUgY2ZnX2RhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJY29uZmlnLmNmZ190eXBlID0gY2ZnX25hbWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWNvbmZpZy5jZmdfZGF0YSA9ICZjZmdfZGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQljZmdfZGF0YSA9IHZhbHVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJZHJ4X2N0cmwoZGVtb2QsIERSWF9DVFJMX1NFVF9DRkcsICZjb25maWcpOyAgICAgICAgICAgICAgICBcCisJfSB3aGlsZSAoMCkKKworI2RlZmluZSBEUlhfQUNDRVNTTUFDUk9fR0VUKGRlbW9kLCB2YWx1ZSwgY2ZnX25hbWUsIGRhdGFfdHlwZSwgZXJyb3JfdmFsdWUpIFwKKwlkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJaW50IGNmZ19zdGF0dXM7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlzdHJ1Y3QgZHJ4X2NmZyBjb25maWc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWRhdGFfdHlwZSAgICBjZmdfZGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJY29uZmlnLmNmZ190eXBlID0gY2ZnX25hbWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQljb25maWcuY2ZnX2RhdGEgPSAmY2ZnX2RhdGE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWNmZ19zdGF0dXMgPSBkcnhfY3RybChkZW1vZCwgRFJYX0NUUkxfR0VUX0NGRywgJmNvbmZpZyk7ICAgIFwKKwkJaWYgKGNmZ19zdGF0dXMgPT0gMCkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQkJdmFsdWUgPSBjZmdfZGF0YTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJfSBlbHNlIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAor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+CisjaW5jbHVkZSA8bGludXgvaW5pdC5oPgorI2luY2x1ZGUgPGxpbnV4L3N0cmluZy5oPgorI2luY2x1ZGUgPGxpbnV4L3NsYWIuaD4KKyNpbmNsdWRlIDxhc20vZGl2NjQuaD4KKworI2luY2x1ZGUgImR2Yl9mcm9udGVuZC5oIgorI2luY2x1ZGUgImRyeDM5eHhqLmgiCisKKyNpbmNsdWRlICJkcnhqLmgiCisjaW5jbHVkZSAiZHJ4al9tYXAuaCIKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09IERFRklORVMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisjZGVmaW5lIERSWDM5WFhfTUFJTl9GSVJNV0FSRSAiZHZiLWZlLWRyeGotbWMtMS4wLjguZnciCisKKy8qKgorKiBcYnJpZWYgTWF4aW11bSB1MzIgdmFsdWUuCisqLworI2lmbmRlZiBNQVhfVTMyCisjZGVmaW5lIE1BWF9VMzIgICgodTMyKSAoMHhGRkZGRkZGRkwpKQorI2VuZGlmCisKKy8qIEN1c3RvbWVyIGNvbmZpZ3VyYWJsZSBoYXJkd2FyZSBzZXR0aW5ncywgZXRjICovCisjaWZuZGVmIE1QRUdfU0VSSUFMX09VVFBVVF9QSU5fRFJJVkVfU1RSRU5HVEgKKyNkZWZpbmUgTVBFR19TRVJJQUxfT1VUUFVUX1BJTl9EUklWRV9TVFJFTkdUSCAweDAyCisjZW5kaWYKKworI2lmbmRlZiBNUEVHX1BBUkFMTEVMX09VVFBVVF9QSU5fRFJJVkVfU1RSRU5HVEgKKyNkZWZpbmUgTVBFR19QQVJBTExFTF9PVVRQVVRfUElOX0RSSVZFX1NUUkVOR1RIIDB4MDIKKyNlbmRpZgorCisjaWZuZGVmIE1QRUdfT1VUUFVUX0NMS19EUklWRV9TVFJFTkdUSAorI2RlZmluZSBNUEVHX09VVFBVVF9DTEtfRFJJVkVfU1RSRU5HVEggMHgwNgorI2VuZGlmCisKKyNpZm5kZWYgT09CX0NSWF9EUklWRV9TVFJFTkdUSAorI2RlZmluZSBPT0JfQ1JYX0RSSVZFX1NUUkVOR1RIIDB4MDIKKyNlbmRpZgorCisjaWZuZGVmIE9PQl9EUlhfRFJJVkVfU1RSRU5HVEgKKyNkZWZpbmUgT09CX0RSWF9EUklWRV9TVFJFTkdUSCAweDAyCisjZW5kaWYKKy8qKioqIFNUQVJUIERKQ09NQk8gcGF0Y2hlcyB0byBEUlhKIHJlZ2lzdGVybWFwIGNvbnN0YW50cyAqKioqKioqKioqKioqKioqKioqKiovCisvKioqKiByZWdpc3Rlcm1hcCAyMDA3MDYwNzEzMDMgZnJvbSBkcnhqICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSAgIEFUVl9UT1BfQ1JfQU1QX1RIX0ZNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFUVl9UT1BfQ1JfQU1QX1RIX0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QQorI2RlZmluZSAgIEFUVl9UT1BfQ1JfQU1QX1RIX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QQorI2RlZmluZSAgIEFUVl9UT1BfQ1JfQU1QX1RIX0JHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEFUVl9UT1BfQ1JfQU1QX1RIX0RLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEFUVl9UT1BfQ1JfQU1QX1RIX0kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX0RfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9EX0ZNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9EX0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgICBBVFZfVE9QX0NSX0NPTlRfQ1JfRF9MUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX0RfQkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9EX0RLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4CisjZGVmaW5lICAgICBBVFZfVE9QX0NSX0NPTlRfQ1JfRF9JICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX0lfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9JX0ZNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9JX0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgICBBVFZfVE9QX0NSX0NPTlRfQ1JfSV9MUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX0lfQkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9JX0RLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgICBBVFZfVE9QX0NSX0NPTlRfQ1JfSV9JICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfRk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfQkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfREsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEFUVl9UT1BfQ1JfT1ZNX1RIX01OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QTAKKyNkZWZpbmUgICBBVFZfVE9QX0NSX09WTV9USF9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBBVFZfVE9QX0NSX09WTV9USF9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEEwCisjZGVmaW5lICAgQVRWX1RPUF9DUl9PVk1fVEhfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhBMAorI2RlZmluZSAgIEFUVl9UT1BfQ1JfT1ZNX1RIX0JHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QTAKKyNkZWZpbmUgICBBVFZfVE9QX0NSX09WTV9USF9ESyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEEwCisjZGVmaW5lICAgQVRWX1RPUF9DUl9PVk1fVEhfSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhBMAorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUwX0VRVV9DMF9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUwX0VRVV9DMF9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgICAgQVRWX1RPUF9FUVUwX0VRVV9DMF9MUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgICAgQVRWX1RPUF9FUVUwX0VRVV9DMF9CRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgICAgQVRWX1RPUF9FUVUwX0VRVV9DMF9ESyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUwX0VRVV9DMF9JICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgICAgQVRWX1RPUF9FUVUxX0VRVV9DMV9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUxX0VRVV9DMV9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUY2CisjZGVmaW5lICAgICBBVFZfVE9QX0VRVTFfRVFVX0MxX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRjYKKyNkZWZpbmUgICAgIEFUVl9UT1BfRVFVMV9FUVVfQzFfQkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE5NworI2RlZmluZSAgICAgQVRWX1RPUF9FUVUxX0VRVV9DMV9ESyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTk4CisjZGVmaW5lICAgICBBVFZfVE9QX0VRVTFfRVFVX0MxX0kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRjYKKyNkZWZpbmUgICAgIEFUVl9UT1BfRVFVMl9FUVVfQzJfRk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfRVFVMl9FUVVfQzJfTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI4CisjZGVmaW5lICAgICBBVFZfVE9QX0VRVTJfRVFVX0MyX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOAorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUyX0VRVV9DMl9CRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzUKKyNkZWZpbmUgICAgIEFUVl9UT1BfRVFVMl9FUVVfQzJfREsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEIwCisjZGVmaW5lICAgICBBVFZfVE9QX0VRVTJfRVFVX0MyX0kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOAorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUzX0VRVV9DM19GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUzX0VRVV9DM19MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTkyCisjZGVmaW5lICAgICBBVFZfVE9QX0VRVTNfRVFVX0MzX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTIKKyNkZWZpbmUgICAgIEFUVl9UT1BfRVFVM19FUVVfQzNfQkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEyRQorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUzX0VRVV9DM19ESyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MThFCisjZGVmaW5lICAgICBBVFZfVE9QX0VRVTNfRVFVX0MzX0kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTIKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX01PREVfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX01PREVfRk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX01PREVfTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX01PREVfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX01PREVfQkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX01PREVfREsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX01PREVfSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfRk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfQkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfREsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBBVFZfVE9QX1ZJRF9BTVBfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM4MAorI2RlZmluZSAgIEFUVl9UT1BfVklEX0FNUF9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFUVl9UT1BfVklEX0FNUF9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjUwCisjZGVmaW5lICAgQVRWX1RPUF9WSURfQU1QX0xQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGNTAKKyNkZWZpbmUgICBBVFZfVE9QX1ZJRF9BTVBfQkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM4MAorI2RlZmluZSAgIEFUVl9UT1BfVklEX0FNUF9ESyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4Mzk0CisjZGVmaW5lICAgQVRWX1RPUF9WSURfQU1QX0kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRDgKKyNkZWZpbmUgICBJUU1fQ0ZfT1VUX0VOQV9PRkRNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICAgIElRTV9GU19BREpfU0VMX0JfUUFNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICAgIElRTV9GU19BREpfU0VMX0JfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9GU19BREpfU0VMX0JfVlNCICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIElRTV9SQ19BREpf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tb2RlID09IERSWF9QT1dFUl9NT0RFXzE0KSB8fCBcCisJCQkJICAgICAgIChtb2RlID09IERSWF9QT1dFUl9NT0RFXzE1KSB8fCBcCisJCQkJICAgICAgIChtb2RlID09IERSWF9QT1dFUl9NT0RFXzE2KSB8fCBcCisJCQkJICAgICAgIChtb2RlID09IERSWF9QT1dFUl9ET1dOKSkKKworLyogUGluIHNhZmUgbW9kZSBtYWNybyAqLworI2RlZmluZSBEUlhKX1BJTl9TQUZFX01PREUgMHgwMDAwCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT0gR0xPQkFMIFZBUklBQkxFcyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKioKKyovCisKKy8qKgorKiBcYnJpZWYgVGVtcG9yYXJ5IHJlZ2lzdGVyIGRlZmluaXRpb25zLgorKiAgICAgICAgKHJlZ2lzdGVyIGRlZmluaXRpb25zIHRoYXQgYXJlIG5vdCB5ZXQgYXZhaWxhYmxlIGluIHJlZ2lzdGVyIG1hc3RlcikKKyovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBBdWRpbyBibG9jayAweDEwMyBpcyB3cml0ZSBvbmx5LiBUbyBhdm9pZCBzaGFkb3dpbmcgaW4gZHJpdmVyIGFjY2Vzc2luZyAgICAqLworLyogUkFNIGFkcmVzc2VzIGRpcmVjdGx5LiBUaGlzIG11c3QgYmUgUkVBRCBPTkxZIHRvIGF2b2lkIHByb2JsZW1zLiAgICAgICAgICAgKi8KKy8qIFdyaXRpbmcgdG8gdGhlIGludGVyZmFjZSBhZHJlc3NlcyBpcyBtb3JlIHRoYW4gb25seSB3cml0aW5nIHRoZSBSQU0gICAgICAgICovCisvKiBsb2NhdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKgorKiBcYnJpZWYgUkFNIGxvY2F0aW9uIG9mIE1PRFVTIHJlZ2lzdGVycworKi8KKyNkZWZpbmUgQVVEX0RFTV9SQU1fTU9EVVNfSElfX0EgICAgICAgICAgICAgIDB4MTAyMDRBMworI2RlZmluZSBBVURfREVNX1JBTV9NT0RVU19ISV9fTSAgICAgICAgICAgICAgMHhGMDAwCisKKyNkZWZpbmUgQVVEX0RFTV9SQU1fTU9EVVNfTE9fX0EgICAgICAgICAgICAgIDB4MTAyMDRBNAorI2RlZmluZSBBVURfREVNX1JBTV9NT0RVU19MT19fTSAgICAgICAgICAgICAgMHgwRkZGCisKKy8qKgorKiBcYnJpZWYgUkFNIGxvY2F0aW9uIG9mIEkyUyBjb25maWcgcmVnaXN0ZXJzCisqLworI2RlZmluZSBBVURfREVNX1JBTV9JMlNfQ09ORklHMV9fQSAgICAgICAgICAgMHgxMDIwNEIxCisjZGVmaW5lIEFVRF9ERU1fUkFNX0kyU19DT05GSUcyX19BICAgICAgICAgICAweDEwMjA0QjIKKworLyoqCisqIFxicmllZiBSQU0gbG9jYXRpb24gb2YgRENPIGNvbmZpZyByZWdpc3RlcnMKKyovCisjZGVmaW5lIEFVRF9ERU1fUkFNX0RDT19CX0hJX19BICAgICAgICAgICAgICAweDEwMjA0NjEKKyNkZWZpbmUgQVVEX0RFTV9SQU1fRENPX0JfTE9fX0EgICAgICAgICAgICAgIDB4MTAyMDQ2MgorI2RlZmluZSBBVURfREVNX1JBTV9EQ09fQV9ISV9fQSAgICAgICAgICAgICAgMHgxMDIwNDYzCisjZGVmaW5lIEFVRF9ERU1fUkFNX0RDT19BX0xPX19BICAgICAgICAgICAgICAweDEwMjA0NjQKKworLyoqCisqIFxicmllZiBSQU0gbG9jYXRpb24gb2YgVGhyZXNob2xkIHJlZ2lzdGVycworKi8KKyNkZWZpbmUgQVVEX0RFTV9SQU1fTklDQU1fVEhSU0hMRF9fQSAgICAgICAgIDB4MTAyMDQ1QQorI2RlZmluZSBBVURfREVNX1JBTV9BMl9USFJTSExEX19BICAgICAgICAgICAgMHgxMDIwNEJCCisjZGVmaW5lIEFVRF9ERU1fUkFNX0JUU0NfVEhSU0hMRF9fQSAgICAgICAgICAweDEwMjA0QTYKKworLyoqCisqIFxicmllZiBSQU0gbG9jYXRpb24gb2YgQ2FycmllciBUaHJlc2hvbGQgcmVnaXN0ZXJzCisqLworI2RlZmluZSBBVURfREVNX1JBTV9DTV9BX1RIUlNITERfX0EgICAgICAgICAgMHgxMDIwNEFGCisjZGVmaW5lIEFVRF9ERU1fUkFNX0NNX0JfVEhSU0hMRF9fQSAgICAgICAgICAweDEwMjA0QjAKKworLyoqCisqIFxicmllZiBGTSBNYXRyaXggcmVnaXN0ZXIgZml4CisqLworI2lmZGVmIEFVRF9ERU1fV1JfRk1fTUFUUklYX19BCisjdW5kZWYgIEFVRF9ERU1fV1JfRk1fTUFUUklYX19BCisjZW5kaWYKKyNkZWZpbmUgQVVEX0RFTV9XUl9GTV9NQVRSSVhfX0EgICAgICAgICAgICAgIDB4MTA1MDA2RgorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyoqCisqIFxicmllZiBEZWZpbmVzIHJlcXVpcmVkIGZvciBhdWRpbworKi8KKyNkZWZpbmUgQVVEX1ZPTFVNRV9aRVJPX0RCICAgICAgICAgICAgICAgICAgICAgIDExNQorI2RlZmluZSBBVURfVk9MVU1FX0RCX01JTiAgICAgICAgICAgICAgICAgICAgICAgLTYwCisjZGVmaW5lIEFVRF9WT0xVTUVfREJfTUFYICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBBVURfQ0FSUklFUl9TVFJFTkdUSF9RUF8wREIgICAgICAgICAgICAgMHg0MDAwCisjZGVmaW5lIEFVRF9DQVJSSUVSX1NUUkVOR1RIX1FQXzBEQl9MT0cxMFQxMDAgICA0MjEKKyNkZWZpbmUgQVVEX01BWF9BVkNfUkVGX0xFVkVMICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIEFVRF9JMlNfRlJFUVVFTkNZX01BWCAgICAgICAgICAgICAgICAgICA0ODAwMFVMCisjZGVmaW5lIEFVRF9JMlNfRlJFUVVFTkNZX01JTiAgICAgICAgICAgICAgICAgICAxMjAwMFVMCisjZGVmaW5lIEFVRF9SRFNfQVJSQVlfU0laRSAgICAgICAgICAgICAgICAgICAgICAxOAorCisvKioKKyogXGJyaWVmIE5lZWRlZCBmb3IgY2FsY3VsYXRpb24gb2YgcHJlc2NhbGUgZmVhdHVyZSBpbiBBVUQKKyovCisjaWZuZGVmIERSWF9BVURfTUFYX0ZNX0RFVklBVElPTgorI2RlZmluZSBEUlhfQVVEX01BWF9GTV9ERVZJQVRJT04gICgxMDApCS8qIGtIeiAqLworI2VuZGlmCisKKy8qKgorKiBcYnJpZWYgTmVlZGVkIGZvciBjYWxjdWxhdGlvbiBvZiBOSUNBTSBwcmVzY2FsZSBmZWF0dXJlIGluIEFVRAorKi8KKyNpZm5kZWYgRFJYX0FVRF9NQVhfTklDQU1fUFJFU0NBTEUKKyNkZWZpbmUgRFJYX0FVRF9NQVhfTklDQU1fUFJFU0NBTEUgICg5KQkvKiBkQiAqLworI2VuZGlmCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKiBWYWx1ZXMgZm9yIEkyUyBNYXN0ZXIvU2xhdmUgcGluIGNvbmZpZ3VyYXRpb25zICovCisjZGVmaW5lIFNJT19QRFJfSTJTX0NMX0NGR19NT0RFX19NQVNURVIgICAgICAweDAwMDQKKyNkZWZpbmUgU0lPX1BEUl9JMlNfQ0xfQ0ZHX0RSSVZFX19NQVNURVIgICAgIDB4MDAwOAorI2RlZmluZSBTSU9fUERSX0kyU19DTF9DRkdfTU9ERV9fU0xBVkUgICAgICAgMHgwMDA0CisjZGVmaW5lIFNJT19QRFJfSTJTX0NMX0NGR19EUklWRV9fU0xBVkUgICAgICAweDAwMDAKKworI2RlZmluZSBTSU9fUERSX0kyU19EQV9DRkdfTU9ERV9fTUFTVEVSICAgICAgMHgwMDAzCisjZGVmaW5lIFNJT19QRFJfSTJTX0RBX0NGR19EUklWRV9fTUFTVEVSICAgICAweDAwMDgKKyNkZWZpbmUgU0lPX1BEUl9JMlNfREFfQ0ZHX01PREVfX1NMQVZFICAgICAgIDB4MDAwMworI2RlZmluZSBTSU9fUERSX0kyU19EQV9DRkdfRFJJVkVfX1NMQVZFICAgICAgMHgwMDA4CisKKyNkZWZpbmUgU0lPX1BEUl9JMlNfV1NfQ0ZHX01PREVfX01BU1RFUiAgICAgIDB4MDAwNAorI2RlZmluZSBTSU9fUERSX0kyU19XU19DRkdfRFJJVkVfX01BU1RFUiAgICAgMHgwMDA4CisjZGVmaW5lIFNJT19QRFJfSTJTX1dTX0NGR19NT0RFX19TTEFWRSAgICAgICAweDAwMDQKKyNkZWZpbmUgU0lPX1BEUl9JMlNfV1NfQ0ZHX0RSSVZFX19TTEFWRSAgICAgIDB4MDAwMAorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT0gUkVHSVNURVIgQUNDRVNTIE1BQ1JPUyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBUaGlzIG1hY3JvIGlzIHVzZWQgdG8gY3JlYXRlIGJ5dGUgYXJyYXlzIGZvciBibG9jayB3cml0ZXMuCisqIEJsb2NrIHdyaXRlcyBzcGVlZCB1cCBJMkMgdHJhZmZpYyBiZXR3ZWVuIGhvc3QgYW5kIGRlbW9kLgorKiBUaGUgbWFjcm8gdGFrZXMgY2FyZSBvZiB0aGUgcmVxdWlyZWQgYnl0ZSBvcmRlciBpbiBhIDE2IGJpdHMgd29yZC4KKyogeCAtPiBsb3dieXRlKHgpLCBoaWdoYnl0ZSh4KQorKi8KKyNkZWZpbmUgRFJYSl8xNlRPOCh4KSAoKHU4KSAoKCh1MTYpeCkgJiAweEZGKSksIFwKKwkJICAgICAgICgodTgpKCgoKHUxNil4KT4+OCkmMHhGRikpCisvKioKKyogVGhpcyBtYWNybyBpcyB1c2VkIHRvIGNvbnZlcnQgYnl0ZSBhcnJheSB0byAxNiBiaXQgcmVnaXN0ZXIgdmFsdWUgZm9yIGJsb2NrIHJlYWQuCisqIEJsb2NrIHJlYWQgc3BlZWQgdXAgSTJDIHRyYWZmaWMgYmV0d2VlbiBob3N0IGFuZCBkZW1vZC4KKyogVGhlIG1hY3JvIHRha2VzIGNhcmUgb2YgdGhlIHJlcXVpcmVkIGJ5dGUgb3JkZXIgaW4gYSAxNiBiaXRzIHdvcmQuCisqLworI2RlZmluZSBEUlhKXzhUTzE2KHgpICgodTE2KSAoeFswXSB8ICh4WzFdIDw8IDgpKSkKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09IE1JU0MgREVGSU5FUyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT0gSEkgQ09NTUFORCBSRUxBVEVEIERFRklORVMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcYnJpZWYgR2VuZXJhbCBtYXhpbXVtIG51bWJlciBvZiByZXRyaWVzIGZvciB1Y29kZSBjb21tYW5kIGludGVyZmFjZXMKKyovCisjZGVmaW5lIERSWEpfTUFYX1JFVFJJRVMgKDEwMCkKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09IFNUQU5EQVJEIFJFTEFURUQgTUFDUk9TID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisjZGVmaW5lIERSWEpfSVNBVFZTVEQoc3RkKSAoKHN0ZCA9PSBEUlhfU1RBTkRBUkRfUEFMX1NFQ0FNX0JHKSB8fCBcCisJCQkgICAgICAgKHN0ZCA9PSBEUlhfU1RBTkRBUkRfUEFMX1NFQ0FNX0RLKSB8fCBcCisJCQkgICAgICAgKHN0ZCA9PSBEUlhfU1RBTkRBUkRfUEFMX1NFQ0FNX0kpIHx8IFwKKwkJCSAgICAgICAoc3RkID09IERSWF9TVEFOREFSRF9QQUxfU0VDQU1fTCkgfHwgXAorCQkJICAgICAgIChzdGQgPT0gRFJYX1NUQU5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yogRlMgc2V0dGluZyAqLworCTBVTCwJCQkvKiBpcW1fZnNfcmF0ZV9vZnMgICAgICAqLworCWZhbHNlLAkJCS8qIHBvc19pbWFnZSAgICAgICAgICAqLworCS8qIFJDIHNldHRpbmcgKi8KKwkwVUwsCQkJLyogaXFtX3JjX3JhdGVfb2ZzICAgICAgKi8KKwkvKiBBVUQgaW5mb3JtYXRpb24gKi8KKy8qICAgZmFsc2UsICAgICAgICAgICAgICAgICAgKiBmbGFnU2V0QVVEZG9uZSAgICAqLworLyogICBmYWxzZSwgICAgICAgICAgICAgICAgICAqIGRldGVjdGVkUkRTICAgICAgICovCisvKiAgIHRydWUsICAgICAgICAgICAgICAgICAgICogZmxhZ0FTRFJlcXVlc3QgICAgKi8KKy8qICAgZmFsc2UsICAgICAgICAgICAgICAgICAgKiBmbGFnSERldkNsZWFyICAgICAqLworLyogICBmYWxzZSwgICAgICAgICAgICAgICAgICAqIGZsYWdIRGV2U2V0ICAgICAgICovCisvKiAgICh1MTYpIDB4RkZGLCAgICAgICAgICAqIHJkc0xhc3RDb3VudCAgICAgICovCisKKwkvKiBBVFYgY29uZmlndWFydGlvbiAqLworCTBVTCwJCQkvKiBmbGFncyBjZmcgY2hhbmdlcyAqLworCS8qIHNoYWRvdyBvZiBBVFZfVE9QX0VRVTBfX0EgKi8KKwl7LTUsCisJIEFUVl9UT1BfRVFVMF9FUVVfQzBfRk0sCisJIEFUVl9UT1BfRVFVMF9FUVVfQzBfTCwKKwkgQVRWX1RPUF9FUVUwX0VRVV9DMF9MUCwKKwkgQVRWX1RPUF9FUVUwX0VRVV9DMF9CRywKKwkgQVRWX1RPUF9FUVUwX0VRVV9DMF9ESywKKwkgQVRWX1RPUF9FUVUwX0VRVV9DMF9JfSwKKwkvKiBzaGFkb3cgb2YgQVRWX1RPUF9FUVUxX19BICovCisJey01MCwKKwkgQVRWX1RPUF9FUVUxX0VRVV9DMV9GTSwKKwkgQVRWX1RPUF9FUVUxX0VRVV9DMV9MLAorCSBB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udCBTSUYgYXR0IHNldHRpbmcgICAgICAgKi8KKwl7CQkJLyogcWFtX3JmX2FnY19jZmcgKi8KKwkgRFJYX1NUQU5EQVJEX0lUVV9CLAkvKiBzdGFuZGFyZCAgICAgICAgICAgICovCisJIERSWF9BR0NfQ1RSTF9BVVRPLAkvKiBjdHJsX21vZGUgICAgICAgICAgICAqLworCSAwLAkJCS8qIG91dHB1dF9sZXZlbCAgICAgICAgICovCisJIDAsCQkJLyogbWluX291dHB1dF9sZXZlbCAgICAgICovCisJIDB4RkZGRiwJCS8qIG1heF9vdXRwdXRfbGV2ZWwgICAgICAqLworCSAweDAwMDAsCQkvKiBzcGVlZCAgICAgICAgICAgICAgICovCisJIDB4MDAwMCwJCS8qIHRvcCAgICAgICAgICAgICAgICAgKi8KKwkgMHgwMDAwCQkJLyogYy5vLmMuICAgICAgICAgICAgICAqLworCSB9LAorCXsJCQkvKiBxYW1faWZfYWdjX2NmZyAqLworCSBEUlhfU1RBTkRBUkRfSVRVX0IsCS8qIHN0YW5kYXJkICAgICAgICAgICAgKi8KKwkgRFJYX0FHQ19DVFJMX0FVVE8sCS8qIGN0cmxfbW9kZSAgICAgICAgICAgICovCisJIDAsCQkJLyogb3V0cHV0X2xldmVsICAgICAgICAgKi8KKwkgMCwJCQkvKiBtaW5fb3V0cHV0X2xldmVsICAgICAgKi8KKwkgMHhGRkZGLAkJLyogbWF4X291dHB1dF9sZXZlbCAgICAgICovCisJIDB4MDAwMCwJCS8qIHNwZWVkICAgICAgICAgICAgICAgKi8KKwkgMHgwMDAwLAkJLyogdG9wICAgIChkb24ndCBjYXJlKSAqLworCSAweDAwMDAJCQkvKiBjLm8uYy4gKGRvbid0IGNhcmUpICovCisJIH0sCisJewkJCS8qIHZzYl9yZl9hZ2NfY2ZnICovCisJIERSWF9TVEFOREFSRF84VlNCLAkvKiBzdGFuZGFyZCAgICAgICAqLworCSBEUlhfQUdDX0NUUkxfQVVUTywJLyogY3RybF9tb2RlICAgICAgICovCisJIDAs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xlcyAqLworCSB9LAorCS8qIEluaXRpbGlzYXRpb25zIGJlbG93IGNhbiBiZSBvbW1pdGVkLCB0aGV5IHJlcXVpcmUgbm8gdXNlciBpbnB1dCBhbmQKKwkgICBhcmUgaW5pdGlhbHkgMCwgTlVMTCBvciBmYWxzZS4gVGhlIGNvbXBpbGVyIHdpbGwgaW5pdGlhbGl6ZSB0aGVtIHRvIHRoZXNlCisJICAgdmFsdWVzIHdoZW4gb21taXRlZC4gICovCisJZmFsc2UsCQkJLyogaXNfb3BlbmVkICovCisKKwkvKiBTQ0FOICovCisJTlVMTCwJCQkvKiBubyBzY2FuIHBhcmFtcyB5ZXQgICAgICAgICAgICAgICAqLworCTAsCQkJLyogY3VycmVudCBzY2FuIGluZGV4ICAgICAgICAgICAgICAgKi8KKwkwLAkJCS8qIG5leHQgc2NhbiBmcmVxdWVuY3kgICAgICAgICAgICAgICovCisJZmFsc2UsCQkJLyogc2NhbiByZWFkeSBmbGFnICAgICAgICAgICAgICAgICAgKi8KKwkwLAkJCS8qIG1heCBjaGFubmVscyB0byBzY2FuICAgICAgICAgICAgICovCisJMCwJCQkvKiBuciBvZiBjaGFubmVscyBzY2FubmVkICAgICAgICAgICAqLworCU5VTEwsCQkJLyogZGVmYXVsdCBzY2FuIGZ1bmN0aW9uICAgICAgICAgICAgKi8KKwlOVUxMLAkJCS8qIGRlZmF1bHQgY29udGV4dCBwb2ludGVyICAgICAgICAgICovCisJMCwJCQkvKiBtaWxsaXNlYyB0byB3YWl0IGZvciBkZW1vZCBsb2NrICAqLworCURSWEpfREVNT0RfTE9DSywJLyogZGVzaXJlZCBsb2NrICAgICAgICAgICAgICAgKi8KKwlmYWxzZSwKKworCS8qIFBvd2VyIG1hbmFnZW1lbnQgKi8KKwlEUlhfUE9XRVJfVVAsCisKKwkvKiBUdW5lciAqLworCTEsCQkJLyogbnIgb2YgSTJDIHBvcnQgdG8gd2ljaCB0dW5lciBpcyAgICAgKi8KKwkwTCwJCQkvKiBtaW5pbXV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Ki8KKwkgRFJYX0FVRF9NQVhfTklDQU1fUFJFU0NBTEUJLyogbmljYW1fZ2FpbiAqLworCSB9LAorCURSWF9BVURfRk1fREVFTVBIXzc1VVMsCS8qIGRlZW1waCAqLworCURSWF9CVFNDX1NURVJFTywJLyogYnRzY19kZXRlY3QgKi8KKwkwLAkJCS8qIHJkc19kYXRhX2NvdW50ZXIgKi8KKwlmYWxzZQkJCS8qIHJkc19kYXRhX3ByZXNlbnQgKi8KK307CisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KK1NUUlVDVFVSRVMKKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLworc3RydWN0IGRyeGplcV9zdGF0IHsKKwl1MTYgZXFfbXNlOworCXU4IGVxX21vZGU7CisJdTggZXFfY3RybDsKKwl1OCBlcV9zdGF0OworfTsKKworLyogSEkgY29tbWFuZCAqLworc3RydWN0IGRyeGpfaGlfY21kIHsKKwl1MTYgY21kOworCXUxNiBwYXJhbTE7CisJdTE2IHBhcmFtMjsKKwl1MTYgcGFyYW0zOworCXUxNiBwYXJhbTQ7CisJdTE2IHBhcmFtNTsKKwl1MTYgcGFyYW02OworfTsKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09IE1JQ1JPQ09ERSBSRUxBVEVEIFNUUlVDVFVSRVMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyAqIHN0c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c3RydWN0IGRyeF9kZW1vZF9pbnN0YW5jZSAqZGVtb2QsIGVudW0gZHJ4X3Bvd2VyX21vZGUgKm1vZGUpOworCitzdGF0aWMgaW50IHBvd2VyX2Rvd25fYXVkKHN0cnVjdCBkcnhfZGVtb2RfaW5zdGFuY2UgKmRlbW9kKTsKKworc3RhdGljIGludAorY3RybF9zZXRfY2ZnX3ByZV9zYXcoc3RydWN0IGRyeF9kZW1vZF9pbnN0YW5jZSAqZGVtb2QsIHN0cnVjdCBkcnhqX2NmZ19wcmVfc2F3ICpwcmVfc2F3KTsKKworc3RhdGljIGludAorY3RybF9zZXRfY2ZnX2FmZV9nYWluKHN0cnVjdCBkcnhfZGVtb2RfaW5zdGFuY2UgKmRlbW9kLCBzdHJ1Y3QgZHJ4al9jZmdfYWZlX2dhaW4gKmFmZV9nYWluKTsKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09ICAgICAgICAgICAgICAgICAgICAgICAgICBIRUxQRVIgRlVOQ1RJT05TICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworLyoKKyogXGZuIHUzMiBmcmFjMjgodTMyIE4sIHUzMiBEKQorKiBcYnJpZWYgQ29tcHV0ZTogKDE8PD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BEIGRlbm9taW5hdG9yIDMyLWJpdHMuCisqIFxyZXR1cm4gdTMyCisqIFxyZXR2YWwgKChOL0QpICogMTAwMDAwMCksIDMyIGJpdHMKKyoKKyogTm8gY2hlY2sgb24gRD0wIQorKi8KK3N0YXRpYyB1MzIgZnJhY190aW1lczFlNih1MzIgTiwgdTMyIEQpCit7CisJdTMyIHJlbWFpbmRlciA9IDA7CisJdTMyIGZyYWMgPSAwOworCisJLyoKKwkgICBmcmFjID0gKE4gKiAxMDAwMDAwKSAvIEQKKwkgICBUbyBsZXQgaXQgZml0IGluIGEgMzIgYml0cyBjb21wdXRhdGlvbjoKKwkgICBmcmFjID0gKE4gKiAoMTAwMDAwMCA+PiA0KSkgLyAoRCA+PiA0KQorCSAgIFRoaXMgd291bGQgcmVzdWx0IGluIGEgcHJvYmxlbSBpbiBjYXNlIEQgPCAxNiAoZGl2IGJ5IDApLgorCSAgIFNvIHdlIGRvIGl0IG1vcmUgZWxhYm9yYXRlIGFzIHNob3duIGJlbG93LgorCSAqLworCWZyYWMgPSAoKCh1MzIpIE4pICogKDEwMDAwMDAgPj4gNCkpIC8gRDsKKwlmcmFjIDw8PSA0OworCXJlbWFpbmRlciA9ICgoKHUzMikgTikgKiAoMTAwMDAwMCA+PiA0KSkgJSBEOworCXJlbWFpbmRlciA8PD0gNDsKKwlmcmFjICs9IHJlbWFpbmRlciAvIEQ7CisJcmVtYWluZGVyID0gcmVtYWluZGVyICUgRDsKKwlpZiAoKHJlbWFpbmRlciAqIDIpID4gRCkKKwkJZnJhYysrOworCisJcmV0dXJuIGZyYWM7Cit9CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKworLyoqCisqIFxicmllZiBWYWx1ZXMgZm9yIE5JQ0FNIHByZXNjYWxlciBnYWluLiBDb21wdXRlZCBmcm9tIGRCIHRvIGludGVnZXIKKyogICAgICAgIGFuZCByb3VuZGVkLiBGb3IgY2FsYyB1c2VkIGZvcm11bGE6IDE2KjEwXihwcmVzY2FsZUdhaW5bZEJdLzIwKS4KKyoKKyovCitzdGF0aWMgY29uc3QgdTE2IG5pY2FtX3ByZXNjX3RhYmxlX3ZhbFs0M10gPSB7CisJMSwgMSwgMSwgMSwgMiwgMiwgMiwgMiwgMywgMywgMywgNCwgNCwKKwk1LCA1LCA2LCA2LCA3LCA4LCA5LCAxMCwgMTEsIDEzLCAxNCwgMTYsCisJMTgsIDIwLCAyMywgMjUsIDI4LCAzMiwgMzYsIDQwLCA0NSwKKwk1MSwgNTcsIDY0LCA3MSwgODAsIDkwLCAxMDEsIDExMywgMTI3Cit9OworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSAgICAgICAgICAgICAgICAgICAgICAgIEVORCBIRUxQRVIgRlVOQ1RJT05TICAgICAgICAgICAgICAgICAgICAgICAgICAgID09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSAgICAgICAgICAgICAgICAgICAgICBEUlhKIERBUCBGVU5DVElPTlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09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gwCS8qIG1pbGxpc2VjICovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGJvb2wgaXNfaGFuZGxlZF9ieV9hdWRfdHJfaWYoIHUzMiBhZGRyICkKKyogXGJyaWVmIENoZWNrIGlmIHRoaXMgYWRkcmVzcyBpcyBoYW5kbGVkIGJ5IHRoZSBhdWRpbyB0b2tlbiByaW5nIGludGVyZmFjZS4KKyogXHBhcmFtIGFkZHIKKyogXHJldHVybiBib29sCisqIFxyZXR2YWwgdHJ1ZSAgWWVzLCBoYW5kbGVkIGJ5IGF1ZGlvIHRva2VuIHJpbmcgaW50ZXJmYWNlCisqIFxyZXR2YWwgZmFsc2UgTm8sIG5vdCBoYW5kbGVkIGJ5IGF1ZGlvIHRva2VuIHJpbmcgaW50ZXJmYWNlCisqCisqLworc3RhdGljCitib29sIGlzX2hhbmRsZWRfYnlfYXVkX3RyX2lmKHUzMiBhZGRyKQoreworCWJvb2wgcmV0dmFsID0gZmFsc2U7CisKKwlpZiAoKERSWERBUF9GQVNJX0FERFIyQkxPQ0soYWRkcikgPT0gNCkgJiYKKwkgICAgKERSWERBUF9GQVNJX0FERFIyQkFOSyhhZGRyKSA+IDEpICYmCisJICAgIChEUlhEQVBfRkFTSV9BRERSMkJBTksoYWRkcikgPCA2KSkgeworCQlyZXR2YWwgPSB0cnVlOworCX0KKworCXJldHVybiByZXR2YWw7Cit9CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKK2ludCBkcnhic3BfaTJjX3dyaXRlX3JlYWQoc3RydWN0IGkyY19kZXZpY2VfYWRkciAqd19kZXZfYWRkciwKKwkJCQkgdTE2IHdfY291bnQsCisJCQkJIHU4ICp3RGF0YSwKKwkJCQkgc3RydWN0IGkyY19kZXZpY2VfYWRkci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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCWlmIChkZXZfYWRkciA9PSBOVUxMKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCW92ZXJoZWFkX3NpemUgPSAoSVNfSTJDXzEwQklUKGRldl9hZGRyLT5pMmNfYWRkcikgPyAyIDogMSkgKworCSAgICAoRFJYREFQX0ZBU0lfTE9OR19GT1JNQVQoYWRkcikgPyA0IDogMik7CisKKwlpZiAoKERSWERBUF9GQVNJX09GRlNFVF9UT09fTEFSR0UoYWRkcikpIHx8CisJICAgICgoIShEUlhEQVBGQVNJX0xPTkdfQUREUl9BTExPV0VEKSkgJiYKKwkgICAgIERSWERBUF9GQVNJX0xPTkdfRk9STUFUKGFkZHIpKSB8fAorCSAgICAob3ZlcmhlYWRfc2l6ZSA+IChEUlhEQVBfTUFYX1dDSFVOS1NJWkUpKSB8fAorCSAgICAoKGRhdGFzaXplICE9IDApICYmIChkYXRhID09IE5VTEwpKSB8fCAoKGRhdGFzaXplICYgMSkgPT0gMSkpCisJCXJldHVybiAtRUlOVkFMOworCisJZmxhZ3MgJj0gRFJYREFQX0ZBU0lfRkxBR1M7CisJZmxhZ3MgJj0gfkRSWERBUF9GQVNJX01PREVGTEFHUzsKKyNpZiBEUlhEQVBfU0lOR0xFX01BU1RFUgorCWZsYWdzIHw9IERSWERBUF9GQVNJX1NJTkdMRV9NQVNURVI7CisjZW5kaWYKKworCS8qIFdyaXRlIGJsb2NrIHRvIEkyQyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLworCWJsb2NrX3NpemUgPSAoKERSWERBUF9NQVhfV0NIVU5LU0laRSkgLSBvdmVyaGVhZF9zaXplKSAmIH4xOworCWRvIHsKKwkJdTE2IHRvZG8gPSAwOworCQl1MTYgYnVmeCA9IDA7CisKKwkJLyogQnVmZmVyIGRldmljZSBhZGRyZXNzICovCisJCWFkZHIgJj0gfkRSWERBUF9GQVNJX0ZMQUdT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amlmZmllcyk7CisJCQlkZWx0YV90aW1lciA9IGN1cnJlbnRfdGltZXIgLSBzdGFydF90aW1lcjsKKwkJCWlmIChkZWx0YV90aW1lciA+IERSWEpfREFQX0FVRFRSSUZfVElNRU9VVCkgeworCQkJCXN0YXQgPSAtRUlPOworCQkJCWJyZWFrOworCQkJfQorCQl9CQkvKiB3aGlsZSAoIC4uLiApICovCisJfQorCisJLyogUmVhZCB2YWx1ZSAqLworCWlmIChzdGF0ID09IDApCisJCXN0YXQgPSBkcnhqX2RhcF9yZWFkX21vZGlmeV93cml0ZV9yZWcxNihkZXZfYWRkciwKKwkJCQkJCSAgICAgQVVEX1RPUF9UUl9SRF9SRUdfX0EsCisJCQkJCQkgICAgIFNJT19ISV9SQV9SQU1fUzBfUk1XQlVGX19BLAorCQkJCQkJICAgICAweDAwMDAsIGRhdGEpOworCXJldHVybiBzdGF0OworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCitzdGF0aWMgaW50IGRyeGpfZGFwX3JlYWRfcmVnMTYoc3RydWN0IGkyY19kZXZpY2VfYWRkciAqZGV2X2FkZHIsCisJCQkJICAgICAgdTMyIGFkZHIsCisJCQkJICAgICAgdTE2ICpkYXRhLCB1MzIgZmxhZ3MpCit7CisJaW50IHN0YXQgPSAtRUlPOworCisJLyogQ2hlY2sgcGFyYW0gKi8KKwlpZiAoKGRldl9hZGRyID09IE5VTEwpIHx8IChkYXRhID09IE5VTEwpKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCWlmIChpc19oYW5kbGVkX2J5X2F1ZF90cl9pZihhZGRyKSkKKwkJc3RhdCA9IGRyeGpfZGFwX3JlYWRfYXVkX3JlZzE2KGRldl9hZGRyLCBhZGRyLCBkYXRhKTsKKwllbHNlCisJCXN0YXQgPSBkcnhkYXBfZmFzaV9yZWFkX3JlZzE2KGRldl9hZGRyLCBhZGRyLCBkYXRhL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UlDX0JVRl9TVEFSVCArIGkpLAorCQkJCQkgICAgd29yZCwgMCk7CisJCX0KKwl9CisKKwlyYyA9IGhpX2NvbW1hbmQoZGV2X2FkZHIsICZoaV9jbWQsICZkdW1teSk7CisJaWYgKHJjICE9IDApIHsKKwkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQlnb3RvIHJ3X2Vycm9yOworCX0KKworCWlmIChyZWFkX2ZsYWcpIHsKKwkJLyogcmVhZCBkYXRhIGZyb20gYnVmZmVyICovCisJCWZvciAoaSA9IDA7IGkgPCAoZGF0YXNpemUgLyAyKTsgaSsrKSB7CisJCQlkcnhqX2RhcF9yZWFkX3JlZzE2KGRldl9hZGRyLAorCQkJCQkgICAgKERSWEpfSElfQVRPTUlDX0JVRl9TVEFSVCArIGkpLAorCQkJCQkgICAmd29yZCwgMCk7CisJCQlkYXRhWzIgKiBpXSA9ICh1OCkgKHdvcmQgJiAweEZGKTsKKwkJCWRhdGFbKDIgKiBpKSArIDFdID0gKHU4KSAod29yZCA+PiA4KTsKKwkJfQorCX0KKworCXJldHVybiAwOworCityd19lcnJvcjoKKwlyZXR1cm4gLUVJTzsKKworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGludCBkcnhqX2RhcF9hdG9taWNfcmVhZF9yZWczMigpCisqIFxicmllZiBBdG9taWMgcmVhZCBvZiAzMiBiaXRzIHdvcmRzCisqLworc3RhdGljCitpbnQgZHJ4al9kYXBfYXRvbWljX3JlYWRfcmVnMzIoc3RydWN0IGkyY19kZXZpY2VfYWRkciAqZGV2X2FkZHIsCisJCQkJICAgICB1MzIgYWRkciwKKwkJCQkgICAgIHUzMiAqZGF0YSwgdTMyIGZsYWdzKQoreworCXU4IGJ1ZltzaXplb2YoKmRhdGEpXTsKKwlpbnQgcmMgPSAtRUlPOworCXUzMiB3b3JkID0gMDsKKworCWlmICghZGF0YSkKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwlyYyA9IGRyeGpfZGFwX2F0b21pY19yZWFkX3dyaXRlX2Jsb2NrKGRldl9hZGRyLCBhZGRyLAorCQkJCQkgICAgICBzaXplb2YoKmRhdGEpLCBidWYsIHRydWUpOworCisJaWYgKHJjIDwgMCkKKwkJcmV0dXJuIDA7CisKKwl3b3JkID0gKHUzMikgYnVmWzNdOworCXdvcmQgPDw9IDg7CisJd29yZCB8PSAodTMyKSBidWZbMl07CisJd29yZCA8PD0gODsKKwl3b3JkIHw9ICh1MzIpIGJ1ZlsxXTsKKwl3b3JkIDw8PSA4OworCXdvcmQgfD0gKHUzMikgYnVmWzBdOworCisJKmRhdGEgPSB3b3JkOworCisJcmV0dXJuIHJjOworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSAgICAgICAgICAgICAgICAgICAgICAgIEVORCBEUlhKIERBUCBGVU5DVElPTlMgICAgICAgICAgICAgICAgICAgICAgICAgID09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSAgICAgICAgICAgICAgICAgICAgICBIT1NUIElOVEVSRkFDRSBGVU5DVElPTlMgICAgICAgICAgICAgICAgICAgICAgICAgID09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGludCBoaV9jZmdfY29tbWFuZCgpCisqIFxicmllZiBDb25maWd1cmUgSEkgd2l0aCBzZXR0aW5ncyBzdG9yZWQgaW4gdGhlIGRlbW9kIHN0cnVjdHVyZS4KKyogXHBhcmFtIGRlbW9kIERlbW9kdWxhdG9yLgorKiBccmV0dXJuIGludC4KKyoKKyogVGhpcyByb3V0aW5lIHdhcyBjcmVhdGVkIGJlY2F1c2UgdG8gbXVjaCBvcnRob2dvbmFsIHNldHRpbmdzIGhhdmUKKyogYmVlbiBwdXQgaW50byBvbmUgSEkgQVBJIGZ1bmN0aW9uIChjb25maWd1cmUpLiBFc3BlY2lhbGx5IHRoZSBJMkMgYnJpZGdlCisqIGVuYWJsZS9kaXNhYmxlIHNob3VsZCBub3QgbmVlZCByZS1jb25maWd1cmF0aW9uIG9mIHRoZSBISS4KKyoKKyovCitzdGF0aWMgaW50IGhpX2NmZ19jb21tYW5kKGNvbnN0IHN0cnVjdCBkcnhfZGVtb2RfaW5zdGFuY2UgKmRlbW9kKQoreworCXN0cnVjdCBkcnhqX2RhdGEgKmV4dF9hdHRyID0gKHN0cnVjdCBkcnhqX2RhdGEgKikgKE5VTEwpOworCXN0cnVjdCBkcnhqX2hpX2NtZCBoaV9jbWQ7CisJdTE2IHJlc3VsdCA9IDA7CisJaW50IHJjOworCisJZXh0X2F0dHIgPSAoc3RydWN0IGRyeGpfZGF0YSAqKSBkZW1vZC0+bXlfZXh0X2F0dHI7CisKKwloaV9jbWQuY21kID0gU0lPX0hJX1JBX1JBTV9DTURfQ09ORklHOworCWhpX2NtZC5wYXJhbTEgPSBTSU9fSElfUkFfUkFNX1BBUl8xX1BBUjFfU0VDX0tFWTsKK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m4gLUVJTzsKK30KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT0gICAgICAgICAgICAgICAgICAgRU5EIEhPU1QgSU5URVJGQUNFIEZVTkNUSU9OUyAgICAgICAgICAgICAgICAgICAgICAgICA9PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT0gICAgICAgICAgICAgICAgICAgICAgICBBVVhJTElBUlkgRlVOQ1RJT05TICAgICAgICAgICAgICAgICAgICAgICAgICAgICA9PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworLyoqCisqIFxmbiBpbnQgZ2V0X2RldmljZV9jYXBhYmlsaXRpZXMoKQorKiBcYnJpZWYgR2V0IGFuZCBzdG9yZSBkZXZpY2UgY2FwYWJpbGl0aWVzLgorKiBccGFyYW0gZGVtb2QgIFBvaW50ZXIgdG8gZGVtb2R1bGF0b3IgaW5zdGFuY2UuCisqIFxyZXR1cm4gaW50LgorKiBccmV0dXJuIDAgICAgU3VjY2VzcworKiBccmV0dmFsIC1FSU8gRmFpbHVyZQorKgorKiBEZXBlbmRpbmcgb24gcHVsbGRvd25zIG9uIE1EeCBwaW5zIHRoZSBmb2xsb3dpbmc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worCQl9CisJCWJyZWFrOworICAgICAgLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCWRlZmF1bHQ6CisJCXJldHVybiAtRUlOVkFMOworCX0JCQkvKiBzd2l0Y2ggKCB1aW9fZGF0YS0+dWlvICkgKi8KKworCS8qICBXcml0ZSBtYWdpYyB3b3JkIHRvIGRpc2FibGUgcGRyIHJlZyB3cml0ZSAgICAgICAgICAgICAgICovCisJcmMgPSBkcnhqX2RhcF93cml0ZV9yZWcxNihkZW1vZC0+bXlfaTJjX2Rldl9hZGRyLCBTSU9fVE9QX0NPTU1fS0VZX19BLCAweDAwMDAsIDApOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisKKwlyZXR1cm4gMDsKK3J3X2Vycm9yOgorCXJldHVybiAtRUlPOworfQorCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvKiBVSU8gQ29uZmlndXJhdGlvbiBGdW5jdGlvbnMgLSBlbmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisKKy8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCisvKiBJMkMgQnJpZGdlIEZ1bmN0aW9ucyAtIGJlZ2luICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyotLS0tLS0tLS0t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09PT09PT09PT09PT09PT09PT09Ki8KKworLyoqCisqIFxmbiBpbnQgRFJYSl9EQVBfQXRvbWljUmVhZFJlZzE2KCkKKyogXGJyaWVmIEF0b21pYyByZWFkIG9mIDE2IGJpdHMgd29yZHMKKyovCitzdGF0aWMKK2ludCBkcnhqX2RhcF9zY3VfYXRvbWljX3JlYWRfcmVnMTYoc3RydWN0IGkyY19kZXZpY2VfYWRkciAqZGV2X2FkZHIsCisJCQkJCSB1MzIgYWRkciwKKwkJCQkJIHUxNiAqZGF0YSwgdTMyIGZsYWdzKQoreworCXU4IGJ1ZlsyXTsKKwlpbnQgcmMgPSAtRUlPOworCXUxNiB3b3JkID0gMDsKKworCWlmICghZGF0YSkKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwlyYyA9IGRyeGpfZGFwX3NjdV9hdG9taWNfcmVhZF93cml0ZV9ibG9jayhkZXZfYWRkciwgYWRkciwgMiwgYnVmLCB0cnVlKTsKKwlpZiAocmMgPCAwKQorCQlyZXR1cm4gcmM7CisKKwl3b3JkID0gKHUxNikgKGJ1ZlswXSArIChidWZbMV0gPDwgOCkpOworCisJKmRhdGEgPSB3b3JkOworCisJcmV0dXJuIHJjOworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyoqCisqIFxmbiBpbnQgZHJ4al9kYXBfc2N1X2F0b21pY193cml0ZV9yZWcxNigpCisqIFxicmllZiBBdG9taWMgcmVhZCBvZiAxNiBiaXRzIHdvcmRzCisqLworc3RhdGljCitpbnQgZHJ4al9kYXBfc2N1X2F0b21pY193cml0ZV9yZWcxNihzdHJ1Y3QgaTJjX2RldmljZV9hZGRyICpkZXZfYWRkciwKKwkJCQkJICB1MzIgYWRkciwKKwkJCQkJICB1MTYgZGF0YSwgdTMyIGZsYWdzKQoreworCXU4IGJ1ZlsyXTsKKwlpbnQgcmMgPSAtRUlPOworCisJYnVmWzBdID0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hcF93cml0ZV9yZWcxNihkZXZfYWRkciwgSVFNX0FGX1NUQVJUX0xPQ0tfX0EsIDEsIDApOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisKKwkvKiBXYWl0IGF0IGxlYXN0IDMqMTI4KigxL3N5c2NsaykgPDw8IDEgbWlsbGlzZWMgKi8KKwltc2xlZXAoMSk7CisKKwkqY291bnQgPSAwOworCXJjID0gZHJ4al9kYXBfcmVhZF9yZWcxNihkZXZfYWRkciwgSVFNX0FGX1BIQVNFMF9fQSwgJmRhdGEsIDApOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisJaWYgKGRhdGEgPT0gMTI3KQorCQkqY291bnQgPSAqY291bnQgKyAxOworCXJjID0gZHJ4al9kYXBfcmVhZF9yZWcxNihkZXZfYWRkciwgSVFNX0FGX1BIQVNFMV9fQSwgJmRhdGEsIDApOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisJaWYgKGRhdGEgPT0gMTI3KQorCQkqY291bnQgPSAqY291bnQgKyAxOworCXJjID0gZHJ4al9kYXBfcmVhZF9yZWcxNihkZXZfYWRkciwgSVFNX0FGX1BIQVNFMl9fQSwgJmRhdGEsIDApOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisJaWYgKGRhdGEgPT0gMTI3KQorCQkqY291bnQgPSAqY291bnQgKyAxOworCisJcmV0dXJuIDA7Cityd19lcnJvcjoKKwlyZXR1cm4gLUVJTzsKK30KKworLyoqCisqIFxicmllZiBTeW5jaHJvbml6ZSBhbmFsb2cgYW5kIGRpZ2l0YWwgY2xvY2sgZG9tYWlucworKi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TkVHREFUQV9fTTsKKwkJcmMgPSBkcnhqX2RhcF93cml0ZV9yZWcxNihkZXZfYWRkciwgSVFNX0FGX0NMS05FR19fQSwgY2xrX25lZywgMCk7CisJCWlmIChyYyAhPSAwKSB7CisJCQlwcl9lcnIoImVycm9yICVkXG4iLCByYyk7CisJCQlnb3RvIHJ3X2Vycm9yOworCQl9CisKKwkJcmMgPSBhZGNfc3luY19tZWFzdXJlbWVudChkZW1vZCwgJmNvdW50KTsKKwkJaWYgKHJjICE9IDApIHsKKwkJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJCWdvdG8gcndfZXJyb3I7CisJCX0KKwl9CisKKwkvKiBUT0RPOiBpbXBsZW1lbnQgZmFsbGJhY2sgc2NlbmFyaW9zICovCisJaWYgKGNvdW50IDwgMikKKwkJcmV0dXJuIC1FSU87CisKKwlyZXR1cm4gMDsKK3J3X2Vycm9yOgorCXJldHVybiAtRUlPOworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSAgICAgICAgICAgICAgICAgICAgICBFTkQgQVVYSUxJQVJZIEZVTkNUSU9OUyAgICAgICAgICAgICAgICAgICAgICAgICAgID09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSAgICAgICAgICAgICAgICA4VlNCICYgUUFNIENPTU1PTiBEQVRBUEFUSCBGVU5DVElPTlMgICAgICAgICAgICAgICAgICAgID09Ki8KKy8qPT09PT09PT09PT09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GF0YSwgMCk7CisJaWYgKHJjICE9IDApIHsKKwkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQlnb3RvIHJ3X2Vycm9yOworCX0KKwlpZiAoZXh0X2F0dHItPnJlc2V0X3BrdF9lcnJfYWNjKSB7CisJCWxhc3RfcGt0X2VyciA9IGRhdGE7CisJCXBrdF9lcnIgPSAwOworCQlleHRfYXR0ci0+cmVzZXRfcGt0X2Vycl9hY2MgPSBmYWxzZTsKKwl9CisKKwlpZiAoZGF0YSA8IGxhc3RfcGt0X2VycikgeworCQlwa3RfZXJyICs9IDB4ZmZmZiAtIGxhc3RfcGt0X2VycjsKKwkJcGt0X2VyciArPSBkYXRhOworCX0gZWxzZSB7CisJCXBrdF9lcnIgKz0gKGRhdGEgLSBsYXN0X3BrdF9lcnIpOworCX0KKwkqcGFja2V0X2VyciA9IHBrdF9lcnI7CisJbGFzdF9wa3RfZXJyID0gZGF0YTsKKworCXJldHVybiAwOworcndfZXJyb3I6CisJcmV0dXJuIC1FSU87Cit9CisjZW5kaWYKKworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGludCBzZXRfYWdjX3JmICgpCisqIFxicmllZiBDb25maWd1cmUgUkYgQUdDCisqIFxwYXJhbSBkZW1vZCBpbnN0YW5jZSBvZiBkZW1vZHVsYXRvci4KKyogXHBhcmFtIGFnY19zZXR0aW5ncyBBR0MgY29uZmlndXJhdGlvbiBzdHJ1Y3R1cmUKKyogXHJldHVybiBpbnQuCisqLworc3RhdGljIGludAorc2V0X2FnY19yZihzdHJ1Y3QgZHJ4X2RlbW9kX2luc3RhbmNlICpkZW1vZCwgc3RydWN0IGRyeGpfY2ZnX2FnYyAqYWdjX3NldHRpbmdzLCBib29sIGF0b21pYykKK3sKKwlzdHJ1Y3QgaTJjX2RldmljZV9hZGRyICpkZXZfYWRkciA9IE5VTEw7C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JiAofklRTV9BRl9TVERCWV9TVERCWV9QRF9BMl9BQ1RJVkUpICYgKH5JUU1fQUZfU1REQllfU1REQllfVEFHQ19JRl9BMl9BQ1RJVkUpICYgKH5JUU1fQUZfU1REQllfU1REQllfVEFHQ19SRl9BMl9BQ1RJVkUpKTsKKwllbHNlCisJCWRhdGEgfD0gKElRTV9BRl9TVERCWV9TVERCWV9BRENfQTJfQUNUSVZFIHwgSVFNX0FGX1NUREJZX1NUREJZX0FNUF9BMl9BQ1RJVkUgfCBJUU1fQUZfU1REQllfU1REQllfUERfQTJfQUNUSVZFIHwgSVFNX0FGX1NUREJZX1NUREJZX1RBR0NfSUZfQTJfQUNUSVZFIHwgSVFNX0FGX1NUREJZX1NUREJZX1RBR0NfUkZfQTJfQUNUSVZFKTsKKwlyYyA9IGRyeGpfZGFwX3dyaXRlX3JlZzE2KGRldl9hZGRyLCBJUU1fQUZfU1REQllfX0EsIGRhdGEsIDApOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisKKwlyZXR1cm4gMDsKK3J3X2Vycm9yOgorCXJldHVybiAtRUlPOworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSAgICAgICAgICAgICAgRU5EIDhWU0IgJiBRQU0gQ09NTU9OIERBVEFQQVRIIEZVTkNUSU9OUyAgICAgICAgICAgICAgICAgID09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSAgICAgICAgICAgICAgICAgICAgICAgOFZTQiBEQVRBUEFUSCBGVU5DVElPTlMgICAgICAgICAgICAgICAgICAgICAgICAgID09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGludCBwb3dlcl9kb3duX3ZzYiAoKQorKiBcYnJpZWYgUG93ciBkb3duIFFBTSByZWxhdGVkIGJsb2Nrcy4KKyogXHBhcmFtIGRlbW9kIGluc3RhbmNlIG9mIGRlbW9kdWxhdG9yLgorKiBccGFyYW0gY2hhbm5lbCBwb2ludGVyIHRvIGNoYW5uZWwgZGF0YS4KKyogXHJldHVybiBpbnQuCisqLworc3RhdGljIGludCBwb3dlcl9kb3duX3ZzYihzdHJ1Y3QgZHJ4X2RlbW9kX2luc3RhbmNlICpkZW1vZCwgYm9vbCBwcmltYXJ5KQoreworCXN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKmRldl9hZGRyID0gZGVtb2QtPm15X2kyY19kZXZfYWRkcjsKKwlzdHJ1Y3QgZHJ4anNjdV9jbWQgY21kX3NjdSA9IHsgLyogY29tbWFuZCAgICAgKi8gMCwKKwkJLyogcGFyYW1ldGVyX2xlbiAqLyAwLAorCQkvKiByZXN1bHRfbGVuICAgICovIDAsCisJCS8qICpwYXJhbWV0ZXIgICAqLyBOVUxMLAorCQkvKiAqcmVzdWx0ICAgICAgKi8gTlVMTAorCX07CisJc3RydWN0IGRyeF9jZmdfbXBlZ19vdXRwdXQgY2ZnX21wZWdfb3V0cHV0OworCWludCByYzsKKwl1MTYgY21kX3Jlc3VsdCA9IDA7CisKKwkvKgorCSAgIFNUT1AgZGVtb2R1bGF0b3IKKwkg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8xNlRPOCgweDEwMTApCS8qIEZJUlJDQTFHQUlOOCAqLworCX07CisKKwljb25zdCB1OCB2c2JfZmZlX2xlYWtfZ2Fpbl9yYW0xW10gPSB7CisJCURSWEpfMTZUTzgoMHgxMDEwKSwJLyogRklSUkNBMUdBSU45ICovCisJCURSWEpfMTZUTzgoMHgwODA4KSwJLyogRklSUkNBMUdBSU4xMCAqLworCQlEUlhKXzE2VE84KDB4MDgwOCksCS8qIEZJUlJDQTFHQUlOMTEgKi8KKwkJRFJYSl8xNlRPOCgweDA4MDgpLAkvKiBGSVJSQ0ExR0FJTjEyICovCisJCURSWEpfMTZUTzgoMHgwODA4KSwJLyogRklSUkNBMkdBSU4xICovCisJCURSWEpfMTZUTzgoMHgwODA4KSwJLyogRklSUkNBMkdBSU4yICovCisJCURSWEpfMTZUTzgoMHgwODA4KSwJLyogRklSUkNBMkdBSU4zICovCisJCURSWEpfMTZUTzgoMHgxMDEwKSwJLyogRklSUkNBMkdBSU40ICovCisJCURSWEpfMTZUTzgoMHgxMDEwKSwJLyogRklSUkNBMkdBSU41ICovCisJCURSWEpfMTZUTzgoMHgxMDEwKSwJLyogRklSUkNBMkdBSU42ICovCisJCURSWEpfMTZUTzgoMHgxMDEwKSwJLyogRklSUkNBMkdBSU43ICovCisJCURSWEpfMTZUTzgoMHgxMDEwKSwJLyogRklSUkNBMkdBSU44ICovCisJCURSWEpfMTZUTzgoMHgxMDEwKSwJLyogRklSUkNBMkdBSU45ICovCisJCURSWEpfMTZUTzgoMHgwODA4KSwJLyogRklSUkNBMkdBSU4xMCAqLworCQlEUlhKXzE2VE84KDB4MDgwOCksCS8qIEZJUlJDQTJHQUlOMTEgKi8KKwkJRFJYSl8xNlRPOCgweDA4MDgpLAkvKiBGSVJSQ0EyR0FJTjEyICovCisJCURSWEpfMTZUTzgoMHgwMzAzKSwJLyogRklSRERNMUdBSU4xICovCisJCURSWEpfMTZUTzgoMHgwMzAzKSwJLyogRklSRERNMUdBSU4yICovCisJCURSWEpfMTZUTzgoMHgwMzAzKSwJLyogRklSRERNMUdBSU4zICovCisJCURSWEpfMTZUTzgoMHgwNjA2KSwJLyogRklSRERNMUdBSU40ICovCisJCURSWEpfMTZUTzgoMHgwNjA2KSwJLyogRklSRERNMUdBSU41ICovCisJCURSWEpfMTZUTzgoMHgwNjA2KSwJLyogRklSRERNMUdBSU42ICovCisJCURSWEpfMTZUTzgoMHgwNjA2KSwJLyogRklSRERNMUdBSU43ICovCisJCURSWEpfMTZUTzgoMHgwNjA2KSwJLyogRklSRERNMUdBSU44ICovCisJCURSWEpfMTZUTzgoMHgwNjA2KSwJLyogRklSRERNMUdBSU45ICovCisJCURSWEpfMTZUTzgoMHgwMzAzKSwJLyogRklSRERNMUdBSU4xMCAqLworCQlEUlhKXzE2VE84KDB4MDMwMyksCS8qIEZJUkRETTFHQUlOMTEgKi8KKwkJRFJYSl8xNlRPOCgweDAzMDMpLAkvKiBGSVJERE0xR0FJTjEyICovCisJCURSWEpfMTZUTzgoMHgwMzAzKSwJLyogRklSRERNMkdBSU4xICovCisJCURSWEpfMTZUTzgoMHgwMzAzKSwJLyogRklSRERNMkdBSU4yICovCisJCURSWEpfMTZUTzgoMHgwMzAzKSwJLyogRklSRERNMkdBSU4zICovCisJCURSWEpfMTZUTzgoMHgwNTA1KSwJLyogRklSRERNMkdBSU40ICovCisJCURSWEpfMTZUTzgoMHgwNTA1KSwJLyogRklSRERNMkdBSU41ICovCisJCURSWEpfMTZUTzgoMHgwNTA1KSwJLyogRklSRERNMkdBSU42ICovCisJCURSWEpfMTZUTzgoMHgwNTA1KSwJLyogRklSRERNMkdBSU43ICovCisJCURSWEpfMTZUTzgoMHgwNTA1KSwJLyogRklSRERNMkdBSU44ICovCisJCURSWEpfMTZUTzgoMHgwNTA1KSwJLyogRklSRERNMkdBSU45ICovCisJCURSWEpfMTZUTzgoMHgwMzAzKSwJLyogRklSRERNMkdBSU4xMCAqLworCQlEUlhKXzE2VE84KDB4MDMwMyksCS8qIEZJUkR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QpLAkvKiByZTEgICovCisJCURSWEpfMTZUTzgoMSksCS8qIHJlMiAgKi8KKwkJRFJYSl8xNlRPOCgtNCksCS8qIHJlMyAgKi8KKwkJRFJYSl8xNlRPOCgxKSwJLyogcmU0ICAqLworCQlEUlhKXzE2VE84KDQpLAkvKiByZTUgICovCisJCURSWEpfMTZUTzgoLTMpLAkvKiByZTYgICovCisJCURSWEpfMTZUTzgoLTMpLAkvKiByZTcgICovCisJCURSWEpfMTZUTzgoNiksCS8qIHJlOCAgKi8KKwkJRFJYSl8xNlRPOCgxKSwJLyogcmU5ICAqLworCQlEUlhKXzE2VE84KC05KSwJLyogcmUxMCAqLworCQlEUlhKXzE2VE84KDMpLAkvKiByZTExICovCisJCURSWEpfMTZUTzgoMTIpLAkvKiByZTEyICovCisJCURSWEpfMTZUTzgoLTkpLAkvKiByZTEzICovCisJCURSWEpfMTZUTzgoLTE1KSwJLyogcmUxNCAqLworCQlEUlhKXzE2VE84KDE3KSwJLyogcmUxNSAqLworCQlEUlhKXzE2VE84KDE5KSwJLyogcmUxNiAqLworCQlEUlhKXzE2VE84KC0yOSksCS8qIHJlMTcgKi8KKwkJRFJYSl8xNlRPOCgtMjIpLAkvKiByZTE4ICovCisJCURSWEpfMTZUTzgoNDUpLAkvKiByZTE5ICovCisJCURSWEpfMTZUTzgoMjUpLAkvKiByZTIwICovCisJCURSWEpfMTZUTzgoLTcwKSwJLyogcmUyMSAqLworCQlEUlhKXzE2VE84KC0yOCksCS8qIHJlMjIgKi8KKwkJRFJYSl8xNlRPOCgxMTEpLAkvKiByZTIzICovCisJCURSWEpfMTZUTzgoMzApLAkvKiByZTI0ICovCisJCURSWEpfMTZUTzgoLTIwMSksCS8qIHJlMjUgKi8KKwkJRFJYSl8xNlRPOCgtMzEpLAkvKiByZTI2ICovCisJCURSWEpfMTZUTzgoNjI5KQkvKiByZTI3ICovCisJfTsKKworCWRldl9hZGRyID0gZGVtb2QtPm15X2kyY19kZXZfYWRkcjsKKwljb21tb25f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0QgKiBTWU1CT0xTX1BFUl9TRUdNRU5UOworCisJcmV0dXJuIDA7Cit9CisKKy8qKgorKiBcZm4gc3RhdGljIGludCBnZXRfdnNibWVyKHN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKmRldl9hZGRyLCB1MTYgKm1lcikKKyogXGJyaWVmIEdldCB0aGUgdmFsdWVzIG9mIE1FUgorKiBccmV0dXJuIEVycm9yIGNvZGUKKyovCitzdGF0aWMgaW50IGdldF92c2JtZXIoc3RydWN0IGkyY19kZXZpY2VfYWRkciAqZGV2X2FkZHIsIHUxNiAqbWVyKQoreworCWludCByYzsKKwl1MTYgZGF0YV9oaSA9IDA7CisKKwlyYyA9IGRyeGpfZGFwX3JlYWRfcmVnMTYoZGV2X2FkZHIsIFZTQl9UT1BfRVJSX0VORVJHWV9IX19BLCAmZGF0YV9oaSwgMCk7CisJaWYgKHJjICE9IDApIHsKKwkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQlnb3RvIHJ3X2Vycm9yOworCX0KKwkqbWVyID0KKwkgICAgKHUxNikgKGxvZzFfdGltZXMxMDAoMjE1MDQpIC0gbG9nMV90aW1lczEwMCgoZGF0YV9oaSA8PCA2KSAvIDUyKSk7CisKKwlyZXR1cm4gMDsKK3J3X2Vycm9yOgorCXJldHVybiAtRUlPOworfQorCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09ICAgICAgICAgICAgICAgICAgICAgRU5EIDhWU0IgREFUQVBBVEggRlVOQ1RJT05TICAgICAgICAgICAgICAgICAgICAgICAgPT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09ICAgICAgICAgICAgICAgICAgICAgICBRQU0gREFUQVBBVEggRlVOQ1RJT05TICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcZm4gaW50IHBvd2VyX2Rvd25fcWFtICgpCisqIFxicmllZiBQb3dyIGRvd24gUUFNIHJlbGF0ZWQgYmxvY2tzLgorKiBccGFyYW0gZGVtb2QgaW5zdGFuY2Ugb2YgZGVtb2R1bGF0b3IuCisqIFxwYXJhbSBjaGFubmVsIHBvaW50ZXIgdG8gY2hhbm5lbCBkYXRhLgorKiBccmV0dXJuIGludC4KKyovCitzdGF0aWMgaW50IHBvd2VyX2Rvd25fcWFtKHN0cnVjdCBkcnhfZGVtb2RfaW5zdGFuY2UgKmRlbW9kLCBib29sIHByaW1hcnkpCit7CisJc3RydWN0IGRyeGpzY3VfY21kIGNtZF9zY3UgPSB7IC8qIGNvbW1hbmQgICAgICAqLyAwLAorCQkvKiBwYXJhbWV0ZXJfbGVuICovIDAsCisJCS8qIHJlc3VsdF9sZW4gICAgKi8gMCwKKwkJLyogKnBhcmFtZXRlciAgICovIE5VTEwsCisJCS8qICpyZXN1bHQgICAgICAqLyBOVUxMCisJfTsKKwlpbnQgcmM7CisJc3RydWN0IGkyY19kZXZpY2VfYWRkciAqZGV2X2FkZHIgPSBkZW1vZC0+bXlfaTJjX2Rldl9hZGRyOworCXN0cnVjdCBkcnhfY2ZnX21wZWdfb3V0cHV0IGNmZ19tcGVnX291dHB1dDsKKwlz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iAocmMgIT0gMCkgeworCQkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQkJZ290byByd19lcnJvcjsKKwkJfQorCQlyYyA9IGRyeGpfZGFwX3dyaXRlX3JlZzE2KGRldl9hZGRyLCBJUU1fQ0ZfQ09NTV9FWEVDX19BLCBJUU1fQ0ZfQ09NTV9FWEVDX1NUT1AsIDApOworCQlpZiAocmMgIT0gMCkgeworCQkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQkJZ290byByd19lcnJvcjsKKwkJfQorCX0KKworCW1lbWNweSgmY2ZnX21wZWdfb3V0cHV0LCAmY29tbW9uX2F0dHItPm1wZWdfY2ZnLCBzaXplb2YoY2ZnX21wZWdfb3V0cHV0KSk7CisJY2ZnX21wZWdfb3V0cHV0LmVuYWJsZV9tcGVnX291dHB1dCA9IGZhbHNlOworCisJcmMgPSBjdHJsX3NldF9jZmdfbXBlZ19vdXRwdXQoZGVtb2QsICZjZmdfbXBlZ19vdXRwdXQpOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisKKwlyZXR1cm4gMDsKK3J3X2Vycm9yOgorCXJldHVybiAtRUlPOworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGludCBzZXRfcWFtX21lYXN1cmVtZW50ICgpCisqIFxicmllZiBTZXR1cCBvZiB0aGUgUUFNIE1lYXN1cmVtbnQgaW50ZXJ2YWxzIGZvciBzaWduYWwgcXVhbGl0eQorKiBccGFyYW0gZGVtb2QgaW5zdGFuY2Ugb2YgZGVtb2QuCisqIFxwYXJhbSBjb25zdGVsbGF0aW9uIGN1cnJlbnQgY29uc3RlbGxhdGlvbi4KKyogXHJldHVybiBpbnQuCisqCisqICBOT1RFOgorKiAgVGFrZSBpbnRvIGFjY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orCisJcmV0dXJuIDA7Cityd19lcnJvcjoKKwlyZXR1cm4gLUVJTzsKK30KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworLyoqCisqIFxmbiBpbnQgc2V0X3FhbTMyICgpCisqIFxicmllZiBRQU0zMiBzcGVjaWZpYyBzZXR1cAorKiBccGFyYW0gZGVtb2QgaW5zdGFuY2Ugb2YgZGVtb2QuCisqIFxyZXR1cm4gaW50LgorKi8KK3N0YXRpYyBpbnQgc2V0X3FhbTMyKHN0cnVjdCBkcnhfZGVtb2RfaW5zdGFuY2UgKmRlbW9kKQoreworCXN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKmRldl9hZGRyID0gZGVtb2QtPm15X2kyY19kZXZfYWRkcjsKKwlpbnQgcmM7CisJY29uc3QgdTggcWFtX2RxX3F1YWxfZnVuW10gPSB7CisJCURSWEpfMTZUTzgoMyksCS8qIGZ1bjAgICovCisJCURSWEpfMTZUTzgoMyksCS8qIGZ1bjEgICovCisJCURSWEpfMTZUTzgoMyksCS8qIGZ1bjIgICovCisJCURSWEpfMTZUTzgoMyksCS8qIGZ1bjMgICovCisJCURSWEpfMTZUTzgoNCksCS8qIGZ1bjQgICovCisJCURSWEpfMTZUTzgoNCksCS8qIGZ1bjUgICovCisJfTsKKwljb25zdCB1OCBxYW1fZXFfY21hX3JhZFtdID0geworCQlEUlhKXzE2VE84KDY3MDcpLAkvKiBSQUQwICAqLworCQlEUlhKXzE2VE84KDY3MDcpLAkvKiBSQUQxICAqLworCQlEUlhKXzE2VE84KDY3MDcpLAkvKiBSQUQyICAqLworCQlEUlhKXzE2VE84KDY3MDcpLAkvKiBSQUQzICAqLworCQlEUlhKXzE2VE84KDY3MDcpLAkvKiBSQUQ0ICAqLworCQlEUlhKXzE2VE84KDY3MDcpLAkvKiBSQUQ1ICAqLworCX07CisKKwlyYyA9IGRyeGRhcF9mYXNpX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JvcjsKKwl9CisKKwlyZXR1cm4gMDsKK3J3X2Vycm9yOgorCXJldHVybiAtRUlPOworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGludCBzZXRfcWFtMTI4ICgpCisqIFxicmllZiBRQU0xMjggc3BlY2lmaWMgc2V0dXAKKyogXHBhcmFtIGRlbW9kOiBpbnN0YW5jZSBvZiBkZW1vZC4KKyogXHJldHVybiBpbnQuCisqLworc3RhdGljIGludCBzZXRfcWFtMTI4KHN0cnVjdCBkcnhfZGVtb2RfaW5zdGFuY2UgKmRlbW9kKQoreworCXN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKmRldl9hZGRyID0gZGVtb2QtPm15X2kyY19kZXZfYWRkcjsKKwlpbnQgcmM7CisJY29uc3QgdTggcWFtX2RxX3F1YWxfZnVuW10gPSB7CisJCURSWEpfMTZUTzgoNiksCS8qIGZ1bjAgICovCisJCURSWEpfMTZUTzgoNiksCS8qIGZ1bjEgICovCisJCURSWEpfMTZUTzgoNiksCS8qIGZ1bjIgICovCisJCURSWEpfMTZUTzgoNiksCS8qIGZ1bjMgICovCisJCURSWEpfMTZUTzgoOSksCS8qIGZ1bjQgICovCisJCURSWEpfMTZUTzgoOSksCS8qIGZ1bjUgICovCisJfTsKKwljb25zdCB1OCBxYW1fZXFfY21hX3JhZFtdID0geworCQlEUlhKXzE2VE84KDYxNjQpLAkvKiBSQUQwICAqLworCQlEUlhKXzE2VE84KDY1OTgpLAkvKiBSQUQxICAqLworCQlEUlhKXzE2VE84KDYzOTQpLAkvKiBSQUQyICAqLworCQlEUlhKXzE2VE84KDY0MDkpLAkvKiBSQUQzICAqLworCQlEUlhKXzE2VE84KDY2NTYpLAkvKiBSQUQ0ICAqLworCQlEUlhKXzE2VE84KDcyMzgpLAkvKiBSQUQ1ICAqLworCX07CisKKwlyYyA9IGRyeGRhcF9mY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ZUTzgoLTQ2KSwJLyogcmUyNiAqLworCQlEUlhKXzE2VE84KDYxNCkJLyogcmUyNyAqLworCX07CisJY29uc3QgdTggcWFtX2IyNTZfdGFwc1tdID0geworCQlEUlhKXzE2VE84KC0yKSwJLyogcmUwICAqLworCQlEUlhKXzE2VE84KDQpLAkvKiByZTEgICovCisJCURSWEpfMTZUTzgoMSksCS8qIHJlMiAgKi8KKwkJRFJYSl8xNlRPOCgtNCksCS8qIHJlMyAgKi8KKwkJRFJYSl8xNlRPOCgwKSwJLyogcmU0ICAqLworCQlEUlhKXzE2VE84KDQpLAkvKiByZTUgICovCisJCURSWEpfMTZUTzgoLTIpLAkvKiByZTYgICovCisJCURSWEpfMTZUTzgoLTQpLAkvKiByZTcgICovCisJCURSWEpfMTZUTzgoNSksCS8qIHJlOCAgKi8KKwkJRFJYSl8xNlRPOCgyKSwJLyogcmU5ICAqLworCQlEUlhKXzE2VE84KC04KSwJLyogcmUxMCAqLworCQlEUlhKXzE2VE84KDIpLAkvKiByZTExICovCisJCURSWEpfMTZUTzgoMTEpLAkvKiByZTEyICovCisJCURSWEpfMTZUTzgoLTgpLAkvKiByZTEzICovCisJCURSWEpfMTZUTzgoLTE1KSwJLyogcmUxNCAqLworCQlEUlhKXzE2VE84KDE2KSwJLyogcmUxNSAqLworCQlEUlhKXzE2VE84KDE5KSwJLyogcmUxNiAqLworCQlEUlhKXzE2VE84KC0yNyksCS8qIHJlMTcgKi8KKwkJRFJYSl8xNlRPOCgtMjIpLAkvKiByZTE4ICovCisJCURSWEpfMTZUTzgoNDQpLAkvKiByZTE5ICovCisJCURSWEpfMTZUTzgoMjYpLAkvKiByZTIwICovCisJCURSWEpfMTZUTzgoLTY5KSwJLyogcmUyMSAqLworCQlEUlhKXzE2VE84KC0yOCksCS8qIHJlMjIgKi8KKwkJRFJYSl8xNlRPOCgxMTApLAkvKiByZTIzICovCisJCURSWEpfMTZUTzgoMzEpLAkvKiByZTI0ICovCisJCURSWEpfMTZUTzgoLTI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SAgICAgICAmbG9ja19zdGF0dXMpOworCQkJaWYgKHJjICE9IDApIHsKKwkJCQlwcl9lcnIoImVycm9yICVkXG4iLCByYyk7CisJCQkJZ290byByd19lcnJvcjsKKwkJCX0KKwkJCWNoYW5uZWwtPmNvbnN0ZWxsYXRpb24gPSBEUlhfQ09OU1RFTExBVElPTl9BVVRPOworCQl9IGVsc2UgeworCQkJcmV0dXJuIC1FSU5WQUw7CisJCX0KKwkJYnJlYWs7CisJZGVmYXVsdDoKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJcmV0dXJuIDA7Cityd19lcnJvcjoKKwkvKiByZXN0b3JlIHN0YXJ0aW5nIHZhbHVlICovCisJaWYgKGF1dG9fZmxhZykKKwkJY2hhbm5lbC0+Y29uc3RlbGxhdGlvbiA9IERSWF9DT05TVEVMTEFUSU9OX0FVVE87CisJcmV0dXJuIC1FSU87Cit9CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcZm4gc3RhdGljIHNob3J0IGdldF9xYW1yc19lcnJfY291bnQoc3RydWN0IGkyY19kZXZpY2VfYWRkciAqZGV2X2FkZHIpCisqIFxicmllZiBHZXQgUlMgZXJyb3IgY291bnQgaW4gUUFNIG1vZGUgKHVzZWQgZm9yIHBvc3QgUlMgQkVSIGNhbGN1bGF0aW9uKQorKiBccmV0dXJuIEVycm9yIGNvZGUKKyoKKyogcHJlY29uZGl0aW9uOiBtZWFzdXJlbWVudCBwZXJpb2QgJiBtZWFzdXJlbWVudCBwcmVzY2FsZSBtdXN0IGJlIHNldAorKgorKi8KK3N0YXRpYyBpbnQKK2dldF9xYW1yc19lcnJfY291bnQoc3RydWN0IGkyY19kZXZpY2VfYWRkciAqZGV2X2FkZHIsCisJCSAgICBzdHJ1Y3QgZHJ4anJzX2Vycm9ycyAqcnNfZXJyb3JzKQoreworCWludCByYzsKKwl1MTYgb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19xdWFsaXR5LT5wYWNrZXRfZXJyb3IpOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisjZW5kaWYKKworCXJldHVybiAwOworcndfZXJyb3I6CisJcC0+cHJlX2JpdF9jb3VudC5zdGF0WzBdLnNjYWxlID0gRkVfU0NBTEVfTk9UX0FWQUlMQUJMRTsKKwlwLT5wb3N0X2JpdF9jb3VudC5zdGF0WzBdLnNjYWxlID0gRkVfU0NBTEVfTk9UX0FWQUlMQUJMRTsKKwlwLT5wcmVfYml0X2Vycm9yLnN0YXRbMF0uc2NhbGUgPSBGRV9TQ0FMRV9OT1RfQVZBSUxBQkxFOworCXAtPnBvc3RfYml0X2Vycm9yLnN0YXRbMF0uc2NhbGUgPSBGRV9TQ0FMRV9OT1RfQVZBSUxBQkxFOworCXAtPmJsb2NrX2Vycm9yLnN0YXRbMF0uc2NhbGUgPSBGRV9TQ0FMRV9OT1RfQVZBSUxBQkxFOworCXAtPmNuci5zdGF0WzBdLnNjYWxlID0gRkVfU0NBTEVfTk9UX0FWQUlMQUJMRTsKKworCXJldHVybiAtRUlPOworfQorCisjZW5kaWYgLyogI2lmbmRlZiBEUlhKX1ZTQl9PTkxZICovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09ICAgICAgICAgICAgICAgICAgICAgRU5EIFFBTSBEQVRBUEFUSCBGVU5DVElPTlMgICAgICAgICAgICAgICAgICAgICAgICAgPT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09ICAgICAgICAgICAgICAgICAgICAgICBBVFYgREFUQVBBVEggRlVOQ1RJT05TICAgICAgICAgICAgICAgICAgICAgICAgICAgPT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qCisgICBJbXBsZW1lbnRhdGlvbiBub3Rlcy4KKworICAgTlRTQy9GTSBBR0NzCisKKyAgICAgIEZvdXIgQUdDcyBhcmUgdXNlZCBmb3IgTlRTQzoKKyAgICAgICgxKSBSRiAodXNlZCB0byBhdHRlbnVhdGUgdGhlIGlucHV0IHNpZ25hbCBpbiBjYXNlIG9mIHRvIG11Y2ggcG93ZXIpCisgICAgICAoMikgSUYgKHVzZWQgdG8gYXR0ZW51YXRlIHRoZSBpbnB1dCBzaWduYWwgaW4gY2FzZSBvZiB0byBtdWNoIHBvd2VyKQorICAgICAgKDMpIFZpZGVvIEFHQyAodXNlZCB0byBhbXBsaWZ5IHRoZSBvdXRwdXQgc2lnbmFsIGluIGNhc2UgaW5wdXQgdG8gbG93KQorICAgICAgKDQpIFNJRiBBR0MgKHVzZWQgdG8gYW1wbGlmeSB0aGUgb3V0cHV0IHNpZ25hbCBpbiBjYXNlIGlucHV0IHRvIGxvdykKKworICAgICAgVmlkZW8gQUdDIGlzIGNvdXBsZWQgdG8gUkYgYW5kIElGLiBTSUYgQUdDIGlzIG5vdCBjb3VwbGVkLiBJdCBpcyBhc3N1bWVkCisgICAgICB0aGF0IHRoZSBjb3VwbGluZyBiZXR3ZWVuIFZpZGVvIEFHQyBhbmQgdGhlIFJGIGFuZCBJRiBBR0NzIGFsc28gd29ya3Mga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uZmlndXJlIE5TVV9BT1ggKi8KKwlyYyA9IGRyeGpfZGFwX3JlYWRfcmVnMTYoZGV2X2FkZHIsIE9SWF9OU1VfQU9YX1NUREJZX1dfX0EsICZkYXRhLCAwKTsKKwlpZiAocmMgIT0gMCkgeworCQlwcl9lcnIoImVycm9yICVkXG4iLCByYyk7CisJCWdvdG8gcndfZXJyb3I7CisJfQorCWlmICghYWN0aXZlKQorCQlkYXRhICY9ICgofk9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllBRENfQTJfT04pICYgKH5PUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQU1QX0EyX09OKSAmICh+T1JYX05TVV9BT1hfU1REQllfV19TVERCWUJJQVNfQTJfT04pICYgKH5PUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUExMX0EyX09OKSAmICh+T1JYX05TVV9BT1hfU1REQllfV19TVERCWVBEX0EyX09OKSAmICh+T1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfSUZfQTJfT04pICYgKH5PUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZVEFHQ19SRl9BMl9PTikgJiAofk9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllGTFRfQTJfT04pKTsKKwllbHNlCisJCWRhdGEgfD0gKE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllBRENfQTJfT04gfCBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQU1QX0EyX09OIHwgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUJJQVNfQTJfT04gfCBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUExMX0EyX09OIHwgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVBEX0EyX09OIHwgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfSUZfQTJfT04gfCBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZVEFHQ19SRl9BMl9PTiB8IE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllGTFRfQTJfT04pOworCXJjID0gZHJ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RF9PT0IKKwkgICAgfCBTQ1VfUkFNX0NPTU1BTkRfQ01EX0RFTU9EX1NUQVJUOworCXNjdV9jbWQucGFyYW1ldGVyX2xlbiA9IDA7CisJc2N1X2NtZC5yZXN1bHRfbGVuID0gMTsKKwlzY3VfY21kLnJlc3VsdCA9IGNtZF9yZXN1bHQ7CisJcmMgPSBzY3VfY29tbWFuZChkZXZfYWRkciwgJnNjdV9jbWQpOworCWlmIChyYyAhPSAwKSB7CisJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJZ290byByd19lcnJvcjsKKwl9CisKKwlyYyA9IHNldF9vcnhfbnN1X2FveChkZW1vZCwgdHJ1ZSk7CisJaWYgKHJjICE9IDApIHsKKwkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQlnb3RvIHJ3X2Vycm9yOworCX0KKwlyYyA9IGRyeGpfZGFwX3dyaXRlX3JlZzE2KGRldl9hZGRyLCBPUlhfTlNVX0FPWF9TVEhSX1dfX0EsIGV4dF9hdHRyLT5vb2JfcHJlX3NhdywgMCk7CisJaWYgKHJjICE9IDApIHsKKwkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQlnb3RvIHJ3X2Vycm9yOworCX0KKworCWV4dF9hdHRyLT5vb2JfcG93ZXJfb24gPSB0cnVlOworCisJcmV0dXJuIDA7Cityd19lcnJvcjoKKwlyZXR1cm4gLUVJTzsKK30KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT0gICAgICAgICAgICAgICAgICAgICBFTkQgT09CIERBVEFQQVRIIEZVTkNUSU9OUyAgICAgICAgICAgICAgICAgICAgICAgICA9PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgID09PT09IE1DIGNvbW1hbmQgcmVsYXRlZCBmdW5jdGlvbnMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgPT09PT0gY3RybF9zZXRfY2hhbm5lbCgpID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qKgorKiBcZm4gaW50IGN0cmxfc2V0X2NoYW5uZWwoKQorKiBcYnJpZWYgU2VsZWN0IGEgbmV3IHRyYW5zbWlzc2lvbiBjaGFubmVsLgorKiBccGFyYW0gZGVtb2QgaW5zdGFuY2Ugb2YgZGVtb2QuCisqIFxwYXJhbSBjaGFubmVsIFBvaW50ZXIgdG8gY2hhbm5lbCBkYXRhLgorKiBccmV0dXJuIGludC4KKyoKKyogSW4gY2FzZSB0aGUgdHVuZXIgbW9kdWxlIGlzIG5vdCB1c2VkIGFuZCBpbiBjYXNlIG9mIE5UU0MvRk0gdGhlIHBvZ3JhbW1lcgorKiBtdXN0IHR1bmUgdGhlIHR1bmVyIHRvIHRoZSBjZW50cmUgZnJlcXVlbmN5IG9mIHRoZSBOVFNDL0ZNIGNoYW5uZWwuCisqCisqLworc3RhdGljIGludAorY3RybF9zZXRfY2hhbm5lbChzdHJ1Y3QgZHJ4X2RlbW9kX2luc3RhbmNlICpkZW1vZCwgc3RydWN0IGRyeF9jaGFubmVsICpjaGFubmVsKQorewor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zsKK30KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICA9PT09PSBTaWdRdWFsaXR5KCkgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGludCBjdHJsX3NpZ19xdWFsaXR5KCkKKyogXGJyaWVmIFJldHJlaXZlIHNpZ25hbCBxdWFsaXR5IGZvcm0gZGV2aWNlLgorKiBccGFyYW0gZGV2bW9kIFBvaW50ZXIgdG8gZGVtb2R1bGF0b3IgaW5zdGFuY2UuCisqIFxwYXJhbSBzaWdfcXVhbGl0eSBQb2ludGVyIHRvIHNpZ25hbCBxdWFsaXR5IGRhdGEuCisqIFxyZXR1cm4gaW50LgorKiBccmV0dmFsIDAgc2lnX3F1YWxpdHkgY29udGFpbnMgdmFsaWQgZGF0YS4KKyogXHJldHZhbCAtRUlOVkFMIHNpZ19xdWFsaXR5IGlzIE5VTEwuCisqIFxyZXR2YWwgLUVJTyBFcnJvbmVvdXMgZGF0YSwgc2lnX3F1YWxpdHkgY29udGFpbnMgaW52YWxpZCBkYXRhLgorCisqLworc3RhdGljIGludAorY3RybF9zaWdfcXVhbGl0eShzdHJ1Y3QgZHJ4X2RlbW9kX2luc3RhbmNlICpkZW1vZCwKKwkJIGVudW0gZHJ4X2xvY2tfc3RhdHVzIGxvY2tfc3RhdHVzKQoreworCXN0cnVjdCBpMmNfZGV2aWNlX2FkZHIgKmRldl9hZGRyID0gZGVtb2QtPm15X2kyY19kZXZfYWRkcjsKKwlzdHJ1Y3QgZHJ4al9kYXRhICpleHRfYXR0ciA9IGRlbW9kLT5teV9leHRfYXR0cjsKKwlzdHJ1Y3QgZHJ4Mzl4eGpfc3RhdGUg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lhfUE9XRVJfVVApKSB7CisJCQkvKiBJbml0aWFsaXplIEhJLCB3YWtldXAga2V5IGVzcGVjaWFsbHkgYmVmb3JlIHB1dCBJQyB0byBzbGVlcCAqLworCQkJcmMgPSBpbml0X2hpKGRlbW9kKTsKKwkJCWlmIChyYyAhPSAwKSB7CisJCQkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQkJCWdvdG8gcndfZXJyb3I7CisJCQl9CisKKwkJCWV4dF9hdHRyLT5oaV9jZmdfY3RybCB8PSBTSU9fSElfUkFfUkFNX1BBUl81X0NGR19TTEVFUF9aWlo7CisJCQlyYyA9IGhpX2NmZ19jb21tYW5kKGRlbW9kKTsKKwkJCWlmIChyYyAhPSAwKSB7CisJCQkJcHJfZXJyKCJlcnJvciAlZFxuIiwgcmMpOworCQkJCWdvdG8gcndfZXJyb3I7CisJCQl9CisJCX0KKwl9CisKKwljb21tb25fYXR0ci0+Y3VycmVudF9wb3dlcl9tb2RlID0gKm1vZGU7CisKKwlyZXR1cm4gMDsKK3J3X2Vycm9yOgorCXJldHVybiByYzsKK30KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT0gQ1RSTCBTZXQvR2V0IENvbmZpZyByZWxhdGVkIGZ1bmN0aW9ucyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKioKKyogXGZuIGludCBjdHJsX3NldF9jZmdfcHJlX3NhdygpCisqIFxicmllZiBTZXQgUHJlLXNhdyByZWZlcmVuY2UuCisqIFxwYXJhbSBkZW1vZCBkZW1vZCBpbnN0YW5jZQorKiBccGFyYW0gdTE2ICoKKyogXHJldHVybiBpbnQuCisqCisqIENoZWNrIGFyZ3VtZW50cworKiBEa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AwKTsKKwkJaWYgKHJjICE9IDApIHsKKwkJCXByX2VycigiZXJyb3IgJWRcbiIsIHJjKTsKKwkJCWdvdG8gcndfZXJyb3I7CisJCX0KKwl9CisKKwkvKiBTdG9yZSBwcmUtc2F3IHNldHRpbmdzICovCisJc3dpdGNoIChwcmVfc2F3LT5zdGFuZGFyZCkgeworCWNhc2UgRFJYX1NUQU5EQVJEXzhWU0I6CisJCWV4dF9hdHRyLT52c2JfcHJlX3Nhd19jZmcgPSAqcHJlX3NhdzsKKwkJYnJlYWs7CisjaWZuZGVmIERSWEpfVlNCX09OTFkKKwljYXNlIERSWF9TVEFOREFSRF9JVFVfQToJLyogZmFsbHRocm91Z2ggKi8KKwljYXNlIERSWF9TVEFOREFSRF9JVFVfQjoJLyogZmFsbHRocm91Z2ggKi8KKwljYXNlIERSWF9TVEFOREFSRF9JVFVfQzoKKwkJZXh0X2F0dHItPnFhbV9wcmVfc2F3X2NmZyA9ICpwcmVfc2F3OworCQlicmVhazsKKyNlbmRpZgorCWRlZmF1bHQ6CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCXJldHVybiAwOworcndfZXJyb3I6CisJcmV0dXJuIC1FSU87Cit9CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qKgorKiBcZm4gaW50IGN0cmxfc2V0X2NmZ19hZmVfZ2FpbigpCisqIFxicmllZiBTZXQgQUZFIEdhaW4uCisqIFxwYXJhbSBkZW1vZCBkZW1vZCBpbnN0YW5jZQorKiBccGFyYW0gdTE2ICoKKyogXHJldHVybiBpbnQuCisqCisqIENoZWNrIGFyZ3VtZW50cworKiBEaXNwYXRjaCBoYW5kbGluZyB0byBzdGFuZGFyZCBzcGVjaWZpYyBmdW5jdGlvbi4KKyoKKyovCitzdGF0aWMgaW50CitjdHJsX3NldF9jZmdfYWZlX2dhaW4oc3RydWN0IGRyeF9kZW1vZF9pbnN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TExPV0VEID09IDApKQorI2Vycm9yICJNdWx0aSBtYXN0ZXIgbW9kZSBhbmQgc2hvcnQgYWRkcmVzc2luZyBvbmx5IGlzIGFuIGlsbGVnYWwgY29tYmluYXRpb24iCisJKjsJCQkvKiBHZW5lcmF0ZSBhIGZhdGFsIGNvbXBpbGVyIGVycm9yIHRvIG1ha2Ugc3VyZSBpdCBzdG9wcyBoZXJlLAorCQkJCSAgIHRoaXMgaXMgbmVjZXNhcnJ5IGJlY2F1c2Ugbm90IGFsbCBjb21waWxlcnMgc3RvcCBhZnRlciBhICNlcnJvci4gKi8KKyNlbmRpZgorCisvKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KK1RZUEVERUZTCistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSBjb2RlIHN1cHBvcnQgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT0gU0NVIGNtZCBpZiAgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworCXN0cnVjdCBkcnhqc2N1X2NtZCB7CisJCXUxNiBjb21tYW5kOworCQkJLyoqPCBDb21tYW5kIG51bWJlciAqLworCQl1MTYgcGFyYW1ldGVyX2xlbjsKKwkJCS8qKjwgRGF0YSBsZW5ndGggaW4gYnl0ZSAqLworCQl1MTYgcmVzdWx0X2xlbjsKKwkJCS8qKjwgcmVzdWx0IGxlbmd0aCBpbiBieXRlICovCisJCXUxNiAqcGFyYW1ldGVyOworCQkJLyoqPCBHZW5lcmFsIHB1cnBvdXMgcGFyYW0gKi8KKwkJdTE2ICpyZXN1bHQ7CisJCQkvKio8IEdlbmVyYWwgcHVycG91cyBwYXJhbSAqL307CisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PSBDVFJMIENGRyByZWxhdGVkIGRhdGEgc3RydWN0dXJlcyA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworCisvKiBleHRyYSBpbnRlcm1lZGlhdGUgbG9jayBzdGF0ZSBmb3IgVlNCLFFBTSxOVFNDICovCisjZGVmaW5lIERSWEpfREVNT0RfTE9DSyAgICAgICAoRFJYX0xPQ0tfU1RBVEVfMSkKKworLyogT09CIGxvY2sgc3RhdGVzICovCisjZGVmaW5lIERSWEpfT09CX0FHQ19MT0NLICAgICAoRFJYX0xPQ0tfU1RBVEVfMSkJLyogYW5hbG9nIGdhaW4gY29udHJvbCBsb2NrICovCisjZGVmaW5lIERSWEpfT09CX1NZTkNfTE9DSyAgICAoRFJYX0xPQ0tfU1RBVEVfMikJLyogZGlnaXRhbCBnYWluIGNvbnRyb2wgbG9jayAqLworCisvKiBJbnRlcm1lZGlhdGUgcG93ZXJtb2RlcyBmb3IgRFJYSiAqLworI2RlZmluZSBEUlhKX1BPV0VSX0RPV05fTUFJTl9QQVRIICAgRFJYX1BPV0VSX01PREVfOAorI2RlZmluZSBEUlhKX1BPV0VSX0RPV05fQ09SRSAgICAgICAgRFJYX1BPV0VSX01PREVfOQorI2RlZmluZSBEUlhKX1BPV0VSX0RPV05fUExMICAgICAgICAgRFJYX1BPV0VSX01PREVfMTAKKworLyogc3Vwc3RpdGlvbiBmb3IgR1BJTyBGTkMgbXV4ICovCisjZGVmaW5lIEFQUF9PICAgICAgICAgICAgICAgICAoMHgwMDAwKQorCisvKiNkZWZpbmUgRFJYX0NUUkxfQkFTRSAgICAgICAgICgweDAwMDApKi8KKworI2RlZmluZSBEUlhKX0NUUkxfQ0ZHX0JBU0UgICAgKDB4MTAwMCkKKwllbnVtIGRyeGpfY2ZnX3R5cGUgeworCQlEUlhKX0NGR19BR0NfUkYgPSBEUlhKX0NUUkxfQ0ZHX0JBU0UsCisJCURSWEpfQ0ZHX0FHQ19JRiw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cgKiBHZXQgaHcgY29uZmlndXJhdGlvbiwgc3VjaCBhcyBjcnlzdGFsIHJlZmVyZW5jZSBmcmVxdWVuY3ksIEkyQyBzcGVlZCwgZXRjLi4uCisqLworCXN0cnVjdCBkcnhqX2NmZ19od19jZmcgeworCQllbnVtIGRyeGpfeHRhbF9mcmVxIHh0YWxfZnJlcTsKKwkJCQkgICAvKio8IGNyeXN0YWwgcmVmZXJlbmNlIGZyZXF1ZW5jeSAqLworCQllbnVtIGRyeGppMmNfc3BlZWQgaTJjX3NwZWVkOworCQkJCSAgIC8qKjwgMTAwIG9yIDQwMCBrYnBzICovfTsKKworLyoKKyAqICBEUlhKX0NGR19BVFZfTUlTQworICovCisJc3RydWN0IGRyeGpfY2ZnX2F0dl9taXNjIHsKKwkJczE2IHBlYWtfZmlsdGVyOwkvKiAtOCAuLiAxNSAqLworCQl1MTYgbm9pc2VfZmlsdGVyOwkvKiAwIC4uIDE1ICovfTsKKworLyoKKyAqICBzdHJ1Y3QgZHJ4al9jZmdfb29iX21pc2MgKi8KKyNkZWZpbmUgICBEUlhKX09PQl9TVEFURV9SRVNFVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBEUlhKX09PQl9TVEFURV9BR05fSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBEUlhKX09PQl9TVEFURV9ER05fSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBEUlhKX09PQl9TVEFURV9BR0NfSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBEUlhKX09PQl9TVEFURV9GUlFfSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBEUlhKX09PQl9TVEFURV9QSEFfSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBEUlhKX09PQl9TVEFURV9USU1fSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgRFJYSl9PT0JfU1RBVEVfRVFVX0hVTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIERSWEpfT09CX1NUQVRFX0VRVF9IVU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAKKyNkZWZpbmUgICBEUlhKX09PQl9TVEFURV9TWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisKK3N0cnVjdCBkcnhqX2NmZ19vb2JfbWlzYyB7CisJc3RydWN0IGRyeGpfYWdjX3N0YXR1cyBhZ2M7CisJYm9vbCBlcV9sb2NrOworCWJvb2wgc3ltX3RpbWluZ19sb2NrOworCWJvb2wgcGhhc2VfbG9jazsKKwlib29sIGZyZXFfbG9jazsKKwlib29sIGRpZ19nYWluX2xvY2s7CisJYm9vbCBhbmFfZ2Fpbl9sb2NrOworCXU4IHN0YXRlOworfTsKKworLyoKKyAqICBJbmRleCBvZiBpbiBhcnJheSBvZiBjb2VmCisgKi8KKwllbnVtIGRyeGpfY2ZnX29vYl9sb19wb3dlciB7CisJCURSWEpfT09CX0xPX1BPV19NSU5VUzBEQiA9IDAsCisJCURSWEpfT09CX0xPX1BPV19NSU5VUzVEQiwKKwkJRFJYSl9PT0JfTE9fUE9XX01JTlVTMTBEQiwKKwkJRFJYSl9PT0JfTE9fUE9XX01JTlVTMTVEQiwKKwkJRFJYSl9PT0JfTE9fUE9XX01BWH07CisKKy8qCisgKiAgRFJYSl9DRkdfQVRWX0VRVV9DT0VGCisgKi8KKwlzdHJ1Y3QgZHJ4al9jZmdfYXR2X2VxdV9jb2VmIHsKKwkJczE2IGNvZWYwOwkvKiAtMjU2IC4uIDI1NSAqLworCQlzMTYgY29lZjE7CS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pb247Cit9OworCisvKgorICAgRFJYSl9DRkdfQVRWX0FHQ19TVEFUVVMgKGdldCBvbmx5KQorKi8KKy8qIFRPRE8gOiBBRkUgaW50ZXJmYWNlIG5vdCB5ZXQgZmluaXNoZWQsIHN1YmplY3QgdG8gY2hhbmdlICovCisJc3RydWN0IGRyeGpfY2ZnX2F0dl9hZ2Nfc3RhdHVzIHsKKwkJdTE2IHJmX2FnY19nYWluOwkvKiAwIC4uIDg3NyB1QSAqLworCQl1MTYgaWZfYWdjX2dhaW47CS8qIDAgLi4gODc3ICB1QSAqLworCQlzMTYgdmlkZW9fYWdjX2dhaW47CS8qIC03NSAuLiAxOTcyIGluIDAuMSBkQiBzdGVwcyAqLworCQlzMTYgYXVkaW9fYWdjX2dhaW47CS8qIC00IC4uIDEwMjAgaW4gMC4xIGRCIHN0ZXBzICovCisJCXUxNiByZl9hZ2NfbG9vcF9nYWluOwkvKiAwIC4uIDcgKi8KKwkJdTE2IGlmX2FnY19sb29wX2dhaW47CS8qIDAgLi4gNyAqLworCQl1MTYgdmlkZW9fYWdjX2xvb3BfZ2FpbjsJLyogMCAuLiA3ICovfTsKKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKj09IENUUkwgcmVsYXRlZCBkYXRhIHN0cnVjdHVyZXMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qIE5PTkUgKi8KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisKKy8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCisvKioKKyogL3N0cnVjdCBzdHJ1Y3QgZHJ4al9kYXRhICogRFJYSiBzcGVjaWZpYyBhdHRyaWJ1dGVzLgorKgorKiBHbG9iYWwgZGF0YSBjb250YWluZXIgZm9yIERSWEogc3BlY2lmaWMgZGF0YS4KKyoKKyovCisJc3RydWN0IGRyeGpfZGF0YSB7CisJCS8qIGRldmljZSBjYXBhYmlsdGllcyAoZGV0ZXJtaW5lZCBkdXJpbmcgZHJ4X29wZW4oKSkgKi8KKwkJYm9vbCBoYXNfbG5hOwkJICAvKio8IHRydWUgaWYgTE5BIChha2EgUEdBKSBwcmVzZW50ICovCisJCWJvb2wgaGFzX29vYjsJCSAgLyoqPCB0cnVlIGlmIE9PQiBzdXBwb3J0ZWQgKi8KKwkJYm9vbCBoYXNfbnRzYzsJCSAgLyoqPCB0cnVlIGlmIE5UU0Mgc3VwcG9ydGVkICovCisJCWJvb2wgaGFzX2J0c2M7CQkgIC8qKjwgdHJ1ZSBpZiBCVFNDIHN1cHBvcnRlZCAqLworCQlib29sIGhhc19zbWF0eDsJICAvKio8IHRydWUgaWYgbWF0X3R4IGlzIGF2YWlsYWJsZSAqLworCQlib29sIGhhc19zbWFyeDsJICAvKio8IHRydWUgaWYgbWF0X3J4IGlzIGF2YWlsYWJsZSAqLworCQlib29sIGhhc19ncGlvOwkJICAvKio8IHRydWUgaWYgR1BJTyBpcyBhdmFpbGFibGUgKi8KKwkJYm9vbCBoYXNfaXJxbjsJCSAgLyoqPCB0cnVlIGlmIElSUU4gaXMgYXZhaWxhYmxlICovCis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lbWVudCBwZXJpb2QgKi8KKwkJdTE2IHFhbV92ZF9wcmVzY2FsZTsJICAvKio8IFZpdGVyYmkgTWVhc3VyZW1lbnQgUHJlc2NhbGUgICAgICAgICAgICAgICAgICAgICAqLworCQl1MTYgcWFtX3ZkX3BlcmlvZDsJICAvKio8IFZpdGVyYmkgTWVhc3VyZW1lbnQgcGVyaW9kICAgICAgICAgICAgICAgICAgICAgICAqLworCQl1MTYgZmVjX3JzX3BsZW47CSAgLyoqPCBkZWZpbmVzIFJTIEJFUiBtZWFzdXJlbWVudCBwZXJpb2QgICAgICAgICAgICAgICAgKi8KKwkJdTE2IGZlY19yc19wcmVzY2FsZTsJICAvKio8IFJlZWRTb2xvbW9uIE1lYXN1cmVtZW50IFByZXNjYWxlICAgICAgICAgICAgICAgICAqLworCQl1MTYgZmVjX3JzX3BlcmlvZDsJICAvKio8IFJlZWRTb2xvbW9uIE1lYXN1cmVtZW50IHBlcmlvZCAgICAgICAgICAgICAgICAgICAqLworCQlib29sIHJlc2V0X3BrdF9lcnJfYWNjOwkgIC8qKjwgU2V0IGEgZmxhZyB0byByZXNldCBhY2N1bXVsYXRlZCBwYWNrZXQgZXJyb3IgICAgICovCisJCXUxNiBwa3RfZXJyX2FjY19zdGFydDsJICAvKio8IFNldCBhIGZsYWcgdG8gcmVzZXQgYWNjdW11bGF0ZWQgcGFja2V0IGVycm9yICAgICAqLworCisJCS8qIEhJIGNvbmZpZ3VyYXRpb24gKi8KKwkJdTE2IGhpX2NmZ190aW1pbmdfZGl2OwkgIC8qKjwgSEkgQ29uZmlndXJlKCkgcGFyYW1ldGVyIDIgICAgICAgICAgICAgICAgICAgICAgICovCisJCXUxNiBoaV9jZmdfYnJpZGdlX2RlbGF5OwkgIC8qKjwgSEkgQ29uZmlndXJlKCkgcGFyYW1ldGVyIDMgICAgICAgICAgICAgICAgICAgICAgICovCisJCXUxNiBoaV9jZmdfd2FrZV91cF9rZXk7CSAgLyoqPCBISSBDb25maWd1cmUoKSBwYXJhbWV0ZXIgNCAgICAgICAgICAgICAgICAgICAgICAgKi8KKwkJdTE2IGhpX2NmZ19jdHJsOwkgIC8qKjwgSEkgQ29uZmlndXJlKCkgcGFyYW1ldGVyIDUgICAgICAgICAgICAgICAgICAgICAgICovCisJCXUxNiBoaV9jZmdfdHJhbnNtaXQ7CSAgLyoqPCBISSBDb25maWd1cmUoKSBwYXJhbWV0ZXIgNiAgICAgICAgICAgICAgICAgICAgICAgKi8KKworCQkvKiBVSU8gY29uZmlndWFydGlvbiAqLworCQllbnVtIGRyeHVpb19tb2RlIHVpb19zbWFfcnhfbW9kZTsvKio8IGN1cnJlbnQgbW9kZSBvZiBTbWFSeCBwaW4gICAgICAgICAgICAgICAgICAgICAgICAqLworCQllbnVtIGRyeHVpb19tb2RlIHVpb19zbWFfdHhfbW9kZTsvKio8IGN1cnJlbnQgbW9kZSBvZiBTbWFUeCBwaW4gICAgICAgICAgICAgICAgICAgICAgICAqLworCQllbnVtIGRyeHVpb19tb2RlIHVpb19ncGlvX21vZGU7IC8qKjwgY3VycmVudCBtb2RlIG9mIEFTRUwgcGluICAgICAgICAgICAgICAgICAgICAgICAgICovCisJCWVudW0gZHJ4dWlvX21vZGUgdWlvX2lycW5fbW9kZTsgLyoqPCBjdXJyZW50IG1vZGUgb2YgSVJRTiBwaW4gICAgICAgICAgICAgICAgICAgICAgICAgKi8KKworCQkvKiBJUU0gZnMgZnJlcXVlY3kgc2hpZnQgYW5kIGludmVyc2lvbiAqLworCQl1MzIgaXFtX2ZzX3JhdGVfb2ZzOwkgICAvKio8IGZyZXF1ZW5jeSBzaGlmdGVyIHNldHRpbmcgYWZ0ZXIgc2V0Y2hhbm5lbCAgICAgICovCisJCWJvb2wgcG9zX2ltYWdlOwkgICAvKio8IFR1cmU6IHBvc2l0aXZlIGltYWdlICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisJCS8qIElRTSBSQyBmcmVxdWVjeSBzaGlmdCAqLworCQl1MzIgaXFtX3JjX3JhdGVf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IFNQRUNJQUwsIEVYRU1QTEFSWSwgT1IKKyAgQ09OU0VRVUVOVElBTCBEQU1BR0VTIChJTkNMVURJTkcsIEJVVCBOT1QgTElNSVRFRCBUTywgUFJPQ1VSRU1FTlQgT0YKKyAgU1VCU1RJVFVURSBHT09EUyBPUiBTRVJWSUNFUzsgTE9TUyBPRiBVU0UsIERBVEEsIE9SIFBST0ZJVFM7IE9SIEJVU0lORVNTCisgIElOVEVSUlVQVElPTikgSE9XRVZFUiBDQVVTRUQgQU5EIE9OIEFOWSBUSEVPUlkgT0YgTElBQklMSVRZLCBXSEVUSEVSIElOCisgIENPTlRSQUNULCBTVFJJQ1QgTElBQklMSVRZLCBPUiBUT1JUIChJTkNMVURJTkcgTkVHTElHRU5DRSBPUiBPVEhFUldJU0UpCisgIEFSSVNJTkcgSU4gQU5ZIFdBWSBPVVQgT0YgVEhFIFVTRSBPRiBUSElTIFNPRlRXQVJFLCBFVkVOIElGIEFEVklTRUQgT0YgVEhFCisgIFBPU1NJQklMSVRZIE9GIFNVQ0ggREFNQUdFLgorKi8KKworLyoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogV0FSTklORyAtIFRISVMgRklMRSBIQVMgQkVFTiBHRU5FUkFURUQgLSBETyBOT1QgQ0hBTkdFCisgKgorICogRmlsZW5hbWU6ICAgICAgICBkcnhqX21hcC5oCisgKiBHZW5lcmF0ZWQgb246ICAgIE1vbiBKYW4gMTggMTI6MDk6MjQgMjAxMAorICogR2VuZXJhdGVkIGJ5OiAgICBJREY6eCAxLjMuMAorICogR2VuZXJhdGVkIGZyb206ICByZWdfbWFwCisgKiBPdXRwdXQgc3RhcnQ6ICAgIFtlbnRyeSBwb2ludF0KKyAqCisgKiBmaWxlbmFtZSAgICAgICAgIGxhc3QgbW9kaWZpZWQgICAgICAgICAgICAgICByZS11c2UKKyAqIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisgKiByZWdfbWFwLjEudG1wICAgIE1vbiBKYW4gMTggMTI6MDk6MjQgMjAxMCAgICAtCisgKgorICovCisKKyNpZm5kZWYgX19EUlhKX01BUF9fSF9fCisjZGVmaW5lIF9fRFJYSl9NQVBfX0hfXyBJTkNMVURFRAorCisjaWZkZWYgX1JFR0lTVEVSVEFCTEVfCisjaW5jbHVkZSA8cmVnaXN0ZXJ0YWJsZS5oPgorCWV4dGVybiByZWdpc3Rlcl90YWJsZV90IGRyeGpfbWFwW107CisJZXh0ZXJuIHJlZ2lzdGVyX3RhYmxlX2luZm9fdCBkcnhqX21hcF9pbmZvW107CisjZW5kaWYKKworI2RlZmluZSBBVFZfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAwMDAwCisjZGVmaW5lIEFUVl9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBBVFZfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBBVFZfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFUVl9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFUVl9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEFUVl9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIEFUVl9DT01NX1NUQVRFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDAwMDEKKyNkZWZpbmUgQVRWX0NPTU1fU1RBVEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVFZfQ09NTV9TVEFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVFZfQ09NTV9TVEFURV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBBVFZfQ09NTV9NQl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAwMDAyCisjZGVmaW5lIEFUVl9DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVRWX0NPTU1fTUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVRWX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgQVRWX0NPTU1fSU5UX1JFUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwMDAwMworI2RlZmluZSBBVFZfQ09NTV9JTlRfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFUVl9DT01NX0lOVF9SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFUVl9DT01NX0lOVF9SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX0NPTU1fSU5UX1JFUV9DT01NX0lOVF9SRVFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9DT01NX0lOVF9SRVFfQ09NTV9JTlRfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfQ09NTV9JTlRfUkVRX0NPTU1fSU5UX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVFZfQ09NTV9JTlRfUkVRX0NPTU1fSU5UX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVFZfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAwMDA1CisjZGVmaW5lIEFUVl9DT01NX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVRWX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVRWX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgQVRWX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwMDAwNgorI2RlZmluZSBBVFZfQ09NTV9JTlRfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFUVl9DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFUVl9DT01NX0lOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIEFUVl9DT01NX0lOVF9TVE1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDAwMDcKKyNkZWZpbmUgQVRWX0NPTU1fSU5UX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVFZfQ09NTV9JTlRfU1RNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVFZfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFUVl9DT01NX0tFWV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDAwMEYKKyNkZWZpbmUgQVRWX0NPTU1fS0VZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVFZfQ09NTV9LRVlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVFZfQ09NTV9LRVlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFUVl9DT01NX0tFWV9LRVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkFCQQorI2RlZmluZSAgIEFUVl9DT01NX0tFWV9NSU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFUVl9DT01NX0tFWV9NQVggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMDAKKyNkZWZpbmUgQVRWX1RPUF9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgQVRWX1RPUF9DT01NX1NUQVRFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAwMQorI2RlZmluZSBBVFZfVE9QX0NPTU1fU1RBVEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFUVl9UT1BfQ09NTV9TVEFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9TVEFURV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX1NUQVRFX1NUQVRFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9TVEFURV9TVEFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgQVRWX1RPUF9DT01NX1NUQVRFX1NUQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX1NUQVRFX1NUQVRFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVRWX1RPUF9DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAwMgorI2RlZmluZSBBVFZfVE9QX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFUVl9UT1BfQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9NQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX01CX0NUTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9NQl9DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fTUJfQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fTUJfQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fTUJfT0JTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX01CX09CU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9NQl9PQlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9NQl9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX01CX01VWF9DVFJMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9NQl9NVVhfQ1RSTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fTUJfTVVYX0NUUkxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNDCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX01CX01VWF9DVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fTUJfTVVYX0NUUkxfUEVBS19TICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fTUJfTVVYX0NUUkxfVklEX0dBSU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fTUJfTVVYX0NUUkxfQ09SUl9PICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fTUJfTVVYX0NUUkxfQ1JfUk9UX08gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fTUJfTVVYX0NUUkxfQ1JfSUlSX0lRICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgICAgQVRWX1RPUF9DT01NX01CX01VWF9DVFJMX1ZJREVPX08gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ09NTV9NQl9NVVhfQ1RSTF9TSUZfTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4CisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fTUJfTVVYX0NUUkxfU0lGMjAyNV9PICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQworI2RlZmluZSAgICAgQVRWX1RPUF9DT01NX01CX01VWF9DVFJMX1BPU1RfUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKworI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9NQl9NVVhfT0JTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fTUJfTVVYX09CU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgQVRWX1RPUF9DT01NX01CX01VWF9PQlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzQzAKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fTUJfTVVYX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ09NTV9NQl9NVVhfT0JTX1BFQUtfUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ09NTV9NQl9NVVhfT0JTX1ZJRF9HQUlOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fTUJfTVVYX09CU19DT1JSX08gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgICAgQVRWX1RPUF9DT01NX01CX01VWF9PQlNfQ1JfUk9UX08gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ09NTV9NQl9NVVhfT0JTX0NSX0lJUl9JUSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgICAgQVRWX1RPUF9DT01NX01CX01VWF9PQlNfVklERU9fTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQwCisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fTUJfTVVYX09CU19TSUZfTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ09NTV9NQl9NVVhfT0JTX1NJRjIwMjVfTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMAorI2RlZmluZSAgICAgQVRWX1RPUF9DT01NX01CX01VWF9PQlNfUE9TVF9TICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwCisKKyNkZWZpbmUgQVRWX1RPUF9DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAwMworI2RlZmluZSBBVFZfVE9QX0NPTU1fSU5UX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFUVl9UT1BfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMDUKKyNkZWZpbmUgQVRWX1RPUF9DT01NX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVFZfVE9QX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVFZfVE9QX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9TVEFfRkFHQ19TVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfU1RBX0ZBR0NfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX1NUQV9GQUdDX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX1NUQV9GQUdDX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfU1RBX09WTV9TVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX1NUQV9PVk1fU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9TVEFfT1ZNX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9TVEFfT1ZNX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX1NUQV9BTVBUSF9TVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9TVEFfQU1QVEhfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfU1RBX0FNUFRIX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfU1RBX0FNUFRIX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9JTlRfTVNLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMDYKKyNkZWZpbmUgQVRWX1RPUF9DT01NX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVFZfVE9QX0NPTU1fSU5UX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVFZfVE9QX0NPTU1fSU5UX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9NU0tfRkFHQ19NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfTVNLX0ZBR0NfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX01TS19GQUdDX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX01TS19GQUdDX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfTVNLX09WTV9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX01TS19PVk1fTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9NU0tfT1ZNX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9NU0tfT1ZNX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX01TS19BTVBUSF9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9NU0tfQU1QVEhfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfTVNLX0FNUFRIX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfTVNLX0FNUFRIX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMDcKKyNkZWZpbmUgQVRWX1RPUF9DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVFZfVE9QX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVFZfVE9QX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9TVE1fRkFHQ19TVE1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfU1RNX0ZBR0NfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX1NUTV9GQUdDX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX1NUTV9GQUdDX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfU1RNX09WTV9TVE1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX1NUTV9PVk1fU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9TVE1fT1ZNX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9TVE1fT1ZNX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVFZfVE9QX0NPTU1fSU5UX1NUTV9BTVBUSF9TVE1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0lOVF9TVE1fQU1QVEhfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfU1RNX0FNUFRIX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9JTlRfU1RNX0FNUFRIX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFUVl9UT1BfQ09NTV9LRVlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMEYKKyNkZWZpbmUgQVRWX1RPUF9DT01NX0tFWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVFZfVE9QX0NPTU1fS0VZX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVFZfVE9QX0NPTU1fS0VZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0tFWV9LRVlfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9UT1BfQ09NTV9LRVlfS0VZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0tFWV9LRVlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgQVRWX1RPUF9DT01NX0tFWV9LRVlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fS0VZX0tFWV9LRVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGQUJBCisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fS0VZX0tFWV9NSU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX0NPTU1fS0VZX0tFWV9NQVggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisKKyNkZWZpbmUgQVRWX1RPUF9DUl9BTVBfVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAxMAorI2RlZmluZSBBVFZfVE9QX0NSX0FNUF9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQVRWX1RPUF9DUl9BTVBfVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIEFUVl9UT1BfQ1JfQU1QX1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgQVRWX1RPUF9DUl9BTVBfVEhfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisKKyNkZWZpbmUgQVRWX1RPUF9DUl9DT05UX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAxMQorI2RlZmluZSBBVFZfVE9QX0NSX0NPTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgQVRWX1RPUF9DUl9DT05UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBBVFZfVE9QX0NSX0NPTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OUMKKworI2RlZmluZSAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9QX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVFZfVE9QX0NSX0NPTlRfQ1JfUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgQVRWX1RPUF9DUl9DT05UX0NSX1BfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBBVFZfVE9QX0NSX0NPTlRfQ1JfUF9NTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBBVFZfVE9QX0NSX0NPTlRfQ1JfUF9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVFZfVE9QX0NSX0NPTlRfQ1JfRF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgQVRWX1RPUF9DUl9DT05UX0NSX0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9EX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBBVFZfVE9QX0NSX0NPTlRfQ1JfRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4CisjZGVmaW5lICAgICBBVFZfVE9QX0NSX0NPTlRfQ1JfRF9NTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOAorI2RlZmluZSAgICAgQVRWX1RPUF9DUl9DT05UX0NSX0RfRk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVRWX1RPUF9DUl9DT05UX0NSX0lfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9JX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBBVFZfVE9QX0NSX0NPTlRfQ1JfSV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMAorI2RlZmluZSAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9JX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICAgIEFUVl9UT1BfQ1JfQ09OVF9DUl9JX01OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgICBBVFZfVE9QX0NSX0NPTlRfQ1JfSV9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVRWX1RPUF9DUl9PVk1fVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAxMgorI2RlZmluZSBBVFZfVE9QX0NSX09WTV9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQVRWX1RPUF9DUl9PVk1fVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIEFUVl9UT1BfQ1JfT1ZNX1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhBMAorI2RlZmluZSAgIEFUVl9UT1BfQ1JfT1ZNX1RIX01OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QTAKKyNkZWZpbmUgICBBVFZfVE9QX0NSX09WTV9USF9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVFZfVE9QX05PSVNFX1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzEwMDEzCisjZGVmaW5lIEFUVl9UT1BfTk9JU0VfVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBBVFZfVE9QX05PSVNFX1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBBVFZfVE9QX05PSVNFX1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEFUVl9UT1BfTk9JU0VfVEhfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lIEFUVl9UT1BfRVFVMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMTQKKyNkZWZpbmUgQVRWX1RPUF9FUVUwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIEFUVl9UT1BfRVFVMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgQVRWX1RPUF9FUVUwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGQgorCisjZGVmaW5lICAgQVRWX1RPUF9FUVUwX0VRVV9DMF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9UT1BfRVFVMF9FUVVfQzBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBBVFZfVE9QX0VRVTBfRVFVX0MwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSAgIEFUVl9UT1BfRVFVMF9FUVVfQzBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZCCisjZGVmaW5lICAgICBBVFZfVE9QX0VRVTBfRVFVX0MwX01OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGQgorCisjZGVmaW5lIEFUVl9UT1BfRVFVMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMTUKKyNkZWZpbmUgQVRWX1RPUF9FUVUxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIEFUVl9UT1BfRVFVMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgQVRWX1RPUF9FUVUxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDRQorCisjZGVmaW5lICAgQVRWX1RPUF9FUVUxX0VRVV9DMV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFUVl9UT1BfRVFVMV9FUVVfQzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBBVFZfVE9QX0VRVTFfRVFVX0MxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSAgIEFUVl9UT1BfRVFVMV9FUVVfQzFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUNFCisjZGVmaW5lICAgICBBVFZfVE9QX0VRVTFfRVFVX0MxX01OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDRQorCisjZGVmaW5lIEFUVl9UT1BfRVFVMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMTYKKyNkZWZpbmUgQVRWX1RPUF9FUVUyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIEFUVl9UT1BfRVFVMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgQVRWX1RPUF9FUVUyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEQyCisKKyNkZWZpbmUgICBBVFZfVE9QX0VRVTJfRVFVX0MyX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVRWX1RPUF9FUVUyX0VRVV9DMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSAgIEFUVl9UT1BfRVFVMl9FUVVfQzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lICAgQVRWX1RPUF9FUVUyX0VRVV9DMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhEMgorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUyX0VRVV9DMl9NTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RDIKKworI2RlZmluZSBBVFZfVE9QX0VRVTNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzEwMDE3CisjZGVmaW5lIEFUVl9UT1BfRVFVM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBBVFZfVE9QX0VRVTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIEFUVl9UT1BfRVFVM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNjAKKworI2RlZmluZSAgIEFUVl9UT1BfRVFVM19FUVVfQzNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVFZfVE9QX0VRVTNfRVFVX0MzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lICAgQVRWX1RPUF9FUVUzX0VRVV9DM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgICBBVFZfVE9QX0VRVTNfRVFVX0MzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE2MAorI2RlZmluZSAgICAgQVRWX1RPUF9FUVUzX0VRVV9DM19NTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjAKKworI2RlZmluZSBBVFZfVE9QX1JPVF9NT0RFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzEwMDE4CisjZGVmaW5lIEFUVl9UT1BfUk9UX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBVFZfVE9QX1JPVF9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBBVFZfVE9QX1JPVF9NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFUVl9UT1BfUk9UX01PREVfQU1QVEhfREVQRU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFUVl9UT1BfUk9UX01PREVfQUxXQVlTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lIEFUVl9UT1BfTU9EX0NPTlRST0xfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMTkKKyNkZWZpbmUgQVRWX1RPUF9NT0RfQ09OVFJPTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBBVFZfVE9QX01PRF9DT05UUk9MX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIEFUVl9UT1BfTU9EX0NPTlRST0xfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1QjEKKworI2RlZmluZSAgIEFUVl9UT1BfTU9EX0NPTlRST0xfTU9EX0lSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9JUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfSVJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfSVJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9JUl9NTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9JUl9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9JRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfSUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEFUVl9UT1BfTU9EX0NPTlRST0xfTU9EX0lGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NzgKKyNkZWZpbmUgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9JRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCisjZGVmaW5lICAgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9JRl9NTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMAorI2RlZmluZSAgICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfSUZfRk0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIEFUVl9UT1BfTU9EX0NPTlRST0xfTU9EX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfTU9ERV9SSVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfTU9ERV9SSVNFX0ZBTEwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKworI2RlZmluZSAgIEFUVl9UT1BfTU9EX0NPTlRST0xfTU9EX1RIX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAKKyNkZWZpbmUgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwMAorI2RlZmluZSAgICAgQVRWX1RPUF9NT0RfQ09OVFJPTF9NT0RfVEhfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTAwCisjZGVmaW5lICAgICBBVFZfVE9QX01PRF9DT05UUk9MX01PRF9USF9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVRWX1RPUF9TVERfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAxQQorI2RlZmluZSBBVFZfVE9QX1NURF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQVRWX1RPUF9TVERfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgQVRWX1RPUF9TVERfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFUVl9UT1BfU1REX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVFZfVE9QX1NURF9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9TVERfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgQVRWX1RPUF9TVERfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX1NURF9NT0RFX01OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX1NURF9NT0RFX0ZNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBBVFZfVE9QX1NURF9WSURfUE9MX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9TVERfVklEX1BPTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEFUVl9UT1BfU1REX1ZJRF9QT0xfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9TVERfVklEX1BPTF9ORUcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9TVERfVklEX1BPTF9QT1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIEFUVl9UT1BfVklEX0FNUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMUIKKyNkZWZpbmUgQVRWX1RPUF9WSURfQU1QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBBVFZfVE9QX1ZJRF9BTVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIEFUVl9UT1BfVklEX0FNUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzODAKKyNkZWZpbmUgICBBVFZfVE9QX1ZJRF9BTVBfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM4MAorI2RlZmluZSAgIEFUVl9UT1BfVklEX0FNUF9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFUVl9UT1BfVklEX1BFQUtfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMUMKKyNkZWZpbmUgQVRWX1RPUF9WSURfUEVBS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEFUVl9UT1BfVklEX1BFQUtfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBBVFZfVE9QX1ZJRF9QRUFLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lIEFUVl9UT1BfRkFHQ19USF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMUQKKyNkZWZpbmUgQVRWX1RPUF9GQUdDX1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBBVFZfVE9QX0ZBR0NfVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIEFUVl9UT1BfRkFHQ19USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyQjIKKyNkZWZpbmUgICBBVFZfVE9QX0ZBR0NfVEhfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJCMgorCisjZGVmaW5lIEFUVl9UT1BfU1lOQ19TTElDRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMUUKKyNkZWZpbmUgQVRWX1RPUF9TWU5DX1NMSUNFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBBVFZfVE9QX1NZTkNfU0xJQ0VfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIEFUVl9UT1BfU1lOQ19TTElDRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDMKKyNkZWZpbmUgICBBVFZfVE9QX1NZTkNfU0xJQ0VfTU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MworCisjZGVmaW5lIEFUVl9UT1BfU0lGX0dBSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMUYKKyNkZWZpbmUgQVRWX1RPUF9TSUZfR0FJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBBVFZfVE9QX1NJRl9HQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIEFUVl9UT1BfU0lGX0dBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVRWX1RPUF9TSUZfVFBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAyMAorI2RlZmluZSBBVFZfVE9QX1NJRl9UUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgQVRWX1RPUF9TSUZfVFBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIEFUVl9UT1BfU0lGX1RQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVRWX1RPUF9NT0RfQUNDVV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAyMQorI2RlZmluZSBBVFZfVE9QX01PRF9BQ0NVX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEFUVl9UT1BfTU9EX0FDQ1VfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgQVRWX1RPUF9NT0RfQUNDVV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVFZfVE9QX0NSX0ZSRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzEwMDIyCisjZGVmaW5lIEFUVl9UT1BfQ1JfRlJFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBBVFZfVE9QX0NSX0ZSRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgQVRWX1RPUF9DUl9GUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVFZfVE9QX0NSX1BIQURfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzEwMDIzCisjZGVmaW5lIEFUVl9UT1BfQ1JfUEhBRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgQVRWX1RPUF9DUl9QSEFEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBBVFZfVE9QX0NSX1BIQURfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFUVl9UT1BfQUZfU0lGX0FUVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMjQKKyNkZWZpbmUgQVRWX1RPUF9BRl9TSUZfQVRUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFUVl9UT1BfQUZfU0lGX0FUVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEFUVl9UT1BfQUZfU0lGX0FUVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX1RPUF9BRl9TSUZfQVRUXzBEQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX1RPUF9BRl9TSUZfQVRUX00zREIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgQVRWX1RPUF9BRl9TSUZfQVRUX002REIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgQVRWX1RPUF9BRl9TSUZfQVRUX005REIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgQVRWX1RPUF9TVERCWV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAyNQorI2RlZmluZSBBVFZfVE9QX1NUREJZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQVRWX1RPUF9TVERCWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgQVRWX1RPUF9TVERCWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIEFUVl9UT1BfU1REQllfU0lGX1NUREJZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVFZfVE9QX1NUREJZX1NJRl9TVERCWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9TVERCWV9TSUZfU1REQllfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgQVRWX1RPUF9TVERCWV9TSUZfU1REQllfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBBVFZfVE9QX1NUREJZX1NJRl9TVERCWV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX1NUREJZX1NJRl9TVERCWV9TVEFOREJZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBBVFZfVE9QX1NUREJZX0NWQlNfU1REQllfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9TVERCWV9DVkJTX1NUREJZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfU1REQllfQ1ZCU19TVERCWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEFUVl9UT1BfU1REQllfQ1ZCU19TVERCWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9TVERCWV9DVkJTX1NUREJZX0ExX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9TVERCWV9DVkJTX1NUREJZX0ExX1NUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgICAgQVRWX1RPUF9TVERCWV9DVkJTX1NUREJZX0EyX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgICAgQVRWX1RPUF9TVERCWV9DVkJTX1NUREJZX0EyX1NUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFUVl9UT1BfT1ZFUlJJREVfU0ZSX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMTAwMjYKKyNkZWZpbmUgQVRWX1RPUF9PVkVSUklERV9TRlJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFUVl9UT1BfT1ZFUlJJREVfU0ZSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIEFUVl9UT1BfT1ZFUlJJREVfU0ZSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX1RPUF9PVkVSUklERV9TRlJfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX1RPUF9PVkVSUklERV9TRlJfT1ZFUlJJREUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgQVRWX1RPUF9TRlJfVklEX0dBSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAyNworI2RlZmluZSBBVFZfVE9QX1NGUl9WSURfR0FJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFUVl9UT1BfU0ZSX1ZJRF9HQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFUVl9UT1BfU0ZSX1ZJRF9HQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVRWX1RPUF9TRlJfQUdDX1JFU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAyOAorI2RlZmluZSBBVFZfVE9QX1NGUl9BR0NfUkVTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgQVRWX1RPUF9TRlJfQUdDX1JFU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lIEFUVl9UT1BfU0ZSX0FHQ19SRVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVRWX1RPUF9PVk1fQ09NUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAyOQorI2RlZmluZSBBVFZfVE9QX09WTV9DT01QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEFUVl9UT1BfT1ZNX0NPTVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgQVRWX1RPUF9PVk1fQ09NUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgQVRWX1RPUF9PVVRfQ09ORl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMxMDAyQQorI2RlZmluZSBBVFZfVE9QX09VVF9DT05GX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgQVRWX1RPUF9PVVRfQ09ORl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lIEFUVl9UT1BfT1VUX0NPTkZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVFZfVE9QX09VVF9DT05GX0NWQlNfREFDX1NJR05fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVRWX1RPUF9PVVRfQ09ORl9DVkJTX0RBQ19TSUdOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfT1VUX0NPTkZfQ1ZCU19EQUNfU0lHTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEFUVl9UT1BfT1VUX0NPTkZfQ1ZCU19EQUNfU0lHTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9PVVRfQ09ORl9DVkJTX0RBQ19TSUdOX1VOU0lHTkVEICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9PVVRfQ09ORl9DVkJTX0RBQ19TSUdOX1NJR05FRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgQVRWX1RPUF9PVVRfQ09ORl9TSUZfREFDX1NJR05fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfT1VUX0NPTkZfU0lGX0RBQ19TSUdOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX09VVF9DT05GX1NJRl9EQUNfU0lHTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBBVFZfVE9QX09VVF9DT05GX1NJRl9EQUNfU0lHTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfT1VUX0NPTkZfU0lGX0RBQ19TSUdOX1VOU0lHTkVEICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFUVl9UT1BfT1VUX0NPTkZfU0lGX0RBQ19TSUdOX1NJR05FRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIEFUVl9UT1BfT1VUX0NPTkZfU0lGMjBfU0lHTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBBVFZfVE9QX09VVF9DT05GX1NJRjIwX1NJR05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVRWX1RPUF9PVVRfQ09ORl9TSUYyMF9TSUdOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgQVRWX1RPUF9PVVRfQ09ORl9TSUYyMF9TSUdOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX09VVF9DT05GX1NJRjIwX1NJR05fVU5TSUdORUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX09VVF9DT05GX1NJRjIwX1NJR05fU0lHTkVEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBBVFZfVE9QX09VVF9DT05GX0NWQlNfREFDX0JSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgQVRWX1RPUF9PVVRfQ09ORl9DVkJTX0RBQ19CUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFUVl9UT1BfT1VUX0NPTkZfQ1ZCU19EQUNfQlJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEFUVl9UT1BfT1VUX0NPTkZfQ1ZCU19EQUNfQlJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9PVVRfQ09ORl9DVkJTX0RBQ19CUl9OT1JNQUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVRWX1RPUF9PVVRfQ09ORl9DVkJTX0RBQ19CUl9CSVRSRVZFUlNFRCAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lICAgQVRWX1RPUF9PVVRfQ09ORl9TSUZfREFDX0JSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEFUVl9UT1BfT1VUX0NPTkZfU0lGX0RBQ19CUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVFZfVE9QX09VVF9DT05GX1NJRl9EQUNfQlJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgQVRWX1RPUF9PVVRfQ09ORl9TSUZfREFDX0JSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX09VVF9DT05GX1NJRl9EQUNfQlJfTk9STUFMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVFZfVE9QX09VVF9DT05GX1NJRl9EQUNfQlJfQklUUkVWRVJTRUQgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorCisjZGVmaW5lIEFUVl9BRlRfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRjAwMDAKKyNkZWZpbmUgQVRWX0FGVF9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFUVl9BRlRfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEFUVl9BRlRfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX0FGVF9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVRWX0FGVF9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgQVRWX0FGVF9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgQVRWX0FGVF9UU1RfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGMDAxMAorI2RlZmluZSBBVFZfQUZUX1RTVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQVRWX0FGVF9UU1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgQVRWX0FGVF9UU1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVURfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDAwMAorI2RlZmluZSBBVURfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQVVEX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgQVVEX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBBVURfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBBVURfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSBBVURfQ09NTV9NQl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDAwMgorI2RlZmluZSBBVURfQ09NTV9NQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX1RPUF9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMTAwMDAKKyNkZWZpbmUgQVVEX1RPUF9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEFVRF9UT1BfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEFVRF9UT1BfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVVEX1RPUF9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVVEX1RPUF9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgQVVEX1RPUF9DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMTAwMDIKKyNkZWZpbmUgQVVEX1RPUF9DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfVE9QX0NPTU1fTUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfVE9QX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX1RPUF9DT01NX01CX0NUTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9UT1BfQ09NTV9NQl9DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfVE9QX0NPTU1fTUJfQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVURfVE9QX0NPTU1fTUJfQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9UT1BfQ09NTV9NQl9DVExfQ1RSX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9UT1BfQ09NTV9NQl9DVExfQ1RSX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIEFVRF9UT1BfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfVE9QX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX1RPUF9DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgQVVEX1RPUF9DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfVE9QX0NPTU1fTUJfT0JTX09CU19PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfVE9QX0NPTU1fTUJfT0JTX09CU19PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBBVURfVE9QX0NPTU1fTUJfTVVYX0NUUkxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgQVVEX1RPUF9DT01NX01CX01VWF9DVFJMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEFVRF9UT1BfQ09NTV9NQl9NVVhfQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0MKKyNkZWZpbmUgICBBVURfVE9QX0NPTU1fTUJfTVVYX0NUUkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9UT1BfQ09NTV9NQl9NVVhfQ1RSTF9ERU1PRF9UQk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9UT1BfQ09NTV9NQl9NVVhfQ1RSTF9YREZQX0lSUVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICAgIEFVRF9UT1BfQ09NTV9NQl9NVVhfQ1RSTF9PQlNFUlZFUEMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICAgIEFVRF9UT1BfQ09NTV9NQl9NVVhfQ1RSTF9TQU9VVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMKKyNkZWZpbmUgICAgIEFVRF9UT1BfQ09NTV9NQl9NVVhfQ1RSTF9YREZQX1NDSEVRICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisKKyNkZWZpbmUgICBBVURfVE9QX0NPTU1fTUJfTVVYX09CU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgQVVEX1RPUF9DT01NX01CX01VWF9PQlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEFVRF9UT1BfQ09NTV9NQl9NVVhfT0JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0MwCisjZGVmaW5lICAgQVVEX1RPUF9DT01NX01CX01VWF9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfVE9QX0NPTU1fTUJfTVVYX09CU19ERU1PRF9UQk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfVE9QX0NPTU1fTUJfTVVYX09CU19YREZQX0lSUVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgICAgQVVEX1RPUF9DT01NX01CX01VWF9PQlNfT0JTRVJWRVBDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICAgIEFVRF9UT1BfQ09NTV9NQl9NVVhfT0JTX1NBT1VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgICBBVURfVE9QX0NPTU1fTUJfTVVYX09CU19YREZQX1NDSEVRICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKworI2RlZmluZSBBVURfVE9QX1RSX01ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAxMDAxMAorI2RlZmluZSBBVURfVE9QX1RSX01ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgQVVEX1RPUF9UUl9NREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lIEFVRF9UT1BfVFJfTURFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOAorCisjZGVmaW5lICAgQVVEX1RPUF9UUl9NREVfRklGT19TSVpFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9UT1BfVFJfTURFX0ZJRk9fU0laRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBBVURfVE9QX1RSX01ERV9GSUZPX1NJWkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBBVURfVE9QX1RSX01ERV9GSUZPX1NJWkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKworI2RlZmluZSAgIEFVRF9UT1BfVFJfTURFX1JEX0xPQ0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBBVURfVE9QX1RSX01ERV9SRF9MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX1RPUF9UUl9NREVfUkRfTE9DS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIEFVRF9UT1BfVFJfTURFX1JEX0xPQ0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICAgIEFVRF9UT1BfVFJfTURFX1JEX0xPQ0tfTk9STUFMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9UT1BfVFJfTURFX1JEX0xPQ0tfTE9DSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisKKyNkZWZpbmUgQVVEX1RPUF9UUl9DVFJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMTAwMTEKKyNkZWZpbmUgQVVEX1RPUF9UUl9DVFJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEFVRF9UT1BfVFJfQ1RSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIEFVRF9UT1BfVFJfQ1RSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVURfVE9QX1RSX0NUUl9GSUZPX1JEX1JEWV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVVEX1RPUF9UUl9DVFJfRklGT19SRF9SRFlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9UT1BfVFJfQ1RSX0ZJRk9fUkRfUkRZX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEFVRF9UT1BfVFJfQ1RSX0ZJRk9fUkRfUkRZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX1RPUF9UUl9DVFJfRklGT19SRF9SRFlfTk9UX1JFQURZICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX1RPUF9UUl9DVFJfRklGT19SRF9SRFlfUkVBRFkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgQVVEX1RPUF9UUl9DVFJfRklGT19FTVBUWV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9UT1BfVFJfQ1RSX0ZJRk9fRU1QVFlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfVE9QX1RSX0NUUl9GSUZPX0VNUFRZX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBBVURfVE9QX1RSX0NUUl9GSUZPX0VNUFRZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9UT1BfVFJfQ1RSX0ZJRk9fRU1QVFlfTk9UX0VNUFRZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9UT1BfVFJfQ1RSX0ZJRk9fRU1QVFlfRU1QVFkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIEFVRF9UT1BfVFJfQ1RSX0ZJRk9fTE9DS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBBVURfVE9QX1RSX0NUUl9GSUZPX0xPQ0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX1RPUF9UUl9DVFJfRklGT19MT0NLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgQVVEX1RPUF9UUl9DVFJfRklGT19MT0NLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfVE9QX1RSX0NUUl9GSUZPX0xPQ0tfVU5MT0NLRUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfVE9QX1RSX0NUUl9GSUZPX0xPQ0tfTE9DS0VEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBBVURfVE9QX1RSX0NUUl9GSUZPX0ZVTExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgQVVEX1RPUF9UUl9DVFJfRklGT19GVUxMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9UT1BfVFJfQ1RSX0ZJRk9fRlVMTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEFVRF9UT1BfVFJfQ1RSX0ZJRk9fRlVMTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX1RPUF9UUl9DVFJfRklGT19GVUxMX0VNUFRZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX1RPUF9UUl9DVFJfRklGT19GVUxMX0ZVTEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lIEFVRF9UT1BfVFJfUkRfUkVHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDEwMDEyCisjZGVmaW5lIEFVRF9UT1BfVFJfUkRfUkVHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX1RPUF9UUl9SRF9SRUdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX1RPUF9UUl9SRF9SRUdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9UT1BfVFJfUkRfUkVHX1JFU1VMVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfVE9QX1RSX1JEX1JFR19SRVNVTFRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEFVRF9UT1BfVFJfUkRfUkVHX1JFU1VMVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEFVRF9UT1BfVFJfUkRfUkVHX1JFU1VMVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFVRF9UT1BfVFJfVElNRVJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDEwMDEzCisjZGVmaW5lIEFVRF9UT1BfVFJfVElNRVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX1RPUF9UUl9USU1FUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX1RPUF9UUl9USU1FUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9UT1BfVFJfVElNRVJfQ1lDTEVTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfVE9QX1RSX1RJTUVSX0NZQ0xFU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEFVRF9UT1BfVFJfVElNRVJfQ1lDTEVTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEFVRF9UT1BfVFJfVElNRVJfQ1lDTEVTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFVRF9UT1BfREVNT0RfVEJPX1NFTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDEwMDE0CisjZGVmaW5lIEFVRF9UT1BfREVNT0RfVEJPX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBBVURfVE9QX0RFTU9EX1RCT19TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUYKKyNkZWZpbmUgQVVEX1RPUF9ERU1PRF9UQk9fU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVURfREVNX1dSX01PRFVTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAzMDAzMAorI2RlZmluZSBBVURfREVNX1dSX01PRFVTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9ERU1fV1JfTU9EVVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9ERU1fV1JfTU9EVVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9BU1NfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQVNTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0FTU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0FTU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQVNTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQVNTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfU1RBVElOVEVSUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX1NUQVRJTlRFUlJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9TVEFUSU5URVJSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9TVEFUSU5URVJSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX1NUQVRJTlRFUlJfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX1NUQVRJTlRFUlJfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0RJU19TVERfQ0hHX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9ESVNfU1REX0NIR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfRElTX1NURF9DSEdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfRElTX1NURF9DSEdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX01PRFVTX01PRF9ESVNfU1REX0NIR19FTkFCTEVEICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX01PRFVTX01PRF9ESVNfU1REX0NIR19ESVNBQkxFRCAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9IREVWX0FfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfSERFVl9BX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0hERVZfQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfSERFVl9BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX01PRFVTX01PRF9IREVWX0FfTk9STUFMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX01PRFVTX01PRF9IREVWX0FfSElHSF9ERVZJQVRJT04gICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0NNX0FfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9DTV9BX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQ01fQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9DTV9BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0NNX0FfTVVURSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0NNX0FfTk9JU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMAorCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQ01fQl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9DTV9CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQ01fQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9DTV9CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0NNX0JfTVVURSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0NNX0JfTk9JU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMAorCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfRk1SQURJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9GTVJBRElPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfRk1SQURJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF9GTVJBRElPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0ZNUkFESU9fVVNfNzVVICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0ZNUkFESU9fRVVfNTBVICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwMAorCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfNl81TUhaX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF82XzVNSFpfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfNl81TUhaX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwCisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfNl81TUhaX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX01PRFVTX01PRF82XzVNSFpfU0VDQU0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX01PRFVTX01PRF82XzVNSFpfRF9LICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwCisKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF80XzVNSFpfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EXzRfNU1IWl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF80XzVNSFpfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYwMDAKKyNkZWZpbmUgICBBVURfREVNX1dSX01PRFVTX01PRF80XzVNSFpfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EXzRfNU1IWl9NX0tPUkVBICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EXzRfNU1IWl9NX0JUU0MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EXzRfNU1IWl9NX0VJQUogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EXzRfNU1IWl9DSFJPTUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYwMDAKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0JUU0NfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQlRTQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0JUU0NfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwMAorI2RlZmluZSAgIEFVRF9ERU1fV1JfTU9EVVNfTU9EX0JUU0NfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQlRTQ19CVFNDX1NURVJFTyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9NT0RVU19NT0RfQlRTQ19CVFNDX1NBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwMAorCisjZGVmaW5lIEFVRF9ERU1fV1JfU1RBTkRBUkRfU0VMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDMwMDIwCisjZGVmaW5lIEFVRF9ERU1fV1JfU1RBTkRBUkRfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RFTV9XUl9TVEFOREFSRF9TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RFTV9XUl9TVEFOREFSRF9TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfU1RBTkRBUkRfU0VMX1NURF9TRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIEFVRF9ERU1fV1JfU1RBTkRBUkRfU0VMX1NURF9TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgQVVEX0RFTV9XUl9TVEFOREFSRF9TRUxfU1REX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0FVVE8gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX01fS09SRUEgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0JHX0ZNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0RfSzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0RfSzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1CisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0RfSzMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0JHX05JQ0FNX0ZNICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0xfTklDQU1fQU0gICAgICAgICAgICAgICAgICAgICAgMHg5CisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0lfTklDQU1fRk0gICAgICAgICAgICAgICAgICAgICAgMHhBCisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0RfS19OSUNBTV9GTSAgICAgICAgICAgICAgICAgICAgMHhCCisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0JUU0NfU1RFUkVPICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9TVEFOREFSRF9TRUxfU1REX1NFTF9CVFNDX1NBUCAgICAgICAgICAgICAgICAgICAgICAgIDB4MjEKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfU1RBTkRBUkRfU0VMX1NURF9TRUxfRUlBX0ogICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCisjZGVmaW5lICAgICBBVURfREVNX1dSX1NUQU5EQVJEX1NFTF9TVERfU0VMX0ZNX1JBRElPICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorCisjZGVmaW5lIEFVRF9ERU1fUkRfU1RBTkRBUkRfUkVTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDIwMDdFCisjZGVmaW5lIEFVRF9ERU1fUkRfU1RBTkRBUkRfUkVTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBTkRBUkRfUkVTX1NURF9SRVNVTFRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQU5EQVJEX1JFU19TVERfUkVTVUxUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBTkRBUkRfUkVTX1NURF9SRVNVTFRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBTkRBUkRfUkVTX1NURF9SRVNVTFRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9OT19TT1VORF9TVEFOREFSRCAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9OVFNDX01fRFVBTF9DQVJSSUVSX0ZNICAgICAgIDB4MgorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9CX0dfRFVBTF9DQVJSSUVSX0ZNICAgICAgICAgIDB4MworI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9EX0sxX0RVQUxfQ0FSUklFUl9GTSAgICAgICAgIDB4NAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9EX0syX0RVQUxfQ0FSUklFUl9GTSAgICAgICAgIDB4NQorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9EX0szX0RVQUxfQ0FSUklFUl9GTSAgICAgICAgIDB4NworI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9CX0dfTklDQU1fRk0gICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9MX05JQ0FNX0FNICAgICAgICAgICAgICAgICAgIDB4OQorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9JX05JQ0FNX0ZNICAgICAgICAgICAgICAgICAgIDB4QQorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9EX0tfTklDQU1fRk0gICAgICAgICAgICAgICAgIDB4QgorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9CVFNDX1NURVJFTyAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICAgIEFVRF9ERU1fUkRfU1RBTkRBUkRfUkVTX1NURF9SRVNVTFRfQlRTQ19NT05PX1NBUCAgICAgICAgICAgICAgICAweDIxCisjZGVmaW5lICAgICBBVURfREVNX1JEX1NUQU5EQVJEX1JFU19TVERfUkVTVUxUX05UU0NfRUlBX0ogICAgICAgICAgICAgICAgICAgMHgzMAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFOREFSRF9SRVNfU1REX1JFU1VMVF9GTV9SQURJTyAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fUkRfU1RBTkRBUkRfUkVTX1NURF9SRVNVTFRfREVURUNUSU9OX1NUSUxMX0FDVElWRSAgICAgICAweDdGRgorCisjZGVmaW5lIEFVRF9ERU1fUkRfU1RBVFVTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDIwMjAwCisjZGVmaW5lIEFVRF9ERU1fUkRfU1RBVFVTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RFTV9SRF9TVEFUVVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RFTV9SRF9TVEFUVVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfTkVXX1JEU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX05FV19SRFNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9ORVdfUkRTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9ORVdfUkRTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX05FV19SRFNfTk9fUkRTX0RBVEEgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX05FV19SRFNfTkVXX1JEU19EQVRBICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX0NBUlJfQV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9DQVJSX0FfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfQ0FSUl9BX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfQ0FSUl9BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9DQVJSX0FfREVURUNURUQgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9DQVJSX0FfTk9UX0RFVEVDVEVEICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9DQVJSX0JfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfQ0FSUl9CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX0NBUlJfQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX0NBUlJfQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfQ0FSUl9CX0RFVEVDVEVEICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfQ0FSUl9CX05PVF9ERVRFQ1RFRCAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfTklDQU1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX05JQ0FNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9OSUNBTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfTklDQU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9OSUNBTV9OT19OSUNBTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9OSUNBTV9OSUNBTV9ERVRFQ1RFRCAgICAgICAgICAgICAgICAgICAgIDB4MjAKKworI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfU1RFUkVPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX1NURVJFT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9TVEVSRU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfU1RFUkVPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9TVEVSRU9fTk9fU1RFUkVPICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9TVEVSRU9fU1RFUkVPICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKworI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfSU5ERVBfTU9OT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX0lOREVQX01PTk9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9JTkRFUF9NT05PX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfSU5ERVBfTU9OT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9JTkRFUF9NT05PX0RFUEVOREVOVF9GTV9NT05PX1BST0dSQU0gICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9JTkRFUF9NT05PX0lOREVQRU5ERU5UX0ZNX01PTk9fUFJPR1JBTSAgIDB4ODAKKworI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfQklMX09SX1NBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX0JJTF9PUl9TQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfU1RBVF9CSUxfT1JfU0FQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19TVEFUX0JJTF9PUl9TQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfQklMX09SX1NBUF9OT19TQVAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fUkRfU1RBVFVTX1NUQVRfQklMX09SX1NBUF9TQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorCisjZGVmaW5lICAgQVVEX0RFTV9SRF9TVEFUVVNfQkFEX05JQ0FNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX0JBRF9OSUNBTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfREVNX1JEX1NUQVRVU19CQURfTklDQU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMAorI2RlZmluZSAgIEFVRF9ERU1fUkRfU1RBVFVTX0JBRF9OSUNBTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfQkFEX05JQ0FNX09LICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9TVEFUVVNfQkFEX05JQ0FNX0JBRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwCisKKyNkZWZpbmUgQVVEX0RFTV9SRF9SRFNfQVJSQVlfQ05UX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMjAyMEYKKyNkZWZpbmUgQVVEX0RFTV9SRF9SRFNfQVJSQVlfQ05UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBBVURfREVNX1JEX1JEU19BUlJBWV9DTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIEFVRF9ERU1fUkRfUkRTX0FSUkFZX0NOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVURfREVNX1JEX1JEU19BUlJBWV9DTlRfUkRTX0FSUkFZX0NUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVVEX0RFTV9SRF9SRFNfQVJSQVlfQ05UX1JEU19BUlJBWV9DVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBBVURfREVNX1JEX1JEU19BUlJBWV9DTlRfUkRTX0FSUkFZX0NUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIEFVRF9ERU1fUkRfUkRTX0FSUkFZX0NOVF9SRFNfQVJSQVlfQ1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9SRF9SRFNfQVJSQVlfQ05UX1JEU19BUlJBWV9DVF9SRFNfREFUQV9OT1RfVkFMSUQgICAgICAgIDB4RkZGCisKKyNkZWZpbmUgQVVEX0RFTV9SRF9SRFNfREFUQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMjAyMTAKKyNkZWZpbmUgQVVEX0RFTV9SRF9SRFNfREFUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBBVURfREVNX1JEX1JEU19EQVRBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIEFVRF9ERU1fUkRfUkRTX0RBVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX0RTUF9XUl9GTV9QUkVTQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNTAwMEUKKyNkZWZpbmUgQVVEX0RTUF9XUl9GTV9QUkVTQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1dSX0ZNX1BSRVNDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1dSX0ZNX1BSRVNDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9GTV9QUkVTQ19GTV9BTV9QUkVTQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEFVRF9EU1BfV1JfRk1fUFJFU0NfRk1fQU1fUFJFU0NfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBBVURfRFNQX1dSX0ZNX1BSRVNDX0ZNX0FNX1BSRVNDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGMDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX0ZNX1BSRVNDX0ZNX0FNX1BSRVNDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfRk1fUFJFU0NfRk1fQU1fUFJFU0NfMjhfS0haX0ZNX0RFVklBVElPTiAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfRk1fUFJFU0NfRk1fQU1fUFJFU0NfNTBfS0haX0ZNX0RFVklBVElPTiAgICAgICAgICAgICAweDQ4MDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfRk1fUFJFU0NfRk1fQU1fUFJFU0NfNzVfS0haX0ZNX0RFVklBVElPTiAgICAgICAgICAgICAweDMwMDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfRk1fUFJFU0NfRk1fQU1fUFJFU0NfMTAwX0tIWl9GTV9ERVZJQVRJT04gICAgICAgICAgICAweDI0MDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfRk1fUFJFU0NfRk1fQU1fUFJFU0NfMTUwX0tIWl9GTV9ERVZJQVRJT04gICAgICAgICAgICAweDE4MDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfRk1fUFJFU0NfRk1fQU1fUFJFU0NfMTgwX0tIWl9GTV9ERVZJQVRJT04gICAgICAgICAgICAweDEzMDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfRk1fUFJFU0NfRk1fQU1fUFJFU0NfMzgwX0tIWl9GTV9ERVZJQVRJT04gICAgICAgICAgICAweDkwMAorCisjZGVmaW5lIEFVRF9EU1BfV1JfTklDQU1fUFJFU0NfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDUwMDEwCisjZGVmaW5lIEFVRF9EU1BfV1JfTklDQU1fUFJFU0NfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RTUF9XUl9OSUNBTV9QUkVTQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RTUF9XUl9OSUNBTV9QUkVTQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgQVVEX0RTUF9XUl9WT0xVTUVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNTAwMDAKKyNkZWZpbmUgQVVEX0RTUF9XUl9WT0xVTUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1dSX1ZPTFVNRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1dSX1ZPTFVNRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9WT0xVTUVfVk9MX01BSU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEFVRF9EU1BfV1JfVk9MVU1FX1ZPTF9NQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBBVURfRFNQX1dSX1ZPTFVNRV9WT0xfTUFJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGMDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX1ZPTFVNRV9WT0xfTUFJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVURfRFNQX1dSX1NSQ19JMlNfTUFUUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTA1MDAzOAorI2RlZmluZSBBVURfRFNQX1dSX1NSQ19JMlNfTUFUUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9EU1BfV1JfU1JDX0kyU19NQVRSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9EU1BfV1JfU1JDX0kyU19NQVRSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVURfRFNQX1dSX1NSQ19JMlNfTUFUUl9TUkNfSTJTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgQVVEX0RTUF9XUl9TUkNfSTJTX01BVFJfU1JDX0kyU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEFVRF9EU1BfV1JfU1JDX0kyU19NQVRSX1NSQ19JMlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYwMAorI2RlZmluZSAgIEFVRF9EU1BfV1JfU1JDX0kyU19NQVRSX1NSQ19JMlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RTUF9XUl9TUkNfSTJTX01BVFJfU1JDX0kyU19NT05PICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RTUF9XUl9TUkNfSTJTX01BVFJfU1JDX0kyU19TVEVSRU9fQUIgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX1NSQ19JMlNfTUFUUl9TUkNfSTJTX1NURVJFT19BICAgICAgICAgICAgICAgICAgICAgICAgMHgzMDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfU1JDX0kyU19NQVRSX1NSQ19JMlNfU1RFUkVPX0IgICAgICAgICAgICAgICAgICAgICAgICAweDQwMAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9TUkNfSTJTX01BVFJfTUFUX0kyU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9EU1BfV1JfU1JDX0kyU19NQVRSX01BVF9JMlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBBVURfRFNQX1dSX1NSQ19JMlNfTUFUUl9NQVRfSTJTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgQVVEX0RTUF9XUl9TUkNfSTJTX01BVFJfTUFUX0kyU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX1NSQ19JMlNfTUFUUl9NQVRfSTJTX1NPVU5EX0EgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX1NSQ19JMlNfTUFUUl9NQVRfSTJTX1NPVU5EX0IgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgICAgQVVEX0RTUF9XUl9TUkNfSTJTX01BVFJfTUFUX0kyU19TVEVSRU8gICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfU1JDX0kyU19NQVRSX01BVF9JMlNfTU9OTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCisKKyNkZWZpbmUgQVVEX0RTUF9XUl9BVkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNTAwMjkKKyNkZWZpbmUgQVVEX0RTUF9XUl9BVkNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1dSX0FWQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1dSX0FWQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX09OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWQ19BVkNfT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX09OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDAwCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX09OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWQ19BVkNfT05fT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWQ19BVkNfT05fT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDAwCisKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWQ19BVkNfREVDQVlfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX0RFQ0FZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEFVRF9EU1BfV1JfQVZDX0FWQ19ERUNBWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAwCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX0RFQ0FZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWQ19BVkNfREVDQVlfOF9TRUMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfQVZDX0FWQ19ERUNBWV80X1NFQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMAorI2RlZmluZSAgICAgQVVEX0RTUF9XUl9BVkNfQVZDX0RFQ0FZXzJfU0VDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWQ19BVkNfREVDQVlfMjBfTVNFQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKworI2RlZmluZSAgIEFVRF9EU1BfV1JfQVZDX0FWQ19SRUZfTEVWX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWQ19BVkNfUkVGX0xFVl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX1JFRl9MRVZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMAorI2RlZmluZSAgIEFVRF9EU1BfV1JfQVZDX0FWQ19SRUZfTEVWX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX01BWF9BVFRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIEFVRF9EU1BfV1JfQVZDX0FWQ19NQVhfQVRUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWQ19BVkNfTUFYX0FUVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWQ19BVkNfTUFYX0FUVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfQVZDX0FWQ19NQVhfQVRUXzI0REIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfQVZDX0FWQ19NQVhfQVRUXzE4REIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfQVZDX0FWQ19NQVhfQVRUXzEyREIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKworI2RlZmluZSAgIEFVRF9EU1BfV1JfQVZDX0FWQ19NQVhfR0FJTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWQ19BVkNfTUFYX0dBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX01BWF9HQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVkNfQVZDX01BWF9HQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWQ19BVkNfTUFYX0dBSU5fNkRCICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWQ19BVkNfTUFYX0dBSU5fMTJEQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWQ19BVkNfTUFYX0dBSU5fMERCICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgQVVEX0RTUF9XUl9RUEVBS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNTAwMEMKKyNkZWZpbmUgQVVEX0RTUF9XUl9RUEVBS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1dSX1FQRUFLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1dSX1FQRUFLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9RUEVBS19TUkNfUVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEFVRF9EU1BfV1JfUVBFQUtfU1JDX1FQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBBVURfRFNQX1dSX1FQRUFLX1NSQ19RUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGMDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX1FQRUFLX1NSQ19RUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfUVBFQUtfU1JDX1FQX01PTk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfUVBFQUtfU1JDX1FQX1NURVJFT19BQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgICAgQVVEX0RTUF9XUl9RUEVBS19TUkNfUVBfU1RFUkVPX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX1FQRUFLX1NSQ19RUF9TVEVSRU9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKworI2RlZmluZSAgIEFVRF9EU1BfV1JfUVBFQUtfTUFUX1FQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX1FQRUFLX01BVF9RUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgQVVEX0RTUF9XUl9RUEVBS19NQVRfUVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIEFVRF9EU1BfV1JfUVBFQUtfTUFUX1FQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RTUF9XUl9RUEVBS19NQVRfUVBfU09VTkRfQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RTUF9XUl9RUEVBS19NQVRfUVBfU09VTkRfQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfUVBFQUtfTUFUX1FQX1NURVJFTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX1FQRUFLX01BVF9RUF9NT05PICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMAorCisjZGVmaW5lIEFVRF9EU1BfUkRfUVBFQUtfTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDQwMDE5CisjZGVmaW5lIEFVRF9EU1BfUkRfUVBFQUtfTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RTUF9SRF9RUEVBS19MX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RTUF9SRF9RUEVBS19MX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVURfRFNQX1JEX1FQRUFLX1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTA0MDAxQQorI2RlZmluZSBBVURfRFNQX1JEX1FQRUFLX1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9EU1BfUkRfUVBFQUtfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9EU1BfUkRfUVBFQUtfUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX0RTUF9XUl9CRUVQRVJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNTAwMTQKKyNkZWZpbmUgQVVEX0RTUF9XUl9CRUVQRVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1dSX0JFRVBFUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1dSX0JFRVBFUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9CRUVQRVJfQkVFUF9WT0xVTUVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEFVRF9EU1BfV1JfQkVFUEVSX0JFRVBfVk9MVU1FX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBBVURfRFNQX1dSX0JFRVBFUl9CRUVQX1ZPTFVNRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX0JFRVBFUl9CRUVQX1ZPTFVNRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9EU1BfV1JfQkVFUEVSX0JFRVBfRlJFUVVFTkNZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX0JFRVBFUl9CRUVQX0ZSRVFVRU5DWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgQVVEX0RTUF9XUl9CRUVQRVJfQkVFUF9GUkVRVUVOQ1lfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIEFVRF9EU1BfV1JfQkVFUEVSX0JFRVBfRlJFUVVFTkNZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDMwMDUwCisjZGVmaW5lIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX0NMX1BPTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19DTF9QT0xfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfQ0xfUE9MX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX0NMX1BPTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfQ0xfUE9MX05PUk1BTCAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfQ0xfUE9MX0lOVkVSVEVEICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX0VOQUJMRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19FTkFCTEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfRU5BQkxFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX0VOQUJMRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfRU5BQkxFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfRU5BQkxFX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX1NMVl9NU1RfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19TTFZfTVNUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfU0xWX01TVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfU0xWX01TVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19TTFZfTVNUX01BU1RFUiAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19TTFZfTVNUX1NMQVZFICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisKKyNkZWZpbmUgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19XU19QT0xfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfV1NfUE9MX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX1dTX1BPTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX1dTX1BPTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfV1NfUE9MX0xFRlRfTE9XICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfV1NfUE9MX0xFRlRfSElHSCAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfV1NfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX1dTX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19XU19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19XU19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX1dTX01PREVfTk9fREVMQVkgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX1dTX01PREVfREVMQVkgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfSTJTX0NPTkZJRzJfSTJTX1dPUkRfTEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19XT1JEX0xFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfV09SRF9MRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9JMlNfQ09ORklHMl9JMlNfV09SRF9MRU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19XT1JEX0xFTl9CSVRfMzIgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfREVNX1dSX0kyU19DT05GSUcyX0kyU19XT1JEX0xFTl9CSVRfMTYgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgQVVEX0RTUF9XUl9JMlNfT1VUX0ZTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNTAwMkEKKyNkZWZpbmUgQVVEX0RTUF9XUl9JMlNfT1VUX0ZTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1dSX0kyU19PVVRfRlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1dSX0kyU19PVVRfRlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9JMlNfT1VUX0ZTX0ZTX09VVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9EU1BfV1JfSTJTX09VVF9GU19GU19PVVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgQVVEX0RTUF9XUl9JMlNfT1VUX0ZTX0ZTX09VVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgQVVEX0RTUF9XUl9JMlNfT1VUX0ZTX0ZTX09VVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX0RTUF9XUl9BVl9TWU5DX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNTAwMkIKKyNkZWZpbmUgQVVEX0RTUF9XUl9BVl9TWU5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1dSX0FWX1NZTkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1dSX0FWX1NZTkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVl9TWU5DX0FWX09OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVl9TWU5DX0FWX09OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVl9TWU5DX0FWX09OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfT05fRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfT05fRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfQVVUT19GUkVRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSAgIEFVRF9EU1BfV1JfQVZfU1lOQ19BVl9BVVRPX0ZSRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfQVVUT19GUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfQVVUT19GUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfQVZfU1lOQ19BVl9BVVRPX0ZSRVFfTU9OT0NIUk9NRSAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9EU1BfV1JfQVZfU1lOQ19BVl9BVVRPX0ZSRVFfTlRTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAKKworI2RlZmluZSAgIEFVRF9EU1BfV1JfQVZfU1lOQ19BVl9TVERfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfU1REX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVl9TWU5DX0FWX1NURF9TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgQVVEX0RTUF9XUl9BVl9TWU5DX0FWX1NURF9TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfU1REX1NFTF9BVVRPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfU1REX1NFTF9QQUxfU0VDQU0gICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfU1REX1NFTF9OVFNDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgICBBVURfRFNQX1dSX0FWX1NZTkNfQVZfU1REX1NFTF9NT05PQ0hST01FICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgQVVEX0RTUF9SRF9TVEFUVVMyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNDAwN0IKKyNkZWZpbmUgQVVEX0RTUF9SRF9TVEFUVVMyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1JEX1NUQVRVUzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1JEX1NUQVRVUzJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RTUF9SRF9TVEFUVVMyX0FWX0FDVElWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgICBBVURfRFNQX1JEX1NUQVRVUzJfQVZfQUNUSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RTUF9SRF9TVEFUVVMyX0FWX0FDVElWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisjZGVmaW5lICAgQVVEX0RTUF9SRF9TVEFUVVMyX0FWX0FDVElWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1JEX1NUQVRVUzJfQVZfQUNUSVZFX05PX1NZTkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBBVURfRFNQX1JEX1NUQVRVUzJfQVZfQUNUSVZFX1NZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisKKyNkZWZpbmUgQVVEX0RTUF9SRF9YREZQX0ZXX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNDAwMUQKKyNkZWZpbmUgQVVEX0RTUF9SRF9YREZQX0ZXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfRFNQX1JEX1hERlBfRldfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfRFNQX1JEX1hERlBfRldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzQ0CisKKyNkZWZpbmUgICBBVURfRFNQX1JEX1hERlBfRldfRFNQX0ZXX1JFVl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVVEX0RTUF9SRF9YREZQX0ZXX0RTUF9GV19SRVZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBBVURfRFNQX1JEX1hERlBfRldfRFNQX0ZXX1JFVl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBBVURfRFNQX1JEX1hERlBfRldfRFNQX0ZXX1JFVl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM0NAorCisjZGVmaW5lIEFVRF9EU1BfUkRfWEZQX0ZXX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDQwNEI4CisjZGVmaW5lIEFVRF9EU1BfUkRfWEZQX0ZXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RTUF9SRF9YRlBfRldfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RTUF9SRF9YRlBfRldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyCisKKyNkZWZpbmUgICBBVURfRFNQX1JEX1hGUF9GV19GUF9GV19SRVZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVVEX0RTUF9SRF9YRlBfRldfRlBfRldfUkVWX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBBVURfRFNQX1JEX1hGUF9GV19GUF9GV19SRVZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBBVURfRFNQX1JEX1hGUF9GV19GUF9GV19SRVZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyCisKKyNkZWZpbmUgQVVEX0RFTV9XUl9EQ09fQl9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMzAwOUIKKyNkZWZpbmUgQVVEX0RFTV9XUl9EQ09fQl9ISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfREVNX1dSX0RDT19CX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfREVNX1dSX0RDT19CX0hJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFVRF9ERU1fV1JfRENPX0JfTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDMwMDkzCisjZGVmaW5lIEFVRF9ERU1fV1JfRENPX0JfTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RFTV9XUl9EQ09fQl9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RFTV9XUl9EQ09fQl9MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVURfREVNX1dSX0RDT19BX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAzMDBBQgorI2RlZmluZSBBVURfREVNX1dSX0RDT19BX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9ERU1fV1JfRENPX0FfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9ERU1fV1JfRENPX0FfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX0RFTV9XUl9EQ09fQV9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMzAwQTMKKyNkZWZpbmUgQVVEX0RFTV9XUl9EQ09fQV9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfREVNX1dSX0RDT19BX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfREVNX1dSX0RDT19BX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBBVURfREVNX1dSX05JQ0FNX1RIUlNITERfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAzMDAyMQorI2RlZmluZSBBVURfREVNX1dSX05JQ0FNX1RIUlNITERfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9ERU1fV1JfTklDQU1fVEhSU0hMRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9ERU1fV1JfTklDQU1fVEhSU0hMRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyQkMKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfTklDQU1fVEhSU0hMRF9OSUNBTV9USExEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfREVNX1dSX05JQ0FNX1RIUlNITERfTklDQU1fVEhMRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIEFVRF9ERU1fV1JfTklDQU1fVEhSU0hMRF9OSUNBTV9USExEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgQVVEX0RFTV9XUl9OSUNBTV9USFJTSExEX05JQ0FNX1RITERfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyQkMKKworI2RlZmluZSBBVURfREVNX1dSX0EyX1RIUlNITERfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAzMDAyMgorI2RlZmluZSBBVURfREVNX1dSX0EyX1RIUlNITERfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9ERU1fV1JfQTJfVEhSU0hMRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9ERU1fV1JfQTJfVEhSU0hMRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTAKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfQTJfVEhSU0hMRF9BMl9USExEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfREVNX1dSX0EyX1RIUlNITERfQTJfVEhMRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIEFVRF9ERU1fV1JfQTJfVEhSU0hMRF9BMl9USExEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgQVVEX0RFTV9XUl9BMl9USFJTSExEX0EyX1RITERfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTAKKworI2RlZmluZSBBVURfREVNX1dSX0JUU0NfVEhSU0hMRF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAzMDAyMworI2RlZmluZSBBVURfREVNX1dSX0JUU0NfVEhSU0hMRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9ERU1fV1JfQlRTQ19USFJTSExEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9ERU1fV1JfQlRTQ19USFJTSExEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisKKyNkZWZpbmUgICBBVURfREVNX1dSX0JUU0NfVEhSU0hMRF9CVFNDX1RITERfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVVEX0RFTV9XUl9CVFNDX1RIUlNITERfQlRTQ19USExEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBBVURfREVNX1dSX0JUU0NfVEhSU0hMRF9CVFNDX1RITERfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIEFVRF9ERU1fV1JfQlRTQ19USFJTSExEX0JUU0NfVEhMRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QworCisjZGVmaW5lIEFVRF9ERU1fV1JfQ01fQV9USFJTSExEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDMwMDI0CisjZGVmaW5lIEFVRF9ERU1fV1JfQ01fQV9USFJTSExEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RFTV9XUl9DTV9BX1RIUlNITERfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RFTV9XUl9DTV9BX1RIUlNITERfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJBCisKKyNkZWZpbmUgICBBVURfREVNX1dSX0NNX0FfVEhSU0hMRF9DTV9BX1RITERfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVVEX0RFTV9XUl9DTV9BX1RIUlNITERfQ01fQV9USExEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBBVURfREVNX1dSX0NNX0FfVEhSU0hMRF9DTV9BX1RITERfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIEFVRF9ERU1fV1JfQ01fQV9USFJTSExEX0NNX0FfVEhMRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MkEKKworI2RlZmluZSBBVURfREVNX1dSX0NNX0JfVEhSU0hMRF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAzMDAyNQorI2RlZmluZSBBVURfREVNX1dSX0NNX0JfVEhSU0hMRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9ERU1fV1JfQ01fQl9USFJTSExEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9ERU1fV1JfQ01fQl9USFJTSExEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyQQorCisjZGVmaW5lICAgQVVEX0RFTV9XUl9DTV9CX1RIUlNITERfQ01fQl9USExEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9ERU1fV1JfQ01fQl9USFJTSExEX0NNX0JfVEhMRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgQVVEX0RFTV9XUl9DTV9CX1RIUlNITERfQ01fQl9USExEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBBVURfREVNX1dSX0NNX0JfVEhSU0hMRF9DTV9CX1RITERfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJBCisKKyNkZWZpbmUgQVVEX0RFTV9SRF9OSUNfQ19BRF9CSVRTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMjAwMjMKKyNkZWZpbmUgQVVEX0RFTV9SRF9OSUNfQ19BRF9CSVRTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfREVNX1JEX05JQ19DX0FEX0JJVFNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfREVNX1JEX05JQ19DX0FEX0JJVFNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQ19BRF9CSVRTX05JQ0FNX1NZTkNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9ERU1fUkRfTklDX0NfQURfQklUU19OSUNBTV9TWU5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19DX0FEX0JJVFNfTklDQU1fU1lOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19DX0FEX0JJVFNfTklDQU1fU1lOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fUkRfTklDX0NfQURfQklUU19OSUNBTV9TWU5DX05PVF9TWU5DRUQgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEFVRF9ERU1fUkRfTklDX0NfQURfQklUU19OSUNBTV9TWU5DX1NZTkNFRCAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIEFVRF9ERU1fUkRfTklDX0NfQURfQklUU19DX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19DX0FEX0JJVFNfQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQ19BRF9CSVRTX0NfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRQorI2RlZmluZSAgIEFVRF9ERU1fUkRfTklDX0NfQURfQklUU19DX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQ19BRF9CSVRTX0FERF9CSVRfTE9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIEFVRF9ERU1fUkRfTklDX0NfQURfQklUU19BRERfQklUX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19DX0FEX0JJVFNfQUREX0JJVF9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEUwCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQ19BRF9CSVRTX0FERF9CSVRfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX0RFTV9SRF9OSUNfQUREX0JJVFNfSElfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMjAwMzgKKyNkZWZpbmUgQVVEX0RFTV9SRF9OSUNfQUREX0JJVFNfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfREVNX1JEX05JQ19BRERfQklUU19ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfREVNX1JEX05JQ19BRERfQklUU19ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQUREX0JJVFNfSElfQUREX0JJVF9ISV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9ERU1fUkRfTklDX0FERF9CSVRTX0hJX0FERF9CSVRfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19BRERfQklUU19ISV9BRERfQklUX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQUREX0JJVFNfSElfQUREX0JJVF9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX0RFTV9SRF9OSUNfQ0lCX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMjAwMzgKKyNkZWZpbmUgQVVEX0RFTV9SRF9OSUNfQ0lCX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfREVNX1JEX05JQ19DSUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfREVNX1JEX05JQ19DSUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQ0lCX0NJQjJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9ERU1fUkRfTklDX0NJQl9DSUIyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19DSUJfQ0lCMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19DSUJfQ0lCMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9ERU1fUkRfTklDX0NJQl9DSUIxX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19DSUJfQ0lCMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQ0lCX0NJQjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfQ0lCX0NJQjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX0RFTV9SRF9OSUNfRVJST1JfUkFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMjAwNTcKKyNkZWZpbmUgQVVEX0RFTV9SRF9OSUNfRVJST1JfUkFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfREVNX1JEX05JQ19FUlJPUl9SQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfREVNX1JEX05JQ19FUlJPUl9SQVRFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfRVJST1JfUkFURV9FUlJPUl9SQVRFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9ERU1fUkRfTklDX0VSUk9SX1JBVEVfRVJST1JfUkFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgQVVEX0RFTV9SRF9OSUNfRVJST1JfUkFURV9FUlJPUl9SQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBBVURfREVNX1JEX05JQ19FUlJPUl9SQVRFX0VSUk9SX1JBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVURfREVNX1dSX0ZNX0RFRU1QSF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAzMDAwRgorI2RlZmluZSBBVURfREVNX1dSX0ZNX0RFRU1QSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9ERU1fV1JfRk1fREVFTVBIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9ERU1fV1JfRk1fREVFTVBIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVVEX0RFTV9XUl9GTV9ERUVNUEhfNTBVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVVEX0RFTV9XUl9GTV9ERUVNUEhfNzVVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgQVVEX0RFTV9XUl9GTV9ERUVNUEhfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRgorCisjZGVmaW5lIEFVRF9ERU1fV1JfRk1fTUFUUklYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDMwMDZGCisjZGVmaW5lIEFVRF9ERU1fV1JfRk1fTUFUUklYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RFTV9XUl9GTV9NQVRSSVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RFTV9XUl9GTV9NQVRSSVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBBVURfREVNX1dSX0ZNX01BVFJJWF9OT19NQVRSSVggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBBVURfREVNX1dSX0ZNX01BVFJJWF9HRVJNQU5fTUFUUklYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBBVURfREVNX1dSX0ZNX01BVFJJWF9LT1JFQU5fTUFUUklYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBBVURfREVNX1dSX0ZNX01BVFJJWF9TT1VORF9BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBBVURfREVNX1dSX0ZNX01BVFJJWF9TT1VORF9CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSBBVURfRFNQX1JEX0ZNX0lERU5UX1ZBTFVFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTA0MDAxOAorI2RlZmluZSBBVURfRFNQX1JEX0ZNX0lERU5UX1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9EU1BfUkRfRk1fSURFTlRfVkFMVUVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9EU1BfUkRfRk1fSURFTlRfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBBVURfRFNQX1JEX0ZNX0lERU5UX1ZBTFVFX0ZNX0lERU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgQVVEX0RTUF9SRF9GTV9JREVOVF9WQUxVRV9GTV9JREVOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEFVRF9EU1BfUkRfRk1fSURFTlRfVkFMVUVfRk1fSURFTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYwMAorI2RlZmluZSAgIEFVRF9EU1BfUkRfRk1fSURFTlRfVkFMVUVfRk1fSURFTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDQwMDFCCisjZGVmaW5lIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RTUF9SRF9GTV9EQ19MRVZFTF9BX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RTUF9SRF9GTV9EQ19MRVZFTF9BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQV9GTV9EQ19MRVZfQV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfRFNQX1JEX0ZNX0RDX0xFVkVMX0FfRk1fRENfTEVWX0FfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQV9GTV9EQ19MRVZfQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQV9GTV9EQ19MRVZfQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDQwMDFDCisjZGVmaW5lIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RTUF9SRF9GTV9EQ19MRVZFTF9CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RTUF9SRF9GTV9EQ19MRVZFTF9CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQl9GTV9EQ19MRVZfQl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfRFNQX1JEX0ZNX0RDX0xFVkVMX0JfRk1fRENfTEVWX0JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQl9GTV9EQ19MRVZfQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEFVRF9EU1BfUkRfRk1fRENfTEVWRUxfQl9GTV9EQ19MRVZfQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFVRF9ERU1fV1JfRk1fRENfTk9UQ0hfU1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDMwMDE3CisjZGVmaW5lIEFVRF9ERU1fV1JfRk1fRENfTk9UQ0hfU1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX0RFTV9XUl9GTV9EQ19OT1RDSF9TV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX0RFTV9XUl9GTV9EQ19OT1RDSF9TV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEFVRF9ERU1fV1JfRk1fRENfTk9UQ0hfU1dfRk1fRENfTk9fU1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfREVNX1dSX0ZNX0RDX05PVENIX1NXX0ZNX0RDX05PX1NXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEFVRF9ERU1fV1JfRk1fRENfTk9UQ0hfU1dfRk1fRENfTk9fU1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEFVRF9ERU1fV1JfRk1fRENfTk9UQ0hfU1dfRk1fRENfTk9fU1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9GTV9EQ19OT1RDSF9TV19GTV9EQ19OT19TV19PTiAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgQVVEX0RFTV9XUl9GTV9EQ19OT1RDSF9TV19GTV9EQ19OT19TV19PRkYgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKworI2RlZmluZSBBVURfRFNQX1dSX1NZTkNfT1VUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTA1MDAyNgorI2RlZmluZSBBVURfRFNQX1dSX1NZTkNfT1VUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9EU1BfV1JfU1lOQ19PVVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9EU1BfV1JfU1lOQ19PVVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVVEX0RTUF9XUl9TWU5DX09VVF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVVEX0RTUF9XUl9TWU5DX09VVF9TWU5DSFJPTk9VUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgQVVEX1hGUF9EUkFNXzFLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwNjAwMDAKKyNkZWZpbmUgQVVEX1hGUF9EUkFNXzFLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfWEZQX0RSQU1fMUtfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfWEZQX0RSQU1fMUtfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFVRF9YRlBfRFJBTV8xS19EX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfWEZQX0RSQU1fMUtfRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEFVRF9YRlBfRFJBTV8xS19EX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEFVRF9YRlBfRFJBTV8xS19EX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEFVRF9YRlBfUFJBTV80S19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDcwMDAwCisjZGVmaW5lIEFVRF9YRlBfUFJBTV80S19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgQVVEX1hGUF9QUkFNXzRLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgQVVEX1hGUF9QUkFNXzRLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBBVURfWEZQX1BSQU1fNEtfRF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgQVVEX1hGUF9QUkFNXzRLX0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBBVURfWEZQX1BSQU1fNEtfRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBBVURfWEZQX1BSQU1fNEtfRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBBVURfWERGUF9EUkFNXzFLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTA4MDAwMAorI2RlZmluZSBBVURfWERGUF9EUkFNXzFLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEFVRF9YREZQX0RSQU1fMUtfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEFVRF9YREZQX0RSQU1fMUtfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgQVVEX1hERlBfRFJBTV8xS19EX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEFVRF9YREZQX0RSQU1fMUtfRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgQVVEX1hERlBfRFJBTV8xS19EX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgQVVEX1hERlBfRFJBTV8xS19EX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgQVVEX1hERlBfUFJBTV80S19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwOTAwMDAKKyNkZWZpbmUgQVVEX1hERlBfUFJBTV80S19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBVURfWERGUF9QUkFNXzRLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBVURfWERGUF9QUkFNXzRLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEFVRF9YREZQX1BSQU1fNEtfRF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBBVURfWERGUF9QUkFNXzRLX0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEFVRF9YREZQX1BSQU1fNEtfRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEFVRF9YREZQX1BSQU1fNEtfRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDAwMDAwCisjZGVmaW5lIEZFQ19DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBGRUNfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBGRUNfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEZFQ19DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIEZFQ19DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDAwMDAyCisjZGVmaW5lIEZFQ19DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgRkVDX0NPTU1fTUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgRkVDX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgRkVDX0NPTU1fSU5UX1JFUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MDAwMDMKKyNkZWZpbmUgRkVDX0NPTU1fSU5UX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBGRUNfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBGRUNfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19DT01NX0lOVF9SRVFfT0NfUkVRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfQ09NTV9JTlRfUkVRX09DX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX0NPTU1fSU5UX1JFUV9PQ19SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX0NPTU1fSU5UX1JFUV9PQ19SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX0NPTU1fSU5UX1JFUV9SU19SRVFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19DT01NX0lOVF9SRVFfUlNfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfQ09NTV9JTlRfUkVRX1JTX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBGRUNfQ09NTV9JTlRfUkVRX1JTX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBGRUNfQ09NTV9JTlRfUkVRX0RJX1JFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgRkVDX0NPTU1fSU5UX1JFUV9ESV9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19DT01NX0lOVF9SRVFfRElfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEZFQ19DT01NX0lOVF9SRVFfRElfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19DT01NX0lOVF9TVEFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDAwMDA1CisjZGVmaW5lIEZFQ19DT01NX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgRkVDX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgRkVDX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgRkVDX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MDAwMDYKKyNkZWZpbmUgRkVDX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBGRUNfQ09NTV9JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBGRUNfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBGRUNfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQwMDAwNworI2RlZmluZSBGRUNfQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19DT01NX0lOVF9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19DT01NX0lOVF9TVE1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX1RPUF9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MTAwMDAKKyNkZWZpbmUgRkVDX1RPUF9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEZFQ19UT1BfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEZFQ19UT1BfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX1RPUF9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX1RPUF9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX1RPUF9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgRkVDX1RPUF9BTk5FWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MTAwMTAKKyNkZWZpbmUgRkVDX1RPUF9BTk5FWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEZFQ19UT1BfQU5ORVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEZFQ19UT1BfQU5ORVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX1RPUF9BTk5FWF9BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX1RPUF9BTk5FWF9CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX1RPUF9BTk5FWF9DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgRkVDX1RPUF9BTk5FWF9EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgRkVDX0RJX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MjAwMDAKKyNkZWZpbmUgRkVDX0RJX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEZFQ19ESV9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEZFQ19ESV9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgRkVDX0RJX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MjAwMDIKKyNkZWZpbmUgRkVDX0RJX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEZFQ19ESV9DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEZFQ19ESV9DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fTUJfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19ESV9DT01NX01CX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9NQl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9NQl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEZFQ19ESV9DT01NX01CX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEZFQ19ESV9DT01NX01CX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19ESV9DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEZFQ19ESV9DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgRkVDX0RJX0NPTU1fTUJfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgRkVDX0RJX0NPTU1fTUJfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIEZFQ19ESV9DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDIwMDAzCisjZGVmaW5lIEZFQ19ESV9DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBGRUNfRElfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBGRUNfRElfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBGRUNfRElfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQyMDAwNQorI2RlZmluZSBGRUNfRElfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgRkVDX0RJX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgRkVDX0RJX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19ESV9DT01NX0lOVF9TVEFfU1RBVF9JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9JTlRfU1RBX1NUQVRfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX1NUQV9TVEFUX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX1NUQV9TVEFUX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9JTlRfU1RBX1RJTUVPVVRfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX1NUQV9USU1FT1VUX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19ESV9DT01NX0lOVF9TVEFfVElNRU9VVF9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEZFQ19ESV9DT01NX0lOVF9TVEFfVElNRU9VVF9JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19ESV9DT01NX0lOVF9NU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDIwMDA2CisjZGVmaW5lIEZFQ19ESV9DT01NX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBGRUNfRElfQ09NTV9JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBGRUNfRElfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19ESV9DT01NX0lOVF9NU0tfU1RBVF9JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9JTlRfTVNLX1NUQVRfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX01TS19TVEFUX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX01TS19TVEFUX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX01TS19USU1FT1VUX0lOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19ESV9DT01NX0lOVF9NU0tfVElNRU9VVF9JTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9JTlRfTVNLX1RJTUVPVVRfSU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9JTlRfTVNLX1RJTUVPVVRfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfRElfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQyMDAwNworI2RlZmluZSBGRUNfRElfQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgRkVDX0RJX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgRkVDX0RJX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9JTlRfU1RNX1NUQVRfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX1NUTV9TVEFUX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19ESV9DT01NX0lOVF9TVE1fU1RBVF9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEZFQ19ESV9DT01NX0lOVF9TVE1fU1RBVF9JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19ESV9DT01NX0lOVF9TVE1fVElNRU9VVF9JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfRElfQ09NTV9JTlRfU1RNX1RJTUVPVVRfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX1NUTV9USU1FT1VUX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgRkVDX0RJX0NPTU1fSU5UX1NUTV9USU1FT1VUX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX0RJX1NUQVRVU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MjAwMTAKKyNkZWZpbmUgRkVDX0RJX1NUQVRVU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEZFQ19ESV9TVEFUVVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIEZFQ19ESV9TVEFUVVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIEZFQ19ESV9NT0RFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDIwMDExCisjZGVmaW5lIEZFQ19ESV9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBGRUNfRElfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSBGRUNfRElfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX0RJX01PREVfTk9fU1lOQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19ESV9NT0RFX05PX1NZTkNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfRElfTU9ERV9OT19TWU5DX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfRElfTU9ERV9OT19TWU5DX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19ESV9NT0RFX0lHTk9SRV9MT1NUX1NZTkNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfRElfTU9ERV9JR05PUkVfTE9TVF9TWU5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX0RJX01PREVfSUdOT1JFX0xPU1RfU1lOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgRkVDX0RJX01PREVfSUdOT1JFX0xPU1RfU1lOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfRElfTU9ERV9JR05PUkVfVElNRU9VVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgRkVDX0RJX01PREVfSUdOT1JFX1RJTUVPVVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19ESV9NT0RFX0lHTk9SRV9USU1FT1VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEZFQ19ESV9NT0RFX0lHTk9SRV9USU1FT1VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19ESV9DT05UUk9MX1dPUkRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDIwMDEyCisjZGVmaW5lIEZFQ19ESV9DT05UUk9MX1dPUkRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBGRUNfRElfQ09OVFJPTF9XT1JEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBGRUNfRElfQ09OVFJPTF9XT1JEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19ESV9SRVNUQVJUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDIwMDEzCisjZGVmaW5lIEZFQ19ESV9SRVNUQVJUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBGRUNfRElfUkVTVEFSVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBGRUNfRElfUkVTVEFSVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19ESV9USU1FT1VUX0xPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDIwMDE0CisjZGVmaW5lIEZFQ19ESV9USU1FT1VUX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgRkVDX0RJX1RJTUVPVVRfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgRkVDX0RJX1RJTUVPVVRfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfRElfVElNRU9VVF9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQyMDAxNQorI2RlZmluZSBGRUNfRElfVElNRU9VVF9ISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgRkVDX0RJX1RJTUVPVVRfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIEZFQ19ESV9USU1FT1VUX0hJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhBCisKKyNkZWZpbmUgRkVDX1JTX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MzAwMDAKKyNkZWZpbmUgRkVDX1JTX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEZFQ19SU19DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEZFQ19SU19DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgRkVDX1JTX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MzAwMDIKKyNkZWZpbmUgRkVDX1JTX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEZFQ19SU19DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEZFQ19SU19DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fTUJfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19SU19DT01NX01CX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9NQl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9NQl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEZFQ19SU19DT01NX01CX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEZFQ19SU19DT01NX01CX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19SU19DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEZFQ19SU19DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgRkVDX1JTX0NPTU1fTUJfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgRkVDX1JTX0NPTU1fTUJfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIEZFQ19SU19DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDMwMDAzCisjZGVmaW5lIEZFQ19SU19DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBGRUNfUlNfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBGRUNfUlNfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBGRUNfUlNfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQzMDAwNQorI2RlZmluZSBGRUNfUlNfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgRkVDX1JTX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgRkVDX1JTX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19SU19DT01NX0lOVF9TVEFfRkFJTFVSRV9JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9JTlRfU1RBX0ZBSUxVUkVfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX1NUQV9GQUlMVVJFX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX1NUQV9GQUlMVVJFX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9JTlRfU1RBX01FQVNVUkVNRU5UX0lOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX1NUQV9NRUFTVVJFTUVOVF9JTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19SU19DT01NX0lOVF9TVEFfTUVBU1VSRU1FTlRfSU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEZFQ19SU19DT01NX0lOVF9TVEFfTUVBU1VSRU1FTlRfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19SU19DT01NX0lOVF9NU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDMwMDA2CisjZGVmaW5lIEZFQ19SU19DT01NX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBGRUNfUlNfQ09NTV9JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBGRUNfUlNfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19SU19DT01NX0lOVF9NU0tfRkFJTFVSRV9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9JTlRfTVNLX0ZBSUxVUkVfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX01TS19GQUlMVVJFX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX01TS19GQUlMVVJFX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX01TS19NRUFTVVJFTUVOVF9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19SU19DT01NX0lOVF9NU0tfTUVBU1VSRU1FTlRfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9JTlRfTVNLX01FQVNVUkVNRU5UX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9JTlRfTVNLX01FQVNVUkVNRU5UX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfUlNfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQzMDAwNworI2RlZmluZSBGRUNfUlNfQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgRkVDX1JTX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgRkVDX1JTX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9JTlRfU1RNX0ZBSUxVUkVfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX1NUTV9GQUlMVVJFX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19SU19DT01NX0lOVF9TVE1fRkFJTFVSRV9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEZFQ19SU19DT01NX0lOVF9TVE1fRkFJTFVSRV9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19SU19DT01NX0lOVF9TVE1fTUVBU1VSRU1FTlRfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfUlNfQ09NTV9JTlRfU1RNX01FQVNVUkVNRU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX1NUTV9NRUFTVVJFTUVOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgRkVDX1JTX0NPTU1fSU5UX1NUTV9NRUFTVVJFTUVOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX1JTX1NUQVRVU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0MzAwMTAKKyNkZWZpbmUgRkVDX1JTX1NUQVRVU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEZFQ19SU19TVEFUVVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIEZFQ19SU19TVEFUVVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIEZFQ19SU19NT0RFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDMwMDExCisjZGVmaW5lIEZFQ19SU19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBGRUNfUlNfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBGRUNfUlNfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX1JTX01PREVfQllQQVNTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19SU19NT0RFX0JZUEFTU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfUlNfTU9ERV9CWVBBU1NfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfUlNfTU9ERV9CWVBBU1NfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfUlNfTUVBU1VSRU1FTlRfUEVSSU9EX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQzMDAxMgorI2RlZmluZSBGRUNfUlNfTUVBU1VSRU1FTlRfUEVSSU9EX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19SU19NRUFTVVJFTUVOVF9QRVJJT0RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19SU19NRUFTVVJFTUVOVF9QRVJJT0RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMTcxCisKKyNkZWZpbmUgICBGRUNfUlNfTUVBU1VSRU1FTlRfUEVSSU9EX1BFUklPRF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX1JTX01FQVNVUkVNRU5UX1BFUklPRF9QRVJJT0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBGRUNfUlNfTUVBU1VSRU1FTlRfUEVSSU9EX1BFUklPRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBGRUNfUlNfTUVBU1VSRU1FTlRfUEVSSU9EX1BFUklPRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDExNzEKKworI2RlZmluZSBGRUNfUlNfTUVBU1VSRU1FTlRfUFJFU0NBTEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQzMDAxMworI2RlZmluZSBGRUNfUlNfTUVBU1VSRU1FTlRfUFJFU0NBTEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19SU19NRUFTVVJFTUVOVF9QUkVTQ0FMRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19SU19NRUFTVVJFTUVOVF9QUkVTQ0FMRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBGRUNfUlNfTUVBU1VSRU1FTlRfUFJFU0NBTEVfUFJFU0NBTEVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX1JTX01FQVNVUkVNRU5UX1BSRVNDQUxFX1BSRVNDQUxFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBGRUNfUlNfTUVBU1VSRU1FTlRfUFJFU0NBTEVfUFJFU0NBTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBGRUNfUlNfTUVBU1VSRU1FTlRfUFJFU0NBTEVfUFJFU0NBTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSBGRUNfUlNfTlJfQklUX0VSUk9SU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQzMDAxNAorI2RlZmluZSBGRUNfUlNfTlJfQklUX0VSUk9SU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19SU19OUl9CSVRfRVJST1JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19SU19OUl9CSVRfRVJST1JTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisKKyNkZWZpbmUgICBGRUNfUlNfTlJfQklUX0VSUk9SU19GSVhFRF9NQU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX1JTX05SX0JJVF9FUlJPUlNfRklYRURfTUFOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBGRUNfUlNfTlJfQklUX0VSUk9SU19GSVhFRF9NQU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIEZFQ19SU19OUl9CSVRfRVJST1JTX0ZJWEVEX01BTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisKKyNkZWZpbmUgICBGRUNfUlNfTlJfQklUX0VSUk9SU19FWFBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIEZFQ19SU19OUl9CSVRfRVJST1JTX0VYUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBGRUNfUlNfTlJfQklUX0VSUk9SU19FWFBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMDAKKyNkZWZpbmUgICBGRUNfUlNfTlJfQklUX0VSUk9SU19FWFBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMDAKKworI2RlZmluZSBGRUNfUlNfTlJfU1lNQk9MX0VSUk9SU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQzMDAxNQorI2RlZmluZSBGRUNfUlNfTlJfU1lNQk9MX0VSUk9SU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19SU19OUl9TWU1CT0xfRVJST1JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19SU19OUl9TWU1CT0xfRVJST1JTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisKKyNkZWZpbmUgICBGRUNfUlNfTlJfU1lNQk9MX0VSUk9SU19GSVhFRF9NQU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX1JTX05SX1NZTUJPTF9FUlJPUlNfRklYRURfTUFOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBGRUNfUlNfTlJfU1lNQk9MX0VSUk9SU19GSVhFRF9NQU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIEZFQ19SU19OUl9TWU1CT0xfRVJST1JTX0ZJWEVEX01BTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisKKyNkZWZpbmUgICBGRUNfUlNfTlJfU1lNQk9MX0VSUk9SU19FWFBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIEZFQ19SU19OUl9TWU1CT0xfRVJST1JTX0VYUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBGRUNfUlNfTlJfU1lNQk9MX0VSUk9SU19FWFBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMDAKKyNkZWZpbmUgICBGRUNfUlNfTlJfU1lNQk9MX0VSUk9SU19FWFBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMDAKKworI2RlZmluZSBGRUNfUlNfTlJfUEFDS0VUX0VSUk9SU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQzMDAxNgorI2RlZmluZSBGRUNfUlNfTlJfUEFDS0VUX0VSUk9SU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19SU19OUl9QQUNLRVRfRVJST1JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19SU19OUl9QQUNLRVRfRVJST1JTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisKKyNkZWZpbmUgICBGRUNfUlNfTlJfUEFDS0VUX0VSUk9SU19GSVhFRF9NQU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX1JTX05SX1BBQ0tFVF9FUlJPUlNfRklYRURfTUFOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBGRUNfUlNfTlJfUEFDS0VUX0VSUk9SU19GSVhFRF9NQU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIEZFQ19SU19OUl9QQUNLRVRfRVJST1JTX0ZJWEVEX01BTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisKKyNkZWZpbmUgICBGRUNfUlNfTlJfUEFDS0VUX0VSUk9SU19FWFBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIEZFQ19SU19OUl9QQUNLRVRfRVJST1JTX0VYUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBGRUNfUlNfTlJfUEFDS0VUX0VSUk9SU19FWFBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMDAKKyNkZWZpbmUgICBGRUNfUlNfTlJfUEFDS0VUX0VSUk9SU19FWFBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMDAKKworI2RlZmluZSBGRUNfUlNfTlJfRkFJTFVSRVNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQzMDAxNworI2RlZmluZSBGRUNfUlNfTlJfRkFJTFVSRVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19SU19OUl9GQUlMVVJFU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19SU19OUl9GQUlMVVJFU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfUlNfTlJfRkFJTFVSRVNfRklYRURfTUFOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX1JTX05SX0ZBSUxVUkVTX0ZJWEVEX01BTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBGRUNfUlNfTlJfRkFJTFVSRVNfRklYRURfTUFOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIEZFQ19SU19OUl9GQUlMVVJFU19GSVhFRF9NQU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX1JTX05SX0ZBSUxVUkVTX0VYUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBGRUNfUlNfTlJfRkFJTFVSRVNfRVhQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgRkVDX1JTX05SX0ZBSUxVUkVTX0VYUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAwCisjZGVmaW5lICAgRkVDX1JTX05SX0ZBSUxVUkVTX0VYUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMDAKKyNkZWZpbmUgRkVDX09DX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEZFQ19PQ19DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEZFQ19PQ19DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgRkVDX09DX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMDIKKyNkZWZpbmUgRkVDX09DX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIEZFQ19PQ19DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIEZFQ19PQ19DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fTUJfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19DT01NX01CX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9NQl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9NQl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEZFQ19PQ19DT01NX01CX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIEZFQ19PQ19DT01NX01CX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEZFQ19PQ19DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgRkVDX09DX0NPTU1fTUJfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgRkVDX09DX0NPTU1fTUJfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIEZFQ19PQ19DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDAzCisjZGVmaW5lIEZFQ19PQ19DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBGRUNfT0NfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBGRUNfT0NfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBGRUNfT0NfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAwNQorI2RlZmluZSBGRUNfT0NfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgRkVDX09DX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIEZFQ19PQ19DT01NX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX0RQUl9MT0NLX0lOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9EUFJfTE9DS19JTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfRFBSX0xPQ0tfSU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfRFBSX0xPQ0tfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9TTkNfTE9DS19JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfU05DX0xPQ0tfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX1NOQ19MT0NLX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX1NOQ19MT0NLX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfU05DX0xPU1RfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX1NOQ19MT1NUX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9TTkNfTE9TVF9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9TTkNfTE9TVF9JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX1NOQ19QQVJfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9TTkNfUEFSX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfU05DX1BBUl9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfU05DX1BBUl9JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9GSUZPX0ZVTExfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfRklGT19GVUxMX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX0ZJRk9fRlVMTF9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9GSUZPX0ZVTExfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX0ZJRk9fRU1QVFlfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9GSUZPX0VNUFRZX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfRklGT19FTVBUWV9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX0ZJRk9fRU1QVFlfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfT0NSX0FDUV9JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX09DUl9BQ1FfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9PQ1JfQUNRX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfT0NSX0FDUV9JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9TVEFUX0NIR19JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVEFfU1RBVF9DSEdfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RBX1NUQVRfQ0hHX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUQV9TVEFUX0NIR19JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMDYKKyNkZWZpbmUgRkVDX09DX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEZFQ19PQ19DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBGRUNfT0NfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfRFBSX0xPQ0tfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX0RQUl9MT0NLX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19EUFJfTE9DS19NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19EUFJfTE9DS19NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19TTkNfTE9DS19NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfU05DX0xPQ0tfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX1NOQ19MT0NLX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX1NOQ19MT0NLX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX1NOQ19MT1NUX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19TTkNfTE9TVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfU05DX0xPU1RfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfU05DX0xPU1RfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfU05DX1BBUl9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX1NOQ19QQVJfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19TTkNfUEFSX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19TTkNfUEFSX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19GSUZPX0ZVTExfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfRklGT19GVUxMX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX0ZJRk9fRlVMTF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19GSUZPX0ZVTExfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19GSUZPX0VNUFRZX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfRklGT19FTVBUWV9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX0ZJRk9fRU1QVFlfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19GSUZPX0VNUFRZX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19PQ1JfQUNRX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfT0NSX0FDUV9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX09DUl9BQ1FfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19PQ1JfQUNRX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19TVEFUX0NIR19NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9NU0tfU1RBVF9DSEdfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfTVNLX1NUQVRfQ0hHX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX01TS19TVEFUX0NIR19NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX0NPTU1fSU5UX1NUTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMDcKKyNkZWZpbmUgRkVDX09DX0NPTU1fSU5UX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEZFQ19PQ19DT01NX0lOVF9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBGRUNfT0NfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fRFBSX0xPQ0tfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX0RQUl9MT0NLX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9EUFJfTE9DS19NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9EUFJfTE9DS19NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9TTkNfTE9DS19NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fU05DX0xPQ0tfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX1NOQ19MT0NLX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX1NOQ19MT0NLX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX1NOQ19MT1NUX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9TTkNfTE9TVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fU05DX0xPU1RfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fU05DX0xPU1RfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fU05DX1BBUl9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX1NOQ19QQVJfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9TTkNfUEFSX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9TTkNfUEFSX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9GSUZPX0ZVTExfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fRklGT19GVUxMX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX0ZJRk9fRlVMTF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9GSUZPX0ZVTExfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9GSUZPX0VNUFRZX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fRklGT19FTVBUWV9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX0ZJRk9fRU1QVFlfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9GSUZPX0VNUFRZX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9PQ1JfQUNRX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fT0NSX0FDUV9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX09DUl9BQ1FfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9PQ1JfQUNRX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9TVEFUX0NIR19NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIEZFQ19PQ19DT01NX0lOVF9TVE1fU1RBVF9DSEdfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfQ09NTV9JTlRfU1RNX1NUQVRfQ0hHX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgRkVDX09DX0NPTU1fSU5UX1NUTV9TVEFUX0NIR19NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1NUQVRVU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMTAKKyNkZWZpbmUgRkVDX09DX1NUQVRVU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIEZFQ19PQ19TVEFUVVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBGRUNfT0NfU1RBVFVTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1NUQVRVU19EUFJfU1RBVFVTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19TVEFUVVNfRFBSX1NUQVRVU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfU1RBVFVTX0RQUl9TVEFUVVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfT0NfU1RBVFVTX0RQUl9TVEFUVVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19TVEFUVVNfU05DX1NUQVRVU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfU1RBVFVTX1NOQ19TVEFUVVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgRkVDX09DX1NUQVRVU19TTkNfU1RBVFVTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisjZGVmaW5lICAgRkVDX09DX1NUQVRVU19TTkNfU1RBVFVTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfU1RBVFVTX0ZJRk9fRlVMTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgRkVDX09DX1NUQVRVU19GSUZPX0ZVTExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19TVEFUVVNfRklGT19GVUxMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEZFQ19PQ19TVEFUVVNfRklGT19GVUxMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1NUQVRVU19GSUZPX0VNUFRZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEZFQ19PQ19TVEFUVVNfRklGT19FTVBUWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfU1RBVFVTX0ZJRk9fRU1QVFlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgRkVDX09DX1NUQVRVU19GSUZPX0VNUFRZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX01PREVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMTEKKyNkZWZpbmUgRkVDX09DX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEZFQ19PQ19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIEZFQ19PQ19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfTU9ERV9QQVJJVFlfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX01PREVfUEFSSVRZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19NT0RFX1BBUklUWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEZFQ19PQ19NT0RFX1BBUklUWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX01PREVfVFJBTlNQQVJFTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19NT0RFX1RSQU5TUEFSRU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfTU9ERV9UUkFOU1BBUkVOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBGRUNfT0NfTU9ERV9UUkFOU1BBUkVOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19NT0RFX0NMRUFSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBGRUNfT0NfTU9ERV9DTEVBUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX01PREVfQ0xFQVJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgRkVDX09DX01PREVfQ0xFQVJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfTU9ERV9SRVRBSU5fRlJBTUlOR19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgRkVDX09DX01PREVfUkVUQUlOX0ZSQU1JTkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19NT0RFX1JFVEFJTl9GUkFNSU5HX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEZFQ19PQ19NT0RFX1JFVEFJTl9GUkFNSU5HX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19EUFJfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDEyCisjZGVmaW5lIEZFQ19PQ19EUFJfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBGRUNfT0NfRFBSX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBGRUNfT0NfRFBSX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0RQUl9NT0RFX0VSUl9ESVNBQkxFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19EUFJfTU9ERV9FUlJfRElTQUJMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfRFBSX01PREVfRVJSX0RJU0FCTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfT0NfRFBSX01PREVfRVJSX0RJU0FCTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19EUFJfTU9ERV9OT1NZTkNfRU5BQkxFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfRFBSX01PREVfTk9TWU5DX0VOQUJMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0RQUl9NT0RFX05PU1lOQ19FTkFCTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgRkVDX09DX0RQUl9NT0RFX05PU1lOQ19FTkFCTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX0RQUl9VTkxPQ0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMTMKKyNkZWZpbmUgRkVDX09DX0RQUl9VTkxPQ0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEZFQ19PQ19EUFJfVU5MT0NLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIEZFQ19PQ19EUFJfVU5MT0NLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIEZFQ19PQ19EVE9fTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDE0CisjZGVmaW5lIEZFQ19PQ19EVE9fTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBGRUNfT0NfRFRPX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSBGRUNfT0NfRFRPX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0RUT19NT0RFX0RZTkFNSUNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19EVE9fTU9ERV9EWU5BTUlDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfRFRPX01PREVfRFlOQU1JQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfT0NfRFRPX01PREVfRFlOQU1JQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19EVE9fTU9ERV9EVVRZX0NZQ0xFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfRFRPX01PREVfRFVUWV9DWUNMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0RUT19NT0RFX0RVVFlfQ1lDTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgRkVDX09DX0RUT19NT0RFX0RVVFlfQ1lDTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfRFRPX01PREVfT0ZGU0VUX0VOQUJMRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgRkVDX09DX0RUT19NT0RFX09GRlNFVF9FTkFCTEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19EVE9fTU9ERV9PRkZTRVRfRU5BQkxFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEZFQ19PQ19EVE9fTU9ERV9PRkZTRVRfRU5BQkxFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19EVE9fUEVSSU9EX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDE1CisjZGVmaW5lIEZFQ19PQ19EVE9fUEVSSU9EX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBGRUNfT0NfRFRPX1BFUklPRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgRkVDX09DX0RUT19QRVJJT0RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgRkVDX09DX0RUT19SQVRFX0xPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMTYKKyNkZWZpbmUgRkVDX09DX0RUT19SQVRFX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBGRUNfT0NfRFRPX1JBVEVfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBGRUNfT0NfRFRPX1JBVEVfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0RUT19SQVRFX0xPX1JBVEVfTE9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19EVE9fUkFURV9MT19SQVRFX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgRkVDX09DX0RUT19SQVRFX0xPX1JBVEVfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgRkVDX09DX0RUT19SQVRFX0xPX1JBVEVfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX0RUT19SQVRFX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMTcKKyNkZWZpbmUgRkVDX09DX0RUT19SQVRFX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBGRUNfT0NfRFRPX1JBVEVfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIEZFQ19PQ19EVE9fUkFURV9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorCisjZGVmaW5lICAgRkVDX09DX0RUT19SQVRFX0hJX1JBVEVfSElfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19EVE9fUkFURV9ISV9SQVRFX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgRkVDX09DX0RUT19SQVRFX0hJX1JBVEVfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBGRUNfT0NfRFRPX1JBVEVfSElfUkFURV9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisKKyNkZWZpbmUgRkVDX09DX0RUT19CVVJTVF9MRU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMTgKKyNkZWZpbmUgRkVDX09DX0RUT19CVVJTVF9MRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEZFQ19PQ19EVE9fQlVSU1RfTEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBGRUNfT0NfRFRPX0JVUlNUX0xFTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QkMKKworI2RlZmluZSAgIEZFQ19PQ19EVE9fQlVSU1RfTEVOX0JVUlNUX0xFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfRFRPX0JVUlNUX0xFTl9CVVJTVF9MRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgRkVDX09DX0RUT19CVVJTVF9MRU5fQlVSU1RfTEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIEZFQ19PQ19EVE9fQlVSU1RfTEVOX0JVUlNUX0xFTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QkMKKworI2RlZmluZSBGRUNfT0NfRkNUX01PREVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAxQQorI2RlZmluZSBGRUNfT0NfRkNUX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgRkVDX09DX0ZDVF9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgRkVDX09DX0ZDVF9NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19GQ1RfTU9ERV9SQVRfRU5BX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfRkNUX01PREVfUkFUX0VOQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0ZDVF9NT0RFX1JBVF9FTkFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX09DX0ZDVF9NT0RFX1JBVF9FTkFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfRkNUX01PREVfVklSVF9FTkFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0ZDVF9NT0RFX1ZJUlRfRU5BX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19GQ1RfTU9ERV9WSVJUX0VOQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEZFQ19PQ19GQ1RfTU9ERV9WSVJUX0VOQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19GQ1RfVVNBR0VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDFCCisjZGVmaW5lIEZFQ19PQ19GQ1RfVVNBR0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBGRUNfT0NfRkNUX1VTQUdFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSBGRUNfT0NfRkNUX1VTQUdFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgRkVDX09DX0ZDVF9VU0FHRV9VU0FHRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19GQ1RfVVNBR0VfVVNBR0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBGRUNfT0NfRkNUX1VTQUdFX1VTQUdFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBGRUNfT0NfRkNUX1VTQUdFX1VTQUdFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBGRUNfT0NfRkNUX09DQ1VQQVRJT05fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAxQworI2RlZmluZSBGRUNfT0NfRkNUX09DQ1VQQVRJT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEZFQ19PQ19GQ1RfT0NDVVBBVElPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgRkVDX09DX0ZDVF9PQ0NVUEFUSU9OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19GQ1RfT0NDVVBBVElPTl9PQ0NVUEFUSU9OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfRkNUX09DQ1VQQVRJT05fT0NDVVBBVElPTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIEZFQ19PQ19GQ1RfT0NDVVBBVElPTl9PQ0NVUEFUSU9OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgRkVDX09DX0ZDVF9PQ0NVUEFUSU9OX09DQ1VQQVRJT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1RNRF9NT0RFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMUUKKyNkZWZpbmUgRkVDX09DX1RNRF9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIEZFQ19PQ19UTURfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIEZFQ19PQ19UTURfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBGRUNfT0NfVE1EX01PREVfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1RNRF9NT0RFX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIEZFQ19PQ19UTURfTU9ERV9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIEZFQ19PQ19UTURfTU9ERV9NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lIEZFQ19PQ19UTURfQ09VTlRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDFGCisjZGVmaW5lIEZFQ19PQ19UTURfQ09VTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgRkVDX09DX1RNRF9DT1VOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBGRUNfT0NfVE1EX0NPVU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUY0CisKKyNkZWZpbmUgICBGRUNfT0NfVE1EX0NPVU5UX0NPVU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1RNRF9DT1VOVF9DT1VOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBGRUNfT0NfVE1EX0NPVU5UX0NPVU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSAgIEZFQ19PQ19UTURfQ09VTlRfQ09VTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUY0CisKKyNkZWZpbmUgRkVDX09DX1RNRF9ISV9NQVJHSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMjAKKyNkZWZpbmUgRkVDX09DX1RNRF9ISV9NQVJHSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBGRUNfT0NfVE1EX0hJX01BUkdJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIEZFQ19PQ19UTURfSElfTUFSR0lOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKworI2RlZmluZSAgIEZFQ19PQ19UTURfSElfTUFSR0lOX0hJX01BUkdJTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfVE1EX0hJX01BUkdJTl9ISV9NQVJHSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSAgIEZFQ19PQ19UTURfSElfTUFSR0lOX0hJX01BUkdJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lICAgRkVDX09DX1RNRF9ISV9NQVJHSU5fSElfTUFSR0lOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKworI2RlZmluZSBGRUNfT0NfVE1EX0xPX01BUkdJTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAyMQorI2RlZmluZSBGRUNfT0NfVE1EX0xPX01BUkdJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEZFQ19PQ19UTURfTE9fTUFSR0lOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgRkVDX09DX1RNRF9MT19NQVJHSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorCisjZGVmaW5lICAgRkVDX09DX1RNRF9MT19NQVJHSU5fTE9fTUFSR0lOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19UTURfTE9fTUFSR0lOX0xPX01BUkdJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lICAgRkVDX09DX1RNRF9MT19NQVJHSU5fTE9fTUFSR0lOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgICBGRUNfT0NfVE1EX0xPX01BUkdJTl9MT19NQVJHSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorCisjZGVmaW5lIEZFQ19PQ19UTURfQ1RMX1VQRF9SQVRFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDIyCisjZGVmaW5lIEZFQ19PQ19UTURfQ1RMX1VQRF9SQVRFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBGRUNfT0NfVE1EX0NUTF9VUERfUkFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBGRUNfT0NfVE1EX0NUTF9VUERfUkFURV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgRkVDX09DX1RNRF9DVExfVVBEX1JBVEVfUkFURV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19UTURfQ1RMX1VQRF9SQVRFX1JBVEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBGRUNfT0NfVE1EX0NUTF9VUERfUkFURV9SQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBGRUNfT0NfVE1EX0NUTF9VUERfUkFURV9SQVRFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSBGRUNfT0NfVE1EX0lOVF9VUERfUkFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAyMworI2RlZmluZSBGRUNfT0NfVE1EX0lOVF9VUERfUkFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgRkVDX09DX1RNRF9JTlRfVVBEX1JBVEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgRkVDX09DX1RNRF9JTlRfVVBEX1JBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSAgIEZFQ19PQ19UTURfSU5UX1VQRF9SQVRFX1JBVEVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfVE1EX0lOVF9VUERfUkFURV9SQVRFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgRkVDX09DX1RNRF9JTlRfVVBEX1JBVEVfUkFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lICAgRkVDX09DX1RNRF9JTlRfVVBEX1JBVEVfUkFURV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgRkVDX09DX0FWUl9QQVJNX0FfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMjYKKyNkZWZpbmUgRkVDX09DX0FWUl9QQVJNX0FfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEZFQ19PQ19BVlJfUEFSTV9BX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIEZFQ19PQ19BVlJfUEFSTV9BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisKKyNkZWZpbmUgICBGRUNfT0NfQVZSX1BBUk1fQV9QQVJNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX0FWUl9QQVJNX0FfUEFSTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEZFQ19PQ19BVlJfUEFSTV9BX1BBUk1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIEZFQ19PQ19BVlJfUEFSTV9BX1BBUk1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NgorCisjZGVmaW5lIEZFQ19PQ19BVlJfUEFSTV9CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDI3CisjZGVmaW5lIEZFQ19PQ19BVlJfUEFSTV9CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBGRUNfT0NfQVZSX1BBUk1fQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBGRUNfT0NfQVZSX1BBUk1fQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgRkVDX09DX0FWUl9QQVJNX0JfUEFSTV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19BVlJfUEFSTV9CX1BBUk1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBGRUNfT0NfQVZSX1BBUk1fQl9QQVJNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBGRUNfT0NfQVZSX1BBUk1fQl9QQVJNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSBGRUNfT0NfQVZSX0FWR19MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAyOAorI2RlZmluZSBGRUNfT0NfQVZSX0FWR19MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19PQ19BVlJfQVZHX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19PQ19BVlJfQVZHX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfQVZSX0FWR19MT19BVkdfTE9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX0FWUl9BVkdfTE9fQVZHX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBGRUNfT0NfQVZSX0FWR19MT19BVkdfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBGRUNfT0NfQVZSX0FWR19MT19BVkdfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfQVZSX0FWR19ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAyOQorI2RlZmluZSBGRUNfT0NfQVZSX0FWR19ISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgRkVDX09DX0FWUl9BVkdfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIEZFQ19PQ19BVlJfQVZHX0hJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfQVZSX0FWR19ISV9BVkdfSElfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX0FWUl9BVkdfSElfQVZHX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIEZFQ19PQ19BVlJfQVZHX0hJX0FWR19ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBGRUNfT0NfQVZSX0FWR19ISV9BVkdfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfUkNOX01PREVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAyQworI2RlZmluZSBGRUNfT0NfUkNOX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgRkVDX09DX1JDTl9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lIEZFQ19PQ19SQ05fTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorCisjZGVmaW5lICAgRkVDX09DX1JDTl9NT0RFX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19SQ05fTU9ERV9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBGRUNfT0NfUkNOX01PREVfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgRkVDX09DX1JDTl9NT0RFX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorCisjZGVmaW5lIEZFQ19PQ19SQ05fT0NDX1NFVFRMRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDJECisjZGVmaW5lIEZFQ19PQ19SQ05fT0NDX1NFVFRMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgRkVDX09DX1JDTl9PQ0NfU0VUVExFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBGRUNfT0NfUkNOX09DQ19TRVRUTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgwCisKKyNkZWZpbmUgICBGRUNfT0NfUkNOX09DQ19TRVRUTEVfTEVWRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1JDTl9PQ0NfU0VUVExFX0xFVkVMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgICBGRUNfT0NfUkNOX09DQ19TRVRUTEVfTEVWRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSAgIEZFQ19PQ19SQ05fT0NDX1NFVFRMRV9MRVZFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgwCisKKyNkZWZpbmUgRkVDX09DX1JDTl9HQUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMkUKKyNkZWZpbmUgRkVDX09DX1JDTl9HQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEZFQ19PQ19SQ05fR0FJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIEZFQ19PQ19SQ05fR0FJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0dBSU5fR0FJTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1JDTl9HQUlOX0dBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEZFQ19PQ19SQ05fR0FJTl9HQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIEZFQ19PQ19SQ05fR0FJTl9HQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QworCisjZGVmaW5lIEZFQ19PQ19SQ05fQ1RMX1JBVEVfTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDMwCisjZGVmaW5lIEZFQ19PQ19SQ05fQ1RMX1JBVEVfTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgRkVDX09DX1JDTl9DVExfUkFURV9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgRkVDX09DX1JDTl9DVExfUkFURV9MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19SQ05fQ1RMX1JBVEVfTE9fQ1RMX0xPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0NUTF9SQVRFX0xPX0NUTF9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEZFQ19PQ19SQ05fQ1RMX1JBVEVfTE9fQ1RMX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEZFQ19PQ19SQ05fQ1RMX1JBVEVfTE9fQ1RMX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19SQ05fQ1RMX1JBVEVfSElfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDMxCisjZGVmaW5lIEZFQ19PQ19SQ05fQ1RMX1JBVEVfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBGRUNfT0NfUkNOX0NUTF9SQVRFX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgRkVDX09DX1JDTl9DVExfUkFURV9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0NUTF9SQVRFX0hJX0NUTF9ISV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1JDTl9DVExfUkFURV9ISV9DVExfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEZFQ19PQ19SQ05fQ1RMX1JBVEVfSElfQ1RMX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0NUTF9SQVRFX0hJX0NUTF9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisKKyNkZWZpbmUgRkVDX09DX1JDTl9DVExfU1RFUF9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMzIKKyNkZWZpbmUgRkVDX09DX1JDTl9DVExfU1RFUF9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBGRUNfT0NfUkNOX0NUTF9TVEVQX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBGRUNfT0NfUkNOX0NUTF9TVEVQX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1JDTl9DVExfU1RFUF9MT19DVExfTE9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19SQ05fQ1RMX1NURVBfTE9fQ1RMX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgRkVDX09DX1JDTl9DVExfU1RFUF9MT19DVExfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgRkVDX09DX1JDTl9DVExfU1RFUF9MT19DVExfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1JDTl9DVExfU1RFUF9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMzMKKyNkZWZpbmUgRkVDX09DX1JDTl9DVExfU1RFUF9ISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEZFQ19PQ19SQ05fQ1RMX1NURVBfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBGRUNfT0NfUkNOX0NUTF9TVEVQX0hJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lICAgRkVDX09DX1JDTl9DVExfU1RFUF9ISV9DVExfSElfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19SQ05fQ1RMX1NURVBfSElfQ1RMX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0NUTF9TVEVQX0hJX0NUTF9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgRkVDX09DX1JDTl9DVExfU1RFUF9ISV9DVExfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisKKyNkZWZpbmUgRkVDX09DX1JDTl9EVE9fT0ZTX0xPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMzQKKyNkZWZpbmUgRkVDX09DX1JDTl9EVE9fT0ZTX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBGRUNfT0NfUkNOX0RUT19PRlNfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBGRUNfT0NfUkNOX0RUT19PRlNfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fT0ZTX0xPX09GU19MT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19SQ05fRFRPX09GU19MT19PRlNfTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fT0ZTX0xPX09GU19MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fT0ZTX0xPX09GU19MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1JDTl9EVE9fT0ZTX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMzUKKyNkZWZpbmUgRkVDX09DX1JDTl9EVE9fT0ZTX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEZFQ19PQ19SQ05fRFRPX09GU19ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBGRUNfT0NfUkNOX0RUT19PRlNfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fT0ZTX0hJX09GU19ISV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19SQ05fRFRPX09GU19ISV9PRlNfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0RUT19PRlNfSElfT0ZTX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fT0ZTX0hJX09GU19ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1JDTl9EVE9fUkFURV9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMzYKKyNkZWZpbmUgRkVDX09DX1JDTl9EVE9fUkFURV9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBGRUNfT0NfUkNOX0RUT19SQVRFX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBGRUNfT0NfUkNOX0RUT19SQVRFX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fUkFURV9MT19PRlNfTE9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19SQ05fRFRPX1JBVEVfTE9fT0ZTX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fUkFURV9MT19PRlNfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fUkFURV9MT19PRlNfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1JDTl9EVE9fUkFURV9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMzcKKyNkZWZpbmUgRkVDX09DX1JDTl9EVE9fUkFURV9ISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEZFQ19PQ19SQ05fRFRPX1JBVEVfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBGRUNfT0NfUkNOX0RUT19SQVRFX0hJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fUkFURV9ISV9PRlNfSElfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19SQ05fRFRPX1JBVEVfSElfT0ZTX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0RUT19SQVRFX0hJX09GU19ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgRkVDX09DX1JDTl9EVE9fUkFURV9ISV9PRlNfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1JDTl9SQVRFX0NMSVBfTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMzgKKyNkZWZpbmUgRkVDX09DX1JDTl9SQVRFX0NMSVBfTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBGRUNfT0NfUkNOX1JBVEVfQ0xJUF9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBGRUNfT0NfUkNOX1JBVEVfQ0xJUF9MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1JDTl9SQVRFX0NMSVBfTE9fQ0xJUF9MT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19SQ05fUkFURV9DTElQX0xPX0NMSVBfTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgRkVDX09DX1JDTl9SQVRFX0NMSVBfTE9fQ0xJUF9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgRkVDX09DX1JDTl9SQVRFX0NMSVBfTE9fQ0xJUF9MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1JDTl9SQVRFX0NMSVBfSElfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwMzkKKyNkZWZpbmUgRkVDX09DX1JDTl9SQVRFX0NMSVBfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEZFQ19PQ19SQ05fUkFURV9DTElQX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBGRUNfT0NfUkNOX1JBVEVfQ0xJUF9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAKKworI2RlZmluZSAgIEZFQ19PQ19SQ05fUkFURV9DTElQX0hJX0NMSVBfSElfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfUkNOX1JBVEVfQ0xJUF9ISV9DTElQX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgRkVDX09DX1JDTl9SQVRFX0NMSVBfSElfQ0xJUF9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIEZFQ19PQ19SQ05fUkFURV9DTElQX0hJX0NMSVBfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAKKworI2RlZmluZSBGRUNfT0NfUkNOX0RZTl9SQVRFX0xPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAzQQorI2RlZmluZSBGRUNfT0NfUkNOX0RZTl9SQVRFX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIEZFQ19PQ19SQ05fRFlOX1JBVEVfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIEZFQ19PQ19SQ05fRFlOX1JBVEVfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0RZTl9SQVRFX0xPX1JBVEVfTE9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1JDTl9EWU5fUkFURV9MT19SQVRFX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0RZTl9SQVRFX0xPX1JBVEVfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0RZTl9SQVRFX0xPX1JBVEVfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfUkNOX0RZTl9SQVRFX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDAzQgorI2RlZmluZSBGRUNfT0NfUkNOX0RZTl9SQVRFX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgRkVDX09DX1JDTl9EWU5fUkFURV9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIEZFQ19PQ19SQ05fRFlOX1JBVEVfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0RZTl9SQVRFX0hJX1JBVEVfSElfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1JDTl9EWU5fUkFURV9ISV9SQVRFX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEZFQ19PQ19SQ05fRFlOX1JBVEVfSElfUkFURV9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBGRUNfT0NfUkNOX0RZTl9SQVRFX0hJX1JBVEVfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfU05DX01PREVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDA0MAorI2RlZmluZSBGRUNfT0NfU05DX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgRkVDX09DX1NOQ19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgRkVDX09DX1NOQ19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19TTkNfTU9ERV9VTkxPQ0tfRU5BQkxFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfU05DX01PREVfVU5MT0NLX0VOQUJMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX1NOQ19NT0RFX1VOTE9DS19FTkFCTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX09DX1NOQ19NT0RFX1VOTE9DS19FTkFCTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfU05DX01PREVfRVJST1JfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX1NOQ19NT0RFX0VSUk9SX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIEZFQ19PQ19TTkNfTU9ERV9FUlJPUl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NgorI2RlZmluZSAgIEZFQ19PQ19TTkNfTU9ERV9FUlJPUl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1NOQ19NT0RFX0NPUlJfRElTQUJMRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIEZFQ19PQ19TTkNfTU9ERV9DT1JSX0RJU0FCTEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfU05DX01PREVfQ09SUl9ESVNBQkxFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBGRUNfT0NfU05DX01PREVfQ09SUl9ESVNBQkxFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfU05DX0xXTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDA0MQorI2RlZmluZSBGRUNfT0NfU05DX0xXTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgRkVDX09DX1NOQ19MV01fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgRkVDX09DX1NOQ19MV01fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSAgIEZFQ19PQ19TTkNfTFdNX01BUktfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfU05DX0xXTV9NQVJLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgRkVDX09DX1NOQ19MV01fTUFSS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lICAgRkVDX09DX1NOQ19MV01fTUFSS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgRkVDX09DX1NOQ19IV01fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwNDIKKyNkZWZpbmUgRkVDX09DX1NOQ19IV01fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEZFQ19PQ19TTkNfSFdNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIEZFQ19PQ19TTkNfSFdNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1CisKKyNkZWZpbmUgICBGRUNfT0NfU05DX0hXTV9NQVJLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1NOQ19IV01fTUFSS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEZFQ19PQ19TTkNfSFdNX01BUktfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIEZFQ19PQ19TTkNfSFdNX01BUktfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NQorCisjZGVmaW5lIEZFQ19PQ19TTkNfVU5MT0NLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDQzCisjZGVmaW5lIEZFQ19PQ19TTkNfVU5MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBGRUNfT0NfU05DX1VOTE9DS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBGRUNfT0NfU05DX1VOTE9DS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX1NOQ19VTkxPQ0tfUkVTVEFSVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19TTkNfVU5MT0NLX1JFU1RBUlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfU05DX1VOTE9DS19SRVNUQVJUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfT0NfU05DX1VOTE9DS19SRVNUQVJUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfU05DX0xPQ0tfQ09VTlRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDA0NAorI2RlZmluZSBGRUNfT0NfU05DX0xPQ0tfQ09VTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEZFQ19PQ19TTkNfTE9DS19DT1VOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgRkVDX09DX1NOQ19MT0NLX0NPVU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19TTkNfTE9DS19DT1VOVF9DT1VOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfU05DX0xPQ0tfQ09VTlRfQ09VTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIEZFQ19PQ19TTkNfTE9DS19DT1VOVF9DT1VOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgRkVDX09DX1NOQ19MT0NLX0NPVU5UX0NPVU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX1NOQ19GQUlMX0NPVU5UX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwNDUKKyNkZWZpbmUgRkVDX09DX1NOQ19GQUlMX0NPVU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBGRUNfT0NfU05DX0ZBSUxfQ09VTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIEZFQ19PQ19TTkNfRkFJTF9DT1VOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfU05DX0ZBSUxfQ09VTlRfQ09VTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX1NOQ19GQUlMX0NPVU5UX0NPVU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBGRUNfT0NfU05DX0ZBSUxfQ09VTlRfQ09VTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIEZFQ19PQ19TTkNfRkFJTF9DT1VOVF9DT1VOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19TTkNfRkFJTF9QRVJJT0RfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDQ2CisjZGVmaW5lIEZFQ19PQ19TTkNfRkFJTF9QRVJJT0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgRkVDX09DX1NOQ19GQUlMX1BFUklPRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgRkVDX09DX1NOQ19GQUlMX1BFUklPRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDExNzEKKworI2RlZmluZSAgIEZFQ19PQ19TTkNfRkFJTF9QRVJJT0RfUEVSSU9EX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfU05DX0ZBSUxfUEVSSU9EX1BFUklPRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEZFQ19PQ19TTkNfRkFJTF9QRVJJT0RfUEVSSU9EX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEZFQ19PQ19TTkNfRkFJTF9QRVJJT0RfUEVSSU9EX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTE3MQorCisjZGVmaW5lIEZFQ19PQ19FTVNfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDQ3CisjZGVmaW5lIEZFQ19PQ19FTVNfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBGRUNfT0NfRU1TX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBGRUNfT0NfRU1TX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0VNU19NT0RFX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19FTVNfTU9ERV9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBGRUNfT0NfRU1TX01PREVfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBGRUNfT0NfRU1TX01PREVfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfSVBSX01PREVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDA0OAorI2RlZmluZSBGRUNfT0NfSVBSX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEZFQ19PQ19JUFJfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgRkVDX09DX0lQUl9NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9TRVJJQUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfU0VSSUFMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX1NFUklBTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX1NFUklBTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfUkVWRVJTRV9PUkRFUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX1JFVkVSU0VfT1JERVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9SRVZFUlNFX09SREVSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9SRVZFUlNFX09SREVSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01DTEtfRElTX0RBVF9BQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NQ0xLX0RJU19EQVRfQUJTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTUNMS19ESVNfREFUX0FCU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTUNMS19ESVNfREFUX0FCU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NQ0xLX0RJU19QQVJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTUNMS19ESVNfUEFSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01DTEtfRElTX1BBUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01DTEtfRElTX1BBUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTVZBTF9ESVNfUEFSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01WQUxfRElTX1BBUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NVkFMX0RJU19QQVJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTVZBTF9ESVNfUEFSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NRVJSX0RJU19QQVJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTUVSUl9ESVNfUEFSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01FUlJfRElTX1BBUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NRVJSX0RJU19QQVJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01EX0RJU19QQVJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NRF9ESVNfUEFSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTURfRElTX1BBUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01EX0RJU19QQVJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTUNMS19ESVNfRVJSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01DTEtfRElTX0VSUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NQ0xLX0RJU19FUlJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTUNMS19ESVNfRVJSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NVkFMX0RJU19FUlJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTVZBTF9ESVNfRVJSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01WQUxfRElTX0VSUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTVZBTF9ESVNfRVJSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NRVJSX0RJU19FUlJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTUVSUl9ESVNfRVJSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01FUlJfRElTX0VSUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTUVSUl9ESVNfRVJSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NRF9ESVNfRVJSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01EX0RJU19FUlJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NRF9ESVNfRVJSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwCisjZGVmaW5lICAgRkVDX09DX0lQUl9NT0RFX01EX0RJU19FUlJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTVNUUlRfRElTX0VSUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NU1RSVF9ESVNfRVJSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX01PREVfTVNUUlRfRElTX0VSUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwMAorI2RlZmluZSAgIEZFQ19PQ19JUFJfTU9ERV9NU1RSVF9ESVNfRVJSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19JUFJfSU5WRVJUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDQ5CisjZGVmaW5lIEZFQ19PQ19JUFJfSU5WRVJUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgRkVDX09DX0lQUl9JTlZFUlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBGRUNfT0NfSVBSX0lOVkVSVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQwX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01EMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01EMV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01EMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01EMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQzX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01EM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01ENF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQ0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01ENF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQ1X19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01ENV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQ1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQ2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01ENl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01EN19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRDdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUQ3X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01EN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUVSUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01FUlJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NRVJSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01FUlJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTVNUUlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01TVFJUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NU1RSVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMAorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01TVFJUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTVZBTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NVkFMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTVZBTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgICBGRUNfT0NfSVBSX0lOVkVSVF9NVkFMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01DTEtfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUNMS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19JUFJfSU5WRVJUX01DTEtfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwCisjZGVmaW5lICAgRkVDX09DX0lQUl9JTlZFUlRfTUNMS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX09DUl9NT0RFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwNTAKKyNkZWZpbmUgRkVDX09DX09DUl9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIEZFQ19PQ19PQ1JfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIEZFQ19PQ19PQ1JfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfT0NSX01PREVfTUJfU0VMRUNUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX09DUl9NT0RFX01CX1NFTEVDVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19PQ1JfTU9ERV9NQl9TRUxFQ1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIEZFQ19PQ19PQ1JfTU9ERV9NQl9TRUxFQ1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX09DUl9NT0RFX0dSQUJfRU5BQkxFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19PQ1JfTU9ERV9HUkFCX0VOQUJMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBGRUNfT0NfT0NSX01PREVfR1JBQl9FTkFCTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBGRUNfT0NfT0NSX01PREVfR1JBQl9FTkFCTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19PQ1JfTU9ERV9HUkFCX1NFTEVDVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBGRUNfT0NfT0NSX01PREVfR1JBQl9TRUxFQ1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX09DUl9NT0RFX0dSQUJfU0VMRUNUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgRkVDX09DX09DUl9NT0RFX0dSQUJfU0VMRUNUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfT0NSX01PREVfR1JBQl9DT1VOVEVEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgRkVDX09DX09DUl9NT0RFX0dSQUJfQ09VTlRFRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIEZFQ19PQ19PQ1JfTU9ERV9HUkFCX0NPVU5URURfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfTU9ERV9HUkFCX0NPVU5URURfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19PQ1JfUkFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDUxCisjZGVmaW5lIEZFQ19PQ19PQ1JfUkFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBGRUNfT0NfT0NSX1JBVEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBGRUNfT0NfT0NSX1JBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX09DUl9SQVRFX1JBVEVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfUkFURV9SQVRFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBGRUNfT0NfT0NSX1JBVEVfUkFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBGRUNfT0NfT0NSX1JBVEVfUkFURV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfT0NSX0lOVkVSVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDA1MgorI2RlZmluZSBGRUNfT0NfT0NSX0lOVkVSVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIEZFQ19PQ19PQ1JfSU5WRVJUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgRkVDX09DX09DUl9JTlZFUlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwMAorCisjZGVmaW5lICAgRkVDX09DX09DUl9JTlZFUlRfSU5WRVJUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfSU5WRVJUX0lOVkVSVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgRkVDX09DX09DUl9JTlZFUlRfSU5WRVJUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0lOVkVSVF9JTlZFUlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwMAorCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9DT1VOVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDUzCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9DT1VOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX0NPVU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX0NPVU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9DT1VOVF9DT1VOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfQ09VTlRfQ09VTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9DT1VOVF9DT1VOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9DT1VOVF9DT1VOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9TWU5DX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDU0CisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9TWU5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfU1lOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1NZTkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9TWU5DX0JZVEVfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfU1lOQ19CWVRFX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1NZTkNfQllURV9TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1NZTkNfQllURV9TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfU1lOQ19CSVRfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1NZTkNfQklUX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9TWU5DX0JJVF9TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NzgKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfU1lOQ19CSVRfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9TWU5DX1ZBTFVFX1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfU1lOQ19WQUxVRV9TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1NZTkNfVkFMVUVfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9TWU5DX1ZBTFVFX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9SRDBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDU1CisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9SRDBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1JEMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfUkQwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1JEMF9EQVRBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9SRDBfREFUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1JEMF9EQVRBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfUkQwX0RBVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfUkQxX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDA1NgorI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfUkQxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9SRDFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1JEMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9SRDFfREFUQV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfUkQxX0RBVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9SRDFfREFUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1JEMV9EQVRBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1JEMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwNTcKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1JEMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfUkQyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9SRDJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfUkQyX0RBVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1JEMl9EQVRBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfUkQyX0RBVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9SRDJfREFUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9SRDNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDQwMDU4CisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9SRDNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1JEM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfUkQzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1JEM19EQVRBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9SRDNfREFUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1JEM19EQVRBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfUkQzX0RBVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfUkQ0X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0MDA1OQorI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfUkQ0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9SRDRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1JENF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9SRDRfREFUQV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfUkQ0X0RBVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9SRDRfREFUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1JENF9EQVRBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1JENV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NDAwNUEKKyNkZWZpbmUgRkVDX09DX09DUl9HUkFCX1JENV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBGRUNfT0NfT0NSX0dSQUJfUkQ1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIEZFQ19PQ19PQ1JfR1JBQl9SRDVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfUkQ1X0RBVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgRkVDX09DX09DUl9HUkFCX1JENV9EQVRBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBGRUNfT0NfT0NSX0dSQUJfUkQ1X0RBVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSAgIEZFQ19PQ19PQ1JfR1JBQl9SRDVfREFUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIEZFQ19ESV9SQU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNDUwMDAwCisKKyNkZWZpbmUgRkVDX1JTX1JBTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI0NjAwMDAKKworI2RlZmluZSBGRUNfT0NfUkFNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ3MDAwMAorCisjZGVmaW5lIElRTV9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODAwMDAwCisjZGVmaW5lIElRTV9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODAwMDAyCisjZGVmaW5lIElRTV9DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSVFNX0NPTU1fTUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgSVFNX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgSVFNX0NPTU1fSU5UX1JFUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MDAwMDMKKyNkZWZpbmUgSVFNX0NPTU1fSU5UX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9DT01NX0lOVF9SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9DT01NX0lOVF9SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBJUU1fQ09NTV9JTlRfUkVRX0FGX1JFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX0NPTU1fSU5UX1JFUV9BRl9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9DT01NX0lOVF9SRVFfQUZfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9DT01NX0lOVF9SRVFfQUZfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgSVFNX0NPTU1fSU5UX1JFUV9DRl9SRVFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9DT01NX0lOVF9SRVFfQ0ZfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQ09NTV9JTlRfUkVRX0NGX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fQ09NTV9JTlRfUkVRX0NGX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgwMDAwNQorI2RlZmluZSBJUU1fQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIElRTV9DT01NX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIElRTV9DT01NX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIElRTV9DT01NX0lOVF9NU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODAwMDA2CisjZGVmaW5lIElRTV9DT01NX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSVFNX0NPTU1fSU5UX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgSVFNX0NPTU1fSU5UX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgSVFNX0NPTU1fSU5UX1NUTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MDAwMDcKKyNkZWZpbmUgSVFNX0NPTU1fSU5UX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBJUU1fQ09NTV9JTlRfU1RNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBJUU1fQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9GU19DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODIwMDAwCisjZGVmaW5lIElRTV9GU19DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fRlNfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fRlNfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9GU19DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9GU19DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9GU19DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9GU19DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODIwMDAyCisjZGVmaW5lIElRTV9GU19DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fRlNfQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fRlNfQ09NTV9NQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9GU19DT01NX01CX0NUTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBJUU1fRlNfQ09NTV9NQl9DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0ZTX0NPTU1fTUJfQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0ZTX0NPTU1fTUJfQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fRlNfQ09NTV9NQl9DVExfQ1RMX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fRlNfQ09NTV9NQl9DVExfQ1RMX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0ZTX0NPTU1fTUJfT0JTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9GU19DT01NX01CX09CU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fRlNfQ09NTV9NQl9PQlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fRlNfQ09NTV9NQl9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9GU19DT01NX01CX09CU19PQlNfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9GU19DT01NX01CX09CU19PQlNfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBJUU1fRlNfUkFURV9PRlNfTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgyMDAxMAorI2RlZmluZSBJUU1fRlNfUkFURV9PRlNfTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIElRTV9GU19SQVRFX09GU19MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIElRTV9GU19SQVRFX09GU19MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIElRTV9GU19SQVRFX09GU19ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODIwMDExCisjZGVmaW5lIElRTV9GU19SQVRFX09GU19ISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSVFNX0ZTX1JBVEVfT0ZTX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBJUU1fRlNfUkFURV9PRlNfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBJUU1fRlNfUkFURV9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgyMDAxMgorI2RlZmluZSBJUU1fRlNfUkFURV9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIElRTV9GU19SQVRFX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIElRTV9GU19SQVRFX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIElRTV9GU19SQVRFX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODIwMDEzCisjZGVmaW5lIElRTV9GU19SQVRFX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgSVFNX0ZTX1JBVEVfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBJUU1fRlNfUkFURV9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9GU19BREpfU0VMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODIwMDE0CisjZGVmaW5lIElRTV9GU19BREpfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fRlNfQURKX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fRlNfQURKX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9GU19BREpfU0VMX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9GU19BREpfU0VMX1FBTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9GU19BREpfU0VMX1ZTQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9GRF9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODMwMDAwCisjZGVmaW5lIElRTV9GRF9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fRkRfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fRkRfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9GRF9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9GRF9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9GRF9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9GRF9DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODMwMDAyCisjZGVmaW5lIElRTV9GRF9DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fRkRfQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fRkRfQ09NTV9NQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9GRF9DT01NX01CX0NUTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBJUU1fRkRfQ09NTV9NQl9DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0ZEX0NPTU1fTUJfQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0ZEX0NPTU1fTUJfQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fRkRfQ09NTV9NQl9DVExfQ1RMX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fRkRfQ09NTV9NQl9DVExfQ1RMX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0ZEX0NPTU1fTUJfT0JTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9GRF9DT01NX01CX09CU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fRkRfQ09NTV9NQl9PQlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fRkRfQ09NTV9NQl9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9GRF9DT01NX01CX09CU19PQlNfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9GRF9DT01NX01CX09CU19PQlNfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBJUU1fUkNfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0MDAwMAorI2RlZmluZSBJUU1fUkNfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVFNX1JDX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgSVFNX1JDX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fUkNfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fUkNfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBJUU1fUkNfQ09NTV9FWEVDX0hPTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBJUU1fUkNfQ09NTV9NQl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0MDAwMgorI2RlZmluZSBJUU1fUkNfQ09NTV9NQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVFNX1JDX0NPTU1fTUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgSVFNX1JDX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fUkNfQ09NTV9NQl9DVExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX1JDX0NPTU1fTUJfQ1RMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9SQ19DT01NX01CX0NUTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9SQ19DT01NX01CX0NUTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX1JDX0NPTU1fTUJfQ1RMX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX1JDX0NPTU1fTUJfQ1RMX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9SQ19DT01NX01CX09CU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fUkNfQ09NTV9NQl9PQlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX1JDX0NPTU1fTUJfT0JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX1JDX0NPTU1fTUJfT0JTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fUkNfQ09NTV9NQl9PQlNfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fUkNfQ09NTV9NQl9PQlNfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgSVFNX1JDX1JBVEVfT0ZTX0xPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NDAwMTAKKyNkZWZpbmUgSVFNX1JDX1JBVEVfT0ZTX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBJUU1fUkNfUkFURV9PRlNfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBJUU1fUkNfUkFURV9PRlNfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBJUU1fUkNfUkFURV9PRlNfSElfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0MDAxMQorI2RlZmluZSBJUU1fUkNfUkFURV9PRlNfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgSVFNX1JDX1JBVEVfT0ZTX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIElRTV9SQ19SQVRFX09GU19ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIElRTV9SQ19SQVRFX0xPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODQwMDEyCisjZGVmaW5lIElRTV9SQ19SQVRFX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSVFNX1JDX1JBVEVfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgSVFNX1JDX1JBVEVfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgSVFNX1JDX1JBVEVfSElfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NDAwMTMKKyNkZWZpbmUgSVFNX1JDX1JBVEVfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIElRTV9SQ19SQVRFX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBJUU1fUkNfUkFURV9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9SQ19BREpfU0VMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODQwMDE0CisjZGVmaW5lIElRTV9SQ19BREpfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fUkNfQURKX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fUkNfQURKX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9SQ19BREpfU0VMX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9SQ19BREpfU0VMX1FBTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9SQ19BREpfU0VMX1ZTQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9SQ19DUk9VVF9FTkFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODQwMDE1CisjZGVmaW5lIElRTV9SQ19DUk9VVF9FTkFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJUU1fUkNfQ1JPVVRfRU5BX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBJUU1fUkNfQ1JPVVRfRU5BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgSVFNX1JDX0NST1VUX0VOQV9FTkFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIElRTV9SQ19DUk9VVF9FTkFfRU5BX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fUkNfQ1JPVVRfRU5BX0VOQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBJUU1fUkNfQ1JPVVRfRU5BX0VOQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fUkNfU1RSRVRDSF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0MDAxNgorI2RlZmluZSBJUU1fUkNfU1RSRVRDSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgSVFNX1JDX1NUUkVUQ0hfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lIElRTV9SQ19TVFJFVENIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgSVFNX1JDX1NUUkVUQ0hfUUFNX0JfNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRQorI2RlZmluZSAgIElRTV9SQ19TVFJFVENIX1FBTV9CXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMKKyNkZWZpbmUgICBJUU1fUkNfU1RSRVRDSF9BVFYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKworI2RlZmluZSBJUU1fUlRfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg1MDAwMAorI2RlZmluZSBJUU1fUlRfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVFNX1JUX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgSVFNX1JUX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fUlRfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fUlRfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBJUU1fUlRfQ09NTV9FWEVDX0hPTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBJUU1fUlRfQ09NTV9NQl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg1MDAwMgorI2RlZmluZSBJUU1fUlRfQ09NTV9NQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVFNX1JUX0NPTU1fTUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgSVFNX1JUX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fUlRfQ09NTV9NQl9DVExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX1JUX0NPTU1fTUJfQ1RMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9SVF9DT01NX01CX0NUTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9SVF9DT01NX01CX0NUTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX1JUX0NPTU1fTUJfQ1RMX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX1JUX0NPTU1fTUJfQ1RMX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9SVF9DT01NX01CX09CU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fUlRfQ09NTV9NQl9PQlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX1JUX0NPTU1fTUJfT0JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX1JUX0NPTU1fTUJfT0JTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fUlRfQ09NTV9NQl9PQlNfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fUlRfQ09NTV9NQl9PQlNfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgSVFNX1JUX0FDVElWRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NTAwMTAKKyNkZWZpbmUgSVFNX1JUX0FDVElWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9SVF9BQ1RJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9SVF9BQ1RJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBJUU1fUlRfQUNUSVZFX0FDVElWRV9SVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX1JUX0FDVElWRV9BQ1RJVkVfUlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9SVF9BQ1RJVkVfQUNUSVZFX1JUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9SVF9BQ1RJVkVfQUNUSVZFX1JUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX1JUX0FDVElWRV9BQ1RJVkVfUlRfQVRWX0ZDUl9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX1JUX0FDVElWRV9BQ1RJVkVfUlRfQVRWX0ZDUl9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgSVFNX1JUX0FDVElWRV9BQ1RJVkVfQ1JfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9SVF9BQ1RJVkVfQUNUSVZFX0NSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fUlRfQUNUSVZFX0FDVElWRV9DUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fUlRfQUNUSVZFX0FDVElWRV9DUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9SVF9BQ1RJVkVfQUNUSVZFX0NSX0FUVl9DUl9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9SVF9BQ1RJVkVfQUNUSVZFX0NSX0FUVl9DUl9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBJUU1fUlRfTE9fSU5DUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg1MDAxMQorI2RlZmluZSBJUU1fUlRfTE9fSU5DUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIElRTV9SVF9MT19JTkNSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgSVFNX1JUX0xPX0lOQ1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDU4OAorI2RlZmluZSAgIElRTV9SVF9MT19JTkNSX0ZNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9SVF9MT19JTkNSX01OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTg4CisKKyNkZWZpbmUgSVFNX1JUX1JPVF9CUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NTAwMTIKKyNkZWZpbmUgSVFNX1JUX1JPVF9CUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9SVF9ST1RfQlBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9SVF9ST1RfQlBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBJUU1fUlRfUk9UX0JQX1JPVF9PRkZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX1JUX1JPVF9CUF9ST1RfT0ZGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9SVF9ST1RfQlBfUk9UX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9SVF9ST1RfQlBfUk9UX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX1JUX1JPVF9CUF9ST1RfT0ZGX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX1JUX1JPVF9CUF9ST1RfT0ZGX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgSVFNX1JUX1JPVF9CUF9ST1RfQlBGX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9SVF9ST1RfQlBfUk9UX0JQRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fUlRfUk9UX0JQX1JPVF9CUEZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fUlRfUk9UX0JQX1JPVF9CUEZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fUlRfTFBfQlBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg1MDAxMworI2RlZmluZSBJUU1fUlRfTFBfQlBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVFNX1JUX0xQX0JQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgSVFNX1JUX0xQX0JQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fUlRfREVMQVlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg1MDAxNAorI2RlZmluZSBJUU1fUlRfREVMQVlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSVFNX1JUX0RFTEFZX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIElRTV9SVF9ERUxBWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NQorCisjZGVmaW5lIElRTV9DRl9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDAwCisjZGVmaW5lIElRTV9DRl9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fQ0ZfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fQ0ZfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9DRl9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9DRl9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9DRl9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9DRl9DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDAyCisjZGVmaW5lIElRTV9DRl9DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fQ0ZfQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fQ0ZfQ09NTV9NQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9DRl9DT01NX01CX0NUTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBJUU1fQ0ZfQ09NTV9NQl9DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0NGX0NPTU1fTUJfQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0NGX0NPTU1fTUJfQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQ0ZfQ09NTV9NQl9DVExfQ1RMX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQ0ZfQ09NTV9NQl9DVExfQ1RMX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0NGX0NPTU1fTUJfT0JTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9DRl9DT01NX01CX09CU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQ0ZfQ09NTV9NQl9PQlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fQ0ZfQ09NTV9NQl9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9DRl9DT01NX01CX09CU19PQlNfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9DRl9DT01NX01CX09CU19PQlNfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBJUU1fQ0ZfQ09NTV9JTlRfUkVRX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAwMworI2RlZmluZSBJUU1fQ0ZfQ09NTV9JTlRfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVFNX0NGX0NPTU1fSU5UX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgSVFNX0NGX0NPTU1fSU5UX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgSVFNX0NGX0NPTU1fSU5UX1NUQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwMDUKKyNkZWZpbmUgSVFNX0NGX0NPTU1fSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElRTV9DRl9DT01NX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIElRTV9DRl9DT01NX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgSVFNX0NGX0NPTU1fSU5UX1NUQV9QTV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIElRTV9DRl9DT01NX0lOVF9TVEFfUE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQ0ZfQ09NTV9JTlRfU1RBX1BNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBJUU1fQ0ZfQ09NTV9JTlRfU1RBX1BNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fQ0ZfQ09NTV9JTlRfTVNLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAwNgorI2RlZmluZSBJUU1fQ0ZfQ09NTV9JTlRfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVFNX0NGX0NPTU1fSU5UX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgSVFNX0NGX0NPTU1fSU5UX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fQ0ZfQ09NTV9JTlRfTVNLX1BNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX0NGX0NPTU1fSU5UX01TS19QTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9DRl9DT01NX0lOVF9NU0tfUE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9DRl9DT01NX0lOVF9NU0tfUE1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9DRl9DT01NX0lOVF9TVE1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDA3CisjZGVmaW5lIElRTV9DRl9DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJUU1fQ0ZfQ09NTV9JTlRfU1RNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBJUU1fQ0ZfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9DRl9DT01NX0lOVF9TVE1fUE1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBJUU1fQ0ZfQ09NTV9JTlRfU1RNX1BNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0NGX0NPTU1fSU5UX1NUTV9QTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0NGX0NPTU1fSU5UX1NUTV9QTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0NGX1NZTU1FVFJJQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwMTAKKyNkZWZpbmUgSVFNX0NGX1NZTU1FVFJJQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9DRl9TWU1NRVRSSUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9DRl9TWU1NRVRSSUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBJUU1fQ0ZfU1lNTUVUUklDX1JFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX0NGX1NZTU1FVFJJQ19SRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9DRl9TWU1NRVRSSUNfUkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9DRl9TWU1NRVRSSUNfUkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgSVFNX0NGX1NZTU1FVFJJQ19JTV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9DRl9TWU1NRVRSSUNfSU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQ0ZfU1lNTUVUUklDX0lNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fQ0ZfU1lNTUVUUklDX0lNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fQ0ZfTUlEVEFQX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAxMQorI2RlZmluZSBJUU1fQ0ZfTUlEVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVFNX0NGX01JRFRBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgSVFNX0NGX01JRFRBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSAgIElRTV9DRl9NSURUQVBfUkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBJUU1fQ0ZfTUlEVEFQX1JFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0NGX01JRFRBUF9SRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0NGX01JRFRBUF9SRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBJUU1fQ0ZfTUlEVEFQX0lNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0NGX01JRFRBUF9JTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9DRl9NSURUQVBfSU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIElRTV9DRl9NSURUQVBfSU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9DRl9PVVRfRU5BX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDEyCisjZGVmaW5lIElRTV9DRl9PVVRfRU5BX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBJUU1fQ0ZfT1VUX0VOQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSBJUU1fQ0ZfT1VUX0VOQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgSVFNX0NGX09VVF9FTkFfQVRWX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIElRTV9DRl9PVVRfRU5BX0FUVl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQ0ZfT1VUX0VOQV9BVFZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBJUU1fQ0ZfT1VUX0VOQV9BVFZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIElRTV9DRl9PVVRfRU5BX1FBTV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQ0ZfT1VUX0VOQV9RQU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0NGX09VVF9FTkFfUUFNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX0NGX09VVF9FTkFfUUFNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBJUU1fQ0ZfT1VUX0VOQV9WU0JfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgSVFNX0NGX09VVF9FTkFfVlNCX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9DRl9PVVRfRU5BX1ZTQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIElRTV9DRl9PVVRfRU5BX1ZTQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9DRl9BREpfU0VMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDEzCisjZGVmaW5lIElRTV9DRl9BREpfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fQ0ZfQURKX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fQ0ZfQURKX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBJUU1fQ0ZfU0NBTEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAxNAorI2RlZmluZSBJUU1fQ0ZfU0NBTEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIElRTV9DRl9TQ0FMRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lIElRTV9DRl9TQ0FMRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKworI2RlZmluZSBJUU1fQ0ZfU0NBTEVfU0hfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAxNQorI2RlZmluZSBJUU1fQ0ZfU0NBTEVfU0hfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVFNX0NGX1NDQUxFX1NIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgSVFNX0NGX1NDQUxFX1NIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fQ0ZfQU1QX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAxNgorI2RlZmluZSBJUU1fQ0ZfQU1QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIElRTV9DRl9BTVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lIElRTV9DRl9BTVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0NGX1BPV19NRUFTX0xFTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwMTcKKyNkZWZpbmUgSVFNX0NGX1BPV19NRUFTX0xFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIElRTV9DRl9QT1dfTUVBU19MRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIElRTV9DRl9QT1dfTUVBU19MRU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX0NGX1BPV19NRUFTX0xFTl9RQU1fQl82NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0NGX1BPV19NRUFTX0xFTl9RQU1fQl8yNTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgSVFNX0NGX1BPV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwMTgKKyNkZWZpbmUgSVFNX0NGX1BPV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBJUU1fQ0ZfUE9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBJUU1fQ0ZfUE9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAyMAorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDIxCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwMjIKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIElRTV9DRl9UQVBfUkUyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAyMworI2RlZmluZSBJUU1fQ0ZfVEFQX1JFM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkU0X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDI0CisjZGVmaW5lIElRTV9DRl9UQVBfUkU0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBJUU1fQ0ZfVEFQX1JFNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwMjUKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIElRTV9DRl9UQVBfUkU1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAyNgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIElRTV9DRl9UQVBfUkU2X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkU3X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDI3CisjZGVmaW5lIElRTV9DRl9UQVBfUkU3X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkU3X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkU4X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDI4CisjZGVmaW5lIElRTV9DRl9UQVBfUkU4X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkU4X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkU5X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDI5CisjZGVmaW5lIElRTV9DRl9UQVBfUkU5X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkU5X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDJBCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDJCCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDJDCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDJECisjZGVmaW5lIElRTV9DRl9UQVBfUkUxM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDJFCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDJGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDMwCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDMxCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDMyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxOF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMThfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDMzCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMTlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUxOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDM0CisjZGVmaW5lIElRTV9DRl9UQVBfUkUyMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDM1CisjZGVmaW5lIElRTV9DRl9UQVBfUkUyMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTIxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAzNgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTIyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTIzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwMzcKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTIzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDM4CisjZGVmaW5lIElRTV9DRl9UQVBfUkUyNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTI0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDAzOQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTI1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTI2X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwM0EKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTI2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDNCCisjZGVmaW5lIElRTV9DRl9UQVBfUkUyN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSVFNX0NGX1RBUF9SRTI3X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBJUU1fQ0ZfVEFQX1JFMjdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDA0MAorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0wX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDQxCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwNDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIElRTV9DRl9UQVBfSU0yX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDA0MworI2RlZmluZSBJUU1fQ0ZfVEFQX0lNM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU00X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDQ0CisjZGVmaW5lIElRTV9DRl9UQVBfSU00X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBJUU1fQ0ZfVEFQX0lNNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwNDUKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIElRTV9DRl9UQVBfSU01X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDA0NgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIElRTV9DRl9UQVBfSU02X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU03X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDQ3CisjZGVmaW5lIElRTV9DRl9UQVBfSU03X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU03X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU04X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDQ4CisjZGVmaW5lIElRTV9DRl9UQVBfSU04X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU04X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU05X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDQ5CisjZGVmaW5lIElRTV9DRl9UQVBfSU05X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU05X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDRBCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDRCCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDRDCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDRECisjZGVmaW5lIElRTV9DRl9UQVBfSU0xM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDRFCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDRGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDUwCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDUxCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDUyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xOF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMThfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDUzCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMTlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0xOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDU0CisjZGVmaW5lIElRTV9DRl9UQVBfSU0yMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDU1CisjZGVmaW5lIElRTV9DRl9UQVBfSU0yMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTIxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDA1NgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTIyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTIzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwNTcKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTIzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDU4CisjZGVmaW5lIElRTV9DRl9UQVBfSU0yNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTI0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2MDA1OQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTI1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTI2X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjAwNUEKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTI2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwMDVCCisjZGVmaW5lIElRTV9DRl9UQVBfSU0yN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgSVFNX0NGX1RBUF9JTTI3X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBJUU1fQ0ZfVEFQX0lNMjdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9BRl9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDAwCisjZGVmaW5lIElRTV9BRl9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fQUZfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fQUZfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9BRl9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9BRl9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9BRl9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIElRTV9BRl9DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDAyCisjZGVmaW5lIElRTV9BRl9DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBJUU1fQUZfQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgSVFNX0FGX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9NQl9DVExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fTUJfQ1RMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9BRl9DT01NX01CX0NUTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9BRl9DT01NX01CX0NUTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX0NPTU1fTUJfQ1RMX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX0NPTU1fTUJfQ1RMX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9BRl9DT01NX01CX09CU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9NQl9PQlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fTUJfT0JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fTUJfT0JTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfQ09NTV9NQl9PQlNfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfQ09NTV9NQl9PQlNfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fTUJfTVVYX0NUUkxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIElRTV9BRl9DT01NX01CX01VWF9DVFJMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9NQl9NVVhfQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fTUJfTVVYX0NUUkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfQ09NTV9NQl9NVVhfQ1RSTF9BRl9EQVRBX0lOUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfQ09NTV9NQl9NVVhfQ1RSTF9TRU5TRV9JTlBVVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBJUU1fQUZfQ09NTV9NQl9NVVhfQ1RSTF9BRl9EQVRBX09VVFBVVCAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgICBJUU1fQUZfQ09NTV9NQl9NVVhfQ1RSTF9JRl9BR0NfT1VUUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisjZGVmaW5lICAgICBJUU1fQUZfQ09NTV9NQl9NVVhfQ1RSTF9SRl9BR0NfT1VUUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIElRTV9BRl9DT01NX01CX01VWF9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9NQl9NVVhfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fTUJfTVVYX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhFMAorI2RlZmluZSAgIElRTV9BRl9DT01NX01CX01VWF9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX0NPTU1fTUJfTVVYX09CU19BRl9EQVRBX0lOUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX0NPTU1fTUJfTVVYX09CU19TRU5TRV9JTlBVVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICAgIElRTV9BRl9DT01NX01CX01VWF9PQlNfQUZfREFUQV9PVVRQVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgICBJUU1fQUZfQ09NTV9NQl9NVVhfT0JTX0lGX0FHQ19PVVRQVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2MAorI2RlZmluZSAgICAgSVFNX0FGX0NPTU1fTUJfTVVYX09CU19SRl9BR0NfT1VUUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKworI2RlZmluZSBJUU1fQUZfQ09NTV9JTlRfUkVRX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAwMworI2RlZmluZSBJUU1fQUZfQ09NTV9JTlRfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVFNX0FGX0NPTU1fSU5UX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgSVFNX0FGX0NPTU1fSU5UX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgSVFNX0FGX0NPTU1fSU5UX1NUQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMDUKKyNkZWZpbmUgSVFNX0FGX0NPTU1fSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9BRl9DT01NX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9BRl9DT01NX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fSU5UX1NUQV9DTFBfSU5UX1NUQV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIElRTV9BRl9DT01NX0lOVF9TVEFfQ0xQX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9JTlRfU1RBX0NMUF9JTlRfU1RBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9JTlRfU1RBX0NMUF9JTlRfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9JTlRfU1RBX1NOU19JTlRfU1RBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fSU5UX1NUQV9TTlNfSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9BRl9DT01NX0lOVF9TVEFfU05TX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIElRTV9BRl9DT01NX0lOVF9TVEFfU05TX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9BRl9DT01NX0lOVF9NU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDA2CisjZGVmaW5lIElRTV9BRl9DT01NX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fQUZfQ09NTV9JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fQUZfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9BRl9DT01NX0lOVF9NU0tfQ0xQX0lOVF9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9JTlRfTVNLX0NMUF9JTlRfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fSU5UX01TS19DTFBfSU5UX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fSU5UX01TS19DTFBfSU5UX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fSU5UX01TS19TTlNfSU5UX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9BRl9DT01NX0lOVF9NU0tfU05TX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9JTlRfTVNLX1NOU19JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9JTlRfTVNLX1NOU19JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fQUZfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAwNworI2RlZmluZSBJUU1fQUZfQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgSVFNX0FGX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgSVFNX0FGX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9JTlRfU1RNX0NMUF9JTlRfU1RBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fSU5UX1NUTV9DTFBfSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9BRl9DT01NX0lOVF9TVE1fQ0xQX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9BRl9DT01NX0lOVF9TVE1fQ0xQX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9BRl9DT01NX0lOVF9TVE1fU05TX0lOVF9TVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQ09NTV9JTlRfU1RNX1NOU19JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fSU5UX1NUTV9TTlNfSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX0FGX0NPTU1fSU5UX1NUTV9TTlNfSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX0ZEQl9TRUxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTAKKyNkZWZpbmUgSVFNX0FGX0ZEQl9TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElRTV9BRl9GREJfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIElRTV9BRl9GREJfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX0lOVkVYVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTEKKyNkZWZpbmUgSVFNX0FGX0lOVkVYVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElRTV9BRl9JTlZFWFRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIElRTV9BRl9JTlZFWFRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIElRTV9BRl9DTEtORUdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDEyCisjZGVmaW5lIElRTV9BRl9DTEtORUdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBJUU1fQUZfQ0xLTkVHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBJUU1fQUZfQ0xLTkVHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgSVFNX0FGX0NMS05FR19DTEtORUdQRUFLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIElRTV9BRl9DTEtORUdfQ0xLTkVHUEVBS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQ0xLTkVHX0NMS05FR1BFQUtfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBJUU1fQUZfQ0xLTkVHX0NMS05FR1BFQUtfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9BRl9DTEtORUdfQ0xLTkVHUEVBS19DTEtfQURDX1BFQUtfUE9TICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9BRl9DTEtORUdfQ0xLTkVHUEVBS19DTEtfQURDX1BFQUtfTkVHICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIElRTV9BRl9DTEtORUdfQ0xLTkVHREFUQV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQ0xLTkVHX0NMS05FR0RBVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0FGX0NMS05FR19DTEtORUdEQVRBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX0FGX0NMS05FR19DTEtORUdEQVRBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfQ0xLTkVHX0NMS05FR0RBVEFfQ0xLX0FEQ19EQVRBX1BPUyAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfQ0xLTkVHX0NMS05FR0RBVEFfQ0xLX0FEQ19EQVRBX05FRyAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgSVFNX0FGX01PTl9JTl9NVVhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTMKKyNkZWZpbmUgSVFNX0FGX01PTl9JTl9NVVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9BRl9NT05fSU5fTVVYX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9BRl9NT05fSU5fTVVYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTQKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBJUU1fQUZfTU9OX0lONV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIElRTV9BRl9NT05fSU41X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTUKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBJUU1fQUZfTU9OX0lONF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIElRTV9BRl9NT05fSU40X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTYKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBJUU1fQUZfTU9OX0lOM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIElRTV9BRl9NT05fSU4zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTcKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBJUU1fQUZfTU9OX0lOMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIElRTV9BRl9NT05fSU4yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTgKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBJUU1fQUZfTU9OX0lOMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIElRTV9BRl9NT05fSU4xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMTkKKyNkZWZpbmUgSVFNX0FGX01PTl9JTjBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBJUU1fQUZfTU9OX0lOMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIElRTV9BRl9NT05fSU4wX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX01PTl9JTl9WQUxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMUEKKyNkZWZpbmUgSVFNX0FGX01PTl9JTl9WQUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElRTV9BRl9NT05fSU5fVkFMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIElRTV9BRl9NT05fSU5fVkFMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX1NUQVJUX0xPQ0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMUIKKyNkZWZpbmUgSVFNX0FGX1NUQVJUX0xPQ0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElRTV9BRl9TVEFSVF9MT0NLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIElRTV9BRl9TVEFSVF9MT0NLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX1BIQVNFMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMUMKKyNkZWZpbmUgSVFNX0FGX1BIQVNFMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIElRTV9BRl9QSEFTRTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBJUU1fQUZfUEhBU0UwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9BRl9QSEFTRTFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDFECisjZGVmaW5lIElRTV9BRl9QSEFTRTFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBJUU1fQUZfUEhBU0UxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgSVFNX0FGX1BIQVNFMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fQUZfUEhBU0UyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAxRQorI2RlZmluZSBJUU1fQUZfUEhBU0UyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgSVFNX0FGX1BIQVNFMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIElRTV9BRl9QSEFTRTJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX1NDVV9QSEFTRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMUYKKyNkZWZpbmUgSVFNX0FGX1NDVV9QSEFTRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9BRl9TQ1VfUEhBU0VfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9BRl9TQ1VfUEhBU0VfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX1NZTkNfU0VMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMjAKKyNkZWZpbmUgSVFNX0FGX1NZTkNfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9BRl9TWU5DX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9BRl9TWU5DX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIElRTV9BRl9BRENfQ09ORl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDIxCisjZGVmaW5lIElRTV9BRl9BRENfQ09ORl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBJUU1fQUZfQURDX0NPTkZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBJUU1fQUZfQURDX0NPTkZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgSVFNX0FGX0FEQ19DT05GX0FEQ19TSUdOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIElRTV9BRl9BRENfQ09ORl9BRENfU0lHTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQURDX0NPTkZfQURDX1NJR05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBJUU1fQUZfQURDX0NPTkZfQURDX1NJR05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9BRl9BRENfQ09ORl9BRENfU0lHTl9BRENfU0lHTkVEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9BRl9BRENfQ09ORl9BRENfU0lHTl9BRENfVU5TSUdORUQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIElRTV9BRl9BRENfQ09ORl9CSVRSRVZFUlNFX0FEQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQURDX0NPTkZfQklUUkVWRVJTRV9BRENfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0FGX0FEQ19DT05GX0JJVFJFVkVSU0VfQURDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgSVFNX0FGX0FEQ19DT05GX0JJVFJFVkVSU0VfQURDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfQURDX0NPTkZfQklUUkVWRVJTRV9BRENfQURDX05PUk1BTCAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfQURDX0NPTkZfQklUUkVWRVJTRV9BRENfQURDX0JJVFJFVkVSU0VEICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBJUU1fQUZfQURDX0NPTkZfQklUUkVWRVJTRV9OU1NJX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgSVFNX0FGX0FEQ19DT05GX0JJVFJFVkVSU0VfTlNTSV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9BRl9BRENfQ09ORl9CSVRSRVZFUlNFX05TU0lfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIElRTV9BRl9BRENfQ09ORl9CSVRSRVZFUlNFX05TU0lfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX0FEQ19DT05GX0JJVFJFVkVSU0VfTlNTSV9JRkFHQ19EQUNfTk9STUFMICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX0FEQ19DT05GX0JJVFJFVkVSU0VfTlNTSV9JRkFHQ19EQUNfQklUUkVWRVJTRUQgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgSVFNX0FGX0FEQ19DT05GX0JJVFJFVkVSU0VfTlNTUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIElRTV9BRl9BRENfQ09ORl9CSVRSRVZFUlNFX05TU1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfQURDX0NPTkZfQklUUkVWRVJTRV9OU1NSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBJUU1fQUZfQURDX0NPTkZfQklUUkVWRVJTRV9OU1NSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9BRl9BRENfQ09ORl9CSVRSRVZFUlNFX05TU1JfUkZBR0NfREFDX05PUk1BTCAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9BRl9BRENfQ09ORl9CSVRSRVZFUlNFX05TU1JfUkZBR0NfREFDX0JJVFJFVkVSU0VEICAgICAgICAgICAweDgKKworI2RlZmluZSBJUU1fQUZfQ0xQX0NMSVBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAyMgorI2RlZmluZSBJUU1fQUZfQ0xQX0NMSVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIElRTV9BRl9DTFBfQ0xJUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIElRTV9BRl9DTFBfQ0xJUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX0NMUF9MRU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMjMKKyNkZWZpbmUgSVFNX0FGX0NMUF9MRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBJUU1fQUZfQ0xQX0xFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBJUU1fQUZfQ0xQX0xFTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9BRl9DTFBfTEVOX1FBTV9CXzY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwCisjZGVmaW5lICAgSVFNX0FGX0NMUF9MRU5fUUFNX0JfMjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgICBJUU1fQUZfQ0xQX0xFTl9BVFYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fQUZfQ0xQX1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAyNAorI2RlZmluZSBJUU1fQUZfQ0xQX1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgSVFNX0FGX0NMUF9USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBJUU1fQUZfQ0xQX1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIElRTV9BRl9DTFBfVEhfUUFNX0JfNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBJUU1fQUZfQ0xQX1RIX1FBTV9CXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgSVFNX0FGX0NMUF9USF9BVFYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzAKKworI2RlZmluZSBJUU1fQUZfRENGX0JZUEFTU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAyNQorI2RlZmluZSBJUU1fQUZfRENGX0JZUEFTU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSVFNX0FGX0RDRl9CWVBBU1NfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgSVFNX0FGX0RDRl9CWVBBU1NfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fQUZfRENGX0JZUEFTU19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fQUZfRENGX0JZUEFTU19CWVBBU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSBJUU1fQUZfU05TX0xFTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAyNgorI2RlZmluZSBJUU1fQUZfU05TX0xFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIElRTV9BRl9TTlNfTEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIElRTV9BRl9TTlNfTEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgSVFNX0FGX1NOU19MRU5fUUFNX0JfNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgICBJUU1fQUZfU05TX0xFTl9RQU1fQl8yNTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMAorI2RlZmluZSAgIElRTV9BRl9TTlNfTEVOX0FUViAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9BRl9TTlNfU0VOU0VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDI3CisjZGVmaW5lIElRTV9BRl9TTlNfU0VOU0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgSVFNX0FGX1NOU19TRU5TRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgSVFNX0FGX1NOU19TRU5TRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBJUU1fQUZfQUdDX0lGX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAyOAorI2RlZmluZSBJUU1fQUZfQUdDX0lGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIElRTV9BRl9BR0NfSUZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIElRTV9BRl9BR0NfSUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX0FHQ19SRl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMjkKKyNkZWZpbmUgSVFNX0FGX0FHQ19SRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBJUU1fQUZfQUdDX1JGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBJUU1fQUZfQUdDX1JGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9BRl9QR0FfR0FJTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDJBCisjZGVmaW5lIElRTV9BRl9QR0FfR0FJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBJUU1fQUZfUEdBX0dBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBJUU1fQUZfUEdBX0dBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9BRl9QRFJFRl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODcwMDJCCisjZGVmaW5lIElRTV9BRl9QRFJFRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBJUU1fQUZfUERSRUZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUYKKyNkZWZpbmUgSVFNX0FGX1BEUkVGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBJUU1fQUZfUERSRUZfUUFNX0JfNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBJUU1fQUZfUERSRUZfUUFNX0JfMjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBJUU1fQUZfUERSRUZfQVRWICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKworI2RlZmluZSBJUU1fQUZfU1REQllfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MDAyQworI2RlZmluZSBJUU1fQUZfU1REQllfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgSVFNX0FGX1NUREJZX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIElRTV9BRl9TVERCWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBJUU1fQUZfU1REQllfU1REQllfQklBU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX0FGX1NUREJZX1NUREJZX0JJQVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9CSUFTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9CSUFTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX0JJQVNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX0JJQVNfU1RBTkRCWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgSVFNX0FGX1NUREJZX1NUREJZX0FEQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9BRENfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfU1REQllfU1REQllfQURDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBJUU1fQUZfU1REQllfU1REQllfQURDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9BRl9TVERCWV9TVERCWV9BRENfQTFfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIElRTV9BRl9TVERCWV9TVERCWV9BRENfQTFfU1RBTkRCWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIElRTV9BRl9TVERCWV9TVERCWV9BRENfQTJfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIElRTV9BRl9TVERCWV9TVERCWV9BRENfQTJfU1RBTkRCWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9BTVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBJUU1fQUZfU1REQllfU1REQllfQU1QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0FGX1NUREJZX1NUREJZX0FNUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgSVFNX0FGX1NUREJZX1NUREJZX0FNUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfU1REQllfU1REQllfQU1QX0ExX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfU1REQllfU1REQllfQU1QX0ExX1NUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBJUU1fQUZfU1REQllfU1REQllfQU1QX0EyX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBJUU1fQUZfU1REQllfU1REQllfQU1QX0EyX1NUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBJUU1fQUZfU1REQllfU1REQllfUERfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgSVFNX0FGX1NUREJZX1NUREJZX1BEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9QRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9QRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX1BEX0ExX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX1BEX0ExX1NUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX1BEX0EyX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX1BEX0EyX1NUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgSVFNX0FGX1NUREJZX1NUREJZX1RBR0NfSUZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9UQUdDX0lGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBJUU1fQUZfU1REQllfU1REQllfVEFHQ19JRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgSVFNX0FGX1NUREJZX1NUREJZX1RBR0NfSUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfU1REQllfU1REQllfVEFHQ19JRl9BMV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBJUU1fQUZfU1REQllfU1REQllfVEFHQ19JRl9BMV9TVEFOREJZICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX1RBR0NfSUZfQTJfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICAgIElRTV9BRl9TVERCWV9TVERCWV9UQUdDX0lGX0EyX1NUQU5EQlkgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9UQUdDX1JGX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBJUU1fQUZfU1REQllfU1REQllfVEFHQ19SRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgSVFNX0FGX1NUREJZX1NUREJZX1RBR0NfUkZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIElRTV9BRl9TVERCWV9TVERCWV9UQUdDX1JGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX1RBR0NfUkZfQTFfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgSVFNX0FGX1NUREJZX1NUREJZX1RBR0NfUkZfQTFfU1RBTkRCWSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICAgIElRTV9BRl9TVERCWV9TVERCWV9UQUdDX1JGX0EyX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgICBJUU1fQUZfU1REQllfU1REQllfVEFHQ19SRl9BMl9TVEFOREJZICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX0FNVVhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMkQKKyNkZWZpbmUgSVFNX0FGX0FNVVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIElRTV9BRl9BTVVYX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIElRTV9BRl9BTVVYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgSVFNX0FGX1RTVF9BRkVNQUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzAwMkUKKyNkZWZpbmUgSVFNX0FGX1RTVF9BRkVNQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIElRTV9BRl9UU1RfQUZFTUFJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBJUU1fQUZfVFNUX0FGRU1BSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIElRTV9SVF9SQU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODgwMDAwCisKKyNkZWZpbmUgICBJUU1fUlRfUkFNX0RMWV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgSVFNX1JUX1JBTV9ETFlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgICBJUU1fUlRfUkFNX0RMWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRkYKKyNkZWZpbmUgICBJUU1fUlRfUkFNX0RMWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMDAwMAorI2RlZmluZSBPUlhfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgT1JYX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgT1JYX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfQ09NTV9FWEVDX0hPTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBPUlhfQ09NTV9TVEFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMDAwMQorI2RlZmluZSBPUlhfQ09NTV9TVEFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIE9SWF9DT01NX1NUQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIE9SWF9DT01NX1NUQVRFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIE9SWF9DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwMDAyCisjZGVmaW5lIE9SWF9DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgT1JYX0NPTU1fTUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgT1JYX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgT1JYX0NPTU1fSU5UX1JFUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAwMDMKKyNkZWZpbmUgT1JYX0NPTU1fSU5UX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9DT01NX0lOVF9SRVFfRVFVX1JFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBPUlhfQ09NTV9JTlRfUkVRX0VRVV9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0NPTU1fSU5UX1JFUV9FUVVfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgT1JYX0NPTU1fSU5UX1JFUV9FUVVfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0NPTU1fSU5UX1JFUV9ERENfUkVRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9DT01NX0lOVF9SRVFfRERDX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfQ09NTV9JTlRfUkVRX0REQ19SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBPUlhfQ09NTV9JTlRfUkVRX0REQ19SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfQ09NTV9JTlRfUkVRX0ZXUF9SRVFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgT1JYX0NPTU1fSU5UX1JFUV9GV1BfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9DT01NX0lOVF9SRVFfRldQX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIE9SWF9DT01NX0lOVF9SRVFfRldQX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9DT01NX0lOVF9SRVFfQ09OX1JFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBPUlhfQ09NTV9JTlRfUkVRX0NPTl9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0NPTU1fSU5UX1JFUV9DT05fUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgT1JYX0NPTU1fSU5UX1JFUV9DT05fUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0NPTU1fSU5UX1JFUV9OU1VfUkVRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIE9SWF9DT01NX0lOVF9SRVFfTlNVX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfQ09NTV9JTlRfUkVRX05TVV9SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgT1JYX0NPTU1fSU5UX1JFUV9OU1VfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0NPTU1fSU5UX1NUQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAwMDUKKyNkZWZpbmUgT1JYX0NPTU1fSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfQ09NTV9JTlRfU1RBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfQ09NTV9JTlRfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBPUlhfQ09NTV9JTlRfTVNLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMDAwNgorI2RlZmluZSBPUlhfQ09NTV9JTlRfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIE9SWF9DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIE9SWF9DT01NX0lOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIE9SWF9DT01NX0lOVF9TVE1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwMDA3CisjZGVmaW5lIE9SWF9DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgT1JYX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgT1JYX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfVE9QX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAxMDAwMAorI2RlZmluZSBPUlhfVE9QX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgT1JYX1RPUF9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgT1JYX1RPUF9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfVE9QX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfVE9QX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfVE9QX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBPUlhfVE9QX0NPTU1fS0VZX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAxMDAwRgorI2RlZmluZSBPUlhfVE9QX0NPTU1fS0VZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIE9SWF9UT1BfQ09NTV9LRVlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIE9SWF9UT1BfQ09NTV9LRVlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX1RPUF9DT01NX0tFWV9LRVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGQUJBCisKKyNkZWZpbmUgT1JYX1RPUF9NREVfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMTAwMTAKKyNkZWZpbmUgT1JYX1RPUF9NREVfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE9SWF9UT1BfTURFX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIE9SWF9UT1BfTURFX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgT1JYX1RPUF9NREVfV19SQVRFXzE1NDRLQlBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX1RPUF9NREVfV19SQVRFXzMwODhLQlBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgT1JYX1RPUF9NREVfV19SQVRFXzIwNDhLQlBTX1NRUlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgT1JYX1RPUF9NREVfV19SQVRFXzIwNDhLQlBTX1JPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgT1JYX1RPUF9BSUZfQ1RSTF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMTAwMTEKKyNkZWZpbmUgT1JYX1RPUF9BSUZfQ1RSTF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE9SWF9UT1BfQUlGX0NUUkxfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIE9SWF9UT1BfQUlGX0NUUkxfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX1RPUF9BSUZfQ1RSTF9XX05FR19DTEtfRURHRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIE9SWF9UT1BfQUlGX0NUUkxfV19ORUdfQ0xLX0VER0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfVE9QX0FJRl9DVFJMX1dfTkVHX0NMS19FREdFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfVE9QX0FJRl9DVFJMX1dfTkVHX0NMS19FREdFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9UT1BfQUlGX0NUUkxfV19ORUdfQ0xLX0VER0VfQURDX1NBTVBMX09OX1BPU19DTEtfRURHRSAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9UT1BfQUlGX0NUUkxfV19ORUdfQ0xLX0VER0VfQURDX1NBTVBMX09OX05FR19DTEtfRURHRSAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfVE9QX0FJRl9DVFJMX1dfQklUX1JFVkVSU0VfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX1RPUF9BSUZfQ1RSTF9XX0JJVF9SRVZFUlNFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9UT1BfQUlGX0NUUkxfV19CSVRfUkVWRVJTRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIE9SWF9UT1BfQUlGX0NUUkxfV19CSVRfUkVWRVJTRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX1RPUF9BSUZfQ1RSTF9XX0JJVF9SRVZFUlNFX1JFR1VMQVJfQklUX09SREVSX0FEQyAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX1RPUF9BSUZfQ1RSTF9XX0JJVF9SRVZFUlNFX1JFVkVSU0FMX0JJVF9PUkRFUl9BREMgICAgICAgICAgIDB4MgorI2RlZmluZSAgIE9SWF9UT1BfQUlGX0NUUkxfV19JTlZfTVNCX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBPUlhfVE9QX0FJRl9DVFJMX1dfSU5WX01TQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX1RPUF9BSUZfQ1RSTF9XX0lOVl9NU0JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgT1JYX1RPUF9BSUZfQ1RSTF9XX0lOVl9NU0JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfVE9QX0FJRl9DVFJMX1dfSU5WX01TQl9OT19NU0JfSU5WRVJTSU9OX0FEQyAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfVE9QX0FJRl9DVFJMX1dfSU5WX01TQl9NU0JfSU5WRVJTSU9OX0FEQyAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgT1JYX0ZXUF9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMjAwMDAKKyNkZWZpbmUgT1JYX0ZXUF9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE9SWF9GV1BfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIE9SWF9GV1BfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgT1JYX0ZXUF9DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMjAwMDIKKyNkZWZpbmUgT1JYX0ZXUF9DT01NX01CX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIE9SWF9GV1BfQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBPUlhfRldQX0NPTU1fTUJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9GV1BfQ09NTV9NQl9DVExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBPUlhfRldQX0NPTU1fTUJfQ1RMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX01CX0NUTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX01CX0NUTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfRldQX0NPTU1fTUJfQ1RMX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfRldQX0NPTU1fTUJfQ1RMX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX01CX09CU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9GV1BfQ09NTV9NQl9PQlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfRldQX0NPTU1fTUJfT0JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBPUlhfRldQX0NPTU1fTUJfT0JTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9GV1BfQ09NTV9NQl9PQlNfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9GV1BfQ09NTV9NQl9PQlNfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIE9SWF9GV1BfQ09NTV9NQl9DVExfTVVYX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBPUlhfRldQX0NPTU1fTUJfQ1RMX01VWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX01CX0NUTF9NVVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQworI2RlZmluZSAgIE9SWF9GV1BfQ09NTV9NQl9DVExfTVVYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX01CX09CU19NVVhfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIE9SWF9GV1BfQ09NTV9NQl9PQlNfTVVYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBPUlhfRldQX0NPTU1fTUJfT0JTX01VWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEUwCisjZGVmaW5lICAgT1JYX0ZXUF9DT01NX01CX09CU19NVVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0ZXUF9BQUdfTEVOX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMjAwMTAKKyNkZWZpbmUgT1JYX0ZXUF9BQUdfTEVOX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfRldQX0FBR19MRU5fV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfRldQX0FBR19MRU5fV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwCisKKyNkZWZpbmUgT1JYX0ZXUF9BQUdfVEhSX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMjAwMTEKKyNkZWZpbmUgT1JYX0ZXUF9BQUdfVEhSX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIE9SWF9GV1BfQUFHX1RIUl9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBPUlhfRldQX0FBR19USFJfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTAKKworI2RlZmluZSBPUlhfRldQX0FBR19USFJfQ05UX1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAyMDAxMgorI2RlZmluZSBPUlhfRldQX0FBR19USFJfQ05UX1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIE9SWF9GV1BfQUFHX1RIUl9DTlRfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIE9SWF9GV1BfQUFHX1RIUl9DTlRfUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0ZXUF9BQUdfU05TX0NOVF9SX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMjAwMTMKKyNkZWZpbmUgT1JYX0ZXUF9BQUdfU05TX0NOVF9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfRldQX0FBR19TTlNfQ05UX1JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfRldQX0FBR19TTlNfQ05UX1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9GV1BfUEZJX0FfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDIwMDE0CisjZGVmaW5lIE9SWF9GV1BfUEZJX0FfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBPUlhfRldQX1BGSV9BX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgT1JYX0ZXUF9QRklfQV9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEIwCisjZGVmaW5lICAgT1JYX0ZXUF9QRklfQV9XX1JBVEVfMjA0OEtCUFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhCMAorI2RlZmluZSAgIE9SWF9GV1BfUEZJX0FfV19SQVRFXzE1NDRLQlBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QTQKKyNkZWZpbmUgICBPUlhfRldQX1BGSV9BX1dfUkFURV8zMDg4S0JQUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisKKyNkZWZpbmUgT1JYX0ZXUF9QRklfQl9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMjAwMTUKKyNkZWZpbmUgT1JYX0ZXUF9QRklfQl9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIE9SWF9GV1BfUEZJX0JfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBPUlhfRldQX1BGSV9CX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OUUKKyNkZWZpbmUgICBPUlhfRldQX1BGSV9CX1dfUkFURV8yMDQ4S0JQUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDlFCisjZGVmaW5lICAgT1JYX0ZXUF9QRklfQl9XX1JBVEVfMTU0NEtCUFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg5NAorI2RlZmluZSAgIE9SWF9GV1BfUEZJX0JfV19SQVRFXzMwODhLQlBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QjAKKworI2RlZmluZSBPUlhfRldQX1BGSV9DX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAyMDAxNgorI2RlZmluZSBPUlhfRldQX1BGSV9DX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgT1JYX0ZXUF9QRklfQ19XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIE9SWF9GV1BfUEZJX0NfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1QworI2RlZmluZSAgIE9SWF9GV1BfUEZJX0NfV19SQVRFXzIwNDhLQlBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NUMKKyNkZWZpbmUgICBPUlhfRldQX1BGSV9DX1dfUkFURV8xNTQ0S0JQUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDY0CisjZGVmaW5lICAgT1JYX0ZXUF9QRklfQ19XX1JBVEVfMzA4OEtCUFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MAorCisjZGVmaW5lIE9SWF9GV1BfS1IxX0FNUF9SX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDIwMDE3CisjZGVmaW5lIE9SWF9GV1BfS1IxX0FNUF9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBPUlhfRldQX0tSMV9BTVBfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIE9SWF9GV1BfS1IxX0FNUF9SX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0ZXUF9LUjFfTERUX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMjAwMTgKKyNkZWZpbmUgT1JYX0ZXUF9LUjFfTERUX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE9SWF9GV1BfS1IxX0xEVF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIE9SWF9GV1BfS1IxX0xEVF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lIE9SWF9GV1BfU1JDX0RHTl9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDIwMDE5CisjZGVmaW5lIE9SWF9GV1BfU1JDX0RHTl9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgT1JYX0ZXUF9TUkNfREdOX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgT1JYX0ZXUF9TUkNfREdOX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorCisjZGVmaW5lICAgT1JYX0ZXUF9TUkNfREdOX1dfTUFOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIE9SWF9GV1BfU1JDX0RHTl9XX01BTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBPUlhfRldQX1NSQ19ER05fV19NQU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSAgIE9SWF9GV1BfU1JDX0RHTl9XX01BTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisKKyNkZWZpbmUgICBPUlhfRldQX1NSQ19ER05fV19FWFBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIE9SWF9GV1BfU1JDX0RHTl9XX0VYUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBPUlhfRldQX1NSQ19ER05fV19FWFBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMDAKKyNkZWZpbmUgICBPUlhfRldQX1NSQ19ER05fV19FWFBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfRldQX05ZUV9BRFJfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAyMDAxQQorI2RlZmluZSBPUlhfRldQX05ZUV9BRFJfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgT1JYX0ZXUF9OWVFfQURSX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lIE9SWF9GV1BfTllRX0FEUl9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorCisjZGVmaW5lIE9SWF9GV1BfTllRX0NPRl9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDIwMDFCCisjZGVmaW5lIE9SWF9GV1BfTllRX0NPRl9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgT1JYX0ZXUF9OWVFfQ09GX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBPUlhfRldQX05ZUV9DT0ZfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9GV1BfSVFNX0ZSUV9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDIwMDFDCisjZGVmaW5lIE9SWF9GV1BfSVFNX0ZSUV9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgT1JYX0ZXUF9JUU1fRlJRX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgT1JYX0ZXUF9JUU1fRlJRX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQzMDEKKworI2RlZmluZSBPUlhfRVFVX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAzMDAwMAorI2RlZmluZSBPUlhfRVFVX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBPUlhfRVFVX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAzMDAwMgorI2RlZmluZSBPUlhfRVFVX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgT1JYX0VRVV9DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIE9SWF9FUVVfQ09NTV9NQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX01CX0NUTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9NQl9DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fTUJfQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fTUJfQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9FUVVfQ09NTV9NQl9DVExfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9FUVVfQ09NTV9NQl9DVExfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fTUJfT0JTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX01CX09CU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9NQl9PQlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9NQl9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX0VRVV9DT01NX01CX09CU19PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX0VRVV9DT01NX01CX09CU19PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX01CX0NUTF9NVVhfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9NQl9DVExfTVVYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fTUJfQ1RMX01VWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX01CX0NUTF9NVVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fTUJfT0JTX01VWF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgT1JYX0VRVV9DT01NX01CX09CU19NVVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9NQl9PQlNfTVVYX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RTAKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fTUJfT0JTX01VWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfRVFVX0NPTU1fSU5UX1JFUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAzMDAwMworI2RlZmluZSBPUlhfRVFVX0NPTU1fSU5UX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0lOVF9SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0lOVF9SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0lOVF9TVEFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMDUKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE9SWF9FUVVfQ09NTV9JTlRfU1RBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIE9SWF9FUVVfQ09NTV9JTlRfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fSU5UX1NUQV9GRkZfUkVBRF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX0lOVF9TVEFfRkZGX1JFQURfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfU1RBX0ZGRl9SRUFEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfU1RBX0ZGRl9SRUFEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX0lOVF9TVEFfRkJGX1JFQURfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfU1RBX0ZCRl9SRUFEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fSU5UX1NUQV9GQkZfUkVBRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fSU5UX1NUQV9GQkZfUkVBRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfRVFVX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAzMDAwNgorI2RlZmluZSBPUlhfRVFVX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0lOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fSU5UX01TS19GRkZfUkVBRF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX0lOVF9NU0tfRkZGX1JFQURfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfTVNLX0ZGRl9SRUFEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfTVNLX0ZGRl9SRUFEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfTVNLX0ZCRl9SRUFEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fSU5UX01TS19GQkZfUkVBRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX0lOVF9NU0tfRkJGX1JFQURfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX0lOVF9NU0tfRkJGX1JFQURfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0lOVF9TVE1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMDcKKyNkZWZpbmUgT1JYX0VRVV9DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE9SWF9FUVVfQ09NTV9JTlRfU1RNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIE9SWF9FUVVfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX0lOVF9TVE1fRkZGX1JFQURfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfU1RNX0ZGRl9SRUFEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fSU5UX1NUTV9GRkZfUkVBRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fSU5UX1NUTV9GRkZfUkVBRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfRVFVX0NPTU1fSU5UX1NUTV9GQkZfUkVBRF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0VRVV9DT01NX0lOVF9TVE1fRkJGX1JFQURfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfU1RNX0ZCRl9SRUFEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIE9SWF9FUVVfQ09NTV9JTlRfU1RNX0ZCRl9SRUFEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX1NDTF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDEwCisjZGVmaW5lIE9SWF9FUVVfRkZGX1NDTF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBPUlhfRVFVX0ZGRl9TQ0xfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBPUlhfRVFVX0ZGRl9TQ0xfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9FUVVfRkZGX1NDTF9XX1NDQUxFX0dBSU5fMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9FUVVfRkZGX1NDTF9XX1NDQUxFX0dBSU5fMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lIE9SWF9FUVVfRkZGX1VQRF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDExCisjZGVmaW5lIE9SWF9FUVVfRkZGX1VQRF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBPUlhfRVFVX0ZGRl9VUERfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBPUlhfRVFVX0ZGRl9VUERfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9FUVVfRkZGX1VQRF9XX05PX1VQREFURSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9FUVVfRkZGX1VQRF9XX0xNU19VUERBVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lIE9SWF9FUVVfRkZGX1NUUF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDEyCisjZGVmaW5lIE9SWF9FUVVfRkZGX1NUUF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBPUlhfRVFVX0ZGRl9TVFBfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSBPUlhfRVFVX0ZGRl9TVFBfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0xFQV9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDEzCisjZGVmaW5lIE9SWF9FUVVfRkZGX0xFQV9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBPUlhfRVFVX0ZGRl9MRUFfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBPUlhfRVFVX0ZGRl9MRUFfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX1JXVF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDE0CisjZGVmaW5lIE9SWF9FUVVfRkZGX1JXVF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9SV1RfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBPUlhfRVFVX0ZGRl9SV1RfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MwUkVfUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDE1CisjZGVmaW5lIE9SWF9FUVVfRkZGX0MwUkVfUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzBSRV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DMFJFX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MwSU1fUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDE2CisjZGVmaW5lIE9SWF9FUVVfRkZGX0MwSU1fUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzBJTV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DMElNX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MxUkVfUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDE3CisjZGVmaW5lIE9SWF9FUVVfRkZGX0MxUkVfUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzFSRV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DMVJFX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MxSU1fUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDE4CisjZGVmaW5lIE9SWF9FUVVfRkZGX0MxSU1fUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzFJTV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DMUlNX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MyUkVfUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDE5CisjZGVmaW5lIE9SWF9FUVVfRkZGX0MyUkVfUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzJSRV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DMlJFX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MySU1fUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDFBCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MySU1fUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzJJTV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DMklNX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MzUkVfUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDFCCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MzUkVfUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzNSRV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DM1JFX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MzSU1fUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDFDCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MzSU1fUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzNJTV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DM0lNX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M0UkVfUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDFECisjZGVmaW5lIE9SWF9FUVVfRkZGX0M0UkVfUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzRSRV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DNFJFX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzRJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMUUKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzRJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DNElNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M0SU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzVSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMUYKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzVSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DNVJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M1UkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzVJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjAKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzVJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DNUlNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M1SU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzZSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjEKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzZSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DNlJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M2UkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzZJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjIKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzZJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DNklNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M2SU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzdSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjMKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzdSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DN1JFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M3UkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzdJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjQKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzdJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DN0lNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M3SU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzhSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjUKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzhSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DOFJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M4UkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzhJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjYKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzhJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DOElNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M4SU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzlSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjcKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzlSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DOVJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M5UkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzlJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjgKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzlJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DOUlNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0M5SU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzEwUkVfUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMjkKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzEwUkVfUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DMTBSRV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MxMFJFX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzEwSU1fUldfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMkEKKyNkZWZpbmUgT1JYX0VRVV9GRkZfQzEwSU1fUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZGRl9DMTBJTV9SV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkZGX0MxMElNX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9NWEJfU0VMX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMkIKKyNkZWZpbmUgT1JYX0VRVV9NWEJfU0VMX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE9SWF9FUVVfTVhCX1NFTF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIE9SWF9FUVVfTVhCX1NFTF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9NWEJfU0VMX1dfVU5ERUNJREVEX1NZTUJPTFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9NWEJfU0VMX1dfREVDSURFRF9TWU1CT0xTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfVVBEX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMkMKKyNkZWZpbmUgT1JYX0VRVV9GQkZfVVBEX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE9SWF9FUVVfRkJGX1VQRF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIE9SWF9FUVVfRkJGX1VQRF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9GQkZfVVBEX1dfTk9fVVBEQVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9GQkZfVVBEX1dfTE1TX1VQREFURSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfU1RQX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMkQKKyNkZWZpbmUgT1JYX0VRVV9GQkZfU1RQX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE9SWF9FUVVfRkJGX1NUUF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIE9SWF9FUVVfRkJGX1NUUF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfTEVBX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMkUKKyNkZWZpbmUgT1JYX0VRVV9GQkZfTEVBX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIE9SWF9FUVVfRkJGX0xFQV9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0xFQV9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfUldUX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMkYKKyNkZWZpbmUgT1JYX0VRVV9GQkZfUldUX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE9SWF9FUVVfRkJGX1JXVF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIE9SWF9FUVVfRkJGX1JXVF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzBSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzAKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzBSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DMFJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0MwUkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzBJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzEKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzBJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DMElNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0MwSU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzFSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzIKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzFSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DMVJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0MxUkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzFJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzMKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzFJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DMUlNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0MxSU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzJSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzQKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzJSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DMlJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0MyUkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzJJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzUKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzJJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DMklNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0MySU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzNSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzYKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzNSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DM1JFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0MzUkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzNJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzcKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzNJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DM0lNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0MzSU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzRSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzgKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzRSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DNFJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0M0UkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzRJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwMzkKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzRJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DNElNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0M0SU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzVSRV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwM0EKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzVSRV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DNVJFX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0M1UkVfUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzVJTV9SV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwM0IKKyNkZWZpbmUgT1JYX0VRVV9GQkZfQzVJTV9SV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBPUlhfRVFVX0ZCRl9DNUlNX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIE9SWF9FUVVfRkJGX0M1SU1fUldfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0VRVV9FUlJfU0VMX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwM0MKKyNkZWZpbmUgT1JYX0VRVV9FUlJfU0VMX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE9SWF9FUVVfRVJSX1NFTF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIE9SWF9FUVVfRVJSX1NFTF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9FUlJfU0VMX1dfQ01BX0VSUk9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9FUlJfU0VMX1dfRERBX0VSUk9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgT1JYX0VRVV9FUlJfVElTX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwM0QKKyNkZWZpbmUgT1JYX0VRVV9FUlJfVElTX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE9SWF9FUVVfRVJSX1RJU19XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIE9SWF9FUVVfRVJSX1RJU19XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9FUlJfVElTX1dfQ01BX1NJR05BTFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0VRVV9FUlJfVElTX1dfRERBX1NJR05BTFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgT1JYX0VRVV9FUlJfRURJX1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwM0UKKyNkZWZpbmUgT1JYX0VRVV9FUlJfRURJX1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIE9SWF9FUVVfRVJSX0VESV9SX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBPUlhfRVFVX0VSUl9FRElfUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorCisjZGVmaW5lIE9SWF9FUVVfRVJSX0VEUV9SX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDNGCisjZGVmaW5lIE9SWF9FUVVfRVJSX0VEUV9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBPUlhfRVFVX0VSUl9FRFFfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUYKKyNkZWZpbmUgT1JYX0VRVV9FUlJfRURRX1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKworI2RlZmluZSBPUlhfRVFVX0VSUl9FQ0lfUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAzMDA0MAorI2RlZmluZSBPUlhfRVFVX0VSUl9FQ0lfUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgT1JYX0VRVV9FUlJfRUNJX1JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lIE9SWF9FUVVfRVJSX0VDSV9SX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisKKyNkZWZpbmUgT1JYX0VRVV9FUlJfRUNRX1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwNDEKKyNkZWZpbmUgT1JYX0VRVV9FUlJfRUNRX1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIE9SWF9FUVVfRVJSX0VDUV9SX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBPUlhfRVFVX0VSUl9FQ1FfUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorCisjZGVmaW5lIE9SWF9FUVVfTUVSX01FUl9SX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDMwMDQyCisjZGVmaW5lIE9SWF9FUVVfTUVSX01FUl9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBPUlhfRVFVX01FUl9NRVJfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgT1JYX0VRVV9NRVJfTUVSX1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisKKyNkZWZpbmUgT1JYX0VRVV9NRVJfTERUX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwNDMKKyNkZWZpbmUgT1JYX0VRVV9NRVJfTERUX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE9SWF9FUVVfTUVSX0xEVF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIE9SWF9FUVVfTUVSX0xEVF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgT1JYX0VRVV9TWU5fTEVOX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMzAwNDQKKyNkZWZpbmUgT1JYX0VRVV9TWU5fTEVOX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfRVFVX1NZTl9MRU5fV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfRVFVX1NZTl9MRU5fV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9ERENfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDQwMDAwCisjZGVmaW5lIE9SWF9ERENfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBPUlhfRERDX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBPUlhfRERDX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9ERENfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9ERENfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIE9SWF9ERENfQ09NTV9FWEVDX0hPTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIE9SWF9ERENfQ09NTV9NQl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDQwMDAyCisjZGVmaW5lIE9SWF9ERENfQ09NTV9NQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBPUlhfRERDX0NPTU1fTUJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgT1JYX0REQ19DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfRERDX0NPTU1fTUJfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgT1JYX0REQ19DT01NX01CX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9ERENfQ09NTV9NQl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIE9SWF9ERENfQ09NTV9NQl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX0REQ19DT01NX01CX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX0REQ19DT01NX01CX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIE9SWF9ERENfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfRERDX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0REQ19DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgT1JYX0REQ19DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfRERDX0NPTU1fTUJfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfRERDX0NPTU1fTUJfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBPUlhfRERDX0NPTU1fTUJfQ1RMX01VWF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgT1JYX0REQ19DT01NX01CX0NUTF9NVVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIE9SWF9ERENfQ09NTV9NQl9DVExfTVVYX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QworI2RlZmluZSAgIE9SWF9ERENfQ09NTV9NQl9DVExfTVVYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgT1JYX0REQ19DT01NX01CX09CU19NVVhfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIE9SWF9ERENfQ09NTV9NQl9PQlNfTVVYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBPUlhfRERDX0NPTU1fTUJfT0JTX01VWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCisjZGVmaW5lICAgT1JYX0REQ19DT01NX01CX09CU19NVVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0REQ19DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNDAwMDMKKyNkZWZpbmUgT1JYX0REQ19DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE9SWF9ERENfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIE9SWF9ERENfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIE9SWF9ERENfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDQwMDA1CisjZGVmaW5lIE9SWF9ERENfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBPUlhfRERDX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBPUlhfRERDX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBPUlhfRERDX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA0MDAwNgorI2RlZmluZSBPUlhfRERDX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgT1JYX0REQ19DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgT1JYX0REQ19DT01NX0lOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgT1JYX0REQ19DT01NX0lOVF9TVE1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNDAwMDcKKyNkZWZpbmUgT1JYX0REQ19DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE9SWF9ERENfQ09NTV9JTlRfU1RNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIE9SWF9ERENfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIE9SWF9ERENfREVDX01BUF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDQwMDEwCisjZGVmaW5lIE9SWF9ERENfREVDX01BUF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBPUlhfRERDX0RFQ19NQVBfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIE9SWF9ERENfREVDX01BUF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNzgKKworI2RlZmluZSAgIE9SWF9ERENfREVDX01BUF9XX1FVQURSMF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBPUlhfRERDX0RFQ19NQVBfV19RVUFEUjBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfRERDX0RFQ19NQVBfV19RVUFEUjBfUk9UQVRFX0RFRkFVTFQgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfRERDX0RFQ19NQVBfV19RVUFEUjBfUk9UQVRFX0FMVEVSTkFURSAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBPUlhfRERDX0RFQ19NQVBfV19RVUFEUjFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIE9SWF9ERENfREVDX01BUF9XX1FVQURSMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QworI2RlZmluZSAgIE9SWF9ERENfREVDX01BUF9XX1FVQURSMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIxX1JPVEFURV9ERUZBVUxUICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIxX1JPVEFURV9BTFRFUk5BVEUgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIyX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIE9SWF9ERENfREVDX01BUF9XX1FVQURSMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBPUlhfRERDX0RFQ19NQVBfV19RVUFEUjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCisjZGVmaW5lICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMAorI2RlZmluZSAgICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIyX1JPVEFURV9ERUZBVUxUICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAKKyNkZWZpbmUgICAgIE9SWF9ERENfREVDX01BUF9XX1FVQURSMl9ST1RBVEVfQUxURVJOQVRFICAgICAgICAgICAgICAgICAgICAgICAweDMwCisKKyNkZWZpbmUgICBPUlhfRERDX0RFQ19NQVBfV19RVUFEUjNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIE9SWF9ERENfREVDX01BUF9XX1FVQURSM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBPUlhfRERDX0RFQ19NQVBfV19RVUFEUjNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgICBPUlhfRERDX0RFQ19NQVBfV19RVUFEUjNfUk9UQVRFX0RFRkFVTFQgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgICAgT1JYX0REQ19ERUNfTUFQX1dfUVVBRFIzX1JPVEFURV9BTFRFUk5BVEUgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBPUlhfRERDX0RFQ19NQVBfV19ESUZGX0RFQ09EX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgT1JYX0REQ19ERUNfTUFQX1dfRElGRl9ERUNPRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9ERENfREVDX01BUF9XX0RJRkZfREVDT0RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgT1JYX0REQ19ERUNfTUFQX1dfRElGRl9ERUNPRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICAgIE9SWF9ERENfREVDX01BUF9XX0RJRkZfREVDT0RfQ09IRVJFTlRfREVDT0RJTkcgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9ERENfREVDX01BUF9XX0RJRkZfREVDT0RfRElGRl9ERUNPRElORyAgICAgICAgICAgICAgICAgICAgICAweDEwMAorCisjZGVmaW5lIE9SWF9ERENfT0ZPX1NFVF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDQwMDExCisjZGVmaW5lIE9SWF9ERENfT0ZPX1NFVF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgT1JYX0REQ19PRk9fU0VUX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgT1JYX0REQ19PRk9fU0VUX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MDIKKworI2RlZmluZSAgIE9SWF9ERENfT0ZPX1NFVF9XX1BIQVNFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBPUlhfRERDX09GT19TRVRfV19QSEFTRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgT1JYX0REQ19PRk9fU0VUX1dfUEhBU0VfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIE9SWF9ERENfT0ZPX1NFVF9XX1BIQVNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgT1JYX0REQ19PRk9fU0VUX1dfQ1JYSElUSU1FX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIE9SWF9ERENfT0ZPX1NFVF9XX0NSWEhJVElNRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBPUlhfRERDX09GT19TRVRfV19DUlhISVRJTUVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGODAKKyNkZWZpbmUgICBPUlhfRERDX09GT19TRVRfV19DUlhISVRJTUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MDAKKworI2RlZmluZSAgIE9SWF9ERENfT0ZPX1NFVF9XX0NSWElOVl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lICAgT1JYX0REQ19PRk9fU0VUX1dfQ1JYSU5WX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9ERENfT0ZPX1NFVF9XX0NSWElOVl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMAorI2RlZmluZSAgIE9SWF9ERENfT0ZPX1NFVF9XX0NSWElOVl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgT1JYX0REQ19PRk9fU0VUX1dfRElTQUJMRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgICBPUlhfRERDX09GT19TRVRfV19ESVNBQkxFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0REQ19PRk9fU0VUX1dfRElTQUJMRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisjZGVmaW5lICAgT1JYX0REQ19PRk9fU0VUX1dfRElTQUJMRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0NPTl9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNTAwMDAKKyNkZWZpbmUgT1JYX0NPTl9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE9SWF9DT05fQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIE9SWF9DT05fQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0NPTl9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgT1JYX0NPTl9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgT1JYX0NPTl9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgT1JYX0NPTl9MRFRfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNTAwMTAKKyNkZWZpbmUgT1JYX0NPTl9MRFRfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE9SWF9DT05fTERUX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIE9SWF9DT05fTERUX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgICBPUlhfQ09OX0xEVF9XX0NPTl9MRFRfV19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgT1JYX0NPTl9MRFRfV19DT05fTERUX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIE9SWF9DT05fTERUX1dfQ09OX0xEVF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIE9SWF9DT05fTERUX1dfQ09OX0xEVF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIE9SWF9DT05fUlNUX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDUwMDExCisjZGVmaW5lIE9SWF9DT05fUlNUX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBPUlhfQ09OX1JTVF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBPUlhfQ09OX1JTVF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgT1JYX0NPTl9SU1RfV19DUEhfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIE9SWF9DT05fUlNUX1dfQ1BIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfQ09OX1JTVF9XX0NQSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfQ09OX1JTVF9XX0NQSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIE9SWF9DT05fUlNUX1dfQ1RJX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfQ09OX1JTVF9XX0NUSV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX0NPTl9SU1RfV19DVElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgT1JYX0NPTl9SU1RfV19DVElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBPUlhfQ09OX1JTVF9XX0tSTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgT1JYX0NPTl9SU1RfV19LUk5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9DT05fUlNUX1dfS1JOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIE9SWF9DT05fUlNUX1dfS1JOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgT1JYX0NPTl9SU1RfV19LUlBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIE9SWF9DT05fUlNUX1dfS1JQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfQ09OX1JTVF9XX0tSUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBPUlhfQ09OX1JTVF9XX0tSUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfQ09OX0NQSF9QSElfUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA1MDAxMgorI2RlZmluZSBPUlhfQ09OX0NQSF9QSElfUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIE9SWF9DT05fQ1BIX1BISV9SX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIE9SWF9DT05fQ1BIX1BISV9SX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0NPTl9DUEhfRlJRX1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNTAwMTMKKyNkZWZpbmUgT1JYX0NPTl9DUEhfRlJRX1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfQ09OX0NQSF9GUlFfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfQ09OX0NQSF9GUlFfUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9DT05fQ1BIX0FNUF9SX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDUwMDE0CisjZGVmaW5lIE9SWF9DT05fQ1BIX0FNUF9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgT1JYX0NPTl9DUEhfQU1QX1JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgT1JYX0NPTl9DUEhfQU1QX1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfQ09OX0NQSF9LREZfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA1MDAxNQorI2RlZmluZSBPUlhfQ09OX0NQSF9LREZfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgT1JYX0NPTl9DUEhfS0RGX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgT1JYX0NPTl9DUEhfS0RGX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfQ09OX0NQSF9LUEZfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA1MDAxNgorI2RlZmluZSBPUlhfQ09OX0NQSF9LUEZfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgT1JYX0NPTl9DUEhfS1BGX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgT1JYX0NPTl9DUEhfS1BGX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfQ09OX0NQSF9LSUZfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA1MDAxNworI2RlZmluZSBPUlhfQ09OX0NQSF9LSUZfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgT1JYX0NPTl9DUEhfS0lGX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgT1JYX0NPTl9DUEhfS0lGX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgT1JYX0NPTl9DUEhfQVBUX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNTAwMTgKKyNkZWZpbmUgT1JYX0NPTl9DUEhfQVBUX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfQ09OX0NQSF9BUFRfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfQ09OX0NQSF9BUFRfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODA0CisKKyNkZWZpbmUgICBPUlhfQ09OX0NQSF9BUFRfV19QVEhfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgT1JYX0NPTl9DUEhfQVBUX1dfUFRIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIE9SWF9DT05fQ1BIX0FQVF9XX1BUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBPUlhfQ09OX0NQSF9BUFRfV19QVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSAgIE9SWF9DT05fQ1BIX0FQVF9XX0FUSF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBPUlhfQ09OX0NQSF9BUFRfV19BVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgT1JYX0NPTl9DUEhfQVBUX1dfQVRIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRjAwCisjZGVmaW5lICAgT1JYX0NPTl9DUEhfQVBUX1dfQVRIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAKKworI2RlZmluZSBPUlhfQ09OX0NQSF9XTENfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA1MDAxOQorI2RlZmluZSBPUlhfQ09OX0NQSF9XTENfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgT1JYX0NPTl9DUEhfV0xDX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIE9SWF9DT05fQ1BIX1dMQ19XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MQorCisjZGVmaW5lICAgT1JYX0NPTl9DUEhfV0xDX1dfTEFUQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIE9SWF9DT05fQ1BIX1dMQ19XX0xBVENfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBPUlhfQ09OX0NQSF9XTENfV19MQVRDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBPUlhfQ09OX0NQSF9XTENfV19MQVRDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIE9SWF9DT05fQ1BIX1dMQ19XX1dMSU1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBPUlhfQ09OX0NQSF9XTENfV19XTElNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgT1JYX0NPTl9DUEhfV0xDX1dfV0xJTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMAorI2RlZmluZSAgIE9SWF9DT05fQ1BIX1dMQ19XX1dMSU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKworI2RlZmluZSBPUlhfQ09OX0NQSF9ETFlfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA1MDAxQQorI2RlZmluZSBPUlhfQ09OX0NQSF9ETFlfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgT1JYX0NPTl9DUEhfRExZX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgT1JYX0NPTl9DUEhfRExZX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSBPUlhfQ09OX0NQSF9UQ0xfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA1MDAxQgorI2RlZmluZSBPUlhfQ09OX0NQSF9UQ0xfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgT1JYX0NPTl9DUEhfVENMX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgT1JYX0NPTl9DUEhfVENMX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSBPUlhfQ09OX0tSUF9BTVBfUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA1MDAxQworI2RlZmluZSBPUlhfQ09OX0tSUF9BTVBfUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgT1JYX0NPTl9LUlBfQU1QX1JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBPUlhfQ09OX0tSUF9BTVBfUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9DT05fS1JOX0FNUF9SX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDUwMDFECisjZGVmaW5lIE9SWF9DT05fS1JOX0FNUF9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBPUlhfQ09OX0tSTl9BTVBfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIE9SWF9DT05fS1JOX0FNUF9SX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX0NPTl9DVElfRFRJX1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNTAwMUUKKyNkZWZpbmUgT1JYX0NPTl9DVElfRFRJX1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfQ09OX0NUSV9EVElfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfQ09OX0NUSV9EVElfUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9DT05fQ1RJX0tEVF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDUwMDFGCisjZGVmaW5lIE9SWF9DT05fQ1RJX0tEVF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBPUlhfQ09OX0NUSV9LRFRfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBPUlhfQ09OX0NUSV9LRFRfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lIE9SWF9DT05fQ1RJX0tQVF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDUwMDIwCisjZGVmaW5lIE9SWF9DT05fQ1RJX0tQVF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBPUlhfQ09OX0NUSV9LUFRfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBPUlhfQ09OX0NUSV9LUFRfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIE9SWF9DT05fQ1RJX0tJVF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDUwMDIxCisjZGVmaW5lIE9SWF9DT05fQ1RJX0tJVF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBPUlhfQ09OX0NUSV9LSVRfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBPUlhfQ09OX0NUSV9LSVRfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QgorCisjZGVmaW5lIE9SWF9DT05fQ1RJX1RBVF9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDUwMDIyCisjZGVmaW5lIE9SWF9DT05fQ1RJX1RBVF9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBPUlhfQ09OX0NUSV9UQVRfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBPUlhfQ09OX0NUSV9UQVRfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIE9SWF9OU1VfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDYwMDAwCisjZGVmaW5lIE9SWF9OU1VfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBPUlhfTlNVX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBPUlhfTlNVX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9OU1VfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9OU1VfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIE9SWF9OU1VfQ09NTV9FWEVDX0hPTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIE9SWF9OU1VfQU9YX1NUREJZX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDYwMDEwCisjZGVmaW5lIE9SWF9OU1VfQU9YX1NUREJZX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBPUlhfTlNVX0FPWF9TVERCWV9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgT1JYX05TVV9BT1hfU1REQllfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllBRENfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQURDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUFEQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUFEQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQURDX0ExX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQURDX0ExX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQURDX0EyX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQURDX0EyX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQU1QX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUFNUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllBTVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllBTVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUFNUF9BMV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUFNUF9BMV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUFNUF9BMl9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUFNUF9BMl9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUJJQVNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllCSUFTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQklBU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZQklBU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllCSUFTX0ExX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllCSUFTX0ExX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllCSUFTX0EyX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllCSUFTX0EyX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllQTExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUExMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVBMTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVBMTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUExMX0ExX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUExMX0ExX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUExMX0EyX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUExMX0EyX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUERfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVBEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllQRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUERfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllQRF9BMV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllQRF9BMV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUERfQTJfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZUERfQTJfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorCisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfSUZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllUQUdDX0lGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZVEFHQ19JRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfSUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZVEFHQ19JRl9BMV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZVEFHQ19JRl9BMV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfSUZfQTJfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfSUZfQTJfT04gICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKworI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllUQUdDX1JGX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZVEFHQ19SRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfUkZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllUQUdDX1JGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfUkZfQTFfT04gICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWVRBR0NfUkZfQTFfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllUQUdDX1JGX0EyX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllUQUdDX1JGX0EyX09OICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZRkxUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgT1JYX05TVV9BT1hfU1REQllfV19TVERCWUZMVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllGTFRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZRkxUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllGTFRfQTFfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIE9SWF9OU1VfQU9YX1NUREJZX1dfU1REQllGTFRfQTFfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZRkxUX0EyX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBPUlhfTlNVX0FPWF9TVERCWV9XX1NUREJZRkxUX0EyX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorCisjZGVmaW5lIE9SWF9OU1VfQU9YX0xPRlJRX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDYwMDExCisjZGVmaW5lIE9SWF9OU1VfQU9YX0xPRlJRX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgT1JYX05TVV9BT1hfTE9GUlFfV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgT1JYX05TVV9BT1hfTE9GUlFfV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgT1JYX05TVV9BT1hfTE9NREVfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNjAwMTIKKyNkZWZpbmUgT1JYX05TVV9BT1hfTE9NREVfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBPUlhfTlNVX0FPWF9MT01ERV9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBPUlhfTlNVX0FPWF9MT01ERV9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgT1JYX05TVV9BT1hfTE9NREVfV19BT1hfTE9GUlFfRVhUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPTURFX1dfQU9YX0xPRlJRX0VYVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9MT01ERV9XX0FPWF9MT0ZSUV9FWFRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgT1JYX05TVV9BT1hfTE9NREVfV19BT1hfTE9GUlFfRVhUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9MT01ERV9XX1JFU0VUX1ZDT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPTURFX1dfUkVTRVRfVkNPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9MT01ERV9XX1JFU0VUX1ZDT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAKKyNkZWZpbmUgICBPUlhfTlNVX0FPWF9MT01ERV9XX1JFU0VUX1ZDT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPTURFX1dfUExMX0RJVl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lICAgT1JYX05TVV9BT1hfTE9NREVfV19QTExfRElWX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPTURFX1dfUExMX0RJVl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAwMAorI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPTURFX1dfUExMX0RJVl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9OU1VfQU9YX0xPUE9XX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDYwMDEzCisjZGVmaW5lIE9SWF9OU1VfQU9YX0xPUE9XX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBPUlhfTlNVX0FPWF9MT1BPV19XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBPUlhfTlNVX0FPWF9MT1BPV19XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPUE9XX1dfUE9XRVJfTUlOVVMwREIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPUE9XX1dfUE9XRVJfTUlOVVM1REIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPUE9XX1dfUE9XRVJfTUlOVVMxMERCICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIE9SWF9OU1VfQU9YX0xPUE9XX1dfUE9XRVJfTUlOVVMxNURCICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIE9SWF9OU1VfQU9YX1NUSFJfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDYwMDE0CisjZGVmaW5lIE9SWF9OU1VfQU9YX1NUSFJfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBPUlhfTlNVX0FPWF9TVEhSX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUYKKyNkZWZpbmUgT1JYX05TVV9BT1hfU1RIUl9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfTlNVX1RVTl9SRkdBSU5fV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA2MDAxNQorI2RlZmluZSBPUlhfTlNVX1RVTl9SRkdBSU5fV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIE9SWF9OU1VfVFVOX1JGR0FJTl9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIE9SWF9OU1VfVFVOX1JGR0FJTl9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgT1JYX05TVV9UVU5fSUZHQUlOX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwNjAwMTYKKyNkZWZpbmUgT1JYX05TVV9UVU5fSUZHQUlOX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBPUlhfTlNVX1RVTl9JRkdBSU5fV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBPUlhfTlNVX1RVTl9JRkdBSU5fV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIE9SWF9OU1VfVFVOX0JQRl9XX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDYwMDE3CisjZGVmaW5lIE9SWF9OU1VfVFVOX0JQRl9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgT1JYX05TVV9UVU5fQlBGX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgT1JYX05TVV9UVU5fQlBGX1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGOQorI2RlZmluZSBPUlhfTlNVX05TU19CSVRTV0FQX1dfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjA2MDAxOAorI2RlZmluZSBPUlhfTlNVX05TU19CSVRTV0FQX1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgT1JYX05TVV9OU1NfQklUU1dBUF9XX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgT1JYX05TVV9OU1NfQklUU1dBUF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIE9SWF9OU1VfTlNTX0JJVFNXQVBfV19CSVRTV0FQX05TMF9SRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBPUlhfTlNVX05TU19CSVRTV0FQX1dfQklUU1dBUF9OUzBfUkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX05TVV9OU1NfQklUU1dBUF9XX0JJVFNXQVBfTlMwX1JGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgT1JYX05TVV9OU1NfQklUU1dBUF9XX0JJVFNXQVBfTlMwX1JGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBPUlhfTlNVX05TU19CSVRTV0FQX1dfQklUU1dBUF9OUzFfSUZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgT1JYX05TVV9OU1NfQklUU1dBUF9XX0JJVFNXQVBfTlMxX0lGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIE9SWF9OU1VfTlNTX0JJVFNXQVBfV19CSVRTV0FQX05TMV9JRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIE9SWF9OU1VfTlNTX0JJVFNXQVBfV19CSVRTV0FQX05TMV9JRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgT1JYX05TVV9OU1NfQklUU1dBUF9XX0JJVFNXQVBfTlMyX0JQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIE9SWF9OU1VfTlNTX0JJVFNXQVBfV19CSVRTV0FQX05TMl9CUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBPUlhfTlNVX05TU19CSVRTV0FQX1dfQklUU1dBUF9OUzJfQlBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBPUlhfTlNVX05TU19CSVRTV0FQX1dfQklUU1dBUF9OUzJfQlBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBPUlhfVFNUX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjNGMDAwMAorI2RlZmluZSBPUlhfVFNUX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgT1JYX1RTVF9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgT1JYX1RTVF9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfVFNUX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBPUlhfVFNUX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBPUlhfVFNUX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBPUlhfVFNUX0FPWF9UU1RfV19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjNGMDAxMAorI2RlZmluZSBPUlhfVFNUX0FPWF9UU1RfV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgT1JYX1RTVF9BT1hfVFNUX1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIE9SWF9UU1RfQU9YX1RTVF9XX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MDAwMDAKKyNkZWZpbmUgUUFNX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MDAwMDIKKyNkZWZpbmUgUUFNX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBRQU1fQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBRQU1fQ09NTV9NQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBRQU1fQ09NTV9JTlRfUkVRX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQwMDAwMworI2RlZmluZSBRQU1fQ09NTV9JTlRfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFFBTV9DT01NX0lOVF9SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFFBTV9DT01NX0lOVF9SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fQ09NTV9JTlRfUkVRX1NMX1JFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0NPTU1fSU5UX1JFUV9TTF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9DT01NX0lOVF9SRVFfU0xfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFFBTV9DT01NX0lOVF9SRVFfU0xfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX0NPTU1fSU5UX1JFUV9MQ19SRVFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9DT01NX0lOVF9SRVFfTENfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fQ09NTV9JTlRfUkVRX0xDX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBRQU1fQ09NTV9JTlRfUkVRX0xDX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9DT01NX0lOVF9SRVFfVkRfUkVRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBRQU1fQ09NTV9JTlRfUkVRX1ZEX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0NPTU1fSU5UX1JFUV9WRF9SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgUUFNX0NPTU1fSU5UX1JFUV9WRF9SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fQ09NTV9JTlRfUkVRX1NZX1JFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgUUFNX0NPTU1fSU5UX1JFUV9TWV9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9DT01NX0lOVF9SRVFfU1lfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFFBTV9DT01NX0lOVF9SRVFfU1lfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9DT01NX0lOVF9TVEFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDAwMDA1CisjZGVmaW5lIFFBTV9DT01NX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgUUFNX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgUUFNX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgUUFNX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MDAwMDYKKyNkZWZpbmUgUUFNX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBRQU1fQ09NTV9JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBRQU1fQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBRQU1fQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQwMDAwNworI2RlZmluZSBRQU1fQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFFBTV9DT01NX0lOVF9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFFBTV9DT01NX0lOVF9TVE1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX1RPUF9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MTAwMDAKKyNkZWZpbmUgUUFNX1RPUF9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9UT1BfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9UT1BfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1RPUF9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1RPUF9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1RPUF9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX1RPUF9BTk5FWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MTAwMTAKKyNkZWZpbmUgUUFNX1RPUF9BTk5FWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9UT1BfQU5ORVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9UT1BfQU5ORVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1RPUF9BTk5FWF9BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1RPUF9BTk5FWF9CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1RPUF9BTk5FWF9DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgUUFNX1RPUF9BTk5FWF9EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgUUFNX1RPUF9DT05TVEVMTEFUSU9OX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MTAwMTEKKyNkZWZpbmUgUUFNX1RPUF9DT05TVEVMTEFUSU9OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFFBTV9UT1BfQ09OU1RFTExBVElPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIFFBTV9UT1BfQ09OU1RFTExBVElPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1CisjZGVmaW5lICAgUUFNX1RPUF9DT05TVEVMTEFUSU9OX05PTkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1RPUF9DT05TVEVMTEFUSU9OX1FQU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1RPUF9DT05TVEVMTEFUSU9OX1FBTTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgUUFNX1RPUF9DT05TVEVMTEFUSU9OX1FBTTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgUUFNX1RPUF9DT05TVEVMTEFUSU9OX1FBTTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgUUFNX1RPUF9DT05TVEVMTEFUSU9OX1FBTTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1CisjZGVmaW5lICAgUUFNX1RPUF9DT05TVEVMTEFUSU9OX1FBTTEyOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisjZGVmaW5lICAgUUFNX1RPUF9DT05TVEVMTEFUSU9OX1FBTTI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisKKyNkZWZpbmUgUUFNX0ZRX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMDAKKyNkZWZpbmUgUUFNX0ZRX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9GUV9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9GUV9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0ZRX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0ZRX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX0ZRX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX01PREVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMTAKKyNkZWZpbmUgUUFNX0ZRX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFFBTV9GUV9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIFFBTV9GUV9NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fRlFfTU9ERV9UQVBSRVNFVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX01PREVfVEFQUkVTRVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9GUV9NT0RFX1RBUFJFU0VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFFBTV9GUV9NT0RFX1RBUFJFU0VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX0ZRX01PREVfVEFQUkVTRVRfUlNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0ZRX01PREVfVEFQTE1TX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9GUV9NT0RFX1RBUExNU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fRlFfTU9ERV9UQVBMTVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBRQU1fRlFfTU9ERV9UQVBMTVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9GUV9NT0RFX1RBUExNU19VUEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9NT0RFX1RBUERSQUlOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBRQU1fRlFfTU9ERV9UQVBEUkFJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0ZRX01PREVfVEFQRFJBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgUUFNX0ZRX01PREVfVEFQRFJBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fRlFfTU9ERV9UQVBEUkFJTl9EUkFJTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgUUFNX0ZRX01VX0ZBQ1RPUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMTEKKyNkZWZpbmUgUUFNX0ZRX01VX0ZBQ1RPUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFFBTV9GUV9NVV9GQUNUT1JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIFFBTV9GUV9NVV9GQUNUT1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX0ZRX0xBX0ZBQ1RPUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMTIKKyNkZWZpbmUgUUFNX0ZRX0xBX0ZBQ1RPUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFFBTV9GUV9MQV9GQUNUT1JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFFBTV9GUV9MQV9GQUNUT1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisjZGVmaW5lIFFBTV9GUV9DRU5UVEFQX0lEWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDE2CisjZGVmaW5lIFFBTV9GUV9DRU5UVEFQX0lEWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBRQU1fRlFfQ0VOVFRBUF9JRFhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUYKKyNkZWZpbmUgUUFNX0ZRX0NFTlRUQVBfSURYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEzCisKKyNkZWZpbmUgICBRQU1fRlFfQ0VOVFRBUF9JRFhfSURYX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX0NFTlRUQVBfSURYX0lEWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIFFBTV9GUV9DRU5UVEFQX0lEWF9JRFhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUYKKyNkZWZpbmUgICBRQU1fRlFfQ0VOVFRBUF9JRFhfSURYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEzCisKKyNkZWZpbmUgUUFNX0ZRX0NFTlRUQVBfVkFMVUVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMTcKKyNkZWZpbmUgUUFNX0ZRX0NFTlRUQVBfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfQ0VOVFRBUF9WQUxVRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9DRU5UVEFQX1ZBTFVFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2MDAKKworI2RlZmluZSAgIFFBTV9GUV9DRU5UVEFQX1ZBTFVFX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfQ0VOVFRBUF9WQUxVRV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9DRU5UVEFQX1ZBTFVFX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX0NFTlRUQVBfVkFMVUVfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2MDAKKworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAyMAorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwwX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwwX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDBfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMjEKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDBfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwwX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDIyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDFfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDFfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAyMworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDFfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMjQKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMl9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDJfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMl9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwyX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDI1CisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDJfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwyX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDJfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMl9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAyNgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwzX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwzX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMM19UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwzX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDNfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMjcKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMM19UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDNfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMM19UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwzX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUw0X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDI4CisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUw0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDRfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUw0X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDRfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMNF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAyOQorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUw0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUw0X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMNF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUw0X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDRfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMkEKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUw1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMNV9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDVfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMNV9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUw1X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUw1X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDJCCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUw1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDVfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUw1X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDVfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMNV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAyQworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUw2X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUw2X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMNl9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUw2X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDZfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMkQKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUw2X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMNl9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDZfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMNl9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUw2X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUw3X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDJFCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUw3X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDdfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUw3X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDdfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMN19UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAyRgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUw3X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUw3X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMN19UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUw3X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDdfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMzAKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUw4X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMOF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDhfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMOF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUw4X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUw4X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDMxCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUw4X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDhfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUw4X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDhfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMOF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAzMgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUw5X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUw5X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMOV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUw5X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDlfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMzMKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUw5X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMOV9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDlfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMOV9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUw5X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDM0CisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDEwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDEwX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxMF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDEwX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTBfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAzNQorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDEwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxMF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTBfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxMF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDEwX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDExX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMzYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTFfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDExX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTFfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxMV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDM3CisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDExX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDExX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxMV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDExX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTFfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAzOAorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDEyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxMl9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTJfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxMl9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDEyX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDEyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwMzkKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDEyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTJfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDEyX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTJfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxMl9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDNBCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDEzX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDEzX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxM19UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDEzX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTNfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAzQgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDEzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxM19UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTNfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxM19UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDEzX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDE0X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwM0MKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDE0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTRfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDE0X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTRfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxNF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDNECisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDE0X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxNF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDE0X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTRfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDAzRQorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDE1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxNV9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTVfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxNV9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDE1X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE1X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwM0YKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTVfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDE1X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTVfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxNV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDQwCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDE2X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDE2X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxNl9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDE2X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTZfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDA0MQorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE2X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxNl9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTZfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxNl9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDE2X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDE3X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwNDIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDE3X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTdfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDE3X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTdfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxN19UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDQzCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE3X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDE3X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxN19UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDE3X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTdfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMThfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDA0NAorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMThfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDE4X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxOF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMThfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxOF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDE4X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE4X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwNDUKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE4X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMThfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMThfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDE4X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMThfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxOF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDQ2CisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwxOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDE5X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMTlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjAwCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTlfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDE5X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMTlfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwxOV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjAwCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE5X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwNDcKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDE5X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMTlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwxOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTlfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDE5X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMTlfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwxOV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwyMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDQ4CisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwyMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDIwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMjBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDIwX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwyMF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDIwX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMjBfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMjBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDA0OQorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMjBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwyMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDIwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwyMF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMjBfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwyMF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDIwX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDIxX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwNEEKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDIxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwyMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMjFfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDIxX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMjFfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwyMV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwyMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDRCCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwyMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDIxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDIxX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwyMV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDIxX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMjFfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMjJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDA0QworI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwyMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDIyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwyMl9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMjJfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwyMl9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDIyX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDIyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MjAwNEQKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDIyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwyMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMjJfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDIyX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMjJfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwyMl9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwyM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDIwMDRFCisjZGVmaW5lIFFBTV9GUV9UQVBfUkVfRUwyM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0ZRX1RBUF9SRV9FTDIzX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRlFfVEFQX1JFX0VMMjNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDIzX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9GUV9UQVBfUkVfRUwyM19UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9SRV9FTDIzX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRlFfVEFQX1JFX0VMMjNfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMjNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQyMDA0RgorI2RlZmluZSBRQU1fRlFfVEFQX0lNX0VMMjNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9GUV9UQVBfSU1fRUwyM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0ZRX1RBUF9JTV9FTDIzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwyM19UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRlFfVEFQX0lNX0VMMjNfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9GUV9UQVBfSU1fRUwyM19UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0ZRX1RBUF9JTV9FTDIzX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX1NMX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MzAwMDAKKyNkZWZpbmUgUUFNX1NMX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9TTF9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9TTF9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX1NMX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MzAwMDIKKyNkZWZpbmUgUUFNX1NMX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFFBTV9TTF9DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFFBTV9TTF9DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fTUJfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9TTF9DT01NX01CX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9NQl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9NQl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9TTF9DT01NX01CX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9TTF9DT01NX01CX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TTF9DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9TTF9DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX1NMX0NPTU1fTUJfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX1NMX0NPTU1fTUJfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9TTF9DT01NX01CX01VWF9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9NQl9NVVhfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fTUJfTVVYX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fTUJfTVVYX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fU0xfQ09NTV9NQl9NVVhfT0JTX0NPTlNUX0NPUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fU0xfQ09NTV9NQl9NVVhfT0JTX0NPTlNUMkxDX08gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBRQU1fU0xfQ09NTV9NQl9NVVhfT0JTX0NPTlNUMkRRX08gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgICBRQU1fU0xfQ09NTV9NQl9NVVhfT0JTX1ZERUNfTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisKKyNkZWZpbmUgUUFNX1NMX0NPTU1fSU5UX1JFUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MzAwMDMKKyNkZWZpbmUgUUFNX1NMX0NPTU1fSU5UX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFFBTV9TTF9DT01NX0lOVF9SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFFBTV9TTF9DT01NX0lOVF9SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFFBTV9TTF9DT01NX0lOVF9TVEFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDMwMDA1CisjZGVmaW5lIFFBTV9TTF9DT01NX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBRQU1fU0xfQ09NTV9JTlRfU1RBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBRQU1fU0xfQ09NTV9JTlRfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fSU5UX1NUQV9NRURfRVJSX0lOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9TTF9DT01NX0lOVF9TVEFfTUVEX0VSUl9JTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfU1RBX01FRF9FUlJfSU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfU1RBX01FRF9FUlJfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9TTF9DT01NX0lOVF9TVEFfTUVSX0lOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfU1RBX01FUl9JTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fSU5UX1NUQV9NRVJfSU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fSU5UX1NUQV9NRVJfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX1NMX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MzAwMDYKKyNkZWZpbmUgUUFNX1NMX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9TTF9DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9TTF9DT01NX0lOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fSU5UX01TS19NRURfRVJSX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9TTF9DT01NX0lOVF9NU0tfTUVEX0VSUl9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfTVNLX01FRF9FUlJfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfTVNLX01FRF9FUlJfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfTVNLX01FUl9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fSU5UX01TS19NRVJfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TTF9DT01NX0lOVF9NU0tfTUVSX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9TTF9DT01NX0lOVF9NU0tfTUVSX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9TTF9DT01NX0lOVF9TVE1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDMwMDA3CisjZGVmaW5lIFFBTV9TTF9DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBRQU1fU0xfQ09NTV9JTlRfU1RNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBRQU1fU0xfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFFBTV9TTF9DT01NX0lOVF9TVE1fTUVEX0VSUl9TVE1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfU1RNX01FRF9FUlJfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fSU5UX1NUTV9NRURfRVJSX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fSU5UX1NUTV9NRURfRVJSX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NMX0NPTU1fSU5UX1NUTV9NRVJfU1RNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TTF9DT01NX0lOVF9TVE1fTUVSX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfU1RNX01FUl9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBRQU1fU0xfQ09NTV9JTlRfU1RNX01FUl9TVE1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fU0xfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQzMDAxMAorI2RlZmluZSBRQU1fU0xfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIFFBTV9TTF9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgUUFNX1NMX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9TTF9NT0RFX1NMSUNFUjRMQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9TTElDRVI0TENfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgUUFNX1NMX01PREVfU0xJQ0VSNExDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgUUFNX1NMX01PREVfU0xJQ0VSNExDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fU0xfTU9ERV9TTElDRVI0TENfUkVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fU0xfTU9ERV9TTElDRVI0TENfT05FVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBRQU1fU0xfTU9ERV9TTElDRVI0TENfUkFEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9TTElDRVI0RFFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgUUFNX1NMX01PREVfU0xJQ0VSNERRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9TTF9NT0RFX1NMSUNFUjREUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QworI2RlZmluZSAgIFFBTV9TTF9NT0RFX1NMSUNFUjREUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX1NMX01PREVfU0xJQ0VSNERRX1JFQ1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX1NMX01PREVfU0xJQ0VSNERRX09ORVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgUUFNX1NMX01PREVfU0xJQ0VSNERRX1JBRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lICAgUUFNX1NMX01PREVfU0xJQ0VSNFZEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFFBTV9TTF9NT0RFX1NMSUNFUjRWRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9TTElDRVI0VkRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCisjZGVmaW5lICAgUUFNX1NMX01PREVfU0xJQ0VSNFZEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fU0xfTU9ERV9TTElDRVI0VkRfUkVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fU0xfTU9ERV9TTElDRVI0VkRfT05FVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgICAgUUFNX1NMX01PREVfU0xJQ0VSNFZEX1JBRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKworI2RlZmluZSAgIFFBTV9TTF9NT0RFX1JPVF9ESVNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9ST1RfRElTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NMX01PREVfUk9UX0RJU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFFBTV9TTF9NT0RFX1JPVF9ESVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1NMX01PREVfRFFST1RfRElTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFFBTV9TTF9NT0RFX0RRUk9UX0RJU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9EUVJPVF9ESVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgUUFNX1NMX01PREVfRFFST1RfRElTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9ERkVfRElTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgUUFNX1NMX01PREVfREZFX0RJU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TTF9NT0RFX0RGRV9ESVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgUUFNX1NMX01PREVfREZFX0RJU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9SQURJVVNfTUlYX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lICAgUUFNX1NMX01PREVfUkFESVVTX01JWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TTF9NT0RFX1JBRElVU19NSVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwCisjZGVmaW5lICAgUUFNX1NMX01PREVfUkFESVVTX01JWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9USUxUX0NPTVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSAgIFFBTV9TTF9NT0RFX1RJTFRfQ09NUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU0xfTU9ERV9USUxUX0NPTVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMAorI2RlZmluZSAgIFFBTV9TTF9NT0RFX1RJTFRfQ09NUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9TTF9LX0ZBQ1RPUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDMwMDExCisjZGVmaW5lIFFBTV9TTF9LX0ZBQ1RPUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBRQU1fU0xfS19GQUNUT1JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBRQU1fU0xfS19GQUNUT1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBRQU1fU0xfTUVESUFOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQzMDAxMgorI2RlZmluZSBRQU1fU0xfTUVESUFOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIFFBTV9TTF9NRURJQU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lIFFBTV9TTF9NRURJQU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fU0xfTUVESUFOX0xFTkdUSF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9MRU5HVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9TTF9NRURJQU5fTEVOR1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFFBTV9TTF9NRURJQU5fTEVOR1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9DT1JSRUNUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9TTF9NRURJQU5fQ09SUkVDVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBRQU1fU0xfTUVESUFOX0NPUlJFQ1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNDCisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9DT1JSRUNUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fU0xfTUVESUFOX1RPTEVSQU5DRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9UT0xFUkFOQ0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFFBTV9TTF9NRURJQU5fVE9MRVJBTkNFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZDMAorI2RlZmluZSAgIFFBTV9TTF9NRURJQU5fVE9MRVJBTkNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9GQVNUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgICBRQU1fU0xfTUVESUFOX0ZBU1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9GQVNUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwCisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9GQVNUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX1NMX0FMUEhBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MzAwMTMKKyNkZWZpbmUgUUFNX1NMX0FMUEhBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFFBTV9TTF9BTFBIQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIFFBTV9TTF9BTFBIQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX1NMX1BIQVNFTElNSVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MzAwMTQKKyNkZWZpbmUgUUFNX1NMX1BIQVNFTElNSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFFBTV9TTF9QSEFTRUxJTUlUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgUUFNX1NMX1BIQVNFTElNSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgUUFNX1NMX01UQV9MRU5HVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MzAwMTUKKyNkZWZpbmUgUUFNX1NMX01UQV9MRU5HVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9TTF9NVEFfTEVOR1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9TTF9NVEFfTEVOR1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBRQU1fU0xfTVRBX0xFTkdUSF9MRU5HVEhfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX1NMX01UQV9MRU5HVEhfTEVOR1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9TTF9NVEFfTEVOR1RIX0xFTkdUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFFBTV9TTF9NVEFfTEVOR1RIX0xFTkdUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lIFFBTV9TTF9NRURJQU5fRVJST1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDMwMDE2CisjZGVmaW5lIFFBTV9TTF9NRURJQU5fRVJST1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgUUFNX1NMX01FRElBTl9FUlJPUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBRQU1fU0xfTUVESUFOX0VSUk9SX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9FUlJPUl9NRURJQU5fRVJSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9TTF9NRURJQU5fRVJST1JfTUVESUFOX0VSUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgUUFNX1NMX01FRElBTl9FUlJPUl9NRURJQU5fRVJSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBRQU1fU0xfTUVESUFOX0VSUk9SX01FRElBTl9FUlJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fU0xfRVJSX1BPV0VSX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQzMDAxNworI2RlZmluZSBRQU1fU0xfRVJSX1BPV0VSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFFBTV9TTF9FUlJfUE9XRVJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFFBTV9TTF9FUlJfUE9XRVJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX0RRX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMDAKKyNkZWZpbmUgUUFNX0RRX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9EUV9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9EUV9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0RRX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0RRX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX0RRX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX01PREVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMTAKKyNkZWZpbmUgUUFNX0RRX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9EUV9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fRFFfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX0RRX01PREVfVEFQUkVTRVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9NT0RFX1RBUFJFU0VUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fRFFfTU9ERV9UQVBSRVNFVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fRFFfTU9ERV9UQVBSRVNFVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9EUV9NT0RFX1RBUFJFU0VUX1JTVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIFFBTV9EUV9NT0RFX1RBUExNU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fRFFfTU9ERV9UQVBMTVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0RRX01PREVfVEFQTE1TX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgUUFNX0RRX01PREVfVEFQTE1TX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fRFFfTU9ERV9UQVBMTVNfVVBEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfTU9ERV9UQVBEUkFJTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgUUFNX0RRX01PREVfVEFQRFJBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9EUV9NT0RFX1RBUERSQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFFBTV9EUV9NT0RFX1RBUERSQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX0RRX01PREVfVEFQRFJBSU5fRFJBSU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgUUFNX0RRX01PREVfRkJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFFBTV9EUV9NT0RFX0ZCX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBRQU1fRFFfTU9ERV9GQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4CisjZGVmaW5lICAgUUFNX0RRX01PREVfRkJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fRFFfTU9ERV9GQl9DTUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBRQU1fRFFfTU9ERV9GQl9SQURJVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgICBRQU1fRFFfTU9ERV9GQl9ERkIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgICAgUUFNX0RRX01PREVfRkJfVFJFTExJUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgKKworI2RlZmluZSBRQU1fRFFfTVVfRkFDVE9SX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxMQorI2RlZmluZSBRQU1fRFFfTVVfRkFDVE9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgUUFNX0RRX01VX0ZBQ1RPUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgUUFNX0RRX01VX0ZBQ1RPUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fRFFfTEFfRkFDVE9SX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxMgorI2RlZmluZSBRQU1fRFFfTEFfRkFDVE9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgUUFNX0RRX0xBX0ZBQ1RPUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgUUFNX0RRX0xBX0ZBQ1RPUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMKKworI2RlZmluZSBRQU1fRFFfQ01BX1JBVElPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxMworI2RlZmluZSBRQU1fRFFfQ01BX1JBVElPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIFFBTV9EUV9DTUFfUkFUSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lIFFBTV9EUV9DTUFfUkFUSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzQ0Y5CisjZGVmaW5lICAgUUFNX0RRX0NNQV9SQVRJT19RUFNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwCisjZGVmaW5lICAgUUFNX0RRX0NNQV9SQVRJT19RQU0xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzNENECisjZGVmaW5lICAgUUFNX0RRX0NNQV9SQVRJT19RQU02NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzQTAwCisjZGVmaW5lICAgUUFNX0RRX0NNQV9SQVRJT19RQU0yNTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzQjRECisjZGVmaW5lICAgUUFNX0RRX0NNQV9SQVRJT19RQU0xMDI0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzQkEwCisKKyNkZWZpbmUgUUFNX0RRX1FVQUxfUkFEU0VMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMTQKKyNkZWZpbmUgUUFNX0RRX1FVQUxfUkFEU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFFBTV9EUV9RVUFMX1JBRFNFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIFFBTV9EUV9RVUFMX1JBRFNFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9SQURTRUxfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1FVQUxfUkFEU0VMX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFFBTV9EUV9RVUFMX1JBRFNFTF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFFBTV9EUV9RVUFMX1JBRFNFTF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX0RRX1FVQUxfUkFEU0VMX0JJVF9QVVJFX1JBRElVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX0RRX1FVQUxfUkFEU0VMX0JJVF9QVVJFX0NNQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NgorCisjZGVmaW5lIFFBTV9EUV9RVUFMX0VOQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDE1CisjZGVmaW5lIFFBTV9EUV9RVUFMX0VOQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBRQU1fRFFfUVVBTF9FTkFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBRQU1fRFFfUVVBTF9FTkFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX0RRX1FVQUxfRU5BX0VOQV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9RVUFMX0VOQV9FTkFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9FTkFfRU5BX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9FTkFfRU5BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9EUV9RVUFMX0VOQV9FTkFfUVVBTF9XRUlHSFRJTkcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSBRQU1fRFFfUVVBTF9GVU4wX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxOAorI2RlZmluZSBRQU1fRFFfUVVBTF9GVU4wX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgUUFNX0RRX1FVQUxfRlVOMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFFBTV9EUV9RVUFMX0ZVTjBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU4wX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1FVQUxfRlVOMF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFFBTV9EUV9RVUFMX0ZVTjBfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU4wX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSBRQU1fRFFfUVVBTF9GVU4xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxOQorI2RlZmluZSBRQU1fRFFfUVVBTF9GVU4xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgUUFNX0RRX1FVQUxfRlVOMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFFBTV9EUV9RVUFMX0ZVTjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU4xX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1FVQUxfRlVOMV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFFBTV9EUV9RVUFMX0ZVTjFfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU4xX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSBRQU1fRFFfUVVBTF9GVU4yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxQQorI2RlZmluZSBRQU1fRFFfUVVBTF9GVU4yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgUUFNX0RRX1FVQUxfRlVOMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFFBTV9EUV9RVUFMX0ZVTjJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU4yX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1FVQUxfRlVOMl9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFFBTV9EUV9RVUFMX0ZVTjJfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU4yX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSBRQU1fRFFfUVVBTF9GVU4zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxQgorI2RlZmluZSBRQU1fRFFfUVVBTF9GVU4zX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgUUFNX0RRX1FVQUxfRlVOM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFFBTV9EUV9RVUFMX0ZVTjNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU4zX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1FVQUxfRlVOM19CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFFBTV9EUV9RVUFMX0ZVTjNfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU4zX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSBRQU1fRFFfUVVBTF9GVU40X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxQworI2RlZmluZSBRQU1fRFFfUVVBTF9GVU40X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgUUFNX0RRX1FVQUxfRlVONF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFFBTV9EUV9RVUFMX0ZVTjRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU40X0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1FVQUxfRlVONF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFFBTV9EUV9RVUFMX0ZVTjRfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU40X0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYKKworI2RlZmluZSBRQU1fRFFfUVVBTF9GVU41X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxRAorI2RlZmluZSBRQU1fRFFfUVVBTF9GVU41X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgUUFNX0RRX1FVQUxfRlVONV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFFBTV9EUV9RVUFMX0ZVTjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU41X0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1FVQUxfRlVONV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFFBTV9EUV9RVUFMX0ZVTjVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBRQU1fRFFfUVVBTF9GVU41X0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYKKworI2RlZmluZSBRQU1fRFFfUkFXX0xJTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAxRQorI2RlZmluZSBRQU1fRFFfUkFXX0xJTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgUUFNX0RRX1JBV19MSU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lIFFBTV9EUV9SQVdfTElNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorCisjZGVmaW5lICAgUUFNX0RRX1JBV19MSU1fQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9SQVdfTElNX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fRFFfUkFXX0xJTV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0RRX1JBV19MSU1fQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDIwCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDBfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwwX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDBfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAyMQorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwwX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwwX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDBfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMjIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMV9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDFfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMV9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDIzCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDFfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDFfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAyNAorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMl9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDJfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMjUKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMl9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDJfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMl9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDI2CisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDNfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwzX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDNfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMM19UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAyNworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwzX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwzX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMM19UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwzX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDNfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMjgKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUw0X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMNF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDRfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMNF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUw0X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUw0X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDI5CisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUw0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDRfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUw0X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDRfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMNF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAyQQorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUw1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUw1X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMNV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUw1X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDVfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMkIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUw1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMNV9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDVfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMNV9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUw1X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUw2X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDJDCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUw2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDZfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUw2X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDZfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMNl9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAyRAorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUw2X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUw2X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMNl9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUw2X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDZfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMkUKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUw3X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMN19UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDdfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMN19UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUw3X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUw3X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDJGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUw3X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDdfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUw3X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDdfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMN19UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAzMAorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMOF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUw4X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUw4X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMOF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUw4X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDhfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMzEKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUw4X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMOF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDhfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMOF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUw4X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUw5X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDMyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUw5X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDlfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUw5X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDlfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMOV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAzMworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUw5X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUw5X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMOV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUw5X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDlfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMzQKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTBfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDEwX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTBfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxMF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDM1CisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDEwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDEwX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxMF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDEwX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTBfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAzNgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDExX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxMV9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTFfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxMV9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDExX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDExX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwMzcKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTFfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDExX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTFfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxMV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDM4CisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDEyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDEyX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxMl9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDEyX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTJfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAzOQorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDEyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxMl9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTJfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxMl9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDEyX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDEzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwM0EKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDEzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTNfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDEzX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTNfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxM19UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDNCCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDEzX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDEzX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxM19UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDEzX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTNfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAzQworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDE0X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxNF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTRfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxNF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDE0X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDE0X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwM0QKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDE0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTRfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDE0X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTRfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxNF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDNFCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDE1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDE1X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxNV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDE1X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTVfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDAzRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDE1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxNV9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTVfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxNV9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDE1X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDE2X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwNDAKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDE2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTZfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDE2X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTZfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxNl9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDQxCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDE2X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDE2X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxNl9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDE2X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTZfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDA0MgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDE3X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxN19UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTdfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxN19UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDE3X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDE3X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwNDMKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDE3X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTdfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDE3X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTdfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxN19UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDQ0CisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxOF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDE4X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMThfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDE4X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxOF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDE4X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMThfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMThfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDA0NQorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMThfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDE4X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxOF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMThfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxOF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDE4X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDE5X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwNDYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDE5X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMTlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwxOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTlfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDE5X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMTlfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwxOV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDQ3CisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwxOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDE5X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMTlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDE5X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwxOV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDE5X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMTlfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDA0OAorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDIwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyMF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjBfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyMF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDIwX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDIwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwNDkKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDIwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjBfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDIwX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjBfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyMF9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDRBCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDIxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDIxX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyMV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDIxX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjFfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDA0QgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDIxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyMV9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjFfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyMV9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDIxX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDIyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwNEMKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDIyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjJfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDIyX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjJfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyMl9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDRECisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDIyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDIyX1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyMl9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDIyX1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjJfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDA0RQorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDIzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyM19UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjNfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyM19UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDIzX1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDIzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwNEYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDIzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjNfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDIzX1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjNfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyM19UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDUwCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDI0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDI0X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyNF9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDI0X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjRfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDA1MQorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDI0X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyNF9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjRfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyNF9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDI0X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDI1X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwNTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDI1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjVfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDI1X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjVfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyNV9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDUzCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDI1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDI1X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyNV9UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDI1X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjVfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDA1NAorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDI2X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyNl9UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjZfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyNl9UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDI2X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDI2X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NDAwNTUKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDI2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjZfVEFQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDI2X1RBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjZfVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyNl9UQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDQwMDU2CisjZGVmaW5lIFFBTV9EUV9UQVBfUkVfRUwyN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgUUFNX0RRX1RBUF9SRV9FTDI3X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBRQU1fRFFfVEFQX1JFX0VMMjdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDI3X1RBUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9EUV9UQVBfUkVfRUwyN19UQVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX0RRX1RBUF9SRV9FTDI3X1RBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fRFFfVEFQX1JFX0VMMjdfVEFQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ0MDA1NworI2RlZmluZSBRQU1fRFFfVEFQX0lNX0VMMjdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFFBTV9EUV9UQVBfSU1fRUwyN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgUUFNX0RRX1RBUF9JTV9FTDI3X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyN19UQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fRFFfVEFQX0lNX0VMMjdfVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFFBTV9EUV9UQVBfSU1fRUwyN19UQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lICAgUUFNX0RRX1RBUF9JTV9FTDI3X1RBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0xDX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMDAKKyNkZWZpbmUgUUFNX0xDX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9MQ19DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9MQ19DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX0xDX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMDIKKyNkZWZpbmUgUUFNX0xDX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9MQ19DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9MQ19DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fTUJfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19DT01NX01CX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9NQl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9NQl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9MQ19DT01NX01CX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9MQ19DT01NX01CX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9MQ19DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9MQ19DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX0xDX0NPTU1fTUJfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX0xDX0NPTU1fTUJfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9MQ19DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDUwMDAzCisjZGVmaW5lIFFBTV9MQ19DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBRQU1fTENfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBRQU1fTENfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBRQU1fTENfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAwNQorI2RlZmluZSBRQU1fTENfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgUUFNX0xDX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgUUFNX0xDX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9TVEFfUkVBRFlfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfU1RBX1JFQURZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX1NUQV9SRUFEWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX1NUQV9SRUFEWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfU1RBX09WRVJGTE9XX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX1NUQV9PVkVSRkxPV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9TVEFfT1ZFUkZMT1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9TVEFfT1ZFUkZMT1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX1NUQV9GUkVRX1dSQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9TVEFfRlJFUV9XUkFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfU1RBX0ZSRVFfV1JBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfU1RBX0ZSRVFfV1JBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fTENfQ09NTV9JTlRfTVNLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAwNgorI2RlZmluZSBRQU1fTENfQ09NTV9JTlRfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgUUFNX0xDX0NPTU1fSU5UX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgUUFNX0xDX0NPTU1fSU5UX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfTVNLX1JFQURZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX01TS19SRUFEWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9NU0tfUkVBRFlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9NU0tfUkVBRFlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9NU0tfT1ZFUkZMT1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfTVNLX09WRVJGTE9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX01TS19PVkVSRkxPV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX01TS19PVkVSRkxPV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX01TS19GUkVRX1dSQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9NU0tfRlJFUV9XUkFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfTVNLX0ZSRVFfV1JBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfTVNLX0ZSRVFfV1JBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fTENfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAwNworI2RlZmluZSBRQU1fTENfQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgUUFNX0xDX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgUUFNX0xDX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfU1RNX1JFQURZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX1NUTV9SRUFEWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9TVE1fUkVBRFlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9TVE1fUkVBRFlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9TVE1fT1ZFUkZMT1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfU1RNX09WRVJGTE9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX1NUTV9PVkVSRkxPV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX1NUTV9PVkVSRkxPV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX0xDX0NPTU1fSU5UX1NUTV9GUkVRX1dSQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9MQ19DT01NX0lOVF9TVE1fRlJFUV9XUkFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfU1RNX0ZSRVFfV1JBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBRQU1fTENfQ09NTV9JTlRfU1RNX0ZSRVFfV1JBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fTENfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAxMAorI2RlZmluZSBRQU1fTENfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgUUFNX0xDX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgUUFNX0xDX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKworI2RlZmluZSAgIFFBTV9MQ19NT0RFX0VOQUJMRV9BX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fTENfTU9ERV9FTkFCTEVfQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0xDX01PREVfRU5BQkxFX0FfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX0xDX01PREVfRU5BQkxFX0FfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBRQU1fTENfTU9ERV9FTkFCTEVfRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX0xDX01PREVfRU5BQkxFX0ZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9MQ19NT0RFX0VOQUJMRV9GX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9MQ19NT0RFX0VOQUJMRV9GX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0xDX01PREVfRU5BQkxFX1JfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9MQ19NT0RFX0VOQUJMRV9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fTENfTU9ERV9FTkFCTEVfUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBRQU1fTENfTU9ERV9FTkFCTEVfUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSBRQU1fTENfQ0FfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAxMQorI2RlZmluZSBRQU1fTENfQ0FfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgUUFNX0xDX0NBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFFBTV9MQ19DQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOAorCisjZGVmaW5lICAgUUFNX0xDX0NBX0NPRUZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19DQV9DT0VGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBRQU1fTENfQ0FfQ09FRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lICAgUUFNX0xDX0NBX0NPRUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyOAorCisjZGVmaW5lIFFBTV9MQ19DRl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDUwMDEyCisjZGVmaW5lIFFBTV9MQ19DRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBRQU1fTENfQ0ZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgUUFNX0xDX0NGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDhDCisKKyNkZWZpbmUgICBRQU1fTENfQ0ZfQ09FRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX0NGX0NPRUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFFBTV9MQ19DRl9DT0VGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBRQU1fTENfQ0ZfQ09FRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDhDCisKKyNkZWZpbmUgUUFNX0xDX0NGMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMTMKKyNkZWZpbmUgUUFNX0xDX0NGMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFFBTV9MQ19DRjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBRQU1fTENfQ0YxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUUKKworI2RlZmluZSAgIFFBTV9MQ19DRjFfQ09FRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fTENfQ0YxX0NPRUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgUUFNX0xDX0NGMV9DT0VGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFFBTV9MQ19DRjFfQ09FRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUUKKworI2RlZmluZSBRQU1fTENfQ1BfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAxNAorI2RlZmluZSBRQU1fTENfQ1BfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgUUFNX0xDX0NQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFFBTV9MQ19DUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3OAorCisjZGVmaW5lICAgUUFNX0xDX0NQX0NPRUZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19DUF9DT0VGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBRQU1fTENfQ1BfQ09FRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgUUFNX0xDX0NQX0NPRUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3OAorCisjZGVmaW5lIFFBTV9MQ19DSV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDUwMDE1CisjZGVmaW5lIFFBTV9MQ19DSV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBRQU1fTENfQ0lfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgUUFNX0xDX0NJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2CisKKyNkZWZpbmUgICBRQU1fTENfQ0lfQ09FRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX0NJX0NPRUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFFBTV9MQ19DSV9DT0VGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBRQU1fTENfQ0lfQ09FRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2CisKKyNkZWZpbmUgUUFNX0xDX0VQX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMTYKKyNkZWZpbmUgUUFNX0xDX0VQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIFFBTV9MQ19FUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRgorI2RlZmluZSBRQU1fTENfRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX0xDX0VQX0NPRUZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19FUF9DT0VGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBRQU1fTENfRVBfQ09FRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lICAgUUFNX0xDX0VQX0NPRUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX0xDX0VJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMTcKKyNkZWZpbmUgUUFNX0xDX0VJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIFFBTV9MQ19FSV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRgorI2RlZmluZSBRQU1fTENfRUlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX0xDX0VJX0NPRUZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19FSV9DT0VGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBRQU1fTENfRUlfQ09FRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lICAgUUFNX0xDX0VJX0NPRUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMTgKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMF9WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjBfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIwX1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMF9WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMTkKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMV9WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjFfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIxX1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMV9WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMUEKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMl9WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjJfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIyX1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMl9WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMUIKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCM19WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjNfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIzX1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCM19WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMUMKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUI0X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCNF9WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjRfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUI0X1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCNF9WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMUQKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUI1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCNV9WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjVfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUI1X1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCNV9WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMUUKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUI2X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCNl9WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjZfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUI2X1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCNl9WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMUYKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCOF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUI4X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCOF9WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjhfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUI4X1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCOF9WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMjAKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUI5X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCOV9WQUxVRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjlfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUI5X1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCOV9WQUxVRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMTBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMjEKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMTBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjEwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIxMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMTBfVkFMVUVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjEwX1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIxMF9WQUxVRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMTBfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMjIKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjEyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIxMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMTJfVkFMVUVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjEyX1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIxMl9WQUxVRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMTJfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMTVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMjMKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMTVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjE1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIxNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMTVfVkFMVUVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjE1X1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIxNV9WQUxVRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMTVfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMTZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMjQKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMTZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjE2X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIxNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMTZfVkFMVUVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjE2X1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIxNl9WQUxVRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMTZfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMjBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMjUKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMjBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjIwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIyMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMjBfVkFMVUVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjIwX1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIyMF9WQUxVRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMjBfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMjVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMjYKKyNkZWZpbmUgUUFNX0xDX1FVQUxfVEFCMjVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9MQ19RVUFMX1RBQjI1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fTENfUVVBTF9UQUIyNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMjVfVkFMVUVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19RVUFMX1RBQjI1X1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBRQU1fTENfUVVBTF9UQUIyNV9WQUxVRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGCisjZGVmaW5lICAgUUFNX0xDX1FVQUxfVEFCMjVfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgUUFNX0xDX0VRX1RJTUlOR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMjcKKyNkZWZpbmUgUUFNX0xDX0VRX1RJTUlOR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBRQU1fTENfRVFfVElNSU5HX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIFFBTV9MQ19FUV9USU1JTkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fTENfRVFfVElNSU5HX09GRlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX0VRX1RJTUlOR19PRkZTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBRQU1fTENfRVFfVElNSU5HX09GRlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSAgIFFBTV9MQ19FUV9USU1JTkdfT0ZGU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9MQ19MUEZfRkFDVE9SUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDUwMDI4CisjZGVmaW5lIFFBTV9MQ19MUEZfRkFDVE9SUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBRQU1fTENfTFBGX0ZBQ1RPUlBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSBRQU1fTENfTFBGX0ZBQ1RPUlBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lICAgUUFNX0xDX0xQRl9GQUNUT1JQX0ZBQ1RPUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19MUEZfRkFDVE9SUF9GQUNUT1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBRQU1fTENfTFBGX0ZBQ1RPUlBfRkFDVE9SX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBRQU1fTENfTFBGX0ZBQ1RPUlBfRkFDVE9SX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSBRQU1fTENfTFBGX0ZBQ1RPUklfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAyOQorI2RlZmluZSBRQU1fTENfTFBGX0ZBQ1RPUklfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgUUFNX0xDX0xQRl9GQUNUT1JJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgUUFNX0xDX0xQRl9GQUNUT1JJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSAgIFFBTV9MQ19MUEZfRkFDVE9SSV9GQUNUT1JfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fTENfTFBGX0ZBQ1RPUklfRkFDVE9SX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgUUFNX0xDX0xQRl9GQUNUT1JJX0ZBQ1RPUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgUUFNX0xDX0xQRl9GQUNUT1JJX0ZBQ1RPUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgUUFNX0xDX1JBVEVfTElNSVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMkEKKyNkZWZpbmUgUUFNX0xDX1JBVEVfTElNSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9MQ19SQVRFX0xJTUlUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9MQ19SQVRFX0xJTUlUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgICBRQU1fTENfUkFURV9MSU1JVF9MSU1JVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX1JBVEVfTElNSVRfTElNSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9MQ19SQVRFX0xJTUlUX0xJTUlUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFFBTV9MQ19SQVRFX0xJTUlUX0xJTUlUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIFFBTV9MQ19TWU1CT0xfRlJFUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDUwMDJCCisjZGVmaW5lIFFBTV9MQ19TWU1CT0xfRlJFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgUUFNX0xDX1NZTUJPTF9GUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBRQU1fTENfU1lNQk9MX0ZSRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTk5CisKKyNkZWZpbmUgICBRQU1fTENfU1lNQk9MX0ZSRVFfRlJFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX1NZTUJPTF9GUkVRX0ZSRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBRQU1fTENfU1lNQk9MX0ZSRVFfRlJFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSAgIFFBTV9MQ19TWU1CT0xfRlJFUV9GUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTk5CisjZGVmaW5lICAgICBRQU1fTENfU1lNQk9MX0ZSRVFfRlJFUV9RQU1fQl82NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTcKKyNkZWZpbmUgICAgIFFBTV9MQ19TWU1CT0xfRlJFUV9GUkVRX1FBTV9CXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFCMgorCisjZGVmaW5lIFFBTV9MQ19NVEFfTEVOR1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDUwMDJDCisjZGVmaW5lIFFBTV9MQ19NVEFfTEVOR1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBRQU1fTENfTVRBX0xFTkdUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBRQU1fTENfTVRBX0xFTkdUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgUUFNX0xDX01UQV9MRU5HVEhfTEVOR1RIX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19NVEFfTEVOR1RIX0xFTkdUSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBRQU1fTENfTVRBX0xFTkdUSF9MRU5HVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBRQU1fTENfTVRBX0xFTkdUSF9MRU5HVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBRQU1fTENfQU1QX0FDQ1VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAyRAorI2RlZmluZSBRQU1fTENfQU1QX0FDQ1VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIFFBTV9MQ19BTVBfQUNDVV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lIFFBTV9MQ19BTVBfQUNDVV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2MDAKKworI2RlZmluZSAgIFFBTV9MQ19BTVBfQUNDVV9BQ0NVX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fTENfQU1QX0FDQ1VfQUNDVV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSAgIFFBTV9MQ19BTVBfQUNDVV9BQ0NVX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSAgIFFBTV9MQ19BTVBfQUNDVV9BQ0NVX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjAwCisKKyNkZWZpbmUgUUFNX0xDX0ZSRVFfQUNDVV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMkUKKyNkZWZpbmUgUUFNX0xDX0ZSRVFfQUNDVV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBRQU1fTENfRlJFUV9BQ0NVX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIFFBTV9MQ19GUkVRX0FDQ1VfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fTENfRlJFUV9BQ0NVX0FDQ1VfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX0ZSRVFfQUNDVV9BQ0NVX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBRQU1fTENfRlJFUV9BQ0NVX0FDQ1VfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSAgIFFBTV9MQ19GUkVRX0FDQ1VfQUNDVV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9MQ19SQVRFX0FDQ1VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDUwMDJGCisjZGVmaW5lIFFBTV9MQ19SQVRFX0FDQ1VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgUUFNX0xDX1JBVEVfQUNDVV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBRQU1fTENfUkFURV9BQ0NVX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX0xDX1JBVEVfQUNDVV9BQ0NVX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19SQVRFX0FDQ1VfQUNDVV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgUUFNX0xDX1JBVEVfQUNDVV9BQ0NVX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBRQU1fTENfUkFURV9BQ0NVX0FDQ1VfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fTENfQU1QTElUVURFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAzMAorI2RlZmluZSBRQU1fTENfQU1QTElUVURFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFFBTV9MQ19BTVBMSVRVREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgUUFNX0xDX0FNUExJVFVERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9MQ19BTVBMSVRVREVfU0laRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fTENfQU1QTElUVURFX1NJWkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSAgIFFBTV9MQ19BTVBMSVRVREVfU0laRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lICAgUUFNX0xDX0FNUExJVFVERV9TSVpFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX0xDX1JBRF9FUlJPUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NTAwMzEKKyNkZWZpbmUgUUFNX0xDX1JBRF9FUlJPUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBRQU1fTENfUkFEX0VSUk9SX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIFFBTV9MQ19SQURfRVJST1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fTENfUkFEX0VSUk9SX1NJWkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX0xDX1JBRF9FUlJPUl9TSVpFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBRQU1fTENfUkFEX0VSUk9SX1NJWkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSAgIFFBTV9MQ19SQURfRVJST1JfU0laRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9MQ19GUkVRX09GRlNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDUwMDMyCisjZGVmaW5lIFFBTV9MQ19GUkVRX09GRlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgUUFNX0xDX0ZSRVFfT0ZGU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBRQU1fTENfRlJFUV9PRkZTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX0xDX0ZSRVFfT0ZGU19PRkZTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9MQ19GUkVRX09GRlNfT0ZGU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgUUFNX0xDX0ZSRVFfT0ZGU19PRkZTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBRQU1fTENfRlJFUV9PRkZTX09GRlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fTENfUEhBU0VfRVJST1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1MDAzMworI2RlZmluZSBRQU1fTENfUEhBU0VfRVJST1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFFBTV9MQ19QSEFTRV9FUlJPUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgUUFNX0xDX1BIQVNFX0VSUk9SX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9MQ19QSEFTRV9FUlJPUl9TSVpFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fTENfUEhBU0VfRVJST1JfU0laRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSAgIFFBTV9MQ19QSEFTRV9FUlJPUl9TSVpFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lICAgUUFNX0xDX1BIQVNFX0VSUk9SX1NJWkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX1ZEX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMDAKKyNkZWZpbmUgUUFNX1ZEX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9WRF9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9WRF9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX1ZEX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMDIKKyNkZWZpbmUgUUFNX1ZEX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9WRF9DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9WRF9DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fTUJfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9DT01NX01CX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9NQl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9NQl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9WRF9DT01NX01CX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9WRF9DT01NX01CX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9WRF9DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9WRF9DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX1ZEX0NPTU1fTUJfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX1ZEX0NPTU1fTUJfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9WRF9DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDYwMDAzCisjZGVmaW5lIFFBTV9WRF9DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBRQU1fVkRfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBRQU1fVkRfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBRQU1fVkRfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ2MDAwNQorI2RlZmluZSBRQU1fVkRfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgUUFNX1ZEX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgUUFNX1ZEX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9WRF9DT01NX0lOVF9TVEFfTE9DS19JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9JTlRfU1RBX0xPQ0tfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX1NUQV9MT0NLX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX1NUQV9MT0NLX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9JTlRfU1RBX1BFUklPRF9JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX1NUQV9QRVJJT0RfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9WRF9DT01NX0lOVF9TVEFfUEVSSU9EX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9WRF9DT01NX0lOVF9TVEFfUEVSSU9EX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9WRF9DT01NX0lOVF9NU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDYwMDA2CisjZGVmaW5lIFFBTV9WRF9DT01NX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBRQU1fVkRfQ09NTV9JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBRQU1fVkRfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFFBTV9WRF9DT01NX0lOVF9NU0tfTE9DS19JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9JTlRfTVNLX0xPQ0tfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX01TS19MT0NLX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX01TS19MT0NLX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX01TS19QRVJJT0RfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9WRF9DT01NX0lOVF9NU0tfUEVSSU9EX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9JTlRfTVNLX1BFUklPRF9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9JTlRfTVNLX1BFUklPRF9JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fVkRfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ2MDAwNworI2RlZmluZSBRQU1fVkRfQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgUUFNX1ZEX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgUUFNX1ZEX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9JTlRfU1RNX0xPQ0tfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX1NUTV9MT0NLX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9WRF9DT01NX0lOVF9TVE1fTE9DS19JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFFBTV9WRF9DT01NX0lOVF9TVE1fTE9DS19JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFFBTV9WRF9DT01NX0lOVF9TVE1fUEVSSU9EX0lOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fVkRfQ09NTV9JTlRfU1RNX1BFUklPRF9JTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX1NUTV9QRVJJT0RfSU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgUUFNX1ZEX0NPTU1fSU5UX1NUTV9QRVJJT0RfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX1ZEX1NUQVRVU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMTAKKyNkZWZpbmUgUUFNX1ZEX1NUQVRVU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFFBTV9WRF9TVEFUVVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFFBTV9WRF9TVEFUVVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fVkRfU1RBVFVTX0xPQ0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX1ZEX1NUQVRVU19MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9WRF9TVEFUVVNfTE9DS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFFBTV9WRF9TVEFUVVNfTE9DS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9WRF9VTkxPQ0tfQ09OVFJPTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDYwMDExCisjZGVmaW5lIFFBTV9WRF9VTkxPQ0tfQ09OVFJPTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBRQU1fVkRfVU5MT0NLX0NPTlRST0xfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBRQU1fVkRfVU5MT0NLX0NPTlRST0xfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1ZEX1VOTE9DS19DT05UUk9MX1VOTE9DS19DVFJMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9VTkxPQ0tfQ09OVFJPTF9VTkxPQ0tfQ1RSTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fVkRfVU5MT0NLX0NPTlRST0xfVU5MT0NLX0NUUkxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fVkRfVU5MT0NLX0NPTlRST0xfVU5MT0NLX0NUUkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fVkRfTUlOX1ZPVElOR19ST1VORFNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ2MDAxMgorI2RlZmluZSBRQU1fVkRfTUlOX1ZPVElOR19ST1VORFNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgUUFNX1ZEX01JTl9WT1RJTkdfUk9VTkRTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFFBTV9WRF9NSU5fVk9USU5HX1JPVU5EU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorCisjZGVmaW5lICAgUUFNX1ZEX01JTl9WT1RJTkdfUk9VTkRTX1JPVU5EU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9NSU5fVk9USU5HX1JPVU5EU19ST1VORFNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBRQU1fVkRfTUlOX1ZPVElOR19ST1VORFNfUk9VTkRTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lICAgUUFNX1ZEX01JTl9WT1RJTkdfUk9VTkRTX1JPVU5EU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorCisjZGVmaW5lIFFBTV9WRF9NQVhfVk9USU5HX1JPVU5EU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDYwMDEzCisjZGVmaW5lIFFBTV9WRF9NQVhfVk9USU5HX1JPVU5EU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBRQU1fVkRfTUFYX1ZPVElOR19ST1VORFNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgUUFNX1ZEX01BWF9WT1RJTkdfUk9VTkRTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisKKyNkZWZpbmUgICBRQU1fVkRfTUFYX1ZPVElOR19ST1VORFNfUk9VTkRTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX1ZEX01BWF9WT1RJTkdfUk9VTkRTX1JPVU5EU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFFBTV9WRF9NQVhfVk9USU5HX1JPVU5EU19ST1VORFNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBRQU1fVkRfTUFYX1ZPVElOR19ST1VORFNfUk9VTkRTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisKKyNkZWZpbmUgUUFNX1ZEX1RSQUNFQkFDS19ERVBUSF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMTQKKyNkZWZpbmUgUUFNX1ZEX1RSQUNFQkFDS19ERVBUSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFFBTV9WRF9UUkFDRUJBQ0tfREVQVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBRQU1fVkRfVFJBQ0VCQUNLX0RFUFRIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKworI2RlZmluZSAgIFFBTV9WRF9UUkFDRUJBQ0tfREVQVEhfTEVOR1RIX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fVkRfVFJBQ0VCQUNLX0RFUFRIX0xFTkdUSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgUUFNX1ZEX1RSQUNFQkFDS19ERVBUSF9MRU5HVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSAgIFFBTV9WRF9UUkFDRUJBQ0tfREVQVEhfTEVOR1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKworI2RlZmluZSBRQU1fVkRfVU5MT0NLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ2MDAxNQorI2RlZmluZSBRQU1fVkRfVU5MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUUFNX1ZEX1VOTE9DS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgUUFNX1ZEX1VOTE9DS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgUUFNX1ZEX01FQVNVUkVNRU5UX1BFUklPRF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMTYKKyNkZWZpbmUgUUFNX1ZEX01FQVNVUkVNRU5UX1BFUklPRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBRQU1fVkRfTUVBU1VSRU1FTlRfUEVSSU9EX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBRQU1fVkRfTUVBU1VSRU1FTlRfUEVSSU9EX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODIzNgorCisjZGVmaW5lICAgUUFNX1ZEX01FQVNVUkVNRU5UX1BFUklPRF9QRVJJT0RfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9NRUFTVVJFTUVOVF9QRVJJT0RfUEVSSU9EX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgUUFNX1ZEX01FQVNVUkVNRU5UX1BFUklPRF9QRVJJT0RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgUUFNX1ZEX01FQVNVUkVNRU5UX1BFUklPRF9QRVJJT0RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MjM2CisKKyNkZWZpbmUgUUFNX1ZEX01FQVNVUkVNRU5UX1BSRVNDQUxFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMTcKKyNkZWZpbmUgUUFNX1ZEX01FQVNVUkVNRU5UX1BSRVNDQUxFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBRQU1fVkRfTUVBU1VSRU1FTlRfUFJFU0NBTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBRQU1fVkRfTUVBU1VSRU1FTlRfUFJFU0NBTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgUUFNX1ZEX01FQVNVUkVNRU5UX1BSRVNDQUxFX1BSRVNDQUxFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9NRUFTVVJFTUVOVF9QUkVTQ0FMRV9QUkVTQ0FMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgUUFNX1ZEX01FQVNVUkVNRU5UX1BSRVNDQUxFX1BSRVNDQUxFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgUUFNX1ZEX01FQVNVUkVNRU5UX1BSRVNDQUxFX1BSRVNDQUxFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgUUFNX1ZEX0RFTFRBX1BBVEhfTUVUUklDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMTgKKyNkZWZpbmUgUUFNX1ZEX0RFTFRBX1BBVEhfTUVUUklDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBRQU1fVkRfREVMVEFfUEFUSF9NRVRSSUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBRQU1fVkRfREVMVEFfUEFUSF9NRVRSSUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorCisjZGVmaW5lICAgUUFNX1ZEX0RFTFRBX1BBVEhfTUVUUklDX0ZJWEVEX01BTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9ERUxUQV9QQVRIX01FVFJJQ19GSVhFRF9NQU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX1ZEX0RFTFRBX1BBVEhfTUVUUklDX0ZJWEVEX01BTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fVkRfREVMVEFfUEFUSF9NRVRSSUNfRklYRURfTUFOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorCisjZGVmaW5lICAgUUFNX1ZEX0RFTFRBX1BBVEhfTUVUUklDX0VYUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fVkRfREVMVEFfUEFUSF9NRVRSSUNfRVhQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgUUFNX1ZEX0RFTFRBX1BBVEhfTUVUUklDX0VYUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAwCisjZGVmaW5lICAgUUFNX1ZEX0RFTFRBX1BBVEhfTUVUUklDX0VYUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAwCisKKyNkZWZpbmUgUUFNX1ZEX05SX1FTWU1fRVJST1JTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMTkKKyNkZWZpbmUgUUFNX1ZEX05SX1FTWU1fRVJST1JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBRQU1fVkRfTlJfUVNZTV9FUlJPUlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBRQU1fVkRfTlJfUVNZTV9FUlJPUlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorCisjZGVmaW5lICAgUUFNX1ZEX05SX1FTWU1fRVJST1JTX0ZJWEVEX01BTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9OUl9RU1lNX0VSUk9SU19GSVhFRF9NQU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX1ZEX05SX1FTWU1fRVJST1JTX0ZJWEVEX01BTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fVkRfTlJfUVNZTV9FUlJPUlNfRklYRURfTUFOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorCisjZGVmaW5lICAgUUFNX1ZEX05SX1FTWU1fRVJST1JTX0VYUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fVkRfTlJfUVNZTV9FUlJPUlNfRVhQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgUUFNX1ZEX05SX1FTWU1fRVJST1JTX0VYUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAwCisjZGVmaW5lICAgUUFNX1ZEX05SX1FTWU1fRVJST1JTX0VYUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAwCisKKyNkZWZpbmUgUUFNX1ZEX05SX1NZTUJPTF9FUlJPUlNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMUEKKyNkZWZpbmUgUUFNX1ZEX05SX1NZTUJPTF9FUlJPUlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBRQU1fVkRfTlJfU1lNQk9MX0VSUk9SU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBRQU1fVkRfTlJfU1lNQk9MX0VSUk9SU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorCisjZGVmaW5lICAgUUFNX1ZEX05SX1NZTUJPTF9FUlJPUlNfRklYRURfTUFOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9OUl9TWU1CT0xfRVJST1JTX0ZJWEVEX01BTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgUUFNX1ZEX05SX1NZTUJPTF9FUlJPUlNfRklYRURfTUFOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBRQU1fVkRfTlJfU1lNQk9MX0VSUk9SU19GSVhFRF9NQU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorCisjZGVmaW5lICAgUUFNX1ZEX05SX1NZTUJPTF9FUlJPUlNfRVhQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBRQU1fVkRfTlJfU1lNQk9MX0VSUk9SU19FWFBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgUUFNX1ZEX05SX1NZTUJPTF9FUlJPUlNfRVhQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAwCisjZGVmaW5lICAgUUFNX1ZEX05SX1NZTUJPTF9FUlJPUlNfRVhQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAwCisKKyNkZWZpbmUgUUFNX1ZEX1JFTE9DS19DT1VOVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NjAwMUIKKyNkZWZpbmUgUUFNX1ZEX1JFTE9DS19DT1VOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBRQU1fVkRfUkVMT0NLX0NPVU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBRQU1fVkRfUkVMT0NLX0NPVU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1ZEX1JFTE9DS19DT1VOVF9DT1VOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9WRF9SRUxPQ0tfQ09VTlRfQ09VTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBRQU1fVkRfUkVMT0NLX0NPVU5UX0NPVU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgUUFNX1ZEX1JFTE9DS19DT1VOVF9DT1VOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX1NZX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NzAwMDAKKyNkZWZpbmUgUUFNX1NZX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9TWV9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9TWV9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX1NZX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NzAwMDIKKyNkZWZpbmUgUUFNX1NZX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFFBTV9TWV9DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFFBTV9TWV9DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fTUJfQ1RMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9TWV9DT01NX01CX0NUTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9NQl9DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9NQl9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9TWV9DT01NX01CX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFFBTV9TWV9DT01NX01CX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9NQl9PQlNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fTUJfT0JTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TWV9DT01NX01CX09CU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9TWV9DT01NX01CX09CU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX1NZX0NPTU1fTUJfT0JTX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgUUFNX1NZX0NPTU1fTUJfT0JTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFFBTV9TWV9DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDcwMDAzCisjZGVmaW5lIFFBTV9TWV9DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBRQU1fU1lfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBRQU1fU1lfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBRQU1fU1lfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ3MDAwNQorI2RlZmluZSBRQU1fU1lfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgUUFNX1NZX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgUUFNX1NZX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVEFfTE9DS19JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RBX0xPQ0tfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUQV9MT0NLX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUQV9MT0NLX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RBX1VOTE9DS19JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUQV9VTkxPQ0tfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVEFfVU5MT0NLX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVEFfVU5MT0NLX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUQV9USU1FT1VUX0lOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVEFfVElNRU9VVF9JTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RBX1RJTUVPVVRfSU5UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RBX1RJTUVPVVRfSU5UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVEFfQ1RMX1dPUkRfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RBX0NUTF9XT1JEX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUQV9DVExfV09SRF9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUQV9DVExfV09SRF9JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgUUFNX1NZX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NzAwMDYKKyNkZWZpbmUgUUFNX1NZX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFFBTV9TWV9DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFFBTV9TWV9DT01NX0lOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX01TS19MT0NLX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9NU0tfTE9DS19NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfTVNLX0xPQ0tfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfTVNLX0xPQ0tfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfTVNLX1VOTE9DS19NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX01TS19VTkxPQ0tfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9NU0tfVU5MT0NLX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9NU0tfVU5MT0NLX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9NU0tfVElNRU9VVF9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfTVNLX1RJTUVPVVRfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX01TS19USU1FT1VUX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX01TS19USU1FT1VUX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX01TS19DVExfV09SRF9NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9NU0tfQ1RMX1dPUkRfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfTVNLX0NUTF9XT1JEX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfTVNLX0NUTF9XT1JEX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fU1lfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ3MDAwNworI2RlZmluZSBRQU1fU1lfQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgUUFNX1NZX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgUUFNX1NZX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RNX0xPQ0tfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUTV9MT0NLX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVE1fTE9DS19NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVE1fTE9DS19NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVE1fVU5MT0NLX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RNX1VOTE9DS19NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUTV9VTkxPQ0tfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUTV9VTkxPQ0tfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUTV9USU1FT1VUX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVE1fVElNRU9VVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RNX1RJTUVPVVRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RNX1RJTUVPVVRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBRQU1fU1lfQ09NTV9JTlRfU1RNX0NUTF9XT1JEX01TS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgUUFNX1NZX0NPTU1fSU5UX1NUTV9DVExfV09SRF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVE1fQ1RMX1dPUkRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFFBTV9TWV9DT01NX0lOVF9TVE1fQ1RMX1dPUkRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFFBTV9TWV9TVEFUVVNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDcwMDEwCisjZGVmaW5lIFFBTV9TWV9TVEFUVVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBRQU1fU1lfU1RBVFVTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBRQU1fU1lfU1RBVFVTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1NZX1NUQVRVU19TWU5DX1NUQVRFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9TWV9TVEFUVVNfU1lOQ19TVEFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBRQU1fU1lfU1RBVFVTX1NZTkNfU1RBVEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBRQU1fU1lfU1RBVFVTX1NZTkNfU1RBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fU1lfVElNRU9VVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ3MDAxMQorI2RlZmluZSBRQU1fU1lfVElNRU9VVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFFBTV9TWV9USU1FT1VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFFBTV9TWV9USU1FT1VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzQTk4CisKKyNkZWZpbmUgUUFNX1NZX1NZTkNfTFdNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NzAwMTIKKyNkZWZpbmUgUUFNX1NZX1NZTkNfTFdNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFFBTV9TWV9TWU5DX0xXTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFFBTV9TWV9TWU5DX0xXTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgUUFNX1NZX1NZTkNfQVdNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NzAwMTMKKyNkZWZpbmUgUUFNX1NZX1NZTkNfQVdNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFFBTV9TWV9TWU5DX0FXTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFFBTV9TWV9TWU5DX0FXTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgUUFNX1NZX1NZTkNfSFdNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NzAwMTQKKyNkZWZpbmUgUUFNX1NZX1NZTkNfSFdNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFFBTV9TWV9TWU5DX0hXTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFFBTV9TWV9TWU5DX0hXTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1CisKKyNkZWZpbmUgUUFNX1NZX1VOTE9DS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0NzAwMTUKKyNkZWZpbmUgUUFNX1NZX1VOTE9DS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFFBTV9TWV9VTkxPQ0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFFBTV9TWV9VTkxPQ0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFFBTV9TWV9DT05UUk9MX1dPUkRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDcwMDE2CisjZGVmaW5lIFFBTV9TWV9DT05UUk9MX1dPUkRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBRQU1fU1lfQ09OVFJPTF9XT1JEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBRQU1fU1lfQ09OVFJPTF9XT1JEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgUUFNX1NZX0NPTlRST0xfV09SRF9DVFJMX1dPUkRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFFBTV9TWV9DT05UUk9MX1dPUkRfQ1RSTF9XT1JEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBRQU1fU1lfQ09OVFJPTF9XT1JEX0NUUkxfV09SRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBRQU1fU1lfQ09OVFJPTF9XT1JEX0NUUkxfV09SRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBRQU1fVkRfSVNTX1JBTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ4MDAwMAorCisjZGVmaW5lIFFBTV9WRF9RU1NfUkFNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNDkwMDAwCisKKyNkZWZpbmUgUUFNX1ZEX1NZTV9SQU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0QTAwMDAKKworI2RlZmluZSBTQ1VfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwMDAwCisjZGVmaW5lIFNDVV9DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTQ1VfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTQ1VfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNDVV9DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFNDVV9DT01NX1NUQVRFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwMDEKKyNkZWZpbmUgU0NVX0NPTU1fU1RBVEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfQ09NTV9TVEFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfQ09NTV9TVEFURV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX0NPTU1fU1RBVEVfQ09NTV9TVEFURV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9DT01NX1NUQVRFX0NPTU1fU1RBVEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX0NPTU1fU1RBVEVfQ09NTV9TVEFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX0NPTU1fU1RBVEVfQ09NTV9TVEFURV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1RPUF9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgxMDAwMAorI2RlZmluZSBTQ1VfVE9QX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0NVX1RPUF9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0NVX1RPUF9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTQ1VfVE9QX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTQ1VfVE9QX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTQ1VfVE9QX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBTQ1VfVE9QX0NPTU1fU1RBVEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODEwMDAxCisjZGVmaW5lIFNDVV9UT1BfQ09NTV9TVEFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1RPUF9DT01NX1NUQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1RPUF9DT01NX1NUQVRFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0NVX1RPUF9NV0FJVF9DVFJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgxMDAxMAorI2RlZmluZSBTQ1VfVE9QX01XQUlUX0NUUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0NVX1RPUF9NV0FJVF9DVFJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0NVX1RPUF9NV0FJVF9DVFJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9UT1BfTVdBSVRfQ1RSX01XQUlUX1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfVE9QX01XQUlUX0NUUl9NV0FJVF9TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1RPUF9NV0FJVF9DVFJfTVdBSVRfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0NVX1RPUF9NV0FJVF9DVFJfTVdBSVRfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfVE9QX01XQUlUX0NUUl9NV0FJVF9TRUxfVFJfTVdfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfVE9QX01XQUlUX0NUUl9NV0FJVF9TRUxfVFJfTVdfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBTQ1VfVE9QX01XQUlUX0NUUl9SRUFEWV9ESVNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1RPUF9NV0FJVF9DVFJfUkVBRFlfRElTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9UT1BfTVdBSVRfQ1RSX1JFQURZX0RJU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNDVV9UT1BfTVdBSVRfQ1RSX1JFQURZX0RJU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1RPUF9NV0FJVF9DVFJfUkVBRFlfRElTX05NSV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1RPUF9NV0FJVF9DVFJfUkVBRFlfRElTX05NSV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFNDVV9MT1dfUkFNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MjAwMDAKKworI2RlZmluZSAgIFNDVV9MT1dfUkFNX0xPV19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfTE9XX1JBTV9MT1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9MT1dfUkFNX0xPV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9MT1dfUkFNX0xPV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9ISUdIX1JBTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzAwMDAKKworI2RlZmluZSAgIFNDVV9ISUdIX1JBTV9ISUdIX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfSElHSF9SQU1fSElHSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9ISUdIX1JBTV9ISUdIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9ISUdIX1JBTV9ISUdIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQUdDX1JGX01BWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFOTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfUkZfTUFYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9NQVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9NQVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQUdDX0ZBU1RfU05TX0NUUkxfREVMQVlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFOTcKKyNkZWZpbmUgU0NVX1JBTV9BR0NfRkFTVF9TTlNfQ1RSTF9ERUxBWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FHQ19GQVNUX1NOU19DVFJMX0RFTEFZX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FHQ19GQVNUX1NOU19DVFJMX0RFTEFZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX0NZQ0NOVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFOTgKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfQ1lDQ05UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9DWUNDTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9DWUNDTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX0NZQ0xFTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFOTkKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfQ1lDTEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9DWUNMRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9DWUNMRU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQUdDX1NOU19DWUNMRU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFOUEKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX0NZQ0xFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfQ1lDTEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfQ1lDTEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQUdDX1JGX1NOU19ERVZfTUFYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFOUIKKyNkZWZpbmUgU0NVX1JBTV9BR0NfUkZfU05TX0RFVl9NQVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9TTlNfREVWX01BWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9TTlNfREVWX01BWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQUdDX1JGX1NOU19ERVZfTUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFOUMKKyNkZWZpbmUgU0NVX1JBTV9BR0NfUkZfU05TX0RFVl9NSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9TTlNfREVWX01JTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9TTlNfREVWX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRTlECisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX0RHQUlOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9ER0FJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfREdBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfREdBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9SRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfUkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX1JGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9SRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX0lGX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9JRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfSUZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9JRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX0lGX0FHQ19ESVNBQkxFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfSUZfQUdDX0RJU0FCTEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX0lGX0FHQ19ESVNBQkxFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMAorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX0lGX0FHQ19ESVNBQkxFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfSU5WX0lGX1BPTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9JTlZfSUZfUE9MX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfSU5WX0lGX1BPTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfSU5WX0lGX1BPTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9JTlZfUkZfUE9MX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX0lOVl9SRl9QT0xfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9JTlZfUkZfUE9MX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9JTlZfUkZfUE9MX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9SRURfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRTlFCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX1JFRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9SRURfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfUkVEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX1JFRF9JTk5FUl9SRURfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9SRURfSU5ORVJfUkVEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfUkVEX0lOTkVSX1JFRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfUkVEX0lOTkVSX1JFRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9SRURfUkFHQ19SRURfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfUkVEX1JBR0NfUkVEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX1JFRF9SQUdDX1JFRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QworI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX1JFRF9SQUdDX1JFRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfUkVEX0lBR0NfUkVEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX1JFRF9JQUdDX1JFRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9SRURfSUFHQ19SRURfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfUkVEX0lBR0NfUkVEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfSU5ORVJHQUlOX01JTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUU5RgorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9JTk5FUkdBSU5fTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX0lOTkVSR0FJTl9NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX0lOTkVSR0FJTl9NSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUlOR0FJTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVBMAorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NSU5HQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01JTkdBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01JTkdBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUFYR0FJTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVBMQorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NQVhHQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01BWEdBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01BWEdBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUFYTUlOR0FJTl9USF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVBMgorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NQVhNSU5HQUlOX1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01BWE1JTkdBSU5fVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01BWE1JTkdBSU5fVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01JTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFQTMKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9NSU5fREdBSU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUlOX0RHQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX01JTl9ER0FJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX01JTl9ER0FJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUlOX1JGX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX01JTl9SRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9NSU5fUkZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUlOX1JGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9NSU5fSUZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUlOX0lGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX01JTl9JRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAwCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUlOX0lGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUFYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVBNAorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NQVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01BWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUFYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX01BWF9ER0FJTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9NQVhfREdBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUFYX0RHQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUFYX0RHQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9NQVhfUkZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUFYX1JGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX01BWF9SRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9NQVhfUkZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQUdDX0tJX01BWF9JRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9NQVhfSUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9BR0NfS0lfTUFYX0lGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19LSV9NQVhfSUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfU1VNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUE1CisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9TVU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX1NVTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX1NVTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfU1VNX01JTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUE2CisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9TVU1fTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX1NVTV9NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX1NVTV9NSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfU1VNX01BWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUE3CisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9TVU1fTUFYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX1NVTV9NQVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX1NVTV9NQVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfQ1lDTEVOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUE4CisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9DWUNMRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0NZQ0xFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0NZQ0xFTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfQ1lDQ05UX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUE5CisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9DWUNDTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0NZQ0NOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0NZQ0NOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfRElSX1RPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUFBCisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9ESVJfVE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfRElSX1RPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0RJUl9UT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfRElSX1dEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUFCCisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9ESVJfV0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfRElSX1dEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0RJUl9XRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfRElSX1NUUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUFDCisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9ESVJfU1RQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0RJUl9TVFBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0RJUl9TVFBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfU1VNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUFECisjZGVmaW5lIFNDVV9SQU1fQUdDX1NOU19TVU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX1NVTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX1NVTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfU1VNX01JTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUFFCisjZGVmaW5lIFNDVV9SQU1fQUdDX1NOU19TVU1fTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX1NVTV9NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX1NVTV9NSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfU1VNX01BWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUFGCisjZGVmaW5lIFNDVV9SQU1fQUdDX1NOU19TVU1fTUFYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX1NVTV9NQVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX1NVTV9NQVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfQ1lDQ05UX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUIwCisjZGVmaW5lIFNDVV9SQU1fQUdDX1NOU19DWUNDTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX0NZQ0NOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX0NZQ0NOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfRElSX1RPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUIxCisjZGVmaW5lIFNDVV9SQU1fQUdDX1NOU19ESVJfVE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfRElSX1RPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX0RJUl9UT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfRElSX1dEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUIyCisjZGVmaW5lIFNDVV9SQU1fQUdDX1NOU19ESVJfV0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfRElSX1dEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX0RJUl9XRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19TTlNfRElSX1NUUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUIzCisjZGVmaW5lIFNDVV9SQU1fQUdDX1NOU19ESVJfU1RQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX0RJUl9TVFBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfU05TX0RJUl9TVFBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JTkdBSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUI0CisjZGVmaW5lIFNDVV9SQU1fQUdDX0lOR0FJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSU5HQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSU5HQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JTkdBSU5fVEdUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUI1CisjZGVmaW5lIFNDVV9SQU1fQUdDX0lOR0FJTl9UR1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSU5HQUlOX1RHVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSU5HQUlOX1RHVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JTkdBSU5fVEdUX01JTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUI2CisjZGVmaW5lIFNDVV9SQU1fQUdDX0lOR0FJTl9UR1RfTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSU5HQUlOX1RHVF9NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSU5HQUlOX1RHVF9NSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JTkdBSU5fVEdUX01BWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUI3CisjZGVmaW5lIFNDVV9SQU1fQUdDX0lOR0FJTl9UR1RfTUFYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSU5HQUlOX1RHVF9NQVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSU5HQUlOX1RHVF9NQVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JRl9JQUNDVV9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUI4CisjZGVmaW5lIFNDVV9SQU1fQUdDX0lGX0lBQ0NVX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JRl9JQUNDVV9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUI5CisjZGVmaW5lIFNDVV9SQU1fQUdDX0lGX0lBQ0NVX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FHQ19JRl9JQUNDVV9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JRl9JQUNDVV9ISV9UR1RfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUJBCisjZGVmaW5lIFNDVV9SQU1fQUdDX0lGX0lBQ0NVX0hJX1RHVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfSElfVEdUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfSElfVEdUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JRl9JQUNDVV9ISV9UR1RfTUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUJCCisjZGVmaW5lIFNDVV9SQU1fQUdDX0lGX0lBQ0NVX0hJX1RHVF9NSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfSElfVEdUX01JTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfSElfVEdUX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19JRl9JQUNDVV9ISV9UR1RfTUFYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUJDCisjZGVmaW5lIFNDVV9SQU1fQUdDX0lGX0lBQ0NVX0hJX1RHVF9NQVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfSElfVEdUX01BWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfSUZfSUFDQ1VfSElfVEdUX01BWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9JQUNDVV9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUJECisjZGVmaW5lIFNDVV9SQU1fQUdDX1JGX0lBQ0NVX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfUkZfSUFDQ1VfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfUkZfSUFDQ1VfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9JQUNDVV9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUJFCisjZGVmaW5lIFNDVV9SQU1fQUdDX1JGX0lBQ0NVX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9JQUNDVV9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfUkZfSUFDQ1VfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19SRl9JQUNDVV9ISV9DT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUJGCisjZGVmaW5lIFNDVV9SQU1fQUdDX1JGX0lBQ0NVX0hJX0NPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfUkZfSUFDQ1VfSElfQ09fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfUkZfSUFDQ1VfSElfQ09fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1NQX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUMwCisjZGVmaW5lIFNDVV9SQU1fU1BfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9TUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9TUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19GQVNUX0NMUF9DVFJMX0RFTEFZX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUMxCisjZGVmaW5lIFNDVV9SQU1fQUdDX0ZBU1RfQ0xQX0NUUkxfREVMQVlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfRkFTVF9DTFBfQ1RSTF9ERUxBWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfRkFTVF9DTFBfQ1RSTF9ERUxBWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NSU5fSUZHQUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUMyCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01JTl9JRkdBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUlOX0lGR0FJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUlOX0lGR0FJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NQVhfSUZHQUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUMzCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01BWF9JRkdBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUFYX0lGR0FJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUFYX0lGR0FJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0ZFQ19NRUFTX0NPVU5UX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUM0CisjZGVmaW5lIFNDVV9SQU1fRkVDX01FQVNfQ09VTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9GRUNfTUVBU19DT1VOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9GRUNfTUVBU19DT1VOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0ZFQ19BQ0NVTV9DV19DT1JSRUNURURfTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUM1CisjZGVmaW5lIFNDVV9SQU1fRkVDX0FDQ1VNX0NXX0NPUlJFQ1RFRF9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9GRUNfQUNDVU1fQ1dfQ09SUkVDVEVEX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9GRUNfQUNDVU1fQ1dfQ09SUkVDVEVEX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0ZFQ19BQ0NVTV9DV19DT1JSRUNURURfSElfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUM2CisjZGVmaW5lIFNDVV9SQU1fRkVDX0FDQ1VNX0NXX0NPUlJFQ1RFRF9ISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9GRUNfQUNDVU1fQ1dfQ09SUkVDVEVEX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9GRUNfQUNDVU1fQ1dfQ09SUkVDVEVEX0hJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0NVX1JBTV9HUElPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDNworI2RlZmluZSBTQ1VfUkFNX0dQSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU0NVX1JBTV9HUElPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgU0NVX1JBTV9HUElPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fR1BJT19IV19MT0NLX0lORF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0dQSU9fSFdfTE9DS19JTkRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9HUElPX0hXX0xPQ0tfSU5EX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0NVX1JBTV9HUElPX0hXX0xPQ0tfSU5EX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0dQSU9fSFdfTE9DS19JTkRfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0dQSU9fSFdfTE9DS19JTkRfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0NUUkxfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDOAorI2RlZmluZSBTQ1VfUkFNX0FHQ19DTFBfQ1RSTF9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgU0NVX1JBTV9BR0NfQ0xQX0NUUkxfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFNDVV9SQU1fQUdDX0NMUF9DVFJMX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19DTFBfQ1RSTF9NT0RFX05BUlJPV19QT1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfQ0xQX0NUUkxfTU9ERV9OQVJST1dfUE9XX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0NMUF9DVFJMX01PREVfTkFSUk9XX1BPV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0NMUF9DVFJMX01PREVfTkFSUk9XX1BPV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9BR0NfQ0xQX0NUUkxfTU9ERV9OQVJST1dfUE9XX2ZhbHNlICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9BR0NfQ0xQX0NUUkxfTU9ERV9OQVJST1dfUE9XX3RydWUgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfQ0xQX0NUUkxfTU9ERV9GQVNUX0NMUF9CUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fQUdDX0NMUF9DVFJMX01PREVfRkFTVF9DTFBfQlBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19DTFBfQ1RSTF9NT0RFX0ZBU1RfQ0xQX0JQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19DTFBfQ1RSTF9NT0RFX0ZBU1RfQ0xQX0JQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQUdDX0NMUF9DVFJMX01PREVfRkFTVF9DTFBfQlBfRkNDX0VOQUJMRSAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQUdDX0NMUF9DVFJMX01PREVfRkFTVF9DTFBfQlBfRkNDX0RJU0FCTEUgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFNDVV9SQU1fQUdDX0NMUF9DVFJMX01PREVfRkFTVF9DTFBfREVDX19CICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTQ1VfUkFNX0FHQ19DTFBfQ1RSTF9NT0RFX0ZBU1RfQ0xQX0RFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9BR0NfQ0xQX0NUUkxfTU9ERV9GQVNUX0NMUF9ERUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgU0NVX1JBTV9BR0NfQ0xQX0NUUkxfTU9ERV9GQVNUX0NMUF9ERUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FHQ19DTFBfQ1RSTF9NT0RFX0ZBU1RfQ0xQX0RFQ19ERUNfRElTQUJMRSAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FHQ19DTFBfQ1RSTF9NT0RFX0ZBU1RfQ0xQX0RFQ19ERUNfRU5BQkxFICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUlOX1JGR0FJTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDOQorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NSU5fUkZHQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01JTl9SRkdBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01JTl9SRkdBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BR0NfS0lfTUFYX1JGR0FJTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDQQorI2RlZmluZSBTQ1VfUkFNX0FHQ19LSV9NQVhfUkZHQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01BWF9SRkdBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQUdDX0tJX01BWF9SRkdBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9GRUNfQUNDVU1fUEtUX0ZBSUxVUkVTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDQgorI2RlZmluZSBTQ1VfUkFNX0ZFQ19BQ0NVTV9QS1RfRkFJTFVSRVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fRkVDX0FDQ1VNX1BLVF9GQUlMVVJFU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fRkVDX0FDQ1VNX1BLVF9GQUlMVVJFU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9JTkhJQklUXzFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDQworI2RlZmluZSBTQ1VfUkFNX0lOSElCSVRfMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fSU5ISUJJVF8xX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fSU5ISUJJVF8xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9IVE9MX0JVRl8wX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDRAorI2RlZmluZSBTQ1VfUkFNX0hUT0xfQlVGXzBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fSFRPTF9CVUZfMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fSFRPTF9CVUZfMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9IVE9MX0JVRl8xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDRQorI2RlZmluZSBTQ1VfUkFNX0hUT0xfQlVGXzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fSFRPTF9CVUZfMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fSFRPTF9CVUZfMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9JTkhJQklUXzJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVDRgorI2RlZmluZSBTQ1VfUkFNX0lOSElCSVRfMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fSU5ISUJJVF8yX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fSU5ISUJJVF8yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9TSE9SVF9CVUZfMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEMAorI2RlZmluZSBTQ1VfUkFNX1RSX1NIT1JUX0JVRl8wX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfU0hPUlRfQlVGXzBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfU0hPUlRfQlVGXzBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9TSE9SVF9CVUZfMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEMQorI2RlZmluZSBTQ1VfUkFNX1RSX1NIT1JUX0JVRl8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfU0hPUlRfQlVGXzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfU0hPUlRfQlVGXzFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8wX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEMgorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEMworI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVENAorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVENQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl80X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVENgorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl81X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVENworI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl82X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEOAorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl83X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEOQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl84X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEQQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl85X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEQgorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVEQworI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVERAorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVERQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzEyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVERgorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzEzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFMAorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzE0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFMQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzE1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFMgorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzE2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFMworI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzE3X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFNAorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzE4X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMThfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMThfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8xOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFNQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzE5X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMTlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFNgorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzIwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFNworI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzIxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFOAorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzIyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFOQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzIzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFQQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzI0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFQgorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzI1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFQworI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzI2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFRAorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzI3X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFRQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzI4X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8yOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVFRgorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzI5X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMjlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8zMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVGMAorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzMwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMzBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMzBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9UUl9MT05HX0JVRl8zMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVGMQorI2RlZmluZSBTQ1VfUkFNX1RSX0xPTkdfQlVGXzMxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVFJfTE9OR19CVUZfMzFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FNU19NQVhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFRjIKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQU1TX01BWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBTQ1VfUkFNX0FUVl9BTVNfTUFYX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FNU19NQVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BTVNfTUFYX0FNU19NQVhfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQU1TX01BWF9BTVNfTUFYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BTVNfTUFYX0FNU19NQVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FNU19NQVhfQU1TX01BWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FNU19NSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFRjMKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQU1TX01JTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBTQ1VfUkFNX0FUVl9BTVNfTUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FNU19NSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BTVNfTUlOX0FNU19NSU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQU1TX01JTl9BTVNfTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BTVNfTUlOX0FNU19NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FNU19NSU5fQU1TX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0ZJRUxEX0NOVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFRjQKKyNkZWZpbmUgU0NVX1JBTV9BVFZfRklFTERfQ05UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNDVV9SQU1fQVRWX0ZJRUxEX0NOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfRklFTERfQ05UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0ZJRUxEX0NOVF9GSUVMRF9DTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9GSUVMRF9DTlRfRklFTERfQ05UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lICAgU0NVX1JBTV9BVFZfRklFTERfQ05UX0ZJRUxEX0NOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9GSUVMRF9DTlRfRklFTERfQ05UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9BQUdDX0ZBU1RfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUY1CisjZGVmaW5lIFNDVV9SQU1fQVRWX0FBR0NfRkFTVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTQ1VfUkFNX0FUVl9BQUdDX0ZBU1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTQ1VfUkFNX0FUVl9BQUdDX0ZBU1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUFHQ19GQVNUX0FBR0NfRkFTVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FBR0NfRkFTVF9BQUdDX0ZBU1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BQUdDX0ZBU1RfQUFHQ19GQVNUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BQUdDX0ZBU1RfQUFHQ19GQVNUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX0FBR0NfRkFTVF9BQUdDX0ZBU1RfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX0FBR0NfRkFTVF9BQUdDX0ZBU1RfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9BQUdDX0xQMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUY2CisjZGVmaW5lIFNDVV9SQU1fQVRWX0FBR0NfTFAyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUFHQ19MUDJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUFHQ19MUDJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FBR0NfTFAyX0FBR0NfTFAyX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BQUdDX0xQMl9BQUdDX0xQMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FBR0NfTFAyX0FBR0NfTFAyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FBR0NfTFAyX0FBR0NfTFAyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX0xWTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFRjcKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBfTFZMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9MVkxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX0xWTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9MVkxfQlBfTFZMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfTFZMX0JQX0xWTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9MVkxfQlBfTFZMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQX0xWTF9CUF9MVkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX1JFTFlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFRjgKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBfUkVMWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX1JFTFlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9SRUxZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfUkVMWV9CUF9SRUxZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQX1JFTFlfQlBfUkVMWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9SRUxZX0JQX1JFTFlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfUkVMWV9CUF9SRUxZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBfTVRBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUVGOQorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9NVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX01UQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX01UQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9NVEFfQlBfTVRBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfTVRBX0JQX01UQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9NVEFfQlBfTVRBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9NVEFfQlBfTVRBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9SRUZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUZBCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX1JFRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBfUkVGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9SRUZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfUkVGX0JQX1JFRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQX1JFRl9CUF9SRUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfUkVGX0JQX1JFRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9SRUZfQlBfUkVGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9SRUZfTUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUZCCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX1JFRl9NSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBfUkVGX01JTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9SRUZfTUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfUkVGX01JTl9CUF9SRUZfTUlOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQX1JFRl9NSU5fQlBfUkVGX01JTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfUkVGX01JTl9CUF9SRUZfTUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9SRUZfTUlOX0JQX1JFRl9NSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9SRUZfTUFYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUZDCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX1JFRl9NQVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBfUkVGX01BWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9SRUZfTUFYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfUkVGX01BWF9CUF9SRUZfTUFYX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQX1JFRl9NQVhfQlBfUkVGX01BWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfUkVGX01BWF9CUF9SRUZfTUFYX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9SRUZfTUFYX0JQX1JFRl9NQVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9DTlRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRUZECisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX0NOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9DTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBfQ05UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQX0NOVF9CUF9DTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9DTlRfQlBfQ05UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfQ05UX0JQX0NOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQX0NOVF9CUF9DTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX1hEX0NOVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFRkUKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBfWERfQ05UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUF9YRF9DTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQX1hEX0NOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9YRF9DTlRfQlBfWERfQ05UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBfWERfQ05UX0JQX1hEX0NOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUF9YRF9DTlRfQlBfWERfQ05UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQX1hEX0NOVF9CUF9YRF9DTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX1BBR0NfS0lfTUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFFRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUEFHQ19LSV9NSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTQ1VfUkFNX0FUVl9QQUdDX0tJX01JTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1BBR0NfS0lfTUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9QQUdDX0tJX01JTl9QQUdDX0tJX01JTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfUEFHQ19LSV9NSU5fUEFHQ19LSV9NSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9QQUdDX0tJX01JTl9QQUdDX0tJX01JTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX1BBR0NfS0lfTUlOX1BBR0NfS0lfTUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQQ19LSV9NSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMDAKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBDX0tJX01JTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUENfS0lfTUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQQ19LSV9NSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUENfS0lfTUlOX0JQQ19LSV9NSU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQlBDX0tJX01JTl9CUENfS0lfTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9CUENfS0lfTUlOX0JQQ19LSV9NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0JQQ19LSV9NSU5fQlBDX0tJX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1JGX1JYX0ZSRVFVRU5DWV9WQUxVRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMDEKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUkZfUlhfRlJFUVVFTkNZX1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9SWF9GUkVRVUVOQ1lfVkFMVUVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9SWF9GUkVRVUVOQ1lfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1JGX1JYX0RBVEFfUkFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMDIKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUkZfUlhfREFUQV9SQVRFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX1JGX1JYX0RBVEFfUkFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9SWF9EQVRBX1JBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1JGX1JYX0RBVEFfUkFURV8yMDQ4S0JQU19SRUdTUEVDICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1JGX1JYX0RBVEFfUkFURV8yMDQ4S0JQU19JTlZTUEVDICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1JGX1JYX0RBVEFfUkFURV8yMDQ4S0JQU19SRUdTUEVDX0FMVCAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SRl9SWF9EQVRBX1JBVEVfMjA0OEtCUFNfSU5WU1BFQ19BTFQgICAgICAgICAgICAgICAgICAweDQxCisjZGVmaW5lICAgU0NVX1JBTV9PUlhfUkZfUlhfREFUQV9SQVRFXzE1NDRLQlBTX1JFR1NQRUMgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1JGX1JYX0RBVEFfUkFURV8xNTQ0S0JQU19JTlZTUEVDICAgICAgICAgICAgICAgICAgICAgIDB4ODEKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SRl9SWF9EQVRBX1JBVEVfMzA4OEtCUFNfUkVHU1BFQyAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0NVX1JBTV9PUlhfUkZfUlhfREFUQV9SQVRFXzMwODhLQlBTX0lOVlNQRUMgICAgICAgICAgICAgICAgICAgICAgMHhDMQorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMDMKKyNkZWZpbmUgU0NVX1JBTV9PUlhfU0NVX1NUQVRFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9TQ1VfU1RBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9SRVNFVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9BR05fSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9ER05fSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9BR0NfSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9GUlFfSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9QSEFfSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9USU1fSFVOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9TQ1VfU1RBVEVfRVFVX0hVTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgU0NVX1JBTV9PUlhfU0NVX1NUQVRFX0VRVF9IVU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1NDVV9TVEFURV9TWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKworI2RlZmluZSBTQ1VfUkFNX09SWF9TQ1VfTE9DS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjA0CisjZGVmaW5lIFNDVV9SQU1fT1JYX1NDVV9MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfU0NVX0xPQ0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfU0NVX0xPQ0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX09SWF9UQVJHRVRfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjA1CisjZGVmaW5lIFNDVV9SQU1fT1JYX1RBUkdFVF9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTQ1VfUkFNX09SWF9UQVJHRVRfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTQ1VfUkFNX09SWF9UQVJHRVRfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1RBUkdFVF9NT0RFXzE1NDRLQlBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1RBUkdFVF9NT0RFXzMwODhLQlBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1RBUkdFVF9NT0RFXzIwNDhLQlBTX1NRUlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1RBUkdFVF9NT0RFXzIwNDhLQlBTX1JPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIFNDVV9SQU1fT1JYX01FUl9NSU5fREJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMDYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfTUVSX01JTl9EQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX01FUl9NSU5fREJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9NRVJfTUlOX0RCX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1JGX0dBSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMDcKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUkZfR0FJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9HQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9HQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1JGX0dBSU5fTUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMDgKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUkZfR0FJTl9NSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9HQUlOX01JTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9HQUlOX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1JGX0dBSU5fTUFYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMDkKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUkZfR0FJTl9NQVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9HQUlOX01BWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9SRl9HQUlOX01BWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0lGX0dBSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMEEKKyNkZWZpbmUgU0NVX1JBTV9PUlhfSUZfR0FJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9JRl9HQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9JRl9HQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0lGX0dBSU5fTUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMEIKKyNkZWZpbmUgU0NVX1JBTV9PUlhfSUZfR0FJTl9NSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9JRl9HQUlOX01JTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9JRl9HQUlOX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0lGX0dBSU5fTUFYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMEMKKyNkZWZpbmUgU0NVX1JBTV9PUlhfSUZfR0FJTl9NQVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9JRl9HQUlOX01BWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9JRl9HQUlOX01BWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9IRUFEUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMEQKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX0hFQURSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fSEVBRFJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fSEVBRFJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9IRUFEUl9TVFBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMEUKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX0hFQURSX1NUUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9IRUFEUl9TVFBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fSEVBRFJfU1RQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9LSV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMEYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX0tJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9LSV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fS0lfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9MT0NLX1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTAKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX0xPQ0tfVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fTE9DS19USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fTE9DS19USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9MT0NLX1dEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTEKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX0xPQ0tfV0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fTE9DS19XRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fTE9DS19XRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9PTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTIKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX09OTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fT05MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fT05MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9VTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTMKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX1VOTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fVU5MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fVU5MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9MT0NLX1RPVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTQKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX0xPQ0tfVE9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fTE9DS19UT1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fTE9DS19UT1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9MT0NLX01BU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTUKKyNkZWZpbmUgU0NVX1JBTV9PUlhfQUdOX0xPQ0tfTUFTS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0FHTl9MT0NLX01BU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9BR05fTE9DS19NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9NSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTcKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX01JTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9NQVhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTgKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX01BWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTUFYX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTUFYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9BTVBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMTkKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX0FNUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fQU1QX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fQU1QX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9BTVBUQVJHRVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMUEKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX0FNUFRBUkdFVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fQU1QVEFSR0VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fQU1QVEFSR0VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9LSV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMUIKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX0tJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9LSV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fS0lfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9MT0NLX1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMUMKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX0xPQ0tfVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTE9DS19USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTE9DS19USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9MT0NLX1dEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMUQKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX0xPQ0tfV0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTE9DS19XRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTE9DS19XRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9PTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMUUKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX09OTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fT05MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fT05MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9VTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMUYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX1VOTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fVU5MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fVU5MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9MT0NLX1RPVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjAKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX0xPQ0tfVE9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTE9DS19UT1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTE9DS19UT1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9MT0NLX01BU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjEKKyNkZWZpbmUgU0NVX1JBTV9PUlhfREdOX0xPQ0tfTUFTS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0RHTl9MT0NLX01BU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9ER05fTE9DS19NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSRVFfR0FJTl9DT1JSX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjIKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJFUV9HQUlOX0NPUlJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSRVFfR0FJTl9DT1JSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUkVRX0dBSU5fQ09SUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX0ZSRVFfR0FJTl9DT1JSXzE1NDRLQlBTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjAKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9GUkVRX0dBSU5fQ09SUl8yMDQ4S0JQUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgU0NVX1JBTV9PUlhfRlJFUV9HQUlOX0NPUlJfMzA4OEtCUFMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9PRkZTRVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjMKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX09GRlNFVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfT0ZGU0VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfT0ZGU0VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9PRkZTRVRfTUFYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjQKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX09GRlNFVF9NQVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfT0ZGU0VUX01BWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfT0ZGU0VUX01BWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9LSV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjUKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX0tJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9LSV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfS0lfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9ESUZGX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX0RJRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfRElGRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfRElGRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9MT0NLX1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjcKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX0xPQ0tfVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfTE9DS19USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfTE9DS19USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9MT0NLX1dEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjgKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX0xPQ0tfV0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfTE9DS19XRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfTE9DS19XRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9PTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMjkKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX09OTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfT05MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfT05MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9VTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMkEKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX1VOTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfVU5MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfVU5MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9MT0NLX1RPVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMkIKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX0xPQ0tfVE9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfTE9DS19UT1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfTE9DS19UT1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9MT0NLX01BU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMkMKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRlJRX0xPQ0tfTUFTS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZSUV9MT0NLX01BU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GUlFfTE9DS19NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1BIQV9ESUZGX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMkQKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUEhBX0RJRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfRElGRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfRElGRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1BIQV9MT0NLX1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMkUKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUEhBX0xPQ0tfVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfTE9DS19USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfTE9DS19USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1BIQV9MT0NLX1dEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMkYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUEhBX0xPQ0tfV0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfTE9DS19XRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfTE9DS19XRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1BIQV9PTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzAKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUEhBX09OTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfT05MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfT05MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1BIQV9VTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzEKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUEhBX1VOTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfVU5MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfVU5MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1BIQV9MT0NLX1RPVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzIKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUEhBX0xPQ0tfVE9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfTE9DS19UT1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfTE9DS19UT1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1BIQV9MT0NLX01BU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzMKKyNkZWZpbmUgU0NVX1JBTV9PUlhfUEhBX0xPQ0tfTUFTS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX1BIQV9MT0NLX01BU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9QSEFfTE9DS19NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9PRkZTRVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzQKKyNkZWZpbmUgU0NVX1JBTV9PUlhfVElNX09GRlNFVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fT0ZGU0VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fT0ZGU0VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9ESUZGX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzUKKyNkZWZpbmUgU0NVX1JBTV9PUlhfVElNX0RJRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fRElGRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fRElGRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9MT0NLX1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzYKKyNkZWZpbmUgU0NVX1JBTV9PUlhfVElNX0xPQ0tfVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fTE9DS19USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fTE9DS19USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9MT0NLX1dEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzcKKyNkZWZpbmUgU0NVX1JBTV9PUlhfVElNX0xPQ0tfV0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fTE9DS19XRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fTE9DS19XRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9PTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzgKKyNkZWZpbmUgU0NVX1JBTV9PUlhfVElNX09OTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fT05MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fT05MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9VTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGMzkKKyNkZWZpbmUgU0NVX1JBTV9PUlhfVElNX1VOTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fVU5MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fVU5MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9MT0NLX1RPVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGM0EKKyNkZWZpbmUgU0NVX1JBTV9PUlhfVElNX0xPQ0tfVE9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fTE9DS19UT1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fTE9DS19UT1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9MT0NLX01BU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGM0IKKyNkZWZpbmUgU0NVX1JBTV9PUlhfVElNX0xPQ0tfTUFTS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX1RJTV9MT0NLX01BU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9USU1fTE9DS19NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0VRVV9ESUZGX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGM0MKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRVFVX0RJRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfRElGRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfRElGRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0VRVV9MT0NLX1RIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGM0QKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRVFVX0xPQ0tfVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfTE9DS19USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfTE9DS19USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0VRVV9MT0NLX1dEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGM0UKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRVFVX0xPQ0tfV0RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfTE9DS19XRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfTE9DS19XRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0VRVV9PTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGM0YKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRVFVX09OTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfT05MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfT05MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0VRVV9VTkxPQ0tfVFRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNDAKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRVFVX1VOTE9DS19UVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfVU5MT0NLX1RUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfVU5MT0NLX1RUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0VRVV9MT0NLX1RPVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNDEKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRVFVX0xPQ0tfVE9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfTE9DS19UT1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfTE9DS19UT1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0VRVV9MT0NLX01BU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNDIKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRVFVX0xPQ0tfTUFTS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fT1JYX0VRVV9MT0NLX01BU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9FUVVfTE9DS19NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fT1JYX0ZMVF9GUlFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNDMKKyNkZWZpbmUgU0NVX1JBTV9PUlhfRkxUX0ZSUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX09SWF9GTFRfRlJRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX09SWF9GTFRfRlJRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfQ1BIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjQ0CisjZGVmaW5lIFNDVV9SQU1fT1JYX1JTVF9DUEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfQ1BIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfQ1BIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9PUlhfUlNUX0NQSF9SU1RfQ1BIX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1JTVF9DUEhfUlNUX0NQSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SU1RfQ1BIX1JTVF9DUEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SU1RfQ1BIX1JTVF9DUEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfQ1RJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjQ1CisjZGVmaW5lIFNDVV9SQU1fT1JYX1JTVF9DVElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfQ1RJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfQ1RJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9PUlhfUlNUX0NUSV9SU1RfQ1RJX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1JTVF9DVElfUlNUX0NUSV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SU1RfQ1RJX1JTVF9DVElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SU1RfQ1RJX1JTVF9DVElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfS1JOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjQ2CisjZGVmaW5lIFNDVV9SQU1fT1JYX1JTVF9LUk5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfS1JOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfS1JOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9PUlhfUlNUX0tSTl9SU1RfS1JOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1JTVF9LUk5fUlNUX0tSTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SU1RfS1JOX1JTVF9LUk5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SU1RfS1JOX1JTVF9LUk5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfS1JQX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjQ3CisjZGVmaW5lIFNDVV9SQU1fT1JYX1JTVF9LUlBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfS1JQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTQ1VfUkFNX09SWF9SU1RfS1JQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9PUlhfUlNUX0tSUF9SU1RfS1JQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fT1JYX1JTVF9LUlBfUlNUX0tSUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SU1RfS1JQX1JTVF9LUlBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBTQ1VfUkFNX09SWF9SU1RfS1JQX1JTVF9LUlBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9TVEFOREFSRF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjQ4CisjZGVmaW5lIFNDVV9SQU1fQVRWX1NUQU5EQVJEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0NVX1JBTV9BVFZfU1RBTkRBUkRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9TVEFOREFSRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfU1RBTkRBUkRfU1RBTkRBUkRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX1NUQU5EQVJEX1NUQU5EQVJEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfU1RBTkRBUkRfU1RBTkRBUkRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9TVEFOREFSRF9TVEFOREFSRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX1NUQU5EQVJEX1NUQU5EQVJEX01OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX1NUQU5EQVJEX1NUQU5EQVJEX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMworI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfU1RBTkRBUkRfU1RBTkRBUkRfRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfU1RBTkRBUkRfU1RBTkRBUkRfREsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfU1RBTkRBUkRfU1RBTkRBUkRfTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OQorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfU1RBTkRBUkRfU1RBTkRBUkRfTFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTA5CisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9TVEFOREFSRF9TVEFOREFSRF9JICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhBCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9TVEFOREFSRF9TVEFOREFSRF9GTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0RFVEVDVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNDkKKyNkZWZpbmUgU0NVX1JBTV9BVFZfREVURUNUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNDVV9SQU1fQVRWX0RFVEVDVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFNDVV9SQU1fQVRWX0RFVEVDVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9ERVRFQ1RfREVURUNUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfREVURUNUX0RFVEVDVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0RFVEVDVF9ERVRFQ1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0RFVEVDVF9ERVRFQ1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfREVURUNUX0RFVEVDVF9mYWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfREVURUNUX0RFVEVDVF90cnVlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0RFVEVDVF9USF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNEEKKyNkZWZpbmUgU0NVX1JBTV9BVFZfREVURUNUX1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fQVRWX0RFVEVDVF9USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9ERVRFQ1RfVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfREVURUNUX1RIX0RFVEVDVF9USF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0RFVEVDVF9USF9ERVRFQ1RfVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9ERVRFQ1RfVEhfREVURUNUX1RIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfREVURUNUX1RIX0RFVEVDVF9USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfTE9DS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY0QgorI2RlZmluZSBTQ1VfUkFNX0FUVl9MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0NVX1JBTV9BVFZfTE9DS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0NVX1JBTV9BVFZfTE9DS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0xPQ0tfQ1JfTE9DS19CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9MT0NLX0NSX0xPQ0tfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfTE9DS19DUl9MT0NLX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfTE9DS19DUl9MT0NLX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9MT0NLX0NSX0xPQ0tfQklUX05PX0xPQ0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9MT0NLX0NSX0xPQ0tfQklUX0xPQ0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9MT0NLX1NZTkNfRkxBR19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfTE9DS19TWU5DX0ZMQUdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0xPQ0tfU1lOQ19GTEFHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0xPQ0tfU1lOQ19GTEFHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfTE9DS19TWU5DX0ZMQUdfTk9fU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfTE9DS19TWU5DX0ZMQUdfU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0NSX0xPQ0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNEMKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQ1JfTE9DS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBTQ1VfUkFNX0FUVl9DUl9MT0NLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0NSX0xPQ0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9DUl9MT0NLX0NSX0xPQ0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQ1JfTE9DS19DUl9MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9DUl9MT0NLX0NSX0xPQ0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0NSX0xPQ0tfQ1JfTE9DS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FHQ19NT0RFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNEQKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUdDX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fQVRWX0FHQ19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUdDX01PREVfVkFHQ19WRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX1ZBR0NfVkVMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9WQUdDX1ZFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9WQUdDX1ZFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX1ZBR0NfVkVMX0FHQ19GQVNUICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX1ZBR0NfVkVMX0FHQ19TTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX0JQX0VOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9CUF9FTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUdDX01PREVfQlBfRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUdDX01PREVfQlBfRU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9CUF9FTl9CUENfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9CUF9FTl9CUENfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9TSUZfU1REX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUdDX01PREVfU0lGX1NURF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX1NJRl9TVERfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9TSUZfU1REX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX1NJRl9TVERfU0lGX0FHQ19PRkYgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX1NJRl9TVERfU0lGX0FHQ19GTSAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9TSUZfU1REX1NJRl9BR0NfQU0gICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUdDX01PREVfRkFTVF9WQUdDX0VOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX0ZBU1RfVkFHQ19FTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9GQVNUX1ZBR0NfRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUdDX01PREVfRkFTVF9WQUdDX0VOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9GQVNUX1ZBR0NfRU5fRkFHQ19ESVNBQkxFICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9GQVNUX1ZBR0NfRU5fRkFHQ19FTkFCTEUgICAgICAgICAgICAgICAgICAgMHg0MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUdDX01PREVfTU9EX1dBX0JQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FHQ19NT0RFX01PRF9XQV9CUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9NT0RfV0FfQlBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUdDX01PREVfTU9EX1dBX0JQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9NT0RfV0FfQlBfTVdBX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9BR0NfTU9ERV9NT0RfV0FfQlBfTVdBX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgMHg4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNEUKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzAxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNEYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzAyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNTAKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzAzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNTEKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzA0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTQ1VfUkFNX0FUVl9GQUdDX1RIX1JFRF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjUyCisjZGVmaW5lIFNDVV9SQU1fQVRWX0ZBR0NfVEhfUkVEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FUVl9GQUdDX1RIX1JFRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfRkFHQ19USF9SRURfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0ZBR0NfVEhfUkVEX0ZBR0NfVEhfUkVEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9GQUdDX1RIX1JFRF9GQUdDX1RIX1JFRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9BVFZfRkFHQ19USF9SRURfRkFHQ19USF9SRURfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0ZBR0NfVEhfUkVEX0ZBR0NfVEhfUkVEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FNU19NQVhfUkVGX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNTMKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQU1TX01BWF9SRUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBTQ1VfUkFNX0FUVl9BTVNfTUFYX1JFRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FNU19NQVhfUkVGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BTVNfTUFYX1JFRl9BTVNfTUFYX1JFRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQU1TX01BWF9SRUZfQU1TX01BWF9SRUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BTVNfTUFYX1JFRl9BTVNfTUFYX1JFRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FNU19NQVhfUkVGX0FNU19NQVhfUkVGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfQU1TX01BWF9SRUZfQU1TX01BWF9SRUZfQkdfTU4gICAgICAgICAgICAgICAgICAgICAgIDB4MkJDCisjZGVmaW5lICAgICBTQ1VfUkFNX0FUVl9BTVNfTUFYX1JFRl9BTVNfTUFYX1JFRl9ESyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyRDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX0FNU19NQVhfUkVGX0FNU19NQVhfUkVGX0kgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMxNAorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfQU1TX01BWF9SRUZfQU1TX01BWF9SRUZfTExQICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjhBCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUNUX0FNWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1NAorI2RlZmluZSBTQ1VfUkFNX0FUVl9BQ1RfQU1YX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FDVF9BTVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUNUX0FNWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FDVF9BTVhfQUNUX0FNWF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BQ1RfQU1YX0FDVF9BTVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FDVF9BTVhfQUNUX0FNWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUNUX0FNWF9BQ1RfQU1YX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUNUX0FNSV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1NQorI2RlZmluZSBTQ1VfUkFNX0FUVl9BQ1RfQU1JX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FDVF9BTUlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUNUX0FNSV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FDVF9BTUlfQUNUX0FNSV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BQ1RfQU1JX0FDVF9BTUlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FDVF9BTUlfQUNUX0FNSV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUNUX0FNSV9BQ1RfQU1JX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzA1X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1NgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzA2X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1NworI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzA3X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1OAorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzA4X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1OQorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzA5X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1QQorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMDlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8wOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1QgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMTBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzExX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1QworI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMTFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzEyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1RAorI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNDVV9SQU1fQVRWX1ZJRF9HQUlOX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNUUKKyNkZWZpbmUgU0NVX1JBTV9BVFZfVklEX0dBSU5fSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0FUVl9WSURfR0FJTl9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9WSURfR0FJTl9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfVklEX0dBSU5fSElfVklEX0dBSU5fSElfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX1ZJRF9HQUlOX0hJX1ZJRF9HQUlOX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9BVFZfVklEX0dBSU5fSElfVklEX0dBSU5fSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfVklEX0dBSU5fSElfVklEX0dBSU5fSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfVklEX0dBSU5fTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY1RgorI2RlZmluZSBTQ1VfUkFNX0FUVl9WSURfR0FJTl9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgU0NVX1JBTV9BVFZfVklEX0dBSU5fTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1ZJRF9HQUlOX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9WSURfR0FJTl9MT19WSURfR0FJTl9MT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfVklEX0dBSU5fTE9fVklEX0dBSU5fTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX1ZJRF9HQUlOX0xPX1ZJRF9HQUlOX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9WSURfR0FJTl9MT19WSURfR0FJTl9MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMTNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjYwCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzEzX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzEzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMTRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjYxCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE0X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMTVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjYyCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMTZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjYzCisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE2X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE2X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUFHQ19DTlRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY2NAorI2RlZmluZSBTQ1VfUkFNX0FUVl9BQUdDX0NOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQUFHQ19DTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0FBR0NfQ05UX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BQUdDX0NOVF9BQUdDX0NOVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfQUFHQ19DTlRfQUFHQ19DTlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0FBR0NfQ05UX0FBR0NfQ05UX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9BQUdDX0NOVF9BQUdDX0NOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9TSUZfR0FJTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjY1CisjZGVmaW5lIFNDVV9SQU1fQVRWX1NJRl9HQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgU0NVX1JBTV9BVFZfU0lGX0dBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9TSUZfR0FJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfU0lGX0dBSU5fU0lGX0dBSU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX1NJRl9HQUlOX1NJRl9HQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfU0lGX0dBSU5fU0lGX0dBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9TSUZfR0FJTl9TSUZfR0FJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMTdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjY2CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE3X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE3X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9SU1ZfMThfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjY3CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JTVl8xOF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE4X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUlNWXzE4X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9SQVRFX09GU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjY4CisjZGVmaW5lIFNDVV9SQU1fQVRWX1JBVEVfT0ZTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUkFURV9PRlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9SQVRFX09GU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0xPX0lOQ1JfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNjkKKyNkZWZpbmUgU0NVX1JBTV9BVFZfTE9fSU5DUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTQ1VfUkFNX0FUVl9MT19JTkNSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0xPX0lOQ1JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfSUlSX0NSSVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY2QQorI2RlZmluZSBTQ1VfUkFNX0FUVl9JSVJfQ1JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFNDVV9SQU1fQVRWX0lJUl9DUklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfSUlSX0NSSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9ERUZfUkFURV9PRlNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjZCCisjZGVmaW5lIFNDVV9SQU1fQVRWX0RFRl9SQVRFX09GU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0NVX1JBTV9BVFZfREVGX1JBVEVfT0ZTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9ERUZfUkFURV9PRlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX0RFRl9MT19JTkNSX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNkMKKyNkZWZpbmUgU0NVX1JBTV9BVFZfREVGX0xPX0lOQ1JfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTQ1VfUkFNX0FUVl9ERUZfTE9fSU5DUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX0RFRl9MT19JTkNSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfRU5BQkxFX0lJUl9XQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY2RAorI2RlZmluZSBTQ1VfUkFNX0FUVl9FTkFCTEVfSUlSX1dBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU0NVX1JBTV9BVFZfRU5BQkxFX0lJUl9XQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgU0NVX1JBTV9BVFZfRU5BQkxFX0lJUl9XQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9NT0RfQ09OVFJPTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjZFCisjZGVmaW5lIFNDVV9SQU1fQVRWX01PRF9DT05UUk9MX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0NVX1JBTV9BVFZfTU9EX0NPTlRST0xfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9NT0RfQ09OVFJPTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fQVRWX1BBR0NfS0lfTUFYX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfUEFHQ19LSV9NQVhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTQ1VfUkFNX0FUVl9QQUdDX0tJX01BWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNDVV9SQU1fQVRWX1BBR0NfS0lfTUFYX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBDX0tJX01BWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY3MAorI2RlZmluZSBTQ1VfUkFNX0FUVl9CUENfS0lfTUFYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFNDVV9SQU1fQVRWX0JQQ19LSV9NQVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfQlBDX0tJX01BWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9OQUdDX0tJX01BWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjcxCisjZGVmaW5lIFNDVV9SQU1fQVRWX05BR0NfS0lfTUFYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0NVX1JBTV9BVFZfTkFHQ19LSV9NQVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9OQUdDX0tJX01BWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTQ1VfUkFNX0FUVl9OQUdDX0tJX01JTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjcyCisjZGVmaW5lIFNDVV9SQU1fQVRWX05BR0NfS0lfTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0NVX1JBTV9BVFZfTkFHQ19LSV9NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTQ1VfUkFNX0FUVl9OQUdDX0tJX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfTkFHQ19LSV9NSU5fTkFHQ19LSV9NSU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fQVRWX05BR0NfS0lfTUlOX05BR0NfS0lfTUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgU0NVX1JBTV9BVFZfTkFHQ19LSV9NSU5fTkFHQ19LSV9NSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9OQUdDX0tJX01JTl9OQUdDX0tJX01JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX0FUVl9LSV9DSEFOR0VfVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjczCisjZGVmaW5lIFNDVV9SQU1fQVRWX0tJX0NIQU5HRV9USF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX0FUVl9LSV9DSEFOR0VfVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9BVFZfS0lfQ0hBTkdFX1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fQVRWX0tJX0NIQU5HRV9USF9LSV9DSEFOR0VfVEhfX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX0FUVl9LSV9DSEFOR0VfVEhfS0lfQ0hBTkdFX1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9BVFZfS0lfQ0hBTkdFX1RIX0tJX0NIQU5HRV9USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fQVRWX0tJX0NIQU5HRV9USF9LSV9DSEFOR0VfVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9BVFZfS0lfQ0hBTkdFX1RIX0tJX0NIQU5HRV9USF9ORUdfTU9EICAgICAgICAgICAgICAgICAgIDB4MTQKKyNkZWZpbmUgICAgIFNDVV9SQU1fQVRWX0tJX0NIQU5HRV9USF9LSV9DSEFOR0VfVEhfUE9TX01PRCAgICAgICAgICAgICAgICAgICAweDI4CisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQU5ORVhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY3NAorI2RlZmluZSBTQ1VfUkFNX1FBTV9QQVJBTV9BTk5FWF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQU5ORVhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQU5ORVhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX0FOTkVYX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9BTk5FWF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fQU5ORVhfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fQU5ORVhfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9BTk5FWF9CSVRfQU5ORVhfQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9BTk5FWF9CSVRfQU5ORVhfQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9BTk5FWF9CSVRfQU5ORVhfQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9BTk5FWF9CSVRfQU5ORVhfRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQ09OU1RFTExBVElPTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY3NQorI2RlZmluZSBTQ1VfUkFNX1FBTV9QQVJBTV9DT05TVEVMTEFUSU9OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQ09OU1RFTExBVElPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQ09OU1RFTExBVElPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX0NPTlNURUxMQVRJT05fQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9DT05TVEVMTEFUSU9OX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fQ09OU1RFTExBVElPTl9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fQ09OU1RFTExBVElPTl9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9DT05TVEVMTEFUSU9OX0JJVF9VTktOT1dOICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fMTYgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fMzIgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fNjQgICAgICAgICAgICAgICAgICAgICAgMHg1CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fMTI4ICAgICAgICAgICAgICAgICAgICAgMHg2CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fMjU2ICAgICAgICAgICAgICAgICAgICAgMHg3CisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fSU5URVJMRUFWRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY3NgorI2RlZmluZSBTQ1VfUkFNX1FBTV9QQVJBTV9JTlRFUkxFQVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fSU5URVJMRUFWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9JTlRFUkxFQVZFX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fSU5URVJMRUFWRV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9JTlRFUkxFQVZFX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjEgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjFfVjIgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjIgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0k2NF9KMiAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjMgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kzMl9KNCAgICAgICAgICAgICAgICAgICAgICAgICAweDUKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjQgICAgICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxNl9KOCAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjUgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0k4X0oxNiAgICAgICAgICAgICAgICAgICAgICAgICAweDkKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjYgICAgICAgICAgICAgICAgICAgICAgICAweEEKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjcgICAgICAgICAgICAgICAgICAgICAgICAweEMKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMjhfSjggICAgICAgICAgICAgICAgICAgICAgICAweEUKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0kxMl9KMTcgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9QQVJBTV9JTlRFUkxFQVZFX0JJVF9JNV9KNCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fUEFSQU1fSU5URVJMRUFWRV9CSVRfVU5LTk9XTiAgICAgICAgICAgICAgICAgICAgICAgIDB4RkUKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX1BBUkFNX0lOVEVSTEVBVkVfQklUX0FVVE8gICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fU1lNX1JDUkFURV9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY3NworI2RlZmluZSBTQ1VfUkFNX1FBTV9QQVJBTV9TWU1fUkNSQVRFX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1BBUkFNX1NZTV9SQ1JBVEVfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1BBUkFNX1NZTV9SQ1JBVEVfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9TWU1fUkNSQVRFX0hJX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fU1lNX1JDUkFURV9ISV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9TWU1fUkNSQVRFX0hJX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9TWU1fUkNSQVRFX0hJX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9QQVJBTV9TWU1fUkNSQVRFX0xPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjc4CisjZGVmaW5lIFNDVV9SQU1fUUFNX1BBUkFNX1NZTV9SQ1JBVEVfTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fU1lNX1JDUkFURV9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fU1lNX1JDUkFURV9MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX1NZTV9SQ1JBVEVfTE9fQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9TWU1fUkNSQVRFX0xPX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX1NZTV9SQ1JBVEVfTE9fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX1NZTV9SQ1JBVEVfTE9fQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NFTlRFUlRBUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGNzkKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ0VOVEVSVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DRU5URVJUQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DRU5URVJUQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ0VOVEVSVEFQX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NFTlRFUlRBUF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DRU5URVJUQVBfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ0VOVEVSVEFQX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY3QQorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl8wX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl8wX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfMF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzBfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfMF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfMF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9QQVJBTV9BTFRfUkNSQVRFX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjdCCisjZGVmaW5lIFNDVV9SQU1fUUFNX1BBUkFNX0FMVF9SQ1JBVEVfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQUxUX1JDUkFURV9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQUxUX1JDUkFURV9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX0FMVF9SQ1JBVEVfSElfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9QQVJBTV9BTFRfUkNSQVRFX0hJX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX0FMVF9SQ1JBVEVfSElfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX0FMVF9SQ1JBVEVfSElfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1BBUkFNX0FMVF9SQ1JBVEVfTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGN0MKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUEFSQU1fQUxUX1JDUkFURV9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9QQVJBTV9BTFRfUkNSQVRFX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9QQVJBTV9BTFRfUkNSQVRFX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fQUxUX1JDUkFURV9MT19CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1BBUkFNX0FMVF9SQ1JBVEVfTE9fQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fQUxUX1JDUkFURV9MT19CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUEFSQU1fQUxUX1JDUkFURV9MT19CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY3RAorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl81X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl81X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfNV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzVfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfNV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfNV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjdFCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl82X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl82X0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfNl9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl82X0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl82X0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl83X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGN0YKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzdfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl83X0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzdfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzdfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY4MAorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfOF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl84X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl84X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfOF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzhfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfOF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfOF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjgxCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl85X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl85X0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfOV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl85X0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl85X0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl8xMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGODIKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzEwX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl8xMF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzEwX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzEwX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0ZNSFVNX1RPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY4MworI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fRk1IVU1fVE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9GTUhVTV9UT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9GTUhVTV9UT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRk1IVU1fVE9fQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0ZNSFVNX1RPX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRk1IVU1fVE9fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRk1IVU1fVE9fQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9GTUhVTV9UT19CSVRfTk9fRk1IVU1fVE8gICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fTUVESUFOX0FWX01VTFRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjg0CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9NRURJQU5fQVZfTVVMVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX01FRElBTl9BVl9NVUxUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX01FRElBTl9BVl9NVUxUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9NRURJQU5fQVZfTVVMVF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTUVESUFOX0FWX01VTFRfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9NRURJQU5fQVZfTVVMVF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9NRURJQU5fQVZfTVVMVF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9SQURJVVNfQVZfTElNSVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGODUKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1JBRElVU19BVl9MSU1JVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUkFESVVTX0FWX0xJTUlUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUkFESVVTX0FWX0xJTUlUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1JBRElVU19BVl9MSU1JVF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SQURJVVNfQVZfTElNSVRfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1JBRElVU19BVl9MSU1JVF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1JBRElVU19BVl9MSU1JVF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY4NgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUMV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDFfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUMV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUMV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjg3CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQyX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUMl9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQyX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQyX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGODgKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDNfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQzX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDNfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDNfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY4OQorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQ0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQ0X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUNF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDRfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUNF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUNF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjhBCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQ1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xDQVZHX09GRlNFVDVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQ1X0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTENBVkdfT0ZGU0VUNV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQ1X0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MQ0FWR19PRkZTRVQ1X0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9UR1RfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGOEIKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9UR1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9UR1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fU1RBVEVfVEdUX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9UR1RfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9UR1RfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfSFVOVElOR19BTVAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfSFVOVElOR19SQVRFICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfSFVOVElOR19GUkVRICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfSFVOVElOR19VUFJJR0hUICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfSFVOVElOR19QSEFTRSAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfVFJBQ0tJTkdfUEhOT0lTRSAgICAgICAgICAgICAgICAgIDB4NQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfVFJBQ0tJTkcgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX1RHVF9CSVRfVFJBQ0tJTkdfQlVSU1QgICAgICAgICAgICAgICAgICAgIDB4NworCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX09WRVJSSURFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGOEMKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfT1ZFUlJJREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX09WRVJSSURFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfT1ZFUlJJREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX09WRVJSSURFX0xDS19BTVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19PVkVSUklERV9MQ0tfQU1QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfT1ZFUlJJREVfTENLX0FNUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfT1ZFUlJJREVfTENLX0FNUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0FUSF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY4RAorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fQVRIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9BVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9BVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQVRIX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0FUSF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQVRIX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQVRIX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUlRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjhFCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9SVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1JUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1JUSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SVEhfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fUlRIX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SVEhfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SVEhfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1JUSF9CSVRfUUFNXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OEMKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9SVEhfQklUX1FBTV8zMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fUlRIX0JJVF9RQU1fNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0RQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1JUSF9CSVRfUUFNXzEyOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzIKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9SVEhfQklUX1FBTV8yNTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJECisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0ZUSF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY4RgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fRlRIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9GVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9GVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRlRIX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0ZUSF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRlRIX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRlRIX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9GVEhfQklUX1FBTV8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMyCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fRlRIX0JJVF9RQU1fMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX0ZUSF9CSVRfUUFNXzY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUUKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9GVEhfQklUX1FBTV8xMjggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fRlRIX0JJVF9RQU1fMjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9QVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGOTAKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1BUSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUFRIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUFRIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1BUSF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9QVEhfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1BUSF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1BUSF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fUFRIX0JJVF9RQU1fMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDOAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1BUSF9CSVRfUUFNXzMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OTYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9QVEhfQklUX1FBTV82NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDhDCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fUFRIX0JJVF9RQU1fMTI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2NAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1BUSF9CSVRfUUFNXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NjQKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fTVRIX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjkxCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9NVEhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX01USF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX01USF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9NVEhfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTVRIX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9NVEhfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9NVEhfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX01USF9CSVRfUUFNXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NUEKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9NVEhfQklUX1FBTV8zMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fTVRIX0JJVF9RQU1fNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX01USF9CSVRfUUFNXzEyOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0MKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9NVEhfQklUX1FBTV8yNTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0NUSF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY5MgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fQ1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9DVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9DVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQ1RIX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0NUSF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQ1RIX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQ1RIX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9DVEhfQklUX1FBTV8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEEwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fQ1RIX0JJVF9RQU1fMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4QworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX0NUSF9CSVRfUUFNXzY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OEMKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9DVEhfQklUX1FBTV8xMjggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDhDCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fQ1RIX0JJVF9RQU1fMjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4QworCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9RVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGOTMKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1FUSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUVRIX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUVRIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1FUSF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9RVEhfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1FUSF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1FUSF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fUVRIX0JJVF9RQU1fMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhFNgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1FUSF9CSVRfUUFNXzMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QUEKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9RVEhfQklUX1FBTV82NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMzCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fUVRIX0JJVF9RQU1fMTI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4QworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1FUSF9CSVRfUUFNXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OTYKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUkFURV9MSU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjk0CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX0xJTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1JBVEVfTElNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1JBVEVfTElNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX0xJTV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fUkFURV9MSU1fQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX0xJTV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX0xJTV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1JBVEVfTElNX0JJVF9RQU1fMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX0xJTV9CSVRfUUFNXzMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fUkFURV9MSU1fQklUX1FBTV82NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1JBVEVfTElNX0JJVF9RQU1fMTI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX0xJTV9CSVRfUUFNXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2CisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0ZSRVFfTElNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY5NQorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fRlJFUV9MSU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9GUkVRX0xJTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9GUkVRX0xJTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRlJFUV9MSU1fQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0ZSRVFfTElNX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRlJFUV9MSU1fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fRlJFUV9MSU1fQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9GUkVRX0xJTV9CSVRfUUFNXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFFCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9GU01fRlJFUV9MSU1fQklUX1FBTV8zMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxNAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX0ZSRVFfTElNX0JJVF9RQU1fNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjgKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9GUkVRX0xJTV9CSVRfUUFNXzEyOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9GUkVRX0xJTV9CSVRfUUFNXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDI4CisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0NPVU5UX0xJTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY5NgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fQ09VTlRfTElNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9DT1VOVF9MSU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9DT1VOVF9MSU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQ09VTlRfTElNX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0NPVU5UX0xJTV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQ09VTlRfTElNX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fQ09VTlRfTElNX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9DT1VOVF9MSU1fQklUX1FBTV8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9DT1VOVF9MSU1fQklUX1FBTV8zMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9DT1VOVF9MSU1fQklUX1FBTV82NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9DT1VOVF9MSU1fQklUX1FBTV8xMjggICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0ZTTV9DT1VOVF9MSU1fQklUX1FBTV8yNTYgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DQV9DT0FSU0VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjk3CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NBX0NPQVJTRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0FfQ09BUlNFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0FfQ09BUlNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NBX0NPQVJTRV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DQV9DT0FSU0VfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0FfQ09BUlNFX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NBX0NPQVJTRV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NBX01FRElVTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGOTgKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0FfTUVESVVNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DQV9NRURJVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DQV9NRURJVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0FfTUVESVVNX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NBX01FRElVTV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DQV9NRURJVU1fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0FfTUVESVVNX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0FfRklORV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY5OQorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DQV9GSU5FX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NBX0ZJTkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NBX0ZJTkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DQV9GSU5FX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0FfRklORV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NBX0ZJTkVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DQV9GSU5FX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DUF9DT0FSU0VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjlBCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NQX0NPQVJTRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ1BfQ09BUlNFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ1BfQ09BUlNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NQX0NPQVJTRV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DUF9DT0FSU0VfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ1BfQ09BUlNFX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NQX0NPQVJTRV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NQX01FRElVTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGOUIKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ1BfTUVESVVNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DUF9NRURJVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DUF9NRURJVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ1BfTUVESVVNX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NQX01FRElVTV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DUF9NRURJVU1fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ1BfTUVESVVNX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ1BfRklORV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY5QworI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DUF9GSU5FX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NQX0ZJTkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NQX0ZJTkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DUF9GSU5FX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ1BfRklORV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NQX0ZJTkVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DUF9GSU5FX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DSV9DT0FSU0VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRjlECisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NJX0NPQVJTRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0lfQ09BUlNFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0lfQ09BUlNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NJX0NPQVJTRV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DSV9DT0FSU0VfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0lfQ09BUlNFX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NJX0NPQVJTRV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NJX01FRElVTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGOUUKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0lfTUVESVVNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DSV9NRURJVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DSV9NRURJVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0lfTUVESVVNX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NJX01FRElVTV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DSV9NRURJVU1fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0lfTUVESVVNX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0lfRklORV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUY5RgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DSV9GSU5FX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NJX0ZJTkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NJX0ZJTkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DSV9GSU5FX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0lfRklORV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NJX0ZJTkVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DSV9GSU5FX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19FUF9DT0FSU0VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkEwCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0VQX0NPQVJTRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfRVBfQ09BUlNFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfRVBfQ09BUlNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0VQX0NPQVJTRV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19FUF9DT0FSU0VfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfRVBfQ09BUlNFX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0VQX0NPQVJTRV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0VQX01FRElVTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQTEKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfRVBfTUVESVVNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19FUF9NRURJVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19FUF9NRURJVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfRVBfTUVESVVNX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0VQX01FRElVTV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19FUF9NRURJVU1fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfRVBfTUVESVVNX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfRVBfRklORV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZBMgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19FUF9GSU5FX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0VQX0ZJTkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0VQX0ZJTkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19FUF9GSU5FX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfRVBfRklORV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0VQX0ZJTkVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19FUF9GSU5FX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19FSV9DT0FSU0VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkEzCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0VJX0NPQVJTRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfRUlfQ09BUlNFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfRUlfQ09BUlNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0VJX0NPQVJTRV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19FSV9DT0FSU0VfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfRUlfQ09BUlNFX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0VJX0NPQVJTRV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0VJX01FRElVTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQTQKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfRUlfTUVESVVNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19FSV9NRURJVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19FSV9NRURJVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfRUlfTUVESVVNX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0VJX01FRElVTV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19FSV9NRURJVU1fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfRUlfTUVESVVNX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfRUlfRklORV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZBNQorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19FSV9GSU5FX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0VJX0ZJTkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0VJX0ZJTkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19FSV9GSU5FX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfRUlfRklORV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0VJX0ZJTkVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19FSV9GSU5FX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DRl9DT0FSU0VfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NGX0NPQVJTRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0ZfQ09BUlNFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0ZfQ09BUlNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NGX0NPQVJTRV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DRl9DT0FSU0VfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0ZfQ09BUlNFX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NGX0NPQVJTRV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NGX01FRElVTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQTcKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0ZfTUVESVVNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DRl9NRURJVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DRl9NRURJVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0ZfTUVESVVNX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NGX01FRElVTV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DRl9NRURJVU1fQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0ZfTUVESVVNX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0ZfRklORV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZBOAorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DRl9GSU5FX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NGX0ZJTkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NGX0ZJTkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DRl9GSU5FX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0ZfRklORV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NGX0ZJTkVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DRl9GSU5FX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DRjFfQ09BUlNFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkE5CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NGMV9DT0FSU0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0YxX0NPQVJTRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0YxX0NPQVJTRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NGMV9DT0FSU0VfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DRjFfQ09BUlNFX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0YxX0NPQVJTRV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NGMV9DT0FSU0VfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NGMV9NRURJVU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQUEKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0YxX01FRElVTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DRjFfTUVESVVNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DRjFfTUVESVVNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0YxX01FRElVTV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NGMV9NRURJVU1fQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DRjFfTUVESVVNX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0YxX01FRElVTV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTENfQ0YxX0ZJTkVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZBQgorI2RlZmluZSBTQ1VfUkFNX1FBTV9MQ19DRjFfRklORV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NGMV9GSU5FX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xDX0NGMV9GSU5FX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DRjFfRklORV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTENfQ0YxX0ZJTkVfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xDX0NGMV9GSU5FX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MQ19DRjFfRklORV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9TTF9TSUdfUE9XRVJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkFDCisjZGVmaW5lIFNDVV9SQU1fUUFNX1NMX1NJR19QT1dFUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fU0xfU0lHX1BPV0VSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fU0xfU0lHX1BPV0VSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1NMX1NJR19QT1dFUl9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9TTF9TSUdfUE9XRVJfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1NMX1NJR19QT1dFUl9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1NMX1NJR19QT1dFUl9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQUQKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDBfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQwX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDBfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDBfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMF9CSVRfUUFNXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzNENECisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMF9CSVRfUUFNXzMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQTMzCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMF9CSVRfUUFNXzY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzNDE4CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMF9CSVRfUUFNXzEyOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODE0CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMF9CSVRfUUFNXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyQ0VFCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZBRQorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDFfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQxX0JJVF9RQU1fMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM0Q0QKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQxX0JJVF9RQU1fMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFBMzMKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQxX0JJVF9RQU1fNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMxNEEKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQxX0JJVF9RQU1fMTI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE5QzYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQxX0JJVF9RQU1fMjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDJGMzQKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkFGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQyX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEMl9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQyX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQyX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDJfQklUX1FBTV8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzRDRAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDJfQklUX1FBTV8zMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUEzMworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDJfQklUX1FBTV82NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MkVENAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDJfQklUX1FBTV8xMjggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MThGQQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDJfQklUX1FBTV8yNTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzBGRgorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQjAKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDNfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQzX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDNfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDNfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEM19CSVRfUUFNXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzNENECisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEM19CSVRfUUFNXzMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQTMzCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEM19CSVRfUUFNXzY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzNUYxCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEM19CSVRfUUFNXzEyOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTA5CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFEM19CSVRfUUFNXzI1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzMjgzCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZCMQorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFENF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ0X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFENF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDRfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFENF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFENF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ0X0JJVF9RQU1fMTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM0Q0QKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ0X0JJVF9RQU1fMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFBMzMKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ0X0JJVF9RQU1fNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM1RjEKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ0X0JJVF9RQU1fMTI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFBMDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ0X0JJVF9RQU1fMjU2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM1M0QKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFENV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkIyCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ1X0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9DTUFfUkFENV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ1X0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0NNQV9SQUQ1X0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDVfQklUX1FBTV8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzRDRAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDVfQklUX1FBTV8zMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUEzMworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDVfQklUX1FBTV82NCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0NGOQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDVfQklUX1FBTV8xMjggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUM0NgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRVFfQ01BX1JBRDVfQklUX1FBTV8yNTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0MxOQorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0NUTF9FTkFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQjMKKyNkZWZpbmUgU0NVX1JBTV9RQU1fQ1RMX0VOQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9DVExfRU5BX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9DVExfRU5BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9BTVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfQU1QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0FNUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0FNUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfQUNRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0FDUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9BQ1FfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9BQ1FfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0VRVV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9FUVVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfRVFVX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfRVFVX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9TTENfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfU0xDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX1NMQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX1NMQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfTENfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0xDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9MQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfTENfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9BR0NfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfQUdDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0FHQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9BR0NfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0ZFQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9GRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfRkVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0ZFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfQVhJU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0FYSVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9BWElTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfQVhJU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9GTUhVTV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfRk1IVU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0ZNSFVNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfRk1IVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9FUVRJTUVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfRVFUSU1FX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0VRVElNRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0NUTF9FTkFfRVFUSU1FX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9FWFRMQ0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0VYVExDS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQ1RMX0VOQV9FWFRMQ0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9DVExfRU5BX0VYVExDS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkI0CisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl8xX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfMV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl8xX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl8xX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl8yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQjUKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzJfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1dSX1JTVl8yX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzJfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzJfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fV1JfUlNWXzNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZCNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9XUl9SU1ZfM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl8zX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1dSX1JTVl8zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfM19CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fV1JfUlNWXzNfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfM19CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9XUl9SU1ZfM19CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9BQ1RJVkVfQ09OU1RFTExBVElPTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkI3CisjZGVmaW5lIFNDVV9SQU1fUUFNX0FDVElWRV9DT05TVEVMTEFUSU9OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBTQ1VfUkFNX1FBTV9BQ1RJVkVfQ09OU1RFTExBVElPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSBTQ1VfUkFNX1FBTV9BQ1RJVkVfQ09OU1RFTExBVElPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQUNUSVZFX0NPTlNURUxMQVRJT05fQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0FDVElWRV9DT05TVEVMTEFUSU9OX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9BQ1RJVkVfQ09OU1RFTExBVElPTl9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9BQ1RJVkVfQ09OU1RFTExBVElPTl9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0FDVElWRV9DT05TVEVMTEFUSU9OX0JJVF9VTktOT1dOICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0FDVElWRV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fMTYgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0FDVElWRV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fMzIgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0FDVElWRV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fNjQgICAgICAgICAgICAgICAgICAgICAweDUKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0FDVElWRV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fMTI4ICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0FDVElWRV9DT05TVEVMTEFUSU9OX0JJVF9RQU1fMjU2ICAgICAgICAgICAgICAgICAgICAweDcKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9BQ1RJVkVfSU5URVJMRUFWRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkI4CisjZGVmaW5lIFNDVV9SQU1fUUFNX0FDVElWRV9JTlRFUkxFQVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBTQ1VfUkFNX1FBTV9BQ1RJVkVfSU5URVJMRUFWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0FDVElWRV9JTlRFUkxFQVZFX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9BQ1RJVkVfSU5URVJMRUFWRV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0FDVElWRV9JTlRFUkxFQVZFX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjEgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjFfVjIgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjIgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0k2NF9KMiAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjMgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kzMl9KNCAgICAgICAgICAgICAgICAgICAgICAgIDB4NQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjQgICAgICAgICAgICAgICAgICAgICAgIDB4NgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxNl9KOCAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjUgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0k4X0oxNiAgICAgICAgICAgICAgICAgICAgICAgIDB4OQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjYgICAgICAgICAgICAgICAgICAgICAgIDB4QQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjcgICAgICAgICAgICAgICAgICAgICAgIDB4QworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMjhfSjggICAgICAgICAgICAgICAgICAgICAgIDB4RQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fQUNUSVZFX0lOVEVSTEVBVkVfQklUX0kxMl9KMTcgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0FDVElWRV9JTlRFUkxFQVZFX0JJVF9JNV9KNCAgICAgICAgICAgICAgICAgICAgICAgICAweDExCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9BQ1RJVkVfSU5URVJMRUFWRV9CSVRfVU5LTk9XTiAgICAgICAgICAgICAgICAgICAgICAgMHhGRQorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl80X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQjkKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzRfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl80X0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzRfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzRfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fTE9DS0VEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZCQQorI2RlZmluZSBTQ1VfUkFNX1FBTV9MT0NLRURfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0xPQ0tFRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0xPQ0tFRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MT0NLRURfSU5UTEVWRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTE9DS0VEX0lOVExFVkVMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MT0NLRURfSU5UTEVWRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9OT1RfTE9DS0VEICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9BTVBfT0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9SQVRFX09LICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9GUkVRX09LICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9VUFJJR0hUX09LICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9QSE5PSVNFX09LICAgICAgICAgICAgICAgICAgICAgICAgICAweDUKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9UUkFDS19PSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUgICAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9JTlRMRVZFTF9JTVBOT0lTRV9PSyAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0xPQ0tFRF9MT0NLRURfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9MT0NLRURfTE9DS0VEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTE9DS0VEX0xPQ0tFRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRjAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fTE9DS0VEX0xPQ0tFRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9MT0NLRURfTE9DS0VEX05PVF9MT0NLRUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9MT0NLRURfTE9DS0VEX0RFTU9EX0xPQ0tFRCAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9MT0NLRURfTE9DS0VEX0xPQ0tFRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9MT0NLRURfTE9DS0VEX05FVkVSX0xPQ0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMDAwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZCQgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX1BSRUJFUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9QUkVCRVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfUFJFQkVSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfUFJFQkVSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9QQUNLRVRfRkFJTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfUEFDS0VUX0ZBSUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX1BBQ0tFVF9GQUlMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX1BBQ0tFVF9GQUlMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfUFJCU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX1BSQlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9QUkJTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9QUkJTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX09DX0xPQ0tfSU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9PQ19MT0NLX0lOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfT0NfTE9DS19JTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfT0NfTE9DS19JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9PQ19MT0NLX09VVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfT0NfTE9DS19PVVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX09DX0xPQ0tfT1VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9PQ19MT0NLX09VVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX1BPU1RCRVJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9QT1NUQkVSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfUE9TVEJFUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX1BPU1RCRVJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfRklGT19GVUxMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX0ZJRk9fRlVMTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9GSUZPX0ZVTExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfRklGT19GVUxMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9GSUZPX0VNUFRZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfRklGT19FTVBUWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX0ZJRk9fRU1QVFlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9GSUZPX0VNUFRZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX09DX0dSQUJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9PQ19HUkFCX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfT0NfR1JBQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9PQ19HUkFCX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX09DX0NIQU5HRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9PQ19DSEFOR0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfT0NfQ0hBTkdFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9PQ19DSEFOR0VfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX0xDS19DSEdfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfTENLX0NIR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX0xDS19DSEdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfTENLX0NIR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9GU01fQ0hHX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX0ZTTV9DSEdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9GU01fQ0hHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0hJX0ZTTV9DSEdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfUlNWX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19ISV9SU1ZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfUlNWX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAwMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfSElfUlNWX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQkMKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19USU1FUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fVElNRVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1RJTUVSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1RJTUVSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fQ0xJUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX0NMSVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19DTElQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19DTElQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1NFTlNFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19TRU5TRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU0VOU0VfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU0VOU0VfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19QT1dFUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fUE9XRVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1BPV0VSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1BPV0VSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fTUVESUFOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX01FRElBTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19NRURJQU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fTUVESUFOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19NRVJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fTUVSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX01FUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19NRVJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX0xPT1BfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19MT09QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fTE9PUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX0xPT1BfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fRlJFUVdSQVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX0ZSRVFXUkFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19GUkVRV1JBUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fRlJFUVdSQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19TRVJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU0VSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1NFUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU0VSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19WRF9MT0NLX0lOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fVkRfTE9DS19JTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1ZEX0xPQ0tfSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fVkRfTE9DS19JTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19TWV9MT0NLX0lOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1NZX0xPQ0tfSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19TWV9MT0NLX0lOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1NZX0xPQ0tfSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU1lfTE9DS19PVVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19TWV9MT0NLX09VVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU1lfTE9DS19PVVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19TWV9MT0NLX09VVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1NZX1RJTUVfT1VUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU1lfVElNRV9PVVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1NZX1RJTUVfT1VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX1NZX1RJTUVfT1VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU1lOQ1dPUkRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19TWU5DV09SRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU1lOQ1dPUkRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fU1lOQ1dPUkRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19ESV9MT0NLX0lOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX0RJX0xPQ0tfSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19ESV9MT0NLX0lOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX09DQ19MT19ESV9MT0NLX0lOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX0RJX0xPQ0tfT1VUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19PQ0NfTE9fRElfTE9DS19PVVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX0RJX0xPQ0tfT1VUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwMDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfT0NDX0xPX0RJX0xPQ0tfT1VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9FVkVOVFNfU0NIRURfSElfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkJECisjZGVmaW5lIFNDVV9SQU1fUUFNX0VWRU5UU19TQ0hFRF9ISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVZFTlRTX1NDSEVEX0hJX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVZFTlRTX1NDSEVEX0hJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19TQ0hFRF9ISV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FVkVOVFNfU0NIRURfSElfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19TQ0hFRF9ISV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19TQ0hFRF9ISV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VWRU5UU19TQ0hFRF9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQkUKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVZFTlRTX1NDSEVEX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FVkVOVFNfU0NIRURfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FVkVOVFNfU0NIRURfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX1NDSEVEX0xPX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VWRU5UU19TQ0hFRF9MT19CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX1NDSEVEX0xPX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVZFTlRTX1NDSEVEX0xPX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fVEFTS0xFVFNfU0NIRURfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZCRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9UQVNLTEVUU19TQ0hFRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1RBU0tMRVRTX1NDSEVEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1RBU0tMRVRTX1NDSEVEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9UQVNLTEVUU19TQ0hFRF9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fVEFTS0xFVFNfU0NIRURfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9UQVNLTEVUU19TQ0hFRF9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9UQVNLTEVUU19TQ0hFRF9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9UQVNLTEVUU19SVU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkMwCisjZGVmaW5lIFNDVV9SQU1fUUFNX1RBU0tMRVRTX1JVTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fVEFTS0xFVFNfUlVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fVEFTS0xFVFNfUlVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1RBU0tMRVRTX1JVTl9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9UQVNLTEVUU19SVU5fQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1RBU0tMRVRTX1JVTl9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1RBU0tMRVRTX1JVTl9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0FDVElWRV9TWU1fUkNSQVRFX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQzEKKyNkZWZpbmUgU0NVX1JBTV9RQU1fQUNUSVZFX1NZTV9SQ1JBVEVfSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9BQ1RJVkVfU1lNX1JDUkFURV9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9BQ1RJVkVfU1lNX1JDUkFURV9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQUNUSVZFX1NZTV9SQ1JBVEVfSElfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0FDVElWRV9TWU1fUkNSQVRFX0hJX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQUNUSVZFX1NZTV9SQ1JBVEVfSElfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQUNUSVZFX1NZTV9SQ1JBVEVfSElfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fQUNUSVZFX1NZTV9SQ1JBVEVfTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZDMgorI2RlZmluZSBTQ1VfUkFNX1FBTV9BQ1RJVkVfU1lNX1JDUkFURV9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX0FDVElWRV9TWU1fUkNSQVRFX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0FDVElWRV9TWU1fUkNSQVRFX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9BQ1RJVkVfU1lNX1JDUkFURV9MT19CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fQUNUSVZFX1NZTV9SQ1JBVEVfTE9fQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9BQ1RJVkVfU1lNX1JDUkFURV9MT19CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9BQ1RJVkVfU1lNX1JDUkFURV9MT19CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkMzCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl81X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl81X0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfNV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl81X0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl81X0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl82X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQzQKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzZfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl82X0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzZfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzZfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZDNQorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfN19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl83X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl83X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfN19CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzdfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfN19CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfN19CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkM2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl84X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl84X0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfOF9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl84X0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl84X0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl85X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQzcKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzlfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl85X0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzlfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzlfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZDOAorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfMTBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl8xMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl8xMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfMTBfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzEwX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfMTBfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfMTBfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9BR0NfVFBPV19PRkZTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkM5CisjZGVmaW5lIFNDVV9SQU1fUUFNX0FHQ19UUE9XX09GRlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fQUdDX1RQT1dfT0ZGU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fQUdDX1RQT1dfT0ZGU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0FHQ19UUE9XX09GRlNfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9BR0NfVFBPV19PRkZTX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0FHQ19UUE9XX09GRlNfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0FHQ19UUE9XX09GRlNfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQ0EKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fU1RBVEVfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9IVU5USU5HX0FNUCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9IVU5USU5HX1JBVEUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9IVU5USU5HX0ZSRVEgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9IVU5USU5HX1VQUklHSFQgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9IVU5USU5HX1BIQVNFICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9UUkFDS0lOR19QSE5PSVNFICAgICAgICAgICAgICAgICAgICAgIDB4NQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9UUkFDS0lORyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX0JJVF9UUkFDS0lOR19CVVJTVCAgICAgICAgICAgICAgICAgICAgICAgIDB4NworCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9ORVdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQ0IKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9ORVdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9ORVdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fU1RBVEVfTkVXX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9ORVdfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9TVEFURV9ORVdfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfSFVOVElOR19BTVAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfSFVOVElOR19SQVRFICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfSFVOVElOR19GUkVRICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfSFVOVElOR19VUFJJR0hUICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfSFVOVElOR19QSEFTRSAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfVFJBQ0tJTkdfUEhOT0lTRSAgICAgICAgICAgICAgICAgIDB4NQorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfVFJBQ0tJTkcgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NgorI2RlZmluZSAgICAgU0NVX1JBTV9RQU1fRlNNX1NUQVRFX05FV19CSVRfVFJBQ0tJTkdfQlVSU1QgICAgICAgICAgICAgICAgICAgIDB4NworCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQ0MKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19BTVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfQU1QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX0FNUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX0FNUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfUkFURVZBUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX1JBVEVWQVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19SQVRFVkFSX19NICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19SQVRFVkFSX19QUkUgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX1JBRElVU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19SQURJVVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfUkFESVVTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfUkFESVVTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19GUkVRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfRlJFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX0ZSRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX0ZSRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfRlJFUVZBUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX0ZSRVFWQVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19GUkVRVkFSX19NICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfRlJFUVZBUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19DUEhBU0VfX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfQ1BIQVNFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX0NQSEFTRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19DUEhBU0VfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX1VQUklHSFRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19VUFJJR0hUX19XICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfVVBSSUdIVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX1VQUklHSFRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfUEhBU0VfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX1BIQVNFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19QSEFTRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfUEhBU0VfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9MT0NLX0ZMQUdTX0xDS19NRURJQU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfTUVESUFOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0xPQ0tfRkxBR1NfTENLX01FRElBTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fTE9DS19GTEFHU19MQ0tfTUVESUFOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fUkFURV9WQVJJQVRJT05fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkNECisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX1ZBUklBVElPTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1JBVEVfVkFSSUFUSU9OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX1JBVEVfVkFSSUFUSU9OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX1ZBUklBVElPTl9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9GU01fUkFURV9WQVJJQVRJT05fQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX1ZBUklBVElPTl9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9SQVRFX1ZBUklBVElPTl9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX0ZTTV9GUkVRX1ZBUklBVElPTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGQ0UKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRlNNX0ZSRVFfVkFSSUFUSU9OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fRlJFUV9WQVJJQVRJT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9GU01fRlJFUV9WQVJJQVRJT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0ZSRVFfVkFSSUFUSU9OX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0ZTTV9GUkVRX1ZBUklBVElPTl9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0ZSRVFfVkFSSUFUSU9OX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRlNNX0ZSRVFfVkFSSUFUSU9OX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVJSX1NUQVRFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZDRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVJSX1NUQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVJSX1NUQVRFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VSUl9TVEFURV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVJSX1NUQVRFX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVJSX1NUQVRFX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX0hVTlRJTkdfQU1QICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX0hVTlRJTkdfUkFURSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX0hVTlRJTkdfRlJFUSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX0hVTlRJTkdfVVBSSUdIVCAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX0hVTlRJTkdfUEhBU0UgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX1RSQUNLSU5HX1BITk9JU0UgICAgICAgICAgICAgICAgICAgICAgMHg1CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX1RSQUNLSU5HICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisjZGVmaW5lICAgICBTQ1VfUkFNX1FBTV9FUlJfU1RBVEVfQklUX1RSQUNLSU5HX0JVUlNUICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVJSX0xPQ0tfRkxBR1NfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZEMAorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUlJfTE9DS19GTEFHU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVJSX0xPQ0tfRkxBR1NfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUlJfTE9DS19GTEFHU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVJSX0xPQ0tfRkxBR1NfTENLX0FNUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VSUl9MT0NLX0ZMQUdTX0xDS19BTVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUlJfTE9DS19GTEFHU19MQ0tfQU1QX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUlJfTE9DS19GTEFHU19MQ0tfQU1QX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9MT0NLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkQxCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX0xPQ0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9MT0NLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9MT0NLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fRVFfTE9DS19CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX0xPQ0tfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9MT0NLX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9MT0NLX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9FUV9TVEFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkQyCisjZGVmaW5lIFNDVV9SQU1fUUFNX0VRX1NUQVRFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfU1RBVEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fRVFfU1RBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX1NUQVRFX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9FUV9TVEFURV9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX1NUQVRFX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX0VRX1NUQVRFX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl8wX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRDMKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzBfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl8wX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzBfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzBfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZENAorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl8xX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl8xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfMV9CSVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzFfQklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfMV9CSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfMV9CSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkQ1CisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl8yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl8yX0JJVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1FBTV9SRF9SU1ZfMl9CSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl8yX0JJVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl8yX0JJVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUUFNX1JEX1JTVl8zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRDYKKyNkZWZpbmUgU0NVX1JBTV9RQU1fUkRfUlNWXzNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1FBTV9SRF9SU1ZfM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzNfQklUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fUUFNX1JEX1JTVl8zX0JJVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzNfQklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9RQU1fUkRfUlNWXzNfQklUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0NVX1JBTV9WU0JfQ1RMX01PREVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZENworI2RlZmluZSBTQ1VfUkFNX1ZTQl9DVExfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0NVX1JBTV9WU0JfQ1RMX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0NVX1JBTV9WU0JfQ1RMX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fVlNCX0NUTF9NT0RFX1ZTQl9DVExfTU9ERV9BR0NfX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTQ1VfUkFNX1ZTQl9DVExfTU9ERV9WU0JfQ1RMX01PREVfQUdDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9WU0JfQ1RMX01PREVfVlNCX0NUTF9NT0RFX0FHQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0NVX1JBTV9WU0JfQ1RMX01PREVfVlNCX0NUTF9NT0RFX0FHQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1ZTQl9DVExfTU9ERV9WU0JfQ1RMX01PREVfQUdDX09GRiAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTQ1VfUkFNX1ZTQl9DVExfTU9ERV9WU0JfQ1RMX01PREVfQUdDX09OICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBTQ1VfUkFNX1ZTQl9DVExfTU9ERV9WU0JfQ1RMX01PREVfTU9OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0NVX1JBTV9WU0JfQ1RMX01PREVfVlNCX0NUTF9NT0RFX01PTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNDVV9SQU1fVlNCX0NUTF9NT0RFX1ZTQl9DVExfTU9ERV9NT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNDVV9SQU1fVlNCX0NUTF9NT0RFX1ZTQl9DVExfTU9ERV9NT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9WU0JfQ1RMX01PREVfVlNCX0NUTF9NT0RFX01PTl9PRkYgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9WU0JfQ1RMX01PREVfVlNCX0NUTF9NT0RFX01PTl9PTiAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFNDVV9SQU1fVlNCX05PVENIX1RIUkVTSE9MRF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRDgKKyNkZWZpbmUgU0NVX1JBTV9WU0JfTk9UQ0hfVEhSRVNIT0xEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9OT1RDSF9USFJFU0hPTERfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9OT1RDSF9USFJFU0hPTERfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl8wX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRDkKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl8xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGREEKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl8yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGREIKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl8zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGREMKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl80X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGREQKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl81X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGREUKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl82X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGREYKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl83X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTAKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl84X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTEKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl85X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTIKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl8xMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTMKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl8xMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTQKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl8xMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTUKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzEyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMTJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX1JTVl8xM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTYKKyNkZWZpbmUgU0NVX1JBTV9WU0JfUlNWXzEzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9SU1ZfMTNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX0FHQ19QT1dfVEdUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTcKKyNkZWZpbmUgU0NVX1JBTV9WU0JfQUdDX1BPV19UR1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBTQ1VfUkFNX1ZTQl9BR0NfUE9XX1RHVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9BR0NfUE9XX1RHVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX09VVEVSX0xPT1BfQ1lDTEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTgKKyNkZWZpbmUgU0NVX1JBTV9WU0JfT1VURVJfTE9PUF9DWUNMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNDVV9SQU1fVlNCX09VVEVSX0xPT1BfQ1lDTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9PVVRFUl9MT09QX0NZQ0xFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fVlNCX0ZJRUxEX05VTUJFUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRTkKKyNkZWZpbmUgU0NVX1JBTV9WU0JfRklFTERfTlVNQkVSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNDVV9SQU1fVlNCX0ZJRUxEX05VTUJFUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0NVX1JBTV9WU0JfRklFTERfTlVNQkVSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1ZTQl9TRUdNRU5UX05VTUJFUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkVBCisjZGVmaW5lIFNDVV9SQU1fVlNCX1NFR01FTlRfTlVNQkVSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgU0NVX1JBTV9WU0JfU0VHTUVOVF9OVU1CRVJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBTQ1VfUkFNX1ZTQl9TRUdNRU5UX05VTUJFUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fRFJJVkVSX1ZFUl9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRUIKKyNkZWZpbmUgU0NVX1JBTV9EUklWRVJfVkVSX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0RSSVZFUl9WRVJfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0RSSVZFUl9WRVJfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fRFJJVkVSX1ZFUl9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRUMKKyNkZWZpbmUgU0NVX1JBTV9EUklWRVJfVkVSX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX0RSSVZFUl9WRVJfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX0RSSVZFUl9WRVJfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMTVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRUQKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8xNV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzE1X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzE1X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMTRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRUUKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8xNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzE0X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzE0X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMTNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRUYKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8xM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzEzX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzEzX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjAKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8xMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzEyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzEyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMTFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjEKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8xMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzExX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzExX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMTBfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjIKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8xMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzEwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzEwX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjMKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV85X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fOF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjQKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV84X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjUKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV83X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjYKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV82X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjcKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV81X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjgKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV80X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRjkKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8zX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRkEKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRkIKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fUEFSQU1fMV9SRVNfREVNT0RfR0VUX0xPQ0tfTk9UX0xPQ0tFRCAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fUEFSQU1fMV9SRVNfREVNT0RfR0VUX0xPQ0tfREVNT0RfTE9DS0VEICAgICAgICAgICAgICAgICAgIDB4NDAwMAorI2RlZmluZSAgIFNDVV9SQU1fUEFSQU1fMV9SRVNfREVNT0RfR0VUX0xPQ0tfTE9DS0VEICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwMAorI2RlZmluZSAgIFNDVV9SQU1fUEFSQU1fMV9SRVNfREVNT0RfR0VUX0xPQ0tfTkVWRVJfTE9DSyAgICAgICAgICAgICAgICAgICAgIDB4QzAwMAorCisjZGVmaW5lIFNDVV9SQU1fUEFSQU1fMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MzFGRkMKKyNkZWZpbmUgU0NVX1JBTV9QQVJBTV8wX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTQ1VfUkFNX1BBUkFNXzBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNDVV9SQU1fUEFSQU1fMF9BVFZfREVNT0RfU0VURU5WX01OX1NUQU5EQVJEICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNDVV9SQU1fUEFSQU1fMF9BVFZfREVNT0RfU0VURU5WX0JfU1RBTkRBUkQgICAgICAgICAgICAgICAgICAgICAgIDB4MTAzCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX0FUVl9ERU1PRF9TRVRFTlZfR19TVEFOREFSRCAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX0FUVl9ERU1PRF9TRVRFTlZfREtfU1RBTkRBUkQgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX0FUVl9ERU1PRF9TRVRFTlZfTF9TVEFOREFSRCAgICAgICAgICAgICAgICAgICAgICAgMHg5CisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX0FUVl9ERU1PRF9TRVRFTlZfTFBfU1RBTkRBUkQgICAgICAgICAgICAgICAgICAgICAgMHgxMDkKKyNkZWZpbmUgICBTQ1VfUkFNX1BBUkFNXzBfQVRWX0RFTU9EX1NFVEVOVl9JX1NUQU5EQVJEICAgICAgICAgICAgICAgICAgICAgICAweEEKKyNkZWZpbmUgICBTQ1VfUkFNX1BBUkFNXzBfQVRWX0RFTU9EX1NFVEVOVl9GTV9TVEFOREFSRCAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1FBTV9ERU1PRF9TRVRFTlZfQU5ORVhfQSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1FBTV9ERU1PRF9TRVRFTlZfQU5ORVhfQiAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1FBTV9ERU1PRF9TRVRFTlZfQU5ORVhfQyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1FBTV9ERU1PRF9TRVRFTlZfQU5ORVhfRCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1JFU1VMVF9PSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1JFU1VMVF9VTktDTUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1JFU1VMVF9VTktTVEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZFCisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1JFU1VMVF9JTlZQQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZECisjZGVmaW5lICAgU0NVX1JBTV9QQVJBTV8wX1JFU1VMVF9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZDCisKKyNkZWZpbmUgU0NVX1JBTV9DT01NQU5EX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZGRAorI2RlZmluZSBTQ1VfUkFNX0NPTU1BTkRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fQ09NTUFORF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fQ09NTUFORF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9SRVNFVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9TRVRfRU5WICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9TRVRfUEFSQU0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9HRVRfTE9DSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1CisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9HRVRfUEFSQU0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9SRVNVTUUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERU1PRF9TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg5CisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9TVERfUUFNX0lSUV9BQ1RJVkFURSAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIFNDVV9SQU1fQ09NTUFORF9DTURfU1REX1FBTV9JUlFfSU5BQ1RJVkFURSAgICAgICAgICAgICAgICAgICAgICAgIDB4ODEKKyNkZWZpbmUgICBTQ1VfUkFNX0NPTU1BTkRfQ01EX1NURF9RQU1fSVJRX1NJR05BTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgyCisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9TVERfUUFNX0lSUV9NT05JVE9SICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MworI2RlZmluZSAgIFNDVV9SQU1fQ09NTUFORF9DTURfU1REX1FBTV9UU0tfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODQKKyNkZWZpbmUgICBTQ1VfUkFNX0NPTU1BTkRfQ01EX1NURF9RQU1fRlNNX1NFVF9TVEFURSAgICAgICAgICAgICAgICAgICAgICAgICAweDg1CisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERUJVR19HRVRfSVJRX1JFR1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIFNDVV9SQU1fQ09NTUFORF9DTURfREVCVUdfSFRPTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODEKKyNkZWZpbmUgICBTQ1VfUkFNX0NPTU1BTkRfQ01EX0RFQlVHX0dFVF9TVEFDS19QT0lOVEVSICAgICAgICAgICAgICAgICAgICAgICAweDgyCisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9ERUJVR19TVEFSVF9TVEFDS19DSEVDSyAgICAgICAgICAgICAgICAgICAgICAgMHg4MworI2RlZmluZSAgIFNDVV9SQU1fQ09NTUFORF9DTURfREVCVUdfU1RPUF9TVEFDS19DSEVDSyAgICAgICAgICAgICAgICAgICAgICAgIDB4ODQKKyNkZWZpbmUgICBTQ1VfUkFNX0NPTU1BTkRfQ01EX0FETUlOX05PUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX0NNRF9BRE1JTl9HRVRfVkVSU0lPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRQorI2RlZmluZSAgIFNDVV9SQU1fQ09NTUFORF9DTURfQURNSU5fR0VUX0pUQUdfVkVSU0lPTiAgICAgICAgICAgICAgICAgICAgICAgIDB4RkQKKyNkZWZpbmUgICBTQ1VfUkFNX0NPTU1BTkRfQ01EX0FVWF9TQ1VfQVRPTUlDX0FDQ0VTUyAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisKKyNkZWZpbmUgICBTQ1VfUkFNX0NPTU1BTkRfU1RBTkRBUkRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0NVX1JBTV9DT01NQU5EX1NUQU5EQVJEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fQ09NTUFORF9TVEFOREFSRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYwMAorI2RlZmluZSAgIFNDVV9SQU1fQ09NTUFORF9TVEFOREFSRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0NVX1JBTV9DT01NQU5EX1NUQU5EQVJEX0FUViAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgICBTQ1VfUkFNX0NPTU1BTkRfU1RBTkRBUkRfUUFNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKyNkZWZpbmUgICAgIFNDVV9SQU1fQ09NTUFORF9TVEFOREFSRF9WU0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwMAorI2RlZmluZSAgICAgU0NVX1JBTV9DT01NQU5EX1NUQU5EQVJEX09GRE0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwCisjZGVmaW5lICAgICBTQ1VfUkFNX0NPTU1BTkRfU1RBTkRBUkRfT09CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisjZGVmaW5lICAgICBTQ1VfUkFNX0NPTU1BTkRfU1RBTkRBUkRfVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRjAwCisKKyNkZWZpbmUgU0NVX1JBTV9WRVJTSU9OX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgzMUZGRQorI2RlZmluZSBTQ1VfUkFNX1ZFUlNJT05fSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNDVV9SQU1fVkVSU0lPTl9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNDVV9SQU1fVkVSU0lPTl9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fSElfVkVSX01BSk9SX04zX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9ISV9WRVJfTUFKT1JfTjNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fSElfVkVSX01BSk9SX04zX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMDAKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fSElfVkVSX01BSk9SX04zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9ISV9WRVJfTUFKT1JfTjJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fSElfVkVSX01BSk9SX04yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9WRVJTSU9OX0hJX1ZFUl9NQUpPUl9OMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fSElfVkVSX01BSk9SX04yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9ISV9WRVJfTUFKT1JfTjFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fSElfVkVSX01BSk9SX04xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0NVX1JBTV9WRVJTSU9OX0hJX1ZFUl9NQUpPUl9OMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMAorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9ISV9WRVJfTUFKT1JfTjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9WRVJTSU9OX0hJX1ZFUl9NSU5PUl9OMV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9ISV9WRVJfTUlOT1JfTjFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fSElfVkVSX01JTk9SX04xX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fSElfVkVSX01JTk9SX04xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTQ1VfUkFNX1ZFUlNJT05fTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODMxRkZGCisjZGVmaW5lIFNDVV9SQU1fVkVSU0lPTl9MT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0NVX1JBTV9WRVJTSU9OX0xPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0NVX1JBTV9WRVJTSU9OX0xPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9MT19WRVJfUEFUQ0hfTjRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgU0NVX1JBTV9WRVJTSU9OX0xPX1ZFUl9QQVRDSF9ONF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9MT19WRVJfUEFUQ0hfTjRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAwMAorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9MT19WRVJfUEFUQ0hfTjRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9WRVJTSU9OX0xPX1ZFUl9QQVRDSF9OM19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9MT19WRVJfUEFUQ0hfTjNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fTE9fVkVSX1BBVENIX04zX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMAorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9MT19WRVJfUEFUQ0hfTjNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0NVX1JBTV9WRVJTSU9OX0xPX1ZFUl9QQVRDSF9OMl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9MT19WRVJfUEFUQ0hfTjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fTE9fVkVSX1BBVENIX04yX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwCisjZGVmaW5lICAgU0NVX1JBTV9WRVJTSU9OX0xPX1ZFUl9QQVRDSF9OMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTQ1VfUkFNX1ZFUlNJT05fTE9fVkVSX1BBVENIX04xX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0NVX1JBTV9WRVJTSU9OX0xPX1ZFUl9QQVRDSF9OMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9MT19WRVJfUEFUQ0hfTjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFNDVV9SQU1fVkVSU0lPTl9MT19WRVJfUEFUQ0hfTjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwMDAKKyNkZWZpbmUgU0lPX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0lPX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgU0lPX0NPTU1fU1RBVEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAwMQorI2RlZmluZSBTSU9fQ09NTV9TVEFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19DT01NX1NUQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19DT01NX1NUQVRFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNJT19DT01NX01CX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwMDIKKyNkZWZpbmUgU0lPX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fQ09NTV9NQl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fQ09NTV9JTlRfUkVRX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMDAzCisjZGVmaW5lIFNJT19DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0NPTU1fSU5UX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0NPTU1fSU5UX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19DT01NX0lOVF9SRVFfSElfUkVRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fQ09NTV9JTlRfUkVRX0hJX1JFUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0NPTU1fSU5UX1JFUV9ISV9SRVFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0lPX0NPTU1fSU5UX1JFUV9ISV9SRVFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fQ09NTV9JTlRfUkVRX1NBX1JFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0NPTU1fSU5UX1JFUV9TQV9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19DT01NX0lOVF9SRVFfU0FfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNJT19DT01NX0lOVF9SRVFfU0FfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19DT01NX0lOVF9TVEFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwMDUKKyNkZWZpbmUgU0lPX0NPTU1fSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fQ09NTV9JTlRfU1RBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fQ09NTV9JTlRfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fQ09NTV9JTlRfTVNLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMDA2CisjZGVmaW5lIFNJT19DT01NX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0NPTU1fSU5UX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0NPTU1fSU5UX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0NPTU1fSU5UX1NUTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAwNworI2RlZmluZSBTSU9fQ09NTV9JTlRfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19DT01NX0lOVF9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19DT01NX0lOVF9TVE1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1RPUF9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQxMDAwMAorI2RlZmluZSBTSU9fVE9QX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0lPX1RPUF9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0lPX1RPUF9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fVE9QX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fVE9QX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fVE9QX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBTSU9fVE9QX0NPTU1fS0VZX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDEwMDBGCisjZGVmaW5lIFNJT19UT1BfQ09NTV9LRVlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX1RPUF9DT01NX0tFWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX1RPUF9DT01NX0tFWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fVE9QX0NPTU1fS0VZX0tFWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZBQkEKKworI2RlZmluZSBTSU9fVE9QX0pUQUdJRF9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDEwMDEyCisjZGVmaW5lIFNJT19UT1BfSlRBR0lEX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX1RPUF9KVEFHSURfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX1RPUF9KVEFHSURfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fVE9QX0pUQUdJRF9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDEwMDEzCisjZGVmaW5lIFNJT19UT1BfSlRBR0lEX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX1RPUF9KVEFHSURfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX1RPUF9KVEFHSURfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19TTU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDEwCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfRkxHX1NNTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19TTU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19TTU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfREVWX0lEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMTEKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9ERVZfSURfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfREVWX0lEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0RFVl9JRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTIKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19DUkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDEyCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfRkxHX0NSQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19DUkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19DUkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19BQ0NfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDEzCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfRkxHX0FDQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19BQ0NfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19BQ0NfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9GTEdfQUNDX1MwX1JXTV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfRkxHX0FDQ19TMF9SV01fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MwX0ZMR19BQ0NfUzBfUldNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MwX0ZMR19BQ0NfUzBfUldNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfRkxHX0FDQ19TMF9TTFZfQlJDX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MwX0ZMR19BQ0NfUzBfU0xWX0JSQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9GTEdfQUNDX1MwX1NMVl9CUkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9GTEdfQUNDX1MwX1NMVl9CUkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MwX0ZMR19BQ0NfUzBfU0xWX1NXUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9GTEdfQUNDX1MwX1NMVl9TV1BfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfRkxHX0FDQ19TMF9TTFZfU1dQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfRkxHX0FDQ19TMF9TTFZfU1dQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfU1RBVEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMTQKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9TVEFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfU1RBVEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfU1RBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MwX1NUQVRFX1MwX1NMVl9TVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9TVEFURV9TMF9TTFZfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfU1RBVEVfUzBfU0xWX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfU1RBVEVfUzBfU0xWX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfQkxLX0JOS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMTUKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9CTEtfQk5LX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0JMS19CTktfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfQkxLX0JOS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MgorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9CTEtfQk5LX1MwX1NMVl9CTktfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfQkxLX0JOS19TMF9TTFZfQk5LX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MwX0JMS19CTktfUzBfU0xWX0JOS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9CTEtfQk5LX1MwX1NMVl9CTktfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MwX0JMS19CTktfUzBfU0xWX0JMS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9CTEtfQk5LX1MwX1NMVl9CTEtfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfQkxLX0JOS19TMF9TTFZfQkxLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkMwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9CTEtfQk5LX1MwX1NMVl9CTEtfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfQUREUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9BRERSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0FERFJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0FERFJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9BRERSX1MwX1NMVl9BRERSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzBfQUREUl9TMF9TTFZfQUREUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9BRERSX1MwX1NMVl9BRERSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMF9BRERSX1MwX1NMVl9BRERSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9DUkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAxNworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0NSQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfQ1JDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfQ1JDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9CVUZGRVJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAxOAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0JVRkZFUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfQlVGRkVSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfQlVGRkVSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9STVdCVUZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAxOQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX1JNV0JVRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfUk1XQlVGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfUk1XQlVGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9GTEdfVkJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAxQQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX0ZMR19WQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9GTEdfVkJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9GTEdfVkJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX1RFTVAwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDFCCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfVEVNUDBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9URU1QMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9URU1QMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX1RFTVAxX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDFDCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfVEVNUDFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9URU1QMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9URU1QMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MwX09GRlNFVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDFECisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzBfT0ZGU0VUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9PRkZTRVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMF9PRkZTRVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19TTU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDIwCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfRkxHX1NNTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19TTU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19TTU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfREVWX0lEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMjEKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9ERVZfSURfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfREVWX0lEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0RFVl9JRF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTIKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19DUkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDIyCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfRkxHX0NSQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19DUkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19DUkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19BQ0NfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDIzCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfRkxHX0FDQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19BQ0NfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19BQ0NfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9GTEdfQUNDX1MxX1JXTV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfRkxHX0FDQ19TMV9SV01fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MxX0ZMR19BQ0NfUzFfUldNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MxX0ZMR19BQ0NfUzFfUldNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfRkxHX0FDQ19TMV9TTFZfQlJDX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MxX0ZMR19BQ0NfUzFfU0xWX0JSQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9GTEdfQUNDX1MxX1NMVl9CUkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9GTEdfQUNDX1MxX1NMVl9CUkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MxX0ZMR19BQ0NfUzFfU0xWX1NXUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9GTEdfQUNDX1MxX1NMVl9TV1BfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfRkxHX0FDQ19TMV9TTFZfU1dQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfRkxHX0FDQ19TMV9TTFZfU1dQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfU1RBVEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMjQKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9TVEFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfU1RBVEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfU1RBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MxX1NUQVRFX1MxX1NMVl9TVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9TVEFURV9TMV9TTFZfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfU1RBVEVfUzFfU0xWX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfU1RBVEVfUzFfU0xWX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfQkxLX0JOS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMjUKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9CTEtfQk5LX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0JMS19CTktfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfQkxLX0JOS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MgorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9CTEtfQk5LX1MxX1NMVl9CTktfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfQkxLX0JOS19TMV9TTFZfQk5LX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MxX0JMS19CTktfUzFfU0xWX0JOS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9CTEtfQk5LX1MxX1NMVl9CTktfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1MxX0JMS19CTktfUzFfU0xWX0JMS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9CTEtfQk5LX1MxX1NMVl9CTEtfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfQkxLX0JOS19TMV9TTFZfQkxLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkMwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9CTEtfQk5LX1MxX1NMVl9CTEtfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfQUREUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMjYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9BRERSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0FERFJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0FERFJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9BRERSX1MxX1NMVl9BRERSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUzFfQUREUl9TMV9TTFZfQUREUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9BRERSX1MxX1NMVl9BRERSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9TMV9BRERSX1MxX1NMVl9BRERSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9DUkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAyNworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0NSQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfQ1JDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfQ1JDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9CVUZGRVJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAyOAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0JVRkZFUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfQlVGRkVSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfQlVGRkVSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9STVdCVUZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAyOQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX1JNV0JVRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfUk1XQlVGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfUk1XQlVGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9GTEdfVkJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAyQQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX0ZMR19WQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9GTEdfVkJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9GTEdfVkJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX1RFTVAwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDJCCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfVEVNUDBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9URU1QMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9URU1QMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX1RFTVAxX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDJDCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfVEVNUDFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9URU1QMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9URU1QMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1MxX09GRlNFVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDJECisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUzFfT0ZGU0VUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9PRkZTRVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TMV9PRkZTRVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TRU1BX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAzMAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1NFTUFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TRU1BX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9TRU1BX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1NFTUFfRlJFRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1NFTUFfQlVTWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1JFU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDMxCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUkVTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBTSU9fSElfUkFfUkFNX1JFU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSBTSU9fSElfUkFfUkFNX1JFU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUkVTX09LICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUkVTX0VSUk9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUkVTX0kyQ19TVEFSVF9GT1VORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUkVTX0kyQ19TVE9QX0ZPVU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUkVTX0kyQ19BUkJfTE9TVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUkVTX0kyQ19FUlJPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fQ01EX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMzIKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9DTURfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fQ01EX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fQ01EX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfTlVMTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfVUlPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfUkVTRVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfQ09ORklHICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfSU5URVJOQUxfVFJBTlNGRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfSTJDX1RSQU5TTUlUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfRVhFQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfQlJEQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9DTURfQVRPTUlDX0NPUFkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9QQVJfMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAzMworI2RlZmluZSBTSU9fSElfUkFfUkFNX1BBUl8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUEFSXzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUEFSXzFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9QQVIxX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfUEFSMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9QQVIxX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9QQVIxX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTSU9fSElfUkFfUkFNX1BBUl8xX1BBUjFfU0VDX0tFWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOTQ1CisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0lUWF9TUkNfQk5LX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9JVFhfU1JDX0JOS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfSVRYX1NSQ19CTktfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0lUWF9TUkNfQk5LX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfSVRYX1NSQ19CTEtfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0lUWF9TUkNfQkxLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9JVFhfU1JDX0JMS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGQzAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0lUWF9TUkNfQkxLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfSTJDVFhfUE9SVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0kyQ1RYX1BPUlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9JMkNUWF9QT1JUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9JMkNUWF9QT1JUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0kyQ1RYX1RPRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9JMkNUWF9UT0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfSTJDVFhfVE9FX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfSTJDVFhfVE9FX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9JMkNUWF9UT0VfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9JMkNUWF9UT0VfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9FWEVDX0ZVTkNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfRVhFQ19GVU5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9FWEVDX0ZVTkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0VYRUNfRlVOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfQUNQX0lOVF9CTktfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0FDUF9JTlRfQk5LX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9BQ1BfSU5UX0JOS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfQUNQX0lOVF9CTktfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMV9BQ1BfSU5UX0JMS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfQUNQX0lOVF9CTEtfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8xX0FDUF9JTlRfQkxLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZDMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzFfQUNQX0lOVF9CTEtfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUEFSXzJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMzQKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9QQVJfMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1BBUl8yX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1BBUl8yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzJfUEFSMl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX1BBUjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzJfUEFSMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzJfUEFSMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9DRkdfRElWX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzJfQ0ZHX0RJVl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX0NGR19ESVZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9DRkdfRElWX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyNQorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9JVFhfU1JDX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzJfSVRYX1NSQ19PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9JVFhfU1JDX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9JVFhfU1JDX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX0kyQ1RYX0JVRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9JMkNUWF9CVUZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX0kyQ1RYX0JVRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX0kyQ1RYX0JVRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzJfQlJEX0NGR19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX0JSRF9DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9CUkRfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9CUkRfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTSU9fSElfUkFfUkFNX1BBUl8yX0JSRF9DRkdfT1BFTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTSU9fSElfUkFfUkFNX1BBUl8yX0JSRF9DRkdfQ0xPU0VEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX0FDUF9JTlRfT0ZGX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfMl9BQ1BfSU5UX09GRl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX0FDUF9JTlRfT0ZGX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8yX0FDUF9JTlRfT0ZGX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1BBUl8zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDM1CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUEFSXzNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9QQVJfM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9QQVJfM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX1BBUjNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfM19QQVIzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX1BBUjNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX1BBUjNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzNfQ0ZHX0RCTF9TREFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX0NGR19EQkxfU0RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfM19DRkdfREJMX1NEQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzNfQ0ZHX0RCTF9TREFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzNfQ0ZHX0RCTF9TQ0xfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX0NGR19EQkxfU0NMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfM19DRkdfREJMX1NDTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRjgwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfM19DRkdfREJMX1NDTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRjgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX0lUWF9MRU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfM19JVFhfTEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX0lUWF9MRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX0lUWF9MRU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzNfQUNQX0xFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX0FDUF9MRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfM19BQ1BfTEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfM19BQ1BfTEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl8zX0FDUF9SV19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfM19BQ1BfUldfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzNfQUNQX1JXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzNfQUNQX1JXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0hJX1JBX1JBTV9QQVJfM19BQ1BfUldfUkVBRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0hJX1JBX1JBTV9QQVJfM19BQ1BfUldfV1JJVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUEFSXzRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwMzYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9QQVJfNF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1BBUl80X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1BBUl80X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzRfUEFSNF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl80X1BBUjRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzRfUEFSNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzRfUEFSNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNF9DRkdfV1VQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzRfQ0ZHX1dVUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl80X0NGR19XVVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNF9DRkdfV1VQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMQorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNF9JVFhfRFNUX0JOS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzRfSVRYX0RTVF9CTktfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl80X0lUWF9EU1RfQk5LX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNF9JVFhfRFNUX0JOS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl80X0lUWF9EU1RfQkxLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNF9JVFhfRFNUX0JMS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzRfSVRYX0RTVF9CTEtfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkMwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNF9JVFhfRFNUX0JMS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl80X0FDUF9FWFRfQk5LX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNF9BQ1BfRVhUX0JOS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzRfQUNQX0VYVF9CTktfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl80X0FDUF9FWFRfQk5LX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzRfQUNQX0VYVF9CTEtfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl80X0FDUF9FWFRfQkxLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNF9BQ1BfRVhUX0JMS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGQzAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl80X0FDUF9FWFRfQkxLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1BBUl81X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDM3CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUEFSXzVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9QQVJfNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9QQVJfNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X1BBUjVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9QQVI1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X1BBUjVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X1BBUjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQ0ZHX1NMVjBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X0NGR19TTFYwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfU0xWMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfU0xWMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTSU9fSElfUkFfUkFNX1BBUl81X0NGR19TTFYwX05PX1NMQVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBTSU9fSElfUkFfUkFNX1BBUl81X0NGR19TTFYwX1NMQVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X0NGR19TTFYxX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfU0xWMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQ0ZHX1NMVjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQ0ZHX1NMVjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfU0xWMV9OT19TTEFWRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfU0xWMV9TTEFWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfU0xFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQ0ZHX1NMRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X0NGR19TTEVFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X0NGR19TTEVFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQ0ZHX1NMRUVQX0FXQUtFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQ0ZHX1NMRUVQX1paWiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQ0ZHX0JER1NUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X0NGR19CREdTVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfQkRHU1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQ0ZHX0JER1NUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfQkRHU1RfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9DRkdfQkRHU1RfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfSVRYX0RTVF9PRkZfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl81X0lUWF9EU1RfT0ZGX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfSVRYX0RTVF9PRkZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfSVRYX0RTVF9PRkZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9BQ1BfRVhUX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzVfQUNQX0VYVF9PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9BQ1BfRVhUX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNV9BQ1BfRVhUX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9QQVJfNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDAzOAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1BBUl82X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUEFSXzZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fUEFSXzZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg5NUZGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNl9QQVI2X19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzZfUEFSNl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNl9QQVI2X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNl9QQVI2X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl82X0NGR19UT0RfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNl9DRkdfVE9EX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzZfQ0ZHX1RPRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl82X0NGR19UT0RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1BBUl82X0NGR19XRERfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9QQVJfNl9DRkdfV0REX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzZfQ0ZHX1dERF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYwMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fUEFSXzZfQ0ZHX1dERF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OTUwMAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fQUJfVEVNUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwNkUKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9BQl9URU1QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fSElfUkFfUkFNX0FCX1RFTVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fSElfUkFfUkFNX0FCX1RFTVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fSTJDX0NUTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwNkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9JMkNfQ1RMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fSElfUkFfUkFNX0kyQ19DVExfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fSElfUkFfUkFNX0kyQ19DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MjAwNzAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTBfSElfTUFQX0JOS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkwX0hJX01BUF9CTktfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMF9ISV9NQVBfQk5LX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMF9ISV9NQVBfQk5LX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkwX0hJX01BUF9CTEtfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMF9ISV9NQVBfQkxLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTBfSElfTUFQX0JMS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkwX0hJX01BUF9CTEtfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTBfSElfVklSVF9CTktfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkwX0hJX1ZJUlRfQk5LX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMF9ISV9WSVJUX0JOS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwMAorI2RlZmluZSAgIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkwX0hJX1ZJUlRfQk5LX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTBfSElfVklSVF9CTEtfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMF9ISV9WSVJUX0JMS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTBfSElfVklSVF9CTEtfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTBfSElfVklSVF9CTEtfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDA3MQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDBfSElfTUFQX09GRjBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQwX0hJX01BUF9PRkYwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDBfSElfTUFQX09GRjBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDBfSElfTUFQX09GRjBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDcyCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQxX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDA3MworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDFfSElfTUFQX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQxX0hJX01BUF9PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDFfSElfTUFQX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDFfSElfTUFQX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDc0CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDA3NQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDJfSElfTUFQX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQyX0hJX01BUF9PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDJfSElfTUFQX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDJfSElfTUFQX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDc2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfRU5UUlkzX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDA3NworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDNfSElfTUFQX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQzX0hJX01BUF9PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDNfSElfTUFQX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDNfSElfTUFQX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZNF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDc4CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfRU5UUlk0X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQ0X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDA3OQorI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDRfSElfTUFQX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQ0X0hJX01BUF9PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDRfSElfTUFQX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDRfSElfTUFQX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZNV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDdBCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfRU5UUlk1X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQ1X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDA3QgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDVfSElfTUFQX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQ1X0hJX01BUF9PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDVfSElfTUFQX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDVfSElfTUFQX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZNl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDdDCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfRU5UUlk2X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQ2X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDA3RAorI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDZfSElfTUFQX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQ2X0hJX01BUF9PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDZfSElfTUFQX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDZfSElfTUFQX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX0VOVFJZN19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDIwMDdFCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfRU5UUlk3X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9FTlRSWTdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQ3X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQyMDA3RgorI2RlZmluZSBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19ISV9SQV9SQU1fVkJfT0ZGU0VUN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDdfSElfTUFQX09GRl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX1JBX1JBTV9WQl9PRkZTRVQ3X0hJX01BUF9PRkZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDdfSElfTUFQX09GRl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBTSU9fSElfUkFfUkFNX1ZCX09GRlNFVDdfSElfTUFQX09GRl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfSUZfUkFNX1RSUF9CUFRfMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDMwMDAwCisjZGVmaW5lIFNJT19ISV9JRl9SQU1fVFJQX0JQVF8wX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0lPX0hJX0lGX1JBTV9UUlBfQlBUXzBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTSU9fSElfSUZfUkFNX1RSUF9CUFRfMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fSElfSUZfUkFNX1RSUF9CUFRfMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDMwMDAxCisjZGVmaW5lIFNJT19ISV9JRl9SQU1fVFJQX0JQVF8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0lPX0hJX0lGX1JBTV9UUlBfQlBUXzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTSU9fSElfSUZfUkFNX1RSUF9CUFRfMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fSElfSUZfUkFNX1RSUF9TVEtfMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDMwMDAyCisjZGVmaW5lIFNJT19ISV9JRl9SQU1fVFJQX1NUS18wX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0lPX0hJX0lGX1JBTV9UUlBfU1RLXzBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTSU9fSElfSUZfUkFNX1RSUF9TVEtfMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fSElfSUZfUkFNX1RSUF9TVEtfMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDMwMDAzCisjZGVmaW5lIFNJT19ISV9JRl9SQU1fVFJQX1NUS18xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0lPX0hJX0lGX1JBTV9UUlBfU1RLXzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTSU9fSElfSUZfUkFNX1RSUF9TVEtfMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fSElfSUZfUkFNX0ZVTl9CQVNFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDMwMzAwCisjZGVmaW5lIFNJT19ISV9JRl9SQU1fRlVOX0JBU0VfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgU0lPX0hJX0lGX1JBTV9GVU5fQkFTRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBTSU9fSElfSUZfUkFNX0ZVTl9CQVNFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9JRl9DT01NX0VYRUNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NDAwMDAKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19ISV9JRl9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19ISV9JRl9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0hJX0lGX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0hJX0lGX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0lPX0hJX0lGX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0lPX0hJX0lGX0NPTU1fRVhFQ19TVEVQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fU1RBVEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ0MDAwMQorI2RlZmluZSBTSU9fSElfSUZfQ09NTV9TVEFURV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFNJT19ISV9JRl9DT01NX1NUQVRFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fU1RBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fSU5UX1JFUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ0MDAwMworI2RlZmluZSBTSU9fSElfSUZfQ09NTV9JTlRfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fSU5UX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fSU5UX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fSU5UX1NUQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ0MDAwNQorI2RlZmluZSBTSU9fSElfSUZfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fSU5UX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fSU5UX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fSElfSUZfQ09NTV9JTlRfU1RBX1NUQVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX0lGX0NPTU1fSU5UX1NUQV9TVEFUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19ISV9JRl9DT01NX0lOVF9TVEFfU1RBVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19ISV9JRl9DT01NX0lOVF9TVEFfU1RBVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19ISV9JRl9DT01NX0lOVF9NU0tfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NDAwMDYKKyNkZWZpbmUgU0lPX0hJX0lGX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNJT19ISV9JRl9DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFNJT19ISV9JRl9DT01NX0lOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0hJX0lGX0NPTU1fSU5UX01TS19TVEFUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9JRl9DT01NX0lOVF9NU0tfU1RBVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fSElfSUZfQ09NTV9JTlRfTVNLX1NUQVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fSElfSUZfQ09NTV9JTlRfTVNLX1NUQVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfSUZfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDQwMDA3CisjZGVmaW5lIFNJT19ISV9JRl9DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTSU9fSElfSUZfQ09NTV9JTlRfU1RNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTSU9fSElfSUZfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19ISV9JRl9DT01NX0lOVF9TVE1fU1RBVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfSUZfQ09NTV9JTlRfU1RNX1NUQVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0hJX0lGX0NPTU1fSU5UX1NUTV9TVEFUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0lPX0hJX0lGX0NPTU1fSU5UX1NUTV9TVEFUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0hJX0lGX1NUS18wX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ0MDAxMAorI2RlZmluZSBTSU9fSElfSUZfU1RLXzBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFNJT19ISV9JRl9TVEtfMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgU0lPX0hJX0lGX1NUS18wX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFNJT19ISV9JRl9TVEtfMF9BRERSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fSElfSUZfU1RLXzBfQUREUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSAgIFNJT19ISV9JRl9TVEtfMF9BRERSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lICAgU0lPX0hJX0lGX1NUS18wX0FERFJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgU0lPX0hJX0lGX1NUS18xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ0MDAxMQorI2RlZmluZSBTSU9fSElfSUZfU1RLXzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFNJT19ISV9JRl9TVEtfMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgU0lPX0hJX0lGX1NUS18xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBTSU9fSElfSUZfU1RLXzFfQUREUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0hJX0lGX1NUS18xX0FERFJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBTSU9fSElfSUZfU1RLXzFfQUREUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSAgIFNJT19ISV9JRl9TVEtfMV9BRERSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFNJT19ISV9JRl9TVEtfMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NDAwMTIKKyNkZWZpbmUgU0lPX0hJX0lGX1NUS18yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBTSU9fSElfSUZfU1RLXzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIFNJT19ISV9JRl9TVEtfMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0lPX0hJX0lGX1NUS18yX0FERFJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9JRl9TVEtfMl9BRERSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgU0lPX0hJX0lGX1NUS18yX0FERFJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBTSU9fSElfSUZfU1RLXzJfQUREUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBTSU9fSElfSUZfU1RLXzNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDQwMDEzCisjZGVmaW5lIFNJT19ISV9JRl9TVEtfM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgU0lPX0hJX0lGX1NUS18zX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBTSU9fSElfSUZfU1RLXzNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgU0lPX0hJX0lGX1NUS18zX0FERFJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9JRl9TVEtfM19BRERSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgU0lPX0hJX0lGX1NUS18zX0FERFJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBTSU9fSElfSUZfU1RLXzNfQUREUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBTSU9fSElfSUZfQlBUX0lEWF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDQwMDFGCisjZGVmaW5lIFNJT19ISV9JRl9CUFRfSURYX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTSU9fSElfSUZfQlBUX0lEWF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTSU9fSElfSUZfQlBUX0lEWF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0hJX0lGX0JQVF9JRFhfQUREUl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9JRl9CUFRfSURYX0FERFJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fSElfSUZfQlBUX0lEWF9BRERSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fSElfSUZfQlBUX0lEWF9BRERSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fSElfSUZfQlBUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDQwMDIwCisjZGVmaW5lIFNJT19ISV9JRl9CUFRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgU0lPX0hJX0lGX0JQVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBTSU9fSElfSUZfQlBUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgU0lPX0hJX0lGX0JQVF9BRERSX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19ISV9JRl9CUFRfQUREUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgU0lPX0hJX0lGX0JQVF9BRERSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgICBTSU9fSElfSUZfQlBUX0FERFJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBTSU9fQ0NfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDUwMDAwCisjZGVmaW5lIFNJT19DQ19DT01NX0VYRUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fQ0NfQ09NTV9FWEVDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fQ0NfQ09NTV9FWEVDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19DQ19DT01NX0VYRUNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19DQ19DT01NX0VYRUNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19DQ19DT01NX0VYRUNfSE9MRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFNJT19DQ19QTExfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NTAwMTAKKyNkZWZpbmUgU0lPX0NDX1BMTF9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIFNJT19DQ19QTExfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRgorI2RlZmluZSBTSU9fQ0NfUExMX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0NDX1BMTF9NT0RFX0ZSRUZfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19DQ19QTExfTU9ERV9GUkVGX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fQ0NfUExMX01PREVfRlJFRl9TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fQ0NfUExMX01PREVfRlJFRl9TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNJT19DQ19QTExfTU9ERV9GUkVGX1NFTF9PSFcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNJT19DQ19QTExfTU9ERV9GUkVGX1NFTF8yN18wMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICAgIFNJT19DQ19QTExfTU9ERV9GUkVGX1NFTF8yMF8yNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICAgIFNJT19DQ19QTExfTU9ERV9GUkVGX1NFTF80XzAwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSAgIFNJT19DQ19QTExfTU9ERV9MT0NLU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fQ0NfUExMX01PREVfTE9DS1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX0NDX1BMTF9NT0RFX0xPQ0tTRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisjZGVmaW5lICAgU0lPX0NDX1BMTF9NT0RFX0xPQ0tTRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fQ0NfUExMX01PREVfQllQQVNTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgU0lPX0NDX1BMTF9NT0RFX0JZUEFTU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19DQ19QTExfTU9ERV9CWVBBU1NfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzAKKyNkZWZpbmUgICBTSU9fQ0NfUExMX01PREVfQllQQVNTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNJT19DQ19QTExfTU9ERV9CWVBBU1NfT0hXICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICAgIFNJT19DQ19QTExfTU9ERV9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgICBTSU9fQ0NfUExMX01PREVfQllQQVNTX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorCisjZGVmaW5lIFNJT19DQ19QTExfVEVTVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NTAwMTEKKyNkZWZpbmUgU0lPX0NDX1BMTF9URVNUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFNJT19DQ19QTExfVEVTVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBTSU9fQ0NfUExMX1RFU1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19DQ19QTExfTE9DS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NTAwMTIKKyNkZWZpbmUgU0lPX0NDX1BMTF9MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNJT19DQ19QTExfTE9DS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFNJT19DQ19QTExfTE9DS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNJT19DQ19DTEtfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NTAwMTQKKyNkZWZpbmUgU0lPX0NDX0NMS19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFNJT19DQ19DTEtfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRgorI2RlZmluZSBTSU9fQ0NfQ0xLX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0NDX0NMS19NT0RFX0RFTEFZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19DQ19DTEtfTU9ERV9ERUxBWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTSU9fQ0NfQ0xLX01PREVfREVMQVlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgICBTSU9fQ0NfQ0xLX01PREVfREVMQVlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19DQ19DTEtfTU9ERV9JTlZFUlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBTSU9fQ0NfQ0xLX01PREVfSU5WRVJUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0NDX0NMS19NT0RFX0lOVkVSVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFNJT19DQ19DTEtfTU9ERV9JTlZFUlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19DQ19QV0RfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NTAwMTUKKyNkZWZpbmUgU0lPX0NDX1BXRF9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFNJT19DQ19QV0RfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIFNJT19DQ19QV0RfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fQ0NfUFdEX01PREVfTEVWRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX0NDX1BXRF9NT0RFX0xFVkVMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19DQ19QV0RfTU9ERV9MRVZFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNJT19DQ19QV0RfTU9ERV9MRVZFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0NDX1BXRF9NT0RFX0xFVkVMX05PTkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgU0lPX0NDX1BXRF9NT0RFX0xFVkVMX0NMT0NLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgICAgU0lPX0NDX1BXRF9NT0RFX0xFVkVMX1BMTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgICAgU0lPX0NDX1BXRF9NT0RFX0xFVkVMX09TQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lICAgU0lPX0NDX1BXRF9NT0RFX1VTRV9MT0NLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19DQ19QV0RfTU9ERV9VU0VfTE9DS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fQ0NfUFdEX01PREVfVVNFX0xPQ0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBTSU9fQ0NfUFdEX01PREVfVVNFX0xPQ0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fQ0NfU09GVF9SU1RfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDUwMDE2CisjZGVmaW5lIFNJT19DQ19TT0ZUX1JTVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fQ0NfU09GVF9SU1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fQ0NfU09GVF9SU1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX0NDX1NPRlRfUlNUX1NZU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19DQ19TT0ZUX1JTVF9TWVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fQ0NfU09GVF9SU1RfU1lTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fQ0NfU09GVF9SU1RfU1lTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19DQ19TT0ZUX1JTVF9PU0NfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fQ0NfU09GVF9SU1RfT1NDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX0NDX1NPRlRfUlNUX09TQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0lPX0NDX1NPRlRfUlNUX09TQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX0NDX1VQREFURV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ1MDAxNworI2RlZmluZSBTSU9fQ0NfVVBEQVRFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19DQ19VUERBVEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19DQ19VUERBVEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX0NDX1VQREFURV9LRVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGQUJBCisKKyNkZWZpbmUgU0lPX1NBX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2MDAwMAorI2RlZmluZSBTSU9fU0FfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0lPX1NBX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0lPX1NBX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9FWEVDX0hPTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfUkVRX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYwMDAzCisjZGVmaW5lIFNJT19TQV9DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYwMDA1CisjZGVmaW5lIFNJT19TQV9DT01NX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfU1RBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUQV9UUl9FTkRfSU5UX1NUQV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVEFfVFJfRU5EX0lOVF9TVEFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RBX1RSX0VORF9JTlRfU1RBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RBX1RSX0VORF9JTlRfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVEFfVFJfQlVGRl9FTVBUWV9JTlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RBX1RSX0JVRkZfRU1QVFlfSU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUQV9UUl9CVUZGX0VNUFRZX0lOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUQV9UUl9CVUZGX0VNUFRZX0lOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RBX1JYX0VORF9JTlRfU1RBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUQV9SWF9FTkRfSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVEFfUlhfRU5EX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVEFfUlhfRU5EX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUQV9SWF9CVUZGX0ZVTExfSU5UX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVEFfUlhfQlVGRl9GVUxMX0lOVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RBX1JYX0JVRkZfRlVMTF9JTlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RBX1JYX0JVRkZfRlVMTF9JTlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfTVNLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYwMDA2CisjZGVmaW5lIFNJT19TQV9DT01NX0lOVF9NU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX01TS19UUl9FTkRfSU5UX01BU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9NU0tfVFJfRU5EX0lOVF9NQVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfTVNLX1RSX0VORF9JTlRfTUFTS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfTVNLX1RSX0VORF9JTlRfTUFTS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9NU0tfVFJfQlVGRl9FTVBUWV9NQVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfTVNLX1RSX0JVRkZfRU1QVFlfTUFTS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX01TS19UUl9CVUZGX0VNUFRZX01BU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX01TS19UUl9CVUZGX0VNUFRZX01BU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfTVNLX1JYX0VORF9JTlRfTUFTS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX01TS19SWF9FTkRfSU5UX01BU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9NU0tfUlhfRU5EX0lOVF9NQVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9NU0tfUlhfRU5EX0lOVF9NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX01TS19SWF9CVUZGX0ZVTExfTUFTS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9NU0tfUlhfQlVGRl9GVUxMX01BU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfTVNLX1JYX0JVRkZfRlVMTF9NQVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfTVNLX1JYX0JVRkZfRlVMTF9NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfU1RNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYwMDA3CisjZGVmaW5lIFNJT19TQV9DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfU1RNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBTSU9fU0FfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUTV9UUl9FTkRfSU5UX01BU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVE1fVFJfRU5EX0lOVF9NQVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RNX1RSX0VORF9JTlRfTUFTS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RNX1RSX0VORF9JTlRfTUFTS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVE1fVFJfQlVGRl9FTVBUWV9NQVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RNX1RSX0JVRkZfRU1QVFlfTUFTS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUTV9UUl9CVUZGX0VNUFRZX01BU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUTV9UUl9CVUZGX0VNUFRZX01BU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RNX1JYX0VORF9JTlRfTUFTS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUTV9SWF9FTkRfSU5UX01BU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVE1fUlhfRU5EX0lOVF9NQVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVE1fUlhfRU5EX0lOVF9NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1NBX0NPTU1fSU5UX1NUTV9SWF9CVUZGX0ZVTExfTUFTS19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19TQV9DT01NX0lOVF9TVE1fUlhfQlVGRl9GVUxMX01BU0tfX1cgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RNX1JYX0JVRkZfRlVMTF9NQVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBTSU9fU0FfQ09NTV9JTlRfU1RNX1JYX0JVRkZfRlVMTF9NQVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fU0FfUFJFU0NBTEVSX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYwMDEwCisjZGVmaW5lIFNJT19TQV9QUkVTQ0FMRVJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgU0lPX1NBX1BSRVNDQUxFUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRkYKKyNkZWZpbmUgU0lPX1NBX1BSRVNDQUxFUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4QjcKKyNkZWZpbmUgU0lPX1NBX1RYX0RBVEEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2MDAxMQorI2RlZmluZSBTSU9fU0FfVFhfREFUQTBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19TQV9UWF9EQVRBMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19TQV9UWF9EQVRBMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNJT19TQV9UWF9EQVRBMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NjAwMTIKKyNkZWZpbmUgU0lPX1NBX1RYX0RBVEExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fU0FfVFhfREFUQTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fU0FfVFhfREFUQTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fU0FfVFhfREFUQTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYwMDEzCisjZGVmaW5lIFNJT19TQV9UWF9EQVRBMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX1NBX1RYX0RBVEEyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX1NBX1RYX0RBVEEyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX1NBX1RYX0RBVEEzX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2MDAxNAorI2RlZmluZSBTSU9fU0FfVFhfREFUQTNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFNJT19TQV9UWF9EQVRBM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFNJT19TQV9UWF9EQVRBM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNJT19TQV9UWF9MRU5HVEhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NjAwMTUKKyNkZWZpbmUgU0lPX1NBX1RYX0xFTkdUSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIFNJT19TQV9UWF9MRU5HVEhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRgorI2RlZmluZSBTSU9fU0FfVFhfTEVOR1RIX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fU0FfVFhfQ09NTUFORF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYwMDE2CisjZGVmaW5lIFNJT19TQV9UWF9DT01NQU5EX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fU0FfVFhfQ09NTUFORF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fU0FfVFhfQ09NTUFORF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lICAgU0lPX1NBX1RYX0NPTU1BTkRfVFhfSU5WRVJUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19TQV9UWF9DT01NQU5EX1RYX0lOVkVSVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfVFhfQ09NTUFORF9UWF9JTlZFUlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fU0FfVFhfQ09NTUFORF9UWF9JTlZFUlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIFNJT19TQV9UWF9DT01NQU5EX1RYX0VOQUJMRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfVFhfQ09NTUFORF9UWF9FTkFCTEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1NBX1RYX0NPTU1BTkRfVFhfRU5BQkxFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgU0lPX1NBX1RYX0NPTU1BTkRfVFhfRU5BQkxFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgU0lPX1NBX1RYX1NUQVRVU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2MDAxNworI2RlZmluZSBTSU9fU0FfVFhfU1RBVFVTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0lPX1NBX1RYX1NUQVRVU19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0lPX1NBX1RYX1NUQVRVU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19TQV9UWF9TVEFUVVNfQlVTWV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fU0FfVFhfU1RBVFVTX0JVU1lfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1NBX1RYX1NUQVRVU19CVVNZX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgU0lPX1NBX1RYX1NUQVRVU19CVVNZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fU0FfVFhfU1RBVFVTX0JVRkZfRlVMTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1NBX1RYX1NUQVRVU19CVUZGX0ZVTExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19TQV9UWF9TVEFUVVNfQlVGRl9GVUxMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFNJT19TQV9UWF9TVEFUVVNfQlVGRl9GVUxMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19TQV9SWF9EQVRBMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NjAwMTgKKyNkZWZpbmUgU0lPX1NBX1JYX0RBVEEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fU0FfUlhfREFUQTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fU0FfUlhfREFUQTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fU0FfUlhfREFUQTFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDYwMDE5CisjZGVmaW5lIFNJT19TQV9SWF9EQVRBMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgU0lPX1NBX1JYX0RBVEExX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgU0lPX1NBX1JYX0RBVEExX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX1NBX1JYX0xFTkdUSF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQ2MDAxQQorI2RlZmluZSBTSU9fU0FfUlhfTEVOR1RIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgU0lPX1NBX1JYX0xFTkdUSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFNJT19TQV9SWF9MRU5HVEhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNJT19TQV9SWF9DT01NQU5EX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NjAwMUIKKyNkZWZpbmUgU0lPX1NBX1JYX0NPTU1BTkRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNJT19TQV9SWF9DT01NQU5EX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFNJT19TQV9SWF9DT01NQU5EX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBTSU9fU0FfUlhfQ09NTUFORF9SWF9JTlZFUlRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1NBX1JYX0NPTU1BTkRfUlhfSU5WRVJUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19TQV9SWF9DT01NQU5EX1JYX0lOVkVSVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19TQV9SWF9DT01NQU5EX1JYX0lOVkVSVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lIFNJT19TQV9SWF9TVEFUVVNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0NjAwMUMKKyNkZWZpbmUgU0lPX1NBX1JYX1NUQVRVU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19TQV9SWF9TVEFUVVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19TQV9SWF9TVEFUVVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fU0FfUlhfU1RBVFVTX0JVU1lfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1NBX1JYX1NUQVRVU19CVVNZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19TQV9SWF9TVEFUVVNfQlVTWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19TQV9SWF9TVEFUVVNfQlVTWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1NBX1JYX1NUQVRVU19CVUZGX0ZVTExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19TQV9SWF9TVEFUVVNfQlVGRl9GVUxMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fU0FfUlhfU1RBVFVTX0JVRkZfRlVMTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBTSU9fU0FfUlhfU1RBVFVTX0JVRkZfRlVMTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDAwCisjZGVmaW5lIFNJT19QRFJfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fUERSX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fUERSX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19QRFJfQ09NTV9FWEVDX0hPTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lIFNJT19QRFJfTU9OX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMTAKKyNkZWZpbmUgU0lPX1BEUl9NT05fQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19QRFJfTU9OX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19QRFJfTU9OX0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fUERSX01PTl9DRkdfT1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NT05fQ0ZHX09TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfTU9OX0NGR19PU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19QRFJfTU9OX0NGR19PU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1BEUl9NT05fQ0ZHX0lBQ1RfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfTU9OX0NGR19JQUNUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX01PTl9DRkdfSUFDVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBTSU9fUERSX01PTl9DRkdfSUFDVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX0ZEQl9DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDExCisjZGVmaW5lIFNJT19QRFJfRkRCX0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fUERSX0ZEQl9DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fUERSX0ZEQl9DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfRkRCX0NGR19TRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX0ZEQl9DRkdfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9GREJfQ0ZHX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0lPX1BEUl9GREJfQ0ZHX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9TTUFfUlhfU0VMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAxMgorI2RlZmluZSBTSU9fUERSX1NNQV9SWF9TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgU0lPX1BEUl9TTUFfUlhfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYKKyNkZWZpbmUgU0lPX1BEUl9TTUFfUlhfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9SWF9TRUxfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfUlhfU0VMX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX1NFTF9TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX1NFTF9TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfU01BX1RYX1NJTEVOVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMTMKKyNkZWZpbmUgU0lPX1BEUl9TTUFfVFhfU0lMRU5UX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNJT19QRFJfU01BX1RYX1NJTEVOVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lIFNJT19QRFJfU01BX1RYX1NJTEVOVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNJT19QRFJfVUlPX0lOX0xPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMTQKKyNkZWZpbmUgU0lPX1BEUl9VSU9fSU5fTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fUERSX1VJT19JTl9MT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fUERSX1VJT19JTl9MT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfVUlPX0lOX0xPX0RBVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX1VJT19JTl9MT19EQVRBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNJT19QRFJfVUlPX0lOX0xPX0RBVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNJT19QRFJfVUlPX0lOX0xPX0RBVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfVUlPX0lOX0hJX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMTUKKyNkZWZpbmUgU0lPX1BEUl9VSU9fSU5fSElfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBTSU9fUERSX1VJT19JTl9ISV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSBTSU9fUERSX1VJT19JTl9ISV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfVUlPX0lOX0hJX0RBVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX1VJT19JTl9ISV9EQVRBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSAgIFNJT19QRFJfVUlPX0lOX0hJX0RBVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSAgIFNJT19QRFJfVUlPX0lOX0hJX0RBVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfVUlPX09VVF9MT19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMTYKKyNkZWZpbmUgU0lPX1BEUl9VSU9fT1VUX0xPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBTSU9fUERSX1VJT19PVVRfTE9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBTSU9fUERSX1VJT19PVVRfTE9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfVUlPX09VVF9MT19EQVRBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX1VJT19PVVRfTE9fREFUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFNJT19QRFJfVUlPX09VVF9MT19EQVRBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFNJT19QRFJfVUlPX09VVF9MT19EQVRBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfVUlPX09VVF9ISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMTcKKyNkZWZpbmUgU0lPX1BEUl9VSU9fT1VUX0hJX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBTSU9fUERSX1VJT19PVVRfSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSBTSU9fUERSX1VJT19PVVRfSElfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfVUlPX09VVF9ISV9EQVRBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX1VJT19PVVRfSElfREFUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSAgIFNJT19QRFJfVUlPX09VVF9ISV9EQVRBX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSAgIFNJT19QRFJfVUlPX09VVF9ISV9EQVRBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfUFdNMV9NT0RFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMTgKKyNkZWZpbmUgU0lPX1BEUl9QV00xX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19QRFJfUFdNMV9NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19QRFJfUFdNMV9NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFNJT19QRFJfUFdNMV9QUkVTQ0FMRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMTkKKyNkZWZpbmUgU0lPX1BEUl9QV00xX1BSRVNDQUxFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIFNJT19QRFJfUFdNMV9QUkVTQ0FMRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRgorI2RlZmluZSBTSU9fUERSX1BXTTFfUFJFU0NBTEVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fUERSX1BXTTFfVkFMVUVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDFBCisjZGVmaW5lIFNJT19QRFJfUFdNMV9WQUxVRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgU0lPX1BEUl9QV00xX1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBTSU9fUERSX1BXTTFfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fUERSX1BXTTJfTU9ERV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDFDCisjZGVmaW5lIFNJT19QRFJfUFdNMl9NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fUERSX1BXTTJfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fUERSX1BXTTJfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBTSU9fUERSX1BXTTJfUFJFU0NBTEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDFECisjZGVmaW5lIFNJT19QRFJfUFdNMl9QUkVTQ0FMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBTSU9fUERSX1BXTTJfUFJFU0NBTEVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgU0lPX1BEUl9QV00yX1BSRVNDQUxFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX1BEUl9QV00yX1ZBTFVFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAxRQorI2RlZmluZSBTSU9fUERSX1BXTTJfVkFMVUVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIFNJT19QRFJfUFdNMl9WQUxVRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgU0lPX1BEUl9QV00yX1ZBTFVFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgU0lPX1BEUl9PSFdfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAxRgorI2RlZmluZSBTSU9fUERSX09IV19DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgU0lPX1BEUl9PSFdfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFNJT19QRFJfT0hXX0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBTSU9fUERSX09IV19DRkdfRlJFRl9TRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9PSFdfQ0ZHX0ZSRUZfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfT0hXX0NGR19GUkVGX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNJT19QRFJfT0hXX0NGR19GUkVGX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1BEUl9PSFdfQ0ZHX0JZUEFTU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfT0hXX0NGR19CWVBBU1NfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX09IV19DRkdfQllQQVNTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBTSU9fUERSX09IV19DRkdfQllQQVNTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFNJT19QRFJfT0hXX0NGR19BU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX09IV19DRkdfQVNFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9PSFdfQ0ZHX0FTRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfT0hXX0NGR19BU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgU0lPX1BEUl9PSFdfQ0ZHX1NQRUVEX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfT0hXX0NGR19TUEVFRF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX09IV19DRkdfU1BFRURfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgU0lPX1BEUl9PSFdfQ0ZHX1NQRUVEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9JMlNfV1NfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAyMAorI2RlZmluZSBTSU9fUERSX0kyU19XU19DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9JMlNfV1NfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX0kyU19XU19DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX0kyU19XU19DRkdfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfV1NfQ0ZHX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfSTJTX1dTX0NGR19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfSTJTX1dTX0NGR19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfSTJTX1dTX0NGR19EUklWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0kyU19XU19DRkdfRFJJVkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfV1NfQ0ZHX0RSSVZFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfSTJTX1dTX0NGR19EUklWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX0kyU19XU19DRkdfS0VFUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9JMlNfV1NfQ0ZHX0tFRVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfSTJTX1dTX0NGR19LRUVQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX0kyU19XU19DRkdfS0VFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX0kyU19XU19DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9JMlNfV1NfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfSTJTX1dTX0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfV1NfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9HUElPX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAyMQorI2RlZmluZSBTSU9fUERSX0dQSU9fQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9HUElPX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX0dQSU9fQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX0dQSU9fQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9HUElPX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfR1BJT19DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfR1BJT19DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfR1BJT19DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0dQSU9fQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9HUElPX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfR1BJT19DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX0dQSU9fQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9HUElPX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfR1BJT19DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX0dQSU9fQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX0dQSU9fQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9HUElPX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfR1BJT19DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9HUElPX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9JUlFOX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAyMgorI2RlZmluZSBTSU9fUERSX0lSUU5fQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9JUlFOX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX0lSUU5fQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX0lSUU5fQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9JUlFOX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfSVJRTl9DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfSVJRTl9DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfSVJRTl9DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0lSUU5fQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9JUlFOX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfSVJRTl9DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX0lSUU5fQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9JUlFOX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfSVJRTl9DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX0lSUU5fQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX0lSUU5fQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9JUlFOX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfSVJRTl9DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9JUlFOX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9PT0JfQ1JYX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAyMworI2RlZmluZSBTSU9fUERSX09PQl9DUlhfQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9PT0JfQ1JYX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX09PQl9DUlhfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX09PQl9DUlhfQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9PT0JfQ1JYX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfT09CX0NSWF9DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfT09CX0NSWF9DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfT09CX0NSWF9DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX09PQl9DUlhfQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9PT0JfQ1JYX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfT09CX0NSWF9DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX09PQl9DUlhfQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9PT0JfQ1JYX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfT09CX0NSWF9DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX09PQl9DUlhfQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX09PQl9DUlhfQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9PT0JfQ1JYX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfT09CX0NSWF9DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9PT0JfQ1JYX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9PT0JfRFJYX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAyNAorI2RlZmluZSBTSU9fUERSX09PQl9EUlhfQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9PT0JfRFJYX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX09PQl9EUlhfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX09PQl9EUlhfQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9PT0JfRFJYX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfT09CX0RSWF9DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfT09CX0RSWF9DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfT09CX0RSWF9DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX09PQl9EUlhfQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9PT0JfRFJYX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfT09CX0RSWF9DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX09PQl9EUlhfQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9PT0JfRFJYX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfT09CX0RSWF9DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX09PQl9EUlhfQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX09PQl9EUlhfQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9PT0JfRFJYX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfT09CX0RSWF9DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9PT0JfRFJYX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9NU1RSVF9DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAyNQorI2RlZmluZSBTSU9fUERSX01TVFJUX0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9NU1RSVF9DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX01TVFJUX0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTAKKyNkZWZpbmUgICBTSU9fUERSX01TVFJUX0NGR19NT0RFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NU1RSVF9DRkdfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfQ0ZHX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfQ0ZHX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfQ0ZHX0RSSVZFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01TVFJUX0NGR19EUklWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NU1RSVF9DRkdfRFJJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfQ0ZHX0RSSVZFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX01TVFJUX0NGR19LRUVQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9NU1RSVF9DRkdfS0VFUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfQ0ZHX0tFRVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX01TVFJUX0NGR19LRUVQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgU0lPX1BEUl9NU1RSVF9DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX01TVFJUX0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfTUVSUl9DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMjYKKyNkZWZpbmUgU0lPX1BEUl9NRVJSX0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNJT19QRFJfTUVSUl9DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0lPX1BEUl9NRVJSX0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwCisjZGVmaW5lICAgU0lPX1BEUl9NRVJSX0NGR19NT0RFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfTUVSUl9DRkdfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfQ0ZHX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfQ0ZHX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfQ0ZHX0RSSVZFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRVJSX0NGR19EUklWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUVSUl9DRkdfRFJJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfQ0ZHX0RSSVZFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9NRVJSX0NGR19LRUVQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfTUVSUl9DRkdfS0VFUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfQ0ZHX0tFRVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0lPX1BEUl9NRVJSX0NGR19LRUVQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFNJT19QRFJfTUVSUl9DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1BEUl9NRVJSX0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX01DTEtfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDI4CisjZGVmaW5lIFNJT19QRFJfTUNMS19DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBTSU9fUERSX01DTEtfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIFNJT19QRFJfTUNMS19DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MAorI2RlZmluZSAgIFNJT19QRFJfTUNMS19DRkdfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX01DTEtfQ0ZHX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0NGR19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0NGR19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0NGR19EUklWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUNMS19DRkdfRFJJVkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01DTEtfQ0ZHX0RSSVZFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM4CisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0NGR19EUklWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFNJT19QRFJfTUNMS19DRkdfS0VFUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fUERSX01DTEtfQ0ZHX0tFRVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0NGR19LRUVQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorI2RlZmluZSAgIFNJT19QRFJfTUNMS19DRkdfS0VFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBTSU9fUERSX01DTEtfQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfTUNMS19DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9NVkFMX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAyOQorI2RlZmluZSBTSU9fUERSX01WQUxfQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9NVkFMX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX01WQUxfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTAKKyNkZWZpbmUgICBTSU9fUERSX01WQUxfQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NVkFMX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTVZBTF9DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfTVZBTF9DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfTVZBTF9DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01WQUxfQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NVkFMX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfTVZBTF9DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX01WQUxfQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9NVkFMX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfTVZBTF9DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX01WQUxfQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgU0lPX1BEUl9NVkFMX0NGR19VSU9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfTVZBTF9DRkdfVUlPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX01WQUxfQ0ZHX1VJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfTVZBTF9DRkdfVUlPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfTUQwX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMkEKKyNkZWZpbmUgU0lPX1BEUl9NRDBfQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNJT19QRFJfTUQwX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0lPX1BEUl9NRDBfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwCisjZGVmaW5lICAgU0lPX1BEUl9NRDBfQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfTUQwX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01EMF9DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTSU9fUERSX01EMF9DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX01EMF9DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRDBfQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUQwX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBTSU9fUERSX01EMF9DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9NRDBfQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfTUQwX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX01EMF9DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0lPX1BEUl9NRDBfQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFNJT19QRFJfTUQwX0NGR19VSU9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTSU9fUERSX01EMF9DRkdfVUlPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1BEUl9NRDBfQ0ZHX1VJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBTSU9fUERSX01EMF9DRkdfVUlPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX01EMV9DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDJCCisjZGVmaW5lIFNJT19QRFJfTUQxX0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBTSU9fUERSX01EMV9DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIFNJT19QRFJfTUQxX0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MAorI2RlZmluZSAgIFNJT19QRFJfTUQxX0NGR19NT0RFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX01EMV9DRkdfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRDFfQ0ZHX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgU0lPX1BEUl9NRDFfQ0ZHX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9NRDFfQ0ZHX0RSSVZFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUQxX0NGR19EUklWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01EMV9DRkdfRFJJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM4CisjZGVmaW5lICAgU0lPX1BEUl9NRDFfQ0ZHX0RSSVZFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFNJT19QRFJfTUQxX0NGR19LRUVQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fUERSX01EMV9DRkdfS0VFUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9NRDFfQ0ZHX0tFRVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorI2RlZmluZSAgIFNJT19QRFJfTUQxX0NGR19LRUVQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBTSU9fUERSX01EMV9DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9NRDFfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfTUQxX0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9NRDFfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9NRDJfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAyQworI2RlZmluZSBTSU9fUERSX01EMl9DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9NRDJfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX01EMl9DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTAKKyNkZWZpbmUgICBTSU9fUERSX01EMl9DRkdfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NRDJfQ0ZHX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUQyX0NGR19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfTUQyX0NGR19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfTUQyX0NGR19EUklWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01EMl9DRkdfRFJJVkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRDJfQ0ZHX0RSSVZFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfTUQyX0NGR19EUklWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX01EMl9DRkdfS0VFUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9NRDJfQ0ZHX0tFRVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfTUQyX0NGR19LRUVQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX01EMl9DRkdfS0VFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgU0lPX1BEUl9NRDJfQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfTUQyX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX01EMl9DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfTUQyX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfTUQzX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMkQKKyNkZWZpbmUgU0lPX1BEUl9NRDNfQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNJT19QRFJfTUQzX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0lPX1BEUl9NRDNfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwCisjZGVmaW5lICAgU0lPX1BEUl9NRDNfQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfTUQzX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01EM19DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTSU9fUERSX01EM19DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX01EM19DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRDNfQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUQzX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBTSU9fUERSX01EM19DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9NRDNfQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfTUQzX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX01EM19DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0lPX1BEUl9NRDNfQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFNJT19QRFJfTUQzX0NGR19VSU9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTSU9fUERSX01EM19DRkdfVUlPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1BEUl9NRDNfQ0ZHX1VJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBTSU9fUERSX01EM19DRkdfVUlPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX01ENF9DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDJGCisjZGVmaW5lIFNJT19QRFJfTUQ0X0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBTSU9fUERSX01ENF9DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIFNJT19QRFJfTUQ0X0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MAorI2RlZmluZSAgIFNJT19QRFJfTUQ0X0NGR19NT0RFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX01ENF9DRkdfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRDRfQ0ZHX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgU0lPX1BEUl9NRDRfQ0ZHX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9NRDRfQ0ZHX0RSSVZFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUQ0X0NGR19EUklWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01ENF9DRkdfRFJJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM4CisjZGVmaW5lICAgU0lPX1BEUl9NRDRfQ0ZHX0RSSVZFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFNJT19QRFJfTUQ0X0NGR19LRUVQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fUERSX01ENF9DRkdfS0VFUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9NRDRfQ0ZHX0tFRVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorI2RlZmluZSAgIFNJT19QRFJfTUQ0X0NGR19LRUVQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBTSU9fUERSX01ENF9DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9NRDRfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfTUQ0X0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9NRDRfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9NRDVfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAzMAorI2RlZmluZSBTSU9fUERSX01ENV9DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9NRDVfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX01ENV9DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTAKKyNkZWZpbmUgICBTSU9fUERSX01ENV9DRkdfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NRDVfQ0ZHX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUQ1X0NGR19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfTUQ1X0NGR19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfTUQ1X0NGR19EUklWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01ENV9DRkdfRFJJVkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRDVfQ0ZHX0RSSVZFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfTUQ1X0NGR19EUklWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX01ENV9DRkdfS0VFUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9NRDVfQ0ZHX0tFRVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfTUQ1X0NGR19LRUVQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX01ENV9DRkdfS0VFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgU0lPX1BEUl9NRDVfQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfTUQ1X0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX01ENV9DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfTUQ1X0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfTUQ2X0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwMzEKKyNkZWZpbmUgU0lPX1BEUl9NRDZfQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNJT19QRFJfTUQ2X0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0lPX1BEUl9NRDZfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwCisjZGVmaW5lICAgU0lPX1BEUl9NRDZfQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfTUQ2X0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01ENl9DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTSU9fUERSX01ENl9DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX01ENl9DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRDZfQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUQ2X0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBTSU9fUERSX01ENl9DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9NRDZfQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfTUQ2X0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX01ENl9DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0lPX1BEUl9NRDZfQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFNJT19QRFJfTUQ2X0NGR19VSU9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBTSU9fUERSX01ENl9DRkdfVUlPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgU0lPX1BEUl9NRDZfQ0ZHX1VJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBTSU9fUERSX01ENl9DRkdfVUlPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX01EN19DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDMyCisjZGVmaW5lIFNJT19QRFJfTUQ3X0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBTSU9fUERSX01EN19DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIFNJT19QRFJfTUQ3X0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MAorI2RlZmluZSAgIFNJT19QRFJfTUQ3X0NGR19NT0RFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX01EN19DRkdfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9NRDdfQ0ZHX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lICAgU0lPX1BEUl9NRDdfQ0ZHX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9NRDdfQ0ZHX0RSSVZFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfTUQ3X0NGR19EUklWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX01EN19DRkdfRFJJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM4CisjZGVmaW5lICAgU0lPX1BEUl9NRDdfQ0ZHX0RSSVZFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFNJT19QRFJfTUQ3X0NGR19LRUVQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBTSU9fUERSX01EN19DRkdfS0VFUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9NRDdfQ0ZHX0tFRVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorI2RlZmluZSAgIFNJT19QRFJfTUQ3X0NGR19LRUVQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBTSU9fUERSX01EN19DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9NRDdfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfTUQ3X0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9NRDdfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9JMkNfU0NMMV9DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAzMworI2RlZmluZSBTSU9fUERSX0kyQ19TQ0wxX0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9JMkNfU0NMMV9DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX0kyQ19TQ0wxX0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTEKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wxX0NGR19NT0RFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMV9DRkdfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDFfQ0ZHX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDFfQ0ZHX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDFfQ0ZHX0RSSVZFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wxX0NGR19EUklWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMV9DRkdfRFJJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDFfQ0ZHX0RSSVZFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wxX0NGR19LRUVQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMV9DRkdfS0VFUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDFfQ0ZHX0tFRVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wxX0NGR19LRUVQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wxX0NGR19VSU9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMV9DRkdfVUlPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDFfQ0ZHX1VJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMV9DRkdfVUlPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9JMkNfU0RBMV9DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAzNAorI2RlZmluZSBTSU9fUERSX0kyQ19TREExX0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9JMkNfU0RBMV9DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX0kyQ19TREExX0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTEKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREExX0NGR19NT0RFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMV9DRkdfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTFfQ0ZHX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTFfQ0ZHX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTFfQ0ZHX0RSSVZFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREExX0NGR19EUklWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMV9DRkdfRFJJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTFfQ0ZHX0RSSVZFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREExX0NGR19LRUVQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMV9DRkdfS0VFUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTFfQ0ZHX0tFRVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREExX0NGR19LRUVQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREExX0NGR19VSU9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMV9DRkdfVUlPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTFfQ0ZHX1VJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMV9DRkdfVUlPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9WU1lOQ19DRkdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAzNgorI2RlZmluZSBTSU9fUERSX1ZTWU5DX0NGR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9WU1lOQ19DRkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX1ZTWU5DX0NGR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX1ZTWU5DX0NGR19NT0RFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9WU1lOQ19DRkdfTU9ERV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfVlNZTkNfQ0ZHX01PREVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfVlNZTkNfQ0ZHX01PREVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfVlNZTkNfQ0ZHX0RSSVZFX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX1ZTWU5DX0NGR19EUklWRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9WU1lOQ19DRkdfRFJJVkVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfVlNZTkNfQ0ZHX0RSSVZFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX1ZTWU5DX0NGR19LRUVQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9WU1lOQ19DRkdfS0VFUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfVlNZTkNfQ0ZHX0tFRVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX1ZTWU5DX0NGR19LRUVQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX1ZTWU5DX0NGR19VSU9fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9WU1lOQ19DRkdfVUlPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfVlNZTkNfQ0ZHX1VJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9WU1lOQ19DRkdfVUlPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9TTUFfUlhfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAzNworI2RlZmluZSBTSU9fUERSX1NNQV9SWF9DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9TTUFfUlhfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX1NNQV9SWF9DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9SWF9DRkdfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfUlhfQ0ZHX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX0NGR19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX0NGR19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX0NGR19EUklWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9SWF9DRkdfRFJJVkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfUlhfQ0ZHX0RSSVZFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX0NGR19EUklWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9SWF9DRkdfS0VFUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9TTUFfUlhfQ0ZHX0tFRVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX0NGR19LRUVQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9SWF9DRkdfS0VFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9SWF9DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgU0lPX1BEUl9TTUFfUlhfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfUlhfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9TTUFfVFhfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDAzOAorI2RlZmluZSBTSU9fUERSX1NNQV9UWF9DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgU0lPX1BEUl9TTUFfVFhfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBTSU9fUERSX1NNQV9UWF9DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OTAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9UWF9DRkdfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfVFhfQ0ZHX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfU01BX1RYX0NGR19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFNJT19QRFJfU01BX1RYX0NGR19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfU01BX1RYX0NGR19EUklWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9UWF9DRkdfRFJJVkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfVFhfQ0ZHX0RSSVZFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzOAorI2RlZmluZSAgIFNJT19QRFJfU01BX1RYX0NGR19EUklWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9UWF9DRkdfS0VFUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgU0lPX1BEUl9TTUFfVFhfQ0ZHX0tFRVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfU01BX1RYX0NGR19LRUVQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QzAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9UWF9DRkdfS0VFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfVFhfQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfU01BX1RYX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9UWF9DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfU01BX1RYX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfSTJDX1NEQTJfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwM0YKKyNkZWZpbmUgU0lPX1BEUl9JMkNfU0RBMl9DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNJT19QRFJfSTJDX1NEQTJfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0lPX1BEUl9JMkNfU0RBMl9DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDExCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMl9DRkdfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTJfQ0ZHX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREEyX0NGR19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREEyX0NGR19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREEyX0NGR19EUklWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMl9DRkdfRFJJVkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTJfQ0ZHX0RSSVZFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREEyX0NGR19EUklWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMl9DRkdfS0VFUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTJfQ0ZHX0tFRVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREEyX0NGR19LRUVQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMl9DRkdfS0VFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0RBMl9DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTJfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TREEyX0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NEQTJfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfSTJDX1NDTDJfQ0ZHX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNDAKKyNkZWZpbmUgU0lPX1BEUl9JMkNfU0NMMl9DRkdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNJT19QRFJfSTJDX1NDTDJfQ0ZHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0lPX1BEUl9JMkNfU0NMMl9DRkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDExCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMl9DRkdfTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDJfQ0ZHX01PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wyX0NGR19NT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wyX0NGR19NT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wyX0NGR19EUklWRV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMl9DRkdfRFJJVkVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDJfQ0ZHX0RSSVZFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wyX0NGR19EUklWRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMl9DRkdfS0VFUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDJfQ0ZHX0tFRVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wyX0NGR19LRUVQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMl9DRkdfS0VFUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9JMkNfU0NMMl9DRkdfVUlPX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDJfQ0ZHX1VJT19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX0kyQ19TQ0wyX0NGR19VSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfSTJDX1NDTDJfQ0ZHX1VJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfSTJTX0NMX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNDEKKyNkZWZpbmUgU0lPX1BEUl9JMlNfQ0xfQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNJT19QRFJfSTJTX0NMX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0lPX1BEUl9JMlNfQ0xfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfQ0xfQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfSTJTX0NMX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0kyU19DTF9DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTSU9fUERSX0kyU19DTF9DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX0kyU19DTF9DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfQ0xfQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfSTJTX0NMX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBTSU9fUERSX0kyU19DTF9DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfQ0xfQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfSTJTX0NMX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX0kyU19DTF9DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfQ0xfQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfQ0xfQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfSTJTX0NMX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX0kyU19DTF9DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfSTJTX0NMX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfSTJTX0RBX0NGR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNDIKKyNkZWZpbmUgU0lPX1BEUl9JMlNfREFfQ0ZHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFNJT19QRFJfSTJTX0RBX0NGR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgU0lPX1BEUl9JMlNfREFfQ0ZHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfREFfQ0ZHX01PREVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfSTJTX0RBX0NGR19NT0RFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBTSU9fUERSX0kyU19EQV9DRkdfTU9ERV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgICBTSU9fUERSX0kyU19EQV9DRkdfTU9ERV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX0kyU19EQV9DRkdfRFJJVkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfREFfQ0ZHX0RSSVZFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFNJT19QRFJfSTJTX0RBX0NGR19EUklWRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBTSU9fUERSX0kyU19EQV9DRkdfRFJJVkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfREFfQ0ZHX0tFRVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFNJT19QRFJfSTJTX0RBX0NGR19LRUVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX0kyU19EQV9DRkdfS0VFUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfREFfQ0ZHX0tFRVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9JMlNfREFfQ0ZHX1VJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFNJT19QRFJfSTJTX0RBX0NGR19VSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBTSU9fUERSX0kyU19EQV9DRkdfVUlPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFNJT19QRFJfSTJTX0RBX0NGR19VSU9fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfR1BJT19HUElPX0ZOQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNTAKKyNkZWZpbmUgU0lPX1BEUl9HUElPX0dQSU9fRk5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19QRFJfR1BJT19HUElPX0ZOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19QRFJfR1BJT19HUElPX0ZOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9HUElPX0dQSU9fRk5DX1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfR1BJT19HUElPX0ZOQ19TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX0dQSU9fR1BJT19GTkNfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fUERSX0dQSU9fR1BJT19GTkNfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX0lSUU5fR1BJT19GTkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDUxCisjZGVmaW5lIFNJT19QRFJfSVJRTl9HUElPX0ZOQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fUERSX0lSUU5fR1BJT19GTkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fUERSX0lSUU5fR1BJT19GTkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfSVJRTl9HUElPX0ZOQ19TRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX0lSUU5fR1BJT19GTkNfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9JUlFOX0dQSU9fRk5DX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0lPX1BEUl9JUlFOX0dQSU9fRk5DX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9NU1RSVF9HUElPX0ZOQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDA1MgorI2RlZmluZSBTSU9fUERSX01TVFJUX0dQSU9fRk5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0lPX1BEUl9NU1RSVF9HUElPX0ZOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0lPX1BEUl9NU1RSVF9HUElPX0ZOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX01TVFJUX0dQSU9fRk5DX1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NU1RSVF9HUElPX0ZOQ19TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfR1BJT19GTkNfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNJT19QRFJfTVNUUlRfR1BJT19GTkNfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfTUVSUl9HUElPX0ZOQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNTMKKyNkZWZpbmUgU0lPX1BEUl9NRVJSX0dQSU9fRk5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19QRFJfTUVSUl9HUElPX0ZOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19QRFJfTUVSUl9HUElPX0ZOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9NRVJSX0dQSU9fRk5DX1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfTUVSUl9HUElPX0ZOQ19TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfR1BJT19GTkNfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fUERSX01FUlJfR1BJT19GTkNfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX01DTEtfR1BJT19GTkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDU0CisjZGVmaW5lIFNJT19QRFJfTUNMS19HUElPX0ZOQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fUERSX01DTEtfR1BJT19GTkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fUERSX01DTEtfR1BJT19GTkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfTUNMS19HUElPX0ZOQ19TRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX01DTEtfR1BJT19GTkNfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0dQSU9fRk5DX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0lPX1BEUl9NQ0xLX0dQSU9fRk5DX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9NVkFMX0dQSU9fRk5DX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDA1NQorI2RlZmluZSBTSU9fUERSX01WQUxfR1BJT19GTkNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0lPX1BEUl9NVkFMX0dQSU9fRk5DX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0lPX1BEUl9NVkFMX0dQSU9fRk5DX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX01WQUxfR1BJT19GTkNfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NVkFMX0dQSU9fRk5DX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfTVZBTF9HUElPX0ZOQ19TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNJT19QRFJfTVZBTF9HUElPX0ZOQ19TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfTUQwX0dQSU9fRk5DX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNTYKKyNkZWZpbmUgU0lPX1BEUl9NRDBfR1BJT19GTkNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19QRFJfTUQwX0dQSU9fRk5DX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19QRFJfTUQwX0dQSU9fRk5DX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9NRDBfR1BJT19GTkNfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfTUQwX0dQSU9fRk5DX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX01EMF9HUElPX0ZOQ19TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fUERSX01EMF9HUElPX0ZOQ19TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX01EMV9HUElPX0ZOQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDU3CisjZGVmaW5lIFNJT19QRFJfTUQxX0dQSU9fRk5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fUERSX01EMV9HUElPX0ZOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fUERSX01EMV9HUElPX0ZOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfTUQxX0dQSU9fRk5DX1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX01EMV9HUElPX0ZOQ19TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9NRDFfR1BJT19GTkNfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0lPX1BEUl9NRDFfR1BJT19GTkNfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9NRDJfR1BJT19GTkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDA1OAorI2RlZmluZSBTSU9fUERSX01EMl9HUElPX0ZOQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0lPX1BEUl9NRDJfR1BJT19GTkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0lPX1BEUl9NRDJfR1BJT19GTkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX01EMl9HUElPX0ZOQ19TRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NRDJfR1BJT19GTkNfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfTUQyX0dQSU9fRk5DX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNJT19QRFJfTUQyX0dQSU9fRk5DX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfTUQzX0dQSU9fRk5DX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNTkKKyNkZWZpbmUgU0lPX1BEUl9NRDNfR1BJT19GTkNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19QRFJfTUQzX0dQSU9fRk5DX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19QRFJfTUQzX0dQSU9fRk5DX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9NRDNfR1BJT19GTkNfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfTUQzX0dQSU9fRk5DX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX01EM19HUElPX0ZOQ19TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fUERSX01EM19HUElPX0ZOQ19TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX01ENF9HUElPX0ZOQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDVBCisjZGVmaW5lIFNJT19QRFJfTUQ0X0dQSU9fRk5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fUERSX01ENF9HUElPX0ZOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fUERSX01ENF9HUElPX0ZOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfTUQ0X0dQSU9fRk5DX1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX01ENF9HUElPX0ZOQ19TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9NRDRfR1BJT19GTkNfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0lPX1BEUl9NRDRfR1BJT19GTkNfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9NRDVfR1BJT19GTkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDA1QgorI2RlZmluZSBTSU9fUERSX01ENV9HUElPX0ZOQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0lPX1BEUl9NRDVfR1BJT19GTkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0lPX1BEUl9NRDVfR1BJT19GTkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX01ENV9HUElPX0ZOQ19TRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9NRDVfR1BJT19GTkNfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfTUQ1X0dQSU9fRk5DX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNJT19QRFJfTUQ1X0dQSU9fRk5DX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfTUQ2X0dQSU9fRk5DX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNUMKKyNkZWZpbmUgU0lPX1BEUl9NRDZfR1BJT19GTkNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19QRFJfTUQ2X0dQSU9fRk5DX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19QRFJfTUQ2X0dQSU9fRk5DX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9NRDZfR1BJT19GTkNfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfTUQ2X0dQSU9fRk5DX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX01ENl9HUElPX0ZOQ19TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fUERSX01ENl9HUElPX0ZOQ19TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBTSU9fUERSX01EN19HUElPX0ZOQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YwMDVECisjZGVmaW5lIFNJT19QRFJfTUQ3X0dQSU9fRk5DX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBTSU9fUERSX01EN19HUElPX0ZOQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBTSU9fUERSX01EN19HUElPX0ZOQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgIFNJT19QRFJfTUQ3X0dQSU9fRk5DX1NFTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBTSU9fUERSX01EN19HUElPX0ZOQ19TRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgU0lPX1BEUl9NRDdfR1BJT19GTkNfU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lICAgU0lPX1BEUl9NRDdfR1BJT19GTkNfU0VMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgU0lPX1BEUl9TTUFfUlhfR1BJT19GTkNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGMDA1RQorI2RlZmluZSBTSU9fUERSX1NNQV9SWF9HUElPX0ZOQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU0lPX1BEUl9TTUFfUlhfR1BJT19GTkNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgU0lPX1BEUl9TTUFfUlhfR1BJT19GTkNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9SWF9HUElPX0ZOQ19TRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfUlhfR1BJT19GTkNfU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX0dQSU9fRk5DX1NFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFNJT19QRFJfU01BX1JYX0dQSU9fRk5DX1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFNJT19QRFJfU01BX1RYX0dQSU9fRk5DX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjAwNUYKKyNkZWZpbmUgU0lPX1BEUl9TTUFfVFhfR1BJT19GTkNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFNJT19QRFJfU01BX1RYX0dQSU9fRk5DX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisjZGVmaW5lIFNJT19QRFJfU01BX1RYX0dQSU9fRk5DX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgU0lPX1BEUl9TTUFfVFhfR1BJT19GTkNfU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFNJT19QRFJfU01BX1RYX0dQSU9fRk5DX1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9UWF9HUElPX0ZOQ19TRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgICBTSU9fUERSX1NNQV9UWF9HUElPX0ZOQ19TRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfQ09NTV9FWEVDX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMwMDAwMAorI2RlZmluZSBWU0JfQ09NTV9FWEVDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgVlNCX0NPTU1fRVhFQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgVlNCX0NPTU1fRVhFQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBWU0JfQ09NTV9FWEVDX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBWU0JfQ09NTV9FWEVDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfQ09NTV9FWEVDX0hPTEQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBWU0JfQ09NTV9NQl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMwMDAwMgorI2RlZmluZSBWU0JfQ09NTV9NQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFZTQl9DT01NX01CX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFZTQl9DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIFZTQl9DT01NX0lOVF9SRVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzAwMDAzCisjZGVmaW5lIFZTQl9DT01NX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWU0JfQ09NTV9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBWU0JfQ09NTV9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX0NPTU1fSU5UX1JFUV9UT1BfSU5UX1JFUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9DT01NX0lOVF9SRVFfVE9QX0lOVF9SRVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfQ09NTV9JTlRfUkVRX1RPUF9JTlRfUkVRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfQ09NTV9JTlRfUkVRX1RPUF9JTlRfUkVRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfQ09NTV9JTlRfU1RBX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMwMDAwNQorI2RlZmluZSBWU0JfQ09NTV9JTlRfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFZTQl9DT01NX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFZTQl9DT01NX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMDAwMDYKKyNkZWZpbmUgVlNCX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBWU0JfQ09NTV9JTlRfTVNLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBWU0JfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9DT01NX0lOVF9TVE1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzAwMDA3CisjZGVmaW5lIFZTQl9DT01NX0lOVF9TVE1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgVlNCX0NPTU1fSU5UX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgVlNCX0NPTU1fSU5UX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0NPTU1fRVhFQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAwMAorI2RlZmluZSBWU0JfVE9QX0NPTU1fRVhFQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgVlNCX1RPUF9DT01NX0VYRUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgVlNCX1RPUF9DT01NX0VYRUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fRVhFQ19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fRVhFQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fRVhFQ19IT0xEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBWU0JfVE9QX0NPTU1fTUJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAwMgorI2RlZmluZSBWU0JfVE9QX0NPTU1fTUJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFZTQl9UT1BfQ09NTV9NQl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgVlNCX1RPUF9DT01NX01CX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9NQl9DVExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fTUJfQ1RMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX01CX0NUTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX01CX0NUTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBWU0JfVE9QX0NPTU1fTUJfQ1RMX0NUTF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBWU0JfVE9QX0NPTU1fTUJfQ1RMX0NUTF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fTUJfT0JTX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX01CX09CU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9NQl9PQlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9NQl9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgVlNCX1RPUF9DT01NX01CX09CU19PQlNfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSAgICAgVlNCX1RPUF9DT01NX01CX09CU19PQlNfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX01CX01VWF9DVExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9NQl9NVVhfQ1RMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fTUJfTVVYX0NUTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNDCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX01CX01VWF9DVExfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fTUJfTVVYX09CU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgVlNCX1RPUF9DT01NX01CX01VWF9PQlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9NQl9NVVhfT0JTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0MwCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX01CX01VWF9PQlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBWU0JfVE9QX0NPTU1fTUJfTVVYX09CU19WU0JfRkVDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lICAgICBWU0JfVE9QX0NPTU1fTUJfTVVYX09CU19WU0JfSVFNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgICAgVlNCX1RPUF9DT01NX01CX01VWF9PQlNfVlNCX0lRTV9BTVBMSVRVREUgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICAgIFZTQl9UT1BfQ09NTV9NQl9NVVhfT0JTX1ZTQl9UQ01FUV8xICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lICAgICBWU0JfVE9QX0NPTU1fTUJfTVVYX09CU19WU0JfVENNRVFfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICAgIFZTQl9UT1BfQ09NTV9NQl9NVVhfT0JTX1ZTQl9GRkVfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE0MAorI2RlZmluZSAgICAgVlNCX1RPUF9DT01NX01CX01VWF9PQlNfVlNCX0ZGRV8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgwCisjZGVmaW5lICAgICBWU0JfVE9QX0NPTU1fTUJfTVVYX09CU19WU0JfREZFXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzAKKyNkZWZpbmUgICAgIFZTQl9UT1BfQ09NTV9NQl9NVVhfT0JTX1ZTQl9ERkVfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMAorCisjZGVmaW5lIFZTQl9UT1BfQ09NTV9JTlRfUkVRX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDAzCisjZGVmaW5lIFZTQl9UT1BfQ09NTV9JTlRfUkVRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWU0JfVE9QX0NPTU1fSU5UX1JFUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBWU0JfVE9QX0NPTU1fSU5UX1JFUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBWU0JfVE9QX0NPTU1fSU5UX1NUQV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAwNQorI2RlZmluZSBWU0JfVE9QX0NPTU1fSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgVlNCX1RPUF9DT01NX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFZTQl9UT1BfQ09NTV9JTlRfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUQV9GSUVMRF9JTlRfU1RBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVEFfRklFTERfSU5UX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RBX0ZJRUxEX0lOVF9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RBX0ZJRUxEX0lOVF9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVEFfTE9DS19TVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RBX0xPQ0tfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUQV9MT0NLX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUQV9MT0NLX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RBX1VOTE9DS19TVEFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUQV9VTkxPQ0tfU1RBX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVEFfVU5MT0NLX1NUQV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVEFfVU5MT0NLX1NUQV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUQV9UQVBSRUFERVJfU1RBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVEFfVEFQUkVBREVSX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RBX1RBUFJFQURFUl9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RBX1RBUFJFQURFUl9TVEFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVEFfU0VHU1lOQ0lOVFJfU1RBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RBX1NFR1NZTkNJTlRSX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUQV9TRUdTWU5DSU5UUl9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVEFfU0VHU1lOQ0lOVFJfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUQV9NRVJTRVJfU1RBX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVEFfTUVSU0VSX1NUQV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RBX01FUlNFUl9TVEFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUQV9NRVJTRVJfU1RBX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0NPTU1fSU5UX01TS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAwNgorI2RlZmluZSBWU0JfVE9QX0NPTU1fSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgVlNCX1RPUF9DT01NX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFZTQl9UT1BfQ09NTV9JTlRfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX01TS19GSUVMRF9JTlRfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9NU0tfRklFTERfSU5UX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfTVNLX0ZJRUxEX0lOVF9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfTVNLX0ZJRUxEX0lOVF9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9NU0tfTE9DS19NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfTVNLX0xPQ0tfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX01TS19MT0NLX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX01TS19MT0NLX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfTVNLX1VOTE9DS19NU0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX01TS19VTkxPQ0tfTVNLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9NU0tfVU5MT0NLX01TS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9NU0tfVU5MT0NLX01TS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX01TS19UQVBSRUFERVJfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9NU0tfVEFQUkVBREVSX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfTVNLX1RBUFJFQURFUl9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfTVNLX1RBUFJFQURFUl9NU0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9NU0tfU0VHU1lOQ0lOVFJfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfTVNLX1NFR1NZTkNJTlRSX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX01TS19TRUdTWU5DSU5UUl9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9NU0tfU0VHU1lOQ0lOVFJfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX01TS19NRVJTRVJfTVNLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9NU0tfTUVSU0VSX01TS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfTVNLX01FUlNFUl9NU0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX01TS19NRVJTRVJfTVNLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0NPTU1fSU5UX1NUTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAwNworI2RlZmluZSBWU0JfVE9QX0NPTU1fSU5UX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgVlNCX1RPUF9DT01NX0lOVF9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGCisjZGVmaW5lIFZTQl9UT1BfQ09NTV9JTlRfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUTV9GSUVMRF9JTlRfU1RNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVE1fRklFTERfSU5UX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RNX0ZJRUxEX0lOVF9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RNX0ZJRUxEX0lOVF9TVE1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVE1fTE9DS19TVE1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RNX0xPQ0tfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUTV9MT0NLX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUTV9MT0NLX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RNX1VOTE9DS19TVE1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUTV9VTkxPQ0tfU1RNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVE1fVU5MT0NLX1NUTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVE1fVU5MT0NLX1NUTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUTV9UQVBSRUFERVJfU1RNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVE1fVEFQUkVBREVSX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RNX1RBUFJFQURFUl9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RNX1RBUFJFQURFUl9TVE1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVE1fU0VHU1lOQ0lOVFJfU1RNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RNX1NFR1NZTkNJTlRSX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUTV9TRUdTWU5DSU5UUl9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVE1fU0VHU1lOQ0lOVFJfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUTV9NRVJTRVJfU1RNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9DT01NX0lOVF9TVE1fTUVSU0VSX1NUTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ09NTV9JTlRfU1RNX01FUlNFUl9TVE1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX0NPTU1fSU5UX1NUTV9NRVJTRVJfU1RNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0NLR04xQUNRX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAxMAorI2RlZmluZSBWU0JfVE9QX0NLR04xQUNRX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgVlNCX1RPUF9DS0dOMUFDUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfQ0tHTjFBQ1FfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgVlNCX1RPUF9DS0dOMVRSS19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMTEKKyNkZWZpbmUgVlNCX1RPUF9DS0dOMVRSS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFZTQl9UT1BfQ0tHTjFUUktfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBWU0JfVE9QX0NLR04xVFJLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfQ0tHTjJBQ1FfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDEyCisjZGVmaW5lIFZTQl9UT1BfQ0tHTjJBQ1FfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX0NLR04yQUNRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9DS0dOMkFDUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBWU0JfVE9QX0NLR04yVFJLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAxMworI2RlZmluZSBWU0JfVE9QX0NLR04yVFJLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgVlNCX1RPUF9DS0dOMlRSS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfQ0tHTjJUUktfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgVlNCX1RPUF9DS0dOM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMTQKKyNkZWZpbmUgVlNCX1RPUF9DS0dOM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFZTQl9UT1BfQ0tHTjNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBWU0JfVE9QX0NLR04zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NQorCisjZGVmaW5lIFZTQl9UT1BfQ1lHTjFBQ1FfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDE1CisjZGVmaW5lIFZTQl9UT1BfQ1lHTjFBQ1FfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX0NZR04xQUNRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9DWUdOMUFDUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSBWU0JfVE9QX0NZR04xVFJLX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAxNgorI2RlZmluZSBWU0JfVE9QX0NZR04xVFJLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgVlNCX1RPUF9DWUdOMVRSS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfQ1lHTjFUUktfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9DWUdOMkFDUV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMTcKKyNkZWZpbmUgVlNCX1RPUF9DWUdOMkFDUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFZTQl9UT1BfQ1lHTjJBQ1FfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBWU0JfVE9QX0NZR04yQUNRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIFZTQl9UT1BfQ1lHTjJUUktfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDE4CisjZGVmaW5lIFZTQl9UT1BfQ1lHTjJUUktfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX0NZR04yVFJLX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9DWUdOMlRSS19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSBWU0JfVE9QX0NZR04zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAxOQorI2RlZmluZSBWU0JfVE9QX0NZR04zX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgVlNCX1RPUF9DWUdOM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfQ1lHTjNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisjZGVmaW5lIFZTQl9UT1BfU1lOQ0NUUkxXT1JEX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDFBCisjZGVmaW5lIFZTQl9UT1BfU1lOQ0NUUkxXT1JEX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBWU0JfVE9QX1NZTkNDVFJMV09SRF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUYKKyNkZWZpbmUgVlNCX1RPUF9TWU5DQ1RSTFdPUkRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lOQ0NUUkxXT1JEX1BSU1RfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZTkNDVFJMV09SRF9QUlNUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWU5DQ1RSTFdPUkRfUFJTVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgVlNCX1RPUF9TWU5DQ1RSTFdPUkRfUFJTVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZTkNDVFJMV09SRF9EQ0ZSRUVaX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWU5DQ1RSTFdPUkRfRENGUkVFWl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lOQ0NUUkxXT1JEX0RDRlJFRVpfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFZTQl9UT1BfU1lOQ0NUUkxXT1JEX0RDRlJFRVpfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWU5DQ1RSTFdPUkRfSU5WQ05TVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFZTQl9UT1BfU1lOQ0NUUkxXT1JEX0lOVkNOU1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZTkNDVFJMV09SRF9JTlZDTlNUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBWU0JfVE9QX1NZTkNDVFJMV09SRF9JTlZDTlNUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lOQ0NUUkxXT1JEX0NQVUFHQ1JTVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBWU0JfVE9QX1NZTkNDVFJMV09SRF9DUFVBR0NSU1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWU5DQ1RSTFdPUkRfQ1BVQUdDUlNUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgVlNCX1RPUF9TWU5DQ1RSTFdPUkRfQ1BVQUdDUlNUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZTkNDVFJMV09SRF9BR0NJR05PUkVGU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgVlNCX1RPUF9TWU5DQ1RSTFdPUkRfQUdDSUdOT1JFRlNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lOQ0NUUkxXT1JEX0FHQ0lHTk9SRUZTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBWU0JfVE9QX1NZTkNDVFJMV09SRF9BR0NJR05PUkVGU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX01BSU5TTVVQX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAxQgorI2RlZmluZSBWU0JfVE9QX01BSU5TTVVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgVlNCX1RPUF9NQUlOU01VUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfTUFJTlNNVVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorCisjZGVmaW5lIFZTQl9UT1BfRVFTTVVQX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDFDCisjZGVmaW5lIFZTQl9UT1BfRVFTTVVQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX0VRU01VUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9FUVNNVVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfU1lTTVVYQ1RSTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDFECisjZGVmaW5lIFZTQl9UT1BfU1lTTVVYQ1RSTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgVlNCX1RPUF9TWVNNVVhDVFJMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRkYKKyNkZWZpbmUgVlNCX1RPUF9TWVNNVVhDVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9DWUxLX1NUQVRJQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfQ1lMS19TVEFUSUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0NZTEtfU1RBVElDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0NZTEtfU1RBVElDX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfQ1lMS19TRUxfU1RBVElDX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0NZTEtfU0VMX1NUQVRJQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9DWUxLX1NFTF9TVEFUSUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9DWUxLX1NFTF9TVEFUSUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0NUQ0FMRE9ORV9TVEFUSUNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9DVENBTERPTkVfU1RBVElDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfQ1RDQUxET05FX1NUQVRJQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfQ1RDQUxET05FX1NUQVRJQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9DVENBTERPTkVfU0VMX1NUQVRJQ19fQiAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfQ1RDQUxET05FX1NFTF9TVEFUSUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0NUQ0FMRE9ORV9TRUxfU1RBVElDX19NICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0NUQ0FMRE9ORV9TRUxfU1RBVElDX19QUkUgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfRlJBTUVMT0NLX1NUQVRJQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0ZSQU1FTE9DS19TVEFUSUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9GUkFNRUxPQ0tfU1RBVElDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfRlJBTUVMT0NLX1NUQVRJQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9GUkFNRUxPQ0tfU0VMX1NUQVRJQ19fQiAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfRlJBTUVMT0NLX1NFTF9TVEFUSUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0ZSQU1FTE9DS19TRUxfU1RBVElDX19NICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9GUkFNRUxPQ0tfU0VMX1NUQVRJQ19fUFJFICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0ZSQU1FU1lOQ19TVEFUSUNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9GUkFNRVNZTkNfU1RBVElDX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfRlJBTUVTWU5DX1NUQVRJQ19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0ZSQU1FU1lOQ19TVEFUSUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfRlJBTUVTWU5DX1NFTF9TVEFUSUNfX0IgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX0ZSQU1FU1lOQ19TRUxfU1RBVElDX19XICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9GUkFNRVNZTkNfU0VMX1NUQVRJQ19fTSAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfRlJBTUVTWU5DX1NFTF9TVEFUSUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9TTlJPVlRIX1NUQVRJQ19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfU05ST1ZUSF9TVEFUSUNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX1NOUk9WVEhfU1RBVElDX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGMDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU01VWENUUkxfU05ST1ZUSF9TVEFUSUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9TTlJPVlRIX1NFTF9TVEFUSUNfX0IgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgVlNCX1RPUF9TWVNNVVhDVFJMX1NOUk9WVEhfU0VMX1NUQVRJQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9TTlJPVlRIX1NFTF9TVEFUSUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTTVVYQ1RSTF9TTlJPVlRIX1NFTF9TVEFUSUNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfUkNBMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDFFCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfUkNBMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX1NOUlRIX1JDQTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9TTlJUSF9SQ0ExX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUzCisKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX1JDQTFfRE5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9SQ0ExX0ROX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUkNBMV9ETl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUkNBMV9ETl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9SQ0ExX1VQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUkNBMV9VUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX1JDQTFfVVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9SQ0ExX1VQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MAorCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfUkNBMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDFGCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfUkNBMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX1NOUlRIX1JDQTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9TTlJUSF9SQ0EyX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDc1CisKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX1JDQTJfRE5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9SQ0EyX0ROX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUkNBMl9ETl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUkNBMl9ETl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NQorCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9SQ0EyX1VQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUkNBMl9VUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX1JDQTJfVVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9SQ0EyX1VQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3MAorCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfRERNMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDIwCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfRERNMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX1NOUlRIX0RETTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9TTlJUSF9ERE0xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweENBCisKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX0RETTFfRE5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9ERE0xX0ROX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfRERNMV9ETl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfRERNMV9ETl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QQorCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9ERE0xX1VQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfRERNMV9VUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX0RETTFfVVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9ERE0xX1VQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfRERNMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDIxCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfRERNMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX1NOUlRIX0RETTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9TTlJUSF9ERE0yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweENBCisKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX0RETTJfRE5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9ERE0yX0ROX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfRERNMl9ETl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfRERNMl9ETl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QQorCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9ERE0yX1VQX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfRERNMl9VUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX0RETTJfVVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9ERE0yX1VQX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhDMAorCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfUFRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDIyCisjZGVmaW5lIFZTQl9UT1BfU05SVEhfUFRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX1NOUlRIX1BUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9TTlJUSF9QVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEQ4CisKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX1BUX0ROX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9QVF9ETl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUFRfRE5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUFRfRE5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9QVF9VUF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU05SVEhfUFRfVVBfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1NOUlRIX1BUX1VQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEYwCisjZGVmaW5lICAgVlNCX1RPUF9TTlJUSF9QVF9VUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhEMAorCisjZGVmaW5lIFZTQl9UT1BfQ1lTTVNUQVRFU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDIzCisjZGVmaW5lIFZTQl9UT1BfQ1lTTVNUQVRFU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX0NZU01TVEFURVNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9DWVNNU1RBVEVTX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfQ1lTTVNUQVRFU19TWVNTVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfVE9QX0NZU01TVEFURVNfU1lTU1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgVlNCX1RPUF9DWVNNU1RBVEVTX1NZU1NUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lICAgVlNCX1RPUF9DWVNNU1RBVEVTX1NZU1NUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0NZU01TVEFURVNfRVFTVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgVlNCX1RPUF9DWVNNU1RBVEVTX0VRU1RfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfQ1lTTVNUQVRFU19FUVNUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAKKyNkZWZpbmUgICBWU0JfVE9QX0NZU01TVEFURVNfRVFTVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAyNAorI2RlZmluZSBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgVlNCX1RPUF9TTUFMTF9OT1RDSF9DT05UUk9MX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfU01BTExfTk9UQ0hfQ09OVFJPTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfR09fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9TTUFMTF9OT1RDSF9DT05UUk9MX0dPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU01BTExfTk9UQ0hfQ09OVFJPTF9HT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfU01BTExfTk9UQ0hfQ09OVFJPTF9HT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TTUFMTF9OT1RDSF9DT05UUk9MX0JZUEFTUzFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU01BTExfTk9UQ0hfQ09OVFJPTF9CWVBBU1MxX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfQllQQVNTMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfQllQQVNTMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU01BTExfTk9UQ0hfQ09OVFJPTF9CWVBBU1MyX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfQllQQVNTMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TTUFMTF9OT1RDSF9DT05UUk9MX0JZUEFTUzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9TTUFMTF9OT1RDSF9DT05UUk9MX0JZUEFTUzJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfU1BBUkVfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9TTUFMTF9OT1RDSF9DT05UUk9MX1NQQVJFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU01BTExfTk9UQ0hfQ09OVFJPTF9TUEFSRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NzgKKyNkZWZpbmUgICBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfU1BBUkVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU01BTExfTk9UQ0hfQ09OVFJPTF9TT0ZUX1JFU0VUX19CICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfVE9QX1NNQUxMX05PVENIX0NPTlRST0xfU09GVF9SRVNFVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TTUFMTF9OT1RDSF9DT05UUk9MX1NPRlRfUkVTRVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIFZTQl9UT1BfU01BTExfTk9UQ0hfQ09OVFJPTF9TT0ZUX1JFU0VUX19QUkUgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfVEFQUkVBRENZQ19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDI1CisjZGVmaW5lIFZTQl9UT1BfVEFQUkVBRENZQ19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBWU0JfVE9QX1RBUFJFQURDWUNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisjZGVmaW5lIFZTQl9UT1BfVEFQUkVBRENZQ19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgVlNCX1RPUF9WQUxJRFBLTFZMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMjYKKyNkZWZpbmUgVlNCX1RPUF9WQUxJRFBLTFZMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBWU0JfVE9QX1ZBTElEUEtMVkxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGRgorI2RlZmluZSBWU0JfVE9QX1ZBTElEUEtMVkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisKKyNkZWZpbmUgVlNCX1RPUF9DRU5UUk9JRF9GSU5FX0RFTEFZX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMjcKKyNkZWZpbmUgVlNCX1RPUF9DRU5UUk9JRF9GSU5FX0RFTEFZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBWU0JfVE9QX0NFTlRST0lEX0ZJTkVfREVMQVlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIFZTQl9UT1BfQ0VOVFJPSURfRklORV9ERUxBWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorCisjZGVmaW5lIFZTQl9UT1BfQ0VOVFJPSURfU01BQ0hfREVMQVlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDI4CisjZGVmaW5lIFZTQl9UT1BfQ0VOVFJPSURfU01BQ0hfREVMQVlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgVlNCX1RPUF9DRU5UUk9JRF9TTUFDSF9ERUxBWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBWU0JfVE9QX0NFTlRST0lEX1NNQUNIX0RFTEFZX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUZGCisKKyNkZWZpbmUgVlNCX1RPUF9TTlJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMjkKKyNkZWZpbmUgVlNCX1RPUF9TTlJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBWU0JfVE9QX1NOUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSBWU0JfVE9QX1NOUl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBWU0JfVE9QX0xPQ0tTVEFUVVNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAyQQorI2RlZmluZSBWU0JfVE9QX0xPQ0tTVEFUVVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1RPUF9MT0NLU1RBVFVTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9UT1BfTE9DS1NUQVRVU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0xPQ0tTVEFUVVNfVlNCTU9ERV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9MT0NLU1RBVFVTX1ZTQk1PREVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfTE9DS1NUQVRVU19WU0JNT0RFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFZTQl9UT1BfTE9DS1NUQVRVU19WU0JNT0RFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9MT0NLU1RBVFVTX0ZSTUxPQ0tfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfTE9DS1NUQVRVU19GUk1MT0NLX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0xPQ0tTVEFUVVNfRlJNTE9DS19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9MT0NLU1RBVFVTX0ZSTUxPQ0tfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0xPQ0tTVEFUVVNfQ1lMT0NLX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9MT0NLU1RBVFVTX0NZTE9DS19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfTE9DS1NUQVRVU19DWUxPQ0tfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX0xPQ0tTVEFUVVNfQ1lMT0NLX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfTE9DS1NUQVRVU19ERE1PTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBWU0JfVE9QX0xPQ0tTVEFUVVNfRERNT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9MT0NLU1RBVFVTX0RETU9OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFZTQl9UT1BfTE9DS1NUQVRVU19ERE1PTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfQ1RTVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDJCCisjZGVmaW5lIFZTQl9UT1BfQ1RTVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBWU0JfVE9QX0NUU1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSBWU0JfVE9QX0NUU1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBWU0JfVE9QX0VRU01SU1RDVFJMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAyQworI2RlZmluZSBWU0JfVE9QX0VRU01SU1RDVFJMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1RPUF9FUVNNUlNUQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9UT1BfRVFTTVJTVENUUkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX1JDQU9OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9SQ0FPTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfUkNBT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfUkNBT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9ERkVPTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfREZFT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX0RGRU9OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX0RGRU9OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfRERNRU4xX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX0RETUVOMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9ERE1FTjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9ERE1FTjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX0RETUVOMl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9ERE1FTjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfRERNRU4yX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfRERNRU4yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9ESUdJQUdDT05fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfRElHSUFHQ09OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX0RJR0lBR0NPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9ESUdJQUdDT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX1BBUkFJTklURU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9QQVJBSU5JVEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfUEFSQUlOSVRFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX1BBUkFJTklURU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfVElNRU9VVEZSTUNOVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SU1RDVFJMX1RJTUVPVVRGUk1DTlRFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUlNUQ1RSTF9USU1FT1VURlJNQ05URU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJTVENUUkxfVElNRU9VVEZSTUNOVEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfRVFTTVRSTkNUUkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDJECisjZGVmaW5lIFZTQl9UT1BfRVFTTVRSTkNUUkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBWU0JfVE9QX0VRU01UUk5DVFJMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgVlNCX1RPUF9FUVNNVFJOQ1RSTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX1JDQU9OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9SQ0FPTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfUkNBT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfUkNBT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9ERkVPTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfREZFT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX0RGRU9OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX0RGRU9OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfRERNRU4xX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX0RETUVOMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9ERE1FTjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9ERE1FTjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX0RETUVOMl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9ERE1FTjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfRERNRU4yX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfRERNRU4yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9ESUdJQUdDT05fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfRElHSUFHQ09OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX0RJR0lBR0NPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9ESUdJQUdDT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX1BBUkFJTklURU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9QQVJBSU5JVEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfUEFSQUlOSVRFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX1BBUkFJTklURU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfVElNRU9VVEZSTUNOVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01UUk5DVFJMX1RJTUVPVVRGUk1DTlRFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNVFJOQ1RSTF9USU1FT1VURlJNQ05URU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVRSTkNUUkxfVElNRU9VVEZSTUNOVEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKworI2RlZmluZSBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAyRQorI2RlZmluZSBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1RPUF9FUVNNUkNBMUNUUkxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9UT1BfRVFTTVJDQTFDVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9SQ0FPTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfUkNBT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX1JDQU9OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX1JDQU9OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfREZFT05fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX0RGRU9OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9ERkVPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9ERkVPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX0RETUVOMV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9ERE1FTjFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfRERNRU4xX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfRERNRU4xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9ERE1FTjJfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfRERNRU4yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX0RETUVOMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX0RETUVOMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfRElHSUFHQ09OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX0RJR0lBR0NPTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9ESUdJQUdDT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfRElHSUFHQ09OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9QQVJBSU5JVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfUEFSQUlOSVRFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX1BBUkFJTklURU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9QQVJBSU5JVEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX1RJTUVPVVRGUk1DTlRFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0ExQ1RSTF9USU1FT1VURlJNQ05URU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMUNUUkxfVElNRU9VVEZSTUNOVEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTFDVFJMX1RJTUVPVVRGUk1DTlRFTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfRVFTTVJDQTJDVFJMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDJGCisjZGVmaW5lIFZTQl9UT1BfRVFTTVJDQTJDVFJMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgVlNCX1RPUF9FUVNNUkNBMkNUUkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX1JDQU9OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9SQ0FPTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfUkNBT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfUkNBT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9ERkVPTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfREZFT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX0RGRU9OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX0RGRU9OX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfRERNRU4xX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX0RETUVOMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9ERE1FTjFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9ERE1FTjFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX0RETUVOMl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9ERE1FTjJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfRERNRU4yX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfRERNRU4yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9ESUdJQUdDT05fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfRElHSUFHQ09OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX0RJR0lBR0NPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9ESUdJQUdDT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX1BBUkFJTklURU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9QQVJBSU5JVEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfUEFSQUlOSVRFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX1BBUkFJTklURU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfVElNRU9VVEZSTUNOVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFZTQl9UT1BfRVFTTVJDQTJDVFJMX1RJTUVPVVRGUk1DTlRFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01SQ0EyQ1RSTF9USU1FT1VURlJNQ05URU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNUkNBMkNUUkxfVElNRU9VVEZSTUNOVEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9FUVNNRERNMUNUUkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMzAKKyNkZWZpbmUgVlNCX1RPUF9FUVNNRERNMUNUUkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFZTQl9UT1BfRVFTTURETTFDVFJMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBWU0JfVE9QX0VRU01ERE0xQ1RSTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NgorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfUkNBT05fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX1JDQU9OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9SQ0FPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9SQ0FPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX0RGRU9OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9ERkVPTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfREZFT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfREZFT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9ERE1FTjFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfRERNRU4xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX0RETUVOMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX0RETUVOMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfRERNRU4yX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX0RETUVOMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9ERE1FTjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9ERE1FTjJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX0RJR0lBR0NPTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9ESUdJQUdDT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfRElHSUFHQ09OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX0RJR0lBR0NPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfUEFSQUlOSVRFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX1BBUkFJTklURU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9QQVJBSU5JVEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfUEFSQUlOSVRFTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9USU1FT1VURlJNQ05URU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMUNUUkxfVElNRU9VVEZSTUNOVEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTFDVFJMX1RJTUVPVVRGUk1DTlRFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0xQ1RSTF9USU1FT1VURlJNQ05URU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0VRU01ERE0yQ1RSTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAzMQorI2RlZmluZSBWU0JfVE9QX0VRU01ERE0yQ1RSTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1RPUF9FUVNNRERNMkNUUkxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9UT1BfRVFTTURETTJDVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRQorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfUkNBT05fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX1JDQU9OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9SQ0FPTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9SQ0FPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX0RGRU9OX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9ERkVPTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfREZFT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfREZFT05fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9ERE1FTjFfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfRERNRU4xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX0RETUVOMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX0RETUVOMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfRERNRU4yX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX0RETUVOMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9ERE1FTjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9ERE1FTjJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX0RJR0lBR0NPTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9ESUdJQUdDT05fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfRElHSUFHQ09OX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX0RJR0lBR0NPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX1BBUkFJTklURU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9QQVJBSU5JVEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfUEFSQUlOSVRFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX1BBUkFJTklURU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfVElNRU9VVEZSTUNOVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFZTQl9UT1BfRVFTTURETTJDVFJMX1RJTUVPVVRGUk1DTlRFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRU01ERE0yQ1RSTF9USU1FT1VURlJNQ05URU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgVlNCX1RPUF9FUVNNRERNMkNUUkxfVElNRU9VVEZSTUNOVEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTVJTVENUUkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMzIKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTVJTVENUUkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFZTQl9UT1BfU1lTU01SU1RDVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RjkKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX1JTVENUQ0FMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9SU1RDVENBTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfUlNUQ1RDQUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfUlNUQ1RDQUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9DVENBTEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfQ1RDQUxFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX0NUQ0FMRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX0NUQ0FMRU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfU1RBUlRUUk5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX1NUQVJUVFJOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9TVEFSVFRSTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9TVEFSVFRSTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX1JTVEZSTVNZTkNERVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9SU1RGUk1TWU5DREVUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfUlNURlJNU1lOQ0RFVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfUlNURlJNU1lOQ0RFVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9SU1RDWURFVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfUlNUQ1lERVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX1JTVENZREVUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9SU1RDWURFVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9SU1REQ1JNVl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfUlNURENSTVZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX1JTVERDUk1WX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9SU1REQ1JNVl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9SU1RFUVNJR19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfUlNURVFTSUdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX1JTVEVRU0lHX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9SU1RFUVNJR19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9DS0ZSWl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfQ0tGUlpfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX0NLRlJaX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9DS0ZSWl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9DS0JXU1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfQ0tCV1NXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX0NLQldTV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfQ0tCV1NXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01SU1RDVFJMX05DT0JXU1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9OQ09CV1NXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfTkNPQldTV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9OQ09CV1NXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfTkNPVElNRU9VVENOVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9OQ09USU1FT1VUQ05URU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVJTVENUUkxfTkNPVElNRU9VVENOVEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNUlNUQ1RSTF9OQ09USU1FT1VUQ05URU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMAorCisjZGVmaW5lIFZTQl9UT1BfU1lTU01DWUNUUkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDMzCisjZGVmaW5lIFZTQl9UT1BfU1lTU01DWUNUUkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTUNZQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBWU0JfVE9QX1NZU1NNQ1lDVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NEU5CisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX1JTVENUQ0FMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9SU1RDVENBTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfUlNUQ1RDQUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfUlNUQ1RDQUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9DVENBTEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfQ1RDQUxFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX0NUQ0FMRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX0NUQ0FMRU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfU1RBUlRUUk5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX1NUQVJUVFJOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9TVEFSVFRSTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9TVEFSVFRSTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX1JTVEZSTVNZTkNERVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9SU1RGUk1TWU5DREVUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfUlNURlJNU1lOQ0RFVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfUlNURlJNU1lOQ0RFVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9SU1RDWURFVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfUlNUQ1lERVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX1JTVENZREVUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9SU1RDWURFVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX1JTVERDUk1WX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9SU1REQ1JNVl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfUlNURENSTVZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX1JTVERDUk1WX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX1JTVEVRU0lHX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9SU1RFUVNJR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfUlNURVFTSUdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX1JTVEVRU0lHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX0NLRlJaX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9DS0ZSWl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfQ0tGUlpfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX0NLRlJaX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX0NLQldTV19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9DS0JXU1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfQ0tCV1NXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9DS0JXU1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX05DT0JXU1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9OQ09CV1NXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfTkNPQldTV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNZQ1RSTF9OQ09CV1NXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX05DT1RJTUVPVVRDTlRFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfTkNPVElNRU9VVENOVEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1lDVFJMX05DT1RJTUVPVVRDTlRFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DWUNUUkxfTkNPVElNRU9VVENOVEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwCisKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTVRSTkNUUkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMzQKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTVRSTkNUUkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFZTQl9UT1BfU1lTU01UUk5DVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDQKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX1JTVENUQ0FMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9SU1RDVENBTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfUlNUQ1RDQUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfUlNUQ1RDQUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9DVENBTEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfQ1RDQUxFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX0NUQ0FMRU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MgorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX0NUQ0FMRU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfU1RBUlRUUk5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX1NUQVJUVFJOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9TVEFSVFRSTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9TVEFSVFRSTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX1JTVEZSTVNZTkNERVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9SU1RGUk1TWU5DREVUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfUlNURlJNU1lOQ0RFVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfUlNURlJNU1lOQ0RFVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9SU1RDWURFVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfUlNUQ1lERVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX1JTVENZREVUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9SU1RDWURFVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX1JTVERDUk1WX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9SU1REQ1JNVl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfUlNURENSTVZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX1JTVERDUk1WX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfUlNURVFTSUdfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX1JTVEVRU0lHX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9SU1RFUVNJR19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfUlNURVFTSUdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9DS0ZSWl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfQ0tGUlpfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX0NLRlJaX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9DS0ZSWl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX0NLQldTV19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9DS0JXU1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfQ0tCV1NXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9DS0JXU1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01UUk5DVFJMX05DT0JXU1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9OQ09CV1NXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfTkNPQldTV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9OQ09CV1NXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfTkNPVElNRU9VVENOVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9OQ09USU1FT1VUQ05URU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTVRSTkNUUkxfTkNPVElNRU9VVENOVEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNVFJOQ1RSTF9OQ09USU1FT1VUQ05URU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX1NZU1NNRVFDVFJMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAzNQorI2RlZmluZSBWU0JfVE9QX1NZU1NNRVFDVFJMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIFZTQl9UT1BfU1lTU01FUUNUUkxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTUVRQ1RSTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMwNAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9SU1RDVENBTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfUlNUQ1RDQUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1JTVENUQ0FMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1JTVENUQ0FMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfQ1RDQUxFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX0NUQ0FMRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9DVENBTEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9DVENBTEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1NUQVJUVFJOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9TVEFSVFRSTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfU1RBUlRUUk5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfU1RBUlRUUk5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9SU1RGUk1TWU5DREVUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfUlNURlJNU1lOQ0RFVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1JTVEZSTVNZTkNERVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1JTVEZSTVNZTkNERVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfUlNUQ1lERVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1JTVENZREVUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9SU1RDWURFVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfUlNUQ1lERVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9SU1REQ1JNVl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfUlNURENSTVZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1JTVERDUk1WX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9SU1REQ1JNVl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1JTVEVRU0lHX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9SU1RFUVNJR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfUlNURVFTSUdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX1JTVEVRU0lHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfQ0tGUlpfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX0NLRlJaX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9DS0ZSWl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfQ0tGUlpfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9DS0JXU1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfQ0tCV1NXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX0NLQldTV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfQ0tCV1NXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNRVFDVFJMX05DT0JXU1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9OQ09CV1NXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfTkNPQldTV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9OQ09CV1NXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfTkNPVElNRU9VVENOVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9OQ09USU1FT1VUQ05URU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01FUUNUUkxfTkNPVElNRU9VVENOVEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUVRQ1RSTF9OQ09USU1FT1VUQ05URU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMzYKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFZTQl9UT1BfU1lTU01BR0NDVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGOQorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfUlNUQ1RDQUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1JTVENUQ0FMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9SU1RDVENBTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9SU1RDVENBTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX0NUQ0FMRU5fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9DVENBTEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfQ1RDQUxFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfQ1RDQUxFTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9TVEFSVFRSTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfU1RBUlRUUk5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1NUQVJUVFJOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1NUQVJUVFJOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfUlNURlJNU1lOQ0RFVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1JTVEZSTVNZTkNERVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9SU1RGUk1TWU5DREVUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9SU1RGUk1TWU5DREVUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1JTVENZREVUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9SU1RDWURFVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfUlNUQ1lERVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1JTVENZREVUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1JTVERDUk1WX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9SU1REQ1JNVl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfUlNURENSTVZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1JTVERDUk1WX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1JTVEVRU0lHX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9SU1RFUVNJR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfUlNURVFTSUdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX1JTVEVRU0lHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX0NLRlJaX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9DS0ZSWl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfQ0tGUlpfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX0NLRlJaX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX0NLQldTV19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9DS0JXU1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfQ0tCV1NXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9DS0JXU1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX05DT0JXU1dfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9OQ09CV1NXX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfTkNPQldTV19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQUdDQ1RSTF9OQ09CV1NXX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX05DT1RJTUVPVVRDTlRFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfTkNPVElNRU9VVENOVEVOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01BR0NDVFJMX05DT1RJTUVPVVRDTlRFTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUFHQ0NUUkxfTkNPVElNRU9VVENOVEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTUNUQ1RSTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMzcKKyNkZWZpbmUgVlNCX1RPUF9TWVNTTUNUQ1RSTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBWU0JfVE9QX1NZU1NNQ1RDVFJMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFZTQl9UT1BfU1lTU01DVENUUkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0QQorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9SU1RDVENBTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfUlNUQ1RDQUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1JTVENUQ0FMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1JTVENUQ0FMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfQ1RDQUxFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX0NUQ0FMRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9DVENBTEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9DVENBTEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1NUQVJUVFJOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9TVEFSVFRSTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfU1RBUlRUUk5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfU1RBUlRUUk5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9SU1RGUk1TWU5DREVUX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfUlNURlJNU1lOQ0RFVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1JTVEZSTVNZTkNERVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1JTVEZSTVNZTkNERVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfUlNUQ1lERVRfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1JTVENZREVUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9SU1RDWURFVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfUlNUQ1lERVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9SU1REQ1JNVl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfUlNURENSTVZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1JTVERDUk1WX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9SU1REQ1JNVl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1JTVEVRU0lHX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9SU1RFUVNJR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfUlNURVFTSUdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX1JTVEVRU0lHX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX0NLRlJaX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9DS0ZSWl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfQ0tGUlpfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX0NLRlJaX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfQ0tCV1NXX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX0NLQldTV19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9DS0JXU1dfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX0NLQldTV19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfTkNPQldTV19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX05DT0JXU1dfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9OQ09CV1NXX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAKKyNkZWZpbmUgICBWU0JfVE9QX1NZU1NNQ1RDVFJMX05DT0JXU1dfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfTkNPVElNRU9VVENOVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9OQ09USU1FT1VUQ05URU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfU1lTU01DVENUUkxfTkNPVElNRU9VVENOVEVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwCisjZGVmaW5lICAgVlNCX1RPUF9TWVNTTUNUQ1RSTF9OQ09USU1FT1VUQ05URU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9FUUNUUkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwMzgKKyNkZWZpbmUgVlNCX1RPUF9FUUNUUkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBWU0JfVE9QX0VRQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGCisjZGVmaW5lIFZTQl9UT1BfRVFDVFJMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg2CisKKyNkZWZpbmUgICBWU0JfVE9QX0VRQ1RSTF9TVEFTU0lHTkVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9FUUNUUkxfU1RBU1NJR05FTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX1NUQVNTSUdORU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX1NUQVNTSUdORU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUUNUUkxfT1JDQU5DTUFFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX09SQ0FOQ01BRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0VRQ1RSTF9PUkNBTkNNQUVOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgICBWU0JfVE9QX0VRQ1RSTF9PUkNBTkNNQUVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIKKworI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX09EQUdDR09fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgICBWU0JfVE9QX0VRQ1RSTF9PREFHQ0dPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUUNUUkxfT0RBR0NHT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lICAgVlNCX1RPUF9FUUNUUkxfT0RBR0NHT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisKKyNkZWZpbmUgICBWU0JfVE9QX0VRQ1RSTF9PUFRHQUlOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lICAgVlNCX1RPUF9FUUNUUkxfT1BUR0FJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX09QVEdBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzgKKyNkZWZpbmUgICBWU0JfVE9QX0VRQ1RSTF9PUFRHQUlOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX1RBUFJBTVdSVEVOX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBWU0JfVE9QX0VRQ1RSTF9UQVBSQU1XUlRFTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9FUUNUUkxfVEFQUkFNV1JURU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX1RBUFJBTVdSVEVOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9FUUNUUkxfQ01BR0FJTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX0NNQUdBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBWU0JfVE9QX0VRQ1RSTF9DTUFHQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDM4MAorI2RlZmluZSAgIFZTQl9UT1BfRVFDVFJMX0NNQUdBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfUFJFRVFBR0NDVFJMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDM5CisjZGVmaW5lIFZTQl9UT1BfUFJFRVFBR0NDVFJMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBWU0JfVE9QX1BSRUVRQUdDQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUYKKyNkZWZpbmUgVlNCX1RPUF9QUkVFUUFHQ0NUUkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisKKyNkZWZpbmUgICBWU0JfVE9QX1BSRUVRQUdDQ1RSTF9QUkVFUUFHQ0JXU0VMX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9QUkVFUUFHQ0NUUkxfUFJFRVFBR0NCV1NFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfUFJFRVFBR0NDVFJMX1BSRUVRQUdDQldTRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RgorI2RlZmluZSAgIFZTQl9UT1BfUFJFRVFBR0NDVFJMX1BSRUVRQUdDQldTRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9QUkVFUUFHQ0NUUkxfUFJFRVFBR0NGUlpfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSAgIFZTQl9UT1BfUFJFRVFBR0NDVFJMX1BSRUVRQUdDRlJaX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1BSRUVRQUdDQ1RSTF9QUkVFUUFHQ0ZSWl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwCisjZGVmaW5lICAgVlNCX1RPUF9QUkVFUUFHQ0NUUkxfUFJFRVFBR0NGUlpfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorCisjZGVmaW5lIFZTQl9UT1BfUFJFRVFBR0NQV1JSRUZMVkxISV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDNBCisjZGVmaW5lIFZTQl9UT1BfUFJFRVFBR0NQV1JSRUZMVkxISV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX1BSRUVRQUdDUFdSUkVGTFZMSElfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9QUkVFUUFHQ1BXUlJFRkxWTEhJX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX1BSRUVRQUdDUFdSUkVGTFZMTE9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAzQgorI2RlZmluZSBWU0JfVE9QX1BSRUVRQUdDUFdSUkVGTFZMTE9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFZTQl9UT1BfUFJFRVFBR0NQV1JSRUZMVkxMT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFZTQl9UT1BfUFJFRVFBR0NQV1JSRUZMVkxMT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRDY2CisKKyNkZWZpbmUgVlNCX1RPUF9DT1JJTkdTRUxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwM0MKKyNkZWZpbmUgVlNCX1RPUF9DT1JJTkdTRUxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFZTQl9UT1BfQ09SSU5HU0VMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBWU0JfVE9QX0NPUklOR1NFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSBWU0JfVE9QX0JFREVUQ1RSTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDAzRAorI2RlZmluZSBWU0JfVE9QX0JFREVUQ1RSTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgVlNCX1RPUF9CRURFVENUUkxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBWU0JfVE9QX0JFREVUQ1RSTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTQ1CisKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9NSVhSQVRJT19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9CRURFVENUUkxfTUlYUkFUSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX01JWFJBVElPX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NworI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX01JWFJBVElPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NQorCisjZGVmaW5lICAgVlNCX1RPUF9CRURFVENUUkxfQ1lPRkZTRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX0NZT0ZGU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9DWU9GRlNFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9DWU9GRlNFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX0RBVEFPRkZTRUxfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9EQVRBT0ZGU0VMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9CRURFVENUUkxfREFUQU9GRlNFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX0RBVEFPRkZTRUxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9CRURFVENUUkxfQllQQVNTX0RTUV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX0JZUEFTU19EU1FfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9CWVBBU1NfRFNRX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgVlNCX1RPUF9CRURFVENUUkxfQllQQVNTX0RTUV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9CWVBBU1NfUFNRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgVlNCX1RPUF9CRURFVENUUkxfQllQQVNTX1BTUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX0JZUEFTU19QU1FfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9CWVBBU1NfUFNRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwCisKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9CWVBBU1NfQ1NRX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1RPUF9CRURFVENUUkxfQllQQVNTX0NTUV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX0JZUEFTU19DU1FfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9CWVBBU1NfQ1NRX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfQkVERVRDVFJMX0JZUEFTU19ETVBfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9CWVBBU1NfRE1QX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9CRURFVENUUkxfQllQQVNTX0RNUF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAKKyNkZWZpbmUgICBWU0JfVE9QX0JFREVUQ1RSTF9CWVBBU1NfRE1QX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMAorCisjZGVmaW5lIFZTQl9UT1BfTEJBR0NSRUZMVkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDNFCisjZGVmaW5lIFZTQl9UT1BfTEJBR0NSRUZMVkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgVlNCX1RPUF9MQkFHQ1JFRkxWTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBWU0JfVE9QX0xCQUdDUkVGTFZMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwCisKKyNkZWZpbmUgVlNCX1RPUF9VQkFHQ1JFRkxWTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwM0YKKyNkZWZpbmUgVlNCX1RPUF9VQkFHQ1JFRkxWTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfVE9QX1VCQUdDUkVGTFZMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9UT1BfVUJBR0NSRUZMVkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAKKworI2RlZmluZSBWU0JfVE9QX05PVENIMV9CSU5fTlVNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA0MAorI2RlZmluZSBWU0JfVE9QX05PVENIMV9CSU5fTlVNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIFZTQl9UT1BfTk9UQ0gxX0JJTl9OVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSDFfQklOX05VTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEIyCisKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSDJfQklOX05VTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNDEKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSDJfQklOX05VTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBWU0JfVE9QX05PVENIMl9CSU5fTlVNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFZTQl9UT1BfTk9UQ0gyX0JJTl9OVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MEIKKworI2RlZmluZSBWU0JfVE9QX05PVENIX1NUQVJUX0JJTl9OVU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA0MgorI2RlZmluZSBWU0JfVE9QX05PVENIX1NUQVJUX0JJTl9OVU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIFZTQl9UT1BfTk9UQ0hfU1RBUlRfQklOX05VTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSF9TVEFSVF9CSU5fTlVNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdDMAorCisjZGVmaW5lIFZTQl9UT1BfTk9UQ0hfU1RPUF9CSU5fTlVNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDQzCisjZGVmaW5lIFZTQl9UT1BfTk9UQ0hfU1RPUF9CSU5fTlVNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSF9TVE9QX0JJTl9OVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBWU0JfVE9QX05PVENIX1NUT1BfQklOX05VTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDNGCisKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSF9URVNUX0RVUkFUSU9OX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNDQKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSF9URVNUX0RVUkFUSU9OX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBWU0JfVE9QX05PVENIX1RFU1RfRFVSQVRJT05fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFZTQl9UT1BfTk9UQ0hfVEVTVF9EVVJBVElPTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKworI2RlZmluZSBWU0JfVE9QX1JFU1VMVF9MQVJHRV9QRUFLX0JJTl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA0NQorI2RlZmluZSBWU0JfVE9QX1JFU1VMVF9MQVJHRV9QRUFLX0JJTl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIFZTQl9UT1BfUkVTVUxUX0xBUkdFX1BFQUtfQklOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkYKKyNkZWZpbmUgVlNCX1RPUF9SRVNVTFRfTEFSR0VfUEVBS19CSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX1JFU1VMVF9MQVJHRV9QRUFLX1ZBTFVFX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA0NgorI2RlZmluZSBWU0JfVE9QX1JFU1VMVF9MQVJHRV9QRUFLX1ZBTFVFX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFZTQl9UT1BfUkVTVUxUX0xBUkdFX1BFQUtfVkFMVUVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFZTQl9UT1BfUkVTVUxUX0xBUkdFX1BFQUtfVkFMVUVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9SRVNVTFRfU01BTExfUEVBS19CSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNDcKKyNkZWZpbmUgVlNCX1RPUF9SRVNVTFRfU01BTExfUEVBS19CSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBWU0JfVE9QX1JFU1VMVF9TTUFMTF9QRUFLX0JJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGCisjZGVmaW5lIFZTQl9UT1BfUkVTVUxUX1NNQUxMX1BFQUtfQklOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9SRVNVTFRfU01BTExfUEVBS19WQUxVRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNDgKKyNkZWZpbmUgVlNCX1RPUF9SRVNVTFRfU01BTExfUEVBS19WQUxVRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBWU0JfVE9QX1JFU1VMVF9TTUFMTF9QRUFLX1ZBTFVFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBWU0JfVE9QX1JFU1VMVF9TTUFMTF9QRUFLX1ZBTFVFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfTk9UQ0hfU1dFRVBfUlVOTklOR19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDQ5CisjZGVmaW5lIFZTQl9UT1BfTk9UQ0hfU1dFRVBfUlVOTklOR19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWU0JfVE9QX05PVENIX1NXRUVQX1JVTk5JTkdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBWU0JfVE9QX05PVENIX1NXRUVQX1JVTk5JTkdfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfUFJFRVFEQUdDUkFUSU9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDRBCisjZGVmaW5lIFZTQl9UT1BfUFJFRVFEQUdDUkFUSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMKKyNkZWZpbmUgVlNCX1RPUF9QUkVFUURBR0NSQVRJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRkYKKyNkZWZpbmUgVlNCX1RPUF9QUkVFUURBR0NSQVRJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgVlNCX1RPUF9BR0NfVFJVTkNDVFJMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNEIKKyNkZWZpbmUgVlNCX1RPUF9BR0NfVFJVTkNDVFJMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFZTQl9UT1BfQUdDX1RSVU5DQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisjZGVmaW5lIFZTQl9UT1BfQUdDX1RSVU5DQ1RSTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGCisKKyNkZWZpbmUgICBWU0JfVE9QX0FHQ19UUlVOQ0NUUkxfVFJVTkNfTFNCX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9BR0NfVFJVTkNDVFJMX1RSVU5DX0xTQl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFZTQl9UT1BfQUdDX1RSVU5DQ1RSTF9UUlVOQ19MU0JfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworI2RlZmluZSAgIFZTQl9UT1BfQUdDX1RSVU5DQ1RSTF9UUlVOQ19MU0JfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lICAgVlNCX1RPUF9BR0NfVFJVTkNDVFJMX1RSVU5DXzEyTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSAgIFZTQl9UT1BfQUdDX1RSVU5DQ1RSTF9UUlVOQ18xMk5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX0FHQ19UUlVOQ0NUUkxfVFJVTkNfMTJOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgICBWU0JfVE9QX0FHQ19UUlVOQ0NUUkxfVFJVTkNfMTJOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQKKworI2RlZmluZSAgIFZTQl9UT1BfQUdDX1RSVU5DQ1RSTF9UUlVOQ19FTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgICBWU0JfVE9QX0FHQ19UUlVOQ0NUUkxfVFJVTkNfRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9BR0NfVFJVTkNDVFJMX1RSVU5DX0VOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lICAgVlNCX1RPUF9BR0NfVFJVTkNDVFJMX1RSVU5DX0VOX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisKKyNkZWZpbmUgVlNCX1RPUF9CRUFHQ19ERUFEWk9ORUlOSVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNEMKKyNkZWZpbmUgVlNCX1RPUF9CRUFHQ19ERUFEWk9ORUlOSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFZTQl9UT1BfQkVBR0NfREVBRFpPTkVJTklUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBWU0JfVE9QX0JFQUdDX0RFQURaT05FSU5JVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTAKKworI2RlZmluZSBWU0JfVE9QX0JFQUdDX1JFRkxFVkVMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA0RAorI2RlZmluZSBWU0JfVE9QX0JFQUdDX1JFRkxFVkVMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgVlNCX1RPUF9CRUFHQ19SRUZMRVZFTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFGRgorI2RlZmluZSBWU0JfVE9QX0JFQUdDX1JFRkxFVkVMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QUUKKworI2RlZmluZSBWU0JfVE9QX0JFQUdDX0dBSU5TSElGVF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA0RQorI2RlZmluZSBWU0JfVE9QX0JFQUdDX0dBSU5TSElGVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgVlNCX1RPUF9CRUFHQ19HQUlOU0hJRlRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgVlNCX1RPUF9CRUFHQ19HQUlOU0hJRlRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSBWU0JfVE9QX0JFQUdDX1JFR0lOSVRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA0RgorI2RlZmluZSBWU0JfVE9QX0JFQUdDX1JFR0lOSVRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9UT1BfQkVBR0NfUkVHSU5JVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9UT1BfQkVBR0NfUkVHSU5JVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorCisjZGVmaW5lICAgVlNCX1RPUF9CRUFHQ19SRUdJTklUX0JFQUdDX1JTVF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgICBWU0JfVE9QX0JFQUdDX1JFR0lOSVRfQkVBR0NfUlNUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9CRUFHQ19SRUdJTklUX0JFQUdDX1JTVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwCisjZGVmaW5lICAgVlNCX1RPUF9CRUFHQ19SRUdJTklUX0JFQUdDX1JTVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9CRUFHQ19TQ0FMRV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNTAKKyNkZWZpbmUgVlNCX1RPUF9CRUFHQ19TQ0FMRV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBWU0JfVE9QX0JFQUdDX1NDQUxFX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0ZGRgorI2RlZmluZSBWU0JfVE9QX0JFQUdDX1NDQUxFX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfQ0ZBR0NfREVBRFpPTkVJTklUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDUxCisjZGVmaW5lIFZTQl9UT1BfQ0ZBR0NfREVBRFpPTkVJTklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBWU0JfVE9QX0NGQUdDX0RFQURaT05FSU5JVF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkYKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19ERUFEWk9ORUlOSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDUwCisKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19SRUZMRVZFTF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNTIKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19SRUZMRVZFTF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFZTQl9UT1BfQ0ZBR0NfUkVGTEVWRUxfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19SRUZMRVZFTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEFFCisKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19HQUlOU0hJRlRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNTMKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19HQUlOU0hJRlRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIFZTQl9UT1BfQ0ZBR0NfR0FJTlNISUZUX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3CisjZGVmaW5lIFZTQl9UT1BfQ0ZBR0NfR0FJTlNISUZUX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzCisKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19SRUdJTklUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNTQKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19SRUdJTklUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBWU0JfVE9QX0NGQUdDX1JFR0lOSVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBWU0JfVE9QX0NGQUdDX1JFR0lOSVRfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAKKworI2RlZmluZSAgIFZTQl9UT1BfQ0ZBR0NfUkVHSU5JVF9DRkFHQ19SU1RfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0CisjZGVmaW5lICAgVlNCX1RPUF9DRkFHQ19SRUdJTklUX0NGQUdDX1JTVF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfQ0ZBR0NfUkVHSU5JVF9DRkFHQ19SU1RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMAorI2RlZmluZSAgIFZTQl9UT1BfQ0ZBR0NfUkVHSU5JVF9DRkFHQ19SU1RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfQ0ZBR0NfU0NBTEVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDU1CisjZGVmaW5lIFZTQl9UT1BfQ0ZBR0NfU0NBTEVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19TQ0FMRV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRkYKKyNkZWZpbmUgVlNCX1RPUF9DRkFHQ19TQ0FMRV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0NLVFJLT05DVExfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA1NgorI2RlZmluZSBWU0JfVE9QX0NLVFJLT05DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgVlNCX1RPUF9DS1RSS09OQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgVlNCX1RPUF9DS1RSS09OQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0NZVFJLT05DVExfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA1NworI2RlZmluZSBWU0JfVE9QX0NZVFJLT05DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgVlNCX1RPUF9DWVRSS09OQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgVlNCX1RPUF9DWVRSS09OQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX1BUT05DVExfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA1OAorI2RlZmluZSBWU0JfVE9QX1BUT05DVExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgVlNCX1RPUF9QVE9OQ1RMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKyNkZWZpbmUgVlNCX1RPUF9QVE9OQ1RMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX05PVENIX1NDQUxFXzFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA1OQorI2RlZmluZSBWU0JfVE9QX05PVENIX1NDQUxFXzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSF9TQ0FMRV8xX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfTk9UQ0hfU0NBTEVfMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhBCisKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSF9TQ0FMRV8yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNUEKKyNkZWZpbmUgVlNCX1RPUF9OT1RDSF9TQ0FMRV8yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFZTQl9UT1BfTk9UQ0hfU0NBTEVfMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBWU0JfVE9QX05PVENIX1NDQUxFXzJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4QQorCisjZGVmaW5lIFZTQl9UT1BfRklSU1RMQVJHRkZFVEFQX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDVCCisjZGVmaW5lIFZTQl9UT1BfRklSU1RMQVJHRkZFVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgVlNCX1RPUF9GSVJTVExBUkdGRkVUQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBWU0JfVE9QX0ZJUlNUTEFSR0ZGRVRBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfRklSU1RMQVJHRkZFVEFQQUREUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDVDCisjZGVmaW5lIFZTQl9UT1BfRklSU1RMQVJHRkZFVEFQQUREUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgVlNCX1RPUF9GSVJTVExBUkdGRkVUQVBBRERSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBWU0JfVE9QX0ZJUlNUTEFSR0ZGRVRBUEFERFJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfU0VDT05ETEFSR0ZGRVRBUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDVECisjZGVmaW5lIFZTQl9UT1BfU0VDT05ETEFSR0ZGRVRBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgVlNCX1RPUF9TRUNPTkRMQVJHRkZFVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBWU0JfVE9QX1NFQ09ORExBUkdGRkVUQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfU0VDT05ETEFSR0ZGRVRBUEFERFJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDVFCisjZGVmaW5lIFZTQl9UT1BfU0VDT05ETEFSR0ZGRVRBUEFERFJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgVlNCX1RPUF9TRUNPTkRMQVJHRkZFVEFQQUREUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBWU0JfVE9QX1NFQ09ORExBUkdGRkVUQVBBRERSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfRklSU1RMQVJHREZFVEFQX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDVGCisjZGVmaW5lIFZTQl9UT1BfRklSU1RMQVJHREZFVEFQX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgVlNCX1RPUF9GSVJTVExBUkdERkVUQVBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBWU0JfVE9QX0ZJUlNUTEFSR0RGRVRBUF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfRklSU1RMQVJHREZFVEFQQUREUl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDYwCisjZGVmaW5lIFZTQl9UT1BfRklSU1RMQVJHREZFVEFQQUREUl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgVlNCX1RPUF9GSVJTVExBUkdERkVUQVBBRERSX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBWU0JfVE9QX0ZJUlNUTEFSR0RGRVRBUEFERFJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfU0VDT05ETEFSR0RGRVRBUF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDYxCisjZGVmaW5lIFZTQl9UT1BfU0VDT05ETEFSR0RGRVRBUF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgVlNCX1RPUF9TRUNPTkRMQVJHREZFVEFQX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBWU0JfVE9QX1NFQ09ORExBUkdERkVUQVBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfU0VDT05ETEFSR0RGRVRBUEFERFJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDYyCisjZGVmaW5lIFZTQl9UT1BfU0VDT05ETEFSR0RGRVRBUEFERFJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEKKyNkZWZpbmUgVlNCX1RPUF9TRUNPTkRMQVJHREZFVEFQQUREUl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRgorI2RlZmluZSBWU0JfVE9QX1NFQ09ORExBUkdERkVUQVBBRERSX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfUEFSQU9XREJVU19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDYzCisjZGVmaW5lIFZTQl9UT1BfUEFSQU9XREJVU19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIKKyNkZWZpbmUgVlNCX1RPUF9QQVJBT1dEQlVTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRgorI2RlZmluZSBWU0JfVE9QX1BBUkFPV0RCVVNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBWU0JfVE9QX1BBUkFPV0NUUkxfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA2NAorI2RlZmluZSBWU0JfVE9QX1BBUkFPV0NUUkxfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1RPUF9QQVJBT1dDVFJMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9UT1BfUEFSQU9XQ1RSTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1BBUkFPV0NUUkxfUEFSQU9XQUJVU19fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1RPUF9QQVJBT1dDVFJMX1BBUkFPV0FCVVNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSAgIFZTQl9UT1BfUEFSQU9XQ1RSTF9QQVJBT1dBQlVTX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4M0YKKyNkZWZpbmUgICBWU0JfVE9QX1BBUkFPV0NUUkxfUEFSQU9XQUJVU19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfUEFSQU9XQ1RSTF9QQVJBT1dFTl9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgICBWU0JfVE9QX1BBUkFPV0NUUkxfUEFSQU9XRU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9QQVJBT1dDVFJMX1BBUkFPV0VOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MAorI2RlZmluZSAgIFZTQl9UT1BfUEFSQU9XQ1RSTF9QQVJBT1dFTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfQ1VSUkVOVFNFR0xPQ0FUX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDY1CisjZGVmaW5lIFZTQl9UT1BfQ1VSUkVOVFNFR0xPQ0FUX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgVlNCX1RPUF9DVVJSRU5UU0VHTE9DQVRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDNGRgorI2RlZmluZSBWU0JfVE9QX0NVUlJFTlRTRUdMT0NBVF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfTUVBU1VSRU1FTlRfUEVSSU9EX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDY2CisjZGVmaW5lIFZTQl9UT1BfTUVBU1VSRU1FTlRfUEVSSU9EX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgVlNCX1RPUF9NRUFTVVJFTUVOVF9QRVJJT0RfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgVlNCX1RPUF9NRUFTVVJFTUVOVF9QRVJJT0RfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX05SX1NZTV9FUlJTX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA2NworI2RlZmluZSBWU0JfVE9QX05SX1NZTV9FUlJTX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFZTQl9UT1BfTlJfU1lNX0VSUlNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFZTQl9UT1BfTlJfU1lNX0VSUlNfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisKKyNkZWZpbmUgVlNCX1RPUF9FUlJfRU5FUkdZX0xfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNjgKKyNkZWZpbmUgVlNCX1RPUF9FUlJfRU5FUkdZX0xfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBWU0JfVE9QX0VSUl9FTkVSR1lfTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBWU0JfVE9QX0VSUl9FTkVSR1lfTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorCisjZGVmaW5lIFZTQl9UT1BfRVJSX0VORVJHWV9IX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDY5CisjZGVmaW5lIFZTQl9UT1BfRVJSX0VORVJHWV9IX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgVlNCX1RPUF9FUlJfRU5FUkdZX0hfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgVlNCX1RPUF9FUlJfRU5FUkdZX0hfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKworI2RlZmluZSBWU0JfVE9QX1NMSUNFUl9TRUxfOExFVl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA2QQorI2RlZmluZSBWU0JfVE9QX1NMSUNFUl9TRUxfOExFVl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVlNCX1RPUF9TTElDRVJfU0VMXzhMRVZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgVlNCX1RPUF9TTElDRVJfU0VMXzhMRVZfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKworI2RlZmluZSBWU0JfVE9QX0JORklFTERfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA2QgorI2RlZmluZSBWU0JfVE9QX0JORklFTERfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgVlNCX1RPUF9CTkZJRUxEX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcKKyNkZWZpbmUgVlNCX1RPUF9CTkZJRUxEX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDMKKworI2RlZmluZSBWU0JfVE9QX0NMUExBU1ROVU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA2QworI2RlZmluZSBWU0JfVE9QX0NMUExBU1ROVU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgVlNCX1RPUF9DTFBMQVNUTlVNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGCisjZGVmaW5lIFZTQl9UT1BfQ0xQTEFTVE5VTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9CTlNRRVJSX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNkQKKyNkZWZpbmUgVlNCX1RPUF9CTlNRRVJSX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBWU0JfVE9QX0JOU1FFUlJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBWU0JfVE9QX0JOU1FFUlJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUFECisKKyNkZWZpbmUgVlNCX1RPUF9CTlRIUkVTSF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNkUKKyNkZWZpbmUgVlNCX1RPUF9CTlRIUkVTSF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIFZTQl9UT1BfQk5USFJFU0hfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxRkYKKyNkZWZpbmUgVlNCX1RPUF9CTlRIUkVTSF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEyMAorCisjZGVmaW5lIFZTQl9UT1BfQk5DTFBOVU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDZGCisjZGVmaW5lIFZTQl9UT1BfQk5DTFBOVU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgVlNCX1RPUF9CTkNMUE5VTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgVlNCX1RPUF9CTkNMUE5VTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNzAKKyNkZWZpbmUgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX0RGT1JDRVBPTEFSSVRZX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9ERk9SQ0VQT0xBUklUWV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfREZPUkNFUE9MQVJJVFlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAweDEKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfREZPUkNFUE9MQVJJVFlfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9ERk9SQ0VQTExfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfREZPUkNFUExMX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX0RGT1JDRVBMTF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyCisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX0RGT1JDRVBMTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfUEZPUkNFUE9MQVJJVFlfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX1BGT1JDRVBPTEFSSVRZX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9QRk9SQ0VQT0xBUklUWV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9QRk9SQ0VQT0xBUklUWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX1BGT1JDRVBMTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9QRk9SQ0VQTExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfUEZPUkNFUExMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDgKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfUEZPUkNFUExMX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9DRk9SQ0VQT0xBUklUWV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfQ0ZPUkNFUE9MQVJJVFlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX0NGT1JDRVBPTEFSSVRZX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9DRk9SQ0VQT0xBUklUWV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX0NGT1JDRVBMTF9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9DRk9SQ0VQTExfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfQ0ZPUkNFUExMX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwCisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX0NGT1JDRVBMTF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfSVFTV0lUQ0hfX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2CisjZGVmaW5lICAgVlNCX1RPUF9QSEFTRUxPQ0tDVFJMX0lRU1dJVENIX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSAgIFZTQl9UT1BfUEhBU0VMT0NLQ1RSTF9JUVNXSVRDSF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgICBWU0JfVE9QX1BIQVNFTE9DS0NUUkxfSVFTV0lUQ0hfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0RMT0NLQUNDVU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA3MQorI2RlZmluZSBWU0JfVE9QX0RMT0NLQUNDVU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFZTQl9UT1BfRExPQ0tBQ0NVTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGCisjZGVmaW5lIFZTQl9UT1BfRExPQ0tBQ0NVTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RPUF9QTE9DS0FDQ1VNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMTAwNzIKKyNkZWZpbmUgVlNCX1RPUF9QTE9DS0FDQ1VNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBWU0JfVE9QX1BMT0NLQUNDVU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBWU0JfVE9QX1BMT0NLQUNDVU1fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9UT1BfQ0xPQ0tBQ0NVTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzEwMDczCisjZGVmaW5lIFZTQl9UT1BfQ0xPQ0tBQ0NVTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgVlNCX1RPUF9DTE9DS0FDQ1VNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgVlNCX1RPUF9DTE9DS0FDQ1VNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0RDUk1WQUNVTUlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA3NAorI2RlZmluZSBWU0JfVE9QX0RDUk1WQUNVTUlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFZTQl9UT1BfRENSTVZBQ1VNSV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgVlNCX1RPUF9EQ1JNVkFDVU1JX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfVE9QX0RDUk1WQUNVTVFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMxMDA3NQorI2RlZmluZSBWU0JfVE9QX0RDUk1WQUNVTVFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIFZTQl9UT1BfRENSTVZBQ1VNUV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgzRkYKKyNkZWZpbmUgVlNCX1RPUF9EQ1JNVkFDVU1RX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwMAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU8xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwMQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU8yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU8zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwMworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU80X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwNAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU81X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU82X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwNgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU83X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwNworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU84X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwOAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU85X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwOQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU8xMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzExX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwQQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU8xMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzEyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwQgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVRSQUlOTEtSQVRJTzEyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFVFJBSU5MS1JBVElPMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVUUkFJTkxLUkFUSU8xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU8xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwQworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMVRSQUlOTEtSQVRJTzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExVFJBSU5MS1JBVElPMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU8yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwRAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU8yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMVRSQUlOTEtSQVRJTzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExVFJBSU5MS1JBVElPMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU8zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwRQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU8zX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMVRSQUlOTEtSQVRJTzNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExVFJBSU5MS1JBVElPM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU80X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAwRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU80X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMVRSQUlOTEtSQVRJTzRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExVFJBSU5MS1JBVElPNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU81X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxMAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU81X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMVRSQUlOTEtSQVRJTzVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExVFJBSU5MS1JBVElPNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU82X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxMQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU82X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMVRSQUlOTEtSQVRJTzZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExVFJBSU5MS1JBVElPNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU83X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU83X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMVRSQUlOTEtSQVRJTzdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExVFJBSU5MS1JBVElPN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU84X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxMworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFUUkFJTkxLUkFUSU84X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMVRSQUlOTEtSQVRJTzhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExVFJBSU5MS1JBVElPOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2R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0wX0ZGRVJDQTFEQVRBTEtSQVRJTzJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxOQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU8yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxQQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU8zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxQgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU80X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxQworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU81X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxRAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU82X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxRQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU83X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAxRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU84X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyMAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU85X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyMQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU8xMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzExX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU8xMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzEyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyMworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTFEQVRBTEtSQVRJTzEyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMURBVEFMS1JBVElPMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0ExREFUQUxLUkFUSU8xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU8xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyNAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU8yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU8yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU8zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyNgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU8zX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU80X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyNworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU80X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU81X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyOAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU81X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU82X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyOQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU82X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU83X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyQQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU83X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU84X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyQgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU84X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU85X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyQworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU85X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMlRSQUlOTEtSQVRJTzlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyVFJBSU5MS1JBVElPOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU8xMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAyRAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJUUkFJTkxLUkFUSU8xMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5l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RkZFUkNBMkRBVEFMS1JBVElPM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU8zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzMworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU80X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzNAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU81X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU82X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzNgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU83X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzNworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU84X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzOAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU85X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzOQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU8xMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzExX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzQQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU8xMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzEyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzQgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRVJDQTJEQVRBTEtSQVRJTzEyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFUkNBMkRBVEFMS1JBVElPMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVSQ0EyREFUQUxLUkFUSU8xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzQworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzRAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzRQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8zX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU80X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDAzRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU80X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU81X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0MAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU81X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU82X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0MQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU82X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU83X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0MgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU83X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU84X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0MworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU84X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU85X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0NAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU85X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8xMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0NQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8xMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzEwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8xMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0NgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8xMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzExX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPMTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8xMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0NworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFUUkFJTkxLUkFUSU8xMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMVRSQUlOTEtSQVRJTzEyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xVFJBSU5MS1JBVElPMTJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0OAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU8xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0OQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU8yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0QQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU8zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0QgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU80X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0QworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU81X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0RAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU82X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0RQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU83X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA0RgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU84X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1MAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU85X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1MQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU8xMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzExX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1MgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU8xMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzEyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1MworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTFEQVRBTEtSQVRJTzEyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMURBVEFMS1JBVElPMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0xREFUQUxLUkFUSU8xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8xX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1NAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8xX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1NQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8zX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1NgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8zX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPM19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU80X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1NworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU80X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzRfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPNF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU81X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1OAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU81X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPNV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU82X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1OQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU82X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPNl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU83X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1QQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU83X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzdfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPN19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU84X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1QgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU84X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPOF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU85X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1QworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU85X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPOV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8xMF9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1RAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8xMF9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzEwX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8xMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1RQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8xMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzExX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPMTFfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8xMl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA1RgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJUUkFJTkxLUkFUSU8xMl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMlRSQUlOTEtSQVRJTzEyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yVFJBSU5MS1JBVElPMTJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2MAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU8xX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2MQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU8yX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzNfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2MgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzNfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPM19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU8zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2MworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPNF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU80X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzVfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2NAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzVfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPNV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU81X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzZfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2NQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzZfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPNl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU82X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2NgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPN19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU83X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzhfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2NworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzhfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU84X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzlfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2OAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzlfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPOV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU85X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2OQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU8xMF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzExX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2QQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzExX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU8xMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzEyX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2QgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZGRURETTJEQVRBTEtSQVRJTzEyX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRkZFRERNMkRBVEFMS1JBVElPMTJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GRkVERE0yREFUQUxLUkFUSU8xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2QworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU4xX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU4yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMjAwNkQKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU4yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzIwMDZFCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjNfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU4zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA2RgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU40X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlONF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU41X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMjAwNzAKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU41X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlONV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlONl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzIwMDcxCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlONl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjZfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU42X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA3MgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU43X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlON19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU44X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMjAwNzMKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU44X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOOF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzIwMDc0CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjlfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU45X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA3NQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU4xMF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU4xMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMjAwNzYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU4xMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOMTFfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjExX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOMTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzIwMDc3CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSVFJBSU5HQUlOMTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlRSQUlOR0FJTjEyX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJUUkFJTkdBSU4xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMjAwNzgKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlOMV9fTSAgICAgICAgICAgICAgICAgICAgICAgIC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BSRSAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlONF9GSVJSQ0ExREFUQUdBSU40X19CICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjRfRklSUkNBMURBVEFHQUlONF9fVyAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU40X0ZJUlJDQTFEQVRBR0FJTjRfX00gICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU40X0ZJUlJDQTFEQVRBR0FJTjRfX1BSRSAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU41X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzIwMDdDCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU41X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU41X0ZJUlJDQTFUUkFJTkdBSU41X19CICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlONV9GSVJSQ0ExVFJBSU5HQUlONV9fVyAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjVfRklSUkNBMVRSQUlOR0FJTjVfX00gICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU41X0ZJUlJDQTFUUkFJTkdBSU41X19QUkUgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjVfRklSUkNBMURBVEFHQUlONV9fQiAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU41X0ZJUlJDQTFEQVRBR0FJTjVfX1cgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlONV9GSVJSQ0ExREFUQUdBSU41X19NICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlONV9GSVJSQ0ExREFUQUdBSU41X19QUkUgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlONl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMyMDA3RAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlONl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU42X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU42X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQU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ICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlON19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjdfRklSUkNBMVRSQUlOR0FJTjdfX0IgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU43X0ZJUlJDQTFUUkFJTkdBSU43X19XICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlON19GSVJSQ0ExVFJBSU5HQUlON19fTSAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjdfRklSUkNBMVRSQUlOR0FJTjdfX1BSRSAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0wX0ZJUlJDQTFHQUlON19GSVJSQ0ExREFUQUdBSU43X19CICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMF9GSVJSQ0ExR0FJTjdfRklSUkNBMURBVEFHQUlON19fVyAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU43X0ZJUlJDQTFEQVRBR0FJTjdfX00gICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU43X0ZJUlJDQTFEQVRBR0FJTjdfX1BSRSAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTBfRklSUkNBMUdBSU44X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzIwMDdGCisjZGVmaW5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JSQ0EyR0FJTjRfRklSUkNBMlRSQUlOR0FJTjRfX1BSRSAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUlJDQTJHQUlONF9GSVJSQ0EyREFUQUdBSU40X19CICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJSQ0EyR0FJTjRfRklSUkNBMkRBVEFHQUlONF9fVyAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU40X0ZJUlJDQTJEQVRBR0FJTjRfX00gICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU40X0ZJUlJDQTJEQVRBR0FJTjRfX1BSRSAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU41X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDA4CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU41X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJSQ0EyR0FJTjVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJSQ0EyR0FJTjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU41X0ZJUlJDQTJUUkFJTkdBSU41X19CICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUlJDQTJHQUlONV9GSVJSQ0EyVFJBSU5HQUlONV9fVyAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJSQ0EyR0FJTjVfRklSUkNBMlRSQUlOR0FJTjVfX00gICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU41X0ZJUlJDQTJUUkFJTkdBSU41X19QUkUgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJSQ0EyR0FJTjVfRklSUkNBMkRBVEFHQUlONV9fQiAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU41X0ZJUlJDQTJEQVRBR0FJTjVfX1cgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUlJDQTJHQUlONV9GSVJSQ0EyREFUQUdBSU41X19NICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUlJDQTJHQUlONV9GSVJSQ0EyREFUQUdBSU41X19QUkUgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUlJDQTJHQUlONl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAwOQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUlJDQTJHQUlONl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU42X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSUkNBMkdBSU42X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpb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RklSRERNMUdBSU4yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDExCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4yX0ZJUkRETTFUUkFJTkdBSU4yX19CICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMl9GSVJERE0xVFJBSU5HQUlOMl9fVyAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjJfRklSRERNMVRSQUlOR0FJTjJfX00gICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4yX0ZJUkRETTFUUkFJTkdBSU4yX19QUkUgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjJfRklSRERNMURBVEFHQUlOMl9fQiAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4yX0ZJUkRETTFEQVRBR0FJTjJfX1cgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMl9GSVJERE0xREFUQUdBSU4yX19NICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMl9GSVJERE0xREFUQUdBSU4yX19QUkUgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4zX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOM19GSVJERE0xVFJBSU5HQUlOM19fQiAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjNfRklSRERNMVRSQUlOR0FJTjNfX1cgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4zX0ZJUkRETTFUUkFJTkdBSU4zX19NICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOM19GSVJERE0xVFJBSU5HQUlOM19fUFJFICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4zX0ZJUkRETTFEQVRBR0FJTjNfX0IgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOM19GSVJERE0xREFUQUdBSU4zX19XICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjNfRklSRERNMURBVEFHQUlOM19fTSAgICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjNfRklSRERNMURBVEFHQUlOM19fUFJFICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMTMKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjRfRklSRERNMVRSQUlOR0FJTjRfX0IgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU40X0ZJUkRETTFUUkFJTkdBSU40X19XICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONF9GSVJERE0xVFJBSU5HQUlONF9fTSAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjRfRklSRERNMVRSQUlOR0FJTjRfX1BSRSAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONF9GSVJERE0xREFUQUdBSU40X19CICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjRfRklSRERNMURBVEFHQUlONF9fVyAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU40X0ZJUkRETTFEQVRBR0FJTjRfX00gICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU40X0ZJUkRETTFEQVRBR0FJTjRfX1BSRSAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU41X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDE0CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU41X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU41X0ZJUkRETTFUUkFJTkdBSU41X19CICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONV9GSVJERE0xVFJBSU5HQUlONV9fVyAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjVfRklSRERNMVRSQUlOR0FJTjVfX00gICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU41X0ZJUkRETTFUUkFJTkdBSU41X19QUkUgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjVfRklSRERNMURBVEFHQUlONV9fQiAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU41X0ZJUkRETTFEQVRBR0FJTjVfX1cgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONV9GSVJERE0xREFUQUdBSU41X19NICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONV9GSVJERE0xREFUQUdBSU41X19QUkUgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAxNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU42X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU42X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONl9GSVJERE0xVFJBSU5HQUlONl9fQiAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjZfRklSRERNMVRSQUlOR0FJTjZfX1cgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU42X0ZJUkRETTFUUkFJTkdBSU42X19NICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONl9GSVJERE0xVFJBSU5HQUlONl9fUFJFICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU42X0ZJUkRETTFEQVRBR0FJTjZfX0IgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlONl9GSVJERE0xREFUQUdBSU42X19XICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjZfRklSRERNMURBVEFHQUlONl9fTSAgICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjZfRklSRERNMURBVEFHQUlONl9fUFJFICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMTYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlON19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlON19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjdfRklSRERNMVRSQUlOR0FJTjdfX0IgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU43X0ZJUkRETTFUUkFJTkdBSU43X19XICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlON19GSVJERE0xVFJBSU5HQUlON19fTSAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjdfRklSRERNMVRSQUlOR0FJTjdfX1BSRSAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlON19GSVJERE0xREFUQUdBSU43X19CICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjdfRklSRERNMURBVEFHQUlON19fVyAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU43X0ZJUkRETTFEQVRBR0FJTjdfX00gICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU43X0ZJUkRETTFEQVRBR0FJTjdfX1BSRSAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU44X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDE3CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU44X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU44X0ZJUkRETTFUUkFJTkdBSU44X19CICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOOF9GSVJERE0xVFJBSU5HQUlOOF9fVyAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjhfRklSRERNMVRSQUlOR0FJTjhfX00gICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU44X0ZJUkRETTFUUkFJTkdBSU44X19QUkUgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjhfRklSRERNMURBVEFHQUlOOF9fQiAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU44X0ZJUkRETTFEQVRBR0FJTjhfX1cgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOOF9GSVJERE0xREFUQUdBSU44X19NICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOOF9GSVJERE0xREFUQUdBSU44X19QUkUgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAxOAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU45X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU45X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOOV9GSVJERE0xVFJBSU5HQUlOOV9fQiAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjlfRklSRERNMVRSQUlOR0FJTjlfX1cgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU45X0ZJUkRETTFUUkFJTkdBSU45X19NICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOOV9GSVJERE0xVFJBSU5HQUlOOV9fUFJFICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU45X0ZJUkRETTFEQVRBR0FJTjlfX0IgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOOV9GSVJERE0xREFUQUdBSU45X19XICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjlfRklSRERNMURBVEFHQUlOOV9fTSAgICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjlfRklSRERNMURBVEFHQUlOOV9fUFJFICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMTkKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTBfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTBfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjEwX0ZJUkRETTFUUkFJTkdBSU4xMF9fQiAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMF9GSVJERE0xVFJBSU5HQUlOMTBfX1cgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTBfRklSRERNMVRSQUlOR0FJTjEwX19NICAgICAgICAgICAgICAweDdGCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjEwX0ZJUkRETTFUUkFJTkdBSU4xMF9fUFJFICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTBfRklSRERNMURBVEFHQUlOMTBfX0IgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjEwX0ZJUkRETTFEQVRBR0FJTjEwX19XICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMF9GSVJERE0xREFUQUdBSU4xMF9fTSAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMF9GSVJERE0xREFUQUdBSU4xMF9fUFJFICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDFBCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjExX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjExX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMV9GSVJERE0xVFJBSU5HQUlOMTFfX0IgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTFfRklSRERNMVRSQUlOR0FJTjExX19XICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjExX0ZJUkRETTFUUkFJTkdBSU4xMV9fTSAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMV9GSVJERE0xVFJBSU5HQUlOMTFfX1BSRSAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjExX0ZJUkRETTFEQVRBR0FJTjExX19CICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMV9GSVJERE0xREFUQUdBSU4xMV9fVyAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTFfRklSRERNMURBVEFHQUlOMTFfX00gICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTFfRklSRERNMURBVEFHQUlOMTFfX1BSRSAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAxQgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTJfRklSRERNMVRSQUlOR0FJTjEyX19CICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjEyX0ZJUkRETTFUUkFJTkdBSU4xMl9fVyAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMl9GSVJERE0xVFJBSU5HQUlOMTJfX00gICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTJfRklSRERNMVRSQUlOR0FJTjEyX19QUkUgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMUdBSU4xMl9GSVJERE0xREFUQUdBSU4xMl9fQiAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTFHQUlOMTJfRklSRERNMURBVEFHQUlOMTJfX1cgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjEyX0ZJUkRETTFEQVRBR0FJTjEyX19NICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0xR0FJTjEyX0ZJUkRETTFEQVRBR0FJTjEyX19QUkUgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjFfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMUMKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjFfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjFfRklSRERNMlRSQUlOR0FJTjFfX0IgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xX0ZJUkRETTJUUkFJTkdBSU4xX19XICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMV9GSVJERE0yVFJBSU5HQUlOMV9fTSAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjFfRklSRERNMlRSQUlOR0FJTjFfX1BSRSAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMV9GSVJERE0yREFUQUdBSU4xX19CICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjFfRklSRERNMkRBVEFHQUlOMV9fVyAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xX0ZJUkRETTJEQVRBR0FJTjFfX00gICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xX0ZJUkRETTJEQVRBR0FJTjFfX1BSRSAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4yX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDFECisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4yX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjJfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjJfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4yX0ZJUkRETTJUUkFJTkdBSU4yX19CICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMl9GSVJERE0yVFJBSU5HQUlOMl9fVyAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjJfRklSRERNMlRSQUlOR0FJTjJfX00gICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4yX0ZJUkRETTJUUkFJTkdBSU4yX19QUkUgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjJfRklSRERNMkRBVEFHQUlOMl9fQiAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4yX0ZJUkRETTJEQVRBR0FJTjJfX1cgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMl9GSVJERE0yREFUQUdBSU4yX19NICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMl9GSVJERE0yREFUQUdBSU4yX19QUkUgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOM19fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAxRQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOM19fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4zX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4zX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOM19GSVJERE0yVFJBSU5HQUlOM19fQiAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjNfRklSRERNMlRSQUlOR0FJTjNfX1cgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4zX0ZJUkRETTJUUkFJTkdBSU4zX19NICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOM19GSVJERE0yVFJBSU5HQUlOM19fUFJFICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4zX0ZJUkRETTJEQVRBR0FJTjNfX0IgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOM19GSVJERE0yREFUQUdBSU4zX19XICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjNfRklSRERNMkRBVEFHQUlOM19fTSAgICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjNfRklSRERNMkRBVEFHQUlOM19fUFJFICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjRfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMUYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjRfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONF9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONF9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjRfRklSRERNMlRSQUlOR0FJTjRfX0IgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU40X0ZJUkRETTJUUkFJTkdBSU40X19XICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONF9GSVJERE0yVFJBSU5HQUlONF9fTSAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjRfRklSRERNMlRSQUlOR0FJTjRfX1BSRSAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONF9GSVJERE0yREFUQUdBSU40X19CICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjRfRklSRERNMkRBVEFHQUlONF9fVyAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU40X0ZJUkRETTJEQVRBR0FJTjRfX00gICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU40X0ZJUkRETTJEQVRBR0FJTjRfX1BSRSAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU41X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDIwCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU41X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjVfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjVfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU41X0ZJUkRETTJUUkFJTkdBSU41X19CICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONV9GSVJERE0yVFJBSU5HQUlONV9fVyAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjVfRklSRERNMlRSQUlOR0FJTjVfX00gICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU41X0ZJUkRETTJUUkFJTkdBSU41X19QUkUgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjVfRklSRERNMkRBVEFHQUlONV9fQiAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU41X0ZJUkRETTJEQVRBR0FJTjVfX1cgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONV9GSVJERE0yREFUQUdBSU41X19NICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONV9GSVJERE0yREFUQUdBSU41X19QUkUgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONl9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAyMQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONl9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU42X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU42X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONl9GSVJERE0yVFJBSU5HQUlONl9fQiAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjZfRklSRERNMlRSQUlOR0FJTjZfX1cgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU42X0ZJUkRETTJUUkFJTkdBSU42X19NICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONl9GSVJERE0yVFJBSU5HQUlONl9fUFJFICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU42X0ZJUkRETTJEQVRBR0FJTjZfX0IgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlONl9GSVJERE0yREFUQUdBSU42X19XICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjZfRklSRERNMkRBVEFHQUlONl9fTSAgICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjZfRklSRERNMkRBVEFHQUlONl9fUFJFICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjdfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMjIKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjdfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlON19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4N0ZGRgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlON19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjdfRklSRERNMlRSQUlOR0FJTjdfX0IgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU43X0ZJUkRETTJUUkFJTkdBSU43X19XICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlON19GSVJERE0yVFJBSU5HQUlON19fTSAgICAgICAgICAgICAgICAweDdGCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjdfRklSRERNMlRSQUlOR0FJTjdfX1BSRSAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlON19GSVJERE0yREFUQUdBSU43X19CICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjdfRklSRERNMkRBVEFHQUlON19fVyAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU43X0ZJUkRETTJEQVRBR0FJTjdfX00gICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU43X0ZJUkRETTJEQVRBR0FJTjdfX1BSRSAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU44X19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDIzCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU44X19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjhfX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjhfX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU44X0ZJUkRETTJUUkFJTkdBSU44X19CICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOOF9GSVJERE0yVFJBSU5HQUlOOF9fVyAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjhfRklSRERNMlRSQUlOR0FJTjhfX00gICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU44X0ZJUkRETTJUUkFJTkdBSU44X19QUkUgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjhfRklSRERNMkRBVEFHQUlOOF9fQiAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU44X0ZJUkRETTJEQVRBR0FJTjhfX1cgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOOF9GSVJERE0yREFUQUdBSU44X19NICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOOF9GSVJERE0yREFUQUdBSU44X19QUkUgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOOV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAyNAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOOV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU45X19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU45X19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOOV9GSVJERE0yVFJBSU5HQUlOOV9fQiAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjlfRklSRERNMlRSQUlOR0FJTjlfX1cgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU45X0ZJUkRETTJUUkFJTkdBSU45X19NICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOOV9GSVJERE0yVFJBSU5HQUlOOV9fUFJFICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU45X0ZJUkRETTJEQVRBR0FJTjlfX0IgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOOV9GSVJERE0yREFUQUdBSU45X19XICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjlfRklSRERNMkRBVEFHQUlOOV9fTSAgICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjlfRklSRERNMkRBVEFHQUlOOV9fUFJFICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjEwX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMjUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjEwX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNQorI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RklSRERNMkdBSU4xMV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDI2CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xMV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjExX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjExX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xMV9GSVJERE0yVFJBSU5HQUlOMTFfX0IgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMTFfRklSRERNMlRSQUlOR0FJTjExX19XICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjExX0ZJUkRETTJUUkFJTkdBSU4xMV9fTSAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xMV9GSVJERE0yVFJBSU5HQUlOMTFfX1BSRSAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjExX0ZJUkRETTJEQVRBR0FJTjExX19CICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xMV9GSVJERE0yREFUQUdBSU4xMV9fVyAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMTFfRklSRERNMkRBVEFHQUlOMTFfX00gICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMTFfRklSRERNMkRBVEFHQUlOMTFfX1BSRSAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMTJfX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAyNworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMTJfX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xMl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xMl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMTJfRklSRERNMlRSQUlOR0FJTjEyX19CICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjEyX0ZJUkRETTJUUkFJTkdBSU4xMl9fVyAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xMl9GSVJERE0yVFJBSU5HQUlOMTJfX00gICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMTJfRklSRERNMlRSQUlOR0FJTjEyX19QUkUgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfRklSRERNMkdBSU4xMl9GSVJERE0yREFUQUdBSU4xMl9fQiAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0ZJUkRETTJHQUlOMTJfRklSRERNMkRBVEFHQUlOMTJfX1cgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjEyX0ZJUkRETTJEQVRBR0FJTjEyX19NICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9GSVJERE0yR0FJTjEyX0ZJUkRETTJEQVRBR0FJTjEyX19QUkUgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVUUkFJTkxLUkFUSU9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMjgKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVUUkFJTkxLUkFUSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRVRSQUlOTEtSQVRJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFVFJBSU5MS1JBVElPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0ExVFJBSU5MS1JBVElPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMjkKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0ExVFJBSU5MS1JBVElPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTFUUkFJTkxLUkFUSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMVRSQUlOTEtSQVRJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0ExREFUQUxLUkFUSU9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMkEKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0ExREFUQUxLUkFUSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTFEQVRBTEtSQVRJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMURBVEFMS1JBVElPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0EyVFJBSU5MS1JBVElPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMkIKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0EyVFJBSU5MS1JBVElPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTJUUkFJTkxLUkFUSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMlRSQUlOTEtSQVRJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0EyREFUQUxLUkFUSU9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMkMKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0EyREFUQUxLUkFUSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTJEQVRBTEtSQVRJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMkRBVEFMS1JBVElPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0xVFJBSU5MS1JBVElPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMkQKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0xVFJBSU5MS1JBVElPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTFUUkFJTkxLUkFUSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMVRSQUlOTEtSQVRJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0xREFUQUxLUkFUSU9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMkUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0xREFUQUxLUkFUSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTFEQVRBTEtSQVRJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMURBVEFMS1JBVElPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0yVFJBSU5MS1JBVElPX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0yVFJBSU5MS1JBVElPX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTJUUkFJTkxLUkFUSU9fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMlRSQUlOTEtSQVRJT19fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0yREFUQUxLUkFUSU9fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMzAKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0yREFUQUxLUkFUSU9fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTJEQVRBTEtSQVRJT19fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMkRBVEFMS1JBVElPX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVUUkFJTkdBSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDMzAwMzEKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVUUkFJTkdBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFVFJBSU5HQUlOX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRVRSQUlOR0FJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTFHQUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAzMgorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTFHQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMUdBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMUdBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTFHQUlOX0RGRVJDQTFUUkFJTkdBSU5fX0IgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0ExR0FJTl9ERkVSQ0ExVFJBSU5HQUlOX19XICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMUdBSU5fREZFUkNBMVRSQUlOR0FJTl9fTSAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTFHQUlOX0RGRVJDQTFUUkFJTkdBSU5fX1BSRSAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMUdBSU5fREZFUkNBMURBVEFHQUlOX19CICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1R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ERkVSQ0EyVFJBSU5HQUlOX19QUkUgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRVJDQTJHQUlOX0RGRVJDQTJEQVRBR0FJTl9fQiAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9ERkVSQ0EyR0FJTl9ERkVSQ0EyREFUQUdBSU5fX1cgICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMkdBSU5fREZFUkNBMkRBVEFHQUlOX19NICAgICAgICAgICAgICAgICAgIDB4N0YwMAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFUkNBMkdBSU5fREZFUkNBMkRBVEFHQUlOX19QUkUgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMUdBSU5fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzMwMDM0CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMUdBSU5fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0xR0FJTl9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDdGRkYKKyNkZWZpbmUgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0xR0FJTl9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMUdBSU5fREZFRERNMVRSQUlOR0FJTl9fQiAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTFHQUlOX0RGRURETTFUUkFJTkdBSU5fX1cgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0xR0FJTl9ERkVERE0xVFJBSU5HQUlOX19NICAgICAgICAgICAgICAgICAgMHg3RgorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMUdBSU5fREZFRERNMVRSQUlOR0FJTl9fUFJFICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0xR0FJTl9ERkVERE0xREFUQUdBSU5fX0IgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMUdBSU5fREZFRERNMURBVEFHQUlOX19XICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTFHQUlOX0RGRURETTFEQVRBR0FJTl9fTSAgICAgICAgICAgICAgICAgICAweDdGMDAKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTFHQUlOX0RGRURETTFEQVRBR0FJTl9fUFJFICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTJHQUlOX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUMzMDAzNQorI2RlZmluZSBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTJHQUlOX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMkdBSU5fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3RkZGCisjZGVmaW5lIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMkdBSU5fX1BSRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTJHQUlOX0RGRURETTJUUkFJTkdBSU5fX0IgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0yR0FJTl9ERkVERE0yVFJBSU5HQUlOX19XICAgICAgICAgICAgICAgICAgNworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMkdBSU5fREZFRERNMlRSQUlOR0FJTl9fTSAgICAgICAgICAgICAgICAgIDB4N0YKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTJHQUlOX0RGRURETTJUUkFJTkdBSU5fX1BSRSAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSAgIFZTQl9TWVNDVFJMX1JBTTFfREZFRERNMkdBSU5fREZFRERNMkRBVEFHQUlOX19CICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgICBWU0JfU1lTQ1RSTF9SQU0xX0RGRURETTJHQUlOX0RGRURETTJEQVRBR0FJTl9fVyAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0yR0FJTl9ERkVERE0yREFUQUdBSU5fX00gICAgICAgICAgICAgICAgICAgMHg3RjAwCisjZGVmaW5lICAgVlNCX1NZU0NUUkxfUkFNMV9ERkVERE0yR0FJTl9ERkVERE0yREFUQUdBSU5fX1BSRSAgICAgICAgICAgICAgICAgMHgwCisKKyNkZWZpbmUgVlNCX1RDTUVRX1JBTV9fQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFDNDAwMDAKKworI2RlZmluZSAgIFZTQl9UQ01FUV9SQU1fVENNRVFfUkFNX19CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgICBWU0JfVENNRVFfUkFNX1RDTUVRX1JBTV9fVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSAgIFZTQl9UQ01FUV9SQU1fVENNRVFfUkFNX19NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSAgIFZTQl9UQ01FUV9SQU1fVENNRVFfUkFNX19QUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorCisjZGVmaW5lIFZTQl9GQ1BSRV9SQU1fX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxQzUwMDAwCisKKyNkZWZpbmUgICBWU0JfRkNQUkVfUkFNX0ZDUFJFX1JBTV9fQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lICAgVlNCX0ZDUFJFX1JBTV9GQ1BSRV9SQU1fX1cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgICBWU0JfRkNQUkVfUkFNX0ZDUFJFX1JBTV9fTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEZGRkYKKyNkZWZpbmUgICBWU0JfRkNQUkVfUkFNX0ZDUFJFX1JBTV9fUFJFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAKKworI2RlZmluZSBWU0JfRVFUQVBfUkFNX19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MUM2MDAwMAorCisjZGVmaW5lICAgVlNCX0VRVEFQX1JBTV9FUVRBUF9SQU1fX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSAgIFZTQl9FUVRBUF9SQU1fRVFUQVBfUkFNX19XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lICAgVlNCX0VRVEFQX1JBTV9FUVRBUF9SQU1fX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkYKKyNkZWZpbmU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sICAgICAgICAgICAgICAgMHgxOH0sCisJe0RWQlRfVlRPUDEsICAgICAgICAgICAgICAgICAgICAweDM1fSwKKwl7RFZCVF9WVE9QMiwgICAgICAgICAgICAgICAgICAgIDB4MjF9LAorCXtEVkJUX1ZUT1AzLCAgICAgICAgICAgICAgICAgICAgMHgyMX0sCisJe0RWQlRfS1JGMSwgICAgICAgICAgICAgICAgICAgICAgMHgwfSwKKwl7RFZCVF9LUkYyLCAgICAgICAgICAgICAgICAgICAgIDB4NDB9LAorCXtEVkJUX0tSRjMsICAgICAgICAgICAgICAgICAgICAgMHgxMH0sCisJe0RWQlRfS1JGNCwgICAgICAgICAgICAgICAgICAgICAweDEwfSwKKwl7RFZCVF9JRl9BR0NfTUlOLCAgICAgICAgICAgICAgIDB4ODB9LAorCXtEVkJUX0lGX0FHQ19NQVgsICAgICAgICAgICAgICAgMHg3Zn0sCisJe0RWQlRfUkZfQUdDX01JTiwgICAgICAgICAgICAgICAweDgwfSwKKwl7RFZCVF9SRl9BR0NfTUFYLCAgICAgICAgICAgICAgIDB4N2Z9LAorCXtEVkJUX1BPTEFSX1JGX0FHQywgICAgICAgICAgICAgIDB4MH0sCisJe0RWQlRfUE9MQVJfSUZfQUdDLCAgICAgICAgICAgICAgMHgwfSwKKwl7RFZCVF9BRDdfU0VUVElORywgICAgICAgICAgICAweGU5ZjR9LAorCXtEVkJUX1NQRUNfSU5WLCAgICAgICAgICAgICAgICAgIDB4MX0sCiB9OwogCiAjZW5kaWYgLyogUlRMMjgzMl9QUklWX0ggKi8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvbWVkaWEvZHZiLWZyb250ZW5kcy9zOTIxLmMgYi9kcml2ZXJzL21lZGlhL2R2Yi1mcm9udGVuZHMvczkyMS5jCmluZGV4IGEyNzFhYzMuLjY5ODYyZTEgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvbWVkaWEvZHZiLWZyb250ZW5kcy9zOTIxLmMKKysrIGIvZHJpdmVycy9tZWRpYS9k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sICJjb3JlIik7CisJaWYgKElTX0VSUihwcml2LT5jbGspKQorCQlkZXZfd2FybigmcGRldi0+ZGV2LCAiY2Fubm90IGdldCBjb3JlIGNsb2NrIHJlc291cmNlXG4iKTsKKwkvKgorCSAqIFRoZSBkcml2ZXIgZG9lc24ndCBuZWVkIHRvIGtub3cgYWJvdXQgdGhlIHN5c3RlbSAoInN5cyIpIG9yIHBvd2VyCisJICogbW9kdWxhdGlvbiAoIm1vZCIpIGNsb2NrcyB5ZXQKKwkgKi8KKworCS8qIFNldCB1cCByYXcgJiBodyBkZWNvZGVyICovCisJZXJyb3IgPSBpbWdfaXJfcHJvYmVfcmF3KHByaXYpOworCWVycm9yMiA9IGltZ19pcl9wcm9iZV9odyhwcml2KTsKKwlpZiAoZXJyb3IgJiYgZXJyb3IyKQorCQlyZXR1cm4gKGVycm9yID09IC1FTk9ERVYpID8gZXJyb3IyIDogZXJyb3I7CisKKwkvKiBHZXQgdGhlIElSUSAqLworCXByaXYtPmlycSA9IGlycTsKKwllcnJvciA9IHJlcXVlc3RfaXJxKHByaXYtPmlycSwgaW1nX2lyX2lzciwgMCwgImltZy1pciIsIHByaXYpOworCWlmIChlcnJvcikgeworCQlkZXZfZXJyKCZwZGV2LT5kZXYsICJjYW5ub3QgcmVnaXN0ZXIgSVJRICV1XG4iLAorCQkJcHJpdi0+aXJxKTsKKwkJZXJyb3IgPSAtRUlPOworCQlnb3RvIGVycl9pcnE7CisJfQorCisJaW1nX2lyX2lkZW50KHByaXYpOworCWltZ19pcl9zZXR1cChwcml2KTsKKworCXJldHVybiAwOworCitlcnJfaXJxOgorCWltZ19pcl9yZW1vdmVfaHcocHJpdik7CisJaW1nX2lyX3JlbW92ZV9yYXcocHJpdik7CisJcmV0dXJuIGVycm9yOworfQorCitzdGF0aWMgaW50IGltZ19pcl9yZW1vdmUoc3RydWN0IHBsYXRmb3JtX2RldmljZSAqcGRldikKK3sKKwlzdHJ1Y3QgaW1nX2lyX3ByaXYgKnByaXYgPSB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Y29udHJvbCgpIC0gQ29udmVydCBjb250cm9sIHN0cnVjdCB0byBjb250cm9sIHJlZ2lzdGVyIHZhbHVlLgorICogQGNvbnRyb2w6CUNvbnRyb2wgZGF0YQorICoKKyAqIFJldHVybnM6CVRoZSBjb250cm9sIHJlZ2lzdGVyIHZhbHVlIGVxdWl2YWxlbnQgb2YgQGNvbnRyb2wuCisgKi8KK3N0YXRpYyB1MzIgaW1nX2lyX2NvbnRyb2woY29uc3Qgc3RydWN0IGltZ19pcl9jb250cm9sICpjb250cm9sKQoreworCXUzMiBjdHJsID0gY29udHJvbC0+Y29kZV90eXBlIDw8IElNR19JUl9DT0RFVFlQRV9TSElGVDsKKwlpZiAoY29udHJvbC0+ZGVjb2RlbikKKwkJY3RybCB8PSBJTUdfSVJfREVDT0RFTjsKKwlpZiAoY29udHJvbC0+aGRydG9nKQorCQljdHJsIHw9IElNR19JUl9IRFJUT0c7CisJaWYgKGNvbnRyb2wtPmxkcmRlYykKKwkJY3RybCB8PSBJTUdfSVJfTERSREVDOworCWlmIChjb250cm9sLT5kZWNvZGlucG9sKQorCQljdHJsIHw9IElNR19JUl9ERUNPRElOUE9MOworCWlmIChjb250cm9sLT5iaXRvcmllbikKKwkJY3RybCB8PSBJTUdfSVJfQklUT1JJRU47CisJaWYgKGNvbnRyb2wtPmQxdmFsaWRzZWwpCisJCWN0cmwgfD0gSU1HX0lSX0QxVkFMSURTRUw7CisJaWYgKGNvbnRyb2wtPmJpdGludikKKwkJY3RybCB8PSBJTUdfSVJfQklUSU5WOworCWlmIChjb250cm9sLT5kZWNvZGVuZDIpCisJCWN0cmwgfD0gSU1HX0lSX0RFQ09ERU5EMjsKKwlpZiAoY29udHJvbC0+Yml0b3JpZW5kMikKKwkJY3RybCB8PSBJTUdfSVJfQklUT1JJRU5EMjsKKwlpZiAoY29udHJvbC0+Yml0aW52ZDIpCisJCWN0cmwgfD0gSU1HX0lSX0JJVElOVkQyOworCXJldHVybiBjdHJsOworfQorCisvKioKKyAqI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cGF0aWJsZShwcml2LCBkZWMpKQorCQkJcHJvdG9zIHw9IGRlYy0+dHlwZTsKKwl9CisJcmV0dXJuIHByb3RvczsKK30KKworLyogQ2FsbGJhY2sgZm9yIGNoYW5naW5nIHByb3RvY29sIHVzaW5nIHN5c2ZzICovCitzdGF0aWMgaW50IGltZ19pcl9jaGFuZ2VfcHJvdG9jb2woc3RydWN0IHJjX2RldiAqZGV2LCB1NjQgKmlyX3R5cGUpCit7CisJc3RydWN0IGltZ19pcl9wcml2ICpwcml2ID0gZGV2LT5wcml2OworCXN0cnVjdCBpbWdfaXJfcHJpdl9odyAqaHcgPSAmcHJpdi0+aHc7CisJc3RydWN0IHJjX2RldiAqcmRldiA9IGh3LT5yZGV2OworCXN0cnVjdCBpbWdfaXJfZGVjb2RlciAqKmRlY3A7CisJdTY0IHdha2V1cF9wcm90b2NvbHM7CisKKwlpZiAoISppcl90eXBlKSB7CisJCS8qIGRpc2FibGUgYWxsIHByb3RvY29scyAqLworCQlpbWdfaXJfc2V0X2RlY29kZXIocHJpdiwgTlVMTCwgMCk7CisJCWdvdG8gc3VjY2VzczsKKwl9CisJZm9yIChkZWNwID0gaW1nX2lyX2RlY29kZXJzOyAqZGVjcDsgKytkZWNwKSB7CisJCWNvbnN0IHN0cnVjdCBpbWdfaXJfZGVjb2RlciAqZGVjID0gKmRlY3A7CisJCWlmICghaW1nX2lyX2RlY29kZXJfY29tcGF0aWJsZShwcml2LCBkZWMpKQorCQkJY29udGludWU7CisJCWlmICgqaXJfdHlwZSAmIGRlYy0+dHlwZSkgeworCQkJKmlyX3R5cGUgJj0gZGVjLT50eXBlOworCQkJaW1nX2lyX3NldF9kZWNvZGVyKHByaXYsIGRlYywgKmlyX3R5cGUpOworCQkJZ290byBzdWNjZXNzOworCQl9CisJfQorCXJldHVybiAtRUlOVkFMOworCitzdWNjZXNzOgorCS8qCisJICogT25seSBhbGxvdyBtYXRjaGluZyB3YWtldXAgcHJvdG9jb2xzIGZvciBub3csIGFuZCB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ZGF0YSA9IGRhdGFfaW52IDw8IDI0IHwKKwkJICAgIGRhdGEgICAgIDw8IDE2IHwKKwkJICAgIGFkZHJfaW52IDw8ICA4IHwKKwkJICAgIGFkZHI7CisJb3V0LT5tYXNrID0gZGF0YV9pbnZfbSA8PCAyNCB8CisJCSAgICBkYXRhX20gICAgIDw8IDE2IHwKKwkJICAgIGFkZHJfaW52X20gPDwgIDggfAorCQkgICAgYWRkcl9tOworCXJldHVybiAwOworfQorCisvKgorICogTkVDIGRlY29kZXIKKyAqIFNlZSBhbHNvIGh0dHA6Ly93d3cuc2Jwcm9qZWN0cy5jb20va25vd2xlZGdlL2lyL25lYy5waHAKKyAqICAgICAgICBodHRwOi8vd2lraS5hbHRpdW0uY29tL2Rpc3BsYXkvQURPSC9ORUMrSW5mcmFyZWQrVHJhbnNtaXNzaW9uK1Byb3RvY29sCisgKi8KK3N0cnVjdCBpbWdfaXJfZGVjb2RlciBpbWdfaXJfbmVjID0geworCS50eXBlID0gUkNfQklUX05FQywKKwkuY29udHJvbCA9IHsKKwkJLmRlY29kZW4gPSAxLAorCQkuY29kZV90eXBlID0gSU1HX0lSX0NPREVUWVBFX1BVTFNFRElTVCwKKwl9LAorCS8qIG1haW4gdGltaW5ncyAqLworCS51bml0ID0gNTYyNTAwLCAvKiA1NjIuNSB1cyAqLworCS50aW1pbmdzID0geworCQkvKiBsZWFkZXIgc3ltYm9sICovCisJCS5sZHIgPSB7CisJCQkucHVsc2UgPSB7IDE2CS8qIDltcyAqLyB9LAorCQkJLnNwYWNlID0geyA4CS8qIDQuNW1zICovIH0sCisJCX0sCisJCS8qIDAgc3ltYm9sICovCisJCS5zMDAgPSB7CisJCQkucHVsc2UgPSB7IDEJLyogNTYyLjUgdXMgKi8gfSwKKwkJCS5zcGFjZSA9IHsgMQkvKiA1NjIuNSB1cyAqLyB9LAorCQl9LAorCQkvKiAxIHN5bWJvbCAqLworCQkuczAxID0geworCQkJLnB1bHNlID0geyAxCS8qIDU2Mi41IHVz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W50IGxlbiwgdTY0IHJhdywgaW50ICpzY2FuY29kZSwgdTY0IHByb3RvY29scykKK3sKKwl1bnNpZ25lZCBpbnQgYWRkciwgY21kLCBleHAsIGNoazsKKworCWlmIChsZW4gIT0gMTUpCisJCXJldHVybiAtRUlOVkFMOworCisJYWRkciA9IChyYXcgPj4gICAwKSAmIDB4MWY7CisJY21kICA9IChyYXcgPj4gICA1KSAmIDB4ZmY7CisJZXhwICA9IChyYXcgPj4gIDEzKSAmICAweDE7CisJY2hrICA9IChyYXcgPj4gIDE0KSAmICAweDE7CisKKwkvKiB2YWxpZGF0ZSBkYXRhICovCisJaWYgKCFleHApCisJCXJldHVybiAtRUlOVkFMOworCWlmIChjaGspCisJCS8qIHByb2JhYmx5IHRoZSBzZWNvbmQgaGFsZiBvZiB0aGUgbWVzc2FnZSAqLworCQlyZXR1cm4gLUVJTlZBTDsKKworCSpzY2FuY29kZSA9IGFkZHIgPDwgOCB8IGNtZDsKKwlyZXR1cm4gSU1HX0lSX1NDQU5DT0RFOworfQorCisvKiBDb252ZXJ0IFNoYXJwIHNjYW5jb2RlIHRvIFNoYXJwIGRhdGEgZmlsdGVyICovCitzdGF0aWMgaW50IGltZ19pcl9zaGFycF9maWx0ZXIoY29uc3Qgc3RydWN0IHJjX3NjYW5jb2RlX2ZpbHRlciAqaW4sCisJCQkgICAgICAgc3RydWN0IGltZ19pcl9maWx0ZXIgKm91dCwgdTY0IHByb3RvY29scykKK3sKKwl1bnNpZ25lZCBpbnQgYWRkciwgY21kLCBleHAgPSAwLCBjaGsgPSAwOworCXVuc2lnbmVkIGludCBhZGRyX20sIGNtZF9tLCBleHBfbSA9IDAsIGNoa19tID0gMDsKKworCWFkZHIgICA9IChpbi0+ZGF0YSA+PiA4KSAmIDB4MWY7CisJYWRkcl9tID0gKGluLT5tYXNrID4+IDgpICYgMHgxZjsKKwljbWQgICAgPSAoaW4tPmRhdGEgPj4gMCkgJiAweGZmOworCWNtZF9tICA9IChpbi0+bWFzayA+Pi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50IHViaV9udW07CisJaW50IHZvbF9pZDsKKwljaGFyIG5hbWVbVUJJQkxPQ0tfUEFSQU1fTEVOKzFdOworfTsKKworLyogTnVtYmVycyBvZiBlbGVtZW50cyBzZXQgaW4gdGhlIEB1YmlibG9ja19wYXJhbSBhcnJheSAqLworc3RhdGljIGludCB1YmlibG9ja19kZXZzIF9faW5pdGRhdGE7CisKKy8qIE1URCBkZXZpY2VzIHNwZWNpZmljYXRpb24gcGFyYW1ldGVycyAqLworc3RhdGljIHN0cnVjdCB1YmlibG9ja19wYXJhbSB1YmlibG9ja19wYXJhbVtVQklCTE9DS19NQVhfREVWSUNFU10gX19pbml0ZGF0YTsKKworc3RydWN0IHViaWJsb2NrIHsKKwlzdHJ1Y3QgdWJpX3ZvbHVtZV9kZXNjICpkZXNjOworCWludCB1YmlfbnVtOworCWludCB2b2xfaWQ7CisJaW50IHJlZmNudDsKKwlpbnQgbGViX3NpemU7CisKKwlzdHJ1Y3QgZ2VuZGlzayAqZ2Q7CisJc3RydWN0IHJlcXVlc3RfcXVldWUgKnJxOworCisJc3RydWN0IHdvcmtxdWV1ZV9zdHJ1Y3QgKndxOworCXN0cnVjdCB3b3JrX3N0cnVjdCB3b3JrOworCisJc3RydWN0IG11dGV4IGRldl9tdXRleDsKKwlzcGlubG9ja190IHF1ZXVlX2xvY2s7CisJc3RydWN0IGxpc3RfaGVhZCBsaXN0OworfTsKKworLyogTGlua2VkIGxpc3Qgb2YgYWxsIHViaWJsb2NrIGluc3RhbmNlcyAqLworc3RhdGljIExJU1RfSEVBRCh1YmlibG9ja19kZXZpY2VzKTsKK3N0YXRpYyBERUZJTkVfTVVURVgoZGV2aWNlc19tdXRleCk7CitzdGF0aWMgaW50IHViaWJsb2NrX21ham9yOworCitzdGF0aWMgaW50IF9faW5pdCB1YmlibG9ja19zZXRfcGFyYW0oY29uc3QgY2hhciAqdmFsLAorCQkJCSAgICAgY29uc3Qgc3RydWN0IGtlcm5lbF9wYXJhbSAqa3ApCit7CisJ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wYXJzZV9waGFuZGxlKGRuLCAicGh5LWhhbmRsZSIsIDApOworCisJLyogR2V0IHRoZSBsaW5rIG1vZGUgKi8KKwlwcml2LT5waHlfaW50ZXJmYWNlID0gb2ZfZ2V0X3BoeV9tb2RlKGRuKTsKKworCXJldHVybiAwOworfQorCitpbnQgYmNtZ2VuZXRfbWlpX2luaXQoc3RydWN0IG5ldF9kZXZpY2UgKmRldikKK3sKKwlzdHJ1Y3QgYmNtZ2VuZXRfcHJpdiAqcHJpdiA9IG5ldGRldl9wcml2KGRldik7CisJaW50IHJldDsKKworCXJldCA9IGJjbWdlbmV0X21paV9hbGxvYyhwcml2KTsKKwlpZiAocmV0KQorCQlyZXR1cm4gcmV0OworCisJcmV0ID0gYmNtZ2VuZXRfbWlpX29mX2luaXQocHJpdik7CisJaWYgKHJldCkKKwkJZ290byBvdXRfZnJlZTsKKworCXJldCA9IGJjbWdlbmV0X21paV9wcm9iZShkZXYpOworCWlmIChyZXQpCisJCWdvdG8gb3V0OworCisJcmV0dXJuIDA7CisKK291dDoKKwltZGlvYnVzX3VucmVnaXN0ZXIocHJpdi0+bWlpX2J1cyk7CitvdXRfZnJlZToKKwlrZnJlZShwcml2LT5taWlfYnVzLT5pcnEpOworCW1kaW9idXNfZnJlZShwcml2LT5taWlfYnVzKTsKKwlyZXR1cm4gcmV0OworfQorCit2b2lkIGJjbWdlbmV0X21paV9leGl0KHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCit7CisJc3RydWN0IGJjbWdlbmV0X3ByaXYgKnByaXYgPSBuZXRkZXZfcHJpdihkZXYpOworCisJbWRpb2J1c191bnJlZ2lzdGVyKHByaXYtPm1paV9idXMpOworCWtmcmVlKHByaXYtPm1paV9idXMtPmlycSk7CisJbWRpb2J1c19mcmVlKHByaXYtPm1paV9idXMpOworfQpkaWZmIC0tZ2l0IGEvZHJpdmVycy9uZXQvZXRoZXJuZXQvYnJvYWRjb20vdGczLmMgYi9kcml2ZXJzL25ldC9ldGhlcm5ld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nMvbmV0L2V0aGVybmV0L2ludGVsL2l4Z2JldmYvZXRodG9vbC5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKIAogICBJbnRlbCA4MjU5OSBWaXJ0dWFsIEZ1bmN0aW9uIGRyaXZlcgotICBDb3B5cmlnaHQoYykgMTk5OSAtIDIwMTIgSW50ZWwgQ29ycG9yYXRpb24uCisgIENvcHlyaWdodChjKSAxOTk5IC0gMjAxNCBJbnRlbCBDb3Jwb3JhdGlvbi4KIAogICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdAogICB1bmRlciB0aGUgdGVybXMgYW5kIGNvbmRpdGlvbnMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlLApAQCAtNTMwLDQxICs1MzAsNTUgQEAKIAkweDVBNUE1QTVBLCAweEE1QTVBNUE1LCAweDAwMDAwMDAwLCAweEZGRkZGRkZGCiB9OwogCi0jZGVmaW5lIFJFR19QQVRURVJOX1RFU1QoUiwgTSwgVykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JdTMyIHBhdCwgdmFsLCBiZWZvcmU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlmb3IgKHBhdCA9IDA7IHBhdCA8IEFSUkFZX1NJWkUocmVnaXN0ZXJfdGVzdF9wYXR0ZXJucyk7IHBhdCsrKSB7ICAgICAgXAotCQliZWZvcmUgPSByZWFkbChhZGFwdGVyLT5ody5od19hZGRyICsgUik7ICAgICAgICAgICAgICAgICAgICAgIFwKLQkJd3JpdGVsKChyZWdpc3Rlcl90ZXN0X3BhdHRlcm5zW3BhdF0gJiBXKSwgICAgICAgICAgICAgICAgICAgICBcCi0JCSAgICAgICAoYWRhcHRlci0+aHcuaHdfYWRkciArIFIpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQl2YWwgPSByZWFkbChhZGFwdGVyLT5ody5od19hZGRyICsgUik7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJaWYgKHZhbCAhPSAocmVnaXN0ZXJfdGVzdF9wYXR0ZXJuc1twYXRdICYgVyAmIE0pKSB7ICAgICAgICAgICBcCi0JCQlod19kYmcoJmFkYXB0ZXItPmh3LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkicGF0dGVybiB0ZXN0IHJlZyAlMDRYIGZhaWxlZDogZ290ICIgICAgICAgICAgICAgICAgICBcCi0JCQkiMHglMDhYIGV4cGVjdGVkIDB4JTA4WFxuIiwgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQlSLCB2YWwsIChyZWdpc3Rlcl90ZXN0X3BhdHRlcm5zW3BhdF0gJiBXICYgTSkpOyAgICAgICBcCi0JCQkqZGF0YSA9IFI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQl3cml0ZWwoYmVmb3JlLCBhZGFwdGVyLT5ody5od19hZGRyICsgUik7ICAgICAgICAgICAgICBcCi0JCQlyZXR1cm4gMTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQl3cml0ZWwoYmVmb3JlLCBhZGFwdGVyLT5ody5od19hZGRyICsgUik7ICAgICAgICAgICAgICAgICAgICAgIFwKLQl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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GVfcmVnKCZhZGFwdGVyLT5odywgcmVnLCBiZWZvcmUpOworCX0KKwlyZXR1cm4gZmFsc2U7CiB9CiAKLSNkZWZpbmUgUkVHX1NFVF9BTkRfQ0hFQ0soUiwgTSwgVykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl1MzIgdmFsLCBiZWZvcmU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCWJlZm9yZSA9IHJlYWRsKGFkYXB0ZXItPmh3Lmh3X2FkZHIgKyBSKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0Jd3JpdGVsKChXICYgTSksIChhZGFwdGVyLT5ody5od19hZGRyICsgUikpOyAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQl2YWwgPSByZWFkbChhZGFwdGVyLT5ody5od19hZGRyICsgUik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCWlmICgoVyAmIE0pICE9ICh2YWwgJiBNKSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCXByX2Vycigic2V0L2NoZWNrIHJlZyAlMDRYIHRlc3QgZmFpbGVkOiBnb3QgMHglMDhYIGV4cGVjdGVkICIgXAotCQkgICAgICAgIjB4JTA4WFxuIiwgUiwgKHZhbCAmIE0pLCAoVyAmIE0pKTsgICAgICAgICAgICAgICAgICAgIFwKLQkJKmRhdGEgPSBSOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCXdyaXRlbChiZWZvcmUsIChhZGFwdGVyLT5ody5od19hZGRyICsgUikpOyAgICAgICAgICAgICAgICAgICAgXAotCQlyZXR1cm4gMTsgICAgICAgICAgICAgICAgICAgICAgICAgICA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HCQkJIDB4MjRBMAogI2RlZmluZSAgICAgIE1WTkVUQV9TR01JSV9TRVJERVNfUFJPVE8JCSAweDBjYzcKKyNkZWZpbmUgICAgICBNVk5FVEFfUkdNSUlfU0VSREVTX1BST1RPCQkgMHgwNjY3CiAjZGVmaW5lIE1WTkVUQV9UWVBFX1BSSU8gICAgICAgICAgICAgICAgICAgICAgICAgMHgyNGJjCiAjZGVmaW5lICAgICAgTVZORVRBX0ZPUkNFX1VOSSAgICAgICAgICAgICAgICAgICAgQklUKDIxKQogI2RlZmluZSBNVk5FVEFfVFhRX0NNRF8xICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjRlNApAQCAtMTYxLDcgKzE2Myw3IEBACiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfTUFYX1JYX1NJWkVfTUFTSyAgICAgICAgMHg3ZmZjCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUMwX1BPUlRfRU5BQkxFICAgICAgICAgICAgQklUKDApCiAjZGVmaW5lIE1WTkVUQV9HTUFDX0NUUkxfMiAgICAgICAgICAgICAgICAgICAgICAgMHgyYzA4Ci0jZGVmaW5lICAgICAgTVZORVRBX0dNQUMyX1BTQ19FTkFCTEUgICAgICAgICAgICAgQklUKDMpCisjZGVmaW5lICAgICAgTVZORVRBX0dNQUMyX1BDU19FTkFCTEUgICAgICAgICAgICAgQklUKDMpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUMyX1BPUlRfUkdNSUkgICAgICAgICAgICAgQklUKDQpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUMyX1BPUlRfUkVTRVQgICAgICAgICAgICAgQklUKDYpCiAjZGVmaW5lIE1WTkVUQV9HTUFDX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgMHgyYzEwCkBAIC01MDgsMTIgKzUxMCwxMiBAQAogCiAJCWNwdV9zdGF0cyA9IHBlcl9jcHVfcHRyKHBwLT5zdGF0cywgY3B1KTsKIAkJZG8gewotCQkJc3RhcnQgPSB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2ZmbG9hZDsKKwl1bnNpZ25lZCBpbnQgcnhfY3N1bV9vZmZsb2FkOworCXVuc2lnbmVkIGludCBtdWx0aV9tYWNhZGRyOworCXVuc2lnbmVkIGludCB0c3RhbXBfc3Jjc2VsZWN0OworCXVuc2lnbmVkIGludCBzYV92bGFuX2luc2VydDsKKworCS8qKioqKiogQ0FQIFsxXSAqKioqKioqLworCXVuc2lnbmVkIGludCByeGZpZm9fc2l6ZTsKKwl1bnNpZ25lZCBpbnQgdHhmaWZvX3NpemU7CisJdW5zaWduZWQgaW50IGF0c3RtYXBfaHdvcmQ7CisJdW5zaWduZWQgaW50IGRjYl9lbmFibGU7CisJdW5zaWduZWQgaW50IHNwbGl0aGVhZF9lbmFibGU7CisJdW5zaWduZWQgaW50IHRjcHNlZ19vZmZsb2FkOworCXVuc2lnbmVkIGludCBkZWJ1Z19tZW07CisJdW5zaWduZWQgaW50IHJzc19lbmFibGU7CisJdW5zaWduZWQgaW50IGhhc2hfdHNpemU7CisJdW5zaWduZWQgaW50IGwzbDRfZmlsZXJfc2l6ZTsKKworCS8qIFRoaXMgdmFsdWUgaXMgaW4gYnl0ZXMgYW5kCisJICogYXMgbWVudGlvbmVkIGluIEhXIGZlYXR1cmVzCisJICogb2YgU1hHQkUgZGF0YSBib29rCisJICovCisJdW5zaWduZWQgaW50IHJ4X210bF9xc2l6ZTsKKwl1bnNpZ25lZCBpbnQgdHhfbXRsX3FzaXplOworCisJLyoqKioqKiBDQVAgWzJdICoqKioqKiovCisJLyogVFggYW5kIFJYIG51bWJlciBvZiBjaGFubmVscyAqLworCXVuc2lnbmVkIGludCByeF9tdGxfcXVldWVzOworCXVuc2lnbmVkIGludCB0eF9tdGxfcXVldWVzOworCXVuc2lnbmVkIGludCByeF9kbWFfY2hhbm5lbHM7CisJdW5zaWduZWQgaW50IHR4X2RtYV9jaGFubmVsczsKKwl1bnNpZ25lZCBpbnQgcHBzX291dHB1dF9jb3VudDsKKwl1bnNpZ25lZCBpbnQgYXV4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xLX1NFTEVDVE9SX01TSwkweDAwMDAwMGMwCisjZGVmaW5lIFNIUl9BUE1HX0RMX0NGR19SVENTX0NMS19JTlRFUk5BTF9YVEFMCTB4MDAwMDAwODAKKyNkZWZpbmUgU0hSX0FQTUdfRExfQ0ZHX0RMX0NMT0NLX1BPV0VSX1VQCTB4MDAwMDAxMDAKKworLyogU2hhcmVkIEFQTUdfWFRBTF9DRkcgcmVnaXN0ZXIgKi8KKyNkZWZpbmUgU0hSX0FQTUdfWFRBTF9DRkdfUkVHCQkweDFjMAorI2RlZmluZSBTSFJfQVBNR19YVEFMX0NGR19YVEFMX09OX1JFUQkweDgwMDAwMDAwCisKKy8qCisgKiBEZXZpY2UgcmVzZXQgZm9yIGZhbWlseSA4MDAwCisgKiB3cml0ZSB0byBiaXQgMjQgaW4gb3JkZXIgdG8gcmVzZXQgdGhlIENQVQorKi8KKyNkZWZpbmUgUkVMRUFTRV9DUFVfUkVTRVQJCSgweDMwMEMpCisjZGVmaW5lIFJFTEVBU0VfQ1BVX1JFU0VUX0JJVAkJQklUKDI0KQorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqICAgICAgICAgICAgICAgICAgICAgICAgNzAwMC8zMDAwIHNlcmllcyBTSFIgRFRTIGFkZHJlc3NlcyAgICAgICAgICAgICAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMjgxLDQgKzMwOSw0MyBAQAogI2RlZmluZSBPU0NfQ0xLCQkJCSgweGEwNDA2OCkKICNkZWZpbmUgT1NDX0NMS19GT1JDRV9DT05UUk9MCQkoMHg4KQogCisvKiBTRUNVUkUgYm9vdCByZWdpc3RlcnMgKi8KKyNkZWZpbmUgTE1QTV9TRUNVUkVfQk9PVF9DT05GSUdfQUREUgkoMHgxMDApCitlbnV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ZmVyIHN0YXJ0aW5nCisgKgkJICAgICAgIGZyb20gdGhlIElFRUUgODAyLjExIGhlYWRlci4KKyAqIEBodzogUG9pbnRlciB0byB0aGUgaWVlZTgwMjExX2h3IHN0cnVjdHVyZS4KKyAqIEBjb250cm9sOiBQb2ludGVyIHRvIHRoZSBpZWVlODAyMTFfdHhfY29udHJvbCBzdHJ1Y3R1cmUKKyAqIEBza2I6IFBvaW50ZXIgdG8gdGhlIHNvY2tldCBidWZmZXIgc3RydWN0dXJlLgorICoKKyAqIFJldHVybjogTm9uZQorICovCitzdGF0aWMgdm9pZCByc2lfbWFjODAyMTFfdHgoc3RydWN0IGllZWU4MDIxMV9odyAqaHcsCisJCQkgICAgc3RydWN0IGllZWU4MDIxMV90eF9jb250cm9sICpjb250cm9sLAorCQkJICAgIHN0cnVjdCBza19idWZmICpza2IpCit7CisJc3RydWN0IHJzaV9odyAqYWRhcHRlciA9IGh3LT5wcml2OworCXN0cnVjdCByc2lfY29tbW9uICpjb21tb24gPSBhZGFwdGVyLT5wcml2OworCisJcnNpX2NvcmVfeG1pdChjb21tb24sIHNrYik7Cit9CisKKy8qKgorICogcnNpX21hYzgwMjExX3N0YXJ0KCkgLSBUaGlzIGlzIGZpcnN0IGhhbmRsZXIgdGhhdCA4MDIuMTEgbW9kdWxlIGNhbGxzLCBzaW5jZQorICoJCQkgIHRoZSBkcml2ZXIgaW5pdCBpcyBjb21wbGV0ZSBieSB0aGVuLCBqdXN0CisgKgkJCSAgcmV0dXJucyBzdWNjZXNzLgorICogQGh3OiBQb2ludGVyIHRvIHRoZSBpZWVlODAyMTFfaHcgc3RydWN0dXJlLgorICoKKyAqIFJldHVybjogMCBhcyBzdWNjZXNzLgorICovCitzdGF0aWMgaW50IHJzaV9tYWM4MDIxMV9zdGFydChzdHJ1Y3QgaWVlZTgwMjExX2h3ICpodykKK3sKKwlzdHJ1Y3QgcnNpX2h3ICphZGFwdGVyID0gaHctPnByaXY7CisJc3RydWN0IHJzaV9jb21tb24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BVEEgT1IgUFJPRklUUywgV0hFVEhFUiBJTiBBTgorICogQUNUSU9OIE9GIENPTlRSQUNULCBORUdMSUdFTkNFIE9SIE9USEVSIFRPUlRJT1VTIEFDVElPTiwgQVJJU0lORyBPVVQgT0YKKyAqIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SIFBFUkZPUk1BTkNFIE9GIFRISVMgU09GVFdBUkUuCisgKi8KKworI2lmbmRlZiBfX1JTSV9CT09UUEFSQU1TX0hFQURFUl9IX18KKyNkZWZpbmUgX19SU0lfQk9PVFBBUkFNU19IRUFERVJfSF9fCisKKyNkZWZpbmUgQ1JZU1RBTF9HT09EX1RJTUUgICAgICAgICAgICAgICAgQklUKDApCisjZGVmaW5lIEJPT1RVUF9NT0RFX0lORk8gICAgICAgICAgICAgICAgIEJJVCgxKQorI2RlZmluZSBXSUZJX1RBUExMX0NPTkZJR1MgICAgICAgICAgICAgICBCSVQoNSkKKyNkZWZpbmUgV0lGSV9QTEw5NjBfQ09ORklHUyAgICAgICAgICAgICAgQklUKDYpCisjZGVmaW5lIFdJRklfQUZFUExMX0NPTkZJR1MgICAgICAgICAgICAgIEJJVCg3KQorI2RlZmluZSBXSUZJX1NXSVRDSF9DTEtfQ09ORklHUyAgICAgICAgICBCSVQoOCkKKworI2RlZmluZSBUQV9QTExfTV9WQUxfMjAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIFRBX1BMTF9OX1ZBTF8yMCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVEFfUExMX1BfVkFMXzIwICAgICAgICAgICAgICAgICAgNAorCisjZGVmaW5lIFBMTDk2MF9NX1ZBTF8yMCAgICAgICAgICAgICAgICAgIDB4MTQKKyNkZWZpbmUgUExMOTYwX05fVkFMXzIwICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQTEw5NjBfUF9WQUxfMjAgICAgICAgICAgICAgICAgICA1CisKKyNkZWZpbmUgVU1BQ19DTEtfNDBNSFogICAgICAgIC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IFRPUlRJT1VTIEFDVElPTiwgQVJJU0lORyBPVVQgT0YKKyAqIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgVVNFIE9SIFBFUkZPUk1BTkNFIE9GIFRISVMgU09GVFdBUkUuCisgKi8KKworI2lmbmRlZiBfX1JTSV9NQUlOX0hfXworI2RlZmluZSBfX1JTSV9NQUlOX0hfXworCisjaW5jbHVkZSA8bGludXgvc3RyaW5nLmg+CisjaW5jbHVkZSA8bGludXgvc2tidWZmLmg+CisjaW5jbHVkZSA8bmV0L21hYzgwMjExLmg+CisKKyNkZWZpbmUgRVJSX1pPTkUgICAgICAgICAgICAgICAgICAgICAgICBCSVQoMCkgIC8qIEZvciBFcnJvciBNc2dzICAgICAgICAgICAgICovCisjZGVmaW5lIElORk9fWk9ORSAgICAgICAgICAgICAgICAgICAgICAgQklUKDEpICAvKiBGb3IgR2VuZXJhbCBTdGF0dXMgTXNncyAgICAqLworI2RlZmluZSBJTklUX1pPTkUgICAgICAgICAgICAgICAgICAgICAgIEJJVCgyKSAgLyogRm9yIERyaXZlciBJbml0IFNlcSBNc2dzICAgKi8KKyNkZWZpbmUgTUdNVF9UWF9aT05FICAgICAgICAgICAgICAgICAgICBCSVQoMykgIC8qIEZvciBUWCBNZ210IFBhdGggTXNncyAgICAgICovCisjZGVmaW5lIE1HTVRfUlhfWk9ORSAgICAgICAgICAgICAgICAgICAgQklUKDQpICAvKiBGb3IgUlggTWdtdCBQYXRoIE1zZ3MgICAgICAqLworI2RlZmluZSBEQVRBX1RYX1pPTkUgICAgICAgICAgICAgICAgICAgIEJJVCg1KSAgLyogRm9yIFRYIERhdGEgUGF0aCBNc2dzICAgICAgKi8KKyNkZWZpbmUgREFUQV9SWF9aT05FICAgICAgICAgICAgICAgICAgICBCSVQoNikgIC8qIEZvciBSWCBEYXRhIFBhdGggTXNncyAgICAgICovCisjZGVmaW5lIEZTTV9aT05FICAgICAgICAgICAgICAgICAgICAgICAgQklUKDcpICAvKiBGb3IgU3RhdGUgTWFjaGluZSBNc2dzICAgICAqLworI2RlZmluZSBJU1JfWk9ORSAgICAgICAgICAgICAgICAgICAgICAgIEJJVCg4KSAgLyogRm9yIEludGVycnVwdCBNc2dzICAgICAgICAgKi8KKworI2RlZmluZSBGU01fQ0FSRF9OT1RfUkVBRFkgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRlNNX0JPT1RfUEFSQU1TX1NFTlQgICAgICAgICAgICAxCisjZGVmaW5lIEZTTV9FRVBST01fUkVBRF9NQUNfQUREUiAgICAgICAgMgorI2RlZmluZSBGU01fUkVTRVRfTUFDX1NFTlQgICAgICAgICAgICAgIDMKKyNkZWZpbmUgRlNNX1JBRElPX0NBUFNfU0VOVCAgICAgICAgICAgICA0CisjZGVmaW5lIEZTTV9CQl9SRl9QUk9HX1NFTlQgICAgICAgICAgICAgNQorI2RlZmluZSBGU01fTUFDX0lOSVRfRE9ORSAgICAgICAgICAgICAgIDYKKworZXh0ZXJuIHUzMiByc2lfem9uZV9lbmFibGVkOworZXh0ZXJuIF9fcHJpbnRmKDIsIDMpIHZvaWQgcnNpX2RiZyh1MzIgem9uZSwgY29uc3QgY2hhciAqZm10LCAuLi4pOworCisjZGVmaW5lIFJTSV9NQVhfVklGUyAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBOVU1fRURDQV9RVUVVRVMgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgSUVFRTgwMjExX0FERFJfTEVOICAgICAgICAgICAgICA2CisjZGVmaW5lIEZSQU1FX0RFU0NfU1ogICAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgTUlOXzgwMl8xMV9IRFJfTEVOICAgICAgICAgICAgICAyNAorCisjZGVmaW5lIERBVEFfUVVFVUVfV0FURVJfTUFSSyAgICAgICAgICAgNDAwCisjZGVmaW5lIE1JTl9EQVRBX1FVRVVFX1dBVEVSX01BUksgICAgICAgMzAwCisjZGVmaW5lIE1VTFRJQ0FTVF9XQVRFUl9NQVJLICAgICAgICAgICAgMjAwCisjZGVmaW5lIE1BQ184MDIxMV9IRFJfRlJBTUVfQ09OVFJPTCAgICAgMAorI2RlZmluZSBXTUVfTlVNX0FDICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgTlVNX1NPRlRfUVVFVUVTICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIE1BWF9IV19RVUVVRVMgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBJTlZBTElEX1FVRVVFICAgICAgICAgICAgICAgICAgIDB4ZmYKKyNkZWZpbmUgTUFYX0NPTlRJTlVPVVNfVk9fUEtUUyAgICAgICAgICA4CisjZGVmaW5lIE1BWF9DT05USU5VT1VTX1ZJX1BLVFMgICAgICAgICAgNAorCisvKiBRdWV1ZSBpbmZvcm1hdGlvbiAqLworI2RlZmluZSBSU0lfV0lGSV9NR01UX1EgICAgICAgICAgICAgICAgIDB4NAorI2RlZmluZSBSU0lfV0lGSV9EQVRBX1EgICAgICAgICAgICAgICAgIDB4NQorI2RlZmluZSBJRUVFODAyMTFfTUdNVF9GUkFNRSAgICAgICAgICAgIDB4MDAKKyNkZWZpbmUgSUVFRTgwMjExX0NUTF9GUkFNRSAgICAgICAgICAgICAweDA0CisKKyNkZWZpbmUgSUVFRTgwMjExX1FPU19USUQgICAgICAgICAgICAgICAweDBmCisjZGVmaW5lIElFRUU4MDIxMV9OT05RT1NfVElEICAgICAgICAgICAgMTYKKworI2RlZmluZSBNQVhfREVCVUdGU19FTlRSSUVTICAgICAgICAgICAgIDQKKworI2RlZmluZSBUSURfVE9fV01FX0FDKF90aWQpICggICAgICBcCisJKChfdGlkKSA9PSAwIHx8IChfdGlkKSA9PSAzKSA/IEJFX1EgOiBcCisJKChfdGlkKSA8IDMpID8gQktfUSA6IFwKKwkoKF90aWQpIDwgNikgPyBWSV9RIDogXAorCVZPX1EpCisKKyNkZWZpbmUgV01FX0FDKF9xKSAoICAgIFwKKwkoKF9xKSA9PSBCS19RKSA/IElFRUU4MDIxMV9BQ19CSy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AwCisjZGVmaW5lIFJTSV8xMUdfTU9ERSAgICAgICAgICAgICAgICAgICAgQklUKDcpCisjZGVmaW5lIFJFVFJZX0NPVU5UICAgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBSRVRSWV9MT05HICAgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgUkVUUllfU0hPUlQgICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIFdNTV9TSE9SVF9TTE9UX1RJTUUgICAgICAgICAgICAgOQorI2RlZmluZSBTSUZTX0RVUkFUSU9OICAgICAgICAgICAgICAgICAgIDE2CisKKyNkZWZpbmUgS0VZX1RZUEVfQ0xFQVIgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFJTSV9QQUlSV0lTRV9LRVkgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSU0lfR1JPVVBfS0VZICAgICAgICAgICAgICAgICAgIDIKKworLyogRVBQUk9NX1JFQURfQUREUkVTUyAqLworI2RlZmluZSBXTEFOX01BQ19FRVBST01fQUREUiAgICAgICAgICAgIDQwCisjZGVmaW5lIFdMQU5fTUFDX01BR0lDX1dPUkRfTEVOICAgICAgICAgMHgwMQorI2RlZmluZSBXTEFOX0hPU1RfTU9ERV9MRU4gICAgICAgICAgICAgIDB4MDQKKyNkZWZpbmUgV0xBTl9GV19WRVJTSU9OX0xFTiAgICAgICAgICAgICAweDA4CisjZGVmaW5lIE1BR0lDX1dPUkQgICAgICAgICAgICAgICAgICAgICAgMHg1QQorCisvKiBSZWNlaXZlIEZyYW1lIFR5cGVzICovCisjZGVmaW5lIFRBX0NPTkZJUk1fVFlQRSAgICAgICAgICAgICAgICAgMHgwMQorI2RlZmluZSBSWF9ET1QxMV9NR01UICAgICAgICAgICAgICAgICAgIDB4MDIKKyNkZWZpbmUgVFhfU1RBVFVTX0lORCAgICAgICAgICAgICAgICAgICAweDA0CisjZGVmaW5lIFBST0JFUkVRX0NPTkZJUk0gICAgICAgICAgICAgICAgMgorI2RlZmluZSBDQVJEX1JFQURZX0lORCAgICAgICAgICAgICAgICAgIDB4MDAKKworI2RlZmluZSBSU0lfREVMRVRFX1BFRVIgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBSU0lfQUREX1BFRVIgICAgICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTVEFSVF9BTVBEVV9BR0dSICAgICAgICAgICAgICAgIDB4MQorI2RlZmluZSBTVE9QX0FNUERVX0FHR1IgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBJTlRFUk5BTF9NR01UX1BLVCAgICAgICAgICAgICAgIDB4OTkKKworI2RlZmluZSBQVVRfQkJQX1JFU0VUICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQkJQX1JFR19XUklURSAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFJGX1JFU0VUX0VOQUJMRSAgICAgICAgICAgICAgICAgQklUKDMpCisjZGVmaW5lIFJBVEVfSU5GT19FTkFCTEUgICAgICAgICAgICAgICAgQklUKDApCisjZGVmaW5lIFJTSV9CUk9BRENBU1RfUEtUICAgICAgICAgICAgICAgQklUKDkpCisKKyNkZWZpbmUgVVBQRVJfMjBfRU5BQkxFICAgICAgICAgICAgICAgICAoMHgyIDw8IDEyKQorI2RlZmluZSBMT1dFUl8yMF9FTkFCTEUgICAgICAgICAgICAgICAgICgweDQgPDwgMTIpCisjZGVmaW5lIEZVTEw0ME1fRU5BQkxFICAgICAgICAgICAgICAgICAgMHg2CisKKyNkZWZpbmUgUlNJX0xNQUNfQ0xPQ0tfODBNSFogICAgICAgICAgICAweDEKKyNkZWZpbmUgUlNJX0VOQUJMRV80ME1IWiAgICAgICAgICAgICAgICAoMHgxIDw8IDMpCisKKyNkZWZpbmUgUlhfQkFfSU5ESUNBVElPTiAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJTSV9UQkxfU1ogICAgICAgICAgICAgICAgICAgICAgNDAKKyNkZWZpbmUgTUFYX1JFVFJJRVMgICAgICAgICAgICAgICAgICAgICA4CisKKyNkZWZpbmUgU1REX1JBVEVfTUNTNyAgICAgICAgICAgICAgICAgICAweDA3CisjZGVmaW5lIFNURF9SQVRFX01DUzYgICAgICAgICAgICAgICAgICAgMHgwNgorI2RlZmluZSBTVERfUkFURV9NQ1M1ICAgICAgICAgICAgICAgICAgIDB4MDUKKyNkZWZpbmUgU1REX1JBVEVfTUNTNCAgICAgICAgICAgICAgICAgICAweDA0CisjZGVmaW5lIFNURF9SQVRFX01DUzMgICAgICAgICAgICAgICAgICAgMHgwMworI2RlZmluZSBTVERfUkFURV9NQ1MyICAgICAgICAgICAgICAgICAgIDB4MDIKKyNkZWZpbmUgU1REX1JBVEVfTUNTMSAgICAgICAgICAgICAgICAgICAweDAxCisjZGVmaW5lIFNURF9SQVRFX01DUzAgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTVERfUkFURV81NCAgICAgICAgICAgICAgICAgICAgIDB4NmMKKyNkZWZpbmUgU1REX1JBVEVfNDggICAgICAgICAgICAgICAgICAgICAweDYwCisjZGVmaW5lIFNURF9SQVRFXzM2ICAgICAgICAgICAgICAgICAgICAgMHg0OAorI2RlZmluZSBTVERfUkFURV8yNCAgICAgICAgICAgICAgICAgICAgIDB4MzAKKyNkZWZpbmUgU1REX1JBVEVfMTggICAgICAgICAgICAgICAgICAgICAweDI0CisjZGVmaW5lIFNURF9SQVRFXzEyICAgICAgICAgICAgICAgICAgICAgMHgxOAorI2RlZmluZSBTVERfUkFURV8xMSAgICAgICAgICAgICAgICAgICAgIDB4MTYKKyNkZWZpbmUgU1REX1JBVEVfMDkgICAgICAgICAgICAgICAgICAgICAweDEyCisjZGVmaW5lIFNURF9SQVRFXzA2ICAgICAgICAgICAgICAgICAgICAgMHgwQworI2RlZmluZSBTVERfUkFURV81XzUgICAgICAgICAgICAgICAgICAgIDB4MEIKKyNkZWZpbmUgU1REX1JBVEVfMDIgICAgICAgICAgICAgICAgICAgICAweDA0CisjZGVmaW5lIFNURF9SQVRFXzAxICAgICAgICAgICAgICAgICAgICAgMHgwMgorCisjZGVmaW5lIFJTSV9SRl9UWVBFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSU0lfUkFURV8wMCAgICAgICAgICAgICAgICAgICAgIDB4MDAKKyNkZWZpbmUgUlNJX1JBVEVfMSAgICAgICAgICAgICAgICAgICAgICAweDAKKyNkZWZpbmUgUlNJX1JBVEVfMiAgICAgICAgICAgICAgICAgICAgICAweDIKKyNkZWZpbmUgUlNJX1JBVEVfNV81ICAgICAgICAgICAgICAgICAgICAweDQKKyNkZWZpbmUgUlNJX1JBVEVfMTEgICAgICAgICAgICAgICAgICAgICAweDYKKyNkZWZpbmUgUlNJX1JBVEVfNiAgICAgICAgICAgICAgICAgICAgICAweDhiCisjZGVmaW5lIFJTSV9SQVRFXzkgICAgICAgICAgICAgICAgICAgICAgMHg4ZgorI2RlZmluZSBSU0lfUkFURV8xMiAgICAgICAgICAgICAgICAgICAgIDB4OGEKKyNkZWZpbmUgUlNJX1JBVEVfMTggICAgICAgICAgICAgICAgICAgICAweDhlCisjZGVmaW5lIFJTSV9SQVRFXzI0ICAgICAgICAgICAgICAgICAgICAgMHg4OQorI2RlZmluZSBSU0lfUkFURV8zNiAgICAgICAgICAgICAgICAgICAgIDB4OGQKKyNkZWZpbmUgUlNJX1JBVEVfNDggICAgICAgICAgICAgICAgICAgICAweDg4CisjZGVmaW5lIFJTSV9SQVRFXzU0ICAgICAgICAgICAgICAgICAgICAgMHg4YworI2RlZmluZSBSU0lfUkFURV9NQ1MwICAgICAgICAgICAgICAgICAgIDB4MTAwCisjZGVmaW5lIFJTSV9SQVRFX01DUzEgICAgICAgICAgICAgICAgICAgMHgxMDEKKyNkZWZpbmUgUlNJX1JBVEVfTUNTMiAgICAgICAgICAgICAgICAgICAweDEwMgorI2RlZmluZSBSU0lfUkFURV9NQ1MzICAgICAgICAgICAgICAgICAgIDB4MTAzCisjZGVmaW5lIFJTSV9SQVRFX01DUzQgICAgICAgICAgICAgICAgICA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0VNSV9GVUxMICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEtUX0JVRkZfRlVMTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEtUX01HTVRfQlVGRl9GVUxMICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgTVNEVV9QS1RfUEVORElORyAgICAgICAgICAgICAgICAgICAgICAgIDMKKy8qIEludGVycnVwdCBCaXQgUmVsYXRlZCBNYWNyb3MgKi8KKyNkZWZpbmUgUEtUX0JVRkZfQVZBSUxBQkxFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRldfQVNTRVJUX0lORCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIKKworI2RlZmluZSBSU0lfREVWSUNFX0JVRkZFUl9TVEFUVVNfUkVHSVNURVIgICAgICAgMHhmMworI2RlZmluZSBSU0lfRk4xX0lOVF9SRUdJU1RFUiAgICAgICAgICAgICAgICAgICAgMHhmOQorI2RlZmluZSBSU0lfU0RfUkVRVUVTVF9NQVNURVIgICAgICAgICAgICAgICAgICAgMHgxMDAwMAorCisvKiBGT1IgU0QgQ0FSRCBPTkxZICovCisjZGVmaW5lIFNESU9fUlhfTlVNX0JMT0NLU19SRUcgICAgICAgICAgICAgICAgICAweDAwMEYxCisjZGVmaW5lIFNESU9fRldfU1RBVFVTX1JFRyAgICAgICAgICAgICAgICAgICAgICAweDAwMEYyCisjZGVmaW5lIFNESU9fTlhUX1JEX0RFTEFZMiAgICAgICAgICAgICAgICAgICAgICAweDAwMEY1CisjZGVmaW5lIFNESU9fTUFTVEVSX0FDQ0VTU19NU0JZVEUgICAgICAgICAgICAgICAweDAwMEZBCisjZGVmaW5lIFNESU9fTUFTVEVSX0FDQ0VTU19MU0JZVEUgICAgICAgICAgICAgICAweDAwMEZCCisjZGVmaW5lIFNESU9fUkVBRF9TVEFSVF9MVkwgICAgICAgICAgICAgICAgICAgICAweDAwMEZDCisjZGVmaW5lIFNESU9fUkVBRF9GSUZPX0NUTCAgICAgICAgICAgICAgICAgICAgICAweDAwMEZECisjZGVmaW5lIFNESU9fV1JJVEVfRklGT19DVEwgICAgICAgICAgICAgICAgICAgICAweDAwMEZFCisjZGVmaW5lIFNESU9fRlVOMV9JTlRSX0NMUl9SRUcgICAgICAgICAgICAgICAgICAweDAwMDgKKyNkZWZpbmUgU0RJT19SRUdfSElHSF9TUEVFRCAgICAgICAgICAgICAgICAgICAgIDB4MDAxMworCisjZGVmaW5lIFJTSV9HRVRfU0RJT19JTlRFUlJVUFRfVFlQRShfSSwgVFlQRSkgICAgICBcCisJewkJCQkJICAgXAorCQlUWVBFID0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJKF9JICYgKDEgPDwgUEtUX0JVRkZfQVZBSUxBQkxFKSkgPyBcCisJCUJVRkZFUl9BVkFJTEFCTEUgOgkJICAgXAorCQkoX0kgJiAoMSA8PCBNU0RVX1BLVF9QRU5ESU5HKSkgPyAgIFwKKwkJTVNEVV9QQUNLRVRfUEVORElORyA6ICAgICAgICAgICAgICBcCisJCShfSSAmICgxIDw8IEZXX0FTU0VSVF9JTkQpKSA/ICAgICAgXAorCQlGSVJNV0FSRV9BU1NFUlRfSU5EIDogVU5LTk9XTl9JTlQ7IFwKKwl9CisKKy8qIGNvbW1vbiByZWdpc3RlcnMgaW4gU0RJTyBmdW5jdGlvbjEgKi8KKyNkZWZpbmUgVEFfU09GVF9SRVNFVF9SRUcgICAgICAgICAgICAweDAwMDQKKyNkZWZpbmUgVEFfVEgwX1BDX1JFRyAgICAgICAgICAgICAgICAweDA0MDAKKyNkZWZpbmUgVEFfSE9MRF9USFJFQURfUkVHICAgICAgICAgICAweDA4NDQKKyNkZWZpbmUgVEFfUkVMRUFTRV9USFJFQURfUkVHICAgICAgICAweDA4NDgKKworI2RlZmluZSBUQV9TT0ZUX1JTVF9DTFIgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVEFfU09GVF9SU1RfU0VUICAgICAgICAgIC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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogRGVzY3JpcHRpb246CisgKgorICogVGhpcyBmaWxlIGlzIGZvciBSVEw4NzIzQiBDby1leGlzdCBtZWNoYW5pc20KKyAqCisgKiBIaXN0b3J5CisgKiAyMDEyLzExLzE1IENvc2EgZmlyc3QgY2hlY2sgaW4uCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBpbmNsdWRlIGZpbGVzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjaW5jbHVkZSAiaGFsYnRfcHJlY29tcC5oIgorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBHbG9iYWwgdmFyaWFibGVzLCB0aGVzZSBhcmUgc3RhdGljIHZhcmlhYmxlcworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHN0cnVjdCBjb2V4X2RtXzg3MjNiXzJhbnQgZ2xjb2V4X2RtXzg3MjNiXzJhbnQ7CitzdGF0aWMgc3RydWN0IGNvZXhfZG1fODcyM2JfMmFudCAqY29leF9kbSA9ICZnbGNvZXhfZG1fODcyM2JfMmFudDsKK3N0YXRpYyBzdHJ1Y3QgY29leF9zdGFfODcyM2JfMmFudCBnbGNvZXhfc3RhXzg3MjNiXzJhbnQ7CitzdGF0aWMgc3RydWN0IGNvZXhfc3RhXzg3MjNiXzJhbnQgKmNvZXhfc3RhID0gJmdsY29leF9zdGFfODcyM2JfMmFudDsKKworc3RhdGljIGNvbnN0IGNoYXIgKmNvbnN0IGdsYnRfaW5mb19zcmNfODcyM2JfMmFudFtdID0geworCSJCVCBJbmZvW3dpZmkgZnddIiwKKwkiQlQgSW5mb1tidCByc3BdIiwKKwkiQlQgSW5mb1tidCBhdXRvIHJlcG9ydF0iLAorfTsKKworc3RhdGljIHUzMiBnbGNvZXhfdmVyX2RhdGVfODcyM2JfMmFudCA9IDIwMTMwNzMxOworc3RhdGljIHUzMiBnbGNvZXhfdmVyXzg3MjNiXzJhbnQgPSAweDNiOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIGxvY2FsIGZ1bmN0aW9uIHByb3RvIHR5cGUgaWYgbmVlZGVkCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIGxvY2FsIGZ1bmN0aW9uIHN0YXJ0IHdpdGggYnRjODcyM2IyYW50XworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHU4IGJ0Yzg3MjNiMmFudF9idF9yc3NpX3N0YXRlKHU4IGxldmVsX251bSwgdTggcnNzaV90aHJlc2gsCisJCQkJICAgICB1OCByc3NpX3RocmVzaDEpCit7CisJczMyIGJ0X3Jzc2kgPSAwOworCXU4IGJ0X3Jzc2lfc3RhdGUgPSBjb2V4X3N0YS0+cHJlX2J0X3Jzc2lfc3RhdGU7CisKKwlidF9yc3NpID0gY29leF9zdGEtPmJ0X3Jzc2k7CisKKwlpZiAobGV2ZWxfbnVtID09IDIpIHsKKwkJaWYgKChjb2V4X3N0YS0+cHJlX2J0X3Jzc2lfc3RhdGUgP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RDb2V4XSwgdXA9JWQsIGRuPSVkLCBtPSVkLCBuPSVkLCB3YWl0X2NvdW50PSVkXG4iLAorCQkJICB1cCwgZG4sIG0sIG4sIHdhaXRfY291bnQpOworCQlyZXN1bHQgPSAwOworCQl3YWl0X2NvdW50Kys7CisJCSAvKiBubyByZXRyeSBpbiB0aGUgbGFzdCAyLXNlY29uZCBkdXJhdGlvbiovCisJCWlmIChyZXRyeV9jb3VudCA9PSAwKSB7CisJCQl1cCsrOworCQkJZG4tLTsKKworCQkJaWYgKGRuIDw9IDApCisJCQkJZG4gPSAwOworCisJCQlpZiAodXAgPj0gbikgeworCQkJCXdhaXRfY291bnQgPSAwOworCQkJCW4gPSAzOworCQkJCXVwID0gMDsKKwkJCQlkbiA9IDA7CisJCQkJcmVzdWx0ID0gMTsKKwkJCQlCVENfUFJJTlQoQlRDX01TR19BTEdPUklUSE0sCisJCQkJCSAgQUxHT19UUkFDRV9GV19ERVRBSUwsCisJCQkJCSAgIltCVENvZXhdLCBJbmNyZWFzZSB3aWZpICIKKwkJCQkJICAiZHVyYXRpb24hIVxuIik7CisJCQl9IC8qIDw9MyByZXRyeSBpbiB0aGUgbGFzdCAyLXNlY29uZCBkdXJhdGlvbiovCisJCX0gZWxzZSBpZiAocmV0cnlfY291bnQgPD0gMykgeworCQkJdXAtLTsKKwkJCWRuKys7CisKKwkJCWlmICh1cCA8PSAwKQorCQkJCXVwID0gMDsKKworCQkJaWYgKGRuID09IDIpIHsKKwkJCQlpZiAod2FpdF9jb3VudCA8PSAyKQorCQkJCQltKys7CisJCQkJZWxzZQorCQkJCQltID0gMTsKKworCQkJCWlmIChtID49IDIwKQorCQkJCQltID0gMjA7CisKKwkJCQluID0gMyAqIG07CisJCQkJdXAgPSAwOworCQkJCWRuID0gMDsKKwkJCQl3YWl0X2NvdW50ID0gMDsKKwkJCQlyZXN1bHQgPSAtMTsKKwkJCQlCVENfUFJJTlQoQlRDX01TR19BTEdPUklUSE0sCisJCQkJCSAgQUxHT19U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CSAgImFsZ29yaXRobSA9IGNvZXhpc3QgQWxsIE9mZiEhXG4iKTsKKwkJCWJ0Yzg3MjNiMmFudF9jb2V4X2FsbG9mZihidGNvZXhpc3QpOworCQkJYnJlYWs7CisJCX0KKwkJY29leF9kbS0+cHJlX2FsZ29yaXRobSA9IGNvZXhfZG0tPmN1cl9hbGdvcml0aG07CisJfQorfQorCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogIHdvcmsgYXJvdW5kIGZ1bmN0aW9uIHN0YXJ0IHdpdGggd2FfYnRjODcyM2IyYW50XworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICBleHRlcm4gZnVuY3Rpb24gc3RhcnQgd2l0aCBFWGJ0Yzg3MjNiMmFudF8KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIGV4X2hhbGJ0Yzg3MjNiMmFudF9pbml0X2h3Y29uZmlnKHN0cnVjdCBidGNfY29leGlzdCAqYnRjb2V4aXN0KQoreworCXN0cnVjdCBidGNfYm9hcmRfaW5mbyAqYm9hcmRfaW5mbyA9ICZidGNvZXhpc3QtPmJvYXJkX2luZm87CisJdTMyIHUzMnRtcCA9IDAsIGZ3X3ZlcjsKKwl1OCB1OHRtcCA9IDA7CisJdTggaDJjX3BhcmFtZXRlclsyXSA9IHswfTsKKworCisJQlRDX1BSSU5UKEJUQ19NU0dfSU5URVJGQUNFLCBJTlRGX0lOSVQsCisJCSAgIltCVENvZXhdLCAyQW50IEluaXQgSFcgQ29uZmlnISFcbiIpOworCisJLyogYmFja3VwIHJmIDB4MWUgdmFsdWUg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vZXhpc3QtPmJvYXJkX2luZm87CisJc3RydWN0IGJ0Y19zdGFja19pbmZvICpzdGFja19pbmZvID0gJmJ0Y29leGlzdC0+c3RhY2tfaW5mbzsKKwlzdGF0aWMgdTggZGlzX3Zlcl9pbmZvX2NudDsKKwl1MzIgZndfdmVyID0gMCwgYnRfcGF0Y2hfdmVyID0gMDsKKworCUJUQ19QUklOVChCVENfTVNHX0FMR09SSVRITSwgQUxHT19UUkFDRSwKKwkJICAiW0JUQ29leF0sID09PT09PT09PT09PT09PT09PT09PT09PT09IgorCQkgICJQZXJpb2RpY2FsPT09PT09PT09PT09PT09PT09PT09PT09PT09XG4iKTsKKworCWlmIChkaXNfdmVyX2luZm9fY250IDw9IDUpIHsKKwkJZGlzX3Zlcl9pbmZvX2NudCArPSAxOworCQlCVENfUFJJTlQoQlRDX01TR19JTlRFUkZBQ0UsIElOVEZfSU5JVCwKKwkJCSAgIltCVENvZXhdLCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqIgorCQkJICAiKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4iKTsKKwkJQlRDX1BSSU5UKEJUQ19NU0dfSU5URVJGQUNFLCBJTlRGX0lOSVQsCisJCQkgICJbQlRDb2V4XSwgQW50IFBHIE51bS8gQW50IE1lY2gvICIKKwkJCSAgIkFudCBQb3MgPSAlZC8gJWQvICVkXG4iLCBib2FyZF9pbmZvLT5wZ19hbnRfbnVtLAorCQkJICBib2FyZF9pbmZvLT5idGRtX2FudF9udW0sIGJvYXJkX2luZm8tPmJ0ZG1fYW50X3Bvcyk7CisJCUJUQ19QUklOVChCVENfTVNHX0lOVEVSRkFDRSwgSU5URl9JTklULAorCQkJICAiW0JUQ29leF0sIEJUIHN0YWNrLyBoY2kgZXh0IHZlciA9ICVzIC8gJWRcbiIsCisJCQkgICgoc3RhY2tfaW5mby0+cHJvZmlsZV9ub3RpZmllZCkgPyAiWWVzIiA6ICJObyIpLAorCQkJICBzdGFja19pbmZvLT5oY2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BQVVJQT1NFLiAgU2VlIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IKKyAqIG1vcmUgZGV0YWlscy4KKyAqCisgKiBUaGUgZnVsbCBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBpcyBpbmNsdWRlZCBpbiB0aGlzIGRpc3RyaWJ1dGlvbiBpbiB0aGUKKyAqIGZpbGUgY2FsbGVkIExJQ0VOU0UuCisgKgorICogQ29udGFjdCBJbmZvcm1hdGlvbjoKKyAqIHdsYW5mYWUgPHdsYW5mYWVAcmVhbHRlay5jb20+CisgKiBSZWFsdGVrIENvcnBvcmF0aW9uLCBOby4gMiwgSW5ub3ZhdGlvbiBSb2FkIElJLCBIc2luY2h1IFNjaWVuY2UgUGFyaywKKyAqIEhzaW5jaHUgMzAwLCBUYWl3YW4uCisgKgorICogTGFycnkgRmluZ2VyIDxMYXJyeS5GaW5nZXJAbHdmaW5nZXIubmV0PgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNpZm5kZWYgX0hBTDg3MjNCXzJfQU5UCisjZGVmaW5lIF9IQUw4NzIzQl8yX0FOVAorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBUaGUgZm9sbG93aW5nIGlzIGZvciA4NzIzQiAyQW50IEJUIENvLWV4aXN0IGRlZmluaXRpb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lCUJUX0FVVE9fUkVQT1JUX09OTFlfODcyM0JfMkFOVAkJCTEKKworI2RlZmluZQlCVF9JTkZPXzg3MjNCXzJBTlRfQl9GVFAJCQlCSVQ3CisjZGVmaW5lCUJUX0lORk9fODcyM0JfMkFOVF9CX0Ey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lX2FsZ29yaXRobTsKKwl1OCBjdXJfYWxnb3JpdGhtOworCXU4IGJ0X3N0YXR1czsKKwl1OCB3aWZpX2NobmxfaW5mb1szXTsKKworCWJvb2wgbmVlZF9yZWNvdmVyXzB4OTQ4OworCXUxNiBiYWNrdXBfMHg5NDg7Cit9OworCitzdHJ1Y3QgY29leF9zdGFfODcyM2JfMmFudCB7CisJYm9vbCBidF9saW5rX2V4aXN0OworCWJvb2wgc2NvX2V4aXN0OworCWJvb2wgYTJkcF9leGlzdDsKKwlib29sIGhpZF9leGlzdDsKKwlib29sIHBhbl9leGlzdDsKKworCWJvb2wgdW5kZXJfbHBzOworCWJvb2wgdW5kZXJfaXBzOworCXUzMiBoaWdoX3ByaW9yaXR5X3R4OworCXUzMiBoaWdoX3ByaW9yaXR5X3J4OworCXUzMiBsb3dfcHJpb3JpdHlfdHg7CisJdTMyIGxvd19wcmlvcml0eV9yeDsKKwl1OCBidF9yc3NpOworCXU4IHByZV9idF9yc3NpX3N0YXRlOworCXU4IHByZV93aWZpX3Jzc2lfc3RhdGVbNF07CisJYm9vbCBjMmhfYnRfaW5mb19yZXFfc2VudDsKKwl1OCBidF9pbmZvX2MyaFtCVF9JTkZPX1NSQ184NzIzQl8yQU5UX01BWF1bMTBdOworCXUzMiBidF9pbmZvX2MyaF9jbnRbQlRfSU5GT19TUkNfODcyM0JfMkFOVF9NQVhdOworCWJvb2wgYzJoX2J0X2lucXVpcnlfcGFnZTsKKwl1OCBidF9yZXRyeV9jbnQ7CisJdTggYnRfaW5mb19leHQ7Cit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBUaGUgZm9sbG93aW5nIGlzIGludGVyZmFjZSB3aGljaCB3aWxsIG5vdGlmeSBjb2V4IG1vZHVsZS4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdHJ1Y3QgYnRjX2NvZXhpc3QgZ2xfYnRfY29leGlzdDsKKwordTMyIGJ0Y19kYmdfdHlwZVtCVENfTVNHX01BWF07CitzdGF0aWMgdTggYnRjX2RiZ19idWZbMTAwXTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoJCURlYnVnIHJlbGF0ZWQgZnVuY3Rpb24KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgYm9vbCBoYWxidGNfaXNfYnRfY29leGlzdF9hdmFpbGFibGUoc3RydWN0IGJ0Y19jb2V4aXN0ICpidGNvZXhpc3QpCit7CisJaWYgKCFidGNvZXhpc3QtPmJpbmRlZCB8fCBOVUxMID09IGJ0Y29leGlzdC0+YWRhcHRlcikKKwkJcmV0dXJuIGZhbHNlOworCisJcmV0dXJuIHRydWU7Cit9CisKK3N0YXRpYyBib29sIGhhbGJ0Y19pc193aWZpX2J1c3koc3RydWN0IHJ0bF9wcml2ICpydGxwcml2KQoreworCWlmIChydGxwcml2LT5saW5rX2luZm8uYnVzeXRyYWZmaWMpCisJCXJldHVybiB0cnVlOworCWVsc2UKKwkJcmV0dXJuIGZhbHNlOworfQorCitzdGF0aWMgdm9pZCBoYWxidGNfZGJnX2luaXQodm9pZCkKK3sKKwl1OCBpOworCisJZm9yIChpID0gMDsgaSA8IEJUQ19NU0dfTUFYOyBpKyspCisJCWJ0Y19kYmdfdHlwZVtpXSA9IDA7CisKKwlidGNfZGJnX3R5cGVbQlRDX01TR19JTlRFUkZBQ0VdID0KKy8qCQkJSU5URl9JTklUCQkJCXwgKi8KKy8qCQkJSU5URl9OT1RJRlkJCQkJfCAqLworCQkJMDsKKworCWJ0Y19kYmdfdHlwZVtCVENfTVNHX0FMR09SSVRITV0gPQorLyoJCQlBTEdPX0JUX1JTU0lfU1RBVEU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CAweDA3LCAweDA0LCAweDAyLCAweDAxfSwgLyogIDcsIC0xMi41ZEIgKi8KKwl7MHgwZCwgMHgwZCwgMHgwYywgMHgwYSwgMHgwNywgMHgwNSwgMHgwMiwgMHgwMX0sIC8qICA4LCAtMTIuMGRCICovCisJezB4MGUsIDB4MGUsIDB4MGMsIDB4MGEsIDB4MDgsIDB4MDUsIDB4MDIsIDB4MDF9LCAvKiAgOSwgLTExLjVkQiAqLworCXsweDBmLCAweDBmLCAweDBkLCAweDBiLCAweDA4LCAweDA1LCAweDAzLCAweDAxfSwgLyogMTAsIC0xMS4wZEIgKi8KKwl7MHgxMCwgMHgxMCwgMHgwZSwgMHgwYiwgMHgwOCwgMHgwNSwgMHgwMywgMHgwMX0sIC8qIDExLCAtMTAuNWRCICovCisJezB4MTEsIDB4MTEsIDB4MGYsIDB4MGMsIDB4MDksIDB4MDYsIDB4MDMsIDB4MDF9LCAvKiAxMiwgLTEwLjBkQiAqLworCXsweDEyLCAweDEyLCAweDBmLCAweDBjLCAweDA5LCAweDA2LCAweDAzLCAweDAxfSwgLyogMTMsIC05LjVkQiAqLworCXsweDEzLCAweDEzLCAweDEwLCAweDBkLCAweDBhLCAweDA2LCAweDAzLCAweDAxfSwgLyogMTQsIC05LjBkQiAqLworCXsweDE0LCAweDE0LCAweDExLCAweDBlLCAweDBiLCAweDA3LCAweDAzLCAweDAyfSwgLyogMTUsIC04LjVkQiAqLworCXsweDE2LCAweDE1LCAweDEyLCAweDBmLCAweDBiLCAweDA3LCAweDA0LCAweDAxfSwgLyogMTYsIC04LjBkQiAqLworCXsweDE3LCAweDE2LCAweDEzLCAweDEwLCAweDBjLCAweDA4LCAweDA0LCAweDAyfSwgLyogMTcsIC03LjVkQiAqLworCXsweDE4LCAweDE3LCAweDE1LCAweDExLCAweDBjLCAweDA4LCAweDA0LCAweDAyfSwgLyogMTgsIC03LjBkQiAqLworCXsweDFhLCAweDE5LCAweDE2LCAweDEyLCAweDBkLCAweDA5LCAweDA0LCAweDAyfSwgLyogMTksIC02LjVkQiAqLworCXsweDFiLCAweDFhLCAweDE3LCAweDEzLCAweDBlLCAweDA5LCAweDA0LCAweDAyfSwgLyogMjAsIC02LjBkQiAqLworCXsweDFkLCAweDFjLCAweDE4LCAweDE0LCAweDBmLCAweDBhLCAweDA1LCAweDAyfSwgLyogMjEsIC01LjVkQiAqLworCXsweDFmLCAweDFlLCAweDFhLCAweDE1LCAweDEwLCAweDBhLCAweDA1LCAweDAyfSwgLyogMjIsIC01LjBkQiAqLworCXsweDIwLCAweDIwLCAweDFiLCAweDE2LCAweDExLCAweDA4LCAweDA1LCAweDAyfSwgLyogMjMsIC00LjVkQiAqLworCXsweDIyLCAweDIxLCAweDFkLCAweDE4LCAweDExLCAweDBiLCAweDA2LCAweDAyfSwgLyogMjQsIC00LjBkQiAqLworCXsweDI0LCAweDIzLCAweDFmLCAweDE5LCAweDEzLCAweDBjLCAweDA2LCAweDAzfSwgLyogMjUsIC0zLjVkQiAqLworCXsweDI2LCAweDI1LCAweDIxLCAweDFiLCAweDE0LCAweDBkLCAweDA2LCAweDAzfSwgLyogMjYsIC0zLjBkQiAqLworCXsweDI4LCAweDI4LCAweDIyLCAweDFjLCAweDE1LCAweDBkLCAweDA3LCAweDAzfSwgLyogMjcsIC0yLjVkQiAqLworCXsweDJiLCAweDJhLCAweDI1LCAweDFlLCAweDE2LCAweDBlLCAweDA3LCAweDAzfSwgLyogMjgsIC0yLjBkQiAqLworCXsweDJkLCAweDJkLCAweDI3LCAweDFmLCAweDE4LCAweDBmLCAweDA4LCAweDAzfSwgLyogMjksIC0xLjVkQiAqLworCXsweDMwLCAweDJmLCAweDI5LCAweDIxLCAweDE5LCAweDEwLCAweDA4LCAweDAzfSwgLyogMzAsIC0xLjBkQiAqLworCXsweDMzLCAweDMyLCAweDJiLCAweDIzLCAweDFhLCAweDExLCAweDA4LCAweDA0fSwgLyogMzEsIC0wLjVkQiAqLworCXsweDM2LCAweDM1LCAweDJlLCAweDI1LCAweDF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JKCYoKHJ0bHByaXYpLT5wc2MpKQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAgICBCbHVldG9vdGggQ28tZXhpc3RlbmNlIFJlbGF0ZWQKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2VudW0gYnRfYW50X251bSB7CisJQU5UX1gyID0gMCwKKwlBTlRfWDEgPSAxLAorfTsKKworZW51bSBidF9jb190eXBlIHsKKwlCVF8yV0lSRSA9IDAsCisJQlRfSVNTQ18zV0lSRSA9IDEsCisJQlRfQUNDRUwgPSAyLAorCUJUX0NTUl9CQzQgPSAzLAorCUJUX0NTUl9CQzggPSA0LAorCUJUX1JUTDg3NTYgPSA1LAorCUJUX1JUTDg3MjNBID0gNiwKKwlCVF9SVEw4ODIxQSA9IDcsCisJQlRfUlRMODcyM0IgPSA4LAorCUJUX1JUTDgxOTJFID0gOSwKKwlCVF9SVEw4ODEyQSA9IDExLAorfTsKKworZW51bSBidF90b3RhbF9hbnRfbnVtIHsKKwlBTlRfVE9UQUxfWDIgPSAwLAorCUFOVF9UT1RBTF9YMSA9IDEKK307CisKK2VudW0gYnRfY3VyX3N0YXRlIHsKKwlCVF9PRkYgPSAwLAorCUJUX09OID0gMSwKK307CisKK2VudW0gYnRfc2VydmljZV90eXBlIHsKKwlCVF9TQ08gPSAwLAorCUJUX0EyRFAgPSAxLAorCUJUX0hJRCA9IDIsCisJQlRfSElEX0lETEUgPSAzLAorCUJUX1NDQU4gPSA0LAorCUJUX0lETEUgPSA1LAorCUJUX09USEVSX0FDVElPTiA9IDYsCisJQlRfQlVTWSA9IDcsCisJQlRfT1RIRVJCVVNZID0gOCwKKwlCVF9QQU4gPSA5LAorfTsKKworZW51bSBidF9yYWRpb19zaGFyZWQgeworCUJUX1JBRElPX1NIQVJFRCA9IDAsCisJQlRfUkFESU9fSU5ESVZJRFVBTCA9IDEsCit9OworCiAKIC8qKioqKioqKioqKioqKioqKioqKioqK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jbXVfdHlwZSwgQ01VX1JFRzE2LCB2YWwpOworCisJLyogQ29uZmlndXJlIGZvciBTQVRBICovCisJY211X3JkKGN0eCwgY211X3R5cGUsIENNVV9SRUczMCwgJnZhbCk7CisJdmFsID0gQ01VX1JFRzMwX1BDSUVfTU9ERV9TRVQodmFsLCAweDApOworCXZhbCA9IENNVV9SRUczMF9MT0NLX0NPVU5UX1NFVCh2YWwsIDB4Myk7CisJY211X3dyKGN0eCwgY211X3R5cGUsIENNVV9SRUczMCwgdmFsKTsKKworCS8qIERpc2FibGUgc3RhdGUgbWFjaGluZSBieXBhc3MgKi8KKwljbXVfd3IoY3R4LCBjbXVfdHlwZSwgQ01VX1JFRzMxLCAweEYpOworCisJY211X3JkKGN0eCwgY211X3R5cGUsIENNVV9SRUczMiwgJnZhbCk7CisJdmFsID0gQ01VX1JFRzMyX1BWVF9DQUxfV0FJVF9TRUxfU0VUKHZhbCwgMHgzKTsKKwlpZiAoY211X3R5cGUgPT0gUkVGX0NNVSB8fCBwcmVBM0NoaXApCisJCXZhbCA9IENNVV9SRUczMl9JUkVGX0FESl9TRVQodmFsLCAweDMpOworCWVsc2UKKwkJdmFsID0gQ01VX1JFRzMyX0lSRUZfQURKX1NFVCh2YWwsIDB4MSk7CisJY211X3dyKGN0eCwgY211X3R5cGUsIENNVV9SRUczMiwgdmFsKTsKKworCS8qIFNldCBWQ08gY2FsaWJyYXRpb24gdGhyZXNob2xkICovCisJaWYgKGNtdV90eXBlICE9IFJFRl9DTVUgJiYgcHJlQTNDaGlwKQorCQljbXVfd3IoY3R4LCBjbXVfdHlwZSwgQ01VX1JFRzM0LCAweDhkMjcpOworCWVsc2UKKwkJY211X3dyKGN0eCwgY211X3R5cGUsIENNVV9SRUczNCwgMHg4NzNjKTsKKworCS8qIFNldCBDVExFIE92ZXJyaWRlIGFuZCBvdmVycmlkZSB3YWl0aW5nIGZyb20gc3RhdGUgbWFjaGluZSAqLworCWNtdV93cihjdHgsIGNtdV90eXBlLCBDTV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25zdCBwcGkyXzE2YmdycFtdID0geyAicHBpMl8xNmJncnAiIH07CitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHBwaTBncnBbXSA9IHsgInBwaTBfOGJncnAiLAorCQkJCQkicHBpMF8xNmJncnAiLAorCQkJCQkicHBpMF8yNGJncnAiIH07CitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHBwaTFncnBbXSA9IHsgInBwaTFfOGJncnAiLAorCQkJCQkicHBpMV8xNmJncnAiIH07CitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHBwaTJncnBbXSA9IHsgInBwaTJfOGJncnAiLAorCQkJCQkicHBpMl8xNmJncnAiIH07CiBzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGxwMGdycFtdID0geyAibHAwZ3JwIiB9Owogc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBscDFncnBbXSA9IHsgImxwMWdycCIgfTsKIHN0YXRpYyBjb25zdCBjaGFyICogY29uc3QgbHAyZ3JwW10gPSB7ICJscDJncnAiIH07CiBzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGxwM2dycFtdID0geyAibHAzZ3JwIiB9OwogCiBzdGF0aWMgY29uc3Qgc3RydWN0IGFkaV9wbXhfZnVuYyBhZGlfcG14X2Z1bmN0aW9uc1tdID0gewotCUFESV9QTVhfRlVOQ1RJT04oInVhcnQwIiwgdWFydDBncnAsIHVhcnQwX211eCksCi0JQURJX1BNWF9GVU5DVElPTigidWFydDBfY3RzcnRzIiwgdWFydDBjdHNydHNncnAsIHVhcnQwX2N0c3J0c19tdXgpLAotCUFESV9QTVhfRlVOQ1RJT04oInVhcnQxIiwgdWFydDFncnAsIHVhcnQxX211eCksCi0JQURJX1BNWF9GVU5DVElPTigidWFydDFfY3RzcnRzIiwgdWFydDFjdHNydHNncnAsIHVhcnQxX2N0c3J0c19tdXgpLAotCUFESV9QTVhfRlVOQ1RJT04oInJzaTAiLCByc2kwZ3JwLCByc2kwX211eCksCi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ICAgICAgICBVTFBJLCAgICAgMHgzMDA4LCAgTiwgIE4sICBOKSwKQEAgLTI2MzUsNiArMTc0MSw3IEBACiAJUElOR1JPVVAocGJiNiwgICAgICAgICAgICAgICAgICAgVkdQNiwgICAgICAgRElTUExBWUEsICAgRElTUExBWUIsICAgICBSU1ZENCwgICAgICAgUlNWRDQsICAgIDB4MzJhNCwgIE4sICBOLCAgTiksCiAJUElOR1JPVVAocGJiNywgICAgICAgICAgICAgICAgICAgSTJTNCwgICAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgUlNWRDQsICAgIDB4MzJhOCwgIE4sICBOLCAgTiksCiAJUElOR1JPVVAocGNjMiwgICAgICAgICAgICAgICAgICAgSTJTNCwgICAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgUlNWRDQsICAgIDB4MzJhYywgIE4sICBOLCAgTiksCisJUElOR1JPVVAoanRhZ19ydGNrLCAgICAgICAgICAgICAgUlRDSywgICAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgUlRDSywgICAgIDB4MzJiMCwgIE4sICBOLCAgTiksCiAJUElOR1JPVVAocHdyX2kyY19zY2xfcHo2LCAgICAgICAgSTJDUFdSLCAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgUlNWRDQsICAgIDB4MzJiNCwgIFksICBOLCAgTiksCiAJUElOR1JPVVAocHdyX2kyY19zZGFfcHo3LCAgICAgICAgSTJDUFdSLCAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgUlNWRDQsICAgIDB4MzJiOCwgIFksICBOLCAgTiksCiAJUElOR1JPVVAoa2Jfcm93MF9wcjAsICAgICAgICAgICAgS0JDLCAgICAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgUlNWRDQsICAgIDB4MzJiYywgIE4sICBOLCAgTiksCkBAIC0yNjYxLDYgKzE3NjgsNyBAQAogCVBJTkdST1VQKGNvcmVfcHdyX3JlcSwgICAgICAgICAgIFBXUk9OLCAgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIFJTVkQ0LCAgICAweDMzMjQsICBOLCAgTiwgIE4pLAogCVBJTkdST1VQKGNwdV9wd3JfcmVxLCAgICAgICAgICAgIENQVSwgICAgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIFJTVkQ0LCAgICAweDMzMjgsICBOLCAgTiwgIE4pLAogCVBJTkdST1VQKHB3cl9pbnRfbiwgICAgICAgICAgICAgIFBNSSwgICAgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIFJTVkQ0LCAgICAweDMzMmMsICBOLCAgTiwgIE4pLAorCVBJTkdST1VQKGNsa18zMmtfaW4sICAgICAgICAgICAgIENMSywgICAgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIENMSywgICAgICAweDMzMzAsICBOLCAgTiwgIE4pLAogCVBJTkdST1VQKG93ciwgICAgICAgICAgICAgICAgICAgIE9XUiwgICAgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIFJTVkQ0LCAgICAweDMzMzQsICBOLCAgTiwgIFkpLAogCVBJTkdST1VQKGRhcDFfZnNfcG4wLCAgICAgICAgICAgIEkyUzAsICAgICAgIEhEQSwgICAgICAgIEdNSSwgICAgICAgICAgUlNWRDQsICAgICAgIFJTVkQ0LCAgICAweDMzMzgsICBOLCAgTiwgIE4pLAogCVBJTkdST1VQKGRhcDFfZGluX3BuMSwgICAgICAgICAgIEkyUzAsICAgICAgIEhEQSwgICAgICAgIEdNSSwgICAgICAgICAgUlNWRDQsICAgICAgIFJTVkQ0LCAgICAweDMzM2MsICBOLCAgTiwgIE4pLApAQCAtMjY5NywzOC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QiwgICAgUFdNMiwgICAgICAgMHgzMTk4LCAgTiwgIE4sICBOKSwKICAgICAgICBQSU5HUk9VUChwdTYsICAgICAgICAgICAgICAgICAgICBQV00zLCAgICAgICBVQVJUQSwgICAgICBSU1ZEMywgICAgICAgIEdNSSwgICAgICAgICBSU1ZEMywgICAgICAweDMxOWMsICBOLCAgTiwgIE4pLAotICAgICAgIFBJTkdST1VQKGdlbjFfaTJjX3NjbF9wYzQsICAgICAgIEkyQzEsICAgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIEkyQzEsICAgICAgIDB4MzFhMCwgIFksICBOLCAgTiksCi0gICAgICAgUElOR1JPVVAoZ2VuMV9pMmNfc2RhX3BjNSwgICAgICAgSTJDMSwgICAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgSTJDMSwgICAgICAgMHgzMWE0LCAgWSwgIE4sICBOKSwKKyAgICAgICBQSU5HUk9VUChnZW4xX2kyY19zZGFfcGM1LCAgICAgICBJMkMxLCAgICAgICBSU1ZEMiwgICAgICBSU1ZEMywgICAgICAgIFJTVkQ0LCAgICAgICBJMkMxLCAgICAgICAweDMxYTAsICBZLCAgTiwgIE4pLAorICAgICAgIFBJTkdST1VQKGdlbjFfaTJjX3NjbF9wYzQsICAgICAgIEkyQzEsICAgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIEkyQzEsICAgICAgIDB4MzFhNCwgIFksICBOLCAgTiksCiAgICAgICAgUElOR1JPVVAoZGFwNF9mc19wcDQsICAgICAgICAgICAgSTJTMywgICAgICAgR01JLCAgICAgICAgRFRWLCAgICAgICAgICBSU1ZENCwgICAgICAgSTJTMywgICAgICAgMHgzMWE4LCAgTiwgIE4sICBOKSwKICAgICAgICBQSU5HUk9VUChkYXA0X2Rpbl9wcDUsICAgICAgICAgICBJMlMzLCAgICAgICBHTUksICAgICAgICBSU1ZEMywgICAgICAgIFJTVkQ0LCAgICAgICBJMlMzLCAgICAgICAweDMxYWMsICBOLCAgTiwgIE4pLAogICAgICAgIFBJTkdST1VQKGRhcDRfZG91dF9wcDYsICAgICAgICAgIEkyUzMsICAgICAgIEdNSSwgICAgICAgIERUViwgICAgICAgICAgUlNWRDQsICAgICAgIEkyUzMsICAgICAgIDB4MzFiMCwgIE4sICBOLCAgTiksCkBAIC0yOTY0LDkgKzE4NTksOSBAQAogICAgICAgIFBJTkdST1VQKHNkbW1jNF9kYXQ0X3BhYTQsICAgICAgIFNETU1DNCwgICAgIFNQSTMsICAgICAgIEdNSSwgICAgICAgICAgUlNWRDQsICAgICAgIFNETU1DNCwgICAgIDB4MzI3MCwgIE4sICBZLCAgTiksCiAgICAgICAgUElOR1JPVVAoc2RtbWM0X2RhdDVfcGFhNSwgICAgICAgU0RNTUM0LCAgICAgU1BJMywgICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgU0RNTUM0LCAgICAgMHgzMjc0LCAgTiwgIFksICBOKSwKICAgICAgICBQSU5HUk9VUChzZG1tYzRfZGF0Nl9wYWE2LCAgICAgICBTRE1NQzQsICAgICBTUEkzLCAgICAgICBHTUksICAgICAgICAgIFJTVkQ0LCAgICAgICBTRE1NQzQsICAgICAweDMyNzgsICBOLCAgWSwgIE4pLAotICAgICAgIFBJTkdST1VQKHNkbW1jNF9kYXQ3X3BhYTcsICAgICAgIFNETU1DNCwgICAgIFJTVkQxLCAgICAgIEdNSSwgICAgICAgICAgUlNWRDQsICAgICAgIFNETU1DNCwgICAgIDB4MzI3YywgIE4sICBZLCAgTiksCisgICAgICAgUElOR1JPVVAoc2RtbWM0X2RhdDdfcGFhNywgICAgICAgU0RNTUM0LCAgICAgUlNWRDIsICAgICAgR01JLCAgICAgICAgICBSU1ZENCwgICAgICAgU0RNTUM0LCAgICAgMHgzMjdjLCAgTiwgIFksICBOKSwKICAgICAgICBQSU5HUk9VUChjYW1fbWNsa19wY2MwLCAgICAgICAgICBWSSwgICAgICAgICBWSV9BTFQxLCAgICBWSV9BTFQzLCAgICAgIFNETU1DMiwgICAgICBWSSwgICAgICAgICAweDMyODQsICBOLCAgTiwgIE4pLAotICAgICAgIFBJTkdST1VQKHBjYzEsICAgICAgICAgICAgICAgICAgIEkyUzQsICAgICAgIFJTVkQxLCAgICAgIFJTVkQzLCAgICAgICAgU0RNTUMyLCAgICAgIEkyUzQsICAgICAgIDB4MzI4OCwgIE4sICBOLCAgTiksCisgICAgICAgUElOR1JPVVAocGNjMSwgICAgICAgICAgICAgICAgICAgSTJTNCwgICAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBTRE1NQzIsICAgICAgSTJTNCwgICAgICAgMHgzMjg4LCAgTiwgIE4sICBOKSwKICAgICAgICBQSU5HUk9VUChwYmIwLCAgICAgICAgICAgICAgICAgICBWR1A2LCAgICAgICBWSU1DTEsyLCAgICBTRE1NQzIsICAgICAgIFZJTUNMSzJfQUxULCBWR1A2LCAgICAgICAweDMyOGMsICBOLCAgTiwgIE4pLAogICAgICAgIFBJTkdST1VQKGNhbV9pMmNfc2NsX3BiYjEsICAgICAgIFZHUDEsICAgICAgIEkyQzMsICAgICAgIFJTVkQzLCAgICAgICAgU0RNTUMyLCAgICAgIFZHUDEsICAgICAgIDB4MzI5MCwgIFksICBOLCAgTiksCiAgICAgICAgUElOR1JPVVAoY2FtX2kyY19zZGFfcGJiMiwgICAgICAgVkdQMiwgICAgICAgSTJDMywgICAgICAgUlNWRDMsICAgICAgICBTRE1NQzIsICAgICAgVkdQMiwgICAgICAgMHgzMjk0LCAgWSwgIE4sICBOKSwKQEAgLTMwNDcsOCArMTk0Miw4IEBACiAgICAgICAgUElOR1JPVVAoZ3Bpb193M19hdWRfcHczLCAgICAgICAgU1BJNiwgICAgICAgU1BJMSwgICAgICAgU1BJMiwgICAgICAgICBJMkMxLCAgICAgICAgU1BJMSwgICAgICAgMHgzM2YwLCAgTiwgIE4sICBOKSwKICAgICAgICBQSU5HUk9VUCh1c2JfdmJ1c19lbjBfcG40LCAgICAgICBVU0IsICAgICAgICBSU1ZEMiwgICAgICBSU1ZEMywgICAgICAgIFJTVkQ0LCAgICAgICBVU0IsICAgICAgICAweDMzZjQsICBZLCAgTiwgIE4pLAogICAgICAgIFBJTkdST1VQKHVzYl92YnVzX2VuMV9wbjUsICAgICAgIFVTQiwgICAgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIFVTQiwgICAgICAgIDB4MzNmOCwgIFksICBOLCAgTiksCi0gICAgICAgUElOR1JPVVAoc2RtbWMzX2Nsa19sYl9vdXRfcGVlNCwgU0RNTUMzLCAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgU0RNTUMzLCAgICAgMHgzM2ZjLCAgTiwgIE4sICBOKSwKLSAgICAgICBQSU5HUk9VUChzZG1tYzNfY2xrX2xiX2luX3BlZTUsICBTRE1NQzMsICAgICBSU1ZEMiwgICAgICBSU1ZEMywgICAgICAgIFJTVkQ0LCAgICAgICBTRE1NQzMsICAgICAweDM0MDAsICBOLCAgTiwgIE4pLAorICAgICAgIFBJTkdST1VQKHNkbW1jM19jbGtfbGJfaW5fcGVlNSwgIFNETU1DMywgICAgIFJTVkQyLCAgICAgIFJTVkQzLCAgICAgICAgUlNWRDQsICAgICAgIFNETU1DMywgICAgIDB4MzNmYywgIE4sICBOLCAgTiksCisgICAgICAgUElOR1JPVVAoc2RtbWMzX2Nsa19sYl9vdXRfcGVlNCwgU0RNTUMzLCAgICAgUlNWRDIsICAgICAgUlNWRDMsICAgICAgICBSU1ZENCwgICAgICAgU0RNTUMzLCAgICAgMHgzNDAwLCAgTiwgIE4sICBOKSwKICAgICAgICBQSU5HUk9VUChnbWlfY2xrX2xiLCAgICAgICAgICAgICBTRE1NQzIsICAgICBSU1ZEMiwgICAgICBHTUksICAgICAgICAgIFJTVkQ0LCAgICAgICBTRE1NQzIsICAgICAweDM0MDQsICBOLCAgTiwgIE4pLA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BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBtc2lvZjFfc3MxX2JfcGluc1tdID0geworCS8qIFNTMSAqLworCVJDQVJfR1BfUElOKDAsIDE4KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9zczFfYl9tdXhbXSA9IHsKKwlNU0lPRjFfU1MxX0JfTUFSSywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9zczJfYl9waW5zW10gPSB7CisJLyogU1MyICovCisJUkNBUl9HUF9QSU4oMCwgMTkpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3NzMl9iX211eFtdID0geworCU1TSU9GMV9TUzJfQl9NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3J4X2JfcGluc1tdID0geworCS8qIFJYRCAqLworCVJDQVJfR1BfUElOKDEsIDE3KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9yeF9iX211eFtdID0geworCU1TSU9GMV9SWERfQl9NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3R4X2JfcGluc1tdID0geworCS8qIFRYRCAqLworCVJDQVJfR1BfUElOKDAsIDIwKSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV90eF9iX211eFtdID0geworCU1TSU9GMV9UWERfQl9NQVJLLAorfTsKIC8qIC0gTVNJT0YyIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICovCiBzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMl9jbGtfcGluc1tdID0gewogCS8qIFNDSyAqLwpAQCAtMjM4OSw2ICsyNDYxLDU4IEBACiBzdGF0aWMgY29uc3QgdW5zaW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5zW10gPSB7CisJLyogUlhEICovCisJUkNBUl9HUF9QSU4oNywgMTgpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3J4X2JfbXV4W10gPSB7CisJTVNJT0YxX1JYRF9CX01BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBtc2lvZjFfdHhfYl9waW5zW10gPSB7CisJLyogVFhEICovCisJUkNBUl9HUF9QSU4oNywgMTcpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3R4X2JfbXV4W10gPSB7CisJTVNJT0YxX1RYRF9CX01BUkssCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9jbGtfY19waW5zW10gPSB7CisJLyogU0NLICovCisJUkNBUl9HUF9QSU4oMiwgMTUpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX2Nsa19jX211eFtdID0geworCU1TSU9GMV9TQ0tfQ19NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3N5bmNfY19waW5zW10gPSB7CisJLyogU1lOQyAqLworCVJDQVJfR1BfUElOKDIsIDE2KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9zeW5jX2NfbXV4W10gPSB7CisJTVNJT0YxX1NZTkNfQ19NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3J4X2NfcGluc1tdID0geworCS8qIFJYRCAqLworCVJDQVJfR1BfUElOKDIsIDE4KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9yeF9jX211eFtdID0geworCU1TSU9GMV9SWERfQ19NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3R4X2NfcGluc1tdID0geworCS8qIFRYRCAqLworCVJDQVJfR1BfUElOKDIsIDE3KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV90eF9jX211eFtdID0geworCU1TSU9GMV9UWERfQ19NQVJLLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBtc2lvZjFfY2xrX2RfcGluc1tdID0geworCS8qIFNDSyAqLworCVJDQVJfR1BfUElOKDAsIDI4KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9jbGtfZF9tdXhbXSA9IHsKKwlNU0lPRjFfU0NLX0RfTUFSSywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9zeW5jX2RfcGluc1tdID0geworCS8qIFNZTkMgKi8KKwlSQ0FSX0dQX1BJTigwLCAzMCksCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBtc2lvZjFfc3luY19kX211eFtdID0geworCU1TSU9GMV9TWU5DX0RfTUFSSywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9zczFfZF9waW5zW10gPSB7CisJLyogU1MxICovCisJUkNBUl9HUF9QSU4oMCwgMjkpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3NzMV9kX211eFtdID0geworCU1TSU9GMV9TUzFfRF9NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3J4X2RfcGluc1tdID0geworCS8qIFJYRCAqLworCVJDQVJfR1BfUElOKDAsIDI3KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMV9yeF9kX211eFtdID0geworCU1TSU9GMV9SWERfRF9NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YxX3R4X2RfcGluc1tdID0geworCS8qIFRYRCAqLworCVJDQVJfR1BfUElOKDAsIDI2KSwKK307CitzdGF0aWMgY29uc3QgdW5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LyogUlhEICovCisJUkNBUl9HUF9QSU4oMywgMTcpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YyX3J4X2JfbXV4W10gPSB7CisJTVNJT0YyX1JYRF9CX01BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBtc2lvZjJfdHhfYl9waW5zW10gPSB7CisJLyogVFhEICovCisJUkNBUl9HUF9QSU4oMywgMTYpLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YyX3R4X2JfbXV4W10gPSB7CisJTVNJT0YyX1RYRF9CX01BUkssCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMl9jbGtfY19waW5zW10gPSB7CisJLyogU0NLICovCisJUkNBUl9HUF9QSU4oMiwgMiksCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBtc2lvZjJfY2xrX2NfbXV4W10gPSB7CisJTVNJT0YyX1NDS19DX01BUkssCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBtc2lvZjJfc3luY19jX3BpbnNbXSA9IHsKKwkvKiBTWU5DICovCisJUkNBUl9HUF9QSU4oMiwgMyksCit9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBtc2lvZjJfc3luY19jX211eFtdID0geworCU1TSU9GMl9TWU5DX0NfTUFSSywKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMl9yeF9jX3BpbnNbXSA9IHsKKwkvKiBSWEQgKi8KKwlSQ0FSX0dQX1BJTigyLCA1KSwKK307CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IG1zaW9mMl9yeF9jX211eFtdID0geworCU1TSU9GMl9SWERfQ19NQVJLLAorfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgbXNpb2YyX3R4X2NfcGluc1tdID0geworCS8qIFRYRCAqLworCVJDQVJfR1BfUElOKDIsIDQpLAorfTs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4L3FsYV9kYmcuYwppbmRleCBmNjEwM2Y1Li45NzI1NWY3IDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvcWxhMnh4eC9xbGFfZGJnLmMKKysrIGIvZHJpdmVycy9zY3NpL3FsYTJ4eHgvcWxhX2RiZy5jCkBAIC0xMSwxMyArMTEsMTUgQEAKICAqIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAqIHwgICAgICAgICAgICAgTGV2ZWwgICAgICAgICAgICB8ICAgTGFzdCBWYWx1ZSBVc2VkICB8ICAgICBIb2xlcwl8CiAgKiAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0gKiB8IE1vZHVsZSBJbml0IGFuZCBQcm9iZSAgICAgICAgfCAgICAgICAweDAxNWIgICAgICAgfCAweDRiLDB4YmEsMHhmYSB8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDB4MDE1YQl8Ci0gKiB8IE1haWxib3ggY29tbWFuZHMgICAgICAgICAgICAgfCAgICAgICAweDExODcgICAgICAgfCAweDExMWEtMHgxMTFiICB8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDExNTUtMHgxMTU4ICB8Ci0gKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDEwMTgtMHgxMDE5ICB8CisgKiB8IE1vZHVsZSBJbml0IGFuZCBQcm9iZSAgICAgICAgfCAgICAgICAweDAxN2QgICAgICAgfCAweDAwNGIsMHgwMTQxCXwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MDE0NCwweDAxNDYJfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgwMTViLTB4MDE2MAl8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDAxNmUtMHgwMTcwCXwKKyAqIHwgTWFpbGJveCBjb21tYW5kcyAgICAgICAgICAgICB8ICAgICAgIDB4MTE4NyAgICAgICB8IDB4MTAxOC0weDEwMTkJfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgxMGNhICAgICAgICAgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgxMTE1LTB4MTExNiAgfAotICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgxMGNhCQl8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDExMWEtMHgxMTFiCXwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MTE1NS0weDExNTggIHwKICAqIHwgRGV2aWNlIERpc2NvdmVyeSAgICAgICAgICAgICB8ICAgICAgIDB4MjA5NSAgICAgICB8IDB4MjAyMC0weDIwMjIsIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MjAxMS0weDIwMTIsIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MjAxNiAgICAgICAgIHwKQEAgLTMyLDE4ICszNCwxNyBAQAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg1MDQ3LDB4NTA1MiAgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg1MDg0LDB4NTA3NQl8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDUwM2QsMHg1MDQ0ICB8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDUwN2IJCXwKICAqIHwgVGltZXIgUm91dGluZXMgICAgICAgICAgICAgICB8ICAgICAgIDB4NjAxMiAgICAgICB8ICAgICAgICAgICAgICAgIHwKLSAqIHwgVXNlciBTcGFjZSBJbnRlcmFjdGlvbnMgICAgICB8ICAgICAgIDB4NzBlMSAgICAgICB8IDB4NzAxOCwweDcwMmUsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzAyMCwweDcwMjQsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzAzOSwweDcwNDUsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzA3My0weDcwNzUsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzA3YiwweDcwOGMsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBhNSwweDcwYTYsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBhOCwweDcwYWIsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBhZC0weDcwYWUsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBkMS0weDcwZGIsIHwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzA0NywweDcwM2IJfAotICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHg3MGRlLTB4NzBkZiwgfAorICogfCBVc2VyIFNwYWNlIEludGVyYWN0aW9ucyAgICAgIHwgICAgICAgMHg3MGUyICAgICAgIHwgMHg3MDE4LDB4NzAyZSAgfAorICogfAkJCQkgIHwJCSAgICAgICB8IDB4NzAyMCwweDcwMjQgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzAzOSwweDcwNDUgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzA3My0weDcwNzUgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBhNS0weDcwYTYgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBhOCwweDcwYWIgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBhZC0weDcwYWUgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBkNy0weDcwZGIgIHwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4NzBkZS0weDcwZGYgIHwKICAqIHwgVGFzayBNYW5hZ2VtZW50ICAgICAgICAgICAgICB8ICAgICAgIDB4ODAzZCAgICAgICB8IDB4ODAyNS0weDgwMjYgIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4ODAwYiwweDgwMzkgIHwKICAqIHwgQUVSL0VFSCAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4OTAxMSAgICAgICB8CQl8CkBAIC01OSw3ICs2MCwxMSBAQAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhiMTNjLTB4YjE0MCAgfAogICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhiMTQ5CQl8CiAgKiB8IE11bHRpUSAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAweGMwMGMgICAgICAgfAkJfAotICogfCBNaXNjICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHhkMDEwICAgICAgIHwJCXwKKyAqIHwgTWlzYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4ZDJmZiAgICAgICB8IDB4ZDAxNy0weGQwMTkJfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhkMDIwCQl8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweGQwMmUtMHhkMGZmCXwKKyAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4ZDEwMS0weGQxZmUJfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHhkMjEyLTB4ZDJmZQl8CiAgKiB8IFRhcmdldCBNb2RlCQkgIHwJICAweGUwNzAgICAgICAgfCAweGUwMjEJCXwKICAqIHwgVGFyZ2V0IE1vZGUgTWFuYWdlbWVudAkgIHwJICAweGYwNzIgICAgICAgfCAweGYwMDItMHhmMDAzCX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duZWQgaW50IGR3TGVuZ3RoLCBzaG9ydCBlU3opCiB7Ci0gICAgVFJBTlNGRVJERVNDIHRkOworICAgIHN0cnVjdCB0cmFuc2Zlcl9hcmVhX2Rlc2MgdGQ7CiAgICAgc2hvcnQgc0VyciA9IENoZWNrSGFuZGxlKGhhbmQpOwogICAgIGlmIChzRXJyICE9IFUxNEVSUl9OT0VSUk9SKQogICAgICAgICByZXR1cm4gc0VycjsKQEAgLTIyOTIsNyArMjI5Miw3IEBACiAgICAgICAgIHRkLmVTaXplID0gMDsgICAgICAgICAgICAgICAgLy8gRHVtbXkgZWxlbWVudCBzaXplCiAKICAgICAgICAgaWYgKERldmljZUlvQ29udHJvbChhSGFuZDE0MDFbaGFuZF0sKHVuc2lnbmVkIGludClVMTRfU0VUVFJBTlNGRVIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgJnRkLHNpemVvZihUUkFOU0ZFUkRFU0MpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICZ0ZCxzaXplb2Yoc3RydWN0IHRyYW5zZmVyX2FyZWFfZGVzYyksCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnJXb3JrLHNpemVvZihQQVJBTUJMSyksJmR3Qnl0ZXMsTlVMTCkpCiAgICAgICAgIHsKICAgICAgICAgICAgIGlmIChkd0J5dGVzID49IHNpemVvZihQQVJBTUJMSykpICAgIC8vIG1heWJlIGVycm9yIGZyb20gZHJpdmVyPwpAQCAtMjQ5NiwxNCArMjQ5NiwxNCBAQAogICAgIHsKICAgICAgICAgUEFSQU1CTEsgcldvcms7CiAgICAgICAgIHVuc2lnbmVkIGludCBkd0J5dGVzOwotICAgICAgICBUUkFOU0ZFUkRFU0MgdHhEZXNjOworICAgICAgICBzdHJ1Y3QgdHJhbnNmZXJfYXJlYV9kZXNjIHR4RGVzYzsKICAgICAgICAgdHhEZXNjLndBcmVhID0gd0FyZWE7ICAgICAgICAgICAgIC8qIFB1cmUgTlQgLSBwdXQgZGF0YSBpbnRvI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LS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgUHJvamVjdCBtYW5hZ2VyOiBFcmljIFN0b2x6ICAgfCBEYXRlICAgICAgIDogIDAyLzEyLzIwMDIgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8IERlc2NyaXB0aW9uIDogICBIYXJkd2FyZSBMYXllciBBY2Nlc3MgRm9yIEFQQ0ktMDM1ICAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVVBEQVRFUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgICBEYXRlICAgfCAgIEF1dGhvciAgfCAgICAgICAgICBEZXNjcmlwdGlvbiBvZiB1cGRhdGVzICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0rLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgfCAgICAgICAgICB8ICAgICAgICAgICB8IC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0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBJbnB1dCBQYXJhbWV0ZXJzICA6IHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgOiBEcml2ZXIgaGFuZGxlICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18CQkJCQkgIGRhdGFbMF0gICAgICAgICAgICA6IDAgQ29uZmlndXJlIEFzIFRpbWVyICAgICAgfAotfAkJCQkJCQkJCQkgICAxIENvbmZpZ3VyZSBBcyBXYXRjaGRvZyAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMV0gICAgICAgICAgICA6IFdhdGNoZG9nIG51bWJlcgotfAkJCQkJICBkYXRhWzJdICAgICAgICAgICAgOiBUaW1lIGJhc2UgVW5pdCAgICAgICAgICAgIHwKLXwJCQkJCSAgZGF0YVszXQkJCSA6IFJlbG9hZCBWYWx1ZQkJCSAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs0XSAgICAgICAgICAgIDogRXh0ZXJuYWwgVHJpZ2dlciAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOkVuYWJsZQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDpEaXNhYmxlCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs1XSAgICAgICAgICAgIDpFeHRlcm5hbCBUcmlnZ2VyIExldmVsCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwMCBUcmlnZ2VyIERpc2FibGVkCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwMSBUcmlnZ2VyIEVuYWJsZWQgKExvdyBsZXZlbCkKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwIFRyaWdnZXIgRW5hYmxlZCAoSGlnaCBMZXZlbCkKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExIFRyaWdnZXIgRW5hYmxlZCAoSGlnaC9Mb3cgbGV2ZWwpCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs2XSAgICAgICAgICAgIDogRXh0ZXJuYWwgR2F0ZSAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOkVuYWJsZQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6RGlzYWJsZQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbN10gICAgICAgICAgICA6IEV4dGVybmFsIEdhdGUgbGV2ZWwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAwIEdhdGUgRGlzYWJsZWQKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAxIEdhdGUgRW5hYmxlZCAoTG93IGxldmVsKQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAgR2F0ZSBFbmFibGVkIChIaWdoIExldmVsKQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbOF0gICAgICAgICAgICA6V2FybmluZyBSZWxheQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTogRU5BQkxFCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOiBESVNBQkxFCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs5XSAgICAgICAgICAgIDpXYXJuaW5nIERlbGF5IGF2YWlsYWJsZQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMTBdICAgICAgICAgICA6V2FybmluZyBSZWxheSBUaW1lIHVuaXQKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzExXSAgICAgICAgICAgOldhcm5pbmcgUmVsYXkgVGltZSBSZWxvYWQgdmFsdWUKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzEyXSAgICAgICAgICAgOlJlc2V0IFJlbGF5Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogRU5BQkxFCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogRElTQUJMRQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMTNdICAgICAgICAgICA6SW50ZXJydXB0Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIDogRU5BQkxFCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDogRElTQUJMRQotfAotfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJ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gKyAoKGlfV2F0Y2hkb2dOYnIgLSAxKSAqIDMyKSArIDQpOwotLyoqKioqKioqKioqKioqKioqKioqKi8KLS8qIFNldCB0aGUgdGltZSB1bml0ICovCi0vKioqKioqKioqKioqKioqKioqKioqLworCisJLyogU2V0IHRoZSB0aW1lIHVuaXQgKi8KIAlvdXRsKGRhdGFbMl0sIGRldnByaXYtPmlvYmFzZSArICgoaV9XYXRjaGRvZ05iciAtIDEpICogMzIpICsgOCk7CiAJaWYgKGRhdGFbMF0gPT0gQURESURBVEFfVElNRVIpIHsKIAotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogU2V0IHRoZSBtb2RlIDogICAgICAgICAgICAgKi8KIAkJLyogLSBEaXNhYmxlIHRoZSBoYXJkd2FyZSAgICAgKi8KIAkJLyogLSBEaXNhYmxlIHRoZSBjb3VudGVyIG1vZGUgKi8KQEAgLTIwNiwxMDEgKzE1MSw4MiBAQAogCQkvKiAtIERpc2FibGUgdGhlIHJlc2V0ICAgICAgICAqLwogCQkvKiAtIEVuYWJsZSB0aGUgdGltZXIgbW9kZSAgICAqLwogCQkvKiAtIFNldCB0aGUgdGltZXIgbW9kZSAgICAgICAqLwotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQl1aV9Db21tYW5kID0KIAkJCSh1aV9Db21tYW5kICYgMHhGRkY3MTlFMlVMKSB8IHVpX01vZGUgPDwgMTNVTCB8IDB4MTBVTDsKIAotCX0JCQkvKiBpZiAoZGF0YVswXSA9PSBBRERJREFUQV9USU1FUikgKi8KLQllbHNlIHsKLQkJaWYgKGRhdGFbMF0gPT0gQURESURBVEFfV0FUQ0hET0cpIHsKKwl9IGVsc2UgaWYgKGRhdGFbMF0gPT0gQURESURBVEFfV0FUQ0hET0cpIHsKIAotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCS8qIFNldCB0aGUgbW9kZSA6ICAgICAgICAgICAgICovCi0JCQk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TsKLQl1aV9Db21tYW5kID0gMDsKKwogCXVpX0NvbW1hbmQgPSBpbmwoZGV2cHJpdi0+aW9iYXNlICsgKChpX1dhdGNoZG9nTmJyIC0gMSkgKiAzMikgKyAxMik7Ci0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiBEaXNhYmxlIHRoZSBoYXJkd2FyZSB0cmlnZ2VyICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKwkvKiBEaXNhYmxlIHRoZSBoYXJkd2FyZSB0cmlnZ2VyICovCiAJdWlfQ29tbWFuZCA9IHVpX0NvbW1hbmQgJiAweEZGRkZGODlGVUw7CiAJaWYgKGRhdGFbNF0gPT0gQURESURBVEFfRU5BQkxFKSB7Ci0gICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKIAkJLyogU2V0IHRoZSBoYXJkd2FyZSB0cmlnZ2VyIGxldmVsICovCi0gICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCXVpX0NvbW1hbmQgPSB1aV9Db21tYW5kIHwgKGRhdGFbNV0gPDwgNSk7CiAJfQogCW91dGwodWlfQ29tbWFuZCwgZGV2cHJpdi0+aW9iYXNlICsgKChpX1dhdGNoZG9nTmJyIC0gMSkgKiAzMikgKyAxMik7Ci0JdWlfQ29tbWFuZCA9IDA7CisKIAl1aV9Db21tYW5kID0gaW5sKGRldnByaXYtPmlvYmFzZSArICgoaV9XYXRjaGRvZ05iciAtIDEpICogMzIpICsgMTIpOwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogRGlzYWJsZSB0aGUgaGFyZHdhcmUgZ2F0ZSAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisJLyogRGlzYWJsZSB0aGUgaGFyZHdhcmUgZ2F0ZSAqLwogCXVpX0NvbW1hbmQgPSB1aV9Db21tYW5kICYgMHhGRkZGRjg3RlVMOwogCWlmIChkYXRhWzZdID09IEFERElEQVRBX0VOQUJMRSkgewotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0vKiBTZXQgdGhlIGhhcmR3YXJlIGdhdGUgbGV2ZWwgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisJCS8qIFNldCB0aGUgaGFyZHdhcmUgZ2F0ZSBsZXZlbCAqLwogCQl1aV9Db21tYW5kID0gdWlfQ29tbWFuZCB8IChkYXRhWzddIDw8IDcpOwogCX0KIAlvdXRsKHVpX0NvbW1hbmQsIGRldnByaXYtPmlvYmFzZSArICgoaV9XYXRjaGRvZ05iciAtIDEpICogMzIpICsgMTIpOwotCXVpX0NvbW1hbmQgPSAwOworCiAJdWlfQ29tbWFuZCA9IGlubChkZXZwcml2LT5pb2Jhc2UgKyAoKGlfV2F0Y2hkb2dOYnIgLSAxKSAqIDMyKSArIDEyKTsKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyogRGlzYWJsZSB0aGUgaGFyZHdhcmUgb3V0cHV0ICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworCS8qIERpc2FibGUgdGhlIGhhcmR3YXJlIG91dHB1dCAqLwogCXVpX0NvbW1hbmQgPSB1aV9Db21tYW5kICYgMHhGRkZGRjlGQlVMOwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qIFNldCB0aGUgaGFyZHdhcmUgb3V0cHV0IGxldmVsICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisJLyogU2V0IHRoZSBoYXJkd2FyZSBvdXRwdXQgbGV2ZWwgKi8KIAl1aV9Db21tYW5kID0gdWlfQ29tbWFuZCB8IChkYXRhWzhdIDw8IDIpOwogCW91dGwodWlfQ29tbWFuZCwgZGV2cHJpdi0+aW9iYXNlICsgKChpX1dhdGNoZG9nTmJyIC0gMSkgKiAzMikgKyAxMik7CiAJaWYgKGRhdGFbOV0gPT0gQURESURBVEFfRU5BQkxFKSB7Ci0gICAvKioqKioqKioqKioqKioqKioqKioqKioqLworCiAJCS8qIFNldCB0aGUgcmVsb2FkIHZhbHVlICovCi0gICAvKioqKioqKioqKioqKioqKioqKioqKioqLwogCQlvdXRsKGRhdGFbMTFdLAogCQkJZGV2cHJpdi0+aW9iYXNlICsgKChpX1dhdGNoZG9nTmJyIC0gMSkgKiAzMikgKyAyNCk7Ci0gICAvKioqKioqKioqKioqKioqKioqKioqKi8KKwogCQkvKiBTZXQgdGhlIHRpbWUgdW5pdGUgKi8KLSAgIC8qKioqKioqKioqKioqKioqKioqKioqLwogCQlvdXRsKGRhdGFbMTBdLAogCQkJZGV2cHJpdi0+aW9iYXNlICsgKChpX1dhdGNoZG9nTmJyIC0gMSkgKiAzMikgKyAyOCk7CiAJfQogCi0JdWlfQ29tbWFuZCA9IDA7CiAJdWlfQ29tbWFuZCA9IGlubChkZXZwcml2LT5pb2Jhc2UgKyAoKGlfV2F0Y2hkb2dOYnIgLSAxKSAqIDMyKSArIDEyKTsKLSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwogCS8qIERpc2FibGUgdGhlIGhhcmR3YXJlIG91dHB1dCAqLwotIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCXVpX0NvbW1hbmQgPSB1aV9Db21tYW5kICYgMHhGRkZGRjlGN1VMOwotICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwogCS8qIFNldCB0aGUgaGFyZHdhcmUgb3V0cHV0IGxldmVsICovCi0gICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCXVpX0NvbW1hbmQgPSB1aV9Db21tYW5kIHwgKGRhdGFbMTJdIDw8IDMpOwogCW91dGwodWlfQ29tbWFuZCwgZGV2cHJpdi0+aW9iYXNlICsgKChpX1dhdGNoZG9nTmJyIC0gMSkgKiAzMikgKyAxMik7Ci0gLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0gLyo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gICAgICAgICAgICAgICAgICAgICAgfAotfAkJCSAgKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sdW5zaWduZWQgaW50ICpkYXRhKSAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IFJlYWQgVGhlIFNlbGVjdGVkIFRpbWVyICwgQ291bnRlciBvciBXYXRjaGRvZyAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2IDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfCAgICAgCQkJCQkJCQkJCQkJCQkJCQkgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDoJZGF0YVswXSAgICAgICAgICAgIDogc29mdHdhcmUgdHJpZ2dlciBzdGF0dXMKLXwgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMV0gICAgICAgICAgICA6IGhhcmR3YXJlIHRyaWdnZXIgc3RhdHVzCi18ICAgICAJICAJICAgICAgICBkYXRhWzJdICAgICAgICAgICAgOiBTb2Z0d2FyZSBjbGVhciBzdGF0dXMKLXwgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbM10gICAgICAgICAgICA6IE92ZXJmbG93IHN0YXR1cwotfCAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs0XSAgICAgICAgICAgIDogVGltZXIgYWN0dWFsIHZhbHVlCi18Ci0KLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBSZXR1cm4gVmFsdWUgICAgICA6IFRSVUUgIDogTm8gZXJyb3Igb2NjdXIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18CQkgICAgICAgICAgICA6IEZBTFNFIDogRXJyb3Igb2NjdXIuIFJldHVybiB0aGUgZXJyb3IgICAgICAgICAgfAotfAkJCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLXN0YXRpYyBpbnQgaV9BUENJMDM1X1JlYWRUaW1lcldhdGNoZG9nKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsCi0JCQkJICAgICAgIHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAotCQkJCSAgICAgICBzdHJ1Y3Qg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SB0cmlnZ2VyIHN0YXR1cyAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQogCWRhdGFbMF0gPSAoKHVpX1N0YXR1cyA+PiAxKSAmIDEpOwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBHZXQgdGhlIGhhcmR3YXJlIHRyaWdnZXIgc3RhdHVzICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCWRhdGFbMV0gPSAoKHVpX1N0YXR1cyA+PiAyKSAmIDEpOwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogR2V0IHRoZSBzb2Z0d2FyZSBjbGVhciBzdGF0dXMgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCWRhdGFbMl0gPSAoKHVpX1N0YXR1cyA+PiAzKSAmIDEpOwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JLyogR2V0IHRoZSBvdmVyZmxvdyBzdGF0dXMgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCWRhdGFbM10gPSAoKHVpX1N0YXR1cyA+PiAwKSAmIDEpOwotCWlmIChkZXZwcml2LT5iX1RpbWVyU2VsZWN0TW9kZSA9PSBBRERJREFUQV9USU1FUikgewotCQlkYXRhWzRdID0gaW5sKGRldnByaXYtPmlvYmFzZSArICgoaV9XYXRjaGRvZ05iciAtIDEpICogMzIpICsgMCk7CiAKLQl9CQkJLyogICBpZiAgKGRldnByaXYtPmJfVGltZXJTZWxlY3RNb2RlPT1BRERJREFUQV9USU1FUikgKi8KKwkvKiBHZXQgdGhlIGhhcmR3YXJlIHRyaWdnZXIgc3RhdHVzICovCisJZGF0YVsxXSA9ICgodWlfU3RhdHVzID4+IDIpICYgMSk7CisKKwkvKiBHZXQgdGhlIHNvZnR3YXJlIGNsZWFyIHN0YXR1cyAqLworCWRhdGFbMl0gPSAoKHVpX1N0YX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IDogc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiAgICAgIDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMgICAgIDogU3ViZGV2aWNlIFBvaW50ZXIgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGNvbWVkaV9pbnNuICppbnNuICAgICAgIDogSW5zbiBTdHJ1Y3R1cmUgUG9pbnRlciAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKLXwgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICAgICAgICAgICAgICAgOiBXYXJuaW5nIGRlbGF5IHZhbHVlCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6CS0tCQkJCQkJCQkJCQkJCSB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiBUUlVFICA6IE5vIGVycm9yIG9jY3VyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJICAgICAgICAgICAgOiBGQUxTRSA6IEV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tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2ICAgICAgOiBEcml2ZXIgaGFuZGxlICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgdWlfTm9PZkNoYW5uZWxzICAgIDogTm8gT2YgQ2hhbm5lbHMgVG8gcmVhZCAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgICAgICA6IERhdGEgUG9pbnRlciB0byByZWFkIHN0YXR1cyAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IE91dHB1dCBQYXJhbWV0ZXJzIDoJLS0JCQkJCQkJCQkJCQkJIHwKLXwJCQkgICAgICAgICAgZGF0YVswXSAgOiBEaWdpdGFsIFZhbHVlIE9mIElucHV0ICAgICAgICAgICAgICB8Ci18CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogVFJVRSAgOiBObyBlcnJvciBvY2N1ciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCSAgICAgICAgICAgIDogRkFMU0UgOiBFcnJvciBvY2N1ci4gUmV0dXJuIHRoZSBlcnJvciAgICAgICAgICB8Ci18CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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TsKIAotCWlmICgoKCh1aV9TdGF0dXNSZWdpc3RlcjEpICYgMHg4KSA9PSAweDgpKQkvKiBUZXN0IGlmIHdhcm5pbmcgcmVsYXkgaW50ZXJydXB0ICovCi0JewotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCS8qIFRlc3QgaWYgd2FybmluZyByZWxheSBpbnRlcnJ1cHQgKi8KKwlpZiAoKCgodWlfU3RhdHVzUmVnaXN0ZXIxKSAmIDB4OCkgPT0gMHg4KSkgeworCiAJCS8qIERpc2FibGUgdGhlIHRlbXBlcmF0dXJlIHdhcm5pbmcgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJdWlfUmVhZENvbW1hbmQgPSBpbmwoZGV2cHJpdi0+aW9iYXNlICsgMTI4ICsgMTIpOwogCQl1aV9SZWFkQ29tbWFuZCA9IHVpX1JlYWRDb21tYW5kICYgMHhGRkRGMDAwMFVMOwogCQlvdXRsKHVpX1JlYWRDb21tYW5kLCBkZXZwcml2LT5pb2Jhc2UgKyAxMjggKyAxMik7Ci0gICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBSZWFkIHRoZSBjaGFubmVsIG51bWJlciAqLwotICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJdWlfQ2hhbm5lbE51bWJlciA9IGlubChkZXZwcml2LT5pb2Jhc2UgKyAxMjggKyA2MCk7Ci0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkvKiBSZWFkIHRoZSBkaWdpdGFsIHRlbXBlcmF0dXJlIHZhbHVlICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQl1aV9EaWdpdGFsVGVtcGVyYXR1cmUgPSBpbmwoZGV2cHJpdi0+aW9iYXNlICsgMTI4ICsgNjApOwotCQlzZW5kX3NpZyhTSUdJTywgZGV2cHJpdi0+dHNrX0N1cnJlbnQsI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tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgUHJvamVjdCBtYW5hZ2VyOiBFcmljIFN0b2x6ICAgfCBEYXRlICAgICAgIDogIDAyLzEyLzIwMDIgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8IERlc2NyaXB0aW9uIDogICBIYXJkd2FyZSBMYXllciBBY2Nlc3MgRm9yIEFQQ0ktMTUwMCAgICAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVVBEQVRFUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICArLS0tLS0tLS0tLSstLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0gIHwgICBEYXRlICAgfCAgIEF1dGhvciAgfCAgICAgICAgICBEZXNjcmlwdGlvbiBvZiB1cGRhdGVzICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0rLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgfCAgICAgICAgICB8ICAgICAgICAgICB8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gOCBjaGFubmVscyAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIChwb3J0IDEpIGFuZCB0aGUgc2Vjb25kIHRvIHRoZSBmb2xsb3dpbmcgNiBjaGFubmVscyAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgKHBvcnQgMikuIEFuIGludGVycnVwdCBpcyBnZW5lcmF0ZWQgd2hlbiBvbmUgb3IgYm90aCAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBldmVudHMgaGF2ZSBvY2N1cnJlZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IElucHV0IFBhcmFtZXRlcnMgIDogc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJCSAgZGF0YVswXSAgICAgICAgICAgIDpOdW1iZXIgb2YgdGhlIGlucHV0IHBvcnQgb24gICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWNoIHRoZSBldmVudCB3aWxsIHRha2UgcGxhY2UgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgb3IgMikKLXwgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgIDogVGhlIGV2ZW50IGxvZ2ljIGZvciBwb3J0IDEgaGFzICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocmVlIHBvc3NpYmlsaXRpZXMgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6MCAgQVBDSTE1MDBfQU5EICAgICAgIDpUaGlzIGxvZ2ljICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmtzICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGlucHV0cyAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aXRoIGFuIEFORCB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxvZ2ljLiAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIEFQQ0kxNTAwX09SICAgICAgICA6VGhpcyBsb2dpYyAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsaW5rcyAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBpbnB1dHMgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2l0aCBhICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPUiBsb2dpYy4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiAgICBBUENJMTUwMF9PUl9QUklPUklUWSAgICAgICAgfAotfAkJCQkJCQkJOlRoaXMgbG9naWMgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlua3MgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgaW5wdXRzICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGggYSAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpb3JpdHkgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPUiBsb2dpYy4gICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElucHV0IDEgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGFzIHRoZSAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaWdoZXN0ICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaW9yaXR5ICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV2ZWwgYW5kICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnB1dCAgIDggICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBzbWFsbGVzdHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZvciB0aGUgc2Vjb25kIHBvcnQgdGhlIHVzZXIgaGFzfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSBwb3NzaWJpbGl0eTogICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUENJMTUwMF9PUiAgICAgICAgOlRoaXMgbG9naWMgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlua3MgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgaW5wdXRzICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpdGggYSAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9sYXJpdHkgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPUiBsb2dpYyAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgZGF0YVsyXSAgICAgICAgICAgICAgOiBUaGVzZSA4LWNoYXJhY3RlciB3b3JkIGZvciBwb3J0MXwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuZCA2LWNoYXJhY3RlciB3b3JkIGZvciBwb3J0IDIgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2l2ZSB0aGUgbWFzayBvZiB0aGUgZXZlbnQuICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFYWNoIHBsYWNlIGdpdmVzIHRoZSBzdGF0ZSAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mIHRoZSBpbnB1dCBjaGFubmVscyBhbmQgY2FuICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGF2ZSBvbmUgb2YgdGhlc2Ugc2l4IGNoYXJhY3RlcnN8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgOiBUaGlzIGlucHV0IG11c3QgYmUgb24gMCAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICA6IFRoaXMgaW5wdXQgbXVzdCBiZSBvbiAxICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgIDogVGhpcyBpbnB1dCByZWFjdHMgdG8gICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhIGZhbGxpbmcgZWRnZSAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzICA6IFRoaXMgaW5wdXQgcmVhY3RzIHRvIGEgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmlzaW5nIGVkZ2UgICAgICAgICAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCAgOiBUaGlzIGlucHV0IHJlYWN0cyB0byBib3RoIGVkZ2VzIHwKLXwKLXwJCQkJCQ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ovCiAJCQkvKiBmb3IgYSBPUiBQUklPUklUWSBsb2dpYyAgICAgICAgICAgICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCWlmIChkYXRhWzFdID09IEFQQ0kxNTAwX09SX1BSSU9SSVRZCiAJCQkJJiYgaV9QYXR0ZXJuVHJhbnNpdGlvbiAhPSAwKSB7Ci0JCQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0JCQkJLyogVHJhbnNpdGlvbiBlcnJvciBvbiBhbiBPUiBQUklPUklUWSBsb2dpYyAqLwotCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCQkJCXByaW50aygiXG5UcmFuc2l0aW9uIGVycm9yIG9uIGFuIE9SIFBSSU9SSVRZIGxvZ2ljXG4iKTsKKwkJCQlkZXZfd2FybihkZXYtPmh3X2RldiwKKwkJCQkJIlRyYW5zaXRpb24gZXJyb3Igb24gYW4gT1IgUFJJT1JJVFkgbG9naWNcbiIpOwogCQkJCXJldHVybiAtRUlOVkFMOwogCQkJfQkvKiAgaWYgKGRhdGFbMV09PSBBUENJMTUwMF9PUl9QUklPUklUWSAmJiBpX1BhdHRlcm5UcmFuc2l0aW9uICE9IDApICovCiAKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogVGVzdHMgaWYgbW9yZSB0aGFuIG9uZSB0cmFuc2l0aW9uICovCiAJCQkvKiB3YXMgZGVjbGFyZWQgZm9yIGFuIEFORCBsb2dpYyAgICAgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQlpZiAoZGF0YVsxXSA9PSBBUENJMTUwMF9BTkQpIHsKIAkJCQlmb3IgKGlfQ291bnQgPSAwOyBpX0NvdW50IDwgODsgaV9Db3VudCsrKSB7CkBAIC0zNjAsMjkgKzI3NCwyMSBAQAogCQkJCX0JLyogZm9yIChpX0NvdW50ID0gMDsgaV9Db3VudCA8IDg7IGlfQ291bnQrKykgKi8KIAogCQkJCWlmIChpX1BhdHRlcm5UcmFuc2l0aW9uQ291bnQgPiAxKSB7Ci0JCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJLyogVHJhbnNpdGlvbiBlcnJvciBvbiBhbiBBTkQgbG9naWMgICAgICovCi0JCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkJCQkJcHJpbnRrKCJcbiBUcmFuc2l0aW9uIGVycm9yIG9uIGFuIEFORCBsb2dpY1xuIik7CisJCQkJCWRldl93YXJuKGRldi0+aHdfZGV2LAorCQkJCQkJIlRyYW5zaXRpb24gZXJyb3Igb24gYW4gQU5EIGxvZ2ljXG4iKTsKIAkJCQkJcmV0dXJuIC1FSU5WQUw7CiAJCQkJfQkvKiAgaWYgKGlfUGF0dGVyblRyYW5zaXRpb25Db3VudCA+IDEpICovCiAJCQl9CS8qICBpZiAoZGF0YVsxXT09IEFQQ0kxNTAwX0FORCkgKi8KIAotCQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFNlbGVjdHMgdGhlIEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wgcmVnaXN0ZXIgKi8KLQkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wsCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJCS8qKioqKioqKioqKioqKioqKiovCiAJCQkvKiBEaXNhYmxlIFBvcnQgQSAqLwotCQkJICAgIC8qKioqKioqKioqKioqKioqKiovCiAJCQlvdXRiKDB4RjAsCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgcG9sYXJpdHkgcmVnaXN0ZXIgb2YgcG9ydCAxICAgICovCi0JCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQV9QQVRURVJOX1BPTEFSSVRZLAogCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CkBAIC0zOTAsMjAgKzI5NiwxNiBAQAogCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBwYXR0ZXJuIG1hc2sgcmVnaXN0ZXIgb2YgICAgICAqLwogCQkJLyogcG9ydCAxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YihBUENJMTUwMF9SV19QT1JUX0FfUEFUVEVSTl9NQVNLLAogCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJCQlvdXRiKGlfUGF0dGVybk1hc2ssCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFNlbGVjdHMgdGhlIHBhdHRlcm4gdHJhbnNpdGlvbiByZWdpc3RlciAgKi8KIAkJCS8qIG9mIHBvcnQgMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQV9QQVRURVJOX1RSQU5TSVRJT04sCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTQxMSwxMCArMzEzLDggQEAKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBtb2RlIHNwZWNpZmljYXRpb24gbWFzayAgICAqLwogCQkJLyogcmVnaXN0ZXIgb2YgcG9ydCAxICAgICAgICAgICAgICAgICAgICAgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCW91dGIoQVBDSTE1MDBfUldfUE9SVF9BX1NQRUNJRklDQVRJT04sCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTQyMiwxNyArMzIyLDEzIEBACiAJCQkJaW5iKGRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFNlbGVjdHMgdGhlIG1vZGUgc3BlY2lmaWNhdGlvbiBtYXNrICAgICovCiAJCQkvKiByZWdpc3RlciBvZiBwb3J0IDEgICAgICAgICAgICAgICAgICAgICAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YihBUENJMTUwMF9SV19QT1JUX0FfU1BFQ0lGSUNBVElPTiwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogUG9ydCBBIG5ldyBtb2RlICAgICovCi0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQlpX1JlZ1ZhbHVlID0gKGlfUmVnVmFsdWUgJiAweEY5KSB8IGRhdGFbMV0gfCAweDk7CiAJCQlvdXRiKGlfUmVnVmFsdWUsCkBAIC00NDEsNTMgKzMzNyw0MCBAQAogCiAJCQlpX0V2ZW50MVN0YXR1cyA9IDE7CiAKLQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCByZWdpc3RlciAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURV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BfT1IpIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFNlbGVjdHMgdGhlIEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wgcmVnaXN0ZXIgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKi8KIAkJCS8qIERpc2FibGUgUG9ydCBCICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YigweDc0LAogCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFNlbGVjdHMgdGhlIG1vZGUgc3BlY2lmaWNhdGlvbiBtYXNrICAqLwogCQkJLyogcmVnaXN0ZXIgb2YgcG9ydCBCICAgICAgICAgICAgICAgICAgICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCW91dGIoQVBDSTE1MDBfUldfUE9SVF9CX1NQRUNJRklDQVRJT04sCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTQ5NSwxMCArMzc4LDggQEAKIAkJCQlpbmIoZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFNlbGVjdHMgdGhlIG1vZGUgc3BlY2lmaWNhdGlvbiBtYXNrICAgICovCiAJCQkvKiByZWdpc3RlciBvZiBwb3J0IEIgICAgICAgICAgICAgICAgICAgICAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCW91dGIoQVBDSTE1MDBfUldfUE9SVF9CX1NQRUNJRklDQVRJT04sCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTUwNywzNyArMzg4LDI5IEBACiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIGVycm9yIGNoYW5uZWxzIDEgYW5kIDIgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQlpX1BhdHRlcm5NYXNrID0gKGlfUGF0dGVybk1hc2sgfCAweEMwKTsKIAkJCWlfUGF0dGVyblBvbGFyaXR5ID0gKGlfUGF0dGVyblBvbGFyaXR5IHwgMHhDMCk7CiAJCQlpX1BhdHRlcm5UcmFuc2l0aW9uID0gKGlfUGF0dGVyblRyYW5zaXRpb24gfCAweEMwKTsKIAotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBwb2xhcml0eSByZWdpc3RlciBvZiBwb3J0IDIgICAgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YihBUENJMTUwMF9SV19QT1JUX0JfUEFUVEVSTl9QT0xBUklUWSwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCQkJb3V0YihpX1BhdHRlcm5Qb2xhcml0eSwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBwYXR0ZXJuIHRyYW5zaXRpb24gcmVnaXN0ZXIgICAgKi8KIAkJCS8qIG9mIHBvcnQgMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQl9QQVRURVJOX1RSQU5TSVRJT04sCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAkJCW91dGIoaV9QYXR0ZXJuVHJhbnNpdGlvbiwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBwYXR0ZXJuIE1hc2sgcmVnaXN0ZXIgICAgKi8KIAkJCS8qIG9mIHBvcnQgMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCW91dGIoQVBDSTE1MDBfUldfUE9SVF9CX1BBVFRFUk5fTUFTSywKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwpAQCAtNTQ2LDIwICs0MTksMTYgQEAKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgbW9kZSBzcGVjaWZpY2F0aW9uIG1hc2sgICAgKi8KIAkJCS8qIHJlZ2lzdGVyIG9mIHBvcnQgMiAgICAgICAgICAgICAgICAgICAgICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YihBUENJMTUwMF9SV19QT1JUX0JfU1BFQ0lGSUNBVElPTiwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCQkJaV9SZWdWYWx1ZSA9CiAJCQkJaW5iKGRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgbW9kZSBzcGVjaWZpY2F0aW9uIG1hc2sgICAgKi8KIAkJCS8qIHJlZ2lzdGVyIG9mIHBvcnQgMiAgICAgICAgICAgICAgICAgICAgICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YihBUENJMTUwMF9SV19QT1JUX0JfU1BFQ0lGSUNBVElPTiwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwpAQCAtNTY5LDIzICs0MzgsMjAgQEAKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAogCQkJaV9FdmVudDJTdGF0dXMgPSAxOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCByZWdpc3RlciAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wsCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKi8KIAkJCS8qIEVuYWJsZSBQb3J0IEIgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKi8KIAogCQkJb3V0YigweEY0LAogCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJCX0JCS8qICAgaWYgKGRhdGFbMV0gPT0gQVBDSTE1MDBfT1IpICovCiAJCWVsc2UgewotCQkJcHJpbnRrKCJcblRoZSBjaG9pY2UgZm9yIGludGVycnVwdCBsb2dpYyBkb2VzIG5vdCBleGlzdFxuIik7CisJCQlkZXZfd2FybihkZXYtPmh3X2RldiwKKwkJCQkiVGhlIGNob2ljZSBmb3IgaW50ZXJydXB0IGxvZ2ljIGRvZXMgbm90IGV4aXN0XG4iKTsKIAkJCXJldHVybiAtRUlOVkFMOwog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ICB8Ci18ICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkYXRhICAgICAgICAgIDogRGF0YSBQb2ludGVyIHRvIHJlYWQgc3RhdHVzICB8Ci18ICAgICAgICAgICAgICAgICAgICAgIGRhdGFbMF0gICAgICAgICAgICAgICAgIDowIFN0YXJ0IGlucHV0IGV2ZW50Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxIFN0b3AgaW5wdXQgZXZlbnQKLXwgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgICAgICAgOk5vIG9mIHBvcnQgKDEgb3IgMikKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6CS0tCQkJCQkJCQkJCQkJCSB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiBUUlVFICA6IE5vIGVycm9yIG9jY3VyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJICAgICAgICAgICAgOiBGQUxTRSA6IEVycm9yIG9jY3VyLiBSZXR1cm4gdGhlIGVycm9yICAgICAgICAgIHwKLXwJCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSovCi1zdGF0aWMgaW50IGlfQVBDSTE1MDBfU3RhcnRTdG9wSW5wdXRFdmVudChzdHJ1Y3QgY29tZWR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FdID09IDEpIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBUZXN0IGlmIGV2ZW50IGluaXRpYWxpc2VkICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJaWYgKGlfRXZlbnQxU3RhdHVzID09IDEpIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogU2VsZWN0cyB0aGUgQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCByZWdpc3RlciAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogRGlzYWJsZSBQb3J0IEEgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoMHhGMCwKIAkJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgYW5kIHN0YXR1cyByZWdpc3RlciBvZiAgICAgICovCiAJCQkJCS8qIHBvcnQgMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQV9DT01NQU5EX0FORF9TVEFUVVMsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIEFsbG93cyB0aGUgcGF0dGVybiBpbnRlcnJ1cHQgICAgICAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoMHhDMCwKIAkJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogU2VsZWN0cyB0aGUgQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCByZWdpc3RlciAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBFbmFibGUgUG9ydCBBICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoMHhGNCwKIAkJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTY4MCwxODUgKzUx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CSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFNlbGVjdHMgdGhlIEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wgcmVnaXN0ZXIgKi8KLQkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCwgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBEaXNhYmxlIFBvcnQgQiAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKi8KIAkJCQkJb3V0YigweDc0LAogCQkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mICAgICAgKi8KIAkJCQkJLyogcG9ydCAyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoQVBDSTE1MDBfUldfUE9SVF9CX0NPTU1BTkRfQU5EX1NUQVRVUywgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogQWxsb3dzIHRoZSBwYXR0ZXJuIGludGVycnVwdCAgICAgICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJb3V0YigweEMwLAogCQkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBTZWxlY3RzIHRoZSBBUENJMTUwMF9SV19NQVNURVJfQ09ORklHVVJBVElPTl9DT05UUk9MIHJlZ2lzdGVyICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCwgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCSAgICAgICAvKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIEVuYWJsZSBQb3J0IEIgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKi8KIAkJCQkJb3V0YigweEY0LAogCQkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCiAJCQkJCS8qIFNlbGVjdHMgdGhlIG1hc3RlciBpbnRlcnJ1cHQgY29udHJvbCByZWdpc3RlciAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0lOVEVSUlVQVF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SA9PSAyKSAqLwogCiAJCWJyZWFrOwogCiAJY2FzZSBTVE9QOgotCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBUZXN0cyB0aGUgcG9ydCBudW1iZXIgKi8KLQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQlpZiAoZGF0YVsxXSA9PSAxIHx8IGRhdGFbMV0gPT0gMikgewotCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBUZXN0IGlmIHBvcnQgMSBzZWxlY3RlZCAqLwotCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCWlmIChkYXRhWzFdID09IDEpIHsKLQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBUZXN0IGlmIGV2ZW50IGluaXRpYWxpc2VkICovCi0JCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJaWYgKGlfRXZlbnQxU3RhdHVzID09IDEpIHsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogU2VsZWN0cyB0aGUgQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCByZWdpc3RlciAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogRGlzYWJsZSBQb3J0IEEgKi8KLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoMHhGMCwKIAkJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgYW5kIHN0YXR1cyByZWdpc3RlciBvZiAgICAgICovCiAJCQkJCS8qIHBvcnQgMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQV9DT01NQU5EX0FORF9TVEFUVVMsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIEluaGliaXRzIHRoZSBwYXR0ZXJuIGludGVycnVwdCAgICAgICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJb3V0YigweEUwLAogCQkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBTZWxlY3RzIHRoZSBBUENJMTUwMF9SV19NQVNURVJfQ09ORklHVVJBVElPTl9DT05UUk9MIHJlZ2lzdGVyICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQk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FUSU9OX0NPTlRST0wgcmVnaXN0ZXIgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkJICAvKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBEaXNhYmxlIFBvcnQgQiAqLwotCQkJICAvKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKDB4NzQsCiAJCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgYW5kIHN0YXR1cyByZWdpc3RlciBvZiAgICAgICovCiAJCQkJCS8qIHBvcnQgMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJb3V0YihBUENJMTUwMF9SV19QT1JUX0JfQ09NTUFORF9BTkRfU1RBVFVTLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBJbmhpYml0cyB0aGUgcGF0dGVybiBpbnRlcnJ1cHQgICAgICAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoMHhFMCwKIAkJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogU2VsZWN0cyB0aGUgQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCByZWdpc3RlciAqLwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkgICAgICAgLyoqKioqKioqKioqKioqKioqLwogCQkJCQkvKiBFbmFibGUgUG9ydCBCICovCi0JCSAgICAgICAvKioqKioqKioqKioqKioqKiovCiAJCQkJCW91dGIoMHhGNCwKIAkJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAkJCQkJaV9FdmVudDJJbnRlcnJ1cHRTdGF0dXMgPSAwOwogCQkJCX0JLyogIGlmKGlfRXZlbnQyU3RhdHVzPT0xKSAqLwogCQkJCWVsc2UgewotCQkJCQlwcmludGsoIlxuRXZlbnQgMiBub3QgaW5pdGlhbGlzZWRcbiIpOworCQkJCQlkZXZfd2FybihkZXYtPmh3X2RldiwKKwkJCQkJCSJFdmVudCAyIG5vdCBpbml0aWFsaXNlZFxuIik7CiAJCQkJCXJldHVybiAtRUlOVkFMOwogCQkJCX0JLyogZWxzZSBpZihpX0V2ZW50MlN0YXR1cz09MSkgKi8KIAkJCX0JLyogaWYoZGF0YVsxXT09MikgKi8KIA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A9IGluYihkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTkwMiwxNiArNjczLDEyIEBACiAJb3V0YigxLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAlvdXRiKDAsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0gLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNlbGVjdHMgdGhlIG1hc3RlciBjb25maWd1cmF0aW9uIGNvbnRyb2wgcmVnaXN0ZXIgKi8KLSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19NQVNURVJfQ09ORklHVVJBVElPTl9DT05UUk9MLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAlvdXRiKDB4RjQsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNlbGVjdHMgdGhlIG1vZGUgc3BlY2lmaWNhdGlvbiByZWdpc3RlciBvZiBwb3J0IEEgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19QT1JUX0FfU1BFQ0lGSUNBVElPTiwKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJb3V0YigweDEwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTk0Myw5ICs3MTAsNyBAQAogCS8qIERlbGV0ZXMgdGhlIHJlZ2lzdGVyICovCiAJb3V0YigwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogU2VsZWN0cyB0aGUgbW9kZSBzcGVjaWZpY2F0aW9uIHJlZ2lzdGVyIG9mIHBvcnQgQiAqLwotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19QT1JUX0JfU1BFQ0lGSUNBVElPTiwKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJb3V0YigweDEwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTk3NSw5ICs3NDAsNyBAQAogCS8qIERlbGV0ZXMgdGhlIHJlZ2lzdGVyICovCiAJb3V0YigwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBkYXRhIHBhdGggcG9sYXJpdHkgcmVnaXN0ZXIgb2YgcG9ydCBDICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfUE9SVF9DX0RBVEFfUENJVENIX1BPTEFSSVRZLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMT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Igb2YgdGltZXIgMiAqLwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMl9DTURfU1RBVFVTLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAkvKiBEZWxldGVzIElQIGFuZCBJVVMgKi8KQEAgLTEwMTYsOSArNzc1LDcgQEAKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJLyogRGVhY3RpdmF0ZXMgVGltZXIgMiBpbnRlcnJ1cHQgbWFuYWdlbWVudDogICAgICAgICAgICAgICAqLwogCW91dGIoMHhFMCwgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgYW5kIHN0YXR1cyByZWdpc3RlciBvZiB0aW1lciAzICovCi0JICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjNfQ01EX1NUQVRVUywKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJLyogRGVsZXRlcyBJUCBhbmQgSVVTICovCkBAIC0xMDI4LDkgKzc4NSw3IEBACiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCS8qIERlYWN0aXZhdGVzIGludGVycnVwdCBtYW5hZ2VtZW50IG9mIHRpbWVyIDM6ICAgICAgICAgICAgKi8KIAlvdXRiKDB4RTAsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBtYXN0ZXIgaW50ZXJydXB0IGNvbnRyb2wgcmVnaXN0ZXIgKi8KLQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19NQVNURVJfSU5URVJSVVBUX0NPTlRST0wsCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCS8qIERlbGV0ZXMgYWxsIGludGVycnVwdHMgKi8KQEAgLTEwNTEsMzcgKzgwNiwxNSBAQAogfQogCiAvKgotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IEZ1bmN0aW9uICAgTmFtZSAgIDogaW50IGlfQVBDSTE1MDBfQ29uZmlnRGlnaXRhbE91dHB1dEVycm9ySW50ZXJydXB0Ci18ICAgICAgICAgICAgICAgICAgICAgIChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2LHN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzIHN0cnVjdCBjb21lZGlfaW5zbgotfCAgICAgICAgICAgICAgICAgICAgICAqaW5zbix1bnNpZ25lZCBpbnQgKmRhdGEpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgVGFzayAgICAgICAgICAgICAgOiBDb25maWd1cmVzIHRoZSBkaWdpdGFsIG91dHB1dCBtZW1vcnkgYW5kIHRoZSBkaWdpdGFsCi18ICAgICAgICAgICAgICAgICAgICAgIG91dHB1dCBlcnJvciBpbnRlcnJ1cHQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2IDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAotfCAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywgICA6cG9pbnRlciB0byBzdWJkZXZpY2Ugc3RydWN0dXJlCi18ICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18CQkJCQkgIGRhdGFbMF0gIDoxOk1lbW9yeSBvbiAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJCQkJICAgICAgICAgICAgMDpNZW1vcnkgb2ZmICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzFdICA6MSBFbmFibGUgdGhlIHZvbHRhZ2UgZXJyb3IgaW50ZXJydXB0Ci18CQkJCQkJCSAgIDowIERpc2FibGUgdGhlIHZvbHRhZ2UgZXJyb3IgaW50ZXJydXB0IAkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCQkJCQkJCQkJCQkJCQkJCSB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOgktLQkJCQkJCQkJCQkJCQkgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogVFJVRSAgOiBObyBlcnJvciBvY2N1ciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCSAgICAgICAgICAgIDogRkFMU0UgOiBFcnJvciBvY2N1ci4gUmV0dXJuIHRoZSBlcnJvciAgICAgICAgICB8Ci18CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi0qLwotc3RhdGljIGludCBpX0FQQ0kxNTAwX0NvbmZpZ0RpZ2l0YWxPdXRwdXRFcnJvckludGVycnVwdChzdHJ1Y3QgY29tZWRpX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fCAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24gICAgICA6cG9pbnRlciB0byBpbnNuIHN0cnVjdHVyZSAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciB0byByZWFkIHN0YXR1cyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICAgICAgICAgICAgIDogMiAgICAgQVBDSTE1MDBfMV84X0tIWgotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAgICBBUENJMTUwMF8zXzZfS0haICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgICAgIEFQQ0kxNTAwXzExNV9LSFoKLXwgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSAgICAgICAgICAgICAgICA6IDAgICAgIENvdW50ZXIxL1RpbWVyMQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgQ291bnRlcjIvVGltZXIyCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyICAgICBDb3VudGVyMy9XYXRjaGRvZwotfCAgICAgICAgICAgICAgICAgICAgICBkYXRhWzJdICAgICAgICAgICAgICAgIDogMCAgICAgQ291bnRlcgotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgVGltZXIvV2F0Y2hkb2cKLXwgICAgICAgICAgICAgICAgICAgICAgZGF0YVszXSAgICAgICAgICAgICAgICA6ICAgICAgICAgVGhpcyBwYXJhbWV0ZXIgaGFzICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0d28gbWVhbmluZ3MuICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtIElmIHRoZSBjb3VudGVyL3RpbWVyICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaXMgdXNlZCBhcyBhIGNvdW50ZXIgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbGltaXQgdmFsdWUgb2YgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBjb3VudGVyIGlzIGdpdmVuICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSBJZiB0aGUgY291bnRlci90aW1lciAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzIHVzZWQgYXMgYSB0aW1lciwgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGRpdmlkZXIgZmFjdG9yICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgdGhlIG91dHB1dCBpcyAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdpdmVuLgotfCAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs0XSAgICAgICAgICAgICAgICAgOiAwICAgIEFQQ0kxNTAwX0NPTlRJTlVPVVMKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICBBUENJMTUwMF9TSU5HTEUKLXwgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbNV0gICAgICAgICAgICAgICAgIDogMCAgICBTb2Z0d2FyZSBUcmlnZ2VyCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgSGFyZHdhcmUgVHJpZ2dlcgotfAotfCAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs2XSAgICAgICAgICAgICAgICAgIDowICAgIFNvZnR3YXJlIGdhdGUKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICBIYXJkd2FyZSBnYXRlCi18ICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzddICAgICAgICAgICAgICAgICAgOjAgICAgSW50ZXJydXB0IERpc2FibGUKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICBJbnRlcnJ1cHQgRW5hYmxlCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOgktLQkJCQkJCQkJCQkJCQkgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogVFJVRSAgOiBObyBlcnJvciBvY2N1ciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCSAgICAgICAgICAgIDogRkFMU0UgOiBFcnJvciBvY2N1ci4gUmV0dXJuIHRoZSBlcnJvciAgICAgICAgICB8Ci18CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tL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ZXIgMSAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMV9NT0RFX1NQRUNJRklDQVRJT04sCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBXcml0ZXMgdGhlIG5ldyBtb2RlICovCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCW91dGIoaV9UaW1lckNvdW50ZXJNb2RlLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNlbGVjdHMgdGhlIGNvbnN0YW50IHJlZ2lzdGVyIG9mIHRpbWVyL2NvdW50ZXIgMSAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMV9USU1FX0NTVF9MT1csCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBXcml0ZXMgdGhlIGxvdyB2YWx1ZSAgKi8KLQkJCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJb3V0YihkYXRhWzNdLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNlbGVjdHMgdGhlIGNvbnN0YW50IHJlZ2lzdGVyIG9mIHRpbWVyL2NvdW50ZXIgMSAqLwotCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMV9USU1FX0NTVF9ISUdILAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFdyaXRlcyB0aGUgaGlnaCB2YWx1ZSAgKi8KLQkJCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCWRhdGFbM10gPSBkYXRhWzNdID4+IDg7CiAJCQkJb3V0YihkYXRhWzNdLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBTZWxlY3RzIHRoZSBtYXN0ZXIgY29uZmlndXJhdGlvbiByZWdpc3RlciAqLwotCQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCwKIAkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFJlYWRzIHRoZSByZWdpc3RlciAqLwotCQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQlpX01hc3RlckNvbmZpZ3VyYXRpb24gPQogCQkJCQlpbmIoZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIEVuYWJsZXMgdGltZXIvY291bnRlciAxIGFuZCB0cmlnZ2VycyB0aW1lci9jb3VudGVyIDEgKi8KLQkJCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJaV9NYXN0ZXJDb25maWd1cmF0aW9uID0KIAkJCQkJaV9NYXN0ZXJDb25maWd1cmF0aW9uIHwgMHg0MDsKIAotCQkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNlbGVjdHMgdGhlIG1hc3RlciBjb25maWd1cmF0aW9uIHJlZ2lzdGVyICovCi0JCQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJb3V0YihBUENJMTUwMF9SV19NQVNURVJfQ09ORklHVVJBVElPTl9DT05UUk9MLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBXcml0ZXMgdGhlIG5ldyBjb25maWd1cmF0aW9uICovCi0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCW91dGIoaV9NYXN0ZXJDb25maWd1cmF0aW9uLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJCQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmRzIHJlZ2lzdGVyIG9mICAgICAqLwogCQkJCS8qIHRpbWVyL2NvdW50ZXIgMSAgICAgICAgICAgICAgICAgICAgICAqLwotCQkJCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIxX0NNRF9TVEFUVVMsCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogRGlzYWJsZSB0aW1lci9jb3VudGVyIDEgKi8KLQkJCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCW91dGIoMHgwLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBTZWxlY3RzIHRoZSBjb21tYW5kcyByZWdpc3RlciBvZiAgICAgKi8KIAkJCQkvKiB0aW1lci9jb3VudGVyIDEgICAgICAgICAgICAgICAgICAgICAgKi8KLQkJCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIxX0NNRF9TVEFUVVMsCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHS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S8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMl9NT0RFX1NQRUNJRklDQVRJT04sCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBXcml0ZXMgdGhlIG5ldyBtb2RlICovCi0JCQkJLyoqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCW91dGIoaV9UaW1lckNvdW50ZXJNb2RlLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNlbGVjdHMgdGhlIGNvbnN0YW50IHJlZ2lzdGVyIG9mIHRpbWVyL2NvdW50ZXIgMiAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMl9USU1FX0NTVF9MT1csCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBXcml0ZXMgdGhlIGxvdyB2YWx1ZSAgKi8KLQkJCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJb3V0YihkYXRhWzNdLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNlbGVjdHMgdGhlIGNvbnN0YW50IHJlZ2lzdGVyIG9mIHRpbWVyL2NvdW50ZXIgMiAqLwotCQkJCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMl9USU1FX0NTVF9ISUdILAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFdyaXRlcyB0aGUgaGlnaCB2YWx1ZSAgKi8KLQkJCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCWRhdGFbM10gPSBkYXRhWzNdID4+IDg7CiAJCQkJb3V0YihkYXRhWzNdLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBTZWxlY3RzIHRoZSBtYXN0ZXIgY29uZmlndXJhdGlvbiByZWdpc3RlciAqLwotCQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCwKIAkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFJlYWRzIHRoZSByZWdpc3RlciAqLwotCQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQlpX01hc3RlckNvbmZpZ3VyYXRpb24gPQogCQkJCQlpbmIoZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIEVuYWJsZXMgdGltZXIvY291bnRlciAyIGFuZCB0cmlnZ2VycyB0aW1lci9jb3VudGVyIDIgKi8KLQkJCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJaV9NYXN0ZXJDb25maWd1cmF0aW9uID0KIAkJCQkJaV9NYXN0ZXJDb25maWd1cmF0aW9uIHwgMHgyMDsKIAotCQkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNlbGVjdHMgdGhlIG1hc3RlciBjb25maWd1cmF0aW9uIHJlZ2lzdGVyICovCi0JCQkJICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJb3V0YihBUENJMTUwMF9SV19NQVNURVJfQ09ORklHVVJBVElPTl9DT05UUk9MLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBXcml0ZXMgdGhlIG5ldyBjb25maWd1cmF0aW9uICovCi0JCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCW91dGIoaV9NYXN0ZXJDb25maWd1cmF0aW9uLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJCQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmRzIHJlZ2lzdGVyIG9mICAgICAqLwogCQkJCS8qIHRpbWVyL2NvdW50ZXIgMiAgICAgICAgICAgICAgICAgICAgICAqLwotCQkJCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIyX0NNRF9TVEFUVVMsCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogRGlzYWJsZSB0aW1lci9jb3VudGVyIDIgKi8KLQkJCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCW91dGIoMHgwLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBTZWxlY3RzIHRoZSBjb21tYW5kcyByZWdpc3RlciBvZiAgICAgKi8KIAkJCQkvKiB0aW1lci9jb3VudGVyIDIgICAgICAgICAgICAgICAgICAgICAgKi8KLQkJCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIyX0NNRF9TVEFUVVMsCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCQkJ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CBkYXRhWzddID09IEFQQ0kxNTAwX0RJU0FCTEUpIHsKIAotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogU2VsZWN0cyB0aGUgbW9kZSByZWdpc3RlciBvZiB3YXRjaGRvZy9jb3VudGVyIDMgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjNfTU9ERV9TUEVDSUZJQ0FUSU9OLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogV3JpdGVzIHRoZSBuZXcgbW9kZSAqLwotCQkJCS8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQlvdXRiKGlfVGltZXJDb3VudGVyTW9kZSwKIAkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBTZWxlY3RzIHRoZSBjb25zdGFudCByZWdpc3RlciBvZiB3YXRjaGRvZy9jb3VudGVyIDMgKi8KLQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjNfVElNRV9DU1RfTE9XLAogCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCSAgLyoqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogV3JpdGVzIHRoZSBsb3cgdmFsdWUgICovCi0JCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCW91dGIoZGF0YVszXSwKIAkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBTZWxlY3RzIHRoZSBjb25zdGFudCByZWdpc3RlciBvZiB3YXRjaGRvZy9jb3VudGVyIDMgKi8KLQkJCQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjNfVElNRV9DU1RfSElHSCwKIAkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBXcml0ZXMgdGhlIGhpZ2ggdmFsdWUgICovCi0JCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQlkYXRhWzNdID0gZGF0YVszXSA+PiA4OwogCQkJCW91dGIoZGF0YVszXSwKIAkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogU2VsZWN0cyB0aGUgbWFzdGVyIGNvbmZpZ3VyYXRpb24gcmVnaXN0ZXIgKi8KLQkJCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9DT05GSUdVUkFUSU9OX0NPTlRST0wsCiAJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCQkJICAgICAvKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBSZWFkcyB0aGUgcmVnaXN0ZXIgKi8KLQkJCQkgICAgIC8qKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJaV9NYXN0ZXJDb25maWd1cmF0aW9uID0KIAkJCQkJaW5iKGRldnByaXYtPmlvYmFzZSArCiAJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JCQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBFbmFibGVzIHdhdGNoZG9nL2NvdW50ZXIgMyBhbmQgdHJpZ2dlcnMgd2F0Y2hkb2cvY291bnRlciAzICovCi0JCQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCWlfTWFzdGVyQ29uZmlndXJhdGlvbiA9CiAJCQkJCWlfTWFzdGVyQ29uZmlndXJhdGlvbiB8IDB4MTA7CiAKLQkJCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkvKiBTZWxlY3RzIHRoZSBtYXN0ZXIgY29uZmlndXJhdGlvbiByZWdpc3RlciAqLwotCQkJCSAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0NPTkZJR1VSQVRJT05fQ09OVFJPTCwKIAkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogV3JpdGVzIHRoZSBuZXcgY29uZmlndXJhdGlvbiAqLwotCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQlvdXRiKGlfTWFzdGVyQ29uZmlndXJhdGlvbiwKIAkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqKiovCiAJCQkJLyogVGVzdCBpZiBDT1VOVEVSICovCi0JCQkJCSAgLyoqKioqKioqKioqKioqKioqKioqLwogCQkJCWlmIChkYXRhWzJdID09IEFQQ0kxNTAwX0NPVU5URVIpIHsKIAotCQkJCQkgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgcmVnaXN0ZXIgb2YgICAqLwogCQkJCQkvKiB3YXRjaGRvZy9jb3VudGVyIDMgICAgICAgICAgICAgICAgKi8KLQkJCQkJCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SM19DTURfU1RBVFVTLAogCQkJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQkJCUFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogRGlzYWJsZSB0aGUgIHdhdGNoZG9nL2NvdW50ZXIgMyBhbmQgc3RhcnRzIGl0ICovCi0JCQkJCQkgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKDB4MCwKIAkJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkJCQkgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogU2VsZWN0cyB0aGUgY29tbWFuZCByZWdpc3RlciBvZiAgICovCiAJCQkJCS8qIHdhdGNoZG9nL2NvdW50ZXIgMyAgICAgICAgICAgICAgICAqLwotCQkJCQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogCQkJCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIzX0NNRF9TVEFUVVMsCiAJCQkJCQlkZXZwcml2LT5pb2Jhc2UgKwogCQkJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCQkJCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkJCS8qIFRyaWdnZXIgdGhlICB3YXRjaGRvZy9jb3VudGVyIDMgYW5kIHN0YXJ0cyBpdCAqLwotCQkJCQkJIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCQlvdXRiKDB4MiwKIAkJCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTE4NTgsMTIgKzE0NTgsMTQgQEAKIAogCQkJfQkvKiBpZihkYXRhWzddPT0gQVBDSTE1MDBfRU5BQkxFIHx8ZGF0YVs3XT09IEFQQ0kxNTAwX0RJU0FCTEUpICovCiAJCQllbHNlIHsKLQkJCQlwcmludGsoIlxuRXJyb3IgaW4gc2VsZWN0aW9uIG9mIGludGVycnVwdCBlbmFibGUgb3IgZGlzYWJsZVxuIik7CisJCQkJZGV2X3dhcm4oZGV2LT5od19kZXYsCisJCQkJCSJFc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bnRlciB0byByZWFkIHN0YXR1cyAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgZGF0YVswXSAgICAgICAgICAgICAgICA6IDAgICAgIENvdW50ZXIxL1RpbWVyMQotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgICAgQ291bnRlcjIvVGltZXIyCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyICAgICBDb3VudGVyMy9XYXRjaGRvZwotfCAgICAgICAgICAgICAgICAgICAgICBkYXRhWzFdICAgICAgICAgICAgICAgIDogMCAgICAgc3RhcnQKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgIHN0b3AKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgICAgIFRyaWdnZXIKLXwgICAgICAgICAgICAgICAgICAgICAgZGF0YVsyXSAgICAgICAgICAgICAgICA6IDAgICAgIENvdW50ZXIKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgICAgIFRpbWVyL1dhdGNoZG9nCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOgktLQkJCQkJCQkJCQkJCQkgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogVFJVRSAgOiBObyBlcnJvciBvY2N1ciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCSAgICAgICAgICAgIDogRkFMU0UgOiBFcnJvciBvY2N1ci4gUmV0dXJuIHRo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nJlYWs7CiAKIAkJY2FzZSBTVE9QOgogCi0JCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFN0b3AgdGltZXIvY291bnRlciAxICovCi0JCQkJCSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgY29tbWFuZHMgYW5kIHN0YXR1cyByZWdpc3RlciAqLwotCQkJCQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMV9DTURfU1RBVFVTLAogCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CkBAIC0xOTY1LDIzICsxNTQxLDE3IEBACiAJCWNhc2UgVFJJR0dFUjoKIAkJCWlmIChpX1RpbWVyQ291bnRlcjFJbml0ID09IDEpIHsKIAkJCQlpZiAoaV9UaW1lckNvdW50ZXIxRW5hYmxlZCA9PSAxKSB7Ci0JCQkJCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJLyogU2V0IFRyaWdnZXIgYW5kIGdhdGUgKi8KLQkJCQkJCSAvKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJCWlfQ29tbWFuZEFuZFN0YXR1c1ZhbHVlID0gMHg2OwogCQkJCX0JLyogaWYoIGlfVGltZXJDb3VudGVyMUVuYWJsZWQ9PTEpICovCiAJCQkJZWxzZSB7Ci0JCQkJCQkgICAvKioqKioqKioqKioqKioqLwogCQkJCQkvKiBTZXQgVHJpZ2dlciAqLwotCQkJCQkJICAgLyoqKioqKioqKioqKioqKi8KIAogCQkJCQlpX0NvbW1hbmRBbmRTdGF0dXNWYWx1ZSA9IDB4MjsKIAkJCQl9CS8qIGVsc2V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QkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU3RvcCBXYXRjaGRvZy9jb3VudGVyIDMgKi8KLQkJCQkJICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0JCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBjb21tYW5kcyBhbmQgc3RhdHVzIHJlZ2lzdGVyICovCi0JCQkJCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIzX0NNRF9TVEFUVVMsCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTIxNDAsMjMgKzE2OTQsMTcgQEAKIAkJCWNhc2UgMDoJLyogdHJpZ2dlcmluZyBjb3VudGVyIDMgKi8KIAkJCQlpZiAoaV9XYXRjaGRvZ0NvdW50ZXIzSW5pdCA9PSAxKSB7CiAJCQkJCWlmIChpX1dhdGNoZG9nQ291bnRlcjNFbmFibGVkID09IDEpIHsKLQkJCQkJCQkgICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCQkJCS8qIFNldCBUcmlnZ2VyIGFuZCBnYXRlICovCi0JCQkJCQkJICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAkJCQkJCWlfQ29tbWFuZEFuZFN0YXR1c1ZhbHVlID0gMHg2OwogCQkJCQl9CS8qIGlmKCBpX1dhdGNoZG9nQ291bnRlcjNFbmFibGVkPT0xKSAqLwogCQkJCQllbHNlIHsKLQkJCQkJCQkgICAvKioqKioqKioqKioqKioqLwogCQkJCQkJLyogU2V0IFRyaWdnZXIgKi8KLQkJCQkJCQkgICAvKioqKioqKioqKioqKioqLwogCiAJCQkJCQlpX0NvbW1hbmRBbmR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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiAgIHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYgICAgICA6IERyaXZlciBoYW5kbGUgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywgICA6cG9pbnRlciB0byBzdWJkZXZpY2Ugc3RydWN0dXJlCi18ICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBjb21lZGlfaW5zbiAqaW5zbiAgICAgIDpwb2ludGVyIHRvIGluc24gc3RydWN0dXJlICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgICA6IERhdGEgUG9pbnRlciB0byByZWFkIHN0YXR1cyAgfAotfCAgICAgICAgICAgICAgICAgICAgICBkYXRhWzBdICAgICAgICAgICAgICAgIDogMCAgICAgQ291bnRlcjEvVGltZXIxCi18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICAgICBDb3VudGVyMi9UaW1lcjIKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIgICAgIENvdW50ZXIzL1dhdGNoZG9nCi18Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOgktLQkJCQkJCQkJCQkJCQkgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogVFJVRSAgOiBObyBlcnJ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W50ZXIvdGltZXIxICovCiAJCWlmIChpX1RpbWVyQ291bnRlcjFJbml0ID09IDEpIHsKIAkJCWlmIChpX1RpbWVyQ291bnRlcjFFbmFibGVkID09IDEpIHsKLQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJCS8qIFNldCBSQ0MgYW5kIGdhdGUgKi8KLQkJICAvKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJCQkJaV9Db21tYW5kQW5kU3RhdHVzVmFsdWUgPSAweEM7CiAJCQl9CS8qIGlmKCBpX1RpbWVyQ291bnRlcjFJbml0PT0xKSAqLwogCQkJZWxzZSB7Ci0JCSAgICAvKioqKioqKioqKioqKioqLwogCQkJCS8qIFNldCBSQ0MgKi8KLQkJICAgIC8qKioqKioqKioqKioqKiovCiAKIAkJCQlpX0NvbW1hbmRBbmRTdGF0dXNWYWx1ZSA9IDB4ODsKIAkJCX0JLyogZWxzZWlmKGlfVGltZXJDb3VudGVyMUluaXQ9PTEpICovCiAKLQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgY29tbWFuZHMgYW5kIHN0YXR1cyByZWdpc3RlciAqLwotCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIxX0NNRF9TVEFUVVMsCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTIyNjYsOSArMTc5Miw3IEBACiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIFNlbGVjdHMgdGhlIGNvdW50ZXIgcmVnaXN0ZXIgKGhpZ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TM2X0NPTlRST0xfUkVHSVNURVIpOwotICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBjb21tYW5kIGFuZCBzdGF0dXMgcmVnaXN0ZXIgb2YgcG9ydCBCICovCi0gICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfUE9SVF9CX0NPTU1BTkRfQU5EX1NUQVRVUywKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIEF1dGhvcmlzZXMgdGhlIGludGVycnVwdCBvbiB0aGUgYm9hcmQgKi8KLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YigweEMwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNlbGVjdHMgdGhlIHBhdHRlcm4gcG9sYXJpdHkgcmVnaXN0ZXIgb2YgcG9ydCBCICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQl9QQVRURVJOX1BPTEFSSVRZLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAlvdXRiKGlfQ29uc3RhbnQsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBwYXR0ZXJuIHRyYW5zaXRpb24gcmVnaXN0ZXIgb2YgcG9ydCBCICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfUE9SVF9CX1BBVFRFUk5fVFJBTlNJVElPTiwKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJb3V0YihpX0NvbnN0YW50LCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogU2VsZWN0cyB0aGUgcGF0dGVybiBtYXNrIHJlZ2lzdGVyIG9mIHBvcnQgQiAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQl9QQVRURVJOX01BU0ssCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCW91dGIoaV9Db25zdGFudCwgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mIHBvcnQgQSAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQV9DT01NQU5E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AwX1JXX1BPUlRfQl9DT01NQU5EX0FORF9TVEFUVVMsCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogRGVsZXRlcyB0aGUgaW50ZXJydXB0IG9mIHBvcnQgQiAqLwotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIAlpX1JlZ1ZhbHVlID0gKGlfUmVnVmFsdWUgJiAweDBGKSB8IDB4MjA7CiAJb3V0YihpX1JlZ1ZhbHVlLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBjb21tYW5kIGFuZCBzdGF0dXMgcmVnaXN0ZXIgb2YgdGltZXIgMSAqLwotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIxX0NNRF9TVEFUVVMsCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCWlfUmVnVmFsdWUgPSBpbmIoZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMV9DTURfU1RBVFVTLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIERlbGV0ZXMgdGhlIGludGVycnVwdCBvZiB0aW1lciAxICovCi0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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgYW5kIHN0YXR1cyByZWdpc3RlciBvZiB0aW1lciAzICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjNfQ01EX1NUQVRVUywKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJaV9SZWdWYWx1ZSA9IGluYihkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIzX0NNRF9TVEFUVVMsCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogRGVsZXRlcyB0aGUgaW50ZXJydXB0IG9mIHRpbWVyIDMgKi8KLQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAJaV9SZWdWYWx1ZSA9IChpX1JlZ1ZhbHVlICYgMHgwRikgfCAweDIwOwogCW91dGIoaV9SZWdWYWx1ZSwgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAKLQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogU2VsZWN0cyB0aGUgbWFzdGVyIGludGVycnVwdCBjb250cm9sIHJlZ2lzdGVyICovCi0JIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfTUFTVEVSX0lO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aWMgdm9pZCB2X0FQQ0kxNTAwX0ludGVycnVwdChpbnQgaXJxLCB2b2lkICpkKQorc3RhdGljIHZvaWQgYXBjaTE1MDBfaW50ZXJydXB0KGludCBpcnEsIHZvaWQgKmQpCiB7CiAKIAlzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2ID0gZDsKQEAgLTI2NDIsNDQgKzIwNjMsMjggQEAKIAlpbnQgaV9SZWdWYWx1ZSA9IDA7CiAJaV9JbnRlcnJ1cHRNYXNrID0gMDsKIAotIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBSZWFkIHRoZSBib2FyZCBpbnRlcnJ1cHQgc3RhdHVzICovCi0gLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCXVpX0ludGVycnVwdFN0YXR1cyA9IGlubChkZXZwcml2LT5pX0lvYmFzZUFtY2MgKyAweDM4KTsKIAotICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFRlc3QgaWYgYm9hcmQgZ2VuZXJhdGVkIGEgaW50ZXJydXB0ICovCi0gIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJaWYgKCh1aV9JbnRlcnJ1cHRTdGF0dXMgJiAweDgwMDAwMCkgPT0gMHg4MDAwMDApIHsKLSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIERpc2FibGUgYWxsIEludGVycnVwdCAqLwotICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKi8KLSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBTZWxlY3RzIHRoZSBtYXN0ZXIgaW50ZXJydXB0IGNvbnRyb2wgcmVnaXN0ZXIgKi8KLSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9JTlRFUlJVUFRfQ09OVFJPTCxkZXZwcml2LT5pb2Jhc2UrQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7ICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIERpc2FibGVzICB0aGUgbWFpbiBpbnRlcnJ1cHQgb24gdGhlIGJvYXJkICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIG91dGIoMHgwMCxkZXZwcml2LT5pb2Jhc2UrQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7ICovCiAKLSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mIHBvcnQgQSAqLwotICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQlvdXRiKEFQQ0kxNTAwX1JXX1BPUlRfQV9DT01NQU5EX0FORF9TVEFUVVMsCiAJCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAkJaV9SZWdWYWx1ZSA9CiAJCQlpbmIoZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJCWlmICgoaV9SZWdWYWx1ZSAmIDB4NjApID09IDB4NjApIHsKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBjb21tYW5kIGFuZCBzdGF0dXMgcmVnaXN0ZXIgb2YgcG9ydCBBICovCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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DB4NjApID09IDB4NjApICovCiAKLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgYW5kIHN0YXR1cyByZWdpc3RlciBvZiBwb3J0IEIgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCW91dGIoQVBDSTE1MDBfUldfUE9SVF9CX0NPTU1BTkRfQU5EX1NUQVRVUywKIAkJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCQlpX1JlZ1ZhbHVlID0KIAkJCWluYihkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAkJaWYgKChpX1JlZ1ZhbHVlICYgMHg2MCkgPT0gMHg2MCkgewotCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mIHBvcnQgQiAqLwotCSAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YihBUENJMTUwMF9SV19QT1JUX0JfQ09NTUFORF9BTkRfU1RBVFVTLAogCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBEZWxldGVzIHRoZSBpbnRlcnJ1cHQgb2YgcG9ydCBCICovCi0JICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlpX1JlZ1ZhbHVlID0gKGlfUmVnVm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VlKSAqLwogCQl9CQkvKiBpZiAoKGlfUmVnVmFsdWUgJiAweDYwKSA9PSAweDYwKSAqLwogCi0JCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mIHRpbWVyIDEgKi8KLQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIxX0NNRF9TVEFUVVMsCiAJCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAkJaV9SZWdWYWx1ZSA9CiAJCQlpbmIoZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJCWlmICgoaV9SZWdWYWx1ZSAmIDB4NjApID09IDB4NjApIHsKLQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mIHRpbWVyIDEgKi8KLQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMV9DTURfU1RBVFVTLAogCQkJCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIERlbGV0ZXMgdGhlIGludGVycnVwdCBvZiB0aW1lciAxICovCi0JCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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JCWRldnByaXYtPmlvYmFzZSArCiAJCQkJQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0JCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCS8qIERlbGV0ZXMgdGhlIGludGVycnVwdCBvZiB0aW1lciAyICovCi0JCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJCWlfUmVnVmFsdWUgPSAoaV9SZWdWYWx1ZSAmIDB4MEYpIHwgMHgyMDsKIAkJCW91dGIoaV9SZWdWYWx1ZSwKIAkJCQlkZXZwcml2LT5pb2Jhc2UgKwpAQCAtMjgxNCwyMyArMjE5MiwxNyBAQAogCQkJaV9JbnRlcnJ1cHRNYXNrID0gaV9JbnRlcnJ1cHRNYXNrIHwgODsKIAkJfQkJLyogIGlmICgoaV9SZWdWYWx1ZSAmIDB4NjApID09IDB4NjApICovCiAKLQkJLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBTZWxlY3RzIHRoZSBjb21tYW5kIGFuZCBzdGF0dXMgcmVnaXN0ZXIgb2YgdGltZXIgMyAqLwotCQkvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjNfQ01EX1NUQVRVUywKIAkJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCQlpX1JlZ1ZhbHVlID0KIAkJCWluYihkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAkJaWYgKChpX1JlZ1ZhbHVlICYgMHg2MCkgPT0gMHg2MCkgewotCQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQkvKiBTZWxlY3RzIHRoZSBjb21tYW5kIGFuZCBzdGF0dXMgcmVnaXN0ZXIgb2YgdGltZXIgMyAqLwotCQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCQlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIzX0NNRF9TVEFUVVMsCiAJCQkJZGV2cHJpdi0+aW9iYXNlICsKIAkJCQlBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJLyogRGVsZXRlcyB0aGUgaW50ZXJydXB0IG9mIHRpbWVyIDMgKi8KLQkJICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkJaV9SZWdWYWx1ZSA9IChpX1JlZ1ZhbHVlICYgMHgwRikgfCAweDIwOwogCQkJb3V0YihpX1JlZ1ZhbHVlLAogCQkJCWRldnByaXYtPmlvYmFzZSArCkBAIC0yODQ0LDQyICsyMjE2LDIzIEBACiAJCX0JCS8qICBpZiAoKGlfUmVnVmFsdWUgJiAweDYwKSA9PSAweDYwKSAqLwogCiAJCXNlbmRfc2lnKFNJR0lPLCBkZXZwcml2LT50c2tfQ3VycmVudCwgMCk7CS8qICBzZW5kIHNpZ25hbCB0byB0aGUgc2FtcGxlICovCi0JICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogRW5hYmxlIGFsbCBJbnRlcnJ1cHRzICovCi0JICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKi8KIAotCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogU2VsZWN0cyB0aGUgbWFzdGVyIGludGVycnVwdCBjb250cm9sIHJlZ2lzdGVyICovCi0JICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9JTlRFUlJVUFRfQ09OVFJPTCwKIAkJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCSAgICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJLyogQXV0aG9yaXplcyB0aGUgbWFpbiBpbnRlcnJ1cHQgb24gdGhlIGJvYXJkICovCi0JICAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQlvdXRiKDB4RDAsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCX0JCQkvKiAgIGlmICgodWlfSW50ZXJydXB0U3RhdHVzICYgMHg4MDAwMDApID09IDB4ODAwMDAwKSAqLwogCWVsc2UgewotCQlwcmludGsoIlxuSW50ZXJydXB0IGZyb20gdW5rbm93biBzb3VyY2VcbiIpOworCQlkZXZfd2FybihkZXYtPmh3X2RldiwKKwkJCSJJbnRlcnJ1cHQgZnJvbSB1bmtub3duIHNvdXJjZVxuIik7CiAKIAl9CQkJLyogZWxzZSBpZiAoKHVpX0ludGVycnVwdFN0YXR1cyAmIDB4ODAwMDAwKSA9PSAweDgwMDAwMCkgKi8KIAlyZXR1cm47CiB9CiAKLS8qCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gICBOYW1lICAgOiBpbnQgaV9BUENJMTUwMF9SZXNldChzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2KSAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotKy0tLS0tLS0tLS0tL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ZfQ09OVFJPTF9SRUdJU1RFUik7CiAJb3V0YigweEY0LCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBtb2RlIHNwZWNpZmljYXRpb24gcmVnaXN0ZXIgb2YgcG9ydCBBICovCi0JLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfUE9SVF9BX1NQRUNJRklDQVRJT04sCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCW91dGIoMHgxMCwgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CkBAIC0yOTQ5LDkgKzIyOTYsNyBAQAogCS8qIERlbGV0ZXMgdGhlIHJlZ2lzdGVyICovCiAJb3V0YigwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKIAotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogU2VsZWN0cyB0aGUgbW9kZSBzcGVjaWZpY2F0aW9uIHJlZ2lzdGVyIG9mIHBvcnQgQiAqLwotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19QT1JUX0JfU1BFQ0lGSUNBVElPTiwKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJb3V0YigweDEwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKQEAgLTI5ODEsOSArMjMyNiw3IEBACiAJLyogRGVsZXRlcyB0aGUgcmVnaXN0ZXIgKi8KIAlvdXRiKDAsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCi0JICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNlbGVjdHMgdGhlIGRhdGEgcGF0aCBwb2xhcml0eSByZWdpc3RlciBvZiBwb3J0IEMgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19QT1JUX0NfREFUQV9QQ0lUQ0hfUE9MQVJJVFksCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCS8qIEhpZ2ggbGV2ZWwgb2YgcG9ydCBDIG1lYW5zIDEgKi8KQEAgLTI5OTgsOSArMjM0MSw3IEBACiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCS8qIERlbGV0ZXMgaXQgKi8KIAlvdXRiKDAsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCSAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mIHRpbWVyIDEgKi8KLQkgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjFfQ01EX1NUQVRVUywKIAkJZGV2cHJ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qKioqKioqKioqLwogCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgYW5kIHN0YXR1cyByZWdpc3RlciBvZiB0aW1lciAzICovCi0JICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjNfQ01EX1NUQVRVUywKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7CiAJLyogRGVsZXRlcyBJUCBhbmQgSVVTICovCkBAIC0zMDM0LDcxICsyMzcxLDQzIEBACiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCS8qIERlYWN0aXZhdGVzIGludGVycnVwdCBtYW5hZ2VtZW50IG9mIHRpbWVyIDM6ICAgICAgICAgICAgKi8KIAlvdXRiKDB4RTAsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotCSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBtYXN0ZXIgaW50ZXJydXB0IGNvbnRyb2wgcmVnaXN0ZXIgKi8KLQkgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19NQVNURVJfSU5URVJSVVBUX0NPTlRST0wsCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCS8qIERlbGV0ZXMgYWxsIGludGVycnVwdHMgKi8KIAlvdXRiKDAsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwogCS8qIHJlc2V0IGFsbCB0aGUgZGlnaXRhbCBvdXRwdXRzICovCiAJb3V0dygweDAsIGRldnByaXYtPmlfSW9iYXNlQWRkb24gKyBBUENJMTUwMF9ESUdJVEFMX09QKTsKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogRGlzYWJsZSB0aGUgYm9hcmQgaW50ZXJydXB0ICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBtYXN0ZXIgaW50ZXJydXB0IGNvbnRyb2wgcmVnaXN0ZXIgKi8KLSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAlvdXRiKEFQQ0kxNTAwX1JXX01BU1RFUl9JTlRFUlJVUFRfQ09OVFJPTCwKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qIERlYWN0aXZhdGVzIGFsbCBpbnRlcnJ1cHRzICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoMCwgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0gLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCS8qIFNlbGVjdHMgdGhlIGNvbW1hbmQgYW5kIHN0YXR1cyByZWdpc3RlciBvZiBwb3J0IEEgKi8KLSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19QT1JUX0FfQ09NTUFORF9BTkRfU1RBVFVTLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogRGVhY3RpdmF0ZXMgYWxsIGludGVycnVwdHMgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YigweDAwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBjb21tYW5kIGFuZCBzdGF0dXMgcmVnaXN0ZXIgb2YgcG9ydCBCICovCi0gLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfUE9SVF9CX0NPTU1BTkRfQU5EX1NUQVRVUywKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qIERlYWN0aXZhdGVzIGFsbCBpbnRlcnJ1cHRzICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoMHgwMCwgZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7Ci0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mIHRpbWVyIDEgKi8KLSAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YihBUENJMTUwMF9SV19DUFRfVE1SMV9DTURfU1RBVFVTLAogCQlkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogRGVhY3RpdmF0ZXMgYWxsIGludGVycnVwdHMgKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJb3V0YigweDAwLCBkZXZwcml2LT5pb2Jhc2UgKyBBUENJMTUwMF9aODUzNl9DT05UUk9MX1JFR0lTVEVSKTsKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkvKiBTZWxlY3RzIHRoZSBjb21tYW5kIGFuZCBzdGF0dXMgcmVnaXN0ZXIgb2YgdGltZXIgMiAqLwotIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAlvdXRiKEFQQ0kxNTAwX1JXX0NQVF9UTVIyX0NNRF9TVEFUVVMsCiAJCWRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiBEZWFjdGl2YXRlcyBhbGwgaW50ZXJydXB0cyAqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAlvdXRiKDB4MDAsIGRldnByaXYtPmlvYmFzZSArIEFQQ0kxNTAwX1o4NTM2X0NPTlRST0xfUkVHSVNURVIpOwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogU2VsZWN0cyB0aGUgY29tbWFuZCBhbmQgc3RhdHVzIHJlZ2lzdGVyIG9mIHRpbWVyIDMqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCW91dGIoQVBDSTE1MDBfUldfQ1BUX1RNUjNfQ01EX1NUQVRVUywKIAkJZGV2cHJpdi0+aW9iYXNlICsgQVBDSTE1MDBfWjg1MzZfQ09OVFJPTF9SRUdJU1RFUik7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3IgIHwgICAgICAgICAgRGVzY3JpcHRpb24gb2YgdXBkYXRlcyAgICAgICAgICAgICAgICB8Ci0gICstLS0tLS0tLS0tKy0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLSAgfCAgICAgICAgICB8ICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgKy0tLS0tLS0tLS0rLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotKi8KLQotLyoqKioqKioqKiAgICAgIERlZmluaXRpb25zIGZvciBBUENJLTE1NjQgY2FyZCAgKioqKiovCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQsMjAwNSAgQURESS1EQVRBIEdtYkggZm9yIHRoZSBzb3VyY2UgY29kZSBvZiB0aGlzIG1vZHVsZS4KKyAqCisgKglBRERJLURBVEEgR21iSAorICoJRGllc2Vsc3RyYXNzZSAzCisgKglELTc3ODMzIE90dGVyc3dlaWVyCisgKglUZWw6ICsxOSgwKTcyMjMvOTQ5My0wCisgKglGYXg6ICs0OSgwKTcyMjMvOTQ5My05MgorICoJaHR0cDovL3d3dy5hZGRpLWRhdGEuY29tCisgKglpbmZvQGFkZGktZGF0YS5jb20KKyAqCisgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdCB1bmRlcgorICogdGhlIHRlcm1zIG9mIH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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgRnVuY3Rpb24gICBOYW1lICAgOiBpbnQgaV9BUENJMTU2NF9Db25maWdEaWdpdGFsSW5wdXQgICAgICAgICAgICAgICAgICAgICAgfAotfAkJCSAgKHN0cnVjdCBjb21lZGlfZGV2aWNlICpkZXYsc3RydWN0IGNvbWVkaV9zdWJkZXZpY2UgKnMsICAgICAgICAgICAgICAgfAotfCAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sdW5zaWduZWQgaW50ICpkYXRhKSAgICAgICAgICAgICAgICAgICAgIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IENvbmZpZ3VyZXMgdGhlIGRpZ2l0YWwgaW5wdXQgU3ViZGV2aWNlICAgICAgICAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2IDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18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gICAgICAgIHVuc2lnbmVkIGludCAqZGF0YSAgICAgICAgIDogRGF0YSBQb2ludGVyIGNvbnRhaW5zICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25maWd1cmF0aW9uIHBhcmFtZXRlcnMgYXMgYmVsb3cgfAotfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci18CQkJCQkgIGRhdGFbMV0gICAgICAgICAgICA6IDEgRW5hYmxlICBWQ0MgIEludGVycnVwdCAgfAotfAkJCQkJCQkJCQkgICAwIERpc2FibGUgVkNDICBJbnRlcnJ1cHQgIHwKLXwJCQkJCSAgZGF0YVsyXSAgICAgICAgICAgIDogMSBFbmFibGUgIENDICBJbnRlcnJ1cHQgICB8Ci18CQkJCQkJCQkJCSAgIDAgRGlzYWJsZSBDQyAgSW50ZXJydXB0ICAgfAotfAkJCQkJCQkJCQkJCQkJCQkJIHwKLSstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBPdXRwdXQgUGFyYW1ldGVycyA6CS0tCQkJCQkJCQkJCQkJCSB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgUmV0dXJuIFZhbHVlICAgICAgOiBUUlVFICA6IE5vIGVycm9yIG9jY3VyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJICAgICAgICAgICAgOiBGQUxTRSA6IEVycm9yIG9jY3VyLiBSZXR1cm4gdGhlIGVycm9yICAgICAgICAgIHwKLXwJCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKwotfCBUYXNrICAgICAgICAgICAgICA6IFN0YXJ0IC8gU3RvcCBUaGUgU2VsZWN0ZWQgVGltZXIgLCBDb3VudGVyIG9yIFdhdGNoZG9nICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2IDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotfAkJCQkJICBkYXRhWzBdICAgICAgICAgICAgOiAwIFRpbWVyICAgICAgICAgICAgICAgICAgIHwKLXwJCQkJCQkJCQkJICAgMSBDb3VudGVyICAgICAgICAgICAgICAgICB8Ci18CQkJCQkJCQkJCSAgIDIgV2F0Y2hkb2cgICAgICAgIAkJIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwJCQkJCSAgICAgICAgIGRhdGFbMV0gICAgICAgICAgICA6IDEgU3RhcnQgICAgICAgICAgICAgICAgICAgfAotfAkJCQkJCQkJCQkgICAwIFN0b3AgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgIC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bGVjdGVkIFRpbWVyICwgQ291bnRlciBvciBXYXRjaGRvZyAgICAgICAgICB8Ci0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgSW5wdXQgUGFyYW1ldGVycyAgOiBzdHJ1Y3QgY29tZWRpX2RldmljZSAqZGV2IDogRHJpdmVyIGhhbmRsZSAgICAgICAgICAgICAgICAgICAgIHwKLXwgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmRhdGEgICAgICAgICA6IERhdGEgUG9pbnRlciBjb250YWlucyAgICAgICAgICAgICB8Ci18ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uZmlndXJhdGlvbiBwYXJhbWV0ZXJzIGFzIGJlbG93IHwKLXwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotCi0rLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSsKLXwgT3V0cHV0IFBhcmFtZXRlcnMgOgktLQkJCQkJCQkJCQkJCQkgfAotKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0rCi18IFJldHVybiBWYWx1ZSAgICAgIDogVFJVRSAgOiBObyBlcnJvciBvY2N1ciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLXwJCSAgICAgICAgICAgIDogRkFMU0UgOiBFcnJvciBvY2N1ci4gUmV0dXJuIHRoZSBlcnJvciAgICAgICAgICB8Ci18CQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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ioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBHZXQgdGhlIGhhcmR3YXJlIHRyaWdnZXIgc3RhdHVzICovCi0gICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCWRhdGFbMl0gPSAodW5zaWduZWQgY2hhcikgKCh1bF9Db21tYW5kMSA+PiAyKSAmIDEpOwogCi0gICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQkvKiBHZXQgdGhlIHNvZnR3YXJlIGNsZWFyIHN0YXR1cyAqLwotICAgICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAkJZGF0YVszXSA9ICh1bnNpZ25lZCBjaGFyKSAoKHVsX0NvbW1hbmQxID4+IDMpICYgMSk7CiAKLSAgICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAJCS8qIEdldCB0aGUgb3ZlcmZsb3cgc3RhdHVzICovCi0gICAgICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCQlkYXRhWzRdID0gKHVuc2lnbmVkIGNoYXIpICgodWxfQ29tbWFuZDEgPj4gMCkgJiAxKTsKLQl9CQkJLyogIGVsc2UgIGlmICAoZGV2cHJpdi0+Yl9UaW1lclNlbGVjdE1vZGU9PUFERElEQVRBX0NPVU5URVIpICovCi0JZWxzZSBpZiAoKGRldnByaXYtPmJfVGltZXJTZWxlY3RNb2RlICE9IEFERElEQVRBX1RJTUVSKQorCX0gZWxzZSBpZiAoKGRldnByaXYtPmJfVGltZXJTZWxlY3RNb2RlICE9IEFERElEQVRBX1RJTUVSKQogCQkmJiAoZGV2cHJpdi0+Yl9UaW1lclNlbGVjdE1vZGUgIT0gQURESURBVEFfV0FUQ0hET0cpCiAJCSYmIChkZXZwcml2LT5iX1RpbWVyU2VsZWN0TW9kZSAhPSBBRERJREFUQV9DT1VOVEVSKSkgewotCQlwcmludGsoIlxuIEludmFsaWQgU3ViZGV2aWNlICEhIVxuIik7Ci0J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AgICBPdXRwdXQKKyAqCS0tLS0tLS0tLS0tLS0gIC0tLS0tLSAgLS0tLS0tLS0tLS0tLSAgLS0tLS0tLS0tLS0tLS0tLS0KKyAqCSAgIDAgdG8gNVYgICAgICAgMCAgICAgICAgMjEgdG8gMjIgICAgICAyNAorICoJICAgICAgICAgICAgICAgICAxICAgICAgICAxNSB0byAxNiAgICAgIDE4CisgKgkgICAwIHRvIDEwViAgICAgIDAgICAgICAgIDIwIHRvIDIyICAgICAgMjQKKyAqCSAgICAgICAgICAgICAgICAgMSAgICAgICAgMTQgdG8gMTYgICAgICAxOAorICoJICAgICsvLTVWICAgICAgICAwICAgICAgICAyMSB0byAyMiAgICAgIDIzCisgKgkgICAgICAgICAgICAgICAgIDEgICAgICAgIDE1IHRvIDE2ICAgICAgMTcKKyAqCSAgICArLy0xMFYgICAgICAgMCAgICAgICAgMjAgdG8gMjIgICAgICAyMworICoJICAgICAgICAgICAgICAgICAxICAgICAgICAxNCB0byAxNiAgICAgIDE3CisgKgkgIDQgdG8gMjBtQSAgICAgIDAgICAgICAgIDIxIHRvIDIyICAgICAgMjUKKyAqCSAgICAgICAgICAgICAgICAgMSAgICAgICAgMTUgdG8gMTYgICAgICAxOQorICoJQUMgcmVmZXJlbmNlICAgICAwICAgICAgSW4gb24gcGluIDIyICAgIDI0ICgyLXF1YWRyYW50KQorICoJICAgICAgICAgICAgICAgICAgICAgICAgSW4gb24gcGluIDIyICAgIDIzICg0LXF1YWRyYW50KQorICoJICAgICAgICAgICAgICAgICAxICAgICAgSW4gb24gcGluIDE2ICAgIDE4ICgyLXF1YWRyYW50KQorICoJICAgICAgICAgICAgICAgICAgICAgICAgSW4gb24gcGluIDE2ICAgIDE3ICg0LXF1YWRyYW50KQorICovCitzdGF0aWMgY29uc3Qgc3RydWN0IGNvbWVkaV9scmFuZ2UgZGFzMDJfYW9fcmFuZ2VzID0geworCTYsIHsKKwkJVU5JX1JBTkdFKDUpLAorCQlVTklfUkFOR0UoMTApLAorCQlC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kvZHJpdmVycy9keW5hX3BjaTEweHguYworKysgYi9kcml2ZXJzL3N0YWdpbmcvY29tZWRpL2RyaXZlcnMvZHluYV9wY2kxMHh4LmMKQEAgLTU3LDE4ICs1NywyNyBAQAogCXVuc2lnbmVkIGxvbmcgQkFEUjM7CiB9OwogCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotLyoqKioqKioqKioqKioqKioqKioqKioqKioqIFJFQUQgV1JJVEUgRlVOQ1RJT05TICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgaW50IGR5bmFfcGNpMTB4eF9haV9lb2Moc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKKwkJCSAgICAgICBzdHJ1Y3QgY29tZWRpX3N1YmRldmljZSAqcywKKwkJCSAgICAgICBzdHJ1Y3QgY29tZWRpX2luc24gKmluc24sCisJCQkgICAgICAgdW5zaWduZWQgbG9uZyBjb250ZXh0KQoreworCXVuc2lnbmVkIGludCBzdGF0dXM7CiAKLS8qIGFuYWxvZyBpbnB1dCBjYWxsYmFjayAqLworCXN0YXR1cyA9IGlud19wKGRldi0+aW9iYXNlKTsKKwlpZiAoc3RhdHVzICYgKDEgPDwgMTUpKQorCQlyZXR1cm4gMDsKKwlyZXR1cm4gLUVCVVNZOworfQorCiBzdGF0aWMgaW50IGR5bmFfcGNpMTB4eF9pbnNuX3JlYWRfYWkoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldiwKIAkJCXN0cnVjdCBjb21lZGlfc3ViZGV2aWNlICpzLAogCQkJc3RydWN0IGNvbWVkaV9pbnNuICppbnNuLCB1bnNpZ25lZCBpbnQgKmRhdGEpCiB7CiAJc3RydWN0IGR5bmFfcGNpMTB4eF9wcml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IAotZW5kOgotCXJldHVybiAwOwotfQotCi0vKgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0gY2hlY2ggZm9yIFBDTDgxOAotKi8KLXN0YXRpYyBpbnQgcGNsODE4X2NoZWNrKHVuc2lnbmVkIGxvbmcgaW9iYXNlKQotewotCW91dGIoMHgwMCwgaW9iYXNlICsgUENMODE4X01VWCk7Ci0JdWRlbGF5KDEpOwotCWlmIChpbmIoaW9iYXNlICsgUENMODE4X01VWCkgIT0gMHgwMCkKLQkJcmV0dXJuIDE7CS8qIHRoZXJlIGlzbid0IGNhcmQgKi8KLQlvdXRiKDB4NTUsIGlvYmFzZSArIFBDTDgxOF9NVVgpOwotCXVkZWxheSgxKTsKLQlpZiAoaW5iKGlvYmFzZSArIFBDTDgxOF9NVVgpICE9IDB4NTUpCi0JCXJldHVybiAxOwkvKiB0aGVyZSBpc24ndCBjYXJkICovCi0Jb3V0YigweDAwLCBpb2Jhc2UgKyBQQ0w4MThfTVVYKTsKLQl1ZGVsYXkoMSk7Ci0Jb3V0YigweDE4LCBpb2Jhc2UgKyBQQ0w4MThfQ09OVFJPTCk7Ci0JdWRlbGF5KDEpOwotCWlmIChpbmIoaW9iYXNlICsgUENMODE4X0NPTlRST0wpICE9IDB4MTgpCi0JCXJldHVybiAxOwkvKiB0aGVyZSBpc24ndCBjYXJkICovCi0JcmV0dXJuIDA7CQkvKiAgb2ssIGNhcmQgZXhpc3QgKi8KLX0KLQotLyoKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotIHJlc2V0IHdob2xlIFBDTC04MTggY2FyZHMKLSovCi1zdGF0aWMgdm9pZCBwY2w4MThfcmVzZXQoc3RydWN0IGNvbWVkaV9kZXZpY2UgKmRldikKLXsKLQljb25zdCBzdHJ1Y3QgcGNsODE4X2Jv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B2KQogewogI2lmZGVmIEZMT1dfREVCVUcKLSAgICBpZiAoY3h0MWUxX2xvZ19sZXZlbCA+PSBMT0dfREVCVUcpCi0gICAgICAgIHByX2luZm8oInBjaV93cml0ZTogJXggPSAleFxuIiwgKHVfaW50MzJfdCkgcCwgdik7CisJaWYgKGN4dDFlMV9sb2dfbGV2ZWwgPj0gTE9HX0RFQlVHKQorCQlwcl9pbmZvKCJwY2lfd3JpdGU6ICV4ID0gJXhcbiIsICh1X2ludDMyX3QpIHAsIHYpOwogI2VuZGlmCi0gICAgKnAgPSBjcHVfdG9fbGUzMiAodik7Ci0gICAgRkxVU0hfUENJX1dSSVRFICgpOyAgICAgICAgICAgICAvKiBUaGlzIHJvdXRpbmUgaXMgY2FsbGVkIGZyb20gcm91dGluZXMKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHdoaWNoIGRvIG11bHRpcGxlIHJlZ2lzdGVyIHdyaXRlcwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogd2hpY2ggdGhlbXNlbHZlcyBuZWVkIGZsdXNoaW5nIGJldHdlZW4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHdyaXRlcyBpbiBvcmRlciB0byBndWFyYW50ZWUgd3JpdGUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIG9yZGVyaW5nLiAgSXQgaXMgbGVzcyBjb2RlLWN1bWJlcnNvbWUKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHRvIGZsdXNoIGhlcmUtaW4gdGhlbiB0byBpbnZlc3RpZ2F0ZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogYW5kIGNvZGUgdGhlIG1hbnkgb3RoZXIgcmVnaXN0ZXIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHdyaXRpbmcgcm91dGluZXMuICovCisJKnAgPSBjcHVfdG9fbGUzMiAod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qLwotICAgICAgICBicmVhazsKLSAgICBjYXNlIDE2OgotICAgICAgICBkYXRhID0gcGNpX3JlYWRfMzIgKCh1X2ludDMyX3QgKikgJmNvbWV0LT5fX3Jlczc0KTsgICAgIC8qIDB4MUQwICovCi0gICAgICAgIGJyZWFrOwotICAgIGNhc2UgMTc6Ci0gICAgICAgIGRhdGEgPSBwY2lfcmVhZF8zMiAoKHVfaW50MzJfdCAqKSAmY29tZXQtPl9fcmVzNzUpOyAgICAgLyogMHgxRDQgKi8KLSAgICAgICAgYnJlYWs7Ci0gICAgY2FzZSAxODoKLSAgICAgICAgZGF0YSA9IHBjaV9yZWFkXzMyICgodV9pbnQzMl90ICopICZjb21ldC0+X19yZXM3Nik7ICAgICAvKiAweDFEOCAqLwotICAgICAgICBicmVhazsKLSAgICBjYXNlIDE5OgotICAgICAgICBkYXRhID0gcGNpX3JlYWRfMzIgKCh1X2ludDMyX3QgKikgJmNvbWV0LT5fX3Jlczc3KTsgICAgIC8qIDB4MURDICovCi0gICAgICAgIGJyZWFrOwotICAgIH0KKwlzd2l0Y2ggKHgpIHsKKwlkZWZhdWx0OgorCWNhc2UgMDoKKwkgICAgZGF0YSA9IHBjaV9yZWFkXzMyKCh1X2ludDMyX3QgKikgJmNvbWV0LT5fX3JlczI0KTsgICAgIC8qIDB4OTAgKi8KKwkgICAgYnJlYWs7CisJY2FzZSAxOgorCSAgICBkYXRhID0gcGNpX3JlYWRfMzIoKHVfaW50MzJfdCAqKSAmY29tZXQtPl9fcmVzMjUpOyAgICAgLyogMHg5NCAqLworCSAgICBicmVhazsKKwljYXNlIDI6CisJICAgIGRhdGEgPSBwY2lfcmVhZF8zMigodV9pbnQzMl90ICopICZjb21ldC0+X19yZXMyNik7ICAgICAvKiAweDk4ICovCisJICAgIGJyZWFrOworCWNhc2UgMzoKKwkgICAgZGF0YSA9IHBjaV9yZWFkXzMyKCh1X2ludDMyX3QgKikgJmNvbWV0LT5fX3JlczI3KTsgICAgIC8qIDB4OUMgKi8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ZW5bMF0pOworCQkJaGktPmFkZHJfbWFwcGVkWzBdID0gMDsKKwkJfQorCQlpZiAoaGktPmFkZHJfbWFwcGVkWzFdKSB7CisJCQlpb3VubWFwKCh2b2lkICopKGhpLT5hZGRyX21hcHBlZFsxXSkpOworCQkJcmVsZWFzZV9tZW1fcmVnaW9uKChsb25nKSBoaS0+YWRkclsxXSwgaGktPmxlblsxXSk7CisJCQloaS0+YWRkcl9tYXBwZWRbMV0gPSAwOworCQl9CisJfQogfQogCiAKIHZvaWQKLWNsZWFudXBfZGV2cyAodm9pZCkKK2NsZWFudXBfZGV2cyh2b2lkKQogewotICAgIGhkd19pbmZvX3QgKmhpOwotICAgIGludCAgICAgICAgIGk7CisJaGR3X2luZm9fdCAqaGk7CisJaW50ICAgICAgICAgaTsKIAotICAgIGZvciAoaSA9IDAsIGhpID0gaGR3X2luZm87IGkgPCBNQVhfQk9BUkRTOyBpKyssIGhpKyspCi0gICAgewotICAgICAgICBpZiAoaGktPnBjaV9zbG90ID09IDB4ZmYgfHwgIWhpLT5uZGV2KQotICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGM0X3N0b3B3ZChuZXRkZXZfcHJpdihoaS0+bmRldikpOworCWZvciAoaSA9IDAsIGhpID0gaGR3X2luZm87IGkgPCBNQVhfQk9BUkRTOyBpKyssIGhpKyspIHsKKwkJaWYgKGhpLT5wY2lfc2xvdCA9PSAweGZmIHx8ICFoaS0+bmRldikKKwkJCWJyZWFrOworCQljNF9zdG9wd2QobmV0ZGV2X3ByaXYoaGktPm5kZXYpKTsKICNpZmRlZiBDT05GSUdfUFJPQ19GUwotICAgICAgICBzYmVjb21fcHJvY19icmRfY2xlYW51cChuZXRkZXZfcHJpdihoaS0+bmRldikpOworCQlzYmVjb21fcHJvY19icmRfY2xlYW51cChuZXRkZXZfcHJpdihoaS0+bmRldikpOwogI2VuZGlmCi0gICAgICAgIHVucmVnaXN0ZXJfbmV0ZGV2IChoaS0+bmRldik7Ci0gICAgICAgIGZ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QgYnkgInNsb3Q9PSgweGZmKSIuICBUaGUgc2Vjb25kIHBhcnQgb2YgYSBib2FyZCdzCisJICogZnVuY3Rpb25hbGl0eSB3aWxsIG1hdGNoIHRoZSBwcmV2aW91c2x5IGxvYWRlZCBzbG90L2J1c25vLgorCSAqLworCWZvciAoaSA9IDAsIGhpID0gaGR3X2luZm87IGkgPCBNQVhfQk9BUkRTOyBpKyssIGhpKyspIHsKKwkJLyoKKwkJICogbWF0Y2ggd2l0aCBib2FyZCdzIGZpcnN0IGZvdW5kIGludGVyZmFjZSwgb3RoZXJ3aXNlIHRoaXMgaXMKKwkJICogZmlzcnQgZm91bmQKKwkJICovCisJCWlmICgoaGktPnBjaV9zbG90ID09IDB4ZmYpIHx8ICAgLyogbmV3IGJvYXJkICovCisJCSAgICAoKGhpLT5wY2lfc2xvdCA9PSBzbG90KSAmJiAoaGktPmJ1cyA9PSBwZGV2LT5idXMpKSkKKwkJCWJyZWFrOyAgICAgICAgICAgICAgICAgIC8qIGZvdW5kIGZvci1sb29wIGV4aXQgKi8KKwl9CiAKLSAgICAgICAgc3RyY3B5IChjcCwgS0JVSUxEX01PRE5BTUUpOwotICAgICAgICBjcCArPSBzdHJsZW4gKGNwKTsgICAgICAgICAgLyogcmVwb3NpdGlvbiAqLwotICAgICAgICAqY3ArKyA9ICctJzsKLSAgICAgICAgKmNwKysgPSAnMCcgKyAoZm91bmQgLyAyKTsgIC8qIHRoZXJlIGFyZSB0d28gZm91bmQgaW50ZXJmYWNlcyBwZXIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIGJvYXJkICovCi0gICAgICAgICpjcCA9IDA7ICAgICAgICAgICAgICAgICAgICAvKiB0ZXJtaW5hdGlvbiAqLwotICAgIH0KKwkvKiBubyBtYXRjaCBpbiBhYm92ZSBsb29wIG1lYW5zIE1BWCBleGNlZWRlZCAqLworCWlmIChpID09IE1BWF9CT0FSRFMpIHsKKwkJcHJfd2FybmluZygiZXhjZWVkZWQgb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ZSB0d28gZm91bmQgaW50ZXJmYWNlcyBwZXIKKwkJKiBib2FyZCAqLworCQkqY3AgPSAwOyAgICAgICAgICAgICAgICAgICAgLyogdGVybWluYXRpb24gKi8KKwl9CisKKwlyZXR1cm4gMTsKIH0KIAotCi1zdGF0dXNfdCAgICBfX2luaXQKLWM0aHdfYXR0YWNoX2FsbCAodm9pZCkKK3N0YXR1c190IF9faW5pdAorYzRod19hdHRhY2hfYWxsKHZvaWQpCiB7Ci0gICAgaGR3X2luZm9fdCAqaGk7Ci0gICAgc3RydWN0IHBjaV9kZXYgKnBkZXYgPSBOVUxMOwotICAgIGludCAgICAgICAgIGZvdW5kID0gMCwgaSwgajsKKwloZHdfaW5mb190ICpoaTsKKwlzdHJ1Y3QgcGNpX2RldiAqcGRldiA9IE5VTEw7CisJaW50ICAgICAgICAgZm91bmQgPSAwLCBpLCBqOwogCi0gICAgZXJyb3JfZmxhZyA9IDA7Ci0gICAgcHJlcF9oZHdfaW5mbyAoKTsKLSAgICAvKioqIHNjYW4gUENJIGJ1cyBmb3IgYWxsIHBvc3NpYmxlIGJvYXJkcyAqLwotICAgIHdoaWxlICgocGRldiA9IHBjaV9nZXRfZGV2aWNlIChQQ0lfVkVORE9SX0lEX0NPTkVYQU5ULAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUENJX0RFVklDRV9JRF9DTjg0NzQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZGV2KSkpCi0gICAgewotICAgICAgICBpZiAoYzRfaGR3X2luaXQgKHBkZXYsIGZvdW5kKSkKLSAgICAgICAgICAgIGZvdW5kKys7Ci0gICAgfQotICAgIGlmICghZm91bmQpCi0gICAgewotICAgICAgICBwcl93YXJuaW5nKCJObyBib2FyZHMgZm91bmRcbiIpOwotICAgICAgICByZXR1cm4gLUVOT0RFVjsKLSAgICB9Ci0gICAgLyogc2FuaXR5IGNoZWNrIGZvciBjb25zaXN0ZW50IGhhcmR3YXJlIGZvdW5k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gJWQgc2xvdCAlZFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgaGktPmRldm5hbWUsIGksIGhpLT5wY2lfc2xvdCk7Ci0gICAgICAgICAgICBjbGVhbnVwX2RldnMgKCk7Ci0gICAgICAgICAgICBjbGVhbnVwX2lvcmVtYXAgKCk7Ci0gICAgICAgICAgICByZXR1cm4gLUVJTzsKLSAgICAgICAgfQotICAgICAgICBwY2lfc2V0X21hc3RlciAoaGktPnBkZXZbMF0pOwotICAgICAgICBwY2lfc2V0X21hc3RlciAoaGktPnBkZXZbMV0pOwotICAgICAgICBpZiAoIShoaS0+bmRldiA9IGM0X2FkZF9kZXYgKGhpLCBpLCAobG9uZykgaGktPmFkZHJfbWFwcGVkWzBdLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsb25nKSBoaS0+YWRkcl9tYXBwZWRbMV0sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaGktPnBkZXZbMF0tPmlycSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBoaS0+cGRldlsxXS0+aXJxKSkpCi0gICAgICAgIHsKLSAgICAgICAgICAgIGRydnJfc3RhdGUgPSBTQkVfRFJWUl9ET1dOOwotICAgICAgICAgICAgY2xlYW51cF9pb3JlbWFwICgpOwotICAgICAgICAgICAgLyogTk9URTogYzRfYWRkX2RldigpIGRvZXMgaXRzIG93biBkZXZpY2UgY2xlYW51cCAqLworCS8qIEhhdmUgbm93IG1lbW9yeSBtYXBwZWQgYWxsIGJvYXJkcy4gIE5vdyBhbGxvdyBib2FyZCdzIGFjY2VzcyB0byBzeXN0ZW0gKi8KKwlmb3IgKGkgPSAwLCBoaSA9IGhkd19pbmZvOyBpIDwgTUFYX0JPQVJEUzsgaSsrLCBoaSsrKSB7CisJCWlmIChoaS0+cGNpX3Nsb3QgPT0gMHhmZikKKwkJCWJyZWFrOworCQlpZiAocGNpX2VuYWJsZV9kZXZpY2UoaGktPnBkZXZb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NfcGFyYW0gKik7CisgICAgZXh0ZXJuIGludCAgd2FuY2ZnX2dldF90c2lvYyh3Y2ZnX3QgKiwgc3RydWN0IHdhbmMxdDNfdHNfaGRyICosIHN0cnVjdCB3YW5jMXQzX3RzX3BhcmFtICopOworICAgIGV4dGVybiBpbnQgIHdhbmNmZ19zZXRfdHNpb2Mod2NmZ190ICosIHN0cnVjdCB3YW5jMXQzX3RzX3BhcmFtICopOwogI2VuZGlmCiAKICNlbmRpZiAgICAgICAgICAgICAgICAgICAgICAgICAgLyoqKiBfSU5DX0xJQlNCRVdfSF8gKioqLwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL2N4dDFlMS9saW51eC5jIGIvZHJpdmVycy9zdGFnaW5nL2N4dDFlMS9saW51eC5jCmluZGV4IDRhMDhlMTYuLmIwMmY1YWRlIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvY3h0MWUxL2xpbnV4LmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL2N4dDFlMS9saW51eC5jCkBAIC0zMSw3ICszMSw3IEBACiAjaW5jbHVkZSAicG1jYzRfcHJpdmF0ZS5oIgogI2luY2x1ZGUgInNiZXByb2MuaCIKIAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogRXJyb3Igb3V0IGVhcmx5IGlmIHdlIGhhdmUgY29tcGlsZXIgdHJvdWJsZS4KICAqCiAgKiAgIChUaGlzIHNlY3Rpb24gaXMgaW5jbHVkZWQgZnJvbSB0aGUga2VybmVsJ3MgaW5pdC9tYWluLmMgYXMgYSBmcmllbmRseQpAQCAtNTAsNDMgKzUwLDQyIEBACiAjd2FybmluZyBnY2MtNC4xLjAgaXMga25vd24gdG8gbWlzY29tcGlsZSB0aGUga2VybmVsLiAgQSBkaWZmZXJlbnQgY29tcGlsZXIgdmVyc2lvbiBpcyByZWNvbW1lbmRlZC4KICNlbmRpZgogCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogI2RlZmluZSBDSEFOTkFNRSAiaGRsYyIKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiBmb3J3YXJkIHJlZmVyZW5jZXMgKi8KLXN0YXR1c190ICAgIGM0X2NoYW5fd29ya19pbml0IChtcGlfdCAqLCBtY2hfdCAqKTsKLXZvaWQgICAgICAgIG11c3ljY193cV9jaGFuX3Jlc3RhcnQgKHZvaWQgKik7Ci1zdGF0dXNfdCBfX2luaXQgYzRfaW5pdCAoY2lfdCAqLCB1X2NoYXIgKiwgdV9jaGFyICopOwotc3RhdHVzX3QgX19pbml0IGM0X2luaXQyIChjaV90ICopOwotY2lfdCAgICAgICAqX19pbml0IGM0X25ldyAodm9pZCAqKTsKLWludCBfX2luaXQgIGM0aHdfYXR0YWNoX2FsbCAodm9pZCk7Ci12b2lkIF9faW5pdCBoZHdfc25fZ2V0IChoZHdfaW5mb190ICosIGludCk7CitzdGF0dXNfdCAgICBjNF9jaGFuX3dvcmtfaW5pdChtcGlfdCAqLCBtY2hfdCAqKTsKK3ZvaWQgICAgICAgIG11c3ljY193cV9jaGFuX3Jlc3RhcnQodm9pZCAqKTsKK3N0YXR1c190IF9faW5pdCBjNF9pbml0KGNpX3QgKiwgdV9jaGFyICosIHVfY2hhciAqKTsKK3N0YXR1c190IF9faW5pdCBjNF9pbml0MihjaV90ICopOworY2lfdCAgICAgICAqX19pbml0IGM0X25ldyh2b2lkICopOworaW50IF9faW5pdCAgYzRod19hdHRhY2hfYWxsKHZvaWQpOwordm9pZCBfX2luaXQgaGR3X3NuX2dldChoZHdfaW5mb190ICosIGludCk7CiAKICNpZmRlZiBDT05GSUdfU0JFX1BNQ0M0X05DT01NCi1pcnFyZXR1cm5fdCBjNF9lYnVzX2ludHJfdGhfaGFuZGxlciAodm9pZCAqKTsKK2lycXJldHVybl90IGM0X2VidXNfaW50cl90aF9oYW5kbGVyKHZvaWQgKik7CiAKICNlbmRpZgotaW50ICAgICAgICAgYzRfZnJhbWVfcncgKGNpX3QgKiwgc3RydWN0IHNiZWNvbV9wb3J0X3BhcmFtICopOwotc3RhdHVzX3QgICAgYzRfZ2V0X3BvcnQgKGNpX3QgKiwgaW50KTsKLWludCAgICAgICAgIGM0X2xvb3BfcG9ydCAoY2lfdCAqLCBpbnQsIHVfaW50OF90KTsKLWludCAgICAgICAgIGM0X211c3ljY19ydyAoY2lfdCAqLCBzdHJ1Y3QgYzRfbXVzeWNjX3BhcmFtICopOwotaW50ICAgICAgICAgYzRfbmV3X2NoYW4gKGNpX3QgKiwgaW50LCBpbnQsIHZvaWQgKik7Ci1zdGF0dXNfdCAgICBjNF9zZXRfcG9ydCAoY2lfdCAqLCBpbnQpOwotaW50ICAgICAgICAgYzRfcGxkX3J3IChjaV90ICosIHN0cnVjdCBzYmVjb21fcG9ydF9wYXJhbSAqKTsKLXZvaWQgICAgICAgIGNsZWFudXBfZGV2cyAodm9pZCk7Ci12b2lkICAgICAgICBjbGVhbnVwX2lvcmVtYXAgKHZvaWQpOwotc3RhdHVzX3QgICAgbXVzeWNjX2NoYW5fZG93biAoY2lfdCAqLCBpbnQpOwotaXJxcmV0dXJuX3QgbXVzeWNjX2ludHJfdGhfaGFuZGxlciAodm9pZCAqKTsKLWludCAgICAgICAgIG11c3ljY19zdGFydF94bWl0IChjaV90ICosIGludCwgdm9pZCAqKTsKK2ludCAgICAgICAgIGM0X2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ZWwsIGludCwgMDQ0NCk7CiAKIGludCAgICAgICAgIGN4dDFlMV9tYXhfbXJ1ID0gTVVTWUNDX01SVTsKLWludCAgICAgICAgIG1heF9tcnVfZGVmYXVsdCA9IE1VU1lDQ19NUlU7CitzdGF0aWMgaW50ICBtYXhfbXJ1X2RlZmF1bHQgPSBNVVNZQ0NfTVJVOwogbW9kdWxlX3BhcmFtKGN4dDFlMV9tYXhfbXJ1LCBpbnQsIDA0NDQpOwogCiBpbnQgICAgICAgICBjeHQxZTFfbWF4X210dSA9IE1VU1lDQ19NVFU7CkBAIC0xMjcsMzMgKzEyNiwyMyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotdm9pZCAgICAgICAqCi1nZXR1c2VyYnljaGFuIChpbnQgY2hhbm51bSkKK3ZvaWQgKgorZ2V0dXNlcmJ5Y2hhbihpbnQgY2hhbm51bSkKIHsKLSAgICBtY2hfdCAgICAgICpjaDsKKwltY2hfdCAgICAgICpjaDsKIAotICAgIGNoID0gYzRfZmluZF9jaGFuIChjaGFubnVtKTsKLSAgICByZXR1cm4gY2ggPyBjaC0+dXNlciA6IE5VTEw7CisJY2ggPSBjNF9maW5kX2NoYW4oY2hhbm51bSk7CisJcmV0dXJuIGNoID8gY2gtPnVzZXIgOiBOVUxMOwogfQogCiAKLWNoYXIgICAgICAgKgotZ2V0X2hkbGNfbmFtZSAoaGRsY19kZXZpY2UgKmhkbGMpCitjaGFyICoKK2dldF9oZGxjX25hbWUoaGRsY19kZXZpY2UgKmhkbGMpCiB7Ci0gICAgc3RydWN0IGM0X3ByaXYgKnByaXYgPSBoZGxjLT5wcml2OwotICAgIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgPSBnZXR1c2VyYnlj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nfd3FfY2hhbl9yZXN0YXJ0KTsKLSAgICByZXR1cm4gMDsgICAgICAgICAgICAgICAgICAgICAgIC8qIHN1Y2Nlc3MgKi8KKwkvKiogSU5JVF9XT1JLKHN0cnVjdCB3b3JrX3N0cnVjdCAqd29yaywKKwkgKiogICAgICAgICAgIHZvaWQgKCpmdW5jdGlvbikodm9pZCAqKSwKKwkgKiogICAgICAgICAgIHZvaWQgKmRhdGEpOworCSAqKi8KKwlJTklUX1dPUksoJmNoLT5jaF93b3JrLCAodm9pZCAqKW11c3ljY193cV9jaGFuX3Jlc3RhcnQpOworCXJldHVybiAwOyAgICAgICAgICAgICAgICAgICAgICAgLyogc3VjY2VzcyAqLwogfQogCiBzdGF0dXNfdAotYzRfd3FfcG9ydF9pbml0IChtcGlfdCAqcGkpCitjNF93cV9wb3J0X2luaXQobXBpX3QgKnBpKQogewogCi0gICAgY2hhciAgICAgICAgbmFtZVsxNl0sICpucDsgIC8qIE5PVEU6IG5hbWUgb2YgdGhlIHF1ZXVlIGxpbWl0ZWQgYnkgc3lzdGVtCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHRvIDEwIGNoYXJhY3RlcnMgKi8KKwljaGFyICAgICAgICBuYW1lWzE2XTsgIC8qIE5PVEU6IG5hbWUgb2YgdGhlIHF1ZXVlIGxpbWl0ZWQgYnkgc3lzdGVtCisJCQkJICAgICAqIHRvIDEwIGNoYXJhY3RlcnMgKi8KKwlpZiAocGktPndxX3BvcnQpCisJCXJldHVybiAwOyAgICAgICAgICAgICAgICAgICAvKiBhbHJlYWR5IGluaXRpYWxpemVkICovCiAKLSAgICBpZiAocGktPndxX3BvcnQpCi0gICAgICAgIHJldHVybiAwOyAgICAgICAgICAgICAgICAgICAvKiBhbHJlYWR5IGluaXRpYWxpemVkICovCi0KLSAgICBucCA9IG5hbWU7Ci0gICAgbWVtc2V0IChuYW1lLCAwLCAxNik7Ci0gICAgc3ByaW50ZiAobnAsICIlcyVkIiwgcGktPnVwLT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y9pbgotICAgICAqIHN0cnVjdHVyZSBzaW5jZSBpdCBjYWxscyBrZnJlZSh3cSk7Ci0gICAgICovCi0gICAgaWYgKHBpLT53cV9wb3J0KQotICAgIHsKLSAgICAgICAgZGVzdHJveV93b3JrcXVldWUgKHBpLT53cV9wb3J0KTsgICAgICAgIC8qIHRoaXMgYWxzbyBjYWxscwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogZmx1c2hfd29ya3F1ZXVlKCkgKi8KLSAgICAgICAgcGktPndxX3BvcnQgPSBOVUxMOwotICAgIH0KKwkvKgorCSAqIFBPUlQgUE9JTlQ6IGNhbm5vdCBjYWxsIHRoaXMgaWYgV1EgaXMgc3RhdGljYWxseSBhbGxvY2F0ZWQgdy9pbgorCSAqIHN0cnVjdHVyZSBzaW5jZSBpdCBjYWxscyBrZnJlZSh3cSk7CisJICovCisJaWYgKHBpLT53cV9wb3J0KSB7CisJCWRlc3Ryb3lfd29ya3F1ZXVlKHBpLT53cV9wb3J0KTsgICAgICAgIC8qIHRoaXMgYWxzbyBjYWxscworCQkJCQkJCSogZmx1c2hfd29ya3F1ZXVlKCkgKi8KKwkJcGktPndxX3BvcnQgPSBOVUxMOworCX0KIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotaXJxcmV0dXJuX3QKLWM0X2xpbnV4X2ludGVycnVwdCAoaW50IGlycSwgdm9pZCAqZGV2X2luc3RhbmNlKQorc3RhdGljIGlycXJldHVybl90CitjNF9saW51eF9pbnRlcnJ1cHQoaW50IGlycSwgdm9pZCAqZGV2X2luc3RhbmNlKQogewotICAgIHN0cnVjdCBuZXRfZGV2aWNlICpuZGV2ID0gZGV2X2luc3RhbmNlOworCXN0cnVjdCBuZXRfZGV2aWNlICpuZGV2ID0gZGV2X2luc3RhbmNlOwogCi0gICAgcmV0dXJuIG11c3ljY19pbnRy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GV2aWNlICpoZGxjID0gZGV2X3RvX2hkbGMgKG5kZXYpOwotICAgIGNvbnN0IHN0cnVjdCBjNF9wcml2ICpwcml2ID0gaGRsYy0+cHJpdjsKLSAgICBpbnQgICAgICAgICByZXQ7CisJaGRsY19kZXZpY2UgKmhkbGMgPSBkZXZfdG9faGRsYyhuZGV2KTsKKwljb25zdCBzdHJ1Y3QgYzRfcHJpdiAqcHJpdiA9IGhkbGMtPnByaXY7CisJaW50ICAgICAgICAgcmV0OwogCi0gICAgaWYgKChyZXQgPSBoZGxjX29wZW4gKG5kZXYpKSkKLSAgICB7Ci0gICAgICAgIHByX2luZm8oImhkbGNfb3BlbiBmYWlsdXJlLCBlcnIgJWQuXG4iLCByZXQpOwotICAgICAgICByZXR1cm4gcmV0OwotICAgIH0KLSAgICBpZiAoKHJldCA9IGM0X2NoYW5fdXAgKHByaXYtPmNpLCBwcml2LT5jaGFubnVtKSkpCi0gICAgICAgIHJldHVybiAtcmV0OwotICAgIHRyeV9tb2R1bGVfZ2V0IChUSElTX01PRFVMRSk7Ci0gICAgbmV0aWZfc3RhcnRfcXVldWUgKG5kZXYpOwotICAgIHJldHVybiAwOyAgICAgICAgICAgICAgICAgICAgICAgLyogbm8gZXJyb3IgPSBzdWNjZXNzICovCisJcmV0ID0gaGRsY19vcGVuKG5kZXYpOworCWlmIChyZXQpIHsKKwkJcHJfaW5mbygiaGRsY19vcGVuIGZhaWx1cmUsIGVyciAlZC5cbiIsIHJldCk7CisJCXJldHVybiByZXQ7CisJfQorCisJcmV0ID0gYzRfY2hhbl91cChwcml2LT5jaSwgcHJpdi0+Y2hhbm51bSk7CisJaWYgKHJldCA8IDApCisJCXJldHVybiByZXQ7CisJdHJ5X21vZHVsZV9nZXQoVEhJU19NT0RVTEUpOworCW5ldGlmX3N0YXJ0X3F1ZXVlKG5kZXYpOworCXJldHVybiAwOyAgICAgICAgICAgICAgICAgICAgICAgLyogbm8gZXJyb3IgPSBzdWNjZXNzICovCiB9CiAKIAogc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TsKKwlpbnQgICAgICAgICByZXQ7CiAKLSAgICBpZiAoYzRfZmluZF9jaGFuIChjcC0+Y2hhbm51bSkpCi0gICAgICAgIHJldHVybiBOVUxMOyAgICAgICAgICAgICAgICAgICAvKiBjaGFubmVsIGFscmVhZHkgZXhpc3RzICovCisJaWYgKGM0X2ZpbmRfY2hhbihjcC0+Y2hhbm51bSkpCisJCXJldHVybiBOVUxMOyAgICAgICAgICAgICAgICAgICAvKiBjaGFubmVsIGFscmVhZHkgZXhpc3RzICovCiAKLSAgICB7Ci0gICAgICAgIHN0cnVjdCBjNF9wcml2ICpwcml2OworCXsKKwkJc3RydWN0IGM0X3ByaXYgKnByaXY7CiAKLSAgICAgICAgLyogYWxsb2NhdGUgdGhlbiBmaWxsIGluIHByaXZhdGUgZGF0YSBzdHJ1Y3R1cmUgKi8KLSAgICAgICAgcHJpdiA9IE9TX2ttYWxsb2MgKHNpemVvZiAoc3RydWN0IGM0X3ByaXYpKTsKLSAgICAgICAgaWYgKCFwcml2KQotICAgICAgICB7Ci0gICAgICAgICAgICBwcl93YXJuaW5nKCIlczogbm8gbWVtb3J5IGZvciBuZXRfZGV2aWNlICFcbiIsIGNpLT5kZXZuYW1lKTsKLQkgICAgcmV0dXJuIE5VTEw7Ci0gICAgICAgIH0KLSAgICAgICAgZGV2ID0gYWxsb2NfaGRsY2RldiAocHJpdik7Ci0gICAgICAgIGlmICghZGV2KQotICAgICAgICB7Ci0gICAgICAgICAgICBwcl93YXJuaW5nKCIlczogbm8gbWVtb3J5IGZvciBoZGxjX2RldmljZSAhXG4iLCBjaS0+ZGV2bmFtZSk7Ci0gICAgICAgICAgICBPU19rZnJlZSAocHJpdik7Ci0JICAgIHJldHVybiBOVUxMOwotICAgICAgICB9Ci0gICAgICAgIHByaXYtPmNpID0gY2k7Ci0gICAgICAgIHByaXYtPmNoYW5udW0gPSBjcC0+Y2hhbm51bTsKLSAgICB9CisJCS8qIGFsbG9jYXRlIHRoZW4gZmlsbCBpbiBwcml2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190Ci1kb19nZXRfcG9ydCAoc3RydWN0IG5ldF9kZXZpY2UgKm5kZXYsIHZvaWQgKmRhdGEpCitzdGF0aWMgc3RhdHVzX3QKK2RvX2dldF9wb3J0KHN0cnVjdCBuZXRfZGV2aWNlICpuZGV2LCB2b2lkICpkYXRhKQogewotICAgIGludCAgICAgICAgIHJldDsKLSAgICBjaV90ICAgICAgICpjaTsgICAgICAgICAgICAgLyogY2kgc3RhbmRzIGZvciBjYXJkIGluZm9ybWF0aW9uICovCi0gICAgc3RydWN0IHNiZWNvbV9wb3J0X3BhcmFtIHBwOy8qIGNvcHkgZGF0YSB0byBrZXJuZWwgbGFuZCAqLworCWludCAgICAgICAgIHJldDsKKwljaV90ICAgICAgICpjaTsgICAgICAgICAgICAgLyogY2kgc3RhbmRzIGZvciBjYXJkIGluZm9ybWF0aW9uICovCisJc3RydWN0IHNiZWNvbV9wb3J0X3BhcmFtIHBwOy8qIGNvcHkgZGF0YSB0byBrZXJuZWwgbGFuZCAqLwogCi0gICAgaWYgKGNvcHlfZnJvbV91c2VyICgmcHAsIGRhdGEsIHNpemVvZiAoc3RydWN0IHNiZWNvbV9wb3J0X3BhcmFtKSkpCi0gICAgICAgIHJldHVybiAtRUZBVUxUOwotICAgIGlmIChwcC5wb3J0bnVtID49IE1VU1lDQ19OUE9SVFMpCi0gICAgICAgIHJldHVybiAtRUZBVUxUOwotICAgIGNpID0gZ2V0X2NpX2J5X2RldiAobmRldik7Ci0gICAgaWYgKCFjaSkKLSAgICAgICAgcmV0dXJuIC1FSU5WQUw7ICAgICAgICAgICAgIC8qIGdldCBjYXJkIGluZm8gKi8KKwlpZiAoY29weV9mcm9tX3VzZXIoJnBwLCBkYXRhLCBzaXplb2Yoc3RydWN0IHNiZWNvbV9wb3J0X3BhcmFtKSkpCisJCXJldHVybiAtRUZBVUxUOworCWlmIChwcC5wb3J0bnVtID49IE1VU1lDQ19OUE9SVFMpCisJCXJldHVybiAtRUZBVUxUOworCWNpID0gZ2V0X2Np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wljaS0+Y2lfbXVzeWNjX2lzcl90cS5kYXRhID0gY2k7CiAjZW5kaWYKIAogCi0gICAgaWYgKHJlZ2lzdGVyX25ldGRldiAobmRldikgfHwKLSAgICAgICAgKGM0X2luaXQgKGNpLCAodV9jaGFyICopIGYwLCAodV9jaGFyICopIGYxKSAhPSBTQkVfRFJWUl9TVUNDRVNTKSkKLSAgICB7Ci0gICAgICAgIE9TX2tmcmVlIChuZXRkZXZfcHJpdihuZGV2KSk7Ci0gICAgICAgIE9TX2tmcmVlIChuZGV2KTsKLSAgICAgICAgZXJyb3JfZmxhZyA9IEVOT0RFVjsKLQlyZXR1cm4gTlVMTDsKLSAgICB9Ci0gICAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAgICAgKiAgaW50IHJlcXVlc3RfaXJxKHVuc2lnbmVkIGludCBpcnEsCi0gICAgICogICAgICAgICAgICAgICAgICB2b2lkICgqaGFuZGxlcikoaW50LCB2b2lkICosIHN0cnVjdCBwdF9yZWdzICopLAotICAgICAqICAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBmbGFncywgY29uc3QgY2hhciAqZGV2X25hbWUsIHZvaWQgKmRldl9pZCk7Ci0gICAgICogIHdoZXJlaW46Ci0gICAgICogIGlycSAgICAgIC0+IFRoZSBpbnRlcnJ1cHQgbnVtYmVyIHRoYXQgaXMgYmVpbmcgcmVxdWVzdGVkLgotICAgICAqICBoYW5kbGVyICAtPiBQb2ludGVyIHRvIGhhbmRsaW5nIGZ1bmN0aW9uIGJlaW5nIGluc3RhbGxlZC4KLSAgICAgKiAgZmxhZ3MgICAgLT4gQSBiaXQgbWFzayBvZiBvcHRpb25zIHJlbGF0ZWQgdG8gaW50ZXJydXB0IG1hbmFnZW1lbnQuCi0gICAgICogIGRldl9uYW1lIC0+IFN0cmluZyB1c2VkIGluIC9wcm9jL2ludGVycnVwdHMgdG8gc2hvdyBvd25lciBvZiBpbnRlcnJ1cHQuCi0gICAgICogIGRldl9pZCAgIC0+IFBvaW50ZXIgKGZvciBzaGFyZWQgaW50ZXJydXB0IGxpbmVzKSB0byBwb2ludCB0byBpdHMgb3duCi0gICAgICogICAgICAgICAgICAgIHByaXZhdGUgZGF0YSBhcmVhICh0byBpZGVudGlmeSB3aGljaCBkZXZpY2UgaXMgaW50ZXJydXB0aW5nKS4KLSAgICAgKgotICAgICAqICBleHRlcm4gdm9pZCBmcmVlX2lycSh1bnNpZ25lZCBpbnQgaXJxLCB2b2lkICpkZXZfaWQpOwotICAgICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwlpZiAocmVnaXN0ZXJfbmV0ZGV2KG5kZXYpIHx8CisJCShjNF9pbml0KGNpLCAodV9jaGFyICopIGYwLCAodV9jaGFyICopIGYxKSAhPSBTQkVfRFJWUl9TVUNDRVNTKSkgeworCQlPU19rZnJlZShuZXRkZXZfcHJpdihuZGV2KSk7CisJCU9TX2tmcmVlKG5kZXYpOworCQllcnJvcl9mbGFnID0gLUVOT0RFVjsKKwkJcmV0dXJuIE5VTEw7CisJfQorCS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJICogIGludCByZXF1ZXN0X2lycSh1bnNpZ25lZCBpbnQgaXJxLAorCSAqICAgICAgICAgICAgICAgICAgdm9pZCAoKmhhbmRsZXIpKGludCwgdm9pZCAqLCBzdHJ1Y3QgcHRfcmVncyAqKSwKKwkgKiAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgZmxhZ3MsIGNvbnN0IGNoYXIgKmRldl9uYW1lLCB2b2lkICpkZXZfaWQpOworCSAqICB3aGVyZWluOgorCSAqICBpcnEgICAgICAtPiBUaGUgaW50ZXJydXB0IG51bWJlciB0aGF0IGlzIGJlaW5nIHJlcXVlc3RlZC4KKwkgKiAgaGFuZGxlciAgLT4gUG9pbnRlciB0byBoYW5kbGluZyBmdW5jdGlvbiBiZWluZyBpbnN0YWxsZWQuCisJICogIGZsYWdzICAgIC0+IEEgYml0IG1hc2sgb2Ygb3B0aW9ucyByZWxhdGVkIHRvIGludGVycnVwdCBtYW5hZ2VtZW50LgorCSAqICBkZXZfbmFtZSAtPiBTdHJpbmcgdXNlZCBpbiAvcHJvYy9pbnRlcnJ1cHRzIHRvIHNob3cgb3duZXIgb2YgaW50ZXJydXB0LgorCSAqICBkZXZfaWQgICAtPiBQb2ludGVyIChmb3Igc2hhcmVkIGludGVycnVwdCBsaW5lcykgdG8gcG9pbnQgdG8gaXRzIG93bgorCSAqICAgICAgICAgICAgICBwcml2YXRlIGRhdGEgYXJlYSAodG8gaWRlbnRpZnkgd2hpY2ggZGV2aWNlIGlzIGludGVycnVwdGluZykuCisJICoKKwkgKiAgZXh0ZXJuIHZvaWQgZnJlZV9pcnEodW5zaWduZWQgaW50IGlycSwgdm9pZCAqZGV2X2lkKTsKKwkgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLSAgICBpZiAocmVxdWVzdF9pcnEgKGlycTAsICZjNF9saW51eF9pbnRlcnJ1cHQsCi0gICAgICAgICAgICAgICAgICAgICBJUlFGX1NIQVJFRCwKLSAgICAgICAgICAgICAgICAgICAgIG5kZXYtPm5hbWUsIG5kZXYpKQotICAgIHsKLSAgICAgICAgcHJfd2FybmluZygiJXM6IE1VU1lDQyBjb3VsZCBub3QgZ2V0IGlycTogJWRcbiIsIG5kZXYtPm5hbWUsIGlycTApOwotICAgICAgICB1bnJlZ2lzdGVyX25ldGRldiAobmRldik7Ci0gICAgICAgIE9TX2tmcmVlIChuZXRkZXZfcHJpdihuZGV2KSk7Ci0gICAgICAgIE9TX2tmcmVlIChuZGV2KTsKLSAgICAgICAgZXJyb3JfZmxhZyA9IEVJTzsKLQlyZXR1cm4gTlVMTDsKLSAgICB9CisJaWYgKHJlcXVl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JCWZyZWVfaXJxKGlycTAsIG5kZXYpOworCQlPU19rZnJlZShuZXRkZXZfcHJpdihuZGV2KSk7CisJCU9TX2tmcmVlKG5kZXYpOworCQllcnJvcl9mbGFnID0gLUVJTzsKKwkJcmV0dXJuIE5VTEw7CisJfQogI2VuZGlmCiAKLSAgICAvKiBzZXR1cCBib2FyZCBpZGVudGlmaWNhdGlvbiBpbmZvcm1hdGlvbiAqLworCS8qIHNldHVwIGJvYXJkIGlkZW50aWZpY2F0aW9uIGluZm9ybWF0aW9uICovCiAKLSAgICB7Ci0gICAgICAgIHVfaW50MzJfdCAgIHRtcDsKKwl7CisJCXVfaW50MzJfdCAgIHRtcDsKIAotICAgICAgICBoZHdfc25fZ2V0IChoaSwgYnJkbm8pOyAgICAgLyogYWxzbyBzZXRzIFBST00gZm9ybWF0IHR5cGUgKHByb21mbXQpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBmb3IgbGF0ZXIgdXNhZ2UgKi8KKwkJLyogYWxzbyBzZXRzIFBST00gZm9ybWF0IHR5cGUgKHByb21mbXQpIGZvciBsYXRlciB1c2FnZSAqLworCQloZHdfc25fZ2V0KGhpLCBicmRubyk7CiAKLSAgICAgICAgc3dpdGNoIChoaS0+cHJvbWZtdCkKLSAgICAgICAgewotICAgICAgICBjYXNlIFBST01fRk9STUFUX1RZUEUxOgotICAgICAgICAgICAgbWVtY3B5IChuZGV2LT5kZXZfYWRkciwgKEZMRF9UWVBFMSAqKSAoaGktPm1mZ19pbmZvLnBmdDEuU2VyaWFsKSwgNik7Ci0gICAgICAgICAgICBtZW1jcHkgKCZ0bXAsIChGTERfVFlQRTEgKikgKGhpLT5tZmdfaW5mby5wZnQxLklkKSwgNCk7ICAgICAvKiB1bmFsaWduZWQgZGF0YQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogYWNxdWlzaXRpb24gKi8KLSAgICAgICAgICAgIGNpLT5icmRfaWQgPSBjcHVfdG9fYmUzMiAodG1wKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFBST01fRk9STUFUX1RZUEUyOgotICAgICAgICAgICAgbWVtY3B5IChuZGV2LT5kZXZfYWRkciwgKEZMRF9UWVBFMiAqKSAoaGktPm1mZ19pbmZvLnBmdDIuU2VyaWFsKSwgNik7Ci0gICAgICAgICAgICBtZW1jcHkgKCZ0bXAsIChGTERfVFlQRTIgKikgKGhpLT5tZmdfaW5mby5wZnQyLklkKSwgNCk7ICAgICAvKiB1bmFsaWduZWQgZGF0YQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogYWNxdWlzaXRpb24gKi8KLSAgICAgICAgICAgIGNpLT5icmRfaWQgPSBjcHVfdG9fYmUzMiAodG1wKTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgY2ktPmJyZF9pZCA9IDA7Ci0gICAgICAgICAgICBtZW1zZXQgKG5kZXYtPmRldl9hZGRyLCAwLCA2KTsKLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9CisJCXN3aXRjaCAoaGktPnByb21mbXQpIHsKKwkJY2FzZSBQUk9NX0ZPUk1BVF9UWVBFMToKKwkJCW1lbWNweShuZGV2LT5kZXZfYWRkciwKKwkJCSAgICAgICAoRkxEX1RZUEUxICopIChoaS0+bWZnX2luZm8ucGZ0MS5TZXJpYWwpLCA2KTsKKwkJCS8qIHVuYWxpZ25lZCBkYXRhIGFjcXVpc2l0aW9uICovCisJCQltZW1jcHkoJnRtcCwgKEZMRF9UWVBFMSAqKSAoaGktPm1mZ19pbmZvLnBmdDEuSWQpLCA0KTsKKwkJCWNpLT5icmRfaWQgPSBjcHVfdG9fYmUzMih0bXApOworCQkJYnJlYWs7CisJCWNhc2UgUFJPTV9GT1JNQVRfVFlQRTI6CisJCQltZ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CA+IDEwMDApCisJCQltYXhfdHhkZXNjX3VzZWQgPSAxMDAwOyAvKiBvdXQtb2YtYm91bmRzIHJlc2V0ICovCisJCXByX2luZm8oIk5PVEU6IGRyaXZlciBwYXJhbWV0ZXIgPG1heF90eGRlc2NfdXNlZD4gY2hhbmdlZCBmcm9tIGRlZmF1bHQgJWQgdG8gJWQuXG4iLAorCQkJbWF4X3R4ZGVzY19kZWZhdWx0LCBtYXhfdHhkZXNjX3VzZWQpOworCX0KKwlyZXR1cm4gMDsgICAgICAgICAgICAgICAgICAgICAgIC8qIGluc3RhbGxhdGlvbiBzdWNjZXNzICovCiB9CiAKIApAQCAtMTEzOCwzMSArMTExNywyOSBAQAogICAqLwogCiBzdGF0aWMgdm9pZCBfX2V4aXQKLWNsZWFudXBfaGRsYyAodm9pZCkKK2NsZWFudXBfaGRsYyh2b2lkKQogewotICAgIGhkd19pbmZvX3QgKmhpOwotICAgIGNpX3QgICAgICAgKmNpOwotICAgIHN0cnVjdCBuZXRfZGV2aWNlICpuZGV2OwotICAgIGludCAgICAgICAgIGksIGosIGs7CisJaGR3X2luZm9fdCAqaGk7CisJY2lfdCAgICAgICAqY2k7CisJc3RydWN0IG5ldF9kZXZpY2UgKm5kZXY7CisJaW50ICAgICAgICAgaSwgaiwgazsKIAotICAgIGZvciAoaSA9IDAsIGhpID0gaGR3X2luZm87IGkgPCBNQVhfQk9BUkRTOyBpKyssIGhpKyspCi0gICAgewotICAgICAgICBpZiAoaGktPm5kZXYpICAgICAgICAgICAgICAgLyogYSBib2FyZCBoYXMgYmVlbiBhdHRhY2hlZCAqLwotICAgICAgICB7Ci0gICAgICAgICAgICBjaSA9IChjaV90ICopKG5ldGRldl9wcml2KGhpLT5uZGV2KSk7Ci0gICAgICAgICAgICBmb3IgKGogPSAwOyBqIDwgY2ktPm1heF9wb3J0OyBqKyspCi0gICAgICAgICAgICAgICAgZm9yIChrID0gMDsgayA8IE1VU1lDQ19OQ0hBTlM7IGsrKykKLSAgICAgICAg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h0MWUxL3BtY2M0X2Rydi5jCkBAIC0xMTIsMTIgKzExMiwxMiBAQAogICAgICAgICBmb3IgKHBvcnRudW0gPSAwOyBwb3J0bnVtIDwgY2ktPm1heF9wb3J0OyBwb3J0bnVtKyspCiAgICAgICAgICAgICBmb3IgKGdjaGFuID0gMDsgZ2NoYW4gPCBNVVNZQ0NfTkNIQU5TOyBnY2hhbisrKQogICAgICAgICAgICAgewotICAgICAgICAgICAgICAgIGlmICgoY2ggPSBjaS0+cG9ydFtwb3J0bnVtXS5jaGFuW2djaGFuXSkpCi0gICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICBpZiAoKGNoLT5zdGF0ZSAhPSBVTkFTU0lHTkVEKSAmJgotICAgICAgICAgICAgICAgICAgICAgICAgKGNoLT5jaGFubnVtID09IGNoYW5udW0pKQotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGNoOwotICAgICAgICAgICAgICAgIH0KKwkJY2ggPSBjaS0+cG9ydFtwb3J0bnVtXS5jaGFuW2djaGFuXTsKKwkJaWYgKGNoKSB7CisJCQlpZiAoKGNoLT5zdGF0ZSAhPSBVTkFTU0lHTkVEKSAmJgorCQkJICAgKGNoLT5jaGFubnVtID09IGNoYW5udW0pKQorCQkJCXJldHVybiBjaDsKKwkJfQogICAgICAgICAgICAgfQogICAgIHJldHVybiBOVUxMOwogfQpAQCAtNjY4LDggKzY2OCw5IEBACiAgICAgc3RhdHVzX3QgICAgcmV0OwogCiAgICAgLyogUE9SVCBQT0lOVDogdGhpcyByb3V0aW5lIGdlbmVyYXRlcyBmaXJzdCBpbnRlcnJ1cHQgKi8KLSAgICBpZiAoKHJldCA9IG11c3ljY19pbml0IChjaSkpICE9IFNCRV9EUlZSX1NVQ0NFU1MpCi0gICAgICAgIHJldHVybiByZXQ7CisJcmV0ID0gbXVzeWNjX2luaXQoY2kpOworCWlmIChyZXQgIT0gU0JFX0RSVlJfU1VDQ0VTUykKKwkJcmV0dXJuIHJldDsKIAogI2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IG9ubHkgMSB0aHJ1IGhlcmUsIHBlcgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogYm9hcmQgKi8KQEAgLTkxNSw3ICs5MTYsNyBAQAogICAgIGludCAgICAgICAgIGk7CiAKICAgICBpZiAocG9ydG51bSA+PSBjaS0+bWF4X3BvcnQpICAgIC8qIHNhbml0eSBjaGVjayAqLwotICAgICAgICByZXR1cm4gRU5YSU87CisgICAgICAgIHJldHVybiAtRU5YSU87CiAKICAgICBwaSA9ICZjaS0+cG9ydFtwb3J0bnVtXTsKICAgICBwcCA9ICZjaS0+cG9ydFtwb3J0bnVtXS5wOwpAQCAtOTI3LDE1ICs5MjgsMTUgQEAKICAgICAgICAgICAgICAgICBwb3J0bnVtLCBlMW1vZGUsIHBpLT5vcGVuY2hhbnMpOwogICAgIH0KICAgICBpZiAocGktPm9wZW5jaGFucykKLSAgICAgICAgcmV0dXJuIEVCVVNZOyAgICAgICAgICAgICAgIC8qIGdyb3VwIG5lZWRzIGluaXRpYWxpemF0aW9uIG9ubHkgZm9yCisgICAgICAgIHJldHVybiAtRUJVU1k7ICAgICAgICAgICAgICAgLyogZ3JvdXAgbmVlZHMgaW5pdGlhbGl6YXRpb24gb25seSBmb3IKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIGZpcnN0IGNoYW5uZWwgb2YgYSBncm91cCAqLwogCiAgICAgewogICAgICAgICBzdGF0dXNfdCAgICByZXQ7CiAKLSAgICAgICAgaWYgKChyZXQgPSBjNF93cV9wb3J0X2luaXQgKHBpKSkpICAgICAgIC8qIGNyZWF0ZS9pbml0Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiB3b3JrcXVldWVfc3RydWN0ICovCi0gICAgICAgICAgICByZXR1cm4gcmV0OworCXJldCA9IGM0X3dxX3BvcnRfaW5pdChwaSk7CisJaWYgKHJldCkgICAgICAgLyogY3JlYXRlL2luaXQgd29ya3F1ZXVlX3N0cnVjdCAqLworCQlyZXR1cm4gcmV0OwogICAgIH0KIAogICAgIGluaXRfY29tZXQgKGNpLCBwaS0+Y29tZXRiYXNlLCBwcC0+cG9ydF9tb2RlLCAxIC8qIGNsb2NrbWFzdGVyID09IHRydWUgKi8gLCBwcC0+cG9ydFApOwpAQCAtMTAxOCwxMCArMTAxOSwxMCBAQAogICAgIGludCAgICAgICAgIGdjaGFuOwogCiAgICAgaWYgKGM0X2ZpbmRfY2hhbiAoY2hhbm51bSkpICAgICAvKiBhIG5ldyBjaGFubmVsIHNob3VsZG4ndCBhbHJlYWR5IGV4aXN0ICovCi0gICAgICAgIHJldHVybiBFRVhJU1Q7CisgICAgICAgIHJldHVybiAtRUVYSVNUOwogCiAgICAgaWYgKHBvcnRudW0gPj0gY2ktPm1heF9wb3J0KSAgICAvKiBzYW5pdHkgY2hlY2sgKi8KLSAgICAgICAgcmV0dXJuIEVOWElPOworICAgICAgICByZXR1cm4gLUVOWElPOwogCiAgICAgcGkgPSAmKGNpLT5wb3J0W3BvcnRudW1dKTsKICAgICAvKiBmaW5kIGFueSBhdmFpbGFibGUgY2hhbm5lbCB3aXRoaW4gdGhpcyBwb3J0ICovCkBAIC0xMDMyLDcgKzEwMzMsNyBAQAogICAgICAgICAgICAgYnJlYWs7CiAgICAgfQogICAgIGlmIChnY2hhbiA9PSBNVVNZQ0NfTkNIQU5TKSAgICAgLyogZXhoYXVzdGVkIHRhYmxlLCBhbGwgd2VyZSBhc3NpZ25lZCAqLwotICAgICAgICByZXR1cm4gRU5GSUxFOworICAgICAgICByZXR1cm4gLUVORklMRTsKIAogICAgIGNoLT51cCA9IHBpOwogCkBAIC0xMDU1LDggKzEwNTYsOSBAQAogICAgIHsKICAgICAgICAgc3RhdHVzX3QgICAgcmV0OwogCi0gICAgICAgIGlmICgocmV0ID0gYzRfd2tfY2hhbl9pbml0IChwaSwgY2gpKSkKLSAgICAgICAgICAgIHJldHVybiByZXQ7CisJcmV0ID0gYzRfd2tfY2hhbl9pbml0KHBpLCBjaCk7CisJaWYgKHJldCkKKwkJcmV0dXJuIHJldDsKICAgICB9CiAKICAgICAvKiBzYXZlIG9mZiBpbnRlcmZhY2UgYXNzaWdubWVudHMgd2hpY2ggYm91bmQgYSBib2FyZCAqLwpAQCAtMTA3OSw4ICsxMDgxLDEwIEBACiB7CiAgICAgbWNoX3QgICAgICAqY2g7CiAKLSAgICBpZiAoIShjaCA9IGM0X2ZpbmRfY2hhbiAoY2hhbm51bSkpKQotICAgICAgICByZXR1cm4gRU5PRU5UOworCWNoID0gYzRfZmluZF9jaGFuKGNoYW5udW0pOworCWlmICghY2gpCisJCXJldHVybiAtRU5PRU5UOworCiAgICAgaWYgKGNoLT5zdGF0ZSA9PSBVUCkKICAgICAgICAgbXVzeWNjX2NoYW5fZG93biAoKGNpX3QgKikgMCwgY2hhbm51bSk7CiAgICAgY2gtPnN0YXRlID0gVU5BU1NJR05FRDsKQEAgLTEwOTUsOCArMTA5OSw5IEBACiB7CiAgICAgbWNoX3QgICAgICAqY2g7CiAKLSAgICBpZiAoIShjaCA9IGM0X2ZpbmRfY2hhbiAoY2hhbm51bSkpKQotICAgICAgICByZXR1cm4gRU5PRU5UOworCWNoID0gYzRfZmluZF9jaGFuKGNoYW5udW0pOworCWlmICghY2gpCisJCXJldHVybiAtRU5PRU5UOwogCiAgICAgbWVtc2V0ICgmY2gtPnMsIDAsIHNpemVvZiAoc3RydWN0IHNiZWNvbV9jaGFuX3N0YXRzKSk7CiAgICAgcmV0dXJuIDA7CkBAIC0xMTA5LDE5ICsxMTE0LDIwIEBACiAgICAgbWNoX3QgICAgICAqY2g7CiAgICAgaW50ICAgICAgICAgaSwgeCA9IDA7CiAKLSAgICBpZiAoIShjaCA9IGM0X2ZpbmRfY2hhbiAoY2hhbm51bSkpKQotICAgICAgICByZXR1cm4gRU5PRU5UOworCWNoID0gYzRfZmluZF9jaGFuKGNoYW5udW0pOworCWlmICghY2gpCisJCXJldHVybiAtRU5PRU5UOwogCiAjaWYgMQogICAgIGlmIChjaC0+cC5jYXJkICE9IHAtPmNhcmQgfHwKICAgICAgICAgY2gtPnAucG9ydCAhPSBwLT5wb3J0IHx8CiAgICAgICAgIGNoLT5wLmNoYW5udW0gIT0gcC0+Y2hhbm51bSkKLSAgICAgICAgcmV0dXJuIEVJTlZBTDsKKyAgICAgICAgcmV0dXJuIC1FSU5WQUw7CiAjZW5kaWYKIAogICAgIGlmICghKGNoLT51cC0+Z3JvdXBfaXNfc2V0KSkKICAgICB7Ci0gICAgICAgIHJldHVybiBFSU87ICAgICAgICAgICAgICAgICAvKiBvdXQgb2Ygb3JkZXIsIFNFVF9QT1JUIGNvbW1hbmQKKyAgICAgICAgcmV0dXJuIC1FSU87ICAgICAgICAgICAgICAgICAvKiBvdXQgb2Ygb3JkZXIsIFNFVF9QT1JUIGNvbW1hbmQKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHJlcXVpcmVkIHByaW9yIHRvIGZpcnN0IGdyb3VwJ3MKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIFNFVF9DSEFOIGNvbW1hbmQgKi8KICAgICB9CkBAIC0xMTQzLDEwICsxMTQ5LDEyIEBACiAgICAgewogICAgICAgICBzdGF0dXNfdCAgICByZXQ7CiAKLSAgICAgICAgaWYgKChyZXQgPSBtdXN5Y2NfY2hhbl9kb3duICgoY2lfdCAqKSAwLCBjaGFubnVtKSkpCi0gICAgICAgICAgICByZXR1cm4gcmV0OwotICAgICAgICBpZiAoKHJldCA9IGM0X2NoYW5fdXAgKGNoLT51cC0+dXAsIGNoYW5udW0pKSkKLSAgICAgICAgICAgIHJldHVybiByZXQ7CisJcmV0ID0gbXVzeWNjX2NoYW5fZG93bigoY2lfdCAqKTAsIGNoYW5udW0pOworCWlmIChyZXQpCisJCXJldHVybiByZXQ7CisJcmV0ID0gYzRfY2hhbl91cChjaC0+dXAtPnVwLCBjaGFubnVtKTsKKwlpZiAocmV0KQorCQlyZXR1cm4gcmV0OwogICAgICAgICBzZF9lbmFibGVfeG1pdCAoY2gtPnVzZXIpOyAgLyogcmUtZW5hYmxlIHRvIGNhdGNoIGZsb3cgY29udHJvbGxlZAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogY2hhbm5lbCAqLwogICAgIH0KQEAgLTExNTksOCArMTE2NywxMCBAQAogewogICAgIG1jaF90ICAgICAgKmNoOwogCi0gICAgaWYgKCEoY2ggPSBjNF9maW5kX2NoYW4gKGNoYW5udW0pKSkKLSAgICAgICAgcmV0dXJuIEVOT0VOVDsKKwljaCA9IGM0X2ZpbmRfY2hhbihjaGFubnVtKTsKKwlpZiAoIWNoKQorCQlyZXR1cm4gLUVOT0VOVDsKKwogICAgICpwID0gY2gtPnA7CiAgICAgcmV0dXJuIDA7CiB9CkBAIC0xMTcwLDggKzExODAsMTAgQEAKIHsKICAgICBtY2hfdCAgICAgICpjaDsKIAotICAgIGlmICghKGNoID0gYzRfZmluZF9jaGFuIChjaGFubnVtKSkpCi0gICAgICAgIHJldHVybiBFTk9FTlQ7CisJY2ggPSBjNF9maW5kX2NoYW4oY2hhbm51bSk7CisJaWYgKCFjaCkKKwkJcmV0dXJuIC1FTk9FTlQ7CisKICAgICAqcCA9IGNoLT5zOwogICAgIHAtPnR4X3BlbmRpbmcgPSBhdG9taWNfcmVhZCAoJmNoLT50eF9wZW5kaW5nKTsKICAgICByZXR1cm4gMDsKQEAgLTEyNDAsOCArMTI1MiwxMCBAQAogICAgIHVfaW50MzJfdCAgIHRtcDsgICAgICAgICAgICAvKiBmb3Igb3B0aW1pemluZyBjb252ZXJzaW9uIGFjcm9zcyBCRQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBwbGF0Zm9ybSAqLwogCi0gICAgaWYgKCEoY2ggPSBjNF9maW5kX2NoYW4gKGNoYW5udW0pKSkKLSAgICAgICAgcmV0dXJuIEVOT0VOVDsKKwljaCA9IGM0X2ZpbmRfY2hhbihjaGFubnVtKTsKKwlpZiAoIWNoKQorCQlyZXR1cm4gLUVOT0VOVDsKKwogICAgIGlmIChjaC0+c3RhdGUgPT0gVVApCiAgICAgewogICAgICAgICBpZiAoY3h0MWUxX2xvZ19sZXZlbCA+PSBMT0dfTU9OSVRPUikKQEAgLTEyNjQsNyArMTI3OCw3IEBACiAgICAgICAgICAgICAgICAgcHJfaW5mbygiKyBhc2s0ICV4LCBjdXJyZW50bHkgJXhcbiIsCiAgICAgICAgICAgICAgICAgICAgICAgICBjaC0+cC5iaXRtYXNrW2ldLCBwaS0+dHNtW2ldKTsKICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIHJldHVybiBFSU5WQUw7CisgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKICAgICAgICAgfQogICAgICAgICBmb3IgKGogPSAwOyBqIDwgODsgaisrKQogICAgICAgICAgICAgaWYgKGNoLT5wLmJpdG1hc2tbaV0gJiAoMSA8PCBqKSkKQEAgLTEyNzcsNyArMTI5MSw3IEBACiAgICAgICAgIC8qIGlmKCBjeHQxZTFfbG9nX2xldmVsID49IExPR19XQVJOKSAgKi8KICAgICAgICAgcHJfaW5mbygiJXM6IGM0X2NoYW5fdXBbJWRdIEVOT0JVRlMgKG5vIFRpbWVTbG90cyBhc3NpZ25lZClcbiIsCiAgICAgICAgICAgICAgICAgY2ktPmRldm5hbWUsIGNoYW5udW0pOwotICAgICAgICByZXR1cm4gRU5PQlVGUzsgICAgICAgICAgICAgLyogdGhpcyBzaG91bGQgbm90IGhhcHBlbiAqLworICAgICAgICByZXR1cm4gLUVOT0JVRlM7ICAgICAgICAgICAgIC8qIHRoaXMgc2hvdWxkIG5vdCBoYXBwZW4gKi8KICAgICB9CiAgICAgYWRkciA9IGM0X2ZpZm9fYWxsb2MgKHBpLCBnY2hhbiwgJm5idWYpOwogICAgIGNoLT5zdGF0ZSA9IFVQOwpAQCAtMTM3MiwxMiArMTM4NiwxMyBAQAogICAgICAgICB9CiAgICAgICAgIG1kLT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EyMzIgJiBFSUE0MjIpCisgICAgIEFjY2VsZXBvcnQgWHIgICAgICAgICAgICA0ICYgOCAgICAgICAgICAgICAgIChFSUEyMzIpCisgICAgIEFjY2VsZXBvcnQgWHIgOTIwICAgICAgICA0ICYgOCAgICAgICAgICAgICAgIChFSUEyMzIpCisgICAgIEFjY2VsZXBvcnQgQy9YICAgICAgICAgICA4IC0gMTI4ICAgICAgICAgICAgIChFSUEyMzIpCisgICAgIEFjY2VsZXBvcnQgRVBDL1ggICAgICAgICA4IC0gMjI0ICAgICAgICAgICAgIChFSUEyMzIpCisgICAgIEFjY2VsZXBvcnQgWHIvNDIyICAgICAgICA0ICYgOCAgICAgICAgICAgICAgIChFSUE0MjIpCisgICAgIEFjY2VsZXBvcnQgMnIvOTIwICAgICAgICAyICAgICAgICAgICAgICAgICAgIChFSUEyMzIpCisgICAgIEFjY2VsZXBvcnQgNHIvOTIwICAgICAgICA0ICAgICAgICAgICAgICAgICAgIChFSUEyMzIpCisgICAgIEFjY2VsZXBvcnQgOHIvOTIwICAgICAgICA4ICAgICAgICAgICAgICAgICAgIChFSUEyMzIpCisKKyAgICAgSUJNIDgtUG9ydCBBc3luY2hyb25vdXMgUENJIEFkYXB0ZXIgICAgICAgICAgKEVJQTIzMikKKyAgICAgSUJNIDEyOC1Qb3J0IEFzeW5jaHJvbm91cyBQQ0kgQWRhcHRlciAgICAgICAgKEVJQTIzMiAmIEVJQTQyMikKKyovCisKK3N0YXRpYyBzdHJ1Y3QgcGNpX2RldmljZV9pZCBkZ2FwX3BjaV90YmxbXSA9IHsKKwl7IERJR0lfVklELCBQQ0lfREVWX1hFTV9ESUQsICAgICAgUENJX0FOWV9JRCwgUENJX0FOWV9JRCwgMCwgMCwgIDAgfSwKKwl7IERJR0lfVklELCBQQ0lfREVWX0NYX0RJRCwgICAgICAgUENJX0FOWV9JRCwgUENJX0FOWV9JRCwgMCwgMCwgIDEgfSwKKwl7IERJR0lfVklELCBQQ0lfREVWX0NYX0lCTV9ES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CSJlcGMiIH0sCisJeyBNT0QsCQkibW9kdWxlIiB9LAorCXsgSUQsCQkiaWQiIH0sCisJeyBTVEFSVE8sCSJzdGFydCIgfSwKKwl7IFNQRUVELAkic3BlZWQiCX0sCisJeyBDQUJMRSwJImNhYmxlIgl9LAorCXsgQ09OTkVDVCwJImNvbm5lY3QiIH0sCisJeyBNRVRIT0QsCSJtZXRob2QiIH0sCisJeyBTVEFUVVMsCSJzdGF0dXMiIH0sCisJeyBDVVNUT00sCSJDdXN0b20iIH0sCisJeyBCQVNJQywJIkJhc2ljIgl9LAorCXsgTUVNLAkJIm1lbSIgfSwKKwl7IE1FTSwJCSJtZW1vcnkiIH0sCisJeyBQT1JUUywJInBvcnRzIgl9LAorCXsgTU9ERU0sCSJtb2RlbSIJfSwKKwl7IE5QT1JUUywJIm5wb3J0cyIgfSwKKwl7IFRUWU4sCQkidHR5bmFtZSIgfSwKKwl7IENVLAkJImN1bmFtZSIgfSwKKwl7IFBSSU5ULAkicHJuYW1lIiB9LAorCXsgQ01BSk9SLAkibWFqb3IiCSB9LAorCXsgQUxUUElOLAkiYWx0cGluIiB9LAorCXsgVVNFSU5UUiwJInVzZWludHIiIH0sCisJeyBUVFNJWiwJInR0eXNpemUiIH0sCisJeyBDSFNJWiwJImNoc2l6ZSIgfSwKKwl7IEJTU0laLAkiYm9hcmRzaXplIiB9LAorCXsgVU5UU0laLAkic2NoZWRzaXplIiB9LAorCXsgRjJTSVosCSJmMjIwMHNpemUiIH0sCisJeyBWUFNJWiwJInZwaXhzaXplIiB9LAorCXsgMCwJCU5VTEwgfQorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIERyaXZlciBsb2FkL3VubG9hZCBmdW5jdGlvbnMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworC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wMDAwMCk7CisJCXJlbGVhc2VfbWVtX3JlZ2lvbihicmQtPm1lbWJhc2UgKyBQQ0lfSU9fT0ZGU0VULCAweDIwMDAwMCk7CisJCWlvdW5tYXAoYnJkLT5yZV9tYXBfbWVtYmFzZSk7CisJCXJldHVybiAtRU5PTUVNOworCX0KKworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoKKyogRnVuY3Rpb246CisqCisqICAgIGRnYXBfcG9sbF9oYW5kbGVyCisqCisqIEF1dGhvcjoKKyoKKyogICAgU2NvdHQgSCBLaWxhdQorKgorKiBQYXJhbWV0ZXJzOgorKgorKiAgICBkdW1teSAtLSBpZ25vcmVkCisqCisqIFJldHVybiBWYWx1ZXM6CisqCisqICAgIG5vbmUKKyoKKyogRGVzY3JpcHRpb246CisqCisqICAgIEFzIGVhY2ggdGltZXIgZXhwaXJlcywgaXQgZGV0ZXJtaW5lcyAoYSkgd2hldGhlciB0aGUgInRyYW5zbWl0IgorKiAgICB3YWl0ZXIgbmVlZHMgdG8gYmUgd29rZW4gdXAsIGFuZCAoYikgd2hldGhlciB0aGUgcG9sbGVyIG5lZWRzIHRvCisqICAgIGJlIHJlc2NoZWR1bGVkLgorKgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBkZ2FwX3BvbGxfaGFuZGxlcih1bG9uZyBkdW1teSkKK3sKKwlpbnQgaTsKKwlzdHJ1Y3QgYm9hcmRfdCAqYnJkOworCXVuc2lnbmVkIGxvbmcgbG9ja19mbGFnczsKKwl1bG9uZyBuZXdfdGltZTsKKworCWRnYXBfcG9sbF9jb3VudGVyKys7CisKKwkvKgorCSAqIERvIG5vdCBzdGFydCB0aGUgYm9hcmQgc3RhdGUgbWFjaGluZSB1bnRpbA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PTkU7CisKKwkvKgorCSAqIENoZWNrIHRvIG1ha2Ugc3VyZSBpdHMgZm9yIHVzLgorCSAqLworCWlmIChicmQtPm1hZ2ljICE9IERHQVBfQk9BUkRfTUFHSUMpCisJCXJldHVybiBJUlFfTk9ORTsKKworCWJyZC0+aW50cl9jb3VudCsrOworCisJLyoKKwkgKiBTY2hlZHVsZSB0YXNrbGV0IHRvIHJ1biBhdCBhIGJldHRlciB0aW1lLgorCSAqLworCXRhc2tsZXRfc2NoZWR1bGUoJmJyZC0+aGVscGVyX3Rhc2tsZXQpOworCXJldHVybiBJUlFfSEFORExFRDsKK30KKworLyoKKyAqIGRnYXBfaW5pdF9nbG9iYWxzKCkKKyAqCisgKiBUaGlzIGlzIHdoZXJlIHdlIGluaXRpYWxpemUgdGhlIGdsb2JhbHMgZnJvbSB0aGUgc3RhdGljIGluc21vZAorICogY29uZmlndXJhdGlvbiB2YXJpYWJsZXMuICBUaGVzZSBhcmUgZGVjbGFyZWQgbmVhciB0aGUgaGVhZCBvZgorICogdGhpcyBmaWxlLgorICovCitzdGF0aWMgdm9pZCBkZ2FwX2luaXRfZ2xvYmFscyh2b2lkKQoreworCWludCBpID0gMDsKKworCWZvciAoaSA9IDA7IGkgPCBNQVhCT0FSRFM7IGkrKykKKwkJZGdhcF9Cb2FyZFtpXSA9IE5VTEw7CisKKwlpbml0X3RpbWVyKCZkZ2FwX3BvbGxfdGltZXIpOworCisJaW5pdF93YWl0cXVldWVfaGVhZCgmZGdhcF9kbF93YWl0KTsKKwlkZ2FwX2RsX2FjdGlvbiA9IDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBVdGlsaXR5IGZ1bmN0aW9ucworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBkZ2FwX21zX3NsZWVwKCkKKyAqCisgKiBQdXQgdGhlIGRyaXZlciB0byBzbGVlcCBmb3IgeCBtcydzCisgKgorICogUmV0dXJucyAwIGlmIHRpbWVkIG91dCwgITAgKHNob3dpbmcgc2lnbmFsKSBpZiBpbnRlcnJ1cHRlZCBieSBhIHNpZ25hbC4KKyAqLworc3RhdGljIGludCBkZ2FwX21zX3NsZWVwKHVsb25nIG1zKQoreworCWN1cnJlbnQtPnN0YXRlID0gVEFTS19JTlRFUlJVUFRJQkxFOworCXNjaGVkdWxlX3RpbWVvdXQoKG1zICogSFopIC8gMTAwMCk7CisJcmV0dXJuIHNpZ25hbF9wZW5kaW5nKGN1cnJlbnQpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogVFRZIEluaXRpYWxpemF0aW9uL0NsZWFudXAgRnVuY3Rpb25zCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIGRnYXBfdHR5X3JlZ2lzdGVyKCkKKyAqCisgKiBJbml0IHRoZSB0dHkgc3Vic3lzdGVtIGZvciB0aGlzIGJvYXJkLgorICovCitzdGF0aWMgaW50IGRnYXBfdHR5X3JlZ2lzdGVyKHN0cnVjdCBib2FyZF90ICpicmQpCit7CisJaW50IHJjID0gMDsKKworCWJyZC0+U2VyaWFsRHJpdmVyID0gYWxsb2NfdHR5X2RyaXZlcihNQVhQT1JUUyk7CisKKwlzbnByaW50ZihicmQtPlNlcmlhbE5hbWUsIE1BWFRUWU5BTUVMRU4sICJ0dHlfZGdhcF8lZF8iLCBicmQtPmJvYXJkbnVtKTsKKwlicmQtPlNlcmlhbERyaXZlci0+bmFtZSA9IGJyZC0+U2VyaWFsTmFtZTsKKwlicmQtPlNlcmlhbERyaXZlci0+bmFtZV9iYXNlID0gMDsKKwlicmQ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BfQm9hcmRzQnlNYWpvclticmQtPlByaW50RHJpdmVyLT5tYWpvcl0gPSBicmQ7CisJCWJyZC0+ZGdhcF9UcmFuc3BhcmVudFByaW50X01ham9yID0gYnJkLT5QcmludERyaXZlci0+bWFqb3I7CisJfQorCisJcmV0dXJuIHJjOworfQorCisvKgorICogZGdhcF90dHlfaW5pdCgpCisgKgorICogSW5pdCB0aGUgdHR5IHN1YnN5c3RlbS4gIENhbGxlZCBvbmNlIHBlciBib2FyZCBhZnRlciBib2FyZCBoYXMgYmVlbgorICogZG93bmxvYWRlZCBhbmQgaW5pdCdlZC4KKyAqLworc3RhdGljIGludCBkZ2FwX3R0eV9pbml0KHN0cnVjdCBib2FyZF90ICpicmQpCit7CisJaW50IGk7CisJaW50IHRsdzsKKwl1aW50IHRydWVfY291bnQgPSAwOworCXVjaGFyICp2YWRkcjsKKwl1Y2hhciBtb2RlbSA9IDA7CisJc3RydWN0IGNoYW5uZWxfdCAqY2g7CisJc3RydWN0IGJzX3QgKmJzOworCXN0cnVjdCBjbV90ICpjbTsKKworCWlmICghYnJkKQorCQlyZXR1cm4gLUVOWElPOworCisJLyoKKwkgKiBJbml0aWFsaXplIGJvYXJkIHN0cnVjdHVyZSBlbGVtZW50cy4KKwkgKi8KKworCXZhZGRyID0gYnJkLT5yZV9tYXBfbWVtYmFzZTsKKwl0cnVlX2NvdW50ID0gcmVhZHcoKHZhZGRyICsgTkNIQU4pKTsKKworCWJyZC0+bmFzeW5jID0gZGdhcF9jb25maWdfZ2V0X251bV9wcnRzKGJyZCk7CisKKwlpZiAoIWJyZC0+bmFzeW5jKQorCQlicmQtPm5hc3luYyA9IGJyZC0+bWF4cG9ydHM7CisKKwlpZiAoYnJkLT5uYXN5bmMgPiBicmQtPm1heHBvcnRzKQorCQlicmQtPm5hc3luYyA9IGJyZC0+bWF4cG9ydHM7CisKKwlpZiAodHJ1ZV9jb3VudCAhPSBicmQtPm5hc3luYykgeworCQlpZiAoKGJyZC0+dHlwZSA9PSB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XBidWYsCisJCSAqIHdlIG5lZWQgdG8ga2VlcCBsb29waW5nIGFyb3VuZCBvbiBhbGwgdGhlIGRhdGEuCisJCSAqLworCQlpZiAodG9vX211Y2hfZGF0YSkgeworCQkJcCA9IHRtcGJ1ZjsKKwkJCXRtcGJ1ZmxlbiA9IDA7CisJCX0KKworCX0gd2hpbGUgKHRvb19tdWNoX2RhdGEpOworfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKgorICogICAgICBkZ2FwX2lucHV0IC0gUHJvY2VzcyByZWNlaXZlZCBkYXRhLgorICoKKyAqICAgICAgICAgICAgICBjaCAgICAgIC0gUG9pbnRlciB0byBjaGFubmVsIHN0cnVjdHVyZS4KKyAqCisgKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KKworc3RhdGljIHZvaWQgZGdhcF9pbnB1dChzdHJ1Y3QgY2hhbm5lbF90ICpjaCkKK3sKKwlzdHJ1Y3QgYm9hcmRfdCAqYmQ7CisJc3RydWN0IGJzX3QJKmJzOworCXN0cnVjdCB0dHlfc3RydWN0ICp0cDsKKwlzdHJ1Y3QgdHR5X2xkaXNjICpsZDsKKwl1aW50CXJtYXNrOworCXVpbnQJaGVhZDsKKwl1aW50CXRhaWw7CisJaW50CWRhdGFfbGVuOworCXVsb25nCWxvY2tfZmxhZ3M7CisJdWxvbmcgICBsb2NrX2ZsYWdzMjsKKwlpbnQgZmxpcF9sZW47CisJaW50IGxlbiA9IDA7CisJaW50IG4gPSAwOworCXVjaGFyICpidWY7CisJdWNoYXIgdG1wY2hhcjsKKwlpbnQgcyA9IDA7CisKKwlpZiAoIWNoIHx8IGNoLT5tYWdpYyAhPSBER0FQX0NIQU5ORUxfTUFHSUMpCisJCXJldHVybjsKKworCXRwID0gY2gtPmNoX3R1bi51bl90dHk7CisKKwlicyAgP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Y3QgY2FsbHMuCisJCSAqLworCQlpZiAod2FpdHF1ZXVlX2FjdGl2ZSgmKGNoLT5jaF9mbGFnc193YWl0KSkpCisJCQl3YWtlX3VwX2ludGVycnVwdGlibGUoJmNoLT5jaF9mbGFnc193YWl0KTsKKworCQlpZiAoY2gtPmNoX3R1bi51bl9vcGVuX2NvdW50ID4gMCkKKwkJCXR0eV9oYW5ndXAoY2gtPmNoX3R1bi51bl90dHkpOworCisJCWlmIChjaC0+Y2hfcHVuLnVuX29wZW5fY291bnQgPiAwKQorCQkJdHR5X2hhbmd1cChjaC0+Y2hfcHVuLnVuX3R0eSk7CisJfQorCisJLyoKKwkgKiAgTWFrZSBzdXJlIHRoYXQgb3VyIGNhY2hlZCB2YWx1ZXMgcmVmbGVjdCB0aGUgY3VycmVudCByZWFsaXR5LgorCSAqLworCWlmICh2aXJ0X2NhcnJpZXIgPT0gMSkKKwkJY2gtPmNoX2ZsYWdzIHw9IENIX0ZDQVI7CisJZWxzZQorCQljaC0+Y2hfZmxhZ3MgJj0gfkNIX0ZDQVI7CisKKwlpZiAocGh5c19jYXJyaWVyID09IDEpCisJCWNoLT5jaF9mbGFncyB8PSBDSF9DRDsKKwllbHNlCisJCWNoLT5jaF9mbGFncyAmPSB+Q0hfQ0Q7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBUVFkgRW50cnkgcG9pbnRzIGFuZCBoZWxwZXIgZnVuY3Rpb25zCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIGRnYXBfdHR5X29wZW4oKQorICoKKyAqLworc3RhdGljIGludCBkZ2FwX3R0eV9vcGVuKHN0cnVjdCB0dHlfc3RydWN0ICp0dHksIHN0cnVjdCBmaWxlICpmaWxlKQoreworCXN0cnVjdCBib2FyZF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YW5kIHRvIHRoZSBGRVAuCisgKgorICogICAgICAgICAgICAgIGNoICAgICAgLSBQb2ludGVyIHRvIGNoYW5uZWwgc3RydWN0dXJlLgorICogICAgICAgICAgICAgIGNtZCAgICAgLSBDb21tYW5kIHRvIGJlIHNlbnQuCisgKiAgICAgICAgICAgICAgYnl0ZTEgICAtIEludGVnZXIgY29udGFpbmluZyBmaXJzdCBieXRlIHRvIGJlIHNlbnQuCisgKiAgICAgICAgICAgICAgYnl0ZTIgICAtIEludGVnZXIgY29udGFpbmluZyBzZWNvbmQgYnl0ZSB0byBiZSBzZW50LgorICogICAgICAgICAgICAgIG5jbWRzICAgLSBXYWl0IHVudGlsIG5jbWRzIG9yIGZld2VyIGNtZHMgYXJlIGxlZnQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgaW4gdGhlIGNtZCBidWZmZXIgYmVmb3JlIHJldHVybmluZy4KKyAqCisgKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KK3N0YXRpYyB2b2lkIGRnYXBfY21kYihzdHJ1Y3QgY2hhbm5lbF90ICpjaCwgdWNoYXIgY21kLCB1Y2hhciBieXRlMSwKKwkJCXVjaGFyIGJ5dGUyLCB1aW50IG5jbWRzKQoreworCWNoYXIJCSp2YWRkciA9IE5VTEw7CisJc3RydWN0IGNtX3QJKmNtX2FkZHIgPSBOVUxMOworCXVpbnQJCWNvdW50OworCXVpbnQJCW47CisJdTE2CQloZWFkOworCXUxNgkJdGFpbDsKKworCWlmICghY2ggfHwgY2gtPm1hZ2ljICE9IERHQVBfQ0hBTk5FTF9NQUdJQykKKwkJcmV0dXJuOworCisJLyoKKwkgKiBDaGVjayBpZiBib2FyZCBpcyBzdGlsbCBhbGl2ZS4KKwkgKi8KKwlpZiAoY2gtPmNoX2JkLT5zdGF0ZSA9PSBCT0FSRF9GQUlMRUQpCisJCXJldHVybjsKKworCS8qCisJICogTWFrZSBzdXJl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vaW50ZXIgdG8gbGltaXQgdGhlIG51bWJlciBvZiBvdXRzdGFuZGluZworCSAqIGNvbW1hbmRzIHRvIHRoZSBGRVAuICAgSWYgdGhlIHRpbWUgc3BlbnQgd2FpdGluZworCSAqIGlzIG91dGxhbmRpc2gsIGRlY2xhcmUgdGhlIEZFUCBkZWFkLgorCSAqLworCWZvciAoY291bnQgPSBkZ2FwX2NvdW50IDs7KSB7CisKKwkJaGVhZCA9IHJlYWR3KCYoY21fYWRkci0+Y21faGVhZCkpOworCQl0YWlsID0gcmVhZHcoJihjbV9hZGRyLT5jbV90YWlsKSk7CisKKwkJbiA9IChoZWFkIC0gdGFpbCkgJiAoQ01ETUFYIC0gQ01EU1RBUlQgLSA0KTsKKworCQlpZiAobiA8PSBuY21kcyAqIHNpemVvZihzdHJ1Y3QgY21fdCkpCisJCQlicmVhazsKKworCQlpZiAoLS1jb3VudCA9PSAwKSB7CisJCQljaC0+Y2hfYmQtPnN0YXRlID0gQk9BUkRfRkFJTEVEOworCQkJcmV0dXJuOworCQl9CisJCXVkZWxheSgxMCk7CisJfQorfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKgorICogICAgICBkZ2FwX2NtZHcgLSBTZW5kcyBhIDEgd29yZCBjb21tYW5kIHRvIHRoZSBGRVAuCisgKgorICogICAgICAgICAgICAgIGNoICAgICAgLSBQb2ludGVyIHRvIGNoYW5uZWwgc3RydWN0dXJlLgorICogICAgICAgICAgICAgIGNtZCAgICAgLSBDb21tYW5kIHRvIGJlIHNlbnQuCisgKiAgICAgICAgICAgICAgd29yZCAgICAtIEludGVnZXIgY29udGFpbmluZyB3b3JkIHRvIGJlIHNlbnQuCisgKiAgICAgICAgICAgICAgbmNtZHMgICAtIFdhaXQgdW50aWwgbmNtZHMgb3IgZmV3ZXIgY21kcyBhcmUgbGVmdAorICogICAgICAgICAgICAgICAgICAgICAgICBpbiB0aGUg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kFJTEVEOworCQkJcmV0dXJuOworCQl9CisJCXVkZWxheSgxMCk7CisJfQorfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKgorICogICAgICBkZ2FwX2NtZHdfZXh0IC0gU2VuZHMgYSBleHRlbmRlZCB3b3JkIGNvbW1hbmQgdG8gdGhlIEZFUC4KKyAqCisgKiAgICAgICAgICAgICAgY2ggICAgICAtIFBvaW50ZXIgdG8gY2hhbm5lbCBzdHJ1Y3R1cmUuCisgKiAgICAgICAgICAgICAgY21kICAgICAtIENvbW1hbmQgdG8gYmUgc2VudC4KKyAqICAgICAgICAgICAgICB3b3JkICAgIC0gSW50ZWdlciBjb250YWluaW5nIHdvcmQgdG8gYmUgc2VudC4KKyAqICAgICAgICAgICAgICBuY21kcyAgIC0gV2FpdCB1bnRpbCBuY21kcyBvciBmZXdlciBjbWRzIGFyZSBsZWZ0CisgKiAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSBjbWQgYnVmZmVyIGJlZm9yZSByZXR1cm5pbmcuCisgKgorICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCitzdGF0aWMgdm9pZCBkZ2FwX2NtZHdfZXh0KHN0cnVjdCBjaGFubmVsX3QgKmNoLCB1MTYgY21kLCB1MTYgd29yZCwgdWludCBuY21kcykKK3sKKwljaGFyCQkqdmFkZHIgPSBOVUxMOworCXN0cnVjdCBjbV90CSpjbV9hZGRyID0gTlVMTDsKKwl1aW50CQljb3VudDsKKwl1aW50CQluOworCXUxNgkJaGVhZDsKKwl1MTYJCXRhaWw7CisKKwlpZiAoIWNoIHx8IGNoLT5tYWdpYyAhPSBER0FQX0NIQU5ORUxfTUFHSUMpCisJCXJldHVybjsKKworCS8qCisJICogQ2hlY2sgaWYgYm9hcmQgaXMgc3RpbGwgYWxpdmUuCisJICovCisJ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0dXJuOworCQl9CisJCXVkZWxheSgxMCk7CisJfQorfQorCisvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisgKgorICogICAgICBkZ2FwX3dtb3ZlIC0gV3JpdGUgZGF0YSB0byBGRVAgYnVmZmVyLgorICoKKyAqICAgICAgICAgICAgICBjaCAgICAgIC0gUG9pbnRlciB0byBjaGFubmVsIHN0cnVjdHVyZS4KKyAqICAgICAgICAgICAgICBidWYgICAgIC0gUG9pdGVyIHRvIGNoYXJhY3RlcnMgdG8gYmUgbW92ZWQuCisgKiAgICAgICAgICAgICAgY250ICAgICAtIE51bWJlciBvZiBjaGFyYWN0ZXJzIHRvIG1vdmUuCisgKgorICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCitzdGF0aWMgdm9pZCBkZ2FwX3dtb3ZlKHN0cnVjdCBjaGFubmVsX3QgKmNoLCBjaGFyICpidWYsIHVpbnQgY250KQoreworCWludCAgICBuOworCWNoYXIgICAqdGFkZHI7CisJc3RydWN0IGJzX3QgICAgKmJzOworCXUxNiAgICBoZWFkOworCisJaWYgKCFjaCB8fCBjaC0+bWFnaWMgIT0gREdBUF9DSEFOTkVMX01BR0lDKQorCQlyZXR1cm47CisKKwkvKgorCSAqIENoZWNrIHBhcmFtZXRlcnMuCisJICovCisJYnMgICA9IGNoLT5jaF9iczsKKwloZWFkID0gcmVhZHcoJihicy0+dHhfaGVhZCkpOworCisJLyoKKwkgKiBJZiBwb2ludGVycyBhcmUgb3V0IG9mIHJhbmdlLCBqdXN0IHJldHVybi4KKwkgKi8KKwlpZiAoKGNudCA+IGNoLT5jaF90c2l6ZSkgfHwKKwkgICAgKHVuc2lnbmVkKShoZWFkIC0gY2gtPmNoX3RzdGFydCkgPj0gY2gtPmNoX3RzaXplKQorCQlyZXR1cm47CisKKwkvKgorCSAqIElmIH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xhZ3MyKTsKKwl9CisJd2FrZV91cF9pbnRlcnJ1cHRpYmxlKCZ1bi0+dW5fdHR5LT53cml0ZV93YWl0KTsKKwl3YWtlX3VwX2ludGVycnVwdGlibGUoJnVuLT51bl9mbGFnc193YWl0KTsKK30KKworLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICoKKyAqICAgICAgZGdhcF9ldmVudCAtIEZFUCB0byBob3N0IGV2ZW50IHByb2Nlc3Npbmcgcm91dGluZS4KKyAqCisgKiAgICAgICAgICAgICAgYmQgICAgIC0gQm9hcmQgb2YgY3VycmVudCBldmVudC4KKyAqCisgKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KK3N0YXRpYyBpbnQgZGdhcF9ldmVudChzdHJ1Y3QgYm9hcmRfdCAqYmQpCit7CisJc3RydWN0IGNoYW5uZWxfdCAqY2g7CisJdWxvbmcJCWxvY2tfZmxhZ3M7CisJdWxvbmcJCWxvY2tfZmxhZ3MyOworCXN0cnVjdCBic190CSpiczsKKwl1Y2hhcgkJKmV2ZW50OworCXVjaGFyCQkqdmFkZHIgPSBOVUxMOworCXN0cnVjdCBldl90CSplYWRkciA9IE5VTEw7CisJdWludAkJaGVhZDsKKwl1aW50CQl0YWlsOworCWludAkJcG9ydDsKKwlpbnQJCXJlYXNvbjsKKwlpbnQJCW1vZGVtOworCWludAkJYjE7CisKKwlpZiAoIWJkIHx8IGJkLT5tYWdpYyAhPSBER0FQX0JPQVJEX01BR0lDKQorCQlyZXR1cm4gLUVOWElPOworCisJc3Bpbl9sb2NrX2lycXNhdmUoJmJkLT5iZF9sb2NrLCBsb2NrX2ZsYWdzKTsKKworCXZhZGRyID0gYmQtPnJlX21hcF9tZW1iYXNlOworCisJaWYgKCF2YWRkcikgeworCQlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZiZC0+YmRfbG9jaywgbG9ja19mbGFncyk7CisJCXJldHVybiAtRU5YSU87CisJfQorCisJZWFkZHIgPSAoc3RydWN0IGV2X3QgKikgKHZhZGRyICsgRVZCVUYpOworCisJLyogR2V0IG91ciBoZWFkIGFuZCB0YWlsICovCisJaGVhZCA9IHJlYWR3KCYoZWFkZHItPmV2X2hlYWQpKTsKKwl0YWlsID0gcmVhZHcoJihlYWRkci0+ZXZfdGFpbCkpOworCisJLyoKKwkgKiBGb3JnZXQgaXQgaWYgcG9pbnRlcnMgb3V0IG9mIHJhbmdlLgorCSAqLworCisJaWYgKGhlYWQgPj0gRVZNQVggLSBFVlNUQVJUIHx8IHRhaWwgPj0gRVZNQVggLSBFVlNUQVJUIHx8CisJICAgIChoZWFkIHwgdGFpbCkgJiAwMykgeworCQkvKiBMZXQgZ28gb2YgYm9hcmQgbG9jayAqLworCQlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZiZC0+YmRfbG9jaywgbG9ja19mbGFncyk7CisJCXJldHVybiAtRU5YSU87CisJfQorCisJLyoKKwkgKiBMb29wIHRvIHByb2Nlc3MgYWxsIHRoZSBldmVudHMgaW4gdGhlIGJ1ZmZlci4KKwkgKi8KKwl3aGlsZSAodGFpbCAhPSBoZWFkKSB7CisKKwkJLyoKKwkJICogR2V0IGludGVycnVwdCBpbmZvcm1hdGlvbi4KKwkJICovCisKKwkJZXZlbnQgPSBiZC0+cmVfbWFwX21lbWJhc2UgKyB0YWlsICsgRVZTVEFSVDsKKworCQlwb3J0ICAgPSBldmVudFswXTsKKwkJcmVhc29uID0gZXZlbnRbMV07CisJCW1vZGVtICA9IGV2ZW50WzJdOworCQliMSAgICAgPSBldmVudFszXTsKKworCQkvKgorCQkgKiBNYWtlIHN1cmUgdGhlIGludGVycnVwdCBpcyB2YWxpZC4KKwkJICovCisJCWlmIChwb3J0ID49IGJkLT5uYXN5bmMpCisJCQlnb3RvIG5leHQ7CisKKwkJaWYgKCEocmVhc29uICYgKElGTU9ERU0gf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GEgY29weSBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UKKyAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCisgKiBGb3VuZGF0aW9uLCBJbmMuLCA2NzUgTWFzcyBBdmUsIENhbWJyaWRnZSwgTUEgMDIxMzksIFVTQS4KKyAqCisgKglOT1RFOiBUSElTIElTIEEgU0hBUkVEIEhFQURFUi4gRE8gTk9UIENIQU5HRSBDT0RJTkcgU1RZTEUhISEKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIERyaXZlciBpbmNsdWRlcworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisjaWZuZGVmIF9fREdBUF9EUklWRVJfSAorI2RlZmluZSBfX0RHQVBfRFJJVkVSX0gKKworI2luY2x1ZGUgPGxpbnV4L3R5cGVzLmg+ICAgICAgICAvKiBUbyBwaWNrIHVwIHRoZSB2YXJpb25zIExpbnV4IHR5cGVzICovCisjaW5jbHVkZSA8bGludXgvdHR5Lmg+ICAgICAgICAgIC8qIFRvIHBpY2sgdXAgdGhlIHZhcmlvdXMgdHR5IHN0cnVjdHMvZGVmaW5lcyAqLworI2luY2x1ZGUgPGxpbnV4L2ludGVycnVwdC5oPiAgICAvKiBGb3IgaXJxcmV0dXJuX3QgdHlwZSAqLworCisjaWZuZGVmIFRSVUUKKyMgZGVmaW5lIFRSVUUgMQorI2VuZGlmCisKKyNpZm5kZWYgRkFMU0UKKyMgZGVmaW5lIEZBTFNFIDAKKyNlbmRpZgorCisvKiBSZXF1aXJlZCBmb3Igb3VyIHNoYXJlZCBoZWFkZXJzISAqLwordHlwZWRlZiB1bnNpZ25lZCBjaGFyCQl1Y2hhcjsKKworI2lmICFkZWZpbmVkKFRUWV9GTElQQlVGX1NJWkUpCisjIGRlZmluZSBUVFlfRkxJUEJVRl9TSVpFIDUxMgorI2VuZGlmCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRHJpdmVyIGRlZmluZXMKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIERyaXZlciBpZGVudGlmaWNhdGlvbgorICovCisjZGVmaW5lCURHX05BTUUJCSJkZ2FwLTEuMy0xNiIKKyNkZWZpbmUJREdfUEFSVAkJIjQwMDAyMzQ3X0MiCisjZGVmaW5lCURSVlNUUgkJImRnYXAiCisKKy8qCisgKiBkZWZpbmVzIGZyb20gZGdhcF9wY2kuaAorICovIAorI2RlZmluZSBQQ0lNQVggMzIJCQkvKiBtYXhpbXVtIG51bWJlciBvZiBQQ0kgYm9hcmRzICovCisKKyNkZWZpbmUgRElHSV9WSUQJCTB4MTE0RgorCisjZGVmaW5lIFBDSV9ERVZfRVBDX0RJRAkJMHgwMDAyCisjZGVmaW5lIFBDSV9ERVZfWEVNX0RJRAkJMHgwMDA0CisjZGVmaW5lIFBDSV9ERVZfWFJfRElECQkweDAwMDUKKyNkZWZpbmUgUENJX0RFVl9DWF9ESUQJCTB4MDAwNgorI2RlZmluZSBQQ0lfREVWX1hSSl9ESUQJCTB4MDAwOQkvKiBQTFgtYmFzZWQgWHIgYWRhcHRlciAqLworI2RlZmluZSBQQ0lfREVWX1hSX0lCTV9ESUQJMHgwMDExCS8qIElCTSA4LXBvcnQgQXN5bmMgQWRhcHRlciAqLworI2RlZmluZSBQQ0lfREVWX1hSX0JVTExfRElECTB4MDAxMwkvKiBCVUxMIDgtcG9ydCBBc3luYyBBZGFwdGVyICovCisjZGVmaW5lIFBDSV9ERVZfWFJfU0FJUF9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ioqKioqKioqKioKKyAqICAgICAgRkVQIG1lbW9yeSBvZmZzZXRzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBTVEFSVCAgICAgICAgICAgMHgwMDA0TCAgICAgICAgIC8qIEV4ZWN1dGlvbiBzdGFydCBhZGRyZXNzICAgICAgKi8KKworI2RlZmluZSBDTURCVUYgICAgICAgICAgMHgwZDEwTCAgICAgICAgIC8qIENvbW1hbmQgKGNtX3QpIHN0cnVjdHVyZSBvZmZzZXQgKi8KKyNkZWZpbmUgQ01EU1RBUlQgICAgICAgIDB4MDQwMEwgICAgICAgICAvKiBTdGFydCBvZiBjb21tYW5kIGJ1ZmZlciAgICAgICovCisjZGVmaW5lIENNRE1BWCAgICAgICAgICAweDA4MDBMICAgICAgICAgLyogRW5kIG9mIGNvbW1hbmQgYnVmZmVyICAgICAgICAqLworCisjZGVmaW5lIEVWQlVGICAgICAgICAgICAweDBkMThMICAgICAgICAgLyogRXZlbnQgKGV2X3QpIHN0cnVjdHVyZSAgICAgICAqLworI2RlZmluZSBFVlNUQVJUICAgICAgICAgMHgwODAwTCAgICAgICAgIC8qIFN0YXJ0IG9mIGV2ZW50IGJ1ZmZlciAgICAgICAgKi8KKyNkZWZpbmUgRVZNQVggICAgICAgICAgIDB4MGMwMEwgICAgICAgICAvKiBFbmQgb2YgZXZlbnQgYnVmZmVyICAgICAgICAgICovCisjZGVmaW5lIEZFUDVfUExVUyAgICAgICAweDBFNDAgICAgICAgICAgLyogQVNDSUkgJzUnIGFuZCBBU0NJSSAnQScgaXMgaGVyZSAgKi8KKyNkZWZpbmUgRUNTX1NFRyAgICAgICAgIDB4MEU0NCAgICAgICAgICAvKiBTZWdtZW50IG9mIHRoZSBleHRlbmRlZCBjaGFubmVsIHN0cnVjdHVyZSAqLworI2RlZmluZSBMSU5FX1NQRUVEICAgICAgMHgxMCAgICAgICAgICAgIC8qIE9mZnNldCBpbnRvIEVDU19TRUcgZm9yIGxpbmUgc3BlZWQgICAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGlmIHRoZSBmZXAgaGFzIGV4dGVuZGVkIGNhcGFiaWxpdGllcyAqLworCisvKiBCSU9TIE1BR0lDIFNQT1RTICovCisjZGVmaW5lIEVSUk9SICAgICAgICAgICAweDBDMTRMCQkvKiBCSU9TIGVycm9yIGNvZGUgICAgICAgICAgICAgICovCisjZGVmaW5lIFNFUVVFTkNFCTB4MEMxMkwJCS8qIEJJT1Mgc2VxdWVuY2UgaW5kaWNhdG9yICAgICAgKi8KKyNkZWZpbmUgUE9TVEFSRUEJMHgwQzAwTAkJLyogUE9TVCBjb21wbGV0ZSBtZXNzYWdlIGFyZWEgICAqLworCisvKiBGRVAgTUFHSUMgU1BPVFMgKi8KKyNkZWZpbmUgRkVQU1RBVCAgICAgICAgIFBPU1RBUkVBICAgICAgICAvKiBPUyBoZXJlIHdoZW4gRkVQIGNvbWVzIHVwICAgICovCisjZGVmaW5lIE5DSEFOICAgICAgICAgICAweDBDMDJMICAgICAgICAgLyogbnVtYmVyIG9mIHBvcnRzIEZFUCBzZWVzICAgICAqLworI2RlZmluZSBQQU5JQyAgICAgICAgICAgMHgwQzEwTCAgICAgICAgIC8qIFBBTklDIGFyZWEgZm9yIEZFUCAgICAgICAgICAgKi8KKyNkZWZpbmUgS01FTUVNICAgICAgICAgIDB4MEMzMEwgICAgICAgICAvKiBNZW1vcnkgZm9yIEtNRSB1c2UgICAgICAgICAgICovCisjZGVmaW5lIENPTkZJRyAgICAgICAgICAweDBDRDBMICAgICAgICAgLyogQ29uY2VudHJhdG9yIGNvbmZpZ3VyYXRpb24gaW5mbyAqLworI2RlZmluZSBDT05GSUdTSVpFICAgICAgMHgwMDMwICAgICAgICAgIC8qIGNvbmZpZ3VyYXRpb24gaW5mbyBzaXplICAgICAgKi8KKyNkZWZpbmUgRE9XTlJFUSAgICAgICAgIDB4M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W0gb2YgMjAgbWlsbGlzZWNvbmRzICovCisjZGVmaW5lIEZFUFBPTEwJCQkweDBjMjYJCS8qIEZlcCBldmVudCBwb2xsIGludGVydmFsICovCisKKyNkZWZpbmUJSUFMVFBJTgkJCTB4MDA4MAkJLyogSW5wdXQgZmxhZyB0byBzd2FwIERTUiA8LT4gRENEICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEZFUCBzdXBwb3J0ZWQgZnVuY3Rpb25zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBTUkxPVwkJMHhlMAkJLyogU2V0IHJlY2VpdmUgbG93IHdhdGVyCSovCisjZGVmaW5lIFNSSElHSAkJMHhlMQkJLyogU2V0IHJlY2VpdmUgaGlnaCB3YXRlcgkqLworI2RlZmluZSBGTFVTSFRYCQkweGUyCQkvKiBGbHVzaCB0cmFuc21pdCBidWZmZXIJKi8KKyNkZWZpbmUgUEFVU0VUWAkJMHhlMwkJLyogUGF1c2UgZGF0YSB0cmFuc21pc3Npb24JKi8KKyNkZWZpbmUgUkVTVU1FVFgJMHhlNAkJLyogUmVzdW1lIGRhdGEgdHJhbnNtaXNzaW9uCSovCisjZGVmaW5lIFNNSU5UCQkweGU1CQkvKiBTZXQgTW9kZW0gSW50ZXJydXB0CQkqLworI2RlZmluZSBTQUZMT1dDCQkweGU2CQkvKiBTZXQgQXV4LiBmbG93IGNvbnRyb2wgY2hhcnMJKi8KKyNkZWZpbmUgU0JSRUFLCQkweGU4CQkvKiBTZW5kIGJyZWFrCQkJKi8KKyNkZWZpbmUgU01PREVNCQkweGU5CQkvKiBTZXQgODUzMCBtb2RlbSBjb250cm9sIGxpbmVzCSovCisjZGVmaW5lIFNJRkxBRwkJMHhlYQkJLyogU2V0IFVOSVggaWZsYWdzCQkqLworI2RlZmluZSBTRkxPV0MJCTB4ZWIJCS8qIFNldCBmbG93IGNvbnRyb2wgY2hhcmFjdGVycwkqLworI2RlZmluZSBTVExPVwkJMHhlYwkJLyogU2V0IHRyYW5zbWl0IGxvdyB3YXRlciBtYXJrCSovCisjZGVmaW5lIFJQQVVTRQkJMHhlZQkJLyogUGF1c2UgcmVjZWl2ZQkJKi8KKyNkZWZpbmUgUlJFU1VNRQkJMHhlZgkJLyogUmVzdW1lIHJlY2VpdmUJCSovCisjZGVmaW5lIENIUkVTRVQJCTB4ZjAJCS8qIFJlc2V0IENoYW5uZWwJCSovCisjZGVmaW5lIEJVRlNFVEFMTAkweGYyCQkvKiBTZXQgVHggJiBSeCBidWZmZXIgc2l6ZSBhdmFpbCovCisjZGVmaW5lIFNPRkxBRwkJMHhmMwkJLyogU2V0IFVOSVggb2ZsYWdzCQkqLworI2RlZmluZSBTSEZMT1cJCTB4ZjQJCS8qIFNldCBoYXJkd2FyZSBoYW5kc2hha2UJKi8KKyNkZWZpbmUgU0NGTEFHCQkweGY1CQkvKiBTZXQgVU5JWCBjZmxhZ3MJCSovCisjZGVmaW5lIFNWTkVYVAkJMHhmNgkJLyogU2V0IFZORVhUIGNoYXJhY3RlcgkJKi8KKyNkZWZpbmUgU1BJTlRGQwkJMHhmYwkJLyogUmVzZXJ2ZWQJCQkqLworI2RlZmluZSBTQ09NTU9ERQkweGZkCQkvKiBTZXQgUlMyMzIvNDIyIG1vZGUJCSovCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoJTW9kZXMgZm9yIFNDT01NT0RFCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZSBNT0RFXzIzMgkweDAwCisjZGVmaW5lIE1PREVfNDIyCTB4MDEKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgIEV2ZW50IGZsYWdzLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgSUZCUkVBSyAgICAgICAgIDB4MDEgICAgICAgICAgICAvKiBCcmVhayByZWNlaXZlZCAgICAgICAgICAgICAgICovCisjZGVmaW5lIElGVExXICAgICAgICAgICAweDAyICAgICAgICAgICAgLyogVHJhbnNtaXQgbG93IHdhdGVyICAgICAgICAgICAqLworI2RlZmluZSBJRlRFTSAgICAgICAgICAgMHgwNCAgICAgICAgICAgIC8qIFRyYW5zbWl0dGVyIGVtcHR5ICAgICAgICAgICAgKi8KKyNkZWZpbmUgSUZEQVRBICAgICAgICAgIDB4MDggICAgICAgICAgICAvKiBSZWNlaXZlIGRhdGEgcHJlc2VudCAgICAgICAgICovCisjZGVmaW5lIElGTU9ERU0gICAgICAgICAweDIwICAgICAgICAgICAgLyogTW9kZW0gc3RhdHVzIGNoYW5nZSAgICAgICAgICAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgIE1vZGVtIGZsYWdzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworIyAgICAgICBkZWZpbmUgIERNX1JUUyAgICAgICAgICAweDAyICAgIC8qIFJlcXVlc3QgdG8gc2VuZCAgICAgICAgICAgICAgKi8KKyMgICAgICAgZGVmaW5lICBETV9DRCAgICAgICAgICAgMHg4MCAgICAvKiBDYXJyaWVyIGRldGVjdCAgICAgICAgICAgICAgICovCisjICAgICAgIGRlZmluZSAgRE1fRFNSICAgICAgICAgIDB4MjAgICAgLyogRGF0YSBzZXQgcmVhZHkgICAgICAgICAgICAgICAqLworIyA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GRyaXZlciBjYW4gYmUgd2hpbGUgYmVpbmcgbG9hZGVkLgorICovCitlbnVtIHsKKwlEUklWRVJfSU5JVElBTElaRUQgPSAwLAorCURSSVZFUl9SRUFEWQorfTsKKworLyoKKyAqIEFsbCB0aGUgcG9zc2libGUgc3RhdGVzIHRoZSBib2FyZCBjYW4gYmUgd2hpbGUgYm9vdGluZyB1cC4KKyAqLworZW51bSB7CisJQk9BUkRfRkFJTEVEID0gMCwKKwlCT0FSRF9SRUFEWQorfTsKKworLyoKKyAqIEFsbCB0aGUgcG9zc2libGUgc3RhdGVzIHRoYXQgYSByZXF1ZXN0ZWQgY29uY2VudHJhdG9yIGltYWdlIGNhbiBiZSBpbi4KKyAqLworZW51bSB7CisJTk9fUEVORElOR19DT05DRU5UUkFUT1JfUkVRVUVTVFMgPSAwLAorCU5FRURfQ09OQ0VOVFJBVE9SLAorCVJFUVVFU1RFRF9DT05DRU5UUkFUT1IKK307CisKKworCisvKgorICogTW9kZW0gbGluZSBjb25zdGFudHMgYXJlIGRlZmluZWQgYXMgbWFjcm9zIGJlY2F1c2UgRFNSIGFuZAorICogRENEIGFyZSBzd2FwYWJsZSB1c2luZyB0aGUgZGl0dHkgYWx0cGluIG9wdGlvbi4KKyAqLworI2RlZmluZSBEX0NEKGNoKSAgICAgICAgY2gtPmNoX2NkICAgICAgIC8qIENhcnJpZXIgZGV0ZWN0ICAgICAgICovCisjZGVmaW5lIERfRFNSKGNoKSAgICAgICBjaC0+Y2hfZHNyICAgICAgLyogRGF0YSBzZXQgcmVhZHkgICAgICAgKi8KKyNkZWZpbmUgRF9SVFMoY2gpICAgICAgIERNX1JUUyAgICAgICAgICAvKiBSZXF1ZXN0IHRvIHNlbmQgICAgICAqLworI2RlZmluZSBEX0NUUyhjaCkgICAgICAgRE1fQ1RTICAgICAgICAgIC8qIENsZWFyIHRvIHNlbmQgICAgICAgICovCisjZGVmaW5lIERfUkkoY2gpICAgICAgICBETV9SSSAgICAgICAgICAgLyogUmluZyBpbmRpY2F0b3IgICAgICAgKi8KKyNkZWZpbmUgRF9EVFIoY2gpICAgICAgIERNX0RUUiAgICAgICAgICAvKiBEYXRhIHRlcm1pbmFsIHJlYWR5ICAqLworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogU3RydWN0dXJlcyBhbmQgY2xvc2VseSByZWxhdGVkIGRlZmluZXMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKworLyoKKyAqIEEgc3RydWN0dXJlIHRvIGhvbGQgYSBzdGF0aXN0aWNzIGNvdW50ZXIuICBXZSBhbHNvCisgKiBjb21wdXRlIG1vdmluZyBhdmVyYWdlcyBmb3IgdGhpcyBjb3VudGVyLgorICovCitzdHJ1Y3QgbWFjb3VudGVyIHsKKwl1MzIJCWNudDsJLyogVG90YWwgY291bnQgKi8KKwl1bG9uZwkJYWNjdW07CS8qIEFjdXVtdWxhdG9yIHBlciBwZXJpb2QgKi8KKwl1bG9uZwkJc21hOwkvKiBTaW1wbGUgbW92aW5nIGF2ZXJhZ2UgKi8KKwl1bG9uZwkJZW1hOwkvKiBFeHBvbmVudGlhbCBtb3ZpbmcgYXZlcmFnZSAqLworfTsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBEZXZpY2UgZmxhZyBkZWZpbml0aW9ucyBmb3IgYmRfZmxhZ3MuCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZQlCRF9GRVA1UExVUwkweDAwMDEgICAgICAgICAgLyogU3VwcG9ydHMgRkVQNSBQbHVzIGNvbW1hbmRzICovCisjZGVmaW5lIEJEX0hBU19WUEQJM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IGlmIGJvYXJkIGlzIGZvdW5kICovCisJY2hhcgkqZmxpcGZsYWdidWY7CQkvKiBPdXIgZmxpcCBmbGFnIGJ1ZmZlciwgYWxsb2NlZCBpZiBib2FyZCBpcyBmb3VuZCAqLworCisJdTE2CQlkcGF0eXBlOwkvKiBUaGUgYm9hcmQgInR5cGUiLCBhcyBkZWZpbmVkIGJ5IERQQSAqLworCXUxNgkJZHBhc3RhdHVzOwkvKiBUaGUgYm9hcmQgInN0YXR1cyIsIGFzIGRlZmluZWQgYnkgRFBBICovCisJd2FpdF9xdWV1ZV9oZWFkX3Qga21lX3dhaXQ7CS8qIE5lZWRlZCBmb3IgRFBBIHN1cHBvcnQgKi8KKworCXUzMgkJY29uY19kbF9zdGF0dXM7CS8qIFN0YXR1cyBvZiBhbnkgcGVuZGluZyBjb25jIGRvd25sb2FkICovCit9OworCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVW5pdCBmbGFnIGRlZmluaXRpb25zIGZvciB1bl9mbGFncy4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIFVOX0lTT1BFTgkweDAwMDEJCS8qIERldmljZSBpcyBvcGVuCQkqLworI2RlZmluZSBVTl9DTE9TSU5HCTB4MDAwMgkJLyogTGluZSBpcyBiZWluZyBjbG9zZWQJCSovCisjZGVmaW5lIFVOX0lNTQkJMHgwMDA0CQkvKiBTZXJ2aWNlIGltbWVkaWF0ZWx5CQkqLworI2RlZmluZSBVTl9CVVNZCQkweDAwMDgJCS8qIFNvbWUgd29yayB0aGlzIGNoYW5uZWwJKi8KKyNkZWZpbmUgVU5fQlJFQUtJCTB4MDAxMAkJLyogSW5wdXQgYnJlYWsgcmVjZWl2ZWQJCSovCisjZGVmaW5lIFVOX1BXQUlUCTB4MDAyMAkJLyogUHJp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B0dHkgc3RydWN0dXJlCSovCisJdTMyCXVuX2ZsYWdzOwkvKiBVbml0IGZsYWdzCQkJCSovCisJd2FpdF9xdWV1ZV9oZWFkX3QgdW5fZmxhZ3Nfd2FpdDsgLyogUGxhY2UgdG8gc2xlZXAgdG8gd2FpdCBvbiB1bml0ICovCisJdTMyCXVuX2RldjsJCS8qIE1pbm9yIGRldmljZSBudW1iZXIJCQkqLworCXRjZmxhZ190IHVuX29mbGFnOwkvKiBvZmxhZ3MgYmVpbmcgZG9uZSBvbiBib2FyZAkJKi8KKwl0Y2ZsYWdfdCB1bl9sZmxhZzsJLyogbGZsYWdzIGJlaW5nIGRvbmUgb24gYm9hcmQJCSovCisJc3RydWN0IGRldmljZSAqdW5fc3lzZnM7Cit9OworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIERldmljZSBmbGFnIGRlZmluaXRpb25zIGZvciBjaF9mbGFncy4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIENIX1BST04gICAgICAgICAweDAwMDEgICAgICAgICAgLyogUHJpbnRlciBvbiBzdHJpbmcgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0hfT1VUICAgICAgICAgIDB4MDAwMiAgICAgICAgICAvKiBEaWFsLW91dCBkZXZpY2Ugb3BlbiAgICAgICAgICAgICAqLworI2RlZmluZSBDSF9TVE9QICAgICAgICAgMHgwMDA0ICAgICAgICAgIC8qIE91dHB1dCBpcyBzdG9wcGVkICAgICAgICAgICAgICAgICovCisjZGVmaW5lIENIX1NUT1BJICAgICAgICAweDAwMDggICAgICAgICAgLyogSW5wdXQgaXMgc3RvcHBlZCAgICAgICAgICAgICAgICAgKi8KKyNkZWZpbmUgQ0hfQ0QgICAgICAgICAgIDB4MDAxMCAgICAgICAgICAvKiBDYXJyaWVyIGlzIHByZXNlbnQgICAgICAgICAgICAgICAqLworI2RlZmluZSBDSF9GQ0FSICAgICAgICAgMHgwMDIwICAgICAgICAgIC8qIENhcnJpZXIgZm9yY2VkIG9uICAgICAgICAgICAgICAgICovCisKKyNkZWZpbmUgQ0hfUlhCTE9DSyAgICAgIDB4MDA4MCAgICAgICAgICAvKiBFbmFibGUgcnggYmxvY2tlZCBmbGFnICAgICAgICAgICAqLworI2RlZmluZSBDSF9XTE9XICAgICAgICAgMHgwMTAwICAgICAgICAgIC8qIFRlcm0gd2FpdGluZyBsb3cgZXZlbnQgICAgICAgICAgICovCisjZGVmaW5lIENIX1dFTVBUWSAgICAgICAweDAyMDAgICAgICAgICAgLyogVGVybSB3YWl0aW5nIGVtcHR5IGV2ZW50ICAgICAgICAgKi8KKyNkZWZpbmUgQ0hfUkVOQUJMRSAgICAgIDB4MDQwMCAgICAgICAgICAvKiBCdWZmZXIganVzdCBlbXB0aWVkICAgICAgICAgICovCisjZGVmaW5lIENIX1JBQ1RJVkUgICAgICAweDA4MDAgICAgICAgICAgLyogUHJvY2VzcyBhY3RpdmUgaW4geHhyZWFkKCkgICAqLworI2RlZmluZSBDSF9SV0FJVCAgICAgICAgMHgxMDAwICAgICAgICAgIC8qIFByb2Nlc3Mgd2FpdGluZyBpbiB4eHJlYWQoKSAgKi8KKyNkZWZpbmUgQ0hfQkFVRDAJMHgyMDAwCQkvKiBVc2VkIGZvciBjaGVja2luZyBCMCB0cmFuc2l0aW9ucyAqLworI2RlZmluZSBDSF9IQU5HVVAgICAgICAgMHg4MDAwCQkvKiBIYW5ndXAgcmVjZWl2ZWQgICAgICAgICAgICAgICAgICAqLworCisvKgorICogRGVmaW5pdGlvbnMgZm9yIGNoX3NuaWZmX2ZsYWdzCisgKi8KKyNkZWZpbmUgU05JRkZfT1BFTgkweDEKKyNkZWZpbmUgU05JRkZfV0FJVF9EQVRBCTB4MgorI2RlZmluZSBTTklGRl9XQUlUX1NQQUNFIDB4NAorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqKioJRGVmaW5pdGlvbnMgZm9yIERpZ2kgZGl0dHkoMSkgY29tbWFuZC4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFRoaXMgbW9kdWxlIHByb3ZpZGVzIGFwcGxpY2F0aW9uIGFjY2VzcyB0byBzcGVjaWFsIERpZ2kKKyAqIHNlcmlhbCBsaW5lIGVuaGFuY2VtZW50cyB3aGljaCBhcmUgbm90IHN0YW5kYXJkIFVOSVgodG0pIGZlYXR1cmVzLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2lmICFkZWZpbmVkKFRJT0NNT0RHKQorCisjZGVmaW5lCVRJT0NNT0RHCSgoJ2QnPDw4KSB8IDI1MCkJCS8qIGdldCBtb2RlbSBjdHJsIHN0YXRlCSovCisjZGVmaW5lCVRJT0NNT0RTCSgoJ2QnPDw4KSB8IDI1MSkJCS8qIHNldCBtb2RlbSBjdHJsIHN0YXRlCSovCisKKyNpZm5kZWYgVElPQ01fTEUKKyNkZWZpbmUJCVRJT0NNX0xFCTB4MDEJCS8qIGxpbmUgZW5hYmxlCQkqLworI2RlZmluZQkJVElPQ01fRFRSCTB4MDIJCS8qIGRhdGEgdGVybWluYWwgcmVhZHkJKi8KKyNkZWZpbmUJCVRJT0NNX1JUUwkweDA0CQkvKiByZXF1ZXN0IHRvIHNlbmQJKi8KKyNkZWZpbmUJCVRJT0NNX1NUCTB4MDgJCS8qIHNlY29uZGFyeSB0cmFuc21pdAkqLworI2RlZmluZQkJVElPQ01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S8qIEFsdGVybmF0ZSBSSi00NSBwaW4gY29uZmlnCSovCisjZGVmaW5lCURJR0lfQUlYT04JMHgwNDAwCQkvKiBBdXggZmxvdyBjb250cm9sIGluIGZlcAkqLworI2RlZmluZQlESUdJX1BSSU5URVIJMHgwODAwCQkvKiBIb2xkIHBvcnQgb3BlbiBmb3IgZmxvdyBjbnRybCovCisjZGVmaW5lIERJR0lfUFBfSU5QVVQJMHgxMDAwCQkvKiBDaGFuZ2UgcGFyYWxsZWwgcG9ydCB0byBpbnB1dCovCisjZGVmaW5lIERJR0lfRFRSX1RPR0dMRSAweDIwMDAJCS8qIFN1cHBvcnQgRFRSIFRvZ2dsZQkJKi8KKyNkZWZpbmUJRElHSV80MjIJMHg0MDAwCQkvKiBmb3IgNDIyLzIzMiBzZWxlY3RhYmxlIHBhbmVsICovCisjZGVmaW5lIERJR0lfUlRTX1RPR0dMRQkweDgwMDAJCS8qIFN1cHBvcnQgUlRTIFRvZ2dsZQkJKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogVGhlc2Ugb3B0aW9ucyBhcmUgbm90IHN1cHBvcnRlZCBvbiB0aGUgY29teGkuCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2RlZmluZQlESUdJX0NPTVhJCShESUdJX0ZBU1R8RElHSV9DT09LfERTUlBBQ0V8RENEUEFDRXxEVFJQQUNFKQorCisjZGVmaW5lIERJR0lfUExFTgkyOAkJLyogU3RyaW5nIGxlbmd0aAkJKi8KKyNkZWZpbmUJRElHSV9UU0laCTEwCQkvKiBUZXJtaW5hbCBzdHJpbmcgbGVuCQkqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBTdHJ1Y3R1cmUgdXNlZCB3aXRoIGlvY3RsIGNvbW1hbmRzIGZvciBESUdJIHBhcmFtZXRlcnMuCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RydWN0IGRpZ2lfdCB7CisJdW5zaWduZWQgc2hvcnQJZGlnaV9mbGFnczsJCS8qIEZsYWdzIChzZWUgYWJvdmUpCSovCisJdW5zaWduZWQgc2hvcnQJZGlnaV9tYXhjcHM7CQkvKiBNYXggcHJpbnRlciBDUFMJKi8KKwl1bnNpZ25lZCBzaG9ydAlkaWdpX21heGNoYXI7CQkvKiBNYXggY2hhcnMgaW4gcHJpbnQgcXVldWUgKi8KKwl1bnNpZ25lZCBzaG9ydAlkaWdpX2J1ZnNpemU7CQkvKiBCdWZmZXIgc2l6ZQkJKi8KKwl1bnNpZ25lZCBjaGFyCWRpZ2lfb25sZW47CQkvKiBMZW5ndGggb2YgT04gc3RyaW5nCSovCisJdW5zaWduZWQgY2hhcglkaWdpX29mZmxlbjsJCS8qIExlbmd0aCBvZiBPRkYgc3RyaW5nCSovCisJY2hhcgkJZGlnaV9vbnN0cltESUdJX1BMRU5dOwkvKiBQcmludGVyIG9uIHN0cmluZwkqLworCWNoYXIJCWRpZ2lfb2Zmc3RyW0RJR0lfUExFTl07CS8qIFByaW50ZXIgb2ZmIHN0cmluZwkqLworCWNoYXIJCWRpZ2lfdGVybVtESUdJX1RTSVpdOwkvKiB0ZXJtaW5hbCBzdHJpbmcJKi8KK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEtNRSBkZWZpbml0aW9ucyBhbmQgc3RydWN0dXJlcy4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lCVJXX0lETEUJCTAJLyogT3BlcmF0aW9u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XJuICovCisJdW5zaWduZWQgY2hhcglzaHJpbmtfYnVmX2luaXQ7CS8qIE5vbi1aZXJvIGlmIGl0IGNhdXNlZCBhbgorCQkJCQkJICAgeHhpbml0IGNhbGwuICovCisKKwl1bnNpZ25lZCBjaGFyCXNocmlua19idWZfYW5wb3J0czsJLyogTnVtYmVyIG9mIGFzeW5jIHBvcnRzICAqLworCXVuc2lnbmVkIGNoYXIJc2hyaW5rX2J1Zl9zbnBvcnRzOyAJLyogTnVtYmVyIG9mIHN5bmMgIHBvcnRzICovCisJdW5zaWduZWQgY2hhcglzaHJpbmtfYnVmX3R5cGU7CS8qIEJvYXJkIHR5cGUgMSA9IFBDL1hpLAorCQkJCQkJCSAgICAgIDIgPSBQQy9YbSwKKwkJCQkJCQkgICAgICAzID0gUEMvWGUKKwkJCQkJCQkgICAgICA0ID0gTUMvWGkKKwkJCQkJCQkgICAgICA1ID0gQ09NWC9pICovCisJdW5zaWduZWQgY2hhcglzaHJpbmtfYnVmX2NhcmQ7CS8qIENhcmQgbnVtYmVyICovCisKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFN0cnVjdHVyZSB0byBnZXQgZHJpdmVyIHN0YXR1cyBpbmZvcm1hdGlvbgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBkaWdpX2RpbmZvIHsKKwl1bnNpZ25lZCBsb25nCWRpbmZvX25ib2FyZHM7CQkvKiAjIGJvYXJkcyBjb25maWd1cmVkCSovCisJY2hhcgkJZGluZm9fcmVzZXJ2ZWRbMTJdOwkvKiBmb3IgZnV0dXJlIGV4cGFuc2lvbiAqLworCWNoYXIJCWRpbmZvX3ZlcnNpb25bMTZdOwkvKiBkcml2ZXIgdmVyc2lvbiAgICAgICAqLworfTsKKworI2RlZmluZQlESUdJX0dFVERECSgoJ2QnPDw4KSB8IDI0OCkJCS8qIGdldCBkcml2ZXIgaW5mbyAgICAgICovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFN0cnVjdHVyZSB1c2VkIHdpdGggaW9jdGwgY29tbWFuZHMgZm9yIHBlci1ib2FyZCBpbmZvcm1hdGlvbgorICoKKyAqIHBoeXNzaXplIGFuZCBtZW1zaXplIGRpZmZlciB3aGVuIGJvYXJkIGhhcyAid2luZG93ZWQiIG1lbW9yeQorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBkaWdpX2luZm8geworCXVuc2lnbmVkIGxvbmcJaW5mb19iZG51bTsJCS8qIEJvYXJkIG51bWJlciAoMCBiYXNlZCkgICovCisJdW5zaWduZWQgbG9uZwlpbmZvX2lvcG9ydDsJCS8qIGlvIHBvcnQgYWRkcmVzcyAgICAgICAgICovCisJdW5zaWduZWQgbG9uZwlpbmZvX3BoeXNhZGRyOwkJLyogbWVtb3J5IGFkZHJlc3MgICAgICAgICAgKi8KKwl1bnNpZ25lZCBsb25nCWluZm9fcGh5c3NpemU7CQkvKiBTaXplIG9mIGhvc3QgbWVtIHdpbmRvdyAqLworCXVuc2lnbmVkIGxvbmcJaW5mb19tZW1zaXplOwkJLyogQW1vdW50IG9mIGR1YWwtcG9ydCBtZW0gKi8KKwkJCQkJCS8qIG9uIGJvYXJkICAgICAgICAgICAgICAgICovCisJdW5zaWduZWQgc2hvcnQJaW5mb19iZHR5cGU7CQkvKiBCb2FyZCB0eXBlICAgICAgICAgICAgICAqLworCXVuc2lnbmVkIHNob3J0CWluZm9fbnBvcnRzOwkJLyogbnVtYmVyIG9mIHBvcnRzICAgICAgICAgKi8KKwljaGFyCQlpbmZvX2Jkc3RhdGU7CQkvKiBib2FyZCBzdGF0ZSA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AgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIFN0cnVjdHVyZSB1c2VkIHdpdGggaW9jdGwgY29tbWFuZHMgZm9yIHBlci1jaGFubmVsIGluZm9ybWF0aW9uCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBkaWdpX2NoIHsKKwl1bnNpZ25lZCBsb25nCWluZm9fYmRudW07CQkvKiBCb2FyZCBudW1iZXIgKDAgYmFzZWQpICAqLworCXVuc2lnbmVkIGxvbmcJaW5mb19jaGFubmVsOwkJLyogQ2hhbm5lbCBpbmRleCBudW1iZXIgICAgKi8KKwl1bnNpZ25lZCBsb25nCWluZm9fY2hfY2ZsYWc7CQkvKiBDaGFubmVsIGNmbGFnICAgCSAgICovCisJdW5zaWduZWQgbG9uZwlpbmZvX2NoX2lmbGFnOwkJLyogQ2hhbm5lbCBpZmxhZyAgIAkgICAqLworCXVuc2lnbmVkIGxvbmcJaW5mb19jaF9vZmxhZzsJCS8qIENoYW5uZWwgb2ZsYWcgICAJICAgKi8KKwl1bnNpZ25lZCBsb25nCWluZm9fY2hzaXplOwkJLyogQ2hhbm5lbCBzdHJ1Y3R1cmUgc2l6ZSAgKi8KKwl1bnNpZ25lZCBsb25nCWluZm9fc2xlZXBfc3RhdDsJLyogc2xlZXAgc3RhdHVzCQkgICAqLworCWRldl90CQlpbmZvX2RldjsJCS8qIGRldmljZSBudW1iZXIJICAgKi8KKwl1bnNpZ25lZCBjaGFyCWluZm9faW5pdHN0YXRlOwkJLyogQ2hhbm5lbCBpbml0IHN0YXRlCSAgICovCisJdW5zaWduZWQgY2hhcglpbmZvX3J1bm5pbmc7CQkvKiBDaGFubmVsIHJ1bm5pbmcgc3RhdGUgICAqLworCWxvbmcJCXJlc2VydmVkWzhdOwkJLyogc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KCdkJzw8OCkgfCAyNTQpCQkvKiBjaGFuZ2UgcG9sbGVyIHJhdGUgICAqLworCisjZGVmaW5lIERJR0lfU0VUQ1VTVE9NQkFVRAlfSU9XKCdlJywgMTA2LCBpbnQpCS8qIFNldCBpbnRlZ2VyIGJhdWQgcmF0ZSAqLworI2RlZmluZSBESUdJX0dFVENVU1RPTUJBVUQJX0lPUignZScsIDEwNywgaW50KQkvKiBHZXQgaW50ZWdlciBiYXVkIHJhdGUgKi8KKyNkZWZpbmUgRElHSV9SRVNFVF9QT1JUCQkoKCdlJzw8OCkgfCA5MykJCS8qIFJlc2V0IHBvcnQJCSovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIENoYW5uZWwgaW5mb3JtYXRpb24gc3RydWN0dXJlLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBjaGFubmVsX3QgeworCWludCBtYWdpYzsJCQkvKiBDaGFubmVsIE1hZ2ljIE51bWJlcgkJKi8KKwlzdHJ1Y3QgYnNfdAkqY2hfYnM7CQkvKiBCYXNlIHN0cnVjdHVyZSBwb2ludGVyICAgICAgICovCisJc3RydWN0IGNtX3QJKmNoX2NtOwkJLyogQ29tbWFuZCBxdWV1ZSBwb2ludGVyICAgICAgICAqLworCXN0cnVjdCBib2FyZF90ICpjaF9iZDsJCS8qIEJvYXJkIHN0cnVjdHVyZSBwb2ludGVyICAgICAgKi8KKwl1bnNpZ25lZCBjaGFyICpjaF92YWRkcjsJLyogRkVQIG1lbW9yeSBvcmlnaW4gICAgICAgICAgICAqLworCXVuc2lnbmVkIGNoYXIgKmNoX3RhZGRyOwkvKiBXcml0ZSBidWZmZXIgb3JpZ2luICAgICAgICAgICovCisJdW5zaWduZWQgY2hhciAqY2hfcmFkZHI7CS8qIFJlYWQgYnVmZm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gICovCisJdWludAljaF9jdXN0b21fc3BlZWQ7CS8qIEN1c3RvbSBiYXVkLCBpZiBzZXQJCSovCisJdWludAljaF9iYXVkX2luZm87CQkvKiBDdXJyZW50IGJhdWQgaW5mbyBmb3IgL3Byb2Mgb3V0cHV0CSovCisJdWxvbmcJY2hfcnhjb3VudDsJCS8qIHRvdGFsIG9mIGRhdGEgcmVjZWl2ZWQgc28gZmFyCSovCisJdWxvbmcJY2hfdHhjb3VudDsJCS8qIHRvdGFsIG9mIGRhdGEgdHJhbnNtaXR0ZWQgc28gZmFyCSovCisJdWxvbmcJY2hfZXJyX3Bhcml0eTsJCS8qIENvdW50IG9mIHBhcml0eSBlcnJvcnMgb24gY2hhbm5lbAkqLworCXVsb25nCWNoX2Vycl9mcmFtZTsJCS8qIENvdW50IG9mIGZyYW1pbmcgZXJyb3JzIG9uIGNoYW5uZWwJKi8KKwl1bG9uZwljaF9lcnJfYnJlYWs7CQkvKiBDb3VudCBvZiBicmVha3Mgb24gY2hhbm5lbAkqLworCXVsb25nCWNoX2Vycl9vdmVycnVuOwkJLyogQ291bnQgb2Ygb3ZlcnJ1bnMgb24gY2hhbm5lbAkqLworCisJdWludCBjaF9zbmlmZl9pbjsKKwl1aW50IGNoX3NuaWZmX291dDsKKwljaGFyICpjaF9zbmlmZl9idWY7CQkvKiBTbmlmZiBidWZmZXIgZm9yIHByb2MgKi8KKwl1bG9uZyBjaF9zbmlmZl9mbGFnczsJCS8qIENoYW5uZWwgZmxhZ3MgICAgICAgICAgICAgICAgKi8KKwl3YWl0X3F1ZXVlX2hlYWRfdCBjaF9zbmlmZl93YWl0OworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogQ29tbWFuZCBzdHJ1Y3R1cmUgZGVmaW5pdGlvbi4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3QgY21fdCB7CisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgY21faGVhZDsJLyogQ29tbWFuZCBidWZmZXIgaGVhZCBvZmZzZXQJKi8KKwl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCBjbV90YWlsOwkvKiBDb21tYW5kIGJ1ZmZlciB0YWlsIG9mZnNldAkqLworCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0IGNtX3N0YXJ0OwkvKiBzdGFydCBvZmZzZXQgb2YgYnVmZmVyCSovCisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgY21fbWF4OwkJLyogbGFzdCBvZmZzZXQgb2YgYnVmZmVyCSovCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBFdmVudCBzdHJ1Y3R1cmUgZGVmaW5pdGlvbi4KKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3QgZXZfdCB7CisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgZXZfaGVhZDsJLyogQ29tbWFuZCBidWZmZXIgaGVhZCBvZmZzZXQJKi8KKwl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCBldl90YWlsOwkvKiBDb21tYW5kIGJ1ZmZlciB0YWlsIG9mZnNldAkqLworCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0IGV2X3N0YXJ0OwkvKiBzdGFydCBvZmZzZXQgb2YgYnVmZmVyCSovCisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgZXZfbWF4OwkJLyogbGFzdCBvZmZzZXQgb2YgYnVmZmVyCSovCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBEb3dubG9hZCBidWZmZXIgc3RydWN0dXJlLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBkb3dubGRfdCB7CisJdWNoYXIJZGxfdHlwZTsJCS8qIEhlYWRlciAgICAgICAgICAgICAgICAgICAgICAgKi8KKwl1Y2hhcglkbF9zZXE7CQkJLyogRG93bmxvYWQgc2VxdWVuY2UgICAgICAgICAgICAqLworCXVzaG9ydAlkbF9zcmV2OwkJLyogU29mdHdhcmUgcmV2aXNpb24gbnVtYmVyICAgICAqLworCXVzaG9ydAlkbF9scmV2OwkJLyogTG93IHJldmlzaW9uIG51bWJlciAgICAgICAgICAqLworCXVzaG9ydAlkbF9ocmV2OwkJLyogSGlnaCByZXZpc2lvbiBudW1iZXIgICAgICAgICAqLworCXVzaG9ydAlkbF9zZWc7CQkJLyogU3RhcnQgc2VnbWVudCBhZGRyZXNzICAgICAgICAqLworCXVzaG9ydAlkbF9zaXplOwkJLyogTnVtYmVyIG9mIGJ5dGVzIHRvIGRvd25sb2FkICAqLworCXVjaGFyCWRsX2RhdGFbMTAyNF07CQkvKiBEb3dubG9hZCBkYXRhICAgICAgICAgICAgICAgICovCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBQZXIgY2hhbm5lbCBidWZmZXIgc3RydWN0dXJlCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgICAgICAgICAgICAgQmFzZSBTdHJ1Y3R1cmUgRW50cmllcyBVc2FnZSBNZWFuaW5ncyB0byBIb3N0ICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgVyA9IHJlYWQgd3JpdGUgICAgICAgIFIgPSByZWFkIG9ubHkgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgQyA9IGNoYW5nZWQgYnkgY29tbWFuZHMgb25seSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgVSA9IHVua25vd24gKG1heSBiZSBjaGFuZ2VkIHcvbyBub3RpY2UpICAgICAgICAgICAgICAgICAgICAgICAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RydWN0IGJzX3QgeworCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0ICB0cF9qbXA7CS8qIFRyYW5zbWl0IHBvbGwganVtcAkJICovCisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgIHRjX2ptcDsJLyogQ29va2VkIHByb2NlZHVyZSBqdW1wCSAqLworCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0ICByaV9qbXA7CS8qIE5vdCBjdXJyZW50bHkgdXNlZAkJICovCisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgIHJwX2ptcDsJLyogUmVjZWl2ZSBwb2xsIGp1bXAJCSAqLworCisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgIHR4X3NlZzsJLyogVyAgVHggc2VnbWVudAkgKi8KKwl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCAgdHhfaGVhZDsJLyogVyAgVHggYnVmZmVyIGhlYWQgb2Zmc2V0CSovCisJdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgIHR4X3RhaWw7CS8qIFIgIFR4IGJ1ZmZlciB0YWlsIG9mZnNldAkqLworCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0ICB0eF9tYXg7CS8qIFcgIFR4IGJ1ZmZlciBzaXplIC0gMQkgKi8KKworCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0ICByeF9zZWc7CS8qIFcgIFJ4IHNlZ21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wMDAwKTsKLQlpZiAoIWJyZC0+cmVfbWFwX3BvcnQpIHsKLQkJcmVsZWFzZV9tZW1fcmVnaW9uKGJyZC0+bWVtYmFzZSwgMHgyMDAwMDApOwotCQlyZWxlYXNlX21lbV9yZWdpb24oYnJkLT5tZW1iYXNlICsgUENJX0lPX09GRlNFVCwgMHgyMDAwMDApOwotCQlpb3VubWFwKGJyZC0+cmVfbWFwX21lbWJhc2UpOwotCQlBUFIoKCJkZ2FwOiBpb3JlbWFwIElPIG1lbSAlbHggY2Fubm90IGJlIG1hcHBlZC5cbiIsCi0JCQlicmQtPm1lbWJhc2UgKyBQQ0lfSU9fT0ZGU0VUKSk7Ci0JCXJldHVybiAtRU5PTUVNOwotCX0KLQotCURQUl9JTklUKCgicmVtYXBwZWQgaW86IDB4JXAgIHJlbWFwcGVkIG1lbTogMHglcFxuIiwKLQkJYnJkLT5yZV9tYXBfcG9ydCwgYnJkLT5yZV9tYXBfbWVtYmFzZSkpOwotCXJldHVybiAwOwotfQotCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotKgotKiBGdW5jdGlvbjoKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKLSogICAgZGdhcF9wb2xsX2hhbmRsZXIKLSoKLSogQXV0aG9yOgotKgotKiAgICBTY290dCBIIEtpbGF1Ci0qICAgICAgIAotKiBQYXJhbWV0ZXJzOgotKgotKiAgICBkdW1teSAtLSBpZ25vcmVkICAgICAgICAgICAgICAgICAgICAKLSoKLSogUmV0dXJuIFZhbHVlczoKLSoKLSogICAgbm9uZQotKgotKiBEZXNjcmlwdGlvbjogICAKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKLSogICAgQXMgZWFjaCB0aW1lciBleHBpcmVzLCBpdCBkZXRlcm1pbmVzIChhKSB3aGV0aGVyIHRoZSAidHJhbnNtaXQiCi0qICAg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IGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCi0gKiBGb3VuZGF0aW9uLCBJbmMuLCA2NzUgTWFzcyBBdmUsIENhbWJyaWRnZSwgTUEgMDIxMzksIFVTQS4KLSAqCi0gKglOT1RFOiBUSElTIElTIEEgU0hBUkVEIEhFQURFUi4gRE8gTk9UIENIQU5HRSBDT0RJTkcgU1RZTEUhISEKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIERyaXZlciBpbmNsdWRlcwotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jaWZuZGVmIF9fREdBUF9EUklWRVJfSAotI2RlZmluZSBfX0RHQVBfRFJJVkVSX0gKLQotI2luY2x1ZGUgPGxpbnV4L3ZlcnNpb24uaD4JLyogVG8gZ2V0IHRoZSBjdXJyZW50IExpbnV4IHZlcnNpb24gKi8KLSNpbmNsdWRlIDxsaW51eC90eXBlcy5oPiAgICAgICAgLyogVG8gcGljayB1cCB0aGUgdmFyaW9ucyBMaW51eCB0eXBlcyAqLwotI2luY2x1ZGUgPGxpbnV4L3R0eS5oPiAgICAgICAgICAvKiBUbyBwaWNrIHVwIHRoZSB2YXJpb3VzIHR0eSBzdHJ1Y3RzL2RlZmluZXMgKi8KLSNpbmNsdWRlIDxsaW51eC9pbnRlcnJ1cHQuaD4gICAgLyogRm9yIGlycXJldHVybl90IHR5cGUgKi8KLQotI2luY2x1ZGUgImRnYXBfdHlwZXMuaCIgICAgICAgICAvKiBBZGRpdGlvbmFsIHR5cGVzIG5lZWRlZCBieSB0aGUgRGlnaSBoZWFkZXIgZmlsZXMgKi8KLSNpbmNsdWRlICJkaWdpLmgiICAgICAgICAgICAgICAgLyogRGlnaSBz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gc3dhcGFibGUgdXNpbmcgdGhlIGRpdHR5IGFsdHBpbiBvcHRpb24uCi0gKi8KLSNkZWZpbmUgRF9DRChjaCkgICAgICAgIGNoLT5jaF9jZCAgICAgICAvKiBDYXJyaWVyIGRldGVjdCAgICAgICAqLwotI2RlZmluZSBEX0RTUihjaCkgICAgICAgY2gtPmNoX2RzciAgICAgIC8qIERhdGEgc2V0IHJlYWR5ICAgICAgICovCi0jZGVmaW5lIERfUlRTKGNoKSAgICAgICBETV9SVFMgICAgICAgICAgLyogUmVxdWVzdCB0byBzZW5kICAgICAgKi8KLSNkZWZpbmUgRF9DVFMoY2gpICAgICAgIERNX0NUUyAgICAgICAgICAvKiBDbGVhciB0byBzZW5kICAgICAgICAqLwotI2RlZmluZSBEX1JJKGNoKSAgICAgICAgRE1fUkkgICAgICAgICAgIC8qIFJpbmcgaW5kaWNhdG9yICAgICAgICovCi0jZGVmaW5lIERfRFRSKGNoKSAgICAgICBETV9EVFIgICAgICAgICAgLyogRGF0YSB0ZXJtaW5hbCByZWFkeSAgKi8KLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIFN0cnVjdHVyZXMgYW5kIGNsb3NlbHkgcmVsYXRlZCBkZWZpbmVzLgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0KLS8qCi0gKiBBIHN0cnVjdHVyZSB0byBob2xkIGEgc3RhdGlzdGljcyBjb3VudGVyLiAgV2UgYWxzbwotICogY29tcHV0ZSBtb3ZpbmcgYXZlcmFnZXMgZm9yIHRoaXMgY291bnRlci4KLSAqLwotc3RydWN0IG1hY291bnRlcgotewotCXUzMgkJY250OwkvKiBUb3RhbCBjb3VudCAqLwotCXVsb25nCQlhY2N1bTsJLyogQWN1dW11bGF0b3IgcGVyIHBlcmlvZCAqLw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otfTsKLQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAotICogRGV2aWNlIGZsYWcgZGVmaW5pdGlvbnMgZm9yIGNoX2ZsYWdzLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNkZWZpbmUgQ0hfUFJPTiAgICAgICAgIDB4MDAwMSAgICAgICAgICAvKiBQcmludGVyIG9uIHN0cmluZyAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBDSF9PVVQgICAgICAgICAgMHgwMDAyICAgICAgICAgIC8qIERpYWwtb3V0IGRldmljZSBvcGVuICAgICAgICAgICAgICovCi0jZGVmaW5lIENIX1NUT1AgICAgICAgICAweDAwMDQgICAgICAgICAgLyogT3V0cHV0IGlzIHN0b3BwZWQgICAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgQ0hfU1RPUEkgICAgICAgIDB4MDAwOCAgICAgICAgICAvKiBJbnB1dCBpcyBzdG9wcGVkICAgICAgICAgICAgICAgICAqLwotI2RlZmluZSBDSF9DRCAgICAgICAgICAgMHgwMDEwICAgICAgICAgIC8qIENhcnJpZXIgaXMgcHJlc2VudCAgICAgICAgICAgICAgICovCi0jZGVmaW5lIENIX0ZDQVIgICAgICAgICAweDAwMjAgICAgICAgICAgLyogQ2FycmllciBmb3JjZWQgb24gICAgICAgICAgICAgICAgKi8KLQotI2RlZmluZSBDSF9SWEJMT0NLICAgICAgMHgwMDgwICAgICAgICAgIC8qIEVuYWJsZSByeCBibG9ja2VkIGZsYWcgICAgICAgICAgICovCi0jZGVmaW5lIENIX1dMT1cgICAgICAgICAweDAxMDAgICAgICAgICAgLyogVGVybSB3YWl0aW5nIGxvdyBldmVudCAgICAgICAgICAgKi8KLSNkZWZpbmUgQ0hfV0VNUFRZICAgICAgIDB4MDIwMCAgICAgICAgICAvKiBUZXJtIHdhaXRpbmcgZW1wdHkgZXZlbnQgICAgICAgICAqLwotI2RlZmluZSBDSF9SRU5BQkxFICAgICAgMHgwNDAwICAgICAgICAgIC8qIEJ1ZmZlciBqdXN0IGVtcHRpZWQgICAgICAgICAgKi8KLSNkZWZpbmUgQ0hfUkFDVElWRSAgICAgIDB4MDgwMCAgICAgICAgICAvKiBQcm9jZXNzIGFjdGl2ZSBpbiB4eHJlYWQoKSAgICovCi0jZGVmaW5lIENIX1JXQUlUICAgICAgICAweDEwMDAgICAgICAgICAgLyogUHJvY2VzcyB3YWl0aW5nIGluIHh4cmVhZCgpICAqLwotI2RlZmluZSBDSF9CQVVEMAkweDIwMDAJCS8qIFVzZWQgZm9yIGNoZWNraW5nIEIwIHRyYW5zaXRpb25zICovCi0jZGVmaW5lIENIX0hBTkdVUCAgICAgICAweDgwMDAJCS8qIEhhbmd1cCByZWNlaXZlZCAgICAgICAgICAgICAgICAgICovCi0KLS8qCi0gKiBEZWZpbml0aW9ucyBmb3IgY2hfc25pZmZfZmxhZ3MKLSAqLwotI2RlZmluZSBTTklGRl9PUEVOCTB4MQotI2RlZmluZSBTTklGRl9XQUlUX0RBVEEJMHgyCi0jZGVmaW5lIFNOSUZGX1dBSVRfU1BBQ0UgMHg0Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKLSAqIENoYW5uZWwgaW5mb3JtYXRpb24gc3RydWN0dXJlLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdCBjaGFubmVsX3QgewotCWludCBtYWdpYzsJCQkvKiBDaGFubmVsIE1hZ2ljIE51bWJlcgkJKi8KLQlzdHJ1Y3QgYnNfdAkqY2hfYnM7CQkvKiBCYXNlIHN0cnVjdHVyZSBwb2ludGVyICAgICAgICovCi0Jc3RydWN0IGNtX3QJKmNoX2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Ci19Ci0KLQotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICoKLSAqICAgICAgZGdhcF9jbWRiIC0gU2VuZHMgYSAyIGJ5dGUgY29tbWFuZCB0byB0aGUgRkVQLgotICoKLSAqICAgICAgICAgICAgICBjaCAgICAgIC0gUG9pbnRlciB0byBjaGFubmVsIHN0cnVjdHVyZS4KLSAqICAgICAgICAgICAgICBjbWQgICAgIC0gQ29tbWFuZCB0byBiZSBzZW50LgotICogICAgICAgICAgICAgIGJ5dGUxICAgLSBJbnRlZ2VyIGNvbnRhaW5pbmcgZmlyc3QgYnl0ZSB0byBiZSBzZW50LgotICogICAgICAgICAgICAgIGJ5dGUyICAgLSBJbnRlZ2VyIGNvbnRhaW5pbmcgc2Vjb25kIGJ5dGUgdG8gYmUgc2VudC4KLSAqICAgICAgICAgICAgICBuY21kcyAgIC0gV2FpdCB1bnRpbCBuY21kcyBvciBmZXdlciBjbWRzIGFyZSBsZWZ0Ci0gKiAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSBjbWQgYnVmZmVyIGJlZm9yZSByZXR1cm5pbmcuCi0gKgotICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCi12b2lkIGRnYXBfY21kYihzdHJ1Y3QgY2hhbm5lbF90ICpjaCwgdWNoYXIgY21kLCB1Y2hhciBieXRlMSwgdWNoYXIgYnl0ZTIsIHVpbnQgbmNtZHMpCi17Ci0JY2hhcgkJKnZhZGRyID0gTlVMTDsKLQlzdHJ1Y3QgY21fdAkqY21fYWRkciA9IE5VTEw7Ci0JdWludAkJY291bnQ7Ci0JdWludAkJbjsKLQl1MTYJCWhlYWQ7Ci0JdTE2CQl0YWlsOwotCi0JaWYgKCFjaCB8fCBjaC0+bWFnaWMgIT0gREdBUF9DSEFOTkVMX01BR0lDKQotCQlyZXR1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0KLS8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLSAqCi0gKiAgICAgIGRnYXBfY21kdyAtIFNlbmRzIGEgMSB3b3JkIGNvbW1hbmQgdG8gdGhlIEZFUC4KLSAqCi0gKiAgICAgICAgICAgICAgY2ggICAgICAtIFBvaW50ZXIgdG8gY2hhbm5lbCBzdHJ1Y3R1cmUuCi0gKiAgICAgICAgICAgICAgY21kICAgICAtIENvbW1hbmQgdG8gYmUgc2VudC4KLSAqICAgICAgICAgICAgICB3b3JkICAgIC0gSW50ZWdlciBjb250YWluaW5nIHdvcmQgdG8gYmUgc2VudC4KLSAqICAgICAgICAgICAgICBuY21kcyAgIC0gV2FpdCB1bnRpbCBuY21kcyBvciBmZXdlciBjbWRzIGFyZSBsZWZ0Ci0gKiAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSBjbWQgYnVmZmVyIGJlZm9yZSByZXR1cm5pbmcuCi0gKgotICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCi12b2lkIGRnYXBfY21kdyhzdHJ1Y3QgY2hhbm5lbF90ICpjaCwgdWNoYXIgY21kLCB1MTYgd29yZCwgdWludCBuY21kcykKLXsKLQljaGFyCQkqdmFkZHIgPSBOVUxMOwotCXN0cnVjdCBjbV90CSpjbV9hZGRyID0gTlVMTDsKLQl1aW50CQljb3VudDsKLQl1aW50CQluOwotCXUxNgkJaGVhZDsKLQl1MTYJCXRhaWw7Ci0KLQlpZiAoIWNoIHx8IGNoLT5tYWdpYyAhPSBER0FQX0NIQU5ORUxfTUFHSUMpCi0JCXJldHVybjsKLQotCS8qCi0JICogQ2hlY2sgaWYgYm9hcmQgaXMgc3RpbGwgYWxpdmUuCi0JICovCi0JaWYgKGNoLT5jaF9iZC0+c3RhdGUgPT0gQk9BUkRfRkFJTEVEKSB7Ci0JCURQ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kgewotCQkJRFBSX0NPUkUoKCIlczolZCBGYWlsaW5nIGJvYXJkLlxuIixfX0ZJTEVfXywgX19MSU5FX18pKTsKLQkJCWNoLT5jaF9iZC0+c3RhdGUgPSBCT0FSRF9GQUlMRUQ7Ci0JCQlyZXR1cm47Ci0JCX0KLQkJdWRlbGF5KDEwKTsKLQl9Ci19Ci0KLQotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICoKLSAqICAgICAgZGdhcF93bW92ZSAtIFdyaXRlIGRhdGEgdG8gRkVQIGJ1ZmZlci4KLSAqCi0gKiAgICAgICAgICAgICAgY2ggICAgICAtIFBvaW50ZXIgdG8gY2hhbm5lbCBzdHJ1Y3R1cmUuCi0gKiAgICAgICAgICAgICAgYnVmICAgICAtIFBvaXRlciB0byBjaGFyYWN0ZXJzIHRvIGJlIG1vdmVkLgotICogICAgICAgICAgICAgIGNudCAgICAgLSBOdW1iZXIgb2YgY2hhcmFjdGVycyB0byBtb3ZlLgotICoKLSAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwotdm9pZCBkZ2FwX3dtb3ZlKHN0cnVjdCBjaGFubmVsX3QgKmNoLCBjaGFyICpidWYsIHVpbnQgY250KQotewotCWludCAgICBuOwotCWNoYXIgICAqdGFkZHI7Ci0Jc3RydWN0IGJzX3QgICAgKmJzOwotCXUxNiAgICBoZWFkOwotCi0JaWYgKCFjaCB8fCBjaC0+bWFnaWMgIT0gREdBUF9DSEFOTkVMX01BR0lDKQotCQlyZXR1cm47Ci0KLQkvKgotCSAqIENoZWNrIHBhcmFtZXRlcnMuCi0JICovCi0JYnMgICA9IGNoLT5jaF9iczsKLQloZWFkID0gcmVhZHcoJihicy0+dHhfaGVhZCkpOwotCi0JLyoKLQkgKiBJZiBwb2ludGVycyBhcmUgb3V0IG9mIHJhbmdlLCB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gKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogICAgICBGRVAgbWVtb3J5IG9mZnNldHMKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jZGVmaW5lIFNUQVJUICAgICAgICAgICAweDAwMDRMICAgICAgICAgLyogRXhlY3V0aW9uIHN0YXJ0IGFkZHJlc3MgICAgICAqLwotCi0jZGVmaW5lIENNREJVRiAgICAgICAgICAweDBkMTBMICAgICAgICAgLyogQ29tbWFuZCAoY21fdCkgc3RydWN0dXJlIG9mZnNldCAqLwotI2RlZmluZSBDTURTVEFSVCAgICAgICAgMHgwNDAwTCAgICAgICAgIC8qIFN0YXJ0IG9mIGNvbW1hbmQgYnVmZmVyICAgICAgKi8gICAKLSNkZWZpbmUgQ01ETUFYICAgICAgICAgIDB4MDgwMEwgICAgICAgICAvKiBFbmQgb2YgY29tbWFuZCBidWZmZXIgICAgICAgICovCi0KLSNkZWZpbmUgRVZCVUYgICAgICAgICAgIDB4MGQxOEwgICAgICAgICAvKiBFdmVudCAoZXZfdCkgc3RydWN0dXJlICAgICAgICovCi0jZGVmaW5lIEVWU1RBUlQgICAgICAgICAweDA4MDBMICAgICAgICAgLyogU3RhcnQgb2YgZXZlbnQgYnVmZmVyICAgICAgICAqLwotI2RlZmluZSBFVk1BWCAgICAgICAgICAgMHgwYzAwTCAgICAgICAgIC8qIEVuZCBvZiBldmVudCBidWZmZXIgICAgICAgICAgKi8KLSNkZWZpbmUgRkVQNV9QTFVTICAgICAgIDB4MEU0MCAgICAgICAgICAvKiBBU0NJSSAnNScgYW5kIEFTQ0lJICdBJyBpcyBoZXJlICAqLwotI2RlZmluZSBFQ1NfU0VHICAgICAgICAgMHgwRTQ0ICAgICAgICAgIC8qIFNlZ21lbnQgb2YgdGhlIGV4dGVuZGVkIGNoYW5uZWwgc3RydWN0dXJlICovCi0jZGVmaW5lIExJTkVfU1BFRUQgICAgICAweDEwICAgICAgICAgICAgLyogT2Zmc2V0IGludG8gRUNTX1NFRyBmb3IgbGluZSBzcGVlZCAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogaWYgdGhlIGZlcCBoYXMgZXh0ZW5kZWQgY2FwYWJpbGl0aWVzICovCi0KLS8qIEJJT1MgTUFHSUMgU1BPVFMgKi8KLSNkZWZpbmUgRVJST1IgICAgICAgICAgIDB4MEMxNEwJCS8qIEJJT1MgZXJyb3IgY29kZSAgICAgICAgICAgICAgKi8KLSNkZWZpbmUgU0VRVUVOQ0UJMHgwQzEyTAkJLyogQklPUyBzZXF1ZW5jZSBpbmRpY2F0b3IgICAgICAqLwotI2RlZmluZSBQT1NUQVJFQQkweDBDMDBMCQkvKiBQT1NUIGNvbXBsZXRlIG1lc3NhZ2UgYXJlYSAgICovCi0KLS8qIEZFUCBNQUdJQyBTUE9UUyAqLwotI2RlZmluZSBGRVBTVEFUICAgICAgICAgUE9TVEFSRUEgICAgICAgIC8qIE9TIGhlcmUgd2hlbiBGRVAgY29tZXMgdXAgICAgKi8KLSNkZWZpbmUgTkNIQU4gICAgICAgICAgIDB4MEMwMkwgICAgICAgICAvKiBudW1iZXIgb2YgcG9ydHMgRkVQIHNlZXMgICAgICovCi0jZGVmaW5lIFBBTklDICAgICAgICAgICAweDBDMTBMICAgICAgICAgLyogUEFOSUMgYXJlYSBmb3IgRkVQICAgICAgICAgICAqLwotI2RlZmluZSBLTUVNRU0gICAgICAgICAgMHgwQzMwTCAgICAgICAgIC8qIE1lbW9yeSBmb3IgS01FIHVzZSAgICAgICAgICAgKi8gICAKLSNkZWZpbmUgQ09ORklHICAgICAgICAgIDB4MENEMEwgICAgICAgICAvKiBDb25jZW50cmF0b3IgY29uZmlndXJhdGlvbiBpbmZvICovCi0jZGVmaW5lIENPTkZJR1NJWkUgICAgICAweDAwMzAgICAgICAg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ExfTUlOCQkxCQkvKiBtaW5pbXVtIG9mIDEgbWlsbGlzZWNvbmQgKi8gIAotI2RlZmluZSBGRVBQT0xMX01BWAkJMjAJCS8qIG1heGltdW0gb2YgMjAgbWlsbGlzZWNvbmRzICovCi0jZGVmaW5lIEZFUFBPTEwJCQkweDBjMjYJCS8qIEZlcCBldmVudCBwb2xsIGludGVydmFsICovICAgCi0KLSNkZWZpbmUJSUFMVFBJTgkJCTB4MDA4MAkJLyogSW5wdXQgZmxhZyB0byBzd2FwIERTUiA8LT4gRENEICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCi0gKiBDb21tYW5kIHN0cnVjdHVyZSBkZWZpbml0aW9uLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdCBjbV90IHsKLQl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCBjbV9oZWFkOwkvKiBDb21tYW5kIGJ1ZmZlciBoZWFkIG9mZnNldAkqLwotCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0IGNtX3RhaWw7CS8qIENvbW1hbmQgYnVmZmVyIHRhaWwgb2Zmc2V0CSovCi0Jdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgY21fc3RhcnQ7CS8qIHN0YXJ0IG9mZnNldCBvZiBidWZmZXIJKi8KLQl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCBjbV9tYXg7CQkvKiBsYXN0IG9mZnNldCBvZiBidWZmZXIJKi8KLX07Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIEV2ZW50IHN0cnVjdHVyZSBkZWZpbml0aW9uLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdCBldl90IHsKLQl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCBldl9oZWFkOwkvKiBDb21tYW5kIGJ1ZmZlciBoZWFkIG9mZnNldAkqLwotCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0IGV2X3RhaWw7CS8qIENvbW1hbmQgYnVmZmVyIHRhaWwgb2Zmc2V0CSovCi0Jdm9sYXRpbGUgdW5zaWduZWQgc2hvcnQgZXZfc3RhcnQ7CS8qIHN0YXJ0IG9mZnNldCBvZiBidWZmZXIJKi8KLQl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCBldl9tYXg7CQkvKiBsYXN0IG9mZnNldCBvZiBidWZmZXIJKi8KLX07Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIERvd25sb2FkIGJ1ZmZlciBzdHJ1Y3R1cmUuCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RydWN0IGRvd25sZF90IHsKLQl1Y2hhcglkbF90eXBlOwkJLyogSGVhZGVyICAgICAgICAgICAgICAgICAgICAgICAqLwotCXVjaGFyCWRsX3NlcTsJCQkvKiBEb3dubG9hZCBzZXF1ZW5jZSAgICAgICAgICAgICovCi0JdXNob3J0CWRsX3NyZXY7CQkvKiBTb2Z0d2FyZSByZXZpc2lvbiBudW1iZXIgICAgICovCi0JdXNob3J0CWRsX2xyZXY7CQkvKiBMb3cgcmV2aXNpb24gbnVtYmVyICAgICAgICAgICovCi0JdXNob3J0CWRsX2hyZXY7CQkvKiBIaWdoIHJldmlzaW9uIG51bWJlciAgICAgICAgICovCi0JdXNob3J0CWRsX3NlZzsJCQkvKiBTdGFydCBzZWdtZW50IGFkZHJlc3MgICAgICAgICovCi0JdXNob3J0CWRsX3NpemU7CQkvKiBOdW1iZXIgb2YgYnl0ZXMgdG8gZG93bmxvYWQgICovCi0JdWNoYXIJZGxfZGF0YVsxMDI0XTsJCS8qIERvd25sb2FkIGRhdGEgICAgICAgICAgICAgICAgKi8KLX07Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCi0gKiBQZXIgY2hhbm5lbCBidWZmZXIgc3RydWN0dXJlCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgICAgICAgICAgICAgQmFzZSBTdHJ1Y3R1cmUgRW50cmllcyBVc2FnZSBNZWFuaW5ncyB0byBIb3N0ICAgICAgICAgICAqIAotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiAKLSAqICAgICAgICBXID0gcmVhZCB3cml0ZSAgICAgICAgUiA9IHJlYWQgb25seSAgICAgICAgICAgICAgICAgICAgICAgICAgICogCi0gKiAgICAgICAgQyA9IGNoYW5nZWQgYnkgY29tbWFuZHMgb25seSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIAotICogICAgICAgIFUgPSB1bmtub3duIChtYXkgYmUgY2hhbmdlZCB3L28gbm90aWNlKSAgICAgICAgICAgICAgICAgICAgICAgKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdCBic190IHsKLQl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydCAgdHBfam1wOwkvKiBUcmFuc21pdCBwb2xsIGp1bXAJCSAqLwotCXZvbGF0aWxlIHVuc2lnbmVkIHNob3J0ICB0Y19qbXA7CS8qIENvb2tlZCBwcm9jZWR1cmUganVtcAkgKi8KLQl2b2xhdGlsZSB1bnNpZ25lZCBzaG9ydC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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKLSAqCU1vZGVzIGZvciBTQ09NTU9ERQotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNkZWZpbmUgTU9ERV8yMzIJMHgwMAotI2RlZmluZSBNT0RFXzQyMgkweDAxCi0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKLSAqICAgICAgRXZlbnQgZmxhZ3MuCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2RlZmluZSBJRkJSRUFLICAgICAgICAgMHgwMSAgICAgICAgICAgIC8qIEJyZWFrIHJlY2VpdmVkICAgICAgICAgICAgICAgKi8gIAotI2RlZmluZSBJRlRMVyAgICAgICAgICAgMHgwMiAgICAgICAgICAgIC8qIFRyYW5zbWl0IGxvdyB3YXRlciAgICAgICAgICAgKi8KLSNkZWZpbmUgSUZURU0gICAgICAgICAgIDB4MDQgICAgICAgICAgICAvKiBUcmFuc21pdHRlciBlbXB0eSAgICAgICAgICAgICovCi0jZGVmaW5lIElGREFUQSAgICAgICAgICAweDA4ICAgICAgICAgICAgLyogUmVjZWl2ZSBkYXRhIHByZXNlbnQgICAgICAgICAqLwotI2RlZmluZSBJRk1PREVNICAgICAgICAgMHgyMCAgICAgICAgICAgIC8qIE1vZGVtIHN0YXR1cyBjaGFuZ2UgICAgICAgICAgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAgIAotICogICAgICBNb2RlbSBmbGFncwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSMgICAgICA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1NFLiAgU2VlIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBmb3IgbW9yZSBkZXRhaWxzLgotICoKLSAqIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgRnJlZSBTb2Z0d2FyZQotICogRm91bmRhdGlvbiwgSW5jLiwgNjc1IE1hc3MgQXZlLCBDYW1icmlkZ2UsIE1BIDAyMTM5LCBVU0EuCi0gKgotICogJElkOiBkaWdpLmgsdiAxLjEgMjAwOS8xMC8yMyAxNDowMTo1NyBtYXJraCBFeHAgJAotICoKLSAqCU5PVEU6IFRISVMgSVMgQSBTSEFSRUQgSEVBREVSLiBETyBOT1QgQ0hBTkdFIENPRElORyBTVFlMRSEhIQotICovCi0KLSNpZm5kZWYgX19ESUdJX0gKLSNkZWZpbmUgX19ESUdJX0gKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoqKglEZWZpbml0aW9ucyBmb3IgRGlnaSBkaXR0eSgxKSBjb21tYW5kLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCi0vKgotICogQ29weXJpZ2h0IChjKSAxOTg4LTk2IERpZ2kgSW50ZXJuYXRpb25hbCBJbmMuLCBBbGwgUmlnaHRzIFJlc2VydmVkLgotICovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFRoaXMgbW9kdWxlIHByb3ZpZGVzIGFwcGxpY2F0aW9uIGFjY2VzcyB0byBzcGVjaWFsIERpZ2kKLSAqIHNl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Z2xlCQkqLwotI2RlZmluZQlESUdJXzQyMgkweDQwMDAJCS8qIGZvciA0MjIvMjMyIHNlbGVjdGFibGUgcGFuZWwgKi8KLSNkZWZpbmUgRElHSV9SVFNfVE9HR0xFCTB4ODAwMAkJLyogU3VwcG9ydCBSVFMgVG9nZ2xlCQkqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBUaGVzZSBvcHRpb25zIGFyZSBub3Qgc3VwcG9ydGVkIG9uIHRoZSBjb214aS4KLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jZGVmaW5lCURJR0lfQ09NWEkJKERJR0lfRkFTVHxESUdJX0NPT0t8RFNSUEFDRXxEQ0RQQUNFfERUUlBBQ0UpCi0KLSNkZWZpbmUgRElHSV9QTEVOCTI4CQkvKiBTdHJpbmcgbGVuZ3RoCQkqLwotI2RlZmluZQlESUdJX1RTSVoJMTAJCS8qIFRlcm1pbmFsIHN0cmluZyBsZW4JCSovCi0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFN0cnVjdHVyZSB1c2VkIHdpdGggaW9jdGwgY29tbWFuZHMgZm9yIERJR0kgcGFyYW1ldGVycy4KLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdHJ1Y3QgZGlnaV90IHsKLQl1bnNpZ25lZCBzaG9ydAlkaWdpX2ZsYWdzOwkJLyogRmxhZ3MgKHNlZSBhYm92ZSkJKi8KLQl1bnNpZ25lZCBzaG9ydAlkaWdpX21heGNwczsJCS8qIE1heCBwcmludGVyIENQUwkqLwotCXVuc2lnbmVkIHNob3J0CWRpZ2lfbWF4Y2hhcj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ZiBzeW5jICBwb3J0cyAqLwotCXVuc2lnbmVkIGNoYXIJc2hyaW5rX2J1Zl90eXBlOwkvKiBCb2FyZCB0eXBlIDEgPSBQQy9YaSwKLQkJCQkJCQkgICAgICAyID0gUEMvWG0sCi0JCQkJCQkJICAgICAgMyA9IFBDL1hlICAKLQkJCQkJCQkgICAgICA0ID0gTUMvWGkgIAotCQkJCQkJCSAgICAgIDUgPSBDT01YL2kgKi8KLQl1bnNpZ25lZCBjaGFyCXNocmlua19idWZfY2FyZDsJLyogQ2FyZCBudW1iZXIgKi8KLQkKLX07Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIFN0cnVjdHVyZSB0byBnZXQgZHJpdmVyIHN0YXR1cyBpbmZvcm1hdGlvbgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdCBkaWdpX2RpbmZvIHsKLQl1bnNpZ25lZCBsb25nCWRpbmZvX25ib2FyZHM7CQkvKiAjIGJvYXJkcyBjb25maWd1cmVkCSovCi0JY2hhcgkJZGluZm9fcmVzZXJ2ZWRbMTJdOwkvKiBmb3IgZnV0dXJlIGV4cGFuc2lvbiAqLwotCWNoYXIJCWRpbmZvX3ZlcnNpb25bMTZdOwkvKiBkcml2ZXIgdmVyc2lvbiAgICAgICAqLwotfTsKLQotI2RlZmluZQlESUdJX0dFVERECSgnZCc8PDgpIHwgMjQ4CQkvKiBnZXQgZHJpdmVyIGluZm8gICAgICAqLwotIAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogU3RydWN0dXJlIHVzZWQgd2l0aCBpb2N0bCBjb21tYW5kcyBmb3IgcGVyLWJvYXJkIGluZm9ybWF0aW9uCi0gKgotICogcGh5c3NpemUgYW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NoYW47CQkvKiBDaGFubmVsIG51bWJlciAoMCBiYXNlZCkgICovCi0JdW5zaWduZWQgaW50CWluZm9fYnJkOwkJLyogQm9hcmQgbnVtYmVyICgwIGJhc2VkKSAgKi8KLQl1bnNpZ25lZCBsb25nCWluZm9fY2ZsYWc7CQkvKiBjZmxhZyBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGxvbmcJaW5mb19pZmxhZzsJCS8qIGlmbGFnIGZvciBjaGFubmVsICAgICAgICovCi0JdW5zaWduZWQgbG9uZwlpbmZvX29mbGFnOwkJLyogb2ZsYWcgZm9yIGNoYW5uZWwgICAgICAgKi8KLQl1bnNpZ25lZCBsb25nCWluZm9fbXN0YXQ7CQkvKiBtc3RhdCBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGxvbmcJaW5mb190eF9kYXRhOwkJLyogdHhfZGF0YSBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGxvbmcJaW5mb19yeF9kYXRhOwkJLyogcnhfZGF0YSBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGxvbmcJaW5mb19oZmxvdzsJCS8qIGhmbG93IGZvciBjaGFubmVsICAgICAgICovCi0JdW5zaWduZWQgbG9uZwlpbmZvX3Jlc2VydmVkWzhdOwkvKiBmb3IgZnV0dXJlIGV4cGFuc2lvbiAgICAqLwotfTsKLQotI2RlZmluZQlESUdJX0dFVFNUQVQJKCdkJzw8OCkgfCAyNDQJCS8qIGdldCBib2FyZCBpbmZvICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogU3RydWN0dXJlIHVzZWQgd2l0aCBpb2N0bCBjb21tYW5kcyBmb3IgcGVyLWNoYW5uZWwgaW5mb3JtYXRpb24KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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SU5fUE9SVCwgWExfQ1NJTl9QSU4sIGkpOworfQorCitpbnQgeGxfZ2V0X2luaXRfYih2b2lkKQoreworCXJldHVybiBncGlvX2dldF92YWx1ZShYTF9JTklUTl9QT1JULCBYTF9JTklUTl9QSU4pOworfQorCitpbnQgeGxfZ2V0X2RvbmVfYih2b2lkKQoreworCXJldHVybiBncGlvX2dldF92YWx1ZShYTF9ET05FX1BPUlQsIFhMX0RPTkVfUElOKTsKK30KKworCisvKiBHMTAwIHNwZWNpZmljIGJpdCBzd2FwIGFuZCByZW1tYXAgKHRvIGdwaW8gcGlucykgZm9yIGJ5dGUgMCAqLworc3RhdGljIGlubGluZSB1aW50MzJfdCBiaXRfcmVtYXBfYnl0ZTAodWludDMyX3QgcykKK3sKKwl1aW50MzJfdCBkOworCWQgPSAoKChzJjB4ODApPj43KSB8ICgocyYweDQwKT4+NSkgfCAoKHMmMHgyMCk+PjMpIHwgKChzJjB4MTApPj4xKSB8CisJCSgocyYweDA4KTw8MSkgfCAoKHMmMHgwNCk8PDMpIHwgKChzJjB4MDIpPDw2KSB8ICgocyYweDAxKTw8OSkpOworCXJldHVybiBkOworfQorCisvKgorICogRzEwMCBzcGVjaWZpYyBNU0IsIGluIHRoaXMgb3JkZXIgW2J5dGUwIHwgYnl0ZTFdLCBvdXQKKyAqLworc3RhdGljIGlubGluZSB2b2lkIGJ5dGUwX291dCh1bnNpZ25lZCBjaGFyIGRhdGEpCit7CisJdWludDMyX3Qgc3dhcDMyOworCXN3YXAzMiA9ICBiaXRfcmVtYXBfYnl0ZTAoKHVpbnQzMl90KSBkYXRhKSA8PCA4OworCisJbXBjODV4eF9ncGlvX3NldCgwLCAweDAwMDJCRjAwLCAodWludDMyX3QpIHN3YXAzMik7Cit9CisKKy8qCisgKiBHMTAwIHNwZWNpZmljIExTQiwgaW4gdGhpcyBvcmRlciBbYnl0ZTAgfCBieXRlMV0sIG91dAorICovCitzdGF0aWMgaW5saW5lIHZvaWQgYnl0ZTFfb3V0KHVu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GNobGV2ZWwJCT0gMCwKIH07CiAKK3N0YXRpYyBpbnQgY29tcGFyZV9vZihzdHJ1Y3QgZGV2aWNlICpkZXYsIHZvaWQgKmRhdGEpCit7CisJc3RydWN0IGRldmljZV9ub2RlICpucCA9IGRhdGE7CisKKwkvKiBTcGVjaWFsIGNhc2UgZm9yIExEQiwgb25lIGRldmljZSBmb3IgdHdvIGNoYW5uZWxzICovCisJaWYgKG9mX25vZGVfY21wKG5wLT5uYW1lLCAibHZkcy1jaGFubmVsIikgPT0gMCkgeworCQlucCA9IG9mX2dldF9wYXJlbnQobnApOworCQlvZl9ub2RlX3B1dChucCk7CisJfQorCisJcmV0dXJuIGRldi0+b2Zfbm9kZSA9PSBucDsKK30KKworc3RhdGljIExJU1RfSEVBRChpbXhfZHJtX2NvbXBvbmVudHMpOworCitzdGF0aWMgaW50IGlteF9kcm1fYWRkX2NvbXBvbmVudHMoc3RydWN0IGRldmljZSAqbWFzdGVyLCBzdHJ1Y3QgbWFzdGVyICptKQoreworCXN0cnVjdCBpbXhfZHJtX2NvbXBvbmVudCAqY29tcG9uZW50OworCWludCByZXQ7CisKKwlsaXN0X2Zvcl9lYWNoX2VudHJ5KGNvbXBvbmVudCwgJmlteF9kcm1fY29tcG9uZW50cywgbGlzdCkgeworCQlyZXQgPSBjb21wb25lbnRfbWFzdGVyX2FkZF9jaGlsZChtLCBjb21wYXJlX29mLAorCQkJCQkJIGNvbXBvbmVudC0+b2Zfbm9kZSk7CisJCWlmIChyZXQpCisJCQlyZXR1cm4gcmV0OworCX0KKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBpbXhfZHJtX2JpbmQoc3RydWN0IGRldmljZSAqZGV2KQoreworCXJldHVybiBkcm1fcGxhdGZvcm1faW5pdCgmaW14X2RybV9kcml2ZXIsIHRvX3BsYXRmb3JtX2RldmljZShkZXYpKTsKK30KKworc3RhdGljIHZvaWQgaW14X2RybV91bmJpbmQoc3RydWN0IGRldmljZSAqZGV2KQoreworCWRybV9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JTkU2X0JJVF9QT0RIRDMwMCwgICAgICAiUE9ESEQzMDAiLCAgICAgICJQT0QgSEQzMDAiLCAgICAgICAgTElORTZfQklUX0NPTlRST0xfUENNX0hXTU9OIH0sCi0JeyBMSU5FNl9CSVRfUE9ESEQ0MDAsICAgICAgIlBPREhENDAwIiwgICAgICAiUE9EIEhENDAwIiwgICAgICAgIExJTkU2X0JJVF9DT05UUk9MX1BDTV9IV01PTiB9LAotCXsgTElORTZfQklUX1BPREhENTAwLCAgICAgICJQT0RIRDUwMCIsICAgICAgIlBPRCBIRDUwMCIsICAgICAgICBMSU5FNl9CSVRfQ09OVFJPTF9QQ01fSFdNT04gfSwKLQl7IExJTkU2X0JJVF9QT0RTVFVESU9fR1gsICAiUE9EU3R1ZGlvR1giLCAgICJQT0QgU3R1ZGlvIEdYIiwgICAgTElORTZfQklUX1BDTSAgICAgICAgICAgICAgIH0sCi0JeyBMSU5FNl9CSVRfUE9EU1RVRElPX1VYMSwgIlBPRFN0dWRpb1VYMSIsICAiUE9EIFN0dWRpbyBVWDEiLCAgIExJTkU2X0JJVF9QQ00gICAgICAgICAgICAgICB9LAotCXsgTElORTZfQklUX1BPRFNUVURJT19VWDIsICJQT0RTdHVkaW9VWDIiLCAgIlBPRCBTdHVkaW8gVVgyIiwgICBMSU5FNl9CSVRfUENNICAgICAgICAgICAgICAgfSwKLQl7IExJTkU2X0JJVF9QT0RYMywgICAgICAgICAiUE9EWDMiLCAgICAgICAgICJQT0QgWDMiLCAgICAgICAgICAgTElORTZfQklUX1BDTSAgICAgICAgICAgICAgIH0sCi0JeyBMSU5FNl9CSVRfUE9EWDNMSVZFLCAgICAgIlBPRFgzTGl2ZSIsICAgICAiUE9EIFgzIExpdmUiLCAgICAgIExJTkU2X0JJVF9QQ00gICAgICAgICAgICAgICB9LAotCXsgTElORTZfQklUX1BPRFhULCAgICAgICAgICJQT0R4dCIsICAgICAgICAgIlBPRHh0IiwgICAgICAgICAgICBMSU5FNl9CSVRfQ09OVFJ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xMDAwMCkpIDw9IGppZmZpZXMpIHsKIAkJdW5zaWduZWQgbG9uZyBqaWZmaWVzX25vdyA9IGppZmZpZXM7Ci0JCXVuc2lnbmVkIGxvbmcgbXNlY3MgPSBqaWZmaWVzX3RvX21zZWNzKGppZmZpZXNfbm93KSAtIGppZmZpZXNfdG9fbXNlY3Mocy0+amlmZmllcyk7CisJCXVuc2lnbmVkIGxvbmcgbXNlY3MgPSBqaWZmaWVzX3RvX21zZWNzKGppZmZpZXNfbm93KSAtIGppZmZpZXNfdG9fbXNlY3Mocy0+amlmZmllc19uZXh0KTsKIAkJdW5zaWduZWQgaW50IHNhbXBsZXMgPSBzYW1wbGVfbnVtW2lfbWF4IC0gMV0gLSBzLT5zYW1wbGU7Ci0JCXMtPmppZmZpZXMgPSBqaWZmaWVzX25vdzsKKwkJcy0+amlmZmllc19uZXh0ID0gamlmZmllc19ub3c7CiAJCXMtPnNhbXBsZSA9IHNhbXBsZV9udW1baV9tYXggLSAxXTsKIAkJZGV2X2RiZygmcy0+dWRldi0+ZGV2LAogCQkJCSJzbGVuPSVkIHNhbXBsZXM9JXUgbXNlY3M9JWx1IHNhbXBsaW5nIHJhdGU9JWx1IGJpdHM9JWQuJWQuJWQuJWRcbiIsCkBAIC02OTksNDAgKzM4MSwyMSBAQAogfQogCiAvKgotICogQ29udmVydHMgc2lnbmVkIDEyLWJpdCBpbnRlZ2VyIGludG8gMzItYml0IElFRUUgZmxvYXRpbmcgcG9pbnQKLSAqIHJlcHJlc2VudGF0aW9uLgorICogKz09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorICogfCAgIDAwLTEwMjMgfCBVU0IgcGFja2V0IHR5cGUgJzMzNicKKyAqICs9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKyAqIHwgICAwMC0gIDAzIHwgc2VxdWV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gKyAgICAgaW50IG5vdF92YWxpZDsKKworSGFzIHRoaXMgYWN0dWFsbHkgYmVlbiBjb25maXJtZWQgdGhhdCB3ZSBjYW4ganVzdCByYW5kb21seSBzZXQgYW4KK2FkZHJlc3Mgb3V0IG9mIHRoZSBOb2tpYSByYW5nZS4gSSBkbyBub3QgdGhpbmsgc28uIFRoaXMgaXMgYSBwcmV0dHkKK2JhZCBpZGVhLgorCitJIGhhdmUgbm8gaW50ZXJlc3QgaW4gbWVyZ2luZyBhIGRyaXZlciB3aXRoIHN1Y2ggYSBoYWNrLgorCis+ICsgICAgIG5vdF92YWxpZCA9IDE7Cis+ICsgICAgIGZvciAoaSA9IDA7IGkgPCA2OyBpKyspIHsKKz4gKyAgICAgICAgICAgICBpZiAoaW5mby0+YmRfYWRkcltpXSAhPSAweDAwKSB7Cis+ICsgICAgICAgICAgICAgICAgICAgICBub3RfdmFsaWQgPSAwOworPiArICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Cis+ICsgICAgICAgICAgICAgfSAgIAorPiArICAgICB9CisKK0FueWJvZHkgZXZlcnkgaGVhcmQgb2YgbWVtY21wIG9yIGJhY21wIGFuZCBCREFERFJfQU5ZPworCis+ICsgICAgICAgICAgICAgaWYgKG5vdF92YWxpZCkgeworPiArICAgICAgICAgICAgICAgICAgICAgZGV2X2luZm8oaW5mby0+ZGV2LCAiVmFsaWQgYmx1ZXRvb3RoIGFkZHJlc3Mgbm90IGZvdW5kLCIKKz4gKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiIHNldHRpbmcgc29tZSByYW5kb21cbiIpOworPiArICAgICAgICAgICAgICAgICAgICAgLyogV2hlbiBhZGRyZXNzIGlzIG5vdCB2YWxpZCwgdXNlIHNvbWUgcmFuZG9tICovCis+ICsgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoaW5mby0+YmRfYWRkciwgbm9raWFfb3VpLCAzKTsKKz4gKyAgICAgICAgICAgICAgICAgICAgIGdldF9yYW5kb21f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U5ETEVEOworCX0KKworCWlmIChpaXIgPT0gVUFSVF9JSVJfUkRJKSB7CisJCWhjaV9oNHBfcnhfdGFza2xldCgodW5zaWduZWQgbG9uZylkYXRhKTsKKwkJcmV0ID0gSVJRX0hBTkRMRUQ7CisJfQorCisJaWYgKGlpciA9PSBVQVJUX0lJUl9USFJJKSB7CisJCWhjaV9oNHBfdHhfdGFza2xldCgodW5zaWduZWQgbG9uZylkYXRhKTsKKwkJcmV0ID0gSVJRX0hBTkRMRUQ7CisJfQorCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGlycXJldHVybl90IGhjaV9oNHBfd2FrZXVwX2ludGVycnVwdChpbnQgaXJxLCB2b2lkICpkZXZfaW5zdCkKK3sKKwlzdHJ1Y3QgaGNpX2g0cF9pbmZvICppbmZvID0gZGV2X2luc3Q7CisJaW50IHNob3VsZF93YWtldXA7CisJc3RydWN0IGhjaV9kZXYgKmhkZXY7CisKKwlpZiAoIWluZm8tPmhkZXYpCisJCXJldHVybiBJUlFfSEFORExFRDsKKworCXNob3VsZF93YWtldXAgPSBncGlvX2dldF92YWx1ZShpbmZvLT5ob3N0X3dha2V1cF9ncGlvKTsKKwloZGV2ID0gaW5mby0+aGRldjsKKworCWlmICghdGVzdF9iaXQoSENJX1JVTk5JTkcsICZoZGV2LT5mbGFncykpIHsKKwkJaWYgKHNob3VsZF93YWtldXAgPT0gMSkKKwkJCWNvbXBsZXRlX2FsbCgmaW5mby0+dGVzdF9jb21wbGV0aW9uKTsKKworCQlyZXR1cm4gSVJRX0hBTkRMRUQ7CisJfQorCisJQlRfREJHKCJncGlvIGludGVycnVwdCAlZCIsIHNob3VsZF93YWtldXApOworCisJLyogQ2hlY2sgaWYgd2VlIGhhdmUgbWlzc2VkIHNvbWUgaW50ZXJydXB0cyAqLworCWlmIChpbmZvLT5yeF9lbmFibGVkID09IHNob3VsZF93YWtldXApCisJCXJldHVybiBJUlFfSEFORExFRDsKKworCWlmIChzaG91bGRfd2FrZXVwKQorCQ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pZiAoZXJyIDwgMCkgeworCQkJa2ZyZWVfc2tiKGZ3X3NrYik7CisJCQlpbmZvLT5md19lcnJvciA9IGVycjsKKwkJCWNvbXBsZXRlKCZpbmZvLT5md19jb21wbGV0aW9uKTsKKwkJCXJldHVybjsKKwkJfQorCX0KKworCXNrYl9xdWV1ZV90YWlsKCZpbmZvLT50eHEsIGZ3X3NrYik7CisJc3Bpbl9sb2NrX2lycXNhdmUoJmluZm8tPmxvY2ssIGZsYWdzKTsKKwloY2lfaDRwX291dGIoaW5mbywgVUFSVF9JRVIsIGhjaV9oNHBfaW5iKGluZm8sIFVBUlRfSUVSKSB8CisJCQlVQVJUX0lFUl9USFJJKTsKKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZpbmZvLT5sb2NrLCBmbGFncyk7Cit9CisKKworaW50IGhjaV9oNHBfYmNtX3NlbmRfZncoc3RydWN0IGhjaV9oNHBfaW5mbyAqaW5mbywKKwkJCXN0cnVjdCBza19idWZmX2hlYWQgKmZ3X3F1ZXVlKQoreworCXN0cnVjdCBza19idWZmICpza2I7CisJdW5zaWduZWQgbG9uZyBmbGFncywgdGltZTsKKworCWluZm8tPmZ3X2Vycm9yID0gMDsKKworCUJUX0RCRygiU2VuZGluZyBmaXJtd2FyZSIpOworCisJdGltZSA9IGppZmZpZXM7CisKKwlpbmZvLT5md19xID0gZndfcXVldWU7CisJc2tiID0gc2tiX2RlcXVldWUoZndfcXVldWUpOworCWlmICghc2tiKQorCQlyZXR1cm4gLUVOT0RBVEE7CisKKwlCVF9EQkcoIlNlbmRpbmcgY29tbWFuZHMiKTsKKworCS8qCisJICogRGlzYWJsZSBzbWFydC1pZGxlIGFzIFVBUlQgVFggaW50ZXJydXB0cworCSAqIGFyZSBub3Qgd2FrZS11cCBjYXBhYmxlCisJICovCisJaGNpX2g0cF9zbWFydF9pZGxlKGluZm8sIDApOworCisJLyogQ2hlY2sgaWYgdGhpcyBpcyBiZF9hZGRyZXNzIHBhY2tldCAqLworCWluaXR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S0+c3luY19zY2FuX2h1cnJ5dXApCi0vLwl7CiAKLS8vCQlwcmludGsoInN0b3Agc2NhbiBzeW5jXG4iKTsKLS8vICAgCQlnb3RvIG91dDsKLS8vICAJfQotLy8JcHJpbnRrKCI9PT09PT09aGg9PT09PT09PT09PT09PT0+aXBzIHNjYW5cbiIpOwotICAgICAJd2hpbGUoMSkKLSAgICAgICAgewotICAgICAgICAgICAgICAgIC8qIHRoaXMgZnVuY3Rpb24gY2FuIGJlIGNhbGxlZCBpbiB0d28gc2l0dWF0aW9ucwotICAgICAgICAgICAgICAgICAqIDEtIFdlIGhhdmUgc3dpdGNoZWQgdG8gYWQtaG9jIG1vZGUgYW5kIHdlIGFyZQotICAgICAgICAgICAgICAgICAqICAgIHBlcmZvcm1pbmcgYSBjb21wbGV0ZSBzeW5jcm8gc2NhbiBiZWZvcmUgY29uY2x1ZGUKLSAgICAgICAgICAgICAgICAgKiAgICB0aGVyZSBhcmUgbm8gaW50ZXJlc3RpbmcgY2VsbCBhbmQgdG8gY3JlYXRlIGEKLSAgICAgICAgICAgICAgICAgKiAgICBuZXcgb25lLiBJbiB0aGlzIGNhc2UgdGhlIGxpbmsgc3RhdGUgaXMKLSAgICAgICAgICAgICAgICAgKiAgICBJRUVFODAyMTFfTk9MSU5LIHVudGlsIHdlIGZvdW5kIGFuIGludGVyZXN0aW5nIGNlbGwuCi0gICAgICAgICAgICAgICAgICogICAgSWYgc28gdGhlIGllZWU4MDIxX25ld19uZXQsIGNhbGxlZCBieSB0aGUgUlggcGF0aAotICAgICAgICAgICAgICAgICAqICAgIHdpbGwgc2V0IHRoZSBzdGF0ZSB0byBJRUVFODAyMTFfTElOS0VELCBzbyB3ZSBzdG9wCi0gICAgICAgICAgICAgICAgICogICAgc2Nhbm5pbmcKLSAgICAgICAgICAgICAgICAgKiAyLSBXZSBhcmUgbGlua2VkIGFuZCB0aGUgcm9vdCB1c2VzIHJ1biBpd2xpc3Qgc2Nhbi4KLSAgICAgICAgICAgICAgICA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8vPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS8vIExFRCBjdXN0b21pemF0aW9uLgotLy89PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQorZW51bSBfUmVhc29uQ29kZSB7CisJdW5zcGVjX3JlYXNvbiA9IDB4MSwKKwlhdXRoX25vdF92YWxpZCA9IDB4MiwKKwlkZWF1dGhfbHZfc3MgPSAweDMsCisJaW5hY3Rpdml0eSA9IDB4NCwKKwlhcF9vdmVybG9hZCA9IDB4NSwKKwljbGFzczJfZXJyID0gMHg2LAorCWNsYXNzM19lcnIgPSAweDcsCisJZGlzYXNfbHZfc3MgPSAweDgsCisJYXNvY19ub3RfYXV0aCA9IDB4OSwKIAotdHlwZWRlZgllbnVtIF9MRURfU1RSQVRFR1lfODE4NXsKLQlTV19MRURfTU9ERTAsIC8vCi0JU1dfTEVEX01PREUxLCAvLwotCUhXX0xFRCwgLy8gSFcgY29udHJvbCAyIExFRHMsIExFRDAgYW5kIExFRDEgKHRoZXJlIGFyZSA0IGRpZmZlcmVudCBjb250cm9sIG1vZGVzKQotfUxFRF9TVFJBVEVHWV84MTg1LCAqUExFRF9TVFJBVEVHWV84MTg1OwotLy9ieSBhbXkgZm9yIGxlZAotLy9ieSBhbXkgZm9yIHBvd2VyIHNhdmUKLXR5cGVkZWYJZW51bSBfTEVEX0NUTF9NT0RFewotCUxFRF9DVExfUE9XRVJfT04gPSAxLAotCUxFRF9DVExfTElOSyA9IDIsCi0JTEVEX0NUTF9OT19MSU5LID0gMywKLQlMRURfQ1RMX1RYID0gNCwKLQlMRURfQ1RMX1JYID0gNSwKLQlMRURfQ1RMX1NJVEVfU1VSVkVZID0gNiwKLQlMRURfQ1RMX1BPV0VSX09GRiA9IDcKLX1MRURfQ1RMX01PREU7CisJLyogLS0tLU1J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XRhUmF0ZTsgLy8gRm9yY2UgRGF0YSBSYXRlLiAwOiBBdXRvLCAweDAyOiAxTSB+IDB4NkM6IDU0TS4pCi0JdTMyICAgICBOdW1UeFVuaWNhc3Q7IC8vWUosYWRkLDA4MDgyOCxmb3Iga2VlcCBhbGl2ZQotCXU4ICAgICAga2VlcEFsaXZlTGV2ZWw7IC8vWUosYWRkLDA4MDgyOCxmb3IgS2VlcEFsaXZlCi0JdW5zaWduZWQgbG9uZyAJTnVtVHhPa1RvdGFsOwotCXUxNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExhc3RSZXRyeUNudDsKLSAgICAgICAgdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExhc3RSZXRyeVJhdGU7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgICAgICAgTGFzdFR4b2tDbnQ7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgICAgICAgICAgIExhc3RSeG9rQ250OwotICAgICAgICB1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ3VyclJldHJ5Q250OwotICAgICAgICB1bnNpZ25lZCBsb25nICAgICAgICAgICBMYXN0VHhPS0J5dGVzOwotCXVuc2lnbmVkIGxvbmcgCQkgICAgTnVtVHhPa0J5dGVzVG90YWw7Ci0gICAgICAgIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICBMYXN0RmFpbFR4UmF0ZTsKLSAgICAgICAgbG9uZyAgICAgICAgICAgICAgICAgICAgICAgIExhc3RGYWlsVHhSYXRlU1M7Ci0gICAgICAgIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICBGYWlsVHhSYXRlQ291bnQ7Ci0gICAgICAgIHUzMiAgICAgICAgICAgICAgICAgICAgICAgICBMYXN0VHhUaHJvdWdocHV0OwotICAgICAgICAvL2ZvciB1cCByYXRlCi0gICAgICAgIHVuc2lnbmVkIHNob3J0ICAgICAgICAgIGJUcnl1cGluZzsKLSAgICAgICAgdTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEN1cnJUeFJhdGU7ICAgICAvL3RoZSByYXRlIGJlZm9yZSB1cAotICAgICAgICB1MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ3VyclJldHJ5UmF0ZTsKLSAgICAgICAgdTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRyeXVwaW5nQ291bnQ7Ci0gICAgICAgIHU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUcnlEb3duQ291bnRMb3dEYXRhOwotICAgICAgICB1OCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVHJ5dXBpbmdDb3VudE5vRGF0YTsKKwkvKiBieSBhbXkgZm9yIGFudGVubmEge2J5IGFteSAwODAzMTIgKi8KIAotICAgICAgICB1OCAgICAgICAgICAgICAgICAgIEN1cnJlbnRPcGVyYVJhdGU7Ci0vL2J5IGFteSBmb3IgcmF0ZSBhZGFwdGl2ZQotLy9ieSBhbXkgMDgwMzEyfQotLy8Jc2hvcnQgd3FfaHVycnl1cDsKLS8vCXN0cnVjdCB3b3JrcXVldWVfc3RydWN0ICp3b3JrcXVldWU7CisJLyogQ3J5c3RhbCBjYWxpYnJhdGlvbi4gQWRkZWQgYnkgUm9nZXIsIDIwMDcuMTIuMTEuICovCisKKwlib29sIGJYdGFsQ2FsaWJyYXRpb247IC8qIENyeXN0YWwgY2FsaWJyYXRpb24uKi8KKwl1OCBYdGFsQ2FsX1hpbjsgLyogQ3J5c3RhbCBjYWxpYnJhdGlvbiBmb3IgWGluLiAwfjcuNXBGICovCisJdTggWHRhbENhbF9Yb3V0OyAvKiBDcnlzdGFsIGNhbGlicmF0aW9uIGZvciBYb3V0LiAwfjcuNXBGICovCisKKwkvKiBUeCBwb3dlciB0cmFja2luZyB3aXRoIHRoZXJtYWwgbWV0ZXIgaW5kaWNhdGlvbi4KKwkgKiBBZGRlZCBieSBSb2dlciwgMjAwNy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IDEpIF4gKCgoKHgpICYgMHg4MDgwODA4MCkgPj4gNykgKiAweDFiKQotCi0jZGVmaW5lIGltaXhfY29sKHkseCkgICAgICAgXAotICAgIHUgICA9IHN0YXJfeCh4KTsgICAgICAgIFwKLSAgICB2ICAgPSBzdGFyX3godSk7ICAgICAgICBcCi0gICAgdyAgID0gc3Rhcl94KHYpOyAgICAgICAgXAotICAgIHQgICA9IHcgXiAoeCk7ICAgICAgICAgIFwKLSAgICh5KSAgPSB1IF4gdiBeIHc7ICAgICAgICBcCi0gICAoeSkgXj0gcm90cih1IF4gdCwgIDgpIF4gXAotCSAgcm90cih2IF4gdCwgMTYpIF4gXAotCSAgcm90cih0LDI0KQotCi0vKiBpbml0aWFsaXNlIHRoZSBrZXkgc2NoZWR1bGUgZnJvbSB0aGUgdXNlciBzdXBwbGllZCBrZXkgKi8KLQotI2RlZmluZSBsb29wNChpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLXsgICB0ID0gcm90cih0LCAgOCk7IHQgPSBsc19ib3godCkgXiByY29fdGFiW2ldOyAgICBcCi0gICAgdCBePSBFX0tFWVs0ICogaV07ICAgICBFX0tFWVs0ICogaSArIDRdID0gdDsgICAgXAotICAgIHQgXj0gRV9LRVlbNCAqIGkgKyAxXTsgRV9LRVlbNCAqIGkgKyA1XSA9IHQ7ICAgIFwKLSAgICB0IF49IEVfS0VZWzQgKiBpICsgMl07IEVfS0VZWzQgKiBpICsgNl0gPSB0OyAgICBcCi0gICAgdCBePSBFX0tFWVs0ICogaSArIDNdOyBFX0tFWVs0ICogaSArIDddID0gdDsgICAgXAotfQotCi0jZGVmaW5lIGxvb3A2KGkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoteyAgIHQgPSByb3RyKHQsICA4KTsgdCA9IGxzX2JveCh0KSBeIHJjb190YWJbaV07ICAgIFwKLSAgICB0IF49IEVfS0VZWzYgKiBpXTsgICAgIEVfS0VZWzYgKiBpICsgNl0gPSB0OyAgICBcCi0gICAgdCBePSBFX0tFWVs2ICogaSArIDFdOyBFX0tFWVs2ICogaSArIDddID0gdDsgICAgXAotICAgIHQgXj0gRV9LRVlbNiAqIGkgKyAyXTsgRV9LRVlbNiAqIGkgKyA4XSA9IHQ7ICAgIFwKLSAgICB0IF49IEVfS0VZWzYgKiBpICsgM107IEVfS0VZWzYgKiBpICsgOV0gPSB0OyAgICBcCi0gICAgdCBePSBFX0tFWVs2ICogaSArIDRdOyBFX0tFWVs2ICogaSArIDEwXSA9IHQ7ICAgXAotICAgIHQgXj0gRV9LRVlbNiAqIGkgKyA1XTsgRV9LRVlbNiAqIGkgKyAxMV0gPSB0OyAgIFwKLX0KLQotI2RlZmluZSBsb29wOChpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLXsgICB0ID0gcm90cih0LCAgOCk7IDsgdCA9IGxzX2JveCh0KSBeIHJjb190YWJbaV07ICBcCi0gICAgdCBePSBFX0tFWVs4ICogaV07ICAgICBFX0tFWVs4ICogaSArIDhdID0gdDsgICAgXAotICAgIHQgXj0gRV9LRVlbOCAqIGkgKyAxXTsgRV9LRVlbOCAqIGkgKyA5XSA9IHQ7ICAgIFwKLSAgICB0IF49IEVfS0VZWzggKiBpICsgMl07IEVfS0VZWzggKiBpICsgMTBdID0gdDsgICBcCi0gICAgdCBePSBFX0tFWVs4ICogaSArIDNdOyBFX0tFWVs4ICogaSArIDExXSA9IHQ7ICAgXAotICAgIHQgID0gRV9LRVlbOCAqIGkgKyA0XSBeIGxzX2JveCh0KTsgICAgXAotICAgIEVfS0VZWzggKiBpICsgMTJdID0gdDsgICAgICAgICAgICAgICAgXAotICAgIHQgXj0gRV9LRVlbOCAqIGkgKyA1XTsgRV9LRVlbOCAqIGkgKyAxM10gPSB0OyAgIFwKLSAgICB0IF49IEVfS0VZWzggKiBpICsgNl07IEVfS0VZWzggKiBpICsgMTRdID0gdDsgICBcCi0gICAgdCBePSBFX0tFWVs4ICogaSArIDddOyB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CBwQkEsIHUxNiBUaW1lKQorc3RhdGljIHZvaWQgQWN0aXZhdGVCQUVudHJ5KHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlLCBQQkFfUkVDT1JEIHBCQSwgdTE2IFRpbWUpCiB7CiAJcEJBLT5iVmFsaWQgPSB0cnVlOwogCWlmKFRpbWUgIT0gMCkKQEAgLTI1LDcgKzI1LDcgQEAKICAqICAgaW5wdXQ6ICBQQkFfUkVDT1JECQkJcEJBICAvL0JBIGVudHJ5IHRvIGJlIGRpc2FibGVkCiAgKiAgb3V0cHV0OiAgbm9uZQogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIERlQWN0aXZhdGVCQUVudHJ5KCBzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwgUEJBX1JFQ09SRCBwQkEpCitzdGF0aWMgdm9pZCBEZUFjdGl2YXRlQkFFbnRyeShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwgUEJBX1JFQ09SRCBwQkEpCiB7CiAJcEJBLT5iVmFsaWQgPSBmYWxzZTsKIAlkZWxfdGltZXJfc3luYygmcEJBLT5UaW1lcik7CkBAIC0zNyw3ICszNyw3IEBACiAgKiAgb3V0cHV0OiAgbm9uZQogICogIG5vdGljZTogIEFzIFBUWF9UU19SRUNPUkQgc3RydWN0dXJlIHdpbGwgYmUgZGVmaW5lZCBpbiBRT1MsIHNvIHdhaXQgdG8gYmUgbWVyZ2VkLiAvL0ZJWE1FCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXU4IFR4VHNEZWxldGVCQSggc3RydWN0IGllZWU4MDIxMV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9UUGVlckRldGVybWluZShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSkKIHsKIAlQUlRfSElHSF9USFJPVUdIUFVUCXBIVEluZm8gPSBpZWVlLT5wSFRJbmZvOwogCXN0cnVjdCBpZWVlODAyMTFfbmV0d29yayAqbmV0ID0gJmllZWUtPmN1cnJlbnRfbmV0d29yazsKQEAgLTQxMyw3ICs0MTMsNyBAQAogICogIG91dHB1dDogIG5vbmUKICAqICByZXR1cm46ICByZXR1cm4gMSBpZiBkcml2ZXIgc2hvdWxkIGRlY2xhcmUgTUNTMTMgb25seShvdGhlcndpc2UgcmV0dXJuIDApCiAgICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi11OCBIVElPVEFjdElzRGlzYWJsZU1DUzE0KHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlLCB1OCAqUGVlck1hY0FkZHIpCitzdGF0aWMgdTggSFRJT1RBY3RJc0Rpc2FibGVNQ1MxNChzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwgdTggKlBlZXJNYWNBZGRyKQogewogCXU4IHJldCA9IDA7CiAJcmV0dXJuIHJldDsKQEAgLTQzMiw3ICs0MzIsNyBAQAogKiBSZXR1cm46CXRydWUgaWYgZHJpdmVyIHNob3VsZCBkaXNhYmxlIE1DUzE1CiAqIDIwMDguMDQuMTUJRW1pbHkKICovCi1ib29sIEhUSU9UQWN0SXNEaXNhYmxlTUNTMTUoc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUpCitzdGF0aWMgYm9vbCBIVElPVEFjdElzRGlzYWJsZU1DUzE1KHN0cnVjdCBpZWVlODAyMTFfZGV2aWNlICppZWVlKQogewogCWJvb2wgcmV0VmFsdWUgPSBmYWxzZTsKIApAQCAtNDY5LDcgKzQ2OSw4IEBACi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IGZvciBkaWZmZXJlbnQgQVAgaW4gRE0gaGFuZGxlci4KQEAgLTUwMCw3ICs1MDIsNyBAQAogICogIG91dHB1dDogIG5vbmUKICAqICByZXR1cm46ICByZXR1cm4gMSBpZiB0cnVlCiAgICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi11OCBIVElPVEFjdElzTWdudFVzZUNDSzZNKHN0cnVjdCBpZWVlODAyMTFfbmV0d29yayAqbmV0d29yaykKK3N0YXRpYyB1OCBIVElPVEFjdElzTWdudFVzZUNDSzZNKHN0cnVjdCBpZWVlODAyMTFfbmV0d29yayAqbmV0d29yaykKIHsKIAl1OAlyZXRWYWx1ZSA9IDA7CiAKQEAgLTUxNSw3ICs1MTcsNyBAQAogCXJldHVybiByZXRWYWx1ZTsKIH0KIAotdTggSFRJT1RBY3RJc0NDREZzeW5jKHU4ICpQZWVyTWFjQWRkcikKK3N0YXRpYyB1OCBIVElPVEFjdElzQ0NERnN5bmModTggKlBlZXJNYWNBZGRyKQogewogCXU4CXJldFZhbHVlID0gMDsKIAlpZigJKG1lbWNtcChQZWVyTWFjQWRkciwgVU5LTk9XTl9CT1JBRENPTSwgMyk9PTApIHx8CkBAIC03OTIsNyArNzk0LDcgQEAKICAqICByZXR1cm46ICBhbHdheXMgd2UgcmV0dXJuIHRydWUKICAqICBub3RpY2U6CiAgICogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi11OCBIVF9QaWNrTUNTUmF0ZShzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwgdTggKnBPcGVyYXRlTUNTKQorc3RhdGljIHU4IEhUX1BpY2tNQ1NSYXRlKHN0cnVjdCBpZ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0IHdvdWxkIHNlbmQgQUREVFNSZXEgZnJhbWUuCiB9CiAKLXZvaWQgVHNJbmFjdFRpbWVvdXQodW5zaWduZWQgbG9uZyBkYXRhKQorc3RhdGljIHZvaWQgVHNJbmFjdFRpbWVvdXQodW5zaWduZWQgbG9uZyBkYXRhKQogewogCS8vIE5vdCBpbXBsZW1lbnQgeWV0CiAJLy8gVGhpcyBpcyB1c2VkIGZvciBXTU1TQSBhbmQgQUNNLgpAQCAtMjIsNyArMjIsNyBAQAogICogIHJldHVybjogIE5VTEwKICAqICBub3RpY2U6CiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgUnhQa3RQZW5kaW5nVGltZW91dCh1bnNpZ25lZCBsb25nIGRhdGEpCitzdGF0aWMgdm9pZCBSeFBrdFBlbmRpbmdUaW1lb3V0KHVuc2lnbmVkIGxvbmcgZGF0YSkKIHsKIAlQUlhfVFNfUkVDT1JECXBSeFRzID0gKFBSWF9UU19SRUNPUkQpZGF0YTsKIAlzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSA9IGNvbnRhaW5lcl9vZihwUnhUcywgc3RydWN0IGllZWU4MDIxMV9kZXZpY2UsIFJ4VHNSZWNvcmRbcFJ4VHMtPm51bV0pOwpAQCAtOTksNyArOTksNyBAQAogICogIHJldHVybjogIE5VTEwKICAqICBub3RpY2U6CiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgVHNBZGRCYVByb2Nlc3ModW5zaWduZWQgbG9uZyBkYXRhKQorc3RhdGljIHZvaWQgVHNBZGRCYVByb2Nlc3ModW5zaWduZWQgbG9uZyBkYXRhK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WVlZTgwMjExX3ByaXYoZGV2KTsKIApAQCAtNjg5LDI0ICs2ODMsNiBAQAogCQlSVF9UUkFDRShDT01QX0VQUk9NLCAiRUVQUk9NIGFkZHIgJXggOiAleCIsIGksIGVwcm9tX3JlYWQoZGV2LCBpKSk7CiB9CiAKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLUhXIFNUVUZGLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotCi12b2lkIHJ0bDgxOTJfc2V0X21vZGUoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgaW50IG1vZGUpCi17Ci0JdTggZWNtZDsKLQlyZWFkX25pY19ieXRlKGRldiwgRVBST01fQ01ELCAmZWNtZCk7Ci0JZWNtZCA9IGVjbWQgJiB+RVBST01fQ01EX09QRVJBVElOR19NT0RFX01BU0s7Ci0JZWNtZCA9IGVjbWQgfCAobW9kZTw8RVBST01fQ01EX09QRVJBVElOR19NT0RFX1NISUZUKTsKLQllY21kID0gZWNtZCAmIH5FUFJPTV9DU19CSVQ7Ci0JZWNtZCA9IGVjbWQgJiB+RVBST01fQ0tfQklUOwotCXdyaXRlX25pY19ieXRlKGRldiwgRVBST01fQ01ELCBlY21kKTsKLX0KLQotCiB2b2lkIHJ0bDgxOTJfdXBkYXRlX21zcihzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewogCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gaWVlZTgwMjExX3ByaXYoZGV2KTsKQEAgLTkwMywxMiArODc5LDYgQEAKIAlyZXR1cm47CiB9CiAKLQotaW50IGFsbG9jX3R4X2JlYWNvbl9kZXNjX3Jp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AyMTFfcHJpdihkZXYpOwogCkBAIC03ODAsNyArNzgxLDcgQEAKICAqIG5vdGljZTogICAgSW5pdGlhbGl6YXRpb24gdmFsdWUgbWF5IGNoYW5nZSBhbGwgdGhlIHRpbWUsIHNvIHBsZWFzZSBtYWtlCiAgKiAgICAgICAgICAgIHN1cmUgaXQgaGFzIGJlZW4gc3luY2VkIHdpdGggdGhlIG5ld2VzdC4KICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIHJ0bDgxOTJfQkJfQ29uZmlnX1BhcmFGaWxlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCitzdGF0aWMgdm9pZCBydGw4MTkyX0JCX0NvbmZpZ19QYXJhRmlsZShzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewogCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gaWVlZTgwMjExX3ByaXYoZGV2KTsKIAl1OCByZWdfdTggPSAwLCBlQ2hlY2tJdGVtID0gMCwgc3RhdHVzID0gMDsKQEAgLTEwNzAsNyArMTA3MSw3IEBACiAgKiByZXR1cm46ICAgIG5vbmUKICAqIG5vdGljZToKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIHJ0bDgxOTJfU2V0VHhQb3dlckxldmVsKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsIHU4IGNoYW5uZWwpCitzdGF0aWMgdm9pZCBydGw4MTkyX1NldFR4UG93ZXJMZXZlbChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LCB1OCBjaGFubmVsKQogewogCXN0cnVjdCByODE5Ml9wcml2ICpwcml2ID0gaWVlZTgwMjExX3ByaXYoZGV2KTsKIAl1OAlwb3dlcmxldmVsID0gcHJpdi0+VHhQb3dlckxldmVsQ0NLW2NoYW5uZWwtMV07CkBAIC0xMjM5LDkgKzEyNDAsOSBAQAogICogcmV0dXJuOiAgICB0cnVlIGlmIGZpbmlzaGVkLCBmYWxzZSBvdGhlcndpc2UKICAqIG5vdGljZToKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi11OCBydGw4MTkyX3BoeV9TZXRTd0NobmxDbWRBcnJheShTd0NobmxDbWQgKkNtZFRhYmxlLCB1MzIgQ21kVGFibGVJZHgsCi0JCQkJIHUzMiBDbWRUYWJsZVN6LCBTd0NobmxDbWRJRCBDbWRJRCwgdTMyIFBhcmExLAotCQkJCSB1MzIgUGFyYTIsIHUzMiBtc0RlbGF5KQorc3RhdGljIHU4IHJ0bDgxOTJfcGh5X1NldFN3Q2hubENtZEFycmF5KFN3Q2hubENtZCAqQ21kVGFibGUsIHUzMiBDbWRUYWJsZUlkeCwKKwkJCQkJdTMyIENtZFRhYmxlU3osIFN3Q2hubENtZElEIENtZElELAorCQkJCQl1MzIgUGFyYTEsIHUzMiBQYXJhMiwgdTMyIG1zRGVsYXkpCiB7CiAJU3dDaG5sQ21kICpwQ21kOwogCkBAIC0xMjc2LDggKzEyNzcsOCBAQAogICogcmV0dXJuOiAgICB0cnVlIGlmIGZpbmlzaGVkLCBmYWxzZSBvdGhlcndpc2UKICAqIG5vdGljZTogICAgV2FpdCBmb3Igc2ltcGxlciBmdW5jdGlvbiB0byByZXBsYWNlIGl0CiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi11OCBydGw4MTkyX3BoeV9Td0NobmxTdGVwQnlTdGVwKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsIHU4IGNoYW5uZWwsIHU4ICpzdGFnZSwKLQkJCQl1OCAqc3RlcCwgdTMyICpkZWxheSkKK3N0YXRpYyB1OCBydGw4MTkyX3BoeV9Td0NobmxTdG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I2RlZmluZSBydGxfc2VjKHJ0bHByaXYpIAkoJigocnRscHJpdiktPnNlYykpCi0jZGVmaW5lIHJ0bF9kbShydGxwcml2KQkoJigocnRscHJpdiktPmRtKSkKKyNkZWZpbmUgcnRsX3NlYyhydGxwcml2KQkoJigocnRscHJpdiktPnNlYykpCisjZGVmaW5lIHJ0bF9kbShydGxwcml2KQkJKCYoKHJ0bHByaXYpLT5kbSkpCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgICAgQmx1ZXRvb3RoIENvLWV4aXN0YW5jZSBSZWxhdGVkCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiBlbnVtIGJ0X2FudF9udW0gewotICAgICAgICBBTlRfWDIgPSAwLAotICAgICAgICBBTlRfWDEgPSAxLAorCUFOVF9YMiA9IDAsCisJQU5UX1gxID0gMSwKIH07CiAKIGVudW0gYnRfY29fdHlwZSB7Ci0gICAgICAgIEJUXzJXSVJFID0gMCwKLSAgICAgICAgQlRfSVNTQ18zV0lSRSA9IDEsCi0gICAgICAgIEJUX0FDQ0VMID0gMiwKLSAgICAgICAgQlRfQ1NSX0JDNCA9IDMsCi0gICAgICAgIEJUX0NTUl9CQzggPSA0LAotICAgICAgICBCVF9SVEw4NzU2ID0gNSwKLSAgICAgICAgQlRfUlRMODcyM0EgPSA2LAotICAgICAgICBCVF9SVEw4ODIxQSA9IDcsCi0gICAgICAgIEJUX1JUTDg3MjNCID0gOCwKLSAgICAgICAgQlRfUlRMODE5MkUgPSA5LAotICAgICAgICBCVF9SVEw4ODEyQSA9IDExLAorCUJUXzJXSVJFID0gMCwKKwlCVF9JU1NDXzNXSVJFID0gMSwKKwlCVF9BQ0NFTCA9IDIsCisJQlRfQ1NSX0JDNCA9IDMsCisJQlRfQ1NSX0JDOCA9IDQsCisJQlRfUlRMODc1NiA9IDUsCisJQlRfUlRMODcyM0EgPSA2LAorCUJUX1JUTDg4MjFBID0gNywKKwlCVF9S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IE1QX09QVFJfR1BPRFIJCTB4MjEKLQotLyogUGFyYWxsZWwgQWRkaXRpb25hbCBGdW5jdGlvbiBSZWdpc3RlciAqLwotI2RlZmluZSBNUF9PUFRSX1BBRlIJCTB4MjMKLQotLyoKLSAqIHN5c3RlbWJhc2UgMTZjMTA1eCBVQVJUIHJlZ2lzdGVyCi0gKi8KLQotI2RlZmluZSBQQUdFXzAgMAotI2RlZmluZSBQQUdFXzEgMQotI2RlZmluZSBQQUdFXzIgMgotI2RlZmluZSBQQUdFXzMgMwotI2RlZmluZSBQQUdFXzQgNAotCi0vKgotICogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogICogRExBQj0wICAgICAgICAgICAgICAgICAgPT09PT09PT09PT09PT09ICAgICAgIFBhZ2UgMCBSZWdpc3RlcnMgKgotICogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICovCi0KLSNkZWZpbmUgU0IxMDVYX1JYCQkwCS8qIEluOiAgUmVjZWl2ZSBidWZmZXIgKi8KLSNkZWZpbmUgU0IxMDVYX1RYCQkwCS8qIE91dDogVHJhbnNtaXQgYnVmZmVyICovCi0KLSNkZWZpbmUgU0IxMDVYX0lFUgkJMQkvKiBPdXQ6IEludGVycnVwdCBFbmFibGUgUmVnaXN0ZXIgKi8KLQotI2RlZmluZSBTQjEwNVhfSUVSX0NUU0kJICAJMHg4MAkvKiBDVFMjIEludGVycnVwdCBFbmFibGUgKFJlcXVpcmVzIEVGUls0XSA9IDEpICovCi0jZGVmaW5lIFNCMTA1WF9JRVJfUlRTSQkgIAkweDQwCS8qIFJUUyMgSW50ZXJydXB0IEVuYWJsZSAoUmVxdWlyZXMgRUZSWzRdID0gMSkgKi8KLSNkZWZpbmUgU0IxMDVYX0lFUl9YT0kJICAJMHgyMAkvKiBYb2ZmIEludGVycnVwdCBFbmFibGUgKFJl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ICAgICAgICAgICAgICAgICAgICByZXR1cm4gUE9SVF8xNkM1NVg7Ci0gICAgICAgICAgICAgICBjYXNlIERJUl9VQVJUXzE2QzEwNTA6Ci0gICAgICAgICAgICAgICAgICAgIHJldHVybiBQT1JUXzE2QzEwNVg7Ci0gICAgICAgICAgICAgICBjYXNlIERJUl9VQVJUXzE2QzEwNTBBOgotICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgIGlmIChtdHB0LT5wb3J0LmxpbmUgPCAyKQotICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICByZXR1cm4gUE9SVF8xNkMxMDVYQTsKLSAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICBpZiAobXRwdC0+ZGV2aWNlLT5kZXZpY2VfaWQgJiAweDUwKQotICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBPUlRfMTZDNTVYOwotICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gUE9SVF8xNkMxMDVYOwotICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgIH0qLwotICAgICAgICAgICAgICAgcmV0dXJuIFBPUlRfMTZDMTA1WEE7Ci0gICAgICAgICAgICAgICBkZWZhdWx0OgotICAgICAgICAgICAgICAgICAgICByZXR1cm4gUE9SVF9VTktOT1dOOwotICAgICAgICB9Ci0KLX0KLXN0YXRpYyBpbnQgZ2V0X2RlZXBfZmlmbyhzdHJ1Y3Qgc2JfdWFydF9wb3J0ICpwb3J0KQotewotCWludCBhZnJfc3RhdHVzID0gMDsKLQlhZnJfc3RhdHVzID0gc2IxMDU0X2dldF9yZWdpc3Rlcihwb3J0LCBQQUdFXzQsIFNCMTA1WF9BRlIpOwotCXJldHVyb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0FSUCkKLSAgICAgICAgICAgICAgICBhbHRiYXVkID0gNDYwODAwOwotCi0gICAgICAgIGZvciAodHJ5ID0gMDsgdHJ5IDwgMjsgdHJ5KyspIHsKLQotICAgICAgICAgICAgICAgIHN3aXRjaCAodGVybWlvcy0+Y19jZmxhZyAmIChDQkFVRCB8IENCQVVERVgpKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAJY2FzZSBCOTIxNjAwICAgIDogYmF1ZCA9IDkyMTYwMDsgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgCWNhc2UgQjQ2MDgwMCAgICA6IGJhdWQgPSA0NjA4MDA7ICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIAljYXNlIEIyMzA0MDAgICAgOiBiYXVkID0gMjMwNDAwOyAgICBicmVhazsKLSAgICAgICAgICAgICAgICAJY2FzZSBCMTE1MjAwICAgIDogYmF1ZCA9IDExNTIwMDsgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgCWNhc2UgQjU3NjAwICAgICA6IGJhdWQgPSA1NzYwMDsgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIAljYXNlIEIzODQwMCAgICAgOiBiYXVkID0gMzg0MDA7ICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAJY2FzZSBCMTkyMDAgICAgIDogYmF1ZCA9IDE5MjAwOyAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgCWNhc2UgQjk2MDAgICAgICA6IGJhdWQgPSA5NjAwOyAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIAljYXNlIEI0ODAwICAgICAgOiBiYXVkID0gNDgwMDsgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAJY2FzZSBCMjQwMCAgICAgIDogYmF1ZCA9IDI0MDA7ICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgCWNhc2UgQjE4MDAgICAgICA6IGJhdWQgPSAxODAwOyAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIAljYXNlIEIxMjAwICAgICAgOiBiYXVkID0gMTIwMDsgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAJY2FzZSBCNjAwICAgICAgIDogYmF1ZCA9IDYwMDsgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgCWNhc2UgQjMwMCAgICAgICA6IGJhdWQgPSAzMDA7ICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSBCMjAwICAgICAgIDogYmF1ZCA9IDIwMDsgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgCWNhc2UgQjE1MCAgICAgICA6IGJhdWQgPSAxNTA7ICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIAljYXNlIEIxMzQgICAgICAgOiBiYXVkID0gMTM0OyAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAJY2FzZSBCMTEwICAgICAgIDogYmF1ZCA9IDExMDsgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgCWNhc2UgQjc1ICAgICAgICA6IGJhdWQgPSA3NTsgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIAljYXNlIEI1MCAgICAgICAgOiBiYXVkID0gNTA7ICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAJZGVmYXVsdCAgICAgICAgIDogYmF1ZCA9IDk2MDA7ICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgaWYgKGJhdWQgPT0gMzg0MDApCi0gICAgICAgICAgICAgICAgICAgICAgICBiYXVkID0gYWx0YmF1ZDsKLQotICAgICAgICAgICAgICAgIGlmIChiYXVkID09IDApCi0gICAgICAgICAgICAgICAgICAgICAgICBiYXVkID0gOTYwMDsKLQotICAgICAgICAgICAgICAgIGlmIChiYXVkID49IG1pbiAmJiBiYXVkIDw9IG1heCkKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiYXVkOwotCi0gICAgICAgICAgICAgICAgdGVybWlvcy0+Y19jZmxhZyAmPS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yhzdHJ1Y3QgYnBjdGxfZGV2ICpwYnBjdGxfZGV2KQorc3RhdGljIGludCBicF9od19yZXNldF9zdGF0dXMoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKIHsKIAogCWlmIChwYnBjdGxfZGV2LT5icF9jYXBzICYgU1dfQ1RMX0NBUCkgewpAQCAtMzkzMCw3ICszNjg2LDcgQEAKIH0KIAogCi1pbnQgc3RkX25pY19zdGF0dXMoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKK3N0YXRpYyBpbnQgc3RkX25pY19zdGF0dXMoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKIHsKIAlpbnQgc3RhdHVzX3ZhbCA9IDA7CiAKQEAgLTM5NzgsNyArMzczNCw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoqKioqKioqKioqKioqU1dfSU5JVCoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIGJ5cGFzc19jYXBzX2luaXQoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKK3N0YXRpYyB2b2lkIGJ5cGFzc19jYXBzX2luaXQoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKIHsKIAl1X2ludDMyX3QgY3RybF9leHQgPSAwOwogCXN0cnVjdCBicGN0bF9kZXYgKnBicGN0bF9kZXZfbSA9IE5VTEw7CkBAIC00MTk2LDIzICszOTUyLDcgQEAKIAl9CiB9CiAKLWludCBieXBhc3Nfb2ZmX2luaXQoc3RydWN0IGJwY3RsX2RldiAqcGJwY3RsX2RldikKLXsKLQlpbnQgcmV0ID0gY21uZF9vbihwYnBjdGxfZGV2KTsKLQlpZiAocmV0IDwgMCkKLQkJcmV0dXJuIHJldDsKLQlpZiAoSU5URUxfSUZfU0VSSUVTK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gLSBvbiBzdWNjZXNzCisgKiAtMSAtIG9uIGZhaWx1cmUgKGRldmljZSBpcyBub3QgY2FwYWJsZSBvZiB0aGUgb3BlcmF0aW9uIG9yIGRldmljZSBub3Qgc3VwcG9ydAorICogICAgICAgICAgICAgICAgICBCeXBhc3Mgb3IgaXQncyBhIHNsYXZlIGRldmljZSkKICAqKi8KIGludCBzZXRfYnlwYXNzX3dkX3NkKGludCBpZl9pbmRleCwgaW50IG1zX3RpbWVvdXQsIGludCAqbXNfdGltZW91dF9zZXQpOwogCiAvKioKICAqIGdldF9ieXBhc3Nfd2QgLSBHZXQgd2F0Y2hkb2cgc3RhdGUKICAqIEBpZl9pbmRleDogbmV0d29yayBkZXZpY2UgaW5kZXggb2YgdGhlIGNvbnRyb2xsaW5nIGRldmljZQotICogQG1zX3RpbWVvdXQgKG91dHB1dCk6IFdEVCB0aW1lb3V0IChpbiBtcyB1bml0cyksIAorICogQG1zX3RpbWVvdXQgKG91dHB1dCk6IFdEVCB0aW1lb3V0IChpbiBtcyB1bml0cyksCiAgKiAgICAgICAgICAgICAgICAgICAgICAgLTEgZm9yIHVua25vd24gd2R0IHN0YXR1cwogICogICAgICAgICAgICAgICAgICAgICAgICAwIGlmIFdEVCBpcyBkaXNhYmxlZAogICogT3V0cHV0OgogICogMCAgLSBvbiBzdWNjZXNzCi0gKiAtMSAtIG9uIGZhaWx1cmUgKGRldmljZSBpcyBub3QgY2FwYWJsZSBvZiB0aGUgb3BlcmF0aW9uIG9yZGV2aWNlIG5vdCBzdXBwb3J0IEJ5cGFzcyAKLSAqICAgICAgICAgICAgICAgICAgb3IgaXQncyBhIHNsYXZlIGRldmljZSkgCisgKiAtMSAtIG9uIGZhaWx1cmUgKGRldmljZSBpcyBub3QgY2FwYWJsZSBvZiB0aGUgb3BlcmF0aW9uIG9yIGRldmljZSBub3Qgc3VwcG9ydAorICogICAgICAgICAgICAgICAgICBCeXBhc3Mgb3IgaXQncyBhIHNsYXZlIGRldmljZSkKICAqKi8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Y2gsIEluYy4iOwogCkBAIC0xNDQsMjkgKzE0NCw2IEBACiAKIE1PRFVMRV9ERVZJQ0VfVEFCTEUocGNpLCBzbGljX3BjaV90YmwpOwogCi0jZGVmaW5lIFNMSUNfR0VUX1NMSUNfSEFORExFKF9hZGFwdGVyLCBfcHNsaWNfaGFuZGxlKSAgICAgICAgICAgICAgICAgICBcCi17ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0Jc3Bpbl9sb2NrX2lycXNhdmUoJl9hZGFwdGVyLT5oYW5kbGVfbG9jay5sb2NrLCAgICAgICAgICAgICAgICAgIFwKLQkJCV9hZGFwdGVyLT5oYW5kbGVfbG9jay5mbGFncyk7ICAgICAgICAgICAgICAgICAgIFwKLQlfcHNsaWNfaGFuZGxlICA9ICBfYWRhcHRlci0+cGZyZWVfc2xpY19oYW5kbGVzOyAgICAgICAgICAgICAgICAgXAotCWlmIChfcHNsaWNfaGFuZGxlKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCV9hZGFwdGVyLT5wZnJlZV9zbGljX2hhbmRsZXMgPSBfcHNsaWNfaGFuZGxlLT5uZXh0OyAgICAgXAotCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0Jc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmX2FkYXB0ZXItPmhhbmRsZV9sb2NrLmxvY2ssICAgICAgICAgICAgIFwKLQkJCV9hZGFwdGVyLT5oYW5kbGVfbG9jay5mbGFncyk7ICAgICAgICAgICAgICAgICAgIFwKLX0KLQotI2RlZmluZSBTTElDX0ZSRUVfU0xJQ19IQU5ETEUoX2FkYXB0ZXIsIF9wc2xpY19oYW5kbGUpICAgICAgICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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SAxXSA9ICdcMCc7CisJcmV0dXJuIHM7Cit9CisKKy8qIENPTlNPTEUgKi8KKworI2RlZmluZSBTVUJTWVNfQ09OU09MRV9WSURFTyAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAxKQkvKiAxNyAqLworI2RlZmluZSBTVUJTWVNfQ09OU09MRV9LQkRNT1UgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAyKQkvKiAxOCAqLworI2RlZmluZSBTVUJTWVNfQ09OU09MRV8wNCAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyA0KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8wNSAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyA1KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8wNiAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyA2KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8wNyAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyA3KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8wOCAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyA4KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8wOSAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyA5KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8xMCAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAxMCkKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMTEgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMTEpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzEyICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDEyKQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8xMyAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAxMykKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMTQgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMTQpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzE1ICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDE1KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8xNiAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAxNikKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMTcgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMTcpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzE4ICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDE4KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8xOSAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAxOSkKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMjAgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMjApCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzIxICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDIxKQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8yMiAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAyMikKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMjMgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMjMpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzI0ICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDI0KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8yNSAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAyNSkKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMjYgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMjYpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzI3ICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDI3KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8yOCAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAyOCkKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMjkgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMjkpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzMwICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDMwKQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8zMSAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAzMSkKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMzIgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMzIpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzMzICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDMzKQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8zNCAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAzNCkKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMzUgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMzUpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzM2ICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDM2KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV8zNyAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyAzNykKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfMzggICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgMzgpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzM5ICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCArIDM5KQorI2RlZmluZSBTVUJTWVNfQ09OU09MRV80MCAgICAgICAgICAgKFNVQlNZU19BUFBPU19NQVggKyA0MCkKKyNkZWZpbmUgU1VCU1lTX0NPTlNPTEVfNDEgICAgICAgICAgIChTVUJTWVNfQVBQT1NfTUFYICsgNDEpCisjZGVmaW5lIFNVQlNZU19DT05TT0xFXzQyICAgICAgICAgICAoU1VCU1lTX0FQUE9TX01BWCAr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mICghcCkKKwkJcmV0dXJuIGd1aWQ7CisJaWYgKCpwID09ICd7JykgeworCQlwKys7CisJCWJyYWNlID0gMTsKKwl9CisJd2hpbGUgKGNvdW50IDwgMzIpIHsKKwkJaWYgKCpwID09ICd9JykKKwkJCXJldHVybiBndWlkOworCQlpZiAoKnAgPT0gJ1wwJykKKwkJCXJldHVybiBndWlkOworCQljID0gdG91cHBlcigqcCk7CisJCXArKzsKKwkJaWYgKGMgPT0gJy0nKSB7CisJCQlzd2l0Y2ggKGRhc2hjb3VudCkgeworCQkJY2FzZSAwOgorCQkJCWlmIChpICE9IDgpCisJCQkJCXJldHVybiBndWlkOworCQkJCWJyZWFrOworCQkJY2FzZSAxOgorCQkJCWlmIChpICE9IDQpCisJCQkJCXJldHVybiBndWlkOworCQkJCWJyZWFrOworCQkJY2FzZSAyOgorCQkJCWlmIChpICE9IDQpCisJCQkJCXJldHVybiBndWlkOworCQkJCWJyZWFrOworCQkJY2FzZSAzOgorCQkJCWlmIChpICE9IDQpCisJCQkJCXJldHVybiBndWlkOworCQkJCWJyZWFrOworCQkJZGVmYXVsdDoKKwkJCQlyZXR1cm4gZ3VpZDsKKwkJCX0KKwkJCWRhc2hjb3VudCsrOworCQkJaSA9IDA7CisJCQljb250aW51ZTsKKwkJfQorCQlpZiAoKGMgPj0gJzAnICYmIGMgPD0gJzknKSB8fCAoYyA+PSAnQScgJiYgYyA8PSAnRicpKQorCQkJaSsrOworCQllbHNlCisJCQlyZXR1cm4gZ3VpZDsKKwkJeFtjb3VudCsrXSA9IGM7CisJfQorCXhbY291bnRdID0gJ1wwJzsKKwlpZiAoYnJhY2UpIHsKKwkJaWYgKCpwID09ICd9JykKKwkJCXArKzsKKwkJZWxzZQorCQkJcmV0dXJuIGd1aWQ7CisJfQorCWlmIChkYXNoY291bnQgPT0gMyB8fCBkYXNoY291bnQgPT0gNCkKKwkJOworCWVsc2UKKwkJcmV0dXJuIGd1aWQ7CisJbWVtc2V0KGNkYXRhMSwgMCwgc2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5zaWcxID09IHNpemVvZihQUklWQVRFREVWSUNFREFUQSkpICYmCVwKKwkJICgoZGQpLT5zaWcyID09IGRkKSkKKworLyoqIFZlcmlmaWVzIHRoZSBjb25zaXN0ZW5jeSBvZiB5b3VyIFBSSVZBVEVGSUxFREFUQSBzdHJ1Y3R1cmUgdXNpbmcKKyAqICBjb252ZW50aW9uYWwgInNpZ25hdHVyZSIgZmllbGRzOgorICogIDxwPgorICogIC0gc2lnMSBzaG91bGQgY29udGFpbiB0aGUgc2l6ZSBvZiB0aGUgc3RydWN0dXJlCisgKiAgLSBzaWcyIHNob3VsZCBjb250YWluIGEgcG9pbnRlciB0byB0aGUgYmVnaW5uaW5nIG9mIHRoZSBzdHJ1Y3R1cmUKKyAqLworI2RlZmluZSBGRExPT0tTVkFMSUQoZmQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkoKGZkICE9IE5VTEwpICAgICAgICAgICAgICAgICAgICAgICAgICAgJiYgICAgIFwKKwkgKChmZCktPnNpZzEgPT0gc2l6ZW9mKFBSSVZBVEVGSUxFREFUQSkpICYmICAgIFwKKwkgKChmZCktPnNpZzIgPT0gZmQpKQorCisvKiogTG9ja3MgZGQtPmxvY2tEZXYgaWYgeW91IGhhdm4ndCBhbHJlYWR5IGxvY2tlZCBpdCAqLworI2RlZmluZSBMT0NLREVWKGRkKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlpZiAoIWxvY2tlZERldikgewkJCQkgICAgICAgXAorCQkJc3Bpbl9sb2NrKCZkZC0+bG9ja0Rldik7CQkgICAgICAgXAorCQkJbG9ja2VkRGV2ID0gVFJVRTsJCQkgICAgICAgXAorCQl9CQkJCQkJICAgICAgIFwKKwl9CisKKy8qKiBVbmxvY2tzIGRkLT5sb2NrRGV2IGlmIHlvdSBwcmV2aW91c2x5IGxvY2tlZCBpdCAqLworI2RlZmluZSBVTkxPQ0tERVYoZGQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlpZiAobG9ja2VkRGV2KSB7CQkJCSAgICAgICBcCisJCQlzcGluX3VubG9jaygmZGQtPmxvY2tEZXYpOwkJICAgICAgIFwKKwkJCWxvY2tlZERldiA9IEZBTFNFOwkJCSAgICAgICBcCisJCX0JCQkJCQkgICAgICAgXAorCX0KKworLyoqIExvY2tzIGRkLT5sb2NrRGV2SVNSIGlmIHlvdSBoYXZuJ3QgYWxyZWFkeSBsb2NrZWQgaXQgKi8KKyNkZWZpbmUgTE9DS0RFVklTUihkZCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJaWYgKCFsb2NrZWREZXZJU1IpIHsJCQkJICAgICAgIFwKKwkJCXNwaW5fbG9ja19pcnFzYXZlKCZkZC0+bG9ja0RldklTUiwgZmxhZ3MpOyAgICAgXAorCQkJbG9ja2VkRGV2SVNSID0gVFJVRTsJCQkgICAgICAgXAorCQl9CQkJCQkJICAgICAgIFwKKwl9CisKKy8qKiBVbmxvY2tzIGRkLT5sb2NrRGV2SVNSIGlmIHlvdSBwcmV2aW91c2x5IGxvY2tlZCBpdCAqLworI2RlZmluZSBVTkxPQ0tERVZJU1IoZGQpCQkJCQkJXAorCXsJCQkJCQkJCVwKKwkJaWYgKGxvY2tlZERldklTUikgewkJCQkJXAorCQkJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmZGQtPmxvY2tEZXZJU1IsIGZsYWdzKTsgXAorCQkJbG9ja2VkRGV2SVNSID0gRkFMU0U7CQkJCVwKKwkJfQkJCQkJCQlcCisJfQorCisvKiogTG9ja3MgTG9ja0dsb2JhbElTUiBpZiB5b3UgaGF2bid0IGFscmVhZHkgbG9ja2VkIGl0ICovCisjZGVmaW5lIExPQ0tHTE9CQUxJU1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWlmICghbG9ja2VkR2xvYmFsSVNSKSB7CQkJCSAgICAgICBcCisJCQlzcGluX2xvY2tfaXJxc2F2ZSgmTG9ja0dsb2JhbElTUiwgZmxhZ3MpOyAgICAgIFwKKwkJCWxvY2tlZEdsb2JhbElTUiA9IFRSVUU7CQkJICAgICAgIFwKKwkJfQkJCQkJCSAgICAgICBcCisJfQorCisvKiogVW5sb2NrcyBMb2NrR2xvYmFsSVNSIGlmIHlvdSBwcmV2aW91c2x5IGxvY2tlZCBpdCAqLworI2RlZmluZSBVTkxPQ0tHTE9CQUxJU1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlpZiAobG9ja2VkR2xvYmFsSVNSKSB7CQkJCSAgICAgICBcCisJCQlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZMb2NrR2xvYmFsSVNSLCBmbGFncyk7IFwKKwkJCWxvY2tlZEdsb2JhbElTUiA9IEZBTFNFOwkJICAgICAgIFwKKwkJfQkJCQkJCSAgICAgICBcCisJfQorCisvKiogTG9ja3MgTG9ja0dsb2JhbCBpZiB5b3UgaGF2bid0IGFscmVhZHkgbG9ja2VkIGl0ICovCisjZGVmaW5lIExPQ0tHTE9CQUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWlmICghbG9ja2VkR2xvYmFsKSB7CQkJCSAgICAgICBcCisJCQlzcGluX2xvY2soJkxvY2tHbG9iYWwpOwkJCSAgICAgICBcCisJCQlsb2NrZWRHbG9iYWwgPSBUUlVFOwkJCSAgICAgICBcCisJCX0JCQkJCQkgICAgICAgXAorCX0KKworLyoqIFVubG9ja3MgTG9ja0dsb2JhbCBpZiB5b3UgcHJldmlvdXNseSBsb2NrZWQgaXQgKi8KKyNkZWZpbmUgVU5MT0NLR0xPQkFMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkJaWYgKGxvY2tlZEdsb2JhbCkgewkJCQkgICAgICAgXAorCQkJc3Bpbl91bmxvY2soJkxvY2tHbG9iYWwpOwkJICAgICAgIFwKKwkJCWxvY2tlZEdsb2JhbCA9IEZBTFNFOwkJCSAgICAgICBcCisJCX0JCQkJCQkgICAgICAgXAorCX0KKworLyoqIFVzZSB0aGlzIGF0IHRoZSBiZWdpbm5pbmcgb2YgZnVuY3Rpb25zIHdoZXJlIHlvdSBpbnRlbmQgdG8KKyAqICB1c2UgI0xPQ0tERVYvI1VOTE9DS0RFViwgI0xPQ0tERVZJU1IvI1VOTE9DS0RFVklTUiwKKyAqICAjTE9DS0dMT0JBTC8jVU5MT0NLR0xPQkFMLCAjTE9DS0dMT0JBTElTUi8jVU5MT0NLR0xPQkFMSVNSLgorICoKKyAqICBOb3RlIHRoYXQgX19hdHRyaWJ1dGVfXygodW51c2VkKSkgaXMgaG93IHlvdSB0ZWxsIEdOVSBDIHRvIHN1cHByZXNzCisgKiAgYW55IHdhcm5pbmcgbWVzc2FnZXMgYWJvdXQgdGhlIHZhcmlhYmxlIGJlaW5nIHVudXNlZC4KKyAqL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GhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yIChhdAorICogeW91ciBvcHRpb24pIGFueSBsYXRlciB2ZXJzaW9uLgorICoKKyAqIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCBidXQKKyAqIFdJVEhPVVQgQU5ZIFdBUlJBTlRZOyB3aXRob3V0IGV2ZW4gdGhlIGltcGxpZWQgd2FycmFudHkgb2YKKyAqIE1FUkNIQU5UQUJJTElUWSBPUiBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRSwgR09PRCBUSVRMRSBvcgorICogTk9OIElORlJJTkdFTUVOVC4gIFNlZSB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgZm9yIG1vcmUKKyAqIGRldGFpbHMuCisgKi8KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogVW5pc3lzIHRocmVhZCB1dGlsaXRpZXMgaGVhZGVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisKKyNpZm5kZWYgX19VSVNUSFJFQURfSF9fCisjZGVmaW5lIF9fVUlTVEhSRUFEX0hfXworCisKKyNpbmNsdWRlICJsaW51eC9jb21wbGV0aW9uLmgiCisKK3N0cnVjdCB1aXN0aHJlYWRfaW5mbyB7CisJc3RydWN0IHRhc2tfc3RydWN0ICp0YXNrOworCWludCBpZDsKKwlpbnQgc2hvdWxkX3N0b3A7CisJc3RydWN0IGNvbXBsZXRpb24gaGFzX3N0b3BwZWQ7Cit9OworCisKKy8qIHJldHVybnMgMCBmb3IgZmFpbHVyZSwgMSBmb3Igc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ElTQUJMRV9QUk9DX0VOVFJZX0ZOICJzd2l0Y2hfc3RhdGUiCisjaWZkZWYgVUlTTElCX1RFU1RfUFJPQworc3RhdGljIHN0cnVjdCBwcm9jX2Rpcl9lbnRyeSAqdGVzdF9wcm9jX2VudHJ5OworI2RlZmluZSBURVNUX1BST0NfRU5UUllfRk4gInRlc3QiCisjZW5kaWYKK3N0YXRpYyB1bnNpZ25lZCBsb25nIGxvbmcgY3ljbGVzX2JlZm9yZV93YWl0LCB3YWl0X2N5Y2xlczsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogbG9jYWwgZnVuY3Rpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50IHByb2NfaW5mb192YnVzX3Nob3coc3RydWN0IHNlcV9maWxlICptLCB2b2lkICp2KTsKK3N0YXRpYyBpbnQKK3Byb2NfaW5mb192YnVzX29wZW4oc3RydWN0IGlub2RlICppbm9kZSwgc3RydWN0IGZpbGUgKmZpbHApCit7CisJLyogcHJvY19pbmZvX3ZidXNfc2hvdyB3aWxsIGdyYWIgdGhpcyBmcm9tIHNlcV9maWxlLnByaXZhdGU6ICovCisJc3RydWN0IGJ1c19pbmZvICpidXMgPSBQREVfREFUQShpbm9kZSk7CisJcmV0dXJuIHNpbmdsZV9vcGVuKGZpbHAsIHByb2NfaW5mb192YnVzX3Nob3csIGJ1cyk7Cit9CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgZmlsZV9vcGVyYXRpb25zIHByb2NfaW5mb192YnVzX2ZvcHMgPSB7CisJLm9wZW4gPSBwcm9jX2luZm9fdmJ1c19vcGVuLAorCS5yZWFkID0gc2VxX3JlYWQsCisJLmxsc2VlayA9IHNlcV9sc2VlaywKKwkucmVsZWFzZSA9IHNpbmdsZV9yZWxlYXNlLAor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bm5lbHMsCisJCSAgICBkb193YWtldXBfcG9sbGluZ19kZXZpY2VfY2hhbm5lbHMpOworCisvKiAgQ2FsbCB0aGlzIGZ1bmN0aW9uIHdoZW4geW91IHdhbnQgdG8gc2VuZCBhIGhpbnQgdG8gUHJvY2Vzc19JbmNvbWluZygpIHRoYXQKKyAqICB5b3VyIGRldmljZSBtaWdodCBoYXZlIG1vcmUgcmVxdWVzdHMuCisgKi8KK3ZvaWQKK3Vpc2xpYl9mb3JjZV9jaGFubmVsX2ludGVycnVwdChVMzIgYnVzTm8sIFUzMiBkZXZObykKK3sKKwlpZiAoZW5fc21hcnRfd2FrZXVwID09IDApCisJCXJldHVybjsKKwlpZiAoR29fUG9sbGluZ19EZXZpY2VfQ2hhbm5lbHMpCisJCXJldHVybjsKKwkvKiBUaGUgcG9pbnQgb2YgdXNpbmcgc2NoZWR1bGVfd29yaygpIGluc3RlYWQgb2YganVzdCBkb2luZworCSAqIHRoZSB3b3JrIGlubGluZSBpcyB0byBmb3JjZSBhIHNsaWdodCBkZWxheSBiZWZvcmUgd2FraW5nIHVwCisJICogdGhlIFByb2Nlc3NfSW5jb21pbmcoKSB0aHJlYWQuCisJICovCisJdG90X3dha2V1cF9jbnQrKzsKKwlzY2hlZHVsZV93b3JrKCZXb3JrX3dha2V1cF9wb2xsaW5nX2RldmljZV9jaGFubmVscyk7Cit9CitFWFBPUlRfU1lNQk9MX0dQTCh1aXNsaWJfZm9yY2VfY2hhbm5lbF9pbnRlcnJ1cHQpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBNb2R1bGUgSW5pdCAmIEV4aXQgZnVuY3Rpb25zICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgX19pbml0Cit1aXNsaWJfbW9kX2luaXQodm9pZCkKK3sKKworCUxPR0lORigi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KKyNpbmNsdWRlIDxsaW51eC9zaWduYWwuaD4KKyNpbmNsdWRlIDxsaW51eC9zY2hlZC5oPgorI2luY2x1ZGUgPGxpbnV4L2t0aHJlYWQuaD4KKyNpbmNsdWRlICJ1bmlrbG9nLmgiCisjaW5jbHVkZSAidWlzdXRpbHMuaCIKKyNpbmNsdWRlICJ1aXN0aHJlYWQuaCIKKworI2RlZmluZSBLSUxMKGEsIGIsIGMpIGtpbGxfcGlkKGZpbmRfdnBpZChhKSwgYiwgYykKKworLyogdGhpcyBpcyBzaG9ydGVyIHRoYW4gdXNpbmcgX19GSUxFX18gKGZ1bGwgcGF0aCBuYW1lKSBpbgorICogZGVidWcvaW5mby9lcnJvciBtZXNzYWdlcworICovCisjZGVmaW5lIENVUlJFTlRfRklMRV9QQyBVSVNMSUJfUENfdWlzdGhyZWFkX2MKKyNkZWZpbmUgX19NWUZJTEVfXyAidWlzdGhyZWFkLmMiCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIEV4cG9ydGVkIGZ1bmN0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogcmV0dXJucyAwIGZvciBmYWlsdXJlLCAxIGZvciBzdWNjZXNzICovCitpbnQKK3Vpc3RocmVhZF9zdGFydChzdHJ1Y3QgdWlzdGhyZWFkX2luZm8gKnRocmluZm8sCisJCWludCAoKnRocmVhZGZuKSh2b2lkICopLCB2b2lkICp0aHJjb250ZXh0LCBjaGFyICpuYW1lKQoreworCXRocmluZm8tPnNob3VsZF9zdG9wID0gMDsKKwkvKiB1c2VkIHRvIHN0b3AgdGhlIHRocmVhZCAqLworCWluaXRfY29tcGxldGlvbigmdGhyaW5mby0+aGFzX3N0b3BwZWQpOworCXRocmluZm8tPnRhc2sgPSBrdGhyZWFkX2NyZWF0ZSh0a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udW0gcmVnaXN0cmF0aW9ucyB2aWEKKwkJCQkJICogdWlzY3RybF9yZWdpc3Rlcl9yZXFfaGFuZGxlcigpIG9yCisJCQkJCSAqIHVpc2N0cmxfcmVnaXN0ZXJfcmVxX2hhbmRsZXJfZXgoKSAqLworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIFV0aWxpdHkgZnVuY3Rpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworaW50Cit1aXN1dGlsX2FkZF9wcm9jX2xpbmVfZXgoaW50ICp0b3RhbCwgY2hhciAqKmJ1ZmZlciwgaW50ICpidWZmZXJfcmVtYWluaW5nLAorCQkgICAgICBjaGFyICpmb3JtYXQsIC4uLikKK3sKKwl2YV9saXN0IGFyZ3M7CisJaW50IGxlbjsKKworCURCR0lORigiYnVmZmVyID0gMHglcCA6ICpidWZmZXIgPSAweCVwLlxuIiwgYnVmZmVyLCAqYnVmZmVyKTsKKwl2YV9zdGFydChhcmdzLCBmb3JtYXQpOworCWxlbiA9IHZzbnByaW50ZigqYnVmZmVyLCAqYnVmZmVyX3JlbWFpbmluZywgZm9ybWF0LCBhcmdzKTsKKwlpZiAobGVuID49ICpidWZmZXJfcmVtYWluaW5nKSB7CisJCSpidWZmZXIgKz0gKmJ1ZmZlcl9yZW1haW5pbmc7CisJCSp0b3RhbCArPSAqYnVmZmVyX3JlbWFpbmluZzsKKwkJKmJ1ZmZlcl9yZW1haW5pbmcgPSAwOworCQlMT0dFUlIoImJ5dGVzIHJlbWFpbmluZyBpcyB0b28gc21hbGwhXG4iKTsKKwkJcmV0dXJuIC0xOworCX0KKwkqYnVmZmVyX3JlbWFpbmluZyAtPSBsZW47CisJKmJ1ZmZlciArPSBsZW47CisJKnRvdGFsICs9IGxlbjsKKwlyZXR1cm4gbGVuOworf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jaV9kZXYgKnZpcnRwY2lkZXYpOworc3RhdGljIGludCB2aXJ0aGJhX3NlcnZlcmRvd24oc3RydWN0IHZpcnRwY2lfZGV2ICp2aXJ0cGNpZGV2LCB1MzIgc3RhdGUpOworc3RhdGljIHZvaWQgZG9EaXNrQWRkUmVtb3ZlKHN0cnVjdCB3b3JrX3N0cnVjdCAqd29yayk7CitzdGF0aWMgdm9pZCB2aXJ0aGJhX3NlcnZlcmRvd25fY29tcGxldGUoc3RydWN0IHdvcmtfc3RydWN0ICp3b3JrKTsKKworc3RhdGljIHNzaXplX3QgaW5mb19wcm9jX3JlYWQoc3RydWN0IGZpbGUgKmZpbGUsIGNoYXIgX191c2VyICpidWYsCisJCQkgICAgICBzaXplX3QgbGVuLCBsb2ZmX3QgKm9mZnNldCk7CitzdGF0aWMgc3NpemVfdCBycXd1X3Byb2Nfd3JpdGUoc3RydWN0IGZpbGUgKmZpbGUsIGNvbnN0IGNoYXIgX191c2VyICpidWZmZXIsCisJCQkgICAgICAgc2l6ZV90IGNvdW50LCBsb2ZmX3QgKnBwb3MpOworc3RhdGljIHNzaXplX3QgZW5hYmxlX2ludHNfcmVhZChzdHJ1Y3QgZmlsZSAqZmlsZSwgY2hhciBfX3VzZXIgKmJ1ZmZlciwKKwkJCQlzaXplX3QgY291bnQsIGxvZmZfdCAqcHBvcyk7CitzdGF0aWMgc3NpemVfdCBlbmFibGVfaW50c193cml0ZShzdHJ1Y3QgZmlsZSAqZmlsZSwgY29uc3QgY2hhciBfX3VzZXIgKmJ1ZmZlciwKKwkJCQkgc2l6ZV90IGNvdW50LCBsb2ZmX3QgKnBwb3MpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBHbG9iYWxzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRp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NpX2RldmljZSAqc2RldjsKKwlpbnQgZXJyb3I7CisKKwlzZGV2ID0gc2NzaV9kZXZpY2VfbG9va3VwKGRhci0+c2hvc3QsIGRhci0+Y2hhbm5lbCwgZGFyLT5pZCwgZGFyLT5sdW4pOworCWlmIChzZGV2KSB7CisJCWlmICghKGRhci0+YWRkKSkKKwkJCXNjc2lfcmVtb3ZlX2RldmljZShzZGV2KTsKKwl9IGVsc2UgaWYgKGRhci0+YWRkKSB7CisJCWVycm9yID0KKwkJICAgIHNjc2lfYWRkX2RldmljZShkYXItPnNob3N0LCBkYXItPmNoYW5uZWwsIGRhci0+aWQsCisJCQkJICAgIGRhci0+bHVuKTsKKwkJaWYgKGVycm9yKQorCQkJTE9HRVJSKCJGYWlsZWQgc2NzaV9hZGRfZGV2aWNlOiBob3N0X25vPSVkW2NoYW49JWQ6aWQ9JWQ6bHVuPSVkXVxuIiwKKwkJCSAgICAgZGFyLT5zaG9zdC0+aG9zdF9ubywgZGFyLT5jaGFubmVsLCBkYXItPmlkLAorCQkJICAgICBkYXItPmx1bik7CisJfSBlbHNlCisJCUxPR0VSUigiRmFpbGVkIHNjc2lfZGV2aWNlX2xvb2t1cDpbY2hhbj0lZDppZD0lZDpsdW49JWRdXG4iLAorCQkgICAgICAgZGFyLT5jaGFubmVsLCBkYXItPmlkLCBkYXItPmx1bik7CisJa2ZyZWUoZGFyKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogREFSV29ya1EgSGFuZGxlciBUaHJlYWQgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQKK2RvRGlza0FkZFJlbW92ZShzdHJ1Y3Qgd29ya19zdHJ1Y3QgKndvcmspCit7CisJc3RydWN0IGRpc2thZGRyZW1vdmUgKmRhcjsKKwlzdHJ1Y3QgZGlza2FkZHJlbW92ZSAqdG1waGVhZDsKKwlpbnQgaSA9IDA7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKworCXNwaW5fbG9ja19pcnFzYXZlKCZEQVJXb3JrUUxvY2ssIGZsYWdzKTsKKwl0bXBoZWFkID0gREFSV29ya1FIZWFkOworCURBUldvcmtRSGVhZCA9IE5VTEw7CisJREFSV29ya1FTY2hlZCA9IDA7CisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmREFSV29ya1FMb2NrLCBmbGFncyk7CisJd2hpbGUgKHRtcGhlYWQpIHsKKwkJZGFyID0gdG1waGVhZDsKKwkJdG1waGVhZCA9IGRhci0+bmV4dDsKKwkJU2VuZERpc2tBZGRSZW1vdmUoZGFyKTsKKwkJaSsrOworCX0KK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogUm91dGluZSB0byBhZGQgZW50cnkgdG8gREFSV29ya1EgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIHZvaWQKK3Byb2Nlc3NfZGlza19ub3RpZnkoc3RydWN0IFNjc2lfSG9zdCAqc2hvc3QsIHN0cnVjdCB1aXNjbWRyc3AgKmNtZHJzcCkKK3sKKwlzdHJ1Y3QgZGlza2FkZHJlbW92ZSAqZGFyOworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisKKwlkYXIgPSBremFsbG9jKHNpemVvZihzdHJ1Y3QgZGlza2FkZHJlbW92ZSksIEdGUF9BVE9NSUMpOworCWlmIChkYXIpIHsKKwkJZGFyLT5hZGQgPSBjbWRyc3AtPmRpc2tub3RpZnkuYWRkOworCQlkYXItPnNob3N0ID0gc2hvc3Q7CisJCWRhci0+Y2hhbm5lbCA9IGNtZHJzcC0+ZGlza25vdGlmeS5jaGFubmVsOworCQlkYXItPmlkID0gY21kcnNwLT5kaXNrbm90aWZ5LmlkOworCQlkYXItPmx1biA9IGNtZHJzcC0+ZGlza25vdGlmeS5sdW47CisJCVFVRVVFX0RJU0tBRERSRU1PVkUoZGFyKTsKKwl9IGVsc2UgeworCQlMT0dFUlIoImttYWxsb2MgZmFpbGVkIGZvciBkYXIuIGhvc3Rfbm89JWRbY2hhbj0lZDppZD0lZDpsdW49JWRdXG4iLAorCQkgICAgIHNob3N0LT5ob3N0X25vLCBjbWRyc3AtPmRpc2tub3RpZnkuY2hhbm5lbCwKKwkJICAgICBjbWRyc3AtPmRpc2tub3RpZnkuaWQsIGNtZHJzcC0+ZGlza25vdGlmeS5sdW4pOworCX0KK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogUHJvYmUgUmVtb3ZlIEZ1bmN0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGlycXJldHVybl90Cit2aXJ0aGJhX0lTUihpbnQgaXJxLCB2b2lkICpkZXZfaWQpCit7CisJc3RydWN0IHZpcnRoYmFfaW5mbyAqdmlydGhiYWluZm8gPSAoc3RydWN0IHZpcnRoYmFfaW5mbyAqKSBkZXZfaWQ7CisJQ0hBTk5FTF9IRUFERVIgX19pb21lbSAqcENoYW5uZWxIZWFkZXI7CisJU0lHTkFMX1FVRVVFX0hFQURFUiBfX2lvbWVtICpwcWhkcjsKKwlVNjQgbWFzazsKKwl1bnNpZ25lZCBsb25nIGxvbmcgcmMxOworCisJaWYgKHZpcnRoYmFpbmZvID09IE5VTEwpCisJCXJldHVybiBJUlFfTk9ORTsKKwl2aXJ0aGJhaW5mby0+aW50ZXJydXB0c19yY3ZkKys7CisJcENoYW5uZWxIZWFkZXIgPSB2aXJ0aGJhaW5mby0+Y2hpbmZvLnF1ZXVlaW5mby0+Y2hhbjsKKwlpZiAoKChyZWFkcSgmcENoYW5uZWxIZ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SByZWNlaXZlZC4iKTsKKworCXJldHVybiAxOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBNb2R1bGUgSW5pdCAmIEV4aXQgZnVuY3Rpb25zICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgX19pbml0Cit2aXJ0aGJhX3BhcnNlX2xpbmUoY2hhciAqc3RyKQoreworCURCR0lORigiSW4gdmlydGhiYV9wYXJzZV9saW5lICVzXG4iLCBzdHIpOworCXJldHVybiAxOworfQorCitzdGF0aWMgdm9pZCBfX2luaXQKK3ZpcnRoYmFfcGFyc2Vfb3B0aW9ucyhjaGFyICpsaW5lKQoreworCWNoYXIgKm5leHQgPSBsaW5lOworCisJUE9TVENPREVfTElOVVhfMihWSEJBX0NSRUFURV9FTlRSWV9QQywgUE9TVENPREVfU0VWRVJJVFlfSU5GTyk7CisJaWYgKGxpbmUgPT0gTlVMTCB8fCAhKmxpbmUpCisJCXJldHVybjsKKwl3aGlsZSAoKGxpbmUgPSBuZXh0KSAhPSBOVUxMKSB7CisJCW5leHQgPSBzdHJjaHIobGluZSwgJyAnKTsKKwkJaWYgKG5leHQgIT0gTlVMTCkKKwkJCSpuZXh0KysgPSAwOworCQlpZiAoIXZpcnRoYmFfcGFyc2VfbGluZShsaW5lKSkKKwkJCURCR0lORigiVW5rbm93biBvcHRpb24gJyVzJ1xuIiwgbGluZSk7CisJfQorCisJUE9TVENPREVfTElOVVhfMihWSEJBX0NSRUFURV9FWElUX1BDLCBQT1NUQ09ERV9TRVZFUklUWV9JTkZPKTsKK30KKworc3RhdGljIGludCBfX2luaXQKK3ZpcnRoYmFfbW9kX2luaXQodm9pZCkKK3sKKwlpbnQgZXJyb3I7CisJaW50IGk7CisKKwlMT0dJTkYoIkVudGVyaW5nIHZpcnRoYmFfbW9kX2luaXQ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MDEuMDAiCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIEZvcndhcmQgZGVjbGFyYXRpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIGludCBkZWxldGVfdmJ1c19kZXZpY2Uoc3RydWN0IGRldmljZSAqdmJ1cywgdm9pZCAqZGF0YSk7CitzdGF0aWMgaW50IG1hdGNoX2J1c2lkKHN0cnVjdCBkZXZpY2UgKmRldiwgdm9pZCAqZGF0YSk7CitzdGF0aWMgdm9pZCB2aXJ0cGNpX2J1c19yZWxlYXNlKHN0cnVjdCBkZXZpY2UgKmRldik7CitzdGF0aWMgdm9pZCB2aXJ0cGNpX2RldmljZV9yZWxlYXNlKHN0cnVjdCBkZXZpY2UgKmRldik7CitzdGF0aWMgaW50IHZpcnRwY2lfZGV2aWNlX2FkZChzdHJ1Y3QgZGV2aWNlICpwYXJlbnRidXMsIGludCBkZXZ0eXBlLAorCQkJICAgICAgc3RydWN0IGFkZF92aXJ0X2d1ZXN0cGFydCAqYWRkcGFyYW1zLAorCQkJICAgICAgc3RydWN0IHNjc2lfYWRhcF9pbmZvICpzY3NpLAorCQkJICAgICAgc3RydWN0IG5ldF9hZGFwX2luZm8gKm5ldCk7CitzdGF0aWMgaW50IHZpcnRwY2lfZGV2aWNlX2RlbChzdHJ1Y3QgZGV2aWNlICpwYXJlbnRidXMsIGludCBkZXZ0eXBlLAorCQkJICAgICAgc3RydWN0IHZoYmFfd3dubiAqd3dubiwgdW5zaWduZWQgY2hhciBtYWNhZGRyW10pOworc3RhdGljIGludCB2aXJ0cGNpX2RldmljZV9zZXJ2ZXJkb3duKHN0cnVjdCBkZXZpY2UgKnBhcmVudGJ1cywgaW50IGRldnR5cGUsCisJCQkJICAgICBzdHJ1Y3QgdmhiYV93d25uICp3d25uL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HJpdmVyOworCUxPR0lORigiSW4gdmlydHBjaV9kZXZpY2VfcmVtb3ZlIGJ1c19pZDolcyBkZXZfOiVwIHZpcnRwY2lkZXY6JXAgZGV2LT5kcml2ZXI6JXAgZHJpdmVybmFtZTolc1xuIiwKKwkgICAgICAgQlVTX0lEKGRldl8pLCBkZXZfLCB2aXJ0cGNpZGV2LCBkZXZfLT5kcml2ZXIsCisJICAgICAgIGRldl8tPmRyaXZlci0+bmFtZSk7CS8qIFZFUkJPU0UvREVCVUcgKi8KKwlpZiAodmlydHBjaWRydikgeworCQkvKiBURU1QOiBhc3N1bWluZyB3ZSBoYXZlIG9ubHkgb25lIHN1Y2ggZHJpdmVyIGZvciBub3cgKi8KKwkJaWYgKHZpcnRwY2lkcnYtPnJlbW92ZSkKKwkJCXZpcnRwY2lkcnYtPnJlbW92ZSh2aXJ0cGNpZGV2KTsKKwkJdmlydHBjaWRldi0+bXlkcml2ZXIgPSBOVUxMOworCX0KKworCURCR0lORigiY2FsbGluZyBwdXRkZXZpY2VcbiIpOworCXB1dF9kZXZpY2UoZGV2Xyk7CisKKwlEQkdJTkYoIkxlYXZpbmdcbiIpOworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBCdXMgZnVuY3Rpb25zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkIHZpcnRwY2lfYnVzX3JlbGVhc2Uoc3RydWN0IGRldmljZSAqZGV2KQoreworCS8qIHRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIHdoZW4gdGhlIGxhc3QgcmVmZXJlbmNlIHRvIHRoZQorCSAqIGRldmljZSBpcyByZW1vdmVkCisJICovCisJREJHSU5GKCJJbiB2aXJ0cGNpX2J1c19yZWxlYXNlXG4iKTsKKwkvKiB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GNpX2RldmljZV9yZW1vdmUgY2FsbHMgdmlydGhiYV9yZW1vdmUKKwkgKi8KKwlEQkdJTkYoIkxlYXZpbmdcbiIpOworfQorRVhQT1JUX1NZTUJPTF9HUEwodmlydHBjaV91bnJlZ2lzdGVyX2RyaXZlcik7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIHByb2MgZmlsZXN5c3RlbSBmdW5jdGlvbnMJCQkJCQkgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBwcmludF92YnVzX2luZm8geworCWludCAqbGVuZ3RoOworCWNoYXIgKmJ1ZjsKK307CisKK3N0YXRpYyBpbnQgcHJpbnRfdmJ1cyhzdHJ1Y3QgZGV2aWNlICp2YnVzLCB2b2lkICpkYXRhKQoreworCXN0cnVjdCBwcmludF92YnVzX2luZm8gKnAgPSAoc3RydWN0IHByaW50X3ZidXNfaW5mbyAqKSBkYXRhOworCWludCBsID0gKihwLT5sZW5ndGgpOworCisJKihwLT5sZW5ndGgpID0gbCArIHNwcmludGYocC0+YnVmICsgbCwgImJ1c19pZDolc1xuIiwgZGV2X25hbWUodmJ1cykpOworCXJldHVybiAwOwkJLyogbm8gZXJyb3IgKi8KK30KKworc3RhdGljIHNzaXplX3QgaW5mb19wcm9jX3JlYWQoc3RydWN0IGZpbGUgKmZpbGUsIGNoYXIgX191c2VyICpidWYsCisJCQkgICAgICBzaXplX3QgbGVuLCBsb2ZmX3QgKm9mZnNldCkKK3sKKwlpbnQgbGVuZ3RoID0gMDsKKwlzdHJ1Y3QgdmlydHBjaV9kZXYgKnRtcHZwY2lkZXY7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKwlzdHJ1Y3QgcHJpbnRfdmJ1c19pbmZvIHByaW50cGFyYW07CisJY2hhciAqdmJ1ZjsKKwlsb2ZmX3QgcG9zID0gKm9mZnNldDsKKworCWlm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ZHBhcmFtcykpCisJCQkJcmV0dXJuIGNvdW50OwkvKiBzdWNjZXNzICovCisJCX0KKwkJcmV0dXJuIC1FRkFVTFQ7CisjZW5kaWYKKwljYXNlIDB4ZjoKKwkJLyogZGVsZXRlIGFsbCB2aGJhcy92bmljcyAqLworCQlpID0gc3NjYW5mKGJ1ZiwgIiV4LSV4LSVkIiwgJnR5cGUsICZhY3Rpb24sICZidXNubyk7CisJCWlmIChpICE9IDMpCisJCQlicmVhazsKKwkJYnVzZGVscGFyYW1zLmJ1c05vID0gYnVzbm87CisJCWRlbGV0ZV9hbGxfdmlydCh0eXBlLCAmYnVzZGVscGFyYW1zKTsKKwkJcmV0dXJuIGNvdW50OwkvKiBzdWNjZXNzICovCisJZGVmYXVsdDoKKwkJYnJlYWs7CisJfQorCVBSSU5UX1VTQUdFX1JFVFVSTjsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogTW9kdWxlIEluaXQgJiBFeGl0IGZ1bmN0aW9ucyAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50IF9faW5pdCB2aXJ0cGNpX21vZF9pbml0KHZvaWQpCit7CisJaW50IHJldDsKKworCisJTE9HSU5GKCJNb2R1bGUgYnVpbGQ6IERhdGU6JXMgVGltZTolcy4uLlxuIiwgX19EQVRFX18sIF9fVElNRV9fKTsKKworCVBPU1RDT0RFX0xJTlVYXzIoVlBDSV9DUkVBVEVfRU5UUllfUEMsIFBPU1RDT0RFX1NFVkVSSVRZX0lORk8pOworCisJcmV0ID0gYnVzX3JlZ2lzdGVyKCZ2aXJ0cGNpX2J1c190eXBlKTsKKwkvKiBjcmVhdGVzIC9zeXMvYnVzL3Vpc3ZpcnRwY2kgd2hpY2ggY29udGFpbnMgZGV2aWNlcyAmCisJICogZHJpdmVycyBkaXJlY3RvcnkK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B0aGUgR0VURklMRSByZXF1ZXN0IHRoYXQKKyAqICAgdXBsaW5rX2luZGV4ICAgICAgICAgZGVmaW5lIHdoaWNoIGZpbGUgaXMgdG8gYmUgdHJhbnNmZXJyZWQKKyAqICAgZGlza19pbmRleAorICogICBmaWxlX25hbWUKKyAqICAgZ2V0X2NvbnRpZ3VvdXNfY29udHJvbHZtX3BheWxvYWQgIGZ1bmN0aW9uIHRvIGNhbGwgd2hlbiBzcGFjZSBpcyBuZWVkZWQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIHRoZSBwYXlsb2FkIGFyZWEKKyAqICAgY29udHJvbHZtX3Jlc3BvbmRfd2l0aF9wYXlsb2FkICAgIGZ1bmN0aW9uIHRvIGNhbGwgdG8gc2VuZCBlYWNoIGNvbnRyb2x2bQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2UgY29udGFpbmluZyBmaWxlIGRhdGEgYXMgdGhlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXlsb2FkOyByZXR1cm5zIEZBTFNFIG9ubHkgaWYgdGhlCisgKgkJCQkgICAgICAgcGF5bG9hZCBidWZmZXIgd2FzIGZyZWVkIGlubGluZQorICogICBkdW1wX2Z1bmMgICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gdG8gZHVtcCBjb250ZXh0IGRhdGEgaW4KKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGh1bWFuLXJlYWRhYmxlIGZvcm1hdAorICoKKyAqICBSZXR1cm5zIFRSVUUgaWZmIHRoZSBmaWxlIHRyYW5zZmVyIHJlcXVlc3QgaGFzIGJlZW4gc3VjY2Vzc2Z1bGx5IGluaXRpYXRlZCwKKyAqICBvciBGQUxTRSB0byBpbmRpY2F0ZSBmYWlsdXJlLgorICovCitCT09MCitmaWxleGZlcl9nZXRGaWxlKENPTlRST0xWTV9NRVNTQUdFX0hFQURFU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ZXF1ZXN0IHRoYXQKKyAqICAgdXBsaW5rX2luZGV4ICAgICAgICAgZGVmaW5lIHdoaWNoIGZpbGUgaXMgdG8gYmUgY3JlYXRlZCBpbiB0aGUgbG9jYWwKKyAqICAgZGlza19pbmRleCAgICAgICAgICAgZmlsZXN5c3RlbQorICogICBmaWxlX25hbWUKKyAqICAgaW5pdF9jb250ZXh0ICAgICAgICAgZnVuY3Rpb24gdG8gY2FsbCB0byBpbml0aWFsaXplIHRoZQorICogICAgICAgICAgICAgICAgICAgICAgICA8cmVxX2NvbnRleHRfYnl0ZXM+LXNpemVkIHN0b3JhZ2UgYXJlYSByZXR1cm5lZCBieQorICogICAgICAgICAgICAgICAgICAgICAgICB0aGlzIGZ1bmM7IG5vdGUgdGhhdCBpdCB3b3VsZCBOT1QgYmUgc3VmZmljaWVudCB0bworICogICAgICAgICAgICAgICAgICAgICAgICBhbGxvdyB0aGUgY2FsbGVyIHRvIGluaXRpYWxpemUgdGhpcyB1cG9uIHJldHVybiwgYXMKKyAqICAgICAgICAgICAgICAgICAgICAgICAgdGhlIHRoZSBvdGhlciB1c2VyLXN1cHBsaWVkIGNhbGxiYWNrcyBtaWdodCBoYXZlCisgKiAgICAgICAgICAgICAgICAgICAgICAgIGFscmVhZHkgYmVlbiBjYWxsZWQgYnkgdGhlbgorICogICBnZXRfY29udHJvbHZtX2ZpbGVkYXRhICAgZnVuY3Rpb24gdG8gY2FsbCB0byBvYnRhaW4gbW9yZSBkYXRhIGZvciB0aGUgZmlsZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgYmVpbmcgd3JpdHRlbjsgcmVmZXIgdG8gZ2V0X2NvbnRyb2x2bV9maWxlZGF0YSgpCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiB2aXNvcmNoaXBzZXRfbWFpbi5jIGZvciBhIGNvbXBsZXRlIGRlc2NyaXB0aW9uCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvZiBwYXJhbWV0ZXJzCisgKiA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dFX1RZUEVfUkVBRCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQUNfUkVHX1JDUiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNRVNTQUdFX1JFUVVFU1RfTUFDUkVHLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgJmJ5VG1wTW9kZQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7Ci0gICAgaWYgKHJjID09IDApIHBEZXZpY2UtPmJ5UnhNb2RlID0gYnlUbXBNb2RlOworCXJjID0gQ09OVFJPTG5zUmVxdWVzdEluKHByaXYsIE1FU1NBR0VfVFlQRV9SRUFELAorCQlNQUNfUkVHX1JDUiwgTUVTU0FHRV9SRVFVRVNUX01BQ1JFRywgMSwgJnRtcCk7CisJaWYgKHJjID09IDApCisJCXByaXYtPmJ5UnhNb2RlID0gdG1wOwogCi0gICAgREJHX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAicERldmljZS0+YnlSeE1vZGUgaW49ICV4XG4iLCBwRGV2aWNlLT5ieVJ4TW9kZSk7CisJREJHX1BSVChNU0dfTEVWRUxfREVCVUcsIEtFUk5fSU5GTyAicHJpdi0+YnlSeE1vZGUgaW49ICV4XG4iLAorCQkJCQkJCXByaXYtPmJ5UnhNb2RlKTsKIAotICAgIGlmIChkZXYtPmZsYWdzICYgSUZGX1BST01JU0MpIHsgLyogc2V0IHByb21pc2N1b3VzIG1vZGUgKi8KLSAgICAgICAgREJHX1BSVChNU0dfTEVWRUxfRVJSLEtFUk5fTk9USUNFICIlczogUHJvbWlzY3VvdXMgbW9kZSBlbmFibGVkLlxuIiwgZGV2LT5uYW1lKTsKLQkvKiB1bmNvbmRpdGlvbmFsbHkgbG9nIG5ldCB0YXBzICovCi0gICAgICAgIHBEZXZpY2UtPmJ5UnhNb2RlIHw9IChSQ1JfTVVMVElDQVNUfFJDUl9CUk9BRENBU1R8UkNSX1VOSUNBU1QpOwotICAgIH0KLSAgICBlbHNlIGlmICgobmV0ZGV2X21jX2NvdW50KGRldikgPiBwRGV2aWNlLT5tdWx0aWNhc3RfbGltaXQpIHx8Ci0JICAgICAoZGV2LT5mbGFncyAmIElGRl9BTExNVUxUSSkpIHsKLSAgICAgICAgQ09OVFJPTG5zUmVxdWVzdE91dChwRGV2aWNlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1FU1NBR0VfVFlQRV9XUklURSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBNQUNfUkVHX01BUjAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgTUVTU0FHRV9SRVFVRVNUX01BQ1JFRywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICA4LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBieURhdGEKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICApOwotICAgICAgICBwRGV2aWNlLT5ieVJ4TW9kZSB8PSAoUkNSX01VTFRJQ0FTVHxSQ1JfQlJPQURDQVNUKTsKLSAgICB9Ci0gICAgZWxzZSB7Ci0gICAgICAgIG1lbXNldChtY19maWx0ZXIsIDAsIHNpemVvZihtY19maWx0ZXIpKTsKLQluZXRkZXZfZm9yX2VhY2hfbWNfYWRkcihoYSwgZGV2KSB7Ci0gICAgICAgICAgICBpbnQgYml0X25yID0gZXRoZXJfY3JjKEVUSF9BTEVOLCBoYS0+YWRkcikgPj4gMjY7Ci0gICAgICAgICAgICBtY19maWx0ZXJbYml0X25yID4+IDVdIHw9IGNwdV90b19sZTMyKDEgPDwgKGJpdF9uciAmIDMxKSk7Ci0gICAgICAgIH0KLSAgICAgICAgZm9yIChpaSA9IDA7IGlpIDwgNDsgaWkrKykgewotICAgICAgICAgICAgIE1BQ3ZXcml0ZU11bHRpQWRkcihwRGV2aWNlLCBpaSwgKigodTggKikmbWNfZmlsdGVyWzBdICsgaWkpKTsKLSAgICAgICAgICAgICBNQUN2V3JpdGVNdWx0aUFkZHIocERldmljZSw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Bhcm91bmQ6OiB3bF9tYWluLmM6MjIyOTogYEhSRUdfRVZfUkRNQUQnIHVuZGVjbGFyZWQgKGZpcnN0IHVzZSBpbiB0aGlzIGZ1bmN0aW9uKQorLyogaW4gb3JkZXIgdG8gZ2V0IGFyb3VuZDo6IHdsX21haW4uYzoyMjI5OiBgSFJFR19FVl9SRE1BRCcgdW5kZWNsYXJlZCAoZmlyc3QgdXNlIGluIHRoaXMgZnVuY3Rpb24pICovCiAjaW5jbHVkZSA8aGNmZGVmLmg+CiAKICNpbmNsdWRlIDx3bF9pZi5oPgpAQCAtMTMzLDggKzExOCw3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogI2RlZmluZSBWQUxJRF9QQVJBTShDKSBcCiAJeyBcCi0JCWlmICghKEMpKSBcCi0JCXsgXAorCQlpZiAoIShDKSkgeyBcCiAJCQlwcmludGsoS0VSTl9JTkZPICJXaXJlbGVzcywgcGFyYW1ldGVyIGVycm9yOiBcIiVzXCJcbiIsICNDKTsgXAogCQkJZ290byBmYWlsZWQ7IFwKIAkJfSBcCkBAIC0xNDIsNyArMTI2LDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKglsb2NhbCBmdW5jdGlvbnMKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIHdsX2lzcl9oYW5kbGVyKCB1bnNpZ25lZCBsb25nIHAgKTsKK3ZvaWQgd2xfaXNyX2hhbmRsZXIodW5zaWduZWQgbG9uZyBwKTsKIAogI2lmIDAgLy9TQ1VMTF9VU0VfUFJPQyAvKiBkb24ndCB3YXN0ZSBzcGFjZSBpZiB1bnVzZWQgKi8KIHN0YXRpYyBpbnQgc2N1bGxfcmVhZF9wcm9jbWVtKHN0cnVjdCBzZXFfZmlsZSAqbSwgdm9pZCAqdik7CkBAIC0xNjgsNyArMTUyLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBtb2R1bGUgcGFyYW1ldGVyIGRlZmluaXRpb25zIC0gc2V0IHdpdGggJ2luc21vZCcKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1zdGF0aWMgcF91MTYgICAgaXJxX21hc2sgICAgICAgICAgICAgICAgPSAweGRlYjg7IC8vIElSUTMsNCw1LDcsOSwxMCwxMSwxMiwxNCwxNQorc3RhdGljIHBfdTE2ICAgIGlycV9tYXNrICAgICAgICAgICAgICAgID0gMHhkZWI4OyAvKiBJUlEzLDQsNSw3LDksMTAsMTEsMTIsMTQsMTUgKi8KIHN0YXRpYyBwX3M4ICAgICBpcnFfbGlzdFs0XSAgICAgICAgICAgICA9IHsgLTEgfTsKIAogI2lmIDAKQEAgLTE4Myw3ICsxNjcsNyBAQAogc3RhdGljIHBfdTE2ICAgIFBBUk1fQlJTQ18yR0haICAgICAgICAgICAgIAk9IFBBUk1fREVGQVVMVF9CUlNDXzJHSFo7CiBzdGF0aWMgcF91MTYgICAgUEFSTV9CUlNDXzVHSFogICAgICAgICAgICAgCT0gUEFSTV9ERUZBVUxUX0JSU0NfNUdIWjsKIHN0YXRpYyBwX3UxNiAgICBQQVJNX0NPRVhJU1RFTkNFICAgICAgICAgICAJPSBQQVJNX0RFRkFVTFRfQ09FWElTVEVOQ0U7Ci1zdGF0aWMgcF91MTYgICAgUEFSTV9DT05ORUNUSU9OX0NPTlRST0wgICAgCT0gUEFSTV9ERUZBVUxUX0NPTk5FQ1RJT05fQ09OVFJPTDsgIC8vOz9yZW5hbWUgYW5kIG1vdmUKK3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YobHAtPmhjZkN0eCksIGRlc2MsIDApCisJZG8geyBcCisJCWRlc2MtPmJ1Zl9hZGRyID0gYnVmOyBcCisJCWRlc2MtPkJVRl9TSVpFID0gbGVuOyBcCisJCXN0YXR1cyA9IGhjZl9yY3ZfbXNnKCYobHAtPmhjZkN0eCksIGRlc2MsIDApOyBcCisJfSB3aGlsZSAoMCkKIAogI2RlZmluZSBCTE9DS19JTlBVVF9ETUEoYnVmLCBsZW4pIG1lbWNweSggYnVmLCBkZXNjX25leHQtPmJ1Zl9hZGRyLCBwa3RsZW4gKQogCkBAIC0xNTgsMjAgKzEzOCwxMiBAQAogICogICAgICBlcnJubyB2YWx1ZSBvdGhlcndpc2UKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IHdsX2luaXQoIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgKQoraW50IHdsX2luaXQoc3RydWN0IG5ldF9kZXZpY2UgKmRldikKIHsKLS8vICAgIHVuc2lnbmVkIGxvbmcgICAgICAgZmxhZ3M7Ci0vLyAgICBzdHJ1Y3Qgd2xfcHJpdmF0ZSAgICpscCA9IHdsX3ByaXYoZGV2KTsKKwlEQkdfUEFSQU0oRGJnSW5mbywgImRldiIsICIlcyAoMHglcCkiLCBkZXYtPm5hbWUsIGRldik7CisJcmV0dXJuIDA7Cit9CQkJCS8qIHdsX2luaXQgKi8KIAotICAgIERCR19QQVJBTSggRGJnSW5mbywgImRldiIsICIlcyAoMHglcCkiLCBkZXYtPm5hbWUsIGRldiApOwotCi0gICAgLyogTm90aGluZyB0byBkbywgYnV0IGdyYWIgdGhlIHNwaW5sb2NrIGFueXdheSBqdXN0IGluIGNhc2Ugd2UgZXZlciBuZWVkCi0gICAgICAgdGhpcyByb3V0aW5lICovCi0vLyAgd2xfbG9jayggbHAsICZmbGFncyApOwotLy8gIHdsX3VubG9jayggbHAsICZmbGFncyApOwotCi0gICAgcmV0dXJuIDA7Ci19IC8vIHdsX2luaXQKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0xOTMsMTcgKzE2NSwyMCBAQAogICogICAgICBlcnJubyBvdGhlcndpc2UKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IHdsX2NvbmZpZyggc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgc3RydWN0IGlmbWFwICptYXAgKQoraW50IHdsX2NvbmZpZyhzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LCBzdHJ1Y3QgaWZtYXAgKm1hcCkKIHsKLSAgICBEQkdfUEFSQU0oIERiZ0luZm8sICJkZXYiLCAiJXMgKDB4JXApIiwgZGV2LT5uYW1lLCBkZXYgKTsKLSAgICBEQkdfUEFSQU0oIERiZ0luZm8sICJtYXAiLCAiMHglcCIsIG1hcCApOworCURCR19QQVJBTShEYmdJbmZvLCAiZGV2IiwgIiVzICgweCVwKSIsIGRldi0+bmFtZSwgZGV2KTsKKwlEQkdfUEFSQU0oRGJnSW5mbywgIm1hcCIsICIweCVwIiwgbWFwKTsKIAotICAgIC8qIFRoZSBvbmx5IHRoaW5nIHdlIGNhcmUgYWJvdXQgaGVyZSBpcyBhIHBvcnQgY2hhbmdlLiBTaW5jZSB0aGlzIG5vdCBuZWVkZWQsCi0gICAgICAgaWdub3JlIHRoZSByZXF1ZXN0LiAqLwotICAgIERCR19UUkFDRShEYmdJbmZvLCAiJXM6ICVzIGNhbGxlZC5cbiIsIGRldi0+bmFtZSwgX19mdW5jX18pOworCS8qCisJICogVGhlIG9ubHkgdGhpbmcgd2UgY2FyZSBhYm91dCBoZXJlIGlzIGEgcG9ydCBjaGFuZ2UuCisJICogU2luY2UgdGhpcyBub3QgbmVlZGVkLCBpZ25vcmUgdGhlIHJlcXVlc3QuIAorCSAqLworCURCR19UUkFDRShEYmdJbmZvLCAiJXM6ICVzIGNhbGxlZC5cbiIsIGRldi0+bmFtZSwgX19mdW5jX18pOwogCi0gICAgcmV0dXJuIDA7Ci19IC8vIHdsX2NvbmZpZworCXJldHVybiAwOworfQkJCQkvKiB3bF9jb25maWcgKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTIyNCw0OCArMTk5LDQ3IEBACiAgKiAgICAgIHN0YXRpc3RpY3MuCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXN0cnVjdCBuZXRfZGV2aWNlX3N0YXRzICp3bF9zdGF0cyggc3RydWN0IG5ldF9kZXZpY2UgKmRldiApCitzdHJ1Y3QgbmV0X2RldmljZV9zdGF0cyAqd2xfc3RhdHMoc3RydWN0IG5ldF9kZXZpY2UgKmRldikKIHsKICNpZmRlZiBVU0VfV0RTCi0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgIGNvdW50OwotI2VuZGlmICAvKiBVU0VfV0RTICovCi0gICAgdW5zaWduZWQgbG9uZyAgICAgICAgICAgICAgIGZsYWdzOwotICAgIHN0cnVjdCBuZXRfZGV2aWNlX3N0YXRzICAgICAqcFN0YXRzOwotICAgIHN0cnVjdCB3bF9wcml2YXRlICAgICAgICAgICAqbHAgPSB3bF9wcml2KGRldik7CisJaW50IGNvdW50OworI2VuZGlmIC8qIFVTRV9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SAwOyBjb3VudCA8IE5VTV9XRFNfUE9SVFM7IGNvdW50KyspIHsKKwkJaWYgKGRldiA9PSBscC0+d2RzX3BvcnRbY291bnRdLmRldikKKwkJCXBTdGF0cyA9ICYobHAtPndkc19wb3J0W2NvdW50XS5zdGF0cyk7CiAJfQotICAgIH0KIAotI2VuZGlmICAvKiBVU0VfV0RTICovCisjZW5kaWYgLyogVVNFX1dEUyAqLwogCi0gICAgLyogSWYgcFN0YXRzIGlzIHN0aWxsIE5VTEwsIHRoZW4gdGhlIGRldmljZSBpcyBub3QgYSBXRFMgcG9ydCAqLwotICAgIGlmKCBwU3RhdHMgPT0gTlVMTCApIHsKLSAgICAgICAgcFN0YXRzID0gJiggbHAtPnN0YXRzICk7Ci0gICAgfQorCS8qIElmIHBTdGF0cyBpcyBzdGlsbCBOVUxMLCB0aGVuIHRoZSBkZXZpY2UgaXMgbm90IGEgV0RTIHBvcnQgKi8KKwlpZiAocFN0YXRzID09IE5VTEwpCisJCXBTdGF0cyA9ICYobHAtPnN0YXRzKTsKIAotICAgIHdsX3VubG9jayggbHAsICZmbGFncyApOworCXdsX3VubG9jayhscCwgJmZsYWdzKTsKIAotICAgIHJldHVybiBwU3RhdHM7Ci19IC8vIHdsX3N0YXRzCisJcmV0dXJuIHBTdGF0czsKK30JCQkJLyogd2xfc3RhdHMgKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTI4OCw3NSArMjYyLDc3IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogaW50IHdsX29wZW4oc3RydWN0IG5ldF9kZXZpY2UgKmRldikKIHsKLSA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G9wIHRoZSBkZXZpY2UgYW5kIHF1ZXVlICovCisJfQogCi0gICAgd2xfdW5sb2NrKCBscCwgJmZsYWdzICk7CisJd2xfdW5sb2NrKGxwLCAmZmxhZ3MpOwogCi0gICAgcmV0dXJuIHN0YXR1czsKLX0gLy8gd2xfb3BlbgorCXJldHVybiBzdGF0dXM7Cit9CQkJCS8qIHdsX29wZW4gKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTM3Nyw3MyArMzUzLDcwIEBACiAgKiAgICAgIGVycm5vIG90aGVyd2lzZQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQgd2xfY2xvc2UoIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgKQoraW50IHdsX2Nsb3NlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCiB7Ci0gICAgc3RydWN0IHdsX3ByaXZhdGUgICAqbHAgPSB3bF9wcml2KGRldik7Ci0gICAgdW5zaWduZWQgbG9uZyAgIGZsYWdzOworCXN0cnVjdCB3bF9wcml2YXRlICpscCA9IHdsX3ByaXYoZGV2KTsKKwl1bnNpZ25lZCBsb25nIGZsYWdzOwogCi0gICAgREJHX1BBUkFNKERiZ0luZm8sICJkZXYiLCAiJXMgKDB4JXApIiwgZGV2LT5uYW1lLCBkZXYpOworCURCR19QQVJBTShEYmdJbmZvLCAiZGV2IiwgIiVzICgweCVwKSIsIGRldi0+bmFtZSwgZGV2KTsKIAotICAgIC8qIE1hcmsgdGhlIGFkYXB0ZXIgYXMgYnVzeSAqLwotICAgIG5ldGlmX3N0b3BfcXVldWUoIGRldiApOw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bywKLSAgICAuZ2V0X2xpbmsgPSBldGh0b29sX29wX2dldF9saW5rLAorCS5nZXRfZHJ2aW5mbyA9IHdsX2dldF9kcnZpbmZvLAorCS5nZXRfbGluayA9IGV0aHRvb2xfb3BfZ2V0X2xpbmssCiB9OwogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgl3bF9pb2N0bCgpCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtNDY0LDgxICs0MzcsODYgQEAKICAqICAgICAgZXJybm8gdmFsdWUgb3RoZXJ3aXNlCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLWludCB3bF9pb2N0bCggc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgc3RydWN0IGlmcmVxICpycSwgaW50IGNtZCApCitpbnQgd2xfaW9jdGwoc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgc3RydWN0IGlmcmVxICpycSwgaW50IGNtZCkKIHsKLSAgICBzdHJ1Y3Qgd2xfcHJpdmF0ZSAgKmxwID0gd2xfcHJpdihkZXYpOwotICAgIHVuc2lnbmVkIGxvbmcgICAgICAgICAgIGZsYWdzOwotICAgIGludCAgICAgICAgICAgICAgICAgICAgIHJldCA9IDA7CisJc3RydWN0IHdsX3ByaXZhdGUgKmxwID0gd2xfcHJpdihkZXYpOworCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CisJaW50IHJldCA9IDA7CiAKLSAgICBEQkdfUEFSQU0oRGJnSW5mbywgImRldiIsICIlcyAoMHglcCkiLCBkZXYtPm5hbWUsIGRldik7Ci0gICAgREJHX1BBUkFNKERiZ0luZm8sICJycSIsICIweCVwIiwgcnEpOwotICAgIERCR19QQ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HVyZSAqLwotCSAgICBicmVhazsKKwkJCS8qIEJyZWFrIHRoZSBsb29wIHNvIHRoYXQgd2UgY2FuIHVzZSB0aGUgY291bnRlciB0byBhY2Nlc3MgV0RTCisJCQkgICBpbmZvcm1hdGlvbiBpbiB0aGUgcHJpdmF0ZSBzdHJ1Y3R1cmUgKi8KKwkJCWJyZWFrOworCQl9CiAJfQotICAgIH0KIAotI2VuZGlmICAvKiBVU0VfV0RTICovCisjZW5kaWYgLyogVVNFX1dEUyAqLwogCi0gICAgLyogSWYgcFN0YXRzIGlzIHN0aWxsIE5VTEwsIHRoZW4gdGhlIGRldmljZSBpcyBub3QgYSBXRFMgcG9ydCAqLwotICAgIGlmKCBwU3RhdHMgPT0gTlVMTCApIHsKLQlwU3RhdHMgPSAmKCBscC0+c3RhdHMgKTsKLSAgICB9CisJLyogSWYgcFN0YXRzIGlzIHN0aWxsIE5VTEwsIHRoZW4gdGhlIGRldmljZSBpcyBub3QgYSBXRFMgcG9ydCAqLworCWlmIChwU3RhdHMgPT0gTlVMTCkKKwkJcFN0YXRzID0gJihscC0+c3RhdHMpOwogCi0gICAgLyogQWNjdW11bGF0ZSB0aGUgdGltZW91dCBlcnJvciAqLwotICAgIHBTdGF0cy0+dHhfZXJyb3JzKys7CisJLyogQWNjdW11bGF0ZSB0aGUgdGltZW91dCBlcnJvciAqLworCXBTdGF0cy0+dHhfZXJyb3JzKys7CiAKLSAgICB3bF91bmxvY2soIGxwLCAmZmxhZ3MgKTsKLX0gLy8gd2xfdHhfdGltZW91dAorCXdsX3VubG9jayhscCwgJmZsYWdzKTsKK30JCQkJLyogd2xfdHhfdGltZW91dCAqLworCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtNjI2LDEwMyArNjA1LDEwNSBAQAogICogICAgICAxIG9uIGVycm9yCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLWludCB3bF9zZW5kKCBzdHJ1Y3Qgd2xfcHJpdmF0ZSAqbHAgKQoraW50IHdsX3NlbmQoc3RydWN0IHdsX3ByaXZhdGUgKmxwKQogewogCi0gICAgaW50ICAgICAgICAgICAgICAgICBzdGF0dXM7Ci0gICAgREVTQ19TVFJDVCAgICAgICAgICAqZGVzYzsKLSAgICBXVkxBTl9MRlJBTUUgICAgICAgICp0eEYgPSBOVUxMOwotICAgIHN0cnVjdCBsaXN0X2hlYWQgICAgKmVsZW1lbnQ7Ci0gICAgaW50ICAgICAgICAgICAgICAgICBsZW47CisJaW50IHN0YXR1czsKKwlERVNDX1NUUkNUICpkZXNjOworCVdWTEFOX0xGUkFNRSAqdHhGID0gTlVMTDsKKwlzdHJ1Y3QgbGlzdF9oZWFkICplbGVtZW50OworCWludCBsZW47CiAgICAgLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwogCi0gICAgaWYoIGxwID09IE5VTEwgKSB7Ci0gICAgICAgIERCR19FUlJPUiggRGJnSW5mbywgIlByaXZhdGUgYWRhcHRlciBzdHJ1Y3QgaXMgTlVMTFxuIiApOwotICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQotICAgIGlmKCBscC0+ZGV2ID09IE5VTEwgKSB7Ci0gICAgICAgIERCR19FUlJPUiggRGJnSW5mbywgIm5ldF9kZXZpY2Ugc3RydWN0IGluIHdsX3ByaXZhdGUgaXMgTlVMTFxuIiApOwotICAgICAgICByZXR1cm4gRkFMU0U7Ci0gICAgfQorCWlmIChscCA9PSBOVUxMKSB7CisJCURCR19FUlJPUihEYmdJbm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NjZXNzZnVsbHkgKi8KLSAgICAgICAgZGV2X2tmcmVlX3NrYiggbHAtPnR4Ri5za2IgKTsKKwkJLyogRnJlZSB0aGUgc2tiIGFuZCBwZXJmb3JtIHF1ZXVlIGNsZWFudXAsIGFzIHRoZSBidWZmZXIgd2FzCisJCSAgIHRyYW5zbWl0dGVkIHN1Y2Nlc3NmdWxseSAqLworCQlkZXZfY29uc3VtZV9za2JfYW55KCBscC0+dHhGLnNrYiApOwogCi0gICAgICAgIGxwLT50eEYuc2tiID0gTlVMTDsKLSAgICAgICAgbHAtPnR4Ri5wb3J0ID0gMDsKLSAgICB9CisJCWxwLT50eEYuc2tiID0gTlVMTDsKKwkJbHAtPnR4Ri5wb3J0ID0gMDsKKwl9CiAKLSAgICByZXR1cm4gVFJVRTsKLX0gLy8gd2xfc2VuZAorCXJldHVybiBUUlVFOworfQkJCQkvKiB3bF9zZW5kICovCisKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC03NDQsNzUgKzcyNSw3NCBAQAogICogICAgICAxIG9uIGVycm9yCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLWludCB3bF90eCggc3RydWN0IHNrX2J1ZmYgKnNrYiwgc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgaW50IHBvcnQgKQoraW50IHdsX3R4KHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsIGludCBwb3J0KQogewotICAgIHVuc2lnbmVkIGxvbmcgICAgICAgICAgIGZsYWdzOwotICAgIHN0cnVjdCB3bF9wcml2YXRlICAgICAgICpscCA9IHdsX3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NwaW5sb2NrIGFuZCByZXR1cm4gKi8KLSAgICB3bF9hY3RfaW50X29uKCBscCApOwotICAgIHdsX3VubG9jayggbHAsICZmbGFncyApOwotICAgIHJldHVybiAwOwotfSAvLyB3bF90eAorCXsKKwkJd2xfc2VuZChscCk7CisJfQorCS8qIFJlLWVuYWJsZSBJbnRlcnJ1cHRzLCByZWxlYXNlIHRoZSBzcGlubG9jayBhbmQgcmV0dXJuICovCisJd2xfYWN0X2ludF9vbihscCk7CisJd2xfdW5sb2NrKGxwLCAmZmxhZ3MpOworCXJldHVybiAwOworfQkJCQkvKiB3bF90eCAqLworCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtODM1LDY3ICs4MTUsNjggQEAKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiBpbnQgd2xfcngoc3RydWN0IG5ldF9kZXZpY2UgKmRldikKIHsKLSAgICBpbnQgICAgICAgICAgICAgICAgICAgICBwb3J0OwotICAgIHN0cnVjdCBza19idWZmICAgICAgICAgICpza2I7Ci0gICAgc3RydWN0IHdsX3ByaXZhdGUgICAgICAgKmxwID0gd2xfcHJpdihkZXYpOwotICAgIGludCAgICAgICAgICAgICAgICAgICAgIHN0YXR1czsKLSAgICBoY2ZfMTYgICAgICAgICAgICAgICAgICBwa3RsZW47Ci0gICAgaGNmXzE2ICAgICAgICAgICAgICAgICAgaGZzX3N0YXQ7Ci0gICAgREVTQ19TVFJDVCAgICAgICAgICAgICAgKmRlc2M7CisJaW50IHBvcnQ7CisJc3RydWN0IHNrX2J1ZmYgKnNrYjsKKwlzdHJ1Y3Qgd2xfcHJpdmF0Z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Bmb3IgcG9ydCAlZFxuIiwgcG9ydCApOworCQkvKiBEZXRlcm1pbmUgd2hhdCBwb3J0IHRoaXMgcGFja2V0IGlzIGZvciAqLworCQlwb3J0ID0gKGhmc19zdGF0ID4+IDgpICYgMHgwMDA3OworCQlEQkdfUlgoRGJnSW5mbywgIlJ4IGZyYW1lIGZvciBwb3J0ICVkXG4iLCBwb3J0KTsKIAotICAgICAgICBwa3RsZW4gPSBscC0+aGNmQ3R4LklGQl9SeExlbjsKLSAgICAgICAgaWYgKHBrdGxlbiAhPSAwKSB7Ci0gICAgICAgICAgICBza2IgPSBBTExPQ19TS0IocGt0bGVuKTsKLSAgICAgICAgICAgIGlmIChza2IgIT0gTlVMTCkgewotICAgICAgICAgICAgICAgIC8qIFNldCB0aGUgbmV0ZGV2IGJhc2VkIG9uIHRoZSBwb3J0ICovCi0gICAgICAgICAgICAgICAgc3dpdGNoKCBwb3J0ICkgeworCQlwa3RsZW4gPSBscC0+aGNmQ3R4LklGQl9SeExlbjsKKwkJaWYgKHBrdGxlbiAhPSAwKSB7CisJCQlza2IgPSBBTExPQ19TS0IocGt0bGVuKTsKKwkJCWlmIChza2IgIT0gTlVMTCkgeworCQkJCS8qIFNldCB0aGUgbmV0ZGV2IGJhc2VkIG9uIHRoZSBwb3J0ICovCisJCQkJc3dpdGNoIChwb3J0KSB7CiAjaWZkZWYgVVNFX1dEUwotICAgICAgICAgICAgICAgIGNhc2UgMToKLSAgICAgICAgICAgICAgICBjYXNlIDI6Ci0gICAgICAgICAgICAgICAgY2FzZSAzOgotICAgICAgICAgICAgICAgIGNhc2UgNDoKLSAgICAgICAgICAgICAgICBjYXNlIDU6Ci0gICAgICAgICAgICAgICAgY2FzZSA2OgotICAgICAgICAgICAgICAgICAgICBza2ItPmRldiA9IGxwLT53ZHNfcG9ydFtwb3J0LTFdLmRldjsKLSAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0jZW5kaWYgIC8qIFVTRV9XRFMgKi8KKwkJCQljYXNlI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7CisJCQkJCW5ldGlmX3J4KHNrYik7CiAKLSAgICAgICAgICAgICAgICAgICAgaWYoIHBvcnQgPT0gMCApIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxwLT5zdGF0cy5yeF9wYWNrZXRzKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICBscC0+c3RhdHMucnhfYnl0ZXMgKz0gcGt0bGVuOwotICAgICAgICAgICAgICAgICAgICB9CisJCQkJCWlmIChwb3J0ID09IDApIHsKKwkJCQkJCWxwLT5zdGF0cy5yeF9wYWNrZXRzKys7CisJCQkJCQlscC0+c3RhdHMucnhfYnl0ZXMgKz0gcGt0bGVuOworCQkJCQl9CiAjaWZkZWYgVVNFX1dEUwotICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxwLT53ZHNfcG9ydFtwb3J0LTFdLnN0YXRzLnJ4X3BhY2tldHMrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxwLT53ZHNfcG9ydFtwb3J0LTFdLnN0YXRzLnJ4X2J5dGVzICs9IHBrdGxlbjsKLSAgICAgICAgICAgICAgICAgICAgfQotI2VuZGlmICAvKiBVU0VfV0RTICovCisJCQkJCWVsc2UgeworCQkJCQkJbHAtPndkc19wb3J0W3BvcnQgLQorCQkJCQkJCSAgICAgMV0uc3RhdHMuCisJCQkJCQkgICAgcnhfcGFja2V0cysrOworCQkJCQkJbHAtPndkc19wb3J0W3BvcnQgLQorCQkJCQkJCSAgICAgMV0uc3RhdHMuCisJCQkJCQkgICAgcnhfYnl0ZXMgKz0gcGt0bGVuOworCQkJCQl9CisjZW5kaWYgLyogVVNFX1dEUyAqLwogCi0gICAgICAgICAgICAgICAgICAgIGRldi0+bGFzdF9yeCA9IGppZmZpZXM7CisJCQkJCWRldi0+bGFzdF9yeCA9IGppZmZpZXM7CiAKICNpZmRlZiBXSVJFTEVTU19FWFQKICNpZmRlZiBXSVJFTEVTU19TUFkKLSAgICAgICAgICAgICAgICAgICAgaWYoIGxwLT5zcHlkYXRhLnNweV9udW1iZXIgPiAwICkgewotICAgICAgICAgICAgICAgICAgICAgICAgY2hhciAqc3JjYWRkciA9IHNrYi0+bWFjLnJhdyArIE1BQ19BRERSX1NJWkU7CisJCQkJCWlmIChscC0+c3B5ZGF0YS5zcHlfbnVtYmVyID4gMCkgeworCQkJCQkJY2hhciAqc3JjYWRkciA9CisJCQkJCQkgICAgc2tiLT5tYWMucmF3ICsKKwkJCQkJCSAgICBNQUNfQUREUl9TSVpFOwogCi0gICAgICAgICAgICAgICAgICAgICAgICB3bF9zcHlfZ2F0aGVyKCBkZXYsIHNyY2FkZHIgKTsKLSAgICAgICAgICAgICAgICAgICAgfQorCQkJCQkJd2xfc3B5X2dhdGhlcihkZXYsIHNyY2FkZHIpOworCQkJCQl9CiAjZW5kaWYgLyogV0lSRUxFU1NfU1BZICovCiAjZW5kaWYgLyogV0lSRUxFU1NfRVhUICovCi0gICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgREJHX0VSUk9SKCBEYmdJbmZvLCAiUnggcmVxdWVzdCB0byBjYXJkIEZBSUxFRFxuIiApOworCQkJCX0gZWxzZSB7CisJCQkJCURCR19FUlJPUihEYmdJbmZvLAorCQkJCQkJICAiUnggcmVxdWVzdCB0byBjYXJkIEZBSUxFRFxuIik7CiAKLSAgICAgICAgICAgICAgICAgICAgaWYoIHBvcnQgPT0gMCApIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxwLT5zdGF0cy5yeF9kcm9wcGVkKys7Ci0gICAgICAgICAgICAgICAgICAgIH0KKwkJCQkJaWYgKHBvcnQgPT0gMCkKKwkJCQkJCWxwLT5zdGF0cy5yeF9kcm9wcGVkKys7CiAjaWZkZWYgVVNFX1dEUwotICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxwLT53ZHNfcG9ydFtwb3J0LTFdLnN0YXRzLnJ4X2Ryb3BwZWQrKzsKLSAgICAgICAgICAgICAgICAgICAgfQotI2VuZGlmICAvKiBVU0VfV0RTICovCisJCQkJCWVsc2UgeworCQkJCQkJbHAtPndkc19wb3J0W3BvcnQgLQorCQkJCQkJCSAgICAgMV0uc3RhdHMuCisJCQkJCQkgICAgcnhfZHJvcHBlZCsrOworCQkJCQl9CisjZW5kaWYgLyogVVNFX1dEUyAqLwogCi0gICAgICAgICAgICAgICAgICAgIGRldl9rZnJlZV9za2IoIHNrYiApOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICAgREJHX0VSUk9SKCBEYmdJbmZvLCAiQ291bGQgbm90IGFsbG9jIHNrYlxuIiApOworCQkJCQlkZXZfa2ZyZWVfc2tiKHNrYik7CisJCQkJfQorCQkJfSBlbHNlIHsKKwkJCQlEQkdfRVJST1IoRGJnSW5mbywgIkNvdWxkIG5vdCBhbGxvYyBza2JcbiIpOwogCi0gICAgICAgICAgICAgICAgaWYoIHBvcnQgPT0gMCApIHsKLSAgICAgICAgICAgICAgICAgICAgbHAtPnN0YXRzLnJ4X2Ryb3BwZWQrKzsKLSAgICAgICAgICAgICAgICB9CisJCQkJaWYgKHBvcnQgPT0gMCkKKwkJCQkJbHAtPnN0YXRzLnJ4X2Ryb3BwZWQrKzsKICNpZmRlZiBVU0VfV0RTCi0gICAgICAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgICAgbHAtPndkc19wb3J0W3BvcnQtMV0uc3RhdHMucnhfZHJvcHBlZCsrOwotICAgICAgICAgICAgICAgIH0KLSNlbmRpZiAgLyogVVNFX1dEUyAqLwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgfQorCQkJCWVsc2UgeworCQkJCQlscC0+d2RzX3BvcnRbcG9ydCAtCisJCQkJCQkgICAgIDFdLnN0YXRzLnJ4X2Ryb3BwZWQrKzsKKwkJCQl9CisjZW5kaWYgLyogVVNFX1dEUyAqLworCQkJfQorCQl9CisJfQogCi0gICAgcmV0dXJuIDA7Ci19IC8vIHdsX3J4CisJcmV0dXJuIDA7Cit9CQkJCS8qIHdsX3J4ICovCisKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC05ODYsMTQyICs5NzMsMTU5IEBACiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogI2lmZGVmIE5FV19NVUxUSUNBU1QKIAotdm9pZCB3bF9tdWx0aWNhc3QoIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgKQordm9pZCB3bF9tdWx0aWNhc3Qoc3RydWN0IG5ldF9kZXZpY2UgKmRldikKIHsKLSNpZiAxIC8vOz8gKEhDRl9UWVBFKSAmIEhDRl9UWVBFX1NUQSAvLzs/c2hvdWxkIHdlIHJldHVybiBhbiBlcnJvciBzdGF0dXMgaW4gQVAgbW9kZQotLy87P3NlZW1zIHJlYXNvbmFibGUgdGhhdCBldmVuIGFuIEFQLW9ubHkgZHJpdmVyIGNvdWxkIGFmZm9yZCB0aGlzIHNtYWxsIGFkZGl0aW9uYWwgZm9vdHByaW50CisjaWYgMQkJCQkvKiAoSENGX1RZUEUpICYgSENGX1RZUEVfU1RBICovCisJLyoKKwkgKiBzaG91bGQgd2UgcmV0dXJuIGFuIGVycm9yIHN0YXR1cyBpbiBBUCBtb2RlID8KKwkgKiBzZWVtcyByZWFzb25hYmxlIHRoYXQgZXZlbiBhbiBBUC1vbmx5IGRyaXZlcgorCSAqIGNvdWxkIGFmZm9yZCB0aGlzIHNtY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RSQUNFKERiZ0luZm8sICJTa2lwcGluZyBtdWx0aWNhc3QsIGluIFJUUyBtb2RlXG4iKTsKKwkJCXJldHVybjsKKwkJfQorI2VuZGlmIC8qIFVTRV9SVFMgKi8KIAotICAgICAgICB3bF9sb2NrKCBscCwgJmZsYWdzICk7Ci0gICAgICAgIHdsX2FjdF9pbnRfb2ZmKCBscCApOworCQl3bF9sb2NrKGxwLCAmZmxhZ3MpOworCQl3bF9hY3RfaW50X29mZihscCk7CiAKLQkJaWYgKCBDTlZfSU5UX1RPX0xJVFRMRSggbHAtPmhjZkN0eC5JRkJfRldJZGVudGl0eS5jb21wX2lkICkgPT0gQ09NUF9JRF9GV19TVEEgICkgewotICAgICAgICAgICAgaWYoIGRldi0+ZmxhZ3MgJiBJRkZfUFJPTUlTQyApIHsKLSAgICAgICAgICAgICAgICAvKiBFbmFibGUgcHJvbWlzY3VvdXMgbW9kZSAqLwotICAgICAgICAgICAgICAgIGxwLT5sdHZSZWNvcmQubGVuICAgICAgID0gMjsKLSAgICAgICAgICAgICAgICBscC0+bHR2UmVjb3JkLnR5cCAgICAgICA9IENGR19QUk9NSVNDVU9VU19NT0RFOwotICAgICAgICAgICAgICAgIGxwLT5sdHZSZWNvcmQudS51MTZbMF0gID0gQ05WX0lOVF9UT19MSVRUTEUoIDEgKTsKLSAgICAgICAgICAgICAgICBEQkdfUFJJTlQoICJFbmFibGluZyBQcm9taXNjdW91cyBtb2RlIChJRkZfUFJPTUlTQylcbiIgKTsKLSAgICAgICAgICAgICAgICBoY2ZfcHV0X2luZm8oICYoIGxwLT5oY2ZDdHggKSwgKExUVlApJiggbHAtPmx0dlJlY29yZCApKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UgaWYgKChuZXRkZXZfbWNfY291bnQoZGV2KSA+IEhDRl9NQVhfTVVMVElDQVNUKSB8fAotICAgICAgICAgICAgICAgICAgICAoIGRldi0+ZmxhZ3MgJiBJRkZfQUxMTVVMVEkgKSkgewotICAgICAgICAgICAgICAgIC8qIFNodXR0aW5nIG9mZiB0aGlzIGZpbHRlciB3aWxsIGVuYWJsZSBhbGwgbXVsdGljYXN0IGZyYW1lcyB0bwotICAgICAgICAgICAgICAgICAgIGJlIHNlbnQgdXAgZnJvbSB0aGUgZGV2aWNlOyBob3dldmVyLCB0aGlzIGlzIGEgc3RhdGljIFJJRCwgc28KLSAgICAgICAgICAgICAgICAgICBhIGNhbGwgdG8gd2xfYXBwbHkoKSBpcyBuZWVkZWQgKi8KLSAgICAgICAgICAgICAgICBscC0+bHR2UmVjb3JkLmxlbiAgICAgICA9IDI7Ci0gICAgICAgICAgICAgICAgbHAtPmx0dlJlY29yZC50eXAgICAgICAgPSBDRkdfQ05GX1JYX0FMTF9HUk9VUF9BRERSOwotICAgICAgICAgICAgICAgIGxwLT5sdHZSZWNvcmQudS51MTZbMF0gID0gQ05WX0lOVF9UT19MSVRUTEUoIDAgKTsKLSAgICAgICAgICAgICAgICBEQkdfUFJJTlQoICJFbmFibGluZyBhbGwgbXVsdGljYXN0IG1vZGUgKElGRl9BTExNVUxUSSlcbiIgKTsKLSAgICAgICAgICAgICAgICBoY2ZfcHV0X2luZm8oICYoIGxwLT5oY2ZDdHggKSwgKExUVlApJiggbHAtPmx0dlJlY29yZCApKTsKLSAgICAgICAgICAgICAgICB3bF9hcHBseSggbHAgKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UgaWYgKCFuZXRkZXZfbWNfZW1wdHkoZGV2KSkgewotICAgICAgICAgICAgICAgIC8qIFNldCB0aGUgbXVsdGljYXN0IGFkZHJlc3NlcyAqLwotICAgICAgICAgICAgICAgIGxwLT5sdHZSZWNvcmQubGVuID0gKCBuZXRkZXZfbWNfY291bnQoZGV2KSAqIDMgKSArIDE7Ci0gICAgICAgICAgICAgICAgbHAtPmx0dlJlY29yZC50eXAgPSBDRkdfR1JPVVBfQUREUjsKKwkJaWYgKENOVl9JTlRfVE9fTElUVExFKGxwLT5oY2ZDdHguS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5UCisJCQkJICAgICgiRW5hYmxpbmcgYWxsIG11bHRpY2FzdCBtb2RlIChJRkZfQUxMTVVMVEkpXG4iKTsKKwkJCQloY2ZfcHV0X2luZm8oJihscC0+aGNmQ3R4KSwKKwkJCQkJICAgICAoTFRWUCkgJiAobHAtPmx0dlJlY29yZCkpOworCQkJCXdsX2FwcGx5KGxwKTsKKwkJCX0gZWxzZSBpZiAoIW5ldGRldl9tY19lbXB0eShkZXYpKSB7CisJCQkJLyogU2V0IHRoZSBtdWx0aWNhc3QgYWRkcmVzc2VzICovCisJCQkJbHAtPmx0dlJlY29yZC5sZW4gPQorCQkJCSAgICAobmV0ZGV2X21jX2NvdW50KGRldikgKiAzKSArIDE7CisJCQkJbHAtPmx0dlJlY29yZC50eXAgPSBDRkdfR1JPVVBfQUREUjsKIAotCQl4ID0gMDsKLQkJbmV0ZGV2X2Zvcl9lYWNoX21jX2FkZHIoaGEsIGRldikKLSAgICAgICAgICAgICAgICAgICAgbWVtY3B5KCYobHAtPmx0dlJlY29yZC51LnU4W3grKyAqIEVUSF9BTEVOXSksCi0JCQkgICBoYS0+YWRkciwgRVRIX0FMRU4pOwotICAgICAgICAgICAgICAgIERCR19QUklOVCggIlNldHRpbmcgbXVsdGljYXN0IGxpc3RcbiIgKTsKLSAgICAgICAgICAgICAgICBoY2ZfcHV0X2luZm8oICYoIGxwLT5oY2ZDdHggKSwgKExUVlApJiggbHAtPmx0dlJlY29yZCApKTsKLSAgICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICAgLyogRGlzYWJsZSBwcm9taXNjdW91cyBtb2RlICovCi0gICAgICAgICAgICAgICAgbHAtPmx0dlJlY29yZC5sZW4gICAgICAgPSAyOwotICAgICAgICAgICAgICAgIGxwLT5sdHZSZWNvcmQudHlwICAgICAgID0gQ0ZHX1BST01JU0NVT1VTX01PREU7Ci0gICAgICAgICAgICAgICAgbHAtPmx0dlJlY29yZC51LnUxNlswXSAgPSBDTlZfSU5UX1RPX0xJVFRMRSggMCApOwotICAgICAgICAgICAgICAgIERCR19QUklOVCggIkRpc2FibGluZyBQcm9taXNjdW91cyBtb2RlXG4iICk7Ci0gICAgICAgICAgICAgICAgaGNmX3B1dF9pbmZvKCAmKCBscC0+aGNmQ3R4ICksIChMVFZQKSYoIGxwLT5sdHZSZWNvcmQgKSk7CisJCQkJeCA9IDA7CisJCQkJbmV0ZGV2X2Zvcl9lYWNoX21jX2FkZHIoaGEsIGRldikKKwkJCQkgICAgbWVtY3B5KCYKKwkJCQkJICAgKGxwLT5sdHZSZWNvcmQudS51OFt4KysgKiBFVEhfQUxFTl0pLAorCQkJCQkgICBoYS0+YWRkciwgRVRIX0FMRU4pOworCQkJCURCR19QUklOVCgiU2V0dGluZyBtdWx0aWNhc3QgbGlzdFxuIik7CisJCQkJaGNmX3B1dF9pbmZvKCYobHAtPmhjZkN0eCksCisJCQkJCSAgICAgKExUVlApICYgKGxwLT5sdHZSZWNvcmQpKTsKKwkJCX0gZWxzZSB7CisJCQkJLyogRGlzYWJsZSBwcm9taXNjdW91cyBtb2RlICovCisJCQkJbHAtPmx0dlJlY29yZC5sZW4gPSAyOworCQkJCWxwLT5sdHZSZWNvcmQudHlwID0gQ0ZHX1BST01JU0NVT1VTX01PREU7CisJCQkJbHAtPmx0dlJlY29yZC51LnUxNlswXSA9IENOVl9JTlRfVE9fTElUVExFKDApOworCQkJCURCR19QUklOVCgiRGlzYWJsaW5nIFByb21pc2N1b3VzIG1vZGVcbiIpOworCQkJCWhjZl9wdXRfaW5mbygmKGxwLT5oY2ZDdHgpLAorCQkJCQkgICAgIChMVFZQKSAmIChscC0+bHR2UmVjb3JkKSk7CiAKLSAgICAgICAgICAgICAgICAvKiBEaXNhYmxlIG11bHRpY2FzdCBtb2RlICovCi0gICAgICAgICAgICAgICAgbHAtPmx0dlJlY29yZC5sZW4gPSAyOwotICAgICAgICAgICAgICAgIGxwLT5sdHZSZWNvcmQudHlwID0gQ0ZHX0dST1VQX0FERFI7Ci0gICA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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiAjZWxzZSAvKiBORVdfTVVMVElDQVNUICovCiAKLXZvaWQgd2xfbXVsdGljYXN0KCBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LCBpbnQgbnVtX2FkZHJzLCB2b2lkICphZGRycyApCit2b2lkIHdsX211bHRpY2FzdChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LCBpbnQgbnVtX2FkZHJzLCB2b2lkICphZGRycykKIHsKLSAgICBEQkdfUEFSQU0oIERiZ0luZm8sICJkZXYiLCAiJXMgKDB4JXApIiwgZGV2LT5uYW1lLCBkZXYgKTsKLSAgICBEQkdfUEFSQU0oIERiZ0luZm8sICJudW1fYWRkcnMiLCAiJWQiLCBudW1fYWRkcnMgKTsKLSAgICBEQkdfUEFSQU0oIERiZ0luZm8sICJhZGRycyIsICIweCVwIiwgYWRkcnMgKTsKKwlEQkdfUEFSQU0oRGJnSW5mbywgImRldiIsICIlcyAoMHglcCkiLCBkZXYtPm5hbWUsIGRldik7CisJREJHX1BBUkFNKERiZ0luZm8sICJudW1fYWRkcnMiLCAiJWQiLCBudW1fYWRkcnMpOworCURCR19QQVJBTShEYmdJbmZvLCAiYWRkcnMiLCAiMHglcCIsIGFkZHJzKTsKIAogI2Vycm9yIE9ic29sZXRlIHNldCBtdWx0aWNhc3QgaW50ZXJmYWNlIQotfSAvLyB3bF9tdWx0aWNhc3QKK30JCQkJLyogd2xfbXVsdGljYXN0ICovCisKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKICNlbmRpZiAvKiBORVdfTVVMVElDQVNUICovCiAKLXN0YXRpYyBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZV9vcHMgd2xfbmV0ZGV2X29wcyA9Ci17Ci0gICAgLm5kb19zdGFydF94bWl0ICAgICAgICAgPSAmd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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTEyMDYsMTUgKzEyMTMsMTQgQEAKICAqICAgICAgTi9BCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgd2xfZGV2aWNlX2RlYWxsb2MoIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgKQordm9pZCB3bF9kZXZpY2VfZGVhbGxvYyhzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewotLy8gICAgc3RydWN0IHdsX3ByaXZhdGUgICAqbHAgPSB3bF9wcml2KGRldik7CisJLyogRGVhbGxvYyB0aGUgV0RTIHBvcnRzICovCisJV0xfV0RTX0RFVklDRV9ERUFMTE9DKGxwKTsKIAotICAgIC8qIERlYWxsb2MgdGhlIFdEUyBwb3J0cyAqLwotICAgIFdMX1dEU19ERVZJQ0VfREVBTExPQyggbHAgKTsKKwlmcmVlX25ldGRldihkZXYpOworfQkJCQkvKiB3bF9kZXZpY2VfZGVhbGxvYyAqLwogCi0gICAgZnJlZV9uZXRkZXYoIGRldiApOwotfSAvLyB3bF9kZXZpY2VfZGVhbGxvYwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTEyMzUsMTUgKzEyNDEsMTYgQEAKICAqICAgICAgTi9BCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLWludCB3bF90eF9wb3J0MCggc3RydWN0IHNrX2J1ZmYgKnNrYiwgc3RydWN0I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UE9SVF8xICk7Ci19IC8vIHdsX3R4X3BvcnQxCisJREJHX1RYKERiZ0luZm8sICJUeCBvbiBQb3J0IDFcbiIpOworCXJldHVybiB3bF90eChza2IsIGRldiwgSENGX1BPUlRfMSk7Cit9CQkJCS8qIHdsX3R4X3BvcnQxICovCisKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0xMjkxLDExICsxMjk5LDEyIEBACiAgKiAgICAgIE4vQQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQgd2xfdHhfcG9ydDIoIHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgKQoraW50IHdsX3R4X3BvcnQyKHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCiB7Ci0gICAgREJHX1RYKCBEYmdJbmZvLCAiVHggb24gUG9ydCAyXG4iICk7Ci0gICAgcmV0dXJuIHdsX3R4KCBza2IsIGRldiwgSENGX1BPUlRfMiApOwotfSAvLyB3bF90eF9wb3J0MgorCURCR19UWChEYmdJbmZvLCAiVHggb24gUG9ydCAyXG4iKTsKKwlyZXR1cm4gd2xfdHgoc2tiLCBkZXYsIEhDRl9QT1JUXzIpOworfQkJCQkvKiB3bF90eF9wb3J0MiAqLworCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtMTMxNiwxMSArMTMyNSwxMiBAQAogICogICAgICBOL0EKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IHdsX3R4X3BvcnQzKCBzdHJ1Y3Qgc2tfYnVmZiAqc2tiLCBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2ICkKK2ludCB3bF90eF9wb3J0MyhzdHJ1Y3Qgc2tfYnVmZiAqc2tiLCBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewotICAgIERCR19UWCggRGJnSW5mbywgIlR4IG9uIFBvcnQgM1xuIiApOwotICAgIHJldHVybiB3bF90eCggc2tiLCBkZXYsIEhDRl9QT1JUXzMgKTsKLX0gLy8gd2xfdHhfcG9ydDMKKwlEQkdfVFgoRGJnSW5mbywgIlR4IG9uIFBvcnQgM1xuIik7CisJcmV0dXJuIHdsX3R4KHNrYiwgZGV2LCBIQ0ZfUE9SVF8zKTsKK30JCQkJLyogd2xfdHhfcG9ydDMgKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTEzNDEsMTEgKzEzNTEsMTIgQEAKICAqICAgICAgTi9BCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLWludCB3bF90eF9wb3J0NCggc3RydWN0IHNrX2J1ZmYgKnNrYiwgc3RydWN0IG5ldF9kZXZpY2UgKmRldiApCitpbnQgd2xfdHhfcG9ydDQoc3RydWN0IHNrX2J1ZmYgKnNrYiwgc3RydWN0IG5ldF9kZXZpY2UgKmRldikKIHsKLSAgICBEQkdfVFgoIERiZ0luZm8sICJUeCBvbiBQb3J0IDRcbiIgKTsKLSAgICByZXR1cm4gd2xfdHgoIHNrYiwgZGV2LCBIQ0ZfUE9SVF80ICk7Ci19IC8vIHdsX3R4X3BvcnQ0CisJREJHX1RYKERiZ0luZm8sICJUeCBvbiBQb3J0IDRcbiIpOworCXJldHVybiB3bF90eChza2IsIGRldiwgSENGX1BPUlRfNCk7Cit9CQkJCS8qIHdsX3R4X3BvcnQ0ICovCisKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0xMzY2LDExICsxMzc3LDEyIEBACiAgKiAgICAgIE4vQQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQgd2xfdHhfcG9ydDUoIHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYgKQoraW50IHdsX3R4X3BvcnQ1KHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCiB7Ci0gICAgREJHX1RYKCBEYmdJbmZvLCAiVHggb24gUG9ydCA1XG4iICk7Ci0gICAgcmV0dXJuIHdsX3R4KCBza2IsIGRldiwgSENGX1BPUlRfNSApOwotfSAvLyB3bF90eF9wb3J0NQorCURCR19UWChEYmdJbmZvLCAiVHggb24gUG9ydCA1XG4iKTsKKwlyZXR1cm4gd2xfdHgoc2tiLCBkZXYsIEhDRl9QT1JUXzUpOworfQkJCQkvKiB3bF90eF9wb3J0NSAqLworCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtMTM5MSwxMSArMTQwMywxMiBAQAogICogICAgICBOL0EKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IHdsX3R4X3BvcnQ2KCBzdHJ1Y3Qgc2tfYnVmZiAqc2tiLCBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2ICkKK2ludCB3bF90eF9wb3J0NihzdHJ1Y3Qgc2tfYnVmZiAqc2tiLCBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewotICAgIERCR19UWCggRGJnSW5mbywgIlR4IG9uIFBvcnQgNlxuIiApOwotICAgIHJldHVybiB3bF90eCggc2tiLCBkZXYsIEhDRl9QT1JUXzYgKTsKLX0gLy8gd2xfdHhfcG9ydDYKKwlEQkdfVFgoRGJnSW5mbywgIlR4IG9uIFBvcnQgNlxuIik7CisJcmV0dXJuIHdsX3R4KHNrYiwgZGV2LCBIQ0ZfUE9SVF82KTsKK30JCQkJLyogd2xfdHhfcG9ydDYgKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTE0MTcsNTAgKzE0MzAsNTIgQEAKICAqICAgICAgc3RydWN0cyBpbiB0aGUgcHJpdmF0ZSBhZGFwdGVyIHN0cnVjdHVyZS4KICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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3RhcnRfeG1pdCA9ICZ3bF90eF9wb3J0NDsKKwlscC0+d2RzX3BvcnRbNF0uZGV2LT5oYXJkX3N0YXJ0X3htaXQgPSAmd2xfdHhfcG9ydDU7CisJbHAtPndkc19wb3J0WzVdLmRldi0+aGFyZF9zdGFydF94bWl0ID0gJndsX3R4X3BvcnQ2OwogCi0gICAgV0xfV0RTX05FVElGX1NUT1BfUVVFVUUoIGxwICk7Ci19IC8vIHdsX3dkc19kZXZpY2VfYWxsb2MKKwlXTF9XRFNfTkVUSUZfU1RPUF9RVUVVRShscCk7Cit9CQkJCS8qIHdsX3dkc19kZXZpY2VfYWxsb2MgKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTE0ODAsMjYgKzE0OTUsMjcgQEAKICAqICAgICAgTi9BCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgd2xfd2RzX2RldmljZV9kZWFsbG9jKCBzdHJ1Y3Qgd2xfcHJpdmF0ZSAqbHAgKQordm9pZCB3bF93ZHNfZGV2aWNlX2RlYWxsb2Moc3RydWN0IHdsX3ByaXZhdGUgKmxwKQogewotICAgIGludCBjb3VudDsKKwlpbnQgY291bnQ7CiAKLSAgICBmb3IoIGNvdW50ID0gMDsgY291bnQgPCBOVU1fV0RTX1BPUlRTOyBjb3VudCsrICkgewotICAgICAgICBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2X3dkcyA9IE5VTEw7CisJZm9yIChjb3VudCA9IDA7IGNvdW50IDwgTlVNX1dEU19QT1JUUzsgY291bnQrKykgeworCQlzdHJ1Y3QgbmV0X2RldmljZSAqZGV2X3dkcyA9IE5VTEw7CiAKLSAgICAgICAgZGV2X3dkcyA9IGxwLT53ZHNfcG9ydFtjb3VudF0uZGV2OworCQlkZXZfd2RzID0gbHAtPndkc19wb3J0W2NvdW50XS5kZXY7CiAKLSAgICAgICAgaWYoIGRldl93ZHMgIT0gTlVMTCApIHsKLSAgICAgICAgICAgIGlmKCBkZXZfd2RzLT5mbGFncyAmIElGRl9VUCApIHsKLSAgICAgICAgICAgICAgICBkZXZfY2xvc2UoIGRldl93ZHMgKTsKLSAgICAgICAgICAgICAgICBkZXZfd2RzLT5mbGFncyAmPSB+KCBJRkZfVVAgfCBJRkZfUlVOTklORyApOwotICAgICAgICAgICAgfQorCQlpZiAoZGV2X3dkcyAhPSBOVUxMKSB7CisJCQlpZiAoZGV2X3dkcy0+ZmxhZ3MgJiBJRkZfVVApIHsKKwkJCQlkZXZfY2xvc2UoZGV2X3dkcyk7CisJCQkJZGV2X3dkcy0+ZmxhZ3MgJj0gfihJRkZfVVAgfCBJRkZfUlVOTklORyk7CisJCQl9CiAKLSAgICAgICAgICAgIGZyZWVfbmV0ZGV2KGRldl93ZHMpOwotICAgICAgICAgICAgbHAtPndkc19wb3J0W2NvdW50XS5kZXYgPSBOVUxMOwotICAgICAgICB9Ci0gICAgfQotfSAvLyB3bF93ZHNfZGV2aWNlX2RlYWxsb2MKKwkJCWZyZWVfbmV0ZGV2KGRldl93ZHMpOworCQkJbHAtPndkc19wb3J0W2NvdW50XS5kZXYgPSBOVUxMOworCQl9CisJfQorfQkJCQkvKiB3bF93ZHNfZGV2aWNlX2RlYWxsb2MgKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTE1MjAsMjEgKzE1MzYsMjIgQEAKICAqICAgICAgTi9BCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgd2xfd2RzX25ldGlmX3N0YXJ0X3F1ZXVlKCBzdHJ1Y3Qgd2xfcHJpdmF0ZSAqbHAgKQordm9pZCB3bF93ZHNfbmV0aWZfc3RhcnRfcXVldWUoc3RydWN0IHdsX3ByaXZhdGUgKmxwKQogewotICAgIGludCBjb3VudDsKKwlpbnQgY291bnQ7CiAgICAgLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwogCi0gICAgaWYoIGxwICE9IE5VTEwgKSB7Ci0gICAgICAgIGZvciggY291bnQgPSAwOyBjb3VudCA8IE5VTV9XRFNfUE9SVFM7IGNvdW50KysgKSB7Ci0gICAgICAgICAgICBpZiggbHAtPndkc19wb3J0W2NvdW50XS5pc19yZWdpc3RlcmVkICYmCi0gICAgICAgICAgICAgICAgbHAtPndkc19wb3J0W2NvdW50XS5uZXRpZl9xdWV1ZV9vbiA9PSBGQUxTRSApIHsKLSAgICAgICAgICAgICAgICBuZXRpZl9zdGFydF9xdWV1ZSggbHAtPndkc19wb3J0W2NvdW50XS5kZXYgKTsKLSAgICAgICAgICAgICAgICBscC0+d2RzX3BvcnRbY291bnRdLm5ldGlmX3F1ZXVlX29uID0gVFJVRTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgIH0KLX0gLy8gd2xfd2RzX25ldGlmX3N0YXJ0X3F1ZXVlCisJaWYgKGxwICE9IE5VTEwpIHsKKwkJZm9yIChjb3VudCA9IDA7IGNvdW50IDwgTlVNX1dEU19QT1JUUzsgY291bnQrKykgeworCQkJaWYgKGxwLT53ZHNfcG9ydFtjb3VudF0uaXNfcmVnaXN0ZXJlZCAmJgorCQkJICAgIGxwLT53ZHNfcG9ydFtjb3VudF0ubmV0aWZfcXVldWVfb24gPT0gRkFMU0UpIHsKKwkJCQluZXRpZl9zdGFydF9xdWV1ZShscC0+d2RzX3BvcnRbY291bnRdLmRldik7CisJCQkJbHAtPndkc19wb3J0W2NvdW50XS5uZXRpZl9xdWV1ZV9vbiA9IFRSVUU7CisJCQl9CisJCX0KKwl9Cit9CQkJCS8qIHdsX3dkc19uZXRpZl9zdGFydF9xdWV1ZSAqLworCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtMTU1NSwyMSArMTU3MiwyMiBAQAogICogICAgICBOL0EKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotdm9pZCB3bF93ZHNfbmV0aWZfc3RvcF9xdWV1ZSggc3RydWN0IHdsX3ByaXZhdGUgKmxwICkKK3ZvaWQgd2xfd2RzX25ldGlmX3N0b3BfcXVldWUoc3RydWN0IHdsX3ByaXZhdGUgKmxwKQogewotICAgIGludCBjb3VudDsKKwlpbnQgY291bnQ7CiAgICAgLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwogCi0gICAgaWYoIGxwICE9IE5VTEwgKSB7Ci0gICAgICAgIGZvciggY291bnQgPSAwOyBjb3VudCA8IE5VTV9XRFNfUE9SVFM7IGNvdW50KysgKSB7Ci0gICAgICAgICAgICBpZiggbHAtPndkc19wb3J0W2NvdW50XS5pc19yZWdpc3RlcmVkICYmCi0gICAgICAgICAgICAgICAgbHAtPndkc19wb3J0W2NvdW50XS5uZXRpZl9xdWV1ZV9vbiA9PSBUUlVFICkgewotICAgICAgICAgICAgICAgIG5ldGlmX3N0b3BfcXVldWUoIGxwLT53ZHNfcG9ydFtjb3VudF0uZGV2ICk7Ci0gICAgICAgICAgICAgICAgbHAtPndkc19wb3J0W2NvdW50XS5uZXRpZl9xdWV1ZV9vbiA9IEZBTFNFOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgfQotfSAvLyB3bF93ZHNfbmV0aWZfc3RvcF9xdWV1ZQorCWlmIChscCAhPSBOVUxMKSB7CisJCWZvciAoY291bnQgPSAwOyBjb3VudCA8IE5VTV9XRFNfUE9SVFM7IGNvdW50KyspIHsKKwkJCWlmIChscC0+d2RzX3BvcnRbY291bnRdLmlzX3JlZ2lzdGVyZWQgJiYKKwkJCSAgICBscC0+d2RzX3BvcnRbY291bnRdLm5ldGlmX3F1ZXVlX29uID09IFRSVUUpIHsKKwkJCQluZXRpZl9zdG9wX3F1ZXVlKGxwLT53ZHNfcG9ydFtjb3VudF0uZGV2KTsKKwkJCQlscC0+d2RzX3BvcnRbY291bnRdLm5ldGlmX3F1ZXVlX29uID0gRkFMU0U7CisJCQl9CisJCX0KKwl9Cit9CQkJCS8qIHdsX3dkc19uZXRpZl9zdG9wX3F1ZXVlICovCisKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0xNTkwLDIxICsxNjA4LDIyIEBACiAgKiAgICAgIE4vQQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIHdsX3dkc19uZXRpZl93YWtlX3F1ZXVlKCBzdHJ1Y3Q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3F1ZXVlX29uID0gVFJVRTsKKwkJCX0KKwkJfQorCX0KK30JCQkJLyogd2xfd2RzX25ldGlmX3dha2VfcXVldWUgKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTE2MjUsMTkgKzE2NDQsMTkgQEAKICAqICAgICAgTi9BCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLXZvaWQgd2xfd2RzX25ldGlmX2NhcnJpZXJfb24oIHN0cnVjdCB3bF9wcml2YXRlICpscCApCit2b2lkIHdsX3dkc19uZXRpZl9jYXJyaWVyX29uKHN0cnVjdCB3bF9wcml2YXRlICpscCkKIHsKLSAgICBpbnQgY291bnQ7CisJaW50IGNvdW50OwogICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KIAotICAgIGlmKCBscCAhPSBOVUxMICkgewotICAgICAgICBmb3IoIGNvdW50ID0gMDsgY291bnQgPCBOVU1fV0RTX1BPUlRTOyBjb3VudCsrICkgewotICAgICAgICAgICAgaWYoIGxwLT53ZHNfcG9ydFtjb3VudF0uaXNfcmVnaXN0ZXJlZCApIHsKLSAgICAgICAgICAgICAgICBuZXRpZl9jYXJyaWVyX29uKCBscC0+d2RzX3BvcnRbY291bnRdLmRldiApOwotICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgfQotfSAvLyB3bF93ZHNfbmV0aWZfY2Fycmllcl9vbgorCWlmIChscCAhPSBOVUxMKSB7CisJCWZvciAoY291bnQgPSAwOyBjb3VudCA8IE5VTV9XRFNfUE9SVFM7IGNvdW50KyspIHsKKwkJCWlmIChscC0+d2RzX3BvcnRbY291bnRdLmlzX3JlZ2lzdGVyZWQpCisJCQkJbmV0aWZfY2Fycmllcl9vbihscC0+d2RzX3BvcnRbY291bnRdLmRldik7CisJCX0KKwl9Cit9CQkJCS8qIHdsX3dkc19uZXRpZl9jYXJyaWVyX29uICovCisKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0xNjU4LDIxICsxNjc3LDIyIEBACiAgKiAgICAgIE4vQQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi12b2lkIHdsX3dkc19uZXRpZl9jYXJyaWVyX29mZiggc3RydWN0IHdsX3ByaXZhdGUgKmxwICkKK3ZvaWQgd2xfd2RzX25ldGlmX2NhcnJpZXJfb2ZmKHN0cnVjdCB3bF9wcml2YXRlICpscCkKIHsKIAlpbnQgY291bnQ7CiAKLQlpZihscCAhPSBOVUxMKSB7Ci0JCWZvcihjb3VudCA9IDA7IGNvdW50IDwgTlVNX1dEU19QT1JUUzsgY291bnQrKykgewotCQkJaWYobHAtPndkc19wb3J0W2NvdW50XS5pc19yZWdpc3RlcmVkKQorCWlmIChscCAhPSBOVUxMKSB7CisJCWZvciAoY291bnQgPSAwOyBjb3VudCA8IE5VTV9XRFNfUE9SVFM7IGNvdW50KyspIHsKKwkJCWlmIChscC0+d2RzX3BvcnRbY291bnRdLmlzX3JlZ2lzdGVyZWQpCiAJCQkJbmV0aWZfY2Fycmllcl9vZmYobHAtPndkc19wb3J0W2NvdW50XS5kZXYpOwogCQl9CiAJfQogCi19IC8vIHdsX3dkc19uZXRpZl9jYXJyaWVyX29mZgorfQkJCQkvKiB3bF93ZHNfbmV0aWZfY2Fycmllcl9vZmYgKi8KKwogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAotI2VuZGlmICAvKiBVU0VfV0RTICovCisjZW5kaWYgLyogVVNFX1dEUyAqLwogCiAjaWZkZWYgRU5BQkxFX0RNQQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTE2OTUsNzAgKzE3MTUsNzEgQEAKICAqICAgICAgMSBvbiBlcnJvcgogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1pbnQgd2xfc2VuZF9kbWEoIHN0cnVjdCB3bF9wcml2YXRlICpscCwgc3RydWN0IHNrX2J1ZmYgKnNrYiwgaW50IHBvcnQgKQoraW50IHdsX3NlbmRfZG1hKHN0cnVjdCB3bF9wcml2YXRlICpscCwgc3RydWN0IHNrX2J1ZmYgKnNrYiwgaW50IHBvcnQpCiB7Ci0gICAgaW50ICAgICAgICAgbGVuOwotICAgIERFU0NfU1RSQ1QgKmRlc2MgPSBOVUxMOwotICAgIERFU0NfU1RSQ1QgKmRlc2NfbmV4dCA9IE5VTEw7CisJaW50IGxlbjsKKwlERVNDX1NUUkNUICpkZXNjID0gTlVMTDsKKwlERVNDX1NUUkNUICpkZXNjX25leHQgPSBOVUxMOwogICAgIC8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KIAotICAgIGlmKCBscCA9PSBOVUxMICkgewotICAgICAgICBEQkdfRVJST1IoIERiZ0luZm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HF1ZXVlIGNsZWFudXAsIGFzIHRoZSBidWZmZXIgd2FzCi0gICAgICAgICAgICB0cmFuc21pdHRlZCBzdWNjZXNzZnVsbHkgKi8KLSAgICBkZXZfa2ZyZWVfc2tiKCBza2IgKTsKKwkvKiBGcmVlIHRoZSBza2IgYW5kIHBlcmZvcm0gcXVldWUgY2xlYW51cCwgYXMgdGhlIGJ1ZmZlciB3YXMKKwkgICB0cmFuc21pdHRlZCBzdWNjZXNzZnVsbHkgKi8KKwlkZXZfY29uc3VtZV9za2JfYW55KCBza2IgKTsKIAotICAgIHJldHVybiBUUlVFOwotfSAvLyB3bF9zZW5kX2RtYQorCXJldHVybiBUUlVFOworfQkJCQkvKiB3bF9zZW5kX2RtYSAqLworCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtMTc3OSwxNDcgKzE4MDAsMTUyIEBACiAgKiAgICAgIDEgb24gZXJyb3IKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IHdsX3J4X2RtYSggc3RydWN0IG5ldF9kZXZpY2UgKmRldiApCitpbnQgd2xfcnhfZG1hKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCiB7Ci0gICAgaW50ICAgICAgICAgICAgICAgICAgICAgIHBvcnQ7Ci0gICAgaGNmXzE2ICAgICAgICAgICAgICAgICAgIHBrdGxlbjsKLSAgICBoY2ZfMTYgICAgICAgICAgICAgICAgICAgaGZzX3N0YXQ7Ci0gICAgc3RydWN0IHNrX2J1ZmYgICAgICAgICAgKnNrYjsKLSAgICBzdHJ1Y3Qgd2xfcHJpdmF0ZSAgICAgICAqbHAg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iKTsKKwkJCXJldHVybiAtRUlPOworCQl9CisjZW5kaWYgLyogVVNFX1JUUyAqLwogCi0gICAgICAgIC8vaWYoIGxwLT5kbWEuc3RhdHVzID09IDAgKQotICAgICAgICAvL3sKLSAgICAgICAgICAgIGRlc2MgPSBoY2ZfZG1hX3J4X2dldCggJiggbHAtPmhjZkN0eCApKTsKKwkJLyoKKwkJICppZiggbHAtPmRtYS5zdGF0dXMgPT0gMCApCisJCSAqeworCQkgKi8KKwkJZGVzYyA9IGhjZl9kbWFfcnhfZ2V0KCYobHAtPmhjZkN0eCkpOwogCi0gICAgICAgICAgICBpZiggZGVzYyAhPSBOVUxMICkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAvKiBDaGVjayBhbmQgc2VlIGlmIHdlIHJjdmQuIGEgV01QIGZyYW1lICovCi0gICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICBpZigoKCAqKGhjZl84ICopJmRlc2MtPmJ1Zl9hZGRyW0hGU19TVEFUXSApICYKLSAgICAgICAgICAgICAgICAgICAgKCBIRlNfU1RBVF9NU0dfVFlQRSB8IEhGU19TVEFUX0VSUiApKSA9PSBIRlNfU1RBVF9XTVBfTVNHICkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgIERCR19UUkFDRSggRGJnSW5mbywgIkdvdCBhIFdNUCBmcmFtZVxuIiApOworCQlpZiAoZGVzYyAhPSBOVUxMKSB7CisJCQkvKiBDaGVjayBhbmQgc2VlIGlmIHdlIHJjdmQuIGEgV01QIGZyYW1lICovCisJCQkvKgorCQkJICAgaWYoKCggKihoY2ZfOCAqKSZkZXNjLT5idWZfYWRkcltIRlNfU1RBVF0gKSAmCisJCQkgICAoIEhGU19TVEFUX01TR19UWVBFIHwgSEZTX1NUQVRfRVJSICkpID09IEhGU19TVEFUX1dNUF9NU0cgKQorCQkJICAgeworCQkJICAgREJHX1RSQUNFKCBEYmdJbmZvLCAiR290IGEgV01QIGZyYW1lXG4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pOwotICAgICAgICAgICAgICAgICAgICBpZiAoc2tiICE9IE5VTEwpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCggcG9ydCApIHsKKwkJCXBrdGxlbiA9IEdFVF9CVUZfQ05UKGRlc2NfbmV4dCk7CisJCQlpZiAocGt0bGVuICE9IDApIHsKKwkJCQlza2IgPSBBTExPQ19TS0IocGt0bGVuKTsKKwkJCQlpZiAoc2tiICE9IE5VTEwpIHsKKwkJCQkJc3dpdGNoIChwb3J0KSB7CiAjaWZkZWYgVVNFX1dEUwotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxOgotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAyOgotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAzOgotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA0OgotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA1OgotICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA2OgotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNrYi0+ZGV2ID0gbHAtPndkc19wb3J0W3BvcnQtMV0uZGV2OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotI2VuZGlmICAvKiBVU0VfV0RTICovCisJCQkJCWNhc2UgMToKKwkJCQkJY2FzZSAyOgorCQkJCQljYXNlIDM6CisJCQkJCWNhc2UgNDoKKwkJCQkJY2FzZSA1OgorCQkJCQljYXNlIDY6CisJCQkJCQlza2ItPmRldiA9CisJCQkJCQkgICAgbHAtPndkc19wb3J0W3BvcnQgLSAxXS5kZXY7CisJCQkJCQlicmVhazsKKyNlbmRpZiAvKiBVU0VfV0RTICovCiAKLSAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMDoKLSAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiLT5kZXYgPSBkZXY7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9CisJCQkJCWNhc2UgMDoKKwkJCQkJZGVmYXVsdDoKKwkJCQkJCXNrYi0+ZGV2ID0gZGV2OworCQkJCQkJYnJlYWs7CisJCQkJCX0KIAotICAgICAgICAgICAgICAgICAgICAgICAgR0VUX1BBQ0tFVF9ETUEoIHNrYi0+ZGV2LCBza2IsIHBrdGxlbiApOworCQkJCQlHRVRfUEFDS0VUX0RNQShza2ItPmRldiwgc2tiLCBwa3RsZW4pOwogCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiBHaXZlIHRoZSBkZXNjcmlwdG9yIGJhY2sgdG8gdGhlIEhDRiAqLwotICAgICAgICAgICAgICAgICAgICAgICAgaGNmX2RtYV9yeF9wdXQoICYoIGxwLT5oY2ZDdHggKSwgZGVzYyApOworCQkJCQkvKiBHaXZlIHRoZSBkZXNjcmlwdG9yIGJhY2sgdG8gdGhlIEhDRiAqLworCQkJCQloY2ZfZG1hX3J4X3B1dCgmKGxwLT5oY2ZDdHgpLCBkZXNjKTsKIAotICAgICAgICAgICAgICAgICAgICAgICAgbmV0aWZfcngoIHNrYiApOworCQkJCQluZXRpZl9yeChza2IpOwogCi0gICAgICAgICAgICAgICAgICAgICAgICBpZiggcG9ydCA9PSAwICkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxwLT5zdGF0cy5yeF9wYWNrZXRzKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgbHAtPnN0YXRzLnJ4X2J5dGVzICs9IHBrdGxlbjsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KKwkJCQkJaWYgKHBvcnQgPT0gMCkgeworCQkJCQkJbHAtPnN0YXRzLnJ4X3BhY2tldHMrKzsKKwkJCQkJCWxwLT5zdGF0cy5yeF9ieXRlcyArPSBwa3RsZW47CisJCQkJCX0KICNpZmRlZiBVU0VfV0RTCi0gICAgICAgICAgICAgICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgbHAtPndkc19wb3J0W3BvcnQtMV0uc3RhdHMucnhfcGFja2V0cysrOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxwLT53ZHNfcG9ydFtwb3J0LTFdLnN0YXRzLnJ4X2J5dGVzICs9IHBrdGxlbjsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSNlbmRpZiAgLyogVVNFX1dEUyAqLworCQkJCQllbHNlIHsKKwkJCQkJCWxwLT53ZHNfcG9ydFtwb3J0IC0KKwkJCQkJCQkgICAgIDFdLnN0YXRzLgorCQkJCQkJICAgIHJ4X3BhY2tldHMrKzsKKwkJCQkJCWxwLT53ZHNfcG9ydFtwb3J0IC0KKwkJCQkJCQkgICAgIDFdLnN0YXRzLgorCQkJCQkJICAgIHJ4X2J5dGVzICs9IHBrdGxlbjsKKwkJCQkJfQorI2VuZGlmIC8qIFVTRV9XRFMgKi8KIAotICAgICAgICAgICAgICAgICAgICAgICAgZGV2LT5sYXN0X3J4ID0gamlmZmllczsKKwkJCQkJZGV2LT5sYXN0X3J4ID0gamlmZmllczsKIAotICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgREJHX0VSUk9SKCBEYmdJbmZvLCAiQ291bGQgbm90IGFsbG9jIHNrYlxuIiApOworCQkJCX0gZWxzZSB7CisJCQkJCURCR19FUlJPUihEYmdJbmZvLAorCQkJCQkJICAiQ291bGQgbm90IGFsbG9jIHNrYlxuIik7CiAKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBwb3J0ID09IDAgKQotCSAgICAgICAgICAgICAgICAgICAgewotCSAgICAgICAgICAgICAgICAgICAgICAgIGxwLT5zdGF0cy5yeF9kcm9wcGVkKys7Ci0JICAgICAgICAgICAgICAgICAgICB9CisJCQkJCWlmIChwb3J0ID09IDApCisJCQkJCQlscC0+c3RhdHMucnhfZHJvcHBlZCsrOwogI2lmZGVmIFVTRV9X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LyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCXBlcmNlbnQoKQotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiAgREVTQ1JJUFRJT046Ci0gKgotICogICAgICBSZXR1cm4gYSB2YWx1ZSBhcyBhIHBlcmNlbnRhZ2Ugb2YgbWluIHRvIG1heC4KLSAqCi0gKiAgUEFSQU1FVEVSUzoKLSAqCi0gKiAgICAgIHZhbHVlICAgLSB0aGUgdmFsdWUgaW4gcXVlc3Rpb24KLSAqICAgICAgbWluICAgICAtIHRoZSBtaW5pbXVtIHJhbmdlIHZhbHVlCi0gKiAgICAgIG1heCAgICAgLSB0aGUgbWF4aW11bSByYW5nZSB2YWx1ZQotICoKLSAqICBSRVRVUk5TOgotICoKLSAqICAgICAgdGhlIHBlcmNlbnRhZ2UgdmFsdWUKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotaW50IHBlcmNlbnQoIGludCB2YWx1ZSwgaW50IG1pbiwgaW50IG1heCApCi17Ci0gICAgLyogVHJ1bmNhdGUgdGhlIHZhbHVlIHRvIGJlIGJldHdlZW4gbWluIGFuZCBtYXguICovCi0gICAgaWYoIHZhbHVlIDwgbWluICkKLSAgICAgICAgdmFsdWUgPSBtaW47Ci0KLSAgICBpZiggdmFsdWUgPiBtYXggKQotICAgICAgICB2YWx1ZSA9IG1heDsKLQotICAgIC8qIFJldHVybiB0aGUgdmFsdWUgYXMgYSBwZXJjZW50YWdlIG9mIG1pbiB0byBtYXguICovCi0gICAgcmV0dXJuICgoKCB2YWx1ZSAtIG1pbiApICogMTAwICkgLyAoIG1heCAtIG1pbiApKTsKLX0gLy8gcGVyY2VudAotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KLQotCi0KLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCWlzX3ZhbGlkX2tleV9zdHJpbmcoKQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy93bGFnczQ5X2gyL3dsX3dleHQuYyBiL2RyaXZlcnMvc3RhZ2luZy93bGFnczQ5X2gyL3dsX3dleHQuYwppbmRleCAxODdmYzA2Li40OWVlZWFlIDEwMDY0NAotLS0gYS9kcml2ZXJzL3N0YWdpbmcvd2xhZ3M0OV9oMi93bF93ZXh0LmMKKysrIGIvZHJpdmVycy9zdGFnaW5nL3dsYWdzNDlfaDIvd2xfd2V4dC5jCkBAIC0zMzU0LDcgKzMzNTQsNyBAQAogCSAgIHRoZSBjYWxsIHRvIHdpcmVsZXNzX3NlbmRfZXZlbnQoKSBtdXN0IGFsc28gcG9pbnQgdG8gd2hlcmUgdGhlIEVTU0lECiAJICAgbGl2ZXMgKi8KIAl3cnF1LmVzc2lkLmxlbmd0aCAgPSBzdHJsZW4oIGxwLT5OZXR3b3JrTmFtZSApOwotCXdycXUuZXNzaWQucG9pbnRlciA9IChjYWRkcl90KWxwLT5OZXR3b3JrTmFtZTsKKwl3cnF1LmVzc2lkLnBvaW50ZXIgPSAodm9pZCBfX3VzZXIgKilscC0+TmV0d29ya05hbWU7CiAJd3JxdS5lc3NpZC5mbGFncyAgID0gMTsKIAogCXdpcmVsZXNzX3NlbmRfZXZlbnQoIGRldiwgU0lPQ1NJV0VTU0lELCAmd3JxdSwgbHAtPk5ldHdvcmtOYW1lICk7CkBAIC0zNDE5L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iB1c2JfaW50ZXJmYWNlICovCisJCWlmbnVtID0gZmluZGludGZlcChwcy0+ZGV2LCBlcCk7CisJCWlmIChpZm51bSA8IDApIHsKKwkJCXJldCA9IGlmbnVtOworCQkJZ290byBlcnJvcjsKKwkJfQorCisJCWlmIChpID09IDApIHsKKwkJCXJldCA9IGNoZWNraW50ZihwcywgaWZudW0pOworCQkJaWYgKHJldCA8IDApCisJCQkJZ290byBlcnJvcjsKKwkJCWludGYgPSB1c2JfaWZudW1fdG9faWYocHMtPmRldiwgaWZudW0pOworCQl9IGVsc2UgeworCQkJLyogVmVyaWZ5IGFsbCBlcHMgYmVsb25nIHRvIHRoZSBzYW1lIGludGVyZmFjZSAqLworCQkJaWYgKGlmbnVtICE9IGludGYtPmFsdHNldHRpbmctPmRlc2MuYkludGVyZmFjZU51bWJlcikgeworCQkJCXJldCA9IC1FSU5WQUw7CisJCQkJZ290byBlcnJvcjsKKwkJCX0KKwkJfQorCX0KKworCWlmIChudW1fc3RyZWFtc19yZXQpCisJCSpudW1fc3RyZWFtc19yZXQgPSBudW1fc3RyZWFtczsKKwkqbnVtX2Vwc19yZXQgPSBudW1fZXBzOworCSplcHNfcmV0ID0gZXBzOworCSppbnRmX3JldCA9IGludGY7CisKKwlyZXR1cm4gMDsKKworZXJyb3I6CisJa2ZyZWUoZXBzKTsKKwlyZXR1cm4gcmV0OworfQorCiBzdGF0aWMgaW50IG1hdGNoX2RldnQoc3RydWN0IGRldmljZSAqZGV2LCB2b2lkICpkYXRhKQogewogCXJldHVybiBkZXYtPmRldnQgPT0gKGRldl90KSAodW5zaWduZWQgbG9uZykgZGF0YTsKQEAgLTc5MSwxMSArODczLDExIEBACiBzdGF0aWMgaW50IHVzYmRldl9vcGVuKHN0cnVjdCBpbm9kZSAqaW5vZGUsIHN0cnVjdCBmaWxlICpmaWxlKQogewogCXN0cnVjdCB1c2JfZGV2aWNlICpkZXYgPSBOVUxMOwotCXN0cnVjdCBkZXZfc3RhdGUgKnBzOworCXN0c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kgKiAuICAgICAgICAgICAgICAgICAgICAgICAgKGlubyAyNTYpCisJICogfC0tIGEvICAgICAgICAgICAgICAgICAgIChpbm8gMjU3KQorCSAqICAgICB8LS0gYi8gICAgICAgICAgICAgICAoaW5vIDI1OCkKKwkgKiAgICAgICAgIHwtLSBjLyAgICAgICAgICAgKGlubyAyNTkpCisJICogICAgICAgICB8ICAgfC0tIHgvICAgICAgIChpbm8gMjYwKQorCSAqICAgICAgICAgfAorCSAqICAgICAgICAgfC0tIHkvICAgICAgICAgICAoaW5vIDI2MSkKKwkgKgorCSAqIFNlbmQgc25hcHNob3Q6CisJICoKKwkgKiAuICAgICAgICAgICAgICAgICAgICAgICAgKGlubyAyNTYpCisJICogfC0tIGEvICAgICAgICAgICAgICAgICAgIChpbm8gMjU3KQorCSAqICAgICB8LS0gYi8gICAgICAgICAgICAgICAoaW5vIDI1OCkKKwkgKiAgICAgICAgIHwtLSBZWS8gICAgICAgICAgKGlubyAyNjEpCisJICogICAgICAgICAgICAgIHwtLSB4LyAgICAgIChpbm8gMjYwKQorCSAqCisJICogU2VxdWVuY2Ugb2Ygc3RlcHMgdGhhdCBsZWFkIHRvIHRoZSBzZW5kIHNuYXBzaG90OgorCSAqIHJtIC1mIC9hL2IvYy9mb28udHh0CisJICogbXYgL2EvYi95IC9hL2IvWVkKKwkgKiBtdiAvYS9iL2MveCAvYS9iL1lZCisJICogcm1kaXIgL2EvYi9jCisJICoKKwkgKiBXaGVuIHRoZSBjaGlsZCBpcyBwcm9jZXNzZWQsIGl0cyBtb3ZlL3JlbmFtZSBpcyBkZWxheWVkIHVudGlsIGl0cworCSAqIHBhcmVudCBpcyBwcm9jZXNzZWQgKGFzIGV4cGxhaW5lZCBhYm92ZSksIGJ1dCBhbGwgb3RoZXIgb3BlcmF0aW9ucworCSAqIGxpa2UgdXBkYXRlIHV0aW1lcywgY2hvd24sIGNoZ3JwLCBldGMsIGFyZSBwZXJmb3JtZWQgYW5kIHRoZSBwYXRocworCSAqIHRoY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WxzLgorICogQG5fcGluczogICAgVGhlIG51bWJlciBvZiBwcm9ncmFtbWFibGUgcGlucy4KICAqIEBwcHM6ICAgICAgIEluZGljYXRlcyB3aGV0aGVyIHRoZSBjbG9jayBzdXBwb3J0cyBhIFBQUyBjYWxsYmFjay4KKyAqIEBwaW5fY29uZmlnOiBBcnJheSBvZiBsZW5ndGggJ25fcGlucycuIElmIHRoZSBudW1iZXIgb2YKKyAqICAgICAgICAgICAgICBwcm9ncmFtbWFibGUgcGlucyBpcyBub256ZXJvLCB0aGVuIGRyaXZlcnMgbXVzdAorICogICAgICAgICAgICAgIGFsbG9jYXRlIGFuZCBpbml0aWFsaXplIHRoaXMgYXJyYXkuCiAgKgogICogY2xvY2sgb3BlcmF0aW9ucwogICoKQEAgLTcwLDYgKzc0LDE4IEBACiAgKiAgICAgICAgICAgIHBhcmFtZXRlciByZXF1ZXN0OiBEZXNpcmVkIHJlc291cmNlIHRvIGVuYWJsZSBvciBkaXNhYmxlLgogICogICAgICAgICAgICBwYXJhbWV0ZXIgb246IENhbGxlciBwYXNzZXMgb25lIHRvIGVuYWJsZSBvciB6ZXJvIHRvIGRpc2FibGUuCiAgKgorICogQHZlcmlmeTogICBDb25maXJtIHRoYXQgYSBwaW4gY2FuIHBlcmZvcm0gYSBnaXZlbiBmdW5jdGlvbi4gVGhlIFBUUAorICogICAgICAgICAgICBIYXJkd2FyZSBDbG9jayBzdWJzeXN0ZW0gbWFpbnRhaW5zIHRoZSAncGluX2NvbmZpZycKKyAqICAgICAgICAgICAgYXJyYXkgb24gYmVoYWxmIG9mIHRoZSBkcml2ZXJzLCBidXQgdGhlIFBIQyBzdWJzeXN0ZW0KKyAqICAgICAgICAgICAgYXNzdW1lcyB0aGF0IGV2ZXJ5IHBpbiBjYW4gcGVyZm9ybSBldmVyeSBmdW5jdGlvbi4gVGhpcworICogICAgICAgICAgICBob29rIGdpdmVzIGRyaXZlcnMgYSB3YXkgb2YgdGVsbGluZyB0aGUgY29yZSBhYm91dA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CisJdTMyCQljbnRfbWVtX2FsbG9jOworCXUzMgkJY250X21lbV9wdXQ7CisJdTMyCQljbnRfbWVtX2dldF9kbWFidWY7CisJdTMyCQljbnRfbWVtX2dldF91c2VycHRyOworCXUzMgkJY250X21lbV9wdXRfdXNlcnB0cjsKKwl1MzIJCWNudF9tZW1fcHJlcGFyZTsKKwl1MzIJCWNudF9tZW1fZmluaXNoOworCXUzMgkJY250X21lbV9hdHRhY2hfZG1hYnVmOworCXUzMgkJY250X21lbV9kZXRhY2hfZG1hYnVmOworCXUzMgkJY250X21lbV9tYXBfZG1hYnVmOworCXUzMgkJY250X21lbV91bm1hcF9kbWFidWY7CisJdTMyCQljbnRfbWVtX3ZhZGRyOworCXUzMgkJY250X21lbV9jb29raWU7CisJdTMyCQljbnRfbWVtX251bV91c2VyczsKKwl1MzIJCWNudF9tZW1fbW1hcDsKKworCXUzMgkJY250X2J1Zl9pbml0OworCXUzMgkJY250X2J1Zl9wcmVwYXJlOworCXUzMgkJY250X2J1Zl9maW5pc2g7CisJdTMyCQljbnRfYnVmX2NsZWFudXA7CisJdTMyCQljbnRfYnVmX3F1ZXVlOworCisJLyogVGhpcyBjb3VudHMgdGhlIG51bWJlciBvZiBjYWxscyB0byB2YjJfYnVmZmVyX2RvbmUoKSAqLworCXUzMgkJY250X2J1Zl9kb25lOworI2VuZGlmCiB9OwogCiAvKioKQEAgLTIyNywyNyArMjU4LDM1IEBACiAgKiBAd2FpdF9wcmVwYXJlOglyZWxlYXNlIGFueSBsb2NrcyB0YWtlbiB3aGlsZSBjYWxsaW5nIHZiMiBmdW5jdGlvbnM7CiAgKgkJCWl0IGlzIGNhbGxlZCBiZWZvcmUgYW4gaW9jdGwgbmVlZHMgdG8gd2FpdCBmb3IgYSBuZXcKICAqCQkJYnVmZmVyIHRvIGFycml2ZTsgcmVxdWlyZWQgdG8gYXZvaWQgYSBkZWFkbG9jayBpbgotICoJCQlibG9ja2luZyBhY2Nlc3MgdHlwZQorICoJCQlibG9ja2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wpCisKKyk7CisKK0RFRklORV9FVkVOVChzc3RfaXBjX21haWxib3gsIHNzdF9pcGNfb3V0Ym94X3JkYXRhLAorCisJVFBfUFJPVE8odW5zaWduZWQgaW50IG9mZnNldCwgdW5zaWduZWQgaW50IHZhbCksCisKKwlUUF9BUkdTKG9mZnNldCwgdmFsKQorCispOworCitERUZJTkVfRVZFTlQoc3N0X2lwY19tYWlsYm94LCBzc3RfaXBjX291dGJveF93ZGF0YSwKKworCVRQX1BST1RPKHVuc2lnbmVkIGludCBvZmZzZXQsIHVuc2lnbmVkIGludCB2YWwpLAorCisJVFBfQVJHUyhvZmZzZXQsIHZhbCkKKworKTsKKworREVDTEFSRV9FVkVOVF9DTEFTUyhzc3RfaXBjX21haWxib3hfaW5mbywKKworCVRQX1BST1RPKHVuc2lnbmVkIGludCBzaXplKSwKKworCVRQX0FSR1Moc2l6ZSksCisKKwlUUF9TVFJVQ1RfX2VudHJ5KAorCQlfX2ZpZWxkKAl1bnNpZ25lZCBpbnQsCXNpemUJCSkKKwkpLAorCisJVFBfZmFzdF9hc3NpZ24oCisJCV9fZW50cnktPnNpemUgPSBzaXplOworCSksCisKKwlUUF9wcmludGsoIk1haWxib3ggYnl0ZXMgMHglOC44eCIsICh1bnNpZ25lZCBpbnQpX19lbnRyeS0+c2l6ZSkKKyk7CisKK0RFRklORV9FVkVOVChzc3RfaXBjX21haWxib3hfaW5mbywgc3N0X2lwY19pbmJveF9yZWFkLAorCisJVFBfUFJPVE8odW5zaWduZWQgaW50IHNpemUpLAorCisJVFBfQVJHUyhzaXplKQorCispOworCitERUZJTkVfRVZFTlQoc3N0X2lwY19tYWlsYm94X2luZm8sIHNzdF9pcGNfaW5ib3hfd3JpdGUsCisKKwlUUF9QUk9UTyh1bnNpZ25lZCBpbnQgc2l6ZSksCisKKwlUUF9BUkdTKHNpemUpCisKKyk7CisKK0RFRklORV9FVkVOVChzc3RfaXBjX21haWxib3hfaW5mbywgc3N0X2lwY19vdXRib3hfcmVhZCwK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iAgMCAgICAgICAgICAgICAgICAgICAxICAgICAgICAgICAgICAgICAgIDIgICAgICAgICAgICAgICAgICAgMworICogIDAgMSAyIDMgNCA1IDYgNyA4IDkgMCAxIDIgMyA0IDUgNiA3IDggOSAwIDEgMiAzIDQgNSA2IDcgOCA5IDAgMQorICogKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSsKKyAqIHwgICAgICAgICAgICAgICAgTGFiZWwgICAgICAgICAgICAgICAgICB8IFRDICB8U3wgICAgICAgVFRMICAgICB8CisgKiArLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKy0rLSstKworICoKKyAqCUxhYmVsOiAgTGFiZWwgVmFsdWUsIDIwIGJpdHMKKyAqCVRDOiAgICAgVHJhZmZpYyBDbGFzcyBmaWVsZCwgMyBiaXRzCisgKglTOiAgICAgIEJvdHRvbSBvZiBTdGFjaywgMSBiaXQKKyAqCVRUTDogICAgVGltZSB0byBMaXZlLCA4IGJpdHMKKyAqLworCitzdHJ1Y3QgbXBsc19sYWJlbCB7CisJX19iZTMyIGVudHJ5OworfTsKKworI2RlZmluZSBNUExTX0xTX0xBQkVMX01BU0sgICAgICAweEZGRkZGMDAwCisjZGVmaW5lIE1QTFNfTFNfTEFCRUxfU0hJRlQgICAgIDEyCisjZGVmaW5lIE1QTFNfTFNfVENfTUFTSyAgICAgICAgIDB4MDAwMDBFMDAKKyNkZWZpbmUgTVBMU19MU19UQ19TSElGVCAgICAgICAgOQorI2RlZmluZSBNUExTX0xTX1NfTUFTSyAgICAgICAgICAweDAwMDAwMTAwCisjZGVmaW5lIE1QTFNfTFNfU19TSElGVCAgICAgICAgIDgKKyNkZWZpbmUgTVBMU19MU19UVExfTUFTSyAgICAgICAgMHgwMDAwMDBGRgorI2RlZmluZSBNUExTX0xTX1RUTF9TSElGVCAgICAgICAwCisKKyNlbmR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RlZmluZSBEQkVfQ09ORklHX0ZCREVWICAgICAgICAoIERCRV9DT05GSUdfVkRBQ19FTkFCTEUgfCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCRV9DT05GSUdfVkRBQ19HU1lOQyAgfCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCRV9DT05GSUdfVkRBQ19QQkxBTksgfCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCRV9DT05GSUdfTEVORElBTiAgICAgfCBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCRV9DT05GSUdfRVhUX0FERFIgKQotCi0vKgotICogQXZhaWxhYmxlIFZpZGVvIFRpbWluZ3MgYW5kIENvcnJlc3BvbmRpbmcgSW5kaWNlcwotICovCi0KLXR5cGVkZWYgZW51bSB7Ci0gIERCRV9WVF82NDBfNDgwXzYwLAotCi0gIERCRV9WVF84MDBfNjAwXzYwLAotICBEQkVfVlRfODAwXzYwMF83NSwKLSAgREJFX1ZUXzgwMF82MDBfMTIwLAotCi0gIERCRV9WVF8xMDI0Xzc2OF81MCwKLSAgREJFX1ZUXzEwMjRfNzY4XzYwLAotICBEQkVfVlRfMTAyNF83NjhfNzUsCi0gIERCRV9WVF8xMDI0Xzc2OF84NSwKLSAgREJFX1ZUXzEwMjRfNzY4XzEyMCwKLQotICBEQkVfVlRfMTI4MF8xMDI0XzUwLAotICBEQkVfVlRfMTI4MF8xMDI0XzYwLAotICBEQkVfVlRfMTI4MF8xMDI0Xzc1LAotICBEQkVfVlRfMTI4MF8xMDI0Xzg1LAotCi0gIERCRV9WVF8xNjAwXzEwMjRfNTMsCi0gIERCRV9WVF8xNjAwXzEwMjRfNjAsCi0KLSAgREJFX1ZUXzE2MDBfMTIwMF81MCwKLSAgREJFX1ZUXzE2MDBfMTIwMF82MCwKLSAgREJFX1ZUXzE2MDBfMTIwMF83NSwKLQotICBEQkVfVlRfMTky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hbCwgdmJsYW5rX3N0YXJ0LCAgIHZibGFua19lbmQsICAgICB2c3luY19zdGFydCwgICAgdnN5bmNfZW5kICovCi0gICAgMTA2NywgICAxMDI0LCAgICAgICAgICAgMTA2NywgICAgICAgICAgIDEwMjcsICAgICAgICAgICAxMDMwLAotICAgIC8qIHBsbF9tLCAgcGxsX24sICAgICAgICAgIHBsbF9wICovCi0gICAgNCwgICAgICAxLCAgICAgICAgICAgICAgMAotICB9LAotCi0gIHsKLSAgICBEQkVfVlRfMTYwMF8xMDI0XzYwLAotICAgIC8qIGZsYWdzLAkJCQkJd2lkdGgsICAgICAgICAgIGhlaWdodCwJCQlmaWVsZHNfc2VjLCAgICAgY2ZyZXEgKi8KLSAgICBEQkVfVk9GX0ZMQVRQQU5FTCwgICAxNjAwLCAgICAgICAgICAgMTAyNCwJCQk2MDAwMCwgICAgICAgICAgMTA2OTEzLAotICAgIC8qIGh0b3RhbCwgaGJsYW5rX3N0YXJ0LCAgIGhibGFua19lbmQsICAgICBoc3luY19zdGFydCwgICAgaHN5bmNfZW5kICovCi0gICAgMTY3MCwgICAxNjAwLCAgICAgICAgICAgMTY3MCwgICAgICAgICAgIDE2MzAsICAgICAgICAgICAxNjUwLAotICAgIC8qIHZ0b3RhbCwgdmJsYW5rX3N0YXJ0LCAgIHZibGFua19lbmQsICAgICB2c3luY19zdGFydCwgICAgdnN5bmNfZW5kICovCi0gICAgMTA2NywgICAxMDI0LCAgICAgICAgICAgMTA2NywgICAgICAgICAgIDEwMjcsICAgICAgICAgICAxMDMwLAotICAgIC8qIHBsbF9tLCAgcGxsX24sICAgICAgICAgIHBsbF9wICovCi0gICAgNCwgICAgICAxLCAgICAgICAgICAgICAgMAotICB9LAotCi0gIHsKLSAgICBEQkVfVlRfMTYwMF8xMjAwXzUwLAotICAgIC8qIGZsYWdzLCAgd2lkdGgsICAgICAgICAgIGhlaWdodCwgICAgICAgICBmaWVsZHNfc2VjLCAgICAgY2ZyZXEgKi8KLSAgICAwLCAgICAgIDE2MDAsICAgICAgICAgICAxMjAwLCAgICAgICAgICAgNTAwMDAsICAgICAgICAgIDEzMDUwMCwKLSAgICAvKiBodG90YWwsIGhibGFua19zdGFydCwgICBoYmxhbmtfZW5kLCAgICAgaHN5bmNfc3RhcnQsICAgIGhzeW5jX2VuZCAqLwotICAgIDIwODgsICAgMTYwMCwgICAgICAgICAgIDIwODgsICAgICAgICAgICAxNjQ0LCAgICAgICAgICAgMTc2NCwKLSAgICAvKiB2dG90YWwsIHZibGFua19zdGFydCwgICB2YmxhbmtfZW5kLCAgICAgdnN5bmNfc3RhcnQsICAgIHZzeW5jX2VuZCAqLwotICAgIDEyNTAsICAgMTIwMCwgICAgICAgICAgIDEyNTAsICAgICAgICAgICAxMjA1LCAgICAgICAgICAgMTIxMSwKLSAgICAvKiBwbGxfbSwgIHBsbF9uLCAgICAgICAgICBwbGxfcCAqLwotICAgIDI0LCAgICAgNSwgICAgICAgICAgICAgIDAKLSAgfSwKLQotICB7Ci0gICAgREJFX1ZUXzE2MDBfMTIwMF82MCwKLSAgICAvKiBmbGFncywgIHdpZHRoLCAgICAgICAgICBoZWlnaHQsICAgICAgICAgZmllbGRzX3NlYywgICAgIGNmcmVxICovCi0gICAgMCwgICAgICAxNjAwLCAgICAgICAgICAgMTIwMCwgICAgICAgICAgIDU5OTQwLCAgICAgICAgICAxNjIwMDAsCi0gICAgLyogaHRvdGFsLCBoYmxhbmtfc3RhcnQsICAgaGJsYW5rX2VuZCwgICAgIGhzeW5jX3N0YXJ0LCAgICBoc3luY19lbmQgKi8KLSAgICAyMTYwLCAgIDE2MDAsICAgICAgICAgICAyMTYwLCAgICAgICAgICAgMTY0NCwgICAgICAgICAgIDE4NTYsCi0gICAgLyogdnRvdGFsLCB2Ymxhbmtfc3RhcnQsICAgdmJsYW5rX2VuZCwgICAgIHZzeW5jX3N0YXJ0LCAgICB2c3luY19lbmQgKi8KLSAgICAxMjUwLCAgIDEyMDAsICAgICAgICAgICAxMjUwLCAgICAgICAgICAgMTIwMSwgICAgICAgICAgIDEyMDQsCi0gICAgLyogcGxsX20sICBwbGxfbiwgICAgICAgICAgcGxsX3AgKi8KLSAgICA2LAkJMSwgICAgICAgICAgICAgIDAKLSAgfSwKLQotICB7Ci0gICAgREJFX1ZUXzE2MDBfMTIwMF83NSwKLSAgICAvKiBmbGFncywgIHdpZHRoLCAgICAgICAgICBoZWlnaHQsICAgICAgICAgZmllbGRzX3NlYywgICAgIGNmcmVxICovCi0gICAgMCwgICAgICAxNjAwLCAgICAgICAgICAgMTIwMCwgICAgICAgICAgIDc1MDAwLCAgICAgICAgICAyMDI1MDAsCi0gICAgLyogaHRvdGFsLCBoYmxhbmtfc3RhcnQsICAgaGJsYW5rX2VuZCwgICAgIGhzeW5jX3N0YXJ0LCAgICBoc3luY19lbmQgKi8KLSAgICAyMTYwLCAgIDE2MDAsICAgICAgICAgICAyMTYwLCAgICAgICAgICAgMTY0NCwgICAgICAgICAgIDE4NTYsCi0gICAgLyogdnRvdGFsLCB2Ymxhbmtfc3RhcnQsICAgdmJsYW5rX2VuZCwgICAgIHZzeW5jX3N0YXJ0LCAgICB2c3luY19lbmQgKi8KLSAgICAxMjUwLCAgIDEyMDAsICAgICAgICAgICAxMjUwLCAgICAgICAgICAgMTIwMSwgICAgICAgICAgIDEyMDQsCi0gICAgLyogcGxsX20sICBwbGxfbiwgICAgICAgICAgcGxsX3AgKi8KLSAgICAxNSwJCTIsICAgICAgICAgICAgICAwCi0gIH0sCi0KLSAgewotICAgIERCRV9WVF8xOTIwXzEwODBfNTAsCi0gICAgLyogZmxhZ3MsICB3aWR0aCwgICAgICAgICAgaGVpZ2h0LCAgICAgICAgIGZpZWxkc19zZWMsICAgICBjZnJlcSAqLwotICAgIDAsICAgICAgMTkyMCwgICAgICAgICAgIDEwODAsICAgICAgICAgICA1MDAwMCwgICAgICAgICAgMTMzMjAwLAotICAgIC8qIGh0b3RhbCwgaGJsYW5rX3N0YXJ0LCAgIGhibGFua19lbmQsICAgICBoc3luY19zdGFydCwgICAgaHN5bmNfZW5kICovCi0gICAgMjM2OCwgICAxOTIwLCAgICAgICAgICAgMjM2OCwgICAgICAgICAgIDE5NTIsICAgICAgICAgICAyMDk2LAotICAgIC8qIHZ0b3RhbCwgdmJsYW5rX3N0YXJ0LCAgIHZibGFua19lbmQsICAgICB2c3luY19zdGFydCwgICAgdnN5bmNfZW5kICovCi0gICAgMTEyNSwgICAxMDgwLCAgICAgICAgICAgMTEyNSwgICAgICAgICAgIDEwODMsICAgICAgICAgICAxMDg2LAotICAgIC8qIHBsbF9tLCAgcGxsX24sICAgICAgICAgIHBsbF9wICovCi0gICAgNSwgICAgICAxLCAgICAgICAgICAgICAgMAotICB9LAotCi0gIHsKLSAgICBEQkVfVlRfMTkyMF8xMDgwXzYwLAotICAgIC8qIGZsYWdzLCAgd2lkdGgsICAgICAgICAgIGhlaWdodCwgICAgICAgICBmaWVsZHNfc2VjLCAgICAgY2ZyZXEgKi8KLSAgICAwLCAgICAgIDE5MjAsICAgICAgICAgICAxMDgwLCAgICAgICAgICAgNTk5NDAsICAgICAgICAgIDE1OTg0MCwKLSAgICAvKiBodG90YWwsIGhibGFua19zdGFydCwgICBoYmxhbmtfZW5kLCAgICAgaHN5bmNfc3RhcnQsICAgIGhzeW5jX2VuZCAqLwotICAgIDIzNjgsICAgMTkyMCwgICAgICAgICAgIDIzNjgsICAgICAgICAgICAxOTUyLCAgICAgICAgICAgMjA5NiwKLSAgICAvKiB2dG90YWwsIHZibGFua19zdGFydCwgICB2YmxhbmtfZW5kLCAgICAgdnN5bmNfc3RhcnQsICAgIHZzeW5jX2VuZCAqLwotICAgIDExMjUsICAgMTA4MCwgICAgICAgICAgIDExMjUsICAgICAgICAgICAxMDgzLCAgICAgICAgICAgMTA4NiwKLSAgICAvKiBwbGxfbSwgIHBsbF9uLCAgICAgICAgICBwbGxfcCAqLwotICAgIDYsICAgICAgMSwgICAgICAgICAgICAgIDAKLSAgfSwKLQotICB7Ci0gICAgREJFX1ZUXzE5MjBfMTA4MF83MiwKLSAgICAvKiBmbGFncywgIHdpZHRoLCAgICAgICAgICBoZWlnaHQsICAgICAgICAgZmllbGRzX3NlYywgICAgIGNmcmVxICovCi0gICAgMCwgICAgICAxOTIwLCAgICAgICAgICAgMTA4MCwgICAgICAgICAgIDcyMDAwLCAgICAgICAgICAyMTYwMjMsCi0gICAgLyogaHRvdGFsLCBoYmxhbmtfc3RhcnQsICAgaGJsYW5rX2VuZCwgICAgIGhzeW5jX3N0YXJ0LCAgICBoc3luY19lbmQgKi8KLSAgICAyNTYwLCAgIDE5MjAsICAgICAgICAgICAyNTYwLCAgICAgICAgICAgMTk2OCwgICAgICAgICAgIDIxODQsCi0gICAgLyogdnRvdGFsLCB2Ymxhbmtfc3RhcnQsICAgdmJsYW5rX2VuZCwgICAgIHZzeW5jX3N0YXJ0LCAgICB2c3luY19lbmQgKi8KLSAgICAxMTcyLCAgIDEwODAsICAgICAgICAgICAxMTcyLCAgICAgICAgICAgMTA4MywgICAgICAgICAgIDEwODYsCi0gICAgLyogcGxsX20sICBwbGxfbiwgICAgICAgICAgcGxsX3AgKi8KLSAgICA4LCAgICAgIDEsICAgICAgICAgICAgICAwCi0gIH0sCi0KLSAgewotICAgIERCRV9WVF8xOTIwXzEyMDBfNTAsCi0gICAgLyogZmxhZ3MsICB3aWR0aCwgICAgICAgICAgaGVpZ2h0LCAgICAgICAgIGZpZWxkc19zZWMsICAgICBjZnJlcSAqLwotICAgIDAsICAgICAgMTkyMCwgICAgICAgICAgIDEyMDAsICAgICAgICAgICA1MDAwMCwgICAgICAgICAgMTYxNTAwLAotICAgIC8qIGh0b3RhbCwgaGJsYW5rX3N0YXJ0LCAgIGhibGFua19lbmQsICAgICBoc3luY19zdGFydCwgICAgaHN5bmNfZW5kICovCi0gICAgMjU4NCwgICAxOTIwLCAgICAgICAgICAgMjU4NCwgICAgICAgICAgIDE5ODQsICAgICAgICAgICAyMjQwLAotICAgIC8qIHZ0b3RhbCwgdmJsYW5rX3N0YXJ0LCAgIHZibGFua19lbmQsICAgICB2c3luY19zdGFydCwgICAgdnN5bmNfZW5kICovCi0gICAgMTI1MCwgICAxMjAwLCAgICAgICAgICAgMTI1MCwgICAgICAgICAgIDEyMDMsICAgICAgICAgICAxMjA2LAotICAgIC8qIHBsbF9tLCAgcGxsX24sICAgICAgICAgIHBsbF9wICovCi0gICAgNiwgICAgICAxLCAgICAgICAgICAgICAgMAotICB9LAotCi0gIHsKLSAgICBEQkVfVlRfMTkyMF8xMjAwXzYwLAotICAgIC8qIGZsYWdzLCAgd2lkdGgsICAgICAgICAgIGhlaWdodCwgICAgICAgICBmaWVsZHNfc2VjLCAgICAgY2ZyZXEgKi8KLSAgICAwLCAgICAgIDE5MjAsICAgICAgICAgICAxMjAwLCAgICAgICAgICAgNTk5NDAsICAgICAgICAgIDE5MzgwMCwKLSAgICAvKiBodG90YWwsIGhibGFua19zdGFydCwgICBoYmxhbmtfZW5kLCAgICAgaHN5bmNfc3RhcnQsICAgIGhzeW5jX2VuZCAqLwotICAgIDI1ODQsICAgMTkyMCwgICAgICAgICAgIDI1ODQsICAgICAgICAgICAxOTg0LCAgICAgICAgICAgMjI0MCwKLSAgICAvKiB2dG90YWwsIHZibGFua19zdGFydCwgICB2YmxhbmtfZW5kLCAgICAgdnN5bmNfc3RhcnQsICAgIHZzeW5jX2VuZCAqLwotICAgIDEyNTAsICAgMTIwMCwgICAgICAgICAgIDEyNTAsICAgICAgICAgICAxMjAzLCAgICAgICAgICAgMTIwNiwKLSAgICAvKiBwbGxfbSwgIHBsbF9uLCAgICAgICAgICBwbGxfcCAqLwotICAgIDI5LCAgICAgNCwgICAgICAgICAgICAgIDAKLSAgfSwKLQotICB7Ci0gICAgREJFX1ZUXzE5MjBfMTIwMF82NiwKLSAgICAvKiBmbGFncywgIHdpZHRoLCAgICAgICAgICBoZWlnaHQsICAgICAgICAgZmllbGRzX3NlYywgICAgIGNmcmVxICovCi0gICAgMCwgICAgICAxOTIwLCAgICAgICAgICA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ogCkBAIC00OTc5LDEzICs1NjM2LDMyIEBACiAJCWNtZF9zdGF0dXMoY21kLT5zaywgaGRldi0+aWQsIE1HTVRfT1BfUkVBRF9MT0NBTF9PT0JfREFUQSwKIAkJCSAgIG1nbXRfc3RhdHVzKHN0YXR1cykpOwogCX0gZWxzZSB7Ci0JCXN0cnVjdCBtZ210X3JwX3JlYWRfbG9jYWxfb29iX2RhdGEgcnA7CisJCWlmICh0ZXN0X2JpdChIQ0lfU0NfRU5BQkxFRCwgJmhkZXYtPmRldl9mbGFncykgJiYKKwkJICAgIGhhc2gyNTYgJiYgcmFuZG9taXplcjI1NikgeworCQkJc3RydWN0IG1nbXRfcnBfcmVhZF9sb2NhbF9vb2JfZXh0X2RhdGEgcnA7CiAKLQkJbWVtY3B5KHJwLmhhc2gsIGhhc2gsIHNpemVvZihycC5oYXNoKSk7Ci0JCW1lbWNweShycC5yYW5kb21pemVyLCByYW5kb21pemVyLCBzaXplb2YocnAucmFuZG9taXplcikpOworCQkJbWVtY3B5KHJwLmhhc2gxOTIsIGhhc2gxOTIsIHNpemVvZihycC5oYXNoMTkyKSk7CisJCQltZW1jcHkocnAucmFuZG9taXplcjE5MiwgcmFuZG9taXplcjE5MiwKKwkJCSAgICAgICBzaXplb2YocnAucmFuZG9taXplcjE5MikpOwogCi0JCWNtZF9jb21wbGV0ZShjbWQtPnNrLCBoZGV2LT5pZCwgTUdNVF9PUF9SRUFEX0xPQ0FMX09PQl9EQVRBLAotCQkJICAgICAwLCAmcnAsIHNpemVvZihycCkpOworCQkJbWVtY3B5KHJwLmhhc2gyNTYsIGhhc2gyNTYsIHNpemVvZihycC5oYXNoMjU2KSk7CisJCQltZW1jcHkocnAucmFuZG9taXplcjI1NiwgcmFuZG9taXplcjI1NiwKKwkJCSAgICAgICBzaXplb2YocnAucmFuZG9taXplcjI1NikpOworCisJCQljbWRfY29tcGxldGUoY21kLT5zaywgaGRldi0+aWQsCisJCQkJICAgICBNR01UX09QX1JFQURfTE9DQUxfT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RhdGEgZmllbGRzICovCisJCWNhc2UgQlBGX0xEWCB8IEJQRl9BQlMgfCBCUEZfVzoKKwkJCWluc24tPmNvZGUgPSBCUEZfTERYIHwgQlBGX01FTSB8IEJQRl9XOworCQkJaW5zbi0+YV9yZWcgPSBBX1JFRzsKKwkJCWluc24tPnhfcmVnID0gQ1RYX1JFRzsKKwkJCWluc24tPm9mZiA9IGZwLT5rOworCQkJYnJlYWs7CisKKwkJZGVmYXVsdDoKKwkJCWdvdG8gZXJyOworCQl9CisKKwkJaW5zbisrOworCQlpZiAobmV3X3Byb2cpCisJCQltZW1jcHkobmV3X2luc24sIHRtcF9pbnNucywKKwkJCSAgICAgICBzaXplb2YoKmluc24pICogKGluc24gLSB0bXBfaW5zbnMpKTsKKworCQluZXdfaW5zbiArPSBpbnNuIC0gdG1wX2luc25zOworCX0KKworCWlmICghbmV3X3Byb2cpIHsKKwkJLyogT25seSBjYWxjdWxhdGluZyBuZXcgbGVuZ3RoLiAqLworCQkqbmV3X2xlbiA9IG5ld19pbnNuIC0gbmV3X3Byb2c7CisJCXJldHVybiAwOworCX0KKworCXBhc3MrKzsKKwlpZiAobmV3X2ZsZW4gIT0gbmV3X2luc24gLSBuZXdfcHJvZykgeworCQluZXdfZmxlbiA9IG5ld19pbnNuIC0gbmV3X3Byb2c7CisJCWlmIChwYXNzID4gMikKKwkJCWdvdG8gZXJyOworCisJCWdvdG8gZG9fcGFzczsKKwl9CisKKwlrZnJlZShhZGRycyk7CisJQlVHX09OKCpuZXdfbGVuICE9IG5ld19mbGVuKTsKKwlyZXR1cm4gMDsKK2VycjoKKwlrZnJlZShhZGRycyk7CisJcmV0dXJuIC1FSU5WQUw7Cit9CisKKy8qIFNlY3VyaXR5OgorICoKICAqIEEgQlBGIHByb2dyYW0gaXMgYWJsZSB0byB1c2UgMTYgY2VsbHMgb2YgbWVtb3J5IHRvIHN0b3JlIGludGVybWVkaWF0ZQotICogdmFsdWVzIChjaGVjayB1MzIgbWVtW0JQRl9NRU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XN0X2lwdjYgICAgICAgIDsgRVRIX1BfSVAgPworICogICBsZGIgWzIzXSAgICAgICAgICAgICAgICAgICAgICA7IGxvYWQgcHJvdG8KKyAqICAgam5lcSAjMTcsIGRyb3BfaXB2NCAgICAgICAgICAgOyBJUFBST1RPX1VEUCA/CisgKiAgIGxkaCBbMjBdICAgICAgICAgICAgICAgICAgICAgIDsgbG9hZCBmcmFnIG9mZnNldCBmaWVsZAorICogICBqc2V0ICMweDFmZmYsIGRyb3BfaXB2NCAgICAgICA7IGRvbid0IGFsbG93IGZyYWdtZW50cworICogICBsZHhiIDQqKFsxNF0mMHhmKSAgICAgICAgICAgICA7IGxvYWQgSVAgaGVhZGVyIGxlbgorICogICBsZGggW3ggKyAxNl0gICAgICAgICAgICAgICAgICA7IGxvYWQgVURQIGRzdCBwb3J0CisgKiAgIGpuZXEgIzMxOSwgZHJvcF9pcHY0ICAgICAgICAgIDsgaXMgcG9ydCBQVFBfRVZfUE9SVCA/CisgKiAgIGxkaCBbeCArIDIyXSAgICAgICAgICAgICAgICAgIDsgbG9hZCBwYXlsb2FkCisgKiAgIGFuZCAjMHhmICAgICAgICAgICAgICAgICAgICAgIDsgbWFzayBQVFBfQ0xBU1NfVk1BU0sKKyAqICAgb3IgIzB4MTAgICAgICAgICAgICAgICAgICAgICAgOyBQVFBfQ0xBU1NfSVBWNAorICogICByZXQgYSAgICAgICAgICAgICAgICAgICAgICAgICA7IHJldHVybiBQVFAgY2xhc3MKKyAqICAgZHJvcF9pcHY0OiByZXQgIzB4MCAgICAgICAgICAgOyBQVFBfQ0xBU1NfTk9ORQorICoKKyAqIDsgUFRQIG92ZXIgVURQIG92ZXIgSVB2NiBvdmVyIEV0aGVybmV0CisgKiB0ZXN0X2lwdjY6CisgKiAgIGpuZXEgIzB4ODZkZCwgdGVzdF84MDIxcSAgICAgIDsgRVRIX1BfSVBWNiA/CisgKiAgIGxkYiBbMjBdICAgICAgICAgICAgICAgICAgICAgIDsgbG9hZCBwcm90bworICogICBqbmVxICMxNywgZHJvcF9pcHY2ICAgICAgICAgICA7IElQUFJPVE9fVURQID8KKyAqICAgbGRoIFs1Nl0gICAgICAgICAgICAgICAgICAgICAgOyBsb2FkIFVEUCBkc3QgcG9ydAorICogICBqbmVxICMzMTksIGRyb3BfaXB2NiAgICAgICAgICA7IGlzIHBvcnQgUFRQX0VWX1BPUlQgPworICogICBsZGggWzYyXSAgICAgICAgICAgICAgICAgICAgICA7IGxvYWQgcGF5bG9hZAorICogICBhbmQgIzB4ZiAgICAgICAgICAgICAgICAgICAgICA7IG1hc2sgUFRQX0NMQVNTX1ZNQVNLCisgKiAgIG9yICMweDIwICAgICAgICAgICAgICAgICAgICAgIDsgUFRQX0NMQVNTX0lQVjYKKyAqICAgcmV0IGEgICAgICAgICAgICAgICAgICAgICAgICAgOyByZXR1cm4gUFRQIGNsYXNzCisgKiAgIGRyb3BfaXB2NjogcmV0ICMweDAgICAgICAgICAgIDsgUFRQX0NMQVNTX05PTkUKKyAqCisgKiA7IFBUUCBvdmVyIDgwMi4xUSBvdmVyIEV0aGVybmV0CisgKiB0ZXN0XzgwMjFxOgorICogICBqbmVxICMweDgxMDAsIHRlc3RfaWVlZTE1ODggICA7IEVUSF9QXzgwMjFRID8KKyAqICAgbGRoIFsxNl0gICAgICAgICAgICAgICAgICAgICAgOyBsb2FkIGlubmVyIHR5cGUKKyAqICAgam5lcSAjMHg4OGY3LCBkcm9wX2llZWUxNTg4ICAgOyBFVEhfUF8xNTg4ID8KKyAqICAgbGRiIFsxOF0gICAgICAgICAgICAgICAgICAgICAgOyBsb2FkIHBheWxvYWQKKyAqICAgYW5kICMweDggICAgICAgICAgICAgICAgICAgICAgOyBhcyB3ZSBkb24ndCBoYXZlIHBvcnRzIGhlcmUsIHRlc3QKKyAqICAgam5lcSAjMHgwLCBkcm9wX2llZWUxNTg4ICAgICAgOyBmb3IgUFRQX0dFTl9CSVQgYW5kIGRyb3AgdGhlc2UKKyAqICAgbGRoIFsxOF0gICAgICAgICAgICAgICAgICAgICAgOyByZWxvYWQgcGF5bG9hZAorICogICBhbmQgIzB4ZiAgICAgICAgICAgICAgICAgICAgICA7IG1hc2sgUFRQX0NMQVNTX1ZNQVNLCisgKiAgIG9yICMweDQwICAgICAgICAgICAgICAgICAgICAgIDsgUFRQX0NMQVNTX1YyX1ZMQU4KKyAqICAgcmV0IGEgICAgICAgICAgICAgICAgICAgICAgICAgOyByZXR1cm4gUFRQIGNsYXNzCisgKgorICogOyBQVFAgb3ZlciBFdGhlcm5ldAorICogdGVzdF9pZWVlMTU4ODoKKyAqICAgam5lcSAjMHg4OGY3LCBkcm9wX2llZWUxNTg4ICAgOyBFVEhfUF8xNTg4ID8KKyAqICAgbGRiIFsxNF0gICAgICAgICAgICAgICAgICAgICAgOyBsb2FkIHBheWxvYWQKKyAqICAgYW5kICMweDggICAgICAgICAgICAgICAgICAgICAgOyBhcyB3ZSBkb24ndCBoYXZlIHBvcnRzIGhlcmUsIHRlc3QKKyAqICAgam5lcSAjMHgwLCBkcm9wX2llZWUxNTg4ICAgICAgOyBmb3IgUFRQX0dFTl9CSVQgYW5kIGRyb3AgdGhlc2UKKyAqICAgbGRoIFsxNF0gICAgICAgICAgICAgICAgICAgICAgOyByZWxvYWQgcGF5bG9hZAorICogICBhbmQgIzB4ZiAgICAgICAgICAgICAgICAgICAgICA7IG1hc2sgUFRQX0NMQVNTX1ZNQVNLCisgKiAgIG9yICMweDMwICAgICAgICAgICAgICAgICAgICAgIDsgUFRQX0NMQVNTX0wyCisgKiAgIHJldCBhICAgICAgICAgICAgICAgICAgICAgICAgIDsgcmV0dXJuIFBUUCBjbGFzcworICogICBkcm9wX2llZWUxNTg4OiByZXQgIzB4MCAgICAgICA7IFBUUF9DTEFTU19OT05FCisgKi8KKworI2luY2x1ZGUgPGxpbnV4L3NrYnVmZi5oPgorI2luY2x1ZGUgPGxpbnV4L2ZpbHRlci5oPgorI2luY2x1ZGUgPGxpbnV4L3B0cF9jbGFzc2lmeS5oPgorCitzd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gcG9zLCBoZHItPmZjLnNvdXJjZV9hZGRyX21vZGUsCisJCQkJICAgICAgIGhkci0+ZmMuaW50cmFfcGFuLCAmaGRyLT5zb3VyY2UpOworCisJaWYgKGhkci0+ZmMuaW50cmFfcGFuKQorCQloZHItPnNvdXJjZS5wYW5faWQgPSBoZHItPmRlc3QucGFuX2lkOworCisJcmV0dXJuIHBvczsKK30KKworaW50CitpZWVlODAyMTU0X2hkcl9wdWxsKHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBpZWVlODAyMTU0X2hkciAqaGRyKQoreworCWludCBwb3MgPSAzLCByYzsKKworCWlmICghcHNrYl9tYXlfcHVsbChza2IsIDMpKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCW1lbWNweShoZHIsIHNrYi0+ZGF0YSwgMyk7CisKKwlyYyA9IGllZWU4MDIxNTRfaGRyX21pbmxlbihoZHIpOworCWlmIChyYyA8IDAgfHwgIXBza2JfbWF5X3B1bGwoc2tiLCByYykpCisJCXJldHVybiAtRUlOVkFMOworCisJcG9zICs9IGllZWU4MDIxNTRfaGRyX2dldF9hZGRycyhza2ItPmRhdGEgKyBwb3MsIGhkcik7CisKKwlpZiAoaGRyLT5mYy5zZWN1cml0eV9lbmFibGVkKSB7CisJCWludCB3YW50ID0gcG9zICsgaWVlZTgwMjE1NF9oZHJfc2VjaGRyX2xlbihza2ItPmRhdGFbcG9zXSk7CisKKwkJaWYgKCFwc2tiX21heV9wdWxsKHNrYiwgd2FudCkpCisJCQlyZXR1cm4gLUVJTlZBTDsKKworCQlwb3MgKz0gaWVlZTgwMjE1NF9oZHJfZ2V0X3NlY2hkcihza2ItPmRhdGEgKyBwb3MsICZoZHItPnNlYyk7CisJfQorCisJc2tiX3B1bGwoc2tiLCBwb3MpOworCXJldHVybiBwb3M7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChpZWVlODAyMTU0X2hkcl9wdWxsKTsKKworaW50CitpZWVlODAyMTU0X2hkcl9wZWVrX2FkZHJzKGNvb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gICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICBZWVNJWkVfVCB5eWk7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICBmb3IgKHl5aSA9IDA7IHl5aSA8IChDb3VudCk7IHl5aSsrKSAgIFwKKyAgICAgICAgICAgIChEc3QpW3l5aV0gPSAoU3JjKVt5eWldOyAgICAgICAgICAgIFwKKyAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKICAgICAgIHdoaWxlIChZWUlEICgwKSkKICMgIGVuZGlmCiAjIGVuZGlmCkBAIC01MTMsNyArNTQxLDcgQEAKIH07CiAjZW5kaWYKIAotI2lmIFlZREVCVUcgfHwgWVlFUlJPUl9WRVJCT1NFIHx8IFlZVE9LRU5fVEFCTEUKKyNpZiBZWURFQlVHIHx8IFlZRVJST1JfVkVSQk9TRSB8fCAwCiAvKiBZWVROQU1FW1NZTUJPTC1OVU1dIC0tIFN0cmluZyBuYW1lIG9mIHRoZSBzeW1ib2wgU1lNQk9MLU5VTS4KICAgIEZpcnN0LCB0aGUgdGVybWluYWxzLCB0aGVuLCBzdGFydGluZyBhdCBZWU5UT0tFTlMsIG5vbnRlcm1pbmFscy4gICovCiBzdGF0aWMgY29uc3QgY2hhciAqY29uc3QgeXl0bmFtZVtdID0KQEAgLTUzMCw3ICs1NTgsNyBAQAogICAiaW50ZWdlcl9leHByIiwgImludGVnZXJfdHJpbmFyeSIsICJpbnRlZ2VyX29yIiwgImludGVnZXJfYW5kIiwKICAgImludGVnZXJfYml0b3IiLCAiaW50ZWdlcl9iaXR4b3IiLCAiaW50ZWdlcl9iaXRhbmQiLCAiaW50ZWdlcl9lcSIsCiAgICJpbnRlZ2VyX3JlbGEiLCAiaW50ZWdlcl9zaGlmdCIsICJpbnRlZ2VyX2FkZCIsICJpbnRlZ2VyX211bCIsCi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kJCQkJCQlcCi0gICAgewkJCQkJCQkJXAorI2RlZmluZSBZWUJBQ0tVUChUb2tlbiwgVmFsdWUpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK2RvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgIGlmICh5eWNoYXIgPT0gWVlFTVBUWSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgIHl5Y2hhciA9IChUb2tlbik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICB5eWx2YWwgPSAoVmFsdWUpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgWVlQT1BTVEFDSyAoeXlsZW4pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgIHl5c3RhdGUgPSAqeXlzc3A7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICBnb3RvIHl5YmFja3VwOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgeXllcnJvciAoWVlfKCJzeW50YXggZXJyb3I6IGNhbm5vdCBiYWNrIHVwIikpOyBcCiAgICAgICBZWUVSUk9SOwkJCQkJCQlcCiAgICAgfQkJCQkJCQkJXAogd2hpbGUgKFlZSU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BWElNVU0pKQotICAgICAgICAgICAgICAgICAgcmV0dXJuIDI7Ci0gICAgICAgICAgICAgICAgeXlzaXplID0geXlzaXplMTsKKyAgICAgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgICBZWVNJWkVfVCB5eXNpemUxID0geXlzaXplICsgeXl0bmFtZXJyIChZWV9OVUxMLCB5eXRuYW1lW3l5eF0pOworICAgICAgICAgICAgICAgICAgaWYgKCEgKHl5c2l6ZSA8PSB5eXNpemUxCisgICAgICAgICAgICAgICAgICAgICAgICAgJiYgeXlzaXplMSA8PSBZWVNUQUNLX0FMTE9DX01BWElNVU0pKQorICAgICAgICAgICAgICAgICAgICByZXR1cm4gMjsKKyAgICAgICAgICAgICAgICAgIHl5c2l6ZSA9IHl5c2l6ZTE7CisgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICB9CiAgICAgICAgIH0KICAgICB9CkBAIC0xMTcyLDEwICsxMTcyLDEyIEBACiAjIHVuZGVmIFlZQ0FTRV8KICAgICB9CiAKLSAgeXlzaXplMSA9IHl5c2l6ZSArIHl5c3RybGVuICh5eWZvcm1hdCk7Ci0gIGlmICghICh5eXNpemUgPD0geXlzaXplMSAmJiB5eXNpemUxIDw9IFlZU1RBQ0tfQUxMT0NfTUFYSU1VTSkpCi0gICAgcmV0dXJuIDI7Ci0gIHl5c2l6ZSA9IHl5c2l6ZTE7CisgIHsKKyAgICBZWVNJWkVfVCB5eXNpemUxID0geXlzaXplICsgeXlzdHJsZW4gKHl5Zm9ybWF0KTsKKyAgICBpZiAoISAoeXlzaXplIDw9IHl5c2l6ZTEgJiYgeXlzaXplMSA8PSBZWVNUQUNLX0FMTE9DX01BWElNVU0pKQorICAgICAgcmV0dXJuIDI7CisgICAgeXlzaXplID0geXlzaXplMTsKKyAgfQogCiAgIGlmICgqeXltc2dfYWxsb2MgPCB5eXNpemUpCiAgICAgewpAQCAtMTIzMSwzNiArMTIzMywyNiBAQAogICAgIHl5bXNnID0gIkRlbGV0aW5nIjsKIC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QotLyogTGluZSAxODA2IG9mIHlhY2MuYyAgKi8KKy8qIExpbmUgMTc4NyBvZiB5YWNjLmMgICovCiAjbGluZSAzOTMgImR0Yy1wYXJzZXIueSIKICAgICB7ICh5eXZhbC5pbnRlZ2VyKSA9ICh5eXZzcFsoMSkgLSAoMyldLmludGVnZXIpID4gKHl5dnNwWygzKSAtICgzKV0uaW50ZWdlcik7IH0KICAgICBicmVhazsKIAogICBjYXNlIDU1OgotCi0vKiBMaW5lIDE4MDYgb2YgeWFjYy5jICAqLworLyogTGluZSAxNzg3IG9mIHlhY2MuYyAgKi8KICNsaW5lIDM5NCAiZHRjLXBhcnNlci55IgogICAgIHsgKHl5dmFsLmludGVnZXIpID0gKHl5dnNwWygxKSAtICgzKV0uaW50ZWdlcikgPD0gKHl5dnNwWygzKSAtICgzKV0uaW50ZWdlcik7IH0KICAgICBicmVhazsKIAogICBjYXNlIDU2OgotCi0vKiBMaW5lIDE4MDYgb2YgeWFjYy5jICAqLworLyogTGluZSAxNzg3IG9mIHlhY2MuYyAgKi8KICNsaW5lIDM5NSAiZHRjLXBhcnNlci55IgogICAgIHsgKHl5dmFsLmludGVnZXIpID0gKHl5dnNwWygxKSAtICgzKV0uaW50ZWdlcikgPj0gKHl5dnNwWygzKSAtICgzKV0uaW50ZWdlcik7IH0KICAgICBicmVhazsKIAogICBjYXNlIDU3OgotCi0vKiBMaW5lIDE4MDYgb2YgeWFjYy5jICAqLworLyogTGluZSAxNzg3IG9mIHlhY2MuYyAgKi8KICNsaW5lIDM5OSAiZHRjLXBhcnNlci55IgogICAgIHsgKHl5dmFsLmludGVnZXIpID0gKHl5dnNwWygxKSAtICgzKV0uaW50ZWdlcikgPDwgKHl5dnNwWygzKSAtICgzKV0uaW50ZWdlcik7IH0KICAgICBicmVhazsKIAogICBjYXNlIDU4OgotCi0vKiBMaW5lIDE4MDYgb2YgeWFjYy5jICAqLworLyogTGluZSAxNzg3IG9mIHlhY2MuYyAgKi8KICNsaW5lIDQwMCAiZ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4gMDsKIH0KKwordm9pZCB1dGlsZmR0X3ByaW50X2RhdGEoY29uc3QgY2hhciAqZGF0YSwgaW50IGxlbikKK3sKKwlpbnQgaTsKKwljb25zdCBjaGFyICpwID0gZGF0YTsKKwljb25zdCBjaGFyICpzOworCisJLyogbm8gZGF0YSwgZG9uJ3QgcHJpbnQgKi8KKwlpZiAobGVuID09IDApCisJCXJldHVybjsKKworCWlmICh1dGlsX2lzX3ByaW50YWJsZV9zdHJpbmcoZGF0YSwgbGVuKSkgeworCQlwcmludGYoIiA9ICIpOworCisJCXMgPSBkYXRhOworCQlkbyB7CisJCQlwcmludGYoIlwiJXNcIiIsIHMpOworCQkJcyArPSBzdHJsZW4ocykgKyAxOworCQkJaWYgKHMgPCBkYXRhICsgbGVuKQorCQkJCXByaW50ZigiLCAiKTsKKwkJfSB3aGlsZSAocyA8IGRhdGEgKyBsZW4pOworCisJfSBlbHNlIGlmICgobGVuICUgNCkgPT0gMCkgeworCQljb25zdCB1aW50MzJfdCAqY2VsbCA9IChjb25zdCB1aW50MzJfdCAqKWRhdGE7CisKKwkJcHJpbnRmKCIgPSA8Iik7CisJCWZvciAoaSA9IDA7IGkgPCBsZW47IGkgKz0gNCkKKwkJCXByaW50ZigiMHglMDh4JXMiLCBmZHQzMl90b19jcHUoY2VsbFtpXSksCisJCQkgICAgICAgaSA8IChsZW4gLSA0KSA/ICIgIiA6ICIiKTsKKwkJcHJpbnRmKCI+Iik7CisJfSBlbHNlIHsKKwkJcHJpbnRmKCIgPSBbIik7CisJCWZvciAoaSA9IDA7IGkgPCBsZW47IGkrKykKKwkJCXByaW50ZigiJTAyeCVzIiwgKnArKywgaSA8IGxlbiAtIDEgPyAiICIgOiAiIik7CisJCXByaW50ZigiXSIpOworCX0KK30KKwordm9pZCB1dGlsX3ZlcnNpb24odm9pZCkKK3sKKwlwcmludGYoIlZlcnNpb246ICVzXG4iLCBEVENfVkVSU0lPTik7CisJZXhpdCgwKTsKK30KKwordm9pZCB1dGlsX3Vz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yb20sIENvdW50KQkJXAotICAgICAgZG8JCQkJCVwKLQl7CQkJCQlcCi0JICBZWVNJWkVfVCB5eWk7CQkJCVwKLQkgIGZvciAoeXlpID0gMDsgeXlpIDwgKENvdW50KTsgeXlpKyspCVwKLQkgICAgKFRvKVt5eWldID0gKEZyb20pW3l5aV07CQlcCi0JfQkJCQkJXAorIyAgIGRlZmluZSBZWUNPUFkoRHN0LCBTcmMsIENvdW50KSAgICAgICAgICAgICAgXAorICAgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgIFlZU0laRV9UIHl5aTsgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgIGZvciAoeXlpID0gMDsgeXlpIDwgKENvdW50KTsgeXlpKyspICAgXAorICAgICAgICAgICAgKERzdClbeXlpXSA9IChTcmMpW3l5aV07ICAgICAgICAgICAgXAorICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogICAgICAgd2hpbGUgKFlZSUQgKDApKQogIyAgZW5kaWYKICMgZW5kaWYKQEAgLTQxNywyMCArNDI3LDIwIEBACiAvKiBZWUZJTkFMIC0tIFN0YXRlIG51bWJlciBvZiB0aGUgdGVybWluYXRpb24gc3RhdGUuICAqLwogI2RlZmluZSBZWUZJTkFMICA0CiAvKiBZWUxBU1QgLS0gTGFzdCBpbmRleCBpbiBZWVRBQkxFLiAgKi8KLSNkZWZpbmUgWVlMQVNUICAgNTMyCisjZGVmaW5lIFlZTEFTVCAgIDUxNAogCiAvKiBZWU5UT0tFTlMgLS0gTnVtYmVyIG9mIHRlcm1pbmFscy4gICovCi0jZGVmaW5lIFlZTlRPS0VOUyAgNTMKKyNkZWZpbmUgWVlOVE9LRU5TICA1NAogLyogWVlOTlRTIC0tIE51bWJlciBvZiBub250ZXJtaW5hbHMuICAqLwogI2RlZmluZS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gICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICA0OCwgICAgNDksICAgIDUwLCAgICAgMiwgICAgNDcsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKKyAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgNTMsICAgIDQ1LAorICAgICAgIDIsICAgIDUxLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCiAgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKICAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAogICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCiAgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKICAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAotICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgNTEsICAgICAyLCAgICA0NSwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMiwgICAgIDIsICAgICAyLCAgICA1MiwgICAgIDIsICAgIDQ2LCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKICAgICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLAogICAgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsCiAgICAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAyLCAgICAgMiwKQEAgLTQ2Nyw3ICs0NzcsNyBAQAogICAgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgMTQsCiAgICAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwKICAgICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgIDMxLCAgICAzMiwgICAgMzMsICAgIDM0LAotICAgICAgMzUsICAgIDM2LCAgICAzNywgICAgMzgsICAgIDM5LCAgICA0MCwgICAgNDEsICAgIDQyLCAgICA0MworICAgICAgMzUsICAgIDM2LCAgICAzNywgICAgMzgsICAgIDM5LCAgICA0MCwgICAgNDEsICAgIDQyLCAgICA0MywgICAgNDQKIH07CiAKICNpZiBZWURFQlVHCkBAIC00NzgsNzggKzQ4OCw3NyBAQAogICAgICAgIDAsICAgICAwLCAgICAgMywgICAgIDUsICAgICA4LCAgICAgOSwgICAgMTIsICAgIDEzLCAgICAxOCwgICAgMTksCiAgICAgICAyMywgICAgMjUsICAgIDI3LCAgICAyOSwgICAgMzEsICAgIDM0LCAgICAzNywgICAgNDEsICAgIDQyLCAgICA0NCwKICAgICAgIDQ2LCAgICA1MCwgICAgNTUsICAgIDU2LCAgICA1OCwgICAgNjAsICAgIDYzLCAgICA2NSwgICAgNjcsICAgIDY5LAotICAgICAgNzEsICAgIDczLCAgICA3NSwgICAgNzcsICAgIDc5LCAgICA4MSwgICAgODcsICAgIDkyLCAgICA5NSwgICAgOTgsCi0gICAgIDEwMSwgICAxMDUsICAgMTA5LCAgIDExMywgICAxMTYsICAgMTE5LCAgIDEyMiwgICAxMjQsICAgMTI2LCAgIDEyOCwKLSAgICAgMTMwLCAgIDEzMiwgICAxMzQsICAgMTM2LCAgIDEzOCwgICAxNDAsICAgMTQyLCAgIDE0NCwgICAxNDcsICAgMTQ4LAotICAgICAxNTAsICAgMTUyLCAgIDE1NSwgICAxNTcsICAgMTU5LCAgIDE2MSwgICAxNjMsICAgMTY2LCAgIDE2OCwgICAxNzAsCi0gICAgIDE3NSwgICAxODAsICAgMTgzLCAgIDE4NywgICAxOTEsICAgMTk0LCAgIDE5NiwgICAxOTgsICAgMjAwLCAgIDIwNSwKLSAgICAgMjEwLCAgIDIxMywgICAyMTcsICAgMjIxLCAgIDIyNCwgICAyMjYsICAgMjMwLCAgIDIzMSwgICAyMzMsICAgMjM1LAotICAgICAyMzksICAgMjQyLCAgIDI0NSwgICAyNDcsICAgMjQ4LCAgIDI1MCwgICAyNTIsICAgMjU3LCAgIDI2MiwgICAyNjUsCi0gICAgIDI2OSwgICAyNzMsICAgMjc3LCAgIDI3OCwgICAyODAsICAgMjgzLCAgIDI4NywgICAyOTEsICAgMjkyLCAgIDI5NCwKLSAgICAgMjk2LCAgIDI5OSwgICAzMDMsICAgMzA2LCAgIDMwNywgICAzMDksICAgMzExLCAgIDMxNSwgICAzMTgsICAgMzIxLAotICAgICAzMjMsICAgMzI2LCAgIDMyNywgICAzMzAsICAgMzM0LCAgIDMzOSwgICAzNDEsICAgMzQ1LCAgIDM0NywgICAzNTEsCi0gICAgIDM1NCwgICAzNTUsICAgMzU3CisgICAgICA3MSwgICAgNzMsICAgIDc1LCAgICA3NywgICAgNzksICAgIDgxLCAgICA4NiwgICAgODgsICAgIDkxLCAgICA5NCwKKyAgICAgIDk3LCAgIDEwMSwgICAxMDUsICAgMTA5LCAgIDExMiwgICAxMTUsICAgMTE4LCAgIDEyMCwgICAxMjIsICAgMTI0LAorICAgICAxMjYsICAgMTI4LCAgIDEzMCwgICAxMzIsICAgMTM0LCAgIDEzNiwgICAxMzgsICAgMTQwLCAgIDE0MywgICAxNDQsCisgICAgIDE0NiwgICAxNDgsICAgMTUxLCAgIDE1MywgICAxNTUsICAgMTU3LCAgIDE1OSwgICAxNjIsICAgMTY0LCAgIDE2NiwKKyAgICAgMTcxLCAgIDE3NiwgICAxNzksICAgMTgzLCAgIDE4NywgICAxOTAsICAgMTkyLCAgIDE5NCwgICAxOTYsICAgMjAxLAorICAgICAyMDYsICAgMjA5LCAgIDIxMywgICAyMTcsICAgMjIwLCAgIDIyMiwgICAyMjYsICAgMjI3LCAgIDIyOSwgICAyMzEsCisgICAgIDIzNSwgICAyMzgsICAgMjQxLCAgIDI0MywgICAyNDQsICAgMjQ2LCAgIDI0OCwgICAyNTMsICAgMjU4LCAgIDI2MSwKKyAgICAgMjY1LCAgIDI2OSwgICAyNzMsICAgMjc0LCAgIDI3NiwgICAyNzksICAgMjgzLCAgIDI4NywgICAyODgsICAgMjkwLAorICAgICAyOTIsICAgMjk1LCAgIDI5OSwgICAzMDIsICAgMzAzLCAgIDMwNSwgICAzMDcsICAgMzExLCAgIDMxNCwgICAzMTcsCisgICAgIDMxOSwgICAzMjIsICAgMzIzLCAgIDMyNiwgICAzMzAsICAgMzM1LCAgIDMzNywgICAzNDEsICAgMzQzLCAgIDM0NywKKyAgICAgMzUwLCAgIDM1MSwgICAzNTMKIH07CiAKIC8qIFlZUkhTIC0tIEEgYC0xJy1zZXBhcmF0ZWQgbGlzdCBvZiB0aGUgcnVsZXMnIFJIUy4gICovCiBzdGF0aWMgY29uc3QgeXl0eXBlX2ludDggeXlyaHNbXSA9CiB7Ci0gICAgICA1NCwgICAgIDAsICAgIC0xLCAgICA1NSwgICAgLTEsICAgIDU0LCAgICA1NSwgICAgLTEsICAgIC0xLCAgICA1NiwKLSAgICAgIDU3LCAgICAtMSwgICAgLTEsICAgIDEyLCAgICAyMywgICAgNTgsICAgIDYwLCAgICAtMSwgICAgLTEsICAgIDIzLAotICAgICAgNTksICAgIDYwLCAgICAtMSwgICAgNjAsICAgIC0xLCAgICA4NCwgICAgLTEsICAgIDk5LCAgICAtMSwgICAxMDEsCi0gICAgICAtMSwgICAgIDEsICAgIDQ0LCAgICAtMSwgICAgIDEsICAgIDQ1LCAgICAtMSwgICAgNjQsICAgIDYxLCAgICA0NCwKLSAgICAgIC0xLCAgICAtMSwgICAgNjIsICAgIC0xLCAgICA2MywgICAgLTEsICAgIDYyLCAgICA0NiwgICAgNjMsICAgIC0xLAotICAgICAgNzQsICAgMTAwLCAgICA5NSwgICAgODUsICAgIC0xLCAgICAtMSwgICAgNjUsICAgIC0xLCAgICA2NiwgICAgLTEsCi0gICAgICA2NSwgICAgNjYsICAgIC0xLCAgICA2NywgICAgLTEsICAgIDY4LCAgICAtMSwgICAgIDUsICAgIC0xLCAgICAxNywKLSAgICAgIC0xLCAgICAyMSwgICAgLTEsICAgIDExLCAgICAtMSwgICAgMTQsICAgIC0xLCAgICA2OSwgICAgLTEsICAgIDczLAotICAgICAgLTEsICAgIDI4LCAgICA0NywgICAgNjUsICAgIDQ4LCAgICA0OSwgICAgLTEsICAgIDI4LCAgICA0NywgICAgNjUsCi0gICAgICA0OSwgICAgLTEsICAgIDIyLCAgICAzNywgICAgLTEsICAgIDI0LCAgICAzNywgICAgLTEsICAgIDEwLCAgICAzNywKLSAgICAgIC0xLCAgICAyMiwgICAgMzcsICAgIDg3LCAgICAtMSwgICAgMjQsICAgIDM3LCAgICA4NywgICAgLTEsICAgIDEwLAotICAgICAgMzcsICAgIDk2LCAgICAtMSwgICAgMTAsICAgIDk2LCAgICAtMSwgICAgMjIsICAgIDg3LCAgICAtMSwgICAgMjQsCi0gICAgICA4NywgICAgLTEsICAgICA3LCAgICAtMSwgICAgMTksICAgIC0xLCAgICAxNSwgICAgLTEsICAgIDE2LCAgICAtMSwKLSAgICAgIDIwLCAgICAtMSwgICAgMjUsICAgIC0xLCAgICAxMywgICAgLTEsICAgICA5LCAgICAtMSwgICAgMjYsICAgIC0xLAotICAgICAgIDYsICAgIC0xLCAgICA0MSwgICAgLTEsICAgIDQ4LCAgICA3MSwgICAgLTEsICAgIC0xLCAgICA3MiwgICAgLTEsCi0gICAgICA3MywgICAgLTEsICAgIDcyLCAgICA3MywgICAgLTEsICAgICA4LCAgICAtMSwgICAgMjcsICAgIC0xLCAgICAzMSwKLSAgICAgIC0xLCAgICAxOCwgICAgLTEsICAgIDcwLCAgICA3NCwgICAgLTEsICAgIDc1LCAgICAtMSwgICAgMzcsICAgIC0xLAotICAgICAgNzUsICAgIDQ3LCAgICA3OCwgICAgNDksICAgIC0xLCAgICA3NSwgICAgNDcsICAgICAxLCAgICA0OSwgICAgLTEsCi0gICAgICA3NSwgICAgMzMsICAgIC0xLCAgICA0NywgICAgNzQsICAgIDQ5LCAgICAtMSwgICAgNDcsICAgICAxLCAgICA0OSwKLSAgICAgIC0xLCAgICA3MCwgICAgNzYsICAgIC0xLCAgICA3NywgICAgLTEsICAgIDM3LCAgICAtMSwgICAgNDEsICAgIC0xLAotICAgICAgNzcsICAgIDQ3LCAgICA3OCwgICAgNDksICAgIC0xLCAgICA3NywgICAgNDcsICAgICAxLCAgICA0OSwgICAgLTEsCi0gICAgICA3NywgICAgMzMsICAgIC0xLCAgICA0NywgICAgNzYsICAgIDQ5LCAgICAtMSwgICAgNDcsICAgICAxLCAgICA0OSwKLSAgICAgIC0xLCAgICA3OSwgICAgMzYsICAgIC0xLCAgICA3OSwgICAgLTEsICAgIDgwLCAgICA0NiwgICAgMzYsICAgIC0xLAotICAgICAgLTEsICAgIDgwLCAgICAtMSwgICAgODEsICAgIC0xLCAgICA4MCwgICAgNDYsICAgIDgxLCAgICAtMSwgICAgNjUsCi0gICAgICA4MiwgICAgLTEsICAgIDcwLCAgICA4MiwgICAgLTEsICAgIDgzLCAgICAtMSwgICAgLTEsICAgIDM3LCAgICAtMSwKLSAgICAgIDQxLCAgICAtMSwgICAgODMsICAgIDQ3LCAgICA3OCwgICAgNDksICAgIC0xLCAgICA4MywgICAgNDcsICAgICAxLAotICAgICAgNDksICAgIC0xLCAgICA4MywgICAgMzMsICAgIC0xLCAgICA0NywgICAgODIsICAgIDQ5LCAgICAtMSwgICAgNDcsCi0gICAgICAgMSwgICAgNDksICAgIC0xLCAgICA2NCwgICAgNzQsICAgIDMyLCAgICAtMSwgICAgLTEsICAgIDg2LCAgICAtMSwKLSAgICAgIDUwLCAgICAzNCwgICAgLTEsICAgIDUxLCAgICA4OCwgICAgNDUsICAgIC0xLCAgICA1MSwgICAgIDEsICAgIDQ1LAotICAgICAgLTEsICAgIC0xLCAgICA4OSwgICAgLTEsICAgIDkwLCAgICAtMSwgICAgODksICAgIDkwLCAgICAtMSwgICAgNjQsCi0gICAgICA5MSwgICAgNDQsICAgIC0xLCAgICAgMSwgICAgNDQsICAgIC0xLCAgICAtMSwgICAgOTIsICAgIC0xLCAgICA5MywKLSAgICAgIC0xLCAgICA5MiwgICAgNDYsICAgIDkzLCAgICAtMSwgICAgNzYsICAgIDk1LCAgICAtMSwgICAgMzcsICAgIDk0LAotICAgICAgLTEsICAgIDk0LCAgICAtMSwgICAgNTIsICAgIDM0LCAgICAtMSwgICAgLTEsICAgIDk1LCAgICAzMSwgICAgLTEsCi0gICAgICA1MSwgICAgOTcsICAgIDQ1LCAgICAtMSwgICAgNTEsICAgIDk3LCAgICA0NiwgICAgNDUsICAgIC0xLCAgICA5OCwKLSAgICAgIC0xLCAgICA5NywgICAgNDYsICAgIDk4LCAgICAtMSwgICAgMzcsICAgIC0xLCAgICAzNywgICAgNTAsICAgIDM0LAotICAgICAgLTEsICAgIDMwLCAgICA0NCwgICAgLTEsICAgIC0xLCAgICAzMCwgICAgLTEsICAgIDI5LCAgICA0NywgICAgMzcsCi0gICAgICA0OSwgICAgNDQsICAgIC0xCisgICAgICA1NSwgICAgIDAsICAgIC0xLCAgICA1NiwgICAgLTEsICAgIDU1LCAgICA1NiwgICAgLTEsICAgIC0xLCAgICA1NywKKyAgICAgIDU4LCAgICAtMSwgICAgLTEsICAgIDEyLCAgICAyMywgICAgNTksICAgIDYxLCAgICAtMSwgICAgLTEsICAgIDIzLAorICAgICAgNjAsICAgIDYxLCAgICAtMSwgICAgNjEsICAgIC0xLCAgICA4NSwgICAgLTEsICAgMTAwLCAgICAtMSwgICAxMDIsCisgICAgICAtMSwgICAgIDEsICAgIDQ1LCAgICAtMSwgICAgIDEsICAgIDQ2LCAgICAtMSwgICAgNjUsICAgIDYyLCAgICA0NSwKKyAgICAgIC0xLCAgICAtMSwgICAgNjMsICAgIC0xLCAgICA2NCwgICAgLTEsICAgIDYzLCAgICA0NywgICAgNjQsICAgIC0xLAorICAgICAgNzUsICAgMTAxLCAgICA5NiwgICAgODYsICAgIC0xLCAgICAtMSwgICAgNjYsICAgIC0xLCAgICA2NywgICAgLTEsCisgICAgICA2NiwgICAgNjcsICAgIC0xLCAgICA2OCwgICAgLTEsICAgIDY5LCAgICAtMSwgICAgIDUsICAgIC0xLCAgICAxNywKKyAgICAgIC0xLCAgICAyMSwgICAgLTEsICAgIDExLCAgICAtMSwgICAgMTQsICAgIC0xLCAgICA3MCwgICAgLTEsICAgIDc0LAorICAgICAgLTEsICAgIDI4LCAgICA0OCwgICAgODIsICAgIDQ5LCAgICAtMSwgICAgMzIsICAgIC0xLCAgICAyMiwgICAgMzgsCisgICAgICAtMSwgICAgMjQsICAgIDM4LCAgICAtMSwgICAgMTAsICAgIDM4LCAgICAtMSwgICAgMjIsICAgIDM4LCAgICA4OCwKKyAgICAgIC0xLCAgICAyNCwgICAgMzgsICAgIDg4LCAgICAtMSwgICAgMTAsICAgIDM4LCAgICA5NywgICAgLTEsICAgIDEwLAorICAgICAgOTcsICAgIC0xLCAgICAyMiwgICAgODgsICAgIC0xLCAgICAyNCwgICAgODgsICAgIC0xLCAgICAgNywgICAgLTEsCisgICAgICAxOSwgICAgLTEsICAgIDE1LCAgICAtMSwgICAgMTYsICAgIC0xLCAgICAyMCwgICAgLTEsICAgIDI1LCAgICAtMSwKKyAgICAgIDEzLCAgICAtMSwgICAgIDksICAgIC0xLCAgICAyNiwgICAgLTEsICAgICA2LCAgICAtMSwgICAgNDIsICAgIC0xLAorICAgICAgNTAsICAgIDcyLCAgICAtMSwgICAgLTEsICAgIDczLCAgICAtMSwgICAgNzQsICAgIC0xLCAgICA3MywgICAgNzQsCisgICAgICAtMSwgICAgIDgsICAgIC0xLCAgICAyNywgICAgLTEsICAgIDMxLCAgICAtMSwgICAgMTgsICAgIC0xLCAgICA3MSwKKyAgICAgIDc1LCAgICAtMSwgICAgNzYsICAgIC0xLCAgICAzOCwgICAgLTEsICAgIDc2LCAgICA0OCwgICAgNzksICAgIDQ5LAorICAgICAgLTEsICAgIDc2LCAgICA0OCwgICAgIDEsICAgIDQ5LCAgICAtMSwgICAgNzYsICAgIDM0LCAgICAtMSwgICAgNDgsCisgICAgICA3NSwgICAgNDksICAgIC0xLCAgICA0OCwgICAgIDEsICAgIDQ5LCAgICAtMSwgICAgNzEsICAgIDc3LCAgICAtMSwKKyAgICAgIDc4LCAgICAtMSwgICAgMzgsICAgIC0xLCAgICA0MiwgICAgLTEsICAgIDc4LCAgICA0OCwgICAgNzksICAgIDQ5LAorICAgICAgLTEsICAgIDc4LCAgICA0OCwgICAgIDEsICAgIDQ5LCAgICAtMSwgICAgNzgsICAgIDM0LCAgICAtMSwgICAgNDgsCisgICAgICA3NywgICAgNDksICAgIC0xLCAgICA0OCwgICAgIDEsICAgIDQ5LCAgICAtMSwgICAgODAsICAgIDM3LCAgICAtMSwKKyAgICAgIDgwLCAgICAtMSwgICAgODEsICAgIDQ3LCAgICAzNywgICAgLTEsICAgIC0xLCAgICA4MSwgICAgLTEsICAgIDgyLAorICAgICAgLTEsICAgIDgxLCAgICA0NywgICAgODIsICAgIC0xLCAgICA2NiwgICAgODMsICAgIC0xLCAgICA3MSwgICAgODMsCisgICAgICAtMSwgICAgODQsICAgIC0xLCAgICAtMSwgICAgMzgsICAgIC0xLCAgICA0MiwgICAgLTEsICAgIDg0LCAgICA0OCwKKyAgICAgIDc5LCAgICA0OSwgICAgLTEsICAgIDg0LCAgICA0OCwgICAgIDEsICAgIDQ5LCAgICAtMSwgICAgODQsICAgIDM0LAorICAgICAgLTEsICAgIDQ4LCAgICA4MywgICAgNDksICAgIC0xLCAgICA0OCwgICAgIDEsICAgIDQ5LCAgICAtMSwgICAgNjUsCisgICAgICA3NSwgICAgMzMsICAgIC0xLCAgICAtMSwgICAgODcsICAgIC0xLCAgICA1MSwgICAgMzUsICAgIC0xLCAgICA1MiwKKyAgICAgIDg5LCAgICA0NiwgICAgLTEsICAgIDUyLCAgICAgMSwgICAgNDYsICAgIC0xLCAgICAtMSwgICAgOTAsICAgIC0xLAorICAgICAgOTEsICAgIC0xLCAgICA5MCwgICAgOTEsICAgIC0xLCAgICA2NSwgICAgOTIsICAgIDQ1LCAgICAtMSwgICAgIDEsCisgICAgICA0NSwgICAgLTEsICAgIC0xLCAgICA5MywgICAgLTEsICAgIDk0LCAgICAtMSwgICAgOTMsICAgIDQ3LCAgICA5NCwKKyAgICAgIC0xLCAgICA3NywgICAgOTYsICAgIC0xLCAgICAzOCwgICAgOTUsICAgIC0xLCAgICA5NSwgICAgLTEsICAgIDUzLAorICAgICAgMzUsICAgIC0xLCAgICAtMSwgICAgOTYsICAgIDMxLCAgICAtMSwgICAgNTIsICAgIDk4LCAgICA0NiwgICAgLTEsCisgICAgICA1MiwgICAgOTgsICAgIDQ3LCAgICA0NiwgICAgLTEsICAgIDk5LCAgICAtMSwgICAgOTgsICAgIDQ3LCAgICA5OSwKKyAgICAgIC0xLCAgICAzOCwgICAgLTEsICAgIDM4LCAgICA1MSwgICAgMzUsICAgIC0xLCAgICAzMCwgICAgNDUsICAgIC0xLAorICAgICAgLTEsICAgIDMwLCAgICAtMSwgICAgMjksICAgIDQ4LCAgICAzOCwgICAgNDksICAgIDQ1LCAgICAtMQogfTsKIAogLyogWVlSTElORVtZWU5dIC0tIHNvdXJjZSBsaW5lIHdoZXJlIHJ1bGUgbnVtYmVyIFlZTiB3YXMgZGVmaW5lZC4gICovCiBzdGF0aWMgY29uc3QgeXl0eXBlX3VpbnQxNiB5eXJsaW5lW10gPQogewotICAgICAgIDAsICAgMTIzLCAgIDEyMywgICAxMjQsICAgMTI4LCAgIDEyOCwgICAxMzQsICAgMTM0LCAgIDEzNiwgICAxMzYsCi0gICAgIDEzOCwgICAxMzksICAgMTQwLCAgIDE0MSwgICAxNDIsICAgMTQzLCAgIDE0NywgICAxNjEsICAgMTYyLCAgIDE2NiwKLSAgICAgMTc0LCAgIDE4NywgICAxOTMsICAgMTk0LCAgIDE5OCwgICAxOTksICAgMjAzLCAgIDIwOSwgICAyMTMsICAgMjE0LAotICAgICAyMTUsICAgMjE2LCAgIDIxNywgICAyMjEsICAgMjIyLCAgIDIyMywgICAyMjQsICAgMjI4LCAgIDIzMCwgICAyMzIsCi0gICAgIDIzNiwgICAyMzgsICAgMjQwLCAgIDI0NSwgICAyNDgsICAgMjQ5LCAgIDI1MywgICAyNTQsICAgMjU1LCAgIDI1NiwKLSAgICAgMjU3LCAgIDI1OCwgICAyNTksICAgMjYwLCAgIDI2MSwgICAyNjIsICAgMjYzLCAgIDI2NywgICAyNzIsICAgMjczLAotICAgICAyNzcsICAgMjc4LCAgIDI4MiwgICAyODIsICAgMjgyLCAgIDI4MywgICAyOTEsICAgMjkyLCAgIDI5NiwgICAzMDUsCi0gICAgIDMwNywgICAzMDksICAgMzExLCAgIDMxMywgICAzMjAsICAgMzIxLCAgIDMyNSwgICAzMjYsICAgMzI3LCAgIDMyOSwKLSAgICAgMzMxLCAgIDMzMywgICAzMzUsICAgMzQwLCAgIDM0MSwgICAzNDIsICAgMzQ2LCAgIDM0NywgICAzNTEsICAgMzUyLAotICAgICAzNTcsICAgMzYyLCAgIDM2NCwgICAzNjgsICAgMzY5LCAgIDM3NywgICAzODEsICAgMzgzLCAgIDM4NSwgICAzODcsCi0gICAgIDM4OSwgICAzOTQsICAgNDAzLCAgIDQwNCwgICA0MDksICAgNDE0LCAgIDQxNSwgICA0MTksICAgNDIwLCAgIDQyNCwKLSAgICAgNDI1L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DI5MywgICAyOTQsCi0gICAgIDI5NSwgICAyOTYsICAgMjk3LCAgIDI5OCwgICAgNTksICAgMTI1LCAgICA0NCwgICAgNDAsICAgIDQyLCAgICA0MSwKLSAgICAgIDYxLCAgIDEyMywgICAgNTgKKyAgICAgMjk1LCAgIDI5NiwgICAyOTcsICAgMjk4LCAgIDI5OSwgICAgNTksICAgMTI1LCAgICA0NCwgICAgNDAsICAgIDQxLAorICAgICAgNDIsICAgIDYxLCAgIDEyMywgICAgNTgKIH07CiAjIGVuZGlmCiAKIC8qIFlZUjFbWVlOXSAtLSBTeW1ib2wgbnVtYmVyIG9mIHN5bWJvbCB0aGF0IHJ1bGUgWVlOIGRlcml2ZXMuICAqLwogc3RhdGljIGNvbnN0IHl5dHlwZV91aW50OCB5eXIxW10gPQogewotICAgICAgIDAsICAgIDUzLCAgICA1NCwgICAgNTQsICAgIDU2LCAgICA1NSwgICAgNTgsICAgIDU3LCAgICA1OSwgICAgNTcsCi0gICAgICA1NywgICAgNTcsICAgIDU3LCAgICA1NywgICAgNTcsICAgIDU3LCAgICA2MCwgICAgNjEsICAgIDYxLCAgICA2MiwKLSAgICAgIDYyLCAgICA2MywgICAgNjQsICAgIDY0LCAgICA2NSwgICAgNjUsICAgIDY2LCAgICA2NiwgICAgNjcsICAgIDY3LAotICAgICAgNjcsICAgIDY3LCAgICA2NywgICAgNjgsICAgIDY4LCAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OCwgICAgNjgsCi0gICAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OSwgICAgNjksICAgIDY5LCAgICA2OSwKLSAgICAgIDY5LCAgICA2OSwgICAgNjksICAgIDY5LCAgICA2OSwgICAgNjksICAgIDY5LCAgICA3MCwgICAgNzEsICAgIDcxLAotICAgICAgNzIsICAgIDcyLCAgICA3MywgICAgNzMsICAgIDczLCAgICA3MywgICAgNzQsICAgIDc0LCAgICA3NSwgICAgNzUsCi0gICAgICA3NSwgICAgNzUsICAgIDc1LCAgICA3NSwgICAgNzYsICAgIDc2LCAgICA3NywgICAgNzcsICAgIDc3LCAgICA3NywKLSAgICAgIDc3LCAgICA3NywgICAgNzcsICAgIDc4LCAgICA3OCwgICAgNzgsICAgIDc5LCAgICA3OSwgICAgODAsICAgIDgwLAotICAgICAgODEsICAgIDgyLCAgICA4MiwgICAgODMsICAgIDgzLCAgICA4MywgICAgODMsICAgIDgzLCAgICA4MywgICAgODMsCi0gICAgICA4MywgICAgODQsICAgIDg1LCAgICA4NSwgICAgODYsICAgIDg3LCAgICA4NywgICAgODgsICAgIDg4LCAgICA4OSwKLSAgICAgIDg5LCAgICA5MCwgICAgOTAsICAgIDkxLCAgICA5MSwgICAgOTIsICAgIDkyLCAgICA5MywgICAgOTMsICAgIDkzLAotICAgICAgOTQsICAgIDk1LCAgICA5NSwgICAgOTYsICAgIDk2LCAgICA5NywgICAgOTcsICAgIDk4LCAgICA5OCwgICAgOTksCi0gICAgIDEwMCwgICAxMDAsICAgMTAxCisgICAgICAgMCwgICAgNTQsICAgIDU1LCAgICA1NSwgICAgNTcsICAgIDU2LCAgICA1OSwgICAgNTgsICAgIDYwLCAgICA1OCwKKyAgICAgIDU4LCAgICA1OCwgICAgNTgsICAgIDU4LCAgICA1OCwgICAgNTgsICAgIDYxLCAgICA2MiwgICAgNjIsICAgIDYzLAorICAgICAgNjMsICAgIDY0LCAgICA2NSwgICAgNjUsICAgIDY2LCAgICA2NiwgICAgNjcsICAgIDY3LCAgICA2OCwgICAgNjgsCisgICAgICA2OCwgICAgNjgsICAgIDY4LCAgICA2OSwgICAgNjksICAgIDY5LCAgICA2OSwgICAgNjksICAgIDY5LCAgICA2OSwKKyAgICAgIDY5LCAgICA2OSwgICAgNjksICAgIDY5LCAgICA2OSwgICAgNjksICAgIDcwLCAgICA3MCwgICAgNzAsICAgIDcwLAorICAgICAgNzAsICAgIDcwLCAgICA3MCwgICAgNzAsICAgIDcwLCAgICA3MCwgICAgNzAsICAgIDcxLCAgICA3MiwgICAgNzIsCisgICAgICA3MywgICAgNzMsICAgIDc0LCAgICA3NCwgICAgNzQsICAgIDc0LCAgICA3NSwgICAgNzUsICAgIDc2LCAgICA3NiwKKyAgICAgIDc2LCAgICA3NiwgICAgNzYsICAgIDc2LCAgICA3NywgICAgNzcsICAgIDc4LCAgICA3OCwgICAgNzgsICAgIDc4LAorICAgICAgNzgsICAgIDc4LCAgICA3OCwgICAgNzksICAgIDc5LCAgICA3OSwgICAgODAsICAgIDgwLCAgICA4MSwgICAgODEsCisgICAgICA4MiwgICAgODMsICAgIDgzLCAgICA4NCwgICAgODQsICAgIDg0LCAgICA4NCwgICAgODQsICAgIDg0LCAgICA4NCwKKyAgICAgIDg0LCAgICA4NSwgICAgODYsICAgIDg2LCAgICA4NywgICAgODgsICAgIDg4LCAgICA4OSwgICAgODksICAgIDkwLAorICAgICAgOTAsICAgIDkxLCAgICA5MSwgICAgOTIsICAgIDkyLCAgICA5MywgICAgOTMsICAgIDk0LCAgICA5NCwgICAgOTQsCisgICAgICA5NSwgICAgOTYsICAgIDk2LCAgICA5NywgICAgOTcsICAgIDk4LCAgICA5OCwgICAgOTksICAgIDk5LCAgIDEwMCwKKyAgICAgMTAxLCAgIDEwMSwgICAxMDIKIH07CiAKIC8qIFlZUjJbWVlOXSAtLSBOdW1iZXIgb2Ygc3ltYm9scyBjb21wb3NpbmcgcmlnaHQgaGFuZCBzaWRlIG9mIHJ1bGUgWVlOLiAgKi8KQEAgLTYyNyw3ICs2MzYsNyBAQAogICAgICAgIDAsICAgICAyLCAgICAgMSwgICAgIDIsICAgICAwLCAgICAgMiwgICAgIDAsICAgICA0LCAgICAgMCwgICAgIDMsCiAgICAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDIsICAgICAyLCAgICAgMywgICAgIDAsICAgICAxLCAgICAgMSwKICAgICAgICAzLCAgICAgNCwgICAgIDAsICAgICAxLCAgICAgMSwgICAgIDIsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLAotICAgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgNSwgICAgIDQsICAgICAyLCAgICAgMiwgICAgIDIsCisgICAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICA0LCAgICAgMSwgICAgIDIsICAgICAyLCAgICAgMiwKICAgICAgICAzLCAgICAgMywgICAgIDMsICAgICAyLCAgICAgMiwgICAgIDIsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLAogICAgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAyLCAgICAgMCwgICAgIDEsCiAgICAgICAgMSwgICAgIDIsICAgICAxLCAgICAgMSwgICAgIDEsICAgICAxLCAgICAgMiwgICAgIDEsICAgICAxLCAgICAgNCwKQEAgLTY0OCw2OCArNjU3LDY4IEBACiAgICAgICAgNCwgICAgIDQsICAgICAyLCAgICAgMCwgICAgIDEsICAgICAzLCAgICAgMCwgICAgMjgsICAgIDU1LCAgICA0NiwKICAgICAgIDYyLCAgICA1MywgICAgIDAsICAgIDMxLCAgICAgMCwgICAgNTIsICAgIDMyLCAgICA0OCwgICAgNDksICAgIDI5LAogICAgICAgNjUsICAgIDQ3LCAgICA1MCwgICAgMzAsICAgICAwLCAgICAgOCwgICAgIDAsICAgIDUxLCAgICA1NCwgICAgNjMsCi0gICAgICAgMCwgICAgIDAsICAgICAwLCAgICA2NCwgICAgNTYsICAgICA1LCAgICAxMCwgICAgMTcsICAgIDIzLCAgICAyNCwKLSAgICAgIDI2LCAgICAyNywgICAgMzMsICAgIDM0LCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDM5LAotICAgICAgIDAsICAgIDQzLCAgICAgNiwgICAgMzcsICAgICAwLCAgICA0NCwgICAgMjIsICAgIDM4LCAgICA0NSwgICAgIDAsCi0gICAgICAgMCwgICAxMjksICAgIDY4LCAgICAgMCwgICAgNTgsICAgICAwLCAgICAxOCwgICAgMTksICAgICAwLCAgIDEzMCwKLSAgICAgIDY3LCAgICAyNSwgICAgNDIsICAgMTI3LCAgICAgMCwgICAxMjUsICAgIDIyLCAgICA0MCwgICAgIDAsICAgMTEzLAotICAgICAgIDAsICAgICAwLCAgIDEwOSwgICAgIDksICAgIDE3LCAgICA0MSwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsCi0gICAgICA1NywgICAgNTksICAgIDYwLCAgICAxNiwgICAgIDAsICAgIDY2LCAgIDEzMSwgICAxMDEsICAgMTIxLCAgICA3MSwKLSAgICAgICAwLCAgICAgMCwgICAxMjMsICAgICAwLCAgICAgNywgICAxMTIsICAgMTA2LCAgICA3NiwgICAgNzcsICAgICAwLAotICAgICAgIDAsICAgICAwLCAgIDEyMSwgICAgNzUsICAgICAwLCAgIDExNCwgICAxMTUsICAgMTE5LCAgIDEwNSwgICAgIDAsCi0gICAgIDExMCwgICAxMzAsICAgICAwLCAgICAzNiwgICAgIDAsICAgIDczLCAgICA3MiwgICAgNjEsICAgIDIwLCAgIDEwMiwKLSAgICAgICAwLCAgICA5MywgICAgIDAsICAgIDg0LCAgICA4NywgICAgODgsICAgMTI4LCAgIDEyNCwgICAxMjYsICAgMTE4LAotICAgICAgIDAsICAgIDc2LCAgICAgMCwgICAxMjAsICAgIDc0LCAgIDExNywgICAgODAsICAgICAwLCAgIDExMSwgICAgIDAsCi0gICAgICAzNSwgICAxMzIsICAgMTIyLCAgICAgMCwgICAgMjEsICAgMTAzLCAgICA3MCwgICAgOTQsICAgIDU2LCAgICAgMCwKLSAgICAgIDkzLCAgICA5MCwgICAgOTIsICAgIDY5LCAgICA4MywgICAgIDAsICAgIDgyLCAgICA4MSwgICAgIDAsICAgICAwLAotICAgICAxMTYsICAgMTA0LCAgICAgMCwgICAgOTUsICAgICAwLCAgICA5MSwgICAgOTgsICAgICAwLCAgICA4NSwgICAgODksCi0gICAgICA3OSwgICAgNzgsICAgMTAwLCAgICA5OSwgICAgIDAsICAgICAwLCAgICA5NywgICAgOTYKKyAgICAgICAwLCAgICAgMCwgICAgIDAsICAgIDY0LCAgICAzNiwgICAgNTYsICAgICA1LCAgICAxMCwgICAgMTcsICAgIDIzLAorICAgICAgMjQsICAgIDI2LCAgICAyNywgICAgMzMsICAgIDM0LCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwgICAgMTUsCisgICAgICAzOSwgICAgIDAsICAgIDQzLCAgICAgNiwgICAgMzcsICAgICAwLCAgICA0NCwgICAgMjIsICAgIDM4LCAgICA0NSwKKyAgICAgICAwLCAgICAgMCwgICAxMjksICAgIDY4LCAgICAgMCwgICAgNTgsICAgICAwLCAgICAxOCwgICAgMTksICAgICAwLAorICAgICAxMzAsICAgIDY3LCAgICAyNSwgICAgNDIsICAgMTI3LCAgICAgMCwgICAxMjUsICAgIDIyLCAgICA0MCwgICAgIDAsCisgICAgIDExMywgICAgIDAsICAgICAwLCAgIDEwOSwgICAgIDksICAgIDE3LCAgICA0MSwgICAgOTMsICAgICAwLCAgICAgMCwKKyAgICAgICAwLCAgICAgMCwgICAgNTcsICAgIDU5LCAgICA2MCwgICAgMTYsICAgICAwLCAgICA2NiwgICAxMzEsICAgMTAxLAorICAgICAxMjEsICAgIDcxLCAgICAgMCwgICAgIDAsICAgMTIzLCAgICAgMCwgICAgIDcsICAgMTEyLCAgIDEwNiwgICAgNzYsCisgICAgICA3NywgICAgIDAsICAgICAwLCAgICAgMCwgICAxMjEsICAgIDc1LCAgICAgMCwgICAxMTQsICAgMTE1LCAgIDExOSwKKyAgICAgMTA1LCAgICAgMCwgICAxMTAsICAgMTMwLCAgICA5NCwgICAgNTYsICAgICAwLCAgICA5MywgICAgOTAsICAgIDkyLAorICAgICAgMzUsICAgICAwLCAgICA3MywgICAgNzIsICAgIDYxLCAgICAyMCwgICAxMDIsICAgICAwLCAgICAgMCwgICAgODQsCisgICAgICA4NywgICAgODgsICAgMTI4LCAgIDEyNCwgICAxMjYsICAgMTE4LCAgICAgMCwgICAgNzYsICAgICAwLCAgIDEyMCwKKyAgICAgIDc0LCAgIDExNywgICAgODAsICAgICAwLCAgIDExMSwgICAgIDAsICAgICAwLCAgICA5NSwgICAgIDAsICAgIDkxLAorICAgICAgOTgsICAgICAwLCAgIDEzMiwgICAxMjIsICAgICAwLCAgICAyMSwgICAxMDMsICAgIDcwLCAgICA2OSwgICAgODMsCisgICAgICAgMCwgICAgODIsICAgIDgxLCAgICAgMCwgICAgIDAsICAgMTE2LCAgIDEwMCwgICAgOTksICAgICAwLCAgICAgMCwKKyAgICAgMTA0LCAgICA4NSwgICAgODksICAgIDc5LCAgICA3OCwgICAgOTcsICAgIDk2CiB9OwogCiAvKiBZWURFRkdPVE9bTlRFUk0tTlVNXS4gICovCiBzdGF0aWMgY29uc3QgeXl0eXBlX2ludDE2IHl5ZGVmZ290b1tdID0KIHsKLSAgICAgIC0xLCAgICAgMSwgICAgIDIsICAgICAzLCAgICAzNSwgICAgNzYsICAgIDU2LCAgICAzNiwgICAgNjUsICAgIDY2LAotICAgICAgNjcsICAgIDc5LCAgICAzOCwgICAgMzksICAgIDQwLCAgICA0MSwgICAgNDIsICAgIDY4LCAgICA5MCwgICAgOTEsCi0gICAgICA0MywgICAxMjEsICAgIDcwLCAgIDExMiwgICAxMTMsICAgMTMyLCAgIDEzMywgICAxMzQsICAgMTM1LCAgIDE2MSwKLSAgICAgMTYyLCAgICA0NCwgICAxNTQsICAgMTU1LCAgICA1NSwgICAgODAsICAgIDgxLCAgICA4MiwgICAxMTQsICAgMTE1LAotICAgICAxMTYsICAgMTE3LCAgIDEyOSwgICAgNTEsICAgIDc0LCAgICA3NSwgICAgNDUsICAgIDk4LCAgICA0NgorICAgICAgLTEsICAgICAxLCAgICAgMiwgICAgIDMsICAgIDM2LCAgICA3NywgICAgNTcsICAgIDM3LCAgICA2NiwgICAgNjcsCisgICAgICA2OCwgICAgODAsICAgIDM5LCAgICA0MCwgICAgNDEsICAgIDQyLCAgICA0MywgICAgNjksICAgIDk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pbnQxNiB5eXRhYmxlW10gPQogewotICAgICAgODYsICAgIDcxLCAgIDExMSwgICAgMzcsICAgMTcyLCAgICAxMCwgICAgODMsICAgIDY5LCAgICA1OCwgICAgNDksCi0gICAgICA5MiwgICAxNTIsICAgIDg4LCAgIDE2OSwgICAgNzMsICAgIDIwLCAgICA5NiwgICAxNDAsICAgIDk3LCAgIDE0MiwKLSAgICAgICA0LCAgIDE0NCwgICAxMzcsICAgIDUwLCAgICAyOSwgICAgNTIsICAgMTA0LCAgICA2MSwgICAgMzMsICAgIDUwLAotICAgICAxNTMsICAgIDUzLCAgIDExMSwgICAgODksICAgMTExLCAgICA3NywgICAtOTMsICAgMTI3LCAgICA5NSwgICAgODUsCi0gICAgIDE1NywgICAxMzEsICAgIDU5LCAgIDE4NSwgICAxNzMsICAgIDU0LCAgICA1NywgICAgOTksICAgIDYyLCAgICA3MSwKLSAgICAgMTU5LCAgICA2NCwgICAtOTMsICAgMTQxLCAgIDE2MCwgICAgNjIsICAgIDg0LCAgIDEwOCwgICAgNjMsICAgIDY0LAotICAgICAgNTQsICAgMTAwLCAgICA2MCwgICAxMDksICAgIDY0LCAgICA2MywgICAgNjQsICAgMTQ2LCAgICA3MywgICAxMDcsCi0gICAgICA1NCwgICAxNzYsICAgMTExLCAgIDEwOCwgICAgNDcsICAgIDQ4LCAgICA4NCwgICAxMDUsICAgMTA2LCAgIDEwOSwKLSAgICAgIDY0LCAgIDE0NywgICAxNjAsICAgMTYwLCAgIDExMCwgICAxNzcsICAgMTQxLCAgICA4NywgICAxMzEsICAgMTU3LAotICAgICAxMDgsICAgMTAyLCAgIDEwMywgICAxNzMsICAgIDcxLCAgICA5MywgICAxMDksICAgIDY0LCAgIDEwMSwgICAxNTksCi0gICAgICA2NCwgICAxNzQsICAgMTc1LCAgICA5NCwgICAxMTgsICAgMTI0LCAgIDEzMSwgICAgNzgsICAgMTM2LCAgIDEyNSwKLSAgICAgMTI2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAxMzEsICAgIDE1LAotICAgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAxMTAsCi0gICAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgMTQzLCAgIDE0OCwgICAgMzMsICAgMTA1LCAgIDE0OSwKLSAgICAgIDk2LCAgIDE1MSwgICAxNTIsICAgLTIyLCAgIDE1MCwgICAxNTYsICAgMTY1LCAgICAzNCwgICAxNjMsICAgMTY0LAotICAgICAtMjIsICAtMTA3LCAgIDE2NiwgICAtMjIsICAgLTIyLCAgIDExOSwgICAxNjcsICAgMTcxLCAgIC0yMiwgICAgIDcsCi0gICAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgIDE4MCwgICAgMTUsICAgIDE2LCAgICAxNywKLSAgICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgIDE4MSwgICAgMjYsICAgIDI3LAotICAgICAgMjgsICAgIDI5LCAgICAzMCwgICAxODIsICAgMTgzLCAgICAzMywgICAxODYsICAgMTg3LCAgICAgNSwgICAxNzksCi0gICAgIDEyMCwgICAtMjIsICAgMTI4LCAgIDE3MCwgICAxMzksICAgIDM0LCAgIDE0NSwgICAgNzIsICAgLTIyLCAgLTEwOCwKLSAgICAgICAwLCAgIC0yMiwgICAtMjIsICAgMTMwLCAgICAgMCwgICAxMzgsICAgLTIyLCAgICAgNywgICAgIDgsICAgICA5LAotICAgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksCi0gICAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwKLSAgICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAtODYsICAgICAwLAotICAgICAxNjgsICAgICAwLCAgICAgMCwgICAgMzQsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsCi0gICAgICAxMywgICAtODYsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwKLSAgICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAgIDAsICAgICAwLAotICAgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIC04NiwgICAgIDAsICAgMTg0LCAgICAgMCwgICAgIDAsCi0gICAgICAzNCwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgLTg2LCAgICAxNSwKLSAgICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLAotICAgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsCi0gICAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgMzQsICAgICAwLCAgICAgMCwKLSAgICAgICAwLCAgICAgMCwgICAgIDYsICAgICAwLCAgICAgMCwgICAtODYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLAotICAgICAgMTEsICAgIDEyLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsCi0gICAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwKLSAgICAgIDMxLCAgICAzMiwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAtMjIsICAgICAwLAotICAgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDAsICAgICAwLCAgIC0yMiwgICAgIDAsICAgICAwLCAgIC0yMiwgICAtMjIsCi0gICAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgIDAsICAgIDE1LCAgICAxNiwKLSAgICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LAotICAgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsCi0gICAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDAsICAgICAwLCAgICAgMCwKLSAgICAgICAwLCAgICAgMCwgICAgIDAsICAgMTIyLCAgIDEyMywgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLAotICAgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsCi0gICAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwKLSAgICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIDE1NywgICAgIDAsICAgICAwLAotICAgICAgIDAsICAgMTU4LCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgMTU5LCAgICA2NCwgICAgIDcsCisgICAgICA4NywgICAgODgsICAgMTEzLCAgIDE1NiwgICAgMzgsICAgIDEwLCAgIDE0NiwgICAxNjMsICAgIDcyLCAgIDEyNywKKyAgICAgIDk0LCAgICA1MCwgICAgODQsICAgIDU5LCAgIDE3NCwgICAgMjAsICAgIDU0LCAgICA5MCwgICAgNzQsICAgMTQ4LAorICAgICAgNTgsICAgMTUwLCAgIDE3OSwgICAxMDEsICAgIDI5LCAgICA1MSwgICAxNDMsICAgMTY0LCAgICAzMywgICAgIDQsCisgICAgICA1NSwgICAgNzAsICAgMTA2LCAgIDExMywgICAgNTUsICAgMTEzLCAgIC05MywgICAxMDIsICAgMTM0LCAgICA2MCwKKyAgICAgMTI0LCAgICA3OCwgICAgODcsICAgMTQ3LCAgIDE1NywgICAgODYsICAgMTUyLCAgIDExMCwgICAxMjcsICAgMTI3LAorICAgICAxMjYsICAgLTkzLCAgICA2NSwgICAxMTEsICAgIDYzLCAgICA2NSwgICAgNzIsICAgIDkxLCAgICA4NSwgICAxMDksCisgICAgIDE1MywgICAxNjAsICAgIDk3LCAgIDExMCwgICAgNjQsICAgIDk4LCAgICA2NSwgICAgNTMsICAgIDk5LCAgIDExMSwKKyAgICAgIDYxLCAgICA2NSwgICAxNDcsICAgIDYyLCAgIDExMiwgICAxNjEsICAgMTEwLCAgIDExMywgICAgODUsICAgMTI0LAorICAgICAgNjMsICAgIDc0LCAgIDExMSwgICAxNTcsICAgIDY1LCAgICA0OCwgICAgNDksICAgMTU4LCAgIDE1OSwgICAxMjYsCisgICAgICA2NCwgICAgNjUsICAgIDY1LCAgICA4NywgICAxMDQsICAgMTA1LCAgIDEwNywgICAxMDgsICAgIDUxLCAgICA1NSwKKyAgICAgIDg5LCAgICA4NywgICAgOTUsICAgIDk2LCAgIDEwMywgICAxMjAsICAgMTQyLCAgIDEzMCwgICAgNzksICAgMTMxLAorICAgICAgODcsICAgMTgyLCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAxMzIsCisgICAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwKKyAgICAgMTMzLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgMTEyLCAgIDE0OSwgICAgMzMsICAgIDM0LAorICAgICAxNTQsICAgMTU1LCAgIDEwNywgICAgOTgsICAgMTYyLCAgIC0yMiwgICAxNjksICAgMTY3LCAgIDE2MywgICAgMzUsCisgICAgIDE2OCwgICAxNzAsICAgLTIyLCAgLTEwNywgICAxNzEsICAgLTIyLCAgIDE4MCwgICAtMjIsICAgMTIxLCAgIDE3MiwKKyAgICAgLTIyLCAgIDE3NiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgMTc3LAorICAgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsCisgICAgIDE4MywgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgIDE4NCwgICAxODUsICAgIDMzLCAgICAzNCwKKyAgICAgMTg2LCAgICAgNSwgICAxMzUsICAgMTIyLCAgIDE3NSwgICAtMjIsICAgMTQ1LCAgICA3MywgICAxNTEsICAgIDM1LAorICAgICAgIDAsICAgICAwLCAgIC0yMiwgIC0xMDgsICAgICAwLCAgIC0yMiwgICAgIDAsICAgLTIyLCAgICAgNiwgICAgIDAsCisgICAgIC0yMiwgICAxNDQsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwKKyAgICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LAorICAgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAgMzEsICAgIDMyLCAgICAzMywgICAgMzQsCisgICAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgLTIyLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNSwKKyAgICAgICAwLCAgICAgMCwgICAtMjIsICAgICAwLCAgIDEzNywgICAtMjIsICAgICAwLCAgIC0yMiwgICAgIDcsICAgICA4LAorICAgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsCisgICAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwKKyAgICAgIDI5LCAgICAzMCwgICAgIDAsICAgICAwLCAgICAzMywgICAgMzQsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLAorICAgICAtODYsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNSwgICAgIDAsICAgICAwLCAgICAgMCwgICAxNzMsCisgICAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywKKyAgICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLAorICAgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsCisgICAgICAzNCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwKKyAgICAgIDM1LCAgICAgMCwgICAgIDAsICAgICAwLCAgIDE3OCwgICAgIDAsICAgICAwLCAgIC04NiwgICAgIDcsICAgICA4LAorICAgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsCisgICAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwKKyAgICAgIDI5LCAgICAzMCwgICAgIDAsICAgICAwLCAgICAzMywgICAgMzQsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLAorICAgICAtODYsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNSwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsCisgICAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywKKyAgICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLAorICAgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsCisgICAgICAzNCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIDEyNCwgICAgIDAsICAgICAwLCAgICAgMCwKKyAgICAgMTI1LCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgMTI2LCAgICAgMCwgICAgNjUsICAgICA3LAogICAgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgIDAsICAgIDE1LCAgICAxNiwgICAgMTcsCiAgICAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LCAgICAyNywKLSAgICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLAotICAgICAxNzgsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsCi0gICAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwKLSAgICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLAotICAgICAgIDAsICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsCi0gICAgICAgMCwgICAgIDAsICAgIDM0CisgICAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAzNCwgICAgIDAsICAgICAwLCAgICAgMCwKKyAgICAgICAwLCAgIDE4MSwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgIDM1LCAgICAgNywgICAgIDgsICAgICA5LAorICAgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksCisgICAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwKKyAgICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAzNCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLAorICAgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgIDM1CiB9OwogCiAjZGVmaW5lIHl5cGFjdF92YWx1ZV9pc19kZWZhdWx0KHl5c3RhdGUpIFwKLSAgKCh5eXN0YXRlKSA9PSAoLTEzNSkpCisgICgoeXlzdGF0ZSkgPT0gKC0xNDApKQogCiAjZGVmaW5lIHl5dGFibGVfdmFsdWVfaXNfZXJyb3IoeXl0YWJsZV92YWx1ZSkgXAogICBZWUlEICgwKQogCiBzdGF0aWMgY29uc3QgeXl0eXBlX2ludDE2IHl5Y2hlY2tbXSA9CiB7Ci0gICAgICA1OSwgICAgMzgsICAgIDc5LCAgICAgMywgICAgIDEsICAgICA4LCAgICA1NiwgICAgMzcsICAgIDI2LCAgICAzNywKLSAgICAgIDY0LCAgICAzMSwgICAgIDEsICAgMTQ3LCAgICAzNywgICAgMTgsICAgIDMwLCAgICAgMSwgICAgMzIsICAgMTA5LAotICAgICAgIDAsICAgMTExLCAgICA0NSwgICAgNTEsICAgIDI3LCAgICAyMywgICAgNzYsICAgIDQ0LCAgICAzMSwgICAgNTEsCi0gICAgICA1MCwgICAgMzcsICAgMTA5LCAgICA2MywgICAxMTEsICAgIDUzLCAgICAzMywgICAgOTEsICAgIDY4LCAgICA1NywKLSAgICAgIDM3LCAgIDEwMCwgICAgNDcsICAgMTc3LCAgICA0MSwgICAgNTEsICAgIDM3LCAgICAzMywgICAgMzcsICAgIDg2LAotICAgICAgNDcsICAgIDQ4LCAgICA0OSwgICAgMzcsICAgMTMxLCAgICAzNywgICAgNTYsICAgIDQxLCAgICA0NywgICAgNDgsCi0gICAgICA1MSwgICAgNDcsICAgIDQ3LCAgICA0NywgICAgNDgsICAgIDQ3LCAgICA0OCwgICAgMzMsICAgIDM3LCAgICAzNywKLSAgICAgIDUxLCAgICAzMywgICAxNDksICAgIDQxLCAgICA0NCwgICAgNDUsICAgIDc2LCAgICA0NCwgICAgNDUsICAgIDQ3LAotICAgICAgNDgsICAgIDQ3LCAgIDE1OSwgICAxNjAsICAgIDUyLCAgICA0NywgICAgMzcsICAgIDM3LCAgIDE0NywgICAgMzcsCi0gICAgICA0MSwgICAgNDUsICAgIDQ2LCAgICA0MSwgICAxMzEsICAgIDQ0LCAgICA0NywgICAgNDgsICAgIDUwLCAgICA0NywKLSAgICAgIDQ4LCAgIDE1OSwgICAxNjAsICAgIDQ2LCAgICA0NSwgICAgNDksICAgMTY1LCAgICAgMSwgICAgMzQsICAgIDQ5LAotICAgICAgNDksICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgIDE3NywgICAgMTMsCi0gICAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICA1MiwKLSAgICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMzQsICAgIDQ0LCAgICAzMSwgICAgNDQsICAgIDQ2LAotICAgICAgMzAsICAgIDQ0LCAgICAzMSwgICAgMzcsICAgIDQ5LCAgICA0OSwgICAgNDYsICAgIDQxLCAgICA0OSwgICAgMzYsCi0gICAgICA0NCwgICAgNDUsICAgIDQ5LCAgICA0NywgICAgNDgsICAgICAxLCAgICA0OSwgICAgMzQsICAgIDUyLCAgICAgNSwKLSAgICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDQ5LCAgICAxMywgICAgMTQsICAgIDE1LAotICAgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDQ5LCAgICAyNCwgICAgMjUsCi0gICAgICAyNiwgICAgMjcsICAgIDI4LCAgICA0OSwgICAgNDksICAgIDMxLCAgICA0OSwgICAgNDksICAgICAxLCAgIDE2NSwKLSAgICAgIDgxLCAgICAzNywgICAgOTQsICAgMTQ5LCAgIDEwNywgICAgNDEsICAgMTEyLCAgICA0OSwgICAgNDQsICAgIDQ1LAotICAgICAgLTEsICAgIDQ3LCAgICA0OCwgICAgIDEsICAgIC0xLCAgIDEwMywgICAgNTIsICAgICA1LCAgICAgNiwgICAgIDcsCi0gICAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywKLSAgICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LAotICAgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNiwgICAgLTEsCi0gICAgICAgMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwKLSAgICAgIDExLCAgICA0OSwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLAotICAgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAtMSwgICAgLTEsCi0gICAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM2LCAgICAtMSwgICAgIDEsICAgIC0xLCAgICAtMSwKLSAgICAgIDQxLCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgNDksICAgIDEzLAotICAgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsCi0gICAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwKLSAgICAgIC0xLCAgICAtMSwgICAgMzYsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgLTEsICAgIC0xLAotICAgICAgLTEsICAgIC0xLCAgICAgMSwgICAgLTEsICAgIC0xLCAgICA0OSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsCi0gICAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwKLSAgICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LAotICAgICAgMjksICAgIDMwLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNywgICAgLTEsCi0gICAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsICAgIDQ0LCAgICAtMSwgICAgLTEsICAgIDQ3LCAgICA0OCwKLSAgICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAtMSwgICAgMTMsICAgIDE0LAotICAgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsCi0gICAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgLTEsICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwKLSAgICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsICAgIC0xLAotICAgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDgsICAgIDQ5LCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksCi0gICAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwKLSAgICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLAotICAgICAgLTEsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM3LCAgICAtMSwgICAgLTEsCi0gICAgICAtMSwgICAgNDEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDcsICAgIDQ4LCAgICAgNSwKKyAgICAgIDYwLCAgICA2MCwgICAgODAsICAgICAxLCAgICAgMywgICAgIDgsICAgICAxLCAgICAzMSwgICAgMzksICAgIDg3LAorICAgICAgNjUsICAgIDM4LCAgICA1NywgICAgMjYsICAgMTUzLCAgICAxOCwgICAgMzgsICAgICAxLCAgICAzOCwgICAxMTEsCisgICAgICAzOCwgICAxMTMsICAgMTYxLCAgICAzNCwgICAgMjcsICAgIDUyLCAgICA0NiwgICAgNTEsICAgIDMxLCAgICAgMCwKKyAgICAgIDUyLCAgICAzOCwgICAgNzcsICAgMTExLCAgICA1MiwgICAxMTMsICAgIDM0LCAgICA0OCwgICAgOTMsICAgIDQ4LAorICAgICAgMzgsICAgIDU0LCAgIDEwMiwgICAgMzgsICAgIDQyLCAgICA1OCwgICAgMzQsICAgIDQyLCAgIDEyNiwgICAxMjcsCisgICAgICA0OCwgICAgNDksICAgIDUwLCAgICA0OCwgICAgMzgsICAgIDUwLCAgICA4NywgICAgNjQsICAgIDU3LCAgICAzOCwKKyAgICAgIDQ4LCAgICAzNCwgICAgNjksICAgIDQyLCAgICA0OCwgICAgMzAsICAgIDUwLCAgICAyMywgICAgMzMsICAgIDQ4LAorICAgICAgNDgsICAgIDUwLCAgICAzOCwgICAgNDUsICAgIDUzLCAgICA0OCwgICAgNDIsICAgMTU1LCAgICA3NywgICAgMzgsCisgICAgICAzOCwgICAgMzgsICAgIDQ4LCAgICA0MiwgICAgNTAsICAgIDQ1LCAgICA0NiwgICAxMjYsICAgMTI3LCAgICA0OCwKKyAgICAgIDQ4LCAgICA1MCwgICAgNTAsICAgMTUzLCAgICA0NiwgICAgNDcsICAgIDQ1LCAgICA0NiwgICAgNTIsICAgIDUyLAorICAgICAgMzgsICAgMTYxLCAgICA0NSwgICAgNDcsICAgIDUxLCAgICA0NiwgICAgMzUsICAgIDQ5LCAgICAgMSwgICAgNDksCisgICAgIDE3MCwgICAxNzAsICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICA0OSwKKyAgICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLAorICAgICAgNDksICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgNTMsICAgIDM1LCAgICAzMSwgICAgMzIsCisgICAgICA0NSwgICAgNDcsICAgIDQ1LCAgICAzMCwgICAgNDUsICAgIDM4LCAgICAzNywgICAgNDksICAgIDMxLCAgICA0MiwKKyAgICAgIDQ5LCAgICA0NywgICAgNDUsICAgIDQ2LCAgICA0OSwgICAgNDgsICAgIDM1LCAgICA1MCwgICAgIDEsICAgIDQ5LAorICAgICAgNTMsICAgIDQ5LCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgNDksCisgICAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwKKyAgICAgIDQ5LCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDQ5LCAgICA0OSwgICAgMzEsICAgIDMyLAorICAgICAgNDksICAgICAxLCAgICA5NiwgICAgODIsICAgMTU1LCAgICAzOCwgICAxMDksICAgIDUwLCAgIDExNCwgICAgNDIsCisgICAgICAtMSwgICAgLTEsICAgIDQ1LCAgICA0NiwgICAgLTEsICAgIDQ4LCAgICAtMSwgICAgNTAsICAgICAxLCAgICAtMSwKKyAgICAgIDUzLCAgIDEwNSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLAorICAgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsCisgICAgICAyMywgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgIDMxLCAgICAzMiwKKyAgICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgMzgsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQyLAorICAgICAgLTEsICAgIC0xLCAgICA0NSwgICAgLTEsICAgICAxLCAgICA0OCwgICAgLTEsICAgIDUwLCAgICAgNSwgICAgIDYsCisgICAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwKKyAgICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LAorICAgICAgMjcsICAgIDI4LCAgICAtMSwgICAgLTEsICAgIDMxLCAgICAzMiwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsCisgICAgICAzNywgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQyLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAgMSwKKyAgICAgIC0xLCAgICAtMSwgICAgNDksICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLAorICAgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsCisgICAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgLTEsICAgIC0xLCAgICAzMSwKKyAgICAgIDMyLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgMzcsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLAorICAgICAgNDIsICAgIC0xLCAgICAtMSwgICAgLTEsICAgICAxLCAgICAtMSwgICAgLTEsICAgIDQ5LCAgICAgNSwgICAgIDYsCisgICAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwKKyAgICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LAorICAgICAgMjcsICAgIDI4LCAgICAtMSwgICAgLTEsICAgIDMxLCAgICAzMiwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsCisgICAgICAzNywgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQyLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwKKyAgICAgIC0xLCAgICAtMSwgICAgNDksICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLAorICAgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsCisgICAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgLTEsICAgIC0xLCAgICAzMSwKKyAgICAgIDMyLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM4LCAgICAtMSwgICAgLTEsICAgIC0xLAorICAgICAgNDIsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDgsICAgIC0xLCAgICA1MCwgICAgIDUsCiAgICAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAtMSwgICAgMTMsICAgIDE0LCAgICAxNSwKICAgICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsICAgIDI1LAotICAgICAgMjYsICAgIDI3LCAgICAyOCwgICAgLTEsICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsCi0gICAgICAzNiwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQxLCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwKLSAgICAgICA5LCAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LAotICAgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsCi0gICAgICAtMSwgICAgLTEsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwKLSAgICAgIC0xLCAgICAtMSwgICAgNDEKKyAgICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIDMyLCAgICAtMSwgICAgLTEsICAgIC0xLAorICAgICAgLTEsICAgIDM3LCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDIsICAgICA1LCAgICAgNiwgICAgIDcsCisgICAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywKKyAgICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LAorICAgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIDMyLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsCisgICAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDIKIH07CiAKIC8qIFlZU1RPU1tTVEFURS1OVU1dIC0tIFRoZSAoaW50ZXJuYWwgbnVtYmVyIG9mIHRoZSkgYWNjZXNzaW5nCiAgICBzeW1ib2wgb2Ygc3RhdGUgU1RBVEUtTlVNLiAgKi8KIHN0YXRpYyBjb25zdCB5eXR5cGVfdWludDggeXlzdG9zW10gPQogewotICAgICAgIDAsICAgIDU0LCAgICA1NSwgICAgNTYsICAgICAwLCAgICA1NSwgICAgIDEsICAgICA1LCAgICAgNiwgICAgIDcsCisgICAgICAgMCwgICAgNTUsICAgIDU2LCAgICA1NywgICAgIDAsICAgIDU2LCAgICAgMSwgICAgIDUsICAgICA2LCAgICAgNywKICAgICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LAogICAgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsCi0gICAgICAyOCwgICAgMjksICAgIDMwLCAgICAzMSwgICAgNDEsICAgIDU3LCAgICA2MCwgICAgNjQsICAgIDY1LCAgICA2NiwKLSAgICAgIDY3LCAgICA2OCwgICAgNjksICAgIDczLCAgICA4NCwgICAgOTksICAgMTAxLCAgICA0NCwgICAgNDUsICAgIDM3LAotICAgICAgNTEsICAgIDk2LCAgICAyMywgICAgMzcsICAgIDUxLCAgICA4NywgICAgNTksICAgIDM3LCAgICA4NywgICAgNDcsCi0gICAgICA0NywgICAgNDQsICAgIDM3LCAgICA0NywgICAgNDgsICAgIDYxLCAgICA2MiwgICAgNjMsICAgIDcwLCAgICA3NCwKLSAgICAgIDc1LCAgICA2NiwgICAgOTYsICAgIDM3LCAgICA5NywgICAgOTgsICAgIDU4LCAgICA4NywgICAgIDEsICAgIDY0LAotICAgICAgODgsICAgIDg5LCAgICA5MCwgICAgNjAsICAgIDY0LCAgICA4NywgICAgNjUsICAgIDM3LCAgICAgMSwgICAgNzQsCi0gICAgICA3MSwgICAgNzIsICAgIDczLCAgICA0NCwgICAgNDYsICAgIDc0LCAgICAzMCwgICAgMzIsICAgMTAwLCAgICAzMywKLSAgICAgIDQ3LCAgICA1MCwgICAgNDUsICAgIDQ2LCAgICA2MCwgICAgNDQsICAgIDQ1LCAgICAzNywgICAgNDEsICAgIDQ3LAotICAgICAgNTIsICAgIDcwLCAgICA3NiwgICAgNzcsICAgIDkxLCAgICA5MiwgICAgOTMsICAgIDk0LCAgICA0NSwgICAgIDEsCi0gICAgICA5MCwgICAgNzQsICAgIDQ4LCAgICA0OSwgICAgNDksICAgIDQ5LCAgICA0OSwgICAgNzMsICAgIDYzLCAgICA5NSwKLSAgICAgICAxLCAgICA2NSwgICAgNzgsICAgIDc5LCAgICA4MCwgICAgODEsICAgIDM0LCAgICA0NSwgICAgOTgsICAgIDk0LAotICAgICAgIDEsICAgIDM3LCAgICA3NiwgICAgMzQsICAgIDc2LCAgICA5NSwgICAgMzMsICAgIDQ3LCAgICA0NCwgICAgNDYsCi0gICAgICA0OSwgICAgNDQsICAgIDMxLCAgICA1MCwgICAgODUsICAgIDg2LCAgICA0OSwgICAgMzcsICAgIDQxLCAgICA0NywKLSAgICAgIDcwLCAgICA4MiwgICAgODMsICAgIDQ5LCAgICAzNiwgICAgNDYsICAgIDQ5LCAgICA0OSwgICAgIDEsICAgIDc4LAotICAgICAgOTMsICAgIDM0LCAgICAgMSwgICAgNDEsICAgIDgyLCAgICA4MiwgICAgMzMsICAgIDQ3LCAgICAzNiwgICAgODEsCi0gICAgICA0OSwgICAgNDksICAgIDQ5LCAgICA0OSwgICAgIDEsICAgIDc4LCAgICA0OSwgICAgNDkKKyAgICAgIDI4LCAgICAyOSwgICAgMzAsICAgIDMxLCAgICAzMiwgICAgNDIsICAgIDU4LCAgICA2MSwgICAgNjUsICAgIDY2LAorICAgICAgNjcsICAgIDY4LCAgICA2OSwgICAgNzAsICAgIDc0LCAgICA4NSwgICAxMDAsICAgMTAyLCAgICA0NSwgICAgNDYsCisgICAgICAzOCwgICAgNTIsICAgIDk3LCAgICAyMywgICAgMzgsICAgIDUyLCAgICA4OCwgICAgNjAsICAgIDM4LCAgICA4OCwKKyAgICAgIDQ4LCAgICA0OCwgICAgNDUsICAgIDM4LCAgICA0OCwgICAgNTAsICAgIDYyLCAgICA2MywgICAgNjQsICAgIDcxLAorICAgICAgNzUsICAgIDc2LCAgICA2NywgICAgOTcsICAgIDM4LCAgICA5OCwgICAgOTksICAgIDU5LCAgICA4OCwgICAgIDEsCisgICAgICA2NSwgICAgODksICAgIDkwLCAgICA5MSwgICAgNjEsICAgIDY1LCAgICA4OCwgICAgNjYsICAgIDgyLCAgICAzOCwKKyAgICAgICAxLCAgICA3NSwgICAgNzIsICAgIDczLCAgICA3NCwgICAgNDUsICAgIDQ3LCAgICA3NSwgICAgMzAsICAgIDMzLAorICAgICAxMDEsICAgIDM0LCAgICA0OCwgICAgNTEsICAgIDQ2LCAgICA0NywgICAgNjEsICAgIDQ1LCAgICA0NiwgICAgMzgsCisgICAgICA0MiwgICAgNDgsICAgIDUzLCAgICA3MSwgICAgNzcsICAgIDc4LCAgICA5MiwgICAgOTMsICAgIDk0LCAgICA5NSwKKyAgICAgIDQ2LCAgICAgMSwgICAgOTEsICAgIDc1LCAgICAzOCwgICAgNDIsICAgIDQ4LCAgICA3MSwgICAgODMsICAgIDg0LAorICAgICAgNDksICAgIDQ5LCAgICA0OSwgICAgNDksICAgIDc0LCAgICA2NCwgICAgOTYsICAgICAxLCAgICA3OSwgICAgODAsCisgICAgICA4MSwgICAgODIsICAgIDM1LCAgICA0NiwgICAgOTksICAgIDk1LCAgICAgMSwgICAgMzgsICAgIDc3LCAgICAzNSwKKyAgICAgIDc3LCAgICA5NiwgICAgMzQsICAgIDQ4LCAgICA0NSwgICAgNDcsICAgICAxLCAgICA0MiwgICAgODMsICAgIDgzLAorICAgICAgMzQsICAgIDQ4LCAgICA0NSwgICAgMzEsICAgIDUxLCAgICA4NiwgICAgODcsICAgIDQ5LCAgICA0OSwgICAgMzcsCisgICAgICA0NywgICAgNDksICAgIDQ5LCAgICAgMSwgICAgNzksICAgIDk0LCAgICA0OSwgICAgNDksICAgICAxLCAgICA3OSwKKyAgICAgIDM1LCAgICAzNywgICAgODIsICAgIDQ5LCAgICA0OSwgICAgNDksICAgIDQ5CiB9OwogCiAjZGVmaW5lIHl5ZXJyb2sJCSh5eWVycnN0YXR1cyA9IDApCkBAIC04OTAsMTcgKzg5NSwxOCBAQAogCiAjZGVmaW5lIFlZUkVDT1ZFUklORygpICAoISF5eWVycnN0YXR1cykKIAotI2RlZmluZSBZWUJBQ0tVUChUb2tlbiwgVmFsdWUpCQkJCQlcCi1kbwkJCQkJCQkJXAotICBpZiAoeXljaGFyID09IFlZRU1QVFkgJiYgeXlsZW4gPT0gMSkJCQkJXAotICAgIHsJCQkJCQkJCVwKLSAgICAgIHl5Y2hhciA9IChUb2tlbik7CQkJCQkJXAotICAgICAgeXlsdmFsID0gKFZhbHVlKTsJCQkJCQlcCi0gICAgICBZWVBPUFNUQUNLICgxKTsJCQkJCQlcCi0gICAgICBnb3RvIHl5YmFja3VwOwkJCQkJCVwKLSAgICB9CQkJCQkJCQlcCi0gIGVsc2UJCQkJCQkJCVwKLSAgICB7CQkJCQkJCQlcCisjZGVmaW5lIFlZQkFDS1VQKFRva2VuLCBWYWx1ZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgaWYgKHl5Y2hhciA9PSBZWUVNUFRZKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgeXljaGFyID0gKFRva2VuKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgIHl5bHZhbCA9IChWYWx1ZSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICBZWVBPUFNUQUNLICh5eWxlbik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgeXlzdGF0ZSA9ICp5eXNzcDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgIGdvdG8geXliYWNrdXA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAgICAgICB5eWVycm9yIChZWV8oInN5bnRheCBlcnJvcjogY2Fubm90IGJhY2sgdXAiKSk7IFwKICAgICAgIFlZRVJST1I7CQkJCQkJCVwKICAgICB9CQkJCQkJCQlcCkBAIC05OTUsNiArMTAwMSw4IEBACiAgICAgWVlTVFlQRSBjb25zdCAqIGNvbnN0IHl5dmFsdWVwOwogI2VuZGlmCiB7CisgIEZJTEUgKnl5byA9IHl5b3V0cHV0OworICBZWVVTRSAoeXlvKTsKICAgaWYgKCF5eXZhbHVlcCkKICAgICByZXR1cm47CiAjIGlmZGVmIFlZUFJJTlQKQEAgLTEyNDYsMTIgKzEyNTQsMTIgQEAKIHl5c3ludGF4X2Vycm9yIChZWVNJWkVfVCAqeXltc2dfYWxsb2MsIGNoYXIgKip5eW1zZywKICAgICAgICAgICAgICAgICB5eXR5cGVfaW50MTYgKnl5c3NwLCBpbnQgeXl0b2tlbikKIHsKLSAgWVlTSVpFX1QgeXlzaXplMCA9IHl5dG5hbWVyciAoMCwgeXl0bmFtZVt5eXRva2VuXSk7CisgIFlZU0laRV9UIHl5c2l6ZTAgPSB5eXRuYW1lcnIgKFlZX05VTEwsIHl5dG5hbWVbeXl0b2tlbl0pOwogICBZWVNJWkVfVCB5eXNpemUgPSB5eXNpemUwOwogICBZWVNJWkVfVCB5eXNpemUxOwogICBlbnVtIHsgWVlFUlJPUl9WRVJCT1NFX0FSR1NfTUFYSU1VTSA9IDUgfTsKICAgLyogSW50ZXJuYXRpb25hbGl6ZWQgZm9ybWF0IHN0cmluZy4gKi8KLSAgY29uc3QgY2hhciAqeXlmb3JtYXQgPSAwOworICBjb25zdCBjaGFyICp5eWZvcm1hdCA9IFlZX05VTEw7CiAgIC8qIEFyZ3VtZW50cy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R1hWKGZtdCwgYXJncy4uLikgKHNodXRfdXAgPyAwIDogREJHWChmbXQsICMjYXJncykpCi0jZGVmaW5lIERCR1BWKGZtdCwgYXJncy4uLikgKHNodXRfdXAgPyAwIDogREJHUChmbXQsICMjYXJncykpCi0jZGVmaW5lIERCR0VWKGZtdCwgYXJncy4uLikgKHNodXRfdXAgPyAwIDogREJHRShmbXQsICMjYXJncykpCi0jZGVmaW5lIERCR0NWKHJ0bikgICAgICAgICAgKHNodXRfdXAgPyAwIDogREJHQyhydG4pKQotI2RlZmluZSBEQkdSVigpICAgICAgICAgICAgIChzaHV0X3VwID8gMCA6IERCR1IoKSkKLQotI2Vsc2UgLyogIVZXU05EX0RFQlVHICovCi0KLSNkZWZpbmUgQVNTRVJUKGUpICAgICAgICAgICAoKHZvaWQpIDApCi0jZGVmaW5lIERCR0RPKHgpICAgICAgICAgICAgLyogZG9uJ3QgKi8KLSNkZWZpbmUgREJHWChmbXQsIGFyZ3MuLi4pICAoKHZvaWQpIDApCi0jZGVmaW5lIERCR1AoZm10LCBhcmdzLi4uKSAgKCh2b2lkKSAwKQotI2RlZmluZSBEQkdFKGZtdCwgYXJncy4uLikgICgodm9pZCkgMCkKLSNkZWZpbmUgREJHQyhydG4pICAgICAgICAgICAoKHZvaWQpIDApCi0jZGVmaW5lIERCR1IoKSAgICAgICAgICAgICAgKCh2b2lkKSAwKQotI2RlZmluZSBEQkdQVihmbXQsIGFyZ3MuLi4pICgodm9pZCkgMCkKLSNkZWZpbmUgREJHWFYoZm10LCBhcmdzLi4uKSAoKHZvaWQpIDApCi0jZGVmaW5lIERCR0VWKGZtdCwgYXJncy4uLikgKCh2b2lkKSAwKQotI2RlZmluZSBEQkdDVihydG4pICAgICAgICAgICgodm9pZCkgMCkKLSNkZWZpbmUgREJHUlYoKSAgICAgICAgICAgICAoKHZvaWQpIDApCi0KLSNlbmRpZiAvKiAhVldTTkRfREVCVUcgKi8KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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WNlcyh2YWwpOworCW11dGV4X2xvY2soJmNvZGVjLT51c2VyX211dGV4KTsKKwloaW50ID0gZ2V0X2hpbnQoY29kZWMsIGtleSk7CisJaWYgKGhpbnQpIHsKKwkJLyogcmVwbGFjZSAqLworCQlrZnJlZShoaW50LT5rZXkpOworCQloaW50LT5rZXkgPSBrZXk7CisJCWhpbnQtPnZhbCA9IHZhbDsKKwkJZ290byB1bmxvY2s7CisJfQorCS8qIGFsbG9jYXRlIGEgbmV3IGhpbnQgZW50cnkgKi8KKwlpZiAoY29kZWMtPmhpbnRzLnVzZWQgPj0gTUFYX0hJTlRTKQorCQloaW50ID0gTlVMTDsKKwllbHNlCisJCWhpbnQgPSBzbmRfYXJyYXlfbmV3KCZjb2RlYy0+aGludHMpOworCWlmIChoaW50KSB7CisJCWhpbnQtPmtleSA9IGtleTsKKwkJaGludC0+dmFsID0gdmFsOworCX0gZWxzZSB7CisJCWVyciA9IC1FTk9NRU07CisJfQorIHVubG9jazoKKwltdXRleF91bmxvY2soJmNvZGVjLT51c2VyX211dGV4KTsKKwlpZiAoZXJyKQorCQlrZnJlZShrZXkpOworCXJldHVybiBlcnI7Cit9CisKK3N0YXRpYyBzc2l6ZV90IGhpbnRzX3N0b3JlKHN0cnVjdCBkZXZpY2UgKmRldiwKKwkJCSAgIHN0cnVjdCBkZXZpY2VfYXR0cmlidXRlICphdHRyLAorCQkJICAgY29uc3QgY2hhciAqYnVmLCBzaXplX3QgY291bnQpCit7CisJc3RydWN0IGhkYV9jb2RlYyAqY29kZWMgPSBkZXZfZ2V0X2RydmRhdGEoZGV2KTsKKwlpbnQgZXJyID0gcGFyc2VfaGludHMoY29kZWMsIGJ1Zik7CisJaWYgKGVyciA8IDApCisJCXJldHVybiBlcnI7CisJcmV0dXJuIGNvdW50OworfQorCitzdGF0aWMgc3NpemVfdCB1c2VyX3Bpbl9jb25maWdzX3Nob3coc3RydWN0IGRldmljZSAqZGV2LAorCQkJCSAgICAgc3RydWN0IGRldmljZV9hd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CXJldHVybiBjb3VudDsKK30KKworLyogc3lzZnMgYXR0cmlidXRlcyBleHBvc2VkIG9ubHkgd2hlbiBDT05GSUdfU05EX0hEQV9SRUNPTkZJRz15ICovCitzdGF0aWMgREVWSUNFX0FUVFJfUlcoaW5pdF92ZXJicyk7CitzdGF0aWMgREVWSUNFX0FUVFJfUlcoaGludHMpOworc3RhdGljIERFVklDRV9BVFRSX1JXKHVzZXJfcGluX2NvbmZpZ3MpOworc3RhdGljIERFVklDRV9BVFRSX1dPKHJlY29uZmlnKTsKK3N0YXRpYyBERVZJQ0VfQVRUUl9XTyhjbGVhcik7CisKKy8qCisgKiBMb29rIGZvciBoaW50IHN0cmluZworICovCitjb25zdCBjaGFyICpzbmRfaGRhX2dldF9oaW50KHN0cnVjdCBoZGFfY29kZWMgKmNvZGVjLCBjb25zdCBjaGFyICprZXkpCit7CisJc3RydWN0IGhkYV9oaW50ICpoaW50ID0gZ2V0X2hpbnQoY29kZWMsIGtleSk7CisJcmV0dXJuIGhpbnQgPyBoaW50LT52YWwgOiBOVUxMOworfQorRVhQT1JUX1NZTUJPTF9HUEwoc25kX2hkYV9nZXRfaGludCk7CisKK2ludCBzbmRfaGRhX2dldF9ib29sX2hpbnQoc3RydWN0IGhkYV9jb2RlYyAqY29kZWMsIGNvbnN0IGNoYXIgKmtleSkKK3sKKwljb25zdCBjaGFyICpwOworCWludCByZXQ7CisKKwltdXRleF9sb2NrKCZjb2RlYy0+dXNlcl9tdXRleCk7CisJcCA9IHNuZF9oZGFfZ2V0X2hpbnQoY29kZWMsIGtleSk7CisJaWYgKCFwIHx8ICEqcCkKKwkJcmV0ID0gLUVOT0VOVDsKKwllbHNlIHsKKwkJc3dpdGNoICh0b3VwcGVyKCpwKSkgeworCQljYXNlICdUJzogLyogdHJ1ZSAqLworCQljYXNlICdZJzogLyogeWVzICovCisJCWNhc2UgJzEnOgorCQkJcmV0ID0gMTsKKwkJCWJyZWFrOworCQlkZWZhdWx0OgorCQkJcmV0ID0gMDsKKwkJCWJyZWFrOworCQl9CisJfQorCW11dGV4X3VubG9jaygmY29kZWMtPnVzZXJfbXV0ZXgpOworCXJldHVybiByZXQ7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChzbmRfaGRhX2dldF9ib29sX2hpbnQpOworCitpbnQgc25kX2hkYV9nZXRfaW50X2hpbnQoc3RydWN0IGhkYV9jb2RlYyAqY29kZWMsIGNvbnN0IGNoYXIgKmtleSwgaW50ICp2YWxwKQoreworCWNvbnN0IGNoYXIgKnA7CisJdW5zaWduZWQgbG9uZyB2YWw7CisJaW50IHJldDsKKworCW11dGV4X2xvY2soJmNvZGVjLT51c2VyX211dGV4KTsKKwlwID0gc25kX2hkYV9nZXRfaGludChjb2RlYywga2V5KTsKKwlpZiAoIXApCisJCXJldCA9IC1FTk9FTlQ7CisJZWxzZSBpZiAoa3N0cnRvdWwocCwgMCwgJnZhbCkpCisJCXJldCA9IC1FSU5WQUw7CisJZWxzZSB7CisJCSp2YWxwID0gdmFsOworCQlyZXQgPSAwOworCX0KKwltdXRleF91bmxvY2soJmNvZGVjLT51c2VyX211dGV4KTsKKwlyZXR1cm4gcmV0OworfQorRVhQT1JUX1NZTUJPTF9HUEwoc25kX2hkYV9nZXRfaW50X2hpbnQpOworI2VuZGlmIC8qIENPTkZJR19TTkRfSERBX1JFQ09ORklHICovCisKKy8qCisgKiBjb21tb24gc3lzZnMgYXR0cmlidXRlcworICovCisjaWZkZWYgQ09ORklHX1NORF9IREFfUkVDT05GSUcKKyNkZWZpbmUgUkVDT05GSUdfREVWSUNFX0FUVFIobmFtZSkJREVWSUNFX0FUVFJfUlcobmFtZSkKKyNlbHNlCisjZGVmaW5lIFJFQ09ORklHX0RFVklDRV9BVFRSKG5hbWUpCURFVklDRV9BVFRSX1JPKG5hbWUpCisjZW5kaWYKK3N0YXRpYyBSRUNPTkZJR19ERVZJQ0VfQVRUUih2ZW5kb3JfaWQpOworc3RhdGljIFJFQ09ORklHX0RFVklDRV9BVFRSKHN1YnN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pYywgMHgwMikpOwotCXByaW50aygiICAweDIyOiBBREMgY2xvY2sgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDIyKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwMzogcmlnaHQgQVVYMSAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwMykpOwotCXByaW50aygiICAweDIzOiBBREMgYWx0IHJhdGUgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDIzKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwNDogbGVmdCBDRCAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNCkpOwotCXByaW50aygiICAweDI0OiBBREMgcGxsIE0gICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI0KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwNTogcmlnaHQgQ0QgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNSkpOwotCXByaW50aygiICAweDI1OiBBREMgcGxsIE4gICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI1KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwNjogbGVmdCBsaW5lICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNikpOwotCXByaW50aygiICAweDI2OiBTeW50aCBwbGwgTSAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI2KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwNzogcmlnaHQgbGluZSAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNykpOwotCXByaW50aygiICAweDI3OiBTeW50aCBwbGwgTiAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI3KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwODogTUlDICAgICAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwOCkpOwotCXByaW50aygiICAweDI4OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI4KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwOTogR2FtZSBwb3J0ICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwOSkpOwotCXByaW50aygiICAweDI5OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI5KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwYTogbGVmdCBzeW50aCAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwYSkpOwotCXByaW50aygiICAweDJhOiBNUFU0MDEgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJhKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwYjogcmlnaHQgc3ludGggICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwYikpOwotCXByaW50aygiICAweDJiOiBkcml2ZSBjdHJsICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJiKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwYzogbGVmdCBBVVgyICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwYykpOwotCXByaW50aygiICAweDJjOiBTUlMgc3BhY2UgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJjKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwZDogcmlnaHQgQVVYMiAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwZCkpOwotCXByaW50aygiICAweDJkOiBTUlMgY2VudGVyICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJkKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwZTogbGVmdCBhbmFsb2cgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwZSkpOwotCXByaW50aygiICAweDJlOiB3YXZlIHNvdXJjZSAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJlKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgwZjogcmlnaHQgYW5hbG9nICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwZikpOwotCXByaW50aygiICAweDJmOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJmKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxMDogbGVmdCBQQ00gICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMCkpOwotCXByaW50aygiICAweDMwOiBhbmFsb2cgcG93ZXIgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMwKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxMTogcmlnaHQgUENNICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMSkpOwotCXByaW50aygiICAweDMxOiBhbmFsb2cgcG93ZXIgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMxKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxMjogRE1BIGRhdGEgZm9ybWF0ID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMikpOwotCXByaW50aygiICAweDMyOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMyKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxMzogUC9DIGVuYWJsZSAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMykpOwotCXByaW50aygiICAweDMzOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMzKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxNDogVS9EIGJ1dHRvbiAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNCkpOwotCXByaW50aygiICAweDM0OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM0KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxNTogcmV2aXNpb24gICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNSkpOwotCXByaW50aygiICAweDM1OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM1KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxNjogQURDIG91dHB1dCBjdHJsID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNikpOwotCXByaW50aygiICAweDM2OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM2KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxNzogLS0tICAgICAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNykpOwotCXByaW50aygiICAweDM3OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM3KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxODogRE1BIEEgdXBwZXIgY250ID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxOCkpOwotCXByaW50aygiICAweDM4OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM4KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxOTogRE1BIEEgbG93ZXIgY250ID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxOSkpOwotCXByaW50aygiICAweDM5OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM5KSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxYTogLS0tICAgICAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxYSkpOwotCXByaW50aygiICAweDNhOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNhKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxYjogLS0tICAgICAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxYikpOwotCXByaW50aygiICAweDNiOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNiKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxYzogRE1BIEMgdXBwZXIgY250ID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxYykpOwotCXByaW50aygiICAweDNjOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNjKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxZDogRE1BIEMgdXBwZXIgY250ID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxZCkpOwotCXByaW50aygiICAweDNkOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNkKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxZTogUENNIHJhdGUgbG93ICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxZSkpOwotCXByaW50aygiICAweDNlOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNlKSk7Ci0JcHJpbnRrKEtFUk5fREVCVUcKLQkgICAgICAgIiAgMHgxZjogUENNIHJhdGUgaGlnaCAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxZikpOwotCXByaW50aygiICAweDNmOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNmKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiU1YgUkVHUzogICAgICAgICAgSU5ERVggPSAweCUwMnggICAgICAgICAgICAgICAgICAgU1RBVFVTID0gMHglMDJ4XG4iLAorCQlpbmIoU1ZfUkVHKHNvbmljLCBJTkRFWCkpLCBpbmIoU1ZfUkVHKHNvbmljLCBTVEFUVVMpKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDAwOiBsZWZ0IGlucHV0ICAgICAgPSAweCUwMnggICAgMHgyMDogc3ludGggcmF0ZSBsb3cgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwMCksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDIwKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDAxOiByaWdodCBpbnB1dCAgICAgPSAweCUwMnggICAgMHgyMTogc3ludGggcmF0ZSBoaWdoID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwMSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDIxKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDAyOiBsZWZ0IEFVWDEgICAgICAgPSAweCUwMnggICAgMHgyMjogQURDIGNsb2NrICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwMiksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDIyKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDAzOiByaWdodCBBVVgxICAgICAgPSAweCUwMnggICAgMHgyMzogQURDIGFsdCByYXRlICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwMyksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDIzKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDA0OiBsZWZ0IENEICAgICAgICAgPSAweCUwMnggICAgMHgyNDogQURDIHBsbCBNICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNCksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI0KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDA1OiByaWdodCBDRCAgICAgICAgPSAweCUwMnggICAgMHgyNTogQURDIHBsbCBOICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI1KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDA2OiBsZWZ0IGxpbmUgICAgICAgPSAweCUwMnggICAgMHgyNjogU3ludGggcGxsIE0gICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNiksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI2KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDA3OiByaWdodCBsaW5lICAgICAgPSAweCUwMnggICAgMHgyNzogU3ludGggcGxsIE4gICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNyksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI3KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDA4OiBNSUMgICAgICAgICAgICAgPSAweCUwMnggICAgMHgyODogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwOCksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI4KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDA5OiBHYW1lIHBvcnQgICAgICAgPSAweCUwMnggICAgMHgyOTogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwOSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI5KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDBhOiBsZWZ0IHN5bnRoICAgICAgPSAweCUwMnggICAgMHgyYTogTVBVNDAxICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwYSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJhKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDBiOiByaWdodCBzeW50aCAgICAgPSAweCUwMnggICAgMHgyYjogZHJpdmUgY3RybCAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwYiksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJiKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDBjOiBsZWZ0IEFVWDIgICAgICAgPSAweCUwMnggICAgMHgyYzogU1JTIHNwYWNlICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwYyksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJjKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDBkOiByaWdodCBBVVgyICAgICAgPSAweCUwMnggICAgMHgyZDogU1JTIGNlbnRlciAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwZCksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJkKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDBlOiBsZWZ0IGFuYWxvZyAgICAgPSAweCUwMnggICAgMHgyZTogd2F2ZSBzb3VyY2UgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwZSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJlKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDBmOiByaWdodCBhbmFsb2cgICAgPSAweCUwMnggICAgMHgyZjogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwZiksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJmKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDEwOiBsZWZ0IFBDTSAgICAgICAgPSAweCUwMnggICAgMHgzMDogYW5hbG9nIHBvd2VyICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMCksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMwKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDExOiByaWdodCBQQ00gICAgICAgPSAweCUwMnggICAgMHgzMTogYW5hbG9nIHBvd2VyICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMxKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDEyOiBETUEgZGF0YSBmb3JtYXQgPSAweCUwMnggICAgMHgzMjogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMiksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMyKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDEzOiBQL0MgZW5hYmxlICAgICAgPSAweCUwMnggICAgMHgzMzogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMyksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMzKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDE0OiBVL0QgYnV0dG9uICAgICAgPSAweCUwMnggICAgMHgzNDogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNCksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM0KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDE1OiByZXZpc2lvbiAgICAgICAgPSAweCUwMnggICAgMHgzNTogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM1KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDE2OiBBREMgb3V0cHV0IGN0cmwgPSAweCUwMnggICAgMHgzNjogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNiksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM2KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDE3OiAtLS0gICAgICAgICAgICAgPSAweCUwMnggICAgMHgzNzogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNyksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM3KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDE4OiBETUEgQSB1cHBlciBjbnQgPSAweCUwMnggICAgMHgzODogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxOCksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM4KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDE5OiBETUEgQSBsb3dlciBjbnQgPSAweCUwMnggICAgMHgzOTogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxOSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM5KSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDFhOiAtLS0gICAgICAgICAgICAgPSAweCUwMnggICAgMHgzYTogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxYSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNhKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDFiOiAtLS0gICAgICAgICAgICAgPSAweCUwMnggICAgMHgzYjogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxYiksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNiKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDFjOiBETUEgQyB1cHBlciBjbnQgPSAweCUwMnggICAgMHgzYzogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxYyksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNjKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDFkOiBETUEgQyB1cHBlciBjbnQgPSAweCUwMnggICAgMHgzZDogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxZCksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNkKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDFlOiBQQ00gcmF0ZSBsb3cgICAgPSAweCUwMnggICAgMHgzZTogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxZSksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNlKSk7CisJZGV2X2RiZyhzb25pYy0+Y2FyZC0+ZGV2LAorCQkiICAweDFmOiBQQ00gcmF0ZSBoaWdoICAgPSAweCUwMnggICAgMHgzZjogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLAorCQlzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxZiksIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNmKSk7CiB9CiAKICNlbmRpZgpAQCAtNTExLDggKzUxMSwxMCBAQAogCSpyZXNfbSA9IG07CiAJKnJlc19uID0gbjsKICNpZiAwCi0JcHJpbnRrKEtFUk5fREVCVUcgIm1ldHJpYyA9ICVpLCB4bSA9ICVpLCB4biA9ICVpXG4iLCBtZXRyaWMsIHhtLCB4bik7Ci0JcHJpbnRrKEtFUk5fREVCVUcgInBsbDogbS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9saHBmX21vZGVfdGV4dCk7CitTT0NfRU5VTV9TSU5HTEVfREVDTChhcml6b25hX2xocGYyX21vZGUsCisJCSAgICAgQVJJWk9OQV9IUExQRjJfMSwKKwkJICAgICBBUklaT05BX0xIUEYyX01PREVfU0hJRlQsCisJCSAgICAgYXJpem9uYV9saHBmX21vZGVfdGV4dCk7CiBFWFBPUlRfU1lNQk9MX0dQTChhcml6b25hX2xocGYyX21vZGUpOwogCi1jb25zdCBzdHJ1Y3Qgc29jX2VudW0gYXJpem9uYV9saHBmM19tb2RlID0KLQlTT0NfRU5VTV9TSU5HTEUoQVJJWk9OQV9IUExQRjNfMSwgQVJJWk9OQV9MSFBGM19NT0RFX1NISUZULCAyLAotCQkJYXJpem9uYV9saHBmX21vZGVfdGV4dCk7CitTT0NfRU5VTV9TSU5HTEVfREVDTChhcml6b25hX2xocGYzX21vZGUsCisJCSAgICAgQVJJWk9OQV9IUExQRjNfMSwKKwkJICAgICBBUklaT05BX0xIUEYzX01PREVfU0hJRlQsCisJCSAgICAgYXJpem9uYV9saHBmX21vZGVfdGV4dCk7CiBFWFBPUlRfU1lNQk9MX0dQTChhcml6b25hX2xocGYzX21vZGUpOwogCi1jb25zdCBzdHJ1Y3Qgc29jX2VudW0gYXJpem9uYV9saHBmNF9tb2RlID0KLQlTT0NfRU5VTV9TSU5HTEUoQVJJWk9OQV9IUExQRjRfMSwgQVJJWk9OQV9MSFBGNF9NT0RFX1NISUZULCAyLAotCQkJYXJpem9uYV9saHBmX21vZGVfdGV4dCk7CitTT0NfRU5VTV9TSU5HTEVfREVDTChhcml6b25hX2xocGY0X21vZGUsCisJCSAgICAgQVJJWk9OQV9IUExQRjRfMSwKKwkJICAgICBBUklaT05BX0xIUEY0X01PREVfU0hJRlQsCisJCSAgICAgYXJpem9uYV9saHBmX21vZGVfdGV4dCk7CiBFWFBPUlRfU1lNQk9MX0dQTChhcml6b25hX2xocGY0X21vZGUpOwogCiBzdGF0aWMgY29uc3QgY2hhciAqYXJpem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nZlcnRfdGltaW5nX2dlbjIobW9kLCByZGFpLCBpbyk7CisKKwlyZXR1cm4gcmV0OworfQorCitzdGF0aWMgaW50IHJzbmRfc3JjX3Byb2JlX2dlbjIoc3RydWN0IHJzbmRfbW9kICptb2QsCisJCQkgICAgICAgc3RydWN0IHJzbmRfZGFpICpyZGFpLAorCQkJICAgICAgIHN0cnVjdCByc25kX2RhaV9zdHJlYW0gKmlvKQoreworCXN0cnVjdCByc25kX3ByaXYgKnByaXYgPSByc25kX21vZF90b19wcml2KG1vZCk7CisJc3RydWN0IHJjYXJfc25kX2luZm8gKmluZm8gPSByc25kX3ByaXZfdG9faW5mbyhwcml2KTsKKwlzdHJ1Y3QgcnNuZF9zcmMgKnNyYyA9IHJzbmRfbW9kX3RvX3NyYyhtb2QpOworCXN0cnVjdCByc25kX21vZCAqc3NpID0gcnNuZF9zc2lfbW9kX2dldChwcml2LCByc25kX21vZF9pZChtb2QpKTsKKwlzdHJ1Y3QgZGV2aWNlICpkZXYgPSByc25kX3ByaXZfdG9fZGV2KHByaXYpOworCWludCByZXQ7CisJaW50IGlzX3BsYXk7CisKKwlpZiAoaW5mby0+ZGFpX2luZm8pCisJCWlzX3BsYXkgPSByc25kX2luZm9faXNfcGxheWJhY2socHJpdiwgc3JjKTsKKwllbHNlCisJCWlzX3BsYXkgPSByc25kX3NzaV9pc19wbGF5KHNzaSk7CisKKwlyZXQgPSByc25kX2RtYV9pbml0KHByaXYsCisJCQkgICAgcnNuZF9tb2RfdG9fZG1hKG1vZCksCisJCQkgICAgaXNfcGxheSwKKwkJCSAgICBzcmMtPmluZm8tPmRtYV9pZCk7CisJaWYgKHJldCA8IDApCisJCWRldl9lcnIoZGV2LCAiU1JDIERNQSBmYWlsZWRcbiIpOworCisJcmV0dXJuIHJldDsKK30KKworc3RhdGljIGludCByc25kX3NyY19yZW1vdmVfZ2VuMihzdHJ1Y3QgcnNuZF9tb2QgKm1vZCwKKwkJCQlzdHJ1Y3QgcnNuZF9kYWkgKn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SB7CisJIi9zeXMiLAorCTAsCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHByb2Nmc19fa25vd25fbW91bnRwb2ludHNbXSA9IHsKKwkiL3Byb2MiLAorCTAsCit9OworCitzdHJ1Y3QgZnMgeworCWNvbnN0IGNoYXIJCSpuYW1lOworCWNvbnN0IGNoYXIgKiBjb25zdAkqbW91bnRzOworCWNoYXIJCQkgcGF0aFtQQVRIX01BWCArIDFdOworCWJvb2wJCQkgZm91bmQ7CisJbG9uZwkJCSBtYWdpYzsKK307CisKK2VudW0geworCUZTX19TWVNGUyAgPSAwLAorCUZTX19QUk9DRlMgPSAxLAorfTsKKworc3RhdGljIHN0cnVjdCBmcyBmc19fZW50cmllc1tdID0geworCVtGU19fU1lTRlNdID0geworCQkubmFtZQk9ICJzeXNmcyIsCisJCS5tb3VudHMJPSBzeXNmc19fZnNfa25vd25fbW91bnRwb2ludHMsCisJCS5tYWdpYwk9IFNZU0ZTX01BR0lDLAorCX0sCisJW0ZTX19QUk9DRlNdID0geworCQkubmFtZQk9ICJwcm9jIiwKKwkJLm1vdW50cwk9IHByb2Nmc19fa25vd25fbW91bnRwb2ludHMsCisJCS5tYWdpYwk9IFBST0NfU1VQRVJfTUFHSUMsCisJfSwKK307CisKK3N0YXRpYyBib29sIGZzX19yZWFkX21vdW50cyhzdHJ1Y3QgZnMgKmZzKQoreworCWJvb2wgZm91bmQgPSBmYWxzZTsKKwljaGFyIHR5cGVbMTAwXTsKKwlGSUxFICpmcDsKKworCWZwID0gZm9wZW4oIi9wcm9jL21vdW50cyIsICJyIik7CisJaWYgKGZwID09IE5VTEwpCisJCXJldHVybiBOVUxMOworCisJd2hpbGUgKCFmb3VuZCAmJgorCSAgICAgICBmc2NhbmYoZnAsICIlKnMgJSIgU1RSKFBBVEhfTUFYKSAicyAlOTlzICUqcyAlKmQgJSpkXG4iLAorCQkgICAgICBmcy0+cGF0aCwgdHlwZSkgPT0gMikgeworCisJCWlmIChzdHJjbXA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lZCAqdmFsLAorCQkJaW50IF9fbWF5YmVfdW51c2VkIF9fd3JpdGUsCisJCQl2b2lkIF9fbWF5YmVfdW51c2VkICphcmcpCit7CisJcHJfZXJyKCJ1bndpbmQ6IGFjY2Vzc19mcHJlZyB1bnN1cHBvcnRlZFxuIik7CisJcmV0dXJuIC1VTldfRUlOVkFMOworfQorCitzdGF0aWMgaW50IGdldF9keW5faW5mb19saXN0X2FkZHIodW53X2FkZHJfc3BhY2VfdCBfX21heWJlX3VudXNlZCBhcywKKwkJCQkgIHVud193b3JkX3QgX19tYXliZV91bnVzZWQgKmRpbF9hZGRyLAorCQkJCSAgdm9pZCBfX21heWJlX3VudXNlZCAqYXJnKQoreworCXJldHVybiAtVU5XX0VOT0lORk87Cit9CisKK3N0YXRpYyBpbnQgcmVzdW1lKHVud19hZGRyX3NwYWNlX3QgX19tYXliZV91bnVzZWQgYXMsCisJCSAgdW53X2N1cnNvcl90IF9fbWF5YmVfdW51c2VkICpjdSwKKwkJICB2b2lkIF9fbWF5YmVfdW51c2VkICphcmcpCit7CisJcHJfZXJyKCJ1bndpbmQ6IHJlc3VtZSB1bnN1cHBvcnRlZFxuIik7CisJcmV0dXJuIC1VTldfRUlOVkFMOworfQorCitzdGF0aWMgaW50CitnZXRfcHJvY19uYW1lKHVud19hZGRyX3NwYWNlX3QgX19tYXliZV91bnVzZWQgYXMsCisJICAgICAgdW53X3dvcmRfdCBfX21heWJlX3VudXNlZCBhZGRyLAorCQljaGFyIF9fbWF5YmVfdW51c2VkICpidWZwLCBzaXplX3QgX19tYXliZV91bnVzZWQgYnVmX2xlbiwKKwkJdW53X3dvcmRfdCBfX21heWJlX3VudXNlZCAqb2ZmcCwgdm9pZCBfX21heWJlX3VudXNlZCAqYXJnKQoreworCXByX2VycigidW53aW5kOiBnZXRfcHJvY19uYW1lIHVuc3VwcG9ydGVkXG4iKTsKKwlyZXR1cm4gLVVOV19FSU5WQUw7Cit9CisKK3N0YXRpYyBpbnQgYWNjZXNzX2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