LyoqCiogQGZpbGUgbmV0b3RoZXJhcGkuaAoqIEBicmllZiBQdWJsaWMgQVBJcyBvZiBTYW5lY2hpcHMgLCBsaW51eCBuZXR3b3JrIGV4dGVybmFsIGludGVyZmFjZQoqCiogQ29weXJpZ2h0IChDKSAyMDE3IFNhbmVjaGlwcyBUZWNobm9sb2d5IENvLiwgTHRkLgoqIEBhdXRob3IgIExpbnh1IEdlYmluCiogQGRlZmdyb3VwIHNpX2lkIFNhbmVjaGlwcwoqCiogVGhpcyBwcm9ncmFtIGlzIGZyZWUgc29mdHdhcmU7IHlvdSBjYW4gcmVkaXN0cmlidXRlIGl0IGFuZC9vciBtb2RpZnkKKiBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIHZlcnNpb24gMiBhcwoqIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLgoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiovCgojaWZuZGVmIF9fTkVUT1RIRVJBUElfSF9fCiNkZWZpbmUgX19ORVRPVEhFUkFQSV9IX18KI2luY2x1ZGUgInp4aWNfbGlzdC5oIgoKI2lmbmRlZiBET1hZR0VOX1NIT1VMRF9TS0lQX1RISVMKCi8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNYWNybyBkZWZpbml0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KCiNkZWZpbmUgV0FLRV9MT0NLX1BBVEggICAgICAgICAgICAgICAgICAiL3N5cy9wb3dlci93YWtlX2xvY2siCiNkZWZpbmUgV0FLRV9VTkxPQ0tfUEFUSCAgICAgICAgICAgICAgICAiL3N5cy9wb3dlci93YWtlX3VubG9jayIKCgoKI2RlZmluZSBQUk9DX0lGX1NUQVRJU1RJQwkiL3Byb2MvbmV0L2RldiIKI2RlZmluZSBUWEJZVEUJCTAgICAgICAgLy+3osvNyv2+3QojZGVmaW5lIFRYUEFDS0VUCTEKI2RlZmluZSBSWEJZVEUJCTIgICAgICAgLy+908rVyv2+3QojZGVmaW5lIFJYUEFDS0VUCTMKI2RlZmluZSBUWEVSUgkJNAojZGVmaW5lIFRYRFJPUAkJNQojZGVmaW5lIFJYRVJSCQk2CiNkZWZpbmUgUlhEUk9QCQk3CgojZGVmaW5lICBQQ19NQVhfTlVNICAxMDAKI2RlZmluZSAgICAgREVWX05BTUVfTEVOIDUwCiNkZWZpbmUgVElNRVJfR0VUSE9TVEJZTkFNRV9JRCAgNjIKCiNkZWZpbmUgc2FmZV9mcmVlKHgpIGRvIHsgaWYoeCkge2ZyZWUoeCk7IHg9TlVMTDt9IH0gd2hpbGUoMCkKCi8qIFVzZWQgdG8gcmV0cnkgc3lzY2FsbHMgdGhhdCBjYW4gcmV0dXJuIEVJTlRSLiAqLwojaWZuZGVmIFRFTVBfRkFJTFVSRV9SRVRSWQojZGVmaW5lIFRFTVBfRkFJTFVSRV9SRVRSWShleHApICh7ICAgICAgICAgICBcCgl0eXBlb2YgKGV4cCkgX3JjOyAgICAgICAgICAgICAgICAgICAgICAgIFwKCWRveyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAoJCV9yYyA9IChleHApOyAgICAgICAgICAgICAgICAgICAgICAgICBcCgl9d2hpbGUoKF9yYyA9PSAtMSkgJiYgKGVycm5vID09IEVJTlRSKSk7IFwKCV9yYzsgfSkKI2VuZGlmCgovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICogICAgICAgICAgICAgICAgICAgICAgIEdsb2JhbCBmdW5jdGlvbiBkZWNsYXJhdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICoKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KCi8qKgoqIEBicmllZiC002RoY3BkLmxlYXNlc87EvP7W0LvxyKFkaGNw0MXPogoqIEBwYXJhbSBkaGNwX2xpc3RfaW5mbyBkaGNwINDFz6LBtLHtCiogQHJldHVybiCzybmmILe1u9ggMCwgyqew3Le1u9gtMQoqLwppbnQgIHp0ZV9nZXRfbWFjX2xpc3RfZnJvbV9sZWFzZShzdHJ1Y3QgbGlzdF9oZWFkICpkaGNwX2xpc3RfaW5mbyk7CgovKioKKiBAYnJpZWYgyeixuNDFz6IKKiBAcGFyYW0gbXlwY19ub2RlICDJ6LG40MXPosG0se0KKiBAcGFyYW0gaW5mbwlpbmZvcm1hdGlvbgoqIEByZXR1cm4gs8m5piC3tbvYIDAsIMqnsNy3tbvYLTEKKi8KaW50IGdldF9kZXZfbGlzdChzdHJ1Y3QgcGNfbm9kZSogbXlwY19ub2RlKTsKCi8qKgoqIEBicmllZiCxo7Tm0MXPorW9zsS8/goqIEBwYXJhbSBmaWxlbmFtZSDOxLz+w/sKKiBAcGFyYW0gaW5mbyDQ6NKqsaO05rXE0MXPogoqIEByZXR1cm4gzt4KKi8Kdm9pZCBzYXZlX2ZpbGUoY2hhciAqZmlsZW5hbWUsIGNoYXIqIGluZm8pOwoKLyoqCiogQGJyaWVmINC00MXPorW9zsS8/goqIEBwYXJhbSBmaWxlbmFtZSDOxLz+w/sKKiBAcGFyYW0gaW5mbyDQ6NKq0LS1xNDFz6IKKiBAcmV0dXJuIM7eCiovCnZvaWQgZmlsZV93cml0ZShjaGFyICpmaWxlbmFt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