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0RvY0Jvb2svd3JpdGluZy1hbi1hbHNhLWRyaXZlci50bXBsCisrKyBiL0RvY3VtZW50YXRpb24vRG9jQm9vay93cml0aW5nLWFuLWFsc2EtZHJpdmVyLnRtcGwKQEAgLTEsMTEgKzEsMTEgQEAKLTwhRE9DVFlQRSBib29rIFBVQkxJQyAiLS8vT0FTSVMvL0RURCBEb2NCb29rIFY0LjEvL0VOIj4KLQotPGJvb2s+Ci08P2RiaHRtbCBmaWxlbmFtZT0iaW5kZXguaHRtbCI+Cis8P3htbCB2ZXJzaW9uPSIxLjAiIGVuY29kaW5nPSJVVEYtOCI/PgorPCFET0NUWVBFIGJvb2sgUFVCTElDICItLy9PQVNJUy8vRFREIERvY0Jvb2sgWE1MIFY0LjEuMi8vRU4iCisJImh0dHA6Ly93d3cub2FzaXMtb3Blbi5vcmcvZG9jYm9vay94bWwvNC4xLjIvZG9jYm9va3guZHRkIiBbXT4KIAogPCEtLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogLS0+CiA8IS0tIEhlYWRlciAgLS0+CiA8IS0tICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAtLT4KKzxib29rIGlkPSJXcml0aW5nLWFuLUFMU0EtRHJpdmVyIj4KICAgPGJvb2tpbmZvPgogICAgIDx0aXRsZT5Xcml0aW5nIGFuIEFMU0EgRHJpdmVyPC90aXRsZT4KICAgICA8YXV0aG9yPgpAQCAtNDkyLDkgKzQ5Miw5IEBACiAgICAgICAgICAgfQogCiAgICAgICAgICAgLyogKDIpICovCi0gICAgICAgICAgY2FyZCA9IHNuZF9jYXJkX25ldyhpbmRleFtkZXZdLCBpZFtkZXZdLCBUSElTX01PRFVMRSwgMCk7Ci0gICAgICAgICAgaWYgKGNhcmQgPT0gTlVMTCkKLSAgICAgICAgICAgICAgICAgIHJldHVybiAtRU5PTUVNOworICAgICAgICAgIGVyciA9IHNuZF9jYXJkX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bm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX09UUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0lOVEVMRVhUIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTPXkKK0NPTkZJR19NVERfUEhZU01BUD15CisjIENPTkZJR19NVERfUEhZU01BUF9DT01QQVQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTV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3Qgc2V0CisKKyMKKyMgUGFydGl0aW9uIFR5cGVzCisjCisjIENPTkZJR19QQVJUSVRJT05fQURWQU5DRUQgaXMgbm90IHNldAorQ09ORklHX01TRE9TX1BBUlRJVElPTj15CitDT05GSUdfTkxTPXkKK0NPTkZJR19OTFNfREVGQVVMVD0iaXNvODg1OS0xIgorQ09ORklHX05MU19DT0RFUEFHRV80Mzc9eQorQ09ORklHX05MU19DT0RFUEFHRV83Mzc9eQorQ09ORklHX05MU19DT0RFUEFHRV83NzU9eQorQ09ORklHX05MU19DT0RFUEFHRV84NTA9eQorQ09ORklHX05MU19DT0RFUEFHRV84NTI9eQorQ09ORklHX05MU19DT0RFUEFHRV84NTU9eQorQ09ORklHX05MU19DT0RFUEFHRV84NTc9eQorQ09ORklHX05MU19DT0RFUEFHRV84NjA9eQorQ09ORklHX05MU19DT0RFUEFHRV84NjE9eQorQ09ORklHX05MU19DT0RFUEFHRV84NjI9eQorQ09ORklHX05MU19DT0RFUEFHRV84NjM9eQorQ09ORklHX05MU19DT0RFUEFHRV84NjQ9eQorQ09ORklHX05MU19DT0RFUEFHRV84NjU9eQorQ09ORklHX05MU19DT0RFUEFHRV84NjY9eQorQ09ORklHX05MU19DT0RFUEFHRV84Njk9eQorQ09ORklHX05MU19DT0RFUEFHRV85MzY9eQorQ09ORklHX05MU19DT0RFUEFHRV85NTA9eQorQ09ORklHX05MU19DT0RFUEFHRV85MzI9eQorQ09ORklHX05MU19DT0RFUEFHRV85NDk9eQorQ09ORklHX05MU19DT0RFUEFHRV84NzQ9eQorQ09ORklHX05MU19JU084ODU5Xzg9eQorQ09ORklHX05MU19DT0RFUEFHRV8xMjUwPXkKK0NPTkZJR19OTFNfQ09ERVBBR0VfMTI1MT15CitDT05GSUdfTkxTX0FTQ0lJPXkKK0NPTkZJR19OTFNfSVNPODg1OV8xPXkKK0NPTkZJR19OTFNfSVNPODg1OV8yPXkKK0NPTkZJR19OTFNfSVNPODg1OV8zPXkKK0NPTkZJR19OTFN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0ZQVV9FTVU9eQorQ09ORklHX1NIX0FEQz15CitDT05GSUdfQ1BVX0hBU19JTlRFVlQ9eQorQ09ORklHX0NQVV9IQVNfSVBSX0lSUT15CitDT05GSUdfQ1BVX0hBU19TUl9SQj15CisKKyMKKyMgQm9hcmQgc3VwcG9ydAorIworIyBDT05GSUdfU0hfU09MVVRJT05fRU5HSU5FIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NIX0hQNlhYIGlzIG5vdCBzZXQKK0NPTkZJR19TSF9QT0xBUklTPXkKKworIworIyBUaW1lciBhbmQgY2xvY2sgY29uZmlndXJhdGlvbgorIworQ09ORklHX1NIX1RNVT15CitDT05GSUdfU0hfVElNRVJfSVJRPTE2CitDT05GSUdfU0hfUENMS19GUkVRPTMzMDAwMDAwCitDT05GSUdfVElDS19PTkVTSE9UPXkKK0NPTkZJR19OT19IWj15CitDT05GSUdfSElHSF9SRVNfVElNRVJTPXkKK0NPTkZJR19HRU5FUklDX0NMT0NLRVZFTlRTX0JVSUxEPXkKKworIworIyBDUFUgRnJlcXVlbmN5IHNjYWxpbmcKKyMKKyMgQ09ORklHX0NQVV9GUkVRIGlzIG5vdCBzZXQKKworIworIyBETUEgc3VwcG9ydAorIworQ09ORklHX1NIX0RNQV9BUEk9eQorQ09ORklHX1NIX0RNQT15CitDT05GSUdfTlJfT05DSElQX0RNQV9DSEFOTkVMUz00CisjIENPTkZJR19OUl9ETUFfQ0hBTk5FTFNfQk9PTCBpcyBub3Qgc2V0CisKKyMKKyMgQ29tcGFuaW9uIENoaXBzCisjCisKKyMKKyMgQWRkaXRpb25hbCBTdXBlckggRGV2aWNlIERyaXZlcnMKKyMKK0NPTkZJR19IRUFSVEJFQVQ9eQorIyBDT05GSUdfUFVTSF9TV0lUQ0ggaXMgbm90IHNldAorCisjCisjIEtlcm5lbCBmZWF0dXJlcworIworQ09ORklHX0haXzEwMD15CisjIENPTkZJR19IWl8yNTAgaXMgbm90IHNldAorIyBDT05GSUdfSFpfMzAwIGlz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hfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PVFAgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSU5URUxFWFQ9eQorIyBDT05GSUdfTVREX0NGSV9BTURTVEQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9eQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUEhZU01BUD15CitDT05GSUdfTVREX1BIWVNNQVBfQ09NUEFUPXkKK0NPTkZJR19NVERfUEhZU01BUF9TVEFSVD0weDAwMDAwMDAwCitDT05GSUdfTVREX1BIWVNNQVBfTEVOPTB4MDEwMDAwMDAKK0NPTkZJR19NVERfUEhZU01BUF9CQU5LV0lEVEg9MgorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GS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ycworIworIyBDT05GSUdfV0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX1BQUCBpcyBub3Qgc2V0CisjIENPTkZJR19TTElQIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVENPTlNPTEUgaXMgbm90IHNldAorIyBDT05GSUdfTkVUUE9MTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfUE9MTF9DT05UUk9MTEVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lTRE4gaXMgbm90IHNldAorIyBDT05GSUdfUEhPTkUgaXMgbm90IHNldAorCisjCisjIElucHV0IGRldmljZSBzdXBwb3J0CisjCitDT05GSUdfSU5QVVQ9eQorIyBDT05GSUdfSU5QVVRfRkZfTUVNTEVTUyBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9QT0xMREVWIGlzIG5vdCBzZXQKKworIworIyBVc2VybGFuZCBpbnRlcmZhY2VzCisjCisjIENPTkZJR19JTlBVVF9NT1VTRURFViBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZCVUcgaXMgbm90IHNldAorCisjCisjIElucHV0IERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19JTlBVVF9LRVlCT0FSRCBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NT1VTRSBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lTVElDSyBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9UQUJMRVQgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfVE9VQ0hTQ1JFRU4gaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfTUlTQyBpcyBub3Qgc2V0CisKKyMKKyMgSGFyZHdhcmUgSS9PIHBvcnRzCisjCisjIENPTkZJR19TRVJJTyBpcyBub3Qgc2V0CisjIENPTkZJR19HQU1FUE9SVCBpcyBub3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BTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUEhZU01BUD15CisjIENPTkZJR19NVERfUEhZU01BUF9DT01QQVQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0lOVEVMX1ZSX05PUiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfUE1DNTUxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgTFBERFIgZmxhc2ggbWVtb3J5IGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9MUEREUiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUUlORk9fUFJPQkUgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworIyBDT05G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05GSUdfV0lSRUxFU1NfRVhUX1NZU0ZTPXkKKyMgQ09ORklHX0xJQjgwMjExIGlzIG5vdCBzZXQKKyMgQ09ORklHX01BQzgwMjExIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dJTUFYIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGS0lMTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRfOVAgaXMgbm90IHNldAorCisjCisjIERldmljZSBEcml2ZXJzCisjCisKKyMKKyMgR2VuZXJpYyBEcml2ZXIgT3B0aW9ucworIworQ09ORklHX1VFVkVOVF9IRUxQRVJfUEFUSD0iL3NiaW4vaG90cGx1ZyIKK0NPTkZJR19TVEFOREFMT05FPXkKK0NPTkZJR19QUkVWRU5UX0ZJUk1XQVJFX0JVSUxEPXkKKyMgQ09ORklHX0ZXX0xPQURFUiBpcyBub3Qgc2V0CisjIENPTkZJR19TWVNfSFlQRVJWSVNPUiBpcyBub3Qgc2V0CisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorQ09ORklHX01URD15CisjIENPTkZJR19NVERfREVCVUcgaXMgbm90IHNldAorQ09ORklHX01URF9DT05DQVQ9eQorQ09ORklHX01URF9QQVJUSVRJT05TPXkKKyMgQ09ORklHX01URF9URVNUUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUkVEQk9PVF9QQVJUUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ01ETElORV9QQVJUUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQVI3X1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxLREVWUz15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09PUFMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0dFTl9QUk9CRT15CisjIENPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSU5URUxFWFQgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfQU1EU1REPXkKKyMgQ09ORklHX01URF9DRklfU1RBQSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX1BIWVNNQVA9eQorIyBDT05GSUdfTVREX1BIWVNNQVBfQ09NUEFUIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgTFBERFIgZmxhc2ggbWVtb3J5IGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9MUEREUiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUUlORk9fUFJPQkUgaXMgbm90IHNldAorCisjCisjIFVCSSAtIFVuc29ydGVkIGJsb2NrIGltYWdlcworIworIyBDT05GSUdfTVREX1VCSSBpcyBub3Qgc2V0CisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKK0NPTkZJR19CTEtfREVWPXkKKyMgQ09ORklHX0JMS19ERVZfQ09XX0NPTU1PTiBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9VQiBpcyBub3Qgc2V0CitDT05GSUdfQk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VNFTDBfMCwgUDJNU0VMMF8xLAorCVBJTk1VWF9GVU5DVElPTl9FTkQsCisKKwlQSU5NVVhfTUFSS19CRUdJTiwKKwlDREVfTUFSSywKKwlFVEhfTUFHSUNfTUFSSywKKwlESVNQX01BUkssCisJRVRIX0xJTktfTUFSSywKKwlEUjVfTUFSSywKKwlFVEhfVFhfRVJfTUFSSywKKwlEUjRfTUFSSywKKwlFVEhfVFhfRU5fTUFSSywKKwlEUjNfTUFSSywKKwlFVEhfVFhEM19NQVJLLAorCURSMl9NQVJLLAorCUVUSF9UWEQyX01BUkssCisJRFIxX01BUkssCisJRVRIX1RYRDFfTUFSSywKKwlEUjBfTUFSSywKKwlFVEhfVFhEMF9NQVJLLAorCisJVlNZTkNfTUFSSywKKwlIU1BJX0NMS19NQVJLLAorCU9EREZfTUFSSywKKwlIU1BJX0NTX01BUkssCisJREc1X01BUkssCisJRVRIX01ESU9fTUFSSywKKwlERzRfTUFSSywKKwlFVEhfUlhfQ0xLX01BUkssCisJREczX01BUkssCisJRVRIX01EQ19NQVJLLAorCURHMl9NQVJLLAorCUVUSF9DT0xfTUFSSywKKwlERzFfTUFSSywKKwlFVEhfVFhfQ0xLX01BUkssCisJREcwX01BUkssCisJRVRIX0NSU19NQVJLLAorCisJRENMS0lOX01BUkssCisJSFNQSV9SWF9NQVJLLAorCUhTWU5DX01BUkssCisJSFNQSV9UWF9NQVJLLAorCURCNV9NQVJLLAorCUVUSF9SWEQzX01BUkssCisJREI0X01BUkssCisJRVRIX1JYRDJfTUFSSywKKwlEQjNfTUFSSywKKwlFVEhfUlhEMV9NQVJLLAorCURCMl9NQVJLLAorCUVUSF9SWEQwX01BUkssCisJREIxX01BUkssCisJRVRIX1JYX0RWX01BUkssCisJREIwX01BUkssCisJRVRIX1JYX0VSX01BUkssCisKKwlEQ0xLT1VUX01BUkssCisJU0NJRjFfU0xLX01BUkssCisJU0NJRjFfUlhEX01BUkssCisJU0NJRjFfVFhEX01BUkssCisJREFDSzFfTUFSSywKKwlCQUNLX01BUkssCisJRkFMRV9NQVJLLAorCURBQ0swX01BUkssCisJRkNMRV9NQVJLLAorCURSRVExX01BUkssCisJQlJFUV9NQVJLLAorCVVTQl9PVkMxX01BUkssCisJRFJFUTBfTUFSSywKKwlVU0JfT1ZDMF9NQVJLLAorCisJVVNCX1BFTkMxX01BUkssCisJVVNCX1BFTkMwX01BUkssCisKKwlIQUMxX1NET1VUX01BUkssCisJU1NJMV9TREFUQV9NQVJLLAorCVNESUYxQ01EX01BUkssCisJSEFDMV9TRElOX01BUkssCisJU1NJMV9TQ0tfTUFSSywKKwlTRElGMUNEX01BUkssCisJSEFDMV9TWU5DX01BUkssCisJU1NJMV9XU19NQVJLLAorCVNESUYxV1BfTUFSSywKKwlIQUMxX0JJVENMS19NQVJLLAorCVNTSTFfQ0xLX01BUkssCisJU0RJRjFDTEtfTUFSSywKKwlIQUMwX1NET1VUX01BUkssCisJU1NJMF9TREFUQV9NQVJLLAorCVNESUYxRDNfTUFSSywKKwlIQUMwX1NESU5fTUFSSywKKwlTU0kwX1NDS19NQVJLLAorCVNESUYxRDJfTUFSSywKKwlIQUMwX1NZTkNfTUFSSywKKwlTU0kwX1dTX01BUkssCisJU0RJRjFEMV9NQVJLLAorCUhBQzBfQklUQ0xLX01BUkssCisJU1NJMF9DTEtfTUFSSywKKwlTRElGMUQwX01BUkssCisKKwlTQ0lGM19TQ0tfTUFSSywKKwlTU0kyX1NEQVRBX01BUkssCisJU0NJRjNfUlhEX01BUkssCisJVENMS19NQVJLLAorCVNTSTJfU0NLX01BUkssCisJU0NJRjNfVFhEX01BUkssCisJSEFDX1JFU19NQVJLLAorCVNTSTJfV1NfTUFSSywKKworCURBQ0szX01BUkssCisJU0RJRjBDTURfTUFSSywKKwlEQUNLMl9NQVJLLAorCVNESUYwQ0RfTUFSSywKKwlEUkVRM19NQVJLLAorCVNESUYwV1BfTUFSSywKKwlTQ0lGMF9DVFNfTUFSSywKKwlEUkVRMl9NQVJLLAorCVNESUY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nbmVkIGxvbmcgZmllbGRfd2lkdGgsIHVuc2lnbmVkIGxvbmcgaW5fcG9zLAotCQkJICB1bnNpZ25lZCBsb25nIHZhbHVlLCBpbnQgZG9fd3JpdGUpCitzdGF0aWMgdW5zaWduZWQgbG9uZyBncGlvX3JlYWRfcmF3X3JlZyh1bnNpZ25lZCBsb25nIHJlZywKKwkJCQkgICAgICAgdW5zaWduZWQgbG9uZyByZWdfd2lkdGgpCit7CisJc3dpdGNoIChyZWdfd2lkdGgpIHsKKwljYXNlIDg6CisJCXJldHVybiBjdHJsX2luYihyZWcpOworCWNhc2UgMTY6CisJCXJldHVybiBjdHJsX2ludyhyZWcpOworCWNhc2UgMzI6CisJCXJldHVybiBjdHJsX2lubChyZWcpOworCX0KKworCUJVRygpOworCXJldHVybiAwOworfQorCitzdGF0aWMgdm9pZCBncGlvX3dyaXRlX3Jhd19yZWcodW5zaWduZWQgbG9uZyByZWcsCisJCQkgICAgICAgdW5zaWduZWQgbG9uZyByZWdfd2lkdGgsCisJCQkgICAgICAgdW5zaWduZWQgbG9uZyBkYXRhKQoreworCXN3aXRjaCAocmVnX3dpZHRoKSB7CisJY2FzZSA4OgorCQljdHJsX291dGIoZGF0YSwgcmVnKTsKKwkJcmV0dXJuOworCWNhc2UgMTY6CisJCWN0cmxfb3V0dyhkYXRhLCByZWcpOworCQlyZXR1cm47CisJY2FzZSAzMjoKKwkJY3RybF9vdXRsKGRhdGEsIHJlZyk7CisJCXJldHVybjsKKwl9CisKKwlCVUcoKTsKK30KKworc3RhdGljIHZvaWQgZ3Bpb193cml0ZV9iaXQoc3RydWN0IHBpbm11eF9kYXRhX3JlZyAqZHIsCisJCQkgICB1bnNpZ25lZCBsb25nIGluX3BvcywgdW5zaWduZWQgbG9uZyB2YWx1ZSkKK3sKKwl1bnNpZ25lZCBsb25nIHBvczsKKworCXBvcyA9IGRyLT5yZWdfd2lkdGggLSAoaW5fcG9zICsgMSk7CisKKyNpZmRlZiBERUJVRworCXByX2luZm8oI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leG1tMQorCXNodWZwcyAkMGIwMDAxMDAwMCwgJXhtbTAsICV4bW00CisJcHhvciAleG1tNCwgJXhtbTAKKwlzaHVmcHMgJDBiMTAwMDExMDAsICV4bW0wLCAleG1tNAorCXB4b3IgJXhtbTQsICV4bW0wCisJcHhvciAleG1tMSwgJXhtbTAKKworCW1vdmFwcyAleG1tMiwgJXhtbTUKKwlwc2xsZHEgJDQsICV4bW01CisJcHNodWZkICQwYjExMTExMTExLCAleG1tMCwgJXhtbTMKKwlweG9yICV4bW0zLCAleG1tMgorCXB4b3IgJXhtbTUsICV4bW0yCisKKwltb3ZhcHMgJXhtbTAsICglcmN4KQorCWFkZCAkMHgxMCwgJXJjeAorCXJldAorCitfa2V5X2V4cGFuc2lvbl8yNTZiOgorCXBzaHVmZCAkMGIxMDEwMTAxMCwgJXhtbTEsICV4bW0xCisJc2h1ZnBzICQwYjAwMDEwMDAwLCAleG1tMiwgJXhtbTQKKwlweG9yICV4bW00LCAleG1tMgorCXNodWZwcyAkMGIxMDAwMTEwMCwgJXhtbTIsICV4bW00CisJcHhvciAleG1tNCwgJXhtbTIKKwlweG9yICV4bW0xLCAleG1tMgorCW1vdmFwcyAleG1tMiwgKCVyY3gpCisJYWRkICQweDEwLCAlcmN4CisJcmV0CisKKy8qCisgKiBpbnQgYWVzbmlfc2V0X2tleShzdHJ1Y3QgY3J5cHRvX2Flc19jdHggKmN0eCwgY29uc3QgdTggKmluX2tleSwKKyAqICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCBrZXlfbGVuKQorICovCitFTlRSWShhZXNuaV9zZXRfa2V5KQorCW1vdnVwcyAoJXJzaSksICV4bW0wCQkjIHVzZXIga2V5IChmaXJzdCAxNiBieXRlcykKKwltb3ZhcHMgJXhtbTAsICglcmRpKQorCWxlYSAweDEwKCVyZGkpLCAlcmN4CQkjIGtleSBhZGRyCisJbW92bCAlZWR4LCA0ODAoJXJkaSkKKwlweG9yICV4bW00LCAleG1tNAkJIyB4bW00IGlz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aXplX3QgbGVuOworCisJbGVuID0gc2NucHJpbnRmKHRtcGJ1ZiwgVE1QQlVGTEVOLCAiJWxpXG4iLCBhdG9taWNfbG9uZ19yZWFkKHZhbCkpOworCXJldHVybiBzaW1wbGVfcmVhZF9mcm9tX2J1ZmZlcihidWYsIGNvdW50LCBwcG9zLCB0bXBidWYsIGxlbik7Cit9CisKK3N0YXRpYyBzc2l6ZV90IGltYV9zaG93X2h0YWJsZV92aW9sYXRpb25zKHN0cnVjdCBmaWxlICpmaWxwLAorCQkJCQkgIGNoYXIgX191c2VyICpidWYsCisJCQkJCSAgc2l6ZV90IGNvdW50LCBsb2ZmX3QgKnBwb3MpCit7CisJcmV0dXJuIGltYV9zaG93X2h0YWJsZV92YWx1ZShidWYsIGNvdW50LCBwcG9zLCAmaW1hX2h0YWJsZS52aW9sYXRpb25zKTsKK30KKworc3RhdGljIHN0cnVjdCBmaWxlX29wZXJhdGlvbnMgaW1hX2h0YWJsZV92aW9sYXRpb25zX29wcyA9IHsKKwkucmVhZCA9IGltYV9zaG93X2h0YWJsZV92aW9sYXRpb25zCit9OworCitzdGF0aWMgc3NpemVfdCBpbWFfc2hvd19tZWFzdXJlbWVudHNfY291bnQoc3RydWN0IGZpbGUgKmZpbHAsCisJCQkJCSAgIGNoYXIgX191c2VyICpidWYsCisJCQkJCSAgIHNpemVfdCBjb3VudCwgbG9mZl90ICpwcG9zKQoreworCXJldHVybiBpbWFfc2hvd19odGFibGVfdmFsdWUoYnVmLCBjb3VudCwgcHBvcywgJmltYV9odGFibGUubGVuKTsKKworfQorCitzdGF0aWMgc3RydWN0IGZpbGVfb3BlcmF0aW9ucyBpbWFfbWVhc3VyZW1lbnRzX2NvdW50X29wcyA9IHsKKwkucmVhZCA9IGltYV9zaG93X21lYXN1cmVtZW50c19jb3VudAorfTsKKworLyogcmV0dXJucyBwb2ludGVyIHRvIGhsaXN0X25vZGUgKi8KK3N0YXRpYyB2b2lkICppbWFfbWVhc3VyZW1lbnRzX3N0YXJ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XFwnKSB7CisJCQlzd2l0Y2ggKChjID0gKmZpbGVuYW1lKyspKSB7CisJCQljYXNlICdcXCc6ICAvKiAiXFwiICovCisJCQkJY29udGludWU7CisJCQljYXNlICckJzogICAvKiAiXCQiICovCisJCQljYXNlICcrJzogICAvKiAiXCsiICovCisJCQljYXNlICc/JzogICAvKiAiXD8iICovCisJCQljYXNlICcqJzogICAvKiAiXCoiICovCisJCQljYXNlICdAJzogICAvKiAiXEAiICovCisJCQljYXNlICd4JzogICAvKiAiXHgiICovCisJCQljYXNlICdYJzogICAvKiAiXFgiICovCisJCQljYXNlICdhJzogICAvKiAiXGEiICovCisJCQljYXNlICdBJzogICAvKiAiXEEiICovCisJCQljYXNlICctJzogICAvKiAiXC0iICovCisJCQkJaWYgKHBhdHRlcm5fdHlwZSA9PSAtMSkKKwkJCQkJYnJlYWs7IC8qIE11c3Qgbm90IGNvbnRhaW4gcGF0dGVybiAqLworCQkJCWNvbnRhaW5zX3BhdHRlcm4gPSB0cnVlOworCQkJCWNvbnRpbnVlOworCQkJY2FzZSAnMCc6ICAgLyogIlxvb28iICovCisJCQljYXNlICcxJzoKKwkJCWNhc2UgJzInOgorCQkJY2FzZSAnMyc6CisJCQkJZCA9ICpmaWxlbmFtZSsrOworCQkJCWlmIChkIDwgJzAnIHx8IGQgPiAnNycpCisJCQkJCWJyZWFrOworCQkJCWUgPSAqZmlsZW5hbWUrKzsKKwkJCQlpZiAoZSA8ICcwJyB8fCBlID4gJzcnKQorCQkJCQlicmVhazsKKwkJCQljID0gdG9tb3lvX21ha2VfYnl0ZShjLCBkLCBlKTsKKwkJCQlpZiAodG9tb3lvX2lzX2ludmFsaWQoYykpCisJCQkJCWNvbnRpbnVlOyAvKiBwYXR0ZXJuIGlzIG5vdCBcMDAwICovCisJCQl9CisJCQlnb3RvIG91dDsKKwkJfSBlbHNlIGlmICh0b21veW9faXNfaW52YWxpZChjKSkgeworCQkJZ290byBvdXQ7CisJCX0KKwl9CisJaWYgKHBhdHRlc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SBDaGVjayB3aGV0aGVyIFRPTU9ZTyBpcyB2ZXJib3NlIG1vZGUuCisgKgorICogQGRvbWFpbjogUG9pbnRlciB0byAic3RydWN0IHRvbW95b19kb21haW5faW5mbyIuCisgKgorICogUmV0dXJucyB0cnVlIGlmIGRvbWFpbiBwb2xpY3kgdmlvbGF0aW9uIHdhcm5pbmcgc2hvdWxkIGJlIHByaW50ZWQgdG8KKyAqIGNvbnNvbGUuCisgKi8KK2Jvb2wgdG9tb3lvX3ZlcmJvc2VfbW9kZShjb25zdCBzdHJ1Y3QgdG9tb3lvX2RvbWFpbl9pbmZvICpkb21haW4pCit7CisJcmV0dXJuIHRvbW95b19jaGVja19mbGFncyhkb21haW4sIFRPTU9ZT19WRVJCT1NFKSAhPSAwOworfQorCisvKioKKyAqIHRvbW95b19kb21haW5fcXVvdGFfaXNfb2sgLSBDaGVjayBmb3IgZG9tYWluJ3MgcXVvdGEuCisgKgorICogQGRvbWFpbjogUG9pbnRlciB0byAic3RydWN0IHRvbW95b19kb21haW5faW5mbyIuCisgKgorICogUmV0dXJucyB0cnVlIGlmIHRoZSBkb21haW4gaXMgbm90IGV4Y2VlZGVkIHF1b3RhLCBmYWxzZSBvdGhlcndpc2UuCisgKi8KK2Jvb2wgdG9tb3lvX2RvbWFpbl9xdW90YV9pc19vayhzdHJ1Y3QgdG9tb3lvX2RvbWFpbl9pbmZvICogY29uc3QgZG9tYWluKQoreworCXVuc2lnbmVkIGludCBjb3VudCA9IDA7CisJc3RydWN0IHRvbW95b19hY2xfaW5mbyAqcHRyOworCisJaWYgKCFkb21haW4pCisJCXJldHVybiB0cnVlOworCWRvd25fcmVhZCgmdG9tb3lvX2RvbWFpbl9hY2xfaW5mb19saXN0X2xvY2spOworCWxpc3RfZm9yX2VhY2hfZW50cnkocHRyLCAmZG9tYWluLT5hY2xfaW5mb19saXN0LCBsaXN0KSB7CisJCWlmIChwdHItPnR5cGUgJiBUT01PWU9fQUNMX0RFTEVURUQpCisJCQljb250aW51Z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OSU5HICJUT01PWU8tV0FSTklORzogIgorCQkgICAgICAgIkRvbWFpbiAnJXMnIGhhcyBzbyBtYW55IEFDTHMgdG8gaG9sZC4gIgorCQkgICAgICAgIlN0b3BwZWQgbGVhcm5pbmcgbW9kZS5cbiIsIGRvbWFpbi0+ZG9tYWlubmFtZS0+bmFtZSk7CisJfQorCXJldHVybiBmYWxzZTsKK30KKworLyoqCisgKiB0b21veW9fZmluZF9vcl9hc3NpZ25fbmV3X3Byb2ZpbGUgLSBDcmVhdGUgYSBuZXcgcHJvZmlsZS4KKyAqCisgKiBAcHJvZmlsZTogUHJvZmlsZSBudW1iZXIgdG8gY3JlYXRlLgorICoKKyAqIFJldHVybnMgcG9pbnRlciB0byAic3RydWN0IHRvbW95b19wcm9maWxlIiBvbiBzdWNjZXNzLCBOVUxMIG90aGVyd2lzZS4KKyAqLworc3RhdGljIHN0cnVjdCB0b21veW9fcHJvZmlsZSAqdG9tb3lvX2ZpbmRfb3JfYXNzaWduX25ld19wcm9maWxlKGNvbnN0IHVuc2lnbmVkCisJCQkJCQkJCWludCBwcm9maWxlKQoreworCXN0YXRpYyBERUZJTkVfTVVURVgobG9jayk7CisJc3RydWN0IHRvbW95b19wcm9maWxlICpwdHIgPSBOVUxMOworCWludCBpOworCisJaWYgKHByb2ZpbGUgPj0gVE9NT1lPX01BWF9QUk9GSUxFUykKKwkJcmV0dXJuIE5VTEw7CisJLyoqKioqIEVYQ0xVU0lWRSBTRUNUSU9OIFNUQVJUICoqKioqLworCW11dGV4X2xvY2soJmxvY2spOworCXB0ciA9IHRvbW95b19wcm9maWxlX3B0cltwcm9maWxlXTsKKwlpZiAocHRyKQorCQlnb3RvIG9rOworCXB0ciA9IHRvbW95b19hbGxvY19lbGVtZW50KHNpemVvZigqcHRyKSk7CisJaWYgKCFwdHIpCisJCWdvdG8gb2s7CisJZm9yIChpID0gMDsgaSA8IFRPTU9ZT19NQVhfQ09OVFJPTF9JTkRFWDsgaSsrKQorCQlwdHItPnZhbHVlW2ldID0gdG9tb3lvX2NvbnRyb2xfYXJyYXlbaV0uY3VycmVudF92YWx1ZTsKKwltYigpOyAvKiBBdm9pZCBvdXQtb2Ytb3JkZXIgZXhlY3V0aW9uLiAqLworCXRvbW95b19wcm9maWxlX3B0cltwcm9maWxlXSA9IHB0cjsKKyBvazoKKwltdXRleF91bmxvY2soJmxvY2spOworCS8qKioqKiBFWENMVVNJVkUgU0VDVElPTiBFTkQgKioqKiovCisJcmV0dXJuIHB0cjsKK30KKworLyoqCisgKiB0b21veW9fd3JpdGVfcHJvZmlsZSAtIFdyaXRlIHRvIHByb2ZpbGUgdGFibGUuCisgKgorICogQGhlYWQ6IFBvaW50ZXIgdG8gInN0cnVjdCB0b21veW9faW9fYnVmZmVyIi4KKyAqCisgKiBSZXR1cm5zIDAgb24gc3VjY2VzcywgbmVnYXRpdmUgdmFsdWUgb3RoZXJ3aXNlLgorICovCitzdGF0aWMgaW50IHRvbW95b193cml0ZV9wcm9maWxlKHN0cnVjdCB0b21veW9faW9fYnVmZmVyICpoZWFkKQoreworCWNoYXIgKmRhdGEgPSBoZWFkLT53cml0ZV9idWY7CisJdW5zaWduZWQgaW50IGk7CisJdW5zaWduZWQgaW50IHZhbHVlOworCWNoYXIgKmNwOworCXN0cnVjdCB0b21veW9fcHJvZmlsZSAqcHJvZmlsZTsKKwl1bnNpZ25lZCBsb25nIG51bTsKKworCWNwID0gc3RyY2hyKGRhdGEsICctJyk7CisJaWYgKGNwKQorCQkqY3AgPSAnXDAnOworCWlmIChzdHJpY3Rfc3RydG91bChkYXRhLCAxMCwgJm51bSkpCisJCXJldHVybiAtRUlOVkFMOworCWlmIChjcCkKKwkJZGF0YSA9IGNwICsgMTsKKwlwcm9maWxlID0gdG9tb3lvX2ZpbmRfb3JfYXNzaWduX25ld19wcm9maWxlKG51bSk7CisJaWYgKCFwcm9maWxlKQorCQlyZXR1cm4gLUVJTlZBTDsKKwljcCA9IHN0cmNocihkYXRhLCAnPScpOworCWlmICghY3Ap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mhlYWQpCit7CisJc3RydWN0IGxpc3RfaGVhZCAqcG9zOworCWJvb2wgZG9uZSA9IHRydWU7CisKKwlpZiAoaGVhZC0+cmVhZF9lb2YpCisJCXJldHVybiAwOworCWRvd25fcmVhZCgmdG9tb3lvX2RvbWFpbl9saXN0X2xvY2spOworCWxpc3RfZm9yX2VhY2hfY29va2llKHBvcywgaGVhZC0+cmVhZF92YXIxLCAmdG9tb3lvX2RvbWFpbl9saXN0KSB7CisJCXN0cnVjdCB0b21veW9fZG9tYWluX2luZm8gKmRvbWFpbjsKKwkJZG9tYWluID0gbGlzdF9lbnRyeShwb3MsIHN0cnVjdCB0b21veW9fZG9tYWluX2luZm8sIGxpc3QpOworCQlpZiAoZG9tYWluLT5pc19kZWxldGVkKQorCQkJY29udGludWU7CisJCWlmICghdG9tb3lvX2lvX3ByaW50ZihoZWFkLCAiJXUgJXNcbiIsIGRvbWFpbi0+cHJvZmlsZSwKKwkJCQkgICAgICBkb21haW4tPmRvbWFpbm5hbWUtPm5hbWUpKSB7CisJCQlkb25lID0gZmFsc2U7CisJCQlicmVhazsKKwkJfQorCX0KKwl1cF9yZWFkKCZ0b21veW9fZG9tYWluX2xpc3RfbG9jayk7CisJaGVhZC0+cmVhZF9lb2YgPSBkb25lOworCXJldHVybiAwOworfQorCisvKioKKyAqIHRvbW95b193cml0ZV9waWQ6IFNwZWNpZnkgUElEIHRvIG9idGFpbiBkb21haW5uYW1lLgorICoKKyAqIEBoZWFkOiBQb2ludGVyIHRvICJzdHJ1Y3QgdG9tb3lvX2lvX2J1ZmZlciIuCisgKgorICogUmV0dXJucyAwLgorICovCitzdGF0aWMgaW50IHRvbW95b193cml0ZV9waWQoc3RydWN0IHRvbW95b19pb19idWZmZXIgKmhlYWQpCit7CisJdW5zaWduZWQgbG9uZyBwaWQ7CisJLyogTm8gZXJyb3IgY2hlY2suICovCisJc3RyaWN0X3N0cnRvdWwoaGVhZC0+d3JpdGVfYnVmLCAxMCwgJnBpZCk7CisJaGVh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x1ZGUgPGxpbnV4L2ZzLmg+CisjaW5jbHVkZSA8bGludXgvc2NoZWQuaD4KKyNpbmNsdWRlIDxsaW51eC9uYW1laS5oPgorI2luY2x1ZGUgPGxpbnV4L21vdW50Lmg+CisjaW5jbHVkZSA8bGludXgvbGlzdC5oPgorCitzdHJ1Y3QgZGVudHJ5Oworc3RydWN0IHZmc21vdW50OworCisvKiBUZW1wb3JhcnkgYnVmZmVyIGZvciBob2xkaW5nIHBhdGhuYW1lcy4gKi8KK3N0cnVjdCB0b21veW9fcGFnZV9idWZmZXIgeworCWNoYXIgYnVmZmVyWzQwOTZdOworfTsKKworLyogU3RydWN0dXJlIGZvciBob2xkaW5nIGEgdG9rZW4uICovCitzdHJ1Y3QgdG9tb3lvX3BhdGhfaW5mbyB7CisJY29uc3QgY2hhciAqbmFtZTsKKwl1MzIgaGFzaDsgICAgICAgICAgLyogPSBmdWxsX25hbWVfaGFzaChuYW1lLCBzdHJsZW4obmFtZSkpICovCisJdTE2IHRvdGFsX2xlbjsgICAgIC8qID0gc3RybGVuKG5hbWUpICAgICAgICAgICAgICAgICAgICAgICAqLworCXUxNiBjb25zdF9sZW47ICAgICAvKiA9IHRvbW95b19jb25zdF9wYXJ0X2xlbmd0aChuYW1lKSAgICAgKi8KKwlib29sIGlzX2RpcjsgICAgICAgLyogPSB0b21veW9fc3RyZW5kc3dpdGgobmFtZSwgIi8iKSAgICAgICovCisJYm9vbCBpc19wYXR0ZXJuZWQ7IC8qID0gdG9tb3lvX3BhdGhfY29udGFpbnNfcGF0dGVybihuYW1lKSAqLworCXUxNiBkZXB0aDsgICAgICAgICAvKiA9IHRvbW95b19wYXRoX2RlcHRoKG5hbWUpICAgICAgICAgICAgKi8KK307CisKKy8qCisgKiBUaGlzIGlzIHRoZSBtYXggbGVuZ3RoIG9mIGEgdG9rZW4uCisgKgorICogQSB0b2tlbiBjb25zaXN0cyBvZiBvbmx5IEFTQ0lJIHByaW50YWJsZSBjaGFyYWN0ZXJzLgorICogT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V09SRF9JTklUSUFMSVpFX0RPTUFJTiAgICAgICAgICJpbml0aWFsaXplX2RvbWFpbiAiCisjZGVmaW5lIFRPTU9ZT19LRVlXT1JEX0tFRVBfRE9NQUlOICAgICAgICAgICAgICAgImtlZXBfZG9tYWluICIKKyNkZWZpbmUgVE9NT1lPX0tFWVdPUkRfTk9fSU5JVElBTElaRV9ET01BSU4gICAgICAibm9faW5pdGlhbGl6ZV9kb21haW4gIgorI2RlZmluZSBUT01PWU9fS0VZV09SRF9OT19LRUVQX0RPTUFJTiAgICAgICAgICAgICJub19rZWVwX2RvbWFpbiAiCisjZGVmaW5lIFRPTU9ZT19LRVlXT1JEX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgInNlbGVjdCAiCisjZGVmaW5lIFRPTU9ZT19LRVlXT1JEX1VOREVMRVRFICAgICAgICAgICAgICAgICAgInVuZGVsZXRlICIKKyNkZWZpbmUgVE9NT1lPX0tFWVdPUkRfVVNFX1BST0ZJTEUgICAgICAgICAgICAgICAidXNlX3Byb2ZpbGUgIgorI2RlZmluZSBUT01PWU9fS0VZV09SRF9JR05PUkVfR0xPQkFMX0FMTE9XX1JFQUQgICJpZ25vcmVfZ2xvYmFsX2FsbG93X3JlYWQiCisvKiBBIGRvbWFpbiBkZWZpbml0aW9uIHN0YXJ0cyB3aXRoIDxrZXJuZWw+LiAqLworI2RlZmluZSBUT01PWU9fUk9PVF9OQU1FICAgICAgICAgICAgICAgICAgICAgICAgICI8a2VybmVsPiIKKyNkZWZpbmUgVE9NT1lPX1JPT1RfTkFNRV9MRU4gICAgICAgICAgICAgICAgICAgICAoc2l6ZW9mKFRPTU9ZT19ST09UX05BTUUpIC0gMSkKKworLyogSW5kZXggbnVtYmVycyBmb3IgQWNjZXNzIENvbnRyb2xzLiAqLworI2RlZmluZSBUT01PWU9fTUFDX0ZPUl9GSUxFICAgICAgICAgICAgICAgICAgMCAgLyogZG9tYWluX3BvbGljeS5jb25mICovCisjZGVmaW5lIFRPTU9ZT19NQVhfQUNDRVBUX0VOVFJZICAgICAgICAgICAgICAxCisjZGVmaW5lIFRPTU9ZT19WRVJCT1NFICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFRPTU9ZT19NQVhfQ09OVFJPTF9JTkRFWCAgICAgICAgICAgICAzCisKKy8qIFN0cnVjdHVyZSBmb3IgcmVhZGluZy93cml0aW5nIHBvbGljeSB2aWEgc2VjdXJpdHlmcyBpbnRlcmZhY2VzLiAqLworc3RydWN0IHRvbW95b19pb19idWZmZXIgeworCWludCAoKnJlYWQpIChzdHJ1Y3QgdG9tb3lvX2lvX2J1ZmZlciAqKTsKKwlpbnQgKCp3cml0ZSkgKHN0cnVjdCB0b21veW9faW9fYnVmZmVyICopOworCS8qIEV4Y2x1c2l2ZSBsb2NrIGZvciB0aGlzIHN0cnVjdHVyZS4gICAqLworCXN0cnVjdCBtdXRleCBpb19zZW07CisJLyogVGhlIHBvc2l0aW9uIGN1cnJlbnRseSByZWFkaW5nIGZyb20uICovCisJc3RydWN0IGxpc3RfaGVhZCAqcmVhZF92YXIxOworCS8qIEV4dHJhIHZhcmlhYmxlcyBmb3IgcmVhZGluZy4gICAgICAgICAqLworCXN0cnVjdCBsaXN0X2hlYWQgKnJlYWRfdmFyMjsKKwkvKiBUaGUgcG9zaXRpb24gY3VycmVudGx5IHdyaXRpbmcgdG8uICAgKi8KKwlzdHJ1Y3QgdG9tb3lvX2RvbWFpbl9pbmZvICp3cml0ZV92YXIxOworCS8qIFRoZSBzdGVwIGZvciByZWFkaW5nLiAgICAgICAgICAgICAgICAqLworCWludCByZWFkX3N0ZXA7CisJLyogQnVmZmVyIGZvciByZWFkaW5nLiAgICAgICAgICAgICAgICAgICovCisJY2hhciAqcmVhZF9idWY7CisJLyogRU9GIGZsYWcgZm9yIHJlYWRpbmcuICAgICAgICAgICAgICAgICovCisJYm9vbCByZWFkX2VvZjsKKwkvKiBSZWFkIGRvbWFpbiBBQ0wgb2Ygc3BlY2lmaWVkIFBJRD8gICAgKi8KKwlib29sIHJlYWRfc2luZ2xlX2RvbWFpbjsKKwkvKiBFeHRyYSB2YXJpYWJsZSBmb3IgcmVhZGluZy4gICAgICAgICAgKi8KKwl1OCByZWFkX2JpdDsKKwkvKiBCeXRlcyBhdmFpbGFibGUgZm9yIHJlYWRpbmcuICAgICAgICAgKi8KKwlpbnQgcmVhZF9hdmFpbDsKKwkvKiBTaXplIG9mIHJlYWQgYnVmZmVyLiAgICAgICAgICAgICAgICAgKi8KKwlpbnQgcmVhZGJ1Zl9zaXplOworCS8qIEJ1ZmZlciBmb3Igd3JpdGluZy4gICAgICAgICAgICAgICAgICAqLworCWNoYXIgKndyaXRlX2J1ZjsKKwkvKiBCeXRlcyBhdmFpbGFibGUgZm9yIHdyaXRpbmcuICAgICAgICAgKi8KKwlpbnQgd3JpdGVfYXZhaWw7CisJLyogU2l6ZSBvZiB3cml0ZSBidWZmZXIuICAgICAgICAgICAgICAgICovCisJaW50IHdyaXRlYnVmX3NpemU7Cit9OworCisvKiBDaGVjayB3aGV0aGVyIHRoZSBkb21haW4gaGFzIHRvbyBtYW55IEFDTCBlbnRyaWVzIHRvIGhvbGQuICovCitib29sIHRvbW95b19kb21haW5fcXVvdGFfaXNfb2soc3RydWN0IHRvbW95b19kb21haW5faW5mbyAqIGNvbnN0IGRvbWFpbik7CisvKiBUcmFuc2FjdGlvbmFsIHNwcmludGYoKSBmb3IgcG9saWN5IGR1bXAuICovCitib29sIHRvbW95b19pb19wcmludGYoc3RydWN0IHRvbW95b19pb19idWZmZXIgKmhlYWQsIGNvbnN0IGNoYXIgKmZtdCwgLi4uKQorCV9fYXR0cmlidXRlX18gKChmb3JtYXQocHJpbnRmLCAyLCAzKSkpOworLyogQ2hlY2sgd2hldGhlciB0aGUgZG9tYWlubmFtZSBpcyBjb3JyZWN0LiAqLworYm9vbCB0b21veW9faXNfY29ycmVjdF9kb21haW4oY29uc3QgdW5zaWduZWQgY2hhciAqZG9tYWlubmFtZSwKKwkJCSAgICAgIG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95b19kb21haW5faW5mbyAqZG9tYWluKTsKKy8qIEdldCB3YXJuaW5nIG1lc3NhZ2UuICovCitjb25zdCBjaGFyICp0b21veW9fZ2V0X21zZyhjb25zdCBib29sIGlzX2VuZm9yY2UpOworLyogQ29udmVydCBzaW5nbGUgcGF0aCBvcGVyYXRpb24gdG8gb3BlcmF0aW9uIG5hbWUuICovCitjb25zdCBjaGFyICp0b21veW9fc3Aya2V5d29yZChjb25zdCB1OCBvcGVyYXRpb24pOworLyogRGVsZXRlIGEgZG9tYWluLiAqLworaW50IHRvbW95b19kZWxldGVfZG9tYWluKGNoYXIgKmRhdGEpOworLyogQ3JlYXRlICJhbGlhcyIgZW50cnkgaW4gZXhjZXB0aW9uIHBvbGljeS4gKi8KK2ludCB0b21veW9fd3JpdGVfYWxpYXNfcG9saWN5KGNoYXIgKmRhdGEsIGNvbnN0IGJvb2wgaXNfZGVsZXRlKTsKKy8qCisgKiBDcmVhdGUgImluaXRpYWxpemVfZG9tYWluIiBhbmQgIm5vX2luaXRpYWxpemVfZG9tYWluIiBlbnRyeQorICogaW4gZXhjZXB0aW9uIHBvbGljeS4KKyAqLworaW50IHRvbW95b193cml0ZV9kb21haW5faW5pdGlhbGl6ZXJfcG9saWN5KGNoYXIgKmRhdGEsIGNvbnN0IGJvb2wgaXNfbm90LAorCQkJCQkgICBjb25zdCBib29sIGlzX2RlbGV0ZSk7CisvKiBDcmVhdGUgImtlZXBfZG9tYWluIiBhbmQgIm5vX2tlZXBfZG9tYWluIiBlbnRyeSBpbiBleGNlcHRpb24gcG9saWN5LiAqLworaW50IHRvbW95b193cml0ZV9kb21haW5fa2VlcGVyX3BvbGljeShjaGFyICpkYXRhLCBjb25zdCBib29sIGlzX25vdCwKKwkJCQkgICAgICBjb25zdCBib29sIGlzX2RlbGV0ZSk7CisvKgorICogQ3JlYXRlICJhbGxvd19yZWFkL3dyaXRlIiwgImFsbG93X2V4ZWN1dGUiLCAiYWxsb3dfcmVhZCIsICJhbGxvd193cml0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pOworCWVycm9yID0gMDsKKyBvdXQ6CisJdXBfd3JpdGUoJnRvbW95b19kb21haW5faW5pdGlhbGl6ZXJfbGlzdF9sb2NrKTsKKwkvKioqKiogRVhDTFVTSVZFIFNFQ1RJT04gRU5EICoqKioqLworCXJldHVybiBlcnJvcjsKK30KKworLyoqCisgKiB0b21veW9fcmVhZF9kb21haW5faW5pdGlhbGl6ZXJfcG9saWN5IC0gUmVhZCAic3RydWN0IHRvbW95b19kb21haW5faW5pdGlhbGl6ZXJfZW50cnkiIGxpc3QuCisgKgorICogQGhlYWQ6IFBvaW50ZXIgdG8gInN0cnVjdCB0b21veW9faW9fYnVmZmVyIi4KKyAqCisgKiBSZXR1cm5zIHRydWUgb24gc3VjY2VzcywgZmFsc2Ugb3RoZXJ3aXNlLgorICovCitib29sIHRvbW95b19yZWFkX2RvbWFpbl9pbml0aWFsaXplcl9wb2xpY3koc3RydWN0IHRvbW95b19pb19idWZmZXIgKmhlYWQpCit7CisJc3RydWN0IGxpc3RfaGVhZCAqcG9zOworCWJvb2wgZG9uZSA9IHRydWU7CisKKwlkb3duX3JlYWQoJnRvbW95b19kb21haW5faW5pdGlhbGl6ZXJfbGlzdF9sb2NrKTsKKwlsaXN0X2Zvcl9lYWNoX2Nvb2tpZShwb3MsIGhlYWQtPnJlYWRfdmFyMiwKKwkJCSAgICAgJnRvbW95b19kb21haW5faW5pdGlhbGl6ZXJfbGlzdCkgeworCQljb25zdCBjaGFyICpubzsKKwkJY29uc3QgY2hhciAqZnJvbSA9ICIiOworCQljb25zdCBjaGFyICpkb21haW4gPSAiIjsKKwkJc3RydWN0IHRvbW95b19kb21haW5faW5pdGlhbGl6ZXJfZW50cnkgKnB0cjsKKwkJcHRyID0gbGlzdF9lbnRyeShwb3MsIHN0cnVjdCB0b21veW9fZG9tYWluX2luaXRpYWxpemVyX2VudHJ5LAorCQkJCSAgbGlzdCk7CisJCWlmIChwdHItPmlzX2RlbGV0ZWQpCisJCQljb250aW51ZTsKKwkJbm8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kVMKTsKKwlpZiAocCkKKwkJYXRvbWljX2FkZChrc2l6ZShwKSwgJnRvbW95b19keW5hbWljX21lbW9yeV9zaXplKTsKKwlyZXR1cm4gcDsKK30KKworLyoqCisgKiB0b21veW9fZnJlZSAtIFJlbGVhc2UgbWVtb3J5IGFsbG9jYXRlZCBieSB0b21veW9fYWxsb2MoKS4KKyAqCisgKiBAcDogUG9pbnRlciByZXR1cm5lZCBieSB0b21veW9fYWxsb2MoKS4gTWF5IGJlIE5VTEwuCisgKgorICogUmV0dXJucyBub3RoaW5nLgorICovCit2b2lkIHRvbW95b19mcmVlKGNvbnN0IHZvaWQgKnApCit7CisJaWYgKHApIHsKKwkJYXRvbWljX3N1Yihrc2l6ZShwKSwgJnRvbW95b19keW5hbWljX21lbW9yeV9zaXplKTsKKwkJa2ZyZWUocCk7CisJfQorfQorCisvKioKKyAqIHRvbW95b19yZWFkX21lbW9yeV9jb3VudGVyIC0gQ2hlY2sgZm9yIG1lbW9yeSB1c2FnZSBpbiBieXRlcy4KKyAqCisgKiBAaGVhZDogUG9pbnRlciB0byAic3RydWN0IHRvbW95b19pb19idWZmZXIiLgorICoKKyAqIFJldHVybnMgbWVtb3J5IHVzYWdlLgorICovCitpbnQgdG9tb3lvX3JlYWRfbWVtb3J5X2NvdW50ZXIoc3RydWN0IHRvbW95b19pb19idWZmZXIgKmhlYWQpCit7CisJaWYgKCFoZWFkLT5yZWFkX2VvZikgeworCQljb25zdCB1bnNpZ25lZCBpbnQgc2hhcmVkCisJCQk9IHRvbW95b19hbGxvY2F0ZWRfbWVtb3J5X2Zvcl9zYXZlbmFtZTsKKwkJY29uc3QgdW5zaWduZWQgaW50IHByaXZhdGUKKwkJCT0gdG9tb3lvX2FsbG9jYXRlZF9tZW1vcnlfZm9yX2VsZW1lbnRzOworCQljb25zdCB1bnNpZ25lZCBpbnQgZHluYW1pYworCQkJPSBhdG9taWNfcmVhZCgmdG9tb3lvX2R5bmFtaWNfbWVtb3J5X3NpemUpOworCQlja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QgdG9tb3lvX3JlYWxwYXRoX2luaXQodm9pZCk7CisKKyNlbmRpZiAvKiAhZGVmaW5lZChfU0VDVVJJVFlfVE9NT1lPX1JFQUxQQVRIX0gpICovCmRpZmYgLS1naXQgYS9zZWN1cml0eS90b21veW8vdG9tb3lvLmMgYi9zZWN1cml0eS90b21veW8vdG9tb3lvLmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uM2VlZWFlMQotLS0gL2Rldi9udWxsCisrKyBiL3NlY3VyaXR5L3RvbW95by90b21veW8uYwpAQCAtMCwwICsxLDI5NCBAQAorLyoKKyAqIHNlY3VyaXR5L3RvbW95by90b21veW8uYworICoKKyAqIExTTSBob29rcyBmb3IgVE9NT1lPIExpbnV4LgorICoKKyAqIENvcHlyaWdodCAoQykgMjAwNS0yMDA5ICBOVFQgREFUQSBDT1JQT1JBVElPTgorICoKKyAqIFZlcnNpb246IDIuMi4wLXByZSAgIDIwMDkvMDIvMDEKKyAqCisgKi8KKworI2luY2x1ZGUgPGxpbnV4L3NlY3VyaXR5Lmg+CisjaW5jbHVkZSAiY29tbW9uLmgiCisjaW5jbHVkZSAidG9tb3lvLmgiCisjaW5jbHVkZSAicmVhbHBhdGguaCIKKworc3RhdGljIGludCB0b21veW9fY3JlZF9wcmVwYXJlKHN0cnVjdCBjcmVkICpuZXcsIGNvbnN0IHN0cnVjdCBjcmVkICpvbGQsCisJCQkgICAgICAgZ2ZwX3QgZ2ZwKQoreworCS8qCisJICogU2luY2UgInN0cnVjdCB0b21veW9fZG9tYWluX2luZm8gKiIgaXMgYSBzaGFyYWJsZSBwb2ludGVyLAorCSAqIHdlIGRvbid0IG5lZWQgdG8gZHVwbGljYXRlLgorCSAqLworCW5ldy0+c2VjdXJpdHkgPSBvbGQtPnNlY3VyaXR5OworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHRvbW95b19icHJtX3NldF9jcmVkcyhzdHJ1Y3QgbGludXhfYmlucHJtICpicHJtKQore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1ZjsKKwl0b21veW9fZnJlZShidWYpOworCXJldHVybiBOVUxMOworfQorCitzdGF0aWMgaW50IHRvbW95b19zeXNjdGwoc3RydWN0IGN0bF90YWJsZSAqdGFibGUsIGludCBvcCkKK3sKKwlpbnQgZXJyb3I7CisJY2hhciAqbmFtZTsKKworCW9wICY9IE1BWV9SRUFEIHwgTUFZX1dSSVRFOworCWlmICghb3ApCisJCXJldHVybiAwOworCW5hbWUgPSB0b21veW9fc3lzY3RsX3BhdGgodGFibGUpOworCWlmICghbmFtZSkKKwkJcmV0dXJuIC1FTk9NRU07CisJZXJyb3IgPSB0b21veW9fY2hlY2tfZmlsZV9wZXJtKHRvbW95b19kb21haW4oKSwgbmFtZSwgb3ApOworCXRvbW95b19mcmVlKG5hbWUpOworCXJldHVybiBlcnJvcjsKK30KKyNlbmRpZgorCitzdGF0aWMgaW50IHRvbW95b19wYXRoX3RydW5jYXRlKHN0cnVjdCBwYXRoICpwYXRoLCBsb2ZmX3QgbGVuZ3RoLAorCQkJCXVuc2lnbmVkIGludCB0aW1lX2F0dHJzKQoreworCXJldHVybiB0b21veW9fY2hlY2tfMXBhdGhfcGVybSh0b21veW9fZG9tYWluKCksCisJCQkJICAgICAgIFRPTU9ZT19UWVBFX1RSVU5DQVRFX0FDTCwKKwkJCQkgICAgICAgcGF0aCk7Cit9CisKK3N0YXRpYyBpbnQgdG9tb3lvX3BhdGhfdW5saW5rKHN0cnVjdCBwYXRoICpwYXJlbnQsIHN0cnVjdCBkZW50cnkgKmRlbnRyeSkKK3sKKwlzdHJ1Y3QgcGF0aCBwYXRoID0geyBwYXJlbnQtPm1udCwgZGVudHJ5IH07CisJcmV0dXJuIHRvbW95b19jaGVja18xcGF0aF9wZXJtKHRvbW95b19kb21haW4oKSwKKwkJCQkgICAgICAgVE9NT1lPX1RZUEVfVU5MSU5LX0FDTCwKKwkJCQkgICAgICAgJnBhdGgpOworfQorCitzdGF0aWMgaW50IHRvbW95b19wYXRoX21rZGlyKHN0cnVjd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GVjdmUoKS4gKi8KKwlpZiAoY3VycmVudC0+aW5fZXhlY3ZlKQorCQlyZXR1cm4gMDsKKwlyZXR1cm4gdG9tb3lvX2NoZWNrX29wZW5fcGVybWlzc2lvbih0b21veW9fZG9tYWluKCksICZmLT5mX3BhdGgsIGZsYWdzKTsKK30KKworc3RhdGljIHN0cnVjdCBzZWN1cml0eV9vcGVyYXRpb25zIHRvbW95b19zZWN1cml0eV9vcHMgPSB7CisJLm5hbWUgICAgICAgICAgICAgICAgPSAidG9tb3lvIiwKKwkuY3JlZF9wcmVwYXJlICAgICAgICA9IHRvbW95b19jcmVkX3ByZXBhcmUsCisJLmJwcm1fc2V0X2NyZWRzICAgICAgPSB0b21veW9fYnBybV9zZXRfY3JlZHMsCisJLmJwcm1fY2hlY2tfc2VjdXJpdHkgPSB0b21veW9fYnBybV9jaGVja19zZWN1cml0eSwKKyNpZmRlZiBDT05GSUdfU1lTQ1RMCisJLnN5c2N0bCAgICAgICAgICAgICAgPSB0b21veW9fc3lzY3RsLAorI2VuZGlmCisJLmZpbGVfZmNudGwgICAgICAgICAgPSB0b21veW9fZmlsZV9mY250bCwKKwkuZGVudHJ5X29wZW4gICAgICAgICA9IHRvbW95b19kZW50cnlfb3BlbiwKKwkucGF0aF90cnVuY2F0ZSAgICAgICA9IHRvbW95b19wYXRoX3RydW5jYXRlLAorCS5wYXRoX3VubGluayAgICAgICAgID0gdG9tb3lvX3BhdGhfdW5saW5rLAorCS5wYXRoX21rZGlyICAgICAgICAgID0gdG9tb3lvX3BhdGhfbWtkaXIsCisJLnBhdGhfcm1kaXIgICAgICAgICAgPSB0b21veW9fcGF0aF9ybWRpciwKKwkucGF0aF9zeW1saW5rICAgICAgICA9IHRvbW95b19wYXRoX3N5bWxpbmssCisJLnBhdGhfbWtub2QgICAgICAgICAgPSB0b21veW9fcGF0aF9ta25vZCwKKwkucGF0aF9saW5rICAgICAgICAgICA9IHRvbW95b19wYXRoX2xpbmssCisJLnBhdGhfcmVuYW1lICA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QUNMICAgICAgIDEKKyNkZWZpbmUgVE9NT1lPX01BWF9ET1VCTEVfUEFUSF9PUEVSQVRJT04gMgorCisjZGVmaW5lIFRPTU9ZT19ET01BSU5QT0xJQ1kgICAgICAgICAgMAorI2RlZmluZSBUT01PWU9fRVhDRVBUSU9OUE9MSUNZICAgICAgIDEKKyNkZWZpbmUgVE9NT1lPX0RPTUFJTl9TVEFUVVMgICAgICAgICAyCisjZGVmaW5lIFRPTU9ZT19QUk9DRVNTX1NUQVRVUyAgICAgICAgMworI2RlZmluZSBUT01PWU9fTUVNSU5GTyAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgVE9NT1lPX1NFTEZET01BSU4gICAgICAgICAgICA1CisjZGVmaW5lIFRPTU9ZT19WRVJTSU9OICAgICAgICAgICAgICAgNgorI2RlZmluZSBUT01PWU9fUFJPRklMRSAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgVE9NT1lPX01BTkFHRVIgICAgICAgICAgICAgICA4CisKK2V4dGVybiBzdHJ1Y3QgdG9tb3lvX2RvbWFpbl9pbmZvIHRvbW95b19rZXJuZWxfZG9tYWluOworCitzdGF0aWMgaW5saW5lIHN0cnVjdCB0b21veW9fZG9tYWluX2luZm8gKnRvbW95b19kb21haW4odm9pZCkKK3sKKwlyZXR1cm4gY3VycmVudF9jcmVkKCktPnNlY3VyaXR5OworfQorCisvKiBDYWxsZXIgaG9sZHMgdGFza2xpc3RfbG9jayBzcGlubG9jay4gKi8KK3N0YXRpYyBpbmxpbmUgc3RydWN0IHRvbW95b19kb21haW5faW5mbyAqdG9tb3lvX3JlYWxfZG9tYWluKHN0cnVjdCB0YXNrX3N0cnVjdAorCQkJCQkJCSAgICAqdGFzaykKK3sKKwkvKioqKiogQ1JJVElDQUwgU0VDVElPTiBTVEFSVCAqKioqKi8KKwljb25zdCBzdHJ1Y3QgY3JlZCAqY3JlZCA9IGdldF90YXNrX2NyZWQodGFzayk7CisJc3RydWN0IHRvbW95b19kb21haW5faW5mbyAqZG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tYXBwaW5nLmg+CisjaW5jbHVkZSA8bGludXgvaW5pdC5oPgorI2luY2x1ZGUgPGxpbnV4L2ludGVycnVwdC5oPgorI2luY2x1ZGUgPGxpbnV4L21vZHVsZS5oPgorI2luY2x1ZGUgPGxpbnV4L3BsYXRmb3JtX2RldmljZS5oPgorI2luY2x1ZGUgPGxpbnV4L2lvLmg+CisKKyNpbmNsdWRlIDxzb3VuZC9jb3JlLmg+CisjaW5jbHVkZSA8c291bmQvaW5pdHZhbC5oPgorI2luY2x1ZGUgPHNvdW5kL3BjbS5oPgorI2luY2x1ZGUgPHNvdW5kL3BjbV9wYXJhbXMuaD4KKyNpbmNsdWRlIDxzb3VuZC9hdG1lbC1hYmRhYy5oPgorCisvKiBEQUMgcmVnaXN0ZXIgb2Zmc2V0cyAqLworI2RlZmluZSBEQUNfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwCisjZGVmaW5lIERBQ19DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDgKKyNkZWZpbmUgREFDX0lOVF9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwYworI2RlZmluZSBEQUNfSU5UX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDEwCisjZGVmaW5lIERBQ19JTlRfRElTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMTQKKyNkZWZpbmUgREFDX0lOVF9DTFIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAxOAorI2RlZmluZSBEQUNfSU5UX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDFjCisKKy8qIEJpdGZpZWxkcyBpbiBDVFJMICovCisjZGVmaW5lIERBQ19TV0FQX09GRlNFVCAgICAgICAgICAgICAgICAgICAgICAgICAzMAorI2RlZmluZSBEQUNfU1dBUF9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBEQUNfRU5fT0ZG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bV9jb3VudCk7CisKKwlwREFRID0gY2hpcC0+bWFwcGVkYmFzZSArIERBUlFfREFUQV9CVUZGOworCisJZm9yIChuID0gMDsgbiA8IHBjbV9wZXJpb2RzOyArK24sIHBEQVEgKz0gREFRRFNfX3NpemUpIHsKKwkJdTMyIHRtcCA9IHBjbV9jb3VudCAqIG47CisKKwkJd3JpdGV3KFBDVE9EU1BfQkFTRUQodG1wICsgMHgzMDAwKSwgcERBUSArIERBUURTX3dTdGFydCk7CisJCXdyaXRldyhwY21fY291bnQsIHBEQVEgKyBEQVFEU193U2l6ZSk7CisJCXdyaXRldygxLCBwREFRICsgREFRRFNfd0Zvcm1hdCk7CisJCXdyaXRldyhjaGlwLT5jYXB0dXJlX3NhbXBsZV9zaXplLCBwREFRICsgREFRRFNfd1NhbXBsZVNpemUpOworCQl3cml0ZXcoY2hpcC0+Y2FwdHVyZV9jaGFubmVscywgcERBUSArIERBUURTX3dDaGFubmVscyk7CisJCXdyaXRldyhjaGlwLT5jYXB0dXJlX3NhbXBsZV9yYXRlLCBwREFRICsgREFRRFNfd1NhbXBsZVJhdGUpOworCQl3cml0ZXcoSElNVF9SRUNPUkRfRE9ORSAqIDB4MTAwICsgbiwgcERBUSArIERBUURTX3dJbnRNc2cpOworCQl3cml0ZXcobiwgcERBUSArIERBUURTX3dGbGFncyk7CisJfQorfQorCitzdGF0aWMgc3RydWN0IHNuZF9wY21faGFyZHdhcmUgc25kX21zbmRfcGxheWJhY2sgPSB7CisJLmluZm8gPQkJCVNORFJWX1BDTV9JTkZPX01NQVAgfAorCQkJCVNORFJWX1BDTV9JTkZPX0lOVEVSTEVBVkVEIHwKKwkJCQlTTkRSVl9QQ01fSU5GT19NTUFQX1ZBTElELAorCS5mb3JtYXRzID0JCVNORFJWX1BDTV9GTVRCSVRfVTggfCBTTkRSVl9QQ01fRk1UQklUX1MxNl9MRSwKKwkucmF0ZXMgPQkJU05EUlZfUENNX1JBVEVfODAwMF80ODAwMCwKKwkucmF0ZV9taW4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gKGlvW2ldICUgMHgxMCkgIT0gMCkgeworCQlwcmludGsoS0VSTl9FUlIgTE9HTkFNRQorCQkJIjogXCJpb1wiIC0gRFNQIEkvTyBiYXNlIG11c3Qgd2l0aGluIHRoZSByYW5nZSAweDEwMCAiCisJCQkidG8gMHgzRTAgYW5kIG11c3QgYmUgZXZlbmx5IGRpdmlzaWJsZSBieSAweDEwXG4iKTsKKwkJcmV0dXJuIDA7CisJfQorI2VuZGlmIC8qIE1TTkRfQ0xBU1NJQyAqLworCisJaWYgKCEoaXJxW2ldID09IDUgfHwKKwkgICAgICBpcnFbaV0gPT0gNyB8fAorCSAgICAgIGlycVtpXSA9PSA5IHx8CisJICAgICAgaXJxW2ldID09IDEwIHx8CisJICAgICAgaXJxW2ldID09IDExIHx8CisJICAgICAgaXJxW2ldID09IDEyKSkgeworCQlwcmludGsoS0VSTl9FUlIgTE9HTkFNRQorCQkJIjogXCJpcnFcIiAtIG11c3QgYmUgc2V0IHRvIDUsIDcsIDksIDEwLCAxMSBvciAxMlxuIik7CisJCXJldHVybiAwOworCX0KKworCWlmICghKG1lbVtpXSA9PSAweGIwMDAwIHx8CisJICAgICAgbWVtW2ldID09IDB4YzgwMDAgfHwKKwkgICAgICBtZW1baV0gPT0gMHhkMDAwMCB8fAorCSAgICAgIG1lbVtpXSA9PSAweGQ4MDAwIHx8CisJICAgICAgbWVtW2ldID09IDB4ZTAwMDAgfHwKKwkgICAgICBtZW1baV0gPT0gMHhlODAwMCkpIHsKKwkJcHJpbnRrKEtFUk5fRVJSIExPR05BTUUgIjogXCJtZW1cIiAtIG11c3QgYmUgc2V0IHRvICIKKwkJICAgICAgICIweGIwMDAwLCAweGM4MDAwLCAweGQwMDAwLCAweGQ4MDAwLCAweGUwMDAwIG9yICIKKwkJICAgICAgICIweGU4MDAwXG4iKTsKKwkJcmV0dXJuIDA7CisJfQorCisjaWZuZGVmIE1TTkRfQ0xBU1NJQworCWlmIChjZmdbaV0gPT0gU05EUlZfQVVUT19QT1J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yLmMgYi9zb3VuZC9pc2EvbXNuZC9tc25kX3Bpbm5hY2xlX21peGVyLmMKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNDk0MDU4YQotLS0gL2Rldi9udWxsCisrKyBiL3NvdW5kL2lzYS9tc25kL21zbmRfcGlubmFjbGVfbWl4ZXIuYwpAQCAtMCwwICsxLDM0MyBAQAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorCQkJICBtc25kX3Bpbm5hY2xlX21peGVyLmMgIC0gIGRlc2NyaXB0aW9uCisJCQkgICAgIC0tLS0tLS0tLS0tLS0tLS0tLS0KKyAgICBiZWdpbgkJOiBGcmUgSnVuIDcgMjAwMgorICAgIGNvcHlyaWdodCAJCTogKEMpIDIwMDIgYnkga2Fyc3RlbiB3aWVzZQorICAgIGVtYWlsCQk6IGFubmFiZWxsZXNnYXJkZW5AeWFob28uZGUKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCQkJCQkJCSAgICAgIAkJICAgKgorICogICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeSAgKgorICogICBpdCB1bmRlciB0aGUgdGVybXMgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSAgKgorICogICB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uOyBlaXRoZXIgdmVyc2lvbiAyIG9mIHRoZSBMaWNlbnNlLCBvciAgICAgKgorICogICAoYXQgeW91ciBvcHRp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wMikpOwogCXByaW50aygiICAweDIyOiBBREMgY2xvY2sgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDIyKSk7Ci0JcHJpbnRrKCIgIDB4MDM6IHJpZ2h0IEFVWDEgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MDMpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDAzOiByaWdodCBBVVgxICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDAzKSk7CiAJcHJpbnRrKCIgIDB4MjM6IEFEQyBhbHQgcmF0ZSAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MjMpKTsKLQlwcmludGsoIiAgMHgwNDogbGVmdCBDRCAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNCkpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MDQ6IGxlZnQgQ0QgICAgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MDQpKTsKIAlwcmludGsoIiAgMHgyNDogQURDIHBsbCBNICAgICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgyNCkpOwotCXByaW50aygiICAweDA1OiByaWdodCBDRCAgICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDA1KSk7CisJcHJpbnRrKEtFUk5fREVCVUcKKwkgICAgICAgIiAgMHgwNTogcmlnaHQgQ0QgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNSkpOwogCXByaW50aygiICAweDI1OiBBREMgcGxsIE4gICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI1KSk7Ci0JcHJpbnRrKCIgIDB4MDY6IGxlZnQgbGluZSAgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MDYpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDA2OiBsZWZ0IGxpbmUgICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDA2KSk7CiAJcHJpbnRrKCIgIDB4MjY6IFN5bnRoIHBsbCBNICAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MjYpKTsKLQlwcmludGsoIiAgMHgwNzogcmlnaHQgbGluZSAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwNykpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MDc6IHJpZ2h0IGxpbmUgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MDcpKTsKIAlwcmludGsoIiAgMHgyNzogU3ludGggcGxsIE4gICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgyNykpOwotCXByaW50aygiICAweDA4OiBNSUMgICAgICAgICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDA4KSk7CisJcHJpbnRrKEtFUk5fREVCVUcKKwkgICAgICAgIiAgMHgwODogTUlDICAgICAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwOCkpOwogCXByaW50aygiICAweDI4OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDI4KSk7Ci0JcHJpbnRrKCIgIDB4MDk6IEdhbWUgcG9ydCAgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MDkpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDA5OiBHYW1lIHBvcnQgICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDA5KSk7CiAJcHJpbnRrKCIgIDB4Mjk6IC0tLSAgICAgICAgICAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MjkpKTsKLQlwcmludGsoIiAgMHgwYTogbGVmdCBzeW50aCAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwYSkpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MGE6IGxlZnQgc3ludGggICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MGEpKTsKIAlwcmludGsoIiAgMHgyYTogTVBVNDAxICAgICAgICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgyYSkpOwotCXByaW50aygiICAweDBiOiByaWdodCBzeW50aCAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDBiKSk7CisJcHJpbnRrKEtFUk5fREVCVUcKKwkgICAgICAgIiAgMHgwYjogcmlnaHQgc3ludGggICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgwYikpOwogCXByaW50aygiICAweDJiOiBkcml2ZSBjdHJsICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDJiKSk7Ci0JcHJpbnRrKCIgIDB4MGM6IGxlZnQgQVVYMiAgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MGMpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDBjOiBsZWZ0IEFVWDIgICAgICAgPSAweCUwMnggIC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ICAgICAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MmYpKTsKLQlwcmludGsoIiAgMHgxMDogbGVmdCBQQ00gICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMCkpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MTA6IGxlZnQgUENNICAgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MTApKTsKIAlwcmludGsoIiAgMHgzMDogYW5hbG9nIHBvd2VyICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgzMCkpOwotCXByaW50aygiICAweDExOiByaWdodCBQQ00gICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDExKSk7CisJcHJpbnRrKEtFUk5fREVCVUcKKwkgICAgICAgIiAgMHgxMTogcmlnaHQgUENNICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMSkpOwogCXByaW50aygiICAweDMxOiBhbmFsb2cgcG93ZXIgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDMxKSk7Ci0JcHJpbnRrKCIgIDB4MTI6IERNQSBkYXRhIGZvcm1hdCA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MTIpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDEyOiBETUEgZGF0YSBmb3JtYXQgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDEyKSk7CiAJcHJpbnRrKCIgIDB4MzI6IC0tLSAgICAgICAgICAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MzIpKTsKLQlwcmludGsoIiAgMHgxMzogUC9DIGVuYWJsZSAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxMykpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MTM6IFAvQyBlbmFibGUgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MTMpKTsKIAlwcmludGsoIiAgMHgzMzogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgzMykpOwotCXByaW50aygiICAweDE0OiBVL0QgYnV0dG9uICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDE0KSk7CisJcHJpbnRrKEtFUk5fREVCVUcKKwkgICAgICAgIiAgMHgxNDogVS9EIGJ1dHRvbiAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNCkpOwogCXByaW50aygiICAweDM0OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM0KSk7Ci0JcHJpbnRrKCIgIDB4MTU6IHJldmlzaW9uICAgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MTUpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDE1OiByZXZpc2lvbiAgICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDE1KSk7CiAJcHJpbnRrKCIgIDB4MzU6IC0tLSAgICAgICAgICAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MzUpKTsKLQlwcmludGsoIiAgMHgxNjogQURDIG91dHB1dCBjdHJsID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNikpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MTY6IEFEQyBvdXRwdXQgY3RybCA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MTYpKTsKIAlwcmludGsoIiAgMHgzNjogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgzNikpOwotCXByaW50aygiICAweDE3OiAtLS0gICAgICAgICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDE3KSk7CisJcHJpbnRrKEtFUk5fREVCVUcKKwkgICAgICAgIiAgMHgxNzogLS0tICAgICAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxNykpOwogCXByaW50aygiICAweDM3OiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDM3KSk7Ci0JcHJpbnRrKCIgIDB4MTg6IERNQSBBIHVwcGVyIGNudCA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MTgpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDE4OiBETUEgQSB1cHBlciBjbnQgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDE4KSk7CiAJcHJpbnRrKCIgIDB4Mzg6IC0tLSAgICAgICAgICAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MzgpKTsKLQlwcmludGsoIiAgMHgxOTogRE1BIEEgbG93ZXIgY250ID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxOSkpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MTk6IERNQSBBIGxvd2VyIGNudCA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MTkpKTsKIAlwcmludGsoIiAgMHgzOTogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgzOSkpOwotCXByaW50aygiICAweDFhOiAtLS0gICAgICAgICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDFhKSk7CisJcHJpbnRrKEtFUk5fREVCVUcKKwkgICAgICAgIiAgMHgxYTogLS0tICAgICAgICAgICAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxYSkpOwogCXByaW50aygiICAweDNhOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNhKSk7Ci0JcHJpbnRrKCIgIDB4MWI6IC0tLSAgICAgICAgICAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MWIpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDFiOiAtLS0gICAgICAgICAgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDFiKSk7CiAJcHJpbnRrKCIgIDB4M2I6IC0tLSAgICAgICAgICAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4M2IpKTsKLQlwcmludGsoIiAgMHgxYzogRE1BIEMgdXBwZXIgY250ID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxYykpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MWM6IERNQSBDIHVwcGVyIGNudCA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MWMpKTsKIAlwcmludGsoIiAgMHgzYzogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgzYykpOwotCXByaW50aygiICAweDFkOiBETUEgQyB1cHBlciBjbnQgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDFkKSk7CisJcHJpbnRrKEtFUk5fREVCVUcKKwkgICAgICAgIiAgMHgxZDogRE1BIEMgdXBwZXIgY250ID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxZCkpOwogCXByaW50aygiICAweDNkOiAtLS0gICAgICAgICAgICAgPSAweCUwMnhcbiIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDNkKSk7Ci0JcHJpbnRrKCIgIDB4MWU6IFBDTSByYXRlIGxvdyAgICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MWUpKTsKKwlwcmludGsoS0VSTl9ERUJVRworCSAgICAgICAiICAweDFlOiBQQ00gcmF0ZSBsb3cgICAgPSAweCUwMnggICIsIHNuZF9zb25pY3ZpYmVzX2luKHNvbmljLCAweDFlKSk7CiAJcHJpbnRrKCIgIDB4M2U6IC0tLSAgICAgICAgICAgICA9IDB4JTAyeFxuIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4M2UpKTsKLQlwcmludGsoIiAgMHgxZjogUENNIHJhdGUgaGlnaCAgID0gMHglMDJ4ICAiLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgxZikpOworCXByaW50ayhLRVJOX0RFQlVHCisJICAgICAgICIgIDB4MWY6IFBDTSByYXRlIGhpZ2ggICA9IDB4JTAyeCAgIiwgc25kX3NvbmljdmliZXNfaW4oc29uaWMsIDB4MWYpKTsKIAlwcmludGsoIiAgMHgzZjogLS0tICAgICAgICAgICAgID0gMHglMDJ4XG4iLCBzbmRfc29uaWN2aWJlc19pbihzb25pYywgMHgzZikpOwogfQogCkBAIC00NzYsOCArNTExLDggQEAKIAkqcmVzX20gPSBtOwogCSpyZXNfbiA9IG47CiAjaWYgMAotCXByaW50aygibWV0cmljID0gJWksIHhtID0g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ldHVybjsKKwl9CisKKwkvKiBEZWJvdW5jZSAqLworCW1zbGVlcCgyMDApOworCisJcmVnID0gd204MzUwX3JlZ19yZWFkKHdtODM1MCwgV004MzUwX0pBQ0tfUElOX1NUQVRVUyk7CisJaWYgKHJlZyAmIG1hc2spCisJCXJlcG9ydCA9IGphY2stPnJlcG9ydDsKKwllbHNlCisJCXJlcG9ydCA9IDA7CisKKwlzbmRfc29jX2phY2tfcmVwb3J0KGphY2stPmphY2ssIHJlcG9ydCwgamFjay0+cmVwb3J0KTsKK30KKworLyoqCisgKiB3bTgzNTBfaHBfamFja19kZXRlY3QgLSBFbmFibGUgaGVhZHBob25lIGphY2sgZGV0ZWN0aW9uLgorICoKKyAqIEBjb2RlYzogIFdNODM1MCBjb2RlYworICogQHdoaWNoOiAgbGVmdCBvciByaWdodCBqYWNrIGRldGVjdCBzaWduYWwKKyAqIEBqYWNrOiAgIGphY2sgdG8gcmVwb3J0IGRldGVjdGlvbiBldmVudHMgb24KKyAqIEByZXBvcnQ6IHZhbHVlIHRvIHJlcG9ydAorICoKKyAqIEVuYWJsZXMgdGhlIGhlYWRwaG9uZSBqYWNrIGRldGVjdGlvbiBvZiB0aGUgV004MzUwLgorICovCitpbnQgd204MzUwX2hwX2phY2tfZGV0ZWN0KHN0cnVjdCBzbmRfc29jX2NvZGVjICpjb2RlYywgZW51bSB3bTgzNTBfamFjayB3aGljaCwKKwkJCSAgc3RydWN0IHNuZF9zb2NfamFjayAqamFjaywgaW50IHJlcG9ydCkKK3sKKwlzdHJ1Y3Qgd204MzUwX2RhdGEgKnByaXYgPSBjb2RlYy0+cHJpdmF0ZV9kYXRhOworCXN0cnVjdCB3bTgzNTAgKndtODM1MCA9IGNvZGVjLT5jb250cm9sX2RhdGE7CisJaW50IGlycTsKKwlpbnQgZW5hOworCisJc3dpdGNoICh3aGljaCkgeworCWNhc2UgV004MzUwX0pETDoKKwkJcHJpdi0+aHBsLmphY2sgPSBqYWNrOworCQlwcml2LT5ocGwucmVw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HQgREFDIiwgIlJpZ2h0IFBsYXliYWNrIiwgV004NDAwX1BPV0VSX01BTkFHRU1FTlRfMywKKwlXTTg0MDBfREFDUl9FTkFfU0hJRlQsIDApLAorCisvKiBMT01JWCAqLworU05EX1NPQ19EQVBNX01JWEVSX0UoIkxPTUlYIiwgV004NDAwX1BPV0VSX01BTkFHRU1FTlRfMywKKwkJICAgICBXTTg0MDBfTE9NSVhfRU5BX1NISUZULAorCQkgICAgIDAsICZ3bTg0MDBfZGFwbV9sb21peF9jb250cm9sc1swXSwKKwkJICAgICBBUlJBWV9TSVpFKHdtODQwMF9kYXBtX2xvbWl4X2NvbnRyb2xzKSwKKwkJICAgICBvdXRtaXhlcl9ldmVudCwgU05EX1NPQ19EQVBNX1BSRV9SRUcpLAorCisvKiBMT05NSVggKi8KK1NORF9TT0NfREFQTV9NSVhFUigiTE9OTUlYIiwgV004NDAwX1BPV0VSX01BTkFHRU1FTlRfMywgV004NDAwX0xPTl9FTkFfU0hJRlQsCisJCSAgIDAsICZ3bTg0MDBfZGFwbV9sb25taXhfY29udHJvbHNbMF0sCisJCSAgIEFSUkFZX1NJWkUod204NDAwX2RhcG1fbG9ubWl4X2NvbnRyb2xzKSksCisKKy8qIExPUE1JWCAqLworU05EX1NPQ19EQVBNX01JWEVSKCJMT1BNSVgiLCBXTTg0MDBfUE9XRVJfTUFOQUdFTUVOVF8zLCBXTTg0MDBfTE9QX0VOQV9TSElGVCwKKwkJICAgMCwgJndtODQwMF9kYXBtX2xvcG1peF9jb250cm9sc1swXSwKKwkJICAgQVJSQVlfU0laRSh3bTg0MDBfZGFwbV9sb3BtaXhfY29udHJvbHMpKSwKKworLyogT1VUM01JWCAqLworU05EX1NPQ19EQVBNX01JWEVSKCJPVVQzTUlYIiwgV004NDAwX1BPV0VSX01BTkFHRU1FTlRfMSwgV004NDAwX09VVDNfRU5BX1NISUZULAorCQkgICAwLCAmd204NDAwX2RhcG1fb3V0M21peF9jb250cm9sc1swXSwKKwkJICAgQVJS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aW5lIFdNODQwMF9BRENfQ0xLRElWXzYgICAgMHhjMAorCisKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzEgICAgICAgICAgICAgICAgICAgICAgICgweDAgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzFfNSAgICAgICAgICAgICAgICAgICAgICgweDEgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzIgICAgICAgICAgICAgICAgICAgICAgICgweDIgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzMgICAgICAgICAgICAgICAgICAgICAgICgweDMgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzQgICAgICAgICAgICAgICAgICAgICAgICgweDQgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzVfNSAgICAgICAgICAgICAgICAgICAgICgweDUgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzYgICAgICAgICAgICAgICAgICAgICAgICgweDYgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzggICAgICAgICAgICAgICAgICAgICAgICgweDcgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzExICAgICAgICAgICAgICAgICAgICAgICgweDggPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzEyICAgICAgICAgICAgICAgICAgICAgICgweDkgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzE2ICAgICAgICAgICAgICAgICAgICAgICgweEEgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzIyICAgICAgICAgICAgICAgICAgICAgICgweEIgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzI0ICAgICAgICAgICAgICAgICAgICAgICgweEMgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfRElWXzMyICAgICAgICAgICAgICAgICAgICAgICgweEQgPDwgMSkKKyNkZWZpbmUgV004NDAwX0JDTEtfREl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g1ODBfUExMQTEgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMAogI2RlZmluZSBXTTg1ODBfUExMQTIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMQpAQCAtMTAyLDYgKzg5LDggQEAKICNkZWZpbmUgV004NTgwX1JFQURCQUNLICAgICAgICAgICAgICAgICAgICAgIDB4MzQKICNkZWZpbmUgV004NTgwX1JFU0VUICAgICAgICAgICAgICAgICAgICAgICAgIDB4MzUKIAorI2RlZmluZSBXTTg1ODBfTUFYX1JFR0lTVEVSICAgICAgICAgICAgICAgICAgMHgzNQorCiAvKiBQTExCNCAocmVnaXN0ZXIgN2gpICovCiAjZGVmaW5lIFdNODU4MF9QTExCNF9NQ0xLT1VUU1JDX01BU0sgICAweDYwCiAjZGVmaW5lIFdNODU4MF9QTExCNF9NQ0xLT1VUU1JDX1BMTEEgICAweDIwCkBAIC0xOTMsNiArMTgyLDIwIEBACiAJMHgwMDAwLCAweDAwMDAgLypSNTMqLwogfTsKIAorc3RydWN0IHBsbF9zdGF0ZSB7CisJdW5zaWduZWQgaW50IGluOworCXVuc2lnbmVkIGludCBvdXQ7Cit9OworCisvKiBjb2RlYyBwcml2YXRlIGRhdGEgKi8KK3N0cnVjdCB3bTg1ODBfcHJpdiB7CisJc3RydWN0IHNuZF9zb2NfY29kZWMgY29kZWM7CisJdTE2IHJlZ19jYWNoZVtXTTg1ODBfTUFYX1JFR0lTVEVSICsgMV07CisJc3RydWN0IHBsbF9zdGF0ZSBhOworCXN0cnVjdCBwbGxfc3RhdGUgYjsKK307CisKKwogLyoKICAqIHJlYWQgd204NTgwIHJlZ2lzdGVyIGNhY2hlCiAgKi8KQEAgLTIwMCw3ICsyMDMsNyBAQAogCXVuc2lnbmVkIGludCByZWcpCiB7CiAJdTE2ICpjYWNoZSA9IGNvZGVjLT5yZWdfY2FjaGU7Ci0JQlVHX09OKHJlZyA+IEFSUkFZX1NJWkUod204NTgwX3JlZykpOworCUJVR19PTihyZWcgPj0gQVJSQ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worCXdtODc1M193cml0ZShjb2RlYywgV004NzUzX0xPVVQxViwgcmVnIHwgMHgwMTAwKTsKKwlyZWcgPSB3bTg3NTNfcmVhZF9yZWdfY2FjaGUoY29kZWMsIFdNODc1M19ST1VUMVYpOworCXdtODc1M193cml0ZShjb2RlYywgV004NzUzX1JPVVQxViwgcmVnIHwgMHgwMTAwKTsKKwlyZWcgPSB3bTg3NTNfcmVhZF9yZWdfY2FjaGUoY29kZWMsIFdNODc1M19MT1VUMlYpOworCXdtODc1M193cml0ZShjb2RlYywgV004NzUzX0xPVVQyViwgcmVnIHwgMHgwMTAwKTsKKwlyZWcgPSB3bTg3NTNfcmVhZF9yZWdfY2FjaGUoY29kZWMsIFdNODc1M19ST1VUMlYpOworCXdtODc1M193cml0ZShjb2RlYywgV004NzUzX1JPVVQyViwgcmVnIHwgMHgwMTAwKTsKKwlyZWcgPSB3bTg3NTNfcmVhZF9yZWdfY2FjaGUoY29kZWMsIFdNODc1M19MSU5WT0wpOworCXdtODc1M193cml0ZShjb2RlYywgV004NzUzX0xJTlZPTCwgcmVnIHwgMHgwMTAwKTsKKwlyZWcgPSB3bTg3NTNfcmVhZF9yZWdfY2FjaGUoY29kZWMsIFdNODc1M19SSU5WT0wpOworCXdtODc1M193cml0ZShjb2RlYywgV004NzUzX1JJTlZPTCwgcmVnIHwgMHgwMTAwKTsKKworCXdtODc1M19jb2RlYyA9IGNvZGVjOworCisJZm9yIChpID0gMDsgaSA8IEFSUkFZX1NJWkUod204NzUzX2RhaSk7IGkrKykKKwkJd204NzUzX2RhaVtpXS5kZXYgPSBjb2RlYy0+ZGV2OworCisJcmV0ID0gc25kX3NvY19yZWdpc3Rlcl9jb2RlYyhjb2RlYyk7CisJaWYgKHJldCAhPSAwKSB7CisJCWRldl9lcnIoY29kZWMtPmRldiwgIkZhaWxlZCB0byByZWdpc3RlciBjb2RlYzogJWRcbiIsIHJldCk7CisJCWdvdG8gZXJyOworCX0KKworCXJldCA9IHNuZF9zb2NfcmVna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OworCisJd204NzUzID0ga3phbGxvYyhzaXplb2Yoc3RydWN0IHdtODc1M19wcml2KSwgR0ZQX0tFUk5FTCk7CisJaWYgKHdtODc1MyA9PSBOVUxMKQorCQlyZXR1cm4gLUVOT01FTTsKKworICAgICAgICBjb2RlYyA9ICZ3bTg3NTMtPmNvZGVjOworICAgICAgICBjb2RlYy0+aHdfd3JpdGUgPSAoaHdfd3JpdGVfdClpMmNfbWFzdGVyX3NlbmQ7CisgICAgICAgIGNvZGVjLT5jb250cm9sX2RhdGEgPSBpMmM7CisgICAgICAgIGkyY19zZXRfY2xpZW50ZGF0YShpMmMsIHdtODc1Myk7CisKKyAgICAgICAgY29kZWMtPmRldiA9ICZpMmMtPmRldjsKKworCXJldHVybiB3bTg3NTNfcmVnaXN0ZXIod204NzUzKTsKK30KKworc3RhdGljIGludCB3bTg3NTNfaTJjX3JlbW92ZShzdHJ1Y3QgaTJjX2NsaWVudCAqY2xpZW50KQoreworICAgICAgICBzdHJ1Y3Qgd204NzUzX3ByaXYgKndtODc1MyA9IGkyY19nZXRfY2xpZW50ZGF0YShjbGllbnQpOworICAgICAgICB3bTg3NTNfdW5yZWdpc3Rlcih3bTg3NTMpOworICAgICAgICByZXR1cm4gMDsKK30KKworc3RhdGljIGNvbnN0IHN0cnVjdCBpMmNfZGV2aWNlX2lkIHdtODc1M19pMmNfaWRbXSA9IHsKKwl7ICJ3bTg3NTMiLCAwIH0sCisJeyB9Cit9OworTU9EVUxFX0RFVklDRV9UQUJMRShpMmMsIHdtODc1M19pMmNfaWQpOworCitzdGF0aWMgc3RydWN0IGkyY19kcml2ZXIgd204NzUzX2kyY19kcml2ZXIgPSB7CisJLmRyaXZlciA9IHsKKwkJLm5hbWUgPSAid204NzUzIiwKKwkJLm93bmVyID0gVEhJU19NT0RVTEUsCisJfSwKKwkucHJvYmUgPSAgICB3bTg3NTNfaTJjX3Byb2JlLAorCS5yZW1vdmUgPSAgIHdtODc1M19pMmNfcmVtb3ZlLAorCS5pZF90YWJsZSA9IHdtODc1M19pMmNfaWQsCit9OworI2VuZGlmCisKKyNpZiBkZWZpbmVkKENPTkZJR19TUElfTUFTVEVSKQorc3RhdGljIGludCB3bTg3NTNfc3BpX3dyaXRlKHN0cnVjdCBzcGlfZGV2aWNlICpzcGksIGNvbnN0IGNoYXIgKmRhdGEsIGludCBsZW4pCit7CisJc3RydWN0IHNwaV90cmFuc2ZlciB0OworCXN0cnVjdCBzcGlfbWVzc2FnZSBtOworCXU4IG1zZ1syXTsKKworCWlmIChsZW4gPD0gMCkKKwkJcmV0dXJuIDA7CisKKwltc2dbMF0gPSBkYXRhWzBdOworCW1zZ1sxXSA9IGRhdGFbMV07CisKKwlzcGlfbWVzc2FnZV9pbml0KCZtKTsKKwltZW1zZXQoJnQsIDAsIChzaXplb2YgdCkpOworCisJdC50eF9idWYgPSAmbXNnWzBdOworCXQubGVuID0gbGVuOworCisJc3BpX21lc3NhZ2VfYWRkX3RhaWwoJnQsICZtKTsKKwlzcGlfc3luYyhzcGksICZtKTsKKworCXJldHVybiBsZW47Cit9CisKK3N0YXRpYyBpbnQgX19kZXZpbml0IHdtODc1M19zcGlfcHJvYmUoc3RydWN0IHNwaV9kZXZpY2UgKnNwaSkKK3sKKwlzdHJ1Y3Qgc25kX3NvY19jb2RlYyAqY29kZWM7CisJc3RydWN0IHdtODc1M19wcml2ICp3bTg3NTM7CisKKwl3bTg3NTMgPSBremFsbG9jKHNpemVvZihzdHJ1Y3Qgd204NzUzX3ByaXYpLCBHRlBfS0VSTkVMKTsKKwlpZiAod204NzUzID09IE5VTEwpCisJCXJldHVybiAtRU5PTUVNOworCisJY29kZWMgPSAmd204NzUzLT5jb2RlYzsKKwljb2RlYy0+Y29udHJvbF9kYXRhID0gc3BpOworCWNvZGVjLT5od193cml0ZSA9IChod193cml0ZV90KXdtODc1M19zcGlfd3JpdGU7CisJY29kZWMtPmRldiA9ICZzcGktPmRldjsKKworCXNwaS0+ZGV2LmRyaXZlcl9kYXRhID0gd204NzUz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zaG91bGQgaGF2ZSByZWNlaXZlZCBhIGNvcHkgb2YgdGhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCisgKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgRnJlZSBTb2Z0d2FyZQorICogRm91bmRhdGlvbiwgSW5jLiwgNTkgVGVtcGxlIFBsYWNlLCBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcgIFVTQQorICoKKyAqIFRoaXMgaXMgYSBsaXR0bGUgc2NoZW1hIG9mIHRoZSBzb3VuZCBpbnRlcmNvbm5lY3Rpb25zIDoKKyAqCisgKiAgICBTYWdlbSBYMjAwICAgICAgICAgICAgICAgICBXb2xmc29uIFdNOTcxMworICogICAgKy0tLS0tLS0tKyAgICAgICAgICAgICArLS0tLS0tLS0tLS0tLS0tLS0tLSsgICAgICBSZWFyIFNwZWFrZXIKKyAqICAgIHwgICAgICAgIHwgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAvLSsKKyAqICAgIHwgICAgICAgICstLS0+LS0tLS0+LS0tK01PTk9JTiAgICAgICAgIFNQS0wrLS0tPi0tLS0rLSsgIHwKKyAqICAgIHwgIEdTTSAgIHwgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8ICAgICAgICB8IHwgIHwKKyAqICAgIHwgICAgICAgICstLS0+LS0tLS0+LS0tK1BDQkVFUCAgICAgICAgIFNQS1IrLS0tPi0tLS0rLSsgIHwKKyAqICAgIHwgIENISVAgIHwgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICBcLSsKKyAqICAgIHwgICAgICAgICstLS08LS0tLS08LS0tK01PTk8gICAgICAgICAgICAgICB8CisgKiAgICB8ICAgICAgICB8ICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgfCAgICAgIEZyb250IFNwZWFrZXIKKyAqICAgICstLS0tLS0tLSsgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAvLSsKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICBIUEwrLS0tPi0tLS0rLSsgIHwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8ICAgICAgICB8IHwgIHwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgIE9VVDMrLS0tPi0tLS0rLSsgIHwKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICBcLSsKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgfCAgICAgRnJvbnQgTWljcm8KKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgKworICogICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgTUlDMSstLS0tLTwtLStvKworICogICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgIHwgICAgICAgICArCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tLS0tLS0tLS0tKyAgICAgICAgLS0tCisgKi8KKworI2luY2x1ZGUgPGxpbnV4L21vZHVsZS5oPgorI2luY2x1ZGUgPGxpbnV4L21vZHVsZXBhcmFtLmg+CisjaW5jbHVkZSA8bGludXgvcGxhdGZvcm1fZGV2aWNlLmg+CisKKyNpbmNsdWRlIDxhc20vbWFjaC10eXBlcy5oPgorI2luY2x1ZGUgPG1hY2gvYXVkaW8uaD4KKworI2luY2x1ZGUgPHNvdW5kL2NvcmUuaD4KKyNpbmNsdWRlIDxzb3VuZC9wY20uaD4KKyNpbmNsdWRlIDxzb3VuZC9zb2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2hhciAqcGluID0gKGNvbnN0IGNoYXIgKilrY29udHJvbC0+cHJpdmF0ZV92YWx1ZTsKKworCW11dGV4X2xvY2soJmNvZGVjLT5tdXRleCk7CisKKwl1Y29udHJvbC0+dmFsdWUuaW50ZWdlci52YWx1ZVswXSA9CisJCXNuZF9zb2NfZGFwbV9nZXRfcGluX3N0YXR1cyhjb2RlYywgcGluKTsKKworCW11dGV4X3VubG9jaygmY29kZWMtPm11dGV4KTsKKworCXJldHVybiAwOworfQorRVhQT1JUX1NZTUJPTF9HUEwoc25kX3NvY19kYXBtX2dldF9waW5fc3dpdGNoKTsKKworLyoqCisgKiBzbmRfc29jX2RhcG1fcHV0X3Bpbl9zd2l0Y2ggLSBTZXQgaW5mb3JtYXRpb24gZm9yIGEgcGluIHN3aXRjaAorICoKKyAqIEBrY29udHJvbDogbWl4ZXIgY29udHJvbAorICogQHVjb250cm9sOiBWYWx1ZQorICovCitpbnQgc25kX3NvY19kYXBtX3B1dF9waW5fc3dpdGNoKHN0cnVjdCBzbmRfa2NvbnRyb2wgKmtjb250cm9sLAorCQkJCXN0cnVjdCBzbmRfY3RsX2VsZW1fdmFsdWUgKnVjb250cm9sKQoreworCXN0cnVjdCBzbmRfc29jX2NvZGVjICpjb2RlYyA9IHNuZF9rY29udHJvbF9jaGlwKGtjb250cm9sKTsKKwljb25zdCBjaGFyICpwaW4gPSAoY29uc3QgY2hhciAqKWtjb250cm9sLT5wcml2YXRlX3ZhbHVlOworCisJbXV0ZXhfbG9jaygmY29kZWMtPm11dGV4KTsKKworCWlmICh1Y29udHJvbC0+dmFsdWUuaW50ZWdlci52YWx1ZVswXSkKKwkJc25kX3NvY19kYXBtX2VuYWJsZV9waW4oY29kZWMsIHBpbik7CisJZWxzZQorCQlzbmRfc29jX2RhcG1fZGlzYWJsZV9waW4oY29kZWMsIHBpbik7CisKKwlzbmRfc29jX2RhcG1fc3luYyhjb2RlYyk7CisKKwltdXRleF91bmxvY2soJmNvZGVjLT5tdXRleCk7Cis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2FyZC0+Y29kZWM7CisJc3RydWN0IHNuZF9zb2NfamFja19waW4gKnBpbjsKKwlpbnQgZW5hYmxlOworCWludCBvbGRzdGF0dXM7CisKKwlpZiAoIWphY2spIHsKKwkJV0FSTl9PTl9PTkNFKCFqYWNrKTsKKwkJcmV0dXJuOworCX0KKworCW11dGV4X2xvY2soJmNvZGVjLT5tdXRleCk7CisKKwlvbGRzdGF0dXMgPSBqYWNrLT5zdGF0dXM7CisKKwlqYWNrLT5zdGF0dXMgJj0gfm1hc2s7CisJamFjay0+c3RhdHVzIHw9IHN0YXR1czsKKworCS8qIFRoZSBEQVBNIHN5bmMgaXMgZXhwZW5zaXZlIGVub3VnaCB0byBiZSB3b3J0aCBza2lwcGluZyAqLworCWlmIChqYWNrLT5zdGF0dXMgPT0gb2xkc3RhdHVzKQorCQlnb3RvIG91dDsKKworCWxpc3RfZm9yX2VhY2hfZW50cnkocGluLCAmamFjay0+cGlucywgbGlzdCkgeworCQllbmFibGUgPSBwaW4tPm1hc2sgJiBzdGF0dXM7CisKKwkJaWYgKHBpbi0+aW52ZXJ0KQorCQkJZW5hYmxlID0gIWVuYWJsZTsKKworCQlpZiAoZW5hYmxlKQorCQkJc25kX3NvY19kYXBtX2VuYWJsZV9waW4oY29kZWMsIHBpbi0+cGluKTsKKwkJZWxzZQorCQkJc25kX3NvY19kYXBtX2Rpc2FibGVfcGluKGNvZGVjLCBwaW4tPnBpbik7CisJfQorCisJc25kX3NvY19kYXBtX3N5bmMoY29kZWMpOworCisJc25kX2phY2tfcmVwb3J0KGphY2stPmphY2ssIHN0YXR1cyk7CisKK291dDoKKwltdXRleF91bmxvY2soJmNvZGVjLT5tdXRleCk7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChzbmRfc29jX2phY2tfcmVwb3J0KTsKKworLyoqCisgKiBzbmRfc29jX2phY2tfYWRkX3BpbnMgLSBBc3NvY2lhdGUgREFQTSBwaW5zIHdpdGggYW4gQVNvQyBqYWNrCisgKgorICogQGphY2s6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