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jZmlsdGVyLmMJCQkJCQkgICAqLworLyogIFB1cnBvc2UgOiBGaWx0ZXIgZ21ha2UvY2Mgb3V0cHV0IGludG8gYSBzdGFuZGFyZGl6ZWQgZm9ybQkJICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisvKgkgICBDcmVhdGVkIE9uOiAxMi1TZXAtOTUgMjA6MzIJCQkJCSAgICovCisvKiAgTGFzdCBtb2RpZmljYXRpb246IDAzLUZlYi05OAkJCQkJICAgKi8KKy8qICAtZSBvcHRpb24gYWRkZWQgYnkgQmVybmQgRmVpZ2UJCQkJCSAgICovCisvKiA9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSAqLworLyogIENvcHlyaWdodCA6CQkJCQkJCQkgICAqLworLyogICAgIFRoaXMgc291cmNlIGZpbGUgaXMgY29weXJpZ2h0IChjKSB0byBQYWJsbyBBcmllbCBLb2hhbgkJICAgKi8KKy8qID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ICovCisjZGVmaW5lIF9fQ0NGSUxURVJfQ19fCisKKyNpbmNsdWRlIDxjdHlwZS5oPgorI2luY2x1ZGUgPHN0ZGlvLmg+CisjaW5jbHVkZSA8c3RyaW5nLmg+CisjaW5jbHVkZSA8dW5pc3RkLmg+CisKKyNkZWZpbmUgTElORUxFTkdUSCAyMDQ4CisKKy8qIENvbGxlY3RvcihzKSAqLworY2hhcgkgICAgICAgTGluZVtMSU5FTEVOR1RIXTsKK2NoYXIJICAgICAgIExpbmUyW0xJTkVMRU5HVEhdOworLyogQ29tcG9uZW50cyAqLworY2hhcgkgICAgICAgRmlsZU5hbWVbMTAyNF07CitjaGFyCSAgICAgICBCYXNlUGF0aFsxMDI0XTsKK2NoYXIJICAgICAgIENXRF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BpbnQgICBydiwgaSwgaiwgb2s7CisgIGludCAgIHN0YXk7CisgIGludCAgIHByZWZldGNoOworICBjaGFyICpwOworICBpbnQgICBkZWNfY29sID0gMDsgLyogRGVjcmVtZW50IGNvbHVtbiB2YWx1ZSBieSAxICovCisgIGludCAgIGRlY19yb3cgPSAwOyAvKiBEZWNyZW1lbnQgcm93ICAgIHZhbHVlIGJ5IDEgKi8KKyAgaW50ICAgZWNobyA9IDA7ICAgIC8qIEVjaG8gc3RkaW4gdG8gc3RkZXJyICovCisgIGludCAgIHZlcmJvc2UgPSAwOyAvKiBJbmNsdWRlIEJhZCBGb3JtYXR0ZWQgTGluZXMgKi8KKyAgaW50ICAgQ1dEbGVuOworICBpbnQgICBDT01QSUxFUiA9IENPTVBJTEVSX0RFRkFVTFQ7CisKKyAgZ2V0Y3dkKCBDV0QsIHNpemVvZihDV0QpICk7CisgIENXRGxlbiA9IHN0cmxlbihDV0QpOworCisgIGZvciAoaT0xOyBpPGFyZ2M7IGkrKykKKyAgICB7CisgICAgICBpZiAoYXJndltpXVswXSAhPSAnLScpCisJcmV0dXJuIFNob3dVc2FnZSgiIik7CisgICAgICBzd2l0Y2ggKCBhcmd2W2ldWzFdICkKKwl7CisJICBjYXNlICdjJzoKKwkgICAgZGVjX2NvbCA9IDE7CisJICAgIGJyZWFrOworCSAgY2FzZSAncic6CisJICAgIGRlY19yb3cgPSAxOworCSAgICBicmVhazsKKwkgIGNhc2UgJ2UnOgorCSAgICBlY2hvID0gMTsKKwkgICAgYnJlYWs7CisJICBjYXNlICd2JzoKKwkgICAgdmVyYm9zZSA9IDE7CisJICAgIGJyZWFrOworCSAgY2FzZSAnbyc6CisJICAgICAgeworCQlpZiAoaSsxID49IGFyZ2MpCisJCSAgICByZXR1cm4gU2hvd1VzYWdlKCJFcnJvcjogTWlzc2luZyBwYXJhbWV0ZXIgZm9yIC1vXG4iKTsKKwkJaSsrOworCQlDT01QSUxFUiA9IC0xOworCQlmb3IgKGo9MTsgajxDT01QSUxFUl9RVFk7IGorKykKKwkJICAgIGlmICggIChzdHJjbXAoYXJndltpXSwgQ09NUElMRVJfTmFtZXNbal1bMF0pID09IDApIHx8CisJCQkgICggKGFyZ3ZbaV1bMF0gPT0gJ18nKSAmJgorCQkJICAgIChzdHJjbXAoJmFyZ3ZbaV1bMV0sIENPTVBJTEVSX05hbWVzW2pdWzBdKSA9PSAwKSApCSkKKwkJCUNPTVBJTEVSID0gajsKKwkJaWYgKENPTVBJTEVSID09IC0xKQorCQkgICAgcmV0dXJuIFNob3dVc2FnZSgiRXJyb3I6IEludmFsaWQgQ09NUElMRVIgc3BlY2lmaWVkXG4iKTsKKwkgICAgICB9CisJICAgIGJyZWFrOworCSAgY2FzZSAnaCc6CisJICAgIHJldHVybiBTaG93VXNhZ2UoIiIpOworCSAgZGVmYXVsdDoKKwkgICAgcmV0dXJuIFNob3dVc2FnZSgiRXJyb3I6IEludmFsaWQgb3B0aW9uXG4iKTsKKwl9CisgICAgfQorICBpZiAoQ09NUElMRVIgPT0gMCkKKyAgICAgIHJldHVybiBTaG93VXNhZ2UoIkVycm9yOiBDT01QSUxFUiBtdXN0IGJlIHNwZWNpZmllZCBpbiB0aGlzIHN5c3RlbVxuIik7CisKKyAgc3RheQkgICA9ICggZWNob2dldHMoTGluZSwgZWNobykgIT0gTlVMTCApOworICBwcmVmZXRjaCA9IDA7CisKKyAgd2hpbGUoIHN0YXkgKQorICAgIHsKKyAgICAgICpGaWxlTmFtZSA9IDA7CisgICAgICBSb3cJPSAwOworICAgICAgQ29sCT0gMDsKKyAgICAgIFNldmVyaXR5CT0gJyAnOworICAgICAgKlJlYXNvbgk9IDA7CisgICAgICBvawk9IDA7CisgICAgICBzd2l0Y2ggKENPTVBJTEVSKQorCXsKKwkgIGNhc2UgQ09NUElMRVJfR0NDOgorCSAgICBTZXZlcml0eSA9ICdlJzsKKyNpZmRlZiBHT1RPX0ZST01fV0hFUkVfSU5DTFVERUQKKwkgICAgcnYgPSBzc2NhbmYoIExpbmUsICJJbiBmaWxlIGluY2x1ZGVkIGZyb20gJVteOl06JXU6IiwKKwkJCSAgICAgICBGaWxlTmFtZSwgJlJvdyApOworCSAgICBpZiAoIHJ2ID09IDIgKQorCSAgICAgIHsKKwkJb2sgPSAoZWNob2dldHMoUmVhc29uLCBlY2hvKSAhPSBOVUxMKTsKKwkgICAgICB9CisJICAgIGVsc2UKKyNlbmRpZgorCSAgICAgIHsKKwkJaWYgKChydiA9IHNzY2FuZiggTGluZSwgIiVbXjpdOiV1OiB3YXJuaW5nOiAlW15cbl0iLAorCQkJCSAgIEZpbGVOYW1lLCAmUm93LCBSZWFzb24gKSk9PTMpIHsKKwkJIFNldmVyaXR5ID0gJ3cnOworCQl9IGVsc2UgeworCQlydiA9IHNzY2FuZiggTGluZSwgIiVbXjpdOiV1OiAlW15cbl0iLAorCQkJCSAgIEZpbGVOYW1lLCAmUm93LCBSZWFzb24gKTsKKwkJfQorCQlvayA9ICggcnYgPT0gMyApOworCSAgICAgIH0KKwkgICAgQ29sID0gKGRlY19jb2wgPyAxIDogMCApOworCSAgICBicmVhazsKKwkgIGNhc2UgQ09NUElMRVJfQUlYOgorCSAgICBydiA9IHNzY2FuZiggTGluZSwgIlwiJVteXCJdXCIsIGxpbmUgJXUuJXU6ICUqcyAoJWMpICVbXlxuXSIsCisJCQkgICAgICAgRmlsZU5hbWUsICZSb3csICZDb2wsICZTZXZlcml0eSwgUmVhc29uICk7CisJICAgIG9rID0gKCBydiA9PSA1ICk7CisJICAgIGJyZWFrOworCSAgY2FzZSBDT01QSUxFUl9IUFVYOgorCSAgICBydiA9IHNzY2FuZiggTGluZSwgImNjOiBcIiVbXlwiXVwiLCBsaW5lICV1OiAlYyUqW146XTogJVteXG5dIiwKKwkJCSAgICAgICBGaWxlTmFtZSwgJlJvdywgJlNldmVyaXR5LCBSZWFzb24gKTsKKwkgICAgb2sgPSAoIHJ2ID09IDQgKTsKKwkgICAgQ29sID0gKGRlY19jb2wgPyAxIDogMCApOworCSAgICBicmVhazsKKwkgIGNhc2UgQ09NUElMRVJfU09MQVJJUzoKKwkgICAgcnYgPSBzc2NhbmYoIExpbmUsICJcIiVbXlwiXVwiLCBsaW5lICV1OiB3YXJuaW5nOiAlW15cbl0iLAorCQkJICAgICAgIEZpbGVOYW1lLCAmUm93LCBSZWFzb24gKTsKKwkgICAgU2V2ZXJpdHkgPSAndyc7CisJICAgIG9rID0gKCBydiA9PSAzICk7CisJICAgIGlmICggcnYgIT0gMyApCisJICAgICAgeworCQlydiA9IHNzY2FuZiggTGluZSwgIlwiJVteXCJdXCIsIGxpbmUgJXU6ICVbXlxuXSIsCisJCQkJICAgRmlsZU5hbWUsICZSb3csIFJlYXNvbiApOworCQlTZXZlcml0eSA9ICdlJzsKKwkJb2sgPSAoIHJ2ID09IDMgKTsKKwkgICAgICB9CisJICAgIENvbCA9IChkZWNfY29sID8gMSA6IDAgKTsKKwkgICAgYnJlYWs7CisJICBjYXNlIENPTVBJTEVSX0FUVDoKKwkgICAgcnYJID0gc3NjYW5mKCBMaW5lLCAiJWMgXCIlW15cIl1cIixMJXUvQyV1JSpbXjpdOiVbXlxuXSIsCisJCQkJICZTZXZlcml0eSwgRmlsZU5hbWUsICZSb3csICZDb2wsIFJlYXNvbiApOworCSAgICBvayA9ICggcnYgPT0gNSApOworCisJICAgIGlmIChydiAhPSA1KQorCSAgICAgIHsgcnYgICA9IHNzY2FuZiggTGluZSwgIiVjIFwiJVteXCJdXCIsTCV1L0MldTogJVteXG5dIiwKKwkJCQkgICAgICZTZXZlcml0eSwgRmlsZU5hbWUsICZSb3csICZDb2wsIFJlYXNvbiApOworCQlvayA9ICggcnYgPT0gNSApOworCSAgICAgIH0KKworCSAgICBpZiAocnYgIT0gNSkKKwkgICAgICB7IHJ2ICA9IHNzY2FuZiggTGluZSwgIiVjIFwiJVteXCJdXCIsTCV1OiAlW15cbl0iLAorCQkJCSAgICZTZXZlcml0eSwgRmlsZU5hbWUsICZSb3csIFJlYXNvbiApOworCQlvayA9ICggcnYgPT0gNCApOworCQlDb2wgPSAoZGVjX2NvbCA/IDEgOiAwICk7CisJICAgICAgfQorCisJICAgIHN0YXkgPSAoZWNob2dldHMoTGluZTIsIGVjaG8pICE9IE5VTEwpOworCSAgICB3aGlsZSAoIHN0YXkgJiYgKExpbmUyWzBdID09ICd8JykgKQorCSAgICAgIHsgZm9yIChwPSZMaW5lMlsyXTsgKCpwKSAmJiAoaXNzcGFjZSgqcCkpOyBwKyspOworCQlzdHJjYXQoIFJlYXNvbiwgIjogIiApOworCQlzdHJjYXQoIFJlYXNvbiwgcCApOworCQlMaW5lMlswXSA9IDA7CisJCXN0YXkgPSAoZWNob2dldHMoTGluZTIsIGVjaG8pICE9IE5VTEwpOworCSAgICAgIH0KKwkgICAgcHJlZmV0Y2ggPSAxOworCSAgICBzdHJjcHkoIExpbmUsIExpbmUyICk7CisJICAgIGJyZWFrOworCSAgY2FzZSBDT01QSUxFUl9JUklYOgorCSAgICBDb2wgICAgICAgPSAxOworCSAgICBwcmVmZXRjaCAgPSAwOworCSAgICBydgkgICAgICA9IDA7CisJICAgIG9rCSAgICAgID0gMDsKKwkgICAgaWYgKCAhc3RybmNtcChMaW5lLCAiY2ZlOiAiLCA1KSApCisJICAgICAgeyBwID0gJkxpbmVbNV07CisJCVNldmVyaXR5ID0gdG9sb3dlcigqcCk7CisJCXAgPSBzdHJjaHIoICZMaW5lWzVdLCAnOicgKTsKKwkJaWYgKHAgPT0gTlVMTCkKKwkJICB7IG9rID0gMDsKKwkJICB9CisJCSBlbHNlCisJCSAgeworCQkgICAgcnYgPSBzc2NhbmYoIHArMiwgIiVbXjpdOiAldTogJVteXG5dIiwKKwkJCQkgRmlsZU5hbWUsICZSb3csIFJlYXNvbiApOworCQkgICAgaWYgKHJ2ICE9IDMpCisJCSAgICAgIHJ2ID0gc3NjYW5mKCBwKzIsICIlW14sXSwgbGluZSAldTogJVteXG5dIiwKKwkJCQkgICBGaWxlTmFtZSwgJlJvdywgUmVhc29uICk7CisJCSAgICBvayA9ICggcnYgPT0gMyApOworCQkgIH0KKworCQlpZiAob2spCisJCSAgeyBwcmVmZXRjaCA9IDE7CisJCSAgICBzdGF5ID0gKGVjaG9nZXRzKExpbmUsIGVjaG8pICE9IE5VTEwpOworCQkgICAgaWYgKExpbmVbMF0gPT0gJyAnKQorCQkgICAgICBzdGF5ID0gKGVjaG9nZXRzKExpbmUyLCBlY2hvKSAhPSBOVUxMKTsKKwkJICAgIGlmICggIChMaW5lMlswXSA9PSAnICcpICYmCisJCQkgICggKExpbmUyWzFdID09ICctJykgfHwgKExpbmUyWzFdID09ICdeJykgKSAgKQorCQkgICAgICB7IENvbCA9IHN0cmxlbihMaW5lMiktMTsKKwkJCXByZWZldGNoID0gMDsKKwkJICAgICAgfQorCQkgICAgIGVsc2UKKwkJICAgICAgeyBzdHJjYXQoIExpbmUsICJcbiIgKTsKKwkJCXN0cmNhdCggTGluZSwgTGluZTIgKTsKKwkJICAgICAgfQorCQkgIH0KKwkgICAgICB9CisJICAgIGJyZWFrOworCX0KKyAgICAgIGlmIChkZWNfY29sKSBDb2wtLTsKKyAgICAgIGlmIChkZWNfcm93KSBSb3ctLTsKKyAgICAgIGlmICghb2spCisJeworCSAgaWYgKCBMaW5lWzBdID09ICdnJyApCisJICAgICAgcCA9ICZMaW5lWzFdOworCSAgZWxzZQorCSAgICAgIHAgPSAmTGluZVswXTsKKwkgIG9rID0gc3NjYW5mKCBwLCAibWFrZVslKmRdOiBFbnRlcmluZyBkaXJlY3RvcnkgYCVbXiddIiwKKwkJICAgICAgIEJhc2VQYXRoICk7CisJICBpZiAodmVyYm9zZSkKKwkgICAgcHJpbnRmKCAiWyV1XT8lc1xuIiwgb2ssIExpbmUgKTsKKwl9CisgICAgICAgZWxzZQorCXsKKwkgIGZvciAocD1SZWFzb247ICgqcCkgJiYgKGlzc3BhY2UoKnApKTsgcCsrKTsKKwkgIGlmICggQmFzZVBhdGhbQ1dEbGVuXSA9PSAwICkKKwkgICAgICBwcmludGY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it1bmxlc3MgKCRhcmdzID09IDEpIHsKKyAgZGllKCJVc2FnZTogdmltY2NwYXJzZSA8b3V0cHV0IGZpbGVuYW1lPlxuIik7Cit9CisKKyRmaWxlbmFtZSA9IEBBUkdWWzBdOworb3BlbiAoT1VULCAiPiRmaWxlbmFtZSIpIHx8IGRpZSAoIkNhbid0IG9wZW4gZmlsZTogXCIkZmlsZW5hbWVcIiIpOworCit3aGlsZSAoPFNURElOPikgeworICBwcmludDsKKyAgaWYgKCAgICgvIiguKikiLCBsaW5lIChcZCspOiAoZSlycm9yXCgoXGQrKVwpOi8pCisgICAgICB8fCAoLyIoLiopIiwgbGluZSAoXGQrKTogKHcpYXJuaW5nXCgoXGQrKVwpOi8pICkgeworICAgICRmaWxlPSQxOworICAgICRsaW5lPSQyOworICAgICRlcnJvcnR5cGU9Ilx1JDMiOworICAgICRlcnJvcm5yPSQ0OworICAgIGNob3AoJGVycm9ybXNnPTxTVERJTj4pOworICAgICRlcnJvcm1zZyA9fiBzL15ccyovLzsKKyAgICAkc291cmNlbGluZT08U1RESU4+OworICAgICRjb2x1bW49aW5kZXgoPFNURElOPiwgIl4iKSAtIDE7CisKKyAgICBwcmludCBPVVQgIiRmaWxlPiRsaW5lOiRjb2x1bW46JGVycm9ydHlwZTokZXJyb3JucjokZXJyb3Jtc2dcbiI7CisgIH0KK30KKworY2xvc2UoT1VUKTsKK2V4aXQoMCk7CmRpZmYgLS1naXQgYS9ydW50aW1lL3Rvb2xzL2VmbV9maWx0ZXIudHh0IGIvcnVudGltZS90b29scy9lZm1fZmlsdGVyLnR4dApuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi5kM2Y5N2Y0Ci0tLSAvZGV2L251bGwKKysrIGIvcnVudGltZS90b29scy9lZm1fZmlsdGVyLnR4dApAQCAtMCwwICsxLDMxIEBACitbYWRvcHRlZCBmcm9tIGEgbWVzc2FnZSB0aGF0IEl2ZXMgcG9zdGVkIGluIHRoZSBWaW0gbWFp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ICAgIHByaW50ICIgICAgLS12YXJzICgtLW5vdmFycykgICAgIChkb24ndCkgaW5jbHVkZSB2YXJpYWJsZSBkZWNsYXJhdGlvbnMgaW4gdGFnIGZpbGVcbiI7CisgICAgcHJpbnQgIiAgICAtLXBrZ3MgKC0tbm9wa2dzKSAgICAgKGRvbid0KSBpbmNsdWRlIHBhY2thZ2UgZGVjbGFyYXRpb25zIGluIHRhZyBmaWxlXG4iOworICAgIHByaW50ICIgICAgLS1leHRlbnNpb25zICgtLW5vZXh0ZW5zaW9ucylcbiI7CisgICAgcHJpbnQgIiAgICAgICAgICAgICAgICAgICAgICAgICAgKGRvbid0KSBpbmNsdWRlIEV4dWJlcmFudCBDdGFncyAvIFZpbSBzdHlsZVxuIjsKKyAgICBwcmludCAiICAgICAgICAgICAgICAgICAgICAgICAgICBleHRlbnNpb25zIGluIHRhZyBmaWxlXG5cbiI7CisgICAgcHJpbnQgIiAgRGVmYXVsdCBvcHRpb25zOiAiOworICAgIHByaW50ICgkZG9fc3VicyA/ICItLXN1YnMgIiA6ICItLW5vc3VicyAiKTsKKyAgICBwcmludCAoJGRvX3ZhcnMgPyAiLS12YXJzICIgOiAiLS1ub3ZhcnMgIik7CisgICAgcHJpbnQgKCRkb19wa2dzID8gIi0tcGtncyAiIDogIi0tbm9wa2dzICIpOworICAgIHByaW50ICgkZG9fZXh0cyA/ICItLWV4dGVuc2lvbnNcblxuIiA6ICItLW5vZXh0ZW5zaW9uc1xuXG4iKTsKKyAgICBwcmludCAiICBFeGFtcGxlOiAkMCAqLnBsICoucG0gLi4vc2hhcmVkLyoucG1cblxuIjsKKyAgICBleGl0OworfQorCisjIExvb3AgdGhyb3VnaCBmaWxlcyBvbiBjb21tYW5kIGxpbmUgLSAnZ2xvYicgYW55IHdpbGRjYXJkcywgc2luY2UgV2luZG93cworIyBkb2Vzbid0IGRvIHRoaXMgZm9yIHVzCitmb3JlYWNoICRmaWxlIChtYXAgeyBnbG9iIH0gQEFSR1YpCit7CisgICAgI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IGVhY2ggY29tbWFuZCBhCisJCQkJICogZGlmZmVyZW50IHNlcmlhbCBudW1iZXIuICovCisgICAgWEV2ZW50CSAgICBldmVudDsKKyAgICBYUHJvcGVydHlFdmVudCAgKmUgPSAoWFByb3BlcnR5RXZlbnQgKikmZXZlbnQ7CisgICAgdGltZV90CSAgICBzdGFydDsKKyAgICBjaGFyCSAgICAqcmVzdWx0OworICAgIGNoYXIJICAgICpsb29zZW5hbWUgPSBOVUxMOworCisgICAgaWYgKGNvbW1Qcm9wZXJ0eSA9PSBOb25lICYmIGRweSAhPSBOVUxMKQorICAgIHsKKwlpZiAoU2VuZEluaXQoZHB5KSA8IDApCisJICAgIHJldHVybiBOVUxMOworICAgIH0KKworICAgIC8qCisgICAgICogQmluZCB0aGUgc2VydmVyIG5hbWUgdG8gYSBjb21tdW5pY2F0aW9uIHdpbmRvdy4KKyAgICAgKgorICAgICAqIEZpbmQgYW55IHN1cnZpdm9yIHdpdGggYSBzZXJpYWxubyBhdHRhY2hlZCB0byB0aGUgbmFtZSBpZiB0aGUKKyAgICAgKiBvcmlnaW5hbCByZWdpc3RyYW50IG9mIHRoZSB3YW50ZWQgbmFtZSBpcyBubyBsb25nZXIgcHJlc2VudC4KKyAgICAgKgorICAgICAqIERlbGV0ZSBhbnkgbGluZ2VyaW5nIG5hbWVzIGZyb20gZGVhZCBlZGl0b3JzLgorICAgICAqLworCisgICAgb2xkX2hhbmRsZXIgPSBYU2V0RXJyb3JIYW5kbGVyKHhfZXJyb3JfY2hlY2spOworICAgIHdoaWxlIChUUlVFKQorICAgIHsKKwlnb3RfeF9lcnJvciA9IEZBTFNFOworCXcgPSBMb29rdXBOYW1lKGRweSwgbmFtZSwgMCwgJmxvb3NlbmFtZSk7CisJLyogQ2hlY2sgdGhhdCB0aGUgd2luZG93IGlzIGhvdCAqLworCWlmICh3ICE9IE5vbmUpCisJeworCSAgICBwbGlzdCA9IFhMaXN0UHJvcGVydGllcyhkcHksIHcsICZyZXMpOworCSAgICBY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4KKyAgICAgKi8KKworICAgIGlmICgoZGVsZXRlKSAmJiAocmV0dXJuVmFsdWUgIT0gTm9uZSkpCisgICAgeworCWludCBjb3VudDsKKworCXdoaWxlICgqcCAhPSAwKQorCSAgICBwKys7CisJcCsrOworCWNvdW50ID0gbnVtSXRlbXMgLSAocC1yZWdQcm9wKTsKKwlpZiAoY291bnQgPiAwKQorCSAgICBtZW1jcHkoZW50cnksIHAsIGNvdW50KTsKKwlYQ2hhbmdlUHJvcGVydHkoZHB5LCBSb290V2luZG93KGRweSwgMCksIHJlZ2lzdHJ5UHJvcGVydHksIFhBX1NUUklORywKKwkJCTgsIFByb3BNb2RlUmVwbGFjZSwgcmVnUHJvcCwKKwkJCShpbnQpIChudW1JdGVtcyAtIChwLWVudHJ5KSkpOworCVhTeW5jKGRweSwgRmFsc2UpOworICAgIH0KKworICAgIFhGcmVlKHJlZ1Byb3ApOworICAgIHJldHVybiByZXR1cm5WYWx1ZTsKK30KKworICAgIHN0YXRpYyBjaGFyICoKK1NlbmRFdmVudFByb2MoZHB5LCBldmVudFB0ciwgZXhwZWN0ZWQsIGNvZGUpCisgICAgRGlzcGxheQkgICAqZHB5OworICAgIFhFdmVudAkgICAgKmV2ZW50UHRyOwkJLyogSW5mb3JtYXRpb24gYWJvdXQgZXZlbnQuICovCisgICAgaW50CQkgICAgZXhwZWN0ZWQ7CQkvKiBUaGUgb25lIHdlcmUgd2FpdGluZyBmb3IgKi8KKyAgICBpbnQJCSAgICAqY29kZTsJCS8qIFJldHVybiBjb2RlLiAwID0+IE9LICovCit7CisgICAgdW5zaWduZWQgY2hhciAgICpwcm9wSW5mbzsKKyAgICB1bnNpZ25lZCBjaGFyICAgKnA7CisgICAgaW50CQkgICAgcmVzdWx0LCBhY3R1YWxGb3JtYXQ7CisgICAgaW50CQkgICAgcmV0Q29kZTsKKyAgICB1bnNpZ25lZCBsb25nICAgbnVtSXRlbXMsIGJ5dGVzQWZ0ZXI7CisgICAgQXRvbQkgICAgYWN0dWF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WFNldEVycm9ySGFuZGxlcihvbGRfaGFuZGxlcik7CisgICAgcmV0dXJuIGdvdF94X2Vycm9yID8gLTEgOiAwOworfQorCisKKy8qCisgKiBBbm90aGVyIFggRXJyb3IgaGFuZGxlciwganVzdCB1c2VkIHRvIGNoZWNrIGZvciBlcnJvcnMuCisgKi8KKy8qIEFSR1NVU0VEICovCisgICAgc3RhdGljIGludAoreF9lcnJvcl9jaGVjayhkcHksIGVycm9yX2V2ZW50KQorICAgIERpc3BsYXkgKmRweTsKKyAgICBYRXJyb3JFdmVudAkqZXJyb3JfZXZlbnQ7Cit7CisgICAgZ290X3hfZXJyb3IgPSBUUlVFOworICAgIHJldHVybiAwOworfQorCisvKgorICogQ2hlY2sgaWYgInN0ciIgbG9va3MgbGlrZSBpdCBoYWQgYSBzZXJpYWwgbnVtYmVyIGFwcGVuZGVkLgorICogQWN0dWFsbHkganVzdCBjaGVja3MgaWYgdGhlIG5hbWUgZW5kcyBpbiBhIGRpZ2l0LgorICovCisgICAgc3RhdGljIGludAorSXNTZXJpYWxOYW1lKHN0cikKKyAgICBjaGFyICAgKnN0cjsKK3sKKyAgICBpbnQgbGVuID0gc3RybGVuKHN0cik7CisKKyAgICByZXR1cm4gKGxlbiA+IDEgJiYgaXNkaWdpdChzdHJbbGVuIC0gMV0pKTsKK30K