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Ki8KLyogZGVidWcgaGVscCBmdW5jdGlvbnMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCgojaWZkZWYgSEFWRV9WNEwxCnN0YXRpYyBjb25zdCBjaGFyICp2NGwxX2lvY3Rsc1tdID0gewoJW19JT0NfTlIoVklESU9DR0NBUCldICAgICAgID0gIlZJRElPQ0dDQVAiLAoJW19JT0NfTlIoVklESU9DR0NIQU4pXSAgICAgID0gIlZJRElPQ0dDSEFOIiwKCVtfSU9DX05SKFZJRElPQ1NDSEFOKV0gICAgICA9ICJWSURJT0NTQ0hBTiIsCglbX0lPQ19OUihWSURJT0NHVFVORVIpXSAgICAgPSAiVklESU9DR1RVTkVSIiwKCVtfSU9DX05SKFZJRElPQ1NUVU5FUildICAgICA9ICJWSURJT0NTVFVORVIiLAoJW19JT0NfTlIoVklESU9DR1BJQ1QpXSAgICAgID0gIlZJRElPQ0dQSUNUIiwKCVtfSU9DX05SKFZJRElPQ1NQSUNUKV0gICAgICA9ICJWSURJT0NTUElDVCIsCglbX0lPQ19OUihWSURJT0NDQVBUVVJFKV0gICAgPSAiVklESU9DQ0FQVFVSRSIsCglbX0lPQ19OUihWSURJT0NHV0lOKV0gICAgICAgPSAiVklESU9DR1dJTiIsCglbX0lPQ19OUihWSURJT0NTV0lOKV0gICAgICAgPSAiVklESU9DU1dJTiIsCglbX0lPQ19OUihWSURJT0NHRkJVRildICAgICAgPSAiVklESU9DR0ZCVUYiLAoJW19JT0NfTlIoVklESU9DU0ZCVUYpXSAgICAgID0gIlZJRElPQ1NGQlVGIiwKCVtfSU9DX05SKFZJRElPQ0tFWSldICAgICAgICA9ICJWSURJT0NLRVkiLAoJW19JT0NfTlIoVklESU9DR0ZSRVEpXSAgICAgID0gIlZJRElPQ0dGUkVRIiwKCVtfSU9DX05SKFZJRElPQ1NGUkVRKV0gICAgICA9ICJWSURJT0NTRlJFUSIsCglbX0lPQ19OUihWSURJT0NHQVVESU8pXSAgICAgPSAi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VSVkVEIiwKCVtfSU9DX05SKFZJRElPQ19FTlVNX0ZNVCldICAgICAgICAgPSAiVklESU9DX0VOVU1fRk1UIiwKCVtfSU9DX05SKFZJRElPQ19HX0ZNVCldICAgICAgICAgICAgPSAiVklESU9DX0dfRk1UIiwKCVtfSU9DX05SKFZJRElPQ19TX0ZNVCldICAgICAgICAgICAgPSAiVklESU9DX1NfRk1UIiwKCVtfSU9DX05SKFZJRElPQ19HX01QRUdDT01QKV0gICAgICAgPSAiVklESU9DX0dfTVBFR0NPTVAiLAoJW19JT0NfTlIoVklESU9DX1NfTVBFR0NPTVApXSAgICAgICA9ICJWSURJT0NfU19NUEVHQ09NUCIsCglbX0lPQ19OUihWSURJT0NfUkVRQlVGUyldICAgICAgICAgID0gIlZJRElPQ19SRVFCVUZTIiwKCVtfSU9DX05SKFZJRElPQ19RVUVSWUJVRildICAgICAgICAgPSAiVklESU9DX1FVRVJZQlVGIiwKCVtfSU9DX05SKFZJRElPQ19HX0ZCVUYpXSAgICAgICAgICAgPSAiVklESU9DX0dfRkJVRiIsCglbX0lPQ19OUihWSURJT0NfU19GQlVGKV0gICAgICAgICAgID0gIlZJRElPQ19TX0ZCVUYiLAoJW19JT0NfTlIoVklESU9DX09WRVJMQVkpXSAgICAgICAgICA9ICJWSURJT0NfT1ZFUkxBWSIsCglbX0lPQ19OUihWSURJT0NfUUJVRildICAgICAgICAgICAgID0gIlZJRElPQ19RQlVGIiwKCVtfSU9DX05SKFZJRElPQ19EUUJVRildICAgICAgICAgICAgPSAiVklESU9DX0RRQlVGIiwKCVtfSU9DX05SKFZJRElPQ19TVFJFQU1PTildICAgICAgICAgPSAiVklESU9DX1NUUkVBTU9OIiwKCVtfSU9DX05SKFZJRElPQ19TVFJFQU1PRkYpXSAgICAgICAgPSAiVklESU9DX1NUUkVBTU9GRiIsCglbX0lPQ19OUihWSURJT0NfR19QQVJNKV0gICAgICAgICAgID0gIlZJRElPQ19HX1BBUk0iLAoJW19JT0NfTlIoVklESU9DX1NfUEFSTSldICAgICAgICAgICA9ICJWSURJT0NfU19QQVJNIiwKCVtfSU9DX05SKFZJRElPQ19HX1NURCldICAgICAgICAgICAgPSAiVklESU9DX0dfU1REIiwKCVtfSU9DX05SKFZJRElPQ19TX1NURCldICAgICAgICAgICAgPSAiVklESU9DX1NfU1REIiwKCVtfSU9DX05SKFZJRElPQ19FTlVNU1REKV0gICAgICAgICAgPSAiVklESU9DX0VOVU1TVEQiLAoJW19JT0NfTlIoVklESU9DX0VOVU1JTlBVVCldICAgICAgICA9ICJWSURJT0NfRU5VTUlOUFVUIiwKCVtfSU9DX05SKFZJRElPQ19HX0NUUkwpXSAgICAgICAgICAgPSAiVklESU9DX0dfQ1RSTCIsCglbX0lPQ19OUihWSURJT0NfU19DVFJMKV0gICAgICAgICAgID0gIlZJRElPQ19TX0NUUkwiLAoJW19JT0NfTlIoVklESU9DX0dfVFVORVIpXSAgICAgICAgICA9ICJWSURJT0NfR19UVU5FUiIsCglbX0lPQ19OUihWSURJT0NfU19UVU5FUildICAgICAgICAgID0gIlZJRElPQ19TX1RVTkVSIiwKCVtfSU9DX05SKFZJRElPQ19HX0FVRElPKV0gICAgICAgICAgPSAiVklESU9DX0dfQVVESU8iLAoJW19JT0NfTlIoVklESU9DX1NfQVVESU8pXSAgICAgICAgICA9ICJWSURJT0NfU19BVURJTyIsCglbX0lPQ19OUihWSURJT0NfUVVFUllDVFJMKV0gICAgICAgID0gIlZJRElPQ19RVUVSWUNUUkwiLAoJW19JT0NfTlIoVklESU9DX1FVRVJZTUVOVSldICAgICAgICA9ICJWSURJT0NfUVVFUllNRU5VIiwKCVtfSU9DX05SKFZJRElPQ19HX0lOUFVUKV0gICAgICAgICAgPSAiVklESU9DX0dfSU5QVVQiLAoJW19JT0NfTlIoVklESU9DX1NfSU5QVVQpXSAgICAgICAgICA9ICJWSURJT0NfU19JTlBVVCIsCglbX0lPQ19OUihWSURJT0NfR19PVVRQVVQpXSAgICAgICAgID0gIlZJRElPQ19HX09VVFBVVCIsCglbX0lPQ19OUihWSURJT0NfU19PVVRQVVQpXSAgICAgICAgID0gIlZJRElPQ19TX09VVFBVVCIsCglbX0lPQ19OUihWSURJT0NfRU5VTU9VVFBVVCldICAgICAgID0gIlZJRElPQ19FTlVNT1VUUFVUIiwKCVtfSU9DX05SKFZJRElPQ19HX0FVRE9VVCldICAgICAgICAgPSAiVklESU9DX0dfQVVET1VUIiwKCVtfSU9DX05SKFZJRElPQ19TX0FVRE9VVCldICAgICAgICAgPSAiVklESU9DX1NfQVVET1VUIiwKCVtfSU9DX05SKFZJRElPQ19HX01PRFVMQVRPUildICAgICAgPSAiVklESU9DX0dfTU9EVUxBVE9SIiwKCVtfSU9DX05SKFZJRElPQ19TX01PRFVMQVRPUildICAgICAgPSAiVklESU9DX1NfTU9EVUxBVE9SIiwKCVtfSU9DX05SKFZJRElPQ19HX0ZSRVFVRU5DWSldICAgICAgPSAiVklESU9DX0dfRlJFUVVFTkNZIiwKCVtfSU9DX05SKFZJRElPQ19TX0ZSRVFVRU5DWSldICAgICAgPSAiVklESU9DX1NfRlJFUVVFTkNZIiwKCVtfSU9DX05SKFZJRElPQ19DUk9QQ0FQKV0gICAgICAgICAgPSAiVklESU9DX0NST1BDQVAiLAoJW19JT0NfTlIoVklESU9DX0dfQ1JPUCldICAgICAgICAgICA9ICJWSURJT0NfR19DUk9QIiwKCVtfSU9DX05SKFZJRElPQ19TX0NST1ApXSAgICAgICAgICAgPSAiVklESU9DX1NfQ1JPUCIsCglbX0lPQ19OUihWSURJT0NfR19KUEVHQ09NUCldICAgICAgID0gIlZJRElPQ19HX0pQRUdDT01QIiwKCVtfSU9DX05SKFZJRElPQ19TX0pQRUdDT01QKV0gICAgICAgPSAiVklESU9DX1NfSlBFR0NPTVAiLAoJW19JT0NfTlIoVklESU9DX1FVRVJZU1REKV0gICAgICAgICA9ICJWSURJT0NfUVVFUllTVEQiLAoJW19JT0NfTlIoVklESU9DX1RSWV9GTVQpXSAgICAgICAgICA9ICJW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TRVRfTk9STSldICAgICAgICAgICAgPSAiREVDT0RFUl9TRVRfTk9STSIsCglbX0lPQ19OUihERUNPREVSX1NFVF9JTlBVVCldICAgICAgICAgICA9ICJERUNPREVSX1NFVF9JTlBVVCIsCglbX0lPQ19OUihERUNPREVSX1NFVF9PVVRQVVQpXSAgICAgICAgICA9ICJERUNPREVSX1NFVF9PVVRQVVQiLAoJW19JT0NfTlIoREVDT0RFUl9FTkFCTEVfT1VUUFVUKV0gICAgICAgPSAiREVDT0RFUl9FTkFCTEVfT1VUUFVUIiwKCVtfSU9DX05SKERFQ09ERVJfU0VUX1BJQ1RVUkUpXSAgICAgICAgID0gIkRFQ09ERVJfU0VUX1BJQ1RVUkUiLAoJW19JT0NfTlIoREVDT0RFUl9TRVRfR1BJTyldICAgICAgICAgICAgPSAiREVDT0RFUl9TRVRfR1BJTyIsCglbX0lPQ19OUihERUNPREVSX0lOSVQpXSAgICAgICAgICAgICAgICA9ICJERUNPREVSX0lOSVQiLAoJW19JT0NfTlIoREVDT0RFUl9TRVRfVkJJX0JZUEFTUyldICAgICAgPSAiREVDT0RFUl9TRVRfVkJJX0JZUEFTUyIsCglbX0lPQ19OUihERUNPREVSX0RVTVApXSAgICAgICAgICAgICAgICA9ICJERUNPREVSX0RVTVAiLAojZW5kaWYKCVtfSU9DX05SKEFVRENfU0VUX1JBRElPKV0gICAgICAgICAgICAgID0gIkFVRENfU0VUX1JBRElPIiwKCglbX0lPQ19OUihUVU5FUl9TRVRfVFlQRV9BRERSKV0gICAgICAgICA9ICJUVU5FUl9TRVRfVFlQRV9BRERSIiwKCVtfSU9DX05SKFRVTkVSX1NFVF9TVEFOREJZKV0gICAgICAgICAgID0gIlRVTkVSX1NFVF9TVEFOREJZIiwKCVtfSU9DX05SKFREQTk4ODdfU0VUX0NPTkZJRyldICAgICAgICAgID0gIlREQTk4ODdfU0VUX0NPTkZJRyIsCgoJW19JT0NfTlIoVklESU9DX0lOVF9TX1RVTkVSX01PREUpXSAgICAgPSA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