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UtYm9vdC5sZHMKaW5kZXggNjUwY2I5ZS4uMzA2Nzg0NiAxMDA2NDQKLS0tIGEvYm9hcmQvYXR1bTg1NDgvdS1ib290LmxkcworKysgYi9ib2FyZC9hdHVtODU0OC91LWJvb3QubGRzCkBAIC03OCwxMCArNzgsOCBAQAogICAgIFBST1ZJREUgKGV0ZXh0ID0gLik7CiAgICAgLnJvZGF0YSAgICA6CiAgICB7Ci0gICAgKigucm9kYXRhKQotICAgICooLnJvZGF0YTEpCi0gICAgKigucm9kYXRhLnN0cjEuNCkKICAgICAqKC5laF9mcmFtZSkKKyAgICAqKFNPUlRfQllfQUxJR05NRU5UKFNPUlRfQllfTkFNRSgucm9kYXRhKikpKQogICB9CiAgIC5maW5pICAgICAgOiB7ICooLmZpbmkpICAgIH0gPTAKICAgLmN0b3JzICAgICA6IHsgKiguY3RvcnMpICAgfQpkaWZmIC0tZ2l0IGEvYm9hcmQvYzJtb24vdS1ib290LmxkcyBiL2JvYXJkL2MybW9uL3UtYm9vdC5sZHMKaW5kZXggZWY5YTI1MS4uNjE2NTBhOCAxMDA2NDQKLS0tIGEvYm9hcmQvYzJtb24vdS1ib290LmxkcworKysgYi9ib2FyZC9jMm1vbi91LWJvb3QubGRzCkBAIC03MywxMCArNzMsOCBAQAogICBQUk9WSURFIChldGV4dCA9IC4pOwogICAucm9kYXRhICAgIDoKICAgewotICAgICooLnJvZGF0YSkKLSAgICAqKC5yb2RhdGExKQotICAgICooLnJvZGF0YS5zdHIxLjQpCiAgICAgKiguZWhfZnJhbWUpCisgICAgKihTT1JUX0JZX0FMSUdOTUVOVChTT1JUX0JZX05BTUUoLnJvZGF0YSopKSkKICAgfQogICAuZmluaSAgICAgIDogeyAqKC5maW5pKSAgICB9ID0wCiAgIC5jdG9ycyAgICAgOiB7ICooLmN0b3JzKSAgIH0KZGlmZiAtLWdpdCBhL2JvYXJkL2NlcmYyNTAvdS1ib290LmxkcyBiL2JvYXJkL2NlcmYyNTAvdS1ib290Lmxkcwppbm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Kigucm9kYXRhKQotICAgICooLnJvZGF0YTEpCi0gICAgKigucm9kYXRhLnN0cjEuNCkKICAgICAqKC5laF9mcmFtZSkKKyAgICAqKFNPUlRfQllfQUxJR05NRU5UKFNPUlRfQllfTkFNRSgucm9kYXRhKikpKQogICB9CiAgIC5maW5pICAgICAgOiB7ICooLmZpbmkpICAgIH0gPTAKICAgLmN0b3JzICAgICA6IHsgKiguY3RvcnMpICAgfQpkaWZmIC0tZ2l0IGEvYm9hcmQvZXNkL2FkY2lvcC91LWJvb3QubGRzIGIvYm9hcmQvZXNkL2FkY2lvcC91LWJvb3QubGRzCmluZGV4IGU5MTgxNjMuLjI2NDVlODQgMTAwNjQ0Ci0tLSBhL2JvYXJkL2VzZC9hZGNpb3AvdS1ib290LmxkcworKysgYi9ib2FyZC9lc2QvYWRjaW9wL3UtYm9vdC5sZHMKQEAgLTU3LDExICs1Nyw3IEBACiAgIC5wbHQgOiB7ICooLnBsdCkgfQogICAudGV4dCAgICAgIDoKICAgewotICAgIC8qIFdBUk5JTkcgLSB0aGUgZm9sbG93aW5nIGlzIGhhbmQtb3B0aW1pemVkIHRvIGZpdCB3aXRoaW4JKi8KLSAgICAvKiB0aGUgc2VjdG9yIGxheW91dCBvZiBvdXIgZmxhc2ggY2hpcHMhCVhYWCBGSVhNRSBYWFgJKi8KLQogICAgIGNwdS9wcGM0eHgvc3RhcnQubwkoLnRleHQpCi0gICAgY3B1L3BwYzR4eC90cmFwcy5vCSgudGV4dCkKIAogICAgICooLnRleHQpCiAgICAgKiguZml4dXApCkBAIC03MSwxMCArNjcsOCBAQAogICBQUk9WSURFIChldGV4dCA9IC4pOwogICAucm9kYXRhICAgIDoKICAgewotICAgICooLnJvZGF0YSkKLSAgICAqKC5yb2RhdGExKQotICAgICooLnJvZGF0YS5zdHIxLjQpCiAgICAgKiguZWhfZnJhbWUpCisgICAgKihTT1JUX0JZX0FMSUdOTUVOVChTT1JUX0JZX05BTUUoLnJvZGF0YSopKSkKICAgfQogICAu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NHh4L3NwZWVkLm8JCSgudGV4dCkKLSAgICBjb21tb24vZGxtYWxsb2MubwkJKC50ZXh0KQotICAgIGxpYl9wcGMvZXh0YWJsZS5vCQkoLnRleHQpCi0gICAgbGliX3BwYy9ib2FyZC5vCQkoLnRleHQpCi0gICAgbGliX2dlbmVyaWMvemxpYi5vCQkoLnRleHQpCi0gICAgbGliX2dlbmVyaWMvY3JjMzIubwkJKC50ZXh0KQotCi0gICAgY29tbW9uL2NtZF9ib290Lm8JCSgudGV4dCkKLSAgICBjb21tb24vY21kX2Jvb3RtLm8JCSgudGV4dCkKLSAgICBjb21tb24vY21kX2ZsYXNoLm8JCSgudGV4dCkKLSAgICBjb21tb24vY21kX21lbS5vCQkoLnRleHQpCi0gICAgY29tbW9uL2NtZF9udmVkaXQubwkJKC50ZXh0KQotICAgIGNvbW1vbi9jb25zb2xlLm8JCSgudGV4dCkKLSAgICBjb21tb24vbWFpbi5vCQkoLnRleHQpCi0KLSAgICBib2FyZC9lc2QvZGFzYV9zaW0vZmxhc2gubwkoLnRleHQpCi0gICAgY29tbW9uL2NtZF9udmVkaXQubwkoLnRleHQpCi0gICAgYm9hcmQvZXNkL2Rhc2Ffc2ltL2NtZF9kYXNhX3NpbS5vCSgudGV4dCkKLSAgICBuZXQvYm9vdHAubwkoLnRleHQpCiAKICAgICAuID0gZW52X29mZnNldDsKICAgICBjb21tb24vZW52X2VtYmVkZGVkLm8oLnRleHQpCkBAIC05NiwxMCArNzAsOCBAQAogICBQUk9WSURFIChldGV4dCA9IC4pOwogICAucm9kYXRhICAgIDoKICAgewotICAgICooLnJvZGF0YSkKLSAgICAqKC5yb2RhdGExKQotICAgICooLnJvZGF0YS5zdHIxLjQpCiAgICAgKiguZWhfZnJhbWUpCisgICAgKihTT1JUX0JZX0FMSUdOTUVOVChTT1JUX0JZX05BTUUoLnJvZGF0YSopKSkKICAgfQogICAuZmluaSAgICAgIDogeyAqKC5maW5pKSAgICB9ID0wCiAgIC5jdG9ycyAgICAgO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mluaSAgICAgIDogeyAqKC5maW5pKSAgICB9ID0wCiAgIC5jdG9ycyAgICAgOiB7ICooLmN0b3JzKSAgIH0KZGlmZiAtLWdpdCBhL2JvYXJkL21wbC9taXA0MDUvdS1ib290LmxkcyBiL2JvYXJkL21wbC9taXA0MDUvdS1ib290LmxkcwppbmRleCA4NzE0YzJiLi5kNzFhMjk5IDEwMDY0NAotLS0gYS9ib2FyZC9tcGwvbWlwNDA1L3UtYm9vdC5sZHMKKysrIGIvYm9hcmQvbXBsL21pcDQwNS91LWJvb3QubGRzCkBAIC04OSwxMCArODksOCBAQAogICBQUk9WSURFIChldGV4dCA9IC4pOwogICAucm9kYXRhICAgIDoKICAgewotICAgICooLnJvZGF0YSkKLSAgICAqKC5yb2RhdGExKQotICAgICooLnJvZGF0YS5zdHIxLjQpCiAgICAgKiguZWhfZnJhbWUpCisgICAgKihTT1JUX0JZX0FMSUdOTUVOVChTT1JUX0JZX05BTUUoLnJvZGF0YSopKSkKICAgfQogICAuZmluaSAgICAgIDogeyAqKC5maW5pKSAgICB9ID0wCiAgIC5jdG9ycyAgICAgOiB7ICooLmN0b3JzKSAgIH0KZGlmZiAtLWdpdCBhL2JvYXJkL21wbC9waXA0MDUvdS1ib290LmxkcyBiL2JvYXJkL21wbC9waXA0MDUvdS1ib290LmxkcwppbmRleCBhZmUyMDNiLi5mNmY4OGE3IDEwMDY0NAotLS0gYS9ib2FyZC9tcGwvcGlwNDA1L3UtYm9vdC5sZHMKKysrIGIvYm9hcmQvbXBsL3BpcDQwNS91LWJvb3QubGRzCkBAIC04NCwxMCArODQsOCBAQAogICBQUk9WSURFIChldGV4dCA9IC4pOwogICAucm9kYXRhICAgIDoKICAgewotICAgICooLnJvZGF0YSkKLSAgICAqKC5yb2RhdGExKQotICAgICooLnJvZGF0YS5zdHIxLjQpCiAgICAgKiguZWhfZnJhbWUpCisgICAgKihTT1JUX0JZX0FMSUdOTUVOVChTT1JUX0JZX05BTUUoLnJvZGF0YSopKSkKICAgf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XRhID0gLik7CisKKwlQUk9WSURFIChfZmdvdCA9IC4pOworCS5nb3QgOgorCXsKKwkJKiguZ290KQorCQkuID0gQUxJR04oNCk7CisJfQorCVBST1ZJREUgKF9lZ290ID0gLik7CisKKwlQUk9WSURFIChfX3VfYm9vdF9jbWRfc3RhcnQgPSAuKTsKKwkudV9ib290X2NtZCA6CisJeworCQkqKC51X2Jvb3RfY21kKQorCQkuID0gQUxJR04oNCk7CisJfQorCVBST1ZJREUgKF9fdV9ib290X2NtZF9lbmQgPSAuKTsKKworCVBST1ZJREUgKHJlbG9jX2RzdF9lbmQgPSAuKTsKKwkvKiBfcmVsb2NfZHN0X2VuZCA9IC47ICovCisKKwlQUk9WSURFIChic3Nfc3RhcnQgPSAuKTsKKwlQUk9WSURFIChfX2Jzc19zdGFydCA9IC4pOworCS5ic3MgOgorCXsKKwkJKiguYnNzKQorCQkuID0gQUxJR04oNCk7CisJfQorCVBST1ZJREUgKGJzc19lbmQgPSAuKTsKKworCVBST1ZJREUgKF9lbmQgPSAuKTsKK30KZGlmZiAtLWdpdCBhL2JvYXJkL3JtdS91LWJvb3QubGRzIGIvYm9hcmQvcm11L3UtYm9vdC5sZHMKaW5kZXggNTVjYjVlYy4uZmFhMWM2YyAxMDA2NDQKLS0tIGEvYm9hcmQvcm11L3UtYm9vdC5sZHMKKysrIGIvYm9hcmQvcm11L3UtYm9vdC5sZHMKQEAgLTc0LDEwICs3NCw4IEBACiAgIFBST1ZJREUgKGV0ZXh0ID0gLik7CiAgIC5yb2RhdGEgICAgOgogICB7Ci0gICAgKigucm9kYXRhKQotICAgICooLnJvZGF0YTEpCi0gICAgKigucm9kYXRhLnN0cjEuNCkKICAgICAqKC5laF9mcmFtZSkKKyAgICAqKFNPUlRfQllfQUxJR05NRU5UKFNPUlRfQllfTkFNRSgucm9kYXRhKikpKQogICB9CiAgIC5maW5pICAgICAgOiB7ICooLmZpbmkpICAgIH0gPTAKICAgLmN0b3JzICAgICA6IHsgKiguY3RvcnMpIC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lzdHJ1Y3QgcGFydF9pbmZvICpwYXJ0OworCXVuc2lnbmVkIGxvbmcgc2l6ZTsKKwl1bnNpZ25lZCBsb25nIG9mZnNldDsKKwljb25zdCBjaGFyICpuYW1lOworCWludCBuYW1lX2xlbjsKKwl1bnNpZ25lZCBpbnQgbWFza19mbGFnczsKKwljb25zdCBjaGFyICpwOworCisJcCA9IHBhcnRkZWY7CisJKnJldHBhcnQgPSBOVUxMOworCSpyZXQgPSBOVUxMOworCisJLyogZmV0Y2ggdGhlIHBhcnRpdGlvbiBzaXplICovCisJaWYgKCpwID09ICctJykgeworCQkvKiBhc3NpZ24gYWxsIHJlbWFpbmluZyBzcGFjZSB0byB0aGlzIHBhcnRpdGlvbiAqLworCQlERUJVR0YoIictJzogcmVtYWluaW5nIHNpemUgYXNzaWduZWRcbiIpOworCQlzaXplID0gU0laRV9SRU1BSU5JTkc7CisJCXArKzsKKwl9IGVsc2UgeworCQlzaXplID0gbWVtc2l6ZV9wYXJzZShwLCAmcCk7CisJCWlmIChzaXplIDwgTUlOX1BBUlRfU0laRSkgeworCQkJcHJpbnRmKCJwYXJ0aXRpb24gc2l6ZSB0b28gc21hbGwgKCVseClcbiIsIHNpemUpOworCQkJcmV0dXJuIDE7CisJCX0KKwl9CisKKwkvKiBjaGVjayBmb3Igb2Zmc2V0ICovCisJb2Zmc2V0ID0gT0ZGU0VUX05PVF9TUEVDSUZJRUQ7CisJaWYgKCpwID09ICdAJykgeworCQlwKys7CisJCW9mZnNldCA9IG1lbXNpemVfcGFyc2UocCwgJnApOworCX0KKworCS8qIG5vdyBsb29rIGZvciB0aGUgbmFtZSAqLworCWlmICgqcCA9PSAnKCcpIHsKKwkJbmFtZSA9ICsrcDsKKwkJaWYgKChwID0gc3RyY2hyKG5hbWUsICcpJykpID09IE5VTEwpIHsKKwkJCXByaW50Zigibm8gY2xvc2luZyApIGZvdW5kIGluIHBhcnRpdGlvbiBuYW1lXG4iKTsKKwkJCXJldHVybiAxOworCQl9CisJCW5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ssICZtdGRpZHMpOworCQlyZXQgPSAwOworCX0KKwlpZiAocmV0ID09IDEpIHsKKwkJLyogY2xlYW4gbXRkaWRzIGxpc3QgYW5kIGZyZWUgYWxsb2NhdGVkIG1lbW9yeSAqLworCQlsaXN0X2Zvcl9lYWNoX3NhZmUoZW50cnksIG4sICZtdGRpZHMpIHsKKwkJCWlkX3RtcCA9IGxpc3RfZW50cnkoZW50cnksIHN0cnVjdCBtdGRpZHMsIGxpbmspOworCQkJbGlzdF9kZWwoZW50cnkpOworCQkJZnJlZShpZF90bXApOworCQl9CisJCXJldHVybiAxOworCX0KKworCXJldHVybiAwOworfQorCisvKioKKyAqIFBhcnNlIGFuZCBpbml0aWFsaXplIGdsb2JhbCBtdGRpZHMgbWFwcGluZyBhbmQgY3JlYXRlIGdsb2JhbAorICogZGV2aWNlL3BhcnRpdGlvbiBsaXN0LgorICoKKyAqIEByZXR1cm4gMCBvbiBzdWNjZXNzLCAxIG90aGVyd2lzZQorICovCitpbnQgbXRkcGFydHNfaW5pdCh2b2lkKQoreworCXN0YXRpYyBpbnQgaW5pdGlhbGl6ZWQgPSAwOworCWNvbnN0IGNoYXIgKmlkcywgKnBhcnRzOworCWNvbnN0IGNoYXIgKmN1cnJlbnRfcGFydGl0aW9uOworCWludCBpZHNfY2hhbmdlZDsKKwljaGFyIHRtcF9lcFtQQVJUSVRJT05fTUFYTEVOXTsKKworCURFQlVHRigiXG4tLS1tdGRwYXJ0c19pbml0LS0tXG4iKTsKKwlpZiAoIWluaXRpYWxpemVkKSB7CisJCUlOSVRfTElTVF9IRUFEKCZtdGRpZHMpOworCQlJTklUX0xJU1RfSEVBRCgmZGV2aWNlcyk7CisJCW1lbXNldChsYXN0X2lkcywgMCwgTVRESURTX01BWExFTik7CisJCW1lbXNldChsYXN0X3BhcnRzLCAwLCBNVERQQVJUU19NQVhMRU4pOworCQltZW1zZXQobGFzdF9wYXJ0aXRpb24sIDAsIFBBUlRJVElPTl9NQVhMRU4pOworCQlpbml0aW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B7CisJCXBhcnQgPSBsaXN0X2VudHJ5KGVudHJ5LCBzdHJ1Y3QgcGFydF9pbmZvLCBsaW5rKTsKKworCQlpZiAocGFydF9udW0gPT0gbnVtKyspIHsKKwkJCXJldHVybiBwYXJ0OworCQl9CisJfQorCisJcmV0dXJuIE5VTEw7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBVLWJvb3QgY29tbWFuZHMJCQkJICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBjb21tYW5kIGxpbmUgb25seSAqLworLyoqCisgKiBSb3V0aW5lIGltcGxlbWVudGluZyB1LWJvb3QgY2hwYXJ0IGNvbW1hbmQuIFNldHMgbmV3IGN1cnJlbnQgcGFydGl0aW9uIGJhc2VkCisgKiBvbiB0aGUgdXNlciBzdXBwbGllZCBwYXJ0aXRpb24gaWQuIEZvciBwYXJ0aXRpb24gaWQgZm9ybWF0IHNlZSBmaW5kX2Rldl9hbmRfcGFydCgpLgorICoKKyAqIEBwYXJhbSBjbWR0cCBjb21tYW5kIGludGVybmFsIGRhdGEKKyAqIEBwYXJhbSBmbGFnIGNvbW1hbmQgZmxhZworICogQHBhcmFtIGFyZ2MgbnVtYmVyIG9mIGFyZ3VtZW50cyBzdXBwbGllZCB0byB0aGUgY29tbWFuZAorICogQHBhcmFtIGFyZ3YgYXJndW1lbnRzIGxpc3QKKyAqIEByZXR1cm4gMCBvbiBzdWNjZXNzLCAxIG90aGVyd2lzZQorICovCitpbnQgZG9fY2hwYXJ0KGNtZF90YmxfdCAqY21kdHAsIGludCBmbGFnLCBpbnQgYXJnYywgY2hhciAqYXJndltdKQoreworLyogY29tbWFuZCBsaW5lIG9ubHkgKi8KKwlzdHJ1Y3QgbXRkX2RldmljZSAqZGV2OworCXN0cnVjdCBwYXJ0X2luZm8gKnBhcnQ7CisJdTggcG51bTsKKworCWlmIChtdGRw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W50IHNlZykKK3sKKwlwcmludGYoIlBhZ2UgZmF1bHQgYXQgJTA0eDolMDh4XG4iLCBzZWcsIGlwKTsKKwl3aGlsZSgxKTsKK30KKworX19pc3JfXyBmbG9hdGluZ19wb2ludF9lcnJvcl9lbnRyeShpbnQgY2F1c2UsIGludCBpcCwgaW50IHNlZykKK3sKKwlwcmludGYoIkZsb2F0aW5nLVBvaW50IEVycm9yIChNYXRoIEZhdWx0KSBhdCAlMDR4OiUwOHhcbiIsIHNlZywgaXApOworfQorCitfX2lzcl9fIGFsaWdubWVudF9jaGVja19lbnRyeShpbnQgY2F1c2UsIGludCBpcCwgaW50IHNlZykKK3sKKwlwcmludGYoIkFsaWdubWVudCBjaGVjayBhdCAlMDR4OiUwOHhcbiIsIHNlZywgaXApOworfQorCitfX2lzcl9fIG1hY2hpbmVfY2hlY2tfZW50cnkoaW50IGNhdXNlLCBpbnQgaXAsIGludCBzZWcpCit7CisJcHJpbnRmKCJNYWNoaW5lIENoZWNrIGF0ICUwNHg6JTA4eFxuIiwgc2VnLCBpcCk7Cit9CisKK19faXNyX18gc2ltZF9mbG9hdGluZ19wb2ludF9leGNlcHRpb25fZW50cnkoaW50IGNhdXNlLCBpbnQgaXAsIGludCBzZWcpCit7CisJcHJpbnRmKCJTSU1EIEZsb2F0aW5nLVBvaW50IEV4Y2VwdGlvbiBhdCAlMDR4OiUwOHhcbiIsIHNlZywgaXApOworfQorCitpbnQgY3B1X2luaXRfZXhjZXB0aW9ucyh2b2lkKQoreworCS8qIEp1c3QgaW4gY2FzZS4uLiAqLworCWRpc2FibGVfaW50ZXJydXB0cygpOworCisJLyogU2V0dXAgZXhjZXB0aW9ucyAqLworCXNldF92ZWN0b3IoMHgwMCwgZXhwXzApOworCXNldF92ZWN0b3IoMHgwMSwgZXhwXzEpOworCXNldF92ZWN0b3IoMHgwMiwgZXhwXzIpOworCXNldF92ZWN0b3IoMHgwMywgZXhwXzMpOworCXNldF92ZWN0b3IoMHgwNCwgZXhwXzQp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mFja29mZiBzZWVkLiAqLwogCVZhbHVlMzIgPSAocERldmljZS0+Tm9kZUFkZHJlc3NbMF0gKyBwRGV2aWNlLT5Ob2RlQWRkcmVzc1sxXSArCkBAIC0zNDI4LDcgKzM0MjgsNyBAQAogCQkgICAgIChwRGV2aWNlLT5TdWJzeXN0ZW1JZCA8PCAxNikgfCBwRGV2aWNlLT5TdWJzeXN0ZW1WZW5kb3JJZCk7CiAKIAkvKiBSZXByb2dyYW0gdGhlIE1BQyBhZGRyZXNzLiAqLwotCUxNX1NldE1hY0FkZHJlc3MgKHBEZXZpY2UsIHBEZXZpY2UtPk5vZGVBZGRyZXNzKTsKKwlMTV9TZXRNYWNBZGRyZXNzIChwRGV2aWNlKTsKIAogCXJldHVybiBMTV9TVEFUVVNfU1VDQ0VTUzsKIH0JCQkJLyogTE1fSGFsdCAqLwpAQCAtMzgzMyw5ICszODMzLDEwIEBACiAvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyogUmV0dXJuOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi1MTV9TVEFUVVMgTE1fU2V0TWFjQWRkcmVzcyAoUExNX0RFVklDRV9CTE9DSyBwRGV2aWNlLCBQTE1fVUlOVDggcE1hY0FkZHJlc3MpCitMTV9TVEFUVVMgTE1fU2V0TWFjQWRkcmVzcyAoUExNX0RFVklDRV9CTE9DSyBwRGV2aWNlKQogewogCUxNX1VJTlQzMiBqOworCVBMTV9VSU5UOCBwTWFjQWRkcmVzcyA9IHBEZXZpY2UtPk5vZGVBZGRyZXNzOwogCiAJZm9yIChqID0gMDsgaiA8IDQ7IGorKykgewogCQlSRUdfV1IgKHB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RUVQUl9FTik7CisJfQorCisJcmV0dXJuIDA7Cit9CisKKy8qKgorICoJZ2V0bGluZSAtIGNvbnN1bWUgYSBsaW5lIG9mIGlucHV0IGFuZCBoYW5kbGUgc29tZSBlc2NhcGUgc2VxdWVuY2VzCisgKi8KK3N0YXRpYyBjaGFyICpnZXRsaW5lKHZvaWQpCit7CisJc3RhdGljIGNoYXIgYnVmZmVyWzEwMF07CisJY2hhciBjOworCXNpemVfdCBpOworCisJaSA9IDA7CisJd2hpbGUgKDEpIHsKKwkJYnVmZmVyW2ldID0gJ1wwJzsKKwkJd2hpbGUgKCF0c3RjKCkpCisJCQljb250aW51ZTsKKworCQljID0gZ2V0YygpOworCQkvKiBDb252ZXJ0IHRvIHVwcGVyY2FzZSAqLworCQlpZiAoYyA+PSAnYScgJiYgYyA8PSAneicpCisJCQljIC09ICgnYScgLSAnQScpOworCisJCXN3aXRjaCAoYykgeworCQljYXNlICdccic6CS8qIEVudGVyL1JldHVybiBrZXkgKi8KKwkJY2FzZSAnXG4nOgorCQkJcHV0cygiXG4iKTsKKwkJCXJldHVybiBidWZmZXI7CisKKwkJY2FzZSAweDAzOgkvKiBeQyAtIGJyZWFrICovCisJCQlyZXR1cm4gTlVMTDsKKworCQljYXNlIDB4NUY6CisJCWNhc2UgMHgwODoJLyogXkggIC0gYmFja3NwYWNlICovCisJCWNhc2UgMHg3RjoJLyogREVMIC0gYmFja3NwYWNlICovCisJCQlpZiAoaSkgeworCQkJCXB1dHMoIlxiIFxiIik7CisJCQkJaS0tOworCQkJfQorCQkJYnJlYWs7CisKKwkJZGVmYXVsdDoKKwkJCS8qIElnbm9yZSBjb250cm9sIGNoYXJhY3RlcnMgKi8KKwkJCWlmIChjIDwgMHgyMCkKKwkJCQlicmVhazsKKwkJCS8qIFF1ZXVlIHVwIGFsbCBvdGhlciBjaGFyYWN0ZXJzICovCisJCQlidWZmZXJbaSsrXSA9IGM7CisJCQlwcmludGYoIiVjIiwgYyk7CisJCQlicmVhazsKKwk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nX2luZm8geworCXZvaWQgKmJ1ZjsKKwlzdHJ1Y3QgdWJpZnNfemJyYW5jaCBvbGRfenJvb3Q7CisJaW50IG9sZF96cm9vdF9sZXZlbDsKKwl1bnNpZ25lZCBsb25nIGxvbmcgb2xkX3pyb290X3NxbnVtOworCWludCBmYWlsdXJlX21vZGU7CisJaW50IGZhaWxfZGVsYXk7CisJdW5zaWduZWQgbG9uZyBmYWlsX3RpbWVvdXQ7CisJdW5zaWduZWQgaW50IGZhaWxfY250OworCXVuc2lnbmVkIGludCBmYWlsX2NudF9tYXg7CisJbG9uZyBsb25nIGNoa19scHRfc3o7CisJbG9uZyBsb25nIGNoa19scHRfc3oyOworCWxvbmcgbG9uZyBjaGtfbHB0X3dhc3RhZ2U7CisJaW50IGNoa19scHRfbGViczsKKwlpbnQgbmV3X25oZWFkX29mZnM7CisJaW50IG5ld19paGVhZF9sbnVtOworCWludCBuZXdfaWhlYWRfb2ZmczsKKworCXN0cnVjdCB1Ymlmc19scF9zdGF0cyBzYXZlZF9sc3Q7CisJbG9uZyBsb25nIHNhdmVkX2ZyZWU7CisKKwljaGFyIGRmc19kaXJfbmFtZVsxMDBdOworCXN0cnVjdCBkZW50cnkgKmRmc19kaXI7CisJc3RydWN0IGRlbnRyeSAqZGZzX2R1bXBfbHByb3BzOworCXN0cnVjdCBkZW50cnkgKmRmc19kdW1wX2J1ZGc7CisJc3RydWN0IGRlbnRyeSAqZGZzX2R1bXBfdG5jOworfTsKKworI2RlZmluZSBVQklGU19EQkcob3ApIG9wCisKKyNkZWZpbmUgdWJpZnNfYXNzZXJ0KGV4cHIpIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJaWYgKHVubGlrZWx5KCEoZXhwcikpKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCXByaW50ayhLRVJOX0NSSVQgIlVCSUZTIGFzc2VydCBmYWlsZWQgaW4gJXMgYXQgJXUgKHBpZCAlZClcbiIsIFwKKwkJICAgICAgIF9fZnVuY19fLCBfX0xJTkVfXywgMCk7ICAgICAgICAgICAgICAgICAgICAgIFwKKwkJZGJnX2R1bXBfc3RhY2soKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorfSB3aGlsZSAoMCkKKworI2RlZmluZSB1Ymlmc19hc3NlcnRfY210X2xvY2tlZChjKSBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlpZiAodW5saWtlbHkoZG93bl93cml0ZV90cnlsb2NrKCYoYyktPmNvbW1pdF9zZW0pKSkgeyAgICAgICAgICAgICAgICAgIFwKKwkJdXBfd3JpdGUoJihjKS0+Y29tbWl0X3NlbSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCQlwcmludGsoS0VSTl9DUklUICJjb21taXQgbG9jayBpcyBub3QgbG9ja2VkIVxuIik7ICAgICAgICAgICAgICBcCisJCXViaWZzX2Fzc2VydCgwKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUgKDApCisKKyNkZWZpbmUgZGJnX2R1bXBfc3RhY2soKSBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJaWYgKCFkYmdfZmFpbHVyZV9tb2RlKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWR1bXBfc3RhY2soKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUgKDApCisKKy8qIEdlbmVyaWMgZGVidWdnaW5nIG1lc3NhZ2VzICovCisjZGVmaW5lIGRiZ19tc2coZm10LCAuLi4pIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXNwaW5fbG9jaygmZGJnX2xvY2spOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByaW50ayhLRVJOX0RFQlVHICJVQklGUyBEQkcgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAwLCAgIFwKKwkgICAgICAgX19mdW5jX18sICMjX19WQV9BUkdTX18pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlzcGluX3VubG9jaygmZGJnX2xvY2spOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUgKDApCisKKyNkZWZpbmUgZGJnX2RvX21zZyh0eXAsIGZtdCwgLi4uKSBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJaWYgKHViaWZzX21zZ19mbGFncyAmIHR5cCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCWRiZ19tc2coZm10LCAjI19fVkFfQVJHU19fKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUgKDApCisKKyNkZWZpbmUgZGJnX2VycihmbXQsIC4uLikgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJc3Bpbl9sb2NrKCZkYmdfbG9jayk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJdWJpZnNfZXJyKGZtdCwgIyNfX1ZBX0FSR1NfXyk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJc3Bpbl91bmxvY2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lNfREVCVUdfQ0hLUworI2RlZmluZSBVQklGU19DSEtfRkxBR1NfREVGQVVMVCAweGZmZmZmZmZmCisjZWxzZQorI2RlZmluZSBVQklGU19DSEtfRkxBR1NfREVGQVVMVCAwCisjZW5kaWYKKworI2RlZmluZSBkYmdfbnR5cGUodHlwZSkgICAgICAgICAgICAgICAgICAgICAgICIiCisjZGVmaW5lIGRiZ19jc3RhdGUoY210X3N0YXRlKSAgICAgICAgICAgICAgICAgIiIKKyNkZWZpbmUgZGJnX2dldF9rZXlfZHVtcChjLCBrZXkpICAgICAgICAgICAgICAoe30pCisjZGVmaW5lIGRiZ19kdW1wX2lub2RlKGMsIGlub2RlKSAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF9ub2RlKGMsIG5vZGUpICAgICAgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfYnVkZ2V0X3JlcShyZXEpICAgICAgICAgICAgICAoe30pCisjZGVmaW5lIGRiZ19kdW1wX2xzdGF0cyhsc3QpICAgICAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF9idWRnKGMpICAgICAgICAgICAgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfbHByb3AoYywgbHApICAgICAgICAgICAgICAgICAoe30pCisjZGVmaW5lIGRiZ19kdW1wX2xwcm9wcyhjKSAgICAgICAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF9scHRfaW5mbyhjKSAgICAgICAgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfbGViKGMsIGxudW0pICAgICAgICAgICAgICAgICAoe30pCisjZGVmaW5lIGRiZ19kdW1wX3pub2RlKGMsIHpub2RlKSAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF9oZWFwKGMsIGhlYXAsIGNhdCkgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfcG5vZGUoYywgcG5vZGUsIHBhcmVudCwgaWlwKSAoe30pCisjZGVmaW5lIGRiZ19kdW1wX3RuYyhjKSAgICAgICAgICAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF9pbmRleChjKSAgICAgICAgICAgICAgICAgICAgICh7fSkKKworI2RlZmluZSBkYmdfd2Fsa19pbmRleChjLCBsZWFmX2NiLCB6bm9kZV9jYiwgcHJpdikgMAorI2RlZmluZSBkYmdfb2xkX2luZGV4X2NoZWNrX2luaXQoYywgenJvb3QpICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfb2xkX2luZGV4KGMsIHpyb290KSAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfY2F0cyhjKSAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfbHRhYihjKSAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hrX2xwdF9mcmVlX3NwYyhjKSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hrX2xwdF9zeihjLCBhY3Rpb24sIGxlbikgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfc3luY2VkX2lfc2l6ZShpbm9kZSkgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfZGlyX3NpemUoYywgZGlyKSAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfdG5jKGMsIHgpICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfaWR4X3NpemUoYywgaWR4X3NpemUpICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfZmlsZXN5c3RlbShjKSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfaGVhcChjLCBoZWFwLCBjYXQsIGFkZF9wb3MpICAgICAgKHt9KQorI2RlZmluZSBkYmdfY2hlY2tfbHByb3BzKGMpICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfY2hlY2tfbHB0X25vZGVzKGMsIGNub2RlLCByb3csIGNvbCkgICAgMAorI2RlZmluZSBkYmdfZm9yY2VfaW5fdGhlX2dhcHNfZW5hYmxlZCAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfZm9yY2VfaW5fdGhlX2dhcHMoKSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfZmFpbHVyZV9tb2RlICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBkYmdfZmFpbHVyZV9tb2RlX3JlZ2lzdHJhdGlvbihjKSAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZmFpbHVyZV9tb2RlX2RlcmVnaXN0cmF0aW9uKGMpICAgICAgICAgKHt9KQorCitpbnQgdWJpZnNfZGVidWdnaW5nX2luaXQoc3RydWN0IHViaWZzX2luZm8gKmMpOwordm9pZCB1Ymlmc19kZWJ1Z2dpbmdfZXhpdChzdHJ1Y3QgdWJpZnNfaW5mbyAqYyk7CisKKyNlbHNlIC8qICFDT05GSUdfVUJJRlNfRlNfREVCVUcgKi8KKworI2RlZmluZSBVQklGU19EQkcob3ApCisKKy8qIFVzZSAiaWYgKDApIiB0byBtYWtlIGNvbXBpbGVyIGNoZWNrIGFyZ3VtZW50cyBldmVuIGlmIGRlYnVnZ2luZyBpcyBvZmYgKi8KKyNkZWZpbmUgdWJpZnNfYXNzZXJ0KGV4cHIpICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJaWYgKDAgJiYgKGV4cHIpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCXByaW50ayhLRVJOX0NSSVQgIlVCSUZTIGFzc2VydCBmYWlsZWQgaW4gJXMgYXQgJXUgKHBpZCAlZClcbiIsIFwKKwkJICAgICAgIF9fZnVuY19fLCBfX0xJTkVfXywgMCk7ICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUgKDApCisKKyNkZWZpbmUgZGJnX2VycihmbXQsIC4uLikgICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJaWYgKDApICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCXViaWZzX2VycihmbXQsICMjX19WQV9BUkdTX18pOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUgKDApCisKKyNkZWZpbmUgZGJnX21zZyhmbXQsIC4uLikgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJaWYgKDApICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJCXByaW50ayhLRVJOX0RFQlVHICJVQklGUyBEQkcgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgICAgICAgIFwKKwkJICAgICAgIDAsIF9fZnVuY19fLCAjI19fVkFfQVJHU19fKTsgICAgICAgICAgICAgICAgIFwKK30gd2hpbGUgKDApCisKKyNkZWZpbmUgZGJnX2R1bXBfc3RhY2soKQorI2RlZmluZSB1Ymlmc19hc3NlcnRfY210X2xvY2tlZChjKQorCisjZGVmaW5lIGRiZ19nZW4oZm10LCAuLi4pICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19qbmwoZm10LCAuLi4pICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ190bmMoZm10LCAuLi4pICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19scChmbXQsIC4uLikgICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19maW5kKGZtdCwgLi4uKSAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19tbnQoZm10LCAuLi4pICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19pbyhmbXQsIC4uLikgICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19jbXQoZm10LCAuLi4pICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19idWRnKGZtdCwgLi4uKSAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19sb2coZm10LCAuLi4pICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19nYyhmbXQsIC4uLikgICAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19zY2FuKGZtdCwgLi4uKSAgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisjZGVmaW5lIGRiZ19yY3ZyeShmbXQsIC4uLikgZGJnX21zZyhmbXQsICMjX19WQV9BUkdTX18pCisKKyNkZWZpbmUgREJHS0VZKGtleSkgICgoY2hhciAqKShrZXkpKQorI2RlZmluZSBEQkdLRVkxKGtleSkgKChjaGFyICopKGtleSkpCisKKyNkZWZpbmUgdWJpZnNfZGVidWdnaW5nX2luaXQoYykgICAgICAgICAgICAgICAgMAorI2RlZmluZSB1Ymlmc19kZWJ1Z2dpbmdfZXhpdChjKSAgICAgICAgICAgICAgICAoe30pCisKKyNkZWZpbmUgZGJnX250eXBlKHR5cGUpICAgICAgICAgICAgICAgICAgICAgICAiIgorI2RlZmluZSBkYmdfY3N0YXRlKGNtdF9zdGF0ZSkgICAgICAgICAgICAgICAgICIiCisjZGVmaW5lIGRiZ19nZXRfa2V5X2R1bXAoYywga2V5KSAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF9pbm9kZShjLCBpbm9kZSkgICAgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfbm9kZShjLCBub2RlKSAgICAgICAgICAgICAgICAoe30pCisjZGVmaW5lIGRiZ19kdW1wX2J1ZGdldF9yZXEocmVxKSAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF9sc3RhdHMobHN0KSAgICAgICAgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfYnVkZyhjKSAgICAgICAgICAgICAgICAgICAgICAoe30pCisjZGVmaW5lIGRiZ19kdW1wX2xwcm9wKGMsIGxwKSAgICAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF9scHJvcHMoYykgICAgICAgICAgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfbHB0X2luZm8oYykgICAgICAgICAgICAgICAgICAoe30pCisjZGVmaW5lIGRiZ19kdW1wX2xlYihjLCBsbnVtKSAgICAgICAgICAgICAgICAgKHt9KQorI2RlZmluZSBkYmdfZHVtcF96bm9kZShjLCB6bm9kZSkgICAgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfaGVhcChjLCBoZWFwLCBjYXQpICAgICAgICAgICAoe30pCisjZGVmaW5lIGRiZ19kdW1wX3Bub2RlKGMsIHBub2RlLCBwYXJlbnQsIGlpcCkgKHt9KQorI2RlZmluZSBkYmdfZHVtcF90bmMoYykgICAgICAgICAgICAgICAgICAgICAgICh7fSkKKyNkZWZpbmUgZGJnX2R1bXBfaW5kZXgoYykgICAgICAgICAgICAgICAgICAgICAoe30pCisKKyNkZWZpbmUgZGJnX3dhbGtfaW5kZXgoYywgbGVhZl9jYiwgem5vZGVfY2IsIHByaXYpIDAKKyNkZWZpbmUgZGJnX29sZF9pbmRleF9jaGVja19pbml0KGMsIHpyb290KSAgICAgICAgIDAKKyNkZWZpbmUgZGJnX2NoZWNrX29sZF9pbmRleChjLCB6cm9vdCkgICAgICAgICAgICAgIDAKKyNkZWZpbmUgZG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lwZTogICAgICAgJWQiLCBjLT5rZXlfaGFzaF90eXBlKTsKKwlkYmdfbXNnKCJ0cmVlIGZhbm91dDogICAgICAgICAlZCIsIGMtPmZhbm91dCk7CisJZGJnX21zZygicmVzZXJ2ZWQgR0MgTEVCOiAgICAgJWQiLCBjLT5nY19sbnVtKTsKKwlkYmdfbXNnKCJmaXJzdCBtYWluIExFQjogICAgICAlZCIsIGMtPm1haW5fZmlyc3QpOworCWRiZ19tc2coIm1heC4gem5vZGUgc2l6ZSAgICAgICVkIiwgYy0+bWF4X3pub2RlX3N6KTsKKwlkYmdfbXNnKCJtYXguIGluZGV4IG5vZGUgc2l6ZSAlZCIsIGMtPm1heF9pZHhfbm9kZV9zeik7CisJZGJnX21zZygibm9kZSBzaXplczogICAgICAgICAgZGF0YSAlenUsIGlub2RlICV6dSwgZGVudHJ5ICV6dSIsCisJCVVCSUZTX0RBVEFfTk9ERV9TWiwgVUJJRlNfSU5PX05PREVfU1osIFVCSUZTX0RFTlRfTk9ERV9TWik7CisJZGJnX21zZygibm9kZSBzaXplczogICAgICAgICAgdHJ1biAlenUsIHNiICV6dSwgbWFzdGVyICV6dSIsCisJCVVCSUZTX1RSVU5fTk9ERV9TWiwgVUJJRlNfU0JfTk9ERV9TWiwgVUJJRlNfTVNUX05PREVfU1opOworCWRiZ19tc2coIm5vZGUgc2l6ZXM6ICAgICAgICAgIHJlZiAlenUsIGNtdC4gc3RhcnQgJXp1LCBvcnBoICV6dSIsCisJCVVCSUZTX1JFRl9OT0RFX1NaLCBVQklGU19DU19OT0RFX1NaLCBVQklGU19PUlBIX05PREVfU1opOworCWRiZ19tc2coIm1heC4gbm9kZSBzaXplczogICAgIGRhdGEgJXp1LCBpbm9kZSAlenUgZGVudHJ5ICV6dSIsCisJICAgICAgICBVQklGU19NQVhfREFUQV9OT0RFX1NaLCBVQklGU19NQVhfSU5PX05PREVfU1osCisJCVVCSUZTX01BWF9ERU5UX05PREVfU1opOworCWRiZ19tc2coImRlYWQgd2F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IoIlZGUyBwYWdlIGNhY2hlIHNpemUgaXMgJXUgYnl0ZXMsIGJ1dCBVQklGUyByZXF1aXJlcyIKKwkJCSAgIiBhdCBsZWFzdCA0MDk2IGJ5dGVzIiwKKwkJCSAgKHVuc2lnbmVkIGludClQQUdFX0NBQ0hFX1NJWkUpOworCQlyZXR1cm4gLUVJTlZBTDsKKwl9CisKKwllcnIgPSAtRU5PTUVNOworCisJZXJyID0gdWJpZnNfY29tcHJlc3NvcnNfaW5pdCgpOworCWlmIChlcnIpCisJCWdvdG8gb3V0X3Nocmlua2VyOworCisJcmV0dXJuIDA7CisKK291dF9zaHJpbmtlcjoKKwlyZXR1cm4gZXJyOworfQorCisvKgorICogdWJpZnNtb3VudC4uLgorICovCisKK3N0YXRpYyBzdHJ1Y3QgZmlsZV9zeXN0ZW1fdHlwZSB1Ymlmc19mc190eXBlID0geworCS5uYW1lICAgID0gInViaWZzIiwKKwkub3duZXIgICA9IFRISVNfTU9EVUxFLAorCS5nZXRfc2IgID0gdWJpZnNfZ2V0X3NiLAorfTsKKworaW50IHViaWZzX21vdW50KGNoYXIgKnZvbF9uYW1lKQoreworCWludCBmbGFnczsKKwljaGFyIG5hbWVbODBdID0gInViaToiOworCXZvaWQgKmRhdGE7CisJc3RydWN0IHZmc21vdW50ICptbnQ7CisJaW50IHJldDsKKwlzdHJ1Y3QgdWJpZnNfaW5mbyAqYzsKKworCS8qCisJICogRmlyc3QgdW5tb3VudCBpZiBhbGxyZWFkeSBtb3VudGVkCisJICovCisJaWYgKHViaWZzX3NiKQorCQl1Ymlmc191bW91bnQodWJpZnNfc2ItPnNfZnNfaW5mbyk7CisKKwlJTklUX0xJU1RfSEVBRCgmdWJpZnNfaW5mb3MpOworCisJLyoKKwkgKiBNb3VudCBpbiByZWFkLW9ubHkgbW9kZQorCSAqLworCWZsYWdzID0gTVNfUkRPTkxZOworCXN0cmNhdChuYW1lLCB2b2xfbmFtZSk7CisJZGF0YSA9IE5VTEw7CisJbW50ID0gTlV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dGl2ZSBlcnJvciBjb2RlIGluIGNhc2Ugb2YgZmFpbHVyZS4KKyAqLworc3RhdGljIGludCBkb19sb29rdXBfbm0oc3RydWN0IHViaWZzX2luZm8gKmMsIGNvbnN0IHVuaW9uIHViaWZzX2tleSAqa2V5LAorCQkJdm9pZCAqbm9kZSwgY29uc3Qgc3RydWN0IHFzdHIgKm5tKQoreworCWludCBmb3VuZCwgbiwgZXJyOworCXN0cnVjdCB1Ymlmc196bm9kZSAqem5vZGU7CisKKwlkYmdfdG5jKCJuYW1lICclLipzJyBrZXkgJXMiLCBubS0+bGVuLCBubS0+bmFtZSwgREJHS0VZKGtleSkpOworCW11dGV4X2xvY2soJmMtPnRuY19tdXRleCk7CisJZm91bmQgPSB1Ymlmc19sb29rdXBfbGV2ZWwwKGMsIGtleSwgJnpub2RlLCAmbik7CisJaWYgKCFmb3VuZCkgeworCQllcnIgPSAtRU5PRU5UOworCQlnb3RvIG91dF91bmxvY2s7CisJfSBlbHNlIGlmIChmb3VuZCA8IDApIHsKKwkJZXJyID0gZm91bmQ7CisJCWdvdG8gb3V0X3VubG9jazsKKwl9CisKKwl1Ymlmc19hc3NlcnQobiA+PSAwKTsKKworCWVyciA9IHJlc29sdmVfY29sbGlzaW9uKGMsIGtleSwgJnpub2RlLCAmbiwgbm0pOworCWRiZ190bmMoInJjIHJldHVybmVkICVkLCB6bm9kZSAlcCwgbiAlZCIsIGVyciwgem5vZGUsIG4pOworCWlmICh1bmxpa2VseShlcnIgPCAwKSkKKwkJZ290byBvdXRfdW5sb2NrOworCWlmIChlcnIgPT0gMCkgeworCQllcnIgPSAtRU5PRU5UOworCQlnb3RvIG91dF91bmxvY2s7CisJfQorCisJZXJyID0gdG5jX3JlYWRfbm9kZV9ubShjLCAmem5vZGUtPnpicmFuY2hbbl0sIG5vZGUpOworCitvdXRfdW5sb2NrOgorCW11dGV4X3VubG9jaygmYy0+dG5jX211dGV4KTsKKwlyZXR1cm4gZXJyOworfQorCisvKioKKyAqIHViaW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0aWVkICovCisJCWlmICh6bm9kZS0+Y25leHQgfHwgIXViaWZzX3puX2RpcnR5KHpub2RlKSkgeworCQkJem5vZGUgPSBkaXJ0eV9jb3dfYm90dG9tX3VwKGMsIHpub2RlKTsKKwkJCWlmIChJU19FUlIoem5vZGUpKSB7CisJCQkJZXJyID0gUFRSX0VSUih6bm9kZSk7CisJCQkJZ290byBvdXRfdW5sb2NrOworCQkJfQorCQl9CisKKwkJaWYgKGZvdW5kID09IDEpIHsKKwkJCXN0cnVjdCB1Ymlmc196YnJhbmNoICp6YnIgPSAmem5vZGUtPnpicmFuY2hbbl07CisKKwkJCWxuY19mcmVlKHpicik7CisJCQllcnIgPSB1Ymlmc19hZGRfZGlydChjLCB6YnItPmxudW0sIHpici0+bGVuKTsKKwkJCXpici0+bG51bSA9IGxudW07CisJCQl6YnItPm9mZnMgPSBvZmZzOworCQkJemJyLT5sZW4gPSBsZW47CisJCQlnb3RvIG91dF91bmxvY2s7CisJCX0KKwl9CisKKwlpZiAoIWZvdW5kKSB7CisJCXN0cnVjdCB1Ymlmc196YnJhbmNoIHpicjsKKworCQl6YnIuem5vZGUgPSBOVUxMOworCQl6YnIubG51bSA9IGxudW07CisJCXpici5vZmZzID0gb2ZmczsKKwkJemJyLmxlbiA9IGxlbjsKKwkJa2V5X2NvcHkoYywga2V5LCAmemJyLmtleSk7CisJCWVyciA9IHRuY19pbnNlcnQoYywgem5vZGUsICZ6YnIsIG4gKyAxKTsKKwkJaWYgKGVycikKKwkJCWdvdG8gb3V0X3VubG9jazsKKwkJaWYgKGMtPnJlcGxheWluZykgeworCQkJLyoKKwkJCSAqIFdlIGRpZCBub3QgZmluZCBpdCBpbiB0aGUgaW5kZXggc28gdGhlcmUgbWF5IGJlIGEKKwkJCSAqIGRhbmdsaW5nIGJyYW5jaCBzdGlsbCBpbiB0aGUgaW5kZXguIFNvIHdlIHJlbW92ZSBpdAorCQkJICogYnkgcGFzc2luZyAndWJpZnNfdG5jX3JlbW92ZV9ubSgp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isJaW50IGksIGVycjsKKworCS8qIERlbGV0ZSB3aXRob3V0IG1lcmdlIGZvciBub3cgKi8KKwl1Ymlmc19hc3NlcnQoem5vZGUtPmxldmVsID09IDApOworCXViaWZzX2Fzc2VydChuID49IDAgJiYgbiA8IGMtPmZhbm91dCk7CisJZGJnX3RuYygiZGVsZXRpbmcgJXMiLCBEQkdLRVkoJnpub2RlLT56YnJhbmNoW25dLmtleSkpOworCisJemJyID0gJnpub2RlLT56YnJhbmNoW25dOworCWxuY19mcmVlKHpicik7CisKKwllcnIgPSB1Ymlmc19hZGRfZGlydChjLCB6YnItPmxudW0sIHpici0+bGVuKTsKKwlpZiAoZXJyKSB7CisJCWRiZ19kdW1wX3pub2RlKGMsIHpub2RlKTsKKwkJcmV0dXJuIGVycjsKKwl9CisKKwkvKiBXZSBkbyBub3QgImdhcCIgemJyYW5jaCBzbG90cyAqLworCWZvciAoaSA9IG47IGkgPCB6bm9kZS0+Y2hpbGRfY250IC0gMTsgaSsrKQorCQl6bm9kZS0+emJyYW5jaFtpXSA9IHpub2RlLT56YnJhbmNoW2kgKyAxXTsKKwl6bm9kZS0+Y2hpbGRfY250IC09IDE7CisKKwlpZiAoem5vZGUtPmNoaWxkX2NudCA+IDApCisJCXJldHVybiAwOworCisJLyoKKwkgKiBUaGlzIHdhcyB0aGUgbGFzdCB6YnJhbmNoLCB3ZSBoYXZlIHRvIGRlbGV0ZSB0aGlzIHpub2RlIGZyb20gdGhlCisJICogcGFyZW50LgorCSAqLworCisJZG8geworCQl1Ymlmc19hc3NlcnQoIXRlc3RfYml0KE9CU09MRVRFX1pOT0RFLCAmem5vZGUtPmZsYWdzKSk7CisJCXViaWZzX2Fzc2VydCh1Ymlmc196bl9kaXJ0eSh6bm9kZSkpOworCisJCXpwID0gem5vZGUtPnBhcmVudDsKKwkJbiA9IHpub2RlLT5paXA7CisKKwkJYXRvbWljX2xvbmdfZGVjKCZjLT5kaXJ0eV96bl9jbnQpOworCisJCWVyciA9IGluc2VydF9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sKKwkJCWlmIChJU19FUlIoem5vZGUpKQorCQkJCXJldHVybiBQVFJfRVJSKHpub2RlKTsKKwkJCXpub2RlID0gZGlydHlfY293X3pub2RlKGMsIHpicik7CisJCQlpZiAoSVNfRVJSKHpub2RlKSkKKwkJCQlyZXR1cm4gUFRSX0VSUih6bm9kZSk7CisJCQl6bm9kZS0+cGFyZW50ID0gTlVMTDsKKwkJCXpub2RlLT5paXAgPSAwOworCQkJaWYgKGMtPnpyb290LmxlbikgeworCQkJCWVyciA9IGluc2VydF9vbGRfaWR4KGMsIGMtPnpyb290LmxudW0sCisJCQkJCQkgICAgIGMtPnpyb290Lm9mZnMpOworCQkJCWlmIChlcnIpCisJCQkJCXJldHVybiBlcnI7CisJCQl9CisJCQljLT56cm9vdC5sbnVtID0gemJyLT5sbnVtOworCQkJYy0+enJvb3Qub2ZmcyA9IHpici0+b2ZmczsKKwkJCWMtPnpyb290LmxlbiA9IHpici0+bGVuOworCQkJYy0+enJvb3Quem5vZGUgPSB6bm9kZTsKKwkJCXViaWZzX2Fzc2VydCghdGVzdF9iaXQoT0JTT0xFVEVfWk5PREUsCisJCQkJICAgICAmenAtPmZsYWdzKSk7CisJCQl1Ymlmc19hc3NlcnQodGVzdF9iaXQoRElSVFlfWk5PREUsICZ6cC0+ZmxhZ3MpKTsKKwkJCWF0b21pY19sb25nX2RlYygmYy0+ZGlydHlfem5fY250KTsKKworCQkJaWYgKHpwLT5jbmV4dCkgeworCQkJCV9fc2V0X2JpdChPQlNPTEVURV9aTk9ERSwgJnpwLT5mbGFncyk7CisJCQkJYXRvbWljX2xvbmdfaW5jKCZjLT5jbGVhbl96bl9jbnQpOworCQkJCWF0b21pY19sb25nX2luYygmdWJpZnNfY2xlYW5fem5fY250KTsKKwkJCX0gZWxzZQorCQkJCWtmcmVlKHpwKTsKKwkJfQorCX0KKworCXJldHVybiAwOworfQorCisvKioKKyAqIHViaWZzX3RuY19yZW1vdmUgLSByZW1vdmUgYW4gaW5kZXggZW50cnkg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iBrZXkgZG9lcyBub3QgZXhpc3QgaW4gdGhlIFROQworCQkJICogdHJlZSBhbmQgQHpub2RlL0BuIHZhcmlhYmxlcyBjb250YWluIHRoZSBjbG9zZXN0CisJCQkgKiAicHJlY2VkaW5nIiBlbGVtZW50LiBTd2l0Y2ggdG8gdGhlIG5leHQgb25lLgorCQkJICovCisJCQllcnIgPSB0bmNfbmV4dChjLCAmem5vZGUsICZuKTsKKwkJCWlmIChlcnIpCisJCQkJZ290byBvdXRfdW5sb2NrOworCQl9CisJfQorCisJemJyID0gJnpub2RlLT56YnJhbmNoW25dOworCWRlbnQgPSBrbWFsbG9jKHpici0+bGVuLCBHRlBfTk9GUyk7CisJaWYgKHVubGlrZWx5KCFkZW50KSkgeworCQllcnIgPSAtRU5PTUVNOworCQlnb3RvIG91dF91bmxvY2s7CisJfQorCisJLyoKKwkgKiBUaGUgYWJvdmUgJ3RuY19uZXh0KCknIGNhbGwgY291bGQgbGVhZCB1cyB0byB0aGUgbmV4dCBpbm9kZSwgY2hlY2sKKwkgKiB0aGlzLgorCSAqLworCWRrZXkgPSAmemJyLT5rZXk7CisJaWYgKGtleV9pbnVtKGMsIGRrZXkpICE9IGtleV9pbnVtKGMsIGtleSkgfHwKKwkgICAga2V5X3R5cGUoYywgZGtleSkgIT0gdHlwZSkgeworCQllcnIgPSAtRU5PRU5UOworCQlnb3RvIG91dF9mcmVlOworCX0KKworCWVyciA9IHRuY19yZWFkX25vZGVfbm0oYywgemJyLCBkZW50KTsKKwlpZiAodW5saWtlbHkoZXJyKSkKKwkJZ290byBvdXRfZnJlZTsKKworCW11dGV4X3VubG9jaygmYy0+dG5jX211dGV4KTsKKwlyZXR1cm4gZGVudDsKKworb3V0X2ZyZWU6CisJa2ZyZWUoZGVudCk7CitvdXRfdW5sb2NrOgorCW11dGV4X3VubG9jaygmYy0+dG5jX211dGV4KTsKKwlyZXR1cm4gRVJSX1BUUihlcnIpOworfQpkaWZmIC0tZ2l0IGEvZnMvdWJpZnMvdG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ymlmc19hc3NlcnQoY250ID09IGF0b21pY19sb25nX3JlYWQoJmMtPmRpcnR5X3puX2NudCkpOworCXJldHVybiBjbnQ7Cit9CisKKy8qKgorICogYWxsb2NfaWR4X2xlYnMgLSBhbGxvY2F0ZSBlbXB0eSBMRUJzIHRvIGJlIHVzZWQgdG8gY29tbWl0LgorICogQGM6IFVCSUZTIGZpbGUtc3lzdGVtIGRlc2NyaXB0aW9uIG9iamVjdAorICogQGNudDogbnVtYmVyIG9mIHpub2RlcyB0byBjb21taXQKKyAqCisgKiBUaGlzIGZ1bmN0aW9uIHJldHVybnMgJS1FTk9TUEMgaWYgaXQgY2Fubm90IGFsbG9jYXRlIGEgc3VmZmljaWVudCBudW1iZXIgb2YKKyAqIGVtcHR5IExFQnMuICAlMCBpcyByZXR1cm5lZCBvbiBzdWNjZXNzLCBvdGhlcndpc2UgYSBuZWdhdGl2ZSBlcnJvciBjb2RlCisgKiBpcyByZXR1cm5lZC4KKyAqLworc3RhdGljIGludCBhbGxvY19pZHhfbGVicyhzdHJ1Y3QgdWJpZnNfaW5mbyAqYywgaW50IGNudCkKK3sKKwlpbnQgaSwgbGViX2NudCwgbG51bTsKKworCWMtPmlsZWJfY250ID0gMDsKKwljLT5pbGViX254dCA9IDA7CisJbGViX2NudCA9IGdldF9sZWJfY250KGMsIGNudCk7CisJZGJnX2NtdCgibmVlZCBhYm91dCAlZCBlbXB0eSBMRUJTIGZvciBUTkMgY29tbWl0IiwgbGViX2NudCk7CisJaWYgKCFsZWJfY250KQorCQlyZXR1cm4gMDsKKwljLT5pbGVicyA9IGttYWxsb2MobGViX2NudCAqIHNpemVvZihpbnQpLCBHRlBfTk9GUyk7CisJaWYgKCFjLT5pbGVicykKKwkJcmV0dXJuIC1FTk9NRU07CisJZm9yIChpID0gMDsgaSA8IGxlYl9jbnQ7IGkrKykgeworCQlsbnVtID0gdWJpZnNfZmluZF9mcmVlX2xlYl9mb3JfaWR4KGMpOworCQlpZiAobG51bSA8IDApCisJCQly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WJpZnNfY29tcHJlc3NvciAqY29tcHI7CisKKwlpZiAodW5saWtlbHkoY29tcHJfdHlwZSA8IDAgfHwgY29tcHJfdHlwZSA+PSBVQklGU19DT01QUl9UWVBFU19DTlQpKSB7CisJCXViaWZzX2VycigiaW52YWxpZCBjb21wcmVzc2lvbiB0eXBlICVkIiwgY29tcHJfdHlwZSk7CisJCXJldHVybiAtRUlOVkFMOworCX0KKworCWNvbXByID0gdWJpZnNfY29tcHJlc3NvcnNbY29tcHJfdHlwZV07CisKKwlpZiAodW5saWtlbHkoIWNvbXByLT5jYXBpX25hbWUpKSB7CisJCXViaWZzX2VycigiJXMgY29tcHJlc3Npb24gaXMgbm90IGNvbXBpbGVkIGluIiwgY29tcHItPm5hbWUpOworCQlyZXR1cm4gLUVJTlZBTDsKKwl9CisKKwlpZiAoY29tcHJfdHlwZSA9PSBVQklGU19DT01QUl9OT05FKSB7CisJCW1lbWNweShvdXRfYnVmLCBpbl9idWYsIGluX2xlbik7CisJCSpvdXRfbGVuID0gaW5fbGVuOworCQlyZXR1cm4gMDsKKwl9CisKKwllcnIgPSBjb21wci0+ZGVjb21wcmVzcyhpbl9idWYsIGluX2xlbiwgb3V0X2J1ZiwgKHNpemVfdCAqKW91dF9sZW4pOworCWlmIChlcnIpCisJCXViaWZzX2VycigiY2Fubm90IGRlY29tcHJlc3MgJWQgYnl0ZXMsIGNvbXByZXNzb3IgJXMsICIKKwkJCSAgImVycm9yICVkIiwgaW5fbGVuLCBjb21wci0+bmFtZSwgZXJyKTsKKworCXJldHVybiBlcnI7Cit9CisKKy8qKgorICogY29tcHJfaW5pdCAtIGluaXRpYWxpemUgYSBjb21wcmVzc29yLgorICogQGNvbXByOiBjb21wcmVzc29yIGRlc2NyaXB0aW9uIG9iamVjdAorICoKKyAqIFRoaXMgZnVuY3Rpb24gaW5pdGlhbGl6ZXMgdGhlIHJlcXVlc3RlZCBjb21wcmVzc29yIGFuZCByZXR1cm5zIHplcm8gaW4gY2FzZQorICogb2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worLyogZGVidWcuYyAqLworCisjZGVmaW5lIERFRklORV9TUElOTE9DSyguLi4pCisjZGVmaW5lIG1vZHVsZV9wYXJhbV9uYW1lZCguLi4pCisKKy8qIG1pc2MuaCAqLworI2RlZmluZSBtdXRleF9sb2NrX25lc3RlZCguLi4pCisjZGVmaW5lIG11dGV4X3VubG9ja19uZXN0ZWQoLi4uKQorI2RlZmluZSBtdXRleF9pc19sb2NrZWQoLi4uKQkwCisKKy8qIFZlcnNpb24gb2YgdGhpcyBVQklGUyBpbXBsZW1lbnRhdGlvbiAqLworI2RlZmluZSBVQklGU19WRVJTSU9OIDEKKworLyogTm9ybWFsIFVCSUZTIG1lc3NhZ2VzICovCisjZGVmaW5lIHViaWZzX21zZyhmbXQsIC4uLikgXAorCQlwcmludGsoS0VSTl9OT1RJQ0UgIlVCSUZTOiAiIGZtdCAiXG4iLCAjI19fVkFfQVJHU19fKQorLyogVUJJRlMgZXJyb3IgbWVzc2FnZXMgKi8KKyNkZWZpbmUgdWJpZnNfZXJyKGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByaW50ayhLRVJOX0VSUiAiVUJJRlMgZXJyb3IgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAwLCBcCisJICAgICAgIF9fZnVuY19fLCAjI19fVkFfQVJHU19fKQorLyogVUJJRlMgd2FybmluZyBtZXNzYWdlcyAqLworI2RlZmluZSB1Ymlmc193YXJuKGZtdCwgLi4uKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByaW50ayhLRVJOX1dBUk5JTkcgIlVCSUZTIHdhcm5pbmcgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCBcCisJICAgICAgIDAsIF9fZnVuY19fLCAjI19fVkFfQVJHU19fKQorCisvKiBVQklGUyBmaWxlIHN5c3RlbSBWRlMgbWFnaWMgbnVtYmVyICovCisjZGVmaW5lIFVCSUZT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KHgpIFwKKwlhc20oIi5nbG9ibCBpcnFfIiN4IlxuIiBcCisJCSAgICAiaXJxXyIjeCI6XG4iIFwKKwkJICAgICJwdXNoYSBcbiIgXAorCQkgICAgInB1c2hsICQiI3giXG4iIFwKKwkJICAgICJwdXNobCAkaXJxX3JldHVyblxuIiBcCisJCSAgICAiam1wICAgZG9faXJxXG4iKTsgXAorCV9faXNyX18gaXJxXyMjeCh2b2lkKQorCisjZGVmaW5lIERFQ0xBUkVfRVhDRVBUSU9OKHgsIGYpIFwKKwlhc20oIi5nbG9ibCBleHBfIiN4IlxuIiBcCisJCSAgICAiZXhwXyIjeCI6XG4iIFwKKwkJICAgICJwdXNoYSBcbiIgXAorCQkgICAgIm1vdmwgICAgICVlc3AsICVlYnhcbiIgXAorCQkgICAgIm1vdmwgICAgICRleGNlcHRpb25fc3RhY2ssICVlYXhcbiIgXAorCQkgICAgIm1vdmwgICAgICVlYXgsICVlc3AgXG4iIFwKKwkJICAgICJwdXNobCAgICAlZWJ4XG4iIFwKKwkJICAgICJtb3ZsICAgICAzMiglZXNwKSwgJWVieFxuIiBcCisJCSAgICAieG9ybCAgICAgJWVkeCwgJWVkeFxuIiBcCisJCSAgICAibW92dyAgICAgMzYoJWVzcCksICVkeFxuIiBcCisJCSAgICAicHVzaGwgICAgJWVkeFxuIiBcCisJCSAgICAicHVzaGwgICAgJWVieFxuIiBcCisJCSAgICAicHVzaGwgICAgJCIjeCJcbiIgXAorCQkgICAgInB1c2hsICAgICRleHBfcmV0dXJuXG4iIFwKKwkJICAgICJqbXAgICAgICAiI2YiXG4iKTsgXAorCV9faXNyX18gZXhwXyMjeCh2b2lkKQogCiAjZW5kaWYKZGlmZiAtLWdpdCBhL2luY2x1ZGUvYXNtLWkzODYvdS1ib290LWkzODYuaCBiL2luY2x1ZGUvYXNtLWkzODYvdS1ib290LWkzODYuaAppbmRleCAxMmQxMGE3Li4zOTIxZTAxIDEwMDY0NAotLS0gYS9pbmNsdWRlL2FzbS1pMzg2L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J3MgdG8gcmVzZXQgY3B1ICovCi0jdW5kZWYgIENPTkZJR19TWVNfVElNRVJfU0M1MjAgICAgICAgICAgICAgICAgIC8qIHVzZSBTQzUyMCBzd3RpbWVycyAqLwotI2RlZmluZSBDT05GSUdfU1lTX1RJTUVSX0dFTkVSSUMgICAgICAgMSAgICAgICAvKiB1c2UgdGhlIGk4MjU0IFBJVCB0aW1lcnMgKi8KLSN1bmRlZiAgQ09ORklHX1NZU19USU1FUl9UU0MgICAgICAgICAgICAgICAgICAgLyogdXNlIHRoZSBQZW50aXVtIFRTQyB0aW1lcnMgKi8KKyN1bmRlZiAgQ09ORklHX1NZU19TQzUyMF9SRVNFVCAgICAgICAgICAgICAgICAgLyogdXNlIFNDNTIwIE1NQ1IncyB0byByZXNldCBjcHUgKi8KKyN1bmRlZiAgQ09ORklHX1NZU19TQzUyMF9USU1FUiAgICAgICAgICAgICAgICAgLyogdXNlIFNDNTIwIHN3dGltZXJzICovCisjZGVmaW5lIENPTkZJR19TWVNfR0VORVJJQ19USU1FUiAgICAgICAxICAgICAgIC8qIHVzZSB0aGUgaTgyNTQgUElUIHRpbWVycyAqLworI3VuZGVmICBDT05GSUdfU1lTX1RTQ19USU1FUiAgICAgICAgICAgICAgICAgICAvKiB1c2UgdGhlIFBlbnRpdW0gVFNDIHRpbWVycyAqLworI2RlZmluZSBDT05GSUdfU1lTX1BDQVRfSU5URVJSVVBUUworI2RlZmluZSBDT05GSUdfU1lTX05VTV9JUlFTCQkxNgogCiAjZGVmaW5lIENPTkZJR19TWVNfU1RBQ0tfU0laRSAgICAgICAgICAweDgwMDAgIC8qIFNpemUgb2YgYm9vdGxvYWRlciBzdGFjayAqLwogCkBAIC0xNzMsNyArMTc3LDcgQEAKICAqCiAgKi8KIC8qIE5vIGNvbW1hbmQgbGluZSwgb25lIHN0YXRpYyBwYXJ0aXRpb24sIHdob2xlIGRldmljZSAqLwotI3VuZGVmIENPTkZJR19KRkZTMl9DTURMSU5FCisjdW5kZWYgQ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5hbGlnbmVkX2JlNjQoY29uc3Qgdm9pZCAqcCkKK3sKKwlyZXR1cm4gYmU2NF90b19jcHVwKChfX2JlNjQgKilwKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHB1dF91bmFsaWduZWRfbGUxNih1MTYgdmFsLCB2b2lkICpwKQoreworCSooKF9fbGUxNiAqKXApID0gY3B1X3RvX2xlMTYodmFsKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHB1dF91bmFsaWduZWRfbGUzMih1MzIgdmFsLCB2b2lkICpwKQoreworCSooKF9fbGUzMiAqKXApID0gY3B1X3RvX2xlMzIodmFsKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHB1dF91bmFsaWduZWRfbGU2NCh1NjQgdmFsLCB2b2lkICpwKQoreworCSooKF9fbGU2NCAqKXApID0gY3B1X3RvX2xlNjQodmFsKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHB1dF91bmFsaWduZWRfYmUxNih1MTYgdmFsLCB2b2lkICpwKQoreworCSooKF9fYmUxNiAqKXApID0gY3B1X3RvX2JlMTYodmFsKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHB1dF91bmFsaWduZWRfYmUzMih1MzIgdmFsLCB2b2lkICpwKQoreworCSooKF9fYmUzMiAqKXApID0gY3B1X3RvX2JlMzIodmFsKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIHB1dF91bmFsaWduZWRfYmU2NCh1NjQgdmFsLCB2b2lkICpwKQoreworCSooKF9fYmU2NCAqKXApID0gY3B1X3RvX2JlNjQodmFsKTsKK30KKworI2VuZGlmIC8qIF9MSU5VWF9VTkFMSUdORURfQUNDRVNTX09LX0ggKi8KZGlmZiAtLWdpdCBhL2luY2x1ZGUvbGludXgvdW5hbGlnbmVkL2dlbmVyaWMuaCBiL2luY2x1ZGUvbGludXgvdW5hbGlnbmVkL2dlbmVyaWMuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5jYzY4OGUxCi0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wkJZW5hYmxlX2ludGVycnVwdHMoKTsKKworCXJldHVybjsKK30KKwordm9pZCBpcnFfZnJlZV9oYW5kbGVyKGludCBpcnEpCit7CisJaW50IHN0YXR1czsKKworCWlmIChpcnEgPCAwIHx8IGlycSA+PSBDT05GSUdfU1lTX05VTV9JUlFTKSB7CisJCXByaW50ZigiaXJxX2ZyZWVfaGFuZGxlcjogYmFkIGlycSBudW1iZXIgJWRcbiIsIGlycSk7CisJCXJldHVybjsKKwl9CisKKwlzdGF0dXMgPSBkaXNhYmxlX2ludGVycnVwdHMgKCk7CisKKwltYXNrX2lycShpcnEpOworCisJaXJxX2hhbmRsZXJzW2lycV0uaGFuZGxlciA9IE5VTEw7CisJaXJxX2hhbmRsZXJzW2lycV0uYXJnID0gTlVMTDsKKworCWlmIChzdGF0dXMpCisJCWVuYWJsZV9pbnRlcnJ1cHRzKCk7CisKKwlyZXR1cm47Cit9CisKK19faXNyX18gZG9faXJxKGludCBpcnEpCit7CisJaWYgKGlycSA8IDAgfHwgaXJxID49IENPTkZJR19TWVNfTlVNX0lSUVMpIHsKKwkJcHJpbnRmKCJkb19pcnE6IGJhZCBpcnEgbnVtYmVyICVkXG4iLCBpcnEpOworCQlyZXR1cm47CisJfQorCisJaWYgKGlycV9oYW5kbGVyc1tpcnFdLmhhbmRsZXIpIHsKKwkJbWFza19pcnEoaXJxKTsKKworCQlpcnFfaGFuZGxlcnNbaXJxXS5oYW5kbGVyKGlycV9oYW5kbGVyc1tpcnFdLmFyZyk7CisJCWlycV9oYW5kbGVyc1tpcnFdLmNvdW50Kys7CisKKwkJdW5tYXNrX2lycShpcnEpOworCQlzcGVjaWZpY19lb2koaXJxKTsKKworCX0gZWxzZSB7CisJCWlmICgoaXJxICYgNykgIT0gNykgeworCQkJc3B1cmlvdXNfaXJxX2NudCsrOworCQkJc3B1cmlvdXNfaXJxID0gaXJxOworCQl9CisJfQorfQorCisjaWYgZGVmaW5lZChDT05GSUdfQ01EX0lSUSkKK2ludCBkb19p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gJiAweGZmLCBQSVRfQkFTRSArIFBJVF9UMik7CisJb3V0YiAoVElNRVIyX1ZBTFVFID4+IDgsIFBJVF9CQVNFICsgUElUX1QyKTsKKworCWlycV9pbnN0YWxsX2hhbmRsZXIgKDAsIHRpbWVyX2lzciwgTlVMTCk7CisJdW5tYXNrX2lycSAoMCk7CisKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIHUxNiByZWFkX3BpdCh2b2lkKQoreworCXU4IGxvdzsKKworCW91dGIgKFBJVF9DTURfTEFUQ0gsIFBJVF9CQVNFICsgUElUX0NPTU1BTkQpOworCWxvdyA9IGluYiAoUElUX0JBU0UgKyBQSVRfVDApOworCisJcmV0dXJuICgoaW5iIChQSVRfQkFTRSArIFBJVF9UMCkgPDwgOCkgfCBsb3cpOworfQorCisvKiB0aGlzIGlzIG5vdCB2ZXJ5IGV4YWN0ICovCit2b2lkIHVkZWxheSAodW5zaWduZWQgbG9uZyB1c2VjKQoreworCWludCBjb3VudGVyOworCWludCB3cmFwczsKKworCWlmICh0aW1lcl9pbml0X2RvbmUpCisJeworCQljb3VudGVyID0gcmVhZF9waXQgKCk7CisJCXdyYXBzID0gdXNlYyAvIDEwMDA7CisJCXVzZWMgPSB1c2VjICUgMTAwMDsKKworCQl1c2VjICo9IDExOTQ7CisJCXVzZWMgLz0gMTAwMDsKKwkJdXNlYyArPSBjb3VudGVyOworCisJCXdoaWxlICh1c2VjID4gMTE5NCkgeworCQkJdXNlYyAtPSAxMTk0OworCQkJd3JhcHMrKzsKKwkJfQorCisJCXdoaWxlICgxKSB7CisJCQlpbnQgbmV3X2NvdW50ID0gcmVhZF9waXQgKCk7CisKKwkJCWlmICgoKG5ld19jb3VudCA8IHVzZWMpICYmICF3cmFwcykgfHwgd3JhcHMgPCAwKQorCQkJCWJyZWFrOworCisJCQlpZiAobmV3X2NvdW50ID4gY291bnRlcikKKwkJCQl3cmFwcy0tOworCisJCQljb3VudGVyID0gbmV3X2NvdW50OworCQl9CisJfQorCit9CmR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