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ci0JCXN0bWZkCXNwISwge3IwLXI3fQotCQltb3YJcjAsIHNwCi0JCW1vdglyMSwgI0JBRF9BRERSRVhDUFROCi0JCWIJYmFkX21vZGUKLQotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICogSW50ZXJydXB0IChJUlEpIGhhbmRsZXIKLSAqLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSAqIE5vdGU6IGlmIHRoZSBJUlEgd2FzIHRha2VuIHdoaWxzdCBpbiB1c2VyIG1vZGUsIHRoZW4gKm5vKiBrZXJuZWwgcm91dGluZQotICogaXMgcnVubmluZywgc28gZG8gbm90IGhhdmUgdG8gc2F2ZSBzdmMgbHIuCi0gKgotICogRW50ZXJlZCBpbiBJUlEgbW9kZS4KLSAqLwotCi12ZWN0b3JfSVJROglsZHIgICAgIHNwLCAuTENpcnEgICAgICAgICBAIFNldHVwIHNvbWUgdGVtcG9yYXJ5IHN0YWNrCi0gICAgICAgICAgICAgICAgc3ViICAgICBsciwgbHIsICM0Ci0gICAgICAgICAgICAgICAgc3RyICAgICBsciwgW3NwXSAgICAgICAgICAgQCBwdXNoIHJldHVybiBhZGRyZXNzCi0KLQkJdHN0ICAgICBsciwgIzMKLQkJYm5lCV9faXJxX25vbl91c3IKLQotX19pcnFfdXNyOgl0ZXFwCXBjLCAjUFNSX0lfQklUIHwgTU9ERV9TVkMyNiAgICAgQCBFbnRlciBTVkMgbW9kZQotCQltb3YJcjAsIHIwCi0KLQkJbGRyCWxyLCAuTENpcnEKLQkJbGRyCWxyLCBbbHJdICAgICAgICAgICBAIFJlc3RvcmUgbHIgZm9yIGp1bXAgYmFjayB0byBVU1IKLQotCQlzYXZlX3VzZXJfcmVncwotCi0JCWhhbmRsZV9pcnEKLQotCQltb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otICAgICAgICAgKi8KLSAgICAgICAgaWYgKHN5c2NhbGwpIHsKLSAgICAgICAgICAgICAgICBzd2l0Y2ggKHJlZ3MtPkFSTV9yMCkgewotICAgICAgICAgICAgICAgIGNhc2UgLUVSRVNUQVJUX1JFU1RBUlRCTE9DSzoKLSAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfdGhyZWFkX2luZm8oKS0+cmVzdGFydF9ibG9jay5mbiA9Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvX25vX3Jlc3RhcnRfc3lzY2FsbDsKLSAgICAgICAgICAgICAgICBjYXNlIC1FUkVTVEFSVE5PSEFORDoKLSAgICAgICAgICAgICAgICAgICAgICAgIHJlZ3MtPkFSTV9yMCA9IC1FSU5UUjsKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgICAgIGNhc2UgLUVSRVNUQVJUU1lTOgotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCEoa2EtPnNhLnNhX2ZsYWdzICYgU0FfUkVTVEFSVCkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVncy0+QVJNX3IwID0gLUVJTlRSOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIC8qIGZhbGx0aHJvdWdoICovCi0gICAgICAgICAgICAgICAgY2FzZSAtRVJFU1RBUlROT0lOVFI6Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXN0YXJ0X3N5c2NhbGwocmVncyk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICB9Ci0KLQkvKgotCSAqIHRyYW5zbGF0ZSB0aGUgc2lnbmFsCi0JICovCi0JaWYgKHVzaWcgPCAzMiAmJiB0aHJlYWQtPmV4ZWNfZG9tYWluICYmIHRocmVhZC0+ZXhlY19kb21haW4tPnNpZ25hbF9pbnZtYXApCi0JCXVzaW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5VTEwpOwotICAgICAgICBpZiAoc2lnbnIgPiAwKSB7Ci0gICAgICAgICAgICAgICAgaGFuZGxlX3NpZ25hbChzaWduciwgJmluZm8sIG9sZHNldCwgcmVncywgc3lzY2FsbCk7Ci0gICAgICAgICAgICAgICAgaWYgKGN1cnJlbnQtPnB0cmFjZSAmIFBUX1NJTkdMRVNURVApCi0gICAgICAgICAgICAgICAgICAgICAgICBwdHJhY2Vfc2V0X2JwdChjdXJyZW50KTsKLSAgICAgICAgICAgICAgICByZXR1cm4gMTsKLSAgICAgICAgfQotCi0gICAgICAgIC8qCi0gICAgICAgICAqIE5vIHNpZ25hbCB0byBkZWxpdmVyIHRvIHRoZSBwcm9jZXNzIC0gcmVzdGFydCB0aGUgc3lzY2FsbC4KLSAgICAgICAgICovCi0gICAgICAgIGlmIChzeXNjYWxsKSB7Ci0gICAgICAgICAgICAgICAgaWYgKHJlZ3MtPkFSTV9yMCA9PSAtRVJFU1RBUlRfUkVTVEFSVEJMT0NLKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICB1MzIgKnVzcDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgcmVncy0+QVJNX3NwIC09IDEyOwotICAgICAgICAgICAgICAgICAgICAgICAgdXNwID0gKHUzMiAqKXJlZ3MtPkFSTV9zcDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgcHV0X3VzZXIocmVncy0+QVJNX3BjLCAmdXNwWzBdKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8qIHN3aSBfX05SX3Jlc3RhcnRfc3lzY2FsbCAqLwotICAgICAgICAgICAgICAgICAgICAgICAgcHV0X3VzZXIoMHhlZjAwMDAwMCB8IF9fTlJfcmVzdGFydF9zeXNjYWxsLCAmdXNwWzFdKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIC8qIGxkciAgcGMsIFtzcF0sICMxMiAqLwotLy8gRklYTUUhISEgaXMgIzEyIGNvcnJlY3QgdGhlcmU/Ci0gICAgICAgICAgICAgICAgICAgICA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BfX3VzZXIgKiBfX3VzZXIgKilhcmd2LCAgICAgICAgICAgICAgICAgICAgICAgICAoY2hhciBfX3VzZXIgKiBfX3VzZXIgKillbnZwLCAmcmVncyk7Ci0gICAgICAgIGlmIChyZXQgPCAwKQotICAgICAgICAgICAgICAgIGdvdG8gb3V0OwotCi0gICAgICAgIC8qCi0gICAgICAgICAqIFNhdmUgYXJnYyB0byB0aGUgcmVnaXN0ZXIgc3RydWN0dXJlIGZvciB1c2Vyc3BhY2UuCi0gICAgICAgICAqLwotICAgICAgICByZWdzLkFSTV9yMCA9IHJldDsKLQotICAgICAgICAvKgotICAgICAgICAgKiBXZSB3ZXJlIHN1Y2Nlc3NmdWwuICBXZSB3b24ndCBiZSByZXR1cm5pbmcgdG8gb3VyIGNhbGxlciwgYnV0Ci0gICAgICAgICAqIGluc3RlYWQgdG8gdXNlciBzcGFjZSBieSBtYW5pcHVsYXRpbmcgdGhlIGtlcm5lbCBzdGFjay4KLSAgICAgICAgICovCi0gICAgICAgIGFzbSggICAgImFkZCAgICByMCwgJTAsICUxXG5cdCIKLSAgICAgICAgICAgICAgICAibW92ICAgIHIxLCAlMlxuXHQiCi0gICAgICAgICAgICAgICAgIm1vdiAgICByMiwgJTNcblx0IgotICAgICAgICAgICAgICAgICJibCAgICAgbWVtbW92ZVxuXHQiICAgIC8qIGNvcHkgcmVncyB0byB0b3Agb2Ygc3RhY2sgKi8KLSAgICAgICAgICAgICAgICAibW92ICAgIHI4LCAjMFxuXHQiICAgICAvKiBub3QgYSBzeXNjYWxsICovCi0gICAgICAgICAgICAgICAgIm1vdiAgICByOSwgJTBcblx0IiAgICAgLyogdGhyZWFkIHN0cnVjdHVyZSAqLwotICAgICAgICAgICAgICAgICJtb3YgICAgc3AsIHIwXG5cdCIgICAgIC8qIHJlcG9zaXRpb24gc3RhY2sgcG9pbnRlciAqLwotICAgICAgICAgICAgICAgICJiICAgICAgcmV0X3RvX3VzZXIiCi0gICAgICAgICAgICAgICAgOgotICAgICAgICA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DBDTlRIKSA8PCA4KTsKLQotICAgICAgICBvZmZzZXQgPSBjb3VudDI7Ci0gICAgICAgIGlmIChjb3VudDIgPCBjb3VudDEpIHsKLSAgICAgICAgICAgICAgICAvKgotICAgICAgICAgICAgICAgICAqIFdlIGhhdmUgbm90IGhhZCBhbiBpbnRlcnJ1cHQgYmV0d2VlbiByZWFkaW5nIGNvdW50MQotICAgICAgICAgICAgICAgICAqIGFuZCBjb3VudDIuCi0gICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgaWYgKHN0YXR1cyAmICgxIDw8IDUpKQotICAgICAgICAgICAgICAgICAgICAgICAgb2Zmc2V0IC09IExBVENIOwotICAgICAgICB9IGVsc2UgaWYgKGNvdW50MiA+IGNvdW50MSkgewotICAgICAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgICAgICogV2UgaGF2ZSBqdXN0IGhhZCBhbm90aGVyIGludGVycnVwdCBiZXR3ZWVuIHJlYWRpbmcKLSAgICAgICAgICAgICAgICAgKiBjb3VudDEgYW5kIGNvdW50Mi4KLSAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICBvZmZzZXQgLT0gTEFUQ0g7Ci0gICAgICAgIH0KLQotICAgICAgICBvZmZzZXQgPSAoTEFUQ0ggLSBvZmZzZXQpICogKHRpY2tfbnNlYyAvIDEwMDApOwotICAgICAgICByZXR1cm4gKG9mZnNldCArIExBVENILzIpIC8gTEFUQ0g7Ci19Ci0KLXN0YXRpYyB1bnNpZ25lZCBsb25nIG5leHRfcnRjX3VwZGF0ZTsKLQotLyoKLSAqIElmIHdlIGhhdmUgYW4gZXh0ZXJuYWxseSBzeW5jaHJvbml6ZWQgbGludXggY2xvY2ssIHRoZW4gdXBkYXRlCi0gKiBDTU9TIGNsb2NrIGFjY29yZGluZ2x5IGV2ZXJ5IH4xMSBtaW51dGVzLiAgc2V0X3J0YygpIGhhcyB0byBiZQotICogY2FsbGVkIGFzIGNsb3NlIGFzIHBvc3NpYmxlIHR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SAgICAgX19nZXRfdXNlcl9iYWQKLSAgICAgICAgY21wICAgICByMCwgIzB4MDIwMDAwMDAKLTI6ICAgICAgbGRybHNidCByMSwgW3IwXSwgIzEKLTM6ICAgICAgbGRybHNidCByMiwgW3IwXQotICAgICAgICBsZHJnZWIgIHIxLCBbcjBdLCAjMQotICAgICAgICBsZHJnZWIgIHIyLCBbcjBdCi0gICAgICAgIG9yciAgICAgcjEsIHIxLCByMiwgbHNsICM4Ci0gICAgICAgIG1vdiAgICAgcjAsICMwCi0gICAgICAgIGxkbWZkICAgc3AhLCB7cGN9XgotCi0gICAgICAgIC5nbG9iYWwgX19nZXRfdXNlcl80Ci1fX2dldF91c2VyXzQ6Ci0gICAgICAgIGJpYyAgICAgcjEsIHNwLCAjMHgxZjAwCi0gICAgICAgIGJpYyAgICAgcjEsIHIxLCAjMHgwMGZmCi0gICAgICAgIHN0ciAgICAgbHIsIFtzcCwgIy00XSEKLSAgICAgICAgbGRyICAgICByMSwgW3IxLCAjVElfQUREUl9MSU1JVF0KLSAgICAgICAgc3ViICAgICByMSwgcjEsICM0Ci0gICAgICAgIGNtcCAgICAgcjAsIHIxCi0gICAgICAgIGJnZSAgICAgX19nZXRfdXNlcl9iYWQKLSAgICAgICAgY21wICAgICByMCwgIzB4MDIwMDAwMDAKLTQ6ICAgICAgbGRybHN0ICByMSwgW3IwXQotICAgICAgICBsZHJnZSAgIHIxLCBbcjBdCi0gICAgICAgIG1vdiAgICAgcjAsICMwCi0gICAgICAgIGxkbWZkICAgc3AhLCB7cGN9XgotCi0gICAgICAgIC5nbG9iYWwgX19nZXRfdXNlcl84Ci1fX2dldF91c2VyXzg6Ci0gICAgICAgIGJpYyAgICAgcjIsIHNwLCAjMHgxZjAwCi0gICAgICAgIGJpYyAgICAgcjIsIHIyLCAjMHgwMGZmCi0gICAgICAgIHN0ciAgICAgbHIsIFtzcCwgIy00XSEKLSAgICAgICAgbGRyICAgICByMiwgW3IyLCAjVElfQUREUl9MSU1JVF0KLSA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0KLSNpbmNsdWRlICJnY2NsaWIuaCIKLQotI2RlZmluZSB1bXVsX3BwbW0oeGgsIHhsLCBhLCBiKSBcCi17cmVnaXN0ZXIgVVNJdHlwZSBfX3QwLCBfX3QxLCBfX3QyOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gIF9fYXNtX18gKCIlQCBJbmxpbmVkIHVtdWxfcHBtbQkJCQkJXG5cCi0gICAgICAgIG1vdiAgICAgJTIsICU1LCBsc3IgIzE2CQkJCQkJXG5cCi0gICAgICAgIG1vdiAgICAgJTAsICU2LCBsc3IgIzE2CQkJCQkJXG5cCi0gICAgICAgIGJpYyAgICAgJTMsICU1LCAlMiwgbHNsICMxNgkJCQkJXG5cCi0gICAgICAgIGJpYyAgICAgJTQsICU2LCAlMCwgbHNsICMxNgkJCQkJXG5cCi0gICAgICAgIG11bCAgICAgJTEsICUzLCAlNAkJCQkJCVxuXAotICAgICAgICBtdWwgICAgICU0LCAlMiwgJTQJCQkJCQlcblwKLSAgICAgICAgbXVsICAgICAlMywgJTAsICUzCQkJCQkJXG5cCi0gICAgICAgIG11bCAgICAgJTAsICUyLCAlMAkJCQkJCVxuXAotICAgICAgICBhZGRzICAgICUzLCAlNCwgJTMJCQkJCQlcblwKLSAgICAgICAgYWRkY3MgICAlMCwgJTAsICM2NTUzNgkJCQkJCVxuXAotICAgICAgICBhZGRzICAgICUxLCAlMSwgJTMsIGxzbCAjMTYJCQkJCVxuXAotICAgICAgICBhZGMgICAgICUwLCAlMCwgJTMsIGxzciAjMTYiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICA6ICI9JnIiICgoVVNJdHlwZSkgKHhoKSksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICI9ciIgKChVU0l0eXBlKSAoeGwpKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICI9JnIiIChfX3QwKSwgIj0mciIgKF9fdDEpLCAiPXIiIChfX3QyKSAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICA6ICJyIiAoKFVTSXR5cGUpIChhKSksICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICJyIiAoKFVTSXR5cGUpIChiKSkpO30KLQotCi0jZGVmaW5lIF9fdW11bHNpZGkzKHUsIHYpIFwKLSAgKHtESXVuaW9uIF9fdzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB1bXVsX3BwbW0gKF9fdy5zLmhpZ2gsIF9fdy5zLmxvdywgdSwgdik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICBfX3cubGw7IH0pCi0KLQotREl0eXBlCi1fX211bGRpMyAoREl0eXBlIHUsIERJdHlwZSB2KQotewotICBESXVuaW9uIHc7Ci0gIERJdW5pb24gdXUsIHZ2OwotCi0gIHV1LmxsID0gdSwKLSAgdnYubGwgPSB2OwotCi0gIHcubGwgPSBfX3VtdWxzaWRpMyAodXUucy5sb3csIHZ2LnMubG93KTsKLSAgdy5zLmhpZ2ggKz0gKChVU0l0eXBlKSB1dS5zLmxvdyAqIChVU0l0eXBlKSB2di5zLmhpZ2gKLSAgICAgICAgICAgICAgICsgKFVTSXR5cGUpIHV1LnMuaGlnaCAqIChVU0l0eXBlKSB2di5zLmxvdyk7Ci0KLSAgcmV0dXJuIHcubGw7Ci19Ci0KZGlmZiAtLWdpdCBhL2FyY2gvYXJtMjYvbGliL3B1dHVzZXIuUyBiL2FyY2gvYXJtMjYvbGliL3B1dHVzZXIuUwpkZWxldGVkIGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggNDZjN2YxNS4uMDAwMDAwMAotLS0gYS9hcmNoL2FybTI2L2xpYi9wdXR1c2VyLlMKKysrIC9kZXYvbnVsbApAQCAtMSwxMDkgKzAsMCBAQAotLyoKLSAqICBsaW51eC9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m90ZSBhbHNvIHRoYXQgaXQgaXMgaW50ZW5kZWQgdGhhdCBfX3B1dF91c2VyX2JhZCBpcyBub3QgZ2xvYmFsLgotICovCi0jaW5jbHVkZSA8YXNtL2FzbS1vZmZzZXRzLmg+Ci0jaW5jbHVkZSA8YXNtL3RocmVhZF9pbmZvLmg+Ci0jaW5jbHVkZSA8YXNtL2Vycm5vLmg+Ci0KLSAgICAgICAgLmdsb2JhbCBfX3B1dF91c2VyXzEKLV9fcHV0X3VzZXJfMToKLSAgICAgICAgYmljICAgICByMiwgc3AsICMweDFmMDAKLSAgICAgICAgYmljICAgICByMiwgcjIsICMweDAwZmYKLSAgICAgICAgc3RyICAgICBsciwgW3NwLCAjLTRdIQotICAgICAgICBsZHIgICAgIHIyLCBbcjIsICNUSV9BRERSX0xJTUlUXQotICAgICAgICBzdWIgICAgIHIyLCByMiwgIzEKLSAgICAgICAgY21wICAgICByMCwgcjIKLSAgICAgICAgYmdlICAgICBfX3B1dF91c2VyX2JhZAotMTogICAgICBjbXAgICAgIHIwLCAjMHgwMjAwMDAwMAotICAgICAgICBzdHJsc2J0IHIxLCBbcjBdCi0gICAgICAgIHN0cmdlYiAgcjEsIFtyMF0KLSAgICAgICAgbW92ICAgICByMCwgIzAKLSAgICAgICAgbGRtZmQgICBzcCEsIHtwY31eCi0KLSAgICAgICAgLmdsb2JhbCBfX3B1dF91c2VyXzIKLV9fcHV0X3VzZXJfMjoKLSAgICAgICAgYmljICAgICByMiwgc3AsICMweDFmMDAKLSAgICAgICAgYmljICAgICByMiwgcjIsICMweDAwZmYKLSAgICAgICAgc3RyICAgICBsciwgW3NwLCAjLTRdIQotICAgICAgICBsZHIgICAgIHIyLCBbcjIsICNUSV9BRERSX0xJTUlUXQotICAgICAgICBzdWIgICAgIHIyLCByMiwgIzIKLSAgICAgICAgY21wICAgICByMCwgcjIKLSAgICAgICAgYmdlICAgICBfX3B1dF91c2VyX2JhZAotMjogICAgICBjbXAgICAgIHIwLCAjMHgwMjAwMDAwMAotICAgICAgICBzdHJsc2J0IHIxLCBbcjBdLCAjMQotICAgICAgICBzdHJnZWIgIHIxLCBbcjBdLCAjMQotICAgICAgICBtb3YgICAgIHIxLCByMSwgbHNyICM4Ci0zOiAgICAgIHN0cmxzYnQgcjEsIFtyMF0KLSAgICAgICAgc3RyZ2ViICByMSwgW3IwXQotICAgICAgICBtb3YgICAgIHIwLCAjMAotICAgICAgICBsZG1mZCAgIHNwISwge3BjfV4KLQotICAgICAgICAuZ2xvYmFsIF9fcHV0X3VzZXJfNAotX19wdXRfdXNlcl80OgotICAgICAgICBiaWMgICAgIHIyLCBzcCwgIzB4MWYwMAotICAgICAgICBiaWMgICAgIHIyLCByMiwgIzB4MDBmZgotICAgICAgICBzdHIgICAgIGxyLCBbc3AsICMtNF0hCi0gICAgICAgIGxkciAgICAgcjIsIFtyMiwgI1RJX0FERFJfTElNSVRdCi0gICAgICAgIHN1YiAgICAgcjIsIHIyLCAjNAotICAgICAgICBjbXAgICAgIHIwLCByMgotNDogICAgICBiZ2UgICAgIF9fcHV0X3VzZXJfYmFkCi0gICAgICAgIGNtcCAgICAgcjAsICMweDAyMDAwMDAwCi0gICAgICAgIHN0cmxzdCAgcjEsIFtyMF0KLSAgICAgICAgc3RyZ2UgICByMSwgW3IwXQotICAgICAgICBtb3YgICAgIHIwLCAjMAotICAgICAgICBsZG1mZCAgIHNwISwge3BjfV4KLQotICAgICAgICAuZ2xvYmFsIF9fcHV0X3VzZXJfOAotX19wdXRfdXNlcl84OgotICAgICAgICBiaWMgICAgIGlwLCBzcCwgIzB4MWYwMAotICAgICAgICBiaWMgICAgIGlwLCBpcCwgIzB4MDBmZgotICAgICAgICBzdHIgICAgIGxyLCBbc3AsICMtNF0hCi0gICAgICAgIGxkciAgICAgaXAsIFtpcCwgI1RJX0FERFJfTElNSVRdCi0gICAgICAgIHN1YiAgICAgaXAsIGlwLCAjOAotICAgICAgICBjbXAgICAgIHIwLCBpcAotICAgICAgICBiZ2UgICAgIF9fc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Vzc191c2VyX3B1dF9oYWxmCi0gICAgICAgICAgICAgICAgLndvcmQgICB1YWNjZXNzX3VzZXJfZ2V0X2hhbGYKLSAgICAgICAgICAgICAgICAud29yZCAgIHVhY2Nlc3NfdXNlcl9wdXRfd29yZAotICAgICAgICAgICAgICAgIC53b3JkICAgdWFjY2Vzc191c2VyX2dldF93b3JkCi0JCS53b3JkICAgdWFjY2Vzc191c2VyX3B1dF9kd29yZAotICAgICAgICAgICAgICAgIC53b3JkICAgdWFjY2Vzc191c2VyX2NvcHlfZnJvbV91c2VyCi0gICAgICAgICAgICAgICAgLndvcmQgICB1YWNjZXNzX3VzZXJfY29weV90b191c2VyCi0gICAgICAgICAgICAgICAgLndvcmQgICB1YWNjZXNzX3VzZXJfY2xlYXJfdXNlcgotICAgICAgICAgICAgICAgIC53b3JkICAgdWFjY2Vzc191c2VyX3N0cm5jcHlfZnJvbV91c2VyCi0gICAgICAgICAgICAgICAgLndvcmQgICB1YWNjZXNzX3VzZXJfc3Rybmxlbl91c2VyCi0KLQotQCBJbiA6IHIwID0geCwgcjEgPSBhZGRyLCByMiA9IGVycm9yCi1AIE91dDogcjIgPSBlcnJvcgotdWFjY2Vzc191c2VyX3B1dF9ieXRlOgotICAgICAgICAgICAgICAgIHN0bWZkICAgc3AhLCB7bHJ9Ci1VU0VSKCAgICAgICAgICAgc3RyYnQgICByMCwgW3IxXSkKLSAgICAgICAgICAgICAgICBsZG1mZCAgIHNwISwge3BjfV4KLQotQCBJbiA6IHIwID0geCwgcjEgPSBhZGRyLCByMiA9IGVycm9yCi1AIE91dDogcjIgPSBlcnJvcgotdWFjY2Vzc191c2VyX3B1dF9oYWxmOgotICAgICAgICAgICAgICAgIHN0bWZkICAgc3AhLCB7bHJ9Ci1VU0VSKCAgICAgICAgICAgc3RyYnQgICByMCwgW3IxXSwgIzEpCi0gICAgICAgICAgICAgICAgbW92ICAgICByMCwgcjAsIGxzciAjOAotVVNFUiggICAgICAgICAgIHN0cmJ0ICAgcjAsIFtyMV0pCi0gICAgICAgICAgICAgICAgbGRtZmQgICBzcCEsIHtwY31eCi0KLUAgSW4gOiByMCA9IHgsIHIxID0gYWRkciwgcjIgPSBlcnJvcgotQCBPdXQ6IHIyID0gZXJyb3IKLXVhY2Nlc3NfdXNlcl9wdXRfd29yZDoKLSAgICAgICAgICAgICAgICBzdG1mZCAgIHNwISwge2xyfQotVVNFUiggICAgICAgICAgIHN0cnQgICAgcjAsIFtyMV0pCi0gICAgICAgICAgICAgICAgbGRtZmQgICBzcCEsIHtwY31eCi0KLUAgSW4gOiByMCA9IHgsIHIxID0gYWRkciwgcjIgPSBlcnJvcgotQCBPdXQ6IHIyID0gZXJyb3IKLXVhY2Nlc3NfdXNlcl9wdXRfZHdvcmQ6Ci0gICAgICAgICAgICAgICAgc3RtZmQgICBzcCEsIHtscn0KLVVTRVIoICAgICAgICAgICBzdHJ0ICAgIHIwLCBbcjFdLCAjNCkKLVVTRVIoICAgICAgICAgICBzdHJ0ICAgIHIwLCBbcjFdLCAjMCkKLSAgICAgICAgICAgICAgICBsZG1mZCAgIHNwISwge3BjfV4KLQotOTAwMTogICAgICAgICAgIG1vdiAgICAgcjIsICMtRUZBVUxUCi0gICAgICAgICAgICAgICAgbGRtZmQgICBzcCEsIHtwY31eCi0KLQotQCBJbiA6IHIwID0gYWRkciwgcjEgPSBlcnJvcgotQCBPdXQ6IHIwID0geCwgcjEgPSBlcnJvcgotdWFjY2Vzc191c2VyX2dldF9ieXRlOgotICAgICAgICAgICAgICAgIHN0bWZkICAgc3AhLCB7bHJ9Ci1VU0VSKCAgICAgICAgICAgbGRyYnQgICByMCwgW3IwXSkKLSAgICAgICAgICAgICAgICBsZG1mZCAgIHNwISwge3BjfV4KLQotQCBJbiA6IHIwID0gYWRkciwgcjEgPSBlcnJvcgotQCBPdXQ6IHIwID0geCwgcjEgPSBlcnJvcgotdWFjY2Vzc191c2VyX2dldF9oYWxmOgotICAgICAgICAgICAgICAgIHN0bWZkICAgc3AhLCB7bHJ9Ci1VU0VSKCAgICAgICAgICAgbGRydCAgICByMCwgW3IwXSkKLSAgICAgICAgICAgICAgICBtb3YgICAgIHIwLCByMCwgbHNsICMxNgotICAgICAgICAgICAgICAgIG1vdiAgICAgcjAsIHIwLCBsc3IgIzE2Ci0gICAgICAgICAgICAgICAgbGRtZmQgICBzcCEsIHtwY31eCi0KLUAgSW4gOiByMCA9IGFkZHIsIHIxID0gZXJyb3IKLUAgT3V0OiByMCA9IHgsIHIxID0gZXJyb3IKLXVhY2Nlc3NfdXNlcl9nZXRfd29yZDoKLSAgICAgICAgICAgICAgICBzdG1mZCAgIHNwISwge2xyfQotVVNFUiggICAgICAgICAgIGxkcnQgICAgcjAsIFtyMF0pCi0gICAgICAgICAgICAgICAgbGRtZmQgICBzcCEsIHtwY31eCi0KLTkwMDE6ICAgICAgICAgICBtb3YgICAgIHIxLCAjLUVGQVVMVAotICAgICAgICAgICAgICAgIGxkbWZkICAgc3AhLCB7cGN9XgotCi0vKiBQcm90b3R5cGU6IGludCB1YWNjZXNzX3VzZXJfY29weV90b191c2VyKHZvaWQgKnRvLCBjb25zdCBjaGFyICpmcm9tLCBzaXplX3QgbikKLSAqIFB1cnBvc2UgIDogY29weSBhIGJsb2NrIHRvIHVzZXIgbWVtb3J5IGZyb20ga2VybmVsIG1lbW9yeQotICogUGFyYW1zICAgOiB0byAgIC0gdXNlciBtZW1vcnkKLSAqICAgICAgICAgIDogZnJvbSAtIGtlcm5lbCBtZW1vcnkKLSAqICAgICAgICAgIDogbiAgICAtIG51bWJlciBvZiBieXRlcyB0byBjb3B5Ci0gKiBSZXR1cm5zICA6IE51bWJlciBvZiBieXRlcyBOT1QgY29waWVkLgotICovCi0KLS5jMnVfZGVzdF9ub3RfYWxpZ25lZDoKLQkJcnNiCWlwLCBpcCwgIzQKLQkJY21wCWlwLCAjMgotCQlsZHJiCXIzLCBbcjFdLCAjMQotVVNFUigJCXN0cmJ0CXIzLCBbcjBdLCAjMSkJCQlAIE1heSBmYXV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ICAgICAvKiAwcSA9IG5uIC8gMEQgKi8KLQotICAgICAgICAgIGNvdW50X2xlYWRpbmdfemVyb3MgKGJtLCBkMCk7Ci0KLSAgICAgICAgICBpZiAoYm0gIT0gMCkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgLyogTm9ybWFsaXplLCBpLmUuIG1ha2UgdGhlIG1vc3Qgc2lnbmlmaWNhbnQgYml0IG9mIHRoZQotICAgICAgICAgICAgICAgICBkZW5vbWluYXRvciBzZXQuICAqLwotCi0gICAgICAgICAgICAgIGQwID0gZDAgPDwgYm07Ci0gICAgICAgICAgICAgIG4xID0gKG4xIDw8IGJtKSB8IChuMCA+PiAoU0lfVFlQRV9TSVpFIC0gYm0pKTsKLSAgICAgICAgICAgICAgbjAgPSBuMCA8PCBibTsKLSAgICAgICAgICAgIH0KLQotICAgICAgICAgIHVkaXZfcXJubmQgKHEwLCBuMCwgbjEsIG4wLCBkMCk7Ci0gICAgICAgICAgcTEgPSAwOwotCi0gICAgICAgICAgLyogUmVtYWluZGVyIGluIG4wID4+IGJtLiAgKi8KLSAgICAgICAgfQotICAgICAgZWxzZQotICAgICAgICB7Ci0gICAgICAgICAgLyogcXEgPSBOTiAvIDBkICovCi0KLSAgICAgICAgICBpZiAoZDAgPT0gMCkKLSAgICAgICAgICAgIGQwID0gMSAvIGQwOyAgICAgICAgLyogRGl2aWRlIGludGVudGlvbmFsbHkgYnkgemVyby4gICovCi0KLSAgICAgICAgICBjb3VudF9sZWFkaW5nX3plcm9zIChibSwgZDApOwotCi0gICAgICAgICAgaWYgKGJtID09IDApCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgIC8qIEZyb20gKG4xID49IGQwKSAvXCAodGhlIG1vc3Qgc2lnbmlmaWNhbnQgYml0IG9mIGQwIGlzIHNldCksCi0gICAgICAgICAgICAgICAgIGNvbmNsdWRlICh0aGUgbW9zdCBzaWduaWZpY2FudCBiaXQgb2YgbjEgaXMgc2V0KSAvXCAodGhlCi0gICAgICAgICAgICAgICAgIGxlYWRpbmcgcXVvdGllbnQgZGlnaXQgcTEgPSAxKS4KLQotICAgICAgICAgICAgICAgICBUaGlzIHNwZWNpYWwgY2FzZSBpcyBuZWNlc3NhcnksIG5vdCBhbiBvcHRpbWl6YXRpb24uCi0gICAgICAgICAgICAgICAgIChTaGlmdHMgY291bnRzIG9mIFNJX1RZUEVfU0laRSBhcmUgdW5kZWZpbmVkLikgICovCi0KLSAgICAgICAgICAgICAgbjEgLT0gZDA7Ci0gICAgICAgICAgICAgIHExID0gMTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgIC8qIE5vcm1hbGl6ZS4gICovCi0KLSAgICAgICAgICAgICAgYiA9IFNJX1RZUEVfU0laRSAtIGJtOwotCi0gICAgICAgICAgICAgIGQwID0gZDAgPDwgYm07Ci0gICAgICAgICAgICAgIG4yID0gbjEgPj4gYjsKLSAgICAgICAgICAgICAgbjEgPSAobjEgPDwgYm0pIHwgKG4wID4+IGIpOwotICAgICAgICAgICAgICBuMCA9IG4wIDw8IGJtOwotCi0gICAgICAgICAgICAgIHVkaXZfcXJubmQgKHExLCBuMSwgbjIsIG4xLCBkMCk7Ci0gICAgICAgICAgICB9Ci0KLSAgICAgICAgICAvKiBuMSAhPSBkMC4uLiAgKi8KLQotICAgICAgICAgIHVkaXZfcXJubmQgKHEwLCBuMCwgbjEsIG4wLCBkMCk7Ci0KLSAgICAgICAgICAvKiBSZW1haW5kZXIgaW4gbjAgPj4gYm0uICAqLwotICAgICAgICB9Ci0KLSAgICAgIGlmIChycCAhPSAwKQotICAgICAgICB7Ci0gICAgICAgICAgcnIucy5sb3cgPSBuMCA+PiBibTsKLSAgICAgICAgICByci5zLmhpZ2ggPSAwOwotICAgICAgICAgICpycCA9IHJyLmxsOwotICAgICAgICB9Ci0gICAgfQotICBlbHNlCi0gICAgewotICAgICAgaWYgKGQxID4gbjEpCi0gICAgICAgIHsKLSAgICAgICAgICAvKiAwMCA9IG5uIC8gREQgKi8KLQotICAgICAgICAgIHEwID0gMDsKLSAgICAgICAgICBxMSA9IDA7Ci0KLSAgICAgICAgICAvKiBSZW1haW5kZXIgaW4gbjFuMC4gICovCi0gICAgICAgICAgaWYgKHJwICE9IDApCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgIHJyLnMubG93ID0gbjA7Ci0gICAgICAgICAgICAgIHJyLnMuaGlnaCA9IG4xOwotICAgICAgICAgICAgICAqcnAgPSByci5sbDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgICAgZWxzZQotICAgICAgICB7Ci0gICAgICAgICAgLyogMHEgPSBOTiAvIGRkICovCi0KLSAgICAgICAgICBjb3VudF9sZWFkaW5nX3plcm9zIChibSwgZDEpOwotICAgICAgICAgIGlmIChibSA9PSAwKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAvKiBGcm9tIChuMSA+PSBkMSkgL1wgKHRoZSBtb3N0IHNpZ25pZmljYW50IGJpdCBvZiBkMSBpcyBzZXQpLAotICAgICAgICAgICAgICAgICBjb25jbHVkZSAodGhlIG1vc3Qgc2lnbmlmaWNhbnQgYml0IG9mIG4xIGlzIHNldCkgL1wgKHRoZQotICAgICAgICAgICAgICAgICBxdW90aWVudCBkaWdpdCBxMCA9IDAgb3IgMSkuCi0KLSAgICAgICAgICAgICAgICAgVGhpcyBzcGVjaWFsIGNhc2UgaXMgbmVjZXNzYXJ5LCBub3QgYW4gb3B0aW1pemF0aW9uLiAgKi8KLQotICAgICAgICAgICAgICAvKiBUaGUgY29uZGl0aW9uIG9uIHRoZSBuZXh0IGxpbmUgdGFrZXMgYWR2YW50YWdlIG9mIHRoYXQKLSAgICAgICAgICAgICAgICAgbjEgPj0gZDEgKHRydWUgZHVlIHRvIHByb2dyYW0gZmxvdykuICAqLwotICAgICAgICAgICAgICBpZiAobjEgPiBkMSB8fCBuMCA+PSBkMCkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICBxMCA9IDE7Ci0gICAgICAgICAgICAgICAgICBzdWJfZGRtbXNzIChuMSwgbjAsIG4xLCBuMCwgZDEsIGQwKTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICBxMCA9IDA7Ci0KLSAgICAgICAgICAgICAgcTEgPSAwOwotCi0gICAgICAgICAgICAgIGlmIChycCAhPSAwKQotICAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgIHJyLnMubG93ID0gbjA7Ci0gICAgICAgICAgICAgICAgICByci5zLmhpZ2ggPSBuMTsKLSAgICAgICAgICAgICAgICAgICpycCA9IHJyLmxsOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgIFVTSXR5cGUgbTEsIG0wOwotICAgICAgICAgICAgICAvKiBOb3JtYWxpemUuICAqLwotCi0gICAgICAgICAgICAgIGIgPSBTSV9UWVBFX1NJWkUgLSBibTsKLQotICAgICAgICAgICAgICBkMSA9IChkMSA8PCBibSkgfCAoZDAgPj4gYik7Ci0gICAgICAgICAgICAgIGQwID0gZDAgPDwgYm07Ci0gICAgICAgICAgICAgIG4yID0gbjEgPj4gYjsKLSAgICAgICAgICAgICAgbjEgPSAobjEgPDwgYm0pIHwgKG4wID4+IGIpOwotICAgICAgICAgICAgICBuMCA9IG4wIDw8IGJtOwotCi0gICAgICAgICAgICAgIHVkaXZfcXJubmQgKHEwLCBuMSwgbjIsIG4xLCBkMSk7Ci0gICAgICAgICAgICAgIHVtdWxfcHBtbSAobTEsIG0wLCBxMCwgZDApOwotCi0gICAgICAgICAgICAgIGlmIChtMSA+IG4xIHx8IChtMSA9PSBuMSAmJiBtMCA+IG4wKSkKLSAgICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICBxMC0tOwotICAgICAgICAgICAgICAgICAgc3ViX2RkbW1zcyAobTEsI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AgIAotICAgRm0gPSBnZXRGbShvcGNvZGUpOwotICAgaWYgKENPTlNUQU5UX0ZNKG9wY29kZSkpCi0gICB7Ci0gICAgIHJGbSA9IGdldEV4dGVuZGVkQ29uc3RhbnQoRm0pOwotICAgfQotICAgZWxzZQotICAgeyAgCi0gICAgIHN3aXRjaCAoZnBhMTEtPmZUeXBlW0ZtXSkKLSAgICAgewotICAgICAgICBjYXNlIHR5cGVTaW5nbGU6Ci0gICAgICAgICAgckZtID0gZmxvYXQzMl90b19mbG9hdHg4MChmcGExMS0+ZnByZWdbRm1dLmZTaW5nbGUpOwotICAgICAgICBicmVhazsKLQotICAgICAgICBjYXNlIHR5cGVEb3VibGU6Ci0gICAgICAgICAgckZtID0gZmxvYXQ2NF90b19mbG9hdHg4MChmcGExMS0+ZnByZWdbRm1dLmZEb3VibGUpOwotICAgICAgICBicmVhazsKLSAgICAgICAgCi0gICAgICAgIGNhc2UgdHlwZUV4dGVuZGVkOgotICAgICAgICAgIHJGbSA9IGZwYTExLT5mcHJlZ1tGbV0uZkV4dGVuZGVkOwotICAgICAgICBicmVhazsKLSAgICAgICAgCi0gICAgICAgIGRlZmF1bHQ6IHJldHVybiAwOwotICAgICB9Ci0gICB9Ci0gICAKLSAgIGlmICghTU9OQURJQ19JTlNUUlVDVElPTihvcGNvZGUpKQotICAgewotICAgICAgRm4gPSBnZXRGbihvcGNvZGUpOwotICAgICAgc3dpdGNoIChmcGExMS0+ZlR5cGVbRm5dKQotICAgICAgewotICAgICAgICBjYXNlIHR5cGVTaW5nbGU6Ci0gICAgICAgICAgckZuID0gZmxvYXQzMl90b19mbG9hdHg4MChmcGExMS0+ZnByZWdbRm5dLmZTaW5nbGUpOwotICAgICAgICBicmVhazsKLQotICAgICAgICBjYXNlIHR5cGVEb3VibGU6Ci0gICAgICAgICAgckZuID0gZmxvYXQ2NF90b19mbG9hdHg4MChmcGExMS0+ZnByZWdbRm5dLmZEb3VibGUpOwotICAgICAgICBicmVhazsKLSAgICAgICAg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8IEZkIDo9IEZtICAgICAgICAgICAgICB8Ci18IDAgfCAwIHwgMCB8IDEgfCBNTkYgICAgICB8IE1vdmUgbmVnYXRlZCAgICAgICAgICB8IEZkIDo9IC0gRm0gICAgICAgICAgICB8Ci18IDAgfCAwIHwgMSB8IDAgfCBBQlMgICAgICB8IEFic29sdXRlIHZhbHVlICAgICAgICB8IEZkIDo9IGFicyhGbSkgICAgICAgICB8Ci18IDAgfCAwIHwgMSB8IDEgfCBSTkQgICAgICB8IFJvdW5kIHRvIGludGVnZXIgICAgICB8IEZkIDo9IGludChGbSkgICAgICAgICB8Ci18IDAgfCAxIHwgMCB8IDAgfCBTUVQgICAgICB8IFNxdWFyZSByb290ICAgICAgICAgICB8IEZkIDo9IHNxcnQoRm0pICAgICAgICB8Ci18IDAgfCAxIHwgMCB8IDEgfCBMT0cgICAgICB8IExvZyBiYXNlIDEwICAgICAgICAgICB8IEZkIDo9IGxvZzEwKEZtKSAgICAgICB8Ci18IDAgfCAxIHwgMSB8IDAgfCBMR04gICAgICB8IExvZyBiYXNlIGUgICAgICAgICAgICB8IEZkIDo9IGxuKEZtKSAgICAgICAgICB8Ci18IDAgfCAxIHwgMSB8IDEgfCBFWFAgICAgICB8IEV4cG9uZW50ICAgICAgICAgICAgICB8IEZkIDo9IGUgXiBGbSAgICAgICAgICB8Ci18IDEgfCAwIHwgMCB8IDAgfCBTSU4gICAgICB8IFNpbmUgICAgICAgICAgICAgICAgICB8IEZkIDo9IHNpbihGbSkgICAgICAgICB8Ci18IDEgfCAwIHwgMCB8IDEgfCBDT1MgICAgICB8IENvc2luZSAgICAgICAgICAgICAgICB8IEZkIDo9IGNvcyhGbSkgICAgICAgICB8Ci18IDEgfCAwIHwgMSB8IDAgfCBUQU4gICAgICB8IFRhbmdlbnQgICAgICAgICAgICAgICB8IEZkIDo9IHRhbihGbSkgICAgICAgICB8Ci18IDEgfCAwIHwgMSB8IDEgfCBBU04gICAgICB8IEFyYyBTaW5lICAgICAgICAgICAgICB8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aW5nbGU6Ci0gICAgICAgICAgckZtID0gZnBhMTEtPmZwcmVnW0ZtXS5mU2luZ2xlOwotICAgICAgICBicmVhazsKLSAgICAgICAgCi0gICAgICAgIGRlZmF1bHQ6IHJldHVybiAwOwotICAgICB9Ci0gICB9Ci0KLSAgIGlmICghTU9OQURJQ19JTlNUUlVDVElPTihvcGNvZGUpKQotICAgewotICAgICAgRm4gPSBnZXRGbihvcGNvZGUpOwotICAgICAgc3dpdGNoIChmcGExMS0+ZlR5cGVbRm5dKQotICAgICAgewotICAgICAgICBjYXNlIHR5cGVTaW5nbGU6Ci0gICAgICAgICAgckZuID0gZnBhMTEtPmZwcmVnW0ZuXS5mU2luZ2xlOwotICAgICAgICBicmVhazsKLQotICAgICAgICBkZWZhdWx0OiByZXR1cm4gMDsKLSAgICAgIH0KLSAgIH0KLQotICAgRmQgPSBnZXRGZChvcGNvZGUpOwotICAgc3dpdGNoIChvcGNvZGUgJiBNQVNLX0FSSVRITUVUSUNfT1BDT0RFKQotICAgewotICAgICAgLyogZHlhZGljIG9wY29kZXMgKi8KLSAgICAgIGNhc2UgQURGX0NPREU6Ci0gICAgICAgICBmcGExMS0+ZnByZWdbRmRdLmZTaW5nbGUgPSBmbG9hdDMyX2FkZChyRm4sckZtKTsKLSAgICAgIGJyZWFrOwotCi0gICAgICBjYXNlIE1VRl9DT0RFOgotICAgICAgY2FzZSBGTUxfQ09ERToKLSAgICAgICAgZnBhMTEtPmZwcmVnW0ZkXS5mU2luZ2xlID0gZmxvYXQzMl9tdWwockZuLHJGbSk7Ci0gICAgICBicmVhazsKLQotICAgICAgY2FzZSBTVUZfQ09ERToKLSAgICAgICAgIGZwYTExLT5mcHJlZ1tGZF0uZlNpbmdsZSA9IGZsb2F0MzJfc3ViKHJGbixyRm0pOwotICAgICAgYnJlYWs7Ci0KLSAgICAgIGNhc2UgUlNGX0NPREU6Ci0gICAgICAgICBmcGExMS0+ZnByZWdbRmRdLmZTaW5nbGUgPSBmbG9hdDMyX3N1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LWNvcnJ1cHRlZCBhcyBkZXNjcmliZWQgYWJvdmUsIGFuZCBpcyByZXR1cm5lZCBhdCB0aGUgbG9jYXRpb24gcG9pbnRlZCB0byBieQotYHoyUHRyJy4pCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCi0qLwotSU5MSU5FIHZvaWQKLSBzaGlmdDEyOEV4dHJhUmlnaHRKYW1taW5nKAotICAgICBiaXRzNjQgYTAsCi0gICAgIGJpdHM2NCBhMSwKLSAgICAgYml0czY0IGEyLAotICAgICBpbnQxNiBjb3VudCwKLSAgICAgYml0czY0ICp6MFB0ciwKLSAgICAgYml0czY0ICp6MVB0ciwKLSAgICAgYml0czY0ICp6MlB0cgotICkKLXsKLSAgICBiaXRzNjQgejAsIHoxLCB6MjsKLSAgICBpbnQ4IG5lZ0NvdW50ID0gKCAtIGNvdW50ICkgJiA2MzsKLQotICAgIGlmICggY291bnQgPT0gMCApIHsKLSAgICAgICAgejIgPSBhMjsKLSAgICAgICAgejEgPSBhMTsKLSAgICAgICAgejAgPSBhMDsKLSAgICB9Ci0gICAgZWxzZSB7Ci0gICAgICAgIGlmICggY291bnQgPCA2NCApIHsKLSAgICAgICAgICAgIHoyID0gYTE8PG5lZ0NvdW50OwotICAgICAgICAgICAgejEgPSAoIGEwPDxuZWdDb3VudCApIHwgKCBhMT4+Y291bnQgKTsKLSAgICAgICAgICAgIHowID0gYTA+PmNvdW50OwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgewotICAgICAgICAgICAgaWYgKCBjb3VudCA9PSA2NCApIHsKLSAgICAgICAgICAgICAgICB6MiA9IGExOwotICAgICAgICAgICAgICAgIHoxID0gYTA7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICBhMiB8PSBhMTsKLSAgICAgICAgICAgICAgICBpZiAoIGNvdW50IDwgMTI4ICkgewotICAgICAgICAgICAgICAgICAgICB6MiA9IGEwPDxuZWdDb3VudDsKLSAgICAgICAgICAgICAgICAgICAgejEgPSBhMD4+KCBjb3VudCAmIDYzICk7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICB6MiA9ICggY291bnQgPT0gMTI4ICkgPyBhMCA6ICggYTAgIT0gMCApOwotICAgICAgICAgICAgICAgICAgICB6MSA9IDA7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotICAgICAgICAgICAgejAgPSAwOwotICAgICAgICB9Ci0gICAgICAgIHoyIHw9ICggYTIgIT0gMCApOwotICAgIH0KLSAgICAqejJQdHIgPSB6MjsKLSAgICAqejFQdHIgPSB6MTsKLSAgICAqejBQdHIgPSB6MDsKLQotfQotCi0vKgotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotU2hpZnRzIHRoZSAxMjgtYml0IHZhbHVlIGZvcm1lZCBieSBjb25jYXRlbmF0aW5nIGBhMCcgYW5kIGBhMScgbGVmdCBieSB0aGUKLW51bWJlciBvZiBiaXRzIGdpdmVuIGluIGBjb3VudCcuICBBbnkgYml0cyBzaGlmdGVkIG9mZiBhcmUgbG9zdC4gIFRoZSB2YWx1ZQotb2YgYGNvdW50JyBtdXN0IGJlIGxlc3MgdGhhbiA2NC4gIFRoZSByZXN1bHQgaXMgYnJva2VuIGludG8gdHdvIDY0LWJpdAotcGllY2VzIHdoaWNoIGFyZSBzdG9yZWQgYXQgdGhlIGxvY2F0aW9ucyBwb2ludGVkIHRvIGJ5IGB6MFB0cicgYW5kIGB6MVB0cicuCi0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS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wb2ludCBBcml0aG1ldGljLgotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotKi8KLXN0YXRpYyBmbG9hdDMyIHJvdW5kQW5kUGFja0Zsb2F0MzIoIGZsYWcgelNpZ24sIGludDE2IHpFeHAsIGJpdHMzMiB6U2lnICkKLXsKLSAgICBpbnQ4IHJvdW5kaW5nTW9kZTsKLSAgICBmbGFnIHJvdW5kTmVhcmVzdEV2ZW47Ci0gICAgaW50OCByb3VuZEluY3JlbWVudCwgcm91bmRCaXRzOwotICAgIGZsYWcgaXNUaW55OwotCi0gICAgcm91bmRpbmdNb2RlID0gZmxvYXRfcm91bmRpbmdfbW9kZTsKLSAgICByb3VuZE5lYXJlc3RFdmVuID0gKCByb3VuZGluZ01vZGUgPT0gZmxvYXRfcm91bmRfbmVhcmVzdF9ldmVuICk7Ci0gICAgcm91bmRJbmNyZW1lbnQgPSAweDQwOwotICAgIGlmICggISByb3VuZE5lYXJlc3RFdmVuICkgewotICAgICAgICBpZiAoIHJvdW5kaW5nTW9kZSA9PSBmbG9hdF9yb3VuZF90b196ZXJvICkgewotICAgICAgICAgICAgcm91bmRJbmNyZW1lbnQgPSAwOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgewotICAgICAgICAgICAgcm91bmRJbmNyZW1lbnQgPSAweDdGOwotICAgICAgICAgICAgaWYgKCB6U2lnbiApIHsKLSAgICAgICAgICAgICAgICBpZiAoIHJvdW5kaW5nTW9kZSA9PSBmbG9hdF9yb3VuZF91cCApIHJvdW5kSW5jcmVtZW50ID0gMDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgIGlmICggcm91bmRpbmdNb2RlID09IGZsb2F0X3JvdW5kX2Rvd24gKSByb3VuZEluY3JlbWVudCA9IDA7Ci0gICAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICB9Ci0gICAgcm91bmRCaXRzID0gelNpZyAmIDB4N0Y7Ci0gICAgaWYgKCAweEZEIDw9IChiaXRzMTYpIHpFeHAgKSB7Ci0gICAgICAgIGlmICggICAgKCAweEZEIDwgekV4cCApCi0gICAgICAgICAgICAgfHwgKCAgICAoIHpFeHAgPT0gMHhGRCApCi0gICAgICAgICAgICAgICAgICAmJiAoIChzYml0czMyKSAoIHpTaWcgKyByb3VuZEluY3JlbWVudCApIDwgMCApICkKLSAgICAgICAgICAgKSB7Ci0gICAgICAgICAgICBmbG9hdF9yYWlzZSggZmxvYXRfZmxhZ19vdmVyZmxvdyB8IGZsb2F0X2ZsYWdfaW5leGFjdCApOwotICAgICAgICAgICAgcmV0dXJuIHBhY2tGbG9hdDMyKCB6U2lnbiwgMHhGRiwgMCApIC0gKCByb3VuZEluY3JlbWVudCA9PSAwICk7Ci0gICAgICAgIH0KLSAgICAgICAgaWYgKCB6RXhwIDwgMCApIHsKLSAgICAgICAgICAgIGlzVGlueSA9Ci0gICAgICAgICAgICAgICAgICAgKCBmbG9hdF9kZXRlY3RfdGluaW5lc3MgPT0gZmxvYXRfdGluaW5lc3NfYmVmb3JlX3JvdW5kaW5nICkKLSAgICAgICAgICAgICAgICB8fCAoIHpFeHAgPCAtMSApCi0gICAgICAgICAgICAgICAgfHwgKCB6U2lnICsgcm91bmRJbmNyZW1lbnQgPCAweDgwMDAwMDAwICk7Ci0gICAgICAgICAgICBzaGlmdDMyUmlnaHRKYW1taW5nKCB6U2lnLCAtIHpFeHAsICZ6U2lnICk7Ci0gICAgICAgICAgICB6RXhwID0gMDsKLSAgICAgICAgICAgIHJvdW5kQml0cyA9IHpTaWcgJiAweDdGOwotICAgICAgICAgICAgaWYgKCBpc1RpbnkgJiYgcm91bmRCaXRzICkgZmxvYXRfcmFpc2UoIGZsb2F0X2ZsYWdfdW5kZXJmbG93ICk7Ci0gICAgICAgIH0KLSAgICB9Ci0gICAgaWYgKCByb3VuZEJpdHM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ICggcm91bmRpbmdNb2RlID09IGZsb2F0X3JvdW5kX3VwICkgcm91bmRJbmNyZW1lbnQgPSAwOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgaWYgKCByb3VuZGluZ01vZGUgPT0gZmxvYXRfcm91bmRfZG93biApIHJvdW5kSW5jcmVtZW50ID0gMDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgIH0KLSAgICByb3VuZEJpdHMgPSB6U2lnICYgMHgzRkY7Ci0gICAgaWYgKCAweDdGRCA8PSAoYml0czE2KSB6RXhwICkgewotICAgICAgICBpZiAoICAgICggMHg3RkQgPCB6RXhwICkKLSAgICAgICAgICAgICB8fCAoICAgICggekV4cCA9PSAweDdGRCApCi0gICAgICAgICAgICAgICAgICAmJiAoIChzYml0czY0KSAoIHpTaWcgKyByb3VuZEluY3JlbWVudCApIDwgMCApICkKLSAgICAgICAgICAgKSB7Ci0gICAgICAgICAgICAvL3JlZ2lzdGVyIGludCBsciA9IF9fYnVpbHRpbl9yZXR1cm5fYWRkcmVzcygwKTsKLSAgICAgICAgICAgIC8vcHJpbnRrKCJyb3VuZEFuZFBhY2tGbG9hdDY0IGNhbGxlZCBmcm9tIDB4JTA4eFxuIixscik7Ci0gICAgICAgICAgICBmbG9hdF9yYWlzZSggZmxvYXRfZmxhZ19vdmVyZmxvdyB8IGZsb2F0X2ZsYWdfaW5leGFjdCApOwotICAgICAgICAgICAgcmV0dXJuIHBhY2tGbG9hdDY0KCB6U2lnbiwgMHg3RkYsIDAgKSAtICggcm91bmRJbmNyZW1lbnQgPT0gMCApOwotICAgICAgICB9Ci0gICAgICAgIGlmICggekV4cCA8IDAgKSB7Ci0gICAgICAgICAgICBpc1RpbnkgPQotICAgICAgICAgICAgICAgICAgICggZmxvYXRfZGV0ZWN0X3RpbmluZXNzID09IGZsb2F0X3RpbmluZXNzX2JlZm9yZV9yb3VuZGluZyApCi0gICAgICAgICAgICAgICAgfHwgKCB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kSW5jcmVtZW50ID0gTElUNjQoIDB4MDAwMDAwMDAwMDAwMDQwMCApOwotICAgICAgICByb3VuZE1hc2sgPSBMSVQ2NCggMHgwMDAwMDAwMDAwMDAwN0ZGICk7Ci0gICAgfQotICAgIGVsc2UgaWYgKCByb3VuZGluZ1ByZWNpc2lvbiA9PSAzMiApIHsKLSAgICAgICAgcm91bmRJbmNyZW1lbnQgPSBMSVQ2NCggMHgwMDAwMDA4MDAwMDAwMDAwICk7Ci0gICAgICAgIHJvdW5kTWFzayA9IExJVDY0KCAweDAwMDAwMEZGRkZGRkZGRkYgKTsKLSAgICB9Ci0gICAgZWxzZSB7Ci0gICAgICAgIGdvdG8gcHJlY2lzaW9uODA7Ci0gICAgfQotICAgIHpTaWcwIHw9ICggelNpZzEgIT0gMCApOwotICAgIGlmICggISByb3VuZE5lYXJlc3RFdmVuICkgewotICAgICAgICBpZiAoIHJvdW5kaW5nTW9kZSA9PSBmbG9hdF9yb3VuZF90b196ZXJvICkgewotICAgICAgICAgICAgcm91bmRJbmNyZW1lbnQgPSAwOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgewotICAgICAgICAgICAgcm91bmRJbmNyZW1lbnQgPSByb3VuZE1hc2s7Ci0gICAgICAgICAgICBpZiAoIHpTaWduICkgewotICAgICAgICAgICAgICAgIGlmICggcm91bmRpbmdNb2RlID09IGZsb2F0X3JvdW5kX3VwICkgcm91bmRJbmNyZW1lbnQgPSAwOwotICAgICAgICAgICAgfQotICAgICAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgaWYgKCByb3VuZGluZ01vZGUgPT0gZmxvYXRfcm91bmRfZG93biApIHJvdW5kSW5jcmVtZW50ID0gMDsKLSAgICAgICAgICAgIH0KLSAgICAgICAgfQotICAgIH0KLSAgICByb3VuZEJpdHMgPSB6U2lnMCAmIHJvdW5kTWFzazsKLSAgICBpZiAoIDB4N0ZGRCA8PSAoYml0czMyKSAoIHpFeHAgLSAxICkgKSB7Ci0gICAgICAgIGlmICggICAgKCAweDdGRkUgPCB6RXhwICkKLSAgICAgICAgICAgICB8fCAoICggekV4cCA9PSAweDdGRkUgKSAmJiAoIHpTaWcwICsgcm91bmRJbmNyZW1lbnQgPCB6U2lnMCApICkKLSAgICAgICAgICAgKSB7Ci0gICAgICAgICAgICBnb3RvIG92ZXJmbG93OwotICAgICAgICB9Ci0gICAgICAgIGlmICggekV4cCA8PSAwICkgewotICAgICAgICAgICAgaXNUaW55ID0KLSAgICAgICAgICAgICAgICAgICAoIGZsb2F0X2RldGVjdF90aW5pbmVzcyA9PSBmbG9hdF90aW5pbmVzc19iZWZvcmVfcm91bmRpbmcgKQotICAgICAgICAgICAgICAgIHx8ICggekV4cCA8IDAgKQotICAgICAgICAgICAgICAgIHx8ICggelNpZzAgPD0gelNpZzAgKyByb3VuZEluY3JlbWVudCApOwotICAgICAgICAgICAgc2hpZnQ2NFJpZ2h0SmFtbWluZyggelNpZzAsIDEgLSB6RXhwLCAmelNpZzAgKTsKLSAgICAgICAgICAgIHpFeHAgPSAwOwotICAgICAgICAgICAgcm91bmRCaXRzID0gelNpZzAgJiByb3VuZE1hc2s7Ci0gICAgICAgICAgICBpZiAoIGlzVGlueSAmJiByb3VuZEJpdHMgKSBmbG9hdF9yYWlzZSggZmxvYXRfZmxhZ191bmRlcmZsb3cgKTsKLSAgICAgICAgICAgIGlmICggcm91bmRCaXRzICkgZmxvYXRfZXhjZXB0aW9uX2ZsYWdzIHw9IGZsb2F0X2ZsYWdfaW5leGFjdDsKLSAgICAgICAgICAgIHpTaWcwICs9IHJvdW5kSW5jcmVtZW50OwotICAgICAgICAgICAgaWYgKCAoc2JpdHM2NCkgelNpZzAgPCAwICkgekV4cCA9IDE7Ci0gICAgICAgICAgICByb3VuZEluY3JlbWVudCA9IHJvdW5kTWFzayArIDE7Ci0gICAgICAgICAgICBpZiAoIHJvdW5kTmVhcmVzdEV2ZW4gJiYgKCByb3VuZEJpdHM8PDEgPT0gcm91bmRJbmNyZW1lbnQgK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ICAgICAgICAgICBpZiAoIHpTaWduICkgewotICAgICAgICAgICAgICAgIGluY3JlbWVudCA9ICggcm91bmRpbmdNb2RlID09IGZsb2F0X3JvdW5kX2Rvd24gKSAmJiB6U2lnMTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgIGluY3JlbWVudCA9ICggcm91bmRpbmdNb2RlID09IGZsb2F0X3JvdW5kX3VwICkgJiYgelNpZzE7Ci0gICAgICAgICAgICB9Ci0gICAgICAgIH0KLSAgICB9Ci0gICAgaWYgKCAweDdGRkQgPD0gKGJpdHMzMikgKCB6RXhwIC0gMSApICkgewotICAgICAgICBpZiAoICAgICggMHg3RkZFIDwgekV4cCApCi0gICAgICAgICAgICAgfHwgKCAgICAoIHpFeHAgPT0gMHg3RkZFICkKLSAgICAgICAgICAgICAgICAgICYmICggelNpZzAgPT0gTElUNjQoIDB4RkZGRkZGRkZGRkZGRkZGRiApICkKLSAgICAgICAgICAgICAgICAgICYmIGluY3JlbWVudAotICAgICAgICAgICAgICAgICkKLSAgICAgICAgICAgKSB7Ci0gICAgICAgICAgICByb3VuZE1hc2sgPSAwOwotIG92ZXJmbG93OgotICAgICAgICAgICAgZmxvYXRfcmFpc2UoIGZsb2F0X2ZsYWdfb3ZlcmZsb3cgfCBmbG9hdF9mbGFnX2luZXhhY3QgKTsKLSAgICAgICAgICAgIGlmICggICAgKCByb3VuZGluZ01vZGUgPT0gZmxvYXRfcm91bmRfdG9femVybyApCi0gICAgICAgICAgICAgICAgIHx8ICggelNpZ24gJiYgKCByb3VuZGluZ01vZGUgPT0gZmxvYXRfcm91bmRfdXAgKSApCi0gICAgICAgICAgICAgICAgIHx8ICggISB6U2lnbiAmJiAoIHJvdW5kaW5nTW9kZSA9PSBmbG9hdF9yb3VuZF9kb3duICkgKQotICAgICAgICAgICAgICAgKSB7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIHBhY2tGbG9hdHg4MCggelNpZ24sIDB4N0ZGRSwgfiByb3VuZE1hc2sgKTsKLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIHJldHVybiBwYWNrRmxvYXR4ODAoIHpTaWduLCAweDdGRkYsIExJVDY0KCAweDgwMDAwMDAwMDAwMDAwMDAgKSApOwotICAgICAgICB9Ci0gICAgICAgIGlmICggekV4cCA8PSAwICkgewotICAgICAgICAgICAgaXNUaW55ID0KLSAgICAgICAgICAgICAgICAgICAoIGZsb2F0X2RldGVjdF90aW5pbmVzcyA9PSBmbG9hdF90aW5pbmVzc19iZWZvcmVfcm91bmRpbmcgKQotICAgICAgICAgICAgICAgIHx8ICggekV4cCA8IDAgKQotICAgICAgICAgICAgICAgIHx8ICEgaW5jcmVtZW50Ci0gICAgICAgICAgICAgICAgfHwgKCB6U2lnMCA8IExJVDY0KCAweEZGRkZGRkZGRkZGRkZGRkYgKSApOwotICAgICAgICAgICAgc2hpZnQ2NEV4dHJhUmlnaHRKYW1taW5nKCB6U2lnMCwgelNpZzEsIDEgLSB6RXhwLCAmelNpZzAsICZ6U2lnMSApOwotICAgICAgICAgICAgekV4cCA9IDA7Ci0gICAgICAgICAgICBpZiAoIGlzVGlueSAmJiB6U2lnMSApIGZsb2F0X3JhaXNlKCBmbG9hdF9mbGFnX3VuZGVyZmxvdyApOwotICAgICAgICAgICAgaWYgKCB6U2lnMSApIGZsb2F0X2V4Y2VwdGlvbl9mbGFncyB8PSBmbG9hdF9mbGFnX2luZXhhY3Q7Ci0gICAgICAgICAgICBpZiAoIHJvdW5kTmVhcmVzdEV2ZW4gKSB7Ci0gICAgICAgICAgICAgICAgaW5jcmVtZW50ID0gKCAoc2JpdHM2NCkgelNpZzEgPCAwICk7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlIHsKLSAgICAgICAgICAgICAgICBpZiAoIHpTaWduICkgewotICAgICAgICAgICAgICAgICAgICBpbmNyZW1lbnQgPSAoIHJvdW5kaW5nTW9kZSA9PSBmbG9hdF9yb3VuZF9kb3duICkgJiYgelNpZzE7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVsc2UgewotICAgICAgICAgICAgICAgICAgICBpbmNyZW1lbnQgPSAoIHJvdW5kaW5nTW9kZSA9PSBmbG9hdF9yb3VuZF91cCApICYmIHpTaWcxOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0KLSAgICAgICAgICAgIGlmICggaW5jcmVtZW50ICkgewotICAgICAgICAgICAgICAgICsrelNpZzA7Ci0gICAgICAgICAgICAgICAgelNpZzAgJj0gfiAoICggelNpZzEgKyB6U2lnMSA9PSAwICkgJiByb3VuZE5lYXJlc3RFdmVuICk7Ci0gICAgICAgICAgICAgICAgaWYgKCAoc2JpdHM2NCkgelNpZzAgPCAwICkgekV4cCA9IDE7Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICByZXR1cm4gcGFja0Zsb2F0eDgwKCB6U2lnbiwgekV4cCwgelNpZzAgKTsKLSAgICAgICAgfQotICAgIH0KLSAgICBpZiAoIHpTaWcxICkgZmxvYXRfZXhjZXB0aW9uX2ZsYWdzIHw9IGZsb2F0X2ZsYWdfaW5leGFjdDsKLSAgICBpZiAoIGluY3JlbWVudCApIHsKLSAgICAgICAgKyt6U2lnMDsKLSAgICAgICAgaWYgKCB6U2lnMCA9PSAwICkgewotICAgICAgICAgICAgKyt6RXhwOwotICAgICAgICAgICAgelNpZzAgPSBMSVQ2NCggMHg4MDAwMDAwMDAwMDAwMDAwICk7Ci0gICAgICAgIH0KLSAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICB6U2lnMCAmPSB+ICggKCB6U2lnMSArIHpTaWcxID09IDAgKSAmIHJvdW5kTmVhcmVzdEV2ZW4gKTsKLSAgICAgICAgfQotICAgIH0KLSAgICBlbHNlIHsKLSAgICAgICAgaWYgKCB6U2lnMCA9PSAwICkgekV4cCA9IDA7Ci0gICAgfQotICAgIAotICAgIHJldHVybiBwYWNrRmxvYXR4ODAoIHpTaWduLCB6RXhwLCB6U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ZzY0OwotICAgIGJpdHMzMiB6U2lnOwotCi0gICAgYVNpZyA9IGV4dHJhY3RGbG9hdDMyRnJhYyggYSApOwotICAgIGFFeHAgPSBleHRyYWN0RmxvYXQzMkV4cCggYSApOwotICAgIGFTaWduID0gZXh0cmFjdEZsb2F0MzJTaWduKCBhICk7Ci0gICAgYlNpZyA9IGV4dHJhY3RGbG9hdDMyRnJhYyggYiApOwotICAgIGJFeHAgPSBleHRyYWN0RmxvYXQzMkV4cCggYiApOwotICAgIGJTaWduID0gZXh0cmFjdEZsb2F0MzJTaWduKCBiICk7Ci0gICAgelNpZ24gPSBhU2lnbiBeIGJTaWduOwotICAgIGlmICggYUV4cCA9PSAweEZGICkgewotICAgICAgICBpZiAoIGFTaWcgfHwgKCAoIGJFeHAgPT0gMHhGRiApICYmIGJTaWcgKSApIHsKLSAgICAgICAgICAgIHJldHVybiBwcm9wYWdhdGVGbG9hdDMyTmFOKCBhLCBiICk7Ci0gICAgICAgIH0KLSAgICAgICAgaWYgKCAoIGJFeHAgfCBiU2lnICkgPT0gMCApIHsKLSAgICAgICAgICAgIGZsb2F0X3JhaXNlKCBmbG9hdF9mbGFnX2ludmFsaWQgKTsKLSAgICAgICAgICAgIHJldHVybiBmbG9hdDMyX2RlZmF1bHRfbmFuOwotICAgICAgICB9Ci0gICAgICAgIHJldHVybiBwYWNrRmxvYXQzMiggelNpZ24sIDB4RkYsIDAgKTsKLSAgICB9Ci0gICAgaWYgKCBiRXhwID09IDB4RkYgKSB7Ci0gICAgICAgIGlmICggYlNpZyApIHJldHVybiBwcm9wYWdhdGVGbG9hdDMyTmFOKCBhLCBiICk7Ci0gICAgICAgIGlmICggKCBhRXhwIHwgYVNpZyApID09IDAgKSB7Ci0gICAgICAgICAgICBmbG9hdF9yYWlzZSggZmxvYXRfZmxhZ19pbnZhbGlkICk7Ci0gICAgICAgICAgICByZXR1cm4gZmxvYXQzMl9kZWZhdWx0X25hbjsKLSAgICAgICAgfQotICAgICAgICByZXR1cm4g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bG9hdDMyU2lnbiggYSApOwotICAgIGlmICggYUV4cCA9PSAweEZGICkgewotICAgICAgICBpZiAoIGFTaWcgKSByZXR1cm4gcHJvcGFnYXRlRmxvYXQzMk5hTiggYSwgMCApOwotICAgICAgICBpZiAoICEgYVNpZ24gKSByZXR1cm4gYTsKLSAgICAgICAgZmxvYXRfcmFpc2UoIGZsb2F0X2ZsYWdfaW52YWxpZCApOwotICAgICAgICByZXR1cm4gZmxvYXQzMl9kZWZhdWx0X25hbjsKLSAgICB9Ci0gICAgaWYgKCBhU2lnbiApIHsKLSAgICAgICAgaWYgKCAoIGFFeHAgfCBhU2lnICkgPT0gMCApIHJldHVybiBhOwotICAgICAgICBmbG9hdF9yYWlzZSggZmxvYXRfZmxhZ19pbnZhbGlkICk7Ci0gICAgICAgIHJldHVybiBmbG9hdDMyX2RlZmF1bHRfbmFuOwotICAgIH0KLSAgICBpZiAoIGFFeHAgPT0gMCApIHsKLSAgICAgICAgaWYgKCBhU2lnID09IDAgKSByZXR1cm4gMDsKLSAgICAgICAgbm9ybWFsaXplRmxvYXQzMlN1Ym5vcm1hbCggYVNpZywgJmFFeHAsICZhU2lnICk7Ci0gICAgfQotICAgIHpFeHAgPSAoICggYUV4cCAtIDB4N0YgKT4+MSApICsgMHg3RTsKLSAgICBhU2lnID0gKCBhU2lnIHwgMHgwMDgwMDAwMCApPDw4OwotICAgIHpTaWcgPSBlc3RpbWF0ZVNxcnQzMiggYUV4cCwgYVNpZyApICsgMjsKLSAgICBpZiAoICggelNpZyAmIDB4N0YgKSA8PSA1ICkgewotICAgICAgICBpZiAoIHpTaWcgPCAyICkgewotICAgICAgICAgICAgelNpZyA9IDB4RkZGRkZGRkY7Ci0gICAgICAgIH0KLSAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICBhU2lnID4+PSBhRXhwICYgMTsKLSAgICAgICAgICAgIHRlcm0gPSAoIChiaXRzNjQpIHpTaWcgKSAqIHpTaWc7Ci0gICAgICAgICAgICByZW0gPSAoIC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9IGV4dHJhY3RGbG9hdDY0RnJhYyggYiApOwotICAgIGJFeHAgPSBleHRyYWN0RmxvYXQ2NEV4cCggYiApOwotICAgIGV4cERpZmYgPSBhRXhwIC0gYkV4cDsKLSAgICBhU2lnIDw8PSA5OwotICAgIGJTaWcgPDw9IDk7Ci0gICAgaWYgKCAwIDwgZXhwRGlmZiApIHsKLSAgICAgICAgaWYgKCBhRXhwID09IDB4N0ZGICkgewotICAgICAgICAgICAgaWYgKCBhU2lnICkgcmV0dXJuIHByb3BhZ2F0ZUZsb2F0NjROYU4oIGEsIGIgKTsKLSAgICAgICAgICAgIHJldHVybiBhOwotICAgICAgICB9Ci0gICAgICAgIGlmICggYkV4cCA9PSAwICkgewotICAgICAgICAgICAgLS1leHBEaWZmOwotICAgICAgICB9Ci0gICAgICAgIGVsc2UgewotICAgICAgICAgICAgYlNpZyB8PSBMSVQ2NCggMHgyMDAwMDAwMDAwMDAwMDAwICk7Ci0gICAgICAgIH0KLSAgICAgICAgc2hpZnQ2NFJpZ2h0SmFtbWluZyggYlNpZywgZXhwRGlmZiwgJmJTaWcgKTsKLSAgICAgICAgekV4cCA9IGFFeHA7Ci0gICAgfQotICAgIGVsc2UgaWYgKCBleHBEaWZmIDwgMCApIHsKLSAgICAgICAgaWYgKCBiRXhwID09IDB4N0ZGICkgewotICAgICAgICAgICAgaWYgKCBiU2lnICkgcmV0dXJuIHByb3BhZ2F0ZUZsb2F0NjROYU4oIGEsIGIgKTsKLSAgICAgICAgICAgIHJldHVybiBwYWNrRmxvYXQ2NCggelNpZ24sIDB4N0ZGLCAwICk7Ci0gICAgICAgIH0KLSAgICAgICAgaWYgKCBhRXhwID09IDAgKSB7Ci0gICAgICAgICAgICArK2V4cERpZmY7Ci0gICAgICAgIH0KLSAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICBhU2lnIHw9IExJVDY0KCAweDIwMDAwMDAwMDAwMDAwMDAgKTsKLSAgICAgICAgfQotICAgICAgICBzaGlmdDY0UmlnaHR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NjQgbGFzdEJpdE1hc2ssIHJvdW5kQml0c01hc2s7Ci0gICAgaW50OCByb3VuZGluZ01vZGU7Ci0gICAgZmxvYXR4ODAgejsKLQotICAgIGFFeHAgPSBleHRyYWN0RmxvYXR4ODBFeHAoIGEgKTsKLSAgICBpZiAoIDB4NDAzRSA8PSBhRXhwICkgewotICAgICAgICBpZiAoICggYUV4cCA9PSAweDdGRkYgKSAmJiAoYml0czY0KSAoIGV4dHJhY3RGbG9hdHg4MEZyYWMoIGEgKTw8MSApICkgewotICAgICAgICAgICAgcmV0dXJuIHByb3BhZ2F0ZUZsb2F0eDgwTmFOKCBhLCBhICk7Ci0gICAgICAgIH0KLSAgICAgICAgcmV0dXJuIGE7Ci0gICAgfQotICAgIGlmICggYUV4cCA8PSAweDNGRkUgKSB7Ci0gICAgICAgIGlmICggICAgKCBhRXhwID09IDAgKQotICAgICAgICAgICAgICYmICggKGJpdHM2NCkgKCBleHRyYWN0RmxvYXR4ODBGcmFjKCBhICk8PDEgKSA9PSAwICkgKSB7Ci0gICAgICAgICAgICByZXR1cm4gYTsKLSAgICAgICAgfQotICAgICAgICBmbG9hdF9leGNlcHRpb25fZmxhZ3MgfD0gZmxvYXRfZmxhZ19pbmV4YWN0OwotICAgICAgICBhU2lnbiA9IGV4dHJhY3RGbG9hdHg4MFNpZ24oIGEgKTsKLSAgICAgICAgc3dpdGNoICggZmxvYXRfcm91bmRpbmdfbW9kZSApIHsKLSAgICAgICAgIGNhc2UgZmxvYXRfcm91bmRfbmVhcmVzdF9ldmVuOgotICAgICAgICAgICAgaWYgKCAoIGFFeHAgPT0gMHgzRkZFICkgJiYgKGJpdHM2NCkgKCBleHRyYWN0RmxvYXR4ODBGcmFjKCBhICk8PDEgKQotICAgICAgICAgICAgICAgKSB7Ci0gICAgICAgICAgICAgICAgcmV0dXJuCi0gICAgICAgICAgICAgICAgICAgIHBhY2tGbG9hdHg4MCggYVNpZ24sIDB4M0ZGRiwgTElUNjQoIDB4ODAwMDAwMDA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S0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSovCi1mbGFnIGZsb2F0eDgwX2x0KCBmbG9hdHg4MCBhLCBmbG9hdHg4MCBiICkKLXsKLSAgICBmbGFnIGFTaWduLCBiU2lnbjsKLQotICAgIGlmICggICAgKCAgICAoIGV4dHJhY3RGbG9hdHg4MEV4cCggYSApID09IDB4N0ZGRiApCi0gICAgICAgICAgICAgICYmIChiaXRzNjQpICggZXh0cmFjdEZsb2F0eDgwRnJhYyggYSApPDwxICkgKQotICAgICAgICAgfHwgKCAgICAoIGV4dHJhY3RGbG9hdHg4MEV4cCggYiApID09IDB4N0ZGRiApCi0gICAgICAgICAgICAgICYmIChiaXRzNjQpICggZXh0cmFjdEZsb2F0eDgwRnJhYyggYiApPDwxICkgKQotICAgICAgICkgewotICAgICAgICBmbG9hdF9yYWlzZSggZmxvYXRfZmxhZ19pbnZhbGlkICk7Ci0gICAgICAgIHJldHVybiAwOwotICAgIH0KLSAgICBhU2lnbiA9IGV4dHJhY3RGbG9hdHg4MFNpZ24oIGEgKTsKLSAgICBiU2lnbiA9IGV4dHJhY3RGbG9hdHg4MFNpZ24oIGIgKTsKLSAgICBpZiAoIGFTaWduICE9IGJTaWduICkgewotICAgICAgICByZXR1cm4KLSAgICAgICAgICAgICAgIGFTaWduCi0gICAgICAgICAgICAmJiAoICAgICggKCAoYml0czE2KSAoICggYS5oaWdoIHwgYi5oaWdoICk8PDEgKSApIHwgYS5sb3cgfCBiLmxvdyApCi0gICAgICAgICAgICAgICAgICE9IDAgKTsKLSAgICB9Ci0gICAgcmV0dXJuCi0gICAgICAgICAgYVNpZ24gPyBsdDEyOCggYi5oaWdoLCBiLmxvdywgYS5oaWdoLCBhLmxvdyApCi0gICAgICAgIDogbHQxMjgoIGEuaGlnaCwgYS5sb3csIGIuaGlnaCwgYi5sb3cgKTsKLQotfQotCi0vKgotLS0tLS0tLS0tLS0tLS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KLSAgICAgICAgICAgICAgJiYgKGJpdHM2NCkgKCBleHRyYWN0RmxvYXR4ODBGcmFjKCBhICk8PDEgKSApCi0gICAgICAgICB8fCAoICAgICggZXh0cmFjdEZsb2F0eDgwRXhwKCBiICkgPT0gMHg3RkZGICkKLSAgICAgICAgICAgICAgJiYgKGJpdHM2NCkgKCBleHRyYWN0RmxvYXR4ODBGcmFjKCBiICk8PDEgKSApCi0gICAgICAgKSB7Ci0gICAgICAgIGlmICggICAgZmxvYXR4ODBfaXNfc2lnbmFsaW5nX25hbiggYSApCi0gICAgICAgICAgICAgfHwgZmxvYXR4ODBfaXNfc2lnbmFsaW5nX25hbiggYiApICkgewotICAgICAgICAgICAgZmxvYXRfcmFpc2UoIGZsb2F0X2ZsYWdfaW52YWxpZCApOwotICAgICAgICB9Ci0gICAgICAgIHJldHVybiAwOwotICAgIH0KLSAgICBhU2lnbiA9IGV4dHJhY3RGbG9hdHg4MFNpZ24oIGEgKTsKLSAgICBiU2lnbiA9IGV4dHJhY3RGbG9hdHg4MFNpZ24oIGIgKTsKLSAgICBpZiAoIGFTaWduICE9IGJTaWduICkgewotICAgICAgICByZXR1cm4KLSAgICAgICAgICAgICAgIGFTaWduCi0gICAgICAgICAgICB8fCAoICAgICggKCAoYml0czE2KSAoICggYS5oaWdoIHwgYi5oaWdoICk8PDEgKSApIHwgYS5sb3cgfCBiLmxvdyApCi0gICAgICAgICAgICAgICAgID09IDAgKTsKLSAgICB9Ci0gICAgcmV0dXJuCi0gICAgICAgICAgYVNpZ24gPyBsZTEyOCggYi5oaWdoLCBiLmxvdywgYS5oaWdoLCBhLmxvdyApCi0gICAgICAgIDogbGUxMjgoIGEuaGlnaCwgYS5sb3csIGIuaGlnaCwgYi5sb3cgKTsKLQotfQotCi0vKgotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQotUmV0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ludmFsaWQgKTsKLSAgICAgICAgfQotICAgICAgICByZXR1cm4gMDsKLSAgICB9Ci0gICAgYVNpZ24gPSBleHRyYWN0RmxvYXR4ODBTaWduKCBhICk7Ci0gICAgYlNpZ24gPSBleHRyYWN0RmxvYXR4ODBTaWduKCBiICk7Ci0gICAgaWYgKCBhU2lnbiAhPSBiU2lnbiApIHsKLSAgICAgICAgcmV0dXJuCi0gICAgICAgICAgICAgICBhU2lnbgotICAgICAgICAgICAgJiYgKCAgICAoICggKGJpdHMxNikgKCAoIGEuaGlnaCB8IGIuaGlnaCApPDwxICkgKSB8IGEubG93IHwgYi5sb3cgKQotICAgICAgICAgICAgICAgICAhPSAwICk7Ci0gICAgfQotICAgIHJldHVybgotICAgICAgICAgIGFTaWduID8gbHQxMjgoIGIuaGlnaCwgYi5sb3csIGEuaGlnaCwgYS5sb3cgKQotICAgICAgICA6IGx0MTI4KCBhLmhpZ2gsIGEubG93LCBiLmhpZ2gsIGIubG93ICk7Ci0KLX0KLQotI2VuZGlmCi0KZGlmZiAtLWdpdCBhL2FyY2gvYXJtMjYvbndmcGUvc29mdGZsb2F0LmggYi9hcmNoL2FybTI2L253ZnBlL3NvZnRmbG9hdC5oCmRlbGV0ZWQgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAyMmMyMTkzLi4wMDAwMDAwCi0tLSBhL2FyY2gvYXJtMjYvbndmcGUvc29mdGZsb2F0LmgKKysrIC9kZXYvbnVsbApAQCAtMSwyMzIgKzAsMCBAQAotCi0vKgotPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotCi1UaGlzIEMgaGVhZGVyIGZpbGUgaXMgcGFydCBvZiB0aGUgU29mdEZsb2F0IElFQy9JRUVFIEZsb2F0aW5nLXBvaW50Ci1Bcml0aG1ldGljIFBhY2thZ2UsIFJlbGVhc2UgMi4KLQotV3JpdHRlbiBieSBKb2huIFIuIEhhdXNlci4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Lmg+Ci0KLSNkZWZpbmUgYXRvbWljX3JlYWQodikgKCh2KS0+Y291bnRlcikKLSNkZWZpbmUgYXRvbWljX3NldCh2LGkpCSgoKHYpLT5jb3VudGVyKSA9IChpKSkKLQotc3RhdGljIGlubGluZSBpbnQgYXRvbWljX2FkZF9yZXR1cm4oaW50IGksIGF0b21pY190ICp2KQotewotICAgICAgICB1bnNpZ25lZCBsb25nIGZsYWdzOwotICAgICAgICBpbnQgdmFsOwotCi0gICAgICAgIGxvY2FsX2lycV9zYXZlKGZsYWdzKTsKLSAgICAgICAgdmFsID0gdi0+Y291bnRlcjsKLSAgICAgICAgdi0+Y291bnRlciA9IHZhbCArPSBpOwotICAgICAgICBsb2NhbF9pcnFfcmVzdG9yZShmbGFncyk7Ci0KLSAgICAgICAgcmV0dXJuIHZhbDsKLX0KLQotc3RhdGljIGlubGluZSBpbnQgYXRvbWljX3N1Yl9yZXR1cm4oaW50IGksIGF0b21pY190ICp2KQotewotICAgICAgICB1bnNpZ25lZCBsb25nIGZsYWdzOwotICAgICAgICBpbnQgdmFsOwotCi0gICAgICAgIGxvY2FsX2lycV9zYXZlKGZsYWdzKTsKLSAgICAgICAgdmFsID0gdi0+Y291bnRlcjsKLSAgICAgICAgdi0+Y291bnRlciA9IHZhbCAtPSBpOwotICAgICAgICBsb2NhbF9pcnFfcmVzdG9yZShmbGFncyk7Ci0KLSAgICAgICAgcmV0dXJuIHZhbDsKLX0KLQotc3RhdGljIGlubGluZSBpbnQgYXRvbWljX2NtcHhjaGcoYXRvbWljX3QgKnYsIGludCBvbGQsIGludCBuZXcpCi17Ci0JaW50IHJldDsKLQl1bnNpZ25lZCBsb25nIGZsYWdzOwotCi0JbG9jYWxfaXJxX3NhdmUoZmxhZ3MpOwotCXJldCA9IHYtPmNvdW50ZXI7Ci0JaWYgKGxpa2VseShyZXQgPT0gb2xkKSkKLQkJdi0+Y291bnRlciA9IG5ldzsKLQlsb2NhbF9pcnFfcmVzdG9yZShmbGFncyk7Ci0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yZXNpZHVlKShkbWFjaF90LCBkbWFfdCAqKTsgICAgICAgICAgIC8qIG9wdGlvbmFsICovCi0gICAgICAgIGludCAgICAgKCpzZXRzcGVlZCkoZG1hY2hfdCwgZG1hX3QgKiwgaW50KTsgICAgIC8qIG9wdGlvbmFsICovCi0gICAgICAgIGNoYXIgICAgKnR5cGU7Ci19OwotCi1zdHJ1Y3QgZG1hX3N0cnVjdCB7Ci0gICAgICAgIHN0cnVjdCBzY2F0dGVybGlzdCBidWY7ICAgICAgICAgLyogc2luZ2xlIERNQSAgICAgICAgICAgICAgICAgICAqLwotICAgICAgICBpbnQgICAgICAgICAgICAgc2djb3VudDsgICAgICAgIC8qIG51bWJlciBvZiBETUEgU0cgICAgICAgICAgICAgKi8KLSAgICAgICAgc3RydWN0IHNjYXR0ZXJsaXN0ICpzZzsgICAgICAgICAvKiBETUEgU2NhdHRlci1HYXRoZXIgTGlzdCAgICAgICovCi0KLSAgICAgICAgdW5zaWduZWQgaW50ICAgIGFjdGl2ZToxOyAgICAgICAvKiBUcmFuc2ZlciBhY3RpdmUgICAgICAgICAgICAgICovCi0gICAgICAgIHVuc2lnbmVkIGludCAgICBpbnZhbGlkOjE7ICAgICAgLyogQWRkcmVzcy9Db3VudCBjaGFuZ2VkICAgICAgICAqLwotICAgICAgICB1bnNpZ25lZCBpbnQgICAgdXNpbmdfc2c6MTsgICAgIC8qIHVzaW5nIHNjYXR0ZXIgbGlzdD8gICAgICAgICAgKi8KLSAgICAgICAgZG1hbW9kZV90ICAgICAgIGRtYV9tb2RlOyAgICAgICAvKiBETUEgbW9kZSAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgIGludCAgICAgICAgICAgICBzcGVlZDsgICAgICAgICAgLyogRE1BIHNwZWVkICAgICAgICAgICAgICAgICAgICAqLwotCi0gICAgICAgIHVuc2lnbmVkIGludCAgICBsb2NrOyAgICAgICAgICAgLyogRGV2aWNlIGlzIGFsbG9jYXRlZCAgICAgICAgICAqLwotICAgICAgICBjb25zdCBjaGFyICAgICAgKmRldmljZV9pZDsgICAgIC8qIERldmljZSBuYW1lICAgICAgICAgICAgICAgICAgKi8KLQotICAgICAgICB1bnNpZ25lZCBpbnQgICAgZG1hX2Jhc2U7ICAgICAgIC8qIENvbnRyb2xsZXIgYmFzZSBhZGRyZXNzICAgICAgKi8KLSAgICAgICAgaW50ICAgICAgICAgICAgIGRtYV9pcnE7ICAgICAgICAvKiBDb250cm9sbGVyIElSUSAgICAgICAgICAgICAgICovCi0gICAgICAgIGludCAgICAgICAgICAgICBzdGF0ZTsgICAgICAgICAgLyogQ29udHJvbGxlciBzdGF0ZSAgICAgICAgICAgICAqLwotICAgICAgICBzdHJ1Y3Qgc2NhdHRlcmxpc3QgY3VyX3NnOyAgICAgIC8qIEN1cnJlbnQgY29udHJvbGxlciBidWZmZXIgICAgKi8KLQotICAgICAgICBzdHJ1Y3QgZG1hX29wcyAgKmRfb3BzOwotfTsKLQotLyogUHJvdG90eXBlOiB2b2lkIGFyY2hfZG1hX2luaXQoZG1hKQotICogUHVycG9zZSAgOiBJbml0aWFsaXNlIGFyY2hpdGVjdHVyZSBzcGVjaWZpYyBETUEKLSAqIFBhcmFtcyAgIDogZG1hIC0gcG9pbnRlciB0byBhcnJheSBvZiBETUEgc3RydWN0dXJlcwotICovCi1leHRlcm4gdm9pZCBhcmNoX2RtYV9pbml0KGRtYV90ICpkbWEpOwotCi1leHRlcm4gdm9pZCBpc2FfaW5pdF9kbWEoZG1hX3QgKmRtYSk7Ci0KLQotI2RlZmluZSBNQVhfRE1BX0FERFJFU1MgICAgICAgICAweDAzMDAwMDAwCi0jZGVmaW5lIE1BWF9ETUFfQ0hBTk5FTFMgICAgICAgIDMKLQotLyogQVJDICovCi0jZGVmaW5lIERNQV9WSVJUVUFMX0ZMT1BQWTAgICAgIDAKLSNkZWZpbmUgRE1BX1ZJUlRVQUxfRkxPUFBZMSAgICAgMQotI2RlZmluZSBETUFfVklSVFVBTF9TT1VORCAgICAgICAyCi0KLS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ZCBpbnQgICAqKShhKSkKLQotCi0vKgotICogQmFkIHJlYWQvd3JpdGUgYWNjZXNzZXMuLi4KLSAqLwotZXh0ZXJuIHZvaWQgX19yZWFkd3JpdGVfYnVnKGNvbnN0IGNoYXIgKmZuKTsKLQotLyoKLSAqIE5vdywgcGljayB1cCB0aGUgbWFjaGluZS1kZWZpbmVkIElPIGRlZmluaXRpb25zCi0gKi8KLQotI2RlZmluZSBJT19TUEFDRV9MSU1JVCAweGZmZmZmZmZmCi0KLS8qCi0gKiBHQ0MgaXMgdG90YWxseSBjcmFwIGF0IGxvYWRpbmcvc3RvcmluZyBkYXRhLiAgV2UgdHJ5IHRvIHBlcnN1YWRlIGl0Ci0gKiB0byBkbyB0aGUgcmlnaHQgdGhpbmcgYnkgdXNpbmcgdGhlc2Ugd2hlcmVldmVyIHBvc3NpYmxlIGluc3RlYWQgb2YKLSAqIHRoZSBhYm92ZS4KLSAqLwotI2RlZmluZSBfX2FyY2hfYmFzZV9nZXRiKGIsbykgICAgICAgICAgICAgICAgICAgXAotICh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB1bnNpZ25lZCBpbnQgdiwgciA9IChiKTsgICAgICAgICAgICAgICAgXAotICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyggICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICJsZHJiICAgJTAsIFslMSwgJTJdIiAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIDogIj1yIiAodikgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIDogInIiIChyKSwgIklyIiAobykpOyAgICAgICAgICAgXAotICAgICAgICB2OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotIH0pCi0KLSNkZWZpbmUgX19hcmNoX2Jhc2VfZ2V0bChiLG8pICAgICAgICAgICAgICAgICAgIFwKLSAoeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdW5zaWduZWQgaW50IHYsIHIgPSAoYik7ICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAibGRyICAgICUwLCBbJTEsICUyXSIgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6ICI9ciIgKHYpICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6ICJyIiAociksICJJciIgKG8pKTsgICAgICAgICAgIFwKLSAgICAgICAgdjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSB9KQotCi0jZGVmaW5lIF9fYXJjaF9iYXNlX3B1dGIodixiLG8pICAgICAgICAgICAgICAgICBcCi0gKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHVuc2lnbmVkIGludCByID0gKGIpOyAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgInN0cmIgICAlMCwgWyUxLCAlMl0iICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgOiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgOiAiciIgKHYpLCAiciIgKHIpLCAiSXIiIChvKSk7ICBcCi0gfSkKLQotI2RlZmluZSBfX2FyY2hfYmFzZV9wdXRsKHYsYixvKSAgICAgICAgICAgICAgICAgXAotICh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB1bnNpZ25lZCBpbnQgciA9IChiKTsgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyggICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICJzdHIgICAgJTAsIF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slMCwgJTIsIGxzbCAjMl0gICAgQCBvdXRiIgotICAgICAgICA6ICI9JnIiICh0ZW1wKQotICAgICAgICA6ICJyIiAodmFsdWUpLCAiciIgKHBvcnQpLCAiSXIiIChQQ0lPX0JBU0UgLSBJT19CQVNFKSwgIklyIiAoSU9fQkFTRSkKLSAgICAgICAgOiAiY2MiKTsKLX0KLQotc3RhdGljIGlubGluZSB2b2lkIF9fb3V0dyAodW5zaWduZWQgaW50IHZhbHVlLCB1bnNpZ25lZCBpbnQgcG9ydCkKLXsKLSAgICAgICAgdW5zaWduZWQgbG9uZyB0ZW1wOwotICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXygKLSAgICAgICAgInRzdCAgICAlMiwgIzB4ODAwMDAwMDBcblx0IgotICAgICAgICAibW92ICAgICUwLCAlNFxuXHQiCi0gICAgICAgICJhZGRlcSAgJTAsICUwLCAlM1xuXHQiCi0gICAgICAgICJzdHIgICAgJTEsIFslMCwgJTIsIGxzbCAjMl0gICAgQCBvdXR3IgotICAgICAgICA6ICI9JnIiICh0ZW1wKQotICAgICAgICA6ICJyIiAodmFsdWV8dmFsdWU8PDE2KSwgInIiIChwb3J0KSwgIklyIiAoUENJT19CQVNFIC0gSU9fQkFTRSksICJJciIgKElPX0JBU0UpCi0gICAgICAgIDogImNjIik7Ci19Ci0KLXN0YXRpYyBpbmxpbmUgdm9pZCBfX291dGwgKHVuc2lnbmVkIGludCB2YWx1ZSwgdW5zaWduZWQgaW50IHBvcnQpCi17Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgdGVtcDsKLSAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oCi0gICAgICAgICJ0c3QgICAgJTIsICMweDgwMDAwMDAwXG5cdCIKLSAgICAgICAgIm1vdiAgICAlMCwgJTRcblx0IgotICAgICAgICAiYWRkZXEgICUwLCAlMCwgJTNcblx0IgotICAgICAgICAic3RyICAgICUxLCBbJTAsICUyLCBsc2wgIzJdICAgIEAgb3V0bCIKLSAgICAgICAgOiAiPSZyIiAodGVtcCkKLSAgICAgICAgOiAiciIgKHZhbHVlKSwgInIiIChwb3J0KSwgIklyIiAoUENJT19CQVNFIC0gSU9fQkFTRSksICJJciIgKElPX0JBU0UpCi0gICAgICAgIDogImNjIik7Ci19Ci0KLSNkZWZpbmUgREVDTEFSRV9EWU5fSU4oc3osZm5zdWZmaXgsaW5zdHIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotc3RhdGljIGlubGluZSB1bnNpZ25lZCBzeiBfX2luIyNmbnN1ZmZpeCAodW5zaWduZWQgaW50IHBvcnQpICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHVuc2lnbmVkIGxvbmcgdGVtcCwgdmFsdWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAidHN0ICAgICUyLCAjMHg4MDAwMDAwMFxuXHQiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICJtb3YgICAgJTAsICU0XG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgImFkZGVxICAlMCwgJTAsICUzXG5cdCIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAibGRyIiBpbnN0ciAiICAgJTEsIFslMCwgJTIsIGxzbCAjMl0gICAgQCBpbiIgI2Zuc3VmZml4ICAgICAgICAgICAgICAgICBcCi0gICAgICAgIDogIj0mciIgKHRlbXApLCAiPXIiICh2YWx1ZSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgOiAiciIgKHBvcnQpLCAiSXIiIChQQ0lPX0JBU0UgLSBJT19CQVNFKSwgIklyIiAoSU9fQkFTRSkgICAgICAgICAgICAgICAgXAotICAgICAgICA6ICJjYyIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHJldHVybiAodW5zaWduZWQgc3opdmFsdWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0KLQotc3RhdGljIGlubGluZSB1bnNpZ25lZCBpbnQgX19pb2FkZHIgKHVuc2lnbmVkIGludCBwb3J0KSAgICAgICAgICAgICAgICAgXAoteyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGlmIChfX1BPUlRfUENJTyhwb3J0KSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICByZXR1cm4gKHVuc2lnbmVkIGludCkoUENJT19CQVNFICsgKHBvcnQgPDwgMikpOyAgICAgICAgICAgICAgICAgXAotICAgICAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgcmV0dXJuICh1bnNpZ25lZCBpbnQpKElPX0JBU0UgKyAocG9ydCA8PCAyKSk7ICAgICAgICAgICAgICAgICAgIFwKLX0KLQotI2RlZmluZSBERUNMQVJFX0lPKHN6LGZuc3VmZml4LGluc3RyKSAgIFwKLSAgICAgICAgREVDTEFSRV9EWU5fSU4oc3osZm5zdWZmaXgsaW5zdHIpCi0KLURFQ0xBUkVfSU8oY2hhcixiLCJiIikKLURFQ0xBUkVfSU8oc2hvcnQsdywiIikKLURFQ0xBUkVfSU8oaW50LGwsIiIpCi0KLSN1bmRlZiBERUNMQVJFX0lPCi0jdW5kZWYgREVDTEFSRV9EWU5fSU4KLQotLyoKLSAqIENvbnN0YW50IGFkZHJlc3MgSU8gZnVuY3Rpb25zCi0gKgotICogVGhlc2UgaGF2ZSB0byBiZSBtYWNyb3MgZm9yIHRoZSAnSicgY29uc3RyYWludCB0byB3b3JrIC0KLSAqICsvLTQwOTYgaW1tZWRpYXRlIG9wZXJhbmQuCi0gKi8KLSNkZWZpbmUgX19vdXRiYyh2YWx1ZSxwb3J0KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGlmIChfX1BPUlRfUENJTygocG9ydCkpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICJzdHJiICAgJTAsIFslMSwgJTJdICAgIEAgb3V0YmMiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgOiA6ICJyIiAodmFsdWUpLCAiciIgKFBDSU9fQkFTRSksICJKciIgKChwb3J0KSA8PCAyKSk7ICAgICAgICAgIFwKLSAgICAgICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgInN0cmIgICAlMCwgWyUxLCAlMl0gICAgQCBvdXRiYyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6IDogInIiICh2YWx1ZSksICJyIiAoSU9fQkFTRSksICJyIiAoKHBvcnQpIDw8IDIpKTsgICAgICAgICAgICAgXAotfSkKLQotI2RlZmluZSBfX2luYmMocG9ydCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0oeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdW5zaWduZWQgY2hhciByZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBpZiAoX19QT1JUX1BDSU8oKHBvcnQpKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAibGRyYiAgICUwLCBbJTEsICUyXSAgICBAIGluYmMiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIDogIj1yIiAocmVzdWx0KSA6ICJyIiAoUENJT19CQVNFKSwgIkpyIiAoKHBvcnQpIDw8IDIpKTsgICAgICAgICBcCi0gICAgICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICJsZHJiICAgJTAsIFslMSwgJTJdICAgIEAgaW5iYyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgOiAiPXIiIChyZXN1bHQpIDogInIiIChJT19CQVNFKSwgInIiICgocG9ydCkgPDwgMikpOyAgICAgICAgICAgIFwKLSAgICAgICAgcmVzdWx0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfSkKLQotI2RlZmluZSBfX291dHdjKHZhbHVlLHBvcnQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0oeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdW5zaWduZWQgbG9uZyB2ID0gdmFsdWU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBpZiAoX19QT1JUX1BDSU8oKHBvcnQpKSkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAic3RyICAgICUwLCBbJTEsICUyXSAgICBAIG91dHdjIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIDogOiAiciIgKHZ8djw8MTYpLCAiciIgKFBDSU9fQkFTRSksICJKciIgKChwb3J0KSA8PCAyKSk7ICAgICAgICBcCi0gICAgICAgIGVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICJzdHIgICAgJTAsIFslMSwgJTJdICAgIEAgb3V0d2MiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgOiA6ICJyIiAodnx2PDwxNiksICJyIiAoSU9fQkFTRSksICJyIiAoKHBvcnQpIDw8IDIpKTsgICAgICAgICAgIFwKLX0pCi0KLSNkZWZpbmUgX19pbndjKHBvcnQpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHVuc2lnbmVkIHNob3J0IHJlc3VsdDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgaWYgKF9fUE9SVF9QQ0lPKChwb3J0KSkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgImxkciAgICAlMCwgWyUxLCAlMl0gICAgQCBpbndjIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6ICI9ciIgKHJlc3VsdCkgOiAiciIgKFBDSU9fQkFTRSksICJKciIgKChwb3J0KSA8PCAyKSk7ICAgICAgICAgXAotICAgICAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAibGRyICAgICUwLCBbJTEsICUyXSAgICBAIGlud2MiICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIDogIj1yIiAocmVzdWx0KSA6ICJyIiAoSU9fQkFTRSksICJyIiAoKHBvcnQpIDw8IDIpKTsgICAgICAgICAgICBcCi0gICAgICAgIHJlc3VsdCAmIDB4ZmZmZjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0pCi0KLSNkZWZpbmUgX19vdXRsYyh2YWx1ZSxwb3J0KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHVuc2lnbmVkIGxvbmcgdiA9IHZhbHVlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgaWYgKF9fUE9SVF9QQ0lPKChwb3J0KSkpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgInN0ciAgICAlMCwgWyUxLCAlMl0gICAgQCBvdXRsYyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6IDogInIiICh2KSwgInIiIChQQ0lPX0JBU0UpLCAiSnIiICgocG9ydCkgPDwgMikpOyAgICAgICAgICAgICAgXAotICAgICAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAic3RyICAgICUwLCBbJTEsICUyXSAgICBAIG91dGxjIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIDogOiAiciIgKHYpLCAiciIgKElPX0JBU0UpLCAiciIgKChwb3J0KSA8PCAyKSk7ICAgICAgICAgICAgICAgICBcCi19KQotCi0jZGVmaW5lIF9faW5sYyhwb3J0KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB1bnNpZ25lZCBsb25nIHJlc3VsdDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGlmIChfX1BPUlRfUENJTygocG9ydCkpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICJsZHIgICAgJTAsIFslMSwgJTJdICAgIEAgaW5sYyIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgOiAiPXIiIChyZXN1bHQpIDogInIiIChQQ0lPX0JBU0UpLCAiSnIiICgocG9ydCkgPDwgMikpOyAgICAgICAgIFwKLSAgICAgICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgImxkciAgICAlMCwgWyUxLCAlMl0gICAgQCBpbmxjIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6ICI9ciIgKHJlc3VsdCkgOiAiciIgKElPX0JBU0UpLCAiciIgKChwb3J0KSA8PCAyKSk7ICAgICAgICAgICAgXAotICAgICAgICByZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi19KQotCi0jZGVmaW5lIF9faW9hZGRyYyhwb3J0KSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB1bnNpZ25lZCBsb25nIGFkZHI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGlmIChfX1BPUlRfUENJTygocG9ydCkpKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBhZGRyID0gUENJT19CQVNFICsgKChwb3J0KSA8PCAyKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBlbHNlICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgICAgICAgYWRkciA9IElPX0JBU0UgKyAoKHBvcnQpIDw8IDIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgYWRkcjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotfSkKLQotI2RlZmluZSBpbmIocCkgICAgICAgICAgKF9fYnVpbHRpbl9jb25zdGFudF9wKChwKSkgPyBfX2luYmMocCkgICAgOiBfX2luYihwKSkKLSNkZWZpbmUgaW53KHApICAgICAgICAgIChfX2J1aWx0aW5fY29uc3RhbnRfcCgocCkpID8gX19pbndjKHApICAgIDogX19pbncocCkpCi0jZGVmaW5lIGlubChwKSAgICAgICAgICAoX19idWlsdGluX2NvbnN0YW50X3AoKHApKSA/IF9faW5sYyhwKSAgICA6IF9faW5sKHApKQotI2RlZmluZSBvdXRiKHYscCkgICAgICAgKF9fYnVpbHRpbl9jb25zdGFudF9wKChwKSkgPyBfX291dGJjKHYscCkgOiBfX291dGIodixwKSkKLSNkZWZpbmUgb3V0dyh2LHApICAgICAgIChfX2J1aWx0aW5fY29uc3RhbnRfcCgocCkpID8gX19vdXR3Yyh2LHApIDogX19vdXR3KHYscCkpCi0jZGVmaW5lIG91dGwodixwKSAgICAgICAoX19idWlsdGluX2NvbnN0YW50X3AoKHApKSA/IF9fb3V0bGModixwKSA6IF9fb3V0bCh2LHApKQotI2RlZmluZSBfX2lvYWRkcihwKSAgICAgKF9fYnVpbHRpbl9jb25zdGFudF9wKChwKSkgPyBfX2lvYWRkcihwKSAgOiBfX2lvYWRkcmMocCkpCi0KLS8qIEpNQSAxOC4wMi4wMyBhZGRlZCBzYixzbCBmcm9tIGFybS9pby5oLCBjaGFuZ2luZyBpbyB0byBpb2FkZHIgKi8KLQotI2RlZmluZSBvdXRzYihwLGQsbCkgICAgICAgICAgICBfX3Jhd193cml0ZXNiKF9faW9hZGRyKHApLGQsbCkKLSNkZWZpbmUgb3V0c3cocCxkLGwpICAgICAgICAgICAgX19yYXdfd3JpdGVzdyhfX2lvYWRkcihwKSxkLGwpCi0jZGVmaW5lIG91dHNsKHAsZCxsKSAgICAgICAgICAgIF9fcmF3X3dyaXRlc2woX19pb2FkZHIocCksZCxsKQotCi0jZGVmaW5lIGluc2IocCxkLGwpICAgICAgICAgICAgIF9fcmF3X3JlYWRzYihfX2lvYWRkcihwKSxkLGwpCi0jZGVmaW5lIGluc3cocCxkLGwpICAgICAgICAgICAgIF9fcmF3X3JlYWRzdyhfX2lvYWRkcihwKSxkLGwpCi0jZGVmaW5lIGluc2wocCxkLGwpICAgICAgICAgICAgIF9fcmF3X3JlYWRzbChfX2lvYWRkcihwKSxkLGwpCi0KLSNkZWZpbmUgaW5zdyhwLGQsbCkgICAgIF9fcmF3X3JlYWRzdyhfX2lvYWRkcihwKSxkLGwpCi0jZGVmaW5lIG91dHN3KHAsZCxsKSAgICBfX3Jhd193cml0ZXN3KF9faW9hZGRyKHApLGQsbCkKLQotI2RlZmluZSByZWFkYihjKSAgICAgICAgICAgICAgICAgICAgICAgIChfX3JlYWR3cml0ZV9idWcoInJlYWRiIiksMCkKLSNkZWZpbmUgcmVhZHcoYykgICAgICAgICAgICAgICAgICAgICAgICAoX19yZWFkd3JpdGVfYnVnKCJyZWFkdyIpLDApCi0jZGVmaW5lIHJlYWRsKGMpICAgICAgICAgICAgICAgICAgICAgICAgKF9fcmVhZHdyaXRlX2J1ZygicmVhZGwiKSwwKQotI2RlZmluZSByZWFkYl9yZWxheGVkKGFkZHIpCQlyZWFkYihhZGRyKQotI2RlZmluZSByZWFkd19yZWxheGVkKGFkZHIpCQlyZWFkdyhhZGRyKQotI2RlZmluZSByZWFkbF9yZWxheGVkKGFkZHIpCQlyZWFkbChhZGRyKQotI2RlZmluZSB3cml0ZWIodixjKSAgICAgICAgICAgICAgICAgICAgIF9fcmVhZHdyaXRlX2J1Zygid3JpdGViIikKLSNkZWZpbmUgd3JpdGV3KHYsYykgICAgICAgICAgICAgICAgICAgICBfX3JlYWR3cml0ZV9idWcoIndyaXRldyIpCi0jZGVmaW5lIHdyaXRlbCh2LGMpICAgICAgICAgICAgICAgICAgICAgX19yZWFkd3JpdGVfYnVnKCJ3cml0ZWwiKQotCi0jZGVmaW5lIHJlYWRzdyhwLGQsbCkgICAgICAgICAgICAgICAgIChfX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gc3opOwotICAgICAgICB1bnNpZ25lZCBsb25nICgqY2xlYXJfdXNlcikodm9pZCAqYWRkciwgdW5zaWduZWQgbG9uZyBzeik7Ci0gICAgICAgIHVuc2lnbmVkIGxvbmcgKCpzdHJuY3B5X2Zyb21fdXNlcikoY2hhciAqdG8sIGNvbnN0IGNoYXIgKmZyb20sIHVuc2lnbmVkIGxvbmcgc3opOwotICAgICAgICB1bnNpZ25lZCBsb25nICgqc3Rybmxlbl91c2VyKShjb25zdCBjaGFyICpzLCBsb25nIG4pOwotfSB1YWNjZXNzX3Q7Ci0KLWV4dGVybiB1YWNjZXNzX3QgdWFjY2Vzc191c2VyLCB1YWNjZXNzX2tlcm5lbDsKLQotI2RlZmluZSBFWFRSQV9USFJFQURfU1RSVUNUICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB1YWNjZXNzX3QgICAgICAgKnVhY2Nlc3M7ICAgICAgICAgLyogVXNlciBhY2Nlc3MgZnVuY3Rpb25zKi8KLQotI2RlZmluZSBFWFRSQV9USFJFQURfU1RSVUNUX0lOSVQgICAgICAgICAgICAgICAgXAotICAgICAgICAudWFjY2VzcyAgICAgICAgPSAmdWFjY2Vzc19rZXJuZWwsCi0KLS8vIEZJWE1FPyEhCi0KLSNkZWZpbmUgc3RhcnRfdGhyZWFkKHJlZ3MscGMsc3ApICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdW5zaWduZWQgbG9uZyAqc3RhY2sgPSAodW5zaWduZWQgbG9uZyAqKXNwOyAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgc2V0X2ZzKFVTRVJfRFMpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgbWVtemVybyhyZWdzLT51cmVncywgc2l6ZW9mIChyZWdzLT51cmVncykpOyAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgcmVncy0+QVJNX3BjID0gcGMgfCB+MHhmYzAwMDAwMzsgICAgICAgIC8qIHBjICovICAgICAgICAgICAgICAgIFwKLSAgICAgICAgcmVncy0+QVJNX3NwID0gc3A7ICAgICAgICAgICAgICAvKiBzcCAqLyAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgcmVncy0+QVJNX3IyID0gc3RhY2tbMl07ICAgICAgICAvKiByMiAoZW52cCkgKi8gICAgICAgICAgICAgICAgIFwKLSAgICAgICAgcmVncy0+QVJNX3IxID0gc3RhY2tbMV07ICAgICAgICAvKiByMSAoYXJndikgKi8gICAgICAgICAgICAgICAgIFwKLSAgICAgICAgcmVncy0+QVJNX3IwID0gc3RhY2tbMF07ICAgICAgICAvKiByMCAoYXJnYykgKi8gICAgICAgICAgICAgICAgIFwKLX0pCi0KLSNkZWZpbmUgS1NUS19FSVAodHNrKSAgICgoKHVuc2lnbmVkIGxvbmcgKikoNDA5NisodW5zaWduZWQgbG9uZykodHNrKSkpWzEwMjBdKQotI2RlZmluZSBLU1RLX0VTUCh0c2spICAgKCgodW5zaWduZWQgbG9uZyAqKSg0MDk2Kyh1bnNpZ25lZCBsb25nKSh0c2spKSlbMTAxOF0pCi0KLXN0cnVjdCBkZWJ1Z19lbnRyeSB7Ci0gICAgICAgIHUzMiAgICAgICAgICAgICAgICAgICAgIGFkZHJlc3M7Ci0gICAgICAgIHUzMgkJICAgICAgICBpbnNuOwotfTsKLQotc3RydWN0IGRlYnVnX2luZm8gewotICAgICAgICBpbnQgICAgICAgICAgICAgICAgICAgICBuc2F2ZWQ7Ci0gICAgICAgIHN0cnVjdCBkZWJ1Z19lbnRyeSAgICAgIGJwWzJdOwotfTsKLQotc3RydWN0IHRocmVhZF9zdHJ1Y3QgewotCQkJCQkJCS8qIGZhdWx0IGluZm8JICAqLwotCXVuc2lnbmVkIGxvbmcJCQlhZGRyZXNzOwotC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qLwotLyogIFNpemUgZGVmaW50aW9ucwotICogIENvcHlyaWdodCAoQykgQVJNIExpbWl0ZWQgMTk5OC4gQWxsIHJpZ2h0cyByZXNlcnZlZC4KLSAqLwotCi0jaWZuZGVmIF9fc2l6ZXNfaAotI2RlZmluZSBfX3NpemVzX2ggICAgICAgICAgICAgICAgICAgICAgIDEKLQotLyogaGFuZHkgc2l6ZXMgKi8KLSNkZWZpbmUgU1pfMUsgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwNDAwCi0jZGVmaW5lIFNaXzRLICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMTAwMAotI2RlZmluZSBTWl84SyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDIwMDAKLSNkZWZpbmUgU1pfMTZLICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0MDAwCi0jZGVmaW5lIFNaXzY0SyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAxMDAwMAotI2RlZmluZSBTWl8xMjhLICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMjAwMDAKLSNkZWZpbmUgU1pfMjU2SyAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDQwMDAwCi0jZGVmaW5lIFNaXzUxMksgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDA4MDAwMAotCi0jZGVmaW5lIFNaXzFNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDEwMDAwMAotI2RlZmluZSBTWl8yTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAyMDAwMDAKLSNkZWZpbmUgU1pfNE0gICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwNDAwMDAwCi0jZGVmaW5lIFNaXzhNICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDgwMDAwMAotI2RlZmluZSBTWl8xNk0gICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDAwMDAKLSNkZWZpbmUgU1pfMzJNICAgICAgICAgICAgICAgICA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i0gICAgICAgIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICB1bnNpZ25lZCBsb25nIHRlbXA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCAgICAgICAgICAgICAgICAgICAgICAgICBcCi0iICAgICAgIG1vdiAgICAgJTAsIHBjICAgICAgICAgIEAgc2F2ZV9mbGFnc19jbGlcbiIgICAgIFwKLSIgICAgICAgb3JyICAgICAlMSwgJTAsICMweDA4MDAwMDAwXG4iICAgICAgICAgICAgICAgICAgXAotIiAgICAgICBhbmQgICAgICUwLCAlMCwgIzB4MGMwMDAwMDBcbiIgICAgICAgICAgICAgICAgICBcCi0iICAgICAgIHRlcXAgICAgJTEsICMwXG4iICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICA6ICI9ciIgKHgpLCAiPXIiICh0ZW1wKSAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgIDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgOiAibWVtb3J5Iik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgfSB3aGlsZSAoMCkKLQotLyoKLSAqIEVuYWJsZSBJUlFzICAoc3RpKQotICovCi0jZGVmaW5lIGxvY2FsX2lycV9lbmFibGUoKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgIHVuc2lnbmVkIGxvbmcgdGVtcDsgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCAgICAgICAgICAgICAgICAgXAotIiAgICAgICBtb3YgICAgICUwLCBwYyAgICAgICAgICBAIHN0aVxuIiAgICAgICAgXAotIiAgICAgICBiaWMgICAgICUwLCAlMCwgIzB4MDgwMDAwMDBcbiIgICAgICAgICAgXAotIiAgICAgICB0ZXFwICAgICUwLCAjMFxuIiAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgIDogIj1yIiAodGVtcCkgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgIDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgIDogIm1lbW9yeSIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICB9IHdoaWxlKDApCi0KLS8qCi0gKiBEaXNhYmxlIElSUXMgKGNsaSkKLSAqLwotI2RlZmluZSBsb2NhbF9pcnFfZGlzYWJsZSgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICB1bnNpZ25lZCBsb25nIHRlbXA7ICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyggICAgICAgICAgICAgICAgIFwKLSIgICAgICAgbW92ICAgICAlMCwgcGMgICAgICAgICAgQCBjbGlcbiIgICAgICAgIFwKLSIgICAgICAgb3JyICAgICAlMCwgJTAsICMweDA4MDAwMDAwXG4iICAgICAgICAgIFwKLSIgICAgICAgdGVxcCAgICAlMCwgIzBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICA6ICI9ciIgKHRlbXApICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICA6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICA6ICJtZW1vcnkiKTsgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgfSB3aGlsZSgwKQotCi0vKiBFbmFibGUgRklRcyAoc3RmKSAqLwotCi0jZGVmaW5lIF9fc3RmKCkgZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHVuc2lnbmVkIGxvbmcgdGVtcDsgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIF9fYXNtX18gX192b2xhdGlsZV9fKCAgICAgICAgICAgICAgICAgICBcCi0iICAgICAgIG1vdiAgICAgJTAsIHBjICAgICAgICAgIEAgc3RmXG4iICAgICAgICBcCi0iICAgICAgIGJpYyAgICAgJTAsICUwLCAjMHgwNDAwMDAwMFxuIiAgICAgICAgICBcCi0iICAgICAgIHRlcXAgICAgJTAsICMwXG4iICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIDogIj1yIiAodGVtcCkpOyAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgfSB3aGlsZSgwKQotCi0vKiBEaXNhYmxlIEZJUXMgIChjbGYpICovCi0KLSNkZWZpbmUgX19jbGYoKSBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdW5zaWduZWQgbG9uZyB0ZW1wOyAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAgICAgICAgICAgIFwKLSIgICAgICAgbW92ICAgICAlMCwgcGMgICAgICAgICAgQCBjbGZcbiIgICAgICAgIFwKLSIgICAgICAgb3JyICAgICAlMCwgJTAsICMweDA0MDAwMDAwXG4iICAgICAgICAgIFwKLSIgICAgICAgdGVxcCAgICAlMCwgIzBcbiIgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgOiAiPXIiICh0ZW1wKSk7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICB9IHdoaWxlKDApCi0KLQotLyoKLSAqIFNhdmUgdGhlIGN1cnJlbnQgaW50ZXJydXB0IGVuYWJsZSBzdGF0ZS4KLSAqLwotI2RlZmluZSBsb2NhbF9zYXZlX2ZsYWdzKHgpICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIGRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18oICAgICAgICAgICAgICAgICBcCi0iICAgICAgIG1vdiAgICAgJTAsIHBjICAgICAgICAgIEAgc2F2ZV9mbGFnc1xuIiBcCi0iICAgICAgIGFuZCAgICAgJTAsICUwLCAjMHgwYzAwMDAwMFxuIiAgICAgICAgICBcCi0gICAgICAgICAgOiAiPXIiICh4KSk7ICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIH0gd2hpbGUgKDApCi0KLQotLyoKLSAqIHJlc3RvcmUgc2F2ZWQgSVJRICYgRklRIHN0YXRlCi0gKi8KLSNkZWZpbmUgbG9jYWxfaXJxX3Jlc3RvcmUoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgdW5zaWduZWQgbG9uZyB0ZW1wOyAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICBfX2FzbV9fIF9fdm9sYXRpbGVfXyggICAgICAgICAgICAgICAgICAgICAgICAgXAotIiAgICAgICBtb3YgICAgICUwLCBwYyAgICAgICAgICBAIHJlc3RvcmVfZmxhZ3NcbiIgICAgICBcCi0iICAgICAgIGJpYyAgICAgJTAsICUwLCAjMHgwYzAwMDAwMFxuIiAgICAgICAgICAgICAgICAgIFwKLSIgICAgICAgb3JyICAgICAlMCwgJTAsICUxXG4iICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotIiAgICAgICB0ZXFwICAgICUwLCAjMFxuIiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICAgOiAiPSZyIiAodGVtcCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICA6ICJyIiAoeCkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICA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i10bGJfZmluaXNoX21tdShzdHJ1Y3QgbW11X2dhdGhlciAqdGxiLCB1bnNpZ25lZCBsb25nIHN0YXJ0LCB1bnNpZ25lZCBsb25nIGVuZCkKLXsKLSAgICAgICAgaWYgKHRsYi0+bmVlZF9mbHVzaCkKLSAgICAgICAgICAgICAgICBmbHVzaF90bGJfbW0odGxiLT5tbSk7Ci0KLSAgICAgICAgLyoga2VlcCB0aGUgcGFnZSB0YWJsZSBjYWNoZSB3aXRoaW4gYm91bmRzICovCi0gICAgICAgIGNoZWNrX3BndF9jYWNoZSgpOwotCi0gICAgICAgIHB1dF9jcHVfdmFyKG1tdV9nYXRoZXJzKTsKLX0KLQotI2RlZmluZSB0bGJfcmVtb3ZlX3RsYl9lbnRyeSh0bGIscHRlcCxhZGRyZXNzKSAgZG8geyB9IHdoaWxlICgwKQotLy8jZGVmaW5lIHRsYl9zdGFydF92bWEodGxiLHZtYSkgICAgICAgICAgICAgICAgICBkbyB7IH0gd2hpbGUgKDApCi0vL0ZJWE1FIC0gQVJNMzIgdXNlcyB0aGlzIG5vdyB0aGF0IHRoaW5ncyBjaGFuZ2VkIGluIHRoZSBrZXJuZWwuIHNlZW1zIGxpa2UgaXQgbWF5IGJlIHBvaW50bGVzcyBvbiBhcm0yNiwgaG93ZXZlciB0byBnZXQgdGhpbmdzIGNvbXBpbGluZy4uLgotI2RlZmluZSB0bGJfc3RhcnRfdm1hKHRsYix2bWEpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIGlmICghdGxiLT5mdWxsbW0pICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgICAgICAgICAgZmx1c2hfY2FjaGVfcmFuZ2Uodm1hLCB2bWEtPnZtX3N0YXJ0LCB2bWEtPnZt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ICAgICAgICAgICAgICBcCi0gICAgICAgICIgICAgICAgbW92ICAgICByMCwgJTFcbiIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICIgICAgICAgbW92ICAgICByMSwgJTJcbiIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICIgICAgICAgbW92ICAgICByMiwgJTBcbiIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICIgICAgICAgbW92ICAgICBsciwgcGNcbiIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICIgICAgICAgbW92ICAgICBwYywgJTNcbiIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgICIgICAgICAgbW92ICAgICAlMCwgcjJcbiIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIDogIj1yIiAoZXJyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIDogInIiICh4KSwgInIiIChhZGRyKSwgInIiIChjdXJyZW50LT50aHJlYWQudWFjY2Vzcy0+cHV0X2R3b3JkKSwgXAotICAgICAgICAgICIwIiAoZXJyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICA6ICJyMCIsICJyMSIsICJyMiIsICJsciIpCi0KLSNkZWZpbmUgX19nZXRfdXNlcl9hc21fYnl0ZSh4LGFkZHIsZXJyKQkJCQkJXAotCV9fYXNtX18gX192b2xhdGlsZV9fKAkJCQkJCVwKLQkiCW1vdglyMCwgJTJcbiIJCQkJCVwKLQkiCW1vdglyMSwgJTBcbiIJCQkJCVwKLQkiCW1vdglsciwgcGNcbiIJCQkJCVwKLQkiCW1vdglwYywgJTNcbiIJCQkJCVwKLQkiCW1vdgklMCwgcjFcbiI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AgICAgICAgIFwKLSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgbG9uZyBfX2d1X2VyciA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19nZXRfdXNlcl9lcnIoKHgpLChwdHIpLF9fZ3VfZXJyKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19ndV9lcnI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0pCi0KLSNkZWZpbmUgX19nZXRfdXNlcl9lcnJvcih4LHB0cixlcnIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19nZXRfdXNlcl9lcnIoKHgpLChwdHIpLGVycik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgKHZvaWQpIDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0pCi0KLSNkZWZpbmUgX19nZXRfdXNlcl9lcnIoeCxwdHIsZXJyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLWRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdW5zaWduZWQgbG9uZyBfX2d1X2FkZHIgPSAodW5zaWduZWQgbG9uZykocHRyKTsgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdW5zaWduZWQgbG9uZyBfX2d1X3ZhbDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgc3dpdGNoIChzaXplb2YoKihwdHIpKSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgY2FzZSAxOiBfX2dldF91c2VyX2FzbV9ieXRlKF9fZ3VfdmFsLF9fZ3VfYWRkcixlcnIpOyAgICBicmVhazsgIFwKLSAgICAgICAgY2FzZSAyOiBfX2dldF91c2VyX2FzbV9oYWxmKF9fZ3VfdmFsLF9fZ3VfYWRkcixlcnIpOyAgICBicmVhazsgIFwKLSAgICAgICAgY2FzZSA0OiBfX2dldF91c2VyX2FzbV93b3JkKF9fZ3VfdmFsLF9fZ3VfYWRkcixlcnIpOyAgICBicmVhazsgIFwKLSAgICAgICAgZGVmYXVsdDogKF9fZ3VfdmFsKSA9IF9fZ2V0X3VzZXJfYmFkKCk7ICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgKHgpID0gKF9fdHlwZW9mX18oKihwdHIpKSlfX2d1X3ZhbDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0gd2hpbGUgKDApCi0KLWV4dGVybiBpbnQgX19wdXRfdXNlcl8xKHZvaWQgKiwgdW5zaWduZWQgaW50KTsKLWV4dGVybiBpbnQgX19wdXRfdXNlcl8yKHZvaWQgKiwgdW5zaWduZWQgaW50KTsKLWV4dGVybiBpbnQgX19wdXRfdXNlcl80KHZvaWQgKiwgdW5zaWduZWQgaW50KTsKLWV4dGVybiBpbnQgX19wdXRfdXNlcl84KHZvaWQgKiwgdW5zaWduZWQgbG9uZyBsb25nKTsKLWV4dGVybiBpbnQgX19wdXRfdXNlcl9iYWQodm9pZCk7Ci0KLSNkZWZpbmUgX19wdXRfdXNlcl94KF9fcjEsX19wLF9fZSxfX3MpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgX19hc21fXyBfX3ZvbGF0aWxlX18gKCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBfX2FzbWVxKCIlMCIsICJyMCIpIF9fYXNtZXEoIiUyIiwgInIxIikgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAiYmwgICAgIF9fcHV0X3VzZXJfIiAjX19zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6ICI9JnIiIChfX2UpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6ICIwIiAoX19wKSwgInIiIChfX3IxKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICA6ICJpcCIsICJsciIsICJjYyIpCi0KLSNkZWZpbmUgcHV0X3VzZXIoeCxwKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgKHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICByZWdpc3RlciBjb25zdCB0eXBlb2YoKihwKSkgX19yMSBhc20oInIxIikgPSAoeCk7ICAgICAgIFwKLSAgICAgICAgICAgICAgICByZWdpc3RlciBjb25zdCB0eXBlb2YoKihwKSkgKl9fcCBhc20oInIwIikgPSAocCk7ICAgICAgIFwKLSAgICAgICAgICAgICAgICByZWdpc3RlciBpbnQgX19lIGFzbSgicjAiKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBzd2l0Y2ggKHNpemVvZigqKF9fcCkpKSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBjYXNlIDE6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIF9fcHV0X3VzZXJfeChfX3IxLCBfX3AsIF9fZSwgMSk7ICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBjYXNlIDI6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIF9fcHV0X3VzZXJfeChfX3IxLCBfX3AsIF9fZSwgMik7ICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBjYXNlIDQ6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIF9fcHV0X3VzZXJfeChfX3IxLCBfX3AsIF9fZSwgNCk7ICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBjYXNlIDg6ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIF9fcHV0X3VzZXJfeChfX3IxLCBfX3AsIF9fZSwgOCk7ICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBkZWZhdWx0OiBfX2UgPSBfX3B1dF91c2VyX2JhZCgpOyBicmVhazsgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICBfX2U7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgfSkKLQotI2lmIDAKLS8qKioqKioqKioqKioqKioqKioqKiogICBPTEQgTUVUSE9EICoqKioqKioqKioqKioqKioqKiovCi0jZGVmaW5lIF9fcHV0X3VzZXJfeChfX3IxLF9fcCxfX2UsX19zLF9faS4uLikJCQkJXAotCSAgIF9fYXNtX18gX192b2xhdGlsZV9fICgiYmwJX19wdXRfdXNlcl8iICNfX3MJCVwKLQkJOiAiPSZyIiAoX19lKQkJCQkJCVwKLQkJOiAiMCIgKF9fcCksICJyIiAoX19yMSkJCQkJCVwKLQkJOiBfX2kpCi0KLSNkZWZpbmUgcHV0X3VzZXIoeCxwKQkJCQkJCQlcCi0JKHsJCQkJCQkJCVwKLQkJcmVnaXN0ZXIgY29uc3QgdHlwZW9mKCoocCkpIF9fcjEgYXNtKCJyMSIpID0gKHgpOwlcCi0JCXJlZ2lzdGVyIGNvbnN0IHR5cGVvZigqKHApKSAqX19wIGFzbSgicjAiKSA9IChwKTsJXAotCQlyZWdpc3RlciBpbnQgX19lIGFzbSgicjAiKTsJCQkJXAotCQlzd2l0Y2ggKHNpemVvZigqKHApKSkgewkJCQkJXAotCQljYXNlIDE6CQkJCQkJCVwKLQkJCV9fcHV0X3VzZXJfeChfX3IxLCBfX3AsIF9fZSwgMSwgInIyIiwgImxyIik7CVwKLQkJCWJyZWFrOwkJCQkJCVwKLQkJY2FzZSAyOgkJCQkJCQlcCi0JCQlfX3B1dF91c2VyX3goX19yMSwgX19wLCBfX2UsIDIsICJyMiIsICJsciIpOwlcCi0JCQlicmVhazsJCQkJCQlcCi0JCWNhc2UgNDoJCQkJCQkJXAotCQkJX19wdXRfdXNlcl94KF9fcjEsIF9fcCwgX19lLCA0LCAicjIiLCAibHIiKTsJXAotCQkJYnJlYWs7CQkJCQkJXAotCQljYXNlIDg6CQkJCQkJCVwKLQkJCV9fcHV0X3VzZXJfeChfX3IxLCBfX3AsIF9fZSwgOCwgInIyIiwgImlwIiwgImxyIik7CVwKLQkJCWJyZWFrOwkJCQkJCVwKLQkJZGVmYXVsdDogX19lID0gX19wdXRfdXNlcl9iYWQoKTsgYnJlYWs7CQkJXAotCQl9CQkJCQkJCVwKLQkJX19lOwkJCQkJCQlcCi0JfSkKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2VuZGlmCi0KLSNkZWZpbmUgX19wdXRfdXNlcih4LHB0cikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgbG9uZyBfX3B1X2VyciA9IDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19wdXRfdXNlcl9lcnIoKHgpLChwdHIpLF9fcHVfZXJyKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19wdV9lcnI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0pCi0KLSNkZWZpbmUgX19wdXRfdXNlcl9lcnJvcih4LHB0cixlcnIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSh7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX19wdXRfdXNlcl9lcnIoKHgpLChwdHIpLGVycik7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgKHZvaWQpIDA7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0pCi0KLSNkZWZpbmUgX19wdXRfdXNlcl9lcnIoeCxwdHIsZXJyKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLWRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgdW5zaWduZWQgbG9uZyBfX3B1X2FkZHIgPSAodW5zaWduZWQgbG9uZykocHRyKTsgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgX190eXBlb2ZfXygqKHB0cikpIF9fcHVfdmFsID0gKHgpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgc3dpdGNoIChzaXplb2YoKihwdHIpKSkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgY2FzZSAxOiBfX3B1dF91c2VyX2FzbV9ieXRlKF9fcHVfdmFsLF9fcHVfYWRkcixlcnIpOyAgICBicmVhazsgIFwKLSAgICAgICAgY2FzZSAyOiBfX3B1dF91c2VyX2FzbV9oYWxmKF9fcHVfdmFsLF9fcHVfYWRkcixlcnIpOyAgICBicmVhazsgIFwKLSAgICAgICAgY2FzZSA0OiBfX3B1dF91c2VyX2FzbV93b3JkKF9fcHVfdmFsLF9fcHVfYWRkcixlcnIpOyAgICBicmVhazsgIFwKLSAgICAgICAgY2FzZSA4OiBfX3B1dF91c2VyX2FzbV9kd29yZChfX3B1X3ZhbCxfX3B1X2FkZHIsZXJyKTsgICBicmVhazsgIFwKLSAgICAgICAgZGVmYXVsdDogX19wdXRfdXNlcl9iYWQoKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLX0gd2hpbGUgKDApCi0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