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TI7CisJfQorCisJZm9yIChuID0gMTsgbiA8PSBFWEFNUExFUzsgbisrKSB7CisJCWV4YW1wbGUobik7CisJCWNmYWcxMjg2NGJfYmxpdCgpOworCQl3aGlsZSAoZ2V0Y2hhcigpICE9ICdcbicpOworCX0KKworCWNmYWcxMjg2NGJfZXhpdCgpOworCisJcmV0dXJuIDA7Cit9CmRpZmYgLS1naXQgYS9Eb2N1bWVudGF0aW9uL2F1eGRpc3BsYXkva3MwMTA4IGIvRG9jdW1lbnRhdGlvbi9hdXhkaXNwbGF5L2tzMDEwOApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi45MmIwM2I2Ci0tLSAvZGV2L251bGwKKysrIGIvRG9jdW1lbnRhdGlvbi9hdXhkaXNwbGF5L2tzMDEwOApAQCAtMCwwICsxLDU1IEBACisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisJa3MwMTA4IExDRCBDb250cm9sbGVyIERyaXZlciBEb2N1bWVudGF0aW9uCisJPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CisKK0xpY2Vuc2U6CQlHUEx2MgorQXV0aG9yICYgTWFpbnRhaW5lcjoJTWlndWVsIE9qZWRhIFNhbmRvbmlzIDxtYXhleHRyZW1lQGdtYWlsLmNvbT4KK0RhdGU6CQkJMjAwNi0xMC0yNworCisKKworLS0tLS0tLS0KKzAuIElOREVYCistLS0tLS0tLQorCisJMS4gRFJJVkVSIElORk9STUFUSU9OCisJMi4gREVWSUNFIElORk9STUFUSU9OCisJMy4gV0lSSU5HCisKKworLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisxLiBEUklWRVIgSU5GT1JNQVRJT04KKy0tLS0tLS0tLS0tLS0tLS0tLS0tLQorCitUaGlzIGRyaXZlciBzdXBwb3J0IHRoZSBrczAxMDggTENEIGNvbnRyb2xsZXIuCisKKworLS0tLS0tLS0tLS0tLS0tLS0tLS0tCisyLiBERVZJQ0UgSU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AgICAgMzA3eC80MTd4OgotICAgICAgICBHaWdhc2V0IFNYMjU1aXNkbgotICAgICAgICBHaWdhc2V0IFNYMzUzaXNkbgotICAgICAgICBTaW51cyA0NSBbQUJdIGlzZG4gKERldXRzY2hlIFRlbGVrb20pCi0gICAgICAgIFNpbnVzIDcyMVgvWEEKKworICAgICBCYXNlczoKKyAgICAgICAgU2llbWVucyBHaWdhc2V0IDMwNzAvMzA3NSBpc2RuCisgICAgICAgIFNpZW1lbnMgR2lnYXNldCA0MTcwLzQxNzUgaXNkbgorICAgICAgICBTaWVtZW5zIEdpZ2FzZXQgU1gyMDUvMjU1CisgICAgICAgIFNpZW1lbnMgR2lnYXNldCBTWDM1MworICAgICAgICBULUNvbSBTaW51cyA0NSBbQUJdIGlzZG4KKyAgICAgICAgVC1Db20gU2ludXMgNzIxWFtBXSBbU0VdCiAgICAgICAgIFZveCBDaGljYWdvIDM5MCBJU0ROIChLUE4gVGVsZWNvbSkKLSAgICAgTTEwMToKLSAgICAgICAgU2ludXMgNDUgRGF0YSAxIChUZWxla29tKQotICAgICBNMTA1OgotICAgICAgICBHaWdhc2V0IFVTQiBBZGFwdGVyIERFQ1QKLSAgICAgICAgU2ludXMgNDUgRGF0YSAyIChUZWxla29tKQotICAgICAgICBTaW51cyA3MjEgZGF0YQorCisgICAgIFJTMjMyIGRhdGEgYm94ZXM6CisgICAgICAgIFNpZW1lbnMgR2lnYXNldCBNMTAxIERhdGEKKyAgICAgICAgVC1Db20gU2ludXMgNDUgRGF0YSAxCisKKyAgICAgVVNCIGRhdGEgYm94ZXM6CisgICAgICAgIFNpZW1lbnMgR2lnYXNldCBNMTA1IERhdGEKKyAgICAgICAgU2llbWVucyBHaWdhc2V0IFVTQiBBZGFwdGVyIERFQ1QKKyAgICAgICAgVC1Db20gU2ludXMgNDUgRGF0YSAyCisgICAgICAgIFQtQ29tIFNpbnVzIDcyMSBkYXRhCiAgICAgICAgIENoaWNhZ28gMzkwIFVTQiAoS1BOKQorCiAgICA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orCisgIGlvbW11IG9wdGlvbnMgb25seSByZWxldmFudCB0byB0aGUgQU1EIEdBUlQgaGFyZHdhcmUgSU9NTVU6CisgICAgPHNpemU+ICAgICAgICAgICAgIFNldCB0aGUgc2l6ZSBvZiB0aGUgcmVtYXBwaW5nIGFyZWEgaW4gYnl0ZXMuCisgICAgYWxsb3dlZCAgICAgICAgICAgIE92ZXJ3cml0ZSBpb21tdSBvZmYgd29ya2Fyb3VuZHMgZm9yIHNwZWNpZmljIGNoaXBzZXRzLgorICAgIGZ1bGxmbHVzaCAgICAgICAgICBGbHVzaCBJT01NVSBvbiBlYWNoIGFsbG9jYXRpb24gKGRlZmF1bHQpLgorICAgIG5vZnVsbGZsdXNoICAgICAgICBEb24ndCB1c2UgSU9NTVUgZnVsbGZsdXNoLgorICAgIGxlYWsgICAgICAgICAgICAgICBUdXJuIG9uIHNpbXBsZSBpb21tdSBsZWFrIHRyYWNpbmcgKG9ubHkgd2hlbgorICAgICAgICAgICAgICAgICAgICAgICBDT05GSUdfSU9NTVVfTEVBSyBpcyBvbikuIERlZmF1bHQgbnVtYmVyIG9mIGxlYWsgcGFnZXMKKyAgICAgICAgICAgICAgICAgICAgICAgaXMgMjAuCisgICAgbWVtYXBlcls9PG9yZGVyPl0gIEFsbG9jYXRlIGFuIG93biBhcGVydHVyZSBvdmVyIFJBTSB3aXRoIHNpemUgMzJNQjw8b3JkZXIuCisgICAgICAgICAgICAgICAgICAgICAgIChkZWZhdWx0OiBvcmRlcj0xLCBpLmUuIDY0TUIpCisgICAgbWVyZ2UgICAgICAgICAgICAgIERvIHNjYXR0ZXItZ2F0aGVyIChTRykgbWVyZ2luZy4gSW1wbGllcyAiZm9yY2UiCisgICAgICAgICAgICAgICAgICAgICAgIChleHBlcmltZW50YWwpLgorICAgIG5vbWVyZ2UgICAgICAgICAgICBEb24ndCBkbyBzY2F0dGVyLWdhdGhlciAoU0cpIG1lcmdpbmcuCisgICAgbm9hcGVydHVyZSAgICAgICAgIEFzayB0aGUgSU9NTVUgbm90IHRvIHRvdWNoIHRoZSBhcGVydHVyZSBmb3IgQUdQLgorICAgIGZvcmNlc2FjICAgICAgICAgICBGb3JjZSBzaW5nbGUtYWRkcmVzcyBjeWNsZSAoU0FDKSBtb2RlIGZvciBtYXNrcyA8NDBiaXRzCisgICAgICAgICAgICAgICAgICAgICAgIChleHBlcmltZW50YWwpLgorICAgIG5vYWdwICAgICAgICAgICAgICBEb24ndCBpbml0aWFsaXplIHRoZSBBR1AgZHJpdmVyIGFuZCB1c2UgZnVsbCBhcGVydHVyZS4KKyAgICBhbGxvd2RhYyAgICAgICAgICAgQWxsb3cgZG91YmxlLWFkZHJlc3MgY3ljbGUgKERBQykgbW9kZSwgaS5lLiBETUEgPjRHQi4KKyAgICAgICAgICAgICAgICAgICAgICAgREFDIGlzIHVzZWQgd2l0aCAzMi1iaXQgUENJIHRvIHB1c2ggYSA2NC1iaXQgYWRkcmVzcyBpbgorICAgICAgICAgICAgICAgICAgICAgICB0d28gY3ljbGVzLiBXaGVuIG9mZiBhbGwgRE1BIG92ZXIgPjRHQiBpcyBmb3JjZWQgdGhyb3VnaAorICAgICAgICAgICAgICAgICAgICAgICBhbiBJT01NVSBvciBzb2Z0d2FyZSBib3VuY2UgYnVmZmVyaW5nLgorICAgIG5vZGFjICAgICAgICAgICAgICBGb3JiaWQgREFDIG1vZGUsIGkuZS4gRE1BID40R0IuCisgICAgcGFuaWMgICAgICAgICAgICAgIEFsd2F5cyBwYW5pYyB3aGVuIElPTU1VIG92ZXJmbG93cy4KKyAgICBjYWxnYXJ5ICAgICAgICAgICAgVXNlIHRoZSBDYWxnYXJ5IElPTU1VIGlmIGl0IGlzIGF2YWlsYWJsZQorCisgIGlvbW11IG9wdGlvbnMgb25seSByZWxldmFudCB0byB0aGUgc29mdHdhcmUgYm91bmNlIGJ1ZmZlcmluZyAoU1dJT1RMQikgSU9NTVUKKyAgaW1wbGVtZW50YXRpb246CisgICAgc3dpb3RsYj08cGFnZXM+Wyxmb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fQkFTRShBUElDX1RJTUVSX0JBU0VfRElWKTsKKworCWlmICghaXJxZW4pCisJCWx2dHRfdmFsdWUgfD0gQVBJQ19MVlRfTUFTS0VEOworCisJYXBpY193cml0ZV9hcm91bmQoQVBJQ19MVlRULCBsdnR0X3ZhbHVlKTsKKworCS8qCisJICogRGl2aWRlIFBJQ0xLIGJ5IDE2CisJICovCisJdG1wX3ZhbHVlID0gYXBpY19yZWFkKEFQSUNfVERDUik7CisJYXBpY193cml0ZV9hcm91bmQoQVBJQ19URENSLCAodG1wX3ZhbHVlCisJCQkJJiB+KEFQSUNfVERSX0RJVl8xIHwgQVBJQ19URFJfRElWX1RNQkFTRSkpCisJCQkJfCBBUElDX1REUl9ESVZfMTYpOworCisJaWYgKCFvbmVzaG90KQorCQlhcGljX3dyaXRlX2Fyb3VuZChBUElDX1RNSUNULCBjbG9ja3MvQVBJQ19ESVZJU09SKTsKK30KKworLyoKKyAqIFByb2dyYW0gdGhlIG5leHQgZXZlbnQsIHJlbGF0aXZlIHRvIG5vdworICovCitzdGF0aWMgaW50IGxhcGljX25leHRfZXZlbnQodW5zaWduZWQgbG9uZyBkZWx0YSwKKwkJCSAgICBzdHJ1Y3QgY2xvY2tfZXZlbnRfZGV2aWNlICpldnQpCit7CisJYXBpY193cml0ZV9hcm91bmQoQVBJQ19UTUlDVCwgZGVsdGEpOworCXJldHVybiAwOworfQorCisvKgorICogU2V0dXAgdGhlIGxhcGljIHRpbWVyIGluIHBlcmlvZGljIG9yIG9uZXNob3QgbW9kZQorICovCitzdGF0aWMgdm9pZCBsYXBpY190aW1lcl9zZXR1cChlbnVtIGNsb2NrX2V2ZW50X21vZGUgbW9kZSwKKwkJCSAgICAgIHN0cnVjdCBjbG9ja19ldmVudF9kZXZpY2UgKmV2dCkKK3sKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCXVuc2lnbmVkIGludCB2OworCisJLyogTGFwaWMgdXNlZCBmb3IgYnJvYWRjYXN0ID8gKi8KKwlpZiAoIW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VNFWElULCBsZW4sIGluc25zKTsKKwkJZGVmYXVsdDoKKwkJCWJyZWFrOworCX0KKwlyZXR1cm4gbGVuOworfQorCisvKiBDUFVJRCBoYXMgbm9uLUMgc2VtYW50aWNzLCBhbmQgcGFyYXZpcnQtb3BzIEFQSSBkb2Vzbid0IG1hdGNoIGhhcmR3YXJlIElTQSAqLworc3RhdGljIHZvaWQgdm1pX2NwdWlkKHVuc2lnbmVkIGludCAqZWF4LCB1bnNpZ25lZCBpbnQgKmVieCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmVjeCwgdW5zaWduZWQgaW50ICplZHgpCit7CisJaW50IG92ZXJyaWRlID0gMDsKKwlpZiAoKmVheCA9PSAxKQorCQlvdmVycmlkZSA9IDE7CisgICAgICAgIGFzbSB2b2xhdGlsZSAoImNhbGwgKiU2IgorICAgICAgICAgICAgICAgICAgICAgIDogIj1hIiAoKmVheCksCisgICAgICAgICAgICAgICAgICAgICAgICAiPWIiICgqZWJ4KSwKKyAgICAgICAgICAgICAgICAgICAgICAgICI9YyIgKCplY3gpLAorICAgICAgICAgICAgICAgICAgICAgICAgIj1kIiAoKmVkeCkKKyAgICAgICAgICAgICAgICAgICAgICA6ICIwIiAoKmVheCksICIyIiAoKmVjeCksICJyIiAodm1pX29wcy5jcHVpZCkpOworCWlmIChvdmVycmlkZSkgeworCQlpZiAoZGlzYWJsZV9wc2UpCisJCQkqZWR4ICY9IH5YODZfRkVBVFVSRV9QU0U7CisJCWlmIChkaXNhYmxlX3BnZSkKKwkJCSplZHggJj0gflg4Nl9GRUFUVVJFX1BHRTsKKwkJaWYgKGRpc2FibGVfc2VwKQorCQkJKmVkeCAmPSB+WDg2X0ZFQVRVUkVfU0VQOworCQlpZiAoZGlzYWJsZV90c2MpCisJCQkqZWR4ICY9IH5YODZfRkVBVFVSRV9UU0M7CisJCWlmIChkaXNhYmxlX210cnIpCisJCQkqZWR4ICY9IH5YODZfRkVBVFVSRV9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cm9kdWN0X29mZnNldDsKKwl9CisKKwlpZiAocm9tLT5saWNlbnNlX29mZnMpCisJCWxpY2Vuc2UgPSAoY2hhciAqKXJvbStyb20tPmxpY2Vuc2Vfb2ZmczsKKworCXByaW50ayhLRVJOX0lORk8gIlZNSTogRm91bmQgJXMgJXMsIEFQSSB2ZXJzaW9uICVkLiVkLCBST00gdmVyc2lvbiAlZC4lZFxuIiwKKwkJbWFudWZhY3R1cmVyLCBwcm9kdWN0LAorCQlyb20tPmFwaV92ZXJzaW9uX21haiwgcm9tLT5hcGlfdmVyc2lvbl9taW4sCisJCXBjaS0+cm9tX3ZlcnNpb25fbWFqLCBwY2ktPnJvbV92ZXJzaW9uX21pbik7CisKKyAgICAgICAgbGljZW5zZV9ncGxvayA9IGxpY2Vuc2VfaXNfZ3BsX2NvbXBhdGlibGUobGljZW5zZSk7CisgICAgICAgIGlmICghbGljZW5zZV9ncGxvaykgeworICAgICAgICAgICAgICAgIHByaW50ayhLRVJOX1dBUk5JTkcgIlZNSTogUk9NIGxpY2Vuc2UgJyVzJyB0YWludHMga2VybmVsLi4uICIKKwkJICAgICAgICJpbmxpbmluZyBkaXNhYmxlZFxuIiwKKyAgICAgICAgICAgICAgICAgICAgICAgbGljZW5zZSk7CisgICAgICAgICAgICAgICAgYWRkX3RhaW50KFRBSU5UX1BST1BSSUVUQVJZX01PRFVMRSk7CisgICAgICAgIH0KKwlyZXR1cm4gMTsKK30KKworLyoKKyAqIFByb2JlIGZvciB0aGUgVk1JIG9wdGlvbiBST00KKyAqLworc3RhdGljIGlubGluZSBpbnQgX19pbml0IHByb2JlX3ZtaV9yb20odm9pZCkKK3sKKwl1bnNpZ25lZCBsb25nIGJhc2U7CisKKwkvKiBWTUkgUk9NIGlzIGluIG9wdGlvbiBST00gYXJlYSwgY2hlY2sgc2lnbmF0dXJlICovCisJZm9yIChiYXNlID0gMHhDMDAwMDsgYmFzZSA8IDB4RTAwMDA7IGJhc2UgKz0gMjA0OCkgeworCQlzdHJ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kJCQkJICBFODIwX1JFU0VSVkVEKSkgeworCQlwcmludGsoS0VSTl9FUlIgIlBDSTogQklPUyBCdWc6IE1DRkcgYXJlYSBhdCAlTHggaXMgbm90IgorCQkgICAgICAgIiBFODIwLXJlc2VydmVkXG4iLCBjZmctPmFkZHJlc3MpOworCQlnb3RvIHJlamVjdDsKKwl9CisJcmV0dXJuOworCityZWplY3Q6CisJcHJpbnRrKEtFUk5fRVJSICJQQ0k6IE5vdCB1c2luZyBNTUNPTkZJRy5cbiIpOworCWtmcmVlKHBjaV9tbWNmZ19jb25maWcpOworCXBjaV9tbWNmZ19jb25maWcgPSBOVUxMOworCXBjaV9tbWNmZ19jb25maWdfbnVtID0gMDsKK30KKwordm9pZCBfX2luaXQgcGNpX21tY2ZnX2luaXQoaW50IHR5cGUpCit7CisJaW50IGtub3duX2JyaWRnZSA9IDA7CisKKwlpZiAoKHBjaV9wcm9iZSAmIFBDSV9QUk9CRV9NTUNPTkYpID09IDApCisJCXJldHVybjsKKworCWlmICh0eXBlID09IDEgJiYgcGNpX21tY2ZnX2NoZWNrX2hvc3RicmlkZ2UoKSkKKwkJa25vd25fYnJpZGdlID0gMTsKKworCWlmICgha25vd25fYnJpZGdlKSB7CisJCWFjcGlfdGFibGVfcGFyc2UoQUNQSV9TSUdfTUNGRywgYWNwaV9wYXJzZV9tY2ZnKTsKKwkJcGNpX21tY2ZnX3JlamVjdF9icm9rZW4odHlwZSk7CisJfQorCisJaWYgKChwY2lfbW1jZmdfY29uZmlnX251bSA9PSAwKSB8fAorCSAgICAocGNpX21tY2ZnX2NvbmZpZyA9PSBOVUxMKSB8fAorCSAgICAocGNpX21tY2ZnX2NvbmZpZ1swXS5hZGRyZXNzID09IDApKQorCQlyZXR1cm47CisKKwlpZiAocGNpX21tY2ZnX2FyY2hfaW5pdCgpKSB7CisJCWlmICh0eXBlID09IDEpCisJCQl1bnJlYWNoYWJsZV9kZXZpY2VzKCk7CisJCWlmIChrbm93bl9icmlkZ2UpCisJCQl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G5vdCBzZXQKKyMgQ09ORklHX05GVEwgaXMgbm90IHNldAorIyBDT05GSUdfSU5GVEwgaXMgbm90IHNldAorIyBDT05GSUdfUkZEX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19TU0ZEQyBpcyBub3Qgc2V0CisKKyMKKyMgUkFNL1JPTS9GbGFzaCBjaGlwIGRyaXZlcnMKKyMKK0NPTkZJR19NVERfQ0ZJPW0KK0NPTkZJR19NVERfSkVERUNQUk9CRT1tCitDT05GSUdfTVREX0dFTl9QUk9CRT1tCitDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUz15CisjIENPTkZJR19NVERfQ0ZJX05PU1dBUCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9CRV9CWVRFX1NXQVA9eQorIyBDT05GSUdfTVREX0NGSV9MRV9CWVRFX1NXQVAgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfR0VPTUVUUlk9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CisjIENPTkZJR19NVERfQ0ZJX0kyIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT1RQIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSU5URUxFWFQgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfQU1EU1REPW0KKyMgQ09ORklHX01URF9DRklfU1RBQSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9VVElMPW0KKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PQlNPTEVURV9DSElQUyBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIWVNNQVAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKworIworIyBOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgT25lTkFORCBGbGFzaCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAogCiAjCiAjIFBhcmFsbGVsIHBvcnQgc3VwcG9ydApAQCAtMTUyLDcgKzM2MCw2IEBACiAjCiAjIEJsb2NrIGRldmljZXMKICMKLSMgQ09ORklHX0JMS19ERVZfRkQga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HNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST1tCitDT05GSUdfTVREX0pFREVDUFJPQkU9bQorQ09ORklHX01URF9HRU5fUFJPQkU9bQorQ09ORklHX01URF9DRklfQURWX09QVElPTlM9eQorIyBDT05GSUdfTVREX0NGSV9OT1NXQVAgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfQkVfQllURV9TV0FQPXkKKyMgQ09ORklHX01URF9DRklfTEVfQllURV9TV0FQIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0dFT01FVFJZPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorIyBDT05GSUdfTVREX0NGSV9JMiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX09UUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0lOVEVMRVhUIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD1tCisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD1tCisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisjIENPTkZJR19N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K0NPTkZJR19NTUNfQkxPQ0s9eQorIyBDT05GSUdfTU1DX1RJRk1fU0QgaXMgbm90IHNldAorCisjCisjIExFRCBkZXZpY2VzCisjCisjIENPTkZJR19ORVdfTEVEUyBpcyBub3Qgc2V0CisKKyMKKyMgTEVEIGRyaXZlcnMKKyMKKworIworIyBMRUQgVHJpZ2dlcnMKKyMKIAogIwogIyBJbmZpbmlCYW5kIHN1cHBvcnQKICMKLSMgQ09ORklHX0lORklOSUJBTkQgaXMgbm90IHNldAorCisjCisjIEVEQUMgLSBlcnJvciBkZXRlY3Rpb24gYW5kIHJlcG9ydGluZyAoUkFTKSAoRVhQRVJJTUVOVEFMKQorIworCisjCisjIFJlYWwgVGltZSBDbG9jaworIworIyBDT05GSUdfUlRDX0NMQVNTIGlzIG5vdCBzZXQKKworIworIyBETUEgRW5naW5lIHN1cHBvcnQKKyMKKyMgQ09ORklHX0RNQV9FTkdJTkUgaXMgbm90IHNldAorCisjCisjIERNQSBDbGllbnRzCisjCisKKyMKKyMgRE1BIERldmljZXMKKyMKIAogIwogIyBGaWxlIHN5c3RlbXMKICMKIENPTkZJR19FWFQyX0ZTPXkKICMgQ09ORklHX0VYVDJfRlNfWEFUVFIgaXMgbm90IHNldAotQ09ORklHX0VYVDNfRlM9bQorIyBDT05GSUdfRVhUMl9GU19YSVAgaXMgbm90IHNldAorQ09ORklHX0VYVDNfRlM9eQogQ09ORklHX0VYVDNfRlNfWEFUVFI9eQogIyBDT05GSUdfRVhUM19GU19QT1NJWF9BQ0wgaXMgbm90IHNldAogIyBDT05GSUdfRVhUM19GU19TRUNVUklUWSBpcyBub3Qgc2V0Ci1DT05GSUdfSkJEPW0KKyMgQ09ORklHX0VYVDRERVZfRlMgaXMgbm90IHNldAorQ09ORklHX0pCRD15CiBDT05GSUdfSkJEX0RFQlVHPXkKIENPTkZJR19GU19NQkNBQ0hFPXkKIENPTkZJR19SRUlTRVJGU19GUz1tCkBAIC01OTEsMTcgKzc5MywxOSBAQAogIyBD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9SRURCT09UX1BBUlRTX1VOQUxMT0NBVEVEIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9SRURCT09UX1BBUlRTX1JFQURPTkxZIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DTURMSU5FX1BBUlRTIGlzIG5vdCBzZXQKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworIyBDT05GSUdfTVREX0NIQVIgaXMgbm90IHNldAorQ09ORklHX01URF9CTE9DSz15CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NTRkRDIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworQ09ORklHX01URF9DRkk9bQorQ09ORklHX01URF9KRURFQ1BST0JFPW0KK0NPTkZJR19NVERfR0VOX1BST0JFPW0KK0NPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TPXkKKyMgQ09ORklHX01URF9DRklfTk9TV0FQIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0JFX0JZVEVfU1dBUD15CisjIENPTkZJR19NVERfQ0ZJX0xFX0JZVEVfU1dBUCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9HRU9NRVRSWT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKKyMgQ09ORklHX01URF9DRklfSTIgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PVFAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JTlRFTEVYVCBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9BTURTVEQ9bQorIyBDT05GSUdfTVREX0NGSV9TVEFBIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX1VUSUw9bQorIyBDT05GSUdfTVREX1JBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUk9NIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9BQlNFTlQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX09CU09MRVRFX0NISVBTIGlzIG5vdCBzZXQKKworIworIyBNYXBwaW5nIGRyaXZlcnMgZm9yIGNoaXAgYWNjZXNzCisjCisjIENPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhZU01BUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfU0xSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BIUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NVERSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLMk1URCBpcyBub3Qgc2V0CisKKyMKKyMgRGlzay1Pbi1DaGlwIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfRE9DMjAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfRE9DMjAwMVBMV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JR19USVBDIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FUTSBpcyBub3Qgc2V0CisjIENPTkZJR19CUklER0UgaXMgbm90IHNldAorIyBDT05GSUdfVkxBTl84MDIxUSBpcyBub3Qgc2V0CisjIENPTkZJR19ERUNORVQgaXMgbm90IHNldAorIyBDT05GSUdfTExDMiBpcyBub3Qgc2V0CisjIENPTkZJR19JUFggaXMgbm90IHNldAorIyBDT05GSUdfQVRBTEsgaXMgbm90IHNldAorIyBDT05GSUdfWDI1IGlzIG5vdCBzZXQKKyMgQ09ORklHX0xBUEIgaXMgbm90IHNldAorIyBDT05GSUdfRUNPTkVUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dBTl9ST1VURVIgaXMgbm90IHNldAorCisjCisjIFFvUyBhbmQvb3IgZmFpciBxdWV1ZWluZworIworIyBDT05GSUdfTkVUX1NDSEVEIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JrIHRlc3RpbmcKKyMKKyMgQ09ORklHX05FVF9QS1RHRU4gaXMgbm90IHNldAorIyBDT05GSUdfSEFNUkFESU8gaXMgbm90IHNldAorIyBDT05GSUdfSVJEQSBpcyBub3Qgc2V0CisjIENPTkZJR19CVCBpcyBub3Qgc2V0CisjIENPTkZJR19JRUVFODAyMTEgaXMgbm90IHNldAorCisjCiAjIERldmljZSBEcml2ZXJzCiAjCiAKQEAgLTEzOCw3ICsyNjEsMTMgQEAKICMKICMgQ09ORklHX1NUQU5EQUxPTkUgaXMgbm90IHNldAogQ09ORklHX1BSRVZFTlRfRklSTVdBUkVfQlVJTEQ9eQotIyBDT05GSUdfRldfTE9BREVSIGlzIG5vdCBzZXQKK0NPTkZJR19GV19MT0FERVI9eQorIyBDT05GSUdfU1lTX0hZUEVSVklTT1IgaXMgbm90IHNldAorCisjCisjIENvbm5lY3RvciAtIHVuaWZpZWQgdXNlcnNwYWNlIDwtPiBrZXJuZWxzcGFjZSBsaW5rZXIKKyMKKyMgQ09ORklHX0NPTk5FQ1RPUiBp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19ERVZfUkFNPXkKK0NPTkZJR19CTEtfREVWX1JBTV9DT1VOVD0xNgorQ09ORklHX0JMS19ERVZfUkFNX1NJWkU9NDA5NgorQ09ORklHX0JMS19ERVZfUkFNX0JMT0NLU0laRT0xMDI0CisjIENPTkZJR19CTEtfREVWX0lOSVRSRCBpcyBub3Qgc2V0CisjIENPTkZJR19DRFJPTV9QS1RDRFZEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FUQV9PVkVSX0VUSCBpcyBub3Qgc2V0CisKKyMKKyMgTWlzYyBkZXZpY2VzCisjCisjIENPTkZJR19USUZNX0NPUkUgaXMgbm90IHNldAorCisjCisjIEFUQS9BVEFQSS9NRk0vUkxMIHN1cHBvcnQKKyMKK0NPTkZJR19JREU9eQorQ09ORklHX0lERV9NQVhfSFdJRlM9NAorQ09ORklHX0JMS19ERVZfSURFPXkKKworIworIyBQbGVhc2Ugc2VlIERvY3VtZW50YXRpb24vaWRlLnR4dCBmb3IgaGVscC9pbmZvIG9uIElERSBkcml2ZXMKKyMKKyMgQ09ORklHX0JMS19ERVZfSURFX1NBVEEgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfSURFRElTSz15CisjIENPTkZJR19JREVESVNLX01VTFRJX01PREUgaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfSURFQ1M9eQorQ09ORklHX0JMS19ERVZfSURFQ0Q9bQorIyBDT05GSUdfQkxLX0RFVl9JREVUQVBFIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfSURFRkxPUFBZIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfSURFU0NTSSBpcyBub3Qgc2V0CisjIENPTkZJR19JREVfVEFTS19JT0NUTCBpcyBub3Qgc2V0CisKKyMKKyMgSURFIGNoaXBzZXQgc3VwcG9ydC9idWdmaXhlcworIworQ09ORklHX0lERV9HRU5FUklDPXkKKyMgQ09ORklHX0lERV9BUk0gaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9J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bm90IHNldAorCisjCisjIEV0aGVybmV0ICgxMCBvciAxMDBNYml0KQorIworQ09ORklHX05FVF9FVEhFUk5FVD15CitDT05GSUdfTUlJPXkKK0NPTkZJR19TTUM5MVg9eQorIyBDT05GSUdfTkUyMDAwIGlzIG5vdCBzZXQKKworIworIyBFdGhlcm5ldCAoMTAwMCBNYml0KQorIworCisjCisjIEV0aGVybmV0ICgxMDAwMCBNYml0KQorIworCisjCisjIFRva2VuIFJpbmcgZGV2aWNlcworIworCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBQQ01DSUEgbmV0d29yayBkZXZpY2Ugc3VwcG9ydAorIworIyBDT05GSUdfTkVUX1BDTUNJQSBpcyBub3Qgc2V0CisKKyMKKyMgV2FuIGludGVyZmFjZXMKKyMKKyMgQ09ORklHX1dBTiBpcyBub3Qgc2V0CisjIENPTkZJR19QUFAgaXMgbm90IHNldAorIyBDT05GSUdfU0xJUCBpcyBub3Qgc2V0CisjIENPTkZJR19TSEFQRVIgaXMgbm90IHNldAorIyBDT05GSUdfTkVUQ09OU09MRSBpcyBub3Qgc2V0CisjIENPTkZJR19ORVRQT0xMIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVF9QT0xMX0NPTlRST0xMRVIgaXMgbm90IHNldAorCisjCisjIElTRE4gc3Vic3lzdGVtCisjCisjIENPTkZJR19JU0ROIGlzIG5vdCBzZXQKKworIworIyBUZWxlcGhvbnkgU3VwcG9ydAorIworIyBDT05GSUdfUEhPTkUgaXMgbm90IHNldAorCisjCisjIElucHV0IGRldmljZSBzdXBwb3J0CisjCitDT05GSUdfSU5QVVQ9eQorIyBDT05GSUdfSU5QVVRfRkZfTUVNTEVTUyBpcyBub3Qgc2V0CisKKyMKKyMgVXNlcmxhbmQgaW50ZXJmYWNlcworIworIyBDT05GSUdfSU5QVVRfTU9VU0VERVYgaXMgbm90IHNldAorIyBDT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WV9DT05TT0xFPXkKKyMgQ09ORklHX0JBQ0tMSUdIVF9MQ0RfU1VQUE9SVCBpcyBub3Qgc2V0CisKKyMKKyMgU291bmQKKyMKKyMgQ09ORklHX1NPVU5EIGlzIG5vdCBzZXQKKworIworIyBVU0Igc3VwcG9ydAorIworIyBDT05GSUdfVVNCX0FSQ0hfSEFTX0hDRCBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfQVJDSF9IQVNfT0hDSSBpcyBub3Qgc2V0CisjIENPTkZJR19VU0JfQVJDSF9IQVNfRUhDSSBpcyBub3Qgc2V0CisKKyMKKyMgTk9URTogVVNCX1NUT1JBR0UgZW5hYmxlcyBTQ1NJLCBhbmQgJ1NDU0kgZGlzayBzdXBwb3J0JworIworCisjCisjIFVTQiBHYWRnZXQgU3VwcG9ydAorIworIyBDT05GSUdfVVNCX0dBREdFVCBpcyBub3Qgc2V0CisKKyMKKyMgTU1DL1NEIENhcmQgc3VwcG9ydAorIworIyBDT05GSUdfTU1DIGlzIG5vdCBzZXQKKworIworIyBMRUQgZGV2aWNlcworIworIyBDT05GSUdfTkVXX0xFRFMgaXMgbm90IHNldAorCisjCisjIExFRCBkcml2ZXJzCisjCisKKyMKKyMgTEVEIFRyaWdnZXJzCisjCisKKyMKKyMgSW5maW5pQmFuZCBzdXBwb3J0CisjCisKKyMKKyMgRURBQyAtIGVycm9yIGRldGVjdGlvbiBhbmQgcmVwb3J0aW5nIChSQVMpIChFWFBFUklNRU5UQUwpCisjCisKKyMKKyMgUmVhbCBUaW1lIENsb2NrCisjCisjIENPTkZJR19SVENfQ0xBU1MgaXMgbm90IHNldAorCisjCisjIERNQSBFbmdpbmUgc3VwcG9ydAorIworIyBDT05GSUdfRE1BX0VOR0lORSBpcyBub3Qgc2V0CisKKyMKKyMgRE1BIENsaWVudHMKKyMKKworIworIyBETUEgRGV2aWNlcworIworCisjCisjIEZpbGUgc3lzdGVtcworIworQ09ORklHX0VYVDJfRlM9eQorIyBDT05GSUdfRVhUMl9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ICAxICAwICAyICAwIAkvKiBUeEQ1ICovCisJCQkJCTQgIDE1ICAxICAwICAyICAwIAkvKiBUeEQ2ICovCisJCQkJCTQgIDE0ICAxICAwICAyICAwIAkvKiBUeEQ3ICovCisJCQkJCTQgIDBmICAyICAwICAyICAwIAkvKiBSeEQwICovCisJCQkJCTQgIDBlICAyICAwICAyICAwIAkvKiBSeEQxICovCisJCQkJCTQgIDBkICAyICAwICAyICAwIAkvKiBSeEQyICovCisJCQkJCTQgIDBjICAyICAwICAyICAwIAkvKiBSeEQzICovCisJCQkJCTQgIDFkICAyICAwICAyICAwIAkvKiBSeEQ0ICovCisJCQkJCTQgIDFjICAyICAwICAyICAwIAkvKiBSeEQ1ICovCisJCQkJCTQgIDFiICAyICAwICAyICAwIAkvKiBSeEQ2ICovCisJCQkJCTQgIDFhICAyICAwICAyICAwIAkvKiBSeEQ3ICovCisJCQkJCTQgIDBiICAxICAwICAyICAwIAkvKiBUWF9FTiAqLworCQkJCQk0ICAxOCAgMSAgMCAgMiAgMCAJLyogVFhfRVIgKi8KKwkJCQkJNCAgMGYgIDIgIDAgIDIgIDAgCS8qIFJYX0RWICovCisJCQkJCTQgIDFlICAyICAwICAyICAwIAkvKiBSWF9FUiAqLworCQkJCQk0ICAxMSAgMiAgMCAgMiAgMCAJLyogUlhfQ0xLICovCisJCQkJCTQgIDEzICAxICAwICAyICAwIAkvKiBHVFhfQ0xLICovCisJCQkJCTEgIDFmICAyICAwICAzICAwPjsJLyogR1RYMTI1ICovCisJCQl9OworCQkJdWNjX3BpbkAwMiB7CisJCQkJbGludXgscGhhbmRsZSA9IDxlMDEwMDAyPjsKKwkJCQlwaW8tbWFwID0gPAorCQkJLyogcG9ydCAgcGluICBkaXIgIG9wZW5fZHJhaW4gIGFzc2lnbm1lbnQgIGhhc19pcnEgKi8KKwkJCQkJNSAgMGEgMSAgMCAgMiAgMCAgIC8qIFR4RDAgKi8KKwkJCQkJNSAgMDkgMSAgMCAgMiAgMCAgIC8qIFR4R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CQk0ICAwNiAzICAwICAyICAwICAgLyogTURJTyAqLworCQkJCQk0ICAwNSAxICAwICAyICAwPjsgLyogTURDICovCisJCQl9OworCQl9OworCX07CisKKwlxZUBlMDA4MDAwMCB7CisJCSNhZGRyZXNzLWNlbGxzID0gPDE+OworCQkjc2l6ZS1jZWxscyA9IDwxPjsKKwkJZGV2aWNlX3R5cGUgPSAicWUiOworCQltb2RlbCA9ICJRRSI7CisJCXJhbmdlcyA9IDwwIGUwMDgwMDAwIDAwMDQwMDAwPjsKKwkJcmVnID0gPGUwMDgwMDAwIDQ4MD47CisJCWJyZy1mcmVxdWVuY3kgPSA8MD47CisJCWJ1cy1mcmVxdWVuY3kgPSA8MTc5QTdCMDA+OworCisJCW11cmFtQDEwMDAwIHsKKwkJCWRldmljZV90eXBlID0gIm11cmFtIjsKKwkJCXJhbmdlcyA9IDwwIDAwMDEwMDAwIDAwMDBjMDAwPjsKKworCQkJZGF0YS1vbmx5QDB7CisJCQkJcmVnID0gPDAgYzAwMD47CisJCQl9OworCQl9OworCisJCXNwaUA0YzAgeworCQkJZGV2aWNlX3R5cGUgPSAic3BpIjsKKwkJCWNvbXBhdGlibGUgPSAiZnNsX3NwaSI7CisJCQlyZWcgPSA8NGMwIDQwPjsKKwkJCWludGVycnVwdHMgPSA8Mj47CisJCQlpbnRlcnJ1cHQtcGFyZW50ID0gPDgwPjsKKwkJCW1vZGUgPSAiY3B1IjsKKwkJfTsKKworCQlzcGlANTAwIHsKKwkJCWRldmljZV90eXBlID0gInNwaSI7CisJCQljb21wYXRpYmxlID0gImZzbF9zcGkiOworCQkJcmVnID0gPDUwMCA0MD47CisJCQlpbnRlcnJ1cHRzID0gPDE+OworCQkJaW50ZXJydXB0LXBhcmVudCA9IDw4MD47CisJCQltb2RlID0gImNwdSI7CisJCX07CisKKwkJdWNjQDIwMDAgeworCQkJZGV2aWNlX3R5cGUgPSAibmV0d29yayI7CisJCQljb21wYXRpYmxlID0gInVjY19nZXRoIjsKKwkJCW1v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JR19NT0RVTEVfU1JDVkVSU0lPTl9BTEwgaXMgbm90IHNldAorIyBDT05GSUdfS01PRCBpcyBub3Qgc2V0CisKKyMKKyMgQmxvY2sgbGF5ZXIKKyMKK0NPTkZJR19CTE9DSz15CisjIENPTkZJR19MQkQgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9JT19UUkFDRSBpcyBub3Qgc2V0CisjIENPTkZJR19MU0YgaXMgbm90IHNldAorCisjCisjIElPIFNjaGVkdWxlcnMKKyMKK0NPTkZJR19JT1NDSEVEX05PT1A9eQorQ09ORklHX0lPU0NIRURfQVM9eQorQ09ORklHX0lPU0NIRURfREVBRExJTkU9eQorQ09ORklHX0lPU0NIRURfQ0ZRPXkKK0NPTkZJR19ERUZBVUxUX0FTPXkKKyMgQ09ORklHX0RFRkFVTFRfREVBRExJTkUgaXMgbm90IHNldAorIyBDT05GSUdfREVGQVVMVF9DRlEgaXMgbm90IHNldAorIyBDT05GSUdfREVGQVVMVF9OT09QIGlzIG5vdCBzZXQKK0NPTkZJR19ERUZBVUxUX0lPU0NIRUQ9ImFudGljaXBhdG9yeSIKK0NPTkZJR19QUENfR0VONTUwPXkKKyMgQ09ORklHX1dBTlRfRUFSTFlfU0VSSUFMIGlzIG5vdCBzZXQKKworIworIyBQbGF0Zm9ybSBzdXBwb3J0CisjCitDT05GSUdfTVBDODMxM19SREI9eQorIyBDT05GSUdfTVBDODMyeF9NRFMgaXMgbm90IHNldAorIyBDT05GSUdfTVBDODM0eF9TWVMgaXMgbm90IHNldAorIyBDT05GSUdfTVBDODM0eF9JVFggaXMgbm90IHNldAorIyBDT05GSUdfTVBDODM2MEVfUEIgaXMgbm90IHNldAorQ09ORklHX1BQQ19NUEM4MzF4PXkKKyMgQ09ORklHX01QSUMgaXMgbm90IHNldAorCisjCisjIEtlcm5lbCBvcHRpb25zCisjCisjIENPTkZJR19ISUdITUVNIGlzIG5vdCBzZXQKKyMgQ09ORklHX0haXzEwMCBpcyBub3Qgc2V0CitD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V0CisjIENPTkZJR19JUkRBIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JUIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lFRUU4MDIxMSBpcyBub3Qgc2V0CisKKyMKKyMgRGV2aWNlIERyaXZlcnMKKyMKKworIworIyBHZW5lcmljIERyaXZlciBPcHRpb25zCisjCitDT05GSUdfU1RBTkRBTE9ORT15CitDT05GSUdfUFJFVkVOVF9GSVJNV0FSRV9CVUlMRD15CisjIENPTkZJR19GV19MT0FERVIgaXMgbm90IHNldAorIyBDT05GSUdfREVCVUdfRFJJVkVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NZU19IWVBFUlZJU09SIGlzIG5vdCBzZXQKKworIworIyBDb25uZWN0b3IgLSB1bmlmaWVkIHVzZXJzcGFjZSA8LT4ga2VybmVsc3BhY2UgbGlua2VyCisjCisjIENPTkZJR19DT05ORUNUT1IgaXMgbm90IHNldAorCisjCisjIE1lbW9yeSBUZWNobm9sb2d5IERldmljZXMgKE1URCkKKyMKK0NPTkZJR19NVEQ9eQorIyBDT05GSUdfTVREX0RFQlVHIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DT05DQVQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BBUlRJVElPTlMgaXMgbm90IHNldAorCisjCisjIFVzZXIgTW9kdWxlcyBBbmQgVHJhbnNsYXRpb24gTGF5ZXJzCisjCitDT05GSUdfTVREX0NIQVI9eQorIyBDT05GSUdfTVREX0JMS0RFVlMgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DS19STyBpcyBub3Qgc2V0CisjIENPTkZJR19GVEwgaXMgbm90IHNldAorIyBDT05GSUdfTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19JTkZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19SRkRfRlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NTRkRDIGlzIG5vdCBzZXQKKworIworIyBSQU0vUk9NL0ZsYXNoIGNoaXAgZHJpdmVycworIworQ09ORklHX01URF9DRkk9eQorIyBDT05GSUdfTVREX0pFREVDUFJPQkUgaXMgbm90IHNldAorQ09ORklHX01URF9HRU5fUFJPQkU9eQorIyBDT05GSUdfTVREX0NGSV9BRFZfT1BUSU9OUyBpcyBub3Qgc2V0CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8yPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfND15CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMTYgaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzMyIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0kxPXkKK0NPTkZJR19NVERfQ0ZJX0kyPXkKKyMgQ09ORklHX01URF9DRklfSTQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0NGSV9JOCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0lOVEVMRVhUIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT0JTT0xFVEVfQ0hJUFMgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKKyMgQ09ORklHX01URF9DT01QTEVYX01BUFBJTkdTIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfUEhZU01BUD15CitDT05GSUdfTVREX1BIWVNNQVBfU1RBUlQ9MHhmZTAwMDAwMAorQ09ORklHX01URF9QSFlTTUFQX0xFTj0weDEwMDAwMDAKK0NPTkZJR19NVERfUEhZU01BUF9CQU5LV0lEVEg9MgorIyBDT05GSUdfTVREX1BIWVNNQVBfT0YgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1BMQVRSQU0gaXMgbm90IHNldAorCisjCisjIFNlbGYtY29udGFpbmVkIE1URCBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTVREX1BNQzU1MSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfREFUQUZMQVNIIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NMjVQODAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX1NMUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QSFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTVREUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9CTE9DSzJNVEQgaXMgbm90IHNldAorCisjCisjIERpc2stT24tQ2hpcCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX0RPQzIwMDAgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RPQzIwMDFQTFVTIGlzIG5vdCBzZXQKKworIworIyBOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfTkFORCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTkFORF9DQUZFIGlzIG5vdCBzZXQKKworIworIyBPbmVOQU5EIEZsYXNoIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19NVERfT05FTkFORCBpcyBub3Qgc2V0CisKKyMKKyMgUGFyYWxsZWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19QQVJQT1JUIGlzIG5vdCBzZXQKKworIworIyBQbHVnIGFuZCBQbGF5IHN1cHBvcnQKKyMKKworIworIyBCbG9jayBkZXZpY2VzCisjCisjIENPTkZJR19CTEtfREVWX0ZEIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19DUFFfREEgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0NQUV9DSVNTX0RBIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfREFDOTYwIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JMS19ERVZfVU1FTSBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfREVWX0NPV19DT01NT04gaXMgbm90IHNldAorQ09ORklHX0JMS19ERVZfTE9PUD15CisjIENPTkZJR19CTEtfREVWX0NSWVBUT0xPT1AgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9OQkQgaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9TWDggaXMgbm90IHNldAorIyBDT05GSUdfQkxLX0RFVl9VQiBpcyBub3Qgc2V0CitDT05GSUdfQkxLX0RFVl9SQU09eQorQ09ORklHX0JMS19ERVZfUkFNX0NPVU5UPTE2CitDT05GSUdfQkxLX0RFVl9SQU1fU0laRT0zMjc2OAorQ09ORklHX0JMS19ERVZfUkFNX0JMT0NLU0laRT0xMDI0CitDT05GSUdfQkxLX0RFVl9JTklUUkQ9eQorIyBDT05GSUdfQ0RST01fUEtUQ0RWRCBpcyBub3Qgc2V0CisjIENPTkZJR19BVEFfT1ZFUl9FVEggaXMgbm90IHNldAorCisjCisjIE1pc2MgZGV2aWNlcworIworIyBDT05GSUdfU0dJX0lPQzQgaXMgbm90IHNldAorIyBDT05GSUdfVElGTV9DT1JFIGlzIG5vdCBzZXQKKworIworIyBBVEEvQVRBUEkvTUZNL1JMTCBzdXBwb3J0CisjCisjIENPTkZJR19JREUgaXMgbm90IHNldAorCisjCisjIFNDU0kgZGV2aWNlIHN1cHBvcnQKKyMKKyMgQ09ORklHX1JBSURfQVRUUlMgaXMgbm90IHNldAorQ09ORklHX1NDU0k9eQorIyBDT05GSUdfU0NTSV9UR1QgaXMgbm90IHNld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Mgbm90IHNldAorIyBDT05GSUdfREwySyBpcyBub3Qgc2V0CisjIENPTkZJR19FMTAwMCBpcyBub3Qgc2V0CisjIENPTkZJR19OUzgzODIwIGlzIG5vdCBzZXQKKyMgQ09ORklHX0hBTUFDSEkgaXMgbm90IHNldAorIyBDT05GSUdfWUVMTE9XRklOIGlzIG5vdCBzZXQKKyMgQ09ORklHX1I4MTY5IGlzIG5vdCBzZXQKKyMgQ09ORklHX1NJUzE5MCBpcyBub3Qgc2V0CisjIENPTkZJR19TS0dFIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NLWTIgaXMgbm90IHNldAorIyBDT05GSUdfU0s5OExJTiBpcyBub3Qgc2V0CisjIENPTkZJR19WSUFfVkVMT0NJVFkgaXMgbm90IHNldAorIyBDT05GSUdfVElHT04zIGlzIG5vdCBzZXQKKyMgQ09ORklHX0JOWDIgaXMgbm90IHNldAorQ09ORklHX0dJQU5GQVI9eQorQ09ORklHX0dGQVJfTkFQST15CisjIENPTkZJR19RTEEzWFhYIGlzIG5vdCBzZXQKKworIworIyBFdGhlcm5ldCAoMTAwMDAgTWJpdCkKKyMKKyMgQ09ORklHX0NIRUxTSU9fVDEgaXMgbm90IHNldAorIyBDT05GSUdfSVhHQiBpcyBub3Qgc2V0CisjIENPTkZJR19TMklPIGlzIG5vdCBzZXQKKyMgQ09ORklHX01ZUkkxMEdFIGlzIG5vdCBzZXQKKyMgQ09ORklHX05FVFhFTl9OSUMgaXMgbm90IHNldAorCisjCisjIFRva2VuIFJpbmcgZGV2aWNlcworIworIyBDT05GSUdfVFIgaXMgbm90IHNldAorCisjCisjIFdpcmVsZXNzIExBTiAobm9uLWhhbXJhZGlvKQorIworIyBDT05GSUdfTkVUX1JBRElPIGlzIG5vdCBzZXQKKworIworIyBXYW4gaW50ZXJmYWNlcworIworIyBDT05GSUdfV0FOIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZEREkgaXMgbm90IHNldAorIyBDT05GSUdfSElQUEkgaXMgbm90IHNld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MKKyMgQ09ORklHX1NFUklPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0dBTUVQT1JUIGlzIG5vdCBzZXQKKworIworIyBDaGFyYWN0ZXIgZGV2aWNlcworIworIyBDT05GSUdfVlQgaXMgbm90IHNldAorIyBDT05GSUdfU0VSSUFMX05PTlNUQU5EQVJEIGlzIG5vdCBzZXQKKworIworIyBTZXJpYWwgZHJpdmVycworIworQ09ORklHX1NFUklBTF84MjUwPXkKK0NPTkZJR19TRVJJQUxfODI1MF9DT05TT0xFPXkKK0NPTkZJR19TRVJJQUxfODI1MF9QQ0k9eQorQ09ORklHX1NFUklBTF84MjUwX05SX1VBUlRTPTQKK0NPTkZJR19TRVJJQUxfODI1MF9SVU5USU1FX1VBUlRTPTQKKyMgQ09ORklHX1NFUklBTF84MjUwX0VYVEVOREVEIGlzIG5vdCBzZXQKKworIworIyBOb24tODI1MCBzZXJpYWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19TRVJJQUxfVUFSVExJVEUgaXMgbm90IHNldAorQ09ORklHX1NFUklBTF9DT1JFPXkKK0NPTkZJR19TRVJJQUxfQ09SRV9DT05TT0xFPXkKKyMgQ09ORklHX1NFUklBTF9KU00gaXMgbm90IHNldAorQ09ORklHX1VOSVg5OF9QVFlTPXkKK0NPTkZJR19MRUdBQ1lfUFRZUz15CitDT05GSUdfTEVHQUNZX1BUWV9DT1VOVD0yNTYKKworIworIyBJUE1JCisjCisjIENPTkZJR19JUE1JX0hBTkRMRVIgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIENhcmRzCisjCitDT05GSUdfV0FUQ0hET0c9eQorIyBDT05GSUdfV0FUQ0hET0dfTk9XQVlPVVQgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19TT0ZUX1dBVENIRE9HIGlzIG5vdCBzZXQKK0NPTkZJR184M3h4X1dEVD15CisKKyMKKyMgUENJLWJhc2VkIFdhdGNoZG9nIEN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AwIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfTUFYNjg3NSBpcyBub3Qgc2V0CisjIENPTkZJR19JMkNfREVCVUdfQ09SRSBpcyBub3Qgc2V0CisjIENPTkZJR19JMkNfREVCVUdfQUxHTyBpcyBub3Qgc2V0CisjIENPTkZJR19JMkNfREVCVUdfQlVTIGlzIG5vdCBzZXQKKyMgQ09ORklHX0kyQ19ERUJVR19DSElQIGlzIG5vdCBzZXQKKworIworIyBTUEkgc3VwcG9ydAorIworQ09ORklHX1NQST15CisjIENPTkZJR19TUElfREVCVUcgaXMgbm90IHNldAorQ09ORklHX1NQSV9NQVNURVI9eQorCisjCisjIFNQSSBNYXN0ZXIgQ29udHJvbGxlciBEcml2ZXJzCisjCitDT05GSUdfU1BJX0JJVEJBTkc9eQorQ09ORklHX1NQSV9NUEM4M3h4PXkKKworIworIyBTUEkgUHJvdG9jb2wgTWFzdGVycworIworCisjCisjIERhbGxhcydzIDEtd2lyZSBidXMKKyMKKyMgQ09ORklHX1cxIGlzIG5vdCBzZXQKKworIworIyBIYXJkd2FyZSBNb25pdG9yaW5nIHN1cHBvcnQKKyMKK0NPTkZJR19IV01PTj15CisjIENPTkZJR19IV01PTl9WSUQgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19BQklUVUdVUlUgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19BRE0xMDIxIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfQURNMTAyNSBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX0FETTEwMjYgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19BRE0xMDMxIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfQURNOTI0MCBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX0FTQjEwMCBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX0FUWFAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NF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UFU9eQorQ09ORklHX1JXU0VNX1hDSEdBRERfQUxHT1JJVEhNPXkKK0NPTkZJR19BUkNIX0hBU19JTE9HMl9VMzI9eQorQ09ORklHX0dFTkVSSUNfSFdFSUdIVD15CitDT05GSUdfR0VORVJJQ19DQUxJQlJBVEVfREVMQVk9eQorQ09ORklHX0dFTkVSSUNfRklORF9ORVhUX0JJVD15CitDT05GSUdfUFBDPXkKK0NPTkZJR19FQVJMWV9QUklOVEs9eQorQ09ORklHX0dFTkVSSUNfTlZSQU09eQorQ09ORklHX1NDSEVEX05PX05PX09NSVRfRlJBTUVfUE9JTlRFUj15CitDT05GSUdfQVJDSF9NQVlfSEFWRV9QQ19GREM9eQorQ09ORklHX1BQQ19PRj15CitDT05GSUdfUFBDX1VEQkdfMTY1NTA9eQorIyBDT05GSUdfR0VORVJJQ19UQlNZTkMgaXMgbm90IHNldAorQ09ORklHX0FVRElUX0FSQ0g9eQorQ09ORklHX0dFTkVSSUNfQlVHPXkKK0NPTkZJR19ERUZBVUxUX1VJTUFHRT15CisKKyMKKyMgUHJvY2Vzc29yIHN1cHBvcnQKKyMKKyMgQ09ORklHX0NMQVNTSUMzMiBpcyBub3Qgc2V0CisjIENPTkZJR19QUENfODJ4eCBpcyBub3Qgc2V0CitDT05GSUdfUFBDXzgzeHg9eQorIyBDT05GSUdfUFBDXzg1eHggaXMgbm90IHNldAorIyBDT05GSUdfUFBDXzg2eHggaXMgbm90IHNldAorIyBDT05GSUdfUFBDXzh4eCBpcyBub3Qgc2V0CisjIENPTkZJR180MHggaXMgbm90IHNldAorIyBDT05GSUdfNDR4IGlzIG5vdCBzZXQKKyMgQ09ORklHX0UyMDAgaXMgbm90IHNldAorQ09ORklHXzZ4eD15CitDT05GSUdfODN4eD15CitDT05GSUdfUFBDX0ZQVT15CisjIENPTkZJR19QUENfRENSX05BVElWRSBpcyBub3Qgc2V0CisjIENPTkZJR19QUENfRENSX01NSU8gaXMgbm90IHNldAorQ09ORklHX1BQQ19TVERfTU1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MYXllcnMKKyMKK0NPTkZJR19NVERfQ0hBUj15CisjIENPTkZJR19NVERfQkxLREVWUyBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0sgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0JMT0NLX1JPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CisjIENPTkZJR19NVERfSkVERUNQUk9CRSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0dFTl9QUk9CRT15CisjIENPTkZJR19NVERfQ0ZJX0FEVl9PUFRJT05TIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMT15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzI9eQorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF80PXkKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF84IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xNiBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMzIgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfSTE9eQorQ09ORklHX01URF9DRklfSTI9eQorIyBDT05GSUdfTVREX0NGSV9JNCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0k4IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSU5URUxFWFQgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfQU1EU1REPXkKKyMgQ09ORklHX01URF9DRklfU1RBQSBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9VVElMPXkKKyMgQ09ORklHX01URF9SQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX1JPTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQUJTRU5UIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9PQlNPTEVURV9DSElQUyBpcyBub3Qgc2V0CisKKyMKKyMgTWFwcGluZyBkcml2ZXJzIGZvciBjaGlwIGFjY2VzcworIworIyBDT05GSUdfTVREX0NPTVBMRVhfTUFQUElOR1MgaXMgbm90IHNldAorQ09ORklHX01URF9QSFlTTUFQPXkKK0NPTkZJR19NVERfUEhZU01BUF9TVEFSVD0weGZlMDAwMDAwCitDT05GSUdfTVREX1BIWVNNQVBfTEVOPTB4ODAwMDAwCitDT05GSUdfTVREX1BIWVNNQVBfQkFOS1dJRFRIPTIKKyMgQ09ORklHX01URF9QSFlTTUFQX09GIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9QTEFUUkFNIGlzIG5vdCBzZXQKKworIworIyBTZWxmLWNvbnRhaW5lZCBNVEQgZGV2aWNlIGRyaXZlcnMKKyMKKyMgQ09ORklHX01URF9QTUM1NTEgaXMgbm90IHNldAorIyBDT05GSUdfTVREX0RBVEFGTEFTSCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfTTI1UDgwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CisKKyMKKyMgTkFORCBGb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0VYVEVOREVEIGlzIG5vdCBzZXQKKworIworIyBOb24tODI1MCBzZXJpYWwgcG9ydCBzdXBwb3J0CisjCisjIENPTkZJR19TRVJJQUxfVUFSVExJVEUgaXMgbm90IHNldAorQ09ORklHX1NFUklBTF9DT1JFPXkKK0NPTkZJR19TRVJJQUxfQ09SRV9DT05TT0xFPXkKKyMgQ09ORklHX1NFUklBTF9KU00gaXMgbm90IHNldAorQ09ORklHX1VOSVg5OF9QVFlTPXkKK0NPTkZJR19MRUdBQ1lfUFRZUz15CitDT05GSUdfTEVHQUNZX1BUWV9DT1VOVD0yNTYKKworIworIyBJUE1JCisjCisjIENPTkZJR19JUE1JX0hBTkRMRVIgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIENhcmRzCisjCitDT05GSUdfV0FUQ0hET0c9eQorIyBDT05GSUdfV0FUQ0hET0dfTk9XQVlPVVQgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19TT0ZUX1dBVENIRE9HIGlzIG5vdCBzZXQKK0NPTkZJR184M3h4X1dEVD15CisKKyMKKyMgUENJLWJhc2VkIFdhdGNoZG9nIENhcmRzCisjCisjIENPTkZJR19QQ0lQQ1dBVENIRE9HIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dEVFBDSSBpcyBub3Qgc2V0CitDT05GSUdfSFdfUkFORE9NPXkKKyMgQ09ORklHX05WUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX0dFTl9SVEMgaXMgbm90IHNldAorIyBDT05GSUdfRFRMSyBpcyBub3Qgc2V0CisjIENPTkZJR19SMzk2NCBpcyBub3Qgc2V0CisjIENPTkZJR19BUFBMSUNPTSBpcyBub3Qgc2V0CisjIENPTkZJR19BR1AgaXMgbm90IHNldAorIyBDT05GSUdfRFJNIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JBV19EUklWRVIgaXMgbm90IHNldAorCisjCisjIFRQTSBkZXZpY2VzCisjCisjIENPT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aXRvcmluZyBzdXBwb3J0CisjCisjIENPTkZJR19IV01PTiBpcyBub3Qgc2V0CisjIENPTkZJR19IV01PTl9WSUQgaXMgbm90IHNldAorCisjCisjIE11bHRpbWVkaWEgZGV2aWNlcworIworIyBDT05GSUdfVklERU9fREVWIGlzIG5vdCBzZXQKKworIworIyBEaWdpdGFsIFZpZGVvIEJyb2FkY2FzdGluZyBEZXZpY2VzCisjCisjIENPTkZJR19EVkIgaXMgbm90IHNldAorCisjCisjIEdyYXBoaWNzIHN1cHBvcnQKKyMKKyMgQ09ORklHX0ZJUk1XQVJFX0VESUQgaXMgbm90IHNldAorIyBDT05GSUdfRkIgaXMgbm90IHNldAorIyBDT05GSUdfRkJfSUJNX0dYVDQ1MDAgaXMgbm90IHNldAorIyBDT05GSUdfQkFDS0xJR0hUX0xDRF9TVVBQT1JUIGlzIG5vdCBzZXQKKworIworIyBTb3VuZAorIworIyBDT05GSUdfU09VTkQgaXMgbm90IHNldAorCisjCisjIFVTQiBzdXBwb3J0CisjCitDT05GSUdfVVNCX0FSQ0hfSEFTX0hDRD15CitDT05GSUdfVVNCX0FSQ0hfSEFTX09IQ0k9eQorQ09ORklHX1VTQl9BUkNIX0hBU19FSENJPXkKKyMgQ09ORklHX1VTQiBpcyBub3Qgc2V0CisKKyMKKyMgTk9URTogVVNCX1NUT1JBR0UgZW5hYmxlcyBTQ1NJLCBhbmQgJ1NDU0kgZGlzayBzdXBwb3J0JworIworCisjCisjIFVTQiBHYWRnZXQgU3VwcG9ydAorIworIyBDT05GSUdfVVNCX0dBREdFVCBpcyBub3Qgc2V0CisKKyMKKyMgTU1DL1NEIENhcmQgc3VwcG9ydAorIworIyBDT05GSUdfTU1DIGlzIG5vdCBzZXQKKworIworIyBMRUQgZGV2aWNlcworIworIyBDT05GSUdfTkVXX0xFRFMgaXMgbm90IHNldAorCisjCisjIExFRCBkcml2ZXJzCisjCisKKyMKKyMgTEVEIFRyaWdnZXJzCisjCisKKyMKKyMgSW5maW5pQmFu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lfMyBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV80IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzUgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfNiBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfSVNPODg1OV83IGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19JU084ODU5XzkgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfMTMgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfMTQgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0lTTzg4NTlfMTUgaXMgbm90IHNldAorIyBDT05GSUdfTkxTX0tPSThfUiBpcyBub3Qgc2V0CisjIENPTkZJR19OTFNfS09JOF9VIGlzIG5vdCBzZXQKKyMgQ09ORklHX05MU19VVEY4IGlzIG5vdCBzZXQKKworIworIyBEaXN0cmlidXRlZCBMb2NrIE1hbmFnZXIKKyMKKyMgQ09ORklHX0RMTSBpcyBub3Qgc2V0CisKKyMKKyMgTGlicmFyeSByb3V0aW5lcworIworQ09ORklHX0JJVFJFVkVSU0U9eQorIyBDT05GSUdfQ1JDX0NDSVRUIGlzIG5vdCBzZXQKKyMgQ09ORklHX0NSQzE2IGlzIG5vdCBzZXQKK0NPTkZJR19DUkMzMj15CisjIENPTkZJR19MSUJDUkMzMkMgaXMgbm90IHNldAorQ09ORklHX1BMSVNUPXkKK0NPTkZJR19JT01BUF9DT1BZPXkKKworIworIyBJbnN0cnVtZW50YXRpb24gU3VwcG9ydAorIworIyBDT05GSUdfUFJPRklMSU5HIGlzIG5vdCBzZXQKKworIworIyBLZXJuZWwgaGFja2luZworIworIyBDT05GSUdfUFJJTlRLX1RJTUUgaXMgbm90IHNldAorQ09ORklHX0VOQUJMRV9NVVNUX0NIRUNLPXkKKyMgQ09ORklHX01BR0lDX1NZU1JRIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VOVVNFRF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UdfTkVURklMVEVSIGlzIG5vdCBzZXQKKworIworIyBEQ0NQIENvbmZpZ3VyYXRpb24gKEVYUEVSSU1FTlRBTCkKKyMKKyMgQ09ORklHX0lQX0RDQ1AgaXMgbm90IHNldAorCisjCisjIFNDVFAgQ29uZmlndXJhdGlvbiAoRVhQRVJJTUVOVEFMKQorIworIyBDT05GSUdfSVBfU0NUUCBpcyBub3Qgc2V0CisKKyMKKyMgVElQQyBDb25maWd1cmF0aW9uIChFWFBFUklNRU5UQUwpCisjCisjIENPTkZJR19USVBDIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FUTSBpcyBub3Qgc2V0CisjIENPTkZJR19CUklER0UgaXMgbm90IHNldAorIyBDT05GSUdfVkxBTl84MDIxUSBpcyBub3Qgc2V0CisjIENPTkZJR19ERUNORVQgaXMgbm90IHNldAorIyBDT05GSUdfTExDMiBpcyBub3Qgc2V0CisjIENPTkZJR19JUFggaXMgbm90IHNldAorIyBDT05GSUdfQVRBTEsgaXMgbm90IHNldAorIyBDT05GSUdfWDI1IGlzIG5vdCBzZXQKKyMgQ09ORklHX0xBUEIgaXMgbm90IHNldAorIyBDT05GSUdfRUNPTkVUIGlzIG5vdCBzZXQKKyMgQ09ORklHX1dBTl9ST1VURVIgaXMgbm90IHNldAorCisjCisjIFFvUyBhbmQvb3IgZmFpciBxdWV1ZWluZworIworIyBDT05GSUdfTkVUX1NDSEVEIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JrIHRlc3RpbmcKKyMKKyMgQ09ORklHX05FVF9QS1RHRU4gaXMgbm90IHNldAorIyBDT05GSUdfSEFNUkFESU8gaXMgbm90IHNldAorIyBDT05GSUdfSVJEQSBpcyBub3Qgc2V0CisjIENPTkZJR19CVCBpcyBub3Qgc2V0CisjIENPTkZJR19JRUVFODAyMTEgaXMgbm90IHNldAorCisjCisjIERldmljZSBEcml2ZXJzCisjCisKKyMKKyMgR2VuZXJpYyBEcml2ZXIgT3B0aW9ucworIworQ09ORklHX1NUQU5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orCisjCisjIFRlbGVwaG9ueSBTdXBwb3J0CisjCisjIENPTkZJR19QSE9ORSBpcyBub3Qgc2V0CisKKyMKKyMgSW5wdXQgZGV2aWNlIHN1cHBvcnQKKyMKK0NPTkZJR19JTlBVVD15CisjIENPTkZJR19JTlBVVF9GRl9NRU1MRVNTIGlzIG5vdCBzZXQKKworIworIyBVc2VybGFuZCBpbnRlcmZhY2VzCisjCisjIENPTkZJR19JTlBVVF9NT1VTRURFViBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfVFNERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZERVYgaXMgbm90IHNldAorIyBDT05GSUdfSU5QVVRfRVZCVUcgaXMgbm90IHNldAorCisjCisjIElucHV0IERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19JTlBVVF9LRVlCT0FSRCBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NT1VTRSBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9KT1lTVElDSyBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9UT1VDSFNDUkVFTiBpcyBub3Qgc2V0CisjIENPTkZJR19JTlBVVF9NSVNDIGlzIG5vdCBzZXQKKworIworIyBIYXJkd2FyZSBJL08gcG9ydHMKKyMKKyMgQ09ORklHX1NFUklPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0dBTUVQT1JUIGlzIG5vdCBzZXQKKworIworIyBDaGFyYWN0ZXIgZGV2aWNlcworIworIyBDT05GSUdfVlQgaXMgbm90IHNldAorIyBDT05GSUdfU0VSSUFMX05PTlNUQU5EQVJEIGlzIG5vdCBzZXQKKworIworIyBTZXJpYWwgZHJpdmVycworIworQ09ORklHX1NFUklBTF84MjUwPXkKK0NPTkZJR19TRVJJQUxfODI1MF9DT05TT0xFPXkKK0NPTkZJR19TRVJJQUxfODI1MF9OUl9VQVJUUz00CitDT05GSUdfU0VS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BWaWRlbyBCcm9hZGNhc3RpbmcgRGV2aWNlcworIworIyBDT05GSUdfRFZCIGlzIG5vdCBzZXQKKworIworIyBHcmFwaGljcyBzdXBwb3J0CisjCitDT05GSUdfRklSTVdBUkVfRURJRD15CisjIENPTkZJR19GQiBpcyBub3Qgc2V0CisjIENPTkZJR19GQl9JQk1fR1hUNDUwMCBpcyBub3Qgc2V0CisjIENPTkZJR19CQUNLTElHSFRfTENEX1NVUFBPUlQgaXMgbm90IHNldAorCisjCisjIFNvdW5kCisjCisjIENPTkZJR19TT1VORCBpcyBub3Qgc2V0CisKKyMKKyMgSElEIERldmljZXMKKyMKK0NPTkZJR19ISUQ9eQorCisjCisjIFVTQiBzdXBwb3J0CisjCisjIENPTkZJR19VU0JfQVJDSF9IQVNfSENEIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9BUkNIX0hBU19PSENJIGlzIG5vdCBzZXQKKyMgQ09ORklHX1VTQl9BUkNIX0hBU19FSENJIGlzIG5vdCBzZXQKKworIworIyBOT1RFOiBVU0JfU1RPUkFHRSBlbmFibGVzIFNDU0ksIGFuZCAnU0NTSSBkaXNrIHN1cHBvcnQnCisjCisKKyMKKyMgVVNCIEdhZGdldCBTdXBwb3J0CisjCisjIENPTkZJR19VU0JfR0FER0VUIGlzIG5vdCBzZXQKKworIworIyBNTUMvU0QgQ2FyZCBzdXBwb3J0CisjCisjIENPTkZJR19NTUMgaXMgbm90IHNldAorCisjCisjIExFRCBkZXZpY2VzCisjCisjIENPTkZJR19ORVdfTEVEUyBpcyBub3Qgc2V0CisKKyMKKyMgTEVEIGRyaXZlcnMKKyMKKworIworIyBMRUQgVHJpZ2dlcnMKKyMKKworIworIyBJbmZpbmlCYW5kIHN1cHBvcnQKKyMKKworIworIyBFREFDIC0gZXJyb3IgZGV0ZWN0aW9uIGFuZCByZXBvcnRpbmcgKFJBUykgKEVYUEVSSU1FTlRBTCkKKyMKKworIworIyBSZWFsIFRpbWUgQ2xvY2sKKyMKKyMgQ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CBzZXQKKyMgQ09ORklHX0hQRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfUU5YNEZTX0ZTIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NZU1ZfRlMgaXMgbm90IHNldAorIyBDT05GSUdfVUZTX0ZTIGlzIG5vdCBzZXQKKworIworIyBOZXR3b3JrIEZpbGUgU3lzdGVtcworIworQ09ORklHX05GU19GUz15CitDT05GSUdfTkZTX1YzPXkKKyMgQ09ORklHX05GU19WM19BQ0wgaXMgbm90IHNldAorQ09ORklHX05GU19WND15CisjIENPTkZJR19ORlNfRElSRUNUSU8gaXMgbm90IHNldAorIyBDT05GSUdfTkZTRCBpcyBub3Qgc2V0CitDT05GSUdfUk9PVF9ORlM9eQorQ09ORklHX0xPQ0tEPXkKK0NPTkZJR19MT0NLRF9WND15CitDT05GSUdfTkZTX0NPTU1PTj15CitDT05GSUdfU1VOUlBDPXkKK0NPTkZJR19TVU5SUENfR1NTPXkKK0NPTkZJR19SUENTRUNfR1NTX0tSQjU9eQorIyBDT05GSUdfUlBDU0VDX0dTU19TUEtNMyBpcyBub3Qgc2V0CisjIENPTkZJR19TTUJfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ0lGUyBpcyBub3Qgc2V0CisjIENPTkZJR19OQ1BfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ09EQV9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19BRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfOVBfRlMgaXMgbm90IHNldAorCisjCisjIFBhcnRpdGlvbiBUeXBlcworIworQ09ORklHX1BBUlRJVElPTl9BRFZBTkNFRD15CisjIENPTkZJR19BQ09STl9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfT1NGX1BBUlRJVElPTiBpcyBub3Qgc2V0CisjIENPTkZJR19BTUlHQV9QQVJUSVRJT04gaXMgbm90IHNldAorIyBDT05GSUdfQVRBUklfUEFSVElUSU9OIGlzIG5vdCBzZXQKKyMgQ09ORkl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AyNCk7CisJaW50IHJldCA9IC0xOworCWludCBydmFsOworCisJcnZhbCA9IHJ0YXNfY2FsbChydGFzX3Rva2VuKCJyZWFkLXBjaS1jb25maWciKSwgMiwgMiwgJnJldCwgYWRkciwgbGVuKTsKKwkqdmFsID0gcmV0OworCXJldHVybiBydmFsID8gUENJQklPU19ERVZJQ0VfTk9UX0ZPVU5EIDogUENJQklPU19TVUNDRVNTRlVMOworfQorCitzdGF0aWMgaW50IHJ0YXNfd3JpdGVfY29uZmlnKHN0cnVjdCBwY2lfYnVzICpidXMsIHVuc2lnbmVkIGludCBkZXZmbiwKKwkJCSAgICAgaW50IG9mZnNldCwgaW50IGxlbiwgdTMyIHZhbCkKK3sKKwlzdHJ1Y3QgcGNpX2NvbnRyb2xsZXIgKmhvc2UgPSBidXMtPnN5c2RhdGE7CisJdW5zaWduZWQgbG9uZyBhZGRyID0gKG9mZnNldCAmIDB4ZmYpIHwgKChkZXZmbiAmIDB4ZmYpIDw8IDgpCisJICAgIHwgKCgoYnVzLT5udW1iZXIgLSBob3NlLT5maXJzdF9idXNubykgJiAweGZmKSA8PCAxNikKKwkgICAgfCAoaG9zZS0+aW5kZXggPDwgMjQpOworCWludCBydmFsOworCisJcnZhbCA9IHJ0YXNfY2FsbChydGFzX3Rva2VuKCJ3cml0ZS1wY2ktY29uZmlnIiksIDMsIDEsIE5VTEwsCisJCQkgYWRkciwgbGVuLCB2YWwpOworCXJldHVybiBydmFsID8gUENJQklPU19ERVZJQ0VfTk9UX0ZPVU5EIDogUENJQklPU19TVUNDRVNTRlVMOworfQorCitzdGF0aWMgc3RydWN0IHBjaV9vcHMgcnRhc19wY2lfb3BzID0geworCXJ0YXNfcmVhZF9jb25maWcsCisJcnRhc193cml0ZV9jb25maWcKK307CisKKwordm9pZCBfX2luaXQgZWZpa2FfcGNpc2V0dXAodm9pZCkKK3sKKwljb25zdCBpbnQgKmJ1c19yYW5nZTsKKwlpbnQgbGVuOworCXN0cnVjdCBwY2lfY29udHJvbG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ZXMgKi8KKwlvZl9wbGF0Zm9ybV9idXNfcHJvYmUoTlVMTCxtcGM4NTY4X2lkcyxOVUxMKTsKKworCXJldHVybiAwOworfQorZGV2aWNlX2luaXRjYWxsKG1wYzg1NjhfcHVibGlzaF9kZXZpY2VzKTsKKworc3RhdGljIHZvaWQgX19pbml0IG1wYzg1NjhfbWRzX3BpY19pbml0KHZvaWQpCit7CisJc3RydWN0IG1waWMgKm1waWM7CisJc3RydWN0IHJlc291cmNlIHI7CisJc3RydWN0IGRldmljZV9ub2RlICpucCA9IE5VTEw7CisKKwlucCA9IG9mX2ZpbmRfbm9kZV9ieV90eXBlKE5VTEwsICJvcGVuLXBpYyIpOworCWlmICghbnApCisJCXJldHVybjsKKworCWlmIChvZl9hZGRyZXNzX3RvX3Jlc291cmNlKG5wLCAwLCAmcikpIHsKKwkJcHJpbnRrKEtFUk5fRVJSICJGYWlsZWQgdG8gbWFwIG1waWMgcmVnaXN0ZXIgc3BhY2VcbiIpOworCQlvZl9ub2RlX3B1dChucCk7CisJCXJldHVybjsKKwl9CisKKwltcGljID0gbXBpY19hbGxvYyhucCwgci5zdGFydCwKKwkJCU1QSUNfUFJJTUFSWSB8IE1QSUNfV0FOVFNfUkVTRVQgfCBNUElDX0JJR19FTkRJQU4sCisJCQk0LCAwLCAiIE9wZW5QSUMgICIpOworCUJVR19PTihtcGljID09IE5VTEwpOworCW9mX25vZGVfcHV0KG5wKTsKKworCS8qIEludGVybmFsIEludGVycnVwdHMgKi8KKwltcGljX2Fzc2lnbl9pc3UobXBpYywgMCwgci5zdGFydCArIDB4MTAyMDApOworCW1waWNfYXNzaWduX2lzdShtcGljLCAxLCByLnN0YXJ0ICsgMHgxMDI4MCk7CisJbXBpY19hc3NpZ25faXN1KG1waWMsIDIsIHIuc3RhcnQgKyAweDEwMzAwKTsKKwltcGljX2Fzc2lnbl9pc3UobXBpYywgMywgci5zdGFydCArIDB4MTAzODApOworCW1waWNfYXNzaWduX2lzdShtcGljLCA0LCByLnN0YXJ0ICsgMHgxMDQwMCk7CisJbXBpY19hc3NpZ25faXN1KG1waWMsIDUsIHIuc3RhcnQgKyAweDEwNDgwKTsKKwltcGljX2Fzc2lnbl9pc3UobXBpYywgNiwgci5zdGFydCArIDB4MTA1MDApOworCW1waWNfYXNzaWduX2lzdShtcGljLCA3LCByLnN0YXJ0ICsgMHgxMDU4MCk7CisJbXBpY19hc3NpZ25faXN1KG1waWMsIDgsIHIuc3RhcnQgKyAweDEwNjAwKTsKKwltcGljX2Fzc2lnbl9pc3UobXBpYywgOSwgci5zdGFydCArIDB4MTA2ODApOworCW1waWNfYXNzaWduX2lzdShtcGljLCAxMCwgci5zdGFydCArIDB4MTA3MDApOworCW1waWNfYXNzaWduX2lzdShtcGljLCAxMSwgci5zdGFydCArIDB4MTA3ODApOworCisJLyogRXh0ZXJuYWwgSW50ZXJydXB0cyAqLworCW1waWNfYXNzaWduX2lzdShtcGljLCAxMiwgci5zdGFydCArIDB4MTAwMDApOworCW1waWNfYXNzaWduX2lzdShtcGljLCAxMywgci5zdGFydCArIDB4MTAwODApOworCW1waWNfYXNzaWduX2lzdShtcGljLCAxNCwgci5zdGFydCArIDB4MTAxMDApOworCisJbXBpY19pbml0KG1waWMpOworCisKKyNpZmRlZiBDT05GSUdfUVVJQ0NfRU5HSU5FCisJbnAgPSBvZl9maW5kX25vZGVfYnlfdHlwZShOVUxMLCAicWVpYyIpOworCWlmICghbnApCisJCXJldHVybjsKKworCXFlX2ljX2luaXQobnAsIDApOworCW9mX25vZGVfcHV0KG5wKTsKKyNlbmRpZgkJCQkvKiBDT05GSUdfUVVJQ0NfRU5HSU5FICovCit9CisKKworc3RhdGljIGludCBfX2luaXQgbXBjODU2OF9tZHNfcHJvYmUodm9pZCkKK3sKKwljaGFyICptb2RlbCA9IG9mX2dldF9mbGF0X2R0X3Byb3Aob2ZfZ2V0X2ZsYXRfZHRfcm9vdCgpLAorCQkJCQkgICJtb2RlbCIsIE5VTEwpOworCWlmIChtb2RlbCA9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IE9wdGlvbnMKKyMKKyMgQ09ORklHX1NUQU5EQUxPTkUgaXMgbm90IHNldAorQ09ORklHX1BSRVZFTlRfRklSTVdBUkVfQlVJTEQ9eQorIyBDT05GSUdfREVCVUdfRFJJVkVSIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RFQlVHX0RFVlJFUyBpcyBub3Qgc2V0CisjIENPTkZJR19TWVNfSFlQRVJWSVNPUiBpcyBub3Qgc2V0CisKKyMKKyMgQ29ubmVjdG9yIC0gdW5pZmllZCB1c2Vyc3BhY2UgPC0+IGtlcm5lbHNwYWNlIGxpbmtlcgorIworIyBDT05GSUdfQ09OTkVDVE9SIGlzIG5vdCBzZXQKKworIworIyBNZW1vcnkgVGVjaG5vbG9neSBEZXZpY2VzIChNVEQpCisjCitDT05GSUdfTVREPXkKKyMgQ09ORklHX01URF9ERUJVRyBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NPTkNBVD15CitDT05GSUdfTVREX1BBUlRJVElPTlM9eQorIyBDT05GSUdfTVREX1JFREJPT1RfUEFSVFMgaXMgbm90IHNldAorQ09ORklHX01URF9DTURMSU5FX1BBUlRTPXkKKworIworIyBVc2VyIE1vZHVsZXMgQW5kIFRyYW5zbGF0aW9uIExheWVycworIworQ09ORklHX01URF9DSEFSPXkKK0NPTkZJR19NVERfQkxLREVWUz15CitDT05GSUdfTVREX0JMT0NLPXkKKyMgQ09ORklHX0ZUTCBpcyBub3Qgc2V0CisjIENPTkZJR19ORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX0lORlRMIGlzIG5vdCBzZXQKKyMgQ09ORklHX1JGRF9GVEwgaXMgbm90IHNldAorIyBDT05GSUdfU1NGREMgaXMgbm90IHNldAorCisjCisjIFJBTS9ST00vRmxhc2ggY2hpcCBkcml2ZXJzCisjCitDT05GSUdfTVREX0NGST15CitDT05GSUdfTVREX0pFREVDUFJPQkU9eQorQ09ORklHX01URF9HRU5fUFJPQkU9eQorQ09ORklHX01URF9DRklfQURWX09QVElPTlM9eQorQ09ORklHX01URF9DRklfTk9TV0FQPXkKKyMgQ09ORklHX01URF9DRklfQkVfQllURV9TV0FQIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfTEVfQllURV9TV0FQIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfR0VPTUVUUlkgaXMgbm90IHNldAorQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8xPXkKK0NPTkZJR19NVERfTUFQX0JBTktfV0lEVEhfMj15CitDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzQ9eQorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzggaXMgbm90IHNldAorIyBDT05GSUdfTVREX01BUF9CQU5LX1dJRFRIXzE2IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9NQVBfQkFOS19XSURUSF8zMiBpcyBub3Qgc2V0CitDT05GSUdfTVREX0NGSV9JMT15CitDT05GSUdfTVREX0NGSV9JMj15CisjIENPTkZJR19NVERfQ0ZJX0k0IGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9DRklfSTggaXMgbm90IHNldAorIyBDT05GSUdfTVREX09UUCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQ0ZJX0lOVEVMRVhUIGlzIG5vdCBzZXQKK0NPTkZJR19NVERfQ0ZJX0FNRFNURD15CisjIENPTkZJR19NVERfQ0ZJX1NUQUEgaXMgbm90IHNldAorQ09ORklHX01URF9DRklfVVRJTD15CisjIENPTkZJR19NVERfUkFNIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ST00gaXMgbm90IHNldAorIyBDT05GSUdfTVREX0FCU0VOVCBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfT0JTT0xFVEVfQ0hJUFMgaXMgbm90IHNldAorCisjCisjIE1hcHBpbmcgZHJpdmVycyBmb3IgY2hpcCBhY2Nlc3MKKyMKK0NPTkZJR19NVERfQ09NUExFWF9NQVBQSU5HUz15CitDT05GSUdfTVREX1BIWVNNQVA9eQorQ09ORklHX01URF9QSFlTTUFQX1NUQVJUPTB4ODAwMDAwMAorQ09ORklHX01URF9QSFlTTUFQX0xFTj0weDAKK0NPTkZJR19NVERfUEhZU01BUF9CQU5LV0lEVEg9MgorIyBDT05GSUdfTVREX1BDSSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUExBVFJBTSBpcyBub3Qgc2V0CisKKyMKKyMgU2VsZi1jb250YWluZWQgTVREIGRldmljZSBkcml2ZXJzCisjCisjIENPTkZJR19NVERfUE1DNTUxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9TTFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfUEhSQU0gaXMgbm90IHNldAorIyBDT05GSUdfTVREX01URFJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19NVERfQkxPQ0syTVREIGlzIG5vdCBzZXQKKworIworIyBEaXNrLU9uLUNoaXAgRGV2aWNlIERyaXZlcnMKKyMKKyMgQ09ORklHX01URF9ET0MyMDAwIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxIGlzIG5vdCBzZXQKKyMgQ09ORklHX01URF9ET0MyMDAxUExVUyBpcyBub3Qgc2V0CisKKyMKKyMgTkFORCBGbGFzaCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX05BTkQgaXMgbm90IHNldAorIyBDT05GSUdfTVREX05BTkRfQ0FGRSBpcyBub3Qgc2V0CisKKyMKKyMgT25lTkFORCBGbGFzaCBEZXZpY2UgRHJpdmVycworIworIyBDT05GSUdfTVREX09ORU5BTkQgaXMgbm90IHNldAorCisjCisjIFBhcmFsbGVsIHBvcnQgc3VwcG9ydAorIworIyBDT05GSUdfUEFSUE9SVCBpcyBub3Qgc2V0CisKKyMKKyMgUGx1ZyBhbmQgUGxheSBzdXBwb3J0CisjCisKKyMKKyMgQmxvY2sgZGV2aWNlcworIworIyBDT05GSUdfQkxLX0RFVl9GRCBpcyBub3Qgc2V0CisjIENPTkZJR19CTEtfQ1BRX0R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orCisjCisjIEhhcmR3YXJlIEkvTyBwb3J0cworIworQ09ORklHX1NFUklPPXkKKyMgQ09ORklHX1NFUklPX0k4MDQyIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFUklPX1NFUlBPUlQgaXMgbm90IHNldAorIyBDT05GSUdfU0VSSU9fUENJUFMyIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFUklPX0xJQlBTMiBpcyBub3Qgc2V0CisjIENPTkZJR19TRVJJT19SQVcgaXMgbm90IHNldAorIyBDT05GSUdfR0FNRVBPUlQgaXMgbm90IHNldAorCisjCisjIENoYXJhY3RlciBkZXZpY2VzCisjCisjIENPTkZJR19WVCBpcyBub3Qgc2V0CisjIENPTkZJR19TRVJJQUxfTk9OU1RBTkRBUkQgaXMgbm90IHNldAorCisjCisjIFNlcmlhbCBkcml2ZXJzCisjCitDT05GSUdfU0VSSUFMXzgyNTA9eQorQ09ORklHX1NFUklBTF84MjUwX0NPTlNPTEU9eQorQ09ORklHX1NFUklBTF84MjUwX1BDST15CitDT05GSUdfU0VSSUFMXzgyNTBfTlJfVUFSVFM9NAorQ09ORklHX1NFUklBTF84MjUwX1JVTlRJTUVfVUFSVFM9NAorQ09ORklHX1NFUklBTF84MjUwX0VYVEVOREVEPXkKKyMgQ09ORklHX1NFUklBTF84MjUwX01BTllfUE9SVFMgaXMgbm90IHNldAorQ09ORklHX1NFUklBTF84MjUwX1NIQVJFX0lSUT15CisjIENPTkZJR19TRVJJQUxfODI1MF9ERVRFQ1RfSVJRIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFUklBTF84MjUwX1JTQSBpcyBub3Qgc2V0CisKKyMKKyMgTm9uLTgyNTAgc2VyaWFsIHBvcnQgc3VwcG9ydAorIworIyBDT05GSUdfU0VSSUFMX1VBUlRMSVRFIGlzIG5vdCBzZXQKK0NPTkZJR19TRVJJQUxfQ09SRT15CitDT05GSUdfU0VSSUFMX0NPUkVfQ09OU09MRT15CisjIENPTkZJR19TRVJJQUxfSlNNIGlzIG5vdCBzZXQKK0NPTkZJR19VTklYOThfUFRZUz15CitDT05GSUdfTEVHQUNZX1BUWVM9eQorQ09ORklHX0xFR0FDWV9QVFlfQ09VTlQ9MjU2CisKKyMKKyMgSVBNSQorIworIyBDT05GSUdfSVBNSV9IQU5ETEVSIGlzIG5vdCBzZXQKKworIworIyBXYXRjaGRvZyBDYXJkcworIworIyBDT05GSUdfV0FUQ0hET0cgaXMgbm90IHNldAorQ09ORklHX0hXX1JBTkRPTT1tCisjIENPTkZJR19OVlJBTSBpcyBub3Qgc2V0CisjIENPTkZJR19HRU5fUlRDIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RUTEsgaXMgbm90IHNldAorIyBDT05GSUdfUjM5NjQgaXMgbm90IHNldAorIyBDT05GSUdfQVBQTElDT00gaXMgbm90IHNldAorIyBDT05GSUdfQUdQIGlzIG5vdCBzZXQKKyMgQ09ORklHX0RSTSBpcyBub3Qgc2V0CisjIENPTkZJR19SQVdfRFJJVkVSIGlzIG5vdCBzZXQKKworIworIyBUUE0gZGV2aWNlcworIworIyBDT05GSUdfVENHX1RQTSBpcyBub3Qgc2V0CisKKyMKKyMgSTJDIHN1cHBvcnQKKyMKK0NPTkZJR19JMkM9eQorQ09ORklHX0kyQ19DSEFSREVWPXkKKworIworIyBJMkMgQWxnb3JpdGhtcworIworIyBDT05GSUdfSTJDX0FMR09CSVQgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0FMR09QQ0YgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0FMR09QQ0EgaXMgbm90IHNldAorCisjCisjIEkyQyBIYXJkd2FyZSBCdXMgc3VwcG9ydAorIworIyBDT05GSUdfSTJDX0FMSTE1MzUgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0FMSTE1NjMgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0FMSTE1WDMgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0FNRDc1NiBpcyBub3Qgc2V0CisjIENPTkZJR19JMkNf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90IHNldAorIyBDT05GSUdfU0VOU09SU19WVDgyMzEgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19XODM3ODFEIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NFTlNPUlNfVzgzNzkxRCBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX1c4Mzc5MkQgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19XODM3OTMgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19XODNMNzg1VFMgaXMgbm90IHNldAorIyBDT05GSUdfU0VOU09SU19XODM2MjdIRiBpcyBub3Qgc2V0CisjIENPTkZJR19TRU5TT1JTX1c4MzYyN0VIRiBpcyBub3Qgc2V0CisjIENPTkZJR19IV01PTl9ERUJVR19DSElQIGlzIG5vdCBzZXQKKworIworIyBNdWx0aW1lZGlhIGRldmljZXMKKyMKKyMgQ09ORklHX1ZJREVPX0RFViBpcyBub3Qgc2V0CisKKyMKKyMgRGlnaXRhbCBWaWRlbyBCcm9hZGNhc3RpbmcgRGV2aWNlcworIworIyBDT05GSUdfRFZCIGlzIG5vdCBzZXQKKworIworIyBHcmFwaGljcyBzdXBwb3J0CisjCitDT05GSUdfRklSTVdBUkVfRURJRD15CisjIENPTkZJR19GQiBpcyBub3Qgc2V0CisjIENPTkZJR19GQl9JQk1fR1hUNDUwMCBpcyBub3Qgc2V0CisjIENPTkZJR19CQUNLTElHSFRfTENEX1NVUFBPUlQgaXMgbm90IHNldAorCisjCisjIFNvdW5kCisjCisjIENPTkZJR19TT1VORCBpcyBub3Qgc2V0CisKKyMKKyMgVVNCIHN1cHBvcnQKKyMKK0NPTkZJR19VU0JfQVJDSF9IQVNfSENEPXkKK0NPTkZJR19VU0JfQVJDSF9IQVNfT0hDST15CitDT05GSUdfVVNCX0FSQ0hfSEFTX0VIQ0k9eQorIyBDT05GSUdfVVNCIGlzIG5vdCBzZXQKKworIworIyBOT1RFOiBVU0JfU1RPUkFHRSBlbmFibGVzIFNDU0ksIGFuZCAnU0NTSSBkaXNrIHN1cHBvcnQnCisjCisKKyMKKyMgVVNCIEdhZGdldCBTdXBwb3J0CisjCisjIENPTkZJR19VU0JfR0FER0VUIGlzIG5vdCBzZXQKKworIworIyBNTUMvU0QgQ2FyZCBzdXBwb3J0CisjCisjIENPTkZJR19NTUMgaXMgbm90IHNldAorCisjCisjIExFRCBkZXZpY2VzCisjCisjIENPTkZJR19ORVdfTEVEUyBpcyBub3Qgc2V0CisKKyMKKyMgTEVEIGRyaXZlcnMKKyMKKworIworIyBMRUQgVHJpZ2dlcnMKKyMKKworIworIyBJbmZpbmlCYW5kIHN1cHBvcnQKKyMKKyMgQ09ORklHX0lORklOSUJBTkQgaXMgbm90IHNldAorCisjCisjIEVEQUMgLSBlcnJvciBkZXRlY3Rpb24gYW5kIHJlcG9ydGluZyAoUkFTKSAoRVhQRVJJTUVOVEFMKQorIworCisjCisjIFJlYWwgVGltZSBDbG9jaworIworIyBDT05GSUdfUlRDX0NMQVNTIGlzIG5vdCBzZXQKKworIworIyBETUEgRW5naW5lIHN1cHBvcnQKKyMKKyMgQ09ORklHX0RNQV9FTkdJTkUgaXMgbm90IHNldAorCisjCisjIERNQSBDbGllbnRzCisjCisKKyMKKyMgRE1BIERldmljZXMKKyMKKworIworIyBBdXhpbGlhcnkgRGlzcGxheSBzdXBwb3J0CisjCisKKyMKKyMgVmlydHVhbGl6YXRpb24KKyMKKworIworIyBGaWxlIHN5c3RlbXMKKyMKK0NPTkZJR19FWFQyX0ZTPXkKK0NPTkZJR19FWFQyX0ZTX1hBVFRSPXkKK0NPTkZJR19FWFQyX0ZTX1BPU0lYX0FDTD15CitDT05GSUdfRVhUMl9GU19TRUNVUklUWT15CitDT05GSUdfRVhUMl9GU19YSVA9eQorQ09ORklHX0ZTX1hJUD15CitDT05GSUdfRVhUM19GUz15CitDT05GSUdfRVhUM19GU19YQVRUUj15CitDT05GSUdfRVhUM19GU19QT1NJWF9BQ0w9eQorQ09ORklHX0VYVDNfRlNfU0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XR3b3JrIEZpbGUgU3lzdGVtcworIworQ09ORklHX05GU19GUz15CisjIENPTkZJR19ORlNfVjMgaXMgbm90IHNldAorIyBDT05GSUdfTkZTX1Y0IGlzIG5vdCBzZXQKKyMgQ09ORklHX05GU19ESVJFQ1RJTyBpcyBub3Qgc2V0CisjIENPTkZJR19ORlNEIGlzIG5vdCBzZXQKK0NPTkZJR19ST09UX05GUz15CitDT05GSUdfTE9DS0Q9eQorQ09ORklHX05GU19DT01NT049eQorQ09ORklHX1NVTlJQQz15CisjIENPTkZJR19SUENTRUNfR1NTX0tSQjUgaXMgbm90IHNldAorIyBDT05GSUdfUlBDU0VDX0dTU19TUEtNMyBpcyBub3Qgc2V0CisjIENPTkZJR19TTUJfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ0lGUyBpcyBub3Qgc2V0CisjIENPTkZJR19OQ1BfRlMgaXMgbm90IHNldAorIyBDT05GSUdfQ09EQV9GUyBpcyBub3Qgc2V0CisjIENPTkZJR19BRlNfRlMgaXMgbm90IHNldAorIyBDT05GSUdfOVBfRlMgaXMgbm90IHNldAorCisjCisjIFBhcnRpdGlvbiBUeXBlcworIworIyBDT05GSUdfUEFSVElUSU9OX0FEVkFOQ0VEIGlzIG5vdCBzZXQKK0NPTkZJR19NU0RPU19QQVJUSVRJT049eQorCisjCisjIE5hdGl2ZSBMYW5ndWFnZSBTdXBwb3J0CisjCisjIENPTkZJR19OTFMgaXMgbm90IHNldAorCisjCisjIERpc3RyaWJ1dGVkIExvY2sgTWFuYWdlcgorIworIyBDT05GSUdfRExNIGlzIG5vdCBzZXQKKworIworIyBMaWJyYXJ5IHJvdXRpbmVzCisjCitDT05GSUdfQklUUkVWRVJTRT15CisjIENPTkZJR19DUkNfQ0NJVFQgaXMgbm90IHNldAorIyBDT05GSUdfQ1JDMTYgaXMgbm90IHNldAorQ09ORklHX0NSQzMyPXkKKyMgQ09ORklHX0xJQkNSQzMyQyBpcyBub3Qgc2V0CitDT05GSUdfWkxJQl9JTk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PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KLQotLyogTGV2ZWwgMSBJUlEgcm91dGluZXMgKi8KLXN0YXRpYyB2b2lkIGRpc2FibGVfYmlnc3VyX2wxaXJxKHVuc2lnbmVkIGludCBpcnEpCi17Ci0gICAgICAgIHVuc2lnbmVkIGNoYXIgbWFzazsKLSAgICAgICAgdW5zaWduZWQgaW50IG1hc2tfcG9ydCA9ICgoaXJxIC0gQklHU1VSX0lSUV9MT1cpLzgpID8gQklHU1VSX0lSTE1SMSA6IEJJR1NVUl9JUkxNUjA7Ci0gICAgICAgIHVuc2lnbmVkIGNoYXIgYml0ID0gICgxIDw8ICgoaXJxIC0gTUdBVEVfSVJRX0xPVyklOCkgKTsKLQotICAgICAgICBpZihpcnEgPj0gQklHU1VSX0lSUV9MT1cgJiYgaXJxIDwgQklHU1VSX0lSUV9ISUdIKSB7Ci0gICAgICAgICAgICAgICAgcHJfZGVidWcoIkRpc2FibGUgTDEgSVJRICVkXG4iLCBpcnEpOwotICAgICAgICAgICAgICAgIERJUFJJTlRLKDIsImRpc2FibGVfYmlnc3VyX2wxaXJxOiBJTVI9MHglMDh4IG1hc2s9MHgleFxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgIG1hc2tfcG9ydCwgYml0KTsKLQotICAgICAgICAgICAgICAgIC8qIERpc2FibGUgSVJRIC0gc2V0IG1hc2sgYml0ICovCi0gICAgICAgICAgICAgICAgbWFzayA9IGluYihtYXNrX3BvcnQpIHwgYml0OwotICAgICAgICAgICAgICAgIG91dGIobWFzaywgbWFza19wb3J0KTsKLSAgICAgICAgICAgICAgICByZXR1cm47Ci0gICAgICAgIH0KLSAgICAgICAgcHJfZGVidWcoImRpc2FibGVfYmlnc3VyX2wxaXJxOiBJbnZhbGlkIElSUSAlZFxuIiwgaXJxKTsKLX0KLQotc3RhdGljIHZvaWQgZW5hYmxlX2JpZ3N1cl9sMWlycSh1bnNpZ25lZCBpbnQgaXJxKQotewotICAgICAgICB1bn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baXJxLUJJR1NVUl9JUlFfTE9XXSAqIGltcl9vZmZzZXQ7Ci0gICAgICAgICAgICAgICAgbWFzayAmPSBpbmIocmVnKTsKLSAgICAgICAgICAgICAgICBvdXRiKG1hc2sscmVnKTsKLSAgICAgICAgICAgICAgICBESVBSSU5USygyLCJzdGFydHVwX2JpZ3N1cl9pcnE6IElNUj0weCUwOHggbWFzaz0weCV4XG4iLHJlZyxpbmIocmVnKSk7Ci0gICAgICAgIH0KLSAgICAgICAgZWxzZSB7Ci0gICAgICAgICAgICAgICAgLyogRW5hYmxlIHRoZSBMMiBJUlEgLSBjbGVhciBtYXNrIGJpdCAqLwotICAgICAgICAgICAgICAgIGVuYWJsZV9iaWdzdXJfbDJpcnEoaXJxKTsKLSAgICAgICAgICAgICAgICAvKiBFbmFibGUgdGhlIEwxIGJpdCBtYXNraW5nIHRoaXMgTDIgSVJRICovCi0gICAgICAgICAgICAgICAgZW5hYmxlX2JpZ3N1cl9sMWlycShiaWdzdXJfbDJfbDFfbWFwW2lycS1CSUdTVVJfMk5ETFZMX0lSUV9MT1ddKTsKLSAgICAgICAgICAgICAgICBESVBSSU5USygyLCJzdGFydHVwX2JpZ3N1cl9pcnE6IEwxPSVkIEwyPSVkXG4iLAotICAgICAgICAgICAgICAgICAgICAgICAgYmlnc3VyX2wyX2wxX21hcFtpcnEtQklHU1VSXzJORExWTF9JUlFfTE9XXSxpcnEpOwotICAgICAgICB9Ci0gICAgICAgIHJldHVybiAwOwotfQotCi1zdGF0aWMgdm9pZCBzaHV0ZG93bl9iaWdzdXJfaXJxKHVuc2lnbmVkIGludCBpcnEpCi17Ci0gICAgICAgIHByX2RlYnVnKCJzaHV0ZG93bl9iaWdzdXJfaXJxIElSUSAlZFxuIiwgaXJxKTsKLSAgICAgICAgaWYoaXJxID49IEJJR1NVUl9JUlFfTE9XICYmIGlycSA8IEJJR1NVUl9JUlFfSElHSCkKLSAgICAgICAgICAgICAgICBkaXNhYmxlX2JpZ3N1cl9sMWlycShp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ovCi0gICAgICAgIGlmKGlycSA+PSBCSUdTVVJfSVJRX0xPVyAmJiBpcnEgPCBCSUdTVVJfSVJRX0hJR0gpIHsKLSAgICAgICAgICAgICAgICAvKiBzYXZlIHRoZSBoYW5kbGVyIGluIHRoZSBtYWluIGRlc2NyaXB0aW9uIHRhYmxlICovCi0gICAgICAgICAgICAgICAgaXJxX2Rlc2NbaXJxXS5jaGlwID0gJmJpZ3N1cl9sMWlycV90eXBlOwotICAgICAgICAgICAgICAgIGlycV9kZXNjW2lycV0uc3RhdHVzID0gSVJRX0RJU0FCTEVEOwotICAgICAgICAgICAgICAgIGlycV9kZXNjW2lycV0uYWN0aW9uID0gMDsKLSAgICAgICAgICAgICAgICBpcnFfZGVzY1tpcnFdLmRlcHRoID0gMTsKLQotICAgICAgICAgICAgICAgIGRpc2FibGVfYmlnc3VyX2wxaXJxKGlycSk7Ci0gICAgICAgICAgICAgICAgcmV0dXJuOwotICAgICAgICB9Ci0gICAgICAgIHByX2RlYnVnKCJtYWtlX2JpZ3N1cl9sMWlzcjogYmFkIGlycSwgJWRcbiIsIGlycSk7Ci0gICAgICAgIHJldHVybjsKLX0KLQotc3RhdGljIHZvaWQgbWFrZV9iaWdzdXJfbDJpc3IodW5zaWduZWQgaW50IGlycSkgewotCi0gICAgICAgIC8qIHNhbml0eSBjaGVjayBmaXJzdCAqLwotICAgICAgICBpZihpcnEgPj0gQklHU1VSXzJORExWTF9JUlFfTE9XICYmIGlycSA8IEJJR1NVUl8yTkRMVkxfSVJRX0hJR0gpIHsKLSAgICAgICAgICAgICAgICAvKiBzYXZlIHRoZSBoYW5kbGVyIGluIHRoZSBtYWluIGRlc2NyaXB0aW9uIHRhYmxlICovCi0gICAgICAgICAgICAgICAgaXJxX2Rlc2NbaXJxXS5jaGlwID0gJmJpZ3N1cl9sMmlycV90eXBlOwotICAgICAgICAgICAgICAgIGlycV9kZXNjW2lycV0uc3RhdHVzID0gSVJRX0RJU0FCTEVEOwotICAgICAgICAgICAgICAg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SIG51bWJlciAqLwotICAgICAgICAgICAgICAgIG1hc2sgPSBiaWdzdXJfbDJpcnFfbWFza1tpcnEtQklHU1VSX0lSUV9MT1ddOwotICAgICAgICAgICAgICAgIHJlZ19udW0gPSBiaWdzdXJfbDJpcnFfcmVnW2lycS1CSUdTVVJfSVJRX0xPV107Ci0gICAgICAgICAgICAgICAgLyogZmluZCB0aGUgYWN0aXZlIElSUSdzIChYT1Igd2l0aCBpbmFjdGl2ZSBsZXZlbCkqLwotICAgICAgICAgICAgICAgIGFjdHZfaXJxcyA9IGluYihpc3JfYmFzZS1yZWdfbnVtKmlzcl9vZmZzZXQpIF4KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaWdzdXJfbDJfaW5hY3R2X3N0YXRlW3JlZ19udW1dOwotICAgICAgICAgICAgICAgIC8qIGRlY29kZSBhY3RpdmUgSVJRJ3MgKi8KLSAgICAgICAgICAgICAgICBhY3R2X2lycXMgPSBhY3R2X2lycXMgJiBtYXNrICYgfihpbmIoaW1yX2Jhc2UtcmVnX251bSppbXJfb2Zmc2V0KSk7Ci0gICAgICAgICAgICAgICAgLyogaWYgTkVaIHRoZW4gd2UgaGF2ZSBhbiBhY3RpdmUgTDIgSVJRICovCi0gICAgICAgICAgICAgICAgaWYoYWN0dl9pcnFzKSBkbXV4X2lycSA9IGZmeih+YWN0dl9pcnFzKSArIHJlZ19udW0qOCtCSUdTVVJfMk5ETFZMX0lSUV9MT1c7Ci0gICAgICAgICAgICAgICAgLyogaWYgbm8gMm5kIGxldmVsIElSUSBhY3Rpb24sIGJ1dCBoYXMgMXN0IGxldmVsLCB1c2UgMXN0IGxldmVsIGhhbmRsZXIgKi8KLSAgICAgICAgICAgICAgICBpZighaXJxX2Rlc2NbZG11eF9pcnFdLmFjdGlvbiAmJiBpcnFfZGVzY1tpcnFdLmFjdGlvbikKLSAgICAgICAgICAgICAgICAgICAgICAgIGRtdXhfaXJxID0gaXJxOwotICAgICAgICAgICAgICAgIERJUFJJTlRLKDEsImJpZ3N1cl9pcnFfZGVtdXg6IGlycT0lZCBkbXV4X2lycT0lZCBtYXNrPTB4JTA0eCByZWc9JWRcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICBpcnEsIGRtdXhfaXJxLCBtYXNrLCByZWdfbnVtKTsKLSAgICAgICAgfQotI2lmZGVmIENPTkZJR19IRDY0NDY1Ci0gICAgICAgIGRtdXhfaXJxID0gaGQ2NDQ2NV9pcnFfZGVtdXgoZG11eF9pcnEpOwotI2VuZGlmIC8qIENPTkZJR19IRDY0NDY1ICovCi0gICAgICAgIERJUFJJTlRLKDMsImJpZ3N1cl9pcnFfZGVtdXgsIGRlbXV4X2lycT0lZFxuIiwgZG11eF9pcnEpOwotCi0gICAgICAgIHJldHVybiBkbXV4X2lycTsKLX0KLQotLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCi0vLyAgICAgICAgICAgICAgQmlnIFN1ciBJbml0IFJvdXRpbmVzCi0vKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KLXZvaWQgX19pbml0IGluaXRfYmlnc3VyX0lSUSh2b2lkKQotewotICAgICAgICBpbnQgaTsKLQotICAgICAgICBpZiAoIU1BQ0hfQklHU1VSKSByZXR1cm47Ci0KLSAgICAgICAgLyogQ3JlYXRlIElTUidzIGZvciBCaWcgU3VyIENQTEQgSVJRJ3MgKi8KLSAgICAgICAgLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCi0gICAgICAgIGZvcihpPUJJR1NVUl9JUlFfTE9XO2k8QklHU1VSX0lSUV9ISUdIO2krKykKLSAgICAgICAgICAgICAgICBtYWtlX2JpZ3N1cl9sMWlzcihpKTsKLQotICAgICAgICBwcmludGsoS0VSTl9JTkZPICJCaWcgU3VyIENQTEQgTDEgaW50ZXJydX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luY2x1ZGUgPGFzbS9pby5oPgotI2luY2x1ZGUgPGFzbS9pcnEuaD4KLSNpbmNsdWRlIDxhc20vZWMzMTA0L2VjMzEwNC5oPgotCi0vKiBUaGlzIGlzIGZvciBkZWJ1Z2dpbmcgbW9zdGx5OyAgaGVyZSdzIHRoZSB0YWJsZSB0aGF0IEkgaW50ZW5kIHRvIGtlZXAKLSAqIGluIGhlcmU6Ci0gKgotICogICBpbmRleCAgICAgIGZ1bmN0aW9uICAgICAgICBiYXNlIGFkZHIgICAgICAgcG93ZXIgICAgICAgICAgIGludGVycnVwdCBiaXQKLSAqICAgICAgIDAgICAgICBwb3dlciAgICAgICAgICAgYjBlYzAwMDAgICAgICAgIC0tLSAgICAgICAgICAgICAwMDAwMDAwMSAodW51c2VkKQotICogICAgICAgMSAgICAgIGlycXMgICAgICAgICAgICBiMGVjMTAwMCAgICAgICAgLS0tICAgICAgICAgICAgIDAwMDAwMDAyICh1bnVzZWQpCi0gKiAgICAgICAyICAgICAgPz8gICAgICAgICAgICAgIGIwZWMyMDAwICAgICAgICBiMGVjMDAwOCAgICAgICAgMDAwMDAwMDQKLSAqICAgICAgIDMgICAgICBQUzIgKDEpICAgICAgICAgYjBlYzMwMDAgICAgICAgIGIwZWMwMDBjICAgICAgICAwMDAwMDAwOAotICogICAgICAgNCAgICAgIFBTMiAoMikgICAgICAgICBiMGVjNDAwMCAgICAgICAgYjBlYzAwMTAgICAgICAgIDAwMDAwMDEwCi0gKiAgICAgICA1ICAgICAgPz8gICAgICAgICAgICAgIGIwZWM1MDAwICAgICAgICBiMGVjMDAxNCAgICAgICAgMDAwMDAwMjAKLSAqICAgICAgIDYgICAgICBJMkMgICAgICAgICAgICAgYjBlYzYwMDAgICAgICAgIGIwZWMwMDE4ICAgICAgICAwMDAwMDA0MAotICogICAgICAgNyAgICAgIHNlcmlhbCAoMSkgICAgICBiMGVjNzAwMCAgICAgICAgYjBlYzAwMWMgICAgICAgIDAwMDAwMDgwCi0gKiAgICAgICA4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DIpIjsKLSAgICAgICAgY2FzZSA3OgotICAgICAgICAgICAgICAgIHJldHVybiAic2VyaWFsICgxKSI7Ci0gICAgICAgIGNhc2UgODoKLSAgICAgICAgICAgICAgICByZXR1cm4gInNlcmlhbCAoMikiOwotICAgICAgICBjYXNlIDk6Ci0gICAgICAgICAgICAgICAgcmV0dXJuICJzZXJpYWwgKDMpIjsKLSAgICAgICAgY2FzZSAxMDoKLSAgICAgICAgICAgICAgICByZXR1cm4gInNlcmlhbCAoNCkiOwotICAgICAgICBjYXNlIDE2OgotICAgICAgICAgICAgICAgIHJldHVybiAicGNtY2lhICgxKSI7Ci0gICAgICAgIGNhc2UgMTc6Ci0gICAgICAgICAgICAgICAgcmV0dXJuICJwY21jaWEgKDIpIjsKLSAgICAgICAgZGVmYXVsdDogewotICAgICAgICAgICAgICAgIHN0YXRpYyBjaGFyIGJ1ZlszMl07Ci0KLSAgICAgICAgICAgICAgICBzcHJpbnRmKGJ1ZiwgInVua25vd24gKCVkKSIsIGluZGV4KTsKLQotICAgICAgICAgICAgICAgIHJldHVybiBidWY7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICB9Ci19Ci0KLWludCBnZXRfcGVuZGluZ19pbnRlcnJ1cHRzKGNoYXIgKmJ1ZikKLXsKLSAgICAgICAgdTMyIGlwcjsKLSAgICAgICAgdTMyIGJpdDsKLSAgICAgICAgY2hhciAqcCA9IGJ1ZjsKLQotICAgICAgICBwICs9IHNwcmludGYocCwgInBlbmRpbmc6ICgiKTsKLQotICAgICAgICBpcHIgPSBjdHJsX2lubChFQzMxMDRfSVBSKTsKLQotICAgICAgICBmb3IgKGJpdCA9IDE7IGJpdCA8IDMyOyBiaXQrKykKLSAgICAgICAgICAgICAgICBpZiAoIShpcHIgJiAoMTw8Yml0KSkpCi0gICAgICAgICAgICAgICAgICAgICAgICBwICs9IHNwcmludGYocCwgIiVzICIsIGVjMzEwNF9uYW1lKGJpdCkpOwotCi0gICAgICAgIHAgKz0gc3ByaW50Zihw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kLAotICAgICAgICAud3JpdGUgICAgICAgICAgPSBob3N0YXVkaW9fd3JpdGUsCi0gICAgICAgIC5wb2xsICAgICAgICAgICA9IGhvc3RhdWRpb19wb2xsLAotICAgICAgICAuaW9jdGwgICAgICAgICAgPSBob3N0YXVkaW9faW9jdGwsCi0gICAgICAgIC5tbWFwICAgICAgICAgICA9IE5VTEwsCi0gICAgICAgIC5vcGVuICAgICAgICAgICA9IGhvc3RhdWRpb19vcGVuLAotICAgICAgICAucmVsZWFzZSAgICAgICAgPSBob3N0YXVkaW9fcmVsZWFzZSwKKwkub3duZXIgICAgICAgICAgPSBUSElTX01PRFVMRSwKKwkubGxzZWVrICAgICAgICAgPSBub19sbHNlZWssCisJLnJlYWQgICAgICAgICAgID0gaG9zdGF1ZGlvX3JlYWQsCisJLndyaXRlICAgICAgICAgID0gaG9zdGF1ZGlvX3dyaXRlLAorCS5wb2xsICAgICAgICAgICA9IGhvc3RhdWRpb19wb2xsLAorCS5pb2N0bCAgICAgICAgICA9IGhvc3RhdWRpb19pb2N0bCwKKwkubW1hcCAgICAgICAgICAgPSBOVUxMLAorCS5vcGVuICAgICAgICAgICA9IGhvc3RhdWRpb19vcGVuLAorCS5yZWxlYXNlICAgICAgICA9IGhvc3RhdWRpb19yZWxlYXNlLAogfTsKIAogc3RhdGljIGNvbnN0IHN0cnVjdCBmaWxlX29wZXJhdGlvbnMgaG9zdG1peGVyX2ZvcHMgPSB7Ci0gICAgICAgIC5vd25lciAgICAgICAgICA9IFRISVNfTU9EVUxFLAotICAgICAgICAubGxzZWVrICAgICAgICAgPSBub19sbHNlZWssCi0gICAgICAgIC5pb2N0bCAgICAgICAgICA9IGhvc3RtaXhlcl9pb2N0bF9taXhkZXYsCi0gICAgICAgIC5vcGVuICAgICAgICAgICA9IGhvc3RtaXhlcl9vcGVuX21peGRldiwKLSAgICAgICAgLnJlbGVhc2UgICAgICAgID0gaG9zdG1peGVyX3JlbGVhc2UsCisJLm93bmVyICAgICAgICAgID0gVEh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tLSA+IDApIHsKIAkJcGFnZSA9IHBmbl90b19wYWdlKHBmbik7Ci0gICAgICAgICAgICAgICAgdG90YWwrKzsKLSAgICAgICAgICAgICAgICBpZihQYWdlSGlnaE1lbShwYWdlKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIGhpZ2htZW0rKzsKLSAgICAgICAgICAgICAgICBpZihQYWdlUmVzZXJ2ZWQocGFnZSkpCi0gICAgICAgICAgICAgICAgICAgICAgICByZXNlcnZlZCsrOwotICAgICAgICAgICAgICAgIGVsc2UgaWYoUGFnZVN3YXBDYWNoZShwYWdlKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIGNhY2hlZCsrOwotICAgICAgICAgICAgICAgIGVsc2UgaWYocGFnZV9jb3VudChwYWdlKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIHNoYXJlZCArPSBwYWdlX2NvdW50KHBhZ2UpIC0gMTsKLSAgICAgICAgfQotICAgICAgICBwcmludGsoIiVkIHBhZ2VzIG9mIFJBTVxuIiwgdG90YWwpOwotICAgICAgICBwcmludGsoIiVkIHBhZ2VzIG9mIEhJR0hNRU1cbiIsIGhpZ2htZW0pOwotICAgICAgICBwcmludGsoIiVkIHJlc2VydmVkIHBhZ2VzXG4iLCByZXNlcnZlZCk7Ci0gICAgICAgIHByaW50aygiJWQgcGFnZXMgc2hhcmVkXG4iLCBzaGFyZWQpOwotICAgICAgICBwcmludGsoIiVkIHBhZ2VzIHN3YXAgY2FjaGVkXG4iLCBjYWNoZWQpOworCQl0b3RhbCsrOworCQlpZihQYWdlSGlnaE1lbShwYWdlKSkKKwkJCWhpZ2htZW0rKzsKKwkJaWYoUGFnZVJlc2VydmVkKHBhZ2UpKQorCQkJcmVzZXJ2ZWQrKzsKKwkJZWxzZSBpZihQYWdlU3dhcENhY2hlKHBhZ2UpKQorCQkJY2FjaGVkKys7CisJCWVsc2UgaWYocGFnZV9jb3VudChwYWdlKSkKKwkJCXNoYXJlZCArPSBwYWdlX2NvdW50KHBhZ2UpI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IDE7CisJfQorCWlmIChiaXRfbWFzayAmIFJUQ19QSUUpIHsKKwkJUElFX29uID0gMTsKKwkJUElFX2NvdW50ID0gMDsKKwl9CisJaWYgKGJpdF9tYXNrICYgUlRDX0FJRSkgeworCQlBSUVfb24gPSAxOworCX0KKworCWlmICh0aW1lcl9pbml0X3JlcWQpCisJCWhwZXRfcnRjX3RpbWVyX2luaXQoKTsKKworCXJldHVybiAxOworfQorCitpbnQgaHBldF9zZXRfYWxhcm1fdGltZSh1bnNpZ25lZCBjaGFyIGhycywgdW5zaWduZWQgY2hhciBtaW4sIHVuc2lnbmVkIGNoYXIgc2VjKQoreworCWlmICghaXNfaHBldF9lbmFibGVkKCkpCisJCXJldHVybiAwOworCisJYWxhcm1fdGltZS50bV9ob3VyID0gaHJzOworCWFsYXJtX3RpbWUudG1fbWluID0gbWluOworCWFsYXJtX3RpbWUudG1fc2VjID0gc2VjOworCisJcmV0dXJuIDE7Cit9CisKK2ludCBocGV0X3NldF9wZXJpb2RpY19mcmVxKHVuc2lnbmVkIGxvbmcgZnJlcSkKK3sKKwlpZiAoIWlzX2hwZXRfZW5hYmxlZCgpKQorCQlyZXR1cm4gMDsKKworCVBJRV9mcmVxID0gZnJlcTsKKwlQSUVfY291bnQgPSAwOworCisJcmV0dXJuIDE7Cit9CisKK2ludCBocGV0X3J0Y19kcm9wcGVkX2lycSh2b2lkKQoreworCWlmICghaXNfaHBldF9lbmFibGVkKCkpCisJCXJldHVybiAwOworCisJcmV0dXJuIDE7Cit9CisKK2lycXJldHVybl90IGhwZXRfcnRjX2ludGVycnVwdChpbnQgaXJxLCB2b2lkICpkZXZfaWQsIHN0cnVjdCBwdF9yZWdzICpyZWdzKQoreworCXN0cnVjdCBydGNfdGltZSBjdXJyX3RpbWU7CisJdW5zaWduZWQgbG9uZyBydGNfaW50X2ZsYWcgPSAwOworCWludCBjYWxsX3J0Y19pbnRlcnJ1cHQgPSAwOworCisJaHBldF9ydGNfdGltZXJfcmVpbml0KCk7CisK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0Zl9zZWNfbnVtOwkJLyogQVRBICsgMHg2YyBUQVNLRklMRSBTZWN0b3IgTnVtYmVyICovCisJdTggIHJlc2VydmVkMTdbM107CisJdTggIHRmX2N5bF9sb3c7CQkvKiBBVEEgKyAweDcwIFRBU0tGSUxFIEN5bGluZGVyIExvdyAqLworCXU4ICByZXNlcnZlZDE4WzNdOworCXU4ICB0Zl9jeWxfaGlnaDsJLyogQVRBICsgMHg3NCBUQVNLRklMRSBDeWxpbmRlciBIaWdoICovCisJdTggIHJlc2VydmVkMTlbM107CisJdTggIHRmX2Rldl9oZWFkOwkvKiBBVEEgKyAweDc4IFRBU0tGSUxFIERldmljZS9IZWFkICovCisJdTggIHJlc2VydmVkMjBbM107CisJdTggIHRmX2NvbW1hbmQ7CQkvKiBBVEEgKyAweDdjIFRBU0tGSUxFIENvbW1hbmQvU3RhdHVzICovCisJdTggIGRtYV9tb2RlOwkJLyogQVRBICsgMHg3ZCBBVEEgSG9zdCBETUEgTW9kZSBjb25maWd1cmF0aW9uICovCisJdTggIHJlc2VydmVkMjFbMl07Cit9OworCisKKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogQXV4IGZucyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKworCisvKiBNUEM1Mnh4IGxvdyBsZXZlbCBodyBjb250cm9sICovCisKK3N0YXRpYyBpbnQKK21wYzUyeHhfYXRhX2NvbXB1dGVfcGlvX3RpbWluZ3Moc3RydWN0IG1wYzUyeHhfYXRhX3ByaXYgKnByaXYsIGludCBkZXYsIGludCBwaW8pCit7CisJc3RydWN0IG1wYzUyeHhfYXRhX3RpbWluZ3MgKnRpbWluZyA9ICZw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Uik7CisKKwl1ZGVsYXkoMTApOworCisJb3V0X2JlMzIoJnJlZ3MtPmNvbmZpZywKKwkJCU1QQzUyeHhfQVRBX0hPU1RDT05GX0lFIHwKKwkJCU1QQzUyeHhfQVRBX0hPU1RDT05GX0lPUkRZKTsKKworCS8qIFNldCB0aGUgdGltZSBzbG90IHRvIDF1cyAqLworCXRzbG90ID0gQ0FMQ19DTEtDWUMocHJpdi0+aXBiX3BlcmlvZCwgMTAwMDAwMCk7CisJb3V0X2JlMzIoJnJlZ3MtPnNoYXJlX2NudCwgdHNsb3QgPDwgMTYgKTsKKworCS8qIEluaXQgdGltaW5ncyB0byBQSU8wICovCisJbWVtc2V0KHByaXYtPnRpbWluZ3MsIDB4MDAsIDIqc2l6ZW9mKHN0cnVjdCBtcGM1Mnh4X2F0YV90aW1pbmdzKSk7CisKKwltcGM1Mnh4X2F0YV9jb21wdXRlX3Bpb190aW1pbmdzKHByaXYsIDAsIDApOworCW1wYzUyeHhfYXRhX2NvbXB1dGVfcGlvX3RpbWluZ3MocHJpdiwgMSwgMCk7CisKKwltcGM1Mnh4X2F0YV9hcHBseV90aW1pbmdzKHByaXYsIDApOworCisJcmV0dXJuIDA7Cit9CisKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiBsaWJhdGEgZHJpdmVyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCitzdGF0aWMgdm9pZAorbXBjNTJ4eF9hdGFfc2V0X3Bpb21vZGUoc3RydWN0IGF0YV9wb3J0ICphcCwgc3RydWN0IGF0YV9kZXZpY2UgKmFkZXYpCit7CisJc3RydWN0IG1wYzUyeHhfYXRhX3ByaXYgKnByaXYgPSBhc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50Zl9jb21tYW5kOworCisJYWUtPnByaXZhdGVfZGF0YSA9IHByaXY7CisKKwlydiA9IGF0YV9kZXZpY2VfYWRkKGFlKTsKKworCXJldHVybiBydiA/IDAgOiAtRUlOVkFMOworfQorCitzdGF0aWMgc3RydWN0IG1wYzUyeHhfYXRhX3ByaXYgKgorbXBjNTJ4eF9hdGFfcmVtb3ZlX29uZShzdHJ1Y3QgZGV2aWNlICpkZXYpCit7CisJc3RydWN0IGF0YV9ob3N0ICpob3N0ID0gZGV2X2dldF9kcnZkYXRhKGRldik7CisJc3RydWN0IG1wYzUyeHhfYXRhX3ByaXYgKnByaXYgPSBob3N0LT5wcml2YXRlX2RhdGE7CisKKwlhdGFfaG9zdF9kZXRhY2goaG9zdCk7CisKKwlyZXR1cm4gcHJpdjsKK30KKworCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0gKi8KKy8qIE9GIFBsYXRmb3JtIGRyaXZlciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisKK3N0YXRpYyBpbnQgX19kZXZpbml0CittcGM1Mnh4X2F0YV9wcm9iZShzdHJ1Y3Qgb2ZfZGV2aWNlICpvcCwgY29uc3Qgc3RydWN0IG9mX2RldmljZV9pZCAqbWF0Y2gpCit7CisJdW5zaWduZWQgaW50IGlwYl9mcmVxOworCXN0cnVjdCByZXNvdXJjZSByZXNfbWVtOworCWludCBhdGFfaXJxID0gTk9fSVJROworCXN0cnVjdCBtcGM1Mnh4X2F0YSBfX2lvbWVtICphdGFfcmVnczsKKwlzdHJ1Y3QgbXBjNTJ4eF9hdGFfcHJpdiAqcHJpdjsKKwlpbnQgcnY7CisKKwkvKiBHZXQgaXBiIGZyZXF1ZW5j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ciBtcGM1Mnh4X2F0YV9vZl9wbGF0Zm9ybV9kcml2ZXIgPSB7CisJLm93bmVyCQk9IFRISVNfTU9EVUxFLAorCS5uYW1lCQk9IERSVl9OQU1FLAorCS5tYXRjaF90YWJsZQk9IG1wYzUyeHhfYXRhX29mX21hdGNoLAorCS5wcm9iZQkJPSBtcGM1Mnh4X2F0YV9wcm9iZSwKKwkucmVtb3ZlCQk9IG1wYzUyeHhfYXRhX3JlbW92ZSwKKyNpZmRlZiBDT05GSUdfUE0KKwkuc3VzcGVuZAk9IG1wYzUyeHhfYXRhX3N1c3BlbmQsCisJLnJlc3VtZQkJPSBtcGM1Mnh4X2F0YV9yZXN1bWUsCisjZW5kaWYKKwkuZHJpdmVyCQk9IHsKKwkJLm5hbWUJPSBEUlZfTkFNRSwKKwkJLm93bmVyCT0gVEhJU19NT0RVTEUsCisJfSwKK307CisKKworLyogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKiBNb2R1bGUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworCitzdGF0aWMgaW50IF9faW5pdAorbXBjNTJ4eF9hdGFfaW5pdCh2b2lkKQoreworCXByaW50ayhLRVJOX0lORk8gImF0YTogTVBDNTJ4eCBJREUvQVRBIGxpYmF0YSBkcml2ZXJcbiIpOworCXJldHVybiBvZl9yZWdpc3Rlcl9wbGF0Zm9ybV9kcml2ZXIoJm1wYzUyeHhfYXRhX29mX3BsYXRmb3JtX2RyaXZlcik7Cit9CisKK3N0YXRpYyB2b2lkIF9fZXhpdAorbXBjNTJ4eF9hdGFfZXhpdCh2b2lkKQoreworCW9mX3VucmVnaXN0ZXJfcGxhdGZvcm1fZHJpd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ZTsJLyogc2l6ZSBvZiBhcGVydHVyZSAgICAgICAgICAgICAqLworCWNvbXBhdF9zaXplX3QgcGdfdG90YWw7CS8qIG1heCBwYWdlcyAoc3dhcCArIHN5c3RlbSkgICAgKi8KKwljb21wYXRfc2l6ZV90IHBnX3N5c3RlbTsJLyogbWF4IHBhZ2VzIChzeXN0ZW0pICAgICAgICAgICAqLworCWNvbXBhdF9zaXplX3QgcGdfdXNlZDsJCS8qIGN1cnJlbnQgcGFnZXMgdXNlZCAgICAgICAgICAgKi8KK307CisKKy8qCisgKiBUaGUgInByb3QiIGRvd24gYmVsb3cgbmVlZHMgc3RpbGwgYSAic2xlZXAiIGZsYWcgc29tZWhvdyAuLi4KKyAqLworc3RydWN0IGFncF9zZWdtZW50MzIgeworCWNvbXBhdF9vZmZfdCBwZ19zdGFydDsJCS8qIHN0YXJ0aW5nIHBhZ2UgdG8gcG9wdWxhdGUgICAgKi8KKwljb21wYXRfc2l6ZV90IHBnX2NvdW50OwkvKiBudW1iZXIgb2YgcGFnZXMgICAgICAgICAgICAgICovCisJY29tcGF0X2ludF90IHByb3Q7CQkvKiBwcm90IGZsYWdzIGZvciBtbWFwICAgICAgICAgICovCit9OworCitzdHJ1Y3QgYWdwX3JlZ2lvbjMyIHsKKwljb21wYXRfcGlkX3QgcGlkOwkJLyogcGlkIG9mIHByb2Nlc3MgICAgICAgICAgICAgICAqLworCWNvbXBhdF9zaXplX3Qgc2VnX2NvdW50OwkvKiBudW1iZXIgb2Ygc2VnbWVudHMgICAgICAgICAgICovCisJc3RydWN0IGFncF9zZWdtZW50MzIgKnNlZ19saXN0OworfTsKKworc3RydWN0IGFncF9hbGxvY2F0ZTMyIHsKKwljb21wYXRfaW50X3Qga2V5OwkJLyogdGFnIG9mIGFsbG9jYXRpb24gICAgICAgICAgICAqLworCWNvbXBhdF9zaXplX3QgcGdfY291bnQ7CS8qIG51bWJlciBvZiBwYWdlcyAgICAgICAgICAgICAgKi8KKwl1MzIgdHlwZTsJCS8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nQpOwkJCQkgICAgICoKICAqCTI3LiBNb3hhUG9ydFJlc2V0QnJrQ250KGludCBwb3J0KTsJCQkJICAgICAqCi0gKgkyOC4gTW94YVBvcnRTZXRYb25Yb2ZmKGludCBwb3J0LCBpbnQgeG9uVmFsdWUsIGludCB4b2ZmVmFsdWUpOwkgICAgICoKLSAqCTI5LiBNb3hhUG9ydElzVHhIb2xkKGludCBwb3J0KTsgCQkJCSAgICAgKgogICoJMzAuIE1veGFQb3J0U2VuZEJyZWFrKGludCBwb3J0LCBpbnQgdGlja3MpOwkJCSAgICAgKgogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyoKQEAgLTE4NzgsMTUgKzE3ODUsNiBAQAogICogICAgICAgICAgICAgICAgICAgICAgMzg0MDAvNTc2MDAvMTE1MjAwIGJwcwogICoKICAqCi0gKiAgICAgIEZ1bmN0aW9uIDk6ICAgICBHZXQgdGhlIGN1cnJlbnQgYmF1ZCByYXRlIG9mIHRoaXMgcG9ydC4KLSAqICAgICAgU3ludGF4OgotICogICAgICBsb25nIE1veGFQb3J0R2V0Q3VyQmF1ZChpbnQgcG9ydCk7Ci0gKiAgICAgICAgICAgaW50IHBvcnQgICAgICAgICAgIDogcG9ydCBudW1iZXIgKDAgLSAxMjcpCi0gKgotICogICAgICAgICAgIHJldHVybjogICAgMCAgICAgICA6IHRoaXMgcG9ydCBpcyBpbnZhbGlkCi0gKiAgICAgICAgICAgICAgICAgICAgICA1MCAtIDExNTIwMCBicHMKLSAqCi0gKgogICogICAgICBGdW5jdGlvbiAxMDogICAgU2V0dGluZyBiYXVkIHJhdGUgb2YgdGhpcyBwb3J0LgogICogICAgICBTeW50YXg6CiAgKiAgICAgIGxvbmcgTW94YVBvcnRTZXRCYXVkKGludCBwb3J0LCBsb25nIGJhdWQpOwpAQCAtMTkwMCwxOCArMTc5OCw2IEBACiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJhdWQgcmF0ZSB3aWxsIGJlIHRoZSBtYXhpbXVuIGJhdWQgcmF0ZS4KICAqCiAgKgotICogICAgICBGdW5jdGlvbiAxMTogICAgU2V0dGluZyB0aGUgZGF0YS1iaXRzL3N0b3AtYml0cy9wYXJpdHkgb2YgdGhpcyBwb3J0Ci0gKiAgICAgIFN5bnRheDoKLSAqICAgICAgaW50ICBNb3hhUG9ydFNldE1vZGUoaW50IHBvcnQsIGludCBkYXRhYml0cywgaW50IHN0b3BiaXRzLCBpbnQgcGFyaXR5KTsKLSAqICAgICAgICAgICBpbnQgcG9ydCAgICAgICAgICAgOiBwb3J0IG51bWJlciAoMCAtIDEyNykKLSAqICAgICAgICAgICBpbnQgZGF0YWJpdHMgICAgICAgOiBkYXRhIGJpdHMgKDgvNy82LzUpCi0gKiAgICAgICAgICAgaW50IHN0b3BiaXRzICAgICAgIDogc3RvcCBiaXRzICgyLzEvMCwgMCBzaG93IDEuNSBzdG9wIGJpdHMpCi0gaW50IHBhcml0eSAgICAgOiBwYXJpdHkgKDA6Tm9uZSwxOk9kZCwyOkV2ZW4sMzpNYXJrLDQ6U3BhY2UpCi0gKgotICogICAgICAgICAgIHJldHVybjogICAgLTEgICAgICA6IGludmFsaWQgcGFyYW1ldGVyCi0gKiAgICAgICAgICAgICAgICAgICAgICAwICAgICAgIDogc2V0dGluZyBPLksuCi0gKgotICoKICAqICAgICAgRnVuY3Rpb24gMTI6ICAgIENvbmZpZ3VyZSB0aGUgcG9ydC4KICAqICAgICAgU3ludGF4OgogICogICAgICBpbnQgIE1veGFQb3J0U2V0VGVybWlvKGludCBwb3J0LCBzdHJ1Y3Qga3Rlcm1pb3MgKnRlcm1pbywgc3BlZWRfdCBiYXVkKTsKQEAgLTIwMTYsMjIgKzE5MDIsNiBAQAogICogICAgICAgICAgIHJldHVybjogICAgMCAtIGxlbmd0aCAgICAgIDogcmVhbCByZWFkIGRhdGEgbGVuZ3RoCiAgKgogICoKLSAqICAgICAgRnVuY3Rpb24gMjI6ICAgIEdldCB0aGUgVHggYnVmZmVyIHNpemUgb2YgdGhpcyBwb3J0Ci0gKiAgICAgIFN5bnRheDoKLSAqICAgICAgaW50ICBNb3hhUG9ydFR4QnVmU2l6ZShpbnQgcG9ydCk7Ci0gKiAgICAgICAgICAgaW50IHBvcnQgICAgICAgICAgIDogcG9ydCBudW1iZXIgKDAgLSAxMjcpCi0gKgotICogICAgICAgICAgIHJldHVybjogICAgLi4gICAgICA6IFR4IGJ1ZmZlciBzaXplCi0gKgotICoKLSAqICAgICAgRnVuY3Rpb24gMjM6ICAgIEdldCB0aGUgUnggYnVmZmVyIHNpemUgb2YgdGhpcyBwb3J0Ci0gKiAgICAgIFN5bnRheDoKLSAqICAgICAgaW50ICBNb3hhUG9ydFJ4QnVmU2l6ZShpbnQgcG9ydCk7Ci0gKiAgICAgICAgICAgaW50IHBvcnQgICAgICAgICAgIDogcG9ydCBudW1iZXIgKDAgLSAxMjcpCi0gKgotICogICAgICAgICAgIHJldHVybjogICAgLi4gICAgICA6IFJ4IGJ1ZmZlciBzaXplCi0gKgotICoKICAqICAgICAgRnVuY3Rpb24gMjQ6ICAgIEdldCB0aGUgVHggYnVmZmVyIGN1cnJlbnQgcXVldWVkIGRhdGEgYnl0ZXMKICAqICAgICAgU3ludGF4OgogICogICAgICBpbnQgIE1veGFQb3J0VHhRdWV1ZShpbnQgcG9ydCk7CkBAIC0yMDU2LDE0ICsxOTI2LDYgQEAKICAqICAgICAgICAgICByZXR1cm46ICAgIC4uICAgICAgOiBSeCBidWZmZXIgY3VycmVudCBxdWV1ZWQgZGF0YSBieXRlcwogICoKICAqCi0gKiAgICAgIEZ1bmN0aW9uIDI3OiAgICBHZXQgdGhlIFJ4IGJ1ZmZlciBjdXJyZW50IGZyZWUgc3BhY2UKLSAqICAgICAgU3ludGF4OgotICogICAgICBpbnQgIE1veGFQb3J0UnhGcmVlKGludCBwb3J0KTsKLSAqICAgICAgICAgICBpbnQgcG9ydCAgICAgICAgICAgOiBwb3J0IG51bWJlciAoMCAtIDEyNykKLSAqCi0gKiAgICAgICAgICAgcmV0dXJuOiAgICAuLiAgICAgIDogUnggYnVmZmVyIGN1cnJlbnQgZnJlZSBzcGFjZQotICoKLSAqCiAgKiAgICAgIEZ1bmN0aW9uIDI4OiAgICBEaXNhYmxlIHBvcnQgZGF0YSB0cmFuc21pc3Npb24uCiAgKiAgICAgIFN5bnRheDoKICAqICAgICAgdm9pZCBNb3hhUG9ydFR4RGlzYWJsZShpbnQgcG9ydCk7CkBAIC0yMDc2LDE0ICsxOTM4LDYgQEAKICAqICAgICAgICAgICBpbnQgcG9ydCAgICAgICAgICAgOiBwb3J0IG51bWJlciAoMCAtIDEyNykKICAqCiAgKgotICogICAgICBGdW5jdGlvbiAzMDogICAgR2V0IHRoZSByZWNlaXZlZCBCUkVBSyBzaWduYWwgY291bnQuCi0gKiAgICAgIFN5bnRheDoKLSAqICAgICAgaW50ICBNb3hhUG9ydEdldEJya0NudChpbnQgcG9ydCk7Ci0gKiAgICAgICAgICAgaW50IHBvcnQgICAgICAgICAgIDogcG9ydCBudW1iZXIgKDAgLSAxMjcpCi0gKgotICogICAgICAgICAgIHJldHVybjogICAgMCAtIC4uICA6IEJSRUFLIHNpZ25hbCBjb3VudAotICoKLSAqCiAgKiAgICAgIEZ1bmN0aW9uIDMxOiAgICBHZXQgdGhlIHJlY2VpdmVkIEJSRUFLIHNpZ25hbCBjb3VudCBhbmQgcmVzZXQgaXQuCiAgKiAgICAgIFN5bnRheDoKICAqICAgICAgaW50ICBNb3hhUG9ydFJlc2V0QnJrQ250KGludCBwb3J0KTsKQEAgLTIwOTIsMjUgKzE5NDYsNiBAQAogICogICAgICAgICAgIHJldHVybjogICAgMCAtIC4uICA6IEJSRUFLIHNpZ25hbCBjb3VudAogICoKICAqCi0gKiAgICAgIEZ1bmN0aW9uIDMyOiAgICBTZXQgdGhlIFMvVyBmbG93IGNvbnRyb2wgbmV3IFhPTi9YT0ZGIHZhbHVlLCBkZWZhdWx0Ci0gKiAgICAgICAgICAgICAgICAgICAgICBYT04gaXMgMHgxMSAmIFhPRkYgaXMgMHgxMy4KLSAqICAgICAgU3ludGF4OgotICogICAgICB2b2lkIE1veGFQb3J0U2V0WG9uWG9mZihpbnQgcG9ydCwgaW50IHhvblZhbHVlLCBpbnQgeG9mZlZhbHVlKTsKLSAqICAgICAgICAgICBpbnQgcG9ydCAgICAgICAgICAgOiBwb3J0IG51bWJlciAoMCAtIDEyNykKLSAqICAgICAgICAgICBpbnQgeG9uVmFsdWUgICAgICAgOiBuZXcgWE9OIHZhbHVlICgwIC0gMjU1KQotICogICAgICAgICAgIGludCB4b2ZmVmFsdWUgICAgICA6IG5ldyBYT0ZGIHZhbHVlICgwIC0gMjU1KQotICoKLSAqCi0gKiAgICAgIEZ1bmN0aW9uIDMzOiAgICBDaGVjayB0aGlzIHBvcnQncyB0cmFuc21pc3Npb24gaXMgaG9sZCBieSByZW1vdGUgc2l0ZQotICogICAgICAgICAgICAgICAgICAgICAgYmVjYXVzZSB0aGUgZmxvdyBjb250cm9sLgotICogICAgICBTeW50YXg6Ci0gKiAgICAgIGludCAgTW94YVBvcnRJc1R4SG9sZChpbnQgcG9ydCk7Ci0gKiAgICAgICAgICAgaW50IHBvcnQgICAgICAgICAgIDogcG9ydCBudW1iZXIgKDAgLSAxMjcpCi0gKgotICogICAgICAgICAgIHJldHVybjogICAgMCAgICAgICA6IG5vcm1hbAotICogICAgICAgICAgICAgICAgICAgICAgMSAgICAgICA6IGhvbGQgYnkgcmVtb3RlIHNpdGUKLSAqCi0gKgogICogICAgICBGdW5jdGlvbiAzNDogICAgU2VuZCBvdXQgYSBCUkVBSyBzaWduYWwuCiAgKiAgICAgIFN5bnRheDoKICAqICAgICAgdm9pZCBNb3hhUG9ydFNlbmRCcmVhayhpbnQgcG9ydCwgaW50IG1zMTAwKTsKQEAgLTIxMjUsNyArMTk2MCw3IEBACiAKIAlpZiAobW94YUNhcmQgPT0gM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AgICAgICAgIHNwcmludGYobGluZWJ1ZiszKmosIiUwMnggIixibG9ja1tpK2pdKTsKLSAgICAgIH0KLSAgICAgIGxpbmVidWZbMypqXT0nXDAnOwotICAgICAgVFJBQ0VfUFMoIiVzIixsaW5lYnVmKTsKLSAgIH0KKwl1bnNpZ25lZCBpbnQgaSwgajsKKwljaGFyIGxpbmVidWZbMTYgKiAzICsgMV07CisKKwlmb3IgKGkgPSAwOyBpIDwgbGVuZ3RoOyBpICs9IDE2KSB7CisJCWZvciAoaiA9IDA7IChqIDwgMTYpICYmIChqICsgaSA8IGxlbmd0aCk7IGorKykgeworCQkJc3ByaW50ZihsaW5lYnVmICsgMyAqIGosICIlMDJ4ICIsIGJsb2NrW2kgKyBqXSk7CisJCX0KKwkJbGluZWJ1ZlszICogal0gPSAnXDAnOworCQlUUkFDRV9QUygiJXMiLCBsaW5lYnVmKTsKKwl9CiB9CiAKLSAgICAgICAgIAotCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBEcml2ZXIgaW5pdGlhbGlzYXRpb24KICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBNb2R1bGUgc3VwcG9ydCByb3V0aW5lcwogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyB2b2lkIF9fZXhpdCByMzk2NF9leGl0KHZvaWQpCiB7Ci0gICBpbnQgc3RhdHVzOwotICAgCi0gICBUUkFDRV9NICgiY2xlYW51cF9tb2R1bGUoKSIpOworCWludCBzdGF0dXM7CiAKLSAgIHN0YXR1cz10dHlfdW5yZWdpc3Rlcl9sZGlzYyhOX1IzOTY0KTsKLSAgIAotIC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9maXJzdDsKLQotICAgaWYocEhlYWRlcj09TlVMTCkKLSAgICAgIHJldHVybjsKLQotI2lmZGVmIERFQlVHX1FVRVVFCi0gICBwcmludGsoInIzOTY0OiByZW1vdmVfZnJvbV90eF9xdWV1ZTogJXAsIGxlbmd0aCAldSAtICIsCi0gICAgICAgICAgcEhlYWRlciwgcEhlYWRlci0+bGVuZ3RoICk7Ci0gICBmb3IocER1bXA9cEhlYWRlcjtwRHVtcDtwRHVtcD1wRHVtcC0+bmV4dCkKLQkgcHJpbnRrKCIlcCAiLCBwRHVtcCk7Ci0gICBwcmludGsoIlxuIik7CisJc3RydWN0IHIzOTY0X2Jsb2NrX2hlYWRlciAqcER1bXA7CiAjZW5kaWYKIAorCXBIZWFkZXIgPSBwSW5mby0+dHhfZmlyc3Q7CiAKLSAgIGlmKHBIZWFkZXItPm93bmVyKQotICAgewotICAgICAgaWYoZXJyb3JfY29kZSkKLSAgICAgIHsKLSAgICAgICAgICBhZGRfbXNnKHBIZWFkZXItPm93bmVyLCBSMzk2NF9NU0dfQUNLLCAwLCAKLSAgICAgICAgICAgICAgICAgIGVycm9yX2NvZGUsIE5VTEwpOwotICAgICAgfQotICAgICAgZWxzZQotICAgICAgewotICAgICAgICAgIGFkZF9tc2cocEhlYWRlci0+b3duZXIsIFIzOTY0X01TR19BQ0ssIHBIZWFkZXItPmxlbmd0aCwgCi0gICAgICAgICAgICAgICAgICBlcnJvcl9jb2RlLCBOVUxMKTsKLSAgICAgIH0KLSAgICAgIHdha2VfdXBfaW50ZXJydXB0aWJsZSAoJnBJbmZvLT5yZWFkX3dhaXQpOwotICAgfQorCWlmIChwSGVhZGVyID09IE5VTEwpCisJCXJldHVybjsKIAotICAgc3Bpbl9sb2NrX2lycXNhdmUoJnBJbmZvLT5sb2NrLCBmbGFncyk7CisjaWZkZWYgREVCVUdfUVVFVUUKKwlwcmludGsoInIzOTY0OiByZW1vdmVfZnJvbV90eF9xdWV1ZTogJXAsIGxlbmd0aCAldSAtICIsC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ICAgICAgfQotICAgICAgICAgZWxzZSBpZihjPT1TVFgpCi0gICAgICAgICB7Ci0gICAgICAgICAgICBpZihwSW5mby0+blJldHJ5PT0wKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgVFJBQ0VfUEUoIlRYX1JFUVVFU1QgLSBpbml0IGNvbmZsaWN0Iik7Ci0gICAgICAgICAgICAgICBpZihwSW5mby0+cHJpb3JpdHkgPT0gUjM5NjRfU0xBVkUpCi0gICAgICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICAgICBnb3RvIHN0YXJ0X3JlY2VpdmluZzsKLSAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgIH0gCi0gICAgICAgICAgICBlbHNlIAotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgVFJBQ0VfUEUoIlRYX1JFUVVFU1QgLSBzZWNvbmRhcnkgaW5pdCBjb25mbGljdCE/IgotICAgICAgICAgICAgICAgICAgICAgICAgIiBTd2l0Y2hpbmcgdG8gU0xBVkUgbW9kZSBmb3IgbmV4dCByeC4iKTsKLSAgICAgICAgICAgICAgIGdvdG8gc3RhcnRfcmVjZWl2aW5nOwotICAgICAgICAgICAgfQotICAgICAgICAgfQotICAgICAgICAgZWxzZQotICAgICAgICAgewotICAgICAgICAgICAgVFJBQ0VfUEUoIlRYX1JFUVVFU1QgLSBjaGFyICE9IERMRTogJXgiLCBjKTsKLSAgICAgICAgICAgIHJldHJ5X3RyYW5zbWl0KHBJbmZvKTsKLSAgICAgICAgIH0KLSAgICAgICAgIGJyZWFrOwotICAgICAgY2FzZSBSMzk2NF9UUkFOU01JVFRJTkc6Ci0gICAgICAgICBpZihjPT1OQUspCi0gICAgICAgICB7Ci0gICAgICAgICAgICBUUkFDRV9QRSgiVFJBTlNNSVRUSU5HIC0gZ290IE5BSyIpOwotICAgICAgICAgICAgcmV0cnlfdHJhbnNtaXQocEluZm8pOwotICAgICAgICAgfQotICAgICAgICAgZWxzZQotICAgICAgICAgewotICAgICAgICAgICAgVFJBQ0VfUEUoIlRSQU5TTUlUVElORyAtIGdvdCBpbnZhbGlkIGNoYXIiKTsKLSAKLSAgICAgICAgICAgIHBJbmZvLT5zdGF0ZSA9IFIzOTY0X1dBSVRfWlZaX0JFRk9SRV9UWF9SRVRSWTsKLQkgICAgbW9kX3RpbWVyKCZwSW5mby0+dG1yLCBqaWZmaWVzICsgUjM5NjRfVE9fWlZaKTsKLSAgICAgICAgIH0KLSAgICAgICAgIGJyZWFrOwotICAgICAgY2FzZSBSMzk2NF9XQUlUX0ZPUl9UWF9BQ0s6Ci0gICAgICAgICBpZihjPT1ETEUpCi0gICAgICAgICB7Ci0gICAgICAgICAgICBUUkFDRV9QUygiV0FJVF9GT1JfVFhfQUNLIC0gZ290IERMRSIpOwotICAgICAgICAgICAgcmVtb3ZlX2Zyb21fdHhfcXVldWUocEluZm8sIFIzOTY0X09LKTsKLSAgICAgICAgICAgIAotICAgICAgICAgICAgcEluZm8tPnN0YXRlID0gUjM5NjRfSURMRTsKLSAgICAgICAgICAgIHRyaWdnZXJfdHJhbnNtaXQocEluZm8pOwotICAgICAgICAgfQotICAgICAgICAgZWxzZQotICAgICAgICAgewotICAgICAgICAgICAgcmV0cnlfdHJhbnNtaXQocEluZm8pOwotICAgICAgICAgfQotICAgICAgICAgYnJlYWs7Ci0gICAgICBjYXNlIFIzOTY0X1dBSVRfRk9SX1JYX1JFUEVBVDoKLSAgICAgICAgIC8qIEZBTExUUk9VR0ggKi8KLSAgICAgIGNhc2UgUjM5NjRfSURMRToKLSAgICAgICAgIGlmKGM9PVNUWCkKLSAgICAgICAgIHsKLSAgICAgICAgICAgIC8qIFByZXZlbnQgcnhfcXVldWUgZnJvbSBvdmVyZmxvdzogKi8KLSAgICAgICAgICAgIGlmKHBJbmZvLT5ibG9ja3NfaW5fcnhfcXVldWUgPj0gUjM5NjRfTUFYX0JMT0NLU19JTl9SWF9RVUVVRSkKLSAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgIFRSQUNFX1BFKCJJR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JVRik7CisJCQkJYnJlYWs7CisJCQl9CiBzdGFydF9yZWNlaXZpbmc6Ci0gICAgICAgICAgICAvKiBPaywgc3RhcnQgcmVjZWl2aW5nOiAqLwotICAgICAgICAgICAgVFJBQ0VfUFMoIklETEUgLSBnb3QgU1RYIik7Ci0gICAgICAgICAgICBwSW5mby0+cnhfcG9zaXRpb24gPSAwOwotICAgICAgICAgICAgcEluZm8tPmxhc3RfcnggPSAwOwotICAgICAgICAgICAgcEluZm8tPmZsYWdzICY9IH5SMzk2NF9FUlJPUjsKLSAgICAgICAgICAgIHBJbmZvLT5zdGF0ZT1SMzk2NF9SRUNFSVZJTkc7Ci0JICAgIG1vZF90aW1lcigmcEluZm8tPnRtciwgamlmZmllcyArIFIzOTY0X1RPX1pWWik7Ci0JICAgIHBJbmZvLT5uUmV0cnkgPSAwOwotICAgICAgICAgICAgcHV0X2NoYXIocEluZm8sIERMRSk7Ci0gICAgICAgICAgICBmbHVzaChwSW5mbyk7Ci0gICAgICAgICAgICBwSW5mby0+YmNjID0gMDsKLSAgICAgICAgIH0KLSAgICAgICAgIGJyZWFrOwotICAgICAgY2FzZSBSMzk2NF9SRUNFSVZJTkc6Ci0gICAgICAgICBpZihwSW5mby0+cnhfcG9zaXRpb24gPCBSWF9CVUZfU0laRSkKLSAgICAgICAgIHsKLSAgICAgICAgICAgIHBJbmZvLT5iY2MgXj0gYzsKLSAgICAgICAgICAgIAotICAgICAgICAgICAgaWYoYz09RExFKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgaWYocEluZm8tPmxhc3Rfcng9PURMRSkKLSAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgIHBJbmZvLT5sYXN0X3J4ID0gMDsKLSAgICAgICAgICAgICAgICAgIGdvdG8gY2hhcl90b19idWY7Ci0gICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICBwSW5mby0+bGFzdF9yeCA9IERMRTsKLSAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICAgICAgfSAKLSAgICAgICAgICAgIGVsc2UgaWYoKGM9PUVUWCkgJiYgKHBJbmZvLT5sYXN0X3J4PT1ETEUpKQotICAgICAgICAgICAgewotICAgICAgICAgICAgICAgaWYocEluZm8tPmZsYWdzICYgUjM5NjRfQkNDKQotICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgcEluZm8tPnN0YXRlID0gUjM5NjRfV0FJVF9GT1JfQkNDOwotCQkgIG1vZF90aW1lcigmcEluZm8tPnRtciwgamlmZmllcyArIFIzOTY0X1RPX1pWWik7Ci0gICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICBlbHNlIAotICAgICAgICAgICAgICAgewotICAgICAgICAgICAgICAgICAgb25fcmVjZWl2ZV9ibG9jayhwSW5mbyk7Ci0gICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICB9Ci0gICAgICAgICAgICBlbHNlCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICBwSW5mby0+bGFzdF9yeCA9IGM7CisJCQkvKiBPaywgc3RhcnQgcmVjZWl2aW5nOiAqLworCQkJVFJBQ0VfUFMoIklETEUgLSBnb3QgU1RYIik7CisJCQlwSW5mby0+cnhfcG9zaXRpb24gPSAwOworCQkJcEluZm8tPmxhc3RfcnggPSAwOworCQkJcEluZm8tPmZsYWdzICY9IH5SMzk2NF9FUlJPUjsKKwkJCXBJbmZvLT5zdGF0ZSA9IFIzOTY0X1JFQ0VJVklORzsKKwkJCW1vZF90aW1lcigmcEluZm8tPnRtciwgamlmZmllcyArIFIzOTY0X1RPX1pWWik7CisJCQlwSW5mby0+blJldHJ5ID0gMDsKKwkJCXB1dF9jaGFyKHBJbmZvLCBETEUpOworCQkJZmx1c2gocEluZm8pOworCQkJcEluZm8tPmJjYyA9IDA7CisJCX0KKwkJYnJlYWs7CisJY2FzZSBSMzk2NF9SRUNFSVZJTkc6CisJCWlmIChwSW5mby0+cnhfcG9zaXRpb24gPCBSWF9CVUZfU0laRSkgeworCQkJcEluZm8tP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CIsIHBpZF9ucihwaWQpKTsKLSAgICAgICAgICAgICpwcENsaWVudCA9IHBDbGllbnQtPm5leHQ7Ci0gICAgICAgICAgICB3aGlsZShwQ2xpZW50LT5tc2dfY291bnQpCi0gICAgICAgICAgICB7Ci0gICAgICAgICAgICAgICBwTXNnPXJlbW92ZV9tc2cocEluZm8sIHBDbGllbnQpOwotICAgICAgICAgICAgICAgaWYocE1zZykKLSAgICAgICAgICAgICAgIHsKLSAgICAgICAgICAgICAgICAgIGtmcmVlKHBNc2cpOwotICAgICAgICAgICAgICAgICAgVFJBQ0VfTSgiZW5hYmxlX3NpZ25hbHMgLSBtc2cga2ZyZWUgJXAiLHBNc2cpOwotICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgfQotCSAgICBwdXRfcGlkKHBDbGllbnQtPnBpZCk7Ci0gICAgICAgICAgICBrZnJlZShwQ2xpZW50KTsKLSAgICAgICAgICAgIFRSQUNFX00oImVuYWJsZV9zaWduYWxzIC0ga2ZyZWUgJXAiLHBDbGllbnQpOwotICAgICAgICAgICAgcmV0dXJuIDA7Ci0gICAgICAgICB9Ci0gICAgICB9Ci0gICAgICByZXR1cm4gLUVJTlZBTDsKLSAgIH0KLSAgIGVsc2UKLSAgIHsKLSAgICAgIHBDbGllbnQ9ZmluZENsaWVudChwSW5mbywgcGlkKTsKLSAgICAgIGlmKHBDbGllbnQpCi0gICAgICB7Ci0gICAgICAgICAvKiB1cGRhdGUgc2lnbmFsIG9wdGlvbnMgKi8KLSAgICAgICAgIHBDbGllbnQtPnNpZ19mbGFncz1hcmc7Ci0gICAgICB9IAotICAgICAgZWxzZSAKLSAgICAgIHsKLSAgICAgICAgIC8qIGFkZCBjbGllbnQgdG8gY2xpZW50IGxpc3QgKi8KLSAgICAgICAgIHBDbGllbnQ9a21hbGxvYyhzaXplb2Yoc3RydWN0IHIzOTY0X2NsaWVudF9pbmZvKSwgR0ZQX0tFUk5FTCk7Ci0gICAgICAgICBUUkFDRV9NKCJlbmFibGVfc2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iAKLQogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIExpbmUgZGlzY2lwbGluZSByb3V0aW5lcwogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyBpbnQgcjM5NjRfb3BlbihzdHJ1Y3QgdHR5X3N0cnVjdCAqdHR5KQogewotICAgc3RydWN0IHIzOTY0X2luZm8gKnBJbmZvOwotICAgCi0gICBUUkFDRV9MKCJvcGVuIik7Ci0gICBUUkFDRV9MKCJ0dHk9JXAsIFBJRD0lZCwgZGlzY19kYXRhPSVwIiwgCi0gICAgICAgICAgdHR5LCBjdXJyZW50LT5waWQsIHR0eS0+ZGlzY19kYXRhKTsKLSAgIAotICAgcEluZm89a21hbGxvYyhzaXplb2Yoc3RydWN0IHIzOTY0X2luZm8pLCBHRlBfS0VSTkVMKTsgCi0gICBUUkFDRV9NKCJyMzk2NF9vcGVuIC0gaW5mbyBrbWFsbG9jICVwIixwSW5mbyk7CisJc3RydWN0IHIzOTY0X2luZm8gKnBJbmZvOwogCi0gICBpZighcEluZm8pCi0gICB7Ci0gICAgICBwcmludGsoS0VSTl9FUlIgInIzOTY0OiBmYWlsZWQgdG8gYWxsb2MgaW5mbyBzdHJ1Y3R1cmVcbiIpOwotICAgICAgcmV0dXJuIC1FTk9NRU07Ci0gICB9CisJVFJBQ0VfTCgib3BlbiIpOworCVRSQUNFX0woInR0eT0lcCwgUElEPSVkLCBkaXNjX2RhdGE9JXAiLAorCQl0dHksIGN1cnJlbnQtPnBpZCwgdHR5LT5kaXNjX2RhdGEpOwogCi0gICBwSW5mby0+cnhfYnVmID0ga21hbGxvYyhSWF9CVUZfU0laRSwgR0ZQX0tFUk5FTCk7Ci0gICBUUkFDRV9NKCJyMzk2NF9vcGVuIC0gcnhfYnVmIGttYWxsb2MgJXAiLHBJbmZvLT5yeF9idWYpOworCXBJ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4Niw2IEBACiAjaW5jbHVkZSA8bGludXgvbW9kdWxlLmg+CiAKICNpbmNsdWRlIDxsaW51eC90eXBlcy5oPgotI2luY2x1ZGUgPGxpbnV4L3NjaGVkLmg+CiAjaW5jbHVkZSA8bGludXgvaW50ZXJydXB0Lmg+CiAjaW5jbHVkZSA8bGludXgva2VybmVsLmg+CiAjaW5jbHVkZSA8bGludXgvZXJybm8uaD4KZGlmZiAtLWdpdCBhL2RyaXZlcnMvY2hhci9zZXJpYWwxNjcuYyBiL2RyaXZlcnMvY2hhci9zZXJpYWwxNjcuYwppbmRleCBhZjUwZDMyLi41ZmQzMTRhIDEwMDY0NAotLS0gYS9kcml2ZXJzL2NoYXIvc2VyaWFsMTY3LmMKKysrIGIvZHJpdmVycy9jaGFyL3NlcmlhbDE2Ny5jCkBAIC0xMTEsMTIgKzExMSwxMyBAQAogCiAvKiBUaGlzIGlzIHRoZSBwZXItcG9ydCBkYXRhIHN0cnVjdHVyZSAqLwogc3RydWN0IGN5Y2xhZGVzX3BvcnQgY3lfcG9ydFtdID0gewotICAgICAgLyogQ0FSRCMgICovCi0gICAgICAgIHstMSB9LCAgICAgIC8qIHR0eVMwICovCi0gICAgICAgIHstMSB9LCAgICAgIC8qIHR0eVMxICovCi0gICAgICAgIHstMSB9LCAgICAgIC8qIHR0eVMyICovCi0gICAgICAgIHstMSB9LCAgICAgIC8qIHR0eVMzICovCisJLyogQ0FSRCMgICovCisJey0xfSwJCQkvKiB0dHlTMCAqLworCXstMX0sCQkJLyogdHR5UzEgKi8KKwl7LTF9LAkJCS8qIHR0eVMyICovCisJey0xfSwJCQkvKiB0dHlTMyAqLwogfTsKKwogI2RlZmluZSBOUl9QT1JUUyAgICAgICAgQVJSQVlfU0laRShjeV9wb3J0KQogCiAvKgpAQCAtMTI4LDQyICsxMjksNDYgQEAKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBISSAgICAgICAgICAgIFZISQogICovCiBzdGF0a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KLSAgICAgICAgY2FzZSBDWUdFVFRJTUVPVVQ6Ci0JICAgIHJldF92YWwgPSBnZXRfdGltZW91dChpbmZvLCBhcmdwKTsKLSAJICAgIGJyZWFrOwotICAgICAgICBjYXNlIENZU0VUVElNRU9VVDoKLSAgICAgICAgICAgIHJldF92YWwgPSBzZXRfdGltZW91dChpbmZvLCBhcmdwKTsKLQkgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgQ1lHRVRERUZUSU1FT1VUOgotCSAgICByZXRfdmFsID0gZ2V0X2RlZmF1bHRfdGltZW91dChpbmZvLCBhcmdwKTsKLSAJICAgIGJyZWFrOwotICAgICAgICBjYXNlIENZU0VUREVGVElNRU9VVDoKLSAgICAgICAgICAgIHJldF92YWwgPSBzZXRfZGVmYXVsdF90aW1lb3V0KGluZm8sICh1bnNpZ25lZCBsb25nKWFyZyk7Ci0JICAgIGJyZWFrOwotICAgICAgICBjYXNlIFRDU0JSSzogICAgLyogU1ZJRCB2ZXJzaW9uOiBub24temVybyBhcmcgLS0+IG5vIGJyZWFrICovCi0JICAgIHJldF92YWwgPSB0dHlfY2hlY2tfY2hhbmdlKHR0eSk7Ci0JICAgIGlmIChyZXRfdmFsKQotCQkgICAgYnJlYWs7Ci0gICAgICAgICAgICB0dHlfd2FpdF91bnRpbF9zZW50KHR0eSwwKTsKLSAgICAgICAgICAgIGlmICghYXJnKQotICAgICAgICAgICAgICAgIHNlbmRfYnJlYWsoaW5mbywgSFovNCk7IC8qIDEvNCBzZWNvbmQgKi8KLSAgICAgICAgICAgIGJyZWFrOwotICAgICAgICBjYXNlIFRDU0JSS1A6ICAgLyogc3VwcG9ydCBmb3IgUE9TSVggdGNzZW5kYnJlYWsoKSAqLwotCSAgICByZXRfdmFsID0gdHR5X2NoZWNrX2NoYW5nZSh0dHkpOwotCSAgICBpZiAocmV0X3ZhbCkKKwlzd2l0Y2ggKGNtZCkgeworCWNhc2UgQ1lHRVRNT046CisJCXJldF92YWwgPSBnZXRfbW9uX2luZm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k7CisJcHJpbnRrKCIgIGNvcjEsY29yMixjb3IzLGNvcjQsY29yNSxjb3I2LGNvcjcgPSAleCAleCAleCAleCAleCAleCAleFxuIiwKKwkgICAgICAgaW5mby0+Y29yMSwgaW5mby0+Y29yMiwgaW5mby0+Y29yMywgaW5mby0+Y29yNCwgaW5mby0+Y29yNSwKKwkgICAgICAgaW5mby0+Y29yNiwgaW5mby0+Y29yNyk7CisJcHJpbnRrKCIgIHRicHIsdGNvLHJicHIscmNvID0gJWQgJWQgJWQgJWRcbiIsIGluZm8tPnRicHIsIGluZm8tPnRjbywKKwkgICAgICAgaW5mby0+cmJwciwgaW5mby0+cmNvKTsKKwlwcmludGsoIiAgY2xvc2VfZGVsYXkgZXZlbnQgY291bnQgPSAlZCAlZCAlZFxuIiwgaW5mby0+Y2xvc2VfZGVsYXksCisJICAgICAgIGluZm8tPmV2ZW50LCBpbmZvLT5jb3VudCk7CisJcHJpbnRrKCIgIHhfY2hhciBibG9ja2VkX29wZW4gPSAleCAleFxuIiwgaW5mby0+eF9jaGFyLAorCSAgICAgICBpbmZvLT5ibG9ja2VkX29wZW4pOworCXByaW50aygiICBvcGVuX3dhaXQgPSAlbHggJWx4ICVseFxuIiwgKGxvbmcpaW5mby0+b3Blbl93YWl0KTsKIAotICAgIHByaW50aygiIGN5X3BvcnRcbiIpOwotICAgIHByaW50aygiICBjYXJkIGxpbmUgZmxhZ3MgPSAlZCAlZCAleFxuIiwKLSAgICAgICAgICAgICAgICAgaW5mby0+Y2FyZCwgaW5mby0+bGluZSwgaW5mby0+ZmxhZ3MpOwotICAgIHByaW50aygiICAqdHR5IHJlYWRfc3RhdHVzX21hc2sgdGltZW91dCB4bWl0X2ZpZm9fc2l6ZSA9ICVseCAleCAleCAleFxuIiwKLSAgICAgICAgICAgICAgICAgKGxvbmcpaW5mby0+dHR5LCBpbmZvLT5yZWFkX3N0YXR1c19tYXNrLAotICAgICAgICAgICAgICAgICBpbmZvLT50aW1lb3V0LCBpbmZvLT54bW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F9FUlJfRUNDICAgICAgICAgICAgICAgICAgICAgICAgIDB4OQkgLyogRUNDIGVycm9yIGRldGVjdGVkICovCisjZGVmaW5lIFRQVF9FUlJfRUNDX1BTVEFHICAgICAgICAgICAgICAgICAgIDB4QQkgLyogRUNDIGVycm9yIGRldGVjdGVkIHdoZW4gICovCisJCQkJCQkgLyogcmVhZGluZyBQU1RBRyBmb3IgYSBNVyAgKi8KKwkJCQkJCSAvKiBJbnZhbGlkYXRlICovCisjZGVmaW5lIFRQVF9FUlJfUEJMX0FERFJfQk9VTkQgICAgICAgICAgICAgIDB4QgkgLyogcGJsIGFkZHIgb3V0IG9mIGJvdW5kczogICovCisJCQkJCQkgLyogc29mdHdhcmUgZXJyb3IgKi8KKyNkZWZpbmUgVFBUX0VSUl9TV0ZMVVNICQkJICAgIDB4QwkgLyogU1cgRkxVU0hFRCAqLworI2RlZmluZSBUUFRfRVJSX0NSQyAgICAgICAgICAgICAgICAgICAgICAgICAweDEwIC8qIENSQyBlcnJvciAqLworI2RlZmluZSBUUFRfRVJSX01BUktFUiAgICAgICAgICAgICAgICAgICAgICAweDExIC8qIE1hcmtlciBlcnJvciAqLworI2RlZmluZSBUUFRfRVJSX1BEVV9MRU5fRVJSICAgICAgICAgICAgICAgICAweDEyIC8qIGludmFsaWQgUERVIGxlbmd0aCAqLworI2RlZmluZSBUUFRfRVJSX09VVF9PRl9SUUUgICAgICAgICAgICAgICAgICAweDEzIC8qIG91dCBvZiBSUUUgKi8KKyNkZWZpbmUgVFBUX0VSUl9ERFBfVkVSU0lPTiAgICAgICAgICAgICAgICAgMHgxNCAvKiB3cm9uZyBERFAgdmVyc2lvbiAqLworI2RlZmluZSBUUFRfRVJSX1JETUFfVkVSU0lPTiAgICAgICAgICAgICAgICAweDE1IC8qIHdyb25nIFJETUEgdmVyc2lvbiAqLworI2RlZmluZSBUUFRfRVJSX09QQ09ERSAgICAgICAgICAgICAgICAgICAgICAweDE2IC8qIGludmFsaWQgcmRtYSBvcGNvZG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wltaHAtPmF0dHIubGVuID0gKHUzMikgdG90YWxfc2l6ZTsKKwltaHAtPmF0dHIucGJsX3NpemUgPSBucGFnZXM7CisJcmV0ID0gaXdjaF9yZWdpc3Rlcl9tZW0ocmhwLCBwaHAsIG1ocCwgc2hpZnQsIHBhZ2VfbGlzdCk7CisJa2ZyZWUocGFnZV9saXN0KTsKKwlpZiAocmV0KSB7CisJCWdvdG8gZXJyOworCX0KKwlyZXR1cm4gJm1ocC0+aWJtcjsKK2VycjoKKwlrZnJlZShtaHApOworCXJldHVybiBFUlJfUFRSKHJldCk7CisKK30KKworc3RhdGljIGludCBpd2NoX3JlcmVnaXN0ZXJfcGh5c19tZW0oc3RydWN0IGliX21yICptciwKKwkJCQkgICAgIGludCBtcl9yZXJlZ19tYXNrLAorCQkJCSAgICAgc3RydWN0IGliX3BkICpwZCwKKwkgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBpYl9waHlzX2J1ZiAqYnVmZmVyX2xpc3QsCisJICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgbnVtX3BoeXNfYnVmLAorCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGFjYywgdTY0ICogaW92YV9zdGFydCkKK3sKKworCXN0cnVjdCBpd2NoX21yIG1oLCAqbWhwOworCXN0cnVjdCBpd2NoX3BkICpwaHA7CisJc3RydWN0IGl3Y2hfZGV2ICpyaHA7CisJaW50IG5ld19hY2M7CisJX19iZTY0ICpwYWdlX2xpc3QgPSBOVUxMOworCWludCBzaGlmdCA9IDA7CisJdTY0IHRvdGFsX3NpemU7CisJaW50IG5wYWdlczsKKwlpbnQgcmV0OworCisJUERCRygiJXMgaWJfbXIgJXAgaWJfcGQgJXBcbiIsIF9fRlVOQ1RJT05fXywgbXIsIHBkKTsKKworCS8qIFRoZXJlIGNhbiBiZSBubyBtZW1vcnkgd2luZG93cyAqLworCWlmIChhdG9taWNfcmVhZCgmbXItPnVzZWNudCkpCisJCXJldHVybiAtRUl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53cHRyLCBxaHAtPndxLnNpemVfbG9nMiksCisJCQkgICAgICAgMCwgc2l6ZW9mKHN0cnVjdCB0M19yZWNlaXZlX3dyKSA+PiAzKTsKKwkJUERCRygiJXMgY29va2llIDB4JWxseCBpZHggMHgleCBycV93cHRyIDB4JXggcndfcnB0ciAweCV4ICIKKwkJICAgICAid3FlICVwIFxuIiwgX19GVU5DVElPTl9fLCAodW5zaWduZWQgbG9uZyBsb25nKSB3ci0+d3JfaWQsCisJCSAgICAgaWR4LCBxaHAtPndxLnJxX3dwdHIsIHFocC0+d3EucnFfcnB0ciwgd3FlKTsKKwkJKysocWhwLT53cS5ycV93cHRyKTsKKwkJKysocWhwLT53cS53cHRyKTsKKwkJd3IgPSB3ci0+bmV4dDsKKwkJbnVtX3dycy0tOworCX0KKwlzcGluX3VubG9ja19pcnFyZXN0b3JlKCZxaHAtPmxvY2ssIGZsYWcpOworCXJpbmdfZG9vcmJlbGwocWhwLT53cS5kb29yYmVsbCwgcWhwLT53cS5xcGlkKTsKKwlyZXR1cm4gZXJyOworfQorCitpbnQgaXdjaF9iaW5kX213KHN0cnVjdCBpYl9xcCAqcXAsCisJCQkgICAgIHN0cnVjdCBpYl9tdyAqbXcsCisJCQkgICAgIHN0cnVjdCBpYl9td19iaW5kICptd19iaW5kKQoreworCXN0cnVjdCBpd2NoX2RldiAqcmhwOworCXN0cnVjdCBpd2NoX213ICptaHA7CisJc3RydWN0IGl3Y2hfcXAgKnFocDsKKwl1bmlvbiB0M193ciAqd3FlOworCXUzMiBwYmxfYWRkcjsKKwl1OCBwYWdlX3NpemU7CisJdTMyIG51bV93cnM7CisJdW5zaWduZWQgbG9uZyBmbGFnOworCXN0cnVjdCBpYl9zZ2Ugc2dsOworCWludCBlcnI9MDsKKwllbnVtIHQzX3dyX2ZsYWdzIHQzX3dyX2ZsYWdzOworCXUzMiBpZHg7CisJc3RydWN0IHQzX3N3c3EgKnNxcDsKKworCXFocCA9IHRvX2l3Y2hfcXAocXApOworCW1oc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ICAgIG1vcmUgPSB0cnVlOwogICAgICAgfQogICAgICAgZWxzZSB7CiAgICAgICAgIHhkaV94bG9nX3JlcXVlc3QgKFhESV9BX05SKGEpLCB0aGlzLT5JZCwgdGhpcy0+UmVxQ2gsIHRoaXMtPlJlcSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgYS0+SWRUeXBlVGFibGVbdGhpcy0+Tm9dKTsKICAgICAgICAgdGhpcy0+TW9yZSB8PVhNT1JFRjsKICAgICAgICAgYS0+cmFtX291dChhLCAmUmVxT3V0LT5SZXEsIHRoaXMtPlJlcSk7Ci0gICAgICAgIG1vcmUgPSBGQUxTRTsKKyAgICAgICAgbW9yZSA9IGZhbHNlOwogICAgICAgICBpZiAoYS0+Rmxvd0NvbnRyb2xJZFRhYmxlW3RoaXMtPlJlcUNoXSA9PSB0aGlzLT5JZCkKLSAgICAgICAgICBhLT5GbG93Q29udHJvbFNraXBUYWJsZVt0aGlzLT5SZXFDaF0gPSBUUlVFOworICAgICAgICAgIGEtPkZsb3dDb250cm9sU2tpcFRhYmxlW3RoaXMtPlJlcUNoXSA9IHRydWU7CiAgICAgICAgIC8qCiAgICAgICAgICAgIE5vdGUgdGhhdCByZW1vdmUgcmVxdWVzdCB3YXMgc2VudCB0byB0aGUgY2FyZAogICAgICAgICAgICAqLwpAQCAtMzExLDcgKzMxMSw3IEBACiAgICAgICAgIC8qIGFyZSBtYXJrZWQgUk5SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCiAgICAgICBpZihSTlJJZCAmJiBSTlJJZD09YS0+cmFtX2luKGEsICZJbmRJbi0+SW5kSWQpKSB7CiAgICAgICAgIGEtPnJhbV9vdXQoYSwgJkluZEluLT5JbmQsIDApOwotICAgICAgICBhLT5yYW1fb3V0KGEsICZJbmRJbi0+Uk5SLCBUUlVFKTsKKyAgICAgICAgYS0+cmFtX291dChhLCAmSW5kSW4tPlJOUiwgdHJ1ZSk7CiAgICAgICB9CiAgICAgICBlbHNlIHsKICAgICAgICAgSW5kID0gYS0+cmFtX2luKGEsICZJbmRJbi0+SW5kKTsKQEAgLTMzMSw3ICszMzEsNyBAQAogICAgICAgICAgICAgZHRyYyhkcHJpbnRmKCJSTlIiKSk7CiAgICAgICAgICAgICBhLT5yYW1fb3V0KGEsICZJbmRJbi0+SW5kLCAwKTsKICAgICAgICAgICAgIFJOUklkID0gYS0+cmFtX2luKGEsICZJbmRJbi0+SW5kSWQpOwotICAgICAgICAgICAgYS0+cmFtX291dChhLCAmSW5kSW4tPlJOUiwgVFJVRSk7CisgICAgICAgICAgICBhLT5yYW1fb3V0KGEsICZJbmRJbi0+Uk5SLCB0cnVlKTsKICAgICAgICAgICB9CiAgICAgICAgIH0KICAgICAgIH0KQEAgLTM0MCw3ICszNDAsNyBAQAogICAgIH0KICAgICBhLT5yYW1fb3V0KGEsICZQUl9SQU0tPkluZE91dHB1dCwgMCk7CiAgIH0KLSAgcmV0dXJuIEZBTFNFOworICByZXR1cm4gZmFsc2U7CiB9CiBieXRlIHNjb21fdGVzdF9pbnQoQURBUFRFUiAqIGEpCiB7CkBAIC0zOTksNyArMzk5LDcgQEAKICAgICAgICAgICByZXR1cm4gKDApOwogICAgICAgICB9CiAgICAgICAgIGlmIChleHRlbmRlZF9pbmZvX3R5cGUgPT0gRElWQV9SQ19UWVBFX1JFTU9WRV9DT01QTEVURSkKLSAgICAgICAgICBhLT5SY0V4dGVuc2lvblN1cHBvcnRlZCA9IFRSVUU7CisgICAgICAgICAgYS0+UmNFeHRlbnNpb25TdXBwb3J0ZWQgPSB0cnVlOwogICAgICAgfQogICAgICAgYS0+bWlzY19mbGFnc190YWJsZVtlX25vXSAmPSB+RElWQV9NSVNDX0ZMQUdTX1JFTU9WRV9QRU5ESU5HOwogICAgICAgYS0+bWlzY19mbGFnc190YWJsZVtlX25vXSAmPSB+RElWQV9NSVNDX0ZMQUdTX05PX1JDX0NBTkNFTExJTkc7CkBAIC00MjgsNyArNDI4LDcgQEAKICAgICB9CiA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KCJTcG9vZiIpKTsKICAgICAgICAgICAgIHNlbmRfcmVxKHBsY2kpOwotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgIH0KICAgICAgICAgICBpZihjaD09NClhZGRfcChwbGNpLENISSxwX2NoaSk7CiAgICAgICAgICAgYWRkX3MocGxjaSxDUE4sJnBhcm1zWzFdKTsKQEAgLTEzOTUsMTEgKzEzOTUsMTEgQEAKICAgICAgICAgICAgIHBsY2ktPmFwcGwgPSBhcHBsOwogICAgICAgICAgICAgc2lnX3JlcShwbGNpLExJU1RFTl9SRVEsMCk7CiAgICAgICAgICAgICBzZW5kX3JlcShwbGNpKTsKLSAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICB9CiAgICAgICAgIH0KICAgICAgICAgc2VuZF9yZXEocGxjaSk7Ci0gICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgfQogICAgICAgcGxjaS0+SWQgPSAwOwogICAgIH0KQEAgLTE1NzEsNyArMTU3MSw3IEBACiBieXRlIGNvbm5lY3RfYV9yZXMoZHdvcmQgSWQsIHdvcmQgTnVtYmVyLCBESVZBX0NBUElfQURBUFRFUiAgICogYSwgUExDSSAgICogcGxjaSwgQVBQTCAgICogYXBwbCwgQVBJX1BBUlNFICogbXNnKQogewogICBkYnVnKDEsZHByaW50ZigiY29ubmVjdF9hX3JlcyIpKTsKLSAgcmV0dXJuIEZBTFNFOworICByZXR1cm4gZmFsc2U7CiB9CiAKIGJ5dGUgZGlzY29ubmVjdF9yZXEoZHdvcmQgSWQsIHdvcmQgTnVtYmVyLCBESVZBX0NBUElfQURBUFRFUiAgICogYSwgUExDSSAgICogcGxjaSwgQVBQTCAgICogYXBwbCwgQVBJX1BBUlNFICogbXNnKQpAQCAtMTYyNCw5ICsxNjI0LDkgQEAKICAgIC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ZigiYWxlcnRfcmVxIikpOwogCiAgIEluZm8gPSBfV1JPTkdfSURFTlRJRklFUjsKLSAgcmV0ID0gRkFMU0U7CisgIHJldCA9IGZhbHNlOwogICBpZihwbGNpKSB7CiAgICAgSW5mbyA9IF9BTEVSVF9JR05PUkVEOwogICAgIGlmKHBsY2ktPlN0YXRlIT1JTkNfQ09OX0FMRVJUKSB7CkBAIC0xOTIyLDcgKzE5MjIsNyBAQAogICAgICAgICAgICAgcnBsY2ktPmFwcGwgPSBhcHBsOwogICAgICAgICAgICAgc2lnX3JlcShycGxjaSxTX1NVUFBPUlRFRCwwKTsKICAgICAgICAgICAgIHNlbmRfcmVxKHJwbGNpKTsKLSAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgIGJyZWFrOwogCiAgICAgICAgICAgY2FzZSBTX0xJU1RFTjoKQEAgLTE5NzIsNyArMTk3Miw3IEBACiAgICAgICAgICAgICAgIGFkZF9zKHBsY2ksQ0FJLCZzc19wYXJtc1sxXSk7CiAgICAgICAgICAgICAgIHNpZ19yZXEocGxjaSxDQUxMX0hPTEQsMCk7CiAgICAgICAgICAgICAgIHNlbmRfcmVxKHBsY2kpOwotICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgIH0KICAgICAgICAgICAgIGVsc2UgSW5mbyA9IDB4MzAxMDsgICAgICAgICAgICAgICAgICAgIC8qIHdyb25nIHN0YXRlICAgICAgICAgICAqLwogICAgICAgICAgICAgYnJlYWs7CkBAIC0xOTk3LDEzICsxOTk3LDEzIEBACiAgICAgICAgICAgICAgICAgcGxjaS0+aW50ZXJuYWxfY29tbWFuZCA9IEJMT0NLX1BMQ0k7CiAgICAgICAgICAgICAgICAgcGxjaS0+Y29tbWFuZCA9IDA7CiAgICAgICAgICAgICAgICAgZGJ1ZygxLGRwcmludGYoIlNwb29mIikpOwotICAgICAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgc2lnX3JlcShwbGNpLENBTExfUkVUUklFVkUsMCk7CiAgICAgICAgICAgICAgICAgc2VuZF9yZXEocGxjaSk7Ci0gICAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgfQogICAgICAgICAgICAgZWxzZSBJbmZvID0gMHgzMDEwOyAgICAgICAgICAgICAgICAgICAgLyogd3Jvbmcgc3RhdGUgICAgICAgICAgICovCkBAIC0yMTIzLDcgKzIxMjMsNyBAQAogICAgICAgICAgICAgICBhZGRfcChwbGNpLENBSSxjYWkpOwogICAgICAgICAgICAgICBzaWdfcmVxKHBsY2ksU19TRVJWSUNFLDApOwogICAgICAgICAgICAgICBzZW5kX3JlcShwbGNpKTsKLSAgICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICB9CiAgICAgICAgICAgICBlbHNlIEluZm8gPSAweDMwMTA7ICAgICAgICAgICAgICAgICAgICAvKiB3cm9uZyBzdGF0ZSAgICAgICAgICAgKi8KICAgICAgICAgICAgIGJyZWFrOwpAQCAtMjI2NSw3ICsyMjY1LDcgQEAKICAgICAgICAgICAgICAgYWRkX3AocnBsY2ksQ0FJLGNhaSk7CiAgICAgICAgICAgICAgIHNpZ19yZXEocnBsY2ksU19TRVJWSUNFLDApOwogICAgICAgICAgICAgICBzZW5kX3JlcShycGxjaSk7Ci0gICAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgfQogICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgewpAQCAtMjI5MSwxNCArMjI5MSwxNCBAQAogICAgICAgICAgICAgc3NfcGFybXNbM10uaW5mb1szXSA9IChieXRlKUdFVF9XT1JEKCYoc3NfcGFybXNbMl0uaW5mb1swXSkpOwogICAgICAgICAgICAgcGxjaS0+Y29tbWFuZCA9IDA7CiAgICAgICAgICAgICBwbGNpLT5pbnRlcm5hbF9jb21tYW5kID0gQ0RfUkVRX1BFTkQ7Ci0gICAgICAgICAgICBhcHBsLT5DREVuYWJsZSA9IFRSVUU7CisgICAgICAgICAgICBhcHBsLT5DREVuYWJsZSA9IHRydWU7CiAgICAgICAgICAgICBjYWlbMF0gPSAxOwogICAgICAgICAgICAgY2FpWzFdID0gQ0FMTF9ERUZMRUNUSU9OOwogICAgICAgICAgICAgYWRkX3AocGxjaSxDQUksY2FpKTsKICAgICAgICAgICAgIGFkZF9wKHBsY2ksQ1BOLHNzX3Bhcm1zWzNdLmluZm8pOwogICAgICAgICAgICAgc2lnX3JlcShwbGNpLFNfU0VSVklDRSwwKTsKICAgICAgICAgICAgIHNlbmRfcmVxKHBsY2kpOwotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICBjYXNlIFNfQ0FMTF9GT1JXQVJESU5HX1NUQVJUOgpAQCAtMjMzNyw3ICsyMzM3LDcgQEAKICAgICAgICAgICAgIGFkZF9wKHJwbGNpLENQTixzc19wYXJtc1s2XS5pbmZvKTsKICAgICAgICAgICAgIHNpZ19yZXEocnBsY2ksU19TRVJWSUNFLDApOwogICAgICAgICAgICAgc2VuZF9yZXEocnBsY2kpOwotICAgICAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgYnJlYWs7CiAKICAgICAgICAgICBjYXNlIFNfSU5URVJST0dBVEVfRElWRVJTSU9OOgpAQCAtMjQ1Niw3ICsyNDU2LDcgQEAKICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgc2lnX3JlcShycGxjaSxTX1NFUlZJQ0UsMCk7CiAgICAgICAgICAgICBzZW5kX3JlcShycGxjaSk7Ci0gICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICBicmVhazsKIAogICAgICAgICAgIGNhc2UgU19NV0lfQUNUSVZBVEU6CkBAIC0yNDcyLDcgKzI0NzIsNyBAQAogICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgcnBsY2kgPSAmYS0+cGxjaVtpLTFdOwogICAgICAgICAgICAgICAgIHJwbGNpLT5hcHBsID0gYXBwbDsKLSAgICAgICAgICAgICAgICBycGxjaS0+Y3JfZW5xdWlyeT1UUlVFOworICAgICAgICAgICAgICAgIHJwbGNpLT5jcl9lbnF1aXJ5PXRydWU7CiAgICAgICAgICAgICAgICAgYWRkX3AocnBsY2ksQ0FJLCJceDAxXHg4MCIpOwogICAgICAgICAgICAgICAgIGFkZF9wKHJwbGNpLFVJRCwiXHgwNlx4NDNceDYxXHg3MFx4NjlceDMyXHgzMCIpOwogICAgICAgICAgICAgICAgIHNpZ19yZXEocnBsY2ksQVNTSUdOLERTSUdfSUQpOwpAQCAtMjQ4Nyw3ICsyNDg3LDcgQEAKICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgcnBsY2kgPSBwbGNpOwotICAgICAgICAgICAgICBycGxjaS0+Y3JfZW5xdWlyeT1GQUxTRTsKKyAgICAgICAgICAgICAgcnBsY2ktPmNyX2VucXVpcnk9ZmFsc2U7CiAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgIHJwbGNpLT5jb21tYW5kID0gMDsKQEAgLTI1MDksNyArMjUwOSw3IEBACiAgICAgICAgICAgICBhZGRfcChycGxjaSxVSUQsc3NfcGFybXNbMTBdLmluZm8pOyAvKiBUaW1lICovCiAgICAgICAgICAgICBzaWdfcmVxKHJwbGNpLFNfU0VSVklDRSwwKTsKICAgICAgICAgICAgIHNlbmRfcmVxKHJwbGNpKTsKLSAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKIAogICAgICAgICAgIGNhc2UgU19NV0lfREVBQ1RJVkFURToKICAgICAgICAgICAgIGlmKGFwaV9wYXJzZSgmcGFybXMtPmluZm9bMV0sKHdvcmQpcGFybXMtPmxlbmd0aCwid2J3d3NzIixzc19wYXJtcykpCkBAIC0yNTI0LDcgKzI1MjQsNyBAQAogICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgcnBsY2kgPSAmYS0+cGxjaVtpLTFdOwogICAgICAgICAgICAgICAgIHJwbGNpLT5hcHBsID0gYXBwbDsKLSAgICAgICAgICAgICAgICBycGxjaS0+Y3JfZW5xdWlyeT1UUlVFOworICAgICAgICAgICAgICAgIHJwbGNpLT5jcl9lbnF1aXJ5PXRydWU7CiAgICAgICAgICAgICAgICAgYWRkX3AocnBsY2ksQ0FJLCJceDAxXHg4MCIpOwogICAgICAgICAgICAgICAgIGFkZF9wKHJwbGNpLFVJRCwiXHgwNlx4NDNceDYxXHg3MFx4NjlceDMyXHgzMCIpOwogICAgICAgICAgICAgICAgIHNpZ19yZXEocnBsY2ksQVNTSUdOLERTSUdfSUQpOwpAQCAtMjUzOSw3ICsyNTM5LDcgQEAKICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgcnBsY2kgPSBwbGNpOwotICAgICAgICAgICAgICBycGxjaS0+Y3JfZW5xdWlyeT1GQUxTRTsKKyAgICAgICAgICAgICAgcnBsY2ktPmNyX2VucXVpcnk9ZmFsc2U7CiAgICAgICAgICAgICB9CiAKICAgICAgICAgICAgIHJwbGNpLT5jb21tYW5kID0gMDsKQEAgLTI1NTYsNyArMjU1Niw3IEBACiAgICAgICAgICAgICBhZGRfcChycGxjaSxPQUQsc3NfcGFybXNbNV0uaW5mbyk7IC8qIENvbnRyb2xsaW5nIFVzZXIgTnVtYmVyICovCiAgICAgICAgICAgICBzaWdfcmVxKHJwbGNpLFNfU0VSVklDRSwwKTsKICAgICAgICAgICAgIHNlbmRfcmVxKHJwbGNpKTsKLSAgICAgICAgICAgIHJldHVybiBGQUxTRTsKKyAgICAgICAgICAgIHJldHVybiBmYWxzZTsKIAogICAgICAgICAgIGRlZmF1bHQ6CiAgICAgICAgICAgICBJbmZvID0gMHgzMDBFOyAgLyogbm90IHN1cHBvcnRlZCAqLwpAQCAtMjU5NywxMyArMjU5NywxMyBAQAogICAgICAgICBJZCwKICAgICAgICAgTnVtYmVyLAogICAgICAgICAid3dzIixJbmZvLHNlbGVjdG9yLFNTcGFybXMpOwotICByZXR1cm4gRkFMU0U7CisgIHJldHVybiBmYWxzZTsKIH0KIAogYnl0ZSBmYWNpbGl0eV9yZXMoZHdvcmQgSWQsIHdvcmQgTnVtYmVyLCBESVZBX0NBUElfQURBUFRFUiAgICogYSwgUExDSSAgICogcGxjaSwgQVBQTCAgICogYXBwbCwgQVBJX1BBUlNFICogbXNnKQogewogICBkYnVnKDEsZHByaW50ZigiZmFjaWxpdHlfcmVzIikpOwotICByZXR1cm4gRkFMU0U7CisgIHJldHVybiBmYWxzZTsKIH0KIAogYnl0ZSBjb25uZWN0X2IzX3JlcShkd29yZCBJZCwgd29yZCBOdW1iZXIsIERJVkFfQ0FQSV9BREFQVEVSICAgKiBhLCBQTENJICAgKiBwbGNpLCBBUFBMICAgKiBhcHBsLCBBUElfUEFSU0UgKiBwYXJtcykKQEAgLTI2NDksNyArMjY0OSw3IEBACiAgICAgICAgICAgICAgIElkLAogICAgICAgICAgICAgICBOdW1iZXIsCiAgICAgICAgICAgICAgICJ3IixJbmZvKTsKLSAgICAgICAgcmV0dXJuIEZBTFNFOworICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICB9CiAgICAgICBwbGNpLT5yZXF1ZXN0ZWRfb3B0aW9uc19jb25uID0gMDsKIApAQCAtMjY4NCw3ICsyNjg0LDcgQEAKICAgICAgICAgICAgfHwgKGZheF9mZWF0dXJlX2JpdHMgJiBUMzBfRkVBVFVSRV9CSVRfTU9SRV9ET0NVTUVOVFMpKQogICAgICAgICAgIHsKICAgICAgICAgICAgIGxlbiA9IChieXRlKSgmKCgoVDMwX0lORk8gKikgMCktPnVuaXZlcnNhbF82KSk7Ci0gICAgICAgICAgICBmYXhfaW5mb19jaGFuZ2UgPSBGQUxTRTsKKyAgICAgICAgICAgIGZheF9pbmZvX2NoYW5nZSA9IGZhbHNlOwogICAgICAgICAgICAgaWYgKG5jcGktPmxlbmd0aCA+PSA0KQogICAgICAgICAgICAgewogICAgICAgICAgICAgICB3ID0gR0VUX1dPUkQoJm5jcGktPmluZm9bM10pOwpAQCAtMjY5Myw3ICsyNjkzLDcgQEAKICAgICAgICAgICAgICAgICAoKFQzMF9JTkZPICAgKikocGxjaS0+ZmF4X2Nvbm5lY3RfaW5mb19idWZmZXIpKS0+cmVzb2x1dGlvbiA9CiAgICAgICAgICAgICAgICAgICAoYnl0ZSkoKCgoVDMwX0lORk8gICAqKShwbGNpLT5mYXhfY29ubmVjdF9pbmZvX2J1ZmZlcikpLT5yZXNvbHV0aW9uICYgflQzMF9SRVNPTFVUSU9OX1I4XzA3NzBfT1JfMjAwKSB8CiAgICAgICAgICAgICAgICAgICAoKHcgJiAweDAwMDEpID8gVDMwX1JFU09MVVRJT05fUjhfMDc3MF9PUl8yMDAgOiAwKSk7Ci0gICAgICAgICAgICAgICAgZmF4X2luZm9fY2hhbmdlID0gVFJVRTsKKyAgICAgICAgICAgICAgICBmYXhfaW5mb19jaGFuZ2UgPSB0cnVlOwogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgIGZheF9jb250cm9sX2JpdHMgJj0gfihUMzBfQ09OVFJPTF9CSVRfUkVRVUVTVF9QT0xMSU5HIHwgVDMwX0NPTlRST0xfQklUX01PUkVfRE9DVU1FTlRTKTsKICAgICAgICAgICAgICAgaWYgKHcgJiAweDAwMDIpICAvKiBGYXgtcG9sbGluZyByZXF1ZXN0ICovCkBAIC0yNzA5LDcgKzI3MDksNyBAQAogICAgICAgICAgICAgICAgIGlmICgoKGJ5dGUpIHcpICE9ICgoVDMwX0lORk8gICAqKShwbGNpLT5mYXhfY29ubmVjdF9pbmZvX2J1ZmZlcikpLT5kYXRhX2Zvcm1hdCkKICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICAoKFQzMF9JTkZPICAgKikocGxjaS0+ZmF4X2Nvbm5lY3RfaW5mb19idWZmZXIpKS0+ZGF0YV9mb3JtYXQgPSAoYnl0ZSkgdzsKLSAgICAgICAgICAgICAgICAgIGZheF9pbmZvX2NoYW5nZSA9IFRSVUU7CisgICAgICAgICAgICAgICAgICBmYXhfaW5mb19jaGFuZ2UgPSB0cnVlOwogICAgICAgICAgICAgICAgIH0KIAogICAgICAgICAgICAgICAgIGlmICgoYS0+bWFuX3Byb2ZpbGUucHJpdmF0ZV9vcHRpb25zICYgKDFMIDw8IFBSSVZBVEVfRkFYX1NVQl9TRVBfUFdEKSkKQEAgLTI3ODEsMTMgKzI3ODEsMTMgQEAKICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICBsZW4gPSAoYnl0ZSkoJigoKFQzMF9JTkZPICopIDApLT51bml2ZXJzYWxfNikpOwogICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBmYXhfaW5mb19jaGFuZ2UgPSBUUlVFOworICAgICAgICAgICAgICAgIGZheF9pbmZvX2NoYW5nZSA9IHRydWU7CiAKICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICBpZiAoZmF4X2NvbnRyb2xfYml0cyAhPSBHRVRfV09SRCgmKChUMzBfSU5GTyAgICopcGxjaS0+ZmF4X2Nvbm5lY3RfaW5mb19idWZmZXIpLT5jb250cm9sX2JpdHNfbG93KSkKICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgIFBVVF9XT1JEICgmKChUMzBfSU5GTyAgICopcGxjaS0+ZmF4X2Nvbm5lY3RfaW5mb19idWZmZXIpLT5jb250cm9sX2JpdHNfbG93LCBmYXhfY29udHJvbF9iaXRzKTsKLSAgICAgICAgICAgICAgICBmYXhfaW5mb19jaGFuZ2UgPSBUUlVFOworICAgICAgICAgICAgICAgIGZheF9pbmZvX2NoYW5nZSA9IHRydWU7CiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgIH0KICAgICAgICAgICAgIGlmIChJbmZvID09IEdPT0QpCkBAIC0yNzk4LDEyICsyNzk4LDEyIEBACiAgICAgICAgICAgICAgICAgaWYgKGZheF9mZWF0dXJlX2JpdHMgJiBUMzBfRkVBVFVSRV9CSVRfTU9SRV9ET0NVTUVOVFMpCiAgICAgICAgICAgICAgICAgewogICAgICAgICAgICAgICAgICAgc3RhcnRfaW50ZXJuYWxfY29tbWFuZCAoSWQsIHBsY2ksIGZheF9jb25uZWN0X2luZm9fY29tbWFuZCk7Ci0gICAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIGVsc2UKICAgICAgICAgICAgICAgICB7CiAgICAgICAgICAgICAgICAgICBzdGFydF9pbnRlcm5hbF9jb21tYW5kIChJZCwgcGxjaSwgZmF4X2FkanVzdF9iMjNfY29tbWFuZCk7Ci0gICAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9CkBAIC0yODIwLDcgKzI4MjAsNyBAQAogICAgICAgICBmb3IgKHcgPSAwOyB3IDwgbmNwaS0+bGVuZ3RoOyB3KyspCiAgICAgICAgICAgcGxjaS0+aW50ZXJuYWxfcmVxX2J1ZmZlclsyK3ddID0gbmNwaS0+aW5mb1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VEVSICAgKiBhLCBQTENJICAgKiBwbGNpLCBBUFBMICAgKiBhcHBsLCBBUElfUEFSU0UgKiBwYXJtcykKQEAgLTM0ODksNyArMzQ4OSw3IEBACiAgICAgICAgICAgfQogCiAgICAgICAgICAgcGxjaS0+U3RhdGUgPSBMT0NBTF9DT05ORUNUOwotICAgICAgICAgIHBsY2ktPm1hbnVmYWN0dXJlciA9IFRSVUU7CisgICAgICAgICAgcGxjaS0+bWFudWZhY3R1cmVyID0gdHJ1ZTsKICAgICAgICAgICBwbGNpLT5jb21tYW5kID0gX01BTlVGQUNUVVJFUl9SOwogICAgICAgICAgIHBsY2ktPm1fY29tbWFuZCA9IGNvbW1hbmQ7CiAgICAgICAgICAgcGxjaS0+bnVtYmVyID0gTnVtYmVyOwpAQCAtMzUyMCw3ICszNTIwLDcgQEAKICAgICAgICAgICAgICAgICBwbGNpLT5pbnRlcm5hbF9jb21tYW5kID0gQkxPQ0tfUExDSTsgLyogcmVqZWN0IG90aGVyIHJlcSBtZWFud2hpbGUgKi8KICAgICAgICAgICAgICAgICBwbGNpLT5jb21tYW5kID0gMDsKICAgICAgICAgICAgICAgICBzZW5kX3JlcShwbGNpKTsKLSAgICAgICAgICAgICAgICByZXR1cm4gRkFMU0U7CisgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOwogICAgICAgICAgICAgICB9CiAgICAgICAgICAgICAgIGlmKGRpcj09MSkgewogICAgICAgICAgICAgICAgIHNpZ19yZXEocGxjaSxDQUxMX1JFUSwwKTsKQEAgLTM1NzMsNyArMzU3Myw3IEBACiAgICAgICB9CiAgICAgICBlbHNlIGlmKHJlcT09TEFXX1JFUSkKICAgICAgIHsKLSAgICAgICAgcGxjaS0+Y3JfZW5xdWlyeSA9IFRSVUU7CisgICAgICAgIHBsY2ktPmNyX2VucXVpcnkgPSB0cnVlOwogICAgICAgfQogICAgICAgYWRkX3NzKHBsY2ksRlRZLCZtX3Bhcm1zWzFdKTsKICAgICAgIHNpZ19yZXEocGxjaSxyZXEsMCk7CkBAIC0zNzM5LDcgKzM3MzksNyBAQAogICAgICAgICBJZCwKICAgICAgICAgTnVtYmVyLAogICAgICAgICAiZHd3IixfRElfTUFOVV9JRCxjb21tYW5kLEluZm8pOwotICByZXR1cm4gRkFMU0U7CisgIHJldHVybiBmYWxzZTsKIH0KIAogCkBAIC0zNzYwLDcgKzM3NjAsNyBAQAogICAgfHwgKG1zZ1sxXS5sZW5ndGggPT0gMCkKICAgIHx8IChHRVRfRFdPUkQobXNnWzBdLmluZm8pIT1fRElfTUFOVV9JRCkpCiAgIHsKLSAgICByZXR1cm4gRkFMU0U7CisgICAgcmV0dXJuIGZhbHNlOwogICB9CiAgIGluZGljYXRpb24gPSBHRVRfV09SRChtc2dbMV0uaW5mbyk7CiAgIHN3aXRjaCAoaW5kaWNhdGlvbikKQEAgLTM4MTEsNyArMzgxMSw3IEBACiAgICAgYnJlYWs7CiAKICAgfQotICByZXR1cm4gRkFMU0U7CisgIHJldHVybiBmYWxzZTsKIH0KIAogLyotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0qLwpAQCAtMzkwOCwxNCArMzkwOCwxNCBAQAogICAgICAgICAgIHBsY2ktPm5sX3JlcSA9IDA7CiAgICAgICB9CiAgICAgICBpZiAocGxjaS0+bmxfcmVxKQotICAgICAgICBjb250cm9sX3JjIChwbGNpLCAwLCByYywgY2gsIDAsIFRSVUUpOworICAgICAgICBjb250cm9sX3JjIChwbGNpLCAwLCByYywgY2gsIDAsIHRydWUpOwogICAgICAgZWxzZQogICAgICAgewogICAgICAgICBpZiAocmVxID09IE5fWE9OKQogICAgICAgICB7CiAgICAgICAgICAgY2hhbm5lbF94X29uIChwbGNpLCBjaCk7CiAgICAgICAgICAgaWYgKHBsY2ktPmludGVybmFsX2NvbW1hbmQpCi0gICAgICAgICAgICBjb250cm9sX3JjIChwbGNpLCByZXEsIHJjLCBjaCwgMCwgVFJVRSk7CisgICAgICAgICAgICBjb250cm9sX3JjIChwbGNpLCByZXEsIHJjLCBjaCwgMCwgdHJ1ZSk7CiAgICAgICAgIH0KICAgICAgICAgZWxzZQogICAgICAgICB7CkBAIC0zOTMxLDIxICszOTMxLDIxIEBACiAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgIH0KICAgICAgICAgICAgIGNoYW5uZWxfeG1pdF94b24gKHBsY2kpOwotICAgICAgICAgICAgY29udHJvbF9yYyAocGxjaSwgMCwgcmMsIGNoLCBnbG9iYWxfcmVxLCBUUlVFKTsKKyAgICAgICAgICAgIGNvbnRyb2xfcmMgKHBsY2ksIDAsIHJjLCBjaCwgZ2xvYmFsX3JlcSwgdHJ1ZSk7CiAgICAgICAgICAgfQogICAgICAgICAgIGVsc2UgaWYgKHBsY2ktPmRhdGFfc2VudCkKICAgICAgICAgICB7CiAgICAgICAgICAgICBjaGFubmVsX3htaXRfeG9uIChwbGNpKTsKLSAgICAgICAgICAgIHBsY2ktPmRhdGFfc2VudCA9IEZBTFNFOworICAgICAgICAgICAgcGxjaS0+ZGF0YV9zZW50ID0gZmFsc2U7CiAgICAgICAgICAgICBwbGNpLT5OTC5YTnVtID0gMTsKICAgICAgICAgICAgIGRhdGFfcmMgKHBsY2ksIGNoKTsKICAgICAgICAgICAgIGlmIChwbGNpLT5pbnRlcm5hbF9jb21tYW5kKQotICAgICAgICAgICAgICBjb250cm9sX3JjIChwbGNpLCByZXEsIHJjLCBjaCwgMCwgVFJVRSk7CisgICAgICAgICAgICAgIGNvbnRyb2xfcmMgKHBsY2ksIHJlcSwgcmMsIGNoLCAwLCB0cnVlKTsKICAgICAgICAgICB9CiAgICAgICAgICAgZWxzZQogICAgICAgICAgIHsKICAgICAgICAgICAgIGNoYW5uZWxfeG1pdF94b24gKHBsY2kpOwotICAgICAgICAgICAgY29udHJvbF9yYyAocGxjaSwgcmVxLCByYywgY2gsIDAsIFRSVUUpOworICAgICAgICAgICAgY29udHJvb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VpcnkgPSBGQUxTRTsKKyAgICAgIHBsY2ktPmNyX2VucXVpcnkgPSBmYWxzZTsKICAgICAgIC8qIGQgPSBNQU5VX0lEICAgICAgICAgICAgKi8KICAgICAgIC8qIHcgPSBtX2NvbW1hbmQgICAgICAgICAgKi8KICAgICAgIC8qIGIgPSB0b3RhbCBsZW5ndGggICAgICAgKi8KQEAgLTUxNTgsNyArNTE1OCw3IEBACiAgICAgICAgIGlmKGFwcGxpY2F0aW9uW2ldLkNERW5hYmxlKQogICAgICAgICB7CiAgICAgICAgICAgaWYoYXBwbGljYXRpb25baV0uSWQpIHNlbmRmKCZhcHBsaWNhdGlvbltpXSxfRkFDSUxJVFlfSSxJZCwwLCJ3cyIsMywgU1NfSW5kKTsKLSAgICAgICAgICBhcHBsaWNhdGlvbltpXS5DREVuYWJsZSA9IEZBTFNFOworICAgICAgICAgIGFwcGxpY2F0aW9uW2ldLkNERW5hYmxlID0gZmFsc2U7CiAgICAgICAgIH0KICAgICAgIH0KICAgICAgIGJyZWFrOwpAQCAtNTM3NSw3ICs1Mzc1LDcgQEAKICAgICAgICAgaWYoYXBwbGljYXRpb25baV0uQ0RFbmFibGUpCiAgICAgICAgIHsKICAgICAgICAgICBpZihhcHBsaWNhdGlvbltpXS5JZCkgc2VuZGYoJmFwcGxpY2F0aW9uW2ldLF9GQUNJTElUWV9JLElkLDAsIndzIiwzLCBTU19JbmQpOwotICAgICAgICAgIGFwcGxpY2F0aW9uW2ldLkNERW5hYmxlID0gRkFMU0U7CisgICAgICAgICAgYXBwbGljYXRpb25baV0uQ0RFbmFibGUgPSBmYWxzZTsKICAgICAgICAgfQogICAgICAgfQogICAgICAgYnJlYWs7CkBAIC01NzMwLDcgKzU3MzAsNyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgcGxjaSwKICAgICAgICAgICAgICAgICAgICAgICAgIElkLAogICAgICAgICAgICAgICAgICAgICAgICAgcGFybXMsCi0gICAgICAgICAgICAgICAgICAgICAgICBTZW5kTXVsdGlJRShwbGNpLElkLG11bHRpX3BpX3Bhcm1zLCBQSSwgMHgyMTAsIFRSVUUpKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIFNlbmRNdWx0aUlFKHBsY2ksSWQsbXVsdGlfcGlfcGFybXMsIFBJLCAweDIxMCwgdHJ1ZSkpOwogICAgICAgICB9CiAgICAgICB9CiAgICAgICBjbGVhcl9jX2luZF9tYXNrX2JpdCAocGxjaSwgTUFYX0FQUEwpOwpAQCAtNjExNywzOCArNjExNywzOCBAQAogICAgICAgICBkYnVnKDEsZHByaW50ZigiQ1BOICIpKTsKICAgICAgICAgSW5mb19OdW1iZXIgPSAweDAwNzA7CiAgICAgICAgIEluZm9fTWFzayAgID0gMHg4MDsKLSAgICAgICAgSW5mb19TZW50X0ZsYWcgPSBUUlVFOworICAgICAgICBJbmZvX1NlbnRfRmxhZyA9IHRydWU7CiAgICAgICAgIGJyZWFrOwogICAgICAgY2FzZSA4OiAgLyogZGlzcGxheSAgICAgICovCiAgICAgICAgIGRidWcoMSxkcHJpbnRmKCJkaXNwbGF5KCVkKSIsaSkpOwogICAgICAgICBJbmZvX051bWJlciA9IDB4MDAyODsKICAgICAgICAgSW5mb19NYXNrID0gMHgwNDsKLSAgICAgICAgSW5mb19TZW50X0ZsYWcgPSBUUlVFOworICAgICAgICBJbmZvX1NlbnRfRmxhZyA9IHRydWU7CiAgICAgICAgIGJyZWFrOwogICAgICAgY2FzZSAxNjogLyogQ2hhbm5lbCBJZCAqLwogICAgICAgICBkYnVnKDEsZHByaW50ZigiQ0hJIikpOwogICAgICAgICBJbmZvX051bWJlciA9IDB4MDAxODsKICAgICAgICAgSW5mb19NYXNrID0gMHgxMDA7Ci0gICAgICAgIEluZm9fU2VudF9GbGFnID0gVFJVRTsKKyAgICAgICAgSW5mb19TZW50X0ZsYWcgPSB0cnVlOwogICAgICAgICBtaXhlcl9zZXRfYmNoYW5uZWxfaWQgKHBsY2ksIEluZm9fRWxlbWVudCk7CiAgICAgICAgIGJyZWFrOwogICAgICAgY2FzZSAxOTogLyogUmVkaXJlY3RlZCBOdW1iZXIgKi8KICAgICAgICAgZGJ1ZygxLGRwcmludGYoIlJETiIpKTsKICAgICAgICAgSW5mb19OdW1iZXIgPSAweDAwNzQ7CiAgICAgICAgIEluZm9fTWFzayA9IDB4NDAwOwotICAgICAgICBJbmZvX1NlbnRfRmxhZyA9IFRSVUU7CisgICAgICAgIEluZm9fU2VudF9GbGFnID0gdHJ1ZTsKICAgICAgICAgYnJlYWs7CiAgICAgICBjYXNlIDIwOiAvKiBSZWRpcmVjdGVkIE51bWJlciBleHRlbmRlZCAqLwogICAgICAgICBkYnVnKDEsZHByaW50ZigiUkRYIikpOwogICAgICAgICBJbmZvX051bWJlciA9IDB4MDA3MzsKICAgICAgICAgSW5mb19NYXNrID0gMHg0MDA7Ci0gICAgICAgIEluZm9fU2VudF9GbGFnID0gVFJVRTsKKyAgICAgICAgSW5mb19TZW50X0ZsYWcgPSB0cnVlOwogICAgICAgICBicmVhazsKICAgICAgIGNhc2UgMjI6IC8qIFJlZGlyZWNpbmcgTnVtYmVyICAqLwogICAgICAgICBkYnVnKDEsZHByaW50ZigiUklOIikpOwogICAgICAgICBJbmZvX051bWJlciA9IDB4MDA3NjsKICAgICAgICAgSW5mb19NYXNrID0gMHg0MDA7Ci0gICAgICAgIEluZm9fU2VudF9GbGFnID0gVFJVRTsKKyAgICAgICAgSW5mb19TZW50X0ZsYWcgPSB0cnVlOwogICAgICAgICBicmVhazsKICAgICAgIGRlZmF1bHQ6CiAgICAgICAgIEluZm9fTnVtYmVyID0gMDsKQEAgLTYzMTIsNyArNjMxMiw3IEBACiAgICAgICAgICYmIHBsY2ktPmFkYXB0ZXItPkluZm9fTWFza1thcHBsLT5JZC0xXSAmSW5mb19NYXNrKQogICAgICAgICB7CiAgICAgICAgICAgZGJ1ZygxLGRwcmludGYoIk5DUl9JbmQiKSk7Ci0gICAgICAgICAgaWVzZW50PVRSVUU7CisgICAgICAgICAgaWVzZW50PXRydWU7CiAgICAgICAgICAgc2VuZGYoJmFwcGxpY2F0aW9uW2pdLF9JTkZPX0ksSWQmMHgwZiwwLCJ3UyIsSW5mb19OdW1iZXIsSW5mb19FbGVtZW50KTsKICAgICAgICAgfQogICAgICAgfQpAQCAtNjMzMCw3ICs2MzMwLDcgQEAKICAgICAgICAgICBpZih0ZXN0X2NfaW5kX21hc2tfYml0IChwbGNpLCBqKSkKICAgICAgICAgICB7CiAgICAgICAgICAgICBkYnVnKDEsZHByaW50ZigiT3ZsX0luZCIpKTsKLSAgICAgICAgICAgIGllc2VudD1UUlVFOworICAgICAgICAgICAgaWVzZW50PXRydWU7CiAgICAgICAgICAgICBzZW5kZigmYXBwbGljYXRpb25bal0sX0lORk9fSSxJZCwwLCJ3UyIsSW5mb19OdW1iZXIsSW5mb19FbGVtZW50KTsKICAgICAgICAgICB9CiAgICAgICAgIH0KQEAgLTYzNDAsNyArNjM0MCw3IEBACiAgICAgJiYgcGxjaS0+YWRhcHRlci0+SW5mb19NYXNrW3BsY2ktPmFwcGwtPklkLTFdICZJbmZvX01hc2spCiAgICAgewogICAgICAgZGJ1ZygxLGRwcmludGYoIlN0ZF9JbmQiKSk7Ci0gICAgICBpZXNlbnQ9VFJVRTsKKyAgICAgIGllc2VudD10cnVlOwogICAgICAgc2VuZGYocGxjaS0+YXBwbCxfSU5GT19JLElkLDAsIndTIixJbmZvX051bWJlcixJbmZvX0VsZW1lbnQpOwogICAgIH0KICAgfQpAQCAtNjM5MSw3ICs2MzkxLDcgQEAKICAgICAgICAgJiYgYXBwbC0+SWQKICAgICAgICAgJiYgcGxjaS0+YWRhcHRlci0+SW5mb19NYXNrW2FwcGwtPklkLTFdICZJbmZvX01hc2spCiAgICAgICAgIHsKLSAgICAgICAgICBpZXNlbnQgPSBUUlVFOworICAgICAgICAgIGllc2VudCA9IHRydWU7CiAgICAgICAgICAgZGJ1ZygxLGRwcmludGYoIk1sdF9OQ1JfSW5kIikpOwogICAgICAgICAgIHNlbmRmKC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sY2lfbmxfYnVzeSAocGxjaSkpCi0gICAgICAgIHJldHVybiAoVFJVRSk7CisgICAgICAgIHJldHVybiAodHJ1ZSk7CiAgICAgICBpZiAoYS0+bGlfcHJpKQogICAgICAgewogICAgICAgICAqKHArKykgPSBVREFUQV9SRVFVRVNUX1NFVF9NSVhFUl9DT0VGU19QUklfU1lOQzsKQEAgLTExMDkwLDcgKzExMDg5LDcgQEAKICAgICAgICAgICAgIGNoX21hcFtqKzFdID0gKGJ5dGUpKGorMSk7CiAgICAgICAgICAgfQogICAgICAgICB9Ci0gICAgICAgIGZvciAobiA9IDA7IG4gPCBzaXplb2YobWl4ZXJfd3JpdGVfcHJvZ19icmkpIC8gc2l6ZW9mKG1peGVyX3dyaXRlX3Byb2dfYnJpWzBdKTsgbisrKQorICAgICAgICBmb3IgKG4gPSAwOyBuIDwgQVJSQVlfU0laRShtaXhlcl93cml0ZV9wcm9nX2JyaSk7IG4rKykKICAgICAgICAgewogICAgICAgICAgIGkgPSBhLT5saV9iYXNlICsgY2hfbWFwW21peGVyX3dyaXRlX3Byb2dfYnJpW25dLnRvX2NoXTsKICAgICAgICAgICBqID0gYS0+bGlfYmFzZSArIGNoX21hcFttaXhlcl93cml0ZV9wcm9nX2JyaVtuXS5mcm9tX2NoXTsKQEAgLTExMTI3LDcgKzExMTI2LDcgQEAKICAgICB7CiAgICAgICBwbGNpLT5pbnRlcm5hbF9jb21tYW5kID0gcGxjaS0+bGlfd3JpdGVfY29tbWFuZDsKICAgICAgIGlmIChwbGNpX25sX2J1c3kgKHBsY2kpKQotICAgICAgICByZXR1cm4gKFRSVUUpOworICAgICAgICByZXR1cm4gKHRydWUpOwogICAgICAgaWYgKGogPCBhLT5saV9iYXNlKQogICAgICAgICBqID0gYS0+bGlfYmFzZTsKICAgICAgIGlmIChhLT5saV9wcmkpCkBAIC0xMTE0MCw3ICsxMTEzOSw3IEBACiAgICAgICAgICAgdyB8PSBNSVhFUl9GRUFUVVJFX0VOQUJMRV9SWF9EQ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TUVfQ09FRkZJQ0lFTlRfVVBEQVRFOgogICAgICAgICAgICAgcGxjaS0+ZWNfaWRpX29wdGlvbnMgJj0gfkxFQ19GUkVFWkVfQ09FRkZJQ0lFTlRTOwogICAgICAgICAgICAgc3RhcnRfaW50ZXJuYWxfY29tbWFuZCAoSWQsIHBsY2ksIGVjX2NvbW1hbmQpOwotICAgICAgICAgICAgcmV0dXJuIChGQUxTRSk7CisgICAgICAgICAgICByZXR1cm4gKGZhbHNlKTsKIAogICAgICAgICAgIGNhc2UgRUNfUkVTRVRfQ09FRkZJQ0lFTlRTOgogICAgICAgICAgICAgcGxjaS0+ZWNfaWRpX29wdGlvbnMgfD0gTEVDX1JFU0VUX0NPRUZGSUNJRU5UUzsKICAgICAgICAgICAgIHN0YXJ0X2ludGVybmFsX2NvbW1hbmQgKElkLCBwbGNpLCBlY19jb21tYW5kKTsKLSAgICAgICAgICAgIHJldHVybiAoRkFMU0UpOworICAgICAgICAgICAgcmV0dXJuIChmYWxzZSk7CiAKICAgICAgICAgICBkZWZhdWx0OgogICAgICAgICAgICAgZGJ1ZyAoMSwgZHByaW50ZiAoIlslMDZseF0gJXMsJWQ6IEVDIHVua25vd24gcmVxdWVzdCAlMDR4IiwKQEAgLTEyOTc4LDE0ICsxMjk3NywxNCBAQAogICAgICAgICAgIGNhc2UgRUNfRU5BQkxFX09QRVJBVElPTjoKICAgICAgICAgICAgIHBsY2ktPmVjX2lkaV9vcHRpb25zICY9IH5MRUNfRlJFRVpFX0NPRUZGSUNJRU5UUzsKICAgICAgICAgICAgIHN0YXJ0X2ludGVybmFsX2NvbW1hbmQgKElkLCBwbGNpLCBlY19jb21tYW5kKTsKLSAgICAgICAgICAgIHJldHVybiAoRkFMU0UpOworICAgICAgICAgICAgcmV0dXJuIChmYWxzZSk7CiAKICAgICAgICAgICBjYXNlIEVDX0RJU0FCTEVfT1BFUkFUSU9OOgogICAgICAgICAgICAgcGxjaS0+ZWNfaWRpX29wdGlvbnMgPSBMRUNfRU5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gICAgIEFkZGVkIEFkZGl0aW9uYWxDb250cm9sRmxhZ3MsIE1heFRhcmdldFBvcnRDb25uZWN0VGltZSwKICAqICAgICAgICAgICAgICAgICAgICAgIFJlcG9ydERldmljZU1pc3NpbmdEZWxheSwgYW5kIElPRGV2aWNlTWlzc2luZ0RlbGF5CiAgKiAgICAgICAgICAgICAgICAgICAgICBmaWVsZHMgdG8gU0FTIElPIFVuaXQgUGFnZSAxLgorICogIDEwLTExLTA2ICAwMS4wNS4xMyAgQWRkZWQgTnVtRm9yY2VXV0lEIGZpZWxkIGFuZCBGb3JjZVdXSUQgYXJyYXkgdG8KKyAqICAgICAgICAgICAgICAgICAgICAgIE1hbnVmYWN0dXJpbmcgUGFnZSA1LgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgTWFudWZhY3R1cmluZyBwYWdlcyA4IHRocm91Z2ggMTAuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBkZWZpbmVzIGZvciBzdXBwb3J0ZWQgbWV0YWRhdGEgc2l6ZSBiaXRzIGluCisgKiAgICAgICAgICAgICAgICAgICAgICBDYXBhYmlsaXRpZXNGbGFncyBmaWVsZCBvZiBJT0MgUGFnZSA2LgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgZGVmaW5lcyBmb3IgbWV0YWRhdGEgc2l6ZSBiaXRzIGluIFZvbHVtZVNldHRpbmdzCisgKiAgICAgICAgICAgICAgICAgICAgICBmaWVsZCBvZiBSQUlEIFZvbHVtZSBQYWdlIDAuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBTQVRBIExpbmsgUmVzZXQgc2V0dGluZ3MsIEVuYWJsZSBTQVRBIEFzeW5jaHJvbm91cworICogICAgICAgICAgICAgICAgICAgICAgTm90aWZpY2F0aW9uIGJpdCwgYW5kIEhpZGVOb25aZXJvQXR0YWNoZWRQaHlJZGVudGlmaWVycworICogICAgICAgICAgICAgICAgICAgICAgYml0IHRvIEFkZGl0aW9uYWxDb250cm9sRmxhZ3MgZmllbGQgb2YgU0FTIElPIFVuaXQKKyAqICAgICAgICAgICAgICAgICAgICAgIFBhZ2UgMS4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIGRlZmluZXMgZm9yIEVuY2xvc3VyZSBEZXZpY2VzIFVubWFwcGVkIGFuZAorICogICAgICAgICAgICAgICAgICAgICAgRGV2aWNlIExpbWl0IEV4Y2VlZGVkIGJpdHMgaW4gU3RhdHVzIGZpZWxkIG9mIFNBUyBJTworICogICAgICAgICAgICAgICAgICAgICAgVW5pdCBQYWdlIDIuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBtb3JlIEFjY2Vzc1N0YXR1cyB2YWx1ZXMgZm9yIFNBUyBEZXZpY2UgUGFnZSAwLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgYml0IGZvciBTQVRBIEFzeW5jaHJvbm91cyBOb3RpZmljYXRpb24gU3VwcG9ydCBpbgorICogICAgICAgICAgICAgICAgICAgICAgRmxhZ3MgZmllbGQgb2YgU0FTIERldmljZSBQYWdlIDAuCiAgKiAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAqLwogCkBAIC02NTQsMTcgKzY3MSwyNCBAQAogI2RlZmluZSBNUElfTUFOUEFHRTRfSVJfTk9fTUlYX1NBU19TQVRBICAgICAgICAgICAgICAgICAoMHgwMSkKIAogCisjaWZuZGVmIE1QSV9NQU5QQUdFNV9OVU1fRk9SQ0VXV0lECisjZGVmaW5lIE1QSV9NQU5QQUdFNV9OVU1fRk9SQ0VXV0lEICAgICAgKDEpCisjZW5kaWYKKwogdHlwZWRlZiBzdHJ1Y3QgX0NPTkZJR19QQUdFX01BTlVGQUNUVVJJTkdfNQogewogICAgIENPTkZJR19QQUdFX0hFQURFUiAgICAgICAgICAgICAgSGVhZGVyOyAgICAgICAgICAgICAvKiAwMGggKi8KICAgICBVNjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJhc2VXV0lEOyAgICAgICAgICAgLyogMDRoICovCiAgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGbGFnczsgICAgICAgICAgICAgIC8qIDBDaCAqLwotICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAvKiAwRGggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE51bUZvcmNlV1dJRDsgICAgICAgLyogMERoICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDI7ICAgICAgICAgIC8qIDBFaCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAvKiAxMGggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNDsgICAgICAgICAgLyogMTRoICovCisgICAgVTY0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGb3JjZVdXSURbTVBJX01BTlBBR0U1X05VTV9GT1JDRVdXSURdOyAvKiAxOGggKi8KIH0gQ09ORklHX1BBR0VfTUFOVUZBQ1RVUklOR181LCBNUElfUE9JTlRFUiBQVFJfQ09ORklHX1BBR0VfTUFOVUZBQ1RVUklOR181LAogICBNYW51ZmFjdHVyaW5nUGFnZTVfdCwgTVBJX1BPSU5URVIgcE1hbnVmYWN0dXJpbmdQYWdlNV90OwogCi0jZGVmaW5lIE1QSV9NQU5VRkFDVFVSSU5HNV9QQUdFVkVSU0lPTiAgICAgICAgICAgICAgICAgICgweDAxKQorI2RlZmluZSBNUElfTUFOVUZBQ1RVUklORzVfUEFHRVZFUlNJT04gICAgICAgICAgICAgICAgICAoMHgwMikKIAogLyogZGVmaW5lcyBmb3IgdGhlIEZsYWdzIGZpZWxkICovCiAjZGVmaW5lIE1QSV9NQU5QQUdFNV9UV09fV1dJRF9QRVJfUEhZICAgICAgICAgICAgICAgICAgICgweDAxKQpAQCAtNzQwLDYgKzc2NCwzNiBAQAogI2RlZmluZSBNUElfTUFOUEFHRTdfRkxBR19VU0VfU0xPVF9JTkZPICAgICAgICAgICAgICAgICAoMHgwMDAwMDAwMSkKIAogCit0eXBlZGVmIHN0cnVjdCBfQ09ORklHX1BBR0VfTUFOVUZBQ1RVUklOR184Cit7CisgICAgQ09ORklHX1BBR0VfSEVBREVSICAgICAgICAgICAgICBIZWFkZXI7ICAgICAgICAgICAgIC8qIDAwaCAqLworICAgIFUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUHJvZHVjdFNwZWNpZmljSW5mbzsvKiAwNGggKi8KK30gQ09ORklHX1BBR0VfTUFOVUZBQ1RVUklOR184LCBNUElfUE9JTlRFUiBQVFJfQ09ORklHX1BBR0VfTUFOVUZBQ1RVUklOR184LAorICBNYW51ZmFjdHVyaW5nUGFnZThfdCwgTVBJX1BPSU5URVIgcE1hbnVmYWN0dXJpbmdQYWdlOF90OworCisjZGVmaW5lIE1QSV9NQU5VRkFDVFVSSU5HOF9QQUdFVkVSU0lPTiAgICAgICAgICAgICAgICAgICgweDAwKQorCisKK3R5cGVkZWYgc3RydWN0IF9DT05GSUdfUEFHRV9NQU5VRkFDVFVSSU5HXzkKK3sKKyAgICBDT05GSUdfUEFHRV9IRUFERVIgICAgICAgICAgICAgIEhlYWRlcjsgICAgICAgICAgICAgLyogMDBoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQcm9kdWN0U3BlY2lmaWNJbmZvOy8qIDA0aCAqLworfSBDT05GSUdfUEFHRV9NQU5VRkFDVFVSSU5HXzksIE1QSV9QT0lOVEVSIFBUUl9DT05GSUdfUEFHRV9NQU5VRkFDVFVSSU5HXzksCisgIE1hbnVmYWN0dXJpbmdQYWdlOV90LCBNUElfUE9JTlRFUiBwTWFudWZhY3R1cmluZ1BhZ2U5X3Q7CisKKyNkZWZpbmUgTVBJX01BTlVGQUNUVVJJTkc2X1BBR0VWRVJTSU9OICAgICAgICAgICAgICAgICAgKDB4MDApCisKKwordHlwZWRlZiBzdHJ1Y3QgX0NPTkZJR19QQUdFX01BTlVGQUNUVVJJTkdfMTAKK3sKKyAgICBDT05GSUdfUEFHRV9IRUFERVIgICAgICAgICAgICAgIEhlYWRlcjsgICAgICAgICAgICAgLyogMDBoICovCisgICAgVTMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQcm9kdWN0U3BlY2lmaWNJbmZvOy8qIDA0aCAqLworfSBDT05GSUdfUEFHRV9NQU5VRkFDVFVSSU5HXzEwLCBNUElfUE9JTlRFUiBQVFJfQ09ORklHX1BBR0VfTUFOVUZBQ1RVUklOR18xMCwKKyAgTWFudWZhY3R1cmluZ1BhZ2UxMF90LCBNUElfUE9JTlRFUiBwTWFudWZhY3R1cmluZ1BhZ2UxMF90OworCisjZGVmaW5lIE1QSV9NQU5VRkFDVFVSSU5HMTBfUEFHRVZFUlNJT04gICAgICAgICAgICAgICAgICgweDAwKQorCisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAqICAgSU8gVW5pdCBDb25maWcgUGFnZXMKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0xMDgwLDEwICsxMTM0LDE0IEBACiB9IENPTkZJR19QQUdFX0lPQ182LCBNUElfUE9JTlRFUiBQVFJfQ09ORklHX1BBR0VfSU9DXzYsCiAgIElPQ1BhZ2U2X3QsIE1QSV9QT0lOVEVSIHBJT0NQYWdlNl90OwogCi0jZGVmaW5lIE1QSV9JT0NQQUdFNl9QQUdFVkVSU0lPTiAgICAgICAgICAgICAgICAgICAgICAgICgweDAwKQorI2RlZmluZSBNUElfSU9DUEFHRTZfUEFHRVZFUlNJT04gICAgICAgICAgICA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bXBpX2lvYy5oICAgICAgICAgICAgICAwMS4wNS4xMiAgICAgICAgICAgIDAxLjA1LjExCisgbXBpX2NuZmcuaCAgICAgICAgICAgICAwMS4wNS4xMyAgICAgICAgICAgIDAxLjA1LjEyCisgbXBpX2luaXQuaCAgICAgICAgICAgICAwMS4wNS4wOCAgICAgICAgICAgIDAxLjA1LjA3CisgbXBpX3RhcmcuaCAgICAgICAgICAgICAwMS4wNS4wNiAgICAgICAgICAgIDAxLjA1LjA2CiAgbXBpX2ZjLmggICAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgIDAxLjA1LjAxCiAgbXBpX2xhbi5oICAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgIDAxLjA1LjAxCiAgbXBpX3JhaWQuaCAgICAgICAgICAgICAwMS4wNS4wMiAgICAgICAgICAgIDAxLjA1LjAyCiAgbXBpX3Rvb2wuaCAgICAgICAgICAgICAwMS4wNS4wMyAgICAgICAgICAgIDAxLjA1LjAzCiAgbXBpX2luYi5oICAgICAgICAgICAgICAwMS4wNS4wMSAgICAgICAgICAgIDAxLjA1LjAxCi0gbXBpX3Nhcy5oICAgICAgICAgICAgICAwMS4wNS4wMyAgICAgICAgICAgIDAxLjA1LjAyCisgbXBpX3Nhcy5oICAgICAgICAgICAgICAwMS4wNS4wNCAgICAgICAgICAgIDAxLjA1LjAzCiAgbXBpX3R5cGUuaCAgICAgICAgICAgICAwMS4wNS4wMiAgICAgICAgICAgIDAxLjA1LjAyCi0gbXBpX2hpc3RvcnkudHh0ICAgICAgICAwMS4wNS4xMyAgICAgICAgICAgIDAxLjA1LjEyCisgbXBpX2hpc3RvcnkudHh0ICAgICAgICAwMS4wNS4xNCAgICAgICAgICAgIDAxLjA1LjEzCiAKIAogICogIERhdGUgICAgICBWZXJzaW9uICAgRGVzY3JpcHRpb24KQEAgLTk0LDYgKzk0LDcgQEAKICAqICAwOC0wMy0wNSAgMDEuMDUuMDkgIEJ1bXBlZCBNUElfSEVBREVSX1ZFUlNJT05fVU5JVC4KICAqICAwOC0zMC0wNSAgMDEuMDUuMTAgIEFkZGVkIDIgbmV3IElPQ1N0YXR1cyBjb2RlcyBmb3IgVGFyZ2V0LgogICogIDAzLTI3LTA2ICAwMS4wNS4xMSAgQnVtcGVkIE1QSV9IRUFERVJfVkVSU0lPTl9VTklULgorICogIDEwLTExLTA2ICAwMS4wNS4xMiAgQnVtcGVkIE1QSV9IRUFERVJfVkVSU0lPTl9VTklULgogICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAKIG1waV9pb2MuaApAQCAtMTgyLDYgKzE4MywxNCBAQAogICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgTVBJX0VWRU5UX1NBU19JTklUX1RBQkxFX09WRVJGTE9XIGFuZCBldmVudAogICogICAgICAgICAgICAgICAgICAgICAgZGF0YSBzdHJ1Y3R1cmUuCiAgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNUElfRVhUX0lNQUdFX1RZUEVfSU5JVElBTElaQVRJT04uCisgKiAgMTAtMTEtMDYgIDAxLjA1LjEyICBBZGRlZCBNUElfSU9DRkFDVFNfRVhDRVBUX01FVEFEQVRBX1VOU1VQUE9SVEVELgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgTWF4SW5pdGlhdG9ycyBmaWVsZCB0byBQb3J0RmFjdHMgcmVwbHkuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBTQVMgRGV2aWNlIFN0YXR1cyBDaGFuZ2UgUmVhc29uQ29kZSBmb3IKKyAqICAgICAgICAgICAgICAgICAgICAgIGFzeW5jaHJvbm91cyBub3RpZmljYWl0b24uCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNUElfRVZFTlRfU0FTX0VYUEFOREVSX1NUQVRVU19DSEFOR0UgYW5kIGV2ZW50CisgKiAgICAgICAgICAgICAgICAgICAgICBkYXRhIHN0cnVjdHVyZS4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIG5ldyBJbWFnZVR5cGUgdmFsdWVzIGZvciBGV0Rvd25sb2FkIGFuZCBGV1VwbG9hZAorICogICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdHMuCiAgKiAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KIAogbXBpX2NuZmcuaApAQCAtNDQ3LDYgKzQ1NiwyMyBAQAogICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgQWRkaXRpb25hbENvbnRyb2xGbGFncywgTWF4VGFyZ2V0UG9ydENvbm5lY3RUaW1lLAogICogICAgICAgICAgICAgICAgICAgICAgUmVwb3J0RGV2aWNlTWlzc2luZ0RlbGF5LCBhbmQgSU9EZXZpY2VNaXNzaW5nRGVsYXkKICAqICAgICAgICAgICAgICAgICAgICAgIGZpZWxkcyB0byBTQVMgSU8gVW5pdCBQYWdlIDEuCisgKiAgMTAtMTEtMDYgIDAxLjA1LjEzICBBZGRlZCBOdW1Gb3JjZVdXSUQgZmllbGQgYW5kIEZvcmNlV1dJRCBhcnJheSB0bworICogICAgICAgICAgICAgICAgICAgICAgTWFudWZhY3R1cmluZyBQYWdlIDUuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNYW51ZmFjdHVyaW5nIHBhZ2VzIDggdGhyb3VnaCAxMC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIGRlZmluZXMgZm9yIHN1cHBvcnRlZCBtZXRhZGF0YSBzaXplIGJpdHMgaW4KKyAqICAgICAgICAgICAgICAgICAgICAgIENhcGFiaWxpdGllc0ZsYWdzIGZpZWxkIG9mIElPQyBQYWdlIDYuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBkZWZpbmVzIGZvciBtZXRhZGF0YSBzaXplIGJpdHMgaW4gVm9sdW1lU2V0dGluZ3MKKyAqICAgICAgICAgICAgICAgICAgICAgIGZpZWxkIG9mIFJBSUQgVm9sdW1lIFBhZ2UgMC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIFNBVEEgTGluayBSZXNldCBzZXR0aW5ncywgRW5hYmxlIFNBVEEgQXN5bmNocm9ub3VzCisgKiAgICAgICAgICAgICAgICAgICAgICBOb3RpZmljYXRpb24gYml0LCBhbmQgSGlkZU5vblplcm9BdHRhY2hlZFBoeUlkZW50aWZpZXJzCisgKiAgICAgICAgICAgICAgICAgICAgICBiaXQgdG8gQWRkaXRpb25hbENvbnRyb2xGbGFncyBmaWVsZCBvZiBTQVMgSU8gVW5pdAorICogICAgICAgICAgICAgICAgICAgICAgUGFnZSAxLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgZGVmaW5lcyBmb3IgRW5jbG9zdXJlIERldmljZXMgVW5tYXBwZWQgYW5kCisgKiAgICAgICAgICAgICAgICAgICAgICBEZXZpY2UgTGltaXQgRXhjZWVkZWQgYml0cyBpbiBTdGF0dXMgZmllbGQgb2YgU0FTIElPCisgKiAgICAgICAgICAgICAgICAgICAgICBVbml0IFBhZ2UgMi4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIG1vcmUgQWNjZXNzU3RhdHVzIHZhbHVlcyBmb3IgU0FTIERldmljZSBQYWdlIDAuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBiaXQgZm9yIFNBVEEgQXN5bmNocm9ub3VzIE5vdGlmaWNhdGlvbiBTdXBwb3J0IGluCisgKiAgICAgICAgICAgICAgICAgICAgICBGbGFncyBmaWVsZCBvZiBTQVMgRGV2aWNlIFBhZ2UgMC4KICAqICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogCiBtcGlfaW5pdC5oCk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ZXMKICAqICBDcmVhdGlvbiBEYXRlOiAgQXVndXN0IDExLCAyMDAwCiAgKgotICogICAgbXBpX2lvYy5oIFZlcnNpb246ICAwMS4wNS4xMQorICogICAgbXBpX2lvYy5oIFZlcnNpb246ICAwMS4wNS4xMgogICoKICAqICBWZXJzaW9uIEhpc3RvcnkKICAqICAtLS0tLS0tLS0tLS0tLS0KQEAgLTk4LDYgKzk4LDE0IEBACiAgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNUElfRVZFTlRfU0FTX0lOSVRfVEFCTEVfT1ZFUkZMT1cgYW5kIGV2ZW50CiAgKiAgICAgICAgICAgICAgICAgICAgICBkYXRhIHN0cnVjdHVyZS4KICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE1QSV9FWFRfSU1BR0VfVFlQRV9JTklUSUFMSVpBVElPTi4KKyAqICAxMC0xMS0wNiAgMDEuMDUuMTIgIEFkZGVkIE1QSV9JT0NGQUNUU19FWENFUFRfTUVUQURBVEFfVU5TVVBQT1JURUQuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBNYXhJbml0aWF0b3JzIGZpZWxkIHRvIFBvcnRGYWN0cyByZXBseS4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIFNBUyBEZXZpY2UgU3RhdHVzIENoYW5nZSBSZWFzb25Db2RlIGZvcgorICogICAgICAgICAgICAgICAgICAgICAgYXN5bmNocm9ub3VzIG5vdGlmaWNhaXRvbi4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE1QSV9FVkVOVF9TQVNfRVhQQU5ERVJfU1RBVFVTX0NIQU5HRSBhbmQgZXZlbnQKKyAqICAgICAgICAgICAgICAgICAgICAgIGRhdGEgc3RydWN0dXJlLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgbmV3IEltYWdlVHlwZSB2YWx1ZXMgZm9yIEZXRG93bmxvYWQgYW5kIEZXVXBsb2FkCisgKiAgICAgICAgICAgICAgICAgICAgICByZXF1ZXN0cy4KICAqICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLQogICovCiAKQEAgLTI2NCw2ICsyNzIsNyBAQAogI2RlZmluZSBNUElfSU9DRkFDVFNfRVhDRVBUX1JBSURfQ09ORklHX0lOVkFMSUQgICAgICAgICAoMHgwMDAyKQogI2RlZmluZSBNUElfSU9DRkFDVFNfRVhDRVBUX0ZXX0NIRUNLU1VNX0ZBSUwgICAgICAgICAgICAoMHgwMDA0KQogI2RlZmluZSBNUElfSU9DRkFDVFNfRVhDRVBUX1BFUlNJU1RFTlRfVEFCTEVfRlVMTCAgICAgICAoMHgwMDA4KQorI2RlZmluZSBNUElfSU9DRkFDVFNfRVhDRVBUX01FVEFEQVRBX1VOU1VQUE9SVEVEICAgICAgICAoMHgwMDEwKQogCiAjZGVmaW5lIE1QSV9JT0NGQUNUU19GTEFHU19GV19ET1dOTE9BRF9CT09UICAgICAgICAgICAgICgweDAxKQogI2RlZmluZSBNUElfSU9DRkFDVFNfRkxBR1NfUkVQTFlfRklGT19IT1NUX1NJR05BTCAgICAgICAoMHgwMikKQEAgLTMyOCw3ICszMzcsOCBAQAogICAgICBVMTYgICAgICAgICAgICAgICAgICAgIE1heFBvc3RlZENtZEJ1ZmZlcnM7ICAgICAgICAvKiAxQ2ggKi8KICAgICAgVTE2ICAgICAgICAgICAgICAgICAgICBNYXhQZXJzaXN0ZW50SURzOyAgICAgICAgICAgLyogMUVoICovCiAgICAgIFUxNiAgICAgICAgICAgICAgICAgICAgTWF4TGFuQnVja2V0czsgICAgICAgICAgICAgIC8qIDIwaCAqLwotICAgICBVMTYgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNDsgICAgICAgICAgICAgICAgICAvKiAyMmggKi8KKyAgICAgVTggICAgICAgICAgICAgICAgICAgICBNYXhJbml0aWF0b3JzOyAgICAgICAgICAgICAgLyogMj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JOQUwgICAgICAgKDB4MEMpCisjZGVmaW5lIE1QSV9FVkVOVF9TQVNfREVWX1NUQVRfUkNfQVNZTkNfTk9USUZJQ0FUSU9OICAgICAgICAoMHgwRCkKIAogCiAvKiBTQ1NJIEV2ZW50IGRhdGEgZm9yIFF1ZXVlIEZ1bGwgZXZlbnQgKi8KQEAgLTg5NSw2ICs5MDcsNTQgQEAKICAgTXBpRXZlbnREYXRhU2FzSW5pdFRhYmxlT3ZlcmZsb3dfdCwKICAgTVBJX1BPSU5URVIgcE1waUV2ZW50RGF0YVNhc0luaXRUYWJsZU92ZXJmbG93X3Q7CiAKKy8qIFNBUyBFeHBhbmRlciBTdGF0dXMgQ2hhbmdlIEV2ZW50IGRhdGEgKi8KKwordHlwZWRlZiBzdHJ1Y3QgX0VWRU5UX0RBVEFfU0FTX0VYUEFOREVSX1NUQVRVU19DSEFOR0UKK3sKKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBSZWFzb25Db2RlOyAgICAgICAgICAgICAvKiAwMGggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDE7ICAgICAgICAgICAgICAvKiAwMWggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDI7ICAgICAgICAgICAgICAvKiAwMmggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBQaHlzaWNhbFBvcnQ7ICAgICAgICAgICAvKiAwNGggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDM7ICAgICAgICAgICAgICAvKiAwNWggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBFbmNsb3N1cmVIYW5kbGU7ICAgICAgICAvKiAwNmggKi8KKyAgICBVNjQgICAgICAgICAgICAgICAgICAgICBTQVNBZGRyZXNzOyAgICAgICAgICAgICAvKiAwOGggKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICBEaXNjb3ZlcnlTdGF0dXM7ICAgICAgICAvKiAxMGggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBEZXZIYW5kbGU7ICAgICAgICAgICAgICAvKiAxNGggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBQYXJlbnREZXZIYW5kbGU7ICAgICAgICAvKiAxNmggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBFeHBhbmRlckNoYW5nZUNvdW50OyAgICAvKiAxOGggKi8KKyAgICBVMTYgICAgICAgICAgICAgICAgICAgICBFeHBhbmRlclJvdXRlSW5kZXhlczsgICAvKiAxQWggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBOdW1QaHlzOyAgICAgICAgICAgICAgICAvKiAxQ2ggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBTQVNMZXZlbDsgICAgICAgICAgICAgICAvKiAxRGggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBGbGFnczsgICAgICAgICAgICAgICAgICAvKiAxRWggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDQ7ICAgICAgICAgICAgICAvKiAxRmggKi8KK30gRVZFTlRfREFUQV9TQVNfRVhQQU5ERVJfU1RBVFVTX0NIQU5HRSwKKyAgTVBJX1BPSU5URVIgUFRSX0VWRU5UX0RBVEFfU0FTX0VYUEFOREVSX1NUQVRVU19DSEFOR0UsCisgIE1waUV2ZW50RGF0YVNhc0V4cGFuZGVyU3RhdHVzQ2hhbmdlX3QsCisgIE1QSV9QT0lOVEVSIHBNcGlFdmVudERhdGFTYXNFeHBhbmRlclN0YXR1c0NoYW5nZV90OworCisvKiB2YWx1ZXMgZm9yIFJlYXNvbkNvZGUgZmllbGQgb2YgU0FTIEV4cGFuZGVyIFN0YXR1cyBDaGFuZ2UgRXZlbnQgZGF0YSAqLworI2RlZmluZSBNUElfRVZFTlRfU0FTX0VYUF9SQ19BRERFRCAgICAgICAgICAgICAgICAgICAgICAoMHgwMCkKKyNkZWZpbmUgTVBJX0VW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MDAwMDAyMDApCisjZGVmaW5lIE1QSV9FVkVOVF9TQVNfRVhQX0RTX1RBQkxFX0xJTksgICAgICAgICAgICAgICAgICgweDAwMDAwNDAwKQorI2RlZmluZSBNUElfRVZFTlRfU0FTX0VYUF9EU19VTlNVUFBPUlRFRF9ERVZJQ0UgICAgICAgICAoMHgwMDAwMDgwMCkKKworLyogdmFsdWVzIGZvciBGbGFncyBmaWVsZCBvZiBTQVMgRXhwYW5kZXIgU3RhdHVzIENoYW5nZSBFdmVudCBkYXRhICovCisjZGVmaW5lIE1QSV9FVkVOVF9TQVNfRVhQX0ZMQUdTX1JPVVRFX1RBQkxFX0NPTkZJRyAgICAgICgweDAyKQorI2RlZmluZSBNUElfRVZFTlRfU0FTX0VYUF9GTEFHU19DT05GSUdfSU5fUFJPR1JFU1MgICAgICAoMHgwMSkKKworCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKgpAQCAtOTI2LDYgKzk4NiwxMCBAQAogI2RlZmluZSBNUElfRldfRE9XTkxPQURfSVRZUEVfQklPUyAgICAgICAgICAgICAgKDB4MDIpCiAjZGVmaW5lIE1QSV9GV19ET1dOTE9BRF9JVFlQRV9OVkRBVEEgICAgICAgICAgICAoMHgwMykKICNkZWZpbmUgTVBJX0ZXX0RPV05MT0FEX0lUWVBFX0JPT1RMT0FERVIgICAgICAgICgweDA0KQorI2RlZmluZSBNUElfRldfRE9XTkxPQURfSVRZUEVfTUFOVUZBQ1RVUklORyAgICAgKDB4MDYpCisjZGVmaW5lIE1QSV9GV19ET1dOTE9BRF9JVFlQRV9DT05GSUdfMSAgICAgICAgICAoMHgwNykKKyNkZWZpbmUgTVBJX0ZXX0RPV05MT0FEX0lUWVBFX0NPTkZJR18yICAgICAgICAgICgweDA4KQorI2RlZmluZSBNUElfRldfRE9XTkxPQURfSVRZUEVfTUVHQVJBSUQgICAgICAgICAgKDB4MDkpC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ioqKioqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgQ29weXJpZ2h0IDIwMDMgTFNJIExvZ2ljIENvcnBvcmF0aW9uLiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICAqCkBAIC0xNCw3ICsxMyw3IEBACiAjZGVmaW5lIElPUElfSU9DTE9HSU5GT19IX0lOQ0xVREVECiAKICNkZWZpbmUgU0FTX0xPR0lORk9fTkVYVVNfTE9TUwkJMHgzMTE3MDAwMAotI2RlZmluZSBTQVNfTE9HSU5GT19NQVNLCQkJMHhGRkZGMDAwMAorI2RlZmluZSBTQVNfTE9HSU5GT19NQVNLCQkweEZGRkYwMDAwCiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogLyogIElPQyBMT0dJTkZPIGRlZmluZXMsIDB4MDAwMDAwMDAgLSAweDBGRkZGRkZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCkBAIC00MywxMjkgKzQyLDE3MiBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAvKiBJT1AgTE9HSU5GT19DT0RFIGRlZmluZXMsIHZhbGlkIGlmIElPQ19MT0dJTkZPX09SSUdJTkFUT1IgPSBJT1AgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2RlZmluZSBJT1BfTE9HSU5GT19DT0RFX0lOVkFMSURfU0FTX0FERFJFU1MgICAgICAgICAgICAoMHgwMDAxMDAwMCkKLSNkZWZpbmUgSU9QX0xPR0lORk9fQ09ERV9VTlVTRUQyICAgICAgICAgICAgICAgICAgICAgICAgK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qKioqKioqKiovCiAvKiBQTCBMT0dJTkZPX0NPREUgZGVmaW5lcywgdmFsaWQgaWYgSU9DX0xPR0lORk9fT1JJR0lOQVRPUiA9IFBMICAgICAgICAgICAgKi8KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfT1BFTl9GQUlMVVJFICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDAwMTAwMDApCi0jZGVmaW5lIFBMX0xPR19JTkZPX0NPREVfT1BFTl9GQUlMVVJFX05PX0RFU1RfVElNRV9PVVQgICAgICAoMHgwMDAxMDAwMSkKLSNkZWZpbmUgUExfTE9HSU5GT19DT0RFX09QRU5fRkFJTFVSRV9CQURfREVTVElOQVRJT04gICAgICAgICgweDAwMDEwMDExKQotI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfT1BFTl9GQUlMVVJFX1BST1RPQ09MX05PVF9TVVBQT1JURUQgKDB4MDAwMTAwMTMpCi0jZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9PUEVOX0ZBSUxVUkVfU1RQX1JFU09VUkNFU19CU1kgICAgICAoMHgwMDAxMDAxOCkKLSNkZWZpbmUgUExfTE9HSU5GT19DT0RFX09QRU5fRkFJTFVSRV9XUk9OR19ERVNUSU5BVElPTiAgICAgICgweDAwMDEwMDE5KQotI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfT1BFTl9GQUlMVVJFX09SUl9USU1FT1VUICAgICAgICAgICAgKDBYMDAwMTAwMUEpCi0jZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9PUEVOX0ZBSUxVUkVfUEFUSFdBWV9CTE9DS0VEICAgICAgICAoMHgwMDAxMDAxQikKLSNkZWZpbmUgUExfTE9HSU5GT19DT0RFX09QRU5fRkFJTFVSRV9BV1RfTUFYRUQgICAgICAgICAgICAgICgweDAwMDEwMDFDKQotI2RlZmluZSBQTF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09ORklHX0lOVkFMSURfUEFHRV9QSFkgICAgICAgICAgICAgKDB4MDAwRjA2MDApIC8qIEludmFsaWQgUGh5ICovCi0jZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9DT05GSUdfSU5WQUxJRF9QQUdFX05PX09XTkVSICAgICAgICAoMHgwMDBGMDcwMCkgLyogTm8gT3duZXIgRm91bmQgKi8KLSNkZWZpbmUgUExfTE9HSU5GT19DT0RFX0RTQ1ZSWV9TQVRBX0lOSVRfVElNRU9VVCAgICAgICAgICAgICgweDAwMTAwMDAwKQotI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfUkVTRVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDB4MDAxMTAwMDApIC8qIFNlZSBTdWItQ29kZXMgYmVsb3cgKi8KLSNkZWZpbmUgUExfTE9HSU5GT19DT0RFX0FCT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMTIwMDAwKSAvKiBTZWUgU3ViLUNvZGVzIGJlbG93ICovCi0jZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9JT19OT1RfWUVUX0VYRUNVVEVEICAgICAgICAgICAgICAgICAoMHgwMDEzMDAwMCkKLSNkZWZpbmUgUExfTE9HSU5GT19DT0RFX0lPX0VYRUNVVEVEICAgICAgICAgICAgICAgICAgICAgICAgICgweDAwMTQwMDAwKQotI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfUEVSU19SRVNWX09VVF9OT1RfQUZGSUxfT1dORVIgICAgICAgKDB4MDAxNTAwMDApCi0jZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9PUEVOX1RYRE1BX0FCT1JUICAgICAgICAgICAgICAgICAgICAoMHgwMDE2MDAwMCkKLSNkZWZpbmUgUExfTE9HSU5GT19DT0RFX0lPX0RFVklDRV9NSVNTSU5HX0RFTEFZX1JFVFJZICAgICAgICgweDAwMTcwMDAwKQotI2RlZmluZSBQTF9MT0dJTkZPX1NVQl9DT0RFX09QRU5fRkFJTFVSR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DIwMDBCMCkgLyogQ2FuJ3QgZ2V0IGZyYW1lIGZvciBTRVMgY29tbWFuZCAqLwotI2RlZmluZSBQTF9MT0dJTkZPX0NPREVfRU5DTF9NR01UX1NFU19JT19FUlJPUiAgICAgICAgICAgICAgKDB4MDAyMDAwQzApIC8qIEkvTyBleGVjdXRpb24gZXJyb3IgKi8KLSNkZWZpbmUgUExfTE9HSU5GT19DT0RFX0VOQ0xfTUdNVF9TRVNfUkVUUklFU19FWEhBVVNURUQgICAgICgweDAwMjAwMEQwKSAvKiBTRVAgSS9PIHJldHJpZXMgZXhoYXVzdGVkICovCi0jZGVmaW5lIFBMX0xPR0lORk9fQ09ERV9FTkNMX01HTVRfU01QX0ZSQU1FX0FMTE9DX0VSUk9SICAgICAoMHgwMDIwMDBFMCkgLyogQ2FuJ3QgZ2V0IGZyYW1lIGZvciBTTVAgY29tbWFuZCAqLworI2RlZmluZSBQTF9MT0dJTkZPX1NVQl9DT0RFX0lOVkFMSURfU0dMICAgICAgICAgICAgICAgICAgICAgICgweDAwMDAwMjAwKQorI2RlZmluZSBQTF9MT0dJTkZPX1NVQl9DT0RFX1dST05HX1JFTF9PRkZfT1JfRlJBTUVfTEVOR1RIICAgICgweDAwMDAwMzAwKQorI2RlZmluZSBQTF9MT0dJTkZPX1NVQl9DT0RFX0ZSQU1FX1hGRVJfRVJST1IgICAgICAgICAgICAgICAgICgweDAwMDAwNDAwKSAvKiBCaXRzIDAtMyBlbmNvZGUgVHJhbnNwb3J0IFN0YXR1cyBSZWdpc3RlciAob2Zmc2V0IDB4MDgpICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEJpdCAwIGlzIFN0YXR1cyBCaXQgMDogRnJhbWVYZmVyRXJyICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIEJpdCAxIC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AtIElPQ1NUQVRVUyBpbmZvcm1hdGlvbiByZXR1cm5lZCBmcm9tIElPQy4KICAqCUBpb2M6IFBvaW50ZXIgdG8gTVBUX0FEQVBURVIgc3RydWN0dXJlCiAgKglAaW9jX3N0YXR1czogVTMyIElPQ1N0YXR1cyB3b3JkIGZyb20gSU9DCiAgKglAbWY6IFBvaW50ZXIgdG8gTVBUIHJlcXVlc3QgZnJhbWUKICAqCiAgKglSZWZlciB0byBsc2kvbXBpLmguCi0gKi8KKyAqKi8KIHN0YXRpYyB2b2lkCi1tcHRfc3BfaW9jX2luZm8oTVBUX0FEQVBURVIgKmlvYywgdTMyIGlvY19zdGF0dXMsIE1QVF9GUkFNRV9IRFIgKm1mKQorbXB0X2lvY3N0YXR1c19pbmZvKE1QVF9BREFQVEVSICppb2MsIHUzMiBpb2Nfc3RhdHVzLCBNUFRfRlJBTUVfSERSICptZikKIHsKIAl1MzIgc3RhdHVzID0gaW9jX3N0YXR1cyAmIE1QSV9JT0NTVEFUVVNfTUFTSzsKIAljaGFyICpkZXNjID0gTlVMTDsKIAogCXN3aXRjaCAoc3RhdHVzKSB7CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogIENvbW1vbiBJT0NTdGF0dXMgdmFsdWVzIGZvciBhbGwgcmVwbGllcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKwogCWNhc2UgTVBJX0lPQ1NUQVRVU19JTlZBTElEX0ZVTkNUSU9OOiAvKiAweDAwMDEgKi8KIAkJZGVzYyA9ICJJbnZhbGlkIEZ1bmN0aW9uIjsKIAkJYnJlYWs7CkBAIC02MzIyLDg0ICs2NzkwLDE4MCBAQAogCQlkZXNjID0gIkludmFsaWQgU3RhdGUiOwogCQlicmVhazsKIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgQ29uZmlnIElPQ1N0YXR1cyB2YWx1ZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCiAJY2FzZSBNUElfSU9DU1RBVFVTX0NPTkZJR19JTlZBTElEX0FDVElPTjogLyogMHgwMDIwICovCiAJY2FzZSBNUElfSU9DU1RBVFVTX0NPTkZJR19JTlZBTElEX1RZUEU6ICAgLyogMHgwMDIxICovCiAJY2FzZSBNUElfSU9DU1RBVFVTX0NPTkZJR19JTlZBTElEX1BBR0U6ICAgLyogMHgwMDIyICovCiAJY2FzZSBNUElfSU9DU1RBVFVTX0NPTkZJR19JTlZBTElEX0RBVEE6ICAgLyogMHgwMDIzICovCiAJY2FzZSBNUElfSU9DU1RBVFVTX0NPTkZJR19OT19ERUZBVUxUUzogICAgLyogMHgwMDI0ICovCiAJY2FzZSBNUElfSU9DU1RBVFVTX0NPTkZJR19DQU5UX0NPTU1JVDogICAgLyogMHgwMDI1ICovCi0JCS8qIE5vIG1lc3NhZ2UgZm9yIENvbmZpZyBJT0NTdGF0dXMgdmFsdWVzICovCisJCW1wdF9pb2NzdGF0dXNfaW5mb19jb25maWcoaW9jLCBzdGF0dXMsIG1mKTsKIAkJYnJlYWs7CiAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogIFNDU0lJTyBSZXBseSAoU1BJLCBGQ1AsIFNBUykgaW5pdGlhdG9yIHZhbHVlcyAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisvKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg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FzZSBNUElfSU9DU1RBVFVTX1RBUkdFVF9UT09fTVVDSF9XUklURV9EQVRBOiAvKiAweDAwNkUgKi8KKwkJZGVzYyA9ICJUYXJnZXQ6IFRvbyBNdWNoIFdyaXRlIERhdGEiOworCQlicmVhazsKKworCWNhc2UgTVBJX0lPQ1NUQVRVU19UQVJHRVRfSVVfVE9PX1NIT1JUOiAvKiAweDAwNkYgKi8KKwkJZGVzYyA9ICJUYXJnZXQ6IElVIFRvbyBTaG9ydCI7CisJCWJyZWFrOworCisJY2FzZSBNUElfSU9DU1RBVFVTX1RBUkdFVF9BQ0tfTkFLX1RJTUVPVVQ6IC8qIDB4MDA3MCAqLworCQlkZXNjID0gIlRhcmdldDogQUNLIE5BSyBUaW1lb3V0IjsKKwkJYnJlYWs7CisKKwljYXNlIE1QSV9JT0NTVEFUVVNfVEFSR0VUX05BS19SRUNFSVZFRDogLyogMHgwMDcxICovCisJCWRlc2MgPSAiVGFyZ2V0OiBOYWsgUmVjZWl2ZWQiOworCQlicmVhazsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgRmlicmUgQ2hhbm5lbCBEaXJlY3QgQWNjZXNzIHZhbHVlcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisJY2FzZSBNUElfSU9DU1RBVFVTX0ZDX0FCT1JURUQ6IC8qIDB4MDA2NiAqLworCQlkZXNjID0gIkZDOiBBYm9ydGVkIjsKKwkJYnJlYWs7CisKKwljYXNlIE1QSV9JT0NTVEFUVVNfRkNfUlhfSURfSU5WQUxJRDogLyogMHgwMDY3ICovCisJCWRlc2MgPSAiRkM6IFJYIElEIEludmFsaWQiOworCQlicmVhazsKKworCWNhc2UgTVBJX0lPQ1NUQVRVU19GQ19ESURfSU5WQUxJRDogLyogMHgwMDY4ICovCisJCWRlc2MgPSAiRkM6IERJRCBJbnZhbGlkIjsKKwkJYnJlYWs7CisKKwljYXNlIE1QSV9JT0NTVEFUVVNfRkNfTk9ERV9MT0dHRURfT1VUOiAvKiAweDAwNjkgKi8KKwkJZGVzYyA9ICJGQzogTm9kZSBMb2dnZWQgT3V0IjsKKwkJYnJlYWs7CisKKwljYXNlIE1QSV9JT0NTVEFUVVNfRkNfRVhDSEFOR0VfQ0FOQ0VMRUQ6IC8qIDB4MDA2QyAqLworCQlkZXNjID0gIkZDOiBFeGNoYW5nZSBDYW5jZWxlZCI7CisJCWJyZWFrOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qICBMQU4gdmFsdWVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKwljYXNlIE1QSV9JT0NTVEFUVVNfTEFOX0RFVklDRV9OT1RfRk9VTkQ6IC8qIDB4MDA4MCAqLworCQlkZXNjID0gIkxBTjogRGV2aWNlIG5vdCBGb3VuZCI7CisJCWJyZWFrOworCisJY2FzZSBNUElfSU9DU1RBVFVTX0xBTl9ERVZJQ0VfRkFJTFVSRTogLyogMHgwMDgxICovCisJCWRlc2MgPSAiTEFOOiBEZXZpY2UgRmFpbHVyZSI7CisJCWJyZWFrOworCisJY2FzZSBNUElfSU9DU1RBVFVTX0xBTl9UUkFOU01JVF9FUlJPUjogLyogMHgwMDgyICovCisJCWRlc2MgPSAiTEFOOiBUcmFuc21pdCBFcnJvciI7CisJCWJyZWFrOworCisJY2FzZSBNUElfSU9DU1RBVFVTX0xBTl9UUkFOU01JVF9BQk9SVEVEOiAvKiAweDAwODMgKi8KKwkJZGVzYyA9ICJMQU46IFRyYW5zbWl0IEFib3J0ZWQiOworCQlicmVhazsKKworCWNhc2UgTVBJX0lPQ1NUQVRVU19MQU5fUkVDRUlWRV9FUlJPUjogLyogMHgwMDg0ICovCisJCWRlc2MgPSAiTEFOOiBSZWNlaXZlIEVycm9yIjsKKwkJYnJlYWs7CisKKwljYXNlIE1QSV9JT0NTVEFUVVNfTEFOX1JFQ0VJVkVfQUJPUlRFRDogLyogMHgwMDg1ICovCisJCWRlc2MgPSAiTEFOOiBSZWNlaXZlIEFib3J0ZWQiOworCQlicmVhazsKKworCWNhc2UgTVBJX0lPQ1NUQVRVU19MQU5fUEFSVElBTF9QQUNLRVQ6IC8qIDB4MDA4NiAqLworCQlkZXNjID0gIkxBTjogUGFydGlhbCBQYWNrZXQiOworCQlicmVhazsKKworCWNhc2UgTVBJX0lPQ1NUQVRVU19MQU5fQ0FOQ0VMRUQ6IC8qIDB4MDA4NyAqLworCQlkZXNjID0gIkxBTjogQ2FuY2VsZWQiOworCQlicmVhazsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiAgU2VyaWFsIEF0dGFjaGVkIFNDU0kgdmFsdWVzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCisJY2FzZSBNUElfSU9DU1RBVFVTX1NBU19TTVBfUkVRVUVTVF9GQUlMRUQ6IC8qIDB4MDA5MCAqLworCQlkZXNjID0gIlNBUzogU01QIFJlcXVlc3QgRmFpbGVkIjsKKwkJYnJlYWs7CisKKwljYXNlIE1QSV9JT0NTVEFUVVNfU0FTX1NNUF9EQVRBX09WRVJSVU46IC8qIDB4MDA5MCAqLworCQlkZXNjID0gI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FrOworCQlpZiAoKnRhYmxlID09IDApCisJCQlyZXR1cm4gTlVMTDsKKwl9CisJcmV0dXJuIHRhYmxlOworfQorCitzdGF0aWMgaW50IHBzM2F2X3BhcnNlX2V2ZW50X3BhY2tldChjb25zdCBzdHJ1Y3QgcHMzYXZfcmVwbHlfaGRyICpoZHIpCit7CisJdTMyICp0YWJsZTsKKworCWlmIChoZHItPmNpZCAmIFBTM0FWX0VWRU5UX0NNRF9NQVNLKSB7CisJCXRhYmxlID0gcHMzYXZfc2VhcmNoX2NtZF90YWJsZShoZHItPmNpZCwgUFMzQVZfRVZFTlRfQ01EX01BU0spOworCQlpZiAodGFibGUpCisJCQlkZXZfZGJnKCZwczNhdl9kZXYuY29yZSwKKwkJCQkicmVjdiBldmVudCBwYWNrZXQgY2lkOiUwOHggcG9ydDoweCV4IHNpemU6JWRcbiIsCisJCQkJaGRyLT5jaWQsIHBzM2F2X2V2ZW50X2dldF9wb3J0X2lkKGhkci0+Y2lkKSwKKwkJCQloZHItPnNpemUpOworCQllbHNlCisJCQlwcmludGsoS0VSTl9FUlIKKwkJCSAgICAgICAiJXM6IGZhaWxlZCBldmVudCBwYWNrZXQsIGNpZDolMDh4IHNpemU6JWRcbiIsCisJCQkgICAgICAgX19GVU5DVElPTl9fLCBoZHItPmNpZCwgaGRyLT5zaXplKTsKKwkJcmV0dXJuIDE7CS8qIHJlY2VpdmUgZXZlbnQgcGFja2V0ICovCisJfQorCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IHBzM2F2X3NlbmRfY21kX3BrdChjb25zdCBzdHJ1Y3QgcHMzYXZfc2VuZF9oZHIgKnNlbmRfYnVmLAorCQkJICAgICAgc3RydWN0IHBzM2F2X3JlcGx5X2hkciAqcmVjdl9idWYsIGludCB3cml0ZV9sZW4sCisJCQkgICAgICBpbnQgcmVhZF9sZW4pCit7CisJaW50IHJlczsKKwl1MzIgY21kOworCWludCBldmVudDsKKworCWlmICghcHMzYXYuYXZhaWxhYmxlKQorCQlyZX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cnMvc2NzaS9hZHZhbnN5cy5jCkBAIC00NDAzLDcgKzQ0MDMsNyBAQAogICAgICAgICAgICAgICAgICAgICAgICAgQVNDX0RCRzEoMSwKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgImFkdmFuc3lzX2RldGVjdDogcHJvYmluZyBJL08gcG9ydCAweCV4Li4uXG4iLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlvcCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY2hlY2tfcmVnaW9uKGlvcCwgQVNDX0lPQURSX0dBUCkgIT0gMCkgeworCQkJaWYgKCFyZXF1ZXN0X3JlZ2lvbihpb3AsIEFTQ19JT0FEUl9HQVAsICJhZHZhbnN5cyIpKXsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmludGsoCiAiQWR2YW5TeXMgU0NTSTogc3BlY2lmaWVkIEkvTyBQb3J0IDB4JVggaXMgYnVzeVxuIiwgaW9wKTsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBEb24ndCB0cnkgdGhpcyBJL08gcG9ydCB0d2ljZS4gKi8KQEAgLTQ0MTMsNiArNDQxMyw3IEBACiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKAogIkFkdmFuU3lzIFNDU0k6IHNwZWNpZmllZCBJL08gUG9ydCAweCVYIGhhcyBubyBhZGFwdGVyXG4iLCBpb3ApOwogICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIERvbid0IHRyeSB0aGlzIEkvTyBwb3J0IHR3aWNlLiAqLworCQkJICAgIHJlbGVhc2VfcmVnaW9uKGlvcCwgQVNDX0lPQURSX0dBUCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXNjX2lvcG9ydFtpb3BvcnRdID0gMDsKICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGlvcG9ydF90cnlfYWdhaW47CiAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgewpAQCAtNDQzMSw2ICs0NDMyLDcgQEAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqICdpb3BvcnQnIHBhc3QgdGhpcyBib2FyZC4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW9wb3J0Kys7CisJCQkJIHJlbGVhc2VfcmVnaW9uKGlvcCwgQVNDX0lPQURSX0dBUCk7CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnb3RvIGlvcG9ydF90cnlfYWdhaW47CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgICAgICAgICAgfQpAQCAtOTc0MCwxMyArOTc0MiwxNCBAQAogICAgIH0KICAgICBmb3IgKDsgaSA8IEFTQ19JT0FEUl9UQUJMRV9NQVhfSVg7IGkrKykgewogICAgICAgICBpb3BfYmFzZSA9IF9hc2NfZGVmX2lvcF9iYXNlW2ldOwotICAgICAgICBpZiAoY2hlY2tfcmVnaW9uKGlvcF9iYXNlLCBBU0NfSU9BRFJfR0FQKSAhPSAwKSB7CisJaWYgKCFyZXF1ZXN0X3JlZ2lvbihpb3BfYmFzZSwgQVNDX0lPQURSX0dBUCwgImFkdmFuc3lzIikpewogICAgICAgICAgICAgQVNDX0RCRzEoMSwKICAgICAgICAgICAgICAgICJBc2NTZWFyY2hJT1BvcnRBZGRyMTE6IGNoZWNrX3JlZ2lvbigpIGZhaWxlZCBJL08gcG9ydCAweCV4XG4iLAogICAgICAgICAgICAgICAgICAgICAgaW9wX2Jhc2UpOwogICAgICAgICAgICAgY29udGludWU7CiAgICAgICAgIH0KICAgICAgICAgQVNDX0RCRzEoMSwgIkFzY1NlYXJjaElPUG9ydEFkZHIxMTogcHJvYmluZyBJL08gcG9ydCAweCV4XG4iLCBpb3BfYmFzZSk7CisJcmVsZWFzZV9yZWdpb24oaW9wX2Jhc2UsIEFTQ19JT0FEUl9HQVApOwogICAgICAgICBpZiAoQXNjRmluZF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WwgbWFpbGJveCBpcyBmcmVlICovCisJaWYgKG1lZ2FyYWlkX2J1c3l3YWl0X21ib3gocmFpZF9kZXYpICE9IDApIHsKKwkJc3RhdHVzID0gMTsKKwkJZ290byBibG9ja2VkX21haWxib3g7CisJfQorCisJLyogQ29weSBtYWlsYm94IGRhdGEgaW50byBob3N0IHN0cnVjdHVyZSAqLworCW1lbWNweSgoY2FkZHJfdCltYm94LCAoY2FkZHJfdClyYXdfbWJveCwgMTYpOworCW1ib3gtPmNtZGlkCQk9IDB4RkU7CisJbWJveC0+YnVzeQkJPSAxOworCW1ib3gtPnBvbGwJCT0gMDsKKwltYm94LT5hY2sJCT0gMDsKKwltYm94LT5udW1zdGF0dXMJCT0gMDsKKwltYm94LT5zdGF0dXMJCT0gMDsKKworCXdtYigpOworCVdSSU5ET09SKHJhaWRfZGV2LCByYWlkX2Rldi0+bWJveF9kbWEgfCAweDEpOworCisJLyogV2FpdCBmb3IgbWF4aW11bSAxIG1pbiBmb3Igc3RhdHVzIHRvIHBvc3QuCisJICogSWYgdGhlIEZpcm13YXJlIFNVUFBPUlRTIHRoZSBBQk9WRSBDT01NQU5ELAorCSAqIG1ib3gtPmNtZCB3aWxsIGJlIHNldCB0byAwCisJICogZWxzZQorCSAqIHRoZSBmaXJtd2FyZSB3aWxsIHJlamVjdCB0aGUgY29tbWFuZCB3aXRoCisJICogbWJveC0+bnVtc3RhdHVzIHNldCB0byAxCisJICovCisKKwlpID0gMDsKKwlzdGF0dXMgPSAwOworCXdoaWxlICghbWJveC0+bnVtc3RhdHVzICYmIG1ib3gtPmNtZCA9PSAweEZGKSB7CisJCXJtYigpOworCQltc2xlZXAoMSk7CisJCWkrKzsKKwkJaWYgKGkgPiAxMDAwICogNjApIHsKKwkJCXN0YXR1cyA9IDE7CisJCQlicmVhazsKKwkJfQorCX0KKwlpZiAobWJveC0+bnVtc3RhdHVzID09IDEpCisJCXN0YXR1cyA9IDE7IC8qY21kIG5vdCBzdXBwb3J0ZWQqLworCis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KLW9iai0kKENPTkZJR19GQl9SRVRJTkFaMykgICAgICAgICArPSByZXR6M2ZiLm8KIG9iai0kKENPTkZJR19GQl9BTUlHQSkgICAgICAgICAgICArPSBhbWlmYi5vIGMycC5vCiBvYmotJChDT05GSUdfRkJfQVJDKSAgICAgICAgICAgICAgKz0gYXJjZmIubwogb2JqLSQoQ09ORklHX0ZCX0NMUFM3MTFYKSAgICAgICAgICs9IGNscHM3MTF4ZmIubwotb2JqLSQoQ09ORklHX0ZCX0NZQkVSKSAgICAgICAgICAgICs9IGN5YmVyZmIubwogb2JqLSQoQ09ORklHX0ZCX0NZQkVSMjAwMCkgICAgICAgICs9IGN5YmVyMjAwMGZiLm8KIG9iai0kKENPTkZJR19GQl9QTTIpICAgICAgICAgICAgICArPSBwbTJmYi5vCiBvYmotJChDT05GSUdfRkJfUE0zKQkJICArPSBwbTNmYi5vCkBAIC00MywxNyArNDIsMTYgQEAKIG9iai0kKENPTkZJR19GQl9NQlgpCQkgICs9IG1ieC8KIG9iai0kKENPTkZJR19GQl9JODEwKSAgICAgICAgICAgICArPSB2Z2FzdGF0ZS5vCiBvYmotJChDT05GSUdfRkJfTkVPTUFHSUMpICAgICAgICAgKz0gbmVvZmIubyB2Z2FzdGF0ZS5vCi1vYmotJChDT05GSUdfRkJfVklSR0UpICAgICAgICAgICAgKz0gdmlyZ2VmYi5vCiBvYmotJChDT05GSUdfRkJfM0RGWCkgICAgICAgICAgICAgKz0gdGRmeGZiLm8KIG9iai0kKENPTkZJR19GQl9DT05UUk9MKSAgICAgICAgICArPSBjb250cm9sZmIubwogb2JqLSQoQ09ORklHX0ZCX1BMQVRJTlVNKSAgICAgICAgICs9IHBsYXRpbnVtZmIubwogb2JqLSQoQ09ORklHX0ZCX1ZBTEtZUklFKSAgICAgICAgICs9IHZhbGt5cmllZmIubwogb2JqLSQoQ09ORklHX0ZCX0NUNjU1NTApICAgICAgICAgICs9IGNoaXBzZmIubwogb2JqLSQoQ09ORklHX0ZCX0lNU1RUKSAgICAgICAgICAgICs9IGltc3R0ZmIubwotb2JqLSQoQ09ORklHX0ZCX1MzVFJJTykgICAgICAgICAgICs9IFMzdHJpb2ZiLm8KIG9iai0kKENPTkZJR19GQl9GTTIpICAgICAgICAgICAgICArPSBmbTJmYi5vCiBvYmotJChDT05GSUdfRkJfQ1lCTEEpICAgICAgICAgICAgKz0gY3libGFmYi5vCiBvYmotJChDT05GSUdfRkJfVFJJREVOVCkgICAgICAgICAgKz0gdHJpZGVudGZiLm8KK29iai0kKENPTkZJR19GQl9TMykgICAgICAgICAgICAgICArPSBzM2ZiLm8gdmdhc3RhdGUubwogb2JqLSQoQ09ORklHX0ZCX1NUSSkgICAgICAgICAgICAgICs9IHN0aWZiLm8KIG9iai0kKENPTkZJR19GQl9GRkIpICAgICAgICAgICAgICArPSBmZmIubyBzYnVzbGliLm8KIG9iai0kKENPTkZJR19GQl9DRzYpICAgICAgICAgICAgICArPSBjZzYubyBzYnVzbGliLm8KQEAgLTc1LDcgKzczLDYgQEAKIG9iai0kKENPTkZJR19GQl9IUDMwMCkgICAgICAgICAgICArPSBocGZiLm8KIG9iai0kKENPTkZJR19GQl9HMzY0KSAgICAgICAgICAgICArPSBnMzY0ZmIubwogb2JqLSQoQ09ORklHX0ZCX1NBMTEwMCkgICAgICAgICAgICs9IHNhMTEwMGZiLm8KLW9iai0kKENPTkZJR19GQl9TVU4zKSAgICAgICAgICAgICArPSBzdW4zZmIubwogb2JqLSQoQ09ORklHX0ZCX0hJVCkgICAgICAgICAgICAgICs9IGhpdGZiLm8KIG9iai0kKENPTkZJR19GQl9FUFNPTjEzNTUpCSAgKz0gZXBzb24xMzU1ZmIubwogb2JqLSQoQ09ORklHX0ZCX1BWUjIpICAgICAgICAgICAgICs9IHB2cjJmYi5vCkBAIC0xMDAsNiArOTcsNyBAQAogb2JqLSQoQ09ORklHX0ZCX1BOWDQwMDhfRFVNKQkgICs9IHBueDQwMDgvCiBvYmotJChDT05GSUdfRkJfUE5YNDAwOF9EV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AweDFkLCAweDYxLCAweDUzLCAweDY2LCAweDZiLCAweDY4LCAweDc5LCAweDY5LAotICAweDdjLCAweDY5LCAweDdmLCAweDY5LCAweDIyLCAweDYxLCAweDU0LCAweDY1LAotICAweDU2LCAweDY1LCAweDU4LCAweDY1LCAweDY3LCAweDY2LCAweDQxLCAweDYzLAotICAweDI3LCAweDYxLCAweDEzLCAweDQxLCAweDM3LCAweDYyLCAweDZiLCAweDRkLAotICAweDIzLCAweDQzLCAweDUxLCAweDQ5LCAweDc5LCAweDY2LCAweDU0LCAweDQ5LAotICAweDdkLCAweDY2LCAweDM0LCAweDU2LCAweDRmLCAweDYzLCAweDFmLCAweDQyLAotICAweDZiLCAweDRiLCAweDdlLCAweDRkLCAweDE4LCAweDQxLCAweDJhLCAweDQzLAotICAweDdiLCAweDRjLCAweDc0LCAweDRiLCAweDUxLCAweDQ3LCAweDY1LCAweDQ5LAotICAweDI0LCAweDQyLCAweDY4LCAweDQ5LCAweDU2LCAweDQ3LCAweDc1LCAweDRhLAotICAweDc3LCAweDRhLCAweDMxLCAweDQzLCAweDFkLCAweDQxLCAweDcxLCAweDQ5LAotICAweDUzLCAweDQ2LCAweDI5LCAweDQyLCAweDZiLCAweDQ4LCAweDFmLCAweDQxLAotICAweDc5LCAweDQ5LCAweDZmLCAweDQ4LCAweDdjLCAweDQ5LCAweDM4LCAweDQzLAotICAweDdmLCAweDQ5LCAweDVkLCAweDQ2LCAweDIyLCAweDQxLCAweDUzLCAweDQ1LAotICAweDU0LCAweDQ1LCAweDU1LCAweDQ1LCAweDU2LCAweDQ1LCAweDU3LCAweDQ1LAotICAweDU4LCAweDQ1LCAweDI1LCAweDQxLCAweDY3LCAweDQ2LCAweDViLCAweDQ1LAotICAweDQxLCAweDQzLCAweDc4LCAweDQ3LCAweDI3LCAweDQxLCAweDUxLCAweDQ0LAotICAweDEzLCAweDIxLCAweDdkLCAweDQ3LCAweDM3LCAweDQyLCAweDcxLCAweDQ2LAotICAweDZiLCAweDJkLCAweDE0LCAweDIxLCAweDIzLCAweDIzLCAweDdkLCAweDJmLAotICAweDUxLCAweDI5LCAweDYxLCAweDJiLCAweDc5LCAweDQ2LCAweDFkLCAweDIyLAotICAweDU0LCAweDI5LCAweDQ1LCAweDI3LCAweDdkLCAweDQ2LCAweDdmLCAweDQ2LAotICAweDRmLCAweDQzLCAweDJmLCAweDQxLCAweDFmLCAweDIyLCAweDZhLCAweDJiLAotICAweDZiLCAweDJiLCAweDViLCAweDI5LCAweDdlLCAweDJkLCAweDY1LCAweDQ0LAotICAweDE4LCAweDIxLCAweDVlLCAweDI5LCAweDJhLCAweDIzLCAweDQ1LCAweDI2LAotICAweDdiLCAweDJjLCAweDE5LCAweDIxLCAweDc0LCAweDJiLCAweDc1LCAweDJiLAotICAweDUxLCAweDI3LCAweDNmLCAweDI1LCAweDY1LCAweDI5LCAweDQwLCAweDI1LAotICAweDI0LCAweDIyLCAweDQxLCAweDI1LCAweDY4LCAweDI5LCAweDQyLCAweDI1LAotICAweDU2LCAweDI3LCAweDdlLCAweDJiLCAweDc1LCAweDJhLCAweDFjLCAweDIxLAotICAweDc3LCAweDJhLCAweDRmLCAweDI2LCAweDMxLCAweDIzLCAweDZmLCAweDI5LAotICAweDFkLCAweDIxLCAweDMyLCAweDIzLCAweDcxLCAweDI5LCAweDcyLCAweDI5LAotICAweDUzLCAweDI2LCAweDY5LCAweDI4LCAweDI5LCAweDIyLCAweDc1LCAweDI5LAotICAweDZiLCAweDI4LCAweDFmLCAweDIxLCAweDFmLCAweDIxLCAweDZkLCAweDI4LAotICAweDc5LCAweDI5LCAweDJiLCAweDIyLCAweDZmLCAweDI4LCAweDU5LCAweDI2LAotICAweDdjLCAweDI5LCAweDdkLCAweDI5LCAweDM4LCAweDIzLCAweDIxLCAweDIxLAotICAweDdmLCAweDI5LCAweDM5LCAweDIzLCAweDVkLCAweDI2LCAweDc1LCAweDI4LAotICAweDIyLCAweDIxLCAweDc3LCAweDI4LCAweDUzLCAweDI1LCAweDZjLCAweDI3LAotICAweDU0LCAweDI1LCAweDYxLCAweDI2LCAweDU1LCAweDI1LCAweDMwLCAweDIyLAotICAweDU2LCAweDI1LCAweDYzLCAweDI2LCAweDU3LCAweDI1LCAweDcxLCAweDI3LAotICAweDU4LCAweDI1LCAweDdmLCAweDI4LCAweDI1LCAweDIxLCAweDc0LCAweDI3LAotICAweDY3LCAweDI2LCAweDQwLCAweDIzLCAweDViLCAweDI1LCAweDI2LCAweDIxLAotICAweDQxLCAweDIzLCAweDM0LCAweDIyLCAweDc4LCAweDI3LCAweDZiLCAweDI2LAotICAweDI3LCAweDIxLCAweDM1LCAweDIyLCAweDUxLCAweDI0LCAweDdiLCAweDI3LAotICAweDEzLCAweDEsICAweDEzLCAweDEsICAweDdkLCAweDI3LCAweDRjLCAweDksCi0gIDB4MzcsIDB4MjIsIDB4NWIsIDB4YiwgIDB4NzEsIDB4MjYsIDB4NWMsIDB4YiwKLSAgMHg2YiwgMHhkLCAgMHg0NywgMHgyMywgMHgxNCwgMHgxLCAgMHg0ZiwgMHg5LAotICAweDIzLCAweDMsICAweDc1LCAweDI2LCAweDdkLCAweGYsICAweDFjLCAweDIsCi0gIDB4NTEsIDB4OSwgIDB4NTksIDB4MjQsIDB4NjEsIDB4YiwgIDB4NjksIDB4MjUsCi0gIDB4NzksIDB4MjYsIDB4MzQsIDB4NSwgIDB4MWQsIDB4MiwgIDB4NmIsIDB4MjUsCi0gIDB4NTQsIDB4OSwgIDB4MzUsIDB4NSwgIDB4NDUsIDB4NywgIDB4NmQsIDB4MjUsCi0gIDB4N2QsIDB4MjYsIDB4MTYsIDB4MSwgIDB4N2YsIDB4MjYsIDB4NzcsIDB4ZCwKLSAgMHg0ZiwgMHgyMywgMHg3OCwgMHhkLCAgMHgyZiwgMHgyMSwgMHgyNywgMHgzLAotICAweDFmLCAweDIsICAweDU5LCAweDksICAweDZhLCAweGIsICAweDczLCAweDI1LAotICAweDZiLCAweGIsICAweDYzLCAweDI0LCAweDViLCAweDksIC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pZGVvX211dGUoMCk7CS8qIG11dGUgb2ZmICovCisJCWlmICghcmV0dmFsKQorCQkJcHMzZmIuaXNfYmxhbmtlZCA9IDA7CisJCWJyZWFrOworCX0KKwlyZXR1cm4gcmV0dmFsOworfQorCitzdGF0aWMgaW50IHBzM2ZiX2dldF92Ymxhbmsoc3RydWN0IGZiX3ZibGFuayAqdmJsYW5rKQoreworCW1lbXNldCh2YmxhbmssIDAsIHNpemVvZigmdmJsYW5rKSk7CisJdmJsYW5rLT5mbGFncyA9IEZCX1ZCTEFOS19IQVZFX1ZTWU5DOworCXJldHVybiAwOworfQorCitpbnQgcHMzZmJfd2FpdF9mb3JfdnN5bmModTMyIGNydGMpCit7CisJaW50IHJldDsKKwl1NjQgY291bnQ7CisKKwljb3VudCA9IHBzM2ZiLnZibGFua19jb3VudDsKKwlyZXQgPSB3YWl0X2V2ZW50X2ludGVycnVwdGlibGVfdGltZW91dChwczNmYi53YWl0X3ZzeW5jLAorCQkJCQkgICAgICAgY291bnQgIT0gcHMzZmIudmJsYW5rX2NvdW50LAorCQkJCQkgICAgICAgSFogLyAxMCk7CisJaWYgKCFyZXQpCisJCXJldHVybiAtRVRJTUVET1VUOworCisJcmV0dXJuIDA7Cit9CisKK0VYUE9SVF9TWU1CT0xfR1BMKHBzM2ZiX3dhaXRfZm9yX3ZzeW5jKTsKKwordm9pZCBwczNmYl9mbGlwX2N0bChpbnQgb24pCit7CisJaWYgKG9uKSB7CisJCWlmIChhdG9taWNfcmVhZCgmcHMzZmIuZXh0X2ZsaXApID4gMCkgeworCQkJYXRvbWljX2RlYygmcHMzZmIuZXh0X2ZsaXApOworCQl9CisJfSBlbHNlIHsKKwkJYXRvbWljX2luYygmcHMzZmIuZXh0X2ZsaXApOworCX0KK30KKworRVhQT1JUX1NZTUJPTF9HUEwocHMzZmJfZmxpcF9jdGwpOworCisgICAgLyoKKyAgICAgKiBpb2N0bAorICAgICAqLworCitzdGF0aWMgaW50IHBzM2ZiX2lvY3RsKHN0cn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weEZGKSByZXR1cm4gRkFMU0U7CisJIGlmKFNpU19Qci0+U2lTX0VNb2RlSURUYWJsZVsoKk1vZGVJZEluZGV4KV0uRXh0X01vZGVJRCA9PSAweEZGKSByZXR1cm4gZmFsc2U7CiAgICAgICB9CiAKICAgIH0KLSAgIHJldHVybiBUUlVFOworICAgcmV0dXJuIHRydWU7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0xNjk2LDEzICsxNjk2LDEzIEBACiAvKiAgICAgICAgICAgSEVMUEVSOiBMb3dNb2RlVGVzdHMgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotc3RhdGljIEJPT0xFQU4KK3N0YXRpYyBib29sCiBTaVNfRG9Mb3dNb2RlVGVzdChzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QciwgdW5zaWduZWQgc2hvcnQgTW9kZU5vKQogewogICAgdW5zaWduZWQgc2hvcnQgdGVtcCwgdGVtcDEsIHRlbXAyOwogCiAgICBpZigoTW9kZU5vICE9IDB4MDMpICYmIChNb2RlTm8gIT0gMHgxMCkgJiYgKE1vZGVObyAhPSAweDEyKSkKLSAgICAgIHJldHVybiBUUlVFOworICAgICAgcmV0dXJuIHRydWU7CiAgICB0ZW1wID0gU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2Q0LDB4MTEpOwogICAgU2lTX1NldFJlZ09SKFNpU19Qci0+U2lTX1AzZDQsMHgxMSwweDgwKTsKICAgIHRlbXAxID0gU2lTX0dldFJlZyhTaVNfUHItPlNpU19QM2Q0LDB4MDApOwpAQCAtMTcxMiwxMyArMTcxMiwxMyBAQAogICAgU2lTX1NldFJlZyhTaVNfUHItPlNpU19QM2Q0LDB4MTEsdGVtcCk7CiAgICBpZigoU2lTX1ByLT5DaGlwVHlwZSA+PSBTSVNfMzE1SCkgfHwKICAgICAgIChTaVNfUHItPkNoaXBUeX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ByLT5TaVNfUmVmSW5kZXhbUlJUSSArICgqaSldLk1vZGVJRCA9PSBtb2RlaWQ7ICgqaSktLSkgewogICAgICAgaW5mb2ZsYWcgPSBTaVNfUHItPlNpU19SZWZJbmRleFtSUlRJICsgKCppKV0uRXh0X0luZm9GbGFnOwotICAgICAgaWYoaW5mb2ZsYWcgJiBjaGVja21hc2spIHJldHVybiBUUlVFOworICAgICAgaWYoaW5mb2ZsYWcgJiBjaGVja21hc2spIHJldHVybiB0cnVlOwogICAgICAgaWYoKCppKSA9PSAwKSBicmVhazsKICAgIH0KIApAQCAtMjc5LDkgKzI3OSw5IEBACiAgICBmb3IoKCppKSA9IDA7IDsgKCppKSsrKSB7CiAgICAgICBpZihTaVNfUHItPlNpU19SZWZJbmRleFtSUlRJICsgKCppKV0uTW9kZUlEICE9IG1vZGVpZCkgYnJlYWs7CiAgICAgICBpbmZvZmxhZyA9IFNpU19Qci0+U2lTX1JlZkluZGV4W1JSVEkgKyAoKmkpXS5FeHRfSW5mb0ZsYWc7Ci0gICAgICBpZihpbmZvZmxhZyAmIGNoZWNrbWFzaykgcmV0dXJuIFRSVUU7CisgICAgICBpZihpbmZvZmxhZyAmIGNoZWNrbWFzaykgcmV0dXJuIHRydWU7CiAgICB9Ci0gICByZXR1cm4gRkFMU0U7CisgICByZXR1cm4gZmFsc2U7CiB9CiAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC00MDUsNyArNDA1LDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKICNpZmRlZiBTSVMzMDAKLXN0YXRpYyBCT09MRUFOCitzdGF0aWMgYm9vbAogU2lTX0NSMzZCSU9TV29yZDIzYihzdHJ1Y3QgU2lTX1ByaXZhdGUgKlNpU19QcikKIHsKICAgIHVuc2lnbmVkIGNoYXIgICpST01BZGRyID0gU2lTX1ByLT5WaXJ0dWFsUm9tQmFzZTsKQEAgLTQxN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wLAorCQkgICAgICAgc2l6ZW9mKHN0cnVjdCBlY3J5cHRmc19hdXRoX3Rva19saXN0X2l0ZW0pKTsKKwkJa21lbV9jYWNoZV9mcmVlKGVjcnlwdGZzX2F1dGhfdG9rX2xpc3RfaXRlbV9jYWNoZSwKKwkJCQlhdXRoX3Rva19saXN0X2l0ZW0pOworCX0KKwlhdXRoX3Rva19saXN0X2hlYWQtPm5leHQgPSBOVUxMOworfQorCitzdHJ1Y3Qga21lbV9jYWNoZSAqZWNyeXB0ZnNfYXV0aF90b2tfbGlzdF9pdGVtX2NhY2hlOworCisKKy8qKgorICogcGFyc2VfdGFnXzFfcGFja2V0CisgKiBAY3J5cHRfc3RhdDogVGhlIGNyeXB0b2dyYXBoaWMgY29udGV4dCB0byBtb2RpZnkgYmFzZWQgb24gcGFja2V0CisgKiAgICAgICAgICAgICAgY29udGVudHMuCisgKiBAZGF0YTogVGhlIHJhdyBieXRlcyBvZiB0aGUgcGFja2V0LgorICogQGF1dGhfdG9rX2xpc3Q6IGVDcnlwdGZzIHBhcnNlcyBwYWNrZXRzIGludG8gYXV0aGVudGljYXRpb24gdG9rZW5zOworICogICAgICAgICAgICAgICAgIGEgbmV3IGF1dGhlbnRpY2F0aW9uIHRva2VuIHdpbGwgYmUgcGxhY2VkIGF0IHRoZSBlbmQKKyAqICAgICAgICAgICAgICAgICBvZiB0aGlzIGxpc3QgZm9yIHRoaXMgcGFja2V0LgorICogQG5ld19hdXRoX3RvazogUG9pbnRlciB0byBhIHBvaW50ZXIgdG8gbWVtb3J5IHRoYXQgdGhpcyBmdW5jdGlvbgorICogICAgICAgICAgICAgICAgYWxsb2NhdGVzOyBzZXRzIHRoZSBtZW1vcnkgYWRkcmVzcyBvZiB0aGUgcG9pbnRlciB0bworICogICAgICAgICAgICAgICAgTlVMTCBvbiBlcnJvci4gVGhpcyBvYmplY3QgaXMgYWRkZWQgdG8gdGhlCisgKiAgICAgICAgICAgICAgICBhdXRoX3Rva19saXN0LgorICogQHBhY2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IgcmV2OworICAgICAgICBjaGFyIHNpemU7CisgICAgICAgIHNob3J0IG5leHQ7CisgICAgICAgIHNob3J0IHJlczsKKyAgICAgICAgbG9uZyBkZXZJRDsKKyAgICAgICAgdW5zaWduZWQgc2hvcnQgbWFudWZhY3R1cmVyX29mZnNldDsKKyAgICAgICAgdW5zaWduZWQgc2hvcnQgcHJvZHVjdF9vZmZzZXQ7Cit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOworCitzdHJ1Y3QgcGNpX2hlYWRlciB7CisgICAgICAgIGNoYXIgc2lnWzRdOworICAgICAgICBzaG9ydCB2ZW5kb3JJRDsKKyAgICAgICAgc2hvcnQgZGV2aWNlSUQ7CisgICAgICAgIHNob3J0IHZwZERhdGE7CisgICAgICAgIHNob3J0IHNpemU7CisgICAgICAgIGNoYXIgcmV2OworICAgICAgICBjaGFyIGNsYXNzOworICAgICAgICBjaGFyIHN1YmNsYXNzOworICAgICAgICBjaGFyIGludGVyZmFjZTsKKyAgICAgICAgc2hvcnQgY2h1bmtzOworICAgICAgICBjaGFyIHJvbV92ZXJzaW9uX21pbjsKKyAgICAgICAgY2hhciByb21fdmVyc2lvbl9tYWo7CisgICAgICAgIGNoYXIgY29kZXR5cGU7CisgICAgICAgIGNoYXIgbGFzdFJvbTsKKyAgICAgICAgc2hvcnQgcmVzZXJ2ZWQ7Cit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpOworCisvKiBGdW5jdGlvbiBwcm90b3R5cGVzIGZvciBib290c3RyYXBwaW5nICovCitleHRlcm4gdm9pZCB2bWlfaW5pdCh2b2lkKTsKK2V4dGVybiB2b2lkIHZtaV9icmluZ3VwKHZvaWQpOworZXh0ZXJuIHZvaWQgdm1pX2FwcGx5X2Jvb3RfcGFnZV9hbGxvY2F0aW9ucyh2b2lkKTsKKworLyogU3RhdGUgbmVlZGVkIHRvIHN0YXJ0IGFuIGFwcGxpY2F0aW9uIHByb2Nlc3NvciBpbiBhbiBTTVAgc3lzdGVtLiA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hENjQ0NjEpCiAjIGRlZmluZSBPRkZDSElQX05SX0lSUVMgMTgKLSNlbGlmIGRlZmluZWQgKENPTkZJR19TSF9CSUdTVVIpIC8qIG11c3QgYmUgYmVmb3JlIENPTkZJR19IRDY0NDY1ICovCi0jIGRlZmluZSBPRkZDSElQX05SX0lSUVMgNDgKICNlbGlmIGRlZmluZWQoQ09ORklHX0hENjQ0NjUpCiAjIGRlZmluZSBPRkZDSElQX05SX0lSUVMgMTYKLSNlbGlmIGRlZmluZWQgKENPTkZJR19TSF9FQzMxMDQpCi0jIGRlZmluZSBPRkZDSElQX05SX0lSUVMgMTYKICNlbGlmIGRlZmluZWQgKENPTkZJR19TSF9EUkVBTUNBU1QpCiAjIGRlZmluZSBPRkZDSElQX05SX0lSUVMgOTYKICNlbGlmIGRlZmluZWQgKENPTkZJR19TSF9USVRBTikKZGlmZiAtLWdpdCBhL2luY2x1ZGUvYXNtLXNoL2tnZGIuaCBiL2luY2x1ZGUvYXNtLXNoL2tnZGIuaAppbmRleCA3YjI2ZjUzLi4wMDk1YzY2IDEwMDY0NAotLS0gYS9pbmNsdWRlL2FzbS1zaC9rZ2RiLmgKKysrIGIvaW5jbHVkZS9hc20tc2gva2dkYi5oCkBAIC04NSwxMCArODUsMTAgQEAKICNkZWZpbmUgS0dEQl9QUklOVEsoLi4uKSBwcmludGsoIktHREI6ICIgX19WQV9BUkdTX18pCiAKIC8qIEZvcmNlZCBicmVha3BvaW50ICovCi0jZGVmaW5lIEJSRUFLUE9JTlQoKSBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgaWYgKGtnZGJfZW5hYmxlZCkgeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgIGFzbSB2b2xhdGlsZSgidHJhcGEgICAjMHhmZiIpOyAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gIH0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA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bWUpOworCVNFUV9wcmludGYobSwgIiBtYXhfZGVsdGFfbnM6ICAgJWxkXG4iLCBkZXYtPm1heF9kZWx0YV9ucyk7CisJU0VRX3ByaW50ZihtLCAiIG1pbl9kZWx0YV9uczogICAlbGRcbiIsIGRldi0+bWluX2RlbHRhX25zKTsKKwlTRVFfcHJpbnRmKG0sICIgbXVsdDogICAgICAgICAgICVsZFxuIiwgZGV2LT5tdWx0KTsKKwlTRVFfcHJpbnRmKG0sICIgc2hpZnQ6ICAgICAgICAgICVkXG4iLCBkZXYtPnNoaWZ0KTsKKwlTRVFfcHJpbnRmKG0sICIgbW9kZTogICAgICAgICAgICVkXG4iLCBkZXYtPm1vZGUpOworCVNFUV9wcmludGYobSwgIiBuZXh0X2V2ZW50OiAgICAgJUxkIG5zZWNzXG4iLAorCQkgICAodW5zaWduZWQgbG9uZyBsb25nKSBrdGltZV90b19ucyhkZXYtPm5leHRfZXZlbnQpKTsKKworCVNFUV9wcmludGYobSwgIiBzZXRfbmV4dF9ldmVudDogIik7CisJcHJpbnRfbmFtZV9vZmZzZXQobSwgZGV2LT5zZXRfbmV4dF9ldmVudCk7CisJU0VRX3ByaW50ZihtLCAiXG4iKTsKKworCVNFUV9wcmludGYobSwgIiBzZXRfbW9kZTogICAgICAgIik7CisJcHJpbnRfbmFtZV9vZmZzZXQobSwgZGV2LT5zZXRfbW9kZSk7CisJU0VRX3ByaW50ZihtLCAiXG4iKTsKKworCVNFUV9wcmludGYobSwgIiBldmVudF9oYW5kbGVyOiAgIik7CisJcHJpbnRfbmFtZV9vZmZzZXQobSwgZGV2LT5ldmVudF9oYW5kbGVyKTsKKwlTRVFfcHJpbnRmKG0sICJcbiIpOworfQorCitzdGF0aWMgdm9pZCB0aW1lcl9saXN0X3Nob3dfdGlja2RldmljZXMoc3RydWN0IHNlcV9maWxlICptKQoreworCWludCBjcHU7CisKKyNpZmRlZiBDT05GSUdfR0VORVJJQ19DTE9DS0VWRU5UU19CUk9BRENBU1QKKwlwcmlud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WVyCisgKi8KK3Vuc2lnbmVkIGxvbmcgZ2V0X25leHRfdGltZXJfaW50ZXJydXB0KHVuc2lnbmVkIGxvbmcgbm93KQoreworCXR2ZWNfYmFzZV90ICpiYXNlID0gX19nZXRfY3B1X3Zhcih0dmVjX2Jhc2VzKTsKKwl1bnNpZ25lZCBsb25nIGV4cGlyZXM7CisKKwlzcGluX2xvY2soJmJhc2UtPmxvY2spOworCWV4cGlyZXMgPSBfX25leHRfdGltZXJfaW50ZXJydXB0KGJhc2UpOworCXNwaW5fdW5sb2NrKCZiYXNlLT5sb2NrKTsKKworCWlmICh0aW1lX2JlZm9yZV9lcShleHBpcmVzLCBub3cpKQorCQlyZXR1cm4gbm93OworCisJcmV0dXJuIGNtcF9uZXh0X2hydGltZXJfZXZlbnQobm93LCBleHBpcmVzKTsKK30KKworI2lmZGVmIENPTkZJR19OT19JRExFX0haCit1bnNpZ25lZCBsb25nIG5leHRfdGltZXJfaW50ZXJydXB0KHZvaWQpCit7CisJcmV0dXJuIGdldF9uZXh0X3RpbWVyX2ludGVycnVwdChqaWZmaWVzKTsKK30KKyNlbmRpZgorCiAjZW5kaWYKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTgzMiwzMiArODc2LDM1IEBACiAgKgogICogQWNjdW11bGF0ZXMgY3VycmVudCB0aW1lIGludGVydmFsIGFuZCBpbml0aWFsaXplcyBuZXcgY2xvY2tzb3VyY2UKICAqLwotc3RhdGljIGludCBjaGFuZ2VfY2xvY2tzb3VyY2Uodm9pZCkKK3N0YXRpYyB2b2lkIGNoYW5nZV9jbG9ja3NvdXJjZSh2b2lkKQogewogCXN0cnVjdCBjbG9ja3NvdXJjZSAqbmV3OwogCWN5Y2xlX3Qgbm93OwogCXU2NCBuc2VjOwotCW5ldyA9IGNsb2Nrc291cmNlX2dldF9uZXh0KCk7Ci0JaWYgKGNsb2NrICE9IG5ldykgewotCQlub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ZyB0byBBQVJQCiAgKgkJCQkJCW1vZHVsZS4KLSAqICAgICAgICAgICAgICBBZHJpYW4gU3VuLyAKLSAqICAgICAgICAgICAgICBNaWNoYWVsIFp1ZWxzZG9yZmYgICAgICA6ICAgICAgIGZpeCBmb3IgbmV0LjAgcGFja2V0cy4gZG9uJ3QgCisgKiAgICAgICAgICAgICAgQWRyaWFuIFN1bi8KKyAqICAgICAgICAgICAgICBNaWNoYWVsIFp1ZWxzZG9yZmYgICAgICA6ICAgICAgIGZpeCBmb3IgbmV0LjAgcGFja2V0cy4gZG9uJ3QKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsbG93IGlsbGVnYWwgZXRoZXIvdG9rZW50YWxrCi0gKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3J0IGFzc2lnbm1lbnQuIHdlIGxvc2UgYSAKLSAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbGlkIGxvY2FsdGFsayBwb3J0IGFzIGEgCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3J0IGFzc2lnbm1lbnQuIHdlIGxvc2UgYQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFsaWQgbG9jYWx0YWxrIHBvcnQgYXMgYQogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0LgogICoJCUFybmFsZG8gQy4gZGUgTWVsbwk6CUNsZWFudXAsIGluIHByZXBhcmF0aW9uIGZvcgogICoJCQkJCQlzaGFyZWQgc2tiIHN1cHBvcnQgOCkKQEAgLTQ4LDcgKzQ4LDcgQEAKICAqCQltb2RpZnkgaXQgdW5kZXIgdGhlIHRlcm1zIG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQogICoJCWFzIHB1Ymxpc2hlZCBie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C03OTcsNzggKzc5Nyw3OCBAQAogCQkJc2EtPnNhdF9hZGRyLnNfbm9kZSA9IEFUQUREUl9CQ0FTVDsKIAkJCWJyZWFrOwogCi0JICAgICAgICBjYXNlIFNJT0NBVEFMS0RJRkFERFI6Ci0JICAgICAgICBjYXNlIFNJT0NESUZBRERSOgorCQljYXNlIFNJT0NBVEFMS0RJRkFERFI6CisJCWNhc2UgU0lPQ0RJRkFERFI6CiAJCQlpZiAoIWNhcGFibGUoQ0FQX05FVF9BRE1JTikpCiAJCQkJcmV0dXJuIC1FUEVSTTsKIAkJCWlmIChzYS0+c2F0X2ZhbWlseSAhPSBBRl9BUFBMRVRBTEspCiAJCQkJcmV0dXJuIC1FSU5WQUw7CiAJCQlhdGFsa19kZXZfZG93bihkZXYpOwotCQkJYnJlYWs7CQkJCisJCQlicmVhazsKIAogCQljYXNlIFNJT0NTQVJQOgogCQkJaWYgKCFjYXBhYmxlKENBUF9ORVRfQURNSU4pKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVQRVJNOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNhLT5zYXRfZmFtaWx5ICE9IEFGX0FQUExFVEFMSykKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWF0aWYpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUFERFJOT1RBVkFJTDsKKwkJCQlyZXR1cm4gLUVQRVJNOworCQkJaWYgKHNhLT5zYXRfZmFtaWx5ICE9IEFGX0FQUExFVEFMSykKKwkJCQlyZXR1cm4gLUVJTlZBTDsKKwkJCWlmICghYXRpZikKKwkJCQlyZXR1cm4gLUVBRERSTk9UQVZBSUw7CiAKLSAgICAgICAgICAgICAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgICAgICAgICAgICAgKiBmb3Igbm93LCB3ZSBvbmx5IHN1cHBvcnQgcHJveHkgQUFSUCBvbiBFTEFQOwotICAgICAgICAgICAgICAgICAgICAgICAgICogd2Ugc2hvdWxkIGJlIGFibGUgdG8gZG8gaXQgZm9yIExvY2FsVGFsaywgdG9vLgotICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGV2LT50eXBlICE9IEFSUEhSRF9FVEhFUikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FUFJPVE9OT1NVUFBPUlQ7CisJCQkvKgorCQkJICogZm9yIG5vdywgd2Ugb25seSBzdXBwb3J0IHByb3h5IEFBUlAgb24gRUxBUDsKKwkJCSAqIHdlIHNob3VsZCBiZSBhYmxlIHRvIGRvIGl0IGZvciBMb2NhbFRhbGssIHRvby4KKwkJCSAqLworCQkJaWYgKGRldi0+dHlwZSAhPSBBUlBIUkRfRVRIRVIpCisJCQkJcmV0dXJuIC1FUFJPVE9OT1NVUFBPUlQ7CiAKLSAgICAgICAgICAgICAgICAgICAgICAgIC8qCi0gICAgICAgICAgICAgICAgICAgICAgICAgKiBhdGlmIHBvaW50cyB0byB0aGUgY3VycmVudCBpbnRlcmZhY2Ugb24gdGhpcyBuZXR3b3JrOwotICAgICAgICAgICAgICAgICAgICAgICAgICogd2UgYXJlbid0IGNvbmNlcm5lZCBhYm91dCBpdHMgY3VycmVudCBzdGF0dXMgKGF0CisJCQkvKgorCQkJICogYXRpZiBwb2ludHMgdG8gdGhlIGN1cnJlbnQgaW50ZXJmYWNlIG9uIHRoaXMgbmV0d29yazsKKwkJCSAqIHdlIGFyZW4ndCBjb25jZXJuZWQgYWJvdXQgaXRzIGN1cnJlbnQgc3RhdHVzIChhdAogCQkJICogbGVhc3QgZm9yIG5vdyksIGJ1dCBpdCBoYXMgYWxsIHRoZSBzZXR0aW5ncyBhYm91dAogCQkJICogdGhlIG5ldHdvcmsgd2UncmUgZ29pbmcgdG8gcHJvYmUuIENvbnNlcXVlbnRseSwgaXQKIAkJCSAqIG11c3QgZXhpc3QuCi0gICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIGlmICghYXRpZikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FQUREUk5PVEFWQUlMOworCQkJICovCisJCQlpZiAoIWF0aWYpCisJCQkJcmV0dXJuIC1FQUREUk5PVEFWQUlMOwogCi0gICAgICAgICAgICAgICAgICAgICAgICBuciA9IChzdHJ1Y3QgYXRhbGtfbmV0cmFuZ2UgKikmKGF0aWYtPm5ldHMpOwotICAgICAgICAgICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAgICAgICAgICAqIFBoYXNlIDEgaXMgZmluZSBvbiBMb2NhbHRhbGsgYnV0IHdlIGRvbid0IGRvCi0gICAgICAgICAgICAgICAgICAgICAgICAgKiBFdGhlcnRhbGsgcGhhc2UgMS4gQW55b25lIHdhbnRpbmcgdG8gYWRkIGl0IGdvIGFoZWFkLgotICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZGV2LT50eXBlID09IEFSUEhSRF9FVEhFUiAmJiBuci0+bnJfcGhhc2UgIT0gMikKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FUFJPVE9OT1NVUFBPUlQ7Ci0KLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzYS0+c2F0X2FkZHIuc19ub2RlID09IEFUQUREUl9CQ0FTVCB8fAotCQkJICAgIHNhLT5zYXRfYWRkci5zX25vZGUgPT0gMjU0KQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVJTlZBTDsKLQotICAgICAgICAgICAgICAgICAgICAgICAgLyoKLSAgICAgICAgICAgICAgICAgICAgICAgICAqIENoZWNrIGlmIHRoZSBjaG9zZW4gYWRkcmVzcyBpcyB1c2VkLiBJZiBzbyB3ZQotICAgICAgICAgICA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RkcikpIDwgMCkKKwkJCQlyZXR1cm4gLUVBRERSSU5VU0U7CisKKwkJCS8qCisJCQkgKiBXZSBub3cgaGF2ZSBhbiBhZGRyZXNzIG9uIHRoZSBsb2NhbCBuZXR3b3JrLCBhbmQKIAkJCSAqIHRoZSBBQVJQIGNvZGUgd2lsbCBkZWZlbmQgaXQgZm9yIHVzIHVudGlsIHdlIHRha2UgaXQKIAkJCSAqIGRvd24uIFdlIGRvbid0IHNldCB1cCBhbnkgcm91dGVzIHJpZ2h0IG5vdywgYmVjYXVzZQogCQkJICogQVRDUCB3aWxsIGluc3RhbGwgdGhlbSBtYW51YWxseSB2aWEgU0lPQ0FERFJULgotICAgICAgICAgICAgICAgICAgICAgICAgICovCi0gICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKwkJCSAqLworCQkJYnJlYWs7CiAKLSAgICAgICAgICAgICAgICBjYXNlIFNJT0NEQVJQOgotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFjYXBhYmxlKENBUF9ORVRfQURNSU4pKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVQRVJNOwotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNhLT5zYXRfZmFtaWx5ICE9IEFGX0FQUExFVEFMSykKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIC1FSU5WQUw7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWF0aWYpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtRUFERFJOT1RBVkFJTDsKKwkJY2FzZSBTSU9DREFSUDoKKwkJCWlmICghY2FwYWJsZShDQVBfTkVUX0FETUlOKSkKKwkJCQlyZXR1cm4gLUVQRVJNOworCQkJaWYgKHNhLT5zYXRfZmFtaWx5ICE9IEFGX0FQUExFVEFMSykKKwkJCQlyZXR1cm4gLUVJTlZBTDsKKwkJCWlmICghYXRpZikKKwkJCQlyZXR1cm4gLUVBRERSTk9UQ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cG9hX2NsaWVudCAqY2xpZW50KTsKKwl2b2lkICAgICAgICAgICAgKCpwdXQpKGluX2NhY2hlX2VudHJ5ICplbnRyeSk7CisJdm9pZCAgICAgICAgICAgICgqcmVtb3ZlX2VudHJ5KShpbl9jYWNoZV9lbnRyeSAqZGVsRW50cnksCiAJCQkJCXN0cnVjdCBtcG9hX2NsaWVudCAqY2xpZW50ICk7Ci0gICAgICAgIGludCAgICAgICAgICAgICAoKmNhY2hlX2hpdCkoaW5fY2FjaGVfZW50cnkgKmVudHJ5LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cnVjdCBtcG9hX2NsaWVudCAqY2xpZW50KTsKLSAgICAgICAgdm9pZCAgICAgICAgICAgICgqY2xlYXJfY291bnQpKHN0cnVjdCBtcG9hX2NsaWVudCAqY2xpZW50KTsKLSAgICAgICAgdm9pZCAgICAgICAgICAgICgqY2hlY2tfcmVzb2x2aW5nKShzdHJ1Y3QgbXBvYV9jbGllbnQgKmNsaWVudCk7Ci0gICAgICAgIHZvaWQgICAgICAgICAgICAoKnJlZnJlc2gpKHN0cnVjdCBtcG9hX2NsaWVudCAqY2xpZW50KTsKLSAgICAgICAgdm9pZCAgICAgICAgICAgICgqZGVzdHJveV9jYWNoZSkoc3RydWN0IG1wb2FfY2xpZW50ICptcGMpOworCWludCAgICAgICAgICAgICAoKmNhY2hlX2hpdCkoaW5fY2FjaGVfZW50cnkgKmVudHJ5LAorCQkJCSAgICAgc3RydWN0IG1wb2FfY2xpZW50ICpjbGllbnQpOworCXZvaWQgICAgICAgICAgICAoKmNsZWFyX2NvdW50KShzdHJ1Y3QgbXBvYV9jbGllbnQgKmNsaWVudCk7CisJdm9pZCAgICAgICAgICAgICgqY2hlY2tfcmVzb2x2aW5nKShzdHJ1Y3QgbXBvYV9jbGllbnQgKmNsaWVudCk7CisJdm9pZCAgICAgICAgICAgICgqcmVmcmVzaCkoc3RydWN0IG1wb2FfY2xpZW50ICpjbGllbnQpOworCXZvaWQgICAgICAgICAgICAoKmRlc3Ryb3lfY2FjaGUpKHN0cnVjdCBtcG9hX2NsaWVudCAqbXBjKTsKIH07CiAKIHR5cGVkZWYgc3RydWN0IGVnX2NhY2hlX2VudHJ5ewotICAgICAgICBzdHJ1Y3QgICAgICAgICAgICAgICBlZ19jYWNoZV9lbnRyeSAqbmV4dDsKLSAgICAgICAgc3RydWN0ICAgICAgICAgICAgICAgZWdfY2FjaGVfZW50cnkgKnByZXY7Ci0gICAgICAgIHN0cnVjdCAgICAgICAgICAgICAgIHRpbWV2YWwgIHR2OwotICAgICAgICB1aW50OF90ICAgICAgICAgICAgICBNUFNfY3RybF9BVE1fYWRkcltBVE1fRVNBX0xFTl07Ci0gICAgICAgIHN0cnVjdCBhdG1fdmNjICAgICAgICpzaG9ydGN1dDsKLSAgICAgICAgdWludDMyX3QgICAgICAgICAgICAgcGFja2V0c19yY3ZkOwotICAgICAgICB1aW50MTZfdCAgICAgICAgICAgICBlbnRyeV9zdGF0ZTsKLSAgICAgICAgX19iZTMyICAgICAgICAgICAgIGxhdGVzdF9pcF9hZGRyOyAgICAvKiBUaGUgc3JjIElQIGFkZHJlc3Mgb2YgdGhlIGxhc3QgcGFja2V0ICovCi0gICAgICAgIHN0cnVjdCBlZ19jdHJsX2luZm8gIGN0cmxfaW5mbzsKLSAgICAgICAgYXRvbWljX3QgICAgICAgICAgICAgdXNlOworCXN0cnVjdCAgICAgICAgICAgICAgIGVnX2NhY2hlX2VudHJ5ICpuZXh0OworCXN0cnVjdCAgICAgICAgICAgICAgIGVnX2NhY2hlX2VudHJ5ICpwcmV2OworCXN0cnVjdCAgICAgICAgICAgICAgIHRpbWV2YWwgIHR2OworCXVpbnQ4X3QgICAgICAgICAgICAgIE1QU19jdHJsX0FUTV9hZGRyW0FUTV9FU0FfTEVOXTsKKwlzdHJ1Y3QgYXRtX3ZjYyAgICAgICAqc2hvcnRjdXQ7CisJdWludDMyX3QgICAgICAgICAgICAgcGFja2V0c19yY3ZkOworC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iAicmVzb2x2ZWQgICAiOworCQlyZXR1cm4gInJlc29sdmVkICAgIjsKIAkJYnJlYWs7CiAJY2FzZSBJTkdSRVNTX0lOVkFMSUQ6Ci0JICAgICAgICByZXR1cm4gImludmFsaWQgICAgIjsKKwkJcmV0dXJuICJpbnZhbGlkICAgICI7CiAJCWJyZWFrOwogCWNhc2UgSU5HUkVTU19SRUZSRVNISU5HOgotCSAgICAgICAgcmV0dXJuICJyZWZyZXNoaW5nICI7CisJCXJldHVybiAicmVmcmVzaGluZyAiOwogCQlicmVhazsKIAlkZWZhdWx0OgogCSAgICAgICByZXR1cm4gIiI7CkBAIC03NCwxNSArNzQsMTUgQEAKICAqIFJldHVybnMgdGhlIHN0YXRlIG9mIGFuIGVncmVzcyBjYWNoZSBlbnRyeSBhcyBhIHN0cmluZwogICovCiBzdGF0aWMgY29uc3QgY2hhciAqZWdyZXNzX3N0YXRlX3N0cmluZyhpbnQgc3RhdGUpewotICAgICAgICBzd2l0Y2goc3RhdGUpIHsKKwlzd2l0Y2goc3RhdGUpIHsKIAljYXNlIEVHUkVTU19SRVNPTFZFRDoKLQkgICAgICAgIHJldHVybiAicmVzb2x2ZWQgICAiOworCQlyZXR1cm4gInJlc29sdmVkICAgIjsKIAkJYnJlYWs7CiAJY2FzZSBFR1JFU1NfUFVSR0U6Ci0gICAgICAgICAgICAgICAgcmV0dXJuICJwdXJnZSAgICAgICI7CisJCXJldHVybiAicHVyZ2UgICAgICAiOwogCQlicmVhazsKIAljYXNlIEVHUkVTU19JTlZBTElEOgotCSAgICAgICAgcmV0dXJuICJpbnZhbGlkICAgICI7CisJCXJldHVybiAiaW52YWxpZCAgICAiOwogCQlicmVhazsKIAlkZWZhdWx0OgogCSAgICAgICByZXR1cm4gIiI7CkBAIC0xMzUsNyArMTM1LDcgQEAKIAkJcmV0dXJuIDA7CiAJfQogCi0Jc2VxX3ByaW50ZihtLCAiXG5JbnRlcmZhY2UgJWQ6XG5cbiIsIG1wYy0+ZGV2X251bSk7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09IDApCisJaWYgKG5ieXRlcyA9PSAwKQogCQlyZXR1cm4gMDsKIAotICAgICAgICBpZiAobmJ5dGVzID49IFBBR0VfU0laRSkKKwlpZiAobmJ5dGVzID49IFBBR0VfU0laRSkKIAkJbmJ5dGVzID0gUEFHRV9TSVpFLTE7CiAKLSAgICAgICAgcGFnZSA9IChjaGFyICopX19nZXRfZnJlZV9wYWdlKEdGUF9LRVJORUwpOwotICAgICAgICBpZiAoIXBhZ2UpCisJcGFnZSA9IChjaGFyICopX19nZXRfZnJlZV9wYWdlKEdGUF9LRVJORUwpOworCWlmICghcGFnZSkKIAkJcmV0dXJuIC1FTk9NRU07CiAKLSAgICAgICAgZm9yIChwID0gcGFnZSwgbGVuID0gMDsgbGVuIDwgbmJ5dGVzOyBwKyssIGxlbisrKSB7Ci0gICAgICAgICAgICAgICAgaWYgKGdldF91c2VyKCpwLCBidWZmKyspKSB7CisJZm9yIChwID0gcGFnZSwgbGVuID0gMDsgbGVuIDwgbmJ5dGVzOyBwKyssIGxlbisrKSB7CisJCWlmIChnZXRfdXNlcigqcCwgYnVmZisrKSkgewogCQkJZnJlZV9wYWdlKCh1bnNpZ25lZCBsb25nKXBhZ2UpOwogCQkJcmV0dXJuIC1FRkFVTFQ7CiAJCX0KLSAgICAgICAgICAgICAgICBpZiAoKnAgPT0gJ1wwJyB8fCAqcCA9PSAnXG4nKQotICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KKwkJaWYgKCpwID09ICdcMCcgfHwgKnAgPT0gJ1xuJykKKwkJCWJyZWFrOworCX0KIAotICAgICAgICAqcCA9ICdcMCc7CisJKnAgPSAnXDAnOwogCiAJaWYgKCFwYXJzZV9xb3MocGFnZSkpCi0gICAgICAgICAgICAgICAgcHJpbnRrKCJtcG9hOiBwcm9jX21wY193cml0ZTogY291bGQgbm90IHBhcnNlICclcydcbiIsIHBhZ2UpOworCQlwcmludGsoIm1wb2E6IHByb2NfbXBjX3dyaXRlOiBjb3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ogQ2hlY2sgaWYgdGhpcyBpc24ndCBhIHNpbmdsZSBieXRlIG9wdGlvbiAqLwotICAgICAgICAgICAgICAgIGlmIChvcHQgPiBEQ0NQT19NQVhfUkVTRVJWRUQpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvcHRfcHRyID09IG9wdF9lbmQpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gb3V0X2ludmFsaWRfb3B0aW9uOworCQkvKiBDaGVjayBpZiB0aGlzIGlzbid0IGEgc2luZ2xlIGJ5dGUgb3B0aW9uICovCisJCWlmIChvcHQgPiBEQ0NQT19NQVhfUkVTRVJWRUQpIHsKKwkJCWlmIChvcHRfcHRyID09IG9wdF9lbmQpCisJCQkJZ290byBvdXRfaW52YWxpZF9vcHRpb247CiAKLSAgICAgICAgICAgICAgICAgICAgICAgIGxlbiA9ICpvcHRfcHRyKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAobGVuIDwgMykKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBvdXRfaW52YWxpZF9vcHRpb247Ci0gICAgICAgICAgICAgICAgICAgICAgICAvKgotICAgICAgICAgICAgICAgICAgICAgICAgICogUmVtb3ZlIHRoZSB0eXBlIGFuZCBsZW4gZmllbGRzLCBsZWF2aW5nCi0gICAgICAgICAgICAgICAgICAgICAgICAgKiBqdXN0IHRoZSB2YWx1ZSBzaXplCi0gICAgICAgICAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICAgICAgICAgIGxlbiAgICAgLT0gMjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHZhbHVlICAgPSBvcHRfcHRyOwotICAgICAgICAgICAgICAgICAgICAgICAgb3B0X3B0ciArPSBsZW47CisJCQlsZW4gPSAqb3B0X3B0cisrOworCQkJaWYgKGxlbiA8IDMpCisJCQkJZ290byBvdXRfaW52YWxpZF9vcHRpb247CisJCQkvKgorCQkJICogUmVtb3ZlIHRoZSB0eXBlIG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vcG1lbnQgb2YgREVDbmV0IFNvY2tldCBMYS0KIAkJCQkJeWVyIGZvciBMaW51eC4gT25seSBzdXBwb3J0cyBvdXRnb2luZwogCQkJCQljb25uZWN0aW9ucy4KIApAQCAtNzUsMjggKzc1LDI4IEBACiBWZXJzaW9uIDAuMC4zICAgICAyLjEuMTA2ICAgMjUtanVuLTk4ICAgRWR1YXJkbyBNYXJjZWxvIFNlcnJhdAogCQkJCQkoZW1zZXJyYXRAZ2VvY2l0aWVzLmNvbSkKIAkJCQkJXwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIHN1cHBvcnQgZm9yIGluY29taW5nIGNvbm5lY3Rpb25zCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc28gd2UgY2FuIHN0YXJ0IGRldmVsb3Bpbmcgc2VydmVyIGFwcHMKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvbiBMaW51eC4KKwkJCQkJQWRkZWQgc3VwcG9ydCBmb3IgaW5jb21pbmcgY29ubmVjdGlvbnMKKwkJCQkJc28gd2UgY2FuIHN0YXJ0IGRldmVsb3Bpbmcgc2VydmVyIGFwcHMKKwkJCQkJb24gTGludXguCiAJCQkJCS0KIAkJCQkJTW9kdWxlIFN1cHBvcnQKIFZlcnNpb24gMC4wLjQgICAgIDIuMS4xMDkgICAyMS1qdWwtOTggICBFZHVhcmRvIE1hcmNlbG8gU2VycmF0Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZW1zZXJyYXRAZ2VvY2l0aWVzLmNvbSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBzdXBwb3J0IGZvciBYMTFSNi40LiBOb3cgd2UgY2FuIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZSBERUNuZXQgdHJhbnNwb3J0IGZvciBYIG9uIExpbnV4ISEhCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtCisJCQkJICAgICAgIChlbXNlcnJhdEBnZW9jaXRpZXMuY29tKQorCQkJCSAgICAgICBfCisJCQkJCUFkZGVkIHN1cHBvcnQgZm9yIFgxMVI2LjQuIE5vdyB3ZSBjYW4KKwkJCQkJdXNlIERFQ25ldCB0cmFuc3BvcnQgZm9yIFggb24gTGludXghISEKKwkJCQkgICAgICAgLQogVmVyc2lvbiAwLjAuNSAgICAyLjEuMTEwICAgMDEtYXVnLTk4ICAgRWR1YXJkbyBNYXJjZWxvIFNlcnJhdAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGVtc2VycmF0QGdlb2NpdGllcy5jb20pCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZW1vdmVkIGJ1Z3Mgb24gZmxvdyBjb250cm9sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZW1vdmVkIGJ1Z3Mgb24gaW5jb21pbmcgYWNjZXNzZGF0YQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3JkZXIKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0KKwkJCQkgICAgICAgKGVtc2VycmF0QGdlb2NpdGllcy5jb20pCisJCQkJICAgICAgIFJlbW92ZWQgYnVncyBvbiBmbG93IGNvbnRyb2wKKwkJCQkgICAgICAgUmVtb3ZlZCBidWdzIG9uIGluY29taW5nIGFjY2Vzc2RhdGEKKwkJCQkgICAgICAgb3JkZXIKKwkJCQkgICAgICAgLQogVmVyc2lvbiAwLjAuNiAgICAyLjEuMTEwICAgMDctYXVnLTk4ICAgRWR1YXJkbyBNYXJjZWxvIFNlcnJhdAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG5fcmVjdm1zZyBmaXhlcworCQkJCSAgICAgICBkbl9yZWN2bXNnIGZpeGVzCiAKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQYXRyaWNrIEouIENhdWxmaWVsZAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG5fYmluZCBmaXhlcworCQkJCQlQYXRyaWNrIEouIENhdWxmaWVsZAorCQkJCSAgICAgICBkbl9iaW5kIGZpeGVzCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAjaW5jbHVkZSA8bGludXgvbW9kdWxlLmg+CkBAIC0xNjksNyArMTY5LDcgQEAKIAlyZXR1cm4gJmRuX3NrX2hhc2hbZG5fbnRvaHMoc2NwLT5hZGRybG9jKSAmIEROX1NLX0hBU0hfTUFTS107CiB9CiAKLS8qIAorLyoKICAqIFZhbGlkIHBvcnRzIGFyZSB0aG9zZSBncmVhdGVyIHRoYW4gemVybyBhbmQgbm90IGFscmVhZHkgaW4gdXNlLgogICovCiBzdGF0aWMgaW50IGNoZWNrX3BvcnQoX19sZTE2IHBvcnQpCkBAIC0yMTgsNyArMjE4LDcgQEAKIAlCVUdfT04oc2tfaGFzaGVkKHNrKSk7CiAKIAl3cml0ZV9sb2NrX2JoKCZkbl9oYXNoX2xvY2spOwotCQorCiAJaWYgKCFzY3AtPmFkZHJsb2MgJiYgIXBvcnRfYWxsb2Moc2spKQogCQlnb3RvIG91dDsKIApAQCAtNDAwLDcgKzQwMCw3IEBACiAKIAlzayA9IHNrX2hlYWQoJmRuX3dpbGRfc2spOwogCWlmIChzaykgewotCSAgICAgICAJaWYgKHNrLT5za19zdGF0ZSA9PSBUQ1BfTElTVEVOKQorCQlpZiAoc2stPnNrX3N0YXRlID09IFRDUF9MSVNURU4pCiAJCQlzb2NrX2hvbGQoc2spOwogCQllbHNlCiAJCQlzayA9IE5VTEw7CkBAIC01MDAsNyArNTAwLDcgQEAKIAlzY3At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VkcyB0aGlua2luZyBhYm91dAotICAgICAgICAgICAgICAgICAqIHNvbWUgbW9yZS4KLSAgICAgICAgICAgICAgICAgKi8KLSAgICAgICAgICAgICAgICBpZiAobG9jYWwgJiYgZmktPmZpYl9wcmVmc3JjID09IGxvY2FsKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBmaS0+ZmliX2ZsYWdzIHw9IFJUTkhfRl9ERUFEOwotICAgICAgICAgICAgICAgICAgICAgICAgcmV0Kys7Ci0gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChkZXYgJiYgZmktPmZpYl9uaHMpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGludCBkZWFkID0gMDsKKwlmb3JfZmliX2luZm8oKSB7CisJCS8qCisJCSAqIFRoaXMgbWFrZXMgbm8gc2Vuc2UgZm9yIERFQ25ldC4uLi4gd2Ugd2lsbCBhbG1vc3QKKwkJICogY2VydGFpbmx5IGhhdmUgbW9yZSB0aGFuIG9uZSBsb2NhbCBhZGRyZXNzIHRoZSBzYW1lCisJCSAqIG92ZXIgYWxsIG91ciBpbnRlcmZhY2VzLiBJdCBuZWVkcyB0aGlua2luZyBhYm91dAorCQkgKiBzb21lIG1vcmUuCisJCSAqLworCQlpZiAobG9jYWwgJiYgZmktPmZpYl9wcmVmc3JjID09IGxvY2FsKSB7CisJCQlmaS0+ZmliX2ZsYWdzIHw9IFJUTkhfRl9ERUFEOworCQkJcmV0Kys7CisJCX0gZWxzZSBpZiAoZGV2ICYmIGZpLT5maWJfbmhzKSB7CisJCQlpbnQgZGVhZCA9IDA7CiAKLSAgICAgICAgICAgICAgICAgICAgICAgIGNoYW5nZV9uZXh0aG9wcyhmaSkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobmgtPm5oX2ZsYWdzJlJUTkhfRl9ERUFEKQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlYWQrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAobmgtPm5oX2RldiA9PSBkZXYgJiYKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5oLT5uaF9zY29wZSAhPSBzY29wZSkgeworCQkJY2hhbmdlX25leHRob3BzKGZpKSB7CisJCQkJaWYgKG5oLT5uaF9mbGFncyZSVE5IX0ZfREVBRCkKKwkJCQkJZGVhZCsrOworCQkJCWVsc2UgaWYgKG5oLT5uaF9kZXYgPT0gZGV2ICYmCisJCQkJCQluaC0+bmhfc2NvcGUgIT0gc2NvcGUpIHsKIAkJCQkJc3Bpbl9sb2NrX2JoKCZkbl9maWJfbXVsdGlwYXRoX2xvY2spOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5oLT5uaF9mbGFncyB8PSBSVE5IX0ZfREVBRDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaS0+ZmliX3Bvd2VyIC09IG5oLT5uaF9wb3dlcjsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuaC0+bmhfcG93ZXIgPSAwOworCQkJCQluaC0+bmhfZmxhZ3MgfD0gUlROSF9GX0RFQUQ7CisJCQkJCWZpLT5maWJfcG93ZXIgLT0gbmgtPm5oX3Bvd2VyOworCQkJCQluaC0+bmhfcG93ZXIgPSAwOwogCQkJCQlzcGluX3VubG9ja19iaCgmZG5fZmliX211bHRpcGF0aF9sb2NrKTsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWFkKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICAgICAgICAgIH0gZW5kZm9yX25leHRob3BzKGZpKQotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGRlYWQgPT0gZmktPmZpYl9uaHMpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmktPmZpYl9mbGFncyB8PSBSVE5IX0ZfREVBRDsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0Kys7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICB9IGVuZGZvcl9maWJfaW5mbygpOwotICAgICAgICByZXR1cm4gcmV0OworCQkJCQlkZWFkKys7CisJCQkJfQorCQkJfSBlbmRmb3JfbmV4dGhvcHMoZmkpCisJCQlpZiAoZGVhZCA9PSBmaS0+ZmliX25ocykgeworCQkJCWZpLT5maWJfZmxhZ3MgfD0gUlROSF9GX0RFQUQ7CisJCQkJcmV0Kys7CisJCQl9CisJCX0KKwl9IGVuZGZvcl9maWJfaW5mbygpOworCXJldHVybiByZXQ7CiB9CiAKIAogc3RhdGljIGludCBkbl9maWJfc3luY191cChzdHJ1Y3QgbmV0X2RldmljZSAqZGV2KQogewotICAgICAgICBpbnQgcmV0ID0gMDsKKwlpbnQgcmV0ID0gMDsKIAotICAgICAgICBpZiAoIShkZXYtPmZsYWdzJklGRl9VUCkpCi0gICAgICAgICAgICAgICAgcmV0dXJuIDA7CisJaWYgKCEoZGV2LT5mbGFncyZJRkZfVVApKQorCQlyZXR1cm4gMDsKIAotICAgICAgICBmb3JfZmliX2luZm8oKSB7Ci0gICAgICAgICAgICAgICAgaW50IGFsaXZlID0gMDsKKwlmb3JfZmliX2luZm8oKSB7CisJCWludCBhbGl2ZSA9IDA7CiAKLSAgICAgICAgICAgICAgICBjaGFuZ2VfbmV4dGhvcHMoZmkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmICghKG5oLT5uaF9mbGFncyZSVE5IX0ZfREVBRCkpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpdmUrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmgtPm5oX2RldiA9PSBOVUxMIHx8ICEobm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sYWdzICY9IH5SVE5IX0ZfREVBRDsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldCsrOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfSBlbmRmb3JfZmliX2luZm8oKTsKLSAgICAgICAgcmV0dXJuIHJldDsKKwkJaWYgKGFsaXZlID4gMCkgeworCQkJZmktPmZpYl9mbGFncyAmPSB+UlROSF9GX0RFQUQ7CisJCQlyZXQrKzsKKwkJfQorCX0gZW5kZm9yX2ZpYl9pbmZvKCk7CisJcmV0dXJuIHJldDsKIH0KIAogc3RhdGljIHN0cnVjdCBub3RpZmllcl9ibG9jayBkbl9maWJfZG5hZGRyX25vdGlmaWVyID0gewpkaWZmIC0tZ2l0IGEvbmV0L2RlY25ldC9kbl9uZWlnaC5jIGIvbmV0L2RlY25ldC9kbl9uZWlnaC5jCmluZGV4IDczMjJiYjMuLmJmNzAxY2YgMTAwNjQ0Ci0tLSBhL25ldC9kZWNuZXQvZG5fbmVpZ2guYworKysgYi9uZXQvZGVjbmV0L2RuX25laWdoLmMKQEAgLTMsNyArMyw3IEBACiAgKiAgICAgICAgICAgICAgb3BlcmF0aW5nIHN5c3RlbS4gIERFQ25ldCBpcyBpbXBsZW1lbnRlZCB1c2luZyB0aGUgIEJTRCBTb2NrZXQKICAqICAgICAgICAgICAgICBpbnRlcmZhY2UgYXMgdGhlIG1lYW5zIG9mIGNvbW11bmljYXRpb24gd2l0aCB0aGUgdXNlciBsZXZlbC4KICAqCi0gKiAgICAgICAgICAgICAgREVDbmV0IE5laWdoYm91ciBGdW5jdGlvbnMgKEFkamFjZW5jeSBEYXRhYmFzZSBhbmQgCisgKiAgICAgICAgICAgICAgREVDbmV0IE5laWdoYm91ciBGdW5jdGlvbnMgKEFkamFjZW5jeSBEYXRhYmFzZSBhbmQKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPbi1FdGhlcm5ldCBDYWNoZSkKICAqCiAgKiBBdXRob3I6ICAgICAgU3RldmUgV2hpdGVob3VzZSA8U3RldmVXQEFDTS5vcmc+CkBAIC0yNzcsMTkgKzI3NywxOSBAQAogCXN0cnVjdCBkbl9za2JfY2IgKmNiID0gRE5fU0tCX0NCKHNrYik7CiAKIAotICAgICAgICBpZiAoc2tiX2hlYWRyb29tKHNrYikgPCBoZWFkcm9vbSkgewotICAgICAgICAgICAgICAgIHN0cnVjdCBza19idWZmICpza2IyID0gc2tiX3JlYWxsb2NfaGVhZHJvb20oc2tiLCBoZWFkcm9vbSk7Ci0gICAgICAgICAgICAgICAgaWYgKHNrYjIgPT0gTlVMTCkgeworCWlmIChza2JfaGVhZHJvb20oc2tiKSA8IGhlYWRyb29tKSB7CisJCXN0cnVjdCBza19idWZmICpza2IyID0gc2tiX3JlYWxsb2NfaGVhZHJvb20oc2tiLCBoZWFkcm9vbSk7CisJCWlmIChza2IyID09IE5VTEwpIHsKIAkJCWlmIChuZXRfcmF0ZWxpbWl0KCkpCi0gICAgICAgICAgICAgICAgICAgICAgICAJcHJpbnRrKEtFUk5fQ1JJVCAiZG5fc2hvcnRfb3V0cHV0OiBubyBtZW1vcnlcbiIpOwotICAgICAgICAgICAgICAgICAgICAgICAga2ZyZWVfc2tiKHNrYik7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gLUVOT0JVRlM7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGtmcmVlX3NrYihza2IpOwotICAgICAgICAgICAgICAgIHNrYiA9IHNrYjI7CisJCQkJcHJpbnRrKEtFUk5fQ1JJVCAiZG5fc2hvcnRfb3V0cHV0OiBubyBtZW1vcnlcbiIpOworCQkJa2ZyZWVfc2tiKHNrYik7CisJCQlyZXR1cm4gLUVOT0JVRlM7CisJCX0KKwkJa2ZyZWVfc2tiKHNrYik7CisJCXNrYiA9IHNrYjI7CiAJCWlmIChuZXRfcmF0ZWxpbWl0KCkpCi0gICAgICAgICAgICAgICAgCXByaW50ayhLRVJOX0lORk8gIm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QogCQlnb3RvIHJ0YXR0cl9mYWlsdXJlOwotICAgICAgICBpZiAoZmktPmZpYl9uaHMgPT0gMSkgewotICAgICAgICAgICAgICAgIGlmIChmaS0+ZmliX25oLT5uaF9ndykKLSAgICAgICAgICAgICAgICAgICAgICAgIFJUQV9QVVQoc2tiLCBSVEFfR0FURVdBWSwgMiwgJmZpLT5maWJfbmgtPm5oX2d3KTsKLSAgICAgICAgICAgICAgICBpZiAoZmktPmZpYl9uaC0+bmhfb2lmKQotICAgICAgICAgICAgICAgICAgICAgICAgUlRBX1BVVChza2IsIFJUQV9PSUYsIHNpemVvZihpbnQpLCAmZmktPmZpYl9uaC0+bmhfb2lmKTsKLSAgICAgICAgfQotICAgICAgICBpZiAoZmktPmZpYl9uaHMgPiAxKSB7Ci0gICAgICAgICAgICAgICAgc3RydWN0IHJ0bmV4dGhvcCAqbmhwOwotICAgICAgICAgICAgICAgIHN0cnVjdCBydGF0dHIgKm1wX2hlYWQ7Ci0gICAgICAgICAgICAgICAgaWYgKHNrYl90YWlscm9vbShza2IpIDw9IFJUQV9TUEFDRSgwKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gcnRhdHRyX2ZhaWx1cmU7Ci0gICAgICAgICAgICAgICAgbXBfaGVhZCA9IChzdHJ1Y3QgcnRhdHRyICopc2tiX3B1dChza2IsIFJUQV9TUEFDRSgwKSk7CisJaWYgKGZpLT5maWJfbmhzID09IDEpIHsKKwkJaWYgKGZpLT5maWJfbmgtPm5oX2d3KQorCQkJUlRBX1BVVChza2IsIFJUQV9HQVRFV0FZLCAyLCAmZmktPmZpYl9uaC0+bmhfZ3cpOworCQlpZiAoZmktPmZpYl9uaC0+bmhfb2lmKQorCQkJUlRBX1BVVChza2IsIFJUQV9PSUYsIHNpemVvZihpbnQpLCAmZmktPmZpYl9uaC0+bmhfb2lmKTsKKwl9CisJaWYgKGZpLT5maWJfbmhzID4gMSkgeworCQlzdHJ1Y3QgcnRuZXh0aG9wICpuaHA7CisJCXN0cnVjdCBydGF0dHIgKm1wX2hlYWQ7CisJCWlmIChza2JfdGFpbHJvb20oc2tiKSA8PSBSVEFfU1BBQ0UoMCkpCisJCQlnb3RvIHJ0YXR0cl9mYWlsdXJlOworCQltcF9oZWFkID0gKHN0cnVjdCBydGF0dHIgKilza2JfcHV0KHNrYiwgUlRBX1NQQUNFKDApKTsKIAotICAgICAgICAgICAgICAgIGZvcl9uZXh0aG9wcyhmaSkgewotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNrYl90YWlscm9vbShza2IpIDwgUlRBX0FMSUdOKFJUQV9BTElHTihzaXplb2YoKm5ocCkpICsgNCkpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdvdG8gcnRhdHRyX2ZhaWx1cmU7Ci0gICAgICAgICAgICAgICAgICAgICAgICBuaHAgPSAoc3RydWN0IHJ0bmV4dGhvcCAqKXNrYl9wdXQoc2tiLCBSVEFfQUxJR04oc2l6ZW9mKCpuaHApKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBuaHAtPnJ0bmhfZmxhZ3MgPSBuaC0+bmhfZmxhZ3MgJiAweEZGOwotICAgICAgICAgICAgICAgICAgICAgICAgbmhwLT5ydG5oX2hvcHMgPSBuaC0+bmhfd2VpZ2h0IC0gMTsKLSAgICAgICAgICAgICAgICAgICAgICAgIG5ocC0+cnRuaF9pZmluZGV4ID0gbmgtPm5oX29pZjsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmIChuaC0+bmhfZ3cpCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJUQV9QVVQoc2tiLCBSVEFfR0FURVdBWSwgMiwgJm5oLT5uaF9ndyk7Ci0gICAgICAgICAgICAgICAgICAgICAgICBuaHAtPnJ0bmhfbGVuID0gc2tiLT50YWlsIC0gKHVuc2lnbmVkIGNoYXIgKiluaHA7Ci0gICAgICAgICAgICAgICAgfSBlbmRmb3JfbmV4dGhvcHMoZmkpOwotICAgICAgICAgICAgICAgIG1w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Qkuc3RyYXRlZ3kgPSBkbl9kZWZfZGV2X3N0cmF0ZWd5LApAQCAtNDMyLDMyICs0MzIsMzIgQEAKIAkJLmV4dHJhMiA9ICZtYXhfZGVjbmV0X25vX2ZjX21heF9jd25kCiAJfSwKICAgICAgICB7Ci0gICAgICAgICAgICAgICAgLmN0bF9uYW1lID0gTkVUX0RFQ05FVF9NRU0sCi0gICAgICAgICAgICAgICAgLnByb2NuYW1lID0gImRlY25ldF9tZW0iLAotICAgICAgICAgICAgICAgIC5kYXRhID0gJnN5c2N0bF9kZWNuZXRfbWVtLAotICAgICAgICAgICAgICAgIC5tYXhsZW4gPSBzaXplb2Yoc3lzY3RsX2RlY25ldF9tZW0pLAotICAgICAgICAgICAgICAgIC5tb2RlID0gMDY0NCwKLSAgICAgICAgICAgICAgICAucHJvY19oYW5kbGVyID0gJnByb2NfZG9pbnR2ZWMsCi0gICAgICAgICAgICAgICAgLnN0cmF0ZWd5ID0gJnN5c2N0bF9pbnR2ZWMsCi0gICAgICAgIH0sCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICAuY3RsX25hbWUgPSBORVRfREVDTkVUX1JNRU0sCi0gICAgICAgICAgICAgICAgLnByb2NuYW1lID0gImRlY25ldF9ybWVtIiwKLSAgICAgICAgICAgICAgICAuZGF0YSA9ICZzeXNjdGxfZGVjbmV0X3JtZW0sCi0gICAgICAgICAgICAgICAgLm1heGxlbiA9IHNpemVvZihzeXNjdGxfZGVjbmV0X3JtZW0pLAotICAgICAgICAgICAgICAgIC5tb2RlID0gMDY0NCwKLSAgICAgICAgICAgICAgICAucHJvY19oYW5kbGVyID0gJnByb2NfZG9pbnR2ZWMsCi0gICAgICAgICAgICAgICAgLnN0cmF0ZWd5ID0gJnN5c2N0bF9pbnR2ZWMsCi0gICAgICAgIH0sCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICAuY3RsX25hbWUgPSBORVRfREVDTkVUX1dNRU0sCi0gICAgICAgICAgICAgICAgLnByb2NuYW1lID0g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HkKIAkJICogZGlmZmVyZW5jZSBpcyB0aGF0IHJldHVybiB2YWx1ZSBpbiBub24tYmxvY2tpbmcKQEAgLTg3OCwzNiArODc4LDM2IEBACiAgKi8KIHN0YXRpYyBzdHJ1Y3QgaW5ldF9wcm90b3N3IGluZXRzd19hcnJheVtdID0KIHsKLSAgICAgICAgewotICAgICAgICAgICAgICAgIC50eXBlID0gICAgICAgU09DS19TVFJFQU0sCi0gICAgICAgICAgICAgICAgLnByb3RvY29sID0gICBJUFBST1RPX1RDUCwKLSAgICAgICAgICAgICAgICAucHJvdCA9ICAgICAgICZ0Y3BfcHJvdCwKLSAgICAgICAgICAgICAgICAub3BzID0gICAgICAgICZpbmV0X3N0cmVhbV9vcHMsCi0gICAgICAgICAgICAgICAgLmNhcGFiaWxpdHkgPSAtMSwKLSAgICAgICAgICAgICAgICAubm9fY2hlY2sgPSAgIDAsCi0gICAgICAgICAgICAgICAgLmZsYWdzID0gICAgICBJTkVUX1BST1RPU1dfUEVSTUFORU5UIHwKKwl7CisJCS50eXBlID0gICAgICAgU09DS19TVFJFQU0sCisJCS5wcm90b2NvbCA9ICAgSVBQUk9UT19UQ1AsCisJCS5wcm90ID0gICAgICAgJnRjcF9wcm90LAorCQkub3BzID0gICAgICAgICZpbmV0X3N0cmVhbV9vcHMsCisJCS5jYXBhYmlsaXR5ID0gLTEsCisJCS5ub19jaGVjayA9ICAgMCwKKwkJLmZsYWdzID0gICAgICBJTkVUX1BST1RPU1dfUEVSTUFORU5UIHwKIAkJCSAgICAgIElORVRfUFJPVE9TV19JQ1NLLAotICAgICAgICB9LAorCX0sCiAKLSAgICAgICAgewotICAgICAgICAgICAgICAgIC50eXBlID0gICAgICAgU09DS19ER1JBTSwKLSAgICAgICAgICAgICAgICAucHJvdG9jb2wgPSAgIElQUFJPVE9fVURQLAotICAgICAgICAgICAgICAgIC5wcm90ID0gICAgICAgJnVkcF9wcm90LAotICAgICAgICAgICAgICAgIC5vcHMgPSAgICAgICAgJmluZXRfZGdyYW1fb3BzLAotICAgICAgICAgICAgICAgIC5jYXBhYmlsaXR5ID0gLTEsCi0gICAgICAgICAgICAgICAgLm5vX2NoZWNrID0gICBVRFBfQ1NVTV9ERUZBVUxULAotICAgICAgICAgICAgICAgIC5mbGFncyA9ICAgICAgSU5FVF9QUk9UT1NXX1BFUk1BTkVOVCwKKwl7CisJCS50eXBlID0gICAgICAgU09DS19ER1JBTSwKKwkJLnByb3RvY29sID0gICBJUFBST1RPX1VEUCwKKwkJLnByb3QgPSAgICAgICAmdWRwX3Byb3QsCisJCS5vcHMgPSAgICAgICAgJmluZXRfZGdyYW1fb3BzLAorCQkuY2FwYWJpbGl0eSA9IC0xLAorCQkubm9fY2hlY2sgPSAgIFVEUF9DU1VNX0RFRkFVTFQsCisJCS5mbGFncyA9ICAgICAgSU5FVF9QUk9UT1NXX1BFUk1BTkVOVCwKICAgICAgICB9LAotICAgICAgICAKKwogCiAgICAgICAgewotICAgICAgICAgICAgICAgLnR5cGUgPSAgICAgICBTT0NLX1JBVywKLSAgICAgICAgICAgICAgIC5wcm90b2NvbCA9ICAgSVBQUk9UT19JUCwJLyogd2lsZCBjYXJkICovCi0gICAgICAgICAgICAgICAucHJvdCA9ICAgICAgICZyYXdfcHJvdCwKLSAgICAgICAgICAgICAgIC5vcHMgPSAgICAgICAgJmluZXRfc29ja3Jhd19vcHMsCi0gICAgICAgICAgICAgICAuY2FwYWJpbGl0eSA9IENBUF9ORVRfUkFXLAotICAgICAgICAgICAgICAgLm5vX2NoZWNrID0gICBVRFBfQ1NVTV9ERUZBVUxULAotICAgICAgICAgICAgICAgLmZsYWdzID0gICAgICBJTkVUX1BST1RPU1dfUkVVU0UsCisJICAgICAgIC50eXBlID0gICAgICAgU09DS19SQVcsCisJICAgICAgIC5wcm90b2NvbCA9ICAgSVBQUk9UT19JUCwJLyogd2lsZCBjYXJkICovCisJICAgICAgIC5wcm90ID0gICAgICAgJnJhd19wcm90LAorCSAgICAgICAub3BzID0gICAgICAgICZpb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otICAgICAgICAgICAgICAgICAgICAgICAgfQorCQkJfQogCiAJCQlwdXRfY2hpbGQodCwgdG4sIDIqaSwgKHN0cnVjdCBub2RlICopIGxlZnQpOwogCQkJcHV0X2NoaWxkKHQsIHRuLCAyKmkrMSwgKHN0cnVjdCBub2RlICopIHJpZ2h0KTsKQEAgLTg5MCwyMyArODg5LDIzIEBACiAKIHN0YXRpYyB2b2lkIGluc2VydF9sZWFmX2luZm8oc3RydWN0IGhsaXN0X2hlYWQgKmhlYWQsIHN0cnVjdCBsZWFmX2luZm8gKm5ldykKIHsKLSAgICAgICAgc3RydWN0IGxlYWZfaW5mbyAqbGkgPSBOVUxMLCAqbGFzdCA9IE5VTEw7Ci0gICAgICAgIHN0cnVjdCBobGlzdF9ub2RlICpub2RlOworCXN0cnVjdCBsZWFmX2luZm8gKmxpID0gTlVMTCwgKmxhc3QgPSBOVUxMOworCXN0cnVjdCBobGlzdF9ub2RlICpub2RlOwogCi0gICAgICAgIGlmIChobGlzdF9lbXB0eShoZWFkKSkgewotICAgICAgICAgICAgICAgIGhsaXN0X2FkZF9oZWFkX3JjdSgmbmV3LT5obGlzdCwgaGVhZCk7Ci0gICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICAgaGxpc3RfZm9yX2VhY2hfZW50cnkobGksIG5vZGUsIGhlYWQsIGhsaXN0KSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV3LT5wbGVuID4gbGktPnBsZW4pCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOworCWlmIChobGlzdF9lbXB0eShoZWFkKSkgeworCQlobGlzdF9hZGRfaGVhZF9yY3UoJm5ldy0+aGxpc3QsIGhlYWQpOworCX0gZWxzZSB7CisJCWhsaXN0X2Zvcl9lYWNoX2VudHJ5KGxpLCBub2RlLCBoZWFkLCBobGlzdCkgeworCQkJaWYgKG5ldy0+cGxlbiA+IGxpLT5wbGVuKQorCQkJCWJyZWFrOwogCi0gICAgICAgIC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ICs5NDMsNyBAQAogCiAJY3QgPSBpcF9jb25udHJhY2tfYWxsb2Mob3R1cGxlLCBydHVwbGUpOwogCWlmIChjdCA9PSBOVUxMIHx8IElTX0VSUihjdCkpCi0JCXJldHVybiAtRU5PTUVNOwkKKwkJcmV0dXJuIC1FTk9NRU07CiAKIAlpZiAoIWNkYVtDVEFfVElNRU9VVC0xXSkKIAkJZ290byBlcnI7CkBAIC05NzksMTMgKzk3OSwxMyBAQAogCiAJcmV0dXJuIDA7CiAKLWVycjoJCitlcnI6CiAJaXBfY29ubnRyYWNrX2ZyZWUoY3QpOwogCXJldHVybiBlcnI7CiB9CiAKLXN0YXRpYyBpbnQgCi1jdG5ldGxpbmtfbmV3X2Nvbm50cmFjayhzdHJ1Y3Qgc29jayAqY3RubCwgc3RydWN0IHNrX2J1ZmYgKnNrYiwgCitzdGF0aWMgaW50CitjdG5ldGxpbmtfbmV3X2Nvbm50cmFjayhzdHJ1Y3Qgc29jayAqY3RubCwgc3RydWN0IHNrX2J1ZmYgKnNrYiwKIAkJCXN0cnVjdCBubG1zZ2hkciAqbmxoLCBzdHJ1Y3QgbmZhdHRyICpjZGFbXSwgaW50ICplcnJwKQogewogCXN0cnVjdCBpcF9jb25udHJhY2tfdHVwbGUgb3R1cGxlLCBydHVwbGU7CkBAIC0xMDM5LDkgKzEwMzksOSBAQAogCXJldHVybiBlcnI7CiB9CiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKLSAqIEVYUEVDVCAKLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8gCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIEVYUEVDVAorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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aWduZWQgaW50IGxlbjsKIH07Ci0JCisKIHN0YXRpYyB2b2lkIGFzbjFfb3BlbihzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKLSAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICpidWYsCi0gICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50IGxlbikKKwkJICAgICAgdW5zaWduZWQgY2hhciAqYnVmLAorCQkgICAgICB1bnNpZ25lZCBpbnQgbGVuKQogewogCWN0eC0+YmVnaW4gPSBidWY7CiAJY3R4LT5lbmQgPSBidWYgKyBsZW47CkBAIC0xNzIsOSArMTcyLDkgQEAKIHN0YXRpYyB1bnNpZ25lZCBjaGFyIGFzbjFfdGFnX2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwgdW5zaWduZWQgaW50ICp0YWcpCiB7CiAJdW5zaWduZWQgY2hhciBjaDsKLQkKKwogCSp0YWcgPSAwOwotCQorCiAJZG8KIAl7CiAJCWlmICghYXNuMV9vY3RldF9kZWNvZGUoY3R4LCAmY2gpKQpAQCAtMTg1LDIwICsxODUsMjAgQEAKIAlyZXR1cm4gMTsKIH0KIAotc3RhdGljIHVuc2lnbmVkIGNoYXIgYXNuMV9pZF9kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpjbHMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmNvbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqdGFnKQorc3RhdGljIHVuc2lnbmVkIGNoYXIgYXNuMV9pZF9kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCisJCQkJICAgIHVuc2lnbmVkIGludCAqY2xzLAorCQkJCSAgICB1bnNpZ25lZCBpbnQgKmNvbiwKKwkJCQkgICAgdW5zaWduZWQ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ICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKmVvYywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgKmludGVnZXIpCisJCQkJICAgICAgIHVuc2lnbmVkIGNoYXIgKmVvYywKKwkJCQkgICAgICAgdW5zaWduZWQgbG9uZyAqaW50ZWdlcikKIHsKIAl1bnNpZ25lZCBjaGFyIGNoOwogCXVuc2lnbmVkIGludCAgbGVuOwotCQorCiAJaWYgKCFhc24xX29jdGV0X2RlY29kZShjdHgsICZjaCkpCiAJCXJldHVybiAwOwotCQkKKwogCSppbnRlZ2VyID0gY2g7CiAJaWYgKGNoID09IDApIGxlbiA9IDA7CiAJZWxzZSBsZW4gPSAxOwotCQorCiAJd2hpbGUgKGN0eC0+cG9pbnRlciA8IGVvYykgewogCQlpZiAoKytsZW4gPiBzaXplb2YgKHVuc2lnbmVkIGxvbmcpKSB7CiAJCQljdHgtPmVycm9yID0gQVNOMV9FUlJfREVDX0JBRFZBTFVFOwogCQkJcmV0dXJuIDA7CiAJCX0KLQkJCisKIAkJaWYgKCFhc24xX29jdGV0X2RlY29kZShjdHgsICZjaCkpCiAJCQlyZXR1cm4gMDsKLQkJCQorCiAJCSppbnRlZ2VyIDw8PSA4OwogCQkqaW50ZWdlciB8PSBjaDsKIAl9CkBAIC0zODMsMjEgKzM4MywyMSBAQAogfQogCiBzdGF0aWMgdW5zaWduZWQgY2hhciBhc24xX29jdGV0c19kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqZW9jLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKipvY3RldHMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpsZW4pCisJCQkJCXVu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CS8qIFNOTVB2MiBkYXRhIHR5cGVzIGFuZCBlcnJvcnMgKi8KIAl7QVNOMV9VTkksIEFTTjFfQlRTLCBTTk1QX0JJVFNUUn0sCiAJe0FTTjFfQVBMLCBTTk1QX0M2NCwgU05NUF9DT1VOVEVSNjR9LApAQCAtNjQ0LDEzICs2NDQsMTMgQEAKIH07CiAKIHN0YXRpYyB1bnNpZ25lZCBjaGFyIHNubXBfdGFnX2NsczJzeW50YXgodW5zaWduZWQgaW50IHRhZywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50IGNscywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgc2hvcnQgKnN5bnRheCkKKwkJCQkJIHVuc2lnbmVkIGludCBjbHMsCisJCQkJCSB1bnNpZ25lZCBzaG9ydCAqc3ludGF4KQogewogCXN0cnVjdCBzbm1wX2NudiAqY252OwotCQorCiAJY252ID0gc25tcF9jb252OwotCQorCiAJd2hpbGUgKGNudi0+c3ludGF4ICE9IC0xKSB7CiAJCWlmIChjbnYtPnRhZyA9PSB0YWcgJiYgY252LT5jbGFzcyA9PSBjbHMpIHsKIAkJCSpzeW50YXggPSBjbnYtPnN5bnRheDsKQEAgLTY2Miw3ICs2NjIsNyBAQAogfQogCiBzdGF0aWMgdW5zaWduZWQgY2hhciBzbm1wX29iamVjdF9kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNubXBfb2JqZWN0ICoqb2JqKQorCQkJCQlzdHJ1Y3Qgc25tcF9vYmplY3QgKipvYmopCiB7CiAJdW5zaWduZWQgaW50IGNscywgY29uLCB0YWcsIGxlbiwgaWRsZW47CiAJdW5zaWduZWQgc2hvcnQgdHlwZTsKQEAgLTY3MCw0MSArNjcwLDQxIEBACiAJdW5zaWduZWQgbG9uZyAqbHAsICppZDsKIA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2RlIGV4YW1wbGUgaW4gdGhlIGRyYWZ0LgogICovCiBzdGF0aWMgdm9pZCBmYXN0X2NzdW0oX19zdW0xNiAqY3N1bSwKLSAgICAgICAgICAgICAgICAgICAgICBjb25zdCB1bnNpZ25lZCBjaGFyICpvcHRyLAotICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVuc2lnbmVkIGNoYXIgKm5wdHIsCi0gICAgICAgICAgICAgICAgICAgICAgaW50IG9mZnNldCkKKwkJICAgICAgY29uc3QgdW5zaWduZWQgY2hhciAqb3B0ciwKKwkJICAgICAgY29uc3QgdW5zaWduZWQgY2hhciAqbnB0ciwKKwkJICAgICAgaW50IG9mZnNldCkKIHsKIAl1bnNpZ25lZCBjaGFyIHNbNF07CiAKQEAgLTg5MywzMCArODkzLDMwIEBACiAJKmNzdW0gPSBjc3VtX2ZvbGQoY3N1bV9wYXJ0aWFsKHMsIDQsIH5jc3VtX3VuZm9sZCgqY3N1bSkpKTsKIH0KIAotLyogCisvKgogICogTWFuZ2xlIElQIGFkZHJlc3MuCiAgKiAJLSBiZWdpbiBwb2ludHMgdG8gdGhlIHN0YXJ0IG9mIHRoZSBzbm1wIG1lc3NnYWUKICAqICAgICAgLSBhZGRyIHBvaW50cyB0byB0aGUgc3RhcnQgb2YgdGhlIGFkZHJlc3MKICAqLwogc3RhdGljIGlubGluZSB2b2lkIG1hbmdsZV9hZGRyZXNzKHVuc2lnbmVkIGNoYXIgKmJlZ2luLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKmFkZHIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RydWN0IG9jdDFfbWFwICptYXAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX19zdW0xNiAqY2hlY2spCisJCQkJICB1bnNpZ25lZCBjaGFyICphZGRyLAorCQkJCSAgY29uc3Qgc3RydWN0IG9jdDFfbWFwICptYXAsCisJCQkJICBf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ZnJlZSgoKm9iaiktPmlkKTsKIAkJa2ZyZWUoKm9iaik7CiAJfQogCWtmcmVlKG9iaik7Ci0JCisKIAlpZiAoIWFzbjFfZW9jX2RlY29kZSgmY3R4LCBlb2MpKQogCQlyZXR1cm4gMDsKLQkJCisKIAlyZXR1cm4gMTsKIH0KIApAQCAtMTE4NiwxMiArMTE4NiwxMiBAQAogICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotLyogCisvKgogICogU05NUCB0cmFuc2xhdGlvbiByb3V0aW5lLgogICovCiBzdGF0aWMgaW50IHNubXBfdHJhbnNsYXRlKHN0cnVjdCBpcF9jb25udHJhY2sgKmN0LAotICAgICAgICAgICAgICAgICAgICAgICAgICBlbnVtIGlwX2Nvbm50cmFja19pbmZvIGN0aW5mbywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNrX2J1ZmYgKipwc2tiKQorCQkJICBlbnVtIGlwX2Nvbm50cmFja19pbmZvIGN0aW5mbywKKwkJCSAgc3RydWN0IHNrX2J1ZmYgKipwc2tiKQogewogCXN0cnVjdCBpcGhkciAqaXBoID0gKCpwc2tiKS0+bmguaXBoOwogCXN0cnVjdCB1ZHBoZHIgKnVkcGggPSAoc3RydWN0IHVkcGhkciAqKSgoX19iZTMyICopaXBoICsgaXBoLT5paGwpOwpAQCAtMTIxMywxMiArMTIxMywxMiBAQAogCQltYXAuZnJvbSA9IE5PQ1QxKCZjdC0+dHVwbGVoYXNoW0lQX0NUX0RJUl9SRVBMWV0udHVwbGUuc3JjLmlwKTsKIAkJbWFwLnRvID0gTk9DVDEoJmN0LT50dXBsZWhhc2hbSVBfQ1RfRElSX09SSUdJTkFMXS50dXBsZS5kc3QuaXApOwogCX0KLQkKKwogCWlmIChtYXAuZnJvbSA9PSBtYXAudG8pCiAJCXJldHVybiBORl9BQ0NFUFQ7Ci0JCisKIAlpZiAoIXNub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bG9jX251bGxfYmluZGluZ19jb25maXJtZWQoY3QsIGluZm8sCi0JCQkJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBob29rbnVtKTsKKwkJCQkJCQkJICAgaG9va251bSk7CiAJCQllbHNlIGlmIChob29rbnVtID09IE5GX0lQX0xPQ0FMX0lOKQogCQkJCS8qIExPQ0FMX0lOIGhvb2sgZG9lc24ndCBoYXZlIGEgY2hhaW4hICAqLwogCQkJCXJldCA9IGFsbG9jX251bGxfYmluZGluZyhjdCwgaW5mbywgaG9va251bSk7CkBAIC0xNzksMTAgKzE3OSwxMCBAQAogCiBzdGF0aWMgdW5zaWduZWQgaW50CiBpcF9uYXRfaW4odW5zaWduZWQgaW50IGhvb2tudW0sCi0gICAgICAgICAgc3RydWN0IHNrX2J1ZmYgKipwc2tiLAotICAgICAgICAgIGNvbnN0IHN0cnVjdCBuZXRfZGV2aWNlICppbiwKLSAgICAgICAgICBjb25zdCBzdHJ1Y3QgbmV0X2RldmljZSAqb3V0LAotICAgICAgICAgIGludCAoKm9rZm4pKHN0cnVjdCBza19idWZmICopKQorCSAgc3RydWN0IHNrX2J1ZmYgKipwc2tiLAorCSAgY29uc3Qgc3RydWN0IG5ldF9kZXZpY2UgKmluLAorCSAgY29uc3Qgc3RydWN0IG5ldF9kZXZpY2UgKm91dCwKKwkgIGludCAoKm9rZm4pKHN0cnVjdCBza19idWZmICopKQogewogCXVuc2lnbmVkIGludCByZXQ7CiAJX19iZTMyIGRhZGRyID0gKCpwc2tiKS0+bmguaXBoLT5kYWRkcjsKQEAgLTI3Nyw5ICsyNzcsOSBAQAogCiAJY3QgPSBpcF9jb25udHJhY2tfZ2V0KCpwc2tiLCAmY3RpbmZvKTsKIAlpZiAoY3QgJiYgdGVzdF9iaXQoSVBTX1NFUV9BREpVU1RfQklULCAmY3QtPnN0YXR1cykpIHsKLQkgICAgICAgIERFQlVHUCgiaXBfbmF0X3N0YW5kYWxvbmU6IGFkanVzdGluZyBzZXF1ZW5j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GlwaC0+c2FkZHIpLCBzcG9ydCwgCisJCWhhc2h2YWwgPSBqaGFzaF8yd29yZHMobnRvaGwoaXBoLT5zYWRkciksIHNwb3J0LAogCQkJCSAgICAgICBjb25maWctPmhhc2hfaW5pdHZhbCk7CiAJCWJyZWFrOwogCWNhc2UgQ0xVU1RFUklQX0hBU0hNT0RFX1NJUF9TUFRfRFBUOgpAQCAtMjk3LDggKzI5Nyw4IEBACiAJcmV0dXJuIHRlc3RfYml0KGhhc2ggLSAxLCAmY29uZmlnLT5sb2NhbF9ub2Rlcyk7CiB9CiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKLSAqIElQVEFCTEVTIFRBUkdFVCAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogSVBUQUJMRVMgVEFSR0VUCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKIHN0YXRpYyB1bnNpZ25lZCBpbnQKQEAgLTMyMSw3ICszMjEsNyBAQAogCWlmIChtYXJrID09IE5VTEwpIHsKIAkJcHJpbnRrKEtFUk5fRVJSICJDTFVTVEVSSVA6IG5vIGNvbm50cmFjayFcbiIpOwogCQkJLyogRklYTUU6IG5lZWQgdG8gZHJvcCBpbnZhbGlkIG9uZXMsIHNpbmNlIHJlcGxpZXMKLQkJCSAqIHRvIG91dGdvaW5nIGNvbm5lY3Rpb25zIG9mIG90aGVyIG5vZGVzIHdpbGwgYmUgCisJCQkgKiB0byBvdXRnb2luZyBjb25uZWN0aW9ucyBvZiBvdGhlciBub2RlcyB3aWxsIGJlCiAJCQkgKiBtYXJrZWQgYXMgSU5WQUxJRCAqLwogCQlyZXR1cm4gTkZfRFJPUDsKIAl9CkBAIC0zMjksMTEgKzMyOSwxMSBAQA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aG9va19tYXNrKQogewogCXN0cnVjdCBpcHRfY2x1c3RlcmlwX3RndF9pbmZvICpjaXBpbmZvID0gdGFyZ2luZm87CiAJY29uc3Qgc3RydWN0IGlwdF9lbnRyeSAqZSA9IGVfdm9pZDsKQEAgLTQzNyw3ICs0MzcsNyBAQAogCQkJCXJldHVybiAwOwogCQkJfQogCi0JCQljb25maWcgPSBjbHVzdGVyaXBfY29uZmlnX2luaXQoY2lwaW5mbywgCisJCQljb25maWcgPSBjbHVzdGVyaXBfY29uZmlnX2luaXQoY2lwaW5mbywKIAkJCQkJCQllLT5pcC5kc3Quc19hZGRyLCBkZXYpOwogCQkJaWYgKCFjb25maWcpIHsKIAkJCQlwcmludGsoS0VSTl9XQVJOSU5HICJDTFVTVEVSSVA6IGNhbm5vdCBhbGxvY2F0ZSBjb25maWdcbiIpOwpAQCAtNDgzLDggKzQ4Myw4IEBACiB9OwogCiAKLS8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiAKLSAqIEFSUCBNQU5HTElORyBDT0RFIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBBUlAgTUFOR0xJTkcgQ09ERQogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCiAvKiBoYXJkY29kZWQgZm9yIDQ4Yml0IGV0aGVybmV0IGFuZCAzMmJpdCBpcHY0IGFkZHJlc3NlcyAqLwpAQCAtNDk2LDcgKzQ5Niw3IEBACiB9IF9fYXR0cmlidXRlX18gKChwYWNrZWQpKTsKIAogI2lmZGVmIENMVVNURVJJUF9ERUJVRwotc3RhdGljIHZvaWQgYXJwX3ByaW50KHN0cnVjdCBhcnBfcGF5bG9hZCAqcGF5bG9hZCkgCitzdGF0aWMgdm9pZCBhcnBfcHJpbn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VEVSSVAgY2FzZQogCSAqIHRoaXMgd291bGRuJ3Qgd29yaywgc2luY2Ugd2UgZGlkbid0IHN1YnNjcmliZSB0aGUgbWNhc3QgZ3JvdXAgb24KIAkgKiBvdGhlciBpbnRlcmZhY2VzICovCkBAIC01NzcsOCArNTc3LDggQEAKIAkucHJpb3JpdHkgPSAtMQogfTsKIAotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAotICogUFJPQyBESVIgSEFORExJTkcgCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqIFBST0MgRElSIEhBTkRMSU5HCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKICNpZmRlZiBDT05GSUdfUFJPQ19GUwpAQCAtNjQwLDcgKzY0MCw3IEBACiB7CiAJc3RydWN0IGNsdXN0ZXJpcF9zZXFfcG9zaXRpb24gKmlkeCA9IChzdHJ1Y3QgY2x1c3RlcmlwX3NlcV9wb3NpdGlvbiAqKXY7CiAKLQlpZiAoaWR4LT5wb3MgIT0gMCkgCisJaWYgKGlkeC0+cG9zICE9IDApCiAJCXNlcV9wdXRjKHMsICcsJyk7CiAKIAlzZXFfcHJpbnRmKHMsICIldSIsIGlkeC0+Yml0KTsKQEAgLTcxNSw3ICs3MTUsNyBAQAogCXJldHVybiBzaXplOwogfQogCi1zdGF0aWMgc3RydWN0IGZpbGVfb3BlcmF0aW9ucyBjbHVzdGVyaXBfcHJvY19mb3BzID0geworc3RhdGljIGNvbnN0IHN0cnVjdCBmaWxlX29wZXJhdGlvbnMgY2x1c3RlcmlwX3Byb2NfZm9wcyA9IHsKIAkub3duZXIJID0gVEhJU19NT0RVTEUsCiAJLm9wZW4JID0gY2x1c3RlcmlwX3Byb2Nfb3BlbiwKIAkucm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RmaWx0ZXIvbmZfbmF0X3NubXBfYmFzaWMuYworKysgYi9uZXQvaXB2NC9uZXRmaWx0ZXIvbmZfbmF0X3NubXBfYmFzaWMuYwpAQCAtMTUwLDggKzE1MCw4IEBACiB9OwogCiBzdGF0aWMgdm9pZCBhc24xX29wZW4oc3RydWN0IGFzbjFfY3R4ICpjdHgsCi0gICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqYnVmLAotICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCBsZW4pCisJCSAgICAgIHVuc2lnbmVkIGNoYXIgKmJ1ZiwKKwkJICAgICAgdW5zaWduZWQgaW50IGxlbikKIHsKIAljdHgtPmJlZ2luID0gYnVmOwogCWN0eC0+ZW5kID0gYnVmICsgbGVuOwpAQCAtMTg2LDkgKzE4Niw5IEBACiB9CiAKIHN0YXRpYyB1bnNpZ25lZCBjaGFyIGFzbjFfaWRfZGVjb2RlKHN0cnVjdCBhc24xX2N0eCAqY3R4LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpjbHMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmNvbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqdGFnKQorCQkJCSAgICB1bnNpZ25lZCBpbnQgKmNscywKKwkJCQkgICAgdW5zaWduZWQgaW50ICpjb24sCisJCQkJICAgIHVuc2lnbmVkIGludCAqdGFnKQogewogCXVuc2lnbmVkIGNoYXIgY2g7CiAKQEAgLTIwNyw4ICsyMDcsOCBAQAogfQogCiBzdGF0aWMgdW5zaWduZWQgY2hhciBhc24xX2xlbmd0aF9kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpkZWYsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICpsZW4pCisJCQkJCXVuc2lnbmVkIGludCAqZGVmLAorCQkJCQl1bnNpZ25lZCBpbnQgKmxlbikKIHsKIAl1bnNpZ25lZCBjaGFyIGNoLCBjbnQ7CiAKQEAgLTIzOSwxMCArMjM5LDEwIEBACiB9CiAKIHN0YXRpYyB1bnNpZ25lZCBjaGFyIGFzbjFfaGVhZGVyX2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICoqZW9jLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqY2xzLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqY29uLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqdGFnKQorCQkJCQl1bnNpZ25lZCBjaGFyICoqZW9jLAorCQkJCQl1bnNpZ25lZCBpbnQgKmNscywKKwkJCQkJdW5zaWduZWQgaW50ICpjb24sCisJCQkJCXVuc2lnbmVkIGludCAqdGFnKQogewogCXVuc2lnbmVkIGludCBkZWYsIGxlbjsKIApAQCAtMjk3LDggKzI5Nyw4IEBACiB9CiAKIHN0YXRpYyB1bnNpZ25lZCBjaGFyIGFzbjFfbG9uZ19kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKmVvYywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG9uZyAqaW50ZWdlcikKKwkJCQkgICAgICB1bnNpZ25lZCBjaGFyICplb2MsCisJCQkJICAgICAgbG9uZyAqaW50ZWdlcikKIHsKIAl1bnNpZ25lZCBjaGFyIGNoOwogCXVuc2lnbmVkIGludCAgbGVuOwpAQCAtMzI1LDggKzMyNSw4IEBACiB9CiAKIHN0YXRpYyB1bnNpZ25lZCBjaGFyIGFzbjFfdWludF9kZWNvZGUoc3RydWN0IGFzbjFfY3R4ICpjdHgsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKmVvYywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgaW50ICppbnRlZ2VyKQorCQkJCSAgICAgIHVuc2lnbmVkIGNoYXIgKmVvYywKKwkJCQkgICAgICB1bnNpZ25lZCBpbnQgKmludGVnZXIpCiB7CiAJdW5zaWduZWQgY2hhciBjaDsKIAl1bnNpZ25lZCBpbnQgIGxlbjsKQEAgLTM1NCw4ICszNTQsOCBAQAogfQogCiBzdGF0aWMgdW5zaWduZWQgY2hhciBhc24xX3Vsb25nX2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKmVvYywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgKmludGVnZXIpCisJCQkJICAgICAgIHVuc2lnbmVkIGNoYXIgKmVvYywKKwkJCQkgICAgICAgdW5zaWduZWQgbG9uZyAqaW50ZWdlcikKIHsKIAl1bnNpZ25lZCBjaGFyIGNoOwogCXVuc2lnbmVkIGludCAgbGVuOwpAQCAtMzgzLDkgKzM4Myw5IEBACiB9CiAKIHN0YXRpYyB1bnNpZ25lZCBjaGFyIGFzbjFfb2N0ZXRzX2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBjaGFyICplb2MsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqKm9jdGV0cywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBpbnQgKmxlbikKKwkJCQkJdW5zaWduZWQgY2hhciAqZW9jLAorCQkJCQl1bnNpZ25lZCBjaGFyICoqb2N0ZXRzLAorCQkJCQl1bnNpZ25lZCBpbnQgKmxlbikKIHsKIAl1bnNpZ25lZCBjaGFyICpwdHI7CiAKQEAgLTQxMSw3ICs0MTEsNyBAQAogfQogCiBzdGF0aWMgdW5zaWduZWQgY2hhciBhc24xX3N1YmlkX2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgKnN1YmlkKQorCQkJCSAgICAgICB1bnNpZ25lZCBsb25nICpzdWJpZCkKIHsKIAl1bnNpZ25lZCBjaGFyIGNoOwogCkBAIC00MjgsOSArNDI4LDkgQEAKIH0KIAogc3RhdGljIHVuc2lnbmVkIGNoYXIgYXNuMV9vaWRfZGVjb2RlKHN0cnVjdCBhc24xX2N0eCAqY3R4LAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKmVvYywKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nICoqb2lkLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCAqbGVuKQorCQkJCSAgICAgdW5zaWduZWQgY2hhciAqZW9jLAorCQkJCSAgICAgdW5zaWduZWQgbG9uZyAqKm9pZCwKKwkJCQkgICAgIHVuc2lnbmVkIGludCAqbGVuKQogewogCXVuc2lnbmVkIGxvbmcgc3ViaWQ7CiAJdW5zaWduZWQgaW50ICBzaXplOwpAQCAtNjExLDkgKzYxMSw5IEBACiAjZGVmaW5lIFNFUlJfRU9NICAgIDIKIAogc3RhdGljIGlubGluZSB2b2lkIG1hbmdsZV9hZGRyZXNzKHVuc2lnbmVkIGNoYXIgKmJlZ2luLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGNoYXIgKmFkZHIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RydWN0IG9jdDFfbWFwICptYXAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX19zdW0xNiAqY2hlY2spOworCQkJCSAgdW5zaWduZWQgY2hhciAqYWRkciwKKwkJCQkgIGNvbnN0IHN0cnVjdCBvY3QxX21hcCAqbWFwLAorCQkJCSAgX19zdW0xNiAqY2hlY2spOwogc3RydWN0IHNubXBfY252CiB7CiAJdW5zaWduZWQgaW50IGNsYXNzOwpAQCAtNjQ0LDggKzY0NCw4IEBACiB9OwogCiBzdGF0aWMgdW5zaWduZWQgY2hhciBzbm1wX3RhZ19jbHMyc3ludGF4KHVuc2lnbmVkIGludCB0YWcsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGludCBjbHMsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIHNob3J0ICpzeW50YXgpCisJCQkJCSB1bnNpZ25lZCBpbnQgY2xzLAorCQkJCQkgdW5zaWduZWQgc2hvcnQgKnN5bnRheCkKIHsKIAlzdHJ1Y3Qgc25tcF9jbnYgKmNudjsKIApAQCAtNjYyLDcgKzY2Miw3IEBACiB9CiAKIHN0YXRpYyB1bnNpZ25lZCBjaGFyIHNubXBfb2JqZWN0X2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qgc25tcF9vYmplY3QgKipvYmopCisJCQkJCXN0cnVjdCBzbm1wX29iamVjdCAqKm9iaikKIHsKIAl1bnNpZ25lZCBpbnQgY2xzLCBjb24sIHRhZywgbGVuLCBpZ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gICAgICAgICAgICBjb25zdCB1bnNpZ25lZCBjaGFyICpvcHRyLAotICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHVuc2lnbmVkIGNoYXIgKm5wdHIsCi0gICAgICAgICAgICAgICAgICAgICAgaW50IG9mZnNldCkKKwkJICAgICAgY29uc3QgdW5zaWduZWQgY2hhciAqb3B0ciwKKwkJICAgICAgY29uc3QgdW5zaWduZWQgY2hhciAqbnB0ciwKKwkJICAgICAgaW50IG9mZnNldCkKIHsKIAl1bnNpZ25lZCBjaGFyIHNbNF07CiAKQEAgLTg5OSw5ICs4OTksOSBAQAogICogICAgICAtIGFkZHIgcG9pbnRzIHRvIHRoZSBzdGFydCBvZiB0aGUgYWRkcmVzcwogICovCiBzdGF0aWMgaW5saW5lIHZvaWQgbWFuZ2xlX2FkZHJlc3ModW5zaWduZWQgY2hhciAqYmVnaW4sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdW5zaWduZWQgY2hhciAqYWRkciwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHJ1Y3Qgb2N0MV9tYXAgKm1hcCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX3N1bTE2ICpjaGVjaykKKwkJCQkgIHVuc2lnbmVkIGNoYXIgKmFkZHIsCisJCQkJICBjb25zdCBzdHJ1Y3Qgb2N0MV9tYXAgKm1hcCwKKwkJCQkgIF9fc3VtMTYgKmNoZWNrKQogewogCWlmIChtYXAtPmZyb20gPT0gTk9DVDEoYWRkcikpIHsKIAkJdV9pbnQzMl90IG9sZDsKQEAgLTkxNCw3ICs5MTQsNyBAQAogCQkvKiBVcGRhdGUgVURQIGNoZWNrc3VtIGlmIGJlaW5nIHVzZWQgKi8KIAkJaWYgKCpjaGVjaykgewogCQkJZmFzdF9jc3VtKGNoZWNrLAotCQkJICAgICAgICAgICZtYXAtPmZyb20sICZtYXAtPnRvLCBhZGRyIC0gYmVnaW4pOworCQkJCSAgJm1hcC0+ZnJvbSwgJm1hcC0+dG8sIGFkZHIgLSBiZWdpbik7CiAKIAkJfQogCkBAIC05MjUsOSArOTI1LDkgQEAKIH0KIAogc3RhdGljIHVuc2lnbmVkIGNoYXIgc25tcF90cmFwX2RlY29kZShzdHJ1Y3QgYXNuMV9jdHggKmN0eCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RydWN0IHNubXBfdjFfdHJhcCAqdHJhcCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RydWN0IG9jdDFfbWFwICptYXAsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fc3VtMTYgKmNoZWNrKQorCQkJCSAgICAgIHN0cnVjdCBzbm1wX3YxX3RyYXAgKnRyYXAsCisJCQkJICAgICAgY29uc3Qgc3RydWN0IG9jdDFfbWFwICptYXAsCisJCQkJICAgICAgX19zdW0xNiAqY2hlY2spCiB7CiAJdW5zaWduZWQgaW50IGNscywgY29uLCB0YWcsIGxlbjsKIAl1bnNpZ25lZCBjaGFyICplbmQ7CkBAIC0xMDE5LDkgKzEwMTksOSBAQAogICogKEFuZCB0aGlzIGlzIHRoZSBmdWNraW5nICdiYXNpYycgbWV0aG9kKS4KICAqLwogc3RhdGljIGludCBzbm1wX3BhcnNlX21hbmdsZSh1bnNpZ25lZCBjaGFyICptc2csCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVfaW50MTZfdCBsZW4sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHN0cnVjdCBvY3QxX21hcCAqbWFwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX3N1bTE2ICpjaGVjaykKKwkJCSAgICAgdV9pbnQxNl90IGxlbiwKKwkJCSAgICAgY29uc3Qgc3RydWN0IG9jdDFfbWFwICptYXAsCisJCQkgICAgIF9fc3VtMTYgKmNoZWNrKQogewogCXVuc2lnbmVkIGNoYXIgKmVvY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AgICAgICAgICAgICAgIG9mZnMgPSB0IC0gY2EtPmJpY19LOworCWVsc2UKKwkJb2ZmcyA9IHQgLSBjYS0+YmljX0s7CiAKIAkvKiBjL3J0dCAqICh0LUspXjMgKi8KIAlkZWx0YSA9IChjdWJlX3J0dF9zY2FsZSAqIG9mZnMgKiBvZmZzICogb2ZmcykgPj4gKDEwKzMqQklDVENQX0haKTsKLSAgICAgICAgaWYgKHQgPCBjYS0+YmljX0spICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJLyogYmVsb3cgb3JpZ2luKi8KLSAgICAgICAgICAgICAgICBiaWNfdGFyZ2V0ID0gY2EtPmJpY19vcmlnaW5fcG9pbnQgLSBkZWx0YTsKLSAgICAgICAgZWxzZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAkvKiBhYm92ZSBvcmlnaW4qLwotICAgICAgICAgICAgICAgIGJpY190YXJnZXQgPSBjYS0+YmljX29yaWdpbl9wb2ludCArIGRlbHRhOworCWlmICh0IDwgY2EtPmJpY19LKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCS8qIGJlbG93IG9yaWdpbiovCisJCWJpY190YXJnZXQgPSBjYS0+YmljX29yaWdpbl9wb2ludCAtIGRlbHRhOworCWVsc2UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAJLyogYWJvdmUgb3JpZ2luKi8KKwkJYmljX3RhcmdldCA9IGNhLT5iaWNfb3JpZ2luX3BvaW50ICsgZGVsdGE7CiAKLSAgICAgICAgLyogY3ViaWMgZnVuY3Rpb24gLSBjYWxjIGJpY3RjcF9jbnQqLwotICAgICAgICBpZiAoYmljX3RhcmdldCA+IGN3bmQpIHsKKwkvKiBjdWJpYyBmdW5jdGlvbiAtIGNhbGMgYmljdGNwX2NudCovCisJaWYgKGJpY190YXJnZXQgPiBjd25kKSB7CiAJCWNhLT5jbnQgPSBjd25kIC8gKGJpY190YXJnZXQgLSBjd25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ICAgIDogJWRcbiIKLQkgICAgICAgICAgICAgICJDb3B5IG1vZGUgICAgICAgICA6ICVodVxuIgotCSAgICAgICAgICAgICAgIkNvcHkgcmFuZ2UgICAgICAgIDogJXVcbiIKLQkgICAgICAgICAgICAgICJRdWV1ZSBsZW5ndGggICAgICA6ICV1XG4iCi0JICAgICAgICAgICAgICAiUXVldWUgbWF4LiBsZW5ndGggOiAldVxuIgorCQkgICAgICAiUGVlciBQSUQgICAgICAgICAgOiAlZFxuIgorCQkgICAgICAiQ29weSBtb2RlICAgICAgICAgOiAlaHVcbiIKKwkJICAgICAgIkNvcHkgcmFuZ2UgICAgICAgIDogJXVcbiIKKwkJICAgICAgIlF1ZXVlIGxlbmd0aCAgICAgIDogJXVcbiIKKwkJICAgICAgIlF1ZXVlIG1heC4gbGVuZ3RoIDogJXVcbiIKIAkJICAgICAgIlF1ZXVlIGRyb3BwZWQgICAgIDogJXVcbiIKIAkJICAgICAgIk5ldGZpbHRlciBkcm9wcGVkIDogJXVcbiIsCi0JICAgICAgICAgICAgICBwZWVyX3BpZCwKLQkgICAgICAgICAgICAgIGNvcHlfbW9kZSwKLQkgICAgICAgICAgICAgIGNvcHlfcmFuZ2UsCi0JICAgICAgICAgICAgICBxdWV1ZV90b3RhbCwKLQkgICAgICAgICAgICAgIHF1ZXVlX21heGxlbiwKKwkJICAgICAgcGVlcl9waWQsCisJCSAgICAgIGNvcHlfbW9kZSwKKwkJICAgICAgY29weV9yYW5nZSwKKwkJICAgICAgcXVldWVfdG90YWwsCisJCSAgICAgIHF1ZXVlX21heGxlbiwKIAkJICAgICAgcXVldWVfZHJvcHBlZCwKIAkJICAgICAgcXVldWVfdXNlcl9kcm9wcGVkKTsKIAogCXJlYWRfdW5sb2NrX2JoKCZxdWV1ZV9sb2NrKTsKLQkKKwogCSpzdGFydCA9IGJ1ZmZlciArIG9mZnNldDsKIAlsZW4gLT0gb2Zmc2V0OwogCWlmIChsZW4gPiBsZW5ndGgpCkBAIC02NjUsMTAg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QpICB8fAotICAgICAgICAgICAgICAgICAobmV4dGhkciA9PSBJUFBST1RPX0VTUCkgICAgICAgfHwKLSAgICAgICAgICAgICAgICAgKG5leHRoZHIgPT0gSVBQUk9UT19BSCkgICAgICAgIHx8Ci0gICAgICAgICAgICAgICAgIChuZXh0aGRyID09IElQUFJPVE9fTk9ORSkgICAgICB8fAotICAgICAgICAgICAgICAgICAobmV4dGhkciA9PSBJUFBST1RPX0RTVE9QVFMpICk7CisJcmV0dXJuICggKG5leHRoZHIgPT0gSVBQUk9UT19IT1BPUFRTKSAgIHx8CisJCSAobmV4dGhkciA9PSBJUFBST1RPX1JPVVRJTkcpICAgfHwKKwkJIChuZXh0aGRyID09IElQUFJPVE9fRlJBR01FTlQpICB8fAorCQkgKG5leHRoZHIgPT0gSVBQUk9UT19FU1ApICAgICAgIHx8CisJCSAobmV4dGhkciA9PSBJUFBST1RPX0FIKSAgICAgICAgfHwKKwkJIChuZXh0aGRyID09IElQUFJPVE9fTk9ORSkgICAgICB8fAorCQkgKG5leHRoZHIgPT0gSVBQUk9UT19EU1RPUFRTKSApOwogfQogCiAvKiBSZXR1cm5zIHdoZXRoZXIgbWF0Y2hlcyBydWxlIG9yIG5vdC4gKi8KQEAgLTEyMCw5ICsxMjAsOSBAQAogI2RlZmluZSBGV0lOVihib29sLGludmZsZykgKChib29sKSBeICEhKGlwNmluZm8tPmludmZsYWdzICYgaW52ZmxnKSkKIAogCWlmIChGV0lOVihpcHY2X21hc2tlZF9hZGRyX2NtcCgmaXB2Ni0+c2FkZHIsICZpcDZpbmZvLT5zbXNrLAotCSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmaXA2aW5mby0+c3JjKSwgSVA2VF9JTlZfU1JDSVApCisJCQkJICAgICAgICZpcDZpbmZvLT5zcmMpLCBJUDZUX0lOVl9TUkNJUCkKIAkgICAgfHwgRldJTlYoaXB2Nl9tYXNrZWRfYWRkcl9jbXAoJmlwdjYtPmRhZGRyLCAmaXA2aW5mby0+ZG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ICAgICAgICAgICAgICAgIGludCBoZHJsZW47CisJd2hpbGUgKG5leHRoZHIgIT0gTkVYVEhEUl9GUkFHTUVOVCkgeworCQlzdHJ1Y3QgaXB2Nl9vcHRfaGRyIGhkcjsKKwkJaW50IGhkcmxlbjsKIAogCQlpZiAoIWlwdjZfZXh0X2hkcihuZXh0aGRyKSkgewogCQkJcmV0dXJuIC0xOwogCQl9Ci0gICAgICAgICAgICAgICAgaWYgKGxlbiA8IChpbnQpc2l6ZW9mKHN0cnVjdCBpcHY2X29wdF9oZHIpKSB7CisJCWlmIChsZW4gPCAoaW50KXNpemVvZihzdHJ1Y3QgaXB2Nl9vcHRfaGRyKSkgewogCQkJREVCVUdQKCJ0b28gc2hvcnRcbiIpOwogCQkJcmV0dXJuIC0xOwogCQl9Ci0gICAgICAgICAgICAgICAgaWYgKG5leHRoZHIgPT0gTkVYVEhEUl9OT05FKSB7CisJCWlmIChuZXh0aGRyID09IE5FWFRIRFJfTk9ORSkgewogCQkJREVCVUdQKCJuZXh0IGhlYWRlciBpcyBub25lXG4iKTsKIAkJCXJldHVybiAtMTsKIAkJfQotICAgICAgICAgICAgICAgIGlmIChza2JfY29weV9iaXRzKHNrYiwgc3RhcnQsICZoZHIsIHNpemVvZihoZHIpKSkKLSAgICAgICAgICAgICAgICAgICAgICAgIEJVRygpOwotICAgICAgICAgICAgICAgIGlmIChuZXh0aGRyID09IE5FWFRIRFJfQVVUSCkKLSAgICAgICAgICAgICAgICAgICAgICAgIGhkcmxlbiA9IChoZHIuaGRybGVuKzIpPDwyOwotICAgICAgICAgICAgICAgIGVsc2UKLSAgICAgICAgICAgICAgICAgICAgICAgIGhkcmxlbiA9IGlwdjZfb3B0bGVuKCZoZHIpOworCQlpZiAoc2tiX2NvcHlfYml0cyhza2IsIHN0YXJ0LCAmaGRyLCBzaXplb2YoaGRyKSkpCisJCQlCVUcoKTsKKwkJaWYgKG5leHRoZHIgPT0gTkVYVEhEUl9BVVRIKQorCQkJaGRybGVuID0gKG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ZjsKLSAgICAgICAgaW50IGNvdW50ID0gMCwgbDsKLSAgICAgICAgb2ZmX3QgYmVnaW4gPSAwOworCWludCBjb3VudCA9IDAsIGw7CisJb2ZmX3QgYmVnaW4gPSAwOwogCXVuc2lnbmVkIGxvbmcgZmxhZ3M7CiAKIAlzcGluX2xvY2tfaXJxc2F2ZSgmaXJjb21tX3R0eS0+aGJfc3BpbmxvY2ssIGZsYWdzKTsKQEAgLTEzNzAsMjUgKzEzNzAsMjUgQEAKIAkJaWYgKHNlbGYtPm1hZ2ljICE9IElSQ09NTV9UVFlfTUFHSUMpCiAJCQlicmVhazsKIAotICAgICAgICAgICAgICAgIGwgPSBpcmNvbW1fdHR5X2xpbmVfaW5mbyhzZWxmLCBidWYgKyBjb3VudCk7Ci0gICAgICAgICAgICAgICAgY291bnQgKz0gbDsKLSAgICAgICAgICAgICAgICBpZiAoY291bnQrYmVnaW4gPiBvZmZzZXQrbGVuKQotICAgICAgICAgICAgICAgICAgICAgICAgZ290byBkb25lOwotICAgICAgICAgICAgICAgIGlmIChjb3VudCtiZWdpbiA8IG9mZnNldCkgewotICAgICAgICAgICAgICAgICAgICAgICAgYmVnaW4gKz0gY291bnQ7Ci0gICAgICAgICAgICAgICAgICAgICAgICBjb3VudCA9IDA7Ci0gICAgICAgICAgICAgICAgfQotCQkJCQorCQlsID0gaXJjb21tX3R0eV9saW5lX2luZm8oc2VsZiwgYnVmICsgY291bnQpOworCQljb3VudCArPSBsOworCQlpZiAoY291bnQrYmVnaW4gPiBvZmZzZXQrbGVuKQorCQkJZ290byBkb25lOworCQlpZiAoY291bnQrYmVnaW4gPCBvZmZzZXQpIHsKKwkJCWJlZ2luICs9IGNvdW50OworCQkJY291bnQgPSAwOworCQl9CisKIAkJc2VsZiA9IChzdHJ1Y3QgaXJjb21tX3R0eV9jYiAqKSBoYXNoYmluX2dldF9uZXh0KGlyY29tbV90dHkpOwotICAgICAgICB9Ci0gICAgICAgICplb2YgPSAxOworCX0KKwkqZW9mID0gMTsKIGRvbmU6CiAJc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmaXJjb21tX3R0eS0+aGJfc3BpbmxvY2ssIGZsYWdzKTsKIAotICAgICAgICBpZiAob2Zmc2V0ID49IGNvdW50K2JlZ2luKQotICAgICAgICAgICAgICAgIHJldHVybiAwOwotICAgICAgICAqc3RhcnQgPSBidWYgKyAob2Zmc2V0LWJlZ2luKTsKLSAgICAgICAgcmV0dXJuICgobGVuIDwgYmVnaW4rY291bnQtb2Zmc2V0KSA/IGxlbiA6IGJlZ2luK2NvdW50LW9mZnNldCk7CisJaWYgKG9mZnNldCA+PSBjb3VudCtiZWdpbikKKwkJcmV0dXJuIDA7CisJKnN0YXJ0ID0gYnVmICsgKG9mZnNldC1iZWdpbik7CisJcmV0dXJuICgobGVuIDwgYmVnaW4rY291bnQtb2Zmc2V0KSA/IGxlbiA6IGJlZ2luK2NvdW50LW9mZnNldCk7CiB9CiAjZW5kaWYgLyogQ09ORklHX1BST0NfRlMgKi8KIApkaWZmIC0tZ2l0IGEvbmV0L2lyZGEvaXJjb21tL2lyY29tbV90dHlfYXR0YWNoLmMgYi9uZXQvaXJkYS9pcmNvbW0vaXJjb21tX3R0eV9hdHRhY2guYwppbmRleCA5OWY1ZWRkLi44MjQzMDlkIDEwMDY0NAotLS0gYS9uZXQvaXJkYS9pcmNvbW0vaXJjb21tX3R0eV9hdHRhY2guYworKysgYi9uZXQvaXJkYS9pcmNvbW0vaXJjb21tX3R0eV9hdHRhY2guYwpAQCAtMSwzNSArMSwzNCBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogICAgICAgICAgICAgICAgCisgKgogICogRmlsZW5hbWU6ICAgICAgaXJjb21tX3R0eV9hdHRhY2guYwotICogVmVyc2lvbjogICAgICAgCisgKiBWZXJzaW9uOgogICogRGVzY3JpcHRpb246ICAgQ29kZSBmb3IgYXR0YWNoaW5nIHRoZ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Y29sIik7IAorTU9EVUxFX0RFU0NSSVBUSU9OKCJUaGUgTGludXggSXJEQSBMQU4gcHJvdG9jb2wiKTsKIE1PRFVMRV9MSUNFTlNFKCJHUEwiKTsKIAogbW9kdWxlX3BhcmFtKGV0aCwgYm9vbCwgMCk7CmRpZmYgLS1naXQgYS9uZXQvaXJkYS9pcmxhbi9pcmxhbl9ldGguYyBiL25ldC9pcmRhL2lybGFuL2lybGFuX2V0aC5jCmluZGV4IGIwY2NjNDUuLjY3MmFiM2YgMTAwNjQ0Ci0tLSBhL25ldC9pcmRhL2lybGFuL2lybGFuX2V0aC5jCisrKyBiL25ldC9pcmRhL2lybGFuL2lybGFuX2V0aC5jCkBAIC0xLDggKzEsOCBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogICAgICAgICAgICAgICAgCisgKgogICogRmlsZW5hbWU6ICAgICAgaXJsYW5fZXRoLmMKLSAqIFZlcnNpb246ICAgICAgIAotICogRGVzY3JpcHRpb246ICAgCisgKiBWZXJzaW9uOgorICogRGVzY3JpcHRpb246CiAgKiBTdGF0dXM6ICAgICAgICBFeHBlcmltZW50YWwuCiAgKiBBdXRob3I6ICAgICAgICBEYWcgQnJhdHRsaSA8ZGFnYkBjcy51aXQubm8+CiAgKiBDcmVhdGVkIGF0OiAgICBUaHUgT2N0IDE1IDA4OjM3OjU4IDE5OTgKQEAgLTExLDE4ICsxMSwxOCBAQAogICogU291cmNlczogICAgICAgc2tlbGV0b24uYyBieSBEb25hbGQgQmVja2VyIDxiZWNrZXJAQ0VTRElTLmdzZmMubmFzYS5nb3Y+CiAgKiAgICAgICAgICAgICAgICBzbGlwLmMgYnkgTGF1cmVuY2UgQ3VsaGFuZSwgICA8bG96QGhvbG1lcy5kZW1vbi5jby51az4KICAqICAgICAgICAgICAgICAgICAgICAgICAgICBGcmVkIE4uIHZhbiBLZW1wZW4sIDx3YWx0amVAdXdhbHQub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AwNjQ0Ci0tLSBhL25ldC9pcmRhL2lycXVldWUuYworKysgYi9uZXQvaXJkYS9pcnF1ZXVlLmMKQEAgLTEsNSArMSw1IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiAgICAgICAgICAgICAgICAKKyAqCiAgKiBGaWxlbmFtZTogICAgICBpcnF1ZXVlLmMKICAqIFZlcnNpb246ICAgICAgIDAuMwogICogRGVzY3JpcHRpb246ICAgR2VuZXJhbCBxdWV1ZSBpbXBsZW1lbnRhdGlvbgpAQCAtMTAsMjggKzEwLDI4IEBACiAgKiBNb2RpZmllZCBieTogICBEYWcgQnJhdHRsaSA8ZGFnYkBjcy51aXQubm8+CiAgKiBNb2RpZmllZCBhdDogICBUaHUgSmFuICA0IDE0OjI5OjEwIENFVCAyMDAxCiAgKiBNb2RpZmllZCBieTogICBNYXJjIFp5bmdpZXIgPG16eW5naWVyQGZyZWVzdXJmLmZyPgotICogCisgKgogICogICAgIENvcHlyaWdodCAoQykgMTk5OC0xOTk5LCBBYWdlIEt2YWxuZXMgPGFhZ2VAY3MudWl0Lm5vPgotICogICAgIENvcHlyaWdodCAoQykgMTk5OCwgRGFnIEJyYXR0bGksIAorICogICAgIENvcHlyaWdodCAoQykgMTk5OCwgRGFnIEJyYXR0bGksCiAgKiAgICAgQWxsIFJpZ2h0cyBSZXNlcnZlZC4KICAqCiAgKiAgICAgVGhpcyBjb2RlIGlzIHRha2VuIGZyb20gdGhlIFZvcnRleCBPcGVyYXRpbmcgU3lzdGVtIHdyaXR0ZW4gYnkgQWFnZQogICogICAgIEt2YWxuZXMuIEFhZ2UgaGFzIGFncmVlZCB0aGF0IHRoaXMgY29kZSBjYW4gdXNlIHRoZSBHUEwgbGljZW5jZSwKICAqICAgICBhbHRob3VnaCBoZSBkb2VzIG5vdCB1c2UgdGhhdCBsaWNlbmNlIGluIGhpcyBvd24gY29kZS4KLSAqICAgICAK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V0bGlua19jcmVhdGVfY29ubnRyYWNrKHN0cnVjdCBuZmF0dHIgKmNkYVtdLCAKK2N0bmV0bGlua19jcmVhdGVfY29ubnRyYWNrKHN0cnVjdCBuZmF0dHIgKmNkYVtdLAogCQkJICAgc3RydWN0IG5mX2Nvbm50cmFja190dXBsZSAqb3R1cGxlLAogCQkJICAgc3RydWN0IG5mX2Nvbm50cmFja190dXBsZSAqcnR1cGxlKQogewpAQCAtOTY1LDcgKzk2NSw3IEBACiAKIAljdCA9IG5mX2Nvbm50cmFja19hbGxvYyhvdHVwbGUsIHJ0dXBsZSk7CiAJaWYgKGN0ID09IE5VTEwgfHwgSVNfRVJSKGN0KSkKLQkJcmV0dXJuIC1FTk9NRU07CQorCQlyZXR1cm4gLUVOT01FTTsKIAogCWlmICghY2RhW0NUQV9USU1FT1VULTFdKQogCQlnb3RvIGVycjsKQEAgLTEwMDMsMTMgKzEwMDMsMTMgQEAKIAogCXJldHVybiAwOwogCi1lcnI6CQorZXJyOgogCW5mX2Nvbm50cmFja19mcmVlKGN0KTsKIAlyZXR1cm4gZXJyOwogfQogCi1zdGF0aWMgaW50IAotY3RuZXRsaW5rX25ld19jb25udHJhY2soc3RydWN0IHNvY2sgKmN0bmwsIHN0cnVjdCBza19idWZmICpza2IsIAorc3RhdGljIGludAorY3RuZXRsaW5rX25ld19jb25udHJhY2soc3RydWN0IHNvY2sgKmN0bmwsIHN0cnVjdCBza19idWZmICpza2IsCiAJCQlzdHJ1Y3Qgbmxtc2doZHIgKm5saCwgc3RydWN0IG5mYXR0ciAqY2RhW10sIGludCAqZXJycCkKIHsKIAlzdHJ1Y3QgbmZfY29ubnRyYWNrX3R1cGxlIG90dXBsZSwgcnR1cGxlOwpAQCAtMTA2NSw5ICsxMDY1LDkgQEAKIAlyZXR1cm4gZXJyOwogfQogCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiogCi0gKiBFWFBFQ1QgCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovIAorLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBFWFBFQ1QKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAogc3RhdGljIGlubGluZSBpbnQKIGN0bmV0bGlua19leHBfZHVtcF90dXBsZShzdHJ1Y3Qgc2tfYnVmZiAqc2tiLApAQCAtMTA3NSw3ICsxMDc1LDcgQEAKIAkJCSBlbnVtIGN0YXR0cl9leHBlY3QgdHlwZSkKIHsKIAlzdHJ1Y3QgbmZhdHRyICpuZXN0X3Bhcm1zID0gTkZBX05FU1Qoc2tiLCB0eXBlKTsKLQkKKwogCWlmIChjdG5ldGxpbmtfZHVtcF90dXBsZXMoc2tiLCB0dXBsZSkgPCAwKQogCQlnb3RvIG5mYXR0cl9mYWlsdXJlOwogCkBAIC0xMDg1LDcgKzEwODUsNyBAQAogCiBuZmF0dHJfZmFpbHVyZToKIAlyZXR1cm4gLTE7Ci19CQkJCit9CiAKIHN0YXRpYyBpbmxpbmUgaW50CiBjdG5ldGxpbmtfZXhwX2R1bXBfbWFzayhzdHJ1Y3Qgc2tfYnVmZiAqc2tiLApAQCAtMTEyMCw3ICsxMTIwLDcgQEAKIAogc3RhdGljIGlubGluZSBpbnQKIGN0bmV0bGlua19leHBfZHVtcF9leHBlY3Qoc3RydWN0IHNrX2J1ZmYgKnNrYiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3Qgc3RydWN0IG5mX2Nvbm50cmFja19leHBlY3QgKmV4cCkKKwkJCSAgY29uc3Qgc3RydWN0IG5mX2Nvbm50cmFja19leHBlY3QgKmV4cCkKIHsKIAlzdHJ1Y3QgbmZfY29ubiAqbWFzdGVyID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dfcHJvZmlsZV9mdW5jX2VudGVyICh2b2lkICp0aGlzX2ZuLCB2b2lkICpjYWxsX3NpdGUpCiB7CiAgICAgICAgYXNtIHZvbGF0aWxlKCIgIG1vdmwgICAgJSVlc3AsJSVlZGkgICAgIFxuIgotICAgICAgICAgICAgICAgICAgICAiICBhbmRsICAgICUwLCUlZWRpICAgICAgICBcbiIKLSAgICAgICAgICAgICAgICAgICAgIiAgYWRkbCAgICAlMSwlJWVkaSAgICAgICAgXG4iCi0gICAgICAgICAgICAgICAgICAgICIgIG1vdmwgICAgJSVlc3AsJSVlY3ggICAgIFxuIgotICAgICAgICAgICAgICAgICAgICAiICBzdWJsICAgICUlZWRpLCUlZWN4ICAgICBcbiIKLSAgICAgICAgICAgICAgICAgICAgIiAgc2hybCAgICAkMiwlJWVjeCAgICAgICAgXG4iCi0gICAgICAgICAgICAgICAgICAgICIgIG1vdmwgICAgJDB4ZWRlZGVkZWQsJSVlYXggICAgIFxuIgotICAgICAgICAgICAgICAgICAgICAiICByZXAgc3Rvc2wgICAgICAgICAgICAgICBcbiIKLSAgICAgICAgICAgICAgICAgICAgOgotICAgICAgICAgICAgICAgICAgICA6ICJpIih+KFRIUkVBRF9TSVpFLTEpKSwgImkiKHNpemVvZihzdHJ1Y3QgdGhyZWFkX2luZm8pKQotICAgICAgICAgICAgICAgICAgICA6ICJlYXgiLCAiZWN4IiwgImVkaSIsICJtZW1vcnkiLCAiY2MiCi0gICAgICAgICAgICAgICAgICAgICk7CisJCSAgICAiICBhbmRsICAgICUwLCUlZWRpICAgICAgICBcbiIKKwkJICAgICIgIGFkZGwgICAgJTEsJSVlZGkgICAgICAgIFxuIgorCQkgICAgIiAgbW92bCAgICAlJWVzcCwlJWVjeCAgICAgXG4iCisJCSAgICAiICBzdWJsICAgICUlZWRpLCUlZWN4ICAgICBcbiIKKwkJICAgICIgIHNocmwgICAgJDIsJSVlY3ggICAgICAgIFxuIgorCQkgICAgIiAgbW92bCAgICAkMHhlZGVkZWRlZCwlJWVheCAgICAgXG4iCisJCSAgICAiICByZXAgc3Rvc2wgICAgICAgICAgICAgICBcbiIKKwkJICAgIDoKKwkJICAgIDogImkiKH4oVEhSRUFEX1NJWkUtMSkpLCAiaSIoc2l6ZW9mKHN0cnVjdCB0aHJlYWRfaW5mbykpCisJCSAgICA6ICJlYXgiLCAiZWN4IiwgImVkaSIsICJtZW1vcnkiLCAiY2MiCisJCSAgICApOwogfQogCiB2b2lkIF9fY3lnX3Byb2ZpbGVfZnVuY19leGl0KHZvaWQgKnRoaXNfZm4sIHZvaWQgKmNhbGxfc2l0ZSkKQEAgLTE2NSwxNiArMTY1LDE2IEBACiB2b2lkIF9fY3lnX3Byb2ZpbGVfZnVuY19leGl0KHZvaWQgKnRoaXNfZm4sIHZvaWQgKmNhbGxfc2l0ZSkKIHsKICAgICAgICBhc20gdm9sYXRpbGUoIiAgbW92bCAgICAlJWVzcCwlJWVkaSAgICAgXG4iCi0gICAgICAgICAgICAgICAgICAgICIgIGFuZGwgICAgJTAsJSVlZGkgICAgICAgIFxuIgotICAgICAgICAgICAgICAgICAgICAiICBhZGRsICAgICUxLCUlZWRpICAgICAgICBcbiIKLSAgICAgICAgICAgICAgICAgICAgIiAgbW92bCAgICAlJWVzcCwlJWVjeCAgICAgXG4iCi0gICAgICAgICAgICAgICAgICAgICIgIHN1YmwgICAgJSVlZGksJSVlY3ggICAgIFxuIgotICAgICAgICAgICAgICAgICAgICAiICBzaHJsICAgICQyLCUlZWN4ICAgICAgICBcbiIKLSAgICAgICAgICAgICAgICAgICAgIiAgbW92bCAgICAkMHhkYWRhZGFkYSwlJWVheCAgICAgXG4iCi0gICAgICAgICAgICAgICAgICAgICIgIHJlcCBzdG9zbCAgICAgICAgICAgICAgIFxuIgotICAgICAgICAgICAgICAgICAgICA6Ci0gICAgICAgICAgICAgICAgICAgIDogImkiKH4oVEhSRUFEX1NJWkUtMSkpLCAiaSIoc2l6ZW9mKHN0cnVjdCB0aHJlYWRfaW5mbykpCi0gICA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0gICAgICAgIHN0cnVjdCBwcmludF9idWYgY2I7CisJY2hhciAqZXJyID0gIlxuXG4qKiogUFJJTlQgQlVGRkVSIE9WRVJGTE9XICoqKlxuXG4iOworCWNoYXIgKmNwX2J1ZjsKKwlzdHJ1Y3QgcHJpbnRfYnVmIGNiOwogCiAJaWYgKCFwYi0+YnVmKQogCQlyZXR1cm4gMDsKIAogCWlmIChwYi0+YnVmW3BiLT5zaXplIC0gMV0gPT0gMCkgewotICAgICAgICAgICAgICAgIGNwX2J1ZiA9IGttYWxsb2MocGItPnNpemUsIEdGUF9BVE9NSUMpOwotICAgICAgICAgICAgICAgIGlmIChjcF9idWYgIT0gTlVMTCl7Ci0gICAgICAgICAgICAgICAgICAgICAgICB0aXBjX3ByaW50YnVmX2luaXQoJmNiLCBjcF9idWYsIHBiLT5zaXplKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRpcGNfcHJpbnRidWZfbW92ZSgmY2IsIHBiKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRpcGNfcHJpbnRidWZfbW92ZShwYiwgJmNiKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGtmcmVlKGNwX2J1Zik7Ci0gICAgICAgICAgICAgICAgICAgICAgICBtZW1jcHkocGItPmJ1ZiwgZXJyLCBzdHJsZW4oZXJyKSk7Ci0gICAgICAgICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRpcGNfcHJpbnRidWZfcmVzZXQocGIpOwotICAgICAgICAgICAgICAgICAgICAgICAgdGlwY19wcmludGYocGIsIGVycik7Ci0gICAgICAgICAgICAgICAgfQorCQljcF9idWYgPSBrbWFsbG9jKHBiLT5zaXplLCBHRlBfQVRPTUlDKTsKKwkJaWYgKGNwX2J1ZiAhPSBOVUxMKXsKKwkJCXRpcGNfcHJpbnRidWZfaW5pdCgmY2IsIGNwX2J1ZiwgcGItPnNpemUpOworCQkJdGlwY19wcmludGJ1Zl9tb3ZlKCZjYiwgcGIpOworC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dSA8IGxfcHRyLT5tYXhfcGt0X3RhcmdldCkgJiYKKwkJCWlmICgobXR1IDwgbF9wdHItPm1heF9wa3RfdGFyZ2V0KSAmJgogCQkJICAgIGxpbmtfd29ya2luZ193b3JraW5nKGxfcHRyKSAmJgogCQkJICAgIGxfcHRyLT5mc21fbXNnX2NudCkgewogCQkJCW1zZ19zaXplID0gKG10dSArIChsX3B0ci0+bWF4X3BrdF90YXJnZXQgLSBtdHUpLzIgKyAyKSAmIH4zOwotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobF9wdHItPm1heF9wa3RfcHJvYmVzID09IDEwKSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbF9wdHItPm1heF9wa3RfdGFyZ2V0ID0gKG1zZ19zaXplIC0gNCk7Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbF9wdHItPm1heF9wa3RfcHJvYmVzID0gMDsKKwkJCQlpZiAobF9wdHItPm1heF9wa3RfcHJvYmVzID09IDEwKSB7CisJCQkJCWxfcHRyLT5tYXhfcGt0X3RhcmdldCA9IChtc2dfc2l6ZSAtIDQpOworCQkJCQlsX3B0ci0+bWF4X3BrdF9wcm9iZXMgPSAwOwogCQkJCQltc2dfc2l6ZSA9IChtdHUgKyAobF9wdHItPm1heF9wa3RfdGFyZ2V0IC0gbXR1KS8yICsgMikgJiB+MzsKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQorCQkJCX0KIAkJCQlsX3B0ci0+bWF4X3BrdF9wcm9iZXMrKzsKLSAgICAgICAgICAgICAgICAgICAgICAgIH0KKwkJCX0KIAogCQkJbF9wdHItPnN0YXRzLnNlbnRfcHJvYmVzKys7Ci0gICAgICAgICAgICAgICAgfQorCQl9CiAJCWxfcHRyLT5zdGF0cy5zZW50X3N0YXRlcysrOwogCX0gZWxzZSB7CQkvKiBSRVNFVF9NU0cgb3IgQUNUSVZBVEVfTVNHICovCiAJCW1zZ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ogCQl9CiAKIAkJbWF4X3BrdF9hY2sgPSBtc2dfbWF4X3BrdChtc2cpOwotICAgICAgICAgICAgICAgIGlmIChtYXhfcGt0X2FjayA+IGxfcHRyLT5tYXhfcGt0KSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICBkYmcoIkxpbmsgPCVzPiB1cGRhdGVkIE1UVSAldSAtPiAldVxuIiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBsX3B0ci0+bmFtZSwgbF9wdHItPm1heF9wa3QsIG1heF9wa3RfYWNrKTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxfcHRyLT5tYXhfcGt0ID0gbWF4X3BrdF9hY2s7Ci0gICAgICAgICAgICAgICAgICAgICAgICBsX3B0ci0+bWF4X3BrdF9wcm9iZXMgPSAwOwotICAgICAgICAgICAgICAgIH0KKwkJaWYgKG1heF9wa3RfYWNrID4gbF9wdHItPm1heF9wa3QpIHsKKwkJCWRiZygiTGluayA8JXM+IHVwZGF0ZWQgTVRVICV1IC0+ICV1XG4iLAorCQkJICAgIGxfcHRyLT5uYW1lLCBsX3B0ci0+bWF4X3BrdCwgbWF4X3BrdF9hY2spOworCQkJbF9wdHItPm1heF9wa3QgPSBtYXhfcGt0X2FjazsKKwkJCWxfcHRyLT5tYXhfcGt0X3Byb2JlcyA9IDA7CisJCX0KIAogCQltYXhfcGt0X2FjayA9IDA7Ci0gICAgICAgICAgICAgICAgaWYgKG1zZ19wcm9iZShtc2cpKSB7CisJCWlmIChtc2dfcHJvYmUobXNnKSkgewogCQkJbF9wdHItPnN0YXRzLnJlY3ZfcHJvYmVzKys7Ci0gICAgICAgICAgICAgICAgICAgICAgICBpZiAobXNnX3NpemUobXNnKSA+IHNpemVvZihsX3B0ci0+cHJvdG9fbXNnKSkgewotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXhfcGt0X2FjayA9IG1zZ19zaXplKG1zZyk7Ci0gICAgICAgICAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAg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KwkJaWYgKG5fcHRyLT5saW5rX2NudCA+PSAyKSB7CiAJCQljaGFyIGFkZHJfc3RyaW5nWzE2XTsKIAotICAgICAgICAgICAgICAgICAgICAgICAgZXJyKCJBdHRlbXB0IHRvIGNyZWF0ZSB0aGlyZCBsaW5rIHRvICVzXG4iLAorCQkJZXJyKCJBdHRlbXB0IHRvIGNyZWF0ZSB0aGlyZCBsaW5rIHRvICVzXG4iLAogCQkJICAgIGFkZHJfc3RyaW5nX2ZpbGwoYWRkcl9zdHJpbmcsIG5fcHRyLT5hZGRyKSk7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gTlVMTDsKLSAgICAgICAgICAgICAgICB9CisJCQlyZXR1cm4gTlVMTDsKKwkJfQogCi0gICAgICAgICAgICAgICAgaWYgKCFuX3B0ci0+bGlua3NbYmVhcmVyX2lkXSkgewotICAgICAgICAgICAgICAgICAgICAgICAgbl9wdHItPmxpbmtzW2JlYXJlcl9pZF0gPSBsX3B0cjsKLSAgICAgICAgICAgICAgICAgICAgICAgIHRpcGNfbmV0LnpvbmVzW3RpcGNfem9uZShsX3B0ci0+YWRkcildLT5saW5rcysrOwotICAgICAgICAgICAgICAgICAgICAgICAgbl9wdHItPmxpbmtfY250Kys7Ci0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbl9wdHI7Ci0gICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGVycigiQXR0ZW1wdCB0byBlc3RhYmxpc2ggc2Vjb25kIGxpbmsgb24gPCVzPiB0byAlcyBcbiIsCi0gICAgICAgICAgICAgICAgICAgIGxfcHRyLT5iX3B0ci0+cHVibC5uYW1lLCAKKwkJaWYgKCFuX3B0ci0+bGlua3NbYmVhcmVyX2lkXSkgeworCQkJbl9wdHItPmxpbmtzW2JlYXJlcl9pZF0gPSBsX3B0cjsKKwkJCXRpcGNfbmV0LnpvbmVzW3RpcGNfem9uZShsX3B0ci0+YWRkcildLT5saW5rcysrOworCQkJbl9wdHItPmxpb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wZW5kX3RsdihidWYsIFRJUENfVExWX0xJTktfSU5GTywgJmxpbmtfaW5mbywgc2l6ZW9mKGxpbmtfaW5mbykpOwogCiAJLyogQWRkIFRMVnMgZm9yIGFueSBvdGhlciBsaW5rcyBpbiBzY29wZSAqLwogCiAJZm9yIChuX3B0ciA9IHRpcGNfbm9kZXM7IG5fcHRyOyBuX3B0ciA9IG5fcHRyLT5uZXh0KSB7Ci0gICAgICAgICAgICAgICAgdTMyIGk7CisJCXUzMiBpOwogCiAJCWlmICghaW5fc2NvcGUoZG9tYWluLCBuX3B0ci0+YWRkcikpCiAJCQljb250aW51ZTsKLSAgICAgICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgTUFYX0JFQVJFUlM7IGkrKykgewotICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFuX3B0ci0+bGlua3NbaV0pIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsKLSAgICAgICAgICAgICAgICAgICAgICAgIGxpbmtfaW5mby5kZXN0ID0gaHRvbmwobl9wdHItPmFkZHIpOwotICAgICAgICAgICAgICAgICAgICAgICAgbGlua19pbmZvLnVwID0gaHRvbmwodGlwY19saW5rX2lzX3VwKG5fcHRyLT5saW5rc1tpXSkpOwotICAgICAgICAgICAgICAgICAgICAgICAgc3RyY3B5KGxpbmtfaW5mby5zdHIsIG5fcHRyLT5saW5rc1tpXS0+bmFtZSk7Ci0JCQl0aXBjX2NmZ19hcHBlbmRfdGx2KGJ1ZiwgVElQQ19UTFZfTElOS19JTkZPLCAKKwkJZm9yIChpID0gMDsgaSA8IE1BWF9CRUFSRVJTOyBpKyspIHsKKwkJCWlmICghbl9wdHItPmxpbmtzW2ldKQorCQkJCWNvbnRpbnVlOworCQkJbGlua19pbmZvLmRlc3QgPSBodG9ubChuX3B0ci0+YWRkcik7CisJCQlsaW5rX2luZm8udXAgPSBodG9ubCh0aXBjX2xpbmtfaXNfdXAobl9wdHItPmxpbmtzW2ldKSk7CisJCQl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AgICBpZiAocF9wdHItPnB1YmwuY29ubmVjdGVkKSB7Ci0gICAgICAgICAgICAgICAgdTMyIGRwb3J0ID0gcG9ydF9wZWVycG9ydChwX3B0cik7Ci0gICAgICAgICAgICAgICAgdTMyIGRlc3Rub2RlID0gcG9ydF9wZWVybm9kZShwX3B0cik7CisJaWYgKHBfcHRyLT5wdWJsLmNvbm5lY3RlZCkgeworCQl1MzIgZHBvcnQgPSBwb3J0X3BlZXJwb3J0KHBfcHRyKTsKKwkJdTMyIGRlc3Rub2RlID0gcG9ydF9wZWVybm9kZShwX3B0cik7CiAKLSAgICAgICAgICAgICAgICB0aXBjX3ByaW50ZihidWYsICIgY29ubmVjdGVkIHRvIDwldS4ldS4ldToldT4iLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRpcGNfem9uZShkZXN0bm9kZSksIHRpcGNfY2x1c3RlcihkZXN0bm9kZSksCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGlwY19ub2RlKGRlc3Rub2RlKSwgZHBvcnQpOwotICAgICAgICAgICAgICAgIGlmIChwX3B0ci0+cHVibC5jb25uX3R5cGUgIT0gMCkKLSAgICAgICAgICAgICAgICAgICAgICAgIHRpcGNfcHJpbnRmKGJ1ZiwgIiB2aWEgeyV1LCV1fSIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX3B0ci0+cHVibC5jb25uX3R5cGUsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwX3B0ci0+cHVibC5jb25uX2luc3RhbmNlKTsKLSAgICAgICAgfQotICAgICAgICBlbHNlIGlmIChwX3B0ci0+cHVibC5wdWJsaXNoZWQpIHsKLSAgICAgICAgICAgICAgICB0aXBjX3ByaW50ZihidWYsICIgYm91bmQgdG8iKTsKLSAgICAgICAgICAgICAgICBsaXN0X2Zvcl9lYWNoX2VudHJ5KHB1YmwsICZwX3B0ci0+cHVibGljYXRpb25zLCBwcG9ydF9saXN0KSB7CisJCXRpcGNfcHJ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R5cGUgPT0gVElQQ19BRERSX05BTUUpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIGlmICgocmVzID0gZGVzdF9uYW1lX2NoZWNrKGRlc3QsIG0pKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBleGl0OwotICAgICAgICAgICAgICAgICAgICAgICAgcmVzID0gdGlwY19zZW5kMm5hbWUodHNvY2stPnAtPnJlZiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZkZXN0LT5hZGRyLm5hbWUubmFtZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3QtPmFkZHIubmFtZS5kb21haW4sIAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbS0+bXNnX2lvdmxlbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0tPm1zZ19pb3YpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBlbHNlIGlmIChkZXN0LT5hZGRydHlwZSA9PSBUSVBDX0FERFJfSUQpIHsKLSAgICAgICAgICAgICAgICAgICAgICAgIHJlcyA9IHRpcGNfc2VuZDJwb3J0KHRzb2NrLT5wLT5yZWYsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmZGVzdC0+YWRkci5pZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0tPm1zZ19pb3ZsZW4sCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtLT5tc2dfaW92KTsKLSAgICAgICAgICAgICAgICB9Ci0gICAgICAgICAgICAgICAgZWxzZSBpZiAoZGVzdC0+YWRkcnR5cGUgPT0gVElQQ19BRERSX01DQVNUKSB7CisJZG8geworCQlpZiAoZGVzdC0+YWRkcnR5cGUgPT0gVElQQ19BRERSX05BTUUpIHsKKwkJCWlmICgocmVzID0gZGVzdF9uYW1lX2NoZWNrKGRlc3QsIG0pKSkKKwkJCQlnb3RvIGV4aXQ7CisJCQlyZXMgPSB0aXBjX3NlbmQybmFtZSh0c29jay0+cC0+cmVmLAorCQkJCQkgICAgICZkZXN0LT5hZGRyLm5hbWUubmFtZSwKKwkJCQkJICAgICBkZXN0LT5hZGRyLm5hbWUuZG9tYWluLAorCQkJCQkgICAgIG0tPm1zZ19pb3ZsZW4sCisJCQkJCSAgICAgbS0+bXNnX2lvdik7CisJCX0KKwkJZWxzZSBpZiAoZGVzdC0+YWRkcnR5cGUgPT0gVElQQ19BRERSX0lEKSB7CisJCQlyZXMgPSB0aXBjX3NlbmQycG9ydCh0c29jay0+cC0+cmVmLAorCQkJCQkgICAgICZkZXN0LT5hZGRyLmlkLAorCQkJCQkgICAgIG0tPm1zZ19pb3ZsZW4sCisJCQkJCSAgICAgbS0+bXNnX2lvdik7CisJCX0KKwkJZWxzZSBpZiAoZGVzdC0+YWRkcnR5cGUgPT0gVElQQ19BRERSX01DQVNUKSB7CiAJCQlpZiAobmVlZHNfY29ubikgewogCQkJCXJlcyA9IC1FT1BOT1RTVVBQOwogCQkJCWdvdG8gZXhpdDsKIAkJCX0KLSAgICAgICAgICAgICAgICAgICAgICAgIGlmICgocmVzID0gZGVzdF9uYW1lX2NoZWNrKGRlc3QsIG0pKSkKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ290byBleGl0OwotICAgICAgICAgICAgICAgICAgICAgICAgcmVzID0gdGlwY19tdWx0aWNhc3QodHNvY2stPnAtPnJlZiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZkZXN0LT5hZGRyLm5hbWVzZXEsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbS0+bXNnX2lvdmxlbiwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0tPm1zZ19pb3YpOwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgICAgICAgICBpZiAobGlrZWx5KHJlcyAhPSAtRUxJTktDT05HKSkgewotZXhpdDogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAotICAgICAgICAgICAgICAgICAgICAgICAgdXAoJnRzb2NrLT5zZW0pOwotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlczsKLSAgICAgICAgICAgICAgICB9CisJCQlpZiAoKHJlcyA9IGRlc3RfbmFtZV9jaGVjayhkZXN0LCBtKSkpCisJCQkJZ290byBleGl0OworCQkJcmVzID0gdGlwY19tdWx0aWNhc3QodHNvY2stPnAtPnJlZiwKKwkJCQkJICAgICAmZGVzdC0+YWRkci5uYW1lc2VxLAorCQkJCQkgICAgIDAsCisJCQkJCSAgICAgbS0+bXNnX2lvdmxlbiwKKwkJCQkJICAgICBtLT5tc2dfaW92KTsKKwkJfQorCQlpZiAobGlrZWx5KHJlcyAhPSAtRUxJTktDT05HKSkgeworZXhpdDoKKwkJCXVwKCZ0c29jay0+c2VtKTsKKwkJCXJldHVybiByZXM7CisJCX0KIAkJaWYgKG0tPm1zZ19mbGFncyAmIE1TR19ET05UV0FJVCkgewogCQkJcmVzID0gLUVXT1VMREJMT0NLOwogCQkJZ290byBleGl0OwogCQl9Ci0gICAgICAgICAgICAgICAgaWYgKHdhaXRfZXZlbnRfaW50ZXJydXB0aWJsZSgqc29jay0+c2stPnNrX3NsZWVwLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIXRzb2NrLT5wLT5jb25nZXN0ZWQpKSB7Ci0gICAgICAgICAgICAgICAgICAgIHJlcyA9IC1FUkVTVEFSVFNZUzsKLSAgICAgICAgICAgICAgICAgICAgZ290byBleGl0OwotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfSB3aGlsZSAoMSk7CisJCWlmICh3YWl0X2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ZXJydXB0aWJsZSgmdHNvY2stPnNlbSkpIHsKIAkJcmV0dXJuIC1FUkVTVEFSVFNZUzsKLSAgICAgICAgfQorCX0KIAotICAgICAgICBkbyB7CisJZG8gewogCQlpZiAodW5saWtlbHkoc29jay0+c3RhdGUgIT0gU1NfQ09OTkVDVEVEKSkgewogCQkJaWYgKHNvY2stPnN0YXRlID09IFNTX0RJU0NPTk5FQ1RJTkcpCi0JCQkJcmVzID0gLUVQSVBFOyAgIAorCQkJCXJlcyA9IC1FUElQRTsKIAkJCWVsc2UKIAkJCQlyZXMgPSAtRU5PVENPTk47CiAJCQlnb3RvIGV4aXQ7CiAJCX0KIAotICAgICAgICAgICAgICAgIHJlcyA9IHRpcGNfc2VuZCh0c29jay0+cC0+cmVmLCBtLT5tc2dfaW92bGVuLCBtLT5tc2dfaW92KTsKLSAgICAgICAgICAgICAgICBpZiAobGlrZWx5KHJlcyAhPSAtRUxJTktDT05HKSkgeworCQlyZXMgPSB0aXBjX3NlbmQodHNvY2stPnAtPnJlZiwgbS0+bXNnX2lvdmxlbiwgbS0+bXNnX2lvdik7CisJCWlmIChsaWtlbHkocmVzICE9IC1FTElOS0NPTkcpKSB7CiBleGl0OgotICAgICAgICAgICAgICAgICAgICAgICAgdXAoJnRzb2NrLT5zZW0pOwotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJlczsKLSAgICAgICAgICAgICAgICB9CisJCQl1cCgmdHNvY2stPnNlbSk7CisJCQlyZXR1cm4gcmVzOworCQl9CiAJCWlmIChtLT5tc2dfZmxhZ3MgJiBNU0dfRE9OVFdBSVQpIHsKIAkJCXJlcyA9IC1FV09VTERCTE9DSzsKIAkJCWdvdG8gZXhpdDsKIAkJfQotICAgICAgICAgICAgICAgIGlmICh3YWl0X2V2ZW50X2ludGVycnVwdGlibGUoKnNvY2stPnNrLT5za19zbGVlcCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICF0c29jay0+cC0+Y29uZ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3dhbnJvdXRlci9hZl93YW5waXBlLmMKaW5kZXggYzIwNTk3My4uNDFkN2UzMiAxMDA2NDQKLS0tIGEvbmV0L3dhbnJvdXRlci9hZl93YW5waXBlLmMKKysrIGIvbmV0L3dhbnJvdXRlci9hZl93YW5waXBlLmMKQEAgLTExLDExICsxMSwxMSBAQAogKgkJMiBvZiB0aGUgTGljZW5zZSwgb3IgKGF0IHlvdXIgb3B0aW9uKSBhbnkgbGF0ZXIgdmVyc2lvbi4KICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogKiBEdWUgQ3JlZGl0OgotKiAgICAgICAgICAgICAgIFdhbnBpcGUgc29ja2V0IGxheWVyIGlzIGJhc2VkIG9uIFBhY2tldCBhbmQgCi0qICAgICAgICAgICAgICAgdGhlIFgyNSBzb2NrZXQgbGF5ZXJzLiBUaGUgYWJvdmUgc29ja2V0cyB3ZXJlIAotKiAgICAgICAgICAgICAgIHVzZWQgZm9yIHRoZSBzcGVjaWZpYyB1c2Ugb2YgU2FuZ29tYSBUZWNobm9sb2dpZXMgCi0qICAgICAgICAgICAgICAgQVBJIHByb2dyYW1zLiAKLSogICAgICAgICAgICAgICBQYWNrZXQgc29ja2V0IEF1dGhvcnM6IFJvc3MgQmlybywgRnJlZCBOLiB2YW4gS2VtcGVuIGFuZCAKKyogICAgICAgICAgICAgICBXYW5waXBlIHNvY2tldCBsYXllciBpcyBiYXNlZCBvbiBQYWNrZXQgYW5kCisqICAgICAgICAgICAgICAgdGhlIFgyNSBzb2NrZXQgbGF5ZXJzLiBUaGUgYWJvdmUgc29ja2V0cyB3ZXJlCisqICAgICAgICAgICAgICAgdXNlZCBmb3IgdGhlIHNwZWNpZmljIHVzZSBvZiBTYW5nb21hIFRlY2hub2xvZ2llcworKiAgICAgICAgICAgICAgIEFQSSBwcm9ncmFtcy4KKyogICAgICAgICAgICAgICBQYWNrZXQgc29ja2V0IEF1dGhvcnM6IFJvc3MgQmlybywgRnJlZCBOLiB2YW4gS2VtcGVuIGFuZAogKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQWxhbiBDb3guCiAqICAgICAgICAgICAgICAgWDI1IHNvY2tldCBBdXRob3I6IEpvbmF0aGFuIE5heWxvci4KICogPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQpAQCAtMjgsNyArMjgsNyBAQAogKiBGZWIgMjksIDIwMDAgIE5lbmFkIENvcmJpYyAgICAgbyBBZGRlZCBzdXBwb3J0IGZvciBQVkMgcHJvdG9jb2xzLCBzdWNoIGFzCiAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENIRExDLCBGcmFtZSBSZWxheSBhbmQgSERMQyBBUEkuCiAqIEphbiAxNywgMjAwMCAJTmVuYWQgQ29yYmljCSBvIEluaXRpYWwgdmVyc2lvbiwgYmFzZWQgb24gQUZfUEFDS0VUIHNvY2tldC4KLSoJCQkgICAgICAgICAgIFgyNUFQSSBzdXBwb3J0IG9ubHkuIAorKgkJCSAgICAgICAgICAgWDI1QVBJIHN1cHBvcnQgb25seS4KICoKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIApAQCAtNzEsMzMgKzcxLDMzIEBACiAJI2RlZmluZSBEQkdfUFJJTlRLKGZvcm1hdCwgYS4uLikgcHJpbnRrKGZvcm1hdCwgIyMgYSkKICNlbHNlCiAJI2RlZmluZSBEQkdfUFJJTlRLKGZvcm1hdCwgYS4uLikKLSNlbmRpZiAgICAgIAorI2VuZGlmCiAKIAotLyogU0VDVVJFIFNPQ0tFVCBJTVBMRU1FTlRBVElPTiAKLSAqIAorLyogU0VDVVJFIFNPQ0tFVCBJTVBMRU1FTlRBVElPTgorICoKICAqICAgVFJBTlNNSVQ6CiAgKgogIC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QQUNFKGRldikpOwogCXNrYi0+bmgucmF3ID0gc2tiLT5kYXRhOwogCkBAIC02NDUsNyArNjQ1LDcgQEAKIAogCWlmICghKHRlc3RfYW5kX3NldF9iaXQoMCwgJndwLT50aW1lcikpKQogCQltb2RfdGltZXIoJndwLT50eF90aW1lciwgamlmZmllcyArIDEpOwotCQorCiAJcmV0dXJuKGxlbik7CiAKIG91dF9mcmVlOgpAQCAtNjU4LDEyICs2NTgsMTIgQEAKICAqIHdhbnBpcGVfZGVsYXllZF90YXJuc21pdAogICoKICAqCVRyYW5zbWl0IGJvdHRvbSBoYWxmIGhhbmRsZXIuIEl0IGRlcXVldWVzIHBhY2tldHMKLSAqICAgICAgZnJvbSBzay0+c2tfd3JpdGVfcXVldWUgYW5kIHBhc3NlcyB0aGVtIHRvIHRoZSAKLSAqICAgICAgZHJpdmVyLiAgSWYgdGhlIGRyaXZlciBpcyBidXN5LCB0aGUgcGFja2V0IGlzIAotICogICAgICByZS1lbnF1ZXVlZC4gIAorICogICAgICBmcm9tIHNrLT5za193cml0ZV9xdWV1ZSBhbmQgcGFzc2VzIHRoZW0gdG8gdGhlCisgKiAgICAgIGRyaXZlci4gIElmIHRoZSBkcml2ZXIgaXMgYnVzeSwgdGhlIHBhY2tldCBpcworICogICAgICByZS1lbnF1ZXVlZC4KICAqCiAgKiAgICAgIFBhY2tldCBTZW50IGNvdW50ZXIgaXMgZGVjcmVtZW50ZWQgb24gc3VjY2Vzc2Z1bAotICogICAgICB0cmFuc21pc3Npb24uIAorICogICAgICB0cmFuc21pc3Npb24uCiAgKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogCkBAIC02ODAsMTcgKzY4MCwxNyBAQAogCQlEQkdfUFJJTlRLKEtFUk5fSU5GTyAid2Fuc29jazogVHJhbnNtaXQgZGVsYXksIG5vIGRldiBvciBjYXJkXG4iKTsKIAkJcmV0dXJuOwogCX0KLQkKKwogCWlmIChz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h3cCk7CiAJCXdwX3NrKHNrKSA9IE5VTEw7Ci0JCQorCiAJCWlmIChhdG9taWNfcmVhZCgmc2stPnNrX3JlZmNudCkgIT0gMSkgewogCQkJYXRvbWljX3NldCgmc2stPnNrX3JlZmNudCwgMSk7CiAJCQlEQkdfUFJJTlRLKEtFUk5fSU5GTyAid2Fuc29jazogRXJyb3IsIHdyb25nIHJlZmVyZW5jZSBjb3VudDogJWkgISA6ZGVsYXkuXG4iLApAQCAtODY1LDkgKzg2NSw5IEBACiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogICogd2FucGlwZV91bmxpbmtfZHJpdmVyCiAgKgotICogCVdoZW4gdGhlIHNvY2tldCBpcyByZWxlYXNlZCwgdGhpcyBmdW5jdGlvbiBpcyAKKyAqIAlXaGVuIHRoZSBzb2NrZXQgaXMgcmVsZWFzZWQsIHRoaXMgZnVuY3Rpb24gaXMKICAqICAgICAgdXNlZCB0byByZW1vdmUgbGlua3MgdGhhdCBiaW5kIHRoZSBzb2NrIGFuZCB0aGUKLSAqICAgICAgZHJpdmVyIHRvZ2V0aGVyLiAgCisgKiAgICAgIGRyaXZlciB0b2dldGhlci4KICAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogc3RhdGljIHZvaWQgd2FucGlwZV91bmxpbmtfZHJpdmVyIChzdHJ1Y3Qgc29jayAqc2spCiB7CkBAIC04ODIsNyArODgyLDcgQEAKIAlpZiAoIWRldil7CiAJCXByaW50ayhLRVJOX0lORk8gIndhbnNvY2s6IE5vIGRldiBvbiByZWxlYXNlXG4iKTsKIAkJcmV0dXJuOwotCX0JCQkKKwl9CiAJZGV2X3B1dChkZXYpOwogCiAJaWYgKChjaGFuID0gZGV2LT5wcml2KSA9PSBOVUxMKXsKQEAgLTg5Nyw3ICs4OTcsNyBAQAogCWNoYW4tPnR4X3RpbWVyPU5VTEw7CiAJY2xlYXJfYml0KDAsJmNoYW4tPmNvbW1vbl9jcml0aWNhbCk7CiAJcmVsZWFzZV9kZXZpY2UoZGV2KTsKLQkKKwogCXJldHVybjsKIH0KIApAQCAtOTMxLDcgKzkzMSw3IEBACiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogICogcmVsZWFzZV9kZXZpY2UKICAqCi0gKiAgIAlEdXJpbmcgc29jayByZWxlYXNlLCBjbGVhciBhIGNyaXRpY2FsIGJpdCwgd2hpY2ggCisgKiAgIAlEdXJpbmcgc29jayByZWxlYXNlLCBjbGVhciBhIGNyaXRpY2FsIGJpdCwgd2hpY2gKICAqICAgICAgbWFya3MgdGhlIGRldmljZSBhIGJlaW5nIHRha2VuLgogICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKQEAgLTk0NSw4ICs5NDUsOCBAQAogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAqIHdhbnBpcGVfcmVsZWFzZQogICoKLSAqCUNsb3NlIGEgUEFDS0VUIHNvY2tldC4gVGhpcyBpcyBmYWlybHkgc2ltcGxlLiBXZSAKLSAqICAgICAgaW1tZWRpYXRlbHkgZ28gdG8gJ2Nsb3NlZCcgc3RhdGUgYW5kIHJlbW92ZSBvdXIgCisgKglDbG9zZSBhIFBBQ0tFVCBzb2NrZXQuIFRoaXMgaXMgZmFpcmx5IHNpbXBsZS4gV2UKKyAqICAgICAgaW1tZWRpYXRlbHkgZ28gdG8gJ2Nsb3NlZCcgc3RhdGUgYW5kIHJlbW92ZSBvdXIKICAqICAgICAgcHJvdG9jb2wgZW50cnkgaW4gdGhlIGRldmljZSBsaXN0LgogICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKQEAgLTk1NCw3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2V0IGlzIGRlYWQuIE5vIG1vcmUgaW5wdXQgd2lsbCBhcHBlYXIuCiAJICovCkBAIC0xMDQwLDkgKzEwNDAsOSBAQAogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAqIGNoZWNrX3dyaXRlX3F1ZXVlCiAgKgotICogIAlEdXJpbmcgc29jayBzaHV0ZG93biwgaWYgdGhlIHNvY2sgc3RhdGUgaXMgCi0gKiAgICAgIFdBTlNPQ0tfQ09OTkVDVEVEIGFuZCB0aGVyZSBpcyB0cmFuc21pdCBkYXRhIAotICogICAgICBwZW5kaW5nLiBXYWl0IHVudGlsIGRhdGEgaXMgcmVsZWFzZWQgCisgKiAgCUR1cmluZyBzb2NrIHNodXRkb3duLCBpZiB0aGUgc29jayBzdGF0ZSBpcworICogICAgICBXQU5TT0NLX0NPTk5FQ1RFRCBhbmQgdGhlcmUgaXMgdHJhbnNtaXQgZGF0YQorICogICAgICBwZW5kaW5nLiBXYWl0IHVudGlsIGRhdGEgaXMgcmVsZWFzZWQKICAqICAgICAgYmVmb3JlIHByb2NlZWRpbmcuCiAgKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIApAQCAtMTA2Miw3ICsxMDYyLDcgQEAKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgKiByZWxlYXNlX2RyaXZlcgogICoKLSAqCVRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIGR1cmluZyBzb2NrIHNodXRkb3duLCB0byAKKyAqCVRoaXMgZnVuY3Rpb24gaXMgY2FsbGVkIGR1cmluZyBzb2NrIHNodXRkb3duLCB0bwogICogICAgICByZWxlYXNlIGFueSByZXNvdXJjZXMgYW5kIGxpbmtzIHRoYXQgYmluZCB0aGUgc29jawogICogICAgICB0byB0aGUgZHJpdmVyLiAgSXQgYWx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R1cm4gLUVJTlZBTDsKIAkJfQogCX1lbHNlewotCQkvKiBCaW5kIGEgc29ja2V0IHRvIGEgaW50ZXJmYWNlIG5hbWUgCi0gICAgICAgICAgICAgICAgICogVGhpcyBpcyB1c2VkIGJ5IFBWQyBtb3N0bHkKLSAgICAgICAgICAgICAgICAgKi8KKwkJLyogQmluZCBhIHNvY2tldCB0byBhIGludGVyZmFjZSBuYW1lCisJCSAqIFRoaXMgaXMgdXNlZCBieSBQVkMgbW9zdGx5CisJCSAqLwogCQlzdHJsY3B5KG5hbWUsc2xsLT5zbGxfZGV2aWNlLHNpemVvZihuYW1lKSk7CiAJCWRldiA9IGRldl9nZXRfYnlfbmFtZShuYW1lKTsKIAkJaWYgKGRldiA9PSBOVUxMKXsKQEAgLTE0MTksOCArMTQxOSw4IEBACiAKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgKiBnZXRfYXRvbWljX2RldmljZQotICoJCi0gKglTZXRzIGEgYml0IGF0b21pY2FsbHkgd2hpY2ggaW5kaWNhdGVzIHRoYXQgCisgKgorICoJU2V0cyBhIGJpdCBhdG9taWNhbGx5IHdoaWNoIGluZGljYXRlcyB0aGF0CiAgKiAgICAgIHRoZSBpbnRlcmZhY2UgaXMgdGFrZW4uIFRoaXMgYXZvaWRzIHJhY2UgY29uZGl0aW9ucy4KICAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCkBAIC0xNDM2LDcgKzE0MzYsNyBAQAogCiAvKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogICogY2hlY2tfZGV2Ci0gKgkKKyAqCiAgKiAgCUNoZWNrIHRoYXQgZGV2aWNlIG5hbWUgYmVsb25ncyB0byBhIHBhcnRpY3VsYXIgY2FyZC4KICAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09P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udGludWU7CiAJCWlmIChjaGFuLT51c2VkYnkgPT0gQVBJICYmIGNoYW4tPnN2Yyl7CiAJCQlpZiAoIWdldF9hdG9taWNfZGV2aWNlIChkZXYpKXsKQEAgLTE0OTIsMTYgKzE0OTIsMTYgQEAKIAogLyo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAqICB3YW5waXBlX2NyZWF0ZQotICoJCisgKgogICogCVNPQ0tFVCgpIFN5c3RlbSBjYWxsLiAgSXQgYWxsb2NhdGVzIGEgc29jayBzdHJ1Y3R1cmUKLSAqICAgICAgYW5kIGFkZHMgdGhlIHNvY2tldCB0byB0aGUgd2FucGlwZV9za19saXN0LiAKKyAqICAgICAgYW5kIGFkZHMgdGhlIHNvY2tldCB0byB0aGUgd2FucGlwZV9za19saXN0LgogICogICAgICBDcmF0ZXMgQUZfV0FOUElQRSBzb2NrZXQuCiAgKj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogc3RhdGljIGludCB3YW5waXBlX2NyZWF0ZShzdHJ1Y3Qgc29ja2V0ICpzb2NrLCBpbnQgcHJvdG9jb2wpCiB7CiAJc3RydWN0IHNvY2sgKnNrOwotCQorCiAJLy9GSVhNRTogVGhpcyBjaGVja3MgZm9yIHJvb3QgdXNlciwgU0VDVVJJVFkgPwogCS8vaWYgKCFjYXBhYmxlKENBUF9ORVRfUkFXKSkKIAkvLwlyZXR1cm4gLUVQRVJNOwpAQCAtMTUyNiw3ICsxNTI2LDcgQEAKIAlzay0+c2tfYm91bmRfZGV2X2lmID0gMDsKIAogCWF0b21pY19pbmMoJndhbnBpcGVfc29ja3NfbnIpOwotCQorCiAJLyogV2UgbXVzdCBkaXNhYmxlIGludGVycnVwdHMgYmVjYXVzZSB0aGUgSVNSCiAJICogY2FuIGFsc28gY2hhbmdlIHRoZSBsaXN0ICovCiAJc2V0X2JpdCgxLCZ3YW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T09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KICAqICBnZXRfaW9jdGxfY21kCi0gKgkKKyAqCiAgKglQYXNzIHVwIHRoZSBjb250ZW50cyBvZiBzb2NrZXQgTUJPWCB0byB0aGUgdXNlci4KICAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0qLwogCkBAIC0xOTc0LDcgKzE5NzQsNyBAQAogCWlmICgoZXJyPXB1dF91c2VyKG1ib3hfcHRyLT5jbWQucmVzdWx0LCAmdXNyX2RhdGEtPmhkci5yZXN1bHQpKSkKIAkJcmV0dXJuIGVycjsKIAlpZiAoKGVycj1wdXRfdXNlcihtYm94X3B0ci0+Y21kLmxjbiwgJnVzcl9kYXRhLT5oZHIubGNuKSkpCi0JCXJldHVybiBlcnI7CQorCQlyZXR1cm4gZXJyOwogCiAJaWYgKG1ib3hfcHRyLT5jbWQubGVuZ3RoID4gMCl7CiAJCWlmIChtYm94X3B0ci0+Y21kLmxlbmd0aCA+IFgyNV9NQVhfREFUQSkKQEAgLTE5ODYsMTMgKzE5ODYsMTMgQEAKIAkJfQogCX0KIAlyZXR1cm4gMDsKLX0gCit9CiAKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAgKiAgc2V0X2lvY3RsX2NtZAotICoJCisgKgogICoJQmVmb3JlIGNvbW1hbmQgY2FuIGJlIGV4ZWN1dGUsIHNvY2tldCBNQk9YIG11c3QKLSAqICAgICAgYmUgY3JlYXRlZCwgYW5kIGluaXRpYWxpemVkIHdpdGggdXNlciBkYXRhLgkKKyAqICAgICAgYmUgY3JlYXRlZCwgYW5kIGluaXRpYWxpemVkIHdpdGggdXNlciBkYXRhLgogICo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCiAKIHN0YXRpYyBpb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dCopd3AtPm1ib3gpLT5jbWQubGNuOwogCiAJCQkJREJHX1BSSU5USyhLRVJOX0lORk8gIlxud2Fuc29jazogUExBQ0UgQ0FMTCBPSyAlaVxuIiwKIAkJCQkJd3AtPmxjbik7CkBAIC0yMzM3LDcgKzIzMzcsNyBAQAogCiAJCQlicmVhazsKIAotCQlkZWZhdWx0OiAKKwkJZGVmYXVsdDoKIAkJCXJldHVybiAtRUlOVkFMOwogCX0KIApAQCAtMjM2NCw5ICsyMzY0LDkgQEAKIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQogICogd2FucGlwZV9hY2NlcHQKICAqCi0gKglBQ0NFUFQoKSBTeXN0ZW0gY2FsbC4JWDI1QVBJIFNwZWNpZmljIGZ1bmN0aW9uLiAKLSAqCUZvciBlYWNoIGluY29taW5nIGNhbGwsIGNyZWF0ZSBhIG5ldyBzb2NrZXQgYW5kIAotICogICAgICByZXR1cm4gaXQgdG8gdGhlIHVzZXIuCQorICoJQUNDRVBUKCkgU3lzdGVtIGNhbGwuCVgyNUFQSSBTcGVjaWZpYyBmdW5jdGlvbi4KKyAqCUZvciBlYWNoIGluY29taW5nIGNhbGwsIGNyZWF0ZSBhIG5ldyBzb2NrZXQgYW5kCisgKiAgICAgIHJldHVybiBpdCB0byB0aGUgdXNlci4KICAqPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ki8KIAogc3RhdGljIGludCB3YW5waXBlX2FjY2VwdChzdHJ1Y3Qgc29ja2V0ICpzb2NrLCBzdHJ1Y3Qgc29ja2V0ICpuZXdzb2NrLCBpbnQgZmxhZ3MpCkBAIC0yMzc4LDEwICsyMzc4LDEwIEBACiAJaW50IGVycj0wOwogCiAJaWYgKG5ld3NvY2stPnNrICE9IE5VTEwpewotCQl3YW5waXBlX2tpbGxfc29ja19hY2NlcHQobmV3c29jay0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KKwogCS5kZXNjID0gewogCQkuc2FkYl9hbGdfaWQgPSBTQURCX1hfQUFMR19OVUxMLAogCQkuc2FkYl9hbGdfaXZsZW4gPSAwLApAQCAtNTcsNyArNTcsNyBAQAogCQkJLmljdl9mdWxsYml0cyA9IDEyOCwKIAkJfQogCX0sCi0JCisKIAkuZGVzYyA9IHsKIAkJLnNhZGJfYWxnX2lkID0gU0FEQl9BQUxHX01ENUhNQUMsCiAJCS5zYWRiX2FsZ19pdmxlbiA9IDAsCkBAIC0xNDIsMTQgKzE0MiwxNCBAQAogewogCS5uYW1lID0gImVjYihjaXBoZXJfbnVsbCkiLAogCS5jb21wYXQgPSAiY2lwaGVyX251bGwiLAotCQorCiAJLnVpbmZvID0gewogCQkuZW5jciA9IHsKIAkJCS5ibG9ja2JpdHMgPSA4LAogCQkJLmRlZmtleWJpdHMgPSAwLAogCQl9CiAJfSwKLQkKKwogCS5kZXNjID0gewogCQkuc2FkYl9hbGdfaWQgPQlTQURCX0VBTEdfTlVMTCwKIAkJLnNhZGJfYWxnX2l2bGVuID0gMCwKQEAgLTI0OCwyMiArMjQ4LDIyIEBACiAJfQogfSwKIHsKLSAgICAgICAgLm5hbWUgPSAiY2JjKHNlcnBlbnQpIiwKLSAgICAgICAgLmNvbXBhdCA9ICJzZXJwZW50IiwKKwkubmFtZSA9ICJjYmMoc2VycGVudCkiLAorCS5jb21wYXQgPSAic2VycGVudCIsCiAKLSAgICAgICAgLnVpbmZvID0gewotICAgICAgICAgICAgICAgIC5lbmNyID0gewotICAgICAgICAgICAgICAgICAgICAgICAgLmJsb2NrYml0cyA9IDEyOCwKLSAgICAgICAgICAgICAgICAgICAgICAgIC5kZWZrZXliaXRzID0gMTI4LAotICAgICAgICAgICAgICAgIH0KLSAgICAgICAgfSwKKwkudWluZm8gPSB7CisJCS5lbmNyID0geworCQkJLmJsb2NrYml0cyA9IDEyOCwKKwkJCS5kZWZrZXliaXRzID0gMTI4LAorCQl9CisJfSwKIAotICAgICAgICAuZGVzYyA9IHsKLSAgICAgICAgICAgICAgICAuc2FkYl9hbGdfaWQgPSBTQURCX1hfRUFMR19TRVJQRU5UQ0JDLAotICAgICAgICAgICAgICAgIC5zYWRiX2FsZ19pdmxlbiA9IDgsCi0gICAgICAgICAgICAgICAgLnNhZGJfYWxnX21pbmJpdHMgPSAxMjgsCi0gICAgICAgICAgICAgICAgLnNhZGJfYWxnX21heGJpdHMgPSAyNTYsCi0gICAgICAgIH0KKwkuZGVzYyA9IHsKKwkJLnNhZGJfYWxnX2lkID0gU0FEQl9YX0VBTEdfU0VSUEVOVENCQywKKwkJLnNhZGJfYWxnX2l2bGVuID0gOCwKKwkJLnNhZGJfYWxnX21pbmJpdHMgPSAxMjgsCisJCS5zYWRiX2FsZ19tYXhiaXRzID0gMjU2LAorCX0KIH0sCiB7CiAJLm5hbWUgPSAiY2JjKGNhbWVsbGlhKSIsCkBAIC0yODMsMjIgKzI4MywyMiBAQAogCX0KIH0sCiB7Ci0gICAgICAgIC5uYW1lID0gImNiYyh0d29maXNoKSIsCi0gICAgICAgIC5jb21wYXQgPSAidHdvZmlzaCIsCi0gICAgICAgICAgICAgICAgIAotICAgICAgICAudWluZm8gPSB7Ci0gICAgICAgICAgICAgICAgLmVuY3IgPSB7Ci0gICAgICAgICAgICAgICAgICAgICAgICAuYmxvY2tiaXRzID0gMTI4LAotICAgICAgICAgICAgICAgICAgICAgICAgLmRlZmtleWJpdHMgPSAxMjgsCi0gICAgICAgICAgICAgICAgfQotICAgICAgICB9LAorCS5uYW1lID0gImNiYyh0d29maXNoKSIsCisJLmNvbXBhdCA9ICJ0d29maXNoIiwKIAotICAgICAgICAuZGVzYyA9IHsKLSAgICAgICAgICAgICAgICAuc2FkYl9hbGdfaWQgPSBTQURCX1hfRUFMR19UV09GSVNIQ0JDLAotICAgICAgICAgICAgICAgIC5zYWRiX2FsZ19pdmxlbiA9IDgsCi0gICAgICAgICAgICAgICAgLnNhZGJfYWxnX21pbmJpdHMgPSAxMjgsCi0gIC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1x3K1xzKlwqKVxzKihbYS16QS1aMC05X346XSspXHMqXCgoW15ce10qKVwpLyB8fAogCSRwcm90b3R5cGUgPX4gbS9eKFx3K1xzK1x3K1xzK1x3K1xzK1x3KylccysoW2EtekEtWjAtOV9+Ol0rKVxzKlwoKFteXHtdKilcKS8gfHwKLQkkcHJvdG90eXBlID1+IG0vXihcdytccytcdytccytcdytccytcdytccypcKilccyooW2EtekEtWjAtOV9+Ol0rKVxzKlwoKFteXHtdKilcKS8pICB7CisJJHByb3RvdHlwZSA9fiBtL14oXHcrXHMrXHcrXHMrXHcrXHMrXHcrXHMqXCopXHMqKFthLXpBLVowLTlffjpdKylccypcKChbXlx7XSopXCkvIHx8CisJJHByb3RvdHlwZSA9fiBtL14oXHcrXHMrXHcrXHMqXCpccypcdytccypcKlxzKilccyooW2EtekEtWjAtOV9+Ol0rKVxzKlwoKFteXHtdKilcKS8pICB7CiAJJHJldHVybl90eXBlID0gJDE7CiAJJGRlY2xhcmF0aW9uX25hbWUgPSAkMjsKIAlteSAkYXJncyA9ICQzOwpAQCAtMTcxMCw2ICsxNzIxLDcgQEAKICAgICBteSAkZmlsZTsKICAgICBteSAkaWRlbnRpZmllcjsKICAgICBteSAkZnVuYzsKKyAgICBteSAkZGVzY3I7CiAgICAgbXkgJGluaXRpYWxfc2VjdGlvbl9jb3VudGVyID0gJHNlY3Rpb25fY291bnRlcjsKIAogICAgIGlmIChkZWZpbmVkKCRFTlZ7J1NSQ1RSRUUnfSkpIHsKQEAgLTE3NTMsNyArMTc2NSwxMiBAQAogCiAJCSRzdGF0ZSA9IDI7CiAJCWlmICgvLSguKikvKSB7Ci0JCSAgICAkZGVjbGFyYXRpb25fcHVycG9zZSA9IHhtbF9lc2NhcGUoJDEpOworCQkgICAgIyBzdHJpcCBsZWFkaW5nL3RyYWlsaW5nL211bHRpcGxlIHNwYWNlcyAjUkREOlQ6CisJCSAgICAkZGVzY3I9ICQxOworCQkgICAgJGRlc2NyID1+IHMvXlxzKi8vOwor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