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tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KKyAqLwordm9pZCBmbGFzaF9wcmludF9pbmZvICAoZmxhc2hfaW5mb190ICppbmZvKQoreworICAgIGludCBpOworCisgICAgc3dpdGNoIChpbmZvLT5mbGFzaF9pZCAmIEZMQVNIX1ZFTkRNQVNLKQorICAgIHsKKyAgICBjYXNlIChBVE1fTUFOVUZBQ1QgJiBGTEFTSF9WRU5ETUFTSyk6CisJcHJpbnRmKCJBdG1lbDogIik7CisJYnJlYWs7CisgICAgZGVmYXVsdDoKKwlwcmludGYoIlVua25vd24gVmVuZG9yICIpOworCWJyZWFrOworICAgIH0KKworICAgIHN3aXRjaCAoaW5mby0+Zmxhc2hfaWQgJiBGTEFTSF9UWVBFTUFTSykKKyAgICB7CisgICAgY2FzZSAoQVRNX0lEX0JWMTYxNCAmIEZMQVNIX1RZUEVNQVNLKToKKwlwcmludGYoIkFUNDlCVjE2MTQgKDE2TWJpdClcbiIpOworCWJyZWFrOworICAgIGRlZmF1bHQ6CisJcHJpbnRmKCJVbmtub3duIENoaXAgVHlwZVxuIik7CisJZ290byBEb25lOworCWJyZWFrOworICAgIH0KKworICAgIHByaW50ZigiICBTaXplOiAlbGQgTUIgaW4gJWQgU2VjdG9yc1xuIiwKKwkgICBpbmZvLT5zaXplID4+IDIwLCBpbmZvLT5zZWN0b3JfY291bnQpOworCisgICAgcHJpbnRmKCIgIFNlY3RvciBTdGFydCBBZGRyZXNzZXM6Iik7CisgICAgZm9yIChpID0gMDsgaSA8IGluZm8tPnNlY3Rvcl9jb3VudDsgaSsrKQorICAgIHsKKwlpZiAoKGkgJSA1KSA9PSAwKQorCXsKKwkgICAgcHJpbnRmICgiXG4gICAiKTsKKwl9CisJcHJpbnRmICgiICUwOGxYJXMiLCBpbmZvLT5zdGFydFtpXSwKKwkJaW5mby0+cHJvdGVjdFtpXSA/ICIgKFJPKSIgOiAiICAgICAiKTsKKyAgICB9Cisg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PSBDTURfRVJBU0VfQ09ORklSTTsKKworCSAgICAvKiB3YWl0IHVudGlsIGZsYXNoIGlzIHJlYWR5ICovCisJICAgIGNoaXAxID0gMDsKKworCSAgICBkbworCSAgICB7CisJCXJlc3VsdCA9ICphZGRyOworCisJCS8qIGNoZWNrIHRpbWVvdXQgKi8KKwkJaWYgKGdldF90aW1lcl9tYXNrZWQoKSA+IENGR19GTEFTSF9FUkFTRV9UT1VUKQorCQl7CisJCSAgICBNRU1fRkxBU0hfQUREUjEgPSBDTURfUkVBRF9BUlJBWTsKKwkJICAgIGNoaXAxID0gVE1POworCQkgICAgYnJlYWs7CisJCX0KKworCQlpZiAoIWNoaXAxICYmIChyZXN1bHQgJiAweEZGRkYpICYgQklUX0VSQVNFX0RPTkUpCisJCQljaGlwMSA9IFJFQURZOworCisJICAgIH0gIHdoaWxlICghY2hpcDEpOworCisJICAgIE1FTV9GTEFTSF9BRERSMSA9IENNRF9SRUFEX0FSUkFZOworCisJICAgIGlmIChjaGlwMSA9PSBFUlIpCisJICAgIHsKKwkJcmMgPSBFUlJfUFJPR19FUlJPUjsKKwkJZ290byBvdXRhaGVyZTsKKwkgICAgfQorCSAgICBpZiAoY2hpcDEgPT0gVE1PKQorCSAgICB7CisJCXJjID0gRVJSX1RJTU9VVDsKKwkJZ290byBvdXRhaGVyZTsKKwkgICAgfQorCisJICAgIHByaW50Zigib2suXG4iKTsKKwl9CisJZWxzZSAvKiBpdCB3YXMgcHJvdGVjdGVkICovCisJeworCSAgICBwcmludGYoInByb3RlY3RlZCFcbiIpOworCX0KKyAgICB9CisKKyAgICBpZiAoY3RybGMoKSkKKyAgICAgIHByaW50ZigiVXNlciBJbnRlcnJ1cHQhXG4iKTsKKworb3V0YWhlcmU6CisgICAgLyogYWxsb3cgZmxhc2ggdG8gc2V0dGxlIC0gd2FpdCAxMCBtcyAqLworICAgIHVkZWxheV9tYXNrZWQoMTAwMDApOworCisgICAgaWYgKGlmbGFnKQorICAgICAgZW5hYmxlX2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0YXR1cygpOworICAgIGljYWNoZV9kaXNhYmxlKCk7CisgICAgaWZsYWcgPSBkaXNhYmxlX2ludGVycnVwdHMoKTsKKworICAgIE1FTV9GTEFTSF9BRERSMSA9IENNRF9VTkxPQ0sxOworICAgIE1FTV9GTEFTSF9BRERSMiA9IENNRF9VTkxPQ0syOworICAgIE1FTV9GTEFTSF9BRERSMSA9IENNRF9QUk9HUkFNOworICAgICphZGRyID0gZGF0YTsKKworICAgIC8qIGFybSBzaW1wbGUsIG5vbiBpbnRlcnJ1cHQgZGVwZW5kZW50IHRpbWVyICovCisgICAgcmVzZXRfdGltZXJfbWFza2VkKCk7CisKKyAgICAvKiB3YWl0IHVudGlsIGZsYXNoIGlzIHJlYWR5ICovCisgICAgY2hpcDEgPSAwOworICAgIGRvCisgICAgeworCXJlc3VsdCA9ICphZGRyOworCisJLyogY2hlY2sgdGltZW91dCAqLworCWlmIChnZXRfdGltZXJfbWFza2VkKCkgPiBDRkdfRkxBU0hfRVJBU0VfVE9VVCkKKwl7CisJICAgIGNoaXAxID0gRVJSIHwgVE1POworCSAgICBicmVhazsKKwl9CisJaWYgKCFjaGlwMSAmJiAoKHJlc3VsdCAmIDB4ODApID09IChkYXRhICYgMHg4MCkpKQorCQljaGlwMSA9IFJFQURZOworCisgICAgfSAgd2hpbGUgKCFjaGlwMSk7CisKKyAgICAqYWRkciA9IENNRF9SRUFEX0FSUkFZOworCisgICAgaWYgKGNoaXAxID09IEVSUiB8fCAqYWRkciAhPSBkYXRhKQorICAgICAgICByYyA9IEVSUl9QUk9HX0VSUk9SOworCisgICAgaWYgKGlmbGFnKQorICAgICAgZW5hYmxlX2ludGVycnVwdHMoKTsKKworICAgIGlmIChjZmxhZykKKyAgICAgIGljYWNoZV9lbmFibGUoKTsKKworICAgIHJldHVybiByYzsKK30KKworLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQorICogQ29weSBtZW1vcnkgdG8gZmxhc2guCisgKi8KKworaW50IHdyaXRlX2J1ZmYgKGZsYXNoX2luZm9fdCAqaW5mbywgdWNoYXIgKnNyYywgdWxvbmcgYWRkciwgdWxvbmcgY250KQoreworICAgIHVsb25nIHdwLCBkYXRhOworICAgIGludCByYzsKKworICAgIGlmKGFkZHIgJiAxKSB7CisgICAgICBwcmludGYoInVuYWxpZ25lZCBkZXN0aW5hdGlvbiBub3Qgc3VwcG9ydGVkXG4iKTsKKyAgICAgIHJldHVybiBFUlJfQUxJR047CisgICAgfTsKKworICAgIGlmKChpbnQpc3JjICYgMSkgeworICAgICAgcHJpbnRmKCJ1bmFsaWduZWQgc291cmNlIG5vdCBzdXBwb3J0ZWRcbiIpOworICAgICAgcmV0dXJuIEVSUl9BTElHTjsKKyAgICB9OworCisgICAgd3AgPSBhZGRyOworCisgICAgd2hpbGUgKGNudCA+PSAyKSB7CisJZGF0YSA9ICooKHZvbGF0aWxlIHUxNiopc3JjKTsKKwlpZiAoKHJjID0gd3JpdGVfd29yZChpbmZvLCB3cCwgZGF0YSkpICE9IDApIHsKKwkgICAgcmV0dXJuIChyYyk7CisJfQorCXNyYyArPSAyOworCXdwICArPSAyOworCWNudCAtPSAyOworICAgIH0KKworICAgIGlmKGNudCA9PSAxKSB7CisgICAgICBkYXRhID0gICgqKCh2b2xhdGlsZSB1OCopc3JjKSkgfCAoKigodm9sYXRpbGUgdTgqKSh3cCsxKSkgPDwgOCk7CisJaWYgKChyYyA9IHdyaXRlX3dvcmQoaW5mbywgd3AsIGRhdGEpKSAhPSAwKSB7CisJICAgIHJldHVybiAocmMpOworCX0KKwlzcmMgKz0gMTsKKwl3cCAgKz0gMTsKKwljbnQgLT0gMTsKKyAgICB9OworCisgICAgcmV0dXJuIEVSUl9PSzsKK30KZGlmZiAtLWdpdCBhL2JvYXJkL2F0OTFybTkyMDBkay91LWJvb3QubGRzIGIvYm9hcmQvYXQ5MXJtOTIwMGRrL3UtY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gsIGRldiBJRD0weCV4LlxuIixpbl9taWQsaW5fZGlkICk7CisJbXlfb3V0XzgoICh1bnNpZ25lZCBjaGFyICopYWRkciwgMHhmMCk7CisJdWRlbGF5KDEpOworCW15X291dF84KCAgICAgKHVuc2lnbmVkIGNoYXIgKikgKCh1bG9uZylhZGRyKzB4NTU1KSwweGFhICk7CisJbXlfb3V0XzgoICAgICAodW5zaWduZWQgY2hhciAqKSAoKHVsb25nKWFkZHIrMHgyYWEpLDB4NTUgKTsKKwlteV9vdXRfOCggICAgICh1bnNpZ25lZCBjaGFyICopICgodWxvbmcpYWRkcisweDU1NSksMHg4MCApOworCW15X291dF84KCAgICAgKHVuc2lnbmVkIGNoYXIgKikgKCh1bG9uZylhZGRyKzB4NTU1KSwweGFhICk7CisJbXlfb3V0XzgoICAgICAodW5zaWduZWQgY2hhciAqKSAoKHVsb25nKWFkZHIrMHgyYWEpLDB4NTUgKTsKKwkvKiBTdGFydCBlcmFzZSBvbiB1bnByb3RlY3RlZCBzZWN0b3JzICovCisJZm9yIChzZWN0ID0gc19maXJzdDsgc2VjdDw9c19sYXN0OyBzZWN0KyspIHsKKwkJaWYgKGluZm8tPnByb3RlY3Rbc2VjdF0gPT0gMCkgewkvKiBub3QgcHJvdGVjdGVkICovCisJCQlhZGRyID0gKHZ1X2xvbmcqKShpbmZvLT5zdGFydFtzZWN0XSk7CisJCQkvL2FkZHJbMF0gPSAweDAwMzAwMDMwOworCQkJbXlfb3V0XzgoICAgICAodW5zaWduZWQgY2hhciAqKSAoKHVsb25nKWFkZHIpLDB4MzAgKTsKKwkJCWxfc2VjdCA9IHNlY3Q7CisJCX0KKwl9CisjZWxpZiBkZWZpbmVkKENPTkZJR19CT09UXzE2QiApCisJbXlfb3V0X2JlMTYoICh1bnNpZ25lZCBzaG9ydCAqICkgICgodWxvbmcpYWRkcisgKDB4YWFhKSkgLCAweGFhICk7CisJbXlfb3V0X2JlMTYoICh1bnNpZ25lZCBzaG9ydCAqICkgICgodWxvbmc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TsKKwlpbnQgIGRhdGFfc2hvcnRbMl07CisKKwkvKiBDaGVjayBpZiBGbGFzaCBpcyAoc3VmZmljaWVudGx5KSBlcmFzZWQgKi8KKwlpZiAoICgodWxvbmcpICAqKHVsb25nICopZGVzdCAmIGRhdGEpICE9IGRhdGEgKSB7CisJCXJldHVybiAoMik7CisJfQorCS8qIERpc2FibGUgaW50ZXJydXB0cyB3aGljaCBtaWdodCBjYXVzZSBhIHRpbWVvdXQgaGVyZSAqLworCWZsYWcgPSBkaXNhYmxlX2ludGVycnVwdHMoKTsKKyNpZiBkZWZpbmVkKENPTkZJR19CT09UXzhCKQorI2lmZGVmIERFQlVHCisJeworCWludCBpbl9taWQsaW5fZGlkOworCW15X291dF84KCAodW5zaWduZWQgY2hhciAqICkgIChhZGRyKzB4NTU1KSAsIDB4YWEgKTsKKwlteV9vdXRfOCggKHVuc2lnbmVkIGNoYXIgKiApICAoYWRkcisweDJhYSkgLCAweDU1ICk7CisJbXlfb3V0XzgoICh1bnNpZ25lZCBjaGFyICogKSAgKGFkZHIrMHg1NTUpICwgMHg5MCApOworCWluX21pZD1teV9pbl84KCAodW5zaWduZWQgY2hhciAqICkgYWRkciApOworCWluX2RpZD1teV9pbl84KCAodW5zaWduZWQgY2hhciAqICkgKGFkZHIrMSkgKTsKKyAgCXByaW50ZigiIG1hbiBJRD0weCV4LCBkZXYgSUQ9MHgleC5cbiIsaW5fbWlkLGluX2RpZCApOworCW15X291dF84KCAodW5zaWduZWQgY2hhciAqKWFkZHIsIDB4ZjApOworCXVkZWxheSgxKTsKKwl9CisjZW5kaWYKKyAgICAgIHsKKwlpbnQgIGRhdGFfY2hbNF07CisJZGF0YV9jaFswXT0oaW50ICkgKChkYXRhPj4yNCkgJiAweGZmKTsKKwlkYXRhX2NoWzFdPShpbnQgKSAoKGRhdGE+PjE2KSAmMHhmZiApOyAKKwlkYXRhX2NoWzJdPShpbnQgKSAoKGRhdGEgPj44KSAmIDB4ZmYpOworCWRhdGFfY2hbM109KGludCApIChkYXRhICYgMHhmZik7CisJZm9yIChpPTA7aTw0O2krKyApeworCSAgbXlfb3V0XzgoICh1bnNpZ25lZCBjaGFyICopIChhZGRyKzB4NTU1KSwweGFhKTsKKwkgIG15X291dF84KCh1bnNpZ25lZCBjaGFyICopIChhZGRyKzB4MmFhKSwweDU1KTsKKwkgIG15X291dF84KCAodW5zaWduZWQgY2hhciAqKSAgKGFkZHIrMHg1NTUpLDB4YTApOworCSAgbXlfb3V0XzgoKHVuc2lnbmVkIGNoYXIgKikgIChkZXN0K2kpICxkYXRhX2NoW2ldKTsKKwkvKiByZS1lbmFibGUgaW50ZXJydXB0cyBpZiBuZWNlc3NhcnkgKi8KKwlpZiAoZmxhZykKKwkJZW5hYmxlX2ludGVycnVwdHMoKTsKKworICAJICBzdGFydCA9IGdldF90aW1lciAoMCk7CisJbGFzdCAgPSBzdGFydDsKKwkgIHdoaWxlKCAgKCBteV9pbl84KCh1bnNpZ25lZCBjaGFyICopIChkZXN0K2kpKSApICE9ICggZGF0YV9jaFtpXSAgKSApIHsKKwkJICBpZiAoZ2V0X3RpbWVyKHN0YXJ0KSA+IENGR19GTEFTSF9XUklURV9UT1VUICkgeworCQkJICByZXR1cm4gMTsKKwkJICB9CisJICB9CisJfS8qIGZvciAqLworICAgICB9CisjZWxpZiBkZWZpbmVkKCBDT05GSUdfQk9PVF8xNkIpCisJZGF0YV9zaG9ydFswXT0oaW50KSAoZGF0YT4+MTYpICYgMHhmZmZmOworCWRhdGFfc2hvcnRbMV09KGludCApIGRhdGEgJiAweGZmZmYgOyAKKwlmb3IgKGk9MDtpPDI7aSsrICl7CisJbXlfb3V0X2JlMTYoICAgICAodW5zaWduZWQgc2hvcnQgKikgKCh1bG9uZylhZGRyKyAweGFhYSksMHhhYSApOworCW15X291dF9iZTE2KCAgICAgKHVuc2lnbmVkIHNob3J0ICopICgodWxvbmcpYWRkcisgMHg1NTQpLDB4NTUgKTsKKwlteV9vdXRfYmUxNiggICAgICh1bnNpZ25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mRpZgorCQorCQorCXJldHVybiAoMCk7Cit9CisjaWZkZWYgIENPTkZJR19CT09UXzhCCitzdGF0aWMgaW50IG15X2luXzggICggdW5zaWduZWQgY2hhciAqYWRkcikKK3sKKyAgICAgICBpbnQgcmV0OworICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCJsYnolVTElWDEgJTAsJTE7IGVpZWlvIiA6ICI9ciIgKHJldCkgOiAibSIgKCphZGRyKSk7CisgICAgICAgcmV0dXJuIHJldDsKK30KKworc3RhdGljIHZvaWQgbXlfb3V0XzggICggdW5zaWduZWQgY2hhciAqYWRkciwgaW50IHZhbCkKK3sKKyAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXygic3RiJVUwJVgwICUxLCUwOyBlaWVpbyIgOiAiPW0iICgqYWRkcikgOiAiciIgKHZhbCkpOworfQorI2VuZGlmCisjaWZkZWYgIENPTkZJR19CT09UXzE2Qgorc3RhdGljIGludCBteV9pbl9iZTE2KCB1bnNpZ25lZCBzaG9ydCAqYWRkcikKK3sKKyAgICAgICBpbnQgcmV0OworICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXygibGh6JVUxJVgxICUwLCUxOyBlaWVpbyIgOiAiPXIiIChyZXQpIDogIm0iICgqYWRkcikpOworCQkJICAgICAgICByZXR1cm4gcmV0OworfQorc3RhdGljIHZvaWQgbXlfb3V0X2JlMTYoIHVuc2lnbmVkIHNob3J0ICphZGRyLCBpbnQgdmFsKQoreworICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCJzdGglVTAlWDAgJTEsJTA7IGVpZWlvIiA6ICI9bSIgKCphZGRyKSA6ICJyIiAodmFsKSk7Cit9CisjZW5kaWYKKyNpZmRlZiAgQ09ORklHX0JPT1RfMzJCCitzdGF0aWMgIHVuc2lnbmVkIG15X2luX2JlMzIoIHVuc2lnbmVkICphZGRyKQoreworICAgICAgICB1bnNpZ25lZCByZXQ7CisgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCJsd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Wl6ZWQgdG8gZml0IHdpdGhpbgkqLworICAgIC8qIHRoZSBzZWN0b3IgbGF5b3V0IG9mIG91ciBmbGFzaCBjaGlwcyEJWFhYIEZJWE1FIFhYWAkqLworCisgICAgY3B1L21wYzh4eC9zdGFydC5vCSgudGV4dCkKKyAgICBjb21tb24vZGxtYWxsb2MubwkoLnRleHQpCisgICAgcHBjL3BwY3N0cmluZy5vCSgudGV4dCkKKyAgICBwcGMvdnNwcmludGYubwkoLnRleHQpCisgICAgcHBjL2NyYzMyLm8JCSgudGV4dCkKKyAgICBwcGMvemxpYi5vCQkoLnRleHQpCisKKyAgICAuID0gZW52X29mZnNldDsKKyAgICBjb21tb24vZW52aXJvbm1lbnQubygudGV4dCkKKworICAgICooLnRleHQpCisgICAgKiguZml4dXApCisgICAgKiguZ290MSkKKyAgfQorICBfZXRleHQgPSAuOworICBQUk9WSURFIChldGV4dCA9IC4pOworICAucm9kYXRhICAgIDoKKyAgeworICAgICooLnJvZGF0YSkKKyAgICAqKC5yb2RhdGExKQorICB9CisgIC5maW5pICAgICAgOiB7ICooLmZpbmkpICAgIH0gPTAKKyAgLmN0b3JzICAgICA6IHsgKiguY3RvcnMpICAgfQorICAuZHRvcnMgICAgIDogeyAqKC5kdG9ycykgICB9CisKKyAgLyogUmVhZC13cml0ZSBzZWN0aW9uLCBtZXJnZWQgaW50byBkYXRhIHNlZ21lbnQ6ICovCisgIC4gPSAoLiArIDB4MDBGRikgJiAweEZGRkZGRjAwOworICBfZXJvdGV4dCA9IC47CisgIFBST1ZJREUgKGVyb3RleHQgPSAuKTsKKyAgLnJlbG9jICAgOgorICB7CisgICAgKiguZ290KQorICAgIF9HT1QyX1RBQkxFXyA9IC47CisgICAgKiguZ290MikKKyAgICBfRklYVVBfVEFCTEVfID0gLjsKKyAgICAqKC5maXh1cCkKKyAgfQorICBfX2dvdDJfZW50cmllcyA9IChfRklYVVBfVEFCTEVfIC0gX0dPVDJfVEFCTEVfKSA+PjI7CisgIF9fZml4dXB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xhLmN0b3JzKQl9CisgIC5yZWwuZHRvcnMgICAgIDogeyAqKC5yZWwuZHRvcnMpCX0KKyAgLnJlbGEuZHRvcnMgICAgOiB7ICooLnJlbGEuZHRvcnMpCX0KKyAgLnJlbC5ic3MgICAgICAgOiB7ICooLnJlbC5ic3MpCQl9CisgIC5yZWxhLmJzcyAgICAgIDogeyAqKC5yZWxhLmJzcykJCX0KKyAgLnJlbC5wbHQgICAgICAgOiB7ICooLnJlbC5wbHQpCQl9CisgIC5yZWxhLnBsdCAgICAgIDogeyAqKC5yZWxhLnBsdCkJCX0KKyAgLmluaXQgICAgICAgICAgOiB7ICooLmluaXQpCX0KKyAgLnBsdCA6IHsgKigucGx0KSB9CisgIC50ZXh0ICAgICAgOgorICB7CisgICAgLyogV0FSTklORyAtIHRoZSBmb2xsb3dpbmcgaXMgaGFuZC1vcHRpbWl6ZWQgdG8gZml0IHdpdGhpbgkqLworICAgIC8qIHRoZSBzZWN0b3IgbGF5b3V0IG9mIG91ciBmbGFzaCBjaGlwcyEJWFhYIEZJWE1FIFhYWAkqLworCisgICAgY3B1L21wYzh4eC9zdGFydC5vCSgudGV4dCkKKyAgICBjb21tb24vZGxtYWxsb2MubwkoLnRleHQpCisgICAgcHBjL3ZzcHJpbnRmLm8JKC50ZXh0KQorICAgIHBwYy9jcmMzMi5vCQkoLnRleHQpCisKKyAgICAuID0gZW52X29mZnNldDsKKyAgICBjb21tb24vZW52aXJvbm1lbnQubygudGV4dCkKKworICAgICooLnRleHQpCisgICAgKiguZml4dXApCisgICAgKiguZ290MSkKKyAgfQorICBfZXRleHQgPSAuOworICBQUk9WSURFIChldGV4dCA9IC4pOworICAucm9kYXRhICAgIDoKKyAgeworICAgICooLnJvZGF0YSkKKyAgICAqKC5yb2RhdGExKQorICB9CisgIC5maW5pICAgICAgOiB7ICooLmZpbmkpICAgIH0gPTAKKyAgLmN0b3JzICAgICA6IHsgKiguY3RvcnMpICAgfQorICAuZHRvcnMgICAgIDogeyAqKC5kdG9ycykgICB9CisKKyAgLyogUmVhZC13cml0ZSBzZWN0aW9uLCBtZXJnZWQgaW50byBkYXRhIHNlZ21lbnQ6ICovCisgIC4gPSAoLiArIDB4MEZGRikgJiAweEZGRkZGMDAwOworICBfZXJvdGV4dCA9IC47CisgIFBST1ZJREUgKGVyb3RleHQgPSAuKTsKKyAgLnJlbG9jICAgOgorICB7CisgICAgKiguZ290KQorICAgIF9HT1QyX1RBQkxFXyA9IC47CisgICAgKiguZ290MikKKyAgICBfRklYVVBfVEFCTEVfID0gLjsKKyAgICAqKC5maXh1cCkKKyAgfQorICBfX2dvdDJfZW50cmllcyA9IChfRklYVVBfVEFCTEVfIC0gX0dPVDJfVEFCTEVfKSA+PjI7CisgIF9fZml4dXBfZW50cmllcyA9ICguIC0gX0ZJWFVQX1RBQkxFXyk+PjI7CisKKyAgLmRhdGEgICAgOgorICB7CisgICAgKiguZGF0YSkKKyAgICAqKC5kYXRhMSkKKyAgICAqKC5zZGF0YSkKKyAgICAqKC5zZGF0YTIpCisgICAgKiguZHluYW1pYykKKyAgICBDT05TVFJVQ1RPUlMKKyAgfQorICBfZWRhdGEgID0gIC47CisgIFBST1ZJREUgKGVkYXRhID0gLik7CisKKyAgX19zdGFydF9fX2V4X3RhYmxlID0gLjsKKyAgX19leF90YWJsZSA6IHsgKihfX2V4X3RhYmxlKSB9CisgIF9fc3RvcF9fX2V4X3RhYmxlID0gLjsKKworICAuID0gQUxJR04oNDA5Nik7CisgIF9faW5pdF9iZWdpbiA9IC47CisgIC50ZXh0LmluaXQgOiB7ICooLnRleHQuaW5pdCkgfQorICAuZGF0YS5pbml0IDogeyAqKC5kYXRhLmluaXQpIH0KKyAgLiA9IEFMSUdOKDQwOTYpOworICBfX2luaXRfZW5kID0gLjsKKworICBfX2Jzc19zdGFydCA9IC47CisgIC5ic3MgICAgICAgOgorICB7CisgICAqKC5zYnNzKSAqKC5zY29tbW9uKQorICAgKiguZHluYnNzKQorICAgKiguYnNzKQorICAgKihDT01NT04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ooLnJlbC5kdG9ycykJfQorICAucmVsYS5kdG9ycyAgICA6IHsgKigucmVsYS5kdG9ycykJfQorICAucmVsLmJzcyAgICAgICA6IHsgKigucmVsLmJzcykJfQorICAucmVsYS5ic3MgICAgICA6IHsgKigucmVsYS5ic3MpCX0KKyAgLnJlbC5wbHQgICAgICAgOiB7ICooLnJlbC5wbHQpCX0KKyAgLnJlbGEucGx0ICAgICAgOiB7ICooLnJlbGEucGx0KQl9CisgIC5pbml0ICAgICAgICAgIDogeyAqKC5pbml0KQkJfQorICAucGx0IDogeyAqKC5wbHQpIH0KKyAgLnRleHQgICAgICA6CisgIHsKKyAgICAvKiBXQVJOSU5HIC0gdGhlIGZvbGxvd2luZyBpcyBoYW5kLW9wdGltaXplZCB0byBmaXQgd2l0aGluCSovCisgICAgLyogdGhlIHNlY3RvciBsYXlvdXQgb2Ygb3VyIGZsYXNoIGNoaXBzIQlYWFggRklYTUUgWFhYCSovCisKKyAgICBjcHUvbXBjOHh4L3N0YXJ0Lm8JCSgudGV4dCkKKyAgICBjcHUvbXBjOHh4L3RyYXBzLm8JCSgudGV4dCkKKyAgICBjb21tb24vZGxtYWxsb2MubwkJKC50ZXh0KQorICAgIGxpYl9wcGMvcHBjc3RyaW5nLm8JCSgudGV4dCkKKyAgICBsaWJfZ2VuZXJpYy92c3ByaW50Zi5vCSgudGV4dCkKKyAgICBsaWJfZ2VuZXJpYy9jcmMzMi5vCQkoLnRleHQpCisgICAgbGliX2dlbmVyaWMvemxpYi5vCQkoLnRleHQpCisgICAgbGliX3BwYy9jYWNoZS5vCQkoLnRleHQpCisgICAgbGliX3BwYy90aW1lLm8JCSgudGV4dCkKKworICAgIC4gPSBlbnZfb2Zmc2V0OworICAgIGNvbW1vbi9lbnZpcm9ubWVudC5vCSgucHBjZW52KQorCisgICAgKigudGV4dCkKKyAgICAqKC5maXh1cCkKKyAgICAqKC5nb3QxKQorICB9CisgIF9ldGV4dCA9IC47CisgIFBST1ZJREUgKGV0ZXh0ID0gLik7CisgIC5yb2RhdGEgICAgOgorICB7CisgICAgKigucm9kYXRhKQorICAgICooLnJvZGF0YTEpCisgIH0KKyAgLmZpbmkgICAgICA6IHsgKiguZmluaSkgICAgfSA9MAorICAuY3RvcnMgICAgIDogeyAqKC5jdG9ycykgICB9CisgIC5kdG9ycyAgICAgOiB7ICooLmR0b3JzKSAgIH0KKworICAvKiBSZWFkLXdyaXRlIHNlY3Rpb24sIG1lcmdlZCBpbnRvIGRhdGEgc2VnbWVudDogKi8KKyAgLiA9ICguICsgMHgwMEZGKSAmIDB4RkZGRkZGMDA7CisgIF9lcm90ZXh0ID0gLjsKKyAgUFJPVklERSAoZXJvdGV4dCA9IC4pOworICAucmVsb2MgICA6CisgIHsKKyAgICAqKC5nb3QpCisgICAgX0dPVDJfVEFCTEVfID0gLjsKKyAgICAqKC5nb3QyKQorICAgIF9GSVhVUF9UQUJMRV8gPSAuOworICAgICooLmZpeHVwKQorICB9CisgIF9fZ290Ml9lbnRyaWVzID0gKF9GSVhVUF9UQUJMRV8gLSBfR09UMl9UQUJMRV8pID4+MjsKKyAgX19maXh1cF9lbnRyaWVzID0gKC4gLSBfRklYVVBfVEFCTEVfKT4+MjsKKworICAuZGF0YSAgICA6CisgIHsKKyAgICAqKC5kYXRhKQorICAgICooLmRhdGExKQorICAgICooLnNkYXRhKQorICAgICooLnNkYXRhMikKKyAgICAqKC5keW5hbWljKQorICAgIENPTlNUUlVDVE9SUworICB9CisgIF9lZGF0YSAgPSAgLjsKKyAgUFJPVklERSAoZWRhdGEgPSAuKTsKKworICBfX3N0YXJ0X19fZXhfdGFibGUgPSAuOworICBfX2V4X3RhYmxlIDogeyAqKF9fZXhfdGFibGUpIH0KKyAgX19zdG9wX19fZXhfdGFibGUgPSAuOworCisgIC4gPSBBTElHTigyNTYpOworICBfX2luaXRfYmVnaW4gPSAuOworICAudGV4dC5pbml0IDogeyAqKC50ZXh0LmluaXQpIH0KKyAgLmRhdGEuaW5pdCA6IHsgKiguZGF0YS5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uaGFzaCAgICAgICAgICA6IHsgKiguaGFzaCkJCX0KKyAgLmR5bnN5bSAgICAgICAgOiB7ICooLmR5bnN5bSkJCX0KKyAgLmR5bnN0ciAgICAgICAgOiB7ICooLmR5bnN0cikJCX0KKyAgLnJlbC50ZXh0ICAgICAgOiB7ICooLnJlbC50ZXh0KQkJfQorICAucmVsYS50ZXh0ICAgICA6IHsgKigucmVsYS50ZXh0KSAJfQorICAucmVsLmRhdGEgICAgICA6IHsgKigucmVsLmRhdGEpCQl9CisgIC5yZWxhLmRhdGEgICAgIDogeyAqKC5yZWxhLmRhdGEpIAl9CisgIC5yZWwucm9kYXRhICAgIDogeyAqKC5yZWwucm9kYXRhKSAJfQorICAucmVsYS5yb2RhdGEgICA6IHsgKigucmVsYS5yb2RhdGEpIAl9CisgIC5yZWwuZ290ICAgICAgIDogeyAqKC5yZWwuZ290KQkJfQorICAucmVsYS5nb3QgICAgICA6IHsgKigucmVsYS5nb3QpCQl9CisgIC5yZWwuY3RvcnMgICAgIDogeyAqKC5yZWwuY3RvcnMpCX0KKyAgLnJlbGEuY3RvcnMgICAgOiB7ICooLnJlbGEuY3RvcnMpCX0KKyAgLnJlbC5kdG9ycyAgICAgOiB7ICooLnJlbC5kdG9ycykJfQorICAucmVsYS5kdG9ycyAgICA6IHsgKigucmVsYS5kdG9ycykJfQorICAucmVsLmJzcyAgICAgICA6IHsgKigucmVsLmJzcykJCX0KKyAgLnJlbGEuYnNzICAgICAgOiB7ICooLnJlbGEuYnNzKQkJfQorICAucmVsLnBsdCAgICAgICA6IHsgKigucmVsLnBsdCkJCX0KKyAgLnJlbGEucGx0ICAgICAgOiB7ICooLnJlbGEucGx0KQkJfQorICAuaW5pdCAgICAgICAgICA6IHsgKiguaW5pdCkJfQorICAucGx0IDogeyAqKC5wbHQpIH0KKyAgLnRleHQgICAgICA6CisgIHsKKyAgICAvKiBXQVJOSU5HIC0gdGhlIGZvbGxvd2luZyBpcyBoYW5kLW9wdGltaXplZCB0byBmaXQgd2l0aGluCSovCisgICAgLyogdGhlIHNlY3RvciBsYXlvdXQgb2Ygb3VyIGZsYXNoIGNoaXBzIQlYWFggRklYTUUgWFhYCSovCisKKyAgICBjcHUvbXBjOHh4L3N0YXJ0Lm8JKC50ZXh0KQorICAgIGNvbW1vbi9kbG1hbGxvYy5vCSgudGV4dCkKKyAgICBsaWJfZ2VuZXJpYy92c3ByaW50Zi5vCSgudGV4dCkKKyAgICBsaWJfZ2VuZXJpYy9jcmMzMi5vCQkoLnRleHQpCisKKyAgICAuID0gZW52X29mZnNldDsKKyAgICBjb21tb24vZW52aXJvbm1lbnQubygudGV4dCkKKworICAgICooLnRleHQpCisgICAgKiguZml4dXApCisgICAgKiguZ290MSkKKyAgfQorICBfZXRleHQgPSAuOworICBQUk9WSURFIChldGV4dCA9IC4pOworICAucm9kYXRhICAgIDoKKyAgeworICAgICooLnJvZGF0YSkKKyAgICAqKC5yb2RhdGExKQorICB9CisgIC5maW5pICAgICAgOiB7ICooLmZpbmkpICAgIH0gPTAKKyAgLmN0b3JzICAgICA6IHsgKiguY3RvcnMpICAgfQorICAuZHRvcnMgICAgIDogeyAqKC5kdG9ycykgICB9CisKKyAgLyogUmVhZC13cml0ZSBzZWN0aW9uLCBtZXJnZWQgaW50byBkYXRhIHNlZ21lbnQ6ICovCisgIC4gPSAoLiArIDB4MEZGRikgJiAweEZGRkZGMDAwOworICBfZXJvdGV4dCA9IC47CisgIFBST1ZJREUgKGVyb3RleHQgPSAuKTsKKyAgLnJlbG9jICAgOgorICB7CisgICAgKiguZ290KQorICAgIF9HT1QyX1RBQkxFXyA9IC47CisgICAgKiguZ290MikKKyAgICBfRklYVVBfVEFCTEVfID0gLjsKKyAgICAqKC5maXh1cCkKKyAgfQorICBfX2dvdDJfZW50cmllcyA9IChfRklYVVBfVEFCTEVfIC0gX0dPVDJfVEFCTEVfKSA+PjI7CisgIF9fZml4dXBfZW50cmllcyA9ICguIC0gX0ZJWFVQX1RBQkxFXyk+PjI7CisKKyA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geworICB3aGlsZSAoY250ciA+IDE2KQorICAgIHsKKyAgICAqZGVzdCsrID0gKnNvdXJjZSsrOworICAgICpkZXN0KysgPSAqc291cmNlKys7CisgICAgKmRlc3QrKyA9ICpzb3VyY2UrKzsKKyAgICAqZGVzdCsrID0gKnNvdXJjZSsrOworICAgICpkZXN0KysgPSAqc291cmNlKys7CisgICAgKmRlc3QrKyA9ICpzb3VyY2UrKzsKKyAgICAqZGVzdCsrID0gKnNvdXJjZSsrOworICAgICpkZXN0KysgPSAqc291cmNlKys7CisgICAgKmRlc3QrKyA9ICpzb3VyY2UrKzsKKyAgICAqZGVzdCsrID0gKnNvdXJjZSsrOworICAgICpkZXN0KysgPSAqc291cmNlKys7CisgICAgKmRlc3QrKyA9ICpzb3VyY2UrKzsKKyAgICAqZGVzdCsrID0gKnNvdXJjZSsrOworICAgICpkZXN0KysgPSAqc291cmNlKys7CisgICAgKmRlc3QrKyA9ICpzb3VyY2UrKzsKKyAgICAqZGVzdCsrID0gKnNvdXJjZSsrOworICAgIGNudHIgLT0gMTY7CisgICAgfQorICB3aGlsZSAoY250ciA+IDApCisgICAgeworICAgICpkZXN0KysgPSAqc291cmNlKys7CisgICAgY250ci0tOworICAgIH0KKyAgfQorI2VuZGlmCisvKiB3ZSBuZWVkIHRvIGJlIGZhc3QgaGVyZSwgMSB1cyBwZXIgcmVhZCB0cmFuc2xhdGVzIHRvIDEgc2Vjb25kIHBlciBtZWcgKi8KK3N0YXRpYyB2b2lkIG5hbmRfZmFzdF9yZWFkKHVuc2lnbmVkIGNoYXIgKmRhdGFfYnVmLCBpbnQgY250ciwgdW5zaWduZWQgbG9uZyBuYW5kcHRyKQorICB7CisgIHdoaWxlIChjbnRyID4gMTYpCisgICAgeworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgIGNudHIgLT0gMTY7CisgICAgfQorICB3aGlsZSAoY250ciA+IDApCisgICAgeworICAgICpkYXRhX2J1ZisrID0gUkVBRF9OQU5EKG5hbmRwdHIpOworICAgIGNudHItLTsKKyAgICB9CisgIH0KKworLyogVGhpcyByb3V0aW5lIGlzIG1hZGUgYXZhaWxhYmxlIHRvIG90aGVyIG10ZCBjb2RlIHZpYQorICogaW50ZXJfbW9kdWxlX3JlZ2lzdGVyLiAgSXQgbXVzdCBvbmx5IGJlIGFjY2Vzc2VkIHRocm91Z2gKKyAqIGludGVyX21vZHVsZV9nZXQgd2hpY2ggd2lsbCBidW1wIHRoZSB1c2UgY291bnQgb2YgdGhpcyBtb2R1bGUuICBUaGUKKyAqIGFkZHJlc3NlcyBwYXNzZWQgYmF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CBBVDkxQ19UQ0JfVEMyWEMyU19OT05FOworICAgIHRtci0+VENfQ0NSID0gQVQ5MUNfVENfQ0xLRElTOworICAgIHRtci0+VENfQ01SID0gQVQ5MUNfVENfVElNRVJfRElWMV9DTE9DSzsgIC8qIHNldCB0byBNQ0xLLzIgKi8KKworICAgIHRtci0+VENfSURSID0gfjB1bDsKKyAgICB0bXItPlRDX1JDID0gVElNRVJfTE9BRF9WQUw7CisgICAgbGFzdGluYyA9IFRJTUVSX0xPQURfVkFMOworICAgIHRtci0+VENfQ0NSID0gQVQ5MUNfVENfU1dUUkcgfCBBVDkxQ19UQ19DTEtFTjsKKyAgICB0aW1lc3RhbXAgPSAwOworICAgIHJldHVybiAoMCk7Cit9CisKKy8qCisgKiB0aW1lciB3aXRob3V0IGludGVycnVwdHMKKyAqLworCit2b2lkIHJlc2V0X3RpbWVyKHZvaWQpCit7CisgICAgcmVzZXRfdGltZXJfbWFza2VkKCk7Cit9CisKK3Vsb25nIGdldF90aW1lciAodWxvbmcgYmFzZSkKK3sKKyAgICByZXR1cm4gZ2V0X3RpbWVyX21hc2tlZCgpIC0gYmFzZTsKK30KKwordm9pZCBzZXRfdGltZXIgKHVsb25nIHQpCit7CisgICAgdGltZXN0YW1wID0gdDsKK30KKwordm9pZCB1ZGVsYXkodW5zaWduZWQgbG9uZyB1c2VjKQoreworICAgIHVkZWxheV9tYXNrZWQodXNlYyk7Cit9CisKK3ZvaWQgcmVzZXRfdGltZXJfbWFza2VkKHZvaWQpCit7CisgICAgLyogcmVzZXQgdGltZSAqLworICAgIGxhc3RpbmMgPSBSRUFEX1RJTUVSOworICAgIHRpbWVzdGFtcCA9IDA7Cit9CisKK3Vsb25nIGdldF90aW1lcl9tYXNrZWQodm9pZCkKK3sKKyAgICB1bG9uZyBub3cgPSBSRUFEX1RJTUVSOworICAgIGlmIChub3cgPj0gbGFzdGluYykKKyAgICB7CisgICAgICAgIC8qIG5vcm1hbCBtb2RlICovCisgICAgICAgIHRpbWVzdGF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IFNvZnR3YXJlCisgKiBGb3VuZGF0aW9uLCBJbmMuLCA1OSBUZW1wbGUgUGxhY2UsIFN1aXRlIDMzMCwgQm9zdG9uLAorICogTUEgMDIxMTEtMTMwNyBVU0EKKyAqLworCisKKworI2luY2x1ZGUgImNvbmZpZy5oIgorI2luY2x1ZGUgInZlcnNpb24uaCIKKworCisvKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBKdW1wIHZlY3RvciB0YWJsZSBhcyBpbiB0YWJsZSAzLjEgaW4gWzFdCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqLworCisKKy5nbG9ibCBfc3RhcnQKK19zdGFydDoJYiAgICAgICByZXNldAorCWxkcglwYywgX3VuZGVmaW5lZF9pbnN0cnVjdGlvbgorCWxkcglwYywgX3NvZnR3YXJlX2ludGVycnVwdAorCWxkcglwYywgX3ByZWZldGNoX2Fib3J0CisJbGRyCXBjLCBfZGF0YV9hYm9ydAorCWxkcglwYywgX25vdF91c2VkCisJbGRyCXBjLCBfaXJxCisJbGRyCXBjLCBfZmlxCisKK191bmRlZmluZWRfaW5zdHJ1Y3Rpb246CS53b3JkIHVuZGVmaW5lZF9pbnN0cnVjdGlvbgorX3NvZnR3YXJlX2ludGVycnVwdDoJLndvcmQgc29mdHdhcmVfaW50ZXJydXB0CitfcHJlZmV0Y2hfYWJvcnQ6CS53b3JkIHByZWZldGNoX2Fib3J0CitfZGF0YV9hYm9ydDoJCS53b3JkIGRhdGFfYWJvcnQKK19ub3RfdXNlZDoJCS53b3JkIG5vdF91c2VkCitfaXJxOgkJCS53b3JkIGlycQorX2ZpcToJCQkud29yZCBmaXEKKworCS5iYWxpZ25sIDE2LDB4ZGVhZGJlZWYKKworCisvKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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qCisgICAgICAgICAqIHdlIGRvIHN5cy1jcml0aWNhbCBpbml0cyBvbmx5IGF0IHJlYm9vdCwKKyAgICAgICAgICogbm90IHdoZW4gYm9vdGluZyBmcm9tIHJhbSEKKyAgICAgICAgICovCisjaWZkZWYgQ09ORklHX0lOSVRfQ1JJVElDQUwKKyAgICAgICAgYmwgICAgICBjcHVfaW5pdF9jcml0CisjZW5kaWYKKworICAgICAgICAvKiBzZXQgdXAgdGhlIHN0YWNrICovCisgICAgICAgIGxkciAgICAgcjAsIF9hcm1ib290X2VuZAorICAgICAgICBhZGQgICAgIHIwLCByMCwgI0NPTkZJR19TVEFDS1NJWkUKKyAgICAgICAgc3ViICAgICBzcCwgcjAsICMxMiAgICAgICAgICAgICAvKiBsZWF2ZSAzIHdvcmRzIGZvciBhYm9ydC1zdGFjayAqLworICAgICAgICBsZHIgcGMsX3N0YXJ0X2FybWJvb3QKKworX3N0YXJ0X2FybWJvb3Q6IC53b3JkIHN0YXJ0X2FybWJvb3QKKworLyoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogQ1BVX2luaXRfY3JpdGljYWwgcmVnaXN0ZXJzCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqLworCitjcHVfaW5pdF9jcml0OgorCSMgYWN0dWFsbHkgZG8gbm90aGluZyBmb3Igbm93IQorCW1vdglwYywgbHIKKworCisKKworLyoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogSW50ZXJydXB0IGhhbmRsaW5nCisgKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqLworCitACitAIElSUSBzdGFj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RlJBTUVNRU0gKyBSQkZfRlJBTUVNQVgqc2l6ZW9mKHJiZl90KSkKKworLyogc3RvbGVuIGZyb20gbWlpLmggKi8KKy8qIEdlbmVyaWMgTUlJIHJlZ2lzdGVycy4gKi8KKworI2RlZmluZSBNSUlfQk1DUiAgICAgICAgICAgIDB4MDAgICAgICAgIC8qIEJhc2ljIG1vZGUgY29udHJvbCByZWdpc3RlciAqLworI2RlZmluZSBNSUlfQk1TUiAgICAgICAgICAgIDB4MDEgICAgICAgIC8qIEJhc2ljIG1vZGUgc3RhdHVzIHJlZ2lzdGVyICAqLworI2RlZmluZSBCTVNSX0pDRCAgICAgICAgICAgICAgICAweDAwMDIgIC8qIEphYmJlciBkZXRlY3RlZCAgICAgICAgICAgICAqLworI2RlZmluZSBCTVNSX0xTVEFUVVMgICAgICAgICAgICAweDAwMDQgIC8qIExpbmsgc3RhdHVzICAgICAgICAgICAgICAgICAqLworI2RlZmluZSBCTVNSXzEwSEFMRiAgICAgICAgICAgICAweDA4MDAgIC8qIENhbiBkbyAxMG1icHMsIGhhbGYtZHVwbGV4ICAqLworI2RlZmluZSBCTVNSXzEwMEZVTEwgICAgICAgICAgICAweDQwMDAgIC8qIENhbiBkbyAxMDBtYnBzLCBmdWxsLWR1cGxleCAqLworI2RlZmluZSBCTVNSXzEwRlVMTCAgICAgICAgICAgICAweDEwMDAgIC8qIENhbiBkbyAxMG1icHMsIGZ1bGwtZHVwbGV4ICAqLworI2RlZmluZSBCTVNSXzEwMEhBTEYgICAgICAgICAgICAweDIwMDAgIC8qIENhbiBkbyAxMDBtYnBzLCBoYWxmLWR1cGxleCAqLworCisjZGVmaW5lIE1JSV9TVFMyX1JFRwkxNyAgLyogRGF2aWNvbSBzcGVjaWZpYyAqLworI2RlZmluZSBNSUlfTURJTlRSX1JFRwkyMSAgLyogRGF2aWNvbSBzcGVjaWZpYyAqLworCisjaWZkZWYgQ09ORklHX0RSSVZFUl9FVEhFUgorCisjaWYgKENPTkZJR19DT01NQU5EUyAmIENGR19DTURfTkVUKQorCitBVDkxUFNfRU1BQyBwX21hYzsKKworaW50IE1JSV9SZWFkUGh5KHVuc2lnbmVkIGNoYXIgYWRkciwgdW5zaWduZWQgc2hvcnQgKnJldCkKKyAgeworCisgIHBfbWFjLT5FTUFDX01BTiA9IDB4NjAwMjAwMDAgfCAoYWRkciA8PCAxOCk7CisgIHVkZWxheSgxMDAwMCk7CisgICpyZXQgPSAodW5zaWduZWQgc2hvcnQpcF9tYWMtPkVNQUNfTUFOOworICByZXR1cm4gMTsKKyAgfQorCisKK2ludCBNSUlfR2V0TGlua1NwZWVkKHZvaWQpCisgIHsKKyAgdW5zaWduZWQgc2hvcnQgc3RhdDEsIHN0YXQyOworICBpbnQgcmV0OworCisgIGlmICghKHJldCA9IE1JSV9SZWFkUGh5KE1JSV9CTVNSLCAmc3RhdDEpKSkKKyAgICByZXR1cm4gMDsKKworICBpZiAoc3RhdDEgJiBCTVNSX0pDRCkKKyAgICB7CisjaWZkZWYgREVCVUcKKyAgICBwcmludGYoIk1JSTogamFiYmVyIGNvbmRpdGlvbiBkZXRlY3RlZFxuIik7CisjZW5kaWYgICAgICAvKmphYmJlciBkZXRlY3RlZCByZS1yZWFkIHRoZSByZWdpc3RlciovCisgICAgfQorICBpZiAoIShyZXQgPSBNSUlfUmVhZFBoeShNSUlfQk1TUiwgJnN0YXQxKSkpCisgICAgcmV0dXJuIDA7CisgIGlmICghKHN0YXQxICYgQk1TUl9MU1RBVFVTKSkgIC8qIGxpbmsgc3RhdHVzIHVwPyAqLworICAgIHsKKyAgICBwcmludGYoIk1JSTogbm8gTGlua1xuIik7CisgICAgcmV0dXJuIDA7CisgICAgfQorCisgIGlmICghKHJldCA9IE1JSV9SZWFkUGh5KE1JSV9TVFMyX1JFRywgJnN0YXQyKSkpCisgICAgcmV0dXJuIDA7CisKKyAgaWYgKChzdGF0MSAmIEJNU1JfMTAwRlVMTCkgJiYgKHN0YXQyICYgMHg4MDAwKSApCisgICAgeworICAgIC8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OworICAgICAgICB9CisgICAgICBlbHNlCisgICAgICAgIGlmICgoc3RhdDEgJiBCTVNSXzEwSEFMRikgJiYgKHN0YXQyICYgMHgxMDAwKSkKKyAgICAgICAgICB7CisgICAgICAgICAgLypzZXQgTUlJIGZvciAxMEJhc2VUIGFuZCBIYWxmIER1cGxleCAqLworICAgICAgICAgIHBfbWFjLT5FTUFDX0NGRyAmPSB+KEFUOTFDX0VNQUNfU1BEIHwgQVQ5MUNfRU1BQ19GRCk7CisjaWZkZWYgREVCVUcKKyAgICAgICAgICBwcmludGYoIk1JSTogMTBCYXNlVCBhbmQgSGFsbCBEdXBsZXggZGV0ZWN0ZWRcbiIpOworI2VuZGlmCisgICAgICAgICAgcmV0dXJuIDE7CisgICAgICAgICAgfQorCisgIHJldHVybiAwOworICB9CisKKworaW50IE1ESU9fU3RhcnR1cFBoeSh2b2lkKQorICB7CisgIGludCByZXQ7CisKKyAgaWYocF9tYWMtPkVNQUNfU1IgJiBBVDkxQ19FTUFDX0xJTkspCisgICAgeworICAgIHByaW50ZigiTURJT19TdGFydHVwUGh5OiBubyBsaW5rXG4iKTsKKyAgICByZXR1cm4gMDsKKyAgICB9OworCisgIHBfbWFjLT5FTUFDX0NUTCB8PSBBVDkxQ19FTUFDX01QRTsKKworICByZXQgPSBNSUlfR2V0TGlua1NwZWVkKCk7CisgIGlmIChyZXQgPT0gMCkKKyAgICB7CisgICAgcHJpbnRmKCJNRElPX1N0YXJ0dXBQaHk6IE1JSV9HZXRMaW5rU3BlZWQgZmFpbGVkXG4iKTsKKyAgICByZXQgPSAwOworICAgIH0KKyAgZWxzZQorICAgIHsKKyAgICByZXQgPSAxOworICAgIH0KKworICBwX21hYy0+RU1BQ19DVEwgJj0gfkFUOTFDX0VNQUNfTVBFOworICByZXR1cm4gcmV0OworCisgIH0KKworCityYmZfdCogcmJmZHQ7CityYmZfdCogcmJmcDsKKworaW50IGV0aF9pbml0KCBiZF90ICpiZCApCisgIHsKKyAgaW50IHJldDsKKyAg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AgICAgIFNPRlRXQVJFIEFQSSBERUZJTklUSU9OICBGT1IgVGltZXIgQ291bnRlciBDaGFubmVsIEludGVyZmFjZSAqLworLyogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCit0eXBlZGVmIHN0cnVjdCBfQVQ5MVNfVEMgeworCUFUOTFfUkVHCSBUQ19DQ1I7IAkvKiAgQ2hhbm5lbCBDb250cm9sIFJlZ2lzdGVyICovCisJQVQ5MV9SRUcJIFRDX0NNUjsgCS8qICBDaGFubmVsIE1vZGUgUmVnaXN0ZXIgKi8KKwlBVDkxX1JFRwkgUmVzZXJ2ZWQwWzJdOyAJLyogICAqLworCUFUOTFfUkVHCSBUQ19DVjsgCS8qICBDb3VudGVyIFZhbHVlICovCisJQVQ5MV9SRUcJIFRDX1JBOyAJLyogIFJlZ2lzdGVyIEEgKi8KKwlBVDkxX1JFRwkgVENfUkI7IAkvKiAgUmVnaXN0ZXIgQiAqLworCUFUOTFfUkVHCSBUQ19SQzsgCS8qICBSZWdpc3RlciBDICovCisJQVQ5MV9SRUcJIFRDX1NSOyAJLyogIFN0YXR1cyBSZWdpc3RlciAqLworCUFUOTFfUkVHCSBUQ19JRVI7IAkvKiAgSW50ZXJydXB0IEVuYWJsZSBSZWdpc3RlciAqLworCUFUOTFfUkVHCSBUQ19JRFI7IAkvKiAgSW50ZXJydXB0IERpc2FibGUgUmVnaXN0ZXIgKi8KKwlBVDkxX1JFRwkgVENfSU1SOyAJLyogIEludGVycnVwdCBNYXNrIFJlZ2lzdGVyICovCit9IEFUOTFTX1RDLCAqQVQ5MVBTX1RDOworCisvKiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qICAgICAgICAgICAgICAgU09GVFdBUkUgQVBJIERFRklOSVRJT04gIEZPUiBVc2FydCAqLworLyogIC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fUkVHCSBSZXNlcnZlZDRbMV07IAkvKiAgICovCisJQVQ5MV9SRUcJIFBJT19BU1I7IAkvKiAgU2VsZWN0IEEgUmVnaXN0ZXIgKi8KKwlBVDkxX1JFRwkgUElPX0JTUjsgCS8qICBTZWxlY3QgQiBSZWdpc3RlciAqLworCUFUOTFfUkVHCSBQSU9fQUJTUjsgCS8qICBBQiBTZWxlY3QgU3RhdHVzIFJlZ2lzdGVyICovCisJQVQ5MV9SRUcJIFJlc2VydmVkNVs5XTsgCS8qICAgKi8KKwlBVDkxX1JFRwkgUElPX09XRVI7IAkvKiAgT3V0cHV0IFdyaXRlIEVuYWJsZSBSZWdpc3RlciAqLworCUFUOTFfUkVHCSBQSU9fT1dEUjsgCS8qICBPdXRwdXQgV3JpdGUgRGlzYWJsZSBSZWdpc3RlciAqLworCUFUOTFfUkVHCSBQSU9fT1dTUjsgCS8qICBPdXRwdXQgV3JpdGUgU3RhdHVzIFJlZ2lzdGVyICovCit9IEFUOTFTX1BJTywgKkFUOTFQU19QSU87CisKKworLyogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiAgICAgICAgICAgICAgIFNPRlRXQVJFIEFQSSBERUZJTklUSU9OICBGT1IgRGVidWcgVW5pdCAqLworLyogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCit0eXBlZGVmIHN0cnVjdCBfQVQ5MVNfREJHVSB7CisJQVQ5MV9SRUcJIERCR1VfQ1I7IAkvKiAgQ29udHJvbCBSZWdpc3RlciAqLworCUFUOTFfUkVHCSBEQkdVX01SOyAJLyogIE1vZGUgUmVnaXN0ZXIgKi8KKwlBVDkxX1JFRwkgREJHVV9JRVI7IAkvKiAgSW50ZXJydXB0IEVuYWJsZSBSZWdpc3RlciAqLworCUFUOTFfUkVHCSBEQkdVX0lEU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CBQb2ludGVyIFJlZ2lzdGVyICovCisJQVQ5MV9SRUcJIERCR1VfUk5DUjsgCS8qICBSZWNlaXZlIE5leHQgQ291bnRlciBSZWdpc3RlciAqLworCUFUOTFfUkVHCSBEQkdVX1ROUFI7IAkvKiAgVHJhbnNtaXQgTmV4dCBQb2ludGVyIFJlZ2lzdGVyICovCisJQVQ5MV9SRUcJIERCR1VfVE5DUjsgCS8qICBUcmFuc21pdCBOZXh0IENvdW50ZXIgUmVnaXN0ZXIgKi8KKwlBVDkxX1JFRwkgREJHVV9QVENSOyAJLyogIFBEQyBUcmFuc2ZlciBDb250cm9sIFJlZ2lzdGVyICovCisJQVQ5MV9SRUcJIERCR1VfUFRTUjsgCS8qICBQREMgVHJhbnNmZXIgU3RhdHVzIFJlZ2lzdGVyICovCit9IEFUOTFTX0RCR1UsICpBVDkxUFNfREJHVTsKKworCisvKiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogKi8KKy8qICAgICAgICAgICAgICAgU09GVFdBUkUgQVBJIERFRklOSVRJT04gIEZPUiBTdGF0aWMgTWVtb3J5IENvbnRyb2xsZXIgMiBJbnRlcmZhY2UgKi8KKy8qICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAqLwordHlwZWRlZiBzdHJ1Y3QgX0FUOTFTX1NNQzIgeworCUFUOTFfUkVHCSBTTUMyX0NTUls4XTsgCS8qICBTTUMyIENoaXAgU2VsZWN0IFJlZ2lzdGVyICovCit9IEFUOTFTX1NNQzIsICpBVDkxUFNfU01DMjsKKworLyogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqICovCisvKiAgICAgICAgICAgICAgIFNPRlRXQVJFIEFQSSBERUZJTklUSU9OICBGT1IgRX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AqLworI2RlZmluZSBBVDkxQ19VU19SU1RUWCAgICAgICAgKCh1bnNpZ25lZCBpbnQpIDB4MSA8PCAgMykgLyogIChEQkdVKSBSZXNldCBUcmFuc21pdHRlciAqLworI2RlZmluZSBBVDkxQ19VU19SWEVOICAgICAgICAgKCh1bnNpZ25lZCBpbnQpIDB4MSA8PCAgNCkgLyogIChEQkdVKSBSZWNlaXZlciBFbmFibGUgKi8KKyNkZWZpbmUgQVQ5MUNfVVNfUlhESVMgICAgICAgICgodW5zaWduZWQgaW50KSAweDEgPDwgIDUpIC8qICAoREJHVSkgUmVjZWl2ZXIgRGlzYWJsZSAqLworI2RlZmluZSBBVDkxQ19VU19UWEVOICAgICAgICAgKCh1bnNpZ25lZCBpbnQpIDB4MSA8PCAgNikgLyogIChEQkdVKSBUcmFuc21pdHRlciBFbmFibGUgKi8KKyNkZWZpbmUgQVQ5MUNfVVNfVFhESVMgICAgICAgICgodW5zaWduZWQgaW50KSAweDEgPDwgIDcpIC8qICAoREJHVSkgVHJhbnNtaXR0ZXIgRGlzYWJsZSAqLworCisjZGVmaW5lIAlBVDkxQ19VU19DTEtTX0NMT0NLICAgICAgICAgICAgICAgICgodW5zaWduZWQgaW50KSAweDAgPDwgIDQpIC8qICAoVVNBUlQpIENsb2NrICovCisjZGVmaW5lIAlBVDkxQ19VU19DSFJMXzhfQklUUyAgICAgICAgICAgICAgICgodW5zaWduZWQgaW50KSAweDMgPDwgIDYpIC8qICAoVVNBUlQpIENoYXJhY3RlciBMZW5ndGg6IDggYml0cyAqLworI2RlZmluZSAJQVQ5MUNfVVNfUEFSX05PTkUgICAgICAgICAgICAgICAgICgodW5zaWduZWQgaW50KSAweDQgPDwgIDkpIC8qICAoREJHVSkgTm8gUGFyaXR5ICovCisjZGVmaW5lIAlBVDkxQ19VU19OQlNUT1BfMV9CSVQgICAgICAgICAgICAgICAgKCh1bnNpZ25lZCBpbnQpIDB4MCA8PCAxMikgLyogIChVU0FSVCkgMSBzdG9wIGJpdCA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gICAgIC8qIFBBICA0ICovCisKKyNkZWZpbmUgUEJfRU5FVF9URU5BICAgICgodWludCkweDAwMDAyMDAwKSAgICAgIC8qIFBCIDE4ICovCisKKyNkZWZpbmUgUENfRU5FVF9DTFNOICAgICgodXNob3J0KTB4MDA0MCkgICAgICAgIC8qIFBDICA5ICovCisjZGVmaW5lIFBDX0VORVRfUkVOQSAgICAoKHVzaG9ydCkweDAwODApICAgICAgICAvKiBQQyAgOCAqLworLyogQ29udHJvbCBiaXRzIGluIHRoZSBTSUNSIHRvIHJvdXRlIFRDTEsgKENMSzMpIGFuZCBSQ0xLIChDTEsxKSB0bworICogICogICogICogU0NDMi4gIEFsc28sIG1ha2Ugc3VyZSBHUjIgKGJpdCAxNikgYW5kIFNDMiAoYml0IDE3KSBhcmUgemVyby4KKyAqICAgKiAgICogICAqLworI2RlZmluZSBTSUNSX0VORVRfTUFTSyAgKCh1aW50KTB4MDAwMGZmMDApCisjZGVmaW5lIFNJQ1JfRU5FVF9DTEtSVCAoKHVpbnQpMHgwMDAwMzcwMCkKKworIyBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBVc2UgRkVDIGZvciBGYXN0IEV0aGVybmV0ICovCisKKyN1bmRlZiAgU0NDX0VORVQKKyNkZWZpbmUgRkVDX0VORVQKKworI2RlZmluZSBQRF9NSUlfVFhEMSAgICAgKCh1c2hvcnQpMHgxMDAwKSAgICAgICAgLyogUEQgIDMgKi8KKyNkZWZpbmUgUERfTUlJX1RYRDIgICAgICgodXNob3J0KTB4MDgwMCkgICAgICAgIC8qIFBEICA0ICovCisjZGVmaW5lIFBEX01JSV9UWEQzICAgICAoKHVzaG9ydCkweDA0MDApICAgICAgICAvKiBQRCAgNSAqLworI2RlZmluZSBQRF9NSUlfUlhfRFYgICAgKCh1c2hvcnQpMHgwMjAwKSAgICAgICAgLyogUEQgIDYgKi8KKyNkZWZpbmUgUERfTUlJX1JYX0VSUiAgICgodXNob3J0KTB4MDEwMCkgICAgICAgIC8q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ExpY2Vuc2UKKyAqIGFsb25nIHdpdGggdGhpcyBwcm9ncmFtOyBpZiBub3QsIHdyaXRlIHRvIHRoZSBGcmVlIFNvZnR3YXJlCisgKiBGb3VuZGF0aW9uLCBJbmMuLCA1OSBUZW1wbGUgUGxhY2UsIFN1aXRlIDMzMCwgQm9zdG9uLAorICogTUEgMDIxMTEtMTMwNyBVU0EKKyAqLworCisvKgorICogYm9hcmQvY29uZmlnLmggLSBjb25maWd1cmF0aW9uIG9wdGlvbnMsIGJvYXJkIHNwZWNpZmljLAorICogICAgICAgICAgICAgICAgICBmb3IgU2lub1ZlZSBNaWNyb3N5c3RlbXMgU0M4eHggc2VyaWVzIFNCQworICogICAgICAgICAgICAgICAgICBodHRwOi8vd3d3LmZlbC5jb20uY24gKENoaW5lc2UpCisgKiAgICAgICAgICAgICAgICAgIGh0dHA6Ly93d3cuc2lub3ZlZS5jb20gKEVuZ2xpc2gpCisgKi8KKworI2lmbmRlZiBfX0NPTkZJR19ICisjZGVmaW5lIF9fQ09ORklHX0gKKworLyogQ3VzdG9tIGNvbmZpZ3VyYXRpb24gKi8KKy8qIFNDODIzLFNDODUwLFNDODYwU0FSLCBGRUw4eHgtQVQoODIzLzg1MC84NjApICovCisvKiBTQzg1VCxTQzg2MFQsIEZFTDh4eC1BVCg4NTVULzg2MFQpICovCisvKiNkZWZpbmUgQ09ORklHX0ZFTDh4eF9BVCAqLworLyojZGVmaW5lIENPTkZJR19MQ0QgKi8KKy8qIGlmIGNvcmUgPiA1ME1IeiAsIHVuLWNvbW1lbnQgQ09ORklHX0JVU19ESVYyICovCisvKiAjZGVmaW5lIENPTkZJR181ME1IeiAqLworLyogI2RlZmluZSBDT05GSUdfNjZNSHogKi8KKy8qICNkZWZpbmUgQ09ORklHXzc1TUh6ICovCisjZGVmaW5lIENPTkZJR184ME1IegorLyojZGVmaW5lIENPTkZJR18xMDBNSHogKi8KKy8qICNkZWZpbmUgQ09ORklHX0JVU19ESVYyCTEgKi8KKy8qIGZv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GVmCUNPTkZJR184eHhfQ09OU19TTUMyCisjdW5kZWYJQ09ORklHXzh4eF9DT05TX05PTkUKKyNkZWZpbmUgQ09ORklHX0JBVURSQVRFCQkxOTIwMAkvKiBjb25zb2xlIGJhdWRyYXRlID0gMTE1a2JwcwkqLworI2lmIDAKKyNkZWZpbmUgQ09ORklHX0JPT1RERUxBWQktMQkvKiBhdXRvYm9vdCBkaXNhYmxlZAkJKi8KKyNlbHNlCisjZGVmaW5lIENPTkZJR19CT09UREVMQVkJMQkvKiBhdXRvYm9vdCBhZnRlciA1IHNlY29uZHMJKi8KKyNlbmRpZgorCisjZGVmaW5lCUNPTkZJR19DTE9DS1NfSU5fTUhaCTEJLyogY2xvY2tzIHBhc3NzZWQgdG8gTGludXggaW4gTUh6ICovCisKKyNkZWZpbmUgQ09ORklHX0JPQVJEX1RZUEVTICAgICAgMSAgICAgICAvKiBzdXBwb3J0IGJvYXJkIHR5cGVzICAgICAgICAgICovCisKKyNkZWZpbmUgQ09ORklHX1BSRUJPT1QJImVjaG87ZWNobyBXZWxjb21lIHRvIFUtQm9vdCBTVk0gcG9ydDtlY2hvO2VjaG8gVHlwZSBcIj8gb3IgaGVscFwiIHRvIGdldCBvbi1saW5lIGhlbHA7ZWNobyIKKworI3VuZGVmCUNPTkZJR19CT09UQVJHUworI2RlZmluZSBDT05GSUdfRVhUUkFfRU5WX1NFVFRJTkdTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAibmZzYXJncz1zZXRlbnYgYm9vdGFyZ3Mgcm9vdD0vZGV2L25mcyBydyAiICAgICAgICAgICAgICAgICAgICAgXAorICAgICAgICAgIm5mc3Jvb3Q9JChzZXJ2ZXJpcCk6JChyb290cGF0aClcMCIgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICJyYW1hcmdzPXNldGVudiBib290YXJncyByb290PS9kZXYvcmFtIHJ3XDAiICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICJhZGRpcD1zZXRlbnYgYm9vdGFyZ3MgJChib290YXJncykgIiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAiaXA9JChpcGFkZHIpOiQoc2VydmVyaXApOiQoZ2F0ZXdheWlwKTokKG5ldG1hc2spIiAgICAgIFwKKyAgICAgICAgICAgICAgICAiOiQoaG9zdG5hbWUpOiQobmV0ZGV2KTpvZmYgcGFuaWM9MVwwIiAgICAgICAgICAgICAgICAgIFwKKwkgICAgICAgICJmbGFzaF9uZnM9cnVuIG5mc2FyZ3MgYWRkaXA7IiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgImJvb3RtICQoa2VybmVsX2FkZHIpXDAiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICJmbGFzaF9zZWxmPXJ1biByYW1hcmdzIGFkZGlwOyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICAgICAgICAiYm9vdG0gJChrZXJuZWxfYWRkcikgJChyYW1kaXNrX2FkZHIpXDAiICAgICAgICAgICAgICAgIFwKKyAgICAgICAgIm5ldF9uZnM9dGZ0cCAweDIxMDAwMCAkKGJvb3RmaWxlKTtydW4gbmZzYXJncyBhZGRpcDtib290bVwwIiAgICAgXAorICAgICAgICAicm9vdHBhdGg9L29wdC9zaW5vdmVlL3BwYzh4eC1saW51eC0yLjAvdGFyZ2V0XDAiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKyAgICAgICAgImJvb3RmaWxlPXBJbWFnZS1zYzg1NXRcMCIgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICJrZXJuZWxfYWRkcj00ODAwMDAwMFwwIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgICJyYW1kaXNrX2FkZHI9NDgxMDAwMDBcMCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisgICAgICAgIC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