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0FQX1JYU1RCQ18xICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKSBCSVQoOCkpCisjZGVmaW5lIFZIVF9DQVBfUlhTVEJDXzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpIEJJVCg5KSkKKyNkZWZpbmUgVkhUX0NBUF9SWFNUQkNfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHUzMikgQklUKDgpIHwgQklUKDkpKQorI2RlZmluZSBWSFRfQ0FQX1JYU1RCQ180ICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodTMyKSBCSVQoMTApKQorI2RlZmluZSBWSFRfQ0FQX1NVX0JFQU1GT1JNRVJfQ0FQQUJMRSAgICAgICAgICAgICAgICgodTMyKSBCSVQoMTEpKQorI2RlZmluZSBWSFRfQ0FQX1NVX0JFQU1GT1JNRUVfQ0FQQUJMRSAgICAgICAgICAgICAgICgodTMyKSBCSVQoMTIpKQorI2RlZmluZSBWSFRfQ0FQX0JFQU1GT1JNRVJfQU5URU5OQVNfTUFYICAgICAgICAgICAgICgodTMyKSBCSVQoMTMpIHwgQklUKDE0KSkKKyNkZWZpbmUgVkhUX0NBUF9TT1VORElOR19ESU1FTlRJT05fTUFYICAgICAgICAgICAgICAoKHUzMikgQklUKDE2KSB8IEJJVCgxNykpCisjZGVmaW5lIFZIVF9DQVBfTVVfQkVBTUZPUk1FUl9DQVBBQkxFICAgICAgICAgICAgICAgKCh1MzIpIEJJVCgxOSkpCisjZGVmaW5lIFZIVF9DQVBfTVVfQkVBTUZPUk1FRV9DQVBBQkxFICAgICAgICAgICAgICAgKCh1MzIpIEJJVCgyMCkpCisjZGVmaW5lIFZIVF9DQVBfVkhUX1RYT1BfUFMgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpIEJJVCgyMSkpCisjZGVmaW5lIFZIVF9DQVBfSFRDX1ZIVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh1MzIpIEJJVCgyMikpCisjZGVmaW5lIFZI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0IHNvY2thZGRyICopICZmcm9tLnNzLCBmcm9tbGVuKTsKKwkJaWYgKHJlcyA8IDApIHsKKwkJCXdwYV9wcmludGYoTVNHX0VSUk9SLCAiREFTOiBzZW5kdG8odG8gJXM6JWQpOiAlcyIsCisJCQkJICAgYWJ1ZiwgZnJvbV9wb3J0LCBzdHJlcnJvcihlcnJubykpOworCQl9CisJfQorCitmYWlsOgorCXJhZGl1c19tc2dfZnJlZShtc2cpOworCXJhZGl1c19tc2dfZnJlZShyZXBseSk7Cit9CisKKworc3RhdGljIGludCByYWRpdXNfZGFzX29wZW5fc29ja2V0KGludCBwb3J0KQoreworCWludCBzOworCXN0cnVjdCBzb2NrYWRkcl9pbiBhZGRyOworCisJcyA9IHNvY2tldChQRl9JTkVULCBTT0NLX0RHUkFNLCAwKTsKKwlpZiAocyA8IDApIHsKKwkJcGVycm9yKCJzb2NrZXQiKTsKKwkJcmV0dXJuIC0xOworCX0KKworCW9zX21lbXNldCgmYWRkciwgMCwgc2l6ZW9mKGFkZHIpKTsKKwlhZGRyLnNpbl9mYW1pbHkgPSBBRl9JTkVUOworCWFkZHIuc2luX3BvcnQgPSBodG9ucyhwb3J0KTsKKwlpZiAoYmluZChzLCAoc3RydWN0IHNvY2thZGRyICopICZhZGRyLCBzaXplb2YoYWRkcikpIDwgMCkgeworCQlwZXJyb3IoImJpbmQiKTsKKwkJY2xvc2Uocyk7CisJCXJldHVybiAtMTsKKwl9CisKKwlyZXR1cm4gczsKK30KKworCitzdHJ1Y3QgcmFkaXVzX2Rhc19kYXRhICoKK3JhZGl1c19kYXNfaW5pdChzdHJ1Y3QgcmFkaXVzX2Rhc19jb25mICpjb25mKQoreworCXN0cnVjdCByYWRpdXNfZGFzX2RhdGEgKmRhczsKKworCWlmIChjb25mLT5wb3J0ID09IDAgfHwgY29uZi0+c2hhcmVkX3NlY3JldCA9PSBOVUxMIHx8CisJICAgIGNvbmYtPmNsaWVudF9hZGRyID09IE5VTEwpCisJCXJldHVybiBOVUxM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FkX2NyZWQoRklMRSAqZiwgaW50ICpsaW5lLCBpbnQgaWQpCit7CisJc3RydWN0IHdwYV9jcmVkICpjcmVkOworCWludCBlcnJvcnMgPSAwLCBlbmQgPSAwOworCWNoYXIgYnVmWzI1Nl0sICpwb3MsICpwb3MyOworCisJd3BhX3ByaW50ZihNU0dfTVNHRFVNUCwgIkxpbmU6ICVkIC0gc3RhcnQgb2YgYSBuZXcgY3JlZCBibG9jayIsICpsaW5lKTsKKwljcmVkID0gb3NfemFsbG9jKHNpemVvZigqY3JlZCkpOworCWlmIChjcmVkID09IE5VTEwpCisJCXJldHVybiBOVUxMOworCWNyZWQtPmlkID0gaWQ7CisKKwl3aGlsZSAod3BhX2NvbmZpZ19nZXRfbGluZShidWYsIHNpemVvZihidWYpLCBmLCBsaW5lLCAmcG9zKSkgeworCQlpZiAob3Nfc3RyY21wKHBvcywgIn0iKSA9PSAwKSB7CisJCQllbmQgPSAxOworCQkJYnJlYWs7CisJCX0KKworCQlwb3MyID0gb3Nfc3RyY2hyKHBvcywgJz0nKTsKKwkJaWYgKHBvczIgPT0gTlVMTCkgeworCQkJd3BhX3ByaW50ZihNU0dfRVJST1IsICJMaW5lICVkOiBJbnZhbGlkIGNyZWQgbGluZSAiCisJCQkJICAgIiclcycuIiwgKmxpbmUsIHBvcyk7CisJCQllcnJvcnMrKzsKKwkJCWNvbnRpbnVlOworCQl9CisKKwkJKnBvczIrKyA9ICdcMCc7CisJCWlmICgqcG9zMiA9PSAnIicpIHsKKwkJCWlmIChvc19zdHJjaHIocG9zMiArIDEsICciJykgPT0gTlVMTCkgeworCQkJCXdwYV9wcmludGYoTVNHX0VSUk9SLCAiTGluZSAlZDogaW52YWxpZCAiCisJCQkJCSAgICJxdW90YXRpb24gJyVzJy4iLCAqbGluZSwgcG9zMik7CisJCQkJZXJyb3JzKys7CisJCQkJY29udGludWU7CisJCQl9CisJCX0KKworCQlpZiAod3BhX2NvbmZpZ19zZXRfY3JlZChjcmVkLCBwb3MsIHB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