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Vk0pCisJCXJldHVybiAtRU5PU1lTOworCXJ5ID0gLTE7CisJYXNtIHZvbGF0aWxlKAorCQkJImRpYWcgJTEsJTAsMHhEQ1xuXHQiCisJCQk6ICI9ZCIgKHJ5KSA6ICJkIiAoJihhcHBsZGF0YV9wYXJhbWV0ZXJfbGlzdCkpIDogImNjIik7CisJcmV0dXJuIChpbnQpIHJ5OworfQorLyoqKioqKioqKioqKioqKioqKioqKiogdGltZXIsIHRhc2tsZXQsIERJQUcgPEVORD4gKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogL3Byb2Mgc3R1ZmYgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyoKKyAqIGFwcGxkYXRhX21vZF92dGltZXJfd3JhcCgpCisgKgorICogd3JhcHBlciBmdW5jdGlvbiBmb3IgbW9kX3ZpcnRfdGltZXIoKSwgYmVjYXVzZSBzbXBfY2FsbF9mdW5jdGlvbl9vbigpCisgKiBhY2NlcHRzIG9ubHkgb25lIHBhcmFtZXRlci4KKyAqLworc3RhdGljIHZvaWQgX19hcHBsZGF0YV9tb2RfdnRpbWVyX3dyYXAodm9pZCAqcCkgeworCXN0cnVjdCB7CisJCXN0cnVjdCB2dGltZXJfbGlzdCAqdGltZXI7CisJCXU2NCAgICBleHBpcmVzOworCX0gKmFyZ3MgPSBwOworCW1vZF92aXJ0X3RpbWVyKGFyZ3MtPnRpbWVyLCBhcmdzLT5leHBpcmVzKTsKK30KKworI2RlZmluZSBBUFBMREFUQV9BRERfVElNRVIJMAorI2RlZmluZSBBUFBMREFUQV9ERUxfVElNRVIJMQorI2RlZmluZSBBUFBMREFUQV9NT0RfVElNRVIJMgorCisvKgorICogX19hcHBsZGF0YV92dGltZXJfc2V0dXAoKQorICoKKyAqIEFkZCwgZGVsZXRlIG9yIG1vZGlmeSB2aXJ0dWFsIHRpbWVycyBvbiBhbGwgb25saW5lIGNwdXMuCisgKiBUaGU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b3duZXIpOworCX0KKwlzcGluX3VubG9ja19iaCgmYXBwbGRhdGFfb3BzX2xvY2spOworb3V0OgorCSpsZW5wID0gbGVuOworCSpwcG9zICs9IGxlbjsKKwltb2R1bGVfcHV0KG9wcy0+b3duZXIpOworCXJldHVybiAwOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqIC9wcm9jIHN0dWZmIDxFTkQ+ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKiogbW9kdWxlLW9wcyBtYW5hZ2VtZW50ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoKKyAqIGFwcGxkYXRhX3JlZ2lzdGVyX29wcygpCisgKgorICogdXBkYXRlIG9wcyBsaXN0LCByZWdpc3RlciAvcHJvYy9zeXMgZW50cmllcworICovCitpbnQgYXBwbGRhdGFfcmVnaXN0ZXJfb3BzKHN0cnVjdCBhcHBsZGF0YV9vcHMgKm9wcykKK3sKKwlzdHJ1Y3QgbGlzdF9oZWFkICpsaDsKKwlzdHJ1Y3QgYXBwbGRhdGFfb3BzICp0bXBfb3BzOworCWludCBpOworCisJaSA9IDA7CisKKwlpZiAoKG9wcy0+c2l6ZSA+IEFQUExEQVRBX01BWF9SRUNfU0laRSkgfHwKKwkJKG9wcy0+c2l6ZSA8IDApKXsKKwkJUF9FUlJPUigiSW52YWxpZCBzaXplIG9mICVzIHJlY29yZCA9ICVpLCBtYXhpbXVtID0gJWkhXG4iLAorCQkJb3BzLT5uYW1lLCBvcHMtPnNpemUsIEFQUExEQVRBX01BWF9SRUNfU0laRSk7CisJCXJldHVybiAtRU5PTUVNOworCX0KKwlpZiAoKG9wcy0+Y3RsX25yID09IENUTF9BUFBMREFUQSkgfHwKKwkgICAgKG9wcy0+Y3RsX25yID09IENUTF9BUFBMREFUQV9USU1FUikgfHwKKwkgICAgKG9wcy0+Y3RsX25yID09IENUTF9BUFBMREFUQV9JTlRFUlZBTCkpIHsKKwkJUF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gICAgICAgIGVycm9yID0gUFRSX0VSUihmaWxlbmFtZSk7CisgICAgICAgIGlmIChJU19FUlIoZmlsZW5hbWUpKQorICAgICAgICAgICAgICAgIGdvdG8gb3V0OworICAgICAgICBlcnJvciA9IGNvbXBhdF9kb19leGVjdmUoZmlsZW5hbWUsIGNvbXBhdF9wdHIocmVncy5ncHJzWzNdKSwKKwkJCQkgY29tcGF0X3B0cihyZWdzLmdwcnNbNF0pLCAmcmVncyk7CisJaWYgKGVycm9yID09IDApCisJeworCQl0YXNrX2xvY2soY3VycmVudCk7CisJCWN1cnJlbnQtPnB0cmFjZSAmPSB+UFRfRFRSQUNFOworCQl0YXNrX3VubG9jayhjdXJyZW50KTsKKwkJY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjPTA7CisJCV9fYXNtX18gX192b2xhdGlsZV9fCisJCSAgICAgICAgKCJzciAgMCwwXG5cdCIKKwkJICAgICAgICAgInNmcGMgMCwwXG5cdCIKKwkJCSA6IDogOiIwIik7CisJfQorICAgICAgICBwdXRuYW1lKGZpbGVuYW1lKTsKK291dDoKKyAgICAgICAgcmV0dXJuIGVycm9yOworfQorCisKKyNpZmRlZiBDT05GSUdfTU9EVUxFUworCithc21saW5rYWdlIGxvbmcKK3N5czMyX2luaXRfbW9kdWxlKHZvaWQgX191c2VyICp1bW9kLCB1bnNpZ25lZCBsb25nIGxlbiwKKwkJY29uc3QgY2hhciBfX3VzZXIgKnVhcmdzKQoreworCXJldHVybiBzeXNfaW5pdF9tb2R1bGUodW1vZCwgbGVuLCB1YXJncyk7Cit9CisKK2FzbWxpbmthZ2UgbG9uZworc3lzMzJfZGVsZXRlX21vZHVsZShjb25zdCBjaGFyIF9fdXNlciAqbmFtZV91c2VyLCB1bnNpZ25lZCBpbnQgZmxhZ3MpCit7CisJcmV0dXJuIHN5c19kZWxldGVfbW9kdWxlKG5hbWVfdXNlciwgZmxhZ3MpOworfQorCisjZWxzZSAvKiBDT05GSUdfTU9EVUxFUyAqLworCith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ICh2b2lkICopQSh0bXAubmV3dmFsKSwgdG1wLm5ld2xlbik7CisJdW5sb2NrX2tlcm5lbCgpOworCWlmIChvbGRsZW5wKSB7CisJCWlmICghZXJyb3IpIHsKKwkJCWlmIChnZXRfdXNlcihvbGRsZW4sIChzaXplX3QgKilhZGRyKSB8fAorCQkJICAgIHB1dF91c2VyKG9sZGxlbiwgKHUzMiAqKUEodG1wLm9sZGxlbnApKSkKKwkJCQllcnJvciA9IC1FRkFVTFQ7CisJCX0KKwkJY29weV90b191c2VyKGFyZ3MtPl9fdW51c2VkLCB0bXAuX191bnVzZWQsIHNpemVvZih0bXAuX191bnVzZWQpKTsKKwl9CisJcmV0dXJuIGVycm9yOworfQorI2VuZGlmCisKK3N0cnVjdCBzdGF0NjRfZW11MzEgeworCXVuc2lnbmVkIGxvbmcgbG9uZyAgc3RfZGV2OworCXVuc2lnbmVkIGludCAgICBfX3BhZDE7CisjZGVmaW5lIFNUQVQ2NF9IQVNfQlJPS0VOX1NUX0lOTyAgICAgICAgMQorCXUzMiAgICAgICAgICAgICBfX3N0X2lubzsKKwl1bnNpZ25lZCBpbnQgICAgc3RfbW9kZTsKKwl1bnNpZ25lZCBpbnQgICAgc3Rfbmxpbms7CisJdTMyICAgICAgICAgICAgIHN0X3VpZDsKKwl1MzIgICAgICAgICAgICAgc3RfZ2lkOworCXVuc2lnbmVkIGxvbmcgbG9uZyAgc3RfcmRldjsKKwl1bnNpZ25lZCBpbnQgICAgX19wYWQzOworCWxvbmcgICAgICAgICAgICBzdF9zaXplOworCXUzMiAgICAgICAgICAgICBzdF9ibGtzaXplOworCXVuc2lnbmVkIGNoYXIgICBfX3BhZDRbNF07CisJdTMyICAgICAgICAgICAgIF9fcGFkNTsgICAgIC8qIGZ1dHVyZSBwb3NzaWJsZSBzdF9ibG9ja3MgaGlnaCBiaXRzICovCisJdTMyICAgICAgICAgICAgIHN0X2Jsb2NrczsgIC8qIE51bWJlciA1MTItYnl0ZSBibG9ja3MgYWxsb2Nhd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Y3BjbWRfYnVmWzI0MF07CisKKy8qCisgKiB0aGUgY2FsbGVyIG9mIF9fY3BjbWQgaGFzIHRvIGVuc3VyZSB0aGF0IHRoZSByZXNwb25zZSBidWZmZXIgaXMgYmVsb3cgMiBHQgorICovCit2b2lkIF9fY3BjbWQoY2hhciAqY21kLCBjaGFyICpyZXNwb25zZSwgaW50IHJsZW4pCit7CisJY29uc3QgaW50IG1hc2sgPSAweDQwMDAwMDAwTDsKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCWludCBjbWRsZW47CisKKwlzcGluX2xvY2tfaXJxc2F2ZSgmY3BjbWRfbG9jaywgZmxhZ3MpOworCWNtZGxlbiA9IHN0cmxlbihjbWQpOworCUJVR19PTihjbWRsZW4gPiAyNDApOworCXN0cmNweShjcGNtZF9idWYsIGNtZCk7CisJQVNDRUJDKGNwY21kX2J1ZiwgY21kbGVuKTsKKworCWlmIChyZXNwb25zZSAhPSBOVUxMICYmIHJsZW4gPiAwKSB7CisJCW1lbXNldChyZXNwb25zZSwgMCwgcmxlbik7CisjaWZuZGVmIENPTkZJR19BUkNIX1MzOTBYCisJCWFzbSB2b2xhdGlsZSAoIkxSQSAgIDIsMCglMClcblx0IgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkxSICAgIDQsJTFcblx0IgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIk8gICAgIDQsJTRcblx0IgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkxSQSAgIDMsMCglMilcblx0IgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIkxSICAgIDUsJTNcblx0IgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIi5sb25nIDB4ODMyNDAwMDggIyBEaWFnbm9zZSBYJzA4J1xuXHQiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC8qIG5vIG91dHB1dCAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiYSIgKGNwY21kX2J1ZiksICJkIiAoY21kbGVuKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImEiIChyZXNwb25zZSksICJkIiAocmxlbiksICJtIiAobWFzaykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogImNjIiwgIjIiLCAiMyIsICI0IiwgIjUiICk7CisjZWxzZSAvKiBDT05GSUdfQVJDSF9TMzkwWCAqLworICAgICAgICAgICAgICAgIGFzbSB2b2xhdGlsZSAoIiAgIGxyYWcgIDIsMCglMClcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgICBsZ3IgICA0LCUxXG4iCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICAgbyAgICAgNCwlNFxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiAgIGxyYWcgIDMsMCglMilcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgICBsZ3IgICA1LCUzXG4iCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICAgc2FtMzFcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgICAubG9uZyAweDgzMjQwMDA4ICMgRGlhZ25vc2UgWCcwOCdcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgICBzYW02NCIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogLyogbm8gb3V0cHV0ICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICJhIiAoY3BjbWRfYnVmKSwgImQiIChjbWRsZW4pLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiYSIgKHJlc3BvbnNlKSwgImQiIChybGVuKSwgIm0iIChtYXNrKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiY2MiLCAiMiIsICIzIiwgIjQiLCAiNSIgKTsKKyNlbmRpZiAvKiBDT05GSUdfQVJDSF9TMzkwWCAqLworICAgICAgICAgICAgICAgIEVCQ0FTQyhyZXNwb25zZSwgcmxlbik7CisgICAgICAgIH0gZWxzZSB7CisjaWZuZGVmIENPTkZJR19BUkNIX1MzOTBYCisgICAgICAgICAgICAgICAgYXNtIHZvbGF0aWxlICgiTFJBICAgMiwwKCUwKVxuXHQiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiTFIgICAgMywlMVxuXHQiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiLmxvbmcgMHg4MzIzMDAwOCAjIERpYWdub3NlIFgnMDgnXG5cdCIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogLyogbm8gb3V0cHV0ICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICJhIiAoY3BjbWRfYnVmKSwgImQiIChjbWRsZW4pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICIyIiwgIjMiICApOworI2Vsc2UgLyogQ09ORklHX0FSQ0hfUzM5MFggKi8KKyAgICAgICAgICAgICAgICBhc20gdm9sYXRpbGUgKCIgICBscmFnICAyLDAoJTApXG4iCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICAgbGdyICAgMywlMVxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiAgIHNhbTMxXG4iCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICAgLmxvbmcgMHg4MzIzMDAwOCAjIERpYWdub3NlIFgnMDgnXG4iCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICAgc2FtNjQiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IC8qIG5vIG91dHB1dCAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiYSIgKGNwY21kX2J1ZiksICJkIiAoY21kbGVuKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAiMiIsICIzIiAgKTsKKyNlbmRpZiAvKiBDT05GSUdfQVJDSF9TMzkwWCAqLworICAgICAgICB9CisJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmY3BjbWRfbG9jaywgZmxhZ3MpOworfQorCitFWFBPUlRfU1l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ZCBlbGVtZW50IHRvIGVuZCBvZiBsaXN0ICovCisgICAgICAgICAgICAgICAgZGVidWdfYXJlYV9sYXN0LT5uZXh0ID0gcmM7CisgICAgICAgICAgICAgICAgcmMtPnByZXYgPSBkZWJ1Z19hcmVhX2xhc3Q7CisgICAgICAgIH0KKyAgICAgICAgZGVidWdfYXJlYV9sYXN0ID0gcmM7CisgICAgICAgIHJjLT5uZXh0ID0gTlVMTDsKKworCWRlYnVnX2luZm9fZ2V0KHJjKTsKK291dDoKKwlyZXR1cm4gcmM7Cit9CisKKy8qCisgKiBkZWJ1Z19pbmZvX2NvcHkKKyAqIC0gY29weSBkZWJ1Zy1pbmZvCisgKi8KKworc3RhdGljIGRlYnVnX2luZm9fdCogZGVidWdfaW5mb19jb3B5KGRlYnVnX2luZm9fdCogaW4pCit7CisgICAgICAgIGludCBpOworICAgICAgICBkZWJ1Z19pbmZvX3QqIHJjOworICAgICAgICByYyA9IGRlYnVnX2luZm9fYWxsb2MoaW4tPm5hbWUsIGluLT5wYWdlX29yZGVyLCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW4tPm5yX2FyZWFzLCBpbi0+YnVmX3NpemUpOworICAgICAgICBpZighcmMpCisgICAgICAgICAgICAgICAgZ290byBvdXQ7CisKKyAgICAgICAgZm9yKGkgPSAwOyBpIDwgaW4tPm5yX2FyZWFzOyBpKyspeworICAgICAgICAgICAgICAgIG1lbWNweShyYy0+YXJlYXNbaV0saW4tPmFyZWFzW2ldLCBQQUdFX1NJWkUgPDwgaW4tPnBhZ2Vfb3JkZXIpOworICAgICAgICB9CitvdXQ6CisgICAgICAgIHJldHVybiByYzsKK30KKworLyoKKyAqIGRlYnVnX2luZm9fZ2V0CisgKiAtIGluY3JlbWVudHMgcmVmZXJlbmNlIGNvdW50IGZvciBkZWJ1Zy1pbmZvCisgKi8KKworc3RhdGljIHZvaWQgZGVidWdfaW5mb19nZXQoZGVidWdfaW5mb190ICogZGJfaW5mbykKK3sKKwlpZi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W5mb190ICogaWQpCit7CisJaWYgKCFpZCkKKwkJZ290byBvdXQ7CisJZG93bigmZGVidWdfbG9jayk7CisjaWZkZWYgREVCVUcKKwlwcmludGsoS0VSTl9JTkZPICJkZWJ1ZzogdW5yZWdpc3RlcmluZyAlc1xuIiwgaWQtPm5hbWUpOworI2VuZGlmCisJZGVidWdfaW5mb19wdXQoaWQpOworCXVwKCZkZWJ1Z19sb2NrKTsKKworICAgICAgb3V0OgorCXJldHVybjsKK30KKworLyoKKyAqIGRlYnVnX3NldF9sZXZlbDoKKyAqIC0gc2V0IGFjdHVhbCBkZWJ1ZyBsZXZlbAorICovCisKK3ZvaWQgZGVidWdfc2V0X2xldmVsKGRlYnVnX2luZm9fdCogaWQsIGludCBuZXdfbGV2ZWwpCit7CisJdW5zaWduZWQgbG9uZyBmbGFnczsKKwlpZighaWQpCisJCXJldHVybjsJCisJc3Bpbl9sb2NrX2lycXNhdmUoJmlkLT5sb2NrLGZsYWdzKTsKKyAgICAgICAgaWYobmV3X2xldmVsID09IERFQlVHX09GRl9MRVZFTCl7CisgICAgICAgICAgICAgICAgaWQtPmxldmVsID0gREVCVUdfT0ZGX0xFVkVMOworICAgICAgICAgICAgICAgIHByaW50ayhLRVJOX0lORk8gImRlYnVnOiAlczogc3dpdGNoZWQgb2ZmXG4iLGlkLT5uYW1lKTsKKyAgICAgICAgfSBlbHNlIGlmICgobmV3X2xldmVsID4gREVCVUdfTUFYX0xFVkVMKSB8fCAobmV3X2xldmVsIDwgMCkpIHsKKyAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9JTkZPCisgICAgICAgICAgICAgICAgICAgICAgICAiZGVidWc6ICVzOiBsZXZlbCAlaSBpcyBvdXQgb2YgcmFuZ2UgKCVpIC0gJWkpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgaWQtPm5hbWUsIG5ld19sZXZlbCwgMCwgREVCVUdfTUFYX0xFVkVMKTsKKyAgICAgICAgfSBlbHNlIHsKKyAgICAgICAgICAgICAg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KyAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9JTkZPICJkZWJ1ZzogJXM6IGFsbCBhcmVhcyBmbHVzaGVkXG4iLGlkLT5uYW1lKTsKKyAgICAgICAgfSBlbHNlIGlmKGFyZWEgPj0gMCAmJiBhcmVhIDwgaWQtPm5yX2FyZWFzKSB7CisgICAgICAgICAgICAgICAgaWQtPmFjdGl2ZV9lbnRyeVthcmVhXSA9IDA7CisgICAgICAgICAgICAgICAgbWVtc2V0KGlkLT5hcmVhc1thcmVhXSwgMCwgUEFHRV9TSVpFIDw8IGlkLT5wYWdlX29yZGVyKTsKKyAgICAgICAgICAgICAgICBwcmludGsoS0VSTl9JTkZPCisgICAgICAgICAgICAgICAgICAgICAgICAiZGVidWc6ICVzOiBhcmVhICVpIGhhcyBiZWVuIGZsdXNoZWRcbiIsCisgICAgICAgICAgICAgICAgICAgICAgICBpZC0+bmFtZSwgYXJlYSk7CisgICAgICAgIH0gZWxzZSB7CisgICAgICAgICAgICAgICAgcHJpbnRrKEtFUk5fSU5GTworICAgICAgICAgICAgICAgICAgICAgICAgImRlYnVnOiAlczogYXJlYSAlaSBjYW5ub3QgYmUgZmx1c2hlZCAocmFuZ2U6ICVpIC0gJWkpXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgaWQtPm5hbWUsIGFyZWEsIDAsIGlkLT5ucl9hcmVhcy0xKTsKKyAgICAgICAgfQorICAgICAgICBzcGluX3VubG9ja19pcnFyZXN0b3JlKCZpZC0+bG9jayxmbGFncyk7Cit9CisKKy8qCisgKiB2aWV3IGZ1bmN0aW9uOiBmbHVzaGVzIGRlYnVnIGFyZWFzIAorICovCisKK3N0YXRpYyBpbnQgZGVidWdfaW5wdXRfZmx1c2hfZm4oZGVidWdfaW5mb190ICogaWQsIHN0cnVjdCBkZWJ1Z192aWV3ICp2aWV3LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgZmlsZSAqZmlsZSwgY29uc3QgY2hhciBfX3VzZXIgKnVzZXJfYnVmLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplX3QgaW5fYnVmX3NpemUsIGxvZmZfdCAqIG9mZnNldCkKK3sKKyAgICAgICAgY2hhciBpbnB1dF9idWZbMV07CisgICAgICAgIGludCByYyA9IGluX2J1Zl9zaXplOworIAorICAgICAgICBpZiAoKm9mZnNldCAhPSAwKQorICAgICAgICAgICAgICAgIGdvdG8gb3V0OworICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoaW5wdXRfYnVmLCB1c2VyX2J1ZiwgMSkpeworICAgICAgICAgICAgICAgIHJjID0gLUVGQVVMVDsKKyAgICAgICAgICAgICAgICBnb3RvIG91dDsKKyAgICAgICAgfQorICAgICAgICBpZihpbnB1dF9idWZbMF0gPT0gJy0nKSB7IAorICAgICAgICAgICAgICAgIGRlYnVnX2ZsdXNoKGlkLCBERUJVR19GTFVTSF9BTEwpOworICAgICAgICAgICAgICAgIGdvdG8gb3V0OworICAgICAgICB9CisgICAgICAgIGlmIChpc2RpZ2l0KGlucHV0X2J1ZlswXSkpIHsKKyAgICAgICAgICAgICAgICBpbnQgYXJlYSA9ICgoaW50KSBpbnB1dF9idWZbMF0gLSAoaW50KSAnMCcpOworICAgICAgICAgICAgICAgIGRlYnVnX2ZsdXNoKGlkLCBhcmVhKTsKKyAgICAgICAgICAgICAgICBnb3RvIG91dDsKKyAgICAgICAgfQorCisgICAgICAgIHByaW50ayhLRVJOX0lORk8gImRlYnVnOiBhcmVhIGAlY2AgaXMgbm90IHZhbGlkXG4iLCBpbnB1dF9idWZbMF0pOworCisgICAgICBvdXQ6CisgICAgICAgICpvZmZzZXQgKz0gaW5fYnVmX3NpemU7CisgICAgICAgIHJldHVybiByYzsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBpbnB1dCBjaGFyYWN0ZXJzICovCit9CisKKy8qCisgKiBwcmludHMgZGVidWcgaGVhZGVyIGluIHJhdyBmb3JtYXQKKyAqLworCitpbnQgZGVidWdfcm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KKyAgICAgMHgwMCwgMHgwMSwgMHgwMiwgMHgwMywgMHgzNywgMHgyRCwgMHgyRSwgMHgyRiwKKyAvKjA4ICBCUyAgICBIVCAgICBMRiAgICBWVCAgICBGRiAgICBDUiAgICBTTyAgICBTSSAqLworIC8qICAgICAgICAgICAgICAtPk5MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisgICAgIDB4MTYsIDB4MDUsIDB4MTUsIDB4MEIsIDB4MEMsIDB4MEQsIDB4MEUsIDB4MEYsCisgLyoxMCBETEUgICBEQzEgICBEQzIgICBEQzMgICBEQzQgICBOQUsgICBTWU4gICBFVEIgKi8KKyAgICAgMHgxMCwgMHgxMSwgMHgxMiwgMHgxMywgMHgzQywgMHgzRCwgMHgzMiwgMHgyNiwKKyAvKjE4IENBTiAgICBFTSAgIFNVQiAgIEVTQyAgICBGUyAgICBHUyAgICBSUyAgICBVUyAqLworIC8qICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0+SUdTIC0+SVJTIC0+SVVTICovCisgICAgIDB4MTgsIDB4MTksIDB4M0YsIDB4MjcsIDB4MjIsIDB4MUQsIDB4MUUsIDB4MUYsCisgLyoyMCAgU1AgICAgICEgICAgICIgICAgICMgICAgICQgICAgICUgICAgICYgICAgICcgKi8KKyAgICAgMHg0MCwgMHg1QSwgMHg3RiwgMHg3QiwgMHg1QiwgMHg2QywgMHg1MCwgMHg3RCwKKyAvKjI4ICAgKCAgICAgKSAgICAgKiAgICAgKyAgICAgLCAgICAgLSAgICAuICAgICAgLyAqLworICAgICAweDRELCAweDVELCAweDVDLCAweDRFLCAweDZCLCAweDYwLCAweDRCLCAweDYxLAorIC8qMzAgICAwICAgICAxICAgICAyICAgICAzICAgICA0ICAgICA1ICAgICA2ICAgICA3ICovCisgICAgIDB4RjAsIDB4RjEsIDB4RjIsIDB4RjMsIDB4RjQsIDB4RjUsIDB4RjYsIDB4RjcsCisgLyozOCAgIDggICAgIDkgICAgIDogICAgIDsgICAgIDwgICAgID0gICAgID4gICAgID8gKi8KKyAgICAgMHhGOCwgMHhGOSwgMHg3QSwgMHg1RSwgMHg0QywgMHg3RSwgMHg2RSwgMHg2RiwKKyAvKjQwICAgQCAgICAgQSAgICAgQiAgICAgQyAgICAgRCAgICAgRSAgICAgRiAgICAgRyAqLworICAgICAweDdDLCAweEMxLCAweEMyLCAweEMzLCAweEM0LCAweEM1LCAweEM2LCAweEM3LAorIC8qNDggICBIICAgICBJICAgICBKICAgICBLICAgICBMICAgICBNICAgICBOICAgICBPICovCisgICAgIDB4QzgsIDB4QzksIDB4RDEsIDB4RDIsIDB4RDMsIDB4RDQsIDB4RDUsIDB4RDYsCisgLyo1MCAgIFAgICAgIFEgICAgIFIgICAgIFMgICAgIFQgICAgIFUgICAgIFYgICAgIFcgKi8KKyAgICAgMHhENywgMHhEOCwgMHhEOSwgMHhFMiwgMHhFMywgMHhFNCwgMHhFNSwgMHhFNiwKKyAvKjU4ICAgWCAgICAgWSAgICAgWiAgICAgWyAgICAgXCAgICAgXSAgICAgXiAgICAgXyAqLworICAgICAweEU3LCAweEU4LCAweEU5LCAweEJBLCAweEUwLCAweEJCLCAweEIwLCAweDZELAorIC8qNjAgICBgICAgICBhICAgICBiICAgICBjICAgICBkICAgICBlICAgICBmICAgICBnICovCisgICAgIDB4NzksIDB4ODEsIDB4ODIsIDB4ODMsIDB4ODQsIDB4ODUsIDB4ODYsIDB4ODcsCisgLyo2OCAgIGggICAgIGkgICAgIGogICAgIGsgICAgIGwgICAgIG0gICAgIG4gICAgIG8gKi8KKyAgICAgMHg4OCwgMHg4OSwgMHg5MSwgMHg5MiwgMHg5MywgMHg5NCwgMHg5NSwgMHg5NiwKKyAvKjcwICAgcCAgICAgcSAgICAgciAgICAgcyAgICAgdCAgICAgdSAgICAgdiAgICAgdyAqLworICAgICAweDk3LCAweDk4LCAweDk5LCAweEEyLCAweEEzLCAweEE0LCAweEE1LCAweEE2LAorIC8qNzggICB4ICAgICB5ICAgICB6ICAgICB7ICAgICB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4M0YsIDB4M0YsIDB4M0YsCisgLypFMCAgICAgICAgc3oJCQkJCQkqLworICAgICAweDNGLCAweDU5LCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLAorIC8qRTgqLworICAgICAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLAorIC8qRjAqLworICAgICAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweDNGLAorIC8qRjgqLworICAgICAweDkwLCAweDNGLCAweDNGLCAweDNGLCAweDNGLCAweEVBLCAweDNGLCAweEZGCit9OworCisvKgorICogRUJDRElDIDAzNyAtPiBBU0NJSSAoSUJNIFBDIDQzNykKKyAqLworX191OCBfZWJjYXNjWzI1Nl0gPQoreworIC8qIDB4MDAgICBOVUwgICBTT0ggICBTVFggICBFVFggICpTRUwgICAgSFQgICpSTkwgICBERUwgKi8KKyAgICAgICAgICAweDAwLCAweDAxLCAweDAyLCAweDAzLCAweDA3LCAweDA5LCAweDA3LCAweDdGLAorIC8qIDB4MDggICAtR0UgIC1TUFMgIC1SUFQgICAgVlQgICAgRkYgICAgQ1IgICAgU08gICAgU0kgKi8KKyAgICAgICAgICAweDA3LCAweDA3LCAweDA3LCAweDBCLCAweDBDLCAweDBELCAweDBFLCAweDBGLAorIC8qIDB4MTAgICBETEUgICBEQzEgICBEQzIgICBEQzMgIC1SRVMgICAtTkwgICAgQlMgIC1QT0MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtRU5QICAtPkxGICAgICAgICAgICAgICovCisgICAgICAgICAgMHgxMCwgMHgxMSwgMHgxMiwgMHgxMywgMHgwNywgMHgwQSwgMHgwOCwgMHgwNywKKyAvKiAweDE4ICAgQ0FOICAgIEVNICAtVUJTICAtQ1UxICAtSUZTICAtSUdTICAtSVJTICAtSVRCCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLUlVUyAqLworICAgICAgICAgIDB4MTgsIDB4MTksIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsCisgLyogMHgyMCAgIC1EUyAgLVNPUyAgICBGUyAgLVdVUyAgLUJZUCAgICBMRiAgIEVUQiAgIEVTQworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC1JTlAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAweDA3LCAweDA3LCAweDFDLCAweDA3LCAweDA3LCAweDBBLCAweDE3LCAweDFCLAorIC8qIDB4MjggICAtU0EgIC1TRkUgICAtU00gIC1DU1AgIC1NRkEgICBFTlEgICBBQ0sgICBCRUwKKyAgICAgICAgICAgICAgICAgICAgICAgLVNXICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovIAorICAgICAgICAgIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDUsIDB4MDYsIDB4MDcsCisgLyogMHgzMCAgLS0tLSAgLS0tLSAgIFNZTiAgIC1JUiAgIC1QUCAgLVRSTiAgLU5CUyAgIEVPVCAqLworICAgICAgICAgIDB4MDcsIDB4MDcsIDB4MTYsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDQsCisgLyogMHgzOCAgLVNCUyAgIC1JVCAgLVJGRiAgLUNVMyAgIERDNCAgIE5BSyAgLS0tLSAgIFNVQiAqLworICAgICAgICAgIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MTQsIDB4MTUsIDB4MDcsIDB4MUEsCisgLyogMHg0MCAgICBTUCAgIFJTUCAgICAgICAgICAggeQgICAgICAgICAgICAgIC0tLS0gICAgICAgKi8KKyAgICAgICAgICAweDIwLCAweEZGLCAweDgzLCAweDg0LCAweDg1LCAweEEwLCAweDA3LCAweDg2LAorIC8qIDB4NDggICAgICAgICAgICAgICAgICAgICAgIC4gICAgIDwgICAgICggICAgICsgICAgIHwgKi8KKyAgICAgICAgICAweDg3LCAweEE0LCAweDlCLCAweDJFLCAweDNDLCAweDI4LCAweDJCLCAweDdDLAorIC8qIDB4NTAgICAgICYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tLS0gKi8KKyAgICAgICAgICAweDI2LCAweDgyLCAweDg4LCAweDg5LCAweDhBLCAweEExLCAweDhDLCAweDA3LAorIC8qIDB4NTggICAgICAgICAgIIHfICAgICAhICAgICAkICAgICAqICAgICApICAgICA7ICAgICAgICovCisgICAgICAgICAgMHg4RCwgMHhFMSwgMHgyMSwgMHgyNCwgMHgyQSwgMHgyOSwgMHgzQiwgMHhBQSwKKyAvKiAweDYwICAgICAtICAgICAvICAtLS0tICAgICCBxCAgLS0tLSAgLS0tLSAgLS0tLSAgICAgICAqLworICAgICAgICAgIDB4MkQsIDB4MkYsIDB4MDcsIDB4OEUsIDB4MDcsIDB4MDcsIDB4MDcsIDB4OEYsCisgLyogMHg2OCAgICAgICAgICAgICAgLS0tLSAgICAgLCAgICAgJSAgICAgXyAgICAgPiAgICAgPyAqLyAKKyAgICAgICAgICAweDgwLCAweEE1LCAweDA3LCAweDJDLCAweDI1LCAweDVGLCAweDNFLCAweDNGLAorIC8qIDB4NzAgIC0tLS0gICAgICAgIC0tLS0gIC0tLS0gIC0tLS0gIC0tLS0gIC0tLS0gIC0tLS0gKi8KKyAgICAgICAgICAweDA3LCAweDkwLCAweDA3LCAweDA3LCAweDA3LCAweDA3LCAweDA3LCAweDA3LAorIC8qIDB4NzggICAgICogICAgIGAgICAgIDogICAgICMgICAgIEAgICAgICcgICAgID0gICAgICIgKi8KKyAgICAgICAgICAweDcwLCAweDYwLCAweDNBLCAweDIzLCAweDQwLCAweDI3LCAweDNELCAweDIyLAorIC8qIDB4ODAgICAgICogICAgIGEgICAgIGIgICAgIGMgICAgIGQgICAgIGUgICAgIGYgICAgIGcgKi8KKyAgICAgICAgICAweDA3LCAweDYxLCAweDYyLCAweDYzLCAweDY0LCAweDY1LCAweDY2LCAweDY3LAorIC8qIDB4ODggICAgIGggICAgIGkgICAgICAgICAgICAgIC0tLS0gIC0tLS0gIC0tLS0gICAgICAgKi8KKyAgICAgICAgICAweDY4LCAweDY5LCAweEFFLCAweEFGLCAweDA3LCAweDA3LCAweDA3LCAweEYxLAorIC8qIDB4OTAgICAgIIGwICAgICBqICAgICBrICAgICBsICAgICBtICAgICBuICAgICBvICAgICBwICovCisgICAgICAgICAgMHhGOCwgMHg2QSwgMHg2QiwgMHg2QywgMHg2RCwgMHg2RSwgMHg2RiwgMHg3MCwKKyAvKiAweDk4ICAgICBxICAgICByICAgICAgICAgICAgICAgICAgICAtLS0tICAgICAgICAtLS0tICovCisgICAgICAgICAgMHg3MSwgMHg3MiwgMHhBNiwgMHhBNywgMHg5MSwgMHgwNywgMHg5MiwgMHgwNywKKyAvKiAweEEwICAgICAgICAgICB+ICAgICBzICAgICB0ICAgICB1ICAgICB2ICAgICB3ICAgICB4ICovCisgICAgICAgICAgMHhFNiwgMHg3RSwgMHg3MywgMHg3NCwgMHg3NSwgMHg3NiwgMHg3NywgMHg3OCwKKyAvKiAweEE4ICAgICB5ICAgICB6ICAgICAgICAgICAgICAtLS0tICAtLS0tICAtLS0tICAtLS0tICovCisgICAgICAgICAgMHg3OSwgMHg3QSwgMHhBRCwgMHhBQiwgMHgwNywgMHgwNywgMHgwNywgMHgwNywKKyAvKiAweEIwICAgICBeICAgICAgICAgICAgICAgICAgICAtLS0tICAgICCBpyAgLS0tLSAgICAgICAqLworICAgICAgICAgIDB4NUUsIDB4OUMsIDB4OUQsIDB4RkEsIDB4MDcsIDB4MDcsIDB4MDcsIDB4QUMsCisgLyogMHhCOCAgICAgICAgLS0tLSAgICAgWyAgICAgXSAgLS0tLSAgLS0tLSAgLS0tLSAgLS0tLSAqLworICAgICAgICAgIDB4QUIsIDB4MDcsIDB4NUIsIDB4NUQsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsCisgLyogMHhDMCAgICAgeyAgICAgQSAgICAgQiAgICAgQyAgICAgRCAgICAgRSAgICAgRiAgICAgRyAqLworICAgICAgICAgIDB4N0IsIDB4NDEsIDB4NDIsIDB4NDMsIDB4NDQsIDB4NDUsIDB4NDYsIDB4NDcsCisgLyogMHhDOCAgICAgSCAgICAgSSAgLS0tLSAgICAgICAgICAggfYgICAgICAgICAgICAgIC0tLS0gKi8KKyAgICAgICAgICAweDQ4LCAweDQ5LCAweDA3LCAweDkzLCAweDk0LCAweDk1LCAweEEyLCAweDA3LAorIC8qIDB4RDAgICAgIH0gICAgIEogICAgIEsgICAgIEwgICAgIE0gICAgIE4gICAgIE8gICAgIFAgKi8KKyAgICAgICAgICAweDdELCAweDRBLCAweDRCLCAweDRDLCAweDRELCAweDRFLCAweDRGLCAweDUwLAorIC8qIDB4RDggICAgIFEgICAgIFIgIC0tLS0gICAgICAgICAgIIH8ICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgMHg1MSwgMHg1MiwgMHgwNywgMHg5NiwgMHg4MSwgMHg5NywgMHhBMywgMHg5OCwKKyAvKiAweEUwICAgICBcICAgICAgICAgICBTICAgICBUICAgICBVICAgICBWICAgICBXICAgICBYICovCisgICAgICAgICAgMHg1QywgMHhGNiwgMHg1MywgMHg1NCwgMHg1NSwgMHg1NiwgMHg1NywgMHg1OCwKKyAvKiAweEU4ICAgICBZICAgICBaICAgICAgICAtLS0tICAgICCB1iAgLS0tLSAgLS0tLSAgLS0tLSAqLworICAgICAgICAgIDB4NTksIDB4NUEsIDB4RkQsIDB4MDcsIDB4OTksIDB4MDcsIDB4MDcsIDB4MDcsCisgLyogMHhGMCAgICAgMCAgICAgMSAgICAgMiAgICAgMyAgICAgNCAgICAgNSAgICAgNiAgICAgNyAqLworICAgICAgICAgIDB4MzAsIDB4MzEsIDB4MzIsIDB4MzMsIDB4MzQsIDB4MzUsIDB4MzYsIDB4MzcsCisgLyogMHhGOCAgICAgOCAgICAgOSAgLS0tLSAgLS0tLSAgICAggdwgIC0tLS0gIC0tLS0gIC0tLS0gKi8KKyAgICAgICAgICAweDM4LCAweDM5LCAweDA3LCAweDA3LCAweDlBLCAweDA3LCAweDA3LCAweDA3Cit9OworCisKKy8qCisgKiBBU0NJSSAoSUJNIFBDIDQzNykgIC0+IEVCQ0RJQyA1MDAKKyAqLworX191OCBfYXNjZWJjXzUwMFsyNTZdID0KK3sKKyAvKjAwIE5VTCAgIFNPSCAgIFNUWCAgIEVUWCAgIEVPVCAgIEVOUSAgIEFDSyAgIEJFTCAqLworICAgICAweDAwLCAweDAxLCAweDAyLCAweDAzLCAweDM3LCAweDJELCAweDJFLCAweDJGLAorIC8qMDggIEJTICAgIEhUICAgIExGICAgIFZUICAgIEZGICAgIENSICAgIFNPICAgIFNJICovCisgLyogICAgICAgICAgICAgIC0+TkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgMHgxNiwgMHgwNSwgMHgxNSwgMHgwQiwgMHgwQywgMHgwRCwgMHgwRSwgMHgwRiwKKyAvKjEwIERMRSAgIERDMSAgIERDMiAgIERDMyAgIERDNCAgIE5BSyAgIFNZTiAgIEVUQiAqLworICAgICAweDEwLCAweDExLCAweDEyLCAweDEzLCAweDNDLCAweDNELCAweDMyLCAweDI2LAorIC8qMTggQ0FOICAgIEVNICAgU1VCICAgRVNDICAgIEZTICAgIEdTICAgIFJTICAgIFVTICovCisgLyogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLT5JR1MgLT5JUlMgLT5JVVMgKi8KKyAgICAgMHgxOCwgMHgxOSwgMHgzRiwgMHgyNywgMHgyMiwgMHgxRCwgMHgxRSwgMHgxRiwKKyAvKjIwICBTUCAgICAgISAgICAgIiAgICAgIyAgICAgJCAgICAgJSAgICAgJiAgICAgJyAqLworICAgICAweDQwLCAweDRGLCAweDdGLCAweDdCLCAweDVCLCAweDZDLCAweDUwLCAweDdELAorIC8qMjggICAoICAgICApICAgICAqICAgICArICAgICAsICAgICAtICAgIC4gICAgICAvICovCisgICAgIDB4NEQsIDB4NUQsIDB4NUMsIDB4NEUsIDB4NkIsIDB4NjAsIDB4NEIsIDB4NjEsCisgLyozMCAgIDAgICAgIDEgICAgIDIgICAgIDMgICAgIDQgICAgIDUgICAgIDYgICAgIDcgKi8KKyAgICAgMHhGMCwgMHhGMSwgMHhGMiwgMHhGMywgMHhGNCwgMHhGNSwgMHhGNiwgMHhGNywKKyAvKjM4ICAgOCAgICAgOSAgICAgOiAgICAgOyAgICAgPCAgICAgPSAgICAgPiAgICAgPyAqLworICAgICAweEY4LCAweEY5LCAweDdBLCAweDVFLCAweDRDLCAweDdFLCAweDZFLCAweDZGLAorIC8qNDAgICBAICAgICBBICAgICBCICAgICBDICAgICBEICAgICBFICAgICBGICAgICBHICovCisgICAgIDB4N0MsIDB4QzEsIDB4QzIsIDB4QzMsIDB4QzQsIDB4QzUsIDB4QzYsIDB4QzcsCisgLyo0OCAgIEggICAgIEkgICAgIEogICAgIEsgICAgIEwgICAgIE0gICAgIE4gICAgIE8gKi8KKyAgICAgMHhDOCwgMHhDOSwgMHhEMSwgMHhEMiwgMHhEMywgMHhENCwgMHhENSwgMHhENiwKKyAvKjUwICAgUCAgICAgUSAgICAgUiAgICAgUyAgICAgVCAgICAgVSAgICAgViAgICAgVyAqLworICAgICAweEQ3LCAweEQ4LCAweEQ5LCAweEUyLCAweEUzLCAweEU0LCAweEU1LCAweEU2LAorIC8qNTggICBYICAgICBZICAgICBaICAgICBbICAgICBcICAgICBdICAgICBeICAgICBfICovCisgICAgIDB4RTcsIDB4RTgsIDB4RTksIDB4NEEsIDB4RTAsIDB4NUEsIDB4NUYsIDB4NkQsCisgLyo2MCAgIGAgICAgIGEgICAgIGIgICAgIGMgICAgIGQgICAgIGUgICAgIGYgICAgIGcgKi8KKyAgICAgMHg3OSwgMHg4MSwgMHg4MiwgMHg4MywgMHg4NCwgMHg4NSwgMHg4NiwgMHg4NywKKyAvKjY4ICAgaCAgICAgaSAgICAgaiAgICAgayAgICAgbCAgICAgbSAgICAgbiAgICAgbyAqLworICAgICAweDg4LCAweDg5LCA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QzMgIC1SRVMgICAtTkwgICAgQlMgIC1QT0MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtRU5QICAtPkxGICAgICAgICAgICAgICovCisgICAgICAgICAgMHgxMCwgMHgxMSwgMHgxMiwgMHgxMywgMHgwNywgMHgwQSwgMHgwOCwgMHgwNywKKyAvKiAweDE4ICAgQ0FOICAgIEVNICAtVUJTICAtQ1UxICAtSUZTICAtSUdTICAtSVJTICAtSVRCCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLUlVUyAqLworICAgICAgICAgIDB4MTgsIDB4MTksIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsCisgLyogMHgyMCAgIC1EUyAgLVNPUyAgICBGUyAgLVdVUyAgLUJZUCAgICBMRiAgIEVUQiAgIEVTQworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC1JTlAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAweDA3LCAweDA3LCAweDFDLCAweDA3LCAweDA3LCAweDBBLCAweDE3LCAweDFCLAorIC8qIDB4MjggICAtU0EgIC1TRkUgICAtU00gIC1DU1AgIC1NRkEgICBFTlEgICBBQ0sgICBCRUwKKyAgICAgICAgICAgICAgICAgICAgICAgLVNXICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovIAorICAgICAgICAgIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDUsIDB4MDYsIDB4MDcsCisgLyogMHgzMCAgLS0tLSAgLS0tLSAgIFNZTiAgIC1JUiAgIC1QUCAgLVRSTiAgLU5CUyAgIEVPVCAqLworICAgICAgICAgIDB4MDcsIDB4MDcsIDB4MTYsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDQsCisgLyogMHgzOCAgLVNCUyAgIC1JVCAgLVJGRiAgLUNVMyAgIERDNCAgIE5BSyAgLS0tLSAgIFNVQiAqLworICAgICAgICAgIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MTQsIDB4MTUsIDB4MDcsIDB4MUEsCisgLyogMHg0MCAgICBTUCAgIFJTUCAgICAgICAgICAggeQgICAgICAgICAgICAgIC0tLS0gICAgICAgKi8KKyAgICAgICAgICAweDIwLCAweEZGLCAweDgzLCAweDg0LCAweDg1LCAweEEwLCAweDA3LCAweDg2LAorIC8qIDB4NDggICAgICAgICAgICAgICAgIFsgICAgIC4gICAgIDwgICAgICggICAgICsgICAgICEgKi8KKyAgICAgICAgICAweDg3LCAweEE0LCAweDVCLCAweDJFLCAweDNDLCAweDI4LCAweDJCLCAweDIxLAorIC8qIDB4NTAgICAgICYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0tLS0gKi8KKyAgICAgICAgICAweDI2LCAweDgyLCAweDg4LCAweDg5LCAweDhBLCAweEExLCAweDhDLCAweDA3LAorIC8qIDB4NTggICAgICAgICAgIIHfICAgICBdICAgICAkICAgICAqICAgICApICAgICA7ICAgICBeICovCisgICAgICAgICAgMHg4RCwgMHhFMSwgMHg1RCwgMHgyNCwgMHgyQSwgMHgyOSwgMHgzQiwgMHg1RSwKKyAvKiAweDYwICAgICAtICAgICAvICAtLS0tICAgICCBxCAgLS0tLSAgLS0tLSAgLS0tLSAgICAgICAqLworICAgICAgICAgIDB4MkQsIDB4MkYsIDB4MDcsIDB4OEUsIDB4MDcsIDB4MDcsIDB4MDcsIDB4OEYsCisgLyogMHg2OCAgICAgICAgICAgICAgLS0tLSAgICAgLCAgICAgJSAgICAgXyAgICAgPiAgICAgPyAqLyAKKyAgICAgICAgICAweDgwLCAweEE1LCAweDA3LCAweDJDLCAweDI1LCAweDVGLCAweDNFLCAweDNGLAorIC8qIDB4NzAgIC0tLS0gICAgICAgIC0tLS0gIC0tLS0gIC0tLS0gIC0tLS0gIC0tLS0gIC0tLS0gKi8KKyAgICAgICAgICAweDA3LCAweDkwLCAweDA3LCAweDA3LCAweDA3LCAweDA3LCAweDA3LCAweDA3LAorIC8qIDB4NzggICAgICogICAgIGAgICAgIDogICAgICMgICAgIEAgICAgICcgICAgID0gICAgICIgKi8KKyAgICAgICAgICAweDcwLCAweDYwLCAweDNBLCAweDIzLCAweDQwLCAweDI3LCAweDNELCAweDIyLAorIC8qIDB4ODAgICAgICogICAgIGEgICAgIGIgICAgIGMgICAgIGQgICAgIGUgICAgIGYgICAgIGcgKi8KKyAgICAgICAgICAweDA3LCAweDYxLCAweDYyLCAweDYzLCAweDY0LCAweDY1LCAweDY2LCAweDY3LAorIC8qIDB4ODggICAgIGggICAgIGkgICAgICAgICAgICAgIC0tLS0gIC0tLS0gIC0tLS0gICAgICAgKi8KKyAgICAgICAgICAweDY4LCAweDY5LCAweEFFLCAweEFGLCAweDA3LCAweDA3LCAweDA3LCAweEYxLAorIC8qIDB4OTAgICAgIIGwICAgICBqICAgICBrICAgICBsICAgICBtICAgICBuICAgICBvICAgICBwICovCisgICAgICAgICAgMHhGOCwgMHg2QSwgMHg2QiwgMHg2QywgMHg2RCwgMHg2RSwgMHg2RiwgMHg3MCwKKyAvKiAweDk4ICAgICBxICAgICByICAgICAgICAgICAgICAgICAgICAtLS0tICAgICAgICAtLS0tICovCisgICAgICAgICAgMHg3MSwgMHg3MiwgMHhBNiwgMHhBNywgMHg5MSwgMHgwNywgMHg5MiwgMHgwNywKKyAvKiAweEEwICAgICAgICAgICB+ICAgICBzICAgICB0ICAgICB1ICAgICB2ICAgICB3ICAgICB4ICovCisgICAgICAgICAgMHhFNiwgMHg3RSwgMHg3MywgMHg3NCwgMHg3NSwgMHg3NiwgMHg3NywgMHg3OCwKKyAvKiAweEE4ICAgICB5ICAgICB6ICAgICAgICAgICAgICAtLS0tICAtLS0tICAtLS0tICAtLS0tICovCisgICAgICAgICAgMHg3OSwgMHg3QSwgMHhBRCwgMHhBQiwgMHgwNywgMHgwNywgMHgwNywgMHgwNywKKyAvKiAweEIwICAgICAgICAgICAgICAgICAgICAgICAgICAtLS0tICAgICCBpyAgLS0tLSAgICAgICAqLworICAgICAgICAgIDB4OUIsIDB4OUMsIDB4OUQsIDB4RkEsIDB4MDcsIDB4MDcsIDB4MDcsIDB4QUMsCisgLyogMHhCOCAgICAgICAgLS0tLSAgICAgICAgICAgfCAgLS0tLSAgLS0tLSAgLS0tLSAgLS0tLSAqLworICAgICAgICAgIDB4QUIsIDB4MDcsIDB4QUEsIDB4N0MsIDB4MDcsIDB4MDcsIDB4MDcsIDB4MDcsCisgLyogMHhDMCAgICAgeyAgICAgQSAgICAgQiAgICAgQyAgICAgRCAgICAgRSAgICAgRiAgICAgRyAqLworICAgICAgICAgIDB4N0IsIDB4NDEsIDB4NDIsIDB4NDMsIDB4NDQsIDB4NDUsIDB4NDYsIDB4NDcsCisgLyogMHhDOCAgICAgSCAgICAgSSAgLS0tLSAgICAgICAgICAggfYgICAgICAgICAgICAgIC0tLS0gKi8KKyAgICAgICAgICAweDQ4LCAweDQ5LCAweDA3LCAweDkzLCAweDk0LCAweDk1LCAweEEyLCAweDA3LAorIC8qIDB4RDAgICAgIH0gICAgIEogICAgIEsgICAgIEwgICAgIE0gICAgIE4gICAgIE8gICAgIFAgKi8KKyAgICAgICAgICAweDdELCAweDRBLCAweDRCLCAweDRDLCAweDRELCAweDRFLCAweDRGLCAweDUwLAorIC8qIDB4RDggICAgIFEgICAgIFIgIC0tLS0gICAgICAgICAgIIH8ICAgICAgICAgICAgICAgICAgICovCisgICAgICAgICAgMHg1MSwgMHg1MiwgMHgwNywgMHg5NiwgMHg4MSwgMHg5NywgMHhBMywgMHg5OCwKKyAvKiAweEUwICAgICBcICAgICAgICAgICBTICAgICBUICAgICBVICAgICBWICAgICBXICAgICBYICovCisgICAgICAgICAgMHg1QywgMHhGNiwgMHg1MywgMHg1NCwgMHg1NSwgMHg1NiwgMHg1NywgMHg1OCwKKyAvKiAweEU4ICAgICBZICAgICBaICAgICAgICAtLS0tICAgICCB1iAgLS0tLSAgLS0tLSAgLS0tLSAqLworICAgICAgIC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2luZm8gc3RydWN0CisJc2xhCSVyNywyICAgICAgICAgICAgICMgKjQgYW5kIHRlc3QgZm9yIHN2YyAwCisJYm56CUJBU0VEKHN5c2NfbnJfb2spICMgc3ZjIG51bWJlciA+IDAKKwkjIHN2YyAwOiBzeXN0ZW0gY2FsbCBudW1iZXIgaW4gJXIxCisJY2wJJXIxLEJBU0VEKC5MbnJfc3lzY2FsbHMpCisJYm5sCUJBU0VEKHN5c2NfbnJfb2spCisJbHIJJXI3LCVyMSAgICAgICAgICAgIyBjb3B5IHN2YyBudW1iZXIgdG8gJXI3CisJc2xhCSVyNywyICAgICAgICAgICAgICMgKjQKK3N5c2NfbnJfb2s6CisJbXZjCVNQX0FSR1MoNCwlcjE1KSxTUF9SNyglcjE1KQorc3lzY19kb19yZXN0YXJ0OgorCXRtCV9fVElfZmxhZ3MrMyglcjkpLChfVElGX1NZU0NBTExfVFJBQ0V8X1RJRl9TWVNDQUxMX0FVRElUKQorICAgICAgICBsICAgICAgICVyOCxzeXNfY2FsbF90YWJsZS1zeXN0ZW1fY2FsbCglcjcsJXIxMykgIyBnZXQgc3lzdGVtIGNhbGwgYWRkci4KKyAgICAgICAgYm56ICAgICBCQVNFRChzeXNjX3RyYWNlc3lzKQorICAgICAgICBiYXNyICAgICVyMTQsJXI4ICAgICAgICAgICMgY2FsbCBzeXNfeHh4eAorICAgICAgICBzdCAgICAgICVyMixTUF9SMiglcjE1KSAgICMgc3RvcmUgcmV0dXJuIHZhbHVlIChjaGFuZ2UgUjIgb24gc3RhY2spCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBBVFRFTlRJT046IGNoZWNrIHN5c19leGVjdmVfZ2x1ZSBiZWZvcmUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIGNoYW5naW5nIGFueXRoaW5nIGhlcmUgISEKKworc3lzY19yZXR1cm46CisJdG0JU1BfUFNXKzEoJXIxNSksMHgwMQkjIHJldHVybmluZyB0byB1c2VyID8KKwlibm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gICAgICAgICAgICAgICMgYnJhbmNoIHRvIHN5c192Zm9yaworCitzeXNfZXhlY3ZlX2dsdWU6ICAgICAgICAKKyAgICAgICAgbGEgICAgICAlcjIsU1BfUFRSRUdTKCVyMTUpICAgIyBsb2FkIHB0X3JlZ3MKKyAgICAgICAgbCAgICAgICAlcjEsQkFTRUQoLkxleGVjdmUpCisJbHIgICAgICAlcjEyLCVyMTQgICAgICAgICAgICAgIyBzYXZlIHJldHVybiBhZGRyZXNzCisgICAgICAgIGJhc3IgICAgJXIxNCwlcjEgICAgICAgICAgICAgICMgY2FsbCBzeXNfZXhlY3ZlCisgICAgICAgIGx0ciAgICAgJXIyLCVyMiAgICAgICAgICAgICAgICMgY2hlY2sgaWYgZXhlY3ZlIGZhaWxlZAorICAgICAgICBibnogICAgIDAoJXIxMikgICAgICAgICAgICAgICAjIGl0IGRpZCBmYWlsIC0+IHN0b3JlIHJlc3VsdCBpbiBncHIyCisgICAgICAgIGIgICAgICAgNCglcjEyKSAgICAgICAgICAgICAgICMgU0tJUCBTVCAyLFNQX1IyKDE1KSBhZnRlciBCQVNSIDE0LDgKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBpbiBzeXN0ZW1fY2FsbC9zeXNjX3RyYWNlc3lzCisKK3N5c19zaWdyZXR1cm5fZ2x1ZTogICAgIAorICAgICAgICBsYSAgICAgICVyMixTUF9QVFJFR1MoJXIxNSkgICAjIGxvYWQgcHRfcmVncyBhcyBwYXJhbWV0ZXIKKyAgICAgICAgbCAgICAgICAlcjEsQkFTRUQoLkxzaWdyZXR1cm4pCisgICAgICAgIGJyICAgICAgJXIxICAgICAgICAgICAgICAgICAgICMgYnJhbmNoIHRvIHN5c19zaWdyZXR1cm4KKworc3lzX3J0X3NpZ3JldHVybl9nbHVlOiAgICAgCisgICAgICAgIGxhICAgICAgJXIyLFNQX1BUUkVHUyglcjE1KSAgICMgbG9hZCBwdF9yZWdzIGFzIHBhcmFtZXRlcgorICAgICAgIC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B0bSAgICAgIFNQX1BTVyszKCVyMTUpLDB4MDEgICMgYXJlIHdlIHJ1bm5pbmcgaW4gMzEgYml0IG1vZGUgPworICAgICAgICBqbyAgICAgIHN5c2Nfbm9lbXUKKwlsYXJsICAgICVyMTAsc3lzX2NhbGxfdGFibGVfZW11ICAjIHVzZSAzMSBiaXQgZW11bGF0aW9uIHN5c3RlbSBjYWxscworc3lzY19ub2VtdToKKyNlbmRpZgorCXRtCV9fVElfZmxhZ3MrNyglcjkpLChfVElGX1NZU0NBTExfVFJBQ0V8X1RJRl9TWVNDQUxMX0FVRElUKQorICAgICAgICBsZ2YgICAgICVyOCwwKCVyNywlcjEwKSAgICMgbG9hZCBhZGRyZXNzIG9mIHN5c3RlbSBjYWxsIHJvdXRpbmUKKyAgICAgICAgam56ICAgICBzeXNjX3RyYWNlc3lzCisgICAgICAgIGJhc3IgICAgJXIxNCwlcjggICAgICAgICAgIyBjYWxsIHN5c194eHh4CisgICAgICAgIHN0ZyAgICAgJXIyLFNQX1IyKCVyMTUpICAgIyBzdG9yZSByZXR1cm4gdmFsdWUgKGNoYW5nZSBSMiBvbiBzdGFjaykKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIEFUVEVOVElPTjogY2hlY2sgc3lzX2V4ZWN2ZV9nbHVlIGJlZm9yZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgY2hhbmdpbmcgYW55dGhpbmcgaGVyZSAhIQorCitzeXNjX3JldHVybjoKKyAgICAgICAgdG0gICAgICBTUF9QU1crMSglcjE1KSwweDAxICAgICMgcmV0dXJuaW5nIHRvIHVzZXIgPworICAgICAgICBqbm8gICAgIHN5c2NfbGVhdmUKKwl0bQlfX1RJX2ZsYWdzKzcoJXI5KSxfVElGX1dPUktfU1ZDCisJam56CXN5c2Nfd29yayAgICAgICAgICMgdGhlcmUgaXMgd29yayB0byBkbyAoc2lnbmFscyBldGMuKQorc3lzY19sZWF2ZToKKyAgICAgICAgUkVTVE9SR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zCisgICAgICAgIGJyYXNsICAgJXIxNCxzeXNfZXhlY3ZlICAgICAgICMgY2FsbCBzeXNfZXhlY3ZlCisgICAgICAgIGx0Z3IgICAgJXIyLCVyMiAgICAgICAgICAgICAgICMgY2hlY2sgaWYgZXhlY3ZlIGZhaWxlZAorICAgICAgICBibnogICAgIDAoJXIxMikgICAgICAgICAgICAgICAjIGl0IGRpZCBmYWlsIC0+IHN0b3JlIHJlc3VsdCBpbiBncHIyCisgICAgICAgIGIgICAgICAgNiglcjEyKSAgICAgICAgICAgICAgICMgU0tJUCBTVEcgMixTUF9SMigxNSkgaW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyBzeXN0ZW1fY2FsbC9zeXNjX3RyYWNlc3lzCisjaWZkZWYgQ09ORklHX1MzOTBfU1VQUE9SVAorc3lzMzJfZXhlY3ZlX2dsdWU6ICAgICAgICAKKyAgICAgICAgbGEgICAgICAlcjIsU1BfUFRSRUdTKCVyMTUpICAgIyBsb2FkIHB0X3JlZ3MKKwlsZ3IgICAgICVyMTIsJXIxNCAgICAgICAgICAgICAjIHNhdmUgcmV0dXJuIGFkZHJlc3MKKyAgICAgICAgYnJhc2wgICAlcjE0LHN5czMyX2V4ZWN2ZSAgICAgIyBjYWxsIHN5czMyX2V4ZWN2ZQorICAgICAgICBsdGdyICAgICVyMiwlcjIgICAgICAgICAgICAgICAjIGNoZWNrIGlmIGV4ZWN2ZSBmYWlsZWQKKyAgICAgICAgYm56ICAgICAwKCVyMTIpICAgICAgICAgICAgICAgIyBpdCBkaWQgZmFpbCAtPiBzdG9yZSByZXN1bHQgaW4gZ3ByMgorICAgICAgICBiICAgICAgIDYoJXIxMikgICAgICAgICAgICAgICAjIFNLSVAgU1RHIDIsU1BfUjIoMTUpIGluCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgc3lzdGVtX2NhbGwvc3lzY190cmFjZXN5cworI2VuZGlmCisKK3N5c19zaWdyZXR1cm5fZ2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isJdG0JX19USV9mbGFncys3KCVyOSksX1RJRl9XT1JLX0lOVAorCWpueglpb193b3JrICAgICAgICAgICAgICAgICMgdGhlcmUgaXMgd29yayB0byBkbyAoc2lnbmFscyBldGMuKQoraW9fbGVhdmU6CisgICAgICAgIFJFU1RPUkVfQUxMIDAKKworI2lmZGVmIENPTkZJR19QUkVFTVBUCitpb19wcmVlbXB0OgorCWljbQklcjAsMTUsX19USV9wcmVjb3VudCglcjkpCQorCWpueiAgICAgaW9fbGVhdmUKKwkjIHN3aXRjaCB0byBrZXJuZWwgc3RhY2sKKwlsZwklcjEsU1BfUjE1KCVyMTUpCisJYWdoaQklcjEsLVNQX1NJWkUKKwltdmMJU1BfUFRSRUdTKF9fUFRfU0laRSwlcjEpLFNQX1BUUkVHUyglcjE1KQorICAgICAgICB4YyAgICAgIF9fU0ZfQkFDS0NIQUlOKDgsJXIxKSxfX1NGX0JBQ0tDSEFJTiglcjEpICMgY2xlYXIgYmFjayBjaGFpbgorCWxncgklcjE1LCVyMQoraW9fcmVzdW1lX2xvb3A6CisJdG0JX19USV9mbGFncys3KCVyOSksX1RJRl9ORUVEX1JFU0NIRUQKKwlqbm8JaW9fbGVhdmUKKwlsYXJsICAgICVyMSwuTGNfcGFjdGl2ZQorCW12YyAgICAgX19USV9wcmVjb3VudCg0LCVyOSksMCglcjEpCisgICAgICAgIHN0b3NtICAgX19TRl9FTVBUWSglcjE1KSwweDAzICAgIyByZWVuYWJsZSBpbnRlcnJ1cHRzCisJYnJhc2wgICAlcjE0LHNjaGVkdWxlICAgICAgICAgICMgY2FsbCBzY2hlZHVsZQorICAgICAgICBzdG5zbSAgIF9fU0ZfRU1QVFkoJXIxNSksMHhmYyAgICMgZGlzYWJsZSBJL08gYW5kIGV4dC4gaW50ZXJydXB0cworCXhjICAgICAgX19USV9wcmVjb3VudCg0LCVyOSksX19USV9wcmVjb3VudCglcjkpCisJaglpb19yZXN1bWVfbG9vcAorI2VuZGlmCisKKyMKKyMgc3dpdGNoI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Rlcm5hbCBvbGQgcHN3CisgICAgICAgIC5sb25nICAweDAwMDAwMDAwLDB4MDAwMDAwMDAgICAgICAgICAgICMgc3ZjIG9sZCBwc3cKKyAgICAgICAgLmxvbmcgIDB4MDAwMDAwMDAsMHgwMDAwMDAwMCAgICAgICAgICAgIyBwcm9ncmFtIGNoZWNrIG9sZCBwc3cKKyAgICAgICAgLmxvbmcgIDB4MDAwMDAwMDAsMHgwMDAwMDAwMCAgICAgICAgICAgIyBtYWNoaW5lIGNoZWNrIG9sZCBwc3cKKyAgICAgICAgLmxvbmcgIDB4MDAwMDAwMDAsMHgwMDAwMDAwMCAgICAgICAgICAgIyBpbyBvbGQgcHN3CisgICAgICAgIC5sb25nICAweDAwMDAwMDAwLDB4MDAwMDAwMDAKKyAgICAgICAgLmxvbmcgIDB4MDAwMDAwMDAsMHgwMDAwMDAwMAorICAgICAgICAubG9uZyAgMHgwMDAwMDAwMCwweDAwMDAwMDAwCisgICAgICAgIC5sb25nICAweDAwMGEwMDAwLDB4MDAwMDAwNTggICAgICAgICAgICMgZXh0ZXJuYWwgbmV3IHBzdworICAgICAgICAubG9uZyAgMHgwMDBhMDAwMCwweDAwMDAwMDYwICAgICAgICAgICAjIHN2YyBuZXcgcHN3CisgICAgICAgIC5sb25nICAweDAwMGEwMDAwLDB4MDAwMDAwNjggICAgICAgICAgICMgcHJvZ3JhbSBjaGVjayBuZXcgcHN3CisgICAgICAgIC5sb25nICAweDAwMGEwMDAwLDB4MDAwMDAwNzAgICAgICAgICAgICMgbWFjaGluZSBjaGVjayBuZXcgcHN3CisgICAgICAgIC5sb25nICAweDAwMDgwMDAwLDB4ODAwMDAwMDArLkxpb2ludCAgICMgaW8gbmV3IHBzdworCisgICAgICAgIC5vcmcgICAweDEwMAorIworIyBzdWJyb3V0aW5lIGZvciBsb2FkaW5nIGZyb20gdGFwZQorIyBQYXJhbXRlcnM6CQorIyAgUjEgPSBkZXZpY2UgbnVtYmVyCisjICBSMiA9IGxvYWQgYWRkcmVzcworLkxsb2FkZXI6CQorICAgICAgICBzdCAgICAlcjE0LC5MbGRyZXQKKyAgICAgICAgbGEgICAgJXIzLC5Mb3JicmVhZCAgICAgICAgICAgICAgICAgICAgIyByMyA9IGFkZHJlc3Mgb2Ygb3JiIAorCWxhICAgICVyNSwuTGlyYiAgICAgICAgICAgICAgICAgICAgICAgICMgcjUgPSBhZGRyZXNzIG9mIGlyYgorICAgICAgICBzdCAgICAlcjIsLkxjY3dyZWFkKzQgICAgICAgICAgICAgICAgICAjIGluaXRpYWxpemUgQ0NXIGRhdGEgYWRkcmVzc2VzCisgICAgICAgIGxjdGwgICVjNiwlYzYsLkxjcjYgICAgICAgICAgICAgICAKKyAgICAgICAgc2xyICAgJXIyLCVyMgorLkxsZGxwOgorICAgICAgICBsYSAgICAlcjYsMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIDMgcmV0cmllcworLkxzc2NoOgorICAgICAgICBzc2NoICAwKCVyMykgICAgICAgICAgICAgICAgICAgICAgICAgICAjIGxvYWQgY2h1bmsgb2YgSVBMX0JTIGJ5dGVzCisgICAgICAgIGJueiAgIC5MbGRlcnIKKy5MdzRlbmQ6CisgICAgICAgIGJhcyAgICVyMTQsLkx3YWl0NGlvCisgICAgICAgIHRtICAgIDgoJXI1KSwweDgyICAgICAgICAgICAgICAgICAgICAgICMgZG8gd2UgaGF2ZSBhIHByb2JsZW0gPworICAgICAgICBibnogICAuTHJlY292CisgICAgICAgIHNsciAgICVyNywlcjcKKyAgICAgICAgaWNtICAgJXI3LDMsMTAoJXI1KSAgICAgICAgICAgICAgICAgICAgIyBnZXQgcmVzaWR1YWwgY291bnQKKyAgICAgICAgbGNyICAgJXI3LCVyNworICAgICAgICBsYSAgICAlcjcsSVBMX0JTKCVyNykgICAgICAgICAgICAgICAgICAjIElQTF9CUy1yZXNpZHVhbD0jYnl0ZXMgcmVhZAorICAgICAgICBhciAgICAlcjIsJXI3ICAgICAgICAgICAgICAgICAgICAgICAgICAjIGFkZCB0byB0b3RhbCBzaXplCisgICAgICAgIHRtICAgIDgoJXI1KSwweDAxICAgICAgICAgICAgICAgICAgICAgICMgZm91bmQgYSB0YXBlIG1hcmsgPworICAgICAgICBibnogICAuTGRvbmUKKyAgICAgICAgbCAgICAgJXIwLC5MY2N3cmVhZCs0ICAgICAgICAgICAgICAgICAgIyB1cGRhdGUgQ0NXIGRhdGEgYWRkcmVzc2VzCisgICAgICAgIGFyICAgICVyMCwlcjcKKyAgICAgICAgc3QgICAgJXIwLC5MY2N3cmVhZCs0ICAgICAgICAgICAgICAgIAorICAgICAgICBiICAgICAuTGxkbHAKKy5MZG9uZToKKyAgICAgICAgbCAgICAgJXIxNCwuTGxkcmV0CisgICAgICAgIGJyICAgICVyMTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgcjIgY29udGFpbnMgdGhlIHRvdGFsIHNpemUKKy5McmVjb3Y6CisgICAgICAgIGJhcyAgICVyMTQsLkxzZW5zZSAgICAgICAgICAgICAgICAgICAgICMgZG8gdGhlIHNlbnNpbmcKKyAgICAgICAgYmN0ICAgJXI2LC5Mc3NjaCAgICAgICAgICAgICAgICAgICAgICAgIyBkZWMuIHJldHJ5IGNvdW50ICYgYnJhbmNoCisgICAgICAgIGIgICAgIC5MbGRlcnIKKyMKKyMgU2Vuc2Ugc3Vicm91dGluZQorIworLkxzZW5zZToKKyAgICAgICAgc3QgICAgJXIxNCwuTHNuc3JldAorICAgICAgICBsYSAgICAlcjcsLkxvcmJzZW5zZSAgICAgICAgICAgICAgCisgICAgICAgIHNzY2ggIDAoJXI3KSAgICAgICAgICAgICAgICAgICAgICAgICAgICMgc3RhcnQgc2Vuc2UgY29tbWFuZAorICAgICAgICBibnogICAuTGxkZXJyCisgICAgICAgIGJhcyAgICVyMTQsLkx3YWl0NGlvCisgICAgICAgIGwgICAgICVyMTQsLkxzbnNyZXQKKyAgICAgICAgdG0gICAgOCglcjUpLDB4ODIgICAgICAgICAgICAgICAgICAgICAgIyBkbyB3ZSBoYXZlIGEgcHJvYmxlbSA/CisgICAgICAgIGJueiAgIC5MbGRlcnIKKyAgICAgICAgYnIgICAgJXIxNAorIworIyBXYWl0IGZvciBpbnRlcnJ1cHQgc3Vicm91dGluZQorIworLkx3YWl0NGlvOgorICAgICAgICBscHN3ICAuTHdhaXRwc3cgICAgICAgICAgICAgICAgIAorLkxpb2ludDoKKyAgICAgICAgYyAgICAgJXIxLDB4YjggICAgICAgICAgICAgICAgICAgICAgICAgIyBjb21wYXJlIHN1YmNoYW5uZWwgbnVtYmVyCisgICAgICAgIGJuZSAgIC5Md2FpdDRpbworICAgICAgICB0c2NoICAwKCVyNSkKKyAgICAgICAgc2xyICAgJXIwLCVyMAorICAgICAgICB0bSAgICA4KCVyNSksMHg4MiAgICAgICAgICAgICAgICAgICAgICAjIGRvIHdlIGhhdmUgYSBwcm9ibGVtID8KKyAgICAgICAgYm56ICAgLkx3dGV4aXQKKyAgICAgICAgdG0gICAgOCglcjUpLDB4MDQgICAgICAgICAgICAgICAgICAgICAgIyBnb3QgZGV2aWNlIGVuZCA/CisgICAgICAgIGJ6ICAgIC5Md2FpdDRpbworLkx3dGV4aXQ6CisgICAgICAgIGJyICAgICVyMTQKKy5MbGRlcnI6CisgICAgICAgIGxwc3cgIC5MY3Jhc2ggICAgICAgICAgICAgIAorCisgICAgICAgIC5hbGlnbiA4CisuTG9yYnJlYWQ6CisJLmxvbmcgIDB4MDAwMDAwMDAsMHgwMDgwZmYwMCwuTGNjd3JlYWQKKyAgICAgICAgLmFsaWduIDgKKy5Mb3Jic2Vuc2U6CisgICAgICAgIC5sb25nICAweDAwMDAwMDAwLDB4MDA4MGZmMDAsLkxjY3dzZW5zZQorICAgICAgICAuYWxpZ24gOAorLkxjY3dyZWFkOgorICAgICAgICAubG9uZyAgMHgwMjIwMDAwMCtJUExfQlMsMHgwMDAwMDAwMAorLkxjY3dzZW5zZToKKyAgICAgICAgLmxvbmcgIDB4MDQyMDAwMDEsMHgwMDAwMDAwMAorLkx3YWl0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DAwMDUwCisgICAgICAgIC5sb25nICAweDAyMDAwNWYwLDB4NjAwMDAwNTAKKyAgICAgICAgLmxvbmcgIDB4MDIwMDA2NDAsMHg2MDAwMDA1MAorICAgICAgICAubG9uZyAgMHgwMjAwMDY5MCwweDYwMDAwMDUwCisgICAgICAgIC5sb25nICAweDAyMDAwNmUwLDB4MjAwMDAwNTAKKworICAgICAgICAub3JnICAgMHhmMAorIworIyBzdWJyb3V0aW5lIGZvciBsb2FkaW5nIGNhcmRzIGZyb20gdGhlIHJlYWRlcgorIworLkxsb2FkZXI6CQorCWxhICAgICVyMywuTG9yYiAgICAgICAgICAgICAgICAgICAgICAgICMgcjIgPSBhZGRyZXNzIG9mIG9yYiBpbnRvIHIyCisJbGEgICAgJXI1LC5MaXJiICAgICAgICAgICAgICAgICAgICAgICAgIyByNCA9IGFkZHJlc3Mgb2YgaXJiCisgICAgICAgIGxhICAgICVyNiwuTGNjd3MgICAgICAgICAgICAgIAorICAgICAgICBsYSAgICAlcjcsMjAKKy5MaW5pdDoKKyAgICAgICAgc3QgICAgJXIyLDQoJXI2KSAgICAgICAgICAgICAgICAgICAgICAgIyBpbml0aWFsaXplIENDVyBkYXRhIGFkZHJlc3NlcworICAgICAgICBsYSAgICAlcjIsMHg1MCglcjIpCisgICAgICAgIGxhICAgICVyNiw4KCVyNikKKyAgICAgICAgYmN0ICAgNywuTGluaXQKKworICAgICAgICBsY3RsICAlYzYsJWM2LC5MY3I2ICAgICAgICAgICAgICAgICAgICAjIHNldCBJTyBzdWJjbGFzcyBtYXNrCisJc2xyICAgJXIyLCVyMgorLkxsZGxwOgorICAgICAgICBzc2NoICAwKCVyMykgICAgICAgICAgICAgICAgICAgICAgICAgICAjIGxvYWQgY2h1bmsgb2YgMTYwMCBieXRlcworICAgICAgICBibnogICAuTGxkZXJyCisuTHdhaXQ0aXJxOgorICAgICAgICBtdmMgICBfX0xDX0lPX05FV19QU1coOCksLkxuZXdwc3cgICAgICAjIHNldCB1cCBJTyBpbnRlcnJ1cHQgcHN3CisgICAgICAgIGxwc3cgIC5Md2FpdHBzdyAgICAgICAgICAgICAgCisuTGlvaW50OgorICAgICAgICBjICAgICAlcjEsMHhiOCAgICAgICAgICAgICAgICAgICAgICAgICAjIGNvbXBhcmUgc3ViY2hhbm5lbCBudW1iZXIKKwlibmUgICAuTHdhaXQ0aXJxCisJdHNjaCAgMCglcjUpCisKKwlzbHIgICAlcjAsJXIwCisJaWMgICAgJXIwLDgoJXI1KSAgICAgICAgICAgICAgICAgICAgICAgIyBnZXQgZGV2aWNlIHN0YXR1cworCWNoaSAgICVyMCw4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgY2hhbm5lbCBlbmQgPworCWJlICAgIC5MY29udAorCWNoaSAgICVyMCwxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICMgY2hhbm5lbCBlbmQgKyBkZXZpY2UgZW5kID8KKwliZSAgICAuTGNvbnQKKworICAgICAgICBsICAgICAlcjAsNCglcjUpCisgICAgICAgIHMgICAgICVyMCw4KCVyMykgICAgICAgICAgICAgICAgICAgICAgICMgcjAvOCA9IG51bWJlciBvZiBjY3dzIGV4ZWN1dGVkCisgICAgICAgIG1oaSAgICVyMCwxMCAgICAgICAgICAgICAgICAgICAgICAgICAgICMgKjEwID0gbnVtYmVyIG9mIGJ5dGVzIGluIGNjd3MKKyAgICAgICAgbGggICAgJXIzLDEwKCVyNSkgICAgICAgICAgICAgICAgICAgICAgIyBnZXQgcmVzaWR1YWwgY291bnQKKyAgICAgICAgc3IgICAgJXIwLCVyMyAgICAgICAgICAgICAgICAgICAgICAgICAgIyAjY2N3cyo4MC1yZXNpZHVhbD0jYnl0ZXMgcmVhZAorCWFyICAgICVyMiwlcjAKKwkKKyAgICAgICAgYnIgICAgJXIxNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyByMiBjb250YWlucyB0aGUgdG90YWwgc2l6ZQorCisuTGNvbnQ6CisJYWhpICAgJXIyLDB4NjQwICAgICAgICAgICAgICAgICAgICAgICAgIyBhZGQgMHg2NDAgdG8gdG90YWwgc2l6ZQorICAgICAgICBsYSAgICAlcjYsLkxjY3dzICAgICAgICAgICAgIAorICAgICAgICBsYSAgICAlcjcsMjAKKy5MaW5jcjoKKyAgICAgICAgbCAgICAgJXIwLDQoJXI2KSAgICAgICAgICAgICAgICAgICAgICAgIyB1cGRhdGUgQ0NXIGRhdGEgYWRkcmVzc2VzCisgICAgICAgIGFoaSAgICVyMCwweDY0MAorICAgICAgICBzdCAgICAlcjAsNCglcjYpCisgICAgICAgIGFoaSAgICVyNiw4CisgICAgICAgIGJjdCAgIDcsLkxpbmNyCisKKyAgICAgICAgYiAgICAgLkxsZGxwCisuTGxkZXJyOgorICAgICAgICBscHN3ICAuTGNyYXNoICAgICAgICAgICAgICAKKworICAgICAgICAuYWxpZ24gOAorLkxvcmI6CS5sb25nICAweDAwMDAwMDAwLDB4MDA4MGZmMDAsLkxjY3dzCisuTGlyYjoJLmxvbmcgIDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAKKy5MY3I2OiAgLmxvbmcgIDB4ZmYwMDAwMDAKKy5MbG9hZHA6LmxvbmcgIDAsMAorICAgICAgICAuYWxpZ24gOAorLkxjcmFzaDoubG9uZyAgMHgwMDBhMDAwMCwweDAwMDAwMDAwCisuTG5ld3BzdzoKKyAgICAgICAgLmxvbmcgIDB4MDAwODAwMDAsMHg4MDAwMDAwMCsuTGlvaW50CisuTHdhaXRwc3c6CisgICAgICAgIC5sb25nICAweDAyMGEwMDAwLDB4ODAwMDAwMDArLkxpb2ludAorCisgICAgICAgIC5hbGlnbiA4CisuTGNjd3M6IC5yZXB0ICAxOQorICAgICAgICAubG9uZyAgMHgwMjYwMDA1MCwweDAwMDAwMDAwCisgICAgICAgIC5lbmRyCisgICAgICAgIC5sb25nICAweDAyMjAwMDUwLDB4MDAwMDAwMDAKKyNlbmRpZiAgLyogQ09ORklHX0lQTF9WTSAqLworCitpcGxzdGFydDoKKyAgICAgICAgbGggICAgJXIxLDB4YjggICAgICAgICAgICAgICAgICAgICAgICAgIyB0ZXN0IGlmIHN1YmNoYW5uZWwgbnVtYmVyCisgICAgICAgIGJjdCAgICVyMSwuTG5vbG9hZCAgICAgICAgICAgICAgICAgICAgICMgIGlzIHZhbGlkCisJbCAgICAgJXIxLDB4YjggICAgICAgICAgICAgICAgICAgICAgICAgIyBsb2FkIGlwbCBzdWJjaGFubmVsIG51bWJlcgorICAgICAgICBsYSAgICAlcjIsSVBMX0JTICAgICAgICAgICAgICAgICAgICAgICAjIGxvYWQgc3RhcnQgYWRkcmVzcworICAgICAgICBiYXMgICAlcjE0LC5MbG9hZGVyICAgICAgICAgICAgICAgICAgICAjIGxvYWQgcmVzdCBvZiBpcGwgaW1hZ2UKKyAgICAgICAgbCAgICAgJXIxMiwuTHBhcm0gICAgICAgICAgICAgICAgICAgICAgIyBwb2ludGVyIHRvIHBhcmFtZXRlciBhcmVhCisgICAgICAgIHN0ICAgICVyMSxJUExfREVWSUNFLVBBUk1BUkVBKCVyMTIpICAgICMgc3RvcmUgaXBsIGRldmljZSBudW1iZXIKKworIworIyBsb2FkIHBhcmFtZXRlciBmaWxlIGZyb20gaXBsIGRldmljZQorIworLkxhZ2FpbjE6CisgCWwgICAgICVyMixJTklUUkRfU1RBUlQtUEFSTUFSRUEoJXIxMikgICMgdXNlIHJhbWRpc2sgbG9jYXRpb24gYXMgdGVtcAorICAgICAgICBiYXMgICAlcjE0LC5MbG9hZGVyICAgICAgICAgICAgICAgICAgICAjIGxvYWQgcGFyYW1ldGVyIGZpbGUKKyAgICAgICAgbHRyICAgJXIyLCVyMiAgICAgICAgICAgICAgICAgICAgICAgICAgIyBnb3QgYW55dGhpbmcgPworICAgICAgICBieiAgICAuTG5vcGYKKwljaGkgICAlcjIsODk1CisJYm5oICAgLkxub3RydW5jCisJbGEgICAgJXIyLDg5NQorLkxub3RydW5jOgorCWwgICAgICVyNCxJTklUUkRfU1RBUlQtUEFSTUFSRUEoJXIxMikKKwljbGMgICAwKDMsJXI0KSwuTF9oZHIJCSAgICAgICAjIGlmIGl0IGlzIEhEUngKKwlieiAgICAuTGFnYWluMQkJCSAgICAgICAjIHNraXAgZGF0YXNldCBoZWFkZXIKKwljbGMgICAwKDMsJXI0KSwuTF9lb2YJCSAgICAgICAjIGlmIGl0IGlzIEVPRngKKwlieiAgICAuTGFnYWluMQkJCSAgICAgICAjIHNraXAgZGF0ZXNldCB0cmFpbGVyCisgICAgICAgIGxhICAgICVyNSwwKCVyNCwlcjIpCisgICAgICAgIGxyICAgICVyMywlcjIKKy5MaWRlYmM6CisgICAgICAgIHRtICAgIDAoJXI1KSwweDgwICAgICAgICAgICAgICAgICAgICAgICMgaGlnaCBvcmRlciBiaXQgc2V0ID8KKyAgICAgICAgYm8gICAgLkxkb2N2ICAgICAgICAgICAgICAgICAgICAgICAgICAgIyAgeWVzIC0+IGNvbnZlcnQgZnJvbSBFQkNESUMKKyAgICAgICAgYWhpICAgJXI1LC0xCisgICAgICAgIGJjdCAgICVyMywuTGlkZWJjCisgICAgICAgIGIgICAgIC5Mbm9jdgorLkxkb2N2OgorICAgICAgICBsICAgICAlcjMsLkxjdnRhYgorICAgICAgICB0ciAgICAwKDI1NiwlcjQpLDAoJXIzKSAgICAgICAgICAgICAgICAjIGNvbnZlcnQgcGFyYW1ldGVycyB0byBhc2NpaQorICAgICAgICB0ciAgICAyNTYoMjU2LCVyNCksMCglcjMpCisgICAgICAgIHRyICAgIDUxMigyNTYsJXI0KSwwKCVyMykKKyAgICAgICAgdHIgICAgNzY4KDEyMiwlcjQpLDAoJXIzKQorLkxub2N2OiBsYSAgICAlcjMsQ09NTUFORF9MSU5FLVBBUk1BUkVBKCVyMTIpICAjIGxvYWQgYWRyLiBvZiBjb21tYW5kIGxpbmUKKwltdmMgICAwKDI1NiwlcjMpLDAoJXI0KQorCW12YyAgIDI1NigyNTYsJXIzKSwyNTYoJXI0KQorCW12YyAgIDUxMigyNTYsJXIzKSw1MTIoJXI0KQorCW12YyAgIDc2OCgxMjIsJXIzKSw3NjgoJXI0KQorICAgICAgICBzbHIgICAlcjAsJXIwCisgICAgICAgIGIgICAgIC5MY250bHAKKy5MZGVsc3BjOgorICAgICAgICBpYyAgICAlcjAsMCglcjIsJXIzKQorICAgICAgICBjaGkgICAlcjAsMHgyMCAgICAgICAgICAgICAgICAgICAgICAgICAjIGlzIGl0IGEgc3BhY2UgPworICAgICAgICBiZSAgICAuTGNudGxwCisgICAgICAgIGFoaSAgICVyMiwxCisgICAgICAgIGIgICAgIC5MZW9scAorLkxjbnRscDoKKyAgICAgICAgYnJjdCAgJXIyLC5MZGVsc3BjCisuTGVvbHA6CisgICAgICAgIHNsciAgICVyMCwlcjAKKyAgICAgICAgc3RjICAgJXIwLDAoJXIyLCVyMykgICAgICAgICAgICAgICAgICAgIyB0ZXJtaW5hdGUgYnVmZmVyCisuTG5vcGY6CisKKyMKKyMgbG9hZCByYW1kaXNrIGZyb20gaXBsIGRldmljZQorIwkKKy5MYWdhaW4yOgorIAlsICAgICAlcjIsSU5JVFJEX1NUQVJULVBBUk1BUkVBKCVyMTIpICAjIGxvYWQgYWRyLiBvZiByYW1kaXNrCisgICAgICAgIGJhcyAgICVyMTQsLkxsb2FkZXIgICAgICAgICAgICAgICAgICAgICMgbG9hZCByYW1kaXNrCisgCXN0ICAgICVyMixJTklUUkRfU0laRS1QQVJNQVJFQSglcjEyKSAgICMgc3RvcmUgc2l6ZSBvZiByYW1kaXNrCisgICAgICAgIGx0ciAgICVyMiwlcjIKKyAgICAgICAgYm56ICAgLkxyZGNvbnQKKyAgICAgICAgc3QgICAgJXIyLElOSVRSRF9TVEFSVC1QQVJNQVJFQSglcjEyKSAgIyBubyByYW1kaXNrIGZvdW5kLCBudWxsIGl0CisuTHJkY29udDoKKwlsICAgICAlcjIsSU5JVFJEX1NUQVJULVBBUk1BUkVBKCVyMTIpCisKKwljbGMgICAwKDMsJXIyKSwuTF9oZHIJCSAgICAgICAjIHNraXAgSERSeCBhbmQgRU9GeCAKKwlieiAgICAuTGFnYWluMgorCWNsYyAgIDAoMywlcjIpLC5MX2VvZgorCWJ6ICAgIC5MYWdhaW4yCisKKyNpZmRlZiBDT05GSUdfSVBMX1ZNCisjCisjIHJlc2V0IGZpbGVzIGluIFZNIHJlYWRlcgorIworICAgICAgICBzdGlkcCBfX0xDX0NQVUlEICAgICAgICAgICAgICAgICAgICAgICAjIHN0b3JlIGNwdWlkCisJdG0gICAgX19MQ19DUFVJRCwweGZmICAgICAgICAgICAgICAgICAgIyBydW5uaW5nIFZNID8KKwlibm8gICAuTG5vcmVzZXQKKyAgICAgICAgbGEgICAgJXIyLC5McmVzZXQgICAgICAgICAgICAgIAorICAgICAgICBsaGkgICAlcjMsMjYKKyAgICAgICAgLmxvbmcgMHg4MzIzMDAwOAorLkxub3Jlc2V0OgorI2VuZGlmCisJCisjCisjIGV2ZXJ5dGhpbmcgbG9hZGVkLCBnbyBmb3IgaXQKKyMKKy5Mbm9sb2FkOgorICAgICAgICBsICAgICAlcjEsLkxzdGFydHVwCisgICAgICAgIGJyICAgICVyMQorCisuTHBhcm06CS5sb25nICBQQVJNQVJFQQorLkxzdGFydHVwOiAubG9uZyBzdGFydHVwCisuTGN2dGFiOi5sb25nICBfZWJjYXNjICAgICAgICAgICAgICAgICAgICAgICAgICMgZWJjZGljIHRvIGFzY2lpIHRhYmxlCisuTHJlc2V0Oi5ieXRlICAweGMzLDB4YzgsMHhjMSwweGQ1LDB4YzcsMHhjNSwweDQwLDB4ZDksMHhjNCwweGQ5LDB4NDAKKyAgICAgICAgLmJ5dGUgIDB4YzEsMHhkMywweGQzLDB4NDAsMHhkMiwweGM1LDB4YzUsMHhkNywweDQwLDB4ZDUsMHhkNgorICAgICAgICAuYnl0ZSAgMHhjOCwweGQ2LDB4ZDMsMHhjNCAgICAgICAgICAgICAjICJjaGFuZ2UgcmRyIGFsbCBrZWVwIG5vaG9sZCIKKy5MX2VvZjogLmxvbmcgIDB4YzVkNmM2MDAgICAgIC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xsZWQgZWl0aGVyIGJ5IHRoZSBpcGwgbG9hZGVyIG9yIGRpcmVjdGx5IGJ5IFBTVyByZXN0YXJ0CisjIG9yIGxpbmxvYWQgb3IgU0FMSVBMCisjCisgICAgICAgIC5vcmcgIDB4MTAwMDAKK3N0YXJ0dXA6YmFzciAgJXIxMywwICAgICAgICAgICAgICAgICAgICAgIyBnZXQgYmFzZQorLkxQRzE6ICBsY3RsICAlYzAsJWMxNSwuTGN0bC0uTFBHMSglcjEzKSAjIGxvYWQgY29udHJvbCByZWdpc3RlcnMKKwlsYSAgICAlcjEyLF9wc3RhcnQtLkxQRzEoJXIxMykgICAjIHBvaW50ZXIgdG8gcGFyYW1ldGVyIGFyZWEKKwkJCQkJICMgbW92ZSBJUEwgZGV2aWNlIHRvIGxvd2NvcmUKKyAgICAgICAgbXZjICAgX19MQ19JUExERVYoNCksSVBMX0RFVklDRS1QQVJNQVJFQSglcjEyKQorCQorIworIyBjbGVhciBic3MgbWVtb3J5CisjCisgICAgICAgIGwgICAgICVyMiwuTGJzc19iZ24tLkxQRzEoJXIxMykgIyBzdGFydCBvZiBic3MKKyAgICAgICAgbCAgICAgJXIzLC5MYnNzX2VuZC0uTFBHMSglcjEzKSAjIGVuZCBvZiBic3MKKyAgICAgICAgc3IgICAgJXIzLCVyMiAgICAgICAgICAgICAgICAgICAjIGxlbmd0aCBvZiBic3MKKyAgICAgICAgc3IgICAgJXI0LCVyNCAgICAgICAgICAgICAgICAgICAjCisgICAgICAgIHNyICAgICVyNSwlcjUgICAgICAgICAgICAgICAgICAgIyBzZXQgc3JjLGxlbmd0aCBhbmQgcGFkIHRvIHplcm8KKyAgICAgICAgc3IgICAgJXIwLCVyMCAgICAgICAgICAgICAgICAgICAjCisgICAgICAgIG12Y2xlICVyMiwlcjQsMCAgICAgICAgICAgICAgICAgIyBjbGVhciBtZW0KKyAgICAgICAgam8gICAgLi00ICAgICAgICAgICAgICAgICAgICAgICAjIGJyYW5jaCBiYWNrLCBpZiBub3Qg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ICAgIC5Mbm92bS0uTFBHMSglcjEzKQorICAgICAgICBvaSAgICAgMyglcjEyKSwxICAgICAgICAgICAgICAgICMgc2V0IFZNIGZsYWcKKy5Mbm92bToKKyAgICAgICAgbGggICAgICVyMCxfX0xDX0NQVUlEKzQgICAgICAgICAjIGdldCBjcHUgdmVyc2lvbgorICAgICAgICBjaGkgICAgJXIwLDB4NzQ5MCAgICAgICAgICAgICAgICMgcnVubmluZyBvbiBhIFAvMzkwID8KKyAgICAgICAgYm5lICAgIC5Mbm9wMzkwLS5MUEcxKCVyMTMpCisgICAgICAgIG9pICAgICAzKCVyMTIpLDQgICAgICAgICAgICAgICAgIyBzZXQgUC8zOTAgZmxhZworLkxub3AzOTA6CisKKyMKKyMgZmluZCBvdXQgaWYgd2UgaGF2ZSBhbiBJRUVFIGZwdQorIworICAgICAgICBtdmMgICAgX19MQ19QR01fTkVXX1BTVyg4KSwuTHBjZnB1LS5MUEcxKCVyMTMpCisJZWZwYyAgICVyMCwwICAgICAgICAgICAgICAgICAgICAjIHRlc3QgSUVFRSBleHRyYWN0IGZwYyBpbnN0cnVjdGlvbgorICAgICAgICBvaSAgICAgMyglcjEyKSwyICAgICAgICAgICAgICAgICMgc2V0IElFRUUgZnB1IGZsYWcKKy5MY2hrZnB1OgorCisjCisjIGZpbmQgb3V0IGlmIHdlIGhhdmUgdGhlIENTUCBpbnN0cnVjdGlvbgorIworICAgICAgIG12YyAgICBfX0xDX1BHTV9ORVdfUFNXKDgpLC5McGNjc3AtLkxQRzEoJXIxMykKKyAgICAgICBsYSAgICAgJXIwLDAKKyAgICAgICBsciAgICAgJXIxLCVyMAorICAgICAgIGxhICAgICAlcjIsNAorICAgICAgIGNzcCAgICAlcjAsJXIyICAgICAgICAgICAgICAgICAgICMgVGVzdCBDU1AgaW5zdHJ1Y3Rpb24KKyAgICAgICBvaSAgICAgMyglcjEyKSw4ICAgICAgICAgICAgICAgICAjIHNldCBDU1AgZmxhZworLkxjaGtjc3A6CisKKyMKKyM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NGI1MDAwMiAgICAgICAgICAgICAgICMgY3IwOiB2YXJpb3VzIHRoaW5ncworICAgICAgICAubG9uZyAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IxOiBwcmltYXJ5IHNwYWNlIHNlZ21lbnQgdGFibGUKKyAgICAgICAgLmxvbmcgIC5MZHVjdCAgICAgICAgICAgICAgICAgICAjIGNyMjogZGlzcGF0Y2hhYmxlIHVuaXQgY29udHJvbCB0YWJsZQorICAgICAgICAubG9uZyAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IzOiBpbnN0cnVjdGlvbiBhdXRob3JpemF0aW9uCisgICAgICAgIC5sb25nICAwICAgICAgICAgICAgICAgICAgICAgICAgIyBjcjQ6IGluc3RydWN0aW9uIGF1dGhvcml6YXRpb24KKyAgICAgICAgLmxvbmcgIDB4ZmZmZmZmZmYgICAgICAgICAgICAgICAjIGNyNTogcHJpbWFyeS1hc3RlIG9yaWdpbgorICAgICAgICAubG9uZyAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3I2OiAgSS9PIGludGVycnVwdHMKKyAgICAgICAgLmxvbmcgIDAgICAgICAgICAgICAgICAgICAgICAgICAjIGNyNzogIHNlY29uZGFyeSBzcGFjZSBzZWdtZW50IHRhYmxlCisgICAgICAgIC5sb25nICAwICAgICAgICAgICAgICAgICAgICAgICAgIyBjcjg6ICBhY2Nlc3MgcmVnaXN0ZXJzIHRyYW5zbGF0aW9uCisgICAgICAgIC5sb25nICAwICAgICAgICAgICAgICAgICAgICAgICAgIyBjcjk6ICB0cmFjaW5nIG9mZgorICAgICAgICAubG9uZyAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IxMDogdHJhY2luZyBvZmYKKyAgICAgICAgLmxvbmcgIDAgICAgICAgICAgICAgICAgICAgICAgICAjIGNyMTE6IHRyYWNpbmcgb2ZmCisgICAgICAgIC5sb25nICAwICAgICAgICAgICAgICAgICAgICAgICAgIyBjcjEyOiB0cmFjaW5nIG9mZgorICAgICAgICAubG9uZyAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IxMzogaG9tZSBzcGFjZSBzZWdtZW50IHRhYmxlCisgICAgICAgIC5sb25nICAweGMwMDAwMDAwICAgICAgICAgICAgICAgIyBjcjE0OiBtYWNoaW5lIGNoZWNrIGhhbmRsaW5nIG9mZgorICAgICAgICAubG9uZyAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IxNTogbGlua2FnZSBzdGFjayBvcGVyYXRpb25zCisuTHBjbWVtOi5sb25nICAweDAwMDgwMDAwLDB4ODAwMDAwMDAgKyAuTGNoa21lbQorLkxwY2ZwdToubG9uZyAgMHgwMDA4MDAwMCwweDgwMDAwMDAwICsgLkxjaGtmcHUKKy5McGNjc3A6LmxvbmcgIDB4MDAwODAwMDAsMHg4MDAwMDAwMCArIC5MY2hrY3NwCisuTHBjbXZwZzoubG9uZyAweDAwMDgwMDAwLDB4ODAwMDAwMDAgKyAuTGNoa212cGcKKy5McGNpZHRlOi5sb25nIDB4MDAwODAwMDAsMHg4MDAwMDAwMCArIC5MY2hraWR0ZQorLkxtZW1zaXplOi5sb25nIG1lbW9yeV9zaXplCisuTG1jaHVuazoubG9uZyBtZW1vcnlfY2h1bmsKKy5MbWZsYWdzOi5sb25nIG1hY2hpbmVfZmxhZ3MKKy5MYnNzX2JnbjogIC5sb25nICBfX2Jzc19zdGFydAorLkxic3NfZW5kOiAgLmxvbmcgIF9lbmQKKworCS5vcmcgUEFSTUFSRUEtNjQKKy5MZHVjdDoJLmxvbmcgMCwwLDAsMCwwLDAsMCwwCisJLmxvbmcgMCwwLDAsMCwwLDAsMCwwCisKKyMKKyMgcGFyYW1zIGF0IDEwNDAwIChzZXR1cC5oKQorIworCS5vcmcgICBQQVJNQVJFQQorCS5nbG9iYWwgX3BzdGFydAorX3BzdGFydDoJCisgICAgICAgIC5sb25nICAwLDAgICAgICAgICAgICAgICAgICAgICAgIyBJUExfREVWSUNFCisgICAgICAgIC5sb25nICAwLFJBTURJU0tf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UFEX09SREVSKSAjIGluaXRfdGFza191bmlvbiArIFRIUkVBRF9TSVpFCisgICAgICAgIHN0ICAgICVyMTUsX19MQ19LRVJORUxfU1RBQ0sgICAgIyBzZXQgZW5kIG9mIGtlcm5lbCBzdGFjaworICAgICAgICBhaGkgICAlcjE1LC05NgorICAgICAgICB4YyAgICBfX1NGX0JBQ0tDSEFJTig0LCVyMTUpLF9fU0ZfQkFDS0NIQUlOKCVyMTUpICMgY2xlYXIgYmFja2NoYWluCisKKyMgY2hlY2sgY29udHJvbCByZWdpc3RlcnMKKyAgICAgICAgc3RjdGwgICVjMCwlYzE1LDAoJXIxNSkKKwlvaSAgICAgMiglcjE1KSwweDIwICAgICAgICAgICAgICMgZW5hYmxlIHNpZ3AgZXh0ZXJuYWwgaW50ZXJydXB0cworCW9pICAgICAwKCVyMTUpLDB4MTAgICAgICAgICAgICAgIyBzd2l0Y2ggb24gbG93IGFkZHJlc3MgcHJvdGVjdGlvbgorICAgICAgICBsY3RsICAgJWMwLCVjMTUsMCglcjE1KQorCisjCisgICAgICAgIGxhbSAgICAwLDE1LC5MYXJlZ3MtLkxQRzIoJXIxMykgIyBsb2FkIGFjY2VzcyByZWdzIG5lZWRlZCBieSB1YWNjZXNzCisgICAgICAgIGwgICAgICAlcjE0LC5Mc3RhcnQtLkxQRzIoJXIxMykKKyAgICAgICAgYmFzciAgICVyMTQsJXIxNCAgICAgICAgICAgICAgICAjIGNhbGwgc3RhcnRfa2VybmVsCisjCisjIFdlIHJldHVybmVkIGZyb20gc3RhcnRfa2VybmVsID8hPyBQQU5JSworIworICAgICAgICBiYXNyICAlcjEzLDAKKwlscHN3ICAuTGR3LS4oJXIxMykgICAgICAgICAgICMgbG9hZCBkaXNhYmxlZCB3YWl0IHBzdworIworICAgICAgICAgICAgLmFsaWduIDgKKy5MZHc6CSAgICAubG9uZyAgMHgwMDBhMDAwMCwweDAwMDAwMDAwCisuTGluaXR0dTogICAubG9uZyAgaW5pdF90aHJlYWRfdW5pb24K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vbmcgIDB4MDAwMDAwMDAsMHgwMDAwMDAwMAorICAgICAgICAubG9uZyAgMHgwMDAwMDAwMCwweDAwMDAwMDAwCisgICAgICAgIC5sb25nICAweDAwMGEwMDAwLDB4MDAwMDAwNTggICAgICAgICAgICMgZXh0ZXJuYWwgbmV3IHBzdworICAgICAgICAubG9uZyAgMHgwMDBhMDAwMCwweDAwMDAwMDYwICAgICAgICAgICAjIHN2YyBuZXcgcHN3CisgICAgICAgIC5sb25nICAweDAwMGEwMDAwLDB4MDAwMDAwNjggICAgICAgICAgICMgcHJvZ3JhbSBjaGVjayBuZXcgcHN3CisgICAgICAgIC5sb25nICAweDAwMGEwMDAwLDB4MDAwMDAwNzAgICAgICAgICAgICMgbWFjaGluZSBjaGVjayBuZXcgcHN3CisgICAgICAgIC5sb25nICAweDAwMDgwMDAwLDB4ODAwMDAwMDArLkxpb2ludCAgICMgaW8gbmV3IHBzdworCisgICAgICAgIC5vcmcgICAweDEwMAorIworIyBzdWJyb3V0aW5lIGZvciBsb2FkaW5nIGZyb20gdGFwZQorIyBQYXJhbXRlcnM6CQorIyAgUjEgPSBkZXZpY2UgbnVtYmVyCisjICBSMiA9IGxvYWQgYWRkcmVzcworLkxsb2FkZXI6CQorICAgICAgICBzdCAgICAlcjE0LC5MbGRyZXQKKyAgICAgICAgbGEgICAgJXIzLC5Mb3JicmVhZCAgICAgICAgICAgICAgICAgICAgIyByMyA9IGFkZHJlc3Mgb2Ygb3JiIAorCWxhICAgICVyNSwuTGlyYiAgICAgICAgICAgICAgICAgICAgICAgICMgcjUgPSBhZGRyZXNzIG9mIGlyYgorICAgICAgICBzdCAgICAlcjIsLkxjY3dyZWFkKzQgICAgICAgICAgICAgICAgICAjIGluaXRpYWxpemUgQ0NXIGRhdGEgYWRkcmVzc2VzCisgICAgICAgIGxjdGwgICVjNiwlYzYsLkxjcjYgICAgICAgICAgICAgICAKKyAgICAgICAgc2xyICAgJXIyLCVyMgorLkxsZGxwOgorICAgICAgICBsYSAgICAlcjYsMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAjIDMgcmV0cmllcworLkxzc2NoOgorICAgICAgICBzc2NoICAwKCVyMykgICAgICAgICAgICAgICAgICAgICAgICAgICAjIGxvYWQgY2h1bmsgb2YgSVBMX0JTIGJ5dGVzCisgICAgICAgIGJueiAgIC5MbGRlcnIKKy5MdzRlbmQ6CisgICAgICAgIGJhcyAgICVyMTQsLkx3YWl0NGlvCisgICAgICAgIHRtICAgIDgoJXI1KSwweDgyICAgICAgICAgICAgICAgICAgICAgICMgZG8gd2UgaGF2ZSBhIHByb2JsZW0gPworICAgICAgICBibnogICAuTHJlY292CisgICAgICAgIHNsciAgICVyNywlcjcKKyAgICAgICAgaWNtICAgJXI3LDMsMTAoJXI1KSAgICAgICAgICAgICAgICAgICAgIyBnZXQgcmVzaWR1YWwgY291bnQKKyAgICAgICAgbGNyICAgJXI3LCVyNworICAgICAgICBsYSAgICAlcjcsSVBMX0JTKCVyNykgICAgICAgICAgICAgICAgICAjIElQTF9CUy1yZXNpZHVhbD0jYnl0ZXMgcmVhZAorICAgICAgICBhciAgICAlcjIsJXI3ICAgICAgICAgICAgICAgICAgICAgICAgICAjIGFkZCB0byB0b3RhbCBzaXplCisgICAgICAgIHRtICAgIDgoJXI1KSwweDAxICAgICAgICAgICAgICAgICAgICAgICMgZm91bmQgYSB0YXBlIG1hcmsgPworICAgICAgICBibnogICAuTGRvbmUKKyAgICAgICAgbCAgICAgJXIwLC5MY2N3cmVhZCs0ICAgICAgICAgICAgICAgICAgIyB1cGRhdGUgQ0NXIGRhdGEgYWRkcmVzc2VzCisgICAgICAgIGFyICAgICVyMCwlcjcKKyAgICAgICAgc3QgICAgJXIwLC5MY2N3cmVhZCs0ICAgICAgICAgICAgICAgIAorICAgICAgICBiICAgICAuTGxkbHAKKy5MZG9uZToKKyAgICAgICAgbCAgICAgJXIxNCwuTGxkcmV0CisgICAgICAgIGJyICAgICVyMTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgcjIgY29udGFpbnMgdGhlIHRvdGFsIHNpemUKKy5McmVjb3Y6CisgICAgICAgIGJhcyAgICVyMTQsLkxzZW5zZSAgICAgICAgICAgICAgICAgICAgICMgZG8gdGhlIHNlbnNpbmcKKyAgICAgICAgYmN0ICAgJXI2LC5Mc3NjaCAgICAgICAgICAgICAgICAgICAgICAgIyBkZWMuIHJldHJ5IGNvdW50ICYgYnJhbmNoCisgICAgICAgIGIgICAgIC5MbGRlcnIKKyMKKyMgU2Vuc2Ugc3Vicm91dGluZQorIworLkxzZW5zZToKKyAgICAgICAgc3QgICAgJXIxNCwuTHNuc3JldAorICAgICAgICBsYSAgICAlcjcsLkxvcmJzZW5zZSAgICAgICAgICAgICAgCisgICAgICAgIHNzY2ggIDAoJXI3KSAgICAgICAgICAgICAgICAgICAgICAgICAgICMgc3RhcnQgc2Vuc2UgY29tbWFuZAorICAgICAgICBibnogICAuTGxkZXJyCisgICAgICAgIGJhcyAgICVyMTQsLkx3YWl0NGlvCisgICAgICAgIGwgICAgICVyMTQsLkxzbnNyZXQKKyAgICAgICAgdG0gICAgOCglcjUpLDB4ODIgICAgICAgICAgICAgICAgICAgICAgIyBkbyB3ZSBoYXZlIGEgcHJvYmxlbSA/CisgICAgICAgIGJueiAgIC5MbGRlcnIKKyAgICAgICAgYnIgICAgJXIxNAorIworIyBXYWl0IGZvciBpbnRlcnJ1cHQgc3Vicm91dGluZQorIworLkx3YWl0NGlvOgorICAgICAgICBscHN3ICAuTHdhaXRwc3cgICAgICAgICAgICAgICAgIAorLkxpb2ludDoKKyAgICAgICAgYyAgICAgJXIxLDB4YjggICAgICAgICAgICAgICAgICAgICAgICAgIyBjb21wYXJlIHN1YmNoYW5uZWwgbnVtYmVyCisgICAgICAgIGJuZSAgIC5Md2FpdDRpbworICAgICAgICB0c2NoICAwKCVyNSkKKyAgICAgICAgc2xyICAgJXIwLCVyMAorICAgICAgICB0bSAgICA4KCVyNSksMHg4MiAgICAgICAgICAgICAgICAgICAgICAj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gICAgICAgICAgICAgIyByNCA9IGFkZHJlc3Mgb2YgaXJiCisgICAgICAgIGxhICAgICVyNiwuTGNjd3MgICAgICAgICAgICAgIAorICAgICAgICBsYSAgICAlcjcsMjAKKy5MaW5pdDoKKyAgICAgICAgc3QgICAgJXIyLDQoJXI2KSAgICAgICAgICAgICAgICAgICAgICAgIyBpbml0aWFsaXplIENDVyBkYXRhIGFkZHJlc3NlcworICAgICAgICBsYSAgICAlcjIsMHg1MCglcjIpCisgICAgICAgIGxhICAgICVyNiw4KCVyNikKKyAgICAgICAgYmN0ICAgNywuTGluaXQKKworICAgICAgICBsY3RsICAlYzYsJWM2LC5MY3I2ICAgICAgICAgICAgICAgICAgICAjIHNldCBJTyBzdWJjbGFzcyBtYXNrCisJc2xyICAgJXIyLCVyMgorLkxsZGxwOgorICAgICAgICBzc2NoICAwKCVyMykgICAgICAgICAgICAgICAgICAgICAgICAgICAjIGxvYWQgY2h1bmsgb2YgMTYwMCBieXRlcworICAgICAgICBibnogICAuTGxkZXJyCisuTHdhaXQ0aXJxOgorICAgICAgICBtdmMgICAweDc4KDgpLC5MbmV3cHN3ICAgICAgICAgICAgICAgICAjIHNldCB1cCBJTyBpbnRlcnJ1cHQgcHN3CisgICAgICAgIGxwc3cgIC5Md2FpdHBzdyAgICAgICAgICAgICAgCisuTGlvaW50OgorICAgICAgICBjICAgICAlcjEsMHhiOCAgICAgICAgICAgICAgICAgICAgICAgICAjIGNvbXBhcmUgc3ViY2hhbm5lbCBudW1iZXIKKwlibmUgICAuTHdhaXQ0aXJxCisJdHNjaCAgMCglcjUpCisKKwlzbHIgICAlcjAsJXIwCisJaWMgICAgJXIwLDgoJXI1KSAgICAgICAgICAgICAgICAgICAgICAgIyBnZXQgZGV2aWNlIHN0YXR1cworCWNoaSAgICVyMCw4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICMgY2hhbm5lbCBlbmQgPworCWJlICAgIC5MY29udAorCWNoaSAgICVyMCwxMiAgICAgICAgICAgICAgICAgICAgICAgICAgICMgY2hhbm5lbCBlbmQgKyBkZXZpY2UgZW5kID8KKwliZSAgICAuTGNvbnQKKworICAgICAgICBsICAgICAlcjAsNCglcjUpCisgICAgICAgIHMgICAgICVyMCw4KCVyMykgICAgICAgICAgICAgICAgICAgICAgICMgcjAvOCA9IG51bWJlciBvZiBjY3dzIGV4ZWN1dGVkCisgICAgICAgIG1oaSAgICVyMCwxMCAgICAgICAgICAgICAgICAgICAgICAgICAgICMgKjEwID0gbnVtYmVyIG9mIGJ5dGVzIGluIGNjd3MKKyAgICAgICAgbGggICAgJXIzLDEwKCVyNSkgICAgICAgICAgICAgICAgICAgICAgIyBnZXQgcmVzaWR1YWwgY291bnQKKyAgICAgICAgc3IgICAgJXIwLCVyMyAgICAgICAgICAgICAgICAgICAgICAgICAgIyAjY2N3cyo4MC1yZXNpZHVhbD0jYnl0ZXMgcmVhZAorCWFyICAgICVyMiwlcjAKKwkKKyAgICAgICAgYnIgICAgJXIxNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyByMiBjb250YWlucyB0aGUgdG90YWwgc2l6ZQorCisuTGNvbnQ6CisJYWhpICAgJXIyLDB4NjQwICAgICAgICAgICAgICAgICAgICAgICAgIyBhZGQgMHg2NDAgdG8gdG90YWwgc2l6ZQorICAgICAgICBsYSAgICAlcjYsLkxjY3dzICAgICAgICAgICAgIAorICAgICAgICBsYSAgICAlcjcsMjAKKy5MaW5jcjoKKyAgICAgICAgbCAgICAgJXIwLDQoJXI2KSAgICAgICAgICAgICAgICAgICAgICAgIyB1cGRhdGUgQ0NXIGRhdGEgYWRkcmVzc2VzCisgICAgICAgIGFoaSAgICVyMCwweDY0MAorICAgICAgICBzdCAgICAlcjAsNCglcjYpCisgICAgICAgIGFoaSAgICVyNiw4CisgICAgICAgIGJjdCAgIDcsLkxpbmNyCisKKyAgICAgICAgYiAgICAgLkxsZGxwCisuTGxkZXJyOgorICAgICAgICBscHN3ICAuTGNyYXNoICAgICAgICAgICAgICAKKworICAgICAgICAuYWxpZ24gOAorLkxvcmI6CS5sb25nICAweDAwMDAwMDAwLDB4MDA4MGZmMDAsLkxjY3dzCisuTGlyYjoJLmxvbmcgIDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAsMCwwLDAKKy5MY3I2OiAgLmxvbmcgIDB4ZmYwMDAwMDAKKy5MbG9hZHA6LmxvbmcgIDAsMAorICAgICAgICAuYWxpZ24gOAorLkxjcmFzaDoubG9uZyAgMHgwMDBhMDAwMCwweDAwMDAwMDAwCisuTG5ld3BzdzoKKyAgICAgICAgLmxvbmcgIDB4MDAwODAwMDAsMHg4MDAwMDAwMCsuTGlvaW50CisuTHdhaXRwc3c6CisgICAgICAgIC5sb25nICAweDAyMGEwMDAwLDB4ODAwMDAwMDArLkxpb2ludAorCisgICAgICAgIC5hbGlnbiA4CisuTGNjd3M6IC5yZXB0ICAxOQorICAgICAgICAubG9uZyAgMHgwMjYwMDA1MCwweDAwMDAwMDAwCisgICAgICAgIC5lbmRyCisgICAgICAgIC5sb25nICAweDAyMjAwMDUwLDB4MDAwMDAwMDAKKyNlbmRpZiAgLyogQ09ORklHX0lQTF9WTSAqLworCitpcGxzdGFydDoKKyAgICAgICAgbGggICAgJXIxLDB4YjggICAgICAgICAgICAgICAgICAgICAgICAgIyB0ZXN0IGlmIHN1YmNoYW5uZWwgbnVtYmVyCisgICAgICAgIGJjdCAgICVyMSwuTG5vbG9hZCAgICAgICAgICAgICAgICAgICAgICMgIGlzIHZhbGlkCisJbCAgICAgJXIxLDB4YjggICAgICAgICAgICAgICAgICAgICAgICAgIyBsb2FkIGlwbCBzdWJjaGFubmVsIG51bWJlcgorICAgICAgICBsYSAgICAlcjIsSVBMX0JTICAgICAgICAgICAgICAgICAgICAgICAjIGxvYWQgc3RhcnQgYWRkcmVzcworICAgICAgICBiYXMgICAlcjE0LC5MbG9hZGVyICAgICAgICAgICAgICAgICAgICAjIGxvYWQgcmVzdCBvZiBpcGwgaW1hZ2UKKyAgICAgICAgbGFybCAgJXIxMixfcHN0YXJ0ICAgICAgICAgICAgICAgICAgICAgIyBwb2ludGVyIHRvIHBhcmFtZXRlciBhcmVhCisgICAgICAgIHN0ICAgICVyMSxJUExfREVWSUNFKzQtUEFSTUFSRUEoJXIxMikgICMgc3RvcmUgaXBsIGRldmljZSBudW1iZXIKKworIworIyBsb2FkIHBhcmFtZXRlciBmaWxlIGZyb20gaXBsIGRldmljZQorIworLkxhZ2FpbjE6CisgCWwgICAgICVyMixJTklUUkRfU1RBUlQrNC1QQVJNQVJFQSglcjEyKSMgdXNlIHJhbWRpc2sgbG9jYXRpb24gYXMgdGVtcAorICAgICAgICBiYXMgICAlcjE0LC5MbG9hZGVyICAgICAgICAgICAgICAgICAgICAjIGxvYWQgcGFyYW1ldGVyIGZpbGUKKyAgICAgICAgbHRyICAgJXIyLCVyMiAgICAgICAgICAgICAgICAgICAgICAgICAgIyBnb3QgYW55dGhpbmcgPworICAgICAgICBieiAgICAuTG5vcGYKKwljaGkgICAlcjIsODk1CisJYm5oICAgLkxub3RydW5jCisJbGEgICAgJXIyLDg5NQorLkxub3RydW5jOgorCWwgICAgICVyNCxJTklUUkRfU1RBUlQrNC1QQVJNQVJFQSglcjEyKQorIAljbGMgICAwKDMsJXI0KSwuTF9oZHIJCSAgICAgICAjIGlmIGl0IGlzIEhEUngKKyAJYnogICAgLkxhZ2FpbjEJCQkgICAgICAgIyBza2lwIGRhdGFzZXQgaGVhZGVyCisgCWNsYyAgIDAoMywlcjQpLC5MX2VvZgkJICAgICAgICMgaWYgaXQgaXMgRU9GeAorIAlieiAgICAuTGFnYWluMQkJCSAgICAgICAjIHNraXAgZGF0ZXNldCB0cmFpbGVyCisgICAgICAgIGxhICAgICVyNSwwKCVyNCwlcjIpCisgICAgICAgIGxyICAgICVyMywlcjIKKy5MaWRlYmM6CisgICAgICAgIHRtICAgIDAoJXI1KSwweDgwICAgICAgICAgICAgICAgICAgICAgICMgaGlnaCBvcmRlciBiaXQgc2V0ID8KKyAgICAgICAgYm8gICAgLkxkb2N2ICAgICAgICAgICAgICAgICAgICAgICAgICAgIyAgeWVzIC0+IGNvbnZlcnQgZnJvbSBFQkNESUMKKyAgICAgICAgYWhpICAgJXI1LC0xCisgICAgICAgIGJjdCAgICVyMywuTGlkZWJjCisgICAgICAgIGIgICAgIC5Mbm9jdgorLkxkb2N2OgorICAgICAgICBsICAgICAlcjMsLkxjdnRhYgorICAgICAgICB0ciAgICAwKDI1NiwlcjQpLDAoJXIzKSAgICAgICAgICAgICAgICAjIGNvbnZlcnQgcGFyYW1ldGVycyB0byBhc2NpaQorICAgICAgICB0ciAgICAyNTYoMjU2LCVyNCksMCglcjMpCisgICAgICAgIHRyICAgIDUxMigyNTYsJXI0KSwwKCVyMykKKyAgICAgICAgdHIgICAgNzY4KDEyMiwlcjQpLDAoJXIzKQorLkxub2N2OiBsYSAgICAlcjMsQ09NTUFORF9MSU5FLVBBUk1BUkVBKCVyMTIpICAjIGxvYWQgYWRyLiBvZiBjb21tYW5kIGxpbmUKKwltdmMgICAwKDI1NiwlcjMpLDAoJXI0KQorCW12YyAgIDI1NigyNTYsJXIzKSwyNTYoJXI0KQorCW12YyAgIDUxMigyNTYsJXIzKSw1MTIoJXI0KQorCW12YyAgIDc2OCgxMjIsJXIzKSw3NjgoJXI0KQorICAgICAgICBzbHIgICAlcjAsJXIwCisgICAgICAgIGIgICAgIC5MY250bHAKKy5MZGVsc3BjOgorICAgICAgICBpYyAgICAlcjAsMCglcjIsJXIzKQorICAgICAgICBjaGkgICAlcjAsMHgyMCAgICAgICAgICAgICAgICAgICAgICAgICAjIGlzIGl0IGEgc3BhY2UgPworICAgICAgICBiZSAgICAuTGNudGxwCisgICAgICAgIGFoaSAgICVyMiwxCisgICAgICAgIGIgICAgIC5MZW9scAorLkxjbnRscDoKKyAgICAgICAgYnJjdCAgJXIyLC5MZGVsc3BjCisuTGVvbHA6CisgICAgICAgIHNsciAgICVyMCwlcjAKKyAgICAgICAgc3RjICAgJXIwLDAoJXIyLCVyMykgICAgICAgICAgICAgICAgICAgIyB0ZXJtaW5hdGUgYnVmZmVyCisuTG5vcGY6CisKKyMKKyMgbG9hZCByYW1kaXNrIGZyb20gaXBsIGRldmljZQorIworLkxhZ2FpbjI6CisgCWwgICAgICVyMixJTklUUkRfU1RBUlQrNC1QQVJNQVJFQSglcjEyKSMgbG9hZCBhZHIuIG9mIHJhbWRpc2sKKyAgICAgICAgYmFzICAgJXIxNCwuTGxvYWRlciAgICAgICAgICAgICAgICAgICAgIyBsb2FkIHJhbWRpc2sKKyAJc3QgICAgJXIyLElOSVRSRF9TSVpFKzQtUEFSTUFSRUEoJXIxMikgIyBzdG9yZSBzaXplIG9mIHJhbWRpc2sKKyAgICAgICAgbHRyICAgJXIyLCVyMgorICAgICAgICBibnogICAuTHJkY29udAorICAgICAgICBzdCAgICAlcjIsSU5JVFJEX1NUQVJUKzQtUEFSTUFSRUEoJXIxMikjIG5vIHJhbWRpc2sgZm91bmQsIG51bGwgaXQKKy5McmRjb250OgorCWwgICAgICVyMixJTklUUkRfU1RBUlQrNC1QQVJNQVJFQSglcjEyKQorCWNsYyAgIDAoMywlcjIpLC5MX2hkcgkJICAgICAgICMgc2tpcCBIRFJ4IGFuZCBFT0Z4IAorCWJ6ICAgIC5MYWdhaW4yCisJY2xjICAgMCgzLCVyMiksLkxfZW9mCisJYnogICAgLkxhZ2FpbjIKKworI2lmZGVmIENPTkZJR19JUExfVk0KKyMKKyMgcmVzZXQgZmlsZXMgaW4gVk0gcmVhZGVyCisjCisgICAgICAgIHN0aWRwIF9fTENfQ1BVSUQgICAgICAgICAgICAgICAgICAgICAgICMgc3RvcmUgY3B1aWQKKwl0bSAgICBfX0xDX0NQVUlELDB4ZmYgICAgICAgICAgICAgICAgICAjIHJ1bm5pbmcgVk0gPworCWJubyAgIC5Mbm9yZXNldAorICAgICAgICBsYSAgICAlcjIsLkxyZXNldCAgICAgICAgICAgICAgCisgICAgICAgIGxoaSAgICVyMywyNgorICAgICAgICAubG9uZy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vIHplcm8KKyAgICAgICAgc2lncCAgJXIxLCVyMCwweDEyICAgICAgICAgICAgICAgIyBzd2l0Y2ggdG8gZXNhbWUgbW9kZQorCXNhbTY0CQkJCSAjIHN3aXRjaCB0byA2NCBiaXQgbW9kZQorCWxjdGxnICVjMCwlYzE1LC5MY3RsLS5MUEcxKCVyMTMpICMgbG9hZCBjb250cm9sIHJlZ2lzdGVycworCWxhcmwgICVyMTIsX3BzdGFydCAgICAgICAgICAgICAgICMgcG9pbnRlciB0byBwYXJhbWV0ZXIgYXJlYQorCQkJCQkgIyBtb3ZlIElQTCBkZXZpY2UgdG8gbG93Y29yZQorICAgICAgICBtdmMgICBfX0xDX0lQTERFVig0KSxJUExfREVWSUNFKzQtUEFSTUFSRUEoJXIxMikKKworIworIyBjbGVhciBic3MgbWVtb3J5CisjCisJbGFybCAgJXIyLF9fYnNzX3N0YXJ0ICAgICAgICAgICAjIHN0YXJ0IG9mIGJzcyBzZWdtZW50CisgICAgICAgIGxhcmwgICVyMyxfZW5kICAgICAgICAgICAgICAgICAgIyBlbmQgb2YgYnNzIHNlZ21lbnQKKyAgICAgICAgc2dyICAgJXIzLCVyMiAgICAgICAgICAgICAgICAgICAjIGxlbmd0aCBvZiBic3MKKyAgICAgICAgc2dyICAgJXI0LCVyNCAgICAgICAgICAgICAgICAgICAjCisgICAgICAgIHNnciAgICVyNSwlcjUgICAgICAgICAgICAgICAgICAgIyBzZXQgc3JjLGxlbmd0aCBhbmQgcGFkIHRvIHplcm8KKyAgICAgICAgbXZjbGUgJXIyLCVyNCwwICAgICAgICAgICAgICAgICAjIGNsZWFyIG1lbQorICAgICAgICBqbyAgICAuLTQgICAgICAgICAgICAgICAgICAgICAgICMgYnJhbmNoIGJhY2ssIGlmIG5vdCBmaW5pc2gKKworCWwgICAgICVyMiwuTHJjcC0uTFBHMSglcjEzKQkjIFJlYWQgU0NQIGZvcmNlZCBjb21tYW5kIHdvcmQKKy5Mc2VydmljZWNhbGw6CisJc3Rvc20gLk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SBJRFRFIGluc3RydWN0aW9uCisjCisJbGEgICAgICVyMSwwZi0uTFBHMSglcjEzKQkjIHNldCBwcm9ncmFtIGNoZWNrIGFkZHJlc3MKKwlzdGcgICAgJXIxLF9fTENfUEdNX05FV19QU1crOAorCS5sb25nCTB4YjJiMTAwMDAJCSMgc3RvcmUgZmFjaWxpdHkgbGlzdAorCXRtCTB4YzgsMHgwOAkJIyBjaGVjayBiaXQgZm9yIGNsZWFyaW5nLWJ5LUFTQ0UKKwlibm8JMGYtLkxQRzEoJXIxMykKKwlsaGkJJXIxLDIwOTQKKwlsaGkJJXIyLDAKKwkubG9uZwkweGI5OGUyMDAxCisJb2kJNyglcjEyKSwweDgwCQkjIHNldCBJRFRFIGZsYWcKKzA6CisKKyAgICAgICAgbHBzd2UgLkxlbnRyeS0uTFBHMSgxMykgICAgICAgICAjIGp1bXAgdG8gX3N0ZXh0IGluIHByaW1hcnktc3BhY2UsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIyB2aXJ0dWFsIGFuZCBuZXZlciByZXR1cm4gLi4uCisgICAgICAgIC5hbGlnbiAxNgorLkxlbnRyeToucXVhZCAgMHgwMDAwMDAwMTgwMDAwMDAwLF9zdGV4dAorLkxjdGw6ICAucXVhZCAgMHgwNGI1MDAwMiAgICAgICAgICAgICAgICMgY3IwOiB2YXJpb3VzIHRoaW5ncworICAgICAgICAucXVhZCAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IxOiBwcmltYXJ5IHNwYWNlIHNlZ21lbnQgdGFibGUKKyAgICAgICAgLnF1YWQgIC5MZHVjdCAgICAgICAgICAgICAgICAgICAjIGNyMjogZGlzcGF0Y2hhYmxlIHVuaXQgY29udHJvbCB0YWJsZQorICAgICAgICAucXVhZCAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IzOiBpbnN0cnVjdGlvbiBhdXRob3JpemF0aW9uCisgICAgICAgIC5xdWFkICAwICAgICAgICAgICAgICAgICAgICAgICAgIyBjcjQ6IGluc3RydWN0aW9uIGF1dGhvcml6YXRpb24KKyAgICAgICAgLnF1YWQgIDB4ZmZmZmZmZmZmZmZmZmZmZiAgICAgICAjIGNyNTogcHJpbWFyeS1hc3RlIG9yaWdpbgorICAgICAgICAucXVhZCAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3I2OiAgSS9PIGludGVycnVwdHMKKyAgICAgICAgLnF1YWQgIDAgICAgICAgICAgICAgICAgICAgICAgICAjIGNyNzogIHNlY29uZGFyeSBzcGFjZSBzZWdtZW50IHRhYmxlCisgICAgICAgIC5xdWFkICAwICAgICAgICAgICAgICAgICAgICAgICAgIyBjcjg6ICBhY2Nlc3MgcmVnaXN0ZXJzIHRyYW5zbGF0aW9uCisgICAgICAgIC5xdWFkICAwICAgICAgICAgICAgICAgICAgICAgICAgIyBjcjk6ICB0cmFjaW5nIG9mZgorICAgICAgICAucXVhZCAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IxMDogdHJhY2luZyBvZmYKKyAgICAgICAgLnF1YWQgIDAgICAgICAgICAgICAgICAgICAgICAgICAjIGNyMTE6IHRyYWNpbmcgb2ZmCisgICAgICAgIC5xdWFkICAwICAgICAgICAgICAgICAgICAgICAgICAgIyBjcjEyOiB0cmFjaW5nIG9mZgorICAgICAgICAucXVhZCAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IxMzogaG9tZSBzcGFjZSBzZWdtZW50IHRhYmxlCisgICAgICAgIC5xdWFkICAweGMwMDAwMDAwICAgICAgICAgICAgICAgIyBjcjE0OiBtYWNoaW5lIGNoZWNrIGhhbmRsaW5nIG9mZgorICAgICAgICAucXVhZCAgMCAgICAgICAgICAgICAgICAgICAgICAgICMgY3IxNTogbGlua2FnZSBzdGFjayBvcGVyYXRpb25zCisuTHBjbXNrOi5xdWFkICAweDAwMDAwMDAxODAwMDAwMDAKKy5MNG1hbGlnbjoucXVhZCAweGZmZmZmZmZmZmZjMDAwMDAKKy5Mc2NhbjJnOi5xdW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2NvcmUuaD4KKworCQkuZ2xvYmwJZG9fcmVpcGwKK2RvX3JlaXBsOgliYXNyCSVyMTMsMAorLkxwZzA6CQlscHN3CS5MbmV3cHN3LS5McGcwKCVyMTMpCisuTHBnMToJCWxjdGwJJWM2LCVjNiwuTGFsbC0uTHBnMCglcjEzKQorICAgICAgICAgICAgICAgIHN0Y3RsICAgJWMwLCVjMCwuTGN0bHNhdmUtLkxwZzAoJXIxMykKKyAgICAgICAgICAgICAgICBuaSAgICAgIC5MY3Rsc2F2ZS0uTHBnMCglcjEzKSwweGVmCisgICAgICAgICAgICAgICAgbGN0bCAgICAlYzAsJWMwLC5MY3Rsc2F2ZS0uTHBnMCglcjEzKQorICAgICAgICAgICAgICAgIGxyICAgICAgJXIxLCVyMgorICAgICAgICAJbXZjICAgICBfX0xDX1BHTV9ORVdfUFNXKDgpLC5McGNuZXctLkxwZzAoJXIxMykKKyAgICAgICAgICAgICAgICBzdHNjaCAgIC5Mc2NoaWItLkxwZzAoJXIxMykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKKwkgICAgICAgIG9pICAgICAgLkxzY2hpYis1LS5McGcwKCVyMTMpLDB4ODQgCisuTGVjczogIAl4aSAgICAgIC5Mc2NoaWIrMjctLkxwZzAoJXIxMyksMHgwMSAKKyAgICAgICAgCW1zY2ggICAgLkxzY2hpYi0uTHBnMCglcjEzKSAKKyAgICAgICAgICAgICAgICBsaGkgICAgICVyMCw1CisuTHNzY2g6CQlzc2NoCS5MaXBsb3JiLS5McGcwKCVyMTMpICAgICAgICAgICAKKwkJanoJLkwwMDEKKyAgICAgICAgICAgICAgICBicmN0ICAgICVyMCwuTHNzY2ggIAorCQliYXMJJXIxNCwuTGRpc2FiLS5McGcwKCVyMTMpCisuTDAwMToJCW12YwlfX0xDX0lPX05FV19QU1coOCksLkxpb25ldy0uTHBnMCglcjEzKQkKKy5MdHBpOgkJbHBzdwkuTHdhaXRwc3ctLkxwZzAoJXIxMykgICAgICAgICAgCisuTGNvbnQ6CQljCSVyMSxfX0xDX1NVQkNIQU5ORUxfSUQKKwkJam56CS5MdHBpCisJCWNsYwlfX0xDX0lPX0lOVF9QQVJNKDQpLC5MaXBsb3JiLS5McGcwKCVyMTMpCisJCWpuegkuTHRwaQorCQl0c2NoCS5MaXBsaXJiLS5McGcwKCVyMTMpICAgICAgICAgICAKKwkJdG0JLkxpcGxpcmIrOS0uTHBnMCglcjEzKSwweGJmCisgICAgICAgICAgICAgICAganogICAgICAuTDAwMgorICAgICAgICAgICAgICAgIGJhcyAgICAgJXIxNCwuTGRpc2FiLS5McGcwKCVyMTMpICAgIAorLkwwMDI6CQl0bQkuTGlwbGlyYis4LS5McGcwKCVyMTMpLDB4ZjMgICAgCisgICAgICAgICAgICAgICAganogICAgICAuTDAwMworICAgICAgICAgICAgICAgIGJhcyAgICAgJXIxNCwuTGRpc2FiLS5McGcwKCVyMTMpCQorLkwwMDM6CQlzcHgJLkxudWxsLS5McGcwKCVyMTMpCisJCXN0IAklcjEsX19MQ19TVUJDSEFOTkVMX0lECisgICAgICAgICAgICAgICAgbHBzdyAJMAorCQlzaWdwICAgIDAsMCwwKDYpICAgICAgICAgICAgICAgCisuTGRpc2FiOglzdCAgICAgICVyMTQsLkxkaXNwc3crNC0uTHBnMCglcjEzKQorCQlscHN3CS5MZGlzcHN3LS5McGcwKCVyMTMpCisgICAgICAgICAgICAgICAgLmFsaWduIAk4CisuTGFsbDoJCS5sb25nCTB4ZmYwMDAwMDAKKy5MbnVsbDoJCS5sb25nICAgMHgwMDAwMDAwMAorLkxjdGxzYXZlOiAgICAgIC5sb25nICAgMHgwMDAwMDAwMAorICAgICAgICAgICAgICAgIC5hbGlnbiAJOAorLkxuZXdwc3c6CS5sb25nICAgMHgwMDA4MDAwMCwweDgwMDAwMDAwKy5McGcxCisuTHBjbmV3OiAgCS5sb25nICAgMHgwMDA4MDAwMCwweDgwMDAwMDAwKy5MZWNzCisuTGlvbmV3OgkubG9uZyAgIDB4MDAwODAwMD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gICAgICAgICAgICAgICAgICAgICAgICAgCisJICAgICAgICBvaSAgICAgIC5Mc2NoaWIrNS0uTHBnMCglcjEzKSwweDg0IAorLkxlY3M6ICAJeGkgICAgICAuTHNjaGliKzI3LS5McGcwKCVyMTMpLDB4MDEgCisgICAgICAgIAltc2NoICAgIC5Mc2NoaWItLkxwZzAoJXIxMykgCisJICAgICAgICBsZ2hpICAgICVyMCw1CisuTHNzY2g6CQlzc2NoCS5MaXBsb3JiLS5McGcwKCVyMTMpICAgICAgICAgICAKKwkJanoJLkwwMDEKKwkJYnJjdCAgICAlcjAsLkxzc2NoICAgCisJCWJhcwklcjE0LC5MZGlzYWItLkxwZzAoJXIxMykKKy5MMDAxOgkJbXZjCV9fTENfSU9fTkVXX1BTVygxNiksLkxpb25ldy0uTHBnMCglcjEzKQkKKy5MdHBpOgkJbHBzd2UJLkx3YWl0cHN3LS5McGcwKCVyMTMpICAgICAgICAgIAorLkxjb250OgkJYwklcjEsX19MQ19TVUJDSEFOTkVMX0lECisJCWpuegkuTHRwaQorCQljbGMJX19MQ19JT19JTlRfUEFSTSg0KSwuTGlwbG9yYi0uTHBnMCglcjEzKQorCQlqbnoJLkx0cGkKKwkJdHNjaAkuTGlwbGlyYi0uTHBnMCglcjEzKSAgICAgICAgICAgCisJCXRtCS5MaXBsaXJiKzktLkxwZzAoJXIxMyksMHhiZgorICAgICAgICAgICAgICAgIGp6ICAgICAgLkwwMDIKKyAgICAgICAgICAgICAgICBiYXMgICAgICVyMTQsLkxkaXNhYi0uTHBnMCglcjEzKSAgICAKKy5MMDAyOgkJdG0JLkxpcGxpcmIrOC0uTHBnMCglcjEzKSwweGYzICAgIAorICAgICAgICAgICAgICAgIGp6ICAgICAgLkwwMDMKKyAgICAgICAgICAgICAgICBiYXMgICAgICVyMTQsLkxkaXNhYi0uTHBnMCglcjEzKQkKKy5MMDAzOgkJc3B4CS5MbnVsbC0uTHBnMCglcjEzKQorCQlzdCAJJXIxLF9fTENfU1VCQ0hBTk5F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ZXJuYWxfaW50ZXJydXB0KF9fdTE2IGNvZGUsIGV4dF9pbnRfaGFuZGxlcl90IGhhbmRsZXIsCisJCQkJICAgICAgZXh0X2ludF9pbmZvX3QgKnApCit7CisgICAgICAgIGludCBpbmRleDsKKworICAgICAgICBpZiAocCA9PSBOVUxMKQorICAgICAgICAgICAgICAgIHJldHVybiAtRUlOVkFMOworICAgICAgICBwLT5jb2RlID0gY29kZTsKKyAgICAgICAgcC0+aGFuZGxlciA9IGhhbmRsZXI7CisgICAgICAgIGluZGV4ID0gY29kZSAmIDB4ZmY7CisgICAgICAgIHAtPm5leHQgPSBleHRfaW50X2hhc2hbaW5kZXhdOworICAgICAgICBleHRfaW50X2hhc2hbaW5kZXhdID0gcDsKKyAgICAgICAgcmV0dXJuIDA7Cit9CisKK2ludCB1bnJlZ2lzdGVyX2V4dGVybmFsX2ludGVycnVwdChfX3UxNiBjb2RlLCBleHRfaW50X2hhbmRsZXJfdCBoYW5kbGVyKQoreworICAgICAgICBleHRfaW50X2luZm9fdCAqcCwgKnE7CisgICAgICAgIGludCBpbmRleDsKKworICAgICAgICBpbmRleCA9IGNvZGUgJiAweGZmOworICAgICAgICBxID0gTlVMTDsKKyAgICAgICAgcCA9IGV4dF9pbnRfaGFzaFtpbmRleF07CisgICAgICAgIHdoaWxlIChwICE9IE5VTEwpIHsKKyAgICAgICAgICAgICAgICBpZiAocC0+Y29kZSA9PSBjb2RlICYmIHAtPmhhbmRsZXIgPT0gaGFuZGxlcikKKyAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIHEgPSBwOworICAgICAgICAgICAgICAgIHAgPSBwLT5uZXh0OworICAgICAgICB9CisgICAgICAgIGlmIChwID09IE5VTEwpCisgICAgICAgICAgICAgICAgcmV0dXJuIC1FTk9FTlQ7CisgICAgICAgIGlmIChxICE9IE5VTEwpCisgICAgICAgICAgICAgICAgcS0+bmV4dCA9IHAtPm5leHQ7CisgICAgICAgIGVsc2UKKyAgIC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vYXJjaC9pMzg2L2tlcm5lbC9zZW1hcGhvcmUuYworICogICAgQ29weXJpZ2h0IChDKSAxOTk5LCBMaW51cyBUb3J2YWxkcworICoKKyAqLworI2luY2x1ZGUgPGxpbnV4L3NjaGVkLmg+CisjaW5jbHVkZSA8bGludXgvZXJybm8uaD4KKyNpbmNsdWRlIDxsaW51eC9pbml0Lmg+CisKKyNpbmNsdWRlIDxhc20vc2VtYXBob3JlLmg+CisKKy8qCisgKiBBdG9taWNhbGx5IHVwZGF0ZSBzZW0tPmNvdW50LiBFcXVpdmFsZW50IHRvOgorICogICBvbGRfdmFsID0gc2VtLT5jb3VudC5jb3VudGVyOworICogICBuZXdfdmFsID0gKChvbGRfdmFsID49IDApID8gb2xkX3ZhbCA6IDApICsgaW5jcjsKKyAqICAgc2VtLT5jb3VudC5jb3VudGVyID0gbmV3X3ZhbDsKKyAqICAgcmV0dXJuIG9sZF92YWw7CisgKi8KK3N0YXRpYyBpbmxpbmUgaW50IF9fc2VtX3VwZGF0ZV9jb3VudChzdHJ1Y3Qgc2VtYXBob3JlICpzZW0sIGludCBpbmNyKQoreworCWludCBvbGRfdmFsLCBuZXdfdmFsOworCisgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCIgICBsICAgICAlMCwwKCUzKVxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiMDogbHRyICAgJTEsJTBcbiIKKwkJCSAgICAgIiAgIGpoZSAgIDFmXG4iCisJCQkgICAgICIgICBsaGkgICAlMSwwXG4iCisJCQkgICAgICIxOiBhciAgICAlMSwlNFxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICAgY3MgICAgJTAsJTEsMCglMylcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiAgIGpsICAgIDBiXG4iCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogIj0mZCIgKG9sZF92YWwpLCAiPSZkIiAobmV3X3ZhbCksCisJCQkgICAgICAgIj1tIiAoc2VtLT5j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aXRfbW0ubW1fY291bnQpOworCWN1cnJlbnQtPmFjdGl2ZV9tbSA9ICZpbml0X21tOworICAgICAgICBpZiAoY3VycmVudC0+bW0pCisgICAgICAgICAgICAgICAgQlVHKCk7CisgICAgICAgIGVudGVyX2xhenlfdGxiKCZpbml0X21tLCBjdXJyZW50KTsKK30KKworLyoKKyAqIFZNIGhhbHQgYW5kIHBvd2Vyb2ZmIHNldHVwIHJvdXRpbmVzCisgKi8KK2NoYXIgdm1oYWx0X2NtZFsxMjhdID0gIiI7CitjaGFyIHZtcG9mZl9jbWRbMTI4XSA9ICIiOworCitzdGF0aWMgaW5saW5lIHZvaWQgc3RybmNweV9za2lwX3F1b3RlKGNoYXIgKmRzdCwgY2hhciAqc3JjLCBpbnQgbikKK3sKKyAgICAgICAgaW50IHN4LCBkeDsKKworICAgICAgICBkeCA9IDA7CisgICAgICAgIGZvciAoc3ggPSAwOyBzcmNbc3hdICE9IDA7IHN4KyspIHsKKyAgICAgICAgICAgICAgICBpZiAoc3JjW3N4XSA9PSAnIicpIGNvbnRpbnVlOworICAgICAgICAgICAgICAgIGRzdFtkeCsrXSA9IHNyY1tzeF07CisgICAgICAgICAgICAgICAgaWYgKGR4ID49IG4pIGJyZWFrOworICAgICAgICB9Cit9CisKK3N0YXRpYyBpbnQgX19pbml0IHZtaGFsdF9zZXR1cChjaGFyICpzdHIpCit7CisgICAgICAgIHN0cm5jcHlfc2tpcF9xdW90ZSh2bWhhbHRfY21kLCBzdHIsIDEyNyk7CisgICAgICAgIHZtaGFsdF9jbWRbMTI3XSA9IDA7CisgICAgICAgIHJldHVybiAxOworfQorCitfX3NldHVwKCJ2bWhhbHQ9Iiwgdm1oYWx0X3NldHVwKTsKKworc3RhdGljIGludCBfX2luaXQgdm1wb2ZmX3NldHVwKGNoYXIgKnN0cikKK3sKKyAgICAgICAgc3RybmNweV9za2lwX3F1b3RlKHZtcG9mZl9jbWQsIHN0ciwgMTI3KTsKKyAgICAgICAgdm1wb2ZmX2NtZF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KgorICogU2V0dXAgZnVuY3Rpb24gY2FsbGVkIGZyb20gaW5pdC9tYWluLmMganVzdCBhZnRlciB0aGUgYmFubmVyCisgKiB3YXMgcHJpbnRlZC4KKyAqLworZXh0ZXJuIGNoYXIgX3BzdGFydCwgX3BlbmQsIF9zdGV4dDsKKwordm9pZCBfX2luaXQgc2V0dXBfYXJjaChjaGFyICoqY21kbGluZV9wKQoreworICAgICAgICB1bnNpZ25lZCBsb25nIGJvb3RtYXBfc2l6ZTsKKyAgICAgICAgdW5zaWduZWQgbG9uZyBtZW1vcnlfc3RhcnQsIG1lbW9yeV9lbmQ7CisgICAgICAgIGNoYXIgYyA9ICcgJywgY24sICp0byA9IGNvbW1hbmRfbGluZSwgKmZyb20gPSBDT01NQU5EX0xJTkU7CisJdW5zaWduZWQgbG9uZyBzdGFydF9wZm4sIGVuZF9wZm47CisgICAgICAgIHN0YXRpYyB1bnNpZ25lZCBpbnQgc21wdHJhcD0wOworICAgICAgICB1bnNpZ25lZCBsb25nIGRlbGF5ID0gMDsKKwlzdHJ1Y3QgX2xvd2NvcmUgKmxjOworCWludCBpOworCisgICAgICAgIGlmIChzbXB0cmFwKQorICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgc21wdHJhcD0xOworCisgICAgICAgIC8qCisgICAgICAgICAqIHByaW50IHdoYXQgaGVhZC5TIGhhcyBmb3VuZCBvdXQgYWJvdXQgdGhlIG1hY2hpbmUgCisgICAgICAgICAqLworI2lmbmRlZiBDT05GSUdfQVJDSF9TMzkwWAorCXByaW50aygoTUFDSElORV9JU19WTSkgPworCSAgICAgICAiV2UgYXJlIHJ1bm5pbmcgdW5kZXIgVk0gKDMxIGJpdCBtb2RlKVxuIiA6CisJICAgICAgICJXZSBhcmUgcnVubmluZyBuYXRpdmUgKDMxIGJpdCBtb2RlKVxuIik7CisJcHJpbnRrKChNQUNISU5FX0hBU19JRUVFKSA/CisJICAgICAgICJUaGlzIG1hY2hpbmUgaGFzIGFuIElFRUUgZn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wVUw7ICAvKiBkZXRlY3RlZCBpbiBoZWFkLnMgKi8KKyNlbmRpZiAvKiBDT05GSUdfQVJDSF9TMzkwWCAqLworICAgICAgICBpbml0X21tLnN0YXJ0X2NvZGUgPSBQQUdFX09GRlNFVDsKKyAgICAgICAgaW5pdF9tbS5lbmRfY29kZSA9ICh1bnNpZ25lZCBsb25nKSAmX2V0ZXh0OworICAgICAgICBpbml0X21tLmVuZF9kYXRhID0gKHVuc2lnbmVkIGxvbmcpICZfZWRhdGE7CisgICAgICAgIGluaXRfbW0uYnJrID0gKHVuc2lnbmVkIGxvbmcpICZfZW5kOworCisJY29kZV9yZXNvdXJjZS5zdGFydCA9ICh1bnNpZ25lZCBsb25nKSAmX3RleHQ7CisJY29kZV9yZXNvdXJjZS5lbmQgPSAodW5zaWduZWQgbG9uZykgJl9ldGV4dCAtIDE7CisJZGF0YV9yZXNvdXJjZS5zdGFydCA9ICh1bnNpZ25lZCBsb25nKSAmX2V0ZXh0OworCWRhdGFfcmVzb3VyY2UuZW5kID0gKHVuc2lnbmVkIGxvbmcpICZfZWRhdGEgLSAxOworCisgICAgICAgIC8qIFNhdmUgdW5wYXJzZWQgY29tbWFuZCBsaW5lIGNvcHkgZm9yIC9wcm9jL2NtZGxpbmUgKi8KKyAgICAgICAgbWVtY3B5KHNhdmVkX2NvbW1hbmRfbGluZSwgQ09NTUFORF9MSU5FLCBDT01NQU5EX0xJTkVfU0laRSk7CisgICAgICAgIHNhdmVkX2NvbW1hbmRfbGluZVtDT01NQU5EX0xJTkVfU0laRS0xXSA9ICdcMCc7CisKKyAgICAgICAgZm9yICg7OykgeworICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICogIm1lbT1YWFhba0ttTV0iIHNldHMgbWVtc2l6ZSAKKyAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICBpZiAoYyA9PSAnICcgJiYgc3RybmNtcChmcm9tLCAibWVtPSIsIDQpID09IDApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1lbW9yeV9lbmQgPSBzaW1wbGVfc3RydG91bChmcm9tKzQsICZmcm9tLCAwKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICggKmZyb20gPT0gJ0snIHx8ICpmcm9tID09ICdrJyApIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWVtb3J5X2VuZCA9IG1lbW9yeV9lbmQgPDwgMTA7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZyb20rKzsKKyAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoICpmcm9tID09ICdNJyB8fCAqZnJvbSA9PSAnbScgKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1lbW9yeV9lbmQgPSBtZW1vcnlfZW5kIDw8IDIwOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tKys7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgIC8qCisgICAgICAgICAgICAgICAgICogImlwbGRlbGF5PVhYWFtzbV0iIHNldHMgaXBsIGRlbGF5IGluIHNlY29uZHMgb3IgbWludXRlcworICAgICAgICAgICAgICAgICAqLworICAgICAgICAgICAgICAgIGlmIChjID09ICcgJyAmJiBzdHJuY21wKGZyb20sICJpcGxkZWxheT0iLCA5KSA9PSAwKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBkZWxheSA9IHNpbXBsZV9zdHJ0b3VsKGZyb20rOSwgJmZyb20sIDApOworCQkJaWYgKCpmcm9tID09ICdzJyB8fCAqZnJvbSA9PSAnUycpIHsKKwkJCQlkZWxheSA9IGRlbGF5KjEwMDAwMDA7CisJCQkJZnJvbSsrOworCQkJfSBlbHNlIGlmICgqZnJvbSA9PSAnbScgfHwgKmZyb20gPT0gJ00nKSB7CisJCQkJZGVsYXkgPSBkZWxheSo2MCoxMDAwMDAwOworCQkJCWZyb20rKzsKKwkJCX0KKwkJCS8qIG5vdyB3YWl0IGZvciB0aGUgcmVxdWVzdGVkIGFtb3VudCBvZiB0aW1lICovCisJCQl1ZGVsYXkoZGVsYXkpOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBjbiA9ICooZnJvbSsrKTsKKyAgICAgICAgICAgICAgICBpZiAoIWNuKQorICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgaWYgKGNuID09ICdcbicpCisgICAgICAgICAgICAgICAgICAgICAgICBjbiA9ICcgJzsgIC8qIHJlcGxhY2UgbmV3bGluZXMgd2l0aCBzcGFjZSAqLworCQlpZiAoY24gPT0gMHgwZCkKKwkJCWNuID0gJyAnOyAgLyogcmVwbGFjZSAweDBkIHdpdGggc3BhY2UgKi8KKyAgICAgICAgICAgICAgICBpZiAoY24gPT0gJyAnICYmIGMgPT0gJyAnKQorICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7ICAvKiByZW1vdmUgYWRkaXRpb25hbCBzcGFjZXMgKi8KKyAgICAgICAgICAgICAgICBjID0gY247CisgICAgICAgICAgICAgICAgaWYgKHRvIC0gY29tbWFuZF9saW5lID49IENPTU1BTkRfTElORV9TSVpFKQorICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICAgICAgKih0bysrKSA9IGM7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGMgPT0gJyAnICYmIHRvID4gY29tbWFuZF9saW5lKSB0by0tOworICAgICAgICAqdG8gPSAnXDAnOworICAgICAgICAqY21kbGluZV9wID0gY29tbWFuZF9saW5lOworCisJLyoKKwkgKiBwYXJ0aWFsbHkgdXNlZCBwYWdlcyBhcmUgbm90IHVzYWJsZSAtIHRodXMKKwkgKiB3ZSBhcmUgcm91bmRpbmcgdXB3YXJkczoKKwkgKi8KKwlzdGFydF9wZm4gPSAoX19wYSgmX2VuZCkgKyBQQUdFX1NJWkUgLSAxKSA+PiBQQUdFX1NISUZUOworCWVuZF9wZm4gPSBtYXhfcG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ICAgICAgKiBSZXNlcnZlIHRoZSBib290bWVtIGJpdG1hcCBpdHNlbGYgYXMgd2VsbC4gV2UgZG8gdGhpcyBpbiB0d28KKyAgICAgICAgICogc3RlcHMgKGZpcnN0IHN0ZXAgd2FzIGluaXRfYm9vdG1lbSgpKSBiZWNhdXNlIHRoaXMgY2F0Y2hlcworICAgICAgICAgKiB0aGUgKHZlcnkgdW5saWtlbHkpIGNhc2Ugb2YgdXMgYWNjaWRlbnRhbGx5IGluaXRpYWxpemluZyB0aGUKKyAgICAgICAgICogYm9vdG1lbSBhbGxvY2F0b3Igd2l0aCBhbiBpbnZhbGlkIFJBTSBhcmVhLgorICAgICAgICAgKi8KKyAgICAgICAgcmVzZXJ2ZV9ib290bWVtKHN0YXJ0X3BmbiA8PCBQQUdFX1NISUZULCBib290bWFwX3NpemUpOworCisjaWZkZWYgQ09ORklHX0JMS19ERVZfSU5JVFJECisgICAgICAgIGlmIChJTklUUkRfU1RBUlQpIHsKKwkJaWYgKElOSVRSRF9TVEFSVCArIElOSVRSRF9TSVpFIDw9IG1lbW9yeV9lbmQpIHsKKwkJCXJlc2VydmVfYm9vdG1lbShJTklUUkRfU1RBUlQsIElOSVRSRF9TSVpFKTsKKwkJCWluaXRyZF9zdGFydCA9IElOSVRSRF9TVEFSVDsKKwkJCWluaXRyZF9lbmQgPSBpbml0cmRfc3RhcnQgKyBJTklUUkRfU0laRTsKKwkJfSBlbHNlIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIHByaW50aygiaW5pdHJkIGV4dGVuZHMgYmV5b25kIGVuZCBvZiBtZW1vcnkgIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIoMHglMDhseCA+IDB4JTA4bHgpXG5kaXNhYmxpbmcgaW5pdHJkXG4iLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluaXRyZF9zdGFydCArIElOSVRSRF9TSVpFLCBtZW1vcnlfZW5kKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGluaXRyZ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MuCisgKi8KKworc3RhdGljIGludCBzaG93X2NwdWluZm8oc3RydWN0IHNlcV9maWxlICptLCB2b2lkICp2KQoreworICAgICAgICBzdHJ1Y3QgY3B1aW5mb19TMzkwICpjcHVpbmZvOworCXVuc2lnbmVkIGxvbmcgbiA9ICh1bnNpZ25lZCBsb25nKSB2IC0gMTsKKworCWlmICghbikgeworCQlzZXFfcHJpbnRmKG0sICJ2ZW5kb3JfaWQgICAgICAgOiBJQk0vUzM5MFxuIgorCQkJICAgICAgICIjIHByb2Nlc3NvcnMgICAgOiAlaVxuIgorCQkJICAgICAgICJib2dvbWlwcyBwZXIgY3B1OiAlbHUuJTAybHVcbiIsCisJCQkgICAgICAgbnVtX29ubGluZV9jcHVzKCksIGxvb3BzX3Blcl9qaWZmeS8oNTAwMDAwL0haKSwKKwkJCSAgICAgICAobG9vcHNfcGVyX2ppZmZ5Lyg1MDAwL0haKSklMTAwKTsKKwl9CisJaWYgKGNwdV9vbmxpbmUobikpIHsKKyNpZmRlZiBDT05GSUdfU01QCisJCWlmIChzbXBfcHJvY2Vzc29yX2lkKCkgPT0gbikKKwkJCWNwdWluZm8gPSAmUzM5MF9sb3djb3JlLmNwdV9kYXRhOworCQllbHNlCisJCQljcHVpbmZvID0gJmxvd2NvcmVfcHRyW25dLT5jcHVfZGF0YTsKKyNlbHNlCisJCWNwdWluZm8gPSAmUzM5MF9sb3djb3JlLmNwdV9kYXRhOworI2VuZGlmCisJCXNlcV9wcmludGYobSwgInByb2Nlc3NvciAlbGk6ICIKKwkJCSAgICAgICAidmVyc2lvbiA9ICUwMlgsICAiCisJCQkgICAgICAgImlkZW50aWZpY2F0aW9uID0gJTA2WCwgICIKKwkJCSAgICAgICAibWFjaGluZSA9ICUwNFhcbiIsCisJCQkgICAgICAgbiwgY3B1aW5mby0+Y3B1X2lkLnZlcnNpb24sCisJCQkgICAgICAgY3B1aW5mby0+Y3B1X2lkLmlkZW50LAorCQkJICAgICAgIGNwdWluZm8tPmNwdV9pZC5t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QoreworICAgICAgICBpbnQgY3B1OworCisJZm9yX2VhY2hfb25saW5lX2NwdShjcHUpIHsKKwkJaWYgKGNwdSA9PSBzbXBfcHJvY2Vzc29yX2lkKCkpCisgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgICAvKgorICAgICAgICAgICAgICAgICAqIFNldCBzaWduYWxpbmcgYml0IGluIGxvd2NvcmUgb2YgdGFyZ2V0IGNwdSBhbmQga2ljayBpdAorICAgICAgICAgICAgICAgICAqLworCQlzZXRfYml0KHNpZywgKHVuc2lnbmVkIGxvbmcgKikgJmxvd2NvcmVfcHRyW2NwdV0tPmV4dF9jYWxsX2Zhc3QpOworCQl3aGlsZSAoc2lnbmFsX3Byb2Nlc3NvcihjcHUsIHNpZ3BfZXh0ZXJuYWxfY2FsbCkgPT0gc2lncF9idXN5KQorCQkJdWRlbGF5KDEwKTsKKyAgICAgICAgfQorfQorCisjaWZuZGVmIENPTkZJR19BUkNIX1MzOTBYCisvKgorICogdGhpcyBmdW5jdGlvbiBzZW5kcyBhICdwdXJnZSB0bGInIHNpZ25hbCB0byBhbm90aGVyIENQVS4KKyAqLwordm9pZCBzbXBfcHRsYl9jYWxsYmFjayh2b2lkICppbmZvKQoreworCWxvY2FsX2ZsdXNoX3RsYigpOworfQorCit2b2lkIHNtcF9wdGxiX2FsbCh2b2lkKQoreworICAgICAgICBvbl9lYWNoX2NwdShzbXBfcHRsYl9jYWxsYmFjaywgTlVMTCwgMCwgMSk7Cit9CitFWFBPUlRfU1lNQk9MKHNtcF9wdGxiX2FsbCk7CisjZW5kaWYgLyogISBDT05GSUdfQVJDSF9TMzkwWCAqLworCisvKgorICogdGhpcyBmdW5jdGlvbiBzZW5kcyBhICdyZXNjaGVkdWxlJyBJUEkgdG8gYW5vdGhlciBDUFUuCisgKiBpdCBnb2VzIHN0cmFpZ2h0IHRocm91Z2ggYW5kIHdhc3RlcyBubyB0aW1lIHNlcmlhbGl6aW5nCisgKiBhbnl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XRjaCAoY2FsbCkgeworICAgICAgICBjYXNlIFNFTU9QOgorCQlyZXR1cm4gc3lzX3NlbXRpbWVkb3AoZmlyc3QsIChzdHJ1Y3Qgc2VtYnVmIF9fdXNlciAqKXB0ciwKKwkJCQkgICAgICAgKHVuc2lnbmVkKXNlY29uZCwgTlVMTCk7CisJY2FzZSBTRU1USU1FRE9QOgorCQlyZXR1cm4gc3lzX3NlbXRpbWVkb3AoZmlyc3QsIChzdHJ1Y3Qgc2VtYnVmIF9fdXNlciAqKXB0ciwKKwkJCQkgICAgICAgKHVuc2lnbmVkKXNlY29uZCwKKwkJCQkgICAgICAgKGNvbnN0IHN0cnVjdCB0aW1lc3BlYyBfX3VzZXIgKikgdGhpcmQpOworICAgICAgICBjYXNlIFNFTUdFVDoKKyAgICAgICAgICAgICAgICByZXR1cm4gc3lzX3NlbWdldChmaXJzdCwgKGludClzZWNvbmQsIHRoaXJkKTsKKyAgICAgICAgY2FzZSBTRU1DVEw6IHsKKyAgICAgICAgICAgICAgICB1bmlvbiBzZW11biBmb3VydGg7CisgICAgICAgICAgICAgICAgaWYgKCFwdHIpCisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKKyAgICAgICAgICAgICAgICBpZiAoZ2V0X3VzZXIoZm91cnRoLl9fcGFkLCAodm9pZCBfX3VzZXIgKiBfX3VzZXIgKikgcHRyKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUZBVUxUOworICAgICAgICAgICAgICAgIHJldHVybiBzeXNfc2VtY3RsKGZpcnN0LCAoaW50KXNlY29uZCwgdGhpcmQsIGZvdXJ0aCk7CisgICAgICAgIH0KKyAgICAgICAgY2FzZSBNU0dTTkQ6CisJCXJldHVybiBzeXNfbXNnc25kIChmaXJzdCwgKHN0cnVjdCBtc2didWYgX191c2VyICopIHB0ciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNpemVfdClzZWNvbmQsIHRoaXJkKTsKKwkJYnJlYWs7CisgICAgICAgIGNhc2UgTVNHUkNWOgorICAgICAgICAgICAgICAgIGlmICghcHRyKQorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7CisgICAgICAgICAgICAgICAgaWYgKGNvcHlfZnJvbV91c2VyICgmdG1wLCAoc3RydWN0IGlwY19rbHVkZ2UgX191c2VyICopIHB0ciwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoc3RydWN0IGlwY19rbHVkZ2UpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUZBVUxUOworICAgICAgICAgICAgICAgIHJldHVybiBzeXNfbXNncmN2IChmaXJzdCwgdG1wLm1zZ3AsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzaXplX3Qpc2Vjb25kLCB0bXAubXNndHlwLCB0aGlyZCk7CisgICAgICAgIGNhc2UgTVNHR0VUOgorICAgICAgICAgICAgICAgIHJldHVybiBzeXNfbXNnZ2V0KChrZXlfdClmaXJzdCwgKGludClzZWNvbmQpOworICAgICAgICBjYXNlIE1TR0NUTDoKKyAgICAgICAgICAgICAgICByZXR1cm4gc3lzX21zZ2N0bChmaXJzdCwgKGludClzZWNvbmQsCisJCQkJICAgKHN0cnVjdCBtc3FpZF9kcyBfX3VzZXIgKilwdHIpOworCisJY2FzZSBTSE1BVDogeworCQl1bG9uZyByYWRkcjsKKwkJcmV0ID0gZG9fc2htYXQoZmlyc3QsIChjaGFyIF9fdXNlciAqKXB0ciwKKwkJCQkoaW50KXNlY29uZCwgJnJhZGRyKTsKKwkJaWYgKHJldCkKKwkJCXJldHVybiByZXQ7CisJCXJldHVybiBwdXRfdXNlciAocmFkZHIsICh1bG9uZyBfX3VzZXIgKikgdGhpcmQpOworCQlicmVhazsKKyAgICAgICAgfQorCWNhc2UgU0hNRFQ6CisJCXJldHVybiBzeXNfc2htZHQgKChjaGFyIF9fdXNlciAqKXB0cik7CisJY2FzZSBTSE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WduZWQgbG9uZyBjcjA7CisJX191NjQgdGltZXI7CisKKwl0aW1lciA9IGppZmZpZXNfdGltZXJfY2MgKyBqaWZmaWVzXzY0ICogQ0xLX1RJQ0tTX1BFUl9KSUZGWTsKKwlTMzkwX2xvd2NvcmUuamlmZnlfdGltZXIgPSB0aW1lciArIENMS19USUNLU19QRVJfSklGRlk7CisJdGltZXIgKz0gQ0xLX1RJQ0tTX1BFUl9KSUZGWSArIENQVV9ERVZJQVRJT047CisJYXNtIHZvbGF0aWxlICgiU0NLQyAlMCIgOiA6ICJtIiAodGltZXIpKTsKKyAgICAgICAgLyogYWxsb3cgY2xvY2sgY29tcGFyYXRvciB0aW1lciBpbnRlcnJ1cHQgKi8KKwlfX2N0bF9zdG9yZShjcjAsIDAsIDApOworICAgICAgICBjcjAgfD0gMHg4MDA7CisJX19jdGxfbG9hZChjcjAsIDAsIDApOworfQorCitleHRlcm4gdm9pZCB2dGltZV9pbml0KHZvaWQpOworCisvKgorICogSW5pdGlhbGl6ZSB0aGUgVE9EIGNsb2NrIGFuZCB0aGUgQ1BVIHRpbWVyIG9mCisgKiB0aGUgYm9vdCBjcHUuCisgKi8KK3ZvaWQgX19pbml0IHRpbWVfaW5pdCh2b2lkKQoreworCV9fdTY0IHNldF90aW1lX2NjOworCWludCBjYzsKKworICAgICAgICAvKiBraWNrIHRoZSBUT0QgY2xvY2sgKi8KKyAgICAgICAgYXNtIHZvbGF0aWxlICgiU1RDSyAwKCUxKVxuXHQiCisgICAgICAgICAgICAgICAgICAgICAgIklQTSAgJTBcblx0IgorICAgICAgICAgICAgICAgICAgICAgICJTUkwgICUwLDI4IiA6ICI9ciIgKGNjKSA6ICJhIiAoJmluaXRfdGltZXJfY2MpIAorCQkJCSAgIDogIm1lbW9yeSIsICJjYyIpOworICAgICAgICBzd2l0Y2ggKGNjKSB7CisgICAgICAgIGNhc2UgMDogLyogY2xvY2sgaW4gc2V0IHN0YXRlOiBhbGwgaXMgZmluZSAqLworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIDE6IC8qIGNsb2NrIGluIG5vbi1zZXQgc3RhdGU6IEZJWE1FICovCisgICAgICAgICAgICAgICAgcHJpbnRrKCJ0aW1lX2luaXQ6IFRPRCBjbG9jayBpbiBub24tc2V0IHN0YXRlXG4iKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSAyOiAvKiBjbG9jayBpbiBlcnJvciBzdGF0ZTogRklYTUUgKi8KKyAgICAgICAgICAgICAgICBwcmludGsoInRpbWVfaW5pdDogVE9EIGNsb2NrIGluIGVycm9yIHN0YXRlXG4iKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSAzOiAvKiBjbG9jayBpbiBzdG9wcGVkIG9yIG5vdC1vcGVyYXRpb25hbCBzdGF0ZTogRklYTUUgKi8KKyAgICAgICAgICAgICAgICBwcmludGsoInRpbWVfaW5pdDogVE9EIGNsb2NrIHN0b3BwZWQvbm9uLW9wZXJhdGlvbmFsXG4iKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorCWppZmZpZXNfdGltZXJfY2MgPSBpbml0X3RpbWVyX2NjIC0gamlmZmllc182NCAqIENMS19USUNLU19QRVJfSklGRlk7CisKKwkvKiBzZXQgeHRpbWUgKi8KKwl4dGltZV9jYyA9IGluaXRfdGltZXJfY2MgKyBDTEtfVElDS1NfUEVSX0pJRkZZOworCXNldF90aW1lX2NjID0gaW5pdF90aW1lcl9jYyAtIDB4ODEyNmQ2MGU0NjAwMDAwMExMICsKKwkJKDB4M2MyNjcwMExMKjEwMDAwMDAqNDA5Nik7CisgICAgICAgIHRvZF90b190aW1ldmFsKHNldF90aW1lX2NjLCAmeHRpbWUpOworICAgICAgICBzZXRfbm9ybWFsaXplZF90aW1lc3BlYygmd2FsbF90b19tb25vdG9uaWMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC14dGltZS50dl9zZWMsIC14dGltZS50dl9uc2V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aWYKK30KKworc3RhdGljIHZvaWQgaW5saW5lIGRvX3RyYXAobG9uZyBpbnRlcnJ1cHRpb25fY29kZSwgaW50IHNpZ25yLCBjaGFyICpzdHIsCisgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QgcHRfcmVncyAqcmVncywgc2lnaW5mb190ICppbmZvKQoreworCS8qCisJICogV2UgZ290IGFsbCBuZWVkZWQgaW5mb3JtYXRpb24gZnJvbSB0aGUgbG93Y29yZSBhbmQgY2FuCisJICogbm93IHNhZmVseSBzd2l0Y2ggb24gaW50ZXJydXB0cy4KKwkgKi8KKyAgICAgICAgaWYgKHJlZ3MtPnBzdy5tYXNrICYgUFNXX01BU0tfUFNUQVRFKQorCQlsb2NhbF9pcnFfZW5hYmxlKCk7CisKKyAgICAgICAgaWYgKHJlZ3MtPnBzdy5tYXNrICYgUFNXX01BU0tfUFNUQVRFKSB7CisgICAgICAgICAgICAgICAgc3RydWN0IHRhc2tfc3RydWN0ICp0c2sgPSBjdXJyZW50OworCisgICAgICAgICAgICAgICAgdHNrLT50aHJlYWQudHJhcF9ubyA9IGludGVycnVwdGlvbl9jb2RlICYgMHhmZmZmOworCQlmb3JjZV9zaWdfaW5mbyhzaWduciwgaW5mbywgdHNrKTsKKwkJcmVwb3J0X3VzZXJfZmF1bHQoaW50ZXJydXB0aW9uX2NvZGUsIHJlZ3MpOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIGNvbnN0IHN0cnVjdCBleGNlcHRpb25fdGFibGVfZW50cnkgKmZpeHVwOworICAgICAgICAgICAgICAgIGZpeHVwID0gc2VhcmNoX2V4Y2VwdGlvbl90YWJsZXMocmVncy0+cHN3LmFkZHIgJiBQU1dfQUREUl9JTlNOKTsKKyAgICAgICAgICAgICAgICBpZiAoZml4dXApCisgICAgICAgICAgICAgICAgICAgICAgICByZWdzLT5wc3cuYWRkciA9IGZpeHVwLT5maXh1cCB8IFBTV19BRERSX0FNT0RFOworICAgICAgICAgICAgICAgI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AgICAgIHBnbV9jaGVja190YWJsZVsyXSA9ICZwcml2aWxlZ2VkX29wOworICAgICAgICBwZ21fY2hlY2tfdGFibGVbM10gPSAmZXhlY3V0ZV9leGNlcHRpb247CisgICAgICAgIHBnbV9jaGVja190YWJsZVs0XSA9ICZkb19wcm90ZWN0aW9uX2V4Y2VwdGlvbjsKKyAgICAgICAgcGdtX2NoZWNrX3RhYmxlWzVdID0gJmFkZHJlc3NpbmdfZXhjZXB0aW9uOworICAgICAgICBwZ21fY2hlY2tfdGFibGVbNl0gPSAmc3BlY2lmaWNhdGlvbl9leGNlcHRpb247CisgICAgICAgIHBnbV9jaGVja190YWJsZVs3XSA9ICZkYXRhX2V4Y2VwdGlvbjsKKyAgICAgICAgcGdtX2NoZWNrX3RhYmxlWzhdID0gJm92ZXJmbG93X2V4Y2VwdGlvbjsKKyAgICAgICAgcGdtX2NoZWNrX3RhYmxlWzldID0gJmRpdmlkZV9leGNlcHRpb247CisgICAgICAgIHBnbV9jaGVja190YWJsZVsweDBBXSA9ICZvdmVyZmxvd19leGNlcHRpb247CisgICAgICAgIHBnbV9jaGVja190YWJsZVsweDBCXSA9ICZkaXZpZGVfZXhjZXB0aW9uOworICAgICAgICBwZ21fY2hlY2tfdGFibGVbMHgwQ10gPSAmaGZwX292ZXJmbG93X2V4Y2VwdGlvbjsKKyAgICAgICAgcGdtX2NoZWNrX3RhYmxlWzB4MERdID0gJmhmcF91bmRlcmZsb3dfZXhjZXB0aW9uOworICAgICAgICBwZ21fY2hlY2tfdGFibGVbMHgwRV0gPSAmaGZwX3NpZ25pZmljYW5jZV9leGNlcHRpb247CisgICAgICAgIHBnbV9jaGVja190YWJsZVsweDBGXSA9ICZoZnBfZGl2aWRlX2V4Y2VwdGlvbjsKKyAgICAgICAgcGdtX2NoZWNrX3RhYmxlWzB4MTBdID0gJmRvX2RhdF9leGNlcHRpb247CisgICAgICAgIHBnbV9jaGVja190YWJsZVsweDExXSA9ICZkb19kYXRfZXhjZXB0aW9uOwor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XNzaW9uIGFib3V0IHRoZQorICAgICAgICAgKiBCb2dvTWlwcyBudW1iZXIgSSB0b29rIHRoZSBsaWJlcnR5IHRvIGRlZmluZSB0aGUgX19kZWxheQorICAgICAgICAgKiBmdW5jdGlvbiBpbiBhIHdheSB0aGF0IHRoYXQgcmVzdWx0aW5nIEJvZ29NaXBzIG51bWJlciB3aWxsCisgICAgICAgICAqIHlpZWxkIHRoZSBtZWdhaGVydHogbnVtYmVyIG9mIHRoZSBjcHUuIFRoZSBpbXBvcnRhbnQgZnVuY3Rpb24KKyAgICAgICAgICogaXMgdWRlbGF5IGFuZCB0aGF0IGlzIGRvbmUgdXNpbmcgdGhlIHRvZCBjbG9jay4gLS0gbWFydGluLgorICAgICAgICAgKi8KKyAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oCisgICAgICAgICAgICAgICAgIjA6IGJyY3QgJTAsMGIiCisgICAgICAgICAgICAgICAgOiAvKiBubyBvdXRwdXRzICovIDogInIiIChsb29wcy8yKSApOworfQorCisvKgorICogV2FpdHMgZm9yICd1c2VjcycgbWljcm9zZWNvbmRzIHVzaW5nIHRoZSB0b2QgY2xvY2ssIGdpdmluZyB1cCB0aGUgdGltZSBzbGljZQorICogb2YgdGhlIHZpcnR1YWwgUFUgaW5iZXR3ZWVuIHRvIGF2b2lkIGNvbmdlc3Rpb24uCisgKi8KK3ZvaWQgX191ZGVsYXkodW5zaWduZWQgbG9uZyB1c2VjcykKK3sKKyAgICAgICAgdWludDY0X3Qgc3RhcnRfY2MsIGVuZF9jYzsKKworICAgICAgICBpZiAodXNlY3MgPT0gMCkKKyAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgIGFzbSB2b2xhdGlsZSAoIlNUQ0sgJTAiIDogIj1tIiAoc3RhcnRfY2MpKTsKKyAgICAgICAgZG8geworCQljcHVfcmVsYXgoKTsKKyAgICAgICAgICAgICAgICBhc20gdm9sYXRpbGUgKCJTVENLICUwIiA6ICI9bSIgKGVuZF9jYykpOworICA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9fc3RybmVuZChjb25zdCBjaGFyICpzLCBzaXplX3QgbikKK3sKKwlyZWdpc3RlciB1bnNpZ25lZCBsb25nIHIwIGFzbSgiMCIpID0gMDsKKwljb25zdCBjaGFyICpwID0gcyArIG47CisKKwlhc20gdm9sYXRpbGUgKCIwOiBzcnN0ICAlMCwlMVxuIgorCQkgICAgICAiICAgam8gICAgMGIiCisJCSAgICAgIDogIitkIiAocCksICIrYSIgKHMpIDogImQiIChyMCkgOiAiY2MiICk7CisJcmV0dXJuIChjaGFyICopIHA7Cit9CisKKy8qKgorICogc3RybGVuIC0gRmluZCB0aGUgbGVuZ3RoIG9mIGEgc3RyaW5nCisgKiBAczogVGhlIHN0cmluZyB0byBiZSBzaXplZAorICoKKyAqIHJldHVybnMgdGhlIGxlbmd0aCBvZiBAcworICovCitzaXplX3Qgc3RybGVuKGNvbnN0IGNoYXIgKnMpCit7CisJcmV0dXJuIF9fc3RyZW5kKHMpIC0gczsKK30KK0VYUE9SVF9TWU1CT0woc3RybGVuKTsKKworLyoqCisgKiBzdHJubGVuIC0gRmluZCB0aGUgbGVuZ3RoIG9mIGEgbGVuZ3RoLWxpbWl0ZWQgc3RyaW5nCisgKiBAczogVGhlIHN0cmluZyB0byBiZSBzaXplZAorICogQG46IFRoZSBtYXhpbXVtIG51bWJlciBvZiBieXRlcyB0byBzZWFyY2gKKyAqCisgKiByZXR1cm5zIHRoZSBtaW5pbXVtIG9mIHRoZSBsZW5ndGggb2YgQHMgYW5kIEBuCisgKi8KK3NpemVfdCBzdHJubGVuKGNvbnN0IGNoYXIgKiBzLCBzaXplX3QgbikKK3sKKwlyZXR1cm4gX19zdHJuZW5kKHMsIG4pIC0gczsKK30KK0VYUE9SVF9TWU1CT0woc3Rybmxlbik7CisKKy8qKgorICogc3RyY3B5IC0gQ29weSBhICVOVUwgdGVybWluYXRlZCBzdHJpbmcKKyAqIEBkZXN0OiBXaGVyZSB0byBjb3B5IHRoZSBzdHJpbmcgdG8KKyAqIEBzcmM6I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5zIGEgcG9pbnRlciB0byBAZGVzdAorICovCitjaGFyICpzdHJjYXQoY2hhciAqZGVzdCwgY29uc3QgY2hhciAqc3JjKQoreworCXJlZ2lzdGVyIGludCByMCBhc20oIjAiKSA9IDA7CisJdW5zaWduZWQgbG9uZyBkdW1teTsKKwljaGFyICpyZXQgPSBkZXN0OworCisJYXNtIHZvbGF0aWxlICgiMDogc3JzdCAgJTAsJTFcbiIKKwkJICAgICAgIiAgIGpvICAgIDBiXG4iCisJCSAgICAgICIxOiBtdnN0ICAlMCwlMlxuIgorCQkgICAgICAiICAgam8gICAgMWIiCisJCSAgICAgIDogIj0mYSIgKGR1bW15KSwgIithIiAoZGVzdCksICIrYSIgKHNyYykKKwkJICAgICAgOiAiZCIgKHIwKSwgIjAiICgwVUwpIDogImNjIiwgIm1lbW9yeSIgKTsKKwlyZXR1cm4gcmV0OworfQorRVhQT1JUX1NZTUJPTChzdHJjYXQpOworCisvKioKKyAqIHN0cmxjYXQgLSBBcHBlbmQgYSBsZW5ndGgtbGltaXRlZCwgJU5VTC10ZXJtaW5hdGVkIHN0cmluZyB0byBhbm90aGVyCisgKiBAZGVzdDogVGhlIHN0cmluZyB0byBiZSBhcHBlbmRlZCB0bworICogQHNyYzogVGhlIHN0cmluZyB0byBhcHBlbmQgdG8gaXQKKyAqIEBuOiBUaGUgc2l6ZSBvZiB0aGUgZGVzdGluYXRpb24gYnVmZmVyLgorICovCitzaXplX3Qgc3RybGNhdChjaGFyICpkZXN0LCBjb25zdCBjaGFyICpzcmMsIHNpemVfdCBuKQoreworCXNpemVfdCBkc2l6ZSA9IF9fc3RyZW5kKGRlc3QpIC0gZGVzdDsKKwlzaXplX3QgbGVuID0gX19zdHJlbmQoc3JjKSAtIHNyYzsKKwlzaXplX3QgcmVzID0gZHNpemUgKyBsZW47CisKKwlpZiAoZHNpemUgPCBuKSB7CisJCWRlc3QgKz0gZHNpemU7CisJCW4gLT0gZHNpemU7CisJCWlmIChsZW4gPj0gbikKKwkJCWx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4gQGN0CisgKiAgICAgICAgID4gMCBpZiBAY3MgaXMgZ3JlYXRlciB0aGFuIEBjdAorICovCitpbnQgc3RyY21wKGNvbnN0IGNoYXIgKmNzLCBjb25zdCBjaGFyICpjdCkKK3sKKwlyZWdpc3RlciBpbnQgcjAgYXNtKCIwIikgPSAwOworCWludCByZXQgPSAwOworCisJYXNtIHZvbGF0aWxlICgiMDogY2xzdCAlMiwlM1xuIgorCQkgICAgICAiICAgam8gICAwYlxuIgorCQkgICAgICAiICAgamUgICAxZlxuIgorCQkgICAgICAiICAgaWMgICAlMCwwKCUyKVxuIgorCQkgICAgICAiICAgaWMgICAlMSwwKCUzKVxuIgorCQkgICAgICAiICAgc3IgICAlMCwlMVxuIgorCQkgICAgICAiMToiCisJCSAgICAgIDogIitkIiAocmV0KSwgIitkIiAocjApLCAiK2EiIChjcyksICIrYSIgKGN0KQorCQkgICAgICA6IDogImNjIiApOworCXJldHVybiByZXQ7Cit9CitFWFBPUlRfU1lNQk9MKHN0cmNtcCk7CisKKy8qKgorICogc3RycmNociAtIEZpbmQgdGhlIGxhc3Qgb2NjdXJyZW5jZSBvZiBhIGNoYXJhY3RlciBpbiBhIHN0cmluZworICogQHM6IFRoZSBzdHJpbmcgdG8gYmUgc2VhcmNoZWQKKyAqIEBjOiBUaGUgY2hhcmFjdGVyIHRvIHNlYXJjaCBmb3IKKyAqLworY2hhciAqIHN0cnJjaHIoY29uc3QgY2hhciAqIHMsIGludCBjKQoreworICAgICAgIHNpemVfdCBsZW4gPSBfX3N0cmVuZChzKSAtIHM7CisKKyAgICAgICBpZiAobGVuKQorCSAgICAgICBkbyB7CisJCSAgICAgICBpZiAoc1tsZW5dID09IChjaGFyKSBjKQorCQkJICAgICAgIHJldHVybiAoY2hhciAqKSBzICsgbGVuOworCSAgICAgICB9IHdoaWxlICgtLWxlbiA+IDApOworICAgICAgIHJldHVybiAwOworfQorRVhQT1JUX1NZTUJPTChzdHJyY2hyKTsKKworLyoqCisgKiBzdHJzdHI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JCQkJCQkJCVwKKyAgICAgICAgYnJlYWs7CQkJCQkJCQlcCisgICAgICBjYXNlIEZQX0NMU19OQU46CQkJCQkJCVwKKyAgICAgIGNhc2UgRlBfQ0xTX0lORjoJCQkJCQkJXAorICAgICAgY2FzZSBGUF9DTFNfWkVSTzoJCQkJCQkJXAorICAgICAgICBicmVhazsJCQkJCQkJCVwKKyAgICAgIH0JCQkJCQkJCQlcCisgIH0gd2hpbGUgKDApCisKKyNkZWZpbmUgRlBfVE9fRlBJTlRfUk9VTkRfUyhYKQlfRlBfVE9fRlBJTlRfUk9VTkQoUywxLFgpCisjZGVmaW5lIEZQX1RPX0ZQSU5UX1JPVU5EX0QoWCkJX0ZQX1RPX0ZQSU5UX1JPVU5EKEQsMixYKQorI2RlZmluZSBGUF9UT19GUElOVF9ST1VORF9RKFgpCV9GUF9UT19GUElOVF9ST1VORChRLDQsWCkKKwordHlwZWRlZiB1bmlvbiB7CisgICAgICAgIGxvbmcgZG91YmxlIGxkOworICAgICAgICBzdHJ1Y3QgeworICAgICAgICAgICAgICAgIF9fdTY0IGhpZ2g7CisgICAgICAgICAgICAgICAgX191NjQgbG93OworICAgICAgICB9IHc7Cit9IG1hdGhlbXVfbGRjdjsKKworI2lmZGVmIENPTkZJR19TWVNDVEwKK2ludCBzeXNjdGxfaWVlZV9lbXVsYXRpb25fd2FybmluZ3M9MTsKKyNlbmRpZgorCisjZGVmaW5lIG1hdGhlbXVfcHV0X3VzZXIoeCwgcCkgXAorICAgICAgICBkbyB7IFwKKyAgICAgICAgICAgICAgICBpZiAocHV0X3VzZXIoKHgpLChwKSkpIFwKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTSUdTRUdWOyBcCisgICAgICAgIH0gd2hpbGUgKDApCisKKyNkZWZpbmUgbWF0aGVtdV9nZXRfdXNlcih4LCBwKSBcCisgICAgICAgIGRvIHsgXAorICAgICAgICAgICAgICAgIGlmIChnZXRfdXNlcigoeCksKHApKSkgXAorICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNJR1NFR1Y7IFwKKyAgICAgICAgfSB3aGlsZSAoMCkKKworI2RlZmluZSBtYXRoZW11X2NvcHlfZnJvbV91c2VyKGQsIHMsIG4pXAorICAgICAgICBkbyB7IFwKKyAgICAgICAgICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoKGQpLChzKSwobikpICE9IDApIFwKKyAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTSUdTRUdWOyBcCisgICAgICAgIH0gd2hpbGUgKDApCisKKyNkZWZpbmUgbWF0aGVtdV9jb3B5X3RvX3VzZXIoZCwgcywgbikgXAorICAgICAgICBkbyB7IFwKKyAgICAgICAgICAgICAgICBpZiAoY29weV90b191c2VyKChkKSwocyksKG4pKSAhPSAwKSBcCisgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU0lHU0VHVjsgXAorICAgICAgICB9IHdoaWxlICgwKQorCitzdGF0aWMgdm9pZCBkaXNwbGF5X2VtdWxhdGlvbl9ub3RfaW1wbGVtZW50ZWQoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGNoYXIgKmluc3RyKQoreworICAgICAgICBfX3UxNiAqbG9jYXRpb247CisgICAgICAgIAorI2lmZGVmIENPTkZJR19TWVNDVEwKKyAgICAgICAgaWYoc3lzY3RsX2llZWVfZW11bGF0aW9uX3dhcm5pbmdzKQorI2VuZGlmCisgICAgICAgIHsKKyAgICAgICAgICAgICAgICBsb2NhdGlvbiA9IChfX3UxNiAqKShyZWdzLT5wc3cuYWRkci1TMzkwX2xvd2NvcmUucGdtX2lsYyk7CisgICAgICAgICAgICAgICAgcHJpbnRrKCIlcyBpZWVlIGZwdSBpbnN0cnVjdGlvbiBub3QgZW11bGF0ZWQgIgorICAgICAgICAgICAgICAgICAgICAgICAicHJvY2VzcyBuYW1lOiAlcyBwaWQ6ICVkIFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgaW5zdHIsIGN1cnJlbnQtPmNvbW0sIGN1cnJlbnQtPnBpZCk7CisgICAgICAgICAgICAgICAgcHJpbnRrKCIlcydzIFBTVzogICAgJTA4bHggJTA4bHhcbiIsIGluc3RyLAorICAgICAgICAgICAgICAgICAgICAgICAodW5zaWduZWQgbG9uZykgcmVncy0+cHN3Lm1hc2ssCisgICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKSBsb2NhdGlvbik7CisgICAgICAgIH0KK30KKworc3RhdGljIGlubGluZSB2b2lkIGVtdV9zZXRfQ0MgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgY2MpCit7CisgICAgICAgIHJlZ3MtPnBzdy5tYXNrID0gKHJlZ3MtPnBzdy5tYXNrICYgMHhGRkZGQ0ZGRikgfCAoKGNjJjMpIDw8IDEyKTsKK30KKworLyoKKyAqIFNldCB0aGUgY29uZGl0aW9uIGNvZGUgaW4gdGhlIHVzZXIgcHN3LgorICogIDAgOiBSZXN1bHQgaXMgemVybworICogIDEgOiBSZXN1bHQgaXMgbGVzcyB0aGFuIHplcm8KKyAqICAyIDogUmVzdWx0IGlzIGdyZWF0ZXIgdGhhbiB6ZXJvCisgKiAgMyA6IFJlc3VsdCBpcyBOYU4gb3IgSU5GCisgKi8KK3N0YXRpYyBpbmxpbmUgdm9pZCBlbXVfc2V0X0NDX2NzKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgY2xhc3MsIGludCBzaWduKQoreworICAgICAgICBzd2l0Y2ggKGNsYXNzKSB7CisgICAgICAgIGNhc2UgRlBfQ0xTX05PUk1BTDoKKyAgICAgICAgY2FzZSBGUF9DTFNfSU5GOgorICAgICAgICAgICAgICAgIGVtdV9zZXRfQ0MocmVncywgc2lnbiA/IDEgOiAyKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSBGUF9DTFNfWkVSTzoKKyAgICAgICAgICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIDApOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIEZQX0NMU19OQU46CisgICAgICAgICAgICAgICAgZW11X3NldF9DQyhyZWdzLCAzKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorfQorCisvKiBBZGQgbG9uZyBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X2F4YnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgeworICAgICAgICBGUF9ERUNMX1EoUUEpOyBGUF9ERUNMX1EoUUIpOyBGUF9ERUNMX1EoUVIpOworICAgICAgICBGUF9ERUNMX0VYOworCW1hdGhlbXVfbGRjdiBjdnQ7CisgICAgICAgIGludCBtb2RlOworCisJbW9kZSA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwYyAmIDM7CisgICAgICAgIGN2dC53LmhpZ2ggPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS51aTsKKyAgICAgICAgY3Z0LncubG93ID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeCsyXS51aTsKKyAgICAgICAgRlBfVU5QQUNLX1FQKFFBLCAmY3Z0LmxkKTsKKyAgICAgICAgY3Z0LncuaGlnaCA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLnVpOworICAgICAgICBjdnQudy5sb3cgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5KzJdLnVpOworICAgICAgICBGUF9VTlBBQ0tfUVAoUUIsICZjdnQubGQpOworICAgICAgICBGUF9BRERfUShRUiwgUUEsIFFCKTsKKyAgICAgICAgRlBfUEFDS19RUCgmY3Z0LmxkLCBRUik7CisgICAgICAgIGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLnVpID0gY3Z0LncuaGlnaDsKKyAgICAgICAgY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeCsyXS51aSA9IGN2dC53LmxvdzsKKyAgICAgICAgZW11X3NldF9DQ19j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qCisgICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCisgICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCisgICAgICAgICAqLworICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKKyAgICAgICAgcmV0dXJuIDA7Cit9CisKKy8qIENvbXBhcmUgZG91YmxlICovCitzdGF0aWMgaW50IGVtdV9jZGJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKKyAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKKyAgICAgICAgaW50IElSOworCisgICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKKyAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmQpOworICAgICAgICBGUF9DTVBfRChJUiwgREEsIERCLCAzKTsKKyAgICAgICAgLyoKKyAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiwgSVIgPT0gMCBpZiBEQSA9PSBEQiwKKyAgICAgICAgICogSVIgPT0gMSBpZiBEQSA+IERCIGFuZCBJUiA9PSAzIGlmIHVub3JkZXJkZWQKKyAgICAgICAgICovCisgICAgICAgIGVtdV9zZXRfQ0MocmVncywgKElSID09IC0xKSA/IDEgOiAoSVIgPT0gMSkgPyAyIDogSVIpOworICAgICAgICByZXR1cm4gMDsKK30KKworLyogQ29tcGFyZSBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X2NkYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZG91YmxlICp2YWwpIHsKKyAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKKyAgICAgICAgaW50IElSOworCisgICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKKyAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgdmFsKTsKKyAgICAgICAgRlBfQ01QX0QoSVIsIERBLCBEQiwgMyk7CisgICAgICAgIC8qCisgICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCisgICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCisgICAgICAgICAqLworICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKKyAgICAgICAgcmV0dXJuIDA7Cit9CisKKy8qIENvbXBhcmUgZmxvYXQgKi8KK3N0YXRpYyBpbnQgZW11X2NlYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgeworICAgICAgICBGUF9ERUNMX1MoU0EpOyBGUF9ERUNMX1MoU0IpOworICAgICAgICBpbnQgSVI7CisKKyAgICAgICAgRlBfVU5QQUNLX1JBV19TUChTQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmYpOworICAgICAgICBGUF9VTlBBQ0tfUkFXX1NQKFNCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZik7CisgICAgICAgIEZQX0NNUF9TKElSLCBTQSwgU0IsIDMpOworICAgICAgICAvKgorICAgICAgICAgKiBJUiA9PSAtMSBpZiBEQSA8IERCLCBJUiA9PSAwIGlmIERBID09IERCLAorICAgICAgICAgKiBJUiA9PSAxIGlmIERBID4gREIgYW5kIElSID09IDMgaWYgdW5vcmRlcmRlZAorICAgICAgICAgKi8KKyAgICAgICAgZW11X3NldF9DQyhyZWdzLCAoSVIgPT0gLTEpID8gMSA6IChJUiA9PSAxKSA/IDIgOiBJUik7CisgICAgICAgIHJldHVybiAwOworfQorCisvKiBDb21wYXJlIGZsb2F0ICovCitzdGF0aWMgaW50IGVtdV9jZWIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGZsb2F0ICp2YWwpIHsKKyAgICAgICAgRlBfREVDTF9TKFNBKTsgRlBfREVDTF9TKFNCKTsKKyAgICAgICAgaW50IElSOworCisgICAgICAgIEZQX1VOUEFDS19SQVdfU1AoU0EsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5mKTsKKyAgICAgICAgRlBfVU5QQUNLX1JBV19TUChTQiwgdmFsKTsKKyAgICAgICAgRlBfQ01QX1MoSVIsIFNBLCBTQiwgMyk7CisgICAgICAgIC8qCisgICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCisgICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCisgICAgICAgICAqLworICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKKyAgICAgICAgcmV0dXJuIDA7Cit9CisKKy8qIENvbXBhcmUgYW5kIHNpZ25hbCBsb25nIGRvdWJsZSAqLworc3RhdGljIGludCBlbXVfa3hiciAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgaW50IHJ5KSB7CisgICAgICAgIEZQX0RFQ0xfUShRQSk7IEZQX0RFQ0xfUShRQik7CisgICAgICAgIEZQX0RFQ0xfRVg7CisJbWF0aGVtdV9sZGN2IGN2dDsKKyAgICAgICAgaW50IElSOworCisgICAgICAgIGN2dC53LmhpZ2ggPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS51aTsKKyAgICAgICAgY3Z0LncubG93ID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeCsyXS51aTsKKyAgICAgICAgRlBfVU5QQUNLX1JBV19RUChRQSwgJmN2dC5sZCk7CisgICAgICAgIGN2dC53LmhpZ2ggPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5XS51aTsKKyAgICAgICAgY3Z0LncubG93ID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeSsyXS51aTsKKyAgICAgICAgRlBfVU5QQUNLX1FQKFFCLCAmY3Z0LmxkKTsKKyAgICAgICAgRlBfQ01QX1EoSVIsIFFBLCBRQiwgMyk7CisgICAgICAgIC8qCisgICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCisgICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCisgICAgICAgICAqLworICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKKyAgICAgICAgaWYgKElSID09IDMpCisgICAgICAgICAgICAgICAgRlBfU0VUX0VYQ0VQVElPTiAoRlBfRVhfSU5WQUxJRCk7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBDb21wYXJlIGFuZCBzaWduYWwgZG91YmxlICovCitzdGF0aWMgaW50IGVtdV9rZGJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKKyAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKyAgICAgICAgaW50IElSOworCisgICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKKyAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmQpOworICAgICAgICBGUF9DTVBfRChJUiwgREEsIERCLCAzKTsKKyAgICAgICAgLyoKKyAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiwgSVIgPT0gMCBpZiBEQSA9PSBEQiwKKyAgICAgICAgICogSVIgPT0gMSBpZiBEQSA+IERCIGFuZCBJUiA9PSAzIGlmIHVub3JkZXJkZWQKKyAgICAgICAgICovCisgICAgICAgIGVtdV9zZXRfQ0MocmVncywgKElSID09IC0xKSA/IDEgOiAoSVIgPT0gMSkgPyAyIDogSVIpOworICAgICAgICBpZiAoSVIgPT0gMykKKyAgICAgICAgICAgICAgICBGUF9TRVRfRVhDRVBUSU9OIChGUF9FWF9JTlZBTElEKTsKKyAgICAgICAgcmV0dXJuIF9mZXg7Cit9CisKKy8qIENvbXBhcmUgYW5kIHNpZ25hbCBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X2tkYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZG91YmxlICp2YWwpIHsKKyAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKyAgICAgICAgaW50IElSOworCisgICAgICAgIEZQX1VOUEFDS19SQVdfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKKyAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQiwgdmFsKTsKKyAgICAgICAgRlBfQ01QX0QoSVIsIERBLCBEQiwgMyk7CisgICAgICAgIC8qCisgICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCisgICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCisgICAgICAgICAqLworICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKKyAgICAgICAgaWYgKElSID09IDMpCisgICAgICAgICAgICAgICAgRlBfU0VUX0VYQ0VQVElPTiAoRlBfRVhfSU5WQUxJRCk7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBDb21wYXJlIGFuZCBzaWduYWwgZmxvYXQgKi8KK3N0YXRpYyBpbnQgZW11X2tlYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgeworICAgICAgICBGUF9ERUNMX1MoU0EpOyBGUF9ERUNMX1MoU0IpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBpbnQgSVI7CisKKyAgICAgICAgRlBfVU5QQUNLX1JBV19TUChTQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmYpOworICAgICAgICBGUF9VTlBBQ0tfUkFXX1NQKFNCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZik7CisgICAgICAgIEZQX0NNUF9TKElSLCBTQSwgU0IsIDMpOworICAgICAgICAvKgorICAgICAgICAgKiBJUiA9PSAtMSBpZiBEQSA8IERCLCBJUiA9PSAwIGlmIERBID09IERCLAorICAgICAgICAgKiBJUiA9PSAxIGlmIERBID4gREIgYW5kIElSID09IDMgaWYgdW5vcmRlcmRlZAorICAgICAgICAgKi8KKyAgICAgICAgZW11X3NldF9DQyhyZWdzLCAoSVIgPT0gLTEpID8gMSA6IChJUiA9PSAxKSA/IDIgOiBJUik7CisgICAgICAgIGlmIChJUiA9PSAzKQorICAgICAgICAgICAgICAgIEZQX1NFVF9FWENFUFRJT04gKEZQX0VYX0lOVkFMSUQpOworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogQ29tcGFyZSBhbmQgc2lnbmFsIGZsb2F0ICovCitzdGF0aWMgaW50IGVtdV9rZWIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGZsb2F0ICp2YWwpIHsKKyAgICAgICAgRlBfREVDTF9TKFNBKTsgRlBfREVDTF9TKFNCKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKyAgICAgICAgaW50IElSOworCisgICAgICAgIEZQX1VOUEFDS19SQVdfU1AoU0EsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5mKTsKKyAgICAgICAgRlBfVU5QQUNLX1JBV19TUChTQiwgdmFsKTsKKyAgICAgICAgRlBfQ01QX1MoSVIsIFNBLCBTQiwgMyk7CisgICAgICAgIC8qCisgICAgICAgICAqIElSID09IC0xIGlmIERBIDwgREIsIElSID09IDAgaWYgREEgPT0gREIsCisgICAgICAgICAqIElSID09IDEgaWYgREEgPiBEQiBhbmQgSVIgPT0gMyBpZiB1bm9yZGVyZGVkCisgICAgICAgICAqLworICAgICAgICBlbXVfc2V0X0NDKHJlZ3MsIChJUiA9PSAtMSkgPyAxIDogKElSID09IDEpID8gMiA6IElSKTsKKyAgICAgICAgaWYgKElSID09IDMpCisgICAgICAgICAgICAgICAgRlBfU0VUX0VYQ0VQVElPTiAoRlBfRVhfSU5WQUxJRCk7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBDb252ZXJ0IGZyb20gZml4ZWQgbG9uZyBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X2N4ZmJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKKyAgICAgICAgRlBfREVDTF9RKFFSKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKwltYXRoZW11X2xkY3YgY3Z0OworICAgICAgICBfX3MzMiBzaTsKKyAgICAgICAgaW50IG1vZGU7CisKKwltb2RlID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgMzsKKyAgICAgICAgc2kgPSByZWdzLT5ncHJzW3J5XTsKKyAgICAgICAgRlBfRlJPTV9JTlRfUShRUiwgc2ksIDMyLCBpbnQpOworICAgICAgICBGUF9QQUNLX1FQKCZjdnQubGQsIFFSKTsKKyAgICAgICAgY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0udWkgPSBjdnQudy5oaWdoOworICAgICAgICBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4KzJdLnVpID0gY3Z0LncubG93OworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogQ29udmVydCBmcm9tIGZpeGVkIGRvdWJsZSAqLworc3RhdGljIGludCBlbXVfY2RmYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgeworICAgICAgICBGUF9ERUNMX0QoRFIpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBfX3MzMiBzaTsKKyAgICAgICAgaW50IG1vZGU7CisKKwltb2RlID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgMzsKKyAgICAgICAgc2kgPSByZWdzLT5ncHJzW3J5XTsKKyAgICAgICAgRlBfRlJPTV9JTlRfRChEUiwgc2ksIDMyLCBpbnQpOworICAgICAgICBGUF9QQUNLX0RQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kLCBEUik7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBDb252ZXJ0IGZyb20gZml4ZWQgZmxvYXQgKi8KK3N0YXRpYyBpbnQgZW11X2NlZmJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKKyAgICAgICAgRlBfREVDTF9TKFNSKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKyAgICAgICAgX19zMzIgc2k7CisgICAgICAgIGludCBtb2RlOworCisJbW9kZSA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwYyAmIDM7CisgICAgICAgIHNpID0gcmVncy0+Z3Byc1tyeV07CisgICAgICAgIEZQX0ZST01fSU5UX1MoU1IsIHNpLCAzMiwgaW50KTsKKyAgICAgICAgRlBfUEFDS19TUCgmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0uZiwgU1IpOworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogQ29udmVydCB0byBmaXhlZCBsb25nIGRvdWJsZSAqLworc3RhdGljIGludCBlbXVfY2Z4YnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSwgaW50IG1hc2spIHsKKyAgICAgICAgRlBfREVDTF9RKFFBKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKwltYXRoZW11X2xkY3YgY3Z0OworICAgICAgICBfX3MzMiBzaTsKKyAgICAgICAgaW50IG1vZGU7CisKKwlpZiAobWFzayA9PSAwKQorCQltb2RlID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgMzsKKwllbHNlIGlmIChtYXNrID09IDEpCisJCW1vZGUgPSBGUF9STkRfTkVBUkVTVDsKKwllbHNlCisJCW1vZGUgPSBtYXNrIC0gNDsKKyAgICAgICAgY3Z0LncuaGlnaCA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLnVpOworICAgICAgICBjdnQudy5sb3cgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5KzJdLnVpOworICAgICAgICBGUF9VTlBBQ0tfUVAoUUEsICZjdnQubGQpOworICAgICAgICBGUF9UT19JTlRfUk9VTkRfUShzaSwgUUEsIDMyLCAxKTsKKyAgICAgICAgcmVncy0+Z3Byc1tyeF0gPSBzaTsKKyAgICAgICAgZW11X3NldF9DQ19jcyhyZWdzLCBRQV9jLCBRQV9zKTsKKyAgICAgICAgcmV0dXJuIF9mZXg7Cit9CisKKy8qIENvbnZlcnQgdG8gZml4ZWQgZG91YmxlICovCitzdGF0aWMgaW50IGVtdV9jZmRiciAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgaW50IHJ5LCBpbnQgbWFzaykgeworICAgICAgICBGUF9ERUNMX0QoREEpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBfX3MzMiBzaTsKKyAgICAgICAgaW50IG1vZGU7CisKKwlpZiAobWFzayA9PSAwKQorCQltb2RlID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgMzsKKwllbHNlIGlmIChtYXNrID09IDEpCisJCW1vZGUgPSBGUF9STkRfTkVBUkVTVDsKKwllbHNlCisJCW1vZGUgPSBtYXNrIC0gNDsKKyAgICAgICAgRlBfVU5QQUNLX0RQKERBLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZCk7CisgICAgICAgIEZQX1RPX0lOVF9ST1VORF9EKHNpLCBEQSwgMzIsIDEpOworICAgICAgICByZWdzLT5ncHJzW3J4XSA9IHNpOworICAgICAgICBlbXVfc2V0X0NDX2NzKHJlZ3MsIERBX2MsIERBX3MpOworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogQ29udmVydCB0byBmaXhlZCBmbG9hdCAqLworc3RhdGljIGludCBlbXVfY2ZlYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSwgaW50IG1hc2spIHsKKyAgICAgICAgRlBfREVDTF9TKFNBKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKyAgICAgICAgX19zMzIgc2k7CisgICAgICAgIGludCBtb2RlOworCisJaWYgKG1hc2sgPT0gMCkKKwkJbW9kZSA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwYyAmIDM7CisJZWxzZSBpZiAobWFzayA9PSAxKQorCQltb2RlID0gRlBfUk5EX05FQVJFU1Q7CisJZWxzZQorCQltb2RlID0gbWFzayAtIDQ7CisgICAgICAgIEZQX1VOUEFDS19TUChTQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmYpOworICAgICAgICBGUF9UT19JTlRfUk9VTkRfUyhzaSwgU0EsIDMyLCAxKTsKKyAgICAgICAgcmVncy0+Z3Byc1tyeF0gPSBzaTsKKyAgICAgICAgZW11X3NldF9DQ19jcyhyZWdzLCBTQV9jLCBTQV9zKTsKKyAgICAgICAgcmV0dXJuIF9mZXg7Cit9CisKKy8qIERpdmlkZSBsb25nIGRvdWJsZSAqLworc3RhdGljIGludCBlbXVfZHhiciAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgaW50IHJ5KSB7CisgICAgICAgIEZQX0RFQ0xfUShRQSk7IEZQX0RFQ0xfUShRQik7IEZQX0RFQ0xfUShRUik7CisgICAgICAgIEZQX0RFQ0xfRVg7CisJbWF0aGVtdV9sZGN2IGN2dDsKKyAgICAgICAgaW50IG1vZGU7CisKKwltb2RlID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgMzsKKyAgICAgICAgY3Z0LncuaGlnaCA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLnVpOworICAgICAgICBjdnQudy5sb3cgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4KzJdLnVpOworICAgICAgICBGUF9VTlBBQ0tfUVAoUUEsICZjdnQubGQpOworICAgICAgICBjdnQudy5oaWdoID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0udWk7CisgICAgICAgIGN2dC53LmxvdyA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnkrMl0udWk7CisgICAgICAgIEZQX1VOUEFDS19RUChRQiwgJmN2dC5sZCk7CisgICAgICAgIEZQX0RJVl9RKFFSLCBRQSwgUUIpOworICAgICAgICBGUF9QQUNLX1FQKCZjdnQubGQsIFFSKTsKKyAgICAgICAgY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0udWkgPSBjdnQudy5oaWdoOworICAgICAgICBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4KzJdLnVpID0gY3Z0LncubG93OworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogRGl2aWRlIGRvdWJsZSAqLworc3RhdGljIGludCBlbXVfZGRiciAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgaW50IHJ5KSB7CisgICAgICAgIEZQX0RFQ0xfRChEQSk7IEZQX0RFQ0xfRChEQik7IEZQX0RFQ0xfRChEUik7CisgICAgICAgIEZQX0RFQ0xfRVg7CisgICAgICAgIGludCBtb2RlOworCisJbW9kZSA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwYyAmIDM7CisgICAgICAgIEZQX1VOUEFDS19EUChEQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmQpOworICAgICAgICBGUF9VTlBBQ0tfRFAoREIsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5XS5kKTsKKyAgICAgICAgRlBfRElWX0QoRFIsIERBLCBEQik7CisJRlBfUEFDS19EUCgmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0uZCwgRFIpOworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogRGl2aWRlIGRvdWJsZSAqLworc3RhdGljIGludCBlbXVfZGRiIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBkb3VibGUgKnZhbCkgeworICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOyBGUF9ERUNMX0QoRFIpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKKyAgICAgICAgRlBfVU5QQUNLX0RQKERCLCB2YWwpOworICAgICAgICBGUF9ESVZfRChEUiwgREEsIERCKTsKKwlGUF9QQUNLX0RQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kLCBEUik7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBEaXZpZGUg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cF9yZWdzLmZwcnNbcnhdLmYsIFNSKTsKKyAgICAgICAgcmV0dXJuIF9mZXg7Cit9CisKKy8qIERpdmlkZSB0byBpbnRlZ2VyIGRvdWJsZSAqLworc3RhdGljIGludCBlbXVfZGlkYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSwgaW50IG1hc2spIHsKKyAgICAgICAgZGlzcGxheV9lbXVsYXRpb25fbm90X2ltcGxlbWVudGVkKHJlZ3MsICJkaWRiciIpOworICAgICAgICByZXR1cm4gMDsKK30KKworLyogRGl2aWRlIHRvIGludGVnZXIgZmxvYXQgKi8KK3N0YXRpYyBpbnQgZW11X2RpZWJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnksIGludCBtYXNrKSB7CisgICAgICAgIGRpc3BsYXlfZW11bGF0aW9uX25vdF9pbXBsZW1lbnRlZChyZWdzLCAiZGllYnIiKTsKKyAgICAgICAgcmV0dXJuIDA7Cit9CisKKy8qIEV4dHJhY3QgZnBjICovCitzdGF0aWMgaW50IGVtdV9lZnBjIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKKyAgICAgICAgcmVncy0+Z3Byc1tyeF0gPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGM7CisgICAgICAgIHJldHVybiAwOworfQorCisvKiBMb2FkIGFuZCB0ZXN0IGxvbmcgZG91YmxlICovCitzdGF0aWMgaW50IGVtdV9sdHhiciAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgaW50IHJ5KSB7CisgICAgICAgIHMzOTBfZnBfcmVncyAqZnBfcmVncyA9ICZjdXJyZW50LT50aHJlYWQuZnBfcmVnczsKKwltYXRoZW11X2xkY3YgY3Z0OworICAgICAgICBGUF9ERUNMX1EoUUEpOworICAgICAgICBGUF9ERUNMX0VYOworCisgICAgICAgIGN2dC53LmhpZ2ggPSBjdXJyZW50LT50aHJlYWQu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cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcngrMl0udWk7CisgICAgICAgIEZQX1VOUEFDS19RUChRQSwgJmN2dC5sZCk7CisgICAgICAgIGN2dC53LmhpZ2ggPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5XS51aTsKKyAgICAgICAgY3Z0LncubG93ID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeSsyXS51aTsKKyAgICAgICAgRlBfVU5QQUNLX1FQKFFCLCAmY3Z0LmxkKTsKKyAgICAgICAgRlBfTVVMX1EoUVIsIFFBLCBRQik7CisgICAgICAgIEZQX1BBQ0tfUVAoJmN2dC5sZCwgUVIpOworICAgICAgICBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS51aSA9IGN2dC53LmhpZ2g7CisgICAgICAgIGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcngrMl0udWkgPSBjdnQudy5sb3c7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBNdWx0aXBseSBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X21kYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgeworICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOyBGUF9ERUNMX0QoRFIpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKKyAgICAgICAgRlBfVU5QQUNLX0RQKERCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZCk7CisgICAgICAgIEZQX01VTF9EKERSLCBEQSwgREIpOworCUZQX1BBQ0tfRFAoJmN1cnJlbnQtPnRocm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IsIFFBLCBEQSk7CisgICAgICAgIEZQX1VOUEFDS19EUChEQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmQpOworCUZQX0NPTlYgKFEsIEQsIDQsIDIsIFFCLCBEQSk7CisgICAgICAgIEZQX01VTF9RKFFSLCBRQSwgUUIpOworICAgICAgICBGUF9QQUNLX1FQKCZjdnQubGQsIFFSKTsKKyAgICAgICAgY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0udWkgPSBjdnQudy5oaWdoOworICAgICAgICBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4KzJdLnVpID0gY3Z0LncubG93OworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogTXVsdGlwbHkgZG91YmxlIHRvIGxvbmcgZG91YmxlICovCitzdGF0aWMgaW50IGVtdV9teGRiIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBsb25nIGRvdWJsZSAqdmFsKSB7CisgICAgICAgIEZQX0RFQ0xfUShRQSk7IEZQX0RFQ0xfUShRQik7IEZQX0RFQ0xfUShRUik7CisgICAgICAgIEZQX0RFQ0xfRVg7CisJbWF0aGVtdV9sZGN2IGN2dDsKKyAgICAgICAgaW50IG1vZGU7CisKKwltb2RlID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgMzsKKyAgICAgICAgY3Z0LncuaGlnaCA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLnVpOworICAgICAgICBjdnQudy5sb3cgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4KzJdLnVpOworICAgICAgICBGUF9VTlBBQ0tfUVAoUUEsICZjdnQubGQpOworICAgICAgICBGUF9VTlBBQ0tfUVAoUUIsIHZhbCk7CisgICAgICAgIEZQX01VTF9RKFFSLCBRQSwgUUIpOworICAgICAgICBGUF9QQUNLX1FQKCZjdnQubGQsIFFSKTsKKyAgICAgICAgY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0udWkgPSBjdnQudy5oaWdoOworICAgICAgICBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4KzJdLnVpID0gY3Z0LncubG93OworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogTXVsdGlwbHkgZmxvYXQgKi8KK3N0YXRpYyBpbnQgZW11X21lZWJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKKyAgICAgICAgRlBfREVDTF9TKFNBKTsgRlBfREVDTF9TKFNCKTsgRlBfREVDTF9TKFNSKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKyAgICAgICAgaW50IG1vZGU7CisKKwltb2RlID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgMzsKKyAgICAgICAgRlBfVU5QQUNLX1NQKFNBLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0uZik7CisgICAgICAgIEZQX1VOUEFDS19TUChTQiwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnldLmYpOworICAgICAgICBGUF9NVUxfUyhTUiwgU0EsIFNCKTsKKwlGUF9QQUNLX1NQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5mLCBTUik7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBNdWx0aXBseSBmbG9hdCAqLworc3RhdGljIGludCBlbXVfbWVlYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZmxvYXQgKnZhbCkgeworICAgICAgICBGUF9ERUNMX1MoU0EpOyBGUF9ERUNMX1MoU0IpOyBGUF9ERUNMX1MoU1IpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfU1AoU0EsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5mKTsKKyAgICAgICAgRlBfVU5QQUNLX1NQKFNCLCB2YWwpOworICAgICAgICBGUF9NVUxfUyhTUiwgU0EsIFNCKTsKKwlGUF9QQUNLX1NQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5mLCBTUik7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBNdWx0aXBseSBmbG9hdCB0byBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X21kZWJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnkpIHsKKyAgICAgICAgRlBfREVDTF9TKFNBKTsgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsgRlBfREVDTF9EKERSKTsKKwlGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfU1AoU0EsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5mKTsKKwlGUF9DT05WIChELCBTLCAyLCAxLCBEQSwgU0EpOworICAgICAgICBGUF9VTlBBQ0tfU1AoU0EsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5XS5mKTsKKwlGUF9DT05WIChELCBTLCAyLCAxLCBEQiwgU0EpOworICAgICAgICBGUF9NVUxfRChEUiwgREEsIERCKTsKKwlGUF9QQUNLX0RQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kLCBEUik7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBNdWx0aXBseSBmbG9hdCB0byBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X21kZWIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGZsb2F0ICp2YWwpIHsKKyAgICAgICAgRlBfREVDTF9TKFNBKTsgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsgRlBfREVDTF9EKERSKTsKKwlGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfU1AoU0EsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5mKTsKKwlGUF9DT05WIChELCBTLCAyLCAxLCBEQSwgU0EpOworICAgICAgICBGUF9VTlBBQ0tfU1AoU0EsIHZhbCk7CisJRlBfQ09OViAoRCwgUywgMiwgMSwgREIsIFNBKTsKKyAgICAgICAgRlBfTVVMX0QoRFIsIERBLCBEQik7CisJRlBfUEFDS19EUCgmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0uZCwgRFIpOworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogTXVsdGlwbHkgYW5kIGFkZCBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X21hZGJyIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcnksIGludCByeikgeworICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOyBGUF9ERUNMX0QoREMpOyBGUF9ERUNMX0QoRFIpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kKTsKKyAgICAgICAgRlBfVU5QQUNLX0RQKERCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZCk7CisgICAgICAgIEZQX1VOUEFDS19EUChEQywgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnpdLmQpOworICAgICAgICBGUF9NVUxfRChEUiwgREEsIERCKTsKKyAgICAgICAgRlBfQUREX0QoRFIsIERSLCBEQyk7CisJRlBfUEFDS19EUCgmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyel0uZCwgRFIpOworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogTXVsdGlwbHkgYW5kIGFkZCBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X21hZGIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGRvdWJsZSAqdmFsLCBpbnQgcnopIHsKKyAgICAgICAgRlBfREVDTF9EKERBKTsgRlBfREVDTF9EKERCKTsgRlBfREVDTF9EKERDKTsgRlBfREVDTF9EKERSKTsKKyAgICAgICAgRlBfREVDTF9FWDsKKyAgICAgICAgaW50IG1vZGU7CisKKwltb2RlID0gY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgMzsKKyAgICAgICAgRlBfVU5QQUNLX0RQKERBLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0uZCk7CisgICAgICAgIEZQX1VOUEFDS19EUChEQiwgdmFsKTsKKyAgICAgICAgRlBfVU5QQUNLX0RQKERDLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyel0uZCk7CisgICAgICAgIEZQX01VTF9EKERSLCBEQSwgREIpOworICAgICAgICBGUF9BRERfRChEUiwgRFIsIERDKTsKKwlGUF9QQUNLX0RQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J6XS5kLCBEUik7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBNdWx0aXBseSBhbmQgYWRkIGZsb2F0ICovCitzdGF0aWMgaW50IGVtdV9tYWViciAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgaW50IHJ5LCBpbnQgcnopIHsKKyAgICAgICAgRlBfREVDTF9TKFNBKTsgRlBfREVDTF9TKFNCKTs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9DQ19jcyhyZWdzLCBRUl9jLCBRUl9zKTsKKyAgICAgICAgcmV0dXJuIF9mZXg7Cit9CisKKy8qIFNxdWFyZSByb290IGRvdWJsZSAqLworc3RhdGljIGludCBlbXVfc3FkYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgeworICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoRFIpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfRFAoREEsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5XS5kKTsKKwlGUF9TUVJUX0QoRFIsIERBKTsKKwlGUF9QQUNLX0RQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kLCBEUik7CisgICAgICAgIGVtdV9zZXRfQ0NfY3MocmVncywgRFJfYywgRFJfcyk7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBTcXVhcmUgcm9vdCBkb3VibGUgKi8KK3N0YXRpYyBpbnQgZW11X3NxZGIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGRvdWJsZSAqdmFsKSB7CisgICAgICAgIEZQX0RFQ0xfRChEQSk7IEZQX0RFQ0xfRChEUik7CisgICAgICAgIEZQX0RFQ0xfRVg7CisgICAgICAgIGludCBtb2RlOworCisJbW9kZSA9IGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwYyAmIDM7CisgICAgICAgIEZQX1VOUEFDS19EUChEQSwgdmFsKTsKKwlGUF9TUVJUX0QoRFIsIERBKTsKKwlGUF9QQUNLX0RQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5kLCBEUik7CisgICAgICAgIGVtdV9zZXRfQ0NfY3MocmVncywgRFJfYywgRFJfcyk7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBTcXVhcmUgcm9vdCBmbG9hdCAqLworc3RhdGljIGludCBlbXVfc3FlYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgeworICAgICAgICBGUF9ERUNMX1MoU0EpOyBGUF9ERUNMX1MoU1IpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfU1AoU0EsICZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J5XS5mKTsKKwlGUF9TUVJUX1MoU1IsIFNBKTsKKwlGUF9QQUNLX1NQKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3J4XS5mLCBTUik7CisgICAgICAgIGVtdV9zZXRfQ0NfY3MocmVncywgU1JfYywgU1Jfcyk7CisgICAgICAgIHJldHVybiBfZmV4OworfQorCisvKiBTcXVhcmUgcm9vdCBmbG9hdCAqLworc3RhdGljIGludCBlbXVfc3FlYiAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCByeCwgZmxvYXQgKnZhbCkgeworICAgICAgICBGUF9ERUNMX1MoU0EpOyBGUF9ERUNMX1MoU1IpOworICAgICAgICBGUF9ERUNMX0VYOworICAgICAgICBpbnQgbW9kZTsKKworCW1vZGUgPSBjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAzOworICAgICAgICBGUF9VTlBBQ0tfU1AoU0EsIHZhbCk7CisJRlBfU1FSVF9TKFNSLCBTQSk7CisJRlBfUEFDS19TUCgmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeF0uZiwgU1IpOworICAgICAgICBlbXVfc2V0X0NDX2NzKHJlZ3MsIFNSX2MsIFNSX3MpOworICAgICAgICByZXR1cm4gX2ZleDsKK30KKworLyogU3VidHJhY3QgbG9uZyBkb3V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fcmVnZChpbnQgcmVnKSB7CisgICAgICAgIGlmICgocmVnJjkpICE9IDApICAgICAgICAgLyogdGVzdCBpZiByZWcgaW4gezAsMiw0LDZ9ICovCisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICBhc20gdm9sYXRpbGUgKCAgICAgICAgICAgIC8qIGxvYWQgcmVnIGZyb20gZnBfcmVncy5mcHJzW3JlZ10gKi8KKyAgICAgICAgICAgICAgICAiICAgICBicmFzICAxLDBmXG4iCisgICAgICAgICAgICAgICAgIiAgICAgbGQgICAgMCwwKCUxKVxuIgorICAgICAgICAgICAgICAgICIwOiAgIGV4ICAgICUwLDAoMSkiCisgICAgICAgICAgICAgICAgOiAvKiBubyBvdXRwdXQgKi8KKyAgICAgICAgICAgICAgICA6ICJhIiAocmVnPDw0KSwiYSIgKCZjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcHJzW3JlZ10uZCkKKyAgICAgICAgICAgICAgICA6ICIxIiApOworfQorCitzdGF0aWMgaW5saW5lIHZvaWQgZW11X2xvYWRfcmVnZShpbnQgcmVnKSB7CisgICAgICAgIGlmICgocmVnJjkpICE9IDApICAgICAgICAgLyogdGVzdCBpZiByZWcgaW4gezAsMiw0LDZ9ICovCisgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICBhc20gdm9sYXRpbGUgKCAgICAgICAgICAgIC8qIGxvYWQgcmVnIGZyb20gZnBfcmVncy5mcHJzW3JlZ10gKi8KKyAgICAgICAgICAgICAgICAiICAgICBicmFzICAxLDBmXG4iCisgICAgICAgICAgICAgICAgIiAgICAgbGUgICAgMCwwKCUxKVxuIgorICAgICAgICAgICAgICAgICIwOiAgIGV4ICAgICUwLDAoMSkiCisgICAgICAgICAgICAgICAgOiAvKiBubyBvdXRwdXQgKi8KKyAgICAgICAgICAgICAgICA6ICJhIiAocmVnPDw0KSwgImEiICgmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyZWddLmYpCisgICAgICAgICAgICAgICAgOiAiMSIgKTsKK30KKworc3RhdGljIGlubGluZSB2b2lkIGVtdV9zdG9yZV9yZWdkKGludCByZWcpIHsKKyAgICAgICAgaWYgKChyZWcmOSkgIT0gMCkgICAgICAgICAvKiB0ZXN0IGlmIHJlZyBpbiB7MCwyLDQsNn0gKi8KKyAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgIGFzbSB2b2xhdGlsZSAoICAgICAgICAgICAgLyogc3RvcmUgcmVnIHRvIGZwX3JlZ3MuZnByc1tyZWddICovCisgICAgICAgICAgICAgICAgIiAgICAgYnJhcyAgMSwwZlxuIgorICAgICAgICAgICAgICAgICIgICAgIHN0ZCAgIDAsMCglMSlcbiIKKyAgICAgICAgICAgICAgICAiMDogICBleCAgICAlMCwwKDEpIgorICAgICAgICAgICAgICAgIDogLyogbm8gb3V0cHV0ICovCisgICAgICAgICAgICAgICAgOiAiYSIgKHJlZzw8NCksICJhIiAoJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcmVnXS5kKQorICAgICAgICAgICAgICAgIDogIjEiICk7Cit9CisKKworc3RhdGljIGlubGluZSB2b2lkIGVtdV9zdG9yZV9yZWdlKGludCByZWcpIHsKKyAgICAgICAgaWYgKChyZWcmOSkgIT0gMCkgICAgICAgICAvKiB0ZXN0IGlmIHJlZyBpbiB7MCwyLDQsNn0gKi8KKyAgICAgICAgICAgICAgICByZXR1cm47CisgICAgICAgIGFzbSB2b2xhdGlsZSAoICAgICAgICAgICAgLyogc3RvcmUgcmVnIHRvIGZwX3JlZ3MuZnByc1tyZWddICovCisgICAgICAgICAgICAgICAgIiAgICAgYnJhcyAgMSwwZlxuIgorICAgICAgICAgICAgICAgICIgICAgIHN0ZSAgIDAsMCglMSlcbiIKKyAgICAgICAgICAgICAgICAiMDogICBleCAgICAlMCwwKDEpIgorICAgICAgICAgICAgICAgIDogLyogbm8gb3V0cHV0ICovCisgICAgICAgICAgICAgICAgOiAiYSIgKHJlZzw8NCksICJhIiAoJmN1cnJlbn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sCisJCVsweDQ4XSA9IDB4MDEsWzB4NDldID0gMHgwMSxbMHg0YV0gPSAweDAxLFsweDRiXSA9IDB4MDEsCisJCVsweDRjXSA9IDB4MDEsWzB4NGRdID0gMHgwMSxbMHg1M10gPSAweDA2LFsweDU3XSA9IDB4MDYsCisgICAgICAgICAgICAgICAgWzB4NWJdID0gMHgwNSxbMHg1Zl0gPSAweDA1LFsweDg0XSA9IDB4MTMsWzB4OGNdID0gMHgxMywKKwkJWzB4OTRdID0gMHgwOSxbMHg5NV0gPSAweDA4LFsweDk2XSA9IDB4MDcsWzB4OThdID0gMHgwYywKKwkJWzB4OTldID0gMHgwYixbMHg5YV0gPSAweDBhCisgICAgICAgIH07CisgICAgICAgIHN0YXRpYyBjb25zdCB2b2lkICpqdW1wX3RhYmxlWzI1Nl09IHsKKyAgICAgICAgICAgICAgICBbMHgwMF0gPSBlbXVfbHBlYnIsWzB4MDFdID0gZW11X2xuZWJyLFsweDAyXSA9IGVtdV9sdGViciwKKyAgICAgICAgICAgICAgICBbMHgwM10gPSBlbXVfbGNlYnIsWzB4MDRdID0gZW11X2xkZWJyLFsweDA1XSA9IGVtdV9seGRiciwKKyAgICAgICAgICAgICAgICBbMHgwNl0gPSBlbXVfbHhlYnIsWzB4MDddID0gZW11X214ZGJyLFsweDA4XSA9IGVtdV9rZWJyLAorICAgICAgICAgICAgICAgIFsweDA5XSA9IGVtdV9jZWJyLCBbMHgwYV0gPSBlbXVfYWViciwgWzB4MGJdID0gZW11X3NlYnIsCisgICAgICAgICAgICAgICAgWzB4MGNdID0gZW11X21kZWJyLFsweDBkXSA9IGVtdV9kZWJyLCBbMHgwZV0gPSBlbXVfbWFlYnIsCisgICAgICAgICAgICAgICAgWzB4MGZdID0gZW11X21zZWJyLFsweDEwXSA9IGVtdV9scGRicixbMHgxMV0gPSBlbXVfbG5kYnIsIAorICAgICAgICAgICAgICAgIFsweDEyXSA9IGVtdV9sdGRicixbMHgxM10gPSBlbXVfbGNkYnIsWzB4MTRdID0gZW11X3NxZWJyLAorICAgICAgICAgICAgICAgIFsweDE1XSA9IGVtdV9zcWRicixbMHgxNl0gPSBlbXVfc3F4YnIsWzB4MTddID0gZW11X21lZWJyLAorICAgICAgICAgICAgICAgIFsweDE4XSA9IGVtdV9rZGJyLCBbMHgxOV0gPSBlbXVfY2RiciwgWzB4MWFdID0gZW11X2FkYnIsCisgICAgICAgICAgICAgICAgWzB4MWJdID0gZW11X3NkYnIsIFsweDFjXSA9IGVtdV9tZGJyLCBbMHgxZF0gPSBlbXVfZGRiciwgIAorICAgICAgICAgICAgICAgIFsweDFlXSA9IGVtdV9tYWRicixbMHgxZl0gPSBlbXVfbXNkYnIsWzB4NDBdID0gZW11X2xweGJyLAorICAgICAgICAgICAgICAgIFsweDQxXSA9IGVtdV9sbnhicixbMHg0Ml0gPSBlbXVfbHR4YnIsWzB4NDNdID0gZW11X2xjeGJyLAorICAgICAgICAgICAgICAgIFsweDQ0XSA9IGVtdV9sZWRicixbMHg0NV0gPSBlbXVfbGR4YnIsWzB4NDZdID0gZW11X2xleGJyLAorICAgICAgICAgICAgICAgIFsweDQ3XSA9IGVtdV9maXhicixbMHg0OF0gPSBlbXVfa3hiciwgWzB4NDldID0gZW11X2N4YnIsICAKKyAgICAgICAgICAgICAgICBbMHg0YV0gPSBlbXVfYXhiciwgWzB4NGJdID0gZW11X3N4YnIsIFsweDRjXSA9IGVtdV9teGJyLAorICAgICAgICAgICAgICAgIFsweDRkXSA9IGVtdV9keGJyLCBbMHg1M10gPSBlbXVfZGllYnIsWzB4NTddID0gZW11X2ZpZWJyLAorICAgICAgICAgICAgICAgIFsweDViXSA9IGVtdV9kaWRicixbMHg1Zl0gPSBlbXVfZmlkYnIsWzB4ODRdID0gZW11X3NmcGMsCisgICAgICAgICAgICAgICAgWzB4OGNdID0gZW11X2VmcGMsIFsweDk0XSA9IGVtdV9jZWZicixbMHg5NV0gPSBlbXVfY2RmYnIsIAorICAgICAgICAgICAgICAgIFsweDk2XSA9IGVtdV9jeGZicixbMHg5OF0gPSBlbXVfY2ZlYnIsWzB4OTldID0gZW11X2NmZGJyLAorICAgICAgICAgICAgICAgIFsweDlhXSA9IGVtdV9jZnhicgorICAgICAgICB9OworCisgICAgICAgIHN3aXRjaCAoZm9ybWF0X3RhYmxlW29wY29kZVsxXV0pIHsKKyAgICAgICAgY2FzZSAxOiAvKiBSUkUgZm9ybWF0LCBsb25nIGRvdWJsZSBvcGVyYXRpb24gKi8KKyAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMHgyMikKKwkJCXJldHVybiBTSUdJTEw7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgoKG9wY29kZVszXSA+PiA0KSAmIDE1KSArIDIpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdICYgMTUpICsgMik7CisgICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCisgICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLGludCwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZChvcGNvZGVbM10gJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdICYgMTUpICsgMik7CisJCWJyZWFrOworICAgICAgICBjYXNlIDI6IC8qIFJSRSBmb3JtYXQsIGRvdWJsZSBvcGVyYXRpb24gKi8KKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKG9wY29kZVszXSAmIDE1KTsKKwkJYnJlYWs7CisgICAgICAgIGNhc2UgMzogLyogUlJFIGZvcm1hdCwgZmxvYXQgb3BlcmF0aW9uICovCisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZShvcGNvZGVbM10gJiAxNSk7CisgICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCisgICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCisJCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZShvcGNvZGVbM10gJiAxNSk7CisJCWJyZWFrOworICAgICAgICBjYXNlIDQ6IC8qIFJSRiBmb3JtYXQsIGxvbmcgZG91YmxlIG9wZXJhdGlvbiAqLworICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAweDIyKQorCQkJcmV0dXJuIFNJR0lMTDsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50LCBpbnQpKQorCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQorICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSwgb3Bjb2RlWzJdID4+IDQpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZChvcGNvZGVbM10gJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdICYgMTUpICsgMik7CisJCWJyZWFrOworICAgICAgICBjYXNlIDU6IC8qIFJSRiBmb3JtYXQsIGRvdWJsZSBvcGVyYXRpb24gKi8KKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzJdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLworICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQsIGludCkpCisJCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1LCBvcGNvZGVbMl0gPj4gNCk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzJdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKG9wY29kZVszXSAmIDE1KTsKKwkJYnJlYWs7CisgICAgICAgIGNhc2UgNjogLyogUlJGIGZvcm1hdCwgZmxvYXQgb3BlcmF0aW9uICovCisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsyXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKG9wY29kZVszXSAmIDE1KTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50LCBpbnQpKQorCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQorICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSwgb3Bjb2RlWzJdID4+IDQpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2UoKG9wY29kZVsyXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZShvcGNvZGVbM10gJiAxNSk7CisJCWJyZWFrOworICAgICAgICBjYXNlIDc6IC8qIFJSRSBmb3JtYXQsIGN4ZmJyIGluc3RydWN0aW9uICovCisgICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCisgICAgICAgICAgICAgICAgaWYgKG9wY29kZVszXSAmIDB4MjApCisJCQlyZXR1cm4gU0lHSUxMOworICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQorCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQorICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbM10gPj4gNCkgJiAxNSkgKyAyKTsKKwkJYnJlYWs7CisgICAgICAgIGNhc2UgODogLyogUlJFIGZvcm1hdCwgY2RmYnIgaW5zdHJ1Y3Rpb24gKi8KKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKwkJYnJlYWs7CisgICAgICAgIGNhc2UgOTogLyogUlJFIGZvcm1hdCwgY2VmYnIgaW5zdHJ1Y3Rpb24gKi8KKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKwkJYnJlYWs7CisgICAgICAgIGNhc2UgMTA6IC8qIFJSRiBmb3JtYXQsIGNmeGJyIGluc3RydWN0aW9uICovCisgICAgICAgICAgICAgICAgaWYgKChvcGNvZGVbMl0gJiAxMjgpID09IDEyOCB8fCAob3Bjb2RlWzJdICYgOTYpID09IDMyKQorCQkJLyogbWFzayBvZiB7IDIsMyw4LTE1IH0gaXMgaW52YWxpZCAqLworCQkJcmV0dXJuIFNJR0lMTDsKKyAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMikKKwkJCXJldHVybiBTSUdJTEw7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50LCBpbnQpKQorCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQorICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSwgb3Bjb2RlWzJdID4+IDQpOworCQlicmVhazsKKyAgICAgICAgY2FzZSAxMTogLyogUlJGIGZvcm1hdCwgY2ZkYnIgaW5zdHJ1Y3Rpb24gKi8KKyAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsyXSAmIDEyOCkgPT0gMTI4IHx8IChvcGNvZGVbMl0gJiA5NikgPT0gMzIpCisJCQkvKiBtYXNrIG9mIHsgMiwzLDgtMTUgfSBpcyBpbnZhbGlkICovCisJCQlyZXR1cm4gU0lHSUxMOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50LCBpbnQpKQorCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQorICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSwgb3Bjb2RlWzJdID4+IDQpOworCQlicmVhazsKKyAgICAgICAgY2FzZSAxMjogLyogUlJGIGZvcm1hdCwgY2ZlYnIgaW5zdHJ1Y3Rpb24gKi8KKyAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsyXSAmIDEyOCkgPT0gMTI4IHx8IChvcGNvZGVbMl0gJiA5NikgPT0gMzIpCisJCQkvKiBtYXNrIG9mIHsgMiwzLDgtMTUgfSBpcyBpbnZhbGlkICovCisJCQlyZXR1cm4gU0lHSUxMOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKG9wY29kZVszXSAmIDE1KTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50LCBpbnQpKQorCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQorICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSwgb3Bjb2RlWzJdID4+IDQpOworCQlicmVhazsKKyAgICAgICAgY2FzZSAxMzogLyogUlJFIGZvcm1hdCwgbGR4YnIgJiBtZHhiciBpbnN0cnVjdGlvbiAqLworICAgICAgICAgICAgICAgIC8qIGRvdWJsZSBzdG9yZSBidXQgbG9uZyBkb3VibGUgbG9hZCAqLworICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAweDIwKQorCQkJcmV0dXJuIFNJR0lMTDsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAgJiAxNSk7CisgICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCisgICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCisJCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgoKG9wY29kZVszXSA+PiA0KSAmIDE1KSArIDIpOworCQlicmVhazsKKyAgICAgICAgY2FzZSAxNDogLyogUlJFIGZvcm1hdCwgbGR4YnIgJiBtZHhiciBpbnN0cnVjdGlvbiAqLworICAgICAgICAgICAgICAgIC8qIGZsb2F0IHN0b3JlIGJ1dCBsb25nIGRvdWJsZSBsb2FkICovCisgICAgICAgICAgICAgICAgaWYgKG9wY29kZVszXSAmIDB4MjApCisJCQlyZXR1cm4gU0lHSUxMOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Uob3Bjb2RlWzNdICAmIDE1KTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7CisJCWJyZWFrOworICAgICAgICBjYXNlIDE1OiAvKiBSUkUgZm9ybWF0LCBsZGViciAmIG1kZWJyIGluc3RydWN0aW9uICovCisgICAgICAgICAgICAgICAgLyogZmxvYXQgc3RvcmUgYnV0IGRvdWJsZSBsb2FkICovCisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZShvcGNvZGVbM10gICYgMTUpOworICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLworICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQorCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQorICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOworCQlicmVhazsKKyAgICAgICAgY2FzZSAxNjogLyogUlJFIGZvcm1hdCwgbGR4YnIgaW5zdHJ1Y3Rpb24gKi8KKyAgICAgICAgICAgICAgICAvKiBsb25nIGRvdWJsZSBzdG9yZSBidXQgZG91YmxlIGxvYWQgKi8KKyAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMikKKwkJCXJldHVybiBTSUdJTEw7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSAxNzogLyogUlJFIGZvcm1hdCwgbGR4YnIgaW5zdHJ1Y3Rpb24gKi8KKyAgICAgICAgICAgICAgICAvKiBsb25nIGRvdWJsZSBzdG9yZSBidXQgZmxvYXQgbG9hZCAqLworICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAyKQorCQkJcmV0dXJuIFNJR0lMTDsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSAmIDE1KSArIDIpOworICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLworICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQorCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQorICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICBjYXNlIDE4OiAvKiBSUkUgZm9ybWF0LCBsZWRiciBpbnN0cnVjdGlvbiAqLworICAgICAgICAgICAgICAgIC8qIGRvdWJsZSBzdG9yZSBidXQgZmxvYXQgbG9hZCAqLworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgY2FzZSAxOTogLyogUlJFIGZvcm1hdCwgZWZwYyAmIHNmcGMgaW5zdHJ1Y3Rpb24gKi8KKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICBkZWZhdWx0OiAvKiBpbnZhbGlkIG9wZXJhdGlvbiAqLworICAgICAgICAgICAgICAgIHJldHVybiBTSUdJTEw7CisgICAgICAgIH0KKwlpZiAoX2ZleCAhPSAwKSB7CisJCWN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwYyB8PSBfZmV4OworCQlpZiAoY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjICYgKF9mZXggPDwgOCkpCisJCQlyZXR1cm4gU0lHRlBFOworCX0KKwlyZXR1cm4gMDsKK30KKworc3RhdGljIHZvaWQqIGNhbGNfYWRkcihzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBpbnQgcmIsIGludCBkaXNwKQoreworICAgICAgICBhZGRyX3QgYWRkcjsKKworICAgICAgICByeCAmPSAxNTsKKyAgICAgICAgcmIgJj0gMTU7CisgICAgICAgIGFkZHIgPSBkaXNwICYgMHhmZmY7CisgICAgICAgIGFkZHIgKz0gKHJ4ICE9IDApID8gcmVncy0+Z3Byc1tyeF0gOiAwOyAgLyogKyBpbmRleCAqLworICAgICAgICBhZGRyICs9IChyYiAhPSAwKSA/IHJlZ3MtPmdwcnNbcmJdIDogMDsgIC8qICsgYmFzZSAgKi8KKyAgICAgICAgcmV0dXJuICh2b2lkKikgYWRkcjsKK30KKyAgICAKK2ludCBtYXRoX2VtdV9lZChfX3U4ICpvcGNvZGUsIHN0cnVjdCBwdF9yZWdzICogcmVncykgeworICAgICAgICBpbnQgX2ZleCA9IDA7CisKKyAgICAgICAgc3RhdGljIGNvbnN0IF9fdTggZm9ybWF0X3RhYmxlWzI1Nl0gPSB7CisgICAgICAgICAgICAgICAgWzB4MDRdID0gMHgwNixbMHgwNV0gPSAweDA1LFsweDA2XSA9IDB4MDcsWzB4MDddID0gMHgwNSwKKwkJWzB4MDhdID0gMHgwMixbMHgwOV0gPSAweDAyLFsweDBhXSA9IDB4MDIsWzB4MGJdID0gMHgwMiwKKwkJWzB4MGNdID0gMHgwNixbMHgwZF0gPSAweDAyLFsweDBlXSA9IDB4MDQsWzB4MGZdID0gMHgwNCwKKyAgICAgICAgICAgICAgICBbMHgxMF0gPSAweDA4LFsweDExXSA9IDB4MDksWzB4MTJdID0gMHgwYSxbMHgxNF0gPSAweDAyLAorCQlbMHgxNV0gPSAweDAxLFsweDE3XSA9IDB4MDIsWzB4MThdID0gMHgwMSxbMHgxOV0gPSAweDAxLAorCQlbMHgxYV0gPSAweDAxLFsweDFiXSA9IDB4MDEsWzB4MWNdID0gMHgwMSxbMHgxZF0gPSAweDAxLAorICAgICAgICAgICAgICAgIFsweDFlXSA9IDB4MDMsWzB4MWZdID0gMHgwMywKKyAgICAgICAgfTsKKyAgICAgICAgc3RhdGljIGNvbnN0IHZvaWQgKmp1bXBfdGFibGVbXT0geworICAgICAgICAgICAgICAgIFsweDA0XSA9IGVtdV9sZGViLFsweDA1XSA9IGVtdV9seGRiLFsweDA2XSA9IGVtdV9seGViLAorICAgICAgICAgICAgICAgIFsweDA3XSA9IGVtdV9teGRiLFsweDA4XSA9IGVtdV9rZWIsIFsweDA5XSA9IGVtdV9jZWIsCisgICAgICAgICAgICAgICAgWzB4MGFdID0gZW11X2FlYiwgWzB4MGJdID0gZW11X3NlYiwgWzB4MGNdID0gZW11X21kZWIsCisgICAgICAgICAgICAgICAgWzB4MGRdID0gZW11X2RlYiwgWzB4MGVdID0gZW11X21hZWIsWzB4MGZdID0gZW11X21zZWIsCisgICAgICAgICAgICAgICAgWzB4MTBdID0gZW11X3RjZWIsWzB4MTFdID0gZW11X3RjZGIsWzB4MTJdID0gZW11X3RjeGIsCisgICAgICAgICAgICAgICAgWzB4MTRdID0gZW11X3NxZWIsWzB4MTVdID0gZW11X3NxZGIsWzB4MTddID0gZW11X21lZWIsCisgICAgICAgICAgICAgICAgWzB4MThdID0gZW11X2tkYiwgWzB4MTldID0gZW11X2NkYiwgWzB4MWFdID0gZW11X2FkYiwKKyAgICAgICAgICAgICAgICBbMHgxYl0gPSBlbXVfc2RiLCBbMHgxY10gPSBlbXVfbWRiLCBbMHgxZF0gPSBlbXVfZGRiLAorICAgICAgICAgICAgICAgIFsweDFlXSA9IGVtdV9tYWRiLFsweDFmXSA9IGVtdV9tc2RiCisgICAgICAgIH07CisKKyAgICAgICAgc3dpdGNoIChmb3JtYXRfdGFibGVbb3Bjb2RlWzVdXSkgeworICAgICAgICBjYXNlIDE6IC8qIFJYRSBmb3JtYXQsIGRvdWJsZSBjb25zdGFudCAqLyB7CisgICAgICAgICAgICAgICAgX191NjQgKmR4YiwgdGVtcDsKKyAgICAgICAgICAgICAgICBfX3UzMiBvcGM7CisKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7CisgICAgICAgICAgICAgICAgZHhiID0gKF9fdTY0ICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKKyAgICAgICAgICAgICAgICBtYXRoZW11X2NvcHlfZnJvbV91c2VyKCZ0ZW1wLCBkeGIsIDgpOworICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLworICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBkb3VibGUgKikpCisJCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIChkb3VibGUgKikgJnRlbXApOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgICBjYXNlIDI6IC8qIFJYRSBmb3JtYXQsIGZsb2F0IGNvbnN0YW50ICovIHsKKyAgICAgICAgICAgICAgICBfX3UzMiAqZHhiLCB0ZW1wOworICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKKworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKKyAgICAgICAgICAgICAgICBkeGIgPSAoX191MzIgKikgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOworICAgICAgICAgICAgICAgIG1hdGhlbXVfZ2V0X3VzZXIodGVtcCwgZHhiKTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgZmxvYXQgKikpCisJCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIChmbG9hdCAqKSAmdGVtcCk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzFdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2UgMzogLyogUlhGIGZvcm1hdCwgZG91YmxlIGNvbnN0YW50ICovIHsKKyAgICAgICAgICAgICAgICBfX3U2NCAqZHhiLCB0ZW1wOworICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKKworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVs0XSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOworICAgICAgICAgICAgICAgIGR4YiA9IChfX3U2NCAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7CisgICAgICAgICAgICAgICAgbWF0aGVtdV9jb3B5X2Zyb21fdXNlcigmdGVtcCwgZHhiLCA4KTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgZG91YmxlICosIGludCkpCisJCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIChkb3VibGUgKikgJnRlbXAsIG9wY29kZVs0XSA+PiA0KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgY2FzZSA0OiAvKiBSWEYgZm9ybWF0LCBmbG9hdCBjb25zdGFudCAqLyB7CisgICAgICAgICAgICAgICAgX191MzIgKmR4YiwgdGVtcDsKKyAgICAgICAgICAgICAgICBfX3UzMiBvcGM7CisKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzFdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbNF0gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKKyAgICAgICAgICAgICAgICBkeGIgPSAoX191MzIgKikgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOworICAgICAgICAgICAgICAgIG1hdGhlbXVfZ2V0X3VzZXIodGVtcCwgZHhiKTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgZmxvYXQgKiwgaW50KSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGZsb2F0ICopICZ0ZW1wLCBvcGNvZGVbNF0gPj4gNCk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzRdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2UgNTogLyogUlhFIGZvcm1hdCwgZG91YmxlIGNvbnN0YW50ICovCisgICAgICAgICAgICAgICAgLyogc3RvcmUgZG91YmxlIGFuZCBsb2FkIGxvbmcgZG91YmxlICovIAorICAgICAgICB7CisgICAgICAgICAgICAgICAgX191NjQgKmR4YiwgdGVtcDsKKyAgICAgICAgICAgICAgICBfX3UzMiBvcGM7CisgICAgICAgICAgICAgICAgaWYgKChvcGNvZGVbMV0gPj4gNCkgJiAweDIwKQorCQkJcmV0dXJuIFNJR0lMTDsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7CisgICAgICAgICAgICAgICAgZHhiID0gKF9fdTY0ICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKKyAgICAgICAgICAgICAgICBtYXRoZW11X2NvcHlfZnJvbV91c2VyKCZ0ZW1wLCBkeGIsIDgpOworICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLworICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBkb3VibGUgKikpCisJCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIChkb3VibGUgKikgJnRlbXApOworICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzFdID4+IDQpICYgMTUpICsgMik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgY2FzZSA2OiAvKiBSWEUgZm9ybWF0LCBmbG9hdCBjb25zdGFudCAqLworICAgICAgICAgICAgICAgIC8qIHN0b3JlIGZsb2F0IGFuZCBsb2FkIGRvdWJsZSAqLyAKKyAgICAgICAgeworICAgICAgICAgICAgICAgIF9fdTMyICpkeGIsIHRlbXA7CisgICAgICAgICAgICAgICAgX191MzIgb3BjOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKKyAgICAgICAgICAgICAgICBkeGIgPSAoX191MzIgKikgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOworICAgICAgICAgICAgICAgIG1hdGhlbXVfZ2V0X3VzZXIodGVtcCwgZHhiKTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgZmxvYXQgKikpCisJCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIChmbG9hdCAqKSAmdGVtcCk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2UgNzogLyogUlhFIGZvcm1hdCwgZmxvYXQgY29uc3RhbnQgKi8KKyAgICAgICAgICAgICAgICAvKiBzdG9yZSBmbG9hdCBhbmQgbG9hZCBsb25nIGRvdWJsZSAqLyAKKyAgICAgICAgeworICAgICAgICAgICAgICAgIF9fdTMyICpkeGIsIHRlbXA7CisgICAgICAgICAgICAgICAgX191MzIgb3BjOworICAgICAgICAgICAgICAgIGlmICgob3Bjb2RlWzFdID4+IDQpICYgMHgyMCkKKwkJCXJldHVybiBTSUdJTEw7CisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOworICAgICAgICAgICAgICAgIGR4YiA9IChfX3UzMiAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7CisgICAgICAgICAgICAgICAgbWF0aGVtdV9nZXRfdXNlcih0ZW1wLCBkeGIpOworICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLworICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBmbG9hdCAqKSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgKGZsb2F0ICopICZ0ZW1wKTsKKyAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgoKG9wY29kZVsxXSA+PiA0KSAmIDE1KSArIDIpOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2UgODogLyogUlhFIGZvcm1hdCwgUlggYWRkcmVzcyB1c2VkIGFzIGludCB2YWx1ZSAqLyB7CisgICAgICAgICAgICAgICAgX191NjQgZHhiOworICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKKworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7CisgICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKKyAgICAgICAgICAgICAgICBkeGIgPSAoX191NjQpIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgbG9uZykpCisJCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIGR4Yik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgY2FzZSA5OiAvKiBSWEUgZm9ybWF0LCBSWCBhZGRyZXNzIHVzZWQgYXMgaW50IHZhbHVlICovIHsKKyAgICAgICAgICAgICAgICBfX3U2NCBkeGI7CisgICAgICAgICAgICAgICAgX191MzIgb3BjOworCisgICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKKyAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOworICAgICAgICAgICAgICAgIGR4YiA9IChfX3U2NCkgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOworICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLworICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBsb25nKSkKKwkJCWp1bXBfdGFibGVbb3Bjb2RlWzVdXSkKKyAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbMV0gPj4gNCwgZHhiKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgICBjYXNlIDEwOiAvKiBSWEUgZm9ybWF0LCBSWCBhZGRyZXNzIHVzZWQgYXMgaW50IHZhbHVlICovIHsKKyAgICAgICAgICAgICAgICBfX3U2NCBkeGI7CisgICAgICAgICAgICAgICAgX191MzIgb3BjOworCisgICAgICAgICAgICAgICAgaWYgKChvcGNvZGVbMV0gPj4gNCkgJiAyKQorCQkJcmV0dXJuIFNJR0lMTDsKKyAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOworICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKCgob3Bjb2RlWzFdID4+IDQpICYgMTUpICsgMik7CisgICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKKyAgICAgICAgICAgICAgICBkeGIgPSAoX191NjQpIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKKyAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KKyAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgbG9uZykpCisJCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCisgICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIGR4Yik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICAgICAgZGVmYXVsdDogLyogaW52YWxpZCBvcGVyYXRpb24gKi8KKyAgICAgICAgICAgICAgICByZXR1cm4gU0lHSUxMOworICAgICAgICB9CisJaWYgKF9mZXggIT0gMCkgeworCQljdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgfD0gX2ZleDsKKwkJaWYgKGN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwYyAmIChfZmV4IDw8IDgpKQorCQkJcmV0dXJuIFNJR0ZQRTsKKwl9CisJcmV0dXJuIDA7Cit9CisKKy8qCisgKiBFbXVsYXRlIExEUiBSeCxSeSB3aXRoIFJ4IG9yIFJ5IG5vdCBpbiB7MCwgMiwgNCwgNn0KKyAqLworaW50IG1hdGhfZW11X2xkcihfX3U4ICpvcGNvZGUpIHsKKyAgICAgICAgczM5MF9mcF9yZWdzICpmcF9yZWdzID0gJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzOworICAgICAgICBfX3UxNiBvcGMgPSAqKChfX3UxNiAqKSBvcGNvZGUpOworCisgICAgICAgIGlmICgob3BjICYgMHg5MCkgPT0gMCkgeyAgICAgICAgICAgLyogdGVzdCBpZiByeCBpbiB7MCwyLDQsNn0gKi8KKyAgICAgICAgICAgICAgICAvKiB3ZSBnb3QgYW4gZXhjZXB0aW9uIHRoZXJmb3JlIHJ5IGNhbid0IGJlIGluIHswLDIsNCw2fSAqLworICAgICAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZSAoICAgICAgIC8qIGxvYWQgcnggZnJvbSBmcF9yZWdzLmZwcnNbcnldICovCisgICAgICAgICAgICAgICAgICAgICAgICAiICAgICBicmFzICAxLDBmXG4iCisgICAgICAgICAgICAgICAgICAgICAgICAiICAgICBsZCAgICAwLDAoJTEpXG4iCisgICAgICAgICAgICAgICAgICAgICAgICAiMDogICBleCAgICAlMCwwKDEpIgorICAgICAgICAgICAgICAgICAgICAgICAgOiAvKiBubyBvdXRwdXQgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgIDogImEiIChvcGMgJiAweGYwKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgImEiICgmZnBfcmVncy0+ZnByc1tvcGMgJiAweGZdLmQpCisgICAgICAgICAgICAgICAgICAgICAgICA6ICIxIiApOworICAgICAgICB9IGVsc2UgaWYgKChvcGMgJiAweDkpID09IDApIHsgICAgIC8qIHRlc3QgaWYgcnkgaW4gezAsMiw0LDZ9ICovCisgICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlICggICAgICAgLyogc3RvcmUgcnkgdG8gZnBfcmVncy5mcHJzW3J4XSAqLworICAgICAgICAgICAgICAgICAgICAgICAgIiAgICAgYnJhcyAgMSwwZlxuIgorICAgICAgICAgICAgICAgICAgICAgICAgIiAgICAgc3RkICAgMCwwKCUxKVxuIgorICAgICAgICAgICAgICAgICAgICAgICAgIjA6ICAgZXggICAgJTAsMCgxKSIKKyAgICAgICAgICAgICAgICAgICAgICAgIDogLyogbm8gb3V0cHV0ICovCisgICAgICAgICAgICAgICAgICAgICAgICA6ICJhIiAoKG9wYyAmIDB4ZikgPDwgNCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICJhIiAoJmZwX3JlZ3MtPmZwcnNbKG9wYyAmIDB4ZjApPj40XS5kKQorICAgICAgICAgICAgICAgICAgICAgICAgOiAiMSIgKTsKKyAgICAgICAgfSBlbHNlICAvKiBtb3ZlIGZwX3JlZ3MuZnByc1tyeV0gdG8gZnBfcmVncy5mcHJzW3J4XSAqLworICAgICAgICAgICAgICAgIGZwX3JlZ3MtPmZwcnNbKG9wYyAmIDB4ZjApID4+IDRdID0gZnBfcmVncy0+ZnByc1tvcGMgJiAweGZdOworCXJldHVybiAwOworfQorCisvKgorICogRW11bGF0ZSBMRVIgUngsUnkgd2l0aCBSeCBvciBSeSBub3QgaW4gezAsIDIsIDQsIDZ9CisgKi8KK2ludCBtYXRoX2VtdV9sZXIoX191OCAqb3Bjb2RlKSB7CisgICAgICAgIHMzOTBfZnBfcmVncyAqZnBfcmVncyA9ICZjdXJyZW50LT50aHJlYWQuZnBfcmVnczsKKyAgICAgICAgX191MTYgb3BjID0gKigoX191MTYgKikgb3Bjb2RlKTsKKworICAgICAgICBpZiAoKG9wYyAmIDB4OTApID09IDApIHsgICAgICAgICAgIC8qIHRlc3QgaWYgcnggaW4gezAsMiw0LDZ9ICovCisgICAgICAgICAgICAgICAgLyogd2UgZ290IGFuIGV4Y2VwdGlvbiB0aGVyZm9yZSByeSBjYW4ndCBiZSBpbiB7MCwyLDQsNn0gKi8KKyAgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGUgKCAgICAgICAvKiBsb2FkIHJ4IGZyb20gZnBfcmVncy5mcHJzW3J5XSAqLworICAgICAgICAgICAgICAgICAgICAgICAgIiAgICAgYnJhcyAgMSwwZlxuIgorICAgICAgICAgICAgICAgICAgICAgICAgIiAgICAgbGUgICAgMCwwKCUxKVxuIgorICAgICAgICAgICAgICAgICAgICAgICAgIjA6ICAgZXggICAgJTAsMCgxKSIKKyAgICAgICAgICAgICAgICAgICAgICAgIDogLyogbm8gb3V0cHV0ICovCisgICAgICAgICAgICAgICAgICAgICAgICA6ICJhIiAob3BjICYgMHhmMCksCisgICAgICAgICAgICAgICAgICAgICAgICAgICJhIiAoJmZwX3JlZ3MtPmZwcnNbb3BjICYgMHhmXS5mKQorICAgICAgICAgICAgICAgICAgICAgICAgOiAiMSIgKTsKKyAgICAgICAgfSBlbHNlIGlmICgob3BjICYgMHg5KSA9PSAwKSB7ICAgICAvKiB0ZXN0IGlmIHJ5IGluIHswLDIsNCw2fSAqLworICAgICAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZSAoICAgICAgIC8qIHN0b3JlIHJ5IHRvIGZwX3JlZ3MuZnByc1tyeF0gKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICIgICAgIGJyYXMgIDEsMGZcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICIgICAgIHN0ZSAgIDAsMCglMSlcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICIwOiAgIGV4ICAgICUwLDAoMSkiCisgICAgICAgICAgICAgICAgICAgICAgICA6IC8qIG5vIG91dHB1dCAqLworICAgICAgICAgICAgICAgICAgICAgICAgOiAiYSIgKChvcGMgJiAweGYpIDw8IDQpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAiYSIgKCZmcF9yZWdzLT5mcHJzWyhvcGMgJiAweGYwKSA+PiA0XS5mKQorICAgICAgICAgICAgICAgICAgICAgICAgOiAiMSIgKTsKKyAgICAgICAgfSBlbHNlICAvKiBtb3ZlIGZwX3JlZ3MuZnBy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ZSByZW1pbmRlciByIG9mIHRoZSBkaXZpc2lvbiBpcyB0byBiZSBzdG9yZWQgdG8gJl9fciBhbmQKKyMgdGhlIHF1b3RpZW50IHEgaXMgdG8gYmUgcmV0dXJuZWQKKworICAgICAgICAudGV4dAorICAgICAgICAuZ2xvYmwgX191ZGl2X3Fybm5kCitfX3VkaXZfcXJubmQ6CisgICAgICAgIHN0ICAgICVyMiwyNCglcjE1KSAgICAgICAgIyBzdG9yZSBwb2ludGVyIHRvIHJlbWluZGVyIGZvciBsYXRlcgorICAgICAgICBsciAgICAlcjAsJXIzICAgICAgICAgICAgICMgcmVsb2FkIG4KKwlsciAgICAlcjEsJXI0CisJbHRyICAgJXIyLCVyNSAgICAgICAgICAgICAjIHJlbG9hZCBhbmQgdGVzdCBkaXZpc29yCisgICAgICAgIGpwICAgIDVmCisgICAgICAgICMgZGl2aXNvciA+PSAweDgwMDAwMDAwCisJc3JkbCAgJXIwLDIgICAgICAgICAgICAgICAjIG4vNAorICAgICAgICBzcmwgICAlcjIsMSAgICAgICAgICAgICAgICMgZC8yCisgICAgICAgIHNsciAgICVyMSwlcjIgICAgICAgICAgICAgIyBzcGVjaWFsIGNhc2UgaWYgbGFzdCBiaXQgb2YgZCBpcyBzZXQKKyAgICAgICAgYnJjICAgMywwZiAgICAgICAgICAgICAgICAjICAobi80KSBkaXYgKG4vMikgY2FuIG92ZXJmbG93IGJ5IDEKKyAgICAgICAgYWhpICAgJXIwLC0xICAgICAgICAgICAgICAjICB0cmljazogc3VidHJhY3Qgbi8yLCB0aGVuIGRpdmlkZQorMDogICAgICBkciAgICAlcjAsJXIyICAgICAgICAgICAgICMgc2lnbmVkIGRpdmlzaW9uCisgICAgICAgIGFoaSAgICVyMSwxICAgICAgICAgICAgICAgIyAgdHJpY2sgcGFydCAyOiBhZGQgMSB0byB0aGUgcXVvdGllbnQKKyAgICAgICAgIyBub3cgKG4gPj4gMikgPSAoZCA+PiAxKSAqICVyMSArICVyMAorCWxoaSAgICVyMywxCisgICAgICAgIG5yICAgICVyMywlcjEgICAgICAgICAgICAgIyB0ZXN0IGxhc3QgYml0IG9mIHEKKyAgICAgICAganogICAgMWYKKyAgICAgICAgYWxyICAgJXIwLCVyMiAgICAgICAgICAgICAjIGFkZCAoZD4+MSkgdG8gcgorMTogICAgICBzcmwgICAlcjEsMSAgICAgICAgICAgICAgICMgcSA+Pj0gMQorICAgICAgICAjIG5vdyAobiA+PiAyKSA9IChkJi0yKSAqICVyMSArICVyMAorICAgICAgICBsaGkgICAlcjMsMQorICAgICAgICBuciAgICAlcjMsJXI1ICAgICAgICAgICAgICMgdGVzdCBsYXN0IGJpdCBvZiBkCisgICAgICAgIGp6ICAgIDJmCisgICAgICAgIHNsciAgICVyMCwlcjEgICAgICAgICAgICAgIyByIC09IHEKKwlicmMgICAzLDJmICAgICAgICAgICAgICAgICMgYm9ycm93ID8KKwlhbHIgICAlcjAsJXI1ICAgICAgICAgICAgICMgciArPSBkCisJYWhpICAgJXIxLC0xCisyOiAgICAgICMgbm93IChuID4+IDIpID0gZCAqICVyMSArICVyMAorICAgICAgICBhbHIgICAlcjEsJXIxICAgICAgICAgICAgICMgcSA8PD0gMQorICAgICAgICBhbHIgICAlcjAsJXIwICAgICAgICAgICAgICMgciA8PD0gMQorICAgICAgICBicmMgICAxMiwzZiAgICAgICAgICAgICAgICMgb3ZlcmZsb3cgb24gciA/CisgICAgICAgIHNsciAgICVyMCwlcjUgICAgICAgICAgICAgIyByIC09IGQKKyAgICAgICAgYWhpICAgJXIxLDEgICAgICAgICAgICAgICAjIHEgKz0gMQorMzogICAgICBsaGkgICAlcjMsMgorICAgICAgICBuciAgICAlcjMsJXI0ICAgICAgICAgICAgICMgdGVzdCBuZXh0IHRvIGxhc3QgYml0IG9mIG4KKyAgICAgICAganogICAgNGYKKyAgICAgICAgYWhpICAgJXIwLDEgICAgICAgICAgICAgICAjIHIgKz0gMQorNDogICAgICBjbHIgICAlcjAsJXI1ICAgICAgICAgICAgICMgciA+PSBkID8KKyAgICAgICAgamwgICAgNmYKKyAgICAgICAgc2xyICAgJXIwLCVyNSAgICAgICAgICAgICAjIHIgLT0gZAorICAgICAgICBhaGkgICAlcjEsMSAgICAgICAgICAgICAgICMgcSArPSAxCisgICAgICAgICMgbm93IChuID4+IDEpID0gZCAqICVyMSArICVyMAorICAgICAgICBqICAgICA2ZgorNTogICAgICAjIGRpdmlzb3IgPCAweDgwMDAwMDAwCisJc3JkbCAgJXIwLDEKKyAgICAgICAgZHIgICAgJXIwLCVyMiAgICAgICAgICAgICAjIHNpZ25lZCBkaXZpc2lvbgorICAgICAgICAjIG5vdyAobiA+PiAxKSA9IGQgKiAlcjEgKyAlcjAKKzY6ICAgICAgYWxyICAgJXIxLCVyMSAgICAgICAgICAgICAjIHEgPDw9IDEKKyAgICAgICAgYWxyICAgJXIwLCVyMCAgICAgICAgICAgICAjIHIgPDw9IDEKKyAgICAgICAgYnJjICAgMTIsN2YgICAgICAgICAgICAgICAjIG92ZXJmbG93IG9uIHIgPworICAgICAgICBzbHIgICAlcjAsJXI1ICAgICAgICAgICAgICMgciAtPSBkCisgICAgICAgIGFoaSAgICVyMSwxICAgICAgICAgICAgICAgIyBxICs9IDEKKzc6ICAgICAgbGhpICAgJXIzLDEKKyAgICAgICAgbnIgICAgJXIzLCVyNCAgICAgICAgICAgICAjIGlzb2xhdGUgbGFzdCBiaXQgb2YgbgorICAgICAgICBhbHIgICAlcjAsJXIzICAgICAgICAgICAgICMgciArPSAobiAmIDEpCisgICAgICAgIGNsciAgICVyMCwlcjUgICAgICAgICAgICAgIyByID49IGQgPworICAgICAgICBqbCAgICA4ZgorICAgICAgICBzbHIgICAlcjAsJXI1ICAgICAgICAgICAgICMgciAtPSBkCisgICAgICAgIGFoaSAgICVyMSwxICAgICAgICAgICAgICAgIyBxICs9IDEKKzg6ICAgICAgIyBub3cgbiA9IGQgKiAlcjEgKyAlcjAKKwlsICAgICAlcjIsMjQoJXIxNSkKKyAgICAgICAgc3QgICAgJXIwLDAoJXIyKQorICAgICAgICBsciAgICAlcjIsJXIxCisgICAgICAgIGJyICAgICVyMTQKKwkuZW5kCV9fdWRpdl9xcm5uZApkaWZmIC0tZ2l0IGEvYXJjaC9zMzkwL21hdGgtZW11L3NmcC11dGlsLmggYi9hcmNoL3MzOTAvbWF0aC1lbXUvc2ZwLXV0aWwuaApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5hYjU1NmI2Ci0tLSAvZGV2L251bGwKKysrIGIvYXJjaC9zMzkwL21hdGgtZW11L3NmcC11dGlsLmgKQEAgLTAsMCArMSw2MyBAQAorI2luY2x1ZGUgPGxpbnV4L2tlcm5lbC5oPgorI2luY2x1ZGUgPGxpbnV4L3NjaGVkLmg+CisjaW5jbHVkZSA8bGludXgvdHlwZXMuaD4KKyNpbmNsdWRlIDxhc20vYnl0ZW9yZGVyLmg+CisKKyNkZWZpbmUgYWRkX3NzYWFhYShzaCwgc2wsIGFoLCBhbCwgYmgsIGJsKSAoewkJXAorICAgICAgICB1bnNpZ25lZCBpbnQgX19zaCA9IChhaCk7CQkJXAorICAgICAgICB1bnNpZ25lZCBpbnQgX19zbCA9IChhbCk7CQkJXAorICAgICAgICBfX2FzbV9fICgiICAgYWxyICAlMSwlM1xuIgkJCVwKKyAgICAgICAgICAgICAgICAgIiAgIGJyYyAgMTIsMGZcbiIJCQlcCisgICAgICAgICAgICAgICAgICIgICBhaGkgICUwLDFcbiIJCQlcCisgICAgICAgICAgICAgICAgICIwOiBhbHIgICUwLCUyIgkJCVwKKyAgICAgICAgICAgICAgICAgOiAiKyZkIiAoX19zaCksICIrZCIgKF9fc2wpCQlcCisgICAgICAgICAgICAgICAgIDogImQiIChiaCksICJkIiAoYmwpIDogImNjIiApOwkJXAorICAgICAgICAoc2gpID0gX19zaDsJCQkJCVwKKyAgICAgICAgKHNsKSA9IF9fc2w7CQkJCQlcCit9KQorCisjZGVmaW5lIHN1Yl9kZG1tc3Moc2gsIHNsLCBhaCwgYWwsIGJoLCBibCkgKHsJCVwKKyAgICAgICB1bnNpZ25lZCBpbnQgX19zaCA9IChhaCk7CQkJXAorICAgICAgIHVuc2lnbmVkIGludCBfX3NsID0gKGFsKTsJCQlcCisgICAgICAgX19hc21fXyAoIiAgIHNsciAgJTEsJTNcbiIJCQlcCisgICAgICAgICAgICAgICAgIiAgIGJyYyAgMywwZlxuIgkJCVwKKyAgICAgICAgICAgICAgICAiICAgYWhpICAlMCwtMVxuIgkJCVwKKyAgICAgICAgICAgICAgICAiMDogc2xyICAlMCwlMiIJCQkJXAorICAgICAgICAgICAgICAgIDogIismZCIgKF9fc2gpLCAiK2QiIChfX3NsKQkJXAorICAgICAgICAgICAgICAgIDogImQiIChiaCksICJkIiAoYmwpIDogImNjIiApOwkJXAorICAgICAgIChzaCkgPSBfX3NoOwkJCQkJXAorICAgICAgIChzbCkgPSBfX3NsOwkJCQkJXAorfSkKKworLyogYSB1bXVsIGIgPSBhIG11bCBiICsgKGE+PTI8PDMxKSA/IGI8PDMyOjAgKyAoYj49Mjw8MzEpID8gYTw8MzI6MCAqLworI2RlZmluZSB1bXVsX3BwbW0od2gsIHdsLCB1LCB2KSAoewkJCVwKKyAgICAgICAgdW5zaWduZWQgaW50IF9fd2ggPSB1OwkJCQlcCisgICAgICAgIHVuc2lnbmVkIGludCBfX3dsID0gdjsJCQkJXAorICAgICAgICBfX2FzbV9fICgiICAgbHRyICAxLCUwXG4iCQkJXAorICAgICAgICAgICAgICAgICAiICAgbXIgICAwLCUxXG4iCQkJXAorICAgICAgICAgICAgICAgICAiICAgam5tICAwZlxuIgkJCQlcCisgICAgICAgICAgICAgICAgICIgICBhbHIgIDAsJTFcbiIJCQlcCisgICAgICAgICAgICAgICAgICIwOiBsdHIgICUxLCUxXG4iCQkJXAorICAgICAgICAgICAgICAgICAiICAgam5tICAxZlxuIgkJCQlcCisgICAgICAgICAgICAgICAgICIgICBhbHIgIDAsJTBcbiIJCQlcCisgICAgICAgICAgICAgICAgICIxOiBsciAg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jaGVkdWxlX3dvcmsoJmNtbV90aHJlYWRfc3RhcnRlcik7CisJd2FrZV91cCgmY21tX3RocmVhZF93YWl0KTsKK30KKworc3RhdGljIHZvaWQKK2NtbV9zZXRfdGltZXIodm9pZCkKK3sKKwlpZiAoY21tX3RpbWVkX3BhZ2VzX3RhcmdldCA8PSAwIHx8IGNtbV90aW1lb3V0X3NlY29uZHMgPD0gMCkgeworCQlpZiAodGltZXJfcGVuZGluZygmY21tX3RpbWVyKSkKKwkJCWRlbF90aW1lcigmY21tX3RpbWVyKTsKKwkJcmV0dXJuOworCX0KKwlpZiAodGltZXJfcGVuZGluZygmY21tX3RpbWVyKSkgeworCQlpZiAobW9kX3RpbWVyKCZjbW1fdGltZXIsIGppZmZpZXMgKyBjbW1fdGltZW91dF9zZWNvbmRzKkhaKSkKKwkJCXJldHVybjsKKwl9CisJY21tX3RpbWVyLmZ1bmN0aW9uID0gY21tX3RpbWVyX2ZuOworCWNtbV90aW1lci5kYXRhID0gMDsKKwljbW1fdGltZXIuZXhwaXJlcyA9IGppZmZpZXMgKyBjbW1fdGltZW91dF9zZWNvbmRzKkhaOworCWFkZF90aW1lcigmY21tX3RpbWVyKTsKK30KKworc3RhdGljIHZvaWQKK2NtbV90aW1lcl9mbih1bnNpZ25lZCBsb25nIGlnbm9yZWQpCit7CisJbG9uZyBwYWdlczsKKworCXBhZ2VzID0gY21tX3RpbWVkX3BhZ2VzX3RhcmdldCAtIGNtbV90aW1lb3V0X3BhZ2VzOworCWlmIChwYWdlcyA8IDApCisJCWNtbV90aW1lZF9wYWdlc190YXJnZXQgPSAwOworCWVsc2UKKwkJY21tX3RpbWVkX3BhZ2VzX3RhcmdldCA9IHBhZ2VzOworCWNtbV9raWNrX3RocmVhZCgpOworCWNtbV9zZXRfdGltZXIoKTsKK30KKwordm9pZAorY21tX3NldF9wYWdlcyhsb25nIHBhZ2VzKQoreworCWNtbV9wYWdlc190YXJnZXQgPSBwYWdlczsKKwljbW1fa2lja190aHJlYWQo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CisJICogdXNlciBjb250ZXh0LgorCSAqLworICAgICAgICBpZiAodXNlcl9hZGRyZXNzID09IDAgfHwgaW5faW50ZXJydXB0KCkgfHwgIW1tKQorICAgICAgICAgICAgICAgIGdvdG8gbm9fY29udGV4dDsKKworCS8qCisJICogV2hlbiB3ZSBnZXQgaGVyZSwgdGhlIGZhdWx0IGhhcHBlbmVkIGluIHRoZSBjdXJyZW50CisJICogdGFzaydzIHVzZXIgYWRkcmVzcyBzcGFjZSwgc28gd2UgY2FuIHN3aXRjaCBvbiB0aGUKKwkgKiBpbnRlcnJ1cHRzIGFnYWluIGFuZCB0aGVuIHNlYXJjaCB0aGUgVk1BcworCSAqLworCWxvY2FsX2lycV9lbmFibGUoKTsKKworICAgICAgICBkb3duX3JlYWQoJm1tLT5tbWFwX3NlbSk7CisKKyAgICAgICAgdm1hID0gZmluZF92bWEobW0sIGFkZHJlc3MpOworICAgICAgICBpZiAoIXZtYSkKKyAgICAgICAgICAgICAgICBnb3RvIGJhZF9hcmVhOworICAgICAgICBpZiAodm1hLT52bV9zdGFydCA8PSBhZGRyZXNzKSAKKyAgICAgICAgICAgICAgICBnb3RvIGdvb2RfYXJlYTsKKyAgICAgICAgaWYgKCEodm1hLT52bV9mbGFncyAmIFZNX0dST1dTRE9XTikpCisgICAgICAgICAgICAgICAgZ290byBiYWRfYXJlYTsKKyAgICAgICAgaWYgKGV4cGFuZF9zdGFjayh2bWEsIGFkZHJlc3MpKQorICAgICAgICAgICAgICAgIGdvdG8gYmFkX2FyZWE7CisvKgorICogT2ssIHdlIGhhdmUgYSBnb29kIHZtX2FyZWEgZm9yIHRoaXMgbWVtb3J5IGFjY2Vzcywgc28KKyAqIHdlIGNhbiBoYW5kbGUgaXQuLgorICovCitnb29kX2FyZWE6CisJc2lfY29kZSA9IFNFR1ZfQUNDRVJSOworCWlmICghaXNfcHJvdGVjdGlvbikgeworCQkvKiBwYWdlIG5vdCBwcmVzZW50LCBjaGVjayB2bSBmbGFncyAqLworCQlpZ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AqIFNvbWV0aGluZyB0cmllZCB0byBhY2Nlc3MgbWVtb3J5IHRoYXQgaXNuJ3QgaW4gb3VyIG1lbW9yeSBtYXAuLgorICogRml4IGl0LCBidXQgY2hlY2sgaWYgaXQncyBrZXJuZWwgb3IgdXNlciBmaXJzdC4uCisgKi8KK2JhZF9hcmVhOgorICAgICAgICB1cF9yZWFkKCZtbS0+bW1hcF9zZW0pOworCisgICAgICAgIC8qIFVzZXIgbW9kZSBhY2Nlc3NlcyBqdXN0IGNhdXNlIGEgU0lHU0VHViAqLworICAgICAgICBpZiAocmVncy0+cHN3Lm1hc2sgJiBQU1dfTUFTS19QU1RBVEUpIHsKKyAgICAgICAgICAgICAgICB0c2stPnRocmVhZC5wcm90X2FkZHIgPSBhZGRyZXNzOworICAgICAgICAgICAgICAgIHRzay0+dGhyZWFkLnRyYXBfbm8gPSBlcnJvcl9jb2RlOworCQlkb19zaWdzZWd2KHJlZ3MsIGVycm9yX2NvZGUsIHNpX2NvZGUsIGFkZHJlc3MpOworICAgICAgICAgICAgICAgIHJldHVybjsKKwl9CisKK25vX2NvbnRleHQ6CisgICAgICAgIC8qIEFyZSB3ZSBwcmVwYXJlZCB0byBoYW5kbGUgdGhpcyBrZXJuZWwgZmF1bHQ/ICAqLworCWZpeHVwID0gc2VhcmNoX2V4Y2VwdGlvbl90YWJsZXMocmVncy0+cHN3LmFkZHIgJiBfX0ZJWFVQX01BU0spOworCWlmIChmaXh1cCkgeworCQlyZWdzLT5wc3cuYWRkciA9IGZpeHVwLT5maXh1cCB8IFBTV19BRERSX0FNT0RFOworICAgICAgICAgICAgICAgIHJldHVybjsKKyAgICAgICAgfQorCisvKgorICogT29wcy4gVGhlIGtlcm5lbCB0cmllZCB0byBhY2Nlc3Mgc29tZSBiYWQgcGFnZS4gV2UnbGwgaGF2ZSB0bworICogdGVybWluYXRlIHRoaW5ncyB3aXRoIGV4dHJlbWUgcHJlanVkaWNlLgorICovCisgICAgICAgIGlmICh1c2VyX2FkZHJlc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E5VTEwpIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIG5leHQgPSBwdHItPm5leHQ7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWRkcmVzcyA9PSBwdHItPmFkZHJlc3MpIHsKKwkJCQkgLyoKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogVGhpcyBpcyBvbmUgb2YgdGhlIHByb2Nlc3NlcyB3YWl0aW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIGZvciB0aGUgcGFnZS4gVW5jaGFpbiBmcm9tIHRoZSBxdWV1ZS4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICogVGhlcmUgY2FuIGJlIG1vcmUgdGhhbiBvbmUgcHJvY2VzcworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiB3YWl0aW5nIGZvciB0aGUgc2FtZSBwYWdlLiBWTSBwcmVzZW50cworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBhbiBpbml0aWFsIGFuZCBhIGNvbXBsZXRpb24gaW50ZXJydXB0IGZvcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKiBldmVyeSBwcm9jZXNzIHRoYXQgdHJpZXMgdG8gYWNjZXNzIGEgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqIHBhZ2Ugc3dhcHBlZCBvdXQgYnkgVk0uIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGxhc3QgPT0gTlVMTCkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwc2V1ZG9fbG9ja19xdWV1ZSA9IG5leHQ7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXN0LT5uZXh0ID0gbmV4dDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogbm93IHdha2UgdXAgdGhlIHByb2Nlc3MgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHRyLT5yZXNvbHZlZCA9IDE7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdha2VfdXAoJnB0ci0+cXVldWUpOworICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhc3QgPSBwdHI7CisgICAgICAgICAgICAgICAgICAgICAgICBwdHIgPSBuZXh0OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgICAgICBzcGluX3VubG9jaygmcHNldWRvX3dhaXRfc3BpbmxvY2spOworICAgICAgICB9IGVsc2UgeworICAgICAgICAgICAgICAgIC8qIFBzZXVkbyBwYWdlIGZhdWx0cyBpbiBrZXJuZWwgbW9kZSBpcyBhIGJhZCBpZGVhICovCisgICAgICAgICAgICAgICAgaWYgKCEocmVncy0+cHN3Lm1hc2sgJiBQU1dfTUFTS19QU1RBVEUpKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAvKgorCQkJICogVk0gcHJlc2VudHMgcHNldWRvIHBhZ2UgZmF1bHRzIGlmIHRoZSBpbnRlcnJ1cHRlZAorCQkJICogc3RhdGUgd2FzIG5vdCBkaXNhYmxlZCBmb3IgaW50ZXJydXB0cy4gU28gd2UgY2FuCisJCQkgKiBnZXQgcHNldWRvIHBhZ2UgZmF1bHQgaW50ZXJydXB0cyB3aGlsZSBydW5uaW5nCisJCQkgKiBpbiBrZXJuZWwgbW9kZS4gV2Ugc2ltcGx5IGFjY2VzcyB0aGUgcGFnZSBoZXJlCisJCQkgKiB3aGlsZSB3ZSBhcmUgcnVubmluZyBkaXNhYmxlZC4gVk0gd2lsbCB0aGVuIHN3YXAKKwkJCSAqIGluIHRoZSBwYWdlIHN5bmNocm9ub3VzbHkuCisgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hlY2tfdXNlcl9zcGFjZShyZWdzLCBlcnJvcl9jb2RlKSA9PSAwKQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZGVyZWZlcmVuY2UgYSB2aXJ0dWFsIGtlcm5lbCBhZGRyZXNzICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyAoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgIGljIDAsMCglMCkiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogOiAiYSIgKGFkZHJlc3MpIDogIjAiKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBkZXJlZmVyZW5jZSBhIHZpcnR1YWwgdXNlciBhZGRyZXNzICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyAoCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICIgIGxhICAgMiwwKCUwKVxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICBzYWNmIDUxMlxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICBpYyAgIDIsMCgyKVxuIgorCQkJCQkgIjA6c2FjZiAwXG4iCisJCQkJCSAiLnNlY3Rpb24gX19leF90YWJsZSxcImFcIlxuIgorCQkJCQkgIiAgLmFsaWduIDRcbiIKKwkJCQkJICIgIC5sb25nICAwYiwwYlxuIgorCQkJCQkgIi5wcmV2aW91cyIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiA6ICJhIiAoYWRkcmVzcykgOiAiMiIgKTsKKworICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuOworICAgICAgICAgICAgICAgIH0KKwkJLyogaW5pdGlhbGl6ZSBhbmQgYWRkIGVsZW1lbnQgdG8gcHNldWRvX2xvY2tfcXVldWUgKi8KKyAgICAgICAgICAgICAgICBpbml0X3dhaXRxdWV1ZV9oZWFkICgmd2FpdF9zdHJ1Y3QucXVldWUpOworICAgICAgICAgICAgICAgIHdhaXRfc3RydWN0LmFkZHJlc3MgPSBhZGRyZXNzOworICAgICAgICAgICAgICAgIHdhaXRfc3RydWN0LnJlc29sdmVkID0gMDsKKyAgICAgICAgICAgICAgICBzcGluX2xvY2soJnBzZXVkb193YWl0X3NwaW5sb2NrKTsKKyAgICAgICAgICAgICAgICB3YWl0X3N0cnVjdC5uZXh0ID0gcHNldWRvX2xvY2tfcXVldWU7CisgICAgICAgICAgICAgICAgcHNldWRvX2xvY2tfcXVldWUgPSAmd2FpdF9zdHJ1Y3Q7CisgICAgICAgICAgICAgICAgc3Bpbl91bmxvY2soJnBzZXVkb193YWl0X3NwaW5sb2NrKTsKKwkJLyoKKwkJICogVGhlIGluc3RydWN0aW9uIHRoYXQgY2F1c2VkIHRoZSBwcm9ncmFtIGNoZWNrIHdpbGwKKwkJICogYmUgcmVwZWF0ZWQuIERvbid0IHNpZ25hbCBzaW5nbGUgc3RlcCB2aWEgU0lHVFJBUC4KKwkJICovCisJCWNsZWFyX3Rza190aHJlYWRfZmxhZyhjdXJyZW50LCBUSUZfU0lOR0xFX1NURVApOworICAgICAgICAgICAgICAgIC8qIGdvIHRvIHNsZWVwICovCisgICAgICAgICAgICAgICAgd2FpdF9ldmVudCh3YWl0X3N0cnVjdC5xdWV1ZSwgd2FpdF9zdHJ1Y3QucmVzb2x2ZWQpOworICAgICAgICB9Cit9CisjZW5kaWYgLyogQ09ORklHX0FSQ0hfUzM5MFggKi8KKworI2lmZGVmIENPTkZJR19QRkFVTFQgCisvKgorICogJ3BmYXVsdCcgcHNldWRvIHBhZ2UgZmF1bHRzIHJvdXRpbmVzLgorICovCitzdGF0aWMgaW50IHBmYXVsdF9kaXNhYmxlID0gMDsKKworc3Rh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IgorICAgICAgICAgICAgICAgIDogIj1kIiAocmMpIDogImEiICgmcmVmYmspIDogImNjIiApOworICAgICAgICBfX2N0bF9zZXRfYml0KDAsIDkpOworICAgICAgICByZXR1cm4gcmM7Cit9CisKK3ZvaWQgcGZhdWx0X2Zpbmkodm9pZCkKK3sKKwlwZmF1bHRfcmVmYmtfdCByZWZiayA9CisJeyAweDI1OCwgMSwgNSwgMiwgMFVMTCwgMFVMTCwgMFVMTCwgMFVMTCB9OworCisJaWYgKHBmYXVsdF9kaXNhYmxlKQorCQlyZXR1cm47CisJX19jdGxfY2xlYXJfYml0KDAsOSk7CisgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKAorICAgICAgICAgICAgICAgICIgICAgZGlhZyAgJTAsMCwweDI1OFxuIgorCQkiMDpcbiIKKwkJIi5zZWN0aW9uIF9fZXhfdGFibGUsXCJhXCJcbiIKKwkJIiAgIC5hbGlnbiA0XG4iCisjaWZuZGVmIENPTkZJR19BUkNIX1MzOTBYCisJCSIgICAubG9uZyAgMGIsMGJcbiIKKyNlbHNlIC8qIENPTkZJR19BUkNIX1MzOTBYICovCisJCSIgICAucXVhZCAgMGIsMGJcbiIKKyNlbmRpZiAvKiBDT05GSUdfQVJDSF9TMzkwWCAqLworCQkiLnByZXZpb3VzIgorCQk6IDogImEiICgmcmVmYmspIDogImNjIiApOworfQorCithc21saW5rYWdlIHZvaWQKK3BmYXVsdF9pbnRlcnJ1cHQoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIF9fdTE2IGVycm9yX2NvZGUpCit7CisJc3RydWN0IHRhc2tfc3RydWN0ICp0c2s7CisJX191MTYgc3ViY29kZTsKKworCS8qCisJICogR2V0IHRoZSBleHRlcm5hbCBpbnRlcnJ1cHRpb24gc3ViY29kZSAmIHBmYXVsdAorCSAqIGluaXRpYWwvY29tcGxldGlvbiBzaWduYWwgYml0LiBWTSBzdG9yZXMgdGhpcyAKKwkgKiBpbiB0aGUgJ2NwdSBhZGRyZXNzJyB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gbnJfc3dhcF9wYWdlczw8KFBBR0VfU0hJRlQtMTApKTsKKyAgICAgICAgaSA9IG1heF9tYXBucjsKKyAgICAgICAgd2hpbGUgKGktLSA+IDApIHsKKyAgICAgICAgICAgICAgICB0b3RhbCsrOworICAgICAgICAgICAgICAgIGlmIChQYWdlUmVzZXJ2ZWQobWVtX21hcCtpKSkKKyAgICAgICAgICAgICAgICAgICAgICAgIHJlc2VydmVkKys7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAoUGFnZVN3YXBDYWNoZShtZW1fbWFwK2kpKQorICAgICAgICAgICAgICAgICAgICAgICAgY2FjaGVkKys7CisgICAgICAgICAgICAgICAgZWxzZSBpZiAocGFnZV9jb3VudChtZW1fbWFwK2kpKQorICAgICAgICAgICAgICAgICAgICAgICAgc2hhcmVkICs9IHBhZ2VfY291bnQobWVtX21hcCtpKSAtIDE7CisgICAgICAgIH0KKyAgICAgICAgcHJpbnRrKCIlZCBwYWdlcyBvZiBSQU1cbiIsdG90YWwpOworICAgICAgICBwcmludGsoIiVkIHJlc2VydmVkIHBhZ2VzXG4iLHJlc2VydmVkKTsKKyAgICAgICAgcHJpbnRrKCIlZCBwYWdlcyBzaGFyZWRcbiIsc2hhcmVkKTsKKyAgICAgICAgcHJpbnRrKCIlZCBwYWdlcyBzd2FwIGNhY2hlZFxuIixjYWNoZWQpOworfQorCisvKiBSZWZlcmVuY2VzIHRvIHNlY3Rpb24gYm91bmRhcmllcyAqLworCitleHRlcm4gdW5zaWduZWQgbG9uZyBfdGV4dDsKK2V4dGVybiB1bnNpZ25lZCBsb25nIF9ldGV4dDsKK2V4dGVybiB1bnNpZ25lZCBsb25nIF9lZGF0YTsKK2V4dGVybiB1bnNpZ25lZCBsb25nIF9fYnNzX3N0YXJ0OworZXh0ZXJuIHVuc2lnbmVkIGxvbmcgX2VuZDsKKworZXh0ZXJuIHVuc2lnbmVkIGxvbmcgX19pbml0X2JlZ2luOworZXh0ZXJuIHVuc2lnbmVkIGxvbmcgX19pbml0X2VuZDsKKworLyoKKyAqIHBhZ2luZ19pbml0KCkgc2V0cyB1cCB0aGUgcGFnZSB0YWJsZXMKKyAqLworCisjaWZuZGVmIENPTkZJR19BUkNIX1MzOTBYCit2b2lkIF9faW5pdCBwYWdpbmdfaW5pdCh2b2lkKQoreworICAgICAgICBwZ2RfdCAqIHBnX2RpcjsKKyAgICAgICAgcHRlX3QgKiBwZ190YWJsZTsKKyAgICAgICAgcHRlX3QgICBwdGU7CisJaW50ICAgICBpOworICAgICAgICB1bnNpZ25lZCBsb25nIHRtcDsKKyAgICAgICAgdW5zaWduZWQgbG9uZyBwZm4gPSAwOworICAgICAgICB1bnNpZ25lZCBsb25nIHBnZGlyX2sgPSAoX19wYShzd2FwcGVyX3BnX2RpcikgJiBQQUdFX01BU0spIHwgX0tFUk5TRUdfVEFCTEU7CisgICAgICAgIHN0YXRpYyBjb25zdCBpbnQgc3NtX21hc2sgPSAweDA0MDAwMDAwTDsKKworCS8qIHVubWFwIHdob2xlIHZpcnR1YWwgYWRkcmVzcyBzcGFjZSAqLworCQorICAgICAgICBwZ19kaXIgPSBzd2FwcGVyX3BnX2RpcjsKKworCWZvciAoaT0wO2k8S0VSTkVMX1BHRF9QVFJTO2krKykgCisJICAgICAgICBwbWRfY2xlYXIoKHBtZF90KilwZ19kaXIrKyk7CisJCQorCS8qCisJICogbWFwIHdob2xlIHBoeXNpY2FsIG1lbW9yeSB0byB2aXJ0dWFsIG1lbW9yeSAoaWRlbnRpdHkgbWFwcGluZykgCisJICovCisKKyAgICAgICAgcGdfZGlyID0gc3dhcHBlcl9wZ19kaXI7CisKKyAgICAgICAgd2hpbGUgKHBmbiA8IG1heF9sb3dfcGZuKSB7CisgICAgICAgICAgICAgICAgLyoKKyAgICAgICAgICAgICAgICAgKiBwZ190YWJsZSBpcyBwaHlzaWNhbCBhdCB0aGlzIHBvaW50CisgICAgICAgICAgICAgICAgICovCisJCXBnX3RhYmxlID0gKHB0ZV90ICopIGFsbG9jX2Jvb3RtZW1fbG93X3BhZ2VzKFBBR0VfU0laRSk7CisKKyAgICAgICAgICAgICAgICBwZ19kaXItPnBnZDAgPSAgKF9QQUdFX1RBQkxFIHwgX19wYShwZ190YWJsZSkpOworICAgICAgICAgICAgICAgIHBnX2Rpci0+cGdkMSA9ICAoX1BBR0VfVEFCTEUgfCAoX19wYShwZ190YWJsZSkrMTAyNCkpOworICAgICAgICAgICAgICAgIHBnX2Rpci0+cGdkMiA9ICAoX1BBR0VfVEFCTEUgfCAoX19wYShwZ190YWJsZSkrMjA0OCkpOworICAgICAgICAgICAgICAgIHBnX2Rpci0+cGdkMyA9ICAoX1BBR0VfVEFCTEUgfCAoX19wYShwZ190YWJsZSkrMzA3MikpOworICAgICAgICAgICAgICAgIHBnX2RpcisrOworCisgICAgICAgICAgICAgICAgZm9yICh0bXAgPSAwIDsgdG1wIDwgUFRSU19QRVJfUFRFIDsgdG1wKysscGdfdGFibGUrKykgeworICAgICAgICAgICAgICAgICAgICAgICAgcHRlID0gcGZuX3B0ZShwZm4sIFBBR0VfS0VSTkVMKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZm4gPj0gbWF4X2xvd19wZm4pCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB0ZV9jbGVhcigmaW5pdF9tbSwgMCwgJnB0ZSk7CisgICAgICAgICAgICAgICAgICAgICAgICBzZXRfcHRlKHBnX3RhYmxlLCBwdGUpOworICAgICAgICAgICAgICAgICAgICAgICAgcGZuKys7CisgICAgICAgICAgICAgICAgfQorICAgICAgICB9CisKKwlTMzkwX2xvd2NvcmUua2VybmVsX2FzY2UgPSBwZ2Rpcl9rOworCisgICAgICAgIC8qIGVuYWJsZSB2aXJ0dWFsIG1hcHBpbmcgaW4ga2VybmVsIG1vZGUgKi8KKyAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oIiAgICBMQ1RMICAxLDEsJTBcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiAgICBMQ1RMICA3LDcsJTBcbiIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIiAgICBMQ1RMICAxMywxMywlMFxuIgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAiICAgIFNTTSAgICUxIiAKKwkJCSAgICAgOiA6ICJtIiAocGdkaXJfayksICJtIiAoc3NtX21hc2spKTsKKworICAgICAgICBsb2NhbF9mbHVzaF90bGIoKTsKKworCXsKKwkJdW5zaWduZWQgbG9uZyB6b25lc19zaXplW01BWF9OUl9aT05FU10gPSB7IDAsIDAsIDB9OworCisJCXpvbmVzX3NpemVbWk9ORV9ETUFdID0gbWF4X2xvd19wZm47CisJCWZyZWVfYXJlYV9pbml0KHpvbmVzX3NpemUpOworCX0KKyAgICAgICAgcmV0dXJuOworfQorCisjZWxzZSAvKiBDT05GSUdfQVJDSF9TMzkwWCAqLwordm9pZCBfX2luaXQgcGFnaW5nX2luaXQodm9pZCkKK3sKKyAgICAgICAgcGdkX3QgKiBwZ19kaXI7CisJcG1kX3QgKiBwbV9kaXI7CisgICAgICAgIHB0ZV90ICogcHRfZGlyOworICAgICAgICBwdGVfdCAgIHB0ZTsKKwlpbnQgICAgIGksaixrOworICAgICAgICB1bnNpZ25lZCBsb25nIHBmbiA9IDA7CisgICAgICAgIHVuc2lnbmVkIGxvbmcgcGdkaXJfayA9IChfX3BhKHN3YXBwZXJfcGdfZGlyKSAmIFBBR0VfTUFTSykgfAorICAgICAgICAgIF9LRVJOX1JFR0lPTl9UQUJMRTsKKwlzdGF0aWMgY29uc3QgaW50IHNzbV9tYXNrID0gMHgwNDAwMDAwMEw7CisKKwl1bnNpZ25lZCBsb25nIHpvbmVzX3NpemVbTUFYX05SX1pPTkVTXSA9IHswLCAwLCAwfTsKKwl1bnNpZ25lZCBsb25nIGRtYV9wZm4sIGhpZ2hfcGZuOworCisJZG1hX3BmbiA9IE1BWF9ETUFfQUREUkVTUyA+PiBQQUdFX1NISUZUOworCWhpZ2hfcGZuID0gbWF4X2xvd19wZm47CisKKwlpZiAoZG1hX3BmbiA+IGhpZ2hfcGZuKQorCQl6b25lc19zaXplW1pPTkVfRE1BXSA9IGhpZ2hfcGZuOworCWVsc2UgeworCQl6b25lc19zaXplW1pPTkVfRE1BXSA9IGRtYV9wZm47CisJCXpvbmVzX3NpemVbWk9ORV9OT1JNQUxdID0gaGlnaF9wZm4gLSBkbWFfcGZuOworCX0KKworCS8qIEluaXRpYWxpemUgbWVtX21hcFtdLiAgKi8KKwlmcmVlX2FyZWFfaW5pdCh6b25lc19zaXplKTsKKworCisJLyoKKwkgKiBtYXAgd2hvbGUgcGh5c2ljYWwgbWVtb3J5IHRvIHZpcnR1YWwgbWVtb3J5IChpZGVudGl0eSBtYXBwaW5nKSAKKwkgKi8KKworICAgICAgICBwZ19kaXIgPSBzd2FwcGVyX3BnX2RpcjsKKwkKKyAgICAgICAgZm9yIChpID0gMCA7IGkgPCBQVFJTX1BFUl9QR0QgOyBpKysscGdfZGlyKyspIHsKKwkKKyAgICAgICAgICAgICAgICBpZiAocGZuID49IG1heF9sb3dfcGZuKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBwZ2RfY2xlYXIocGdfZGlyKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgICAgIH0gICAgICAgICAgCisgICAgICAgIAorCSAgICAgICAgcG1fZGlyID0gKHBtZF90ICopIGFsbG9jX2Jvb3RtZW1fbG93X3BhZ2VzKFBBR0VfU0laRSo0KTsKKyAgICAgICAgICAgICAgICBwZ2RfcG9wdWxhdGUoJmluaXRfbW0sIHBnX2RpciwgcG1fZGlyKTsKKworICAgICAgICAgICAgICAgIGZvciAoaiA9IDAgOyBqIDwgUFRSU19QRVJfUE1EIDsgaisrLHBtX2RpcisrKSB7CisgICAgICAgICAgICAgICAgICAgICAgICBpZiAocGZuID49IG1heF9sb3dfcGZuKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBtZF9jbGVhcihwbV9kaXIpOworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsgCisgICAgICAgICAgICAgICAgICAgICAgICB9ICAgICAgICAgIAorICAgICAgICAgICAgICAgICAgICAgICAgCisgICAgICAgICAgICAgICAgICAgICAgICBwdF9kaXIgPSAocHRlX3QgKikgYWxsb2NfYm9vdG1lbV9sb3dfcGFnZXMoUEFHRV9TSVpFKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIHBtZF9wb3B1bGF0ZV9rZXJuZWwoJmluaXRfbW0sIHBtX2RpciwgcHRfZGlyKTsKKwkKKyAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoayA9IDAgOyBrIDwgUFRSU19QRVJfUFRFIDsgaysrLHB0X2RpcisrKSB7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHB0ZSA9IHBmbl9wdGUocGZuLCBQQUdFX0tFUk5FTCk7CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwZm4gPj0gbWF4X2xvd19wZm4pIHsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdGVfY2xlYXIoJmluaXRfbW0sIDAsICZwdGUpOyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRfcHRlKHB0X2RpciwgcHRlKTsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGZuKys7CisgICAgICAgICAgICAgICAgICAgICAgICB9CisgICAgICAgICAgICAgICAgfQorICAgICAgICB9CisKKwlTMzkwX2xvd2NvcmUua2VybmVsX2FzY2UgPSBwZ2Rpcl9rOworCisgICAgICAgIC8qIGVuYWJsZSB2aXJ0dWFsIG1hcHBpbmcgaW4ga2VybmVsIG1vZGUgKi8KKyAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oImxjdGxnIDEsMSwlMFxuXHQiCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJsY3RsZyA3LDcsJTBcblx0IgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAibGN0bGcgMTMsMTMsJTBcblx0IgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAic3NtICAgJTEiCisJCQkgICAgIDogOiJtIiAocGdkaXJfayksICJtIiAoc3NtX21hc2spKTsKKworICAgICAgICBsb2NhbF9mbHVzaF90bGIoKTsKKworICAgICAgICByZXR1cm47Cit9CisjZW5kaWYgLyogQ09ORklHX0FSQ0hfUzM5MFggKi8KKwordm9pZCBfX2luaXQgbWVtX2luaXQodm9pZCkKK3sKKwl1bnNpZ25lZCBsb25nIGNvZGVzaXplLCByZXNlcnZlZHBhZ2VzLCBkYXRhc2l6ZSwgaW5pdHNpemU7CisKKyAgICAgICAgbWF4X21hcG5yID0gbnVtX3BoeXNwYWdlcyA9IG1heF9sb3dfcGZuOworICAgICAgICBoaWdoX21lbW9yeSA9ICh2b2lkICopIF9fdmEobWF4X2xvd19wZm4gKiBQQUdFX1NJWkUpOworCisgICAgICAgIC8qIGNsZWFyIHRoZSB6ZXJvLXBhZ2UgKi8KKyAgICAgICAgbWVtc2V0KGVtcHR5X3plcm9fcGFnZSwgMCwgUEFHRV9TSVpFKTsKKworCS8qIHRoaXMgd2lsbCBwdXQgYWxsIGxvdyBtZW1vcnkgb250byB0aGUgZnJlZWxpc3RzICovCisJdG90YWxyYW1fcGFnZXMgKz0gZnJlZV9hbGxfYm9vdG1lbSgpOworCisJcmVzZXJ2ZWRwYWdlcyA9IDA7CisKKwljb2Rlc2l6ZSA9ICAodW5zaWduZWQgbG9uZykgJl9ldGV4dCAtICh1bnNpZ25lZCBsb25nKSAmX3RleHQ7CisJZGF0YXNpemUgPSAgKHVuc2lnbmVkIGxvbmcpICZfZWRhdGEgLSAodW5zaWduZWQgbG9uZykgJl9ldGV4dDsKKwlpbml0c2l6ZSA9ICAodW5zaWduZWQgbG9uZykgJl9faW5pdF9lbmQgLSAodW5zaWduZWQgbG9uZykgJl9faW5pdF9iZWdpbjsKKyAgICAgICAgcHJpbnRrKCJNZW1vcnk6ICVsdWsvJWx1ayBhdmFpbGFibGUgKCVsZGsga2VybmVsIGNvZGUsICVsZGsgcmVzZXJ2ZWQsICVsZGsgZGF0YSwgJWxkayBpbml0KVxuIiwKKyAgICAgICAgICAgICAgICAodW5zaWduZWQgbG9uZykgbnJfZnJlZV9wYWdlcygpIDw8IChQQUdFX1NISUZULTEwKSwKKyAgICAgICAgICAgICAgICBtYXhfbWFwbnIgPDwgKFBBR0VfU0hJRlQtMTApLAorICAgICAgICAgICAgICAgIGNvZGVzaXplID4+IDEwLAorICAgICAgICAgICAgICAgIHJlc2VydmVkcGFnZXMgPDwgKFBBR0VfU0hJRlQtMTApLAorICAgICAgICAgICAgICAgIGRhdGFzaXplID4+MTAsCisgICAgICAgICAgICAgICAgaW5pdHNpemUgPj4gMTApOworfQorCit2b2lkIGZyZWVfaW5pdG1lbSh2b2lkKQoreworICAgICAgICB1bnNpZ25lZCBsb25nIGFkZHI7CisKKyAgICAgICAgYWRkciA9ICh1bnNpZ25lZCBsb25nKSgmX19pbml0X2JlZ2luKTsKKyAgICAgICAgZm9yICg7IGFkZHIgPCAodW5zaWduZWQgbG9uZykoJl9faW5pdF9lbmQpOyBhZGRyICs9IFBBR0VfU0laRSkgeworCQlDbGVhclBhZ2VSZXNlcnZlZCh2aXJ0X3RvX3BhZ2UoYWRkcikpOworCQlzZXRfcGFnZV9jb3VudCh2aXJ0X3RvX3BhZ2UoYWRkciksIDEpOworCQlmcmVlX3BhZ2UoYWRkcik7CisJCXRvdGFscmFtX3BhZ2VzKys7CisgICAgICAgIH0KKyAgICAgICAgcHJpbnRrICgiRnJlZWluZyB1bnVzZWQga2VybmVsIG1lbW9yeTogJWxkayBmcmVlZFxuIiwKKwkJKCh1bnNpZ25lZCBsb25nKSZfX2luaXRfZW5kIC0gKHVuc2lnbmVkIGxvbmcpJl9faW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