From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (NAM02-BN1-obe.outbound.protection.outlook.com [40.107.212.60]) by mx.groups.io with SMTP id smtpd.web10.9121.1676440087161867900 for ; Tue, 14 Feb 2023 21:48:08 -0800 Authentication-Results: mx.groups.io; dkim=fail, err=mail: missing word in phrase: charset not supported: "big5"; spf=pass (domain: ami.com, ip: 40.107.212.60, mailfrom: tonylo@ami.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z62KoXN7NHZwFdg+7uSaLiuMoGzE/hqb6LuT9yhaDdbSuTE2u+QwCiILOGro73KemzIkfZnxj/47p8yPdxfRmCzofpTZyWIQ1WhWJjQKBmEEZdJ4qhbrT/wOREZvv1wi+3yQGmJn338lw3Kb8hm1Up2CBvPRYEQpygPqF5yqeQGvoAcVcHZRCofm7sIKrMA7pMxFC6At4g2UjIdSWLlFQdv1rpoHrtnwErgrV1sS9c1DWQEeZLEIdguOHwCnUGF6SYmZ/HgS6FO77EqSlp9v9gt8HJP4rmyIOwqkR5Mb0SkNes8sTAWHstUWGOkR9fUvL6djblBy5IuKFrELr09Z4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=i7xO7T8/nlq1ouHEagocugE1eqX9qakAbcboRUJuBrE=; b=m0OTOlcAXvvgTOMWoWkEwVf+cY1xDla7d25Cw28lSNtexKJr5k/twLjMEF5R0006lP8xGyvgEBqxaKipqPhSnuM9/Z9cd593xJzPYRAFp5X+l0qYCVveGSFKDg3q+VYZIn0pi2HWx4PpJlHPgnuBbi6Ogr08pl4IPAR+j6NZJMtfxAy1huV6eIsH9b1/0v3q29C212e1Wn1lTORGnoXngPB4sCSSB9GdOM4j+CadgolWiNH8z2COrWjFQULNOY9z5qk2Sc/uYbW9FDxXJRFZsq/gppcHpgFtnOoNczgemisNrt5EifHnjZ08Us1euVk71um68u8fOey2Nv8+br0qEA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=ami.com; dmarc=pass action=none header.from=ami.com; dkim=pass header.d=ami.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ami.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=i7xO7T8/nlq1ouHEagocugE1eqX9qakAbcboRUJuBrE=; b=VL5BqNn3YdXED4Yaq5DPMik25QI25S8uwcozw5U6cmAI4gQyi7LBV2VGmwygiI2WFTltZamPT+9ot4xlaMS5coMPN4lQ/h+QT6OzK3y7LuUEEu+123XACVn3wbwqw1euVTjILqDmAR55KM9ZhxH4MOhMknV6EiojcxUGS9YvUiw= Received: from CO1PR10MB4692.namprd10.prod.outlook.com (2603:10b6:303:99::6) by DS7PR10MB5072.namprd10.prod.outlook.com (2603:10b6:5:3b1::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.10; Wed, 15 Feb 2023 05:47:55 +0000 Received: from CO1PR10MB4692.namprd10.prod.outlook.com ([fe80::22fb:2e38:7424:f91b]) by CO1PR10MB4692.namprd10.prod.outlook.com ([fe80::22fb:2e38:7424:f91b%8]) with mapi id 15.20.6111.008; Wed, 15 Feb 2023 05:47:54 +0000 From: =?big5?B?VG9ueSBMbyAow7mq96pRKQ==?= To: =?big5?B?UmljaGFyZCBIbyAopvOp+qm+KQ==?= , "devel@edk2.groups.io" CC: Andrew Fish , Leif Lindholm , Michael D Kinney , Michael Kubacki , Zhiguang Liu , Liming Gao , Dos Hsieh , Felix Polyudov , Srini Narayana , Harikrishna Doppalapudi Subject: Re: [PATCH v3 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support Thread-Topic: [PATCH v3 1/3] UsbNetworkPkg/UsbRndis: Add USB RNDIS devices support Thread-Index: AQHZQP99HxARPPSj3U2dRdISNKOiy67Pf93A Date: Wed, 15 Feb 2023 05:47:54 +0000 Message-ID: References: <20230215053622.3746-1-richardho@ami.com> In-Reply-To: <20230215053622.3746-1-richardho@ami.com> Accept-Language: zh-TW, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=ami.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: CO1PR10MB4692:EE_|DS7PR10MB5072:EE_ x-ms-office365-filtering-correlation-id: 9b3c9ad9-dffc-481d-b0d3-08db0f182ed5 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MAyH6jk56K3HD1Q6P8rK1JxAUVs9Q/qnrFlZpffXLXTv9/WmfUkMwvcQMSK9f/Tv/bImoc16gknhSODtYVoa/PI6F2/i3EFSZ4ewApughY28JfrL+1P3dDZD2QG2YlVjJskpkybPOFnRz4oXBZFA+lWs6dh9eAeYsuL4Xs2GCjVBYpbbOlAohN82mZSJy/1/rzTYp6vsBmk4HgD04c5agln9JoOgBsmUPsrCuNNPNoavO+Q4R5BDUFz49IrpOrcPvmsXXx1mNn7vsscvQI/Bip57W+KWxb5tn2e6l6bwnxtjbcROknIDhIyv6EGanON8fxNrnANG7F5yZClVukNh94Bu3etBBWIDI0Hsnw44nDEMUttNwnUtOMeTJvwPXvtSit9Voy2czkRjBtZHklfH4jABrmg04BliKJsSqi26Yhoe5WuthnQHoEw+Sm/X/+h9bINUlgo/rSBBr0YLLZ7x8xqu2Fl5pZZZb6WJFUAFiwXiC8qYysCnIlrrxnyZGDwqi+Y0BVKZx7ai7Rgv2WnDVvn6e/8YJD1PtL1CqnmSB8zvrvGkn8R49yZCGwMEk65mhowQtuxy8WvBTQgrGZHmlu5178cEjK4+HUbAoLNayZ/5H+a/LDtAAwTVGVObueiqteItkgdF05I/hp41/FAm8bw3OhOREVe0CuhQB7DkJ6JCRT2wtPq5J4pGjpq/8Uoob6tK0AbB7D53rjn/EjQi0pxiiDd4fWDtqynz2NQLuJw= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CO1PR10MB4692.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(396003)(39850400004)(366004)(136003)(346002)(376002)(451199018)(38070700005)(86362001)(85182001)(40140700001)(66446008)(66556008)(19627235002)(8676002)(66476007)(54906003)(316002)(478600001)(64756008)(76116006)(4326008)(66946007)(33656002)(83380400001)(7696005)(53546011)(110136005)(52536014)(8936002)(5660300002)(2906002)(71200400001)(30864003)(122000001)(26005)(55016003)(9686003)(186003)(41300700001)(6506007)(38100700002)(66899018)(579004)(559001)(44824005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?big5?B?K0I1OGhkeTBaZUhieUg4bm1OOWtLWUZ4TzM0dmJBR1lLdDB0aElEZEh3aGMvbHEy?= =?big5?B?NDAwMUo1b3A3RGxmQk5yUGx4NmRGTEw2SWx2bzI4ODUydko2bEpXdldsSVEwdEdl?= =?big5?B?a0Q4VG1yUmJ2MEdCU05oL3NMTS9qbWhaS0JpaDRqTjg3T2dMMFVZeUcxTmh5OFBQ?= =?big5?B?ODBZOFUyTXVhbmVzR2dNTG0yZEU0MEVhV0xVRkNRakw0bm4wV255aDlkaHBmc0Fy?= =?big5?B?Y2p1RXg3TXdISTBxVmJIdm5rSjR5cEZ1K280OGhKejlSUFJwMEJHR0k4SWxyOE1y?= =?big5?B?OCtnazJtWWJBL0E4WnhFSk9XVnVUb0tPd1grMDlvYUZISFBTMTdJVk8wdk9mb2hx?= =?big5?B?eCtYUHk4OWsxMC81bHFWcUNEbUp6OXl6dldnc1AwMnNzWWFS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?bGhzSmw0dmZHTFRUMmdlazJUTXdrUHZCamVzbjg1RFIxdmpkY3I1bEtXd0oxbHp4?= =?big5?B?cTc5d3Fld3ZzaUtod0hldHRxVmpqd3lHU2MxZHpyRDdHdC9wVXlGaGVZYkZiSHpx?= =?big5?B?REdsUElNQkpyZi9HSkpYMG5tdWlkOUxKRjhxNzBmcmkxcTgwcUswS2U4UDh3SVVS?= =?big5?B?ZVdhUW0za3dieXUzWFhXNy9sdmFBQzV2TEp0WGdjbExtRkx2SFNydnQvYlZScXZC?= =?big5?B?RnVkYWpCMnNLQ3VMMmxCTW4rNkRsaThlZGtWNk1NVXBxVjM2VWRoOCtkWVlzbFhL?= =?big5?B?UkNYbThMK05aV3F4K0tOcDUzRmhUd1F2dGZxbWVhdGJlbXNRNlVnUUdKSm9CZ3NQ?= =?big5?B?S04rZjYrSWgxTDMrVDhwUFRhNW1saTJIRzdIYk90S3lOZXpXTXZvVHptK0ZMbzRh?= =?big5?B?UmFKL2V5N2VtUVEzWEp4dUtXaDEwL2pmMDZ2OUZBOXUweTAyZGdRdG5jOVFHRGhS?= =?big5?B?VTQxTlBVK1Q5ZFdUVC9uRzBXNy9ERFZoZHdObCtyVWFLY1grYXB0eEQ2eDlwM2Nw?= =?big5?B?NElhN0ZTWDNka0NBZFhodnFYWTFpYS92YnBBOVo2VGx0UHZEaWR1eUhtYk5WZVpG?= =?big5?B?d25GRkJDM2dEejZIeFEzRU44VGtKSVZhVGZiVkRGaW0yLzNyR0dTcmd3Rm9qSVBl?= =?big5?Q?Gg2yzIMUTJBr45gGlETxmQcE/eTnls60XyPMAptH92k=3D?= MIME-Version: 1.0 X-OriginatorOrg: ami.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CO1PR10MB4692.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b3c9ad9-dffc-481d-b0d3-08db0f182ed5 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2023 05:47:54.2132 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 27e97857-e15f-486c-b58e-86c2b3040f93 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 8nYfuDK/50o0chdxdRPYN8koS1rRDudEF5/KcdfVdKPOIXt9762IN3NyNIOwjB/6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR10MB5072 Content-Language: zh-TW Content-Type: text/plain; charset="big5" Content-Transfer-Encoding: base64 K3RlYW1zDQoNCi0tLS0tT3JpZ2luYWwgTWVzc2FnZS0tLS0tDQpGcm9tOiBSaWNoYXJkIEhvICim 86n6qb4pIDxSaWNoYXJkSG9AYW1pLmNvbT4NClNlbnQ6IFdlZG5lc2RheSwgRmVicnVhcnkgMTUs IDIwMjMgMTozNyBQTQ0KVG86IGRldmVsQGVkazIuZ3JvdXBzLmlvDQpDYzogQW5kcmV3IEZpc2gg PGFmaXNoQGFwcGxlLmNvbT47IExlaWYgTGluZGhvbG0gPHF1aWNfbGxpbmRob2xAcXVpY2luYy5j b20+OyBNaWNoYWVsIEQgS2lubmV5IDxtaWNoYWVsLmQua2lubmV5QGludGVsLmNvbT47IE1pY2hh ZWwgS3ViYWNraSA8bWljaGFlbC5rdWJhY2tpQG1pY3Jvc29mdC5jb20+OyBaaGlndWFuZyBMaXUg PHpoaWd1YW5nLmxpdUBpbnRlbC5jb20+OyBMaW1pbmcgR2FvIDxnYW9saW1pbmdAYnlvc29mdC5j b20uY24+OyBUb255IExvICjDuar3qlEpIDxUb255TG9AYW1pLmNvbT4NClN1YmplY3Q6IFtQQVRD SCB2MyAxLzNdIFVzYk5ldHdvcmtQa2cvVXNiUm5kaXM6IEFkZCBVU0IgUk5ESVMgZGV2aWNlcyBz dXBwb3J0DQoNClRoaXMgZHJpdmVyIHByb3ZpZGVzIFVFRkkgZHJpdmVyIGZvciBVU0IgUk5ESVMg ZGV2aWNlDQoNClNpZ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AgICAgMHgxNA0KKyNkZWZpbmUgVVNCX0VUSF9YTUlUX09ORV9D T0xMSVNJT04gICAgICAweDE1DQorI2RlZmluZSBVU0JfRVRIX1hNSVRfTU9SRV9DT0xMSVNJT05T ICAgIDB4MTYNCisjZGVmaW5lIFVTQl9FVEhfWE1JVF9ERUZFUlJFRCAgICAgICAgICAgMHgxNw0K KyNkZWZpbmUgVVNCX0VUSF9YTUlUX01BWF9DT0xMSVNJT05TICAgICAweDE4DQorI2RlZmluZSBV U0JfRVRIX1JDVl9PVkVSUlVOICAgICAgICAgICAgIDB4MTkNCisjZGVmaW5lIFVTQl9FVEhfWE1J VF9VTkRFUlJVTiAgICAgICAgICAgMHgxQQ0KKyNkZWZpbmUgVVNCX0VUSF9YTUlUX0hFQVJUQkVB VF9GQUlMVVJFICAweDFCDQorI2RlZmluZSBVU0JfRVRIX1hNSVRfVElNRVNfQ1JTX0xPU1QgICAg IDB4MUMNCisjZGVmaW5lIFVTQl9FVEhfWE1JVF9MQVRFX0NPTExJU0lPTlMgICAgMHgxRA0KKw0K Ky8vIE5JQyBJbmZvcm1hdGlvbg0KK3R5cGVkZWYgc3RydWN0IHsNCisgIFVJTlQzMiAgICAgICAg ICAgICAgICAgICAgICAgICBTaWduYXR1cmU7DQorICBFREtJSV9VU0JfRVRIRVJORVRfUFJPVE9D T0wgICAgKlVzYkV0aDsNCisgIFVJTlQxNiAgICAgICAgICAgICAgICAgICAgICAgICBJbnRlcnJ1 cE9wRmxhZzsNCisgIFVJTlQ2NCAgICAgICAgICAgICAgICAgICAgICAgICBNYXBwZWRBZGRyOw0K KyAgUFhFX01BQ19BRERSICAgICAgICAgICAgICAgICAgIE1jYXN0TGlzdFtNQVhfTUNBU1RfQURE UkVTU19DTlRdOw0KKyAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgIE1jYXN0Q291bnQ7 DQorICBVSU5UNjQgICAgICAgICAgICAgICAgICAgICAgICAgTWVkaWFIZWFkZXJbTUFYX1hNSVRf QlVGRkVSU107DQorICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgVHhCdWZmZXJDb3Vu dDsNCisgIFVJTlQxNiAgICAgICAgICAgICAgICAgICAgICAgICBTdGF0ZTsNCisgIEJPT0xFQU4g ICAgICAgICAgICAgICAgICAgICAgICBDYW5UcmFuc21pdDsNCisgIFVJTlQxNiAgICAgICAgICAg ICAgICAgICAgICAgICBSZWNlaXZlU3RhdHVzOw0KKyAgVUlOVDggICAgICAgICAgICAgICAgICAg ICAgICAgIFJ4RmlsdGVyOw0KKyAgVUlOVDMyICAgICAgICAgICAgICAgICAgICAgICAgIFJ4RnJh bWU7DQorICBVSU5UMzIgICAgICAgICAgICAgICAgICAgICAgICAgVHhGcmFtZTsNCisgIFVJTlQx NiAgICAgICAgICAgICAgICAgICAgICAgICBOZXR3b3JrQ29ubmVjdDsNCisgIFVJTlQ4ICAgICAg ICAgICAgICAgICAgICAgICAgICBDYWJsZURldGVjdDsNCisgIFVJTlQxNiAgICAgICAgICAgICAg ICAgICAgICAgICBNYXhTZWdtZW50U2l6ZTsNCisgIEVGSV9NQUNfQUREUkVTUyAgICAgICAgICAg ICAgICBNYWNBZGRyOw0KKyAgUFhFX0NQQl9TVEFSVF8zMSAgICAgICAgICAgICAgIFB4ZVN0YXJ0 Ow0KKyAgUFhFX0NQQl9JTklUSUFMSVpFICAgICAgICAgICAgIFB4ZUluaXQ7DQorICBVSU5UOCAg ICAgICAgICAgICAgICAgICAgICAgICAgUGVybU5vZGVBZGRyZXNzW1BYRV9NQUNfTEVOR1RIXTsN CisgIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICBDdXJyZW50Tm9kZUFkZHJlc3NbUFhF X01BQ19MRU5HVEhdOw0KKyAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgIEJyb2FkY2Fz dE5vZGVBZGRyZXNzW1BYRV9NQUNfTEVOR1RIXTsNCisgIEVGSV9VU0JfREVWSUNFX1JFUVVFU1Qg ICAgICAgICBS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xdWVzdHMu DQorc3RydWN0IF9FREtJSV9VU0JfRVRIRVJORVRfUFJPVE9DT0wgew0KKyAgRURLSUlfVVNCX0VU SEVSTkVUX1VOREkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVzYkV0aFVuZGk7 DQorICAvLyBmb3IgY2FsbGluZyB0aGUgVU5ESSBjaGlsZCBmdW5jdGlvbnMNCisgIEVES0lJX1VT Ql9FVEhFUk5FVF9JTklUSUFMSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2JFdGhJ bml0aWFsaXplOw0KKyAgRURLSUlfVVNCX0VUSEVSTkVUX1NUQVRJU1RJQ1MgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIFVzYkV0aFN0YXRpc3RpY3M7DQorICBFREtJSV9VU0JfRVRIRVJORVRf UkVDRUlWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNiRXRoUmVjZWl2ZTsNCisg IEVES0lJX1VTQl9FVEhFUk5FVF9UUkFOU01JVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBVc2JFdGhUcmFuc21pdDsNCisgIEVES0lJX1VTQl9FVEhFUk5FVF9JTlRFUlJVUFQgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBVc2JFdGhJbnRlcnJ1cHQ7DQorICBFREtJSV9VU0JfR0VU X0VUSF9NQUNfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNiRXRoTWFjQWRk cmVzczsNCisgIEVES0lJX1VTQl9FVEhfTUFYX0JVTEtfU0laRSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBVc2JFdGhNYXhCdWxrU2l6ZTsNCisgIEVES0lJX1VTQl9IRUFERVJfRlVOQ1RJ T05BTF9ERVNDUklQVE9SICAgICAgICAgICAgICAgICAgICBVc2JIZWFkZXJGdW5EZXNjcmlwdG9y Ow0KKyAgRURLSUlfVVNCX1VOSU9OX0ZVTkNUSU9OQUxfREVTQ1JJUFRPUiAgIC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GwtdGVybWluYXRlZCBBU0NJSSBzdHJpbmcNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGFycmF5IGluZGljYXRpbmcgdGhlIGxhbmd1YWdlLiBUaGlzIGlzIHRo ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2Ugb2YgdGhlIGRyaXZl ciBuYW1lIHRoYXQgdGhlIGNhbGxlciBpcw0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgcmVxdWVzdGluZywgYW5kIGl0IG11c3QgbWF0Y2ggb25lIG9mIHRoZQ0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VzIHNwZWNpZmllZCBpbiBTdXBwb3J0ZWRMYW5n dWFnZXMuIFRoZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyIG9mIGxh bmd1YWdlcyBzdXBwb3J0ZWQgYnkgYSBkcml2ZXIgaXMgdXANCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHRvIHRoZSBkcml2ZXIgd3JpdGVyLiBMYW5ndWFnZSBpcyBzcGVjaWZpZWQN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIFJGQyA0NjQ2IG9yIElTTyA2Mzkt MiBsYW5ndWFnZSBjb2RlIGZvcm1hdC4NCisgIEBwYXJhbVtvdXRdIERyaXZlck5hbWUgICAgICAg IEEgcG9pbnRlciB0byB0aGUgVW5pY29kZSBzdHJpbmcgdG8gcmV0dXJuLg0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgVGhpcyBVbmljb2RlIHN0cmluZyBpcyB0aGUgbmFtZSBvZiB0 aGUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyaXZlciBzcGVjaWZpZWQgYnkg VGhpcyBpbiB0aGUgbGFuZ3VhZ2UNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNw ZWNpZmllZCBieSBMYW5ndWFnZS4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAg IFRoZSBVbmljb2RlIHN0cmluZyBmb3IgdGhlIERyaXZlciBzcGVjaWZpZWQgYnkNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFRoaXMgYW5kIHRoZSBsYW5ndWFnZSBzcGVjaWZpZWQg YnkgTGFuZ3VhZ2Ugd2FzDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm5l ZCBpbiBEcml2ZXJOYW1lLg0KKyAgQHJldHZhbCBFRklfSU5WQUxJRF9QQVJBTUVURVIgTGFuZ3Vh Z2UgaXMgTlVMTC4NCisgIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSIERyaXZlck5hbWUg aXMgTlVMTC4NCisgIEByZXR2YWwgRUZJX1VOU1VQUE9SVEVEICAgICAgIFRoZSBkcml2ZXIgc3Bl Y2lmaWVkIGJ5IFRoaXMgZG9lcyBub3Qgc3VwcG9ydA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgdGhlIGxhbmd1YWdlIHNwZWNpZmllZCBieSBMYW5ndWFnZS4NCisNCisqKi8NCitF RklfU1RBVFVTDQorRUZJQVBJDQorTmV0d29ya0NvbW1vbkNvbXBvbmVudE5hbWVHZXREcml2ZXJO YW1lICgNCisgIElOICBFRklfQ09NUE9ORU5UX05BTUVfUFJPVE9DT0wgICpUaGlzLA0KKyAgSU4g IENIQVI4ICAgICAgICAgICAgICAgICAgICAgICAgKkxhbmd1YWdlLA0KKyAgT1VUIENIQVIxNiAg ICAgICAgICAgICAgICAgICAgICAgKipEcml2ZXJOYW1lDQorICApDQorew0KKyAgcmV0dXJuIExv b2t1cFVuaWNvZGVTdHJpbmcyICgNCisgICAgICAgICAgIExhbmd1YWdlLA0KKyAgICAgICAgICAg VGhpcy0+U3VwcG9ydGVkTGFuZ3VhZ2VzLA0KKyAgICAgICAgICAgZ05ldHdvcmt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aXMgZG9lcyBub3QNCisgIHN1cHBvcnQgdGhlIGxhbmd1YWdlIHNwZWNpZmllZCBieSBMYW5n dWFnZSwgdGhlbiBFRklfVU5TVVBQT1JURUQgaXMgcmV0dXJuZWQuDQorDQorICBAcGFyYW1baW5d ICBUaGlzICAgICAgICAgICAgICBBIHBvaW50ZXIgdG8gdGhlIEVGSV9DT01QT05FTlRfTkFNRTJf UFJPVE9DT0wgb3INCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVGSV9DT01QT05F TlRfTkFNRV9QUk9UT0NPTCBpbnN0YW5jZS4NCisgIEBwYXJhbVtpbl0gIENvbnRyb2xsZXIgICAg ICAgIFRoZSBoYW5kbGUgb2YgYSBjb250cm9sbGVyIHRoYXQgdGhlIGRyaXZlcg0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgc3BlY2lmaWVkIGJ5IFRoaXMgaXMgbWFuYWdpbmcuICBU aGlzIGhhbmRsZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3BlY2lmaWVzIHRo ZSBjb250cm9sbGVyIHdob3NlIG5hbWUgaXMgdG8gYmUNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIHJldHVybmVkLg0KKyAgQHBhcmFtW2luXSAgQ2hpbGRIYW5kbGUgICAgICAgVGhl IGhhbmRsZSBvZiB0aGUgY2hpbGQgY29udHJvbGxlciB0byByZXRyaWV2ZQ0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgdGhlIG5hbWUgb2YuICBUaGlzIGlzIGFuIG9wdGlvbmFsIHBh cmFtZXRlciB0aGF0DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXkgYmUgTlVM TC4gIEl0IHdpbGwgYmUgTlVMTCBmb3IgZGV2aWNlDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBkcml2ZXJzLiAgSXQgd2lsbCBhbHNvIGJlIE5VTEwgZm9yIGEgYnVzIGRyaXZlcnMN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQgd2lzaCB0byByZXRyaWV2ZSB0 aGUgbmFtZSBvZiB0aGUgYnVzDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250 cm9sbGVyLiAgSXQgd2lsbCBub3QgYmUgTlVMTCBmb3IgYSBidXMNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGRyaXZlciB0aGF0IHdpc2hlcyB0byByZXRyaWV2ZSB0aGUgbmFtZSBv ZiBhDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZCBjb250cm9sbGVyLg0K KyAgQHBhcmFtW2luXSAgTGFuZ3VhZ2UgICAgICAgICAgQSBwb2ludGVyIHRvIGEgTnVsbC10ZXJt aW5hdGVkIEFTQ0lJIHN0cmluZw0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJy YXkgaW5kaWNhdGluZyB0aGUgbGFuZ3VhZ2UuICBUaGlzIGlzIHRoZQ0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2Ugb2YgdGhlIGRyaXZlciBuYW1lIHRoYXQgdGhlIGNh bGxlciBpcw0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGluZywgYW5k IGl0IG11c3QgbWF0Y2ggb25lIG9mIHRoZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbGFuZ3VhZ2VzIHNwZWNpZmllZCBpbiBTdXBwb3J0ZWRMYW5ndWFnZXMuIFRoZQ0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyIG9mIGxhbmd1YWdlcyBzdXBwb3J0ZWQg YnkgYSBkcml2ZXIgaXMgdXANCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHRo ZSBkcml2ZXIgd3JpdGVyLiBMYW5ndWFnZSBpcyBzcGVjaWZpZWQgaW4NCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFJGQyA0NjQ2IG9yIElTTyA2MzktMiBsYW5ndWFnZSBjb2RlIGZv cm1hdC4NCisgIEBwYXJhbVtvdXRdIENvbnRyb2xsZXJOYW1lICAgIEEgcG9pbnRlciB0byB0aGUg VW5pY29kZSBzdHJpbmcgdG8gcmV0dXJuLg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgVGhpcyBVbmljb2RlIHN0cmluZyBpcyB0aGUgbmFtZSBvZiB0aGUNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIgc3BlY2lmaWVkIGJ5IENvbnRyb2xsZXJIYW5k bGUgYW5kDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDaGlsZEhhbmRsZSBpbiB0 aGUgbGFuZ3VhZ2Ugc3BlY2lmaWVkIGJ5DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBMYW5ndWFnZSBmcm9tIHRoZSBwb2ludCBvZiB2aWV3IG9mIHRoZSBkcml2ZXINCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNpZmllZCBieSBUaGlzLg0KKw0KKyAgQHJldHZh bCBFRklfU1VDQ0VTUyAgICAgICAgICAgVGhlIFVuaWNvZGUgc3RyaW5nIGZvciB0aGUgdXNlciBy ZWFkYWJsZSBuYW1lIGluDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbGFu Z3VhZ2Ugc3BlY2lmaWVkIGJ5IExhbmd1YWdlIGZvciB0aGUNCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGRyaXZlciBzcGVjaWZpZWQgYnkgVGhpcyB3YXMgcmV0dXJuZWQgaW4NCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERyaXZlck5hbWUuDQorICBAcmV0dmFsIEVG SV9JTlZBTElEX1BBUkFNRVRFUiBDb250cm9sbGVySGFuZGxlIGlzIG5vdCBhIHZhbGlkIEVGSV9I QU5ETEUuDQorICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiBDaGlsZEhhbmRsZSBpcyBu b3QgTlVMTCBhbmQgaXQgaXMgbm90IGEgdmFsaWQNCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIEVGSV9IQU5ETEUuDQorICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiBMYW5n dWFnZSBpcyBOVUxMLg0KKyAgQHJldHZhbCBFRklfSU5WQUxJRF9QQVJBTUVURVIgQ29udHJvbGxl ck5hbWUgaXMgTlVMTC4NCisgIEByZXR2YWwgRUZJX1VOU1VQUE9SVEVEICAgICAgIFRoZSBkcml2 ZXIgc3BlY2lmaWVkIGJ5IFRoaXMgaXMgbm90IGN1cnJlbnRseQ0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWFuYWdpbmcgdGhlIGNvbnRyb2xsZXIgc3BlY2lmaWVkIGJ5DQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlIGFuZCBDaGlsZEhh bmRsZS4NCisgIEByZXR2YWwgRUZJX1VOU1VQUE9SVEVEICAgICAgIFRoZSBkcml2ZXIgc3BlY2lm aWVkIGJ5IFRoaXMgZG9lcyBub3Qgc3VwcG9ydA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdGhlIGxhbmd1YWdlIHNwZWNpZmllZCBieSBMYW5ndWFnZS4NCisNCisqKi8NCitFRklf U1RBVFVTDQorRUZJQVBJDQorTmV0d29ya0NvbW1vbkNvbXBvbmVudE5hbWVHZXRDb250cm9sbGVy TmFtZSAoDQorICBJTiAgRUZJX0NPTVBPTkVOVF9OQU1FX1BST1RPQ09MICAqVGhpcywNCisgIElO ICBFRklfSEFORExFICAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXIsDQorICBJTiAgRUZJX0hB TkRMRSAgICAgICAgICAgICAgICAgICBDaGlsZEhhbmRsZSAgICAgICAgT1BUSU9OQUwsDQorICBJ TiAgQ0hBUjggICAgICAgICAgICAgICAgICAgICAgICAqTGFuZ3VhZ2UsDQorICBPVVQgQ0hBUjE2 ICAgICAgICAgICAgICAgICAgICAgICAqKkNvbnRyb2xsZXJOYW1lDQorICApDQorew0KKyAgRUZJ X1NUQVRVUyAgICAgICAgICAgICAgICAgU3RhdHVzOw0KKyAgQ0hBUjE2ICAgICAgICAgICAgICAg ICAgICAgKkhhbmRsZU5hbWU7DQorICBFRklfVVNCX0lPX1BST1RPQ09MICAgICAgICAqVXNiSW87 DQorICBFRklfVVNCX0RFVklDRV9ERVNDUklQVE9SICBEZXZEZXNjOw0KKw0KKyAgaWYgKCFMYW5n dWFnZSB8fCAhQ29udHJvbGxlck5hbWUpIHsNCisgICAgcmV0dXJuIEVGSV9JTlZBTElEX1BBUkFN RVRFUjsNCisgIH0NCisNCisgIGlmIChDaGlsZEhhbmRsZSA9PSBOVUxMKSB7DQorICAgIHJldHVy biBFRklfVU5TVVBQT1JURUQ7DQorICB9DQorDQorICAvLw0KKyAgLy8gTWFrZSBzdXJlIHRoaXMg ZHJpdmVyIGlzIGN1cnJlbnRseSBtYW5hZ2luZyBDb250cm9sbGVySGFuZGxlDQorICAvLw0KKyAg U3RhdHVzID0gRWZpVGVzdE1hbmFnZWREZXZpY2UgKA0KKyAgICAgICAgICAgICBDb250cm9sbGVy LA0KKyAgICAgICAgICAgICBnTmV0d29ya0NvbW1vbkRyaXZlckJpbmRpbmcuRHJpdmVyQmluZGlu Z0hhbmRsZSwNCisgICAgICAgICAgICAgJmdFZGtJSVVzYkV0aFByb3RvY29sR3VpZA0KKyAgICAg ICAgICAgICApOw0KKyAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICByZXR1cm4gU3Rh dHVzOw0KKyAgfQ0KKw0KKyAgLy8NCisgIC8vIE1ha2Ugc3VyZSB0aGlzIGRyaXZlciBwcm9kdWNl ZCBDaGlsZEhhbmRsZQ0KKyAgLy8NCisgIFN0YXR1cyA9IEVmaVRlc3RDaGlsZEhhbmRsZSAoDQor ICAgICAgICAgICAgIENvbnRyb2xsZXIsDQorICAgICAgICAgICAgIENoaWxkSGFuZGxlLA0KKyAg ICAgICAgICAgICAmZ0Vka0lJVXNiRXRoUHJvdG9jb2xHdWlkDQorICAgICAgICAgICAgICk7DQor ICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQor DQorICBTdGF0dXMgPSBnQlMtPkhhbmRsZVByb3RvY29sIChDb250cm9sbGVyLCAmZ0VmaVVzYklv UHJvdG9jb2xHdWlkLCAoVk9JRCAqKikmVXNiSW8pOw0KKw0KKyAgaWYgKCFFRklfRVJST1IgKFN0 YXR1cykpIHsNCisgICAgU3RhdHVzID0gVXNiSW8tPlVzYkdldERldmljZURlc2NyaXB0b3IgKFVz YklvLCAmRGV2RGVzYyk7DQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBy ZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAgIFN0YXR1cyA9IFVzYklvLT5Vc2JHZXRTdHJp bmdEZXNjcmlwdG9yIChVc2JJbywgMHg0MDksIERldkRlc2MuU3RyTWFudWZhY3R1cmVyLCAmSGFu ZGxlTmFtZSk7DQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICByZXR1cm4g U3RhdHVzOw0KKyAgICB9DQorDQorICAgICpDb250cm9sbGVyTmFtZSA9IEhhbmRsZU5hbWU7DQor DQorICAgIGlmIChnTmV0d29ya0NvbW1vbkNvbnRyb2xsZXJOYW1lVGFibGUgIT0gTlVMTCkgew0K KyAgICAgIEZyZWVVbmljb2RlU3RyaW5nVGFibGUgKGdOZXR3b3JrQ29tbW9uQ29udHJvbGxlck5h bWVUYWJsZSk7DQorICAgICAgZ05ldHdvcmtDb21tb25Db250cm9sbGVyTmFtZVRhYmxlID0gTlVM TDsNCisgICAgfQ0KKw0KKyAgICBTdGF0dXMgPSBBZGRVbmljb2RlU3RyaW5nMiAoDQorICAgICAg ICAgICAgICAgImVuZyIsDQorICAgICAgICAgICAgICAgZ05ldHdvcmtDb21tb25Db21wb25lbnRO YW1lLlN1cHBvcnRlZExhbmd1YWdlcywNCisgICAgICAgICAgICAgICAmZ05ldHdvcmtDb21tb25D b250cm9sbGVyTmFtZVRhYmxlLA0KKyAgICAgICAgICAgICAgIEhhbmRsZU5hbWUsDQorICAgICAg ICAgICAgICAgVFJVRQ0KKyAgICAgICAgICAgICAgICk7DQorICAgIGlmIChFRklfRVJST1IgKFN0 YXR1cykpIHsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQorICAgIFN0YXR1cyA9 IEFkZFVuaWNvZGVTdHJpbmcyICgNCisgICAgICAgICAgICAgICAiZW4iLA0KKyAgICAgICAgICAg ICAgIGdOZXR3b3JrQ29tbW9uQ29tcG9uZW50TmFtZTIuU3VwcG9ydGVkTGFuZ3VhZ2VzLA0KKyAg ICAgICAgICAgICAgICZnTmV0d29ya0NvbW1vbkNvbnRyb2xsZXJOYW1lVGFibGUsDQorICAgICAg ICAgICAgICAgSGFuZGxlTmFtZSwNCisgICAgICAgICAgICAgICBGQUxTRQ0KKyAgICAgICAgICAg ICAgICk7DQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICByZXR1cm4gU3Rh dHVzOw0KKyAgICB9DQorDQorICAgIHJldHVybiBMb29rdXBVbmljb2RlU3RyaW5nMiAoDQorICAg ICAgICAgICAgIExhbmd1YWdlLA0KKyAgICAgICAgICAgICBUaGlzLT5TdXBwb3J0ZWRMYW5ndWFn ZXMsDQorICAgICAgICAgICAgIGdOZXR3b3JrQ29tbW9uQ29udHJvbGxlck5hbWVUYWJsZSwNCisg ICAgICAgICAgICAgQ29udHJvbGxlck5hbWUsDQorICAgICAgICAgICAgIChCT09MRUFOKShUaGlz ID09ICZnTmV0d29ya0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FRklfU1VDQ0VTUyAgICAgICAgICAgICAgICAgVGhpcyBkcml2ZXIgc3VwcG9y dHMgdGhpcyBkZXZpY2UuDQorICBAcmV0dmFsIEVGSV9BTFJFQURZX1NUQVJURUQgICAgICAgICBU aGlzIGRyaXZlciBpcyBhbHJlYWR5IHJ1bm5pbmcgb24gdGhpcyBkZXZpY2UuDQorICBAcmV0dmFs IG90aGVyICAgICAgICAgICAgICAgICAgICAgICBUaGlzIGRyaXZlciBkb2VzIG5vdCBzdXBwb3J0 IHRoaXMgZGV2aWNlLg0KKw0KKyoqLw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitOZXR3b3JrQ29t bW9uU3VwcG9ydGVkICgNCisgIElOIEVGSV9EUklWRVJfQklORElOR19QUk9UT0NPTCAgKlRoaXMs DQorICBJTiBFRklfSEFORExFICAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQor ICBJTiBFRklfREVWSUNFX1BBVEhfUFJPVE9DT0wgICAgICpSZW1haW5pbmdEZXZpY2VQYXRoDQor ICApDQorew0KKyAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQorICBFREtJ SV9VU0JfRVRIRVJORVRfUFJPVE9DT0wgICpVc2JFdGg7DQorDQorICBTdGF0dXMgPSBnQlMtPk9w ZW5Qcm90b2NvbCAoDQorICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAg ICAgICAgICAgICAgICAmZ0Vka0lJVXNiRXRoUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgICAg ICAgIChWT0lEICoqKSZVc2JFdGgsDQorICAgICAgICAgICAgICAgICAgVGhpcy0+RHJpdmVyQmlu ZGluZ0hhbmRsZSwNCisgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAg ICAgICAgICAgICAgIEVGSV9PUEVOX1BST1RPQ09MX0JZX0RSSVZFUg0KKyAgICAgICAgICAgICAg ICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybiBTdGF0dXM7 DQorICB9DQorDQorICBnQlMtPkNsb3NlUHJvdG9jb2wgKA0KKyAgICAgICAgIENvbnRyb2xsZXJI YW5kbGUsDQorICAgICAgICAgJmdFZGtJSVVzYkV0aFByb3RvY29sR3VpZCwNCisgICAgICAgICBU aGlzLT5Ecml2ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisg ICAgICAgICApOw0KKyAgcmV0dXJuIFN0YXR1czsNCit9DQorDQorLyoqDQorICBOZXR3b3JrIENv bW1vbiBEcml2ZXIgQmluZGluZyBTdGFydC4NCisNCisgIEBwYXJhbVtpbl0gIFRoaXMgICAgICAg ICAgICAgICAgICAgIFByb3RvY29sIGluc3RhbmNlIHBvaW50ZXIuDQorICBAcGFyYW1baW5dICBD b250cm9sbGVySGFuZGxlICAgICAgICBIYW5kbGUgb2YgZGV2aWNlIHRvIGJpbmQgZHJpdmVyIHRv Lg0KKyAgQHBhcmFtW2luXSAgUmVtYWluaW5nRGV2aWNlUGF0aCAgICAgT3B0aW9uYWwgcGFyYW1l dGVyIHVzZSB0byBwaWNrIGEgc3BlY2lmaWMgY2hpbGQNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGRldmljZSB0byBzdGFydC4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NF U1MgICAgICAgICAgICAgICAgIFRoaXMgZHJpdmVyIGlzIGFkZGVkIHRvIENvbnRyb2xsZXJIYW5k bGUNCisgIEByZXR2YWwgRUZJX0RFVklDRV9FUlJPUiAgICAgICAgICAgIFRoaXMgZHJpdmVyIGNv dWxkIG5vdCBiZSBzdGFydGVkIGR1ZSB0byBhIGRldmljZSBlcnJvcg0KKyAgQHJldHZhbCBFRklf T1VUX09GX1JFU09VUkNFUyAgICAgICAgVGhlIGRyaXZlciBjb3VsZCBub3QgaW5zdGFsbCBzdWNj ZXNzZnVsbHkgZHVlIHRvIGEgbGFjayBvZiByZXNvdXJjZXMuDQorICBAcmV0dmFsIG90aGVyICAg ICAgICAgICAgICAgICAgICAgICBUaGlzIGRyaXZlciBkb2VzIG5vdCBzdXBwb3J0IHRoaXMgZGV2 aWNlDQorDQorKiovDQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK05ldHdvcmtDb21tb25Ecml2ZXJT dGFydCAoDQorICBJTiBFRklfRFJJVkVSX0JJTkRJTkdfUFJPVE9DT0wgICpUaGlzLA0KKyAgSU4g RUZJX0hBTkRMRSAgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgSU4gRUZJ X0RFVklDRV9QQVRIX1BST1RPQ09MICAgICAqUmVtYWluaW5nRGV2aWNlUGF0aA0KKyAgKQ0KK3sN CisgIEVGSV9TVEFUVVMgICAgICAgICAgICAgICAgICAgU3RhdHVzOw0KKyAgRUZJX0RFVklDRV9Q QVRIX1BST1RPQ09MICAgICAqVXNiRXRoUGF0aDsNCisgIEVES0lJX1VTQl9FVEhFUk5FVF9QUk9U T0NPTCAgKlVzYkV0aDsNCisgIEVGSV9NQUNfQUREUkVTUyAgICAgICAgICAgICAgTWFjQWRkcmVz czsNCisgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgQnVsa0RhdGFTaXplOw0KKyAgTklD X0RFVklDRSAgICAgICAgICAgICAgICAgICAqTmljRGV2aWNlOw0KKyAgVUlOVDggICAgICAgICAg ICAgICAgICAgICAgICAqVG1wUHhlUG9pbnRlcjsNCisNCisgIFN0YXR1cyA9IGdCUy0+T3BlblBy b3RvY29sICgNCisgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAgICAg ICAgICAgICAgICZnRWRrSUlVc2JFdGhQcm90b2NvbEd1aWQsDQorICAgICAgICAgICAgICAgICAg KFZPSUQgKiopJlVzYkV0aCwNCisgICAgICAgICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5kaW5n SGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAg ICAgICAgICAgRUZJX09QRU5fUFJPVE9DT0xfQllfRFJJVkVSDQorICAgICAgICAgICAgICAgICAg KTsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgcmV0dXJuIFN0YXR1czsNCisg IH0NCisNCisgIFN0YXR1cyA9IGdCUy0+T3BlblByb3RvY29sICgNCisgICAgICAgICAgICAgICAg ICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgICZnRWZpRGV2aWNlUGF0aFBy b3RvY29sR3VpZCwNCisgICAgICAgICAgICAgICAgICAoVk9JRCAqKikmVXNiRXRoUGF0aCwNCisg ICAgICAgICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAgICAgICAg ICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAgICAgICAgRUZJX09QRU5fUFJP VE9DT0xfQllfRFJJVkVSDQorICAgICAgICAgICAgICAgICAgKTsNCisNCisgIGlmIChFRklfRVJS T1IgKFN0YXR1cykpIHsNCisgICAgZ0JTLT5DbG9zZVByb3RvY29sICgNCisgICAgICAgICAgIENv bnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAmZ0Vka0lJVXNiRXRoUHJvdG9jb2xHdWlkLA0K KyAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAgICAgIENvbnRy b2xsZXJIYW5kbGUNCisgICAgICAgICAgICk7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQor DQorICBaZXJvTWVtICgmTWFjQWRkcmVzcywgc2l6ZW9mIChFRklfTUFDX0FERFJFU1MpKTsNCisN CisgIFN0YXR1cyA9IFVzYkV0aC0+VXNiRXRoTWFjQWRkcmVzcyAoVXNiRXRoLCAmTWFjQWRkcmVz cyk7DQorICBBU1NFUlRfRUZJX0VSUk9SIChTdGF0dXMpOw0KKyAgU3RhdHVzID0gVXNiRXRoLT5V c2JFdGhNYXhCdWxrU2l6ZSAoVXNiRXRoLCAmQnVsa0RhdGFTaXplKTsNCisNCisgIGlmIChFRklf RVJST1IgKFN0YXR1cykpIHsNCisgICAgZ0JTLT5DbG9zZVByb3RvY29sICgNCisgICAgICAgICAg IENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAmZ0VmaURldmljZVBhdGhQcm90b2NvbEd1 aWQsDQorICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAgICAgICAg Q29udHJvbGxlckhhbmRsZQ0KKyAgICAgICAgICAgKTsNCisgICAgZ0JTLT5DbG9zZVByb3RvY29s ICgNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAmZ0Vka0lJVXNi RXRoUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwN CisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAgICAgICAgICk7DQorICAgIHJldHVy biBTdGF0dXM7DQorICB9DQorDQorICBOaWNEZXZpY2UgPSBBbGxvY2F0ZVplcm9Qb29sIChzaXpl b2YgKE5JQ19ERVZJQ0UpICsgQnVsa0RhdGFTaXplICsgNDA5Nik7DQorICBpZiAoIU5pY0Rldmlj ZSkgew0KKyAgICBnQlMtPkNsb3NlUHJvdG9jb2wgKA0KKyAgICAgICAgICAgQ29udHJvbGxlckhh bmRsZSwNCisgICAgICAgICAgICZnRWZpRGV2aWNlUGF0aFByb3RvY29sR3VpZCwNCisgICAgICAg ICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQorICAgICAgICAgICBDb250cm9sbGVySGFu ZGxlDQorICAgICAgICAgICApOw0KKyAgICBnQlMtPkNsb3NlUHJvdG9jb2wgKA0KKyAgICAgICAg ICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAgICAgICAgICZnRWRrSUlVc2JFdGhQcm90b2NvbEd1 aWQsDQorICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAgICAgICAg Q29udHJvbGxlckhhbmRsZQ0KKyAgICAgICAgICAgKTsNCisgICAgcmV0dXJuIEVGSV9PVVRfT0Zf UkVTT1VSQ0VTOw0KKyAgfQ0KKw0KKyAgLy8gZm9yIGFsaWdubWVudCBhZGp1c3RtZW50DQorICBp ZiAoZ1B4ZSA9PSBOVUxMKSB7DQorICAgIFRtcFB4ZVBvaW50ZXIgPSBOVUxMOw0KKyAgICBUbXBQ eGVQb2ludGVyID0gQWxsb2NhdGVaZXJvUG9vbCAoc2l6ZW9mIChQWEVfU1dfVU5ESSkgKyAxNik7 DQorICAgIGlmICghVG1wUHhlUG9pbnRlcikgew0KKyAgICAgIGlmIChOaWNEZXZpY2UgIT0gTlVM TCkgew0KKyAgICAgICAgRnJlZVBvb2wgKE5pY0RldmljZSk7DQorICAgICAgfQ0KKw0KKyAgICAg IGdCUy0+Q2xvc2VQcm90b2NvbCAoDQorICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQor ICAgICAgICAgICAgICZnRWZpRGV2aWNlUGF0aFByb3RvY29sR3VpZCwNCisgICAgICAgICAgICAg VGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRs ZQ0KKyAgICAgICAgICAgICApOw0KKyAgICAgIGdCUy0+Q2xvc2VQcm90b2NvbCAoDQorICAgICAg ICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAgICZnRWRrSUlVc2JFdGhQcm90 b2NvbEd1aWQsDQorICAgICAgICAgICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQorICAg ICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAgICAgICAgICAgKTsNCisNCisgICAgICBy ZXR1cm4gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQorICAgIH0gZWxzZSB7DQorICAgICAgLy8gY2hl Y2sgZm9yIHBhcmFncmFwaCBhbGlnbm1lbnQgaGVyZQ0KKyAgICAgIGlmICgoKFVJTlROKVRtcFB4 ZVBvaW50ZXIgJiAweDBGKSAhPSAwKSB7DQorICAgICAgICBnUHhlID0gKFBYRV9TV19VTkRJICop KFRtcFB4ZVBvaW50ZXIgKyA4KTsNCisgICAgICB9IGVsc2Ugew0KKyAgICAgICAgZ1B4ZSA9IChQ WEVfU1dfVU5ESSAqKVRtcFB4ZVBvaW50ZXI7DQorICAgICAgfQ0KKw0KKyAgICAgIGlmICghZ1B4 ZSkgew0KKyAgICAgICAgaWYgKE5pY0RldmljZSAhPSBOVUxMKSB7DQorICAgICAgICAgIEZyZWVQ b29sIChOaWNEZXZpY2UpOw0KKyAgICAgICAgfQ0KKw0KKyAgICAgICAgZ0JTLT5DbG9zZVByb3Rv Y29sICgNCisgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAgICAgICAgICAg ICZnRWZpRGV2aWNlUGF0aFByb3RvY29sR3VpZCwNCisgICAgICAgICAgICAgICBUaGlzLT5Ecml2 ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAg ICAgICAgICAgICApOw0KKyAgICAgICAgZ0JTLT5DbG9zZVByb3RvY29sICgNCisgICAgICAgICAg ICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAgICAgICAgICAgICZnRWRrSUlVc2JFdGhQcm90 b2NvbEd1aWQsDQorICAgICAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCisg ICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlDQorICAgICAgICAgICAgICAgKTsNCisgICAg ICAgIHJldHVybiBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgICAgICB9DQorDQorIC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cm90b2NvbCAoDQorICAgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAg ICAgICAgICAgJmdFZmlEZXZpY2VQYXRoUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgVGhpcy0+ RHJpdmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAg ICAgICAgICk7DQorICAgIGdCUy0+Q2xvc2VQcm90b2NvbCAoDQorICAgICAgICAgICBDb250cm9s bGVySGFuZGxlLA0KKyAgICAgICAgICAgJmdFZGtJSVVzYkV0aFByb3RvY29sR3VpZCwNCisgICAg ICAgICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQorICAgICAgICAgICBDb250cm9sbGVy SGFuZGxlDQorICAgICAgICAgICApOw0KKw0KKyAgICBpZiAoVG1wUHhlUG9pbnRlciAhPSBOVUxM KSB7DQorICAgICAgRnJlZVBvb2wgKFRtcFB4ZVBvaW50ZXIpOw0KKyAgICB9DQorDQorICAgIGlm IChOaWNEZXZpY2UgIT0gTlVMTCkgew0KKyAgICAgIEZyZWVQb29sIChOaWNEZXZpY2UpOw0KKyAg ICB9DQorDQorICAgIHJldHVybiBFRklfREVWSUNFX0VSUk9SOw0KKyAgfQ0KKw0KKyAgU3RhdHVz ID0gQ3JlYXRlTWFjRGV2aWNlUGF0aCAoDQorICAgICAgICAgICAgICZOaWNEZXZpY2UtPkRldlBh dGgsDQorICAgICAgICAgICAgIFVzYkV0aFBhdGgsDQorICAgICAgICAgICAgICZOaWNEZXZpY2Ut Pk5pY0luZm8NCisgICAgICAgICAgICAgKTsNCisNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykp IHsNCisgICAgVXBkYXRlTmljTnVtIChOVUxMLCBnUHhlKTsNCisgICAgaWYgKFRtcFB4ZVBvaW50 ZXIgIT0gTlVMTCkgew0KKyAgICAgIEZyZWVQb29sIChUbXBQeGVQb2ludGVyKTsNCisgICAgfQ0K KyAgfQ0KKw0KKyAgTmljRGV2aWNlLT5TaWduYXR1cmUgICAgICAgICAgICAgICAgID0gVU5ESV9E RVZfU0lHTkFUVVJFOw0KKyAgTmljRGV2aWNlLT5OaWlQcm90b2NvbC5SZXZpc2lvbiAgICAgID0g RUZJX05FVFdPUktfSU5URVJGQUNFX0lERU5USUZJRVJfUFJPVE9DT0xfUkVWSVNJT047DQorICBO aWNEZXZpY2UtPk5paVByb3RvY29sLlR5cGUgICAgICAgICAgPSBFZmlOZXR3b3JrSW50ZXJmYWNl VW5kaTsNCisgIE5pY0RldmljZS0+TmlpUHJvdG9jb2wuTWFqb3JWZXIgICAgICA9IFBYRV9ST01J RF9NQUpPUlZFUjsNCisgIE5pY0RldmljZS0+TmlpUHJvdG9jb2wuTWlub3JWZXIgICAgICA9IFBY RV9ST01JRF9NSU5PUlZFUjsNCisgIE5pY0RldmljZS0+TmlpUHJvdG9jb2wuSW1hZ2VTaXplICAg ICA9IDA7DQorICBOaWNEZXZpY2UtPk5paVByb3RvY29sLkltYWdlQWRkciAgICAgPSAwOw0KKyAg TmljRGV2aWNlLT5OaWlQcm90b2NvbC5JcHY2U3VwcG9ydGVkID0gVFJVRTsNCisNCisgIE5pY0Rl dmljZS0+TmlpUHJvdG9jb2wuU3RyaW5nSWRbMF0gPSAnVSc7DQorICBOaWNEZXZpY2UtPk5paVBy b3RvY29sLlN0cmluZ0lkWzFdID0gJ04nOw0KKyAgTmljRGV2aWNlLT5OaWlQcm90b2NvbC5TdHJp bmdJZFsyXSA9ICdEJzsNCisgIE5pY0RldmljZS0+TmlpUHJvdG9jb2wuU3RyaW5nSWRbM10gPSAn SSc7DQorICBOaWNEZXZpY2UtPkRldmljZUhhbmRsZSAgICAgICAgICAgID0gTlVMTDsNCisNCisg IE5pY0RldmljZS0+TmljSW5mby5SYXRlTGltaXRpbmdFbmFibGUgICAgICA9IFBjZEdldEJvb2wg KEVuYWJsZVJhdGVMaW1pdGluZyk7DQorICBOaWNEZXZpY2UtPk5pY0luZm8uU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BQ0UpIHsNCisgICAgICBnTGFuRGV2aWNlTGlzdFtOaWNE ZXZpY2UtPk5paVByb3RvY29sLklmTnVtXSA9IE5VTEw7DQorICAgIH0NCisNCisgICAgZ0JTLT5D bG9zZVByb3RvY29sICgNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAg ICAmZ0VmaURldmljZVBhdGhQcm90b2NvbEd1aWQsDQorICAgICAgICAgICBUaGlzLT5Ecml2ZXJC aW5kaW5nSGFuZGxlLA0KKyAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZQ0KKyAgICAgICAgICAg KTsNCisgICAgZ0JTLT5DbG9zZVByb3RvY29sICgNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5k bGUsDQorICAgICAgICAgICAmZ0Vka0lJVXNiRXRoUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAg VGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUN CisgICAgICAgICAgICk7DQorDQorICAgIGlmIChUbXBQeGVQb2ludGVyICE9IE5VTEwpIHsNCisg ICAgICBGcmVlUG9vbCAoVG1wUHhlUG9pbnRlcik7DQorICAgIH0NCisNCisgICAgaWYgKE5pY0Rl dmljZS0+RGV2UGF0aCAhPSBOVUxMKSB7DQorICAgICAgRnJlZVBvb2wgKE5pY0RldmljZS0+RGV2 UGF0aCk7DQorICAgIH0NCisNCisgICAgaWYgKE5pY0RldmljZSAhPSBOVUxMKSB7DQorICAgICAg RnJlZVBvb2wgKE5pY0RldmljZSk7DQorICAgIH0NCisNCisgICAgcmV0dXJuIEVGSV9ERVZJQ0Vf RVJST1I7DQorICB9DQorDQorICBTdGF0dXMgPSBnQlMtPk9wZW5Qcm90b2NvbCAoDQorICAgICAg ICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAgICAgICAgICAgICAgICAmZ0Vka0lJ VXNiRXRoUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgICAgICAgIChWT0lEICoqKSZVc2JFdGgs DQorICAgICAgICAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAg ICAgICAgICAgICBOaWNEZXZpY2UtPkRldmljZUhhbmRsZSwNCisgICAgICAgICAgICAgICAgICBF RklfT1BFTl9QUk9UT0NPTF9CWV9DSElMRF9DT05UUk9MTEVSDQorICAgICAgICAgICAgICAgICAg KTsNCisNCisgIHJldHVybiBTdGF0dXM7DQorfQ0KKw0KKy8qKg0KKyAgTmV0d29yayBDb21tb24g RHJpdmVyIEJpbmRpbmcgU3RvcC4NCisNCisgIEBwYXJhbVtpbl0gIFRoaXMgICAgICAgICAgICAg ICAgICBQcm90b2NvbCBpbnN0YW5jZSBwb2ludGVyLg0KKyAgQHBhcmFtW2luXSAgQ29udHJvbGxl ckhhbmRsZSAgICAgIEhhbmRsZSBvZiBkZXZpY2UgdG8gc3RvcCBkcml2ZXIgb24NCisgIEBwYXJh bVtpbl0gIE51bWJlck9mQ2hpbGRyZW4gICAgICBOdW1iZXIgb2YgSGFuZGxlcyBpbiBDaGlsZEhh bmRsZUJ1ZmZlci4gSWYgbnVtYmVyIG9mDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgY2hpbGRyZW4gaXMgemVybyBzdG9wIHRoZSBlbnRpcmUgYnVzIGRyaXZlci4NCisgIEBw YXJhbVtpbl0gIENoaWxkSGFuZGxlQnVmZmVyICAgICBMaXN0IG9mIENoaWxkIEhhbmRsZXMgdG8g U3RvcC4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgICAgICBUaGlzIGRyaXZl ciBpcyByZW1vdmVkIENvbnRyb2xsZXJIYW5kbGUNCisgIEByZXR2YWwgb3RoZXIgICAgICAgICAg ICAgICAgICAgICBUaGlzIGRyaXZlciB3YXMgbm90IHJlbW92ZWQgZnJvbSB0aGlzIGRldmljZQ0K Kw0KKyoqLw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitOZXR3b3JrQ29tbW9uRHJpdmVyU3RvcCAo DQorICBJTiAgRUZJX0RSSVZFUl9CSU5ESU5HX1BST1RPQ09MICAqVGhpcywNCisgIElOICBFRklf SEFORExFICAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICBJTiAgVUlOVE4g ICAgICAgICAgICAgICAgICAgICAgICBOdW1iZXJPZkNoaWxkcmVuLA0KKyAgSU4gIEVGSV9IQU5E TEUgICAgICAgICAgICAgICAgICAgKkNoaWxkSGFuZGxlQnVmZmVyDQorICApDQorew0KKyAgRUZJ X1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1czsNCisgIEJPT0xF QU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBbGxDaGlsZHJlblN0b3BwZWQ7 DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXg7DQor ICBFREtJSV9VU0JfRVRIRVJORVRfUFJPVE9DT0wgICAgICAgICAgICAgICAgKlVzYkV0aDsNCisg IE5JQ19ERVZJQ0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqTmljRGV2aWNlOw0K KyAgRUZJX05FVFdPUktfSU5URVJGQUNFX0lERU5USUZJRVJfUFJPVE9DT0wgICpOaWlQcm90b2Nv bDsNCisNCisgIGlmIChOdW1iZXJPZkNoaWxkcmVuID09IDApIHsNCisgICAgU3RhdHVzID0gZ0JT LT5PcGVuUHJvdG9jb2wgKA0KKyAgICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwN CisgICAgICAgICAgICAgICAgICAgICZnRWZpTmV0d29ya0ludGVyZmFjZUlkZW50aWZpZXJQcm90 b2NvbEd1aWRfMzEsDQorICAgICAgICAgICAgICAgICAgICAoVk9JRCAqKikmTmlpUHJvdG9jb2ws DQorICAgICAgICAgICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAg ICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAgICAgICAgICAgICAgICAgIEVG SV9PUEVOX1BST1RPQ09MX0dFVF9QUk9UT0NPTA0KKyAgICAgICAgICAgICAgICAgICAgKTsNCisN CisgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgIGdCUy0+Q2xvc2VQcm90b2Nv bCAoDQorICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAgICZnRWZp RGV2aWNlUGF0aFByb3RvY29sR3VpZCwNCisgICAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGlu Z0hhbmRsZSwNCisgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZQ0KKyAgICAgICAgICAgICAp Ow0KKyAgICAgIGdCUy0+Q2xvc2VQcm90b2NvbCAoDQorICAgICAgICAgICAgIENvbnRyb2xsZXJI YW5kbGUsDQorICAgICAgICAgICAgICZnRWRrSUlVc2JFdGhQcm90b2NvbEd1aWQsDQorICAgICAg ICAgICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQorICAgICAgICAgICAgIENvbnRyb2xs ZXJIYW5kbGUNCisgICAgICAgICAgICAgKTsNCisgICAgICByZXR1cm4gRUZJX1NVQ0NFU1M7DQor ICAgIH0NCisNCisgICAgTmljRGV2aWNlID0gVU5ESV9ERVZfRlJPTV9USElTIChOaWlQcm90b2Nv bCk7DQorICAgIFN0YXR1cyAgICA9IGdCUy0+VW5pbnN0YWxsTXVsdGlwbGVQcm90b2NvbEludGVy ZmFjZXMgKA0KKyAgICAgICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAg ICAgICAgICAgICAgICAgICAgICZnRWZpTmV0d29ya0ludGVyZmFjZUlkZW50aWZpZXJQcm90b2Nv bEd1aWRfMzEsDQorICAgICAgICAgICAgICAgICAgICAgICAmTmljRGV2aWNlLT5OaWlQcm90b2Nv bCwNCisgICAgICAgICAgICAgICAgICAgICAgICZnRWZpRGV2aWNlUGF0aFByb3RvY29sR3VpZCwN CisgICAgICAgICAgICAgICAgICAgICAgIE5pY0RldmljZS0+RGV2UGF0aCwNCisgICAgICAgICAg ICAgICAgICAgICAgIE5VTEwNCisgICAgICAgICAgICAgICAgICAgICAgICk7DQorICAgIGlmIChF RklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9DQorDQor ICAgIEZyZWVQb29sIChOaWNEZXZpY2UtPkRldlBhdGgpOw0KKyAgICBGcmVlUG9vbCAoTmljRGV2 aWNlKTsNCisNCisgICAgZ0JTLT5DbG9zZVByb3RvY29sICgNCisgICAgICAgICAgIENvbnRyb2xs ZXJIYW5kbGUsDQorICAgICAgICAgICAmZ0VmaURldmljZVBhdGhQcm90b2NvbEd1aWQsDQorICAg ICAgICAgICBUaGlzLT5Ecml2ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAgICAgICAgQ29udHJvbGxl ckhhbmRsZQ0KKyAgICAgICAgICAgKTsNCisgICAgZ0JTLT5DbG9zZVByb3RvY29sICgNCisgICAg ICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAmZ0Vka0lJVXNiRXRoUHJvdG9j b2xHdWlkLA0KKyAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAg ICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAgICAgICAgICk7DQorICAgIHJldHVybiBFRklfU1VD Q0VTUzsNCisgIH0NCisNCisgIEFsbENoaWxkcmVuU3RvcHBlZCA9IFRSVUU7DQorDQorICBmb3Ig KEluZGV4ID0gMDsgSW5kZXggPCBOdW1iZXJPZkNoaWxkcmVuOyBJbmRleCsrKSB7DQorICAgIFN0 YXR1cyA9IGdCUy0+T3BlblByb3RvY29sICgNCisgICAgICAgICAgICAgICAgICAgIENoaWxkSGFu ZGxlQnVmZmVyW0luZGV4XSwNCisgICAgICAgICAgICAgICAgICAgICZnRWZpTmV0d29ya0ludGVy ZmFjZUlkZW50aWZpZXJQcm90b2NvbEd1aWRfMzEsDQorICAgICAgICAgICAgICAgICAgICAoVk9J RCAqKikmTmlpUHJvdG9jb2wsDQorICAgICAgICAgICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5k aW5nSGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAg ICAgICAgICAgICAgICAgIEVGSV9PUEVOX1BST1RPQ09MX0dFVF9QUk9UT0NPTA0KKyAgICAgICAg ICAgICAgICAgICAgKTsNCisgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgIEFs bENoaWxkcmVuU3RvcHBlZCA9IEZBTFNFOw0KKyAgICAgIGNvbnRpbnVlOw0KKyAgICB9DQorDQor ICAgIE5pY0RldmljZSA9IFVORElfREVWX0ZST01fVEhJUyAoTmlpUHJvdG9jb2wpOw0KKw0KKyAg ICBnQlMtPkNsb3NlUHJvdG9jb2wgKA0KKyAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisg ICAgICAgICAgICZnRWRrSUlVc2JFdGhQcm90b2NvbEd1aWQsDQorICAgICAgICAgICBUaGlzLT5E cml2ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAgICAgICAgQ2hpbGRIYW5kbGVCdWZmZXJbSW5kZXhd DQorICAgICAgICAgICApOw0KKw0KKyAgICBTdGF0dXMgPSBnQlMtPlVuaW5zdGFsbE11bHRpcGxl UHJvdG9jb2xJbnRlcmZhY2VzICgNCisgICAgICAgICAgICAgICAgICAgIENoaWxkSGFuZGxlQnVm ZmVyW0luZGV4XSwNCisgICAgICAgICAgICAgICAgICAgICZnRWZpTmV0d29ya0ludGVyZmFjZUlk ZW50aWZpZXJQcm90b2NvbEd1aWRfMzEsDQorICAgICAgICAgICAgICAgICAgICAmTmljRGV2aWNl LT5OaWlQcm90b2NvbCwNCisgICAgICAgICAgICAgICAgICAgICZnRWZpRGV2aWNlUGF0aFByb3Rv Y29sR3VpZCwNCisgICAgICAgICAgICAgICAgICAgIE5pY0RldmljZS0+RGV2UGF0aCwNCisgICAg ICAgICAgICAgICAgICAgIE5VTEwNCisgICAgICAgICAgICAgICAgICAgICk7DQorICAgIGlmIChF RklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBTdGF0dXMgPSBnQlMtPk9wZW5Qcm90b2NvbCAo DQorICAgICAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAg ICAgICAgICAgICZnRWRrSUlVc2JFdGhQcm90b2NvbEd1aWQsDQorICAgICAgICAgICAgICAgICAg ICAgIChWT0lEICoqKSZVc2JFdGgsDQorICAgICAgICAgICAgICAgICAgICAgIFRoaXMtPkRyaXZl ckJpbmRpbmdIYW5kbGUsDQorICAgICAgICAgICAgICAgICAgICAgIENoaWxkSGFuZGxlQnVmZmVy W0luZGV4XSwNCisgICAgICAgICAgICAgICAgICAgICAgRUZJX09QRU5fUFJPVE9DT0xfQllfQ0hJ TERfQ09OVFJPTExFUg0KKyAgICAgICAgICAgICAgICAgICAgICApOw0KKyAgICB9IGVsc2Ugew0K KyAgICAgIEZyZWVQb29sIChOaWNEZXZpY2UtPkRldlBhdGgpOw0KKyAgICAgIEZyZWVQb29sIChO aWNEZXZpY2UpOw0KKyAgICB9DQorICB9DQorDQorICBpZiAoIUFsbENoaWxkcmVuU3RvcHBlZCkg ew0KKyAgICByZXR1cm4gRUZJX0RFVklDRV9FUlJPUjsNCisgIH0NCisNCisgIHJldHVybiBTdGF0 dXM7DQorfQ0KKw0KKy8qKg0KKyAgRW50cnlwb2ludCBvZiBOZXR3b3JrIENvbW1vbiBEcml2ZXIu DQorDQorICBUaGlzIGZ1bmN0aW9uIGlzIHRoZSBlbnRyeXBvaW50IG9mIE5ldHdvcmsgQ29tbW9u IERyaXZlci4gSXQg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cmFnbWEgcGFjaygxKQ0KK3R5cGVkZWYgc3RydWN0IHsN CisgIFVJTlQ4ICAgICBEZXN0QWRkcltQWEVfSFdBRERSX0xFTl9FVEhFUl07DQorICBVSU5UOCAg ICAgU3JjQWRkcltQWEVfSFdBRERSX0xFTl9FVEhFUl07DQorICBVSU5UMTYgICAgUHJvdG9jb2w7 DQorfSBFdGhlcm5ldEhlYWRlcjsNCisjcHJhZ21hIHBhY2soKQ0KKw0KK3R5cGVkZWYgc3RydWN0 IHsNCisgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNpZ25h dHVyZTsNCisgIEVGSV9ORVRXT1JLX0lOVEVSRkFDRV9JREVOVElGSUVSX1BST1RPQ09MICAgIE5p aVByb3RvY29sOw0KKyAgRUZJX0hBTkRMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgRGV2aWNlSGFuZGxlOw0KKyAgRUZJX0RFVklDRV9QQVRIX1BST1RPQ09MICAgICAgICAgICAg ICAgICAgICAgKkJhc2VEZXZQYXRoOw0KKyAgRUZJX0RFVklDRV9QQVRIX1BST1RPQ09MICAgICAg ICAgICAgICAgICAgICAgKkRldlBhdGg7DQorICBOSUNfREFUQSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBOaWNJbmZvOw0KKyAgVk9JRCAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKlJlY2VpdmVCdWZmZXI7DQorfSBOSUNfREVWSUNFOw0KKw0KK3R5 cGVkZWYgVk9JRCAoKkFQSV9GVU5DKSgNCisgIFBYRV9DREIgKiwNCisgIE5JQ19EQVRBICoNCisg ICk7DQorDQorZXh0ZXJuIFBYRV9TV19VTkRJICAgICAgICAgICAgICAgICAgICpnUHhlOw0KK2V4 dGVybiBOSUNfREVWSUNFICAgICAgICAgICAgICAgICAgICAqZ0xhbkRldmljZUxpc3RbTUFYX0xB Tl9JTlRFUkZBQ0VdOw0KK2V4dGVybiBFRklfQ09NUE9ORU5UX05BTUUyX1BST1RPQ09MICBnTmV0 d29ya0NvbW1vbkNvbXBvbmVudE5hbWUyOw0KKw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitOZXR3 b3JrQ29tbW9uU3VwcG9ydGVkICgNCisgIElOIEVGSV9EUklWRVJfQklORElOR19QUk9UT0NPTCAg KlRoaXMsDQorICBJTiBFRklfSEFORExFICAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5k bGUsDQorICBJTiBFRklfREVWSUNFX1BBVEhfUFJPVE9DT0wgICAgICpSZW1haW5pbmdEZXZpY2VQ YXRoDQorICApOw0KKw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitOZXR3b3JrQ29tbW9uRHJpdmVy U3RhcnQgKA0KKyAgSU4gRUZJX0RSSVZFUl9CSU5ESU5HX1BST1RPQ09MICAqVGhpcywNCisgIElO IEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgIElOIEVG SV9ERVZJQ0VfUEFUSF9QUk9UT0NPTCAgICAgKlJlbWFpbmluZ0RldmljZVBhdGgNCisgICk7DQor DQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK05ldHdvcmtDb21tb25Ecml2ZXJTdG9wICgNCisgIElO ICBFRklfRFJJVkVSX0JJTkRJTkdfUFJPVE9DT0wgICpUaGlzLA0KKyAgSU4gIEVGSV9IQU5ETEUg ICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgIElOICBVSU5UTiAgICAgICAg ICAgICAgICAgICAgICAgIE51bWJlck9mQ2hpbGRyZW4sDQorICBJTiAgRUZJX0hBTkRMRSAgICAg ICAgICAgICAgICAgICAqQ2hpbGRIYW5kbGVCdWZmZXINCisgICk7DQorDQorVk9JRA0KK1B4ZVN0 cnVjdEluaXQgKA0KKyAgT1VUIFBYRV9TV19VTkRJICAqUHhlU3cNCisgICk7DQorDQorVk9JRA0K K1VwZGF0ZU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DZGIsDQorICBJTiAgTklD X0RBVEEgICpOaWMNCisgICk7DQorDQorVk9JRA0KK1VuZGlJbml0aWFsaXplICgNCisgIElOICAg ICAgUFhFX0NEQiAgICpDZGIsDQorICBJTiBPVVQgIE5JQ19EQVRBICAqTmljDQorICApOw0KKw0K K1ZPSUQNCitVbmRpUmVzZXQgKA0KKyAgSU4gIFBYRV9DREIgICAqQ2RiLA0KKyAgSU4gIE5JQ19E QVRBICAqTmljDQorICApOw0KKw0KK1ZPSUQNCitVbmRpU2h1dGRvd24gKA0KKyAgSU4gICAgICBQ WEVfQ0RCICAgKkNkYiwNCisgIElOIE9VVCAgTklDX0RBVEEgICpOaWMNCisgICk7DQorDQorVk9J RA0KK1VuZGlJbnRlcnJ1cHRFbmFibGUgKA0KKyAgSU4gIFBYRV9DREIgICAqQ2RiLA0KKyAgSU4g IE5JQ19EQVRBICAqTmljDQorICApOw0KKw0KK1ZPSUQNCitVbmRpUmVjZWl2ZUZpbHRlciAoDQor ICBJTiAgUFhFX0NEQiAgICpDZGIsDQorICBJTiAgTklDX0RBVEEgICpOaWMNCisgICk7DQorDQor Vk9JRA0KK1VuZGlTdGF0aW9uQWRkcmVzcyAoDQorICBJTiAgUFhFX0NEQiAgICpDZGIsDQorICBJ TiAgTklDX0RBVEEgICpOaWMNCisgICk7DQorDQorVk9JRA0KK1VuZGlTdGF0aXN0aWNzICgNCisg IElOICBQWEVfQ0RCICAgKkNkYiwNCisgIElOICBOSUNfREFUQSAgKk5pYw0KKyAgKTsNCisNCitW T0lEDQorVW5kaU1jYXN0SXAyTWFjICgNCisgIElOIE9VVCAgUFhFX0NEQiAgICpDZGIsDQorICBJ TiAgICAgIE5JQ19EQVRBICAqTmljDQorICApOw0KKw0KK1ZPSUQNCitVbmRpTnZEYXRhICgNCisg IElOICBQWEVfQ0RCICAgKkNkYiwNCisgIElOICBOSUNfREFUQSAgKk5pYw0KKyAgKTsNCisNCitW T0lEDQorVW5kaUdldFN0YXR1cyAoDQorICBJTiAgUFhFX0NEQiAgICpDZGIsDQorICBJTiAgTklD X0RBVEEgICpOaWMNCisgICk7DQorDQorVk9JRA0KK1VuZGlGaWxsSGVhZGVyICgNCisgIElOICBQ WEVfQ0RCICAgKkNkYiwNCisgIElOICBOSUNfREFUQSAgKk5pYw0KKyAgKTsNCisNCitWT0lEDQor VW5kaVRyYW5zbWl0ICgNCisgIElOICBQWEVfQ0RCICAgKkNkYiwNCisgIElOICBOSUNfREFUQSAg Kk5pYw0KKyAgKTsNCisNCitWT0lEDQorVW5kaVJlY2VpdmUgKA0KKyAgSU4gIFBYRV9DREIgICAq Q2RiLA0KKyAgSU4gIE5JQ19EQVRBICAqTmljDQorICApOw0KKw0KK1VJTlQxNg0KK0luaXRpYWxp emUgKA0KKyAgSU4gICAgICBQWEVfQ0RCICAgKkNkYiwNCisgIElOIE9VVCAgTklDX0RBVEEgICpO aWMNCisgICk7DQorDQorVUlOVDE2DQorVHJhbnNtaXQgKA0KKyAgSU4gICAgICBQWEVfQ0RCICAg KkNkYiwNCisgIElOIE9VVCAgTklDX0RBVEEgICpOaWMsDQorICBJTiAgICAgIFVJTlQ2NCAgICBD cGJBZGRyLA0KKyAgSU4gICAgICBVSU5UMTYgICAgT3BGbGFncw0KKyAgKTsNCisNCitVSU5UMTYN CitSZWNlaXZlICgNCisgIElOIFBYRV9DREIgICAgICAgKkNkYiwNCisgIElOIE9VVCBOSUNfREFU QSAgKk5pYywNCisgIElOIFVJTlQ2NCAgICAgICAgQ3BiQWRkciwNCisgIElOIE9VVCBVSU5UNjQg ICAgRGJBZGRyDQorICApOw0KKw0KK1VJTlQxNg0KK1NldEZpbHRlciAoDQorICBJTiAgTklDX0RB VEEgICpOaWMsDQorICBJTiAgVUlOVDE2ICAgIFNldEZpbHRlciwNCisgIElOICBVSU5UNjQgICAg Q3BiQWRkciwNCisgIElOICBVSU5UMzIgICAgQ3BiU2l6ZQ0KKyAgKTsNCisNCitVSU5UMTYNCitT dGF0aXN0aWNzICgNCisgIElO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ydC5NYXBfTWVtICAgPSAwOw0KKyAgTmljLT5QeGVTdGFydC5Vbk1hcF9NZW0gPSAwOw0KKyAg TmljLT5QeGVTdGFydC5TeW5jX01lbSAgPSBDcGItPlN5bmNfTWVtOw0KKyAgTmljLT5QeGVTdGFy dC5VbmlxdWVfSUQgPSBDcGItPlVuaXF1ZV9JRDsNCisNCisgIGlmIChOaWMtPlJhdGVMaW1pdGlu Z0VuYWJsZSA9PSBUUlVFKSB7DQorICAgIFN0YXR1cyA9IGdCUy0+Q3JlYXRlRXZlbnQgKA0KKyAg ICAgICAgICAgICAgICAgICAgRVZUX1RJTUVSIHwgRVZUX05PVElGWV9TSUdOQUwsDQorICAgICAg ICAgICAgICAgICAgICBUUExfQ0FMTEJBQ0ssDQorICAgICAgICAgICAgICAgICAgICBVbmRpUmF0 ZUxpbWl0ZXJDYWxsYmFjaywNCisgICAgICAgICAgICAgICAgICAgIE5pYywNCisgICAgICAgICAg ICAgICAgICAgICZOaWMtPlJhdGVMaW1pdGVyDQorICAgICAgICAgICAgICAgICAgICApOw0KKyAg ICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgZ290byBFcnJvckNyZWF0ZUV2ZW50 Ow0KKyAgICB9DQorDQorICAgIFN0YXR1cyA9IGdCUy0+U2V0VGltZXIgKA0KKyAgICAgICAgICAg ICAgICAgICAgTmljLT5SYXRlTGltaXRlciwNCisgICAgICAgICAgICAgICAgICAgIFRpbWVyUGVy aW9kaWMsDQorICAgICAgICAgICAgICAgICAgICBQY2RHZXQzMiAoUmF0ZUxpbWl0aW5nRmFjdG9y KSAqIDEwMDAwDQorICAgICAgICAgICAgICAgICAgICApOw0KKyAgICBpZiAoRUZJX0VSUk9SIChT dGF0dXMpKSB7DQorICAgICAgZ290byBFcnJvclNldFRpbWVyOw0KKyAgICB9DQorICB9DQorDQor ICBpZiAoTmljLT5Vc2JFdGgtPlVzYkV0aFVuZGkuVXNiRXRoVW5kaVN0YXJ0ICE9IE5VTE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vc2JFdGgtPlVzYkV0 aFVuZGkuVXNiRXRoVW5kaVJlY2VpdmVGaWx0ZXIgIT0gTlVMTCkgew0KKyAgICBTdGF0dXMgPSBO aWMtPlVzYkV0aC0+VXNiRXRoVW5kaS5Vc2JFdGhVbmRpUmVjZWl2ZUZpbHRlciAoQ2RiLCBOaWMp Ow0KKyAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgQ2RiLT5TdGF0RmxhZ3Mg PSBQWEVfU1RBVEZMQUdTX0NPTU1BTkRfRkFJTEVEOw0KKyAgICB9DQorICB9DQorfQ0KKw0KKy8q Kg0KKyAgU2V0IFBYRSByZWNlaXZlIGZpbHRlci4NCisNCisgIEBwYXJhbVtpbl0gIE5pYyAgICAg ICAgIEEgcG9pbnRlciB0byB0aGUgTmV0d29yayBpbnRlcmZhY2UgY29udHJvbGxlciBkYXRhLg0K KyAgQHBhcmFtW2luXSAgU2V0RmlsdGVyICAgUFhFIHJlY2VpdmUgZmlsdGVyDQorICBAcGFyYW1b aW5dICBDcGJBZGRyICAgICBDb21tYW5kIFBhcmFtZXRlciBCbG9jayBBZGRyZXNzDQorICBAcGFy YW1baW5dICBDcGJTaXplICAgICBDb21tYW5kIFBhcmFtZXRlciBCbG9jayBTaXplDQorDQorKiov DQorVUlOVDE2DQorU2V0RmlsdGVyICgNCisgIElOICBOSUNfREFUQSAgKk5pYywNCisgIElOICBV SU5UMTYgICAgU2V0RmlsdGVyLA0KKyAgSU4gIFVJTlQ2NCAgICBDcGJBZGRyLA0KKyAgSU4gIFVJ TlQzMiAgICBDcGJTaXplDQorICApDQorew0KKyAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAg ICBTdGF0dXM7DQorICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICpNY2FzdExpc3Q7DQor ICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgIENvdW50Ow0KKyAgVUlOVDggICAgICAgICAg ICAgICAgICAgICAgICBJbmRleDE7DQor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p KENwYi0+RGF0YUxlbiArIChVSU5UMzIpQ3BiLT5NZWRpYWhlYWRlckxlbik7DQorDQorICB3aGls ZSAoMSkgew0KKyAgICBpZiAoQ291bnRlciA+PSAzKSB7DQorICAgICAgU3RhdENvZGUgPSBQWEVf U1RBVENPREVfQlVTWTsNCisgICAgICBicmVhazsNCisgICAgfQ0KKw0KKyAgICBUcmFuc21pdExl bmd0aCA9IERhdGFMZW5ndGg7DQorDQorICAgIFN0YXR1cyA9IE5pYy0+VXNiRXRoLT5Vc2JFdGhU cmFuc21pdCAoQ2RiLCBOaWMtPlVzYkV0aCwgKFZPSUQgKikoVUlOVE4pQnVsa091dERhdGEsICZU cmFuc21pdExlbmd0aCk7DQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBT dGF0Q29kZSA9ICBQWEVfU1RBVEZMQUdTX0NPTU1BTkRfRkFJTEVEOw0KKyAgICB9DQorDQorICAg IGlmIChTdGF0dXMgPT0gRUZJX0lOVkFMSURfUEFSQU1FVEVSKSB7DQorICAgICAgU3RhdENvZGUg PSBQWEVfU1RBVENPREVfSU5WQUxJRF9QQVJBTUVURVI7DQorICAgICAgYnJlYWs7DQorICAgIH0N CisNCisgICAgaWYgKFN0YXR1cyA9PSBFRklfREVWSUNFX0VSUk9SKSB7DQorICAgICAgU3RhdENv ZGUgPSBQWEVfU1RBVENPREVfREVWSUNFX0ZBSUxVUkU7DQorICAgICAgYnJlYWs7DQorICAgIH0N CisNCisgICAgaWYgKCFFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBOaWMtPlR4RnJhbWUr KzsNCisgICAgICBTdGF0Q29kZSA9IFBYRV9TVEFUQ09ERV9TVUNDRVNTOw0KKyAgICAgIGJyZWFr Ow0KKyAgICB9DQorDQorICAgIENvdW50ZXIrKzsNCisgIH0NCisNCisgIFVuTWFwSXQgKA0KKyAg ICBOaWMsDQorICAgIENwYi0+RnJhbWVBZGRyLA0KKyAgICBDcGItPkRhdGFMZW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mNsdWRlICJVc2JSbmRpcy5oIg0K Kw0KK0dMT0JBTF9SRU1PVkVfSUZfVU5SRUZFUkVOQ0VEIEVGSV9VTklDT0RFX1NUUklOR19UQUJM RSAgZ1VzYlJuZGlzRHJpdmVyTmFtZVRhYmxlW10gPSB7DQorICB7DQorICAgICJlbmc7ZW4iLA0K KyAgICBMIlVTQiBSTkRJUyBEcml2ZXIiDQorICB9LA0KKyAgew0KKyAgICBOVUxMLA0KKyAgICBO VUxMDQorICB9DQorfTsNCisNCitFRklfU1RBVFVTDQorRUZJQVBJDQorVXNiUm5kaXNDb21wb25l bnROYW1lR2V0RHJpdmVyTmFtZSAoDQorICBJTiAgRUZJX0NPTVBPTkVOVF9OQU1FX1BST1RPQ09M ICAqVGhpcywNCisgIElOICBDSEFSOCAgICAgICAgICAgICAgICAgICAgICAgICpMYW5ndWFnZSwN CisgIE9VVCBDSEFSMTYgICAgICAgICAgICAgICAgICAgICAgICoqRHJpdmVyTmFtZQ0KKyAgKTsN CisNCitFRklfU1RBVFVTDQorRUZJQVBJDQorVXNiUm5kaXNDb21wb25lbnROYW1lR2V0Q29udHJv bGxlck5hbWUgKA0KKyAgSU4gRUZJX0NPTVBPTkVOVF9OQU1FX1BST1RPQ09MICAqVGhpcywNCisg IElOIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAgQ29udHJvbGxlciwNCisgIElOIEVGSV9I QU5ETEUgICAgICAgICAgICAgICAgICAgQ2hpbGRIYW5kbGUgICAgICAgIE9QVElPTkFMLA0KKyAg SU4gQ0hBUjggICAgICAgICAgICAgICAgICAgICAgICAqTGFuZ3VhZ2UsDQorICBPVVQgQ0hBUjE2 ICAgICAgICAgICAgICAgICAgICAgICoqQ29udHJvbGxlck5hbWUNCisgICk7DQorDQorR0xPQkFM X1JFTU9WRV9JRl9VTlJFRkVSRU5DRUQgRUZJX0NPTVBPTkVOVF9OQU1FX1BST1RPQ09MICBnVXNi Um5kaXNDb21wb25lbnROYW1lID0gew0KKyAgVX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GUgbGFuZ3VhZ2Ugc3BlY2lmaWVkIGJ5IExh bmd1YWdlLA0KKyAgdGhlbiBFRklfVU5TVVBQT1JURUQgaXMgcmV0dXJuZWQuDQorDQorICBAcGFy YW1baW5dICBUaGlzICAgICAgICAgICAgICBBIHBvaW50ZXIgdG8gdGhlIEVGSV9DT01QT05FTlRf TkFNRTJfUFJPVE9DT0wgb3INCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVGSV9D T01QT05FTlRfTkFNRV9QUk9UT0NPTCBpbnN0YW5jZS4NCisgIEBwYXJhbVtpbl0gIExhbmd1YWdl ICAgICAgICAgIEEgcG9pbnRlciB0byBhIE51bGwtdGVybWluYXRlZCBBU0NJSSBzdHJpbmcNCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycmF5IGluZGljYXRpbmcgdGhlIGxhbmd1 YWdlLiBUaGlzIGlzIHRoZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3Vh Z2Ugb2YgdGhlIGRyaXZlciBuYW1lIHRoYXQgdGhlIGNhbGxlciBpcw0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgcmVxdWVzdGluZywgYW5kIGl0IG11c3QgbWF0Y2ggb25lIG9mIHRo ZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2VzIHNwZWNpZmllZCBp biBTdXBwb3J0ZWRMYW5ndWFnZXMuIFRoZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbnVtYmVyIG9mIGxhbmd1YWdlcyBzdXBwb3J0ZWQgYnkgYSBkcml2ZXIgaXMgdXANCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHRoZSBkcml2ZXIgd3JpdGVyLiBMYW5ndWFn ZSBpcyBzcGVjaWZpZWQNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGluIFJGQyA0 NjQ2IG9yIElTTyA2MzktMiBsYW5ndWFnZSBjb2RlIGZvcm1hdC4NCisgIEBwYXJhbVtvdXRdIERy aXZlck5hbWUgICAgICAgIEEgcG9pbnRlciB0byB0aGUgVW5pY29kZSBzdHJpbmcgdG8gcmV0dXJu Lg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVGhpcyBVbmljb2RlIHN0cmluZyBp cyB0aGUgbmFtZSBvZiB0aGUNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyaXZl ciBzcGVjaWZpZWQgYnkgVGhpcyBpbiB0aGUgbGFuZ3VhZ2UNCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIHNwZWNpZmllZCBieSBMYW5ndWFnZS4NCisNCisgIEByZXR2YWwgRUZJX1NV Q0NFU1MgICAgICAgICAgIFRoZSBVbmljb2RlIHN0cmluZyBmb3IgdGhlIERyaXZlciBzcGVjaWZp ZWQgYnkNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRoaXMgYW5kIHRoZSBsYW5n dWFnZSBzcGVjaWZpZWQgYnkgTGFuZ3VhZ2Ugd2FzDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICByZXR1cm5lZCBpbiBEcml2ZXJOYW1lLg0KKyAgQHJldHZhbCBFRklfSU5WQUxJRF9Q QVJBTUVURVIgTGFuZ3VhZ2UgaXMgTlVMTC4NCisgIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1F VEVSIERyaXZlck5hbWUgaXMgTlVMTC4NCisgIEByZXR2YWwgRUZJX1VOU1VQUE9SVEVEICAgICAg IFRoZSBkcml2ZXIgc3BlY2lmaWVkIGJ5IFRoaXMgZG9lcyBub3Qgc3VwcG9ydA0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdGhlIGxhbmd1YWdlIHNwZWNpZmllZCBieSBMYW5ndWFn ZS4NCisNCisqKi8NCitFRklfU1RBVFVTDQorRUZJQVBJDQorVXNiUm5kaXNDb21wb25lbnROYW1l R2V0R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Y2hpbGQgY29udHJvbGxlciB0byByZXRyaWV2ZQ0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgdGhlIG5hbWUgb2YuICBUaGlzIGlzIGFuIG9wdGlvbmFsIHBh cmFtZXRlciB0aGF0DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYXkgYmUgTlVM TC4gIEl0IHdpbGwgYmUgTlVMTCBmb3IgZGV2aWNlDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBkcml2ZXJzLiAgSXQgd2lsbCBhbHNvIGJlIE5VTEwgZm9yIGEgYnVzIGRyaXZlcnMN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoYXQgd2lzaCB0byByZXRyaWV2ZSB0 aGUgbmFtZSBvZiB0aGUgYnVzDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250 cm9sbGVyLiAgSXQgd2lsbCBub3QgYmUgTlVMTCBmb3IgYSBidXMNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGRyaXZlciB0aGF0IHdpc2hlcyB0byByZXRyaWV2ZSB0aGUgbmFtZSBv ZiBhDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGlsZCBjb250cm9sbGVyLg0K KyAgQHBhcmFtW2luXSAgTGFuZ3VhZ2UgICAgICAgICAgQSBwb2ludGVyIHRvIGEgTnVsbC10ZXJt aW5hdGVkIEFTQ0lJIHN0cmluZw0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJy YXkgaW5kaWNhdGluZyB0aGUgbGFuZ3VhZ2UuICBUaGlzIGlzIHRoZQ0KKyAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgbGFuZ3VhZ2Ugb2YgdGhlIGRyaXZlciBuYW1lIHRoYXQgdGhlIGNh bGxlciBpcw0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGluZywgYW5k IGl0IG11c3QgbWF0Y2ggb25lIG9mIHRoZQ0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgbGFuZ3VhZ2VzIHNwZWNpZmllZCBpbiBTdXBwb3J0ZWRMYW5ndWFnZXMuIFRoZQ0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVtYmVyIG9mIGxhbmd1YWdlcyBzdXBwb3J0ZWQg YnkgYSBkcml2ZXIgaXMgdXANCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHRo ZSBkcml2ZXIgd3JpdGVyLiBMYW5ndWFnZSBpcyBzcGVjaWZpZWQgaW4NCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFJGQyA0NjQ2IG9yIElTTyA2MzktMiBsYW5ndWFnZSBjb2RlIGZv cm1hdC4NCisgIEBwYXJhbVtvdXRdIENvbnRyb2xsZXJOYW1lICAgIEEgcG9pbnRlciB0byB0aGUg VW5pY29kZSBzdHJpbmcgdG8gcmV0dXJuLg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgVGhpcyBVbmljb2RlIHN0cmluZyBpcyB0aGUgbmFtZSBvZiB0aGUNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIgc3BlY2lmaWVkIGJ5IENvbnRyb2xsZXJIYW5k bGUgYW5kDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDaGlsZEhhbmRsZSBpbiB0 aGUgbGFuZ3VhZ2Ugc3BlY2lmaWVkIGJ5DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBMYW5ndWFnZSBmcm9tIHRoZSBwb2ludCBvZiB2aWV3IG9mIHRoZSBkcml2ZXINCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNpZmllZCBieSBUaGlzLg0KKw0KKyAgQHJldHZh bCBFRklfU1VDQ0VTUyAgICAgICAgICAgVGhlIFVuaWNvZGUgc3RyaW5nIGZvciB0aGUgdXNlciBy ZWFkYWJsZSBuYW1lIGluDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbGFu Z3VhZ2Ugc3BlY2lmaWVkIGJ5IExhbmd1YWdlIGZvciB0aGUNCisgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGRyaXZlciBzcGVjaWZpZWQgYnkgVGhpcyB3YXMgcmV0dXJuZWQgaW4NCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERyaXZlck5hbWUuDQorICBAcmV0dmFsIEVG SV9JTlZBTElEX1BBUkFNRVRFUiBDb250cm9sbGVySGFuZGxlIGlzIG5vdCBhIHZhbGlkIEVGSV9I QU5ETEUuDQorICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiBDaGlsZEhhbmRsZSBpcyBu b3QgTlVMTCBhbmQgaXQgaXMgbm90IGEgdmFsaWQNCisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIEVGSV9IQU5ETEUuDQorICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiBMYW5n dWFnZSBpcyBOVUxMLg0KKyAgQHJldHZhbCBFRklfSU5WQUxJRF9QQVJBTUVURVIgQ29udHJvbGxl ck5hbWUgaXMgTlVMTC4NCisgIEByZXR2YWwgRUZJX1VOU1VQUE9SVEVEICAgICAgIFRoZSBkcml2 ZXIgc3BlY2lmaWVkIGJ5IFRoaXMgaXMgbm90IGN1cnJlbnRseQ0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgbWFuYWdpbmcgdGhlIGNvbnRyb2xsZXIgc3BlY2lmaWVkIGJ5DQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlIGFuZCBDaGlsZEhh bmRsZS4NCisgIEByZXR2YWwgRUZJX1VOU1VQUE9SVEVEICAgICAgIFRoZSBkcml2ZXIgc3BlY2lm aWVkIGJ5IFRoaXMgZG9lcyBub3Qgc3VwcG9ydA0KKyAgICAgICAgICAgICAgIC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8vIENoZWNrIHNwZWNpZmlj IGRldmljZS9STkRJUyBhbmQgQ0RDLURBVEENCisgIGlmICgoKEludGVyZmFjZURlc2NyaXB0b3Iu SW50ZXJmYWNlQ2xhc3MgPT0gMHgyKSAmJg0KKyAgICAgICAoSW50ZXJmYWNlRGVzY3JpcHRvci5J bnRlcmZhY2VTdWJDbGFzcyA9PSAweDIpICYmDQorICAgICAgIChJbnRlcmZhY2VEZXNjcmlwdG9y LkludGVyZmFjZVByb3RvY29sID09IDB4RkYpKSB8fCBcDQorICAgICAgKChJbnRlcmZhY2VEZXNj cmlwdG9yLkludGVyZmFjZUNsYXNzID09IDB4RUYpICYmDQorICAgICAgIChJbnRlcmZhY2VEZXNj cmlwdG9yLkludGVyZmFjZVN1YkNsYXNzID09IDB4NCkgJiYNCisgICAgICAgKEludGVyZmFjZURl c2NyaXB0b3IuSW50ZXJmYWNlUHJvdG9jb2wgPT0gMHgxKSkgfHwgXA0KKyAgICAgICgoSW50ZXJm YWNlRGVzY3JpcHRvci5JbnRlcmZhY2VDbGFzcyA9PSAweEEpICYmDQorICAgICAgIChJbnRlcmZh Y2VEZXNjcmlwdG9yLkludGVyZmFjZVN1YkNsYXNzID09IDB4MCkgJiYNCisgICAgICAgKEludGVy ZmFjZURlc2NyaXB0b3IuSW50ZXJmYWNlUHJvdG9jb2wgPT0gMHgwMCkpDQorICAgICAgKQ0KKyAg ew0KKyAgICByZXR1cm4gVFJVRTsNCisgIH0NCisNCisgIHJldHVybiBGQUxTRTsNCit9DQorDQor LyoqDQorICBDaGVjayBpZiB0aGlzIGludGVyZmFjZSBpcyBVU0IgUm5kaXMgU3ViVHlwZSBidXQg bm90IENEQyBEYXRhIGludGVyZmFjZQ0KKw0KKyAgQHBhcmFtW2luXSAgVXNiSW8gIEEgcG9pbnRl ciB0byB0aGUgRUZJX1VTQl9JT19QUk9UT0NPTCBpbnN0YW5jZS4NCisNCisgIEByZXR2YWwgVFJV RSAgIFVTQiBSbmRpcyBTdWJUeXBl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dGFuY2UuDQorICBAcGFyYW1bb3V0XSBVc2JSbmRpc0RldmljZSAgICBBIHBvaW50ZXIgdG8gdGhl IFVTQl9STkRJU19ERVZJQ0UgRGF0YS4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAg ICAgICAgVGhlIFVTQl9STkRJU19ERVZJQ0UgbWF0Y2hpbmcgdGhpcyBDREMgRGF0YSBpcyBmb3Vu ZC4NCisgIEByZXR2YWwgRUZJX05PVF9GT1VORCAgICAgICAgICAgVGhlIFVTQl9STkRJU19ERVZJ Q0UgbWF0Y2hpbmcgdGhpcyBDREMgRGF0YSBpcyBub3QgZm91bmQuDQorDQorKiovDQorRUZJX1NU QVRVUw0KK1VwZGF0ZVJuZGlzRGV2aWNlICgNCisgIElOICBFRklfREVWSUNFX1BBVEhfUFJPVE9D T0wgICpVc2JDZGNEYXRhUGF0aCwNCisgIE9VVCBVU0JfUk5ESVNfREVWSUNFICAgICAgICAgICoq VXNiUm5kaXNEZXZpY2UNCisgICkNCit7DQorICBFRklfU1RBVFVTICAgICAgICAgICAgICAgICAg IFN0YXR1czsNCisgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXg7DQorICBVSU5U TiAgICAgICAgICAgICAgICAgICAgICAgIEhhbmRsZUNvdW50Ow0KKyAgRUZJX0hBTkRMRSAgICAg ICAgICAgICAgICAgICAqSGFuZGxlQnVmZmVyOw0KKyAgRURLSUlfVVNCX0VUSEVSTkVUX1BST1RP Q09MICAqVXNiRXRoRGV2aWNlOw0KKyAgRUZJX0RFVklDRV9QQVRIX1BST1RPQ09MICAgICAqVXNi Um5kaXNEYXRhUGF0aDsNCisgIEVGSV9VU0JfSU9fUFJPVE9DT0wgICAgICAgICAgKlVzYklvOw0K KyAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICBJc1JuZGlzSW50ZXJmYWNlRmxhZzsNCisN CisgIElzUm5kaXNJbnRlcmZhY2VGbGFnID0gRkFMU0U7DQorDQorICBTdGF0dXMgPSBnQlMtPkxv Y2F0ZUhhbmRsZUJ1ZmZlciAoDQorICAgICAgICAgICAgICAgICAgQnlQcm90b2NvbCwNCisgICAg ICAgICAgICAgICAgICAmZ0Vka0lJVXNiRXRoUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgICAg ICAgIE5VTEwsDQorICAgICAgICAgICAgICAgICAgJkhhbmRsZUNvdW50LA0KKyAgICAgICAgICAg ICAgICAgICZIYW5kbGVCdWZmZXINCisgICAgICAgICAgICAgICAgICApOw0KKyAgaWYgKEVGSV9F UlJPUiAoU3RhdHVzKSkgew0KKyAgICByZXR1cm4gU3RhdHVzOw0KKyAgfQ0KKw0KKyAgZm9yIChJ bmRleCA9IDA7IEluZGV4IDwgSGFuZGxlQ291bnQ7IEluZGV4KyspIHsNCisgICAgU3RhdHVzID0g Z0JTLT5IYW5kbGVQcm90b2NvbCAoDQorICAgICAgICAgICAgICAgICAgICBIYW5kbGVCdWZmZXJb SW5kZXhdLA0KKyAgICAgICAgICAgICAgICAgICAgJmdFZGtJSVVzYkV0aFByb3RvY29sR3VpZCwN CisgICAgICAgICAgICAgICAgICAgIChWT0lEICoqKSZVc2JFdGhEZXZpY2UNCisgICAgICAgICAg ICAgICAgICAgICk7DQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgICBjb250 aW51ZTsNCisgICAgfQ0KKw0KKyAgICBTdGF0dXMgPSBnQlMtPkhhbmRsZVByb3RvY29sICgNCisg ICAgICAgICAgICAgICAgICAgIEhhbmRsZUJ1ZmZlcltJbmRleF0sDQorICAgICAgICAgICAgICAg ICAgICAmZ0VmaVVzYklvUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgICAgICAgICAgKFZPSUQg KiopJlVzYklvDQorICAgICAgICAgICAgICAgICAgICApOw0KKyAgICBpZiAoRUZJX0VSUk9SIChT dGF0dXMpKSB7DQorICAgICAgY29udGludWU7DQorICAgIH0NCisNCisgICAgSXNSbmRpc0ludGVy ZmFjZUZsYWcgPSBJc1JuZGlzSW50ZXJmYWNlIChVc2JJbyk7DQorICAgIGlmIChJc1JuZGlzSW50 ZXJmYWNlRmxhZyA9PSBGQUxTRSkgew0KKyAgICAgIGNvbnRpbnVlOw0KKyAgICB9DQorDQorICAg IFN0YXR1cyA9IGdCUy0+SGFuZGxlUHJvdG9jb2wgKA0KKyAgICAgICAgICAgICAgICAgICAgSGFu ZGxlQnVmZmVyW0luZGV4XSwNCisgICAgICAgICAgICAgICAgICAgICZnRWZpRGV2aWNlUGF0aFBy b3RvY29sR3VpZCwNCisgICAgICAgICAgICAgICAgICAgIChWT0lEICoqKSZVc2JSbmRpc0RhdGFQ YXRoDQorICAgICAgICAgICAgICAgICAgICApOw0KKyAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMp KSB7DQorICAgICAgY29udGludWU7DQorICAgIH0NCisNCisgICAgU3RhdHVzID0gSXNTYW1lRGV2 aWNlIChVc2JSbmRpc0RhdGFQYXRoLCBVc2JDZGNEYXRhUGF0aCk7DQorDQorICAgIERFQlVHICgo REVCVUdfVkVSQk9TRSwgIlJuZGlzIElzU2FtZURldmljZSAlclxuIiwgU3RhdHVzKSk7DQorDQor ICAgIGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgKlVzYlJuZGlzRGV2aWNlID0g VVNCX1JORElTX0RFVklDRV9GUk9NX1RISVMgKFVzYkV0aERldmljZSk7DQorICAgICAgRnJlZVBv b2wgKEhhbmRsZUJ1ZmZlcik7DQorICAgICAgcmV0dXJuIEVGSV9TVUNDRVNTOw0KKyAgICB9DQor ICB9ICAgLy8gRW5kIG9mIEZvciBsb29wDQorDQorICBGcmVlUG9vbCAoSGFuZGxlQnVmZmVyKTsN CisgIHJldHVybiBFRklfTk9UX0ZPVU5EOw0KK30NCisNCisvKioNCisNCisgIEZvciB0aGUgZ2l2 ZW4gUm5kaXMgRGV2aWNlLCBmaW5kIGEgbWF0Y2hpbmcgQ0RDIGRldmljZSBhbHJlYWR5IGV4aXN0 cyBvciBub3QuIElmIGZvdW5kIHVwZGF0ZSB0aGUgaGFuZGxlDQorICBhbmQgVXNiSU8gcHJvdG9j b2wuDQorDQorICBAcGFyYW1baW5dICBVc2JSbmRpc0RldmljZSAgICAgICAgQSBwb2ludGVyIHRv IHRoZSBVU0JfUk5ESVNfREVWSUNFIGRhdGEuDQorDQorKiovDQorVk9JRA0KK0ZpbmRNYXRjaGlu Z0NkY0RhdGEgKA0KKyAgSU4gVVNCX1JORElTX0RFVklDRSAgKlVzYlJuZGlzRGV2aWNlDQorICAp DQorew0KKyAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICBTdGF0dXM7DQorICBVSU5UTiAgICAg ICAgICAgICAgICAgICAgIEluZGV4Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgICBIYW5k bGVDb3VudDsNCisgIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgKkhhbmRsZUJ1ZmZlcjsNCisg IEVGSV9VU0JfSU9fUFJPVE9DT0wgICAgICAgKlVzYklvOw0KKyAgRUZJX0RFVklDRV9QQVRIX1BS T1RPQ09MICAqVXNiUm5kaXNEYXRhUGF0aDsNCisgIEVGSV9ERVZJQ0VfUEFUSF9QUk9UT0NPTCAg KlVzYkNkY0RhdGFQYXRoOw0KKw0KKyAgLy8gRmluZCB0aGUgcGFyZW50IFJORElTIGFuZCB1cGRh dGUgdGhlIFVzYklvIGZvciB0aGUgQ0RDIGRldmljZQ0KKyAgU3RhdHVzID0gZ0JTLT5IYW5kbGVQ cm90b2NvbCAoDQorICAgICAgICAgICAgICAgICAgVXNiUm5kaXNEZXZpY2UtPlVzYlJuZGlzSGFu ZGxlLA0KKyAgICAgICAgICAgICAgICAgICZnRWZpRGV2aWNlUGF0aFByb3RvY29sR3VpZCwNCisg ICAgICAgICAgICAgICAgICAoVk9JRCAqKikmVXNiUm5kaXNEYXRhUGF0aA0KKyAgICAgICAgICAg ICAgICAgICk7DQorDQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybjsN CisgIH0NCisNCisgIFN0YXR1cyA9IGdCUy0+TG9jYXRlSGFuZGxlQnVmZmVyICgNCisgICAgICAg ICAgICAgICAgICBCeVByb3RvY29sLA0KKyAgICAgICAgICAgICAgICAgICZnRWZpVXNiSW9Qcm90 b2NvbEd1aWQsDQorICAgICAgICAgICAgICAgICAgTlVMTCwNCisgICAgICAgICAgICAgICAgICAm SGFuZGxlQ291bnQsDQorICAgICAgICAgICAgICAgICAgJkhhbmRsZUJ1ZmZlcg0KKyAgICAgICAg ICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybjsN CisgIH0NCisNCisgIGZvciAoSW5kZXggPSAwOyBJbmRleCA8IEhhbmRsZUNvdW50OyBJbmRleCsr KSB7DQorICAgIFN0YXR1cyA9IGdCUy0+SGFuZGxlUHJvdG9jb2wgKA0KKyAgICAgICAgICAgICAg ICAgICAgSGFuZGxlQnVmZmVyW0luZGV4XSwNCisgICAgICAgICAgICAgICAgICAgICZnRWZpVXNi SW9Qcm90b2NvbEd1aWQsDQorICAgICAgICAgICAgICAgICAgICAoVk9JRCAqKikmVXNiSW8NCisg ICAgICAgICAgICAgICAgICAgICk7DQorICAgIEFTU0VSVF9FRklfRVJST1IgKFN0YXR1cyk7DQor DQorICAgIGlmIChJc1VzYkNkY0RhdGEgKFVzYklvKSkgew0KKyAgICAgIERFQlVHICgoREVCVUdf VkVSQk9TRSwgIlJuZGlzIEZpbmRNYXRjaGluZ0NkY0RhdGEgQ0RDRGF0YSBpbnRlcmZhY2UgZm91 bmRcbiIpKTsNCisNCisgICAgICBTdGF0dXMgPSBnQlMtPkhhbmRsZVByb3RvY29sICgNCisgICAg ICAgICAgICAgICAgICAgICAgSGFuZGxlQnVmZmVyW0luZGV4XSwNCisgICAgICAgICAgICAgICAg ICAgICAgJmdFZmlEZXZpY2VQYXRoUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgICAgICAgICAg ICAoVk9JRCAqKikmVXNiQ2RjRGF0YVBhdGgNCisgICAgICAgICAgICAgICAgICAgICAgKTsNCisg ICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgICBERUJVRyAoKERFQlVHX1ZF UkJPU0UsICJSbmRpcyBDRENEYXRhIERldmljZVBhdGggbm90IGZvdW5kXG4iKSk7DQorICAgICAg ICBGcmVlUG9vbCAoSGFuZGxlQnVmZmVyKTsNCisgICAgICAgIHJldHVybjsNCisgICAgICB9DQor DQorICAgICAgU3RhdHVzID0gSXNTYW1lRGV2aWNlIChVc2JSbmRpc0RhdGFQYXRoLCBVc2JDZGNE YXRhUGF0aCk7DQorICAgICAgREVCVUcgKChERUJVR19WRVJCT1NFLCAiUm5kaXMgSXNTYW1lRGV2 aWNlICVyXG4iLCBTdGF0dXMpKTsNCisgICAgICBpZiAoIUVGSV9FUlJPUiAoU3RhdHVzKSkgew0K KyAgICAgICAgVXNiUm5kaXNEZXZpY2UtPlVzYkNkY0RhdGFIYW5kbGUgPSBIYW5kbGVCdWZmZXJb SW5kZXhdOw0KKyAgICAgICAgVXNiUm5kaXNEZXZpY2UtPlVzYklvQ2RjRGF0YSAgICAgPSBVc2JJ bzsNCisgICAgICAgIEdldEVuZHBvaW50IChVc2JSbmRpc0RldmljZS0+VXNiSW9DZGNEYXRhLCBV c2JSbmRpc0RldmljZSk7DQorICAgICAgICBGcmVlUG9vbCAoSGFuZGxlQnVmZmVyKTsNCisgICAg ICAgIHJldHVybjsNCisgICAgICB9DQorICAgIH0NCisgIH0gICAvLyBFbmQgb2YgRm9yIGxvb3AN CisNCisgIEZyZWVQb29sIChIYW5kbGVCdWZmZXIpOw0KK30NCisNCisvKioNCisNCisgIEZvciB0 aGUgZ2l2ZW4gVXNiSW8gQ2RjRGF0YSwgZmluZCBhIG1hdGNoaW5nIFJORElTIGRldmljZSBhbHJl YWR5IGV4aXN0cyBvciBub3QuDQorDQorICBAcGFyYW1baW5dICBDZGNIYW5kbGUgICAgICAgQSBw b2ludGVyIHRvIHRoZSBFRklfSEFORExFIGZvciBVU0IgQ0RDIERhdGEuDQorICBAcGFyYW1bb3V0 XSBDZGNVc2JJbyAgICAgICAgQSBwb2ludGVyIGZvciByZXRyaWV2ZSB0aGUgRUZJX1VTQl9JT19Q Uk9UT0NPTCBpbnN0YW5jZS4NCisgIEBwYXJhbVtvdXRdIFJuZGlzSGFuZGxlICAgICBBIHBvaW50 ZXIgZm9yIHJldHJpZXZlIHRoZSBoYW5kbGUgb2YgUk5ESVMgZGV2aWNlLg0KKw0KKyAgQHJldHZh bCBFRklfU1VDQ0VTUyAgICAgICAgICAgICBUaGUgVVNCX1JORElTX0RFVklDRSBtYXRjaGluZyB0 aGlzIENEQyBEYXRhIGlzIGZvdW5kLg0KKyAgQHJldHZhbCBFRklfTk9UX0ZPVU5EICAgICAgICAg ICBUaGUgVVNCX1JORElTX0RFVklDRSBtYXRjaGluZyB0aGlzIENEQyBEYXRhIGlzIG5vdCBmb3Vu ZC4NCisNCisqKi8NCitFRklfU1RBVFVTDQorRUZJQVBJDQorRmluZE1hdGNoaW5nUm5kaXNEZXYg KA0KKyAgSU4gIEVGSV9IQU5ETEUgICAgICAgICAgIENkY0hhbmRsZSwNCisgIE9VVCBFRklfVVNC X0lPX1BST1RPQ09MICAqKkNkY1VzYklvLA0KKyAgT1VUIEVGSV9IQU5ETEUgICAgICAgICAgICpS bmRpc0hhbmRsZQ0KKyAgKQ0KK3sNCisgIEVGSV9TVEFUVVMgICAgICAgICAgICAgICAgU3RhdHVz Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgICBJbmRleDsNCisgIFVJTlROICAgICAgICAg ICAgICAgICAgICAgSGFuZGxlQ291bnQ7DQorICBFRklfSEFORExFICAgICAgICAgICAgICAgICpI YW5kbGVCdWZmZXI7DQorICBFRklfVVNCX0lPX1BST1RPQ09MICAgICAgICpVc2JJbzsNCisgIEVG SV9ERVZJQ0VfUEFUSF9QUk9UT0NPTCAgKlVzYlJuZGlzRGF0YVBhdGg7DQorICBFRklfREVWSUNF X1BBVEhfUFJPVE9DT0wgICpVc2JDZGNEYXRhUGF0aDsNCisNCisgIC8vIEZpbmQgdGhlIHBhcmVu dCBSTkRJUyBhbmQgdXBkYXRlIHRoZSBVc2JJbyBmb3IgdGhlIENEQyBkZXZpY2UNCisgIFN0YXR1 cyA9IGdCUy0+SGFuZGxlUHJvdG9jb2wgKA0KKyAgICAgICAgICAgICAgICAgIENkY0hhbmRsZSwN CisgICAgICAgICAgICAgICAgICAmZ0VmaURldmljZVBhdGhQcm90b2NvbEd1aWQsDQorICAgICAg ICAgICAgICAgICAgKFZPSUQgKiopJlVzYkNkY0RhdGFQYXRoDQorICAgICAgICAgICAgICAgICAg KTsNCisNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgcmV0dXJuIFN0YXR1czsN CisgIH0NCisNCisgIFN0YXR1cyA9IGdCUy0+TG9jYXRlSGFuZGxlQnVmZmVyICgNCisgICAgICAg ICAgICAgICAgICBCeVByb3RvY29sLA0KKyAgICAgICAgICAgICAgICAgICZnRWZpVXNiSW9Qcm90 b2NvbEd1aWQsDQorICAgICAgICAgICAgICAgICAgTlVMTCwNCisgICAgICAgICAgICAgICAgICAm SGFuZGxlQ291bnQsDQorICAgICAgICAgICAgICAgICAgJkhhbmRsZUJ1ZmZlcg0KKyAgICAgICAg ICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybiBT dGF0dXM7DQorICB9DQorDQorICBmb3IgKEluZGV4ID0gMDsgSW5kZXggPCBIYW5kbGVDb3VudDsg SW5kZXgrKykgew0KKyAgICBTdGF0dXMgPSBnQlMtPkhhbmRsZVByb3RvY29sICgNCisgICAgICAg ICAgICAgICAgICAgIEhhbmRsZUJ1ZmZlcltJbmRleF0sDQorICAgICAgICAgICAgICAgICAgICAm Z0VmaVVzYklvUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgICAgICAgICAgKFZPSUQgKiopJlVz YklvDQorICAgICAgICAgICAgICAgICAgICApOw0KKyAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMp KSB7DQorICAgICAgcmV0dXJuIFN0YXR1czsNCisgICAgfQ0KKw0KKyAgICBpZiAoSXNVc2JSbmRp cyAoVXNiSW8pKSB7DQorICAgICAgU3RhdHVzID0gZ0JTLT5IYW5kbGVQcm90b2NvbCAoDQorICAg ICAgICAgICAgICAgICAgICAgIEhhbmRsZUJ1ZmZlcltJbmRleF0sDQorICAgICAgICAgICAgICAg ICAgICAgICZnRWZpRGV2aWNlUGF0aFByb3RvY29sR3VpZCwNCisgICAgICAgICAgICAgICAgICAg ICAgKFZPSUQgKiopJlVzYlJuZGlzRGF0YVBhdGgNCisgICAgICAgICAgICAgICAgICAgICAgKTsN CisgICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgICBERUJVRyAoKERFQlVH X0VSUk9SLCAiVXNiIFJuZGlzIERldmljZVBhdGggbm90IGZvdW5kXG4iKSk7DQorICAgICAgICBi cmVhazsNCisgICAgICB9DQorDQorICAgICAgU3RhdHVzID0gSXNTYW1lRGV2aWNlIChVc2JSbmRp c0RhdGFQYXRoLCBVc2JDZGNEYXRhUGF0aCk7DQorDQorICAgICAgaWYgKCFFRklfRVJST1IgKFN0 YXR1cykpIHsNCisgICAgICAgICpSbmRpc0hhbmRsZSA9IEhhbmRsZUJ1ZmZlcltJbmRleF07DQor ICAgICAgICAqQ2RjVXNiSW8gICAgPSBVc2JJbzsNCisgICAgICAgIEZyZWVQb29sIChIYW5kbGVC dWZmZXIpOw0KKyAgICAgICAgcmV0dXJuIFN0YXR1czsNCisgICAgICB9DQorICAgIH0NCisgIH0g ICAvLyBFbmQgb2YgRm9yIGxvb3ANCisNCisgIEZyZWVQb29sIChIYW5kbGVCdWZmZXIpOw0KKw0K KyAgcmV0dXJuIEVGSV9OT1RfRk9VTkQ7DQorfQ0KKw0KKy8qKg0KKyAgVVNCIFJuZGlzIERyaXZl ciBCaW5kaW5nIFN1cHBvcnQuDQorDQorICBAcGFyYW1baW5dICBUaGlzICAgICAgICAgICAgICAg ICAgICBQcm90b2NvbCBpbnN0YW5jZSBwb2ludGVyLg0KKyAgQHBhcmFtW2luXSAgQ29udHJvbGxl ckhhbmRsZSAgICAgICAgSGFuZGxlIG9mIGRldmljZSB0byB0ZXN0Lg0KKyAgQHBhcmFtW2luXSAg UmVtYWluaW5nRGV2aWNlUGF0aCAgICAgT3B0aW9uYWwgcGFyYW1ldGVyIHVzZSB0byBwaWNrIGEg c3BlY2lmaWMgY2hpbGQNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRl dmljZSB0byBzdGFydC4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgICAgICAg IFRoaXMgZHJpdmVyIHN1cHBvcnRzIHRoaXMgZGV2aWNlLg0KKyAgQHJldHZhbCBFRklfQUxSRUFE WV9TVEFSVEVEICAgICAgICAgVGhpcyBkcml2ZXIgaXMgYWxyZWFkeSBydW5uaW5nIG9uIHRoaXMg ZGV2aWNlLg0KKyAgQHJldHZhbCBvdGhlciAgICAgICAgICAgICAgICAgICAgICAgVGhpcyBkcml2 ZXIgZG9lcyBub3Qgc3VwcG9ydCB0aGlzIGRldmljZS4NCisNCisqKi8NCitFRklfU1RBVFVTDQor RUZJQVBJDQorVXNiUm5kaXNEcml2ZXJTdXBwb3J0ZWQgKA0KKyAgSU4gRUZJX0RSSVZFUl9CSU5E SU5HX1BST1RPQ09MICAqVGhpcywNCisgIElOIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAg Q29udHJvbGxlckhhbmRsZSwNCisgIElOIEVGSV9ERVZJQ0VfUEFUSF9QUk9UT0NPTCAgICAgKlJl bWFpbmluZ0RldmljZVBhdGgNCisgICkNCit7DQorICBFRklfU1RBVFVTICAgICAgICAgICBTdGF0 dXM7DQorICBFRklfVVNCX0lPX1BST1RPQ09MICAqVXNiSW87DQorDQorICBTdGF0dXMgPSBnQlMt Pk9wZW5Qcm90b2NvbCAoDQorICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisg ICAgICAgICAgICAgICAgICAmZ0VmaVVzYklvUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgICAg ICAgIChWT0lEICoqKSZVc2JJbywNCisgICAgICAgICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5k aW5nSGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAg ICAgICAgICAgICAgRUZJX09QRU5fUFJPVE9DT0xfQllfRFJJVkVSDQorICAgICAgICAgICAgICAg ICAgKTsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgcmV0dXJuIFN0YXR1czsN CisgIH0NCisNCisgIFN0YXR1cyA9IElzU3VwcG9ydGVkRGV2aWNlIChVc2JJbykgPyBFRklfU1VD Q0VTUyA6IEVGSV9VTlNVUFBPUlRFRDsNCisNCisgIGdCUy0+Q2xvc2VQcm90b2NvbCAoDQorICAg ICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAgICAgICAmZ0VmaVVzYklvUHJvdG9jb2xHdWlk LA0KKyAgICAgICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQorICAgICAgICAgQ29udHJv bGxlckhhbmRsZQ0KKyAgICAgICAgICk7DQorICByZXR1cm4gU3RhdHVzOw0KK30NCisNCisvKioN CisgIFVTQiBSTkRJUyBEcml2ZXIgQmluZGluZyBTdGFydC4NCisNCisgIEBwYXJhbVtpbl0gIFRo aXMgICAgICAgICAgICAgICAgICAgIFByb3RvY29sIGluc3RhbmNlIHBvaW50ZXIuDQorICBAcGFy YW1baW5dICBDb250cm9sbGVySGFuZGxlICAgICAgICBIYW5kbGUgb2YgZGV2aWNlIHRvIGJpbmQg ZHJpdmVyIHRvLg0KKyAgQHBhcmFtW2luXSAgUmVtYWluaW5nRGV2aWNlUGF0aCAgICAgT3B0aW9u YWwgcGFyYW1ldGVyIHVzZSB0byBwaWNrIGEgc3BlY2lmaWMgY2hpbGQNCisgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIGRldmljZSB0byBzdGFydC4NCisNCisgIEByZXR2YWwg RUZJX1NVQ0NFU1MgICAgICAgICAgICAgICAgIFRoaXMgZHJpdmVyIGlzIGFkZGVkIHRvIENvbnRy b2xsZXJIYW5kbGUNCisgIEByZXR2YWwgRUZJX0RFVklDRV9FUlJPUiAgICAgICAgICAgIFRoaXMg ZHJpdmVyIGNvdWxkIG5vdCBiZSBzdGFydGVkIGR1ZSB0byBhIGRldmljZSBlcnJvcg0KKyAgQHJl dHZhbCBFRklfT1VUX09GX1JFU09VUkNFUyAgICAgICAgVGhlIGRyaXZlciBjb3VsZCBub3QgaW5z dGFsbCBzdWNjZXNzZnVsbHkgZHVlIHRvIGEgbGFjayBvZiByZXNvdXJjZXMuDQorICBAcmV0dmFs IG90aGVyICAgICAgICAgICAgICAgICAgICAgICBUaGlzIGRyaXZlciBkb2VzIG5vdCBzdXBwb3J0 IHRoaXMgZGV2aWNlDQorDQorKiovDQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK1VzYlJuZGlzRHJp dmVyU3RhcnQgKA0KKyAgSU4gRUZJX0RSSVZFUl9CSU5ESU5HX1BST1RPQ09MICAqVGhpcywNCisg IElOIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgIElO IEVGSV9ERVZJQ0VfUEFUSF9QUk9UT0NPTCAgICAgKlJlbWFpbmluZ0RldmljZVBhdGgNCisgICkN Cit7DQorICBFRklfU1RBVFVTICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQorICBVU0JfUk5E SVNfREVWSUNFICAgICAgICAgICAgICAqVXNiUm5kaXNEZXZpY2U7DQorICBFRklfREVWSUNFX1BB VEhfUFJPVE9DT0wgICAgICAqVXNiRXRoUGF0aDsNCisgIEVGSV9VU0JfSU9fUFJPVE9DT0wgICAg ICAgICAgICpVc2JJbzsNCisgIEVGSV9VU0JfSU5URVJGQUNFX0RFU0NSSVBUT1IgIEludGVyZmFj ZTsNCisgIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAgIFJuZGlzSGFuZGxlOw0KKw0KKyAg Um5kaXNIYW5kbGUgPSBDb250cm9sbGVySGFuZGxlOw0KKw0KKyAgU3RhdHVzID0gZ0JTLT5PcGVu UHJvdG9jb2wgKA0KKyAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAg ICAgICAgICAgICAgJmdFZmlVc2JJb1Byb3RvY29sR3VpZCwNCisgICAgICAgICAgICAgICAgICAo Vk9JRCAqKikmVXNiSW8sDQorICAgICAgICAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hh bmRsZSwNCisgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAgICAgICAg ICAgICAgIEVGSV9PUEVOX1BST1RPQ09MX0JZX0RSSVZFUg0KKyAgICAgICAgICAgICAgICAgICk7 DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9 DQorDQorICBTdGF0dXMgPSBnQlMtPk9wZW5Qcm90b2NvbCAoDQorICAgICAgICAgICAgICAgICAg Q29udHJvbGxlckhhbmRsZSwNCisgICAgICAgICAgICAgICAgICAmZ0VmaURldmljZVBhdGhQcm90 b2NvbEd1aWQsDQorICAgICAgICAgICAgICAgICAgKFZPSUQgKiopJlVzYkV0aFBhdGgsDQorICAg ICAgICAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAgICAgICAg ICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgIEVGSV9PUEVOX1BST1RP Q09MX0JZX0RSSVZFUg0KKyAgICAgICAgICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChT dGF0dXMpKSB7DQorICAgIGdCUy0+Q2xvc2VQcm90b2NvbCAoDQorICAgICAgICAgICBDb250cm9s bGVySGFuZGxlLA0KKyAgICAgICAgICAgJmdFZmlVc2JJb1Byb3RvY29sR3VpZCwNCisgICAgICAg ICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQorICAgICAgICAgICBDb250cm9sbGVySGFu ZGxlDQorICAgICAgICAgICApOw0KKyAgICByZXR1cm4gU3RhdHVzOw0KKyAgfQ0KKw0KKyAgZ0JT LT5DbG9zZVByb3RvY29sICgNCisgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAgICAg ICZnRWZpRGV2aWNlUGF0aFByb3RvY29sR3VpZCwNCisgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5k aW5nSGFuZGxlLA0KKyAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAgICAgICApOw0KKw0K KyAgLy8gQ29udHJvbHMgY29tZSBoZXJlIGZvciBSTkRJUyBhbmQgQ0RDLiBJZiBpdCBpcyBDREMs IGNoZWNrIHdoZXRoZXIgUk5ESVMgaXMgcHJlc2VudCBvbiB0aGUgc2FtZSBjb250cm9sbGVyIG9y IG5vdC4NCisgIGlmIChJc1VzYkNkY0RhdGEgKFVzYklvKSkgew0KKyAgICBERUJVRyAoKERFQlVH X0lORk8sICJSbmRpcyBDRENEYXRhIGludGVyZmFjZSBmb3VuZFxuIikpOw0KKw0KKyAgICAvLyBG aW5kIHRoZSBwYXJlbnQgUk5ESVMgYW5kIHVwZGF0ZSB0aGUgVXNiSW8gZm9yIHRoZSBDREMgZGV2 aWNlDQorICAgIFN0YXR1cyA9IFVwZGF0ZVJuZGlzRGV2aWNlICgNCisgICAgICAgICAgICAgICBV c2JFdGhQYXRoLA0KKyAgICAgICAgICAgICAgICZVc2JSbmRpc0RldmljZQ0KKyAgICAgICAgICAg ICAgICk7DQorDQorICAgIGlmICghRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgREVCVUcg KChERUJVR19JTkZPLCAiUm5kaXMgTWF0Y2hpbmcgaW50ZXJmYWNlIGZvdW5kXG4iKSk7DQorICAg ICAgVXNiUm5kaXNEZXZpY2UtPlVzYkNkY0RhdGFIYW5kbGUgPSBDb250cm9sbGVySGFuZGxlOw0K KyAgICAgIFVzYlJuZGlzRGV2aWNlLT5Vc2JJb0NkY0RhdGEgICAgID0gVXNiSW87DQorICAgICAg R2V0RW5kcG9pbnQgKFVzYlJuZGlzRGV2aWNlLT5Vc2JJb0NkY0RhdGEsIFVzYlJuZGlzRGV2aWNl KTsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9IGVsc2Ugew0KKyAgICAgIC8vIENoZWNr IGlmIFJuRGlzIGV4aXN0DQorICAgICAgU3RhdHVzID0gRmluZE1hdGNoaW5nUm5kaXNEZXYgKA0K KyAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAgICAgICAgICAgICAgICZV c2JJbywNCisgICAgICAgICAgICAgICAgICZSbmRpc0hhbmRsZQ0KKyAgICAgICAgICAgICAgICAg KTsNCisNCisgICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgICBnQlMtPkNs b3NlUHJvdG9jb2wgKA0KKyAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAg ICAgICAgICAgJmdFZmlVc2JJb1Byb3RvY29sR3VpZCwNCisgICAgICAgICAgICAgICBUaGlzLT5E cml2ZXJCaW5kaW5nSGFuZGxlLA0KKyAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisg ICAgICAgICAgICAgICApOw0KKyAgICAgICAgcmV0dXJuIFN0YXR1czsNCisgICAgICB9DQorICAg IH0NCisgIH0NCisNCisgIFVzYlJuZGlzRGV2aWNlID0gQWxsb2NhdGVaZXJvUG9vbCAoc2l6ZW9m IChVU0JfUk5ESVNfREVWSUNFKSk7DQorDQorICBpZiAoIVVzYlJuZGlzRGV2aWNlKSB7DQorICAg IERFQlVHICgoREVCVUdfRVJST1IsICJBbGxvY2F0ZVplcm9Qb29sIEZhaWxcbiIpKTsNCisNCisg ICAgZ0JTLT5DbG9zZVByb3RvY29sICgNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQor ICAgICAgICAgICAmZ0VmaVVzYklvUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgVGhpcy0+RHJp dmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAgICAg ICAgICk7DQorICAgIHJldHVybiBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgIH0NCisNCisgIFN0 YXR1cyA9IExvYWRBbGxEZXNjcmlwdG9yICgNCisgICAgICAgICAgICAgVXNiSW8sDQorICAgICAg ICAgICAgICZVc2JSbmRpc0RldmljZS0+Q29uZmlnDQorICAgICAgICAgICAgICk7DQorICBpZiAo RUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgIERFQlVHICgoREVCVUdfRVJST1IsICIlYTpMb2Fk QWxsRGVzY3JpcHRvciBzdGF0dXMgPSAlclxuIiwgX19GVU5DVElPTl9fLCBTdGF0dXMpKTsNCisg ICAgZ0JTLT5DbG9zZVByb3RvY29sICgNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQor ICAgICAgICAgICAmZ0VmaVVzYklvUHJvdG9jb2xHdWlkLA0KKyAgICAgICAgICAgVGhpcy0+RHJp dmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAgICAg ICAgICk7DQorICAgIEZyZWVQb29sIChVc2JSbmRpc0RldmljZSk7DQorICAgIHJldHVybiBTdGF0 dXM7DQorICB9DQorDQorICBTdGF0dXMgPSBVc2JJby0+VXNiR2V0SW50ZXJmYWNlRGVzY3JpcHRv ciAoDQorICAgICAgICAgICAgICAgICAgICBVc2JJbywNCisgICAgICAgICAgICAgICAgICAgICZJ bnRlcmZhY2UNCisgICAgICAgICAgICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0 dXMpKSB7DQorICAgIERFQlVHICgoREVCVUdfRVJST1IsICIlYTpVc2JHZXRJbnRlcmZhY2VEZXNj cmlwdG9yIHN0YXR1cyA9ICVyXG4iLCBfX0ZVTkNUSU9OX18sIFN0YXR1cykpOw0KKyAgICBnQlMt PkNsb3NlUHJvdG9jb2wgKA0KKyAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgICAgICAg ICAgICZnRWZpVXNiSW9Qcm90b2NvbEd1aWQsDQorICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5k aW5nSGFuZGxlLA0KKyAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZQ0KKyAgICAgICAgICAgKTsN CisgICAgRnJlZVBvb2wgKFVzYlJuZGlzRGV2aWNlLT5Db25maWcpOw0KKyAgICBGcmVlUG9vbCAo VXNiUm5kaXNEZXZpY2UpOw0KKyAgICByZXR1cm4gU3RhdHVzOw0KKyAgfQ0KKw0KKyAgVXNiUm5k aXNEZXZpY2UtPlNpZ25hdHVyZSAgICAgICAgICAgICAgICAgICAgICAgICAgPSBVU0JfUk5ESVNf U0lHTkFUVVJFOw0KKyAgVXNiUm5kaXNEZXZpY2UtPk51bU9mSW50ZXJmYWNlICAgICAgICAgICAg ICAgICAgICAgPSBJbnRlcmZhY2UuSW50ZXJmYWNlTnVtYmVyOw0KKyAgVXNiUm5kaXNEZXZpY2Ut PlVzYlJuZGlzSGFuZGxlICAgICAgICAgICAgICAgICAgICAgPSBSbmRpc0hhbmRsZTsNCisgIFVz YlJuZGlzRGV2aWNlLT5Vc2JDZGNEYXRhSGFuZGxlICAgICAgICAgICAgICAgICAgID0gMDsNCisg IFVzYlJuZGlzRGV2aWNlLT5Vc2JJbyA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KyAgICAgICAgICAgICAgICAg ICAgKTsNCisgICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KKyAgICAgIGdCUy0+Q2xvc2VQ cm90b2NvbCAoDQorICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAg ICZnRWZpVXNiSW9Qcm90b2NvbEd1aWQsDQorICAgICAgICAgICAgIFRoaXMtPkRyaXZlckJpbmRp bmdIYW5kbGUsDQorICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUNCisgICAgICAgICAgICAg KTsNCisNCisgICAgICBGcmVlUG9vbCAoVXNiUm5kaXNEZXZpY2UtPkNvbmZpZyk7DQorICAgICAg RnJlZVBvb2wgKFVzYlJuZGlzRGV2aWNlKTsNCisgICAgICByZXR1cm4gU3RhdHVzOw0KKyAgICB9 DQorDQorICAgIEdldEVuZHBvaW50IChVc2JSbmRpc0RldmljZS0+VXNiSW8sIFVzYlJuZGlzRGV2 aWNlKTsNCisNCisgICAgREVCVUcgKChERUJVR19JTkZPLCAiUm5kaXMgRGV2aWNlSGFuZGxlICVy XG4iLCBVc2JSbmRpc0RldmljZS0+VXNiUm5kaXNIYW5kbGUpKTsNCisgICAgREVCVUcgKChERUJV R19JTkZPLCAiQ0RDIERldmljZUhhbmRsZSAlclxuIiwgVXNiUm5kaXNEZXZpY2UtPlVzYkNkY0Rh dGFIYW5kbGUpKTsNCisgICAgcmV0dXJuIEVGSV9TVUNDRVNTOw0KKyAgfQ0KKw0KKyAgRnJlZVBv b2wgKFVzYlJuZGlzRGV2aWNlLT5Db25maWcpOw0KKyAgRnJlZVBvb2wgKFVzYlJuZGlzRGV2aWNl KTsNCisNCisgIHJldHVybiBFRklfU1VDQ0VTUzsNCit9DQorDQorLyoqDQorICBDaGVja2FuZFN0 b3BSbmRpc0RldmljZQ0KKw0KKyAgQHBhcmFtW2luXSAgVGhpcyAgICAgICAgICAgICAgICAgUHJv dG9jb2wgaW5zdGFuY2UgcG9pbnRlci4NCisgIEBwYXJhbVtpbl0gIENvbnRyb2xsZXJIYW5kbGUg ICAgIEhhbmRsZSBvZiBkZXZpY2UgdG8gYmluZCBkcml2ZXIgdG8uDQorDQorICBAcmV0dmFsIEVG SV9TVUNDRVNTICAgICAgICAgIFRoaXMgZHJpdmVyIGlzIGFkZGVkIHRvIENvbnRyb2xsZXJIYW5k bGUNCisgIEByZXR2YWwgRUZJX0RFVklDRV9FUlJPUiAgICAgVGhpcyBkcml2ZXIgY291bGQgbm90 IGJlIHN0YXJ0ZWQgZHVlIHRvIGEgZGV2aWNlIGVycm9yDQorICBAcmV0dmFsIG90aGVyICAgICAg ICAgICAgICAgIFRoaXMgZHJpdmVyIGRvZXMgbm90IHN1cHBvcnQgdGhpcyBkZXZpY2UNCisNCisq Ki8NCitFRklfU1RBVFVTDQorRUZJQVBJDQorQ2hlY2thbmRTdG9wUm5kaXNEZXZpY2UgKA0KKyAg SU4gIEVGSV9EUklWRVJfQklORElOR19QUk9UT0NPTCAgKlRoaXMsDQorICBJTiAgRUZJX0hBTkRM RSAgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlDQorICApDQorew0KKyAgRUZJX1NU QVRVUyAgICAgICAgICAgU3RhdHVzOw0KKyAgRUZJX1VTQl9JT19QUk9UT0NPTCAgKlVzYklvOw0K Kw0KKyAgU3RhdHVzID0gZ0JTLT5PcGVuUHJvdG9jb2wgKA0KKyAgICAgICAgICAgICAgICAgIENv bnRyb2xsZXJIYW5kbGUsDQorICAgICAgICAgICAgICAgICAgJmdFZmlVc2JJb1Byb3RvY29sR3Vp ZCwNCisgICAgICAgICAgICAgICAgICAoVk9JRCAqKikmVXNiSW8sDQorICAgICAgICAgICAgICAg ICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCisgICAgICAgICAgICAgICAgICBDb250cm9s bGVySGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgIEVGSV9PUEVOX1BST1RPQ09MX0dFVF9QUk9U T0NPTA0KKyAgICAgICAgICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7 DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQorDQorICBpZiAoSXNVc2JSbmRpcyAoVXNiSW8p KSB7DQorICAgIFN0YXR1cyA9IGdCUy0+Q2xvc2VQcm90b2NvbCAoDQorICAgICAgICAgICAgICAg ICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgICAgJmdFZmlVc2JJb1By b3RvY29sR3VpZCwNCisgICAgICAgICAgICAgICAgICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5k bGUsDQorICAgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlDQorICAgICAgICAgICAg ICAgICAgICApOw0KKyAgICBERUJVRyAoKERFQlVHX0VSUk9SLCAiUm5kaXMgQ29udHJvbGxlckhh bmRsZSBTdG9wICVyXG4iLCBTdGF0dXMpKTsNCisgICAgcmV0dXJuIFN0YXR1czsNCisgIH0NCisN CisgIHJldHVybiBFRklfVU5TVVBQT1JURUQ7DQorfQ0KKw0KKy8qKg0KKyAgVVNCIFJuZGlzIERy aXZlciBCaW5kaW5nIFN0b3AuDQorDQorICBAcGFyYW1baW5dICBUaGlzICAgICAgICAgICAgICAg ICAgUHJvdG9jb2wgaW5zdGFuY2UgcG9pbnRlci4NCisgIEBwYXJhbVtpbl0gIENvbnRyb2xsZXJI YW5kbGUgICAgICBIYW5kbGUgb2YgZGV2aWNlIHRvIHN0b3AgZHJpdmVyIG9uDQorICBAcGFyYW1b aW5dICBOdW1iZXJPZkNoaWxkcmVuICAgICAgTnVtYmVyIG9mIEhhbmRsZXMgaW4gQ2hpbGRIYW5k bGVCdWZmZXIuIElmIG51bWJlciBvZg0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIGNoaWxkcmVuIGlzIHplcm8gc3RvcCB0aGUgZW50aXJlIGJ1cyBkcml2ZXIuDQorICBAcGFy YW1baW5dICBDaGlsZEhhbmRsZUJ1ZmZlciAgICAgTGlzdCBvZiBDaGlsZCBIYW5kbGVzIHRvIFN0 b3AuDQorDQorICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgICAgVGhpcyBkcml2ZXIg aXMgcmVtb3ZlZCBDb250cm9sbGVySGFuZGxlDQorICBAcmV0dmFsIG90aGVyICAgICAgICAgICAg ICAgICAgICAgVGhpcyBkcml2ZXIgd2FzIG5vdCByZW1vdmVkIGZyb20gdGhpcyBkZXZpY2UNCisN CisqKi8NCitFRklfU1RBVFVTDQorRUZJQVBJDQorVXNiUm5kaXNEcml2ZXJTdG9wICgNCisgIElO ICBFRklfRFJJVkVSX0JJTkRJTkdfUFJPVE9DT0wgICpUaGlzLA0KKyAgSU4gIEVGSV9IQU5ETEUg ICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSwNCisgIElOICBVSU5UTiAgICAgICAg ICAgICAgICAgICAgICAgIE51bWJlck9mQ2hpbGRyZW4sDQorICBJTiAgRUZJX0hBTkRMRSAgICAg ICAgICAgICAgICAgICAqQ2hpbGRIYW5kbGVCdWZmZXINCisgICkNCit7DQorICBFRklfU1RBVFVT ICAgICAgICAgICAgICAgICAgIFN0YXR1czsNCisgIEVES0lJX1VTQl9FVEhFUk5FVF9QUk9UT0NP TCAgKlVzYkV0aFByb3RvY29sOw0KKyAgVVNCX1JORElTX0RFVklDRSAgICAgICAgICAgICAqVXNi Um5kaXNEZXZpY2U7DQorDQorICBERUJVRyAoKERFQlVHX0lORk8sICJVc2JSbmRpc0RyaXZlclN0 b3AgQ29udHJvbGxlckhhbmRsZSAlbHhcbiIsIENvbnRyb2xsZXJIYW5kbGUpKTsNCisNCisgIFN0 YXR1cyA9IGdCUy0+T3BlblByb3RvY29sICgNCisgICAgICAgICAgICAgICAgICBDb250cm9sbGVy SGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgICZnRWRrSUlVc2JFdGhQcm90b2NvbEd1aWQsDQor ICAgICAgICAgICAgICAgICAgKFZPSUQgKiopJlVzYkV0aFByb3RvY29sLA0KKyAgICAgICAgICAg ICAgICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQorICAgICAgICAgICAgICAgICAgQ29u dHJvbGxlckhhbmRsZSwNCisgICAgICAgICAgICAgICAgICBFRklfT1BFTl9QUk9UT0NPTF9HRVRf UFJPVE9DT0wNCisgICAgICAgICAgICAgICAgICApOw0KKyAgaWYgKEVGSV9FUlJPUiAoU3RhdHVz KSkgew0KKyAgICBTdGF0dXMgPSBDaGVja2FuZFN0b3BSbmRpc0RldmljZSAoVGhpcywgQ29udHJv bGxlckhhbmRsZSk7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQorDQorICBVc2JSbmRpc0Rl dmljZSA9IFVTQl9STkRJU19ERVZJQ0VfRlJPTV9USElTIChVc2JFdGhQcm90b2NvbCk7DQorDQor ICBTdGF0dXMgPSBnQlMtPkNsb3NlUHJvdG9jb2wgKA0KKyAgICAgICAgICAgICAgICAgIFVzYlJu ZGlzRGV2aWNlLT5Vc2JDZGNEYXRhSGFuZGxlLA0KKyAgICAgICAgICAgICAgICAgICZnRWZpVXNi SW9Qcm90b2NvbEd1aWQsDQorICAgICAgICAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hh bmRsZSwNCisgICAgICAgICAgICAgICAgICBVc2JSbmRpc0RldmljZS0+VXNiQ2RjRGF0YUhhbmRs ZQ0KKyAgICAgICAgICAgICAgICAgICk7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQor ICAgIERFQlVHICgoREVCVUdfRVJST1IsICIlYTpDbG9zZVByb3RvY29sIHN0YXR1cyA9ICVyXG4i LCBfX0ZVTkNUSU9OX18sIFN0YXR1cykpOw0KKyAgfQ0KKw0KKyAgU3RhdHVzID0gZ0JTLT5Vbmlu c3RhbGxQcm90b2NvbEludGVyZmFjZSAoDQorICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhh bmRsZSwNCisgICAgICAgICAgICAgICAgICAmZ0Vka0lJVXNiRXRoUHJvdG9jb2xHdWlkLA0KKyAg ICAgICAgICAgICAgICAgIFVzYkV0aFByb3RvY29sDQorICAgICAgICAgICAgICAgICAgKTsNCisg IGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgcmV0dXJuIFN0YXR1czsNCisgIH0NCisN CisgIFN0YXR1cyA9IGdCUy0+Q2xvc2VQcm90b2NvbCAoDQorICAgICAgICAgICAgICAgICAgQ29u dHJvbGxlckhhbmRsZSwNCisgICAgICAgICAgICAgICAgICAmZ0VmaVVzYklvUHJvdG9jb2xHdWlk LA0KKyAgICAgICAgICAgICAgICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQorICAgICAg ICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZQ0KKyAgICAgICAgICAgICAgICAgICk7DQorDQor ICBGcmVlUG9vbCAoVXNiUm5kaXNEZXZpY2UtPkNvbmZpZyk7DQorICBGcmVlUG9vbCAoVXNiUm5k aXNEZXZpY2UpOw0KKw0KKyAgREVCVUcgKChERUJVR19JTkZPLCAiVXNiUm5kaXNEcml2ZXJTdG9w ICVyXG4iLCBTdGF0dXMpKTsNCisgIHJldHVybiBTdGF0dXM7DQorfQ0KKw0KKy8qKg0KKyAgRW50 cnlwb2ludCBvZiBSTkRJUyBEcml2ZXIuDQorDQorICBUaGlzIGZ1bmN0aW9uIGlzIHRoZSBlbnRy eXBvaW50IG9mIFJORElTIERyaXZlci4gSXQgaW5zdGFsbHMgRHJpdmVyIEJpbmRpbmcNCisgIFBy b3RvY29scyB0b2dldGhlciB3aXRoIENvbXBvbmVudCBOYW1lIFByb3RvY29scy4NCisNCisgIEBw YXJhbVtpbl0gIEltYWdlSGFuZGxlICAgICAgIFRoZSBmaXJtd2FyZSBhbGxvY2F0ZWQgaGFuZGxl IGZvciB0aGUgRUZJIGltYWdlLg0KKyAgQHBhcmFtW2luXSAgU3lzdGVtVGFib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TU9URV9ORElTX01TR19IRUFERVIgUkVNT1RFX05ESVNfTVNHX0hFQURFUjsNCisNCit0eXBlZGVm IHN0cnVjdCB7DQorICBVSU5UMzIgICAgICAgICAgICAgICAgICAgICAgICAgU2lnbmF0dXJlOw0K KyAgRURLSUlfVVNCX0VUSEVSTkVUX1BST1RPQ09MICAgIFVzYkV0aDsNCisgIEVGSV9IQU5ETEUg ICAgICAgICAgICAgICAgICAgICBVc2JDZGNEYXRhSGFuZGxlOw0KKyAgRUZJX0hBTkRMRSAgICAg ICAgICAgICAgICAgICAgIFVzYlJuZGlzSGFuZGxlOw0KKyAgRUZJX1VTQl9JT19QUk9UT0NPTCAg ICAgICAgICAgICpVc2JJbzsNCisgIEVGSV9VU0JfSU9fUFJPVE9DT0wgICAgICAgICAgICAqVXNi SW9DZGNEYXRhOw0KKyAgRUZJX1VTQl9DT05GSUdfREVTQ1JJUFRPUiAgICAgICpDb25maWc7DQor ICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgTnVtT2ZJbnRlcmZhY2U7DQorICBVSU5U OCAgICAgICAgICAgICAgICAgICAgICAgICAgQnVsa0luRW5kcG9pbnQ7DQorICBVSU5UOCAgICAg ICAgICAgICAgICAgICAgICAgICAgQnVsa091dEVuZHBvaW50Ow0KKyAgVUlOVDggICAgICAgICAg ICAgICAgICAgICAgICAgIEludGVycnVwRW5kcG9pbnQ7DQorICBFRklfTUFDX0FERFJFU1MgICAg ICAgICAgICAgICAgTWFjQWRkcmVzczsNCisgIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAg ICBSZXF1ZXN0SWQ7DQorICBVSU5UMzIgICAgICAgICAgICAgICAgICAgICAgICAgTWVkaXVtOw0K KyAgVUlOVDMyICAgICAgICAgICAgICAgICAgICAgICAgIE1heFBhY2tldHNQZXJUcmFuc2ZlcjsN CisgIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAgICBNYXhUcmFuc2ZlclNpemU7DQorICBV SU5UMzIgICAgICAgICAg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gVVNCX1JORElT X0RFVklDRSwgVXNiRXRoLCBVU0JfUk5ESVNfU0lHTkFUVVJFKQ0KKw0KK2V4dGVybiBFRklfQ09N UE9ORU5UX05BTUUyX1BST1RPQ09MICBnVXNiUm5kaXNDb21wb25lbnROYW1lMjsNCisNCitzdHJ1 Y3QgQklUX01BUCB7DQorICB1bnNpZ25lZCBpbnQgICAgU3JjOw0KKyAgdW5zaWduZWQgaW50ICAg IERzdDsNCit9Ow0KKw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitVc2JSbmRpc0RyaXZlclN1cHBv cnRlZCAoDQorICBJTiBFRklfRFJJVkVSX0JJTkRJTkdfUFJPVE9DT0wgICpUaGlzLA0KKyAgSU4g RUZJX0hBTkRMRSAgICAgICAgICAgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgSU4gRUZJ X0RFVklDRV9QQVRIX1BST1RPQ09MICAgICAqUmVtYWluaW5nRGV2aWNlUGF0aA0KKyAgKTsNCisN CitFRklfU1RBVFVTDQorRUZJQVBJDQorVXNiUm5kaXNEcml2ZXJTdGFydCAoDQorICBJTiBFRklf RFJJVkVSX0JJTkRJTkdfUFJPVE9DT0wgICpUaGlzLA0KKyAgSU4gRUZJX0hBTkRMRSAgICAgICAg ICAgICAgICAgICBDb250cm9sbGVySGFuZGxlLA0KKyAgSU4gRUZJX0RFVklDRV9QQVRIX1BST1RP Q09MICAgICAqUmVtYWluaW5nRGV2aWNlUGF0aA0KKyAgKTsNCisNCitFRklfU1RBVFVTDQorRUZJ QVBJDQorVXNiUm5kaXNEcml2ZXJTdG9wICgNCisgIElOICBFRklfRFJJVkVSX0JJTkRJTkdfUFJP VE9DT0wgICpUaGlzLA0KKyAgSU4gIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAgQ29udHJv bGxlckhhbmRsZSwNCisgIElOICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgIE51bWJlck9m Q2hpbGRyZW4sDQorICBJTiAgRUZJX0hBTkRMRSAgICAgICAgICAgICAgICAgICAqQ2hpbGRIYW5k bGVCdWZmZXINCisgICk7DQorDQorRUZJX1NUQVRVUw0KK0xvYWRBbGxEZXNjcmlwdG9yICgNCisg IElOICBFRklfVVNCX0lPX1BST1RPQ09MICAgICAgICAqVXNiSW8sDQorICBPVVQgRUZJX1VTQl9D T05GSUdfREVTQ1JJUFRPUiAgKipDb25maWdEZXNjDQorICApOw0KKw0KK0JPT0xFQU4NCitOZXh0 RGVzY3JpcHRvciAoDQorICBJTiBFRklfVVNCX0NPTkZJR19ERVNDUklQVE9SICAqRGVzYywNCisg IElOIE9VVCBVSU5UTiAgICAgICAgICAgICAgICAgICpPZmZzZXQNCisgICk7DQorDQorRUZJX1NU QVRVUw0KK0dldEZ1bmN0aW9uYWxEZXNjcmlwdG9yICgNCisgIElOICBFRklfVVNCX0NPTkZJR19E RVNDUklQVE9SICAqQ29uZmlnLA0KKyAgSU4gIFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgIEZ1 bkRlc2NyaXB0b3JUeXBlLA0KKyAgT1VUIFZPSUQgICAgICAgICAgICAgICAgICAgICAgICpEYXRh QnVmZmVyDQorICApOw0KKw0KK1ZPSUQNCitHZXRFbmRwb2ludCAoDQorICBJTiAgICAgIEVGSV9V U0JfSU9fUFJPVE9DT0wgICpVc2JJbywNCisgIElOIE9VVCAgVVNCX1JORElTX0RFVklDRSAgICAg KlVzYlJuZGlzRGV2aWNlDQorICApOw0KKw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitVc2JSbmRp c0ludGVycnVwdCAoDQorICBJTiBFREtJSV9VU0JfRVRIRVJORVRfUFJPVE9DT0wgICpUaGlzLA0K KyAgSU4gQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICBJc05ld1RyYW5zZmVyLA0KKyAgSU4g VUlOVE4gICAgICAgICAgICAgICAgICAgICAgICBQb2xsaW5nSW50ZXJ2YWwsDQorICBJTiBFRklf VVNCX0RFVklDRV9SRVFVRVNUICAgICAgICpSZXF1c3QNCisgICk7DQorDQorRUZJX1NUQVRVUw0K K0VGSUFQSQ0KK0ludGVycnVwdENhbGxiYWNrICgNCisgIElOICBWT0lEICAgICpEYXRhLA0KKyAg SU4gIFVJTlROICAgRGF0YUxlbmd0aCwNCisgIElOICBWT0lEICAgICpDb250ZXh0LA0KKyAgSU4g IFVJTlQzMiAgU3RhdHVzDQorICApOw0KKw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitHZXRVc2JF dGhNYWNBZGRyZXNzICgNCisgIElOICBFREtJSV9VU0JfRVRIRVJORVRfUFJPVE9DT0wgICpUaGlz LA0KKyAgT1VUIEVGSV9NQUNfQUREUkVTUyAgICAgICAgICAgICAgKk1hY0FkZHJlc3MNCisgICk7 DQorDQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK1VzYkV0aEJ1bGtTaXplICgNCisgIElOICBFREtJ SV9VU0JfRVRIRVJORVRfUFJPVE9DT0wgICpUaGlzLA0KKyAgT1VUIFVJTlROICAgICAgICAgICAg ICAgICAgICAgICAgKkJ1bGtTaXplDQorICApOw0KKw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitS bmRpc0R1bW15UmV0dXJuICgNCisgIElOICBQWEVfQ0RCICAgKkNkYiwNCisgIElOICBOSUNfREFU QSAgKk5pYw0KKyAgKTsNCisNCitFRklfU1RBVFVTDQorRUZJQVBJDQorUm5kaXNVbmRpU3RhcnQg KA0KKyAgSU4gUFhFX0NEQiAgICpDZGIsDQorICBJTiBOSUNfREFUQSAgKk5pYw0KKyAgKTsNCisN CitFRklfU1RBVFVTDQorRUZJQVBJDQorUm5kaXNVbmRpU3RvcCAoDQorICBJTiBQWEVfQ0RCICAg KkNkYiwNCisgIElOIE5JQ19EQVRBICAqTmljDQorICApOw0KKw0KK0VGSV9TVEFUVVMNCitFRklB UEkNCitSbmRpc1VuZGlHZXRJbml0SW5mbyAoDQorICBJTiBQWEVfQ0RCICAgKkNkYiwNCisgIElO IE5JQ19EQVRBICAqTmljDQorICApOw0KKw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitSbmRpc1Vu ZGlHZXRDb25maWdJbmZvICgNCisgIElOIFBYRV9DREIgICAqQ2RiLA0KKyAgSU4gTklDX0RBVEEg ICpOaWMNCisgICk7DQorDQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK1JuZGlzVW5kaUluaXRpYWxp emUgKA0KKyAgSU4gUFhFX0NEQiAgICpDZGIsDQorICBJTiBOSUNfREFUQSAgKk5pYw0KKyAgKTsN CisNCitFRklfU1RBVFVTDQorRUZJQVBJDQorUm5kaXNVbmRpVHJhbnNtaXQgKA0KKyAgSU4gICAg ICBQWEVfQ0RCICAgICAgICAgICAgICAgICAgICAgICpDZGIsDQorICBJTiAgICAgIEVES0lJX1VT Ql9FVEhFUk5FVF9QUk9UT0NPTCAgKlRoaXMsDQorICBJTiAgICAgIFZPSUQgICAgICAgICAgICAg ICAgICAgICAgICAgKkJ1bGtPdXREYXRhLA0KKyAgSU4gT1VUICBVSU5UTiAgICAgICAgICAgICAg ICAgICAgICAgICpEYXRhTGVuZ3RoDQorICApOw0KKw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitS bmRpc1VuZGlSZWNlaXZlICgNCisgIElOICAgICBQWEVfQ0RCICAgICAgICAgICAgICAgICAgICAg ICpDZGIsDQorICBJTiAgICAgRURLSUlfVVNCX0VUSEVSTkVUX1BST1RPQ09MICAqVGhpcywNCisg IElOIE9VVCBWT0lEICAgICAgICAgICAgICAgICAgICAgICAgICpCdWxrSW5EYXRhLA0KKyAgSU4g T1VUIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgKkRhdGFMZW5ndGgNCisgICk7DQorDQor RUZJX1NUQVRVUw0KK0VGSUFQSQ0KK1JuZGlzVW5kaVJlc2V0ICgNCisgIElOIFBYRV9DREIgICAq Q2RiLA0KKyAgSU4gTklDX0RBVEEgICpOaWMNCisgICk7DQorDQorRUZJX1NUQVRVUw0KK0VGSUFQ SQ0KK1JuZGlzVW5ka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gKA0KKyAgSU4gRURLSUlfVVNCX0VUSEVSTkVUX1BS T1RPQ09MICAqVGhpcywNCisgIElOIFVJTlQxNiAgICAgICAgICAgICAgICAgICAgICAgVmFsdWUs DQorICBJTiBWT0lEICAgICAgICAgICAgICAgICAgICAgICAgICpNY2FzdEFkZHINCisgICk7DQor DQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK1NldFVzYlJuZGlzUG93ZXJGaWx0ZXIgKA0KKyAgSU4g RURLSUlfVVNCX0VUSEVSTkVUX1BST1RPQ09MICAqVGhpcywNCisgIElOIFVJTlQxNiAgICAgICAg ICAgICAgICAgICAgICAgVmFsdWUsDQorICBJTiBVSU5UMTYgICAgICAgICAgICAgICAgICAgICAg IExlbmd0aCwNCisgIElOIFZPSUQgICAgICAgICAgICAgICAgICAgICAgICAgKlBhdHRlcm5GaWx0 ZXINCisgICk7DQorDQorRUZJX1NUQVRVUw0KK0VGSUFQSQ0KK0dldFVzYlJuZGlzUG93ZXJGaWx0 ZXIgKA0KKyAgSU4gRURLSUlfVVNCX0VUSEVSTkVUX1BST1RPQ09MICAqVGhpcywNCisgIElOIFVJ TlQxNiAgICAgICAgICAgICAgICAgICAgICAgVmFsdWUsDQorICBJTiBCT09MRUFOICAgICAgICAg ICAgICAgICAgICAgICpQYXR0ZXJuQWN0aXZlDQorICApOw0KKw0KK0VGSV9TVEFUVVMNCitFRklB UEkNCitTZXRVc2JSbmRpc1BhY2tldEZpbHRlciAoDQorICBJTiBFREtJSV9VU0JfRVRIRVJORVRf UFJPVE9DT0wgICpUaGlzLA0KKyAgSU4gVUlOVDE2ICAgICAgICAgICAgICAgICAgICAgICBWYWx1 ZQ0KKyAgKTsNCisNCitFRklfU1RBVFVTDQorRUZJQVBJDQorR2V0Um5kaXNTdGF0aXN0aWMgKA0K KyAgSU4gRURLSUlfVVNCX0VUSEVSTkVUX1BST1RPQ09MICAqVGhpcywNCisgIElOIFVJTlQxNiAg ICAgICAgICAgICAgICAgICAgICAgVmFsdWUsDQorICBJTiBWT0lEICAgICAgICAgICAgICAgICAg ICAgICAgICpTdGF0aXN0aWMNCisgICk7DQorDQorRUZJX1NUQVRVUw0KK1JuZGlzQ29udHJvbE1z ZyAoDQorICBJTiAgVVNCX1JORElTX0RFVklDRSAgICAgICAgKlVzYlJuZGlzRGV2aWNlLA0KKyAg SU4gIFJFTU9URV9ORElTX01TR19IRUFERVIgICpSbmRpc01zZywNCisgIE9VVCBSRU1PVEVfTkRJ U19NU0dfSEVBREVSICAqUm5kaXNNc2dSZXNwb25zZQ0KKyAgKTsNCisNCitFRklfU1RBVFVTDQor Um5kaXNUcmFuc21pdERhdGFNc2cgKA0KKyAgSU4gIFVTQl9STkRJU19ERVZJQ0UgICAgICAgICpV c2JSbmRpc0RldmljZSwNCisgIElOICBSRU1PVEVfTkRJU19NU0dfSEVBREVSICAqUm5kaXNNc2cs DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgKlRyYW5zZmVyTGVuZ3RoDQorICApOw0K Kw0KK0VGSV9TVEFUVVMNCitSbmRpc1JlY2VpdmVEYXRhTXNnICgNCisgIElOICBVU0JfUk5ESVNf REVWSUNFICAgICAgICAqVXNiUm5kaXNEZXZpY2UsDQorICBJTiAgUkVNT1RFX05ESVNfTVNHX0hF QURFUiAgKlJuZGlzTXNnLA0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICpUcmFuc2Zl ckxlbmd0aA0KKyAgKTsNCisNCitWT0lEDQorUHJpbnRSbmRpc01zZyAoDQorICBJTiAgUkVNT1RF X05ESVNfTVNHX0hFQURFUiAgKlJuZGlzTXNnDQorICApOw0KKw0KKyNkZWZpbmUgUk5ESVNfTUFK T1JfVkVSU0lPTiAgICAgIDB4MDAwMDAwMDENCisjZGVmaW5lIFJORElTX01JTk9SX1ZFUlNJT04g ICAgICAweDAwMDAwMDAwDQorI2RlZmluZSBSTkRJU19NQVhfVFJBTlNGRVJfU0laRSAgMHg0MDAw DQorDQorI2RlZmluZSBSTkRJU19QQUNLRVRfTVNHICAgICAgICAgICAweDAwMDAwMDAxDQorI2Rl ZmluZSBSTkRJU19JTklUSUFMSVpFX01TRyAgICAgICAweDAwMDAwMDAyDQorI2RlZmluZSBSTkRJ U19JTklUSUFMSVpFX0NNUExUICAgICAweDgwMDAwMDAyDQorI2RlZmluZSBSTkRJU19ITFRfTVNH ICAgICAgICAgICAgICAweDAwMDAwMDAzDQorI2RlZmluZSBSTkRJU19RVUVSWV9NU0cgICAgICAg ICAgICAweDAwMDAwMDA0DQorI2RlZmluZSBSTkRJU19RVUVSWV9DTVBMVCAgICAgICAgICAweDgw MDAwMDA0DQorI2RlZmluZSBSTkRJU19TRVRfTVNHICAgICAgICAgICAgICAweDAwMDAwMDA1DQor I2RlZmluZSBSTkRJU19TRVRfQ01QTFQgICAgICAgICAgICAweDgwMDAwMDA1DQorI2RlZmluZSBS TkRJU19SRVNFVF9NU0cgICAgICAgICAgICAweDAwMDAwMDA2DQorI2RlZmluZSBSTkRJU19SRVNF VF9DTVBMVCAgICAgICAgICAweDgwMDAwMDA2DQorI2RlZmluZSBSTkRJU19JTkRJQ0FURV9TVEFU VVNfTVNHICAweDAwMDAwMDA3DQorI2RlZmluZSBSTkRJU19LRUVQQUxJVkVfTVNHICAgICAgICAw eDAwMDAwMDA4DQorI2RlZmluZSBSTkRJU19LRUVQQUxJVkVfQ01QTFQgICAgICAweDgwMDAwMDA4 DQorDQorI2RlZmluZSBSTkRJU19TVEFUVVNfU1VDQ0VTUyAgICAgICAgICAgMHgwMDAwMDAwMA0K KyNkZWZpbmUgUk5ESVNfU1RBVFVTX0ZBSUxVUkUgICAgICAgICAgIDB4QzAwMDAwMDENCisjZGVm aW5lIFJORElTX1NUQVRVU19JTlZBTElEX0RBVEEgICAgICAweEMwMDEwMDE1DQorI2RlZmluZSBS TkRJU19TVEFUVVNfTk9UX1NVUFBPUlRFRCAgICAgMHhDMDAwMDBCQg0KKyNkZWZpbmUgUk5ESVNf U1RBVFVTX01FRElBX0NP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IHRoZSByZXF1ZXN0Lg0KKyAgQHJldHZhbCBF RklfREVWSUNFX0VSUk9SICAgICAgVGhlIHJlcXVlc3QgZmFpbGVkIGR1ZSB0byBhIGRldmljZSBl cnJvci4gVGhlIHRyYW5zZmVyDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0 dXMgaXMgcmV0dXJuZWQgaW4gU3RhdHVzLg0KKyoqLw0KK0VGSV9TVEFUVVMNCitMb2FkQWxsRGVz Y3JpcHRvciAoDQorICBJTiAgRUZJX1VTQl9JT19QUk9UT0NPTCAgICAgICAgKlVzYklvLA0KKyAg T1VUIEVGSV9VU0JfQ09ORklHX0RFU0NSSVBUT1IgICoqQ29uZmlnRGVzYw0KKyAgKQ0KK3sNCisg IEVGSV9TVEFUVVMgICAgICAgICAgICAgICAgIFN0YXR1czsNCisgIFVJTlQzMiAgICAgICAgICAg ICAgICAgICAgIFRyYW5zU3RhdHVzOw0KKyAgRUZJX1VTQl9DT05GSUdfREVTQ1JJUFRPUiAgVG1w Ow0KKw0KKyAgU3RhdHVzID0gVXNiSW8tPlVzYkdldENvbmZpZ0Rlc2NyaXB0b3IgKFVzYklvLCAm VG1wKTsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgREVCVUcgKChERUJVR19F UlJPUiwgIiVhOlVzYkdldENvbmZpZ0Rlc2NyaXB0b3Igc3RhdHVzID0gJXJcbiIsIF9fRlVOQ1RJ T05fXywgU3RhdHVzKSk7DQorICAgIHJldHVybiBTdGF0dXM7DQorICB9DQorDQorICBTdGF0dXMg PSBnQlMtPkFsbG9jYXRlUG9vbCAoDQorICAgICAgICAgICAgICAgICAgRWZpQm9vdFNlcnZpY2Vz RGF0YSwNCisgICAgICAgICAgICAgICAgICBUbXAuVG90YWxMZW5ndGgsDQorICAgICAgICAgICAg ICAgICAgKFZPSUQgKiopQ29uZmlnRGVzYw0KKyAgICAgICAgICAgICAgICAgICk7DQorICBpZiAo RUZJX0VSUk9SIChT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vciAoDQorICBJTiAgICAg IEVGSV9VU0JfQ09ORklHX0RFU0NSSVBUT1IgICpEZXNjLA0KKyAgSU4gT1VUICBVSU5UTiAgICAg ICAgICAgICAgICAgICAgICAqT2Zmc2V0DQorICApDQorew0KKyAgaWYgKChEZXNjID09IE5VTEwp IHx8ICgqT2Zmc2V0ID49IERlc2MtPlRvdGFsTGVuZ3RoKSkgew0KKyAgICByZXR1cm4gRkFMU0U7 DQorICB9DQorDQorICBpZiAoKChFRklfVVNCX0NPTkZJR19ERVNDUklQVE9SICopKChjaGFyICop RGVzYysqT2Zmc2V0KSktPkxlbmd0aCA9PSAwKSB7DQorICAgIHJldHVybiBGQUxTRTsNCisgIH0N CisNCisgICpPZmZzZXQgKz0gKChFRklfVVNCX0NPTkZJR19ERVNDUklQVE9SICopKChjaGFyICop RGVzYysqT2Zmc2V0KSktPkxlbmd0aDsNCisgIGlmICggKk9mZnNldCA+PSBEZXNjLT5Ub3RhbExl bmd0aCApIHsNCisgICAgcmV0dXJuIEZBTFNFOw0KKyAgfQ0KKw0KKyAgcmV0dXJuIFRSVUU7DQor fQ0KKw0KKy8qKg0KKyAgUmVhZCBGdW5jdGlvbiBkZXNjcmlwdG9yDQorDQorICBAcGFyYW1baW5d ICBDb25maWcgICAgICAgICAgICAgQSBwb2ludGVyIHRvIGFsbCBvZiBjb25maWd1cmF0aW9uLg0K KyAgQHBhcmFtW2luXSAgRnVuRGVzY3JpcHRvclR5cGUgIFVTQiBDREMgY2xhc3MgZGVzY3JpcHRv ciBTdWJUeXBlLg0KKyAgQHBhcmFtW291dF0gRGF0YUJ1ZmZlciAgICAgICAgIEEgcG9pbnRlciB0 byB0aGUgRGF0YSBvZiBjb3JyZXNwb25kaW5nIHRvIGRldmljZSBjYXBhYmlsaXR5Lg0KKw0KKyAg QHJldHZhbCBFRklfU1VDQ0VTUyAgICAgICAgVGhlIGRldmljZSBjYXBhYmlsaXR5IGRlc2NyaXB0 b3Igd2FzIHJldHJpZXZlZA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3VjY2Vzc2Z1 bGx5Lg0KKyAgQHJldHZhbCBFRklfVU5TVVBQT1JURUQgICAgTm8gc3VwcG9ydGVkLg0KKyAgQHJl dHZhbCBFRklfTk9UX0ZPVU5EICAgICAgVGhlIGRldmljZSBjYXBhYmlsaXR5IGRlc2NyaXB0b3Ig d2FzIG5vdCBmb3VuZC4NCisNCisqKi8NCitFRklfU1RBVFVTDQorR2V0RnVuY3Rpb25hbERlc2Ny aXB0b3IgKA0KKyAgSU4gIEVGSV9VU0JfQ09ORklHX0RFU0NSSVBUT1IgICpDb25maWcsDQorICBJ TiAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgRnVuRGVzY3JpcHRvclR5cGUsDQorICBPVVQg Vk9JRCAgICAgICAgICAgICAgICAgICAgICAgKkRhdGFCdWZmZXINCisgICkNCit7DQorICBFRklf U1RBVFVTICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQorICBVSU5UTiAgICAgICAgICAgICAg ICAgICAgICAgICBPZmZzZXQ7DQorICBFRklfVVNCX0lOVEVSRkFDRV9ERVNDUklQVE9SICAqSW50 ZXJmYWNlOw0KKw0KKyAgU3RhdHVzID0gRUZJX05PVF9GT1VORDsNCisNCisgIGZvciAoT2Zmc2V0 ID0gMDsgTmV4dERlc2NyaXB0b3IgKENvbmZpZywgJk9mZnNldCk7KSB7DQorICAgIEludGVyZmFj ZSA9IChFRklfVVNCX0lOVEVSRkFDRV9ERVNDUklQVE9SICopKChVSU5UOCAqKUNvbmZpZyArIE9m ZnNldCk7DQorICAgIGlmIChJbnRlcmZhY2UtPkRlc2NyaXB0b3JUeXBlID09IENTX0lOVEVSRkFD RSkgew0KKyAgICAgIGlmICgoKFVTQl9IRUFERVJfRlVOX0RFU0NSSVBUT1IgKilJbnRlcmZhY2Up LT5EZXNjcmlwdG9yU3VidHlwZSA9PSBGdW5EZXNjcmlwdG9yVHlwZSkgew0KKyAgICAgICAgc3dp dGNoIChGdW5EZXNjcmlwdG9yVHlwZSkgew0KKyAgICAgICAgICBjYXNlIEhFQURFUl9GVU5fREVT Q1JJUFRPUjoNCisgICAgICAgICAgICBDb3B5TWVtICgNCisgICAgICAgICAgICAgIERhdGFCdWZm ZXIsDQorICAgICAgICAgICAgICAoVVNCX0hFQURFUl9GVU5fREVTQ1JJUFRPUiAqKUludGVyZmFj ZSwNCisgICAgICAgICAgICAgIHNpemVvZiAoVVNCX0hFQURFUl9GVU5fREVTQ1JJUFRPUikNCisg ICAgICAgICAgICAgICk7DQorICAgICAgICAgICAgcmV0dXJuIEVGSV9TVUNDRVNTOw0KKyAgICAg ICAgICBjYXNlIFVOSU9OX0ZVTl9ERVNDUklQVE9SOg0KKyAgICAgICAgICAgIENvcHlNZW0gKA0K KyAgICAgICAgICAgICAgRGF0YUJ1ZmZlciwNCisgICAgICAgICAgICAgIChVU0JfVU5JT05fRlVO X0RFU0NSSVBUT1IgKilJbnRlcmZhY2UsDQorICAgICAgICAgICAgICAoKFVTQl9VTklPTl9GVU5f REVTQ1JJUFRPUiAqKUludGVyZmFjZSktPkZ1bmN0aW9uTGVuZ3RoDQorICAgICAgICAgICAgICAp Ow0KKyAgICAgICAgICAgIHJldHVybiBFRklfU1VDQ0VTUzsNCisgICAgICAgICAgY2FzZSBFVEhF Uk5FVF9GVU5fREVTQ1JJUFRPUjoNCisgICAgICAgICAgICBDb3B5TWVtICgNCisgICAgICAgICAg ICAgIERhdGFCdWZmZXIsDQorICAgICAgICAgICAgICAoVVNCX0VUSEVSTkVUX0ZVTl9ERVNDUklQ VE9SICopSW50ZXJmYWNlLA0KKyAgICAgICAgICAgICAgc2l6ZW9mIChVU0JfRVRIRVJORVRfRlVO X0RFU0NSSVBUT1IpDQorICAgICAgICAgICAgICApOw0KKyAgICAgICAgICAgIHJldHVybiBFRklf U1VDQ0VTUzsNCisgICAgICAgICAgZGVmYXVsdDoNCisgICAgICAgICAgICBTdGF0dXMgPSBFRklf VU5TVVBQT1JURUQ7DQorICAgICAgICAgICAgYnJlYWs7DQorICAgICAgICB9DQorICAgICAgfQ0K KyAgICB9DQorICB9DQorDQorICByZXR1cm4gU3RhdHVzOw0KK30NCisNCisvKioNCisgIEdldCBV U0IgRXRoZXJuZXQgSU8gZW5kcG9pbnQgYW5kIFVTQiBDREMgZGF0YSBJTyBlbmRwb2ludC4NCisN CisgIEBwYXJhbVtpbl0gICAgICBVc2JJbyAgICAgICAgICAgQSBwb2ludGVyIHRvIHRoZSBFRklf VVNCX0lPX1BST1RPQ09MIGluc3RhbmNlLg0KKyAgQHBhcmFtW2luLCBvdXRdIFVzYlJuZGlzRGV2 aWNlICBBIHBvaW50ZXIgdG8gdGhlIFVTQl9STkRJU19ERVZJQ0UgaW5zdGFuY2UuDQorDQorKiov DQorVk9JRA0KK0dldEVuZHBvaW50ICgNCisgIElOICAgICAgRUZJX1VTQl9JT19QUk9UT0NPTCAg KlVzYklvLA0KKyAgSU4gT1VUICBVU0JfUk5ESVNfREVWSUNFICAgICAqVXNiUm5kaXNEZXZpY2UN CisgICkNCit7DQorICBFRklfU1RBVFVTICAgICAgICAgICAgICAgICAgICBTdGF0dXM7DQorICBV SU5UOCAgICAgICAgICAgICAgICAgICAgICAgICBJbmRleDsNCisgIFVJTlQzMiAgICAgICAgICAg ICAgICAgICAgICAgIFJlc3VsdDsNCisgIEVGSV9VU0JfSU5URVJGQUNFX0RFU0NSSVBUT1IgIElu dGVyZmFjZTsNCisgIEVGSV9VU0JfRU5EUE9JTlRfREVTQ1JJUFRPUiAgIEVuZHBvaW50Ow0KKw0K KyAgU3RhdHVzID0gVXNiSW8tPlVzYkdldEludGVyZmFjZURlc2NyaXB0b3IgKFVzYklvLCAmSW50 ZXJmYWNlKTsNCisgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCisgICAgREVCVUcgKChERUJV R19FUlJPUiwgIiVhOlVzYkdldEludGVyZmFjZURlc2NyaXB0b3Igc3RhdHVzID0gJXJcbiIsIF9f RlVOQ1RJT05fXyw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UgYSBVU0IgZGV2aWNlIHdpdGggYW4gaW50ZXJydXB0 IHRyYW5zZmVyIHBpcGUuDQorDQorICBAcGFyYW1baW5dICBUaGlzICAgICAgICAgICAgICBBIHBv aW50ZXIgdG8gdGhlIEVES0lJX1VTQl9FVEhFUk5FVF9QUk9UT0NPTCBpbnN0YW5jZS4NCisgIEBw YXJhbVtpbl0gIElzTmV3VHJhbnNmZXIgICAgIElmIFRSVUUsIGEgbmV3IHRyYW5zZmVyIHdpbGwg YmUgc3VibWl0dGVkIHRvIFVTQiBjb250cm9sbGVyLiBJZg0KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgRkFMU0UsIHRoZSBpbnRlcnJ1cHQgdHJhbnNmZXIgaXMgZGVsZXRlZCBmcm9t IHRoZSBkZXZpY2UncyBpbnRlcnJ1cHQNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IHRyYW5zZmVyIHF1ZXVlLg0KKyAgQHBhcmFtW2luXSAgUG9sbGluZ0ludGVydmFsICAgSW5kaWNh dGVzIHRoZSBwZXJpb2RpYyByYXRlLCBpbiBtaWxsaXNlY29uZHMsIHRoYXQgdGhlIHRyYW5zZmVy IGlzIHRvIGJlDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBleGVjdXRlZC5UaGlz IHBhcmFtZXRlciBpcyByZXF1aXJlZCB3aGVuIElzTmV3VHJhbnNmZXIgaXMgVFJVRS4gVGhlDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YWx1ZSBtdXN0IGJlIGJldHdlZW4gMSB0 byAyNTUsIG90aGVyd2lzZSBFRklfSU5WQUxJRF9QQVJBTUVURVIgaXMgcmV0dXJuZWQuDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGUgdW5pdHMgYXJlIGluIG1pbGxpc2Vjb25k cy4NCisgIEBwYXJhbVtpbl0gIFJlcXVlc3QgICAgICAgICAgIEEgcG9pbnRlciB0byB0aGUgRUZJ X1VTQl9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T5Vc2JJby0+VXNiQXN5bmNJbnRlcnJ1cHRUcmFuc2ZlciAo DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNiUm5kaXNEZXZp Y2UtPlVzYklvLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVz YlJuZGlzRGV2aWNlLT5JbnRlcnJ1cEVuZHBvaW50LA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIElzTmV3VHJhbnNmZXIsDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgUG9sbGluZ0ludGVydmFsLA0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIERhdGFMZW5ndGgsDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgSW50ZXJydXB0Q2FsbGJhY2ssDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVxdXN0DQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisNCisgICAgaWYgKFN0YXR1cyA9PSBFRklfSU5W QUxJRF9QQVJBTUVURVIpIHsNCisgICAgICAvLyBCZWNhdXNlIG9mIFN0YWNrZWQgQXN5bmNJbnRl cnJ1cHQgcmVxdWVzdCBhcmUgbm90IHN1cHBvcnRlZA0KKyAgICAgIFN0YXR1cyA9IFVzYlJuZGlz RGV2aWNlLT5Vc2JJby0+VXNiQXN5bmNJbnRlcnJ1cHRUcmFuc2ZlciAoDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVzYlJuZGlzRGV2aWNlLT5Vc2JJbywNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNiUm5kaXNEZXZpY2UtPkludGVy cnVwRW5kcG9pbnQsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAs DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQorICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQorICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIE5VTEwsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIE5VTEwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg KTsNCisgICAgfQ0KKyAgfSBlbHNlIHsNCisgICAgU3RhdHVzID0gVXNiUm5kaXNEZXZpY2UtPlVz YklvLT5Vc2JBc3luY0ludGVycnVwdFRyYW5zZmVyICgNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIFVzYlJuZGlzRGV2aWNlLT5Vc2JJbywNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIFVzYlJuZGlzRGV2aWNlLT5JbnRlcnJ1cEVuZHBvaW50LA0K KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSXNOZXdUcmFuc2ZlciwNCisg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQorICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAwLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgTlVMTCwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5V TEwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorICB9DQorDQor ICByZXR1cm4gU3RhdHVzOw0KK30NCisNCisvKioNCisgIFRoaXMgZnVuY3Rpb24gaXMgdXNlZCB0 byByZWFkIFVTQiBpbnRlcnJ1cHQgdHJhbnNmZXIgYmVmb3JlIHRoZSByZXNwb25zZSBSTkRJUyBt ZXNzYWdlLg0KKw0KKyAgQHBhcmFtW2luXSAgVGhpcyAgICAgICAgICAgICAgQSBwb2ludGVyIHRv IHRoZSBVU0JfUk5ESVNfREVWSUNFIGluc3RhbmNlLg0KKw0KKyAgQHJldHZhbCBFRklfU1VDQ0VT UyAgICAgICAgICAgVGhlIFVTQiBpbnRlcnJ1cHQgdHJhbnNmZXIgaGFzIGJlZW4gc3VjY2Vzc2Z1 bGx5IGV4ZWN1dGVkLg0KKyAgQHJldHZhbCBFRklfREVWSUNFX0VSUk9SICAgICAgVGhlIFVTQiBp bnRlcnJ1cHQgdHJhbnNmZXIgZmFpbGVkLg0KKw0KKyoqLw0KK0VGSV9TVEFUVVMNCitFRklBUEkN CitSZWFkUm5kaXNSZXNwb25zZUludGVycnVwdCAoDQorICBJTiBVU0JfUk5ESVNfREVWSUNFICAq VXNiUm5kaXNEZXZpY2UNCisgICkNCit7DQorICBFRklfU1RBVFVTICBTdGF0dXM7DQorICBVSU5U MzIgICAgICBEYXRhWzJdOw0KKyAgVUlOVDMyICAgICAgVXNiU3RhdHVzOw0KKyAgVUlOVE4gICAg ICAgRGF0YUxlbmd0aDsNCisNCisgIERhdGFMZW5ndGggPSA4Ow0KKw0KKyAgWmVyb01lbSAoRGF0 YSwgc2l6ZW9mIChEYXRhKSk7DQorDQorICBTdGF0dXMgPSBVc2JSbmRpc0RldmljZS0+VXNiSW8t PlVzYlN5bmNJbnRlcnJ1cHRUcmFuc2ZlciAoDQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgVXNiUm5kaXNEZXZpY2UtPlVzYklvLA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFVzYlJuZGlzRGV2aWNlLT5JbnRlcnJ1cEVuZHBvaW50LA0KKyAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZEYXRhLA0KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZEYXRhTGVuZ3RoLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIDB4MjAsDQorICAgICAgICAgICAgICAgICAgICAgICAgIC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NjcmlwdG9yDQorICBTdGF0dXMgPSBUaGlzLT5Vc2JFdGhGdW5EZXNj cmlwdG9yIChUaGlzLCAmVXNiRXRoRGVzY3JpcHRvcik7DQorICBpZiAoRUZJX0VSUk9SIChTdGF0 dXMpKSB7DQorICAgIERFQlVHICgoREVCVUdfRVJST1IsICIlYTpVc2JFdGhGdW5EZXNjcmlwdG9y IHN0YXR1cyA9ICVyXG4iLCBfX0ZVTkNUSU9OX18sIFN0YXR1cykpOw0KKyAgICByZXR1cm4gU3Rh dHVzOw0KKyAgfQ0KKw0KKyAgU3RhdHVzID0gVXNiUm5kaXNEZXZpY2UtPlVzYklvLT5Vc2JHZXRT dHJpbmdEZXNjcmlwdG9yICgNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBV c2JSbmRpc0RldmljZS0+VXNiSW8sDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgMHg0MDksICAgICAgICAgICAgICAgICAgICAgICAvLyBFbmdsaXNoLVVTIExhbmd1YWdlIElE DQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNiRXRoRGVzY3JpcHRvci5N YWNBZGRyZXNzLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZEYXRhDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCisgIGlmIChFRklfRVJST1Ig KFN0YXR1cykpIHsNCisgICAgREVCVUcgKChERUJVR19FUlJPUiwgIiVhOlVzYkdldFN0cmluZ0Rl c2NyaXB0b3Igc3RhdHVzID0gJXJcbiIsIF9fRlVOQ1RJT05fXywgU3RhdHVzKSk7DQorICAgIHJl dHVybiBTdGF0dXM7DQorICB9DQorDQorICBEYXRhUHRyID0gRGF0YTsNCisgIGZvciAoSW5kZXgg PSAwOyBJbmRleCA8IFBYRV9IV0FERFJfTEVOX0VUSEVSOyBJbmRleCsrKSB7DQorICAgIENvcHlN ZW0gKFRtcFN0ciwgRGF0YVB0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M7DQorICB9DQor DQorICBpZiAoKFVzYkV0aEZ1bkRlc2NyaXB0b3IuTnVtYmVyTWNGaWx0ZXJzIDw8IDEpID09IDAp IHsNCisgICAgcmV0dXJuIEVGSV9VTlNVUFBPUlRFRDsNCisgIH0NCisNCisgIFJlcXVlc3QuUmVx dWVzdFR5cGUgPSBVU0JfRVRIRVJORVRfU0VUX1JFUV9UWVBFOw0KKyAgUmVxdWVzdC5SZXF1ZXN0 ICAgICA9IFNFVF9FVEhfTVVMVElDQVNUX0ZJTFRFUlNfUkVROw0KKyAgUmVxdWVzdC5WYWx1ZSAg ICAgICA9IFZhbHVlOw0KKyAgUmVxdWVzdC5JbmRleCAgICAgICA9IFVzYlJuZGlzRGV2aWNlLT5O dW1PZkludGVyZmFjZTsNCisgIFJlcXVlc3QuTGVuZ3RoICAgICAgPSBWYWx1ZSAqIDY7DQorDQor ICByZXR1cm4gVXNiUm5kaXNEZXZpY2UtPlVzYklvLT5Vc2JDb250cm9sVHJhbnNmZXIgKA0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVc2JSbmRpc0RldmljZS0+VXNiSW8sDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZSZXF1ZXN0LA0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBFZmlVc2JEYXRhT3V0LA0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBVU0JfRVRIRVJORVRfVFJBTlNGRVJfVElNRU9VVCwNCisgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgTWNhc3RBZGRyLA0KKyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBSZXF1ZXN0Lkxlbmd0aCwNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgJlRyYW5zU3RhdHVzDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICk7DQorfQ0KKw0KKy8qKg0KKyAgVGhpcyByZXF1ZXN0IHNldHMg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UZJX1NUQVRV Uw0KK0VGSUFQSQ0KK1NldFVzYlJuZGlzUG93ZXJGaWx0ZXIgKA0KKyAgSU4gRURLSUlfVVNCX0VU SEVSTkVUX1BST1RPQ09MICAqVGhpcywNCisgIElOIFVJTlQxNiAgICAgICAgICAgICAgICAgICAg ICAgVmFsdWUsDQorICBJTiBVSU5UMTYgICAgICAgICAgICAgICAgICAgICAgIExlbmd0aCwNCisg IElOIFZPSUQgICAgICAgICAgICAgICAgICAgICAgICAgKlBhdHRlcm5GaWx0ZXINCisgICkNCit7 DQorICBFRklfVVNCX0RFVklDRV9SRVFVRVNUICBSZXF1ZXN0Ow0KKyAgVUlOVDMyICAgICAgICAg ICAgICAgICAgVHJhbnNTdGF0dXM7DQorICBVU0JfUk5ESVNfREVWSUNFICAgICAgICAqVXNiUm5k aXNEZXZpY2U7DQorDQorICBVc2JSbmRpc0RldmljZSA9IFVTQl9STkRJU19ERVZJQ0VfRlJPTV9U SElTIChUaGlzKTsNCisNCisgIFJlcXVlc3QuUmVxdWVzdFR5cGUgPSBVU0JfRVRIRVJORVRfU0VU X1JFUV9UWVBFOw0KKyAgUmVxdWVzdC5SZXF1ZXN0ICAgICA9IFNFVF9FVEhfUE9XRVJfTUFOQUdF TUVOVF9QQVRURVJOX0ZJTFRFUl9SRVE7DQorICBSZXF1ZXN0LlZhbHVlICAgICAgID0gVmFsdWU7 DQorICBSZXF1ZXN0LkluZGV4ICAgICAgID0gVXNiUm5kaXNEZXZpY2UtPk51bU9mSW50ZXJmYWNl Ow0KKyAgUmVxdWVzdC5MZW5ndGggICAgICA9IExlbmd0aDsNCisNCisgIHJldHVybiBVc2JSbmRp c0RldmljZS0+VXNiSW8tPlVzYkNvbnRyb2xUcmFuc2ZlciAoDQorICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIFVzYlJuZGlzRGV2aWNlLT5Vc2JJbywNCisgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgJlJlcXVlc3QsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIEVmaVVzYkRhdGFPdXQsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFVTQl9FVEhFUk5FVF9UUkFOU0ZFUl9USU1FT1VULA0KKyAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBQYXR0ZXJuRmlsdGVyLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBMZW5ndGgsDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZUcmFuc1N0 YXR1cw0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KK30NCisNCisvKioN CisgIFRoaXMgcmVxdWVzdCByZXRyaWV2ZXMgdGhlIHN0YXR1cyBvZiB0aGUgc3BlY2lmaWVkIEV0 aGVybmV0IHBvd2VyIG1hbmFnZW1lbnQNCisgIHBhdHRlcm4gZmlsdGVyIGZyb20gdGhlIGRldmlj ZS4NCisNCisgIEBwYXJhbVtpbl0gIFRoaXMgICAgICAgICAgICAgICAgICAgQSBwb2ludGVyIHRv IHRoZSBFREtJSV9VU0JfRVRIRVJORVRfUFJPVE9DT0wgaW5zdGFuY2UuDQorICBAcGFyYW1baW5d ICBWYWx1ZSAgICAgICAgICAgICAgICAgIFRoZSBmaWx0ZXIgbnVtYmVyLg0KKyAgQHBhcmFtW291 dF0gUGF0dGVybkFjdGl2ZSAgICAgICAgICBBIHBvaW50ZXIgdG8gdGhlIHBhdHRlcm4gYWN0aXZl IGJvb2xlYW4uDQorDQorICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgVGhlIHJlcXVl c3QgZXhlY3V0ZWQgc3VjY2Vzc2Z1bGx5Lg0KKyAgQHJldHZhbCBFRklfVElNRU9VVCAgICAgICAg ICAgIEEgdGltZW91dCBvY2N1cnJlZCBleGVjdXRpbmcgdGhlIHJlcXVlc3QuDQorICBAcmV0dmFs IEVGSV9ERVZJQ0VfRVJST1IgICAgICAgVGhlIHJ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CisgIHJldHVybiBVc2JSbmRpc0RldmljZS0+VXNiSW8tPlVzYkNvbnRyb2xUcmFuc2Zl ciAoDQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVzYlJuZGlzRGV2aWNlLT5V c2JJbywNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlJlcXVlc3QsDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVmaVVzYkRhdGFJbiwNCisgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgVVNCX0VUSEVSTkVUX1RSQU5TRkVSX1RJTUVPVVQsDQor ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBhdHRlcm5BY3RpdmUsDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFVTQl9FVEhfUE9XRVJfRklMVEVSX0xFTkdUSCwN CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlRyYW5zU3RhdHVzDQorICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorfQ0KKw0KKy8qKg0KKw0KKyAgQ29udmVy dHMgUFhFIGZpbHRlciBzZXR0aW5ncyB0byBSTkRJUyB2YWx1ZXMNCisNCisgIEBwYXJhbVtpbl0g IFZhbHVlICAgICAgUFhFIGZpbHRlciBkYXRhLg0KKyAgQHBhcmFtW291dF0gQ2RjRmlsdGVyICBB IHBvaW50ZXIgdG8gdGhlIEV0aGVybmV0IFBhY2tldCBGaWx0ZXIgQml0bWFwIHZhbHVlIGNvbnZl cnRlZCBieSBQWEVfT1BGTEFHUy4NCisNCisqKi8NCitWT0lEDQorQ29udmVydEZpbHRlciAoDQor ICBJTiAgVUlOVDE2ICBWYWx1ZSwNCisgIE9VVCBVSU5UMTYgICpDZGNGaWx0ZXINCisgICkNCit7 DQorICBVSU5UMzIgICAgICAgICAgICAgICAgIEluZGV4Ow0KKyAgVUlOVDMyICAgICAgICAgICAg ICAgICBDb3VudDsNCisgIHN0YXR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wdG9yIGJsb2NrLg0KKyAgQHBh cmFtW2luXSAgTmljICBBIHBvaW50ZXIgdG8gdGhlIE5ldHdvcmsgaW50ZXJmYWNlIGNvbnRyb2xs ZXIgZGF0YS4NCisNCisgIEByZXR2YWwgRUZJX1NUQVRVUw0KKw0KKyoqLw0KK0VGSV9TVEFUVVMN CitFRklBUEkNCitSbmRpc1VuZGlSZWNlaXZlRmlsdGVyICgNCisgIElOICBQWEVfQ0RCICAgKkNk YiwNCisgIElOICBOSUNfREFUQSAgKk5pYw0KKyAgKQ0KK3sNCisgIEVGSV9TVEFUVVMgICAgICAg ICAgICAgICAgICAgU3RhdHVzOw0KKyAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAqTWNh c3RMaXN0Ow0KKyAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICBDb3VudDsNCisgIFVJTlQ4 ICAgICAgICAgICAgICAgICAgICAgICAgSW5kZXgxOw0KKyAgVUlOVDggICAgICAgICAgICAgICAg ICAgICAgICBJbmRleDI7DQorICBVSU5UNjQgICAgICAgICAgICAgICAgICAgICAgIENwYkFkZHI7 DQorICBVSU5UMzIgICAgICAgICAgICAgICAgICAgICAgIENwYlNpemU7DQorICBVSU5UMTYgICAg ICAgICAgICAgICAgICAgICAgIFNldEZpbHRlcjsNCisgIFBYRV9DUEJfUkVDRUlWRV9GSUxURVJT ICAgICAgKkNwYjsNCisgIFVTQl9FVEhFUk5FVF9GVU5fREVTQ1JJUFRPUiAgVXNiRXRoRnVuRGVz Y3JpcHRvcjsNCisNCisgIENvdW50ICAgICA9IDA7DQorICBDcGJBZGRyICAgPSBDZGItPkNQQmFk ZHI7DQorICBDcGJTaXplICAgPSBDZGItPkNQQnNpemU7DQorICBTZXRGaWx0ZXIgPSAoVUlOVDE2 KShDZGItPk9wRmxhZ3MgJiAweDFGKTsNCisgIENwYiAgICAgICA9IChQWEVfQ1BCX1JFQ0VJVkVf RklMVEVSUyAqKShVSU5UTilDcGJBZGRyOw0KKw0KKyA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ZmlCb290U2Vy dmljZXNEYXRhLCBOaWMtPk1jYXN0Q291bnQgKiA2LCAoVk9JRCAqKikmTWNhc3RMaXN0KTsNCisg ICAgICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQorICAgICAgICByZXR1cm4gUFhFX1NUQVRD T0RFX0lOVkFMSURfUEFSQU1FVEVSOw0KKyAgICAgIH0NCisNCisgICAgICBpZiAoQ3BiICE9IE5V TEwpIHsNCisgICAgICAgIGZvciAoSW5kZXgxID0gMDsgSW5kZXgxIDwgTmljLT5NY2FzdENvdW50 OyBJbmRleDErKykgew0KKyAgICAgICAgICBmb3IgKEluZGV4MiA9IDA7IEluZGV4MiA8IDY7IElu ZGV4MisrKSB7DQorICAgICAgICAgICAgTWNhc3RMaXN0W0NvdW50KytdID0gQ3BiLT5NQ2FzdExp c3RbSW5kZXgxXVtJbmRleDJdOw0KKyAgICAgICAgICB9DQorICAgICAgICB9DQorICAgICAgfQ0K Kw0KKyAgICAgIE5pYy0+UnhGaWx0ZXIgfD0gUFhFX09QRkxBR1NfUkVDRUlWRV9GSUxURVJfRklM VEVSRURfTVVMVElDQVNUOw0KKyAgICAgIGlmIChDcGIgIT0gTlVMTCkgew0KKyAgICAgICAgTmlj LT5Vc2JFdGgtPlNldFVzYkV0aE1jYXN0RmlsdGVyIChOaWMtPlVzYkV0aCwgTmljLT5NY2FzdENv dW50LCBNY2FzdExpc3QpOw0KKyAgICAgIH0NCisNCisgICAgICBOaWMtPlVzYkV0aC0+U2V0VXNi RXRoUGFja2V0RmlsdGVyIChOaWMtPlVzYkV0aCwgTmljLT5SeEZpbHRlcik7DQorICAgICAgRnJl ZVBvb2wgKE1jYXN0TGlzdCk7DQorICAgIH0NCisgIH0NCisNCisgIHJldHVybiBFRklfU1VDQ0VT UzsNCit9DQorDQorLyoqDQorICBUaGlzIHJlcXVlc3QgaXMgdXNlZCB0byBjb25maWd1cmUgZGV2 aWNlIEV0aGVybmV0IHBhY2tldCBmaWx0ZXIgc2V0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RvIFVTQg0KKyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlIG9yIHJlY2VpdmVkIGZyb20gVVNCIGRl dmljZS4NCisgIEBwYXJhbVtpbiwgb3V0XSBEYXRhTGVuZ3RoICAgIEEgcG9pbnRlciB0byB0aGUg UGFja2V0TGVuZ3RoLg0KKw0KKyAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAgVGhlIHJlcXVlc3Qg ZXhlY3V0ZWQgc3VjY2Vzc2Z1bGx5Lg0KKw0KKyoqLw0KK0VGSV9TVEFUVVMNCitFRklBUEkNCitS bmRpc1VuZGlUcmFuc21pdCAoDQorICBJTiAgICAgIFBYRV9DREIgICAgICAgICAgICAgICAgICAg ICAgKkNkYiwNCisgIElOICAgICAgRURLSUlfVVNCX0VUSEVSTkVUX1BST1RPQ09MICAqVGhpcywN CisgIElOICAgICAgVk9JRCAgICAgICAgICAgICAgICAgICAgICAgICAqQnVsa091dERhdGEsDQor ICBJTiBPVVQgIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgKkRhdGFMZW5ndGgNCisgICkN Cit7DQorICBFRklfU1RBVFVTICAgICAgICAgICAgICBTdGF0dXM7DQorICBVU0JfUk5ESVNfREVW SUNFICAgICAgICAqVXNiUm5kaXNEZXZpY2U7DQorICBSRU1PVEVfTkRJU19QQUNLRVRfTVNHICAq Um5kaXNQYWNrZXRNc2c7DQorICBVSU5UTiAgICAgICAgICAgICAgICAgICBUcmFuc2Zlckxlbmd0 aDsNCisNCisgIERFQlVHICgoREVCVUdfSU5GTywgIlJuZGlzVW5kaVRyYW5zbWl0IERhdGFMZW5n dGggOiAleFxuIiwgKkRhdGFMZW5ndGgpKTsNCisNCisgIFVzYlJuZGlzRGV2aWNlID0gVVNCX1JO RElTX0RFVklDRV9GUk9NX1RISVMgKFRoaXMpOw0KKw0KKyAgUm5kaXNQYWNrZXRNc2cgPSBBbGxv Y2F0ZVplcm9Qb29sIChzaXplb2YgKFJFTU9URV9ORElT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l2ZSAoDQorICBJTiAgICAgUFhFX0NEQiAgICAgICAgICAgICAgICAgICAgICAqQ2RiLA0K KyAgSU4gICAgIEVES0lJX1VTQl9FVEhFUk5FVF9QUk9UT0NPTCAgKlRoaXMsDQorICBJTiBPVVQg Vk9JRCAgICAgICAgICAgICAgICAgICAgICAgICAqQnVsa0luRGF0YSwNCisgIElOIE9VVCBVSU5U TiAgICAgICAgICAgICAgICAgICAgICAgICpEYXRhTGVuZ3RoDQorICApDQorew0KKyAgRUZJX1NU QVRVUyAgICAgICAgICAgICAgU3RhdHVzOw0KKyAgVVNCX1JORElTX0RFVklDRSAgICAgICAgKlVz YlJuZGlzRGV2aWNlOw0KKyAgUkVNT1RFX05ESVNfUEFDS0VUX01TRyAgKlJuZGlzUGFja2V0TXNn Ow0KKyAgVUlOVE4gICAgICAgICAgICAgICAgICAgVHJhbnNmZXJMZW5ndGg7DQorICBWT0lEICAg ICAgICAgICAgICAgICAgICAqQnVmZmVyOw0KKyAgUEFDS0VUX0xJU1QgICAgICAgICAgICAgKkhl YWRQYWNrZXQ7DQorICBQQUNLRVRfTElTVCAgICAgICAgICAgICAqUGFja2V0TGlzdDsNCisNCisg IC8vIENoZWNrIGlmIHRoZXJlIGlzIGFueSBvdXRzdGFuZGluZyBwYWNrZXQgdG8gcmVjZWl2ZQ0K KyAgLy8gVGhlIGJ1ZmZlciBhbGxvY2F0ZWQgaGFzIGEgbGlua2VkIExpc3QgZm9sbG93ZWQgYnkg dGhlIHBhY2tldC4NCisNCisgIFVzYlJuZGlzRGV2aWNlID0gVVNCX1JORElTX0RFVklDRV9GUk9N X1RISVMgKFRoaXMpOw0KKyAgQnVmZmVyICAgICAgICAgPSBOVUxMOw0KKyAgSGVhZFBhY2tldCAg ICAgPSBOVUxMOw0KKw0KKyAgd2hpbGUgKDEpIHsNCisgICAgQnVmZmVyID0gQWxsb2NhdGVaZXJv UG9vbCAoc2l6ZW9mIChQQUNLRVRfTElTVCkgKyBzaXplb2YgKFJFTU9URV9ORElTX1BBQ0tFVF9N U0cpICsgVXNiUm5kaXNEZXZpY2UtPk1heFRyYW5zZmVyU2l6ZSk7DQorICAgIGlmIChCdWZmZXIg PT0gTlVMTCkgew0KKyAgICAgIHJldHVybiBFRklfT1VUX09GX1JFU09VUkNFUzsNCisgICAgfQ0K Kw0KKyAgICBSbmRpc1BhY2tldE1zZyAgICAgICAgICAgICAgICA9IChSRU1PVEVfTkRJU19QQUNL RVRfTVNHICopKHNpemVvZiAoUEFDS0VUX0xJU1QpICsgKFVJTlQ4ICopQnVmZmVyKTsNCisgICAg UGFja2V0TGlzdCAgICAgICAgICAgICAgICAgICAgPSAoUEFDS0VUX0xJU1QgKilCdWZmZXI7DQor ICAgIFBhY2tldExpc3QtPlBhY2tldFN0YXJ0QnVmZmVyID0gKFVJTlQ4ICopQnVmZmVyICsgc2l6 ZW9mIChQQUNLRVRfTElTVCk7DQorICAgIC8vIFNhdmUgdGhlIG9yaWdpbmFsIGFkZHJlc3MgZm9y IGZyZWVpbmcgaXQgdXANCisgICAgUGFja2V0TGlzdC0+T3JnQnVmZmVyID0gKFVJTlQ4ICopQnVm ZmVyOw0KKyAgICBUcmFuc2Zlckxlbmd0aCAgICAgICAgPSBVc2JSbmRpc0RldmljZS0+TWF4VHJh bnNmZXJTaXplOw0KKw0KKyAgICBTdGF0dXMgPSBSbmRpc1JlY2VpdmVEYXRhTXNnICgNCisgICAg ICAgICAgICAgICBVc2JSbmRpc0RldmljZSwNCisgICAgICAgICAgICAgICAoUkVNT1RFX05ESVNf TVNHX0hFQURFUiAqKVJuZGlzUGFja2V0TXNnLA0KKyAgICAgICAgICAgICAgICZUcmFuc2Zlckxl bmd0aA0KKyAgICAgICAgICAgICAgICk7DQorDQorICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykg fHwgKFRyYW5zZmVyTGVuZ3RoID09IDApKSB7DQorICAgICAgRnJlZVBvb2wgKEJ1ZmZlcik7DQor ICAgICAgYnJlYWs7DQorICAgIH0NCisNCisgIC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gICkNCit7DQorICBERUJVRyAoKERFQlVHX0lORk8sICJS bmRpc0R1bW15UmV0dXJuIGNhbGxlZFxuIikpOw0KKyAgcmV0dXJuIEVGSV9TVUNDRVNTOw0KK30N CisNCisvKioNCisgIFRoaXMgZnVuY3Rpb24gc2VuZCB0aGUgUk5ESVMgY29tbWFuZCB0aHJvdWdo IHRoZSBkZXZpY2UncyBjb250cm9sIGVuZHBvaW50DQorDQorICBAcGFyYW1baW5dICBVc2JSbmRp c0RldmljZSAgICBBIHBvaW50ZXIgdG8gdGhlIFVTQl9STkRJU19ERVZJQ0UgaW5zdGFuY2UuDQor ICBAcGFyYW1baW5dICBSbmRpc01zZyAgICAgICAgICBBIHBvaW50ZXIgdG8gdGhlIFJFTU9URV9O RElTX01TR19IRUFERVIgZGF0YS4NCisgIEBwYXJhbVtvdXRdIFJuZGlzTXNnUmVzcG9uc2UgIEEg cG9pbnRlciB0byB0aGUgUkVNT1RFX05ESVNfTVNHX0hFQURFUiBkYXRhIGZvciBnZXR0aW5nIHJl c3BvbnNlcy4NCisNCisgIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgIFRoZSBidWxrIHRy YW5zZmVyIGhhcyBiZWVuIHN1Y2Nlc3NmdWxseSBleGVjdXRlZC4NCisNCisqKi8NCitFRklfU1RB VFVTDQorUm5kaXNDb250cm9sTXNnICgNCisgIElOICBVU0JfUk5ESVNfREVWSUNFICAgICAgICAq VXNiUm5kaXNEZXZpY2UsDQorICBJTiAgUkVNT1RFX05ESVNfTVNHX0hFQURFUiAgKlJuZGlzTXNn LA0KKyAgT1VUIFJFTU9URV9ORElTX01TR19IRUFERVIgICpSbmRpc01zZ1Jlc3BvbnNlDQorICAp DQorew0KKyAgRUZJX1VTQl9JT19QUk9UT0NPTCAgICAgICAgICAgKlVzYklvID0gVXNiUm5kaXNE ZXZpY2UtPlVzYklvOw0KKyAgRUZJX1VTQl9ERVZJQ0VfUkVRVUVTVCAgICAgICAgRGV2UmVxOw0K KyA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VuZ3RoICAgICAgPSAoVUlOVDE2KVJuZGlzTXNnLT5N ZXNzYWdlTGVuZ3RoOw0KKw0KKyAgUHJpbnRSbmRpc01zZyAoUm5kaXNNc2cpOw0KKw0KKyAgU3Rh dHVzID0gVXNiSW8tPlVzYkNvbnRyb2xUcmFuc2ZlciAoDQorICAgICAgICAgICAgICAgICAgICBV c2JJbywNCisgICAgICAgICAgICAgICAgICAgICZEZXZSZXEsDQorICAgICAgICAgICAgICAgICAg ICBFZmlVc2JEYXRhT3V0LA0KKyAgICAgICAgICAgICAgICAgICAgVVNCX0VUSEVSTkVUX1RSQU5T RkVSX1RJTUVPVVQsDQorICAgICAgICAgICAgICAgICAgICBSbmRpc01zZywNCisgICAgICAgICAg ICAgICAgICAgIFJuZGlzTXNnLT5NZXNzYWdlTGVuZ3RoLA0KKyAgICAgICAgICAgICAgICAgICAg JlVzYlN0YXR1cw0KKyAgICAgICAgICAgICAgICAgICAgKTsNCisNCisgIERFQlVHICgoREVCVUdf SU5GTywgIlJuZGlzQ29udHJvbE1zZzogVXNiU3RhdHVzIDogJXggU3RhdHVzIDogJXIgUm5kaXNN c2dSZXNwb25zZSA6ICVseFxuIiwgVXNiU3RhdHVzLCBTdGF0dXMsIFJuZGlzTXNnUmVzcG9uc2Up KTsNCisNCisgIC8vIEVycm9yIG9yIG5vIHJlc3BvbnNlIGV4cGVjdGVkDQorICBpZiAoKEVGSV9F UlJPUiAoU3RhdHVzKSkgfHwgKFJuZGlzTXNnUmVzcG9uc2UgPT0gTlVMTCkpIHsNCisgICAgREVC VUcgKChERUJVR19JTkZPLCAiUm5kaXNDb250cm9sTXNnOiBVc2JTdGF0dXMgOiAleCBTdGF0dXMg OiAlclxuIiwgVXNiU3RhdHVzLCBTdGF0dXMpKTsNCisgICAgcmV0dXJuIFN0YXR1czsNCisgIH0N CisNCisgIGZvciAoSW5kZXggPSAwOyBJbmRleCA8IChSTkRJU19DT05UUk9MX1RJTUVPVVQvMTAw KTsgSW5kZXgrKykgew0KKyAgICBSZWFkUm5kaXNSZXNwb25zZUludGVycnVwdCAoVXNiUm5kaXNE ZXZpY2UpOw0KKyAgICBaZXJvTWVtICgmRGV2UmVxLCBzaXplb2YgKEVGSV9VU0JfREVWSUNFX1JF UVVFU1QpKTsNCisNCisgICAgRGV2UmVxLlJlcXVlc3RUeXBlID0gVVNCX0VORFBPSU5UX0RJUl9J TiB8IFVTQl9SRVFfVFlQRV9DTEFTUyB8IFVTQl9UQVJHRVRfSU5URVJGQUNFOw0KKyAgICBEZXZS ZXEuUmVxdWVzdCAgICAgPSBHRVRfRU5DQVBTVUxBVEVEX1JFU1BPTlNFOw0KKyAgICBEZXZSZXEu VmFsdWUgICAgICAgPSAwOw0KKyAgICBEZXZSZXEuSW5kZXggICAgICAgPSAwOw0KKyAgICBEZXZS ZXEuTGVuZ3RoICAgICAgPSAoVUlOVDE2KVJuZGlzTXNnUmVzcG9uc2UtPk1lc3NhZ2VMZW5ndGg7 DQorDQorICAgIFN0YXR1cyA9IFVzYklvLT5Vc2JDb250cm9sVHJhbnNmZXIgKA0KKyAgICAgICAg ICAgICAgICAgICAgICBVc2JJbywNCisgICAgICAgICAgICAgICAgICAgICAgJkRldlJlcSwNCisg ICAgICAgICAgICAgICAgICAgICAgRWZpVXNiRGF0YUluLA0KKyAgICAgICAgICAgICAgICAgICAg ICBVU0JfRVRIRVJORVRfVFJBTlNGRVJfVElNRU9VVCwNCisgICAgICAgICAgICAgICAgICAgICAg Um5kaXNNc2dSZXNwb25zZSwNCisgICAgICAgICAgICAgICAgICAgICAgUm5kaXNNc2dSZXNwb25z ZS0+TWVzc2FnZUxlbmd0aCwNCisgICAgICAgICAgICAgICAgICAgICAgJlVzYlN0YXR1cw0KKyAg ICAgICAgICAgICAgICAgICAgICApOw0KKw0KKyAgICBERUJVRyAoKERFQlVHX0lORk8sICJSbmRp c0NvbnRyb2xNc2cgUmVzcG9uc2U6IFVzYlN0YXR1cyA6ICV4IFN0YXR1cyA6ICVyIFxuIiwg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FTU9URV9ORElTX01TR19IRUFERVIgdG8gc2VuZCBvdXQuDQorICBA cGFyYW1baW4sIG91dF0gVHJhbnNmZXJMZW5ndGggIFRoZSBsZW5ndGggb2YgdGhlIFJuZGlzTXNn IGRhdGEgdG8gdHJhbnNmZXIuDQorDQorICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICBUaGUgcmVx dWVzdCBleGVjdXRlZCBzdWNjZXNzZnVsbHkuDQorDQorKiovDQorRUZJX1NUQVRVUw0KK1JuZGlz VHJhbnNtaXREYXRhTXNnICgNCisgIElOICAgICAgVVNCX1JORElTX0RFVklDRSAgICAgICAgKlVz YlJuZGlzRGV2aWNlLA0KKyAgSU4gICAgICBSRU1PVEVfTkRJU19NU0dfSEVBREVSICAqUm5kaXNN c2csDQorICBJTiBPVVQgIFVJTlROICAgICAgICAgICAgICAgICAgICpUcmFuc2Zlckxlbmd0aA0K KyAgKQ0KK3sNCisgIEVGSV9TVEFUVVMgIFN0YXR1czsNCisgIFVJTlQzMiAgICAgIFVzYlN0YXR1 czsNCisNCisgIGlmIChVc2JSbmRpc0RldmljZS0+QnVsa0luRW5kcG9pbnQgPT0gMCkgew0KKyAg ICBHZXRFbmRwb2ludCAoVXNiUm5kaXNEZXZpY2UtPlVzYklvQ2RjRGF0YSwgVXNiUm5kaXNEZXZp Y2UpOw0KKyAgfQ0KKw0KKyAgUHJpbnRSbmRpc01zZyAoUm5kaXNNc2cpOw0KKw0KKyAgU3RhdHVz ID0gVXNiUm5kaXNEZXZpY2UtPlVzYklvQ2RjRGF0YS0+VXNiQnVsa1RyYW5zZmVyICgNCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVXNiUm5kaXNEZXZpY2UtPlVz YklvQ2RjRGF0YSwNCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg VXNiUm5kaXNEZXZpY2UtPkJ1bGtPdXRFbmRwb2ludCwNCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgUm5kaXNNc2csDQorICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIFRyYW5zZmVyTGVuZ3RoLA0KKyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBVU0JfVFhfRVRIRVJORVRfQlVMS19USU1FT1VULA0KKyAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAmVXNiU3RhdHVzDQorICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorDQorICBpZiAoU3Rh dHVzID09IEVGSV9TVUNDRVNTKSB7DQorICAgIGdTdG9wQnVsa0luQ250ID0gTUFYSU1VTV9TVE9Q QlVMS0lOX0NOVDsgICAgIC8vIEFmdGVyIHNlbmRpbmcgY21kICx3ZSB3aWxsIHBvbGxpbmcgcmVj ZWl2ZSBwYWNrYWdlIGZvciBNQVhJTVVNX1NUT1BCVUxLSU5fQ05UIHRpbWVzDQorICB9DQorDQor ICByZXR1cm4gU3RhdHVzOw0KK30NCisNCisvKioNCisgIFRoaXMgZnVuY3Rpb24gc2VuZCB0aGUg Uk5ESVMgY29tbWFuZCB0aHJvdWdoIHRoZSBkZXZpY2UncyBEYXRhIGVuZHBvaW50DQorDQorICBA cGFyYW1baW5dICAgICAgVXNiUm5kaXNEZXZpY2UgICAgQSBwb2ludGVyIHRvIHRoZSBVU0JfUk5E SVNfREVWSUNFIGluc3RhbmNlLg0KKyAgQHBhcmFtW2luLCBvdXRdIFJuZGlzTXNnICAgICAgICAg IEEgcG9pbnRlciB0byB0aGUgUkVNT1RFX05ESVNfTVNHX0hFQURFUiB0byBzZW5kIG91dC4NCisg IEBwYXJhbVtpbiwgb3V0XSBUcmFuc2Zlckxlbmd0aCAgICBUaGUgbGVuZ3RoIG9mIHRoZSBSbmRp c01zZyBkYXRhIHRvIHRyYW5zZmVyLg0KKw0KKyAgQHJldHZhbCBFRklfU1VDQ0VTUyAgICAg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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIFRyYW5zZmVyTGVuZ3RoLA0KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIFVTQl9SWF9FVEhFUk5FVF9CVUxLX1RJTUVPVVQsDQorICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJlVzYlN0YXR1cw0KKyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQorDQorICAgIGlmICghRUZJX0VS Uk9SIChTdGF0dXMpKSB7DQorICAgICAgZ1N0b3BCdWxrSW5DbnQgPSBNSU5JTVVNX1NUT1BCVUxL SU5fQ05UOw0KKyAgICB9IGVsc2Ugew0KKyAgICAgIGdTdG9wQnVsa0luQ250LS07DQorICAgIH0N CisgIH0gZWxzZSB7DQorICAgIFN0YXR1cyAgICAgICAgICA9IEVGSV9USU1FT1VUOw0KKyAgICAq VHJhbnNmZXJMZW5ndGggPSAwOw0KKyAgICBnQmxvY2tCdWxrSW5DbnQrKzsNCisgIH0NCisNCisg IGlmIChnQmxvY2tCdWxrSW5DbnQgPiBCVUxLSU5fQ01EX1BPTExJTkdfQ05UKSB7DQorICAgIGdT dG9wQnVsa0luQ250ICA9IE1JTklNVU1fU1RPUEJVTEtJTl9DTlQ7DQorICAgIGdCbG9ja0J1bGtJ bkNudCA9IDA7DQorICB9DQorDQorICBQcmludFJuZGlzTXNnIChSbmRpc01zZyk7DQorDQorICBy ZXR1cm4gU3RhdHVzOw0KK30NCisNCisvKioNCisgIFByaW50cyBSTkRJUyBIZWFkZXIgYW5kIERh dGENCisNCisgIEBwYXJhbVtpbl0gUm5kaXNNc2cgICAgQSBwb2ludGVyIHRvIHRoZSBSRU1PVEVf TkRJU19NU0dfSEVBREVSIGRhdGEuDQorDQorKiovDQorVk9JRA0KK1ByaW50Um5kaXNNc2cgKA0K KyAgSU4gIFJFTU9URV9ORElTX01TR19IRUFERVIgICpSbmRpc01zZw0KKyAgKQ0KK3sNCisgIFVJ TlROICAgICAgICAgICAgICAgICAgICBMZW5ndGg7DQorICBSRU1PVEVfTkRJU19RVUVSWV9DTVBM VCAgKlJuZGlzUXVlcnlDbXBsdDsNCisNCisgIExlbmd0aCA9IDA7DQorDQorICBzd2l0Y2ggKFJu ZGlzTXNnLT5NZXNzYWdlVHlwZSkgew0KKyAgICBjYXNlIFJORElTX1BBQ0tFVF9NU0c6DQorICAg ICAgREVCVUcgKChERUJVR19JTkZPLCAiUk5ESVNfUEFDS0VUX01TRzpcbiIpKTsNCisgICAgICBM ZW5ndGggPSBzaXplb2YgKFJFTU9URV9ORElTX1BBQ0tFVF9NU0cpICsgMHgxNDsNCisgICAgICBi cmVhazsNCisgICAgY2FzZSBSTkRJU19JTklUSUFMSVpFX01TRzoNCisgICAgICBERUJVRyAoKERF QlVHX0lORk8sICJSTkRJU19JTklUSUFMSVpFX01TRzpcbiIpKTsNCisgICAgICBMZW5ndGggPSBz aXplb2YgKFJFTU9URV9ORElTX0lOSVRJQUxJWkVfTVNHKTsNCisgICAgICBicmVhazsNCisgICAg Y2FzZSBSTkRJU19JTklUSUFMSVpFX0NNUExUOg0KKyAgICAgIERFQlVHICgoREVCVUdfSU5GTywg IlJORElTX0lOSVRJQUxJWkVfQ01QTFQ6XG4iKSk7DQorICAgICAgTGVuZ3RoID0gc2l6ZW9mIChS RU1PVEVfTkRJU19JTklUSUFMSVpFX0NNUExUKTsNCisgICAgICBicmVhazsNCisgICAgY2FzZSBS TkRJU19ITFRfTVNHOg0KKyAgICAgIERFQlVHICgoREVCVUdfSU5GTywgIlJORElTX0hMVF9NU0c6 XG4iKSk7DQorICAgICAgTGVuZ3RoID0gc2l6ZW9mIChSRU1PVEVfTkRJU19IQUxUX01TRyk7DQor ICAgICAgYnJlYWs7DQorICAgIGNhc2UgUk5ESVNfUVVFUllfTVNHOg0KKyAgICAgIERFQlVHICgo REVCVUdfSU5GTywgIlJORElTX1FVRVJZX01TRzpcbiIpKTsNCisgICAgICBMZW5ndGggPSBzaXpl b2YgKFJFTU9URV9ORElTX1FVRVJZX01TRyk7DQorICAgICAgYnJlYWs7DQorICAgIGNhc2UgUk5E SVNfUVVFUllfQ01QTFQ6DQorICAgICAgREVCVUcgKChERUJVR19JTkZPLCAiUk5ESVNfUVVFUllf Q01QTFQ6XG4iKSk7DQorICAgICAgUm5kaXNRdWVyeUNtcGx0ID0gKFJFTU9URV9ORElTX1FVRVJZ X0NNUExUICopUm5kaXNNc2c7DQorICAgICAgTGVuZ3RoICAgICAgICAgID0gc2l6ZW9mIChSRU1P VEVfTkRJU19RVUVSWV9DTVBMVCkgKyBSbmRpc1F1ZXJ5Q21wbHQtPkluZm9ybWF0aW9uQnVmZmVy TGVuZ3RoOw0KKyAgICAgIGJyZWFrOw0KKyAgICBjYXNlIFJORElTX1NFVF9NU0c6DQorICAgICAg REVCVUcgKChERUJVR19JTkZPLCAiUk5ESVNfU0VUX01TRzpcbiIpKTsNCisgICAgICBMZW5ndGgg PSBzaXplb2YgKFJFTU9URV9ORElTX1NFVF9NU0cpOw0KKyAgICAgIGJyZWFrOw0KKyAgICBjYXNl IFJORElTX1NFVF9DTVBMVDoNCisgICAgICBERUJVRyAoKERFQlVHX0lORk8sICJSTkRJU19TRVRf Q01QTFQ6XG4iKSk7DQorICAgICAgTGVuZ3RoID0gc2l6ZW9mIChSRU1PVEVfTkRJU19TRVRfQ01Q TFQpOw0KKyAgICAgIGJyZWFrOw0KKyAgICBjYXNlIFJORElTX1JFU0VUX01TRzoNCisgICAgICBE RUJVRyAoKERFQlVHX0lORk8sICJSTkRJU19SRVNFVF9NU0c6XG4iKSk7DQorICAgICAgTGVuZ3Ro ID0gc2l6ZW9mIChSRU1PVEVfTkRJU19SRVNFVF9NU0cpOw0KKyAgICAgIGJyZWFrOw0KKyAgICBj YXNlIFJORElTX1JFU0VUX0NNUExUOg0KKyAgICAgIERFQlVHICgoREVCVUdfSU5GTywgIlJORElT X1JFU0VUX0NNUExUOlxuIikpOw0KKyAgICAgIExlbmd0aCA9IHNpemVvZiAoUkVNT1RFX05ESVNf UkVTRVRfQ01QTFQpOw0KKyAgICAgIGJyZWFrOw0KKyAgICBjYXNlIFJORElTX0lORElDQVRFX1NU QVRVU19NU0c6DQorICAgICAgREVCVUcgKChERUJVR19JTkZPLCAiUk5ESVNfSU5ESUNBVEVfU1RB VFVTX01TRzpcbiIpKTsNCisgICAgICBMZW5ndGggPSBzaXplb2YgKFJFTU9URV9ORElTX0lORElD QVRFX1NUQVRVU19NU0cpOw0KKyAgICAgIGJyZWFrOw0KKyAgICBjYXNlIFJORElTX0tFRVBBTElW RV9NU0c6DQorICAgICAgREVCVUcgKChERUJVR19JTkZPLCAiUk5ESVNfS0VFUEFMSVZFX01TRzpc biIpKTsNCisgICAgICBMZW5ndGggPSBzaXplb2YgKFJFTU9URV9ORElTX0tFRVBBTElWRV9NU0cp Ow0KKyAgICAgIGJyZWFrOw0KKyAgICBjYXNlIFJORElTX0tFRVBBTElWRV9DTVBMVDoNCisgICAg ICBERUJVRyAoKERFQlVHX0lORk8sICJSTkRJU19LRUVQQUxJVkVfQ01QTFQ6XG4iKSk7DQorICAg ICAgTGVuZ3RoID0gc2l6ZW9mIChSRU1PVEVfTkRJU19LRUVQQUxJVkVfQ01QTFQpOw0KKyAgfQ0K Kw0KKyAgaWYgKExlbmd0aCkgew0KKyAgICBVSU5UTiAgSW5kZXggPSAwOw0KKyAgICBmb3IgKCA7 IExlbmd0aDsgTGVuZ3RoIC09IDQsIEluZGV4KyspIHsNCisgICAgICBERUJVRyAoKERFQlVHX0lO Rk8sICIlOFhcdCIsICooKFVJTlQzMiAqKVJuZGlzTXNnICsgSW5kZXgpKSk7DQorICAgICAgaWYg KCgoSW5kZXggJSA0KSA9PSAzKSAmJiAoSW5kZXggIT0gMCkpIHsNCisgICAgICAgIERFQlVHICgo REVCVUdfSU5GTywgIlxuIikpOw0KKyAgICAgIH0NCisNCisgICAgICBpZiAoKExlbmd0a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