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IDIKKyNkZWZpbmUgTUlfUEhZX0lERU5USUZJRVJfMl9SRUcgICAgICAgICAgICAgMworI2RlZmluZSBNSV9BVVRPTkVHX0FEVkVSVElTRU1FTlRfUkVHICAgICAgICA0CisjZGVmaW5lIE1JX0FVVE9ORUdfTElOS19QQVJUTkVSX0FCSUxJVFlfUkVHIDUKKyNkZWZpbmUgTUlfQVVUT05FR19FWFBBTlNJT05fUkVHICAgICAgICAgICAgNgorI2RlZmluZSBNSV9BVVRPTkVHX05FWFRfUEFHRV9UUkFOU01JVF9SRUcgICA3CisjZGVmaW5lIE1JX0xJTktfUEFSVE5FUl9ORVhUX1BBR0VfUkVHICAgICAgIDgKKyNkZWZpbmUgTUlfMTAwMEJBU0VUX0NPTlRST0xfUkVHICAgICAgICAgICAgOQorI2RlZmluZSBNSV8xMDAwQkFTRVRfU1RBVFVTX1JFRyAgICAgICAgICAgICAxMAorI2RlZmluZSBNSV9SRVNFUlZFRDExX1JFRyAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBNSV9SRVNFUlZFRDEyX1JFRyAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBNSV9SRVNFUlZFRDEzX1JFRyAgICAgICAgICAgICAgICAgICAxMworI2RlZmluZSBNSV9SRVNFUlZFRDE0X1JFRyAgICAgICAgICAgICAgICAgICAxNAorI2RlZmluZSBNSV9FWFRFTkRFRF9TVEFUVVNfUkVHICAgICAgICAgICAgICAxNQorCisvKiBWTUkgUmVnaXN0ZXIgQWRkcmVzc2VzICovCisjZGVmaW5lIFZNSV9SRVNFUlZFRDE2X1JFRyAgICAgICAgICAgICAgICAgIDE2CisjZGVmaW5lIFZNSV9SRVNFUlZFRDE3X1JFRyAgICAgICAgICAgICAgICAgIDE3CisjZGVmaW5lIFZNSV9SRVNFUlZFRDE4X1JFRyAgICAgICAgICAgICAgICAgIDE4CisjZGVmaW5lIFZNSV9MT09QQkFDS19DT05UUk9MX1JFRyAgICAgICAgICAgIDE5CisjZGVmaW5lI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ICAgICAgICAgIDAKKyNkZWZpbmUgVFJVRVBIWV9DRkdfTUFTVEVSICAgICAgICAgICAgICAxCisKKy8vIERlZmluZSBNREkvTURJLVggc2V0dGluZ3MKKyNkZWZpbmUgVFJVRVBIWV9NREkgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFRSVUVQSFlfTURJWCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBUUlVFUEhZX0FVVE9fTURJX01ESVggICAgICAgICAgIDIKKworLy8gRGVmaW5lIDEwQmFzZS1UIGxpbmsgcG9sYXJpdGllcworI2RlZmluZSBUUlVFUEhZX1BPTEFSSVRZX05PUk1BTCAgICAgICAgIDAKKyNkZWZpbmUgVFJVRVBIWV9QT0xBUklUWV9JTlZFUlRFRCAgICAgICAxCisKKy8vIERlZmluZSBhdXRvLW5lZ290aWF0aW9uIHJlc3VsdHMKKyNkZWZpbmUgVFJVRVBIWV9BTkVHX05PVF9DT01QTEVURSAgICAgICAwCisjZGVmaW5lIFRSVUVQSFlfQU5FR19DT01QTEVURSAgICAgICAgICAgMQorI2RlZmluZSBUUlVFUEhZX0FORUdfRElTQUJMRUQgICAgICAgICAgIDIKKworLyogRGVmaW5lIGR1cGxleCBhZHZlcnRpc21lbnQgZmxhZ3MgKi8KKyNkZWZpbmUgVFJVRVBIWV9BRFZfRFVQTEVYX05PTkUgICAgICAgICAweDAwCisjZGVmaW5lIFRSVUVQSFlfQURWX0RVUExFWF9GVUxMICAgICAgICAgMHgwMQorI2RlZmluZSBUUlVFUEhZX0FEVl9EVVBMRVhfSEFMRiAgICAgICAgIDB4MDIKKyNkZWZpbmUgVFJVRVBIWV9BRFZfRFVQTEVYX0JPVEggICAgIFwKKyAgICAoVFJVRVBIWV9BRFZfRFVQTEVYX0ZVTEwgfCBUUlVFUEhZX0FEVl9EVVBMRVhfSEFMRikKKworI2RlZmluZSBQSFlfQ09OVFJPTCAgICAgICAgICAgICAgICAweDAwCS8vI2RlZmluZSBUUlVfTUlfQ09OVFJPTF9SRUdJU1RFUiAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQSFlfU1RBVFVTICAgICAgICAgICAgICAgICAweDAxCS8vI2RlZmluZSBUUlVfTUlfU1RBVFVTX1JFR0lTVEVSICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQSFlfSURfMSAgICAgICAgICAgICAgICAgICAweDAyCS8vI2RlZmluZSBUUlVfTUlfUEhZX0lERU5USUZJRVJfMV9SRUdJU1RFUiAgICAgICAgMgorI2RlZmluZSBQSFlfSURfMiAgICAgICAgICAgICAgICAgICAweDAzCS8vI2RlZmluZSBUUlVfTUlfUEhZX0lERU5USUZJRVJfMl9SRUdJU1RFUiAgICAgICAgMworI2RlZmluZSBQSFlfQVVUT19BRFZFUlRJU0VNRU5UICAgICAweDA0CS8vI2RlZmluZSBUUlVfTUlfQURWRVJUSVNFTUVOVF9SRUdJU1RFUiAgICAgICAgICAgNAorI2RlZmluZSBQSFlfQVVUT19MSU5LX1BBUlRORVIgICAgICAweDA1CS8vI2RlZmluZSBUUlVfTUlfTElOS19QQVJUTkVSX0FCSUxJVFlfUkVHSVNURVIgICAgNQorI2RlZmluZSBQSFlfQVVUT19FWFBBTlNJT04gICAgICAgICAweDA2CS8vI2RlZmluZSBUUlVfTUlfRVhQQU5TSU9OX1JFR0lTVEVSICAgICAgICAgICAgICAgNgorI2RlZmluZSBQSFlfQVVUT19ORVhUX1BBR0VfVFggICAgICAweDA3CS8vI2RlZmluZSBUUlVfTUlfTkVYVF9QQUdFX1RSQU5TTUlUX1JFR0lTVEVSICAgICAgNworI2RlZmluZSBQSFlfTElOS19QQVJUTkVSX05FWFRfUEFHRSAweDA4CS8vI2RlZmluZSBUUlVfTUlfTElOS19QQVJUTkVSX05FWFRfUEFHRV9SRUdJU1RFUiAgOAorI2RlZmluZSBQSFlfMTAwMF9DT05UUk9MICAgICAgICAgICAweDA5CS8vI2RlZmluZSBUUlVfTUlfMTAwMEJBU0VUX0NPTlRST0xfUkVHSVNURV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kZXguYml0cy52YWwgOiAlZFxuIgorCQkgICAgICAgIlRDQiBXckluZGV4LnZhbHVlICAgIDogMHglMDh4XG4iCisJCSAgICAgICAiVENCIFdySW5kZXguYml0cy52YWwgOiAlZFxuIiwKKwkJICAgICAgIHBNcFRjYiwKKwkJICAgICAgIHBNcFRjYi0+TmV4dCwKKwkJICAgICAgIHBNcFRjYi0+UGFja2V0TGVuZ3RoLAorCQkgICAgICAgcE1wVGNiLT5XckluZGV4U3RhcnQudmFsdWUsCisJCSAgICAgICBwTXBUY2ItPldySW5kZXhTdGFydC5iaXRzLnZhbCwKKwkJICAgICAgIHBNcFRjYi0+V3JJbmRleC52YWx1ZSwKKwkJICAgICAgIHBNcFRjYi0+V3JJbmRleC5iaXRzLnZhbCk7CisKKwkJZG8geworCQkJZGVzYyA9CisJCQkgICAgKFRYX0RFU0NfRU5UUllfdCAqKSAocEFkYXB0ZXItPlR4UmluZy4KKwkJCQkJCSBwVHhEZXNjUmluZ1ZhICsKKwkJCQkJCSBwTXBUY2ItPldySW5kZXhTdGFydC5iaXRzLnZhbCk7CisKKwkJCURCR19UWChldDEzMXhfZGJnaW5mbywKKwkJCSAgICAgICAiQ1VSUkVOVCBERVNDUklQVE9SXG4iCisJCQkgICAgICAgIlx0QWRkcmVzcyAgICAgICAgICAgOiAweCVwXG4iCisJCQkgICAgICAgIlx0RGF0YUJ1ZmZlclB0ckhpZ2ggOiAweCUwOHhcbiIKKwkJCSAgICAgICAiXHREYXRhQnVmZmVyUHRyTG93ICA6IDB4JTA4eFxuIgorCQkJICAgICAgICJcdHdvcmQyICAgICAgICAgICAgIDogMHglMDh4XG4iCisJCQkgICAgICAgIlx0d29yZDMgICAgICAgICAgICAgOiAweCUwOHhcbiIsCisJCQkgICAgICAgZGVzYywKKwkJCSAgICAgICBkZXNjLT5EYXRhQnVmZmVyUHRySGlnaCwKKwkJCSAgICAgICBkZXNjLT5EYXRhQnVmZmVyUHRyTG93LAorCQkJICAgICAgIGRlc2MtPndvc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gICAgICAgICAgICAgICAgICAgICAgICAgX0RCR19MRUFWRShBKTt9CisKKyNkZWZpbmUgREJHX1BBUkFNKEEsTixGLFMuLi4pICAge2lmIChEQkdfRkxBR1MoQSkgJiBEQkdfUEFSQU1fT04pIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCR19QUklOVCgiICAlcyAtLSAiRiJcbiIsTixTKTt9CisKKyNkZWZpbmUgREJHX0VSUk9SKEEsUy4uLikJXAorCWlmIChEQkdfRkxBR1MoQSkgJiBEQkdfRVJST1JfT04pIHsJCQkJXAorCQlEQkdfUFJJTlQoIiVzOkVSUk9SOiVzICIsREJHX05BTUUoQSksIF9fZnVuY19fKTsJXAorCQlEQkdfUFJJTlRDKFMpOwkJCQkJCVwKKwkJREJHX1RSQVA7CQkJCQkJXAorCX0KKworI2RlZmluZSBEQkdfV0FSTklORyhBLFMuLi4pIHtpZiAoREJHX0ZMQUdTKEEpICYgREJHX1dBUk5JTkdfT04pIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge0RCR19QUklOVCgiJXM6V0FSTklORzolcyAiLERCR19OQU1FKEEpLF9fZnVuY19fKTtEQkdfUFJJTlRDKFMpO319CisKKyNkZWZpbmUgREJHX05PVElDRShBLFMuLi4pICB7aWYgKERCR19GTEFHUyhBKSAmIERCR19OT1RJQ0VfT04pIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAge0RCR19QUklOVCgiJXM6Tk9USUNFOiVzICIsREJHX05BTUUoQSksX19mdW5jX18pO0RCR19QUklOVEMoUyk7fX0KKworI2RlZmluZSBEQkdfVFJBQ0UoQSxTLi4uKSAgIHtpZiAoREJHX0ZMQUdTKEEpICYgREJHX1RSQUNFX09OKSBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtEQkdfUFJJTlQoIiVzOlRSQUNFOiVzICIsREJHX05BTUUoQSksIF9fZnVuY19fKTtEQkdfUFJJTlRDKFMpO319CisKKyNkZWZpbmUgREJHX1ZFUkJPU0UoQSxTLi4uKSB7aWYgKERCR19GTEFHUyhBKSAmIERCR19WRVJCT1NFX09OKSBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtEQkdfUFJJTlQoIiVzOlZFUkJPU0U6JXMgIixEQkdfTkFNRShBKSwgX19mdW5jX18pO0RCR19QUklOVEMoUyk7fX0KKworI2RlZmluZSBEQkdfUlgoQSxTLi4uKSAgICAgIHtpZiAoREJHX0ZMQUdTKEEpICYgREJHX1JYX09OKSBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtEQkdfUFJJTlQoUyk7fX0KKworI2RlZmluZSBEQkdfUlhfRU5URVIoQSkgICAgIHtpZiAoREJHX0ZMQUdTKEEpICYgREJHX1JYX09OKSBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9EQkdfRU5URVIoQSk7fQorCisjZGVmaW5lIERCR19SWF9MRUFWRShBKSAgICAge2lmIChEQkdfRkxBR1MoQSkgJiBEQkdfUlhfT04pIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX0RCR19MRUFWRShBKTt9CisKKyNkZWZpbmUgREJHX1RYKEEsUy4uLikgICAgICB7aWYgKERCR19GTEFHUyhBKSAmIERCR19UWF9PTikgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB7REJHX1BSSU5UKFMpO319CisKKyNkZWZpbmUgREJHX1RYX0VOVEVSKEEpICAgICB7aWYgKERCR19GTEFHUyhBKSAmIERCR19UWF9PTikgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfREJHX0VOVEVSKEEpO30KKworI2RlZmluZSBEQkdfVFhfTEVBVkUoQSkgICAgIHtpZiAoREJHX0ZMQUdTKEEpICYgREJHX1RYX09OKSBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9EQkdfTEVBVkUoQSk7fQorCisjZGVmaW5lIERCR19BU1NFUlQoQykgICAgICAge2lmICghKEMpKSBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHtEQkdfUFJJTlQoIkFTU0VSVCglcykgLS0gJXMjJWQgKCVzKVxuIiwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI0MsX19GSUxFX18sX19MSU5FX18sX19mdW5jX18pOyBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERCR19UUkFQO319CisjZGVmaW5lIFNUQVRJQworCit0eXBlZGVmIHN0cnVjdCB7CisJY2hhciAqZGJnTmFtZTsKKwlpbnQgZGJnTGV2ZWw7CisJdW5zaWduZWQgbG9uZyBkYmdGbGFnczsKK30gZGJnX2luZm9fdDsKKworI2Vsc2UgLyogQ09ORklHX0VUMTMxWF9ERUJVRyAqLworCisjZGVmaW5lIERCR19ERUZOCisjZGVmaW5lIERCR19UUkFQCisjZGVmaW5lIERCR19QUklOVChTLi4uKQorI2RlZmluZSBEQkdfRU5URVIoQSkKKyNkZWZpbmUgREJHX0xFQVZFKEEpCisjZGVmaW5lIERCR19QQVJBTShBLE4sRixTLi4uKQorI2RlZmluZSBEQkdfRVJST1IoQSxTLi4uKQorI2RlZmluZSBEQkdfV0FSTklORyhBLFMuLi4pCisjZGVmaW5lIERCR19OT1RJQ0UoQSxTLi4uKQorI2RlZmluZSBEQkdfVFJBQ0UoQSxTLi4uKQorI2RlZmluZSBEQkdfVkVSQk9TRShBLFMuLi4pCisjZGVmaW5lIERCR19SWChBLFMuLi4pCisjZGVmaW5lIERCR19SWF9FTlRFUihBKQorI2RlZmluZSBEQkdfUlhfTEVBVkUoQSkKKyNkZWZpbmUgREJHX1RYKEEsUy4uLikKKyNkZWZpbmUgREJHX1RYX0VOVEVSKEEpCisjZGVmaW5lIERCR19UWF9MRUFWRShBKQorI2RlZmluZSBEQkdfQVNTRVJUKEMpCisjZGVmaW5lIFNUQVRJQyBzdGF0aWMKKworI2VuZGlmIC8qIENPTkZJR19FVDEzMVhfREVCVUcgKi8KKworLyogRm9yd2FyZCBk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