From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by spool.mail.gandi.net (Postfix) with ESMTPS id 410CAAC1AAD for ; Fri, 10 Nov 2023 23:59:19 +0000 (UTC) DKIM-Signature: a=rsa-sha256; bh=LwQ0TPPwmgd90ILlrBx7gm7Y5VwE8jAIKNykHkYL1UU=; c=relaxed/simple; d=groups.io; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References:MIME-Version:Precedence:List-Subscribe:List-Help:Sender:List-Id:Mailing-List:Delivered-To:Reply-To:List-Unsubscribe-Post:List-Unsubscribe:Content-Transfer-Encoding:Content-Type; s=20140610; t=1699660757; v=1; b=jMcAu50FJupB9EHQY4K+DA3ejrD3g3CFPgqVogykzSSU9JiFQeVuZJeUrwSnFbBrCRJbgqQL qjaamWwh85QueL4HwNs1I4XIxw/8oFr+ej2bfh8B2CtwFqY4TppZFhoJLWOdcS3OoKwJdOQcO9P f4hkzG/wJ+X3VwT/MjnUf0oM= X-Received: by 127.0.0.2 with SMTP id rs72YY7687511xxyV3W9Nwza; Fri, 10 Nov 2023 15:59:17 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web11.42825.1699660756967789959 for ; Fri, 10 Nov 2023 15:59:17 -0800 X-Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-695-HNFFaV-3OYG_GBDueFLBYw-1; Fri, 10 Nov 2023 18:59:13 -0500 X-MC-Unique: HNFFaV-3OYG_GBDueFLBYw-1 X-Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4E7B43C0C485; Fri, 10 Nov 2023 23:59:13 +0000 (UTC) X-Received: from lacos-laptop-9.usersys.redhat.com (unknown [10.39.192.173]) by smtp.corp.redhat.com (Postfix) with ESMTP id 32FD9C1596F; Fri, 10 Nov 2023 23:59:12 +0000 (UTC) From: "Laszlo Ersek" To: devel@edk2.groups.io Cc: Ard Biesheuvel , Gerd Hoffmann , Jiewen Yao Subject: [edk2-devel] [PATCH 09/37] OvmfPkg: remove Csm/BiosThunk/VideoDxe Date: Sat, 11 Nov 2023 00:57:52 +0100 Message-Id: <20231110235820.644381-10-lersek@redhat.com> In-Reply-To: <20231110235820.644381-1-lersek@redhat.com> References: <20231110235820.644381-1-lersek@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,lersek@redhat.com List-Unsubscribe-Post: List-Unsubscribe=One-Click List-Unsubscribe: X-Gm-Message-State: CSdR1HhC3YThRpFlUJsPmANzx7686176AA= Content-Transfer-Encoding: base64 Content-Type: text/plain; charset="US-ASCII"; x-default=true X-GND-Status: LEGIT Authentication-Results: spool.mail.gandi.net; dkim=pass header.d=groups.io header.s=20140610 header.b=jMcAu50F; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=redhat.com (policy=none); spf=pass (spool.mail.gandi.net: domain of bounce@groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce@groups.io Q3NtL0Jpb3NUaHVuay9WaWRlb0R4ZSBpcyBub3QgdXNlZCBieSBhbnkgcGxhdGZvcm0gYXQgdGhp cyBwb2ludCwgcmVtb3ZlCml0LgoKVGhpcyBwYXRjaCByZW1vdmVzIG1lbnRpb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bHV0aW9uOw0KLSAgVUlOVDMyICAgICAgICAgICAgICAg ICAgICAgICAgVmVydGljYWxSZXNvbHV0aW9uOw0KLSAgVUlOVDMyICAgICAgICAgICAgICAgICAg ICAgICAgQ29sb3JEZXB0aDsNCi0gIFVJTlQzMiAgICAgICAgICAgICAgICAgICAgICAgIFJlZnJl c2hSYXRlOw0KLSAgVUlOVDMyICAgICAgICAgICAgICAgICAgICAgICAgQml0c1BlclBpeGVsOw0K LSAgQklPU19WSURFT19DT0xPUl9QTEFDRU1FTlQgICAgUmVkOw0KLSAgQklPU19WSURFT19DT0xP Ul9QTEFDRU1FTlQgICAgR3JlZW47DQotICBCSU9TX1ZJREVPX0NPTE9SX1BMQUNFTUVOVCAgICBC bHVlOw0KLSAgQklPU19WSURFT19DT0xPUl9QTEFDRU1FTlQgICAgUmVzZXJ2ZWQ7DQotICBFRklf R1JBUEhJQ1NfUElYRUxfRk9STUFUICAgICBQaXhlbEZvcm1hdDsNCi0gIEVGSV9QSVhFTF9CSVRN QVNLICAgICAgICAgICAgIFBpeGVsQml0TWFzazsNCi19IEJJT1NfVklERU9fTU9ERV9EQVRBOw0K LQ0KLS8vDQotLy8gQklPUyB2aWRlbyBjaGlsZCBoYW5kbGUgcHJpdmF0ZSBkYXRhIFN0cnVjdHVy ZQ0KLS8vDQotI2RlZmluZSBCSU9TX1ZJREVPX0RFVl9TSUdOQVRVUkUgIFNJR05BVFVSRV8zMiAo J0InLCAnVicsICdNJywgJ3AnKQ0KLQ0KLXR5cGVkZWYgc3RydWN0IHsNCi0gIFVJTlROICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU2lnbmF0dXJlOw0KLSAgRUZJX0hB TkRMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIYW5kbGU7DQotDQotICAv Lw0KLSAgLy8gQ29uc3VtZWQgUHJvdG9jb2xzDQotICAvLw0KLSAgRUZJX1BDSV9JT19QUk9UT0NP TCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqUGNpSW87DQotICBFRklfTEVHQUNZX0JJT1Nf UFJPVE9DT0wgICAgICAgICAgICAgICAgICAgICAgICpMZWdhY3lCaW9zOw0KLQ0KLSAgLy8NCi0g IC8vIFByb2R1Y2VkIFByb3RvY29scw0KLSAgLy8NCi0gIEVGSV9HUkFQSElDU19PVVRQVVRfUFJP VE9DT0wgICAgICAgICAgICAgICAgICAgR3JhcGhpY3NPdXRwdXQ7DQotICBFRklfRURJRF9ESVND T1ZFUkVEX1BST1RPQ09MICAgICAgICAgICAgICAgICAgIEVkaWREaXNjb3ZlcmVkOw0KLSAgRUZJ X0VESURfQUNUSVZFX1BST1RPQ09MICAgICAgICAgICAgICAgICAgICAgICBFZGlkQWN0aXZlOw0K LSAgRUZJX1ZHQV9NSU5JX1BPUlRfUFJPVE9DT0wgICAgICAgICAgICAgICAgICAgICBWZ2FNaW5p UG9ydDsNCi0NCi0gIC8vDQotICAvLyBHZW5lcmFsIGZpZWxkcw0KLSAgLy8NCi0gIEJPT0xFQU4g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmdhQ29tcGF0aWJsZTsNCi0g IEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUHJvZHVjZUdy YXBoaWNzT3V0cHV0Ow0KLQ0KLSAgLy8NCi0gIC8vIEdyYXBoaWNzIE91dHB1dCBQcm90b2NvbCBy ZWxhdGVkIGZpZWxkcw0KLSAgLy8NCi0gIEJPT0xFQU4gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgSGFyZHdhcmVOZWVkc1N0YXJ0aW5nOw0KLSAgVUlOVE4gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDdXJyZW50TW9kZTsNCi0gIFVJTlROICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTWF4TW9kZTsNCi0gIEJJT1Nf VklERU9fTU9ERV9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgKk1vZGVEYXRhOw0KLSAg VUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqTGluZUJ1ZmZl cjsNCi0gIEVGSV9HUkFQSElDU19PVVRQVVRfQkxUX1BJWEVMICAgICAgICAgICAgICAgICAgKlZi ZUZyYW1lQnVmZmVyOw0KLSAgVUlOVDggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAqVmdhRnJhbWVCdWZmZXI7DQotDQotICAvLw0KLSAgLy8gVkVTQSBCaW9zIEV4dGVu c2lvbnMgcmVsYXRlZCBmaWVsZHMNCi0gIC8vDQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIE51bWJlck9mUGFnZXNCZWxvdzFNQjsgICAgLy8gTnVtYmVy IG9mIDRLQiBwYWdlcyBpbiBQYWdlc0JlbG93MU1CDQotICBFRklfUEhZU0lDQUxfQUREUkVTUyAg ICAgICAgICAgICAgICAgICAgICAgICAgIFBhZ2VzQmVsb3cxTUI7ICAgICAgICAgICAgLy8gQnVm ZmVyIGZvciBhbGwgVkJFIEluZm9ybWF0aW9uIEJsb2Nrcw0KLSAgVkVTQV9CSU9TX0VYVEVOU0lP TlNfSU5GT1JNQVRJT05fQkxPQ0sgICAgICAgICAqVmJlSW5mb3JtYXRpb25CbG9jazsgICAgIC8v IDB4MjAwIGJ5dGVzLiAgTXVzdCBiZSBhbGxvY2F0ZWQgYmVsb3cgMU1CDQotICBWRVNBX0JJT1Nf RVhURU5TSU9OU19NT0RFX0lORk9STUFUSU9OX0JMT0NLICAgICpWYmVNb2RlSW5mb3JtYXRpb25C bG9jazsgLy8gMHgxMDAgYnl0ZXMuICBNdXN0IGJlIGFsbG9jYXRlZCBiZWxvdyAxTUINCi0gIFZF U0FfQklPU19FWFRFTlNJT05TX0VESURfREFUQV9CTE9DSyAgICAgICAgICAgKlZiZUVkaWREYXRh Qmxv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pY2VSZWxlYXNlUmVz b3VyY2UgKA0KLSAgQklPU19WSURFT19ERVYgICpCaW9zVmlkZW9Qcml2YXRlDQotICApOw0KLQ0K LS8vDQotLy8gQklPUyBHcmFwaGljcyBPdXRwdXQgUHJvdG9jb2wgZnVuY3Rpb25zDQotLy8NCi0N Ci0vKioNCi0gIEdyYXBoaWNzIE91dHB1dCBwcm90b2NvbCBpbnRlcmZhY2UgdG8gZ2V0IHZpZGVv IG1vZGUuDQotDQotICBAcGFyYW0gIFRoaXMgICAgICAgICAgICAgICAgICAgUHJvdG9jb2wgaW5z dGFuY2UgcG9pbnRlci4NCi0gIEBwYXJhbSAgTW9kZU51bWJlciAgICAgICAgICAgICBUaGUgbW9k ZSBudW1iZXIgdG8gcmV0dXJuIGluZm9ybWF0aW9uIG9uLg0KLSAgQHBhcmFtICBTaXplT2ZJbmZv ICAgICAgICAgICAgIEEgcG9pbnRlciB0byB0aGUgc2l6ZSwgaW4gYnl0ZXMsIG9mIHRoZSBJbmZv DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyLg0KLSAgQHBhcmFtICBJ bmZvICAgICAgICAgICAgICAgICAgIENhbGxlciBhbGxvY2F0ZWQgYnVmZmVyIHRoYXQgcmV0dXJu cyBpbmZvcm1hdGlvbg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFib3V0IE1v ZGVOdW1iZXIuDQotDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgTW9kZSBpbmZv cm1hdGlvbiByZXR1cm5lZC4NCi0gIEByZXR2YWwgRUZJX0JVRkZFUl9UT09fU01BTEwgICBUaGUg SW5mbyBidWZmZXIgd2FzIHRvbyBzbWFsbC4NCi0gIEByZXR2YWwgRUZJX0RFVklDRV9FUlJPUiAg ICAgICBBIGhhcmR3YXJlIGVycm9yIG9jY3VycmVkIHRyeWluZyB0byByZXRyaWV2ZSB0aGUNCi0g ICAgICAgICAgICAgICAgICAgICAgICAg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gICAgICAgICAgICAgQmx0T3BlcmF0aW9uDQot ICBAcGFyYW0gIERlc3RpbmF0aW9uWSAgICAgICAgICAgVGhlIFkgY29vcmRpbmF0ZSBvZiB0aGUg ZGVzdGluYXRpb24gZm9yDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmx0T3Bl cmF0aW9uDQotICBAcGFyYW0gIFdpZHRoICAgICAgICAgICAgICAgICAgVGhlIHdpZHRoIG9mIGEg cmVjdGFuZ2xlIGluIHRoZSBibHQgcmVjdGFuZ2xlIGluDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgcGl4ZWxzDQotICBAcGFyYW0gIEhlaWdodCAgICAgICAgICAgICAgICAgVGhl IGhlaWdodCBvZiBhIHJlY3RhbmdsZSBpbiB0aGUgYmx0IHJlY3RhbmdsZSBpbg0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHBpeGVscw0KLSAgQHBhcmFtICBEZWx0YSAgICAgICAg ICAgICAgICAgIE5vdCB1c2VkIGZvciBFZmlCbHRWaWRlb0ZpbGwgYW5kDQotICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgRWZpQmx0VmlkZW9Ub1ZpZGVvIG9wZXJhdGlvbi4gSWYgYSBE ZWx0YSBvZiAwIGlzDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdXNlZCwgdGhl IGVudGlyZSBCbHRCdWZmZXIgd2lsbCBiZSBvcGVyYXRlZCBvbi4gSWYNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBhIHN1YnJlY3RhbmdsZSBvZiB0aGUgQmx0QnVmZmVyIGlzIHVz ZWQsIHRoZW4NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZWx0YSByZXByZXNl bnRzIHRoZSBudW1iZXIgb2YgYnl0ZXMgaW4gYSByb3cgb2YNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB0aGUgQmx0QnVmZmVyLg0KLQ0KLSAgQHJldHZhbCBFRklfSU5WQUxJRF9Q QVJBTUVURVIgIEludmFsaWQgcGFyYW1ldGVyIHBhc3NlZCBpbg0KLSAgQHJldHZhbCBFRklfU1VD Q0VTUyAgICAgICAgICAgIEJsdCBvcGVyYXRpb24gc3VjY2Vzcw0KLQ0KLSoqLw0KLUVGSV9TVEFU VVMNCi1FRklBUEkNCi1CaW9zVmlkZW9HcmFwaGljc091dHB1dFZiZUJsdCAoDQotICBJTiAgRUZJ X0dSQVBISUNTX09VVFBVVF9QUk9UT0NPTCAgICAgICAqVGhpcywNCi0gIElOICBFRklfR1JBUEhJ Q1NfT1VUUFVUX0JMVF9QSVhFTCAgICAgICpCbHRCdWZmZXIgIE9QVElPTkFMLA0KLSAgSU4gIEVG SV9HUkFQSElDU19PVVRQVVRfQkxUX09QRVJBVElPTiAgQmx0T3BlcmF0aW9uLA0KLSAgSU4gIFVJ TlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU291cmNlWCwNCi0gIElOICBVSU5UTiAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNvdXJjZVksDQotICBJTiAgVUlOVE4gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBEZXN0aW5hdGlvblgsDQotICBJTiAgVUlOVE4gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBEZXN0aW5hdGlvblksDQotICBJTiAgVUlOVE4gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBXaWR0aCwNCi0gIElOICBVSU5UTiAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIEhlaWdodCwNCi0gIElOICBVSU5UTiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIERlbHRhDQotICApOw0KLQ0KLS8qKg0KLSAgR3JhcGhpY3MgT3V0cHV0IHByb3Rv Y29sIGluc3RhbmNlIHRvIGJsb2NrIHRyYW5zZmVyIGZvciBWR0EgZGV2aWNlLg0KLQ0KLSAgQHBh cmFtICBUaGlzICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gR3JhcGhpY3MgT3V0cHV0IHBy b3RvY29sIGluc3RhbmNlDQotICBAcGFyYW0gIEJsdEJ1ZmZlciAgICAgICAgICAgICAgVGhlIGRh dGEgdG8gdHJhbnNmZXIgdG8gc2NyZWVuDQotICBAcGFyYW0gIEJsdE9wZXJhdGlvbiAgICAgICAg ICAgVGhlIG9wZXJhdGlvbiB0byBwZXJmb3JtDQotICBAcGFyYW0gIFNvdXJjZVggICAgICAgICAg ICAgICAgVGhlIFggY29vcmRpbmF0ZSBvZiB0aGUgc291cmNlIGZvciBCbHRPcGVyYXRpb24NCi0g IEBwYXJhbSAgU291cmNlWSAgICAgICAgICAgICAgICBUaGUgWSBjb29yZGluYXRlIG9mIHRoZSBz b3VyY2UgZm9yIEJsdE9wZXJhdGlvbg0KLSAgQHBhcmFtICBEZXN0aW5hdGlvblggICAgICAgICAg IFRoZSBYIGNvb3JkaW5hdGUgb2YgdGhlIGRlc3RpbmF0aW9uIGZvcg0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIEJsdE9wZXJhdGlvbg0KLSAgQHBhcmFtICBEZXN0aW5hdGlvblkg ICAgICAgICAgIFRoZSBZIGNvb3JkaW5hdGUgb2YgdGhlIGRlc3RpbmF0aW9uIGZvcg0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJsdE9wZXJhdGlvbg0KLSAgQHBhcmFtICBXaWR0 aCAgICAgICAgICAgICAgICAgIFRoZSB3aWR0aCBvZiBhIHJlY3RhbmdsZSBpbiB0aGUgYmx0IHJl Y3RhbmdsZSBpbg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpeGVscw0KLSAg QHBhcmFtICBIZWlnaHQgICAgICAgICAgICAgICAgIFRoZSBoZWlnaHQgb2YgYSByZWN0YW5nbGUg aW4gdGhlIGJsdCByZWN0YW5nbGUgaW4NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBwaXhlbHMNCi0gIE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ICAgICAgICAg ICAgICAgICAgIFNvdXJjZVgsDQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICBTb3VyY2VZLA0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg RGVzdGluYXRpb25YLA0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg RGVzdGluYXRpb25ZLA0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg V2lkdGgsDQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIZWlnaHQs DQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZWx0YQ0KLSAgKTsN Ci0NCi0vLw0KLS8vIEJJT1MgVkdBIE1pbmkgUG9ydCBQcm90b2NvbCBmdW5jdGlvbnMNCi0vLw0K LQ0KLS8qKg0KLSAgVmdhTWluaVBvcnQgcHJvdG9jb2wgaW50ZXJmYWNlIHRvIHNldCBtb2RlLg0K LQ0KLSAgQHBhcmFtICBUaGlzICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gVmdhTWluaVBv cnQgcHJvdG9jb2wgaW5zdGFuY2UNCi0gIEBwYXJhbSAgTW9kZU51bWJlciAgICAgICAgICAgICBU aGUgaW5kZXggb2YgdGhlIG1vZGUNCi0NCi0gIEByZXR2YWwgRUZJX1VOU1VQUE9SVEVEICAgICAg ICBUaGUgcmVxdWVzdGVkIG1vZGUgaXMgbm90IHN1cHBvcnRlZA0KLSAgQHJldHZhbCBFRklfU1VD Q0VTUyAgICAgICAgICAgIFRoZSByZXF1ZXN0ZWQgbW9kZSBpcyBzZXQgc3VjY2Vzc2Z1bGx5DQot DQotKiovDQotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLUJpb3NWaWRlb1ZnYU1pbmlQb3J0U2V0TW9k ZSAoDQotICBJTiAgRUZJX1ZHQV9NSU5JX1BPUlRfUFJPV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WZmZXIgaWYgREw9MSBvciBETD0yDQot ICAgIE91dHB1dHM6DQotICAgICAgQVggICAgPSBSZXR1cm4gU3RhdHVzDQotICAgICAgQlggICAg PSBOdW1iZXIgb2YgNjQgYnl0ZSBibG9ja3MgdG8gaG9sZCB0aGUgc3RhdGUgYnVmZmVyIGlmIERM PTANCi0NCi0tLSovDQotI2RlZmluZSBWRVNBX0JJT1NfRVhURU5TSU9OU19FRElEICAweDRmMTUN Ci0NCi0vKisrDQotDQotICBSb3V0aW5lIERlc2NyaXB0aW9uOg0KLSAgICBGdW5jdGlvbiAxNSA6 IGltcGxlbWVudCBWQkUvRERDIHNlcnZpY2UNCi0NCi0gIEFyZ3VtZW50czoNCi0gICAgSW5wdXRz Og0KLSAgICAgIEFYICAgID0gMHg0ZjE1DQotICAgICAgQkwgICAgPSAweDAwIC0gUmVwb3J0IFZC RS9EREMgQ2FwYWJpbGl0aWVzDQotICAgICAgQ1ggICAgPSAweDAwIC0gQ29udHJvbGxlciB1bml0 IG51bWJlciAoMDAgPSBwcmltYXJ5IGNvbnRyb2xsZXIpDQotICAgICAgRVM6REkgPSBOdWxsIHBv aW50ZXIsIG11c3QgYmUgMDowIGluIHZlcnNpb24gMS4wDQotICAgIE91dHB1dHM6DQotICAgICAg QVggICAgPSBSZXR1cm4gU3RhdHVzDQotICAgICAgQkggICAgPSBBcHByb3guIHRpbWUgaW4gc2Vj b25kcywgcm91bmRlZCB1cCwgdG8gdHJhbnNmZXIgb25lIEVESUQgYmxvY2soMTI4IGJ5dGVzKQ0K LSAgICAgIEJMICAgID0gRERDIGxldmVsIHN1cHBvcnRlZA0KLSAgICAgICAgRDAgID0gMCBEREMx IG5vdCBzdXBwb3J0ZWQNCi0gICAgICAgICAgICA9IDEgRERDMSBzdXBwb3J0ZWQNCi0gICAgICAg IEQxICA9IDAgRERDMiBub3Qgc3VwcG9ydGVkDQotICAgICAgICAgICAgPSAxIEREQzIgc3VwcG9y dGVkDQotICAgICAgICBEMiAgPSAwIF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gICAgUmVkWDsgICAgICAg ICAgICAgICAgICAgICAgICAgICAvLyBSZWQteCBCaXRzIDkgLSAyDQotICBVSU5UOCAgICAgUmVk WTsgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBSZWQteSBCaXRzIDkgLSAyDQotICBVSU5U OCAgICAgR3JlZW5YOyAgICAgICAgICAgICAgICAgICAgICAgICAvLyBHcmVlbi14IEJpdHMgOSAt IDINCi0gIFVJTlQ4ICAgICBHcmVlblk7ICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEdyZWVu LXkgQml0cyA5IC0gMg0KLSAgVUlOVDggICAgIEJsdWVYOyAgICAgICAgICAgICAgICAgICAgICAg ICAgLy8gQmx1ZS14IEJpdHMgOSAtIDINCi0gIFVJTlQ4ICAgICBCbHVlWTsgICAgICAgICAgICAg ICAgICAgICAgICAgIC8vIEJsdWUteSBCaXRzIDkgLSAyDQotICBVSU5UOCAgICAgV2hpdGVYOyAg ICAgICAgICAgICAgICAgICAgICAgICAvLyBXaGl0ZS14IEJpdHMgOSAtIDINCi0gIFVJTlQ4ICAg ICBXaGl0ZVk7ICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdoaXRlLXggQml0cyA5IC0gMg0K LSAgVUlOVDggICAgIEVzdGFibGlzaGVkVGltaW5nc1tWRVNBX0JJT1NfRVhURU5TSU9OU19FU1RB QkxJU0hFRF9USU1JTkdfU0laRV07DQotICBVSU5UOCAgICAgU3RhbmRhcmRUaW1pbmdJZGVudGlm aWNhdGlvbltWRVNBX0JJT1NfRVhURU5TSU9OU19TVEFOREFSRF9USU1JTkdfU0laRV07DQotICBV SU5UOCAgICAgRGV0YWlsZWRUaW1pbmdEZXNjcmlwdGlvbnNbVkVTQV9CSU9TX0VYVEVOU0lPTlNf REVUQUlMRURfVElNSU5HX0RFU0NSSVBUT1JfTUFYX1NJWkVdOw0KLSAgVUlOVDggICAgIEV4dGVu c2lvbkZsYWc7ICAgICAgICAgICAgICAgICAgLy8gTnVtYmVyIG9mI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otLy8NCi0vLyBXaW5kb3cgRnVuY3Rpb24N Ci0vLw0KLXR5cGVkZWYNCi1WT0lEDQotKCpWRVNBX0JJT1NfRVhURU5TSU9OU19XSU5ET1dfRlVO Q1RJT04pICgNCi0gIFZPSUQNCi0gICk7DQotDQotLy8NCi0vLyBTdXBlciBWR0EgTW9kZSBJbmZv cm1hdGlvbiBCbG9jaw0KLS8vDQotdHlwZWRlZiBzdHJ1Y3Qgew0KLSAgLy8NCi0gIC8vIE1hbmFk b3J5IGZpZWxkcyBmb3IgYWxsIFZFU0EgQmlvcyBFeHRlbnNpb25zIHJldmlzaW9ucw0KLSAgLy8N Ci0gIFVJTlQxNiAgICBNb2RlQXR0cmlidXRlczsgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgLy8gTW9kZSBhdHRyaWJ1dGVzDQotICBVSU5UOCAgICAgV2luQUF0dHJpYnV0ZXM7ICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdpbmRvdyBBIGF0dHJpYnV0ZXMNCi0gIFVJTlQ4 ICAgICBXaW5CQXR0cmlidXRlczsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2lu ZG93IEIgYXR0cmlidXRlcw0KLSAgVUlOVDE2ICAgIFdpbkdyYW51bGFyaXR5OyAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAvLyBXaW5kb3cgZ3JhbnVsYXJpdHkgaW4gaw0KLSAgVUlOVDE2 ICAgIFdpblNpemU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBXaW5k b3cgc2l6ZSBpbiBrDQotICBVSU5UMTYgICAgV2luQVNlZ21lbnQ7ICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC8vIFdpbmRvdyBBIHNlZ21lbnQNCi0gIFVJTlQxNiAgICBXaW5CU2Vn bWVudDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2luZG93IEIgc2VnbWVu dA0KLSAgVUlOVDMyICAgIFdpbmRvd0Z1bmN0aW9uOyAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAvLyBQb2ludGVyIHRvIHdpbmRvdyBmdW5jdGlvbg0KLSAgVUlOVDE2ICAgIEJ5dGVzUGVy U2NhbkxpbmU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBCeXRlcyBwZXIgc2Nhbmxp bmUNCi0gIC8vDQotICAvLyBNYW5hZG9yeSBmaWVsZHMgZm9yIFZFU0EgQmlvcyBFeHRlbnNpb25z IDEuMiBhbmQgYWJvdmUNCi0gIC8vDQotICBVSU5UMTYgICAgWFJlc29sdXRpb247ICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBIb3Jpem9udGFsIHJlc29sdXRpb24NCi0g IFVJTlQxNiAgICBZUmVzb2x1dGlvbjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIC8vIFZlcnRpY2FsIHJlc29sdXRpb24NCi0gIFVJTlQ4ICAgICBYQ2hhclNpemU7ICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENoYXJhY3RlciBjZWxsIHdpZHRo DQotICBVSU5UOCAgICAgWUNoYXJTaXplOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAvLyBDaGFyYWN0ZXIgY2VsbCBoZWlnaHQNCi0gIFVJTlQ4ICAgICBOdW1iZXJPZlBs YW5lczsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE51bWJlciBvZiBtZW1v cnkgcGxhbmVzDQotICBVSU5UOCAgICAgQml0c1BlclBpeGVsOyAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAvLyBCaXRzIHBlciBwaXhlbA0KLSAgVUlOVDggICAgIE51bWJlck9m QmFua3M7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTnVtYmVyIG9mIENH QSBzdHlsZSBiYW5rcw0KLSAgVUlOVDggICAgIE1lbW9yeU1vZGVsOyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgLy8gTWVtb3J5IG1vZGVsIHR5cGUNCi0gIFVJTlQ4ICAgICBC YW5rU2l6ZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNpemUg b2YgQ0dBIHN0eWxlIGJhbmtzDQotICBVSU5UOCAgICAgTnVtYmVyT2ZJbWFnZVBhZ2VzOyAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOdW1iZXIgb2YgaW1hZ2VzIHBhZ2VzDQotICBV SU5UOCAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAvLyBSZXNlcnZlZA0KLSAgVUlOVDggICAgIFJlZE1hc2tTaXplOyAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgLy8gU2l6ZSBvZiBkaXJlY3QgY29sb3IgcmVkIG1hc2sNCi0g IFVJTlQ4ICAgICBSZWRGaWVsZFBvc2l0aW9uOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIC8vIEJpdCBwb3NuIG9mIGxzYiBvZiByZWQgbWFzaw0KLSAgVUlOVDggICAgIEdyZWVuTWFz a1NpemU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2l6ZSBvZiBkaXJl Y3QgY29sb3IgZ3JlZW4gbWFzaw0KLSAgVUlOVDggICAgIEdyZWVuRmllbGRQb3NpdGlvbjsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQml0IHBvc24gb2YgbHNiIG9mIGdyZWVuIG1h c2sNCi0gIFVJTlQ4ICAgICBCbHVlTWFza1NpemU7ICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIC8vIFNpemUgb2YgZGlyZWN0IGNvbG9yIGJsdWUgbWFzaw0KLSAgVUlOVDggICAg IEJsdWVGaWVsZFBvc2l0aW9uOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQml0 IHBvc24gb2YgbHNiIG9mIGJsdWUgbWFzaw0KLSAgVUlOVDggICAgIFJzdmRNYXNrU2l6ZTsgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2l6ZSBvZiBkaXJlY3QgY29sb3Ig cmVzIG1hc2sNCi0gIFVJTlQ4ICAgICBSc3ZkRmllbGRQb3NpdGlvbjsgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIC8vIEJpdCBwb3NuIG9mIGxzYiBvZiByZXMgbWFzaw0KLSAgVUlOVDgg ICAgIERpcmVjdENvbG9yTW9kZUluZm87ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g RGlyZWN0IGNvbG9yIG1vZGUgYXR0cmlidXRlcw0KLSAgLy8NCi0gIC8vIE1hbmFkb3J5IGZpZWxk cyBmb3IgVkVTQSBCaW9zIEV4dGVuc2lvbnMgMi4wIGFuZCBhYm92ZQ0KLSAgLy8NCi0gIFVJTlQz MiAgICBQaHlzQmFzZVB0cjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBQaHlzaWNh bCBBZGRyZXNzIGZvciBmbGF0IG1lbW9yeSBmcmFtZSBidWZmZXINCi0gIFVJTlQzMiAgICBSZXNl cnZlZDI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBSZXNlcnZlZA0KLSAgVUlO VDE2ICAgIFJlc2VydmVkMzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJlc2Vy dmVkDQotICAvLw0KLSAgLy8gTWFuYWRvcnkgZmllbGRzIGZvciBWRVNBIEJpb3MgRXh0ZW5zaW9u cyAzLjAgYW5kIGFib3ZlDQotICAvLw0KLSAgVUlOVDE2ICAgIExpbkJ5dGVzUGVyU2NhbkxpbmU7 ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBCeXRlcy9zY2FuIGxpbmUgZm9yIGxp bmVhciBtb2Rlcw0KLSAgVUlOVDggICAgIEJua051bWJlck9mSW1hZ2VQYWdlczsgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAvLyBOdW1iZXIgb2YgaW1hZ2VzIGZvciBiYW5rZWQgbW9kZXMN Ci0gIFVJTlQ4ICAgICBMaW5OdW1iZXJPZkltYWdlUGFnZXM7ICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgLy8gTnVtYmVyIG9mIGltYWdlcyBmb3IgbGluZWFyIG1vZGVzDQotICBVSU5UOCAg ICAgTGluUmVkTWFza1NpemU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8v IFNpemUgb2YgZGlyZWN0IGNvbG9yIHJlZCBtYXNrIChsaW5lYXIgbW9kZSkNCi0gIFVJTlQ4ICAg ICBMaW5SZWRGaWVsZFBvc2l0aW9uOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8g Qml0IHBvc2lpdG9uIG9mIGxzYiBvZiByZWQgbWFzayAobGluZWFyIG1vZGVzKQ0KLSAgVUlOVDgg ICAgIExpbkdyZWVuTWFza1NpemU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAv LyBTaXplIG9mIGRpcmVjdCBjb2xvciBncmVlbiBtYXNrIChsaW5lYXIgbW9kZSkNCi0gIFVJTlQ4 ICAgICBMaW5HcmVlbkZpZWxkUG9zaXRpb247ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg Ly8gQml0IHBvc2lpdG9uIG9mIGxzYiBvZiBncmVlbiBtYXNrIChsaW5lYXIgbW9kZXMpDQotICBV SU5UOCAgICAgTGluQmx1ZU1hc2tTaXplOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIC8vIFNpemUgb2YgZGlyZWN0IGNvbG9yIGJsdWUgbWFzayAobGluZWFyIG1vZGUpDQotICBV SU5UOCAgICAgTGluQmx1ZUZpZWxkUG9zaXRpb247ICAgICAgICAgICAgICAgICAgICAgICAgICAg IC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gICAgICAgICAgIENvbnRyb2xsZXIsDQotICBJTiBF RklfREVWSUNFX1BBVEhfUFJPVE9DT0wgICAgICpSZW1haW5pbmdEZXZpY2VQYXRoDQotICApDQot ew0KLSAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICBTdGF0dXM7DQotICBFRklfTEVHQUNZX0JJ T1NfUFJPVE9DT0wgICpMZWdhY3lCaW9zOw0KLSAgRUZJX1BDSV9JT19QUk9UT0NPTCAgICAgICAq UGNpSW87DQotICBQQ0lfVFlQRTAwICAgICAgICAgICAgICAgIFBjaTsNCi0gIEVGSV9ERVZfUEFU SCAgICAgICAgICAgICAgKk5vZGU7DQotDQotICAvLw0KLSAgLy8gU2VlIGlmIHRoZSBMZWdhY3kg QklPUyBQcm90b2NvbCBpcyBhdmFpbGFibGUNCi0gIC8vDQotICBTdGF0dXMgPSBnQlMtPkxvY2F0 ZVByb3RvY29sICgmZ0VmaUxlZ2FjeUJpb3NQcm90b2NvbEd1aWQsIE5VTEwsIChWT0lEICoqKSZM ZWdhY3lCaW9zKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgcmV0dXJuIFN0 YXR1czsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBPcGVuIHRoZSBJTyBBYnN0cmFjdGlvbihzKSBu ZWVkZWQgdG8gcGVyZm9ybSB0aGUgc3VwcG9ydGVkIHRlc3QNCi0gIC8vDQotICBTdGF0dXMgPSBn QlMtPk9wZW5Qcm90b2NvbCAoDQotICAgICAgICAgICAgICAgICAgQ29udHJvbGxlciwNCi0gICAg ICAgICAgICAgICAgICAmZ0VmaVBjaUlvUHJvdG9jb2xHdWlkLA0KLSAgICAgICAgICAgICAgICAg IChWT0lEICoqKSZQY2lJbywNCi0gICAgICAgICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5kaW5n SGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXIsDQotICAgICAgICAgICAgICAg ICAgRUZJX09QR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QNCi0gIC8vIENsYXNzIENv ZGUgUmVnaXN0ZXINCi0gIC8vDQotICBTdGF0dXMgPSBQY2lJby0+UGNpLlJlYWQgKA0KLSAgICAg ICAgICAgICAgICAgICAgICAgIFBjaUlvLA0KLSAgICAgICAgICAgICAgICAgICAgICAgIEVmaVBj aUlvV2lkdGhVaW50MzIsDQotICAgICAgICAgICAgICAgICAgICAgICAgMCwNCi0gICAgICAgICAg ICAgICAgICAgICAgICBzaXplb2YgKFBjaSkgLyBzaXplb2YgKFVJTlQzMiksDQotICAgICAgICAg ICAgICAgICAgICAgICAgJlBjaQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICk7DQotICBpZiAo RUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgIFN0YXR1cyA9IEVGSV9VTlNVUFBPUlRFRDsNCi0g ICAgZ290byBEb25lOw0KLSAgfQ0KLQ0KLSAgU3RhdHVzID0gRUZJX1VOU1VQUE9SVEVEOw0KLSAg aWYgKChQY2kuSGRyLkNsYXNzQ29kZVsyXSA9PSAweDAzKSB8fCAoKFBjaS5IZHIuQ2xhc3NDb2Rl WzJdID09IDB4MDApICYmIChQY2kuSGRyLkNsYXNzQ29kZVsxXSA9PSAweDAxKSkpIHsNCi0gICAg U3RhdHVzID0gRUZJX1NVQ0NFU1M7DQotICAgIC8vDQotICAgIC8vIElmIHRoaXMgaXMgYSBncmFw aGljcyBjb250cm9sbGVyLA0KLSAgICAvLyBnbyBmdXJ0aGVyIGNoZWNrIFJlbWFpbmluZ0Rldmlj ZVBhdGggdmFsaWRhdGlvbg0KLSAgICAvLw0KLSAgICBpZiAoUmVtYWluaW5nRGV2aWNlUGF0aCAh PSBOVUxMKSB7DQotICAgICAgTm9kZSA9IChFRklfREVWX1BBVEggKilSZW1haW5pbmdEZXZpY2VQ YXRoOw0KLSAgICAgIC8vDQotICAgICAgLy8gQ2hlY2sgaWYgUmVtYWluaW5nRGV2aWNlUGF0aCBp cyB0aGUgRW5kIG9mIERldmljZSBQYXRoIE5vZGUsDQotICAgICAgLy8gaWYgeWVzLCByZXR1cm4g RUZJX1NVQ0NFU1MNCi0gICAgICAvLw0KLSAgICAgIGlmICghSXNEZXZpY2VQYXRoRW5kIChOb2Rl KSkgew0KLSAgICAgICAgLy8NCi0gICAgICAgIC8vIElmIFJlbWFpbmluZ0RldmljZVBhdGggaXNu J3QgdGhlIEVuZCBvZiBEZXZpY2UgUGF0aCBOb2RlLA0KLSAgICAgICAgLy8gY2hlY2sgaXRzIHZh bGlkYXRpb24NCi0gICAgICAgIC8vDQotICAgICAgICBpZiAoKE5vZGUtPkRldlBhdGguVHlwZSAh PSBBQ1BJX0RFVklDRV9QQVRIKSB8fA0KLSAgICAgICAgICAgIChOb2RlLT5EZXZQYXRoLlN1YlR5 cGUgIT0gQUNQSV9BRFJfRFApIHx8DQotICAgICAgICAgICAgKERldmljZVBhdGhOb2RlTGVuZ3Ro ICgmTm9kZS0+RGV2UGF0aCkgPCBzaXplb2YgKEFDUElfQURSX0RFVklDRV9QQVRIKSkpDQotICAg ICAgICB7DQotICAgICAgICAgIFN0YXR1cyA9IEVGSV9VTlNVUFBPUlRFRDsNCi0gICAgICAgIH0N Ci0gICAgICB9DQotICAgIH0NCi0gIH0NCi0NCi1Eb25lOg0KLSAgZ0JTLT5DbG9zZVByb3RvY29s ICgNCi0gICAgICAgICBDb250cm9sbGVyLA0KLSAgICAgICAgICZnRWZpUGNpSW9Qcm90b2NvbEd1 aWQsDQotICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCi0gICAgICAgICBDb250 cm9sbGVyDQotICAgICAgICAgKTsNCi0NCi0gIHJldHVybiBTdGF0dXM7DQotfQ0KLQ0KLS8qKg0K LSAgSW5zdGFsbCBHcmFwaGljcyBPdXRwdXQgUHJvdG9jb2wgb250byBWR0EgZGV2aWNlIGhhbmRs ZXMuDQotDQotICBAcGFyYW0gIFRoaXMgICAgICAgICAgICAgICAgICAgUG9pbnRlciB0byBkcml2 ZXIg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GlmIHRoZSBMZWdhY3kgQklPUyBQ cm90b2NvbCBpcyBhdmFpbGFibGUNCi0gIC8vDQotICBTdGF0dXMgPSBnQlMtPkxvY2F0ZVByb3Rv Y29sICgmZ0VmaUxlZ2FjeUJpb3NQcm90b2NvbEd1aWQsIE5VTEwsIChWT0lEICoqKSZMZWdhY3lC aW9zKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgcmV0dXJuIFN0YXR1czsN Ci0gIH0NCi0NCi0gIC8vDQotICAvLyBQcmVwYXJlIGZvciBzdGF0dXMgY29kZQ0KLSAgLy8NCi0g IFN0YXR1cyA9IGdCUy0+SGFuZGxlUHJvdG9jb2wgKA0KLSAgICAgICAgICAgICAgICAgIENvbnRy b2xsZXIsDQotICAgICAgICAgICAgICAgICAgJmdFZmlEZXZpY2VQYXRoUHJvdG9jb2xHdWlkLA0K LSAgICAgICAgICAgICAgICAgIChWT0lEICoqKSZQYXJlbnREZXZpY2VQYXRoDQotICAgICAgICAg ICAgICAgICAgKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgcmV0dXJuIFN0 YXR1czsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBPcGVuIHRoZSBJTyBBYnN0cmFjdGlvbihzKSBu ZWVkZWQNCi0gIC8vDQotICBTdGF0dXMgPSBnQlMtPk9wZW5Qcm90b2NvbCAoDQotICAgICAgICAg ICAgICAgICAgQ29udHJvbGxlciwNCi0gICAgICAgICAgICAgICAgICAmZ0VmaVBjaUlvUHJvdG9j b2xHdWlkLA0KLSAgICAgICAgICAgICAgICAgIChWT0lEICoqKSZQY2lJbywNCi0gICAgICAgICAg ICAgICAgICBUaGlzLT5Ecml2ZXJCaW5kaW5nSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgIENv bnRyb2xsZXIsDQotICAgICAgICAgICAgICAgICAgRUZJX09QRU5fUFJPVE9DT0xfQllfRFJJVkVS DQotICAgICAgICAgICAgICAgICAgKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykgJiYgKFN0 YXR1cyAhPSBFRklfQUxSRUFEWV9TVEFSVEVEKSkgew0KLSAgICByZXR1cm4gU3RhdHVzOw0KLSAg fQ0KLQ0KLSAgLy8NCi0gIC8vIFNhdmUgb3JpZ2luYWwgUENJIGF0dHJpYnV0ZXMNCi0gIC8vDQot ICBpZiAoIW1QY2lBdHRyaWJ1dGVzU2F2ZWQpIHsNCi0gICAgU3RhdHVzID0gUGNpSW8tPkF0dHJp YnV0ZXMgKA0KLSAgICAgICAgICAgICAgICAgICAgICBQY2lJbywNCi0gICAgICAgICAgICAgICAg ICAgICAgRWZpUGNpSW9BdHRyaWJ1dGVPcGVyYXRpb25HZXQsDQotICAgICAgICAgICAgICAgICAg ICAgIDAsDQotICAgICAgICAgICAgICAgICAgICAgICZtT3JpZ2luYWxQY2lBdHRyaWJ1dGVzDQot ICAgICAgICAgICAgICAgICAgICAgICk7DQotDQotICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykp IHsNCi0gICAgICBnb3RvIERvbmU7DQotICAgIH0NCi0NCi0gICAgbVBjaUF0dHJpYnV0ZXNTYXZl ZCA9IFRSVUU7DQotICB9DQotDQotICAvLw0KLSAgLy8gR2V0IHN1cHBvcnRlZCBQQ0kgYXR0cmli dXRlcw0KLSAgLy8NCi0gIFN0YXR1cyA9IFBjaUlvLT5BdHRyaWJ1dGVzICgNCi0gICAgICAgICAg ICAgICAgICAgIFBjaUlvLA0KLSAgICAgICAgICAgICAgICAgICAgRWZpUGNpSW9BdHRyaWJ1dGVP cGVyYXRpb25TdXBwb3J0ZWQsDQotICAgICAgICAgICAgICAgICAgICAwLA0KLSAgICAgICAgICAg ICAgICAgICAgJlN1cHBvcnRzDQotICAgICAgICAgICAgICAgICAgICApOw0KLSAgaWYgKEVGSV9F UlJPUiAoU3RhdHVzKSkgew0KLSAgICBnb3RvIERvbmU7DQotICB9DQotDQotICBTdXBwb3J0cyAm PSAoVUlOVDY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UEFUSCAoDQotICAgICAgRUZJX0VSUk9SX0NPREUgfCBF RklfRVJST1JfTUlOT1IsDQotICAgICAgRUZJX1BFUklQSEVSQUxfTE9DQUxfQ09OU09MRSB8IEVG SV9QX0VDX1JFU09VUkNFX0NPTkZMSUNULA0KLSAgICAgIFBhcmVudERldmljZVBhdGgNCi0gICAg ICApOw0KLSAgICBnb3RvIERvbmU7DQotICB9DQotDQotICAvLw0KLSAgLy8gQ2hlY2sgdG8gc2Vl IGlmIHRoZXJlIGlzIGEgbGVnYWN5IG9wdGlvbiBST00gaW1hZ2UgYXNzb2NpYXRlZCB3aXRoIHRo aXMgUENJIGRldmljZQ0KLSAgLy8NCi0gIFN0YXR1cyA9IExlZ2FjeUJpb3MtPkNoZWNrUGNpUm9t ICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgTGVnYWN5QmlvcywNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgQ29udHJvbGxlciwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgJkZsYWdzDQotICAgICAgICAgICAgICAgICAgICAgICAgICk7DQotICBpZiAoRUZJX0VSUk9S IChTdGF0dXMpKSB7DQotICAgIGdvdG8gRG9uZTsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBQb3N0 IHRoZSBsZWdhY3kgb3B0aW9uIFJPTSBpZiBpdCBpcyBhdmFpbGFibGUuDQotICAvLw0KLSAgUkVQ T1JUX1NUQVRVU19DT0RFX1dJVEhfREVWSUNFX1BBVEggKA0KLSAgICBFRklfUFJPR1JFU1NfQ09E RSwNCi0gICAgRUZJX1BfUENfUkVTRVQsDQotICAgIFBhcmVudERldmljZVBhdGgNCi0gICAgKTsN Ci0gIFN0YXR1cyA9IExlZ2FjeUJpb3MtPkluc3RhbGxQY2lSb20gKA0KLSAgICAgICAgICAgICAg ICAgICAgICAgICBMZWdhY3lCaW9zLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICBDb250cm9s bGVyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLA0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAmRmxhZ3MsDQotICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAgICAg ICAgICAgICAgICAgICAgICAgIE5VTEwsDQotICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEws DQotICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgKTsNCi0gIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgUkVQT1JUX1NUQVRVU19D T0RFX1dJVEhfREVWSUNFX1BBVEggKA0KLSAgICAgIEVGSV9FUlJPUl9DT0RFIHwgRUZJX0VSUk9S X01JTk9SLA0KLSAgICAgIEVGSV9QRVJJUEhFUkFMX0xPQ0FMX0NPTlNPTEUgfCBFRklfUF9FQ19D T05UUk9MTEVSX0VSUk9SLA0KLSAgICAgIFBhcmVudERldmljZVBhdGgNCi0gICAgICApOw0KLSAg ICBnb3RvIERvbmU7DQotICB9DQotDQotICBpZiAoUmVtYWluaW5nRGV2aWNlUGF0aCAhPSBOVUxM KSB7DQotICAgIGlmIChJc0RldmljZVBhdGhFbmQgKFJlbWFpbmluZ0RldmljZVBhdGgpICYmDQot ICAgICAgICAoRmVhdHVyZVBjZEdldCAoUGNkQmlvc1ZpZGVvQ2hlY2tWYmVFbmFibGUpIHx8IEZl YXR1cmVQY2RHZXQgKFBjZEJpb3NWaWRlb0NoZWNrVmdhRW5hYmxlKSkpDQotICAgIHsNCi0gICAg ICAvLw0KLSAgICAgIC8vIElmIFJlbWFpbmluZ0RldmljZVBhdGggaXMgdGhlIEVuZCBvZiBEZXZp Y2UgUGF0aCBOb2RlLA0KLSAgICAgIC8vIGRvbid0IGNyZWF0ZSBhbnkgY2hpbGQgZGV2aWNlIGFu ZCByZXR1cm4gRUZJX1NVQ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ew0KLSAg ICAgIGlmIChtUGNpQXR0cmlidXRlc1NhdmVkKSB7DQotICAgICAgICAvLw0KLSAgICAgICAgLy8g UmVzdG9yZSBvcmlnaW5hbCBQQ0kgYXR0cmlidXRlcw0KLSAgICAgICAgLy8NCi0gICAgICAgIFBj aUlvLT5BdHRyaWJ1dGVzICgNCi0gICAgICAgICAgICAgICAgIFBjaUlvLA0KLSAgICAgICAgICAg ICAgICAgRWZpUGNpSW9BdHRyaWJ1dGVPcGVyYXRpb25TZXQsDQotICAgICAgICAgICAgICAgICBt T3JpZ2luYWxQY2lBdHRyaWJ1dGVzLA0KLSAgICAgICAgICAgICAgICAgTlVMTA0KLSAgICAgICAg ICAgICAgICAgKTsNCi0gICAgICB9DQotICAgIH0NCi0NCi0gICAgLy8NCi0gICAgLy8gUmVsZWFz ZSBQQ0kgSS9PIFByb3RvY29scyBvbiB0aGUgY29udHJvbGxlciBoYW5kbGUuDQotICAgIC8vDQot ICAgIGdCUy0+Q2xvc2VQcm90b2NvbCAoDQotICAgICAgICAgICBDb250cm9sbGVyLA0KLSAgICAg ICAgICAgJmdFZmlQY2lJb1Byb3RvY29sR3VpZCwNCi0gICAgICAgICAgIFRoaXMtPkRyaXZlckJp bmRpbmdIYW5kbGUsDQotICAgICAgICAgICBDb250cm9sbGVyDQotICAgICAgICAgICApOw0KLSAg fQ0KLQ0KLSAgcmV0dXJuIFN0YXR1czsNCi19DQotDQotLyoqDQotICBTdG9wLg0KLQ0KLSAgQHBh cmFtICBUaGlzICAgICAgICAgICAgICAgICAgIFBvaW50ZXIgdG8gZHJpdmVyIGJpbmRpbmcgcHJv dG9jb2wNCi0gIEBwYXJhbSAgQ29udHJvbGxlciAgICAgICAgICAgICBDb250cm9sbGVyIGhhbmRs ZSB0byBjb25uZWN0DQotICBAcGFyYW0gIE51bWJlck9mQ2hpbGRyZW4gICAgICAgTnVtYmVyIG9m IGNoaWxkcmVuIGhhbmRsZSBjcmVhdGVkIGJ5IHRoaXMgZHJpdmVy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3RvY29sICgNCi0gICAgICAgICAgIENvbnRyb2xsZXIsDQotICAgICAgICAgICAmZ0VmaVBjaUlv UHJvdG9jb2xHdWlkLA0KLSAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCi0g ICAgICAgICAgIENvbnRyb2xsZXINCi0gICAgICAgICAgICk7DQotDQotICAgIHJldHVybiBFRklf U1VDQ0VTUzsNCi0gIH0NCi0NCi0gIGZvciAoSW5kZXggPSAwOyBJbmRleCA8IE51bWJlck9mQ2hp bGRyZW47IEluZGV4KyspIHsNCi0gICAgU3RhdHVzID0gQmlvc1ZpZGVvQ2hpbGRIYW5kbGVVbmlu c3RhbGwgKFRoaXMsIENvbnRyb2xsZXIsIENoaWxkSGFuZGxlQnVmZmVyW0luZGV4XSk7DQotDQot ICAgIGlmIChFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgICBBbGxDaGlsZHJlblN0b3BwZWQg PSBGQUxTRTsNCi0gICAgfQ0KLSAgfQ0KLQ0KLSAgaWYgKCFBbGxDaGlsZHJlblN0b3BwZWQpIHsN Ci0gICAgcmV0dXJuIEVGSV9ERVZJQ0VfRVJST1I7DQotICB9DQotDQotICBpZiAoIUhhc0NoaWxk SGFuZGxlIChDb250cm9sbGVyKSkgew0KLSAgICBpZiAobVBjaUF0dHJpYnV0ZXNTYXZlZCkgew0K LSAgICAgIFN0YXR1cyA9IGdCUy0+SGFuZGxlUHJvdG9jb2wgKA0KLSAgICAgICAgICAgICAgICAg ICAgICBDb250cm9sbGVyLA0KLSAgICAgICAgICAgICAgICAgICAgICAmZ0VmaVBjaUlvUHJvdG9j b2xHdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgICAoVk9JRCAqKikmUGNpSW8NCi0gICAgICAg ICAgICAgICAgICAgICAgKTsNCi0gICAgICBBU1NFUlRfRUZJX0VSUk9SIChTdGF0dXMpOw0KLQ0K LSAgICAgIC8vDQotICAgICAgLy8gUmVzdG9yZSBvcmlnaW5hbCBQQ0kgYXR0cmlidXRlcw0KLSAg ICAgIC8vDQotICAgICAgU3RhdHVzID0gUGNpSW8tPkF0dHJpYnV0ZXMgKA0KLSAgICAgICAgICAg ICAgICAgICAgICAgIFBjaUlvLA0KLSAgICAgICAgICAgICAgICAgICAgICAgIEVmaVBjaUlvQXR0 cmlidXRlT3BlcmF0aW9uU2V0LA0KLSAgICAgICAgICAgICAgICAgICAgICAgIG1PcmlnaW5hbFBj aUF0dHJpYnV0ZXMsDQotICAgICAgICAgICAgICAgICAgICAgICAgTlVMTA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICk7DQotICAgICAgQVNTRVJUX0VGSV9FUlJPUiAoU3RhdHVzKTsNCi0gICAg fQ0KLSAgfQ0KLQ0KLSAgcmV0dXJuIEVGSV9TVUNDRVNTOw0KLX0NCi0NCi0vKioNCi0gIEluc3Rh bGwgY2hpbGQgaGFuZGxlcyBpZiB0aGUgSGFuZGxlIHN1cHBvcnRzIE1CUiBmb3JtYXQuDQotDQot ICBAcGFyYW0gIFRoaXMgICAgICAgICAgICAgICAgICAgQ2FsbGluZyBjb250ZXh0Lg0KLSAgQHBh cmFtICBQYXJlbnRIYW5kbGUgICAgICAgICAgIFBhcmVudCBIYW5kbGUNCi0gIEBwYXJhbSAgUGFy ZW50UGNpSW8gICAgICAgICAgICBQYXJlbnQgUGNpSW8gaW50ZXJmYWNlDQotICBAcGFyYW0gIFBh cmVudExlZ2FjeUJpb3MgICAgICAgUGFyZW50IExlZ2FjeUJpb3MgaW50ZXJmYWNlDQotICBAcGFy YW0gIFBhcmVudERldmljZVBhdGggICAgICAgUGFyZW50IERldmljZSBQYXRoDQotICBAcGFyYW0g IFJlbWFpbmluZ0RldmljZVBhdGggICAgUmVtYWluaW5nIERldmljZSBQYXRoDQotDQotICBAcmV0 dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgSWYgYSBjaGlsZCBoYW5kbGUgd2FzIGFkZGVkDQot ICBAcmV0dmFsIG90aGVyICAgICAgICAgICAgICAgICAgQSBjaGlsZCBoYW5kbGUgd2FzIG5vdCBh ZGRlZA0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1CaW9zVmlkZW9DaGlsZEhhbmRsZUluc3RhbGwg KA0KLSAgSU4gIEVGSV9EUklWRVJfQklORElOR19QUk9UT0NPTCAgKlRoaXMsDQotICBJTiAgRUZJ X0hBTkRMRSAgICAgICAgICAgICAgICAgICBQYXJlbnRIYW5kbGUsDQotICBJTiAgRUZJX1BDSV9J T19QUk9UT0NPTCAgICAgICAgICAqUGFyZW50UGNpSW8sDQotICBJTiAgRUZJX0xFR0FDWV9CSU9T X1BST1RPQ09MICAgICAqUGFyZW50TGVnYWN5QmlvcywNCi0gIElOICBFRklfREVWSUNFX1BBVEhf UFJPVE9DT0wgICAgICpQYXJlbnREZXZpY2VQYXRoLA0KLSAgSU4gIEVGSV9ERVZJQ0VfUEFUSF9Q Uk9UT0NPTCAgICAgKlJlbWFpbmluZ0RldmljZVBhdGgNCi0gICkNCi17DQotICBFRklfU1RBVFVT ICAgICAgICAgICAgU3RhdHVzOw0KLSAgQklPU19WSURFT19ERVYgICAgICAgICpCaW9zVmlkZW9Q cml2YXRlOw0KLSAgUENJX1RZUEUwMCAgICAgICAgICAgIFBjaTsNCi0gIEFDUElfQURSX0RFVklD RV9QQVRIICBBY3BpRGV2aWNlTm9kZTsNCi0gIEJPT0xFQU4gICAgICAgICAgICAgICBQcm90b2Nv bEluc3RhbGxlZDsNCi0NCi0gIC8vDQotICAvLyBBbGxvY2F0ZSB0aGUgcHJpdmF0ZSBkZXZpY2Ug c3RydWN0dXJlIGZvciB2aWRlbyBkZXZpY2UNCi0gIC8vDQotICBCaW9zVmlkZW9Qcml2YXRlID0g KEJJT1NfVklERU9fREVWICopQWxsb2NhdGVaZXJvUG9vbCAoDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBzaXplb2YgKEJJT1NfVklERU9fREVWKQ0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gIGlmIChOVUxMID09IEJpb3NW aWRlb1ByaXZhdGUpIHsNCi0gICAgU3RhdHVzID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7DQotICAg IGdvdG8gRG9uZTsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBTZWUgaWYgdGhpcyBpcyBhIFZHQSBj b21wYXRpYmxlIGNvbnRyb2xsZXIgb3Igbm90DQotICAvLw0KLSAgU3RhdHVzID0gUGFyZW50UGNp SW8tPlBjaS5SZWFkICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQYXJlbnRQY2lJ bywNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFZmlQY2lJb1dpZHRoVWludDMyLA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgc2l6ZW9mIChQY2kpIC8gc2l6ZW9mIChVSU5UMzIpLA0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICZQY2kNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0K LSAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICBSRVBPUlRfU1RBVFVTX0NPREVfV0lU SF9ERVZJQ0VfUEFUSCAoDQotICAgICAgRUZJX0VSUk9SX0NPREUgfCBFRklfRVJST1JfTUlOT1Is DQotICAgICAgRUZJX1BFUklQSEVSQUxfTE9DQUxfQ09OU09MRSB8IEVGSV9QX0VDX0NPTlRST0xM RVJfRVJST1IsDQotICAgICAgUGFyZW50RGV2aWNlUGF0aA0KLSAgICAgICk7DQotICAgIGdvdG8g RG9uZTsNCi0gIH0NCi0NCi0gIEJpb3NWaWRlb1ByaXZhdGUtPlZnYUNvbXBhdGlibGUgPSBGQUxT RTsNCi0gIGlmICgoUGNpLkhkci5DbGFzc0NvZGVbMl0gPT0gMHgwMCkgJiYgKFBjaS5IZHIuQ2xh c3NDb2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SAqKUFsbG9jYXRlUG9vbCAoDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgc2l6ZW9mIChFRklfR1JBUEhJQ1NfT1VUUFVUX1BST1RPQ09MX01PREUpDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgKTsNCi0gIGlmIChOVUxMID09IEJpb3NWaWRlb1ByaXZhdGUtPkdy YXBoaWNzT3V0cHV0Lk1vZGUpIHsNCi0gICAgU3RhdHVzID0gRUZJX09VVF9PRl9SRVNPVVJDRVM7 DQotICAgIGdvdG8gRG9uZTsNCi0gIH0NCi0NCi0gIEJpb3NWaWRlb1ByaXZhdGUtPkdyYXBoaWNz T3V0cHV0Lk1vZGUtPkluZm8gPSAoRUZJX0dSQVBISUNTX09VVFBVVF9NT0RFX0lORk9STUFUSU9O ICopQWxsb2NhdGVQb29sICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXpl b2YgKEVGSV9HUkFQSElDU19PVVRQVVRfTU9ERV9JTkZPUk1BVElPTikNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICApOw0KLSAgaWYgKE5VTEwgPT0gIEJpb3NWaWRlb1ByaXZhdGUt PkdyYXBoaWNzT3V0cHV0Lk1vZGUtPkluZm8pIHsNCi0gICAgU3RhdHVzID0gRUZJX09VVF9PRl9S RVNPVVJDRVM7DQotICAgIGdvdG8gRG9uZTsNCi0gIH0NCi0NCi0gIC8vDQotICAvLyBBc3N1bWUg dGhhdCBHcmFwaGljcyBPdXRwdXQgUHJvdG9jb2wgd2lsbCB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VQYXRoLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IChFRklfREVWSUNFX1BBVEhfUFJPVE9DT0wgKikmQWNwaURldmljZU5vZGUNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICB9IGVsc2Ugew0KLSAgICAg IEJpb3NWaWRlb1ByaXZhdGUtPkdvcERldmljZVBhdGggPSBBcHBlbmREZXZpY2VQYXRoTm9kZSAo UGFyZW50RGV2aWNlUGF0aCwgUmVtYWluaW5nRGV2aWNlUGF0aCk7DQotICAgIH0NCi0NCi0gICAg Ly8NCi0gICAgLy8gQ3JlYXQgY2hpbGQgaGFuZGxlIGFuZCBkZXZpY2UgcGF0aCBwcm90b2NvbCBm aXJzdGx5DQotICAgIC8vDQotICAgIEJpb3NWaWRlb1ByaXZhdGUtPkhhbmRsZSA9IE5VTEw7DQot ICAgIFN0YXR1cyAgICAgICAgICAgICAgICAgICA9IGdCUy0+SW5zdGFsbE11bHRpcGxlUHJvdG9j b2xJbnRlcmZhY2VzICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICZC aW9zVmlkZW9Qcml2YXRlLT5IYW5kbGUsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAmZ0VmaURldmljZVBhdGhQcm90b2NvbEd1aWQsDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICBCaW9zVmlkZW9Qcml2YXRlLT5Hb3BEZXZpY2VQYXRoLA0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTA0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgaWYgKEVGSV9FUlJPUiAoU3RhdHVzKSkg ew0KLSAgICAgIGdvdG8gRG9uZTsNCi0gICAgfQ0KLSAgfQ0KLQ0KLSAgLy8NCi0gIC8vIEZpbGwg aW4gdGhlIFZHQSBN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R3JhcGhpY3NPdXRwdXRQcm90b2NvbEd1aWQsDQotICAgICAgICAgICAgICAgICAgICAmQmlv c1ZpZGVvUHJpdmF0ZS0+R3JhcGhpY3NPdXRwdXQsDQotICAgICAgICAgICAgICAgICAgICAmZ0Vm aUVkaWREaXNjb3ZlcmVkUHJvdG9jb2xHdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgJkJpb3NW aWRlb1ByaXZhdGUtPkVkaWREaXNjb3ZlcmVkLA0KLSAgICAgICAgICAgICAgICAgICAgJmdFZmlF ZGlkQWN0aXZlUHJvdG9jb2xHdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgJkJpb3NWaWRlb1By aXZhdGUtPkVkaWRBY3RpdmUsDQotICAgICAgICAgICAgICAgICAgICBOVUxMDQotICAgICAgICAg ICAgICAgICAgICApOw0KLQ0KLSAgICBpZiAoIUVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICAg IC8vDQotICAgICAgLy8gT3BlbiB0aGUgUGFyZW50IEhhbmRsZSBmb3IgdGhlIGNoaWxkDQotICAg ICAgLy8NCi0gICAgICBTdGF0dXMgPSBnQlMtPk9wZW5Qcm90b2NvbCAoDQotICAgICAgICAgICAg ICAgICAgICAgIFBhcmVudEhhbmRsZSwNCi0gICAgICAgICAgICAgICAgICAgICAgJmdFZmlQY2lJ b1Byb3RvY29sR3VpZCwNCi0gICAgICAgICAgICAgICAgICAgICAgKFZPSUQgKiopJkJpb3NWaWRl b1ByaXZhdGUtPlBjaUlvLA0KLSAgICAgICAgICAgICAgICAgICAgICBUaGlzLT5Ecml2ZXJCaW5k aW5nSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICAgICBCaW9zVmlkZW9Qcml2YXRlLT5IYW5k bGUsDQotICAgICAgICAgICAgICAgICAgICAgIEVGSV9PUEVOX1BST1RPQ09MX0JZX0NISUxEX0NP TlRST0xMRVINCi0gICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgICBpZiAoRUZJX0VSUk9S ICh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gPSBFRklf VU5TVVBQT1JURUQ7DQotDQotICBTdGF0dXMgPSBnQlMtPk9wZW5Qcm90b2NvbCAoDQotICAgICAg ICAgICAgICAgICAgSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICZnRWZpR3JhcGhpY3NPdXRw dXRQcm90b2NvbEd1aWQsDQotICAgICAgICAgICAgICAgICAgKFZPSUQgKiopJkdyYXBoaWNzT3V0 cHV0LA0KLSAgICAgICAgICAgICAgICAgIFRoaXMtPkRyaXZlckJpbmRpbmdIYW5kbGUsDQotICAg ICAgICAgICAgICAgICAgSGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgIEVGSV9PUEVOX1BST1RP Q09MX0dFVF9QUk9UT0NPTA0KLSAgICAgICAgICAgICAgICAgICk7DQotICBpZiAoIUVGSV9FUlJP UiAoU3RhdHVzKSkgew0KLSAgICBCaW9zVmlkZW9Qcml2YXRlID0gQklPU19WSURFT19ERVZfRlJP TV9HUkFQSElDU19PVVRQVVRfVEhJUyAoR3JhcGhpY3NPdXRwdXQpOw0KLSAgfQ0KLQ0KLSAgaWYg KEVGSV9FUlJPUiAoU3RhdHVzKSkgew0KLSAgICBTdGF0dXMgPSBnQlMtPk9wZW5Qcm90b2NvbCAo DQotICAgICAgICAgICAgICAgICAgICBIYW5kbGUsDQotICAgICAgICAgICAgICAgICAgICAmZ0Vm aVZnYU1pbmlQb3J0UHJvdG9jb2xHdWlkLA0KLSAgICAgICAgICAgICAgICAgICAgKFZPSUQgKiop JlZnYU1pbmlQb3J0LA0KLSAgICAgICAgICAgICAgICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hh bmRsZSwNCi0gICAgICAgICAgICAgICAgICAgIEhhbmRsZSwNCi0gICAgICAgICAgICAgICAgICAg IEVGSV9PUEVOX1BST1RPQ09MX0dFVF9QUk9UT0NPTA0KLSAgICAgICAgICAgICAgICAgICAgKTsN Ci0gICAgaWYgKCFFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgICBCaW9zVm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ICAgICAgICAgICAgICAgICAgJmdFZmlWZ2FNaW5pUG9y dFByb3RvY29sR3VpZCwNCi0gICAgICAgICAgICAgICAgICAgICZCaW9zVmlkZW9Qcml2YXRlLT5W Z2FNaW5pUG9ydCwNCi0gICAgICAgICAgICAgICAgICAgIE5VTEwNCi0gICAgICAgICAgICAgICAg ICAgICk7DQotICB9DQotDQotICBpZiAoRUZJX0VSUk9SIChTdGF0dXMpKSB7DQotICAgIGdCUy0+ T3BlblByb3RvY29sICgNCi0gICAgICAgICAgIENvbnRyb2xsZXIsDQotICAgICAgICAgICAmZ0Vm aVBjaUlvUHJvdG9jb2xHdWlkLA0KLSAgICAgICAgICAgKFZPSUQgKiopJlBjaUlvLA0KLSAgICAg ICAgICAgVGhpcy0+RHJpdmVyQmluZGluZ0hhbmRsZSwNCi0gICAgICAgICAgIEhhbmRsZSwNCi0g ICAgICAgICAgIEVGSV9PUEVOX1BST1RPQ09MX0JZX0NISUxEX0NPTlRST0xMRVINCi0gICAgICAg ICAgICk7DQotICAgIHJldHVybiBTdGF0dXM7DQotICB9DQotDQotICBpZiAoUGNkR2V0Qm9vbCAo UGNkQmlvc1ZpZGVvU2V0VGV4dFZnYU1vZGVFbmFibGUpKSB7DQotICAgIC8vDQotICAgIC8vIENs b3NlIEVYSVRfQk9PVF9TRVJJVkVTIEV2ZW50DQotICAgIC8vDQotICAgIGdCUy0+Q2xvc2VFdmVu dCAoQmlvc1ZpZGVvUHJpdmF0ZS0+RXhpdEJvb3RTZXJ2aWNlc0V2ZW50KTsNCi0gIH0NCi0NCi0g IC8vDQotICAvLyBSZWxlYXNlIGFsbCBhbGxvY2F0ZWQgcmVzb3VyY2VzDQotICAvLw0KLSAgQmlv c1ZpZGVvRGV2aWNlUmVsZWFzZVJlc291cmNlIChCaW9zVmlkZW9Qcml2YXRlKTsNCi0NCi0gIHJl dHVybiBFRklfU1VDQ0VTUzsNCi19DQotDQotLyoqDQotICBSZWxlYXNlIHJlc291cmNlIGZvciBi aXNvI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ZmVyLA0KLSAgVkVTQV9C SU9TX0VYVEVOU0lPTlNfVkFMSURfRURJRF9USU1JTkcgICpWYWxpZEVkaWRUaW1pbmcNCi0gICkN Ci17DQotICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIENoZWNrU3VtOw0K LSAgVUlOVDMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJbmRleDsNCi0gIFVJTlQz MiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVmFsaWROdW1iZXI7DQotICBVSU5UMzIg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFRpbWluZ0JpdHM7DQotICBVSU5UOCAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICpCdWZmZXJJbmRleDsNCi0gIFVJTlQxNiAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgSG9yaXpvbnRhbFJlc29sdXRpb247DQotICBVSU5U MTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZlcnRpY2FsUmVzb2x1dGlvbjsNCi0g IFVJTlQ4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQXNwZWN0UmF0aW87DQotICBV SU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlZnJlc2hSYXRlOw0KLSAgVkVT QV9CSU9TX0VYVEVOU0lPTlNfRURJRF9USU1JTkcgICAgICBUZW1wVGltaW5nOw0KLSAgVkVTQV9C SU9TX0VYVEVOU0lPTlNfRURJRF9EQVRBX0JMT0NLICAqRWRpZERhdGFCbG9jazsNCi0NCi0gIEVk aWREYXRhQmxvY2sgPSAoVkVTQV9CSU9TX0VYVEVOU0lPTlNfRURJRF9EQVRBX0JMT0NLICopRWRp ZEJ1ZmZlcjsNCi0NCi0gIC8vDQotICAvLyBDaGVjayB0aGUgY2hlY2tzdW0gb2YgRURJRCBkYXRh DQotICAvLw0KLSAgQ2hlY2tTdW0gPSAwOw0KLSAgZm9yIChJbmRleCA9IDA7IEluZGV4I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FN0YW5kYXJk IFRpbWluZw0KLSAgICAgIC8vDQotICAgICAgSG9yaXpvbnRhbFJlc29sdXRpb24gPSAoVUlOVDE2 KShCdWZmZXJJbmRleFswXSAqIDggKyAyNDgpOw0KLSAgICAgIEFzcGVjdFJhdGlvICAgICAgICAg ID0gKFVJTlQ4KShCdWZmZXJJbmRleFsxXSA+PiA2KTsNCi0gICAgICBzd2l0Y2ggKEFzcGVjdFJh dGlvKSB7DQotICAgICAgICBjYXNlIDA6DQotICAgICAgICAgIFZlcnRpY2FsUmVzb2x1dGlvbiA9 IChVSU5UMTYpKEhvcml6b250YWxSZXNvbHV0aW9uIC8gMTYgKiAxMCk7DQotICAgICAgICAgIGJy ZWFrOw0KLSAgICAgICAgY2FzZSAxOg0KLSAgICAgICAgICBWZXJ0aWNhbFJlc29sdXRpb24gPSAo VUlOVDE2KShIb3Jpem9udGFsUmVzb2x1dGlvbiAvIDQgKiAzKTsNCi0gICAgICAgICAgYnJlYWs7 DQotICAgICAgICBjYXNlIDI6DQotICAgICAgICAgIFZlcnRpY2FsUmVzb2x1dGlvbiA9IChVSU5U MTYpKEhvcml6b250YWxSZXNvbHV0aW9uIC8gNSAqIDQpOw0KLSAgICAgICAgICBicmVhazsNCi0g ICAgICAgIGNhc2UgMzoNCi0gICAgICAgICAgVmVydGljYWxSZXNvbHV0aW9uID0gKFVJTlQxNiko SG9yaXpvbnRhbFJlc29sdXRpb24gLyAxNiAqIDkpOw0KLSAgICAgICAgICBicmVhazsNCi0gICAg ICAgIGRlZmF1bHQ6DQotICAgICAgICAgIFZlcnRpY2FsUmVzb2x1dGlvbiA9IChVSU5UMTYpKEhv cml6b250YWxSZXNvbHV0aW9uIC8gNCAqIDMpOw0KLSAgICAgICAgICBicmVhazsNCi0gICAgICB9 DQotDQotICAgICAgUmVmcmVzaFJhdGUgPSAoVUlOVDgpKChCdWZmZXJJbmRleFsxXSAmIDB4MWYp ICsgNjApOw0KLSAgICAgIERFQlVHICgoREVCVUdfSU5GTyw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lzdC4NCi0gIEByZXR1cm4gRkFMU0Ug ICAgICAgICAgICAgICAgICBBbGwgdmlkZW8gY2hpbGQgaGFuZGxlcyBoYXZlIGJlZW4gdW5pbnN0 YWxsZWQuDQotDQotKiovDQotQk9PTEVBTg0KLUhhc0NoaWxkSGFuZGxlICgNCi0gIElOIEVGSV9I QU5ETEUgIENvbnRyb2xsZXINCi0gICkNCi17DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgSW5kZXg7DQotICBFRklfT1BFTl9QUk9UT0NPTF9JTkZPUk1BVElPTl9FTlRS WSAgKk9wZW5JbmZvQnVmZmVyOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEVudHJ5Q291bnQ7DQotICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg SGFzQ2hpbGQ7DQotDQotICBFbnRyeUNvdW50ID0gMDsNCi0gIEhhc0NoaWxkICAgPSBGQUxTRTsN Ci0gIGdCUy0+T3BlblByb3RvY29sSW5mb3JtYXRpb24gKA0KLSAgICAgICAgIENvbnRyb2xsZXIs DQotICAgICAgICAgJmdFZmlQY2lJb1Byb3RvY29sR3VpZCwNCi0gICAgICAgICAmT3BlbkluZm9C dWZmZXIsDQotICAgICAgICAgJkVudHJ5Q291bnQNCi0gICAgICAgICApOw0KLSAgZm9yIChJbmRl eCA9IDA7IEluZGV4IDwgRW50cnlDb3VudDsgSW5kZXgrKykgew0KLSAgICBpZiAoKE9wZW5JbmZv QnVmZmVyW0luZGV4XS5BdHRyaWJ1dGVzICYgRUZJX09QRU5fUFJPVE9DT0xfQllfQ0hJTERfQ09O VFJPTExFUikgIT0gMCkgew0KLSAgICAgIEhhc0NoaWxkID0gVFJVRTsNCi0gICAgfQ0KLSAgfQ0K LQ0KLSAgcmV0dXJuIEhhc0NoaWxkOw0KLX0NCi0NCi0vKioNCi0gIENoZWNrIGZvciBWQkUgZGV2 aWNlLg0KLQ0KLSAgQHBhcmFtICBCaW9zVmlkZW9Qcml2YXRlICAgICAgIFBvaW50ZXIgdG8gQklP U19WSURFT19ERVYgc3RydWN0dXJlDQotDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAg ICAgVkJFIGRldmljZSBmb3VuZA0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1CaW9zVmlkZW9DaGVj a0ZvclZiZSAoDQotICBJTiBPVVQgQklPU19WSURFT19ERVYgICpCaW9zVmlkZW9Qcml2YXRlDQot ICApDQotew0KLSAgRUZJX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFN0YXR1 czsNCi0gIEVGSV9JQTMyX1JFR0lTVEVSX1NFVCAgICAgICAgICAgICAgICAgICBSZWdzOw0KLSAg VUlOVDE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpNb2RlTnVtYmVyUHRyOw0K LSAgVUlOVDE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZiZU1vZGVOdW1iZXI7 DQotICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTW9kZUZvdW5kOw0K LSAgQk9PTEVBTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVkaWRGb3VuZDsNCi0g IEJJT1NfVklERU9fTU9ERV9EQVRBICAgICAgICAgICAgICAgICAgICAqTW9kZUJ1ZmZlcjsNCi0g IEJJT1NfVklERU9fTU9ERV9EQVRBICAgICAgICAgICAgICAgICAgICAqQ3VycmVudE1vZGVEYXRh Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFByZWZlck1vZGU7 DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTW9kZU51bWJlcjsN Ci0gIFZFU0FfQklPU19FWFRFTlNJT05TX0VESURfVElNSU5HICAgICAgICBUaW1pbmc7DQotICBW RVNBX0JJT1NfRVhURU5TSU9OU19WQUxJRF9FRElEX1RJTUlORyAgVmFsaWRFZGlkVGltaW5nOw0K LSAgRUZJX0VESURfT1ZFUlJJREVfUFJPVE9DT0wgICAgICAgICAgICAgICpFZGlkT3ZlcnJpZGU7 DQotICBVSU5UMzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWRpZEF0dHJpYnV0 ZXM7DQotICBCT09MRUFOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWRpZE92ZXJy aWRlRm91bmQ7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRWRp ZE92ZXJyaWRlRGF0YVNpemU7DQotICBVSU5UOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgKkVkaWRPdmVycmlkZURhdGFCbG9jazsNCi0gIFVJTlROICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICBFZGlkQWN0aXZlRGF0YVNpemU7DQotICBVSU5UOCAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgKkVkaWRBY3RpdmVEYXRhQmxvY2s7DQotICBVSU5UMzIg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSGlnaGVzdEhvcml6b250YWxSZXNvbHV0 aW9uOw0KLSAgVUlOVDMyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEhpZ2hlc3RW ZXJ0aWNhbFJlc29sdXRpb247DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgSGlnaGVzdFJlc29sdXRpb25Nb2RlOw0KLQ0KLSAgRWRpZEZvdW5kICAgICAgICAgICAg ICAgICAgID0gVFJVRTsNCi0gIEVkaWRPdmVycmlkZUZvdW5kICAgICAgICAgICA9IEZBTFNFOw0K LSAgRWRpZE92ZXJyaWRlRGF0YUJsb2NrICAgICAgID0gTlVMTDsNCi0gIEVkaWRBY3RpdmVEYXRh U2l6ZSAgICAgICAgICA9IDA7DQotICBFZGlkQWN0aXZlRGF0YUJsb2NrICAgICAgICAgPSBOVUxM Ow0KLSAgSGlnaGVzdEhvcml6b250YWxSZXNvbHV0aW9uID0gMDsNCi0gIEhpZ2hlc3RWZXJ0aWNh bFJlc29sdXRpb24gICA9IDA7DQotICBIaWdoZXN0UmVzb2x1dGlvbk1vZGUgICAgICAgPSAwOw0K LQ0KLSAgLy8NCi0gIC8vIEFsbG9jYXRlIGJ1ZmZlciB1bmRlciAxTUIgZm9yIFZCRSBkYXRhIHN0 cnVjdHVyZXMNCi0gIC8vDQotICBCaW9zVmlkZW9Qcml2YXRlLT5OdW1iZXJPZlBhZ2VzQmVsb3cx TUIgPSBFRklfU0laRV9UT19QQUdFUyAoDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHNpemVvZiAoVkVTQV9CSU9TX0VYVEVOU0lPTlNfSU5GT1JNQVRJT05f QkxPQ0spICsNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg c2l6ZW9mIChWRVNBX0JJT1NfRVhURU5TSU9OU19NT0RFX0lORk9STUFUSU9OX0JMT0NLKSArDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoVkVT QV9CSU9TX0VYVEVOU0lPTlNfRURJRF9EQVRBX0JMT0NLKSArDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNpemVvZiAoVkVTQV9CSU9TX0VYVEVOU0lPTlNf Q1JUQ19JTkZPUk1BVElPTl9CTE9DSykNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgKTsNCi0NCi0gIEJpb3NWaWRlb1ByaXZhdGUtPlBhZ2VzQmVsb3cxTUIg PSAweDAwMTAwMDAwIC0gMTsNCi0NCi0gIFN0YXR1cyA9IGdCUy0+QWxsb2NhdGVQYWdlcyAoDQot ICAgICAgICAgICAgICAgICAgQWxsb2NhdGVNYXhBZGRyZXNzLA0KLSAgICAgIC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3RvY29sIGZpcnN0bHksIHRoaXMgcHJvdG9jb2wg aXMgaW5zdGFsbGVkIGJ5IHBsYXRmb3JtIGlmIG5lZWRlZC4NCi0gIC8vDQotICBTdGF0dXMgPSBn QlMtPkxvY2F0ZVByb3RvY29sICgNCi0gICAgICAgICAgICAgICAgICAmZ0VmaUVkaWRPdmVycmlk ZVByb3RvY29sR3VpZCwNCi0gICAgICAgICAgICAgICAgICBOVUxMLA0KLSAgICAgICAgICAgICAg ICAgIChWT0lEICoqKSZFZGlkT3ZlcnJpZGUNCi0gICAgICAgICAgICAgICAgICApOw0KLSAgaWYg KCFFRklfRVJST1IgKFN0YXR1cykpIHsNCi0gICAgLy8NCi0gICAgLy8gQWxsb2NhdGUgZG91Ymxl IHNpemUgb2YgVkVTQV9CSU9TX0VYVEVOU0lPTlNfRURJRF9CTE9DS19TSVpFIHRvIGF2b2lkIG92 ZXJmbG93DQotICAgIC8vDQotICAgIEVkaWRPdmVycmlkZURhdGFCbG9jayA9IEFsbG9jYXRlUG9v bCAoVkVTQV9CSU9TX0VYVEVOU0lPTlNfRURJRF9CTE9DS19TSVpFICogMik7DQotICAgIGlmIChO VUxMID09IEVkaWRPdmVycmlkZURhdGFCbG9jaykgew0KLSAgICAgIFN0YXR1cyA9IEVGSV9PVVRf T0ZfUkVTT1VSQ0VTOw0KLSAgICAgIGdvdG8gRG9uZTsNCi0gICAgfQ0KLQ0KLSAgICBTdGF0dXMg PSBFZGlkT3ZlcnJpZGUtPkdldEVkaWQgKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg RWRpZE92ZXJyaWRlLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQmlvc1ZpZGVvUHJp dmF0ZS0+SGFuZGxlLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkVkaWRBdHRyaWJ1 dGVzLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJkVkaWRPdmVycmlkZURhdGFTaXpl LA0KLSAgICAgICAg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AoKFVJTlROKUJpb3NWaWRl b1ByaXZhdGUtPlZiZUVkaWREYXRhQmxvY2spOw0KLQ0KLSAgICBCaW9zVmlkZW9Qcml2YXRlLT5M ZWdhY3lCaW9zLT5JbnQ4NiAoQmlvc1ZpZGVvUHJpdmF0ZS0+TGVnYWN5QmlvcywgMHgxMCwgJlJl Z3MpOw0KLSAgICAvLw0KLSAgICAvLyBTZWUgaWYgdGhlIFZFU0EgY2FsbCBzdWNjZWVkZWQNCi0g ICAgLy8NCi0gICAgaWYgKFJlZ3MuWC5BWCA9PSBWRVNBX0JJT1NfRVhURU5TSU9OU19TVEFUVVNf U1VDQ0VTUykgew0KLSAgICAgIC8vDQotICAgICAgLy8gU2V0IEVESUQgRGlzY292ZXJlZCBEYXRh DQotICAgICAgLy8NCi0gICAgICBCaW9zVmlkZW9Qcml2YXRlLT5FZGlkRGlzY292ZXJlZC5TaXpl T2ZFZGlkID0gVkVTQV9CSU9TX0VYVEVOU0lPTlNfRURJRF9CTE9DS19TSVpFOw0KLSAgICAgIEJp b3NWaWRlb1ByaXZhdGUtPkVkaWREaXNjb3ZlcmVkLkVkaWQgICAgICAgPSAoVUlOVDggKilBbGxv Y2F0ZUNvcHlQb29sICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBWRVNBX0JJT1NfRVhURU5TSU9OU19FRElEX0JMT0NLX1NJ WkUsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgQmlvc1ZpZGVvUHJpdmF0ZS0+VmJlRWRpZERhdGFCbG9jaw0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7 DQotDQotICAgICAgaWYgKE5VTEwgPT0gQmlvc1ZpZGVvUHJpdmF0ZS0+RWRpZERpc2NvdmVyZWQu RWRpZCkgew0KLSAgICAgICAgU3Rh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LT5FZGlkQWN0aXZlLkVkaWQgICAgICAgPSAo VUlOVDggKilBbGxvY2F0ZUNvcHlQb29sICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVkaWRBY3RpdmVEYXRhU2l6ZSwNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVk aWRBY3RpdmVEYXRhQmxvY2sNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICk7DQotICAgICAgaWYgKE5VTEwgPT0gIEJpb3NWaWRlb1By aXZhdGUtPkVkaWRBY3RpdmUuRWRpZCkgew0KLSAgICAgICAgU3RhdHVzID0gRUZJX09VVF9PRl9S RVNPVVJDRVM7DQotICAgICAgICBnb3RvIERvbmU7DQotICAgICAgfQ0KLSAgICB9DQotICB9IGVs c2Ugew0KLSAgICBCaW9zVmlkZW9Qcml2YXRlLT5FZGlkQWN0aXZlLlNpemVPZkVkaWQgPSAwOw0K LSAgICBCaW9zVmlkZW9Qcml2YXRlLT5FZGlkQWN0aXZlLkVkaWQgICAgICAgPSBOVUxMOw0KLSAg ICBFZGlkRm91bmQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPSBGQUxTRTsNCi0gIH0N Ci0NCi0gIC8vDQotICAvLyBXYWxrIHRocm91Z2ggdGhlIG1vZGUgbGlzdCB0byBzZWUgaWYgdGhl cmUgaXMgYXQgbGVhc3Qgb25lIG1vZGUgdGhlIGlzIGNvbXBhdGlibGUgd2l0aCB0aGUgRURJRCBt b2RlDQotICAvLw0KLSAgTW9kZU51bWJlclB0ciA9IChVSU5UMTYgKikNCi0gICAgICAgICAgICAg ICAgICAoDQotICAgICAgICAgICAgICAgICAgICgoKFVJTlROKUJpb3NWaWRlb1ByaXZhdGUtPlZi ZUluZm9ybWF0aW9uQmxvY2stPlZpZGVvTW9kZVB0ciAm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KEJpb3NWaWRlb1By aXZhdGUtPlZiZU1vZGVJbmZvcm1hdGlvbkJsb2NrLT5ZUmVzb2x1dGlvbiA+IEhpZ2hlc3RWZXJ0 aWNhbFJlc29sdXRpb24pKSkNCi0gICAgew0KLSAgICAgIEhpZ2hlc3RIb3Jpem9udGFsUmVzb2x1 dGlvbiA9IEJpb3NWaWRlb1ByaXZhdGUtPlZiZU1vZGVJbmZvcm1hdGlvbkJsb2NrLT5YUmVzb2x1 dGlvbjsNCi0gICAgICBIaWdoZXN0VmVydGljYWxSZXNvbHV0aW9uICAgPSBCaW9zVmlkZW9Qcml2 YXRlLT5WYmVNb2RlSW5mb3JtYXRpb25CbG9jay0+WVJlc29sdXRpb247DQotICAgICAgSGlnaGVz dFJlc29sdXRpb25Nb2RlICAgICAgID0gTW9kZU51bWJlcjsNCi0gICAgfQ0KLQ0KLSAgICAvLw0K LSAgICAvLyBBZGQgbW9kZSB0byB0aGUgbGlzdCBvZiBhdmFpbGFibGUgbW9kZXMNCi0gICAgLy8N Ci0gICAgTW9kZU51bWJlcisrOw0KLSAgICBNb2RlQnVmZmVyID0gKEJJT1NfVklERU9fTU9ERV9E QVRBICopQWxsb2NhdGVQb29sICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgTW9kZU51bWJlciAqIHNpemVvZiAoQklPU19WSURFT19NT0RFX0RBVEEpDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7DQotICAgIGlmIChOVUxM ID09IE1vZGVCdWZmZXIpIHsNCi0gICAgICBTdGF0dXMgPSBFRklfT1VUX09GX1JFU09VUkNFUzsN Ci0gICAgICBnb3RvIERvbmU7DQotICAgIH0NCi0NCi0gICAgaWYgKE1vZGVOdW1iZXIgPiAxKSB7 DQotICAgICAgQ29weU1lbSAoDQotICAgICAgICBNb2RlQnVmZmVyLA0KLSAgICAgICAgQmlvc1Zp ZGVvUHJpdmF0ZS0+TW9kZURhdGEsDQot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UtPlBjaUlvLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgRWZpUGNpSW9XaWR0aFVpbnQzMiwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIEVGSV9QQ0lfSU9fUEFTU19USFJPVUdIX0JBUiwNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChVSU5UNjQpKFVJTlROKU1vZGVEYXRh LT5MaW5lYXJGcmFtZUJ1ZmZlciwNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIChNb2RlRGF0YS0+Qnl0ZXNQZXJTY2FuTGluZSAqIE1vZGVEYXRhLT5WZXJ0aWNh bFJlc29sdXRpb24pID4+IDIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBCaW9zVmlkZW9Qcml2YXRlLT5WYmVGcmFtZUJ1ZmZlcg0KLSAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAgaWYgKEVGSV9FUlJPUiAoU3Rh dHVzKSkgew0KLSAgICAgIHJldHVybiBTdGF0dXM7DQotICAgIH0NCi0gIH0NCi0NCi0gIHJldHVy biBFRklfU1VDQ0VTUzsNCi19DQotDQotLyoqDQotICBHcmFwaGljcyBPdXRwdXQgcHJvdG9jb2wg aW50ZXJmYWNlIHRvIHNldCB2aWRlbyBtb2RlLg0KLQ0KLSAgQHBhcmFtICBUaGlzICAgICAgICAg ICAgICAgICAgIFByb3RvY29sIGluc3RhbmNlIHBvaW50ZXIuDQotICBAcGFyYW0gIE1vZGVOdW1i ZXIgICAgICAgICAgICAgVGhlIG1vZGUgbnVtYmVyIHRvIGJlIHNldC4NCi0NCi0gIEByZXR2YWwg RUZJX1NVQ0NFU1MgICAgICAgICAgICBHcmFwaGljcyBtb2RlIHdhcyBjaGFuZ2VkLg0KLSAgQHJl dHZhbCBFR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A0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgIEJ5 dGVzUGVyU2NhbkxpbmUNCi0gICkNCi17DQotICBVSU5UTiAgICAgICBGcmFtZUJ1ZmZlckFkZHI7 DQotICBVSU5UTiAgICAgICBDb3B5QmxvY2tOdW07DQotICBVSU5UTiAgICAgICBSZW1haW5pbmdC eXRlczsNCi0gIFVJTlROICAgICAgIFVuYWxpZ25lZEJ5dGVzOw0KLSAgRUZJX1NUQVRVUyAgU3Rh dHVzOw0KLQ0KLSAgRnJhbWVCdWZmZXJBZGRyID0gKFVJTlROKU1lbUFkZHJlc3MgKyAoRGVzdGlu YXRpb25ZICogQnl0ZXNQZXJTY2FuTGluZSkgKyBEZXN0aW5hdGlvblggKiBWYmVQaXhlbFdpZHRo Ow0KLQ0KLSAgLy8NCi0gIC8vIElmIFRvdGFsQnl0ZXMgaXMgbGVzcyB0aGFuIDQgYnl0ZXMsIG9u bHkgc3RhcnQgYnl0ZSBjb3B5Lg0KLSAgLy8NCi0gIGlmIChUb3RhbEJ5dGVzIDwgNCkgew0KLSAg ICBTdGF0dXMgPSBQY2lJby0+TWVtLldyaXRlICgNCi0gICAgICAgICAgICAgICAgICAgICAgICAg IFBjaUlvLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgRWZpUGNpSW9XaWR0aFVpbnQ4LA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgRUZJX1BDSV9JT19QQVNTX1RIUk9VR0hfQkFSLA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgKFVJTlQ2NClGcmFtZUJ1ZmZlckFkZHIsDQotICAg ICAgICAgICAgICAgICAgICAgICAgICBUb3RhbEJ5dGVzLA0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgVmJlQnVmZmVyDQotICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICBBU1NF UlRfRUZJX0VSUk9SIChTdGF0dXMpOw0KLSAgICByZXR1cm47DQotICB9DQotDQotICAvLw0KLSAg Ly8gSWY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dGUgYmxvY2sgYW5kIHJlbWFpbmluZyBi eXRlcyB0byBwaHlzaWNhbCBmcmFtZSBidWZmZXIuDQotICAvLw0KLSAgaWYgKENvcHlCbG9ja051 bSAhPSAwKSB7DQotICAgIFN0YXR1cyA9IFBjaUlvLT5NZW0uV3JpdGUgKA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgUGNpSW8sDQotICAgICAgICAgICAgICAgICAgICAgICAgICBFZmlQY2lJ b1dpZHRoVWludDMyLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgRUZJX1BDSV9JT19QQVNT X1RIUk9VR0hfQkFSLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgKFVJTlQ2NClGcmFtZUJ1 ZmZlckFkZHIsDQotICAgICAgICAgICAgICAgICAgICAgICAgICBDb3B5QmxvY2tOdW0sDQotICAg ICAgICAgICAgICAgICAgICAgICAgICBWYmVCdWZmZXINCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICk7DQotICAgIEFTU0VSVF9FRklfRVJST1IgKFN0YXR1cyk7DQotICB9DQotDQotICBpZiAo UmVtYWluaW5nQnl0ZXMgIT0gMCkgew0KLSAgICBGcmFtZUJ1ZmZlckFkZHIgKz0gKENvcHlCbG9j a051bSA8PCAyKTsNCi0gICAgVmJlQnVmZmVyICAgICAgICs9IChDb3B5QmxvY2tOdW0gPDwgMik7 DQotICAgIFN0YXR1cyAgICAgICAgICAgPSBQY2lJby0+TWVtLldyaXRlICgNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBQY2lJbywNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICBFZmlQY2lJb1dpZHRoVWludDgsDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgRUZJX1BDSV9JT19QQVNTX1RIUk9VR0hfQkFSLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIChVSU5UNjQpRnJhbWVCdWZmZXJBZGRyLA0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFJlbWFpbmluZ0J5dGVzLA0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIFZiZUJ1ZmZlcg0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICk7DQotICAgIEFTU0VSVF9FRklfRVJST1IgKFN0YXR1cyk7DQot ICB9DQotfQ0KLQ0KLS8qKg0KLSAgV29ya2VyIGZ1bmN0aW9uIHRvIGJsb2NrIHRyYW5zZmVyIGZv ciBWQkUgZGV2aWNlLg0KLQ0KLSAgQHBhcmFtICBCaW9zVmlkZW9Qcml2YXRlICAgICAgIEluc3Rh bmNlIG9mIEJJT1NfVklERU9fREVWDQotICBAcGFyYW0gIEJsdEJ1ZmZlciAgICAgICAgICAgICAg VGhlIGRhdGEgdG8gdHJhbnNmZXIgdG8gc2NyZWVuDQotICBAcGFyYW0gIEJsdE9wZXJhdGlvbiAg ICAgICAgICAgVGhlIG9wZXJhdGlvbiB0byBwZXJmb3JtDQotICBAcGFyYW0gIFNvdXJjZVggICAg ICAgICAgICAgICAgVGhlIFggY29vcmRpbmF0ZSBvZiB0aGUgc291cmNlIGZvciBCbHRPcGVyYXRp b24NCi0gIEBwYXJhbSAgU291cmNlWSAgICAgICAgICAgICAgICBUaGUgWSBjb29yZGluYXRlIG9m IHRoZSBzb3VyY2UgZm9yIEJsdE9wZXJhdGlvbg0KLSAgQHBhcmFtICBEZXN0aW5hdGlvblggICAg ICAgICAgIFRoZSBYIGNvb3JkaW5hdGUgb2YgdGhlIGRlc3RpbmF0aW9uIGZvcg0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIEJsdE9wZXJhdGlvbg0KLSAgQHBhcmFtICBEZXN0aW5h dGlvblkgICAgICAgICAgIFRoZSBZIGNvb3JkaW5hdGUgb2YgdGhlIGRlc3RpbmF0aW9uIGZvcg0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJsdE9wZXJhdGlvbg0KLSAgQHBhcmFt ICBXaWR0aCAgICAgICAgICAgICAgICAgIFRoZSB3aWR0aCBvZiBhIHJlY3RhbmdsZSBpbiB0aGUg Ymx0IHJlY3RhbmdsZSBpbg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpeGVs cw0KLSAgQHBhcmFtICBIZWlnaHQgICAgICAgICAgICAgICAgIFRoZSBoZWlnaHQgb2YgYSByZWN0 YW5nbGUgaW4gdGhlIGJsdCByZWN0YW5nbGUgaW4NCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBwaXhlbHMNCi0gIEBwYXJhbSAgRGVsdGEgICAgICAgICAgICAgICAgICBOb3QgdXNl ZCBmb3IgRWZpQmx0VmlkZW9GaWxsIGFuZA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIEVmaUJsdFZpZGVvVG9WaWRlbyBvcGVyYXRpb24uIElmIGEgRGVsdGEgb2YgMCBpcw0KLSAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHVzZWQsIHRoZSBlbnRpcmUgQmx0QnVmZmVy IHdpbGwgYmUgb3BlcmF0ZWQgb24uIElmDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgYSBzdWJyZWN0YW5nbGUgb2YgdGhlIEJsdEJ1ZmZlciBpcyB1c2VkLCB0aGVuDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgRGVsdGEgcmVwcmVzZW50cyB0aGUgbnVtYmVyIG9m IGJ5dGVzIGluIGEgcm93IG9mDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhl IEJsdEJ1ZmZlci4NCi0gIEBwYXJhbSAgTW9kZSAgICAgICAgICAgICAgICAgICBNb2RlIGRhdGEu DQotDQotICBAcmV0dmFsIEVGSV9JTlZBTElEX1BBUkFNRVRFUiAgSW52YWxpZCBwYXJhbWV0ZXIg cGFzc2VkIGluDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICAgQmx0IG9wZXJhdGlv biBzdWNjZXNzDQotDQotKiovDQotRUZJX1NUQVRVUw0KLUJpb3NWaWRlb1ZiZUJsdFdvcmtlciAo DQotICBJTiAgQklPU19WSURFT19ERVYgICAgICAgICAgICAgICAgICAgICAqQmlvc1ZpZGVvUHJp dmF0ZSwNCi0gIElOICBFRklfR1JBUEhJQ1NfT1VUUFVUX0JMVF9QSVhFTCAgICAgICpCbHRCdWZm ZXIgIE9QVElPTkFMLA0KLSAgSU4gIEVGSV9HUkFQSElDU19PVVRQVVRfQkxUX09QRVJBVElPTiAg Qmx0T3BlcmF0aW9uLA0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg U291cmNlWCwNCi0gIElOICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNvdXJj ZVksDQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZXN0aW5hdGlv blgsDQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZXN0aW5hdGlv blksDQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXaWR0aCwNCi0g IElOICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEhlaWdodCwNCi0gIElOICBV SU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIERlbHRhLA0KLSAgSU4gIEJJT1NfVklE RU9fTU9ERV9EQVRBICAgICAgICAgICAgICAgKk1vZGUNCi0gICkNCi17DQotICBFRklfUENJX0lP X1BST1RPQ09MICAgICAgICAgICAgKlBjaUlvOw0KLSAgRUZJX1RQTCAgICAgICAgICAgICAgICAg ICAgICAgIE9yaWdpbmFsVFBMOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgIERz dFk7DQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgU3JjWTsNCi0gIFVJTlROICAg ICAgICAgICA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ZmZlcjEgPSAoKFVJTlQ4 ICopVmJlRnJhbWVCdWZmZXIgKyBTcmNZICogQnl0ZXNQZXJTY2FuTGluZSArIFNvdXJjZVggKiBW YmVQaXhlbFdpZHRoKTsNCi0NCi0gICAgICAgIGdCUy0+Q29weU1lbSAoDQotICAgICAgICAgICAg ICAgVmJlQnVmZmVyLA0KLSAgICAgICAgICAgICAgIFZiZUJ1ZmZlcjEsDQotICAgICAgICAgICAg ICAgVG90YWxCeXRlcw0KLSAgICAgICAgICAgICAgICk7DQotDQotICAgICAgICAvLw0KLSAgICAg ICAgLy8gVXBkYXRlIHBoeXNpY2FsIGZyYW1lIGJ1ZmZlci4NCi0gICAgICAgIC8vDQotICAgICAg ICBDb3B5VmlkZW9CdWZmZXIgKA0KLSAgICAgICAgICBQY2lJbywNCi0gICAgICAgICAgVmJlQnVm ZmVyLA0KLSAgICAgICAgICBNZW1BZGRyZXNzLA0KLSAgICAgICAgICBEZXN0aW5hdGlvblgsDQot ICAgICAgICAgIERzdFksDQotICAgICAgICAgIFRvdGFsQnl0ZXMsDQotICAgICAgICAgIFZiZVBp eGVsV2lkdGgsDQotICAgICAgICAgIEJ5dGVzUGVyU2NhbkxpbmUNCi0gICAgICAgICAgKTsNCi0g ICAgICB9DQotDQotICAgICAgYnJlYWs7DQotDQotICAgIGNhc2UgRWZpQmx0VmlkZW9GaWxsOg0K LSAgICAgIFZiZUJ1ZmZlciA9IChVSU5UOCAqKSgoVUlOVE4pVmJlRnJhbWVCdWZmZXIgKyAoRGVz dGluYXRpb25ZICogQnl0ZXNQZXJTY2FuTGluZSkgKyBEZXN0aW5hdGlvblggKiBWYmVQaXhlbFdp ZHRoKTsNCi0gICAgICBCbHQgICAgICAgPSAoRUZJX0dSQVBISUNTX09VVFBVVF9CTFRfUElYRUwg KilCbHRVaW50ODsNCi0gICAgICAvLw0KLSAgICAgIC8vIFNodWZmbGUgdGhlIFJHQiBmaWVsZHMg aW4gRUZJX0dSQVBISUNTX09VVFBVVF9C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FkgKiBCeXRlc1BlclNjYW5MaW5lKSArIERlc3RpbmF0aW9uWCAqIFZiZVBpeGVsV2lkdGgpLA0K LSAgICAgICAgICAgICAgIFZiZUJ1ZmZlciwNCi0gICAgICAgICAgICAgICBUb3RhbEJ5dGVzDQot ICAgICAgICAgICAgICAgKTsNCi0gICAgICB9DQotDQotICAgICAgZm9yIChEc3RZID0gRGVzdGlu YXRpb25ZOyBEc3RZIDwgKEhlaWdodCArIERlc3RpbmF0aW9uWSk7IERzdFkrKykgew0KLSAgICAg ICAgLy8NCi0gICAgICAgIC8vIFVwZGF0ZSBwaHlzaWNhbCBmcmFtZSBidWZmZXIuDQotICAgICAg ICAvLw0KLSAgICAgICAgQ29weVZpZGVvQnVmZmVyICgNCi0gICAgICAgICAgUGNpSW8sDQotICAg ICAgICAgIFZiZUJ1ZmZlciwNCi0gICAgICAgICAgTWVtQWRkcmVzcywNCi0gICAgICAgICAgRGVz dGluYXRpb25YLA0KLSAgICAgICAgICBEc3RZLA0KLSAgICAgICAgICBUb3RhbEJ5dGVzLA0KLSAg ICAgICAgICBWYmVQaXhlbFdpZHRoLA0KLSAgICAgICAgICBCeXRlc1BlclNjYW5MaW5lDQotICAg ICAgICAgICk7DQotICAgICAgfQ0KLQ0KLSAgICAgIGJyZWFrOw0KLQ0KLSAgICBjYXNlIEVmaUJs dEJ1ZmZlclRvVmlkZW86DQotICAgICAgZm9yIChTcmNZID0gU291cmNlWSwgRHN0WSA9IERlc3Rp bmF0aW9uWTsgU3JjWSA8IChIZWlnaHQgKyBTb3VyY2VZKTsgU3JjWSsrLCBEc3RZKyspIHsNCi0g ICAgICAgIEJsdCAgICAgICA9IChFRklfR1JBUEhJQ1NfT1VUUFVUX0JMVF9QSVhFTCAqKShCbHRV aW50OCArIChTcmNZICogRGVsdGEpICsgKFNvdXJjZVgpICogc2l6ZW9mIChFRklfR1JBUEhJQ1Nf T1VUUFVUX0JMVF9QSVhFTCkpOw0KLSAgICAgICAgVmJlQnVmZmVyID0gKChVSU5UOCAqKVZiZUZy YW1lQnVmZmVyICsgKERzdFkgKiBCeXRlc1BlclNjYW5MaW5lICsgRGVzdGluYXRpb25YICogVmJl UGl4ZWxXaWR0aCkpOw0KLSAgICAgICAgZm9yIChEc3RYID0gRGVzdGluYXRpb25YOyBEc3RYIDwg KFdpZHRoICsgRGVzdGluYXRpb25YKTsgRHN0WCsrKSB7DQotICAgICAgICAgIC8vDQotICAgICAg ICAgIC8vIFNodWZmbGUgdGhlIFJHQiBmaWVsZHMgaW4gRUZJX0dSQVBISUNTX09VVFBVVF9CTFRf UElYRUwgdG8gbWF0Y2ggdGhlIGhhcmR3YXJlIGJ1ZmZlcg0KLSAgICAgICAgICAvLw0KLSAgICAg ICAgICBQaXhlbCA9ICgoQmx0LT5SZWQgJiBNb2RlLT5SZWQuTWFzaykgPDwgTW9kZS0+UmVkLlBv c2l0aW9uKSB8DQotICAgICAgICAgICAgICAgICAgKChCbHQtPkdyZWVuICYgTW9kZS0+R3JlZW4u TWFzaykgPDwgTW9kZS0+R3JlZW4uUG9zaXRpb24pIHwNCi0gICAgICAgICAgICAgICAgICAoKEJs dC0+Qmx1ZSAmIE1vZGUtPkJsdWUuTWFzaykgPDwgTW9kZS0+Qmx1ZS5Qb3NpdGlvbik7DQotICAg ICAgICAgIGdCUy0+Q29weU1lbSAoDQotICAgICAgICAgICAgICAgICBWYmVCdWZmZXIsDQotICAg ICAgICAgICAgICAgICAmUGl4ZWwsDQotICAgICAgICAgICAgICAgICBWYmVQaXhlbFdpZHRoDQot ICAgICAgICAgICAgICAgICApOw0KLSAgICAgICAgICBCbHQrKzsNCi0gICAgICAgICAgVmJlQnVm ZmVyICs9IFZiZVBpeGVsV2lkdGg7DQotICAgICAgICB9DQotDQotICAgICAgICBWYmVCdWZmZXIg PSAoKFVJTlQ4ICopVmJlRnJhbWVCdWZmZXIgKyAoRHN0WSAqIEJ5dGVzUGVyU2NhbkxpbmUgKyBE ZXN0aW5hdGlvblggKiBWYmVQaXhlb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gICAg ICAgICAgICAgICBUaGUgWSBjb29yZGluYXRlIG9mIHRoZSBzb3VyY2UgZm9yIEJsdE9wZXJhdGlv bg0KLSAgQHBhcmFtICBEZXN0aW5hdGlvblggICAgICAgICAgIFRoZSBYIGNvb3JkaW5hdGUgb2Yg dGhlIGRlc3RpbmF0aW9uIGZvcg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJs dE9wZXJhdGlvbg0KLSAgQHBhcmFtICBEZXN0aW5hdGlvblkgICAgICAgICAgIFRoZSBZIGNvb3Jk aW5hdGUgb2YgdGhlIGRlc3RpbmF0aW9uIGZvcg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIEJsdE9wZXJhdGlvbg0KLSAgQHBhcmFtICBXaWR0aCAgICAgICAgICAgICAgICAgIFRo ZSB3aWR0aCBvZiBhIHJlY3RhbmdsZSBpbiB0aGUgYmx0IHJlY3RhbmdsZSBpbg0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHBpeGVscw0KLSAgQHBhcmFtICBIZWlnaHQgICAgICAg ICAgICAgICAgIFRoZSBoZWlnaHQgb2YgYSByZWN0YW5nbGUgaW4gdGhlIGJsdCByZWN0YW5nbGUg aW4NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaXhlbHMNCi0gIEBwYXJhbSAg RGVsdGEgICAgICAgICAgICAgICAgICBOb3QgdXNlZCBmb3IgRWZpQmx0VmlkZW9GaWxsIGFuZA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVmaUJsdFZpZGVvVG9WaWRlbyBvcGVy YXRpb24uIElmIGEgRGVsdGEgb2YgMCBpcw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgIHVzZWQsIHRoZSBlbnRpcmUgQmx0QnVmZmVyIHdpbGwgYmUgb3BlcmF0ZWQgb24uIElmDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSBzdWJyZWN0YW5nbGUgb2YgdGhlIEJs dEJ1ZmZlciBpcyB1c2VkLCB0aGVuDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg RGVsdGEgcmVwcmVzZW50cyB0aGUgbnVtYmVyIG9mIGJ5dGVzIGluIGEgcm93IG9mDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIEJsdEJ1ZmZlci4NCi0NCi0gIEByZXR2YWwg RUZJX0lOVkFMSURfUEFSQU1FVEVSICBJbnZhbGlkIHBhcmFtZXRlciBwYXNzZWQgaW4NCi0gIEBy ZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgICBCbHQgb3BlcmF0aW9uIHN1Y2Nlc3MNCi0NCi0q Ki8NCi1FRklfU1RBVFVTDQotRUZJQVBJDQotQmlvc1ZpZGVvR3JhcGhpY3NPdXRwdXRWYmVCbHQg KA0KLSAgSU4gIEVGSV9HUkFQSElDU19PVVRQVVRfUFJPVE9DT0wgICAgICAgKlRoaXMsDQotICBJ TiAgRUZJX0dSQVBISUNTX09VVFBVVF9CTFRfUElYRUwgICAgICAqQmx0QnVmZmVyICBPUFRJT05B TCwNCi0gIElOICBFRklfR1JBUEhJQ1NfT1VUUFVUX0JMVF9PUEVSQVRJT04gIEJsdE9wZXJhdGlv biwNCi0gIElOICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFNvdXJjZVgsDQot ICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTb3VyY2VZLA0KLSAgSU4g IFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGVzdGluYXRpb25YLA0KLSAgSU4g IFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGVzdGluYXRpb25ZLA0KLSAgSU4g IFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV2lkdGgsDQotICBJTiAgVUlOVE4g ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIZWlnaHQsDQotICBJTiAgVUlOVE4gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBEZWx0YQ0KLSAgKQ0KLXsNCi0gIEJJT1NfVklERU9fREVW ICAgICAgICAqQmlvc1ZpZGVvUHJpdmF0ZTsNCi0gIEJJT1NfVklERU9fTU9ERV9EQVRBICAqTW9k ZTsNCi0NCi0gIGlmIChUaGlzID09IE5VTEwpIHsNCi0gICAgcmV0dXJuIEVGSV9JTlZBTElEX1BB UkFNRVRFUjsNCi0gIH0NCi0NCi0gIEJpb3NWaWRlb1ByaXZhdGUgPSBCSU9TX1ZJREVPX0RFVl9G Uk9NX0dSQVBISUNTX09VVFBVVF9USElTIChUaGlzKTsNCi0gIE1vZGUgICAgICAgICAgICAgPSAm Qmlvc1ZpZGVvUHJpdmF0ZS0+TW9kZURhdGFbVGhpcy0+TW9kZS0+TW9kZV07DQotDQotICByZXR1 cm4gQmlvc1ZpZGVvVmJlQmx0V29ya2VyICgNCi0gICAgICAgICAgIEJpb3NWaWRlb1ByaXZhdGUs DQotICAgICAgICAgICBCbHRCdWZmZXIsDQotICAgICAgICAgICBCbHRPcGVyYXRpb24sDQotICAg ICAgICAgICBTb3VyY2VYLA0KLSAgICAgICAgICAgU291cmNlWSwNCi0gICAgICAgICAgIERlc3Rp bmF0aW9uWCwNCi0gICAgICAgICAgIERlc3RpbmF0aW9uWSwNCi0gICAgICAgICAgIFdpZHRoLA0K LSAgICAgICAgICAgSGVpZ2h0LA0KLSAgICAgICAgICAgRGVsdGEsDQotICAgICAgICAgICBNb2Rl DQotICAgICAgICAgICApOw0KLX0NCi0NCi0vKioNCi0gIFdyaXRlIGdyYXBoaWNzIGNvbnRyb2xs ZXIgcmVnaXN0ZXJzLg0KLQ0KLSAgQHBhcmFtICBQY2lJbyAgICAgICAgICAgICAgICAgIFBvaW50 ZXIgdG8gUGNpSW8gcHJvdG9jb2wgaW5zdGFuY2Ugb2YgdGhlDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgY29udHJvbGxlcg0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ICAgV2lkdGhJbkJ5dGVzLA0KLSAgICAgICAgICAgICAgICAgICAoVk9JRCAqKURlc3RpbmF0aW9u DQotICAgICAgICAgICAgICAgICAgICk7DQotICAgIH0NCi0gIH0NCi19DQotDQotLyoqDQotICBJ bnRlcm5hbCByb3V0aW5lIHRvIGNvbnZlcnQgVkdBIGNvbG9yIHRvIEdyYWhwaWNzIE91dHB1dCBj b2xvci4NCi0NCi0gIEBwYXJhbSAgTWVtb3J5QnVmZmVyICAgICAgICAgICBCdWZmZXIgY29udGFp bmluZyBWR0EgY29sb3INCi0gIEBwYXJhbSAgQ29vcmRpbmF0ZVggICAgICAgICAgICBUaGUgWCBj b29yZGluYXRlIG9mIHBpeGVsIG9uIHNjcmVlbg0KLSAgQHBhcmFtICBDb29yZGluYXRlWSAgICAg ICAgICAgIFRoZSBZIGNvb3JkaW5hdGUgb2YgcGl4ZWwgb24gc2NyZWVuDQotICBAcGFyYW0gIEJs dEJ1ZmZlciAgICAgICAgICAgICAgQnVmZmVyIHRvIGNvbnRhaW4gY29udmVydGVkIEdyYWhwaWNz IE91dHB1dCBjb2xvcg0KLQ0KLSAgQHJldHVybiBOb25lDQotDQotKiovDQotVk9JRA0KLVZnYUNv bnZlcnRUb0dyYXBoaWNzT3V0cHV0Q29sb3IgKA0KLSAgVUlOVDggICAgICAgICAgICAgICAgICAg ICAgICAgICpNZW1vcnlCdWZmZXIsDQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAg Q29vcmRpbmF0ZVgsDQotICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgQ29vcmRpbmF0 ZVksDQotICBFRklfR1JBUEhJQ1NfT1VUUFVUX0JMVF9QSVhFTCAgKkJsdEJ1ZmZlcg0KLSAgKQ0K LXsNCi0gIFVJTlROICBNYXNrOw0KLSAgVUlOVE4gIEJpdDsNCi0gIFVJTlROICBDb2xvcjsNCi0N Ci0gIE1lbW9yeUJ1ZmZlciArPSAoKENvb3JkaW5hdGVZIDw8I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iBhIHJlY3RhbmdsZSBpbiB0aGUgYmx0IHJlY3RhbmdsZSBp bg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBpeGVscw0KLSAgQHBhcmFtICBI ZWlnaHQgICAgICAgICAgICAgICAgIFRoZSBoZWlnaHQgb2YgYSByZWN0YW5nbGUgaW4gdGhlIGJs dCByZWN0YW5nbGUgaW4NCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwaXhlbHMN Ci0gIEBwYXJhbSAgRGVsdGEgICAgICAgICAgICAgICAgICBOb3QgdXNlZCBmb3IgRWZpQmx0Vmlk ZW9GaWxsIGFuZA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVmaUJsdFZpZGVv VG9WaWRlbyBvcGVyYXRpb24uIElmIGEgRGVsdGEgb2YgMCBpcw0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIHVzZWQsIHRoZSBlbnRpcmUgQmx0QnVmZmVyIHdpbGwgYmUgb3BlcmF0 ZWQgb24uIElmDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSBzdWJyZWN0YW5n bGUgb2YgdGhlIEJsdEJ1ZmZlciBpcyB1c2VkLCB0aGVuDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgRGVsdGEgcmVwcmVzZW50cyB0aGUgbnVtYmVyIG9mIGJ5dGVzIGluIGEgcm93 IG9mDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhlIEJsdEJ1ZmZlci4NCi0N Ci0gIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSICBJbnZhbGlkIHBhcmFtZXRlciBwYXNz ZWQgaW4NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgICBCbHQgb3BlcmF0aW9uIHN1 Y2Nlc3MNCi0NCi0qKi8NCi1FRklfU1RBVFVTDQotRUZJQVBJDQotQmlvc1ZpZGVvR3JhcGhpY3NP dXRwdXRWZ2FCbHQgKA0KLSAgSU4gIEVGSV9HUkFQSElDU19PVVRQVVRfUFJPVE9DT0wgICAgICAg KlRoaXMsDQotICBJTiAgRUZJX0dSQVBISUNTX09VVFBVVF9CTFRfUElYRUwgICAgICAqQmx0QnVm ZmVyICBPUFRJT05BTCwNCi0gIElOICBFRklfR1JBUEhJQ1NfT1VUUFVUX0JMVF9PUEVSQVRJT04g IEJsdE9wZXJhdGlvbiwNCi0gIElOICBVSU5UTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IFNvdXJjZVgsDQotICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTb3Vy Y2VZLA0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGVzdGluYXRp b25YLA0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRGVzdGluYXRp b25ZLA0KLSAgSU4gIFVJTlROICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV2lkdGgsDQot ICBJTiAgVUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIZWlnaHQsDQotICBJTiAg VUlOVE4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEZWx0YQ0KLSAgKQ0KLXsNCi0gIEJJ T1NfVklERU9fREVWICAgICAgICpCaW9zVmlkZW9Qcml2YXRlOw0KLSAgRUZJX1RQTCAgICAgICAg ICAgICAgT3JpZ2luYWxUUEw7DQotICBVSU5UOCAgICAgICAgICAgICAgICAqTWVtQWRkcmVzczsN Ci0gIFVJTlROICAgICAgICAgICAgICAgIEJ5dGVzUGVyU2NhbkxpbmU7DQotICBVSU5UTiAgICAg ICAgICAgICAgICBCaXQ7DQotICBVSU5UTiAgICAgICAgICAgICAgICBJbmRleDsNCi0gIFVJTlRO ICAgICAgICAgICAgICAgIEluZGV4MTsNCi0gIFVJTlROICAgICAgICAgICAgICAgIFN0YXJ0QWRk cmVzczsNCi0gIFVJTlROICAgICAgICAgICAgICAgIEJ5dGVzOw0KLSAgVUlOVE4gICAgICAgICAg ICAgICAgT2Zmc2V0Ow0KLSAgVUlOVDggICAgICAgICAgICAgICAgTGVmdE1hc2s7DQotICBVSU5U OCAgICAgICAgICAgICAgICBSaWdodE1hc2s7DQotICBVSU5UTiAgICAgICAgICAgICAgICBBZGRy ZXNzOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgQWRkcmVzc0ZpeDsNCi0gIFVJTlQ4ICAgICAg ICAgICAgICAgICpBZGRyZXNzMTsNCi0gIFVJTlQ4ICAgICAgICAgICAgICAgICpTb3VyY2VBZGRy ZXNzOw0KLSAgVUlOVDggICAgICAgICAgICAgICAgKkRlc3RpbmF0aW9uQWRkcmVzczsNCi0gIEVG SV9QQ0lfSU9fUFJPVE9DT0wgICpQY2lJbzsNCi0gIFVJTlQ4ICAgICAgICAgICAgICAgIERhdGE7 DQotICBVSU5UOCAgICAgICAgICAgICAgICBQaXhlbENvbG9yOw0KLSAgVUlOVDggICAgICAgICAg ICAgICAgKlZnYUZyYW1lQnVmZmVyOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgU291cmNlT2Zm c2V0Ow0KLSAgVUlOVE4gICAgICAgICAgICAgICAgU291cmNlV2lkdGg7DQotICBVSU5UTiAgICAg ICAgICAgICAgICBSb3dzOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAgQ29sdW1uczsNCi0gIFVJ TlROICAgICAgICAgICAgICAgIENvb3JkaW5hdGVYOw0KLSAgVUlOVE4gICAgICAgICAgICAgICAg Q29vcmRpbmF0ZVk7DQotICBVSU5UTiAgICAgICAgICAgICAgICBDdXJyZW50TW9kZTsNCi0NCi0g IGlmICgoVGhpcyA9PSBOVUxMKSB8fCAoKChVSU5UTilCbHRPcGVyYXRpb24pID49IEVmaUdyYXBo aWNzT3V0cHV0Qmx0T3BlcmF0aW9uTWF4KSkgew0KLSAgICByZXR1cm4gRUZJX0lOVkFMSURfUEFS QU1FVEVSOw0KLSAgfQ0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vVmlkZW86 DQotICAgICAgLy8NCi0gICAgICAvLyBDaGVjayBmb3IgYW4gYWxpZ25lZCBWaWRlbyB0byBWaWRl byBvcGVyYXRpb24NCi0gICAgICAvLw0KLSAgICAgIGlmICgoKFNvdXJjZVggJiAweDA3KSA9PSAw eDAwKSAmJiAoKERlc3RpbmF0aW9uWCAmIDB4MDcpID09IDB4MDApICYmICgoV2lkdGggJiAweDA3 KSA9PSAweDAwKSkgew0KLSAgICAgICAgLy8NCi0gICAgICAgIC8vIFByb2dyYW0gdGhlIE1vZGUg UmVnaXN0ZXIgV3JpdGUgbW9kZSAxLCBSZWFkIG1vZGUgMA0KLSAgICAgICAgLy8NCi0gICAgICAg IFdyaXRlR3JhcGhpY3NDb250cm9sbGVyICgNCi0gICAgICAgICAgUGNpSW8sDQotICAgICAgICAg IFZHQV9HUkFQSElDU19DT05UUk9MTEVSX01PREVfUkVHSVNURVIsDQotICAgICAgICAgIFZHQV9H UkFQSElDU19DT05UUk9MTEVSX1JFQURfTU9ERV8wIHwgVkdBX0dSQVBISUNTX0NPTlRST0xMRVJf V1JJVEVfTU9ERV8xDQotICAgICAgICAgICk7DQotDQotICAgICAgICBTb3VyY2VBZGRyZXNzICAg ICAgPSAoVUlOVDggKikoTWVtQWRkcmVzcyArIChTb3VyY2VZIDw8IDYpICsgKFNvdXJjZVkgPDwg NCkgKyAoU291cmNlWCA+PiAzKSk7DQotICAgICAgICBEZXN0aW5hdGlvbkFkZHJlc3MgPSAoVUlO VDggKikoTWVtQWRkcmVzcyArIChEZXN0aW5hdGlvblkgPDwgNikgKyAoRGVzdGluYXRpb25ZIDw8 IDQpICsgKERlc3RpbmF0aW9uWCA+PiAzKSk7DQotICAgICAgICBCeXRlcyAgICAgICAgICAgICAg PSBXaWR0aCA+PiAzOw0KLSAgICAgICAgZm9yIChJbmRleCA9IDAsIE9mZnNldCA9IDA7IEluZGV4 IDwgSGVpZ2h0OyBJbmRleCsrLCBPZmZzZXQgKz0gQnl0ZXNQZXJTY2FuTGluZSkgew0KLSAgICAg ICAgICBQY2lJby0+Q29weU1lbSAoDQotICAgICAgICAgICAgICAgICAgIFBjaUlvLA0KLSAgICAg ICAgICAgICAgICAgICBFZmlQY2lJb1dpZHRoVWludDgsDQotICAgICAgICAgICAgICAgICAgIEVG SV9QQ0lfSU9fUEFTU19USFJPVUdIX0JBUiwNCi0gICAgICAgICAgICAgICAgICAgKFVJTlQ2NCko VUlOVE4pKERlc3RpbmF0aW9uQWRkcmVzcyArIE9mZnNldCksDQotICAgICAgICAgICAgICAgICAg IEVGSV9QQ0lfSU9fUEFTU19USFJPVUdIX0JBUiwNCi0gICAgICAgICAgICAgICAgICAgKFVJTlQ2 NCkoVUlOVE4pKFNvdXJjZUFkZHJlc3MgKyBPZmZzZXQpLA0KLSAgICAgICAgICAgICAgICAgICBC eXRlcw0KLSAgICAgICAgICAgICAgICAgICApOw0KLSAgICAgICAgfQ0KLSAgICAgIH0gZWxzZSB7 DQotICAgICAgICBTb3VyY2VPZmZzZXQgPSAoU291cmNlWSA8PCA2KSArIChTb3VyY2VZIDw8IDQp ICsgKFNvdXJjZVggPj4gMyk7DQotICAgICAgICBTb3VyY2VXaWR0aCAgPSAoKFNvdXJjZVggKyBX aWR0aCAtIDEpID4+IDMpIC0gKFNvdXJjZVggPj4gMykgKyAxOw0KLQ0KLSAgICAgICAgLy8NCi0g ICAgICAgIC8vIFJlYWQgYWxsIHRoZSBwaXhlbHMgaW4gdGhlIDQgYml0IHBsYW5lcyBpbnRvIGEg bWVtb3J5IGJ1ZmZlciB0aGF0IGxvb2tzIGxpa2UgdGhlIFZHQSBidWZmZXINCi0gICAgICAgIC8v DQotICAgICAgICBWZ2FSZWFkQml0UGxhbmVzICgNCi0gICAgICAgICAgUGNpSW8sDQotICAgICAg ICAgIE1lbUFkZHJlc3MgKyBTb3VyY2VPZmZzZXQsDQotICAgICAgICAgIFZnYUZyYW1lQnVmZmVy ICsgU291cmNlT2Zmc2V0LA0KLSAgICAgICAgICBTb3VyY2VXaWR0aCwNCi0gICAgICAgICAgSGVp Z2h0DQotICAgICAgICAgICk7DQotICAgICAgfQ0KLQ0KLSAgICAgIGJyZWFrOw0KLQ0KLSAgICBj YXNlIEVmaUJsdFZpZGVvRmlsbDoNCi0gICAgICBTdGFydEFkZHJlc3MgPSAoVUlOVE4pKE1lbUFk ZHJlc3MgKyAoRGVzdGluYXRpb25ZIDw8IDYpICsgKERlc3RpbmF0aW9uWSA8PCA0KSArIChEZXN0 aW5hdGlvblggPj4gMykpOw0KLSAgICAgIEJ5dGVzICAgICAgICA9ICgoRGVzdGluYXRpb25YICsg V2lkdGggLSAxKSA+PiAzKSAtIChEZXN0aW5hdGlvblggPj4gMyk7DQotICAgICAgTGVmdE1hc2sg ICAgID0gbVZnYUxlZnRNYXNrVGFibGVbRGVzdGluYXRpb25YICYgMHgwN107DQotICAgICAgUmln aHRNYXNrICAgID0gbVZnYVJpZ2h0TWFza1RhYmxlWyhEZXN0aW5hdGlvblggKyBXaWR0aCAtIDEp ICYgMHgwN107DQotICAgICAgaWYgKEJ5dGVzID09IDApIHsNCi0gICAgICAgIExlZnRNYXNrICA9 IChVSU5UOCkoTGVmdE1hc2sgJiBSaWdodE1hc2spOw0KLSAgICAgICAgUmlnaHRNYXNrID0gMDsN Ci0gICAgICB9DQotDQotICAgICAgaWYgKExlZnRNYXNrID09IDB4ZmYpIHsNCi0gICAgICAgIFN0 YXJ0QWRkcmVzcy0tOw0KLSAgICAgICAgQnl0ZXMrKzsNCi0gICAgICAgIExlZnRNYXNrID0gMDsN Ci0gICAgICB9DQotDQotICAgICAgaWYgKFJpZ2h0TWFzayA9PSAweGZmKSB7DQotICAgICAgICBC eXRlcysrOw0KLSAgICAgICAgUmlnaHRNYXNrID0gMDsNCi0gICAgICB9DQotDQotICAgICAgUGl4 ZWxDb2xvciA9IFZnYUNvbnZlcnRDb2xvciAoQmx0QnVmZmVyKTsNCi0NCi0gICAgICAvLw0KLSAg ICAgIC8vIFByb2dyYW0gdG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zID0gU3RhcnRBZGRy ZXNzOyBJbmRleCA8IEhlaWdodDsgSW5kZXgrKywgQWRkcmVzcyArPSBCeXRlc1BlclNjYW5MaW5l KSB7DQotICAgICAgICAgIC8vDQotICAgICAgICAgIC8vIFJlYWQgZGF0YSBmcm9tIHRoZSBiaXQg cGxhbmVzIGludG8gdGhlIGxhdGNoZXMNCi0gICAgICAgICAgLy8NCi0gICAgICAgICAgUGNpSW8t Pk1lbS5SZWFkICgNCi0gICAgICAgICAgICAgICAgICAgICAgIFBjaUlvLA0KLSAgICAgICAgICAg ICAgICAgICAgICAgRWZpUGNpSW9XaWR0aFVpbnQ4LA0KLSAgICAgICAgICAgICAgICAgICAgICAg RUZJX1BDSV9JT19QQVNTX1RIUk9VR0hfQkFSLA0KLSAgICAgICAgICAgICAgICAgICAgICAgKFVJ TlQ2NCkoVUlOVE4pQWRkcmVzcywNCi0gICAgICAgICAgICAgICAgICAgICAgIDEsDQotICAgICAg ICAgICAgICAgICAgICAgICAmRGF0YQ0KLSAgICAgICAgICAgICAgICAgICAgICAgKTsNCi0gICAg ICAgICAgLy8NCi0gICAgICAgICAgLy8gV3JpdGUgdGhlIGxvd2VyIDQgYml0cyBvZiBQaXhlbENv bG9yIHRvIHRoZSBiaXQgcGxhbmVzIGluIHRoZSBwaXhlbHMgZW5hYmxlZCBieSBCaXRNYXNrDQot ICAgICAgICAgIC8vDQotICAgICAgICAgIFBjaUlvLT5NZW0uV3JpdGUgKA0KLSAgICAgICAgICAg ICAgICAgICAgICAgUGNpSW8sDQotICAgICAgICAgICAgICAgICAgICAgICBFZmlQY2lJb1dpZHRo VWludDgsDQotICAgICAgICAgICAgICAgICAgICAgICBFRklfUENJX0lPX1BBU1NfVEhST1VHSF9C QVIsDQotICAgICAgICAgICAgICAgICAgICAgICAoVUlOVDY0KShVSU5UTilBZGRyZXNzLA0KLSAg ICAgICAgICAgICAgICAgICAgICAgMSwNCi0gICAgICAgICAgICAgICAgICAgICAgICZQaXhlbENv bG9yDQotICAgICAgICAgICAgICAgICAgICAgICApOw0KLSAgICAgICAgfQ0KLSAgICAgIH0NCi0N Ci0gICAgICBpZiAoQnl0ZXMgPiAxKSB7DQotICAgICAgICAvLw0KLSAgICAgICAgLy8gUHJvZ3Jh bSB0aGUgQml0TWFzayByZWdpc3RlciB3aXRoIHRoZSBtaWRkbGUgY29sdW1uIG1hc2sgb2YgMHhm Zg0KLSAgICAgICAgLy8NCi0gICAgICAgIFdyaXRlR3JhcGhpY3NDb250cm9sbGVyICgNCi0gICAg ICAgICAgUGNpSW8sDQotICAgICAgICAgIFZHQV9HUkFQSElDU19DT05UUk9MTEVSX0JJVF9NQVNL X1JFR0lTVEVSLA0KLSAgICAgICAgICAweGZmDQotICAgICAgICAgICk7DQotDQotICAgICAgICBm b3IgKEluZGV4ID0gMCwgQWRkcmVzcyA9IFN0YXJ0QWRkcmVzcyArIDE7IEluZGV4IDwgSGVpZ2h0 OyBJbmRleCsrLCBBZGRyZXNzICs9IEJ5dGVzUGVyU2NhbkxpbmUpIHsNCi0gICAgICAgICAgUGNp SW8tPk1lbS5Xcml0ZSAoDQotICAgICAgICAgICAgICAgICAgICAgICBQY2lJbywNCi0gICAgICAg ICAgICAgICAgICAgICAgIEVmaVBjaUlvV2lkdGhGaWxsVWludDgsDQotICAgICAgICAgICAgICAg ICAgICAgICBFRklfUENJX0lPX1BBU1NfVEhST1VHSF9CQVIsDQotICAgICAgICAgICAgICAgICAg ICAgICAoVUlOVDY0KShVSU5UTilBZGRyZXNzLA0KLSAgICAgICAgICAgICAgICAgICAgICAgQnl0 ZXMgLSAxLA0KLSAgICAgICAgICAgICAgICAgICAgICAgJlBpeGVsQ29sb3INCi0gICAgICAgICAg ICAgICAgICAgICAgICk7DQotICAgICAgICB9DQotICAgICAgfQ0KLQ0KLSAgICAgIGlmIChSaWdo dE1hc2sgIT0gMCkgew0KLSAgICAgICAgLy8NCi0gICAgICAgIC8vIFByb2dyYW0gdGhlIEJpdE1h c2sgcmVnaXN0ZXIgd2l0aCB0aGUgUmlnaHQgY29sdW1uIG1hc2sNCi0gICAgICAgIC8vDQotICAg ICAgICBXcml0ZUdyYXBoaWNzQ29udHJvbGxlciAoDQotICAgICAgICAgIFBjaUlvLA0KLSAgICAg ICAgICBWR0FfR1JBUEhJQ1NfQ09OVFJPTExFUl9CSVRfTUFTS19SRUdJU1RFUiwNCi0gICAgICAg ICAgUmlnaHRNYXNrDQotICAgICAgICAgICk7DQotDQotICAgICAgICBmb3IgKEluZGV4ID0gMCwg QWRkcmVzcyA9IFN0YXJ0QWRkcmVzcyArIEJ5dGVzOyBJbmRleCA8IEhlaWdodDsgSW5kZXgrKywg QWRkcmVzcyArPSBCeXRlc1BlclNjYW5MaW5lKSB7DQotICAgICAgICAgIC8vDQotICAgICAgICAg IC8vIFJlYWQgZGF0YSBmcm9tIHRoZSBiaXQgcGxhbmVzIGludG8gdGhlIGxhdGNoZXMNCi0gICAg ICAgICAgLy8NCi0gICAgICAgICAgUGNpSW8tPk1lbS5SZWFkICgNCi0gICAgICAgICAgICAgICAg ICAgICAgIFBjaUlvLA0KLSAgICAgICAgICAgICAgICAgICAgICAgRWZpUGNpSW9XaWR0aFVpbnQ4 LA0KLSAgICAgICAgICAgICAgICAgICAgICAgRUZJX1BDSV9JT19QQVNTX1RIUk9VR0hfQkFSLA0K LSAgICAgICAgICAgICAgICAgICAgICAgKFVJTlQ2NCkoVUlOVE4pQWRkcmVzcywNCi0gICAgICAg ICAgICAgICAgICAgICAgIDEsDQotICAgICAgICAgICAgICAgICAgICAgICAmRGF0YQ0KLSAgICAg ICAgICAgICAgICAgICAgICAgKTsNCi0gICAgICAgICAgLy8NCi0gICAgICAgICAgLy8gV3JpdGUg dGhlIGxvd2VyIDQgYml0cyBvZiBQaXhlbENvbG9yIHRvIHRoZSBiaXQgcGxhbmVzIGluIHRoZSBw aXhlbHMgZW5hYmxlZCBieSBCaXRNYXNrDQotICAgICAgICAgIC8vDQotICAgICAgICAgIFBjaUlv LT5NZW0uV3JpdGUgKA0KLSAgICAgICAgICAgICAgICAgICAgICAgUGNpSW8sDQotICAgICAgICAg ICAgICAgICAgICAgICBFZmlQY2lJb1dpZHRoVWludDgsDQotICAgICAgICAgICAgICAgICAgICAg ICBFRklfUENJX0lPX1BBU1NfVEhST1VHSF9CQVIsDQotICAgICAgICAgICAgICAgICAgICAgICAo VUlOVDY0KShVSU5UTilBZGRyZXNzLA0KLSAgICAgICAgICAgICAgICAgICAgICAgMSwNCi0gICAg ICAgICAgICAgICAgICAgICAgICZQaXhlbENvbG9yDQotICAgICAgICAgICAgICAgICAgICAgICAp Ow0KLSAgICAgICAgfQ0KLSAgICAgIH0NCi0NCi0gICAgICBicmVhazsNCi0NCi0gICAgY2FzZSBF ZmlCbHRCdWZmZXJUb1ZpZGVvOg0KLSAgICAgIFN0YXJ0QWRkcmVzcyA9IChVSU5UTikoTWVtQWRk cmVzcyArIChEZXN0aW5hdGlvblkgPDwgNikgKyAoRGVzdGluYXRpb25ZIDw8IDQpICsgKERlc3Rp bmF0aW9uWCA+PiAzKSk7DQotICAgICAgTGVmdE1hc2sgICAgID0gbVZnYUJpdE1hc2tUYWJsZVtE ZXN0aW5hdGlvblggJiAweDA3XTsNCi0NCi0gICAgICAvLw0KLSAgICAgIC8vIFByb2dyYW0gdGhl IE1vZGUgUmVnaXN0ZXIgV3JpdGUgbW9kZSAyLCBSZWFkIG1vZGUgMA0KLSAgICAgIC8vDQotICAg ICAgV3JpdGVHcmFwaGljc0NvbnRyb2xsZXIgKA0KLSAgICAgICAgUGNpSW8sDQotICAgICAgICBW R0FfR1JBUEhJQ1NfQ09OVFJPTExFUl9NT0RFX1JFR0lTVEVSLA0KLSAgICAgICAgVkdBX0dSQVBI SUNTX0NPTlRST0xMRVJfUkVBRF9NT0RFXzAgfCBWR0FfR1JBUEhJQ1NfQ09OVFJPTExFUl9XUklU RV9NT0RFXzINCi0gICAgICAgICk7DQotDQotICAgICAgLy8NCi0gICAgICAvLyBQcm9ncmFtIHRo ZS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JJVF9NQVNLX1JFR0lTVEVSLA0KLSAgICAgICAgICAgIExlZnRN YXNrDQotICAgICAgICAgICAgKTsNCi0NCi0gICAgICAgICAgZm9yIChJbmRleDEgPSBCaXQsIEFk ZHJlc3MxID0gKFVJTlQ4ICopQWRkcmVzc0ZpeDsgSW5kZXgxIDwgV2lkdGg7IEluZGV4MSArPSA4 LCBBZGRyZXNzMSsrKSB7DQotICAgICAgICAgICAgLy8NCi0gICAgICAgICAgICAvLyBSZWFkIGRh dGEgZnJvbSB0aGUgYml0IHBsYW5lcyBpbnRvIHRoZSBsYXRjaGVzDQotICAgICAgICAgICAgLy8N Ci0gICAgICAgICAgICBQY2lJby0+TWVtLlJlYWQgKA0KLSAgICAgICAgICAgICAgICAgICAgICAg ICBQY2lJbywNCi0gICAgICAgICAgICAgICAgICAgICAgICAgRWZpUGNpSW9XaWR0aFVpbnQ4LA0K LSAgICAgICAgICAgICAgICAgICAgICAgICBFRklfUENJX0lPX1BBU1NfVEhST1VHSF9CQVIsDQot ICAgICAgICAgICAgICAgICAgICAgICAgIChVSU5UNjQpKFVJTlROKUFkZHJlc3MxLA0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAxLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAmRGF0YQ0K LSAgICAgICAgICAgICAgICAgICAgICAgICApOw0KLQ0KLSAgICAgICAgICAgIFBjaUlvLT5NZW0u V3JpdGUgKA0KLSAgICAgICAgICAgICAgICAgICAgICAgICBQY2lJbywNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgRWZpUGNpSW9XaWR0aFVpbnQ4LA0KLSAgICAgICAgICAgICAgICAgICAgICAg ICBFRklfUENJX0lPX1BBU1NfVEhST1VHSF9CQVIsDQotICAgICAgICAgICAgICAgICAgICAgICAg IChVSU5UNjQpKFVJTlROKUFkZHJlc3MxLA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAxLA0K LSAgICAgICAgICAgICAgICAgICAgICAgICAmQmlvc1ZpZGVvUHJpdmF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ZGljYXRpbmcgdGhlIGxhbmd1YWdlLiBUaGlzIGlzIHRoZQ0KLSAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgbGFuZ3VhZ2Ugb2YgdGhlIGRyaXZlciBuYW1lIHRoYXQgdGhlIGNhbGxlciBp cw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVxdWVzdGluZywgYW5kIGl0IG11 c3QgbWF0Y2ggb25lIG9mIHRoZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGFu Z3VhZ2VzIHNwZWNpZmllZCBpbiBTdXBwb3J0ZWRMYW5ndWFnZXMuIFRoZQ0KLSAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgbnVtYmVyIG9mIGxhbmd1YWdlcyBzdXBwb3J0ZWQgYnkgYSBk cml2ZXIgaXMgdXANCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRvIHRoZSBkcml2 ZXIgd3JpdGVyLiBMYW5ndWFnZSBpcyBzcGVjaWZpZWQNCi0gICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgIGluIFJGQyA0NjQ2IG9yIElTTyA2MzktMiBsYW5ndWFnZSBjb2RlIGZvcm1hdC4N Ci0NCi0gIEBwYXJhbSAgRHJpdmVyTmFtZVtvdXRdICAgICAgIEEgcG9pbnRlciB0byB0aGUgVW5p Y29kZSBzdHJpbmcgdG8gcmV0dXJuLg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg VGhpcyBVbmljb2RlIHN0cmluZyBpcyB0aGUgbmFtZSBvZiB0aGUNCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGRyaXZlciBzcGVjaWZpZWQgYnkgVGhpcyBpbiB0aGUgbGFuZ3VhZ2UN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNpZmllZCBieSBMYW5ndWFnZS4N Ci0NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgIF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QHBh cmFtICBDb250cm9sbGVySGFuZGxlW2luXSAgVGhlIGhhbmRsZSBvZiBhIGNvbnRyb2xsZXIgdGhh dCB0aGUgZHJpdmVyDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGVjaWZpZWQg YnkgVGhpcyBpcyBtYW5hZ2luZy4gIFRoaXMgaGFuZGxlDQotICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBzcGVjaWZpZXMgdGhlIGNvbnRyb2xsZXIgd2hvc2UgbmFtZSBpcyB0byBiZQ0K LSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuZWQuDQotDQotICBAcGFyYW0g IENoaWxkSGFuZGxlW2luXSAgICAgICBUaGUgaGFuZGxlIG9mIHRoZSBjaGlsZCBjb250cm9sbGVy IHRvIHJldHJpZXZlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbmFtZSBv Zi4gIFRoaXMgaXMgYW4gb3B0aW9uYWwgcGFyYW1ldGVyIHRoYXQNCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIG1heSBiZSBOVUxMLiAgSXQgd2lsbCBiZSBOVUxMIGZvciBkZXZpY2UN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRyaXZlcnMuICBJdCB3aWxsIGFsc28g YmUgTlVMTCBmb3IgYSBidXMgZHJpdmVycw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgdGhhdCB3aXNoIHRvIHJldHJpZXZlIHRoZSBuYW1lIG9mIHRoZSBidXMNCi0gICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgIGNvbnRyb2xsZXIuICBJdCB3aWxsIG5vdCBiZSBOVUxMIGZv ciBhIGJ1cw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJpdmVyIHRoYXQgd2lz aGVzIHRvIHJldHJpZXZlIHRoZSBuYW1lIG9mIGENCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGNoaWxkIGNvbnRyb2xsZXIuDQotDQotICBAcGFyYW0gIExhbmd1YWdlW2luXSAgICAg ICAgICBBIHBvaW50ZXIgdG8gYSBOdWxsLXRlcm1pbmF0ZWQgQVNDSUkgc3RyaW5nDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBhcnJheSBpbmRpY2F0aW5nIHRoZSBsYW5ndWFnZS4g IFRoaXMgaXMgdGhlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZSBv ZiB0aGUgZHJpdmVyIG5hbWUgdGhhdCB0aGUgY2FsbGVyIGlzDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICByZXF1ZXN0aW5nLCBhbmQgaXQgbXVzdCBtYXRjaCBvbmUgb2YgdGhlDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYW5ndWFnZXMgc3BlY2lmaWVkIGluIFN1 cHBvcnRlZExhbmd1YWdlcy4gVGhlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBu dW1iZXIgb2YgbGFuZ3VhZ2VzIHN1cHBvcnRlZCBieSBhIGRyaXZlciBpcyB1cA0KLSAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgdG8gdGhlIGRyaXZlciB3cml0ZXIuIExhbmd1YWdlIGlz IHNwZWNpZmllZCBpbg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUkZDIDQ2NDYg b3IgSVNPIDYzOS0yIGxhbmd1YWdlIGNvZGUgZm9ybWF0Lg0KLQ0KLSAgQHBhcmFtICBDb250cm9s bGVyTmFtZVtvdXRdICAgQSBwb2ludGVyIHRvIHRoZSBVbmljb2RlIHN0cmluZyB0byByZXR1cm4u DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGlzIFVuaWNvZGUgc3RyaW5nIGlz IHRoZSBuYW1lIG9mIHRoZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udHJv bGxlciBzcGVjaWZpZWQgYnkgQ29udHJvbGxlckhhbmRsZSBhbmQNCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIENoaWxkSGFuZGxlIGluIHRoZSBsYW5ndWFnZSBzcGVjaWZpZWQgYnkN Ci0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIExhbmd1YWdlIGZyb20gdGhlIHBvaW50 IG9mIHZpZXcgb2YgdGhlIGRyaXZlcg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg c3BlY2lmaWVkIGJ5IFRoaXMuDQotDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAgICAgICBU aGUgVW5pY29kZSBzdHJpbmcgZm9yIHRoZSB1c2VyIHJlYWRhYmxlIG5hbWUgaW4NCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBsYW5ndWFnZSBzcGVjaWZpZWQgYnkgTGFuZ3Vh Z2UgZm9yIHRoZQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZHJpdmVyIHNwZWNp ZmllZCBieSBUaGlzIHdhcyByZXR1cm5lZCBpbg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgRHJpdmVyTmFtZS4NCi0NCi0gIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSIENv bnRyb2xsZXJIYW5kbGUgaXMgTlVMTC4NCi0NCi0gIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1F VEVSIENoaWxkSGFuZGxlIGlzIG5vdCBOVUxMIGFuZCBpdCBpcyBub3QgYSB2YWxpZA0KLSAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgRUZJX0hBTkRMRS4NCi0NCi0gIEByZXR2YWwgRUZJ X0lOVkFMSURfUEFSQU1FVEVSIExhbmd1YWdlIGlzIE5VTEwuDQotDQotICBAcmV0dmFsIEVGSV9J TlZBTElEX1BBUkFNRVRFUiBDb250cm9sbGVyTmFtZSBpcyBOVUxMLg0KLQ0KLSAgQHJldHZhbCBF RklfVU5TVVBQT1JURUQgICAgICAgVGhlIGRyaXZlciBzcGVjaWZpZWQgYnkgVGhpcyBpcyBub3Qg Y3VycmVudGx5DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtYW5hZ2luZyB0aGUg Y29udHJvbGxlciBzcGVjaWZpZWQgYnkNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg IENvbnRyb2xsZXJIYW5kbGUgYW5kIENoaWxkSGFuZGxlLg0KLQ0KLSAgQHJldHZhbCBFRklfVU5T VVBQT1JURUQgICAgICAgVGhlIGRyaXZlciBzcGVjaWZpZWQgYnkgVGhpcyBkb2VzIG5vdCBzdXBw b3J0DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGUgbGFuZ3VhZ2Ugc3BlY2lm aWVkIGJ5IExhbmd1YWdlLg0KLQ0KLSoqLw0KLUVGSV9TVEFUVVMNCi1FRklBUEkNCi1CaW9zVmlk ZW9Db21wb25lbnROYW1lR2V0Q29udHJvbGxlck5hbWUgKA0KLSAgSU4gIEVGSV9DT01QT05FTlRf TkFNRV9QUk9UT0NPTCAgKlRoaXMsDQotICBJTiAgRUZJX0hBTkRMRSAgICAgICAgICAgICAgICAg ICBDb250cm9sbGVySGFuZGxlLA0KLSAgSU4gIEVGSV9IQU5ETEUgICAgICAgICAgICAgICAgICAg Q2hpbGRIYW5kbGUgICAgICAgIE9QVElPTkFMLA0KLSAgSU4gIENIQVI4ICAgICAgICAgICAgICAg ICAgICAgICAgKkxhbmd1YWdlLA0KLSAgT1VUIENIQVIxNiAgICAgICAgICAgICAgICAgICAgICAg KipDb250cm9sbGVyTmFtZQ0KLSAgKTsNCi0NCi0vLw0KLS8vIEVGSSBDb21wb25lbnQgTmFtZSBQ cm90b2NvbA0KLS8vDQotR0xPQkFMX1JFTU9WRV9JRl9VTlJFRkVSRU5DRUQgRUZJX0NPTVBPTkVO VF9OQU1FX1BST1RPQ09MICBnQmlvc1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AgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlcyBzcGVjaWZpZWQgaW4gU3VwcG9ydGVkTGFu Z3VhZ2VzLiBUaGUNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bWJlciBvZiBs YW5ndWFnZXMgc3VwcG9ydGVkIGJ5IGEgZHJpdmVyIGlzIHVwDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB0byB0aGUgZHJpdmVyIHdyaXRlci4gTGFuZ3VhZ2UgaXMgc3BlY2lmaWVk DQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbiBSRkMgNDY0NiBvciBJU08gNjM5 LTIgbGFuZ3VhZ2UgY29kZSBmb3JtYXQuDQotDQotICBAcGFyYW0gIERyaXZlck5hbWVbb3V0XSAg ICAgICBBIHBvaW50ZXIgdG8gdGhlIFVuaWNvZGUgc3RyaW5nIHRvIHJldHVybi4NCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIFRoaXMgVW5pY29kZSBzdHJpbmcgaXMgdGhlIG5hbWUg b2YgdGhlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkcml2ZXIgc3BlY2lmaWVk IGJ5IFRoaXMgaW4gdGhlIGxhbmd1YWdlDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICBzcGVjaWZpZWQgYnkgTGFuZ3VhZ2UuDQotDQotICBAcmV0dmFsIEVGSV9TVUNDRVNTICAgICAg ICAgICBUaGUgVW5pY29kZSBzdHJpbmcgZm9yIHRoZSBEcml2ZXIgc3BlY2lmaWVkIGJ5DQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUaGlzIGFuZCB0aGUgbGFuZ3VhZ2Ugc3BlY2lm aWVkIGJ5IExhbmd1YWdlIHdhcw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0 dXJuZWQgaW4gRHJpdmVyTmFtZS4NCi0NCi0gIEByZXR2YWwgRUZJX0lOVkFMSUR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W5zdGFuY2UuDQotDQotICBAcGFyYW0gIENvbnRyb2xsZXJIYW5k bGVbaW5dICBUaGUgaGFuZGxlIG9mIGEgY29udHJvbGxlciB0aGF0IHRoZSBkcml2ZXINCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNpZmllZCBieSBUaGlzIGlzIG1hbmFnaW5n LiAgVGhpcyBoYW5kbGUNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNwZWNpZmll cyB0aGUgY29udHJvbGxlciB3aG9zZSBuYW1lIGlzIHRvIGJlDQotICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICByZXR1cm5lZC4NCi0NCi0gIEBwYXJhbSAgQ2hpbGRIYW5kbGVbaW5dICAg ICAgIFRoZSBoYW5kbGUgb2YgdGhlIGNoaWxkIGNvbnRyb2xsZXIgdG8gcmV0cmlldmUNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRoZSBuYW1lIG9mLiAgVGhpcyBpcyBhbiBvcHRp b25hbCBwYXJhbWV0ZXIgdGhhdA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWF5 IGJlIE5VTEwuICBJdCB3aWxsIGJlIE5VTEwgZm9yIGRldmljZQ0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgZHJpdmVycy4gIEl0IHdpbGwgYWxzbyBiZSBOVUxMIGZvciBhIGJ1cyBk cml2ZXJzDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aGF0IHdpc2ggdG8gcmV0 cmlldmUgdGhlIG5hbWUgb2YgdGhlIGJ1cw0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgY29udHJvbGxlci4gIEl0IHdpbGwgbm90IGJlIE5VTEwgZm9yIGEgYnVzDQotICAgICAgICAg ICAgICAgICAgICAgICAgICAgICAgICBkcml2ZXIgdGhhdCB3aXNoZXMgdG8gcmV0cmlldmUgdGhl IG5hbWUgb2YgYQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGQgY29udHJv bGxlci4NCi0NCi0gIEBwYXJhbSAgTGFuZ3VhZ2VbaW5dICAgICAgICAgIEEgcG9pbnRlciB0byBh IE51bGwtdGVybWluYXRlZCBBU0NJSSBzdHJpbmcNCi0gICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgIGFycmF5IGluZGljYXRpbmcgdGhlIGxhbmd1YWdlLiAgVGhpcyBpcyB0aGUNCi0gICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhbmd1YWdlIG9mIHRoZSBkcml2ZXIgbmFtZSB0 aGF0IHRoZSBjYWxsZXIgaXMNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlcXVl c3RpbmcsIGFuZCBpdCBtdXN0IG1hdGNoIG9uZSBvZiB0aGUNCi0gICAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgIGxhbmd1YWdlcyBzcGVjaWZpZWQgaW4gU3VwcG9ydGVkTGFuZ3VhZ2VzLiBU aGUNCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bWJlciBvZiBsYW5ndWFnZXMg c3VwcG9ydGVkIGJ5IGEgZHJpdmVyIGlzIHVwDQotICAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICB0byB0aGUgZHJpdmVyIHdyaXRlci4gTGFuZ3VhZ2UgaXMgc3BlY2lmaWVkIGluDQotICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSRkMgNDY0NiBvciBJU08gNjM5LTIgbGFuZ3Vh Z2UgY29kZSBmb3JtYXQuDQotDQotICBAcGFyYW0gIENvbnRyb2xsZXJOYW1lW291dF0gICBBIHBv aW50ZXIgdG8gdGhlIFVuaWNvZGUgc3RyaW5nIHRvIHJldHVybi4NCi0gICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgIFRoaXMgVW5pY29kZSBzdHJpbmcgaXMgdGhlIG5hbWUgb2YgdGhlDQot ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250cm9sbGVyIHNwZWNpZmllZCBieSBD b250cm9sbGVySGFuZGxlIGFuZA0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ2hp bGRIYW5kbGUgaW4gdGhlIGxhbmd1YWdlIHNwZWNpZmllZCBieQ0KLSAgICAgICAgICAgICAgICAg ICAgICAgICAgICAgICAgTGFuZ3VhZ2UgZnJvbSB0aGUgcG9pbnQgb2YgdmlldyBvZiB0aGUgZHJp dmVyDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzcGVjaWZpZWQgYnkgVGhpcy4N Ci0NCi0gIEByZXR2YWwgRUZJX1NVQ0NFU1MgICAgICAgICAgIFRoZSBVbmljb2RlIHN0cmluZyBm b3IgdGhlIHVzZXIgcmVhZGFibGUgbmFtZSBpbg0KLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgdGhlIGxhbmd1YWdlIHNwZWNpZmllZCBieSBMYW5ndWFnZSBmb3IgdGhlDQotICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICBkcml2ZXIgc3BlY2lmaWVkIGJ5IFRoaXMgd2FzIHJl dHVybmVkIGluDQotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEcml2ZXJOYW1lLg0K LQ0KLSAgQHJldHZhbCBFRklfSU5WQUxJRF9QQVJBTUVURVIgQ29udHJvbGxlckhhbmRsZSBpcyBO VUxMLg0KLQ0KLSAgQHJldHZhbCBFRklfSU5WQUxJRF9QQVJBTUVURVIgQ2hpbGRIYW5kbGUgaXMg bm90IE5VTEwgYW5kIGl0IGlzIG5vdCBhIHZhbGlkDQotICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICBFRklfSEFORExFLg0KLQ0KLSAgQHJldHZhbCBFRklfSU5WQUxJRF9QQVJBTUVURVIg TGFuZ3VhZ2UgaXMgTlVMTC4NCi0NCi0gIEByZXR2YWwgRUZJX0lOVkFMSURfUEFSQU1FVEVSIENv bnRyb2xsZXJOYW1lIGlzIE5VTEwuDQotDQotICBAcmV0dmFsIEVGSV9VTlNVUFBPUlRFRCAgICAg ICBUaGUgZHJpdmVyIHNwZWNpZmllZCBieSBUaGlzIGlzIG5vdCBjdXJyZW50bHkNCi0gICAgICAg ICAgICAgICAgICAgICAgICAgICAgICAgIG1hbmFnaW5nIHRoZSBjb250cm9sbGVyIHNwZWNpZmll ZCBieQ0KLSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQ29udHJvbGxlckhhbmRsZSBh bmQgQ2hpbGRIYW5kbGUuDQotDQotICBAcmV0dmFsIEVGSV9VTlNVUFBPUlRFRCAgICAgICBUaGUg ZHJpdmVyIHNwZWNpZmllZCBieSBUaGlzIGRvZXMgbm90IHN1cHBvcnQNCi0gICAgICAgICAgICAg ICAgICAgICAgICAgICAgICAgIHRoZSBsYW5ndWFnZSBzcGVjaWZpZWQgYnkgTGFuZ3VhZ2UuDQot DQotKiovDQotRUZJX1NUQVRVUw0KLUVGSUFQSQ0KLUJpb3NWaWRlb0NvbXBvbmVudE5hbWVHZXRD b250cm9sbGVyTmFtZSAoDQotICBJTiAgRUZJX0NPTVBPTkVOVF9OQU1FX1BST1RPQ09MICAqVGhp cywNCi0gIElOICBFRklfSEFORExFICAgICAgICAgICAgICAgICAgIENvbnRyb2xsZXJIYW5kbGUs DQotICBJTiAgRUZJX0hBTkRMRSAgICAgICAgICAgICAgICAgICBDaGlsZEhhbmRsZSAgICAgICAg T1BUSU9OQUwsDQotICBJTiAgQ0hBUjggICAgICAgICAgICAgICAgICAgICAgICAqTGFuZ3VhZ2Us DQotICBPVVQgQ0hBUjE2ICAgICAgICAgICAgICAgICAgICAgICAqKkNvbnRyb2xsZXJOYW1lDQot ICApDQotew0KLSAgcmV0dXJuIEVGSV9VTlNVUFBPUlRFRDsNCi19DQoKDQoKLT0tPS09LT0tPS09 LT0tPS09LT0tPS0KR3JvdXBzLmlvIExpbmtzOiBZb3UgcmVjZWl2ZSBhbGwgbWVzc2Fn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