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AqcGNtID0gc3Vicy0+cGNtOwotCW1peGFydF9zdHJlYW1fdCAgICAgKnN0cmVhbTsKLQltaXhhcnRfcGlwZV90ICAgICAgICpwaXBlOworCXN0cnVjdCBzbmRfbWl4YXJ0ICAgICAgICAgICAgKmNoaXAgPSBzbmRfcGNtX3N1YnN0cmVhbV9jaGlwKHN1YnMpOworCXN0cnVjdCBtaXhhcnRfbWdyICAgICAgICAqbWdyID0gY2hpcC0+bWdyOworCXN0cnVjdCBzbmRfcGNtX3J1bnRpbWUgKnJ1bnRpbWUgPSBzdWJzLT5ydW50aW1lOworCXN0cnVjdCBzbmRfcGNtICpwY20gPSBzdWJzLT5wY207CisJc3RydWN0IG1peGFydF9zdHJlYW0gICAgICpzdHJlYW07CisJc3RydWN0IG1peGFydF9waXBlICAgICAgICpwaXBlOwogCWludCBlcnIgPSAwOwogCWludCBwY21fbnVtYmVyOwogCkBAIC03NTksMTQgKzc2NCwxNCBAQAogfQogCiAKLXN0YXRpYyBpbnQgc25kX21peGFydF9jYXB0dXJlX29wZW4oc25kX3BjbV9zdWJzdHJlYW1fdCAqc3VicykKK3N0YXRpYyBpbnQgc25kX21peGFydF9jYXB0dXJlX29wZW4oc3RydWN0IHNuZF9wY21fc3Vic3RyZWFtICpzdWJzKQogewotCW1peGFydF90ICAgICAgICAgICAgKmNoaXAgPSBzbmRfcGNtX3N1YnN0cmVhbV9jaGlwKHN1YnMpOwotCW1peGFydF9tZ3JfdCAgICAgICAgKm1nciA9IGNoaXAtPm1ncjsKLQlzbmRfcGNtX3J1bnRpbWVfdCAgICpydW50aW1lID0gc3Vicy0+cnVudGltZTsKLQlzbmRfcGNtX3QgICAgICAgICAgICpwY20gPSBzdWJzLT5wY207Ci0JbWl4YXJ0X3N0cmVhbV90ICAgICAqc3RyZWFtOwotCW1peGFydF9waXBlX3QgICAgICAgKnBpcGU7CisJc3RydWN0IHNuZF9taXhhcnQgICAgICAgICAgICAqY2hpcCA9IHNuZF9wY21fc3Vic3RyZWFtX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