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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MQotCi0tIGNyZWF0aW9uIG9mIGRldmZzCi0KLS0gbW9kaWZpZWQgbWlzY2VsbGFuZW91cyBjaGFyYWN0ZXIgZGV2aWNlcyB0byBzdXBwb3J0IGRldmZzCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MgotCi0tIGJ1ZyBmaXggd2l0aCBtYW51YWwgaW5vZGUgY3JlYXRpb24KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYzCi0KLS0gYnVnZml4ZXMKLQotLSBkb2N1bWVudGF0aW9uIGltcHJvdmVtZW50cwotCi0tIGNyZWF0ZWQgYSBjb3VwbGUgb2Ygc2NyaXB0cyAob25lIHRvIHNhdmUmcmVzdG9yZSBhIGRldmZzIGFuZCB0aGUKLSAgb3RoZXIgdG8gc2V0IHVwIGNvbXBhdGliaWxpdHkgc3ltbGlua3MpCi0KLS0gZGV2ZnMgc3VwcG9ydCBmb3IgU0NTSSBkaXNjcy4gTmV3IG5hbWUgZm9ybWF0IGlzOiBzZF9oSGNDaUlsTAotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjQKLQotLSBidWdmaXggZm9yIHRoZSBkaXJlY3RvcnkgcmVhZGluZyBjb2RlCi0KLS0gYnVnZml4IGZv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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NwotCi0tIFNDU0kgQ0QtUk9NUywgdGFwZXMgYW5kIGdlbmVyaWMgZGV2aWNlcyBub3cgYXBwZWFyIGluIGRldmZzCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2OAotCi0tIGJ1Z2ZpeCB3aXRoIG5vLXJld2luZCBTQ1NJIHRhcGVzCi0KLS0gUkFNRElTQ3Mgbm93IGFwcGVhciBpbiBkZXZmcwotCi0tIGJldHRlciBjbGVhbmluZyB1cCBvZiBkZXZmcyBlbnRyaWVzIGNyZWF0ZWQgYnkgdmFyaW91cyBtb2R1bGVzCi0KLS0gaW50ZXJmYWNlIGNoYW5nZSB0byA8ZGV2ZnNfcmVnaXN0ZXI+Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2OQotCi0tIHRoZSB2OCBwYXRjaCB3YXMgY29ycnVwdGVkIHNvbWVob3csIHdoaWNoIHdvdWxkIGFmZmVjdCB0aGUgcGF0Y2ggZm9yCi0gIGxpbnV4L2ZzL2ZpbGVzeXN0ZW1zLmMKLSAgSSd2ZSBhbHNvIGZpeGVkIHRoZSB2OCBwYXRjaCBmaWxlIG9uIHRoZSBXV1cKLQotLSBNZXRhRGV2aWNlcyAoL2Rldi9tZCopIHNob3VsZCBub3cgYXBwZWFyIGluIGRldmZzCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRj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09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjIyCi0KLS0gU0NTSSBob3N0IG51bWJlciBwYXRjaCAoInNjc2lob3N0cz0iIGtlcm5lbCBvcHRpb24pCi0gIFRoYW5rcyB0byBBbmRyemVqIEtyenlzenRvZm93aWN6IDxhbmtyeUBncmVlbi5taWYucGcuZ2RhLnBsPgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjIzCi0KLS0gRml4ZWQgcGVyc2lzdGVuY2UgYnVnIHdpdGggZGV2aWNlIG51bWJlcnMgZm9yIG1hbnVhbGx5IGNyZWF0ZWQKLSAgZGV2aWNlIGZpbGVzCi0KLS0gRml4ZWQgcHJvYmxlbSB3aXRoIHJlY3JlYXRpbmcgc3ltbGlua3Mgd2l0aCBkaWZmZXJlbnQgY29udGVudAotCi0tIEFkZGVkIENPTkZJR19ERVZGU19NT1VOVCAobW91bnQgZGV2ZnMgb24gL2RldiBhdCBib290IHRpbWUpCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MjQKLQotLSBTd2l0Y2hlZCBmcm9tIENPTkZJR19LRVJORUxEIHRvIENPTkZJR19LTU9EOiBtb2R1bGUgYXV0b2xvYWRpbmcKLSAgc2hvdWxkIG5vdyB3b3JrIGFnYWluCi0KLS0gSGlkZSBlbnRyaWVzIHdoaWNoIGFyZSBtYW51YWxseSB1bmxpbmtlZAotCi0tIEFsd2F5cyBpbnZhbGlkYXRlIGRldmZzIGRlbnRyeSBjYWNoZSB3aGVuIHJlZ2lzdGVyaW5nIGVudHJpZXMKLQotLSBTdXBwb3J0IHJlbW92YWwgb2YgZGV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pY2llbnRseQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjI5Ci0KLS0gQWRkZWQgREVWRlNfRkxfQVVUT19ERVZOVU0gZmxhZwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjMwCi0KLS0gTm8gbG9uZ2VyIHNldCB1bm5lY2Vzc2FyeSBtZXRob2RzCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuOTktcHJlMwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjMxCi0KLS0gQWRkZWQgUElEIGRpc3BsYXkgdG8gPGNhbGxfa2VybmVsZD4gZGVidWdnaW5nIG1lc3NhZ2UKLQotLSBBZGRlZCAiZGlyZWFkIiBhbmQgImRpd3JpdGUiIG9wdGlvbnMKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMS4xMDIKLQotLSBGaXhlZCBwZXJzaXN0ZW5jZSBwcm9ibGVtIHdpdGggcGVybWlzc2lvbnMKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYzMgotCi0tIEZpeGVkIGRldmZzIHN1cHBvcnQgaW4gZHJpdmVycy9ibG9jay9tZC5jCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MzMKLQotLSBTdXBwb3J0IGxlZ2FjeSBkZXZpY2Ugbm9kZXMKLQotLSBGaXhlZCBidWcgd2hlcmUgcmVjcmVhdGVkIGlub2RlcyB3ZXJlIGhpZGRlbgotCi0tIE5ldyBJREUgbmFtaW5nIHNjaGVtZTogZXZlcnl0aGluZyBpcyB1bmRlciAvZGV2L2lkZQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjM0Ci0KLS0gSW1wcm92ZWQgZGVidWdnaW5nIGluIDxnZXRfdmZzX2lub2RlPgotCi0tIFByZXZlbnQgZHVwbGljYXRlIGNhbGxzIHRvIDxkZXZmc19ta19kaXI+IGluIFNDU0kgbGF5ZXIKLQotLSBObyBsb25nZXIgZnJlZSBvbGQgZGVudHJpZXMgaW4gPGRldmZzX21rX2Rpcj4KLQotLSBGcmVlIGFsbCBkZW50cmllcyBmb3IgYSBnaXZlbiBlbnRyeSB3aGVuIGRlbGV0aW5nIGlub2RlcwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjM1Ci0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuMTA1IChzb3VuZCBkcml2ZXIgY2hhbmdlcykKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYzNgotCi0tIEZpeGVkIHNvdW5kIGRyaXZlciBwb3J0Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MzcKLQotLSBNaW5vciBkb2N1bWVudGF0aW9uIHR3ZWFrcwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjM4Ci0KLS0gTW9yZSBkb2N1bWVudGF0aW9uIHR3ZWFrcwotCi0tIEZpeCBmb3Igc291bmQgZHJpdmVyIHBvcnQKLQotLSBSZW1vdmVkIHR0eW5hbWUtcGF0Y2ggKGdyYWIgbGliYyA1LjQuNDQgaW5zdGVhZCkKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMS4xMDctcHJlMiAobG9vcCBkcml2ZXIgZml4KQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjM5Ci0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuMTA3IChoZC5jIGh1bmsgYnJva2UgZHVlIHRvIHNwZWxsaW5nICJmaXhlcyIpLiBTaWdoCi0KLS0gUmVtb3ZlZCBtYW55ICNpZmRlZidzLCByZXBsYWNlZCB3aXRoIHRyaWNrZXJ5IGluIGluY2x1ZGUvZGV2ZnNfZnMuaAotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjQwCi0KLS0gRml4IGZvciBzb3VuZCBkcml2ZXIgcG9ydAotCi0tIExpbWl0IGF1dG8tZGV2aWNlIG51bWJlcmluZyB0byBtYWpvcnMgMTI4IHRvIDIzOQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjQxCi0KLS0gRml4ZWQgaW5vZGUgdGltZXMgcGVyc2lz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wotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjQ1Ci0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuMTEwCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NDYKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMS4xMTItcHJlMQotCi0tIFJlbW92ZWQgaGFybWxlc3MgInVudXNlZCB2YXJpYWJsZSIgY29tcGlsZXIgd2FybmluZwotCi0tIEZpeGVkIG1vZGVzIGZvciBtYW51YWxseSByZWNyZWF0ZWQgZGV2aWNlIG5vZGVzCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NDcKLQotLSBBZGRlZCBOVUxMIGRldmZzIGlub2RlIHdhcm5pbmcgaW4gPGRldmZzX3JlYWRfaW5vZGU+Ci0KLS0gRm9yY2UgYWxsIGlub2RlIG5saW5rIHZhbHVlcyB0byAxCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NDgKLQotLSBBZGRlZCAiZGlta25vZCIgb3B0aW9uCi0KLS0gU2V0IGlub2RlIG5saW5rIHRvIDAgd2hlbiBmcmVlaW5nIGRlbnRyaWVzCi0KLS0gQWRkZWQgc3VwcG9ydCBmb3IgdmlydHVhbCBjb25zb2xlIGNhcHR1cmUgZGV2aWNlcyAoL2Rldi92Y3MqKQotICBUaGFua3MgdG8gRGVubmlzIEhvdSA8c21pbGF4QG1pbm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mQgZHJpdmVyCi0KLS0gQWRkZWQgc3VwcG9ydCBmb3IgZnJhbWUgYnVmZmVyIGRldmljZXMgKC9kZXYvZmIqKQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjU1Ci0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuMTE5Ci0KLS0gVXNlIEdDQyBleHRlbnNpb25zIGZvciBzdHJ1Y3R1cmUgaW5pdGlhbGlzYXRpb25zCi0KLS0gSW1wbGVtZW50ZWQgYXN5bmMgb3BlbiBub3RpZmljYXRpb24KLQotLSBJbmNyZW1lbnRlZCBkZXZmc2QgcHJvdG9jb2wgcmV2aXNpb24gdG8gMQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjU2Ci0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuMTIwLXByZTMKLQotLSBNb3ZlZCBhc3luYyBvcGVuIG5vdGlmaWNhdGlvbiB0byBlbmQgb2YgPGRldmZzX29wZW4+Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NTcKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMS4xMjEKLQotLSBQcmVwZW5kZWQgIi9kZXYvIiB0byBtb2R1bGUgbG9hZCByZXF1ZXN0Ci0KLS0gUmVuYW1lZCA8Y2FsbF9rZXJuZWxkPiB0byA8Y2FsbF9rbW9kPgotCi0tIENyZWF0ZWQgc2FtcGxlIG1vZHVsZXMuY29uZiBmaWxlCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NTgKLQotLSBGaXhlZCB0eXBvICJBWVNOQyIgLT4gIkFTWU5DIgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjU5Ci0KLS0gQWRkZWQgb3BlbiBmbGFnIGZvciBmaWxlcwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjYwCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuMTIzLXByZTIKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY2MQotCi0tIFNldCBpX2Jsb2Nrcz0wIGFuZCBpX2Jsa3NpemU9MTAyNCBpbiA8ZGV2ZnNfcmVhZF9pbm9kZT4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY2MgotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4xLjEyMwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjYzCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuMTI0LXByZTIKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIH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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NjcKLQotLSBBZGRlZCBpbmxpbmUgZGVjbGFyYXRpb24gZm9yIGR1bW15IDxkZXZmc19nZW5lcmF0ZV9wYXRoPgotCi0tIFJlbW92ZWQgc3B1cmlvdXMgInVuYWJsZSB0byByZWdpc3Rlci4uLiBpbiBkZXZmcyIgbWVzc2FnZXMgd2hlbgotICBDT05GSUdfREVWRlNfRlM9bgotCi0tIEZpeGVkIG1pc2MuIGRldmljZXMgd2hlbiBDT05GSUdfREVWRlNfRlM9bgotCi0tIExpbWl0IGF1dG8tZGV2aWNlIG51bWJlcmluZyB0byBtYWpvcnMgMTQ0IHRvIDIzOQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjY4Ci0KLS0gSGlkZSB1bm9wZW5lZCB2aXJ0dWFsIGNvbnNvbGVzIGZyb20gZGlyZWN0b3J5IGxpc3RpbmdzCi0KLS0gQWRkZWQgc3VwcG9ydCBmb3IgdmlkZW8gY2FwdHVyZSBkZXZpY2VzCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjEuMTI1Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NjkKLQotLSBGaXggZm9yIENPTkZJR19WVD1uCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NzAKLQotLSBBZGRlZCBzdXBwb3J0IGZvciBub24tT1NTL0ZyZWUgc291bmQgY2FyZHMKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY3MQotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4xLjEyNi1wcmUyCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NzIKLQotLSAjaWZkZWYncyBmb3IgQ09ORklHX0RFVkZTX0RJU0FCTEVfT0xEX05BTUVTIHJlbW92ZWQKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY3MwotCi0tIENPTkZJR19ERVZGU19ESVNBQkxFX09MRF9OQU1FUyByZXBsYWNlZCB3aXRoICJub2NvbXBhdCIgYm9vdCBvcHRpb24KLQotLSBDT05GSUdfREVWRlNfQk9PVF9PUFRJT05TIHJlbW92ZWQ6IGJvb3Qgb3B0aW9ucyBhbHdheXMgYXZhaWxhYmxlCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NzQKLQotLSBSZW1vdmVkIENPTkZJR19ERVZGU19NT1VOVCBhbmQgIm1vdW50IiBib290IG9wdGlvbiBhbmQgcmVwbGFjZWQgd2l0aAotICAibm9tb3VudCIgYm9vdCBvcHRpb24KLQotLSBEb2N1bWVudGF0aW9uIHVwZGF0ZXMKLQotLSBVcGRhdGVkIHNhbXBsZSBtb2R1bGVzLmNvbmYKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9y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4gb24gZmlyc3QgY2FsbCB0byA8ZGV2ZnNfcmVhZGRpcj4KLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMS4xMjktcHJlNQotCi0tIElTRE4gc3VwcG9ydCBpbXByb3ZlbWVudHMKLSAgVGhhbmtzIHRvIENocmlzdG9waGUgTGVyb3kgPGNocmlzdG9waGUubGVyb3k1QGNhcHdheS5jb20+Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2NzkKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMS4xMzAKLQotLSBSZW5hbWVkIG1pc2NkZXZpY2UgImFwbSIgdG8gImFwbV9iaW9zIiB0byBiZSBjb25zaXN0ZW50IHdpdGgKLSAgZGV2aWNlcy50eHQKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY4MAotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4xLjEzMQotCi0tIFVwZGF0ZWQgPGRldmZzX3JtZGlyPiBmb3IgVkZTIGNoYW5nZSBpbiAyLjEuMTMxCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2ODEKLQotLSBGaXhlZCBwZXJtaXNzaW9ucyBvbiAvZGV2L3B0bXgKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY4MgotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4xLjEzMi1wcmU0Ci0KLS0gQ2hhbmdlZCBpbml0aWFsIHBlcm1pc3Npb25zIG9uIC9kZXYvcHRzLyoKLQotLSBDcmVhdGVkIDxkZXZmc19ta19jb21wYXQ+Ci0KLS0gQWRkZWQgInN5bWxpbmtzIiBib290IG9wdGlvbgotCi0tIENoYW5nZWQgZGV2ZnNfcmVnaXN0ZXJfYmxrZGV2KCkgYmFjayB0byByZWdpc3Rlcl9ibGtkZXYoKSBmb3IgSURFCi0KLS0gQ2hlY2sgZm9yIHBhcnRpdGlvbnMgb24gcmVtb3ZhYmxlIG1lZGlhIGluIDxkZXZmc19sb29rdXA+Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2ODMKLQotLSBGaXhlZCBzdXBwb3J0IGZvciByYW1kaXNjIHdoZW4gdXNpbmcgc3RyaW5nLWJhc2VkIHJvb3QgRlMgbmFtZQotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4yLjAtcHJlMQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjg0Ci0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjIuMC1wcmU3Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2ODUKLQotLSBDb21waWxlIGZpeGVzIGZvciBkcml2ZXIvc291bmQvc291bmRfY29tbW9uLmMgKG5vbi1tb2R1bGUpIGFuZAotICBkcml2ZXJzL2lzZG4vaXNkbl9jb21tb24uYwotICBUaGFua3MgdG8gQ2hyaXN0b3BoZSBMZXJveSA8Y2hyaXN0b3BoZS5sZXJveTVAY2Fwd2F5LmNvbT4KLQotLSBBZGRlZCBzdXBwb3J0IG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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2ODkKLQotLSBTd2l0Y2hlZCB0byBDIGRhdGEgdHlwZXMgaW4gaW5jbHVkZS9saW51eC9kZXZmc19mcy5oCi0KLS0gU3dpdGNoZWQgZnJvbSBQQVRIX01BWCB0byBERVZGU19QQVRITEVOCi0KLS0gVXBkYXRlZCBEb2N1bWVudGF0aW9uL2ZpbGVzeXN0ZW1zL2RldmZzL21vZHVsZXMuY29uZiB0byB0YWtlIGFjY291bnQKLSAgb2YgcmV2ZXJzZSBzY2FubmluZyAoISkgYnkgbW9kcHJvYmUKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMi4wCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2OTAKLQotLSBDT05GSUdfREVWRlNfRElTQUJMRV9PTERfVFRZX05BTUVTIHJlcGxhY2VkIHdpdGggIm5vdHR5Y29tcGF0IiBib290Ci0gIG9wdGlvbgotCi0tIENPTkZJR19ERVZGU19UVFlfQ09NUEFUIHJlbW92ZWQ6IGV4aXN0aW5nICJzeW1saW5rcyIgYm9vdCBvcHRpb24gbm93Ci0gIGNvbnRyb2xzIHRoaXMuIFRoaXMgbWVhbnMgeW91IG11c3QgaGF2ZSBsaWJjIDUuNC40NCBvciBsYXRlciwgb3IgYQotICByZWNlbnQgdmVyc2lvbiBvZiBsaWJjIDYgaWYgeW91IHVzZSB0aGUgInN5bWxpbmtzIiBvcHRpb24KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY5MQotCi0tIFN3aXRjaCBmcm9tIDxkZXZmc19ta19zeW1saW5rPiB0byA8ZGV2ZnNfbWtfY29tcGF0PiBpbgotICBkcml2ZXJzL2NoYXIvdmNfc2NyZWVuLmMgdG8gZml4IHByb2JsZW1zIHdpdGggTWlkbmlnaHQgQ29tbWFuZGVyCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2OTIKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMi4yLXByZTUKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY5MwotCi0tIE1vZGlmaWVkIDxzZF9uYW1lPiBpbiBkcml2ZXJzL3Njc2kvc2QuYyB0byBjb3BlIHdpdGggZGV2aWNlcyB0aGF0Ci0gIGRvbid0IGV4aXN0ICh3aGljaCBoYXBwZW5zIHdpdGggbmV3IFJBSUQgYXV0b3N0YXJ0IGNvZGUgcHJpbnRrKClzKQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjk0Ci0KLS0gRml4ZWQgYnVnIGluIGpveXN0aWNrIGRyaXZlcjogb25seSBmaXJzdCBqb3lzdGljayB3YXMgcmVnaXN0ZXJlZAotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjk1Ci0KLS0gRml4ZWQgYW5vdGhlciBidWcgaW4gam95c3RpY2sgZHJpdmVyCi0KLS0gRml4ZWQgPGRldmZzZF9yZWFkPiB0byBub3Qgb3ZlcnJ1biBldmVudCBidWZmZXIKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHY5NgotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4yLjUtMgotCi0tIENyZWF0ZWQgPGRldmZzX2F1dG9fdW5yZWdpc3Rlcj4KLQotLSBGaXhlZCBidWdzOiBjb21wYXRpYmlsaXR5IGVudHJpZXMgd2VyZSBub3QgdW5yZWdpc3RlcmVkIGZvcjoKLSAgICBsb29wIGRyaXZlcgotICAgIGZsb3BweSBkcml2ZXIKLSAgICBSQU1ESVNDIGRyaXZlcgotICAgIElERSB0YXBlIGRyaXZlcgotICAgIFNDU0kgQ0QtUk9NIGRyaXZlcgotICAgIFNDU0kgSEREIGRyaXZlcgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjk3Ci0KLS0gRml4ZWQgYnVnczogY29tcGF0aWJpbGl0eSBlbnRyaWVzIHdlcmUgbm90IHVucmVnaXN0ZXJlZCBmb3I6Ci0gICAgQUxTQSBzb3VuZCBkcml2ZXIKLSAgICBwYXJ0aXRpb25zIGluIGdlbmVyaWMgZGlzYyBkcml2ZXIKLQotLSBEb24ndCByZXR1cm4gdW5yZWdpc3RyZWQgZW50cmllcyBpbiA8ZGV2ZnNfZmluZF9oYW5kbGU+Ci0KLS0gUGFuaWMgaW4gPGRldmZzX3VucmVnaXN0ZXI+IGlmIGVudHJ5IHVucmVnaXN0ZXJlZAotCi0tIERvbid0IHBhbmljIGluIDxkZXZmc19hdXRvX3VucmVnaXN0ZXI+IGZvciBkdXBsaWNhdGVzCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvci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VudHJ5IGluIDxzcl9kZXRhY2g+Ci0KLS0gUmVnaXN0ZXIgZW50cnkgaW4gPHNnX2RldGVjdD4KLQotLSBVbnJlZ2lzdGVyIGVudHJ5IGluIDxzZ19kZXRhY2g+Ci0KLS0gQWRkZWQgc3VwcG9ydCBmb3IgQUxTQSBkcml2ZXJzCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTAxCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuMgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjEwMgotCi0tIFVwZGF0ZSBzZXJpYWwgZHJpdmVyIHRvIHJlZ2lzdGVyIFBDTUNJQSBlbnRyaWVzCi0gIFRoYW5rcyB0byBSb2NoLUFsZXhhbmRyZSBOb21pbmUtQmVndWluIDxyb2NoQHNhbWFya2FuZC5pbmZpbmkuZnI+Ci0KLS0gVXBkYXRlZCBhbiBlbWFpbCBhZGRyZXNzIGluIENoYW5nZUxvZwotCi0tIEhpZGUgdmlydHVhbCBjb25zb2xlIGNhcHR1cmUgZW50cmllcyBmcm9tIGRpcmVjdG9yeSBsaXN0aW5ncyB3aGVuCi0gIGNvcnJlc3BvbmRpbmcgY29uc29sZSBkZXZpY2UgaXMgbm90IG9wZW4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMDMKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMy4zCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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aSA8emJvc3pvckBtYWlsLmV4dGVybmV0Lmh1PgotCi0tIERvbid0IHNhdmUgL2Rldi9sb2cgaW4gcmMuZGV2ZnMKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMy40LXByZTEKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMDYKLQotLSBGaXhlZCBzaWxseSB0eXBvIGluIGRyaXZlcnMvc2NzaS9zdC5jCi0KLS0gSW1wcm92ZWQgZGVidWdnaW5nIGluIDxkZXZmc19yZWdpc3Rlcj4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMDcKLQotLSBBZGRlZCAiZGl1bmxpbmsiIGFuZCAibm9rbW9kIiBib290IG9wdGlvbnMKLQotLSBSZW1vdmVkIHN1cGVyZmx1b3VzIHdhcm5pbmcgbWVzc2FnZSBpbiA8ZGV2ZnNfZF9pcHV0PgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjEwOAotCi0tIFJlbW92ZSBlbnRyaWVzIHdoZW4gdW5sb2FkaW5nIHNvdW5kIG1vZHVsZQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjEwOQotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4zLjYtcHJlMgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbm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QgdG8gZGV2ZnNkCi0KLS0gUmVuYW1lZCA8Y2FsbF9rbW9kPiB0byA8dHJ5X21vZGxvYWQ+Ci0KLS0gQWRkZWQgREVWRlNEX05PVElGWV9MT09LVVAgZXZlbnQKLQotLSBBZGRlZCBERVZGU0RfTk9USUZZX0NIQU5HRSBldmVudAotCi0tIEFkZGVkIERFVkZTRF9OT1RJRllfQ1JFQVRFIGV2ZW50Ci0KLS0gSW5jcmVtZW50ZWQgZGV2ZnNkIHByb3RvY29sIHJldmlzaW9uIHRvIDQKLQotLSBNb3ZlZCBrZXJuZWwtc3BlY2lmaWMgc3R1ZmYgdG8gaW5jbHVkZS9saW51eC9kZXZmc19mc19rZXJuZWwuaAotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjExMwotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4zLjkKLQotLSBSZXN0cmljdGVkIHBlcm1pc3Npb25zIG9uIHNvbWUgYmxvY2sgZGV2aWNlcwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjExNAotCi0tIEFkZGVkIHN1cHBvcnQgZm9yIC9kZXYvbmV0bGluawotICBUaGFua3MgdG8gRGVubmlzIEhvdSA8c21pbGF4QG1pbmRtZWxkLnlpLm9yZz4KLQotLSBSZXR1cm4gRUlTRElSIHJhdGhlciB0aGFuIEVJTlZBTCBmb3IgcmVhZCgyKSBvbiBkaXJlY3RvcmllcwotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4zLjEwCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2M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09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMTgKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMy4xNS1wcmUzCi0KLS0gRml4ZWQgYnVnIGluIGxvb3AgZHJpdmVyCi0KLS0gVW5yZWdpc3RlciAvZGV2L2xwJWQgZW50cmllcyBpbiBkcml2ZXJzL2NoYXIvbHAuYwotICBUaGFua3MgdG8gTWFjaWVqIFcuIFJvenlja2kgPG1hY3JvQGRzMi5wZy5nZGEucGw+Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTE5Ci0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuMTYKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMjAKLQotLSBGaXhlZCBidWcgaW4gZHJpdmVycy9zY3NpL3Njc2kuYwotCi0tIEFkZGVkIC9kZXYvcHBwCi0gIFRoYW5rcyB0byBEZW5uaXMgSG91IDxzbWlsYXhAbWluZG1lbGQueWkub3JnPgotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4zLjE3Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTIxCi0KLS0gRml4ZWQgYnVnIGluIGRyaXZlcnMvYmxvY2svbG9vcC5jCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuMTgKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMjIKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMy4xOQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjEyMwotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4zLjIwCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTI0Ci0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuMjEKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMjUKLQotLSBDcmVhdGVkIDxkZXZmc19nZXRfaW5mbz4sIDxkZXZmc19zZXRfaW5mbz4sCi0gIDxkZXZmc19nZXRfZmlyc3RfY2hpbGQ+IGFuZCA8ZGV2ZnNfZ2V0X25leHRfc2libGluZz4KLSAgQWRkZWQgPDxkaXI+PiBwYXJhbWV0ZXIgdG8gPGRldmZzX3JlZ2lzdGVyPiwgPGRldmZzX21rX2NvbXBhdD4sCi0gIDxkZXZmc19ta19kaXI+IGFuZCA8ZGV2ZnNfZmluZF9oYW5kbGU+Ci0gIFdvcmsgc3BvbnNvcmVkIGJ5IFNHSQotCi0tIEZpeGVkIGFwcGFyZW50IGJ1ZyBpbiBDT1NBIGRyaXZlcgotCi0tIFJlLWluc3RhdGVkICJzY3NpaG9zdHM9IiBib290IG9wdGlvbgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjEyNgotCi0tIEFsd2F5cyBjcmVhdGUgL2Rldi9wdHMgaWYgQ09ORklHX1VOSVg5OF9QVFlTPXkKLQotLSBGaXhlZCBjYWxsIHRvIDxkZXZmc19ta19kaXI+IGluIGRyaXZlcnMvYmxvY2svaWRlLWRpc2suYwotICBUaGFua3MgdG8gRGVubmlzIEhvdSA8c21pbGF4QG1pbmRtZWxkLnlpLm9yZz4KLQotLSBBbGxvdyBtdWx0aXBsZSB1bnJlZ2lzdHJhdGlvbnMKLQotLSBDcmVhdGVkIC9kZXYvc2NzaSBoaWVyYXJjaHkKLSAgV29yayBzcG9uc29yZWQgYnkgU0dJCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTI3Ci0KLVdvcmsgc3BvbnNvcmVkIGJ5IFNHSQotCi0tIE5vIGxvbmdlciBkaXNhYmxlIGRldnB0cyBpZiBkZXZmcyBlbmFibGVkIChjYXZlYXQgZW1wdG9yKQotCi0tIEFkZGVkIGZsYWdzIGFycmF5IHRvIHN0cnVjdCBnZW5kaXNrIGFuZCByZW1vdmVkIGNvZGUgZnJvbQotICBkcml2ZXJzL3Njc2kvc2QuYwotCi0tIENyZWF0ZWQgL2Rldi9kaXNjcyBoaWVyYXJjaHkKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMjgKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gQ3JlYXRlZCAvZGV2L2Nkcm9tcyBoaWVyYXJjaHkKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxMjkKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gUmVtb3ZlZCBjb21wYXRpYmlsaXR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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjEzOQotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBDb3JyZWN0ZWQgYW5kIG1vdmVkIDxnZXRfYmxrZm9wcz4gYW5kIDxnZXRfY2hyZm9wcz4gZGVjbGFyYXRpb25zCi0gIGZyb20gYXJjaC9hbHBoYS9rZXJuZWwvb3NmX3N5cy5jIHRvIGluY2x1ZGUvbGludXgvZnMuaAotCi0tIFJlbW92ZWQgbmFtZSBmdW5jdGlvbiBmcm9tIHN0cnVjdCBnZW5kaXNrCi0KLS0gVXBkYXRlZCBkZXZmcyBGQVEKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNDAKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuMjcKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNDEKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gQnVnIGZpeCBpbiBhcmNoL202OGsvYXRhcmkvam95c3RpY2suYwotCi0tIE1vdmVkIElTRE4gYW5kIGNhcGkgZGV2aWNlcyB0byAvZGV2L2lzZG4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNDIKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gQnVnIGZpeCBpbiBkcml2ZXJzL2Jsb2NrL2lkZS1wcm9iZS5jIChwYXRjaCBjb25mdXNpb24pCi09PT09PT09P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TW92ZWQgREFDOTYwIGRldmljZXMgdG8gL2Rldi9kYWM5NjAKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNDcKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuMzItcHJlNAotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE0OAotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBSZW1vdmVkIGttb2Qgc3VwcG9ydDogdXNlIGRldmZzZCBpbnN0ZWFkCi0KLS0gTW92ZWQgbWlzY2VsbGFuZW91cyBjaGFyYWN0ZXIgZGV2aWNlcyB0byAvZGV2L21pc2MKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNDkKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gRW5zdXJlIGluY2x1ZGUvbGludXgvam95c3RpY2suaCBpcyBPSyBmb3IgdXNlci1zcGFjZQotCi0tIEltcHJvdmVkIGRlYnVnZ2luZyBpbiA8Z2V0X3Zmc19pbm9kZT4KLQotLSBFbnN1cmUgZGVudHJpZXMgY3JlYXRlZCBieSBkZXZmc2Qgd2lsbCBiZSBjbGVhbmVkIHVwCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTUwCi0KLVdvcmsgc3BvbnNvcmVkIGJ5IFNHSQotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4zLjM0Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTUxCi0KLVdvcmsgc3BvbnNvcmVkIGJ5IFNHSQotCi0tIFBvcnRlZCB0byBrZXJuZWwgMi4zLjM1LXByZTEKLQotLSBDcmVhdGVkIDxkZXZmc19nZXRfbmFtZT4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNTIKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gVXBkYXRlZCBzYW1wbGUgbW9kdWxlcy5jb25mCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuMzYtcHJlMQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE1MwotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMy40MgotCi0tIFJlbW92ZWQgPGRldmZzX2ZpbGxfZmlsZT4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNTQKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gVG9vayBhY2NvdW50IG9mIGRldmljZSBudW1iZXIgY2hhbmdlcyBmb3IgL2Rldi9mYioKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNTUKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuNDMtcHJlOAotCi0tIE1vdmVkIC9kZXYvdHR5MCB0byAvZGV2L3ZjLzAKLQotLSBNb3ZlZCBzZXF1ZW5jZSBudW1iZXIgZm9ybWF0dGluZyBmcm9tIDxfdHR5X21ha2VfbmFtZT4gdG8gZHJpdmVycwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE1NgotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBGaXhlZCBicmVha2FnZSBpbiBkcml2ZXJzL3Njc2kvc2QuYyBkdWUgdG8gcmVjZW50IFNDU0kgY2hhbmdlcwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE1NwotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMy40NQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE1OAotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuMy40Ni1wcmUyCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTU5Ci0KLVdvcmsgc3BvbnNvcmVkIGJ5IFNHSQotCi0tIEZpeGVkIGRyaXZlcnMvYmxvY2svbWQuYwotICBUaGFua3MgdG8gTWlrZ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gotCi0tIFJlbW92ZWQgRG9jdW1lbnRhdGlvbi9maWxlc3lzdGVtcy9kZXZmcy9tay1kZXZsaW5rcwotCi0tIFVwZGF0ZWQgRG9jdW1lbnRhdGlvbi9maWxlc3lzdGVtcy9kZXZmcy9SRUFETUUKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNjQKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gRml4ZWQgQ09ORklHX0RFVkZTIGJyZWFrYWdlIGluIGRyaXZlcnMvY2hhci9zZXJpYWwuYyBpbnRyb2R1Y2VkIGluCi0gIGxpbnV4LTIuMy45OS1wcmU2LTcKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNjUKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjMuOTktcHJlNgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE2NgotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBBZGRlZCBDT05GSUdfREVWRlNfTU9VTlQKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNjcKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gVXBkYXRlZCBEb2N1bWVudGF0aW9uL2ZpbGVzeXN0ZW1zL2RldmZzL1JFQURNRQotCi0tIFVwZGF0ZWQgc2FtcGxlIG1vZHVsZXMuY29uZgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE2OAotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBEaXNhYmxlZCBtdWx0aS1tb3VudCBjYXBhYmlsaXR5ICh1c2UgVkZTIGJpbmRpbmdzIGluc3RlYWQpCi0KLS0gVXBkYXRlZCBSRUFETUUgZnJvbSBtYXN0ZXIgSFRNTCBmaWxlCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTY5Ci0KLVdvcmsgc3BvbnNvcmVkIGJ5IFNHSQotCi0tIFJlbW92ZWQgbXVsdGktbW91bnQgY29kZQotCi0tIFJlbW92ZWQgY29tcGF0aWJpbGl0eSBtYWNyb3M6IFZGUyBoYXMgY2hhbmdlZCB0b28gbXVjaAotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE3MAotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBVcGRhdGVkIFJFQURNRSBmcm9tIG1hc3RlciBIVE1MIGZpbGUKLQotLSBNZXJnZWQgZGV2ZnMgaW5vZGUgaW50byBkZXZmcyBlbnRyeQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE3MQotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBVcGRhdGVkIHNhbXBsZSBtb2R1bGVzLmNvbmYKLQotLSBSZW1vdmVkIGRlYWQgY29kZSBpbiA8ZGV2ZnNfcmVnaXN0ZXI+IHdoaWNoIHVzZWQgdG8gY2FsbAotICA8ZnJlZV9kZW50cmllcz4KLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuNC4wLXRlc3QyLXByZTMKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNzIKLQotV29yayBzcG9uc29yZWQgYnkgU0dJCi0KLS0gQ2hhbmdlZCBpbnRlcmZhY2UgdG8gPGRldmZzX3JlZ2lzdGVyPgotCi0tIENoYW5nZWQgaW50ZXJmYWNlIHRvIDxkZXZmc19yZWdpc3Rlcl9zZXJpZXM+Ci09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTczCi0KLVdvcmsgc3BvbnNvcmVkIGJ5IFNHSQotCi0tIFNpbXBsaWZpZWQgaW50ZXJmYWNlIHRvIDxkZXZmc19ta19zeW1saW5rPgotCi0tIFNpbXBsaWZpZWQgaW50ZXJmYWNlIHRvIDxkZXZmc19ta19kaXI+Ci0KLS0gU2ltcGxpZmllZCBpbnRlcmZhY2UgdG8gPGRldmZzX2ZpbmRfaGFuZGxlPgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE3NAotCi1Xb3JrIHNwb25zb3JlZCBieSBTR0kKLQotLSBVcGRhdGVkIFJFQURNRSBmcm9tIG1hc3RlciBIVE1MIGZpbGUKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdG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MKLQotLSBNYWtlIDxkZXZmc19ta19zeW1saW5rPiBzZW5kIGV2ZW50cyB0byBkZXZmc2QKLQotLSBDbGVhbmVkIHVwIG9wdGlvbiBwcm9jZXNzaW5nIGluIDxkZXZmc19zZXR1cD4KLQotLSBGaXhlZCBidWdzIGluIGhhbmRsaW5nIHN5bWxpbmtzOiBjb3VsZCBsZWFrIG9yIGNhdXNlIE9vcHMKLQotLSBDbGVhbmVkIHVwIGRpcmVjdG9yeSBoYW5kbGluZyBieSBzZXBhcmF0aW5nIGZvcHMKLSAgVGhhbmtzIHRvIEFsZXhhbmRlciBWaXJvIDx2aXJvQHBhcmNlbGZhcmNlLmxpbnV4LnRoZXBsYW5ldC5jby51az4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNzgKLQotLSBGaXhlZCBoYW5kbGluZyBvZiBpbnZlcnRlZCBvcHRpb25zIGluIDxkZXZmc19zZXR1cD4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxNzkKLQotLSBBZGp1c3RlZCA8dHJ5X21vZGxvYWQ+IHRvIGFjY291bnQgZm9yIDxkZXZmc19nZW5lcmF0ZV9wYXRoPiBmaXgKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxODAKLQotLSBGaXhlZCAhQ09ORklHX0RFVkZTX0ZTIHN0dWIgZGVjbGFyYXRpb24gb2YgPGRldmZzX2dldF9pbmZvPgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT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ml4ZWQgaW5vZGUgdGFibGUgcmFjZXMgYnkgcmVtb3ZpbmcgaXQgYW5kIHVzaW5nIGlub2RlLT51LmdlbmVyaWNfaXAKLSAgaW5zdGVhZAotCi0tIE1vdmVkIDxkZXZmc19yZWFkX2lub2RlPiBpbnRvIDxnZXRfdmZzX2lub2RlPgotCi0tIE1vdmVkIDxkZXZmc193cml0ZV9pbm9kZT4gaW50byA8ZGV2ZnNfbm90aWZ5X2NoYW5nZT4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxODYKLQotLSBGaXhlZCByYWNlIGluIDxkZXZmc19kb19zeW1saW5rPiBmb3IgdW5pLXByb2Nlc3NvcgotCi0tIFVwZGF0ZWQgUkVBRE1FIGZyb20gbWFzdGVyIEhUTUwgZmlsZQotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE4NwotCi0tIEZpeGVkIGRyaXZlcnMvY2hhci9zdGFsbGlvbi5jIGZvciBkZXZmcwotCi0tIEZpeGVkIGRyaXZlcnMvY2hhci9yb2NrZXQuYyBmb3IgZGV2ZnMKLQotLSBGaXhlZCBidWcgaW4gPGRldmZzX2FsbG9jX3VuaXF1ZV9udW1iZXI+OiBsaW1pdGVkIHRvIDEyOCBudW1iZXJzCi09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci1DaGFuZ2VzIGZvciBwYXRjaCB2MTg4Ci0KLS0gVXBkYXRlZCBtYWpvciBtYXNrcyBpbiBmcy9kZXZmcy91dGlsLmMgdXAgdG8gTGludXMnICJubyBuZXcgbWFqb3JzIgotICBwcm9jbGFtYXRpb24uIEJs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09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxOTEKLQotLSBSZXBsYWNlZCBnbG9iYWwgcndzZW0gZm9yIHN5bWxpbmsgd2l0aCBwZXItbGluayByZWZjb3VudAotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE5MgotCi0tIFJlbW92ZWQgdW5uZWNlc3NhcnkgI2lmZGVmIENPTkZJR19ERVZGU19GUyBmcm9tIGFyY2gvaTM4Ni9rZXJuZWwvbXRyci5jCi0KLS0gUG9ydGVkIHRvIGtlcm5lbCAyLjQuMTAtcHJlMTEKLQotLSBTZXQgaW5vZGUtPmlfbWFwcGluZy0+YV9vcHMgZm9yIGJsb2NrIG5vZGVzIGluIDxnZXRfdmZzX2lub2RlPgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE5MwotCi0tIFdlbnQgYmFjayB0byBnbG9iYWwgcndzZW0gZm9yIHN5bWxpbmtzIChyZWZjb3VudCBzY2hlbWUgbm8gZ29vZCkKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxOTQKLQotLSBGaXhlZCBvdmVycnVuIGluIDxkZXZmc19saW5rPiBieSByZW1vdmluZyBmdW5jdGlvbiAobm90IG5lZWRlZCkKLQotLSBVcGRhdGVkIFJFQURNRSBmcm9tIG1hc3RlciBIVE1MIGZpbGUKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxOTUKLQotLSBGaXhlZCBidWZmZXIgdW5kZXJydW4gaW4gPHRyeV9tb2Rsb2FkPgotCi0tIE1vdmVkIGRvd25fcmVhZCgpIGZyb20gPHNlYXJjaF9mb3JfZW50cnlfaW5fZGlyPiB0byA8ZmluZF9lbnRyeT4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxOTYKLQotLSBGaXhlZCByYWNlIGluIDxkZXZmc2RfaW9jdGw+IHdoZW4gc2V0dGluZyBldmVudCBtYXNrCi0gIFRoYW5rcyB0byBLYXJpIEh1cnR0YSA8aHVydHRhQGxlaWphLm1oLmZtaS5maT4KLQotLSBBdm9pZCBkZWFkbG9jayBpbiA8ZGV2ZnNfZm9sbG93X2xpbms+IGJ5IHVzaW5nIHRlbXBvcmFyeSBidWZmZXIKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxOTcKLQotLSBGaXJzdCByZWxlYXNlIG9mIG5ldyBsb2NraW5nIGNvZGUgZm9yIGRldmZzIGNvcmUgKHYxLjApCi0KLS0gRml4ZWQgYnVnIGluIGRyaXZlcnMvY2Ryb20vY2Ryb20uYwotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotQ2hhbmdlcyBmb3IgcGF0Y2ggdjE5OAotCi0tIERpc2NhcmQgdGVtcG9yYXJ5IGJ1ZmZlciwgbm93IHVzZSAiJXMiIGZvciBkZW50cnkgbmFtZXMKLQotLSBEb24ndCBnZW5lcmF0ZSBwYXRoIGluIDx0cnlfbW9kbG9hZD46IHVzZSBmYWtlIGVudHJ5IGluc3RlYWQKLQotLSBVc2UgImV4aXN0aW5nIiBkaXJlY3RvcnkgaW4gPF9kZXZmc19tYWtlX3BhcmVudF9mb3JfbGVhZj4KLQotLSBVc2Ugc2xhYiBjYWNoZSByYXRoZXIgdGhhbiBmaXhlZCBidWZmZXIgZm9yIGRldmZzZCBldmVudHMKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYxOTkKLQotLSBSZW1vdmVkIG9ic29sZXRlIHVzYWdlIG9mIERFVkZTX0ZMX05PX1BFUlNJU1RFTkNFCi0KLS0gU2VuZCBERVZGU0RfTk9USUZZX1JFR0lTVEVSRUQgZXZlbnRzIGluIDxkZXZmc19ta19kaXI+Ci0KLS0gRml4ZWQgbG9ja2luZyBidWcgaW4gPGRldmZzX2RfcmV2YWxpZGF0ZV93YWl0PiBkdWUgdG8gdHlwbwotCi0tIERvIG5vdCBzZW5kIENSRUFURSwgQ0hBTkdFLCBBU1lOQ19PUEVOIG9yIERFTEVURSBldmVudHMgZnJvbSBkZXZmc2QKLSAgb3IgY2hpbGRyZW4KLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYyMDAKLQotLSBQb3J0ZWQgdG8ga2VybmVsIDIuNS4xLXByZTIKLT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLUNoYW5nZXMgZm9yIHBhdGNoIHYyMDEKLQotLSBGaXhlZCBidWcgaW4gPGRldmZzZF9yZWFkPjogd2FzIGRlcmVmZXJlbmNpbmcgZnJlZWQgcG9pbnRlcgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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ICAgICAgICAgICAgICAgICAgQyBvd25zIEwzCisgICAgICAgICAgICAgICAgICAgICAgICAgRCBibG9ja2VkIG9uIEwzCisgICAgICAgICAgICAgICAgICAgICAgICAgRCBvd25zIEw0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEUgYmxvY2tlZCBvbiBMNAorCitUaGUgY2hhaW4gd291bGQgYmU6CisKKyAgIEUtPkw0LT5ELT5MMy0+Qy0+TDItPkItPkwxLT5BCisKK1RvIHNob3cgd2hlcmUgdHdvIGNoYWlucyBtZXJnZSwgd2UgY291bGQgYWRkIGFub3RoZXIgcHJvY2VzcyBGIGFuZAorYW5vdGhlciBtdXRleCBMNSB3aGVyZSBCIG93bnMgTDUgYW5kIEYgaXMgYmxvY2tlZCBvbiBtdXRleCBMNS4KKworVGhlIGNoYWluIGZvciBGIHdvdWxkIGJlOgorCisgICBGLT5MNS0+Qi0+TDEtPkEKKworU2luY2UgYSBwcm9jZXNzIG1heSBvd24gbW9yZSB0aGFuIG9uZSBtdXRleCwgYnV0IG5ldmVyIGJlIGJsb2NrZWQgb24gbW9yZSB0aGFuCitvbmUsIHRoZSBjaGFpbnMgbWVyZ2UuCisKK0hlcmUgd2Ugc2hvdyBib3RoIGNoYWluczoKKworICAgRS0+TDQtPkQtPkwzLT5DLT5MMi0rCisgICAgICAgICAgICAgICAgICAgICAgIHwKKyAgICAgICAgICAgICAgICAgICAgICAgKy0+Qi0+TDEtPkEKKyAgICAgICAgICAgICAgICAgICAgICAgfAorICAgICAgICAgICAgICAgICBGLT5MNS0rCisKK0ZvciBQSSB0byB3b3JrLCB0aGUgcHJvY2Vzc2VzIGF0IHRoZSByaWdodCBlbmQgb2YgdGhlc2UgY2hhaW5zIChvciB3ZSBtYXkKK2Fsc28gY2FsbCBpdCB0aGUgVG9wIG9mIHRoZSBjaGFpbikgbXVzdCBiZSBlcXVhbCB0byBvciBoaWdoZXIgaW4gcHJpb3JpdHkKK3RoYW4gdGhlIHByb2Nlc3NlcyB0by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gbm90IHNldAogCiAjCiAjIFBhcnRpdGlvbiBUeXBlcwpAQCAtNjI3LDggKzY4MSwxMiBAQAogIyBLZXJuZWwgaGFja2luZwogIwogIyBDT05GSUdfUFJJTlRLX1RJTUUgaXMgbm90IHNldAorIyBDT05GSUdfTUFHSUNfU1lTUlEgaXMgbm90IHNldAogIyBDT05GSUdfREVCVUdfS0VSTkVMIGlzIG5vdCBzZXQKIENPTkZJR19MT0dfQlVGX1NISUZUPTE0CisjIENPTkZJR19ERUJVR19CVUdWRVJCT1NFIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RFQlVHX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VOV0lORF9JTkZPIGlzIG5vdCBzZXQKICMgQ09ORklHX0ZVTExERUJVRyBpcyBub3Qgc2V0CiAjIENPTkZJR19ISUdIUFJPRklMRSBpcyBub3Qgc2V0CiAjIENPTkZJR19CT09UUEFSQU0gaXMgbm90IHNldApAQCAtNjU1LDUgKzcxMyw2IEBACiAjIExpYnJhcnkgcm91dGluZXMKICMKICMgQ09ORklHX0NSQ19DQ0lUVCBpcyBub3Qgc2V0CisjIENPTkZJR19DUkMxNiBpcyBub3Qgc2V0CiAjIENPTkZJR19DUkMzMiBpcyBub3Qgc2V0CiAjIENPTkZJR19MSUJDUkMzMkMgaXMgbm90IHNldApkaWZmIC0tZ2l0IGEvYXJjaC9tNjhrbm9tbXUva2VybmVsL2NvbWVtcGNpLmMgYi9hcmNoL202OGtub21tdS9rZXJuZWwvY29tZW1wY2kuYwppbmRleCA4NjcwOTM4Li5kYjdhMGMxIDEwMDY0NAotLS0gYS9hcmNoL202OGtub21tdS9rZXJuZWwvY29tZW1wY2kuYworKysgYi9hcmNoL202OGtub21tdS9rZXJuZWwvY29tZW1wY2kuYwpAQCAtMzU3LDcgKzM1Nyw4IEBACiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi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zIEVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSAyLiAgKi8KICAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIEFkZHJlc3MgRXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gMy4gICovCmRpZmYgLS1naXQgYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82ODM2MC9oZWFkLXJvbS5TIGIvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNjgzNjAvaGVhZC1yb20uUwppbmRleCAwZGEzNTdhLi4yZDI4YzNlIDEwMDY0NAotLS0gYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82ODM2MC9oZWFkLXJvbS5TCisrKyBiL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzY4MzYwL2hlYWQtcm9tLlMKQEAgLTE4LDcgKzE4LDYgQEAKIC5nbG9iYWwgX3N0YXJ0CiAKIC5nbG9iYWwgX3JhbWJhc2UKLS5nbG9iYWwgX19yYW12ZWMKIC5nbG9iYWwgX3JhbXZlYwogLmdsb2JhbCBfcmFtc3RhcnQKIC5nbG9iYWwgX3JhbWVuZApAQCAtMjYsNiArMjUsOCBAQAogLmdsb2JhbCBfcXVpY2NfYmFzZQogLmdsb2JhbCBfcGVyaXBoX2Jhc2UKIAorI2RlZmluZQlSQU1FTkQgICAgICAgICAgICAgICAgICAgICAgKENPTkZJR19SQU1CQVNFICsgQ09ORklHX1JBTVNJWkUpCisKICNkZWZpbmUgUkVHQiAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMAogI2RlZmluZSBQRVBBUiAgICAgICAgICAgICAgICAgICAgICAgKF9kcHJiYXNlICsgUkVHQiArIDB4MDAxNikKICNkZWZpbmUgR01SICAgICAgICAgICAgICAgICAgICAgICAgIChfZHByYmFzZSArIFJFR0IgKyAweDAwNDApCkBAIC0xMTUsNyArMTE2LDcgQEAKIAlub3AKIAlvcmkudwkjTUNVX0RJU0FCTEVfSU5UUlBUUywgJX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xvbmcgICBfX3JhbWVuZAkvKiBSZXNldDogSW5pdGlhbCBTdGFjayBQb2ludGVyICAgICAgICAgICAgICAgICAtIDAuICAqLworICAgIC5sb25nICAgUkFNRU5ECS8qIFJlc2V0OiBJbml0aWFsIFN0YWNrIFBvaW50ZXIgICAgICAgICAgICAgICAgIC0gMC4gICovCiAgICAgLmxvbmcgICBfc3RhcnQgICAgICAvKiBSZXNldDogSW5pdGlhbCBQcm9ncmFtIENvdW50ZXIgICAgICAgICAgICAgICAtIDEuICAqLwogICAgIC5sb25nICAgYnVzZXJyICAgICAgLyogQnVzIEVycm9yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSAyLiAgKi8KICAgICAubG9uZyAgIHRyYXAgICAgICAgIC8qIEFkZHJlc3MgRXJyb3IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0gMy4gICovCmRpZmYgLS1naXQgYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82ODM2MC9pbnRzLmMgYi9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82ODM2MC9pbnRzLmMKaW5kZXggYmExODRkYi4uMDI0NWZjNCAxMDA2NDQKLS0tIGEvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNjgzNjAvaW50cy5jCisrKyBiL2FyY2gvbTY4a25vbW11L3BsYXRmb3JtLzY4MzYwL2ludHMuYwpAQCAtMjAsNiArMjAsNyBAQAogCiAjaW5jbHVkZSA8YXNtL3N5c3RlbS5oPgogI2luY2x1ZGUgPGFzbS9pcnEuaD4KKyNpbmNsdWRlIDxhc20vaXJxbm9kZS5oPgogI2luY2x1ZGUgPGFzbS90cmFwcy5oPgogI2luY2x1ZGUgPGFzbS9pby5oPgogI2luY2x1ZGUgPGFzbS9tYWNoZGVwLmg+CmRpZmYgLS1naXQgYS9hcmNoL202OGtub21tdS9wbGF0Zm9ybS82OEVaMzI4L2NvbmZpZy5jIGIvYXJjaC9tNjhrbm9tbXUvcGxhdGZvcm0vNjhF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BDT05GSUdfU0s5OExJTiBpcyBub3Qgc2V0CisjIENPTkZJR19WSUFfVkVMT0NJVFkgaXMgbm90IHNldAorIyBDT05GSUdfVElHT04zIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JOWDIgaXMgbm90IHNldAorQ09ORklHX1RTSTEwOF9FVEg9eQorCisjCisjIEV0aGVybmV0ICgxMDAwMCBNYml0KQorIworIyBDT05GSUdfQ0hFTFNJT19UMSBpcyBub3Qgc2V0CisjIENPTkZJR19JWEdCIGlzIG5vdCBzZXQKKyMgQ09ORklHX1MySU8gaXMgbm90IHNldAorCisjCisjIFRva2VuIFJpbmcgZGV2aWNlcworIworIyBDT05GSUdfVFIgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBXYW4gaW50ZXJmYWNlcworIworIyBDT05GSUdfV0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZEREkgaXMgbm90IHNldAorIyBDT05GSUdfSElQUEkgaXMgbm90IHNldAorIyBDT05GSUdfUFBQIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NMSVAgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX0ZDIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NIQVBFUiBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRDT05TT0xFIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVFBPTEwgaXMgbm90IHNldAorIyBDT05GSUdfTkVUX1BPTExfQ09OVFJPTExFUiBpcyBub3Qgc2V0CisKKyMKKyMgSVNETiBzdWJzeXN0ZW0KKyMKKyMgQ09ORklHX0lTRE4gaXMgbm90IHNldAorCisjCisjIFRlbGVwaG9ueSBTdXBwb3J0CisjCisjIENPTkZJR19QSE9ORSBpcyBub3Qgc2V0CisKKyMKKyMgSW5wdXQgZGV2aWNlIHN1cHBvcnQKKyMKK0NPTkZJR19JTlBVVD15C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IHBvcnQgc3VwcG9ydAorIworQ09ORklHX1NFUklBTF9DT1JFPXkKK0NPTkZJR19TRVJJQUxfQ09SRV9DT05TT0xFPXkKKyMgQ09ORklHX1NFUklBTF9KU00gaXMgbm90IHNldAorQ09ORklHX1VOSVg5OF9QVFlTPXkKK0NPTkZJR19MRUdBQ1lfUFRZUz15CitDT05GSUdfTEVHQUNZX1BUWV9DT1VOVD0yNTYKKworIworIyBJUE1JCisjCisjIENPTkZJR19JUE1JX0hBTkRMRVIgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIENhcmRzCisjCisjIENPTkZJR19XQVRDSERPRyBpcyBub3Qgc2V0CisjIENPTkZJR19OVlJBTSBpcyBub3Qgc2V0CitDT05GSUdfR0VOX1JUQz15CisjIENPTkZJR19HRU5fUlRDX1ggaXMgbm90IHNldAorIyBDT05GSUdfRFRMSyBpcyBub3Qgc2V0CisjIENPTkZJR19SMzk2NCBpcyBub3Qgc2V0CisjIENPTkZJR19BUFBMSUNPTSBpcyBub3Qgc2V0CisKKyMKKyMgRnRhcGUsIHRoZSBmbG9wcHkgdGFwZSBkZXZpY2UgZHJpdmVyCisjCisjIENPTkZJR19BR1AgaXMgbm90IHNldAorIyBDT05GSUdfRFJNIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JBV19EUklWRVIgaXMgbm90IHNldAorCisjCisjIFRQTSBkZXZpY2VzCisjCisjIENPTkZJR19UQ0dfVFBNIGlzIG5vdCBzZXQKKyMgQ09ORklHX1RFTENMT0NLIGlzIG5vdCBzZXQKKworIworIyBJMkMgc3VwcG9ydAorIworIyBDT05GSUdfSTJDIGlzIG5vdCBzZXQKKworIworIyBTUEkgc3VwcG9ydAorIworIyBDT05GSUdfU1BJIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NQSV9NQVNURVIgaXMgbm90IHNldAorCisjCisjIERhbGxhcydzIDEtd2lyZSBidXMKKyMKKyMgQ09ORklHX1cxIGlzIG5vdCBzZXQKKworIworIyBIYXJkd2FyZSBNb25pdG9yaW5nIHN1cHBvcnQKKyMKK0NPTkZJR19IV01PTj15CisjIENPTkZJR19IV01PTl9WSUQgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19GNzE4MDVGIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hXTU9OX0RFQlVHX0NISVAgaXMgbm90IHNldAorCisjCisjIE1pc2MgZGV2aWNlcworIworCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJyb2FkY2FzdGluZyBEZXZpY2VzCisjCisjIENPTkZJR19EVkIgaXMgbm90IHNldAorCisjCisjIEdyYXBoaWNzIHN1cHBvcnQKKyMKKyMgQ09ORklHX0ZCIGlzIG5vdCBzZXQKKworIworIyBTb3VuZAorIworIyBDT05GSUdfU09VTkQgaXMgbm90IHNldAorCisjCisjIFVTQiBzdXBwb3J0CisjCitDT05GSUdfVVNCX0FSQ0hfSEFTX0hDRD15CitDT05GSUdfVVNCX0FSQ0hfSEFTX09IQ0k9eQorQ09ORklHX1VTQl9BUkNIX0hBU19FSENJPXkKKyMgQ09ORklHX1VTQiBpcyBub3Qgc2V0CisKKyMKKyMgTk9URTogVVNCX1NUT1JBR0UgZW5hYmxlcyBTQ1NJLCBhbmQgJ1NDU0kgZGlzayBzdXBwb3J0JworIworCisjCisjIFVTQiBHYWRnZXQgU3VwcG9ydAorIworIyBDT05GSUdfVVNCX0dBREdFVCBpcyBub3Qgc2V0CisKKyMKKyMgTU1DL1NEIENhcmQgc3VwcG9ydAorIworIyBDT05GSUdfTU1DIGlzIG5vdCBzZXQKKworIworIyBMRUQgZGV2aWNlcworIworIyBDT05GSUdfTkVXX0xFRFMgaXMgbm90IHNldAorCisjCisjIExFRCBkcml2ZXJzCisjCisKKyMKKyMgTEVEIFRyaWdnZXJzCisjCisKKyMKKyMgSW5maW5pQmFuZCBzdXBwb3J0CisjCisjIENPTkZJR19J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yxTUFJOX0hJRDQKIAlybGRpbWkJcjMscjAsNDAsMjMJLyogY2xlYXIgYml0IDIzIChybV9jaSkgKi8KZGlmZiAtLWdpdCBhL2FyY2gvcG93ZXJwYy9rZXJuZWwvY3B1dGFibGUuYyBiL2FyY2gvcG93ZXJwYy9rZXJuZWwvY3B1dGFibGUuYwppbmRleCAxYzExNDg4Li5hYmY3ZDQyIDEwMDY0NAotLS0gYS9hcmNoL3Bvd2VycGMva2VybmVsL2NwdXRhYmxlLmMKKysrIGIvYXJjaC9wb3dlcnBjL2tlcm5lbC9jcHV0YWJsZS5jCkBAIC03MjIsMTggKzcyMiw2IEBACiAJCS5vcHJvZmlsZV90eXBlCQk9IFBQQ19PUFJPRklMRV9HNCwKIAkJLnBsYXRmb3JtCQk9ICJwcGM3NDUwIiwKIAl9LAotICAgICAgICB7ICAgICAgIC8qIDg2NDEgKi8KLSAgICAgICAgICAgICAgIC5wdnJfbWFzayAgICAgICAgICAgICAgID0gMHhmZmZmZmZmZiwKLSAgICAgICAgICAgICAgIC5wdnJfdmFsdWUgICAgICAgICAgICAgID0gMHg4MDA0MDAxMCwKLSAgICAgICAgICAgICAgIC5jcHVfbmFtZSAgICAgICAgICAgICAgID0gIjg2NDEiLAotICAgICAgICAgICAgICAgLmNwdV9mZWF0dXJlcyAgICAgICAgICAgPSBDUFVfRlRSU183NDQ3QSwKLSAgICAgICAgICAgICAgIC5jcHVfdXNlcl9mZWF0dXJlcyAgICAgID0gQ09NTU9OX1VTRVIgfCBQUENfRkVBVFVSRV9IQVNfQUxUSVZFQ19DT01QLAotICAgICAgICAgICAgICAgLmljYWNoZV9ic2l6ZSAgICAgICAgICAgPSAzMiwKLSAgICAgICAgICAgICAgIC5kY2FjaGVfYnNpemUgICAgICAgICAgID0gMzIsCi0gICAgICAgICAgICAgICAubnVtX3BtY3MgICAgICAgICAgICAgICA9IDYsCi0gICAgICAgICAgICAgICAuY3B1X3NldHVwICAgICAgICAgICAgICA9IF9fc2V0dXBfY3B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JU1lOQ182NAorCWJscgorCitfR0xPQkFMKF9pbnN3KQorCWNtcHdpCTAscjUsMAorCW10Y3RyCXI1CisJc3ViaQlyNCxyNCwyCisJYmxlbHItCiswMDoJbGhicngJcjUsMCxyMworCWVpZWlvCisJc3RodQlyNSwyKHI0KQorCWJkbnoJMDBiCisJSU5fU1lOQworCWJscgorCitfR0xPQkFMKF9vdXRzdykKKwljbXB3aQkwLHI1LDAKKwltdGN0cglyNQorCXN1YmkJcjQscjQsMgorCWJsZWxyLQorMDA6CWxoenUJcjUsMihyNCkKKwlFSUVJT18zMgorCXN0aGJyeAlyNSwwLHIzCisJYmRuegkwMGIKKwlTWU5DXzY0CisJYmxyCisKK19HTE9CQUwoX2luc2wpCisJY21wd2kJMCxyNSwwCisJbXRjdHIJcjUKKwlzdWJpCXI0LHI0LDQKKwlibGVsci0KKzAwOglsd2JyeAlyNSwwLHIzCisJZWllaW8KKwlzdHd1CXI1LDQocjQpCisJYmRuegkwMGIKKwlJTl9TWU5DCisJYmxyCisKK19HTE9CQUwoX291dHNsKQorCWNtcHdpCTAscjUsMAorCW10Y3RyCXI1CisJc3ViaQlyNCxyNCw0CisJYmxlbHItCiswMDoJbHd6dQlyNSw0KHI0KQorCXN0d2JyeAlyNSwwLHIzCisJRUlFSU9fMzIKKwliZG56CTAwYgorCVNZTkNfNjQKKwlibHIKKworI2lmZGVmIENPTkZJR19QUEMzMgorX0dMT0JBTChfX2lkZV9tbV9pbnN3KQorI2VuZGlmCitfR0xPQkFMKF9pbnN3X25zKQorCWNtcHdpCTAscjUsMAorCW10Y3RyCXI1CisJc3ViaQlyNCxyNCwyCisJYmxlbHItCiswMDoJbGh6CXI1LDAocjMpCisJZWllaW8KKwlzdGh1CXI1LDIocjQpCisJYmRuegkwMGIKKwlJTl9TWU5DCisJYmxyCisKKyNpZmRlZiBDT05GSUdfUFBDMzIKK19HTE9CQUwoX19pZGVfbW1fb3V0c3cpCisjZW5kaWYKK19HTE9CQUwoX291dHN3X25zKQor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yogU01CIGludGVycnVwdDogUElSUUggKi8KKwlwY2lfd3JpdGVfY29uZmlnX2J5dGUoZGV2LCAweDhlLCAweDBmKTsKKworCS8qIFBNVSBBQ1BJIFNDSSBpbnRlcnJ1cHQ6IFBJUlFIICovCisJcGNpX3dyaXRlX2NvbmZpZ19ieXRlKGRldiwgMHg4ZiwgMHgwZik7CisKKwkvKiBQcmltYXJ5IFBBVEEgSURFIElSUTogMTQKKwkgKiBTZWNvbmRhcnkgUEFUQSBJREUgSVJROiAxNQorCSAqLworCXBjaV93cml0ZV9jb25maWdfYnl0ZShkZXYsIDB4NDQsIDB4M2QpOworCXBjaV93cml0ZV9jb25maWdfYnl0ZShkZXYsIDB4NzUsIDB4MGYpOworCisJLyogU2V0IElSUTE0IGFuZCBJUlExNSB0byBsZWdhY3kgSVJRcyAqLworCXBjaV9yZWFkX2NvbmZpZ193b3JkKGRldiwgMHg0NiwgJnRlbXApOworCXRlbXAgfD0gMHhjMDAwOworCXBjaV93cml0ZV9jb25maWdfd29yZChkZXYsIDB4NDYsIHRlbXApOworCisJLyogU2V0IGk4MjU5IGludGVycnVwdCB0cmlnZ2VyCisJICogSVJRIDM6ICBMZXZlbAorCSAqIElSUSA0OiAgTGV2ZWwKKwkgKiBJUlEgNTogIExldmVsCisJICogSVJRIDY6ICBMZXZlbAorCSAqIElSUSA3OiAgTGV2ZWwKKwkgKiBJUlEgOTogIExldmVsCisJICogSVJRIDEwOiBMZXZlbAorCSAqIElSUSAxMTogTGV2ZWwKKwkgKiBJUlEgMTI6IExldmVsCisJICogSVJRIDE0OiBFZGdlCisJICogSVJRIDE1OiBFZGdlCisJICovCisJb3V0YigweGZhLCAweDRkMCk7CisJb3V0YigweDFlLCAweDRkMSk7CiB9CisKK3N0YXRpYyB2b2lkIF9fZGV2aW5pdCBxdWlya191bGk1Mjg4KHN0cnVjdCBwY2lfZGV2ICpkZXYpCit7CisJdW5zaWduZWQgY2hhciBjOworCisJcGNpX3JlYWRfY29uZmlnX2J5d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l3aGlsZSAoKGNudCA8IGxlbikgJiYKKwkJICAgICAgICgocHRyW2NudF0gPD0gMzIpIHx8CisJCQkocHRyW2NudF0gPj0gMTI3KSkpIGNudCsrOworCQlwdHIgKz0gY250OworCQlsZW4gLT0gY250OworCQltb2RlID0gMDsKKwkJaWYgKCgqcHRyID09ICctJykgfHwgKCpwdHIgPT0gJysnKSkgeworCQkJbW9kZSA9ICgqcHRyID09ICctJykgPyAtMSA6IDE7CisJCQlwdHIrKzsKKwkJCWxlbi0tOworCQl9CisJCWNudCA9IDA7CisJCXdoaWxlIChjbnQgPCBsZW4pIHsKKwkJCWlmIChwdHJbY250XSA8PSAzMikgYnJlYWs7CisJCQlpZiAocHRyW2NudF0gPj0gMTI3KSBicmVhazsKKwkJCWNudCsrOworCQl9CisJCWlmICghY250KSBicmVhazsKKwkJaWYgKHBhcnNlX210b2tlbihwdHIsY250LCZrdixuYW1lcyx2YWxpZF9iaXRzKSkgeworCQkJcmV0ID0gLUVJTlZBTDsKKwkJCWJyZWFrOworCQl9CisJCXB0ciArPSBjbnQ7CisJCWxlbiAtPSBjbnQ7CisJCXN3aXRjaCAobW9kZSkgeworCQljYXNlIDA6CisJCQltYXNrID0gdmFsaWRfYml0czsKKwkJCXZhbCB8PSBrdjsKKwkJCWJyZWFrOworCQljYXNlIC0xOgorCQkJbWFzayB8PSBrdjsKKwkJCXZhbCAmPSB+a3Y7CisJCQlicmVhazsKKwkJY2FzZSAxOgorCQkJbWFzayB8PSBrdjsKKwkJCXZhbCB8PSBrdjsKKwkJCWJyZWFrOworCQlkZWZhdWx0OgorCQkJYnJlYWs7CisJCX0KKwl9CisJKm1hc2twdHIgPSBtYXNrOworCSp2YWxwdHIgPSB2YWw7CisJcmV0dXJuIHJldDsKK30KKworCisvKiBDb252ZXJ0IGEgc3ltYm9saWMgdmFsdWUgdG8gYSBtYXNrL3ZhbHVlIHBhaXIgKi8KK2ludCBwdnIyX2N0cmxfc3ltX3RvX3ZhbHVlKHN0cnVjdC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BpbnQgY291bnQpCit7CisJdW5zaWduZWQgaW50IHNjbnQ7CisJY2hhciBjaDsKKworCWZvciAoc2NudCA9IDA7IHNjbnQgPCBjb3VudDsgc2NudCsrKSB7CisJCWNoID0gYnVmW3NjbnRdOworCQlpZiAoY2ggPT0gJyAnKSBicmVhazsKKwkJaWYgKGNoID09ICdcdCcpIGJyZWFrOworCQlpZiAoY2ggPT0gJ1xuJykgYnJlYWs7CisJfQorCXJldHVybiBzY250OworfQorCisKK3N0YXRpYyB1bnNpZ25lZCBpbnQgZGVidWdpZmNfaXNvbGF0ZV93b3JkKGNvbnN0IGNoYXIgKmJ1Zix1bnNpZ25lZCBpbnQgY291bnQsCisJCQkJCSAgY29uc3QgY2hhciAqKndzdHJQdHIsCisJCQkJCSAgdW5zaWduZWQgaW50ICp3bGVuUHRyKQoreworCWNvbnN0IGNoYXIgKndwdHI7CisJdW5zaWduZWQgaW50IGNvbnN1bWVfY250ID0gMDsKKwl1bnNpZ25lZCBpbnQgd2xlbjsKKwl1bnNpZ25lZCBpbnQgc2NudDsKKworCXdwdHIgPSAwOworCXdsZW4gPSAwOworCXNjbnQgPSBkZWJ1Z2lmY19jb3VudF93aGl0ZXNwYWNlKGJ1Zixjb3VudCk7CisJY29uc3VtZV9jbnQgKz0gc2NudDsgY291bnQgLT0gc2NudDsgYnVmICs9IHNjbnQ7CisJaWYgKCFjb3VudCkgZ290byBkb25lOworCisJc2NudCA9IGRlYnVnaWZjX2NvdW50X25vbndoaXRlc3BhY2UoYnVmLGNvdW50KTsKKwlpZiAoIXNjbnQpIGdvdG8gZG9uZTsKKwl3cHRyID0gYnVmOworCXdsZW4gPSBzY250OworCWNvbnN1bWVfY250ICs9IHNjbnQ7IGNvdW50IC09IHNjbnQ7IGJ1ZiArPSBzY250OworCisgZG9uZToKKwkqd3N0clB0ciA9IHdwdHI7CisJKndsZW5QdHIgPSB3bGVuOworCXJldHVybiBjb25zdW1lX2NudDsKK30KKworCitzdGF0aWMgaW50IGRlYnV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YmNudCArPSBjY250OyBhY250IC09IGNjbnQ7IGJ1ZiArPSBjY250OworCisJZ3Bpb19kaXIgPSAwOyBncGlvX2luID0gMDsgZ3Bpb19vdXQgPSAwOworCXB2cjJfaGR3X2dwaW9fZ2V0X2RpcihoZHcsJmdwaW9fZGlyKTsKKwlwdnIyX2hkd19ncGlvX2dldF9vdXQoaGR3LCZncGlvX291dCk7CisJcHZyMl9oZHdfZ3Bpb19nZXRfaW4oaGR3LCZncGlvX2luKTsKKwljY250ID0gc2NucHJpbnRmKGJ1ZixhY250LCJHUElPIHN0YXRlOiBkaXI9MHgleCBpbj0weCV4IG91dD0weCV4XG4iLAorCQkJIGdwaW9fZGlyLGdwaW9faW4sZ3Bpb19vdXQpOworCWJjbnQgKz0gY2NudDsgYWNudCAtPSBjY250OyBidWYgKz0gY2NudDsKKworCWNjbnQgPSBzY25wcmludGYoYnVmLGFjbnQsIlN0cmVhbWluZyBpcyAlc1xuIiwKKwkJCSBwdnIyX2hkd19nZXRfc3RyZWFtaW5nKGhkdykgPyAib24iIDogIm9mZiIpOworCWJjbnQgKz0gY2NudDsgYWNudCAtPSBjY250OyBidWYgKz0gY2NudDsKKworCW1zayA9IHB2cjJfaGR3X3N1YnN5c19nZXQoaGR3KTsKKwljY250ID0gc2NucHJpbnRmKGJ1ZixhY250LCJTdWJzeXN0ZW1zIGVuYWJsZWQgLyBjb25maWd1cmVkOiAiKTsKKwliY250ICs9IGNjbnQ7IGFjbnQgLT0gY2NudDsgYnVmICs9IGNjbnQ7CisJY2NudCA9IGRlYnVnaWZjX3ByaW50X21hc2soYnVmLGFjbnQsbXNrLG1zayk7CisJYmNudCArPSBjY250OyBhY250IC09IGNjbnQ7IGJ1ZiArPSBjY250OworCWNjbnQgPSBzY25wcmludGYoYnVmLGFjbnQsIlxuIik7CisJYmNudCArPSBjY250OyBhY250IC09IGNjbnQ7IGJ1ZiArPSBjY250OworCWNjbnQgPSBzY25wcmludGYoYnVmLGFjbnQsIlN1YnN5c3Rl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lcCIsY3ApOworCWlmIChjcC0+c3luY19rZXlfcHRyKSB7CisJCWtmcmVlKGNwLT5zeW5jX2tleV9wdHIpOworCQljcC0+c3luY19rZXlfcHRyID0gMDsKKwl9CisJa2ZyZWUoY3ApOworfQorCit2b2lkIHB2cjJfaW9yZWFkX3NldF9zeW5jX2tleShzdHJ1Y3QgcHZyMl9pb3JlYWQgKmNwLAorCQkJICAgICAgY29uc3QgY2hhciAqc3luY19rZXlfcHRyLAorCQkJICAgICAgdW5zaWduZWQgaW50IHN5bmNfa2V5X2xlbikKK3sKKwlpZiAoIWNwKSByZXR1cm47CisKKwlpZiAoIXN5bmNfa2V5X3B0cikgc3luY19rZXlfbGVuID0gMDsKKwlpZiAoKHN5bmNfa2V5X2xlbiA9PSBjcC0+c3luY19rZXlfbGVuKSAmJgorCSAgICAoKCFzeW5jX2tleV9sZW4pIHx8CisJICAgICAoIW1lbWNtcChzeW5jX2tleV9wdHIsY3AtPnN5bmNfa2V5X3B0cixzeW5jX2tleV9sZW4pKSkpIHJldHVybjsKKworCWlmIChzeW5jX2tleV9sZW4gIT0gY3AtPnN5bmNfa2V5X2xlbikgeworCQlpZiAoY3AtPnN5bmNfa2V5X3B0cikgeworCQkJa2ZyZWUoY3AtPnN5bmNfa2V5X3B0cik7CisJCQljcC0+c3luY19rZXlfcHRyID0gMDsKKwkJfQorCQljcC0+c3luY19rZXlfbGVuID0gMDsKKwkJaWYgKHN5bmNfa2V5X2xlbikgeworCQkJY3AtPnN5bmNfa2V5X3B0ciA9IGttYWxsb2Moc3luY19rZXlfbGVuLEdGUF9LRVJORUwpOworCQkJaWYgKGNwLT5zeW5jX2tleV9wdHIpIHsKKwkJCQljcC0+c3luY19rZXlfbGVuID0gc3luY19rZXlfbGVuOworCQkJfQorCQl9CisJfQorCWlmICghY3AtPnN5bmNfa2V5X2xlbikgcmV0dXJuOworCW1lbWNweShjcC0+c3luY19rZXlfcHRyLHN5bmNfa2V5X3B0cixjcC0+c3luY19rZXlfbGVu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YW1lID0gInR5cGUiOworCWNpcC0+YXR0cl90eXBlLmF0dHIubW9kZSA9IFNfSVJVR087CisJY2lwLT5hdHRyX3R5cGUuc2hvdyA9IGZwLT5zaG93X3R5cGU7CisKKwljaXAtPmF0dHJfbWluLmF0dHIub3duZXIgPSBUSElTX01PRFVMRTsKKwljaXAtPmF0dHJfbWluLmF0dHIubmFtZSA9ICJtaW5fdmFsIjsKKwljaXAtPmF0dHJfbWluLmF0dHIubW9kZSA9IFNfSVJVR087CisJY2lwLT5hdHRyX21pbi5zaG93ID0gZnAtPnNob3dfbWluOworCisJY2lwLT5hdHRyX21heC5hdHRyLm93bmVyID0gVEhJU19NT0RVTEU7CisJY2lwLT5hdHRyX21heC5hdHRyLm5hbWUgPSAibWF4X3ZhbCI7CisJY2lwLT5hdHRyX21heC5hdHRyLm1vZGUgPSBTX0lSVUdPOworCWNpcC0+YXR0cl9tYXguc2hvdyA9IGZwLT5zaG93X21heDsKKworCWNpcC0+YXR0cl92YWwuYXR0ci5vd25lciA9IFRISVNfTU9EVUxFOworCWNpcC0+YXR0cl92YWwuYXR0ci5uYW1lID0gImN1cl92YWwiOworCWNpcC0+YXR0cl92YWwuYXR0ci5tb2RlID0gU19JUlVHTzsKKworCWNpcC0+YXR0cl9jdXN0b20uYXR0ci5vd25lciA9IFRISVNfTU9EVUxFOworCWNpcC0+YXR0cl9jdXN0b20uYXR0ci5uYW1lID0gImN1c3RvbV92YWwiOworCWNpcC0+YXR0cl9jdXN0b20uYXR0ci5tb2RlID0gU19JUlVHTzsKKworCWNpcC0+YXR0cl9lbnVtLmF0dHIub3duZXIgPSBUSElTX01PRFVMRTsKKwljaXAtPmF0dHJfZW51bS5hdHRyLm5hbWUgPSAiZW51bV92YWwiOworCWNpcC0+YXR0cl9lbnVtLmF0dHIubW9kZSA9IFNfSVJVR087CisJY2lwLT5hdHRyX2VudW0uc2hvdyA9IGZwLT5zaG93X2VudW07CisKKwljaXAtPmF0dHJfYml0cy5hdHRyLm93bmVy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x4XG4iLAorICAgICAgICBwcmludGsoS0VSTl9ERUJVRyAicG1jNTUxOiAlZCVjICgweCV4KSBvZiAlc3ByZWZldGNoYWJsZSBtZW1vcnkgYXQgMHglbGx4XG4iLAogCSAgICAgICAoc2l6ZTwxMDI0KT9zaXplOihzaXplPDEwNDg1NzYpP3NpemU+PjEwOnNpemU+PjIwLAogICAgICAgICAgICAgICAgKHNpemU8MTAyNCk/J0InOihzaXplPDEwNDg1NzYpPydLJzonTScsCiAJICAgICAgIHNpemUsICgoZGNtZCYoMHgxPDwzKSkgPT0gMCk/Im5vbi0iOiIiLAotICAgICAgICAgICAgICAgKGRldi0+cmVzb3VyY2VbMF0uc3RhcnQpJlBDSV9CQVNFX0FERFJFU1NfTUVNX01BU0sgKTsKKyAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nIGxvbmcpKChkZXYtPnJlc291cmNlWzBdLnN0YXJ0KSZQQ0lfQkFTRV9BRERSRVNTX01FTV9NQVNLKSk7CiAKICAgICAgICAgLyoKICAgICAgICAgICogQ2hlY2sgdG8gc2VlIHRoZSBzdGF0ZSBvZiB0aGUgbWVtb3J5CkBAIC02ODUsOCArNjg1LDggQEAKICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgIH0KIAotICAgICAgICAgICAgICAgIHByaW50ayhLRVJOX05PVElDRSAicG1jNTUxOiBGb3VuZCBQQ0kgVjM3MFBEQyBhdCAweCVsWFxuIiwKLQkJCQkgICAgUENJX0RldmljZS0+cmVzb3VyY2VbMF0uc3RhcnQpOworICAgICAgICAgICAgICAgIHByaW50ayhLRVJOX05PVElDRSAicG1jNTUxOiBGb3VuZCBQQ0kgVjM3MFBEQyBhdCAweCVsbHhcbiIsCisJCQkJICAgICh1bnNpZ25lZCBsb25nIGxvbmcpUENJX0RldmljZS0+cmVzb3VyY2VbMF0uc3RhcnQpOwogCiAgICAgICAgICAgICAgICAgLyoKICAgICAgICAgICAgICAgICAgKiBUaGUgUE1D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KioqKioqKioqKioqKioqKioqKioqKioKICAqIFNFQ1RJT04gRVJQIEVYQU1JTkFUSU9OCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqLwogCiAvKgotICogREFTRF8zOTkwX0VSUF9FWEFNSU5FXzI0IAorICogREFTRF8zOTkwX0VSUF9FWEFNSU5FXzI0CiAgKgogICogREVTQ1JJUFRJT04KLSAqICAgQ2hlY2tzIG9ubHkgZm9yIGZhdGFsICh1bnJlY292ZXJhYmxlKSBlcnJvci4gCisgKiAgIENoZWNrcyBvbmx5IGZvciBmYXRhbCAodW5yZWNvdmVyYWJsZSkgZXJyb3IuCiAgKiAgIEEgZGV0YWlsZWQgZXhhbWluYXRpb24gb2YgdGhlIHNlbnNlIGRhdGEgaXMgZG9uZSBsYXRlciBvdXRzaWRlCiAgKiAgIHRoZSBpbnRlcnJ1cHQgaGFuZGxlci4KICAqCiAgKiAgIEVhY2ggYml0IGNvbmZpZ3VyYXRpb24gbGVhZGluZyB0byBhbiBhY3Rpb24gY29kZSAyIChFeGl0IHdpdGgKICAqICAgcHJvZ3JhbW1pbmcgZXJyb3Igb3IgdW51c3VhbCBjb25kaXRpb24gaW5kaWNhdGlvbikKICAqICAgYXJlIGhhbmRsZWQgYXMgZmF0YWwgZXJyb3K0cy4KLSAqIAorICoKICAqICAgQWxsIG90aGVyIGNvbmZpZ3VyYXRpb25zIGFyZSBoYW5kbGVkIGFzIHJlY292ZXJhYmxlIGVycm9ycy4KICAqCiAgKiBSRVRVUk4gVkFMVUVTCkBAIC05MywxNSArOTMsMTUgQEAKIH0JCQkJLyogRU5EIGRhc2RfMzk5MF9lcnBfZXhhbWluZV8yNCAqLwogCiAvKgotICogREFTRF8zOTkwX0VSUF9FWEFNS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y4gRXJyb3IgUmVjb3ZlcnkgUHJvY2VkdXJlcycuCiAgKgogICogUkVUVVJOIFZBTFVFUwotICogICBkYXNkX2VyYV9ub25lCW5vIGVycm9yIAorICogICBkYXNkX2VyYV9ub25lCW5vIGVycm9yCiAgKiAgIGRhc2RfZXJhX2ZhdGFsCWZvciBhbGwgZmF0YWwgKHVucmVjb3ZlcmFibGUgZXJyb3JzKQogICogICBkYXNkX2VyYV9yZWNvdmVyCWZvciBhbGwgb3RoZXJzLgogICovCkBAIC0xNzgsMTggKzE3OCwxOCBAQAogfQkJCQkvKiBFTkQgZGFzZF8zOTkwX2VycF9leGFtaW5lICovCiAKIC8qCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFNFQ1RJT04gRVJQIEhBTkRMSU5HCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqLwogLyoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogMjQgYW5kIDMyIGJ5dGUgc2Vuc2UgRVJQIGZ1bmN0aW9ucwotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAorICoqKioqKioqKioqKioqKioq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QkJLyogbm8gc3RhdGUgY2hhbmdlIHBlbmRpbmcgLSByZXRyeSAqLwotCQkJREVWX01FU1NBR0UgKEtFUk5fSU5GTywgZGV2aWNlLCAKKwkJCURFVl9NRVNTQUdFIChLRVJOX0lORk8sIGRldmljZSwKIAkJCQkgICAgICJyZWRyaXZpbmcgcmVxdWVzdCBpbW1lZGlhdGVseSwgIgotCQkJCSAgICAgIiVkIHJldHJpZXMgbGVmdCIsIAorCQkJCSAgICAgIiVkIHJldHJpZXMgbGVmdCIsCiAJCQkJICAgICBlcnAtPnJldHJpZXMpOwogCQkJZXJwLT5zdGF0dXMgPSBEQVNEX0NRUl9RVUVVRUQ7CiAJCX0KQEAgLTQ4MiwxMyArNDgyLDEzIEBACiB9CQkJCS8qIGVuZCBkYXNkXzM5OTBfZXJwX2FjdGlvbl80ICovCiAKIC8qCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIDI0IGJ5dGUgc2Vuc2UgRVJQIGZ1bmN0aW9ucyAob25seSkKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICovCiAKIC8qCi0gKiBEQVNEXzM5OTBfRVJQX0FDVElPTl81IAorICogREFTRF8zOTkwX0VSUF9BQ1RJT05fNQogICoKICAqIERFU0NSSVBUSU9OCiAgKiAgIFNldHVwIEVSUCB0byBkbyB0aGUgRVJQIGFjdGlvbiA1IChzZWUgUmVmZXJlbmNlIG1hbnVhbCkuCkBAIC01MjMsNyArNTIzLDcgQEAKIC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ogCiAvKgotICogREFTRF8zOTkwX0VSUF9JTlNQRUNUXzI0IAorICogREFTRF8zOTkwX0VSUF9JTlNQRUNUXzI0CiAgKgogICogREVTQ1JJUFRJT04KICAqICAgRG9lcyBhIGRldGFpbGVkIGluc3BlY3Rpb24gb2YgdGhlIDI0IGJ5dGUgc2Vuc2UgZGF0YQotICogICBhbmQgc2V0cyB1cCBhIHJlbGF0ZWQgZXJyb3IgcmVjb3ZlcnkgYWN0aW9uLiAgCisgKiAgIGFuZCBzZXRzIHVwIGEgcmVsYXRlZCBlcnJvciByZWNvdmVyeSBhY3Rpb24uCiAgKgogICogUEFSQU1FVEVSCiAgKiAgIHNlbnNlCQlzZW5zZSBkYXRhIG9mIHRoZSBhY3R1YWwgZXJyb3IKQEAgLTE2MDIsMTMgKzE2MDIsMTMgQEAKIH0JCQkJLyogRU5EIGRhc2RfMzk5MF9lcnBfaW5zcGVjdF8yNCAqLwogCiAvKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiAzMiBieXRlIHNlbnNlIEVSUCBmdW5jdGlvbnMgKG9ubHkpCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqLwogCiAvKgotICogREFTRF8zOTkwX0VSUEFDVElPTl8xMF8zMiAKKyAqIERBU0RfMzk5MF9FUlBBQ1RJT05fMTBfMzIKICAqCiAgKiBERVNDUklQVElPTgogICogICBIYW5kbGVzIDMyIGJ5dGUgJ0FjdGlvbiAxMCcgb2YgU2luZ2xlI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ZF8zOTkwX2VycF9pbnNwZWN0XzMyICovCiAKIC8qCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIG1haW4gRVJQIGNvbnRyb2wgZnVjdGlvbnMgKDI0IGFuZCAzMiBieXRlIHNlbnNlKQotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKi8KIAogLyoKQEAgLTIyNDMsNyArMjI0Myw3IEBACiAgKiBQQVJBTUVURVIKICAqICAgZXJwCQlwb2ludGVyIHRvIHRoZSBjdXJyZW50bHkgY3JlYXRlZCBkZWZhdWx0IEVSUAogICogUkVUVVJOIFZBTFVFUwotICogICBlcnBfbmV3CQljb250ZW5zIHdhcyBwb3NzaWJseSBtb2RpZmllZCAKKyAqICAgZXJwX25ldwkJY29udGVucyB3YXMgcG9zc2libHkgbW9kaWZpZWQKICAqLwogc3RhdGljIHN0cnVjdCBkYXNkX2Njd19yZXEgKgogZGFzZF8zOTkwX2VycF9pbnNwZWN0KHN0cnVjdCBkYXNkX2Njd19yZXEgKiBlcnApCkBAIC0yMjcyLDE0ICsyMjcyLDE0IEBACiAKIC8qCiAgKiBEQVNEXzM5OTBfRVJQX0FERF9FUlAKLSAqIAorICoKICAqIERFU0NSSVBUSU9OCiAgKiAgIFRoaXMgZnVudGlvbiBhZGRzIGFuIGFkZGl0aW9uYWwgcmVxdWVzdCBibG9jayAoRVJQKSB0byB0aGUgaGVhZCBvZgogICogICB0aGUgZ2l2ZW4gY3FyIChvciBlcnApLgogICogIC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UxNiAqKWRhdGEsIGxlbiwKKwkJCQkgICBubHNfY3ApOworCQlpZihzdHJuY21wKHNlcy0+c2VydmVyTk9TLCAiTlQgTEFOIE1hbmFnZXIgNCIsMTYpID09IDApIHsKKwkJCWNGWUkoMSwoIk5UNCBzZXJ2ZXIiKSk7CisJCQlzZXMtPmZsYWdzIHw9IENJRlNfU0VTX05UNDsKKwkJfQorCX0KKwlkYXRhICs9IDIgKiAobGVuICsgMSk7CisJd29yZHNfbGVmdCAtPSBsZW4gKyAxOworCisgICAgICAgIC8qIHNhdmUgb2ZmIHNlcnZlciBkb21haW4gKi8KKyAgICAgICAgbGVuID0gVW5pU3Rybmxlbigod2NoYXJfdCAqKSBkYXRhLCB3b3Jkc19sZWZ0KTsKKworICAgICAgICBpZihsZW4gPiB3b3Jkc19sZWZ0KQorICAgICAgICAgICAgICAgIHJldHVybiByYzsKKworICAgICAgICBpZihzZXMtPnNlcnZlckRvbWFpbikKKyAgICAgICAgICAgICAgICBrZnJlZShzZXMtPnNlcnZlckRvbWFpbik7CisgICAgICAgIHNlcy0+c2VydmVyRG9tYWluID0ga3phbGxvYygyICogKGxlbiArIDEpLCBHRlBfS0VSTkVMKTsgLyogQkIgRklYTUUgd3JvbmcgbGVuZ3RoICovCisgICAgICAgIGlmKHNlcy0+c2VydmVyRG9tYWluICE9IE5VTEwpIHsKKyAgICAgICAgICAgICAgICBjaWZzX3N0cmZyb21VQ1NfbGUoc2VzLT5zZXJ2ZXJEb21haW4sIChfX2xlMTYgKilkYXRhLCBsZW4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5sc19jcCk7CisgICAgICAgICAgICAgICAgc2VzLT5zZXJ2ZXJEb21haW5bMipsZW5dID0gMDsKKyAgICAgICAgICAgICAgICBzZXMtPnNlcnZlckRvbWFpblsoMipsZW4pICsgMV0gPSAwOworICAgICAgICB9CisgICAgICAgIGRhdGEgKz0gMiAqIChsZW4gKyAxKTsKKyAgICAgICAgd29yZHNfbGVmd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k9TLCBiY2NfcHRyLCBsZW4pOworCisJYmNjX3B0ciArPSBsZW4gKyAxOworCWJsZWZ0IC09IGxlbiArIDE7CisKKyAgICAgICAgbGVuID0gc3RybmxlbihiY2NfcHRyLCBibGVmdCk7CisgICAgICAgIGlmKGxlbiA+IGJsZWZ0KQorICAgICAgICAgICAgICAgIHJldHVybiByYzsKKworICAgICAgICBpZihzZXMtPnNlcnZlckRvbWFpbikKKyAgICAgICAgICAgICAgICBrZnJlZShzZXMtPnNlcnZlckRvbWFpbik7CisKKyAgICAgICAgc2VzLT5zZXJ2ZXJEb21haW4gPSBremFsbG9jKGxlbiArIDEsIEdGUF9LRVJORUwpOworICAgICAgICBpZihzZXMtPnNlcnZlck9TKQorICAgICAgICAgICAgICAgIHN0cm5jcHkoc2VzLT5zZXJ2ZXJPUywgYmNjX3B0ciwgbGVuKTsKKworICAgICAgICBiY2NfcHRyICs9IGxlbiArIDE7CisJYmxlZnQgLT0gbGVuICsgMTsKKworCWNGWUkoMSwoImFzY2lpOiBieXRlcyBsZWZ0ICVkIixibGVmdCkpOworCisJcmV0dXJuIHJjOworfQorCitpbnQgCitDSUZTX1Nlc3NTZXR1cCh1bnNpZ25lZCBpbnQgeGlkLCBzdHJ1Y3QgY2lmc1Nlc0luZm8gKnNlcywgaW50IGZpcnN0X3RpbWUsCisJCWNvbnN0IHN0cnVjdCBubHNfdGFibGUgKm5sc19jcCkKK3sKKwlpbnQgcmMgPSAwOworCWludCB3Y3Q7CisJc3RydWN0IHNtYl9oZHIgKnNtYl9idWY7CisJY2hhciAqYmNjX3B0cjsKKwljaGFyICpzdHJfYXJlYTsKKwlTRVNTSU9OX1NFVFVQX0FORFggKnBTTUI7CisJX191MzIgY2FwYWJpbGl0aWVzOworCWludCBjb3VudDsKKwlpbnQgcmVzcF9idWZfdHlwZSA9IDA7CisJc3RydWN0IGt2ZWMgaW92WzJdOworCWVudW0gc2VjdXJpdHlFbnVtIHR5cGU7CisJX191MTYgYWN0aW9uOworCWludC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m9vdHN0ZC5oCmluZGV4IDNmZGM3OWYuLmJkYzFhNGEgMTAwNjQ0Ci0tLSBhL2luY2x1ZGUvYXNtLW02OGtub21tdS9ib290c3RkLmgKKysrIGIvaW5jbHVkZS9hc20tbTY4a25vbW11L2Jvb3RzdGQuaApAQCAtNTIsNyArNTIsNyBAQAogICAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCJ0cmFwICMyIiBcCiAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiPWciIChfX3JlcykgXAogICAgICAgICAgICAgICAgICAgICAgICAgIDogIjAiIChfX3JlcykgXAotICAgICAgICAgICAgICAgICAgICAgICAgIDogIiVkMCIpOyBcCisgICAgICAgICAgICAgICAgICAgICAgICAgKTsgXAogICAgX19ic2NfcmV0dXJuKHR5cGUsX19yZXMpOyBcCiB9CiAKQEAgLTY0LDcgKzY0LDcgQEAKICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgidHJhcCAjMiIgXAogICAgICAgICAgICAgICAgICAgICAgICAgIDogIj1nIiAoX19yZXMpIFwKICAgICAgICAgICAgICAgICAgICAgICAgICA6ICIwIiAoX19yZXMpLCAiZCIgKF9fYSkgXAotICAgICAgICAgICAgICAgICAgICAgICAgIDogIiVkMCIpOyBcCisgICAgICAgICAgICAgICAgICAgICAgICAgKTsgXAogICAgX19ic2NfcmV0dXJuKHR5cGUsX19yZXMpOyBcCiB9CiAKQEAgLTc3LDcgKzc3LDcgQEAKICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgidHJhcCAjMiIgXAogICAgICAgICAgICAgICAgICAgICAgICAgIDogIj1nIiAoX19yZXMpIFwKICAgICAgICAgICAgICAgICAgICAgICAgICA6ICIwIiAoX19yZXMpLCAiZCIgKF9fYSksICJkIiAoX19iKSBcCi0gICAgICAgICAgICAgICAgICAgICAgICAgOiAiJWQwIik7IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICApOyBcCiAgICBfX2JzY19yZXR1cm4odHlwZSxfX3Jlcyk7IFwKIH0KIApAQCAtOTIsNyArOTIsNyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgIDogIj1nIiAoX19yZXMpIFwKICAgICAgICAgICAgICAgICAgICAgICAgICA6ICIwIiAoX19yZXMpLCAiZCIgKF9fYSksICJkIiAoX19iKSwgXAogICAgICAgICAgICAgICAgICAgICAgICAgICAgImQiIChfX2MpIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICA6ICIlZDAiKTsgXAorICAgICAgICAgICAgICAgICAgICAgICAgICk7IFwKICAgIF9fYnNjX3JldHVybih0eXBlLF9fcmVzKTsgXAogfQogCkBAIC0xMDgsNyArMTA4LDcgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICA6ICI9ZyIgKF9fcmVzKSBcCiAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiMCIgKF9fcmVzKSwgImQiIChfX2EpLCAiZCIgKF9fYiksIFwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJkIiAoX19jKSwgImQiIChfX2QpIFwKLSAgICAgICAgICAgICAgICAgICAgICAgICA6ICIlZDAiKTsgXAorICAgICAgICAgICAgICAgICAgICAgICAgICk7IFwKICAgIF9fYnNjX3JldHVybih0eXBlLF9fcmVzKTsgXAogfQogCkBAIC0xMjUsNyArMTI1LDcgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICA6ICI9ZyIgKF9fcmVzKSBcCiAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiMCIgKF9fcmVzKSwgImQiIChfX2EpLCAiZCIgKF9fYiksIFwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICJkIiAoX19jKSwgImQiIChfX2QpLCAiZCIgKF9fZSkgXAotICAgICAgICAgICAgICAgICAgICAgICAgIDogIiVkMCIpOyBcCisgICAgICAgICAgICAgICAgICAgICAgICAgKTsgXAogICAgX19ic2NfcmV0dXJuKHR5cGUsX19yZXMpOyBcCiB9CiAKZGlmZiAtLWdpdCBhL2luY2x1ZGUvYXNtLW02OGtub21tdS9wdHJhY2UuaCBiL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c3MgYml0cy4gIFRoaXMgaXMgbm9ybWFsbHkKKwkgKiA4IGJ1dCBzb21lIGJhZCBoYXJkd2FyZSByb3V0ZXMgYWRkcmVzcyBsaW5lcyBpbmNvcnJlY3RseS4KKwkgKi8KKwlpbnQgYXMwX2JpdHM7CisKKwlpbnQgbnZyYW1fc2l6ZTsJLyogU2l6ZSBvZiBOVlJBTSBvbiBjaGlwICovCisJaW50IHN3X2ZsYWdzOwkvKiBTb2Z0d2FyZSBjb250cm9sIGZsYWdzICovCisKKwkvKiBGb2xsb3dpbmcgYXJlIHRoZSByZWdpc3RlciBvZmZzZXRzIGZvciB0aGUgcGFydGljdWxhciBjaGlwICovCisJaW50IHllYXI7CisJaW50IG1vbnRoOworCWludCBkYXlfb2ZfbW9udGg7CisJaW50IGRheV9vZl93ZWVrOworCWludCBob3VyczsKKwlpbnQgbWludXRlczsKKwlpbnQgc2Vjb25kczsKKwlpbnQgY29udHJvbF9iOworCWludCBjb250cm9sX2E7CisJaW50IHdhdGNoZG9nOworCWludCBpbnRlcnJ1cHRzOworCWludCBhbGFybV9kYXRlOworCWludCBhbGFybV9ob3VyOworCWludCBhbGFybV9taW51dGVzOworCWludCBhbGFybV9zZWNvbmRzOworCWludCBjZW50dXJ5OworCWludCBmbGFnczsKKworCS8qCisJICogU29tZSBSVEMgY2hpcHMgaGF2ZSB0aGVpciBOVlJBTSBidXJpZWQgYmVoaW5kIGEgYWRkci9kYXRhIHBhaXIgb2YKKwkgKiByZWdzIG9uIHRoZSBmaXJzdCBsZXZlbC9jbG9jayByZWdpc3RlcnMuICBUaGUgZm9sbG93aW5nIGZpZWxkcworCSAqIGFyZSB0aGUgYWRkcmVzc2VzIGZvciB0aG9zZSBhZGRyL2RhdGEgcmVncy4KKwkgKi8KKwlpbnQgbnZyYW1fYWRkcl9yZWc7CisJaW50IG52cmFtX2RhdGFfcmVnOworfSB0b2RjX2luZm9fdDsKKworLyoKKyAqIERlZmluZSB0aGUgdHlwZXMgb2YgVE9EQy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JZWxzZQorCQlwcmludGsoIiBbJXBdIHslczolZH1cbiIsCisJCQlsb2NrLCBsb2NrLT5maWxlLCBsb2NrLT5saW5lKTsKKworCWlmIChwcmludF9vd25lciAmJiBydF9tdXRleF9vd25lcihsb2NrKSkgeworCQlwcmludGsoIi4uIC0+b3duZXI6ICVwXG4iLCBsb2NrLT5vd25lcik7CisJCXByaW50aygiLi4gaGVsZCBieTogICIpOworCQlwcmludGtfdGFzayhydF9tdXRleF9vd25lcihsb2NrKSk7CisJCXByaW50aygiXG4iKTsKKwl9CisJaWYgKHJ0X211dGV4X293bmVyKGxvY2spKSB7CisJCXByaW50aygiLi4uIGFjcXVpcmVkIGF0OiAgICAgICAgICAgICAgICIpOworCQlwcmludF9zeW1ib2woIiVzXG4iLCBsb2NrLT5hY3F1aXJlX2lwKTsKKwl9Cit9CisKK3N0YXRpYyB2b2lkIHByaW50a193YWl0ZXIoc3RydWN0IHJ0X211dGV4X3dhaXRlciAqdykKK3sKKwlwcmludGsoIi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cbiIpOworCXByaW50aygifCB3YWl0ZXIgc3RydWN0ICVwOlxuIiwgdyk7CisJcHJpbnRrKCJ8IHctPmxpc3RfZW50cnk6IFtEUDolcC8lcHxTUDolcC8lcHxQUkk6JWRdXG4iLAorCSAgICAgICB3LT5saXN0X2VudHJ5LnBsaXN0LnByaW9fbGlzdC5wcmV2LCB3LT5saXN0X2VudHJ5LnBsaXN0LnByaW9fbGlzdC5uZXh0LAorCSAgICAgICB3LT5saXN0X2VudHJ5LnBsaXN0Lm5vZGVfbGlzdC5wcmV2LCB3LT5saXN0X2VudHJ5LnBsaXN0Lm5vZGVfbGlzdC5uZXh0LAorCSAgICAgICB3LT5saXN0X2VudHJ5LnByaW8pOworCXByaW50aygifCB3LT5waV9saXN0X2VudHJ5OiBbRFA6JXAvJXB8U1A6JXAvJXB8UFJJOiVkXVxuIiwKKwkgICAgICAgdy0+cGlfbGlzdF9lbnRyeS5wbG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pOworCQlpZiAoY291bnQpIHsKKwkJCWNvdW50LS07CisJCQlwcmludGsoIiAjJWQiLCAxMC1jb3VudCk7CisJCQltZGVsYXkoMjAwKTsKKwkJCWdvdG8gcmV0cnk7CisJCX0KKwkJcHJpbnRrKCIgaWdub3JpbmcgaXQuXG4iKTsKKwkJdW5sb2NrID0gMDsKKwl9CisJaWYgKGNvdW50ICE9IDEwKQorCQlwcmludGsoIiBsb2NrZWQgaXQuXG4iKTsKKworCWRvX2VhY2hfdGhyZWFkKGcsIHApIHsKKwkJc2hvd190YXNrX2xvY2tzKHApOworCQlpZiAoIXVubG9jaykKKwkJCWlmIChyZWFkX3RyeWxvY2soJnRhc2tsaXN0X2xvY2spKQorCQkJCXVubG9jayA9IDE7CisJfSB3aGlsZV9lYWNoX3RocmVhZChnLCBwKTsKKworCXByaW50aygiXG4iKTsKKworCXByaW50aygiLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cbiIpOworCXByaW50aygifCBzaG93aW5nIGFsbCBsb2NrcyBoZWxkIGluIHRoZSBzeXN0ZW06IHxcbiIpOworCXByaW50aygiLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS1cbiIpOworCisJZG9fZWFjaF90aHJlYWQoZywgcCkgeworCQlydF9tdXRleF9zaG93X2hlbGRfbG9ja3MocCwgMCk7CisJCWlmICghdW5sb2NrKQorCQkJaWYgKHJlYWRfdHJ5bG9jaygmdGFza2xpc3RfbG9jaykpCisJCQkJdW5sb2NrID0gMTsKKwl9IHdoaWxlX2VhY2hfdGhyZWFkKGcsIHApOworCisKKwlwcmludGsoIj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxuXG4iKTsKKworCWlmICh1bmxvY2spCisJCXJlYWRfdW5sb2NrKCZ0YXNrbGlzdF9sb2NrKTsKK30KKwordm9pZCBydF9tdXRleF9kZWJ1Z19jaGVja19ub19sb2N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ugd2UgZGlkIG5vdAorCSAqIHRha2UgdGhlIGxvY2ssIHRoZSBQSSBib29zdCBoYXMgdG8gZ28uCisJICovCisJaWYgKHVubGlrZWx5KHJldCkpCisJCXJ0X211dGV4X2FkanVzdF9wcmlvKGN1cnJlbnQpOworCisJZGVidWdfcnRfbXV0ZXhfZnJlZV93YWl0ZXIoJndhaXRlcik7CisKKwlyZXR1cm4gcmV0OworfQorCisvKgorICogU2xvdyBwYXRoIHRyeS1sb2NrIGZ1bmN0aW9uOgorICovCitzdGF0aWMgaW5saW5lIGludAorcnRfbXV0ZXhfc2xvd3RyeWxvY2soc3RydWN0IHJ0X211dGV4ICpsb2NrIF9fSVBfREVDTF9fKQoreworCWludCByZXQgPSAwOworCisJc3Bpbl9sb2NrKCZsb2NrLT53YWl0X2xvY2spOworCisJaWYgKGxpa2VseShydF9tdXRleF9vd25lcihsb2NrKSAhPSBjdXJyZW50KSkgeworCisJCXJldCA9IHRyeV90b190YWtlX3J0X211dGV4KGxvY2sgX19JUF9fKTsKKwkJLyoKKwkJICogdHJ5X3RvX3Rha2VfcnRfbXV0ZXgoKSBzZXRzIHRoZSBsb2NrIHdhaXRlcnMKKwkJICogYml0IHVuY29uZGl0aW9uYWxseS4gQ2xlYW4gdGhpcyB1cC4KKwkJICovCisJCWZpeHVwX3J0X211dGV4X3dhaXRlcnMobG9jayk7CisJfQorCisJc3Bpbl91bmxvY2soJmxvY2stPndhaXRfbG9jayk7CisKKwlyZXR1cm4gcmV0OworfQorCisvKgorICogU2xvdyBwYXRoIHRvIHJlbGVhc2UgYSBydC1tdXRleDoKKyAqLworc3RhdGljIHZvaWQgX19zY2hlZAorcnRfbXV0ZXhfc2xvd3VubG9jayhzdHJ1Y3QgcnRfbXV0ZXggKmxvY2spCit7CisJc3Bpbl9sb2NrKCZsb2NrLT53YWl0X2xvY2spOworCisJZGVidWdfcnRfbXV0ZXhfdW5sb2NrKGxvY2spOworCisJcnRfbXV0ZXhfZGVhZGxvY2tfYWNjb3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gRm91bmRhdGlvbi4KKyMKK2ltcG9ydCBvcworaW1wb3J0IHN5cworaW1wb3J0IGdldG9wdAoraW1wb3J0IHNodXRpbAoraW1wb3J0IHN0cmluZworCisjIEdsb2JhbHMKK3F1aWV0ID0gMAordGVzdCA9IDAKK2NvbW1lbnRzID0gMAorCitzeXNmc3ByZWZpeCA9ICIvc3lzL2RldmljZXMvc3lzdGVtL3J0dGVzdC9ydHRlc3QiCitzdGF0dXNmaWxlID0gIi9zdGF0dXMiCitjb21tYW5kZmlsZSA9ICIvY29tbWFuZCIKKworIyBDb21tYW5kIG9wY29kZXMKK2NtZF9vcGNvZGVzID0geworICAgICJzY2hlZG90aGVyIiAgICA6ICIxIiwKKyAgICAic2NoZWRmaWZvIiAgICAgOiAiMiIsCisgICAgImxvY2siICAgICAgICAgIDogIjMiLAorICAgICJsb2Nrbm93YWl0IiAgICA6ICI0IiwKKyAgICAibG9ja2ludCIgICAgICAgOiAiNSIsCisgICAgImxvY2tpbnRub3dhaXQiIDogIjYiLAorICAgICJsb2NrY29udCIgICAgICA6ICI3IiwKKyAgICAidW5sb2NrIiAgICAgICAgOiAiOCIsCisgICAgImxvY2tia2wiICAgICAgIDogIjkiLAorICAgICJ1bmxvY2tia2wiICAgICA6ICIxMCIsCisgICAgInNpZ25hbCIgICAgICAgIDogIjExIiwKKyAgICAicmVzZXRldmVudCIgICAgOiAiOTgiLAorICAgICJyZXNldCIgICAgICAgICA6ICI5OSIsCisgICAgfQorCit0ZXN0X29wY29kZXMgPSB7CisgICAgInByaW9lcSIgICAgICAgIDogWyJQIiAsICJlcSIgLCBOb25lXSwKKyAgICAicHJpb2x0IiAgICAgICAgOiBbIlAiICwgImx0IiAsIE5vbmVdLAorICAgICJwcmlvZ3QiICAgICAgICA6IFsiUCIgLCAiZ3QiICwgTm9uZV0sCisgICAgIm5wcmlvZXEiICAgICAgIDogWyJOIiAsICJlcSIgLCBOb25lXSwKKyAgICAibnByaW9sdCIgICAgICAgOiBbIk4iICwgImx0IiAsIE5vbmVdLAorICAgICJucHJpb2d0IiAgICAgICA6IFsiTiIgLCAiZ3QiICwgTm9uZV0sCisgICAgInVubG9ja2VkIiAgICAgIDogWyJNIiAsICJlcSIgLCAwXSwKKyAgICAidHJ5bG9jayIgICAgICAgOiBbIk0iICwgImVxIiAsIDFdLAorICAgICJibG9ja2VkIiAgICAgICA6IFsiTSIgLCAiZXEiICwgMl0sCisgICAgImJsb2NrZWR3YWtlIiAgIDogWyJNIiAsICJlcSIgLCAzXSwKKyAgICAibG9ja2VkIiAgICAgICAgOiBbIk0iICwgImVxIiAsIDRdLAorICAgICJvcGNvZGVlcSIgICAgICA6IFsiTyIgLCAiZXEiICwgTm9uZV0sCisgICAgIm9wY29kZWx0IiAgICAgIDogWyJPIiAsICJsdCIgLCBOb25lXSwKKyAgICAib3Bjb2RlZ3QiICAgICAgOiBbIk8iICwgImd0IiAsIE5vbmVdLAorICAgICJldmVudGVxIiAgICAgICA6IFsiRSIgLCAiZXEiICwgTm9uZV0sCisgICAgImV2ZW50bHQiICAgICAgIDogWyJFIiAsICJsdCIgLCBOb25lXSwKKyAgICAiZXZlbnRndCIgICAgICAgOiBbIkUiICwgImd0IiAsIE5vbmVdLAorICAgIH0KKworIyBQcmludCB1c2FnZSBpbmZvcm1hdGlvbgorZGVmIHVzYWdlKCk6CisgICAgcHJpbnQgInJ0LXRlc3Rlci5weSA8LWMgLWggLXEgLXQ+IDx0ZXN0ZmlsZT4iCisgICAgcHJpbnQgIiAtYyAgICBkaXNwbGF5IGNvbW1lbnRzIGFmdGVyIGZpcnN0IGNvbW1hbmQiCisgICAgcHJpbnQgIiAtaCAgICBoZWxwIgorICAgIHByaW50ICIgLXEgICAgcXVpZXQgbW9kZSIKKyAgICBwcmludCAiIC10ICAgIHRlc3QgbW9kZSAoc3ludGF4IGNoZWNrKSIKKyAgICBwcmludCAiIHRlc3RmaWxlOiByZWFkIHRlc3Qgc3BlY2lmaWNhdGlvbiBmcm9tIHRlc3RmaWxlI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c2FnZSgpCisgICAgc3lzLmV4aXQoMSkKKworIyBQYXJzZSBjb21tYW5kbGluZSBvcHRpb25zCitmb3Igb3B0aW9uLCB2YWx1ZSBpbiBvcHRpb25zOgorICAgIGlmIG9wdGlvbiA9PSAiLWMiOgorICAgICAgICBjb21tZW50cyA9IDEKKyAgICBlbGlmIG9wdGlvbiA9PSAiLXEiOgorICAgICAgICBxdWlldCA9IDEKKyAgICBlbGlmIG9wdGlvbiA9PSAiLXQiOgorICAgICAgICB0ZXN0ID0gMQorICAgIGVsaWYgb3B0aW9uID09ICctaCc6CisgICAgICAgIHVzYWdlKCkKKyAgICAgICAgc3lzLmV4aXQoMCkKKworIyBTZWxlY3QgdGhlIGlucHV0IHNvdXJjZQoraWYgYXJndW1lbnRzOgorICAgIHRyeToKKyAgICAgICAgZmQgPSBvcGVuKGFyZ3VtZW50c1swXSkKKyAgICBleGNlcHQgRXhjZXB0aW9uLGV4OgorICAgICAgICBzeXMuc3RkZXJyLndyaXRlKCJGaWxlIG5vdCBmb3VuZCAlc1xuIiAlKGFyZ3VtZW50c1swXSkpCisgICAgICAgIHN5cy5leGl0KDEpCitlbHNlOgorICAgIGZkID0gc3lzLnN0ZGluCisKK2xpbmVuciA9IDAKKworIyBSZWFkIHRoZSB0ZXN0IHBhdHRlcm5zCit3aGlsZSAxOgorCisgICAgbGluZW5yID0gbGluZW5yICsgMQorICAgIGxpbmUgPSBmZC5yZWFkbGluZSgpCisgICAgaWYgbm90IGxlbihsaW5lKToKKyAgICAgICAgYnJlYWsKKworICAgIGxpbmUgPSBsaW5lLnN0cmlwKCkKKyAgICBwYXJ0cyA9IGxpbmUuc3BsaXQoIjoiKQorCisgICAgaWYgbm90IHBhcnRzIG9yIGxlbihwYXJ0cykgPCAxOgorICAgICAgICBjb250aW51ZQorCisgICAgaWYgbGVuKHBhcnRzWzBdKSA9PSAwOgorICAgICAgICBjb250aW51ZQorCisgICAgaWYgcGFydHNbMF0uc3RhcnRzd2l0aCgiIyIpOgorCWlmIGNvbW1lbnRzID4gMToKKwkgICAgcHJvZ3Jlc3MobGluZSkKKwljb250aW51ZQorCisgICAgaWYgY29tbWVudHMgPT0gMToKKwljb21tZW50cyA9IDIKKworICAgIHByb2dyZXNzKGxpbmUpCisKKyAgICBjbWQgPSBwYXJ0c1swXS5zdHJpcCgpLmxvd2VyKCkKKyAgICBvcGMgPSBwYXJ0c1sxXS5zdHJpcCgpLmxvd2VyKCkKKyAgICB0aWQgPSBwYXJ0c1syXS5zdHJpcCgpCisgICAgZGF0ID0gcGFydHNbM10uc3RyaXAoKQorCisgICAgdHJ5OgorICAgICAgICAjIFRlc3Qgb3Igd2FpdCBmb3IgYSBzdGF0dXMgdmFsdWUKKyAgICAgICAgaWYgY21kID09ICJ0IiBvciBjbWQgPT0gInciOgorICAgICAgICAgICAgdGVzdG9wID0gdGVzdF9vcGNvZGVzW29wY10KKworICAgICAgICAgICAgZm5hbWUgPSAiJXMlcyVzIiAlKHN5c2ZzcHJlZml4LCB0aWQsIHN0YXR1c2ZpbGUpCisgICAgICAgICAgICBpZiB0ZXN0OgorCQlwcmludCBmbmFtZQorICAgICAgICAgICAgICAgIGNvbnRpbnVlCisKKyAgICAgICAgICAgIHdoaWxlIDE6CisgICAgICAgICAgICAgICAgcXVlcnkgPSAxCisgICAgICAgICAgICAgICAgZnN0YSA9IG9wZW4oZm5hbWUsICdyJykKKyAgICAgICAgICAgICAgICBzdGF0dXMgPSBmc3RhLnJlYWRsaW5lKCkuc3RyaXAoKQorICAgICAgICAgICAgICAgIGZzdGEuY2xvc2UoKQorICAgICAgICAgICAgICAgIHN0YXQgPSBzdGF0dXMuc3BsaXQoIiwiKQorICAgICAgICAgICAgICAgIGZvciBzIGluIHN0YXQ6CisJCSAgICBzID0gcy5zdHJpcCgpCisgICAgICAgICAgICAgICAgICAgIGlmIHMuc3RhcnRzd2l0aCh0ZXN0b3BbMF0pOgorICAgICAgICAgICAgICAgICAgICAgICAgIyBTZXBlcmF0ZSBzdGF0dXMgdmFsdWUKKyAgICAgICAgICAgICAgICAgICAgICAgIHZhbCA9IHNbMjpdLnN0cmlwKCkKKyAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXJ5ID0gYW5hbHlzZSh2YWwsIHRlc3RvcCwgZGF0KQorICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsKKyAgICAgICAgICAgICAgICBpZiBxdWVyeSBvciBjbWQgPT0gInQiOgorICAgICAgICAgICAgICAgICAgICBicmVhaworCisgICAgICAgICAgICBwcm9ncmVzcygiICAgIiArIHN0YXR1cykKKworICAgICAgICAgICAgaWYgbm90IHF1ZXJ5OgorICAgICAgICAgICAgICAgIHN5cy5zdGRlcnIud3JpdGUoIlRlc3QgZmFpbGVkIGluIGxpbmUgJWRcbiIgJShsaW5lbnIpKQorCQlzeXMuZXhpdCgxKQorCisgICAgICAgICMgSXNzdWUgYSBjb21tYW5kIHRvIHRoZSB0ZXN0ZXIKKyAgICAgICAgZWxpZiBjbWQgPT0gImMiOgorICAgICAgICAgICAgY21kbnIgPSBjbWRfb3Bjb2Rlc1tvcGNdCisgICAgICAgICAgICAjIEJ1aWxkIGNvbW1hbmQgc3RyaW5nIGFuZCBzeXMgZmlsZW5hbWUKKyAgICAgICAgICAgIGNtZHN0ciA9ICIlczolcyIgJShjbWRuciwgZGF0KQorICAgICAgICAgICAgZm5hbWUgPSAiJXMlcyVzIiAlKHN5c2ZzcHJlZml4LCB0aWQsIGNvbW1hbmRmaWxlKQorICAgICAgICAgICAgaWYgdGVzdDoKKwkJcHJpbnQgZm5hbWUKKyAgICAgICAgICAgICAgICBjb250aW51ZQorICAgICAgICAgICAgZmNtZCA9IG9wZW4oZm5hbWUsICd3JykKKyAgICAgICAgICAgIGZjbWQud3JpdGUoY21kc3RyKQorICAgICAgICAgICAgZmNtZC5jbG9zZSgpCisKKyAgICBleGNlcHQgRXhjZXB0aW9uLGV4OgorICAgIAlzeXMuc3RkZXJyLndyaXRlKHN0cihleCkpCisgICAgICAgIHN5cy5zd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F1ZXN0ZWQ6ICVzXG4iLCBmcm0tPmRhdGEpKTsKKwlzbnByaW50ZihuYW1lLCBzaXplb2YobmFtZSksICJlYS8lcyIsIGZybS0+ZGF0YSk7CisJaWYgKChlcnIgPSByZXF1ZXN0X2Zpcm13YXJlKGZ3X2VudHJ5LCBuYW1lLCBwY2lfZGV2aWNlKGNoaXApKSkgPCAwKQorCQlzbmRfcHJpbnRrKEtFUk5fRVJSICJnZXRfZmlybXdhcmUoKTogRmlybXdhcmUgbm90IGF2YWlsYWJsZSAoJWQpXG4iLCBlcnIpOworCXJldHVybiBlcnI7Cit9CisKK3N0YXRpYyB2b2lkIGZyZWVfZmlybXdhcmUoY29uc3Qgc3RydWN0IGZpcm13YXJlICpmd19lbnRyeSkKK3sKKwlyZWxlYXNlX2Zpcm13YXJlKGZ3X2VudHJ5KTsKKwlERV9BQ1QoKCJmaXJtd2FyZSByZWxlYXNlZFxuIikpOworfQorCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCVBDTSBpbnRlcmZhY2UKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgYXVkaW9waXBlX2ZyZWUoc3RydWN0IHNuZF9wY21fcnVudGltZSAqcnVudGltZSkKK3sKKwlzdHJ1Y3QgYXVkaW9waXBlICpwaXBlID0gcnVudGltZS0+cHJpdmF0ZV9kYXRhOworCisJaWYgKHBpcGUtPnNncGFnZS5hcmVhKQorCQlzbmRfZG1hX2ZyZWVfcGFnZXMoJnBpcGUtPnNncGFnZSk7CisJa2ZyZWUocGlwZSk7Cit9CisKKworCitzdGF0aWMgaW50IGh3X3J1bGVfY2FwdHVyZV9mb3JtYXRfYnlfY2hhbm5lbHMoc3RydWN0IHNuZF9wY21faHdfcGFyYW1zICpwYXJhbXM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i8KKworCXJldHVybiAwOworfQorCisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJQ29udHJvbCBpbnRlcmZhY2UKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoqKioqKioqKioqKioqKioqKiogUENNIG91dHB1dCB2b2x1bWUgKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgc25kX2VjaG9fb3V0cHV0X2dhaW5faW5mbyhzdHJ1Y3Qgc25kX2tjb250cm9sICprY29udHJvbCwKKwkJCQkgICAgIHN0cnVjdCBzbmRfY3RsX2VsZW1faW5mbyAqdWluZm8pCit7CisJc3RydWN0IGVjaG9hdWRpbyAqY2hpcDsKKworCWNoaXAgPSBzbmRfa2NvbnRyb2xfY2hpcChrY29udHJvbCk7CisJdWluZm8tPnR5cGUgPSBTTkRSVl9DVExfRUxFTV9UWVBFX0lOVEVHRVI7CisJdWluZm8tPmNvdW50ID0gbnVtX2J1c3Nlc19vdXQoY2hpcCk7CisJdWluZm8tPnZhbHVlLmludGVnZXIubWluID0gRUNIT0dBSU5fTUlOT1VUOworCXVpbmZvLT52YWx1ZS5pbnRlZ2VyLm1heCA9IEVDSE9HQUlOX01BWE9VVDsKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBzbmRfZWNob19vdXRwdXRfZ2Fpbl9nZXQoc3RydWN0IHNuZF9rY29udHJvbCAqa2NvbnRyb2wsCisJCQkJICAgIHN0cnVjdCBzbmRfY3RsX2VsZW1fdmFsdWUgKnVjb250cm9sKQoreworCXN0cnVjdCBlY2hvYXVkaW8gKmNoaXA7CisJaW50IGM7CisKKwljaGlwID0gc25kX2tjb250cm9sX2NoaXAoa2NvbnRyb2wpOworCWZvciAoYyA9IDA7IGMgPCBudW1fYnVzc2VzX291dChjaGlwK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0X25vbWluYWxfcHV0LAorfTsKKworI2VuZGlmIC8qIEVDSE9DQVJEX0hBU19JTlBVVF9OT01JTkFMX0xFVkVMICovCisKKworCisjaWZkZWYgRUNIT0NBUkRfSEFTX01PTklUT1IKKworLyoqKioqKioqKioqKioqKioqKiogTW9uaXRvciBtaXhlciAqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBzbmRfZWNob19taXhlcl9pbmZvKHN0cnVjdCBzbmRfa2NvbnRyb2wgKmtjb250cm9sLAorCQkJICAgICAgIHN0cnVjdCBzbmRfY3RsX2VsZW1faW5mbyAqdWluZm8pCit7CisJc3RydWN0IGVjaG9hdWRpbyAqY2hpcDsKKworCWNoaXAgPSBzbmRfa2NvbnRyb2xfY2hpcChrY29udHJvbCk7CisJdWluZm8tPnR5cGUgPSBTTkRSVl9DVExfRUxFTV9UWVBFX0lOVEVHRVI7CisJdWluZm8tPmNvdW50ID0gMTsKKwl1aW5mby0+dmFsdWUuaW50ZWdlci5taW4gPSBFQ0hPR0FJTl9NSU5PVVQ7CisJdWluZm8tPnZhbHVlLmludGVnZXIubWF4ID0gRUNIT0dBSU5fTUFYT1VUOworCXVpbmZvLT5kaW1lbi5kWzBdID0gbnVtX2J1c3Nlc19vdXQoY2hpcCk7CisJdWluZm8tPmRpbWVuLmRbMV0gPSBudW1fYnVzc2VzX2luKGNoaXApOworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHNuZF9lY2hvX21peGVyX2dldChzdHJ1Y3Qgc25kX2tjb250cm9sICprY29udHJvbCwKKwkJCSAgICAgIHN0cnVjdCBzbmRfY3RsX2VsZW1fdmFsdWUgKnVjb250cm9sKQoreworCXN0cnVjdCBlY2hvYXVkaW8gKmNoaXA7CisKKwljaGlwID0gc25kX2tjb250cm9sX2NoaXAoa2NvbnRyb2wpOworCXVjb250cm9sLT52YWx1ZS5pbnRlZ2VyLnZhbHVlWzBdID0KKwkJY2hpcC0+bW9uaXRvcl9nYWluW3Vjb250cm9sLT5pZC5p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SB7CisJCQkJCWNsb2NrcyB8PSAxIDw8IHNyYzsKKwkJCQkJYnJlYWs7CisJCQkJfQorCXVjb250cm9sLT52YWx1ZS5pbnRlZ2VyLnZhbHVlWzVdID0gY2xvY2tzOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyBzdHJ1Y3Qgc25kX2tjb250cm9sX25ldyBzbmRfZWNob19jaGFubmVsc19pbmZvIF9fZGV2aW5pdGRhdGEgPSB7CisJLm5hbWUgPSAiQ2hhbm5lbHMgaW5mbyIsCisJLmlmYWNlID0gU05EUlZfQ1RMX0VMRU1fSUZBQ0VfSFdERVAsCisJLmFjY2VzcyA9IFNORFJWX0NUTF9FTEVNX0FDQ0VTU19SRUFEIHwgU05EUlZfQ1RMX0VMRU1fQUNDRVNTX1ZPTEFUSUxFLAorCS5pbmZvID0gc25kX2VjaG9fY2hhbm5lbHNfaW5mb19pbmZvLAorCS5nZXQgPSBzbmRfZWNob19jaGFubmVsc19pbmZvX2dldCwKK307CisKKworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwlJUlEgSGFuZGxlcgorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaXJxcmV0dXJuX3Qgc25kX2VjaG9faW50ZXJydXB0KGludCBpcnEsIHZvaWQgKmRldl9pZCwKKwkJCQkgICAgICBzdHJ1Y3QgcHRfcmVncyAqcmVncykKK3sKKwlzdHJ1Y3QgZWNob2F1ZGlvICpjaGlwID0gZGV2X2lkOworCXN0cnVjdCBzbmRfcGNtX3N1YnN0cmVhbSAqc3Vic3RyZWFtOworCWludCBwZXJpb2QsIHNzLCBzdDsKKworCXNwaW5fbG9jaygmY2hpcC0+bG9jayk7CisJc3QgPSBzZXJ2aWNlX2lycShjaGlwKTsKKwlpZiAoc3QgPC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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJTW9kdWxlIGNvbnN0cnVjdGlvbiAvIGRlc3RydWN0aW9uCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgc25kX2VjaG9fZnJlZShzdHJ1Y3QgZWNob2F1ZGlvICpjaGlwKQoreworCURFX0lOSVQoKCJTdG9wIERTUC4uLlxuIikpOworCWlmIChjaGlwLT5jb21tX3BhZ2UpIHsKKwkJcmVzdF9pbl9wZWFjZShjaGlwKTsKKwkJc25kX2RtYV9mcmVlX3BhZ2VzKCZjaGlwLT5jb21tcGFnZV9kbWFfYnVmKTsKKwl9CisJREVfSU5JVCgoIlN0b3BwZWQuXG4iKSk7CisKKwlpZiAoY2hpcC0+aXJxID49IDApCisJCWZyZWVfaXJxKGNoaXAtPmlycSwgKHZvaWQgKiljaGlwKTsKKworCWlmIChjaGlwLT5kc3BfcmVnaXN0ZXJzKQorCQlpb3VubWFwKGNoaXAtPmRzcF9yZWdpc3RlcnMpOworCisJaWYgKGNoaXAtPmlvcmVzKQorCQlyZWxlYXNlX2FuZF9mcmVlX3Jlc291cmNlKGNoaXAtPmlvcmVzKTsKKworCURFX0lOSVQoKCJNTUlPIGZyZWVkLlxuIikpOworCisJcGNpX2Rpc2FibGVfZGV2aWNlKGNoaXAtPnBjaSk7CisKKwkvKiByZWxlYXNlIGNoaXAgZGF0YSAqLworCWtmcmVlKGNoaXApOworCURFX0lOSVQoKCJDaGlwIGZyZWVkLlxuIikpOworCXJldHVybiAwOworfQorCisKKworc3RhdGljIGludCBzbmRfZWNob19kZXZfZnJlZShzdHJ1Y3Qgc25kX2RldmljZSAqZGV2aWNlKQoreworCXN0cnVjdCBlY2hvYXVkaW8gKmNoaXAgPSBkZXZpY2UtPmRldmljZV9kYXRhOworCisJREVfSU5JVCgoInNuZF9lY2hvX2Rldl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nZkYXRhKHBjaSwgTlVMTCk7Cit9CisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJRXZlcnl0aGluZyBzdGFydHMgYW5kIGVuZHMgaGVyZQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBwY2lfZHJpdmVyIGRlZmluaXRpb24gKi8KK3N0YXRpYyBzdHJ1Y3QgcGNpX2RyaXZlciBkcml2ZXIgPSB7CisJLm5hbWUgPSAiRWNob2F1ZGlvICIgRUNIT0NBUkRfTkFNRSwKKwkuaWRfdGFibGUgPSBzbmRfZWNob19pZHMsCisJLnByb2JlID0gc25kX2VjaG9fcHJvYmUsCisJLnJlbW92ZSA9IF9fZGV2ZXhpdF9wKHNuZF9lY2hvX3JlbW92ZSksCit9OworCisKKworLyogaW5pdGlhbGl6YXRpb24gb2YgdGhlIG1vZHVsZSAqLworc3RhdGljIGludCBfX2luaXQgYWxzYV9jYXJkX2VjaG9faW5pdCh2b2lkKQoreworCXJldHVybiBwY2lfcmVnaXN0ZXJfZHJpdmVyKCZkcml2ZXIpOworfQorCisKKworLyogY2xlYW4gdXAgdGhlIG1vZHVsZSAqLworc3RhdGljIHZvaWQgX19leGl0IGFsc2FfY2FyZF9lY2hvX2V4aXQodm9pZCkKK3sKKwlwY2lfdW5yZWdpc3Rlcl9kcml2ZXIoJmRyaXZlcik7Cit9CisKKworbW9kdWxlX2luaXQoYWxzYV9jYXJkX2VjaG9faW5pdCkKK21vZHVsZV9leGl0KGFsc2FfY2FyZF9lY2hvX2V4aXQpCmRpZmYgLS1naXQgYS9zb3VuZC9wY2kvZWNob2F1ZGlvL2VjaG9hdWRpby5oIGIvc291bmQvcGNpL2VjaG9hdWRpby9lY2hvYXVkaW8uaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleC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haWxzLgorCisgICBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQorICAgYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUKKyAgIEZvdW5kYXRpb24sIEluYy4sIDU5IFRlbXBsZSBQbGFjZSAtIFN1aXRlIDMzMCwgQm9zdG9uLAorICAgTUEgIDAyMTExLTEzMDcsIFVTQS4KKworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKworIFRyYW5zbGF0aW9uIGZyb20gQysrIGFuZCBhZGFwdGF0aW9uIGZvciB1c2UgaW4gQUxTQS1Ecml2ZXIKKyB3ZXJlIG1hZGUgYnkgR2l1bGlhbm8gUG9jaGluaSA8cG9jaGluaUBzaGlueS5pdD4KKworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKworCisgICBIZXJlJ3MgYSBibG9jayBkaWFncmFtIG9mIGhvdyBtb3N0IG9mIHRoZSBjYXJkcyB3b3JrOgorCisgICAgICAgICAgICAgICAgICArLS0tLS0tLS0tLS0rCisgICAgICAgICAgIHJlY29yZCB8ICAgICAgICAgICB8PC0tLS0tLS0tLS0tLS0tLS0tLS0tIElucHV0cworICAgICAgICAgIDwtLS0tLS0tfCAgICAgICAgICAgfCAgICAgICAgfAorICAgICBQQ0kgICAgICAgICAgfCBUcmFuc3BvcnQgfCAgICAgICAgfAorICAgICBidXMgICAgICAgICAgfCAgZW5naW5lICAgfCAgICAgICBcfC8KKyAgICAgICAgICAtLS0tLS0tPnwgICAgICAgICAgIHwgICAgKy0tLS0tLS0rCisgICAgICAgICAgICBwbGF5ICB8ICAgICAgICAgICB8LS0tPnxtb25pdG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IGEgZmVhdHVyZSBjYWxsZWQgInZpcnR1YWwgb3V0cHV0cy4iCisKKworICAgICAgICAgICAgICAgICAgKy0tLS0tLS0tLS0tKworICAgICAgICAgICByZWNvcmQgfCAgICAgICAgICAgfDwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSBJbnB1dHMKKyAgICAgICAgICA8LS0tLS0tLXwgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICB8CisgICAgIFBDSSAgICAgICAgICB8IFRyYW5zcG9ydCB8ICAgICAgICAgICAgICAgICAgfAorICAgICBidXMgICAgICAgICAgfCAgZW5naW5lICAgfCAgICAgICAgICAgICAgICAgXHwvCisgICAgICAgICAgLS0tLS0tLT58ICAgICAgICAgICB8ICAgKy0tLS0tLSsgICArLS0tLS0tLSsKKyAgICAgICAgICAgIHBsYXkgIHwgICAgICAgICAgIHwtLT58dm1peGVyfC0tPnxtb25pdG9yfC0tLS0tLS0+IE91dHB1dHMKKyAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLSsgICArLS0tLS0tKyAgIHwgbWl4ZXIgfAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKy0tLS0tLS0rCisKKworICAgT2J2aW91c2x5LCB0aGUgZGlmZmVyZW5jZSBoZXJlIGlzIHRoZSBib3ggbGFiZWxlZCAidm1peGVyLiIgIFZtaXhlciBpcworICAgc2hvcnQgZm9yICJ2aXJ0dWFsIG91dHB1dCBtaXhlci4iICBGb3IgTWlhLCBwaXBlcyBhcmUgKm5vdCogaGFyZC13aXJlZAorICAgdG8gYSBzaW5nbGUgYnVzOyB0aGUgdm1peGVyIGxldHMgeW91IG1peCBhbnkgcGlwZSB0byBhbnkgYnVzIGluIGFueQorICAgY29tYmluYXRpb24uCisKKyAgIE5vdGUsIGhvd2V2ZXIsIHRoYXQgdGhlIGxlZnQtaGFuZCBzaWRlIG9mIHRoZSBkaWFncmFtIGlzIHVuY2hhbmdlZC4KKyAgIFRyYW5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yBwcmVzZW50OyB0aGUgZ2VuZXJpYyBjb2RlIHVzZXMgdGhhdAorICAgaW5mb3JtYXRpb24gdG8gZGV0ZXJtaW5lIHdoaWNoIG1vZGUgdG8gdXNlLgorCisgICBUaGUgZ2VuZXJpYyBjb2RlIHRha2VzIGNhcmUgb2YgYWxsIHRoaXMgZm9yIHlvdS4KKyovCisKKworI2lmbmRlZiBfRUNIT0FVRElPX0hfCisjZGVmaW5lIF9FQ0hPQVVESU9fSF8KKworCisjZGVmaW5lIFRSVUUgMQorI2RlZmluZSBGQUxTRSAwCisKKyNpbmNsdWRlICJlY2hvYXVkaW9fZHNwLmgiCisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKworCVBDSSBjb25maWd1cmF0aW9uIHNwYWNlCisKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKgorICogUENJIHZlbmRvciBJRCBhbmQgZGV2aWNlIElEcyBmb3IgdGhlIGhhcmR3YXJlCisgKi8KKyNkZWZpbmUgVkVORE9SX0lECQkweDEwNTcKKyNkZWZpbmUgREVWSUNFX0lEXzU2MzAxCQkweDE4MDEKKyNkZWZpbmUgREVWSUNFX0lEXzU2MzYxCQkweDM0MTAKKyNkZWZpbmUgU1VCVkVORE9SX0lECQkweEVDQzAKKworCisvKgorICogVmFsaWQgRWNobyBQQ0kgc3Vic3lzdGVtIGNhcmQgSURzCisgKi8KKyNkZWZpbmUgREFSTEEyMAkJCTB4MDAxMAorI2RlZmluZSBHSU5BMjAJCQkweDAwMjAKKyNkZWZpbmUgTEFZTEEyMAkJCTB4MDAzMAorI2RlZmluZSBEQVJMQTI0CQkJMHgwMDQwCisjZGVmaW5lIEdJTkEyNAkJCTB4MDA1MAorI2RlZmluZSBMQVlMQTI0CQkJMHgwMDYwCisjZGVmaW5lIE1PTkEJCQkweDAwNzAKKyNkZWZpbmUgTUlBCQkJMHgwMDgwCisjZGVmaW5lIElORElHTwkJCTB4MDA5MAorI2RlZmluZSBJTkRJR09fSU8JCTB4MDBhMAorI2RlZmluZSBJTkRJR09fREoJCTB4MDBiMAorI2RlZmluZSBFQ0hPM0cJCQkweDAxMDAKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisKKwlBcnJheSBzaXplcyBhbmQgc28gZm9ydGgKKworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBTaXplcworICovCisjZGVmaW5lIEVDSE9fTUFYQVVESU9JTlBVVFMJMzIJLyogTWF4IGF1ZGlvIGlucHV0IGNoYW5uZWxzICovCisjZGVmaW5lIEVDSE9fTUFYQVVESU9PVVRQVVRTCTMyCS8qIE1heCBhdWRpbyBvdXRwdXQgY2hhbm5lbHMgKi8KKyNkZWZpbmUgRUNIT19NQVhBVURJT1BJUEVTCTMyCS8qIE1heCBudW1iZXIgb2YgaW5wdXQgYW5kIG91dHB1dAorCQkJCQkgKiBwaXBlcyAqLworI2RlZmluZSBFM0dfTUFYX09VVFBVVFMJCTE2CisjZGVmaW5lIEVDSE9fTUFYTUlESUpBQ0tTCTEJLyogTWF4IE1JREkgcG9ydHMgKi8KKyNkZWZpbmUgRUNIT19NSURJX1FVRVVFX1NaIAk1MTIJLyogTWF4IE1JREkgaW5wdXQgcXVldWUgZW50cmllcyAqLworI2RlZmluZSBFQ0hPX01UQ19RVUVVRV9TWgkzMgkvKiBNYXggTUlESSB0aW1lIGNvZGUgaW5wdXQgcXVldWUKKwkJCQkJICogZW50cmllcyAqLworCisvKgorICogTUlESSBhY3Rpdml0eSBpbmRpY2F0b3IgdGltZW91dAorICovCisjZGVmaW5lIE1JRElfQUNUSVZJVFlfVElNRU9VVF9VU0VDCTIwMDAw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19DTE9DS19TUERJRikKKyNkZWZpbmUgRUNIT19DTE9DS19CSVRfQURBVAkJKDEgPDwgRUNIT19DTE9DS19BREFUKQorI2RlZmluZSBFQ0hPX0NMT0NLX0JJVF9FU1lOQwkJKDEgPDwgRUNIT19DTE9DS19FU1lOQykKKyNkZWZpbmUgRUNIT19DTE9DS19CSVRfRVNZTkM5NgkJKDEgPDwgRUNIT19DTE9DS19FU1lOQzk2KQorI2RlZmluZSBFQ0hPX0NMT0NLX0JJVF9NVEMJCSgxPDxFQ0hPX0NMT0NLX01UQykKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisKKyAgIERpZ2l0YWwgbW9kZXMKKworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIERpZ2l0YWwgbW9kZXMgZm9yIE1vbmEsIExheWxhMjQsIGFuZCBHaW5hMjQKKyAqLworI2RlZmluZSBESUdJVEFMX01PREVfTk9ORQkJCTB4RkYKKyNkZWZpbmUgRElHSVRBTF9NT0RFX1NQRElGX1JDQQkJCTAKKyNkZWZpbmUgRElHSVRBTF9NT0RFX1NQRElGX09QVElDQUwJCTEKKyNkZWZpbmUgRElHSVRBTF9NT0RFX0FEQVQJCQkyCisjZGVmaW5lIERJR0lUQUxfTU9ERV9TUERJRl9DRFJPTQkJMworI2RlZmluZSBESUdJVEFMX01PREVTCQkJCTQKKworLyoKKyAqIERpZ2l0YWwgbW9kZSBjYXBhYmlsaXR5IG1hc2tzCisgKi8KKyNkZWZpbmUgRUNIT0NBUFNfSEFTX0RJR0lUQUxfTU9ERV9TUERJRl9SQ0EJKDEgPDwgRElHSVRBTF9NT0RFX1NQRElGX1JDQSkKKyNkZWZpbmUgRUNIT0NBUFNfSEFTX0RJR0lUQUxfTU9ERV9TUERJRl9PUFRJQ0FMCSgx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wkJdWRlbGF5KDEpOworCQljb25kX3Jlc2NoZWQoKTsKKwl9CisKKwljaGlwLT5iYWRfYm9hcmQgPSBUUlVFOwkJLyogU2V0IFRSVUUgdW50aWwgRFNQIHJlLWxvYWRlZCAqLworCURFX0lOSVQoKEtFUk5fRVJSICJyZWFkX2RzcDogU2V0IGJhZF9ib2FyZCB0byBUUlVFXG4iKSk7CisJcmV0dXJuIC1FSU87Cit9CisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCUZpcm13YXJlIGxvYWRpbmcgZnVuY3Rpb25zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogVGhpcyBmdW5jdGlvbiBpcyB1c2VkIHRvIHJlYWQgYmFjayB0aGUgc2VyaWFsIG51bWJlciBmcm9tIHRoZSBEU1A7Cit0aGlzIGlzIHRyaWdnZXJlZCBieSB0aGUgU0VUX0NPTU1QQUdFX0FERFIgY29tbWFuZC4KK09ubHkgc29tZSBlYXJseSBFY2hvZ2FscyBwcm9kdWN0cyBoYXZlIHNlcmlhbCBudW1iZXJzIGluIHRoZSBST007Cit0aGUgc2VyaWFsIG51bWJlciBpcyBub3QgdXNlZCwgYnV0IHlvdSBzdGlsbCBuZWVkIHRvIGRvIHRoaXMgYXMKK3BhcnQgb2YgdGhlIERTUCBsb2FkIHByb2Nlc3MuICovCitzdGF0aWMgaW50IHJlYWRfc24oc3RydWN0IGVjaG9hdWRpbyAqY2hpcCkKK3sKKwlpbnQgaTsKKwl1MzIgc25bNl07CisKKwlmb3IgKGkgPSAwOyBpIDwgNTsgaSsrKSB7CisJCWlmIChyZWFkX2RzcChjaGlwLCAmc25baV0pKSB7CisJCQlzbmRfcHJpbnRrKEtFUk5fRVJSICJGYWlsZWQgdG8gcmVhZCBzZXJpYWwgbnVtYmVyXG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KGVyciA9IHJlc3RvcmVfZHNwX3JldHRpbmdzKGNoaXApKSA8IDApCisJCXJldHVybiBlcnI7CisKKwlyZXR1cm4gYm94X3R5cGU7Cit9CisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCU1peGVyIGZ1bmN0aW9ucworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNpZiBkZWZpbmVkKEVDSE9DQVJEX0hBU19JTlBVVF9OT01JTkFMX0xFVkVMKSB8fCBcCisJZGVmaW5lZChFQ0hPQ0FSRF9IQVNfT1VUUFVUX05PTUlOQUxfTEVWRUwpCisKKy8qIFNldCB0aGUgbm9taW5hbCBsZXZlbCBmb3IgYW4gaW5wdXQgb3Igb3V0cHV0IGJ1cyAodHJ1ZSA9IC0xMGRCViwgZmFsc2UgPSArNGRCdSkgKi8KK3N0YXRpYyBpbnQgc2V0X25vbWluYWxfbGV2ZWwoc3RydWN0IGVjaG9hdWRpbyAqY2hpcCwgdTE2IGluZGV4LCBjaGFyIGNvbnN1bWVyKQoreworCXNuZF9hc3NlcnQoaW5kZXggPCBudW1fYnVzc2VzX291dChjaGlwKSArIG51bV9idXNzZXNfaW4oY2hpcCksCisJCSAgIHJldHVybiAtRUlOVkFMKTsKKworCS8qIFdhaXQgZm9yIHRoZSBoYW5kc2hha2UgKE9LIGV2ZW4gaWYgQVNJQyBpcyBub3QgbG9hZGVkKSAqLworCWlmICh3YWl0X2hhbmRzaGFrZShjaGlwKSkKKwkJcmV0dXJuIC1FSU87CisKKwljaGlwLT5ub21pbmFsX2xldmVsW2luZGV4XSA9IGNvbnN1bWVyOworCisJaWYgKGNvbnN1bWVyKQorCQljaGlwLT5jb21tX3BhZ2UtPm5vbWluYWxfbGV2ZWxfbWFzayB8PSBjcHVfdG9fbGUzMigxIDw8IGluZ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Y2xvY2spIDwgMCkKKwkJcmV0dXJuIC1FSU87CisjZW5kaWYKKworCWlmICh1cGRhdGVfb3V0cHV0X2xpbmVfbGV2ZWwoY2hpcCkgPCAwKQorCQlyZXR1cm4gLUVJTzsKKworCWlmICh1cGRhdGVfaW5wdXRfbGluZV9sZXZlbChjaGlwKSA8IDApCisJCXJldHVybiAtRUlPOworCisjaWZkZWYgRUNIT0NBUkRfSEFTX1ZNSVhFUgorCWlmICh1cGRhdGVfdm1peGVyX2xldmVsKGNoaXApIDwgMCkKKwkJcmV0dXJuIC1FSU87CisjZW5kaWYKKworCWlmICh3YWl0X2hhbmRzaGFrZShjaGlwKSA8IDApCisJCXJldHVybiAtRUlPOworCWNsZWFyX2hhbmRzaGFrZShjaGlwKTsKKworCURFX0lOSVQoKCJyZXN0b3JlX2RzcF9yZXR0aW5ncyBkb25lXG4iKSk7CisJcmV0dXJuIHNlbmRfdmVjdG9yKGNoaXAsIERTUF9WQ19VUERBVEVfRkxBR1MpOworfQorCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKwlUcmFuc3BvcnQgZnVuY3Rpb25zCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogc2V0X2F1ZGlvX2Zvcm1hdCgpIHNldHMgdGhlIGZvcm1hdCBvZiB0aGUgYXVkaW8gZGF0YSBpbiBob3N0IG1lbW9yeSBmb3IKK3RoaXMgcGlwZS4gIE5vdGUgdGhhdCBfTVNfIChtb25vLXRvLXN0ZXJlbykgcGxheWJhY2sgbW9kZXMgYXJlIG5vdCB1c2VkIGJ5IEFMU0EKK2J1dCB0aGV5IGFyZSBoZXJlIGJlY2F1c2UgdGhleSBhcmUganVzdCBtb25vIHdoaWxlIGNhcHR1cmluZyAqLworc3RhdGljIHZvaWQgc2V0X2F1ZGl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CAwICovCisJCQlzdCA9IG1pZGlfc2VydmljZV9pcnEoY2hpcCk7CS8qIFJldHVybnMgaG93IG1hbnkgbWlkaSBieXRlcyB3ZSByZWNlaXZlZCAqLworI2VuZGlmCisJCS8qIENsZWFyIHRoZSBoYXJkd2FyZSBpbnRlcnJ1cHQgKi8KKwkJY2hpcC0+Y29tbV9wYWdlLT5taWRpX2lucHV0WzBdID0gMDsKKwkJc2VuZF92ZWN0b3IoY2hpcCwgRFNQX1ZDX0FDS19JTlQpOworCQlyZXR1cm4gc3Q7CisJfQorCXJldHVybiAtMTsKK30KKworCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCUZ1bmN0aW9ucyBmb3Igb3BlbmluZyBhbmQgY2xvc2luZyBwaXBlcworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogYWxsb2NhdGVfcGlwZXMgaXMgdXNlZCB0byByZXNlcnZlIGF1ZGlvIHBpcGVzIGZvciB5b3VyIGV4Y2x1c2l2ZSB1c2UuCitUaGUgY2FsbCB3aWxsIGZhaWwgaWYgc29tZSBwaXBlcyBhcmUgYWxyZWFkeSBhbGxvY2F0ZWQuICovCitzdGF0aWMgaW50IGFsbG9jYXRlX3BpcGVzKHN0cnVjdCBlY2hvYXVkaW8gKmNoaXAsIHN0cnVjdCBhdWRpb3BpcGUgKnBpcGUsCisJCQkgIGludCBwaXBlX2luZGV4LCBpbnQgaW50ZXJsZWF2ZSkKK3sKKwlpbnQgaTsKKwl1MzIgY2hhbm5lbF9tYXNrOworCWNoYXIgaXNfY3ljbGljOworCisJREVfQUNUKCgiYWxsb2NhdGVfcGlwZXM6IGNoPSVkIGludD0lZFxuIiwgcGlwZV9pbmRleCwgaW50ZXJsZWF2ZSkpOworCisJaWYgKGNoaXAtPmJhZF9ib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KwkqcGlwZS0+ZG1hX2NvdW50ZXIgPSAwOworCURFX0FDVCgoImFsbG9jYXRlX3BpcGVzOiBva1xuIikpOworCXJldHVybiBwaXBlX2luZGV4OworfQorCisKKworc3RhdGljIGludCBmcmVlX3BpcGVzKHN0cnVjdCBlY2hvYXVkaW8gKmNoaXAsIHN0cnVjdCBhdWRpb3BpcGUgKnBpcGUpCit7CisJdTMyIGNoYW5uZWxfbWFzazsKKwlpbnQgaTsKKworCURFX0FDVCgoImZyZWVfcGlwZXM6IFBpcGUgJWRcbiIsIHBpcGUtPmluZGV4KSk7CisJc25kX2Fzc2VydChpc19waXBlX2FsbG9jYXRlZChjaGlwLCBwaXBlLT5pbmRleCksIHJldHVybiAtRUlOVkFMKTsKKwlzbmRfYXNzZXJ0KHBpcGUtPnN0YXRlID09IFBJUEVfU1RBVEVfU1RPUFBFRCwgcmV0dXJuIC1FSU5WQUwpOworCisJZm9yIChjaGFubmVsX21hc2sgPSBpID0gMDsgaSA8IHBpcGUtPmludGVybGVhdmU7IGkrKykKKwkJY2hhbm5lbF9tYXNrIHw9IDEgPDwgKHBpcGUtPmluZGV4ICsgaSk7CisKKwljaGlwLT5waXBlX2FsbG9jX21hc2sgJj0gfmNoYW5uZWxfbWFzazsKKwljaGlwLT5waXBlX2N5Y2xpY19tYXNrICY9IH5jaGFubmVsX21hc2s7CisJcmV0dXJuIDA7Cit9CisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJRnVuY3Rpb25zIGZvciBtYW5hZ2luZyB0aGUgc2NhdHRlci1nYXRoZXIgbGlzdAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50IHNnbGlzdF9pbml0KHN0cnVjdCBlY2hvYXVkaW8gKmNoaXAsIHN0cnVjdCBhdWRpb3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KKyNkZWZpbmUgR0RfQ0xPQ0tfU1BESUZJTgkJMworI2RlZmluZSBHRF9DTE9DS19VTkRFRgkJCTB4ZmYKKworCisvKgorICoKKyAqIEdpbmEvRGFybGEgUy9QRElGIHN0YXR1cyBiaXRzCisgKgorICovCisKKyNkZWZpbmUgR0RfU1BESUZfU1RBVFVTX05PQ0hBTkdFCTAKKyNkZWZpbmUgR0RfU1BESUZfU1RBVFVTXzQ0CQkxCisjZGVmaW5lIEdEX1NQRElGX1NUQVRVU180OAkJMgorI2RlZmluZSBHRF9TUERJRl9TVEFUVVNfVU5ERUYJCTB4ZmYKKworCisvKgorICoKKyAqIExheWxhMjAgb3V0cHV0IGNsb2NrcworICoKKyAqLworCisjZGVmaW5lIExBWUxBMjBfT1VUUFVUX0NMT0NLX1NVUEVSCTAKKyNkZWZpbmUgTEFZTEEyMF9PVVRQVVRfQ0xPQ0tfV09SRAkxCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKworICAgTWFnaWMgY29uc3RhbnRzIGZvciB0aGUgRGFybGEyNCBoYXJkd2FyZQorCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2RlZmluZSBHRDI0Xzk2MDAwCTB4MAorI2RlZmluZSBHRDI0XzQ4MDAwCTB4MQorI2RlZmluZSBHRDI0XzQ0MTAwCTB4MgorI2RlZmluZSBHRDI0XzMyMDAwCTB4MworI2RlZmluZSBHRDI0XzIyMDUwCTB4NAorI2RlZmluZSBHRDI0XzE2MDAwCTB4NQorI2RlZmluZSBHRDI0XzExMDI1CTB4NgorI2RlZmluZSBHRDI0XzgwMDAJMHg3CisjZGVmaW5lIEdEMjRfODgyMDAJMHg4CisjZGVmaW5lIEdEMjRfRVhUX1NZTkMJMHg5CisKKworLyoKKyAqCisgKiBSZXR1cm4gd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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJTUlESSBsb3dsZXZlbCBjb2RlCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIFN0YXJ0IGFuZCBzdG9wIE1pZGkgaW5wdXQgKi8KK3N0YXRpYyBpbnQgZW5hYmxlX21pZGlfaW5wdXQoc3RydWN0IGVjaG9hdWRpbyAqY2hpcCwgY2hhciBlbmFibGUpCit7CisJREVfTUlEKCgiZW5hYmxlX21pZGlfaW5wdXQoJWQpXG4iLCBlbmFibGUpKTsKKworCWlmICh3YWl0X2hhbmRzaGFrZShjaGlwKSkKKwkJcmV0dXJuIC1FSU87CisKKwlpZiAoZW5hYmxlKSB7CisJCWNoaXAtPm10Y19zdGF0ZSA9IE1JRElfSU5fU1RBVEVfTk9STUFMOworCQljaGlwLT5jb21tX3BhZ2UtPmZsYWdzIHw9CisJCQlfX2NvbnN0YW50X2NwdV90b19sZTMyKERTUF9GTEFHX01JRElfSU5QVVQpOworCX0gZWxzZQorCQljaGlwLT5jb21tX3BhZ2UtPmZsYWdzICY9CisJCQl+X19jb25zdGFudF9jcHVfdG9fbGUzMihEU1BfRkxBR19NSURJX0lOUFVUKTsKKworCWNsZWFyX2hhbmRzaGFrZShjaGlwKTsKKwlyZXR1cm4gc2VuZF92ZWN0b3IoY2hpcCwgRFNQX1ZDX1VQREFURV9GTEFHUyk7Cit9CisKKworCisvKiBTZW5kIGEgYnVmZmVyIGZ1bGwgb2YgTUlESSBkYXRhIHRvIHRoZSBEU1AKK1JldHVybnMgaG93IG1hbnkgYWN0dWFsbHkgd3JpdHRlbiBvciA8IDAgb24gZXJyb3IgKi8KK3N0YXRpYyBpbnQgd3JpdGVfbWlkaShzdHJ1Y3QgZWNob2F1ZGlvICpjaGlwLCB1OCAqZGF0YSwgaW50IGJ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IGdldCBNSURJX0lOX1NLSVBfREFUQSBiYWNrLCB0aGVuCisJCXRoaXMgaXMgYSB0aW1lc3RhbXAgYnl0ZSwgbm90IGEgTUlESSBieXRlLCBzbyBkb24ndCBzdG9yZSBpdAorCQlpbiB0aGUgTUlESSBpbnB1dCBidWZmZXIuICovCisJCWlmIChtdGNfcHJvY2Vzc19kYXRhKGNoaXAsIG1pZGlfYnl0ZSkgPT0gTUlESV9JTl9TS0lQX0RBVEEpCisJCQljb250aW51ZTsKKworCQljaGlwLT5taWRpX2J1ZmZlcltyZWNlaXZlZCsrXSA9ICh1OCltaWRpX2J5dGU7CisJfQorCisJcmV0dXJuIHJlY2VpdmVkOworfQorCisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisJTUlESSBpbnRlcmZhY2UKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIGludCBzbmRfZWNob19taWRpX2lucHV0X29wZW4oc3RydWN0IHNuZF9yYXdtaWRpX3N1YnN0cmVhbSAqc3Vic3RyZWFtKQoreworCXN0cnVjdCBlY2hvYXVkaW8gKmNoaXAgPSBzdWJzdHJlYW0tPnJtaWRpLT5wcml2YXRlX2RhdGE7CisKKwljaGlwLT5taWRpX2luID0gc3Vic3RyZWFtOworCURFX01JRCgoInJhd21pZGlfaW9wZW5cbiIpKTsKKwlyZXR1cm4gMDsKK30KKworCisKK3N0YXRpYyB2b2lkIHNuZF9lY2hvX21pZGlfaW5wdXRfdHJpZ2dlcihzdHJ1Y3Qgc25kX3Jhd21pZGlfc3Vic3RyZWFtICpzdWJzdHJlYW0sCisJCQkJCWludCB1cCkKK3sKKwlzdHJ1Y3QgZWNob2F1ZGlvICpjaGlwID0gc3Vic3RyZWFtLT5ybWlkaS0+cHJpdmF0ZV9kYXRhOwor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worCXNwZWMgPSBremFsbG9jKHNpemVvZigqc3BlYyksIEdGUF9LRVJORUwpOworCWlmIChzcGVjID09IE5VTEwpCisJCXJldHVybiAtRU5PTUVNOworCisJY29kZWMtPnNwZWMgPSBzcGVjOworCisJYm9hcmRfY29uZmlnID0gc25kX2hkYV9jaGVja19ib2FyZF9jb25maWcoY29kZWMsIGFsYzg4M19jZmdfdGJsKTsKKwlpZiAoYm9hcmRfY29uZmlnIDwgMCB8fCBib2FyZF9jb25maWcgPj0gQUxDODgzX01PREVMX0xBU1QpIHsKKwkJcHJpbnRrKEtFUk5fSU5GTyAiaGRhX2NvZGVjOiBVbmtub3duIG1vZGVsIGZvciBBTEM4ODMsICIKKwkJICAgICAgICJ0cnlpbmcgYXV0by1wcm9iZSBmcm9tIEJJT1MuLi5cbiIpOworCQlib2FyZF9jb25maWcgPSBBTEM4ODNfQVVUTzsKKwl9CisKKwlpZiAoYm9hcmRfY29uZmlnID09IEFMQzg4M19BVVRPKSB7CisJCS8qIGF1dG9tYXRpYyBwYXJzZSBmcm9tIHRoZSBCSU9TIGNvbmZpZyAqLworCQllcnIgPSBhbGM4ODNfcGFyc2VfYXV0b19jb25maWcoY29kZWMpOworCQlpZiAoZXJyIDwgMCkgeworCQkJYWxjX2ZyZWUoY29kZWMpOworCQkJcmV0dXJuIGVycjsKKwkJfSBlbHNlIGlmICghIGVycikgeworCQkJcHJpbnRrKEtFUk5fSU5GTworCQkJICAgICAgICJoZGFfY29kZWM6IENhbm5vdCBzZXQgdXAgY29uZmlndXJhdGlvbiAiCisJCQkgICAgICAgImZyb20gQklPUy4gIFVzaW5nIGJhc2UgbW9kZS4uLlxuIik7CisJCQlib2FyZF9jb25maWcgPSBBTEM4ODNfM1NUXzJjaF9ESUc7CisJCX0KKwl9CisKKwlpZiAoYm9hcmRfY29uZmlnICE9IEFMQzg4M19BVVRPKQorCQlzZXR1cF9wcmVzZXQoc3BlYywgJmFsYzg4M19wcmVzZXRzW2JvYXJkX2NvbmZpZ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