Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 40AB0C433F5 for ; Tue, 11 Jan 2022 17:16:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344370AbiAKRQs (ORCPT ); Tue, 11 Jan 2022 12:16:48 -0500 Received: from mail-bn7nam10on2071.outbound.protection.outlook.com ([40.107.92.71]:12352 "EHLO NAM10-BN7-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1344039AbiAKRP4 (ORCPT ); Tue, 11 Jan 2022 12:15:56 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hJ5iOlxsffQAq0xKI5vB/TMeto53UfocOl+aEh6ehW1Xfhj0F9NmwNGcD1rJk532JU4Ly5rLqICZgPGapGZ/ejRgrR49r3sCDkmvUmRjikG/ZbNS02DiZ1qsSBVikRxS/KGv8o/GnoP7lU7yMIhUXZiSMezP6pAIIvFsLqp1fnrNqDZFlhA4RNxS93mAUw2VLXkmxmeg2OnEF0UX6oVDH/w6mXTWdv5fpDPwcDecMLwMyc3fMgkDCc5A20olmbP/w56jww400Yk/s/y4qqAj/SLsgLYYUhYYAz7h55WeB63jb0Gec5hoXinZ1onFDs8+FoJlgRe3YqxVKi/mGKDNCA== 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=agYhQSBs++Ak7M32ShDWmx0yNm/dBZK6RRiiP4B5OdU=; b=F6McZFawR6LOADD6a1fN2McD8gJI2fNsUaHeGMR3eMDuGvXzz1WTUdP+sUudoFhGKsHT70utRigEM+lZe9q1HVWw8ATg+M9OZbdsVyBFDz7W4s5ZGcJLivlHyGKuAyDpzmw9EQFQDLK3hZEZR//O9tO04eCa88qS1MT7VNTLwO+yfD9tKKHZwatag4pHjmazw8UBahyLJF2XSzXCDAb7JNJfCncIhh3dUQvOtk52l/LrtsAxiP6I7VuIfBNPh9SBZI6UUK32CUXpn2wVmFwYj0U4JtJOQUDyqHnh4st2wGoQBTSMihTPBjXgwEiIMBtoIlZo1AH0zw5t2SBFYMXoGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=silabs.com; dmarc=pass action=none header.from=silabs.com; dkim=pass header.d=silabs.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=silabs.onmicrosoft.com; s=selector2-silabs-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=agYhQSBs++Ak7M32ShDWmx0yNm/dBZK6RRiiP4B5OdU=; b=OhIQLyFp7PgzdXw9d++RwMEcpb1dMM+nrjpRzoVGwGlzWpqgkOiAIR/5aauDIC0X/1kELoeGyRFTMh7t+IKlArJe2DWtJQH7kZt3/sPFyYrHh8doM+JJx/8s1N74d2htKk3/XTgSJd5sc7Pai8h097JSC+pF2iAx0Mcy9dupFs4= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=silabs.com; Received: from PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) by PH0PR11MB5641.namprd11.prod.outlook.com (2603:10b6:510:d6::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4888.9; Tue, 11 Jan 2022 17:15:49 +0000 Received: from PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4]) by PH0PR11MB5657.namprd11.prod.outlook.com ([fe80::d031:da9e:71a:73e4%6]) with mapi id 15.20.4867.012; Tue, 11 Jan 2022 17:15:48 +0000 From: Jerome Pouiller To: linux-wireless@vger.kernel.org, netdev@vger.kernel.org, Kalle Valo Cc: devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Greg Kroah-Hartman , "David S . Miller" , devicetree@vger.kernel.org, Rob Herring , linux-mmc@vger.kernel.org, =?UTF-8?q?Pali=20Roh=C3=A1r?= , Ulf Hansson , =?UTF-8?q?J=C3=A9r=C3=B4me=20Pouiller?= Subject: [PATCH v9 23/24] wfx: remove from the staging area Date: Tue, 11 Jan 2022 18:14:23 +0100 Message-Id: <20220111171424.862764-24-Jerome.Pouiller@silabs.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> References: <20220111171424.862764-1-Jerome.Pouiller@silabs.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: base64 X-ClientProxiedBy: SN1PR12CA0099.namprd12.prod.outlook.com (2603:10b6:802:21::34) To PH0PR11MB5657.namprd11.prod.outlook.com (2603:10b6:510:ee::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e8d77c31-981e-4072-cad5-08d9d52601e3 X-MS-TrafficTypeDiagnostic: PH0PR11MB5641:EE_ X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7ChH3YTfYfvmhEobsdPW2wWUxPJXUlPDi2hJi+G+3sOnsIlUTSrH0uUPzSpx5PzvOC8jGU1tUp4kiaFo5jMiet7D9BGPkinrb0O8GBeBykE1GtxcQmfv6okx6M6OFPNjPYjbNHw69mk9sRDYDUsF0ZsGgF3O/DRBBpr/aqX1L3/L7+8k67xopdsj6Y9ECTvkmxYLUd90URufJshr4w2De7t8dbjnHHVLOEMwJY2UvbOtKDgDrAMAnQKDIA1pZcsQVMew4sxeRY4JF5l/f9XtMO8dcfc1Ssl0MVFR/XpQCWQzhnwrUROEC4PXtGInH3q7xCUrIZiBXKzuAp2RbnZk6GqBv8VGZdfZflZdMpx9piXeG7Hv0USmRRXi+FQhfexsMj8pKuUVNQqFMhRy9+likQ8my0GaPzlGp6AgiQdrg9zzKU9VloJ9fR/+KkmBe2SVx7SnEfnI/BSV+EVcOQDWpbjdwJTlj+RAwVpl/LUwUC8wuTdPz28HumY6UO+JW8unt7wiizKo/nv5PIYgzHDzSHreLCzhElq8ICzuEKmARFT+7FJNLubxSVy+PJJs/RC1RiLvkEeoOJ7p3ClL/byW7gcDoOpgKRJ5hl0pbRtkpl76i5ClkuOLrz8ZdChAxp8s8YbAMPW5pAn+5llxoJ836+pLhCmZl2V2uwVR1oBitjp9FUGjilSTKf+i1EwmxUjU8mRMFDgJtBXISb2EaacCIDJo0BftBUYqw1Z1HKrPkFakx7qlGEhLa8SO7n+uAsrpdxWGEhDUoPK/DPEL4RMViw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH0PR11MB5657.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(966005)(7416002)(8936002)(38100700002)(66574015)(30864003)(6666004)(186003)(6506007)(107886003)(8676002)(83380400001)(6512007)(66946007)(316002)(1076003)(66556008)(6916009)(5660300002)(2906002)(54906003)(508600001)(66476007)(52116002)(84970400001)(86362001)(4326008)(6486002)(36756003)(2616005)(21314003)(559001)(579004);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?SjcvczFNeVNiYTEwVXVMSGJadGJtUTFnS0MvbHRvd0lkVGo4WUxkUm5CbWRZ?= =?utf-8?B?RWE0ZUpRa1VHRFhnMXRUWE1ZR2pxekJUZmtHZHkyb0dhd0dNQzE3SUo1S3lk?= =?utf-8?B?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lRW5NOVJaWjlHN2NaNWwvTVZw?= =?utf-8?B?K2FHWG00Y2phdVJWaTBDQ0tQMGlLczViZU1iTTh1WDhacFVKOHhuN2lnRFRS?= =?utf-8?B?dG5mcUU5NmNmamlDbjl0ZlptTk8yWnR3by9WTkNDQ3d4WjF6Y1lKQnIwOU1S?= =?utf-8?B?ZzNQZ3ZoUldnek1pRWpSYTVtcE5UdGUzU1VnMFUzdGp5K2FvOEtQZTF2clVz?= =?utf-8?B?bVZYUWUvci9DYWNOc2VIWEZMT0VSZE5iUkVBazg3S2lxMG0wZ2p5S0hmRjl6?= =?utf-8?B?WHFzVXMzZzlXcXR2Z2VSNFg0TnFuZnlpbnJGZjJRdUpmdm1FM01uVUJqWVQ2?= =?utf-8?Q?y+l/sIe76KeM2EpBGYMckMjFc/Gj9TF+cDVXKoBLbw=3D?= X-OriginatorOrg: silabs.com X-MS-Exchange-CrossTenant-Network-Message-Id: e8d77c31-981e-4072-cad5-08d9d52601e3 X-MS-Exchange-CrossTenant-AuthSource: PH0PR11MB5657.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Jan 2022 17:15:48.8081 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 54dbd822-5231-4b20-944d-6f4abcd541fb X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: BmEihKrV0KF1ym/yKhNINOyJiY7gHJeML9TQQgpnjF0A9EqTeL3YsXzNeCTbQr3fimOzWq5Owdt+5KpCmm/r8g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR11MB5641 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org RnJvbTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29tPgoKU2ln bmVkLW9mZi1ieTogSsOpcsO0bWUgUG91aWxsZXIgPGplcm9tZS5wb3VpbGxlckBzaWxhYnMuY29t PgotLS0KIC4uLi9iaW5kaW5ncy9uZXQvd2lyZWxlc3Mvc2lsYWJzLHdmeC55YW1sICAgICB8IDEy NSAtLS0KIGRyaXZlcnMvc3RhZ2luZy93ZngvS2NvbmZpZyAgICAgICAgICAgICAgICAgICB8ICAg OCAtCiBkcml2ZXJzL3N0YWdpbmcvd2Z4L01ha2VmaWxlICAgICAgICAgICAgICAgICAgfCAgMjUg LQogZHJpdmVycy9zdGFnaW5nL3dmeC9iaC5jICAgICAgICAgICAgICAgICAgICAgIHwgMzMwIC0t LS0tLS0KIGRyaXZlcnMvc3RhZ2luZy93ZngvYmguaCAgICAgICAgICAgICAgICAgICAgICB8ICAz MyAtCiBkcml2ZXJzL3N0YWdpbmcvd2Z4L2J1cy5oICAgICAgICAgICAgICAgICAgICAgfCAgMzgg LQogZHJpdmVycy9zdGFnaW5nL3dmeC9idXNfc2Rpby5jICAgICAgICAgICAgICAgIHwgMjcyIC0t LS0tLQogZHJpdmVycy9zdGFnaW5nL3dmeC9idXNfc3BpLmMgICAgICAgICAgICAgICAgIHwgMjcx IC0tLS0tLQogZHJpdmVycy9zdGFnaW5nL3dmeC9kYXRhX3J4LmMgICAgICAgICAgICAgICAgIHwg IDk0IC0tCiBkcml2ZXJzL3N0YWdpbmcvd2Z4L2RhdGFfcnguaCAgICAgICAgICAgICAgICAgfCAg MTggLQogZHJpdmVycy9zdGFnaW5nL3dmeC9kYXRhX3R4LmMgICAgICAgICAgICAgICAgIHwgNTk2 IC0tLS0tLS0tLS0tLS0KIGRyaXZlcnMvc3RhZ2luZy93ZngvZGF0YV90eC5oICAgICAgICAgICAg ICAgICB8ICA2OCAtLQogZHJpdmVycy9zdGFnaW5nL3dmeC9kZWJ1Zy5jICAgICAgICAgICAgICAg ICAgIHwgMzY1IC0tLS0tLS0tCiBkcml2ZXJzL3N0YWdpbmcvd2Z4L2RlYnVnLmggICAgICAgICAg ICAgICAgICAgfCAgMTkgLQogZHJpdmVycy9zdGFnaW5nL3dmeC9md2lvLmMgICAgICAgICAgICAg ICAgICAgIHwgNDA1IC0tLS0tLS0tLQogZHJpdmVycy9zdGFnaW5nL3dmeC9md2lvLmggICAgICAg ICAgICAgICAgICAgIHwgIDE1IC0KIGRyaXZlcnMvc3RhZ2luZy93ZngvaGlmX2FwaV9jbWQuaCAg ICAgICAgICAgICB8IDU1NSAtLS0tLS0tLS0tLS0KIGRyaXZlcnMvc3RhZ2luZy93ZngvaGlmX2Fw aV9nZW5lcmFsLmggICAgICAgICB8IDI2MiAtLS0tLS0KIGRyaXZlcnMvc3RhZ2luZy93ZngvaGlm X2FwaV9taWIuaCAgICAgICAgICAgICB8IDM0NiAtLS0tLS0tLQogZHJpdmVycy9zdGFnaW5nL3dm eC9oaWZfcnguYyAgICAgICAgICAgICAgICAgIHwgNDE2IC0tLS0tLS0tLQogZHJpdmVycy9zdGFn aW5nL3dmeC9oaWZfcnguaCAgICAgICAgICAgICAgICAgIHwgIDE3IC0KIGRyaXZlcnMvc3RhZ2lu Zy93ZngvaGlmX3R4LmMgICAgICAgICAgICAgICAgICB8IDUxMyAtLS0tLS0tLS0tLQogZHJpdmVy cy9zdGFnaW5nL3dmeC9oaWZfdHguaCAgICAgICAgICAgICAgICAgIHwgIDYwIC0tCiBkcml2ZXJz L3N0YWdpbmcvd2Z4L2hpZl90eF9taWIuYyAgICAgICAgICAgICAgfCAzMjQgLS0tLS0tLQogZHJp dmVycy9zdGFnaW5nL3dmeC9oaWZfdHhfbWliLmggICAgICAgICAgICAgIHwgIDQ5IC0tCiBkcml2 ZXJzL3N0YWdpbmcvd2Z4L2h3aW8uYyAgICAgICAgICAgICAgICAgICAgfCAzNTIgLS0tLS0tLS0K IGRyaXZlcnMvc3RhZ2luZy93ZngvaHdpby5oICAgICAgICAgICAgICAgICAgICB8ICA3NSAtLQog ZHJpdmVycy9zdGFnaW5nL3dmeC9rZXkuYyAgICAgICAgICAgICAgICAgICAgIHwgMjQx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OQot I2RlZmluZSAgICAgSE9TVF9VUExPQURfUEVORElORyAgICAgICAweEFCQ0REQ0JBCi0jZGVmaW5l ICAgICBIT1NUX1VQTE9BRF9DT01QTEVURSAgICAgIDB4RDRDNjRBOTkKLSNkZWZpbmUgICAgIEhP U1RfT0tfVE9fSlVNUCAgICAgICAgICAgMHgxNzRGQzg4MgotI2RlZmluZSBXRlhfRENBX05DUF9T VEFUVVMgICAgICAgIDB4MDkwMEMwMTAKLSNkZWZpbmUgICAgIE5DUF9OT1RfUkVBRFkgICAgICAg ICAgICAgMHgxMjM0NTY3OAotI2RlZmluZSAgICAgTkNQX1JFQURZICAgICAgICAgICAgICAgICAw eDg3NjU0MzIxCi0jZGVmaW5lICAgICBOQ1BfSU5GT19SRUFEWSAgICAgICAgICAgIDB4QkQ1M0VG OTkKLSNkZWZpbmUgICAgIE5DUF9ET1dOTE9BRF9QRU5ESU5HICAgICAgMHhBQkNERENCQQotI2Rl ZmluZSAgICAgTkNQX0RPV05MT0FEX0NPTVBMRVRFICAgICAweENBRkVGRUNBCi0jZGVmaW5lICAg ICBOQ1BfQVVUSF9PSyAgICAgICAgICAgICAgIDB4RDRDNjRBOTkKLSNkZWZpbmUgICAgIE5DUF9B VVRIX0ZBSUwgICAgICAgICAgICAgMHgxNzRGQzg4MgotI2RlZmluZSAgICAgTkNQX1BVQl9LRVlf UkRZICAgICAgICAgICAweDdBQjQxRDE5Ci0jZGVmaW5lIFdGWF9EQ0FfRldfU0lHTkFUVVJFICAg ICAgMHgwOTAwQzAxNAotI2RlZmluZSAgICAgRldfU0lHTkFUVVJFX1NJWkUgICAgICAgICAweDQw Ci0jZGVmaW5lIFdGWF9EQ0FfRldfSEFTSCAgICAgICAgICAgMHgwOTAwQzA1NAotI2RlZmluZSAg ICAgRldfSEFTSF9TSVpFICAgICAgICAgICAgICAweDA4Ci0jZGVmaW5lIFdGWF9EQ0FfRldfVkVS U0lPTiAgICAgICAgMHgwOTAwQzA1QwotI2RlZmluZSAgICAg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QlISUZfUkVRX0lEX1JFQURfTUlCICAgICAgICAgICAgID0gMHgwNSwKLQlISUZfUkVR X0lEX1dSSVRFX01JQiAgICAgICAgICAgID0gMHgwNiwKLQlISUZfUkVRX0lEX1NUQVJUX1NDQU4g ICAgICAgICAgID0gMHgwNywKLQlISUZfUkVRX0lEX1NUT1BfU0NBTiAgICAgICAgICAgID0gMHgw OCwKLQlISUZfUkVRX0lEX1RYICAgICAgICAgICAgICAgICAgID0gMHgwNCwKLQlISUZfUkVRX0lE X0pPSU4gICAgICAgICAgICAgICAgID0gMHgwYiwKLQlISUZfUkVRX0lEX1NFVF9QTV9NT0RFICAg ICAgICAgID0gMHgxMCwKLQlISUZfUkVRX0lEX1NFVF9CU1NfUEFSQU1TICAgICAgID0gMHgxMSwK LQlISUZfUkVRX0lEX0FERF9LRVkgICAgICAgICAgICAgID0gMHgwYywKLQlISUZfUkVRX0lEX1JF TU9WRV9LRVkgICAgICAgICAgID0gMHgwZCwKLQlISUZfUkVRX0lEX0VEQ0FfUVVFVUVfUEFSQU1T ICAgID0gMHgxMywKLQlISUZfUkVRX0lEX1NUQVJUICAgICAgICAgICAgICAgID0gMHgxNywKLQlI SUZfUkVRX0lEX0JFQUNPTl9UUkFOU01JVCAgICAgID0gMHgxOCwKLQlISUZfUkVRX0lEX1VQREFU RV9JRSAgICAgICAgICAgID0gMHgxYiwKLQlISUZfUkVRX0lEX01BUF9MSU5LICAgICAgICAgICAg ID0gMHgxYywKLX07Ci0KLWVudW0gaGlmX2NvbmZpcm1hdGlvbnNfaWRzIHsKLQlISUZfQ05GX0lE X1JFU0VUICAgICAgICAgICAgICAgID0gMHgwYSwKLQlISUZfQ05GX0lEX1JFQURfTUlCICAgICAg ICAgICAgID0gMHgwNSwKLQlISUZfQ05GX0lEX1dSSVRFX01JQiAgICAgICAgICAgID0gMHgwNiwK LQlISUZfQ05GX0lEX1NUQVJUX1NDQU4gICAgICAgICAgID0gMHgwNywKLQlISUZfQ05GX0lEX1NU T1BfU0NBTiAgICAgICAgICAgID0gMHgwOCwKLQlISUZfQ05GX0lEX1RYICAgICAgICAgICAgICAg ICAgID0gMHgwNCwKLQlISUZfQ05GX0lEX01VTFRJX1RSQU5TTUlUICAgICAgID0gMHgxZSwKLQlI SUZfQ05GX0lEX0pPSU4gICAgICAgICAgICAgICAgID0gMHgwYiwKLQlISUZfQ05GX0lEX1NFVF9Q TV9NT0RFICAgICAgICAgID0gMHgxMCwKLQlISUZfQ05GX0lEX1NFVF9CU1NfUEFSQU1TICAgICAg ID0gMHgxMSwKLQlISUZfQ05GX0lEX0FERF9LRVkgICAgICAgICAgICAgID0gMHgwYywKLQlISUZf Q05GX0lEX1JFTU9WRV9LRVkgICAgICAgICAgID0gMHgwZCwKLQlISUZfQ05GX0lEX0VEQ0FfUVVF VUVfUEFSQU1TICAgID0gMHgxMywKLQlISUZfQ05GX0lEX1NUQVJUICAgICAgICAgICAgICAgID0g MHgxNywKLQlISUZfQ05GX0lEX0JFQUNPTl9UUkFOU01JVCAgICAgID0gMHgxOCwKLQlISUZfQ05G X0lEX1VQREFURV9JRSAgICAgICAgICAgID0gMHgxYiwKLQlISUZfQ05GX0lEX01BUF9MSU5LICAg ICAgICAgICAgID0gMHgxYywKLX07Ci0KLWVudW0gaGlmX2luZGljYXRpb25zX2lkcyB7Ci0JSElG X0lORF9JRF9SWCAgICAgICAgICAgICAgICAgICA9IDB4ODQsCi0JSElGX0lORF9JRF9TQ0FOX0NN UEwgICAgICAgICAgICA9IDB4ODYsCi0JSElGX0lORF9JRF9KT0lOX0NPTVBMRVRFICAgICAgICA9 IDB4OGYsCi0JSElGX0lORF9JRF9TRVRfUE1fTU9ERV9DTVBMICAgICA9IDB4ODksCi0JSElGX0lO RF9JRF9TVVNQRU5EX1JFU1VNRV9UWCAgICA9IDB4OGMsCi0JSElGX0lORF9JRF9FVkVOVCAgICAg ICAgICAgICAgICA9IDB4ODUKLX07Ci0KLXN0cnVjdCBoaWZfcmVxX3Jlc2V0IHsKLQl1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c2NhbiB7Ci0JX19sZTMyIHN0YXR1czsKLX0gX19wYWNrZWQ7Ci0KLXN0cnVjdCBo aWZfY25mX3N0b3Bfc2NhbiB7Ci0JX19sZTMyIHN0YXR1czsKLX0gX19wYWNrZWQ7Ci0KLWVudW0g aGlmX3BtX21vZGVfc3RhdHVzIHsKLQlISUZfUE1fTU9ERV9BQ1RJVkUgICAgICAgICAgICAgICAg ICAgICAgICAgPSAweDAsCi0JSElGX1BNX01PREVfUFMgICAgICAgICAgICAgICAgICAgICAgICAg ICAgID0gMHgxLAotCUhJRl9QTV9NT0RFX1VOREVURVJNSU5FRCAgICAgICAgICAgICAgICAgICA9 IDB4MgotfTsKLQotc3RydWN0IGhpZl9pbmRfc2Nhbl9jbXBsIHsKLQlfX2xlMzIgc3RhdHVzOwot CXU4ICAgICBwbV9tb2RlOwotCXU4ICAgICBudW1fY2hhbm5lbHNfY29tcGxldGVkOwotCV9fbGUx NiByZXNlcnZlZDsKLX0gX19wYWNrZWQ7Ci0KLWVudW0gaGlmX3F1ZXVlX2lkIHsKLQlISUZfUVVF VUVfSURfQkFDS0dST1VORCAgICAgICAgICAgICAgICAgICAgPSAweDAsCi0JSElGX1FVRVVFX0lE X0JFU1RFRkZPUlQgICAgICAgICAgICAgICAgICAgID0gMHgxLAotCUhJRl9RVUVVRV9JRF9WSURF TyAgICAgICAgICAgICAgICAgICAgICAgICA9IDB4MiwKLQlISUZfUVVFVUVfSURfVk9JQ0UgICAg ICAgICAgICAgICAgICAgICAgICAgPSAweDMKLX07Ci0KLWVudW0gaGlmX2ZyYW1lX2Zvcm1hdCB7 Ci0JSElGX0ZSQU1FX0ZPUk1BVF9OT05fSFQgICAgICAgICAgICAgICAgICAgID0gMHgwLAotCUhJ Rl9GUkFNRV9GT1JNQVRfTUlYRURfRk9STUFUX0hUICAgICAgICAgICA9IDB4MSwKLQlISUZfRlJB TUVfRk9STUFUX0dGX0hUXzExTiAgICAgICAgICAgICAgICAgPSAweDIKLX07Ci0KLXN0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hY2tlZDsKLQotc3RydWN0IGhpZl9pbmRfc3VzcGVuZF9y ZXN1bWVfdHggewotCXU4ICAgICByZXN1bWU6MTsKLQl1OCAgICAgcmVzZXJ2ZWQxOjI7Ci0JdTgg ICAgIGJjX21jX29ubHk6MTsKLQl1OCAgICAgcmVzZXJ2ZWQyOjQ7Ci0JdTggICAgIHJlc2VydmVk MzsKLQlfX2xlMTYgcGVlcl9zdGFfc2V0OwotfSBfX3BhY2tlZDsKLQotCi0jZGVmaW5lIE1BWF9L RVlfRU5UUklFUyAgICAgICAgIDI0Ci0jZGVmaW5lIEhJRl9BUElfV0VQX0tFWV9EQVRBX1NJWkUg ICAgICAgICAgICAgICAgICAgICAgIDE2Ci0jZGVmaW5lIEhJRl9BUElfVEtJUF9LRVlfREFUQV9T SVpFICAgICAgICAgICAgICAgICAgICAgIDE2Ci0jZGVmaW5lIEhJRl9BUElfUlhfTUlDX0tFWV9T SVpFICAgICAgICAgICAgICAgICAgICAgICAgIDgKLSNkZWZpbmUgSElGX0FQSV9UWF9NSUNfS0VZ X1NJWkUgICAgICAgICAgICAgICAgICAgICAgICAgOAotI2RlZmluZSBISUZfQVBJX0FFU19LRVlf REFUQV9TSVpFICAgICAgICAgICAgICAgICAgICAgICAxNgotI2RlZmluZSBISUZfQVBJX1dBUElf S0VZX0RBVEFfU0laRSAgICAgICAgICAgICAgICAgICAgICAxNgotI2RlZmluZSBISUZfQVBJX01J Q19LRVlfREFUQV9TSVpFICAgICAgICAgICAgICAgICAgICAgICAxNgotI2RlZmluZSBISUZfQVBJ X0lHVEtfS0VZX0RBVEFfU0laRSAgICAgICAgICAgICAgICAgICAgICAxNgotI2RlZmluZSBISUZf QVBJX1JYX1NFUVVFTkNFX0NPVU5URVJfU0laRSAgICAgICAgICAgICAgICA4Ci0jZGVmaW5lIEhJ Rl9BUElfSVBOX1NJWkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgKLQotZW51bSBo aWZfa2V5X3R5cGUgewotCUhJRl9LRVlfVFlQRV9XRVBfREVGQVVMVCAgICAgICAgICAgICAgICAg ICA9IDB4MCwKLQlISUZfS0VZX1RZUEVfV0VQX1BBSVJXSVNFICAgICAgICAgICAgICAgICAgPSAw eDEsCi0JSElGX0tFWV9UWVBFX1RLSVBfR1JPVVAgICAgICAgICAgICAgICAgICAgID0gMHgyLAot CUhJRl9LRVlfVFlQRV9US0lQX1BBSVJXSVNFICAgICAgICAgICAgICAgICA9IDB4MywKLQlISUZf S0VZX1RZUEVfQUVTX0dST1VQICAgICAgICAgICAgICAgICAgICAgPSAweDQsCi0JSElGX0tFWV9U WVBFX0FFU19QQUlSV0lTRSAgICAgICAgICAgICAgICAgID0gMHg1LAotCUhJRl9LRVlfVFlQRV9X QVBJX0dST1VQICAgICAgICAgICAgICAgICAgICA9IDB4NiwKLQlISUZfS0VZX1RZUEVfV0FQSV9Q QUlSV0lTRSAgICAgICAgICAgICAgICAgPSAweDcsCi0JSElGX0tFWV9UWVBFX0lHVEtfR1JPVVAg ICAgICAgICAgICAgICAgICAgID0gMHg4LAotCUhJRl9LRVlfVFlQRV9OT05FICAgICAgICAgICAg ICAgICAgICAgICAgICA9IDB4OQotfTsKLQotc3RydWN0IGhpZl93ZXBfcGFpcndpc2Vfa2V5IHsK LQl1OCAgICAgcGVlcl9hZGRyZXNzW0VUSF9BTEVOXTsKLQl1OCAgICAgcmVzZXJ2ZWQ7Ci0JdTgg ICAgIGtleV9sZW5ndGg7Ci0JdTggICAgIGtleV9kYXRhW0hJRl9BUElfV0VQX0tFWV9EQVRBX1NJ WkVdOwotfSBfX3BhY2tlZDsKLQotc3RydWN0IGhpZl93ZXBfZ3JvdXBfa2V5IHsKLQl1OCAgICAg a2V5X2lkOwotCXU4ICAgICBrZXlfbGVuZ3RoOwotCXU4ICAgICByZXNlcnZlZFsyXTsKLQl1OCAg ICAga2V5X2RhdGFbSElGX0FQSV9XRVBfS0VZX0RBVEFfU0laRV07Ci19IF9fcGFja2VkOwotCi1z dHJ1Y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ICAgICAgICAgPSAw eDI5LAotCUhJRl9SRVFfSURfUFJFVkVOVF9ST0xMQkFDSyAgICAgPSAweDJhLAotCUhJRl9SRVFf SURfUFRBX1NFVFRJTkdTICAgICAgICAgPSAweDJiLAotCUhJRl9SRVFfSURfUFRBX1BSSU9SSVRZ ICAgICAgICAgPSAweDJjLAotCUhJRl9SRVFfSURfUFRBX1NUQVRFICAgICAgICAgICAgPSAweDJk LAotCUhJRl9SRVFfSURfU0hVVF9ET1dOICAgICAgICAgICAgPSAweDMyLAotfTsKLQotZW51bSBo aWZfZ2VuZXJhbF9jb25maXJtYXRpb25zX2lkcyB7Ci0JSElGX0NORl9JRF9DT05GSUdVUkFUSU9O ICAgICAgICA9IDB4MDksCi0JSElGX0NORl9JRF9DT05UUk9MX0dQSU8gICAgICAgICA9IDB4MjYs Ci0JSElGX0NORl9JRF9TRVRfU0xfTUFDX0tFWSAgICAgICA9IDB4MjcsCi0JSElGX0NORl9JRF9T TF9FWENIQU5HRV9QVUJfS0VZUyA9IDB4MjgsCi0JSElGX0NORl9JRF9TTF9DT05GSUdVUkUgICAg ICAgICA9IDB4MjksCi0JSElGX0NORl9JRF9QUkVWRU5UX1JPTExCQUNLICAgICA9IDB4MmEsCi0J SElGX0NORl9JRF9QVEFfU0VUVElOR1MgICAgICAgICA9IDB4MmIsCi0JSElGX0NORl9JRF9QVEFf UFJJT1JJVFkgICAgICAgICA9IDB4MmMsCi0JSElGX0NORl9JRF9QVEFfU1RBVEUgICAgICAgICAg ICA9IDB4MmQsCi0JSElGX0NORl9JRF9TSFVUX0RPV04gICAgICAgICAgICA9IDB4MzIsCi19Owot Ci1lbnVtIGhpZl9nZW5lcmFsX2luZGljYXRpb25zX2lkcyB7Ci0JSElGX0lORF9JRF9FWENFUFRJ T04gICAgICAgICAgICA9IDB4ZTAsCi0JSElGX0lORF9JRF9TVEFSVFVQICAgICAgICAgICAgICA9 IDB4ZTEsCi0JSElGX0lORF9JRF9XQUtFVVAgICAgICAgICAgICAgICA9IDB4ZTIsCi0JSElGX0lO RF9JRF9HRU5FUklDICAgICAgICAgICAgICA9IDB4ZTMsCi0JSElGX0lORF9JRF9FUlJPUiAgICAg ICAgICAgICAgICA9IDB4ZTQsCi0JSElGX0lORF9JRF9TTF9FWENIQU5HRV9QVUJfS0VZUyA9IDB4 ZTUKLX07Ci0KLSNkZWZpbmUgSElGX1NUQVRVU19TVUNDRVNTICAgICAgICAgICAgICAgICAgICAg ICAgIChjcHVfdG9fbGUzMigweDAwMDApKQotI2RlZmluZSBISUZfU1RBVFVTX0ZBSUwgICAgICAg ICAgICAgICAgICAgICAgICAgICAgKGNwdV90b19sZTMyKDB4MDAwMSkpCi0jZGVmaW5lIEhJRl9T VEFUVVNfSU5WQUxJRF9QQVJBTUVURVIgICAgICAgICAgICAgICAoY3B1X3RvX2xlMzIoMHgwMDAy KSkKLSNkZWZpbmUgSElGX1NUQVRVU19XQVJOSU5HICAgICAgICAgICAgICAgICAgICAgICAgIChj cHVfdG9fbGUzMigweDAwMDMpKQotI2RlZmluZSBISUZfU1RBVFVTX1VOS05PV05fUkVRVUVTVCAg ICAgICAgICAgICAgICAgKGNwdV90b19sZTMyKDB4MDAwNCkpCi0jZGVmaW5lIEhJRl9TVEFUVVNf UlhfRkFJTF9ERUNSWVBUICAgICAgICAgICAgICAgICAoY3B1X3RvX2xlMzIoMHgwMDEwKSkKLSNk ZWZpbmUgSElGX1NUQVRVU19SWF9GQUlMX01JQyAgICAgICAgICAgICAgICAgICAgIChjcHVfdG9f bGUzMigweDAwMTEpKQotI2RlZmluZSBISUZfU1RBVFVTX1JYX0ZBSUxfTk9fS0VZICAgICAgICAg ICAgICAgICAgKGNwdV90b19sZTMyKDB4MDAxMikpCi0jZGVmaW5lIEhJRl9TVEFUVVNfVFhfRkFJ TF9SRVRSSUVTICAgICAgICAgICAgICAgICAoY3B1X3RvX2xlMzIoMHgwMDEzKSkKLSNkZWZpbmUg SElGX1NUQVRVU19UWF9GQUlMX1RJTUVPVVQgICAgICAgICAgICAgICAgIChjcHVfdG9fbGUzMigw eDAwMTQpKQotI2RlZmluZSBISUZfU1RBVFVTX1RYX0ZBSUxfUkVRVUVVRSAgICAgICAgICAgICAg ICAgKGNwdV90b19sZTMyKDB4MDAxNSkpCi0jZGVmaW5lIEhJRl9TVEFUVVNfUkVGVVNFRCAgICAg ICAgICAgICAgICAgICAgICAgICAoY3B1X3RvX2xlMzIoMHgwMDE2KSkKLSNkZWZpbmUgSElGX1NU QVRVU19CVVNZICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjcHVfdG9fbGUzMigweDAwMTcp KQotI2RlZmluZSBISUZfU1RBVFVTX1NMS19TRVRfS0VZX1NVQ0NFU1MgICAgICAgICAgICAgKGNw dV90b19sZTMyKDB4MDA1QSkpCi0jZGVmaW5lIEhJRl9TVEFUVVNfU0xLX1NFVF9LRVlfQUxSRUFE WV9CVVJORUQgICAgICAoY3B1X3RvX2xlMzIoMHgwMDZCKSkKLSNkZWZpbmUgSElGX1NUQVRVU19T TEtfU0VUX0tFWV9ESVNBTExPV0VEX01PREUgICAgIChjcHVfdG9fbGUzMigweDAwN0MpKQotI2Rl ZmluZSBISUZfU1RBVFVTX1NMS19TRVRfS0VZX1VOS05PV05fTU9ERSAgICAgICAgKGNwdV90b19s ZTMyKDB4MDA4RCkpCi0jZGVmaW5lIEhJRl9TVEFUVVNfU0xLX05FR09fU1VDQ0VTUyAgICAgICAg ICAgICAgICAoY3B1X3RvX2xlMzIoMHgwMDlFKSkKLSNkZWZpbmUgSElGX1NUQVRVU19TTEtfTkVH T19GQUlMRUQgICAgICAgICAgICAgICAgIChjcHVfdG9fbGUzMigweDAwQUYpKQotI2RlZmluZSBI SUZfU1RBVFVTX1JPTExCQUNLX1NVQ0NFU1MgICAgICAgICAgICAgICAgKGNwdV90b19sZTMyKDB4 MTIzNCkpCi0jZGVmaW5lIEhJRl9TVEFUVVNfUk9MTEJBQ0tfRkFJTCAgICAgICAgICAgICAgICAg ICAoY3B1X3Rv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AvZGV2L251bGwKQEAgLTEsMzQ2ICswLDAgQEAKLS8qIFNQRFgtTGljZW5zZS1JZGVudGlm aWVyOiBBcGFjaGUtMi4wICovCi0vKgotICogV0YyMDAgaGFyZHdhcmUgaW50ZXJmYWNlIGRlZmlu aXRpb25zCi0gKgotICogQ29weXJpZ2h0IChjKSAyMDE4LTIwMjAsIFNpbGljb24gTGFib3JhdG9y aWVzIEluYy4KLSAqLwotCi0jaWZuZGVmIFdGWF9ISUZfQVBJX01JQl9ICi0jZGVmaW5lIFdGWF9I SUZfQVBJX01JQl9ICi0KLSNpbmNsdWRlICJoaWZfYXBpX2dlbmVyYWwuaCIKLQotI2RlZmluZSBI SUZfQVBJX0lQVjRfQUREUkVTU19TSVpFIDQKLSNkZWZpbmUgSElGX0FQSV9JUFY2X0FERFJFU1Nf U0laRSAxNgotCi1lbnVtIGhpZl9taWJfaWRzIHsKLQlISUZfTUlCX0lEX0dMX09QRVJBVElPTkFM X1BPV0VSX01PREUgICAgICAgID0gMHgyMDAwLAotCUhJRl9NSUJfSURfR0xfQkxPQ0tfQUNLX0lO Rk8gICAgICAgICAgICAgICAgPSAweDIwMDEsCi0JSElGX01JQl9JRF9HTF9TRVRfTVVMVElfTVNH ICAgICAgICAgICAgICAgICA9IDB4MjAwMiwKLQlISUZfTUlCX0lEX0NDQV9DT05GSUcgICAgICAg ICAgICAgICAgICAgICAgID0gMHgyMDAzLAotCUhJRl9NSUJfSURfRVRIRVJUWVBFX0RBVEFGUkFN RV9DT05ESVRJT04gICAgPSAweDIwMTAsCi0JSElGX01JQl9JRF9QT1JUX0RBVEFGUkFNRV9DT05E SVRJT04gICAgICAgICA9IDB4MjAxMSwKLQlISUZfTUlCX0lEX01BR0lDX0RBVEFGUkFNRV9DT05E SVRJT04gICAgICAgID0gMHgyMDEyLAotCUhJRl9NSUJfSURfTUFDX0FERFJfREFUQUZSQU1FX0NP TkRJVElPTiAgICAgPSAweDIwMTMsCi0JSElGX01JQl9JRF9JUFY0X0FERFJfREFUQUZSQU1FX0NP TkRJVElPTiAgICA9IDB4MjAxNCwKLQlISUZfTUlCX0lEX0lQVjZfQUREUl9EQVRBRlJBTUVfQ09O RElUSU9OICAgID0gMHgyMDE1LAotCUhJRl9NSUJfSURfVUNfTUNfQkNfREFUQUZSQU1FX0NPTkRJ VElPTiAgICAgPSAweDIwMTYsCi0JSElGX01JQl9JRF9DT05GSUdfREFUQV9GSUxURVIgICAgICAg ICAgICAgICA9IDB4MjAxNywKLQlISUZfTUlCX0lEX1NFVF9EQVRBX0ZJTFRFUklORyAgICAgICAg ICAgICAgID0gMHgyMDE4LAotCUhJRl9NSUJfSURfQVJQX0lQX0FERFJFU1NFU19UQUJMRSAgICAg ICAgICAgPSAweDIwMTksCi0JSElGX01JQl9JRF9OU19JUF9BRERSRVNTRVNfVEFCTEUgICAgICAg ICAgICA9IDB4MjAxQSwKLQlISUZfTUlCX0lEX1JYX0ZJTFRFUiAgICAgICAgICAgICAgICAgICAg ICAgID0gMHgyMDFCLAotCUhJRl9NSUJfSURfQkVBQ09OX0ZJTFRFUl9UQUJMRSAgICAgICAgICAg ICAgPSAweDIwMUMsCi0JSElGX01JQl9JRF9CRUFDT05fRklMVEVSX0VOQUJMRSAgICAgICAgICAg ICA9IDB4MjAxRCwKLQlISUZfTUlCX0lEX0dSUF9TRVFfQ09VTlRFUiAgICAgICAgICAgICAgICAg ID0gMHgyMDMwLAotCUhJRl9NSUJfSURfVFNGX0NPVU5URVIgICAgICAgICAgICAgICAgICAgICAg PSAweDIwMzEsCi0JSElGX01JQl9JRF9TVEFUSVNUSUNTX1RBQkxFICAgICAgICAgICAgICAgICA9 IDB4MjAzMiwKLQlISUZfTUlCX0lEX0NPVU5URVJTX1RBQkxFICAgICAgICAgICAgICAgICAgID0g MHgyMDMzLAotCUhJRl9NSUJfSURfTUFYX1RYX1BPV0VSX0xFVkVMICAgICAgICAgICAgICAgPSAw eDIwMzQsCi0JSElGX01JQl9JRF9FWFRFTkRFRF9DT1VOVEVSU19UQUJMRSAgICAgICAgICA9IDB4 MjAzNSwKLQlISUZfTUlCX0lEX0RPVDExX01BQ19BRERSRVNTICAgICAgICAgICAgICAgID0gMHgy MDQwLAotCUhJRl9NSUJfSURfRE9UMTFfTUFYX1RSQU5TTUlUX01TRFVfTElGRVRJTUUgPSAweDIw NDEsCi0JSElGX01JQl9JRF9ET1QxMV9NQVhfUkVDRUlWRV9MSUZFVElNRSAgICAgICA9IDB4MjA0 MiwKLQlISUZfTUlCX0lEX0RPVDExX1dFUF9ERUZBVUxUX0tFWV9JRCAgICAgICAgID0gMHgyMDQz LAotCUhJRl9NSUJfSURfRE9UMTFfUlRTX1RIUkVTSE9MRCAgICAgICAgICAgICAgPSAweDIwNDQs Ci0JSElGX01JQl9JRF9TTE9UX1RJTUUgICAgICAgICAgICAgICAgICAgICAgICA9IDB4MjA0NSwK LQlISUZfTUlCX0lEX0NVUlJFTlRfVFhfUE9XRVJfTEVWRUwgICAgICAgICAgID0gMHgyMDQ2LAot CUhJRl9NSUJfSURfTk9OX0VSUF9QUk9URUNUSU9OICAgICAgICAgICAgICAgPSAweDIwNDcsCi0J SElGX01JQl9JRF9URU1QTEFURV9GUkFNRSAgICAgICAgICAgICAgICAgICA9IDB4MjA0OCwKLQlI SUZfTUlCX0lEX0JFQUNPTl9XQUtFVVBfUEVSSU9EICAgICAgICAgICAgID0gMHgyMDQ5LAotCUhJ Rl9NSUJfSURfUkNQSV9SU1NJX1RIUkVTSE9MRCAgICAgICAgICAgICAgPSAweDIwNEEsCi0JSElG X01JQl9JRF9CTE9DS19BQ0tfUE9MSUNZICAgICAgICAgICAgICAgICA9IDB4MjA0QiwKLQlISUZf TUlCX0lEX09WRVJSSURFX0lOVEVSTkFMX1RYX1JBVEUgICAgICAgID0gMHgyMDRDLAotCUhJRl9N SUJfSURfU0VUX0FTU09DSUFUSU9OX01PREUgICAgICAgICAgICAgPSAweDIwNEQsCi0JSElGX01J Ql9JRF9TRVRfVUFQU0RfSU5GT1JNQV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nKSB7IG1zZywgI21zZyB9LAotICoKLSAqICAgNS4gbGlzdF9uYW1lIGNhbiBub3cg bmVhcmx5IGJlIHVzZWQgd2l0aCBfX3ByaW50X3N5bWJvbGljKCkgYnV0LAotICogICAgICBfX3By aW50X3N5bWJvbGljKCkgZGlzbGlrZSBsYXN0IGNvbW1hIG9mIGxpc3QuIFNvIHdlIGRlZmluZSBh IG5ldyBsaXN0Ci0gKiAgICAgIHdpdGggYSBkdW1teSBlbGVtZW50OgotICoKLSAqICAgICAgICAg ICNkZWZpbmUgbGlzdF9mb3JfcHJpbnRfc3ltYm9saWMgbGlzdF9uYW1lcyB7IC0xLCBOVUxMIH0K LSAqLwotCi0jZGVmaW5lIF9oaWZfbXNnX2xpc3QgICAgICAgICAgICAgICAgICAgICAgIFwKLQlo aWZfY25mX25hbWUoQUREX0tFWSkgICAgICAgICAgICAgICBcCi0JaGlmX2NuZl9uYW1lKEJFQUNP Tl9UUkFOU01JVCkgICAgICAgXAotCWhpZl9jbmZfbmFtZShFRENBX1FVRVVFX1BBUkFNUykgICAg IFwKLQloaWZfY25mX25hbWUoSk9JTikgICAgICAgICAgICAgICAgICBcCi0JaGlmX2NuZl9uYW1l KE1BUF9MSU5LKSAgICAgICAgICAgICAgXAotCWhpZl9jbmZfbmFtZShSRUFEX01JQikgICAgICAg ICAgICAgIFwKLQloaWZfY25mX25hbWUoUkVNT1ZFX0tFWSkgICAgICAgICAgICBcCi0JaGlmX2Nu Zl9uYW1lKFJFU0VUKSAgICAgICAgICAgICAgICAgXAotCWhpZl9jbmZfbmFtZShTRVRfQlNTX1BB UkFNUykgICAgICAgIFwKLQloaWZfY25mX25hbWUoU0VUX1BNX01PREUpICAgICAgICAgICBcCi0J aGlmX2NuZl9uYW1lKFNUQVJUKSAgICAgICAgICAgICAgICAgXAotCWhpZl9jbmZfbmFtZShTVEFS VF9TQ0FOKSAgICAgICAgICAgIFwKLQloaWZfY25mX25hbWUoU1RPUF9TQ0FOKSAgICAgICAgICAg ICBcCi0JaGlmX2NuZl9uYW1lKFRYKSAgICAgICAgICAgICAgICAgICAgXAotCWhpZl9jbmZfbmFt ZShNVUxUSV9UUkFOU01JVCkgICAgICAgIFwKLQloaWZfY25mX25hbWUoVVBEQVRFX0lFKSAgICAg ICAgICAgICBcCi0JaGlmX2NuZl9uYW1lKFdSSVRFX01JQikgICAgICAgICAgICAgXAotCWhpZl9j bmZfbmFtZShDT05GSUdVUkFUSU9OKSAgICAgICAgIFwKLQloaWZfY25mX25hbWUoQ09OVFJPTF9H UElPKSAgICAgICAgICBcCi0JaGlmX2NuZl9uYW1lKFBSRVZFTlRfUk9MTEJBQ0spICAgICAgXAot CWhpZl9jbmZfbmFtZShTRVRfU0xfTUFDX0tFWSkgICAgICAgIFwKLQloaWZfY25mX25hbWUoU0xf Q09ORklHVVJFKSAgICAgICAgICBcCi0JaGlmX2NuZl9uYW1lKFNMX0VYQ0hBTkdFX1BVQl9LRVlT KSAgXAotCWhpZl9jbmZfbmFtZShTSFVUX0RPV04pICAgICAgICAgICAgIFwKLQloaWZfaW5kX25h bWUoRVZFTlQpICAgICAgICAgICAgICAgICBcCi0JaGlmX2luZF9uYW1lKEpPSU5fQ09NUExFVEUp ICAgICAgICAgXAotCWhpZl9pbmRfbmFtZShSWCkgICAgICAgICAgICAgICAgICAgIFwKLQloaWZf aW5kX25hbWUoU0NBTl9DTVBMKSAgICAgICAgICAgICBcCi0JaGlmX2luZF9uYW1lKFNFVF9QTV9N T0RFX0NNUEwpICAgICAgXAotCWhpZl9pbmRfbmFtZShTVVNQRU5EX1JFU1VNRV9UWCkgICAgIFwK LQloaWZfaW5kX25hbWUoU0xfRVhDSEFOR0VfUFVCX0tFWVMpICBcCi0JaGlmX2luZF9uYW1lKEVS Uk9SKSAgICAgICAgICAgICAgICAgXAotCWhpZl9pbmRfbmFtZShFWENFUFRJT04pICAgICAgICAg ICAgIFwKLQloaWZfaW5kX25hbWUoR0VORVJJQykgICAgICAgICAgICAgICBcCi0JaGlmX2lu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9QRVJJT0QpICAgICAgICAgICBcCi0JaGlmX21pYl9u YW1lKEJMT0NLX0FDS19QT0xJQ1kpICAgICAgICAgICAgICAgXAotCWhpZl9taWJfbmFtZShDQ0Ff Q09ORklHKSAgICAgICAgICAgICAgICAgICAgIFwKLQloaWZfbWliX25hbWUoQ09ORklHX0RBVEFf RklMVEVSKSAgICAgICAgICAgICBcCi0JaGlmX21pYl9uYW1lKENPVU5URVJTX1RBQkxFKSAgICAg ICAgICAgICAgICAgXAotCWhpZl9taWJfbmFtZShDVVJSRU5UX1RYX1BPV0VSX0xFVkVMKSAgICAg ICAgIFwKLQloaWZfbWliX25hbWUoRE9UMTFfTUFDX0FERFJFU1MpICAgICAgICAgICAgICBcCi0J aGlmX21pYl9uYW1lKERPVDExX01BWF9SRUNFSVZFX0xJRkVUSU1FKSAgICAgXAotCWhpZl9taWJf bmFtZShET1QxMV9NQVhfVFJBTlNNSVRfTVNEVV9MSUZFVElNRSkgXAotCWhpZl9taWJfbmFtZShE T1QxMV9SVFNfVEhSRVNIT0xEKSAgICAgICAgICAgIFwKLQloaWZfbWliX25hbWUoRE9UMTFfV0VQ X0RFRkFVTFRfS0VZX0lEKSAgICAgICBcCi0JaGlmX21pYl9uYW1lKEVUSEVSVFlQRV9EQVRBRlJB TUVfQ09ORElUSU9OKSAgXAotCWhpZl9taWJfbmFtZShFWFRFTkRFRF9DT1VOVEVSU19UQUJMRSkg ICAgICAgIFwKLQloaWZfbWliX25hbWUoR0xfQkxPQ0tfQUNLX0lORk8pICAgICAgICAgICAgICBc Ci0JaGlmX21pYl9uYW1lKEdMX09QRVJBVElPTkFMX1BPV0VSX01PREUpICAgICAgXAotCWhpZl9t aWJfbmFtZShHTF9TRVRfTVVMVElfTVNHKSAgICAgICAgICAgICAgIFwKLQloaWZfbWliX25hbWUo R1JQX1NFUV9DT1VOVEVSKSAgICAgICAgICAgICAgICBcCi0JaGlmX21pYl9uYW1lKElOQUNUSVZJ VFlfVElNRVIpICAgICAgICAgICAgICAgXAotCWhpZl9taWJfbmFtZShJTlRFUkZBQ0VfUFJPVEVD VElPTikgICAgICAgICAgIFwKLQloaWZfbWliX25hbWUoSVBWNF9BRERSX0RBVEFGUkFNRV9DT05E SVRJT04pICBcCi0JaGlmX21pYl9uYW1lKElQVjZfQUREUl9EQVRBRlJBTUVfQ09ORElUSU9OKSAg XAotCWhpZl9taWJfbmFtZShLRUVQX0FMSVZFX1BFUklPRCkgICAgICAgICAgICAgIFwKLQloaWZf bWliX25hbWUoTUFDX0FERFJfREFUQUZSQU1FX0NPTkRJVElPTikgICBcCi0JaGlmX21pYl9uYW1l KE1BR0lDX0RBVEFGUkFNRV9DT05ESVRJT04pICAgICAgXAotCWhpZl9taWJfbmFtZShNQVhfVFhf UE9XRVJfTEVWRUwpICAgICAgICAgICAgIFwKLQloaWZfbWliX25hbWUoTk9OX0VSUF9QUk9URUNU SU9OKSAgICAgICAgICAgICBcCi0JaGlmX21pYl9uYW1lKE5TX0lQX0FERFJFU1NFU19UQUJMRSkg ICAgICAgICAgXAotCWhpZl9taWJfbmFtZShPVkVSUklERV9JTlRFUk5BTF9UWF9SQVRFKSAgICAg IFwKLQloaWZfbWliX25hbWUoUE9SVF9EQVRBRlJBTUVfQ09ORElUSU9OKSAgICAgICBcCi0JaGlm X21pYl9uYW1lKFBST1RFQ1RFRF9NR01UX1BPTElDWSkgICAgICAgICAgXAotCWhpZl9taWJfbmFt ZShSQ1BJX1JTU0lfVEhSRVNIT0xEKSAgICAgICAgICAgIFwKLQloaWZfbWliX25hbWUoUlhfRklM VEVSKSAgICAgICAgICAgICAgICAgICAgICBcCi0JaGlmX21pYl9uYW1lKFNFVF9BU1NPQ0lBVElP Tl9NT0RFKSAgICAgICAgICAgXAotCWhpZl9taWJfbmFtZShTRVRfREFUQV9GSUxURVJJTkcpICAg ICAgICAgICAgIFwKLQloaWZfbWliX25hbWUoU0VUX0hUX1BST1RFQ1RJT04pICAgICAgICAgICAg ICBcCi0JaGlmX21pYl9uYW1l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