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2tlZCBibG9jaworICAgICAgd2hlcmUgdGhlIGNhbGxlciB1c2VzIHRoZSBBUEkgYXBwbGljYWJsZSB0byB0aGUgY2lwaGVyIHR5cGUKKyAgICAgIHNwZWNpZmllZCBmb3IgdGhlIGJsb2NrLgorICAgICA8L3BhcmE+CisKKyAgICAgPHByb2dyYW1saXN0aW5nPgorPCFbQ0RBVEFbCitrZXJuZWwgY3J5cHRvIEFQSSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgIElQU0VDIExheWVyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorKy0tLS0tLS0tLS0tKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKK3wgICAgICAgICAgIHwgICAgICAgICAgICAoMSkKK3wgZ2l2Y2lwaGVyIHwgPC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tICBlc3Bfb3V0cHV0Cit8ICAoc2VxaXYpICB8IC0tLSsKKystLS0tLS0tLS0tLSsgICAgfAorICAgICAgICAgICAgICAgICB8ICgyKQorKy0tLS0tLS0tLS0tKyAgICB8Cit8ICAgICAgICAgICB8IDwtLSsgICAgICAgICAgICAgICAgKDIpCit8ICAgYWVhZCAgICB8IDwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgZXNwX2lucHV0Cit8ICAgKGdjbSkgICB8IC0tLS0tLS0tLS0tLSsKKystLS0tLS0tLS0tLSsgICAgICAgICAgICAgfAorICAgICAgfCAoMykgICAgICAgICAgICAgICB8ICg1KQorICAgICAgdiAgICAgICAgICAgICAgICAgICB2CisrLS0tLS0tLS0tLS0rICAgICAgICstLS0tLS0tLS0tLSsKK3wgICAgICAgICAgIHwgICAgICAgfCAgICAgICAgICAgfAorfCBhYmxrY2lwaGVyfCAgICAgICB8ICAgYWhhc2ggICB8Cit8ICAgKGN0cikgICB8IC0tLSsgIHwgIChnaGFzaCkgIHw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Nzb3IgZGV2aWNlcy4KKworX0NJRCAgIDYuMS4yICAgICAgICAgICBVc2UgYXMgbmVlZGVkLgorCitfQ0xTICAgNi4xLjMgICAgICAgICAgIFVzZSBhcyBuZWVkZWQuCisKK19DUlMgICA2LjIuMiAgICAgICAgICAgUmVxdWlyZWQgb24gYXJtNjQuCisKK19EQ0sgICA2LjUuMiAgICAgICAgICAgT3B0aW9uYWw7IG5vdCBsaWtlbHkgdG8gYmUgdXNlZCBvbiBhcm02NC4KKworX0RETiAgIDYuMS40ICAgICAgICAgICBUaGlzIGZpZWxkIGNhbiBiZSB1c2VkIGZvciBhIGRldmljZSBuYW1lLiAgSG93ZXZlciwKKyAgICAgICAgICAgICAgICAgICAgICAgaXQgaXMgbWVhbnQgZm9yIERPUyBkZXZpY2UgbmFtZXMgKGUuZy4sIENPTTEpLCBzbyBiZQorICAgICAgICAgICAgICAgICAgICAgICBjYXJlZnVsIG9mIGl0cyB1c2UgYWNyb3NzIE9TZXMuCisKK19ERVAgICA2LjUuOCAgICAgICAgICAgVXNlIGFzIG5lZWRlZC4KKworX0RJUyAgIDYuMi4zICAgICAgICAgICBPcHRpb25hbCwgZm9yIHBvd2VyIG1hbmFnZW1lbnQgdXNlLgorCitfRExNICAgNS43LjUgICAgICAgICAgIE9wdGlvbmFsLgorCitfRE1BICAgNi4yLjQgICAgICAgICAgIE9wdGlvbmFsLgorCitfRFNEICAgNi4yLjUgICAgICAgICAgIFRvIGJlIHVzZWQgd2l0aCBjYXV0aW9uLiAgSWYgdGhpcyBvYmplY3QgaXMgdXNlZCwgdHJ5CisgICAgICAgICAgICAgICAgICAgICAgIHRvIHVzZSBpdCB3aXRoaW4gdGhlIGNvbnN0cmFpbnRzIGFscmVhZHkgZGVmaW5lZCBieSB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAgRGV2aWNlIFByb3BlcnRpZXMgVVVJRC4gIE9ubHkgaW4gcmFyZSBjaXJjdW1zdGFuY2VzCisgICAgICAgICAgICAgICAgICAgICAgIHNob3VsZCBpdCBiZSBuZWNlc3NhcnkgdG8gY3JlYXRlIGEgbmV3IF9EU0QgVVVJRC4KKworICAgICAgICAgICAgICAgICAgICAgICBJbiBlaXRoZXIgY2FzZSwgc3VibWl0IHRoZSBfRFNEIGRlZmluaXRpb24gYWxvbmcgd2l0aAorICAgICAgICAgICAgICAgICAgICAgICBhbnkgZHJpdmVyIHBhdGNoZXMgZm9yIGRpc2N1c3Npb24sIGVzcGVjaWFsbHkgd2hlbgorICAgICAgICAgICAgICAgICAgICAgICBkZXZpY2UgcHJvcGVydGllcyBhcmUgdXNlZC4gIEEgZHJpdmVyIHdpbGwgbm90IGJlCisgICAgICAgICAgICAgICAgICAgICAgIGNvbnNpZGVyZWQgY29tcGxldGUgd2l0aG91dCBhIGNvcnJlc3BvbmRpbmcgX0RTRAorICAgICAgICAgICAgICAgICAgICAgICBkZXNjcmlwdGlvbi4gIE9uY2UgYXBwcm92ZWQgYnkga2VybmVsIG1haW50YWluZXJzLAorICAgICAgICAgICAgICAgICAgICAgICB0aGUgVVVJRCBvciBkZXZpY2UgcHJvcGVydGllcyBtdXN0IHRoZW4gYmUgcmVnaXN0ZXJlZAorICAgICAgICAgICAgICAgICAgICAgICB3aXRoIHRoZSBVRUZJIEZvcnVtOyB0aGlzIG1heSBjYXVzZSBzb21lIGl0ZXJhdGlvbiBhcworICAgICAgICAgICAgICAgICAgICAgICBtb3JlIHRoYW4gb25lIE9TIHdpbGwgYmUgcmVnaXN0ZXJpbmcgZW50cmllcy4KKworX0RTTSAgICAgICAgICAgICAgICAgICBEbyBub3QgdXNlIHRoaXMgbWV0aG9kLiAgSXQgaXMgbm90IHN0YW5kYXJkaXplZCwgdGhlCisgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB2YWx1ZXMgYXJlIG5vdCB3ZWxsIGRvY3VtZW50ZWQsIGFuZCBpdCBpcworICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50bHkgYSBmcmVxdWVudCBzb3VyY2Ugb2YgZXJyb3IuCisKK19EU1cgICA3LjIuMSAgICAgICAgICAgVXNlIGFzIG5lZWRlZDsgcG93ZXIgbWFuYWdlbWVudCBzcGVjaWZpYy4KKworX0VETCAgIDYuMy4xICAgICAgICAgICBPcHRpb25hbC4KKworX0VKRCAgIDYuMy4yICAgICAgICAgICBPcHRpb25hbC4KKworX0VKeCAgIDYuMy4zICAgICAgICAgICBPcHRpb25hbC4KKworX0ZJWCAgIDYuMi43ICAgICAgICAgICB4ODYgc3BlY2lmaWMsIG5vdCB1c2VkIG9uIGFybTY0LgorCitcX0dMICAgNS43LjEgICAgICAgICAgIFRoaXMgb2JqZWN0IGlzIG5vdCB0byBiZSB1c2VkIGluIGhhcmR3YXJlIHJlZHVjZWQKKyAgICAgICAgICAgICAgICAgICAgICAgbW9kZSwgYW5kIHRoZXJlZm9yZSBzaG91bGQgbm90IGJlIHVzZWQgb24gYXJtNjQuCisKK19HTEsgICA2LjUuNyAgICAgICAgICAgVGhpcyBvYmplY3QgcmVxdWlyZXMgYSBnbG9iYWwgbG9jayBiZSBkZWZpbmVkOyB0aGVyZQorICAgICAgICAgICAgICAgICAgICAgICBpcyBubyBnbG9iYWwgbG9jayBvbiBhcm02NCBzaW5jZSBpdCBydW5zIGluIGhhcmR3YXJlCisgICAgICAgICAgICAgICAgICAgICAgIHJlZHVjZWQgbW9kZS4gIEhlbmNlLCBkbyBub3QgdXNlIHRoaXMgb2JqZWN0IG9uIGFybTY0LgorCitcX0dQRSAgNS4zLjEgICAgICAgICAgIFRoaXMgbmFtZXNwYWNlIGlzIGZvciB4ODYgdXNlIG9ubHkuICBEbyBub3QgdXNlIGl0CisgICAgICAgICAgICAgICAgICAgICAgIG9uIGFybTY0LgorCitfR1NCICAgNi4yLjcgICAgICAgICAgIE9wdGlvbmFsLgorCitfSElEICAgNi4xLjUgICAgICAgICAgIFVzZSBhcyBuZWVkZWQuICBUaGlzIGlzIHRoZSBwcmltYXJ5IG9iamVjdCB0byB1c2UgaW4KKyAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlIHByb2JpbmcsIHRob3VnaCBfQ0lEIGFuZCBfQ0xTIG1heSBhbHNvIGJlIHVzZWQuCisKK19IUFAgICA2LjIuOCAgICAgICAgICAgT3B0aW9uYWwsIFBDSSBzcGVjaWZpYy4KKworX0hQWCAgIDYuMi45ICAgICAgICAgICBPcHRpb25hbCwgUENJIHNwZWNpZmljLgorCitfSFJWICAgNi4xLjYgICAgICAgICAgIE9wdGlvbmFsLCB1c2UgYXMgbmVlZGVkIHRvIGNsYXJpZnkgZGV2aWNlIGJlaGF2aW9yOyBpbgorICAgICAgICAgICAgICAgICAgICAgICBzb21lIGNhc2VzLCB0aGlzIG1heSBiZSBlYXNpZXIgdG8gdXNlIHRoYW4gX0RTRC4KKworX0lOSSAgIDYuNS4xICAgICAgICAgICBOb3QgcmVxdWlyZWQsIGJ1dCBjYW4gYmUgdXNlZnVsIGluIHNldHRpbmcgdXAgZGV2aWNlcworICAgICAgICAgICAgICAgICAgICAgICB3aGVuIFVFRkkgbGVhdmVzIHRoZW0gaW4gYSBzdGF0ZSB0aGF0IG1heSBub3QgYmUgd2hhdAorICAgICAgICAgICAgICAgICAgICAgICB0aGUgZHJpdmVyIGV4cGVjdHMgYmVmb3JlIGl0IHN0YXJ0cyBwcm9iaW5nLgorCitfSVJDICAgNy4yLjE1ICAgICAgICAgIFVzZSBhcyBuZWVkZWQ7IHBvd2VyIG1hbmFnZW1lbnQgc3BlY2lmaWMuCisKK19MQ0sgICA2LjMuNCAgICAgICAgICAgT3B0aW9uYWwuCisKK19NQVQgICA2LjIuMTAgICAgICAgICAgT3B0aW9uYWw7IHNlZSBhbHNvIHRoZSBNQURULgorCitfTUxTICAgNi4xLjcgICAgICAgICAgIE9wdGlvbmFsLCBidXQgaGlnaGx5IHJlY29tbWVuZGVkIGZvciB1c2UgaW4KKyAgICAgICAgICAgICAgICAgICAgICAgaW50ZXJuYXRpb25hbGl6YXRpb24uCisKK19PRkYgICA3LjEuM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AgICAgICAgICAgICAgICAgICAgICAgdGhlIEFDUEkgc3BlY2lmaWNhdGlvbiBhcmUgYWxsb3dlZC4gIFdoZW4gdXNlZCBhcworICAgICAgICAgICAgICAgICAgICAgICBhIGRldmljZS1zcGVjaWZpYyBtZXRob2QsIHRoZSBwcm9jZXNzIGRlc2NyaWJlZCBmb3IKKyAgICAgICAgICAgICAgICAgICAgICAgdXNpbmcgX0RTRCBNVVNUIGJlIHVzZWQgdG8gY3JlYXRlIGFuIF9PU0MgZGVmaW5pdGlvbjsKKyAgICAgICAgICAgICAgICAgICAgICAgb3V0LW9mLXByb2Nlc3MgdXNlIG9mIF9PU0MgaXMgbm90IGFsbG93ZWQuICBUaGF0IGlzLAorICAgICAgICAgICAgICAgICAgICAgICBzdWJtaXQgdGhlIGRldmljZS1zcGVjaWZpYyBfT1NDIHVzYWdlIGRlc2NyaXB0aW9uIGFzCisgICAgICAgICAgICAgICAgICAgICAgIHBhcnQgb2YgdGhlIGtlcm5lbCBkcml2ZXIgc3VibWlzc2lvbiwgZ2V0IGl0IGFwcHJvdmVkCisgICAgICAgICAgICAgICAgICAgICAgIGJ5IHRoZSBrZXJuZWwgY29tbXVuaXR5LCB0aGVuIHJlZ2lzdGVyIGl0IHdpdGggdGhlCisgICAgICAgICAgICAgICAgICAgICAgIFVFRkkgRm9ydW0uCisKK1xfT1NJICA1LjcuMiAgICAgICAgICAgRGVwcmVjYXRlZCBvbiBBUk02NC4gIEFueSBpbnZvY2F0aW9uIG9mIHRoaXMgbWV0aG9kCisgICAgICAgICAgICAgICAgICAgICAgIHdpbGwgcHJpbnQgYSB3YXJuaW5nIG9uIHRoZSBjb25zb2xlIGFuZCByZXR1cm4gZmFsc2UuCisgICAgICAgICAgICAgICAgICAgICAgIFRoYXQgaXMsIGFzIGZhciBhcyBBQ1BJIGZpcm13YXJlIGlzIGNvbmNlcm5lZCwgX09TSQorICAgICAgICAgICAgICAgICAgICAgICBjYW5ub3QgYmUgdXNlZCB0byBkZXRlcm1pbmUgd2hhdCBzb3J0IG9mIHN5c3RlbSBpcworICAgICAgICAgICAgICAgICAgICAgICBiZWluZyB1c2VkIG9yIHdoYXQgZnVuY3Rpb25hbGl0eSBpcyBwcm92aWRlZC4gIFRoZQorICAgICAgICAgICAgICAgICAgICAgICBfT1NDIG1ldGhvZCBpcyB0byBiZSB1c2VkIGluc3RlYWQuCisKK19PU1QgICA2LjMuNSAgICAgICAgICAgT3B0aW9uYWwuCisKK19QREMgICA4LjQuMSAgICAgICAgICAgRGVwcmVjYXRlZCwgZG8gbm90IHVzZSBvbiBhcm02NC4KKworXF9QSUMgIDUuOC4xICAgICAgICAgICBUaGUgbWV0aG9kIHNob3VsZCBub3QgYmUgdXNlZC4gIE9uIGFybTY0LCB0aGUgb25seQorICAgICAgICAgICAgICAgICAgICAgICBpbnRlcnJ1cHQgbW9kZWwgYXZhaWxhYmxlIGlzIEdJQy4KKworX1BMRCAgIDYuMS44ICAgICAgICAgICBPcHRpb25hbC4KKworXF9QUiAgIDUuMy4xICAgICAgICAgICBUaGlzIG5hbWVzcGFjZSBpcyBmb3IgeDg2IHVzZSBvbmx5IG9uIGxlZ2FjeSBzeXN0ZW1zLgorICAgICAgICAgICAgICAgICAgICAgICBEbyBub3QgdXNlIGl0IG9uIGFybTY0LgorCitfUFJTICAgNi4yLjEyICAgICAgICAgIE9wdGlvbmFsLgorCitfUFJUICAgNi4yLjEzICAgICAgICAgIFJlcXVpcmVkIGFzIHBhcnQgb2YgdGhlIGRlZmluaXRpb24gb2YgYWxsIFBDSSByb290CisgICAgICAgICAgICAgICAgICAgICAgIGRldmljZXMuCisKK19QUlcgICA3LjIuMTMgICAgICAgICAgVXNlIGFzIG5lZWRlZDsgcG93ZXIgbWFuYWdlbWVudCBzcGVjaWZpYy4KKworX1BSeCAgIDcuMi44LTExICAgICAgICBVc2UgYXMgbmVlZGVkOyBwb3dlciBtYW5hZ2VtZW50IHNwZWNpZmljLiAgSWYgX1BSMCBpcworICAgICAgICAgICAgICA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cm02NDsgYWxsIGRldmljZXMgbXVzdCBiZSBkZWZpbmVkIGluIHRoaXMKKyAgICAgICAgICAgICAgICAgICAgICAgbmFtZXNwYWNlLgorCitfU0VHICAgNi41LjYgICAgICAgICAgIFVzZSBhcyBuZWVkZWQ7IFBDSS1zcGVjaWZpYy4KKworXF9TSSAgIDUuMy4xLCAgICAgICAgICBPcHRpb25hbC4KKyAgICAgICA5LjEKKworX1NMSSAgIDYuMi4xNSAgICAgICAgICBPcHRpb25hbDsgcmVjb21tZW5kZWQgd2hlbiBTTElUIHRhYmxlIGlzIGluIHVzZS4KKworX1NUQSAgIDYuMy43LCAgICAgICAgICBJdCBpcyByZWNvbW1lbmRlZCB0byBkZWZpbmUgdGhpcyBtZXRob2QgZm9yIGFueSBkZXZpY2UKKyAgICAgICA3LjEuNCAgICAgICAgICAgdGhhdCBjYW4gYmUgdHVybmVkIG9uIG9yIG9mZi4KKworX1NSUyAgIDYuMi4xNiAgICAgICAgICBPcHRpb25hbDsgc2VlIGFsc28gX1BSUy4KKworX1NUUiAgIDYuMS4xMCAgICAgICAgICBSZWNvbW1lbmRlZCBmb3IgY29udmV5aW5nIGRldmljZSBuYW1lcyB0byBlbmQgdXNlcnM7CisgICAgICAgICAgICAgICAgICAgICAgIHRoaXMgaXMgcHJlZmVycmVkIG92ZXIgdXNpbmcgX0RETi4KKworX1NVQiAgIDYuMS45ICAgICAgICAgICBVc2UgYXMgbmVlZGVkOyBfSElEIG9yIF9DSUQgYXJlIHByZWZlcnJlZC4KKworX1NVTiAgIDYuMS4xMSAgICAgICAgICBPcHRpb25hbC4KKworXF9TeCAgIDcuMy4yICAgICAgICAgICBVc2UgYXMgbmVlZGVkOyBwb3dlciBtYW5hZ2VtZW50IHNwZWNpZmljLgorCitfU3hEICAgNy4yLjE2LTE5ICAgICAgIFVzZSBhcyBuZWVkZWQ7IHBvd2VyIG1hbmFnZW1lbnQgc3BlY2lmaWMuCisKK19TeFcgICA3LjIuMjAtMjQgICAgICAgVXN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Wxsb3cgbW9zdCBkaXZlcmdlbmNlIGJldHdlZW4gQUNQSSBhbmQgRFQgZnVuY3Rpb25hbGl0eSB0byBiZSBrZXB0IGxvY2FsIHRvCit0aGUgcHJvYmUgZnVuY3Rpb24gaW5zdGVhZCBvZiBiZWluZyBzY2F0dGVyZWQgdGhyb3VnaG91dCB0aGUgZHJpdmVyLiAgRm9yCitleGFtcGxlOgorCitzdGF0aWMgaW50IGRldmljZV9wcm9iZV9kdChzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpwZGV2KQoreworICAgICAgIC8qIERUIHNwZWNpZmljIGZ1bmN0aW9uYWxpdHkgKi8KKyAgICAgICAuLi4KK30KKworc3RhdGljIGludCBkZXZpY2VfcHJvYmVfYWNwaShzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpwZGV2KQoreworICAgICAgIC8qIEFDUEkgc3BlY2lmaWMgZnVuY3Rpb25hbGl0eSAqLworICAgICAgIC4uLgorfQorCitzdGF0aWMgaW50IGRldmljZV9wcm9iZShzdHJ1Y3QgcGxhdGZvcm1fZGV2aWNlICpwZGV2KQoreworICAgICAgIC4uLgorICAgICAgIHN0cnVjdCBkZXZpY2Vfbm9kZSBub2RlID0gcGRldi0+ZGV2Lm9mX25vZGU7CisgICAgICAgLi4uCisKKyAgICAgICBpZiAobm9kZSkKKyAgICAgICAgICAgICAgIHJldCA9IGRldmljZV9wcm9iZV9kdChwZGV2KTsKKyAgICAgICBlbHNlIGlmIChBQ1BJX0hBTkRMRSgmcGRldi0+ZGV2KSkKKyAgICAgICAgICAgICAgIHJldCA9IGRldmljZV9wcm9iZV9hY3BpKHBkZXYpOworICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgIC8qIG90aGVyIGluaXRpYWxpemF0aW9uICovCisgICAgICAgICAgICAgICAuLi4KKyAgICAgICAvKiBDb250aW51ZSB3aXRoIGFueSBnZW5lcmljIHByb2JlIG9wZXJhdGlvbnMgKi8KKyAgICAgICAuLi4KK30KKworRE8ga2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JzLgogCistIGNsb2NrczogUmVmZXJlbmNlIHRvIHRoZSBwYXJlbnQgY2xvY2tzLCBvbmUgcGVyIG91dHB1dCBjbG9jay4gVGhlIHBhcmVudHMKKyAgICAgICAgICBtdXN0IGFwcGVhciBpbiB0aGUgc2FtZSBvcmRlciBhcyB0aGUgY2xvY2sgbmFtZXMuCisKKy0gY2xvY2stbmFtZXM6IFRoZSBuYW1lIG9mIHRoZSBjbG9ja3MgYXMgZnJlZS1mb3JtIHN0cmluZ3MuIFRoZXkgc2hvdWxkIGJlIGluCisgICAgICAgICAgICAgICB0aGUgc2FtZSBvcmRlciBhcyB0aGUgY2xvY2tzLgorCiAtIGNsb2NrLWZyZXF1ZW5jeSA6IFRoZSBmcmVxdWVuY3kgb2YgdGhlIGRlYnVnIHRpbWVyIGFuZCB0aGUgZ2VuZXJhbCBwdXJwb3NlCiAgICAgICAgICAgICAgICAgICAgIHRpbWVyKHMpIGluIEh6IGluIHRoYXQgb3JkZXIuCiAKQEAgLTI5LDkgKzM1LDEzIEBACiAgICAgICAgICAgICAgICBjb21wYXRpYmxlID0gInFjb20sc2Nzcy10aW1lciIsICJxY29tLG1zbS10aW1lciI7CiAgICAgICAgICAgICAgICBpbnRlcnJ1cHRzID0gPDEgMSAweDMwMT4sCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDEgMiAweDMwMT4sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgPDEgMyAweDMwMT47CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDEgMyAweDMwMT4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDEgNCAweDMwMT4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDEgNSAweDMwMT47CiAgICAgICAgICAgICAgICByZWcgPSA8MHgwMjAwYTAwMCAweDEwMD47CiAgICAgICAgICAgICAgICBjbG9jay1mcmVxdWVuY3kgPSA8MTkyMDAwMDA+LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPDMyNz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AgICAgIDwmY211X21pZiBDTEtfU0NMS19NRkNfUExMPiwKKwkJICAgICAgIDwmY211X21pZiBDTEtfU0NMS19CVVNfUExMPjsKKwl9OworCisJY211X2NwaWY6IGNsb2NrLWNvbnRyb2xsZXJAMTBmYzAwMDAgeworCQljb21wYXRpYmxlID0gInNhbXN1bmcsZXh5bm9zNTQzMy1jbXUtY3BpZiI7CisJCXJlZyA9IDwweDEwZmMwMDAwIDB4MGMwND47CisJCSNjbG9jay1jZWxscyA9IDwxPjsKKworCQljbG9jay1uYW1lcyA9ICJvc2NjbGsiOworCQljbG9ja3MgPSA8Jnh4dGk+OworCX07CisKKwljbXVfbWlmOiBjbG9jay1jb250cm9sbGVyQDEwNWIwMDAwIHsKKwkJY29tcGF0aWJsZSA9ICJzYW1zdW5nLGV4eW5vczU0MzMtY211LW1pZiI7CisJCXJlZyA9IDwweDEwNWIwMDAwIDB4MTAwYz47CisJCSNjbG9jay1jZWxscyA9IDwxPjsKKworCQljbG9jay1uYW1lcyA9ICJvc2NjbGsiLAorCQkJInNjbGtfbXBoeV9wbGwiOworCQljbG9ja3MgPSA8Jnh4dGk+LAorCQkgICAgICAgPCZjbXVfY3BpZiBDTEtfU0NMS19NUEhZX1BMTD47CisJfTsKKworCWNtdV9wZXJpYzogY2xvY2stY29udHJvbGxlckAxNGM4MDAwMCB7CisJCWNvbXBhdGlibGUgPSAic2Ftc3VuZyxleHlub3M1NDMzLWNtdS1wZXJpYyI7CisJCXJlZyA9IDwweDE0YzgwMDAwIDB4MGIwOD47CisJCSNjbG9jay1jZWxscyA9IDwxPjsKKwl9OworCisJY211X3BlcmlzOiBjbG9jay1jb250cm9sbGVyQDEwMDQwMDAwIHsKKwkJY29tcGF0aWJsZSA9ICJzYW1zdW5nLGV4eW5vczU0MzMtY211LXBlcmlzIjsKKwkJcmVnID0gPDB4MTAwNDAwMDAgMHgwYjIwPjsKKwkJI2Nsb2NrLWNlbGxzID0gPDE+OworCX07CisKKwljbXVfZnN5czogY2xv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M6ICBUaGUgY2xvY2sgcHJvdmlkZWQgYnkgdGhlIFNPQyB0byBkcml2ZXIgdGhlIHRzYworLSBjbG9jay1uYW1lOiAgbmFtZSBmb3IgdGhlIGNsb2NrCistIGludGVycnVwdHM6IFRoZSB0b3VjaHNjcmVlbiBjb250cm9sbGVyJ3MgaW50ZXJydXB0CisKK09wdGlvbmFsIHByb3BlcnRpZXM6CistIHNjYW5uaW5nX3BlcmlvZDogVGltZSBiZXR3ZWVuIHNjYW5zLiBFYWNoIHN0ZXAgaXMgMTAyNCB1cy4gIFZhbGlkIDEtMjU2LgorLSBkZWJvdW5jZV90aW1lb3V0OiBFYWNoIHN0ZXAgaXMgNTEyIHVzLiAgVmFsaWQgMC0yNTUKKy0gc2V0dGxpbmdfdGltZW91dDogVGhlIHNldHRsaW5nIGR1cmF0aW9uIChpbiBtcykgaXMgdGhlIGFtb3VudCBvZiB0aW1lCisgICAgICAgICAgICAgICAgICAgIHRoZSB0c2Mgd2FpdHMgdG8gYWxsb3cgdGhlIHZvbHRhZ2UgdG8gc2V0dGxlIGFmdGVyCisgICAgICAgICAgICAgICAgICAgIHR1cm5pbmcgb24gdGhlIGRyaXZlcnMgaW4gZGV0ZWN0aW9uIG1vZGUuCisgICAgICAgICAgICAgICAgICAgIFZhbGlkIHZhbHVlczogMC0xMQorICAgICAgICAgICAgICAgICAgICAwID0gIDAuMDA4IG1zCisgICAgICAgICAgICAgICAgICAgIDEgPSAgMC4wMSBtcworICAgICAgICAgICAgICAgICAgICAyID0gIDAuMDIgbXMKKyAgICAgICAgICAgICAgICAgICAgMyA9ICAwLjA0IG1zCisgICAgICAgICAgICAgICAgICAgIDQgPSAgMC4wOCBtcworICAgICAgICAgICAgICAgICAgICA1ID0gIDAuMTYgbXMKKyAgICAgICAgICAgICAgICAgICAgNiA9ICAwLjMyIG1zCisgICAgICAgICAgICAgICAgICAgIDcgPSAgMC42NCBtcworICAgICAgICAgICAgICAgICAgICA4ID0gIDEuMjggbXMKKyAgICAgICAgICAgICAgICAgICAgOSA9ICAyLjU2IG1zCisgICAgICAgICAgICAgICAgICAgMTAgPSAgNS4xMiBtcworICAgICAgICAgICAgICAgICAgIDExID0gMTAuMjQgbXMKKy0gdG91Y2hfdGltZW91dDogVGhlIGNvbnRpbnVvdXMgbnVtYmVyIG9mIHNjYW4gcGVyaW9kcyBpbiB3aGljaCB0b3VjaCBpcworICAgICAgICAgICAgICAgIG5vdCBkZXRlY3RlZCBiZWZvcmUgdGhlIGNvbnRyb2xsZXIgcmV0dXJucyB0byBpZGxlIHN0YXRlLgorICAgICAgICAgICAgICAgIFZhbGlkIHZhbHVlcyAwLTI1NS4KKy0gYXZlcmFnZV9kYXRhOiBOdW1iZXIgb2YgZGF0YSBzYW1wbGVzIHdoaWNoIGFyZSBhdmVyYWdlZCBiZWZvcmUgYSBmaW5hbAorICAgICAgICAgICAgICAgIGRhdGEgcG9pbnQgaXMgcGxhY2VkIGludG8gdGhlIEZJRk8KKyAgICAgICAgICAgICAgICBWYWxpZCB2YWx1ZXMgMC03CisgICAgICAgICAgICAgICAgMCA9ICAgMSBzYW1wbGUKKyAgICAgICAgICAgICAgICAxID0gICAyIHNhbXBsZXMKKyAgICAgICAgICAgICAgICAyID0gICA0IHNhbXBsZXMKKyAgICAgICAgICAgICAgICAzID0gICA4IHNhbXBsZXMKKyAgICAgICAgICAgICAgICA0ID0gIDE2IHNhbXBsZXMKKyAgICAgICAgICAgICAgICA1ID0gIDMyIHNhbXBsZXMKKyAgICAgICAgICAgICAgICA2ID0gIDY0IHNhbXBsZXMKKyAgICAgICAgICAgICAgICA3ID0gMTI4IHNhbXBsZXMKKy0gZmlmb190aHJlc2hvbGQ6IEludGVycnVwdCBpcyBnZW5lcmF0ZWQgd2hlbmV2ZXIgdGhlIG51bWJlciBvZiBmaWZvCisgICAgICAgICAgICAgICAgZW50cmllcyBleGNlZWRzIHRoaXMgdmFsdWUKKyAgICAgICAgICAgICAgICBWYWxpZCB2YWx1ZXMgMC0zMQorLSB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aWMudHh0CkBAIC0xNSwxMCArMTUsMjEgQEAKIAogUmVxdWlyZWQgcHJvcGVydGllczoKIC0gY29tcGF0aWJsZTogICAgICBTaG91bGQgY29udGFpbiBvbmUgb2Y6Ci0gICAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg5NDEiCi0gICAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg4NDEiCi0gICAgICAgICAgICAgICAgICAgICAicWNvbSxwbWE4MDg0IgotICAgICAgICAgICAgICAgICAgICAgb3IgZ2VuZXJhbGl6ZWQgInFjb20sc3BtaS1wbWljIi4KKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg5NDEiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODg0MSIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1hODA4NCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04MDE5IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTgyMjYiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODExMCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1hODA4NCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1pODk2MiIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1kOTYzNSIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04OTk0IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbWk4OTk0IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg5MTYiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODAwNCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04OTA5IiwKKyAgICAgICAgICAgICAgICAgICBvciBnZW5lcmFsaXplZCAicWNvbSxzcG1pLXBtaWMiLgogLSByZWc6ICAgICAgICAgICAgIFNwZWNpZmllcyB0aGUgU1BNSSBVU0lEIHNsYXZlIGFkZHJlc3MgZm9yIHRoaXMgZGV2aWNlLgogICAgICAgICAgICAgICAgICAgIEZvciBtb3JlIGluZm9ybWF0aW9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d20wIjogInB3bTBfZ3JwIgorCisicHdtMSI6ICJwd20xX2dycCIKKworInB3bTIiOiAicHdtMl9ncnAiCisKKyJwd20zIjogInB3bTNfZ3JwIgorCisicHdtNCI6ICJwd200X2dycCIKKworInB3bTUiOiAicHdtNV9ncnAiCisKKyJrZXkiOiAia2V5MF9ncnAiLCAia2V5MV9ncnAiLCAia2V5Ml9ncnAiLCAia2V5M19ncnAiLCAia2V5NF9ncnAiLCAia2V5NV9ncnAiLAorImtleTZfZ3JwIiwgImtleTdfZ3JwIiwgImtleThfZ3JwIiwgImtleTlfZ3JwIiwgImtleTEwX2dycCIsICJrZXkxMV9ncnAiLAorImtleTEyX2dycCIsICJrZXkxM19ncnAiLCAia2V5MTRfZ3JwIiwgImtleTE1X2dycCIKKworImF1ZGlvX2R0ZSI6ICJhdWRpb19kdGUwX2dycCIsICJhdWRpb19kdGUxX2dycCIsICJhdWRpb19kdGUyX2dycCIsICJhdWRpb19kdGUzX2dycCIKKworInNtYXJ0X2NhcmQwIjogInNtYXJ0X2NhcmQwX2dycCIsICJzbWFydF9jYXJkMF9mY2JfZ3JwIgorCisic21hcnRfY2FyZDEiOiAic21hcnRfY2FyZDFfZ3JwIiwgInNtYXJ0X2NhcmQxX2ZjYl9ncnAiCisKKyJzcGkwIjogInNwaTBfZ3JwIgorCisic3BpMSI6ICJzcGkxX2dycCIKKworInNwaTIiOiAic3BpMl9ncnAiCisKKyJzcGkzIjogInNwaTNfZ3JwIgorCisic3BpNCI6ICJzcGk0XzBfZ3JwIiwgInNwaTRfMV9ncnAiCisKKyJzcGk1IjogInNwaTVfZ3JwIgorCisic3dfbGVkMCI6ICJzd19sZWQwXzBfZ3JwIiwgInN3X2xlZDBfMV9ncnAiCisKKyJzd19sZWQxIjogInN3X2xlZDFfZ3JwIgorCisic3dfbGVkMiI6ICJzd19sZWQyXzBfZ3JwIiwgInN3X2xlZDJfMV9ncnAiCisKKyJkMXciOiAiZDF3X2dycCIKKworImxjZCI6ICJsY2RfZ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NpYmxpbmc0IC0+IG51bGwKLSAgIHwgICAgICAgICB8ICAgICAgICAgICB8ICAgICAgICAgICB8Ci0gICB8ICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICBudWxsCi0gICB8ICAgICAgICAgfCAgICAgICAgICAgfAotICAgfCAgICAgICAgIHwgICAgICAgIGNoaWxkMzEgLT4gc2libGluZzMyIC0+IG51bGwKLSAgIHwgICAgICAgICB8ICAgICAgICAgICB8ICAgICAgICAgIHwKLSAgIHwgICAgICAgICB8ICAgICAgICAgIG51bGwgICAgICAgbnVsbAotICAgfCAgICAgICAgIHwKLSAgIHwgICAgICBjaGlsZDIxIC0+IHNpYmxpbmcyMiAtPiBzaWJsaW5nMjMgLT4gbnVsbAotICAgfCAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgIHwKLSAgIHwgICAgICAgIG51bGwgICAgICAgbnVsbCAgICAgICAgIG51bGwKLSAgIHwKLWNoaWxkMTEgLT4gc2libGluZzEyIC0+IHNpYmxpbmcxMyAtPiBzaWJsaW5nMTQgLT4gbnVsbAotICAgfCAgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgIHwKLSAgIHwgICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgIG51bGwKLSAgIHwgICAgICAgICAgIHwgICAgICAgICAgIHwKLSAgbnVsbCAgICAgICAgbnVsbCAgICAgICBjaGlsZDEzMSAtPiBudWxsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICB8Ci0gICAgICAgICAgICAgICAgICAgICAgICAgIG51bGwKLQotRmlndXJlIDE6IEdlbmVyaWMgc3RydWN0dXJlIG9mIHVuLWZsYXR0ZW5lZCBkZXZpY2UgdHJlZQotCi0KLUJlZm9yZSBleGVjdXRpbmcgT0Ygc2VsZnRlc3QsIGl0IGlzIHJlcXVpcmVkIHRvIGF0dGFjaCB0aGUgdGVzdCBkYXRhIHRvCi1tYWNoaW5lJ3MgZGV2aWNlIHRyZWUgKGlmIHByZXNlbnQp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1Y3R1cmUgaXMKLSBhcyBzaG93biBpbiBGaWd1cmUgMy4KLQotcm9vdCAoJy8nKQotICAgfAotdGVzdGNhc2UtZGF0YSAtPiBjaGlsZDEgLT4gc2libGluZzIgLT4gc2libGluZzMgLT4gc2libGluZzQgLT4gbnVsbAotICAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgfAotICguLi4pICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICBudWxsCi0gICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8ICAgICAgICAgY2hpbGQzMSAtPiBzaWJsaW5nMzIgLT4gbnVsbAotICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgfAotICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICBudWxsICAgICAgICBudWxsCi0gICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8Ci0gICAgICAgICAgICAgICAgICAgfCAgICAgICAgY2hpbGQyMSAtPiBzaWJsaW5nMjIgLT4gc2libGluZzIzIC0+IG51bGwKLSAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgICB8Ci0gICAgICAgICAgICAgICAgICAgfCAgICAgICAgIG51bGwgICAgICAgIG51bGwgICAgICAgICBudWxsCi0gICAgICAgICAgICAgICAgICAgfAotICAgICAgICAgICAgICAgIGNoaWxkMTEgLT4gc2libGluZzEyIC0+IHNpYmxpbmcxMyAtPiBzaWJsaW5nMTQgLT4gbnVsbAotICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgIHwgICAgICAgICAgICB8Ci0gICAgICAgICAgICAgICAgICBudWxsICAgICAgIG51bGwgICAgICAgICAgfCAgICAgICAgICAgbnVsbAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZDEzMSAtPiBudWxsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVsbAotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLQotcm9vdCAoJy8nKQotICAgfAotdGVzdGNhc2UtZGF0YSAtPiBjaGlsZDEgLT4gc2libGluZzIgLT4gc2libGluZzMgLT4gc2libGluZzQgLT4gbnVsbAotICAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgfAotICAgfCAgICAgICAgICAgICAoLi4uKSAgICAgICguLi4pICAgICAgICguLi4pICAgICAgICBudWxsCi0gICB8Ci10ZXN0LXNpYmxpbmczIC0+IHRlc3Qtc2libGluZzIgLT4gdGVzdC1zaWJsaW5nMSAtPiB0ZXN0LWNoaWxkMCAtPiBudWxsCi0gICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8Ci0gIG51bGwgICAgICAgICAgICAgbnVsbCAgICAgICAgICAgICAgICBudWxsICAgICAgICAgdGVzdC1jaGlsZDAxCi0KLQotRmlndXJlIDM6IExpdmUgZGV2aWNlIHRyZWUgc3RydWN0dXJlIGFmdGVyIGF0dGFjaGluZyB0aGUgdGVzdGNhc2UtZGF0YS4KLQotCi1Bc3R1dGUgcmVhZGVycyB3b3VsZCBoYXZlIG5vdGljZWQgdGhhdCB0ZXN0LWNoaWxkMCBub2RlIGJlY29tZXMgdGhlIGxhc3QKLXNpYmxpbmcgY29tcGFyZWQgdG8gdGhlIGVhcmxpZXIgc3RydWN0dXJlIChGaWd1cmUgMikuIEFmdGVyIGF0dGFjaGluZyBmaXJzdAotdGVzdC1jaGlsZDAgdGhlI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ICAgICAgIHwgICAgICAgIGNoaWxkMzEgLT4gc2libGluZzMyIC0+IG51bGwKKyAgIHwgICAgICAgICB8ICAgICAgICAgICB8ICAgICAgICAgIHwKKyAgIHwgICAgICAgICB8ICAgICAgICAgIG51bGwgICAgICAgbnVsbAorICAgfCAgICAgICAgIHwKKyAgIHwgICAgICBjaGlsZDIxIC0+IHNpYmxpbmcyMiAtPiBzaWJsaW5nMjMgLT4gbnVsbAorICAgfCAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgIHwKKyAgIHwgICAgICAgIG51bGwgICAgICAgbnVsbCAgICAgICAgIG51bGwKKyAgIHwKK2NoaWxkMTEgLT4gc2libGluZzEyIC0+IHNpYmxpbmcxMyAtPiBzaWJsaW5nMTQgLT4gbnVsbAorICAgfCAgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgIHwKKyAgIHwgICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgIG51bGwKKyAgIHwgICAgICAgICAgIHwgICAgICAgICAgIHwKKyAgbnVsbCAgICAgICAgbnVsbCAgICAgICBjaGlsZDEzMSAtPiBudWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgICAgICAgIG51bGwKKworRmlndXJlIDE6IEdlbmVyaWMgc3RydWN0dXJlIG9mIHVuLWZsYXR0ZW5lZCBkZXZpY2UgdHJlZQorCisKK0JlZm9yZSBleGVjdXRpbmcgT0YgdW5pdHRlc3QsIGl0IGlzIHJlcXVpcmVkIHRvIGF0dGFjaCB0aGUgdGVzdCBkYXRhIHRvCittYWNoaW5lJ3MgZGV2aWNlIHRyZWUgKGlmIHByZXNlbnQpLiBTbywgd2hlbiBzZWxmdGVzdF9kYXRhX2FkZCgpIGlzIGNhbGxlZCwKK2F0IGZpcnN0IGl0IHJlYWRzIHRoZSBmbGF0dGVuZWQgZGV2aWNlIHRyZWUgZGF0YSBsaW5rZWQgaW50byB0aGUga2VybmVsIGltYWdlCit2aW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AgfCAgICAgICAgICAgfCAgICAgICAgICAgfAorICguLi4pICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICBudWxsCisgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8ICAgICAgICAgY2hpbGQzMSAtPiBzaWJsaW5nMzIgLT4gbnVsbAorICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICBudWxsICAgICAgICBudWxsCisgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgfCAgICAgICAgY2hpbGQyMSAtPiBzaWJsaW5nMjIgLT4gc2libGluZzIzIC0+IG51bGwKKyAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgIHwgICAgICAgICAgIHwgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICAgfCAgICAgICAgIG51bGwgICAgICAgIG51bGwgICAgICAgICBudWxsCisgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgIGNoaWxkMTEgLT4gc2libGluZzEyIC0+IHNpYmxpbmcxMyAtPiBzaWJsaW5nMTQgLT4gbnVsbAorICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgIHwgICAgICAgICAgICB8CisgICAgICAgICAgICAgICAgICBudWxsICAgICAgIG51bGwgICAgICAgICAgfCAgICAgICAgICAgbnVsbAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZDEzMSAtPiBudWxsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVsbAorLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKworcm9vdCAoJy8nKQorICAgfAordGVzdGNhc2UtZGF0YSAtPiBjaGlsZDEgLT4gc2libGluZzIgLT4gc2libGluZzMgLT4gc2libGluZzQgLT4gbnVsbAorICAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgfCAgICAgICAgICAgfCAgICAgICAgICAgfAorICAgfCAgICAgICAgICAgICAoLi4uKSAgICAgICguLi4pICAgICAgICguLi4pICAgICAgICBudWxsCisgICB8Cit0ZXN0LXNpYmxpbmczIC0+IHRlc3Qtc2libGluZzIgLT4gdGVzdC1zaWJsaW5nMSAtPiB0ZXN0LWNoaWxkMCAtPiBudWxsCisgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8CisgIG51bGwgICAgICAgICAgICAgbnVsbCAgICAgICAgICAgICAgICBudWxsICAgICAgICAgdGVzdC1jaGlsZDAxCisKKworRmlndXJlIDM6IExpdmUgZGV2aWNlIHRyZWUgc3RydWN0dXJlIGFmdGVyIGF0dGFjaGluZyB0aGUgdGVzdGNhc2UtZGF0YS4KKworCitBc3R1dGUgcmVhZGVycyB3b3VsZCBoYXZlIG5vdGljZWQgdGhhdCB0ZXN0LWNoaWxkMCBub2RlIGJlY29tZXMgdGhlIGxhc3QKK3NpYmxpbmcgY29tcGFyZWQgdG8gdGhlIGVhcmxpZXIgc3RydWN0dXJlIChGaWd1cmUgMikuIEFmdGVyIGF0dGFjaGluZyBmaXJzdAordGVzdC1jaGlsZDAgdGhlIHRlc3Qtc2libGluZzEgaXMgYXR0YWNoZWQgdGhhdCBwdXNoZXMgdGhlIGNoaWxkIG5vZGUKKyhpLmUuIHRlc3QtY2hpbGQwKSB0byBiZWNvbWUgYSBzaWJsaW5nIGFuZCBtYWtlcyBpdHNlbGYgYSBjaGlsZCBub2RlLAorIGFzIG1lbnRpb25lZCBhYm92ZS4KKworSWYgYSBkdXB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b3JpdGhtIGlzOgorCisgMS4gcmVjZWl2ZSBzdGF0dXMKKworICAgc2VuZGVyICAgICAgICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyCisgICBBQ0s6Q1IgICAgICAgICAgICAgICAgICAgICAgICAgIEFDSzpDUiAgICAgICAgICAgICAgICAgICAgIEFDSzpDUgorCisgMi4gc2VuZGVyIGdldCBFWCBvZiBUT0tFTgorICAgIHNlbmRlciBnZXQgRVggb2YgTUVTU0FHRQorICAgIHNlbmRlciAgICAgICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyICAgICAgICAgICAgICAgICByZWNlaXZlcgorICAgIFRPS0VOOkVYICAgICAgICAgICAgICAgICAgICAgICBBQ0s6Q1IgICAgICAgICAgICAgICAgICAgQUNLOkNSCisgICAgTUVTU0FHRTpFWAorICAgIEFDSzpDUgorCisgICAgU2VuZGVyIGNoZWNrcyB0aGF0IGl0IHN0aWxsIG5lZWRzIHRvIHNlbmQgYSBtZXNzYWdlLiBNZXNzYWdlcyByZWNlaXZlZAorICAgIG9yIG90aGVyIGV2ZW50cyB0aGF0IGhhcHBlbmVkIHdoaWxlIHdhaXRpbmcgZm9yIHRoZSBUT0tFTiBtYXkgaGF2ZSBtYWRlCisgICAgdGhpcyBtZXNzYWdlIGluYXBwcm9wcmlhdGUgb3IgcmVkdW5kYW50LgorCisgMy4gc2VuZGVyIHdyaXRlIExWQi4KKyAgICBzZW5kZXIgZG93bi1jb252ZXJ0IE1FU1NBR0UgZnJvbSBFWCB0byBDUgorICAgIHNlbmRlciB0cnkgdG8gZ2V0IEVYIG9mIEFDSworICAgIFsgd2FpdCB1bnRpbCBhbGwgcmVjZWl2ZXIgaGFzICpwcm9jZXNzZWQqIHRoZSBNRVNTQUdFIF0KKworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFsgdHJpZ2dlcmVkIGJ5IGJhc3Qgb2YgQUNLIF0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNlaXZlciBnZXQgQ1Igb2YgTUVTU0FHRQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyIHJlYWQgTFZCCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjZWl2ZXIgcHJvY2Vzc2VzIHRoZSBtZXNzYWdlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWyB3YWl0IGZpbmlzaCBdCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVjZWl2ZXIgcmVsZWFzZSBBQ0sKKworICAgc2VuZGVyICAgICAgICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyCisgICBUT0tFTjpFWCAgICAgICAgICAgICAgICAgICAgICAgTUVTU0FHRTpDUiAgICAgICAgICAgICAgICAgTUVTU0FHRTpDUgorICAgTUVTU0FHRTpDUgorICAgQUNLOkVYCisKKyA0LiB0cmlnZ2VyZWQgYnkgZ3JhbnQgb2YgRVggb24gQUNLIChpbmRpY2F0aW5nIGFsbCByZWNlaXZlcnMgaGF2ZSBwcm9jZXNzZWQKKyAgICBtZXNzYWdlKQorICAgIHNlbmRlciBkb3duLWNvbnZlcnQgQUNLIGZyb20gRVggdG8gQ1IKKyAgICBzZW5kZXIgcmVsZWFzZSBNRVNTQUdFCisgICAgc2VuZGVyIHJlbGVhc2UgVE9LRU4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNlaXZlciB1cGNvbnZlcnQgdG8gRVggb2YgTUVTU0FHRQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyIGdldCBDUiBvZiBBQ0sKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWNlaXZlciByZWxlYXNlIE1FU1NBR0UKKworICAgc2VuZGVyICAgICAgICAgICAgICAgICAgICAgIHJlY2VpdmVyICAgICAgICA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IgdG8gbm90Y2ggc2luZ2xlIENBTiBJRHMgb3IKKyAgQ0FOIElEIHJhbmdlcyBmcm9tIHRoZSBpbmNvbWluZyB0cmFmZmljLgorCisgIDQuMS43IFJBVyBzb2NrZXQgcmV0dXJuZWQgbWVzc2FnZSBmbGFncwogCiAgIFdoZW4gdXNpbmcgcmVjdm1zZygpIGNhbGwsIHRoZSBtc2ctPm1zZ19mbGFncyBtYXkgY29udGFpbiBmb2xsb3dpbmcgZmxhZ3M6CiAKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9maWx0ZXIudHh0IGIvRG9jdW1lbnRhdGlvbi9uZXR3b3JraW5nL2ZpbHRlci50eHQKaW5kZXggOTkzMGVjZmIuLjEzNTU4MWYgMTAwNjQ0Ci0tLSBhL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9maWx0ZXIudHh0CisrKyBiL0RvY3VtZW50YXRpb24vbmV0d29ya2luZy9maWx0ZXIudHh0CkBAIC0yODAsNyArMjgwLDggQEAKICAgcnhoYXNoICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2ItPmhhc2gKICAgY3B1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYXdfc21wX3Byb2Nlc3Nvcl9pZCgpCiAgIHZsYW5fdGNpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiX3ZsYW5fdGFnX2dldChza2IpCi0gIHZsYW5fcHIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiX3ZsYW5fdGFnX3ByZXNlbnQoc2tiKQorICB2bGFuX2F2YWlsICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNrYl92bGFuX3RhZ19wcmVzZW50KHNrYikKKyAgdmxhbl90cGlkICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2ItPnZsYW5fcHJvdG8KICAgcmFuZCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmFuZG9tX3UzMigpCiAKIFRoZXNlIG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NTYsIHdlIGhhdmUgdGhlIHNpdHVhdGlvbiBpbiBGaWd1cmUgMS4wLCB3aGVyZQorICBzZWdtZW50cyBbdG90YWxfVkZzLCAyNTVdIG9mIHRoZSBNNjQgd2luZG93IG1heSBtYXAgdG8gc29tZSBNTUlPIHJhbmdlIG9uCisgIG90aGVyIGRldmljZXM6CisKKyAgICAgMCAgICAgIDEgICAgICAgICAgICAgICAgICAgICB0b3RhbF9WRnMgLSAxCisgICAgICstLS0tLS0rLS0tLS0tKy0gICAgIC0rLS0tLS0tKy0tLS0tLSsKKyAgICAgfCAgICAgIHwgICAgICB8ICAuLi4gIHwgICAgICB8ICAgICAgfAorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIFZGKG4pIEJBUiBzcGFjZQorCisgICAgIDAgICAgICAxICAgICAgICAgICAgICAgICAgICAgdG90YWxfVkZzIC0gMSAgICAgICAgICAgICAgICAyNTUKKyAgICAgKy0tLS0tLSstLS0tLS0rLSAgICAgLSstLS0tLS0rLS0tLS0tKy0gICAgICAtKy0tLS0tLSstLS0tLS0rCisgICAgIHwgICAgICB8ICAgICAgfCAgLi4uICB8ICAgICAgfCAgICAgIHwgICAuLi4gIHwgICAgICB8ICAgICAgfAorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rLSAgICAgIC0rLS0tLS0tKy0tLS0tLSsKKworICAgICAgICAgICAgICAgICAgICAgICAgICAgTTY0IHdpbmRvdworCisJCUZpZ3VyZSAxLjAgRGlyZWN0IG1hcCBWRihuKSBCQVIgc3BhY2UKKworICBPdXIgY3VycmVudCBzb2x1dGlvbiBpcyB0byBhbGxvY2F0ZSAyNTYgc2VnbWVudHMgZXZlbiBpZiB0aGUgVkYobikgQkFSCisgIHNwYWNlIGRvZXNuJ3QgbmVlZCB0aGF0IG11Y2gsIGFzIHNob3duIGluIEZpZ3VyZSAxLjE6CisKKyAgICAgMCAgICAgIDEgICAgICAgICAgICAgICAgICAgICB0b3RhbF9WRnMgLSAxICAgICAgICAgICAgICAgIDI1NQorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rLSAgICAgIC0rLS0tLS0tKy0tLS0tLSsKKyAgICAgfCAgICAgIHwgICAgICB8ICAuLi4gIHwgICAgICB8ICAgICAgfCAgIC4uLiAgfCAgICAgIHwgICAgICB8CisgICAgICstLS0tLS0rLS0tLS0tKy0gICAgIC0rLS0tLS0tKy0tLS0tLSstICAgICAgLSstLS0tLS0rLS0tLS0tKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICBWRihuKSBCQVIgc3BhY2UgKyBleHRyYQorCisgICAgIDAgICAgICAxICAgICAgICAgICAgICAgICAgICAgdG90YWxfVkZzIC0gMSAgICAgICAgICAgICAgICAyNTUKKyAgICAgKy0tLS0tLSstLS0tLS0rLSAgICAgLSstLS0tLS0rLS0tLS0tKy0gICAgICAtKy0tLS0tLSstLS0tLS0rCisgICAgIHwgICAgICB8ICAgICAgfCAgLi4uICB8ICAgICAgfCAgICAgIHwgICAuLi4gIHwgICAgICB8ICAgICAgfAorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rLSAgICAgIC0rLS0tLS0tKy0tLS0tLSsKKworCQkJICAgTTY0IHdpbmRvdworCisJCUZpZ3VyZSAxLjEgTWFwIFZGKG4pIEJBUiBzcGFjZSArIGV4dHJhCisKKyAgQWxsb2NhdGluZyB0aGUgZXh0cmEgc3BhY2UgZW5zdXJlcyB0aGF0IHRoZSBlbnRpcmUgTTY0IHdpbmRvdyB3aWxsIGJlCisgIGFzc2lnbmVkIHRvIHRoaXMgb25lIFNSLUlPViBkZXZpY2UgYW5kIG5vbmUgb2YgdGhlIHNwYWNlIHdpbGwgYmUKKyAgYXZhaWxhYmxlIGZvciBvdGhlciBkZXZpY2VzLiAgTm90ZSB0aGF0IHRoaXMgb25seSB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d2FyZHMpLAorQ0xPQ0tfTU9OT1RPTklDIChOVFAgY29ycmVjdGlvbnMgYnV0IG5ldmVyIGdvaW5nIGJhY2t3YXJkcyksCitDTE9DS19NT05PVElDX1JBVyAod2l0aG91dCBOVFAgY29ycmVjdGlvbnMpIGFuZCBjaGFuZ2UgdGhlIG1vZGUKK2R5bmFtaWNhbGx5IHdpdGggc3dfcGFyYW1zCisKKworVGhlIEFMU0EgQVBJIGFsc28gcHJvdmlkZSBhbiBhdWRpb190c3RhbXAgd2hpY2ggcmVmbGVjdHMgdGhlIHBhc3NhZ2UKK29mIHRpbWUgYXMgbWVhc3VyZWQgYnkgZGlmZmVyZW50IGNvbXBvbmVudHMgb2YgYXVkaW8gaGFyZHdhcmUuICBJbgorYXNjaWktYXJ0LCB0aGlzIGNvdWxkIGJlIHJlcHJlc2VudGVkIGFzIGZvbGxvd3MgKGZvciB0aGUgcGxheWJhY2sKK2Nhc2UpOgorCisKKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tPiB0aW1lCisgIF4gICAgICAgICAgICAgICBeICAgICAgICAgICAgICBeICAgICAgICAgICAgICAgIF4gICAgICAgICAgIF4KKyAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgfAorIGFuYWxvZyAgICAgICAgIGxpbmsgICAgICAgICAgICBkbWEgICAgICAgICAgICAgIGFwcCAgICAgICBGdWxsQnVmZmVyCisgdGltZSAgICAgICAgICAgdGltZSAgICAgICAgICAgdGltZSAgICAgICAgICAgICAgdGltZSAgICAgICAgdGltZQorICB8ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICB8ICAgICAgICAgICB8CisgIHw8IGNvZGVjIGRlbGF5ID58PC0taHcgZGVsYXktLT58PHF1ZXVlZCBzYW1wbGVzPnw8LS0tYXZhaWwtPnwK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2T5YmN5pivIDB4ODAwMDDvvInjgILns7vnu58gUkFNCi3nmoTotbflp4vlnLDlnYDlv4XpobvmmK/ku6UgMk1CIOWvuem9kOeahOOAggorLSDlvZPpgJrov4cgRUZJIOWQr+WKqOaXtu+8jCDmnIDliJ0gY29kZTAvY29kZTEg6KKr6Lez6L+H44CCCisgIHJlczUg5piv5YiwIFBFIOaWh+S7tuWktOeahOWBj+enu++8jOiAjCBQRSDmlofku7blpLTlkKvmnIkgRUZJIOeahOWQr+WKqOWFpeWPo+eCuSDvvIhlZmlfc3R1Yl9lbnRyee+8ieOAggorICDlvZMgc3R1YiDku6PnoIHlrozmiJDkuoblroPnmoTkvb/lkb3vvIzlroPkvJrot7PovazliLAgY29kZTAg57un57ut5q2j5bi455qE5ZCv5Yqo5rWB56iL44CCCisKKy0gdjMuMTcg5LmL5YmN77yM5pyq5piO56Gu5oyH5a6aIHRleHRfb2Zmc2V0IOeahOWtl+iKguW6j+OAguatpOaXtu+8jGltYWdlX3NpemUg5Li66Zu277yMCisgIOS4lCB0ZXh0X29mZnNldCDkvp3nhaflhoXmoLjlrZfoioLluo/kuLogMHg4MDAwMOOAggorICDlvZMgaW1hZ2Vfc2l6ZSDpnZ7pm7bvvIx0ZXh0X29mZnNldCDkuLrlsI/nq6/mqKHlvI/kuJTmmK/mnInmlYjlgLzvvIzlupTooqvlvJXlr7zliqDovb3nqIvluo/kvb/nlKjjgIIKKyAg5b2TIGltYWdlX3NpemUg5Li66Zu277yMdGV4dF9vZmZzZXQg5Y+v5YGH5a6a5Li6IDB4ODAwMDDjgIIKKworLSBmbGFncyDln58gKHYzLjE3IOW8leWFpSkg5Li6IDY0IOS9jeWwj+err+aooeW8j++8jOWFtue8lueggeWmguS4i++8mgorICDkvY0gMDogCeWGheaguOWtl+iKguW6j+OAgiAxIOihqOekuuWkp+err+aooeW8j++8jDAg6KGo56S65bCP56uv5qih5byP44CCCisgIOS9jSAxLTYzOgnkv53nlZnjgIIKKworLSDlvZMgaW1hZ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aCisKKyogVW5kZWbvvIjmnKrlrprkuYnvvIkKKyAg5YC877yaIDAKKyAg5Lqn55Sf5pyq5a6a5LmJ5oyH5Luk57uI5q2i5byC5bi444CC5a6D5piv6YKj5Lqb5p6E5p625Lit5bey5bqf5byD55qE5oyH5Luk77yM5aaCIFNXUO+8jOeahOm7mOiupOWkhOeQhuaWueW8j+OAggorCisqIEVtdWxhdGXvvIjmqKHmi5/vvIkKKyAg5YC877yaIDEKKyAg5L2/55So6L2v5Lu25qih5ouf5pa55byP44CC5Li66Kej5Yaz6L2v5Lu26L+B56e76Zeu6aKY77yM6L+Z56eN5qih5ouf5oyH5Luk5qih5byP55qE5L2/55So5piv6KKr6Lef6Liq55qE77yM5bm25Lya5Y+R5Ye66YCf546H6ZmQ5Yi26K2m5ZGK44CCCisgIOWug+aYr+mCo+S6m+aehOaetuS4reato+WcqOiiq+a3mOaxsOeahOaMh+S7pO+8jOWmgiBDUDE1IGJhcnJpZXJz77yI6ZqU56a75oyH5Luk77yJ77yM55qE6buY6K6k5aSE55CG5pa55byP44CCCisKKyogSGFyZHdhcmUgRXhlY3V0aW9u77yI56Gs5Lu25omn6KGM77yJCisgIOWAvO+8miAyCisgIOiZveeEtuagh+iusOS4uuato+WcqOiiq+a3mOaxsO+8jOS9huS4gOS6m+WunueOsOWPr+iDveaPkOS+m+ehrOS7tuaJp+ihjOi/meS6m+aMh+S7pOeahOS9v+iDvS/npoHnlKjmk43kvZzjgIIKKyAg5L2/55So56Gs5Lu25omn6KGM5LiA6Iis5Lya5pyJ5pu05aW955qE5oCn6IO977yM5L2G5bCG5peg5rOV5pS26ZuG6L+Q6KGM5pe25a+55q2j6KKr5reY5rGw5oyH5Luk55qE5L2/55So57uf6K6h5pWw5o2u44CCCisKK+m7mOiupOaJp+ihjOaooeW8j+S+nei1luS6juaMh+S7pOWcqOaehOaetuS4reeKtuaAgeOAguato+WcqOiiq+a3mOaxsOeahOaMh+S7pOW6lOivpeS7peaooeaLn++8iEVtdWxhdGXvvInkvZzkuLrpu5jorqTmqKHlvI/vvIwKK+iAjOW3suW6n+W8g+eahOaMh+S7pOW/hemhu+m7mOiupOS9v+eUqOacquWumuS5ie+8iFVuZGVm77yJ5qih5byPCisKK+azqOaEj++8muaMh+S7pOaooeaLn+WPr+iDveaXoOazleW6lOWvueaJgOacieaDheWGteOAguabtOWkmuivpuaDheivt+WPguiAg+WNleeLrOeahOaMh+S7pOazqOmHiuOAggorCivlj5fmlK/mjIHnmoTpgZfnlZnmjIfku6QKKy0tLS0tLS0tLS0tLS0KKyogU1dQe0J9CivoioLngrk6IC9wcm9jL3N5cy9hYmkvc3dwCivnirbmgIE6IOW3suW6n+W8gwor6buY6K6k5omn6KGM5pa55byPOiBVbmRlZiAoMCkKKworKiBDUDE1IEJhcnJpZXJzCivoioLngrk6IC9wcm9jL3N5cy9hYmkvY3AxNV9iYXJyaWVyCivnirbmgIE6IOato+iiq+a3mOaxsO+8jOS4jeaOqOiNkOS9v+eUqAor6buY6K6k5omn6KGM5pa55byPOiBFbXVsYXRlICgxKQorCisqIFNFVEVORAor6IqC54K5OiAvcHJvYy9zeXMvYWJpL3NldGVuZAor54q25oCBOiDmraPooqvmt5jmsbDvvIzkuI3mjqjojZDkvb/nlKgKK+m7mOiupOaJp+ihjOaWueW8jzogRW11bGF0ZSAoMSkqCivms6jvvJrkuLrkuobkvb/og73ov5nkuKrnibnmgKfvvIzns7vnu5/kuK3nmoTmiYDmnIkgQ1BVIOW/hemhu+WcqCBFTDAg5pSv5oyB5re35ZCI5a2X6IqC5bqP44CCCivlpoLmnpzkuIDkuKrmlrDnmoQgQ1BVIO+8iOS4jeaUr+aMgea3t+WQiOWtl+iKguW6j++8iSDlnKjkvb/og73ov5nkuKrnibnmgKflkI7ooqvng63mj5LlhaXns7vnu5/vvIwKK+WcqOW6lOeUqOS4reWPr+iDveS8muWHuueOsOS4jeWPr+mihOacn+eahOe7k+aenOOAggpkaWZmIC0tZ2l0IGEvRG9jdW1lbnRhdGlvbi96aF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0tLS0+IFs0NzozOV0gTDAg57Si5byVCiAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0+IFs2M10gVFRCUjAvMQogCiAKQEAgLTExNSwxMCArMTAxLDExIEBACiAgfCAgICAgICAgICAgICAgICAgfCAgICB8ICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgdgogIHwgICAgICAgICAgICAgICAgIHwgICAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgICBbMTU6MF0gIOmhteWGheWBj+enuwogIHwgICAgICAgICAgICAgICAgIHwgICAgfCAgICAgICAgICAgICAgICstLS0tLS0tLS0tPiBbMjg6MTZdIEwzIOe0ouW8lQotIHwgICAgICAgICAgICAgICAgIHwgICAgKy0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tPiBbNDE6MjldIEwyIOe0ouW8lSAo5LuF5L2/55SoIDM4OjI5ICkKLSB8ICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gWzQ3OjQyXSBMMSDntKLlvJUgKOacquS9v+eUqCkKKyB8ICAgICAgICAgICAgICAgICB8ICAgICstLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gWzQxOjI5XSBMMiDntKLlvJUKKyB8ICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gWzQ3OjQyXSBMMSDntKLlvJUKICArLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gWzYzXSBUVEJSMC8xCiAKKwog5b2T5L2/55SoIEtWTSDml7YsIOeuoeeQhueoi+W6j++8iGh5cGVydmlzb3LvvInlnKggRUwyIOS4remAmui/h+ebuOWvueWGheaguOiZmuaLn+WcsOWdgOeahAog5LiA5Liq5Zu65a6a5YGP56e75p2l5pig5bCE5YaF5qC46aG177yI5YaF5qC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CisgKiBtb3JlIGRldGFpbHMuCisgKgorICovCisKKyNpbmNsdWRlIDxkdC1iaW5kaW5ncy9pbnRlcnJ1cHQtY29udHJvbGxlci9hcm0tZ2ljLmg+CisjaW5jbHVkZSAic2tlbGV0b242NC5kdHNpIgorCisvIHsKKwkvKiBTT0MgY29tcGF0aWJpbGl0eSAqLworCWNvbXBhdGlibGUgPSAiYWwsYWxwaW5lIjsKKworCS8qIENQVSBDb25maWd1cmF0aW9uICovCisJY3B1cyB7CisJCSNhZGRyZXNzLWNlbGxzID0gPDE+OworCQkjc2l6ZS1jZWxscyA9IDwwPjsKKwkJZW5hYmxlLW1ldGhvZCA9ICJhbCxhbHBpbmUtc21wIjsKKworCQljcHVAMCB7CisJCQljb21wYXRpYmxlID0gImFybSxjb3J0ZXgtYTE1IjsKKwkJCWRldmljZV90eXBlID0gImNwdSI7CisJCQlyZWcgPSA8MD47CisJCQljbG9jay1mcmVxdWVuY3kgPSA8MD47IC8qIEZpbGxlZCBieSBsb2FkZXIgKi8KKwkJfTsKKworCQljcHVAMSB7CisJCQljb21wYXRpYmxlID0gImFybSxjb3J0ZXgtYTE1IjsKKwkJCWRldmljZV90eXBlID0gImNwdSI7CisJCQlyZWcgPSA8MT47CisJCQljbG9jay1mcmVxdWVuY3kgPSA8MD47IC8qIEZpbGxlZCBieSBsb2FkZXIgKi8KKwkJfTsKKworCQljcHVAMiB7CisJCQljb21wYXRpYmxlID0gImFybSxjb3J0ZXgtYTE1IjsKKwkJCWRldmljZV90eXBlID0gImNwdSI7CisJCQlyZWcgPSA8Mj47CisJCQljbG9jay1mcmVxdWVuY3kgPSA8MD47IC8qIEZpbGxlZCBieSBsb2FkZXIgKi8KKwkJfTsKKworCQljcHVAMyB7CisJCQljb21wYXRpYmxlID0gImFybSxjb3J0ZXgtYTE1IjsKKwkJCWRldmljZV90eXBlID0gImNwdSI7CisJCQlyZWcgPSA8Mz47CisJCQljbG9jay1mcmVxdWVuY3kgPSA8MD47IC8qIEZpbGxl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dDEgKi8KKwkJCTB4ZjggKFBJTl9JTlBVVCB8IE1VWF9NT0RFMCkgLyogbW1jMF9kYXQyLm1tYzBfZGF0MiAqLworCQkJMHhmYyAoUElOX0lOUFVUIHwgTVVYX01PREUwKSAvKiBtbWMwX2RhdDMubW1jMF9kYXQzICovCisJCQkweDEwMCAoUElOX0lOUFVUIHwgTVVYX01PREUwKSAvKiBtbWMwX2Nsay5tbWMwX2NsayAqLworCQkJMHgxMDQgKFBJTl9JTlBVVCB8IE1VWF9NT0RFMCkgLyogbW1jMF9jbWQubW1jMF9jbWQgKi8KKwkJCTB4MTYwIChQSU5fSU5QVVQgfCBNVVhfTU9ERTcpIC8qIHNwaTBfY3MxLmdwaW8wXzYgKi8KKwkJPjsKKwl9OworCisJbGVkX2dwaW9fcGluczogbGVkX2dwaW9fcGlucyB7CisJCXBpbmN0cmwtc2luZ2xlLHBpbnMgPSA8CisJCQkweDFlNCAoUElOX09VVFBVVCB8IE1VWF9NT0RFNykgLyogZW11MC5ncGlvM183ICovCisJCQkweDFlOCAoUElOX09VVFBVVCB8IE1VWF9NT0RFNykgLyogZW11MS5ncGlvM184ICovCisJCT47CisJfTsKK307CisKKyZsZG80X3JlZyB7CisJcmVndWxhdG9yLW1pbi1taWNyb3ZvbHQgPSA8MzMwMDAwMD47CisJcmVndWxhdG9yLW1heC1taWNyb3ZvbHQgPSA8MzMwMDAwMD47Cit9OworCisvKiBFdGhlcm5ldCAqLworJmNwc3dfZW1hYzAgeworCXBoeV9pZCA9IDwmZGF2aW5jaV9tZGlvPiwgPDA+OworCXBoeS1tb2RlID0gInJtaWkiOworfTsKKworJnBoeV9zZWwgeworCXJtaWktY2xvY2stZXh0OworfTsKKworLyogVVNCICovCismdXNiIHsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismdXNiX2N0cmxfbW9kIHsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismdXNiMV9waHkgeworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZ1c2IxIH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9mZiI7CisJCX07CisJfTsKKworCWdwaW8ta2V5cyB7CisJCWNvbXBhdGlibGUgPSAiZ3Bpby1rZXlzIjsKKworCQlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCQlwaW5jdHJsLTAgPSA8JmJ1dHRvbl9waW5zPjsKKworCQl1cC1idXR0b24geworCQkJbGFiZWwgPSAidXAiOworCQkJbGludXgsY29kZSA9IDxLRVlfVVA+OworCQkJZ3Bpb3MgPSA8JmdwaW80IDE0IEdQSU9fQUNUSVZFX0xPVz47CS8qIEdQSU9fMTEwICovCisJCQlncGlvLWtleSx3YWtldXA7CisJCX07CisKKwkJZG93bi1idXR0b24geworCQkJbGFiZWwgPSAiZG93biI7CisJCQlsaW51eCxjb2RlID0gPEtFWV9ET1dOPjsKKwkJCWdwaW9zID0gPCZncGlvNCA3IEdQSU9fQUNUSVZFX0xPVz47CS8qIEdQSU9fMTAzICovCisJCQlncGlvLWtleSx3YWtldXA7CisJCX07CisKKwkJbGVmdC1idXR0b24geworCQkJbGFiZWwgPSAibGVmdCI7CisJCQlsaW51eCxjb2RlID0gPEtFWV9MRUZUPjsKKwkJCWdwaW9zID0gPCZncGlvNCAwIEdQSU9fQUNUSVZFX0xPVz47CS8qIEdQSU9fOTYgKi8KKwkJCWdwaW8ta2V5LHdha2V1cDsKKwkJfTsKKworCQlyaWdodC1idXR0b24geworCQkJbGFiZWwgPSAicmlnaHQiOworCQkJbGludXgsY29kZSA9IDxLRVlfUklHSFQ+OworCQkJZ3Bpb3MgPSA8JmdwaW80IDIgR1BJT19BQ1RJVkVfTE9XPjsJLyogR1BJT185OCAqLworCQkJZ3Bpby1rZXksd2FrZXVwOworCQl9OworCisJCXBhZ2V1cC1idXR0b24geworCQkJbGFiZWwgPSAiZ2FtZSAxIjsKKwkJCWxpbnV4LGNvZGUgPSA8S0VZX1BBR0VVUD47CisJCQlncGlvcyA9IDwmZ3BpbzQgMTMgR1BJT19BQ1RJVkVfTE9XPjsJLyogR1BJT18xMD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IDwwPjsKKwkJcmVnID0gPDB4MTI+OworCX07CisKKwljYW1lcmFANDEgeworCQljb21wYXRpYmxlID0gIm9raSxtbDg2djc2NjciOworCQlyZWcgPSA8MHg0MT47CisJfTsKKworCWNhbWVyYUA0MyB7CisJCWNvbXBhdGlibGUgPSAib2tpLG1sODZ2NzY2NyI7CisJCXJlZyA9IDwweDQzPjsKKwl9OworCisJcng4NTgxOiBydGNANTEgeworCQljb21wYXRpYmxlID0gImVwc29uLHJ4ODU4MSI7CisJCXJlZyA9IDwweDUxPjsKKwl9OworfTsKKworJm1tY2lmIHsKKwlwaW5jdHJsLTAgPSA8Jm1tY19waW5zPjsKKwlwaW5jdHJsLW5hbWVzID0gImRlZmF1bHQiOworCisJdm1tYy1zdXBwbHkgPSA8JmZpeGVkcmVndWxhdG9yM3YzPjsKKwlidXMtd2lkdGggPSA8OD47CisJYnJva2VuLWNkOworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZpcnFwaW4geworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZ0bXUwIHsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismcGZjIHsKKwlzY2lmMF9waW5zOiBzZXJpYWwwIHsKKwkJcmVuZXNhcyxncm91cHMgPSAic2NpZjBfZGF0YV9hIiwgInNjaWYwX2N0cmwiOworCQlyZW5lc2FzLGZ1bmN0aW9uID0gInNjaWYwIjsKKwl9OworCisJbW1jX3BpbnM6IG1tYyB7CisJCXJlbmVzYXMsZ3JvdXBzID0gIm1tY19kYXRhOCIsICJtbWNfY3RybCI7CisJCXJlbmVzYXMsZnVuY3Rpb24gPSAibW1jIjsKKwl9OworCisJc2RoaTBfcGluczogc2QwIHsKKwkJcmVuZXNhcyxncm91cHMgPSAic2RoaTBfZGF0YTQiLCAic2RoaTBfY3RybCIsCisJCQkJICAic2RoaTBfY2QiOworCQlyZW5lc2FzLGZ1bmN0aW9uID0gInNkaGkwIjsKKwl9OworCisJaHNwaTBfcGluczogaHNwaTAgeworCQlyZ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zID0gImRlZmF1bHQiOworCQlwaW5jdHJsLTAgPSA8JmNvbXBfaW50PjsKKwl9OworCisJbDNnNDIwMGQ6IGwzZzQyMDBkQDY4IHsKKwkJY29tcGF0aWJsZSA9ICJzdCxsM2c0MjAwZC1neXJvIjsKKwkJc3QsZHJkeS1pbnQtcGluID0gPDI+OworCQlyZWcgPSA8MHg2Yj47CisJfTsKKworCW1tYTg0NTI6IG1tYTg0NTJAMWQgeworCQljb21wYXRpYmxlID0gImZzbCxtbWE4NDUyIjsKKwkJcmVnID0gPDB4MWQ+OworCQlpbnRlcnJ1cHQtcGFyZW50ID0gPCZncGlvOD47CisJCWludGVycnVwdHMgPSA8MCBJUlFfVFlQRV9FREdFX1JJU0lORz47CisJCXBpbmN0cmwtbmFtZXMgPSAiZGVmYXVsdCI7CisJCXBpbmN0cmwtMCA9IDwmZ3NlbnNvcl9pbnQ+OworCX07Cit9OworCismaTJjMiB7CisJc3RhdHVzID0gIm9rYXkiOworfTsKKworJmkyYzMgeworCXN0YXR1cyA9ICJva2F5IjsKK307CisKKyZpMmM0IHsKKwlzdGF0dXMgPSAib2theSI7Cit9OworCismaTJjNSB7CisJc3RhdHVzID0gIm9rYXkiOworfTsKKworJnBpbmN0cmwgeworCWFrODk2MyB7CisJCWNvbXBfaW50OiBjb21wLWludCB7CisJCQlyb2NrY2hpcCxwaW5zID0gPDggMSBSS19GVU5DX0dQSU8gJnBjZmdfcHVsbF91cD47CisJCX07CisJfTsKKworCWJ1dHRvbnMgeworCQlwd3JidG46IHB3cmJ0biB7CisJCQlyb2NrY2hpcCxwaW5zID0gPDAgNSBSS19GVU5DX0dQSU8gJnBjZmdfcHVsbF91cD47CisJCX07CisJfTsKKworCWlyIHsKKwkJaXJfaW50OiBpci1pbnQgeworCQkJcm9ja2NoaXAscGlucyA9IDwwIDYgUktfRlVOQ19HUElPICZwY2ZnX3B1bGxfdXA+OworCQl9OworCX07CisKKwltbWE4NDUyIHsKKwkJZ3NlbnNvcl9pbnQ6I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X0FDVElWRV9MT1c+OworCQkJbGludXgsY29kZSA9IDxLRVlfQkFDSz47CisJCQlsYWJlbCA9ICJTVzMiOworCQl9OworCisJCXJpZ2h0LWtleSB7CisJCQlncGlvcyA9IDwmcGNmODU3NSA5IEdQSU9fQUNUSVZFX0xPVz47CisJCQlsaW51eCxjb2RlID0gPEtFWV9SSUdIVD47CisJCQlsYWJlbCA9ICJTVzItUiI7CisJCX07CisKKwkJbGVmdC1rZXkgeworCQkJZ3Bpb3MgPSA8JnBjZjg1NzUgMTAgR1BJT19BQ1RJVkVfTE9XPjsKKwkJCWxpbnV4LGNvZGUgPSA8S0VZX0xFRlQ+OworCQkJbGFiZWwgPSAiU1cyLUwiOworCQl9OworCisJCWVudGVyLWtleSB7CisJCQlncGlvcyA9IDwmcGNmODU3NSAxMSBHUElPX0FDVElWRV9MT1c+OworCQkJbGludXgsY29kZSA9IDxLRVlfRU5URVI+OworCQkJbGFiZWwgPSAiU1cyLVAiOworCQl9OworCisJCXVwLWtleSB7CisJCQlncGlvcyA9IDwmcGNmODU3NSAxMiBHUElPX0FDVElWRV9MT1c+OworCQkJbGludXgsY29kZSA9IDxLRVlfVVA+OworCQkJbGFiZWwgPSAiU1cyLVUiOworCQl9OworCisJCWRvd24ta2V5IHsKKwkJCWdwaW9zID0gPCZwY2Y4NTc1IDEzIEdQSU9fQUNUSVZFX0xPVz47CisJCQlsaW51eCxjb2RlID0gPEtFWV9ET1dOPjsKKwkJCWxhYmVsID0gIlNXMi1EIjsKKwkJfTsKKworCQlob21lLWtleSB7CisJCQlncGlvcyA9IDwmcGNmODU3NSAxNCBHUElPX0FDVElWRV9MT1c+OworCQkJbGludXgsY29kZSA9IDxLRVlfSE9NRT47CisJCQlsYWJlbCA9ICJTVzEiOworCQl9OworCX07CisKKwlzb3VuZCB7CisJCWNvbXBhdGlibGUgPSAic2ltcGxlLWF1ZGlvLWNhcmQiOworCQlzaW1wbGUtYXVkaW8tY2FyZCxmb3JtYXQgPSAibGVmdF9q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BDT05GSUdfUzNDMjQxMF9XQVRDSERPRz15CiBDT05GSUdfTUZEX0NST1NfRUM9eQpAQCAtMTE4LDYgKzEzMCw3IEBACiBDT05GSUdfUkVHVUxBVE9SX1M1TTg3Njc9eQogQ09ORklHX1JFR1VMQVRPUl9UUFM2NTA5MD15CiBDT05GSUdfRFJNPXkKK0NPTkZJR19EUk1fRVhZTk9TX0hETUk9eQogQ09ORklHX0RSTV9CUklER0U9eQogQ09ORklHX0RSTV9QVE4zNDYwPXkKIENPTkZJR19EUk1fUFM4NjIyPXkKQEAgLTE3MSwxMCArMTg0LDExIEBACiBDT05GSUdfUlRDX0RSVl9TM0M9eQogQ09ORklHX0RNQURFVklDRVM9eQogQ09ORklHX1BMMzMwX0RNQT15CitDT05GSUdfQ0hST01FX1BMQVRGT1JNUz15CitDT05GSUdfQ1JPU19FQ19DSEFSREVWPXkKIENPTkZJR19DT01NT05fQ0xLX01BWDc3Njg2PXkKIENPTkZJR19DT01NT05fQ0xLX01BWDc3ODAyPXkKIENPTkZJR19DT01NT05fQ0xLX1MyTVBTMTE9eQotQ09ORklHX0VYWU5PU19JT01NVT15CiBDT05GSUdfRVhUQ09OPXkKIENPTkZJR19FWFRDT05fTUFYMTQ1Nzc9eQogQ09ORklHX0VYVENPTl9NQVg3NzY5Mz15CkBAIC0xOTcsNiArMjExLDggQEAKIENPTkZJR19UTVBGU19QT1NJWF9BQ0w9eQogQ09ORklHX0NSQU1GUz15CiBDT05GSUdfUk9NRlNfRlM9eQorQ09ORklHX05GU19GUz15CitDT05GSUdfUk9PVF9ORlM9eQogQ09ORklHX05MU19DT0RFUEFHRV80Mzc9eQogQ09ORklHX05MU19BU0NJST15CiBDT05GSUdfTkxTX0lTTzg4NTlfMT15CmRpZmYgLS1naXQgYS9hcmNoL2FybS9jb25maWdzL2lteF92NF92NV9kZWZjb25maWcgYi9hcmNoL2FybS9jb25maWdzL2lteF92NF92NV9kZWZjb25maWcKaW5kZXggZTZiMDAwNy4uZDNhODAxO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jsb2NrICprZXlfZW5jLCAqa2V5X2RlYzsKKwlpbnQgaSwgajsKKworCWlmIChrZXlfbGVuICE9IEFFU19LRVlTSVpFXzEyOCAmJgorCSAgICBrZXlfbGVuICE9IEFFU19LRVlTSVpFXzE5MiAmJgorCSAgICBrZXlfbGVuICE9IEFFU19LRVlTSVpFXzI1NikKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwltZW1jcHkoY3R4LT5rZXlfZW5jLCBpbl9rZXksIGtleV9sZW4pOworCWN0eC0+a2V5X2xlbmd0aCA9IGtleV9sZW47CisKKwlrZXJuZWxfbmVvbl9iZWdpbigpOworCWZvciAoaSA9IDA7IGkgPCBzaXplb2YocmNvbik7IGkrKykgeworCQl1MzIgKnJraSA9IGN0eC0+a2V5X2VuYyArIChpICoga3dvcmRzKTsKKwkJdTMyICpya28gPSBya2kgKyBrd29yZHM7CisKKwkJcmtvWzBdID0gcm9yMzIoY2VfYWVzX3N1Yihya2lba3dvcmRzIC0gMV0pLCA4KTsKKwkJcmtvWzBdID0gcmtvWzBdIF4gcmtpWzBdIF4gcmNvbltpXTsKKwkJcmtvWzFdID0gcmtvWzBdIF4gcmtpWzFdOworCQlya29bMl0gPSBya29bMV0gXiBya2lbMl07CisJCXJrb1szXSA9IHJrb1syXSBeIHJraVszXTsKKworCQlpZiAoa2V5X2xlbiA9PSBBRVNfS0VZU0laRV8xOTIpIHsKKwkJCWlmIChpID49IDcpCisJCQkJYnJlYWs7CisJCQlya29bNF0gPSBya29bM10gXiBya2lbNF07CisJCQlya29bNV0gPSBya29bNF0gXiBya2lbNV07CisJCX0gZWxzZSBpZiAoa2V5X2xlbiA9PSBBRVNfS0VZU0laRV8yNTYpIHsKKwkJCWlmIChpID49IDYpCisJCQkJYnJlYWs7CisJCQlya29bNF0gPSBjZV9hZXNfc3ViKHJrb1szXSkgXiBya2lbNF07CisJCQlya29bNV0gPSBya29bNF0gXiBya2lbNV07CisJCQlya29bNl0gPSBya29bNV0gXiBya2lbNl07CisJC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EscjExLHJvciM1CisJYWRkCXI3LHI3LHIzCisJYW5kCXIyLHIyLHIxMQorCWVvcglyMyxyMCxyMTEscm9yIzE5CisJZW9yCXIwLHI3LHI3LHJvciMxMQorCWVvcglyMixyMixyNQorCWFkZAlyNixyNixyMyxyb3IjNgorCWVvcglyMyxyNyxyOAorCWVvcglyMCxyMCxyNyxyb3IjMjAKKwlhZGQJcjYscjYscjIKKwlsZHIJcjIsW3NwLCM1Nl0KKwlhbmQJcjEyLHIxMixyMworCWFkZAlyMTAscjEwLHI2CisJYWRkCXI2LHI2LHIwLHJvciMyCisJZW9yCXIxMixyMTIscjgKKwlhZGQJcjUscjUscjIKKwllb3IJcjIscjExLHI0CisJZW9yCXIwLHIxMCxyMTAscm9yIzUKKwlhZGQJcjYscjYscjEyCisJYW5kCXIyLHIyLHIxMAorCWVvcglyMTIscjAscjEwLHJvciMxOQorCWVvcglyMCxyNixyNixyb3IjMTEKKwllb3IJcjIscjIscjQKKwlhZGQJcjUscjUscjEyLHJvciM2CisJZW9yCXIxMixyNixyNworCWVvcglyMCxyMCxyNixyb3IjMjAKKwlhZGQJcjUscjUscjIKKwlsZHIJcjIsW3NwLCM2MF0KKwlhbmQJcjMscjMscjEyCisJYWRkCXI5LHI5LHI1CisJYWRkCXI1LHI1LHIwLHJvciMyCisJZW9yCXIzLHIzLHI3CisJYWRkCXI0LHI0LHIyCisJZW9yCXIyLHIxMCxyMTEKKwllb3IJcjAscjkscjkscm9yIzUKKwlhZGQJcjUscjUscjMKKwlhbmQJcjIscjIscjkKKwllb3IJcjMscjAscjkscm9yIzE5CisJZW9yCXIwLHI1LHI1LHJvciMxMQorCWVvcglyMixyMixyMTEKKwlhZGQJcjQscjQscjMscm9yIzYKKwllb3IJcjMscjUscjYKKwllb3IJcjAscjAscjUscm9yIzIwCisJYWRkCXI0LHI0LHIyCisJbGRyCXIyLFtzcCwjNjRdCisJYW5kCXIxMixyMTIscjMKKwlhZGQJcjgscjgscjQKKwlhZGQJcjQscjQ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Y19pcnFzX3BhcmVudChkb21haW4sIGlycSwgbnJfaXJxcywgJnBhcmVudF9hcmdzKTsKK30KKworc3RhdGljIHN0cnVjdCBpcnFfZG9tYWluX29wcyBpbXhfZ3BjX2RvbWFpbl9vcHMgPSB7CisJLnhsYXRlCT0gaW14X2dwY19kb21haW5feGxhdGUsCisJLmFsbG9jCT0gaW14X2dwY19kb21haW5fYWxsb2MsCisJLmZyZWUJPSBpcnFfZG9tYWluX2ZyZWVfaXJxc19jb21tb24sCit9OworCitzdGF0aWMgaW50IF9faW5pdCBpbXhfZ3BjX2luaXQoc3RydWN0IGRldmljZV9ub2RlICpub2RlLAorCQkJICAgICAgIHN0cnVjdCBkZXZpY2Vfbm9kZSAqcGFyZW50KQoreworCXN0cnVjdCBpcnFfZG9tYWluICpwYXJlbnRfZG9tYWluLCAqZG9tYWluOworCWludCBpOworCisJaWYgKCFwYXJlbnQpIHsKKwkJcHJfZXJyKCIlczogbm8gcGFyZW50LCBnaXZpbmcgdXBcbiIsIG5vZGUtPmZ1bGxfbmFtZSk7CisJCXJldHVybiAtRU5PREVWOworCX0KKworCXBhcmVudF9kb21haW4gPSBpcnFfZmluZF9ob3N0KHBhcmVudCk7CisJaWYgKCFwYXJlbnRfZG9tYWluKSB7CisJCXByX2VycigiJXM6IHVuYWJsZSB0byBvYnRhaW4gcGFyZW50IGRvbWFpblxuIiwgbm9kZS0+ZnVsbF9uYW1lKTsKKwkJcmV0dXJuIC1FTlhJTzsKKwl9CisKKwlncGNfYmFzZSA9IG9mX2lvbWFwKG5vZGUsIDApOworCWlmIChXQVJOX09OKCFncGNfYmFzZSkpCisJICAgICAgICByZXR1cm4gLUVOT01FTTsKKworCWRvbWFpbiA9IGlycV9kb21haW5fYWRkX2hpZXJhcmNoeShwYXJlbnRfZG9tYWluLCAwLCBHUENfTUFYX0lSUVMsCisJCQkJCSAgbm9kZSwgJmlteF9ncGNfZG9tYWluX29wcywKKwkJCQkJICBOVUxMKTsKKwlpZiAoIWRvbWF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DAwKQotI2RlZmluZQlQT1JUX0VOQiAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDA0KQotI2RlZmluZQlTVEFSVCAgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDA4KQotI2RlZmluZQlQT1JUICAgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDBDKQotI2RlZmluZQlDTU4gICAgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDEwKQotI2RlZmluZQlHQU1NQSAgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDE0KQotI2RlZmluZQlJTlRGTEcgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDE4KQotI2RlZmluZQlJTlRNU0sgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDFDKQotI2RlZmluZQlNUExGQlVGICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDIwKQotI2RlZmluZQlIREVfTEVGVCAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDI0KQotI2RlZmluZQlWREVfVE9QICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDI4KQotI2RlZmluZQlQWEwgICAgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDMwKQotI2RlZmluZQlIQ1lDTEUgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDM0KQotI2RlZmluZQlIU1cgICAgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDM4KQotI2RlZmluZQlIREVfU1RBUlQgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDNDKQotI2RlZmluZQlIREVfU0laRSAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDQwKQotI2RlZmluZQlWQ1lDTEUgICAgICAoTENEX0NPTlRST0xfQkxPQ0tfQkFTRXwweDQ0KQotI2RlZmluZQlWU1cgICAgICAgICAoTENEX0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VRfR1BJT19TVEFSVCArIDB4MjApCi0jZGVmaW5lIFRST1VUX0dQSU9fTUlTQzFfQkFTRSAgICAgICAgICAgICAgIChUUk9VVF9HUElPX1NUQVJUICsgMHgyOCkKLSNkZWZpbmUgVFJPVVRfR1BJT19WSVJUVUFMX0JBU0UgICAgICAgICAgICAgKFRST1VUX0dQSU9fU1RBUlQgKyAweDMwKQotI2RlZmluZSBUUk9VVF9HUElPX0lOVDVfQkFTRSAgICAgICAgICAgICAgICAoVFJPVVRfR1BJT19TVEFSVCArIDB4NDgpCi0KLSNkZWZpbmUgVFJPVVRfR1BJT19DSEFSR0VSX0VOICAgICAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzJfQkFTRSArIDApCi0jZGVmaW5lIFRST1VUX0dQSU9fSVNFVCAgICAgICAgICAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0MyX0JBU0UgKyAxKQotI2RlZmluZSBUUk9VVF9HUElPX0gyV19EQVRfRElSICAgICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDMl9CQVNFICsgMikKLSNkZWZpbmUgVFJPVVRfR1BJT19IMldfQ0xLX0RJUiAgICAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzJfQkFTRSArIDMpCi0jZGVmaW5lIFRST1VUX0dQSU9fSDJXX0RBVF9HUE8gICAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0MyX0JBU0UgKyA0KQotI2RlZmluZSBUUk9VVF9HUElPX0gyV19DTEtfR1BPICAgICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDMl9CQVNFICsgNSkKLSNkZWZpbmUgVFJPVVRfR1BJT19IMldfU0VMMCAgICAgICAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzJfQkFTRSArIDYpCi0jZGVmaW5lIFRST1VUX0dQSU9fSDJXX1NFTDEgICAgICAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0MyX0JBU0UgKyA3KQotCi0jZGVmaW5lIFRST1VUX0dQSU9fU1BPVExJR0hUX0VOICAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0MzX0JBU0UgKyAwKQotI2RlZmluZSBUUk9VVF9HUElPX0ZMQVNIX0VOICAgICAgICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDM19CQVNFICsgMSkKLSNkZWZpbmUgVFJPVVRfR1BJT19JMkNfUFVMTCAgICAgICAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzNfQkFTRSArIDIpCi0jZGVmaW5lIFRST1VUX0dQSU9fVFBfSTJDX1BVTEwgICAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0MzX0JBU0UgKyAzKQotI2RlZmluZSBUUk9VVF9HUElPX1RQX0VOICAgICAgICAgICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDM19CQVNFICsgNCkKLSNkZWZpbmUgVFJPVVRfR1BJT19KT0dfRU4gICAgICAgICAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzNfQkFTRSArIDUpCi0jZGVmaW5lIFRST1VUX0dQSU9fVUlfTEVEX0VOICAgICAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0MzX0JBU0UgKyA2KQotI2RlZmluZSBUUk9VVF9HUElPX1FUS0VZX0xFRF9FTiAgICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDM19CQVNFICsgNykKLQotI2RlZmluZSBUUk9VVF9HUElPX1ZDTV9QV0ROICAgICAgICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDNF9CQVNFICsgMCkKLSNkZWZpbmUgVFJPVVRfR1BJT19VU0JfSDJXX1NXICAgICAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzRfQkFTRSArIDEpCi0jZGVmaW5lIFRST1VUX0dQSU9fQ09NUEFTU19SU1RfTiAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0M0X0JBU0UgKyAyKQotI2RlZmluZSBUUk9VVF9HUElPX0hBUFRJQ19FTl9VUCAgICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDNF9CQVNFICsgMykKLSNkZWZpbmUgVFJPVVRfR1BJT19IQVBUSUNfRU5fTUFJTiAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzRfQkFTRSArIDQpCi0jZGVmaW5lIFRST1VUX0dQSU9fVVNCX1BIWV9SU1RfTiAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0M0X0JBU0UgKyA1KQotI2RlZmluZSBUUk9VVF9HUElPX1dJRklfUEFfUkVTRVRYICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDNF9CQVNFICsgNikKLSNkZWZpbmUgVFJPVVRfR1BJT19XSUZJX0VOICAgICAgICAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzRfQkFTRSArIDcpCi0KLSNkZWZpbmUgVFJPVVRfR1BJT19CVF8zMktfRU4gICAgICAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzVfQkFTRSArIDApCi0jZGVmaW5lIFRST1VUX0dQSU9fTUFDXzMyS19FTiAgICAgICAgICAgICAgIChUUk9VVF9HUElPX01JU0M1X0JBU0UgKyAxKQotI2RlZmluZSBUUk9VVF9HUElPX01ERElfMzJLX0VOICAgICAgICAgICAgICAoVFJPVVRfR1BJT19NSVNDNV9CQVNFICsgMikKLSNkZWZpbmUgVFJPVVRfR1BJT19DT01QQVNTXzMyS19FTiAgICAgICAgICAgKFRST1VUX0dQSU9fTUlTQzVfQkFTRSArIDMpCi0KLSNkZWZpbmUgVFJPVVRfR1BJT19OQVZJX0FDVF9OICAgICAgICAgICAgICAgKFRST1VUX0dQSU9fSU5UMl9CQVNFICsgMCkKLSNkZWZpbmUgVFJPVVRfR1BJT19DT01QQVNTX0lSUSAgICAgICAgICAgICAgKFRST1VUX0dQSU9fSU5UMl9CQVNFICsgMSkKLSNkZWZpbmUgVFJPVVRfR1BJT19TTElESU5HX0RFVCAgICAgICAgICAgICAgKFRST1VUX0dQSU9fSU5UMl9CQVNFICsgMikKLSNkZWZpbmUgVFJPVVRfR1BJT19BVURfSFNNSUNfREVUX04gICAgICAgIC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2RlZmluZSBJTlRfVUFSVDIgICAgICAgICAgICAxMAotI2RlZmluZSBJTlRfVUFSVDMgICAgICAgICAgICAxMQotI2RlZmluZSBJTlRfVUFSVDFfUlggICAgICAgICAxMgotI2RlZmluZSBJTlRfVUFSVDJfUlggICAgICAgICAxMwotI2RlZmluZSBJTlRfVUFSVDNfUlggICAgICAgICAxNAotI2RlZmluZSBJTlRfVVNCX09URyAgICAgICAgICAxNQotI2RlZmluZSBJTlRfTURESV9QUkkgICAgICAgICAxNgotI2RlZmluZSBJTlRfTURESV9FWFQgICAgICAgICAxNwotI2RlZmluZSBJTlRfTURESV9DTElFTlQgICAgICAxOAotI2RlZmluZSBJTlRfTURQICAgICAgICAgICAgICAxOQotI2RlZmluZSBJTlRfR1JBUEhJQ1MgICAgICAgICAyMAotI2RlZmluZSBJTlRfQURNX0FBUk0gICAgICAgICAyMQotI2RlZmluZSBJTlRfQURTUF9BMTEgICAgICAgICAyMgotI2RlZmluZSBJTlRfQURTUF9BOV9BMTEgICAgICAyMwotI2RlZmluZSBJTlRfU0RDMV8wICAgICAgICAgICAyNAotI2RlZmluZSBJTlRfU0RDMV8xICAgICAgICAgICAyNQotI2RlZmluZSBJTlRfU0RDMl8wICAgICAgICAgICAyNgotI2RlZmluZSBJTlRfU0RDMl8xICAgICAgICAgICAyNwotI2RlZmluZSBJTlRfS0VZU0VOU0UgICAgICAgICAyOAotI2RlZmluZSBJTlRfVENIU0NSTl9TU0JJICAgICAyOQotI2RlZmluZSBJTlRfVENIU0NSTjEgICAgICAgICAzMAotI2RlZmluZSBJTlRfVENIU0NSTjIgICAgICAgICAzMQotCi0jZGVmaW5lIElOVF9HUElPX0dST1VQMSAgICAgICgzMiArIDApCi0jZGVmaW5lIElOVF9HUElPX0dST1VQMiAgICAgICgzMiArIDEpCi0jZGVmaW5lIElOVF9QV0JfSTJDICAgICAgICAgICgzMiArIDIpCi0jZGVmaW5lIElOVF9TT0ZUUkVTRVQgICAgICAgICgzMiArIDMpCi0jZ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ICAweEE5QTAwMDAwCi0jZGVmaW5lIE1TTV9VQVJUMV9TSVpFICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9VQVJUMl9QSFlTICAgICAgICAweEE5QjAwMDAwCi0jZGVmaW5lIE1TTV9VQVJUMl9TSVpFICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9VQVJUM19QSFlTICAgICAgICAweEE5QzAwMDAwCi0jZGVmaW5lIE1TTV9VQVJUM19TSVpFICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9TREMxX1BIWVMgICAgICAgICAweEEwNDAwMDAwCi0jZGVmaW5lIE1TTV9TREMxX1NJWkUgICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9TREMyX1BIWVMgICAgICAgICAweEEwNTAwMDAwCi0jZGVmaW5lIE1TTV9TREMyX1NJWkUgICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9TREMzX1BIWVMgICAgICAgICAweEEwNjAwMDAwCi0jZGVmaW5lIE1TTV9TREMzX1NJWkUgICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9TREM0X1BIWVMgICAgICAgICAweEEwNzAwMDAwCi0jZGVmaW5lIE1TTV9TREM0X1NJWkUgICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9JMkNfUEhZUyAgICAgICAgICAweEE5OTAwMDAwCi0jZGVmaW5lIE1TTV9JMkNfU0laRSAgICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9IU1VTQl9QSFlTICAgICAgICAweEEwODAwMDAwCi0jZGVmaW5lIE1TTV9IU1VTQl9TSVpFICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9QTURIX1BIWVMgICAgICAgICAweEFBNjAwMDAwCi0jZGVmaW5lIE1TTV9QTURIX1NJWkUgICAgICAgICBTWl80SwotCi0jZGVmaW5lIE1TTV9FTURIX1BIWVMgICAgICAgICAweEFBNzAwMDAwCi0jZGVmaW5lIE1TTV9FTURIX1NJWkUgICAgIC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sgMCkKLSNkZWZpbmUgSU5UX1VBUlQyICAgICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMSkKLSNkZWZpbmUgSU5UX1VBUlQzICAgICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMikKLSNkZWZpbmUgSU5UX1VBUlQxX1JYICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMykKLSNkZWZpbmUgSU5UX1VBUlQyX1JYICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgNCkKLSNkZWZpbmUgSU5UX1VBUlQzX1JYICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgNSkKLSNkZWZpbmUgSU5UX1NQSV9JTlBVVCAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgNikKLSNkZWZpbmUgSU5UX1NQSV9PVVRQVVQgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgNykKLSNkZWZpbmUgSU5UX1NQSV9FUlJPUiAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgOCkKLSNkZWZpbmUgSU5UX0dQSU9fR1JPVVAxICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgOSkKLSNkZWZpbmUgSU5UX0dQSU9fR1JPVVAyICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMTApCi0jZGVmaW5lIElOVF9HUElPX0dST1VQMV9TRUNVUkUgICAgICAgIChGSVJTVF9TSVJDX0lSUSArIDExKQotI2RlZmluZSBJTlRfR1BJT19HUk9VUDJfU0VDVVJFICAgICAgICAoRklSU1RfU0lSQ19JUlEgKyAxMikKLSNkZWZpbmUgSU5UX0FWU19TVklDICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMTMpCi0jZGVmaW5lIElOVF9BVlNfUkVRX1VQICAgICAgICAgICAgICAgIChGSVJTVF9TSVJDX0lSUSArIDE0KQotI2RlZmluZSBJTlRfQVZTX1JFUV9ET1dOICAgICAgICAgICAgICAoRklSU1RfU0lSQ19JUlEgKyAxNSkKLSNkZWZpbmUgSU5UX1BCVVNfRVJSICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMTYpCi0jZGVmaW5lIElOVF9BWElfRVJSICAgICAgICAgICAgICAgICAgIChGSVJTVF9TSVJDX0lSUSArIDE3KQotI2RlZmluZSBJTlRfU01JX0VSUiAgICAgICAgICAgICAgICAgICAoRklSU1RfU0lSQ19JUlEgKyAxOCkKLSNkZWZpbmUgSU5UX0VCSTFfRVJSICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMTkpCi0jZGVmaW5lIElOVF9JTUVNX0VSUiAgICAgICAgICAgICAgICAgIChGSVJTVF9TSVJDX0lSUSArIDIwKQotI2RlZmluZSBJTlRfVEVNUF9TRU5TT1IgICAgICAgICAgICAgICAoRklSU1RfU0lSQ19JUlEgKyAyMSkKLSNkZWZpbmUgSU5UX1RWX0VOQyAgICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMjIpCi0jZGVmaW5lIElOVF9HUlAyRCAgICAgICAgICAgICAgICAgICAgIChGSVJTVF9TSVJDX0lSUSArIDIzKQotI2RlZmluZSBJTlRfR1NCSV9RVVAgICAgICAgICAgICAgICAgICAoRklSU1RfU0lSQ19JUlEgKyAyNCkKLSNkZWZpbmUgSU5UX1NDX0FDRyAgICAgICAgICAgICAgICAgICAgKEZJUlNUX1NJUkNfSVJRICsgMjUpCi0jZGVmaW5lIElOVF9XRFQwICAgICAgICAgICAgICAgICAgICAgIChGSVJTVF9TSVJDX0lSUSArIDI2KQotI2RlZmluZSBJTlRfV0RUMSAgICAgICAgICAgICAgICAgICAgICAoRklSU1RfU0lSQ19JUlEgKyAyNykKLQotI2lmIGRlZmluZWQoQ09ORklHX01TTV9TT0NfUkVWX0EpCi0jZGVmaW5lIE5SX1NJUkNfSVJRUy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9OworCisJCWNwdUAxIHsKKwkJCWNvbXBhdGlibGUgPSAiYXJtLGNvcnRleC1hNTMiLCAiYXJtLGFybXY4IjsKKwkJCWRldmljZV90eXBlID0gImNwdSI7CisJCQllbmFibGUtbWV0aG9kID0gInBzY2kiOworCQkJcmVnID0gPDB4MT47CisJCX07CisKKwkJY3B1QDIgeworCQkJY29tcGF0aWJsZSA9ICJhcm0sY29ydGV4LWE1MyIsICJhcm0sYXJtdjgiOworCQkJZGV2aWNlX3R5cGUgPSAiY3B1IjsKKwkJCWVuYWJsZS1tZXRob2QgPSAicHNjaSI7CisJCQlyZWcgPSA8MHgyPjsKKwkJfTsKKworCQljcHVAMyB7CisJCQljb21wYXRpYmxlID0gImFybSxjb3J0ZXgtYTUzIiwgImFybSxhcm12OCI7CisJCQlkZXZpY2VfdHlwZSA9ICJjcHUiOworCQkJZW5hYmxlLW1ldGhvZCA9ICJwc2NpIjsKKwkJCXJlZyA9IDwweDM+OworCQl9OworCX07CisKKwlwbXUgeworCQljb21wYXRpYmxlID0gImFybSxhcm12OC1wbXV2MyI7CisJCWludGVycnVwdHMgPSA8MCAxNDMgND4sCisJCQkgICAgIDwwIDE0NCA0PiwKKwkJCSAgICAgPDAgMTQ1IDQ+LAorCQkJICAgICA8MCAxNDYgND47CisJfTsKKworCXBzY2kgeworCQljb21wYXRpYmxlID0gImFybSxwc2NpLTAuMiI7CisJCW1ldGhvZCA9ICJzbWMiOworCX07CisKKwl0aW1lciB7CisJCWNvbXBhdGlibGUgPSAiYXJtLGFybXY4LXRpbWVyIjsKKwkJaW50ZXJydXB0LXBhcmVudCA9IDwmZ2ljPjsKKwkJaW50ZXJydXB0cyA9IDwxIDEzIDB4ZjAxPiwKKwkJCSAgICAgPDEgMTQgMHhmMDE+LAorCQkJICAgICA8MSAxMSAweGYwMT4sCisJCQkgICAgIDwxIDEwIDB4ZjAxPjsKKwl9OworCisJYW1iYV9hcHUgeworCQljb21wYXRpYmxlID0gInNpbXBsZS1idXMiOworCQ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CAgYnJrZWM7ICAgICAgICAgIC8qIFJ4IGJyZWFrIGNoYXJhY3RlciBjb3VudGVyICovCi0gICAgdW5zaWduZWQgc2hvcnQgIGJya2xuOyAgICAgICAgICAvKiBSZWFjZWl2ZSBicmVhayBsZW5ndGggKi8KKyAgICB1bnNpZ25lZCBzaG9ydCAgYnJrbG47ICAgICAgICAgIC8qIFJlY2VpdmUgYnJlYWsgbGVuZ3RoICovCiAgICAgICAgICAgICAgICAgICAgCiAgICAgdW5zaWduZWQgc2hvcnQgIHVhZGRyMTsgICAgICAgICAvKiBhZGRyZXNzIGNoYXJhY3RlciAxICovCiAgICAgdW5zaWduZWQgc2hvcnQgIHVhZGRyMjsgICAgICAgICAvKiBhZGRyZXNzIGNoYXJhY3RlciAyICovCkBAIC0zMzgsNyArMzM4LDcgQEAKICAgICB1bnNpZ25lZCBsb25nICAgY19wcmVzOyAgICAgICAgIC8qIHByZXNldCBDUkMgKi8KICAgICB1bnNpZ25lZCBsb25nICAgY19tYXNrOyAgICAgICAgIC8qIGNvbnN0YW50IG1hc2sgZm9yIENSQyAqLwogICAgIHVuc2lnbmVkIGxvbmcgICBjcmNlYzsgICAgICAgICAgLyogQ1JDIGVycm9yIGNvdW50ZXIgKi8KLSAgICB1bnNpZ25lZCBsb25nICAgYWxlYzsgICAgICAgICAgIC8qIGFsaWdobm1lbnQgZXJyb3IgY291bnRlciAqLworICAgIHVuc2lnbmVkIGxvbmcgICBhbGVjOyAgICAgICAgICAgLyogYWxpZ25tZW50IGVycm9yIGNvdW50ZXIgKi8KICAgICB1bnNpZ25lZCBsb25nICAgZGlzZmM7ICAgICAgICAgIC8qIGRpc2NhcmQgZnJhbWUgY291bnRlciAqLwogICAgIHVuc2lnbmVkIHNob3J0ICBwYWRzOyAgICAgICAgICAgLyogc2hvcnQgZnJhbWUgUEFEIGNoYXJhY3RlcnMgKi8KICAgICB1bnNpZ25lZCBzaG9ydCAgcmV0X2xpbTsgICAgICAgIC8qIHJldHJ5IGxpbWl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wkJCQkJCSAgICAgImp0YWdfMCIsICJzdmRfMCIsCisJCQkJCQkgICAgICJ2aWNlXzAiOworCQl9OworCisJCXVwZ19pcnEwX2ludGM6IHVwZ19pcnEwX2ludGNANDA2NzgwIHsKKwkJCWNvbXBhdGlibGUgPSAiYnJjbSxiY203MTIwLWwyLWludGMiOworCQkJcmVnID0gPDB4NDA2NzgwIDB4OD47CisKKwkJCWJyY20saW50LW1hcC1tYXNrID0gPDB4NDQ+OworCQkJYnJjbSxpbnQtZndkLW1hc2sgPSA8MHg3MDAwMD47CisKKwkJCWludGVycnVwdC1jb250cm9sbGVyOworCQkJI2ludGVycnVwdC1jZWxscyA9IDwxPjsKKworCQkJaW50ZXJydXB0LXBhcmVudCA9IDwmcGVyaXBoX2ludGM+OworCQkJaW50ZXJydXB0cyA9IDw1NT47CisJCX07CisKKwkJc3VuX3RvcF9jdHJsOiBzeXNjb25ANDA0MDAwIHsKKwkJCWNvbXBhdGlibGUgPSAiYnJjbSxiY203NDI1LXN1bi10b3AtY3RybCIsICJzeXNjb24iOworCQkJcmVnID0gPDB4NDA0MDAwIDB4NTFjPjsKKwkJCWxpdHRsZS1lbmRpYW47CisJCX07CisKKwkJcmVib290IHsKKwkJCWNvbXBhdGlibGUgPSAiYnJjbSxicmNtc3RiLXJlYm9vdCI7CisJCQlzeXNjb24gPSA8JnN1bl90b3BfY3RybCAweDMwNCAweDMwOD47CisJCX07CisKKwkJdWFydDA6IHNlcmlhbEA0MDZiMDAgeworCQkJY29tcGF0aWJsZSA9ICJuczE2NTUwYSI7CisJCQlyZWcgPSA8MHg0MDZiMDAgMHgyMD47CisJCQlyZWctaW8td2lkdGggPSA8MHg0PjsKKwkJCXJlZy1zaGlmdCA9IDwweDI+OworCQkJaW50ZXJydXB0LXBhcmVudCA9IDwmcGVyaXBoX2ludGM+OworCQkJaW50ZXJydXB0cyA9IDw2MT47CisJCQljbG9ja3MgPSA8JnVhcnRfY2xrPjsKKwkJCXN0YXR1cyA9ICJkaXN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HX05MU19DT0RFUEFHRV83Mzc9bQorQ09ORklHX05MU19DT0RFUEFHRV83NzU9bQorQ09ORklHX05MU19DT0RFUEFHRV84NTA9bQorQ09ORklHX05MU19DT0RFUEFHRV84NTI9bQorQ09ORklHX05MU19DT0RFUEFHRV84NTU9bQorQ09ORklHX05MU19DT0RFUEFHRV84NTc9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjA9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjE9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjI9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjM9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjQ9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjU9bQorQ09ORklHX05MU19DT0RFUEFHRV84NjY9bQorQ09ORklHX05MU19DT0RFUEFHRV84Njk9bQorQ09ORklHX05MU19DT0RFUEFHRV85MzY9bQorQ09ORklHX05MU19DT0RFUEFHRV85NTA9bQorQ09ORklHX05MU19DT0RFUEFHRV85MzI9bQorQ09ORklHX05MU19DT0RFUEFHRV85NDk9bQorQ09ORklHX05MU19DT0RFUEFHRV84NzQ9bQorQ09ORklHX05MU19JU084ODU5Xzg9bQorQ09ORklHX05MU19DT0RFUEFHRV8xMjUwPW0KK0NPTkZJR19OTFNfQ09ERVBBR0VfMTI1MT1tCitDT05GSUdfTkxTX0FTQ0lJPW0KK0NPTkZJR19OTFNfSVNPODg1OV8xPW0KK0NPTkZJR19OTFNfSVNPODg1OV8yPW0KK0NPTkZJR19OTFNfSVNPODg1OV8zPW0KK0NPTkZJR19OTFNfSVNPODg1OV80PW0KK0NPTkZJR19OTFNfSVNPODg1OV81PW0KK0NPTkZJR19OTFNfSVNPODg1OV82PW0KK0NPTkZJR19OTFNfSVNPODg1OV83PW0KK0NPTkZJR19OTFNfSVNPODg1OV85PW0KK0NPTkZJR19OTFNfSVNPODg1OV8xMz1tCitDT05GSUdfTkxTX0lTTzg4NTlfMTQ9bQorQ09ORklHX05MU19JU084OD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ml82MzoyOwogCQkvKgogCQkgKiBQb2ludHMgdG8gdGhlIG5leHQgUE9XIGVudHJ5IGluIHRoZSB0YWcgbGlzdCB3aGVuCkBAIC02NDIsNiArNzc2LDEzIEBACiAJCSAqIGxpc3QgZW50ZXJlZCBvbiBTV1RBR19GVUxMKS4KIAkJICovCiAJCXVpbnQ2NF90IHdxcDozNjsKKyNlbHNlCisJICAgICAgICB1aW50NjRfdCB3cXA6MzY7CisJICAgICAgICB1aW50NjRfdCBncnA6NDsKKwkgICAgICAgIHVpbnQ2NF90IGluZGV4OjExOworCSAgICAgICAgdWludDY0X3QgbGlua19pbmRleDoxMTsKKwkgICAgICAgIHVpbnQ2NF90IHJlc2VydmVkXzYyXzYzOjI7CisjZW5kaWYKIAl9IHNfc3N0YXR1czQ7CiAKICAgICAvKioKQEAgLTY0OSw2ICs3OTAsNyBAQAogICAgICAqIGdldF9yZXY9PTEpCiAgICAgICovCiAJc3RydWN0IHsKKyNpZmRlZiBfX0JJR19FTkRJQU5fQklURklFTEQKIAkJdWludDY0X3QgcmVzZXJ2ZWRfNjJfNjM6MjsKIAkJLyoKIAkJICogUG9pbnRzIHRvIHRoZSBwcmlvciBQT1cgZW50cnkgaW4gdGhlIHRhZyBsaXN0IHdoZW4KQEAgLTY2OSwxMiArODExLDIwIEBACiAJCSAqIGxpc3QgZW50ZXJlZCBvbiBTV1RBR19GVUxMKS4KIAkJICovCiAJCXVpbnQ2NF90IHdxcDozNjsKKyNlbHNlCisJICAgICAgICB1aW50NjRfdCB3cXA6MzY7CisJICAgICAgICB1aW50NjRfdCBncnA6NDsKKwkgICAgICAgIHVpbnQ2NF90IGluZGV4OjExOworCSAgICAgICAgdWludDY0X3QgcmV2bGlua19pbmRleDoxMTsKKwkgICAgICAgIHVpbnQ2NF90IHJlc2VydmVkXzYyXzYzOjI7CisjZW5kaWYKIAl9IHNfc3N0YXR1czU7CiAKICAgICAvKioKICAgICAgKiBSZXN1bHQgRm9yIFBPVyBNZW1vcnkgTG9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9XIGVudHJ5LiAqLwogCQl1aW50NjRfdCB3cXA6MzY7CisjZWxzZQorCSAgICAgICAgdWludDY0X3Qgd3FwOjM2OworCSAgICAgICAgdWludDY0X3QgZ3JwOjQ7CisJICAgICAgICB1aW50NjRfdCBuZXh0X2luZGV4OjExOworCSAgICAgICAgdWludDY0X3QgcmVzZXJ2ZWRfNTFfNjM6MTM7CisjZW5kaWYKIAl9IHNfc21lbWxvYWQxOwogCiAgICAgLyoqCiAgICAgICogUmVzdWx0IEZvciBQT1cgTWVtb3J5IExvYWQgKGdldF9kZXMgPT0gMSkKICAgICAgKi8KIAlzdHJ1Y3QgeworI2lmZGVmIF9fQklHX0VORElBTl9CSVRGSUVMRAogCQl1aW50NjRfdCByZXNlcnZlZF81MV82MzoxMzsKIAkJLyoKIAkJICogVGhlIG5leHQgZW50cnkgaW4gdGhlIHRhZyBsaXN0IGNvbm5lY3RlZCB0byB0aGUKQEAgLTc0MCwxMiArOTA3LDIyIEBACiAJCSAqIGlzIHNldC4KIAkJICovCiAJCXVpbnQ2NF90IHBlbmRfdGFnOjMyOworI2Vsc2UKKwkgICAgICAgIHVpbnQ2NF90IHBlbmRfdGFnOjMyOworCSAgICAgICAgdWludDY0X3QgcGVuZF90eXBlOjI7CisJICAgICAgICB1aW50NjRfdCBwZW5kX3N3aXRjaDoxOworCSAgICAgICAgdWludDY0X3Qgbm9zY2hlZDoxOworCSAgICAgICAgdWludDY0X3QgZ3JwOjQ7CisJICAgICAgICB1aW50NjRfdCBmd2RfaW5kZXg6MTE7CisJICAgICAgICB1aW50NjRfdCByZXNlcnZlZF81MV82MzoxMzsKKyNlbmRpZgogCX0gc19zbWVtbG9hZDI7CiAKICAgICAvKioKICAgICAgKiBSZXN1bHQgRm9yIFBPVyBJbmRleC9Qb2ludGVyIExvYWQgKGdldF9ybXQgPT0gMC9nZXRfZGVzX2dldF90YWlsID09IDApCiAgICAgICovCiAJc3RydWN0IHsKKyNpZmRlZiBfX0JJR19FTkRJQU5fQklUR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NvZGU6ODsKKyNlbHNlCisJICAgICAgICB1aW50NjRfdCBlcnJfY29kZTo4OworCSAgICAgICAgdWludDY0X3QgcmN2X2Vycm9yOjE7CisJICAgICAgICB1aW50NjRfdCBub3RfSVA6MTsKKwkgICAgICAgIHVpbnQ2NF90IGlzX21jYXN0OjE7CisJICAgICAgICB1aW50NjRfdCBpc19iY2FzdDoxOworCSAgICAgICAgdWludDY0X3QgaXNfYXJwOjE7CisJICAgICAgICB1aW50NjRfdCBpc19yYXJwOjE7CisJICAgICAgICB1aW50NjRfdCB1bmFzc2lnbmVkMzoxOworCSAgICAgICAgdWludDY0X3Qgc29mdHdhcmU6MTsKKwkgICAgICAgIHVpbnQ2NF90IHVuYXNzaWduZWQyOjQ7CisJICAgICAgICB1aW50NjRfdCB1bmFzc2lnbmVkMmE6ODsKKwkgICAgICAgIHVpbnQ2NF90IHByOjQ7CisJICAgICAgICB1aW50NjRfdCB2bGFuX2lkOjEyOworCSAgICAgICAgdWludDY0X3Qgdmxhbl9jZmk6MTsKKwkgICAgICAgIHVpbnQ2NF90IHVuYXNzaWduZWQ6MTsKKwkgICAgICAgIHVpbnQ2NF90IHZsYW5fc3RhY2tlZDoxOworCSAgICAgICAgdWludDY0X3Qgdmxhbl92YWxpZDoxOworCSAgICAgICAgdWludDY0X3QgdW51c2VkOjg7CisJICAgICAgICB1aW50NjRfdCBidWZzOjg7CisjZW5kaWYKIAl9IHNub2lwOwogCiB9IGN2bXhfcGlwX3dxZV93b3JkMjsKQEAgLTMxMiw2ICszNjcsNyBAQAogICAgICAqCUhXIFdSSVRFOiB0aGUgZm9sbG93aW5nIDY0IGJpdHMgYXJlIGZpbGxlZCBieSBIVyB3aGVuIGEgcGFja2V0IGFycml2ZXMKICAgICAgKi8KIAorI2lmZGVmIF9fQklHX0VORElBTl9CSVRGSUVMRAogICAgIC8qKgogICAgICAqIHJhdyBjaGtzdW0gcmVzdWx0IGdlbmVyYXRlZCBieSB0aGUgSFcKICAgICAgKi8KQEAgLTMyNywxMiArMzgzLDE4IEBACiAgICAgICogKE9ubHkgMzYgYml0cyB1c2VkIGluIE9jdGVvbiAxKQogICAgICAqLwogCXVpbnQ2NF90IG5leHRfcHRyOjQwOworI2Vsc2UKKwl1aW50NjRfdCBuZXh0X3B0cjo0MDsKKwl1aW50OF90IHVudXNlZDsKKwl1aW50MTZfdCBod19jaGtzdW07CisjZW5kaWYKIAogICAgIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICAgICAqIFdPUkQgMQogICAgICAqCUhXIFdSSVRFOiB0aGUgZm9sbG93aW5nIDY0IGJpdHMgYXJlIGZpbGxlZCBieSBIVyB3aGVuIGEgcGFja2V0IGFycml2ZXMKICAgICAgKi8KIAorI2lmZGVmIF9fQklHX0VORElBTl9CSVRGSUVMRAogICAgIC8qKgogICAgICAqIEhXIHNldHMgdG8gdGhlIHRvdGFsIG51bWJlciBvZiBieXRlcyBpbiB0aGUgcGFja2V0CiAgICAgICovCkBAIC0zNTksNiArNDIxLDE1IEBACiAgICAgICogdGhlIHN5bmNocm9uaXphdGlvbi9vcmRlcmluZyB0YWcKICAgICAgKi8KIAl1aW50NjRfdCB0YWc6MzI7CisjZWxzZQorCXVpbnQ2NF90IHRhZzozMjsKKwl1aW50NjRfdCB0YWdfdHlwZToyOworCXVpbnQ2NF90IHplcm9fMjoxOworCXVpbnQ2NF90IGdycDo0OworCXVpbnQ2NF90IHFvczozOworCXVpbnQ2NF90IGlwcHJ0OjY7CisJdWludDY0X3QgbGVuOjE2OworI2VuZGlmCiAKICAgICAvKioKICAgICAgKiBXT1JEIDIgSFcgV1JJVEU6IHRoZSBmb2xsb3dpbmcgNjQtYml0cyBhcmUgZmlsbGVkIGluIGJ5CmRpZmYgLS1naXQgYS9hcmNoL21pcHMvaW5jbHVkZS9hc20vb2N0ZW9uL2N2bXguaCBiL2FyY2gvbWlwcy9pbmNsdWRlL2FzbS9vY3Rlb24vY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UsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9Mb2FkSFcoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCIuc2V0XHRub2F0XG4iICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX2xiKCIlMCIsICIwKCUyKSIpIlxuIiAgICBcCi0JCQkiMjpcdCJ1c2VyX2xidSgiJDEiLCAiMSglMikiKSJcblx0IiBcCisJCQkiMTpcdCJ0eXBlIyNfbGIoIiUwIiwgIjAoJTIpIikiXG4iICBcCisJCQkiMjpcdCJ0eXBlIyNfbGJ1KCIkMSIsICIxKCUyKSIpIlxuXHQiXAogCQkJInNsbFx0JTAsIDB4OFxuXHQiICAgICAgICAgICAgICAgICAgXAogCQkJIm9yXHQlMCwgJDFcblx0IiAgICAgICAgICAgICAgICAgICAgXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMTI3LDEzICsxMjYsMTUgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKSAgICAgICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCiAKICNpZm5kZWYgQ09ORklHX0NQVV9NSVBTUjYKLSNkZWZpbmUgICAgIExvYWRXKGFkZHIsIHZhbHVlLCByZXMpICAgXAorI2RlZmluZSAgICAgX0xvYWRXKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpICAgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCSIxOlx0InVzZXJfbHdsKCIlMCIsICIoJTIpIikiXG4iICAgIFwKLQkJCSIyOlx0InVzZXJfbHdyKCIlMCIsICIzKCUyKSIpIlxuXHQiIFwKKwkJCSIxOlx0InR5cGUjI19sd2woIiUwIiwgIiglMikiKSJcbiIgICBcCisJCQkiMjpcdCJ0eXBlIyNfbHdyKCIlMCIsICIzKCUyKSIpIlxuXHQiXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjM6XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5pbnNuXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMTQ2LDIxICsxNDcsMjQgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKSAgICAgICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCisKICNlbHNlCiAvKiBNSVBTUjYgaGFzIG5vIGx3bCBpbnN0cnVjdGlvbiAqLwotI2RlZmluZSAgICAgTG9hZFcoYWRkciwgdmFsdWUsIHJlcykgXAorI2RlZmluZSAgICAgX0xvYWRXKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKAkJCSAgICBcCiAJCQkiLnNldFx0cHVzaFxuIgkJCSAgICB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SFdVKGFkZHIsIHZhbHVlLCByZXMpIFwKKyNkZWZpbmUgICAgIF9Mb2FkSFdVKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0bm9hdFxuIiAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX2xidSgiJTAiLCAiMCglMikiKSJcbiIgICBcCi0JCQkiMjpcdCJ1c2VyX2xidSgiJDEiLCAiMSglMikiKSJcblx0IiBcCisJCQkiMTpcdCJ0eXBlIyNfbGJ1KCIlMCIsICIwKCUyKSIpIlxuIiBcCisJCQkiMjpcdCJ0eXBlIyNfbGJ1KCIkMSIsICIxKCUyKSIpIlxuXHQiXAogCQkJInNsbFx0JTAsIDB4OFxuXHQiICAgICAgICAgICAgICAgICAgXAogCQkJIm9yXHQlMCwgJDFcblx0IiAgICAgICAgICAgICAgICAgICAgXAogCQkJImxpXHQlMSwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMjAxLDEzICsyMDgsMTUgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj0mciIgKHZhbHVlKSwgIj1yIiAocmVzKSAgICAgICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCiAKICNpZm5kZWYgQ09ORklHX0NQVV9NSVBTUjYKLSNkZWZpbmUgICAgIExvYWRXVShhZGRyLCB2YWx1ZSwgcmVzKSAgXAorI2RlZmluZSAgICAgX0xvYWRXVShhZGRyLCB2YWx1ZSwgcmVzLCB0eXBlKSAgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCSIxOlx0InVzZXJfbHdsKCIlMCIsICIoJTIpIikiXG4iICAgIFwKLQkJCSIyOlx0InVzZXJfbHdyKCIlMCIsICIzKCUyKSIpIlxuXHQiIFwKKwkJCSIxOlx0InR5cGUjI19sd2woIiUwIiwgIiglMikiKSJcbiIgIFwKKwkJCSIyOlx0InR5cGUjI19sd3IoIiUwIiwgIjMoJTIpIikiXG5cdCJcCiAJCQkiZHNsbFx0JTAsICUwLCAzMlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiZHNybFx0JTAsICUwLCAzMlxuXHQiICAgICAgICAgICAgICBcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0yMjIsOSArMjMxLDExIEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQk6ICI9JnIiICh2YWx1ZSksICI9ciIgKHJlcykgICAgICAgICBcCi0JCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgICAgICAgXAorfSB3aGlsZSgwKQogCi0jZGVmaW5lICAgICBMb2FkRFcoYWRkciwgdmFsdWUsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9Mb2FkRFcoYWRkciwgdmFsdWUsIHJlcykgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJ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k6ICI9JnIiICh2YWx1ZSksICI9ciIgKHJlcykJICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCisKICNlbmRpZiAvKiBDT05GSUdfQ1BVX01JUFNSNiAqLwogCiAKLSNkZWZpbmUgICAgIFN0b3JlSFcoYWRkciwgdmFsdWUsIHJlcykgXAorI2RlZmluZSAgICAgX1N0b3JlSFcoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIuc2V0XHRub2F0XG4iICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCSIxOlx0InVzZXJfc2IoIiUxIiwgIjEoJTIpIikiXG4iICAgIFwKKwkJCSIxOlx0InR5cGUjI19zYigiJTEiLCAiMSglMikiKSJcbiIgIFwKIAkJCSJzcmxcdCQxLCAlMSwgMHg4XG4iICAgICAgICAgICAgICAgIFwKLQkJCSIyOlx0InVzZXJfc2IoIiQxIiwgIjAoJTIpIikiXG4iICAgIFwKKwkJCSIyOlx0InR5cGUjI19zYigiJDEiLCAiMCglMikiKSJcbiIgIFwKIAkJCSIuc2V0XHRhdFxuXHQiICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSJsaVx0JTAsIDBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIzOlxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTM0MiwxMyArMzYxLDE1IEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQk6ICI9ciIgKHJlcykgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpO1wKK30gd2hpbGUoMCkKIAogI2lmbmRlZiBDT05GSUdfQ1BVX01JUFNSNgotI2RlZmluZSAgICAgU3RvcmVXKGFkZHIsIHZhbHVlLCByZXMpICBcCisjZGVmaW5lICAgICBfU3RvcmVXKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHQidXNlcl9zd2woIiUxIiwgIiglMikiKSJcbiIgICAgXAotCQkJIjI6XHQidXNlcl9zd3IoIiUxIiwgIjMoJTIpIikiXG5cdCIgXAorCQkJIjE6XHQidHlwZSMjX3N3bCgiJTEiLCAiKCUyKSIpIlxuIiAgXAorCQkJIjI6XHQidHlwZSMjX3N3cigiJTEiLCAiMyglMikiKSJcblx0IlwKIAkJCSJsaVx0JTAsIDBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIzOlxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIuaW5zblxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTM2MSw5ICszODIsMTEgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJOiAiPXIiIChyZXMpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgIFwKK30gd2hpbGUoMCkKIAotI2RlZmluZSAgICAgU3RvcmVEVyhhZGRyLCB2YWx1ZSwgcmVzKSBcCisjZGVmaW5lICAgICBfU3RvcmVEVyhhZGRyLCB2YWx1ZSwgcmVzKSBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjE6XHRzZGxcdCUxLCglMilcbiIgICAgICAgICAgICAgICAgXAogCQkJIjI6XHRzZHJcdCUxLCA3KCUyKVxuXHQiICAgICAgICAgICAgXApAQCAtMzc5LDIwICs0MDIsMjMgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJOiAiPXIiIChyZXMpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgIFwKK30gd2hpbGUoMCkKKwogI2Vsc2UKIC8qIE1JUFNSNiBoYXMgbm8gc3dsIGFuZCBzZGwgaW5zdHJ1Y3Rpb25zICovCi0jZGVmaW5lICAgICBTdG9yZVcoYWRkciwgdmFsdWUsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9TdG9yZVcoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0cHVzaFxuXHQi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gICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLnNldFx0cHVzaFxuXHQiCQkgICAgXAogCQkJIi5zZXRcdG5vYXRcblx0IgkJICAgIFwKQEAgLTQ1MSwxNSArNDc5LDE4IEBACiAJCQkiLnByZXZpb3VzIgkJCSAgICBcCiAJCTogIj0mciIgKHJlcykJCQkgICAgCSAgICBcCiAJCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkgICAgXAotCQk6ICJtZW1vcnkiKTsKKwkJOiAibWVtb3J5Iik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCit9IHdoaWxlKDApCisKICNlbmRpZiAvKiBDT05GSUdfQ1BVX01JUFNSNiAqLwogCiAjZWxzZSAvKiBfX0JJR19FTkRJQU4gKi8KIAotI2RlZmluZSAgICAgTG9hZEhXKGFkZHIsIHZhbHVlLCByZXMpICBcCisjZGVmaW5lICAgICBfTG9hZEhXKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICgiLnNldFx0bm9hdFxuIiAgICAgICAgXAotCQkJIjE6XHQidXNlcl9sYigiJTAiLCAiMSglMikiKSJcbiIgICAgXAotCQkJIjI6XHQidXNlcl9sYnUoIiQxIiwgIjAoJTIpIikiXG5cdCIgXAorCQkJIjE6XHQidHlwZSMjX2xiKCIlMCIsICIxKCUyKSIpIlxuIiAgXAorCQkJIjI6XHQidHlwZSMjX2xidSgiJDEiLCAiMCglMikiKSJcblx0IlwKIAkJCSJzbGxcdCUwLCAweDhcblx0IiAgICAgICAgICAgICAgICAgIFwKIAkJCSJvclx0JTAsICQxXG5cdCIgICAgICAgICAgICAgICAgICAgIFwKIAkJCSJsaVx0JTEsIDBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTQ3NCwxMyArNTA1LDE1IEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQk6ICI9JnIiICh2YWx1ZSksICI9ciIgKHJlcykgICAgICAgICBcCi0JCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgICAgICAgXAorfSB3aGlsZSgwKQogCiAjaWZuZGVmIENPTkZJR19DUFVfTUlQU1I2Ci0jZGVmaW5lICAgICBMb2FkVyhhZGRyLCB2YWx1ZSwgcmVzKSAgIFwKKyNkZWZpbmUgICAgIF9Mb2FkVyhhZGRyLCB2YWx1ZSwgcmVzLCB0eXBlKSAgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX2x3bCgiJTAiLCAiMyglMikiKSJcbiIgICBcCi0JCQkiMjpcdCJ1c2VyX2x3cigiJTAiLCAiKCUyKSIpIlxuXHQiICBcCisJCQkiMTpcdCJ0eXBlIyNfbHdsKCIlMCIsICIzKCUyKSIpIlxuIiBcCisJCQkiMjpcdCJ0eXBlIyNfbHdyKCIlMCIsICIoJTIpIikiXG5cdCJcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiMzpcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLmluc25cblx0IiAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC00OTMsMjEgKzUyNiwyNCBAQAogCQkJU1RSKFBUUikiXHQyYiwgNGJcblx0IiAgICAgIC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gICAgICAgICAgIFwKIAkJCSJvclx0JTAsICQxXG5cdCIgICAgICAgICAgICAgICAgICAgIFwKIAkJCSJsaVx0JTEsIDBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTU0OSwxMyArNTg4LDE1IEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQk6ICI9JnIiICh2YWx1ZSksICI9ciIgKHJlcykgICAgICAgICBcCi0JCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgICAgICAgXAorfSB3aGlsZSgwKQogCiAjaWZuZGVmIENPTkZJR19DUFVfTUlQU1I2Ci0jZGVmaW5lICAgICBMb2FkV1UoYWRkciwgdmFsdWUsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9Mb2FkV1UoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX2x3bCgiJTAiLCAiMyglMikiKSJcbiIgICBcCi0JCQkiMjpcdCJ1c2VyX2x3cigiJTAiLCAiKCUyKSIpIlxuXHQiICBcCisJCQkiMTpcdCJ0eXBlIyNfbHdsKCIlMCIsICIzKCUyKSIpIlxuIiBcCisJCQkiMjpcdCJ0eXBlIyNfbHdyKCIlMCIsICIoJTIpIikiXG5cdCJcCiAJCQkiZHNsbFx0JTAsICUwLCAzMlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiZHNybFx0JTAsICUwLCAzMlxuXHQiICAgICAgICAgICAgICBcCiAJCQkibGlcdCUxLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC01NzAsOSArNjExLDExIEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQk6ICI9JnIiICh2YWx1ZSksICI9ciIgKHJlcykgICAgICAgICBcCi0JCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsgICAgICAgXAorfSB3aGlsZSgwKQogCi0jZGVmaW5lICAgICBMb2FkRFcoYWRkciwgdmFsdWUsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9Mb2FkRFcoYWRkciwgdmFsdWUsIHJlcykgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiMTpcdGxkbFx0JTAsIDcoJTIpXG4iICAgICAgICAgICAgICBcCiAJCQkiMjpcdGxkclx0JTAsICglMilcblx0IiAgICAgICAgICAgICBcCkBAIC01ODgsMjEgKzYzMSwyNCBAQAogCQkJU1RSKFBUUikiXHQyYiwgNGJcblx0IiAgICAgICAgICAgICAgXAogCQkJIi5wcmV2aW91cyIgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJOiAiPSZyIiAodmFsdWUpLCAiPXIiIChyZXMpICAgICAgICAgXAotCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICAgICAgIFwKK30gd2hpbGUoMCkKKwogI2Vsc2UKIC8qIE1JUFNSNiBoYXMgbm90IGx3bCBhbmQgbGRsIGluc3RydWN0aW9ucyAqLwotI2RlZmluZQkgICAgTG9hZFdVKGFkZHIsIHZhbHVlLCByZXMpIFwKKyNkZWZpb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gIj1yIiAocmVzKQkgICAgXAotCQkJOiAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICAgICAgIFwKK30gd2hpbGUoMCkKIAotI2RlZmluZSAgICAgTG9hZERXKGFkZHIsIHZhbHVlLCByZXMpICBcCisjZGVmaW5lICAgICBfTG9hZERXKGFkZHIsIHZhbHVlLCByZXMpICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICgJCQkgICAgXAogCQkJIi5zZXRcdHB1c2hcblx0IgkJICAgIFwKIAkJCSIuc2V0XHRub2F0XG5cdCIJCSAgICBcCkBAIC02NjcsMTUgKzcxNSwxNyBAQAogCQkJU1RSKFBUUikiXHQ4YiwgMTFiXG5cdCIJCSAgICBcCiAJCQkiLnByZXZpb3VzIgkJCSAgICBcCiAJCQk6ICI9JnIiICh2YWx1ZSksICI9ciIgKHJlcykJICAgIFwKLQkJCTogInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7CisJCQk6ICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOyAgICAgICBcCit9IHdoaWxlKDApCiAjZW5kaWYgLyogQ09ORklHX0NQVV9NSVBTUjYgKi8KIAotI2RlZmluZSAgICAgU3RvcmVIVyhhZGRyLCB2YWx1ZSwgcmVzKSBcCisjZGVmaW5lICAgICBfU3RvcmVIVyhhZGRyLCB2YWx1ZSwgcmVzLCB0eXBlKSBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5zZXRcdG5vYXRcbiIgICAgICAgICAgICAgICAgICAgICAgXAotCQkJIjE6XHQidXNlcl9zYigiJTEiLCAiMCglMikiKSJcbiIgICAgXAorCQkJIjE6XHQidHlwZSMjX3NiKCIlMSIsICIwKCUyKSIpIlxuIiAgXAogCQkJInNybFx0JDEsJTEsIDB4OFxuIiAgICAgICAgICAgICAgICAgXAotCQkJIjI6XHQidXNlcl9zYigiJDEiLCAiMSglMikiKSJcbiIgICAgXAorCQkJIjI6XHQidHlwZSMjX3NiKCIkMSIsICIxKCUyKSIpIlxuIiAgXAogCQkJIi5zZXRcdGF0XG5cdCIgICAgICAgICAgICAgICAgICAgICAgXAogCQkJImxpXHQlMCwgMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJIjM6XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtNjg5LDEyICs3MzksMTUgQEAKIAkJCVNUUihQVFIpIlx0MmIsIDRiXG5cdCIgICAgICAgICAgICAgIFwKIAkJCSIucHJldmlvdXMiICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCTogIj1yIiAocmVzKSAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJCTogInIiICh2YWx1ZSksICJyIiAoYWRkciksICJpIiAoLUVGQVVMVCkpOworCQkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7XAorfSB3aGlsZSgwKQorCiAjaWZuZGVmIENPTkZJR19DUFVfTUlQU1I2Ci0jZGVmaW5lICAgICBTdG9yZVcoYWRkciwgdmFsdWUsIHJlcykgIFwKKyNkZWZpbmUgICAgIF9TdG9yZVcoYWRkciwgdmFsdWUsIHJlcywgdHlwZSkgIFwKK2RvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkiMTpcdCJ1c2VyX3N3bCgiJTEiLCAiMyglMikiKSJcbiIgICBcCi0JCQkiMjpcdCJ1c2VyX3N3cigiJTEiLCAiKCUyKSIpIlxuXHQiICBcCisJCQkiMTpcdCJ0eXBlIyNfc3dsKCIlMSIsICIzKCUyKSIpIlxuIiBcCisJCQkiMjpcdCJ0eXBlIyNfc3dyKCIlMSIsICIoJTIpIikiXG5cdCJcCiAJCQkibGlcdCUwLCAwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiMzpcblx0IiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkiLmluc25cblx0IiAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC03MDcsOSArNzYwLDExIEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCTogIj1yIiAocmVzKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICBcCit9IHdoaWxlKDApCiAKLSNkZWZpbmUgICAgIFN0b3JlRFcoYWRkciwgdmFsdWUsIHJlcykgXAorI2RlZmluZSAgICAgX1N0b3JlRFcoYWRkciwgdmFsdWUsIHJlcykgXAorZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQlfX2FzbV9fIF9fdm9sYXRpbGVfXyAoICAgICAgICAgICAgICAgICAgICAgIFwKIAkJCSIxOlx0c2RsXHQlMSwgNyglMilcbiIgICAgICAgICAgICAgIFwKIAkJCSIyOlx0c2RyXHQlMSwgKCUyKVxuXHQiICAgICAgICAgICAgIFwKQEAgLTcyNSwyMCArNzgwLDIzIEBACiAJCQlTVFIoUFRSKSJcdDJiLCA0YlxuXHQiICAgICAgICAgICAgICBcCiAJCQkiLnByZXZpb3VzIiAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCTogIj1yIiAocmVzKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpKTsKKwkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSk7ICBcCit9IHdoaWxlKDApCisKICNlbHNlCiAvKiBNSVBTUjYgaGFzIG5vIHN3bCBhbmQgc2RsIGluc3RydWN0aW9ucyAqLwotI2RlZmluZSAgICAgU3RvcmVXKGFkZHIsIHZhbHVlLCByZXMpICBcCisjZGVmaW5lICAgICBfU3RvcmVXKGFkZHIsIHZhbHVlLCByZXMsIHR5cGUpICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5zZXRcdHB1c2hcblx0IgkJICAgIFwKIAkJCSIuc2V0XHRub2F0XG5cdCIJCSAgICBcCi0JCQkiMToidXNlcl9zYigiJTEiLCAiMCglMikiKSJcblx0IiAgICBcCisJCQkiMToidHlwZSMjX3NiKCIlMSIsICIwKCUyKSIpIlxuXHQiICBcCiAJCQkic3JsXHQkMSwgJTEsIDB4OFxuXHQiCQkgICAgXAotCQkJIjI6InVzZXJfc2IoIiQxIiwgIjEoJTIpIikiXG5cdCIgICAgXAorCQkJIjI6InR5cGUjI19zYigiJDEiLCAiMSglMikiKSJcblx0IiAgXAogCQkJInNybFx0JDEsICQxLCAgMHg4XG5cdCIJCSAgICBcCi0JCQkiMzoidXNlcl9zYigiJDEiLCAiMiglMikiKSJcblx0IiAgICBcCisJCQkiMzoidHlwZSMjX3NiKCIkMSIsICIyKCUyKSIpIlxuXHQiICBcCiAJCQkic3JsXHQkMSwgJDEsIDB4OFxuXHQiCQkgICAgXAotCQkJIjQ6InVzZXJfc2IoIiQxIiwgIjMoJTIpIikiXG5cdCIgICAgXAorCQkJIjQ6InR5cGUjI19zYigiJDEiLCAiMyglMikiKSJcblx0IiAgXAogCQkJIi5zZXRcdHBvcFxuXHQiCQkJICAgIFwKIAkJCSJsaVx0JTAsIDBcbiIJCQkgICAgXAogCQkJIjEwOlxuXHQiCQkJICAgIFwKQEAgLTc1NSw5ICs4MTMsMTEgQEAKIAkJCSIucHJldmlvdXMiCQkJICAgIFwKIAkJOiAiPSZyIiAocmVzKQkJCSAgICAJICAgIFwKIAkJOiAiciIgKHZhbHVlKSwgInIiIChhZGRyKSwgImkiICgtRUZBVUxUKSAgICBcCi0JCTogIm1lbW9yeSIpOworCQk6ICJtZW1vcnkiKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUoMCkKIAotI2RlZmluZSAgICAgU3RvcmVEVyhhZGRyLCB2YWx1ZSwgcmVzKSBcCisjZGVmaW5lICAgICBfU3RvcmVEVyhhZGRyLCB2YWx1ZSwgcmVzKSBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCV9fYXNtX18gX192b2xhdGlsZV9fICggICAgICAgICAgICAgICAgICAgICAgXAogCQkJIi5zZXRcdHB1c2hcblx0IgkJICAgIFwKIAkJCSIuc2V0XHRub2F0XG5cdCIJCSAgICBcCkBAIC03OTcsMTAgKzg1NywyOCBAQAogCQkJIi5wcmV2aW91cyIJCQkgICAgXAogCQk6ICI9JnIiIChyZXMpCQkJICAgIAkgICAgXAogCQk6ICJyIiAodmFsdWUpLCAiciIgKGFkZHIpLCAiaSIgKC1FRkFVTFQpICAgIFwKLQkJOiAibWVtb3J5Iik7CisJCTogIm1lbW9yeSIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorfSB3aGlsZSgwKQorCiAjZW5kaWYgLyogQ09ORklHX0NQVV9NSVBTUjYgKi8KICNlbmRpZgogCisjZGVmaW5lIExvYWRIV1UoYWRkciwgdmFsdWUs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9BRF9JVihySTMsIDEyKQorCWJ0CQllcSxwcGNfZW5jcnlwdF94dHNfbm90d2VhaworCW1yCQlyS1AscktUCisJU1RBUlRfS0VZKHJJMCwgckkxLCBySTIsIHJJMykKKwlibAkJcHBjX2VuY3J5cHRfYmxvY2sKKwl4b3IJCXJJMCxyRDAsclcwCisJeG9yCQlySTEsckQxLHJXMQorCXhvcgkJckkyLHJEMixyVzIKKwl4b3IJCXJJMyxyRDMsclczCitwcGNfZW5jcnlwdF94dHNfbm90d2VhazoKKwlFTkRJQU5fU1dBUChyRzAsIHJHMSwgckkwLCBySTEpCisJRU5ESUFOX1NXQVAockcyLCByRzMsIHJJMiwgckkzKQorcHBjX2VuY3J5cHRfeHRzX2xvb3A6CisJTE9BRF9EQVRBKHJEMCwgMCkKKwltcgkJcktQLHJLUworCUxPQURfREFUQShyRDEsIDQpCisJc3ViaQkJckxOLHJMTiwxNgorCUxPQURfREFUQShyRDIsIDgpCisJTE9BRF9EQVRBKHJEMywgMTIpCisJeG9yCQlyRDAsckQwLHJJMAorCXhvcgkJckQxLHJEMSxySTEKKwl4b3IJCXJEMixyRDIsckkyCisJeG9yCQlyRDMsckQzLHJJMworCVNUQVJUX0tFWShyRDAsIHJEMSwgckQyLCByRDMpCisJYmwJCXBwY19lbmNyeXB0X2Jsb2NrCisJeG9yCQlyRDAsckQwLHJXMAorCXhvcgkJckQxLHJEMSxyVzEKKwl4b3IJCXJEMixyRDIsclcyCisJeG9yCQlyRDMsckQzLHJXMworCXhvcgkJckQwLHJEMCxySTAKKwlTQVZFX0RBVEEockQwLCAwKQorCXhvcgkJckQxLHJEMSxySTEKKwlTQVZFX0RBVEEockQxLCA0KQorCXhvcgkJckQyLHJEMixySTIKKwlTQVZFX0RBVEEockQyLCA4KQorCXhvcgkJckQzLHJEMyxySTMKKwlTQVZFX0RBVEEockQzLCAxMikKKwlHRjEyOF9NVUwockcwLCByRzEsIHJHMiwgckczLCByVzApCisJRU5ESUFOX1NXQVAockkwLCBySTE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JcHBjX2VuY3J5cHRfYmxvY2sKKwl4b3IJCXJJMCxyRDAsclcwCisJeG9yCQlySTEsckQxLHJXMQorCXhvcgkJckkyLHJEMixyVzIKKwl4b3IJCXJJMyxyRDMsclczCisJYWRkaQkJclQwLHJUMCw0MDk2CitwcGNfZGVjcnlwdF94dHNfbm90d2VhazoKKwlFTkRJQU5fU1dBUChyRzAsIHJHMSwgckkwLCBySTEpCisJRU5ESUFOX1NXQVAockcyLCByRzMsIHJJMiwgckkzKQorcHBjX2RlY3J5cHRfeHRzX2xvb3A6CisJTE9BRF9EQVRBKHJEMCwgMCkKKwltcgkJcktQLHJLUworCUxPQURfREFUQShyRDEsIDQpCisJc3ViaQkJckxOLHJMTiwxNgorCUxPQURfREFUQShyRDIsIDgpCisJTE9BRF9EQVRBKHJEMywgMTIpCisJeG9yCQlyRDAsckQwLHJJMAorCXhvcgkJckQxLHJEMSxySTEKKwl4b3IJCXJEMixyRDIsckkyCisJeG9yCQlyRDMsckQzLHJJMworCVNUQVJUX0tFWShyRDAsIHJEMSwgckQyLCByRDMpCisJYmwJCXBwY19kZWNyeXB0X2Jsb2NrCisJeG9yCQlyRDAsckQwLHJXMAorCXhvcgkJckQxLHJEMSxyVzEKKwl4b3IJCXJEMixyRDIsclcyCisJeG9yCQlyRDMsckQzLHJXMworCXhvcgkJckQwLHJEMCxySTAKKwlTQVZFX0RBVEEockQwLCAwKQorCXhvcgkJckQxLHJEMSxySTEKKwlTQVZFX0RBVEEockQxLCA0KQorCXhvcgkJckQyLHJEMixySTIKKwlTQVZFX0RBVEEockQyLCA4KQorCXhvcgkJckQzLHJEMyxySTMKKwlTQVZFX0RBVEEockQzLCAxMikKKwlHRjEyOF9NVUwockcwLCByRzEsIHJHMiwgckczLCByVzApCisJRU5ESUFOX1NXQVAockkwLCBySTEsIHJHMCwgckcxKQorCUVORElBTl9TV0FQKHJJMiwgckkzLCByRzIsIHJHMykKKwljbXB3aQkJckxOLDAKKwlORVhUX0JMT0NLCisJYnQ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QiA9IEIgcm90bCAzMAkJKi8gXAorCW9yCQlyVDIsclQyLHJUMDsJLyogMjogRiA9IEYnIG9yIEYiCQkqLyBcCisJcm90cndpCQlyVDAsZSwyNzsJLyogMjogQScgPSBBIHJvdGwgNQkJKi8gXAorCWFkZAkJZCxkLHJUMjsJLyogMjogRSA9IEUgKyBGCQkJKi8gXAorCWFkZAkJZCxkLHJUMAkJLyogMjogRSA9IEUgKyBBJwkJKi8KKworI2RlZmluZSBSXzYwXzc5KGEsIGIsIGMsIGQsIGUsIHcwLCB3MSwgdzQsIHc2LCB3NywgaykgXAorCVJfMjBfMzkoYSwgYiwgYywgZCwgZSwgdzAsIHcxLCB3NCwgdzYsIHc3LCBrKQorCitfR0xPQkFMKHBwY19zcGVfc2hhMV90cmFuc2Zvcm0pCisJSU5JVElBTElaRQorCisJbHd6CQlySDAsMChySFApCisJbHd6CQlySDEsNChySFApCisJbXRjdHIJCXI1CisJbHd6CQlySDIsOChySFApCisJbGlzCQlyS1AsUFBDX1NQRV9TSEExX0tAaAorCWx3egkJckgzLDEyKHJIUCkKKwlvcmkJCXJLUCxyS1AsUFBDX1NQRV9TSEExX0tAbAorCWx3egkJckg0LDE2KHJIUCkKKworcHBjX3NwZV9zaGExX21haW46CisJUl8wMF8xNShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclcxLCByVzAsIDEsIDApCisJUl8wMF8xNShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclcyLCByVzEsIDAsIDgpCisJUl8wMF8xNShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclczLCByVzIsIDAsIDE2KQorCVJfMDBfMTUockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNCwgclczLCAwLCAyNCkKKwlSXzAwXzE1KHJIMiwgckgzLCBySDQsIHJIMCwgckgxLCByVzUsIHJXNCwgMCwgMzIpCisJUl8wMF8xNShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclc2LCByVzUsIDAsIDQwKQorCVJfMDBfMTUockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJUMywgclc2LCAwLCA0OCkKKwlSXzAwXzE1KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVDMsIHJXNywgMCwgNTYpCisKKwlSXzE2XzE5KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzAsIHJXMSwgclc0LCByVzYsIHJXNywgMCkKKwlSXzE2XzE5KHJIMiwgckgzLCBySDQsIHJIMCwgckgxLCByVzEsIHJXMiwgclc1LCByVzcsIHJXMCwgMikKKworCVJfMjBfMzkockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXMiwgclczLCByVzYsIHJXMCwgclcxLCAwKQorCVJfMjBfMzkockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXMywgclc0LCByVzcsIHJXMSwgclcyLCAwKQorCVJfMjBfMzkockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXNCwgclc1LCByVzAsIHJXMiwgclczLCAwKQorCVJfMjBfMzkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNSwgclc2LCByVzEsIHJXMywgclc0LCAwKQorCVJfMjBfMzkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXNiwgclc3LCByVzIsIHJXNCwgclc1LCAwKQorCVJfMjBfMzkockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXNywgclcwLCByVzMsIHJXNSwgclc2LCAwKQorCVJfMjBfMzkockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXMCwgclcxLCByVzQsIHJXNiwgclc3LCAwKQorCVJfMjBfMzkockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXMSwgclcyLCByVzUsIHJXNywgclcwLCAwKQorCVJfMjBfMzkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXMiwgclczLCByVzYsIHJXMCwgclcxLCAwKQorCVJfMjBfMzkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXMywgclc0LCByVzcsIHJXMSwgclcyLCAzKQorCisJUl80MF81OShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclc0LCByVzUsIHJXMCwgclcyLCByVzMsIDApCisJUl80MF81OShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclc1LCByVzYsIHJXMSwgclczLCByVzQsIDApCisJUl80MF81OShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclc2LCByVzcsIHJXMiwgclc0LCByVzUsIDApCisJUl80MF81OShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclc3LCByVzAsIHJXMywgclc1LCByVzYsIDApCisJUl80MF81OShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclcwLCByVzEsIHJXNCwgclc2LCByVzcsIDApCisJUl80MF81OShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclcxLCByVzIsIHJXNSwgclc3LCByVzAsIDApCisJUl80MF81OShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclcyLCByVzMsIHJXNiwgclcwLCByVzEsIDApCisJUl80MF81OShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclczLCByVzQsIHJXNywgclcxLCByVzIsIDApCisJUl80MF81OShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclc0LCByVzUsIHJXMCwgclcyLCByVzMsIDApCisJUl80MF81OShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclc1LCByVzYsIHJXMSwgclczLCByVzQsIDQpCisKKwlSXzYwXzc5KHJIMCwgckgxLCBySDIsIHJIMywgckg0LCByVzYsIHJXNywgclcyLCByVzQsIHJXNSwgMCkKKwlSXzYwXzc5KHJIMywgckg0LCBySDAsIHJIMSwgckgyLCByVzcsIHJXMCwgclczLCByVzUsIHJXNiwgMCkKKwlSXzYwXzc5KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVzAsIHJXMSwgclc0LCByVzYsIHJXNywgMCkKKwlSXzYwXzc5KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzEsIHJXMiwgclc1LCByVzcsIHJXMCwgMCkKKwlSXzYwXzc5KHJIMiwgckgzLC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3BwY19zcGVfc2hhMjU2X21haW46CisJbGlzCQlyS1AsUFBDX1NQRV9TSEEyNTZfS0BoYQorCWFkZGkJCXJLUCxyS1AsUFBDX1NQRV9TSEEyNTZfS0BsCisKKwlSX0xPQURfVyhySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgclcwLCAwKQorCVJfTE9BRF9XKHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCByVzEsIDgpCisJUl9MT0FEX1cockg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJXMiwgMTYpCisJUl9MT0FEX1cockgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsIHJXMywgMjQpCisJUl9MT0FEX1cockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsIHJXNCwgMzIpCisJUl9MT0FEX1cockg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsIHJXNSwgNDApCisJUl9MT0FEX1cockg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNiwgNDgpCisJUl9MT0FEX1cockgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsIHJXNywgNTYpCitwcGNfc3BlX3NoYTI1Nl8xNl9yb3VuZHM6CisJYWRkaQkJcktQLHJLUCw2NAorCVJfQ0FMQ19XKHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LAorCQkgclcwLCByVzEsIHJXNCwgclc1LCByVzcsIE4sIDApCisJUl9DQUxDX1cockg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsCisJCSByVzEsIHJXMiwgclc1LCByVzYsIHJXMCwgTiwgOCkKKwlSX0NBTENfVyhySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywKKwkJIHJXMiwgclczLCByVzYsIHJXNywgclcxLCBOLCAxNikKKwlSX0NBTENfVyhySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwKKwkJIHJXMywgclc0LCByVzcsIHJXMCwgclcyLCBOLCAyNCkKKwlSX0NBTENfVyhySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywKKwkJIHJXNCwgclc1LCByVzAsIHJXMSwgclczLCBOLCAzMikKKwlSX0NBTENfVyhySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwKKwkJIHJXNSwgclc2LCByVzEsIHJXMiwgclc0LCBOLCA0MCkKKwlSX0NBTENfVyhySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywKKwkJIHJXNiwgclc3LCByVzIsIHJXMywgclc1LCBOLCA0OCkKKwlSX0NBTENfVyhySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwKKwkJIHJXNywgclcwLCByVzMsIHJXNCwgclc2LCBDLCA1NikKKwlidAkJZ3QscHBjX3NwZV9zaGEyNTZfMTZfcm91bmRzCisKKwlsd3oJCXJXMCwwKHJIUCkKKwlORVhUX0JMT0NLCisJbHd6CQlyVzEsNChySFApCisJbHd6CQlyVzIsOChySFApCisJbHd6CQlyVzMsMTIockhQKQorCWx3egkJclc0LDE2KHJIUCkKKwlsd3oJCXJXNSwyMChySFApCisJbHd6CQlyVzYsMjQockhQKQorCWx3egkJclc3LDI4KHJIUCkKKworCWFkZAkJckgwLHJIMCxyVzAKKwlzdHcJCXJIMCwwKHJIUCkKKwlhZGQJCXJIMSxySDEsclcxCisJc3R3CQlySDEsNChySFApCisJYWRkCQlySDIsckgyLHJXMgorCXN0dwkJckgyLDgockhQKQorCWFkZAkJckgzLHJIMyxyVzMKKwlzdHcJCXJIMywxMihySFApCisJYWRkCQlySDQsckg0LHJXNAorCXN0dwkJckg0LDE2KHJIUCkKKwlhZGQJCXJINSxySDUsclc1CisJc3R3CQlySDUsM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G8gYXZvaWQga21hbGxvYyBkdXJpbmcgb29wcy9wYW5pYy4KKyAqLworc3RhdGljIHNpemVfdCBiaWdfb29wc19idWZfc3o7CitzdGF0aWMgY2hhciAqYmlnX29vcHNfYnVmLCAqb29wc19idWY7CitzdGF0aWMgY2hhciAqb29wc19kYXRhOworc3RhdGljIHNpemVfdCBvb3BzX2RhdGFfc3o7CisKKy8qIENvbXByZXNzaW9uIHBhcmFtZXRlcnMgKi8KKyNkZWZpbmUgQ09NUFJfTEVWRUwgNgorI2RlZmluZSBXSU5ET1dfQklUUyAxMgorI2RlZmluZSBNRU1fTEVWRUwgNAorc3RhdGljIHN0cnVjdCB6X3N0cmVhbV9zIHN0cmVhbTsKKworI2lmZGVmIENPTkZJR19QU1RPUkUKKyNpZmRlZiBDT05GSUdfUFBDX1BPV0VSTlYKK3N0YXRpYyBzdHJ1Y3QgbnZyYW1fb3NfcGFydGl0aW9uIHNraWJvb3RfcGFydGl0aW9uID0geworCS5uYW1lID0gImlibSxza2lib290IiwKKwkuaW5kZXggPSAtMSwKKwkub3NfcGFydGl0aW9uID0gZmFsc2UKK307CisjZW5kaWYKKworI2lmZGVmIENPTkZJR19QUENfUFNFUklFUworc3RhdGljIHN0cnVjdCBudnJhbV9vc19wYXJ0aXRpb24gb2ZfY29uZmlnX3BhcnRpdGlvbiA9IHsKKwkubmFtZSA9ICJvZi1jb25maWciLAorCS5pbmRleCA9IC0xLAorCS5vc19wYXJ0aXRpb24gPSBmYWxzZQorfTsKKyNlbmRpZgorCitzdGF0aWMgc3RydWN0IG52cmFtX29zX3BhcnRpdGlvbiBjb21tb25fcGFydGl0aW9uID0geworCS5uYW1lID0gImNvbW1vbiIsCisJLmluZGV4ID0gLTEsCisJLm9zX3BhcnRpdGlvbiA9IGZhbHNlCit9OworCitzdGF0aWMgZW51bSBwc3RvcmVfdHlwZV9pZCBudnJhbV90eXBlX2lkc1tdID0geworCVBTVE9SRV9UWVBFX0RNRVNHLAorCVBTVE9SRV9UWVBF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CWJsCWt2bWh2X2FjY3VtdWxhdGVfdGltZQorI2VuZGlmCisKIAkvKiBFbnRlciBndWVzdCAqLwogCiBCRUdJTl9GVFJfU0VDVElPTgpAQCAtOTE3LDYgKzk3NCwyNyBAQAogCWhyZmlkCiAJYgkuCiAKK3NlY29uZGFyeV90b29fbGF0ZToKKwlsaQlyMTIsIDAKKwljbXBkaQlyNCwgMAorCWJlcQkxMWYKKwlzdHcJcjEyLCBWQ1BVX1RSQVAocjQpCisjaWZkZWYgQ09ORklHX0tWTV9CT09LM1NfSFZfRVhJVF9USU1JTkcKKwlhZGRpCXIzLCByNCwgVkNQVV9UQl9STUVYSVQKKwlibAlrdm1odl9hY2N1bXVsYXRlX3RpbWUKKyNlbmRpZgorMTE6CWIJa3ZtaHZfc3dpdGNoX3RvX2hvc3QKKworaGRlY19zb29uOgorCWxpCXIxMiwgQk9PSzNTX0lOVEVSUlVQVF9IVl9ERUNSRU1FTlRFUgorCXN0dwlyMTIsIFZDUFVfVFJBUChyNCkKKwltcglyOSwgcjQKKyNpZmRlZiBDT05GSUdfS1ZNX0JPT0szU19IVl9FWElUX1RJTUlORworCWFkZGkJcjMsIHI0LCBWQ1BVX1RCX1JNRVhJVAorCWJsCWt2bWh2X2FjY3VtdWxhdGVfdGltZQorI2VuZGlmCisJYglndWVzdF9leGl0X2NvbnQKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRXhpdCBjb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMTAwMiw2ICsxMDgwLDE2IEBACiAKIAlzdHcJcjEyLFZDUFVfVFJBUChyOSkKIAorI2lmZGVmIENPTkZJR19LVk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TAJCS8qIDB4MTc0ICovCisJLmxvbmcJMAkJLyogMHgxNzggKi8KKwkubG9uZwkwCQkvKiAweDE3YyAqLworCS5sb25nCTAJCS8qIDB4MTgwICovCisJLmxvbmcJMAkJLyogMHgxODQgKi8KKwkubG9uZwkwCQkvKiAweDE4OCAqLworCS5sb25nCTAJCS8qIDB4MThjICovCisJLmxvbmcJMAkJLyogMHgxOTAgKi8KKwkubG9uZwkwCQkvKiAweDE5NCAqLworCS5sb25nCTAJCS8qIDB4MTk4ICovCisJLmxvbmcJMAkJLyogMHgxOWMgKi8KKwkubG9uZwkwCQkvKiAweDFhMCAqLworCS5sb25nCTAJCS8qIDB4MWE0ICovCisJLmxvbmcJMAkJLyogMHgxYTggKi8KKwkubG9uZwkwCQkvKiAweDFhYyAqLworCS5sb25nCTAJCS8qIDB4MWIwICovCisJLmxvbmcJMAkJLyogMHgxYjQgKi8KKwkubG9uZwkwCQkvKiAweDFiOCAqLworCS5sb25nCTAJCS8qIDB4MWJjICovCisJLmxvbmcJMAkJLyogMHgxYzAgKi8KKwkubG9uZwkwCQkvKiAweDFjNCAqLworCS5sb25nCTAJCS8qIDB4MWM4ICovCisJLmxvbmcJMAkJLyogMHgxY2MgKi8KKwkubG9uZwkwCQkvKiAweDFkMCAqLworCS5sb25nCTAJCS8qIDB4MWQ0ICovCisJLmxvbmcJMAkJLyogMHgxZDggKi8KKwkubG9uZwkwCQkvKiAweDFkYyAqLworCS5sb25nCTAJCS8qIDB4MWUwICovCisJLmxvbmcJMAkJLyogMHgxZTQgKi8KKwkubG9uZwkwCQkvKiAweDFlOCAqLworCS5sb25nCTAJCS8qIDB4MWVjICovCisJLmxvbmcJMAkJLyogMHgxZjAgKi8KKwkubG9uZwkwCQkvKiAweDFmNCAqLworCS5sb25nCTAJCS8qIDB4MWY4ICovCisJLmxvbmcJMAkJLyogMHgxZmMgKi8KKwkubG9uZwkwCQkvKiAweDIwMCAqLworCS5sb25nCTAJCS8qIDB4MjA0ICovCisJLmxvbmcJMAkJLyogMHgyMDggKi8KKwkubG9uZwkwCQkvKiAweDIwYyAqLworCS5sb25nCTAJCS8qIDB4MjEwICovCisJLmxvbmcJMAkJLyogMHgyMTQgKi8KKwkubG9uZwkwCQkvKiAweDIxOCAqLworCS5sb25nCTAJCS8qIDB4MjFjICovCisJLmxvbmcJMAkJLyogMHgyMjAgKi8KKwkubG9uZwkwCQkvKiAweDIyNCAqLworCS5sb25nCTAJCS8qIDB4MjI4ICovCisJLmxvbmcJMAkJLyogMHgyMmMgKi8KKwkubG9uZwkwCQkvKiAweDIzMCAqLworCS5sb25nCTAJCS8qIDB4MjM0ICovCisJLmxvbmcJMAkJLyogMHgyMzggKi8KKwkubG9uZwkwCQkvKiAweDIzYyAqLworCS5sb25nCTAJCS8qIDB4MjQwICovCisJLmxvbmcJMAkJLyogMHgyNDQgKi8KKwkubG9uZwkwCQkvKiAweDI0OCAqLworCS5sb25nCTAJCS8qIDB4MjRjICovCisJLmxvbmcJMAkJLyogMHgyNTAgKi8KKwkubG9uZwkwCQkvKiAweDI1NCAqLworCS5sb25nCTAJCS8qIDB4MjU4ICovCisJLmxvbmcJMAkJLyogMHgyNWMgKi8KKwkubG9uZwkwCQkvKiAweDI2MCAqLworCS5sb25nCTAJCS8qIDB4MjY0ICovCisJLmxvbmcJMAkJLyogMHgyNjggKi8KKwkubG9uZwkwCQkvKiAweDI2YyAqLworCS5sb25nCTAJCS8qIDB4MjcwICovCisJLmxvbmcJMAkJLyogMHgyNzQgKi8KKwkubG9uZwkwCQkvKiAweDI3OCAqLworCS5sb25nCTAJCS8qIDB4MjdjICovCisJLmxvbmcJMAkJLyogMHgyODAgKi8KKwkubG9uZwkwCQkvKiAweDI4NCAqLworCS5sb25nCTAJCS8qIDB4Mjg4ICovCisJLmxvbmcJMAkJLyogMHgyOGMgKi8KKwkubG9uZwkwCQkvKiAweDI5MCAqLworCS5sb25nCTAJCS8qIDB4Mjk0ICovCisJLmxvbmcJMAkJLyogMHgyOTggKi8KKwk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AgICA9ICJwb3dlcm52IiwKLQkuaW5pdCAgICAgICAgICAgICAgICAgICA9IHBvd2VybnZfZWVoX2luaXQsCi0JLnBvc3RfaW5pdCAgICAgICAgICAgICAgPSBwb3dlcm52X2VlaF9wb3N0X2luaXQsCi0JLm9mX3Byb2JlICAgICAgICAgICAgICAgPSBOVUxMLAotCS5kZXZfcHJvYmUgICAgICAgICAgICAgID0gcG93ZXJudl9lZWhfZGV2X3Byb2JlLAotCS5zZXRfb3B0aW9uICAgICAgICAgICAgID0gcG93ZXJudl9lZWhfc2V0X29wdGlvbiwKLQkuZ2V0X3BlX2FkZHIgICAgICAgICAgICA9IHBvd2VybnZfZWVoX2dldF9wZV9hZGRyLAotCS5nZXRfc3RhdGUgICAgICAgICAgICAgID0gcG93ZXJudl9lZWhfZ2V0X3N0YXRlLAotCS5yZXNldCAgICAgICAgICAgICAgICAgID0gcG93ZXJudl9lZWhfcmVzZXQsCi0JLndhaXRfc3RhdGUgICAgICAgICAgICAgPSBwb3dlcm52X2VlaF93YWl0X3N0YXRlLAotCS5nZXRfbG9nICAgICAgICAgICAgICAgID0gcG93ZXJudl9lZWhfZ2V0X2xvZywKLQkuY29uZmlndXJlX2JyaWRnZSAgICAgICA9IHBvd2VybnZfZWVoX2NvbmZpZ3VyZV9icmlkZ2UsCi0JLmVycl9pbmplY3QJCT0gcG93ZXJudl9lZWhfZXJyX2luamVjdCwKLQkucmVhZF9jb25maWcgICAgICAgICAgICA9IHBvd2VybnZfZWVoX3JlYWRfY29uZmlnLAotCS53cml0ZV9jb25maWcgICAgICAgICAgID0gcG93ZXJudl9lZWhfd3JpdGVfY29uZmlnLAotCS5uZXh0X2Vycm9yCQk9IHBvd2VybnZfZWVoX25leHRfZXJyb3IsCi0JLnJlc3RvcmVfY29uZmlnCQk9IHBvd2VybnZfZWVoX3Jlc3RvcmVfY29uZmlnCisJLmluaXQgICAgICAgICAgICAgICAgICAgPSBwbnZfZWVoX2luaXQsCisJLnBvc3RfaW5pdCAgICAgICAgICAgICAgPSBwbnZfZWVoX3Bvc3RfaW5pdCwKKwkucHJvYmUJCQk9IHBudl9lZWhfcHJvYmUsCisJLnNldF9vcHRpb24gICAgICAgICAgICAgPSBwbnZfZWVoX3NldF9vcHRpb24sCisJLmdldF9wZV9hZGRyICAgICAgICAgICAgPSBwbnZfZWVoX2dldF9wZV9hZGRyLAorCS5nZXRfc3RhdGUgICAgICAgICAgICAgID0gcG52X2VlaF9nZXRfc3RhdGUsCisJLnJlc2V0ICAgICAgICAgICAgICAgICAgPSBwbnZfZWVoX3Jlc2V0LAorCS53YWl0X3N0YXRlICAgICAgICAgICAgID0gcG52X2VlaF93YWl0X3N0YXRlLAorCS5nZXRfbG9nICAgICAgICAgICAgICAgID0gcG52X2VlaF9nZXRfbG9nLAorCS5jb25maWd1cmVfYnJpZGdlICAgICAgID0gcG52X2VlaF9jb25maWd1cmVfYnJpZGdlLAorCS5lcnJfaW5qZWN0CQk9IHBudl9lZWhfZXJyX2luamVjdCwKKwkucmVhZF9jb25maWcgICAgICAgICAgICA9IHBudl9lZWhfcmVhZF9jb25maWcsCisJLndyaXRlX2NvbmZpZyAgICAgICAgICAgPSBwbnZfZWVoX3dyaXRlX2NvbmZpZywKKwkubmV4dF9lcnJvcgkJPSBwbnZfZWVoX25leHRfZXJyb3IsCisJLnJlc3RvcmVfY29uZmlnCQk9IHBudl9lZWhfcmVzdG9yZV9jb25maWcKIH07CiAKIC8qKgpAQCAtNTIxLDcgKzE1MzEsNyBAQAogCWludCByZXQgPSAtRUlOVkFMOwogCiAJZWVoX3NldF9wZV9hdXhfc2l6ZShQTlZfUENJX0RJQUdfQlVGX1NJWkUpOwotCXJldCA9IGVlaF9vcHNfcmVnaXN0ZXIoJnBvd2VybnZfZWVoX29wcyk7CisJcmV0ID0gZWVoX29wc19yZWdpc3RlcigmcG52X2VlaF9vcHMpOwogCWlmICghcmV0KQogCQlwcl9pbmZvKCJFRUg6IFBvd2VyTlYgcGxhdGZvcm0gaW5pdGlh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JfYml0KHBkbi0+bTY0X3dpbnNbaV1bal0sICZwaGItPmlvZGEubTY0X2Jhcl9hbGxvYyk7CisJCQlwZG4tPm02NF93aW5zW2ldW2pdID0gSU9EQV9JTlZBTElEX002NDsKKwkJfQorCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBpbnQgcG52X3BjaV92Zl9hc3NpZ25fbTY0KHN0cnVjdCBwY2lfZGV2ICpwZGV2LCB1MTYgbnVtX3ZmcykKK3sKKwlzdHJ1Y3QgcGNpX2J1cyAgICAgICAgKmJ1czsKKwlzdHJ1Y3QgcGNpX2NvbnRyb2xsZXIgKmhvc2U7CisJc3RydWN0IHBudl9waGIgICAgICAgICpwaGI7CisJc3RydWN0IHBjaV9kbiAgICAgICAgICpwZG47CisJdW5zaWduZWQgaW50ICAgICAgICAgICB3aW47CisJc3RydWN0IHJlc291cmNlICAgICAgICpyZXM7CisJaW50ICAgICAgICAgICAgICAgICAgICBpLCBqOworCWludDY0X3QgICAgICAgICAgICAgICAgcmM7CisJaW50ICAgICAgICAgICAgICAgICAgICB0b3RhbF92ZnM7CisJcmVzb3VyY2Vfc2l6ZV90ICAgICAgICBzaXplLCBzdGFydDsKKwlpbnQgICAgICAgICAgICAgICAgICAgIHBlX251bTsKKwlpbnQgICAgICAgICAgICAgICAgICAgIHZmX2dyb3VwczsKKwlpbnQgICAgICAgICAgICAgICAgICAgIHZmX3Blcl9ncm91cDsKKworCWJ1cyA9IHBkZXYtPmJ1czsKKwlob3NlID0gcGNpX2J1c190b19ob3N0KGJ1cyk7CisJcGhiID0gaG9zZS0+cHJpdmF0ZV9kYXRhOworCXBkbiA9IHBjaV9nZXRfcGRuKHBkZXYpOworCXRvdGFsX3ZmcyA9IHBjaV9zcmlvdl9nZXRfdG90YWx2ZnMocGRldik7CisKKwkvKiBJbml0aWFsaXplIHRoZSBtNjRfd2lucyB0byBJT0RBX0lOVkFMSURfTTY0ICovCisJZm9yIChpID0gMDsgaSA8IFBDSV9TUklPVl9OVU1f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DQ1LCAweGE1LCAweGRiLCAweDY5LCAweDBkLCAweDgxLCAweGM5LAorCQkweDMyLCAweDkyLCAweGJjLCAweDhmLCAweDMzLCAweGU2LCAweGY2LCAweDA5LAorCQkweDdjLCAweDhlLCAweDA1LCAweDE5LCAweDBkLCAweGYxLCAweGI2LCAweGNjLAorCQkweGYzLCAweDAyLCAweDIxLCAweDkwLCAweDI1LCAweGVjLCAweGVkLCAweDBlIH07CisJc3RhdGljIGNvbnN0IHU4IHJhbmRvbVtdIF9faW5pdGNvbnN0ID0geworCQkweDk1LCAweGI3LCAweGYxLCAweDdlLCAweDk4LCAweDAyLCAweGQzLCAweDU3LAorCQkweDczLCAweDkyLCAweGM2LCAweGE5LCAweGMwLCAweDgwLCAweDgzLCAweGI2LAorCQkweDdkLCAweGQxLCAweDI5LCAweDIyLCAweDY1LCAweGI1LCAweGY0LCAweDJkLAorCQkweDIzLCAweDdmLCAweDFjLCAweDU1LCAweGJiLCAweDliLCAweDEwLCAweGJmLAorCQkweGNmLCAweGQ4LCAweDJjLCAweDc3LCAweGEzLCAweDc4LCAweGI4LCAweDI2LAorCQkweDZhLCAweDAwLCAweDk5LCAweDE0LCAweDNiLCAweDNjLCAweDJkLCAweDY0LAorCQkweDYxLCAweDFlLCAweGVlLCAweGI2LCAweDlhLCAweGNkLCAweGMwLCAweDU1LAorCQkweDk1LCAweDdjLCAweDEzLCAweDllLCAweDhiLCAweDE5LCAweDBjLCAweDdhLAorCQkweDA2LCAweDk1LCAweDVmLCAweDJjLCAweDc5LCAweDdjLCAweDI3LCAweDc4LAorCQkweGRlLCAweDk0LCAweDAzLCAweDk2LCAweGE1LCAweDAxLCAweGY0LCAweDBlLAorCQkweDkxLCAweDM5LCAweDZhLCAweGNmLCAweDhkLCAweDdlLCAweDQ1LCAweGViLAorCQkweGRiLCAweGI1LCAweDNiLCAweGJmLCAweDhjLCAweDk3LCAweDUyLCAweDMwLAorCQkweGQyLCAweGYwLCAweGZmLCAweDkxLCAweDA2LCAweGM3LCAweDYxLCAweDE5LAorCQkweGFlLCAweDQ5LCAweDhlLCAweDdmLCAweGJjLCAweDAzLCAweGQ5LCAweDBmLAorCQkweDhlLCAweDRjLCAweDUxLCAweDYyLCAweDdhLCAweGVkLCAweDVjLCAweDhkLAorCQkweDQyLCAweDYzLCAweGQ1LCAweGQyLCAweGI5LCAweDc4LCAweDg3LCAweDNhLAorCQkweDBkLCAweGU1LCAweDk2LCAweGVlLCAweDZkLCAweGM3LCAweGY3LCAweGMyLAorCQkweDllLCAweDM3LCAweGVlLCAweGU4LCAweGIzLCAweDRjLCAweDkwLCAweGRkLAorCQkweDFjLCAweGY2LCAweGE5LCAweGRkLCAweGIyLCAweDJiLCAweDRjLCAweGJkLAorCQkweDA4LCAweDZiLCAweDE0LCAweGIzLCAweDVkLCAweGU5LCAweDNkLCAweGEyLAorCQkweGQ1LCAweGNiLCAweDE4LCAweDA2LCAweDY5LCAweDhjLCAweGJkLCAweDdiLAorCQkweGJiLCAweDY3LCAweGJmLCAweGUzLCAweGQzLCAweDFmLCAweGQyLCAweGQxLAorCQkweGRiLCAweGQyLCAweGExLCAweGUwLCAweDU4LCAweGEzLCAweGViLCAweDk5LAorCQkweGQ3LCAweGU1LCAweDFmLCAweDFhLCAweDkzLCAweDhlLCAweGVkLCAweDVlLAorCQkweDFjLCAweDFkLCAweGUyLCAweDNhLCAweDZiLCAweDQzLCAweDQ1LCAweGQzLAorCQkweDE5LCAweDE0LCAweDA5LCAweGY5LCAweDJmLCAweDM5LCAweGIzLCAweDY3LAorCQkweDBkLCAweDhkLCAweGJmLCAweGI2LCAweDM1LCAweGQ4LCAweGU2LCAweGEzLAorCQkweDY5LCAweDMyLCAweGQ4LCAweDEwLCAweDMzLCAweGQxLCAweDQ0LCAweDhkLAorCQkweDYzLCAweGI0LCAweDAzLCAweGRkLCAweGY4LCAweDhlLCAweDEyLCAweDFiLAorCQkweDZlLCAweDgxLCAweDlhLCAweGMzLCAweDgxLCAweDIyLCAweDZjLCAwe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QpLChzKSwobikpICE9IDApIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTSUdTRUdWOyBcCi0gICAgICAgIH0gd2hpbGUgKDApCi0KLSNkZWZpbmUgbWF0aGVtdV9jb3B5X3RvX3VzZXIoZCwgcywgbikgXAotICAgICAgICBkbyB7IFwKLSAgICAgICAgICAgICAgICBpZiAoY29weV90b191c2VyKChkKSwocyksKG4pKSAhPSAwKSBcCi0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU0lHU0VHVjsgXAotICAgICAgICB9IHdoaWxlICgwKQotCi1zdGF0aWMgdm9pZCBkaXNwbGF5X2VtdWxhdGlvbl9ub3RfaW1wbGVtZW50ZWQoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGNoYXIgKmluc3RyKQotewotICAgICAgICBfX3UxNiAqbG9jYXRpb247Ci0gICAgICAgIAotI2lmZGVmIENPTkZJR19TWVNDVEwKLSAgICAgICAgaWYoc3lzY3RsX2llZWVfZW11bGF0aW9uX3dhcm5pbmdzKQotI2VuZGlmCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBsb2NhdGlvbiA9IChfX3UxNiAqKShyZWdzLT5wc3cuYWRkci1TMzkwX2xvd2NvcmUucGdtX2lsYyk7Ci0gICAgICAgICAgICAgICAgcHJpbnRrKCIlcyBpZWVlIGZwdSBpbnN0cnVjdGlvbiBub3QgZW11bGF0ZWQgIgotICAgICAgICAgICAgICAgICAgICAgICAicHJvY2VzcyBuYW1lOiAlcyBwaWQ6ICVkIFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgaW5zdHIsIGN1cnJlbnQtPmNvbW0sIGN1cnJlbnQtPnBpZCk7Ci0gICAgICAgICAgICAgICAgcHJpbnRrKCIlcydzIFBTVzogICAgJTA4bHggJTA4bHhcbiIsIGluc3RyLAotICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgbG9uZykgcmVncy0+cHN3Lm1hc2ssCi0gICAgICAgICAgICAgICAgICAgIC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gaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCi0gICAgICAgICAqLwotICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKLSAgICAgICAgcmV0dXJuIDA7Ci19Ci0KLS8qIENvbXBhcmUgZG91YmxlICovCi1zdGF0aWMgaW50IGVtdV9jZGJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKLSAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKLSAgICAgICAgaW50IElSOwotCi0gICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmQpOwotICAgICAgICBGUF9DTVBfRChJUiwgREEsIERCLCAzKTsKLSAgICAgICAgLyoKLSAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiwgSVIgPT0gMCBpZiBEQSA9PSBEQiwKLSAgICAgICAgICogSVIgPT0gMSBpZiBEQSA+IERCIGFuZCBJUiA9PSAzIGlmIHVub3JkZXJkZWQKLSAgICAgICAgICovCi0gICAgICAgIGVtdV9zZXRfQ0MocmVncywgKElSID09IC0xKSA/IDEgOiAoSVIgPT0gMSkgPyAyIDogSVIpOwotICAgICAgICByZXR1cm4gMDsKLX0KLQotLyogQ29tcGFyZSBkb3VibGUgKi8KLXN0YXRpYyBpbnQgZW11X2NkYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZG91YmxlICp2YWwpIHsKLSAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKLSAgICAgICAgaW50IElSOwotCi0gICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgdmFsKTsKLSAgICAgICAgRlBfQ01QX0QoSVIsIERBLCBEQiwgMyk7Ci0gICAgICAgIC8qCi0gICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCi0gICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCi0gICAgICAgICAqLwotICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKLSAgICAgICAgcmV0dXJuIDA7Ci19Ci0KLS8qIENvbXBhcmUgZmxvYXQgKi8KLXN0YXRpYyBpbnQgZW11X2NlYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgewotICAgICAgICBGUF9ERUNMX1MoU0EpOyBGUF9ERUNMX1MoU0IpOwotICAgICAgICBpbnQgSVI7Ci0KLSAgICAgICAgRlBfVU5QQUNLX1JBV19TUChTQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmYpOwotICAgICAgICBGUF9VTlBBQ0tfUkFXX1NQKFNCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZik7Ci0gICAgICAgIEZQX0NNUF9TKElSLCBTQSwgU0IsIDMpOwotICAgICAgICAvKgotICAgICAgICAgKiBJUiA9PSAtMSBpZiBEQSA8IERCLCBJUiA9PSAwIGlmIERBID09IERCLAotICAgICAgICAgKiBJUiA9PSAxIGlmIERBID4gREIgYW5kIElSID09IDMgaWYgdW5vcmRlcmRlZAotICAgICAgICAgKi8KLSAgICAgICAgZW11X3NldF9DQyhyZWdzLCAoSVIgPT0gLTEpID8gMSA6IChJUiA9PSAxKSA/IDIgOiBJUik7Ci0gIC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XS51aTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19RUChRQSwgJmN2dC5sZCk7Ci0gICAgICAgIGN2dC53LmhpZ2ggPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5XS51aTsKLSAgICAgICAgY3Z0LncubG93ID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeSsyXS51aTsKLSAgICAgICAgRlBfVU5QQUNLX1FQKFFCLCAmY3Z0LmxkKTsKLSAgICAgICAgRlBfQ01QX1EoSVIsIFFBLCBRQiwgMyk7Ci0gICAgICAgIC8qCi0gICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCi0gICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCi0gICAgICAgICAqLwotICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKLSAgICAgICAgaWYgKElSID09IDMpCi0gICAgICAgICAgICAgICAgRlBfU0VUX0VYQ0VQVElPTiAoRlBfRVhfSU5WQUxJRCk7Ci0gICAgICAgIHJldHVybiBfZmV4OwotfQotCi0vKiBDb21wYXJlIGFuZCBzaWduYWwgZG91YmxlICovCi1zdGF0aWMgaW50IGVtdV9rZGJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKLSAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKLSAgICAgICAgRlBfREVDTF9FWDsKLSAgICAgICAgaW50IElSOwotCi0gICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmQpOwotICAgICAgICBGUF9DTVBfRChJUiwgREEsIERCLCAzKTsKLSAgICAgICAgLyoKLSAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiwgSVIgPT0gMCBpZiBEQSA9PSBEQiwKLSAgICAgICAgICogSVIgPT0gMSBpZiBEQSA+IERCIGFuZCBJUiA9PSAzIGlmIHVub3JkZXJkZWQKLSAgICAgICAgICovCi0gICAgICAgIGVtdV9zZXRfQ0MocmVncywgKElSID09IC0xKSA/IDEgOiAoSVIgPT0gMSkgPyAyIDogSVIpOwotICAgICAgICBpZiAoSVIgPT0gMykKLSAgICAgICAgICAgICAgICBGUF9TRVRfRVhDRVBUSU9OIChGUF9FWF9JTlZBTElEKTsKLSAgICAgICAgcmV0dXJuIF9mZXg7Ci19Ci0KLS8qIENvbXBhcmUgYW5kIHNpZ25hbCBkb3VibGUgKi8KLXN0YXRpYyBpbnQgZW11X2tkYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZG91YmxlICp2YWwpIHsKLSAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKLSAgICAgICAgRlBfREVDTF9FWDsKLSAgICAgICAgaW50IElSOwotCi0gICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgdmFsKTsKLSAgICAgICAgRlBfQ01QX0QoSVIsIERBLCBEQiwgMyk7Ci0gICAgICAgIC8qCi0gICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCi0gICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCi0gICAgICAgICAqLwotICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKLSAgICAgICAgaWYgKElSID09IDMpCi0gICAgICAgICAgICAgICAgRlBfU0VUX0VYQ0VQVElPTiAoRlBfRVhfSU5WQUxJRCk7Ci0gICAgICAgIHJldHVybiBfZmV4OwotfQotCi0vKiBDb21wYXJlIGFuZCBzaWduYWwgZmxvYXQgKi8KLXN0YXRpYyBpbnQgZW11X2tlYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgewotICAgICAgICBGUF9ERUNMX1MoU0EpOyBGUF9ERUNMX1MoU0IpOwotICAgICAgICBGUF9ERUNMX0VYOwotICAgICAgICBpbnQgSVI7Ci0KLSAgICAgICAgRlBfVU5QQUNLX1JBV19TUChTQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmYpOwotICAgICAgICBGUF9VTlBBQ0tfUkFXX1NQKFNCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZik7Ci0gICAgICAgIEZQX0NNUF9TKElSLCBTQSwgU0IsIDMpOwotICAgICAgICAvKgotICAgICAgICAgKiBJUiA9PSAtMSBpZiBEQSA8IERCLCBJUiA9PSAwIGlmIERBID09IERCLAotICAgICAgICAgKiBJUiA9PSAxIGlmIERBID4gREIgYW5kIElSID09IDMgaWYgdW5vcmRlcmRlZAotICAgICAgICAgKi8KLSAgICAgICAgZW11X3NldF9DQyhyZWdzLCAoSVIgPT0gLTEpID8gMSA6IChJUiA9PSAxKSA/IDIgOiBJUik7Ci0gICAgICAgIGlmIChJUiA9PSAzKQotICAgICAgICAgICAgICAgIEZQX1NFVF9FWENFUFRJT04gKEZQX0VYX0lOVkFMSUQpOwotICAgICAgICByZXR1cm4gX2ZleDsKLX0KLQotLyogQ29tcGFyZSBhbmQgc2lnbmFsIGZsb2F0ICovCi1zdGF0aWMgaW50IGVtdV9rZWIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGZsb2F0ICp2YWwpIHsKLSAgICAgICAgRlBfRE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50IHJ4LCBpbnQgcnksIGludCByeikgewotICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOyBGUF9ERUNMX0QoREMpOyBGUF9ERUNMX0QoRFIpOwotICAgICAgICBGUF9ERUNMX0VYOwotICAgICAgICBpbnQgbW9kZTsKLQotCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOwotICAgICAgICBGUF9VTlBBQ0tfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgICAgICAgRlBfVU5QQUNLX0RQKERCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZCk7Ci0gICAgICAgIEZQX1VOUEFDS19EUChEQywgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnpdLmQpOwotICAgICAgICBGUF9NVUxfRChEUiwgREEsIERCKTsKLSAgICAgICAgRlBfU1VCX0QoRFIsIERSLCBEQyk7Ci0JRlBfUEFDS19EUCgmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyel0uZCwgRFIpOwotICAgICAgICByZXR1cm4gX2ZleDsKLX0KLQotLyogTXVsdGlwbHkgYW5kIHN1YnRyYWN0IGRvdWJsZSAqLwotc3RhdGljIGludCBlbXVfbXNkYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZG91YmxlICp2YWwsIGludCByeikgewotICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOyBGUF9ERUNMX0QoREMpOyBGUF9ERUNMX0QoRFIpOwotICAgICAgICBGUF9ERUNMX0VYOwotICAgICAgICBpbnQgbW9kZTsKLQotCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOwotICAgICAgICBGUF9VTlBBQ0tfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKLSAgIC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9sY2VicixbMHgwNF0gPSBlbXVfbGRlYnIsWzB4MDVdID0gZW11X2x4ZGJyLAotICAgICAgICAgICAgICAgIFsweDA2XSA9IGVtdV9seGVicixbMHgwN10gPSBlbXVfbXhkYnIsWzB4MDhdID0gZW11X2tlYnIsCi0gICAgICAgICAgICAgICAgWzB4MDldID0gZW11X2NlYnIsIFsweDBhXSA9IGVtdV9hZWJyLCBbMHgwYl0gPSBlbXVfc2ViciwKLSAgICAgICAgICAgICAgICBbMHgwY10gPSBlbXVfbWRlYnIsWzB4MGRdID0gZW11X2RlYnIsIFsweDBlXSA9IGVtdV9tYWViciwKLSAgICAgICAgICAgICAgICBbMHgwZl0gPSBlbXVfbXNlYnIsWzB4MTBdID0gZW11X2xwZGJyLFsweDExXSA9IGVtdV9sbmRiciwgCi0gICAgICAgICAgICAgICAgWzB4MTJdID0gZW11X2x0ZGJyLFsweDEzXSA9IGVtdV9sY2RicixbMHgxNF0gPSBlbXVfc3FlYnIsCi0gICAgICAgICAgICAgICAgWzB4MTVdID0gZW11X3NxZGJyLFsweDE2XSA9IGVtdV9zcXhicixbMHgxN10gPSBlbXVfbWVlYnIsCi0gICAgICAgICAgICAgICAgWzB4MThdID0gZW11X2tkYnIsIFsweDE5XSA9IGVtdV9jZGJyLCBbMHgxYV0gPSBlbXVfYWRiciwKLSAgICAgICAgICAgICAgICBbMHgxYl0gPSBlbXVfc2RiciwgWzB4MWNdID0gZW11X21kYnIsIFsweDFkXSA9IGVtdV9kZGJyLCAgCi0gICAgICAgICAgICAgICAgWzB4MWVdID0gZW11X21hZGJyLFsweDFmXSA9IGVtdV9tc2RicixbMHg0MF0gPSBlbXVfbHB4YnIsCi0gICAgICAgICAgICAgICAgWzB4NDFdID0gZW11X2xueGJyLFsweDQyXSA9IGVtdV9sdHhicixbMHg0M10gPSBlbXVfbGN4YnIsCi0gICAgICAgICAgICAgICAgWzB4NDRdID0gZW11X2xlZGJyLFsweDQ1XSA9IGVtdV9sZHhicixbMHg0Nl0gPSBlbXVfbGV4YnIsCi0gICAgICAgICAgICAgICAgWzB4NDddID0gZW11X2ZpeGJyLFsweDQ4XSA9IGVtdV9reGJyLCBbMHg0OV0gPSBlbXVfY3hiciwgIAotICAgICAgICAgICAgICAgIFsweDRhXSA9IGVtdV9heGJyLCBbMHg0Yl0gPSBlbXVfc3hiciwgWzB4NGNdID0gZW11X214YnIsCi0gICAgICAgICAgICAgICAgWzB4NGRdID0gZW11X2R4YnIsIFsweDUzXSA9IGVtdV9kaWVicixbMHg1N10gPSBlbXVfZmllYnIsCi0gICAgICAgICAgICAgICAgWzB4NWJdID0gZW11X2RpZGJyLFsweDVmXSA9IGVtdV9maWRicixbMHg4NF0gPSBlbXVfc2ZwYywKLSAgICAgICAgICAgICAgICBbMHg4Y10gPSBlbXVfZWZwYywgWzB4OTRdID0gZW11X2NlZmJyLFsweDk1XSA9IGVtdV9jZGZiciwgCi0gICAgICAgICAgICAgICAgWzB4OTZdID0gZW11X2N4ZmJyLFsweDk4XSA9IGVtdV9jZmVicixbMHg5OV0gPSBlbXVfY2ZkYnIsCi0gICAgICAgICAgICAgICAgWzB4OWFdID0gZW11X2NmeGJyCi0gICAgICAgIH07Ci0KLSAgICAgICAgc3dpdGNoIChmb3JtYXRfdGFibGVbb3Bjb2RlWzFdXSkgewotICAgICAgICBjYXNlIDE6IC8qIFJSRSBmb3JtYXQsIGxvbmcgZG91YmxlIG9wZXJhdGlvbiAqLwotICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAweDIyKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbM10gPj4gNCkgJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgMjogLyogUlJFIGZvcm1hdCwgZG91YmxlIG9wZXJhdGlvbiAqLwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSAzOiAvKiBSUkUgZm9ybWF0LCBmbG9hdCBvcGVyYXRpb24gKi8KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKG9wY29kZVszXSAmIDE1KTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgNDogLyogUlJGIGZvcm1hdCwgbG9uZyBkb3VibGUgb3BlcmF0aW9uICovCi0gICAgICAgICAgICAgICAgaWYgKG9wY29kZVszXSAmIDB4MjIpCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKChvcGNvZGVbM10gPj4gNCkgJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4gNCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbM10gPj4gNCkgJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgNTogLyogUlJGIGZvcm1hdCwgZG91YmxlIG9wZXJhdGlvbiAqLwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbMl0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUsIG9wY29kZVsyXSA+PiA0KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbMl0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSA2OiAvKiBSUkYgZm9ybWF0LCBmbG9hdCBvcGVyYXRpb24gKi8KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzJdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Uob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4gNCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzJdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKG9wY29kZVszXSAmIDE1KTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgNzogLyogUlJFIGZvcm1hdCwgY3hmYnIgaW5zdHJ1Y3Rpb24gKi8KLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMHgyMCkKLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgoKG9wY29kZVszXSA+PiA0KSAmIDE1KSArIDIpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSA4OiAvKiBSUkUgZm9ybWF0LCBjZGZiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSA5OiAvKiBSUkUgZm9ybWF0LCBjZWZiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSAxMDogLyogUlJGIGZvcm1hdCwgY2Z4YnIgaW5zdHJ1Y3Rpb24gKi8KLSAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsyXSAmIDEyOCkgPT0gMTI4IHx8IChvcGNvZGVbMl0gJiA5NikgPT0gMzIpCi0JCQkvKiBtYXNrIG9mIHsgMiwzLDgtMTUgfSBpcyBpbnZhbGlkICovCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAyKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4g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i0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4gNCk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDEzOiAvKiBSUkUgZm9ybWF0LCBsZHhiciAmIG1keGJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogZG91YmxlIHN0b3JlIGJ1dCBsb25nIGRvdWJsZSBsb2FkICovCi0gICAgICAgICAgICAgICAgaWYgKG9wY29kZVszXSAmIDB4MjApCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICAmIDE1KTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDE0OiAvKiBSUkUgZm9ybWF0LCBsZHhiciAmIG1keGJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogZmxvYXQgc3RvcmUgYnV0IGxvbmcgZG91YmxlIGxvYWQgKi8KLSAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMHgyMCkKLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZShvcGNvZGVbM10gICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbM10gPj4gNCkgJiAxNSkgKyAyKTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgMTU6IC8qIFJSRSBmb3JtYXQsIGxkZWJyICYgbWRlYnIgaW5zdHJ1Y3Rpb24gKi8KLSAgICAgICAgICAgICAgICAvKiBmbG9hdCBzdG9yZSBidXQgZG91YmxlIGxvYWQgKi8KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKG9wY29kZVszXSAgJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDE2OiAvKiBSUkUgZm9ybWF0LCBsZHhiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGxvbmcgZG91YmxlIHN0b3JlIGJ1dCBkb3VibGUgbG9hZCAqLwotICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAyKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDE3OiAvKiBSUkUgZm9ybWF0LCBsZHhiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGxvbmcgZG91YmxlIHN0b3JlIGJ1dCBmbG9hdCBsb2FkICovCi0gICAgICAgICAgICAgICAgaWYgKG9wY29kZVszXSAmIDIpCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdICYgMTUpICsgMik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMTg6IC8qIFJSRSBmb3JtYXQsIGxlZGJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogZG91YmxlIHN0b3JlIGJ1dCBmbG9hdCBsb2FkICovCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIDE5OiAvKiBSUkUgZm9ybWF0LCBlZnBjICYgc2ZwYyBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGRlZmF1bHQ6IC8qIGludmFsaWQgb3BlcmF0aW9uICovCi0gICAgICAgICAgICAgICAgcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgfQotCWlmIChfZmV4ICE9IDApIHsKLQkJY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjIHw9IF9mZXg7Ci0JCWlmIChjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAoX2ZleCA8PCA4KSkKLQkJCXJldHVybiBTSUdGUEU7Ci0JfQotCXJldHVybiAwOwotfQotCi1zdGF0aWMgdm9pZCogY2FsY19hZGRyKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByYiwgaW50IGRpc3ApCi17Ci0gICAgICAgIGFkZHJfdCBhZGRyOwotCi0gICAgICAgIHJ4ICY9IDE1OwotICAgICAgICByYiAmPSAxNTsKLSAgICAgICAgYWRkciA9IGRpc3AgJiAweGZmZjsKLSAgICAgICAgYWRkciArPSAocnggIT0gMCkgPyByZWdzLT5ncHJzW3J4XSA6IDA7ICAvKiArIGluZGV4ICovCi0gICAgICAgIGFkZHIgKz0gKHJiICE9IDApID8gcmVncy0+Z3Byc1tyYl0gOiAwOyAgLyogKyBiYXNlICAqLwotICAgICAgICByZXR1cm4gKHZvaWQqKSBhZGRyOwotfQotICAgIAotaW50IG1hdGhfZW11X2VkKF9fdTggKm9wY29kZSwgc3RydWN0IHB0X3JlZ3MgKiByZWdzKSB7Ci0gICAgICAgIGludCBfZmV4ID0gMDsKLQotICAgICAgICBzdGF0aWMgY29uc3QgX191OCBmb3JtYXRfdGFibGVbMjU2XSA9IHsKLSAgICAgICAgICAgICAgICBbMHgwNF0gPSAweDA2LFsweDA1XSA9IDB4MDUsWzB4MDZdID0gMHgwNyxbMHgwN10gPSAweDA1LAotCQlbMHgwOF0gPSAweDAyLFsweDA5XSA9IDB4MDIsWzB4MGFdID0gMHgwMixbMHgwYl0gPSAweDAyLAotCQlbMHgwY10gPSAweDA2LFsweDBkXSA9IDB4MDIsWzB4MGVdID0gMHgwNCxbMHgwZl0gPSAweDA0LAotICAgICAgICAgICAgICAgIFsweDEwXSA9IDB4MDgsWzB4MTFdID0gMHgwOSxbMHgxMl0gPSAweDBhLFsweDE0XSA9IDB4MDIsCi0JCVsweDE1XSA9IDB4MDEsWzB4MTddID0gMHgwMixbMHgxOF0gPSAweDAxLFsweDE5XSA9IDB4MDEsCi0JCVsweDFhXSA9IDB4MDEsWzB4MWJdID0gMHgwMSxbMHgxY10gPSAweDAxLFsweDFkXSA9IDB4MDEsCi0gICAgICAgICAgICAgICAgWzB4MWVdID0gMHgwMyxbMHgxZl0gPSAweDAzLAotICAgICAgICB9OwotICAgICAgICBzdGF0aWMgY29uc3Qgdm9pZCAqanVtcF90YWJsZVtdPSB7Ci0gICAgICAgICAgICAgICAgWzB4MDRdID0gZW11X2xkZWIsWzB4MDVdID0gZW11X2x4ZGIsWzB4MDZdID0gZW11X2x4ZWIsCi0gICAgICAgICAgICAgICAgWzB4MDddID0gZW11X214ZGIsWzB4MDhdID0gZW11X2tlYiwgWzB4MDldID0gZW11X2NlYiwKLSAgICAgICAgICAgICAgICBbMHgwYV0gPSBlbXVfYWViLCBbMHgwYl0gPSBlbXVfc2ViLCBbMHgwY10gPSBlbXVfbWRlYiwKLSAgICAgICAgICAgICAgICBbMHgwZF0gPSBlbXVfZGViLCBbMHgwZV0gPSBlbXVfbWFlYixbMHgwZl0gPSBlbXVfbXNlYiwKLSAgICAgICAgICAgICAgICBbMHgxMF0gPSBlbXVfdGNlYixbMHgxMV0gPSBlbXVfdGNkYixbMHgxMl0gPSBlbXVfdGN4YiwKLSAgICAgICAgICAgICAgICBbMHgxNF0gPSBlbXVfc3FlYixbMHgxNV0gPSBlbXVfc3FkYixbMHgxN10gPSBlbXVfbWVlYiwKLSAgICAgICAgICAgICAgICBbMHgxOF0gPSBlbXVfa2RiLCBbMHgxOV0gPSBlbXVfY2RiLCBbMHgxYV0gPSBlbXVfYWRiLAotICAgICAgICAgICAgICAgIFsweDFiXSA9IGVtdV9zZGIsIFsweDFjXSA9IGVtdV9tZGIsIFsweDFkXSA9IGVtdV9kZGIsCi0gICAgICAgICAgICAgICAgWzB4MWVdID0gZW11X21hZGIsWzB4MWZdID0gZW11X21zZGIKLSAgICAgICAgfTsKLQotICAgICAgICBzd2l0Y2ggKGZvcm1hdF90YWJsZVtvcGNvZGVbNV1dKSB7Ci0gICAgICAgIGNhc2UgMTogLyogUlhFIGZvcm1hdCwgZG91YmxlIGNvbnN0YW50ICovIHsKLSAgICAgICAgICAgICAgICBfX3U2NCAqZHhiLCB0ZW1wOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLQotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKLSAgICAgICAgICAgICAgICBkeGIgPSAoX191NjQgKikgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOwotICAgICAgICAgICAgICAgIG1hdGhlbXVfY29weV9mcm9tX3VzZXIoJnRlbXAsIGR4YiwgOCk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGRvdWJsZSAqKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGRvdWJsZSAqKSAmdGVtcCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgMjogLyogUlhFIGZvcm1hdCwgZmxvYXQgY29uc3RhbnQgKi8gewotICAgICAgICAgICAgICAgIF9fdTMyICpkeGIsIHRlbXA7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3UzMiAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgbWF0aGVtdV9nZXRfdXNlcih0ZW1wLCBkeGIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBmbG9hdCAqKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGZsb2F0ICopICZ0ZW1wKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSAzOiAvKiBSWEYgZm9ybWF0LCBkb3VibGUgY29uc3RhbnQgKi8gewotICAgICAgICAgICAgICAgIF9fdTY0ICpkeGIsIHRlbXA7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzRdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTY0ICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKLSAgICAgICAgICAgICAgICBtYXRoZW11X2NvcHlfZnJvbV91c2VyKCZ0ZW1wLCBkeGIsIDgpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBkb3VibGUgKiwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGRvdWJsZSAqKSAmdGVtcCwgb3Bjb2RlWzRdID4+IDQpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDQ6IC8qIFJYRiBmb3JtYXQsIGZsb2F0IGNvbnN0YW50ICovIHsKLSAgICAgICAgICAgICAgICBfX3UzMiAqZHhiLCB0ZW1wOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLQotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVs0XSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3UzMiAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgbWF0aGVtdV9nZXRfdXNlcih0ZW1wLCBkeGIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBmbG9hdCAqLCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZmxvYXQgKikgJnRlbXAsIG9wY29kZVs0XSA+PiA0KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbNF0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSA1OiAvKiBSWEUgZm9ybWF0LCBkb3VibGUgY29uc3RhbnQgKi8KLSAgICAgICAgICAgICAgICAvKiBzdG9yZSBkb3VibGUgYW5kIGxvYWQgbG9uZyBkb3VibGUgKi8gCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBfX3U2NCAqZHhiLCB0ZW1wOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLSAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsxXSA+PiA0KSAmIDB4MjApCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKLSAgICAgICAgICAgICAgICBkeGIgPSAoX191NjQgKikgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOwotICAgICAgICAgICAgICAgIG1hdGhlbXVfY29weV9mcm9tX3VzZXIoJnRlbXAsIGR4YiwgOCk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGRvdWJsZSAqKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGRvdWJsZSAqKSAmdGVtcCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbMV0gPj4gNCkgJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDY6IC8qIFJYRSBmb3JtYXQsIGZsb2F0IGNvbnN0YW50ICovCi0gICAgICAgICAgICAgICAgLyogc3RvcmUgZmxvYXQgYW5kIGxvYWQgZG91YmxlICovIAotICAgICAgICB7Ci0gICAgICAgICAgICAgICAgX191MzIgKmR4YiwgdGVtcDsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3UzMiAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgbWF0aGVtdV9nZXRfdXNlcih0ZW1wLCBkeGIpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBmbG9hdCAqKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGZsb2F0ICopICZ0ZW1wKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSA3OiAvKiBSWEUgZm9ybWF0LCBmbG9hdCBjb25zdGFudCAqLwotICAgICAgICAgICAgICAgIC8qIHN0b3JlIGZsb2F0IGFuZCBsb2FkIGxvbmcgZG91YmxlICovIAotICAgICAgICB7Ci0gICAgICAgICAgICAgICAgX191MzIgKmR4YiwgdGVtcDsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0gICAgICAgICAgICAgICAgaWYgKChvcGNvZGVbMV0gPj4gNCkgJiAweDIwKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTMyICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKLSAgICAgICAgICAgICAgICBtYXRoZW11X2dldF91c2VyKHRlbXAsIGR4Yik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGZsb2F0ICopKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZmxvYXQgKikgJnRlbXApOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzFdID4+IDQpICYgMTUpICsgMik7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSA4OiAvKiBSWEUgZm9ybWF0LCBSWCBhZGRyZXNzIHVzZWQgYXMgaW50IHZhbHVlICovIHsKLSAgICAgICAgICAgICAgICBfX3U2NCBkeGI7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3U2NCkgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBsb25nKSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgZHhiKTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDk6IC8qIFJYRSBmb3JtYXQsIFJYIGFkZHJlc3MgdXNlZCBhcyBpbnQgdmFsdWUgKi8gewotICAgICAgICAgICAgICAgIF9fdTY0IGR4YjsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTY0KSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGxvbmcpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCBkeGIpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgMTA6IC8qIFJYRSBmb3JtYXQsIFJYIGFkZHJlc3MgdXNlZCBhcyBpbnQgdmFsdWUgKi8gewotICAgICAgICAgICAgICAgIF9fdTY0IGR4YjsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0KLSAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsxXSA+PiA0KSAmIDIpCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICA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VHR0VSKQogLyogTG9jYWwgcHJvdG90eXBlcyAqLwogc3RhdGljIHZvaWQgYWNwaV9yc19vdXRfc3RyaW5nKGNoYXIgKnRpdGxlLCBjaGFyICp2YWx1ZSk7CiAKQEAgLTgwLDYgKzgzLDExNiBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3JzX2R1bXBfcmVzb3VyY2VfbGlzdAorICoKKyAqIFBBUkFNRVRFUlM6ICByZXNvdXJjZV9saXN0ICAgICAgIC0gUG9pbnRlciB0byBhIHJlc291cmNlIGRlc2NyaXB0b3IgbGlzdAorICoKKyAqIFJFVFVSTjogICAgICBOb25lCisgKgorICogREVTQ1JJUFRJT046IERpc3BhdGNoZXMgdGhlIHN0cnVjdHVyZSB0byB0aGUgY29ycmVjdCBkdW1wIHJvdXRpbmUuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordm9pZCBhY3BpX3JzX2R1bXBfcmVzb3VyY2VfbGlzdChzdHJ1Y3QgYWNwaV9yZXNvdXJjZSAqcmVzb3VyY2VfbGlzdCkKK3sKKwl1MzIgY291bnQgPSAwOworCXUzMiB0eXBlOworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogQ2hlY2sgaWYgZGVidWcgb3V0cHV0IGVuYWJsZWQgKi8KKworCWlmICghQUNQSV9JU19ERUJVR19FTkFCTEVEKEFDUElfTFZfUkVTT1VSQ0VTLCBfQ09NUE9ORU5UKSkgeworCQlyZXR1cm47CisJfQorCisJLyogV2FsayBsaXN0IGFuZCBkdW1wIGFsbCByZXNvdXJjZSBkZXNjcmlwdG9ycyAoRU5EX1RBRyB0ZXJtaW5hdGVzKSAqLworCisJZG8geworCQlhY3BpX29zX3Bya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cmVzb3VyY2VfZGlzcGF0Y2gKKwkJCQkJCVt0eXBlXSk7CisJCX0KKworCQkvKiBQb2ludCB0byB0aGUgbmV4dCByZXNvdXJjZSBzdHJ1Y3R1cmUgKi8KKworCQlyZXNvdXJjZV9saXN0ID0gQUNQSV9ORVhUX1JFU09VUkNFKHJlc291cmNlX2xpc3QpOworCisJCS8qIEV4aXQgd2hlbiBFTkRfVEFHIGRlc2NyaXB0b3IgaXMgcmVhY2hlZCAqLworCisJfSB3aGlsZSAodHlwZSAhPSBBQ1BJX1JFU09VUkNFX1RZUEVfRU5EX1RBRyk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9pcnFfbGlzdAorICoKKyAqIFBBUkFNRVRFUlM6ICByb3V0ZV90YWJsZSAgICAgLSBQb2ludGVyIHRvIHRoZSByb3V0aW5nIHRhYmxlIHRvIGR1bXAuCisgKgorICogUkVUVVJOOiAgICAgIE5vbmUKKyAqCisgKiBERVNDUklQVElPTjogUHJpbnQgSVJRIHJvdXRpbmcgdGFibGUKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCit2b2lkIGFjcGlfcnNfZHVtcF9pcnFfbGlzdCh1OCAqcm91dGVfdGFibGUpCit7CisJc3RydWN0IGFjcGlfcGNpX3JvdXRpbmdfdGFibGUgKnBydF9lbGVtZW50OworCXU4IGNvdW50OworCisJQUNQSV9GVU5DVElPTl9FTlRSWSgpOworCisJLyogQ2hlY2sgaWYgZGVidWcgb3V0cHV0IGVuYWJsZWQgKi8KKworCWlmICghQUNQSV9JU19ERUJVR19FTkFCTEVEKEFDUElfTFZfUkVTT1VSQ0VTLCBfQ09NUE9ORU5UKSkgeworCQlyZXR1cm47CisJfQorCisJcHJ0X2VsZW1lbnQgPSBBQ1BJX0NBU1RfUFRSKHN0cnVjdCBhY3BpX3BjaV9yb3V0aW5nX3RhYmxlLCByb3V0ZV90YWJsZSk7CisKKwkvKiBEdW1wIGFsbCB0YWJsZSBlbGVtZW50cywgRXhpdCBvbiB6ZXJvIGxlbmd0aCBlbGVtZW50ICovCisKKwlmb3IgKGNvdW50ID0gMDsgcHJ0X2VsZW1lbnQtPmxlbmd0aDsgY291bnQrKykgeworCQlhY3BpX29zX3ByaW50ZigiXG5bJTAyWF0gUENJIElSUSBSb3V0aW5nIFRhYmxlIFBhY2thZ2VcbiIsCisJCQkgICAgICAgY291bnQpOworCQlhY3BpX3JzX2R1bXBfZGVzY3JpcHRvcihwcnRfZWxlbWVudCwgYWNwaV9yc19kdW1wX3BydCk7CisKKwkJcHJ0X2VsZW1lbnQgPSBBQ1BJX0FERF9QVFIoc3RydWN0IGFjcGlfcGNpX3JvdXRpbmdfdGFibGUsCisJCQkJCSAgIHBydF9lbGVtZW50LCBwcnRfZWxlbWVudC0+bGVuZ3RoKTsKKwl9Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgogICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9kZXNjcmlwdG9yCiAgKgogICogUEFSQU1FVEVSUzogIHJlc291cmNlICAgICAgICAgICAgLSBCdWZmZXIgY29udGFpbmluZyB0aGUgcmVzb3VyY2UKQEAgLTM1NywxMTYgKzQ3MCw2IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogRlVOQ1RJT046ICAgIGFjcGlfcnNfZHVtcF9yZXNvdXJjZV9saXN0Ci0gKgotICogUEFSQU1FVEVSUzogIHJlc291cmNlX2xpc3QgICAgICAgLSBQb2ludGVy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VEFHKTsKLX0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqCi0gKiBGVU5DVElPTjogICAgYWNwaV9yc19kdW1wX2lycV9saXN0Ci0gKgotICogUEFSQU1FVEVSUzogIHJvdXRlX3RhYmxlICAgICAtIFBvaW50ZXIgdG8gdGhlIHJvdXRpbmcgdGFibGUgdG8gZHVtcC4KLSAqCi0gKiBSRVRVUk46ICAgICAgTm9uZQotICoKLSAqIERFU0NSSVBUSU9OOiBQcmludCBJUlEgcm91dGluZyB0YWJsZQotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLXZvaWQgYWNwaV9yc19kdW1wX2lycV9saXN0KHU4ICogcm91dGVfdGFibGUpCi17Ci0Jc3RydWN0IGFjcGlfcGNpX3JvdXRpbmdfdGFibGUgKnBydF9lbGVtZW50OwotCXU4IGNvdW50OwotCi0JQUNQSV9GVU5DVElPTl9FTlRSWSgpOwotCi0JLyogQ2hlY2sgaWYgZGVidWcgb3V0cHV0IGVuYWJsZWQgKi8KLQotCWlmICghQUNQSV9JU19ERUJVR19FTkFCTEVEKEFDUElfTFZfUkVTT1VSQ0VTLCBfQ09NUE9ORU5UKSkgewotCQlyZXR1cm47Ci0JfQotCi0JcHJ0X2VsZW1lbnQgPSBBQ1BJX0NBU1RfUFRSKHN0cnVjdCBhY3BpX3BjaV9yb3V0aW5nX3RhYmxlLCByb3V0ZV90YWJsZSk7Ci0KLQkvKiBEdW1wIGFsbCB0YWJsZSBlbGVtZW50cywgRXhpdCBvbiB6ZXJvIGxlbmd0aCBlbGVtZW50ICovCi0KLQlmb3IgKGNvdW50ID0gMDsgcHJ0X2VsZW1lbnQtPmxlbmd0aDsgY291bnQrKykgewotCQlhY3BpX29zX3ByaW50ZigiXG5bJTAyWF0gUENJ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RPX1VJTlQodGFibGVfZGVzYy0+Ci0JCQkJCQkJICAgIGFkZHJlc3MpKSk7CisJCQkJCUFDUElfRk9STUFUX1VJTlQ2NCh0YWJsZV9kZXNjLT4KKwkJCQkJCQkgICBhZGRyZXNzKSkpOwogCQkJZ290byBpbnZhbGlkYXRlX2FuZF9leGl0OwogCQl9CiAJfQpAQCAtNDgzLDE5ICs0ODQsMjMgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBGVU5DVElPTjogICAgYWNwaV90Yl9nZXRfbmV4dF9yb290X2luZGV4CisgKiBGVU5DVElPTjogICAgYWNwaV90Yl9nZXRfbmV4dF90YWJsZV9kZXNjcmlwdG9yCiAgKgogICogUEFSQU1FVEVSUzogIHRhYmxlX2luZGV4ICAgICAgICAgLSBXaGVyZSB0YWJsZSBpbmRleCBpcyByZXR1cm5lZAorICogICAgICAgICAgICAgIHRhYmxlX2Rlc2MgICAgICAgICAgLSBXaGVyZSB0YWJsZSBkZXNjcmlwdG9yIGlzIHJldHVybmVkCiAgKgotICogUkVUVVJOOiAgICAgIFN0YXR1cyBhbmQgdGFibGUgaW5kZXguCisgKiBSRVRVUk46ICAgICAgU3RhdHVzIGFuZCB0YWJsZSBpbmRleC9kZXNjcmlwdG9yLgogICoKICAqIERFU0NSSVBUSU9OOiBBbGxvY2F0ZSBhIG5ldyBBQ1BJIHRhYmxlIGVudHJ5IHRvIHRoZSBnbG9iYWwgdGFibGUgbGlzdAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKLWFjcGlfc3RhdHVzIGFjcGlfdGJfZ2V0X25leHRfcm9vdF9pbmRleCh1MzIgKnRhYmxlX2luZGV4KQorYWNwaV9zdGF0dXMKK2FjcGlfdGJfZ2V0X25leHRfdGFibGV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0+YmRhZGRyKTsKKwkJc2V0X2JpdChIQ0lfUVVJUktfSU5WQUxJRF9CREFERFIsICZoZGV2LT5xdWlya3MpOworCX0KKworCWtmcmVlX3NrYihza2IpOworCisJcmV0dXJuIDA7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChidGludGVsX2NoZWNrX2JkYWRkcik7CisKK2ludCBidGludGVsX3NldF9iZGFkZHIoc3RydWN0IGhjaV9kZXYgKmhkZXYsIGNvbnN0IGJkYWRkcl90ICpiZGFkZHIpCit7CisJc3RydWN0IHNrX2J1ZmYgKnNrYjsKKwlpbnQgZXJyOworCisJc2tiID0gX19oY2lfY21kX3N5bmMoaGRldiwgMHhmYzMxLCA2LCBiZGFkZHIsIEhDSV9JTklUX1RJTUVPVVQpOworCWlmIChJU19FUlIoc2tiKSkgeworCQllcnIgPSBQVFJfRVJSKHNrYik7CisJCUJUX0VSUigiJXM6IENoYW5naW5nIEludGVsIGRldmljZSBhZGRyZXNzIGZhaWxlZCAoJWQpIiwKKwkJICAgICAgIGhkZXYtPm5hbWUsIGVycik7CisJCXJldHVybiBlcnI7CisJfQorCWtmcmVlX3NrYihza2IpOworCisJcmV0dXJuIDA7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChidGludGVsX3NldF9iZGFkZHIpOworCitNT0RVTEVfQVVUSE9SKCJNYXJjZWwgSG9sdG1hbm4gPG1hcmNlbEBob2x0bWFubi5vcmc+Iik7CitNT0RVTEVfREVTQ1JJUFRJT04oIkJsdWV0b290aCBzdXBwb3J0IGZvciBJbnRlbCBkZXZpY2VzIHZlciAiIFZFUlNJT04pOworTU9EVUxFX1ZFUlNJT04oVkVSU0lPTik7CitNT0RVTEVfTElDRU5TRSgiR1BMIik7CmRpZmYgLS1naXQgYS9kcml2ZXJzL2JsdWV0b290aC9idGludGVsLmggYi9kcml2ZXJzL2JsdWV0b290aC9idGludGVsLmgKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNGJkYTZhYgot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ib21hcF90aW1lci43IiwgInN5c19jayIsICJkc3Nfc3ljX2dmY2xrX2RpdiIpLAotCURUX0NMSygib21hcF90aW1lci44IiwgInN5c19jayIsICJkc3Nfc3ljX2dmY2xrX2RpdiIpLAorCURUX0NMSygiNGFlMTgwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgInN5c19jbGtpbiIpLAorCURUX0NMSygiNDgwMzIwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgInN5c19jbGtpbiIpLAorCURUX0NMSygiNDgwMzQwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgInN5c19jbGtpbiIpLAorCURUX0NMSygiNDgwMzYwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgInN5c19jbGtpbiIpLAorCURUX0NMSygiNDgwM2UwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgInN5c19jbGtpbiIpLAorCURUX0NMSygiNDgwODYwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgInN5c19jbGtpbiIpLAorCURUX0NMSygiNDgwODgwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgInN5c19jbGtpbiIpLAorCURUX0NMSygiNDAxMzgwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgImRzc19zeWNfZ2ZjbGtfZGl2IiksCisJRFRfQ0xLKCI0MDEzYTAwMC50aW1lciIsICJ0aW1lcl9zeXNfY2siLCAiZHNzX3N5Y19nZmNsa19kaXYiKSwKKwlEVF9DTEsoIjQwMTNjMDAwLnRpbWVyIiwgInRpbWVyX3N5c19jayIsICJkc3Nfc3ljX2dmY2xrX2RpdiIpLAorCURUX0NMSygiNDAxM2UwMDAudGltZXIiLCAidGltZXJfc3lzX2NrIiwgImRzc19zeWNfZ2ZjbGtfZGl2IiksCiAJeyAubm9kZV9uYW1lID0gTlVMTCB9LAogfTsKIApkaWZmIC0tZ2l0IGEvZHJpdmVycy9jbGsvdGkvY2xrLTd4eC5jIGIvZHJpdmVycy9jbGsvdGkvY2x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lc2MsIHNyYywgc3JjbGVuKTsKKyAgICB9IGVsc2UgeworICAgICAgICBpZiAoZGN0eC0+Ynl0ZXMpIHsKKyAgICAgICAgICAgIGlmIChkY3R4LT5ieXRlcyArIHNyY2xlbiA8IEdIQVNIX0RJR0VTVF9TSVpFKSB7CisgICAgICAgICAgICAgICAgbWVtY3B5KGRjdHgtPmJ1ZmZlciArIGRjdHgtPmJ5dGVzLCBzcmMsIHNyY2xlbik7CisgICAgICAgICAgICAgICAgZGN0eC0+Ynl0ZXMgKz0gc3JjbGVuOworICAgICAgICAgICAgICAgIHJldHVybiAwOworICAgICAgICAgICAgfQorICAgICAgICAgICAgbWVtY3B5KGRjdHgtPmJ1ZmZlciArIGRjdHgtPmJ5dGVzLCBzcmMsCisgICAgICAgICAgICAgICAgICAgIEdIQVNIX0RJR0VTVF9TSVpFIC0gZGN0eC0+Ynl0ZXMpOworICAgICAgICAgICAgcGFnZWZhdWx0X2Rpc2FibGUoKTsKKyAgICAgICAgICAgIGVuYWJsZV9rZXJuZWxfYWx0aXZlYygpOworICAgICAgICAgICAgZW5hYmxlX2tlcm5lbF9mcCgpOworICAgICAgICAgICAgZ2NtX2doYXNoX3A4KGRjdHgtPnNoYXNoLCBjdHgtPmh0YWJsZSwgZGN0eC0+YnVmZmVyLAorICAgICAgICAgICAgICAgICAgICBHSEFTSF9ESUdFU1RfU0laRSk7CisgICAgICAgICAgICBwYWdlZmF1bHRfZW5hYmxlKCk7CisgICAgICAgICAgICBzcmMgKz0gR0hBU0hfRElHRVNUX1NJWkUgLSBkY3R4LT5ieXRlczsKKyAgICAgICAgICAgIHNyY2xlbiAtPSBHSEFTSF9ESUdFU1RfU0laRSAtIGRjdHgtPmJ5dGVzOworICAgICAgICAgICAgZGN0eC0+Ynl0ZXMgPSAwOworICAgICAgICB9CisgICAgICAgIGxlbiA9IHNyY2xlbiAmIH4oR0hBU0hfRElHRVNUX1NJWkUgLSAxKTsKKyAgICAgICAgaWYgKGxlbikgeworICAgICAgICAgICAgcGFnZWZhdWx0X2Rpc2FibGUoKTsKKyAgICAgICAgICAgIGVuYWJsZV9rZXJuZWxfYWx0aXZlYygpOworICAgICAgICAgICAgZW5hYmxlX2tlcm5lbF9mcCgpOworICAgICAgICAgICAgZ2NtX2doYXNoX3A4KGRjdHgtPnNoYXNoLCBjdHgtPmh0YWJsZSwgc3JjLCBsZW4pOworICAgICAgICAgICAgcGFnZWZhdWx0X2VuYWJsZSgpOworICAgICAgICAgICAgc3JjICs9IGxlbjsKKyAgICAgICAgICAgIHNyY2xlbiAtPSBsZW47CisgICAgICAgIH0KKyAgICAgICAgaWYgKHNyY2xlbikgeworICAgICAgICAgICAgbWVtY3B5KGRjdHgtPmJ1ZmZlciwgc3JjLCBzcmNsZW4pOworICAgICAgICAgICAgZGN0eC0+Ynl0ZXMgPSBzcmNsZW47CisgICAgICAgIH0KKyAgICAgICAgcmV0dXJuIDA7CisgICAgfQorfQorCitzdGF0aWMgaW50IHA4X2doYXNoX2ZpbmFsKHN0cnVjdCBzaGFzaF9kZXNjICpkZXNjLCB1OCAqb3V0KQoreworICAgIGludCBpOworICAgIHN0cnVjdCBwOF9naGFzaF9jdHggKmN0eCA9IGNyeXB0b190Zm1fY3R4KGNyeXB0b19zaGFzaF90Zm0oZGVzYy0+dGZtKSk7CisgICAgc3RydWN0IHA4X2doYXNoX2Rlc2NfY3R4ICpkY3R4ID0gc2hhc2hfZGVzY19jdHgoZGVzYyk7CisKKyAgICBpZiAoSU5fSU5URVJSVVBUKSB7CisgICAgICAgIHJldHVybiBjcnlwdG9fc2hhc2hfZmluYWwoJmRjdHgtPmZhbGxiYWNrX2Rlc2MsIG91dCk7CisgICAgfSBlbHNlIHsKKyAgICAgICAgaWYgKGRjdHgtPmJ5dGVzKSB7CisgICAgICAgICAgICBmb3IgKGkgPSBkY3R4LT5ieXRlczsgaSA8IEdIQVNIX0RJR0VTVF9TSVpFOyBpKyspCisgICAgICAgICAgICAgICAgZGN0eC0+YnVmZmVyW2ldID0gMDsKKyAgICAgICAgICAgIHBhZ2VmYXVsdF9kaXNhYmxlKCk7CisgICAgICAgICAgICBlbmFibGVfa2VybmVsX2FsdGl2ZWMoKTsKKyAgICAgICAgICAgIGVuYWJsZV9rZXJuZWxfZnAoKTsKKyAgICAgICAgICAgIGdjbV9naGFzaF9wOChkY3R4LT5zaGFzaCwgY3R4LT5odGFibGUsIGRjdHgtPmJ1ZmZlciwKKyAgICAgICAgICAgICAgICAgICAgR0hBU0hfRElHRVNUX1NJWkUpOworICAgICAgICAgICAgcGFnZWZhdWx0X2VuYWJsZSgpOworICAgICAgICAgICAgZGN0eC0+Ynl0ZXMgPSAwOworICAgICAgICB9CisgICAgICAgIG1lbWNweShvdXQsIGRjdHgtPnNoYXNoLCBHSEFTSF9ESUdFU1RfU0laRSk7CisgICAgICAgIHJldHVybiAwOworICAgIH0KK30KKworc3RydWN0IHNoYXNoX2FsZyBwOF9naGFzaF9hbGcgPSB7CisgICAgLmRpZ2VzdHNpemUgPSBHSEFTSF9ESUdFU1RfU0laRSwKKyAgICAuaW5pdCAgICAgICA9IHA4X2doYXNoX2luaXQsCisgICAgLnVwZGF0ZSAgICAgPSBwOF9naGFzaF91cGRhdGUsCisgICAgLmZpbmFsICAgICAgPSBwOF9naGFzaF9maW5hbCwKKyAgICAuc2V0a2V5ICAgICA9IHA4X2doYXNoX3NldGtleSwKKyAgICAuZGVzY3NpemUgICA9IHNpemVvZihzdHJ1Y3QgcDhfZ2hhc2hfZGVzY19jdHgpLAorICAgIC5iYXNlICAgICAgID0geworICAgICAgICAuY3JhX25hbWUgPSAiZ2hhc2giLAorICAgICAgICAuY3JhX2RyaXZlcl9uYW1lID0gInA4X2doYXNoIiwKKyAgICAgICAgLmNyYV9wcmlvcml0eSA9IDEwMDAsCisgICAgICAgIC5jcmFfZmxhZ3MgPSBDUllQVE9fQUxHX1RZUEVfU0hBU0ggfCBDUllQVE9fQUxHX05FRURfRkFMTEJBQ0ssCisgICAgICAgIC5jcmFfYmxvY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LT5jcHVfdXNlcl9mZWF0dXJlczIgJiBQUENfRkVBVFVSRTJfVkVDX0NSWVBUTykpCisgICAgICAgIHJldHVybiAtRU5PREVWOworCisgICAgZm9yIChhbGdfaXQgPSBhbGdzOyAqYWxnX2l0OyBhbGdfaXQrKykgeworICAgICAgICByZXQgPSBjcnlwdG9fcmVnaXN0ZXJfYWxnKCphbGdfaXQpOworICAgICAgICBwcmludGsoS0VSTl9JTkZPICJjcnlwdG9fcmVnaXN0ZXJfYWxnICclcycgPSAlZFxuIiwKKyAgICAgICAgICAgICAgICAoKmFsZ19pdCktPmNyYV9uYW1lLCByZXQpOworICAgICAgICBpZiAocmV0KSB7CisgICAgICAgICAgICBmb3IgKGFsZ19pdC0tOyBhbGdfaXQgPj0gYWxnczsgYWxnX2l0LS0pCisgICAgICAgICAgICAgICAgY3J5cHRvX3VucmVnaXN0ZXJfYWxnKCphbGdfaXQpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKHJldCkKKyAgICAgICAgcmV0dXJuIHJldDsKKworICAgIHJldCA9IGNyeXB0b19yZWdpc3Rlcl9zaGFzaCgmcDhfZ2hhc2hfYWxnKTsKKyAgICBpZiAocmV0KSB7CisgICAgICAgIGZvciAoYWxnX2l0ID0gYWxnczsgKmFsZ19pdDsgYWxnX2l0KyspCisgICAgICAgICAgICBjcnlwdG9fdW5yZWdpc3Rlcl9hbGcoKmFsZ19pdCk7CisgICAgfQorICAgIHJldHVybiByZXQ7Cit9CisKK3ZvaWQgX19leGl0IHA4X2V4aXQodm9pZCkKK3sKKyAgICBzdHJ1Y3QgY3J5cHRvX2FsZyAqKmFsZ19pdDsKKworICAgIGZvciAoYWxnX2l0ID0gYWxnczsgKmFsZ19pdDsgYWxnX2l0KyspIHsKKyAgICAgICAgcHJpbnRrKEtFUk5fSU5GTyAiUmVtb3ZpbmcgJyVzJ1xuIiwgKCphbGdfaXQpLT5jcmFfbmFtZSk7CisgICAgICAgIGNyeX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MDEsIDB4YzQsIDB4MzIpOworCWlmIChlcnIpCisJCWdvdG8gZXJyb3I7CisKKwkvKiBEUENENDA1ICovCisJZXJyID0gcHM4NjIyX3NldChjbCwgMHgwMSwgMHhjNSwgMHg1Myk7CisJaWYgKGVycikKKwkJZ290byBlcnJvcjsKKworCS8qIERQQ0Q0MDYgKi8KKwllcnIgPSBwczg2MjJfc2V0KGNsLCAweDAxLCAweGM2LCAweDRjKTsKKwlpZiAoZXJyKQorCQlnb3RvIGVycm9yOworCisJLyogRFBDRDQwNyAqLworCWVyciA9IHBzODYyMl9zZXQoY2wsIDB4MDEsIDB4YzcsIDB4NTYpOworCWlmIChlcnIpCisJCWdvdG8gZXJyb3I7CisKKwkvKiBEUENENDA4ICovCisJZXJyID0gcHM4NjIyX3NldChjbCwgMHgwMSwgMHhjOCwgMHgzNSk7CisJaWYgKGVycikKKwkJZ290byBlcnJvcjsKKworCS8qIERQQ0Q0MEEsIEluaXRpYWwgQ29kZSBtYWpvciByZXZpc2lvbiAnMDEnICovCisJZXJyID0gcHM4NjIyX3NldChjbCwgMHgwMSwgMHhjYSwgMHgwMSk7CisJaWYgKGVycikKKwkJZ290byBlcnJvcjsKKworCS8qIERQQ0Q0MEIsIEluaXRpYWwgQ29kZSBtaW5vciByZXZpc2lvbiAnMDUnICovCisJZXJyID0gcHM4NjIyX3NldChjbCwgMHgwMSwgMHhjYiwgMHgwNSk7CisJaWYgKGVycikKKwkJZ290byBlcnJvcjsKKworCisJaWYgKHBzODYyMi0+YmwpIHsKKwkJLyogRFBDRDcyMCwgaW50ZXJuYWwgUFdNICovCisJCWVyciA9IHBzODYyMl9zZXQoY2wsIDB4MDEsIDB4YTUsIDB4YTApOworCQlpZiAoZXJyKQorCQkJZ290byBlcnJvcjsKKworCQkvKiBGRmggZm9yIDEwMCUgYnJpZ2h0bmVzcywgMGggZm9yIDAlIGJyaWdodG5lc3MgKi8KKwkJZXJyID0gcHM4NjIyX3NldChjbCwgMHgwMSwgMHhhNywKK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0rICAgICArLS0tLS0tLS0tLS0rCisgKiAgICAgICAgICAgICAgIF4gICAgICAgfC8vLy8vLy8vLy8vfCAgICAgfCAgIHZHUFUzICAgfAorICogICAgICAgICAgICAgICB8ICAgICAgIHwvLy8vLy8vLy8vL3wgICAgICstLS0tLS0tLS0tLSsKKyAqICAgICAgICAgICAgICAgfCAgICAgICB8Ly8vLy8vLy8vLy98ICAgICB8ICAgdkdQVTIgICB8CisgKiAgICAgICAgICAgICAgIHwgICAgICAgKy0tLS0tLS0tLS0tKyAgICAgKy0tLS0tLS0tLS0tKworICogICAgICAgIG1hcHBhYmxlIEdNICAgIHwgYXZhaWxhYmxlIHwgPT0+IHwgICB2R1BVMSAgIHwKKyAqICAgICAgICAgICAgICAgfCAgICAgICArLS0tLS0tLS0tLS0rICAgICArLS0tLS0tLS0tLS0rCisgKiAgICAgICAgICAgICAgIHwgICAgICAgfC8vLy8vLy8vLy8vfCAgICAgfCAgICAgICAgICAgfAorICogICAgICAgICAgICAgICB2ICAgICAgIHwvLy8vLy8vLy8vL3wgICAgIHwgICBIb3N0ICAgIHwKKyAqICAgICAgICAgICAgICAgKz09PT09PT0rPT09PT09PT09PT0rICAgICArPT09PT09PT09PT0rCisgKiAgICAgICAgICAgICAgIF4gICAgICAgfC8vLy8vLy8vLy8vfCAgICAgfCAgIHZHUFUzICAgfAorICogICAgICAgICAgICAgICB8ICAgICAgIHwvLy8vLy8vLy8vL3wgICAgICstLS0tLS0tLS0tLSsKKyAqICAgICAgICAgICAgICAgfCAgICAgICB8Ly8vLy8vLy8vLy98ICAgICB8ICAgdkdQVTIgICB8CisgKiAgICAgICAgICAgICAgIHwgICAgICAgKy0tLS0tLS0tLS0tKyAgICAgKy0tLS0tLS0tLS0tKworICogICAgICB1bm1hcHBhYmxlIEdNICAgIHwgYXZhaWxhYmxlIHwgPT0+IHwgICB2R1BVMSAgIHwKKyAqICAgICAgICAgICAgICAgfCAgICAgICArLS0tLS0tLS0tLS0rICAgICArLS0tLS0tL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ZmluZSBLRVBMRVJfSU5MSU5FX1RPX01FTU9SWV9CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwYTE0MAorCiAjZGVmaW5lIE5WMDRfRElTUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDQ2CiAKICNkZWZpbmUgTlYwM19DSEFOTkVMX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwNmIKQEAgLTI1LDYgKzMyLDcgQEAKICNkZWZpbmUgRzgyX0NIQU5ORUxfR1BGSUZPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDgyNmYKICNkZWZpbmUgRkVSTUlfQ0hBTk5FTF9HUEZJRk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDkwNmYKICNkZWZpbmUgS0VQTEVSX0NIQU5ORUxfR1BGSUZPX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMGEwNmYKKyNkZWZpbmUgTUFYV0VMTF9DSEFOTkVMX0dQRklGT19BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMGIwNmYKIAogI2RlZmluZSBOVjUwX0RJU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNTA3MAogI2RlZmluZSBHODJfRElTUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwODI3MApAQCAtODQsNiArOTIsNyBAQAogI2RlZmluZSBLRVBMRVJfQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwYTI5NwogCiAjZGVmaW5lIE1BWFdFTExfQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDBiMDk3CisjZGVmaW5lIE1BWFdFTExfQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDBiMTk3CiAKICNkZWZpbmUgRkVSTUlfQ09NUFVURV9BICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDkwYzAKICNkZWZpbmUgRkVSTUlfQ09NUFVURV9CICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDkxYzAKQEAgLTkyLDYgKzEwMSw3IEBACiAjZGVmaW5lIEtFUExFUl9DT01QVVRFX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDBhMWMwCiAKICNkZWZpbmUgTUFYV0VMTF9DT01QVVRFX0EgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMGIwYzAKKyNkZWZpbmUgTUFYV0VMTF9DT01QVVRFX0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMGIxYzAKIAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9ncHUvZHJtL25vdXZlYXUvaW5jbHVkZS9udmttL2VuZ2luZS9jZS5oIGIvZHJpdmVycy9ncHUvZHJtL25vdXZlYXUvaW5jbHVkZS9udmttL2VuZ2luZS9jZS5oCmluZGV4IDdlMjljNTIuLmU4MzJmNzIgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvZ3B1L2RybS9ub3V2ZWF1L2luY2x1ZGUvbnZrbS9lbmdpbmUvY2UuaAorKysgYi9kcml2ZXJzL2dwdS9kcm0vbm91dmVhdS9pbmNsdWRlL252a20vZW5naW5lL2NlLmgKQEAgLTE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05JTkZSSU5HRU1FTlQuICBJTiBOTyBFVkVOVCBTSEFMTAorICogVEhFIENPUFlSSUdIVCBIT0xERVIoUykgT1IgQVVUSE9SKFMpIEJFIExJQUJMRSBGT1IgQU5ZIENMQUlNLCBEQU1BR0VTIE9SCisgKiBPVEhFUiBMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwKKyAqIEFSSVNJTkcgRlJPTSwgT1VUIE9GIE9SIElOIENPTk5FQ1RJT04gV0lUSCBUSEUgU09GVFdBUkUgT1IgVEhFIFVTRSBPUgorICogT1RIRVIgREVBTElOR1MgSU4gVEhFIFNPRlRXQVJFLgorICoKKyAqIEF1dGhvcnM6IEJlbiBTa2VnZ3MKKyAqLworI2luY2x1ZGUgPGVuZ2luZS9jZS5oPgorCisjaW5jbHVkZSA8Y29yZS9lbmdjdHguaD4KKworc3RydWN0IGdtMjA0X2NlX3ByaXYgeworCXN0cnVjdCBudmttX2VuZ2luZSBiYXNlOworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIENvcHkgb2JqZWN0IGNsYXNzZXMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBzdHJ1Y3QgbnZrbV9vY2xhc3MKK2dtMjA0X2NlX3NjbGFzc1tdID0geworCXsgMHhiMGI1LCAmbnZrbV9vYmplY3Rfb2Z1bmNzIH0sCisJe30sCit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUENFIGNvbnRleHQKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBzdHJ1Y3QgbnZrbV9vZnVuY3MKK2dtMjA0X2NlX2NvbnRleHRfb2Z1bmNzID0geworCS5jdG9yID0gX252a21fZW5nY3R4X2N0b3IsCisJLmR0b3IgPSBfbnZrbV9lbmdjdHhfZHRvciwKKwkuaW5pdCA9IF9udmttX2VuZ2N0eF9pbml0LAorCS5maW5pID0gX252a21fZW5nY3R4X2ZpbmksCisJLnJkMzIgPSBfbnZrbV9lbmdjdHhfcmQzMiwKKwkud3IzMiA9IF9udmttX2VuZ2N0eF93cjMyLAorfTsKKworc3RhdGljIHN0cnVjdCBudmttX29jbGFzcworZ20yMDRfY2VfY2NsYXNzID0geworCS5oYW5kbGUgPSBOVl9FTkdDVFgoQ0UwLCAweDI0KSwKKwkub2Z1bmNzID0gJmdtMjA0X2NlX2NvbnRleHRfb2Z1bmNzLAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFBDRSBlbmdpbmUvc3ViZGV2IGZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQKK2dtMjA0X2NlX2ludHIoc3RydWN0IG52a21fc3ViZGV2ICpzdWJkZXYpCit7CisJY29uc3QgaW50IGNlID0gbnZfc3ViaWR4KHN1YmRldikgLSBOVkRFVl9FTkdJTkVfQ0UwOworCXN0cnVjdCBnbTIwNF9jZV9wcml2ICpwcml2ID0gKHZvaWQgKilzdWJkZXY7CisJdTMyIHN0YXQgPSBudl9yZDMyKHByaXYsIDB4MTA0OTA4ICsgKGNlICogMHgxMDAwKSk7CisKKwlpZiAoc3RhdCkgeworCQludl93YXJuKHByaXYsICJ1bmhhbmRsZWQgaW50ciAweCUwOHhcbiIsIHN0Y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9wICRyOQorCXJldAorCisjZGVmaW5lIHRwY19zdHJhbmRfd2FpdCgpIGNhbGwodHBjX3N0cmFuZF93YWl0KQorI2RlZmluZSB0cGNfc3RyYW5kX2VuYWJsZSgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoKKyovCW1vdiAkcjE1IE5WX1BHUkFQSF9HUEMwX1RQQ1hfU1RSQU5EX0NNRF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAvKgorKi8JZ3BjX3dyMzIoTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01ELCAkcjE1KSAgICAgICAgICAgICAgICAgICAgICAgIC8qCisqLwl0cGNfc3RyYW5kX3dhaXQoKQorI2RlZmluZSB0cGNfc3RyYW5kX2Rpc2FibGUoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoKKyovCW1vdiAkcjE1IE5WX1BHUkFQSF9HUEMwX1RQQ1hfU1RSQU5EX0NNRF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAvKgorKi8JZ3BjX3dyMzIoTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01ELCAkcjE1KSAgICAgICAgICAgICAgICAgICAgICAgIC8qCisqLwl0cGNfc3RyYW5kX3dhaXQoKQorI2RlZmluZSB0cGNfc3RyYW5kX3NlZWsocCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoKKyovCW1vdiAkcjE1IE5WX1BHUkFQSF9HUEMwX1RQQ1hfU1RSQU5EX0lOREVYX0FMTCAgICAgICAgICAgICAgICAgICAgICAgICAvKgorKi8JZ3BjX3dyMzIoTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfSU5ERVgsICRyMTUpICAgICAgICAgICAgICAgICAgICAgIC8qCisqLwltb3YgJHIxNSBwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoKKyovCWdwY193cjMyKE5WX1BHUkFQSF9HUEMwX1RQQ1hfU1RSQU5EX1NFTEVDVCwgJHIxNSkgICAgICAgICAgICAgICAgICAgICAvKgorKi8JbW92ICRyMTUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01EX1NFRUsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qCisqLwl0cGNfc3RyYW5kX3dhaXQoKQorI2RlZmluZSB0cGNfc3RyYW5kX2luZm8obSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyoKKyovCWdwY193cjMyKE5WX1BHUkFQSF9HUEMwX1RQQ1hfU1RSQU5EX0NNRCwgJHIxNSkgICAgICAgICAgICAgICAgICAgICAgICAvKgorKi8JbW92ICRyMTUgbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qCisqLwlncGNfd3IzMihOVl9QR1JBUEhfR1BDMF9UUENYX1NUUkFORF9EQVRBLCAkcjE1KSAgICAgICAgICAgICAgICAgICAgICAgLyoKKyovCW1vdiAkcjE1IE5WX1BHUkFQSF9HUEMwX1RQQ1hfU1RSQU5EX0NNRF9HRVRfSU5GTyAgICAgICAgICAgICAgICAgICAgICAvKgorKi8JZ3BjX3dyMzIoTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01ELCAkcjE1KSAgICAgICAgICAgICAgICAgICAgICAgIC8qCisqLwl0cGNfc3RyYW5kX3dhaXQoKQorI2VuZGlmCisKKwogLy8gR1BDIGZ1YyBpbml0aWFsaXNhdGlvbiwgZXhlY3V0ZWQgYnkgdHJpZ2dlcmluZyB1Y29kZSBzdGFydCwgd2lsbAogLy8gZmFsbCB0aHJvdWdoIHRvIG1haW4gbG9vcCBhZnRlciBjb21wbGV0aW9uLgogLy8KQEAgLTEwMSw3ICsxNDQsNyBAQAogCS8vIGVuYW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BACiAjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NQ1RYX01VTFRJX1NUUklERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDA5NzE4CiAjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NQ1RYX01VTFRJX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDA5NzFjCiAjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NQ1RYX1FVRVVFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDA5NzIwCisjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NSU9fQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDA5NzI0CiAjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NSU9fQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDA5NzI4CisjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NSU9fQ1RSTF9CQVNFX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxCiAjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NSU9fUkRWQUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDA5NzJjCiAjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NSU9fV1JWQUwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDA5NzMwCiAjZGVmaW5lIE5WX1BHUkFQSF9GRUNTX01NQ1RYX0xPQURfQ09VTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDA5NzRjCkBAIC0xNDcsNiArMTUwLDExIEBACiAjZGVmaW5lIE5WX1BHUkFQSF9HUENYX0dQQ0NTX01ZSU5ERVggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDFhNjE4CiAjZGVmaW5lIE5WX1BHUkFQSF9HUENYX0dQQ0N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1BDWF9HUENDU19TVFJBTkRfQ01EX0xPQUQgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNAogI2RlZmluZSBOVl9QR1JBUEhfR1BDWF9HUENDU19NRU1fQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQxYWEwNAorI2RlZmluZSBOVl9QR1JBUEhfR1BDWF9HUENDU19UUENfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQxYWNmYworCisjZGVmaW5lIE5WX1BHUkFQSF9HUEMwX1RQQzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NTA0MDAwCisjZGVmaW5lIE5WX1BHUkFQSF9HUEMwX1RQQzBfX1NJWkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwODAwCisKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfSU5ERVggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MDFkNjAKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfSU5ERVhfQUxMICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwM2YKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MDFkOTgKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MDFkOWMKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MDFkYTgKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01EX1NFRUsgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDEKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01EX0dFVF9JTkZPICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDIKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01EX1NBVkUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDMKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01EX0xPQUQgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDQKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01EX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMGMKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfQ01EX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMGQKKyNkZWZpbmUgTlZfUEdSQVBIX0dQQzBfVFBDWF9TVFJBTkRfTUVNX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg1MDFkYzQKKworI2RlZmluZSBOVl9UUENfU1RSQU5EX0lOREVYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDU2MAorI2RlZmluZSBOVl9UUENfU1RSQU5EX0NOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDU3MAorI2RlZmluZSBOVl9UUENfU1RSQU5EX1NBVkVfU1dCQVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDU4OAorI2RlZmluZSBOVl9UUENfU1RSQU5EX0xPQURfU1dCQVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDU4YworI2RlZmluZSBOVl9UUENfU1RSQU5EX1dPUkRTICAgICAgICAgICAgICAgICAgICAgICAg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OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SCisgKiBPVEhFUiBERUFMSU5HUyBJTiBUSEUgU09GVFdBUkUuCisgKgorICogQXV0aG9yczogQmVuIFNrZWdncyA8YnNrZWdnc0ByZWRoYXQuY29tPgorICovCisjaW5jbHVkZSAiZ2YxMDAuaCIKKyNpbmNsdWRlICJjdHhnZjEwMC5oIgorCisjaW5jbHVkZSA8bnZpZi9jbGFzcy5oPgorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogR3JhcGhpY3Mgb2JqZWN0IGNsYXNzZXMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0cnVjdCBudmttX29jbGFzcworZ20yMDRfZ3Jfc2NsYXNzW10gPSB7CisJeyBGRVJNSV9UV09EX0EsICZudmttX29iamVjdF9vZnVuY3MgfSwKKwl7IEtFUExFUl9JTkxJTkVfVE9fTUVNT1JZX0IsICZudmttX29iamVjdF9vZnVuY3MgfSwKKwl7IE1BWFdFTExfQiwgJmdmMTAwX2Zlcm1pX29mdW5jcywgZ2YxMDBfZ3JfOTA5N19vbXRoZHMgfSwKKwl7IE1BWFdFTExfQ09NUFVURV9CLCAmbnZrbV9vYmplY3Rfb2Z1bmNzLCBnZjEwMF9ncl85MGMwX29tdGhkcyB9LAorCXt9Cit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogUEdSQVBIIHJlZ2lzdGVyIGxpc3RzCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgY29uc3Qgc3RydWN0I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KioqKioqKioqCisgKiBQR1JBUEggZW5naW5lL3N1YmRldiBmdW5jdGlvbnMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQKK2dtMjA0X2dyX2luaXRfY3R4Y3RsKHN0cnVjdCBnZjEwMF9ncl9wcml2ICpwcml2KQoreworCXJldHVybiAwOworfQorCitpbnQKK2dtMjA0X2dyX2luaXQoc3RydWN0IG52a21fb2JqZWN0ICpvYmplY3QpCit7CisJc3RydWN0IGdmMTAwX2dyX29jbGFzcyAqb2NsYXNzID0gKHZvaWQgKilvYmplY3QtPm9jbGFzczsKKwlzdHJ1Y3QgZ2YxMDBfZ3JfcHJpdiAqcHJpdiA9ICh2b2lkICopb2JqZWN0OworCWNvbnN0IHUzMiBtYWdpY2dwYzkxOCA9IERJVl9ST1VORF9VUCgweDAwODAwMDAwLCBwcml2LT50cGNfdG90YWwpOworCXUzMiBkYXRhW1RQQ19NQVggLyA4XSA9IHt9OworCXU4ICB0cGNucltHUENfTUFYXTsKKwlpbnQgZ3BjLCB0cGMsIHBwYywgcm9wOworCWludCByZXQsIGk7CisJdTMyIHRtcDsKKworCXJldCA9IG52a21fZ3JfaW5pdCgmcHJpdi0+YmFzZSk7CisJaWYgKHJldCkKKwkJcmV0dXJuIHJldDsKKworCXRtcCA9IG52X3JkMzIocHJpdiwgMHgxMDBjODApOyAvKlhYWDogbWFzaz8gKi8KKwludl93cjMyKHByaXYsIDB4NDE4ODgwLCAweDAwMDAxMDAwIHwgKHRtcCAmIDB4MDAwMDBmZmYpKTsKKwludl93cjMyKHByaXYsIDB4NDE4ODkwLCAweDAwMDAwMDAwKTsKKwludl93cjMyKHByaXYsIDB4NDE4ODk0LCAweDAwMDAwMDAwKTsKKwludl93cjMyKHByaXYsIDB4NDE4OGI0LCBwcml2LT51bms0MTg4YjQtPmFkZHIgPj4gOCk7CisJbnZfd3IzMihwcml2LCAweDQxODhiOCwgcHJpdi0+dW5rNDE4OGI4LT5hZGRyID4+IDgpOworCW52X21hc2socHJpdiwgMHg0MTg4YjAsIDB4MDAwNDAwMDAsIDB4MDAwNDAwMDApOworCisJLypYWFg6IGJlbG9uZ3MgaW4gZmIgKi8KKwludl93cjMyKHByaXYsIDB4MTAwY2M4LCBwcml2LT51bms0MTg4YjQtPmFkZHIgPj4gOCk7CisJbnZfd3IzMihwcml2LCAweDEwMGNjYywgcHJpdi0+dW5rNDE4OGI4LT5hZGRyID4+IDgpOworCW52X21hc2socHJpdiwgMHgxMDBjYzQsIDB4MDAwNDAwMDAsIDB4MDAwNDAwMDApOworCisJZ2YxMDBfZ3JfbW1pbyhwcml2LCBvY2xhc3MtPm1taW8pOworCisJZ20xMDdfZ3JfaW5pdF9iaW9zKHByaXYpOworCisJbnZfd3IzMihwcml2LCBHUENfVU5JVCgwLCAweDMwMTgpLCAweDAwMDAwMDAxKTsKKworCW1lbXNldChkYXRhLCAweDAwLCBzaXplb2YoZGF0YSkpOworCW1lbWNweSh0cGNuciwgcHJpdi0+dHBjX25yLCBzaXplb2YocHJpdi0+dHBjX25yKSk7CisJZm9yIChpID0gMCwgZ3BjID0gLTE7IGkgPCBwcml2LT50cGNfdG90YWw7IGkrKykgeworCQlkbyB7CisJCQlncGMgPSAoZ3BjICsgMSkgJSBwcml2LT5ncGNfbnI7CisJCX0gd2hpbGUgKCF0cGNucltncGNdKTsKKwkJdHBjID0gcHJpdi0+dHBjX25yW2dwY10gLSB0cGNucltncGNdLS07CisKKwkJZGF0YVtpIC8gOF0gfD0gdHBjIDw8ICgoaSAlIDgpICogNCk7CisJfQorCisJbnZfd3IzMihwcml2LCBHUENfQkNBU1QoMHgwOTgwKSwgZGF0YVswXSk7CisJbnZfd3IzMihwcml2LCBHUENfQkNBU1QoMHgwOTg0KSwgZGF0YVsxXSk7CisJbnZfd3IzMihwcml2LCBHUENfQkNBU1QoMHgwOTg4KSwgZGF0YVsyXSk7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DAwKTsKKwludl93cjMyKHByaXYsIDB4NDA4MDMwLCAweGMwMDAwMDAwKTsKKwludl93cjMyKHByaXYsIDB4NDA0NDkwLCAweGMwMDAwMDAwKTsKKwludl93cjMyKHByaXYsIDB4NDA2MDE4LCAweGMwMDAwMDAwKTsKKwludl93cjMyKHByaXYsIDB4NDA3MDIwLCAweDQwMDAwMDAwKTsKKwludl93cjMyKHByaXYsIDB4NDA1ODQwLCAweGMwMDAwMDAwKTsKKwludl93cjMyKHByaXYsIDB4NDA1ODQ0LCAweDAwZmZmZmZmKTsKKwludl9tYXNrKHByaXYsIDB4NDE5Y2MwLCAweDAwMDAwMDA4LCAweDAwMDAwMDA4KTsKKworCWZvciAoZ3BjID0gMDsgZ3BjIDwgcHJpdi0+Z3BjX25yOyBncGMrKykgeworCXByaW50ayhLRVJOX0VSUiAicHBjICVkICVkXG4iLCBncGMsIHByaXYtPnBwY19ucltncGNdKTsKKwkJZm9yIChwcGMgPSAwOyBwcGMgPCBwcml2LT5wcGNfbnJbZ3BjXTsgcHBjKyspCisJCQludl93cjMyKHByaXYsIFBQQ19VTklUKGdwYywgcHBjLCAweDAzOCksIDB4YzAwMDAwMDApOworCQludl93cjMyKHByaXYsIEdQQ19VTklUKGdwYywgMHgwNDIwKSwgMHhjMDAwMDAwMCk7CisJCW52X3dyMzIocHJpdiwgR1BDX1VOSVQoZ3BjLCAweDA5MDApLCAweGMwMDAwMDAwKTsKKwkJbnZfd3IzMihwcml2LCBHUENfVU5JVChncGMsIDB4MTAyOCksIDB4YzAwMDAwMDApOworCQludl93cjMyKHByaXYsIEdQQ19VTklUKGdwYywgMHgwODI0KSwgMHhjMDAwMDAwMCk7CisJCWZvciAodHBjID0gMDsgdHBjIDwgcHJpdi0+dHBjX25yW2dwY107IHRwYysrKSB7CisJCQludl93cjMyKHByaXYsIFRQQ19VTklUKGdwYywgdHBjLCAweDUwOCksIDB4ZmZmZmZmZmYpOworCQkJbnZfd3IzMihwcml2LCBUUENfVU5JVChncG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gICAgICAgICAgICgoKHgpICYgMHgxKSA8PCAwKQorIyAgICAgICBkZWZpbmUgTklfRFBfTVNFX1RJTUVTVEFNUF9NT0RFICAgICAgICAgICAgICAgICgoKHgpICYgMHgxKSA8PCA0KQorIyAgICAgICBkZWZpbmUgTklfRFBfTVNFX1pFUk9fRU5DT0RFUiAgICAgICAgICAgICAgICAgICgoKHgpICYgMHgxKSA8PCA4KQorCisjZGVmaW5lIE5JX0RQX01TRV9SQVRFX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3Mzg0CisjICAgICAgIGRlZmluZSBOSV9EUF9NU0VfUkFURV9ZKHgpICAgICAgICAgICAgICAgICAgICgoKHgpICYgMHgzZmZmZmZmKSA8PCAwKQorIyAgICAgICBkZWZpbmUgTklfRFBfTVNFX1JBVEVfWCh4KSAgICAgICAgICAgICAgICAgICAoKCh4KSAmIDB4M2YpIDw8IDI2KQorCisjZGVmaW5lIE5JX0RQX01TRV9SQVRFX1VQREFURSAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3MzhjCisKKyNkZWZpbmUgTklfRFBfTVNFX1NBVDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDczOTAKKyMgICAgICAgZGVmaW5lIE5JX0RQX01TRV9TQVRfU1JDMCh4KSAgICAgICAgICAgICAgICAgICAoKCh4KSAmIDB4NykgPDwgMCkKKyMgICAgICAgZGVmaW5lIE5JX0RQX01TRV9TQVRfU0xPVF9DT1VOVDAoeCkgICAgICAgICAgICAoKCh4KSAmIDB4M2YpIDw8IDgpCisjICAgICAgIGRlZmluZSBOSV9EUF9NU0VfU0FUX1NSQzEoeCkgICAgICAgICAgICAgICAgICAgKCgoeCkgJiAweDcpIDw8IDE2KQorIyAgICAgICBkZWZpbmUgTklfRFBfTVNFX1NBVF9TTE9UX0NPVU5UMSh4KSAgICAgICAgICAgICgoKHgpICYgMHgzZikgPDwgMjQpCisKKyNkZWZpbmUgTklfRFBfTVNFX1NBVDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDczOTQKKworI2RlZmluZSBOSV9EUF9NU0VfU0FUMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NzM5OAorCisjZGVmaW5lIE5JX0RQX01TRV9TQVRfVVBEQVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3MzljCisKKyNkZWZpbmUgTklfRElHX0JFX0NOVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDcxNDAKKyMgICAgICAgZGVmaW5lIE5JX0RJR19GRV9TT1VSQ0VfU0VMRUNUKHgpICAgICAgICAgICAgICAoKCh4KSAmIDB4N2YpIDw8IDgpCisjICAgICAgIGRlZmluZSBOSV9ESUdfRkVfRElHX01PREUoeCkgICAgICAgICAgICAgICAgICAgKCgoeCkgJiAweDcpIDw8IDE2KQorIyAgICAgICBkZWZpbmUgTklfRElHX01PREVfRFBfU1NUICAgICAgICAgICAgICAgICAgICAgIDAKKyMgICAgICAgZGVmaW5lIE5JX0RJR19NT0RFX0xWRFMgICAgICAgICAgICAgICAgICAgICAgICAxCisjICAgICAgIGRlZmluZSBOSV9ESUdfTU9ERV9UTURTX0RWSSAgICAgICAgICAgICAgICAgICAgMgorIyAgICAgICBkZWZpbmUgTklfRElHX01PREVfVE1EU19IRE1JICAgICAgICAgICAgICAgICAgIDMKKyMgICAgICAgZGVmaW5lIE5JX0RJR19NT0RFX0RQX01TVCAgICAgICAgICAgICAgICAgICAgICA1CisjICAgICAgIGRlZmluZSBOSV9ESUdfSFBEX1NFTEVDVCh4KSAgICAgICAgICAgICAgICAgICAgKCgoeCkgJiAweDcpIDw8IDI4KQorCisjZGVmaW5lIE5JX0RJR19GRV9DTlRMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg3MDAwCisjICAgICAgIGRlZmluZSBOSV9ESUdfU09VUkNFX1NFTEVDVCh4KSAgICAgICAgICAgICAgICAgKCgoeCkgJiAweDMpIDw8IDApCisjICAgICAgIGRlZmlu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2UsIHJhdGUpOworCWlmIChlbGFudGVjaF93cml0ZV9yZWcocHNtb3VzZSwgMHgwNywgZXRkLT5yZWdfMDcpKQorCQlwc21vdXNlX2Vycihwc21vdXNlLCAicmVzdG9yaW5nIHJlZ18wNyBmYWlsZWRcbiIpOworfQorCisvKgogICogUHV0IHRoZSB0b3VjaHBhZCBpbnRvIGFic29sdXRlIG1vZGUKICAqLwogc3RhdGljIGludCBlbGFudGVjaF9zZXRfYWJzb2x1dGVfbW9kZShzdHJ1Y3QgcHNtb3VzZSAqcHNtb3VzZSkKQEAgLTEwOTQsNiArMTEwOSw4IEBACiAgKiBBc3VzIEs1M1NWICAgICAgICAgICAgICAweDQ1MGYwMSAgICAgICAgNzgsIDE1LCAwYyAgICAgIDIgaHcgYnV0dG9ucwogICogQXN1cyBHNDZWVyAgICAgICAgICAgICAgMHg0NjBmMDIgICAgICAgIDAwLCAxOCwgMGMgICAgICAyIGh3IGJ1dHRvbnMKICAqIEFzdXMgRzc1MEpYICAgICAgICAgICAgIDB4MzYwZjAwICAgICAgICAwMCwgMTYsIDBjICAgICAgMiBodyBidXR0b25zCisgKiBBc3VzIFRQNTAwTE4gICAgICAgICAgICAweDM4MWYxNyAgICAgICAgMTAsIDE0LCAwZSAgICAgIGNsaWNrcGFkCisgKiBBc3VzIFg3NTBKTiAgICAgICAgICAgICAweDM4MWYxNyAgICAgICAgMTAsIDE0LCAwZSAgICAgIGNsaWNrcGFkCiAgKiBBc3VzIFVYMzEgICAgICAgICAgICAgICAweDM2MWYwMCAgICAgICAgMjAsIDE1LCAwZSAgICAgIGNsaWNrcGFkCiAgKiBBc3VzIFVYMzJWRCAgICAgICAgICAgICAweDM2MWYwMiAgICAgICAgMDAsIDE1LCAwZSAgICAgIGNsaWNrcGFkCiAgKiBBdmF0YXIgQVZJVS0xNDVBMiAgICAgICAweDM2MWYwMCAgICAgICAgPyAgICAgICAgICAgICAgIGNsaWNrcGFkCkBAIC0xNjM1LDYgKzE2NTIsMTEgQEAK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0L21vdXNlL3N5bmFwdGljcy5jCkBAIC02Nyw2ICs2Nyw5IEBACiAjZGVmaW5lIFhfTUFYX1BPU0lUSVZFIDgxNzYKICNkZWZpbmUgWV9NQVhfUE9TSVRJVkUgODE3NgogCisvKiBtYXhpbXVtIEFCU19NVF9QT1NJVElPTiBkaXNwbGFjZW1lbnQgKGluIG1tKSAqLworI2RlZmluZSBETUFYIDEwCisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoJU3R1ZmYgd2UgbmVlZCBldmVuIHdoZW4gd2UgZG8gbm90IHdhbnQgbmF0aXZlIFN5bmFwdGljcyBzdXBwb3J0CiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTIwMyw2ICsyMDYsMTMgQEAKIAlOVUxMCiB9OwogCisvKiBUaGlzIGxpc3QgaGFzIGJlZW4ga2luZGx5IHByb3ZpZGVkIGJ5IFN5bmFwdGljcy4gKi8KK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgZm9yY2VwYWRfcG5wX2lkc1tdID0geworCSJTWU4zMDBEIiwKKwkiU1lOMzAxNCIsCisJTlVMTAorfTsKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKglTeW5hcHRpY3MgY29tbXVuaWNhdGlvbnMgZnVuY3Rpb25zCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTY4Nyw4ICs2OTcsNiBAQAogCWh3LT5leHRfYnV0dG9ucyB8PSAoYnVmWzVdICYgZXh0X21hc2spIDw8IGV4dF9iaXRzOwogfQogCi1zdGF0aWMgYm9vbCBpc19mb3Jj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G1heF94OworCXUzMiBtYXhfeTsKKwl1MzIgZnV6el94OworCXUzMiBmdXp6X3k7CisJYm9vbCBpbnZlcnRfeDsKKwlib29sIGludmVydF95OworfTsKKworc3RydWN0IGlwcm9jX3RzX3ByaXYgeworCXN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgKnBkZXY7CisJc3RydWN0IGlucHV0X2RldiAqaWRldjsKKworCXZvaWQgX19pb21lbSAqcmVnczsKKwlzdHJ1Y3QgY2xrICp0c2NfY2xrOworCisJaW50ICBwZW5fc3RhdHVzOworCXN0cnVjdCB0c2NfcGFyYW0gY2ZnX3BhcmFtczsKK307CisKKy8qCisgKiBTZXQgZGVmYXVsdCB2YWx1ZXMgdGhlIHNhbWUgYXMgaGFyZHdhcmUgcmVzZXQgdmFsdWVzCisgKiBleGNlcHQgZm9yIGZpZm9fdGhyZXNob2xkIHdpdGggaXMgc2V0IHRvIDEuCisgKi8KK3N0YXRpYyBjb25zdCBzdHJ1Y3QgdHNjX3BhcmFtIGlwcm9jX2RlZmF1bHRfY29uZmlnID0geworCS5zY2FubmluZ19wZXJpb2QgID0gMHg1LCAgLyogMSB0byAyNTYgKi8KKwkuZGVib3VuY2VfdGltZW91dCA9IDB4MjgsIC8qIDAgdG8gMjU1ICovCisJLnNldHRsaW5nX3RpbWVvdXQgPSAweDcsICAvKiAwIHRvIDExICovCisJLnRvdWNoX3RpbWVvdXQgICAgPSAweGEsICAvKiAwIHRvIDI1NSAqLworCS5hdmVyYWdlX2RhdGEgICAgID0gNSwgICAgLyogZW50cnkgNSA9IDMyIHB0cyAqLworCS5maWZvX3RocmVzaG9sZCAgID0gMSwgICAgLyogMCB0byAzMSAqLworCS5tYXhfeCAgICAgICAgICAgID0gWF9NQVgsCisJLm1heF95ICAgICAgICAgICAgPSBZX01BWCwKK307CisKK3N0YXRpYyB2b2lkIHRzX3JlZ19kdW1wKHN0cnVjdCBpcHJvY190c19wcml2ICpwcml2KQoreworCXN0cnVjdCBkZXZpY2UgKmRld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9kZXZpY2UodG9fcGNpX2RldihkZXYpKTsKKworCXJldHVybiBhcm1fc21tdV9hZGRfcGxhdGZvcm1fZGV2aWNlKGRldik7Cit9CisKIHN0YXRpYyB2b2lkIGFybV9zbW11X3JlbW92ZV9kZXZpY2Uoc3RydWN0IGRldmljZSAqZGV2KQogewogCWlvbW11X2dyb3VwX3JlbW92ZV9kZXZpY2UoZGV2KTsKQEAgLTEzOTIsNyArMTQwMCw3IEBACiBzdGF0aWMgaW50IGFybV9zbW11X2RvbWFpbl9nZXRfYXR0cihzdHJ1Y3QgaW9tbXVfZG9tYWluICpkb21haW4sCiAJCQkJICAgIGVudW0gaW9tbXVfYXR0ciBhdHRyLCB2b2lkICpkYXRhKQogewotCXN0cnVjdCBhcm1fc21tdV9kb21haW4gKnNtbXVfZG9tYWluID0gZG9tYWluLT5wcml2OworCXN0cnVjdCBhcm1fc21tdV9kb21haW4gKnNtbXVfZG9tYWluID0gdG9fc21tdV9kb21haW4oZG9tYWluKTsKIAogCXN3aXRjaCAoYXR0cikgewogCWNhc2UgRE9NQUlOX0FUVFJfTkVTVElORzoKQEAgLTE0MDcsNyArMTQxNSw3IEBACiAJCQkJICAgIGVudW0gaW9tbXVfYXR0ciBhdHRyLCB2b2lkICpkYXRhKQogewogCWludCByZXQgPSAwOwotCXN0cnVjdCBhcm1fc21tdV9kb21haW4gKnNtbXVfZG9tYWluID0gZG9tYWluLT5wcml2OworCXN0cnVjdCBhcm1fc21tdV9kb21haW4gKnNtbXVfZG9tYWluID0gdG9fc21tdV9kb21haW4oZG9tYWluKTsKIAogCW11dGV4X2xvY2soJnNtbXVfZG9tYWluLT5pbml0X211dGV4KTsKIApAQCAtMTQzNSw4ICsxNDQzLDggQEAKIAogc3RhdGljIHN0cnVjdCBpb21tdV9vcHMgYXJtX3NtbXVfb3BzID0gewogCS5jYXBhYmxlCQk9IGFybV9zbW11X2NhcGFibGUsCi0JLmRvbWFpbl9pbml0CQk9IGFybV9zbW11X2RvbWFpbl9pbml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dXBwZXJfYm91bmQuCiAqCVRoYXQgaXNuJ3QgdXNlZCBpbiB0aGlzIGNvbmZpZ3VyYXRpb24gKE5vIFdGUSBpcyBlbmFibGVkKSBhbmQgd2lsbCBiZQotKgljb25maWd1cmVkIGFjb3JkaW5nIHRvIHNwZWMKKyoJY29uZmlndXJlZCBhY2NvcmRpbmcgdG8gc3BlYwogKi4KICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyB2b2lkIGJueDJ4X2V0c19lM2IwX25pZ19kaXNhYmxlZChjb25zdCBzdHJ1Y3QgbGlua19wYXJhbXMgKnBhcmFtcywKQEAgLTY4MCw3ICs2ODQsNyBAQAogKglXaWxsIHJldHVybiB0aGUgUEJGIEVUUyByZWdpc3RlcnMgdG8gaW5pdCB2YWx1ZXMuRXhjZXB0CiAqCWNyZWRpdF91cHBlcl9ib3VuZC4KICoJVGhhdCBpc24ndCB1c2VkIGluIHRoaXMgY29uZmlndXJhdGlvbiAoTm8gV0ZRIGlzIGVuYWJsZWQpIGFuZCB3aWxsIGJlCi0qCWNvbmZpZ3VyZWQgYWNvcmRpbmcgdG8gc3BlYworKgljb25maWd1cmVkIGFjY29yZGluZyB0byBzcGVjCiAqLgogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RhdGljIHZvaWQgYm54MnhfZXRzX2UzYjBfcGJmX2Rpc2FibGVkKGNvbnN0IHN0cnVjdCBsaW5rX3BhcmFtcyAqcGFyYW1zKQpAQCAtNzM4LDcgKzc0Miw3IEBACiB9CiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqIERlc2NyaXB0aW9uOgotKglFM0IwIGRpc2FibGUgd2lsbCByZXR1cm4gYmFzaWNseSB0aGUgdmFsdWVzIHRvIGluaXQgdmFsdWVzLgorKglFM0IwIGRpc2FibGUgd2lsbCByZXR1cm4gYmFzaWNhbGx5IHRoZSB2YWx1ZXMgdG8gaW5pdCB2YWx1ZXMuCiAqLgogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RhdGljIGludCBibngyeF9ldHNfZTNiMF9kaXNhYmxlZChjb25zdCBzdHJ1Y3QgbGlua19wYXJhbXMgKnBhcmFtcywKQEAgLTc2MSw3ICs3NjUsNyBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqIERlc2NyaXB0aW9uOgotKglEaXNhYmxlIHdpbGwgcmV0dXJuIGJhc2ljbHkgdGhlIHZhbHVlcyB0byBpbml0IHZhbHVlcy4KKyoJRGlzYWJsZSB3aWxsIHJldHVybiBiYXNpY2FsbHkgdGhlIHZhbHVlcyB0byBpbml0IHZhbHVlcy4KICoKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIGludCBibngyeF9ldHNfZGlzYWJsZWQoc3RydWN0IGxpbmtfcGFyYW1zICpwYXJhbXMsCkBAIC0yOTM4LDcgKzI5NDIsNyBAQAogewogCXZhcnMtPmVlZV9zdGF0dXMgfD0gKCh1MzIpIG1vZGUpIDw8IFNITUVNX0VFRV9TVVBQT1JURURfU0hJRlQ7CiAKLQkvKiBQcm9wb2dhdGUgcGFyYW1zJyBiaXRzIC0tPiB2YXJzIChmb3IgbWlncmF0aW9uIGV4cG9zdXJlKSAqLworCS8qIFByb3BhZ2F0ZSBwYXJhbXMnIGJpdHMgLS0+IHZhcnMgKGZvciBtaWdyYXRpb24gZXhwb3N1cmUpICovCiAJaWYgKHBhcm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YywKLQkJMHg5ODUwLCAweDk4NjQsCi0JCTB4OWMwMCwgMHg5YzZjLAotCQkweDljODAsIDB4OWNlYywKLQkJMHg5ZDAwLCAweDlkNmMsCi0JCTB4OWQ4MCwgMHg5ZGVjLAotCQkweDllMDAsIDB4OWU2YywKLQkJMHg5ZTgwLCAweDllZWMsCi0JCTB4OWYwMCwgMHg5ZjZjLAotCQkweDlmODAsIDB4OWZlYywKLQkJMHhkMDA0LCAweGQwM2MsCi0JCTB4ZGZjMCwgMHhkZmUwLAotCQkweGUwMDAsIDB4ZWE3YywKLQkJMHhmMDAwLCAweDExMTEwLAotCQkweDExMTE4LCAweDExMTkwLAotCQkweDE5MDQwLCAweDE5MDZjLAotCQkweDE5MDc4LCAweDE5MDgwLAotCQkweDE5MDhjLCAweDE5MTI0LAotCQkweDE5MTUwLCAweDE5MWIwLAotCQkweDE5MWQwLCAweDE5MWU4LAotCQkweDE5MjM4LCAweDE5MjRjLAotCQkweDE5M2Y4LCAweDE5NDc0LAotCQkweDE5NDkwLCAweDE5NGY4LAotCQkweDE5ODAwLCAweDE5ZjMwLAotCQkweDFhMDAwLCAweDFhMDZjLAotCQkweDFhMGIwLCAweDFhMTIwLAotCQkweDFhMTI4LCAweDFhMTM4LAotCQkweDFhMTkwLCAweDFhMWM0LAotCQkweDFhMWZjLCAweDFhMWZjLAotCQkweDFlMDQwLCAweDFlMDRjLAotCQkweDFlMjg0LCAweDFlMjhjLAotCQkweDFlMmMwLCAweDFlMmMwLAotCQkweDFlMmUwLCAweDFlMmUwLAotCQkweDFlMzAwLCAweDFlMzg0LAotCQkweDFlM2MwLCAweDFlM2M4LAotCQkweDFlNDQwLCAweDFlNDRjLAotCQkweDFlNjg0LCAweDFlNjhjLAotCQkweDFlNmMwLCAweDFlNmMwLAotCQkweDFlNmUwLCAweDFlNmUwLAotCQkweDFlNzAwLCAweDFlNzg0LAotCQkweDFlN2MwLCAweDFlN2M4LAotCQkweDFlODQwLCAweDFlODRjLAotCQkweDFlYTg0LCAweDFlYThjLAotCQkweDFlYWMwLCAweDFlYWMwLAotCQkweDFlYWUwLCAweDFlYWUwLAotCQkweDFlYjAwLCAweDFlYjg0LAotCQkweDFlYmMwLCAweDFlYmM4LAotCQkweDFlYzQwLCAweDFlYzRjLAotCQkweDFlZTg0LCAweDFlZThjLAotCQkweDFlZWMwLCAweDFlZWMwLAotCQkweDFlZWUwLCAweDFlZWUwLAotCQkweDFlZjAwLCAweDFlZjg0LAotCQkweDFlZmMwLCAweDFlZmM4LAotCQkweDFmMDQwLCAweDFmMDRjLAotCQkweDFmMjg0LCAweDFmMjhjLAotCQkweDFmMmMwLCAweDFmMmMwLAotCQkweDFmMmUwLCAweDFmMmUwLAotCQkweDFmMzAwLCAweDFmMzg0LAotCQkweDFmM2MwLCAweDFmM2M4LAotCQkweDFmNDQwLCAweDFmNDRjLAotCQkweDFmNjg0LCAweDFmNjhjLAotCQkweDFmNmMwLCAweDFmNmMwLAotCQkweDFmNmUwLCAweDFmNmUwLAotCQkweDFmNzAwLCAweDFmNzg0LAotCQkweDFmN2MwLCAweDFmN2M4LAotCQkweDFmODQwLCAweDFmODRjLAotCQkweDFmYTg0LCAweDFmYThjLAotCQkweDFmYWMwLCAweDFmYWMwLAotCQkweDFmYWUwLCAweDFmYWUwLAotCQkweDFmYjAwLCAweDFmYjg0LAotCQkweDFmYmMwLCAweDFmYmM4LAotCQkweDFmYzQwLCAweDFmYzRjLAotCQkweDFmZTg0LCAweDFmZThjLAotCQkweDFmZWMwLCAweDFmZWMwLAotCQkweDFmZWUwLCAweDFmZWUwLAotCQkweDFmZjAwLCAweDFmZjg0LAotCQkweDFmZmMwLCAweDFmZmM4LAotCQkweDIwMDAwLCAweDIwMDJjLAotCQkweDIwMTAwLCAweDIwMTNjLAotCQkweDIwMTkwLCAweDIwMWM4LAotCQkweDIwMjAwLCAweDIwMzE4LAotCQkweDIwNDAwLCAweDIwNTI4LAotCQkweDIwNTQwLCAweDIwNjE0LAotCQkweDIxMDAwLCAweDIxMDQwLAotCQkweDIxMDRjLCAweDIxMDYwLAotCQkweDIxMGMwLCAweDIxMGVjLAotCQkweDIxMjAwLCAweDIxMjY4LAotCQkweDIxMjcwLCAweDIxMjg0LAotCQkweDIxMmZjLCAweDIxMzg4LAotCQkweDIxNDAwLCAweDIxNDA0LAotCQkweDIxNTAwLCAweDIxNTE4LAotCQkweDIxNTJjLCAweDIxNTNjLAotCQkweDIxNTUwLCAweDIxNTU0LAotCQkweDIxNjAwLCAweDIxNjAwLAotCQkweDIxNjA4LCAweDIxNjI4LAotCQkweDIxNjMwLCAweDIxNjNjLAotCQkweDIxNzAwLCAweDIxNzFjLAotCQkweDIxNzgwLCAweDIxNzhjLAotCQkweDIxODAwLCAweDIxYzM4LAotCQkweDIxYzgwLCAweDIxZDdjLAotCQkweDIxZTAwLCAweDIxZTA0LAotCQkweDIyMDAwLCAweDIyMDJjLAotCQkweDIyMTAwLCAweDIyMTNjLAotCQkweDIyMTkwLCAweDIyMWM4LAotCQkweDIyMjAwLCAweDIyMzE4LAotCQkweDIyNDAwLCAweDIyNTI4LAotCQkweDIyNTQwLCAweDIyNjE0LAotCQkweDIzMDAwLCAweDIzMDQwLAotCQkweDIzMDRjLCAweDIzMDYwLAotCQkweDIzMGMwLCAweDIzMGVjLAotCQkweDIzMjAwLCAweDIzMjY4LAotCQkweDIzMjcwLCAweDIzMjg0LAotCQkweDIzMmZjLCAweDIzMzg4LAotCQkweDIzNDAwLCAweDIzNDA0LAotCQkweDIzNTAwLCAweDIzNTE4LAotCQkweDIzNTJjLCAweDIzNTNjLAotCQkweDIzNTUwLCAweDIzNTU0LAotCQkweDIzNjAwLCAweDIzNjAwLAotCQkweDIzNjA4LCAweDIzNjI4LAotCQkweDIzNjMwLCAweDIzNjNjLAotCQkweDIzNzAwLCAweDIzNzFjLAotCQkweDIzNzgwLCAweDIzNzhjLAotCQkweDIzODAwLCAweDIzYzM4LAotCQkweDIzYzgwLCAweDIzZDdjLAotCQkweDIzZTAwLCAweDIzZTA0LAotCQkweDI0MDAwLCAweDI0MDJjLAotCQkweDI0MTAwLCAweDI0MTNjLAotCQkweDI0MTkwLCAweDI0MWM4LAotCQkweDI0MjAwLCAweDI0MzE4LAotCQkweDI0NDAwLCAweDI0NTI4LAotCQkweDI0NTQwLCAweDI0NjE0LAotCQkweDI1MDAwLCAweDI1MDQwLAotCQkweDI1MDRjLCAweDI1MDYwLAotCQkweDI1MGMwLCAweDI1MGVjLAotCQkweDI1MjAwLCAweDI1MjY4LAotCQkweDI1MjcwLCAweDI1Mjg0LAotCQkweDI1MmZjLCAweDI1Mzg4LAotCQkweDI1NDAwLCAweDI1NDA0LAotCQkweDI1NTAwLCAweDI1NTE4LAotCQkweDI1NTJjLCAweDI1NTNjLAotCQkweDI1NTUwLCAweDI1NTU0LAotCQkweDI1NjAwLCAweDI1NjAwLAotCQkweDI1NjA4LCAweDI1NjI4LAotCQkweDI1NjMwLCAweDI1NjNjLAotCQkweDI1NzAwLCAweDI1NzFjLAotCQkweDI1NzgwLCAweDI1NzhjLAotCQkweDI1ODAwLCAweDI1YzM4LAotCQkweDI1YzgwLCAweDI1ZDdjLAotCQkweDI1ZTAwLCAweDI1ZTA0LAotCQkweDI2MDAwLCAweDI2MDJjLAotCQkweDI2MTAwLCAweDI2MTNjLAotCQkweDI2MTkwLCAweDI2MWM4LAotCQkweDI2MjAwLCAweDI2MzE4LAotCQkweDI2NDAwLCAweDI2NTI4LAotCQkweDI2NTQwLCAweDI2NjE0LAotCQkweDI3MDAwLCAweDI3MDQwLAotCQkweDI3MDRjLCAweDI3MDYwLAotCQkweDI3MGMwLCAweDI3MGVjLAotCQkweDI3MjAwLCAweDI3MjY4LAotCQkweDI3MjcwLCAweDI3Mjg0LAotCQkweDI3MmZjLCAweDI3Mzg4LAotCQkweDI3NDAwLCAweDI3NDA0LAotCQkweDI3NTAwLCAweDI3NTE4LAotCQkweDI3NTJjLCAweDI3NTNjLAotCQkweDI3NTUwLCAweDI3NTU0LAotCQkweDI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orCQkweDFhMTkwLCAweDFhMWM0LAorCQkweDFhMWZjLCAweDFhMWZjLAorCQkweDFlMDA4LCAweDFlMDBjLAorCQkweDFlMDQwLCAweDFlMDRjLAorCQkweDFlMjg0LCAweDFlMjkwLAorCQkweDFlMmMwLCAweDFlMmMwLAorCQkweDFlMmUwLCAweDFlMmUwLAorCQkweDFlMzAwLCAweDFlMzg0LAorCQkweDFlM2MwLCAweDFlM2M4LAorCQkweDFlNDA4LCAweDFlNDBjLAorCQkweDFlNDQwLCAweDFlNDRjLAorCQkweDFlNjg0LCAweDFlNjkwLAorCQkweDFlNmMwLCAweDFlNmMwLAorCQkweDFlNmUwLCAweDFlNmUwLAorCQkweDFlNzAwLCAweDFlNzg0LAorCQkweDFlN2MwLCAweDFlN2M4LAorCQkweDFlODA4LCAweDFlODBjLAorCQkweDFlODQwLCAweDFlODRjLAorCQkweDFlYTg0LCAweDFlYTkwLAorCQkweDFlYWMwLCAweDFlYWMwLAorCQkweDFlYWUwLCAweDFlYWUwLAorCQkweDFlYjAwLCAweDFlYjg0LAorCQkweDFlYmMwLCAweDFlYmM4LAorCQkweDFlYzA4LCAweDFlYzBjLAorCQkweDFlYzQwLCAweDFlYzRjLAorCQkweDFlZTg0LCAweDFlZTkwLAorCQkweDFlZWMwLCAweDFlZWMwLAorCQkweDFlZWUwLCAweDFlZWUwLAorCQkweDFlZjAwLCAweDFlZjg0LAorCQkweDFlZmMwLCAweDFlZmM4LAorCQkweDFmMDA4LCAweDFmMDBjLAorCQkweDFmMDQwLCAweDFmMDRjLAorCQkweDFmMjg0LCAweDFmMjkwLAorCQkweDFmMmMwLCAweDFmMmMwLAorCQkweDFmMmUwLCAweDFmMmUwLAorCQkweDFmMzAwLCAweDFmMzg0LAorCQkweDFmM2MwLCAweDFmM2M4LAorCQkweDFmNDA4LCAweDFmNDBjLAorCQkweDFmNDQwLCAweDFmNDRjLAorCQkweDFmNjg0LCAweDFmNjkwLAorCQkweDFmNmMwLCAweDFmNmMwLAorCQkweDFmNmUwLCAweDFmNmUwLAorCQkweDFmNzAwLCAweDFmNzg0LAorCQkweDFmN2MwLCAweDFmN2M4LAorCQkweDFmODA4LCAweDFmODBjLAorCQkweDFmODQwLCAweDFmODRjLAorCQkweDFmYTg0LCAweDFmYTkwLAorCQkweDFmYWMwLCAweDFmYWMwLAorCQkweDFmYWUwLCAweDFmYWUwLAorCQkweDFmYjAwLCAweDFmYjg0LAorCQkweDFmYmMwLCAweDFmYmM4LAorCQkweDFmYzA4LCAweDFmYzBjLAorCQkweDFmYzQwLCAweDFmYzRjLAorCQkweDFmZTg0LCAweDFmZTkwLAorCQkweDFmZWMwLCAweDFmZWMwLAorCQkweDFmZWUwLCAweDFmZWUwLAorCQkweDFmZjAwLCAweDFmZjg0LAorCQkweDFmZmMwLCAweDFmZmM4LAorCQkweDMwMDAwLCAweDMwMDMwLAorCQkweDMwMTAwLCAweDMwMTQ0LAorCQkweDMwMTkwLCAweDMwMWQwLAorCQkweDMwMjAwLCAweDMwMzE4LAorCQkweDMwNDAwLCAweDMwNTJjLAorCQkweDMwNTQwLCAweDMwNjFjLAorCQkweDMwODAwLCAweDMwODM0LAorCQkweDMwOGMwLCAweDMwOTA4LAorCQkweDMwOTEwLCAweDMwOWFjLAorCQkweDMwYTAwLCAweDMwYTA0LAorCQkweDMwYTBjLCAweDMwYTJjLAorCQkweDMwYTQ0LCAweDMwYTUwLAorCQkweDMwYTc0LCAweDMwYzI0LAorCQkweDMwZDA4LCAweDMwZDE0LAorCQkweDMwZDFjLCAweDMwZDIwLAorCQkweDMwZDNjLCAweDMwZDUwLAorCQkweDMxMjAwLCAweDMxMjBjLAorCQkweDMxMjIwLCAweDMxMjIwLAorCQkweDMxMjQwLCAweDMxMjQwLAorCQkweDMxNjAwLCAweDMxNjAwLAorCQkweDMxNjA4LCAweDMxNjBjLAorCQkweDMxYTAwLCAweDMxYTFjLAorCQkweDMxZTA0LCAweDMxZTIwLAorCQkweDMxZTM4LCAweDMxZTNjLAorCQkweDMxZTgwLCAweDMxZTgwLAorCQkweDMxZTg4LCAweDMxZWE4LAorCQkweDMxZWIwLCAweDMxZWI0LAorCQkweDMxZWM4LCAweDMxZWQ0LAorCQkweDMxZmI4LCAweDMyMDA0LAorCQkweDMyMjA4LCAweDMyMjNjLAorCQkweDMyNjAwLCAweDMyNjMwLAorCQkweDMyYTAwLCAweDMyYWJjLAorCQkweDMyYjAwLCAweDMyYjcwLAorCQkweDMzMDAwLCAweDMzMDQ4LAorCQkweDMzMDYwLCAweDMzMDljLAorCQkweDMzMGYwLCAweDMzMTQ4LAorCQkweDMzMTYwLCAweDMzMTljLAorCQkweDMzMWYwLCAweDMzMmU0LAorCQkweDMzMmY4LCAweDMzM2U0LAorCQkweDMzM2Y4LCAweDMzNDQ4LAorCQkweDMzNDYwLCAweDMzNDljLAorCQkweDMzNGYwLCAweDMzNTQ4LAorCQkweDMzNTYwLCAweDMzNTljLAorCQkweDMzNWYwLCAweDMzNmU0LAorCQkweDMzNmY4LCAweDMzN2U0LAorCQkweDMzN2Y4LCAweDMzN2ZjLAorCQkweDMzODE0LCAweDMzODE0LAorCQkweDMzODJjLCAweDMzODJjLAorCQkweDMzODgwLCAweDMzODhjLAorCQkweDMzOGU4LCAweDMzOGVjLAorCQkweDMzOTAwLCAweDMzOTQ4LAorCQkweDMzOTYwLCAweDMzOTljLAorCQkweDMzOWYwLCAweDMzYWU0LAorCQkweDMzYWY4LCAweDMzYjEwLAorCQkweDMzYjI4LCAweDMzYjI4LAorCQkweDMzYjNjLCAweDMzYjUwLAorCQkweDMzYmYwLCAweDMzYzEwLAorCQkweDMzYzI4LCAweDMzYzI4LAorCQkweDMzYzNjLCAweDMzYzUwLAorCQkweDMzY2YwLCAweDMzY2ZjLAorCQkweDM0MDAwLCAweDM0MDMwLAorCQkweDM0MTAwLCAweDM0MTQ0LAorCQkweDM0MTkwLCAweDM0MWQwLAorCQkweDM0MjAwLCAweDM0MzE4LAorCQkweDM0NDAwLCAweDM0NTJjLAorCQkwe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4LCAweDM5ZWE4LAorCQkweDM5ZWIwLCAweDM5ZWI0LAorCQkweDM5ZWM4LCAweDM5ZWQ0LAorCQkweDM5ZmI4LCAweDNhMDA0LAorCQkweDNhMjA4LCAweDNhMjNjLAorCQkweDNhNjAwLCAweDNhNjMwLAorCQkweDNhYTAwLCAweDNhYWJjLAorCQkweDNhYjAwLCAweDNhYjcwLAorCQkweDNiMDAwLCAweDNiMDQ4LAorCQkweDNiMDYwLCAweDNiMDljLAorCQkweDNiMGYwLCAweDNiMTQ4LAorCQkweDNiMTYwLCAweDNiMTljLAorCQkweDNiMWYwLCAweDNiMmU0LAorCQkweDNiMmY4LCAweDNiM2U0LAorCQkweDNiM2Y4LCAweDNiNDQ4LAorCQkweDNiNDYwLCAweDNiNDljLAorCQkweDNiNGYwLCAweDNiNTQ4LAorCQkweDNiNTYwLCAweDNiNTljLAorCQkweDNiNWYwLCAweDNiNmU0LAorCQkweDNiNmY4LCAweDNiN2U0LAorCQkweDNiN2Y4LCAweDNiN2ZjLAorCQkweDNiODE0LCAweDNiODE0LAorCQkweDNiODJjLCAweDNiODJjLAorCQkweDNiODgwLCAweDNiODhjLAorCQkweDNiOGU4LCAweDNiOGVjLAorCQkweDNiOTAwLCAweDNiOTQ4LAorCQkweDNiOTYwLCAweDNiOTljLAorCQkweDNiOWYwLCAweDNiYWU0LAorCQkweDNiYWY4LCAweDNiYjEwLAorCQkweDNiYjI4LCAweDNiYjI4LAorCQkweDNiYjNjLCAweDNiYjUwLAorCQkweDNiYmYwLCAweDNiYzEwLAorCQkweDNiYzI4LCAweDNiYzI4LAorCQkweDNiYzNjLCAweDNiYzUwLAorCQkweDNiY2YwLCAweDNiY2ZjLAorCQkweDNjMDAwLCAweDNjMDMwLAorCQkweDNjMTAwLCAweDNjMTQ0LAorCQkweDNjMTkwLCAweDNjMWQwLAorCQkweDNjMjAwLCAweDNjMzE4LAorCQkweDNjNDAwLCAweDNjNTJjLAorCQkweDNjNTQwLCAweDNjNjFjLAorCQkweDNjODAwLCAweDNjODM0LAorCQkweDNjOGMwLCAweDNjOTA4LAorCQkweDNjOTEwLCAweDNjOWFjLAorCQkweDNjYTAwLCAweDNjYTA0LAorCQkweDNjYTBjLCAweDNjYTJjLAorCQkweDNjYTQ0LCAweDNjYTUwLAorCQkweDNjYTc0LCAweDNjYzI0LAorCQkweDNjZDA4LCAweDNjZDE0LAorCQkweDNjZDFjLCAweDNjZDIwLAorCQkweDNjZDNjLCAweDNjZDUwLAorCQkweDNkMjAwLCAweDNkMjBjLAorCQkweDNkMjIwLCAweDNkMjIwLAorCQkweDNkMjQwLCAweDNkMjQwLAorCQkweDNkNjAwLCAweDNkNjAwLAorCQkweDNkNjA4LCAweDNkNjBjLAorCQkweDNkYTAwLCAweDNkYTFjLAorCQkweDNkZTA0LCAweDNkZTIwLAorCQkweDNkZTM4LCAweDNkZTNjLAorCQkweDNkZTgwLCAweDNkZTgwLAorCQkweDNkZTg4LCAweDNkZWE4LAorCQkweDNkZWIwLCAweDNkZWI0LAorCQkweDNkZWM4LCAweDNkZWQ0LAorCQkweDNkZmI4LCAweDNlMDA0LAorCQkweDNlMjA4LCAweDNlMjNjLAorCQkweDNlNjAwLCAweDNlNjMwLAorCQkweDNlYTAwLCAweDNlYWJjLAorCQkweDNlYjAwLCAweDNlYjcwLAorCQkweDNmMDAwLCAweDNmMDQ4LAorCQkweDNmMDYwLCAweDNmMDljLAorCQkweDNmMGYwLCAweDNmMTQ4LAorCQkweDNmMTYwLCAweDNmMTljLAorCQkweDNmMWYwLCAweDNmMmU0LAorCQkweDNmMmY4LCAweDNmM2U0LAorCQkweDNmM2Y4LCAweDNmNDQ4LAorCQkweDNmNDYwLCAweDNmNDljLAorCQkweDNmNGYwLCAweDNmNTQ4LAorCQkweDNmNTYwLCAweDNmNTljLAorCQkweDNmNWYwLCAweDNmNmU0LAorCQkweDNmNmY4LCAweDNmN2U0LAorCQkweDNmN2Y4LCAweDNmN2ZjLAorCQkweDNmODE0LCAweDNmODE0LAorC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ZWwvaTQwZS9pNDBlX2Zjb2UuYworKysgYi9kcml2ZXJzL25ldC9ldGhlcm5ldC9pbnRlbC9pNDBlL2k0MGVfZmNvZS5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBJbnRlbCBFdGhlcm5ldCBDb250cm9sbGVyIFhMNzEwIEZhbWlseSBMaW51eCBEcml2ZXIKLSAqIENvcHlyaWdodChjKSAyMDEzIC0gMjAxNCBJbnRlbCBDb3Jwb3JhdGlvbi4KKyAqIENvcHlyaWdodChjKSAyMDEzIC0gMjAxNSBJbnRlbCBDb3Jwb3JhdGlvbi4KICAqCiAgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSBpdAogICogdW5kZXIgdGhlIHRlcm1zIGFuZCBjb25kaXRpb25zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSwKQEAgLTI0LDcgKzI0LDYgQEAKICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0KICNpbmNsdWRlIDxsaW51eC9pZl9ldGhlci5oPgogI2luY2x1ZGUgPHNjc2kvc2NzaV9jbW5kLmg+CiAjaW5jbHVkZSA8c2NzaS9zY3NpX2RldmljZS5oPgpAQCAtMTUwLDcgKzE0OSw3IEBACiAKIC8qKgogICogaTQwZV9mY29lX2RkcF91bm1hcCAtIHVubWFwIHRoZSBtYXBwZWQgc2dsaXN0IGFzc29jaWF0ZWQKLSAqIEBwZjogcG9pbnRlciB0byBwZgorICogQHBmOiBwb2ludGVyIHRvIFBGCiAgKiBAZGRwOiBzdyBERFAgY29udGV4dAogICoKICAqIFVubWFwIHR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HRvIGJlIGluZGljYXRlZCB0byBzdGFjawogICoqLwogc3RhdGljIHZvaWQgaWdidmZfcmVjZWl2ZV9za2Ioc3RydWN0IGlnYnZmX2FkYXB0ZXIgKmFkYXB0ZXIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgbmV0X2RldmljZSAqbmV0ZGV2LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNrX2J1ZmYgKnNrYiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUzMiBzdGF0dXMsIHUxNiB2bGFuKQorCQkJICAgICAgc3RydWN0IG5ldF9kZXZpY2UgKm5ldGRldiwKKwkJCSAgICAgIHN0cnVjdCBza19idWZmICpza2IsCisJCQkgICAgICB1MzIgc3RhdHVzLCB1MTYgdmxhbikKIHsKIAl1MTYgdmlkOwogCkBAIC0xMjMsNyArMTIzLDcgQEAKIH0KIAogc3RhdGljIGlubGluZSB2b2lkIGlnYnZmX3J4X2NoZWNrc3VtX2FkdihzdHJ1Y3QgaWdidmZfYWRhcHRlciAqYWRhcHRlciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdTMyIHN0YXR1c19lcnIsIHN0cnVjdCBza19idWZmICpza2IpCisJCQkJCSB1MzIgc3RhdHVzX2Vyciwgc3RydWN0IHNrX2J1ZmYgKnNrYikKIHsKIAlza2JfY2hlY2tzdW1fbm9uZV9hc3NlcnQoc2tiKTsKIApAQCAtMTUzLDcgKzE1Myw3IEBACiAgKiBAY2xlYW5lZF9jb3VudDogbnVtYmVyIG9mIGJ1ZmZlcnMgdG8gcmVwb3B1bGF0ZQogICoqLwogc3RhdGljIHZvaWQgaWdidmZfYWxsb2NfcnhfYnVmZmVycyhzdHJ1Y3QgaWdidmZfcmluZyAqcnhfcmluZywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGNsZWFuZWRfY291bnQpCisJCQkJICAgaW50IGNsZWFuZWRf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GVyICphZGFwdGVyLAotICAgICAgICAgICAgICAgICAgICAgc3RydWN0IGlnYnZmX3JpbmcgKnR4X3JpbmcsCisJCSAgICAgc3RydWN0IGlnYnZmX3JpbmcgKnR4X3JpbmcsCiAJCSAgICAgc3RydWN0IHNrX2J1ZmYgKnNrYiwgdTMyIHR4X2ZsYWdzLCB1OCAqaGRyX2xlbiwKIAkJICAgICBfX2JlMTYgcHJvdG9jb2wpCiB7CkBAIC0xOTMwLDE3ICsxOTMyLDE4IEBACiAKIAlpZiAocHJvdG9jb2wgPT0gaHRvbnMoRVRIX1BfSVApKSB7CiAJCXN0cnVjdCBpcGhkciAqaXBoID0gaXBfaGRyKHNrYik7CisKIAkJaXBoLT50b3RfbGVuID0gMDsKIAkJaXBoLT5jaGVjayA9IDA7CiAJCXRjcF9oZHIoc2tiKS0+Y2hlY2sgPSB+Y3N1bV90Y3B1ZHBfbWFnaWMoaXBoLT5zYWRkciwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpcGgtPmRhZGRyLCAwLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElQUFJPVE9fVENQLAotCQkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApOworCQkJCQkJCSBpcGgtPmRhZGRyLCAwLAorCQkJCQkJCSBJUFBST1RPX1RDUCwKKwkJCQkJCQkgMCk7CiAJfSBlbHNlIGlmIChza2JfaXNfZ3NvX3Y2KHNrYikpIHsKIAkJaXB2Nl9oZHIoc2tiKS0+cGF5bG9hZF9sZW4gPSAwOwogCQl0Y3BfaGRyKHNrYiktPmNoZWNrID0gfmNzdW1faXB2Nl9tYWdpYygmaXB2Nl9oZHIoc2tiKS0+c2FkZHIsCi0JCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZpcHY2X2hkcihza2IpLT5kYWRkciwKLQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgM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ENvbnZlbmllbmNlIG1hY3JvcwogICoKICAqIE5vdGU6ICJfbiIgaXMgdGhlIHF1ZXVlIG51bWJlciBvZiB0aGUgcmVnaXN0ZXIgdG8gYmUgd3JpdHRlbiB0by4KICAqCiAgKiBFeGFtcGxlIHVzYWdlOgogICogRTEwMDBfUkRCQUxfUkVHKGN1cnJlbnRfcnhfcXVldWUpCiAgKi8KLSNkZWZpbmUgRTEwMDBfUkRCQUwoX24pICAgICAgKChfbikgPCA0ID8gKDB4MDI4MDAgKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBDMDAwICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX1JEQkFIKF9uKSAgICAgICgoX24pIDwgNCA/ICgweDAyODA0ICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwQzAwNCArICgoX24pICogMHg0MCkpKQotI2RlZmluZSBFMTAwMF9SRExFTihfbikgICAgICAoKF9uKSA8IDQgPyAoMHgwMjgwOCArICgoX24pICogMHgxMDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEMwMDggKyAoKF9uKSAqIDB4NDApKSkKLSNkZWZpbmUgRTEwMDBfU1JSQ1RMKF9uKSAgICAgKChfbikgPCA0ID8gKDB4MDI4MEMgKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBDMDBDICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX1JESChfbikgICAgICAgICgoX24pIDwgNCA/ICgweDAyODEwICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwQzAxMCArICgoX24pICogMHg0MCkpKQotI2RlZmluZSBFMTAwMF9SRFQoX24pICAgICAgICAoKF9uKSA8IDQgPyAoMHgwMjgxOCArICgoX24pICogMHgxMDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEMwMTggKyAoKF9uKSAqIDB4NDApKSkKLSNkZWZpbmUgRTEwMDBfUlhEQ1RMKF9uKSAgICAgKChfbikgPCA0ID8gKDB4MDI4MjggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBDMDI4ICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX1REQkFMKF9uKSAgICAgICgoX24pIDwgNCA/ICgweDAzODAwICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwRTAwMCArICgoX24pICogMHg0MCkpKQotI2RlZmluZSBFMTAwMF9UREJBSChfbikgICAgICAoKF9uKSA8IDQgPyAoMHgwMzgwNCArICgoX24pICogMHgxMDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEUwMDQgKyAoKF9uKSAqIDB4NDApKSkKLSNkZWZpbmUgRTEwMDBfVERMRU4oX24pICAgICAgKChfbikgPCA0ID8gKDB4MDM4MDggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBFMDA4ICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX1RESChfbikgICAgICAgICgoX24pIDwgNCA/ICgweDAzODEwICsgKChfbikgKiAweDEwMCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwRTAxMCArICgoX24pICogMHg0MCkpKQotI2RlZmluZSBFMTAwMF9URFQoX24pICAgICAgICAoKF9uKSA8IDQgPyAoMHgwMzgxOCArICgoX24pICogMHgxMDApKSA6IFwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MEUwMTggKyAoKF9uKSAqIDB4NDApKSkKLSNkZWZpbmUgRTEwMDBfVFhEQ1RMKF9uKSAgICAgKChfbikgPCA0ID8gKDB4MDM4MjggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDBFMDI4ICsgKChfbikgKiAweDQwKSkpCi0jZGVmaW5lIEUxMDAwX0RDQV9UWENUUkwoX24pICgweDAzODE0ICsgKF9uIDw8IDgpKQotI2RlZmluZSBFMTAwMF9EQ0FfUlhDVFJMKF9uKSAoMHgwMjgxNCArIChfbiA8PCA4KSkKLSNkZWZpbmUgRTEwMDBfUkFMKF9pKSAgKCgoX2kpIDw9IDE1KSA/ICgweDA1NDAwICsgKChfaSkgKiA4KSkgOiBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMHgwNTRFMCArICgoX2kgLSAxNikgKiA4KSkpCi0jZGVmaW5lIEUxMDAwX1JBSChfaSkgICgoKF9pKSA8PSAxNSkgPyAoMHgwNTQwNCArICgoX2kpICogOCkpIDogXAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDU0RTQgKyAoKF9pIC0gMTYpICogOCkpKQorI2RlZmluZSBFMTAwMF9SREJBTChfbikJKChfbikgPCA0ID8gKDB4MDI4MDAgKyAoKF9uKSAqIDB4MTAwKSkgOiBcCisJCQkgKDB4MEMwMDAgKyAoKF9uKSAqIDB4NDApKSkKKyNkZWZpbmUgRTEwMDBfUkRCQUgoX24pCSgoX24pIDwgNCA/ICgweDAyODA0ICsgKChfbikgKiAweDEwMCkpIDogXAorCQkJICgweDBDMDA0ICsgKChfbikgKiAweDQwKSkpCisjZGVmaW5lIEUxMDAwX1JETEVOKF9uKQkoKF9uKSA8IDQgPyAoMHgwMjgwOCArICgoX24pICogMHgxMDApKSA6IFwKKwkJCSAoMHgwQzAwOCArICgoX24pICogMHg0MCkpKQorI2RlZmluZSBFMTAwMF9TUlJDVEwoX24pCSgoX24pIDwgNCA/ICgweDAyODBDICsgKChfbikgKiAweDEwMCkpIDogXAorCQkJCSAoMHgwQzAwQyArICgoX24pICogMHg0MCkpKQorI2RlZmluZSBFMTAwMF9SREgoX24pCSgoX24pIDwgNCA/ICgweDAyODEwICsgKChfbikgKiAweDEwMCkpIDogXAorCQkJICgweDBDMDEwICsgKChfbikgKiAweDQwKSkpCisjZGVmaW5lIEUxMDAwX1JEVChfbikJKChfbikgPCA0ID8gKDB4MDI4MTggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCisJCQkgKDB4MEMwMTggKyAoKF9uKSAqIDB4NDApKSkKKyNkZWZpbmUgRTEwMDBfUlhEQ1RMKF9uKQkoKF9uKSA8IDQgPyAoMHgwMjgyOCArICgoX24pICogMHgxMDApKSA6IFwKKwkJCQkgKDB4MEMwMjggKyAoKF9uKSAqIDB4NDApKSkKKyNkZWZpbmUgRTEwMDBfVERCQUwoX24pCSgoX24pIDwgNCA/ICgweDAzODAwICsgKChfbikgKiAweDEwMCkpIDogXAorCQkJICgweDBFMDAwICsgKChfbikgKiAweDQwKSkpCisjZGVmaW5lIEUxMDAwX1REQkFIKF9uKQkoKF9uKSA8IDQgPyAoMHgwMzgwNCArICgoX24pICogMHgxMDApKSA6IFwKKwkJCSAoMHgwRTAwNCArICgoX24pICogMHg0MCkpKQorI2RlZmluZSBFMTAwMF9URExFTihfbikJKChfbikgPCA0ID8gKDB4MDM4MDggKyAoKF9uKSAqIDB4MTAwKSkgOiBcCisJCQkgKDB4MEUwMDggKyAoKF9uKSAqIDB4NDApKSkKKyNkZWZpbmUgRTEwMDBfVERIKF9uKQkoKF9uKSA8IDQgPyAoMHgwMzgxMCArICgoX24pICogMHgxMDApKSA6IFwKKwkJCSAoMHgwRTAxMCArICgoX24pICogMHg0MCkpKQorI2RlZmluZSBF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2UsCkBAIC0xMyw4ICsxMyw3IEBACiAgIG1vcmUgZGV0YWlscy4KIAogICBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBhbG9uZyB3aXRoCi0gIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLCBJbmMuLAotICA1MSBGcmFua2xpbiBTdCAtIEZpZnRoIEZsb29yLCBCb3N0b24sIE1BIDAyMTEwLTEzMDEgVVNBLgorICB0aGlzIHByb2dyYW07IGlmIG5vdCwgc2VlIDxodHRwOi8vd3d3LmdudS5vcmcvbGljZW5zZXMvPi4KIAogICBUaGUgZnVsbCBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZSBpcyBpbmNsdWRlZCBpbiB0aGlzIGRpc3RyaWJ1dGlvbiBpbgogICB0aGUgZmlsZSBjYWxsZWQgIkNPUFlJTkciLgpAQCAtMjUsNyArMjQsNiBAQAogCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICBDb3B5cmlnaHQgKGMpMjAwNiAtIDIwMDcgTXlyaWNvbSwgSW5jLiBmb3Igc29tZSBMUk8gc3BlY2lmaWMgY29kZQogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwpAQCAtMTcwLDEyICsxNjgsMTMgQEAKICAqIEBkaXJlY3Rpb246IDAgZm9yIFJ4LCAxIGZvciBUeCwgLTEgZm9yIG90aGVyIGNhdXNlcwogICogQHF1ZXVlOiBxdWV1ZSB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hRX0NNRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjQ0OAogI2RlZmluZSAgICAgIE1WTkVUQV9UWFFfRElTQUJMRV9TSElGVCAgICAgICAgICAgIDgKICNkZWZpbmUgICAgICBNVk5FVEFfVFhRX0VOQUJMRV9NQVNLICAgICAgICAgICAgICAweDAwMDAwMGZmCisjZGVmaW5lIE1WTkVUQV9HTUFDX0NMT0NLX0RJVklERVIgICAgICAgICAgICAgICAgMHgyNGY0CisjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfMU1TX0NMT0NLX0VOQUJMRSAgICAgICAgQklUKDMxKQogI2RlZmluZSBNVk5FVEFfQUNDX01PREUgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjUwMAogI2RlZmluZSBNVk5FVEFfQ1BVX01BUChjcHUpICAgICAgICAgICAgICAgICAgICAgICgweDI1NDAgKyAoKGNwdSkgPDwgMikpCiAjZGVmaW5lICAgICAgTVZORVRBX0NQVV9SWFFfQUNDRVNTX0FMTF9NQVNLICAgICAgMHgwMDAwMDBmZgpAQCAtMTIyLDYgKzEyNCw3IEBACiAjZGVmaW5lICAgICAgTVZORVRBX1RYX0lOVFJfTUFTS19BTEwgICAgICAgICAgICAgKDB4ZmYgPDwgMCkKICNkZWZpbmUgICAgICBNVk5FVEFfUlhfSU5UUl9NQVNLKG5yX3J4cXMpICAgICAgICAoKCgxIDw8IG5yX3J4cXMpIC0gMSkgPDwgOCkKICNkZWZpbmUgICAgICBNVk5FVEFfUlhfSU5UUl9NQVNLX0FMTCAgICAgICAgICAgICAoMHhmZiA8PCA4KQorI2RlZmluZSAgICAgIE1WTkVUQV9NSVNDSU5UUl9JTlRSX01BU0sgICAgICAgICAgIEJJVCgzMSkKIAogI2RlZmluZSBNVk5FVEFfSU5UUl9PTERfQ0FVU0UgICAgICAgICAgICAgICAgICAgIDB4MjVhOAogI2RlZmluZSBNVk5FVEFfSU5UUl9PTERfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MjVhYwpAQCAtMTY1LDYgKzE2OCw3IEBACiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfTUFYX1JYX1NJWkVfTUFTSyAgICAgICAgMHg3ZmZjCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUMwX1BPUlRfRU5BQkxFICAgICAgICAgICAgQklUKDApCiAjZGVmaW5lIE1WTkVUQV9HTUFDX0NUUkxfMiAgICAgICAgICAgICAgICAgICAgICAgMHgyYzA4CisjZGVmaW5lICAgICAgTVZORVRBX0dNQUMyX0lOQkFORF9BTl9FTkFCTEUgICAgICAgQklUKDApCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUMyX1BDU19FTkFCTEUgICAgICAgICAgICAgQklUKDMpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUMyX1BPUlRfUkdNSUkgICAgICAgICAgICAgQklUKDQpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUMyX1BPUlRfUkVTRVQgICAgICAgICAgICAgQklUKDYpCkBAIC0xODAsOSArMTg0LDExIEBACiAjZGVmaW5lIE1WTkVUQV9HTUFDX0FVVE9ORUdfQ09ORklHICAgICAgICAgICAgICAgMHgyYzBjCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfRk9SQ0VfTElOS19ET1dOICAgICAgICAgQklUKDApCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfRk9SQ0VfTElOS19QQVNTICAgICAgICAgQklUKDEpCisjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfSU5CQU5EX0FOX0VOQUJMRSAgICAgICAgQklUKDIpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfQ09ORklHX01JSV9TUEVFRCAgICAgICAgQklUKDUpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfQ09ORklHX0dNSUlfU1BFRUQgICAgICAgQklUKDYpCiAjZGVmaW5lICAgICAgTVZORVRBX0dNQUNfQU5fU1BFRURfRU4gICAgICAgICAgICAgQklUKDcpCisjZGVmaW5lICAgICAg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CwgdTggKnZwcF9wX3VwKQoreworCWludCBpOworCWludCBlcnI7CisJc3RydWN0IG1seDRfY21kX21haWxib3ggKm1haWxib3g7CisJc3RydWN0IG1seDRfYWxsb2NfdnBwX3BhcmFtICpvdXRfcGFyYW07CisKKwltYWlsYm94ID0gbWx4NF9hbGxvY19jbWRfbWFpbGJveChkZXYpOworCWlmIChJU19FUlIobWFpbGJveCkpCisJCXJldHVybiBQVFJfRVJSKG1haWxib3gpOworCisJb3V0X3BhcmFtID0gbWFpbGJveC0+YnVmOworCisJZXJyID0gbWx4NF9jbWRfYm94KGRldiwgMCwgbWFpbGJveC0+ZG1hLCBwb3J0LAorCQkJICAgTUxYNF9BTExPQ0FURV9WUFBfUVVFUlksCisJCQkgICBNTFg0X0NNRF9BTExPQ0FURV9WUFAsCisJCQkgICBNTFg0X0NNRF9USU1FX0NMQVNTX0EsCisJCQkgICBNTFg0X0NNRF9OQVRJVkUpOworCWlmIChlcnIpCisJCWdvdG8gb3V0OworCisJLyogVG90YWwgbnVtYmVyIG9mIHN1cHBvcnRlZCBWUFBzICovCisJKmF2YWlsaWJsZV92cHAgPSAodTE2KWJlMzJfdG9fY3B1KG91dF9wYXJhbS0+YXZhaWxpYmxlX3ZwcCk7CisKKwlmb3IgKGkgPSAwOyBpIDwgTUxYNF9OVU1fVVA7IGkrKykKKwkJdnBwX3BfdXBbaV0gPSAodTgpYmUzMl90b19jcHUob3V0X3BhcmFtLT52cHBfcF91cFtpXSk7CisKK291dDoKKwltbHg0X2ZyZWVfY21kX21haWxib3goZGV2LCBtYWlsYm94KTsKKworCXJldHVybiBlcnI7Cit9CitFWFBPUlRfU1lNQk9MKG1seDRfQUxMT0NBVEVfVlBQX2dldCk7CisKK2ludCBtbHg0X0FMTE9DQVRFX1ZQUF9zZXQoc3RydWN0IG1seDRfZGV2ICpkZXYsIHU4IHBvcnQsIHU4ICp2cHBfcF91cCkKK3sKKwlpbnQgaTsKKwlpbnQgZXJyOworCXN0cnVjdCBtbHg0X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CFjbWRfaW5mbykKQEAgLTE5OTMsNyArMjA3OCw3IEBACiByb2NrZXJfY21kX2dyb3VwX3RibF9hZGRfbDJfaW50ZXJmYWNlKHN0cnVjdCByb2NrZXJfZGVzY19pbmZvICpkZXNjX2luZm8sCiAJCQkJICAgICAgc3RydWN0IHJvY2tlcl9ncm91cF90YmxfZW50cnkgKmVudHJ5KQogewotCWlmIChyb2NrZXJfdGx2X3B1dF91MzIoZGVzY19pbmZvLCBST0NLRVJfVExWX09GX0RQQV9PVVRfTFBPUlQsCisJaWYgKHJvY2tlcl90bHZfcHV0X3UzMihkZXNjX2luZm8sIFJPQ0tFUl9UTFZfT0ZfRFBBX09VVF9QUE9SVCwKIAkJCSAgICAgICBST0NLRVJfR1JPVVBfUE9SVF9HRVQoZW50cnktPmdyb3VwX2lkKSkpCiAJCXJldHVybiAtRU1TR1NJWkU7CiAJaWYgKHJvY2tlcl90bHZfcHV0X3U4KGRlc2NfaW5mbywgUk9DS0VSX1RMVl9PRl9EUEFfUE9QX1ZMQU4sCkBAIC0yMTQ1LDkgKzIyMzAsOSBAQAogCXJldHVybiAwOwogfQogCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSAqIEZsb3csIGdyb3VwLCBGREIsIGludGVybmFsIFZMQU4gdGFibGVzCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBGbG93LCBncm91cCwgRkRCLCBpbnRlcm5hbCBWTEFOIGFuZCBuZWlnaCB0YWJsZXMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBpbnQgcm9ja2VyX2luaXRfdGJscyhzdHJ1Y3Qgcm9ja2VyICpyb2NrZXIpCiB7CkBAIC0yMTYzLDYgKzIyNDgsOSBAQAogCWhhc2hfaW5pdChyb2Nr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YmVudV9od19zdGF0cywgZmllbGQpLAkJXAorCW9mZnNldG9mKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpCQkJXAorfQorCisjZGVmaW5lIEdCRU5VX1NUQVRTX1A1KGZpZWxkKQkJCQkJXAorewkJCQkJCQkJXAorCSJHQkVfUDU6IiNmaWVsZCwgR0JFTlVfU1RBVFM1X01PRFVMRSwJCQlcCisJRklFTERfU0laRU9GKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpLAkJXAorCW9mZnNldG9mKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpCQkJXAorfQorCisjZGVmaW5lIEdCRU5VX1NUQVRTX1A2KGZpZWxkKQkJCQkJXAorewkJCQkJCQkJXAorCSJHQkVfUDY6IiNmaWVsZCwgR0JFTlVfU1RBVFM2X01PRFVMRSwJCQlcCisJRklFTERfU0laRU9GKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpLAkJXAorCW9mZnNldG9mKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpCQkJXAorfQorCisjZGVmaW5lIEdCRU5VX1NUQVRTX1A3KGZpZWxkKQkJCQkJXAorewkJCQkJCQkJXAorCSJHQkVfUDc6IiNmaWVsZCwgR0JFTlVfU1RBVFM3X01PRFVMRSwJCQlcCisJRklFTERfU0laRU9GKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpLAkJXAorCW9mZnNldG9mKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpCQkJXAorfQorCisjZGVmaW5lIEdCRU5VX1NUQVRTX1A4KGZpZWxkKQkJCQkJXAorewkJCQkJCQkJXAorCSJHQkVfUDg6IiNmaWVsZCwgR0JFTlVfU1RBVFM4X01PRFVMRSwJCQlcCisJRklFTERfU0laRU9GKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpLAkJXAorCW9mZnNldG9mKHN0cnVjdCBnYmVudV9od19zdGF0cywgZmllbGQpCQkJXAorfQorCitzdGF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IHNrYik7CiAJfSBlbHNlIGlmIChzay0+c2tfc3RhdGUgJiBQUFBPWF9SRUxBWSkgewpAQCAtNDU1LDYgKzQ1OCwyMiBAQAogCXJldHVybiBORVRfUlhfRFJPUDsKIH0KIAorc3RhdGljIHZvaWQgcHBwb2VfdW5iaW5kX3NvY2tfd29yayhzdHJ1Y3Qgd29ya19zdHJ1Y3QgKndvcmspCit7CisJc3RydWN0IHBwcG94X3NvY2sgKnBvID0gY29udGFpbmVyX29mKHdvcmssIHN0cnVjdCBwcHBveF9zb2NrLAorCQkJCQkgICAgIHByb3RvLnBwcG9lLnBhZHRfd29yayk7CisJc3RydWN0IHNvY2sgKnNrID0gc2tfcHBwb3gocG8pOworCisJbG9ja19zb2NrKHNrKTsKKwlpZiAocG8tPnBwcG9lX2RldikgeworCQlkZXZfcHV0KHBvLT5wcHBvZV9kZXYpOworCQlwby0+cHBwb2VfZGV2ID0gTlVMTDsKKwl9CisJcHBwb3hfdW5iaW5kX3NvY2soc2spOworCXJlbGVhc2Vfc29jayhzayk7CisJc29ja19wdXQoc2spOworfQorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgogICogUmVjZWl2ZSBhIFBQUG9FIERpc2NvdmVyeSBmcmFtZS4KQEAgLTUwMCw3ICs1MTksOCBAQAogCQl9CiAKIAkJYmhfdW5sb2NrX3NvY2soc2spOwotCQlzb2NrX3B1dChzayk7CisJCWlmICghc2NoZWR1bGVfd29yaygmcG8tPnByb3RvLnBwcG9lLnBhZHRfd29yaykpCisJCQlzb2NrX3B1dChzayk7CiAJfQogCiBhYm9ydDoKQEAgLTYxMyw2ICs2MzMsOCBAQAogCiAJbG9ja19zb2NrKHNrKTsKIAorCUlOSVRfV09SSygmcG8tPnByb3RvLnBwcG9lLnBhZHRfd29yaywgcHBwb2VfdW5iaW5kX3NvY2tfd29yayk7CisKIAllcnJvciA9IC1FSU5WQUw7Ci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MVElORyBGUk9NIExPU1MgT0YgVVNFLCBEQVRBIE9SIFBST0ZJVFMsIFdIRVRIRVIgSU4gQU4KKyAqIEFDVElPTiBPRiBDT05UUkFDVCwgTkVHTElHRU5DRSBPUiBPVEhFUiBUT1JUSU9VUyBBQ1RJT04sIEFSSVNJTkcgT1VUIE9GCisgKiBPUiBJTiBDT05ORUNUSU9OIFdJVEggVEhFIFVTRSBPUiBQRVJGT1JNQU5DRSBPRiBUSElTIFNPRlRXQVJFLgorICovCisKKyNpZm5kZWYgUkVHX0FJQ19ICisjZGVmaW5lIFJFR19BSUNfSAorCisjZGVmaW5lIEFSX1NNX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweGEyMDAKKyNkZWZpbmUgQVJfU00xX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4YjIwMAorI2RlZmluZSBBUl9BR0NfQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg5ZTAwCisKKyNkZWZpbmUgQVJfUEhZX0FJQ19DVFJMXzBfQjAgICAgICAgICAgICAgICAgICAgIChBUl9TTV9CQVNFICsgMHg0YjApCisjZGVmaW5lIEFSX1BIWV9BSUNfQ1RSTF8xX0IwICAgICAgICAgICAgICAgICAgICAoQVJfU01fQkFTRSArIDB4NGI0KQorI2RlZmluZSBBUl9QSFlfQUlDX0NUUkxfMl9CMCAgICAgICAgICAgICAgICAgICAgKEFSX1NNX0JBU0UgKyAweDRiOCkKKyNkZWZpbmUgQVJfUEhZX0FJQ19DVFJMXzNfQjAgICAgICAgICAgICAgICAgICAgIChBUl9TTV9CQVNFICsgMHg0YmMpCisjZGVmaW5lIEFSX1BIWV9BSUNfQ1RSTF80X0IwICAgICAgICAgICAgICAgICAgICAoQVJfU01fQkFTRSArIDB4NGMwKQorCisjZGVmaW5lIEFSX1BIWV9BSUNfU1RBVF8wX0IwICAgICAgICAgICAgICAgICAgICAoQVJfU01fQkFTRSArIDB4NGM0KQorI2RlZmluZSBBUl9QSFlfQUlDX1NUQVRfMV9CMCAgICAgICAgICAgICAgICAgICAgKEFSX1NNX0JBU0UgKyAweDRjOCkKKyNkZWZpbmUgQVJfUEhZX0FJQ19TVEFUXzJfQjAgICAgICAgICAgICAgICAgICAgIChBUl9TTV9CQVNFICsgMHg0Y2MpCisKKyNkZWZpbmUgQVJfUEhZX0FJQ19DVFJMXzBfQjEgICAgICAgICAgICAgICAgICAgIChBUl9TTTFfQkFTRSArIDB4NGIwKQorI2RlZmluZSBBUl9QSFlfQUlDX0NUUkxfMV9CMSAgICAgICAgICAgICAgICAgICAgKEFSX1NNMV9CQVNFICsgMHg0YjQpCisjZGVmaW5lIEFSX1BIWV9BSUNfQ1RSTF80X0IxICAgICAgICAgICAgICAgICAgICAoQVJfU00xX0JBU0UgKyAweDRjMCkKKworI2RlZmluZSBBUl9QSFlfQUlDX1NUQVRfMF9CMSAgICAgICAgICAgICAgICAgICAgKEFSX1NNMV9CQVNFICsgMHg0YzQpCisjZGVmaW5lIEFSX1BIWV9BSUNfU1RBVF8xX0IxICAgICAgICAgICAgICAgICAgICAoQVJfU00xX0JBU0UgKyAweDRjOCkKKyNkZWZpbmUgQVJfUEhZX0FJQ19TVEFUXzJfQjEgICAgICAgICAgICAgICAgICAgIChBUl9TTTFfQkFTRSArIDB4NGNjKQorCisjZGVmaW5lIEFSX1BIWV9BSUNfU1JBTV9BRERSX0IwICAgICAgICAgICAgICAgICAoQVJfU01fQkFTRSArIDB4NWYwKQorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fREFUQV9CMCAgICAgICAgICAgICAgICAgKEFSX1NNX0JBU0UgKyAweDVmNCkKKworI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fQUREUl9CMSAgICAgICAgICAgICAgICAgKEFSX1NNMV9CQVNFICsgMHg1ZjApCisjZGVmaW5lIEFSX1BIWV9BSUNfU1JBTV9EQVRBX0IxICAgICAgICAgICAgICAgICAoQVJfU00xX0JBU0UgKyAweDVmNCkKKworI2RlZm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SX1BIWV9BSUNfQlRUWF9QV1JfVEhSICAgICAgICAgICAgICAgICAweDAwMDAwMEZFCisjZGVmaW5lIEFSX1BIWV9BSUNfQlRUWF9QV1JfVEhSX1MgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFSX1BIWV9BSUNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxCisjZGVmaW5lIEFSX1BIWV9BSUNfRU5BQkxFX1MgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFSX1BIWV9BSUNfQ0FMX0JUX1JFRl9ERUxBWSAgICAgICAgICAgICAweDAwRjAwMDAwCisjZGVmaW5lIEFSX1BIWV9BSUNfQ0FMX0JUX1JFRl9ERUxBWV9TICAgICAgICAgICAyMAorI2RlZmluZSBBUl9QSFlfQUlDX0JUX0lETEVfQ0ZHICAgICAgICAgICAgICAgICAgMHgwMDA4MDAwMAorI2RlZmluZSBBUl9QSFlfQUlDX0JUX0lETEVfQ0ZHX1MgICAgICAgICAgICAgICAgMTkKKyNkZWZpbmUgQVJfUEhZX0FJQ19TVERCWV9DT05EICAgICAgICAgICAgICAgICAgIDB4MDAwNjAwMDAKKyNkZWZpbmUgQVJfUEhZX0FJQ19TVERCWV9DT05EX1MgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIEFSX1BIWV9BSUNfU1REQllfUk9UX0FUVF9EQiAgICAgICAgICAgICAweDAwMDFGODAwCisjZGVmaW5lIEFSX1BIWV9BSUNfU1REQllfUk9UX0FUVF9EQl9TICAgICAgICAgICAxMQorI2RlZmluZSBBUl9QSFlfQUlDX1NUREJZX0NPTV9BVFRfREIgICAgICAgICAgICAgMHgwMDAwMDcwMAorI2RlZmluZSBBUl9QSFlfQUlDX1NUREJZX0NPTV9BVFRfREJfUyAgICAgICAgICAgOAorI2RlZmluZSBBUl9QSFlfQUlDX1JTU0lfTUFYICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDBGMAorI2RlZmluZSBBUl9QSFlfQUlDX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wMAorI2RlZmluZSBBUl9QSFlfQUlDX01PTl9IT1BfQ09VTlRfUyAgICAgICAgICAgICAgOAorI2RlZmluZSBBUl9QSFlfQUlDX0NBTF9BSUNfU00gICAgICAgICAgICAgICAgICAgMHgwMDAwMDBGOAorI2RlZmluZSBBUl9QSFlfQUlDX0NBTF9BSUNfU01fUyAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBUl9QSFlfQUlDX1NNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNworI2RlZmluZSBBUl9QSFlfQUlDX1NNX1MgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fVkFMSUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fVkFMSURfUyAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fUk9UX1FVQURfQVRUX0RCICAgICAgICAgMHgwMDAwMDA3RQorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fUk9UX1FVQURfQVRUX0RCX1MgICAgICAgMQorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fVkdBX1FVQURfU0lHTiAgICAgICAgICAgMHgwMDAwMDA4MAorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fVkdBX1FVQURfU0lHTl9TICAgICAgICAgNworI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fUk9UX0RJUl9BVFRfREIgICAgICAgICAgMHgwMDAwM0YwMAorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fUk9UX0RJUl9BVFRfREJfUyAgICAgICAgOAorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fVkdBX0RJUl9TSUdOICAgICAgICAgICAgMHgwMDAwNDAwMAorI2RlZmluZSBBUl9QSFlfQUlDX1NSQU1fVkdBX0RJUl9TSUdOX1MgICAgICAgICAgMTQKKyNkZWZpbmUgQVJfUEhZX0FJ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1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBVU0UgT1IgUEVSRk9STUFOQ0UgT0YgVEhJUyBTT0ZUV0FSRS4KKyAqLworCisjaWZuZGVmIFJFR19NQ0lfSAorI2RlZmluZSBSRUdfTUNJX0gKKworI2RlZmluZSBBUl9NQ0lfQ09NTUFORDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MDAKKyNkZWZpbmUgQVJfTUNJX0NPTU1BTkQwX0hFQURFUiAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRgorI2RlZmluZSBBUl9NQ0lfQ09NTUFORDBfSEVBREVSX1MgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMF9MRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWYwMAorI2RlZmluZSBBUl9NQ0lfQ09NTUFORDBfTEVOX1MgICAgICAgICAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEFSX01DSV9DT01NQU5EMF9ESVNBQkxFX1RJTUVTVEFNUCAgICAgICAgICAgICAgIDB4MjAwMAorI2RlZmluZSBBUl9NQ0lfQ09NTUFORDBfRElTQUJMRV9USU1FU1RBTVBfUyAgICAgICAgICAgICAxMworCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgwNAorCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgwOAorI2RlZmluZSBBUl9NQ0lfQ09NTUFORDJfUkVTRVRfVFggICAgICAgICAgICAgICAgICAgICAgICAweDAxCisjZGVmaW5lIEFSX01DSV9DT01NQU5EMl9SRVNFVF9UWF9TICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQVJfTUNJX0NPTU1BTkQyX1JFU0VUX1JYICAgICAgICAgICAgICAgICAgICAgICAgMHgwMgorI2RlZmluZSBBUl9NQ0l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MX0dBSU5fVVBEQVRFX0ZSRVFfUyAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQVJfTUNJX1RYX0NUUkxfR0FJTl9VUERBVEVfTlVNICAgICAgICAgICAgICAgICAgMHhGMDAwMDAwCisjZGVmaW5lIEFSX01DSV9UWF9DVFJMX0dBSU5fVVBEQVRFX05VTV9TICAgICAgICAgICAgICAgIDI0CisKKyNkZWZpbmUgQVJfTUNJX01TR19BVFRSSUJVVEVTX1RBQkxFICAgICAgICAgICAgICAgICAgICAgMHgxODE0CisjZGVmaW5lIEFSX01DSV9NU0dfQVRUUklCVVRFU19UQUJMRV9DSEVDS1NVTSAgICAgICAgICAgIDB4RkZGRgorI2RlZmluZSBBUl9NQ0lfTVNHX0FUVFJJQlVURVNfVEFCTEVfQ0hFQ0tTVU1fUyAgICAgICAgICAwCisjZGVmaW5lIEFSX01DSV9NU0dfQVRUUklCVVRFU19UQUJMRV9JTlZBTElEX0hEUiAgICAgICAgIDB4RkZGRjAwMDAKKyNkZWZpbmUgQVJfTUNJX01TR19BVFRSSUJVVEVTX1RBQkxFX0lOVkFMSURfSERSX1MgICAgICAgMTYKKworI2RlZmluZSBBUl9NQ0lfU0NIRF9UQUJMRV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MTgKKyNkZWZpbmUgQVJfTUNJX1NDSERfVEFCTEVfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODFjCisjZGVmaW5lIEFSX01DSV9HUE1fMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgyMAorI2RlZmluZSBBUl9NQ0lfR1BNXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MjQKKyNkZWZpbmUgQVJfTUNJX0dQTV9XUklURV9QVFIgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHhGRkZGMDAwMAorI2RlZmluZSBBUl9NQ0lfR1BNX1dSSVRFX1BUUl9TICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorI2RlZmluZSBBUl9NQ0lfR1BNX0JVRl9MRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDBGRkZGCisjZGVmaW5lIEFSX01DSV9HUE1fQlVGX0xFTl9TICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKworI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JBVyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MjgKKworI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4MmMKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9TV19NU0dfRE9ORSAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1NXX01TR19ET05FX1MgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQ1BVX0lOVF9NU0cgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDIKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9DUFVfSU5UX01TR19TICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX0NLU1VNX0ZBSUwgICAgICAgICAgICAgICAgICAweDAwMDAwMDA0CisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfQ0tTVU1fRkFJTF9TICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9JTlZBTElEX0hEUiAgICAgICAgICAgICAgICAgMHgwMDAwMDAwOAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX0lOVkFMSURfSERSX1MgICAgICAgICAgICAgICAzCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfSFdfTVNHX0ZBSUwgICAgICAgICAgICAgICAgIDB4MDAwMDAwMTAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9IV19NU0dfRkFJTF9TICAgICAgICAgICAgICAgNAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX1NXX01TR19GQUlMICAgICAgICAgICAgICAgICAweDAwMDAwMDIwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfU1dfTVNHX0ZBSUxfUyAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9UWF9IV19NU0dfRkFJTCAgICAgICAgICAgICAgICAgMHgwMDAwMDA4MAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1RYX0hXX01TR19GQUlMX1MgICAgICAgICAgICAgICA3CisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfVFhfU1dfTVNHX0ZBSUwgICAgICAgICAgICAgICAgIDB4MDAwMDAxMDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9UWF9TV19NU0dfRkFJTF9TICAgICAgICAgICAgICAgOAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TRyAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMjAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1MgICAgICAgICAgICAgICAgICAgICAgIDkKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SRU1PVEVfU0xFRVBfVVBEQVRFICAgICAgICAgICAgMHgwMDAwMDQwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JFTU9URV9TTEVFUF9VUERBVEVfUyAgICAgICAgICAxMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0JUX1BSSSAgICAgICAgICAgICAgICAgICAgICAgICAweDA3ZmZmODAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQlRfUFJJX1MgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQlRfUFJJX1RIUkVTSCAgICAgICAgICAgICAgICAgIDB4MDgwMDAwMDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9CVF9QUklfVEhSRVNIX1MgICAgICAgICAgICAgICAgMjcKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9CVF9GUkVRICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMDAwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0JUX0ZSRVFfUyAgICAgICAgICAgICAgICAgICAgICAyOAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0JUX1NUT01QICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAwMDAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQlRfU1RPTVBfUyAgICAgICAgICAgICAgICAgICAgIDI5CisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfQkJfQUlDX0lSUSAgICAgICAgICAgICAgICAgICAgIDB4NDAwMDAwMDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9CQl9BSUNfSVJRX1MgICAgICAgICAgICAgICAgICAgMzAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9DT05UX0lORk9fVElNRU9VVCAgICAgICAgICAgICAgMHg4MDAwMDAwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX0NPTlRfSU5GT19USU1FT1VUX1MgICAgICAgICAgICAzMQorCisjZGVmaW5lIEFSX01DSV9SRU1PVEVfQ1BVX0lOVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTgzMAorI2RlZmluZSBBUl9NQ0lfUkVNT1RFX0NQVV9JTlRfRU4gICAgICAgICAgICAgICAgICAgICAgICAweDE4MzQKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfUkFXICAgICAgICAgICAgICAgICAgICAgMHgxODM4CisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0VOICAgICAgICAgICAgICAgICAgICAgID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VmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0NQVV9JTlRfUyAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfR1BNICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDEwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19HUE1fUyAgICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0xOQV9JTkZPICAgICAgICAgICAgICAgIDB4MDAwMDAyMDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfTE5BX0lORk9fUyAgICAgICAgICAgICAgOQorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19TWVNfU0xFRVBJTkcgICAgICAgICAgICAweDAwMDAwNDAwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1NZU19TTEVFUElOR19TICAgICAgICAgIDEwCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1NZU19XQUtJTkcgICAgICAgICAgICAgIDB4MDAwMDA4MDAKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfU1lTX1dBS0lOR19TICAgICAgICAgICAgMTEKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfUkVRX1dBS0UgICAgICAgICAgICAgICAgMHgwMDAwMTAwMAorI2RlZmluZSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19SRVFfV0FLRV9TICAgICAgICAgICAgICAxMgorCisjZGVmaW5lIEFSX01DSV9DUFVfSU5UICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0MAorCisjZGVmaW5lIEFSX01DSV9SWF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0NAorI2RlZmluZSBBUl9NQ0lfUlhfTEFTVF9TQ0hEX01TR19JTkRFWCAgICAgICAgICAgICAgICAgICAweDAwMDAwRjAwCisjZGVmaW5lIEFSX01DSV9SWF9MQVNUX1NDSERfTVNHX0lOREVYX1MgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQVJfTUNJX1JYX1JFTU9URV9TTEVFUCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMTAwMAorI2RlZmluZSBBUl9NQ0lfUlhfUkVNT1RFX1NMRUVQX1MgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBBUl9NQ0lfUlhfTUNJX0NMS19SRVEgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAyMDAwCisjZGVmaW5lIEFSX01DSV9SWF9NQ0lfQ0xLX1JFUV9TICAgICAgICAgICAgICAgICAgICAgICAgIDEzCisKKyNkZWZpbmUgQVJfTUNJX0NPTlRfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODQ4CisjZGVmaW5lIEFSX01DSV9DT05UX1JTU0lfUE9XRVIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwRkYKKyNkZWZpbmUgQVJfTUNJX0NPTlRfUlNTSV9QT1dFUl9TICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9NQ0lfQ09OVF9QUklPUklUWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDBGRjAwCisjZGVmaW5lIEFSX01DSV9DT05UX1BSSU9SSVRZX1MgICAgICAgICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgQVJfTUNJX0NPTlRfVFhSWCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDAwMAorI2RlZmluZSBBUl9NQ0lfQ09OVF9UWFJYX1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNgorCisjZGVmaW5lIEFSX01DSV9CVF9QUkkwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg0YworI2RlZmluZSBBUl9NQ0lfQlRfUFJJMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NTAKKyNkZWZpbmUgQVJfTUNJX0JUX1BSSTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODU0CisjZGVmaW5lIEFSX01DSV9CVF9QUkkzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg1OAorI2RlZmluZSBBUl9NQ0lfQlRfUFJJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NWMKKyNkZWZpbmUgQVJfTUNJX1dMX0ZSRVEwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODYwCisjZGVmaW5lIEFSX01DSV9XTF9GUkVRMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg2NAorI2RlZmluZSBBUl9NQ0lfV0xfRlJFUTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NjgKKyNkZWZpbmUgQVJfTUNJX0dBSU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODZjCisjZGVmaW5lIEFSX01DSV9XQlRJTUVSMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3MAorI2RlZmluZSBBUl9NQ0lfV0JUSU1FUjIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4NzQKKyNkZWZpbmUgQVJfTUNJX1dCVElNRVIzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODc4CisjZGVmaW5lIEFSX01DSV9XQlRJTUVSNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg3YworI2RlZmluZSBBUl9NQ0lfTUFYR0FJTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4ODAKKyNkZWZpbmUgQVJfTUNJX0hXX1NDSERfVEJMX0NUTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODg0CisjZGVmaW5lIEFSX01DSV9IV19TQ0hEX1RCTF9EMCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg4OAorI2RlZmluZSBBUl9NQ0lfSFdfU0NIRF9UQkxfRDEgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4OGMKKyNkZWZpbmUgQVJfTUNJX0hXX1NDSERfVEJMX0QyICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODkwCisjZGVmaW5lIEFSX01DSV9IV19TQ0hEX1RCTF9EMyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTg5NAorI2RlZmluZSBBUl9NQ0lfVFhfUEFZTE9BRDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4OTgKKyNkZWZpbmUgQVJfTUNJX1RYX1BBWUxPQUQxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxODljCisjZGVmaW5lIEFSX01DSV9UWF9QQVlMT0FEMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MThhMAorI2RlZmluZSBBUl9NQ0lfVFhfUEFZTE9BRDMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4YTQKKyNkZWZpbmUgQVJfQlRDT0VYX1dCVElNRVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOGE4CisKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOGFjCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX0FSOTQ2Ml9NT0RFICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDEKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfQVI5NDYyX01PREVfUyAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBUl9CVENPRVhfQ1RSTF9XQlRJTUVSX0VOICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAyCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX1dCVElNRVJfRU5fUyAgICAg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0JUQ09FWF9DVFJMX1NQRFRfUE9MQVJJVFkgICAgICAgICAgICAgICAgICAgIDB4ODAwMDAwMDAKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfU1BEVF9QT0xBUklUWV9TICAgICAgICAgICAgICAgICAgMzEKKworI2RlZmluZSBBUl9CVENPRVhfV0xfV0VJR0hUUzAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4YjAKKyNkZWZpbmUgQVJfQlRDT0VYX1dMX1dFSUdIVFMxICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOGI0CisjZGVmaW5lIEFSX0JUQ09FWF9XTF9XRUlHSFRTMiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MThiOAorI2RlZmluZSBBUl9CVENPRVhfV0xfV0VJR0hUUzMgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE4YmMKKworI2RlZmluZSBBUl9CVENPRVhfTUFYX1RYUFdSKF94KSAgICAgICAgICAgICAgICAgICAgICAgICAoMHgxOGMwICsgKChfeCkgPDwgMikpCisjZGVmaW5lIEFSX0JUQ09FWF9XTF9MTkEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTk0MAorI2RlZmluZSBBUl9CVENPRVhfUkZHQUlOX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDE5NDQKKyNkZWZpbmUgQVJfQlRDT0VYX1dMX0xOQV9USU1FT1VUICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDNGRkZGRgorI2RlZmluZSBBUl9CVENPRVhfV0xfTE5BX1RJTUVPVVRfUyAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTQ4CisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMMl9UWFBXUl9USFJFU0ggICAgICAgICAgICAgICAgICAgIDB4MDAwN0Y4MDAKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkwyX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gICAgICAgICAgICAgICAgIDB4MDAwMDAwMDIKKyNkZWZpbmUgQVJfQlRDT0VYX0NUUkxfQlRfT1dOX1NQRFRfQ1RSTF9TICAgICAgICAgICAgICAgMQorI2RlZmluZSBBUl9CVENPRVhfQ1RSTF9VU0VfTEFUQ0hFRF9CVF9BTlQgICAgICAgICAgICAgICAweDAwMDAwMDA0CisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMX1VTRV9MQVRDSEVEX0JUX0FOVF9TICAgICAgICAgICAgIDIKKyNkZWZpbmUgQVJfR0xCX1dMQU5fVUFSVF9JTlRGX0VOICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAyMDAwMAorI2RlZmluZSBBUl9HTEJfV0xBTl9VQVJUX0lOVEZfRU5fUyAgICAgICAgICAgICAgICAgICAgICAxNworI2RlZmluZSBBUl9HTEJfRFNfSlRBR19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDQwMDAwCisjZGVmaW5lIEFSX0dMQl9EU19KVEFHX0RJU0FCTEVfUyAgICAgICAgICAgICAgICAgICAgICAgIDE4CisKKyNkZWZpbmUgQVJfQlRDT0VYX1JDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxOTRjCisjZGVmaW5lIEFSX0JUQ09FWF9NQVhfUkZHQUlOKF94KSAgICAgICAgICAgICAgICAgICAgICAgICgweDE5NTAgKyAoKF94KSA8PCAyKSkKKyNkZWZpbmUgQVJfQlRDT0VYX0RCRyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxYTUwCisjZGVmaW5lIEFSX01DSV9MQVNUX0hXX01TR19IRFIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWE1NAorI2RlZmluZSBBUl9NQ0lfTEFTVF9IV19NU0dfQkRZICAgICAgICAgICAgICAgICAgICAgICAgICAweDFhNTgKKworI2RlZmluZSBBUl9NQ0lfU0NIRF9UQUJMRV8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFhNWMKKyNkZWZpbmUgQVJfTUNJX1NDSERfVEFCTEVfMl9NRU1fQkFTRUQgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBBUl9NQ0lfU0NIRF9UQUJMRV8yX01FTV9CQVNFRF9TICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEFSX01DSV9TQ0hEX1RBQkxFXzJfSFdfQkFTRUQgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDIKKyNkZWZpbmUgQVJfTUNJX1NDSERfVEFCTEVfMl9IV19CQVNFRF9TICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWE2MAorI2RlZmluZSBBUl9CVENPRVhfQ1RSTDNfQ09OVF9JTkZPX1RJTUVPVVQgICAgICAgICAgICAgICAweDAwMDAwZmZmCisjZGVmaW5lIEFSX0JUQ09FWF9DVFJMM19DT05UX0lORk9fVElNRU9VVF9TICAgICAgICAgICAgIDAKKworI2RlZmluZSBBUl9HTEJfU1dSRUdfRElTQ09OVF9NT0RFICAgICAgICAgICAgICAgICAgICAgICAweDIwMDJjCisjZGVmaW5lIEFSX0dMQl9TV1JFR19ESVNDT05UX0VOX0JUX1dMQU4gICAgICAgICAgICAgICAgIDB4MworCisjZGVmaW5lIEFSX01DSV9NSVNDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MWE3NAorI2RlZmluZSBBUl9NQ0lfTUlTQ19IV19GSVhfRU4gICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMDAxCisjZGVmaW5lIEFSX01DSV9NSVNDX0hXX0ZJWF9FTl9TICAgICAgICAgICAgICAgICAgICAgICAgIDAKKworI2RlZmluZSBBUl9NQ0lfREJHX0NOVF9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDFhNzgKKyNkZWZpbmUgQVJfTUNJX0RCR19DTlRfQ1RS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BcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQVJfTUNJX0lOVEVSUlVQVF9SWF9TV19NU0dfRkFJTCB8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBUl9NQ0lfSU5URVJSVVBUX1RYX0hXX01TR19GQUlMIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX01DSV9JTlRFUlJVUFRfVFhfU1dfTVNHX0ZBSUwpCisKKyNkZWZpbmUgQVJfTUNJX0lOVEVSUlVQVF9SWF9IV19NU0dfTUFTSyAoQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfU0NIRF9JTkZPICAgfCBcCisJCQkJCSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19MTkFfQ09OVFJPTCB8IFwKKwkJCQkJIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0xOQV9JTkZPICAgIHwgXAorCQkJCQkgQVJfTUNJX0lOVEVSUlVQVF9SWF9NU0dfQ09OVF9OQUNLICAgfCBcCisJCQkJCSBBUl9NQ0lfSU5URVJSVVBUX1JYX01TR19DT05UX0lORk8gICB8IFwKKwkJCQkJIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0NPTlRfUlNUKQorCisjZGVmaW5lIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0RFRkFVTFQgKEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX0dQTSAgICAgICAgICAgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1JFTU9URV9SRVNFVCAgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX01DSV9JTlRFUlJVUFRfUlhfTVNHX1NZU19XQUtJTkcgICAgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFSX01DSV9JTlRFUlJVUF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lkKTsKKwlzZXFfcHJpbnRmKHMsICJyYWRpb3JldjogJXNcbiIsIGJyY211X2RvdHJldl9zdHIocmktPnJhZGlvcmV2LCBkcmV2KSk7CisJc2VxX3ByaW50ZihzLCAiY2hpcG51bTogJXUgKCV4KVxuIiwgcmktPmNoaXBudW0sIHJpLT5jaGlwbnVtKTsKKwlzZXFfcHJpbnRmKHMsICJjaGlwcmV2OiAldVxuIiwgcmktPmNoaXByZXYpOworCXNlcV9wcmludGYocywgImNoaXBwa2c6ICV1XG4iLCByaS0+Y2hpcHBrZyk7CisJc2VxX3ByaW50ZihzLCAiY29yZXJldjogJXVcbiIsIHJpLT5jb3JlcmV2KTsKKwlzZXFfcHJpbnRmKHMsICJib2FyZGlkOiAweCUwNHhcbiIsIHJpLT5ib2FyZGlkKTsKKwlzZXFfcHJpbnRmKHMsICJib2FyZHZlbmRvcjogMHglMDR4XG4iLCByaS0+Ym9hcmR2ZW5kb3IpOworCXNlcV9wcmludGYocywgImJvYXJkcmV2OiAlc1xuIiwgYnJjbXVfYm9hcmRyZXZfc3RyKHJpLT5ib2FyZHJldiwgYnJldikpOworCXNlcV9wcmludGYocywgImRyaXZlcnJldjogJXNcbiIsIGJyY211X2RvdHJldl9zdHIocmktPmRyaXZlcnJldiwgZHJldikpOworCXNlcV9wcmludGYocywgInVjb2RlcmV2OiAldVxuIiwgcmktPnVjb2RlcmV2KTsKKwlzZXFfcHJpbnRmKHMsICJidXM6ICV1XG4iLCByaS0+YnVzKTsKKwlzZXFfcHJpbnRmKHMsICJwaHl0eXBlOiAldVxuIiwgcmktPnBoeXR5cGUpOworCXNlcV9wcmludGYocywgInBoeXJldjogJXVcbiIsIHJpLT5waHlyZXYpOworCXNlcV9wcmludGYocywgImFuYXJldjogJXVcbiIsIHJpLT5hbmFyZXYpOworCXNlcV9wcmludGYocywgIm52cmFtcmV2OiAlMDh4XG4iLCByaS0+bnZyYW1yZXYpOworCisJcmV0dXJuIDA7Cit9CisKIGludCBicmNtZl9idXN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vY2spOworCisJciA9IGZ3X2luZm8tPmNtZF9yZXN1bHQ7CisJaWYgKHIgPCAwKQorCQlnb3RvIGV4aXRfd29yazsKKworCWlmIChmd19pbmZvLT53cml0dGVuID09IGZ3X2luZm8tPmZyYW1lX3NpemUpIHsKKwkJZndfaW5mby0+ZGF0YSArPSBmd19pbmZvLT5mcmFtZV9zaXplOworCQlmd19pbmZvLT5zaXplIC09IGZ3X2luZm8tPmZyYW1lX3NpemU7CisJCWZ3X2luZm8tPndyaXR0ZW4gPSAwOworCX0KKworCWlmIChmd19pbmZvLT5zaXplID4gMCkKKwkJciA9IG54cF9uY2lfZndfc2VuZChpbmZvKTsKKworZXhpdF93b3JrOgorCWlmIChyIDwgMCB8fCBmd19pbmZvLT5zaXplID09IDApCisJCW54cF9uY2lfZndfd29ya19jb21wbGV0ZShpbmZvLCByKTsKKwltdXRleF91bmxvY2soJmluZm8tPmluZm9fbG9jayk7Cit9CisKK2ludCBueHBfbmNpX2Z3X2Rvd25sb2FkKHN0cnVjdCBuY2lfZGV2ICpuZGV2LCBjb25zdCBjaGFyICpmaXJtd2FyZV9uYW1lKQoreworCXN0cnVjdCBueHBfbmNpX2luZm8gKmluZm8gPSBuY2lfZ2V0X2RydmRhdGEobmRldik7CisJc3RydWN0IG54cF9uY2lfZndfaW5mbyAqZndfaW5mbyA9ICZpbmZvLT5md19pbmZvOworCWludCByOworCisJbXV0ZXhfbG9jaygmaW5mby0+aW5mb19sb2NrKTsKKworCWlmICghaW5mby0+cGh5X29wcy0+c2V0X21vZGUgfHwgIWluZm8tPnBoeV9vcHMtPndyaXRlKSB7CisJCXIgPSAtRU5PVFNVUFA7CisJCWdvdG8gZndfZG93bmxvYWRfZXhpdDsKKwl9CisKKwlpZiAoIWZpcm13YXJlX25hbWUgfHwgZmlybXdhcmVfbmFtZVswXSA9PSAnXDAnKSB7CisJCXIgPSAtRUlOVkFMOworCQlnb3RvIGZ3X2Rvd25sb2FkX2V4aXQ7CisJfQorCisJc3RyY3B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EiLAorCSJjd3Nfc3lzX3JlcTEiLAorCSJjd3Nfc3lzX3JlcTIiLAorCSJjd3Nfc3lzX3JlcTMiLAorCSJkaWdtaWMxX2NsayIsCisJImRpZ21pYzFfZHEiLAorCSJkaWdtaWMyX2NsayIsCisJImRpZ21pYzJfZHEiLAorCSJncGVuMTMiLAorCSJncGVuMTQiLAorCSJncGVuMTUiLAorCSJncGlvMDAiLAorCSJncGlvMDEiLAorCSJncGlvMDIiLAorCSJncGlvMDMiLAorCSJncGlvMDQiLAorCSJncGlvMDUiLAorCSJncGlvMDYiLAorCSJncGlvMDciLAorCSJncGlvMDgiLAorCSJncGlvMDkiLAorCSJncGlvMTAiLAorCSJncGlvMTEiLAorCSJncGlvMTIiLAorCSJncGlvMTMiLAorCSJncGlvMTQiLAorCSJncHNfcGFibGFuayIsCisJImdwc190bWFyayIsCisJImhkbWlfc2NsIiwKKwkiaGRtaV9zZGEiLAorCSJpY19kbSIsCisJImljX2RwIiwKKwkia3BfY29sX2lwXzAiLAorCSJrcF9jb2xfaXBfMSIsCisJImtwX2NvbF9pcF8yIiwKKwkia3BfY29sX2lwXzMiLAorCSJrcF9yb3dfb3BfMCIsCisJImtwX3Jvd19vcF8xIiwKKwkia3Bfcm93X29wXzIiLAorCSJrcF9yb3dfb3BfMyIsCisJImxjZF9iXzAiLAorCSJsY2RfYl8xIiwKKwkibGNkX2JfMiIsCisJImxjZF9iXzMiLAorCSJsY2RfYl80IiwKKwkibGNkX2JfNSIsCisJImxjZF9iXzYiLAorCSJsY2RfYl83IiwKKwkibGNkX2dfMCIsCisJImxjZF9nXzEiLAorCSJsY2RfZ18yIiwKKwkibGNkX2dfMyIsCisJImxjZF9nXzQiLAorCSJsY2RfZ181IiwKKwkibGNkX2dfNiIsCisJImxjZF9nXzciLAorCSJsY2RfaHN5bmMiLAorCSJsY2Rfb2UiLAorCSJsY2RfcGNsayIsCisJImxjZF9yXzAiLAorCSJsY2Rfcl8xIiwKKwkibGNkX3JfMiIsCisJIm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ImdwaW8xNSIsCisJImdwaW8xNiIsCisJImdwaW8xNyIsCisJImdwaW8xOCIsCisJImdwaW8xOSIsCisJImdwaW8yMCIsCisJImdwaW8yMSIsCisJImdwaW8yMiIsCisJImdwaW8yMyIsCisJImdwaW8yNCIsCisJImdwaW8yNSIsCisJImdwaW8yNiIsCisJImdwaW8yNyIsCisJImdwaW8yOCIsCisJImdwaW8yOSIsCisJImdwaW8zMCIsCisJImdwaW8zMSIsCisJImdwaW8zMiIsCisJImdwaW8zMyIsCisJImdwaW8zNCIsCisJImdwaW8zNSIsCisJImdwaW8zNiIsCisJImdwaW8zNyIsCisJImdwaW8zOCIsCisJImdwaW8zOSIsCisJImdwaW80MCIsCisJImdwaW80MSIsCisJImdwaW80MiIsCisJImdwaW80MyIsCisJImdwaW80NCIsCisJImdwaW80NSIsCisJImdwaW80NiIsCisJImdwaW80NyIsCisJImdwaW80OCIsCisJImdwaW80OSIsCisJImdwaW81MCIsCisJImdwaW81MSIsCisJImdwaW81MiIsCisJImdwaW81MyIsCit9OworCitlbnVtIGJjbTI4MzVfZnNlbCB7CisJQkNNMjgzNV9GU0VMX0dQSU9fSU4gPSAwLAorCUJDTTI4MzVfRlNFTF9HUElPX09VVCA9IDEsCisJQkNNMjgzNV9GU0VMX0FMVDAgPSA0LAorCUJDTTI4MzVfRlNFTF9BTFQxID0gNSwKKwlCQ00yODM1X0ZTRUxfQUxUMiA9IDYsCisJQkNNMjgzNV9GU0VMX0FMVDMgPSA3LAorCUJDTTI4MzVfRlNFTF9BTFQ0ID0gMywKKwlCQ00yODM1X0ZTRUxfQUxUNSA9IDIsCisJQkNNMjgzNV9GU0VMX0NPVU5UID0gOCwKKwlCQ00yODM1X0ZTRUxfTUFTSyA9IDB4NywKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgYmNtMjgzNV9mdW5jdGlvbnNbQkNNMjgzNV9GU0VMX0NPVU5UXSA9IHsKKwlbQkNNMjgzNV9GU0VMX0dQSU9fSU5dID0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25lIGJpdCAoY29ycmVzcG9uZGluZyB0byB0aGUgR1BJTyBwaW4pIGluIGEKKyAqICBDeWdudXMgR1BJTyByZWdpc3RlcgorICoKKyAqICBAY3lnbnVzX2dwaW86IEN5Z251cyBHUElPIGRldmljZQorICogIEByZWc6IHJlZ2lzdGVyIG9mZnNldAorICogIEBncGlvOiBHUElPIHBpbgorICogIEBzZXQ6IHNldCBvciBjbGVhcgorICovCitzdGF0aWMgaW5saW5lIHZvaWQgY3lnbnVzX3NldF9iaXQoc3RydWN0IGN5Z251c19ncGlvICpjaGlwLCB1bnNpZ25lZCBpbnQgcmVnLAorCQkJCSAgdW5zaWduZWQgZ3BpbywgYm9vbCBzZXQpCit7CisJdW5zaWduZWQgaW50IG9mZnNldCA9IENZR05VU19HUElPX1JFRyhncGlvLCByZWcpOworCXVuc2lnbmVkIGludCBzaGlmdCA9IENZR05VU19HUElPX1NISUZUKGdwaW8pOworCXUzMiB2YWw7CisKKwl2YWwgPSByZWFkbChjaGlwLT5iYXNlICsgb2Zmc2V0KTsKKwlpZiAoc2V0KQorCQl2YWwgfD0gQklUKHNoaWZ0KTsKKwllbHNlCisJCXZhbCAmPSB+QklUKHNoaWZ0KTsKKwl3cml0ZWwodmFsLCBjaGlwLT5iYXNlICsgb2Zmc2V0KTsKK30KKworc3RhdGljIGlubGluZSBib29sIGN5Z251c19nZXRfYml0KHN0cnVjdCBjeWdudXNfZ3BpbyAqY2hpcCwgdW5zaWduZWQgaW50IHJlZywKKwkJCQkgIHVuc2lnbmVkIGdwaW8pCit7CisJdW5zaWduZWQgaW50IG9mZnNldCA9IENZR05VU19HUElPX1JFRyhncGlvLCByZWcpOworCXVuc2lnbmVkIGludCBzaGlmdCA9IENZR05VU19HUElPX1NISUZUKGdwaW8pOworCisJcmV0dXJuICEhKHJlYWRsKGNoaXAtPmJhc2UgKyBvZmZzZXQpICYgQklUKHNoaWZ0KSk7Cit9CisKK3N0YXRpYyB2b2lkIGN5Z251c19ncGlvX2lycV9oYW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SwgImdwaW83IiwgMCwgMCwgMCksCisJQ1lHTlVTX1BJTl9ERVNDKDIwLCAiZ3BpbzgiLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoMjEsICJncGlvOSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyMiwgImdwaW8xMCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyMywgImdwaW8xMSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNCwgImdwaW8xMiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNSwgImdwaW8xMyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNiwgImdwaW8xNCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNywgImdwaW8xNSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyOCwgImdwaW8xNiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyOSwgImdwaW8xNyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMCwgImdwaW8xOCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMSwgImdwaW8xOSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMiwgImdwaW8yMCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMywgImdwaW8yMSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNCwgImdwaW8yMiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNSwgImdwaW8yMyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNiwgIm1kYyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNywgIm1kaW8iLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoMzgsICJwd20wIiwgMSwgMHgxMCwgMzApLAorCUNZR05VU19QSU5fREVTQygzOSwgInB3bTEiLCAxLCAweDEwLCAyOCksCisJQ1lHTlVT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c29jLT5ucGlucywgc2l6ZW9mKCpwYWRzKSwgR0ZQX0tFUk5FTCk7CisJaWYgKCFwYWRzKQorCQlyZXR1cm4gLUVOT01FTTsKKworCWNvbW11bml0aWVzID0gZGV2bV9rY2FsbG9jKHBjdHJsLT5kZXYsIHBjdHJsLT5uY29tbXVuaXRpZXMsCisJCQkJICAgc2l6ZW9mKCpjb21tdW5pdGllcyksIEdGUF9LRVJORUwpOworCWlmICghY29tbXVuaXRpZXMpCisJCXJldHVybiAtRU5PTUVNOworCisKKwlmb3IgKGkgPSAwOyBpIDwgcGN0cmwtPm5jb21tdW5pdGllczsgaSsrKSB7CisJCXN0cnVjdCBpbnRlbF9jb21tdW5pdHkgKmNvbW11bml0eSA9ICZwY3RybC0+Y29tbXVuaXRpZXNbaV07CisJCXUzMiAqaW50bWFzazsKKworCQlpbnRtYXNrID0gZGV2bV9rY2FsbG9jKHBjdHJsLT5kZXYsIGNvbW11bml0eS0+bmdwcHMsCisJCQkJICAgICAgIHNpemVvZigqaW50bWFzayksIEdGUF9LRVJORUwpOworCQlpZiAoIWludG1hc2spCisJCQlyZXR1cm4gLUVOT01FTTsKKworCQljb21tdW5pdGllc1tpXS5pbnRtYXNrID0gaW50bWFzazsKKwl9CisKKwlwY3RybC0+Y29udGV4dC5wYWRzID0gcGFkczsKKwlwY3RybC0+Y29udGV4dC5jb21tdW5pdGllcyA9IGNvbW11bml0aWVzOworI2VuZGlmCisKKwlyZXR1cm4gMDsKK30KKworaW50IGludGVsX3BpbmN0cmxfcHJvYmUoc3RydWN0IHBsYXRmb3JtX2RldmljZSAqcGRldiwKKwkJCWNvbnN0IHN0cnVjdCBpbnRlbF9waW5jdHJsX3NvY19kYXRhICpzb2NfZGF0YSkKK3sKKwlzdHJ1Y3QgaW50ZWxfcGluY3RybCAqcGN0cmw7CisJaW50IGksIHJldCwgaXJxOworCisJaWYgKCFzb2NfZGF0YSkKKwkJcmV0dXJuIC1FSU5WQUw7CisKKwlwY3RybCA9IGRldm1f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JCQkgICAgICBzdHJ1Y3QgcGluY3RybF9tYXAgKiptYXAsCisJCQkJICAgICAgdW5zaWduZWQgKnJlc2VydmVkX21hcHMsCisJCQkJICAgICAgdW5zaWduZWQgKm51bV9tYXBzKQoreworCXN0cnVjdCBwcm9wZXJ0eSAqcGluczsKKwl1MzIgcGluZnVuYywgcGluLCBmdW5jOworCWludCBudW1fcGlucywgbnVtX2Z1bmNzLCBtYXBzX3Blcl9waW47CisJdW5zaWduZWQgbG9uZyAqY29uZmlnczsKKwl1bnNpZ25lZCBpbnQgbnVtX2NvbmZpZ3M7CisJYm9vbCBoYXNfY29uZmlnID0gMDsKKwlpbnQgaSwgZXJyOworCXVuc2lnbmVkIHJlc2VydmUgPSAwOworCXN0cnVjdCBtdGtfcGluY3RybF9ncm91cCAqZ3JwOworCXN0cnVjdCBtdGtfcGluY3RybCAqcGN0bCA9IHBpbmN0cmxfZGV2X2dldF9kcnZkYXRhKHBjdGxkZXYpOworCisJcGlucyA9IG9mX2ZpbmRfcHJvcGVydHkobm9kZSwgInBpbm11eCIsIE5VTEwpOworCWlmICghcGlucykgeworCQlkZXZfZXJyKHBjdGwtPmRldiwgIm1pc3NpbmcgcGlucyBwcm9wZXJ0eSBpbiBub2RlICVzIC5cbiIsCisJCQkJbm9kZS0+bmFtZSk7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCWVyciA9IHBpbmNvbmZfZ2VuZXJpY19wYXJzZV9kdF9jb25maWcobm9kZSwgcGN0bGRldiwgJmNvbmZpZ3MsCisJCSZudW1fY29uZmlncyk7CisJaWYgKG51bV9jb25maWdzKQorCQloYXNfY29uZmlnID0gMTsKKworCW51bV9waW5zID0gcGlucy0+bGVuZ3RoIC8gc2l6ZW9mKHUzMik7CisJbnVtX2Z1bmNzID0gbnVtX3BpbnM7CisJbWFwc19wZXJfcGluID0gMDsKKwlpZiAobnVtX2Z1bmNzKQorCQltYXBzX3Blcl9waW4rKzsKKwlpZiAoaGFzX2NvbmZpZyAmJiBudW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dW5zaWduZWQgbG9uZyBtb2RlKQoreworCXVuc2lnbmVkIGludCByZWdfYWRkcjsKKwl1bnNpZ25lZCBjaGFyIGJpdDsKKwl1bnNpZ25lZCBpbnQgdmFsOworCXVuc2lnbmVkIGludCBtYXNrID0gKDFMIDw8IEdQSU9fTU9ERV9CSVRTKSAtIDE7CisJc3RydWN0IG10a19waW5jdHJsICpwY3RsID0gcGluY3RybF9kZXZfZ2V0X2RydmRhdGEocGN0bGRldik7CisKKwlyZWdfYWRkciA9ICgocGluIC8gTUFYX0dQSU9fTU9ERV9QRVJfUkVHKSA8PCBwY3RsLT5kZXZkYXRhLT5wb3J0X3NoZikKKwkJCSsgcGN0bC0+ZGV2ZGF0YS0+cGlubXV4X29mZnNldDsKKworCWJpdCA9IHBpbiAlIE1BWF9HUElPX01PREVfUEVSX1JFRzsKKwltYXNrIDw8PSAoR1BJT19NT0RFX0JJVFMgKiBiaXQpOworCXZhbCA9IChtb2RlIDw8IChHUElPX01PREVfQklUUyAqIGJpdCkpOworCXJldHVybiByZWdtYXBfdXBkYXRlX2JpdHMobXRrX2dldF9yZWdtYXAocGN0bCwgcGluKSwKKwkJCXJlZ19hZGRyLCBtYXNrLCB2YWwpOworfQorCitzdGF0aWMgY29uc3Qgc3RydWN0IG10a19kZXNjX3BpbiAqCittdGtfZmluZF9waW5fYnlfZWludF9udW0oc3RydWN0IG10a19waW5jdHJsICpwY3RsLCB1bnNpZ25lZCBpbnQgZWludF9udW0pCit7CisJaW50IGk7CisJY29uc3Qgc3RydWN0IG10a19kZXNjX3BpbiAqcGluOworCisJZm9yIChpID0gMDsgaSA8IHBjdGwtPmRldmRhdGEtPm5waW5zOyBpKyspIHsKKwkJcGluID0gcGN0bC0+ZGV2ZGF0YS0+cGlucyArIGk7CisJCWlmIChwaW4tPmVpbnQuZWludG51bSA9PSBlaW50X251bSkKKwkJCXJldHVybiBwaW47CisJfQorCisJcmV0dXJuIE5VTEw7Cit9CisKK3N0YXRpYyBpbnQgbXRrX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gIlNSQ0xLRU5BMCIpLAorCQlNVEtfRlVOQ1RJT04oNSwgIkkyUzJfQkNLIiksCisJCU1US19GVU5DVElPTig3LCAiREJHX01PTl9BXzMyXyIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTigxNCwgIkVJTlQxNCIpLAorCQlOVUxMLCAibXQ4MTczIiwKKwkJTVRLX0VJTlRfRlVOQ1RJT04oMCwgMTQpLAorCQlNVEtfRlVOQ1RJT04oMCwgIkdQSU8xNCIpLAorCQlNVEtfRlVOQ1RJT04oMSwgIkNNREFUMCIpLAorCQlNVEtfRlVOQ1RJT04oMiwgIkNNQ1NEMCIpLAorCQlNVEtfRlVOQ1RJT04oNCwgIkNMS00yIiksCisJCU1US19GVU5DVElPTig3LCAiREJHX01PTl9CXzZfIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDE1LCAiRUlOVDE1IiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNSksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE1IiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQxIiksCisJCU1US19GVU5DVElPTigyLCAiQ01DU0QxIiksCisJCU1US19GVU5DVElPTigzLCAiQ01GTEFTSCIpLAorCQlNVEtfRlVOQ1RJT04oNCwgIkNMS00zIiksCisJCU1US19GVU5DVElPTig3LCAiREJHX01PTl9CXzI5XyIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTigxNiwgIklERElHIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNiksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE2IiksCisJCU1US19GVU5DVElPTigxLCAiSURESUciKSwKKwkJTVRLX0ZVTkNUSU9OKDIsICJDTUZMQVNIIiksCisJCU1US19GVU5DVElPTig0LCAiUFdNNSIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTigxNywgIldBVENIRE9HIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNyksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE3IiksCisJCU1US19GVU5DVElPTigxLCAiV0FUQ0hET0dfQU8iKQorCSksCisJTVRLX1BJTigKKwkJUElOQ1RSTF9QSU4oMTgsICJDRUMiKSwKKwkJTlVMTCwgIm10ODE3MyIsCisJCU1US19FSU5UX0ZVTkNUSU9OKDAsIDE4KSwKKwkJTVRLX0ZVTkNUSU9OKDAsICJHUElPMTgiKSwKKwkJTVRLX0ZVTkNUSU9OKDEsICJDRUMiKQorCSksCisJTVRLX1BJTigKKwkJUElOQ1RSTF9QSU4oMTksICJIRE1JU0NLIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxOSksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE5IiksCisJCU1US19GVU5DVElPTigxLCAiSERNSVNDSyIpLAorCQlNVEtfRlVOQ1RJT04oMiwgIkhEQ1BfU0NMIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDIwLCAiSERNSVNEIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAyMCksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzIwIiksCisJCU1US19GVU5DVElPTigxLCAiSERNSVNEIiksCisJCU1US19GVU5DVElPTigyLCAiSERDUF9TREEiKQorCSksCisJTVRLX1BJTigKKwkJUElOQ1RSTF9QSU4oMjEsICJIVFBMRyIpLAorCQlOVUxMLCAibXQ4MTczIiwKKwkJTVRLX0VJTlRfRlVOQ1RJT04oMCwgMjEpLAorCQlNVEtfRlVOQ1RJT04oMCwgIkdQSU8yMSIpLAorCQlNVEtfRlVOQ1RJT04oMSwgIkhUUExHIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDIyLCAiTVNEQzNfREFUMCIp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SwKKwkJTlVMTCwgIm10ODE3MyIsCisJCU1US19FSU5UX0ZVTkNUSU9OKDAsIDUwKSwKKwkJTVRLX0ZVTkNUSU9OKDAsICJHUElPNTAiKSwKKwkJTVRLX0ZVTkNUSU9OKDEsICJDTURBVDUiKQorCSksCisJTVRLX1BJTigKKwkJUElOQ1RSTF9QSU4oNTEsICJSQ05fQSIpLAorCQlOVUxMLCAibXQ4MTczIiwKKwkJTVRLX0VJTlRfRlVOQ1RJT04oMCwgNTEpLAorCQlNVEtfRlVOQ1RJT04oMCwgIkdQSU81MSIpLAorCQlNVEtfRlVOQ1RJT04oMSwgIkNNREFUNiIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTig1MiwgIlJDUF9BIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCA1MiksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzUyIiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQ3IikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDUzLCAiUkROMl9BIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCA1MyksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzUzIiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQ4IiksCisJCU1US19GVU5DVElPTigyLCAiQ01DU0QzIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDU0LCAiUkRQMl9BIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCA1NCksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzU0IiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQ5IiksCisJCU1US19GVU5DVElPTigyLCAiQ01DU0QyIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDU1LCAiUkROM19BIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNV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U9BT181KSwKLQlNRVNPTl9QSU4oR1BJT0FPXzYpLAotCU1FU09OX1BJTihHUElPQU9fNyksCi0JTUVTT05fUElOKEdQSU9BT184KSwKLQlNRVNPTl9QSU4oR1BJT0FPXzkpLAotCU1FU09OX1BJTihHUElPQU9fMTApLAotCU1FU09OX1BJTihHUElPQU9fMTEpLAotCU1FU09OX1BJTihHUElPQU9fMTIpLAotCU1FU09OX1BJTihHUElPQU9fMTMpLAotCU1FU09OX1BJTihHUElPX0JTRF9FTiksCi0JTUVTT05fUElOKEdQSU9fVEVTVF9OKSwKKwlNRVNPTl9QSU4oR1BJT1hfMCwgMCksCisJTUVTT05fUElOKEdQSU9YXzEsIDApLAorCU1FU09OX1BJTihHUElPWF8yLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMywgMCksCisJTUVTT05fUElOKEdQSU9YXzQsIDApLAorCU1FU09OX1BJTihHUElPWF81LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfNiwgMCksCisJTUVTT05fUElOKEdQSU9YXzcsIDApLAorCU1FU09OX1BJTihHUElPWF84LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfOSwgMCksCisJTUVTT05fUElOKEdQSU9YXzEwLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTEsIDApLAorCU1FU09OX1BJTihHUElPWF8xMiwgMCksCisJTUVTT05fUElOKEdQSU9YXzEzLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTQsIDApLAorCU1FU09OX1BJTihHUElPWF8xNSwgMCksCisJTUVTT05fUElOKEdQSU9YXzE2LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTcsIDApLAorCU1FU09OX1BJTihHUElPWF8xOCwgMCksCisJTUVTT05fUElOKEdQSU9YXzE5LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMjAsIDApLAorCU1FU09OX1BJTihHUElPWF8yMSwgMCksCisJTUVTT05fUElOKEdQSU9ZXzAsIDApLAorCU1FU09OX1BJTihHU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JT0FPXzQsIEFPX09GRikgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgaTJjX21zdF9zZGFfYW9fcGluc1tdID0geyBQSU4oR1BJT0FPXzUsIEFPX09GRikgfTsKIAogc3RhdGljIHN0cnVjdCBtZXNvbl9wbXhfZ3JvdXAgbWVzb244X2dyb3Vwc1tdID0gewotCUdQSU9fR1JPVVAoR1BJT1hfMCksCi0JR1BJT19HUk9VUChHUElPWF8xKSwKLQlHUElPX0dST1VQKEdQSU9YXzIpLAotCUdQSU9fR1JPVVAoR1BJT1hfMyksCi0JR1BJT19HUk9VUChHUElPWF80KSwKLQlHUElPX0dST1VQKEdQSU9YXzUpLAotCUdQSU9fR1JPVVAoR1BJT1hfNiksCi0JR1BJT19HUk9VUChHUElPWF83KSwKLQlHUElPX0dST1VQKEdQSU9YXzgpLAotCUdQSU9fR1JPVVAoR1BJT1hfOSksCi0JR1BJT19HUk9VUChHUElPWF8xMCksCi0JR1BJT19HUk9VUChHUElPWF8xMSksCi0JR1BJT19HUk9VUChHUElPWF8xMiksCi0JR1BJT19HUk9VUChHUElPWF8xMyksCi0JR1BJT19HUk9VUChHUElPWF8xNCksCi0JR1BJT19HUk9VUChHUElPWF8xNSksCi0JR1BJT19HUk9VUChHUElPWF8xNiksCi0JR1BJT19HUk9VUChHUElPWF8xNyksCi0JR1BJT19HUk9VUChHUElPWF8xOCksCi0JR1BJT19HUk9VUChHUElPWF8xOSksCi0JR1BJT19HUk9VUChHUElPWF8yMCksCi0JR1BJT19HUk9VUChHUElPWF8yMSksCi0JR1BJT19HUk9VUChHUElPWV8wKSwKLQlHUElPX0dST1VQKEdQSU9ZXzEpLAotCUdQSU9fR1JPVVAoR1BJT1lfMiksCi0JR1BJT19HUk9VUChHUElPWV8zKSwKLQlHUElPX0dST1VQKEdQSU9ZXzQpLAotCUdQSU9fR1JPVVAoR1BJT1lfNSksCi0JR1BJT19HUk9VUChHUElPWV82KSwKLQlHUElPX0dST1VQKEdQSU9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9fR1JPVVAoR1BJT1pfNCwgMCksCisJR1BJT19HUk9VUChHUElPWl81LCAwKSwKKwlHUElPX0dST1VQKEdQSU9aXzYsIDApLAorCUdQSU9fR1JPVVAoR1BJT1pfNywgMCksCisJR1BJT19HUk9VUChHUElPWl84LCAwKSwKKwlHUElPX0dST1VQKEdQSU9aXzksIDApLAorCUdQSU9fR1JPVVAoR1BJT1pfMTAsIDApLAorCUdQSU9fR1JPVVAoR1BJT1pfMTEsIDApLAorCUdQSU9fR1JPVVAoR1BJT1pfMTIsIDApLAorCUdQSU9fR1JPVVAoR1BJT1pfMTMsIDApLAorCUdQSU9fR1JPVVAoR1BJT1pfMTQsIDApLAorCUdQSU9fR1JPVVAoR1BJT0FPXzAsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMSwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT18yLCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzMsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fNCwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT181LCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzYsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fNywgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT184LCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzksIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTAsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTEsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTIsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTMsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPX0JTRF9FTiwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9fVEVTVF9OLCBBT19PRkYpLAogCiAJLyogYmFuayBYICovCiAJR1JPVVAoc2RfZDBfYSwJCTgsC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fUElOKEdQSU9YXzIxLCAwKSwKKworCU1FU09OX1BJTihHUElPWV8wLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMSwgMCksCisJTUVTT05fUElOKEdQSU9ZXzMsIDApLAorCU1FU09OX1BJTihHUElPWV82LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfNywgMCksCisJTUVTT05fUElOKEdQSU9ZXzgsIDApLAorCU1FU09OX1BJTihHUElPWV85LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMTAsIDApLAorCU1FU09OX1BJTihHUElPWV8xMSwgMCksCisJTUVTT05fUElOKEdQSU9ZXzEyLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMTMsIDApLAorCU1FU09OX1BJTihHUElPWV8xNCwgMCksCisKKwlNRVNPTl9QSU4oR1BJT0RWXzksIDApLAorCU1FU09OX1BJTihHUElPRFZfMjQsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjUsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjYsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjcsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjgsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjksIDApLAorCisJTUVTT05fUElOKEdQSU9IXzAsIDApLAorCU1FU09OX1BJTihHUElPSF8xLCAwKSwKKwlNRVNPTl9QSU4oR1BJT0hfMiwgMCksCisJTUVTT05fUElOKEdQSU9IXzMsIDApLAorCU1FU09OX1BJTihHUElPSF80LCAwKSwKKwlNRVNPTl9QSU4oR1BJT0hfNSwgMCksCisJTUVTT05fUElOKEdQSU9IXzYsIDApLAorCU1FU09OX1BJTihHUElPSF83LCAwKSwKKwlNRVNPTl9QSU4oR1BJT0hfOCwgMCksCisJTUVTT05fUElOKEdQSU9IXzksIDApLAorCisJTUVTT05fUElOKENBUkRfMCwgMCksCisJTUVTT05fUElOKENBUkRfMSwgMCksCisJTUVTT05fUElOKENBUkRfMiwgMCksCisJTUVTT05fUElOKENBUkRfMywgMCksC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UElPWF83LCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzgsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfOSwgMCksCisJR1BJT19HUk9VUChHUElPWF8xMCwgMCksCisJR1BJT19HUk9VUChHUElPWF8xMSwgMCksCisJR1BJT19HUk9VUChHUElPWF8xNiwgMCksCisJR1BJT19HUk9VUChHUElPWF8xNywgMCksCisJR1BJT19HUk9VUChHUElPWF8xOCwgMCksCisJR1BJT19HUk9VUChHUElPWF8xOSwgMCksCisJR1BJT19HUk9VUChHUElPWF8yMCwgMCksCisJR1BJT19HUk9VUChHUElPWF8yMSwgMCksCisKKwlHUElPX0dST1VQKEdQSU9ZXzAsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMSwgMCksCisJR1BJT19HUk9VUChHUElPWV8zLCAwKSwKKwlHUElPX0dST1VQKEdQSU9ZXzYsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfNywgMCksCisJR1BJT19HUk9VUChHUElPWV84LCAwKSwKKwlHUElPX0dST1VQKEdQSU9ZXzksIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTAsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTEsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTIsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTMsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTQsIDApLAorCisJR1BJT19HUk9VUChHUElPRFZfOSwgMCksCisJR1BJT19HUk9VUChHUElPRFZfMjQsIDApLAorCUdQSU9fR1JPVVAoR1BJT0RWXzI1LCAwKSwKKwlHUElPX0dST1VQKEdQSU9EVl8yNiwgMCksCisJR1BJT19HUk9VUChHUElPRFZfMjcsIDApLAorCUdQSU9fR1JPVVAoR1BJT0RWXzI4LCAwKSwKKwlHUElPX0dST1VQKEdQSU9EVl8yOSwgMCksCisKKwlHUElPX0dST1VQKEdQSU9IXzAsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfMSwgMCksCisJR1BJT19HUk9VUChHUElPSF8yLCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzMsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfNCwgMCksCisJR1BJT19HUk9VUChHUElPSF81LCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzYsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfNywgMCksCisJR1BJT19HUk9VUChHUElPSF84LCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzksIDApLAorCisJR1BJT19HUk9VUChESUZfMF9QLCAwKSwKKwlHUElPX0dST1VQKERJRl8wX04sIDApLAorCUdQSU9fR1JPVVAoRElGXzFfUCwgMCksCisJR1BJT19HUk9VUChESUZfMV9OLCAwKSwKKwlHUElPX0dST1VQKERJRl8yX1AsIDApLAorCUdQSU9fR1JPVVAoRElGXzJfTiwgMCksCisJR1BJT19HUk9VUChESUZfM19QLCAwKSwKKwlHUElPX0dST1VQKERJRl8zX04sIDApLAorCUdQSU9fR1JPVVAoRElGXzRfUCwgMCksCisJR1BJT19HUk9VUChESUZfNF9OLCAwKSwKKworCUdQSU9fR1JPVVAoR1BJT0FPXzAsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMSwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT18yLCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzMsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fNCwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT181LCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzYsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fNywgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU9BT184LCBBT19PRkYpLAorCUdQSU9fR1JPVVAoR1BJT0FPXzksIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTAsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMTEsIEFPX09GRiksCis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SygiWCIsICAgIFBJTihHUElPWF8wLCAwKSwJCVBJTihHUElPWF8yMSwgMCksICAgICAgNCwgIDAsICA0LCAgMCwgIDAsICAwLCAgMSwgIDAsICAyLCAgMCksCisJQkFOSygiWSIsICAgIFBJTihHUElPWV8wLCAwKSwJCVBJTihHUElPWV8xNCwgMCksICAgICAgMywgIDAsICAzLCAgMCwgIDMsICAwLCAgNCwgIDAsICA1LCAgMCksCisJQkFOSygiRFYiLCAgIFBJTihHUElPRFZfOSwgMCksCQlQSU4oR1BJT0RWXzI5LCAwKSwgICAgIDAsICAwLCAgMCwgIDAsICA3LCAgMCwgIDgsICAwLCAgOSwgIDApLAorCUJBTksoIkgiLCAgICBQSU4oR1BJT0hfMCwgMCksCQlQSU4oR1BJT0hfOSwgMCksICAgICAgIDEsIDE2LCAgMSwgMTYsICA5LCAxOSwgMTAsIDE5LCAxMSwgMTkpLAorCUJBTksoIkNBUkQiLCBQSU4oQ0FSRF8wLCAwKSwJCVBJTihDQVJEXzYsIDApLCAgICAgICAgMiwgMjAsICAyLCAyMCwgIDAsIDIyLCAgMSwgMjIsICAyLCAyMiksCisJQkFOSygiQk9PVCIsIFBJTihCT09UXzAsIDApLAkJUElOKEJPT1RfMTgsIDApLCAgICAgICAyLCAgMCwgIDIsICAwLCAgOSwgIDAsIDEwLCAgMCwgMTEsICAwKSwKKwlCQU5LKCJESUYiLCAgUElOKERJRl8wX1AsIDApLAkJUElOKERJRl80X04sIDApLCAgICAgICA1LCAgOCwgIDUsICA4LCAxMiwgMTIsIDEzLCAxMiwgMTQsIDEyKSwKK307CisKK3N0YXRpYyBzdHJ1Y3QgbWVzb25fYmFuayBtZXNvbjhiX2FvX2JhbmtzW10gPSB7CisJLyogICBuYW1lICAgIGZpcnN0ICAgICAgICAgICAgICAgICAgbGFzdCAgICAgICAgICAgICAgICAgICAgICBwdWxsZW4gIHB1bGwgICAgZGlyICAgICBvdXQgICAgIGluICAqLworCUJBTksoIkFPIiwgICBQSU4oR1BJT0F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KHJldCkKKwkJcmV0dXJuIHJldDsKKworCWlmIChhbWRfcGluY29uZl9nZXQocGN0bGRldiwgcGluc1swXSwgY29uZmlnKSkKKwkJCXJldHVybiAtRU5PVFNVUFA7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBhbWRfcGluY29uZl9ncm91cF9zZXQoc3RydWN0IHBpbmN0cmxfZGV2ICpwY3RsZGV2LAorCQkJCXVuc2lnbmVkIGdyb3VwLCB1bnNpZ25lZCBsb25nICpjb25maWdzLAorCQkJCXVuc2lnbmVkIG51bV9jb25maWdzKQoreworCWNvbnN0IHVuc2lnbmVkICpwaW5zOworCXVuc2lnbmVkIG5waW5zOworCWludCBpLCByZXQ7CisKKwlyZXQgPSBhbWRfZ2V0X2dyb3VwX3BpbnMocGN0bGRldiwgZ3JvdXAsICZwaW5zLCAmbnBpbnMpOworCWlmIChyZXQpCisJCXJldHVybiByZXQ7CisJZm9yIChpID0gMDsgaSA8IG5waW5zOyBpKyspIHsKKwkJaWYgKGFtZF9waW5jb25mX3NldChwY3RsZGV2LCBwaW5zW2ldLCBjb25maWdzLCBudW1fY29uZmlncykpCisJCQlyZXR1cm4gLUVOT1RTVVBQOworCX0KKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGNvbnN0IHN0cnVjdCBwaW5jb25mX29wcyBhbWRfcGluY29uZl9vcHMgPSB7CisJLnBpbl9jb25maWdfZ2V0CQk9IGFtZF9waW5jb25mX2dldCwKKwkucGluX2NvbmZpZ19zZXQJCT0gYW1kX3BpbmNvbmZfc2V0LAorCS5waW5fY29uZmlnX2dyb3VwX2dldCA9IGFtZF9waW5jb25mX2dyb3VwX2dldCwKKwkucGluX2NvbmZpZ19ncm91cF9zZXQgPSBhbWRfcGluY29uZl9ncm91cF9zZXQsCit9OworCitzdGF0aWMgc3RydWN0IHBpbmN0cmxfZGVzYyBhbWRfcGluY3RybF9kZXNjID0geworCS5waW5zCT0ga2VybmN6X3BpbnMsCisJLm5waW5zID0gQVJSQVl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pLAorCVBJTkNUUkxfUElOKDYxLCAiR1BJT182MSIpLAorCVBJTkNUUkxfUElOKDYyLCAiR1BJT182MiIpLAorCVBJTkNUUkxfUElOKDY0LCAiR1BJT182NCIpLAorCVBJTkNUUkxfUElOKDY1LCAiR1BJT182NSIpLAorCVBJTkNUUkxfUElOKDY2LCAiR1BJT182NiIpLAorCVBJTkNUUkxfUElOKDY4LCAiR1BJT182OCIpLAorCVBJTkNUUkxfUElOKDY5LCAiR1BJT182OSIpLAorCVBJTkNUUkxfUElOKDcwLCAiR1BJT183MCIpLAorCVBJTkNUUkxfUElOKDcxLCAiR1BJT183MSIpLAorCVBJTkNUUkxfUElOKDcyLCAiR1BJT183MiIpLAorCVBJTkNUUkxfUElOKDc0LCAiR1BJT183NCIpLAorCVBJTkNUUkxfUElOKDc1LCAiR1BJT183NSIpLAorCVBJTkNUUkxfUElOKDc2LCAiR1BJT183NiIpLAorCVBJTkNUUkxfUElOKDg0LCAiR1BJT184NCIpLAorCVBJTkNUUkxfUElOKDg1LCAiR1BJT184NSIpLAorCVBJTkNUUkxfUElOKDg2LCAiR1BJT184NiIpLAorCVBJTkNUUkxfUElOKDg3LCAiR1BJT184NyIpLAorCVBJTkNUUkxfUElOKDg4LCAiR1BJT184OCIpLAorCVBJTkNUUkxfUElOKDg5LCAiR1BJT184OSIpLAorCVBJTkNUUkxfUElOKDkwLCAiR1BJT185MCIpLAorCVBJTkNUUkxfUElOKDkxLCAiR1BJT185MSIpLAorCVBJTkNUUkxfUElOKDkyLCAiR1BJT185MiIpLAorCVBJTkNUUkxfUElOKDkzLCAiR1BJT185MyIpLAorCVBJTkNUUkxfUElOKDk1LCAiR1BJT185NSIpLAorCVBJTkNUUkxfUElOKDk2LCAiR1BJT185NiIpLAorCVBJTkNUUkxfUElOKDk3LCAiR1BJT185NyIpLAorCVBJTkNUUkxfUElOKDk4LCAiR1BJT185OCIpLAorCVBJTkNUUkxfUElOKDk5LCAiR1BJT185OSIpLAorCVBJTkNUUkxf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yMyksCi0JQkNNMjgzNV9HUElPX1BJTigyNCksCi0JQkNNMjgzNV9HUElPX1BJTigyNSksCi0JQkNNMjgzNV9HUElPX1BJTigyNiksCi0JQkNNMjgzNV9HUElPX1BJTigyNyksCi0JQkNNMjgzNV9HUElPX1BJTigyOCksCi0JQkNNMjgzNV9HUElPX1BJTigyOSksCi0JQkNNMjgzNV9HUElPX1BJTigzMCksCi0JQkNNMjgzNV9HUElPX1BJTigzMSksCi0JQkNNMjgzNV9HUElPX1BJTigzMiksCi0JQkNNMjgzNV9HUElPX1BJTigzMyksCi0JQkNNMjgzNV9HUElPX1BJTigzNCksCi0JQkNNMjgzNV9HUElPX1BJTigzNSksCi0JQkNNMjgzNV9HUElPX1BJTigzNiksCi0JQkNNMjgzNV9HUElPX1BJTigzNyksCi0JQkNNMjgzNV9HUElPX1BJTigzOCksCi0JQkNNMjgzNV9HUElPX1BJTigzOSksCi0JQkNNMjgzNV9HUElPX1BJTig0MCksCi0JQkNNMjgzNV9HUElPX1BJTig0MSksCi0JQkNNMjgzNV9HUElPX1BJTig0MiksCi0JQkNNMjgzNV9HUElPX1BJTig0MyksCi0JQkNNMjgzNV9HUElPX1BJTig0NCksCi0JQkNNMjgzNV9HUElPX1BJTig0NSksCi0JQkNNMjgzNV9HUElPX1BJTig0NiksCi0JQkNNMjgzNV9HUElPX1BJTig0NyksCi0JQkNNMjgzNV9HUElPX1BJTig0OCksCi0JQkNNMjgzNV9HUElPX1BJTig0OSksCi0JQkNNMjgzNV9HUElPX1BJTig1MCksCi0JQkNNMjgzNV9HUElPX1BJTig1MSksCi0JQkNNMjgzNV9HUElPX1BJTig1MiksCi0JQkNNMjgzNV9HUElPX1BJTig1MyksCi19OwotCi0vKiBvbmUgcGluIHBlciBncm91cCAqLwotc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBiY20yODM1X2dwaW9fZ3JvdXBzW10gPSB7Ci0JImdwaW8wIiwKLQkiZ3BpbzEiLAotCSJncGlvMiIsCi0JImd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cnRzX3BkM19waW5zW10gPSB7CisJVEVHUkFfUElOX1VBUlQzX1JUU19QRDMsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgdWFydDNfY3RzX3BkNF9waW5zW10gPSB7CisJVEVHUkFfUElOX1VBUlQzX0NUU19QRDQsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZG1pYzFfY2xrX3BlMF9waW5zW10gPSB7CisJVEVHUkFfUElOX0RNSUMxX0NMS19QRTAsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZG1pYzFfZGF0X3BlMV9waW5zW10gPSB7CisJVEVHUkFfUElOX0RNSUMxX0RBVF9QRTEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZG1pYzJfY2xrX3BlMl9waW5zW10gPSB7CisJVEVHUkFfUElOX0RNSUMyX0NMS19QRTIsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZG1pYzJfZGF0X3BlM19waW5zW10gPSB7CisJVEVHUkFfUElOX0RNSUMyX0RBVF9QRTMsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZG1pYzNfY2xrX3BlNF9waW5zW10gPSB7CisJVEVHUkFfUElOX0RNSUMzX0NMS19QRTQsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZG1pYzNfZGF0X3BlNV9waW5zW10gPSB7CisJVEVHUkFfUElOX0RNSUMzX0RBVF9QRTUsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcGU2X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEU2LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBlN19waW5zW10gPSB7CisJVEVHUkFfUElOX1BFNywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBnZW4zX2kyY19zY2xfcGYwX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fR0VOM19JMkNfU0NMX1BGMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZC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fcGluc1tdID0geworCVRFR1JBX1BJTl9HRU4xX0kyQ19TREFfUEowLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGdlbjFfaTJjX3NjbF9wajFfcGluc1tdID0geworCVRFR1JBX1BJTl9HRU4xX0kyQ19TQ0xfUEoxLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGdlbjJfaTJjX3NjbF9wajJfcGluc1tdID0geworCVRFR1JBX1BJTl9HRU4yX0kyQ19TQ0xfUEoyLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGdlbjJfaTJjX3NkYV9wajNfcGluc1tdID0geworCVRFR1JBX1BJTl9HRU4yX0kyQ19TREFfUEozLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRhcDRfZnNfcGo0X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fREFQNF9GU19QSjQsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZGFwNF9kaW5fcGo1X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fREFQNF9ESU5fUEo1LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRhcDRfZG91dF9wajZfcGluc1tdID0geworCVRFR1JBX1BJTl9EQVA0X0RPVVRfUEo2LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRhcDRfc2Nsa19wajdfcGluc1tdID0geworCVRFR1JBX1BJTl9EQVA0X1NDTEtfUEo3LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBrMF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwazFfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcGsyX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEsyLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBrM19waW5zW10gPSB7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SQV9QSU5fUFdSX0kyQ19TQ0xfUFkzLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHB3cl9pMmNfc2RhX3B5NF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BXUl9JMkNfU0RBX1BZNCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBjbGtfMzJrX291dF9weTVfcGluc1tdID0geworCVRFR1JBX1BJTl9DTEtfMzJLX09VVF9QWTUsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcHowX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUFowLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHB6MV9waW5zW10gPSB7CisJVEVHUkFfUElOX1BaMSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwejJfcGluc1tdID0geworCVRFR1JBX1BJTl9QWjIsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcHozX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUFozLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHB6NF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BaNCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwejVfcGluc1tdID0geworCVRFR1JBX1BJTl9QWjUsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZGFwMl9mc19wYWEwX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fREFQMl9GU19QQUEwLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRhcDJfc2Nsa19wYWExX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fREFQMl9TQ0xLX1BBQTEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZGFwMl9kaW5fcGFhMl9waW5zW10gPSB7CisJVEVHUkFfUElOX0RBUDJfRElOX1BBQTIsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZGFwMl9kb3V0X3BhYTNfcG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WQgZHJpdmVfcGU3X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEU3LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BoNl9waW5zW10gPSB7CisJVEVHUkFfUElOX1BINiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wazBfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzAsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGsxX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEsxLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BrMl9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLMiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wazNfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzMsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGs0X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEs0LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BrNV9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLNSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wazZfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzYsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGs3X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEs3LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BsMF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BMMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wbDFfcGluc1tdID0geworCVRFR1JBX1BJTl9QTDEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcHowX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUFowLAorf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gLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jMV9jbWRfcG0xLCAgICAgICBTRE1NQzEsICAgICBTUEkzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMDA0LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMxX2RhdDNfcG0yLCAgICAgIFNETU1DMSwgICAgIFNQSTMsICAgUlNWRDIsIFJTVkQzLCAweDMwMDgsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzFfZGF0Ml9wbTMsICAgICAgU0RNTUMxLCAgICAgU1BJMywgICBSU1ZEMiwgUlNWRDMsIDB4MzAwYywgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jMV9kYXQxX3BtNCwgICAgICBTRE1NQzEsICAgICBTUEkzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMDEwLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMxX2RhdDBfcG01LCAgICAgIFNETU1DMSwgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwMTQsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzNfY2xrX3BwMCwgICAgICAgU0RNTUMzLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAxYywgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jM19jbWRfcHAxLCAgICAgICBTRE1NQzMsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDIwLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMzX2RhdDBfcHA1LCAgICAgIFNETU1DMywgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwMjQsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzNfZGF0MV9wcDQsICAgICAgU0RNTUMzLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAyOCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jM19kYXQyX3BwMywgICAgICBTRE1NQzMsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDJjLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMzX2RhdDNfcHAyLCAgICAgIFNETU1DMywgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwMzAsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwZXhfbDBfcnN0X25fcGEwLCAgICAgUEUwLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAzOCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweGE1YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBleF9sMF9jbGtyZXFfbl9wYTEsICBQRTAsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDNjLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTU4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGV4X3dha2Vfbl9wYTIsICAgICAgIFBFLCAgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNDAsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhNjgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwZXhfbDFfcnN0X25fcGEzLCAgICAgUEUxLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA0NCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweGE2NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBleF9sMV9jbGtyZXFfbl9wYTQsICBQRTEsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDQ4LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTYwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2F0YV9sZWRfYWN0aXZlX3BhNSwgIFNBVEEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNGMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhOTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzcGkxX21vc2lfcGMwLCAgICAgICAgU1BJMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA1MCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFlMCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMV9taXNvX3BjMSwgICAgICAgIFNQSTEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNTQsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZGMsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTFfc2NrX3BjMiwgICAgICAgICBTUEkxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDU4LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWU0LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkxX2NzMF9wYzMsICAgICAgICAgU1BJMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA1YywgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFkNCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMV9jczFfcGM0LCAgICAgICAgIFNQSTEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNjAsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZDgsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTJfbW9zaV9wYjQsICAgICAgICBTUEkyLCAgICAgICBEVFYsICAgIFJTVkQyLCBSU1ZEMywgMHgzMDY0LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWY0LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkyX21pc29fcGI1LCAgICAgICAgU1BJMiwgICAgICAgRFRWLCAgICBSU1ZEMiwgUlNWRDMsIDB4MzA2OCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFmMCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMl9zY2tfcGI2LCAgICAgICAgIFNQSTIsICAgICAgIERUViwgICAgUlNWRDIsIFJTVkQzLCAweDMwNmMsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZjgsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTJfY3MwX3BiNywgICAgICAgICBTUEkyLCAgICAgICBEVFYsICAgIFJTVkQyLCBSU1ZEMywgMHgzMDcwLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWU4LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkyX2NzMV9wZGQwLCAgICAgICAgU1BJMiwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA3NCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFlYywgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpNF9tb3NpX3BjNywgICAgICAgIFNQSTQsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNzgsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhiMDQsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTRfbWlzb19wZDAsICAgICAgICBTUEk0LCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDdjLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YjAwLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGk0X3Nja19wYzUsICAgICAgICAgU1BJNCwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA4MCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGIwOCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpNF9jczBfcGM2LCAgICAgICAgIFNQSTQsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwODQsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZmMsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHFzcGlfc2NrX3BlZTAsICAgICAgICBRU1BJLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDg4LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YTkwLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChxc3BpX2NzX25fcGVlMSwgICAgICAgUVNQSSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA4YywgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHFzcGlfaW8wX3BlZTIsICAgICAgICBRU1BJLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDkwLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocXNwaV9pbzFfcGVlMywgICAgICAgIFFTUEksICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwOTQsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChxc3BpX2lvMl9wZWU0LCAgICAgICAgUVNQSSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA5OCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHFzcGlfaW8zX3BlZTUsICAgICAgICBRU1BJLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDljLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZG1pYzFfY2xrX3BlMCwgICAgICAgIERNSUMxLCAgICAgIEkyUzMsICAgUlNWRDIsIFJTVkQzLCAweDMwYTQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5ODQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkbWljMV9kYXRfcGUxLCAgICAgICAgRE1JQzEsICAgICAgSTJTMywgICBSU1ZEMiwgUlNWRDMsIDB4MzBhOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk4OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRtaWMyX2Nsa19wZTIsICAgICAgICBETUlDMiwgICAgICBJMlMzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMGFjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OThjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZG1pYzJfZGF0X3BlMywgICAgICAgIERNSUMyLCAgICAgIEkyUzMsICAgUlNWRDIsIFJTVkQzLCAweDMwYjAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5OTAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkbWljM19jbGtfcGU0LCAgICAgICAgRE1JQzMsICAgICAgSTJTNUEsICBSU1ZEMiwgUlNWRDMsIDB4MzBiNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk5NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRtaWMzX2RhdF9wZTUsICAgICAgICBETUlDMywgICAgICBJMlM1QSwgIFJTVkQyLCBSU1ZEMywgMHgzMGI4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTk4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ2VuMV9pMmNfc2NsX3BqMSwgICAgIEkyQzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwYmMsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg5YTgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChnZW4xX2kyY19zZGFfcGowLCAgICAgSTJDMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBjMCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweDlhYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdlbjJfaTJjX3NjbF9wajIsICAgICBJMkMyLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGM0LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OWIwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ2VuMl9pMmNfc2RhX3BqMywgICAgIEkyQzIsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwYzgsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg5YjQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChnZW4zX2kyY19zY2xfcGYwLCAgICAgSTJDMywgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBjYywgTiwgICBOLCAgICAgICBZLCAgICAgICAweDliOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdlbjNfaTJjX3NkYV9wZjEsICAgICBJMkMzLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGQwLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OWJjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtX2kyY19zY2xfcHMyLCAgICAgIEkyQzMsICAgICAgIEkyQ1ZJLCAgUlNWRDIsIFJTVkQzLCAweDMwZDQsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg5MzQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW1faTJjX3NkYV9wczMsICAgICAgSTJDMywgICAgICAgSTJDVkksICBSU1ZEMiwgUlNWRDMsIDB4MzBkOCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweDkzOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHB3cl9pMmNfc2NsX3B5MywgICAgICBJMkNQTVUsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGRjLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTZjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocHdyX2kyY19zZGFfcHk0LCAgICAgIEkyQ1BNVSwgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwZTAsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhNzAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0MV90eF9wdTAsICAgICAgICAgVUFSVEEsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBlNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIyOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQxX3J4X3B1MSwgICAgICAgICBVQVJUQSwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGU4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjI0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDFfcnRzX3B1MiwgICAgICAgIFVBUlRBLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwZWMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMjAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0MV9jdHNfcHUzLCAgICAgICAgVUFSVEEsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBmMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIxYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQyX3R4X3BnMCwgICAgICAgICBVQVJUQiwgICAgICBJMlM0QSwgIFNQRElGLCBVQVJULCAgMHgzMGY0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjM4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDJfcnhfcGcxLCAgICAgICAgIFVBUlRCLCAgICAgIEkyUzRBLCAgU1BESUYsIFVBUlQsICAweDMwZjgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMzQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0Ml9ydHNfcGcyLCAgICAgICAgVUFSVEIsICAgICAgSTJTNEEsICBSU1ZEMiwgVUFSVCwgIDB4MzBmYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIzMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQyX2N0c19wZzMsICAgICAgICBVQVJUQiwgICAgICBJMlM0QSwgIFJTVkQyLCBVQVJULCAgMHgzMTAwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjJjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDNfdHhfcGQxLCAgICAgICAgIFVBUlRDLCAgICAgIFNQSTQsICAgUlNWRDIsIFJTVkQzLCAweDMxMDQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNDgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0M19yeF9wZDIsICAgICAgICAgVUFSVEMsICAgICAgU1BJNCwgICBSU1ZEMiwgUlNWRDMsIDB4MzEwOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI0NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQzX3J0c19wZDMsICAgICAgICBVQVJUQywgICAgICBTUEk0LCAgIFJTVkQyLCBSU1ZEMywgMHgzMTBjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjQwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDNfY3RzX3BkNCwgICAgICAgIFVBUlRDLCAgICAgIFNQSTQsICAgUlNWRDIsIFJTVkQzLCAweDMxMTAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiM2MsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0NF90eF9waTQsICAgICAgICAgVUFSVEQsICAgICAgVUFSVCwgICBSU1ZEMiwgUlNWRDMsIDB4MzExNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI1OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQ0X3J4X3BpNSwgICAgICAgICBVQVJURCwgICAgICBVQVJULCAgIFJTVkQyLCBSU1ZEMywgMHgzMTE4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjU0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDRfcnRzX3BpNiwgICAgICAgIFVBUlRELCAgICAgIFVBUlQsICAgUlNWRDIsIFJTVkQzLCAweDMxMWMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNTAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0NF9jdHNfcGk3LCAgICAgICAgVUFSVEQsICAgICAgVUFSVCwgICBSU1ZEMiwgUlNWRDMsIDB4MzEyMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI0YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRhcDFfZnNfcGIwLCAgICAgICAgICBJMlMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTI0LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4OTVjLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChkYXAxX2Rpbl9wYjEsICAgICAgICAgSTJTMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzEyOCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweDk1NCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoZGFwMV9kb3V0X3BiMiwgICAgICAgIEkyUzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxMmMsIFksICAgWSwgICAgICAgTiwgICAgICAgMHg5NTgsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKGRhcDFfc2Nsa19wYjMsICAgICAgICBJMlMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTMwLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4OTYwLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChkYXAyX2ZzX3BhYTAsICAgICAgICAgSTJTMiwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzEzNCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweDk2YywgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoZGFwMl9kaW5fcGFhMiwgICAgICAgIEkyUzIsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxMzgsIFksICAgWSwgICAgICAgTiwgICAgICAgMHg5NjQsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKGRhcDJfZG91dF9wYWEzLCAgICAgICBJMlMyLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTNjLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4OTY4LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChkYXAyX3NjbGtfcGFhMSwgICAgICAgSTJTMiwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE0MCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweDk3MCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoZGFwNF9mc19wajQsICAgICAgICAgIEkyUzRCLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNDQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5N2MsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkYXA0X2Rpbl9wajUsICAgICAgICAgSTJTNEIsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE0OCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk3NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRhcDRfZG91dF9wajYsICAgICAgICBJMlM0QiwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTRjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTc4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZGFwNF9zY2xrX3BqNywgICAgICAgIEkyUzRCLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNTAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5ODAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW0xX21jbGtfcHMwLCAgICAgICAgRVhUUEVSSVBIMywgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE1NCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkxOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbTJfbWNsa19wczEsICAgICAgICBFWFRQRVJJUEgzLCBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTU4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTI0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoanRhZ19ydGNrLCAgICAgICAgICAgIEpUQUcsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNWMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhMmMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjbGtfMzJrX2luLCAgICAgICAgICAgQ0xLLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE2MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk0MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNsa18zMmtfb3V0X3B5NSwgICAgICBTT0MsICAgICAgICBCTElOSywgIFJTVkQyLCBSU1ZEMywgMHgzMTY0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTQ0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYmF0dF9iY2wsICAgICAgICAgICAgIEJDTCwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNjgsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg4ZjgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjbGtfcmVxLCAgICAgICAgICAgICAgU1lTLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE2YywgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk0OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNwdV9wd3JfcmVxLCAgICAgICAgICBDUFUsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTcwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTUwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocHdyX2ludF9uLCAgICAgICAgICAgIFBNSSwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNzQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhNzQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzaHV0ZG93biwgICAgICAgICAgICAgU0hVVERPV04sICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE3OCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGFjOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNvcmVfcHdyX3JlcSwgICAgICAgICBDT1JFLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTdjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTRjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYXVkX21jbGtfcGJiMCwgICAgICAgIEFVRCwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxODAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg4ZjQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkdmZzX3B3bV9wYmIxLCAgICAgICAgUlNWRDAsICAgICAgQ0xEVkZTLCBTUEkzLCAgUlNWRDMsIDB4MzE4NCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDlhNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGR2ZnNfY2xrX3BiYjIsICAgICAgICBSU1ZEMCwgICAgICBDTERWRlMsIFNQSTMsICBSU1ZEMywgMHgzMTg4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OWEwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ3Bpb194MV9hdWRfcGJiMywgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgU1BJMywgIFJTVkQzLCAweDMxOGMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhMTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChncGlvX3gzX2F1ZF9wYmI0LCAgICAgUlNWRDAsICAgICAgUlNWRDEsICBTUEkzLCAgUlNWRDMsIDB4MzE5MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGExOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBjYzcsICAgICAgICAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTk0LCBOLCAgIE4sICAgICAgIFksICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoaGRtaV9jZWNfcGNjMCwgICAgICAgIENFQywgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxOTgsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhMjQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChoZG1pX2ludF9kcF9ocGRfcGNjMSwgRFAsICAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE5YywgTiwgICBOLCAgICAgICBZLCAgICAgICAweGEyOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNwZGlmX291dF9wY2MyLCAgICAgICBTUERJRiwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWEwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YWQwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc3BkaWZfaW5fcGNjMywgICAgICAgIFNQRElGLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYTQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhY2MsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1c2JfdmJ1c19lbjBfcGNjNCwgICAgVVNCLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFhOCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweGI1YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVzYl92YnVzX2VuMV9wY2M1LCAgICBVU0IsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWFjLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YjYwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZHBfaHBkMF9wY2M2LCAgICAgICAgIERQLCAgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYjAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5OWMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh3aWZpX2VuX3BoMCwgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFiNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI2NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHdpZmlfcnN0X3BoMSwgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWI4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjY4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAod2lmaV93YWtlX2FwX3BoMiwgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYmMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNmMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChhcF93YWtlX2J0X3BoMywgICAgICAgUlNWRDAsICAgICAgVUFSVEIsICBTUERJRiwgUlNWRDMsIDB4MzFjMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDhlYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGJ0X3JzdF9waDQsICAgICAgICAgICBSU1ZEMCwgICAgICBVQVJUQiwgIFNQRElGLCBSU1ZEMywgMHgzMWM0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OGZjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYnRfd2FrZV9hcF9waDUsICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYzgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MDAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChhcF93YWtlX25mY19waDcsICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFjYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweDhmMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKG5mY19lbl9waTAsICAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWQwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTUwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobmZjX2ludF9waTEsICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZDQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhNTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChncHNfZW5fcGkyLCAgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFkOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGExYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdwc19yc3RfcGkzLCAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWRjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTIwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtX3JzdF9wczQsICAgICAgICAgIFZHUDEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZTAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5M2MsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW1fYWZfZW5fcHM1LCAgICAgICAgVklNQ0xLLCAgICAgVkdQMiwgICBSU1ZEMiwgUlNWRDMsIDB4MzFlNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkyYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbV9mbGFzaF9lbl9wczYsICAgICBWSU1DTEssICAgICBWR1AzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMWU4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTMwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtMV9wd2RuX3BzNywgICAgICAgIFZHUDQsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZWMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MWMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW0yX3B3ZG5fcHQwLCAgICAgICAgVkdQNSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFmMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkyOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbTFfc3Ryb2JlX3B0MSwgICAgICBWR1A2LCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWY0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTIwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobGNkX3RlX3B5MiwgICAgICAgICAgIERJU1BMQVlBLCAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZjgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhNDQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChsY2RfYmxfcHdtX3B2MCwgICAgICAgRElTUExBWUEsICAgUFdNMCwgICBTT1IwLCAgUlNWRDMsIDB4MzFmYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGEzNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGxjZF9ibF9lbl9wdjEsICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjAwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTMwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobGNkX3JzdF9wdjIsICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMDQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhNDAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChsY2RfZ3BpbzFfcHYzLCAgICAgICAgRElTUExBWUIsICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIwOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGEzOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGxjZF9ncGlvMl9wdjQsICAgICAgICBESVNQTEFZQiwgICBQV00xLCAgIFJTVkQyLCBTT1IxLCAgMHgzMjBjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTNjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYXBfcmVhZHlfcHY1LCAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMTAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg4ZTgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh0b3VjaF9yc3RfcHY2LCAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIxNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIxOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHRvdWNoX2Nsa19wdjcsICAgICAgICBUT1VDSCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjE4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjEwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobW9kZW1fd2FrZV9hcF9weDAsICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMWMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhNDgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh0b3VjaF9pbnRfcHgxLCAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIyMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIxNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKG1vdGlvbl9pbnRfcHgyLCAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjI0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTRjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYWxzX3Byb3hfaW50X3B4MywgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMjgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg4ZTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh0ZW1wX2FsZXJ0X3B4NCwgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIyYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIwYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGJ1dHRvbl9wb3dlcl9vbl9weDUsICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjMwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTA4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYnV0dG9uX3ZvbF91cF9weDYsICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMzQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChidXR0b25fdm9sX2Rvd25fcHg3LCAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIzOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkxMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGJ1dHRvbl9zbGlkZV9zd19weTAsICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjNjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTBjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYnV0dG9uX2hvbWVfcHkxLCAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNDAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MDQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwYTYsICAgICAgICAgICAgICAgICAgU0FUQSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI0NCwgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBlNiwgICAgICAgICAgICAgICAgICBSU1ZEMCwgICAgICBJMlM1QSwgIFBXTTIsICBSU1ZEMywgMHgzMjQ4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGU3LCAgICAgICAgICAgICAgICAgIFJTVkQwLCAgICAgIEkyUzVBLCAgUFdNMywgIFJTVkQzLCAweDMyNGMsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwaDYsICAgICAgICAgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI1MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBrMCwgICAgICAgICAgICAgICAgICBJUUMwLCAgICAgICBJMlM1QiwgIFJTVkQyLCBSU1ZEMywgMHgzMjU0LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGsxLCAgICAgICAgICAgICAgICAgIElRQzAsICAgICAgIEkyUzVCLCAgUlNWRDIsIFJTVkQzLCAweDMyNTgsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwazIsICAgICAgICAgICAgICAgICAgSVFDMCwgICAgICAgSTJTNUIsICBSU1ZEMiwgUlNWRDMsIDB4MzI1YywgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBrMywgICAgICAgICAgICAgICAgICBJUUMwLCAgICAgICBJMlM1QiwgIFJTVkQyLCBSU1ZEMywgMHgzMjYwLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGs0LCAgICAgICAgICAgICAgICAgIElRQzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNjQsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwazUsICAgICAgICAgICAgICAgICAgSVFDMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI2OCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBrNiwgICAgICAgICAgICAgICAgICBJUUMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjZjLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGs3LCAgICAgICAgICAgICAgICAgIElRQzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNzAsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwbDAsICAgICAgICAgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI3NCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBsMSwgICAgICAgICAgICAgICAgICBTT0MsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjc4LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocHowLCAgICAgICAgICAgICAgICAgIFZJTUNMSzIsICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyN2MsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwejEsICAgICAgICAgICAgICAgICAgVklNQ0xLMiwgICAgU0RNTUMxLCBSU1ZEMiwgUlNWRDMsIDB4MzI4MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHB6MiwgICAgICAgICAgICAgICAgICBTRE1NQzMsICAgICBDQ0xBLCAgIFJTVkQyLCBSU1ZEMywgMHgzMjg0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocHozLCAgICAgICAgICAgICAgICAgIFNETU1DMywgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyODgsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwejQsICAgICAgICAgICAgICAgICAgU0RNTUMxLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI4YywgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHB6NSwgICAgICAgICAgICAgICAgICBTT0MsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjkwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisKKwkvKiBwZ19uYW1lLCByLCBkcnZkbl9iLCBkcnZkbl93LCBkcnZ1cF9iLCBkcnZ1cF93LCBzbHdyX2IsIHNsd3Jfdywgc2x3Zl9iLCBzbHdmX3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50IGJ5dGVzLCB2b2lkICpkZXN0KQoreworCWludCBpID0gb2Zmc2V0OworCWNoYXIgKnMgPSBkZXN0OworCWludCBjbnQgPSAwOworCisJaWYgKG9mZnNldCA+PSBFQ19NRU1NQVBfU0laRSAtIGJ5dGVzKQorCQlyZXR1cm4gLUVJTlZBTDsKKworCS8qIGZpeGVkIGxlbmd0aCAqLworCWlmIChieXRlcykgeworCQlmb3IgKDsgY250IDwgYnl0ZXM7IGkrKywgcysrLCBjbnQrKykKKwkJCSpzID0gaW5iKEVDX0xQQ19BRERSX01FTU1BUCArIGkpOworCQlyZXR1cm4gY250OworCX0KKworCS8qIHN0cmluZyAqLworCWZvciAoOyBpIDwgRUNfTUVNTUFQX1NJWkU7IGkrKywgcysrKSB7CisJCSpzID0gaW5iKEVDX0xQQ19BRERSX01FTU1BUCArIGkpOworCQljbnQrKzsKKwkJaWYgKCEqcykKKwkJCWJyZWFrOworCX0KKworCXJldHVybiBjbnQ7Cit9CisKK3N0YXRpYyBpbnQgY3Jvc19lY19scGNfcHJvYmUoc3RydWN0IHBsYXRmb3JtX2RldmljZSAqcGRldikKK3sKKwlzdHJ1Y3QgZGV2aWNlICpkZXYgPSAmcGRldi0+ZGV2OworCXN0cnVjdCBjcm9zX2VjX2RldmljZSAqZWNfZGV2OworCWludCByZXQ7CisKKwlpZiAoIWRldm1fcmVxdWVzdF9yZWdpb24oZGV2LCBFQ19MUENfQUREUl9NRU1NQVAsIEVDX01FTU1BUF9TSVpFLAorCQkJCSBkZXZfbmFtZShkZXYpKSkgeworCQlkZXZfZXJyKGRldiwgImNvdWxkbid0IHJlc2VydmUgbWVtbWFwIHJlZ2lvblxuIik7CisJCXJldHVybiAtRUJVU1k7CisJfQorCisJaWYgKChpbmIoRUNfTFBDX0FERFJfTUVNTUFQICsgRUNfTUVNTUFQX0lEKSAhPSAnRScpIHx8CisJICAgIChpbmIoRUNfTFBDX0FERFJfTUVNTUFQICsgRUNfTUVNTUFQX0lEICsgMSkgIT0gJ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otCWludCBidWZmX3NpemU7Ci0JQ0xBV19EQkZfVEVYVCg0LCB0cmFjZSwgInNldG10dSIpOwotCWJ1ZmZfc2l6ZSA9IHByaXZwdHItPnBfZW52LT53cml0ZV9zaXplOwotICAgICAgICBpZiAoKG5ld19tdHUgPCA2MCkgfHwgKG5ld19tdHUgPiBidWZmX3NpemUpKSB7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Ci0gICAgICAgIH0KLSAgICAgICAgZGV2LT5tdHUgPSBuZXdfbXR1OwotICAgICAgICByZXR1cm4gMDsKLX0gIC8qICAgZW5kIG9mIGNsYXdfY2hhbmdlX210dSAqLwotCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKLSAqICAgY2xhd19vcGVuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi1zdGF0aWMgaW50Ci1jbGF3X29wZW4oc3RydWN0IG5ldF9kZXZpY2UgKmRldikKLXsKLQotICAgICAgICBpbnQgICAgIHJjOwotICAgICAgICBpbnQgICAgIGk7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgICAgICAgc2F2ZWZsYWdzPTA7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgICAgICAgcGFybTsKLSAgICAgICAgc3RydWN0IGNsYXdfcHJpdmJrICAqcHJpdnB0cjsKLQlERUNMQVJFX1dBSVRRVUVVRSh3YWl0LCBjdXJyZW50KTsKLSAgICAgICAgc3RydWN0IHRpbWVyX2xpc3QgIHRpbW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pXS5jZGV2LAotCQkJCXBhcm0pOwotICAgICAgICAgICAgICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgKLQkJCQlnZXRfY2N3ZGV2X2xvY2socHJpdnB0ci0+Y2hhbm5lbFtpXS5jZGV2KSwKLQkJCQlzYXZlZmxhZ3MpOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHJjICE9IDApIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2N3X2NoZWNrX3JldHVybl9jb2RlKAotCQkJCQlwcml2cHRyLT5jaGFubmVsW2ldLmNkZXYsIHJjKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfY2N3LAotCQkJKGludClwYWdlc190b19vcmRlcl9vZl9tYWcocHJpdnB0ci0+cF9idWZmX2Njd19udW0pKTsKLSAgICAgICAgICAgICAgICBpZiAocHJpdnB0ci0+cF9lbnYtPnJlYWRfc2l6ZSA8IFBBR0VfU0laRSkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfcmVhZCwKLQkJCSAgICAgICAoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZygKLQkJCSAgICAgICAJCXByaXZwdHItPnBfYnVmZl9yZWFkX251bSkpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfcmVhZF9hY3RpdmVfZmlyc3Q7Ci0gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocF9idWYhPU5VTEwpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwX2J1Zi0+cF9idWZmZXIsCi0JCQkJICAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkJICAgICAgCXByaXZwdHItPnBfYnVmZl9wYWdlc19wZXJyZWFkICkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zj1wX2J1Zi0+bmV4dDsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgaWYgKHByaXZwdHItPnBfZW52LT53cml0ZV9zaXplIDwgUEFHRV9TSVpFICkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfd3JpdGUsCi0JCQkgICAgIChpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKAotCQkJICAgICAJcHJpdnB0ci0+cF9idWZmX3dyaXRlX251bSkpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0OwotICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBfYnVmIT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyZWVfcGFnZXMoKHVuc2lnbmVkIGxvbmcpcF9idWYtPnBfYnVmZmVyLAotCQkJCSAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkJICAgICAJcHJpdnB0ci0+cF9idWZmX3BhZ2VzX3BlcndyaXRlICkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zj1wX2J1Zi0+bmV4dDsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0JCXByaXZwdHItPmJ1ZmZzX2FsbG9jID0gMDsKLQkJcHJpdnB0ci0+Y2hhbm5lbFtSRUFEX0NIQU5ORUxdLmZsYWcgPSAweDAwOwotCQlwcml2cHRyLT5jaGFubmVsW1dSSVRFX0NIQU5ORUxdLmZsYWcgPSAweDAwOwotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9jY3c9TlVMTDsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2J1ZmZfcmVhZD1OVUxMOwotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl93cml0ZT1OVUxMOwotICAgICAgICAgICAgICAgIGNsYXdfY2xlYXJfYnVzeShkZXYpOwotCQlDTEFXX0RCRl9URVhUKDIsIHRyYWNlLCAib3BlbiBFSU8iKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gLUVJTzsKLSAgICAgICAgfQotCi0gICAgICAgIC8qICAgU2VuZCBTeXN0ZW1WYWxpZGF0ZSBjb21tYW5kICovCi0KLSAgICAgICAgY2xhd19jbGVhcl9idXN5KGRldik7Ci0JQ0xBV19EQkZfVEVYVCg0LCB0cmFjZSwgIm9wZW5vayIpOwotICAgICAgICByZXR1cm4gMDsKLX0gICAgLyogICAgIGVuZCBvZiBjbGF3X29wZW4gICAgKi8KLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKiAgICAgICBjbGF3X2lycV9oYW5kbGVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLXN0YXRpYyB2b2lkCi1jbGF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X1RFWFQoNCwgdHJhY2UsICJUc2tsZXRYdCIpOwotICAgICAgICByZXR1cm47Ci19ICAgICAgIC8qICAgIGVuZCBvZiBjbGF3X2lycV9iaCAgICAqLwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgIGNsYXdfcmVsZWFzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotc3RhdGljIGludAotY2xhd19yZWxlYXNlKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCi17Ci0gICAgICAgIGludCAgICAgICAgICAgICAgICByYzsKLSAgICAgICAgaW50ICAgICAgICAgICAgICAgIGk7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgICAgICBzYXZlZmxhZ3M7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgICAgICBwYXJtOwotICAgICAgICBzdHJ1Y3QgY2xhd19wcml2YmsgKnByaXZwdHI7Ci0gICAgICAgIERFQ0xBUkVfV0FJVFFVRVVFKHdhaXQsIGN1cnJlbnQpOwotICAgICAgICBzdHJ1Y3QgY2N3YmsqICAgICAgICAgICAgIHBfdGhpc19jY3c7Ci0gICAgICAgIHN0cnVjdCBjY3diayogICAgICAgICAgICAgcF9idWY7Ci0KLQlpZiAoIWRldikKLSAgICAgICAgICAgICAgICByZXR1cm4gMDsKLQlwcml2cHRyID0gKHN0cnVjdCBjbGF3X3ByaXZiayAqKWRldi0+bWxfcHJpdjsKLSAgICAgICAgaWYgKCFwcml2cHRyKQotICAgICAgICAgICA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c2UgewotICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0OwotICAgICAgICAgICAgICAgIHdoaWxlIChwX2J1ZiE9TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwX2J1Zi0+cF9idWZmZXIsCi0JCQkgICAgICAoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZygKLQkJCSAgICAgIHByaXZwdHItPnBfYnVmZl9wYWdlc19wZXJ3cml0ZSApKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXBfYnVmLT5uZXh0OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQotCSBDTEFXX0RCRl9URVhUKDQsIHRyYWNlLCAiY2xlYXJwdHIiKTsKLQlwcml2cHRyLT5idWZmc19hbGxvYyA9IDA7Ci0gICAgICAgIHByaXZwdHItPnBfYnVmZl9jY3c9TlVMTDsKLSAgICAgICAgcHJpdnB0ci0+cF9idWZmX3JlYWQ9TlVMTDsKLSAgICAgICAgcHJpdnB0ci0+cF9idWZmX3dyaXRlPU5VTEw7Ci0gICAgICAgIHByaXZwdHItPnN5c3RlbV92YWxpZGF0ZV9jb21wPTA7Ci0gICAgICAgIHByaXZwdHItPnJlbGVhc2VfcGVuZD0wOwotICAgICAgICAvKiAgICAgIFJlbW92ZSBhbnkgd3JpdGVzIHRoYXQgd2VyZSBwZW5kaW5nIGFuZCByZXNldCBhbGwgcmVhZHMgICAqLwotICAgICAgICBwX3RoaXNfY2N3PXByaXZwdHItPnBfcmVhZF9hY3RpdmVfZmlyc3Q7Ci0gICAgICAgIHdoaWxlIChwX3RoaXNfY2N3IT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgcF90aGlzX2Njdy0+aGVhZGVyLmxlbmd0aD0weGZmZmY7Ci0gICAgICAgICAgICAgICAgcF90aGlzX2Njdy0+aGVhZGVyLm9wY29kZT0weGZmOwotICAgICAg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bmRldjsKLQlwcml2cHRyID0gKHN0cnVjdCBjbGF3X3ByaXZiayAqKSBkZXYtPm1sX3ByaXY7Ci0gICAgICAgIGNsYXdfZnJlZV93cnRfYnVmKCBkZXYgKTsKLQlpZiAoKHByaXZwdHItPndyaXRlX2ZyZWVfY291bnQgPiAwKSAmJgotCSAgICAhc2tiX3F1ZXVlX2VtcHR5KCZwX2NoLT5jb2xsZWN0X3F1ZXVlKSkgewotCSAgCXBrX3NrYiA9IGNsYXdfcGFja19za2IocHJpdnB0cik7Ci0JCXdoaWxlIChwa19za2IgIT0gTlVMTCkgewotCQkJY2xhd19od190eChwa19za2IsIGRldiwgMSk7Ci0JCQlpZiAocHJpdnB0ci0+d3JpdGVfZnJlZV9jb3VudCA+IDApIHsKLQkgICAJCQlwa19za2IgPSBjbGF3X3BhY2tfc2tiKHByaXZwdHIpOwotCQkJfSBlbHNlCi0JCQkJcGtfc2tiID0gTlVMTDsKLQkJfQotCX0KLSAgICAgICAgaWYgKHByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0IT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgY2xhd19zdHJ0X291dF9JTyhkZXYpOwotICAgICAgICB9Ci0gICAgICAgIHJldHVybjsKLX0gICAgICAvKiBlbmQgb2YgY2xhd193cml0ZV9uZXh0ICAgICAgKi8KLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKiAgICAgICBjbGF3X3RpbWVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLQotc3RhdGljIHZvaWQKLWNsYXdfdGltZXIgKCBzdHJ1Y3QgY2hiayAqIHBfY2ggKQotewotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJ0aW1lciIpOwotICAgICAgICBwX2NoLT5mbGFnIHw9IENMQVdfVElNRVI7Ci0gICAgICAgIHdha2VfdXAoJnBfY2gtPndhaXQpOwotICAgICAgICByZXR1cm47Ci19ICAgICAgLyogZW5kIG9mIGNsYXdfdGltZXIgICovCi0KLS8qCi0qCi0qICAgICAgIGZ1bmN0aW9ucwotKi8KLQotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICBwYWdlc190b19vcmRlcl9vZl9tYWcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgIHRha2VzIGEgbnVtYmVyIG9mIHBhZ2VzIGZyb20gMSB0byA1MTIgYW5kIHJldHVybnMgdGhlICAgICAgICAgICAqCi0qICAgIGxvZyhudW1fcGFnZXMpL2xvZygyKSBnZXRfZnJlZV9wYWdlcygpIG5lZWRzIGEgYmFzZSAyIG9yZGVyICAgICAqCi0qICAgIG9mIG1hZ25pdHVkZSBnZXRfZnJlZV9wYWdlcygpIGhhcyBhbiB1cHBlciBvcmRlciBvZiA5ICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotCi1zdGF0aWMgaW50Ci1wYWdlc190b19vcmRlcl9vZl9tYW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ICovCi0gICAgICAgICAgICAgICAvKiBUaGVyZWZvcmUgbW9kaWZ5IHRoZSBzZWNvbmQgc2V0IHRvIHBvaW50IHRvIHRoZSBuZXcgICAgICAgICovCi0gICAgICAgICAgICAgICAvKiByZWFkIGNoYWluIHNldCB1cCBUSUMgQ0NXcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAvKiBtYWtlIHN1cmUgd2UgdXBkYXRlIHRoZSBDQ1cgc28gY2hhbm5lbCBkb2Vzbid0IGZldGNoIGl0ICAgICovCi0gICAgICAgICAgICAgICAvKiB3aGVuIGl0J3Mgb25seSBoYWxmIGRvbmUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoICZwX2VuZC0+cmVhZDJfbm9wMiwgJnRlbXBfY2N3ICwKLQkJCQlzaXplb2Yoc3RydWN0IGNjdzEpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfcmVhZF9hY3RpdmVfbGFzdC0+cl9USUNfMS5jZGE9Ci0JCQkJKF9fdTMyKV9fcGEoJnBfZmlyc3QtPnJlYWQpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9yZWFkX2FjdGl2ZV9sYXN0LT5yX1RJQ18yLmNkYT0KLQkJCQkoX191MzIpX19wYSgmcF9maXJzdC0+cmVhZCk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgLyogbWFrZSBzdXJlIHdlIHVwZGF0ZSB0aGUgQ0NXIHNvIGNoYW5uZWwgZG9lc24ndCAgICovCi0JCQkvKiBmZXRjaCBpdCB3aGVuIGl0IGlzIG9ubHkgaGFsZiBkb25lICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIG1lbWNweSggJnBfZW5kLT5yZWFkMV9ub3AyLCAmdGVtcF9jY3cgLAotCQkJCXNpemVvZihzdHJ1Y3QgY2N3MSkpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9yZWFkX2FjdGl2ZV9sYXN0LT5yX1RJQ18xLmNkYT0KLQkJCQkoX191MzIpX19wYSgmcF9maXJzdC0+cmVhZCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3JlYWRfYWN0aXZlX2xhc3QtPnJfVElDXzIuY2RhPQotCQkJCShfX3UzMilfX3BhKCZwX2ZpcnN0LT5yZWFkKTsKLSAgICAgICAgICAgICAgICB9Ci0JCS8qICAgICAgY2hhaW4gaW4gbmV3IHNldCBvZiBibG9ja3MgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3JlYWRfYWN0aXZlX2xhc3QtPm5leHQgPSBwX2ZpcnN0OwotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfcmVhZF9hY3RpdmVfbGFzdD1wX2xhc3Q7Ci0gICAgICAgIH0gLyogZW5kIG9mIGlmICggcHJpdnB0ci0+IHBfcmVhZF9hY3RpdmVfZmlyc3QgPT1OVUxMKSAgKi8KLQlDTEFXX0RCRl9URVhUKDQsIHRyYWNlLCAiYWRkZXhpdCIpOwotICAgICAgICByZXR1cm4gMDsKLX0gICAgLyogICAgIGVuZCBvZiBhZGRfY2xhd19yZWFkcyAgICovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKLSAqICAgY2N3X2NoZWNrX3JldHVybl9jb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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mcpCi0JewotCQljYXNlICBQQUNLSU5HX0FTSzoKLQkJCWlmICgobWVtY21wKFdTX0FQUExfTkFNRV9QQUNLRUQsIGhvc3RfbmFtZSwgOCkhPTApIHx8Ci0JCQkgICAgKG1lbWNtcChXU19BUFBMX05BTUVfUEFDS0VELCB3c19uYW1lLCA4KSE9MCApKQotICAgICAgICAJICAgICAgICAgICAgIHJjID0gRUlOVkFMOwotCQkJYnJlYWs7Ci0JCWNhc2UgIERPX1BBQ0tFRDoKLQkJY2FzZSAgUEFDS19TRU5EOgotCQkJaWYgKChtZW1jbXAoV1NfQVBQTF9OQU1FX0lQX05BTUUsIGhvc3RfbmFtZSwgOCkhPTApIHx8Ci0JCQkgICAgKG1lbWNtcChXU19BUFBMX05BTUVfSVBfTkFNRSwgd3NfbmFtZSwgOCkhPTAgKSkKLSAgICAgICAgCSAgICAgICAgCXJjID0gRUlOVkFMOwotCQkJYnJlYWs7Ci0JCWRlZmF1bHQ6Ci0JICAgICAgIAkJaWYgKChtZW1jbXAoSE9TVF9BUFBMX05BTUUsIGhvc3RfbmFtZSwgOCkhPTApIHx8Ci0JCSAgICAJICAgIChtZW1jbXAocF9lbnYtPmFwaV90eXBlICwgd3NfbmFtZSwgOCkhPTApKQotICAgICAgICAJICAgICAgICAJcmMgPSBFSU5WQUw7Ci0JCQlicmVhazsKLQl9Ci0KLQlyZXR1cm4gcmM7Ci19ICAgIC8qICAgIGVuZCBvZiBmaW5kX2xpbmsgICAgKi8KLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKgotICogICBjbGF3X2h3X3R4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLQotc3RhdGljIGludAotY2xhd19od190eChzdHJ1Y3Qgc2tfYnVmZiAqc2tiLCBzdHJ1Y3QgbmV0X2RldmljZSAqZGV2LCBsb25nIGxpbmtpZCkKLXsKLSAgICAgICAgaW50ICAgICAgICAgICAgICAgICAgICAgICAgICAgICByYz0wOwotICAgICAgICBzdHJ1Y3QgY2xhd19wcml2YmsgCQkqcHJpdnB0cjsKLSAgICAgICAgc3RydWN0IGNjd2JrICAgICAgICAgICAqcF90aGlzX2NjdzsKLSAgICAgICAgc3RydWN0IGNjd2JrICAgICAgICAgICAqcF9maXJzdF9jY3c7Ci0gICAgICAgIHN0cnVjdCBjY3diayAgICAgICAgICAgKnBfbGFzdF9jY3c7Ci0gICAgICAgIF9fdTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtQnVmZmVyczsKLSAgICAgICAgc2lnbmVkIGxvbmcgICAgICAgICAgICAgICAgICAgICBsZW5fb2ZfZGF0YTsKLSAgICAgICAgdW5zaWduZWQgbG9uZyAgICAgICAgICAgICAgICAgICBieXRlc0luVGhpc0J1ZmZlcjsKLSAgICAgICAgdW5zaWduZWQgY2hhciAgICAgICAgICAgICAgICAgICAqcERhdGFBZGRyZXNzOwotICAgICAgICBzdHJ1Y3QgZW5kY2N3ICAgICAgICAgICAgICAgICAgICpwRW5kOwotICAgICAgICBzdHJ1Y3QgY2N3MSAgICAgICAgICAgICAgICAgICAgIHRlbXBDQ1c7Ci0Jc3RydWN0IGNsYXdfZW52CQkJKnBfZW52OwotCXN0cnVjdCBjbGF3cGgJCQkqcGtfaGVhZDsKLQlzdHJ1Y3QgY2hiawkJCSpjaDsKLQotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJod190e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B7Ci0gICAgICAgIAlpZiAoY2xhd19jaGVja19idXN5KGRldikpIHsKLSAgICAgICAgICAgICAgICAJaWYgKHByaXZwdHItPndyaXRlX2ZyZWVfY291bnQhPTApIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhd19jbGVhcl9idXN5KGRldik7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhd19zdHJ0X291dF9JTyhkZXYgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2xhd19mcmVlX3dydF9idWYoIGRldiApOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJpdnB0ci0+d3JpdGVfZnJlZV9jb3VudD09MCkgewotCQkJCQljaCA9ICZwcml2cHRyLT5jaGFubmVsW1dSSVRFX0NIQU5ORUxdOwotCQkJCQlhdG9taWNfaW5jKCZza2ItPnVzZXJzKTsKLQkJCQkJc2tiX3F1ZXVlX3RhaWwoJmNoLT5jb2xsZWN0X3F1ZXVlLCBza2IpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJZ290byBEb25lOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJY2xhd19jbGVhcl9idXN5KGRldik7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgLyogIHR4IGxvY2sgICovCi0gICAgICAgICAgICAgICAgaWYgKGNsYXdfdGVzdF9hbmRfc2V0Yml0X2J1c3koVEJfVFgsZGV2KSkgeyAvKiBzZXQgdG8gYnVzeSAqLwotCQkJY2ggPSAmcHJpdnB0ci0+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NzKz0odW5zaWduZWQgbG9uZylieXRlc0luVGhpc0J1ZmZlcjsKLSAgICAgICAgICAgICAgICAvKiAgICAgIHNldHVwIHdyaXRlIENDVyAgICAgICAgICovCi0gICAgICAgICAgICAgICAgcF90aGlzX2Njdy0+d3JpdGUuY21kX2NvZGUgPSAobGlua2lkICogOCkgKzE7Ci0gICAgICAgICAgICAgICAgaWYgKGxlbl9vZl9kYXRhPjApIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfdGhpc19jY3ctPndyaXRlLmNtZF9jb2RlKz1NT1JFX3RvX0NPTUVfRkxBRzsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgcF90aGlzX2Njdy0+d3JpdGUuY291bnQ9Ynl0ZXNJblRoaXNCdWZmZXI7Ci0gICAgICAgICAgICAgICAgLyogICAgICBub3cgYWRkIHRvIGVuZCBvZiB0aGlzIGNoYWluICAgICovCi0gICAgICAgICAgICAgICAgaWYgKHBfZmlyc3RfY2N3PT1OVUxMKSAgICB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2ZpcnN0X2Njdz1wX3RoaXNfY2N3OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBpZiAocF9sYXN0X2NjdyE9TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgcF9sYXN0X2Njdy0+bmV4dD1wX3RoaXNfY2N3OwotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBzZXQgdXAgVElDIGNjd3MgICAgICAgICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9sYXN0X2Njdy0+d19USUNfMS5jZGE9Ci0JCQkJKF9fdTMyKV9fcGEoJnBfdGhpc19jY3ctPndyaXRlKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgcF9sYXN0X2Njdz1wX3RoaXNfY2N3OyAgICAgIC8qIHNhdmUgbmV3IGxhc3QgYmxvY2sgKi8KLSAgICAgICAgfQotCi0gICAgICAgIC8qICAgICAgRmlyc3RDQ1cgYW5kIExhc3RDQ1cgbm93IGNvbnRhaW4gYSBuZXcgc2V0IG9mIHdyaXRlIGNoYW5uZWwKLSAgICAgICAgKiAgICAgICBwcm9ncmFtcyB0byBhcHBlbmQgdG8gdGhlIHJ1bm5pbmcgY2hhbm5lbCBwcm9ncmFtCi0gICAgICAgICovCi0KLSAgICAgICAgaWYgKHBfZmlyc3RfY2N3IT1OVUxMKSB7Ci0JCS8qICAgICAgc2V0dXAgZW5kaW5nIGNjdyBzZXF1ZW5jZSBmb3IgdGhpcyBzZWdtZW50ICAgICAgICAgICAqLwotICAgICAgICAgICAgICAgIHBFbmQ9cHJpdnB0ci0+cF9lbmRfY2N3OwotICAgICAgICAgICAgICAgIGlmIChwRW5kLT53cml0ZTEpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMT0weDAwOyAgIC8qIHNlY29uZCBlbmQgY2N3IGlzIG5vdyBhY3RpdmUgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgc2V0IHVwIFRpYyBDQ1dzICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfbGFzdF9jY3ctPndfVElDXzEuY2RhPQotCQkJCShfX3UzMilfX3BhKCZwRW5kLT53cml0ZTJfbm9wMSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwRW5kLT53cml0ZTJfbm9wMi5jbWRfY29kZSA9IENDV19DTEFXX0NNRF9SRUFERkY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwRW5kLT53cml0ZTJfbm9wMi5mbGFncyAgICA9Ci0JCQkJQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfU0tJUDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMl9ub3AyLmNkYT0wOwotICAgICAgICAgICAgICAgICAgICAgICAgcEVuZC0+d3JpdGUyX25vcDIuY291bnQ9MTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZSB7ICAvKiAgZW5kIG9mIGlmIChwRW5kLT53cml0ZTEpKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMT0weDAxOyAgIC8qIGZpcnN0IGVuZCBjY3cgaXMgbm93IGFjdGl2ZSAqLwotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBzZXQgdXAgVGljIENDV3MgICAgICAgICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9sYXN0X2Njdy0+d19USUNfMS5jZGE9Ci0JCQkJKF9fdTMyKV9fcGEoJnBFbmQtPndyaXRlMV9ub3AxKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMV9ub3AyLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBFbmQtPndyaXRlMV9ub3AyLmZsYWdzICAgID0KLQkJCQlDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19TS0lQOwotICAgICAgICAgICAgICAgICAgICAgICAgcEVuZC0+d3JpdGUxX25vcDIuY2RhPTA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwRW5kLT53cml0ZTFfbm9wMi5jb3VudD0xOwotICAgICAgICAgICAgICAgIH0gIC8qIGVuZCBpZiBpZiAocEVuZC0+d3JpdGUxKSAqLwotCi0gICAgICAgICAgICAgICAgaWYgKHByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0PT1OVUxMICkgewotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF93cml0ZV9hY3RpdmVfZmlyc3Q9cF9maXJzdF9jY3c7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3dyaXRlX2FjdGl2ZV9sYXN0PXBfbGFzdF9jY3c7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBzZXQgdXAgVGljIENDV3MgICAgICAgICAqLwotCi0gICAgICAgICAgICAgICAgICAgICAgICB0ZW1wQ0NXLmNkYT0oX191MzIpX19wYSgmcF9maXJzdF9jY3ctPndyaXRlKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBDQ1cuY291bnQ9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBDQ1cuZmxhZ3M9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRlbXBDQ1cuY21kX2NvZGU9Q0NXX0NMQVdfQ01EX1RJQzsKLQotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBFbmQtPndyaXRlMSkgewotCi0gICAgICAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgICAgICogZmlyc3Qgc2V0IG9mIGVuZGluZyBDQ1cncyBpcyBjaGFpbmVkIHRvIHRoZSBuZXcgd3JpdGUKLSAgICAgICAgICAgICAgICAgKiBjaGFpbiwgc28gdGhlIHNlY29uZCBzZXQgaXMgY2hhaW5lZCB0byB0aGUgYWN0aXZlIGNoYWluCi0gICAgICAgICAgICAgICAgICogVGhlcmVmb3JlIG1vZGlmeSB0aGUgc2Vjb25kIHNldCB0byBwb2ludCB0aGUgbmV3IHdyaXRlIGNoYWluLgotICAgICAgICAgICAgICAgICAqIG1ha2Ugc3VyZSB3ZSB1cGRhdGUgdGhlIENDVyBhdG9taWNhbGx5Ci0gICAgICAgICAgICAgICAgICogc28gY2hhbm5lbCBkb2VzIG5vdCBmZXRjaCBpdCB3aGVuIGl0J3Mgb25seSBoYWxmIGRvbmUKLSAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KCAmcEVuZC0+d3JpdGUyX25vcDIsICZ0ZW1wQ0NXICwKLQkJCQkJc2l6ZW9mKHN0cnVjdCBjY3cxKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2xhc3QtPndfVElDXzEuY2RhPQotCQkJCQkoX191MzIpX19wYSgmcF9maXJzdF9jY3ctPndyaXRlKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UgewotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKm1ha2Ugc3VyZSB3ZSB1cGRhdGUgdGhlIENDVyBhdG9taWNhbGx5Ci0gICAgICAgICAgICAgICAgICAgICAgICAgKnNvIGNoYW5uZWwgZG9lcyBub3QgZmV0Y2ggaXQgd2hlbiBpdCdzIG9ubHkgaGFsZiBkb25lCi0gICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KCZwRW5kLT53cml0ZTFfbm9wMiwgJnRlbXBDQ1cgLAotCQkJCQlzaXplb2Yoc3RydWN0IGNjdzEpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF93cml0ZV9hY3RpdmVfbGFzdC0+d19USUNfMS5jZGE9Ci0JCQkJICAgICAgICAoX191MzIpX19wYSgmcF9maXJzdF9jY3ctPndyaXRlKTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgfSAvKiBlbmQgaWYgaWYgKHBFbmQtPndyaXRlMSkgKi8KLQotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF93cml0ZV9hY3RpdmVfbGFzdC0+bmV4dD1wX2ZpcnN0X2NjdzsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2xhc3Q9cF9sYXN0X2NjdzsKLSAgICAgICAgICAgICAgICB9Ci0KLSAgICAgICAgfSAvKiBlbmRpZiAocF9maXJzdF9jY3chPU5VTEwpICAqLwotICAgICAgICBkZXZfa2ZyZWVfc2tiX2FueShza2IpOwotICAgICAgICBjbGF3X3N0cnRfb3V0X0lPKGRldiApOwotICAgICAgICAvKiAgICAgIGlmIHdyaXRlIGZyZWUgY291bnQgaXMgemVybyAsIHNldCBOT0JVRkZFUiAgICAgICAqLwotCWlmIChwcml2cHRyLT53cml0ZV9mcmVlX2NvdW50PT0wKSB7Ci0JCWNsYXdfc2V0Yml0X2J1c3koVEJfTk9CVUZGRVIsZGV2KTsKLSAgICAgICAgfQotRG9uZTI6Ci0JY2xhd19jbGVhcmJpdF9idXN5KFRCX1RYLGRldik7Ci1Eb25lOgotCXJldHVybihyYyk7Ci19ICAgIC8qICAgIGVuZCBvZiBjbGF3X2h3X3R4ICAgICovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSogICAgIGluaXRfY2N3X2JrICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLXN0YXRpYyBpbnQKLWluaXRfY2N3X2JrKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYpCi17Ci0KLSAgICAgICAgX191MzIgICBjY3dfYmxvY2tzX3JlcXVpcmVkOwotICAgICAgICBfX3UzMiAgIGNjd19ibG9ja3NfcGVycGFnZTsKLSAgICAgICAgX191MzIgICBjY3dfcGFnZXNfcmVxdWlyZWQ7Ci0gICAgICAgIF9fdTMyICAgY2xhd19yZWFkc19wZXJwYWdlPTE7Ci0gICAgICAgIF9fdTMyICAgY2xhd19yZWFkX3BhZ2VzOwotICAgICAgICBfX3UzMiAgIGNsYXdfd3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gICAgIChpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKGNjd19wYWdlc19yZXF1aXJlZCApKTsKLSAgICAgICAgICAgICAgICBpZiAocHJpdnB0ci0+cF9idWZmX2Njdz09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9NRU07Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9jY3dfbnVtPWNjd19wYWdlc19yZXF1aXJlZDsKLSAgICAgICAgfQotICAgICAgICBtZW1zZXQocHJpdnB0ci0+cF9idWZmX2NjdywgMHgwMCwKLQkJcHJpdnB0ci0+cF9idWZmX2Njd19udW0gKiBQQUdFX1NJWkUpOwotCi0gICAgICAgIC8qCi0gICAgICAgICogICAgICAgICAgICAgICBvYnRhaW4gZW5kaW5nIGNjdyBibG9jayBhZGRyZXNzCi0gICAgICAgICoKLSAgICAgICAgKi8KLSAgICAgICAgcHJpdnB0ci0+cF9lbmRfY2N3ID0gKHN0cnVjdCBlbmRjY3cgKikmcHJpdnB0ci0+ZW5kX2NjdzsKLSAgICAgICAgcmVhbF9hZGRyZXNzICA9IChfX3UzMilfX3BhKHByaXZwdHItPnBfZW5kX2Njdyk7Ci0gICAgICAgIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5pdGlhbGl6ZSBlbmRpbmcgQ0NXIGJsb2NrICAgICAgICovCi0gICAgICAgIHBfZW5kY2N3PXByaXZwdHItPnBfZW5kX2NjdzsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWw9cmVhbF9hZGRyZXNzOwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUxPTB4MDA7Ci0gICAgICAgIHBfZW5kY2N3LT5yZWFkMT0weDAwOwotCi0gICAgICAgIC8qICAgICAgd3JpdGUxX25vcDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgcF9lbmRjY3ctPndyaXRlMV9ub3AxLmNtZF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ICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgIHBfZW5kY2N3LT53cml0ZTJfbm9wMi5jbWRfY29kZSA9IENDV19DTEFXX0NNRF9SRUFERkY7Ci0gICAgICAgIHBfZW5kY2N3LT53cml0ZTJfbm9wMi5mbGFncyAgICAgICAgPSBDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19TS0lQOwotICAgICAgICBwX2VuZGNjdy0+d3JpdGUyX25vcDIuY291bnQgICAgICAgID0gMTsKLSAgICAgICAgcF9lbmRjY3ctPndyaXRlMl9ub3AyLmNkYSAgICAgICAgICA9IDA7Ci0KLSAgICAgICAgLyogICAgICByZWFkMV9ub3AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMS5jbWRfY29kZSA9IENDV19DTEFXX0NNRF9OT1A7Ci0gICAgICAgIHBfZW5kY2N3LT5yZWFkMV9ub3AxLmZsYWdzICAgICAgICA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMS5jb3VudCAgICAgICAgPSAxOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMS5jZGEgICAgICAgICAgPSAwOwotCi0gICAgICAgIC8qICAgICAgcmVhZDFfbm9wMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgcF9lbmRjY3ctPnJlYWQxX25vcDIuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBREZGOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMi5mbGFncyAgICAgICAgPSBDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19TS0lQOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMi5jb3VudCAgICAgICAgPSAxOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDFfbm9wMi5jZGEgICAgICAgICAgPSAwOwotCi0gICAgICAgIC8qICAgICAgcmVhZDJfbm9wMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDEuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfTk9QOwotICAgICAgICBwX2VuZGNjdy0+cmVhZDJfbm9wMS5mbGFncyAgICAgICAgPSBDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19DQzsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDEuY291bnQgICAgICAgID0gMTsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDEuY2RhICAgICAgICAgID0gMDsKLQotICAgICAgICAvKiAgICAgIHJlYWQyX25vcDIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgIHBfZW5kY2N3LT5yZWFkMl9ub3AyLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDIuZmxhZ3MgICAgICAgID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfU0tJUDsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDIuY291bnQgICAgICAgID0gMTsKLSAgICAgICAgcF9lbmRjY3ctPnJlYWQyX25vcDIuY2RhICAgICAgICAgID0gMDsKLQotICAgICAgICAvKgotICAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1aWxkIGEgY2hhaW4gb2YgQ0NXcwotICAgICAgICAqCi0gICAgICAgICovCi0gICAgICAgIHBfYnVmZj1wcml2cHRyLT5wX2J1ZmZfY2N3OwotCi0gICAgICAgIHBfZnJlZV9jaGFpbj1OVUxMOwotICAgICAgICBmb3IgKGk9MCA7IGkgPCBjY3dfcGFnZXNfcmVxdWlyZWQ7IGkrKyApIHsKLSAgICAgICAgICAgICAgICByZWFsX2FkZHJlc3MgID0gKF9fdTMyKV9fcGEocF9idWZmKTsKLSAgICAgICAgICAgICAgICBwX2J1Zj1wX2J1ZmY7Ci0gICAgICAgICAgICAgICAgZm9yIChqPTAgOyBqIDwgY2N3X2Jsb2Nrc19wZXJwYWdlIDsgaisrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+bmV4dCAgPSBwX2ZyZWVfY2hhaW47Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2ZyZWVfY2hhaW4gPSBwX2J1ZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5yZWFsPShfX3UzMilfX3BhKHBfYnVmKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICsrcF9idWY7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIHBfYnVmZis9UEFHRV9TSVpFOwotICAgICAgICB9Ci0gICAgICAgIC8qCi0gICAgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5pdGlhbGl6ZSBDbGF3U2lnbmFsQmxvY2sKLSAgICAgICAgKgotICAgICAgICAqLwotICAgICAgICBpZiAocHJpdnB0ci0+cF9jbGF3X3NpZ25hbF9ibGs9PU5VTEwpIHsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2NsYXdfc2lnbmFsX2Jsaz1wX2ZyZWVfY2hhaW47Ci0gICAgICAgICAgICAgICAgcF9mcmVlX2NoYWluPXBfZnJlZV9jaGFpbi0+bmV4dDsKLSAgICAgICAgICAgICAgICBwQ2xhd0g9KHN0cnVjdCBjbGF3aCAqKXByaXZwdHItPnBfY2xhd19zaWduYWxfYmxrOwotICAgICAgICAgICAgICAgIHBDbGF3SC0+bGVuZ3RoPTB4ZmZmZjsKLSAgICAgICAgICAgICAgICBwQ2xhd0gtPm9wY29kZT0weGZmOwotICAgICAgICAgICAgICAgIHBDbGF3SC0+ZmxhZz1DTEFXX0JVU1k7Ci0gICAgICAgIH0KLQotICAgICAgICAvKgotICAgICAgICAqICAgICAgICAgICAgICAgYWxsb2NhdGUgd3JpdGVfcGFnZXNfcmVxdWlyZWQgYW5kIGFkZCB0byBmcmVlIGNoYWluCi0gICAgICAgICovCi0gICAgICAgIGlmIChwcml2cHRyLT5wX2J1ZmZfd3JpdGU9PU5VTEwpIHsKLSAgICAgICAgICAgIGlmIChwcml2cHRyLT5wX2Vudi0+d3JpdGVfc2l6ZSA8IFBBR0VfU0laRSkgewotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl93cml0ZT0KLQkJCSh2b2lkICopX19nZXRfZnJlZV9wYWdlcyhfX0dGUF9ETUEsCi0JCQkoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZyhjbGF3X3dyaXRlX3BhZ2VzICkpOwotICAgICAgICAgICAgICAgIGlmIChwcml2cHRyLT5wX2J1ZmZfd3JpdGU9PU5VTEwpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9jY3c9TlVMTDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRU5PTUVNOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAvKgotICAgICAgICAgICAgICAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQnVpbGQgQ0xBVyB3cml0ZSBmcmVlIGNoYWluCi0gICAgICAgICAgICAgICAgKgotICAgICAgICAgICAgICAgICovCi0KLSAgICAgICAgICAgICAgICBtZW1zZXQocHJpdnB0ci0+cF9idWZmX3dyaXRlLCAweDAwLAotCQkJY2N3X3BhZ2VzX3JlcXVpcmVkICogUEFHRV9TSVpFKTsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3dyaXRlX2ZyZWVfY2hhaW49TlVMTDsKLQotICAgICAgICAgICAgICAgIHBfYnVmZj1wcml2cHRyLT5wX2J1ZmZfd3JpdGU7Ci0KLSAgICAgICAgICAgICAgICBmb3IgKGk9MCA7IGk8IHByaXZwdHItPnBfZW52LT53cml0ZV9idWZmZXJzIDsgaSsrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1ZiAgICAgICAgPSBwX2ZyZWVfY2hhaW47ICAgICAgLyogIGdldCBhIENDVyAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9mcmVlX2NoYWluID0gcF9idWYtPm5leHQ7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+bmV4dCAgPXByaXZwdHItPnBfd3JpdGVfZnJlZV9jaGFpbjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfd3JpdGVfZnJlZV9jaGFpbiA9IHBfYnVmOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBwX2J1ZmZlcgk9IChzdHJ1Y3QgY2xhd2J1ZiAqKXBfYnVmZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd3JpdGUuY2RhICAgICAgID0gKF9fdTMyKV9fcGEocF9idWZmKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd3JpdGUuZmxhZ3MgICAgID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfQ0M7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfcmVhZF9GRi5jbWRfY29kZSA9IENDV19DTEFXX0NNRF9SRUFERkY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfcmVhZF9GRi5mbGFncyAgID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfQ0M7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfcmVhZF9GRi5jb3VudCAgID0gMTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd19yZWFkX0ZGLmNkYSAgICAgPQotCQkJCShfX3UzMilfX3BhKCZwX2J1Zi0+IGhlYWRlci5mbGFnKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd19USUNfMS5jbWRfY29kZSA9IENDV19DTEFXX0NNRF9USUM7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfVElDXzEuZmxhZ3MgICAgICA9IDA7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfVElDXzEuY291bnQgICAgICA9IDA7Ci0KLQkJCWlmICgoKHVuc2lnbmVkIGxvbmcpcF9idWZmICsKLQkJCQkJICAgIHByaXZwdHItPnBfZW52LT53cml0ZV9zaXplKSA+PQotCQkJICAgKCh1bnNpZ25lZCBsb25nKShwX2J1ZmYrMioKLQkJCSAgICAocHJpdnB0ci0+cF9lbnYtPndyaXRlX3NpemUpIC0gMSkgJiBQQUdFX01BU0spKSB7Ci0JCQkJcF9idWZmID0gcF9idWZmK3ByaXZwdHItPnBfZW52LT53cml0ZV9zaXplOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgfQotICAgICAgICAgICBlbHNlICAgICAgLyogIEJ1ZmZlcnMgYXJlID0+IFBBR0VfU0laRS4gMSBidWZmIHBlciBnZXRfZnJlZV9wYWdlcyAqLwotICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICBwcml2cHRyLT5wX3dyaXRlX2ZyZWVfY2hhaW49TlVMTDsKLSAgICAgICAgICAgICAgIGZvciAoaSA9IDA7IGk8IHByaXZwdHItPnBfZW52LT53cml0ZV9idWZmZXJzIDsgaSsrKSB7Ci0gICAgICAgICAgICAgICAgICAgcF9idWZmPSh2b2lkICopX19nZXRfZnJlZV9wYWdlcyhfX0dGUF9ETUEsCi0JCSAgICAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQlwcml2cHRyLT5wX2J1ZmZfcGFnZXNfcGVyd3JpdGUpICk7Ci0gICAgICAgICAgICAgICAgICAgaWYgKHBfYnVmZj09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfY2N3LAotCQkJICAgICAgKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkgICAgICAJCXByaXZwdHItPnBfYnVmZl9jY3dfbnVtKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2J1ZmZfY2N3PU5VTEw7Ci0JCQlwX2J1Zj1wcml2cHRyLT5wX2J1ZmZfd3JpdGU7Ci0gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocF9idWYhPU5VTEwpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZykKLQkJCQkJcF9idWYtPnBfYnVmZmVyLAotCQkJCQkoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZygKLQkJCQkJcHJpdnB0ci0+cF9idWZmX3BhZ2VzX3BlcndyaXRlKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXBfYnVmLT5uZXh0OwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9NRU07Ci0gICAgICAgICAgICAgICAgICAgfSAgLyogRXJyb3Igb24gZ2V0X3BhZ2VzICAgKi8KLSAgICAgICAgICAgICAgICAgICBtZW1zZXQocF9idWZmLCAweDAwLCBwcml2cHRyLT5wX2Vudi0+d3JpdGVfc2l6ZSApOwotICAgICAgICAgICAgICAgICAgIHBfYnVmICAgICAgICAgPSBwX2ZyZWVfY2hhaW47Ci0gICAgICAgICAgICAgICAgICAgcF9mcmVlX2NoYWluICA9IHBfYnVmLT5uZXh0OwotICAgICAgICAgICAgICAgICAgIHBfYnVmLT5uZXh0ICAgPSBwcml2cHRyLT5wX3dyaXRlX2ZyZWVfY2hhaW47Ci0gICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF93cml0ZV9mcmVlX2NoYWluID0gcF9idWY7Ci0gICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9idWZmX3dyaXRlID0gcF9idWY7Ci0gICAgICAgICAgICAgICAgICAgcF9idWYtPnBfYnVmZmVyPShzdHJ1Y3QgY2xhd2J1ZiAqKXBfYnVmZjsKLSAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdyaXRlLmNkYSAgICAgPSAoX191MzIpX19wYShwX2J1ZmYpOwotICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd3JpdGUuZmxhZ3MgICA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd19yZWFkX0ZGLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfcmVhZF9GRi5mbGFncyAgICA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gd19yZWFkX0ZGLmNvdW50ICAgID0gMTsKLSAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfcmVhZF9GRi5jZGEgICAgICA9Ci0JCQkoX191MzIpX19wYSgmcF9idWYtPiBoZWFkZXIuZmxhZyk7Ci0gICAgICAgICAgICAgICAgICAgcF9idWYtPiB3X1RJQ18xLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1RJQzsKLSAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHdfVElDXzEuZmxhZ3MgICA9IDA7Ci0gICAgICAgICAgICAgICAgICAgcF9idWYtPiB3X1RJQ18xLmNvdW50ICAgPSAwOwotICAgICAgICAgICAgICAgfSAgLyogZm9yIGFsbCB3cml0ZV9idWZmZXJzICAgKi8KLQotICAgICAgICAgICB9ICAgIC8qIGVsc2UgYnVmZmVycyBhcmUgUEFHRV9TSVpFIG9yIGJpZ2dlciAqLwotCi0gICAgICAgIH0KLSAgICAgICAgcHJpdnB0ci0+cF9idWZmX3dyaXRlX251bT1jbGF3X3dyaXRlX3BhZ2VzOwotICAgICAgICBwcml2cHRyLT53cml0ZV9mcmVlX2NvdW50PXByaXZwdHItPnBfZW52LT53cml0ZV9idWZmZXJzOwotCi0KLSAgICAgICAgLyoKLSAgICAgICAgKiAgICAgICAgICAgICAgIGFsbG9jYXRlIHJlYWRfcGFnZXNfcmVxdWlyZWQgYW5kIGNoYWluIHRvIGZyZWUgY2hhaW4KLSAgICAgICAgKi8KLSAgICAgICAgaWYgKHByaXZwdHItPnBfYnVmZl9yZWFkPT1OVUxMKSB7Ci0gICAgICAgICAgICBpZiAocHJpdnB0ci0+cF9lbnYtPnJlYWRfc2l6ZSA8IFBBR0VfU0laRSkgIHsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2J1ZmZfcmVhZD0KLQkJCSh2b2lkICopX19nZXRfZnJlZV9wYWdlcyhfX0dGUF9ETUEsCi0JCQkoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZyhjbGF3X3JlYWRfcGFnZXMpICk7Ci0gICAgICAgICAgICAgICAgaWYgKHByaXZwdHItPnBfYnVmZl9yZWFkPT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmcmVlX3BhZ2VzKCh1bnNpZ25lZCBsb25nKXByaXZwdHItPnBfYnVmZl9jY3csCi0JCQkJKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkJCXByaXZwdHItPnBfYnVmZl9jY3dfbnVtKSk7Ci0JCQkvKiBmcmVlIHRoZSB3cml0ZSBwYWdlcyBzaXplIGlzIDwgcGFnZSBzaXplICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgZnJlZV9wYWdlcygodW5zaWduZWQgbG9uZylwcml2cHRyLT5wX2J1ZmZfd3JpdGUsCi0JCQkJKGludClwYWdlc190b19vcmRlcl9vZl9tYWcoCi0JCQkJcHJpdnB0ci0+cF9idWZmX3dyaXRlX251bSkpOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9idWZmX2Njdz1OVUxMOwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9idWZmX3dyaXRlPU5VTEw7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVOT01FTTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgbWVtc2V0KHByaXZwdHItPnBfYnVmZl9yZWFkLCAweDAwLCBjbGF3X3JlYWRfcGFnZXMgKiBQQUdFX1NJWkUpOwotICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9yZWFkX251bT1jbGF3X3JlYWRfcGFnZXM7Ci0gICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJ1aWxkIENMQVcgcmVhZCBmcmVlIGNoYWluCi0gICAgICAgICAgICAgICAgKgotICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgcF9idWZmPXByaXZwdHItPnBfYnVmZl9yZWFkOwotICAgICAgICAgICAgICAgIGZvciAoaT0wIDsgaTwgcHJpdnB0ci0+cF9lbnYtPnJlYWRfYnVmZmVycyA7IGkrKykgewotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYgICAgICAgID0gcF9mcmVlX2NoYWluOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9mcmVlX2NoYWluID0gcF9idWYtPm5leHQ7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwX2xhc3RfQ0NXQj09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+bmV4dD1OVUxMOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFsX1RJQ19hZGRyZXNzPTA7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfbGFzdF9DQ1dCPXBfYnVmOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5uZXh0PXBfZmlyc3RfQ0NXQjsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVhbF9USUNfYWRkcmVzcz0KLQkJCQkoX191MzIpX19wYSgmcF9maXJzdF9DQ1dCIC0+IHJlYWQgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgICAgICAgICAgcF9maXJzdF9DQ1dCPXBfYnVmOwotCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+cF9idWZmZXI9KHN0cnVjdCBjbGF3YnVmICopcF9idWZmOwotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcmVhZCBjb21tYW5kICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWQuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBRDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcmVhZC5jZGEgPSAoX191MzIpX19wYShwX2J1ZmYpOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkLmZsYWdzID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfQ0M7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWQuY291bnQgICAgICAgPSBwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW5pdGlhbGl6ZSByZWFkX2ggY29tbWFuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkX2guY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBREhFQURFUjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcmVhZF9oLmNkYSA9Ci0JCQkJKF9fdTMyKV9fcGEoJihwX2J1Zi0+aGVhZGVyKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWRfaC5mbGFncyA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkX2guY291bnQgICAgICA9IHNpemVvZihzdHJ1Y3QgY2xhd2gpOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW5pdGlhbGl6ZSBTaWduYWwgY29tbWFuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBzaWduYWwuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfU0lHTkFMX1NNT0Q7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHNpZ25hbC5jZGEgPQotCQkJCShfX3UzMilfX3BhKCYocENsYXdILT5mbGFnKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHNpZ25hbC5mbGFncyA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBzaWduYWwuY291bnQgICAgID0gMTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcl9USUNfMSBjb21tYW5kICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJfVElDXzEuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfVElDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByX1RJQ18xLmNkYSA9IChfX3UzMilyZWFsX1RJQ19hZGRyZXNzOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByX1RJQ18xLmZsYWdzID0gMDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9USUNfMS5jb3VudCAgICAgID0gMDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcl9yZWFkX0ZGIGNvbW1hbmQgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNkYSA9Ci0JCQkJKF9fdTMyKV9fcGEoJihwQ2xhd0gtPmZsYWcpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmZsYWdzID0KLQkJCQlDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19DQyB8IENDV19GTEFHX1BDSTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNvdW50ICAgID0gMTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgaW5pdGlhbGl6ZSByX1RJQ18yICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoJnBfYnVmLT5yX1RJQ18yLAotCQkJCSZwX2J1Zi0+cl9USUNfMSwgc2l6ZW9mKHN0cnVjdCBjY3cxKSk7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICBpbml0aWFsaXplIEhlYWRlciAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5oZWFkZXIubGVuZ3RoPTB4ZmZmZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5oZWFkZXIub3Bjb2RlPTB4ZmY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+aGVhZGVyLmZsYWc9Q0xBV19QRU5ESU5HOwotCi0JCQlpZiAoKCh1bnNpZ25lZCBsb25nKXBfYnVmZitwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplKSA+PQotCQkJICAoKHVuc2lnbmVkIGxvbmcpKHBfYnVmZisyKihwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplKQotCQkJCSAtMSkKLQkJCSAgICYgUEFHRV9NQVNLKSkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX2J1ZmY9IHBfYnVmZitwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmZj0KLQkJCQkodm9pZCAqKSgodW5zaWduZWQgbG9uZykKLQkJCQkJKHBfYnVmZisyKihwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplKS0xKQotCQkJCQkgJiBQQUdFX01BU0spIDsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICB9ICAgLyogZm9yIHJlYWRfYnVmZmVycyAgICovCi0gICAgICAgICAgfSAgICAgICAgIC8qIHJlYWRfc2l6ZSA8IFBBR0VfU0laRSAgKi8KLSAgICAgICAgICBlbHNlIHsgIC8qIHJlYWQgU2l6ZSA+PSBQQUdFX1NJWkUgICovCi0gICAgICAgICAgICAgICAgZm9yIChpPTAgOyBpPCBwcml2cHRyLT5wX2Vudi0+cmVhZF9idWZmZXJzIDsgaSsrKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1ZmYgPSAodm9pZCAqKV9fZ2V0X2ZyZWVfcGFnZXMoX19HRlBfRE1BLAotCQkJCShpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKAotCQkJCQlwcml2cHRyLT5wX2J1ZmZfcGFnZXNfcGVycmVhZCkpOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBfYnVmZj09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcmVlX3BhZ2VzKCh1bnNpZ25lZCBsb25nKXByaXZwdHItPnBfYnVmZl9jY3csCi0JCQkJCShpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKHByaXZwdHItPgotCQkJCQlwX2J1ZmZfY2N3X251bSkpOwotCQkJCS8qIGZyZWUgdGhlIHdyaXRlIHBhZ2VzICAqLwotCSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfYnVmZl93cml0ZTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHBfYnVmIT1OVUxMKSB7Ci0JCQkJCWZyZWVfcGFnZXMoCi0JCQkJCSAgICAodW5zaWduZWQgbG9uZylwX2J1Zi0+cF9idWZmZXIsCi0JCQkJCSAgICAoaW50KXBhZ2VzX3RvX29yZGVyX29mX21hZygKLQkJCQkJICAgIHByaXZwdHItPnBfYnVmZl9wYWdlc19wZXJ3cml0ZSkpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXBfYnVmLT5uZXh0OwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9Ci0JCQkJLyogZnJlZSBhbnkgcmVhZCBwYWdlcyBhbHJlYWR5IGFsbG9jICAqLwotCSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmPXByaXZwdHItPnBfYnVmZl9yZWFkOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocF9idWYhPU5VTEwpIHsKLQkJCQkJZnJlZV9wYWdlcygKLQkJCQkJICAgICh1bnNpZ25lZCBsb25nKXBfYnVmLT5wX2J1ZmZlciwKLQkJCQkJICAgIChpbnQpcGFnZXNfdG9fb3JkZXJfb2ZfbWFnKAotCQkJCQkgICAgIHByaXZwdHItPnBfYnVmZl9wYWdlc19wZXJyZWFkKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcF9idWY9cF9idWYtPm5leHQ7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+cF9idWZmX2Njdz1OVUxMOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5wX2J1ZmZfd3JpdGU9TlVMTDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9NRU07Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBtZW1zZXQocF9idWZmLCAweDAwLCBwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmICAgICAgICA9IHBfZnJlZV9jaGFpbjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnBfYnVmZl9yZWFkID0gcF9idWY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2ZyZWVfY2hhaW4gPSBwX2J1Zi0+bmV4dDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHBfbGFzdF9DQ1dCPT1OVUxMKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5uZXh0PU5VTEw7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlYWxfVElDX2FkZHJlc3M9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcF9sYXN0X0NDV0I9cF9idWY7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPm5leHQ9cF9maXJzdF9DQ1dCOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWFsX1RJQ19hZGRyZXNzPQotCQkJCQkoYWRkcl90KV9fcGEoCi0JCQkJCQkmcF9maXJzdF9DQ1dCIC0+IHJlYWQgKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgICAgICAgICAgcF9maXJzdF9DQ1dCPXBfYnVmOwotCQkJCS8qIHNhdmUgYnVmZiBhZGRyZXNzICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+cF9idWZmZXI9KHN0cnVjdCBjbGF3YnVmICopcF9idWZmOwotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcmVhZCBjb21tYW5kICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWQuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBRDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcmVhZC5jZGEgPSAoX191MzIpX19wYShwX2J1ZmYpOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkLmZsYWdzID0gQ0NXX0ZMQUdfU0xJIHwgQ0NXX0ZMQUdfQ0M7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWQuY291bnQgICAgICAgPSBwcml2cHRyLT5wX2Vudi0+cmVhZF9zaXplOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW5pdGlhbGl6ZSByZWFkX2ggY29tbWFuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkX2guY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfUkVBREhFQURFUjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcmVhZF9oLmNkYSA9Ci0JCQkJKF9fdTMyKV9fcGEoJihwX2J1Zi0+aGVhZGVyKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJlYWRfaC5mbGFncyA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByZWFkX2guY291bnQgICAgICA9IHNpemVvZihzdHJ1Y3QgY2xhd2gpOwotCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW5pdGlhbGl6ZSBTaWduYWwgY29tbWFuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBzaWduYWwuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfU0lHTkFMX1NNT0Q7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHNpZ25hbC5jZGEgPQotCQkJCShfX3UzMilfX3BhKCYocENsYXdILT5mbGFnKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHNpZ25hbC5mbGFncyA9IENDV19GTEFHX1NMSSB8IENDV19GTEFHX0NDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiBzaWduYWwuY291bnQgICAgID0gMTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcl9USUNfMSBjb21tYW5kICovCi0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+IHJfVElDXzEuY21kX2NvZGUgPSBDQ1dfQ0xBV19DTURfVElDOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByX1RJQ18xLmNkYSA9IChfX3UzMilyZWFsX1RJQ19hZGRyZXNzOwotICAgICAgICAgICAgICAgICAgICAgICAgcF9idWYtPiByX1RJQ18xLmZsYWdzID0gMDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9USUNfMS5jb3VudCAgICAgID0gMDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogIGluaXRpYWxpemUgcl9yZWFkX0ZGIGNvbW1hbmQgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNtZF9jb2RlID0gQ0NXX0NMQVdfQ01EX1JFQURGRjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNkYSA9Ci0JCQkJKF9fdTMyKV9fcGEoJihwQ2xhd0gtPmZsYWcpKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmZsYWdzID0KLQkJCQlDQ1dfRkxBR19TTEkgfCBDQ1dfRkxBR19DQyB8IENDV19GTEFHX1BDSTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT4gcl9yZWFkX0ZGLmNvdW50ICAgID0gMTsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgaW5pdGlhbGl6ZSByX1RJQ18yICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoJnBfYnVmLT5yX1RJQ18yLCAmcF9idWYtPnJfVElDXzEsCi0JCQkJc2l6ZW9mKHN0cnVjdCBjY3cxKSk7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICBpbml0aWFsaXplIEhlYWRlciAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5oZWFkZXIubGVuZ3RoPTB4ZmZmZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfYnVmLT5oZWFkZXIub3Bjb2RlPTB4ZmY7Ci0gICAgICAgICAgICAgICAgICAgICAgICBwX2J1Zi0+aGVhZGVyLmZsYWc9Q0xBV19QRU5ESU5HOwotCi0gICAgICAgICAgICAgICAgfSAgICAvKiBGb3IgcmVhZF9idWZmZXJzICAgKi8KLSAgICAgICAgICB9ICAgICAvKiAgcmVhZF9zaXplID49IFBBR0VfU0laRSAgICovCi0gICAgICAgIH0gICAgICAgLyogIHBCdWZmcmVhZCA9IE5VTEwgKi8KLSAgICAgICAgYWRkX2NsYXdfcmVhZHMoIGRldiAgLHBfZmlyc3RfQ0NXQiAsIHBfbGFzdF9DQ1dCKTsKLQlwcml2cHRyLT5idWZmc19hbGxvYyA9IDE7Ci0KLSAgICAgICAgcmV0dXJuIDA7Ci19ICAgIC8qICAgIGVuZCBvZiBpbml0X2Njd19iayAqLwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgIHByb2JlX2Vycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotCi1zdGF0aWMgdm9pZAotcHJvYmVfZXJyb3IoIHN0cnVjdCBjY3dncm91cF9kZXZpY2UgKmNnZGV2KQotewotCXN0cnVjdCBjbGF3X3ByaXZiayAqcHJpdnB0cjsKLQotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJwcm9iZXJyIik7Ci0JcHJpdnB0ciA9IGRldl9nZXRfZHJ2ZGF0YSgmY2dkZXYtPmRldik7Ci0JaWYgKHByaXZwdHIgIT0gTlVMTCkgewotCQlkZXZfc2V0X2RydmRhdGEoJmNnZGV2LT5kZXYsIE5VTEwpOwotCQlrZnJlZShwcml2cHRyLT5wX2Vudik7Ci0JCWtmcmVlKHByaXZwdHItPnBfbXRjX2VudmVsb3BlKTsKLQkJa2ZyZWUocHJpdnB0cik7Ci0JfQotfSAgICAvKiAgICBwcm9iZV9lcnJvciAgICAqLwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgIGNsYXdfcHJvY2Vzc19jb250cm9sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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W5kIG9mIGNsYXdfcHJvY2Vzc19jb250cm9sICAgICovCi0KLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKgotKiAgICAgICAgICAgICAgIGNsYXdfc2VuZF9jb250cm9sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLQotc3RhdGljIGludAotY2xhd19zZW5kX2NvbnRyb2woc3RydWN0IG5ldF9kZXZpY2UgKmRldiwgX191OCB0eXBlLCBfX3U4IGxpbmssCi0JIF9fdTggY29ycmVsYXRvciwgX191OCByYywgY2hhciAqbG9jYWxfbmFtZSwgY2hhciAqcmVtb3RlX25hbWUpCi17Ci0gICAgICAgIHN0cnVjdCBjbGF3X3ByaXZiayAJCSpwcml2cHRyOwotICAgICAgICBzdHJ1Y3QgY2xhd2N0bCAgICAgICAgICAgICAgICAgICpwX2N0bDsKLSAgICAgICAgc3RydWN0IHN5c3ZhbCAgICAgICAgICAgICAgICAgICAqcF9zeXN2YWw7Ci0gICAgICAgIHN0cnVjdCBjb25uY21kICAgICAgICAgICAgICAgICAgKnBfY29ubmVjdDsKLSAgICAgICAgc3RydWN0IHNrX2J1ZmYgCQkJKnNrYjsKLQotCUNMQVdfREJGX1RFWFQoMiwgc2V0dXAsICJzbmRjbnRsIik7Ci0JcHJpdnB0ciA9IGRldi0+bWxfcHJpdjsKLSAgICAgICAgcF9jdGw9KHN0cnVjdCBjbGF3Y3RsICopJnByaXZwdHItPmN0bF9iazsKLQotICAgICAgICBwX2N0bC0+Y29tbWFuZD10eXBlOwotICAgICAgICBw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cHRyLT5wX2Vudi0+d3JpdGVfc2l6ZTsKLQkJCX0KLSAgICAgICAgICAgICAgICAgICAgICAgIG1lbXNldCgmcF9zeXN2YWwtPnJlc2VydmVkLCAweDAwLCA0KTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgQ09OTkVDVElPTl9SRVFVRVNUOgotICAgICAgICAgICAgICAgIGNhc2UgQ09OTkVDVElPTl9SRVNQT05TRToKLSAgICAgICAgICAgICAgICBjYXNlIENPTk5FQ1RJT05fQ09ORklSTToKLSAgICAgICAgICAgICAgICBjYXNlIERJU0NPTk5FQ1Q6Ci0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoJnBfc3lzdmFsLT5ob3N0X25hbWUsIGxvY2FsX25hbWUsIDgpOwotICAgICAgICAgICAgICAgICAgICAgICAgbWVtY3B5KCZwX3N5c3ZhbC0+V1NfbmFtZSwgcmVtb3RlX25hbWUsIDgpOwotCQkJaWYgKHByaXZwdHItPnBfZW52LT5wYWNraW5nID4gMCkgewotCQkJLyogSG93IGJpZyBpcyB0aGUgYmlnZ2VzdCBwYWNrZXQgKi8KLQkJCQlwX2Nvbm5lY3QtPnJlc2VydmVkMVswXT1DTEFXX0ZSQU1FX1NJWkU7Ci0gICAgICAgICAgICAgICAgICAgICAgICAJcF9jb25uZWN0LT5yZXNlcnZlZDFbMV09Q0xBV19GUkFNRV9TSVpFOwotCQkJfSBlbHNlIHsKLQkgICAgICAgICAgICAgICAgICAgICAgICBtZW1zZXQoJnBfY29ubmVjdC0+cmVzZXJ2ZWQxLCAweDAwLCA0KTsKLSAgICAgICAgCSAgICAgICAgICAgICAgICBtZW1zZXQoJnBfY29ubmVjdC0+cmVzZXJ2ZWQyLCAweDAwLCA0KTsKLQkJCX0KLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGRlZmF1bHQ6Ci0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotCi0gICAgICAgIC8qICAgICAgd3JpdGUgQ29udHJvbCBSZWNvcmQgdG8gdGhlIGRldmljZSAgICAgICAgICAgICAgICAgICAqLwotCi0KLSAgICAgICAgc2tiID0gZGV2X2FsbG9jX3NrYihzaXplb2Yoc3RydWN0IGNsYXdjdGwpKTsKLSAgICAgICAgaWYgKCFza2IpIHsKLSAgICAgICAgICAgICAgICByZXR1cm4gLUVOT01FTTsKLSAgICAgICAgfQotCW1lbWNweShza2JfcHV0KHNrYiwgc2l6ZW9mKHN0cnVjdCBjbGF3Y3RsKSksCi0JCXBfY3RsLCBzaXplb2Yoc3RydWN0IGNsYXdjdGwpKTsKLQlpZiAocHJpdnB0ci0+cF9lbnYtPnBhY2tpbmcgPj0gUEFDS19TRU5EKQotCQljbGF3X2h3X3R4KHNrYiwgZGV2LCAxKTsKLQllbHNlCi0gICAgICAgIAljbGF3X2h3X3R4KHNrYiwgZGV2LCAwKTsKLSAgICAgICAgcmV0dXJuIDA7Ci19ICAvKiAgIGVuZCBvZiBjbGF3X3NlbmRfY29udHJvbCAgKi8KLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKgotKiAgICAgICAgICAgICAgIGNsYXdfc25kX2Nvbm5fcmVxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLXN0YXRpYyBpbnQKLWNsYXdfc25kX2Nvbm5fcmVxKHN0cnVjdCBuZXRfZGV2aWNlICpkZXYsIF9fdTggbGluaykKLXsKLSAgICAgICAgaW50ICAgICAgICA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raDsKLQkJCXBfcGFja2gtLTsgIC8qIHVuIHBlZWsgKi8KLQkJCWlmICgocF9jdGxyZWMtPmNvbW1hbmQgPT0gQ09OTkVDVElPTl9SRVNQT05TRSkgfHwKLQkJICAgICAgICAgICAgKHBfY3RscmVjLT5jb21tYW5kID09IENPTk5FQ1RJT05fQ09ORklSTSkpCi0JCQkJcF9lbnYtPnBhY2tpbmcgPSBET19QQUNLRUQ7Ci0JCX0KLQkJaWYgKHBfZW52LT5wYWNraW5nID09IERPX1BBQ0tFRCkKLQkJCWxpbmtfbnVtPXBfcGFja2gtPmxpbmtfbnVtOwotCQllbHNlCi0JICAgICAgICAgICAgICAgIGxpbmtfbnVtPXBfdGhpc19jY3ctPmhlYWRlci5vcGNvZGUgLyA4OwotICAgICAgICAgICAgICAgIGlmICgocF90aGlzX2Njdy0+aGVhZGVyLm9wY29kZSAmIE1PUkVfdG9fQ09NRV9GTEFHKSE9MCkgewotICAgICAgICAgICAgICAgICAgICAgICAgbXRjX3RoaXNfZnJtPTE7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAocF90aGlzX2Njdy0+aGVhZGVyLmxlbmd0aCE9Ci0JCQkJcHJpdnB0ci0+cF9lbnYtPnJlYWRfc2l6ZSApIHsKLQkJCQlkZXZfd2FybihwX2RldiwKLQkJCQkJIlRoZSBjb21tdW5pY2F0aW9uIHBlZXIgb2YgJXMiCi0JCQkJCSIgc2VudCBhIGZhdWx0eSIKLQkJCQkJIiBmcmFtZSBvZiBsZW5ndGggJTAyeFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXYtPm5hbWUsIHBfdGhpc19jY3ctPmhlYWRlci5sZW5ndGgpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIH0KLQotICAgICAgICAgICAgICAgIGlmIChwcml2cHRyLT5tdGNfc2tpcHBpbmcpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgICAgICAgICAgICAqICAgV2UncmUgaW4gdGhlIG1vZGUgb2Ygc2tpcHBpbmcgcGFzdCBhCi0JCQkqICAgbXVsdGktZnJhbWUgbWVzc2FnZQotICAgICAgICAgICAgICAgICAgICAgICAgKiAgIHRoYXQgd2UgY2FuJ3QgcHJvY2VzcyBmb3Igc29tZSByZWFzb24gb3Igb3RoZXIuCi0gICAgICAgICAgICAgICAgICAgICAgICAqICAgVGhlIGZpcnN0IGZyYW1lIHdpdGhvdXQgdGhlIE1vcmUtVG8tQ29tZSBmbGFnIGlzCi0JCQkqICAgdGhlIGxhc3QgZnJhbWUgb2YgdGhlIHNraXBwZWQgbWVzc2FnZS4KLSAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgaW4gY2FzZSBvZiBNb3JlLVRvLUNvbWUgbm90IHNldCBpbiB0aGlzIGZyYW1lICovCi0gICAgICAgICAgICAgICAgICAgICAgICBpZiAobXRjX3RoaXNfZnJtPT0wKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPm10Y19za2lwcGluZz0wOyAvKiBPaywgdGhlIGVuZCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5tdGNfbG9naWNhbF9saW5rPS0xOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZ290byBOZXh0RnJhbWU7Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgaWYgKGxpbmtfbnVtPT0wKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjbGF3X3Byb2Nlc3NfY29udHJvbChkZXYsIHBfdGhpc19jY3cpOwotCQkJQ0xBV19EQkZfVEVYVCg0LCB0cmFjZSwgIlVucGtDbnRsIik7Ci0gICAgICAgICAgICAgICAgICAgICAgICBnb3RvIE5leHRGcmFtZTsKLSAgICAgICAgICAgICAgICB9Ci11bnBhY2tfb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HByaXZwdHItPm10Y19sb2dpY2FsX2xpbms9bGlua19udW07Ci0gICAgICAgICAgICAgICAgfQotCi0gICAgICAgICAgICAgICAgaWYgKGJ5dGVzX3RvX21vdiA+IChNQVhfRU5WRUxPUEVfU0laRS0gcHJpdnB0ci0+bXRjX29mZnNldCkgKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIGVycm9yICAgICAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+c3RhdHMucnhfZnJhbWVfZXJyb3JzKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICBnb3RvIE5leHRGcmFtZTsKLSAgICAgICAgICAgICAgICB9Ci0JCWlmIChwX2Vudi0+cGFja2luZyA9PSBET19QQUNLRUQpIHsKLQkJCW1lbWNweSggcHJpdnB0ci0+cF9tdGNfZW52ZWxvcGUrIHByaXZwdHItPm10Y19vZmZzZXQsCi0JCQkJcF9wYWNrZCtzaXplb2Yoc3RydWN0IGNsYXdwaCksIGJ5dGVzX3RvX21vdik7Ci0KLQkJfSBlbHNlCXsKLSAgICAgICAgICAgICAgICAJbWVtY3B5KCBwcml2cHRyLT5wX210Y19lbnZlbG9wZSsgcHJpdnB0ci0+bXRjX29mZnNldCwKLSAgICAgICAgICAgICAgICAgICAgICAgIAlwX3RoaXNfY2N3LT5wX2J1ZmZlciwgYnl0ZXNfdG9fbW92KTsKLQkJfQotICAgICAgICAgICAgICAgIGlmIChtdGNfdGhpc19mcm09PTApIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxlbl9vZl9kYXRhPXByaXZwdHItPm10Y19vZmZzZXQrYnl0ZXNfdG9fbW92OwotICAgICAgICAgICAgICAgICAgICAgICAgc2tiPWRldl9hbGxvY19za2IobGVuX29mX2RhdGEpOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNrYikgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkoc2tiX3B1dChza2IsbGVuX29mX2RhdGEpLAotCQkJCQlwcml2cHRyLT5wX210Y19lbnZlbG9wZSwKLQkJCQkJbGVuX29mX2RhdGEpOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBza2ItPmRldj1kZXY7Ci0JCQkJc2tiX3Jlc2V0X21hY19oZWFkZXIoc2tiKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2tiLT5wcm90b2NvbD1odG9ucyhFVEhfUF9JUCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNrYi0+aXBfc3VtbWVkPUNIRUNLU1VNX1VOTkVDRVNTQVJZOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcml2cHRyLT5zdGF0cy5yeF9wYWNrZXRzKys7Ci0JCQkJcHJpdnB0ci0+c3RhdHMucnhfYnl0ZXMrPWxlbl9vZl9kYXRhOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXRpZl9yeChza2IpOwotICAgICAgICAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7Ci0JCQkJZGV2X2luZm8ocF9kZXYsICJBbGxvY2F0aW5nIGEgYnVmZmVyIGZvciIKLQkJCQkJIiBpbmNvbWluZyBkYXRhIGZhaWxlZFxuIik7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPnN0YXRzLnJ4X2Ryb3BwZWQrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPm10Y19vZmZzZXQ9MDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHByaXZwdHItPm10Y19sb2dpY2FsX2xpbms9LTE7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+bXRjX29mZnNldCs9Ynl0ZXNfdG9fbW92OwotICAgICAgICAgICAgICAgIH0KLQkJaWYgKHBfZW52LT5wYWNraW5nID09IERPX1BBQ0tFRCkKLQkJCWdvdG8gdW5wYWNrX25leHQ7Ci1OZXh0RnJhbWU6Ci0gICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAqICAgUmVtb3ZlIFRoaXNDQ1dibG9jayBmcm9tIGFjdGl2ZSByZWFkIHF1ZXVlLCBhbmQgYWRkIGl0Ci0gICAgICAgICAgICAgICAgKiAgIHRvIHF1ZXVlIG9mIGZyZWUgYmxvY2tzIHRvIGJlIHJldXNlZC4KLSAgICAgICAgICAgICAgICAqLwotICAgICAgICAgICAgICAgIGkrKzsKLSAgICAgICAgICAgICAgICBwX3RoaXNfY2N3LT5oZWFkZXIubGVuZ3RoPTB4ZmZmZjsKLSAgICAgICAgICAgICAgICBwX3RoaXNfY2N3LT5oZWFkZXIub3Bjb2RlPTB4ZmY7Ci0gICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAqICAgICAgIGFkZCB0aGlzIG9uZSB0byB0aGUgZnJlZSBxdWV1ZSBmb3IgbGF0ZXIgcmV1c2UKLSAgICAgICAgICAgICAgICAqLwotICAgICAgICAgICAgICAgIGlmIChwX2ZpcnN0X2Njdz09TlVMTCkgewotICAgICAgICAgICAgICAgICAgICAgICAgcF9maXJzdF9jY3cgPSBwX3RoaXNfY2N3OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHBfbGFzdF9jY3ctPm5leHQgPSBwX3RoaXNfY2N3OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBwX2xhc3RfY2N3ID0gcF90aGlzX2NjdzsKLSAgICAgICAgICAgICAgICAvKgotICAgICAgICAgICAgICAgICogICAgICAgY2hhaW4gdG8gbmV4dCBibG9jayBvbiBhY3RpdmUgcmVhZCBxdWV1ZQotICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgcF90aGlzX2NjdyA9IHByaXZwdHItPnBfcm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gICAgICAgICAgICAgICBwX2Njd2JrPXByaXZwdHItPnBfcmVhZF9hY3RpdmVfZmlyc3Q7Ci0gICAgICAgICAgICAgICAgcGFybSA9ICh1bnNpZ25lZCBsb25nKSBwX2NoOwotICAgICAgICAgICAgICAgIHJjID0gY2N3X2RldmljZV9zdGFydCAocF9jaC0+Y2RldiwgJnBfY2N3YmstPnJlYWQsIHBhcm0sCi0JCQkJICAgICAgIDB4ZmYsIDApOwotICAgICAgICAgICAgICAgIGlmIChyYyAhPSAwKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjY3dfY2hlY2tfcmV0dXJuX2NvZGUocF9jaC0+Y2RldiwgcmMpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQotCWVsc2UgewotCQlDTEFXX0RCRl9URVhUKDIsIHRyYWNlLCAiUmVhZEFjdCIpOwotCX0KLQotICAgICAgICBpZiAobG9jaz09TE9DS19ZRVMpIHsKLSAgICAgICAgICAgICAgICBzcGluX3VubG9ja19pcnFyZXN0b3JlKGdldF9jY3dkZXZfbG9jayhwX2NoLT5jZGV2KSwgc2F2ZWZsYWdzKTsKLSAgICAgICAgfQotCUNMQVdfREJGX1RFWFQoNCwgdHJhY2UsICJTdFJkRXhpdCIpOwotICAgICAgICByZXR1cm47Ci19ICAgICAgIC8qICAgIGVuZCBvZiBjbGF3X3N0cnRfcmVhZCAgICAqLwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgIGNsYXdfc3RydF9vdXRfSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0t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Bhcm0sCi0JCQkJICAgICAgMHhmZiwgMCk7Ci0gICAgICAgICAgICAgICAgaWYgKHJjICE9IDApIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGNjd19jaGVja19yZXR1cm5fY29kZShwX2NoLT5jZGV2LCByYyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICB9Ci0gICAgICAgIGRldi0+dHJhbnNfc3RhcnQgPSBqaWZmaWVzOwotICAgICAgICByZXR1cm47Ci19ICAgICAgIC8qICAgIGVuZCBvZiBjbGF3X3N0cnRfb3V0X0lPICAgICovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKLSogICAgICAgRnJlZSB3cml0ZSBidWZmZXJzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLXN0YXRpYyB2b2lkCi1jbGF3X2ZyZWVfd3J0X2J1Ziggc3RydWN0IG5ldF9kZXZpY2UgKmRldiApCi17Ci0KLQlzdHJ1Y3QgY2xhd19wcml2YmsgKnByaXZwdHIgPSAoc3RydWN0IGNsYXdfcHJpdmJrICopZGV2LT5tbF9wcml2OwotCXN0cnVjdCBjY3diaypwX3RoaXNfY2N3OwotCXN0cnVjdCBjY3diaypwX25leHRfY2N3OwotCi0JQ0xBV19EQkZfVEVYVCg0LCB0cmFjZSwgImZyZWV3cnRiIik7Ci0gICAgICAgIC8qICBzY2FuIHRoZSB3cml0ZSBxdWV1ZSB0byBmcmVlIGFueSBjb21wbGV0ZWQgd3JpdGUgcGFja2V0cyAgICovCi0gICAgICA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X2Njdy0+d3JpdGUuY291bnQ7Ci0JCQlwX3RoaXNfY2N3PXByaXZwdHItPnBfd3JpdGVfYWN0aXZlX2ZpcnN0OwotICAgICAgICAgICAgICAgICAgICAgICAgcHJpdnB0ci0+c3RhdHMudHhfcGFja2V0cysrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIHsKLQkJCWJyZWFrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgICBpZiAocHJpdnB0ci0+d3JpdGVfZnJlZV9jb3VudCE9MCkgewotICAgICAgICAgICAgICAgIGNsYXdfY2xlYXJiaXRfYnVzeShUQl9OT0JVRkZFUixkZXYpOwotICAgICAgICB9Ci0gICAgICAgIC8qICAgd2hvbGUgY2hhaW4gcmVtb3ZlZD8gICAqLwotICAgICAgICBpZiAocHJpdnB0ci0+cF93cml0ZV9hY3RpdmVfZmlyc3Q9PU5VTEwpIHsKLSAgICAgICAgICAgICAgICBwcml2cHRyLT5wX3dyaXRlX2FjdGl2ZV9sYXN0PU5VTEw7Ci0gICAgICAgIH0KLQlDTEFXX0RCRl9URVhUXyg0LCB0cmFjZSwgIkZXQz0lZCIsIHByaXZwdHItPndyaXRlX2ZyZWVfY291bnQpOwotICAgICAgICByZXR1cm47Ci19Ci0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSoKLSogICAgICAgY2xhdyBmcmVlIG5ldGRldmljZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi1zdGF0aWMgdm9pZAot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lNFKCJHUEwiKTsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvczM5MC9uZXQvY2xhdy5oIGIvZHJpdmVycy9zMzkwL25ldC9jbGF3LmgKZGVsZXRlZCBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDMzMzliOWIuLjAwMDAwMDAKLS0tIGEvZHJpdmVycy9zMzkwL25ldC9jbGF3LmgKKysrIC9kZXYvbnVsbApAQCAtMSwzNDggKzAsMCBAQAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSogIERlZmluZSBjb25zdGFudHMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICBDQ1cgY29tbWFuZCBjb2RlcyBmb3IgQ0xBVyBwcm90b2NvbCAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLSNkZWZpbmUgQ0NXX0NMQVdfQ01EX1dSSVRFICAgICAgICAgICAweDAxICAgICAgLyogd3JpdGUgLSBub3QgaW5jbHVkaW5nIGxpbmsgKi8KLSNkZWZpbmUgQ0NXX0NMQVdfQ01EX1JFQUQgICAgICAgICAgICAweDAyICAgICAgLyogcmVhZCAqLwotI2RlZmluZSBDQ1dfQ0xBV19DTURfTk9QICAgICAgICAgICAgIDB4MDMgICAgICAvKiBOT1AgKi8KLSNkZWZpbmUgQ0NXX0NMQVdfQ01EX1NFTlNFICAgICAgICAgICAweDA0ICAgICAgLyogU2Vuc2UgKi8KLSNk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YXcKLX07Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKLSogIERlZmluZSBDb250cm9sIEJsb2NrcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLS8qICAgICBDTEFXIGhlYWRlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tKi8KLQotc3RydWN0IGNsYXdoIHsKLSAgICAgICAgX191MTYgIGxlbmd0aDsgICAgIC8qIGxlbmd0aCBvZiBkYXRhIHJlYWQgYnkgcHJlY2VkaW5nIHJlYWQgQ0NXICovCi0gICAgICAgIF9fdTggICBvcGNvZGU7ICAgICAvKiBlcXVpdmFsZW50IHJlYWQgQ0NXICovCi0gICAgICAgIF9fdTggICBmbGFnOyAgICAgICAvKiBmbGFnIG9mIEZGIHRvIGluZGljYXRlIHJlYWQgd2FzIGNvbXBsZXRlZCAqLwotfTsKLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotLyogICAgIENMQVcgUGFja2luZyBoZWFkZXIgICA0IGJ5dGVzICAgICAgICAgICAgICAgICAgICAqLwotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotc3RydWN0IGNsYXdwaCB7Ci0gICAgICAgX191MTYgb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ICAgICAgIHN0cnVjdCBjY3cxICAgIHJfVElDXzE7ICAgICAgICAvKiBUSUMxICovCi0gICAgICAgIHN0cnVjdCBjY3cxICAgIHJfcmVhZF9GRjsgICAgICAvKiByZWFkIEZGICAqLwotICAgICAgICBzdHJ1Y3QgY2N3MSAgICByX1RJQ18yOyAgICAgICAgLyogVElDMiAqLwotfTsKLQotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotLyogICAgIENMQVcgY29udHJvbCBibG9jayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwotc3RydWN0IGNsYXdjdGwgewotICAgICAgICBfX3U4ICAgIGNvbW1hbmQ7ICAgICAgLyogY29udHJvbCBjb21tYW5kICovCi0gICAgICAgIF9fdTggICAgdmVyc2lvbjsgICAgICAvKiBDTEFXIHByb3RvY29sIHZlcnNpb24gKi8KLSAgICAgICAgX191OCAgICBsaW5raWQ7ICAgICAgIC8qIGxpbmsgSUQgICAqLwotICAgICAgICBfX3U4ICAgIGNvcnJlbGF0b3I7ICAgLyogY29ycmVsYXRvciAqLwotICAgICAgICBfX3U4ICAgIHJjOyAgICAgICAgICAgLyogcmV0dXJuIGNvZGUgKi8KLSAgICAgICAgX191OCAgICByZXNlcnZlZDE7ICAgIC8qIHJlc2VydmVkICovCi0gICAgICAgIF9fdTggICAgcmVzZXJ2ZWQyOyAgICAvKiByZXNlcnZlZCAqLwotICAgICAgICBfX3U4ICAgIHJlc2VydmVkMzsgICAgLyogcmVzZXJ2ZWQgKi8KLSAgICAgICAgX191OCAgICBkYXRhWzI0XTsgICAgIC8qIGNvbW1hbmQgc3BlY2lmaWMgZmllbGRzICovCi19OwotCi0vKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0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0xBV19XUklURSAgICAgIDB4MDIgICAgICAvKiAtIFNldCBpZiB0aGlzIGlzIGEgd3JpdGUgY2hhbm5lbCAqLwotI2RlZmluZSBDTEFXX1JFQUQJMHgwMSAgICAgIC8qIC0gU2V0IGlmIHRoaXMgaXMgYSByZWFkIGNoYW5uZWwgICovCi0jZGVmaW5lIENMQVdfVElNRVIgICAgICAweDgwICAgICAgLyogLSBTZXQgaWYgdGltZXIgbWFkZSB0aGUgd2FrZV91cCAgKi8KLX07Ci0KLS8qLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qCi0qICAgICAgICAgICBDTEFXICBlbnZpcm9ubWVudCBibG9jayAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotKi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSovCi0KLXN0cnVjdCBjbGF3X2VudiB7Ci0gICAgICAgIHVuc2lnbmVkIGludCAgICAgICAgICAgIGRldm5vWzJdOyAgICAgICAvKiBkZXZpY2UgbnVtYmVyICovCi0gICAgICAgIGNoYXIgICAgICAgICAgICAgICAgICAgIGhvc3RfbmFtZVs5XTsgICAvKiBIb3N0IG5hbWUgKi8KLSAgICAgICAgY2hhciAgICAgICAgICAgICAgICAgICAgYWRhcHRlcl9uYW1lIFs5XTsgLyogYWRhcHRlciBuYW1lICovCi0gICAgICAgIGNoYXIgICAgICAgICAgICAgICAgICAgIGFwaV90eXBlWzldOyAgICAvKiBUQ1BJUCwgQVBJIG9yIFBBQ0tFRCAqLwotICAgICAgICB2b2lkICAgICAgICAgICAgICAgICAgICAqcF9wcml2OyAgICAgICAgLyogcHJpdnB0ciAqLwotICAgICAgICBfX3UxNiAgICAgICAgICAgICAgICAgICByZWFkX2J1ZmZlcnM7ICAgLyogcmVhZCBidWZmZXIgbnVtYmVyICovCi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ZSBidWZzIGZvciB3cml0ZSAqLwotCXN0cnVjdCAgICAgbmV0X2RldmljZV9zdGF0cyAgc3RhdHM7IC8qIAkgZGV2aWNlIHN0YXR1cyAgICAqLwotICAgICAgICBzdHJ1Y3QgY2hiayBjaGFubmVsWzJdOyAgICAgICAgICAgIC8qIENoYW5uZWwgY29udHJvbCBibG9ja3MgKi8KLSAgICAgICAgX191OCAgICAgICBtdGNfc2tpcHBpbmc7Ci0gICAgICAgIGludCAgICAgICAgbXRjX29mZnNldDsKLSAgICAgICAgaW50ICAgICAgICBtdGNfbG9naWNhbF9saW5rOwotICAgICAgICB2b2lkICAgICAgICpwX210Y19lbnZlbG9wZTsKLQlzdHJ1Y3QJICAgc2tfYnVmZgkqcGtfc2tiOwkvKiBwYWNraW5nIGJ1ZmZlciAgICAqLwotCWludAkgICBwa19jbnQ7Ci0gICAgICAgIHN0cnVjdCBjbGF3Y3RsIGN0bF9iazsKLSAgICAgICAgc3RydWN0IGNsYXdfZW52ICpwX2VudjsKLSAgICAgICAgX191OCAgICAgICBzeXN0ZW1fdmFsaWRhdGVfY29tcDsKLSAgICAgICAgX191OCAgICAgICByZWxlYXNlX3BlbmQ7Ci0gICAgICAgIF9fdTggICAgICBjaGVja3N1bV9yZWNlaXZlZF9pcF9wa3RzOwotCV9fdTggICAgICBidWZmc19hbGxvYzsKLSAgICAgICAgc3RydWN0IGVuZGNjdyAgZW5kX2NjdzsKLSAgICAgICAgdW5zaWduZWQgbG9uZyAgdGJ1c3k7Ci0KLX07Ci0KLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLS8qIGRlZmluZSBnbG9iYWwgY29uc3RhbnRzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0jZGVmaW5lIENDV0JLX1NJWkUgc2l6ZW9m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W1lcl9saXN0IHRpbWVyOworCXN0cnVjdCB3b3JrX3N0cnVjdCB3b3JrOwogCXZvaWQgKCpmYXN0X2RvbmUpIChzdHJ1Y3QgaXByX2NtbmQgKik7CiAJdm9pZCAoKmRvbmUpIChzdHJ1Y3QgaXByX2NtbmQgKik7CiAJaW50ICgqam9iX3N0ZXApIChzdHJ1Y3QgaXByX2NtbmQgKik7CmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjLmggYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjLmgKaW5kZXggNDM0ZTkwMy4uOWI4MWEzNCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmYy5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmMuaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpID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nNnLmgKaW5kZXggOTI4ZWY2MC4uZTU1N2JjZCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ic2cuaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2JzZy5oCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDEwLTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDEwLTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMjQ2LDYgKzI0Niw3IEBACiAjZGVmaW5lIGxwZmNfZW1iMV9zdWJjbW5kX3N1YnN5c19XT1JECXdvcmQ2CiAvKiBTdWJzeXN0ZW0gQ09NTiAoMHgwMSkgT3BDb2RlcyAqLwogI2RlZmluZSBTTElfQ09ORklHX1NVQlNZU19DT01OCQkweDAxCisjZGVmaW5lIENPTU5fT1BDT0RFX0dFVF9QUk9GSUxFX0NPTkZJRwkweEE0CiAjZGVmaW5lIENPTU5fT1BDT0RFX1JFQURfT0JKRUNUCQkweEFCCiAjZGVmaW5lIENPTU5fT1BDT0RFX1dSSVRFX09CSkVDVAkweEFDCiAjZGVmaW5lIENPTU5fT1BDT0RFX1JFQURfT0JKRUNUX0xJU1QJMHhBRApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19jcnRuLmggYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2NydG4uaAppbmRleCAwMDY2NWE1Li41ODdlM2U5IDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2NydG4uaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2NydG4uaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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GZjX2Z1bmN0aW9uX3RlbXBsYXRlIGxwZmNfdnBvcnRfdHJhbnNwb3J0X2Z1bmN0aW9uczsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfY3QuYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfY3QuYwppbmRleCA2MWEzMmNkLi5hZjEyOTk2IDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2N0LmMKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19jdC5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTMgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC01NTUsNyArNTU1LDcgQEAKIAkJCQkJfQogCQkJCX0KIAkJCX0KLQkJCWlmIChDVGVudHJ5ICYgKGJlMzJ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vc2NzaS9scGZjL2xwZmNfZGVidWdmcy5jCmluZGV4IDU2MzNlN2QuLjUxM2VkY2IgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZGVidWdmcy5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZGVidWdmcy5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA3LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNy0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2Vscy5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19lbHMuYwppbmRleCBjNjYwODhkLi44NTFlOGVmIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2Vscy5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZWxzLmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogUG9ydGlvbnMgQ29weXJpZ2h0IChDKSAyMDA0LTIwMDUgQ2hyaXN0b3BoIEhlbGx3aWcgICAgICAgICAgICAgICoKQEAgLTIyNDMsOCArMjI0Myw3IEBACiAJKi8KIAlpZiAodnBvcnQtPnBvcnRfc3RhdGUgPCBMUEZDX1ZQT1JUX1JFQURZKSB7CiAJCS8qIElmIHdlIGdldCBoZXJlLCB0aGVyZSBpcyBub3RoaW5nIHRvIEFESVNDICovCi0JCWlmICh2cG9ydC0+cG9ydF90eXBlID09IExQRkNfUEhZU0lDQUxfUE9SVCkKLQkJCWxwZmNfaXNzdWVfY2xlYXJfbGEocGhiYSwgdnBvcnQpOworCQlscGZjX2lzc3VlX2NsZWFyX2xhKHBoYmEsIHZwb3J0KTsKIAkJaWYgKCEodnBvcnQtPm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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogUG9ydGlvbnMgQ29weXJpZ2h0IChDKSAyMDA0LTIwMDUgQ2hyaXN0b3BoIEhlbGx3aWcgICAgICAgICAgICAgICoKQEAgLTM0MzksNiArMzQzOSwxMSBAQAogCXBtYi0+Y29udGV4dDEgPSBOVUxMOwogCXBtYi0+Y29udGV4dDIgPSBOVUxMOwogCisJbHBmY19wcmludGZfdmxvZyh2cG9ydCwgS0VSTl9JTkZPLCBMT0dfU0xJLAorCQkJICIwMDAyIHJwaToleCBESUQ6JXggZmxnOiV4ICVkIG1hcDoleCAlcFxuIiwKKwkJCSBuZGxwLT5ubHBfcnBpLCBuZGxwLT5ubHBfRElELCBuZGxwLT5ubHBfZmxhZywKKwkJCSBhdG9taWNfcmVhZCgmbmRscC0+a3JlZi5yZWZjb3VudCksCisJCQkgbmRscC0+bmxwX3VzZ19tYXAsIG5kbHApOwogCWlmIChuZGxwLT5ubHBfZmxhZyAm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fcmVhZCgmbmRscC0+a3JlZi5yZWZjb3VudCkpOworCQkJYXRvbWljX3JlYWQoJm5kbHAtPmtyZWYucmVmY291bnQpLCBuZGxwLT5ubHBfcnBpKTsKIAogCS8qIHJlbW92ZSBuZGxwIGZyb20gYWN0aW9uLiAqLwogCWxwZmNfbmxwX3JlbW92ZShuZGxwLT52cG9ydCwgbmRscCk7CmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2h3LmggYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2h3LmgKaW5kZXggMjM2MjU5Mi4uMzdiZWI5ZCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ody5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaHcuaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgIC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i9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2h3NC5oCmluZGV4IGY0MzJlYzEuLjE4MTNjNDUgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaHc0LmgKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19odzQuaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwOS0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwOS0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTMwODUsNiArMzA4NSw5IEBACiAjZGVmaW5lIExQRkNfQVNZTkNfTElOS19TUEVFRF8xMDBNQlBTCQkweDIKICNkZWZpbmUgTFBGQ19BU1lOQ19MSU5LX1NQRUVEXzFHQlBTCQkweDMKICNkZWZpbmUgTFBGQ19BU1lOQ19MSU5LX1NQRUVEXzEwR0JQUwkJMHg0Cis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ogCiAvKgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19pbml0LmMgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2luaXQuYwppbmRleCAwYjJjNTNhLi5lOGM4YzFlIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2luaXQuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2luaXQuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMTMzMCwxMyArMTMzMCwxNCBAQAogdm9pZAogbHBmY19zbGk0X29mZmxpbmVfZXJhdHQoc3RydWN0IGxwZmNfaGJhICpwaGJhKQogeworCXNwaW5fbG9ja19pcnEoJnBoY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k2IDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX21ib3guYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX21ib3guYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDEzIEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ucG9ydGRpc2MuYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfbnBvcnRkaXNjLmMKaW5kZXggNWNjMTEwMy4uNGNiOTg4MiAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ucG9ydGRpc2MuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX25wb3J0ZGlzYy5jCkBAIC0xLDcgKzEsNyBAQAogIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDEzIEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMjc2LDYgKzI3Niw3IEBACiAJc3RydWN0IFNjc2lfSG9zdCAgICpzaG9zdCA9IGxwZmNfc2hvc3RfZnJvbV92cG9ydCh2cG9ydCk7CiAJc3RydWN0IGxwZmNfaGJhICAgICpwaGJhID0gdnBvcnQtPnBoYmE7CiAJc3RydWN0IGxwZmNfZG1hYnVmICpwY21kOworCXVpbnQ2NF90IG5scF9wb3J0d3duID0gMDsKIAl1aW50MzJfdCAqbHA7CiAJSU9DQl90ICppY21kOwogCXN0cnVjdCBzZXJ2X3Bhcm0gKnNwOwpAQCAtMzMyLDYgKzMzMyw4IEBACiAJCQlOVUxMKTsKIAkJcmV0dXJuIDA7CiAJ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Yi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Njc2kuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMTEzMCw2ICsxMTMwLDI1IEBACiB9CiAKIC8qKgorICogbHBmY19mY3BjbWRfdG9faW9jYiAtIGNvcHkgdGhlIGZjcF9jbWQgZGF0YSBpbnRvIHRoZSBJT0NCCisgKiBAZGF0YTogQSBwb2ludGVyIHRvIHRoZSBpbW1lZGlhdGUgY29tbWFuZCBkYXRhIHBvcnRpb24gb2YgdGhlIElPQ0IuCisgKiBAZmNwX2NtbmQ6IFRoZSBGQ1AgQ29tbWFuZCB0aGF0IGlzIHByb3ZpZGVkIGJ5IHRoZSBTQ1NJIGxheWVyLgorICoKKyAqI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3Njc2kuaAppbmRleCAwMzg5YWMxLi40NzRlMzBjIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Njc2kuaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Njc2kuaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpLmMKaW5kZXggMjA3YTQzZC4uNTZmNzM2OCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3NsaS5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC05MTgsMTIgKzkxOCwxNiBAQAogCQlscGZjX2NtZCA9IChzdHJ1Y3QgbHBmY19zY3NpX2J1ZiAqKSBwaW9jYnEtPmNvbnRleHQxOwogCQluZGxwID0gbHBmY19jbWQtPnJkYXRhLT5wbm9kZTsKIAl9IGVsc2UgIGlmICgocGlvY2JxLT5pb2NiLnVscENvbW1hbmQgPT0gQ01EX0dFTl9SRVFVRVNUNjRfQ1IpICYmCi0JCQkhKHBpb2NicS0+aW9jYl9mbGFnICYgTFBGQ19JT19MSUJERkMpKQorCQkJIShwaW9jYnEtPmlvY2JfZmxhZyAmIExQRkNfSU9fTElCREZDKSkgewogCQluZGxwID0gcGlvY2JxLT5jb250ZXh0X3VuL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YXg6JXggbGltOiV4XG4iLAorCQkJKGludCkgcnBpLCBtYXhfcnBpLCBycGlfbGltaXQpOwogCiAJLyoKIAkgKiBEb24ndCB0cnkgdG8gYWxsb2NhdGUgbW9yZSBycGkgaGVhZGVyIHJlZ2lvbnMgaWYgdGhlIGRldmljZSBsaW1pdApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuaCBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpLmgKaW5kZXggNGEwMTQ1Mi4uN2ZlOTlmZiAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3NsaS5oCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC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LmgKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTE4LDcgKzE4LDcgQEAKICAqIGluY2x1ZGVkIHdpdGggdGhpcyBwYWNrYWdlLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotI2RlZmluZSBMUEZDX0RSSVZFUl9WRVJTSU9OICIxMC40LjgwMDAuMC4iCisjZGVmaW5lIExQRkNfRFJJVkVSX1ZFUlNJT04gIjEwLjUuMC4wLiIKICNkZWZpbmUgTFBGQ19EUklWRVJfTkFNRQkJImxwZmMiCiAKIC8qIFVzZWQgZm9yIFNMSSAyLzMgKi8KQE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ICAgICAgICB8IDB4MDE1Yi0weDAxNjAJfAotICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgwMTZlLTB4MDE3MAl8CisgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDAxNmUtMHgwMTcwICB8CiAgKiB8IE1haWxib3ggY29tbWFuZHMgICAgICAgICAgICAgfCAgICAgICAweDExOGQgICAgICAgfCAweDExMTUtMHgxMTE2CXwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MTExYS0weDExMWIgIHwKICAqIHwgRGV2aWNlIERpc2NvdmVyeSAgICAgICAgICAgICB8ICAgICAgIDB4MjAxNiAgICAgICB8IDB4MjAyMC0weDIwMjIsIHwKQEAgLTYwLDcgKzYwLDcgQEAKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjEzYy0weGIxNDAgIHwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4YjE0OQkJfAogICogfCBNdWx0aVEgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHhjMDBjICAgICAgIHwJCXwKLSAqIHwgTWlzYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4ZDIxMyAgICAgICB8IDB4ZDAxMS0weGQwMTcJfAorICogfCBNaXNjICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgMHhkMzAwICAgICAgIHwgMHhkMDE2LTB4ZDAxNwl8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweGQwMjEsMHhkMDI0CXwKICAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4ZDAyNSwweG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19fX19fX19fIF9fX19fX19fX19fX18KKyAqICAgfCAgICAgICBGREMgV29yZCAgICAgICAgfCAgICAgICAgICAgICB8CisgKiAgIHwzMS0yNHwyMy0xNnwxNS04IHwgNy0wIHwgICAgQnl0ZXMgICAgfAorICogICB8X19fX198X19fX198X19fX198X19fX198X19fX19fX19fX19fX3wKKyAqICAgfCAgICAgfCAgICAgfCAgICAgfCAgICAgfCAgICAgICAgICAgICB8CisgKiAgIHwweDgwIHwweDgwIHwweDgwIHwgIFdXIHwgV1cgICAgICAgICAgfAorICogICB8MHg4MSB8MHg4MSB8ICBYWCB8ICBXVyB8IFdXIFhYICAgICAgIHwKKyAqICAgfDB4ODIgfCAgWVkgfCAgWFggfCAgV1cgfCBXVyBYWCBZWSAgICB8CisgKiAgIHwgIFpaIHwgIFlZIHwgIFhYIHwgIFdXIHwgV1cgWFggWVkgWlogfAorICogICB8X19fX198X19fX198X19fX198X19fX198X19fX19fX19fX19fX3wKKyAqCisgKiBOb3RlIHRoYXQgdGhlIDQtYnl0ZSBlbmNvZGluZyBjYW4gb25seSBiZSB1c2VkIHdoZXJlIG5vbmUgb2YgdGhlIG90aGVyIDMKKyAqIGVuY29kaW5ncyBtYXRjaCwgb3RoZXJ3aXNlIGl0IG11c3QgZmFsbCBiYWNrIHRvIHRoZSAzIGJ5dGUgZW5jb2RpbmcuCisgKi8KKworLyogcmFuZ2VzID49IDEgJiYgc2l6ZXNbMF0gPj0gMSAqLworc3RhdGljIHN0cnVjdCBmZGNfd29yZCBtaXBzX2VqdGFnX2ZkY19lbmNvZGUoY29uc3QgY2hhciAqKnB0cnMsCisJCQkJCSAgICAgdW5zaWduZWQgaW50ICpzaXplcywKKwkJCQkJICAgICB1bnNpZ25lZCBpbnQgcmFuZ2VzKQoreworCXN0cnVjdCBmZGNfd29yZCB3b3JkID0geyAwLCAwIH07CisJY29uc3QgY2hhciAqKnB0cnNfZW5kID0gcHRycyArIHJhbmdlczsKKworCWZvciAoOyBwdHJzIDwgcHRy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pbm87CisJc3RydWN0IGxpc3RfaGVhZCBsaXN0OworfTsKKworLyoKKyAqIExvZyB0aGUgaW5vZGVzIG9mIHRoZSBuZXcgZGVudHJpZXMgb2YgYSBkaXJlY3RvcnkuIFNlZSBsb2dfZGlyX2l0ZW1zKCkgZm9yCisgKiBkZXRhaWxzIGFib3V0IHRoZSB3aHkgaXQgaXMgbmVlZGVkLgorICogVGhpcyBpcyBhIHJlY3Vyc2l2ZSBvcGVyYXRpb24gLSBpZiBhbiBleGlzdGluZyBkZW50cnkgY29ycmVzcG9uZHMgdG8gYQorICogZGlyZWN0b3J5LCB0aGF0IGRpcmVjdG9yeSdzIG5ldyBlbnRyaWVzIGFyZSBsb2dnZWQgdG9vIChzYW1lIGJlaGF2aW91ciBhcworICogZXh0My80LCB4ZnMsIGYyZnMsIHJlaXNlcmZzLCBuaWxmczIpLiBOb3RlIHRoYXQgd2hlbiBsb2dnaW5nIHRoZSBpbm9kZXMKKyAqIHRoZSBkZW50cmllcyBwb2ludCB0byB3ZSBkbyBub3QgbG9jayB0aGVpciBpX211dGV4LCBvdGhlcndpc2UgbG9ja2RlcAorICogY29tcGxhaW5zIGFib3V0IHRoZSBmb2xsb3dpbmcgY2lyY3VsYXIgbG9jayBkZXBlbmRlbmN5IC8gcG9zc2libGUgZGVhZGxvY2s6CisgKgorICogICAgICAgIENQVTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ1BVMQorICogICAgICAgIC0tLS0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLS0tLQorICogbG9jaygmdHlwZS0+aV9tdXRleF9kaXJfa2V5IzMvMik7CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9jayhzYl9pbnRlcm5hbCMyKTsKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsb2NrKCZ0eXBlLT5pX211dGV4X2Rpcl9rZXkjMy8yKTsKKyAqI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IFVCSUZTIGVycm9yIG1lc3NhZ2VzICovCi0jZGVmaW5lIHViaWZzX2VycihmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlwcl9lcnIoIlVCSUZTIGVycm9yIChwaWQgJWQpOiAlczogIiBmbXQgIlxuIiwgY3VycmVudC0+cGlkLCBcCisjZGVmaW5lIHViaWZzX2VycihjLCBmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlwcl9lcnIoIlVCSUZTIGVycm9yICh1YmklZDolZCBwaWQgJWQpOiAlczogIiBmbXQgIlxuIiwgICAgICBcCisJICAgICAgIChjKS0+dmkudWJpX251bSwgKGMpLT52aS52b2xfaWQsIGN1cnJlbnQtPnBpZCwgICAgICAgXAogCSAgICAgICBfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKIC8qIFVCSUZTIHdhcm5pbmcgbWVzc2FnZXMgKi8KLSNkZWZpbmUgdWJpZnNfd2FybihmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXByX3dhcm4oIlVCSUZTIHdhcm5pbmcgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgICAgICAgICAgIFwKLQkJY3VycmVudC0+cGlkLCBfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKKyNkZWZpbmUgdWJpZnNfd2FybihjLCBmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByX3dhcm4oIlVCSUZTIHdhcm5pbmcgKHViaSVkOiVkIHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgIFwKKwkJKGMpLT52aS51YmlfbnVtLCAoYyktPnZpLnZvbF9pZCwgY3VycmVudC0+cGlkLCAgICAgIFwKKwkJX19mdW5jX18sICMjX19WQV9BUkdTX18pCiAvKgogICogQSB2YXJpYW50IG9mICd1Ymlmc19lcnIoKScgd2hpY2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3YXJlIExpY2Vuc2luZyBEZXNjcmlwdGlvbiBUYWJsZSAqLwogI2RlZmluZSBBQ1BJX1NJR19TUENSICAgICAgICAgICAiU1BDUiIJLyogU2VyaWFsIFBvcnQgQ29uc29sZSBSZWRpcmVjdGlvbiB0YWJsZSAqLwpAQCAtODQ1LDcgKzg0Niw4IEBACiAKIGVudW0gYWNwaV9scGl0X3R5cGUgewogCUFDUElfTFBJVF9UWVBFX05BVElWRV9DU1RBVEUgPSAweDAwLAotCUFDUElfTFBJVF9UWVBFX1NJTVBMRV9JTyA9IDB4MDEKKwlBQ1BJX0xQSVRfVFlQRV9TSU1QTEVfSU8gPSAweDAxLAorCUFDUElfTFBJVF9UWVBFX1JFU0VSVkVEID0gMHgwMgkvKiAyIGFuZCBhYm92ZSBhcmUgcmVzZXJ2ZWQgKi8KIH07CiAKIC8qIE1hc2tzIGZvciBGbGFncyBmaWVsZCBhYm92ZSAgKi8KQEAgLTkzNSw2ICs5MzcsMjEgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCisgKiBNU0RNIC0gTWljcm9zb2Z0IERhdGEgTWFuYWdlbWVudCB0YWJsZQorICoKKyAqIENvbmZvcm1zIHRvICJNaWNyb3NvZnQgU29mdHdhcmUgTGljZW5zaW5nIFRhYmxlcyAoU0xJQyBhbmQgTVNETSkiLAorICogTm92ZW1iZXIgMjksIDIwMTEuIENvcHlyaWdodCAyMDExIE1pY3Jvc29mdAorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIEJhc2ljIE1TRE0gdGFibGUgaXMgb25seSB0aGUgY29tbW9uIEFDUEkgaGVhZGVyICovCisKK3N0cnVjdCBhY3BpX3RhYmxlX21zZG0geworCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciBoZWFkZXI7CS8qIENvbW1vbiBBQ1BJIHRhYmxlIGhlYWRlciAqLworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCiAgKiBNVE1SIC0gTUlEIFRpbWVyIFRhYmxlCiAgKiAgICAgICAgVmVyc2lvbiAxCiAgKgpAQCAtOTU5LDEwICs5NzYsOSBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBTTElDIC0gU29mdHdhcmUgTGljZW5zaW5nIERlc2NyaXB0aW9uIFRhYmxlCi0gKiAgICAgICAgVmVyc2lvbiAxCiAgKgotICogQ29uZm9ybXMgdG8gIk9FTSBBY3RpdmF0aW9uIDIuMCBmb3IgV2luZG93cyBWaXN0YSBPcGVyYXRpbmcgU3lzdGVtcyIsCi0gKiBDb3B5cmlnaHQgMjAwNgorICogQ29uZm9ybXMgdG8gIk1pY3Jvc29mdCBTb2Z0d2FyZSBMaWNlbnNpbmcgVGFibGVzIChTTElDIGFuZCBNU0RNKSIsCisgKiBOb3ZlbWJlciAyOSwgMjAxMS4gQ29weXJpZ2h0IDIwMTEgTWljcm9zb2Z0CiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtOTcyLDUyICs5ODgsNiBAQAogCXN0cnVjdCBhY3BpX3RhYmxlX2hlYWRlciBoZWFkZXI7CS8qIENvbW1vbiBBQ1BJIHRhYmxlIGhlYWRlciAqLwogfTsKIAotLyogQ29tbW9uIFNMSUMgc3VidGFibGUgaGVhZGVyICovCi0KLXN0cnVjdCBhY3BpX3NsaWNfaGVhZGVyIHsKLQl1MzIgdHlwZTsKLQl1MzIgbGVuZ3RoOwotfTsKLQotLyogVm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IHwzfDJ8MXwwfAotICogKy0tLS0tLS0tLS0tLS0rLSstKy0rLSsKLSAqICAgICAgICAgIHwgICAgIHwgfCB8IHwKLSAqICAgICAgICAgIHwgICAgIHwgfCB8ICstIEVuYWJsZWQ/Ci0gKiAgICAgICAgICB8ICAgICB8IHwgKy0tLSBFbmFibGVkIGZvciB3YWtlPwotICogICAgICAgICAgfCAgICAgfCArLS0tLS0gU2V0PwotICogICAgICAgICAgfCAgICAgKy0tLS0tLS0gSGFzIGEgaGFuZGxlcj8KLSAqICAgICAgICAgICstLS0tLS0tLS0tLS0tIDxSZXNlcnZlZD4KKyAqICstLS0tLS0tLS0tLS0tKy0rLSstKy0rLSsKKyAqIHwgICBCaXRzIDMxOjUgfDR8M3wyfDF8MHwKKyAqICstLS0tLS0tLS0tLS0tKy0rLSstKy0rLSsKKyAqICAgICAgICAgIHwgICAgIHwgfCB8IHwgfAorICogICAgICAgICAgfCAgICAgfCB8IHwgfCArLSBFbmFibGVkPworICogICAgICAgICAgfCAgICAgfCB8IHwgKy0tLSBFbmFibGVkIGZvciB3YWtlPworICogICAgICAgICAgfCAgICAgfCB8ICstLS0tLSBTdGF0dXMgYml0IHNldD8KKyAqICAgICAgICAgIHwgICAgIHwgKy0tLS0tLS0gRW5hYmxlIGJpdCBzZXQ/CisgKiAgICAgICAgICB8ICAgICArLS0tLS0tLS0tIEhhcyBhIGhhbmRsZXI/CisgKiAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tIDxSZXNlcnZlZD4KICAqLwogdHlwZWRlZiB1MzIgYWNwaV9ldmVudF9zdGF0dXM7CiAKICNkZWZpbmUgQUNQSV9FVkVOVF9GTEFHX0RJU0FCTEVEICAgICAgICAoYWNwaV9ldmVudF9zdGF0dXMpIDB4MDAKICNkZWZpbmUgQUNQSV9FVkVOVF9GTEFHX0VOQUJMRUQgICAgICAgICAoYWNwaV9ldmVudF9zdGF0dXMpIDB4MDEKICNkZWZpbmUgQUNQSV9FVkVOVF9GTEFHX1dBS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W5lIERQX1NJTktfREVWSUNFX0FVWF9GUkFNRV9TWU5DX0NBUCAgIDB4MDJmICAgLyogZURQIDEuNCAqLworIyBkZWZpbmUgRFBfQVVYX0ZSQU1FX1NZTkNfQ0FQCQkgICAgKDEgPDwgMCkKKwogI2RlZmluZSBEUF9HVUlECQkJCSAgICAweDAzMCAgIC8qIDEuMiAqLwogCiAjZGVmaW5lIERQX1BTUl9TVVBQT1JUICAgICAgICAgICAgICAgICAgICAgIDB4MDcwICAgLyogWFhYIDEuMj8gKi8KICMgZGVmaW5lIERQX1BTUl9JU19TVVBQT1JURUQgICAgICAgICAgICAgICAgMQorIyBkZWZpbmUgRFBfUFNSMl9JU19TVVBQT1JURUQJCSAgICAyCSAgICAvKiBlRFAgMS40ICovCisKICNkZWZpbmUgRFBfUFNSX0NBUFMgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNzEgICAvKiBYWFggMS4yPyAqLwogIyBkZWZpbmUgRFBfUFNSX05PX1RSQUlOX09OX0VYSVQgICAgICAgICAgICAxCiAjIGRlZmluZSBEUF9QU1JfU0VUVVBfVElNRV8zMzAgICAgICAgICAgICAgICgwIDw8IDEpCkBAIC0xNTMsNiArMjIxLDcgQEAKIAogLyogbGluayBjb25maWd1cmF0aW9uICovCiAjZGVmaW5lCURQX0xJTktfQldfU0VUCQkgICAgICAgICAgICAweDEwMAorIyBkZWZpbmUgRFBfTElOS19SQVRFX1RBQkxFCQkgICAgMHgwMCAgICAvKiBlRFAgMS40ICovCiAjIGRlZmluZSBEUF9MSU5LX0JXXzFfNjIJCSAgICAweDA2CiAjIGRlZmluZSBEUF9MSU5LX0JXXzJfNwkJCSAgICAweDBhCiAjIGRlZmluZSBEUF9MSU5LX0JXXzVfNAkJCSAgICAweDE0ICAgIC8qIDEuMiAqLwpAQCAtMTY4LDExICsyMzcsMTIgQEAKICMgZGVmaW5lIERQX1RSQUlOSU5HX1BBVFRFUk5fMwkJICAgIDMJICAgIC8qIDEuMiAqLwogIyBkZWZpbm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KyNkZWZpbmUgX0RUX0JJTkRJTkdTX01GRF9BUklaT05BX0gKKworLyogR1BJTyBGdW5jdGlvbiBEZWZpbml0aW9ucyAqLworI2RlZmluZSBBUklaT05BX0dQX0ZOX1RYTFJDTEsgICAgICAgICAgICAgICAgICAgIDB4MDAKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9HUElPICAgICAgICAgICAgICAgICAgICAgICAweDAxCisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fSVJRMSAgICAgICAgICAgICAgICAgICAgICAgMHgwMgorI2RlZmluZSBBUklaT05BX0dQX0ZOX0lSUTIgICAgICAgICAgICAgICAgICAgICAgIDB4MDMKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9PUENMSyAgICAgICAgICAgICAgICAgICAgICAweDA0CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMV9PVVQgICAgICAgICAgICAgICAgICAgMHgwNQorI2RlZmluZSBBUklaT05BX0dQX0ZOX0ZMTDJfT1VUICAgICAgICAgICAgICAgICAgIDB4MDYKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9QV00xICAgICAgICAgICAgICAgICAgICAgICAweDA4CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fUFdNMiAgICAgICAgICAgICAgICAgICAgICAgMHgwOQorI2RlZmluZSBBUklaT05BX0dQX0ZOX1NZU0NMS19VTkRFUkNMT0NLRUQgICAgICAgIDB4MEEKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9BU1lOQ0NMS19VTkRFUkNMT0NLRUQgICAgICAweDBCCisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMV9MT0NLICAgICAgICAgICAgICAgICAgMHgwQworI2RlZmluZSBBUklaT05BX0dQX0ZOX0ZMTDJfTE9DSyAgICAgICAgICAgICAgICAgIDB4MEQKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9GTEwxX0NMT0NLX09LICAgICAgICAgICAgICAweDBGCisjZGVmaW5lIEFSSVpPTkF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gICAgICAgICAgICAgICAgMHgyNAorI2RlZmluZSBBUklaT05BX0dQX0ZOX0RSQzJfTk9JU0UgICAgICAgICAgICAgICAgIDB4MjUKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9EUkMyX1FVSUNLX1JFTEVBU0UgICAgICAgICAweDI2CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fTUlYRVJfRFJPUFBFRF9TQU1QTEUgICAgICAgMHgyNworI2RlZmluZSBBUklaT05BX0dQX0ZOX0FJRjFfQ09ORklHX0VSUk9SICAgICAgICAgIDB4MjgKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9BSUYyX0NPTkZJR19FUlJPUiAgICAgICAgICAweDI5CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fQUlGM19DT05GSUdfRVJST1IgICAgICAgICAgMHgyQQorI2RlZmluZSBBUklaT05BX0dQX0ZOX1NQS19URU1QX1NIVVRET1dOICAgICAgICAgIDB4MkIKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9TUEtfVEVNUF9XQVJOSU5HICAgICAgICAgICAweDJDCisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fVU5ERVJDTE9DS0VEICAgICAgICAgICAgICAgMHgyRAorI2RlZmluZSBBUklaT05BX0dQX0ZOX09WRVJDTE9DS0VEICAgICAgICAgICAgICAgIDB4MkUKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9EU1BfSVJRMSAgICAgICAgICAgICAgICAgICAweDM1CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRFNQX0lSUTIgICAgICAgICAgICAgICAgICAgMHgzNgorI2RlZmluZSBBUklaT05BX0dQX0ZOX0FTWU5DX09QQ0xLICAgICAgICAgICAgICAgIDB4M0QKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9CT09UX0RPTkUgICAgICAgICAgICAgICAgICAweDQ0CisjZGVmaW5lIEFSSVpPTkFfR1BfRk5fRFNQMV9SQU1fUkVBRFkgICAgICAgICAgICAgMHg0NQorI2RlZmluZSBBUklaT05BX0dQX0ZOX1NZU0NMS19FTkFfU1RBVFVTICAgICAgICAgIDB4NEIKKyNkZWZpbmUgQVJJWk9OQV9HUF9GTl9BU1lOQ0NMS19FTkFfU1RBVFVTICAgICAgICAweDRDCisKKy8qIEdQSU8gQ29uZmlndXJhdGlvbiBCaXRzICovCisjZGVmaW5lIEFSSVpPTkFfR1BOX0RJUiAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BVICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BEICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX0xWTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX1BPTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGRyAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwCisjZGVmaW5lIEFSSVpPTkFfR1BOX0RCICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwCisKKy8qIFByb3ZpZGUgc29tZSBkZWZpbmVzIGZvciB0aGUgbW9zdCBjb21tb24gY29uZmlncyAqLworI2RlZmluZSBBUklaT05BX0dQX0RFRkFVTFQgICAgICAgICAgICAgMHhmZmZmZmZmZgorI2RlZmluZSBBUklaT05BX0dQX09VVFBVVCAgICAgICAgICAgICAgKEFSSVpPTkFfR1BfRk5fR1BJTykKKyNkZWZpbmUgQVJJWk9OQV9HUF9JTlBVVCAgICAgICAgICAgICAgIChBUklaT05BX0dQX0ZOX0dQSU8gfCBcCisJCQkJCUFSSVpPTkFfR1BOX0RJUikKKworI2RlZmluZSBBUklaT05BXzMyS1pfTUNMSzEgMQorI2RlZmluZSBBUklaT05BXzMyS1pfTUNMSzIgMgor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fR1BfRk5fSVJRMSAgICAgICAgICAgICAgICAgICAgICAgMHgwMgotI2RlZmluZSBBUklaT05BX0dQX0ZOX0lSUTIgICAgICAgICAgICAgICAgICAgICAgIDB4MDMKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9PUENMSyAgICAgICAgICAgICAgICAgICAgICAweDA0Ci0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMV9PVVQgICAgICAgICAgICAgICAgICAgMHgwNQotI2RlZmluZSBBUklaT05BX0dQX0ZOX0ZMTDJfT1VUICAgICAgICAgICAgICAgICAgIDB4MDYKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9QV00xICAgICAgICAgICAgICAgICAgICAgICAweDA4Ci0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fUFdNMiAgICAgICAgICAgICAgICAgICAgICAgMHgwOQotI2RlZmluZSBBUklaT05BX0dQX0ZOX1NZU0NMS19VTkRFUkNMT0NLRUQgICAgICAgIDB4MEEKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9BU1lOQ0NMS19VTkRFUkNMT0NLRUQgICAgICAweDBCCi0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMV9MT0NLICAgICAgICAgICAgICAgICAgMHgwQwotI2RlZmluZSBBUklaT05BX0dQX0ZOX0ZMTDJfTE9DSyAgICAgICAgICAgICAgICAgIDB4MEQKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9GTEwxX0NMT0NLX09LICAgICAgICAgICAgICAweDBGCi0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fRkxMMl9DTE9DS19PSyAgICAgICAgICAgICAgMHgxMAotI2RlZmluZSBBUklaT05BX0dQX0ZOX0hFQURQSE9ORV9ERVQgICAgICAgICAgICAgIDB4MTIKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9NSUNfREVUICAgICAgICAgICAgICAgICAgICAweDEzCi0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fV1NFUV9TVEFUVVMgICAgICA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l9ESVIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fRElSX01BU0sgICAgICAgICAgICAgICAgICAgICAweDgwMDAgIC8qIEdQTl9ESVIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fRElSX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMTUgIC8qIEdQTl9ESVIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fRElSX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9ESVIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUFUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAgIC8qIEdQTl9QVSAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QVV9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMCAgLyogR1BOX1BVICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BVX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDE0ICAvKiBHUE5fUFUgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9QVSAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMCAgLyogR1BOX1BEICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BEX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwICAvKiBHUE5fUEQgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUERfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTMgIC8qIEdQTl9QRCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QRF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BEICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0xWTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwICAvKiBHUE5fTFZMICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0xWTF9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwODAwICAvKiBHUE5fTFZMICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0xWTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDExICAvKiBHUE5fTFZMICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0xWTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fTFZMICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BPTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDAwICAvKiBHUE5fUE9MICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BPTF9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwNDAwICAvKiBHUE5fUE9MICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BPTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDEwICAvKiBHUE5fUE9MICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUE9MICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGRyAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwICAvKiBHUE5fT1BfQ0ZHICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGR19NQVNLICAgICAgICAgICAgICAgICAgMHgwMjAwICAvKiBHUE5fT1BfQ0ZHICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGR19TSElGVCAgICAgICAgICAgICAgICAgICAgICA5ICAvKiBHUE5fT1BfQ0ZHICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGR19XSURUSCAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fT1BfQ0ZHICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RCICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBHUE5fREIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fREJfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEdQTl9EQiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9EQl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogR1BOX0RCICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fREIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fRk5fTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAwN0YgIC8qIEdQTl9EQiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9GTl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgMCAgLyogR1BOX0RCICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0ZOX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICA3ICAvKiBHUE5fREIgKi8KLQotI2VuZGlmCmRpZmYgLS1naXQgYS9pbmNsdWRlL2xpbnV4L21mZC9hcml6b25hL3BkYXRhLmggYi9pbmNsdWRlL2xpbnV4L21mZC9hcml6b25hL3BkYXRhLmgKaW5kZXggNDU3OGM3Mi4uMTc4OWNiMCAxMDA2NDQKLS0tIGEvaW5jbHVkZS9saW51eC9tZmQvYXJpem9uYS9wZGF0YS5oCisrKyBiL2luY2x1ZGUvbGludXgvbWZkL2FyaXpvbmEvcGRhdGEuaApAQCAtMTEsMzEgKzExLDI2IEBACiAjaWZuZGVmIF9BUklaT05BX1BEQVRBX0gKICNkZWZpbmUgX0FSSVpPTkFfUERBVEFfSAogCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RJUiAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwICAvKiBHUE5fRElSICovCisjaW5jbHVkZSA8ZHQtYmluZGluZ3MvbWZkL2FyaXpvbmEuaD4KKwogI2RlZmluZSBBUklaT05BX0dQTl9ESVJfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4ODAwMCAgLyogR1BOX0RJUiAqLwogI2RlZmluZSBBUklaT05BX0dQTl9ESVJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxNSAgLyogR1BOX0RJUiAqLwogI2RlZmluZSBBUklaT05BX0dQTl9ESVJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0RJUiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QVSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMCAgLyogR1BOX1BVICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BVX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwICAvKiBHUE5fUFUgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTQgIC8qIEdQTl9QVSAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QVV9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BVICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BEICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwICAvKiBHUE5fUEQgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fUERfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDIwMDAgIC8qIEdQTl9QRCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QRF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAxMyAgLyogR1BOX1BEICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BEX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUEQgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAgIC8qIEdQTl9MVkwgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fTFZMX01BU0sgICAgICAgICAgICAgICAgICAgICA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0IHNrX2J1ZmYgKnNrYiwKLQkgICAgIHN0cnVjdCBuZXRfZGV2aWNlICppbiwgc3RydWN0IG5ldF9kZXZpY2UgKm91dCwKLQkgICAgIGludCAoKm9rZm4pKHN0cnVjdCBza19idWZmICopLCBib29sIGNvbmQpCitORl9IT09LX0NPTkQodWludDhfdCBwZiwgdW5zaWduZWQgaW50IGhvb2ssIHN0cnVjdCBzb2NrICpzaywKKwkgICAgIHN0cnVjdCBza19idWZmICpza2IsIHN0cnVjdCBuZXRfZGV2aWNlICppbiwgc3RydWN0IG5ldF9kZXZpY2UgKm91dCwKKwkgICAgIGludCAoKm9rZm4pKHN0cnVjdCBzb2NrICosIHN0cnVjdCBza19idWZmICopLCBib29sIGNvbmQpCiB7CiAJaW50IHJldDsKIAogCWlmICghY29uZCB8fAotCSAgICAoKHJldCA9IG5mX2hvb2tfdGhyZXNoKHBmLCBob29rLCBza2IsIGluLCBvdXQsIG9rZm4sIElOVF9NSU4pKSA9PSAxKSkKLQkJcmV0ID0gb2tmbihza2IpOworCSAgICAoKHJldCA9IG5mX2hvb2tfdGhyZXNoKHBmLCBob29rLCBzaywgc2tiLCBpbiwgb3V0LCBva2ZuLCBJTlRfTUlOKSkgPT0gMSkpCisJCXJldCA9IG9rZm4oc2ssIHNrYik7CiAJcmV0dXJuIHJldDsKIH0KIAogc3RhdGljIGlubGluZSBpbnQKLU5GX0hPT0sodWludDhfdCBwZiwgdW5zaWduZWQgaW50IGhvb2ssIHN0cnVjdCBza19idWZmICpza2IsCitORl9IT09LKHVpbnQ4X3QgcGYsIHVuc2lnbmVkIGludCBob29rLCBzdHJ1Y3Qgc29jayAqc2ssIHN0cnVjdCBza19idWZmICpza2IsCiAJc3RydWN0IG5ldF9kZXZpY2UgKmluLCBzdHJ1Y3QgbmV0X2RldmljZSAqb3V0LAotCWludCAoKm9rZm4pKHN0cnVjdCBza19idWZmICopKQorCWludCAoKm9rZm4pKHN0cnVjdCBzb2NrICosIHN0cnVjdCBza19idWZmICop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KGNsaywgY2xrX2VuYWJsZV9jb21wbGV0ZSwKKworCVRQX1BST1RPKHN0cnVjdCBjbGtfY29yZSAqY29yZSksCisKKwlUUF9BUkdTKGNvcmUpCispOworCitERUZJTkVfRVZFTlQoY2xrLCBjbGtfZGlzYWJsZSwKKworCVRQX1BST1RPKHN0cnVjdCBjbGtfY29yZSAqY29yZSksCisKKwlUUF9BUkdTKGNvcmUpCispOworCitERUZJTkVfRVZFTlQoY2xrLCBjbGtfZGlzYWJsZV9jb21wbGV0ZSwKKworCVRQX1BST1RPKHN0cnVjdCBjbGtfY29yZSAqY29yZSksCisKKwlUUF9BUkdTKGNvcmUpCispOworCitERUZJTkVfRVZFTlQoY2xrLCBjbGtfcHJlcGFyZSwKKworCVRQX1BST1RPKHN0cnVjdCBjbGtfY29yZSAqY29yZSksCisKKwlUUF9BUkdTKGNvcmUpCispOworCitERUZJTkVfRVZFTlQoY2xrLCBjbGtfcHJlcGFyZV9jb21wbGV0ZSwKKworCVRQX1BST1RPKHN0cnVjdCBjbGtfY29yZSAqY29yZSksCisKKwlUUF9BUkdTKGNvcmUpCispOworCitERUZJTkVfRVZFTlQoY2xrLCBjbGtfdW5wcmVwYXJlLAorCisJVFBfUFJPVE8oc3RydWN0IGNsa19jb3JlICpjb3JlKSwKKworCVRQX0FSR1MoY29yZSkKKyk7CisKK0RFRklORV9FVkVOVChjbGssIGNsa191bnByZXBhcmVfY29tcGxldGUsCisKKwlUUF9QUk9UTyhzdHJ1Y3QgY2xrX2NvcmUgKmNvcmUpLAorCisJVFBfQVJHUyhjb3JlKQorKTsKKworREVDTEFSRV9FVkVOVF9DTEFTUyhjbGtfcmF0ZSwKKworCVRQX1BST1RPKHN0cnVjdCBjbGtfY29yZSAqY29yZSwgdW5zaWduZWQgbG9uZyByYXRlKSwKKworCVRQX0FSR1MoY29yZSwgcmF0ZSksCisKKwlUUF9TVFJVQ1RfX2VudHJ5KAorCQlfX3N0cmluZyggICAgICAgIG5hbWUsICAgICAgICAgICB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5uYW1lKTsKKwkJX19hc3NpZ25fc3RyKHBuYW1lLCBwYXJlbnQtPm5hbWUpOworCSksCisKKwlUUF9wcmludGsoIiVzICVzIiwgX19nZXRfc3RyKG5hbWUpLCBfX2dldF9zdHIocG5hbWUpKQorKTsKKworREVGSU5FX0VWRU5UKGNsa19wYXJlbnQsIGNsa19zZXRfcGFyZW50LAorCisJVFBfUFJPVE8oc3RydWN0IGNsa19jb3JlICpjb3JlLCBzdHJ1Y3QgY2xrX2NvcmUgKnBhcmVudCksCisKKwlUUF9BUkdTKGNvcmUsIHBhcmVudCkKKyk7CisKK0RFRklORV9FVkVOVChjbGtfcGFyZW50LCBjbGtfc2V0X3BhcmVudF9jb21wbGV0ZSwKKworCVRQX1BST1RPKHN0cnVjdCBjbGtfY29yZSAqY29yZSwgc3RydWN0IGNsa19jb3JlICpwYXJlbnQpLAorCisJVFBfQVJHUyhjb3JlLCBwYXJlbnQpCispOworCitERUNMQVJFX0VWRU5UX0NMQVNTKGNsa19waGFzZSwKKworCVRQX1BST1RPKHN0cnVjdCBjbGtfY29yZSAqY29yZSwgaW50IHBoYXNlKSwKKworCVRQX0FSR1MoY29yZSwgcGhhc2UpLAorCisJVFBfU1RSVUNUX19lbnRyeSgKKwkJX19zdHJpbmcoICAgICAgICBuYW1lLCAgICAgICAgICAgY29yZS0+bmFtZSAgICAgICAgICAgICAgICApCisJCV9fZmllbGQoCSAgaW50LCAgICAgICAgICAgcGhhc2UgICAgICAgICAgICAgICAgICAgICApCisJKSwKKworCVRQX2Zhc3RfYXNzaWduKAorCQlfX2Fzc2lnbl9zdHIobmFtZSwgY29yZS0+bmFtZSk7CisJCV9fZW50cnktPnBoYXNlID0gcGhhc2U7CisJKSwKKworCVRQX3ByaW50aygiJXMgJWQiLCBfX2dldF9zdHIobmFtZSksIChpbnQpX19lbnRyeS0+cGhhc2UpCispOworCitERUZJTkVfRVZFTlQoY2xrX3BoYXNlLCBjbGtfc2V0X3BoYXNlLAorCisJVFBfUFJPVE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orCSksCisKKwlUUF9mYXN0X2Fzc2lnbigKKwkJX19lbnRyeS0+ZGV2ID0gaW5vZGUtPmlfc2ItPnNfZGV2OworCQlfX2VudHJ5LT5pbm8gPSBpbm9kZS0+aV9pbm87CisJCV9fZW50cnktPnBnb2ZzID0gcGdvZnM7CisJCV9fZW50cnktPmJsayA9IGJsa2FkZHI7CisJKSwKKworCVRQX3ByaW50aygiZGV2ID0gKCVkLCVkKSwgaW5vID0gJWx1LCBwZ29mcyA9ICV1LCBibGthZGRyID0gJXUiLAorCQlzaG93X2Rldl9pbm8oX19lbnRyeSksCisJCV9fZW50cnktPnBnb2ZzLAorCQlfX2VudHJ5LT5ibGspCispOworCitUUkFDRV9FVkVOVChmMmZzX3Nocmlua19leHRlbnRfdHJlZSwKKworCVRQX1BST1RPKHN0cnVjdCBmMmZzX3NiX2luZm8gKnNiaSwgdW5zaWduZWQgaW50IG5vZGVfY250LAorCQkJCQkJdW5zaWduZWQgaW50IHRyZWVfY250KSwKKworCVRQX0FSR1Moc2JpLCBub2RlX2NudCwgdHJlZV9jbnQpLAorCisJVFBfU1RSVUNUX19lbnRyeSgKKwkJX19maWVsZChkZXZfdCwJZGV2KQorCQlfX2ZpZWxkKHVuc2lnbmVkIGludCwgbm9kZV9jbnQpCisJCV9fZmllbGQodW5zaWduZWQgaW50LCB0cmVlX2NudCkKKwkpLAorCisJVFBfZmFzdF9hc3NpZ24oCisJCV9fZW50cnktPmRldiA9IHNiaS0+c2ItPnNfZGV2OworCQlfX2VudHJ5LT5ub2RlX2NudCA9IG5vZGVfY250OworCQlfX2VudHJ5LT50cmVlX2NudCA9IHRyZWVfY250OworCSksCisKKwlUUF9wcmludGsoImRldiA9ICglZCwlZCksIHNocnVuazogbm9kZV9jbnQgPSAldSwgdHJlZV9jbnQgPSAldSIsCisJCXNob3dfZGV2KF9fZW50cnkpLAorCQlfX2VudHJ5LT5ub2RlX2NudCwKKwkJX19lbnRyeS0+dHJlZV9jbnQpCispOworCitUUkFDRV9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l9wcm9nICpuZXdfcHJvZzsKKwl1MzIgY250OworCWludCBpOworCisJaWYgKCFlbnYtPnByb2ctPmF1eC0+b3BzLT5jb252ZXJ0X2N0eF9hY2Nlc3MpCisJCXJldHVybiAwOworCisJZm9yIChpID0gMDsgaSA8IGluc25fY250OyBpKyssIGluc24rKykgeworCQlpZiAoaW5zbi0+Y29kZSAhPSAoQlBGX0xEWCB8IEJQRl9NRU0gfCBCUEZfVykpCisJCQljb250aW51ZTsKKworCQlpZiAoaW5zbi0+aW1tICE9IFBUUl9UT19DVFgpIHsKKwkJCS8qIGNsZWFyIGludGVybmFsIG1hcmsgKi8KKwkJCWluc24tPmltbSA9IDA7CisJCQljb250aW51ZTsKKwkJfQorCisJCWNudCA9IGVudi0+cHJvZy0+YXV4LT5vcHMtPgorCQkJY29udmVydF9jdHhfYWNjZXNzKGluc24tPmRzdF9yZWcsIGluc24tPnNyY19yZWcsCisJCQkJCSAgIGluc24tPm9mZiwgaW5zbl9idWYpOworCQlpZiAoY250ID09IDAgfHwgY250ID49IEFSUkFZX1NJWkUoaW5zbl9idWYpKSB7CisJCQl2ZXJib3NlKCJicGYgdmVyaWZpZXIgaXMgbWlzY29uZmlndXJlZFxuIik7CisJCQlyZXR1cm4gLUVJTlZBTDsKKwkJfQorCisJCWlmIChjbnQgPT0gMSkgeworCQkJbWVtY3B5KGluc24sIGluc25fYnVmLCBzaXplb2YoKmluc24pKTsKKwkJCWNvbnRpbnVlOworCQl9CisKKwkJLyogc2V2ZXJhbCBuZXcgaW5zbnMgbmVlZCB0byBiZSBpbnNlcnRlZC4gTWFrZSByb29tIGZvciB0aGVtICovCisJCWluc25fY250ICs9IGNudCAtIDE7CisJCW5ld19wcm9nID0gYnBmX3Byb2dfcmVhbGxvYyhlbnYtPnByb2csCisJCQkJCSAgICBicGZfcHJvZ19zaXplKGluc25fY250KSwKKwkJCQkJICAgIEdGUF9VU0VSKTsKKwkJaWYgKCFuZXdfcHJvZykKKwkJCXJldHVybiAtRU5P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F0YSAgICAgICAgICAgPSAmbm1pX3dhdGNoZG9nX2VuYWJsZWQsCisJCS5tYXhsZW4gICAgICAgICA9IHNpemVvZiAoaW50KSwKKwkJLm1vZGUgICAgICAgICAgID0gMDY0NCwKKwkJLnByb2NfaGFuZGxlciAgID0gcHJvY19ubWlfd2F0Y2hkb2csCisJCS5leHRyYTEJCT0gJnplcm8sCisjaWYgZGVmaW5lZChDT05GSUdfSEFWRV9OTUlfV0FUQ0hET0cpIHx8IGRlZmluZWQoQ09ORklHX0hBUkRMT0NLVVBfREVURUNUT1IpCisJCS5leHRyYTIJCT0gJm9uZSwKKyNlbHNlCisJCS5leHRyYTIJCT0gJnplcm8sCisjZW5kaWYKKwl9LAorCXsKKwkJLnByb2NuYW1lICAgICAgID0gInNvZnRfd2F0Y2hkb2ciLAorCQkuZGF0YSAgICAgICAgICAgPSAmc29mdF93YXRjaGRvZ19lbmFibGVkLAorCQkubWF4bGVuICAgICAgICAgPSBzaXplb2YgKGludCksCisJCS5tb2RlICAgICAgICAgICA9IDA2NDQsCisJCS5wcm9jX2hhbmRsZXIgICA9IHByb2Nfc29mdF93YXRjaGRvZywKKwkJLmV4dHJhMQkJPSAmemVybywKKwkJLmV4dHJhMgkJPSAmb25lLAorCX0sCisJewogCQkucHJvY25hbWUJPSAic29mdGxvY2t1cF9wYW5pYyIsCiAJCS5kYXRhCQk9ICZzb2Z0bG9ja3VwX3BhbmljLAogCQkubWF4bGVuCQk9IHNpemVvZihpbnQpLApAQCAtODc5LDE1ICs5MDAsNiBAQAogCQkuZXh0cmEyCQk9ICZvbmUsCiAJfSwKICNlbmRpZiAvKiBDT05GSUdfU01QICovCi0JewotCQkucHJvY25hbWUgICAgICAgPSAibm1pX3dhdGNoZG9nIiwKLQkJLmRhdGEgICAgICAgICAgID0gJndhdGNoZG9nX3VzZXJfZW5hYmxlZCwKLQkJLm1heGxlbiAgICAgICAgID0gc2l6ZW9mIChpbnQpLAotCQkubW9kZSAgICAgICAgICAgPSAwNjQ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N0XSA9PSAwLCBzbyB3ZSBjYW4gYWNjZXNzIGZtdFtpICsgMV0gKi8KKwkJaSsrOworCQlpZiAoZm10W2ldID09ICdsJykgeworCQkJbW9kW2ZtdF9jbnRdKys7CisJCQlpKys7CisJCX0gZWxzZSBpZiAoZm10W2ldID09ICdwJykgeworCQkJbW9kW2ZtdF9jbnRdKys7CisJCQlpKys7CisJCQlpZiAoIWlzc3BhY2UoZm10W2ldKSAmJiAhaXNwdW5jdChmbXRbaV0pICYmIGZtdFtpXSAhPSAwKQorCQkJCXJldHVybiAtRUlOVkFMOworCQkJZm10X2NudCsrOworCQkJY29udGludWU7CisJCX0KKworCQlpZiAoZm10W2ldID09ICdsJykgeworCQkJbW9kW2ZtdF9jbnRdKys7CisJCQlpKys7CisJCX0KKworCQlpZiAoZm10W2ldICE9ICdkJyAmJiBmbXRbaV0gIT0gJ3UnICYmIGZtdFtpXSAhPSAneCcpCisJCQlyZXR1cm4gLUVJTlZBTDsKKwkJZm10X2NudCsrOworCX0KKworCXJldHVybiBfX3RyYWNlX3ByaW50aygxLyogZmFrZSBpcCB3aWxsIG5vdCBiZSBwcmludGVkICovLCBmbXQsCisJCQkgICAgICBtb2RbMF0gPT0gMiA/IHIzIDogbW9kWzBdID09IDEgPyAobG9uZykgcjMgOiAodTMyKSByMywKKwkJCSAgICAgIG1vZFsxXSA9PSAyID8gcjQgOiBtb2RbMV0gPT0gMSA/IChsb25nKSByNCA6ICh1MzIpIHI0LAorCQkJICAgICAgbW9kWzJdID09IDIgPyByNSA6IG1vZFsyXSA9PSAxID8gKGxvbmcpIHI1IDogKHUzMikgcjUpOworfQorCitzdGF0aWMgY29uc3Qgc3RydWN0IGJwZl9mdW5jX3Byb3RvIGJwZl90cmFjZV9wcmludGtfcHJvdG8gPSB7CisJLmZ1bmMJCT0gYnBmX3RyYWNlX3ByaW50aywKKwkuZ3BsX29ubHkJPSB0cnVlLAorCS5yZXRfdHlwZQk9IFJFVF9JTlRFR0VSLAorCS5hcmcx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DE3ICAgICB4IDwgICAgICAxNjM4OQotCSAqICh4ICogMHgxOTlhKSA+PiAxNiAgICAgeCA8ICAgICAgMTYzODkKLQkgKiAoeCAqIDB4MGNjZCkgPj4gMTUgICAgIHggPCAgICAgIDE2Mzg5Ci0JICogKHggKiAweDA2NjcpID4+IDE0ICAgICB4IDwgICAgICAgMjczOQotCSAqICh4ICogMHgwMzM0KSA+PiAxMyAgICAgeCA8ICAgICAgIDEwMjkKLQkgKiAoeCAqIDB4MDE5YSkgPj4gMTIgICAgIHggPCAgICAgICAxMDI5Ci0JICogKHggKiAweDAwY2QpID4+IDExICAgICB4IDwgICAgICAgMTAyOSBzaG9ydGVyIGNvZGUgdGhhbiAqIDB4NjcgKG9uIGkzODYpCi0JICogKHggKiAweDAwNjcpID4+IDEwICAgICB4IDwgICAgICAgIDE3OQotCSAqICh4ICogMHgwMDM0KSA+PiAgOSAgICAgeCA8ICAgICAgICAgNjkgc2FtZQotCSAqICh4ICogMHgwMDFhKSA+PiAgOCAgICAgeCA8ICAgICAgICAgNjkgc2FtZQotCSAqICh4ICogMHgwMDBkKSA+PiAgNyAgICAgeCA8ICAgICAgICAgNjkgc2FtZSwgc2hvcnRlc3QgY29kZSAob24gaTM4NikKLQkgKiAoeCAqIDB4MDAwNykgPj4gIDYgICAgIHggPCAgICAgICAgIDE5Ci0JICogU2VlIDxodHRwOi8vd3d3LmNzLnVpb3dhLmVkdS9+am9uZXMvYmNkL2RpdmlkZS5odG1sPgotCSAqLwotCXIgICAgICA9IChxICogKHVpbnQ2NF90KTB4MTk5OTk5OWEpID4+IDMyOwotCSpidWYrKyA9IChxIC0gMTAgKiByKSArICcwJzsgLyogMSAqLwotCXEgICAgICA9IChyICogKHVpbnQ2NF90KTB4MTk5OTk5OWEpID4+IDMyOwotCSpidWYrKyA9IChyIC0gMTAgKiBxKSArICcwJzsgLyogMiAqLwotCXIgICAgICA9IChxICogKHVpbnQ2NF90KTB4MTk5OTk5OWEpID4+IDMyOwotCSpidWYr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UdfTk9DT09LSUUpICYmCi0JICAgICgodTMyKSh1bnNpZ25lZCBsb25nKXNrICE9IGNvb2tpZVswXSB8fAotCSAgICAgKHUzMikoKCgodW5zaWduZWQgbG9uZylzaykgPj4gMzEpID4+IDEpICE9IGNvb2tpZVsxXSkpCi0JCXJldHVybiAtRVNUQUxFOwotCWVsc2UKKwl3aGlsZSAoMSkgeworCQl1NjQgcmVzID0gYXRvbWljNjRfcmVhZCgmc2stPnNrX2Nvb2tpZSk7CisKKwkJaWYgKHJlcykKKwkJCXJldHVybiByZXM7CisJCXJlcyA9IGF0b21pYzY0X2luY19yZXR1cm4oJnNvY2tfbmV0KHNrKS0+Y29va2llX2dlbik7CisJCWF0b21pYzY0X2NtcHhjaGcoJnNrLT5za19jb29raWUsIDAsIHJlcyk7CisJfQorfQorCitpbnQgc29ja19kaWFnX2NoZWNrX2Nvb2tpZShzdHJ1Y3Qgc29jayAqc2ssIGNvbnN0IF9fdTMyICpjb29raWUpCit7CisJdTY0IHJlczsKKworCWlmIChjb29raWVbMF0gPT0gSU5FVF9ESUFHX05PQ09PS0lFICYmIGNvb2tpZVsxXSA9PSBJTkVUX0RJQUdfTk9DT09LSUUpCiAJCXJldHVybiAwOworCisJcmVzID0gc29ja19nZW5fY29va2llKHNrKTsKKwlpZiAoKHUzMilyZXMgIT0gY29va2llWzBdIHx8ICh1MzIpKHJlcyA+PiAzMikgIT0gY29va2llWzFdKQorCQlyZXR1cm4gLUVTVEFMRTsKKworCXJldHVybiAwOwogfQogRVhQT1JUX1NZTUJPTF9HUEwoc29ja19kaWFnX2NoZWNrX2Nvb2tpZSk7CiAKLXZvaWQgc29ja19kaWFnX3NhdmVfY29va2llKHZvaWQgKnNrLCBfX3UzMiAqY29va2llKQordm9pZCBzb2NrX2RpYWdfc2F2ZV9jb29raWUoc3RydWN0IHNvY2sgKnNrLCBfX3UzMiAqY29va2llKQogewotCWNvb2tpZVswXSA9ICh1MzIpKHVuc2lnbmVkIGxvbmcpc2s7Ci0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gYW5kIGRlY29kZSB0aGUgbGFiZWwgKi8KKwloZHIgPSBtcGxzX2hkcihza2IpOworCWRlYyA9IG1wbHNfZW50cnlfZGVjb2RlKGhkcik7CisKKwkvKiBQb3AgdGhlIGxhYmVsICovCisJc2tiX3B1bGwoc2tiLCBzaXplb2YoKmhkcikpOworCXNrYl9yZXNldF9uZXR3b3JrX2hlYWRlcihza2IpOworCisJc2tiX29ycGhhbihza2IpOworCisJcnQgPSBtcGxzX3JvdXRlX2lucHV0X3JjdShuZXQsIGRlYy5sYWJlbCk7CisJaWYgKCFydCkKKwkJZ290byBkcm9wOworCisJLyogRmluZCB0aGUgb3V0cHV0IGRldmljZSAqLworCW91dF9kZXYgPSByY3VfZGVyZWZlcmVuY2UocnQtPnJ0X2Rldik7CisJaWYgKCFtcGxzX291dHB1dF9wb3NzaWJsZShvdXRfZGV2KSkKKwkJZ290byBkcm9wOworCisJaWYgKHNrYl93YXJuX2lmX2xybyhza2IpKQorCQlnb3RvIGRyb3A7CisKKwlza2JfZm9yd2FyZF9jc3VtKHNrYik7CisKKwkvKiBWZXJpZnkgdHRsIGlzIHZhbGlkICovCisJaWYgKGRlYy50dGwgPD0gMSkKKwkJZ290byBkcm9wOworCWRlYy50dGwgLT0gMTsKKworCS8qIFZlcmlmeSB0aGUgZGVzdGluYXRpb24gY2FuIGhvbGQgdGhlIHBhY2tldCAqLworCW5ld19oZWFkZXJfc2l6ZSA9IG1wbHNfcnRfaGVhZGVyX3NpemUocnQpOworCW10dSA9IG1wbHNfZGV2X210dShvdXRfZGV2KTsKKwlpZiAobXBsc19wa3RfdG9vX2JpZyhza2IsIG10dSAtIG5ld19oZWFkZXJfc2l6ZSkpCisJCWdvdG8gZHJvcDsKKworCWhoX2xlbiA9IExMX1JFU0VSVkVEX1NQQUNFKG91dF9kZXYpOworCWlmICghb3V0X2Rldi0+aGVhZGVyX29wcykKKwkJaGhfbGVuID0gMDsKKworCS8qIEVuc3VyZSB0aGVyZSBpcyBlbm91Z2gg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GVhc2Ugb2YgdGhlIHByb3RvY29sLgorICovCitib29sIHRpcGNfbXNnX3ZhbGlkYXRlKHN0cnVjdCBza19idWZmICpza2IpCit7CisJc3RydWN0IHRpcGNfbXNnICptc2c7CisJaW50IG1zeiwgaHN6OworCisJaWYgKHVubGlrZWx5KFRJUENfU0tCX0NCKHNrYiktPnZhbGlkYXRlZCkpCisJCXJldHVybiB0cnVlOworCWlmICh1bmxpa2VseSghcHNrYl9tYXlfcHVsbChza2IsIE1JTl9IX1NJWkUpKSkKKwkJcmV0dXJuIGZhbHNlOworCisJaHN6ID0gbXNnX2hkcl9zeihidWZfbXNnKHNrYikpOworCWlmICh1bmxpa2VseShoc3ogPCBNSU5fSF9TSVpFKSB8fCAoaHN6ID4gTUFYX0hfU0laRSkpCisJCXJldHVybiBmYWxzZTsKKwlpZiAodW5saWtlbHkoIXBza2JfbWF5X3B1bGwoc2tiLCBoc3opKSkKKwkJcmV0dXJuIGZhbHNlOworCisJbXNnID0gYnVmX21zZyhza2IpOworCWlmICh1bmxpa2VseShtc2dfdmVyc2lvbihtc2cpICE9IFRJUENfVkVSU0lPTikpCisJCXJldHVybiBmYWxzZTsKKworCW1zeiA9IG1zZ19zaXplKG1zZyk7CisJaWYgKHVubGlrZWx5KG1zeiA8IGhzeikpCisJCXJldHVybiBmYWxzZTsKKwlpZiAodW5saWtlbHkoKG1zeiAtIGhzeikgPiBUSVBDX01BWF9VU0VSX01TR19TSVpFKSkKKwkJcmV0dXJuIGZhbHNlOworCWlmICh1bmxpa2VseShza2ItPmxlbiA8IG1zeikpCisJCXJldHVybiBmYWxzZTsKKworCVRJUENfU0tCX0NCKHNrYiktPnZhbGlkYXRlZCA9IHRydWU7CisJcmV0dXJuIHRydWU7Cit9CiAKIC8qKgogICogdGlwY19tc2dfYnVpbGQgLSBjcmVhdGUgYnVmZmVyIGNoYWluIGNvbnRhaW5pbmcgc3BlY2lmaWVkIGhlYWRlciBhbmQgZGF0YQpAQCAtMjI4LDYgKzI3Mi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7CisKK3N0YXRpYyB2b2lkIHByaW50X2Jhbm5lcih2b2lkKQoreworCWlmIChmdWxsX3JhbmdlKQorCQlwcmludGYoInwxbnMgICAgIHwxMG5zICAgICB8MTAwbnMgICAgfDF1cyAgICAgIHwxMHVzICAgICB8MTAwdXMiCisJCSAgICAgICAiICAgIHwxbXMgICAgICB8MTBtcyAgICAgfDEwMG1zICAgIHwxcyAgICAgICB8MTBzXG4iKTsKKwllbHNlCisJCXByaW50ZigifDF1cyAgICAgIHwxMHVzICAgICB8MTAwdXMgICAgfDFtcyAgICAgIHwxMG1zICAgICAiCisJCSAgICAgICAifDEwMG1zICAgIHwxcyAgICAgICB8MTBzXG4iKTsKK30KKworc3RhdGljIHZvaWQgcHJpbnRfaGlzdChpbnQgZmQpCit7CisJX191MzIga2V5OworCV9fdTY0IHZhbHVlOworCV9fdTY0IGNudFtTTE9UU107CisJX191NjQgbWF4X2NudCA9IDA7CisJX191NjQgdG90YWxfZXZlbnRzID0gMDsKKworCWZvciAoa2V5ID0gMDsga2V5IDwgU0xPVFM7IGtleSsrKSB7CisJCXZhbHVlID0gMDsKKwkJYnBmX2xvb2t1cF9lbGVtKGZkLCAma2V5LCAmdmFsdWUpOworCQljbnRba2V5XSA9IHZhbHVlOworCQl0b3RhbF9ldmVudHMgKz0gdmFsdWU7CisJCWlmICh2YWx1ZSA+IG1heF9jbnQpCisJCQltYXhfY250ID0gdmFsdWU7CisJfQorCWNsZWFyX3N0YXRzKGZkKTsKKwlmb3IgKGtleSA9IGZ1bGxfcmFuZ2UgPyAwIDogMjk7IGtleSA8IFNMT1RTOyBrZXkrKykgeworCQlpbnQgYyA9IG51bV9jb2xvcnMgKiBjbnRba2V5XSAvIChtYXhfY250ICsgMSk7CisKKwkJaWYgKHRleHRfb25seSkKKwkJCXByaW50ZigiJXMiLCBzeW1bY10pOworCQllbHNlCisJCQlwcmludGYoIiVzICVzIiwgY29sb3JbY10sIG5vY29sb3IpOworCX0KKwlwcmludGYoIiAjICVsbG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HRGaWxlIGxpc3RcJ1xuXG4iICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgICAgICJJZiBubyBvcHRpb24gaXMgc3BlY2lmaWVkLCAlcHJvZyB3aWxsIGRlZmF1bHQgdG8gY2hlY2sgeW91clxuIiAgICBcCisgICAgICAgICAgICAiY3VycmVudCB0cmVlLiAgUGxlYXNlIG5vdGUgdGhhdCBzcGVjaWZ5aW5nIGNvbW1pdHMgd2lsbCAiICAgICAgICAgXAorICAgICAgICAgICAgIlwnZ2l0IHJlc2V0IC0taGFyZFwnXG55b3VyIGN1cnJlbnQgdHJlZSEgIFlvdSBtYXkgc2F2ZSAiICAgICAgICAgIFwKKyAgICAgICAgICAgICJ1bmNvbW1pdHRlZCBjaGFuZ2VzIHRvIGF2b2lkIGxvc2luZyBkYXRhLiIKKworICAgIHBhcnNlciA9IE9wdGlvblBhcnNlcih1c2FnZT11c2FnZSkKKworICAgIHBhcnNlci5hZGRfb3B0aW9uKCctYycsICctLWNvbW1pdCcsIGRlc3Q9J2NvbW1pdCcsIGFjdGlvbj0nc3RvcmUnLAorICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ9IiIsCisgICAgICAgICAgICAgICAgICAgICAgaGVscD0iQ2hlY2sgaWYgdGhlIHNwZWNpZmllZCBjb21taXQgKGhhc2gpIGludHJvZHVjZXMgIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgInVuZGVmaW5lZCBLY29uZmlnIHN5bWJvbHMuIikKKworICAgIHBhcnNlci5hZGRfb3B0aW9uKCctZCcsICctLWRpZmYnLCBkZXN0PSdkaWZmJywgYWN0aW9uPSdzdG9yZScsCisgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdD0iIiwKKyAgICAgICAgICAgICAgICAgICAgICBoZWxwPSJEaWZmIHVuZGVmaW5lZCBzeW1ib2xzIGJldHdlZW4gdHdvIGNvbW1pdHMuICBUaGUgIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgImlucHV0IGZvcm1hd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gICAgICAgICAgICAgICAgICAiY2FsbHMgJ2dpdCByZXNldCAtLWhhcmQnIGZvciBzb21lIHBlcmZvcm1hbmNlXG5yZWFzb25zLiAiCisgICAgICAgICAgICAgICAgICAgICAiIFBsZWFzZSBydW4gdGhpcyBzY3JpcHQgaW4gYSBjbGVhbiBHaXQgdHJlZSBvciBwYXNzICIKKyAgICAgICAgICAgICAgICAgICAgICInLS1mb3JjZScgaWYgeW91XG53YW50IHRvIGlnbm9yZSB0aGlzIHdhcm5pbmcgYW5kICIKKyAgICAgICAgICAgICAgICAgICAgICJjb250aW51ZS4iKQorCisgICAgcmV0dXJuIG9wdHMKKworCiBkZWYgbWFpbigpOgogICAgICIiIk1haW4gZnVuY3Rpb24gb2YgdGhpcyBtb2R1bGUuIiIiCisgICAgb3B0cyA9IHBhcnNlX29wdGlvbnMoKQorCisgICAgaWYgb3B0cy5jb21taXQgb3Igb3B0cy5kaWZmOgorICAgICAgICBoZWFkID0gZ2V0X2hlYWQoKQorCisgICAgICAgICMgZ2V0IGNvbW1pdCByYW5nZQorICAgICAgICBjb21taXRfYSA9IE5vbmUKKyAgICAgICAgY29tbWl0X2IgPSBOb25lCisgICAgICAgIGlmIG9wdHMuY29tbWl0OgorICAgICAgICAgICAgY29tbWl0X2EgPSBvcHRzLmNvbW1pdCArICJ+IgorICAgICAgICAgICAgY29tbWl0X2IgPSBvcHRzLmNvbW1pdAorICAgICAgICBlbGlmIG9wdHMuZGlmZjoKKyAgICAgICAgICAgIHNwbGl0ID0gb3B0cy5kaWZmLnNwbGl0KCIuLiIpCisgICAgICAgICAgICBjb21taXRfYSA9IHNwbGl0WzBdCisgICAgICAgICAgICBjb21taXRfYiA9IHNwbGl0WzFdCisgICAgICAgICAgICB1bmRlZmluZWRfYSA9IHt9CisgICAgICAgICAgICB1bmRlZmluZWRfYiA9IHt9CisKKyAgICAgICAgIyBnZXQgdW5kZWZpbmVkIGl0ZW1zIGJlZm9yZSB0aGUgY29tbWl0CisgICAgICAgIGV4ZWN1dGUoImdpdCByZXNldCAtLWhhcmQgJXMiICUgY29tbWl0X2EpCisgICAgICAgIHVuZGVmaW5lZF9hID0gY2hlY2tfc3ltYm9scygpCisKKyAgICAgICAgIyBnZXQgdW5kZWZpbmVkIGl0ZW1zIGZvciB0aGUgY29tbWl0CisgICAgICAgIGV4ZWN1dGUoImdpdCByZXNldCAtLWhhcmQgJXMiICUgY29tbWl0X2IpCisgICAgICAgIHVuZGVmaW5lZF9iID0gY2hlY2tfc3ltYm9scygpCisKKyAgICAgICAgIyByZXBvcnQgY2FzZXMgdGhhdCBhcmUgcHJlc2VudCBmb3IgdGhlIGNvbW1pdCBidXQgbm90IGJlZm9yZQorICAgICAgICBmb3IgZmVhdHVyZSBpbiBzb3J0ZWQodW5kZWZpbmVkX2IpOgorICAgICAgICAgICAgIyBmZWF0dXJlIGhhcyBub3QgYmVlbiB1bmRlZmluZWQgYmVmb3JlCisgICAgICAgICAgICBpZiBub3QgZmVhdHVyZSBpbiB1bmRlZmluZWRfYToKKyAgICAgICAgICAgICAgICBmaWxlcyA9IHNvcnRlZCh1bmRlZmluZWRfYi5nZXQoZmVhdHVyZSkpCisgICAgICAgICAgICAgICAgcHJpbnQgIiVzXHQlcyIgJSAoZmVhdHVyZSwgIiwgIi5qb2luKGZpbGVzKSkKKyAgICAgICAgICAgICMgY2hlY2sgaWYgdGhlcmUgYXJlIG5ldyBmaWxlcyB0aGF0IHJlZmVyZW5jZSB0aGUgdW5kZWZpbmVkIGZlYXR1cmUKKyAgICAgICAgICAgIGVsc2U6CisgICAgICAgICAgICAgICAgZmlsZXMgPSBzb3J0ZWQodW5kZWZpbmVkX2IuZ2V0KGZlYXR1cmUpIC0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bmRlZmluZWRfYS5nZXQoZmVhdHVyZSkpCisgICAgICAgICAgICAgICAgaWYgZmlsZXM6CisgICAgICAgICAgICAgICAgICAgIHByaW50ICIlc1x0JXMiICUgKGZlYXR1cmUsICIsIC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mcm9tLWNvZGU9VVRGLTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC02NSw2MSArNjYsNTggQEAKIAkkKFEpKGZvciBpIGluIGBscyAkKHNyY3RyZWUpL2FyY2gvKi9LY29uZmlnICAgICAgXAogCSAgICAkKHNyY3RyZWUpL2FyY2gvKi91bS9LY29uZmlnYDsgICAgICAgICAgICAgICBcCiAJICAgIGRvICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQkJZWNobyAiICBHRU4gICAgICQkaSI7ICAgICAgICAgICAgICAgICAgICBcCisJCSQoa2VjaG8pICIgIEdFTiAgICAgJCRpIjsgICAgICAgICAgICAgICAgICAgIFwKIAkJJChvYmopL2t4Z2V0dGV4dCAkJGkgICAgICAgICAgICAgICAgICAgICBcCiAJCSAgICAgPj4gJChvYmopL2NvbmZpZy5wb3Q7ICAgICAgICAgICAgICAgXAogCSAgICBkb25lICkKLQkkKFEpZWNobyAiICBHRU4gICAgIGxpbnV4LnBvdCIKKwkkKFEpJChrZWNobykgIiAgR0VOICAgICBsaW51eC5wb3QiCiAJJChRKW1zZ3VuaXEgLS1zb3J0LWJ5LWZpbGUgLS10by1jb2RlPVVURi04ICQob2JqKS9jb25maWcucG90IFwKIAkgICAgLS1vdXRwdXQgJChvYmopL2xpbnV4LnBvdAogCSQoUSlybSAtZiAkKG9iaikvY29uZmlnLnBvdAogCi1QSE9OWSArPSBhbGxub2NvbmZpZyBhbGx5ZXNjb25maWcgYWxsbW9kY29uZmlnIGFsbGRlZmNvbmZpZyByYW5kY29uZmlnCisjIFRoZXNlIHRhcmdldHMgbWFwIDE6MSB0byB0aGUgY29tbWFuZGxpbmUgb3B0aW9ucyBvZiAnY29uZicKK3NpbXBsZS10YXJnZXRzIDo9IG9sZGNvbmZpZyBhbGxub2NvbmZpZyBhbGx5ZXNjb25maWcgYWxsbW9kY29uZmlnIFwKKwlhbGxkZWZjb25maWcgcmFuZGNvbmZpZy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VUxMLCAiSFBPVVRMIn0sCisJeyJNaWMiLCBOVUxMLCAiQU1JQzEifSwKK307CisKK3N0YXRpYyB2b2lkIG1mbGRfamFja19jaGVjayh1bnNpZ25lZCBpbnQgaW50cl9zdGF0dXMpCit7CisJc3RydWN0IG1mbGRfamFja19kYXRhIGphY2tfZGF0YTsKKworCWlmICghbWZsZF9jb2RlYykKKwkJcmV0dXJuOworCisJamFja19kYXRhLm1mbGRfamFjayA9ICZtZmxkX2phY2s7CisJamFja19kYXRhLmludHJfaWQgPSBpbnRyX3N0YXR1czsKKworCXNuOTUwMzFfamFja19kZXRlY3Rpb24obWZsZF9jb2RlYywgJmphY2tfZGF0YSk7CisJLyogVE9ETzogYWRkIGFtZXJpY2FuIGhlYWRzZXQgZGV0ZWN0aW9uIHBvc3QgZ3Bpb2xpYiBzdXBwb3J0ICovCit9CisKK3N0YXRpYyBpbnQgbWZsZF9pbml0KHN0cnVjdCBzbmRfc29jX3BjbV9ydW50aW1lICpydW50aW1lKQoreworCXN0cnVjdCBzbmRfc29jX2RhcG1fY29udGV4dCAqZGFwbSA9ICZydW50aW1lLT5jYXJkLT5kYXBtOworCWludCByZXRfdmFsOworCisJLyogZGVmYXVsdCBpcyBlYXJwaWVjZSBwaW4sIHVzZXJzcGFjZSBzZXRzIGl0IGV4cGxjaXRseSAqLworCXNuZF9zb2NfZGFwbV9kaXNhYmxlX3BpbihkYXBtLCAiSGVhZHBob25lcyIpOworCS8qIGRlZmF1bHQgaXMgbGluZW91dCBOQywgdXNlcnNwYWNlIHNldHMgaXQgZXhwbGNpdGx5ICovCisJc25kX3NvY19kYXBtX2Rpc2FibGVfcGluKGRhcG0sICJMSU5FT1VUTCIpOworCXNuZF9zb2NfZGFwbV9kaXNhYmxlX3BpbihkYXBtLCAiTElORU9VVFIiKTsKKwlsb19kYWMgPSAzOworCWhzX3N3aXRjaCA9IDA7CisJLyogd2UgZG9udCB1c2UgbGluZWluIGluIHRoaXMgc28gc2V0IHRvIE5DICovCisJ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cHJlcmVxID0gJChmaWx0ZXItb3V0ICQoUEhPTlkpLCQ/KSAkKGZpbHRlci1vdXQgJChQSE9OWSkgJCh3aWxkY2FyZCAkXiksJF4pCisKKyMjIworIyBpZl9jaGFuZ2VkX2RlcCAgLSBleGVjdXRlIGNvbW1hbmQgaWYgYW55IHByZXJlcXVpc2l0ZSBpcyBuZXdlciB0aGFuCisjICAgICAgICAgICAgICAgICAgIHRhcmdldCwgb3IgY29tbWFuZCBsaW5lIGhhcyBjaGFuZ2VkIGFuZCB1cGRhdGUKKyMgICAgICAgICAgICAgICAgICAgZGVwZW5kZW5jaWVzIGluIHRoZSBjbWQgZmlsZQoraWZfY2hhbmdlZF9kZXAgPSAkKGlmICQoc3RyaXAgJChhbnktcHJlcmVxKSAkKGFyZy1jaGVjaykpLCAgICAgICAgIFwKKwlAc2V0IC1lOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwkkKGVjaG8tY21kKSAkKGNtZF8kKDEpKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwljYXQgJChkZXBmaWxlKSA+ICQoZG90LXRhcmdldCkuY21kOyAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlwcmludGYgJyVzXG4nICdjbWRfJEAgOj0gJChtYWtlLWNtZCknID4+ICQoZG90LXRhcmdldCkuY21kKQorCisjIGlmX2NoYW5nZWQgICAgICAtIGV4ZWN1dGUgY29tbWFuZCBpZiBhbnkgcHJlcmVxdWlzaXRlIGlzIG5ld2VyIHRoYW4KKyMgICAgICAgICAgICAgICAgICAgdGFyZ2V0LCBvciBjb21tYW5kIGxpbmUgaGFzIGNoYW5nZWQKK2lmX2NoYW5nZWQgPSAkKGlmICQoc3RyaXAgJChhbnktcHJlcmVxKSAkKGFyZy1jaGVjaykpLCAgICAgICAgICAgICBcCisJQHNldCAtZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCis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lsZSBzeXN0ZW0gKi8KK2NvbnN0IGNoYXIgKmZpbmRfbW91bnRwb2ludChjb25zdCBjaGFyICpmc3R5cGUsIGxvbmcgbWFnaWMsCisJCQkgICAgY2hhciAqbW91bnRwb2ludCwgaW50IGxlbiwKKwkJCSAgICBjb25zdCBjaGFyICogY29uc3QgKmtub3duX21vdW50cG9pbnRzKQoreworCWNvbnN0IGNoYXIgKiBjb25zdCAqcHRyOworCWNoYXIgZm9ybWF0WzEyOF07CisJY2hhciB0eXBlWzEwMF07CisJRklMRSAqZnA7CisKKwlpZiAoa25vd25fbW91bnRwb2ludHMpIHsKKwkJcHRyID0ga25vd25fbW91bnRwb2ludHM7CisJCXdoaWxlICgqcHRyKSB7CisJCQlpZiAodmFsaWRfbW91bnRwb2ludCgqcHRyLCBtYWdpYykgPT0gMCkgeworCQkJCXN0cm5jcHkobW91bnRwb2ludCwgKnB0ciwgbGVuIC0gMSk7CisJCQkJbW91bnRwb2ludFtsZW4tMV0gPSAwOworCQkJCXJldHVybiBtb3VudHBvaW50OworCQkJfQorCQkJcHRyKys7CisJCX0KKwl9CisKKwkvKiBnaXZlIHVwIGFuZCBwYXJzZSAvcHJvYy9tb3VudHMgKi8KKwlmcCA9IGZvcGVuKCIvcHJvYy9tb3VudHMiLCAiciIpOworCWlmIChmcCA9PSBOVUxMKQorCQlyZXR1cm4gTlVMTDsKKworCXNucHJpbnRmKGZvcm1hdCwgMTI4LCAiJSUqcyAlJSVkcyAlJTk5cyAlJSpzICUlKmQgJSUqZFxuIiwgbGVuKTsKKworCXdoaWxlIChmc2NhbmYoZnAsIGZvcm1hdCwgbW91bnRwb2ludCwgdHlwZSkgPT0gMikgeworCQlpZiAoc3RyY21wKHR5cGUsIGZzdHlwZSkgPT0gMCkKKwkJCWJyZWFrOworCX0KKwlmY2xvc2UoZnApOworCisJaWYgKHN0cmNtcCh0eXBlLCBmc3R5cGUpICE9IDApCisJCXJldHVybiBOVUxMOworCisJcmV0dXJuIG1vdW50cG9pb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UIgICAnJChPQkopOwotICBwcmludF9zdGF0aWNfbGliX2J1aWxkID0JZWNobyAnICBCVUlMRCBTVEFUSUMgTElCICAgJyQoT0JKKTsKLSAgcHJpbnRfaW5zdGFsbCA9CQllY2hvICcgIElOU1RBTEwgICAgICckMScJdG8JJChERVNURElSX1NRKSQyJzsKKyAgcHJpbnRfc2hhcmVkX2xpYl9jb21waWxlID0JZWNobyAnICBMRCAgICAgICAnJChPQkopOworICBwcmludF9zdGF0aWNfbGliX2J1aWxkID0JZWNobyAnICBMRCAgICAgICAnJChPQkopOworICBwcmludF9pbnN0YWxsID0JCWVjaG8gJyAgSU5TVEFMTCAgJyQxJwl0bwkkKERFU1RESVJfU1EpJDInOwogZW5kaWYKIAotZG9fZnBpY19jb21waWxlID0JCQkJCVwKLQkoJChwcmludF9mcGljX2NvbXBpbGUpCQkJCVwKLQkkKENDKSAtYyAkKENGTEFHUykgJChFWFQpIC1mUElDICQ8IC1vICRAKQotCi1kb19hcHBfYnVpbGQgPQkJCQkJCVwKLQkoJChwcmludF9hcHBfYnVpbGQpCQkJCVwKLQkkKENDKSAkXiAtcmR5bmFtaWMgLW8gJEAgJChDT05GSUdfTElCUykgJChMSUJTKSkKK2V4cG9ydCBzcmN0cmVlIE9VVFBVVCBDQyBMRCBDRkxBR1MgVgorYnVpbGQgOj0gLWYgJChzcmN0cmVlKS90b29scy9idWlsZC9NYWtlZmlsZS5idWlsZCBkaXI9LiBvYmoKIAogZG9fY29tcGlsZV9zaGFyZWRfbGlicmFyeSA9CQkJXAogCSgkKHByaW50X3NoYXJlZF9saWJfY29tcGlsZSkJCVwKQEAgLTE0NCwyMiArMTA0LDYgQEAKIAkoJChwcmludF9zdGF0aWNfbGliX2J1aWxkKQkJXAogCSQoUk0pICRAOyAgJChBUikgcmNzICRAICReKQogCi0KLWRlZmluZSBkb19jb21waWxlCi0JJChwcmludF9jb21waWxlKQkJCQkJCVwKLQkkKENDKSAtYyAkKENGTEFHUykgJChFWFQpICQ8IC1v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ogICAgICAgICAgIExERkxBR1MgKz0gJChQWVRIT05fRU1CRURfTERGTEFHUykKICAgICAgICAgICBFWFRMSUJTICs9ICQoUFlUSE9OX0VNQkVEX0xJQkFERCkKICAgICAgICAgICBMQU5HX0JJTkRJTkdTICs9ICQob2JqLXBlcmYpcHl0aG9uL3BlcmYuc28KKyAgICAgICAgICAkKGNhbGwgZGV0ZWN0ZWQsQ09ORklHX0xJQlBZVEhPTikKICAgICAgICAgZW5kaWYKICAgICAgIGVuZGlmCiAgICAgZW5kaWYKQEAgLTYwMCw3ICs1MTgsNyBAQAogICAgICAgICAgICAgRVhUTElCUyArPSAtbGliZXJ0eQogICAgICAgICAgICAgQ0ZMQUdTICs9IC1ESEFWRV9DUExVU19ERU1BTkdMRV9TVVBQT1JUCiAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgbXNnIDo9ICQod2FybmluZyBObyBiZmQuaC9saWJiZmQgZm91bmQsIGluc3RhbGwgYmludXRpbHMtZGV2W2VsXS96bGliLXN0YXRpYyB0byBnYWluIHN5bWJvbCBkZW1hbmdsaW5nKQorICAgICAgICAgICAgbXNnIDo9ICQod2FybmluZyBObyBiZmQuaC9saWJiZmQgZm91bmQsIHBsZWFzZSBpbnN0YWxsIGJpbnV0aWxzLWRldltlbF0vemxpYi1zdGF0aWMvbGliaWJlcnR5LWRldiB0byBnYWluIHN5bWJvbCBkZW1hbmdsaW5nKQogICAgICAgICAgICAgQ0ZMQUdTICs9IC1ETk9fREVNQU5HTEUKICAgICAgICAgICBlbmRpZgogICAgICAgICBlbmRpZgpAQCAtNjE3LDExICs1MzUsMjMgQEAKICAgaWZlcSAoJChmZWF0dXJlLXpsaWIpLCAxKQogICAgIENGTEFHUyArPSAtREhBVkVfWkxJQl9TVVBQT1JUCiAgICAgRVhUTElCUyArPSAtbHoKKyAgICAkKGNhbGwgZGV0ZWN0ZWQsQ09ORklHX1pMSUIpCiAgIGVsc2UKICAgICBOT19aTElCIDo9IDEKICAgZW5kaWYKIGVuZ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ywgYywgbiwgZSkpCisKK2ludCB0ZXN0X19rbW9kX3BhdGhfX3BhcnNlKHZvaWQpCit7CisJLyogcGF0aCAgICAgICAgICAgICAgICBhbGxvY19uYW1lICBhbGxvY19leHQgICBrbW9kICBjb21wICAgbmFtZSAgICAgZXh0ICovCisJVCgiL3h4eHgveHh4eC94LXgua28iLCB0cnVlICAgICAgLCB0cnVlICAgICAgLCB0cnVlLCBmYWxzZSwgIlt4X3hdIiwgTlVMTCk7CisJVCgiL3h4eHgveHh4eC94LXgua28iLCBmYWxzZSAgICAgLCB0cnVlICAgICAgLCB0cnVlLCBmYWxzZSwgTlVMTCAgICwgTlVMTCk7CisJVCgiL3h4eHgveHh4eC94LXgua28iLCB0cnVlICAgICAgLCBmYWxzZSAgICAgLCB0cnVlLCBmYWxzZSwgIlt4X3hdIiwgTlVMTCk7CisJVCgiL3h4eHgveHh4eC94LXgua28iLCBmYWxzZSAgICAgLCBmYWxzZSAgICAgLCB0cnVlLCBmYWxzZSwgTlVMTCAgICwgTlVMTCk7CisKKwkvKiBwYXRoICAgICAgICAgICAgICAgIGFsbG9jX25hbWUgIGFsbG9jX2V4dCAgIGttb2QgIGNvbXAgIG5hbWUgICBleHQgKi8KKwlUKCIveHh4eC94eHh4L3gua28uZ3oiLCB0cnVlICAgICAsIHRydWUgICAgICAsIHRydWUsIHRydWUsICJbeF0iLCAiZ3oiKTsKKwlUKCIveHh4eC94eHh4L3gua28uZ3oiLCBmYWxzZSAgICAsIHRydWUgICAgICAsIHRydWUsIHRydWUsIE5VTEwgLCAiZ3oiKTsKKwlUKCIveHh4eC94eHh4L3gua28uZ3oiLCB0cnVlICAgICAsIGZhbHNlICAgICAsIHRydWUsIHRydWUsICJbeF0iLCBOVUxMKTsKKwlUKCIveHh4eC94eHh4L3gua28uZ3oiLCBmYWxzZSAgICAsIGZhbHNlICAgICAsIHRydWUsIHRydWUsIE5VTEwgLCBOVUxMKTsKKworCS8qIHBhdGggICAgICAgICAgICAgIGFsbG9jX25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U0VSOworCWludCBpLCBqLCBlcnI7CisJdTY0IGlwOworCisJZm9yIChpID0gMDsgaSA8IGNoYWluX25yOyBpKyspIHsKKwkJaWYgKGNoYWluLT5pcHNbaV0gPT0gUEVSRl9DT05URVhUX1VTRVIpCisJCQlicmVhazsKKwl9CisKKwkvKiBMQlIgb25seSBhZmZlY3RzIHRoZSB1c2VyIGNhbGxjaGFpbiAqLworCWlmIChpICE9IGNoYWluX25yKSB7CisJCXN0cnVjdCBicmFuY2hfc3RhY2sgKmxicl9zdGFjayA9IHNhbXBsZS0+YnJhbmNoX3N0YWNrOworCQlpbnQgbGJyX25yID0gbGJyX3N0YWNrLT5ucjsKKwkJLyoKKwkJICogTEJSIGNhbGxzdGFjayBjYW4gb25seSBnZXQgdXNlciBjYWxsIGNoYWluLgorCQkgKiBUaGUgbWl4X2NoYWluX25yIGlzIGtlcm5lbCBjYWxsIGNoYWluCisJCSAqIG51bWJlciBwbHVzIExCUiB1c2VyIGNhbGwgY2hhaW4gbnVtYmVyLgorCQkgKiBpIGlzIGtlcm5lbCBjYWxsIGNoYWluIG51bWJlciwKKwkJICogMSBpcyBQRVJGX0NPTlRFWFRfVVNFUiwKKwkJICogbGJyX25yICsgMSBpcyB0aGUgdXNlciBjYWxsIGNoYWluIG51bWJlci4KKwkJICogRm9yIGRldGFpbHMsIHBsZWFzZSByZWZlciB0byB0aGUgY29tbWVudHMKKwkJICogaW4gY2FsbGNoYWluX19wcmludGYKKwkJICovCisJCWludCBtaXhfY2hhaW5fbnIgPSBpICsgMSArIGxicl9uciArIDE7CisKKwkJaWYgKG1peF9jaGFpbl9uciA+IFBFUkZfTUFYX1NUQUNLX0RFUFRIICsgUEVSRl9NQVhfQlJBTkNIX0RFUFRIKSB7CisJCQlwcl93YXJuaW5nKCJjb3JydXB0ZWQgY2FsbGNoYWluLiBza2lwcGluZy4uLlxuIik7CisJCQlyZXR1cm4gMDsKKwkJfQorCisJCWZvciAoaiA9IDA7IGogPCBtaXhfY2hhaW5f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zdCBjaGFyICp0cmFjaW5nLCBjb25zdCBjaGFyICptb3VudHBvaW50KQogewotCXNucHJpbnRmKHRyYWNpbmdfZXZlbnRzX3BhdGgsIHNpemVvZih0cmFjaW5nX2V2ZW50c19wYXRoKSwgIiVzLyVzIiwKLQkJIG1vdW50cG9pbnQsICJ0cmFjaW5nL2V2ZW50cyIpOworCXNucHJpbnRmKHRyYWNpbmdfZXZlbnRzX3BhdGgsIHNpemVvZih0cmFjaW5nX2V2ZW50c19wYXRoKSwgIiVzLyVzJXMiLAorCQkgbW91bnRwb2ludCwgdHJhY2luZywgImV2ZW50cyIpOwogfQogCi1jb25zdCBjaGFyICpwZXJmX2RlYnVnZnNfbW91bnQoY29uc3QgY2hhciAqbW91bnRwb2ludCkKK3N0YXRpYyBjb25zdCBjaGFyICpfX3BlcmZfdHJhY2Vmc19tb3VudChjb25zdCBjaGFyICptb3VudHBvaW50KQoreworCWNvbnN0IGNoYXIgKm1udDsKKworCW1udCA9IHRyYWNlZnNfbW91bnQobW91bnRwb2ludCk7CisJaWYgKCFtbnQpCisJCXJldHVybiBOVUxMOworCisJc2V0X3RyYWNpbmdfZXZlbnRzX3BhdGgoIiIsIG1udCk7CisKKwlyZXR1cm4gbW50OworfQorCitzdGF0aWMgY29uc3QgY2hhciAqX19wZXJmX2RlYnVnZnNfbW91bnQoY29uc3QgY2hhciAqbW91bnRwb2ludCkKIHsKIAljb25zdCBjaGFyICptbnQ7CiAKQEAgLTMxNyw3ICszMzcsMjAgQEAKIAlpZiAoIW1udCkKIAkJcmV0dXJuIE5VTEw7CiAKLQlzZXRfdHJhY2luZ19ldmVudHNfcGF0aChtbnQpOworCXNldF90cmFjaW5nX2V2ZW50c19wYXRoKCJ0cmFjaW5nLyIsIG1udCk7CisKKwlyZXR1cm4gbW50OworfQorCitjb25zdCBjaGFyICpwZXJmX2RlYnVnZnNfbW91bnQoY29uc3QgY2hhciAqbW91bnRwb2ludCkKK3sKKwljb25zdCBjaGFyICptbnQ7CisKKw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EgICAgMC4wMAotICAgICAgIDAgICAgICAgMCAgICAgICA5ICAgIDAuNTggICAgMTU5NiAgICAzNDkyICAgICAgIDAgICAgMC4yOCAgICAwLjAxICAgOTkuMTMgICAgMC4wMCAgICAgIDIzICAgICAgMjQgICAyMy44MiAgICAwLjAxICAgNzIuNDcgICAgMC4wMCAgICA2LjQwICAgIDEuMDEgICAgMC4wMAotICAgICAgIDAgICAgICAgNCAgICAgICAxICAgIDAuMDcgICAgMTU5NiAgICAzNDkyICAgICAgIDAgICAgMC43OQotICAgICAgIDEgICAgICAgMSAgICAgIDEwICAgIDAuNjUgICAgMTU5NiAgICAzNDkyICAgICAgIDAgICAgMC41OSAgICAwLjAwICAgOTguNzYgICAgMC4wMCAgICAgIDIzCi0gICAgICAgMSAgICAgICA1ICAgICAgIDUgICAgMC4yOCAgICAxNTk2ICAgIDM0OTIgICAgICAgMCAgICAwLjk1Ci0gICAgICAgMiAgICAgICAyICAgICAgMTAgICAgMC42NiAgICAxNTk2ICAgIDM0OTIgICAgICAgMCAgICAwLjQxICAgIDAuMDEgICA5OC45MiAgICAwLjAwICAgICAgMjMKLSAgICAgICAyICAgICAgIDYgICAgICAgMiAgICAwLjEwICAgIDE1OTcgICAgMzQ5MiAgICAgICAwICAgIDAuOTcKLSAgICAgICAzICAgICAgIDMgICAgICAgMyAgICAwLjIwICAgIDE1OTYgICAgMzQ5MiAgICAgICAwICAgIDAuNDQgICAgMC4wMCAgIDk5LjM3ICAgIDAuMDAgICAgICAyMwotICAgICAgIDMgICAgICAgNyAgICAgICA1ICAgIDAuMzEgICAgMTU5NiAgICAzNDkyICAgICAgIDAgICAgMC4zMwotLmZpCi0uU0ggREVCVUcgRVhBTVBMRQotVGhlICItLWRlYnVnIiBvcHRpb24gcHJpbnRzIGFkZGl0aW9uYWwgc3lzdGVtIGluZm9ybWF0aW9uIGJlZm9yZSBtZWFzdXJlbWVudHM6Ci0KLS5uZgotdHVyYm9zdGF0IHZlcnNpb24gNC4wIDEwLUZ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gzMSBDICsvLSAxKQorY3B1MzogTVNSX0lBMzJfVEhFUk1fU1RBVFVTOiAweDg4NDkwMDAwICgyNyBDICsvLSAxKQorICAgIENvcmUgICAgIENQVSBBdmdfTUh6ICAgJUJ1c3kgQnp5X01IeiBUU0NfTUh6ICAgICBTTUkgIENQVSVjMSAgQ1BVJWMzICBDUFUlYzYgIENQVSVjNyBDb3JlVG1wICBQa2dUbXAgUGtnV2F0dCBDb3JXYXR0IEdGWFdhdHQKKyAgICAgICAtICAgICAgIC0gICAgIDQ5MyAgIDEyLjY0ICAgIDM4OTggICAgMzQ5OCAgICAgICAwICAgMTIuNjQgICAgMC4wMCAgICAwLjAwICAgNzQuNzIgICAgICA0NyAgICAgIDQ3ICAgMjEuNjIgICAxMy43NCAgICAwLjAwCisgICAgICAgMCAgICAgICAwICAgICAgIDQgICAgMC4xMSAgICAzODk0ICAgIDM0OTggICAgICAgMCAgIDk5Ljg5ICAgIDAuMDAgICAgMC4wMCAgICAwLjAwICAgICAgNDcgICAgICA0NyAgIDIxLjYyICAgMTMuNzQgICAgMC4wMAorICAgICAgIDAgICAgICAgNCAgICAzODk3ICAgOTkuOTggICAgMzg5OCAgICAzNDk4ICAgICAgIDAgICAgMC4wMgorICAgICAgIDEgICAgICAgMSAgICAgICA3ICAgIDAuMTcgICAgMzg4NyAgICAzNDk4ICAgICAgIDAgICAgMC4wNCAgICAwLjAwICAgIDAuMDAgICA5OS43OSAgICAgIDMyCisgICAgICAgMSAgICAgICA1ICAgICAgIDAgICAgMC4wMCAgICAzODg1ICAgIDM0OTggICAgICAgMCAgICAwLjIxCisgICAgICAgMiAgICAgICAyICAgICAgMjkgICAgMC43NiAgICAzODk1ICAgIDM0OTggICAgICAgMCAgICAwLjEwICAgIDAuMDEgICAgMC4wMSAgIDk5LjEzICAgICAgMzIKKyAgICAgICAyICAgICAgIDYgICAgICAgMiAgICAwLjA2ICAgIDM4OTYgICAgMzQ5OCAgICAgICAwICAgIDAuODAKKyAgICAgICAzICA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dGlzdGljcyBnYXRoZXJlZCB3aGVuIHRoZSBjb21tYW5kIGV4aXRzLgpAQCAtMTU0LDI3ICsxNzYsMjMgQEAKIHVudGlsIF5DIHdoaWxlIHRoZSBvdGhlciBDUFVzIGFyZSBtb3N0bHkgaWRsZToKIAogLm5mCi1yb290QGl2eTogdHVyYm9zdGF0IGNhdCAvZGV2L3plcm8gPiAvZGV2L251bGwKK3Jvb3RAaHN3OiB0dXJib3N0YXQgY2F0IC9kZXYvemVybyA+IC9kZXYvbnVsbAogXkMKLSAgICBDb3JlICAgICBDUFUgQXZnX01IeiAgICVCdXN5IEJ6eV9NSHogVFNDX01IeiAgICAgU01JICBDUFUlYzEgIENQVSVjMyAgQ1BVJWM2ICBDUFUlYzcgQ29yZVRtcCAgUGtnVG1wIFBrZyVwYzIgUGtnJXBjMyBQa2clcGM2IFBrZyVwYzcgUGtnV2F0dCBDb3JXYXR0IEdGWFdhdHQgCi0gICAgICAgLSAgICAgICAtICAgICA0OTYgICAxMi43NSAgICAzODg2ICAgIDM0OTIgICAgICAgMCAgIDEzLjE2ICAgIDAuMDQgICA3NC4wNCAgICAwLjAwICAgICAgMzYgICAgICAzNiAgICAwLjAwICAgIDAuMDAgICAgMC4wMCAgICAwLjAwICAgMjMuMTUgICAxNy42NSAgICAwLjAwCi0gICAgICAgMCAgICAgICAwICAgICAgMjIgICAgMC41NyAgICAzODMwICAgIDM0OTIgICAgICAgMCAgICAwLjgzICAgIDAuMDIgICA5OC41OSAgICAwLjAwICAgICAgMjcgICAgICAzNiAgICAwLjAwICAgIDAuMDAgICAgMC4wMCAgICAwLjAwICAgMjMuMTUgICAxNy42NSAgICAwLjAwCi0gICAgICAgMCAgICAgICA0ICAgICAgIDkgICAgMC4yNCAgICAzODI5ICAgIDM0OTIgICAgICAgMCAgICAxLjE1Ci0gICAgICAgMSAgICAgICAxICAgICAgIDQgICAgMC4wOSAgICAzNzgzICAgIDM0OTIgICAgICAgMCAgIDk5LjkxICAgIDAuMDAgICAgMC4wMCAgICAwLjAwICAgICAgMzYKLSAgICAgICAxICAgICAgIDUgICAgMzg4MCAgIDk5LjgyICAgIDM4ODggICAgMzQ5MiAgICAgICAwICAgIDAuMTgKLSAgICAgICAyICAgICAgIDIgICAgICAxNyAgICAwLjQ0ICAgIDM4MTMgICAgMzQ5MiAgICAgICAwICAgIDAuNzcgICAgMC4wNCAgIDk4Ljc1ICAgIDAuMDAgICAgICAyOAotICAgICAgIDIgICAgICAgNiAgICAgIDEyICAgIDAuMzIgICAgMzgyMyAgICAzNDkyICAgICAgIDAgICAgMC44OQotICAgICAgIDMgICAgICAgMyAgICAgIDE2ICAgIDAuNDMgICAgMzg0NCAgICAzNDkyICAgICAgIDAgICAgMC42MyAgICAwLjExICAgOTguODQgICAgMC4wMCAgICAgIDMwCi0gICAgICAgMyAgICAgICA3ICAgICAgIDQgICAgMC4xMSAgICAzODI3ICAgIDM0OTIgICAgICAgMCAgICAwLjk0Ci0zMC4zNzIyNDMgc2VjCisgICAgIENQVSBBdmdfTUh6ICAgJUJ1c3kgQnp5X01IeiBUU0NfTUh6CisgICAgICAgLSAgICAgNDgyICAgMTIuNTEgICAgMzg1NCAgICAzNDk4CisgICAgICAgMCAgICAgICAwICAgIDAuMDEgICAgMTk2MCAgICAzNDk4CisgICAgICAgNCAgICAgICAwICAgIDAuMDAgICAgMjEyOCAgICAzNDk4CisgICAgICAgMSAgICAgICAwICAgIDAuMDAgICAgMzAwMyAgICAzNDk4CisgICAgICAgNSAgICAzODU0ICAgOTkuOTggICAgMzg1NSAgICAzNDk4CisgICAgICAgMiAgICAgICAwICAgIDAuMDEgICAgMzUwNCAgICAzNDk4CisgICAgICAgNiAgICAgICAzICAgIDAuMDggICAgMzg4NCAgICAzNDk4CisgICAgICAgMyAgICAgICAwICAgIDAuMDAgICAgMjU1MyAgICAzNDk4CisgICAgICAgNyAgICAgICAwICAgIDAuMDAgICAgMjEyNiAgICAzNDk4CisxMC43ODM5ODMgc2VjCiAKIC5maQotQWJvd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xyMTUsNwkjIGNoZWNrIHI3CisJY21wZCAgICByOSxyNworCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSw4CSMgY2hlY2sgcjgKKwljbXBkICAgIHI5LHI4CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDEzCSMgY2hlY2sgcjEzCisJY21wZCAgICByOSxyMTMKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMTQJIyBjaGVjayByMTQKKwljbXBkICAgIHI5LHIxNAorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwxNgkjIGNoZWNrIHIxNgorCWNtcGQgICAgcjkscjE2CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDE3CSMgY2hlY2sgcjE3CisJY21wZCAgICByOSxyMTcKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMTgJIyBjaGVjayByMTgKKwljbXBkICAgIHI5LHIxOAorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwxOQkjIGNoZWNrIHIxOQorCWNtcGQgICAgcjkscjE5CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDIwCSMgY2hlY2sgcjIwCisJY21wZCAgICByOSxyMjAKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMjEJIyBjaGVjayByMjEKKwljbXBkICAgIHI5LHIyMQorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwyMgkjIGNoZWNrIHIyMgorCWNtcGQgICAgcjkscjIyCisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDIzCSMgY2hlY2sgcjIzCisJY21wZCAgICByOSxyMjMKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMjQJIyBjaGVjayByMjQKKwljbXBkICAgIHI5LHIyNAorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwyNQkjIGNoZWNrIHIyNQorCWNtcGQgICAgcjkscjI1CisJYm5lICAgICAxZgorCWFk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