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wdjZoZHIpOwpkaWZmIC0tZ2l0IGEvYXAvb3MvbGludXgvbGludXgtMy40LngvZHJpdmVycy9uZXQvd2lyZWxlc3MvYWljODgwMC9yd254X21haW4uYyBiL2FwL29zL2xpbnV4L2xpbnV4LTMuNC54L2RyaXZlcnMvbmV0L3dpcmVsZXNzL2FpYzg4MDAvcndueF9tYWluLmMKaW5kZXggNjIzNzYyMy4uMDk1ODZkMCAxMDA3NTUKLS0tIGEvYXAvb3MvbGludXgvbGludXgtMy40LngvZHJpdmVycy9uZXQvd2lyZWxlc3MvYWljODgwMC9yd254X21haW4uYworKysgYi9hcC9vcy9saW51eC9saW51eC0zLjQueC9kcml2ZXJzL25ldC93aXJlbGVzcy9haWM4ODAwL3J3bnhfbWFpbi5jCkBAIC01ODc0LDYgKzU4NzQsNyBAQAoge307CiAKIHVpbnQzMl90IGxkcGNfY2ZnX3JhbVtdID0geworI2lmIDAvL2RlZiBDT05GSUdfRlBHQV9WRVJJRklDQVRJT04KICAgICAweDAwMzYzNjM4LAogICAgIDB4MURGOEY4MzQsCiAgICAgMHgxREY4RjgzNCwKQEAgLTYyMDksNiArNjIxMCwzNDMgQEAKICAgICAweDAyMTMxMzBGLAogICAgIDB4MDIxMzEzMDgsCiAgICAgMHgwMjEzMTMwOAorI2Vsc2UKKyAgICAweDAwNzY3Njc5LAorICAgIDB4MURGOEY4NzAsCisgICAgMHgxREY4Rjg3MCwKKyAgICAweDFERjhGODcwLAorICAgIDB4MURGOEY4NzAsCisgICAgMHgwMDZFNkU3MiwKKyAgICAweDFERjhGODY5LAorICAgIDB4MURGOEY4NjksCisgICAgMHgxREY4Rjg2OSwKKyAgICAweDFERjhGODY5LAorICAgIDB4MDA3Njc2N0IsCisgICAgMHgxREY4Rjg3MCwKKyAgICAweDFERjhGODcwLAorICAgIDB4MURGOEY4NzAsCisgICAgMHgxREY4Rjg3MCwKKyAgICAweDAwN0U3RTg1LAorICAgIDB4MURGNEY4NzYsCisgICAgMHgxREY0Rjg3NiwKKyAgICAweDFERjRGODc2LAorICAgIDB4MURGOEY4NzYsCisgICAgMHgwMDgxODE4QSwKKyAgICAweDFERjhGODdCLAorICAgIDB4MURGOEY4N0IsCisgICAgMHgxREY4Rjg3QiwKKyAgICAweDFERjhGODdCLAorICAgIDB4MDA4MTgxOEQsCisgICAgMHgxREY4Rjg3QiwKKyAgICAweDFERjhGODdCLAorICAgIDB4MURGOEY4N0IsCisgICAgMHgxREY4Rjg3QiwKKyAgICAweDAwODE4MThBLAorICAgIDB4MURGOEY4N0IsCisgICAgMHgxREY4Rjg3QywKKyAgICAweDFERjhGODdCLAorICAgIDB4MURGOEY4N0IsCisgICAgMHgwMDdFN0U0MCwKKyAgICAweDFERjhGODdCLAorICAgIDB4MURGOEY4N0IsCisgICAgMHgxREY4Rjg3QiwKKyAgICAweDFERjhGODdCLAorICAgIDB4MDA4QjhCOTIsCisgICAgMHgxREY4Rjg4NywKKyAgICAweDFERjhGODg5LAorICAgIDB4MURGOEY4ODcsCisgICAgMHgxREY4Rjg4NywKKyAgICAweDAwNTE1MTU1LAorICAgIDB4MURGOEY4NEMsCisgICAgMHgxREY4Rjg0QywKKyAgICAweDFERjhGODg5LAorICAgIDB4MURGOEY4ODksCisgICAgMHgwMDUxNTE1NCwKKyAgICAweDFERjhGODRDLAorICAgIDB4MURGOEY4NEMsCisgICAgMHgxREY4Rjg4OCwKKyAgICAweDFERjhGODg4LAorICAgIDB4MDA0RjRGNTMsCisgICAgMHgxREY4Rjg0QSwKKyAgICAweDFERjhGODRBLAorICAgIDB4MURGOEY4NEEsCisgICAgMHgxREY4Rjg0QSwKKyAgICAweDAwNEY0RjUzLAorICAgIDB4MURGOEY4NEEsCisgICAgMHgxREY4Rjg0QSwKKyAgICAweDFERjhGODRBLAorICAgIDB4MURGOEY4NEEsCisgICAgMHgwMDRGNEY1MywKKyAgICAweDFERjhGODRBLAorICAgIDB4MURGOEY4NEEsCisgICAgMHgxREY4Rjg0QSwKKyAgICAweDFERjhGODRBLAorICAgIDB4MDA0RTRFNTMsCisgICAgMHgxREY4Rjg0OSwKKyAgICAweDFERjhGODQ4LAorICAgIDB4MURGOEY4NDgsCisgICAgMHgxREY4Rjg0OCwKKyAgICAweDAwNEQ0RDUyLAorICAgIDB4MURGOEY4NDcsCisgICAgMHgxREY4Rjg0NywKKyAgICAweDFERjhGODQ3LAorICAgIDB4MURGOEY4NDcsCisgICAgMHgwMDRGNEY1NSwKKyAgICAweDFERjhGODRCLAorICAgIDB4MURGOEY4NEEsCisgICAgMHgxREY4Rjg0QSwKKyAgICAweDFERjhGODRBLAorICAgIDB4MDA0RTRFNTMsCisgICAgMHgxREY4Rjg0OSwKKyAgICAweDFERjhGODQ4LAorICAgIDB4MURGOEY4NDgsCisgICAgMHgxREY4Rjg0OCwKKyAgICAweDAwNDk0OTRELAorICAgIDB4MURGOEY4NDQsCisgICAgMHgxREY4Rjg0NCwKKyAgICAweDFERjhGODQ0LAorICAgIDB4MURGOEY4NDQsCisgICAgMHgwMDUxNTE4RiwKKyAgICAweDFERjhGODQ5LAorICAgIDB4MURGOEY4NDgsCisgICAgMHgxREY4Rjg0OCwKKyAgICAweDFERjhGODQ4LAorICAgIDB4MDA0MjQyNzcsCisgICAgMHgxREY4RjgzRiwKKyAgICAweDFERjhGODNDLAorICAgIDB4MURGOEY4M0MsCisgICAgMHgxREY4RjgzQywKKyAgICAweDAwNDI0Mjc1LAorICAgIDB4MURGOEY4OUUsCisgICAgMHgxREY4RjgzQywKKyAgICAweDFERjhGODNDLAorICAgIDB4MURGOEY4M0MsCisgICAgMHgwMDU1NTU1QywKKyAgICAweDFERjhGODRDLAorICAgIDB4MURGOEY4NEMsCisgICAgMHgxREY4Rjg0QywKKyAgICAweDFERjhGODRDLAorICAgIDB4MDA1MzUzNUMsCisgICAgMHgxREY4Rjg0QywKKyAgICAweDFERjhGODRCLAorICAgIDB4MURGOEY4NEIsCisgICAgMHgxREY4Rjg0QiwKKyAgICAweDAwRjhGODlFLAorICAgIDB4MURGOEY4OEMsCisgICAgMHgxREY4Rjg0QSwKKyAgICAweDFERjhGODRBLAorICAgIDB4MURGOEY4NEEsCisgICAgMHgwMDg5ODk0MCwKKyAgICAweDE4RjhGODQ2LAorICAgIDB4MThDRkY4NDUsCisgICAgMHgxOENGRjg0NCwKKyAgICAweDE4Q0ZGODQ0LAorICAgIDB4MDA1NjU2NUYsCisgICAgMHgxREY4Rjg0RiwKKyAgICAweDFERjhGODRGLAorICAgIDB4MURGOEY4NEYsCisgICAgMHgxREY4Rjg0RiwKKyAgICAweDAwNTU1NTVFLAorICAgIDB4MURGOEY4NEUsCisgICAgMHgxREY4Rjg0RSwKKyAgICAweDFERjhGODRFLAorICAgIDB4MURGOEY4NEUsCisgICAgMHgwMDU2NTY1RiwKKyAgICAweDFERjhGODRGLAorICAgIDB4MURGOEY4NEYsCisgICAgMHgxREY4Rjg0RiwKKyAgICAweDFERjhGODRGLAorICAgIDB4MDA1NTU1NjEsCisgICAgMHgxREY4Rjg1MCwKKyAgICAweDFERjhGODRFLAorICAgIDB4MURGOEY4NEUsCisgICAgMHgxREY4Rjg0RSwKKyAgICAweDAwNTM1MzVGLAorICAgIDB4MURGOEY4NEQsCisgICAgMHgxREY4Rjg0QywKKyAgICAweDFERjhGODRDLAorICAgIDB4MURGOEY4NEMsCisgICAgMHgwMDU1NTU1RiwKKyAgICAweDFERjhGODRGLAorICAgIDB4MURGOEY4NEUsCisgICAgMHgxREY4Rjg0RSwKKyAgICAweDFERjhGODRFLAorICAgIDB4MDA1NTU1QUEsCisgICAgMHgxREY4Rjg1NCwKKyAgICAweDFERjhGODRFLAorICAgIDB4MURGOEY4NEUsCisgICAgMHgxREY4Rjg0RSwKKyAgICAweDAwNTk1OUE2LAorICAgIDB4MURGOEY4NEQsCisgICAgMHgxREY4Rjg0QywKKyAgICAweDFERjhGODRDLAorICAgIDB4MURGOEY4NEMsCisgICAgMHgwMDRGNEY5QiwKKyAgICAweDFERjhGODRFLAorICAgIDB4MURGOEY4NDYsCisgICAgMHgxREY4Rjg0NiwKKyAgICAweDFERjhGODQ2LAorICAgIDB4MDBGOEY4QTUsCisgICAgMHgxREY4Rjg5NCwKKyAgICAweDFERjhGODRDLAorICAgIDB4MURGOEY4NEMsCisgICAgMHgxREY4Rjg0QywKKyAgICAweDAwOTg5OEE0LAorICAgIDB4MURGOEY4NEQsCisgICAgMHgxREY4Rjg0QywKKyAgICAweDFERjhGODRDLAorICAgIDB4MURGOEY4NEMsCisgICAgMHgwMDQ2NDY4NiwKKyAgICAweDFERjhGOEIzLAorICAgIDB4MURGOEY4M0QsCisgICAgMHgxREY4RjgzRCwKKyAgICAweDFERjhGODNELAorICAgIDB4MDA4RThFNDAsCisgICAgMHgxQUY4Rjg0OCwKKyAgICAweDFBREZGODQ4LAorICAgIDB4MUFERkY4NDYsCisgICAgMHgxQURGRjg0NiwKKyAgICAweDAwN0Y3RjQwLAorICAgIDB4MThEMkQyNzUsCisgICAgMHgxOEQyRDIzQSwKKyAgICAweDE4RDJEMjNBLAorICAgIDB4MThEMkQyMzksCisgICAgMHgwMDQ1NDU0MCwKKyAgICAweDBGODY4NjY0LAorICAgIDB4MEY4Njg2M0UsCisgICAgMHgwRjg2ODYzRCwKKyAgICAweDBGODY4NjNELAorICAgIDB4MDA1QzVDNjQsCisgICAgMHgxREY4Rjg1NiwKKyAgICAweDFERjhGODU1LAorICAgIDB4MURGOEY4NTUsCisgICAgMHgxREY4Rjg1NSwKKyAgICAweDAwNUI1QjY4LAorICAgIDB4MURGOEY4NTgsCisgICAgMHgxREY4Rjg1NSwKKyAgICAweDFERjhGODU1LAorICAgIDB4MURGOEY4NTUsCisgICAgMHgwMDVBNUE2NCwKKyAgICAweDFERjhGODU1LAorICAgIDB4MURGOEY4NTQsCisgICAgMHgxREY4Rjg1NCwKKyAgICAweDFERjhGODU0LAorICAgIDB4MDA1QTVBQjUsCisgICAgMHgxREY4Rjg1QiwKKyAgICAweDFERjhGODU1LAorICAgIDB4MURGOEY4NTQsCisgICAgMHgxREY4Rjg1NCwKKyAgICAweDAwRjhGOEIwLAorICAgIDB4MURGOEY4QTMsCisgICAgMHgxREY4Rjg1MiwKKyAgICAweDFERjhGODUyLAorICAgIDB4MURGOEY4NTIsCisgICAgMHgwMEE0QTRBRSwKKyAgICAweDFERjhGODU0LAorICAgIDB4MURGOEY4NTIsCisgICAgMHgxREY4Rjg1MiwKKyAgICAweDFERjhGODUyLAorICAgIDB4MDA5QTlBNDAsCisgICAgMHgxREY4Rjg0RSwKKyAgICAweDFERjhGODRELAorICAgIDB4MURGOEY4NEMsCisgICAgMHgxREY4Rjg0QywKKyAgICAweDAwOUM5QzQwLAorICAgIDB4MURGOEY4OTUsCisgICAgMHgxREY4Rjg0OSwKKyAgICAweDFERjhGODRBLAorICAgIDB4MURGOEY4NEEsCisgICAgMHgwMDQ5NDk0MCwKKyAgICAweDExOTc5NzZGLAorICAgIDB4MTE5Nzk3NDIsCisgICAgMHgxMTk3OTc0MSwKKyAgICAweDExOTc5NzQxLAorICAgIDB4MDA2RTZFNzQsCisgICAgMHgxREY4Rjg2OSwKKyAgICAweDFERjhGODY5LAorICAgIDB4MURGOEY4NjksCisgICAgMHgxREY4Rjg2OSwKKyAgICAweDAwNkU2RTQwLAorICAgIDB4MUFERUY4NjksCisgICAgMHgxQURFRjg2OSwKKyAgICAweDFBREVGODY5LAorICAgIDB4MUFERUY4NjksCisgICAgMHgwMDc1NzU0MCwKKyAgICAweDBENzhGODZFLAorICAgIDB4MEQ3OEY4NkUsCisgICAgMHgwRDc4Rjg2RSwKKyAgICAweDBENzlGODZFLAorICAgIDB4MDA3ODc4ODUsCisgICAgMHgxREY4Rjg3MywKKyAgICAweDFERjhGODczLAorICAgIDB4MURGOEY4NzMsCisgICAgMHgxREY4Rjg3MywKKyAgICAweDAwNzg3ODQwLAorICAgIDB4MURGOEY4NzMsCisgICAgMHgxREY4Rjg3MywKKyAgICAweDFERjhGODczLAorICAgIDB4MURGOEY4NzMsCisgICAgMHgwMDc4Nzg0MCwKKyAgICAweDBFODFGODczLAorICAgIDB4MEU4MUY4NzMsCisgICAgMHgwRTgxRjg3MywKKyAgICAweDBFODJGODczLAorICAgIDB4MDA0MDQwNDAsCisgICAgMHgwRTgyRjg3MywKKyAgICAweDBFODJGODczLAorICAgIDB4MEU4MkY4NzMsCisgICAgMHgwRTgyRjg3MywKKyAgICAweDAwODE4MTQwLAorICAgIDB4MTA5MkY4N0UsCisgICAgMHgxMDkyRjg3RSwKKyAgICAweDEwOTJGODdFLAorICAgIDB4MTA5MkY4N0UsCisgICAgMHgwMDQwNDA0MCwKKyAgICAweDEwOTJGODdFLAorICAgIDB4MTA5MkY4N0UsCisgICAgMHgxMDkyRjg3RSwKKyAgICAweDEwOTJGODdFLAorICAgIDB4MDA3MzczNDAsCisgICAgMHgxNEIyQjI2QiwKKyAgICAweDE0QjJCMjM1LAorICAgIDB4MTRCMkIyMzUsCisgICAgMHgxNEIyQjIzNSwKKyAgICAweDAwNDA0MDQwLAorICAgIDB4MEU4MjgyNjAsCisgICAgMHgwRTgyODIzRCwKKyAgICAweDBFODI4MjNDLAorICAgIDB4MEU4MjgyM0MsCisgICAgMHgwMDQwNDA0MCwKKyAgICAweDBGOEI4QjY2LAorICAgIDB4MEY4QjhCM0YsCisgICAgMHgwRjhCOEIzRCwKKyAgICAweDBGOEI4QjNELAorICAgIDB4MDA0MDQwNDAsCisgICAgMHgwQjY4NjgzRCwKKyAgICAweDBCNjg2ODFFLAorICAgIDB4MEI2ODY4MUUsCisgICAgMHgwQjY4NjgxRSwKKyAgICAweDAwMjIyMjQwLAorICAgIDB4MDY0MzQzMTgsCisgICAgMHgwNjQzNDMyOSwKKyAgICAweDA2NDM0MzE4LAorICAgIDB4MDY0MzQzMTgsCisgICAgMHgwMDQwNDA0MCwKKyAgICAweDEyOUQ5RDcyLAorICAgIDB4MTI5RDlENDMsCisgICAgMHgxMjlEOUQ0MSwKKyAgICAweDEyOUQ5RDQxLAorICAgIDB4MDA0MDQwNDAsCisgICAgMHgw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gIDB4ODA4MDg0MTksCkBAIC03MDYyLDI4ICs3NDM2LDI4IEBACiAgICAgMHg5NjM1YTMyOCwKICAgICAweDgwODA4NDE5LAogICAgIDB4MDAwMDAwZjAsCi0gICAgMHgwNzQyOTk1MiwKLSAgICAweDk2MzExMTI4LAorICAgIDB4MDM0MjgxNTIsLy9pbmRleCA4CisgICAgMHg5NjM1MTEyOCwKICAgICAweDgwODA4NDE5LAogICAgIDB4MDAwMDAwZjAsCi0gICAgMHgwNzQyOTk3NCwKLSAgICAweDk2MzExMTI4LAorICAgIDB4MDM0MjgxNzQsLy9pbmRleCA5CisgICAgMHg5NjM1MTEyOCwKICAgICAweDgwODA4NDE5LAogICAgIDB4MDAwMDAwZjAsCi0gICAgMHgwNzQyOTk2NiwKLSAgICAweDk2MzFhMzI4LAotICAgIDB4ODA4MDg0MTksCi0gICAgMHgwMDAwMDBmMCwKLSAgICAweDA3NDI5OTY2LAorICAgIDB4MDM0MjgxNjYsLy9pbmRleCAxMAogICAgIDB4OTYzNWEzMjgsCiAgICAgMHg4MDgwODQxOSwKICAgICAweDAwMDAwMGYwLAotICAgIDB4MDc0Mjk5NjYsCisgICAgMHgwMzQyODE2NiwvL2luZGV4IDExCiAgICAgMHg5NjM5YTMyOCwKICAgICAweDgwODA4NDE5LAogICAgIDB4MDAwMDAwZjAsCi0gICAgMHgwNzQyOTk2NiwKLSAgICAweDk2M2I1OTI4LAorICAgIDB4MDM0MjgxNjYsLy9pbmRleCAxMgorICAgIDB4OTYzZGEzMjgsCisgICAgMHg4MDgwODQxOSwKKyAgICAweDAwMDAwMGYwLAorICAgIDB4MDM0MjgxNjYsLy9pbmRleCAxMworICAgIDB4OTYzZjU5MjgsCiAgICAgMHg4MDgwODQxOSwKICAgICAweDAwMDAwMGYwLAogICAgIDB4MDc0Mjk5NjYsCkBAIC03MTI0LDcgKzc0OTgsNyBAQAogICAgIHsweDAwOTgsIDB4NDQ1fSwKICAgICB7MHgwMDljLCAweDVlMzMyfSwKICAg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WFwLCBTSE1fVU5JVF9OVU1fQklUUyk7LyrX3MTatOaz2LncwO3Qxc+iKi8KKyAgICBzdHJ1Y3Qgc2htX2tleV9ub2RlIGtleXNfaW5mb19oZWFkW1NITV9VTklUX05VTV9CSVRTXTsgLyrDv7j2c2httcRrZXm53MDt0MXPoiovCit9OworCisvKioKKyAqIMirvtax5MG/tqjS5QorICovCitwaHlzX2FkZHJfdCAgIGdfc2htX3BoeUFkZHIgPSAwOwordm9pZCAgICAgICAgICpnX3NobV9yZWdpb24gPSBOVUxMOworCitzdHJ1Y3Qgc2htX2VudGl0eSAqc2htX3JlbW90ZV9tYW5hZ2VyOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiC5psTcw+jK9jogICAgIHNobV9xdWFyeV9rZXlBcnJheQorKiCyzsr9y7XD9zoKKyogICAgKLSryOuyzsr9KSAgICB2b2lkCisqICAgICi0q7P2ss7K/SkgICAgdm9pZAorKiC3tSC72CDWtTogICAgIFNITV9DVFJMX09LIG9yIFNITV9DVFJMX0VSUk9SCisqIMbky/zLtcP3OiAgICAgVGhpcyBmdW5jdGlvbiBpcyB1c2VkIGZvciBzZWFyY2ggYSBzcGVjaWFsIGtleSBpbiBhcnJheQorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgc2htX3F1YXJ5X2tleUFycmF5KGNvbnN0IGtleV90IGtleSkKK3sKKyAgICB1bnNpZ25lZCBpbnQgICAgICAgICAgaW5kZXggICAgID0gMDsKKyAgICBzdHJ1Y3QgICBzaG1fa2V5X25vZGUgKnNobV9kYXRhID0gTlVMTDsKKworICAgIHNobV9kYXRhID0gc2htX3JlbW90ZV9tYW5hZ2VyLT5rZXlzX2luZm9faGVhZDsKKyAgICAKKyAgICBmb3IgKDsgaW5kZXggPCBTSE1fVU5JVF9OVU1fQklUUzsgaW5kZXgrKykKKyAgICB7CisgICAgICAgIGlmIChzaG1fZGF0YVtpbmRleF0ua2V5ID09IGtleSkKKyAgICAgICAgICAgIHJldHVybiBpbmRleDsKKyAgICB9CisgICAgcmV0dXJuIFNITV9DVFJMX0VSUk9SOyAgICAKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoguabE3MPoyvY6ICAgICBzaG1fY3RybF9wdGVfcmFuZ2UKKyogss7K/cu1w/c6CisqICAgICi0q8jrss7K/SkgICAgdm9pZAorKiAgICAotKuz9rLOyv0pICAgIHZvaWQKKyogt7Ugu9gg1rU6ICAgICBTSE1fQ1RSTF9PSyBvciBTSE1fQ1RSTF9FUlJPUgorKiDG5Mv8y7XD9zogICAgIFRoaXMgZnVuY3Rpb24gaXMgdXNlZCBmb3IgY2xlYXIgdGhlIHBhZ2V0YWJsZSBwdGUgCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwordW5zaWduZWQgbG9uZyBzaG1fY3RybF9wdGVfcmFuZ2Uoc3RydWN0IG1tX3N0cnVjdCAqbW0sCisgICAgICAgICAgICAgICAgc3RydWN0IHZtX2FyZWFfc3RydWN0ICp2bWEsIHBtZF90ICpwbWQsCisgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBhZGRyLCB1bnNpZ25lZCBsb25nIGVuZCkKK3sKKyAgICBzcGlubG9ja190ICpwdGw7CisgICAgcHRlX3QgKnN0YXJ0X3B0ZTsKKyAgICBwdGVfdCAqcHRlOworCisgICAgc3RhcnRfcHRlID0gcHRlX29mZnNldF9tYXBfbG9jayhtbSwgcG1kLCBhZGRyLCAmcHRsKTsKKyAgICBwdGUgPSBzdGFydF9wdGU7CisgICAgYXJjaF9lbnRlcl9sYXp5X21tdV9tb2RlKCk7CisgICAgZG8geworICAgICAgICBwdGVfdCBwdGVudCA9ICpwdGU7CisgICAgICAgIGlmIChwdGVfbm9uZShwdGVudCkpIHsKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICB9CisKKyAgICAgICAgaWYgKHB0ZV9wcmVzZW50KHB0ZW50KSkgeworICAgICAgICAgICAgCisgICAgICAgICAgICBwdGVudCA9IHB0ZXBfZ2V0X2FuZF9jbGVhcihtbSwgYWRkciwgcHRlKTsKKyAgICAgICAgfQorICAgICAgICBwdGVfY2xlYXJfbm90X3ByZXNlbnRfZnVsbChtbSwgYWRkciwgcHRlLCAwKTsKKyAgICB9IHdoaWxlIChwdGUrKywgYWRkciArPSBQQUdFX1NJWkUsIGFkZHIgIT0gZW5kKTsKKworICAgIGFyY2hfbGVhdmVfbGF6eV9tbXVfbW9kZSgpOworICAgIHB0ZV91bm1hcF91bmxvY2soc3RhcnRfcHRlLCBwdGwpOworCisgICAgcmV0dXJuIGFkZHI7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqILmmxNzD6Mr2OiAgICAgc2htX2N0cmxfcG1kX3JhbmdlCisqILLOyv3LtcP3OgorKiAgICAotKvI67LOyv0pICAgIG1tOiDIzs7xtcTE2rTmw+jK9rf7CisqICAgICi0q8jrss7K/SkgICAgdm1ho7q/57rLubLP7cTatOa9+LPMtdjWt7/VvOR2bWEKKyogICAgKLSryOuyzsr9KSAgICBwdWSjunB1ZNKzyc+y48S/wrwKKyogICAgKLSryOuyzsr9KSAgICBhZGRyOiDQ6cTixvDKvLXY1rcKKyogICAgKLSryOuyzsr9KSAgICBlbmQ6ICDQ6cTiveHK+LXY1rcKKyogICAgKLSrs/ayzsr9KSAgICC/1QorKiC3tSC72CDWtTogICAgIGFkZHIKKyogxuTL/Mu1w/c6ICAgICBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgZm9yIGNsZWFyIHRoZSBwYWdldGFibGUgcHRlIAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbmxpbmUgdW5zaWduZWQgbG9uZyBzaG1fY3RybF9wbWRfcmFuZ2Uoc3RydWN0IG1tX3N0cnVjdCAqbW0sCisgICAgICAgICAgICAgICAgc3RydWN0IHZtX2FyZWFfc3RydWN0ICp2bWEsIHB1ZF90ICpwdWQsCisgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBhZGRyLCB1bnNpZ25lZCBsb25nIGVuZCkKK3sKKyAgICBwbWRfdCAqcG1kOworICAgIHVuc2lnbmVkIGxvbmcgbmV4dDsKKworICAgIHBtZCA9IHBtZF9vZmZzZXQocHVkLCBhZGRyKTsKKyAgICBkbyB7CisgICAgICAgIG5leHQgPSBwbWRfYWRkcl9lbmQoYWRkciwgZW5kKTsKKyAgICAgICAgLyoKKyAgICAgICAgICogSGVyZSB0aGVyZSBjYW4gYmUgb3RoZXIgY29uY3VycmVudCBNQURWX0RPTlRORUVEIG9yCisgICAgICAgICAqIHRyYW5zIGh1Z2UgcGFnZSBmYXVsdHMgcnVubmluZywgYW5kIGlmIHRoZSBwbWQgaXMKKyAgICAgICAgICogbm9uZSBvciB0cmFucyBodWdlIGl0IGNhbiBjaGFuZ2UgdW5kZXIgdXMuIFRoaXMgaXMKKyAgICAgICAgICogYmVjYXVzZSBNQURWX0RPTlRORUVEIGhvbGRzIHRoZSBtbWFwX3NlbSBpbiByZWFkCisgICAgICAgICAqIG1vZGUuCisgICAgICAgICAqLworICAgICAgICBpZiAocG1kX25vbmVfb3JfdHJhbnNfaHVnZV9vcl9jbGVhcl9iYWQocG1kKSkKKyAgICAgICAgICAgIGdvdG8gbmV4dDsKKyAgICAgICAgbmV4dCA9IHNobV9jdHJsX3B0ZV9yYW5nZShtbSwgdm1hLCBwbWQsIGFkZHIsIG5leHQpOworbmV4dDoKKyAgICAgICAgY29uZF9yZXNjaGVkKCk7CisgICAgfSB3aGlsZSAocG1kKyssIGFkZHIgPSBuZXh0LCBhZGRyICE9IGVuZCk7CisKKyAgICByZXR1cm4gYWRkcjsKK30KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqILmmxNzD6Mr2OiAgICAgc2htX2N0cmxfcHVkX3JhbmdlCisqILLOyv3LtcP3OgorKiAgICAotKvI67LOyv0pICAgIG1tOiAgyM7O8bXExNq05sPoyva3+worKiAgICAotKvI67LOyv0pICAgIHZtYTogv+e6y7myz+3E2rTmvfizzLXY1re/1bzkdm1hCisqICAgICi0q8jrss7K/SkgICAgcGdkOiBwZ2TSs8S/wrzP7gorKiAgICAotKvI67LOyv0pICAgIGFkZHI6INDpxOLG8Mq8tdjWtworKiAgICAotKvI67LOyv0pICAgIGVuZDogINDpxOK94cr4tdjWtworKiAgICAotKuz9rLOyv0pICAgIM7eCisqILe1ILvYINa1OiAgICAgU0hNX0NUUkxfT0sgb3IgU0hNX0NUUkxfRVJST1IKKyogxuTL/Mu1w/c6ICAgICBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgZm9yIGZpbmQgcHVkCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGlubGluZSB1bnNpZ25lZCBsb25nIHNobV9jdHJsX3B1ZF9yYW5nZShzdHJ1Y3QgbW1fc3RydWN0ICptbSwgCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJ1Y3Qgdm1fYXJlYV9zdHJ1Y3QgKnZtYSwgcGdkX3QgKnBnZCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVuc2lnbmVkIGxvbmcgYWRkciwgdW5zaWduZWQgbG9uZyBlbmQpCit7CisgICAgcHVkX3QgKnB1ZDsKKyAgICB1bnNpZ25lZCBsb25nIG5leHQ7CisKKyAgICBwdWQgPSBwdWRfb2Zmc2V0KHBnZCwgYWRkcik7CisgICAgZG8geworICAgICAgICBuZXh0ID0gcHVkX2FkZHJfZW5kKGFkZHIsIGVuZCk7CisgICAgICAgIGlmIChwdWRfbm9uZV9vcl9jbGVhcl9iYWQocHVkKSkKKyAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICBuZXh0ID0gc2htX2N0cmxfcG1kX3JhbmdlKG1tLCB2bWEsIHB1ZCwgYWRkciwgbmV4dCk7CisgICAgfSB3aGlsZSAocHVkKyssIGFkZHIgPSBuZXh0LCBhZGRyICE9IGVuZCk7CisKKyAgICByZXR1cm4gYWRkcjsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoguabE3MPoyvY6ICAgICBzaG1fdW5tYXBfcGFnZV9yYW5nZQorKiCyzsr9y7XD9zoKKyogICAgKLSryOuyzsr9KSAgICBtbTogyM7O8bXExNq05sPoyva3+worKiAgICAotKvI67LOyv0pICAgIHZtYSC/57rLubLP7cTatOa9+LPMtdjWt7/VvOR2bWEgCisqICAgICi0q8jrss7K/SkgICAgYWRkciDQ6cTixvDKvLXY1rcKKyogICAgKLSryOuyzsr9KSAgICBlbmQgINDpxOK94cr4tdjWtworKiAgICAotKuz9rLOyv0pICAgIL/VCisqILe1ILvYINa1OiAgICAgdm9pZAorKiDG5Mv8y7XD9zogICAgIFRoaXMgZnVuY3Rpb24gaXMgdXNlZCBmb3IgdW5tYXAgdGhlIHNobSBtZW1vcnkKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCit2b2lkIHNobV91bm1hcF9wYWdlX3JhbmdlKHN0cnVjdCBtbV9zdHJ1Y3QgKm1tLCBzdHJ1Y3Qgdm1fYXJlYV9zdHJ1Y3QgKnZtYSwKKyAgICAgICAgICAgICAgICAgdW5zaWduZWQgbG9uZyBhZGRyLCB1bnNpZ25lZCBsb25nIGVuZCkKK3sKKyAgICBwZ2RfdCAqcGdkOworICAgIHVuc2lnbmVkIGxvbmcgbmV4dDsKKworICAgIEJVR19PTihhZGRyID49IGVuZCk7CisgICAgcGdkID0gcGdkX29mZnNldCh2bWEtPnZtX21tLCBhZGRyKTsKKyAgICBkbyB7CisgICAgICAgIG5leHQgPSBwZ2RfYWRkcl9lbmQoYWRkciwgZW5kKTsKKyAgICAgICAgaWYgKHBnZF9ub25lX29yX2NsZWFyX2JhZChwZ2QpKQorICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIG5leHQgPSBzaG1fY3RybF9wdWRfcmFuZ2UobW0sIHZtYSwgcGdkLCBhZGRyLCBuZXh0KTsKKyAgICB9IHdoaWxlIChwZ2QrKywgYWRkciA9IG5leHQsIGFkZHIgIT0gZW5kKTsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoguabE3MPoyvY6ICAgICBzaG1fdm1hX3dyaXRlX3BhZ2V0YWJsZQorKiCyzsr9y7XD9zogICAgIAorKiAgICAotKvI67LOyv0pICAgIHZvaWQKKyogICAgKLSrs/ayzsr9KSAgICB2b2lkIAorKiC3tSC72CDWtTogICAgIFNITV9DVFJMX09LIG9yIFNITV9DVFJMX0VSUk9SCisqIMbky/zLtcP3OiAgICAgVGhpcyBmdW5jdGlvbiBpcyB1c2VkIGZvciBjcmVhdGUgcGFnZXRhYmxlIGZvciBzaG0gbWVtIHJlZ2lvbiAgICAgICAgICAgICAgICAgICAgICAgICAgCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworc3RhdGljIGludCBzaG1fdm1hX3dyaXRlX3BhZ2V0YWJsZShzdHJ1Y3Qgdm1fYXJlYV9zdHJ1Y3QgKnZtYSwgdW5zaWduZWQgbG9uZyB2bV9hZGRyLAorICAgICAgICAgICAgcGh5c19hZGRyX3Qgc2htYWRkcl9waHkpCit7CisgICAgcHRlX3QgICpwdGU7CisgICAgaW50ICAgIHJldHZhbCAgPSAwOworICAgIHB0ZV90ICBwdGVfdmFsID0gMDsKKyAgICBzcGlubG9ja190ICpwdGw7CisKKyAgICBpZiAodm1fYWRkciA8IHZtYS0+dm1fc3RhcnQgfHwgdm1fYWRkciA+PSB2bWEtPnZtX2VuZCkKKyAgICAgICAgcmV0dXJuIC1FRkFVTFQ7CisKKyAgICBwdGUgPSBnZXRfbG9ja2VkX3B0ZSh2bWEtPnZtX21tLCB2bV9hZGRyLCAmcHRsKTsKKyAgICBpZiAoKCFwdGUpIHx8ICghcHRlX25vbmUoKnB0ZSkpKQorICAgICAgICByZXR1cm4gLUVGQVVMVDsKKworICAgIHB0ZV92YWwgPSBfX3B0ZSgocGh5c19hZGRyX3QpKHNobWFkZHJfcGh5KSB8IHBncHJvdF92YWwodm1hLT52bV9wYWdlX3Byb3QpKTsKKworICAgIHNldF9wdGVfYXQodm1hLT52bV9tbSwgdm1fYWRkciwgcHRlLCBwdGVfdmFsKTsKKyAgICBwdGVfdW5tYXBfdW5sb2NrKHB0ZSwgcHRsKTsKKworICAgIHJldHVybiByZXR2YWw7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqILmmxNzD6Mr2OiAgICAgc2htX2ZpbGxfa2V5dGFibGUKKyogss7K/cu1w/c6ICAgICAKKyogICAgKLSryOuyzsr9KSAgICB2b2lkCisqICAgICi0q7P2ss7K/SkgICAgdm9pZCAKKyogt7Ugu9gg1rU6ICAgICBTSE1fQ1RSTF9PSyBvciBTSE1fQ1RSTF9FUlJPUgorKiDG5Mv8y7XD9zogICAgIFRoaXMgZnVuY3Rpb24gaXMgdXNlZCBmb3IgcmVjb3JkIHRoZSBrZXkgYW5kIGluZGV4IHJlbGF0aW9uICAgICAgICAgICAgICAgICAgICAgICAgIAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2ludCBzaG1fZmlsbF9rZXl0YWJsZShzdHJ1Y3Qgc2htX2tleV9ub2RlICAqa2V5ZGF0YSkKK3sKKyAgICB1bnNpZ25lZCBpbnQgIGtleV9pbmRleCA9IDA7CisKKyAgICBpZiAoa2V5ZGF0YSA9PSBOVUxMKQorICAgICAgICByZXR1cm4gU0hNX0NUUkxfRVJST1I7CisKKyAgICBmb3IoOyBrZXlfaW5kZXggPCBTSE1fVU5JVF9OVU1fQklUUzsga2V5X2luZGV4KyspCisgICAgeworICAgICAgICBpZihzaG1fcmVtb3RlX21hbmFnZXItPmtleXNfaW5mb19oZWFkW2tleV9pbmRleF0ua2V5ID09IDApCisgICAgICAgIHsKKyAgICAgICAgICAgIG1lbWNweSgmc2htX3JlbW90ZV9tYW5hZ2VyLT5rZXlzX2luZm9faGVhZFtrZXlfaW5kZXhdLCBrZXlkYXRhLCBzaXplb2Yoc3RydWN0IHNobV9rZXlfbm9kZSkpOworICAgICAgICAgICAgcmV0dXJuIFNITV9DVFJMX09LOworICAgICAgICB9CisgICAgfQorICAgIHJldHVybiBTSE1fQ1RSTF9FUlJPUjsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoguabE3MPoyvY6ICAgICBzaG1fcmVtb3ZlX2tleW5vZGUKKyogss7K/cu1w/c6ICAgICAKKyogICAgKLSryOuyzsr9KSAgICB2b2lkCisqICAgICi0q7P2ss7K/SkgICAgdm9pZCAKKyogt7Ugu9gg1rU6ICAgICBTSE1fQ1RSTF9PSyBvciBTSE1fQ1RSTF9FUlJPUgorKiDG5Mv8y7XD9zogICAgIFRoaXMgZnVuY3Rpb24gaXMgdXNlZCBmb3IgcmVtb3ZlIHRoZSBrZXkgYW5kIGluZGV4IHJlbGF0aW9uICAgICAgICAgICAgICAgICAgICAgICAgIAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyB2b2lkIHNobV9yZW1vdmVfa2V5bm9kZSh1bnNpZ25lZCBpbnQga2V5X2luZGV4KQoreworICAgIG1lbXNldCgmc2htX3JlbW90ZV9tYW5hZ2VyLT5rZXlzX2luZm9faGVhZFtrZXlfaW5kZXhdLCAwLCBzaXplb2Yoc3RydWN0IHNobV9rZXlfbm9kZSkpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiC5psTcw+jK9jogICAgIHNobV9hbGxvY19uZXdfcGFnZQorKiCyzsr9y7XD9zogICAgIAorKiAgICAotKvI67LOyv0pICAgIHZvaWQKKyogICAgKLSrs/ayzsr9KSAgICB2b2lkIAorKiC3tSC72CDWtTogICAgIFNITV9DVFJMX09LIG9yIFNITV9DVFJMX0VSUk9SCisqIMbky/zLtcP3OiAgICAgVGhpcyBmdW5jdGlvbiBpcyB1c2VkIGZvciAgYWxsb2MgcGFnZSBmcm9tIHNobSBtZW0gcmVnaW9uICAgICAgICAgICAgICAgICAgICAgICAgICAKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgc2htX2FsbG9jX25ld19wYWdlKHN0cnVjdCB2bV9hcmVhX3N0cnVjdCAqdm1hLCAga2V5X3Qga2V5KQoreworICAgIHVuc2lnbmVkIGxvbmcgICAgICAgIHZtX2FkZHIgICAgICA9IDA7CisgICAgdW5zaWduZWQgaW50ICAgICAgICAgcmVnaW9uX2luZGV4ID0gMDsKKyAgICB2b2lkICAgICAgICAgICAgICAgICAqbmV3X3BhZ2UgICAgPSBOVUxMOworICAgIHN0cnVjdCBzaG1fa2V5X25vZGUgIG5ld19rZXkgICAgICA9IHswfTsKKworICAgIGlmKCh2bWEgPT0gTlVMTCkgfHwgKGdfc2htX3JlZ2lvbiA9PSBOVUxMKSkKKyAgICB7CisgICAgICAgIHByaW50aygiU2htIHJlZ2lvbiBpcyBub3QgcmVhZHlcbiIpOworICAgICAgICByZXR1cm4gU0hNX0NUUkxfRVJST1I7CisgICAgfQorCisgICAgdm1fYWRkciA9IHZtYS0+dm1fc3RhcnQ7CisgICAgCisgICAgZm9yICg7IHZtX2FkZHIgPCB2bWEtPnZtX2VuZDsgdm1fYWRkciArPSBQQUdFX1NJWkUpCisgICAgeworICAgICAgICByZWdpb25faW5kZXggPSBmaW5kX2ZpcnN0X3plcm9fYml0KHNobV9yZW1vdGVfbWFuYWdlci0+c2htX3JlZ2lvbnNfYml0bWFwLCBTSE1fVU5JVF9OVU1fQklUUyk7CisKKyAgICAgICAgaWYgKHJlZ2lvbl9pbmRleCA8IFNITV9VTklUX05VTV9CSVRTKSAKKyAgICAgICAgeworICAgICAgICAgICAgc2V0X2JpdChyZWdpb25faW5kZXgsIHNobV9yZW1vdGVfbWFuYWdlci0+c2htX3JlZ2lvbnNfYml0bWFwKTsgICAgCisgICAgICAgICAgICBuZXdfcGFnZSA9IFNITV9VTklUX1BBR0VfQUREUihyZWdpb25faW5kZXgpOworICAgICAgICAgICAgCisgICAgICAgICAgICBpZiAoc2htX3ZtYV93cml0ZV9wYWdldGFibGUodm1hLCB2bV9hZGRyLCBuZXdfcGFnZSkpCisgICAgICAgICAgICB7CisgICAgICAgICAgICAgICAgcmV0dXJuIFNITV9DVFJMX0VSUk9SOworICAgICAgICAgICAgfQorICAgICAgICAgICAgc2V0X2JpdChyZWdpb25faW5kZXgsIG5ld19rZXkuc2htX2ludXNlX2luZGV4KTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgIHsKKyAgICAgICAgICAgIHJldHVybiBTSE1fQ1RSTF9FUlJPUjsKKyAgICAgICAgfQorICAgIH0KKworICAgIGlmICghYml0bWFwX2VtcHR5KG5ld19rZXkuc2htX2ludXNlX2luZGV4LCBTSE1fVU5JVF9OVU1fQklUUykpCisgICAgeworICAgICAgICBuZXdfa2V5LmtleSA9IGtleTsgICAgCisgICAgICAgIG5ld19rZXkudm1hX2NvdW50Kys7CisgICAgICAgIHNobV9maWxsX2tleXRhYmxlKCZuZXdfa2V5KTsKKyAgICB9CisgICAgcmV0dXJuIFNITV9DVFJMX09LOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiC5psTcw+jK9jogICAgIHNobV9kb19yZW1vdGVfbWFwX3ZtYQorKiCyzsr9y7XD9zogICAgIAorKiAgICAotKvI67LOyv0pICAgIHZvaWQKKyogICAgKLSrs/ayzsr9KSAgICB2b2lkCisqILe1ILvYINa1OiAgICAgU0hNX0NUUkxfT0sgb3IgU0hNX0NUUkxfRVJST1IKKyogxuTL/Mu1w/c6ICAgICBUaGlzIGZ1bmN0aW9uIGlzIHVzZWQgZm9yIAorKiAgICAgICAgICAgICAgICAgICAKKy8qsunRr2tleSzI57n70tG31sXkuf3KudPDa2V5ttTTprXEYml0bWFwLCC38dTytNPX3MTatOaz2LfWxeQgICAgICAgICAgIAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK2ludCBzaG1fZG9fcmVtb3RlX21hcF92bWEoc3RydWN0IHZtX2FyZWFfc3RydWN0ICp2bWEsICBrZXlfdCBrZXkpCit7CisgICAgaW50ICAgICAgICAgICAgICAgICAgIHJldCAgICAgICAgICAgPSAwOworICAgIHVuc2lnbmVkIGxvbmcgICAgICAgICB2bV9hZGRyICAgICAgID0gMDsKKyAgICB1bnNpZ25lZCBpbnQgICAgICAgICAgcmVnaW9uX2luZGV4ICA9IDA7CisgICAgaW50ICAgICAgICAgICAgICAgICAgIGtleV9pbmRleCAgICAgPSAwOworICAgIHZvaWQgICAgICAgICAgICAgICAgICAqbmV3X3BhZ2VfcGh5ID0gTlVMTDsKKyAgICBzdHJ1Y3QgICBzaG1fa2V5X25vZGUgKmtleV9ub2RlICAgICA9IE5VTEw7CisgICAgREVDTEFSRV9CSVRNQVAoc2htX2ludXNlX3RtcCwgU0hNX1VOSVRfTlVNX0JJVFMpOworCisgICAgaWYoKHZtYSA9PSBOVUxMKSB8fCAoZ19zaG1fcmVnaW9uID09IE5VTEwpKQorICAgIHsKKyAgICAgICAgcHJpbnRrKCJzaG1fZG9fcmVtb3RlX21hcF92bWE6U2htIHJlZ2lvbiBpcyBub3QgcmVhZHlcbiIpOworICAgICAgICByZXR1cm4gU0hNX0NUUkxfRVJST1I7CisgICAgfQorCisgICAgLyrTs8nkdm1hzqq3x2NhY2hlyvTQ1CovCisgICAgcGdwcm90X25vbmNhY2hlZCh2bWEtPnZtX3BhZ2VfcHJvdCk7CisKKyAgICBzb2Z0X3NwaW5fbG9jayhTSE1fU0ZMT0NLKTsKKworICAgIGtleV9pbmRleCA9IHNobV9xdWFyeV9rZXlBcnJheShrZXkpOworICAgIAorICAgIGlmIChrZXlfaW5kZXggPCAwKSAKKyAgICB7CisgICAgICAgIHJldCA9IHNobV9hbGxvY19uZXdfcGFnZSh2bWEsIGtleSk7CisgICAgICAgIHNvZnRfc3Bpbl91bmxvY2soU0hNX1NGTE9DSyk7ICAgIAorICAgICAgICBpZiAocmV0IDwgMCkKKyAgICAgICAgICAgIHBhbmljKCJzaG1fYWxsb2NfbmV3X3BhZ2UgRmFpbFxuIik7CisgICAgICAgIHJldHVybiByZXQ7CisgICAgfQorCisgICAgdm1fYWRkciA9IHZtYS0+dm1fc3RhcnQ7CisgICAgCisgICAgaWYgKCgwIDw9IGtleV9pbmRleCkgJiYgKGtleV9pbmRleCA8IFNITV9VTklUX05VTV9CSVRTKSkKKyAgICAgICAga2V5X25vZGUgPSAmc2htX3JlbW90ZV9tYW5hZ2VyLT5rZXlzX2luZm9faGVhZFtrZXlfaW5kZXhdOworICAgIGVsc2UKKyAgICAgICAgcGFuaWMoImtleV9pbmRleCBvdXQgb2YgcmFuZ2U6IGZhaWxlZFxuIik7CisKKyAgICBtZW1jcHkoc2htX2ludXNlX3RtcCwga2V5X25vZGUtPnNobV9pbnVzZV9pbmRleCwgc2l6ZW9mKHNobV9pbnVzZV90bXApKTsKKworICAgIGZvciAoOyB2bV9hZGRyIDwgdm1hLT52bV9lbmQ7IHZtX2FkZHIgKz0gUEFHRV9TSVpFKQorICAgIHsgICAgCisgICAgICAgIHJlZ2lvbl9pbmRleCA9IGZpbmRfZmlyc3RfYml0KHNobV9pbnVzZV90bXAsIFNITV9VTklUX05VTV9CSVRTKTsKKyAgICAgICAgaWYgKHJlZ2lvbl9pbmRleCA8IFNITV9VTklUX05VTV9CSVRTKSAKKyAgICAgICAgeworICAgICAgICAgICAgbmV3X3BhZ2VfcGh5ID0gU0hNX1VOSVRfUEFHRV9BRERSKHJlZ2lvbl9pbmRleCk7CisgICAgICAgICAgICBpZiAoc2htX3ZtYV93cml0ZV9wYWdldGFibGUodm1hLCB2bV9hZGRyLCBuZXdfcGFnZV9waHkpKQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHNvZnRfc3Bpbl91bmxvY2soU0hNX1NGTE9DSyk7CisgICAgICAgICAgICAgICAgcGFuaWMoInNobV9kb19yZW1vdGVfbWFwX3ZtYSB2bV9pbnNlcnRfcGFnZSBmYWlsZWRcbiIpOworICAgICAgICAgICAgICAgIHJldHVybiBTSE1fQ1RSTF9FUlJPUjsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGNsZWFyX2JpdChyZWdpb25faW5kZXgsIHNobV9pbnVzZV90bXApOyAgICAKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgIHsKKyAgICAgICAgICAgIHJldHVybiBTSE1fQ1RSTF9FUlJPUjsKKyAgICAgICAgfQorICAgIH0KKyAgICBrZXlfbm9kZS0+dm1hX2NvdW50Kys7CisKKyAgICBzb2Z0X3NwaW5fdW5sb2NrKFNITV9TRkxPQ0spOworICAgIHJldHVybiBTSE1fQ1RSTF9PSzsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoguabE3MPoyvY6ICAgICBzaG1fcmVtb3RlX2ZyZWVfcGFnZXMKKyogss7K/cu1w/c6ICAgICAKKyogICAgKLSryOuyzsr9KSAgICB2b2lkCisqICAgICi0q7P2ss7K/SkgICAgdm9pZAorKiC3tSC72CDWtTogICAgIFNITV9DVFJMX09LIG9yIFNITV9DVFJMX0VSUk9SCisqIMbky/zLtcP3OiAgICAgVGhpcyBmdW5jdGlvbiBpcyB1c2VkIGZvciAKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitpbnQgc2htX3JlbW90ZV9mcmVlX3BhZ2VzKGtleV90IGtleSkKK3sKKyAgICBpbnQgICAgICAgICAgICAgICAgICBrZXlfaW5kZXggPSAwOworICAgIHVuc2lnbmVkIGludCAgICAgICAgIHJlZ2lvbl9pbmRleCA9IDA7CisgICAgc3RydWN0ICBzaG1fa2V5X25vZGUgKmtleV9ub2RlID0gTlVMTDsKKyAgICAKKyAgICBpZihnX3NobV9yZWdpb24gPT0gTlVMTCkKKyAgICB7CisgICAgICAgIHByaW50aygic2htX3JlbW90ZV9mcmVlX3BhZ2VzOiBTaG0gcmVnaW9uIGlzIG5vdCByZWFkeVxuIik7CisgICAgICAgIHJldHVybiBTSE1fQ1RSTF9FUlJPUjsKKyAgICB9CisKKyAgICBzb2Z0X3NwaW5fbG9jayhTSE1fU0ZMT0NLKTsKKworICAgIC8qsunRr2tleSovCisgICAga2V5X2luZGV4ID0gc2htX3F1YXJ5X2tleUFycmF5KGtleSk7CisgICAgaWYoa2V5X2luZGV4IDwgMCB8fCBrZXlfaW5kZXggPj0gU0hNX1VOSVRfTlVNX0JJVFMpIAorICAgIHsKKyAgICAgICAgc29mdF9zcGluX3VubG9jayhTSE1fU0ZMT0NLKTsKKyAgICAgICAgcGFuaWMoImVycm9yXG4iKTsKKyAgICB9CisKKyAgICAvKsr009q/57rLtcS+zcrNt8W1vbPY19PA7yovCisgICAga2V5X25vZGUgPSAmc2htX3JlbW90ZV9tYW5hZ2VyLT5rZXlzX2luZm9faGVhZFtrZXlfaW5kZXhdOworCisgICAga2V5X25vZGUtPnZtYV9jb3VudC0tOworCisgICAgaWYoa2V5X25vZGUtPnZtYV9jb3VudCA9PSAwKQorICAgIHsKKyAgICAgICAgZm9yX2VhY2hfc2V0X2JpdChyZWdpb25faW5kZXgsIGtleV9ub2RlLT5zaG1faW51c2VfaW5kZXgsIFNITV9VTklUX05VTV9CSVRTKQorICAgICAgICB7CisgICAgICAgICAgICBjbGVhcl9iaXQocmVnaW9uX2luZGV4LCBzaG1fcmVtb3RlX21hbmFnZXItPnNobV9yZWdpb25zX2JpdG1hcCk7ICAgICAgICAKKyAgICAgICAgfQorICAgICAgICBzaG1fcmVtb3ZlX2tleW5vZGUoa2V5X2luZGV4KTsKKyAgICB9CisgICAgc29mdF9zcGluX3VubG9jayhTSE1fU0ZMT0NLKTsKKyAgICByZXR1cm4gU0hNX0NUUkxfT0s7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqILmmxNzD6Mr2OiAgICAgc2htX3JwY29yZV9pbml0CisqILLOyv3LtcP3OgorKiAgICi0q8jrss7K/SkgIHZvaWQKKyogICAotKuz9rLOyv0pICB2b2lkCisqILe1ILvYINa1OgorKiDG5Mv8y7XD9zogICAgIFRoaXMgZnVuY3Rpb24gaXMgdXNlZCBmb3Igc2htIGN0cmwgaW5pdAorKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0YXRpYyBpbnQgX19pbml0IHNobV9ycGNvcmVfaW5pdCh2b2lkKQoreyAgICAKKyAgICBkbWFfYWRkcl90ICAgICAgICAgICBkbWFfcGh5czsKKyAgICBkbWFfYWRkcl90ICAgICAgICAgICBzaG1fa2V5SW5mb19waHlzOworICAgIHN0cnVjdCBzaG1fcG9vbF9tc2cgIHNobV9tc2cgPSB7MH07CisgICAgIAorICAgIGdfc2htX3JlZ2lvbiA9IGRtYV9hbGxvY19jb2hlcmVudChOVUxMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2l6ZV90KVNITV9SRU1PVEVfQlVGRl9MRU4sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZkbWFfcGh5cywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgR0ZQX0tFUk5FTCk7CisgICAgaWYoIWdfc2htX3JlZ2lvbikKKyAgICB7CisgICAgICAgIHBhbmljKCJnX3NobV9yZWdpb24gTk9NRU1cbiIpOworICAgIH0KKworICAgIGdfc2htX3BoeUFkZHIgPSBkbWFfcGh5czsKKworICAgIHNobV9yZW1vdGVfbWFuYWdlciA9IGRtYV9hbGxvY19jb2hlcmVudChOVUxMLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoc2l6ZV90KShTSE1fS0VZU19TVEFUVVNfTEVOKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnNobV9rZXlJbmZvX3BoeXMsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEdGUF9LRVJORUwpOworICAgIGlmKCFzaG1fcmVtb3RlX21hbmFnZXIpICAgIAorICAgIHsKKyAgICAgICAgcGFuaWMoInNobV9yZW1vdGVfbWFuYWdlciBOT01FTVxuIik7CisgICAgfQorCisgICAgbWVtc2V0KHNobV9yZW1vdGVfbWFuYWdlciwgMCwgc2l6ZW9mKHN0cnVjdCBzaG1fZW50aXR5KSk7CisgICAgc2htX21zZy5zaG1fbGVuICAgICAgICA9IFNITV9SRU1PVEVfQlVGRl9MRU47IAorICAgIHNobV9tc2cua2V5X21hbmFnZV9sZW4gPSBTSE1fS0VZU19TVEFUVVNfTEVOOyAKKyAgICBzaG1fbXNnLnNobV9tZW1vcnlfcGh5ID0gZ19zaG1fcGh5QWRkcjsgCisgICAgc2htX21zZy5rZXlfbWFuYWdlX3BoeSA9IHNobV9rZXlJbmZvX3BoeXM7IAorCisgICAgbWVtY3B5KCh2b2lkKilJUkFNX0JBU0VfQUREUl9TSE1fUkVNT1RFX1JFR0lPTiwgJnNobV9tc2csIHNpemVvZihzdHJ1Y3Qgc2htX3Bvb2xfbXNnKSk7CisKKyAgICByZXR1cm4gU0hNX0NUUkxfT0s7CisKK30KKworbGF0ZV9pbml0Y2FsbChzaG1fcnBjb3JlX2luaXQpOworCisKKwpkaWZmIC0tZ2l0IGEvYXAvb3MvbGludXgvbGludXgtMy40LngvaXBjL3NobV9jdHJsLmggYi9hcC9vcy9saW51eC9saW51eC0zLjQueC9pcGMvc2htX2N0cmwuaApuZXcgZmlsZSBtb2RlIDEwMDc1NQppbmRleCAwMDAwMDAwLi41YTg1MGExCi0tLSAvZGV2L251bGwKKysrIGIvYXAvb3MvbGludXgvbGludXgtMy40LngvaXBjL3NobV9jdHJsLmgKQEAgLTAsMCArMSw1NiBAQAorLyoKKyAqIGxpbnV4L2lwYy9zaG1fY3RybC5oCisgKiBDb3B5cmlnaHQgKEMpI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iBwYWRkaW5nWzE1XTsvL2ZvciBjYWNoZWxpbmUNCiAjZW5kaWYNCiAjaWZkZWYgU0tCX0RCR19QT09MDQogICAgIHN0cnVjdCBsaXN0X2hlYWQgICAgICAgIGFsbG9jX25vZGU7DQogICAgIGNvbnN0IGNoYXIgICAgICAgICAgICAgICpmaWxlOw0KLSAgICB1bnNpZ25lZCBsb25nICAgICAgICAgdGljazsNCi0gICAgdTMyICAgICAgICAgICAgICAgICAgICAgICAgbGluZTsNCisgICAgdW5zaWduZWQgbG9uZyAgICAgICAgICAgdGljazsNCisgICAgdTMyICAgICAgICAgICAgICAgICAgICAgbGluZTsNCiAgICAgc2tiX2FkZHJfdCAgICAgICAgICAgICAgKm1hZ2ljX3RvcDsNCiAgICAgc2tiX2FkZHJfdCAgICAgICAgICAgICAgbWFnaWNfYm90dG9tW1NLQl9QT09MX01BR0lDX05SXTsNCiAjZW5kaWYNCkBAIC0xNTAsMTEgKzE0OCwxMSBAQAogdHlwZWRlZiBzdHJ1Y3QNCiB7DQogICAgIHNrYl9wb29sX25vZGVfaW1wbF90ICAgICpmcmVlX2hlYWQ7DQotICAgIHNpemVfdCAgICAgICAgICAgICAgICAgICAgICBvYmpfc2l6ZTsNCi0gICAgc2tiX2NvdW50X3QgICAgICAgICAgICAgb2JqX2N1cl9ucjsNCisgICAgc2l6ZV90ICAgICAgICAgICAgICAgICAgIG9ial9zaXplOw0KKyAgICBza2JfY291bnRfdCAgICAgICAgICAgICAgb2JqX2N1cl9ucjsgICAgIC8vtbHHsL/J08MNCiANCiAvLyNpZmRlZiBTS0JfUE9PTF9BVVRPX0VYVEVORA0KLSAgICBza2JfY291bnRfdCAgICAgICAgICAgICBvYmpfbnI7DQorICAgIHNrYl9jb3VudF90ICAgICAgICAgICAgIG9ial9ucjsgICAgICAgICAgLy/X3LmyDQogLy8gICAgc2tiX2NvdW50X3QgICAgICAgICAgICAgb2JqX21heF9ucjsNCiAgICAgc2tiX2NvdW50X3QgICAgICAgICAgICAgb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XNfcG9vbF9jb25maWdbXSA9IA0KIHsNCiAjaWYgKFNLQl9TWVNfUE9PTF8wX05SID4gMCkNCiAgICAgew0KICAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMCksICAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQogICAgICAgICBTS0JfU1lTX1BPT0xfMF9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCiAgICAgICAgIFNLQl9TWVNfUE9PTF8wX05SLCAgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLQkgU0tCX1NZU19QT09MXzBfUEFUQ0hfTlIsDQotCSBTS0JfU1lTX1BPT0xfMF9SRVNFUlZFX05SLA0KKwkgICAgU0tCX1NZU19QT09MXzBfUEFUQ0hfTlIsDQorCSAgICBTS0JfU1lTX1BPT0xfMF9SRVNFUlZFX05SLA0KICAgICB9LA0KICNlbmRpZg0KIA0KQEAgLTM1NCw4ICsyNTYsOCBAQAogICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8xKSwgICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCiAgICAgICAgIFNLQl9TWVNfUE9PTF8xX1NJWkUsICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KICAgICAgICAgU0tCX1NZU19QT09MXzFfTlIsICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotCSAgU0tCX1NZU19QT09MXzFfUEFUQ0hfTlIsDQotCSAgU0tCX1NZU19QT09MXzFfUkVTRVJWRV9OUiwNCisJICAgIFNLQl9TWVNfUE9PTF8xX1BBVENIX05SLA0KKwkgICAgU0tCX1NZU19QT09MXzFfUkVTRVJWRV9OUiwNCiAgICAgfSwNCiAjZW5kaWYNCiANCkBAIC0zNjQsOCArMjY2LDggQEAKICAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMiksICAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQogICAgICAgICBTS0JfU1lTX1BPT0xfMl9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCiAgICAgICAgIFNLQl9TWVNfUE9PTF8yX05SLCAgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLQkgU0tCX1NZU19QT09MXzJfUEFUQ0hfTlIsDQotCSBTS0JfU1lTX1BPT0xfMl9SRVNFUlZFX05SLA0KKwkgICAgU0tCX1NZU19QT09MXzJfUEFUQ0hfTlIsDQorCSAgICBTS0JfU1lTX1BPT0xfMl9SRVNFUlZFX05SLA0KICAgICB9LA0KICNlbmRpZg0KIA0KQEAgLTM4NCw4ICsyODYsOCBAQAogICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF80KSwgICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCiAgICAgICAgIFNLQl9TWVNfUE9PTF80X1NJWkUsICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KICAgICAgICAgU0tCX1NZU19QT09MXzRfTlIsICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotCSBTS0JfU1lTX1BPT0xfNF9QQVRDSF9OUiwNCi0JIFNLQl9TWVNfUE9PTF80X1JFU0VSVkVfTlIsDQorCSAgICBTS0JfU1lTX1BPT0xfNF9QQVRDSF9OUiwNCisJICAgIFNLQl9TWVNfUE9PTF80X1JFU0VSVkVfTlIsDQogICAgIH0sDQogI2VuZGlmDQogDQpAQCAtNDE0LDggKzMxNiw4IEBACiAgICAgICAgICh2b2lkICopYXJyYXlfc3RhcnQoc2tiX3N5c19wb29sXzcpLCAgICAgICAgLyogYmFzZSBhZGRyZXNzICAgICAqLw0KICAgICAgICAgU0tCX1NZU19QT09MXzdfU0laRSwgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3Qgc2l6ZSAgICAgICovDQogICAgICAgICBTS0JfU1lTX1BPT0xfN19OUiwgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBudW1iZXIgICAgKi8NCi0JICBTS0JfU1lTX1BPT0xfN19QQVRDSF9OUiwNCi0JICBTS0JfU1lTX1BPT0xfN19SRVNFUlZFX05SLA0KKwkgICAgU0tCX1NZU19QT09MXzdfUEFUQ0hfTlIsDQorCSAgICBTS0JfU1lTX1BPT0xfN19SRVNFUlZFX05SLA0KICAgICB9LA0KICNlbmRpZg0KIA0KQEAgLTQyNCwyNDAgKzMyNiw4IEBACiAgICAgICAgICh2b2lkICopYXJyYXlfc3RhcnQoc2tiX3N5c19wb29sXzgpLCAgICAgICAgLyogYmFzZSBhZGRyZXNzICAgICAqLw0KICAgICAgICAgU0tCX1NZU19QT09MXzhfU0laRSwgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3Qgc2l6ZSAgICAgICovDQogICAgICAgICBTS0JfU1lTX1BPT0xfOF9OUiwgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBudW1iZXIgICAgKi8NCi0JICBTS0JfU1lTX1BPT0xfOF9QQVRDSF9OUiwgDQotCSAgU0tCX1NZU19QT09MXzhfUkVTRVJWRV9OUiwNCi0gICAgfSwNCi0jZW5kaWYNCi0NCi0jaWYgKFNLQl9TWVNfUE9PTF85X05SID4gMCkNCi0gICAgew0KLSAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfOSksICAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfOV9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF85X05SLCAgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLQkgIFNLQl9TWVNfUE9PTF85X1BBVENIX05SLCAgIA0KLQkgIFNLQl9TWVNfUE9PTF85X1JFU0VSVkVfTlIsDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMTBfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8xMCksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xMF9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzEwX05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMTBfUEFUQ0hfTlIsDQotCQlTS0JfU1lTX1BPT0xfMTBfUkVTRVJWRV9OUiwNCi0gICAgfSwNCi0jZW5kaWYNCi0NCi0jaWYgKFNLQl9TWVNfUE9PTF8xMV9OUiA+IDApDQotICAgIHsNCi0gICAgICAgICh2b2lkICopYXJyYXlfc3RhcnQoc2tiX3N5c19wb29sXzExKSwgICAgICAgLyogYmFzZSBhZGRyZXNzICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzExX1NJWkUsICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3Qgc2l6ZSAgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMTFfTlIsICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBudW1iZXIgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xMV9QQVRDSF9OUiwNCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xMV9SRVNFUlZFX05SLA0KLSAgICB9LA0KLSNlbmRpZg0KLQ0KLSNpZiAoU0tCX1NZU19QT09MXzEyX05SID4gMCkNCi0gICAgew0KLSAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMTIpLCAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMTJfU0laRSwgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xMl9OUiwgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLQkJU0tCX1NZU19QT09MXzEyX1BBVENIX05SLA0KLQkJU0tCX1NZU19QT09MXzEyX1JFU0VSVkVfTlIsDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMTNfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8xMyksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xM19TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzEzX05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotCSAgU0tCX1NZU19QT09MXzEzX1BBVENIX05SLA0KLQkgIFNLQl9TWVNfUE9PTF8xM19SRVNFUlZFX05SLA0KLSAgICB9LA0KLSNlbmRpZg0KLQ0KLSNpZiAoU0tCX1NZU19QT09MXzE0X05SID4gMCkNCi0gICAgew0KLSAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMTQpLCAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMTRfU0laRSwgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xNF9OUiwgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzE0X1BBVENIX05SLA0KLSAgICAgICAgU0tCX1NZU19QT09MXzE0X1JFU0VSVkVfTlIsDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMTVfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8xNSksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xNV9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzE1X05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotCSAgU0tCX1NZU19QT09MXzE1X1BBVENIX05SLA0KLQkgIFNLQl9TWVNfUE9PTF8xNV9SRVNFUlZFX05SLA0KLSAgICB9LA0KLSNlbmRpZg0KLQ0KLSNpZiAoU0tCX1NZU19QT09MXzE2X05SID4gMCkNCi0gICAgew0KLSAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMTYpLCAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMTZfU0laRSwgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xNl9OUiwgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzE2X1BBVENIX05SLA0KLSAgICAgICAgU0tCX1NZU19QT09MXzE2X1JFU0VSVkVfTlIsDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMTdfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8xNyksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xN19TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzE3X05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMTdfUEFUQ0hfTlIsDQotICAgICAgICBTS0JfU1lTX1BPT0xfMTdfUkVTRVJWRV9OUiwNCi0gICAgfSwNCi0jZW5kaWYNCi0NCi0jaWYgKFNLQl9TWVNfUE9PTF8xOF9OUiA+IDApDQotICAgIHsNCi0gICAgICAgICh2b2lkICopYXJyYXlfc3RhcnQoc2tiX3N5c19wb29sXzE4KSwgICAgICAgLyogYmFzZSBhZGRyZXNzICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzE4X1NJWkUsICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3Qgc2l6ZSAgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMThfTlIsICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBudW1iZXIgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xOF9QQVRDSF9OUiwNCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xOF9SRVNFUlZFX05SLA0KLQ0KLSAgICB9LA0KLSNlbmRpZg0KLQ0KLSNpZiAoU0tCX1NZU19QT09MXzE5X05SID4gMCkNCi0gICAgew0KLSAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMTkpLCAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMTlfU0laRSwgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8xOV9OUiwgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzE5X1BBVENIX05SLA0KLSAgICAgICAgU0tCX1NZU19QT09MXzE5X1JFU0VSVkVfTlIsDQotDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMjBfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8yMCksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yMF9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzIwX05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjBfUEFUQ0hfTlIsIA0KLSAgICAgICAgU0tCX1NZU19QT09MXzIwX1JFU0VSVkVfTlIsDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMjFfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8yMSksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yMV9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzIxX05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjFfUEFUQ0hfTlIsICAgDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjFfUkVTRVJWRV9OUiwNCi0gICAgfSwNCi0jZW5kaWYNCi0NCi0jaWYgKFNLQl9TWVNfUE9PTF8yMl9OUiA+IDApDQotICAgIHsNCi0gICAgICAgICh2b2lkICopYXJyYXlfc3RhcnQoc2tiX3N5c19wb29sXzIyKSwgICAgICAgLyogYmFzZSBhZGRyZXNzICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzIyX1NJWkUsICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3Qgc2l6ZSAgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjJfTlIsICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBudW1iZXIgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yMl9QQVRDSF9OUiwNCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yMl9SRVNFUlZFX05SLA0KLSAgICB9LA0KLSNlbmRpZg0KLQ0KLSNpZiAoU0tCX1NZU19QT09MXzIzX05SID4gMCkNCi0gICAgew0KLSAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMjMpLCAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjNfU0laRSwgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yM19OUiwgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzIzX1BBVENIX05SLA0KLSAgICAgICAgU0tCX1NZU19QT09MXzIzX1JFU0VSVkVfTlIsDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMjRfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8yNCksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yNF9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzI0X05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjRfUEFUQ0hfTlIsDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjRfUkVTRVJWRV9OUiwNCi0gICAgfSwNCi0jZW5kaWYNCi0NCi0jaWYgKFNLQl9TWVNfUE9PTF8yNV9OUiA+IDApDQotICAgIHsNCi0gICAgICAgICh2b2lkICopYXJyYXlfc3RhcnQoc2tiX3N5c19wb29sXzI1KSwgICAgICAgLyogYmFzZSBhZGRyZXNzICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzI1X1NJWkUsICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3Qgc2l6ZSAgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjVfTlIsICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBudW1iZXIgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yNV9QQVRDSF9OUiwNCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yNV9SRVNFUlZFX05SLA0KLSAgICB9LA0KLSNlbmRpZg0KLQ0KLSNpZiAoU0tCX1NZU19QT09MXzI2X05SID4gMCkNCi0gICAgew0KLSAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMjYpLCAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjZfU0laRSwgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yNl9OUiwgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzI2X1BBVENIX05SLA0KLSAgICAgICAgU0tCX1NZU19QT09MXzI2X1JFU0VSVkVfTlIsDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMjdfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8yNyksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yN19TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzI3X05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjdfUEFUQ0hfTlIsDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjdfUkVTRVJWRV9OUiwNCi0gICAgfSwNCi0jZW5kaWYNCi0NCi0jaWYgKFNLQl9TWVNfUE9PTF8yOF9OUiA+IDApDQotICAgIHsNCi0gICAgICAgICh2b2lkICopYXJyYXlfc3RhcnQoc2tiX3N5c19wb29sXzI4KSwgICAgICAgLyogYmFzZSBhZGRyZXNzICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzI4X1NJWkUsICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3Qgc2l6ZSAgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjhfTlIsICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBudW1iZXIgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yOF9QQVRDSF9OUiwNCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yOF9SRVNFUlZFX05SLA0KLSAgICB9LA0KLSNlbmRpZg0KLQ0KLSNpZiAoU0tCX1NZU19QT09MXzI5X05SID4gMCkNCi0gICAgew0KLSAgICAgICAgKHZvaWQgKilhcnJheV9zdGFydChza2Jfc3lzX3Bvb2xfMjkpLCAgICAgICAvKiBiYXNlIGFkZHJlc3MgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMjlfU0laRSwgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBzaXplICAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8yOV9OUiwgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IG51bWJlciAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzI5X1BBVENIX05SLA0KLSAgICAgICAgU0tCX1NZU19QT09MXzI5X1JFU0VSVkVfTlIsDQotICAgIH0sDQotI2VuZGlmDQotDQotI2lmIChTS0JfU1lTX1BPT0xfMzBfTlIgPiAwKQ0KLSAgICB7DQotICAgICAgICAodm9pZCAqKWFycmF5X3N0YXJ0KHNrYl9zeXNfcG9vbF8zMCksICAgICAgIC8qIGJhc2UgYWRkcmVzcyAgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8zMF9TSVpFLCAgICAgICAgICAgICAgICAgICAgICAgLyogb2JqZWN0IHNpemUgICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzMwX05SLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3QgbnVtYmVyICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMzBfUEFUQ0hfTlIsDQotICAgICAgICBTS0JfU1lTX1BPT0xfMzBfUkVTRVJWRV9OUiwNCi0gICAgfSwNCi0jZW5kaWYNCi0NCi0jaWYgKFNLQl9TWVNfUE9PTF8zMV9OUiA+IDApDQotICAgIHsNCi0gICAgICAgICh2b2lkICopYXJyYXlfc3RhcnQoc2tiX3N5c19wb29sXzMxKSwgICAgICAgLyogYmFzZSBhZGRyZXNzICAgICAqLw0KLSAgICAgICAgU0tCX1NZU19QT09MXzMxX1NJWkUsICAgICAgICAgICAgICAgICAgICAgICAvKiBvYmplY3Qgc2l6ZSAgICAgICovDQotICAgICAgICBTS0JfU1lTX1BPT0xfMzFfTlIsICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG9iamVjdCBudW1iZXIgICAgKi8NCi0gICAgICAgIFNLQl9TWVNfUE9PTF8zMV9QQVRDSF9OUiwNCi0gICAgICAgIFNLQl9TWVNfUE9PTF8zMV9SRVNFUlZFX05SLA0KKwkgICAgU0tCX1NZU19QT09MXzhfUEFUQ0hfTlIsIA0KKwkgICAgU0tCX1NZU19QT09MXzhfUkVTRVJWRV9OUiwNCiAgICAgfSwNCiAjZW5kaWYNCiB9Ow0KQEAgLTY2NSwxNSArMzM1LDYgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqDQogKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgyKu+1rqvyv3J+cP3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoNCiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLw0KLXNrYl9wb29sX2lubmVyX3QgKnNrYl9wb29sX2NyZWF0ZV9pbm5lcigNCi0gICAgICAgICAgICAgICAgICAgIHNrYl9wb29sX2lubmVyX3QgKmlubmVyLA0KLSAgICAgICAgICAgICAgICAgICAgc2l6ZV90ICAgICAgICAgICBvYmpfc2l6ZSwNCi0gICAgICAgICAgIC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X0hFQUQoJmlubmVyLT5hbGxvY19oZWFkKTsNCi0JCQlpbm5lci0+b2JqX2NudCA9IDB4MDA7DQotCQkJaW5uZXItPm9ial9tYXhfdXNlZF9jbnQgPSAweDAwOw0KLSNlbmRpZg0KLQkJZGVmYXVsdDoNCi0JCQlyZXR1cm47DQotCX0NCisgICAgc3dpdGNoKHR5cGUpDQorICAgIHsNCisgICAgICAgIGNhc2UgU0tCX1BPT0xfUkVTRVJWRToNCisgICAgICAgICAgICB3aGlsZSAoaW5uZXItPm9ial9jdXJfbnIgPiBpbm5lci0+b2JqX3Jlc2VydmVfbnIpDQorICAgICAgICAgICAgew0KKyAgICAgICAgICAgICAgICBuZXh0X2ZyZWUgPSBub2RlLT5mcmVlX25leHQ7DQorICAgICAgICAgICAgICAgIGtmcmVlKG5vZGUpOw0KKyAgICAgICAgICAgICAgICBpbm5lci0+b2JqX25yLS07DQorICAgICAgICAgICAgICAgIGlubmVyLT5vYmpfY3VyX25yLS07DQorICAgICAgICAgICAgICAgIG5vZGUgPSBuZXh0X2ZyZWU7DQorICAgICAgICAgICAgfQ0KKyAgICAgICAgICAgIGlubmVyLT5mcmVlX2hlYWQgPSBub2RlOw0KKyAgICAgICAgICAgIGJyZWFrOw0KKyAgICAgICAgY2FzZSBTS0JfUE9PTF9OT1JFU0VSVkU6DQorICAgICAgICAgICAgaW5uZXItPm9ial9uciAtPSBpbm5lci0+b2JqX2N1cl9ucjsNCisgICAgICAgICAgICB3aGlsZSAobm9kZSAhPSBOVUxMKQ0KKyAgICAgICAgICAgIHsgICANCisgICAgICAgICAgICAgICAgbmV4dF9mcmVlID0gbm9kZS0+ZnJlZV9uZXh0Ow0KKyAgICAgICAgICAgICAgICBrZnJlZShub2RlKTsNCisgICAgICAgICAgICAgICAgaW5uZXItPm9ial9jdXJfbnItLTsNCisgICAgICAgICAgICAgICAgbm9kZSA9IG5leHRfZnJlZTsNCisgICAgICAgICAgICB9DQorICAgICAgICAgICAgaW5uZXItPmZyZWVfaG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ial9zaXplLA0KICAgICAgICAgICAgICAgICAgICAgc2tiX2NvdW50X3QgICAgICBvYmpfbnIsDQotICAgICAgICAgICAgICAgICAgICBza2JfY291bnRfdCAgICAgIG9ial9tYXhfbnIsDQogICAgICAgICAgICAgICAgICAgICBza2JfY291bnRfdCAgICAgIG9ial9iYXRjaF9uciwNCiAgICAgICAgICAgICAgICAgICAgIHNrYl9jb3VudF90ICAgICAgb2JqX3Jlc2VydmVfbnIpDQogew0KLSAgICBza2JfcG9vbF9ub2RlX2ltcGxfdCAqbm9kZTsNCisgICAgQlVHX09OKCFwdHJfaXNfYWxpZ25lZChpbm5lcikgfHwgb2JqX3NpemUgPD0gMCB8fCBvYmpfbnIgPD0gMCk7DQogDQotICAgIEJVR19PTighIHB0cl9pc19hbGlnbmVkKGlubmVyKSB8fCBvYmpfc2l6ZSA8PSAwIHx8IG9ial9uciA8PSAwKTsNCi0NCi0vLyNpZmRlZiBTS0JfUE9PTF9BVVRPX0VYVEVORA0KLSAgICBpbm5lci0+b2JqX25yID0gMDA7DQorICAgIGlubmVyLT5vYmpfbnIgPSAwOw0KICAgICBpbm5lci0+b2JqX2JhdGNoX25yID0gb2JqX2JhdGNoX25yOw0KIAlpbm5lci0+b2JqX3Jlc2VydmVfbnIgPSBvYmpfcmVzZXJ2ZV9ucjsNCi0vLyNlbmRpZg0KIA0KICNpZmRlZiBTS0JfVFJBQ0UNCi0gICAgaW5uZXItPm9ial9jbnQgPSAweDAwOw0KLSAgICBpbm5lci0+b2JqX3VzZWRfY250ID0gMHgwMDsNCi0gICAgaW5uZXItPm9ial9tYXhfdXNlZF9jbnQgPSAweDAwOw0KKyAgICBtZW1zZXQoaW5uZXItPm9ial9yZWFsX3NpemUsIDAsIHNpemVvZihpbm5lci0+b2JqX3JlYWxfc2l6ZSkpOw0KICNlbmRpZg0KIA0KICNpZmRlZiBTS0JfREJHX1BPT0wNCiAgICAgSU5JVF9MSVNUX0hFQUQoJmlubmVyLT5hbGxvY19oZWFkKTsN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luZGV4ID0gc2tiX3N5c19wb29sX21hdGNoX2J5X3NpemUoc2l6ZSk7DQotICAgIGlmIChpbmRleCA9PSAtMSApDQotICAgIHsgIA0KLSAgICAgICAgaWYgKHNrYl9zeXNfcG9vbF9sYXJnZV9uciA+PSBTS0JfU1lTX1BPT0xfTEFSR0VfTlIgLSAxKQ0KKyAgICBpZiAoaW5kZXggPT0gLTEpDQorICAgIHsNCisgICAgICAgIHNrYl9wb29sX2lubmVyX3QgKmlubmVyOw0KKw0KKyAgICAgICAgaWYgKHNrYl9zeXNfcG9vbF9uciA+PSBTS0JfU1lTX1BPT0xfTlIpDQogICAgICAgICB7DQogICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmc2tiX3N5c19wb29sX3NwaW5sb2NrLCBmbGFncyk7DQogICAgICAgICAgICAgcmV0dXJuIE5VTEw7DQotICAgICAgICAgfQ0KLSAgICAgICAgc2tiX3Bvb2xfaW5uZXJfdCAqaW5uZXIgPShza2JfcG9vbF9pbm5lcl90KilremFsbG9jKHNpemVvZihza2JfcG9vbF9pbm5lcl90KSAsIEdGUF9BVE9NSUMgKTsNCi0gICAgICAgIGlmIChpbm5lciA9PSBOVUxMKXsNCi0gICAgICAgICAgICAgc3Bpbl91bmxvY2tfaXJxcmVzdG9yZSgmc2tiX3N5c19wb29sX3NwaW5sb2NrLCBmbGFncyk7DQorICAgICAgICB9DQorICAgICAgICBpbm5lciA9IChza2JfcG9vbF9pbm5lcl90KilremFsbG9jKHNpemVvZihza2JfcG9vbF9pbm5lcl90KSwgR0ZQX0FUT01JQyk7DQorICAgICAgICBpZiAoaW5uZXIgPT0gTlVMTCkNCisgICAgICAgIHsNCisgICAgICAgICAgICBzcGluX3VubG9ja19pcnFyZXN0b3JlKCZza2Jfc3lzX3Bvb2xfc3BpbmxvY2ssIGZsYWdzKTsNCiAgICAgICAgIAlyZXR1cm4gTlVMTDsNCiAgICAgICAgIH0NCi0gICAgICAgIGlmICgoc2tiX3N5c19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gICAgICAgICAgIGlubmVyLT5vYmpfcmVhbF9zaXplX2NudCA9IDA7DQotICAgICAgICAgaW5uZXItPm9ial9yZWFsX3NpemVbIGlubmVyLT5vYmpfcmVhbF9zaXplX2NudF0gPSBzaXplOw0KLSAgICAgICAgIGlubmVyLT5vYmpfcmVhbF9zaXplX2NudCsrOw0KLQ0KLSAgICAgICAgIGlubmVyLT5vYmpfdXNlZF9jbnQrKzsNCi0gICAgICAgIGlmIChpbm5lci0+b2JqX21heF91c2VkX2NudCA8IGlubmVyLT5vYmpfdXNlZF9jbnQpDQotICAgICAgICAgICAgaW5uZXItPm9ial9tYXhfdXNlZF9jbnQgPSBpbm5lci0+b2JqX3VzZWRfY250Ow0KLSAgICB9DQotI2VuZGlmDQogICAgIGlubmVyLT5vYmpfY3VyX25yLS07DQogICAgIG5vZGUgPSBpbm5lci0+ZnJlZV9oZWFkOw0KICAgICBpbm5lci0+ZnJlZV9oZWFkID0gbm9kZS0+ZnJlZV9uZXh0Ow0KQEAgLTEwMDgsNiArNjA1LDIwIEBACiANCiAjaWZkZWYgU0tCX0RCR19QT09MDQogICAgIGxpc3RfYWRkX3RhaWwoJm5vZGUtPmFsbG9jX25vZGUsICZpbm5lci0+YWxsb2NfaGVhZCk7DQorICAgIGlubmVyLT5vYmpfdXNlZF9jbnQrKzsNCisgICAgaWYgKGlubmVyLT5vYmpfbWF4X3VzZWRfY250IDwgaW5uZXItPm9ial91c2VkX2NudCkNCisgICAgICAgIGlubmVyLT5vYmpfbWF4X3VzZWRfY250ID0gaW5uZXItPm9ial91c2VkX2NudDsNCisjZW5kaWYNCisNCisjaWZkZWYgU0tCX1RSQUNFDQorICAgIGlmIChzaXplIDwgMjA0OCkNCisgICAgew0KKyAgICAgICAgaW5uZXItPm9ial9yZWFsX3NpemVbc2l6ZV0rKzsNCisgICAgfQ0KKyAgICBlbHNlDQorICAgIHsNCisgICAgICAgIGlubmVyLT5vYmpfcmVhbF9zaXplWzBdKys7DQorICAgIH0NCiAjZ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3N5c19wb29sX2JpdG1hcCk7DQotI2VuZGlmDQorICAgICAgICBza2JfcG9vbF9kZWxldGVfaW5uZXIoc2tiX3N5c19wb29sX2lubmVyW2luZGV4XSwgU0tCX1BPT0xfUkVTRVJWRSk7DQogDQogICAgIHNwaW5fdW5sb2NrX2lycXJlc3RvcmUoJnNrYl9zeXNfcG9vbF9zcGlubG9jaywgZmxhZ3MpOw0KIA0KQEAgLTEwODgsNyArNjg5LDcgQEAKIHsNCiAgICAgdTMyIGNudDsNCiANCi0gICBCVUdfT04oIGNmZyA9PSBOVUxMIHx8IGNmZ19uciA+IFNLQl9TWVNfUE9PTF9OUik7DQorICAgIEJVR19PTiggY2ZnID09IE5VTEwgfHwgY2ZnX25yID4gU0tCX1NZU19QT09MX05SKTsNCiANCiAgICAgZm9yIChjbnQgPSAweDAwOyBjbnQgPCBjZmdfbnI7IGNudCsrLCBjZmcrKykNCiAgICAgew0KQEAgLTEwOTcsMTcgKzY5OCwxNSBAQAogICAgICAgICAgICAgICAgIChza2JfcG9vbF9pbm5lcl90ICopY2ZnLT5hZGRyLA0KICAgICAgICAgICAgICAgICBjZmctPm9ial9zaXplLA0KICAgICAgICAgICAgICAgICBjZmctPm9ial9uciwNCi0gICAgICAgICAgICAgICAgU0tCX1NZU19QT09MX01BWF9OUiwNCiAgICAgICAgICAgICAgICAgY2ZnLT5wYXRjaF9uciwNCiAgICAgICAgICAgICAgICAgY2ZnLT5yZXNlcnZlX25yKTsNCi0gICAgICAgIHNrYl9zeXNfcG9vbF9sYXJnZV9zaXplW2NudF0gPSBjZmctPm9ial9zaXplOw0KLSAgICAgICAgc2tiX3N5c19wb29sX2xhcmdlX25yKys7DQotICAgICAgICBzZXRfYml0KGNudCAsIHNrYl9zeXNfcG9vbF9iaXRtYXApOw0KKyAgICAgICAgc2tiX3N5c19wb29sX3NpemVzW2NudF0gPSBjZmctPm9ial9zaXplOw0KKyAgICAgICAgc2tiX3N5c19wb29sX25yKys7DQorICAgICAgICBwb29sX3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