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CByZWlzZXJmc3Byb2dzCitvICByZWlzZXJmc3Byb2dzICAgICAgICAgIDMuNi4zICAgICAgICAgICAgICAgICAgICMgcmVpc2VyZnNjayAtVgogbyAgeGZzcHJvZ3MgICAgICAgICAgICAgICAyLjYuMCAgICAgICAgICAgICAgICAgICAjIHhmc19kYiAtVgogbyAgc3F1YXNoZnMtdG9vbHMgICAgICAgICA0LjAgICAgICAgICAgICAgICAgICAgICAjIG1rc3F1YXNoZnMgLXZlcnNpb24KIG8gIGJ0cmZzLXByb2dzICAgICAgICAgICAgMC4xOCAgICAgICAgICAgICAgICAgICAgIyBidHJmc2NrCkBAIC00Niw5ICs0Niw5IEBACiBvICBuZnMtdXRpbHMgICAgICAgICAgICAgIDEuMC41ICAgICAgICAgICAgICAgICAgICMgc2hvd21vdW50IC0tdmVyc2lvbgogbyAgcHJvY3BzICAgICAgICAgICAgICAgICAzLjIuMCAgICAgICAgICAgICAgICAgICAjIHBzIC0tdmVyc2lvbgogbyAgb3Byb2ZpbGUgICAgICAgICAgICAgICAwLjkgICAgICAgICAgICAgICAgICAgICAjIG9wcm9maWxlZCAtLXZlcnNpb24KLW8gIHVkZXYgICAgICAgICAgICAgICAgICAgMDgxICAgICAgICAgICAgICAgICAgICAgIyB1ZGV2aW5mbyAtVgotbyAgZ3J1YiAgICAgICAgICAgICAgICAgICAwLjkzICAgICAgICAgICAgICAgICAgICAjIGdydWIgLS12ZXJzaW9uCi1vICBtY2Vsb2cJCSAgMC42CitvICB1ZGV2ICAgICAgICAgICAgICAgICAgIDA4MSAgICAgICAgICAgICAgICAgICAgICMgdWRldmQgLS12ZXJzaW9uCitvICBncnViICAgICAgICAgICAgICAgICAgIDAuOTMgICAgICAgICAgICAgICAgICAgICMgZ3J1YiAtLXZlcnNpb24gfHwgZ3J1Yi1pbnN0YWxsIC0tdmVyc2lvbgorbyAgbWNlbG9nICAgICAgICAgICAgICAgICAwLjYgICAgICAgICAgICAgICAgICAgICAjIG1jZWxvZyAtLXZlcnNp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VFBVVF9PVkVSTEFZID0gOCwKICNlbmRpZgorICAgICAgICBWNEwyX0JVRl9UWVBFX1ZJREVPX0NBUFRVUkVfTVBMQU5FID0gOSwKKyAgICAgICAgVjRMMl9CVUZfVFlQRV9WSURFT19PVVRQVVRfTVBMQU5FICA9IDEwLAogICAgICAgICBWNEwyX0JVRl9UWVBFX1BSSVZBVEUgICAgICAgICAgICAgID0gMHg4MCwKIH07CiAKKyNkZWZpbmUgVjRMMl9UWVBFX0lTX01VTFRJUExBTkFSKHR5cGUpICAgICAgICAgICAgICAgICAgXAorICAgICAgICAoKHR5cGUpID09IFY0TDJfQlVGX1RZUEVfVklERU9fQ0FQVFVSRV9NUExBTkUgICBcCisgICAgICAgICB8fCAodHlwZSkgPT0gVjRMMl9CVUZfVFlQRV9WSURFT19PVVRQVVRfTVBMQU5FKQorCisjZGVmaW5lIFY0TDJfVFlQRV9JU19PVVRQVVQodHlwZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAoKHR5cGUpID09IFY0TDJfQlVGX1RZUEVfVklERU9fT1VUUFVUICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgIHx8ICh0eXBlKSA9PSBWNEwyX0JVRl9UWVBFX1ZJREVPX09VVFBVVF9NUExBTkUgICAgICAgICBcCisgICAgICAgICB8fCAodHlwZSkgPT0gVjRMMl9CVUZfVFlQRV9WSURFT19PVkVSTEFZICAgICAgICAgICAgICAgXAorICAgICAgICAgfHwgKHR5cGUpID09IFY0TDJfQlVGX1RZUEVfVklERU9fT1VUUFVUX09WRVJMQVkgICAgICAgIFwKKyAgICAgICAgIHx8ICh0eXBlKSA9PSBWNEwyX0JVRl9UWVBFX1ZCSV9PVVRQVVQgICAgICAgICAgICAgICAgICBcCisgICAgICAgICB8fCAodHlwZSkgPT0gVjRMMl9CVUZfVFlQRV9TTElDRURfVkJJX09VVFBVVCkKKwogZW51bSA8bGluayBsaW5rZW5kPSJ2NGwyLXR1bmVyLXR5cGUiPn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X3BsYW5lczogICAgICAgICBudW1iZXIgb2YgcGxhbmVzIGZvciB0aGlzIGZvcm1hdAorICovCitzdHJ1Y3QgPGxpbmsgbGlua2VuZD0idjRsMi1waXgtZm9ybWF0LW1wbGFuZSI+djRsMl9waXhfZm9ybWF0X21wbGFuZTwvbGluaz4geworICAgICAgICBfX3UzMiAgICAgICAgICAgICAgICAgICAgICAgICAgIHdpZHRoOworICAgICAgICBfX3UzMiAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlaWdodDsKKyAgICAgICAgX191MzIgICAgICAgICAgICAgICAgICAgICAgICAgICBwaXhlbGZvcm1hdDsKKyAgICAgICAgZW51bSA8bGluayBsaW5rZW5kPSJ2NGwyLWZpZWxkIj52NGwyX2ZpZWxkPC9saW5rPiAgICAgICAgICAgICAgICAgZmllbGQ7CisgICAgICAgIGVudW0gPGxpbmsgbGlua2VuZD0idjRsMi1jb2xvcnNwYWNlIj52NGwyX2NvbG9yc3BhY2U8L2xpbms+ICAgICAgICAgICAgY29sb3JzcGFjZTsKKworICAgICAgICBzdHJ1Y3QgPGxpbmsgbGlua2VuZD0idjRsMi1wbGFuZS1waXgtZm9ybWF0Ij52NGwyX3BsYW5lX3BpeF9mb3JtYXQ8L2xpbms+ICAgIHBsYW5lX2ZtdFtWSURFT19NQVhfUExBTkVTXTsKKyAgICAgICAgX191OCAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1fcGxhbmVzOworICAgICAgICBfX3U4ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkWzExXTsKK30gX19hdHRyaWJ1dGVfXyAoKHBhY2tlZCkpOworCisvKioKKyAqIHN0cnVjdCA8bGluayBsaW5rZW5kPSJ2NGwyLWZvcm1hdCI+djRsMl9mb3JtYXQ8L2xpbms+IC0gc3RyZWFtIGRhdGEgZm9ybWF0CisgKiBAdHlwZTogICAgICAgdHlwZSBvZiB0aGUgZGF0YSBzdHJlYW0KKyAqIEBwaXg6ICAgICAgICBkZWZpbml0aW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dGVtcy9leG9mcy50eHQKKysrIGIvRG9jdW1lbnRhdGlvbi9maWxlc3lzdGVtcy9leG9mcy50eHQKQEAgLTEwNCw3ICsxMDQsMTUgQEAKICAgICBleG9mcyBzcGVjaWZpYyBvcHRpb25zOiBPcHRpb25zIGFyZSBzZXBhcmF0ZWQgYnkgY29tbWFzICgsKQogCQlwaWQ9PGludGVnZXI+IC0gVGhlIHBhcnRpdGlvbiBudW1iZXIgdG8gbW91bnQvY3JlYXRlIGFzCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRhaW5lciBvZiB0aGUgZmlsZXN5c3RlbS4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhpcyBvcHRpb24gaXMgbWFuZGF0b3J5LgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGlzIG9wdGlvbiBpcyBtYW5kYXRvcnkuIGludGVnZXIgY2FuIGJlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEhleCBieSBwcmUtcGVuZGluZyBhbiAweCB0byB0aGUgbnVtYmVyLgorCQlvc2RuYW1lPTxpZD4gIC0gTW91bnQgYnkgYSBkZXZpY2UncyBvc2RuYW1lLgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvc2RuYW1lIGlzIHVzdWFsbHkgYSAzNiBjaGFyYWN0ZXIgdXVpZCBvZiB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9ybSAiZDI2ODM3MzItYzkwNi00ZWUxLTlkYmQtYzEwYzI3YmI0MGRmIi4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSXQgaXMgb25lIG9mIHRoZSBkZXZpY2UncyB1dWlkIHNwZWNpZmllZCBpbiB0aGUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWtmcy5leG9mcyBmb3JtYXQgY29tbWFuZC4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSWYgdGhpcyBvcHRpb24ga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ICAgICAgICAgICAgICBibG9ja3MgdGhhdCBhcmUgZGlydHkgaW4gdGhlIHBhZ2UgY2FjaGUsIGJ1dAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpY2ggZG8gbm90IGhhdmUgdGhlaXIgbG9jYXRpb24gaW4gdGhlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWxlc3lzdGVtIGFsbG9jYXRlZCB5ZXQuCisKKyBpbm9kZV9nb2FsICAgICAgICAgICAgICAgICAgIFR1bmluZyBwYXJhbWV0ZXIgd2hpY2ggKGlmIG5vbi16ZXJvKSBjb250cm9scworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGdvYWwgaW5vZGUgdXNlZCBieSB0aGUgaW5vZGUgYWxsb2NhdG9yIGluCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVmZXJlbmNlIHRvIGFsbCBvdGhlciBhbGxvY2F0aW9uIGhldXJpc3RpY3MuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGlzIGlzIGludGVuZGVkIGZvciBkZWJ1Z2dpbmcgdXNlIG9ubHksIGFuZAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2hvdWxkIGJlIDAgb24gcHJvZHVjdGlvbiBzeXN0ZW1zLgorCisgaW5vZGVfcmVhZGFoZWFkX2Jsa3MgICAgICAgICBUdW5pbmcgcGFyYW1ldGVyIHdoaWNoIGNvbnRyb2xzIHRoZSBtYXhpbXVtCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBudW1iZXIgb2YgaW5vZGUgdGFibGUgYmxvY2tzIHRoYXQgZXh0NCdzIGlub2RlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0YWJsZSByZWFkYWhlYWQgYWxnb3JpdGhtIHdpbGwgcHJlLXJlYWQgaW50bworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGJ1ZmZlciBjYWNoZQorCisgbGlmZXRpbWVfd3JpdGVfa2J5dGVzICAgICAgICBUaGlzIGZpbGUgaXMgcmVhZC1vbmx5IGFuZCBzaG93cyB0aGUgbnVtYmVyIG9mCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBraWxvYnl0ZXMgb2YgZGF0YSB0aGF0IGhhdmUgYmVlbiB3cml0dGVuIHRvIHRoaXMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZpbGVzeXN0ZW0gc2luY2UgaXQgd2FzIGNyZWF0ZWQuCisKKyBtYXhfd3JpdGViYWNrX21iX2J1bXAgICAgICAgIFRoZSBtYXhpbXVtIG51bWJlciBvZiBtZWdhYnl0ZXMgdGhlIHdyaXRlYmFjaworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29kZSB3aWxsIHRyeSB0byB3cml0ZSBvdXQgYmVmb3JlIG1vdmUgb24gdG8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFub3RoZXIgaW5vZGUuCisKKyBtYl9ncm91cF9wcmVhbGxvYyAgICAgICAgICAgIFRoZSBtdWx0aWJsb2NrIGFsbG9jYXRvciB3aWxsIHJvdW5kIHVwIGFsbG9jYXRpb24KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVlc3RzIHRvIGEgbXVsdGlwbGUgb2YgdGhpcyB0dW5pbmcgcGFyYW1ldGVyIGlmCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgc3RyaXBlIHNpemUgaXMgbm90IHNldCBpbiB0aGUgZXh0NCBzdXBlcmJsb2NrCisKKyBtYl9tYXhfdG9fc2NhbiAgICAgICAgICAgICAgIFRoZSBtYXhpbXVtIG51bWJlciBvZiBleHRlbnRzIHRoZSBtdWx0aWJsb2NrCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGxvY2F0b3Igd2lsbCBzZWFyY2ggdG8gZmluZCB0aGUgYmVzdCBleHRlbnQKKworIG1iX21pbl90b19zY2FuICAgICAgICAgICAgICAgVGhlIG1pbmltdW0gbnVtYmVyIG9mIGV4dGVudHMgdGhlIG11bHRpYmxvY2sKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsbG9jYXRvciB3aWxsIHNlYXJjaCB0byBmaW5kIHRoZSBiZXN0IGV4dGVudAorCisgbWJfb3JkZXIyX3JlcSAgICAgICAgICAgICAgICBUdW5pbmcgcGFyYW1ldGVyIHdoaWNoIGNvbnRyb2xzIHRoZSBtaW5pbXVtIHNpemUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciByZXF1ZXN0cyAoYXMgYSBwb3dlciBvZiAyKSB3aGVyZSB0aGUgYnVkZHkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlIGlzIHVzZWQKKworIG1iX3N0YXRzICAgICAgICAgICAgICAgICAgICAgQ29udHJvbHMgd2hldGhlciB0aGUgbXVsdGlibG9jayBhbGxvY2F0b3Igc2hvdWxkCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb2xsZWN0IHN0YXRpc3RpY3MsIHdoaWNoIGFyZSBzaG93biBkdXJpbmcgdGhlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bm1vdW50LiAxIG1lYW5zIHRvIGNvbGxlY3Qgc3RhdGlzdGljcywgMCBtZWFucworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbm90IHRvIGNvbGxlY3Qgc3RhdGlzdGljcworCisgbWJfc3RyZWFtX3JlcSAgICAgICAgICAgICAgICBGaWxlcyB3aGljaCBoYXZlIGZld2VyIGJsb2NrcyB0aGFuIHRoaXMgdHVuYWJsZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1ldGVyIHdpbGwgaGF2ZSB0aGVpciBibG9ja3MgYWxsb2NhdGVkIG91dAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb2YgYSBibG9jayBncm91cCBzcGVjaWZpYyBwcmVhbGxvY2F0aW9uIHBvb2wsIHNvCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGF0IHN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bnRzIGZvciByZWFkIik7CisKKwl3aGlsZSAoZnNjYW5mKGZwLCAiJSpzICUiCisJCSAgICAgIFNUUihNQVhfUEFUSCkKKwkJICAgICAgInMgJTk5cyAlKnMgJSpkICUqZFxuIiwKKwkJICAgICAgaHdwb2lzb25fZGVidWdfZnMsIHR5cGUpID09IDIpIHsKKwkJaWYgKHN0cmNtcCh0eXBlLCAiZGVidWdmcyIpID09IDApCisJCQlicmVhazsKKwl9CisJZmNsb3NlKGZwKTsKKworCWlmIChzdHJjbXAodHlwZSwgImRlYnVnZnMiKSAhPSAwKQorCQlyZXR1cm4gTlVMTDsKKworCXJldHVybiBod3BvaXNvbl9kZWJ1Z19mczsKK30KKworLyogbW91bnQgdGhlIGRlYnVnZnMgc29tZXdoZXJlIGlmIGl0J3Mgbm90IG1vdW50ZWQgKi8KKworc3RhdGljIHZvaWQgZGVidWdmc19tb3VudCh2b2lkKQoreworCWNvbnN0IGNoYXIgKipwdHI7CisKKwkvKiBzZWUgaWYgaXQncyBhbHJlYWR5IG1vdW50ZWQgKi8KKwlpZiAoZGVidWdmc19maW5kX21vdW50cG9pbnQoKSkKKwkJcmV0dXJuOworCisJcHRyID0gZGVidWdmc19rbm93bl9tb3VudHBvaW50czsKKwl3aGlsZSAoKnB0cikgeworCQlpZiAobW91bnQoTlVMTCwgKnB0ciwgImRlYnVnZnMiLCAwLCBOVUxMKSA9PSAwKSB7CisJCQkvKiBzYXZlIHRoZSBtb3VudHBvaW50ICovCisJCQlzdHJjcHkoaHdwb2lzb25fZGVidWdfZnMsICpwdHIpOworCQkJYnJlYWs7CisJCX0KKwkJcHRyKys7CisJfQorCisJaWYgKCpwdHIgPT0gTlVMTCkgeworCQlwZXJyb3IoIm1vdW50IGRlYnVnZnMiKTsKKwkJZXhpdChFWElUX0ZBSUxVUkUpOworCX0KK30KKwogLyoKICAqIHBhZ2UgYWN0aW9ucwogICovCiAKIHN0YXRpYyB2b2lkIHByZXBhcmVfaHdwb2lzb25fZmQodm9pZ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CB0aHJlYWRfaW5mbywgcHJlZW1wdF9jb3VudCkpOworCURFRklORShUSU5GT19GTEFHUywgb2Zmc2V0b2Yoc3RydWN0IHRocmVhZF9pbmZvLCBmbGFncykpOworCisJLyogb2Zmc2V0cyBpbnRvIHRoZSBwdF9yZWdzICovCisJREVGSU5FKFBUX09GRl9EMCwgb2Zmc2V0b2Yoc3RydWN0IHB0X3JlZ3MsIGQwKSk7CisJREVGSU5FKFBUX09GRl9PUklHX0QwLCBvZmZzZXRvZihzdHJ1Y3QgcHRfcmVncywgb3JpZ19kMCkpOworCURFRklORShQVF9PRkZfRDEsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBkMSkpOworCURFRklORShQVF9PRkZfRDIsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBkMikpOworCURFRklORShQVF9PRkZfRDMsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBkMykpOworCURFRklORShQVF9PRkZfRDQsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBkNCkpOworCURFRklORShQVF9PRkZfRDUsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBkNSkpOworCURFRklORShQVF9PRkZfQTAsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBhMCkpOworCURFRklORShQVF9PRkZfQTEsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBhMSkpOworCURFRklORShQVF9PRkZfQTIsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBhMikpOworCURFRklORShQVF9PRkZfUEMsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBwYykpOworCURFRklORShQVF9PRkZfU1IsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBzcikpOworCS8qIGJpdGZpZWxkcyBhcmUgYSBiaXQgZGlmZmljdWx0ICovCisJREVGSU5FKFBUX09GRl9GT1JNQVRWRUMsIG9mZnNldG9mKHN0cnVjdCBwdF9yZWdzLCBwYykgKyA0KTsK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ib290aW5mbyhyZWNvcmQpOworCQkJZWxzZSBpZiAoTUFDSF9JU19IUDMwMCkKKwkJCQl1bmtub3duID0gaHAzMDBfcGFyc2VfYm9vdGluZm8ocmVjb3JkKTsKKwkJCWVsc2UgaWYgKE1BQ0hfSVNfQVBPTExPKQorCQkJCXVua25vd24gPSBhcG9sbG9fcGFyc2VfYm9vdGluZm8ocmVjb3JkKTsKKwkJCWVsc2UKKwkJCQl1bmtub3duID0gMTsKKwkJfQorCQlpZiAodW5rbm93bikKKwkJCXByaW50aygibTY4a19wYXJzZV9ib290aW5mbzogdW5rbm93biB0YWcgMHglMDR4IGlnbm9yZWRcbiIsCisJCQkgICAgICAgcmVjb3JkLT50YWcpOworCQlyZWNvcmQgPSAoc3RydWN0IGJpX3JlY29yZCAqKSgodW5zaWduZWQgbG9uZylyZWNvcmQgKworCQkJCQkgICAgICByZWNvcmQtPnNpemUpOworCX0KKworCW02OGtfcmVhbG51bV9tZW1vcnkgPSBtNjhrX251bV9tZW1vcnk7CisjaWZkZWYgQ09ORklHX1NJTkdMRV9NRU1PUllfQ0hVTksKKwlpZiAobTY4a19udW1fbWVtb3J5ID4gMSkgeworCQlwcmludGsoIklnbm9yaW5nIGxhc3QgJWkgY2h1bmtzIG9mIHBoeXNpY2FsIG1lbW9yeVxuIiwKKwkJICAgICAgIChtNjhrX251bV9tZW1vcnkgLSAxKSk7CisJCW02OGtfbnVtX21lbW9yeSA9IDE7CisJfQorI2VuZGlmCit9CisKK3ZvaWQgX19pbml0IHNldHVwX2FyY2goY2hhciAqKmNtZGxpbmVfcCkKK3sKKwlpbnQgaTsKKworCS8qIFRoZSBib290aW5mbyBpcyBsb2NhdGVkIHJpZ2h0IGFmdGVyIHRoZSBrZXJuZWwgYnNzICovCisJbTY4a19wYXJzZV9ib290aW5mbygoY29uc3Qgc3RydWN0IGJpX3JlY29yZCAqKV9lbmQpOworCisJaWYgKENQVV9JU18wNDApCisJCW02OGtfaXMwNDBvcjA2MCA9IDQ7CisJ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NfMDIwX09SXzAzMCkgeworCQkJaWYgKG02OGtfZnB1dHlwZSAmIEZQVV82ODg4MSAmJgorCQkJICAgICEoY29udGV4dF9zaXplID09IDB4MTggfHwgY29udGV4dF9zaXplID09IDB4YjQpKQorCQkJCWdvdG8gb3V0OworCQkJaWYgKG02OGtfZnB1dHlwZSAmIEZQVV82ODg4MiAmJgorCQkJICAgICEoY29udGV4dF9zaXplID09IDB4MzggfHwgY29udGV4dF9zaXplID09IDB4ZDQpKQorCQkJCWdvdG8gb3V0OworCQl9IGVsc2UgaWYgKENQVV9JU18wNDApIHsKKwkJCWlmICghKGNvbnRleHRfc2l6ZSA9PSAweDAwIHx8CisJCQkgICAgICBjb250ZXh0X3NpemUgPT0gMHgyOCB8fAorCQkJICAgICAgY29udGV4dF9zaXplID09IDB4NjApKQorCQkJCWdvdG8gb3V0OworCQl9IGVsc2UgaWYgKENQVV9JU18wNjApIHsKKwkJCWlmICghKGZwc3RhdGVbM10gPT0gMHgwMCB8fAorCQkJICAgICAgZnBzdGF0ZVszXSA9PSAweDYwIHx8CisJCQkgICAgICBmcHN0YXRlWzNdID09IDB4ZTApKQorCQkJCWdvdG8gb3V0OworCQl9IGVsc2UKKwkJCWdvdG8gb3V0OworCQlpZiAoX19jb3B5X2Zyb21fdXNlcigmZnByZWdzLCAmdWMtPnVjX21jb250ZXh0LmZwcmVncywKKwkJCQkgICAgIHNpemVvZihmcHJlZ3MpKSkKKwkJCWdvdG8gb3V0OworCQlfX2FzbV9fIHZvbGF0aWxlICgiLmNoaXAgNjhrLzY4ODgxXG5cdCIKKwkJCQkgICJmbW92ZW14ICUwLCUlZnAwLSUlZnA3XG5cdCIKKwkJCQkgICJmbW92ZW1sICUxLCUlZnBjci8lJWZwc3IvJSVmcGlhclxuXHQiCisJCQkJICAiLmNoaXAgNjhrIgorCQkJCSAgOiAvKiBubyBvdXRwdXRzICovCisJCQkJICA6ICJtIiAoKmZwcmVncy5mX2ZwcmVncyksCisJCQkJICAgICJtIiAo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FUQToKKwkgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyAoIm5vcFxuXHQiCisJCQkJICAgICIuY2hpcCA2ODA0MFxuXHQiCisJCQkJICAgICJjcHVzaGwgJSVkYywoJTApXG5cdCIKKwkJCQkgICAgIi5jaGlwIDY4ayIKKwkJCQkgICAgOiA6ICJhIiAocGFkZHIpKTsKKwkgICAgICBicmVhazsKKwkgICAgY2FzZSBGTFVTSF9DQUNIRV9JTlNOOgorCSAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgibm9wXG5cdCIKKwkJCQkgICAgIi5jaGlwIDY4MDQwXG5cdCIKKwkJCQkgICAgImNwdXNobCAlJWljLCglMClcblx0IgorCQkJCSAgICAiLmNoaXAgNjhrIgorCQkJCSAgICA6IDogImEiIChwYWRkcikpOworCSAgICAgIGJyZWFrOworCSAgICBkZWZhdWx0OgorCSAgICBjYXNlIEZMVVNIX0NBQ0hFX0JPVEg6CisJICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCJub3Bcblx0IgorCQkJCSAgICAiLmNoaXAgNjgwNDBcblx0IgorCQkJCSAgICAiY3B1c2hsICUlYmMsKCUwKVxuXHQiCisJCQkJICAgICIuY2hpcCA2OGsiCisJCQkJICAgIDogOiAiYSIgKHBhZGRyKSk7CisJICAgICAgYnJlYWs7CisJICAgIH0KKwkgIGlmICghLS1pICYmIGxlbikKKwkgICAgeworCSAgICAgIC8qCisJICAgICAgICogTm8gbmVlZCB0byBwYWdlIGFsaWduIGhlcmUgc2luY2UgaXQgaXMgZG9uZSBieQorCSAgICAgICAqIHZpcnRfdG9fcGh5c18wNDAoKS4KKwkgICAgICAgKi8KKwkgICAgICBhZGRyICs9IFBBR0VfU0laRTsKKwkgICAgICBpID0gUEFHRV9TSVpFIC8gMTY7CisJICAgICAgLyogUmVjb21wdXRlIHBoeXNpY2FsIGFkZHJlc3Mgd2hlbiBjcm9zc2luZyBhIHBhZ2UKKwkgICAgICAgICBib3VuZGFyeS4gKi8KKwkgICAgICBmb3IgKDs7KQorCQl7CisJCSAgaWYgKChwYWRkciA9IHZpcnRfdG9fcGh5c18wNDAoYWRkcikpKQorCQkgICAgYnJlYWs7CisJCSAgaWYgKGxlbiA8PSBpKQorCQkgICAgcmV0dXJuIDA7CisJCSAgbGVuIC09IGk7CisJCSAgYWRkciArPSBQQUdFX1NJWkU7CisJCX0KKwkgICAgfQorCSAgZWxzZQorCSAgICBwYWRkciArPSAxNjsKKwl9CisgICAgICBicmVhazsKKworICAgIGRlZmF1bHQ6CisgICAgY2FzZSBGTFVTSF9TQ09QRV9QQUdFOgorICAgICAgbGVuICs9IChhZGRyICYgflBBR0VfTUFTSykgKyAoUEFHRV9TSVpFIC0gMSk7CisgICAgICBmb3IgKGxlbiA+Pj0gUEFHRV9TSElGVDsgbGVuLS07IGFkZHIgKz0gUEFHRV9TSVpFKQorCXsKKwkgIGlmICghKHBhZGRyID0gdmlydF90b19waHlzXzA0MChhZGRyKSkpCisJICAgIGNvbnRpbnVlOworCSAgc3dpdGNoIChjYWNoZSkKKwkgICAgeworCSAgICBjYXNlIEZMVVNIX0NBQ0hFX0RBVEE6CisJICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCJub3Bcblx0IgorCQkJCSAgICAiLmNoaXAgNjgwNDBcblx0IgorCQkJCSAgICAiY3B1c2hwICUlZGMsKCUwKVxuXHQiCisJCQkJICAgICIuY2hpcCA2OGsiCisJCQkJICAgIDogOiAiYSIgKHBhZGRyKSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgRkxVU0hfQ0FDSEVfSU5TTjoKKwkgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyAoIm5vcFxuXHQiCisJCQkJICAgICIuY2hpcCA2ODA0MFxuXHQiCisJCQkJICAgICJjcHVzaHAgJSVpYywoJTApXG5cdCIKKwkJCQkgICAgIi5jaGlwIDY4ayIKKwkJCQkgICAgOiA6ICJhIiAocGFkZHIpKTsKKwkgICAgICBicmVhazsKKwkgICAgZGVmYXVsdDoKKwkgICAgY2FzZSBGTFVTSF9DQUNIRV9CT1RIOgorCSAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgibm9wXG5cdCIKKwkJCQkgICAgIi5jaGlwIDY4MDQwXG5cdCIKKwkJCQkgICAgImNwdXNocCAlJWJjLCglMClcblx0IgorCQkJCSAgICAiLmNoaXAgNjhrIgorCQkJCSAgICA6IDogImEiIChwYWRkcikpOworCSAgICAgIGJyZWFrOworCSAgICB9CisJfQorICAgICAgYnJlYWs7CisgICAgfQorICByZXR1cm4gMDsKK30KKworI2RlZmluZSB2aXJ0X3RvX3BoeXNfMDYwKHZhZGRyKQkJCQlcCisoewkJCQkJCQlcCisgIHVuc2lnbmVkIGxvbmcgcGFkZHI7CQkJCQlcCisgIF9fYXNtX18gX192b2xhdGlsZV9fICgiLmNoaXAgNjgwNjBcblx0IgkJXAorCQkJInBscGFyICglMClcblx0IgkJXAorCQkJIi5jaGlwIDY4ayIJCQlcCisJCQk6ICI9YSIgKHBhZGRyKQkJCVwKKwkJCTogIjAiICh2YWRkcikpOwkJCVwKKyAgKHBhZGRyKTsgLyogWFhYICovCQkJCQlcCit9KQorCitzdGF0aWMgaW5saW5lIGludAorY2FjaGVfZmx1c2hfMDYwICh1bnNpZ25lZCBsb25nIGFkZHIsIGludCBzY29wZSwgaW50IGNhY2hlLCB1bnNpZ25lZCBsb25nIGxlbikKK3sKKyAgdW5zaWduZWQgbG9uZyBwYWRkciwgaTsKKworICAvKgorICAgKiA2ODA2MCBtYW51YWwgc2F5czoKKyAgICogIGNwdXNoICVkYyA6IGZsdXNoIERDLCByZW1haW5zIHZhbGlkICh3aXRoIG91ciAlY2FjciBzZXR1cCkKKyAgICogIGNwdXNoICVpYyA6IGludmFsaWRhdGUgSUMKKyAgICogIGNwdXNoICViYyA6IGZsdXNoIERDICsgaW52YWxpZGF0ZSBJQworICAgKi8KKyAgc3dpdGNoIChzY29wZSkKKyAgICB7CisgICAgY2FzZSBGTFVTSF9T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RfdG9fcGh5c18wNjAoYWRkcikpKQorCSAgICAgIGJyZWFrOworCSAgICBpZiAobGVuIDw9IHRtcCkKKwkgICAgICByZXR1cm4gMDsKKwkgICAgYWRkciArPSB0bXA7CisJICAgIGxlbiAtPSB0bXA7CisJICB9CisgICAgICB9CisgICAgICBsZW4gPSAobGVuICsgMTUpID4+IDQ7CisgICAgICBpID0gKFBBR0VfU0laRSAtIChwYWRkciAmIH5QQUdFX01BU0spKSA+PiA0OworICAgICAgd2hpbGUgKGxlbi0tKQorCXsKKwkgIHN3aXRjaCAoY2FjaGUpCisJICAgIHsKKwkgICAgY2FzZSBGTFVTSF9DQUNIRV9EQVRBOgorCSAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fICgiLmNoaXAgNjgwNjBcblx0IgorCQkJCSAgICAiY3B1c2hsICUlZGMsKCUwKVxuXHQiCisJCQkJICAgICIuY2hpcCA2OGsiCisJCQkJICAgIDogOiAiYSIgKHBhZGRyKSk7CisJICAgICAgYnJlYWs7CisJICAgIGNhc2UgRkxVU0hfQ0FDSEVfSU5TTjoKKwkgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyAoIi5jaGlwIDY4MDYwXG5cdCIKKwkJCQkgICAgImNwdXNobCAlJWljLCglMClcblx0IgorCQkJCSAgICAiLmNoaXAgNjhrIgorCQkJCSAgICA6IDogImEiIChwYWRkcikpOworCSAgICAgIGJyZWFrOworCSAgICBkZWZhdWx0OgorCSAgICBjYXNlIEZMVVNIX0NBQ0hFX0JPVEg6CisJICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCIuY2hpcCA2ODA2MFxuXHQiCisJCQkJICAgICJjcHVzaGwgJSViYywoJTApXG5cdCIKKwkJCQkgICAgIi5jaGlwIDY4ayIKKwkJCQkgICAgOiA6ICJhIiAocGFkZHIpKTsKKwkgICAgICBicmVhazsKKwkgICAgfQorCSAgaWYgKCEtLWkgJiYgbGVuKQorCSAgICB7CisKKwkgICAgICAvKgorCSAgICAgICAqIFdlIGp1c3Qgd2FudCB0byBqdW1wIHRvIHRoZSBmaXJzdCBjYWNoZSBsaW5lCisJICAgICAgICogaW4gdGhlIG5leHQgcGFnZS4KKwkgICAgICAgKi8KKwkgICAgICBhZGRyICs9IFBBR0VfU0laRTsKKwkgICAgICBhZGRyICY9IFBBR0VfTUFTSzsKKworCSAgICAgIGkgPSBQQUdFX1NJWkUgLyAxNjsKKwkgICAgICAvKiBSZWNvbXB1dGUgcGh5c2ljYWwgYWRkcmVzcyB3aGVuIGNyb3NzaW5nIGEgcGFnZQorCSAgICAgICAgIGJvdW5kYXJ5LiAqLworCSAgICAgIGZvciAoOzspCisJICAgICAgICB7CisJICAgICAgICAgIGlmICgocGFkZHIgPSB2aXJ0X3RvX3BoeXNfMDYwKGFkZHIpKSkKKwkgICAgICAgICAgICBicmVhazsKKwkgICAgICAgICAgaWYgKGxlbiA8PSBpKQorCSAgICAgICAgICAgIHJldHVybiAwOworCSAgICAgICAgICBsZW4gLT0gaTsKKwkgICAgICAgICAgYWRkciArPSBQQUdFX1NJWkU7CisJICAgICAgICB9CisJICAgIH0KKwkgIGVsc2UKKwkgICAgcGFkZHIgKz0gMTY7CisJfQorICAgICAgYnJlYWs7CisKKyAgICBkZWZhdWx0OgorICAgIGNhc2UgRkxVU0hfU0NPUEVfUEFHRToKKyAgICAgIGxlbiArPSAoYWRkciAmIH5QQUdFX01BU0spICsgKFBBR0VfU0laRSAtIDEpOworICAgICAgYWRkciAmPSBQQUdFX01BU0s7CS8qIFdvcmthcm91bmQgZm9yIGJ1ZyBpbiBzb21lCisJCQkJICAgcmV2aXNpb25zIG9mIHRoZSA2ODA2MCAqLworICAgICAgZm9yIChsZW4gPj49IFBBR0VfU0hJRlQ7IGxlbi0tOyBhZGRyICs9IFBBR0VfU0laRSkKKwl7CisJICBpZiAoIShwYWRkciA9IHZpcnRfdG9fcGh5c18wNjAoYWRkcikpKQorCSAgICBjb250aW51ZTsKKwkgIHN3aXRjaCAoY2FjaGUpCisJICA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vZGQgcmVzdDogZ2V0IGJ5dGUgKi8KKwkJIm1vdmViICU1LCUzQCtcblx0IgorCQkibHNsdyAjOCwlNVxuXHQiCS8qIGludG8gYml0cyA4Li4xNTsgMTYuLjMxIHVudG91Y2hlZCAqLworCSAgICAgIjY6XHQiCisJCSJhZGRsICU1LCUwXG5cdCIJLyogbm93IGFkZCByZXN0IGxvbmcgdG8gc3VtICovCisJCSJjbHJsICU1XG5cdCIKKwkJImFkZHhsICU1LCUwXG5cdCIJLyogYWRkIFggYml0ICovCisJICAgICAiNzpcdCIKKwkJImNscmwgJTVcbiIJCS8qIG5vIGVycm9yIC0gY2xlYXIgcmV0dXJuIHZhbHVlICovCisJICAgICAiODpcbiIKKwkJIi5zZWN0aW9uIC5maXh1cCxcImF4XCJcbiIKKwkJIi5ldmVuXG4iCisJCS8qIElmIGFueSBleGNlcHRpb24gb2NjdXJzIHplcm8gb3V0IHRoZSByZXN0LgorCQkgICBTaW1pbGFyaXRpZXMgd2l0aCB0aGUgY29kZSBhYm92ZSBhcmUgaW50ZW50aW9uYWwgOi0pICovCisJICAgICAiOTA6XHQiCisJCSJjbHJ3ICUzQCtcblx0IgorCQkibW92ZWwgJTEsJTRcblx0IgorCQkibHNybCAjNSwlMVxuXHQiCisJCSJqZXEgMWZcblx0IgorCQkic3VicWwgIzEsJTFcbiIKKwkgICAgICI5MTpcdCIKKwkJImNscmwgJTNAK1xuIgorCSAgICAgIjkyOlx0IgorCQkiY2xybCAlM0ArXG4iCisJICAgICAiOTM6XHQiCisJCSJjbHJsICUzQCtcbiIKKwkgICAgICI5NDpcdCIKKwkJImNscmwgJTNAK1xuIgorCSAgICAgIjk1Olx0IgorCQkiY2xybCAlM0ArXG4iCisJICAgICAiOTY6XHQiCisJCSJjbHJsICUzQCtcbiIKKwkgICAgICI5NzpcdCIKKwkJImNscmwgJTNAK1xuIgorCSAgICAgIjk4Olx0IgorCQkiY2xybCAlM0ArXG5cdCIKKwkJImRicmEgJTEsOTFiXG5cdCI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JCTogIj0mZCIgKHByZXYpLCAiPSZkIiAodG1wKSwgIj1RIiAoKihpbnQgKikgcHRyKQorCQkJOiAiZCIgKG9sZCA8PCBzaGlmdCksICJkIiAobmV3IDw8IHNoaWZ0KSwKKwkJCSAgImQiICh+KDY1NTM1IDw8IHNoaWZ0KSksICJRIiAoKihpbnQgKikgcHRyKQorCQkJOiAibWVtb3J5IiwgImNjIik7CisJCXJldHVybiBwcmV2ID4+IHNoaWZ0OworCWNhc2UgNDoKKwkJYXNtIHZvbGF0aWxlKAorCQkJIgljcwklMCwlMywlMVxuIgorCQkJOiAiPSZkIiAocHJldiksICI9USIgKCooaW50ICopIHB0cikKKwkJCTogIjAiIChvbGQpLCAiZCIgKG5ldyksICJRIiAoKihpbnQgKikgcHRyKQorCQkJOiAibWVtb3J5IiwgImNjIik7CisJCXJldHVybiBwcmV2OworI2lmZGVmIENPTkZJR182NEJJVAorCWNhc2UgODoKKwkJYXNtIHZvbGF0aWxlKAorCQkJIgljc2cJJTAsJTMsJTFcbiIKKwkJCTogIj0mZCIgKHByZXYpLCAiPVEiICgqKGxvbmcgKikgcHRyKQorCQkJOiAiMCIgKG9sZCksICJkIiAobmV3KSwgIlEiICgqKGxvbmcgKikgcHRyKQorCQkJOiAibWVtb3J5IiwgImNjIik7CisJCXJldHVybiBwcmV2OworI2VuZGlmIC8qIENPTkZJR182NEJJVCAqLworCX0KKwlfX2NtcHhjaGdfY2FsbGVkX3dpdGhfYmFkX3BvaW50ZXIoKTsKKwlyZXR1cm4gb2xkOworfQorCisjZGVmaW5lIGNtcHhjaGcocHRyLCBvLCBuKQkJCQkJCVwKKwkoKF9fdHlwZW9mX18oKihwdHIpKSlfX2NtcHhjaGcoKHB0ciksICh1bnNpZ25lZCBsb25nKShvKSwJXAorCQkJCSAgICAgICAodW5zaWduZWQgbG9uZykobiksIHNpemVvZigqKHB0cikpKSkKKworI2lmZGVmIENPTkZJR182NEJJVAorI2RlZmluZSBjbXB4Y2hnNjQocHRyLCBvL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AwMDAyMDAwCi0jZGVmaW5lIFNaXzE2SyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDAwMAotI2RlZmluZSBTWl8zMksJCQkJMHgwMDAwODAwMAotI2RlZmluZSBTWl82NEsgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMTAwMDAKLSNkZWZpbmUgU1pfMTI4SyAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDIwMDAwCi0jZGVmaW5lIFNaXzI1NksgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA0MDAwMAotI2RlZmluZSBTWl81MTJLICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwODAwMDAKLQotI2RlZmluZSBTWl8xTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAxMDAwMDAKLSNkZWZpbmUgU1pfMk0gICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMjAwMDAwCi0jZGVmaW5lIFNaXzRNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDQwMDAwMAotI2RlZmluZSBTWl84TSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4MDAwMDAKLSNkZWZpbmUgU1pfMTZNICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAwMDAwCi0jZGVmaW5lIFNaXzI2TQkJCQkweDAxYTAwMDAwCi0jZGVmaW5lIFNaXzMyTSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwMDAwMAotI2RlZmluZSBTWl82NE0gICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwMDAwMDAKLSNkZWZpbmUgU1pfMTI4TSAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAwMDAwCi0jZGVmaW5lIFNaXzI1Nk0gICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMDAwMAotI2RlZmluZSBTWl81MTJNICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMDAwMDAKLQotI2RlZmluZSBTWl8xRyAgICAgICAgICAgICAgICAgICAg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VuZGlmCi0jZW5kaWYKLQogLyogTG9jayBzdHJ1Y3R1cmUgZm9yIHJlYWRlci93cml0ZXIgaW50ZXJmYWNlcyAqLwogCiBzdHJ1Y3QgYWNwaV9yd19sb2NrIHsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvZHNhcmdzLmMgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2RzYXJncy5jCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjhjN2I5OTcKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL2FjcGkvYWNwaWNhL2RzYXJncy5jCkBAIC0wLDAgKzEsMzkxIEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogTW9kdWxlIE5hbWU6IGRzYXJncyAtIFN1cHBvcnQgZm9yIGV4ZWN1dGlvbiBvZiBkeW5hbWljIGFyZ3VtZW50cyBmb3Igc3RhdGljCisgKiAgICAgICAgICAgICAgICAgICAgICAgb2JqZWN0cyAocmVnaW9ucywgZmllbGRzLCBidWZmZXIgZmllbGRzLCBldGMuKQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIENvcHlyaWdodCAoQykgMjAwMCAtIDIwMTEsIEludGVsIENvcnAuCisgKiBBbGwgcmlnaHRzIHJlc2VydmVkLgorICoKKyAqIFJlZGlzdHJpYnV0aW9uIGFuZCB1c2UgaW4gc291cmNlIGFuZCBiaW5hcnkgZm9ybXMsIHdpdGggb3Igd2l0aG91dAorICogbW9kaWZpY2F0aW9uLCBhcmUgcGVybWl0dGVkIHByb3ZpZGVkIHRoYXQgdGhlIGZvbGxvd2luZyBjb25kaXRpb25zCisgKiBhcmUgbWV0OgorICogMS4gUmVkaXN0cmlidXRp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hFCisgKiBQT1NTSUJJTElUWSBPRiBTVUNIIERBTUFHRVMuCisgKi8KKworI2luY2x1ZGUgPGFjcGkvYWNwaS5oPgorI2luY2x1ZGUgImFjY29tbW9uLmgiCisjaW5jbHVkZSAiYWNwYXJzZXIuaCIKKyNpbmNsdWRlICJhbWxjb2RlLmgiCisjaW5jbHVkZSAiYWNkaXNwYXQuaCIKKyNpbmNsdWRlICJhY25hbWVzcC5oIgorCisjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9ESVNQQVRDSEVSCitBQ1BJX01PRFVMRV9OQU1FKCJkc2FyZ3MiKQorCisvKiBMb2NhbCBwcm90b3R5cGVzICovCitzdGF0aWMgYWNwaV9zdGF0dXMKK2FjcGlfZHNfZXhlY3V0ZV9hcmd1bWVudHMoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGUsCisJCQkgIHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpzY29wZV9ub2RlLAorCQkJICB1MzIgYW1sX2xlbmd0aCwgdTggKmFtbF9zdGFydCk7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfZHNfZXhlY3V0ZV9hcmd1bWVudHMKKyAqCisgKiBQQVJBTUVURVJTOiAgTm9kZSAgICAgICAgICAgICAgICAtIE9iamVjdCBOUyBub2RlCisgKiAgICAgICAgICAgICAgc2NvcGVfbm9kZSAgICAgICAgICAtIFBhcmVudCBOUyBub2RlCisgKiAgICAgICAgICAgICAgYW1sX2xlbmd0aCAgICAgICAgICAtIExlbmd0aCBvZiBleGVjdXRhYmxlIEFNTAorICogICAgICAgICAgICAgIGFtbF9zdGFydCAgICAgICAgICAgLSBQb2ludGVyIHRvIHRoZSBBTUwKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzLgorICoKKyAqIERFU0NSSV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V0ZV9hcmd1bWVudHMobm9kZSwgbm9kZS0+cGFyZW50LAorCQkJCQkgICBleHRyYV9kZXNjLT5leHRyYS5hbWxfbGVuZ3RoLAorCQkJCQkgICBleHRyYV9kZXNjLT5leHRyYS5hbWxfc3RhcnQpOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2dldF9idWZmZXJfYXJndW1lbnRzCisgKgorICogUEFSQU1FVEVSUzogIG9ial9kZXNjICAgICAgICAtIEEgdmFsaWQgQnVmZmVyIG9iamVjdAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMuCisgKgorICogREVTQ1JJUFRJT046IEdldCBCdWZmZXIgbGVuZ3RoIGFuZCBpbml0aWFsaXplciBieXRlIGxpc3QuIFRoaXMgaW1wbGVtZW50cworICogICAgICAgICAgICAgIHRoZSBsYXRlIGV2YWx1YXRpb24gb2YgdGhlc2UgYXR0cmlidXRlcy4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCithY3BpX3N0YXR1cyBhY3BpX2RzX2dldF9idWZmZXJfYXJndW1lbnRzKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjKQoreworCXN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpub2RlOworCWFjcGlfc3RhdHVzIHN0YXR1czsKKworCUFDUElfRlVOQ1RJT05fVFJBQ0VfUFRSKGRzX2dldF9idWZmZXJfYXJndW1lbnRzLCBvYmpfZGVzYyk7CisKKwlpZiAob2JqX2Rlc2MtPmNvbW1vbi5mbGFncyAmIEFPUE9CSl9EQVRBX1ZBTElEKSB7CisJCXJldHVybl9BQ1BJX1NU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2RyaXZlcnMvYWNwaS9hY3BpY2EvZHNjb250cm9sLmMKQEAgLTAsMCArMSw0MTAgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBNb2R1bGUgTmFtZTogZHNjb250cm9sIC0gU3VwcG9ydCBmb3IgZXhlY3V0aW9uIGNvbnRyb2wgb3Bjb2RlcyAtCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgaWYvZWxzZS93aGlsZS9yZXR1cm4KKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qCisgKiBDb3B5cmlnaHQgKEMpIDIwMDAgLSAyMDExLCBJbnRlbCBDb3JwLgorICogQWxsIHJpZ2h0cyByZXNlcnZlZC4KKyAqCisgKiBSZWRpc3RyaWJ1dGlvbiBhbmQgdXNlIGluIHNvdXJjZSBhbmQgYmluYXJ5IGZvcm1zLCB3aXRoIG9yIHdpdGhvdXQKKyAqIG1vZGlmaWNhdGlvbiwgYXJlIHBlcm1pdHRlZCBwcm92aWRlZCB0aGF0IHRoZSBmb2xsb3dpbmcgY29uZGl0aW9ucworICogYXJlIG1ldDoKKyAqIDEuIFJlZGlzdHJpYnV0aW9ucyBvZiBzb3VyY2UgY29kZSBtdXN0IHJldGFpbiB0aGUgYWJvdmUgY29weXJpZ2h0CisgKiAgICBub3RpY2UsIHRoaXMgbGlzdCBvZiBjb25kaXRpb25zLCBhbmQgdGhlIGZvbGxvd2luZyBkaXNjbGFpbWVyLAorICogICAgd2l0aG91dCBtb2RpZmljYXRpb24uCisgKiAyLiBSZWRpc3RyaWJ1dGlvbnMgaW4gYmluYXJ5IGZvcm0gbXVzdCByZXByb2R1Y2UgYXQgbWluaW11bSBhIGRpc2NsYWltZXIKKyAqICAgIHN1YnN0YW50aWFsbHkgc2ltaWxhci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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfZHNfZXhlY19iZWdpbl9jb250cm9sX29wCisgKgorICogUEFSQU1FVEVSUzogIHdhbGtfbGlzdCAgICAgICAtIFRoZSBsaXN0IHRoYXQgb3ducyB0aGUgd2FsayBzdGFjaworICogICAgICAgICAgICAgIE9wICAgICAgICAgICAgICAtIFRoZSBjb250cm9sIE9wCisgKgorICogUkVUVVJOOiAgICAgIFN0YXR1cworICoKKyAqIERFU0NSSVBUSU9OOiBIYW5kbGVzIGFsbCBjb250cm9sIG9wcyBlbmNvdW50ZXJlZCBkdXJpbmcgY29udHJvbCBtZXRob2QKKyAqICAgICAgICAgICAgICBleGVjdXRpb24uCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2FjcGlfc3RhdHVzCithY3BpX2RzX2V4ZWNfYmVnaW5fY29udHJvbF9vcChzdHJ1Y3QgYWNwaV93YWxrX3N0YXRlICp3YWxrX3N0YXRlLAorCQkJICAgICAgdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKm9wKQoreworCWFjcGlfc3RhdHVzIHN0YXR1cyA9IEFFX09LOworCXVuaW9uIGFjcGlfZ2VuZXJpY19zdGF0ZSAqY29udHJvbF9zdGF0ZTsKKworCUFDUElfRlVOQ1RJT05fTkFNRShkc19leGVjX2JlZ2luX2NvbnRyb2xfb3ApOworCisJQUNQSV9ERUJVR19QUklOVCgoQUNQSV9EQl9ESVNQQVRDSCwgIk9wPSVwIE9wY29kZT0lMi4yWCBTdGF0ZT0lcFxuIiwKKwkJCSAgb3AsIG9wLT5jb21tb24uYW1sX29wY29kZSwgd2Fsa19zdGF0ZSkpOworCisJc3dpdGNoIChvcC0+Y29tbW9uLmFtbF9vcGNvZGUpIHsKKwljYXNl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qKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfZHNfZXhlY19lbmRfY29udHJvbF9vcAorICoKKyAqIFBBUkFNRVRFUlM6ICB3YWxrX2xpc3QgICAgICAgLSBUaGUgbGlzdCB0aGF0IG93bnMgdGhlIHdhbGsgc3RhY2sKKyAqICAgICAgICAgICAgICBPcCAgICAgICAgICAgICAgLSBUaGUgY29udHJvbCBPcAorICoKKyAqIFJFVFVSTjogICAgICBTdGF0dXMKKyAqCisgKiBERVNDUklQVElPTjogSGFuZGxlcyBhbGwgY29udHJvbCBvcHMgZW5jb3VudGVyZWQgZHVyaW5nIGNvbnRyb2wgbWV0aG9kCisgKiAgICAgICAgICAgICAgZXhlY3V0aW9uLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK2FjcGlfc3RhdHVzCithY3BpX2RzX2V4ZWNfZW5kX2NvbnRyb2xfb3Aoc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqIHdhbGtfc3RhdGUsCisJCQkgICAgdW5pb24gYWNwaV9wYXJzZV9vYmplY3QgKiBvcCkKK3sKKwlhY3BpX3N0YXR1cyBzdGF0dXMgPSBBRV9PSzsKKwl1bmlvbiBhY3BpX2dlbmVyaWNfc3RhdGUgKmNvbnRyb2xfc3RhdGU7CisKKwlBQ1BJX0ZVTkNUSU9OX05BTUUoZHNfZXhlY19lbmRfY29udHJvbF9vcCk7CisKKwlzd2l0Y2ggKG9wLT5jb21tb24uYW1sX29wY29kZSkgeworCWNhc2UgQU1MX0lGX09QOgorCisJCUFDUElfREVCVUdfUFJJTlQoKEFDUElfREJfRElTUEFUQ0gsICJbSUZfT1BdIE9wPSVwXG4iLCBvcCkpOworCisJCS8qCisJCSAqIFNhdmUgdGhlIHJlc3VsdCBvZiB0aGUgcHJlZGljYXRlIGluIGNhc2UgdGhlcmUgaX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gICAgICJjb250cm9sIiBvcGNvZGVzCisgKiBNb2R1bGUgTmFtZTogZHNvcGNvZGUgLSBEaXNwYXRjaGVyIHN1cG9ydCBmb3IgcmVnaW9ucyBhbmQgZmllbGRzCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCkBAIC01NywxMSArNTYsNiBAQAogCiAvKiBMb2NhbCBwcm90b3R5cGVzICovCiBzdGF0aWMgYWNwaV9zdGF0dXMKLWFjcGlfZHNfZXhlY3V0ZV9hcmd1bWVudHMoc3RydWN0IGFjcGlfbmFtZXNwYWNlX25vZGUgKm5vZGUsCi0JCQkgIHN0cnVjdCBhY3BpX25hbWVzcGFjZV9ub2RlICpzY29wZV9ub2RlLAotCQkJICB1MzIgYW1sX2xlbmd0aCwgdTggKiBhbWxfc3RhcnQpOwotCi1zdGF0aWMgYWNwaV9zdGF0dXMKIGFjcGlfZHNfaW5pdF9idWZmZXJfZmllbGQodTE2IGFtbF9vcGNvZGUsCiAJCQkgIHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjLAogCQkJICB1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpidWZmZXJfZGVzYywKQEAgLTcxLDM2MSArNjUsNiBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2V4ZWN1dGVfYXJndW1lbnRzCi0gKgotICogUEFSQU1FVEVSUzogIE5vZGUgICAgICAgICAgICAgICAgLSBPYmplY3QgTlMgbm9kZQotICogICAgICAgICAgICAgIHNjb3BlX25vZGUgICAgICAgICAgLSBQYXJlbnQgTlMgbm9kZQotICogICAgICAgICAgICAgIGFtbF9sZW5ndGggICAgICAgICAgLSBMZW5ndGggb2YgZXhlY3V0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V0dXJuIChzdGF0dXMpOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2V4ZWNfZW5kX2NvbnRyb2xfb3AKLSAqCi0gKiBQQVJBTUVURVJTOiAgd2Fsa19saXN0ICAgICAgIC0gVGhlIGxpc3QgdGhhdCBvd25zIHRoZSB3YWxrIHN0YWNrCi0gKiAgICAgICAgICAgICAgT3AgICAgICAgICAgICAgIC0gVGhlIGNvbnRyb2wgT3AKLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IEhhbmRsZXMgYWxsIGNvbnRyb2wgb3BzIGVuY291bnRlcmVkIGR1cmluZyBjb250cm9sIG1ldGhvZAotICogICAgICAgICAgICAgIGV4ZWN1dGlvbi4KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi1hY3BpX3N0YXR1cwotYWNwaV9kc19leGVjX2VuZF9jb250cm9sX29wKHN0cnVjdCBhY3BpX3dhbGtfc3RhdGUgKiB3YWxrX3N0YXRlLAotCQkJICAgIHVuaW9uIGFjcGlfcGFyc2Vfb2JqZWN0ICogb3ApCi17Ci0JYWNwaV9zdGF0dXMgc3RhdHVzID0gQUVfT0s7Ci0JdW5pb24gYWNwaV9nZW5lcmljX3N0YXRlICpjb250cm9sX3N0YXRlOwotCi0JQUNQSV9GVU5DVElPTl9OQU1FKGRzX2V4ZWNfZW5kX2NvbnRyb2xfb3ApOwotCi0Jc3dpdGNoIChvcC0+Y29tbW9uLmFtbF9vcGNvZGUpIHsKLQljYXNlIEFNTF9JRl9PUDoKLQotCQlBQ1BJX0RFQlVHX1BSSU5UKChBQ1BJX0RCX0RJU1BBVENILCAiW0lGX09QXSBPcD0lc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ljYS9kc3dsb2FkLmMKQEAgLTEsNiArMSw2IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKgotICogTW9kdWxlIE5hbWU6IGRzd2xvYWQgLSBEaXNwYXRjaGVyIG5hbWVzcGFjZSBsb2FkIGNhbGxiYWNrcworICogTW9kdWxlIE5hbWU6IGRzd2xvYWQgLSBEaXNwYXRjaGVyIGZpcnN0IHBhc3MgbmFtZXNwYWNlIGxvYWQgY2FsbGJhY2tzCiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCkBAIC00OCw3ICs0OCw2IEBACiAjaW5jbHVkZSAiYWNkaXNwYXQuaCIKICNpbmNsdWRlICJhY2ludGVycC5oIgogI2luY2x1ZGUgImFjbmFtZXNwLmgiCi0jaW5jbHVkZSAiYWNldmVudHMuaCIKIAogI2lmZGVmIEFDUElfQVNMX0NPTVBJTEVSCiAjaW5jbHVkZSA8YWNwaS9hY2Rpc2FzbS5oPgpAQCAtNTM3LDY3MCArNTM2LDMgQEAKIAogCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOwogfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2xvYWQyX2JlZ2luX29wCi0gKgotICogUEFSQU1FVEVSUzogIHdhbGtfc3RhdGUgICAgICAtIEN1cnJlbnQgc3RhdGUgb2YgdGhlIHBhcnNlIHRyZWUgd2FsawotICogICAgICAgICAgICAgIG91dF9vcCAgICAgICAgICAtIFdoZXIgdG8gcmV0dXJuIG9wIGlmIGEgbmV3IG9uZSBpcyBjcmVhdGVkCi0gKgotICogUkVUVVJOOiAgICAgIFN0YX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FdBUkUsIEVWRU4gSUYgQURWSVNFRCBPRiBUSEUKKyAqIFBPU1NJQklMSVRZIE9GIFNVQ0ggREFNQUdFUy4KKyAqLworCisjaW5jbHVkZSA8YWNwaS9hY3BpLmg+CisjaW5jbHVkZSAiYWNjb21tb24uaCIKKyNpbmNsdWRlICJhY3BhcnNlci5oIgorI2luY2x1ZGUgImFtbGNvZGUuaCIKKyNpbmNsdWRlICJhY2Rpc3BhdC5oIgorI2luY2x1ZGUgImFjaW50ZXJwLmgiCisjaW5jbHVkZSAiYWNuYW1lc3AuaCIKKyNpbmNsdWRlICJhY2V2ZW50cy5oIgorCisjZGVmaW5lIF9DT01QT05FTlQgICAgICAgICAgQUNQSV9ESVNQQVRDSEVSCitBQ1BJX01PRFVMRV9OQU1FKCJkc3dsb2FkMiIpCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfZHNfbG9hZDJfYmVnaW5fb3AKKyAqCisgKiBQQVJBTUVURVJTOiAgd2Fsa19zdGF0ZSAgICAgIC0gQ3VycmVudCBzdGF0ZSBvZiB0aGUgcGFyc2UgdHJlZSB3YWxrCisgKiAgICAgICAgICAgICAgb3V0X29wICAgICAgICAgIC0gV2hlciB0byByZXR1cm4gb3AgaWYgYSBuZXcgb25lIGlzIGNyZWF0ZWQKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IERlc2NlbmRpbmcgY2FsbGJhY2sgdXNlZCBkdXJpbmcgdGhlIGxvYWRpbmcgb2YgQUNQSSB0YWJsZXMuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2FjcGlfc3RhdHVzCithY3BpX2RzX2xvYWQyX2JlZ2luX29wKHN0cnVjdCBh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V3IG9wICovCisKKwkJaWYgKG5vZGUpIHsKKwkJCW9wLT5uYW1lZC5uYW1lID0gbm9kZS0+bmFtZS5pbnRlZ2VyOworCQl9CisJCSpvdXRfb3AgPSBvcDsKKwl9CisKKwkvKgorCSAqIFB1dCB0aGUgTm9kZSBpbiB0aGUgIm9wIiBvYmplY3QgdGhhdCB0aGUgcGFyc2VyIHVzZXMsIHNvIHdlCisJICogY2FuIGdldCBpdCBhZ2FpbiBxdWlja2x5IHdoZW4gdGhpcyBzY29wZSBpcyBjbG9zZWQKKwkgKi8KKwlvcC0+Y29tbW9uLm5vZGUgPSBub2RlOworCXJldHVybl9BQ1BJX1NUQVRVUyhzdGF0dXMpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX2RzX2xvYWQyX2VuZF9vcAorICoKKyAqIFBBUkFNRVRFUlM6ICB3YWxrX3N0YXRlICAgICAgLSBDdXJyZW50IHN0YXRlIG9mIHRoZSBwYXJzZSB0cmVlIHdhbGsKKyAqCisgKiBSRVRVUk46ICAgICAgU3RhdHVzCisgKgorICogREVTQ1JJUFRJT046IEFzY2VuZGluZyBjYWxsYmFjayB1c2VkIGR1cmluZyB0aGUgbG9hZGluZyBvZiB0aGUgbmFtZXNwYWNlLAorICogICAgICAgICAgICAgIGJvdGggY29udHJvbCBtZXRob2RzIGFuZCBldmVyeXRoaW5nIGVsc2UuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworYWNwaV9zdGF0dXMgYWNwaV9kc19sb2FkMl9lbmRfb3Aoc3RydWN0IGFjcGlfd2Fsa19zdGF0ZSAqd2Fsa19zdGF0ZSkKK3sKKwl1bmlvbiBhY3BpX3BhcnNlX29iamVjdCAqb3A7CisJYWN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oZSB0YWJsZSBpcyBpbmRleGVkIGJ5IHZhbHVlcyBvZiBhY3BpX29iamVjdF90eXBlCisgKi8KK2NvbnN0IHU4IGFjcGlfZ2JsX25zX3Byb3BlcnRpZXNbQUNQSV9OVU1fTlNfVFlQRVNdID0geworCUFDUElfTlNfTk9STUFMLAkJLyogMDAgQW55ICAgICAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMDEgTnVtYmVyICAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMDIgU3RyaW5nICAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMDMgQnVmZmVyICAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMDQgUGFja2FnZSAgICAgICAgICAqLworCUFDUElfTlNfTk9STUFMLAkJLyogMDUgZmllbGRfdW5pdCAgICAgICAqLworCUFDUElfTlNfTkVXU0NPUEUsCS8qIDA2IERldmljZSAgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTCwJCS8qIDA3IEV2ZW50ICAgICAgICAgICAgKi8KKwlBQ1BJX05TX05FV1NDT1BFLAkvKiAwOCBNZXRob2QgICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAwOSBNdXRleCAgICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAxMCBSZWdpb24gICAgICAgICAgICovCisJQUNQSV9OU19ORVdTQ09QRSwJLyogMTEgUG93ZXIgICAgICAgICAgICAqLworCUFDUElfTlNfTkVXU0NPUEUsCS8qIDEyIFByb2Nlc3NvciAgICAgICAgKi8KKwlBQ1BJX05TX05FV1NDT1BFLAkvKiAxMyBUaGVybWFsICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAxNCBidWZmZXJfZmllbGQgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAxNSBkZGJfaGFuZGxlICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAxNiBEZWJ1ZyBPYmplY3QgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAxNyBkZWZfZmllbGQgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAxOCBiYW5rX2ZpZWxkICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAxOSBpbmRleF9maWVsZCAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAyMCBSZWZlcmVuY2UgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAyMSBBbGlhcyAgICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAyMiBtZXRob2RfYWxpYXMgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAyMyBOb3RpZnkgICAgICAgICAgICovCisJQUNQSV9OU19OT1JNQUwsCQkvKiAyNCBBZGRyZXNzIEhhbmRsZXIgICovCisJQUNQSV9OU19ORVdTQ09QRSB8IEFDUElfTlNfTE9DQUwsCS8qIDI1IFJlc291cmNlIERlc2MgICAgKi8KKwlBQ1BJX05TX05FV1NDT1BFIHwgQUNQSV9OU19MT0NBTCwJLyogMjYgUmVzb3VyY2UgRmllbGQgICAqLworCUFDUElfTlNfTkVXU0NPUEUsCS8qIDI3IFNjb3BlICAgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTCwJCS8qIDI4IEV4dHJhICAgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTCwJCS8qIDI5IERhdGEgICAgICAgICAgICAgKi8KKwlBQ1BJX05TX05PUk1BTAkJLyogMzAgSW52YWxpZCAgICAgICAgICAqLworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9oZXhfdG9fYXNjaWlfY2hhcgorICoKKyAqIFBBUkFNRVRFUlM6ICBJbnRlZ2VyICAgICAgICAgICAgIC0gQ29udGFpbnMgdGhlIGhleCBkaWdpdAorICogICAgICAgICAgICAgIFBvc2l0aW9uICAgICAgICAgICAgLSBiaXQgcG9zaXRpb24gb2YgdGhlIGRpZ2l0IHdpdGhpbiB0aGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50ZWdlciAobXVsdGlwbGUgb2YgNCkKKyAqCisgKiBSRVRVUk46ICAgICAgVGhlIGNvbnZlcnRlZCBBc2NpaSBjaGFyYWN0ZXIKKyAqCisgKiBERVNDUklQVElPTjogQ29udmVydCBhIGhleCBkaWdpdCB0byBhbiBBc2NpaSBjaGFyYWN0ZXIKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBIZXggdG8gQVNDSUkgY29udmVyc2lvbiB0YWJsZSAqLworCitzdGF0aWMgY29uc3QgY2hhciBhY3BpX2dibF9oZXhfdG9fYXNjaWlbXSA9IHsKKwknMCcsICcxJywgJzInLCAnMycsICc0JywgJzUnLCAnNicsICc3JywKKwknOCcsICc5JywgJ0EnLCAnQicsICdDJywgJ0QnLCAnRScsICdGJworfTsKKworY2hhciBhY3BpX3V0X2hleF90b19hc2NpaV9jaGFyKHU2NCBpbnRlZ2VyLCB1MzIgcG9zaXRpb24pCit7CisKKwlyZXR1cm4gKGFjcGlfZ2JsX2hleF90b19hc2NpaVsoaW50ZWdlciA+PiBwb3NpdGlvbikgJiAweEZdKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfcmVnaW9uX25hbWUKKyAqCisgKiBQQVJBTUVURVJTOiAgU3BhY2UgSUQgICAgICAgICAgICAtIElEIGZvciB0aGUgcmVnaW9uCisgKgorICogUkVUVVJOOiAgICAgIERlY29kZWQgcmVnaW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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZ2V0X2V2ZW50X25hbWUKKyAqCisgKiBQQVJBTUVURVJTOiAgZXZlbnRfaWQgICAgICAgICAgICAtIEZpeGVkIGV2ZW50IElECisgKgorICogUkVUVVJOOiAgICAgIERlY29kZWQgZXZlbnQgSUQgbmFtZQorICoKKyAqIERFU0NSSVBUSU9OOiBUcmFuc2xhdGUgYSBFdmVudCBJRCBpbnRvIGEgbmFtZSBzdHJpbmcgKERlYnVnIG9ubHkpCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogRXZlbnQgdHlwZSBkZWNvZGluZyAqLworCitzdGF0aWMgY29uc3QgY2hhciAqYWNwaV9nYmxfZXZlbnRfdHlwZXNbQUNQSV9OVU1fRklYRURfRVZFTlRTXSA9IHsKKwkiUE1fVGltZXIiLAorCSJHbG9iYWxMb2NrIiwKKwkiUG93ZXJCdXR0b24iLAorCSJTbGVlcEJ1dHRvbiIsCisJIlJlYWxUaW1lQ2xvY2siLAorfTsKKworY2hhciAqYWNwaV91dF9nZXRfZXZlbnRfbmFtZSh1MzIgZXZlbnRfaWQpCit7CisKKwlpZiAoZXZlbnRfaWQgPiBBQ1BJX0VWRU5UX01BWCkgeworCQlyZXR1cm4gKCJJbnZhbGlkRXZlbnRJRCIpOworCX0KKworCXJldHVybiAoQUNQSV9DQVNUX1BUUihjaGFyLCBhY3BpX2dibF9ldmVudF90eXBlc1tldmVudF9pZF0pKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfdHlwZV9uYW1lCisgKgorICogUEFSQU1FVEVSUzogIFR5cGUgICA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XSkpOworfQorCitjaGFyICphY3BpX3V0X2dldF9vYmplY3RfdHlwZV9uYW1lKHVuaW9uIGFjcGlfb3BlcmFuZF9vYmplY3QgKm9ial9kZXNjKQoreworCisJaWYgKCFvYmpfZGVzYykgeworCQlyZXR1cm4gKCJbTlVMTCBPYmplY3QgRGVzY3JpcHRvcl0iKTsKKwl9CisKKwlyZXR1cm4gKGFjcGlfdXRfZ2V0X3R5cGVfbmFtZShvYmpfZGVzYy0+Y29tbW9uLnR5cGUpKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfbm9kZV9uYW1lCisgKgorICogUEFSQU1FVEVSUzogIE9iamVjdCAgICAgICAgICAgICAgIC0gQSBuYW1lc3BhY2Ugbm9kZQorICoKKyAqIFJFVFVSTjogICAgICBBU0NJSSBuYW1lIG9mIHRoZSBub2RlCisgKgorICogREVTQ1JJUFRJT046IFZhbGlkYXRlIHRoZSBub2RlIGFuZCByZXR1cm4gdGhlIG5vZGUncyBBQ1BJIG5hbWUuCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworY2hhciAqYWNwaV91dF9nZXRfbm9kZV9uYW1lKHZvaWQgKm9iamVjdCkKK3sKKwlzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqbm9kZSA9IChzdHJ1Y3QgYWNwaV9uYW1lc3BhY2Vfbm9kZSAqKW9iamVjdDsKKworCS8qIE11c3QgcmV0dXJuIGEgc3RyaW5nIG9mIGV4YWN0bHkgNCBjaGFyYWN0ZXJzID09IEFDUElfTkFNRV9TSVpFICovCisKKwlpZiAoIW9iamVjdCkgeworCQlyZXR1cm4gKCJOVUxMIik7CisJfQorCisJLyogQ2hlY2sgZm9y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hY3BpX2dibF9kZXNjX3R5cGVfbmFtZXNbQUNQSV9HRVRfREVTQ1JJUFRPUl9UWVBFCisJCQkJCQkgICAgICAgKG9iamVjdCldKSk7CisKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfcmVmZXJlbmNlX25hbWUKKyAqCisgKiBQQVJBTUVURVJTOiAgT2JqZWN0ICAgICAgICAgICAgICAgLSBBbiBBQ1BJIHJlZmVyZW5jZSBvYmplY3QKKyAqCisgKiBSRVRVUk46ICAgICAgRGVjb2RlZCBuYW1lIG9mIHRoZSB0eXBlIG9mIHJlZmVyZW5jZQorICoKKyAqIERFU0NSSVBUSU9OOiBEZWNvZGUgYSByZWZlcmVuY2Ugb2JqZWN0IHN1Yi10eXBlIHRvIGEgc3RyaW5nLgorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qIFByaW50YWJsZSBuYW1lcyBvZiByZWZlcmVuY2Ugb2JqZWN0IHN1Yi10eXBlcyAqLworCitzdGF0aWMgY29uc3QgY2hhciAqYWNwaV9nYmxfcmVmX2NsYXNzX25hbWVzW10gPSB7CisJLyogMDAgKi8gIkxvY2FsIiwKKwkvKiAwMSAqLyAiQXJndW1lbnQiLAorCS8qIDAyICovICJSZWZPZiIsCisJLyogMDMgKi8gIkluZGV4IiwKKwkvKiAwNCAqLyAiRGRiSGFuZGxlIiwKKwkvKiAwNSAqLyAiTmFtZWQgT2JqZWN0IiwKKwkvKiAwNiAqLyAiRGVidWciCit9OworCitjb25zdCBjaGFyICphY3BpX3V0X2dldF9yZWZlcmVuY2VfbmFtZSh1bmlvbiBhY3BpX29wZXJhbmRfb2JqZWN0ICpvYmplY3QpCit7CisKKwlpZiAoIW9iamVjdCkgeworCQlyZXR1cm4gKCJOVUxMIE9iamVjdCIpOworCX0KKworCWlmIChBQ1BJX0dFVF9ERVNDUklQVE9SX1RZUEUob2JqZWN0KSAhPSBBQ1BJX0RFU0NfVFlQRV9PUEVSQU5EKSB7CisJCXJldHVybiAoIk5vdCBhbiBPcGVyYW5kIG9iamVjdCIpOworCX0KKworCWlmIChvYmplY3QtPmNvbW1vbi50eXBlICE9IEFDUElfVFlQRV9MT0NBTF9SRUZFUkVOQ0UpIHsKKwkJcmV0dXJuICgiTm90IGEgUmVmZXJlbmNlIG9iamVjdCIpOworCX0KKworCWlmIChvYmplY3QtPnJlZmVyZW5jZS5jbGFzcyA+IEFDUElfUkVGQ0xBU1NfTUFYKSB7CisJCXJldHVybiAoIlVua25vd24gUmVmZXJlbmNlIGNsYXNzIik7CisJfQorCisJcmV0dXJuIChhY3BpX2dibF9yZWZfY2xhc3NfbmFtZXNbb2JqZWN0LT5yZWZlcmVuY2UuY2xhc3NdKTsKK30KKworI2lmIGRlZmluZWQoQUNQSV9ERUJVR19PVVRQVVQpIHx8IGRlZmluZWQoQUNQSV9ERUJVR0dFUikKKy8qCisgKiBTdHJpbmdzIGFuZCBwcm9jZWR1cmVzIHVzZWQgZm9yIGRlYnVnIG9ubHkKKyAqLworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2dldF9tdXRleF9uYW1lCisgKgorICogUEFSQU1FVEVSUzogIG11dGV4X2lkICAgICAgICAtIFRoZSBwcmVkZWZpbmVkIElEIGZvciB0aGlzIG11dGV4LgorICoKKyAqIFJFVFVSTjogICAgICBEZWNvZGVkIG5hbWUgb2YgdGhlIGludGVybmFsIG11dGV4CisgKgorICogREVTQ1JJUFRJT046IFRyYW5zbGF0ZSBhIG11dGV4IElEIGludG8gYSBuYW1lIHN0cmluZyAoRGVidWcgb25seSkKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisvKiBOYW1lcyBmb3IgaW50ZXJuYWwgbXV0ZXggb2JqZWN0cywgdXNlZCBmb3IgZGVidWcgb3V0cHV0ICovCisKK3N0YXRpYyBjaGFyICphY3BpX2dibF9tdXRleF9uYW1lc1tBQ1BJX05VTV9NVVRFWF0gPSB7CisJIkFDUElfTVRYX0ludGVycHJldGVyIiwKKwkiQUNQSV9NVFhfTmFtZXNwYWNlIiwKKwkiQUNQSV9NVFhfVGFibGVzIiwKKwkiQUNQSV9NVFhfRXZlbnRzIiwKKwkiQUNQSV9NVFhfQ2FjaGVzIiwKKwkiQUNQSV9NVFhfTWVtb3J5IiwKKwkiQUNQSV9NVFhfQ29tbWFuZENvbXBsZXRlIiwKKwkiQUNQSV9NVFhfQ29tbWFuZFJlYWR5IgorfTsKKworY2hhciAqYWNwaV91dF9nZXRfbXV0ZXhfbmFtZSh1MzIgbXV0ZXhfaWQpCit7CisKKwlpZiAobXV0ZXhfaWQgPiBBQ1BJX01BWF9NVVRFWCkgeworCQlyZXR1cm4gKCJJbnZhbGlkIE11dGV4IElEIik7CisJfQorCisJcmV0dXJuIChhY3BpX2dibF9tdXRleF9uYW1lc1ttdXRleF9pZF0pOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICoKKyAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2dldF9ub3RpZnlfbmFtZQorICoKKyAqIFBBUkFNRVRFUlM6ICBub3RpZnlfdmFsdWUgICAgLSBWYWx1ZSBmcm9tIHRoZSBOb3RpZnkoKSByZXF1ZXN0CisgKgorICogUkVUVVJOOiAgICAgIERlY29kZWQgbmFtZSBmb3IgdGhlIG5vdGlmeSB2YWx1ZQorICoKKyAqIERFU0NSSVBU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isjZW5kaWYKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBGVU5DVElPTjogICAgYWNwaV91dF92YWxpZF9vYmplY3RfdHlwZQorICoKKyAqIFBBUkFNRVRFUlM6ICBUeXBlICAgICAgICAgICAgLSBPYmplY3QgdHlwZSB0byBiZSB2YWxpZGF0ZWQKKyAqCisgKiBSRVRVUk46ICAgICAgVFJVRSBpZiB2YWxpZCBvYmplY3QgdHlwZSwgRkFMU0Ugb3RoZXJ3aXNlCisgKgorICogREVTQ1JJUFRJT046IFZhbGlkYXRlIGFuIG9iamVjdCB0eXBlCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwordTggYWNwaV91dF92YWxpZF9vYmplY3RfdHlwZShhY3BpX29iamVjdF90eXBlIHR5cGUpCit7CisKKwlpZiAodHlwZSA+IEFDUElfVFlQRV9MT0NBTF9NQVgpIHsKKworCQkvKiBOb3RlOiBBc3N1bWVzIGFsbCBUWVBFcyBhcmUgY29udGlndW91cyAoZXh0ZXJuYWwvbG9jYWwpICovCisKKwkJcmV0dXJuIChGQUxTRSk7CisJfQorCisJcmV0dXJuIChUUlVFKTsKK30KZGlmZiAtLWdpdCBhL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRnbG9iYWwuYyBiL2RyaXZlcnMvYWNwaS9hY3BpY2EvdXRnbG9iYWwuYwppbmRleCA5N2RkOWJiLi44MzNhMzhhIDEwMDY0NAotLS0gYS9kcml2ZXJzL2FjcGkvYWNwaWNhL3V0Z2xvYmFsLmMKKysrIGIvZHJpdmVycy9hY3BpL2FjcGljYS91dGdsb2JhbC5jCkBAIC00NSw3ICs0NSw2IEBACiAKICNpbmNsdWRlIDxhY3BpL2FjcGkuaD4KICNpbmNsdWRlICJhY2NvbW1vbi5oIgotI2luY2x1ZGUgImFjbmFtZXNwLmgiCiAKICNkZWZpbmUgX0NPTVBPTkVOVCAgICAgICAgICBBQ1BJX1VUSUxJVElFUwogQUNQSV9NT0RVTEVfTkFNRSgidXRnbG9iYWwiKQpAQCAtMTA3LDQzICsxMDYsNiBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX2Zvcm1hdF9leGNlcHRpb24KLSAqCi0gKiBQQVJBTUVURVJTOiAgU3RhdHVzICAgICAgIC0gVGhlIGFjcGlfc3RhdHVzIGNvZGUgdG8gYmUgZm9ybWF0dGVkCi0gKgotICogUkVUVVJOOiAgICAgIEEgc3RyaW5nIGNvbnRhaW5pbmcgdGhlIGV4Y2VwdGlvbiB0ZXh0LiBBIHZhbGlkIHBvaW50ZXIgaXMKLSAqICAgICAgICAgICAgICBhbHdheXMgcmV0dXJuZWQuCi0gKgotICogREVTQ1JJUFRJT046IFRoaXMgZnVuY3Rpb24gdHJhbnNsYXRlcyBhbiBBQ1BJIGV4Y2VwdGlvbiBpbnRvIGFuIEFTQ0lJIHN0cmluZwotICogICAgICAgICAgICAgIEl0IGlzIGhlcmUgaW5zdGVhZCBvZiB1dHhmYWNlLmMgc28gaXQgaXMgYWx3YXlzIHByZXNlbnQuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotY29uc3QgY2hhciAqYWNwaV9mb3JtYXRfZXhjZXB0aW9uKGFjcGlfc3RhdHVzIHN0YXR1cykKLXsKLQljb25zdCBjaGFyICpleGNlcHRpb24gPSBOVUxMOwotCi0JQUNQSV9GVU5DVElPTl9FTlRSWSgpOwotCi0JZXhjZXB0aW9uID0gYWNwaV91dF92YWxpZGF0ZV9leGNlcHRpb24oc3RhdHV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qIDAyIFN0cmluZyAgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwJCS8qIDAzIEJ1ZmZlciAgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwJCS8qIDA0IFBhY2thZ2UgICAgICAgICAgKi8KLQlBQ1BJX05TX05PUk1BTCwJCS8qIDA1IGZpZWxkX3VuaXQgICAgICAgKi8KLQlBQ1BJX05TX05FV1NDT1BFLAkvKiAwNiBEZXZpY2UgICAgICAgICAgICovCi0JQUNQSV9OU19OT1JNQUwsCQkvKiAwNyBFdmVudCAgICAgICAgICAgICovCi0JQUNQSV9OU19ORVdTQ09QRSwJLyogMDggTWV0aG9kICAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMDkgTXV0ZXggICAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMTAgUmVnaW9uICAgICAgICAgICAqLwotCUFDUElfTlNfTkVXU0NPUEUsCS8qIDExIFBvd2VyICAgICAgICAgICAgKi8KLQlBQ1BJX05TX05FV1NDT1BFLAkvKiAxMiBQcm9jZXNzb3IgICAgICAgICovCi0JQUNQSV9OU19ORVdTQ09QRSwJLyogMTMgVGhlcm1hbCAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMTQgYnVmZmVyX2ZpZWxkICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMTUgZGRiX2hhbmRsZSAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMTYgRGVidWcgT2JqZWN0ICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMTcgZGVmX2ZpZWxkICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMTggYmFua19maWVsZCAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMTkgaW5kZXhfZmllbGQgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMjAgUmVmZXJlbmNlICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMjEgQWxpYXMgICAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMjIgbWV0aG9kX2FsaWFzICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMjMgTm90aWZ5ICAgICAgICAgICAqLwotCUFDUElfTlNfTk9STUFMLAkJLyogMjQgQWRkcmVzcyBIYW5kbGVyICAqLwotCUFDUElfTlNfTkVXU0NPUEUgfCBBQ1BJX05TX0xPQ0FMLAkvKiAyNSBSZXNvdXJjZSBEZXNjICAgICovCi0JQUNQSV9OU19ORVdTQ09QRSB8IEFDUElfTlNfTE9DQUwsCS8qIDI2IFJlc291cmNlIEZpZWxkICAgKi8KLQlBQ1BJX05TX05FV1NDT1BFLAkvKiAyNyBTY29wZSAgICAgICAgICAgICovCi0JQUNQSV9OU19OT1JNQUwsCQkvKiAyOCBFeHRyYSAgICAgICAgICAgICovCi0JQUNQSV9OU19OT1JNQUwsCQkvKiAyOSBEYXRhICAgICAgICAgICAgICovCi0JQUNQSV9OU19OT1JNQUwJCS8qIDMwIEludmFsaWQgICAgICAgICAgKi8KLX07Ci0KLS8qIEhleCB0byBBU0NJSSBjb252ZXJzaW9uIHRhYmxlICovCi0KLXN0YXRpYyBjb25zdCBjaGFyIGFjcGlfZ2JsX2hleF90b19hc2NpaVtdID0gewotCScwJywgJzEnLCAnMicsICczJywgJzQnLCAnNScsICc2JywgJzcnLAotCSc4JywgJzknLCAnQScsICdCJywgJ0MnLCAnRCcsICdFJywgJ0YnCi19OwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2hleF90b19hc2NpaV9jaGFyCi0gKgotICogUEFSQU1FVEVSUzogIEludGVnZXIgICAgICAgICAgICAgLSBDb250YWlucyB0aGUgaGV4IGRpZ2l0Ci0gKiAgICAgICAgICAgICAgUG9zaXRpb24gICAgICAgICAgICAtIGJpdCBwb3NpdGlvbiBvZiB0aGUgZGlnaXQgd2l0aGluIHRoZQotICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnRlZ2VyIChtdWx0aXBsZSBvZiA0KQotICoKLSAqIFJFVFVSTjogICAgICBUaGUgY29udmVydGVkIEFzY2lpIGNoYXJhY3RlcgotICoKLSAqIERFU0NSSVBUSU9OOiBDb252ZXJ0IGEgaGV4IGRpZ2l0IHRvIGFuIEFzY2lpIGNoYXJhY3RlcgotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLWNoYXIgYWNwaV91dF9oZXhfdG9fYXNjaWlfY2hhcih1NjQgaW50ZWdlciwgdTMyIHBvc2l0aW9uKQotewotCi0JcmV0dXJuIChhY3BpX2dibF9oZXhfdG9fYXNjaWlbKGludGVnZXIgPj4gcG9zaXRpb24pICYgMHhGXSk7Ci19Ci0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCiAgKiBFdmVudCBhbmQgSGFyZHdhcmUgZ2xvYmFscwpAQCAtMzQxLDM4NiArMjM4LDYgQEAKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBGVU5DVElPTjogICAgYWNwaV91dF9nZXRfcmVnaW9uX25hbWUKLSAqCi0gKiBQQVJBTUVURVJTOiAgTm9uZS4KLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRyYW5zbGF0ZSBhIFNwYWNlIElEIGludG8gYSBuYW1lIHN0cmluZyAoRGVidWcgb25seSkKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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ioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi0vKiBFdmVudCB0eXBlIGRlY29kaW5nICovCi0KLXN0YXRpYyBjb25zdCBjaGFyICphY3BpX2dibF9ldmVudF90eXBlc1tBQ1BJX05VTV9GSVhFRF9FVkVOVFNdID0gewotCSJQTV9UaW1lciIsCi0JIkdsb2JhbExvY2siLAotCSJQb3dlckJ1dHRvbiIsCi0JIlNsZWVwQnV0dG9uIiwKLQkiUmVhbFRpbWVDbG9jayIsCi19OwotCi1jaGFyICphY3BpX3V0X2dldF9ldmVudF9uYW1lKHUzMiBldmVudF9pZCkKLXsKLQotCWlmIChldmVudF9pZCA+IEFDUElfRVZFTlRfTUFYKSB7Ci0JCXJldHVybiAoIkludmFsaWRFdmVudElEIik7Ci0JfQotCi0JcmV0dXJuIChBQ1BJX0NBU1RfUFRSKGNoYXIsIGFjcGlfZ2JsX2V2ZW50X3R5cGVzW2V2ZW50X2lkXSkpOwotfQotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2dldF90eXBlX25hbWUKLSAqCi0gKiBQQVJBTUVURVJTOiAgTm9uZS4KLSAqCi0gKiBSRVRVUk46ICAgICAgU3RhdHVzCi0gKgotICogREVTQ1JJUFRJT046IFRyYW5zbGF0ZSBhIFR5cGUgSUQgaW50byBhIG5hbWUgc3RyaW5nIChEZWJ1ZyBvbmx5KQotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qCi0gKiBFbGVtZW50cyBvZiBhY3BpX2dibF9uc190eXBlX25hbWVzIGJlbG93IG11c3QgbWF0Y2gKLSAqIG9uZS10by1vbmUgd2l0a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IGJlIGEgdmFsaWQgQUNQSSBuYW1lICovCi0KLQlpZiAoIWFjcGlfdXRfdmFsaWRfYWNwaV9uYW1lKG5vZGUtPm5hbWUuaW50ZWdlcikpIHsKLQkJbm9kZS0+bmFtZS5pbnRlZ2VyID0gYWNwaV91dF9yZXBhaXJfbmFtZShub2RlLT5uYW1lLmFzY2lpKTsKLQl9Ci0KLQkvKiBSZXR1cm4gdGhlIG5hbWUgKi8KLQotCXJldHVybiAobm9kZS0+bmFtZS5hc2NpaSk7Ci19Ci0KLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogRlVOQ1RJT046ICAgIGFjcGlfdXRfZ2V0X2Rlc2NyaXB0b3JfbmFtZQotICoKLSAqIFBBUkFNRVRFUlM6ICBPYmplY3QgICAgICAgICAgICAgICAtIEFuIEFDUEkgb2JqZWN0Ci0gKgotICogUkVUVVJOOiAgICAgIFBvaW50ZXIgdG8gYSBzdHJpbmcKLSAqCi0gKiBERVNDUklQVElPTjogVmFsaWRhdGUgb2JqZWN0IGFuZCByZXR1cm4gdGhlIGRlc2NyaXB0b3IgdHlwZQotICoKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0KLS8qIFByaW50YWJsZSBuYW1lcyBvZiBvYmplY3QgZGVzY3JpcHRvciB0eXBlcyAqLwotCi1zdGF0aWMgY29uc3QgY2hhciAqYWNwaV9nYmxfZGVzY190eXBlX25hbWVzW10gPSB7Ci0JLyogMDAgKi8gIkludmFsaWQiLAotCS8qIDAxICovICJDYWNoZWQiLAotCS8qIDAyICovICJTdGF0ZS1HZW5lcmljIiwKLQkvKiAwMyAqLyAiU3RhdGUtVXBkYXRlIiwKLQkvKiAwNCAqLyAiU3RhdGUtUGFja2FnZSIsCi0JLyogMDUgKi8gIlN0YXRlLUN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cmV0dXJuICJVbmtub3duIFJlZmVyZW5jZSBjbGFzcyI7Ci0KLQlyZXR1cm4gYWNwaV9nYmxfcmVmX2NsYXNzX25hbWVzW29iamVjdC0+cmVmZXJlbmNlLmNsYXNzXTsKLX0KLQotI2lmIGRlZmluZWQoQUNQSV9ERUJVR19PVVRQVVQpIHx8IGRlZmluZWQoQUNQSV9ERUJVR0dFUikKLS8qCi0gKiBTdHJpbmdzIGFuZCBwcm9jZWR1cmVzIHVzZWQgZm9yIGRlYnVnIG9ubHkKLSAqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X2dldF9tdXRleF9uYW1lCi0gKgotICogUEFSQU1FVEVSUzogIG11dGV4X2lkICAgICAgICAtIFRoZSBwcmVkZWZpbmVkIElEIGZvciB0aGlzIG11dGV4LgotICoKLSAqIFJFVFVSTjogICAgICBTdHJpbmcgY29udGFpbmluZyB0aGUgbmFtZSBvZiB0aGUgbXV0ZXguIEFsd2F5cyByZXR1cm5zIGEgdmFsaWQKLSAqICAgICAgICAgICAgICBwb2ludGVyLgotICoKLSAqIERFU0NSSVBUSU9OOiBUcmFuc2xhdGUgYSBtdXRleCBJRCBpbnRvIGEgbmFtZSBzdHJpbmcgKERlYnVnIG9ubHkpCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQotY2hhciAqYWNwaV91dF9nZXRfbXV0ZXhfbmFtZSh1MzIgbXV0ZXhfaWQpCi17Ci0KLQlpZiAobXV0ZXhfaWQgPiBBQ1BJX01BWF9NVVRFWCkgewotCQlyZXR1cm4gKCJJbnZhbGlkIE11dGV4IElEIik7Ci0JfQotCi0JcmV0dXJuIChhY3BpX2dibF9tdXRleF9uYW1lc1ttdXRleF9pZF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Wx1ZSkKLXsKLQotCWlmIChub3RpZnlfdmFsdWUgPD0gQUNQSV9OT1RJRllfTUFYKSB7Ci0JCXJldHVybiAoYWNwaV9nYmxfbm90aWZ5X3ZhbHVlX25hbWVzW25vdGlmeV92YWx1ZV0pOwotCX0gZWxzZSBpZiAobm90aWZ5X3ZhbHVlIDw9IEFDUElfTUFYX1NZU19OT1RJRlkpIHsKLQkJcmV0dXJuICgiUmVzZXJ2ZWQiKTsKLQl9IGVsc2UgewkJLyogR3JlYXRlciBvciBlcXVhbCB0byAweDgwICovCi0KLQkJcmV0dXJuICgiKipEZXZpY2UgU3BlY2lmaWMqKiIpOwotCX0KLX0KLSNlbmRpZgotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICoKLSAqIEZVTkNUSU9OOiAgICBhY3BpX3V0X3ZhbGlkX29iamVjdF90eXBlCi0gKgotICogUEFSQU1FVEVSUzogIFR5cGUgICAgICAgICAgICAtIE9iamVjdCB0eXBlIHRvIGJlIHZhbGlkYXRlZAotICoKLSAqIFJFVFVSTjogICAgICBUUlVFIGlmIHZhbGlkIG9iamVjdCB0eXBlLCBGQUxTRSBvdGhlcndpc2UKLSAqCi0gKiBERVNDUklQVElPTjogVmFsaWRhdGUgYW4gb2JqZWN0IHR5cGUKLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotCi11OCBhY3BpX3V0X3ZhbGlkX29iamVjdF90eXBlKGFjcGlfb2JqZWN0X3R5cGUgdHlwZSkKLXsKLQotCWlmICh0eXBlID4gQUNQSV9UWVBFX0xPQ0FMX01BWCkgewotCi0JCS8qIE5vdGU6IEFzc3VtZXMgYWxsIFRZUEVzIGFyZSBjb250aWd1b3VzIChleHRlcm5hbC9sb2NhbCkgKi8KLQotCQlyZXR1cm4gKEZBTFN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pOworCWludCByZXQ7CisKKwlyZXQgPSByYmRfY3JlYXRlX3J3X29wcygmb3BzLCAxLCBDRVBIX09TRF9PUF9OT1RJRlksIHBheWxvYWRfbGVuKTsKKwlpZiAocmV0IDwgMCkKKwkJcmV0dXJuIHJldDsKKworCWluZm8uZGV2ID0gZGV2OworCisJcmV0ID0gY2VwaF9vc2RjX2NyZWF0ZV9ldmVudChvc2RjLCByYmRfbm90aWZ5X2NiLCAxLAorCQkJCSAgICAgKHZvaWQgKikmaW5mbywgJmV2ZW50KTsKKwlpZiAocmV0IDwgMCkKKwkJZ290byBmYWlsOworCisJb3BzWzBdLndhdGNoLnZlciA9IDE7CisJb3BzWzBdLndhdGNoLmZsYWcgPSAxOworCW9wc1swXS53YXRjaC5jb29raWUgPSBldmVudC0+Y29va2llOworCW9wc1swXS53YXRjaC5wcm90X3ZlciA9IFJBRE9TX05PVElGWV9WRVI7CisJb3BzWzBdLndhdGNoLnRpbWVvdXQgPSAxMjsKKworCXJldCA9IHJiZF9yZXFfc3luY19vcChkZXYsIE5VTEwsCisJCQkgICAgICAgQ0VQSF9OT1NOQVAsCisJCQkgICAgICAgMCwKKwkJCSAgICAgICBDRVBIX09TRF9GTEFHX1dSSVRFIHwgQ0VQSF9PU0RfRkxBR19PTkRJU0ssCisJCQkgICAgICAgb3BzLAorCQkJICAgICAgIDEsIG9iaiwgMCwgMCwgTlVMTCwgTlVMTCwgTlVMTCk7CisJaWYgKHJldCA8IDApCisJCWdvdG8gZmFpbF9ldmVudDsKKworCXJldCA9IGNlcGhfb3NkY193YWl0X2V2ZW50KGV2ZW50LCBDRVBIX09TRF9USU1FT1VUX0RFRkFVTFQpOworCWRvdXQoImNlcGhfb3NkY193YWl0X2V2ZW50IHJldHVybmVkICVkXG4iLCByZXQpOworCXJiZF9kZXN0cm95X29wcyhvcHMpOworCXJldHVybiAwOworCitmYWlsX2V2ZW50OgorCWNlcGhfb3NkY19jYW5jZWxfZXZlbnQoZXZlbnQpOworZmFpbDoKK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GJoX2lzX29sZCgpKQorCQl3cml0ZWwoMSA8PCBjaGFuX2lkLAorCQkJbXhzX2RtYS0+YmFzZSArIEhXX0FQQkhYX0NUUkwwICsgTVhTX0NMUl9BRERSKTsKKwllbHNlCisJCXdyaXRlbCgxIDw8IGNoYW5faWQsCisJCQlteHNfZG1hLT5iYXNlICsgSFdfQVBCSFhfQ0hBTk5FTF9DVFJMICsgTVhTX0NMUl9BRERSKTsKKworCW14c19jaGFuLT5zdGF0dXMgPSBETUFfSU5fUFJPR1JFU1M7Cit9CisKK3N0YXRpYyBkbWFfY29va2llX3QgbXhzX2RtYV9hc3NpZ25fY29va2llKHN0cnVjdCBteHNfZG1hX2NoYW4gKm14c19jaGFuKQoreworCWRtYV9jb29raWVfdCBjb29raWUgPSBteHNfY2hhbi0+Y2hhbi5jb29raWU7CisKKwlpZiAoKytjb29raWUgPCAwKQorCQljb29raWUgPSAxOworCisJbXhzX2NoYW4tPmNoYW4uY29va2llID0gY29va2llOworCW14c19jaGFuLT5kZXNjLmNvb2tpZSA9IGNvb2tpZTsKKworCXJldHVybiBjb29raWU7Cit9CisKK3N0YXRpYyBzdHJ1Y3QgbXhzX2RtYV9jaGFuICp0b19teHNfZG1hX2NoYW4oc3RydWN0IGRtYV9jaGFuICpjaGFuKQoreworCXJldHVybiBjb250YWluZXJfb2YoY2hhbiwgc3RydWN0IG14c19kbWFfY2hhbiwgY2hhbik7Cit9CisKK3N0YXRpYyBkbWFfY29va2llX3QgbXhzX2RtYV90eF9zdWJtaXQoc3RydWN0IGRtYV9hc3luY190eF9kZXNjcmlwdG9yICp0eCkKK3sKKwlzdHJ1Y3QgbXhzX2RtYV9jaGFuICpteHNfY2hhbiA9IHRvX214c19kbWFfY2hhbih0eC0+Y2hhbik7CisKKwlteHNfZG1hX2VuYWJsZV9jaGFuKG14c19jaGFuKTsKKworCXJldHVybiBteHNfZG1hX2Fzc2lnbl9jb29raWUobXhzX2NoYW4pOworfQorCitzdGF0aWMgdm9pZCBteHNf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Q19OQU1FX1NJWkUpOworCS8qIEFkZHJlc3NlcyBjeWNsaW5nICovCisJZm9yIChpID0gODsgaSA8PSAyNDg7IGkgKz0gNDApIHsKKwkJaWYgKGkyY19zbWJ1c19yZWFkX2J5dGVfZGF0YShuZXdfY2xpZW50LCBpICsgMSkgIT0gY29uZgorCQkgfHwgaTJjX3NtYnVzX3JlYWRfYnl0ZV9kYXRhKG5ld19jbGllbnQsIGkgKyAyKSAhPSBoeXN0CisJCSB8fCBpMmNfc21idXNfcmVhZF9ieXRlX2RhdGEobmV3X2NsaWVudCwgaSArIDMpICE9IG9zKQorCQkJcmV0dXJuIC1FTk9ERVY7CisJCWlmIChpc19sbTc1YSAmJiBpMmNfc21idXNfcmVhZF9ieXRlX2RhdGEobmV3X2NsaWVudCwgaSArIDcpCisJCQkJIT0gTE03NUFfSUQpCisJCQlyZXR1cm4gLUVOT0RFVjsKKwl9CisKKwlzdHJsY3B5KGluZm8tPnR5cGUsIGlzX2xtNzVhID8gImxtNzVhIiA6ICJsbTc1IiwgSTJDX05BTUVfU0laRSk7CiAKIAlyZXR1cm4gMDsKIH0KZGlmZiAtLWdpdCBhL2RyaXZlcnMvaHdtb24vc2NoNTYyNy5jIGIvZHJpdmVycy9od21vbi9zY2g1NjI3LmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uOWE1MWRjYwotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvaHdtb24vc2NoNTYyNy5jCkBAIC0wLDAgKzEsODU4IEBACisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiAgIENvcHlyaWdodCAoQykgMjAxMC0yMDExIEhhbnMgZGUgR29lZGUgPGhkZWdvZWRlQHJlZGhhdC5jb20+ICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFRoaXMgcHJvZ3JhbSBpcyBmcmVlIHNvZnR3YXJlOyB5b3UgY2FuIHJlZGlzdHJpYnV0ZSBpdCBhbmQvb3IgbW9kaWZ5ICAqCisgKiAgIGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB0aGUgR05VIEdlbmVyYWwgUHVibGljIExpY2Vuc2UgYXMgcHVibGlzaGVkIGJ5ICAqCisgKiAgIHRoZSBGcmVlIFNvZnR3YXJlIEZvdW5kYXRpb247IGVpdGhlciB2ZXJzaW9uIDIgb2YgdGhlIExpY2Vuc2UsIG9yICAgICAqCisgKiAgIChhdCB5b3VyIG9wdGlvbikgYW55IGxhdGVyIHZlcnNpb24uICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFRoaXMgcHJvZ3JhbSBpcyBkaXN0cmlidXRlZCBpbiB0aGUgaG9wZSB0aGF0IGl0IHdpbGwgYmUgdXNlZnVsLCAgICAgICAqCisgKiAgIGJ1dCBXSVRIT1VUIEFOWSBXQVJSQU5UWTsgd2l0aG91dCBldmVuIHRoZSBpbXBsaWVkIHdhcnJhbnR5IG9mICAgICAgICAqCisgKiAgIE1FUkNIQU5UQUJJTElUWSBvciBGSVRORVNTIEZPUiBBIFBBUlRJQ1VMQVIgUFVSUE9TRS4gIFNlZSB0aGUgICAgICAgICAqCisgKiAgIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGZvciBtb3JlIGRldGFpbHMuICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiAgIFlvdSBzaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW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NjQsIDMwNzIgLyA2NCwgMH07Ci0JCXU4IGRlZmF1bHRfY29uZmlnWzZdID0gewotCQkJNDA5NiAvIDY0LCA0MDk2IC8gNjQsIDAsIDIwNDggLyA2NCwgMjA0OCAvIDY0LCAwfTsKLQkJdTggKmJjb25mID0gZGVmYXVsdF9jb25maWc7Ci0KLQkJaWYgKGRldi0+Y2FyZF9pbmZvLT5pb190eXBlWzNdID09IE5HRU5FX0lPX1RTSU4pCi0JCQliY29uZiA9IHRzaW40X2NvbmZpZzsKLQkJZHByaW50ayhLRVJOX0RFQlVHIERFVklDRV9OQU1FICI6IEZXIDE3IGJ1ZmZlciBjb25maWdcbiIpOwotCQlzdGF0ID0gbmdlbmVfY29tbWFuZF9jb25maWdfZnJlZV9idWYoZGV2LCBiY29uZik7Ci0JfSBlbHNlIHsKLQkJaW50IGJjb25mID0gQlVGRkVSX0NPTkZJR180NDIyOwotCQlpZiAoZGV2LT5jYXJkX2luZm8tPmlvX3R5cGVbM10gPT0gTkdFTkVfSU9fVFNJTikKLQkJCWJjb25mID0gQlVGRkVSX0NPTkZJR18zMzMzOwotCQlzdGF0ID0gbmdlbmVfY29tbWFuZF9jb25maWdfYnVmKGRldiwgYmNvbmYpOwotCX0KIAlpZiAoIXN0YXQpCiAJCXJldHVybiBzdGF0OwogCkBAIC0xMzk3LDkgKzE0MjQsNiBAQAogCXJldHVybiBzdGF0OwogfQogCi0KLQotCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0xNDA4LDIwICsxNDMyLDI1IEBACiB7CiAJc3RydWN0IGR2Y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nJlZShjaS0+ZW4pOworCWNpLT5lbiA9IDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIHdvcmthcm91bmQgZm9yIHNodXRkb3duIGZhaWx1cmUgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgbmdlbmVfdW5saW5rKHN0cnVjdCBuZ2VuZSAqZGV2KQoreworCXN0cnVjdCBuZ2VuZV9jb21tYW5kIGNvbTsKKworCWNvbS5jbWQuaGRyLk9wY29kZSA9IENNRF9NRU1fV1JJVEU7CisJY29tLmNtZC5oZHIuTGVuZ3RoID0gMzsKKwljb20uY21kLk1lbW9yeVdyaXRlLmFkZHJlc3MgPSAweDkxMGM7CisJY29tLmNtZC5NZW1vcnlXcml0ZS5kYXRhID0gMHhmZjsKKwljb20uaW5fbGVuID0gMzsKKwljb20ub3V0X2xlbiA9IDE7CisKKwlkb3duKCZkZXYtPmNtZF9tdXRleCk7CisJbmd3cml0ZWwoMCwgTkdFTkVfSU5UX0VOQUJMRSk7CisJbmdlbmVfY29tbWFuZF9tdXRleChkZXYsICZjb20pOworCXVwKCZkZXYtPmNtZF9tdXRleCk7Cit9CisKK3ZvaWQgbmdlbmVfc2h1dGRvd24oc3RydWN0IHBjaV9kZXYgKnBkZXYpCit7CisJc3RydWN0IG5nZW5lICpkZXYgPSAoc3RydWN0IG5nZW5lICopcGNpX2dldF9kcnZkYXRhKHBkZXYpOworCisJaWYgKCFkZXYgfHwgIXNodXRkb3duX3dvcmthcm91bmQpCisJCXJldHVybjsKKworCXByaW50ayhLRVJOX0lORk8gREVWSUNFX05BTUUgIjogc2h1dGRvd24gd29ya2Fyb3VuZC4uLlxuIik7CisJbmdlbmVfdW5saW5rKGRldik7CisJcGNpX2Rpc2FibGVfZGV2aWNlKHBkZXYpOworfQorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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ICZsaW5rc1tpXTsKKworCQllbnRpdHktPm1heF9saW5rcyA9IG1heF9saW5rczsKKwkJZW50aXR5LT5saW5rcyA9IGxpbmtzOworCX0KKworCXJldHVybiAmZW50aXR5LT5saW5rc1tlbnRpdHktPm51bV9saW5rcysrXTsKK30KKworaW50CittZWRpYV9lbnRpdHlfY3JlYXRlX2xpbmsoc3RydWN0IG1lZGlhX2VudGl0eSAqc291cmNlLCB1MTYgc291cmNlX3BhZCwKKwkJCSBzdHJ1Y3QgbWVkaWFfZW50aXR5ICpzaW5rLCB1MTYgc2lua19wYWQsIHUzMiBmbGFncykKK3sKKwlzdHJ1Y3QgbWVkaWFfbGluayAqbGluazsKKwlzdHJ1Y3QgbWVkaWFfbGluayAqYmFja2xpbms7CisKKwlCVUdfT04oc291cmNlID09IE5VTEwgfHwgc2luayA9PSBOVUxMKTsKKwlCVUdfT04oc291cmNlX3BhZCA+PSBzb3VyY2UtPm51bV9wYWRzKTsKKwlCVUdfT04oc2lua19wYWQgPj0gc2luay0+bnVtX3BhZHMpOworCisJbGluayA9IG1lZGlhX2VudGl0eV9hZGRfbGluayhzb3VyY2UpOworCWlmIChsaW5rID09IE5VTEwpCisJCXJldHVybiAtRU5PTUVNOworCisJbGluay0+c291cmNlID0gJnNvdXJjZS0+cGFkc1tzb3VyY2VfcGFkXTsKKwlsaW5rLT5zaW5rID0gJnNpbmstPnBhZHNbc2lua19wYWRdOworCWxpbmstPmZsYWdzID0gZmxhZ3M7CisKKwkvKiBDcmVhdGUgdGhlIGJhY2tsaW5rLiBCYWNrbGlua3MgYXJlIHVzZWQgdG8gaGVscCBncmFwaCB0cmF2ZXJzYWwgYW5kCisJICogYXJlIG5vdCByZXBvcnRlZCB0byB1c2Vyc3BhY2UuCisJICovCisJYmFja2xpbmsgPSBtZWRpYV9lbnRpdHlfYWRkX2xpbmsoc2luayk7CisJaWYgKGJhY2tsaW5rID09IE5VTEwpIHsKKwkJc291cmNlLT5udW1fbGlua3MtLTsKKwkJcmV0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GggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCisgKiAgRm91bmRhdGlvbiwgSW5jLiwgNTkgVGVtcGxlIFBsYWNlLCBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcgIFVTQQorICoKKyAqLworCisjaWZuZGVmIF9GTURSVl9DT01NT05fSAorI2RlZmluZSBfRk1EUlZfQ09NTU9OX0gKKworI2RlZmluZSBGTV9TVF9SRUdfVElNRU9VVCAgIG1zZWNzX3RvX2ppZmZpZXMoNjAwMCkJLyogNiBzZWMgKi8KKyNkZWZpbmUgRk1fUEtUX0xPR0lDQUxfQ0hBTl9OVU1CRVIgIDB4MDggICAvKiBMb2dpY2FsIGNoYW5uZWwgOCAqLworCisjZGVmaW5lIFJFR19SRCAgICAgICAweDEKKyNkZWZpbmUgUkVHX1dSICAgICAgMHgwCisKK3N0cnVjdCBmbV9yZWdfdGFibGUgeworCXU4IG9wY29kZTsKKwl1OCB0eXBlOworCXU4ICpuYW1lOworfTsKKworI2RlZmluZSBTVEVSRU9fR0VUICAgICAgICAgICAgICAgMAorI2RlZmluZSBSU1NJX0xWTF9HRVQgICAgICAgICAgICAgMQorI2RlZmluZSBJRl9DT1VOVF9HRVQgICAgICAgICAgICAgMgorI2RlZmluZSBGTEFHX0dFVCAgICAgICAgICAgICAgICAgMworI2RlZmluZSBSRFNfU1lOQ19HRVQgICAgICAgICAgICAgNAorI2RlZmluZSBSRFNfREFUQV9HRVQgICAgICAgICAgICAgNQorI2RlZmluZSBGUkVRX1NFVCAgICAgICAgICAgICAgICAgMTAKKyNkZWZpbmUgQUZfRlJFUV9TRVQgICAgICAgICAgICAgIDExCisjZGVmaW5lIE1PU1RfTU9ERV9TRVQgICAgICAgICAgICAxMgorI2RlZmluZSBNT1NUX0JMRU5EX1NFVCAgICAgICAgICAgMTMKKyNkZWZpbmUgREVNUEhfTU9ERV9TRVQgICAgICAgICAgIDE0CisjZGVmaW5lIFNFQVJDSF9MVkxfU0VUICAgICAgICAgICAxNQorI2RlZmluZSBCQU5EX1NFVCAgICAgICAgICAgICAgICAgMTYKKyNkZWZpbmUgTVVURV9TVEFUVVNfU0VUICAgICAgICAgIDE3CisjZGVmaW5lIFJEU19QQVVTRV9MVkxfU0VUICAgICAgICAxOAorI2RlZmluZSBSRFNfUEFVU0VfRFVSX1NFVCAgICAgICAgMTkKKyNkZWZpbmUgUkRTX01FTV9TRVQgICAgICAgICAgICAgIDIwCisjZGVmaW5lIFJEU19CTEtfQl9TRVQgICAgICAgICAgICAyMQorI2RlZmluZSBSRFNfTVNLX0JfU0VUICAgICAgICAgICAgMjIKKyNkZWZpbmUgUkRTX1BJX01BU0tfU0VUICAgICAgICAgIDIzCisjZGVmaW5lIFJEU19QSV9TRVQgICAgICAgICAgICAgICAyNAorI2RlZmluZSBSRFNfU1lTVEVNX1NFVCAgICAgICAgICAgMjUKKyNkZWZpbmUgSU5UX01BU0tfU0VUICAgICAgICAgICAgIDI2CisjZGVmaW5lIFNFQVJDSF9ESVJfU0VUICAgICAgICAgICAyNworI2RlZmluZSBWT0xVTUVfU0VUICAgICAgICAgICAgICAgMjgKKyNkZWZpbmUgQVVESU9fRU5BQkxFX1NFVCAgICAgICAgIDI5CisjZGVmaW5lIFBDTV9NT0RFX1NFVCAgICAgICAgICAgICAzMAorI2RlZmluZSBJMlNfTU9ERV9DT05GSUdfU0VUICAgICAgMzEKKyNkZWZpbmUgUE9XRVJfU0VUICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIElOVFhfQ09ORklHX1NFVCAgICAgICAgICAzMworI2RlZmluZSBQVUxMX0VOX1NFVCAgICAgICAgICAgICAgMzQKKyNkZWZpbmUgSElMT19TRVQgICAgICAgICAgICAgICAgIDM1CisjZGVmaW5lIFNXSVRDSDJGUkVGICAgICAgICAgICAgICAzNgorI2RlZmluZSBGUkVRX0RSSUZUX1JFUE9SVCAgICAgICAgMzcKKworI2RlZmluZSBQQ0VfR0VUICAgICAgICAgICAgICAgICAgNDAKKyNkZWZpbmUgRklSTV9WRVJfR0VUICAgICAgICAgICAgIDQxCisjZGVmaW5lIEFTSUNfVkVSX0dFVCAgICAgICAgICAgICA0MgorI2RlZmluZSBBU0lDX0lEX0dFVCAgICAgICAgICAgICAgNDMKKyNkZWZpbmUgTUFOX0lEX0dFVCAgICAgICAgICAgICAgIDQ0CisjZGVmaW5lIFRVTkVSX01PREVfU0VUICAgICAgICAgICA0NQorI2RlZmluZSBTVE9QX1NFQVJDSCAgICAgICAgICAgICAgNDYKKyNkZWZpbmUgUkRTX0NOVFJMX1NFVCAgICAgICAgICAgIDQ3CisKKyNkZWZpbmUgV1JJVEVfSEFSRFdBUkVfUkVHICAgICAgIDEwMAorI2RlZmluZSBDT0RFX0RPV05MT0FEICAgICAgICAgICAgMTAxCisjZGVmaW5lIFJFU0VUICAgICAgICAgICAgICAgICAgICAxMDIKKworI2RlZmluZSBGTV9QT1dFUl9NT0RFICAgICAgICAgICAgMjU0CisjZGVmaW5lIEZNX0lOVEVSUlVQVCAgICAgICAgICAgICAyNTUKKworLyogVHJhbnNtaXR0ZXIgQVBJICovCisKKyNkZWZpbmUgQ0hBTkxfU0VUICAgICAgICAgICAgICAgIDU1CisjZGVmaW5lIENIQU5MX0JXX1NFVAkJNTYKKyNkZWZpbmUgUkVGX1NFVCAgICAgICAgICAgICAgICAgIDU3CisjZGVmaW5lIFBPV0VSX0VOQl9TRVQgICAgICAgICAgICA5MAorI2RlZmluZSBQT1dFUl9BVFRfU0VUICAgICAgICAgICAgNTgKKyNkZWZpbmUgUE9XRVJfTEVWX1NFVCAgICAgICAgICAgIDU5CisjZGVmaW5lIEFVRElPX0RFVl9TRVQgICAgICAgICAgICA2MAorI2RlZmluZSBQSUxPVF9ERVZfU0VUICAgICAgICAgICAgNjEKKyNkZWZpbmUgUkRTX0RFVl9TRVQgICAgICAgICAgICAgIDYyCisjZGVmaW5lIFRYX0JBTkRfU0VUICAgICAgICAgICAgICA2NQorI2RlZmluZSBQVVBEX1NFVCAgICAgICAgICAgICAgICAgOTEKKyNkZWZpbmUgQVVESU9fSU9fU0VUICAgICAgICAgICAgIDYzCisjZGVmaW5lIFBSRU1QSF9TRVQgICAgICAgICAgICAgICA2NAorI2RlZmluZSBNT05PX1NFVCAgICAgICAgICAgICAgICAgNjYKKyNkZWZpbmUgTVVURSAgICAgICAgICAgICAgICAgICAgIDkyCisjZGVmaW5lIE1QWF9MTVRfRU5BQkxFICAgICAgICAgICA2NworI2RlZmluZSBQSV9TRVQgICAgICAgICAgICAgICAgICAgOTMKKyNkZWZpbmUgRUNDX1NFVCAgICAgICAgICAgICAgICAgIDY5CisjZGVmaW5lIFBUWSAgICAgICAgICAgICAgICAgICAgICA3MAorI2RlZmluZSBBRiAgICAgICAgICAgICAgICAgICAgICAgNzEKKyNkZWZpbmUgRElTUExBWV9NT0RFICAgICAgICAgICAgIDc0CisjZGVmaW5lIFJEU19SRVBfU0VUICAgICAgICAgICAgICA3NworI2RlZmluZSBSRFNfQ09ORklHX0RBVEFfU0VUICAgICAgOTgKKyNkZWZpbmUgUkRTX0RBVEFfU0VUICAgICAgICAgICAgIDk5CisjZGVmaW5lIFJEU19EQVRBX0VOQiAgICAgICAgICAgICA5NAorI2RlZmluZSBUQV9TRVQgICAgICAgICAgICAgICAgICAgNzgKKyNkZWZpbmUgVFBfU0VUICAgICAgICAgICAgICAgICAgIDc5CisjZGVmaW5lIERJX1NFVCAgICAgICAgICAgICAgICAgICA4MAorI2RlZmluZSBNU19TRVQgICAgICAgICAgICAgICAgICAgODEKKyNkZWZpbmUgUFNfU0NST0xMX1NQRUVEICAgICAgICAgIDgyCisjZGVmaW5lIFRYX0FVRElPX0xFVkVMX1RFU1QgICAgICA5NgorI2RlZmluZSBUWF9BVURJT19MRVZFTF9URVNUX1RIUkVTSE9MRCAgICA3MworI2RlZmluZSBUWF9BVURJT19JTlBVVF9MRVZFTF9SQU5HRV9TRVQgICA1NAorI2RlZmluZS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PSAweDE1MSkKQEAgLTQ3OSwyMiArNDgzLDI2IEBACiAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi1zdGF0aWMgaW50IGlvY3RsX2lucHV0KHVuc2lnbmVkIGludCBpb2NsdF9ucix2b2lkICphcmcsc3RydWN0IGNhbWVyYV9kYXRhICpjYW0pCitzdGF0aWMgaW50IGNwaWEyX2VudW1faW5wdXQoc3RydWN0IGZpbGUgKmZpbGUsIHZvaWQgKmZoLCBzdHJ1Y3QgdjRsMl9pbnB1dCAqaSkKIHsKLQlzdHJ1Y3QgdjRsMl9pbnB1dCAqaSA9IGFyZzsKLQotCWlmKGlvY2x0X25yICAhPSBWSURJT0NfR19JTlBVVCkgewotCQlpZiAoaS0+aW5kZXggIT0gMCkKLQkJICAgICAgIHJldHVybiAtRUlOVkFMOwotCX0KLQotCW1lbXNldChpLCAwLCBzaXplb2YoKmkpKTsKKwlpZiAoaS0+aW5kZXgpCisJCXJldHVybiAtRUlOVkFMOwogCXN0cmNweShpLT5uYW1lLCAiQ2FtZXJhIik7CiAJaS0+dHlwZSA9IFY0TDJfSU5QVVRfVFlQRV9DQU1FUkE7Ci0KIAlyZXR1cm4gMDsKIH0KIAorc3RhdGljIGludCBjcGlhMl9nX2lucHV0KHN0cnVjdCBmaWxlICpmaWxlLCB2b2lkICpmaCwgdW5zaWduZWQgaW50ICppKQoreworCSppID0gMDsKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBjcGlhMl9zX2lucHV0KHN0cnVjdCBmaWxlICpmaWxlLCB2b2lkICpmaCwgdW5zaWduZWQgaW50IGkpCit7CisJcmV0dXJuIGkgPyAtRUlOVkFMIDogMDsKK30KKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKICAqICBpb2N0bF9lbnVtX2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XTTg3NzVfR0lELCBjb3JlLCBzX2N0cmwsICZjbGllbnRfY3RsKTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgc3RydWN0IHNuZF9rY29udHJvbF9uZXcgc25kX2N4ODhfYWxjX3N3aXRjaCA9IHsKKwkuaWZhY2UgPSBTTkRSVl9DVExfRUxFTV9JRkFDRV9NSVhFUiwKKwkubmFtZSA9ICJMaW5lLUluIEFMQyBTd2l0Y2giLAorCS5pbmZvID0gc25kX2N0bF9ib29sZWFuX21vbm9faW5mbywKKwkuZ2V0ID0gc25kX2N4ODhfYWxjX2dldCwKKwkucHV0ID0gc25kX2N4ODhfYWxjX3B1dCwKK307CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAJCQlCYXNpYyBGbG93IGZvciBTb3VuZCBEZXZpY2VzCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTcyNCw3ICs4MDUsOCBAQAogc3RhdGljIGludCBkZXZubzsKIHN0YXRpYyBpbnQgX19kZXZpbml0IHNuZF9jeDg4X2NyZWF0ZShzdHJ1Y3Qgc25kX2NhcmQgKmNhcmQsCiAJCQkJICAgICBzdHJ1Y3QgcGNpX2RldiAqcGNpLAotCQkJCSAgICAgc25kX2N4ODhfY2FyZF90ICoqcmNoaXApCisJCQkJICAgICBzbmRfY3g4OF9jYXJkX3QgKipyY2hpcCwKKwkJCQkgICAgIHN0cnVjdCBjeDg4X2NvcmUgKipjb3JlX3B0cikKIHsKIAlzbmRfY3g4OF9jYXJkX3QgICAqY2hpcDsKIAlzdHJ1Y3QgY3g4OF9jb3JlICAqY29yZTsKQEAgLTc1MCw3ICs4MzIsNyBAQAogCWlmICghcGNpX2RtYV9zdXBwb3J0ZWQocGNpLERNQV9CSVRfTUFTSygzMikpKSB7CiAJCWRwcmlud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BBQ0VfSlBFR30sCit9OworCisvKgorICogVGhlIHNlcXVlbmNlcyBiZWxvdyBjb250YWluOgorICoJLSAxc3QgYW5kIDJuZCBieXRlczogZWl0aGVyCisgKgkJLSByZWdpc3RlciBudW1iZXIgKEJFKQorICoJCS0gSTJDMCArIGkyYyBhZGRyZXNzCisgKgktIDNyZCBieXRlOiBkYXRhIGxlbmd0aCAoPTAgZm9yIGVuZCBvZiBzZXF1ZW5jZSkKKyAqCS0gbiBieXRlczogZGF0YQorICovCisjZGVmaW5lIEkyQzAgMHhmZgorCitzdGF0aWMgY29uc3QgdTggbnc4MDBfaW5pdFtdID0geworCTB4MDQsIDB4MDUsIDB4MDEsIDB4NjEsCisJMHgwNCwgMHgwNCwgMHgwMSwgMHgwMSwKKwkweDA0LCAweDA2LCAweDAxLCAweDA0LAorCTB4MDQsIDB4MDQsIDB4MDMsIDB4MDAsIDB4MDAsIDB4MDAsCisJMHgwNSwgMHgwNSwgMHgwMSwgMHgwMCwKKwkwLCAwLCAwCit9Oworc3RhdGljIGNvbnN0IHU4IG53ODAwX3N0YXJ0W10gPSB7CisJMHgwNCwgMHgwNiwgMHgwMSwgMHhjMCwKKwkweDAwLCAweDAwLCAweDQwLCAweDEwLCAweDQzLCAweDAwLCAweGI0LCAweDAxLCAweDEwLCAweDAwLCAweDRmLAorCQkJICAweGVmLCAweDBlLCAweDAwLCAweDc0LCAweDAxLCAweDAxLCAweDAwLCAweDE5LAorCQkJICAweDAwLCAweDAxLCAweDAwLCAweDE5LCAweDAwLCAweDAxLCAweDAwLCAweDE5LAorCQkJICAweDAwLCAweDAxLCAweDAwLCAweDE5LCAweDAwLCAweDNlLCAweDAwLCAweDI0LAorCQkJICAweDAzLCAweDNlLCAweDAwLCAweDg2LCAweDAwLCAweDNlLCAweDAwLCAweDg2LAorCQkJICAweDAwLCAweDNlLCAweDAwLCAweDg2LCAweDAwLCAweDAxLCAweDAwLCAweDAxLAorCQkJICAweDAwLCAweDU2LCAweDAwLCAweDllL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DgwLCAweDAwLCAweDA1LCAweDM1LCAweDVlLCAweDc4LCAweDhiLCAweDk5LAorCQkJICAweGE0LCAweGFlLCAweGI1LCAweGJjLCAweGMxLCAweGM2LCAweGM5LCAweGNjLAorCQkJICAweGNmLCAweGQwLCAweDAwLCAweDExLCAweDIyLCAweDMyLCAweDQzLCAweDU0LAorCQkJICAweDY0LCAweDc0LCAweDg0LCAweDk0LCAweGE0LCAweGIzLCAweGMzLCAweGQyLAorCQkJICAweGUyLCAweGYxLCAweGZmLCAweDAwLCAweDExLCAweDIyLCAweDMyLCAweDQzLAorCQkJICAweDU0LCAweDY0LCAweDc0LCAweDg0LCAweDk0LCAweGE0LCAweGIzLCAweGMzLAorCQkJICAweGQyLCAweGUyLCAweGYxLCAweGZmLCAweDAwLCAweDExLCAweDIyLCAweDMyLAorCQkJICAweDQzLCAweDU0LCAweDY0LCAweDc0LCAweDg0LCAweDk0LCAweGE0LCAweGIzLAorCTB4MTAsIDB4ODAsIDB4MWQsIDB4YzMsIDB4ZDIsIDB4ZTIsIDB4ZjEsIDB4ZmYsIDB4MDAsIDB4MDAsIDB4MDAsCisJCQkgIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MDAsIDB4MmQsIDB4MDAsIDB4NjIsCisJCQkgIDB4MDEsIDB4MjQsIDB4MDEsIDB4NjIsIDB4MDEsIDB4MjQsIDB4MDEsIDB4MjAsCisJCQkgIDB4MDEsIDB4NjAsIDB4MDEsIDB4MDAsIDB4MDAsCisKKwkweDAyLCAweDAwLCAweDExLCAweDQ4LCAweDU4LCAweDllLCAweDQ4LCAweDU4LCAweDAwLCAweDAwLCAweDAwLAorCQkJICAweDAwLCAweDg0LCAweDM2LCAweDA1LCAweDAxLCAweGYyLCAweDg2LCAweDY1LAorCQkJICAweDQwLAorCTB4MDAsIDB4ODAsIDB4MDEsIDB4YTAsCisJMHgxMCwgMHgxYSwgMHgwMSwgMHgwMCwKKwkweDAwLCAweDkxLCAweDAyLCAweDZjLCAwe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gMHhhYSwgMHhiNiwgMHhjMSwgMHhjYywgMHhkNiwgMHhlMCwKKwkJCSAgMHhlYSwKKwkweDEwLCAweDBiLCAweDAxLCAweDE0LAorCTB4MTAsIDB4MGQsIDB4MDEsIDB4MjAsCisJMHgxMCwgMHgwYywgMHgwMSwgMHgzNCwKKwkweDA0LCAweDA2LCAweDAxLCAweGMzLAorCTB4MDQsIDB4MDQsIDB4MDEsIDB4MDAsCisJMHgwNSwgMHgwMiwgMHgwMSwgMHgwMiwKKwkweDA2LCAweDAwLCAweDAyLCAweDAwLCAweDQ4LAorCTB4MDUsIDB4MDUsIDB4MDEsIDB4MjAsCisJMHgwNSwgMHgwNSwgMHgwMSwgMHgyMSwKKwkwLCAwLCAwCit9OworCisvKiAwNmE1OmQwMDEgLSBudzgwMSAtIFBhbmFzb25pYworICoJCVAzNXUgKi8KK3N0YXRpYyBjb25zdCB1OCBudzgwMV9zdGFydF8xW10gPSB7CisJMHgwNSwgMHgwNiwgMHgwMSwgMHgwNCwKKwkweDAwLCAweDAwLCAweDQwLCAweDBlLCAweDAwLCAweDAwLCAweGY5LCAweDAyLCAweDExLCAweDAwLCAweDBlLAorCQkJICAweDAxLCAweDFmLCAweDAwLCAweDBkLCAweDAyLCAweDAxLCAweDAwLCAweDE5LAorCQkJICAweDAwLCAweDAxLCAweDAwLCAweDE5LCAweDAwLCAweDAxLCAweDAwLCAweDE5LAorCQkJICAweDAwLCAweDAxLCAweDAwLCAweDE5LCAweDAwLCAweGNlLCAweDAwLCAweGY0LAorCQkJICAweDA1LCAweDNlLCAweDAwLCAweDg2LCAweDAwLCAweDNlLCAweDAwLCAweDg2LAorCQkJICAweDAwLCAweDNlLCAweDAwLCAweDg2LCAweDAwLCAweDAxLCAweDAwLCAweDAxLAorCQkJICAweDAwLCAweDU2LCAweDAwLCAweDllLCAweDAwLCAweDU2LCAweDAwLCAweDllLAorCQkJICAweDAwLCAweDU2LCAweDAwLCAweDllLCAweDAwLCAweDAxLCAweDAwLCAweD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JmLCAweGM5LCAweGQzLCAweGRkLCAweGU2LCAweGVmLCAweGY3LAorCQkJICAweGY5LAorCTB4MTAsIDB4MGIsIDB4MDEsIDB4MTksCisJMHgxMCwgMHgwZCwgMHgwMSwgMHgxMCwKKwkweDEwLCAweDBjLCAweDAxLCAweDBkLAorCTB4MDQsIDB4MDYsIDB4MDEsIDB4MDMsCisJMHgwNCwgMHgwNSwgMHgwMSwgMHg2MSwKKwkweDA0LCAweDA0LCAweDAxLCAweDQxLAorCTAsIDAsIDAKK307CisKKy8qIG53ODAyIGR2Yy12NiAqLworc3RhdGljIGNvbnN0IHU4IGR2Y3Y2X3N0YXJ0W10gPSB7CisJMHgwNCwgMHgwNiwgMHgwMSwgMHgwNiwKKwkweDAwLCAweDAwLCAweDQwLCAweDU0LCAweDk2LCAweDk4LCAweGY5LCAweDAyLCAweDE4LCAweDAwLCAweDRjLAorCQkJICAweDBmLCAweDFmLCAweDAwLCAweDBkLCAweDAyLCAweDAxLCAweDAwLCAweDE5LAorCQkJICAweDAwLCAweDAxLCAweDAwLCAweDE5LCAweDAwLCAweDAxLCAweDAwLCAweDE5LAorCQkJICAweDAwLCAweDBiLCAweDAwLCAweDFiLCAweDAwLCAweGM4LCAweDAwLCAweGY0LAorCQkJICAweDA1LCAweGI0LCAweDAwLCAweGNjLCAweDAwLCAweDAxLCAweDAwLCAweDAxLAorCQkJICAweDAwLCAweDAxLCAweDAwLCAweDAxLCAweDAwLCAweDAxLCAweDAwLCAweDAxLAorCQkJICAweDAwLCAweGEyLCAweDAwLCAweGM2LCAweDAwLCAweDYwLCAweDAwLCAweGM2LAorCQkJICAweDAwLCAweDAxLCAweDAwLCAweDAxLCAweDAwLCAweDAxLCAweDAwLCAweDAxLAorCTB4MDAsIDB4NDAsIDB4NDAsIDB4MDAsIDB4YWUsIDB4MDAsIDB4ZDIsIDB4MDAsIDB4YWUsIDB4MDAsIDB4ZDIsCisJCQkgIDB4MDAsIDB4MDEsIDB4MDAsIDB4MDEsIDB4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GbGlwIEhvcml6b250YWxseSIsCisJCS5taW5pbXVtCT0gMCwKKwkJLm1heGltdW0JPSAxLAorCQkuc3RlcAkJPSAxLAorCQkuZGVmYXVsdF92YWx1ZQk9IDAsCisJfSwKK307CisKKy8qIHJlYWQgYSByZWdpc3RlciAqLworc3RhdGljIGludCBvdjk3NDBfcmVnX3JlYWQoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgdTE2IHJlZywgdTggKnZhbCkKK3sKKwlpbnQgcmV0OworCXN0cnVjdCBpMmNfbXNnIG1zZ1tdID0geworCQl7CisJCQkuYWRkcgk9IGNsaWVudC0+YWRkciwKKwkJCS5mbGFncwk9IDAsCisJCQkubGVuCT0gMiwKKwkJCS5idWYJPSAodTggKikmcmVnLAorCQl9LAorCQl7CisJCQkuYWRkcgk9IGNsaWVudC0+YWRkciwKKwkJCS5mbGFncwk9IEkyQ19NX1JELAorCQkJLmxlbgk9IDEsCisJCQkuYnVmCT0gdmFsLAorCQl9LAorCX07CisKKwlyZWcgPSBzd2FiMTYocmVnKTsKKworCXJldCA9IGkyY190cmFuc2ZlcihjbGllbnQtPmFkYXB0ZXIsIG1zZywgMik7CisJaWYgKHJldCA8IDApIHsKKwkJZGV2X2VycigmY2xpZW50LT5kZXYsICJGYWlsZWQgcmVhZGluZyByZWdpc3RlciAweCUwNHghXG4iLCByZWcpOworCQlyZXR1cm4gcmV0OworCX0KKworCXJldHVybiAwOworfQorCisvKiB3cml0ZSBhIHJlZ2lzdGVyICovCitzdGF0aWMgaW50IG92OTc0MF9yZWdfd3JpdGUoc3RydWN0IGkyY19jbGllbnQgKmNsaWVudCwgdTE2IHJlZywgdTggdmFsKQoreworCXN0cnVjdCBpMmNfbXNnIG1zZzsKKwlzdHJ1Y3QgeworCQl1MTYgcmVnOworCQl1OCB2YWw7CisJfSBfX3BhY2tlZCBidWY7CisJaW50IHJldDsKKworCXJlZyA9IHN3YWIxNihyZWcpOworCisJYnVmLnJlZyA9IHJlZzsKKwlidWYudmF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KKworCW1heDg5OTctPnJ0YyA9IGkyY19uZXdfZHVtbXkoaTJjLT5hZGFwdGVyLCBJMkNfQUREUl9SVEMpOworCWkyY19zZXRfY2xpZW50ZGF0YShtYXg4OTk3LT5ydGMsIG1heDg5OTcpOworCW1heDg5OTctPmhhcHRpYyA9IGkyY19uZXdfZHVtbXkoaTJjLT5hZGFwdGVyLCBJMkNfQUREUl9IQVBUSUMpOworCWkyY19zZXRfY2xpZW50ZGF0YShtYXg4OTk3LT5oYXB0aWMsIG1heDg5OTcpOworCW1heDg5OTctPm11aWMgPSBpMmNfbmV3X2R1bW15KGkyYy0+YWRhcHRlciwgSTJDX0FERFJfTVVJQyk7CisJaTJjX3NldF9jbGllbnRkYXRhKG1heDg5OTctPm11aWMsIG1heDg5OTcpOworCisJcG1fcnVudGltZV9zZXRfYWN0aXZlKG1heDg5OTctPmRldik7CisKKwltZmRfYWRkX2RldmljZXMobWF4ODk5Ny0+ZGV2LCAtMSwgbWF4ODk5N19kZXZzLAorCQkJQVJSQVlfU0laRShtYXg4OTk3X2RldnMpLAorCQkJTlVMTCwgMCk7CisKKwkvKgorCSAqIFRPRE86IGVuYWJsZSBvdGhlcnMgKGZsYXNoLCBtdWljLCBydGMsIGJhdHRlcnksIC4uLikgYW5kCisJICogY2hlY2sgdGhlIHJldHVybiB2YWx1ZQorCSAqLworCisJaWYgKHJldCA8IDApCisJCWdvdG8gZXJyX21mZDsKKworCXJldHVybiByZXQ7CisKK2Vycl9tZmQ6CisJbWZkX3JlbW92ZV9kZXZpY2VzKG1heDg5OTctPmRldik7CisJaTJjX3VucmVnaXN0ZXJfZGV2aWNlKG1heDg5OTctPm11aWMpOworCWkyY191bnJlZ2lzdGVyX2RldmljZShtYXg4OTk3LT5oYXB0aWMpOworCWkyY191bnJlZ2lzdGVyX2RldmljZShtYXg4OTk3LT5ydGMpOworZXJyOgorCWtmcmVlKG1heDg5OTcpOworCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyBpbnQgbWF4OD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FksIDB4NUEsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX2VsdnNzX29uW10gPSB7CisJMHhCMSwgMHgwRCwKKworCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MTYsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX2d0Y29uW10gPSB7CisJMHhGNywgMHgwOSwKKworCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX3BhbmVsX2NvbmRpdGlvbltdID0geworCTB4RjgsIDB4MDUsCisKKwlEQVRBX09OTFksIDB4NjUsCisJREFUQV9PTkxZLCAweDk2LAorCURBVEFfT05MWSwgMHg3MSwKKwlEQVRBX09OTFksIDB4N0QsCisJREFUQV9PTkxZLCAweDE5LAorCURBVEFfT05MWSwgMHgzQiwKKwlEQVRBX09OTFksIDB4MEQsCisJREFUQV9PTkxZLCAweDE5LAorCURBVEFfT05MWSwgMHg3RSwKKwlEQVRBX09OTFksIDB4MEQsCisJREFUQV9PTkxZLCAweEUyLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDdFLAorCURBVEFfT05MWSwgMHg3RCwKKwlEQVRBX09OTFksIDB4MDcsCisJREFUQV9PTkxZLCAweDA3LAorCURBVEFfT05MWSwgMHgyMCwKKwlEQVRBX09OTFksIDB4MjAsCisJREFUQV9PTkxZLCAweDIwLAorCURBVEFfT05MWSwgMHgwMiwKKwlEQVRBX09OTFksIDB4MDIsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX2dhbW1hX3NldDFbXSA9IHsKKwkweEY5LCAweDAwLAorCisJREFUQV9PTkxZLCAweEE3LAorCURBVEFfT05MWSwgMHhCNCwKKwlEQVRBX09OTFksIDB4QUUsCisJREFUQV9PTkxZLCAweEJGLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4OTEsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHhCMiwKKwlEQVRBX09OTFksIDB4QjQsCisJREFUQV9PTkxZLCAweEFBLAorCURBVEFfT05MWSwgMHhCQiwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweEFDLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4QjMsCisJREFUQV9PTkxZLCAweEIxLAorCURBVEFfT05MWSwgMHhBQSwKKwlEQVRBX09OTFksIDB4QkMsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHhCMywKKwlFTkRERUYsIDB4MDAKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBzZXFfZ2FtbWFfY3RybFtdID0geworCTB4RkIsIDB4MDIsCisKKwlEQVRBX09OTFksIDB4NUEsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX2dhbW1hX3N0YXJ0W10gPSB7CisJMHhGOSwgQ09NTUFORF9PTkxZLAorCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX2Fwb25bXSA9IHsKKwkweEYzLCAweDAwLAorCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MEEsCisJREFUQV9PTkxZLCAweDAyLAorCUVORERFRiwgMHgwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IHNlcV9kaXNwbGF5X2N0cmxbXSA9IHsKKwkweEYyLCAweDAyLAorCisJREFUQV9PTkxZLCAweDA4LAorCURBVEFfT05MWSwgMHgwOCwKKwlEQVRBX09OTFksIDB4MTAsCisJREFUQV9PTkxZLCAweDEwLAorCUVORERFRiwgMHgwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IHNlcV9tYW51YWxfcHdyW10gPSB7CisJMHhCMCwgMHgwNCwKKwlFTkRERUYsIDB4MDAKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBzZXFfcHdyX2N0cmxbXSA9IHsKKwkweEY0LCAweDBBLAorCisJREFUQV9PTkxZLCAweDg3LAorCURBVEFfT05MWSwgMHgyNSwKKwlEQVRBX09OTFksIDB4NkEsCisJREFUQV9PTkxZLCAweDQ0LAorCURBVEFfT05MWSwgMHgwMiwKKwlEQVRBX09OTFksIDB4ODgsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX3NsZWVwX291dFtdID0geworCTB4MTEsIENPTU1BTkRfT05MWSwKKwlFTkRERUYsIDB4MDAKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBzZXFfc2xlZXBfaW5bXSA9IHsKKwkweDEwLCBDT01NQU5EX09OTFksCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX2Rpc3BsYXlfb25bXSA9IHsKKwkweDI5LCBDT01NQU5EX09OTFksCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX2Rpc3BsYXlfb2ZmW10gPSB7CisJMHgyOCwgQ09NTUFORF9PTkxZLAorCUVORERFRiwgMHgwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IHNlcV92Y2kxXzFzdF9lbltdID0geworCTB4RjMsIDB4MTAsCisKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDIsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX3ZsMV9lbltdID0geworCTB4RjMsIDB4MTEsCisKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDIsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX3ZsMl9lbltdID0geworCTB4RjMsIDB4MTMsCisKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDIsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX3ZjaTFfMm5kX2VuW10gPSB7CisJMHhGMywgMHgzMywKKworCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMiwKKwlFTkRERUYsIDB4MDAKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBzZXFfdmwzX2VuW10gPSB7CisJMHhGMywgMHgzNywKKworCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMiwKKwlFTkRERUYsIDB4MDAKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBzZXFfdnJlZzFfYW1wX2VuW10gPSB7CisJMHhGMywgMHgzNywKKworCURBVEFfT05MWSwgMHgwMSwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMiwKKwlFTkRERUYsIDB4MDAKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBzZXFfdmdoX2FtcF9lbltdID0geworCTB4RjMsIDB4MzcsCisKKwlEQVRBX09OTFksIDB4MTEsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDIsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX3ZnbF9hbXBfZW5bXSA9IHsKKwkweEYzLCAweDM3LAorCisJREFUQV9PTkxZLCAweDMxLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAyLAorCUVORERFRiwgMHgwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IHNlcV92bW9zX2FtcF9lbltdID0geworCTB4RjMsIDB4MzcsCisKKwlEQVRBX09OTFksIDB4QjEsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDMsCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX3ZpbnRfYW1wX2VuW10gPSB7CisJMHhGMywgMHgzNywKKworCURBVEFfT05MWSwgMHhGMSwKKwkvKiBEQVRBX09OTFksIDB4NzEsCVZNT1MvVkJML1ZCSCBub3QgdXNlZCAqLworCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAzLAorCS8qIERBVEFfT05MWSwgMHgwMiwJVk1PUy9WQkwvVkJIIG5vdCB1c2VkICovCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX3ZiaF9hbXBfZW5bXSA9IHsKKwkweEYzLCAweDM3LAorCisJREFUQV9PTkxZLCAweEY5LAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAzLAorCUVORERFRiwgMHgwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IHNlcV92YmxfYW1wX2VuW10gPSB7CisJMHhGMywgMHgzNywKKworCURBVEFfT05MWSwgMHhGRCwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMywKKwlFTkRERUYsIDB4MDAKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBzZXFfZ2FtX2FtcF9lbltdID0geworCTB4RjMsIDB4MzcsCisKKwlEQVRBX09OTFksIDB4RkYsCisJLyogREFUQV9PTkxZLCAweDczLAlWTU9TL1ZCTC9WQkggbm90IHVzZWQgKi8KKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMywKKwkvKiBEQVRBX09OTFksIDB4MDIsCVZNT1MvVkJML1ZCSCBub3QgdXNlZCAqLworCUVORERFRiwgMHgwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IHNlcV9zZF9hbXBfZW5bXSA9IHsKKwkweEYzLCAweDM3LAorCisJREFUQV9PTkxZLCAweEZGLAorCS8qIERBVEFfT05MWSwgMHg3MywJVk1PUy9WQkwvVkJIIG5vdCB1c2VkICovCisJREFUQV9PTkxZLCAweDgwLAorCURBVEFfT05MWSwgMHgwMCwKKwlEQVRBX09OTFksIDB4MDMsCisJLyogREFUQV9PTkxZLCAweDAyLAlWTU9TL1ZCTC9WQkggbm90IHVzZWQgKi8KKwlFTkRERUYsIDB4MDAKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBzaG9ydCBzZXFfZ2xzX2VuW10gPSB7CisJMHhGMywgMHgzNywKKworCURBVEFfT05MWSwgMHhGRiwKKwkvKiBEQVRBX09OTFksIDB4NzMsCVZNT1MvVkJML1ZCSCBub3QgdXNlZCAqLworCURBVEFfT05MWSwgMHg4MSwKKwlEQVRBX09OTFksIDB4MDAsCisJREFUQV9PTkxZLCAweDAzLAorCS8qIERBVEFfT05MWSwgMHgwMiwJVk1PUy9WQkwvVkJIIG5vdCB1c2VkICovCisJRU5EREVGLCAweDAwCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgc2hvcnQgc2VxX2Vsc19lbltdID0geworCTB4RjMsIDB4MzcsCisKKwlEQVRBX09OTFksIDB4RkYsCisJLyogREFUQV9PTkxZLCAweDczLAlWTU9TL1ZCTC9WQkggbm90IHVzZWQgKi8KKwlEQVRBX09OTFksIDB4ODMsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMywKKwkvKiBEQVRBX09OTFksIDB4MDIsCVZNT1MvVkJML1ZCSCBub3QgdXNlZCAqLworCUVORERFRiwgMHgwMAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNob3J0IHNlcV9lbF9vbltdID0geworCTB4RjMsIDB4MzcsCisKKwlEQVRBX09OTFksIDB4RkYsCisJLyogREFUQV9PTkxZLCAweDczLAlWTU9TL1ZCTC9WQkggbm90IHVzZWQgKi8KKwlEQVRBX09OTFksIDB4ODcsCisJREFUQV9PTkxZLCAweDAwLAorCURBVEFfT05MWSwgMHgwMywKKwkvKiBEQVRBX09OTFksIDB4MDIsCVZNT1MvVkJML1ZCSCBub3QgdXNlZCAqLworCUVORERFRiwgMHgwMAorfTsKKworc3RhdGljIGludCBsZDkwNDBfc3BpX3dyaXRlX2J5dGUoc3RydWN0IGxkOTA0MCAqbGNkLCBpbnQgYWRkciwgaW50IGRhdGEpCit7CisJdTE2IGJ1ZlsxXTsKKwlzdHJ1Y3Qgc3BpX21lc3NhZ2UgbXNnOworCisJc3RydWN0IHNwaV90cmFuc2ZlciB4ZmVyID0geworCQkubGVuCQk9IDIsCisJCS50eF9idWYJCT0gYnVmLAorCX07CisKKwlidWZbMF0gPSAoYWRkciA8PCA4KSB8IGRhdGE7CisKKwlzcGlfbWVzc2FnZV9pb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cnVjdCBjZXBoX3Zpbm8gY2VwaF92aW5vKHN0cnVjdCBpbm9kZSAqaW5vZGUpCiB7CiAJcmV0dXJuIGNlcGhfaW5vZGUoaW5vZGUpLT5pX3Zpbm87CkBAIC0zMjcsMTkgKzMzOSw0OSBAQAogLyoKICAqIGlub190IGlzIDw2NCBiaXRzIG9uIG1hbnkgYXJjaGl0ZWN0dXJlcywgYmxlY2guCiAgKgotICogZG9uJ3QgaW5jbHVkZSBzbmFwIGluIGlubyBoYXNoLCBhdCBsZWFzdCBmb3Igbm93LgorICogICAgICAgICAgICAgICBpX2lubyAoa2VybmVsIGlub2RlKSAgIHN0X2lubyAodXNlcnNwYWNlKQorICogaTM4NiAgICAgICAgICAzMiAgICAgICAgICAgICAgICAgICAgIDMyCisgKiB4ODZfNjQraW5vMzIgIDY0ICAgICAgICAgICAgICAgICAgICAgMzIKKyAqIHg4Nl82NCAgICAgICAgNjQgICAgICAgICAgICAgICAgICAgICA2NAorICovCitzdGF0aWMgaW5saW5lIHUzMiBjZXBoX2lub190b19pbm8zMihpbm9fdCBpbm8pCit7CisJaW5vIF49IGlubyA+PiAoc2l6ZW9mKGlubykgKiA4IC0gMzIpOworCWlmICghaW5vKQorCQlpbm8gPSAxOworCXJldHVybiBpbm87Cit9CisKKy8qCisgKiBrZXJuZWwgaV9pbm8gdmFsdWUKICAqLwogc3RhdGljIGlubGluZSBpbm9fdCBjZXBoX3Zpbm9fdG9faW5vKHN0cnVjdCBjZXBoX3Zpbm8gdmlubykKIHsKIAlpbm9fdCBpbm8gPSAoaW5vX3Qpdmluby5pbm87ICAvKiBeICh2aW5vLnNuYXAgPDwgMjApOyAqLwogI2lmIEJJVFNfUEVSX0xPTkcgPT0gMzIKLQlpbm8gXj0gdmluby5pbm8gPj4gKHNpemVvZih1NjQpLXNpemVvZihpbm9fdCkpICogODsKLQlpZiAoIWlubykKLQkJaW5vID0gMTsKKwlpbm8gPSBjZXBoX2lub190b19pbm8zMihpbm8pOwogI2VuZGlmC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SkKKworI2VsaWYgZGVmaW5lZChDT05GSUdfTUlOSVhfRlNfQklHX0VORElBTl8xNkJJVF9JTkRFWEVEKQorCisvKgorICogYmlnLWVuZGlhbiAxNmJpdCBpbmRleGVkIGJpdG1hcHMKKyAqLworCitzdGF0aWMgaW5saW5lIGludCBtaW5peF9maW5kX2ZpcnN0X3plcm9fYml0KGNvbnN0IHZvaWQgKnZhZGRyLCB1bnNpZ25lZCBzaXplKQoreworCWNvbnN0IHVuc2lnbmVkIHNob3J0ICpwID0gdmFkZHIsICphZGRyID0gdmFkZHI7CisJdW5zaWduZWQgc2hvcnQgbnVtOworCisJaWYgKCFzaXplKQorCQlyZXR1cm4gMDsKKworCXNpemUgPSAoc2l6ZSA+PiA0KSArICgoc2l6ZSAmIDE1KSA+IDApOworCXdoaWxlICgqcCsrID09IDB4ZmZmZikgeworCQlpZiAoLS1zaXplID09IDApCisJCQlyZXR1cm4gKHAgLSBhZGRyKSA8PCA0OworCX0KKworCW51bSA9ICotLXA7CisJcmV0dXJuICgocCAtIGFkZHIpIDw8IDQpICsgZmZ6KG51bSk7Cit9CisKKyNkZWZpbmUgbWluaXhfdGVzdF9hbmRfc2V0X2JpdChuciwgYWRkcikJXAorCV9fdGVzdF9hbmRfc2V0X2JpdCgobnIpIF4gMTYsICh1bnNpZ25lZCBsb25nICopKGFkZHIpKQorI2RlZmluZSBtaW5peF9zZXRfYml0KG5yLCBhZGRyKQlcCisJX19zZXRfYml0KChucikgXiAxNiwgKHVuc2lnbmVkIGxvbmcgKikoYWRkcikpCisjZGVmaW5lIG1pbml4X3Rlc3RfYW5kX2NsZWFyX2JpdChuciwgYWRkcikJXAorCV9fdGVzdF9hbmRfY2xlYXJfYml0KChucikgXiAxNiwgKHVuc2lnbmVkIGxvbmcgKikoYWRkcikpCisKK3N0YXRpYyBpbmxpbmUgaW50IG1pbml4X3Rlc3RfYml0KGludCBuciwgY29uc3Qgdm9pZCAqdmFkZHIpCit7CisJY29uc3QgdW5zaWduZWQgc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oc2l6ZW9mIChzdHJ1Y3QgYWNwaV90YWJsZV9mYWR0KSkKKwogI2VuZGlmCQkJCS8qIF9fQUNUQkxfSF9fICovCmRpZmYgLS1naXQgYS9pbmNsdWRlL2FjcGkvYWN0YmwyLmggYi9pbmNsdWRlL2FjcGkvYWN0YmwyLmgKaW5kZXggMGZjMTVkZi4uNThiZGQwNSAxMDA2NDQKLS0tIGEvaW5jbHVkZS9hY3BpL2FjdGJsMi5oCisrKyBiL2luY2x1ZGUvYWNwaS9hY3RibDIuaApAQCAtMSw2ICsxLDYgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCi0gKiBOYW1lOiBhY3RibDIuaCAtIEFDUEkgU3BlY2lmaWNhdGlvbiBSZXZpc2lvbiAyLjAgVGFibGVzCisgKiBOYW1lOiBhY3RibDIuaCAtIEFDUEkgVGFibGUgRGVmaW5pdGlvbnMgKHRhYmxlcyBub3QgaW4gQUNQSSBzcGVjKQogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtNzE2LDYgKzcxNiw2OCBAQAogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoKKyAqIFNMSUMgLSBTb2Z0d2FyZSBMaWNlbnNpbmcgRGVzY3JpcHRpb24gVGFibGUKKyAqICAgICAgICBWZXJzaW9uIDEKKyAqCisgKiBDb25mb3JtcyB0byAiT0VNIEFjdGl2YXRpb24gMi4wIGZvciBXaW5kb3dzIFZpc3RhIE9wZXJhdGluZyBTeXN0ZW1zIiwKKyAqIENvcHlyaWdodCAyMDA2CisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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VCREVWICsgMykKKworI2RlZmluZSBNRURJQV9FTlRfRkxfREVGQVVMVAkJKDEgPDwgMCkKKworc3RydWN0IG1lZGlhX2VudGl0eV9kZXNjIHsKKwlfX3UzMiBpZDsKKwljaGFyIG5hbWVbMzJdOworCV9fdTMyIHR5cGU7CisJX191MzIgcmV2aXNpb247CisJX191MzIgZmxhZ3M7CisJX191MzIgZ3JvdXBfaWQ7CisJX191MTYgcGFkczsKKwlfX3UxNiBsaW5rczsKKworCV9fdTMyIHJlc2VydmVkWzRdOworCisJdW5pb24geworCQkvKiBOb2RlIHNwZWNpZmljYXRpb25zICovCisJCXN0cnVjdCB7CisJCQlfX3UzMiBtYWpvcjsKKwkJCV9fdTMyIG1pbm9yOworCQl9IHY0bDsKKwkJc3RydWN0IHsKKwkJCV9fdTMyIG1ham9yOworCQkJX191MzIgbWlub3I7CisJCX0gZmI7CisJCXN0cnVjdCB7CisJCQlfX3UzMiBjYXJkOworCQkJX191MzIgZGV2aWNlOworCQkJX191MzIgc3ViZGV2aWNlOworCQl9IGFsc2E7CisJCWludCBkdmI7CisKKwkJLyogU3ViLWRldmljZSBzcGVjaWZpY2F0aW9ucyAqLworCQkvKiBOb3RoaW5nIG5lZWRlZCB5ZXQgKi8KKwkJX191OCByYXdbMTg0XTsKKwl9OworfTsKKworI2RlZmluZSBNRURJQV9QQURfRkxfU0lOSwkJKDEgPDwgMCkKKyNkZWZpbmUgTUVESUFfUEFEX0ZMX1NPVVJDRQkJKDEgPDwgMSkKKworc3RydWN0IG1lZGlhX3BhZF9kZXNjIHsKKwlfX3UzMiBlbnRpdHk7CQkvKiBlbnRpdHkgSUQgKi8KKwlfX3UxNiBpbmRleDsJCS8qIHBhZCBpbmRleCAqLworCV9fdTMyIGZsYWdzOwkJLyogcGFkIGZsYWdzICovCisJX191MzIgcmVzZXJ2ZWRbMl07Cit9OworCisjZGVmaW5lIE1FRElBX0xOS19GTF9FTkFCTEVECQkoMSA8PCAwKQorI2RlZmluZSBNRURJQV9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RhLWJjdHY3ZSIKQEAgLTEyNSwxNCArMTI1LDE2IEBACiAjZGVmaW5lIFJDX01BUF9QUk9URVVTXzIzMDkgICAgICAgICAgICAgICJyYy1wcm90ZXVzLTIzMDkiCiAjZGVmaW5lIFJDX01BUF9QVVJQTEVUViAgICAgICAgICAgICAgICAgICJyYy1wdXJwbGV0diIKICNkZWZpbmUgUkNfTUFQX1BWOTUxICAgICAgICAgICAgICAgICAgICAgInJjLXB2OTUxIgotI2RlZmluZSBSQ19NQVBfUkM1X0hBVVBQQVVHRV9ORVcgICAgICAgICAicmMtcmM1LWhhdXBwYXVnZS1uZXciCisjZGVmaW5lIFJDX01BUF9IQVVQUEFVR0UgICAgICAgICAgICAgICAgICJyYy1oYXVwcGF1Z2UiCiAjZGVmaW5lIFJDX01BUF9SQzVfVFYgICAgICAgICAgICAgICAgICAgICJyYy1yYzUtdHYiCiAjZGVmaW5lIFJDX01BUF9SQzZfTUNFICAgICAgICAgICAgICAgICAgICJyYy1yYzYtbWNlIgogI2RlZmluZSBSQ19NQVBfUkVBTF9BVURJT18yMjBfMzJfS0VZUyAgICAicmMtcmVhbC1hdWRpby0yMjAtMzIta2V5cyIKICNkZWZpbmUgUkNfTUFQX1NUUkVBTVpBUCAgICAgICAgICAgICAgICAgInJjLXN0cmVhbXphcCIKICNkZWZpbmUgUkNfTUFQX1RCU19ORUMgICAgICAgICAgICAgICAgICAgInJjLXRicy1uZWMiCisjZGVmaW5lIFJDX01BUF9URUNITklTQVRfVVNCMiAgICAgICAgICAgICJyYy10ZWNobmlzYXQtdXNiMiIKICNkZWZpbmUgUkNfTUFQX1RFUlJBVEVDX0NJTkVSR1lfWFMgICAgICAgInJjLXRlcnJhdGVjLWNpbmVyZ3kteHMiCiAjZGVmaW5lIFJDX01BUF9URVJSQVRFQ19TTElNICAgICAgICAgICAgICJyYy10ZXJyYXRlYy1zbGltIgorI2RlZmluZSBSQ19NQVBfVEVSUkFURUNfU0xJTV8yICAgICAgICAgICAicmMtdGV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iAlZCwlZCBpbm8gJWx1IGRpciAlbHUgbW9kZSAwJW8iLAotCQkgIF9fZW50cnktPmRldl9tYWpvciwgX19lbnRyeS0+ZGV2X21pbm9yLAorCQkgIE1BSk9SKF9fZW50cnktPmRldiksIE1JTk9SKF9fZW50cnktPmRldiksCiAJCSAgKHVuc2lnbmVkIGxvbmcpIF9fZW50cnktPmlubywKIAkJICAodW5zaWduZWQgbG9uZykgX19lbnRyeS0+ZGlyLCBfX2VudHJ5LT5tb2RlKQogKTsKQEAgLTEwNCwyMSArOTgsMTkgQEAKIAlUUF9BUkdTKGlub2RlKSwKIAogCVRQX1NUUlVDVF9fZW50cnkoCi0JCV9fZmllbGQoCWludCwgICBkZXZfbWFqb3IgICAgICAgICAgICAgICAgKQotCQlfX2ZpZWxkKAlpbnQsICAgZGV2X21pbm9yICAgICAgICAgICAgICAgICkKKwkJX19maWVsZCgJZGV2X3QsCWRldgkJCSkKIAkJX19maWVsZCgJaW5vX3QsCWlubwkJCSkKIAkJX19maWVsZCgJaW50LAlubGluawkJCSkKIAkpLAogCiAJVFBfZmFzdF9hc3NpZ24oCi0JCV9fZW50cnktPmRldl9tYWpvciA9IE1BSk9SKGlub2RlLT5pX3NiLT5zX2Rldik7Ci0JCV9fZW50cnktPmRldl9taW5vciA9IE1JTk9SKGlub2RlLT5pX3NiLT5zX2Rldik7CisJCV9fZW50cnktPmRldgk9IGlub2RlLT5pX3NiLT5zX2RldjsKIAkJX19lbnRyeS0+aW5vCT0gaW5vZGUtPmlfaW5vOwogCQlfX2VudHJ5LT5ubGluawk9IGlub2RlLT5pX25saW5rOwogCSksCiAKIAlUUF9wcmludGsoImRldiAlZCwlZCBpbm8gJWx1IG5saW5rICVkIiwKLQkJICBfX2VudHJ5LT5kZXZfbWFqb3IsIF9fZW50cnktPmRldl9taW5vciwKKwkJICBNQUpPUihfX2VudHJ5LT5kZXYpLCBNSU5PUihfX2VudHJ5LT5kZXYpLAogCQkgICh1bnNpZ25lZCBsb25nKSBfX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ZpZWxkKAlpbnQsICAgZGV2X21ham9yICAgICAgICAgICAgICAgICkKLQkJX19maWVsZCgJaW50LCAgIGRldl9taW5vciAgICAgICAgICAgICAgICApCisJCV9fZmllbGQoCWRldl90LAlkZXYJCQkpCiAJCV9fZmllbGQoCWlub190LAlpbm8JCQkpCiAKIAkpLAogCiAJVFBfZmFzdF9hc3NpZ24oCi0JCV9fZW50cnktPmRldl9tYWpvciA9IE1BSk9SKGlub2RlLT5pX3NiLT5zX2Rldik7Ci0JCV9fZW50cnktPmRldl9taW5vciA9IE1JTk9SKGlub2RlLT5pX3NiLT5zX2Rldik7CisJCV9fZW50cnktPmRldgk9IGlub2RlLT5pX3NiLT5zX2RldjsKIAkJX19lbnRyeS0+aW5vCT0gaW5vZGUtPmlfaW5vOwogCSksCiAKIAlUUF9wcmludGsoImRldiAlZCwlZCBpbm8gJWx1IiwKLQkJICBfX2VudHJ5LT5kZXZfbWFqb3IsIF9fZW50cnktPmRldl9taW5vciwKKwkJICBNQUpPUihfX2VudHJ5LT5kZXYpLCBNSU5PUihfX2VudHJ5LT5kZXYpLAogCQkgICh1bnNpZ25lZCBsb25nKSBfX2VudHJ5LT5pbm8pCiApOwogCkBAIC02MDYsMjAgKzY0MSwxOSBAQAogCVRQX0FSR1Moc2IsIG5lZWRlZCksCiAKIAlUUF9TVFJVQ1RfX2VudHJ5KAotCQlfX2ZpZWxkKAlpbnQsICAgZGV2X21ham9yICAgICAgICAgICAgICAgICkKLQkJX19maWVsZCgJaW50LCAgIGRldl9taW5vciAgICAgICAgICAgICAgICApCisJCV9fZmllbGQoCWRldl90LAlkZXYJCQkpCiAJCV9fZmllbGQoCWludCwJbmVlZGVkCQkJKQogCiAJKSwKIAogCVRQX2Zhc3RfYXNzaWduKAotCQlfX2VudHJ5LT5kZXZfbWFqb3IgPSBNQUpPUihzYi0+c19kZXYpOwotCQlfX2VudHJ5LT5kZXZfbWlub3IgPSBNSU5PUihzYi0+c19kZXYpOworCQlfX2VudHJ5LT5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ICA9IGlub2RlLT5pX2lubzsKKwkJX19lbnRyeS0+ZGV2ICAgID0gaW5vZGUtPmlfc2ItPnNfZGV2OworCQlfX2VudHJ5LT5sYmxrCT0gbGJsazsKKwkJX19lbnRyeS0+cGJsawk9IHBibGs7CisJCV9fZW50cnktPmxlbgk9IGxlbjsKKwkJX19lbnRyeS0+cmV0CT0gcmV0OworCSksCisKKwlUUF9wcmludGsoImRldiAlZCwlZCBpbm8gJWx1IGxibGsgJXUgcGJsayAlbGx1IGxlbiAldSByZXQgJWQiLAorCQkgIE1BSk9SKF9fZW50cnktPmRldiksIE1JTk9SKF9fZW50cnktPmRldiksCisJCSAgKHVuc2lnbmVkIGxvbmcpIF9fZW50cnktPmlubywKKwkJICAodW5zaWduZWQpIF9fZW50cnktPmxibGssICh1bnNpZ25lZCBsb25nIGxvbmcpIF9fZW50cnktPnBibGssCisJCSAgX19lbnRyeS0+bGVuLCBfX2VudHJ5LT5yZXQpCispOworCitERUZJTkVfRVZFTlQoZXh0NF9fbWFwX2Jsb2Nrc19leGl0LCBleHQ0X2V4dF9tYXBfYmxvY2tzX2V4aXQsCisJVFBfUFJPVE8oc3RydWN0IGlub2RlICppbm9kZSwgZXh0NF9sYmxrX3QgbGJsaywKKwkJIGV4dDRfZnNibGtfdCBwYmxrLCB1bnNpZ25lZCBsZW4sIGludCByZXQpLAorCisJVFBfQVJHUyhpbm9kZSwgbGJsaywgcGJsaywgbGVuLCByZXQpCispOworCitERUZJTkVfRVZFTlQoZXh0NF9fbWFwX2Jsb2Nrc19leGl0LCBleHQ0X2luZF9tYXBfYmxvY2tzX2V4aXQsCisJVFBfUFJPVE8oc3RydWN0IGlub2RlICppbm9kZSwgZXh0NF9sYmxrX3QgbGJsaywKKwkJIGV4dDRfZnNibGtfdCBwYmxrLCB1bnNpZ25lZCBsZW4sIGludCByZXQpLAorCisJVFBfQVJHUyhpbm9kZSwgbGJsaywgcGJsaywgbGVuLCByZXQpCispOworCitUUkFDRV9FVkVOVChleHQ0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ucyA9IGNvcHlfdXRzbmFtZShmbGFncywgdHNrLT5uc3Byb3h5LT51dHNfbnMpOworCW5ld19uc3AtPnV0c19ucyA9IGNvcHlfdXRzbmFtZShmbGFncywgdHNrKTsKIAlpZiAoSVNfRVJSKG5ld19uc3AtPnV0c19ucykpIHsKIAkJZXJyID0gUFRSX0VSUihuZXdfbnNwLT51dHNfbnMpOwogCQlnb3RvIG91dF91dHM7CiAJfQogCi0JbmV3X25zcC0+aXBjX25zID0gY29weV9pcGNzKGZsYWdzLCB0c2stPm5zcHJveHktPmlwY19ucyk7CisJbmV3X25zcC0+aXBjX25zID0gY29weV9pcGNzKGZsYWdzLCB0c2spOwogCWlmIChJU19FUlIobmV3X25zcC0+aXBjX25zKSkgewogCQllcnIgPSBQVFJfRVJSKG5ld19uc3AtPmlwY19ucyk7CiAJCWdvdG8gb3V0X2lwYzsKZGlmZiAtLWdpdCBhL2tlcm5lbC9wYW5pYy5jIGIva2VybmVsL3BhbmljLmMKaW5kZXggOTkxYmI4Ny4uNjkyMzE2NyAxMDA2NDQKLS0tIGEva2VybmVsL3BhbmljLmMKKysrIGIva2VybmVsL3BhbmljLmMKQEAgLTQzMywzICs0MzMsMTMgQEAKIAogY29yZV9wYXJhbShwYW5pYywgcGFuaWNfdGltZW91dCwgaW50LCAwNjQ0KTsKIGNvcmVfcGFyYW0ocGF1c2Vfb25fb29wcywgcGF1c2Vfb25fb29wcywgaW50LCAwNjQ0KTsKKworc3RhdGljIGludCBfX2luaXQgb29wc19zZXR1cChjaGFyICpzKQoreworCWlmICghcykKKwkJcmV0dXJuIC1FSU5WQUw7CisJaWYgKCFzdHJjbXAocywgInBhbmljIikpCisJCXBhbmljX29uX29vcHMgPSAxOworCXJldHVybiAwOworfQorZWFybHlfcGFyYW0oIm9vcHMiLCBvb3BzX3NldHVwKTsKZGlmZiAtLWdpdCBhL2tlcm5lbC9waWRfbmFtZXNwYWNlLmMgYi9rZXJuZWwvcGlkX25hbWVzcGFjZS5jCmluZGV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ICpyZXMpCit7CisJaWYgKHNbMF0gPT0gJysnKQorCQlzKys7CisJcmV0dXJuIF9rc3RydG91bGwocywgYmFzZSwgcmVzKTsKK30KK0VYUE9SVF9TWU1CT0woa3N0cnRvdWxsKTsKKworaW50IGtzdHJ0b2xsKGNvbnN0IGNoYXIgKnMsIHVuc2lnbmVkIGludCBiYXNlLCBsb25nIGxvbmcgKnJlcykKK3sKKwl1bnNpZ25lZCBsb25nIGxvbmcgdG1wOworCWludCBydjsKKworCWlmIChzWzBdID09ICctJykgeworCQlydiA9IF9rc3RydG91bGwocyArIDEsIGJhc2UsICZ0bXApOworCQlpZiAocnYgPCAwKQorCQkJcmV0dXJuIHJ2OworCQlpZiAoKGxvbmcgbG9uZykoLXRtcCkgPj0gMCkKKwkJCXJldHVybiAtRVJBTkdFOworCQkqcmVzID0gLXRtcDsKKwl9IGVsc2UgeworCQlydiA9IGtzdHJ0b3VsbChzLCBiYXNlLCAmdG1wKTsKKwkJaWYgKHJ2IDwgMCkKKwkJCXJldHVybiBydjsKKwkJaWYgKChsb25nIGxvbmcpdG1wIDwgMCkKKwkJCXJldHVybiAtRVJBTkdFOworCQkqcmVzID0gdG1wOworCX0KKwlyZXR1cm4gMDsKK30KK0VYUE9SVF9TWU1CT0woa3N0cnRvbGwpOworCisvKiBJbnRlcm5hbCwgZG8gbm90IHVzZS4gKi8KK2ludCBfa3N0cnRvdWwoY29uc3QgY2hhciAqcywgdW5zaWduZWQgaW50IGJhc2UsIHVuc2lnbmVkIGxvbmcgKnJlcykKK3sKKwl1bnNpZ25lZCBsb25nIGxvbmcgdG1wOworCWludCBydjsKKworCXJ2ID0ga3N0cnRvdWxsKHMsIGJhc2UsICZ0bXApOworCWlmIChydiA8IDApCisJCXJldHVybiBydjsKKwlpZiAodG1wICE9ICh1bnNpZ25lZCBsb25nIGxvbmcpKHVuc2lnbmVkIGxvbmcpdG1wKQorCQlyZXR1cm4gLUVSQU5HRTsKKwkqcmVzID0gdG1wOworCXJldHVybiAw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hfdWludDE2X3Q7CiB0eXBlZGVmIHVuc2lnbmVkIGludCBmbGV4X3VpbnQzMl90OworI2VuZGlmIC8qICEgQzk5ICovCiAKIC8qIExpbWl0cyBvZiBpbnRlZ3JhbCB0eXBlcy4gKi8KICNpZm5kZWYgSU5UOF9NSU4KQEAgLTEwOSw4ICsxMTAsNiBAQAogI2RlZmluZSBVSU5UMzJfTUFYICAgICAgICAgICAgICg0Mjk0OTY3Mjk1VSkKICNlbmRpZgogCi0jZW5kaWYgLyogISBDOTkgKi8KLQogI2VuZGlmIC8qICEgRkxFWElOVF9IICovCiAKIC8qICVlbmRpZiAqLwpAQCAtNDU2LDE2ICs0NTUsMTYgQEAKIAlmbGV4X2ludDMyX3QgeXlfdmVyaWZ5OwogCWZsZXhfaW50MzJfdCB5eV9ueHQ7CiAJfTsKLXN0YXRpYyB5eWNvbnN0IGZsZXhfaW50MTZfdCB5eV9hY2NlcHRbNzZdID0KK3N0YXRpYyB5eWNvbnN0IGZsZXhfaW50MTZfdCB5eV9hY2NlcHRbNzNdID0KICAgICB7ICAgMCwKLSAgICAgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAxNCwgICAxMiwgICAgNCwgICAgMywgICAxMiwgICAgNywKLSAgICAgICAxMiwgICAxMiwgICAgNywgICAxMiwgICAxMiwgICAxMiwgICAxMiwgICAxMiwgICAgOSwgICAgOSwKLSAgICAgICAxMiwgICAxMiwgICAxMiwgICAgNCwgICAgMCwgICAgNSwgICAgMCwgICAgNywgICAgMCwgICAgNiwKLSAgICAgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMiwgICAgOCwgICAxMCwgICAxMCwKLSAgICAgICAgOSwgICAgMCwgICAgMCwgICAgOSwgICAgOSwgICAgMCwgICAgOSwgICAgMCwgICAgMCwgICAxMSwKLSAgICAgICAgMCwgICAgMCwgICAgMCwgICAxMCwgICAgMCwgICAxMCwgICAgOSwgICAgOSwgICAgMCwgICAgMCwKLSAgICAgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAxMCwgICAxMCwgICAgMCwgICAgMCwgICAgMCwKLSAgICAgICAgMCwgICAgMCwgICAgMCwgICAgMSwgICAgMAorICAgICAgICAwLCAgICAwLCAgIDE0LCAgIDEyLCAgICA0LCAgICAzLCAgIDEyLCAgICA3LCAgIDEyLCAgIDEyLAorICAgICAgIDEyLCAgIDEyLCAgIDEyLCAgICA5LCAgICA5LCAgIDEyLCAgIDEyLCAgICA3LCAgIDEyLCAgIDEyLAorICAgICAgICA0LCAgICAwLCAgICA1LCAgICAwLCAgICA3LCAgICA4LCAgICAwLCAgICA2LCAgICAwLCAgICAwLAorICAgICAgIDEwLCAgIDEwLCAgICA5LCAgICAwLCAgICAwLCAgICA5LCAgICA5LCAgICAwLCAgICA5LCAgICAwLAorICAgICAgICAwLCAgICAwLCAgICAwLCAgICAyLCAgICAwLCAgICAwLCAgIDExLCAgICAwLCAgIDEwLCAgICAwLAorICAgICAgIDEwLCAgICA5LCAgICA5LCAgICAwLCAgICAwLCAgICAwLCAgIDEwLCAgIDEwLCAgICAwLCAgICAwLAorICAgICAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLCAgICAwLAorICAgICAgICAxLCAgICAwCiAgICAgfSA7CiAKIHN0YXRpYyB5eWNvbnN0IGZsZXhfaW50MzJfdCB5eV9lY1syNTZdID0KQEAgLTUwNywxMDggKzUwNiwxMDQgQEAKICAgICAgICAgOCwgICAgNywgICAgMywgICAgMywgICAgMywgICAgMSwgICAgMywgICAgMQogICAgIH0gOwogCi1zdGF0aWMgeXljb25zdCBmbGV4X2ludDE2X3QgeXlfYmFzZVs4OF0gPQorc3RhdGljIHl5Y29uc3QgZmxleF9pbnQxNl90IHl5X2Jhc2VbODVdID0KICAgICB7ICAgMCwKLSAgICAgICAgMCwgIDE0NywgICAyMSwgIDE0MCwgIDE0NSwgIDI4NCwgICAzOSwgIDI4NCwgICAyNi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IDcwLCAgMjY2LCAgIDkwLAorICAgICAgMTAzLCAgMjY2LCAgIDg0LCAgMTI5LCAgMTA4LCAgMTEzLCAgMTQzLCAgMjY2LCAgMTA3LCAgIDY2LAorICAgICAgMTE4LCAgMTM3LCAgMTY4LCAgMTIwLCAgIDgwLCAgIDkxLCAgMTQ1LCAgMTQzLCAgIDgzLCAgIDQxLAorICAgICAgMjY2LCAgMjY2LCAgMTkwLCAgMTk2LCAgMjA0LCAgMjEyLCAgMjIwLCAgMjI4LCAgMjMyLCAgMjM3LAorICAgICAgMjM4LCAgMjQzLCAgMjQ5LCAgMjU3CiAgICAgfSA7CiAKLXN0YXRpYyB5eWNvbnN0IGZsZXhfaW50MTZfdCB5eV9kZWZbODhdID0KK3N0YXRpYyB5eWNvbnN0IGZsZXhfaW50MTZfdCB5eV9kZWZbODVdID0KICAgICB7ICAgMCwKLSAgICAgICA3NSwgICAgMSwgICAgMSwgICAgMywgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NiwgICA3NywKLSAgICAgICA3OCwgICA3NSwgICA3NywgICA3OSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICAxOSwKLSAgICAgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NiwgICA3NSwgICA4MCwgICA3NywgICA3OCwgICA3NSwKLSAgICAgICA4MSwgICA3NSwgICA3NiwgICA3OCwgICA3OSwgICA3OSwgICA3NSwgICA3NSwgICA3NSwgICAzOSwKLSAgICAgICAxOSwgICA4MiwgICA4MywgICA3NSwgICA3NSwgICA4NCwgICAyMCwgICA3NiwgICA3OCwgICA3NSwKLSAgICAgICA3OSwgICA1MSwgICA4NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA4NCwgICA3OSwgICA1MSwKLSAgICAgICA3OSwgICA3OSwgICA3OSwgICA1MSwgICA3NSwgICA3NSwgICA3NSwgICA4NiwgICA3OSwgICA2MywKLSAgICAgICA4NiwgICA4NywgICA4NywgICA3NSwgICAgMCwgICA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NTYsICAgNTYsICAgNTYsICAgNjksICAgNjQsICAgNjQsICAgNjQsICAgNjksICAgNjcsICAgNjcsCi0gICAgICAgNzUsICAgNzUsICAgNzUsICAgNjcsICAgMzcsICAgMzUsICAgNzUsICAgNzUsICAgNzUsICAgNjEsCi0gICAgICAgNjIsICAgNzUsICAgNzUsICAgNjEsICAgNzUsICAgNzAsICAgNzAsICAgNzAsICAgNzUsICAgNzUsCi0gICAgICAgNzUsICAgNzAsICAgNzAsICAgNzAsICAgNjYsICAgNjYsICAgNjYsICAgNzUsICAgNzUsICAgNzUsCisgICAgICAgNDksICAgNDMsICAgNDQsICAgNTEsICAgNTEsICAgNTEsICAgMzYsICAgMzcsICAgNTksICAgNDQsCisgICAgICAgMzYsICAgNjUsICAgNDQsICAgNTQsICAgNTUsICAgNTUsICAgNTEsICAgNTEsICAgNTEsICAgNTksCisgICAgICAgNDQsICAgNjQsICAgNjQsICAgNjQsICAgNTgsICAgNTgsICAgNTcsICAgNTcsICAgNTcsICAgNTgsCisgICAgICAgNTksICAgNDQsICAgNDIsICAgNjQsICAgNjQsICAgNjQsICAgNTIsICAgNzIsICAgNTksICAgNDQsCisgICAgICAgNDcsICAgNjYsICAgNjAsICAgNjAsICAgNDIsICAgNDQsICAgNTksICAgNjksICAgMjYsICAgNzIsCisgICAgICAgMjAsICAgNjEsICAgNjIsICAgNjMsICAgNzIsICAgNjEsICAgNTcsICAgNTcsICAgNTcsICAgNjYsCisgICAgICAgNzIsICAgNzIsICAgNzIsICAgNjYsICAgNDksICAgNDksICAgNzIsICAgNjEsICAgNjIsICAgNDksCisgICAgICAgNDQsICAgNjEsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsICAgNzIsCisgICAgICAgNzIsICAgNjcsICAgNjcsICAgNjcsICAgNzIsICAgNzIsICAgNzIsICAgNjcsICAgNjcsICAgNjcsCisgICAgICAgMjIsICAgMjIsICAgMjIsICAgMjIsICAgMjIsICAgMjIsICAgMjIsICAgMjIsICAgMjUsICAgNzIsCiAKLSAgICAgICA3NSwgICA3NSwgICA1NCwgICA1NCwgICA3NSwgICA3NSwgICA3NSwgICA1NCwgICAyNSwgICAyNSwKLSAgICAgICAyNSwgICAyNSwgICAyNSwgICAyNSwgICAyNSwgICAyNSwgICAyOCwgICA3NSwgICA3NSwgICAyOCwKLSAgICAgICAyOCwgICAyOCwgICAyOSwgICAyOSwgICAyOSwgICAyOSwgICAyOSwgICAyOSwgICAyOSwgICAyOSwKLSAgICAgICAzNSwgICAzNSwgICAzNSwgICAzNSwgICAzNSwgICAzNSwgICAzNSwgICAzNSwgICA0OCwgICA3NSwKLSAgICAgICA0OCwgICA0OCwgICA0OCwgICA0OCwgICA0OCwgICA0OCwgICA0OSwgICA3NSwgICA0OSwgICA0OSwKLSAgICAgICA0OSwgICA0OSwgICA0OSwgICA0OSwgICA0MiwgICA0MiwgICA3NSwgICA0MiwgICA1NiwgICA3NSwKLSAgICAgICA1NiwgICA1OCwgICA1OCwgICA1OCwgICA2NiwgICA3NSwgICA2NiwgICA3MSwgICA3MSwgICA3MSwKLSAgICAgICA3MSwgICA3MSwgICA3MSwgICA3MSwgICA3MSwgICA3MywgICA3MywgICA3MywgICA3MywgICA3MywKLSAgICAgICA3MywgICA3MywgICA3MywgICAgNSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwKLSAgICAgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwgICA3NSwKKyAgICAgICA3MiwgICAyNSwgICAyNSwgICAyNSwgICAyNywgICAyNywgICAyNywgICAyNywgICAyNywgICAyNywKKyAgICAgICAyNywgICAyNywgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwgICA0MiwKKyAgICAgICA0NSwgICA3MiwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NSwgICA0NiwgICA3MiwKKyAgICAgICA0NiwgICA0NiwgICA0NiwgICA0NiwgICA0NiwgICA0NiwgICAzNCwgICAzNCwgICA3MiwgICAzNCwKKyAgICAgICA1MSwgICA3MiwgICA1MSwgICA1MywgICA1MywgICA1MywgICA1NywgICA3MiwgICA1NywgICA2OCwKKyAgICAgICA2OCwgICA2OCwgICA2OCwgICA2OCwgICA2OCwgICA2OCwgICA2OCwgICA3MCwgICA3MCwgICA3MCwKKyAgICAgICA3MCwgICA3MCwgICA3MCwgICA3MCwgICA3MCwgICAgMywgICA3MiwgICA3MiwgICA3MiwgICA3MiwKKyAgICAgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwKKyAgICAgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwgICA3MiwKKyAgICAgICA3MiwgICA3MiwgICA3MiwgICA3MgogCi0gICAgICAgNzUsICAgNzUsICAgNzUsICAgNzUsICAgNzUsICAgNzUsICAgNzUsICAgNzUsICAgNzUsICAgNzUsCi0gICAgICAgNzUsICAgNzUKICAgICB9IDsKIAotc3RhdGljIHl5Y29uc3QgZmxleF9pbnQxNl90IHl5X2Noa1szMTNdID0KK3N0YXRpYyB5eWNvbnN0IGZsZXhfaW50MTZfdCB5eV9jaGtbMjk1XSA9CiAgICAgeyAgIDAsCiAgICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCiAgICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsCi0gICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDMsICAgIDMsCi0gICAgICAgIDksICAgIDMsICAgIDMsICAgIDMsICAgIDMsICAgIDMsICAgIDMsICAgIDMsICAgIDMsICAgIDMsCi0gICAgICAgIDcsICAgMTEsICAgIDcsICAgMTYsICAgMTMsICAgMTQsICAgMTQsICAgNzMsICAgIDMsICAgMTMsCi0gICAgICAgNzIsICAgIDksICAgMTYsICAgMTcsICAgMTcsICAgMjEsICAgMjEsICAgMTEsICAgMTgsICAgMTgsCi0gICAgICAgMTgsICAgMTgsICAgMTksICAgMTksICAgMTksICAgMTksICAgMjAsICAgMjAsICAgMjAsICAgMjUsCi0gICAgICAgMTksICAgMjMsICAgMTksICAgMTksICAgMTksICAgMjksICAgMTksICAgMjAsICAgMjIsICAgMjIsCi0gICAgICAgMjQsICAgMjMsICAgMjQsICAgMzMsICAgMzQsICAgNDIsICAgNDMsICAgNDMsICAgNDUsICAgNDgsCi0gICAgICAgMjUsICAgMjksICAgNDUsICAgNDIsICAgNjAsICAgNDksICAgNTIsICAgNTIsICAgNTIsICAgNDQsCisgICAgICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDEsICAgIDUsICAgIDcsCisgICAgICAgIDUsICAgMTAsICAgMTEsICAgMTIsICAgMTIsICAgMTMsICAgMTMsICAgMTMsICAgMTMsICAgMTksCisgICAgICAgMTAsICAgMTYsICAgMTYsICAgNzAsICAgMTUsICAgMTUsICAgMTUsICAgMjIsICAgMTEsICAgMTksCisgICAgICAgIDcsICAgMTQsICAgMTQsICAgMTQsICAgMTQsICAgMTUsICAgMTcsICAgMTcsICAgMjEsICAgMTQsCisgICAgICAgMjEsICAgMTQsICAgMTQsICAgMTQsICAgMTgsICAgMTQsICAgMjAsICAgMjAsICAgMjIsICAgMTgsCisgICAgICAgMjcsICAgMzQsICAgMzUsICAgMzUsICAgMzcsICAgNDEsICAgNDAsICAgNDUsICAgMzcsICAgMzQsCisgICAgICAgNDgsICAgNDgsICAgNjUsICAgNDYsICAgNjUsICAgNjksICAgMjcsICAgMzEsICAgMzEsICAgMzEsCisgICAgICAgNjAsICAgNDEsICAgNjYsICAgNjYsICAgMzEsICAgMzEsICAgMzEsICAgNDAsICAgNDUsICAgNDYsCiAKLSAgICAgICAzNCwgICA1MywgICA1MywgICA0MSwgICAzMywgICAzNiwgICAzNiwgICA1MiwgICA2MSwgICA2MSwKLSAgICAgICA0OCwgICA0OSwgICA1NSwgICA1NSwgICA1NSwgICA2OSwgICA2OSwgICAzNiwgICAzNiwgICAzNiwKLSAgICAgICAzOSwgICAzOSwgICAzOSwgICA1OSwgICA1OSwgICAzNSwgICA1OSwgICAzOSwgICAzOSwgICAzOSwKLSAgICAgICA2MSwgICAzMiwgICAxNSwgICAzOSwgICA1MSwgICA1MSwgICA1OCwgICA1OCwgICAxMiwgICA2OCwKLSAgICAgICA1OCwgICA2OCwgICA2MiwgICA2MiwgICAgNSwgICAgNCwgICA1MSwgICA1MSwgICA2NSwgICA2NSwKLSAgICAgICA2NSwgICA3MSwgICAgMiwgICA3MSwgICAgMCwgICA1MSwgICA1MSwgICA1MSwgICA3MCwgICA1MSwKLSAgICAgICA1NiwgICA1NiwgICA1NiwgICA2MiwgICA2NCwgICA2NCwgICA2NCwgICA2MiwgICA1NiwgICA1NiwKLSAgICAgICAgMCwgICAgMCwgICAgMCwgICA1NiwgICA2MywgICA2NCwgICAgMCwgICAgMCwgICAgMCwgICA3MCwKLSAgICAgICA3MCwgICAgMCwgICAgMCwgICA3MCwgICAgMCwgICA2MywgICA2MywgICA2MywgICAgMCwgICAgMCwKLSAgICAgICAgMCwgICA2MywgICA2MywgICA2MywgICA2NiwgICA2NiwgICA2NiwgICAgMCwgICAgMCwgICAgMCwKKyAgICAgICAzMSwgICA0MywgICA0MywgICA1MCwgICA1MCwgICA1MCwgICA1MywgICA1MywgICA1OSwgICA1OSwKKyAgICAgICA1MywgICA1OSwgICA0MiwgICA0MywgICA0MywgICA0MywgICA1MSwgICA1MSwgICA1MSwgICA2MSwKKyAgICAgICA2MSwgICA1NSwgICA1NSwgICA1NSwgICA1MSwgICA1MSwgICA1NiwgICA1NiwgICA1NiwgICA1MSwKKyAgICAgICA1NCwgICA1NCwgICA1NSwgICA2NCwgICA2NCwgICA2NCwgICAzNiwgICAzMywgICA2MiwgICA2MiwKKyAgICAgICAzMCwgICA2MSwgICA1NCwgICA1NCwgICA2NCwgICA2OCwgICA2NywgICA2OCwgICAgOSwgICAgMywKKyAgICAgICAgMiwgICA1NCwgICA1NCwgICA1NCwgICAgMCwgICA1NCwgICA1NywgICA1NywgICA1NywgICA2MiwKKyAgICAgICAgMCwgICAgMCwgICAgMCwgICA2MiwgICA1NywgICA1NywgICAgMCwgICA2NywgICA2NywgICA1NywKKyAgICAgICA2MywgICA2NywgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwgICAgMCwKKyAgICAgICAgMCwgICA2MywgICA2MywgICA2MywgICAgMCwgICAgMCwgICAgMCwgICA2MywgICA2MywgICA2MywKKyAgICAgICA3MywgICA3MywgICA3MywgICA3MywgICA3MywgICA3MywgICA3MywgICA3MywgICA3NCwgICAgMCwKIAotICAgICAgICAwLCAgICAwLCAgIDY2LCAgIDY2LCAgICAwLCAgICAwLCAgICAwLCAgIDY2LCAgIDc2LCAgIDc2LAotICAgICAgIDc2LCAgIDc2LCAgIDc2LCAgIDc2LCAgIDc2LCAgIDc2LCAgIDc3LCAgICAwLCAgICAwLCAgIDc3LAotICAgICAgIDc3LCAgIDc3LCAgIDc4LCAgIDc4LCAgIDc4LCAgIDc4LCAgIDc4LCAgIDc4LCAgIDc4LCAgIDc4LAotICAgICAgIDc5LCAgIDc5LCAgIDc5LCAgIDc5LCAgIDc5LCAgIDc5LCAgIDc5LCAgIDc5LCAgIDgwLCAgICAwLAotICAgICAgIDgwLCAgIDgwLCAgIDgwLCAgIDgwLCAgIDgwLCAgIDgwLCAgIDgxLCAgICAwLCAgIDgxLCAgIDgxLAotICAgICAgIDgxLCAgIDgxLCAgIDgxLCAgIDgxLCAgIDgyLCAgIDgyLCAgICAwLCAgIDgyLCAgIDgzLCAgICAwLAotICAgICAgIDgzLCAgIDg0LCAgIDg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wogCiAvKiBZWVJIUyAtLSBBIGAtMSctc2VwYXJhdGVkIGxpc3Qgb2YgdGhlIHJ1bGVzJyBSSFMuICAqLwpAQCAtNTEyLDE2ICs0ODEsMTYgQEAKIHsKICAgICAgIDU0LCAgICAgMCwgICAgLTEsICAgIDU1LCAgICAtMSwgICAgNTQsICAgIDU1LCAgICAtMSwgICAgLTEsICAgIDU2LAogICAgICAgNTcsICAgIC0xLCAgICAtMSwgICAgMTIsICAgIDIzLCAgICA1OCwgICAgNjAsICAgIC0xLCAgICAtMSwgICAgMjMsCi0gICAgICA1OSwgICAgNjAsICAgIC0xLCAgICA2MCwgICAgLTEsICAgIDg0LCAgICAtMSwgICAgOTYsICAgIC0xLCAgICA5OCwKKyAgICAgIDU5LCAgICA2MCwgICAgLTEsICAgIDYwLCAgICAtMSwgICAgODQsICAgIC0xLCAgICA5OSwgICAgLTEsICAgMTAxLAogICAgICAgLTEsICAgICAxLCAgICA0NCwgICAgLTEsICAgICAxLCAgICA0NSwgICAgLTEsICAgIDY0LCAgICA2MSwgICAgNDQsCiAgICAgICAtMSwgICAgLTEsICAgIDYyLCAgICAtMSwgICAgNjMsICAgIC0xLCAgICA2MiwgICAgNDYsICAgIDYzLCAgICAtMSwKLSAgICAgIDc0LCAgICA5NywgICAgOTUsICAgIDg1LCAgICAtMSwgICAgLTEsICAgIDY1LCAgICAtMSwgICAgNjYsICAgIC0xLAorICAgICAgNzQsICAgMTAwLCAgICA5NSwgICAgODUsICAgIC0xLCAgICAtMSwgICAgNjUsICAgIC0xLCAgICA2NiwgICAgLTEsCiAgICAgICA2NSwgICAgNjYsICAgIC0xLCAgICA2NywgICAgLTEsICAgIDY4LCAgICAtMSwgICAgIDUsICAgIC0xLCAgICAxNywKICAgICAgIC0xLCAgICAyMSwgICAgLTEsICAgIDExLCAgICAtMSwgICAgMTQsICAgIC0xLCAgICA2OSwgICAgLTEsICAgIDczLAogICAgICAgLTEsICAgIDI4LCAgICA0NywgICAgNjUsICAgIDQ4LCAgICA0OSwgICAgLTEsICAgIDI4LCAgICA0NywgICAgNjUsCiAgICAgICA0OSwgICAgLTEsICAgIDIyLCAgICAzNywgICAgLTEsICAgIDI0LCAgICAzNywgICAgLTEsICAgIDEwLCAgICAzNywKICAgICAgIC0xLCAgICAyMiwgICAgMzcsICAgIDg3LCAgICAtMSwgICAgMjQsICAgIDM3LCAgICA4NywgICAgLTEsICAgIDEwLAotICAgICAgMzcsICAgIDMyLCAgICAtMSwgICAgMTAsICAgIDMyLCAgICAtMSwgICAgMjIsICAgIDg3LCAgICAtMSwgICAgMjQsCisgICAgICAzNywgICAgOTYsICAgIC0xLCAgICAxMCwgICAgOTYsICAgIC0xLCAgICAyMiwgICAgODcsICAgIC0xLCAgICAyNCwKICAgICAgIDg3LCAgICAtMSwgICAgIDcsICAgIC0xLCAgICAxOSwgICAgLTEsICAgIDE1LCAgICAtMSwgICAgMTYsICAgIC0xLAogICAgICAgMjAsICAgIC0xLCAgICAyNSwgICAgLTEsICAgIDEzLCAgICAtMSwgICAgIDksICAgIC0xLCAgICAyNiwgICAgLTEsCiAgICAgICAgNiwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgNDgsICAgIDcxLCAgICAtMSwgICAgLTEsICAgIDcyLCAgICAtMSwKQEAgLTU0MywyNiArNTEyLDI5IEBACiAgICAgICA5MSwgICAgNDQsICAgIC0xLCAgICAgMSwgICAgNDQsICAgIC0xLCAgICAtMSwgICAgOTIsICAgIC0xLCAgICA5MywKICAgICAgIC0xLCAgICA5MiwgICAgNDYsICAgIDkzLCAgICAtMSwgICAgNzYsICAgIDk1LCAgICAtMSwgICAgMzcsICAgIDk0LAogICAgICAgLTEsICAgIDk0LCAgICAtMSwgICAgNTIsICAgIDM0LCAgICAtMSwgICAgLTEsICAgIDk1LCAgICAzMSwgICAgLTEsCi0gICAgICAzMCwgICAgNDQsICAgIC0xLCAgICAtMSwgICAgMzAsICAgIC0xLCAgICAyOSwgICAgNDcsICAgIDM3LCAgICA0OSwKLSAgICAgIDQ0LCAgICAtMQorICAgICAgNTEsICAgIDk3LCAgICA0NSwgICAgLTEsICAgIDUxLCAgICA5NywgICAgNDYsICAgIDQ1LCAgICAtMSwgICAgOTgsCisgICAgICAtMSwgICAgOTcsICAgIDQ2LCAgICA5OCwgICAgLTEsICAgIDM3LCAgICAtMSwgICAgMzcsICAgIDUwLCAgICAzNCwKKyAgICAgIC0xLCAgICAzMCwgICAgNDQsICAgIC0xLCAgICAtMSwgICAgMzAsICAgIC0xLCAgICAyOSwgICAgNDcsICAgIDM3LAorICAgICAgNDksICAgIDQ0LCAgICAtMQogfTsKIAogLyogWVlSTElORVtZWU5dIC0tIHNvdXJjZSBsaW5lIHdoZXJlIHJ1bGUgbnVtYmVyIFlZTiB3YXMgZGVmaW5lZC4gICovCiBzdGF0aWMgY29uc3QgeXl0eXBlX3VpbnQxNiB5eXJsaW5lW10gPQogewotICAgICAgIDAsICAgMTAzLCAgIDEwMywgICAxMDQsICAgMTA4LCAgIDEwOCwgICAxMTQsICAgMTE0LCAgIDExNiwgICAxMTYsCi0gICAgIDExOCwgICAxMTksICAgMTIwLCAgIDEyMSwgICAxMjIsICAgMTIzLCAgIDEyNywgICAxNDEsICAgMTQyLCAgIDE0NiwKLSAgICAgMTU0LCAgIDE2NywgICAxNzMsICAgMTc0LCAgIDE3OCwgICAxNzksICAgMTgzLCAgIDE4OSwgICAxOTMsICAgMTk0LAotICAgICAxOTUsICAgMTk2LCAgIDE5NywgICAyMDEsICAgMjAyLCAgIDIwMywgICAyMDQsICAgMjA4LCAgIDIxMCwgICAyMTIsCi0gICAgIDIxNiwgICAyMjMsICAgMjMwLCAgIDIzOSwgICAyNDAsICAgMjQxLCAgIDI0NSwgICAyNDYsICAgMjQ3LCAgIDI0OCwKLSAgICAgMjQ5LCAgIDI1MCwgICAyNTEsICAgMjUyLCAgIDI1MywgICAyNTQsICAgMjU1LCAgIDI1OSwgICAyNjQsICAgMjY1LAotICAgICAyNjksICAgMjcwLCAgIDI3NCwgICAyNzQsICAgMjc0LCAgIDI3NSwgICAyODMsICAgMjg0LCAgIDI4OCwgICAyOTcsCi0gICAgIDI5OSwgICAzMDEsICAgMzAzLCAgIDMwNSwgICAzMTIsICAgMzEzLCAgIDMxNywgICAzMTgsICAgMzE5LCAgIDMyMSwKLSAgICAgMzIzLCAgIDMyNSwgICAzMjcsICAgMzMyLCAgIDMzMywgICAzMzQsICAgMzM4LCAgIDMzOSwgICAzNDMsICAgMzQ0LAotICAgICAzNDksICAgMzU0LCAgIDM1NiwgICAzNjAsICAgMzYxLCAgIDM2OSwgICAzNzMsICAgMzc1LCAgIDM3NywgICAzNzksCi0gICAgIDM4MSwgICAzODYsICAgMzk1LCAgIDM5NiwgICA0MDEsICAgNDA2LCAgIDQwNywgICA0MTEsICAgNDEyLCAgIDQxNiwKLSAgICAgNDE3LCAgIDQyMSwgICA0MjMsICAgNDI4LCAgIDQyOSwgICA0MzMsICAgNDM0LCAgIDQzOCwgICA0MzksICAgNDQwLAotICAgICA0NDQsICAgNDQ4LCAgIDQ0OSwgICA0NTMsICAgNDU3LCAgIDQ1OCwgICA0NjIKKyAgICAgICAwLCAgIDEwNCwgICAxMDQsICAgMTA1LCAgIDEwOSwgICAxMDksICAgMTE1LCAgIDExNSwgICAxMTcsICAgMTE3LAorICAgICAxMTksICAgMTIwLCAgIDEyMSwgICAxMjIsICAgMTIzLCAgIDEyNCwgICAxMjgsICAgMTQyLCAgIDE0MywgICAxNDcsCisgICAgIDE1NSwgICAxNjgsICAgMTc0LCAgIDE3NSwgICAxNzksICAgMTgwLCAgIDE4NCwgICAxOTAsICAgMTk0LCAgIDE5NSwKKyAgICAgMTk2LCAgIDE5NywgICAxOTgsICAgMjAyLCAgIDIwMywgICAyMDQsICAgMjA1LCAgIDIwOSwgICAyMTEsICAgMjEzLAorICAgICAyMTcsICAgMjI0LCAgIDIzMSwgICAyNDEsICAgMjQ0LCAgIDI0NSwgICAyNDksICAgMjUwLCAgIDI1MSwgICAyNTIsCisgICA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zbV9waHJhc2Vfb3B0IiwgImV4cG9ydF9kZWZpbml0aW9uIiwgMAogfTsKICNlbmRpZgogCkBAIC02MjksNyArNjAyLDggQEAKICAgICAgIDgxLCAgICA4MiwgICAgODIsICAgIDgzLCAgICA4MywgICAgODMsICAgIDgzLCAgICA4MywgICAgODMsICAgIDgzLAogICAgICAgODMsICAgIDg0LCAgICA4NSwgICAgODUsICAgIDg2LCAgICA4NywgICAgODcsICAgIDg4LCAgICA4OCwgICAgODksCiAgICAgICA4OSwgICAgOTAsICAgIDkwLCAgICA5MSwgICAgOTEsICAgIDkyLCAgICA5MiwgICAgOTMsICAgIDkzLCAgICA5MywKLSAgICAgIDk0LCAgICA5NSwgICAgOTUsICAgIDk2LCAgICA5NywgICAgOTcsICAgIDk4CisgICAgICA5NCwgICAgOTUsICAgIDk1LCAgICA5NiwgICAgOTYsICAgIDk3LCAgICA5NywgICAgOTgsICAgIDk4LCAgICA5OSwKKyAgICAgMTAwLCAgIDEwMCwgICAxMDEKIH07CiAKIC8qIFlZUjJbWVlOXSAtLSBOdW1iZXIgb2Ygc3ltYm9scyBjb21wb3NpbmcgcmlnaHQgaGFuZCBzaWRlIG9mIHJ1bGUgWVlOLiAgKi8KQEAgLTY0Nyw3ICs2MjEsOCBAQAogICAgICAgIDIsICAgICAyLCAgICAgMSwgICAgIDAsICAgICAxLCAgICAgMSwgICAgIDQsICAgICA0LCAgICAgMiwgICAgIDMsCiAgICAgICAgMywgICAgIDMsICAgICAwLCAgICAgMSwgICAgIDIsICAgICAzLCAgICAgMywgICAgIDAsICAgICAxLCAgICAgMSwKICAgICAgICAyLCAgICAgMywgICAgIDIsICAgICAwLCAgICAgMSwgICAgIDEsICAgICAzLCAgICAgMiwgICAgIDIsICAgICAxLAotICAgICAgIDIsICAgICAwLCAgICAgMiwgICAgIDIsICAgICAwLCAgICAgMSwgICAgIDUKKyAgICAgICAyLCAgICAgMCwgICAgIDIsICAgICAzLCAgICAgNCwgICAgIDEsICAgICAzLCAgICAgMSwgICAgIDMsICAgICAyLAorICAgICAgIDAsICAgICAxLCAgICAgNQogfTsKIAogLyogWVlERUZBQ1RbU1RBVEUtTkFNRV0gLS0gRGVmYXVsdCBydWxlIHRvIHJlZHVjZSB3aXRoIGluIHN0YXRlCkBAIC02NTksMTcgKzYzNCwxOCBAQAogICAgICAgNjIsICAgIDUzLCAgICAgMCwgICAgMzEsICAgICAwLCAgICA1MiwgICAgMzIsICAgIDQ4LCAgICA0OSwgICAgMjksCiAgICAgICA2NSwgICAgNDcsICAgIDUwLCAgICAzMCwgICAgIDAsICAgICA4LCAgICAgMCwgICAgNTEsICAgIDU0LCAgICA2MywKICAgICAgICAwLCAgICAgMCwgICAgIDAsICAgIDY0LCAgICA1NiwgICAgIDUsICAgIDEwLCAgICAxNywgICAgMjMsICAgIDI0LAotICAgICAgMjYsICAgIDI3LCAgICAzMywgICAgMzQsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgNDMsCi0gICAgICAzOSwgICAgIDYsICAgIDM3LCAgICAgMCwgICAgNDQsICAgIDIyLCAgICAzOCwgICAgNDUsICAgICAwLCAgICAgMCwKLSAgICAgMTIzLCAgICA2OCwgICAgIDAsICAgIDU4LCAgICAgMCwgICAgMTgsICAgIDE5LCAgICAgMCwgICAxMjQsICAgIDY3LAotICAgICAgMjUsICAgIDQyLCAgICAyMiwgICAgNDAsICAgICAwLCAgIDExMywgICAgIDAsICAgICAwLCAgIDEwOSwgICAgIDksCi0gICAgICAxNywgICAgNDEsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICA1NywgICAgNTksICAgIDYwLCAgICAxNiwKLSAgICAgICAwLCAgICA2NiwgICAxMjUsICAgMTAxLCAgIDEyMSwgICAgNzEsICAgICAwLCAgICAgNywgICAxMTIsICAgMTA2LAotICAgICAgNzYsICAgIDc3LCAgICAgMCwgICAgIDAsICAgICAwLCAgIDEyMSwgICAgNzUsICAgICAwLCAgIDExNCwgICAxMTUsCi0gICAgIDExOSwgICAxMDUsICAgICAwLCAgIDExMCwgICAxMjQsICAgICAwLCAgICAzNiwgICAgIDAsICAgIDczLCAgICA3MiwKLSAgICAgIDYxLCAgICAyMCwgICAxMDIsICAgICAwLCAgICA5MywgICAgIDAsICAgIDg0LCAgICA4NywgICAgODgsICAgMTE4LAorICAgICAgMjYsICAgIDI3LCAgICAzMywgICAgMzQsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMzksCisgICAgICAgMCwgICAgNDMsICAgICA2LCAgICAzNywgICAgIDAsICAgIDQ0LCAgICAyMiwgICAgMzgsICAgIDQ1LCAgICAgMCwKKyAgICAgICAwLCAgIDEyOSwgICAgNjgsICAgICAwLCAgICA1OCwgICAgIDAsICAgIDE4LCAgICAxOSwgICAgIDAsICAgMTMwLAorICAgICAgNjcsICAgIDI1LCAgICA0MiwgICAxMjcsICAgICAwLCAgIDEyNSwgICAgMjIsICAgIDQwLCAgICAgMCwgICAxMTMsCisgICAgICAgMCwgICAgIDAsICAgMTA5LCAgICAgOSwgICAgMTcsICAgIDQxLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwKKyAgICAgIDU3LCAgICA1OSwgICAgNjAsICAgIDE2LCAgICAgMCwgICAgNjYsICAgMTMxLCAgIDEwMSwgICAxMjEsICAgIDcxLAorICAgICAgIDAsICAgICAwLCAgIDEyMywgICAgIDAsICAgICA3LCAgIDExMiwgICAxMDYsICAgIDc2LCAgICA3NywgICAgIDAsCisgICAgICAgMCwgICAgIDAsICAgMTIxLCAgICA3NSwgICAgIDAsICAgMTE0LCAgIDExNSwgICAxMTksICAgMTA1LCAgICAgMCwKKyAgICAgMTEwLCAgIDEzMCwgICAgIDAsICAgIDM2LCAgICAgMCwgICAgNzMsICAgIDcyLCAgICA2MSwgICAgMjAsICAgMTAyLAorICAgICAgIDAsICAgIDkzLCAgICAgMCwgICAgODQsICAgIDg3LCAgICA4OCwgICAxMjgsICAgMTI0LCAgIDEyNiwgICAxMTgsCiAgICAgICAgMCwgICAgNzYsICAgICAwLCAgIDEyMCwgICAgNzQsICAgMTE3LCAgICA4MCwgICAgIDAsICAgMTExLCAgICAgMCwKLSAgICAgIDM1LCAgIDEyNiwgICAxMjIsICAgICAwLCAgICAyMSwgICAxMDMsICAgIDcwLCAgICA5NCwgICAgNTYsICAgICAwLAorICAgICAgMzUsICAgMTMyLCAgIDEyMiwgICAgIDAsICAgIDIxLCAgIDEwMywgICAgNzAsICAgIDk0LCAgICA1NiwgICAgIDAsCiAgICAgICA5MywgICAgOTAsICAgIDkyLCAgICA2OSwgICAgODMsICAgICAwLCAgICA4MiwgICAgODEsICAgICAwLCAgICAgMCwKICAgICAgMTE2LCAgIDEwNCwgICAgIDAsICAgIDk1LCAgICAgMCwgICAgOTEsICAgIDk4LCAgICAgMCwgICAgODUsICAgIDg5LAogICAgICAgNzksICAgIDc4LCAgIDEwMCwgICAgOTksICAgICAwLCAgICAgMCwgICAgOTcsICAgIDk2CkBAIC02NzgsNDYgKzY1NCw0NyBAQAogLyogWVlERUZHT1RPW05URVJNLU5VTV0uICAqLwogc3RhdGljIGNvbnN0IHl5dHlwZV9pbnQxNiB5eWRlZmdvdG9bXSA9CiB7Ci0gICAgICAtMSwgICAgIDEsICAgICAyLCAgICAgMywgICAgMzUsICAgIDcyLCAgICA1NSwgICAgMzYsICAgIDY0LCAgICA2NSwKLSAgICAgIDY2LCAgICA3NSwgICAgMzgsICAgIDM5LCAgICA0MCwgICAgNDEsICAgIDQyLCAgICA2NywgICAgODYsICAgIDg3LAotICAgICAgNDMsICAgMTE0LCAgICA2OSwgICAxMDUsICAgMTA2LCAgIDEyNSwgICAxMjYsICAgMTI3LCAgIDEyOCwgICAxNTEsCi0gICAgIDE1MiwgICAgNDQsICAgMTQ0LCAgIDE0NSwgICAgNTQsICAgIDc2LCAgICA3NywgICAgNzgsICAgMTA3LCAgIDEwOCwKLSAgICAgMTA5LCAgIDExMCwgICAxMjIsICAgIDQ1LCAgICA5NC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WVRBQkxFX05JTkYgLTEwOQogc3RhdGljIGNvbnN0IHl5dHlwZV9pbnQxNiB5eXRhYmxlW10gPQogewotICAgICAgODIsICAgIDcwLCAgIDEwNCwgICAgMzcsICAgMTU5LCAgICA2OCwgICAgNTcsICAgMTMwLCAgIDE0MiwgICAgODgsCi0gICAgIDE2MiwgICAgNTIsICAgIDU2LCAgICA4NCwgICAgNDksICAgIDkyLCAgICAgNCwgICAgOTMsICAgIDEwLCAgICA1MCwKLSAgICAgIDUxLCAgIDEzMiwgICAgNzksICAgMTM0LCAgICA3MSwgICAgNTMsICAgIDUzLCAgIDE0MywgICAgMjAsICAgMTA0LAotICAgICAgODUsICAgMTA0LCAgICA3MywgICAxMjAsICAgMTc1LCAgICA5MSwgICAgODEsICAgIDI5LCAgIDEyNCwgICAgOTcsCi0gICAgICA1OCwgICAgMzMsICAgLTkzLCAgIDEzMSwgICAgODMsICAgIDcwLCAgIDE0NywgICAxMDEsICAgIDk1LCAgICA2MSwKLSAgICAgMTYzLCAgIDE1MCwgICAgNTksICAgMTAyLCAgICA2MywgICAgODAsICAgMTQ5LCAgICA2MywgICAtOTMsICAgIDYyLAotICAgICAgNjMsICAgMTM2LCAgICA5NiwgICAxMDAsICAgIDQ3LCAgICA0OCwgICAxMDQsICAgMTAxLCAgIDE2NiwgICAgOTgsCi0gICAgICA5OSwgICAgNjAsICAgIDgwLCAgIDEwMiwgICAgNjMsICAgMTM3LCAgIDE1MCwgICAxNTAsICAgMTAzLCAgIDEyNCwKLSAgICAgMTMxLCAgICA1MywgICAxNjcsICAgIDYxLCAgIDEwMSwgICAxNDcsICAgIDg5LCAgICA3MCwgICAxMTcsICAgMTYzLAotICAgICAxMDIsICAgIDYzLCAgIDExMSwgICAgNjIsICAgIDYzLCAgIDE0OSwgICAgNjMsICAgMTI0LCAgICA3NCwgICAxNjQsCi0gICAgIDE2NSwgICAgOTAsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgIDEyNCwKLSAgICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LAotICAgICAxMTgsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAxMTksICAgMTAzLCAgICAzMywgICAxMzMsCi0gICAgIDEzOCwgICAxMzksICAgIDk4LCAgICA5MiwgICAtMjIsICAgMTQxLCAgIDE0MCwgICAxNTQsICAgIDM0LCAgIDE0NiwKLSAgICAgMTQyLCAgIC0yMiwgIC0xMDcsICAgMTUzLCAgIC0yMiwgICAtMjIsICAgMTEyLCAgIDE1NiwgICAxNTUsICAgLTIyLAotICAgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgMTU3LCAgICAxNSwgICAgMTYsCi0gICAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgMTYxLCAgICAyNiwKLSAgICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgIDE3MCwgICAxNzEsICAgIDMzLCAgIDE3MiwgICAxNzMsICAgMTc2LAotICAgICAxNzcsICAgICA1LCAgIC0yMiwgICAxMjEsICAgMTY5LCAgIDEzNSwgICAgMzQsICAgMTEzLCAgIDE2MCwgICAtMjIsCi0gICAgLTEwOCwgICAgIDAsICAgLTIyLCAgIC0yMiwgICAxMjMsICAgICAwLCAgIDEyOSwgICAtMjIsICAgICA3LCAgICAgOCwKLSAgICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgIDAsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LAotICAgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LCAgICAyNywgICAgMjgsCi0gICAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIC04NiwKLSAgICAgICAwLCAgIDE1OCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLAotICAgICAgMTIsICAgIDEzLCAgIC04NiwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsCi0gICAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwKLSAgICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgMCwgICAxNzQsICAgICAwLAotICAgICAgIDAsICAgIDM0LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAtODYsCi0gICAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwKLSAgICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLAotICAgICAgIDAsICAgICAwLCAgICAgMCwgICAtODYsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDAsCi0gICAgICAgMCwgICAgIDAsICAgICAwLCAgICAgNiwgICAgIDAsICAgICAwLCAgIC04NiwgICAgIDcsICAgICA4LCAgICAgOSwKLSAgICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LAotICAgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksCi0gICAgICAzMCwgICAgMzEsICAgIDMyLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIC0yMiwKLSAgICAgICAwLCAgICAgMCwgICAgIDAsICAgIDM0LCAgICAgMCwgICAgIDAsICAgLTIyLCAgICAgMCwgICAgIDAsICAgLTIyLAotICAgICAtMjIsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsCisgICAgICA4NiwgICAgNzEsICAgMTExLCAgICAzNywgICAxNzIsICAgIDEwLCAgICA4MywgICAgNjksICAgIDU4LCAgICA0OSwKKyAgICAgIDkyLCAgIDE1MiwgICAgODgsICAgMTY5LCAgICA3MywgICAgMjAsICAgIDk2LCAgIDE0MCwgICAgOTcsICAgMTQyLAorICAgICAgIDQsICAgMTQ0LCAgIDEzNywgICAgNTAsICAgIDI5LCAgICA1MiwgICAxMDQsICAgIDYxLCAgICAzMywgICAgNTAsCisgICAgIDE1MywgICAgNTMsICAgMTExLCAgICA4OSwgICAxMTEsICAgIDc3LCAgIC05MywgICAxMjcsICAgIDk1LCAgICA4NSwKKyAgICAgMTU3LCAgIDEzMSwgICAgNTksICAgMTg1LCAgIDE3MywgICAgNTQsICAgIDU3LCAgICA5OSwgICAgNjIsICAgIDcxLAorICAgICAxNTksICAgIDY0LCAgIC05MywgICAxNDEsICAgMTYwLCAgICA2MiwgICAgODQsICAgMTA4LCAgICA2MywgICAgNjQsCisgICAgICA1NCwgICAxMDAsICAgIDYwLCAgIDEwOSwgICAgNjQsICAgIDYzLCAgICA2NCwgICAxNDYsICAgIDczLCAgIDEwNywKKyAgICAgIDU0LCAgIDE3NiwgICAxMTEsICAgMTA4LCAgICA0NywgICAgNDgsICAgIDg0LCAgIDEwNSwgICAxMDYsICAgMTA5LAorICAgICAgNjQsICAgMTQ3LCAgIDE2MCwgICAxNjAsICAgMTEwLCAgIDE3NywgICAxNDEsICAgIDg3LCAgIDEzMSwgICAxNTcsCisgICAgIDEwOCwgICAxMDIsICAgMTAzLCAgIDE3MywgICAgNzEsICAgIDkzLCAgIDEwOSwgICAgNjQsICAgMTAxLCAgIDE1OSwKKyAgICAgIDY0LCAgIDE3NCwgICAxNzUsICAgIDk0LCAgIDExOCwgICAxMjQsICAgMTMxLCAgICA3OCwgICAxMzYsICAgMTI1LAorICAgICAxMjYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgIDEzMSwgICAgMTUsCisgICAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgIDExMCwKKyAgICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAxNDMsICAgMTQ4LCAgICAzMywgICAxMDUsICAgMTQ5LAorICAgICAgOTYsICAgMTUxLCAgIDE1MiwgICAtMjIsICAgMTUwLCAgIDE1NiwgICAxNjUsICAgIDM0LCAgIDE2MywgICAxNjQsCisgICAgIC0yMiwgIC0xMDcsICAgMTY2LCAgIC0yMiwgICAtMjIsICAgMTE5LCAgIDE2NywgICAxNzEsICAgLTIyLCAgICAgNywKKyAgICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgMTgwLCAgICAxNSwgICAgMTYsICAgIDE3LAorICAgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgMTgxLCAgICAyNiwgICAgMjcsCisgICAgICAyOCwgICAgMjksICAgIDMwLCAgIDE4MiwgICAxODMsICAgIDMzLCAgIDE4NiwgICAxODcsICAgICA1LCAgIDE3OSwKKyAgICAgMTIwLCAgIC0yMiwgICAxMjgsICAgMTcwLCAgIDEzOSwgICAgMzQsICAgMTQ1LCAgICA3MiwgICAtMjIsICAtMTA4LAorICAgICAgIDAsICAgLTIyLCAgIC0yMiwgICAxMzAsICAgICAwLCAgIDEzOCwgICAtMjIsICAgICA3LCAgICAgOCwgICAgIDksCisgICAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAgIDAsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwKKyAgICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LAorICAgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIC04NiwgICAgIDAsCisgICAgIDE2OCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwKKyAgICAgIDEzLCAgIC04NiwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLAorICAgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwgICAgIDAsCisgICAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgLTg2LCAgICAgMCwgICAxODQsICAgICAwLCAgICAgMCwKKyAgICAgIDM0LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDEyLCAgICAxMywgICAtODYsICAgIDE1LAogICAgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsCiAgICAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwKLSAgICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDAsICAgICAwLAotICAgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgMTE1LCAgIDExNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsCi0gICAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwKLSAgICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLAotICAgICAgIDAsICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIDE0NywgICAgIDAsCi0gICAgICAgMCwgICAgIDAsICAgMTQ4LCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgMTQ5LCAgICA2MywKKyAgICAgICAwLCAgICAgMCwgICAtODYsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAzNCwgICAgIDAsICAgICAwLAorICAgICAgIDAsICAgICAwLCAgICAgNiwgICAgIDAsICAgICAwLCAgIC04NiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsCisgICAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwKKyAgICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMjksICAgIDMwLAorICAgICAgMzEsICAgIDMyLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgIC0yMiwgICAgIDAsCisgICAgICAgMCwgICAgIDAsICAgIDM0LCAgICAgMCwgICAgIDAsICAgLTIyLCAgICAgMCwgICAgIDAsICAgLTIyLCAgIC0yMiwKICAgICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAgMCwgICAgMTUsICAgIDE2LAogICAgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAgMCwgICAgMjYsCiAgICAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwgICAgIDAsICAgICAwLCAgICAzMywgICAgIDAsICAgICAwLCAgICAgMCwKLSAgICAgICAwLCAgIDE2OCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgIDM0LCAgICAgNywgICAgIDgsICAgICA5LAotICAgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksCi0gICAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwKLSAgICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLAotICAgICAgIDAsICAgICAwLCAgICAgMCwgICAgMzQKKyAgICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgIDM0LCAgICAgMCwgICAgIDAsICAgICAwLAorICAgICAgIDAsICAgICAwLCAgICAgMCwgICAxMjIsICAgMTIzLCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsCisgICAgICAxMiwgICAgMTMsICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwKKyAgICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAyOSwgICAgMzAsICAgICAwLAorICAgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgMTU3LCAgICAgMCwgICAgIDAsCisgICAgICAgMCwgICAxNTgsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAxNTksICAgIDY0LCAgICAgNywKKyAgICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgICAwLCAgICAxNSwgICAgMTYsICAgIDE3LAorICAgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgICAwLCAgICAyNiwgICAgMjcsCisgICAgICAyOCwgICAgMjksICAgIDMwLCAgICAgMCwgICAgIDAsICAgIDMzLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwKKyAgICAgMTc4LCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgMzQsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLAorICAgICAgMTEsICAgIDEyLCAgICAxMywgICAgIDAsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsCisgICAgICAyMSwgICAgMjIsICAgIDIzLCAgICAyNCwgICAgIDAsICAgIDI2LCAgICAyNywgICAgMjgsICAgIDI5LCAgICAzMCwKKyAgICAgICAwLCAgICAgMCwgICAgMzMsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLCAgICAgMCwgICAgIDAsICAgICAwLAorICAgICAgIDAsICAgICAwLCAgICAzNAogfTsKIAogc3RhdGljIGNvbnN0IHl5dHlwZV9pbnQxNiB5eWNoZWNrW10gPQogewotICAgICAgNTgsICAgIDM4LCAgICA3NSwgICAgIDMsICAgMTM3LCAgICAzNywgICAgMjYsICAgICAxLCAgICAzMSwgICAgNjMsCi0gICAgICAgMSwgICAgMzcsICAgIDM3LCAgICAgMSwgICAgMzIsICAgIDMwLCAgICAgMCwgICAgMzIsICAgICA4LCAgICAzNywKLSAgICAgIDIzLCAgIDEwMiwgICAgNTUsICAgMTA0LCAgICAzMiwgICAgNTEsICAgIDUxLCAgICA1MCwgICAgMTgsICAgMTAyLAotICAgICAgNjIsICAgMTA0LCAgICA1MiwgICAgODcsICAgMTY3LCAgICA2NywgICAgNTYsICAgIDI3LCAgICA5NiwgICAgNzIsCi0gICAgICA0NywgICAgMzEsICAgIDMzLCAgICAzNywgICAgMzcsICAgIDgyLCAgICAzNywgICAgNDEsICAgIDMzLCAgICAzNywKLSAgICAgIDQxLCAgIDEyNCwgICAgNDcsICAgIDQ3LCAgICA0OCwgICAgNTUsICAgIDQ3LCAgICA0OCwgICAgNDksICAgIDQ3LAotICAgICAgNDgsICAgIDMzLCAgICA0NywgICAgMzcsICAgIDQ0LCAgICA0NSwgICAxMzksICAgIDQxLCAgICAzMywgICAgNDQsCi0gICAgICA0NSwgICAgNDQsICAgIDcyLCAgICA0NywgICAgNDgsICAgIDQ3LCAgIDE0OSwgICAxNTAsICAgIDUyLCAgIDEzNywKLSAgICAgIDM3LCAgICA1MSwgICAgNDcsICAgIDM3LCAgICA0MSwgICAgMzcsICAgIDQ0LCAgIDEyNCwgICAgNDksICAgIDQxLAotICAgICAgNDcsICAgIDQ4LCAgICA0NSwgICAgNDcsICAgIDQ4LCAgICA0NywgICAgNDgsICAgMTU1LCAgICAgMSwgICAxNDksCi0gICAgIDE1MCwgICAgNDYsICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgIDE2NywKLSAgICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLAotICAgICAgNDksICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgNDksICAgIDUyLCAgICAzMSwgICAgMzQsCi0gICAgICA0NCwgICAgNDYsICAgIDQ0LCAgICAzMCwgICAgMzcsICAgIDQ0LCAgICA0OSwgICAgMzYsICAgIDQxLCAgICA0OSwKLSAgICAgIDMxLCAgICA0NCwgICAgNDUsICAgIDQ5LCAgICA0NywgICAgNDgsICAgICAxLCAgICA0OSwgICAgNDYsICAgIDUyLAotICAgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDQ5LCAgICAxMywgICAgMTQsCi0gICAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDM0LCAgICAyNCwKLSAgICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICA0OSwgICAgNDksICAgIDMxLCAgICA0OSwgICAgNDksICAgIDQ5LAotICAgICAgNDksICAgICAxLCAgICAzNywgICAgOTAsICAgMTU1LCAgIDEwNSwgICAgNDEsICAgIDc3LCAgIDEzOSwgICAgNDQsCi0gICAgICA0NSwgICAgLTEsICAgIDQ3LCAgICA0OCwgICAgIDEsICAgIC0xLCAgIDEwMCwgICAgNTIsICAgICA1LCAgICAgNiwKLSAgICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LAotICAgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsCi0gICAgICAyNywgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNiwKLSAgICAgIC0xLCAgICAgMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LAotICAgICAgMTAsICAgIDExLCAgICA0OSwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksCi0gICAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAtMSwKLSAgICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM2LCAgICAtMSwgICAgIDEsICAgIC0xLAotICAgICAgLTEsICAgIDQxLCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgNDksCi0gICAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwKLSAgICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLAotICAgICAgLTEsICAgIC0xLCAgICAtMSwgICAgMzYsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgLTEsCi0gICAgICAtMSwgICAgLTEsICAgIC0xLCAgICAgMSwgICAgLTEsICAgIC0xLCAgICA0OSwgICAgIDUsICAgICA2LCAgICAgNywKLSAgICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LAotICAgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsCi0gICAgICAyOCwgICAgMjksICAgIDMwLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNywKLSAgICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsICAgIDQ0LCAgICAtMSwgICAgLTEsICAgIDQ3LAotICAgICAgNDgsICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAtMSwgICAgMTMsCisgICAgICA1OSwgICAgMzgsICAgIDc5LCAgICAgMywgICAgIDEsICAgICA4LCAgICA1NiwgICAgMzcsICAgIDI2LCAgICAzNywKKyAgICAgIDY0LCAgICAzMSwgICAgIDEsICAgMTQ3LCAgICAzNywgICAgMTgsICAgIDMwLCAgICAgMSwgICAgMzIsICAgMTA5LAorICAgICAgIDAsICAgMTExLCAgICA0NSwgICAgNTEsICAgIDI3LCAgICAyMywgICAgNzYsICAgIDQ0LCAgICAzMSwgICAgNTEsCisgICAgICA1MCwgICAgMzcsICAgMTA5LCAgICA2MywgICAxMTEsICAgIDUzLCAgICAzMywgICAgOTEsICAgIDY4LCAgICA1NywKKyAgICAgIDM3LCAgIDEwMCwgICAgNDcsICAgMTc3LCAgICA0MSwgICAgNTEsICAgIDM3LCAgICAzMywgICAgMzcsICAgIDg2LAorICAgICAgNDcsICAgIDQ4LCAgICA0OSwgICAgMzcsICAgMTMxLCAgICAzNywgICAgNTYsICAgIDQxLCAgICA0NywgICAgNDgsCisgICAgICA1MSwgICAgNDcsICAgIDQ3LCAgICA0NywgICAgNDgsICAgIDQ3LCAgICA0OCwgICAgMzMsICAgIDM3LCAgICAzNywKKyAgICAgIDUxLCAgICAzMywgICAxNDksICAgIDQxLCAgICA0NCwgICAgNDUsICAgIDc2LCAgICA0NCwgICAgNDUsICAgIDQ3LAorICAgICAgNDgsICAgIDQ3LCAgIDE1OSwgICAxNjAsICAgIDUyLCAgICA0NywgICAgMzcsICAgIDM3LCAgIDE0NywgICAgMzcsCisgICAgICA0MSwgICAgNDUsICAgIDQ2LCAgICA0MSwgICAxMzEsICAgIDQ0LCAgICA0NywgICAgNDgsICAgIDUwLCAgICA0NywKKyAgICAgIDQ4LCAgIDE1OSwgICAxNjAsICAgIDQ2LCAgICA0NSwgICAgNDksICAgMTY1LCAgICAgMSwgICAgMzQsICAgIDQ5LAorICAgICAgNDksICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgIDE3NywgICAgMTMsCisgICAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICA1MiwKKyAgICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgMzQsICAgIDQ0LCAgICAzMSwgICAgNDQsICAgIDQ2LAorICAgICAgMzAsICAgIDQ0LCAgICAzMSwgICAgMzcsICAgIDQ5LCAgICA0OSwgICAgNDYsICAgIDQxLCAgICA0OSwgICAgMzYsCisgICAgICA0NCwgICAgNDUsICAgIDQ5LCAgICA0NywgICAgNDgsICAgICAxLCAgICA0OSwgICAgMzQsICAgIDUyLCAgICAgNSwKKyAgICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIDQ5LCAgICAxMywgICAgMTQsICAgIDE1LAorICAgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIDQ5LCAgICAyNCwgICAgMjUsCisgICAgICAyNiwgICAgMjcsICAgIDI4LCAgICA0OSwgICAgNDksICAgIDMxLCAgICA0OSwgICAgNDksICAgICAxLCAgIDE2NSwKKyAgICAgIDgxLCAgICAzNywgICAgOTQsICAgMTQ5LCAgIDEwNywgICAgNDEsICAgMTEyLCAgICA0OSwgICAgNDQsICAgIDQ1LAorICAgICAgLTEsICAgIDQ3LCAgICA0OCwgICAgIDEsICAgIC0xLCAgIDEwMywgICAgNTIsICAgICA1LCAgICAgNiwgICAgIDcsCisgICAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywKKyAgICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LAorICAgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNiwgICAgLTEsCisgICAgICAgMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwKKyAgICAgIDExLCAgICA0OSwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLAorICAgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LCAgICAtMSwgICAgLTEsCisgICAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM2LCAgICAtMSwgICAgIDEsICAgIC0xLCAgICAtMSwKKyAgICAgIDQxLCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgNDksICAgIDEzLAogICAgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsCiAgICAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwKLSAgICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgLTEsICAgIC0xLAotICAgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQ4LCAgICA0OSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsCi0gICAgICAgOSwgICAgMTAsICAgIDExLCAgICAtMSwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwKLSAgICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LAotICAgICAgLTEsICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNywgICAgLTEsCi0gICAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQ3LCAgICA0OCwKKyAgICAgIC0xLCAgICAtMSwgICAgMzYsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICA0MSwgICAgLTEsICAgIC0xLAorICAgICAgLTEsICAgIC0xLCAgICAgMSwgICAgLTEsICAgIC0xLCAgICA0OSwgICAgIDUsICAgICA2LCAgICAgNywgICAgIDgsCisgICAgICAgOSwgICAgMTAsICAgIDExLCAgICAxMiwgICAgMTMsICAgIDE0LCAgICAxNSwgICAgMTYsICAgIDE3LCAgICAxOCwKKyAgICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAyMywgICAgMjQsICAgIDI1LCAgICAyNiwgICAgMjcsICAgIDI4LAorICAgICAgMjksICAgIDMwLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAzNywgICAgLTEsCisgICAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsICAgIDQ0LCAgICAtMSwgICAgLTEsICAgIDQ3LCAgICA0OCwKICAgICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LCAgICAgOSwgICAgMTAsICAgIDExLCAgICAtMSwgICAgMTMsICAgIDE0LAogICAgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsICAgIDE5LCAgICAyMCwgICAgMjEsICAgIDIyLCAgICAtMSwgICAgMjQsCiAgICAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwgICAgLTEsICAgIC0xLCAgICAzMSwgICAgLTEsICAgIC0xLCAgICAtMSwKLSAgICAgIC0xLCAgICAzNiwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQxLCAgICAgNSwgICAgIDYsICAgICA3LAotICAgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsCi0gICAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywKLSAgICAgIDI4LCAgICAtMSwgICAgLTEsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLAotICAgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDEKKyAgICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDQxLCAgICAtMSwgICAgLTEsICAgIC0xLAorICAgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDgsICAgIDQ5LCAgICAgNSwgICAgIDYsICAgICA3LCAgICAgOCwgICAgIDksCisgICAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LCAgICAxNiwgICAgMTcsICAgIDE4LCAgICAxOSwKKyAgICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsICAgIDI2LCAgICAyNywgICAgMjgsICAgIC0xLAorICAgICAgLTEsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIDM3LCAgICAtMSwgICAgLTEsCisgICAgICAtMSwgICAgNDEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDcsICAgIDQ4LCAgICAgNSwKKyAgICAgICA2LCAgICAgNywgICAgIDgsICAgICA5LCAgICAxMCwgICAgMTEsICAgIC0xLCAgICAxMywgICAgMTQsICAgIDE1LAorICAgICAgMTYsICAgIDE3LCAgICAxOCwgICAgMTksICAgIDIwLCAgICAyMSwgICAgMjIsICAgIC0xLCAgICAyNCwgICAgMjUsCisgICAgICAyNiwgICAgMjcsICAgIDI4LCAgICAtMSwgICAgLTEsICAgIDMxLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwKKyAgICAgIDM2LCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgNDEsICAgICA1LCAgICAgNiwgICAgIDcsICAgICA4LAorICAgICAgIDksICAgIDEwLCAgICAxMSwgICAgLTEsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywgICAgMTgsCisgICAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgLTEsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LCAgICAyOCwKKyAgICAgIC0xLCAgICAtMSwgICAgMzEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLCAgICAtMSwgICAgLTEsICAgIC0xLAorICAgICAgLTEsICAgIC0xLCAgICA0MQogfTsKIAogLyogWVlTVE9TW1NUQVRFLU5VTV0gLS0gVGhlIChpbnRlcm5hbCBudW1iZXIgb2YgdGhlKSBhY2Nlc3NpbmcKQEAgLTg0NywxNSArODI2LDE2IEBACiAgICAgICAgOCwgICAgIDksICAgIDEwLCAgICAxMSwgICAgMTIsICAgIDEzLCAgICAxNCwgICAgMTUsICAgIDE2LCAgICAxNywKICAgICAgIDE4LCAgICAxOSwgICAgMjAsICAgIDIxLCAgICAyMiwgICAgMjMsICAgIDI0LCAgICAyNSwgICAgMjYsICAgIDI3LAogICAgICAgMjgsICAgIDI5LCAgICAzMCwgICAgMzEsICAgIDQxLCAgICA1NywgICAgNjAsICAgIDY0LCAgICA2NSwgICAgNjYsCi0gICAgICA2NywgICAgNjgsICAgIDY5LCAgICA3MywgICAgODQsICAgIDk2LCAgICA5OCwgICAgNDQsICAgIDQ1LCAgICAzMiwKLSAgICAgIDM3LCAgICAyMywgICAgMzcsICAgIDUxLCAgICA4NywgICAgNTksICAgIDM3LCAgICA4NywgICAgNDcsICAgIDQ3LAotICAgICAgNDQsICAgIDM3LCAgICA0NywgICAgNDgsICAgIDYxLCAgICA2MiwgICAgNjMsICAgIDcwLCAgICA3NCwgICAgNzUsCi0gICAgICA2NiwgICAgMzIsICAgIDU4LCAgICA4NywgICAgIDEsICAgIDY0LCAgICA4OCwgICAgODksICAgIDkwLCAgICA2MCwKLSAgICAgIDY0LCAgICA4NywgICAgNjUsICAgIDM3LCAgICAgMSwgICAgNzQsICAgIDcxLCAgICA3MiwgICAgNzMsICAgIDQ0LAotICAgICAgNDYsICAgIDc0LCAgICAzMCwgICAgMzIsICAgIDk3LCAgICAzMywgICAgNDcsICAgIDYwLCAgICA0NCwgICAgNDUsCi0gICAgICAzNywgICAgNDEsICAgIDQ3LCAgICA1MiwgICAgNzAsICAgIDc2LCAgICA3NywgICAgOTEsICAgIDkyLCAgICA5MywKLSAgICAgIDk0LCAgICA0NSwgICAgIDEsICAgIDkwLCAgICA3NCwgICAgNDgsICAgIDQ5LCAgICA0OSwgICAgNDksICAgIDQ5LAotICAgICAgNzMsICAgIDYzLCAgICA5NSwgICAgIDEsICAgIDY1LCAgICA3OCwgICAgNzksICAgIDgwLCAgICA4MSwgICAgOTQsCisgICAgICA2NywgICAgNjgsICAgIDY5LCAgICA3MywgICAgODQsICAgIDk5LCAgIDEwMSwgICAgNDQsICAgIDQ1LCAgICAzNywKKyAgICAgIDUxLCAgICA5NiwgICAgMjMsICAgIDM3LCAgICA1MSwgICAgODcsICAgIDU5LCAgICAzNywgICAgODcsICAgIDQ3LAorICAgICAgNDcsICAgIDQ0LCAgICAzNywgICAgNDcsICAgIDQ4LCAgICA2MSwgICAgNjIsICAgIDYzLCAgICA3MCwgICAgNzQsCisgICAgICA3NSwgICAgNjYsICAgIDk2LCAgICAzNywgICAgOTcsICAgIDk4LCAgICA1OCwgICAgODcsICAgICAxLCAgICA2NCwKKyAgICAgIDg4LCAgICA4OSwgICAgOTAsICAgIDYwLCAgICA2NCwgICAgODcsICAgIDY1LCAgICAzNywgICAgIDEsICAgIDc0LAorICAgICAgNzEsICAgIDcyLCAgICA3MywgICAgNDQsICAgIDQ2LCAgICA3NCwgICAgMzAsICAgIDMyLCAgIDEwMCwgICAgMzMsCisgICAgICA0NywgICAgNTAsICAgIDQ1LCAgICA0NiwgICAgNjAsICAgIDQ0LCAgICA0NSwgICAgMzcsICAgIDQxLCAgICA0NywKKyAgICAgIDUyLCAgICA3MCwgICAgNzYsICAgIDc3LCAgICA5MSwgICAgOTIsICAgIDkzLCAgICA5NCwgICAgNDUsICAgICAxLAorICAgICAgOTAsICAgIDc0LCAgICA0OCwgICAgNDksICAgIDQ5LCAgICA0OSwgICAgNDksICAgIDczLCAgICA2MywgICAgOTUsCisgICAgICAgMSwgICAgNjUsICAgIDc4LCAgICA3OSwgICAgODAsICAgIDgxLCAgICAzNCwgICAgNDUsICAgIDk4LCAgICA5NCwKICAgICAgICAxLCAgICAzNywgICAgNzYsICAgIDM0LCAgICA3NiwgICAgOTUsICAgIDMzLCAgICA0NywgICAgNDQsICAgIDQ2LAogICAgICAgNDksICAgIDQ0LCAgICAzMSwgICAgNTAsICAgIDg1LCAgICA4NiwgICAgNDksICAgIDM3LCAgICA0MSwgICAgNDcsCiAgICAgICA3MCwgICAgODIsICAgIDgzLCAgICA0OSwgICAgMzYsICAgIDQ2LCAgICA0OSwgICAgNDksICAgICAxLCAgICA3OCwKQEAgLTEwNDUsMTcgKzEwMjUsMjAgQEAKICNpZiAoZGVmaW5lZCBfX1NURENfXyB8fCBkZWZpbmVkIF9fQzk5X19GVU5DX18gXAogICAgICB8fCBkZWZpbmVkIF9fY3BsdXNwbHVzIHx8IGRlZmluZWQgX01TQ19WRVIpCiBzdGF0aWMgdm9pZAoteXlfc3RhY2tfcHJpbnQgKHl5dHlwZV9pbnQxNiAqYm90dG9tLCB5eXR5cGVfaW50MTYgKnRvcCkKK3l5X3N0YWNrX3ByaW50ICh5eXR5cGVfaW50MTYgKnl5Ym90dG9tLCB5eXR5cGVfaW50MTYgKnl5dG9wKQogI2Vsc2UKIHN0YXRpYyB2b2lkCi15eV9zdGFja19wcmludCAoYm90dG9tLCB0b3ApCi0gICAgeXl0eXBlX2ludDE2ICpib3R0b207Ci0gICAgeXl0eXBlX2ludDE2ICp0b3A7Cit5eV9zdGFja19wcmludCAoeXlib3R0b20sIHl5dG9wKQorICAgIHl5dHlwZV9pbnQxNiAqeXlib3R0b207CisgICAgeXl0eXBlX2ludDE2ICp5eXRvcDsKICNlbmRpZgogewogICBZWUZQUklOVEYgKHN0ZGVyciwgIlN0YWNrIG5vdyIpOwotICBmb3IgKDsgYm90dG9tIDw9IHRvcDsgKytib3R0b20pCi0gICAgWVlGUFJJT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