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dHIsIFVJTlQzMiBudW0pOworCisKK3N0YXRpYyB2b2lkIHdsYW5fc2V0X2NoYW5nZV9zc2lkX2tleV9zdGF0dXMoKQoreworCS8vWnNzaWRfU2VuZE1zZ0Zyb21RdWV1ZShNT0RVTEVfSURfTU1JLCBNU0dfQ01EX01PRElGWV9TU0lEX0tFWSwgMCwgTlVMTCk7CisJaXBjX3NlbmRfbWVzc2FnZSAoTU9EVUxFX0lEX1pTU0lELCBNT0RVTEVfSURfTU1JLCBNU0dfQ01EX01PRElGWV9TU0lEX0tFWSwgMCwgTlVMTCwgMCk7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCivvv73vv73vv73vv73vv73vv73vv73vv706xrTvv73vv71TU0lEICwgYyDOqu+/ve+/ve+/vdO377+977+977+9bnVtzqrvv73vv73vv73Gte+/vW1hY++/ve+/vc67CisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBJTlQgbWFrZV91c2VyX21hYyAoQ0hBUiAqIHNfbWFjKQoreworCUNIQVIgbGFzdF9tYWNbMjBdID0gezB9OworCUNIQVIgc3NpZFs0MF0gPSB7MH07CisJQ0hBUiBtX3NzaWRbNDBdID0gezB9OworICAgIENIQVIgc3NpZF9jbWRbMTI4XSA9IHswfTsKKwlDSEFSIHNMYXN0Ynl0ZVszXSA9IHswfTsKKwlJTlQgbnVtID0gMDsKKwlJTlQgaSA9IDA7CisJaW50IHJldCA9IDA7CisJY2ZnX2dldF9pdGVtICgid2lmaV9zc2lkX2dlbl93aXRoX21hY19sYXN0Ynl0ZSIsIHNMYXN0Ynl0ZSwgMyk7CisJZm9yIChpID0gMDsgaSA8IHN0cmxlbiAoc0xhc3RieXRlKTsgaSsrKSB7CisJCW51bSA9IChzTGFzdGJ5dGV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ldIC0gJzAnKSArIHJudW0gKiAxMDsKKwl9CisKKyAgICBybnVtID0gcm51bSAlIDI2OworCSooa2V5ICsga2V5X2xlbikgPSAnQScgKyBybnVtOworCisJcm51bSA9IDA7CisJZm9yIChpID0gMDsgaSA8IGtleV9sZW47IGkrKykgeworCQlybnVtID0gKGtleVtrZXlfbGVuIC0gMSAtIGldIC0gJzAnKSArIHJudW0gKiAxMDsKKwl9CisKKwlybnVtID0gcm51bSAlIDI2OworCSooa2V5ICsga2V5X2xlbiArIDEpID0gJ2EnICsgcm51bTsKKworCXJudW0gPSAwOworCWZvciAoaSA9IDA7IGkgPCBrZXlfbGVuIC8gMjsgaSsrKSB7CisJCXJudW0gPSAoa2V5W2ldIC0gJzAnKSArIHJudW0gKiAxMDsKKwl9CisKKwlybnVtID0gcm51bSAlIChzaXplb2YocHVuY3QpL3NpemVvZihwdW5jdFswXSkpOworCSooa2V5ICsga2V5X2xlbiArIDIpID0gcHVuY3Rbcm51bV07CisKKwlwcmludGYoIm1ha2VfcGFzc3dvcmRfc3Ryb25nOiVzXG4iLCBrZXkpOworCisJdG1wY2hhciA9ICooa2V5KTsKKwkqKGtleSkgPSAqKGtleSArIGtleV9sZW4pOworCSooa2V5ICsga2V5X2xlbikgPSB0bXBjaGFyOworCisJdG1wY2hhciA9ICooa2V5ICsgMSk7CisJKihrZXkgKyAxKSA9ICooa2V5ICsga2V5X2xlbiArIDEpOworCSooa2V5ICsga2V5X2xlbiArIDEpID0gdG1wY2hhcjsKKworfQorI2VuZGlmCitzdGF0aWMgVk9JRCBnZW5lcmF0ZV9hc2NpaV9wYXNzd29yZCAoQ0hBUiAqbWFjZHIsIENIQVIgKm91dGtleSwgSU5UIG91dGtleWxlbikKK3sKKwlTSE9SVCBpID0gMDsKKwlTSE9SVCBqID0gMDsKKwlVQ0hBUiB0ID0gMDsKKwlTSE9SVCByZXQgPSAtMTsKKwlDSEFSIGltZWlbMTZdID0gezB9OworCUNIQVIgb25seV9kaWdpdF9rZXl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FuZG9tX3N0cmluZyhjaGFyICpzdHIsIGludCBzZWVkKSAKK3sKKwlpbnQgaSA9IDA7CisJaW50IHJhbmRvbV9pbmRleCA9IDA7CisgICAgY29uc3QgY2hhciBjaGFyc2V0W10gPSAiYWJjZGVmZ2hqa21ucHFyc3R1d3h5ekFDREVGR0hKS0xNTlBRUlNUVVdYWVoyMzQ1Njc5IjsKKyAgICBjb25zdCBpbnQgY2hhcnNldFNpemUgPSBzaXplb2YoY2hhcnNldCkgLSAxOyAKKworICAgIGlmIChzdHIgPT0gTlVMTCkKKwl7CisgICAgICAgIHdmX2xvZygiUHJvdmlkZWQgc3RyaW5nIGRvZXMgbm90IGhhdmUgZW5vdWdoIHNwYWNlIHRvIHN0b3JlIHRoZSByZXN1bHQuXG4iKTsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKworCXNyYW5kKHNlZWQpOworCisgICAgZm9yIChpID0gMDsgaSA8IDg7IGkrKykgCisJeworICAgICAgICByYW5kb21faW5kZXggPSByYW5kKCkgJSBjaGFyc2V0U2l6ZTsKKyAgICAgICAgc3RyW2ldID0gY2hhcnNldFtyYW5kb21faW5kZXhdOworICAgIH0KKworICAgIHN0cls4XSA9ICdcMCc7CisKKwlyZXR1cm47Cit9CisKK3N0YXRpYyB2b2lkIHJlbW92ZV9jaGFycyhjaGFyICpzdHIpIAoreworCWludCBpID0gMDsKKyAgICBpbnQgbGVuID0gc3RybGVuKHN0cik7CisgICAgaWYgKGxlbiA8IDYpIAorCXsKKyAgICAgICAgcmV0dXJuOworICAgIH0KKworICAgIGZvciAoaSA9IDM7IGkgPCBsZW4gLSAzOyArK2kpIAorCXsKKyAgICAgICAgc3RyW2ldID0gc3RyW2kgKyAzXTsKKyAgICB9CisKKyAgICBzdHJbbGVuIC0gM10gPSAnXDAnOworCisJcmV0dXJuOworfQorCitzdGF0aWMgaW50IG1ha2Vfd2lmaWtleSAoQ0hBUiAqIGtleSwgQ0hBUiAqIG1fa2V5KQoreworCWNoYXIgKmVuY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IGFkZHJlc3MgaXMgdmFsaWQuCisgKgorICogUGxlYXNlIG5vdGU6IGFkZHIgbXVzdCBiZSBhbGlnbmVkIHRvIHUxNi4KKyAqLworc3RhdGljICBpbnQgIGlzX3ZhbGlkX2V0aGVyX2FkZHIgKGNvbnN0IHVuc2lnbmVkIGNoYXIgKmFkZHIpCit7CisJLyogRkY6RkY6RkY6RkY6RkY6RkYgaXMgYSBtdWx0aWNhc3QgYWRkcmVzcyBzbyB3ZSBkb24ndCBuZWVkIHRvCisJICogZXhwbGljaXRseSBjaGVjayBmb3IgaXQgaGVyZS4gKi8KKwlyZXR1cm4gIWlzX211bHRpY2FzdF9ldGhlcl9hZGRyIChhZGRyKSAmJiAhaXNfemVyb19ldGhlcl9hZGRyIChhZGRyKTsKK30KKworLyoKKworKi8KK3N0YXRpYyBpbnQgIGlzX3ZhbGlkX21hYyAoY29uc3QgY2hhciAqbWFjKQoreworCXVuc2lnbmVkIGNoYXIgYVs2XSA9IHswfTsKKworCWEyeHggKG1hYywgYSk7CisKKwl3Zl9sb2cgKCJhZGRyPSUwMnglMDJ4JTAyeCUwMnglMDJ4JTAyeCIsIGFbMF0sIGFbMV0sIGFbMl0sIGFbM10sIGFbNF0sIGFbNV0pOworCXJldHVybiBpc192YWxpZF9ldGhlcl9hZGRyICggKGNvbnN0IHVuc2lnbmVkIGNoYXIgKikgYSk7CisKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKK++/ve+/ve+/ve+/ve+/ve+/ve+/ve+/vTrvv73vv73vv73vv71NQUMg77+977+91rcKKwor77+9w7Pvv71tYWPvv73vv73WtworCivvv73vv73vv73vv71zc2lkIO+/ve+/vXdpZmlrZXkKKwor0LRzc2lkIO+/ve+/vXdpZmlrZXkgbnbWtQorCivvv73vv73NqNC+xqzvv73vv73SqtC077+967W9IC9tbnQvamZmczIvZmlybXdhcmUvbnZyYW1fYmNtZGhkLnR4dCDvv73EvO+/ve+/ve+/vQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdGF0aWMgVk9JRCB3bGFuX3NldFdpZmlOViAoQ0hBUiAqbWFjYWRkcmVzcykKK3sKKwlDSEFSIG1hY1szMl0gICA9IHswfTsKKwlDSEFSIG1fbWFjWzMyXSA9IHswfTsKKworCUNIQVIgKnAgPSBOVUxMOworCUNIQVIgcmVhZF9tYWNbMzJdID0gezB9OworCUNIQVIgb3V0cGFzc3dvcmRbMzJdID0gezB9OworCUNIQVIgd2lmaV9tYWNfbnVtX3N0clszXSA9IHswfTsgLy8gaW5kaWNhdGUgdGhlIG51bWJlciBvZiBtYWMgbmVlZGVkCisJQ0hBUiBtX3JlYWRfbWFjWzMyXSA9IHswfTsKKwlDSEFSIG1fb3V0cGFzc3dvcmRbMzJdID0gezB9OworCUNIQVIgd2lmaV9rZXlfZml4ZWRbMTBdID0gezB9OworCisJaW50ICB3aWZpX21hY19udW0gPSAwOworCWludCAgcmV0ID0gLTE7CisKKwlJTlQgIGkgPSAwOworCUlOVCAgdmFsaWRfbWFjID0gMDsKKwlJTlQgIGxlbiA9IDAsIGxlbjEgPSAwOworCWNoYXIgZ2VuZXJhdGVfc2VlZFszMl0gPSB7MH07CisJY2hhciBtX2dlbmVyYXRlX3NlZWRbMzJdID0gezB9OworCWludCBzZWVkID0gMDsKKwlpbnQgbV9zZWVkID0gMDsKKworCXJldCA9IGNmZ19nZXRfaXRlbSAoIndpZmlfbWFjX251bSIsIHdpZmlfbWFjX251bV9zdHIsIHNpemVvZiAod2lmaV9tYWNfbnVtX3N0cikpOworCWlmIChyZXQgPT0gMCkgeworCQl3aWZpX21hY19udW0gPSBhdG9pICh3aWZpX21hY19udW1fc3RyKTsKKwl9IGVsc2UgeworCQl3aWZpX21hY19udW0gPSAxOworCX0KKworCWxlbiA9IHN0cmxlb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