Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 6 Dec 2013 14:37:21 +0000
From:      "Desai, Kashyap" <Kashyap.Desai@lsi.com>
To:        "freebsd-scsi@freebsd.org" <freebsd-scsi@freebsd.org>
Cc:        "scottl@netflix.com" <scottl@netflix.com>, "Radford, Adam" <Adam.Radford@lsi.com>, "Kenneth D. Merry" <ken@kdm.org>, "sean_bruno@yahoo.com" <sean_bruno@yahoo.com>, "Mankani, Krishnaraddi" <Krishnaraddi.Mankani@lsi.com>, "dwhite@ixsystems.com" <dwhite@ixsystems.com>, "Maloy, Joe" <Joe.Maloy@lsi.com>, "jpaetzel@freebsd.org" <jpaetzel@freebsd.org>, Doug Ambrisko <ambrisko@cisco.com>, "McConnell, Stephen" <Stephen.McConnell@lsi.com>
Subject:   LSI - MR-Fusion controller driver <mrsas> patch and man page
Message-ID:  <08ba2a262fba45f687cdd3225f325110@BN1PR07MB247.namprd07.prod.outlook.com>

next in thread | raw e-mail | index | archive | help
--_003_08ba2a262fba45f687cdd3225f325110BN1PR07MB247namprd07pro_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

Hi,

Please consider attached patch for FreeBSD upstream check-in.

Please find attached patch for <mrsas> driver for LSI's MegaRaid Controller=
s. This driver supports Thunderbolt onwards Device IDs of MR controllers.
Currently it supports 0x005B and 0x005D Device IDs.

NOTE : This driver will not eliminate or by pass any functionality of <mfi>=
 driver which already support above to Device IDs to keep existing user exp=
erience unchanged.
=20
<mfi> Driver will be always given priority over <mrsas> driver and only if =
customer/user wants to use/migrate from <mfi> to <mrsas>, it will hook up i=
nto kernel via device.hint rules. (Attached is mrsas man page for more info=
.)

LSI will continue to update <mrsas> driver in future in timely bases. We ha=
ve another set of patch in pipeline to be submitted for <mrsas>, but need f=
irst go ahead for attached patch and later we will continue to keep <mrsas>=
 up-to-date (In sync with LSI released driver which is available at lsi's e=
xternal site)

Apply patch with "patch -p0 < patchname.patch" from head directory.=20

-- Few notes for user--
LSI recommends using fusion_force bit In hint settings at start of the day,=
 if they want to use <mrsas>. ( <mfi> will be a default choice for MR-Fusio=
n HBA), if will be changed only with fusion_force hint settings. (See mrsas=
 man page) Changing any default behavior is well tested for most of the con=
dition.
Switching from <mfi> to <mrsas> for MR-Fusion options is designed to allow =
user as one time choice, though multiple time switch from <mfi> to <mrsas> =
is possible, it is not recommended. So, user needs to decide from start of =
the day, which driver they want to use for MR-Fusion  card.

-- Implementation details --
To support this feature, we have modify <mfi> code to change default return=
 type from probe. Currently <mfi> driver return "BUS_PROBE_DEFAULT". <mfi> =
driver has been be changed to return "BUS_PROBE_LOW_PRIORITY" if fusion_for=
ce hint from device.hints  is set.
Please notice, above mentioned implementation in <mfi> driver is only appli=
cable in case of  MR-Fusion controller detection. For any other controllers=
, supported by <mfi> driver, the behavior of probe return will remain same =
as before.


-- High level feature list of <mrsas> --
1. Supports Fast Path feature of LSI controllers.
2. Supports 4K sector Drives.
3. CAM layer based interface. All VDs will be attached to CAM layer (Expect=
ed storage will be visible in "camcontroll")
4. Complete support of Online Controller Reset. (OCR)
5.  OCR on Fimrware fault and IO timeout case.
6. Work well with <storcli> management application which is generic applica=
tion provided by LSI for all other Operating system.
7. Supporst DIF enabled VDs (Same support as provided in Linux and other OS=
es in FreeBSD)
8. Fast Path Load balance support.

- In summary, this driver is in part with Linux based MR drivers and all ot=
her features will be available to <mrsas> as planned activity from LSI

This code is well tested by LSI Q/A team on 32 bit and 64 bit FreeBSD Relea=
sed OSes.


Thanks, Kashyap


--_003_08ba2a262fba45f687cdd3225f325110BN1PR07MB247namprd07pro_
Content-Type: application/octet-stream;
	name="upstream_mrsas_fusion_force.patch"
Content-Description: upstream_mrsas_fusion_force.patch
Content-Disposition: attachment;
	filename="upstream_mrsas_fusion_force.patch"; size=315504;
	creation-date="Fri, 06 Dec 2013 14:34:46 GMT";
	modification-date="Fri, 06 Dec 2013 19:46:04 GMT"
Content-Transfer-Encoding: base64

SW5kZXg6IHN5cy9tb2R1bGVzL21yc2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JsaWVyLiAgIAorICovCitzdGF0aWMgdm9pZCBtcnNhc19h
Y3Rpb24oc3RydWN0IGNhbV9zaW0gKnNpbSwgdW5pb24gY2NiICpjY2IpCit7CisgICAgc3RydWN0
IG1yc2FzX3NvZnRjICpzYyA9IChzdHJ1Y3QgbXJzYXNfc29mdGMgKiljYW1fc2ltX3NvZnRjKHNp
bSk7CisgICAgc3RydWN0IGNjYl9oZHIgKmNjYl9oID0gJihjY2ItPmNjYl9oKTsKKyAgICB1X2lu
dDMyX3QgZGV2aWNlX2lkOworCisgICAgc3dpdGNoIChjY2ItPmNjYl9oLmZ1bmNfY29kZSkgewor
ICAgICAgICBjYXNlIFhQVF9TQ1NJX0lPOgorICAgICAgICB7CisgICAgICAgICAgICBkZXZpY2Vf
aWQgPSBjY2JfaC0+dGFyZ2V0X2lkOworCisgICAgICAgICAgICAvKiAKKyAgICAgICAgICAgICAq
IGJ1cyAwIGlzIExELCBidXMgMSBpcyBmb3Igc3lzdGVtLVBEIAorICAgICAgICAgICAgICovIAor
ICAgICAgICAgICAgaWYgKGNhbV9zaW1fYnVzKHNpbSkgPT0gMSAmJiAKKyAgICAgICAgICAgICAg
ICBzYy0+cGRfbGlzdFtkZXZpY2VfaWRdLmRyaXZlU3RhdGUgIT0gTVJfUERfU1RBVEVfU1lTVEVN
KSB7CisgICAgICAgICAgICAgICAgLy9jY2ItPmNjYl9oLnN0YXR1cyB8PSBDQU1fUkVRX0lOVkFM
SUQ7CisgICAgICAgICAgICAgICAgY2NiLT5jY2JfaC5zdGF0dXMgfD0gQ0FNX0RFVl9OT1RfVEhF
UkU7CisgICAgICAgICAgICAgICAgeHB0X2RvbmUoY2NiKTsKKyAgICAgICAgICAgIH0KKyAgICAg
ICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIGlmIChtcnNhc19zdGFydGlvKHNjLCBzaW0s
IGNjYikpeworICAgICAgICAgICAgICAgICAgICBjY2ItPmNjYl9oLnN0YXR1cyB8PSBDQU1fUkVR
X0lOVkFMSUQ7CisgICAgICAgICAgICAgICAgICAgIHhwdF9kb25lKGNjYik7CisgICAgICAgICAg
ICAgICAgfQorICAgICAgICAgICAgfQorICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAg
ICAgICAgY2FzZSBYUFRfQUJPUlQ6CisgICAgICAgIHsKKyAgICAgICAgICAgIGNjYi0+Y2NiX2gu
c3RhdHVzID0gQ0FNX1VBX0FCT1JUOworICAgICAgICAgICAgeHB0X2RvbmUoY2NiKTsKKyAgICAg
ICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGNhc2UgWFBUX1JFU0VUX0JVUzoKKyAg
ICAgICAgeworICAgICAgICAgICAgeHB0X2RvbmUoY2NiKTsKKyAgICAgICAgICAgIGJyZWFrOwor
ICAgICAgICB9CisgICAgICAgIGNhc2UgWFBUX0dFVF9UUkFOX1NFVFRJTkdTOgorICAgICAgICB7
CisgICAgICAgICAgICBjY2ItPmN0cy5wcm90b2NvbCA9IFBST1RPX1NDU0k7CisgICAgICAgICAg
ICBjY2ItPmN0cy5wcm90b2NvbF92ZXJzaW9uID0gU0NTSV9SRVZfMjsKKyAgICAgICAgICAgIGNj
Yi0+Y3RzLnRyYW5zcG9ydCA9IFhQT1JUX1NQSTsKKyAgICAgICAgICAgIGNjYi0+Y3RzLnRyYW5z
cG9ydF92ZXJzaW9uID0gMjsgIAorICAgICAgICAgICAgY2NiLT5jdHMueHBvcnRfc3BlY2lmaWMu
c3BpLnZhbGlkID0gQ1RTX1NQSV9WQUxJRF9ESVNDOworICAgICAgICAgICAgY2NiLT5jdHMueHBv
cnRfc3BlY2lmaWMuc3BpLmZsYWdzID0gQ1RTX1NQSV9GTEFHU19ESVNDX0VOQjsKKyAgICAgICAg
ICAgIGNjYi0+Y3RzLnByb3RvX3NwZWNpZmljLnNjc2kudmFsaWQgPSBDVFNfU0NTSV9WQUxJRF9U
UTsKKyAgICAgICAgICAgIGNjYi0+Y3RzLnByb3RvX3NwZWNpZmljLnNjc2kuZmxhZ3MgPSBDVFNf
U0NTSV9GTEFHU19UQUdfRU5COworICAgICAgICAgICAgY2NiLT5jY2JfaC5zdGF0dXMgPSBDQU1f
UkVRX0NNUDsKKyAgICAgICAgICAgIHhwdF9kb25lKGNjYik7CisgICAgICAgICAgICBicmVhazsK
KyAgICAgICAgfQorICAgICAgICBjYXNlIFhQVF9TRVRfVFJBTl9TRVRUSU5HUzoKKyAgICAgICAg
eworICAgICAgICAgICAgY2NiLT5jY2JfaC5zdGF0dXMgPSBDQU1fRlVOQ19OT1RBVkFJTDsgCisg
ICAgICAgICAgICB4cHRfZG9uZShjY2IpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0K
KyAgICAgICAgY2FzZSBYUFRfQ0FMQ19HRU9NRVRSWToKKyAgICAgICAgeworICAgICAgICAgICAg
Y2FtX2NhbGNfZ2VvbWV0cnkoJmNjYi0+Y2NnLCAxKTsgICAKKyAgICAgICAgICAgIHhwdF9kb25l
KGNjYik7CisgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorICAgICAgICBjYXNlIFhQVF9Q
QVRIX0lOUToKKyAgICAgICAgeworICAgICAgICAgICAgY2NiLT5jcGkudmVyc2lvbl9udW0gPSAx
OworICAgICAgICAgICAgY2NiLT5jcGkuaGJhX2lucXVpcnkgPSAwOworICAgICAgICAgICAgY2Ni
LT5jcGkudGFyZ2V0X3NwcnQgPSAwOworICAgICAgICAgICAgY2NiLT5jcGkuaGJhX21pc2MgPSAw
OworICAgICAgICAgICAgY2NiLT5jcGkuaGJhX2VuZ19jbnQgPSAwOworICAgICAgICAgICAgY2Ni
LT5jcGkubWF4X2x1biA9IE1SU0FTX1NDU0lfTUFYX0xVTlM7CisgICAgICAgICAgICBjY2ItPmNw
aS51bml0X251bWJlciA9IGNhbV9zaW1fdW5pdChzaW0pOworICAgICAgICAgICAgY2NiLT5jcGku
YnVzX2lkID0gY2FtX3NpbV9idXMoc2ltKTsKKyAgICAgICAgICAgIGNjYi0+Y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QgKilkYXRhOwor
ICAgIHNjID0gY21kLT5zYzsKKworICAgIGlmIChjbWQtPmNjYl9wdHIgPT0gTlVMTCkgeworICAg
ICAgICBwcmludGYoImNvbW1hbmQgdGltZW91dCB3aXRoIE5VTEwgY2NiXG4iKTsKKyAgICAgICAg
cmV0dXJuOworICAgIH0KKworICAgIC8qIEJlbG93IGNhbGxvdXQgaXMgZHVtbXkgZW50cnkgc28g
dGhhdCBpdCB3aWxsIGJlCisgICAgICogY2FuY2VsbGVkIGZyb20gbXJzYXNfY21kX2RvbmUoKS4g
Tm93IENvbnRyb2xsZXIgd2lsbAorICAgICAqIGdvIHRvIE9DUi9LaWxsIEFkYXB0ZXIgYmFzZWQg
b24gT0NSIGVuYWJsZS9kaXNhYmxlCisgICAgICogcHJvcGVydHkgb2YgQ29udHJvbGxlciBmcm9t
IG9jcl90aHJlYWQgY29udGV4dC4KKyAgICAgKi8KKyAgICBjYWxsb3V0X3Jlc2V0KCZjbWQtPmNt
X2NhbGxvdXQsICg2MDAwMDAgKiBoeikgLyAxMDAwLAorICAgIG1yc2FzX3Njc2lpb190aW1lb3V0
LCBjbWQpOworICAgIHNjLT5kb190aW1lZG91dF9yZXNldCA9IDE7CisgICAgaWYoc2MtPm9jcl90
aHJlYWRfYWN0aXZlKQorICAgICAgICB3YWtldXAoJnNjLT5vY3JfY2hhbik7Cit9CisKKy8qKgor
ICogbXJzYXNfc3RhcnRpbzogICAgICAgICAgIFNDU0kgSU8gZW50cnkgcG9pbnQgICAKKyAqIGlu
cHV0OiAgICAgICAgICAgICAgICAgICBBZGFwdGVyIGluc3RhbmNlIHNvZnQgc3RhdGUgCisgKiAg
ICAgICAgICAgICAgICAgICAgICAgICAgcG9pbnRlciB0byBDQU0gQ29udHJvbCBCbG9jaworICoK
KyAqIFRoaXMgZnVuY3Rpb24gaXMgdGhlIFNDU0kgSU8gZW50cnkgcG9pbnQgYW5kIGl0IGluaXRp
YXRlcyBJTyBwcm9jZXNzaW5nLiAKKyAqIE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OiBzY2F0
dGVyIGdhdGhlciBpcyBub3Qgc3VwcG9ydGVkXG4iLAorICAgICAgICAgICAgICAgX19mdW5jX18p
OworICAgICAgICAgbXJzYXNfcmVsZWFzZV9tcHRfY21kKGNtZCk7CisgICAgICAgICBjY2JfaC0+
c3RhdHVzID0gQ0FNX1JFUV9JTlZBTElEOworICAgICAgICAgZ290byBkb25lOworCWNhc2UgQ0FN
X0RBVEFfVkFERFI6CisgICAgICAgICBpZiAoY3Npby0+ZHhmZXJfbGVuID4gTVJTQVNfTUFYX0lP
X1NJWkUpIHsKKyAgICAgICAgICAgICAgbXJzYXNfcmVsZWFzZV9tcHRfY21kKGNtZCk7CisgICAg
ICAgICAgICAgIGNjYl9oLT5zdGF0dXMgPSBDQU1fUkVRX1RPT19CSUc7CisgICAgICAgICAgICAg
IGdvdG8gZG9uZTsKKyAgICAgICAgICB9CisgICAgICAgICAgY21kLT5sZW5ndGggPSBjc2lvLT5k
eGZlcl9sZW47CisgICAgICAgICAgaWYgKGNtZC0+bGVuZ3RoKSAKKyAgICAgICAgICAgICAgY21k
LT5kYXRhID0gY3Npby0+ZGF0YV9wdHI7CisgICAgICAgIGJyZWFrOworICAgIGRlZmF1bHQ6Cisg
ICAgICAgIGNjYi0+Y2NiX2guc3RhdHVzID0gQ0FNX1JFUV9JTlZBTElEOworICAgICAgICBnb3Rv
IGRvbmU7CisgICAgfQorCisKKyAgICAvKiBzYXZlIGNjYiBwdHIgKi8KKyAgICBjbWQtPmNjYl9w
dHIgPSBjY2I7CisKKyAgICByZXFfZGVzYyA9IG1yc2FzX2dldF9yZXF1ZXN0X2Rlc2Moc2MsIChj
bWQtPmluZGV4KS0xKTsKKyAgICBpZiAoIXJlcV9kZXNjKSB7CisgICAgICAgIGRldmljZV9wcmlu
dGYoc2MtPm1yc2FzX2RldiwgIkNhbm5vdCBnZXQgcmVxdWVzdF9kZXNjcmlwdG9yLlxuIik7Cisg
ICAgICAgIHJldHVybiAoRkFJTCk7CisgICAgfQorIC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gdmlhIEZhc3RQYXRoICovCisgICAgaWYgKHJhaWQt
PmNhcGFiaWxpdHkuZnBDYXBhYmxlKSB7CisgICAgICAgIGlmIChpc1JlYWQpCisgICAgICAgICAg
ICBpb19pbmZvLT5mcE9rRm9ySW8gPSAocmFpZC0+Y2FwYWJpbGl0eS5mcFJlYWRDYXBhYmxlICYm
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChudW1fc3Ry
aXBzID09IDEpIHx8CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIHJhaWQtPmNhcGFiaWxpdHkuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIGZwUmVhZEFjcm9zc1N0cmlwZSkpOworICAgICAgICBlbHNlCisgICAgICAg
ICAgICBpb19pbmZvLT5mcE9rRm9ySW8gPSAocmFpZC0+Y2FwYWJpbGl0eS5mcFdyaXRlQ2FwYWJs
ZSAmJgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgobnVt
X3N0cmlwcyA9PSAxKSB8fAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICByYWlkLT5jYXBhYmlsaXR5LgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICBmcFdyaXRlQWNyb3NzU3RyaXBlKSk7CisgICAgfSAKKyAgICBlbHNl
CisgICAgICAgIGlvX2luZm8tPmZwT2tGb3JJbyA9IEZBTFNFOworCisgICAgaWYgKG51bVJvd3Mg
PT0gMSkgeworICAgICAgICBpZiAobnVtX3N0cmlwcyA9PSAxKSB7ICAKKyAgICAgICAgICAgIC8q
IHNpbmdsZS1zdHJpcCBJT3MgY2FuIGFsd2F5cyBsb2NrIG9ubHkgdGhlIGRhdGEgbmVlZGVkLAor
ICAgICAgICAgICAgICAgbXVsdGktc3RyaXAgSU9zIGFsd2F5cyBu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OVkFMSUQpIAorICAgICAgICAgICAg
aW9faW5mby0+ZnBPa0ZvcklvID0gRkFMU0U7CisgICAgICAgIHJldHVybiByZXR2YWw7CisgICAg
fSAKKyAgICBlbHNlIGlmIChpc1JlYWQpIHsKKyAgICAgICAgZm9yIChzdHJpcElkeD0wOyBzdHJp
cElkeDxudW1fc3RyaXBzOyBzdHJpcElkeCsrKSB7CisgICAgICAgICAgICBpZiAoIU1SX0dldFBo
eVBhcmFtcyhzYywgbGQsIHN0YXJ0X3N0cmlwICsgc3RyaXBJZHgsIAorICAgICAgICAgICAgICAg
ICAgICByZWZfaW5fc3RhcnRfc3RyaXBlLCAmaW9faW5mby0+cGRCbG9jaywgCisgICAgICAgICAg
ICAgICAgICAgICZpb19pbmZvLT5kZXZIYW5kbGUsIHBSQUlEX0NvbnRleHQsIG1hcCkpCisgICAg
ICAgICAgICAgICAgcmV0dXJuIFRSVUU7CisgICAgICAgIH0KKyAgICB9CisgICAgcmV0dXJuIFRS
VUU7Cit9CisKKy8qKgorICogbXJzYXNfdXBkYXRlX2xvYWRfYmFsYW5jZV9wYXJhbXM6ICBVcGRh
dGUgbG9hZCBiYWxhbmNlIHBhcm1hcyAgCisgKiBJbnB1dHM6ICAgICAgICAgICAgICAgICAgICAg
ICAgIG1hcCBwb2ludGVyIAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMb2Fk
IGJhbGFuY2UgaW5mbyAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW9faW5m
byBwb2ludGVyCisgKgorICogVGhpcyBmdW5jdGlvbiB1cGRhdGVzIHRoZSBsb2FkIGJhbGFuY2Ug
cGFyYW1ldGVycyBmb3IgdGhlIExEIGNvbmZpZworICogb2YgYSB0d28gZHJpdmUgb3B0aW1hbCBS
QUlELTEuICAKKyAqLwordm9pZCBtcnNhc191cGRhdGVfbG9hZF9iYWxhbmNlX3BhcmFtcyhNUl9G
V19SQUlEX01BUF9BTEwgKm1hcCwgCisgICAgICAgIFBMRF9MT0FEX0JBTEFOQ0VfSU5GTyBsYklu
Zm8pCit7CisgICAgaW50IGxkQ291bnQ7CisgICAgdV9pbnQxNl90IGxkOworICAgIHVfaW50MzJf
dCBwZCwgYXJSZWY7CisgICAgTVJfTERfUkFJRCAqcmFpZDsKKworICAgIGZvciAobGRDb3VudCA9
IDA7IGxkQ291bnQgPCBNQVhfTE9HSUNBTF9EUklWRVM7IGxkQ291bnQrKykKKyAgICB7CisgICAg
ICAgIGxkID0gTVJfVGFyZ2V0SWRUb0xkR2V0KGxkQ291bnQsIG1hcCk7CisgICAgICAgIGlmIChs
ZCA+PSBNQVhfTE9HSUNBTF9EUklWRVMpIHsKKyAgICAgICAgICAgIGxiSW5mb1tsZENvdW50XS5s
b2FkQmFsYW5jZUZsYWcgPSAwOworICAgICAgICAgICAgY29udGludWU7CisgICAgICAgIH0KKwor
ICAgICAgICByYWlkID0gTVJfTGRSYWlkR2V0KGxkLCBtYXApOworCisgICAgICAgIC8qIFR3byBk
cml2ZSBPcHRpbWFsIFJBSUQgMSAqLworICAgICAgICBpZiAoKHJhaWQtPmxldmVsID09IDEpICYm
IChyYWlkLT5yb3dTaXplID09IDIpICYmIAorICAgICAgICAgICAgICAgIChyYWlkLT5zcGFuRGVw
dGggPT0gMSkKKyAgICAgICAgICAgICAgICAmJiByYWlkLT5sZFN0YXRlID09IE1SX0xEX1NUQVRF
X09QVElNQUwpIHsKKyAgICAgICAgICAgIGxiSW5mb1tsZENvdW50XS5sb2FkQmFsYW5jZUZsYWcg
PSAxOworCisgICAgICAgICAgICAvKiBHZXQgdGhlIGFycmF5IG9uIHdoaWNoIHRoaXMgc3BhbiBp
cyBwcmVzZW50ICovCisgICAgICAgICAgICBhclJlZiA9IE1SX0xkU3BhbkFycmF5R2V0KGxkLCAw
LCBtYXApOyAgICAKKworICAgICAgICAgICAgLyogR2V0IHRoZSBQRCAqLworICAgICAgICAgICAg
cGQgPSBNUl9BclBkR2V0KGFyUmVmLCAwLCBtYXApOyAgICAgIAorICAgICAgICAgICAgLyogR2V0
IGRldiBoYW5kbGUgZnJvbSBQRCAqLworICAgICAgICAgICAgbGJJbmZvW2xkQ291bnRdLnJhaWQx
RGV2SGFuZGxlWzBdID0gTVJfUGREZXZIYW5kbGVHZXQocGQsIG1hcCk7ICAgICAgIAorICAgICAg
ICAgICAgcGQgPSBNUl9BclBkR2V0KGFyUmVmLCAxLCBtYXApOyAgICAgCisgICAgICAgICAgICBs
YkluZm9bbGRDb3VudF0ucmFpZDFEZXZIYW5kbGVbMV0gPSBNUl9QZERldkhhbmRsZUdldChwZCwg
bWFwKTsgICAgICAgIAorICAgICAgICB9IAorICAgICAgICBlbHNlCisgICAgICAgICAgICBsYklu
Zm9bbGRDb3VudF0ubG9hZEJhbGFuY2VGbGFnID0gMDsKKyAgICB9Cit9CisKKworLyoqCisgKiBt
cnNhc19zZXRfcGRfbGJhOiAgICBTZXRzIFBEIExCQQorICogaW5wdXQ6ICAgICAgICAgICAgICAg
aW9fcmVxdWVzdCBwb2ludGVyCisgKiAgICAgICAgICAgICAgICAgICAgICBDREIgbGVuZ3RoCisg
KiAgICAgICAgICAgICAgICAgICAgICBpb19pbmZvIHBvaW50ZXIKKyAqICAgICAgICAgICAgICAg
ICAgICAgIFBvaW50ZXIgdG8gQ0NCCisgKiAgICAgICAgICAgICAgICAgICAgICBMb2NhbCBSQUlE
IG1hcCBwb2ludGVyCisgKiAgICAgICAgICAgICAgICAgICAgICBTdGFydCBibG9jayBvZiBJTwor
ICogICAgICAgICAgICAgICAgICAgICAgQmxvY2sgU2l6ZQorICoKKyAqIFVzZWQgdG8gc2V0IHRo
ZSBQRCBsb2dpY2FsIGJsb2NrIGFkZHJlc3MgaW4gQ0RCIGZvciBGUCBJT3MuCisgKi8KK3ZvaWQg
bXJzYXNfc2V0X3BkX2xiYShNUlNBU19SQUlEX1NDU0lfSU9fUkVRVUVTVCAqaW9fcmVxdWVzdCwg
dV9pbnQ4X3QgY2RiX2xlbiwKKyAgIC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ZXN0LT5FRURQRmxhZ3MgPQorICAgICAgICAgICAg
ICAgICAgICAgTVBJMl9TQ1NJSU9fRUVEUEZMQUdTX0lOQ19QUklfUkVGVEFHIHwKKyAgICAgICAg
ICAgICAgICAgICAgIE1QSTJfU0NTSUlPX0VFRFBGTEFHU19JTlNFUlRfT1A7CisgICAgICAgIH0K
KyAgICAgICAgaW9fcmVxdWVzdC0+Q29udHJvbCB8PSAoMHg0IDw8IDI2KTsKKyAgICAgICAgaW9f
cmVxdWVzdC0+RUVEUEJsb2NrU2l6ZSA9IGxkX2Jsb2NrX3NpemU7CisgICAgfSAKKyAgICBlbHNl
IHsKKyAgICAgICAgLyogU29tZSBkcml2ZXMgZG9uJ3Qgc3VwcG9ydCAxNi8xMiBieXRlIENEQidz
LCBjb252ZXJ0IHRvIDEwICovCisgICAgICAgIGlmICgoKGNkYl9sZW4gPT0gMTIpIHx8IChjZGJf
bGVuID09IDE2KSkgJiYgCisgICAgICAgICAgICAgICAgICAgIChzdGFydF9ibGsgPD0gMHhmZmZm
ZmZmZikpIHsKKyAgICAgICAgICAgIGlmIChjZGJfbGVuID09IDE2KSB7CisgICAgICAgICAgICAg
ICAgb3Bjb2RlID0gY2RiWzBdID09IFJFQURfMTYgPyBSRUFEXzEwIDogV1JJVEVfMTA7CisgICAg
ICAgICAgICAgICAgZmxhZ3ZhbHMgPSBjZGJbMV07CisgICAgICAgICAgICAgICAgZ3JvdXBudW0g
PSBjZGJbMTRdOworICAgICAgICAgICAgICAgIGNvbnRyb2wgPSBjZGJbMTVdOworICAgICAgICAg
ICAgfSAKKyAgICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgIG9wY29kZSA9IGNkYlsw
XSA9PSBSRUFEXzEyID8gUkVBRF8xMCA6IFdSSVRFXzEwOworICAgICAgICAgICAgICAgIGZsYWd2
YWxzID0gY2RiWzFdOworICAgICAgICAgICAgICAgIGdyb3VwbnVtID0gY2RiWzEwXTsKKyAgICAg
ICAgICAgICAgICBjb250cm9sID0gY2RiWzExXTsKKyAgICAgICAgICAgIH0KKworICAgICAgICAg
ICAgbWVtc2V0KGNkYiwgMCwgc2l6ZW9mKGlvX3JlcXVlc3QtPkNEQi5DREIzMikpOworCisgICAg
ICAgICAgICBjZGJbMF0gPSBvcGNvZGU7CisgICAgICAgICAgICBjZGJbMV0gPSBmbGFndmFsczsK
KyAgICAgICAgICAgIGNkYls2XSA9IGdyb3VwbnVtOworICAgICAgICAgICAgY2RiWzldID0gY29u
dHJvbDsKKworICAgICAgICAgICAgLyogVHJhbnNmZXIgbGVuZ3RoICovCisgICAgICAgICAgICBj
ZGJbOF0gPSAodV9pbnQ4X3QpKG51bV9ibG9ja3MgJiAweGZmKTsKKyAgICAgICAgICAgIGNkYls3
XSA9ICh1X2ludDhfdCkoKG51bV9ibG9ja3MgPj4gOCkgJiAweGZmKTsKKworICAgICAgICAgICAg
aW9fcmVxdWVzdC0+SW9GbGFncyA9IDEwOyAvKiBTcGVjaWZ5IDEwLWJ5dGUgY2RiICovCisgICAg
ICAgICAgICBjZGJfbGVuID0gMTA7CisgICAgICAgIH0gZWxzZSBpZiAoKGNkYl9sZW4gPCAxNikg
JiYgKHN0YXJ0X2JsayA+IDB4ZmZmZmZmZmYpKSB7CisgICAgICAgICAgICAvKiBDb252ZXJ0IHRv
IDE2IGJ5dGUgQ0RCIGZvciBsYXJnZSBMQkEncyAqLworICAgICAgICAgICAgc3dpdGNoIChjZGJf
bGVuKSB7CisgICAgICAgICAgICAgICAgY2FzZSA2OgorICAgICAgICAgICAgICAgICAgICBvcGNv
ZGUgPSBjZGJbMF0gPT0gUkVBRF82ID8gUkVBRF8xNiA6IFdSSVRFXzE2OworICAgICAgICAgICAg
ICAgICAgICBjb250cm9sID0gY2RiWzVdOworICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAg
ICAgICAgICAgICAgICBjYXNlIDEwOgorICAgICAgICAgICAgICAgICAgICBvcGNvZGUgPSBjZGJb
MF0gPT0gUkVBRF8xMCA/IFJFQURfMTYgOiBXUklURV8xNjsKKyAgICAgICAgICAgICAgICAgICAg
ZmxhZ3ZhbHMgPSBjZGJbMV07CisgICAgICAgICAgICAgICAgICAgIGdyb3VwbnVtID0gY2RiWzZd
OworICAgICAgICAgICAgICAgICAgICBjb250cm9sID0gY2RiWzldOworICAgICAgICAgICAgICAg
ICAgICBicmVhazsKKyAgICAgICAgICAgICAgICBjYXNlIDEyOgorICAgICAgICAgICAgICAgICAg
ICBvcGNvZGUgPSBjZGJbMF0gPT0gUkVBRF8xMiA/IFJFQURfMTYgOiBXUklURV8xNjsKKyAgICAg
ICAgICAgICAgICAgICAgZmxhZ3ZhbHMgPSBjZGJbMV07CisgICAgICAgICAgICAgICAgICAgIGdy
b3VwbnVtID0gY2RiWzEwXTsKKyAgICAgICAgICAgICAgICAgICAgY29udHJvbCA9IGNkYlsxMV07
CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgfQorCisgICAgICAgICAg
ICBtZW1zZXQoY2RiLCAwLCBzaXplb2YoaW9fcmVxdWVzdC0+Q0RCLkNEQjMyKSk7CisKKyAgICAg
ICAgICAgIGNkYlswXSA9IG9wY29kZTsKKyAgICAgICAgICAgIGNkYlsxXSA9IGZsYWd2YWxzOwor
ICAgICAgICAgICAgY2RiWzE0XSA9IGdyb3VwbnVtOworICAgICAgICAgICAgY2RiWzE1XSA9IGNv
bnRyb2w7CisKKyAgICAgICAgICAgIC8qIFRyYW5zZmVyIGxlbmd0aCAqLworICAgICAgICAgICAg
Y2RiWzEzXSA9ICh1X2ludDhfdCkobnVtX2Jsb2NrcyAmIDB4ZmYpOworICAgICAgICAgICAgY2Ri
WzEyXSA9ICh1X2ludDhfdCkoKG51bV9ibG9ja3MgPj4gOCkgJiAweGZmKTsKKyAgICAgICAgICAg
IGNkYlsxMV0gPSAodV9pbnQ4X3QpKChudW1fYmxvY2tzID4+IDE2KSAmIDB4ZmYpOworICAgICAg
ICAgICAgY2RiWzEwXSA9ICh1X2ludDhfdCkoKG51bV9ibG9ja3MgPj4gMjQpICYgMHhmZik7CisK
KyAgICAgICAgICAgIGlvX3JlcXVlc3QtPklvRmxhZ3MgPSAxNjsgLyogU3BlY2lmeSAxNi1ieXRl
IGNkYiAqLworICAgICAgICAgICAgY2RiX2xlbiA9IDE2OworICAgICAgICB9IGVsc2UgaWYgKChj
ZGJfbGVuID09IDYpICYmIChzdGFydF9ibGsgPiAweDFmZmZmZikpIHsKKyAgICAgICAgICAgIC8q
IGNvbnZlcnQgdG8gMTAgYnl0ZSBDREIgKi8KKwkgICAgb3Bjb2RlID0gY2RiWzBdID09IFJFQURf
NiA/IFJFQURfMTAgOiBXUklURV8xMDsKKwkgICAgY29udHJvbCA9IGNkYls1XTsKKwkJCisJICAg
IG1lbXNldChjZGIsIDAsIHNpemVvZihjZGIpKTsKKwkgICAgY2RiWzBdID0gb3Bjb2RlOworCSAg
ICBjZGJbOV0gPSBjb250cm9sOworCisJICAgIC8qIFNldCB0cmFuc2ZlciBsZW5ndGggKi8KKwkg
ICAgY2RiWzhdID0gKHVfaW50OF90KShudW1fYmxvY2tzICYgMHhmZik7CisJICAgIGNkYls3XSA9
ICh1X2ludDhfdCkoKG51bV9ibG9ja3MgPj4gOCkgJiAweGZmKTsKKworCSAgICAvKiBTcGVjaWZ5
IDEwLWJ5dGUgY2RiICovCisJICAgIGNkYl9sZW4gPSAxMDsKKwl9CisKKyAgICAgICAgLyogRmFs
bCB0aHJvdWdoIG5vcm1hbCBjYXNlLCBqdXN0IGxvYWQgTEJBIGhlcmUgKi8KKyAgICAgICAgc3dp
dGNoIChjZGJfbGVuKQorICAgICAgICB7CisgICAgICAgICAgICBjYXNlIDY6CisgICAgICAgICAg
ICB7CisgICAgICAgICAgICAgICAgdV9pbnQ4X3QgdmFsID0gY2RiWzFdICYgMHhFMDsKKyAgICAg
ICAgICAgICAgICBjZGJbM10gPSAodV9pbnQ4X3QpKHN0YXJ0X2JsayAmIDB4ZmYpOworICAgICAg
ICAgICAgICAgIGNkYlsyXSA9ICh1X2ludDhfdCkoKHN0YXJ0X2JsayA+PiA4KSAmIDB4ZmYpOwor
ICAgICAgICAgICAgICAgIGNkYlsxXSA9IHZhbCB8ICgodV9pbnQ4X3QpKHN0YXJ0X2JsayA+PiAx
NikgJiAweDFmKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIH0KKyAgICAg
ICAgICAgIGNhc2UgMTA6CisgICAgICAgICAgICAgICAgY2RiWzVdID0gKHVfaW50OF90KShzdGFy
dF9ibGsgJiAweGZmKTsKKyAgICAgICAgICAgICAgICBjZGJbNF0gPSAodV9pbnQ4X3QpKChzdGFy
dF9ibGsgPj4gOCkgJiAweGZmKTsKKyAgICAgICAgICAgICAgICBjZGJbM10gPSAodV9pbnQ4X3Qp
KChzdGFydF9ibGsgPj4gMTYpICYgMHhmZik7CisgICAgICAgICAgICAgICAgY2RiWzJdID0gKHVf
aW50OF90KSgoc3RhcnRfYmxrID4+IDI0KSAmIDB4ZmYpOworICAgICAgICAgICAgICAgIGJyZWFr
OworICAgICAgICAgICAgY2FzZSAxMjoKKyAgICAgICAgICAgICAgICBjZGJbNV0gPSAodV9pbnQ4
X3QpKHN0YXJ0X2JsayAmIDB4ZmYpOworICAgICAgICAgICAgICAgIGNkYls0XSA9ICh1X2ludDhf
dCkoKHN0YXJ0X2JsayA+PiA4KSAmIDB4ZmYpOworICAgICAgICAgICAgICAgIGNkYlszXSA9ICh1
X2ludDhfdCkoKHN0YXJ0X2JsayA+PiAxNikgJiAweGZmKTsKKyAgICAgICAgICAgICAgICBjZGJb
Ml0gPSAodV9pbnQ4X3QpKChzdGFydF9ibGsgPj4gMjQpICYgMHhmZik7CisgICAgICAgICAgICAg
ICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDE2OgorICAgICAgICAgICAgICAgIGNkYls5XSA9
ICh1X2ludDhfdCkoc3RhcnRfYmxrICYgMHhmZik7CisgICAgICAgICAgICAgICAgY2RiWzhdID0g
KHVfaW50OF90KSgoc3RhcnRfYmxrID4+IDgpICYgMHhmZik7CisgICAgICAgICAgICAgICAgY2Ri
WzddID0gKHVfaW50OF90KSgoc3RhcnRfYmxrID4+IDE2KSAmIDB4ZmYpOworICAgICAgICAgICAg
ICAgIGNkYls2XSA9ICh1X2ludDhfdCkoKHN0YXJ0X2JsayA+PiAyNCkgJiAweGZmKTsKKyAgICAg
ICAgICAgICAgICBjZGJbNV0gPSAodV9pbnQ4X3QpKChzdGFydF9ibGsgPj4gMzIpICYgMHhmZik7
CisgICAgICAgICAgICAgICAgY2RiWzRdID0gKHVfaW50OF90KSgoc3RhcnRfYmxrID4+IDQwKSAm
IDB4ZmYpOworICAgICAgICAgICAgICAgIGNkYlszXSA9ICh1X2ludDhfdCkoKHN0YXJ0X2JsayA+
PiA0OCkgJiAweGZmKTsKKyAgICAgICAgICAgICAgICBjZGJbMl0gPSAodV9pbnQ4X3QpKChzdGFy
dF9ibGsgPj4gNTYpICYgMHhmZik7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0K
KyAgICB9Cit9CisKKy8qKgorICogbXJzYXNfZ2V0X2Jlc3RfYXJtICAgICAgICAgRGV0ZXJtaW5l
IHRoZSBiZXN0IHNwaW5kbGUgYXJtICAKKyAqIElucHV0czogICAgICAgICAgICAgICAgICAgIExv
YWQgYmFsYW5jZSBpbmZvIAorICoKKyAqIFRoaXMgZnVuY3Rpb24gZGV0ZXJtaW5lcyBhbmQgcmV0
dXJucyB0aGUgYmVzdCBhcm0gYnkgbG9va2luZyBhdCB0aGUKKyAqIHBhcmFtZXRlcnMgb2YgdGhl
IGxhc3QgUEQgYWNjZXNzLgorICovCit1X2ludDhfdCBtcnNhc19nZXRfYmVzdF9hcm0oUExEX0xP
QURfQkFMQU5DRV9JTkZPIGxiSW5mbywgdV9pbnQ4X3QgYXJtLCAKKyAgICAgICAgdV9pbnQ2NF90
IGJsb2NrLCB1X2ludDMyX3QgY291bnQpCit7CisgICAgdV9pbnQxNl90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KSB7CisgICAgICAgICAgICBwZCA9IE1SX0FyUGRHZXQoYXJSZWYsIHBoeXNBcm0gKyAxLCBt
YXApOyAvLyBHZXQgQWx0ZXJuYXRlIFBkLgorICAgICAgICAgICAgaWYgKHBkICE9IE1SX1BEX0lO
VkFMSUQpCisgICAgICAgICAgICAgICAgKnBEZXZIYW5kbGUgPSBNUl9QZERldkhhbmRsZUdldChw
ZCwgbWFwKTsvL0dldCBkZXYgaGFuZGxlIGZyb20gUGQuCisgICAgICAgIH0KKyAgICB9CisKKyAg
ICAqcGRCbG9jayArPSBzdHJpcFJlZiArIE1SX0xkU3BhblB0ckdldChsZCwgc3BhbiwgbWFwKS0+
c3RhcnRCbGs7CisgICAgcFJBSURfQ29udGV4dC0+c3BhbkFybSA9IChzcGFuIDw8IFJBSURfQ1RY
X1NQQU5BUk1fU1BBTl9TSElGVCkgfCBwaHlzQXJtOworICAgIHJldHVybiByZXR2YWw7Cit9CisK
Ky8qKgorICogTVJfR2V0U3BhbkJsb2NrICAgICBDYWxjdWxhdGVzIHNwYW4gYmxvY2sKKyAqIElu
cHV0czogICAgICAgICAgICAgTEQgCisgKiAgICAgICAgICAgICAgICAgICAgIHJvdworICogICAg
ICAgICAgICAgICAgICAgICBQRCBzcGFuIGJsb2NrCisgKiAgICAgICAgICAgICAgICAgICAgIFJB
SUQgbWFwIHBvaW50ZXIKKyAqIE91dHB1dHM6ICAgICAgICAgICAgU3BhbiBudW1iZXIKKyAqICAg
ICAgICAgICAgICAgICAgICAgRXJyb3IgY29kZSAKKyAqCisgKiBUaGlzIHJvdXRpbmUgY2FsY3Vs
YXRlcyB0aGUgc3BhbiBmcm9tIHRoZSBzcGFuIGJsb2NrIGluZm8uICAKKyAqLwordV9pbnQzMl90
IE1SX0dldFNwYW5CbG9jayh1X2ludDMyX3QgbGQsIHVfaW50NjRfdCByb3csIHVfaW50NjRfdCAq
c3Bhbl9ibGssIAorICAgICAgICBNUl9GV19SQUlEX01BUF9BTEwgKm1hcCwgaW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NyZWF0ZSggc2MtPm1y
c2FzX3BhcmVudF90YWcsICAgLy8gcGFyZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIDEsIDAsICAgICAgICAgICAgICAgICAgIC8vIGFsZ25tbnQsIGJvdW5kYXJ5CisgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19TUEFDRV9NQVhBRERSXzMyQklULC8vIGxvd2Fk
ZHIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX1NQQUNFX01BWEFERFIsICAg
ICAgLy8gaGlnaGFkZHIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwgTlVM
TCwgICAgICAgICAgICAgLy8gZmlsdGVyLCBmaWx0ZXJhcmcKKyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgaW9jdGxfZGF0YV9zaXplLCAgICAgICAgLy8gbWF4c2l6ZQorICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAxLCAgICAgICAgICAgICAgICAgICAgICAvLyBtc2VnbWVu
dHMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW9jdGxfZGF0YV9zaXplLCAgICAg
ICAgLy8gbWF4c2Vnc2l6ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfRE1B
X0FMTE9DTk9XLCAgICAgICAvLyBmbGFncworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBOVUxMLCBOVUxMLCAgICAgICAgICAgICAvLyBsb2NrZnVuYywgbG9ja2FyZworICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAmaW9jdGxfZGF0YV90YWdbaV0pKSB7CisgICAgICAgICAg
ICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNhc19kZXYsICJDYW5ub3QgYWxsb2NhdGUgaW9jdGwgZGF0
YSB0YWdcbiIpOworICAgICAgICAgICAgcmV0dXJuIChFTk9NRU0pOworICAgICAgICB9CisgICAg
ICAgIGlmIChid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odXNlcl9pb2MtPnNnbFtpXS5p
b3ZfYmFzZSwgaW9jdGxfZGF0YV9tZW1baV0sIAorICAgICAgICAgICAgICAgICAgICAgICAgdXNl
cl9pb2MtPnNnbFtpXS5pb3ZfbGVuKTsKKyAgICAgICAgaWYgKHJldCkgeworICAgICAgICAgICAg
ZGV2aWNlX3ByaW50ZihzYy0+bXJzYXNfZGV2LCAiSU9DVEwgY29weWluIGZhaWxlZCFcbiIpOwor
ICAgICAgICAgICAgZ290byBvdXQ7CisgICAgICAgIH0KKyAgICB9CisKKyAgICBpb2N0bF9zZW5z
ZV9zaXplID0gdXNlcl9pb2MtPnNlbnNlX2xlbjsKKyAgICBpZiAodXNlcl9pb2MtPnNlbnNlX2xl
bikgeworICAgICAgICBpZiAoYnVzX2RtYV90YWdfY3JlYXRlKCBzYy0+bXJzYXNfcGFyZW50X3Rh
ZywgICAvLyBwYXJlbnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgMCwgICAg
ICAgICAgICAgICAgICAgLy8gYWxnbm1udCwgYm91bmRhcnkKKyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgQlVTX1NQQUNFX01BWEFERFJfMzJCSVQsLy8gbG93YWRkcgorICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0VfTUFYQUREUiwgICAgICAvLyBoaWdoYWRk
cgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBOVUxMLCAgICAgICAgICAg
ICAvLyBmaWx0ZXIsIGZpbHRlcmFyZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBp
b2N0bF9zZW5zZV9zaXplLCAgICAgICAvLyBtYXhzaXplCisgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIDEsICAgICAgICAgICAgICAgICAgICAgIC8vIG1zZWdtZW50cworICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBpb2N0bF9zZW5zZV9zaXplLCAgICAgICAvLyBtYXhzZWdz
aXplCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19ETUFfQUxMT0NOT1csICAg
ICAgIC8vIGZsYWdzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsIE5VTEws
ICAgICAgICAgICAgIC8vIGxvY2tmdW5jLCBsb2NrYXJnCisgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICZpb2N0bF9zZW5zZV90YWcpKSB7CisgICAgICAgICAgICBkZXZpY2VfcHJpbnRm
KHNjLT5tcnNhc19kZXYsICJDYW5ub3QgYWxsb2NhdGUgaW9jdGwgc2Vuc2UgdGFnXG4iKTsKKyAg
ICAgICAgICAgIHJldHVybiAoRU5PTUVNKTsKKyAgICAgICAgfQorICAgICAgICBpZiAoYnVzX2Rt
YW1lbV9hbGxvYyhpb2N0bF9zZW5zZV90YWcsICh2b2lkICoqKSZpb2N0bF9zZW5zZV9tZW0sCisg
ICAgICAgICAgICAgICAgKEJVU19ETUFfTk9XQUlUIHwgQlVTX0RNQV9aRVJPKSwgJmlvY3RsX3Nl
bnNlX2RtYW1hcCkpIHsKKyAgICAgICAgICAgIGRldmljZV9wcmludGYoc2MtPm1yc2FzX2Rldiwg
IkNhbm5vdCBhbGxvY2F0ZSBpb2N0bCBkYXRhIG1lbVxuIik7CisgICAgICAgICAgICByZXR1cm4g
KEVOT01FTSk7CisgICAgICAgIH0KKyAgICAgICAgaWYgKGJ1c19kbWFtYXBfbG9hZChpb2N0bF9z
ZW5zZV90YWcsIGlvY3RsX3NlbnNlX2RtYW1hcCwKKyAgICAgICAgICAgICAgICBpb2N0bF9zZW5z
ZV9tZW0sIGlvY3RsX3NlbnNlX3NpemUsIG1yc2FzX2FsbG9jX2NiLAorICAgICAgICAgICAgICAg
ICZpb2N0bF9zZW5zZV9waHlzX2FkZHIsIEJVU19ETUFfTk9XQUlUKSkgeworICAgICAgICAgICAg
ZGV2aWNlX3ByaW50ZihzYy0+bXJzYXNfZGV2LCAiQ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X05PV0FJ
VCk7CisgICAgaWYgKCFzYy0+bWZpX2NtZF9saXN0KSB7CisgICAgICAgIGRldmljZV9wcmludGYo
c2MtPm1yc2FzX2RldiwgIkNhbm5vdCBhbGxvYyBtZW1vcnkgZm9yIG1maV9jbWQgY21kX2xpc3Qu
XG4iKTsKKyAgICAgICAgcmV0dXJuKEVOT01FTSk7CisgICAgfQorICAgIG1lbXNldChzYy0+bWZp
X2NtZF9saXN0LCAwLCBzaXplb2Yoc3RydWN0IG1yc2FzX21maV9jbWQgKikqbWF4X2NtZCk7Cisg
ICAgZm9yIChpID0gMDsgaSA8IG1heF9jbWQ7IGkrKykgeworICAgICAgICBzYy0+bWZpX2NtZF9s
aXN0W2ldID0gbWFsbG9jKHNpemVvZihzdHJ1Y3QgbXJzYXNfbWZpX2NtZCksIAorICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgTV9NUlNBUywgTV9OT1dBSVQpOworICAgICAgICBpZiAo
IXNjLT5tZmlfY21kX2xpc3RbaV0pIHsKKyAgICAgICAgICAgIGZvciAoaiA9IDA7IGogPCBpOyBq
KyspCisgICAgICAgICAgICAgICAgZnJlZShzYy0+bWZpX2NtZF9saXN0W2pdLE1fTVJTQVMpOwor
ICAgICAgICAgICAgZnJlZShzYy0+bWZpX2NtZF9saXN0LCBNX01SU0FTKTsKKyAgICAgICAgICAg
IHNjLT5tZmlfY21kX2xpc3QgPSBOVUxMOworICAgICAgICAgICAgcmV0dXJuKEVOT01FTSk7Cisg
ICAgICAgIH0KKyAgICB9CisKKyAgICBmb3IgKGkgPSAwOyBpIDwgbWF4X2NtZDsgaSsrKSB7Cisg
ICAgICAgIGNtZCA9IHNjLT5tZmlfY21kX2xpc3RbaV07CisgICAgICAgIG1lbXNldChjbWQsIDAs
IHNpemVvZihzdHJ1Y3QgbXJzYXNfbWZpX2NtZCkpOworICAgICAgICBjbWQtPmluZGV4ID0gaTsK
KyAgICAgICAgY21kLT5jY2JfcHRyID0gTlVMTDsKKyAgIC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IHRoZSBTRyBsaXN0IHRoYXQgaW1tZWRpYXRlbHkgZm9sbG93cyB0aGUgZnJhbWUuIFRoaXMK
KyAqIGZ1bmN0aW9uIGNyZWF0ZXMgdGhvc2UgRE1BIG1lbW9yeSBidWZmZXJzIGZvciBlYWNoIGNv
bW1hbmQgcGFja2V0IGJ5IHVzaW5nCisgKiBQQ0kgcG9vbCBmYWNpbGl0eS4gcGFkXzAgaXMgaW5p
dGlhbGl6ZWQgdG8gMCB0byBwcmV2ZW50IGNvcnJ1cHRpbmcgdmFsdWUgCisgKiBvZiBjb250ZXh0
IGFuZCBjb3VsZCBjYXVzZSBGVyBjcmFzaC4KKyAqLworc3RhdGljIGludCBtcnNhc19jcmVhdGVf
ZnJhbWVfcG9vbChzdHJ1Y3QgbXJzYXNfc29mdGMgKnNjKQoreworICAgIGludCBpOworICAgIHN0
cnVjdCBtcnNhc19tZmlfY21kICpjbWQ7CisKKyAgICBpZiAoYnVzX2RtYV90YWdfY3JlYXRlKCBz
Yy0+bXJzYXNfcGFyZW50X3RhZywgICAvLyBwYXJlbnQKKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAxLCAwLCAgICAgICAgICAgICAgICAgICAvLyBhbGdubW50LCBib3VuZGFyeQorICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIEJVU19TUEFDRV9NQVhBRERSXzMyQklULC8vIGxvd2FkZHIK
KyAgICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0VfTUFYQUREUiwgICAgICAvLyBo
aWdoYWRkcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsIE5VTEwsICAgICAgICAg
ICAgIC8vIGZpbHRlciwgZmlsdGVyYXJnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTVJT
QVNfTUZJX0ZSQU1FX1NJWkUsICAgLy8gbWF4c2l6ZQorICAgICAgICAgICAgICAgICAgICAgICAg
ICAgIDEsICAgICAgICAgICAgICAgICAgICAgIC8vIG1zZWdtZW50cworICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIE1SU0FTX01GSV9GUkFNRV9TSVpFLCAgIC8vIG1heHNlZ3NpemUKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBCVVNfRE1BX0FMTE9DTk9XLCAgICAgICAvLyBmbGFncwor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsIE5VTEwsICAgICAgICAgICAgIC8vIGxv
Y2tmdW5jLCBsb2NrYXJnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgJnNjLT5tZmljbWRf
ZnJhbWVfdGFnKSkgeworICAgICAgICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNhc19kZXYsICJDYW5u
b3QgY3JlYXRlIE1GSSBmcmFtZSB0YWdcbiIpOworICAgICAgICByZXR1cm4gKEVOT01FTSk7Cisg
ICAgfQorCisgICAgZm9yIChpID0gMDsgaSA8IE1SU0FTX01BWF9NRklfQ01EUzsgaSsrKSB7Cisg
ICAgICAgIGNtZCA9IHNjLT5tZmlfY21kX2xpc3RbaV07CisgICAgICAgIGNtZC0+ZnJhbWUgPSBt
cnNhc19hbGxvY19mcmFtZShzYywgY21kKTsKKyAgICAgICAgaWYgKGNtZC0+ZnJhbWUgPT0gTlVM
TCkgeworICAgICAgICAgICAgZGV2aWNlX3ByaW50ZihzYy0+bXJzYXNfZGV2LCAiQ2Fubm90IGFs
bG9jIE1GSSBmcmFtZSBtZW1vcnlcbiIpOworICAgICAgICAgICAgcmV0dXJuIChFTk9NRU0pOwor
ICAgICAgICB9IAorICAgICAgICBtZW1zZXQoY21kLT5mcmFtZSwgMCwgTVJTQVNfTUZJX0ZSQU1F
X1NJWkUpOyAKKyAgICAgICAgY21kLT5mcmFtZS0+aW8uY29udGV4dCA9IGNtZC0+aW5kZXg7Cisg
ICAgICAgIGNtZC0+ZnJhbWUtPmlvLnBhZF8wID0gMDsKKyAgICB9CisKKyAgICByZXR1cm4oMCk7
Cit9CisKKy8qKgorICogbXJzYXNfYWxsb2N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b3JjZSA9IGl2YXI7ICAKKworICAgICAg
ICAgICAgZGV2aWNlX3NldF9kZXNjKGRldiwgaWQtPmRlc2MpOworICAgICAgICAgICAgaWYgKGZv
cmNlKQorICAgICAgICAgICAgCXJldHVybiAoQlVTX1BST0JFX0RFRkFVTFQpOworICAgICAgICAg
ICAgICAgIC8vcmV0dXJuIChCVVNfUFJPQkVfU1BFQ0lGSUMpOyAgLy9naXZlIHByaW9yaXR5IHRv
IE1GSSBkcml2ZXIKKyAgICAgICAgICAgIGVsc2UgCisgICAgICAgICAgICAgICAgcmV0dXJuIChC
VVNfUFJPQkVfTE9XX1BSSU9SSVRZKTsKKyAgICAgICAgfQorICAgICAgICBlbHNlIAorICAgICAg
ICAgICAgZGV2aWNlX3NldF9kZXNjKGRldiwgaWQtPmRlc2MpOworICAgICAgICAgICAgcmV0dXJu
IChCVVNfUFJPQkVfREVGQVVMVCk7CisgICAgfQorICAgIHJldHVybiAoRU5YSU8pOworCit9Cisv
KioKKyAqIG1yc2FzX3NldHVwX3N5c2N0bDogIHNldHVwIHN5c2N0bCB2YWx1ZXMgZm9yIG1yc2Fz
CisgKiBpbnB1dDogICAgICAgICAgICAgICBBZGFwdGVyIGluc3RhbmNlIHNvZnQgc3RhdGUKKyAq
CisgKiBTZXR1cCBzeXNjdGwgZW50cmllcyBmb3IgbXJzYXMgZHJpdmVyLgorICovCitzdGF0aWMg
dm9pZAorbXJzYXNfc2V0dXBfc3lzY3RsKHN0cnVjdCBtcnNhc19zb2Z0YyAqc2MpCit7CisgICAg
c3RydWN0IHN5c2N0bF9jdHhfbGlzdCAgKnN5c2N0bF9jdHggPSBOVUxMOworICAgIHN0cnVjdCBz
eXNjdGxfb2lkICAgICAgICpzeXNjdGxfdHJlZSA9IE5VTEw7CisgICAgY2hhciB0bXBzdHJbODBd
LCB0bXBzdHIyWzgwXTsKKworICAgIC8qCisgICAgICogU2V0dXAgdGhlIHN5c2N0bCB2YXJpYWJs
ZSBzbyB0aGUgdXNlciBjY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ICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxfaW5mb19zaXplLCAgICAg
ICAgICAvLyBtYXhzaXplCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgICAgICAgICAg
ICAgICAgICAgICAgLy8gbXNlZ21lbnRzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxf
aW5mb19zaXplLCAgICAgICAgICAvLyBtYXhzZWdzaXplCisgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgQlVTX0RNQV9BTExPQ05PVywgICAgICAgLy8gZmxhZ3MKKyAgICAgICAgICAgICAgICAg
ICAgICAgICAgICBOVUxMLCBOVUxMLCAgICAgICAgICAgICAvLyBsb2NrZnVuYywgbG9ja2FyZwor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICZzYy0+ZWxfaW5mb190YWcpKSB7CisgICAgICAg
IGRldmljZV9wcmludGYoc2MtPm1yc2FzX2RldiwgIkNhbm5vdCBhbGxvY2F0ZSBldmVudCBsb2cg
aW5mbyB0YWdcbiIpOworICAgICAgICByZXR1cm4gKEVOT01FTSk7CisgICAgfQorICAgIGlmIChi
dXNfZG1hbWVtX2FsbG9jKHNjLT5lbF9pbmZvX3RhZywgKHZvaWQgKiopJnNjLT5lbF9pbmZvX21l
bSwKKyAgICAgICAgICAgIEJVU19ETUFfTk9XQUlULCAmc2MtPmVsX2luZm9fZG1hbWFwKSkgewor
ICAgICAgICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNhc19kZXYsICJDYW5ub3QgYWxsb2NhdGUgZXZl
bnQgbG9nIGluZm8gY21kIG1lbVxuIik7CisgICAgICAgIHJldHVybiAoRU5PTUVNKTsKKyAgICB9
CisgICAgaWYgKGJ1c19kbWFtYXBfbG9hZChzYy0+ZWxfaW5mb190YWcsIHNjLT5lbF9pbmZvX2Rt
YW1hcCwKKyAgICAgICAgICAgIHNjLT5lbF9pbmZvX21lbSwgZWxfaW5mb19zaXplLCBtcnNhc19h
ZGRyX2NiLAorICAgICAgICAgIC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byb2dyZXNzID0gMTsKKyAgICBpZihzYy0+b2NyX3RocmVhZF9hY3RpdmUpCisgICAgICAgIHdh
a2V1cCgmc2MtPm9jcl9jaGFuKTsKKyAgICB3aGlsZShzYy0+cmVzZXRfaW5fcHJvZ3Jlc3Mpewor
ICAgICAgICBpKys7CisgICAgICAgIGlmICghKGkgJSBNUlNBU19SRVNFVF9OT1RJQ0VfSU5URVJW
QUwpKSB7CisgICAgICAgICAgICBtcnNhc19kcHJpbnQoc2MsIE1SU0FTX0lORk8sCisgICAgICAg
ICAgICAgICAgIlslMmRdd2FpdGluZyBmb3Igb2NyIHRvIGJlIGZpbmlzaGVkXG4iLGkpOworICAg
ICAgICB9CisgICAgICAgIHBhdXNlKCJtcl9zaHV0ZG93biIsIGh6KTsKKyAgICB9CisgICAgaSA9
IDA7CisgICAgd2hpbGUoc2MtPm9jcl90aHJlYWRfYWN0aXZlKXsKKyAgICAgICAgaSsrOworICAg
ICAgICBpZiAoIShpICUgTVJTQVNfUkVTRVRfTk9USUNFX0lOVEVSVkFMKSkgeworICAgICAgICAg
ICAgbXJzYXNfZHByaW50KHNjLCBNUlNBU19JTkZPLAorICAgICAgICAgICAgICAgICJbJTJkXXdh
aXRpbmcgZm9yICIKKyAgICAgICAgICAgICAgICAibXJzYXNfb2NyIHRocmVhZCB0byBxdWl0IG9j
ciAlZFxuIixpLAorICAgICAgICAgICAgICAgICBzYy0+b2NyX3RocmVhZF9hY3RpdmUpOworICAg
ICAgICB9CisgICAgICAgIHBhdXNlKCJtcl9zaHV0ZG93biIsIGh6KTsKKyAgICB9CisKKyAgICBt
cnNhc19mbHVzaF9jYWNoZShzYyk7CisgICAgbXJzYXNfc2h1dGRvd25fY3RscihzYywgTVJfRENN
RF9DVFJMX1NIVVRET1dOKTsKKyAgICBtcnNhc19kaXNhYmxlX2ludHIoc2MpOworICAgIG1yc2Fz
X2NhbV9kZXRhY2goc2MpOworICAgIG1yc2FzX3RlYXJkb3duX2ludHIoc2MpOworICAgIG1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19zcGluKCZzYy0+aW9jdGxf
bG9jayk7CisgICAgaWYgKCFzYy0+cmVzZXRfaW5fcHJvZ3Jlc3MpIHsKKyAgICAgICAgbXR4X3Vu
bG9ja19zcGluKCZzYy0+aW9jdGxfbG9jayk7CisgICAgICAgIGdvdG8gZG9faW9jdGw7CisgICAg
fQorCisgICAgLyogUmVsZWFzZSBpb2NsdF9sb2NrLCBhbmQgd2FpdCBmb3IgT0NSCisgICAgICog
dG8gYmUgZmluaXNoZWQgKi8KKyAgICBtdHhfdW5sb2NrX3NwaW4oJnNjLT5pb2N0bF9sb2NrKTsK
KyAgICB3aGlsZShzYy0+cmVzZXRfaW5fcHJvZ3Jlc3MpeworICAgICAgICBpKys7CisgICAgICAg
IGlmICghKGkgJSBNUlNBU19SRVNFVF9OT1RJQ0VfSU5URVJWQUwpKSB7CisgICAgICAgICAgICBt
cnNhc19kcHJpbnQoc2MsIE1SU0FTX0lORk8sCisgICAgICAgICAgICAgICAgIlslMmRdd2FpdGlu
ZyBmb3IgIgorICAgICAgICAgICAgICAgICJPQ1IgdG8gYmUgZmluaXNoZWQgJWRcbiIsaSwKKyAg
ICAgICAgICAgICAgICAgc2MtPm9jcl90aHJlYWRfYWN0aXZlKTsKKyAgICAgICAgfQorICAgICAg
ICBwYXVzZSgibXJfaW9jdGwiLCBoeik7CisgICAgfQorCitkb19pb2N0bDoKKyAgICBzd2l0Y2gg
KGNtZCkgeworICAgICAgICBjYXNlIE1SU0FTX0lPQ19GSVJNV0FSRV9QQVNTX1RIUk9VR0g6Cisg
ICAgICAgICAgICByZXQgPSBtcnNhc19wYXNzdGhydShzYywgKHZvaWQgKilhcmcpOworICAgICAg
ICAgICAgYnJlYWs7CisgICAgICAgIGNhc2UgTVJTQVNfSU9DX1NDQU5fQlVTOgorICAgICAgICAg
ICAgcmV0ID0gbXJzYXNfYnVzX3NjYW4oc2MpOworICAgICAgICAgICAgYnJlYWs7CisgICAgfQor
IAorICAgIHJldHVybiAocmV0KTsKK30KKworL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gICAgICAgICAgICAgICAgICBhdG9taWNfZGVjKCZsYmluZm8tPnNjc2lf
cGVuZGluZ19jbWRzW2FybV0pOworICAgICAgICAgICAgICAgICAgICBjbWRfbXB0LT5sb2FkX2Jh
bGFuY2UgJj0gfk1SU0FTX0xPQURfQkFMQU5DRV9GTEFHOworICAgICAgICAgICAgICAgIH0KKyAg
ICAgICAgICAgICAgICAvL0ZhbGwgdGhydSBhbmQgY29tcGxldGUgSU8KKyAgICAgICAgICAgIGNh
c2UgTVJTQVNfTVBJMl9GVU5DVElPTl9MRF9JT19SRVFVRVNUOgorICAgICAgICAgICAgICAgIG1y
c2FzX21hcF9tcHRfY21kX3N0YXR1cyhjbWRfbXB0LCBzdGF0dXMsIGV4dFN0YXR1cyk7CisgICAg
ICAgICAgICAgICAgbXJzYXNfY21kX2RvbmUoc2MsIGNtZF9tcHQpOworICAgICAgICAgICAgICAg
IHNjc2lfaW9fcmVxLT5SYWlkQ29udGV4dC5zdGF0dXMgPSAwOworICAgICAgICAgICAgICAgIHNj
c2lfaW9fcmVxLT5SYWlkQ29udGV4dC5leFN0YXR1cyA9IDA7CisgICAgICAgICAgICAgICAgYXRv
bWljX2RlYygmc2MtPmZ3X291dHN0YW5kaW5nKTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAg
ICAgICAgICAgIGNhc2UgTVJTQVNfTVBJMl9GVU5DVElPTl9QQVNTVEhSVV9JT19SRVFVRVNUOiAv
Kk1GSSBjb21tYW5kICovCisgICAgICAgICAgICAgICAgY21kX21maSA9IHNjLT5tZmlfY21kX2xp
c3RbY21kX21wdC0+c3luY19jbWRfaWR4XTsKKyAgICAgICAgICAgICAgICBtcnNhc19jb21wbGV0
ZV9tcHRtZmlfcGFzc3RocnUoc2MsIGNtZF9tZmksIHN0YXR1cyk7CisgICAgICAgICAgICAgICAg
Y21kX21wdC0+ZmxhZ3MgPSAwOworICAgICAgICAgICAgICAgIG1yc2FzX3JlbGVhc2VfbXB0X2Nt
ZChjbWRfbXB0KTsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgfQorCisgICAgICAg
IHNjLT5sYXN0X3JlcGx5X2lkeCsrOworICAgICAgICBpZiAoc2MtPmxhc3RfcmVwbHlfaWR4ID49
IHNjLT5yZXBseV9xX2RlcHRoKSAKKyAgICAgICAgICAgIHNjLT5sYXN0X3JlcGx5X2lkeCA9IDA7
CisKKyAgICAgICAgZGVzYy0+V29yZHMgPSB+KCh1aW50NjRfdCkweDAwKTsgLyogc2V0IGl0IGJh
Y2sgdG8gYWxsIDB4RkZGRkZGRkZzICovCisgICAgICAgIG51bV9jb21wbGV0ZWQrKzsKKworICAg
ICAgICAvKiBHZXQgdGhlIG5leHQgcmVwbHkgZGVzY3JpcHRvciAqLworICAgICAgICBpZiAoIXNj
LT5sYXN0X3JlcGx5X2lkeCkKKyAgICAgICAgICAgIGRlc2MgPSBzYy0+cmVwbHlfZGVzY19tZW07
CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGRlc2MrKzsKKworICAgICAgICByZXBseV9kZXNj
ID0gKE1QSTJfU0NTSV9JT19TVUNDRVNTX1JFUExZX0RFU0NSSVBUT1IgKilkZXNjOworICAgICAg
ICBkZXNjX3ZhbC53b3JkID0gZGVzYy0+V29yZHM7CisKKyAgICAgICAgcmVwbHlfZGVzY3JpcHRf
dHlwZSA9IHJlcGx5X2Rlc2MtPlJlcGx5RmxhZ3MgJiBNUEkyX1JQWV9ERVNDUklQVF9GTEFHU19U
WVBFX01BU0s7CisKKyAgICAgICAgaWYocmVwbHlfZGVzY3JpcHRfdHlwZSA9PSBNUEkyX1JQWV9E
RVNDUklQVF9GTEFHU19VTlVTRUQpCisgICAgICAgICAgICBicmVhazsKKyAgICB9CisKKyAgICAv
KiBObyBtYXRjaCwganVzdCByZXR1cm4gKi8KKyAgICBpZiAobnVtX2NvbXBsZXRlZCA9PSAwKQor
ICAgICAgICByZXR1cm4gKERPTkUpOworCisgICAgLyogQ2xlYXIgcmVzcG9uc2Uga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KKyAgICAgICAgICAg
ICAgICAgICAgICAgICAgIDAsICAgICAgICAgICAgICAgICAgICAgIC8qIGJvdW5kYXJ5ICovCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0VfTUFYQUREUiwgICAgIC8qIGxvd2Fk
ZHIgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19TUEFDRV9NQVhBRERSLCAgICAg
IC8qIGhpZ2hhZGRyICovCisgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBOVUxMLCAg
ICAgICAgICAgICAvKiBmaWx0ZXIsIGZpbHRlcmFyZyAqLworICAgICAgICAgICAgICAgICAgICAg
ICAgICAgTVJTQVNfTUFYX0lPX1NJWkUsLyogbWF4c2l6ZSAqLworICAgICAgICAgICAgICAgICAg
ICAgICAgICAgTVJTQVNfTUFYX1NHTCwgLyogbnNlZ21lbnRzICovCisgICAgICAgICAgICAgICAg
ICAgICAgICAgICBNUlNBU19NQVhfSU9fU0laRSwvKiBtYXhzZWdzaXplICovCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAwLCAgICAgICAgICAgICAgICAgICAgICAvKiBmbGFncyAqLworICAg
ICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwgTlVMTCwgICAgICAgICAgICAgLyogbG9ja2Z1
bmMsIGxvY2thcmcgKi8KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICZzYy0+bXJzYXNfcGFy
ZW50X3RhZyAgIC8qIHRhZyAqLworICAgICAgICAgICAgICAgICAgICAgICAgICAgKSkgeworICAg
ICAgICAgICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNhc19kZXYsICJDYW5ub3QgYWxsb2NhdGUgcGFy
ZW50IERNQSB0YWdcbiIpOworICAgICAgICAgICByZXR1cm4oRU5PTUVNKTsKKyAgICB9CisKKyAg
ICAvKgorICAgICAqIEFsbG9jYXRlIGZvciB2ZXJzaW9uIGJ1ZmZlcgorICAgICAqLyAKKyAgICB2
ZXJidWZfc2l6ZSA9IE1SU0FTX01BWF9OQU1FX0xFTkdUSCooc2l6ZW9mKGJ1c19hZGRyX3QpKTsK
KyAgICBpZiAoYnVzX2RtYV90YWdfY3JlYXRlKHNjLT5tcnNhc19wYXJlbnRfdGFnLCAgIC8vIHBh
cmVudAorICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgMCwgICAgICAgICAgICAgICAgICAg
Ly8gYWxnbm1udCwgYm91bmRhcnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19TUEFD
RV9NQVhBRERSXzMyQklULC8vIGxvd2FkZHIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIEJV
U19TUEFDRV9NQVhBRERSLCAgICAgIC8vIGhpZ2hhZGRyCisgICAgICAgICAgICAgICAgICAgICAg
ICAgICBOVUxMLCBOVUxMLCAgICAgICAgICAgICAvLyBmaWx0ZXIsIGZpbHRlcmFyZworICAgICAg
ICAgICAgICAgICAgICAgICAgICAgdmVyYnVmX3NpemUsICAgICAgICAgICAvLyBtYXhzaXplCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAxLCAgICAgICAgICAgICAgICAgICAgICAvLyBtc2Vn
bWVudHMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIHZlcmJ1Zl9zaXplLCAgICAgICAgICAg
Ly8gbWF4c2Vnc2l6ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX0RNQV9BTExPQ05P
VywgICAgICAgLy8gZmxhZ3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsIE5VTEws
ICAgICAgICAgICAgIC8vIGxvY2tmdW5jLCBsb2NrYXJnCisgICAgICAgICAgICAgICAgICAgICAg
ICAgICAmc2MtPnZlcmJ1Zl90YWcpKSB7CisgICAgICAgICAgICBkZXZpY2VfcHJpbnRmKHNjLT5t
cnNhc19kZXYsICJDYW5ub3QgYWxsb2NhdGUgdmVyYnVmIERNQSB0YWdcbiIpOworICAgICAgICAg
ICAgcmV0dXJuIChFTk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QUREUl8zMkJJVCwv
LyBsb3dhZGRyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX1NQQUNFX01BWEFERFIs
ICAgICAgLy8gaGlnaGFkZHIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBOVUxM
LCAgICAgICAgICAgICAvLyBmaWx0ZXIsIGZpbHRlcmFyZworICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIGlvX3JlcV9zaXplLCAgICAgICAgICAgIC8vIG1heHNpemUKKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAxLCAgICAgICAgICAgICAgICAgICAgICAvLyBtc2VnbWVudHMKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBpb19yZXFfc2l6ZSwgICAgICAgICAgICAvLyBtYXhzZWdz
aXplCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX0RNQV9BTExPQ05PVywgICAgICAg
Ly8gZmxhZ3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBOVUxMLCAgICAgICAg
ICAgICAvLyBsb2NrZnVuYywgbG9ja2FyZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICZz
Yy0+aW9fcmVxdWVzdF90YWcpKSB7CisgICAgICAgIGRldmljZV9wcmludGYoc2MtPm1yc2FzX2Rl
diwgIkNhbm5vdCBjcmVhdGUgSU8gcmVxdWVzdCB0YWdcbiIpOworICAgICAgICByZXR1cm4gKEVO
T01FTSk7CisgICAgfQorICAgIGlmIChidXNfZG1hbWVtX2FsbG9jKHNjLT5pb19yZXF1ZXN0X3Rh
ZywgKHZvaWQgKiopJnNjLT5pb19yZXF1ZXN0X21lbSwKKyAgICAgICAgICAgICAgICAgICAgQlVT
X0RNQV9OT1dBSVQsICZzYy0+aW9fcmVxdWVzdF9kbWFtYXApKSB7CisgICAgICAgIGRldmljZV9w
cmludGYoc2MtPm1yc2FzX2RldiwgIkNhbm5vdCBhbGxvYyBJTyByZXF1ZXN0IG1lbW9yeVxuIik7
CisgICAgICAgIHJldHVybiAoRU5PTUVNKTsKKyAgICB9CisgICAgYnplcm8oc2MtPmlvX3JlcXVl
c3RfbWVtLCBpb19yZXFfc2l6ZSk7CisgICAgaWYgKGJ1c19kbWFtYXBfbG9hZChzYy0+aW9fcmVx
dWVzdF90YWcsIHNjLT5pb19yZXF1ZXN0X2RtYW1hcCwKKyAgICAgICAgICAgICAgICAgICAgICAg
IHNjLT5pb19yZXF1ZXN0X21lbSwgaW9fcmVxX3NpemUsIG1yc2FzX2FkZHJfY2IsCisgICAgICAg
ICAgICAgICAgICAgICAgICAmc2MtPmlvX3JlcXVlc3RfcGh5c19hZGRyLCBCVVNfRE1BX05PV0FJ
VCkpIHsKKyAgICAgICAgZGV2aWNlX3ByaW50ZihzYy0+bXJzYXNfZGV2LCAiQ2Fubm90IGxvYWQg
SU8gcmVxdWVzdCBtZW1vcnlcbiIpOworICAgICAgICByZXR1cm4gKEVOT01FTSk7CisgICAgfQor
CisgICAgLyoKKyAgICAgKiBBbGxvY2F0ZSBDaGFpbiBGcmFtZXMKKyAgICAgKi8KKyAgICBjaGFp
bl9mcmFtZV9zaXplID0gc2MtPmNoYWluX2ZyYW1lc19hbGxvY19zejsKKyAgICBpZiAoYnVzX2Rt
YV90YWdfY3JlYXRlKCBzYy0+bXJzYXNfcGFyZW50X3RhZywgICAvLyBwYXJlbnQKKyAgICAgICAg
ICAgICAgICAgICAgICAgICAgICA0LCAwLCAgICAgICAgICAgICAgICAgICAvLyBhbGdubW50LCBi
b3VuZGFyeQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19TUEFDRV9NQVhBRERSXzMy
QklULC8vIGxvd2FkZHIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0VfTUFY
QUREUiwgICAgICAvLyBoaWdoYWRkcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEws
IE5VTEwsICAgICAgICAgICAgIC8vIGZpbHRlciwgZmlsdGVyYXJnCisgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgY2hhaW5fZnJhbWVfc2l6ZSwgICAgICAgLy8gbWF4c2l6ZQorICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIDEsICAgICAgICAgICAgICAgICAgICAgIC8vIG1zZWdtZW50cwor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoYWluX2ZyYW1lX3NpemUsICAgICAgIC8vIG1h
eHNlZ3NpemUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfRE1BX0FMTE9DTk9XLCAg
ICAgICAvLyBmbGFncworICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsIE5VTEwsICAg
ICAgICAgICAgIC8vIGxvY2tmdW5jLCBsb2NrYXJnCisgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgJnNjLT5jaGFpbl9mcmFtZV90YWcpKSB7CisgICAgICAgIGRldmljZV9wcmludGYoc2MtPm1y
c2FzX2RldiwgIkNhbm5vdCBjcmVhdGUgY2hhaW4gZnJhbWUgdGFnXG4iKTsKKyAgICAgICAgcmV0
dXJuIChFTk9NRU0pOworICAgIH0KKyAgICBpZiAoYnVzX2RtYW1lbV9hbGxvYyhzYy0+Y2hhaW5f
ZnJhbWVfdGFnLCAodm9pZCAqKikmc2MtPmNoYWluX2ZyYW1lX21lbSwKKyAgICAgICAgICAgICAg
ICAgICAgQlVTX0RNQV9OT1dBSVQsICZzYy0+Y2hhaW5fZnJhbWVfZG1hbWFwKSkgeworICAgICAg
ICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNhc19kZXYsICJDYW5ub3QgYWxsb2MgY2hhaW4gZnJhbWUg
bWVtb3J5XG4iKTsKKyAgICAgICAgcmV0dXJuIChFTk9NRU0pOworICAgIH0KKyAgICBiemVybyhz
Yy0+Y2hhaW5fZnJhbWVfbWVtLCBjaGFpbl9mcmFtZV9zaXplKTsKKyAgICBpZiAoYnVzX2RtYW1h
cF9sb2FkKHNjLT5jaGFpbl9mcmFtZV90YWcsIHNjLT5jaGFpbl9mcmFtZV9kbWFtYXAsCisgICAg
ICAgICAgICAgICAgICAgICAgICBzYy0+Y2hhaW5fZnJhbWVfbWVtLCBjaGFpbl9mcmFtZV9zaXpl
LCBtcnNhc19hZGRyX2NiLAorICAgICAgICAgICAgICAgICAgICAgICAgJnNjLT5jaGFpbl9mcmFt
ZV9waHlzX2FkZHIsIEJVU19ETUFfTk9XQUlUKSkgeworICAgICAgICBkZXZpY2VfcHJpbnRmKHNj
LT5tcnNhc19kZXYsICJDYW5ub3QgbG9hZCBjaGFpbiBmcmFtZSBtZW1vcnlcbiIpOworICAgICAg
ICByZXR1cm4gKEVOT01FTSk7CisgICAgfQorCisgICAgLyoKKyAgICAgKiBBbGxvY2F0ZSBSZXBs
eSBEZXNjcmlwdG9yIEFycmF5CisgICAgICovIAorICAgIHJlcGx5X2Rlc2Nfc2l6ZSA9IHNjLT5y
ZXBseV9hbGxvY19zejsgCisgICAgaWYgKGJ1c19kbWFfdGFnX2NyZWF0ZSggc2MtPm1yc2FzX3Bh
cmVudF90YWcsICAgLy8gcGFyZW50CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYsIDAs
ICAgICAgICAgICAgICAgICAgIC8vIGFsZ25tbnQsIGJvdW5kYXJ5CisgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgQlVTX1NQQUNFX01BWEFERFJfMzJCSVQsLy8gbG93YWRkcgorICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIEJVU19TUEFDRV9NQVhBRERSLCAgICAgIC8vIGhpZ2hhZGRyCisg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwgTlVMTCwgICAgICAgICAgICAgLy8gZmls
dGVyLCBmaWx0ZXJhcmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXBseV9kZXNjX3Np
emUsICAgICAgICAvLyBtYXhzaXplCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgICAg
ICAgICAgICAgICAgICAgICAgLy8gbXNlZ21lbnRzCisgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgcmVwbHlfZGVzY19zaXplLCAgICAgICAgLy8gbWF4c2Vnc2l6ZQorICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIEJVU19ETUFfQUxMT0NOT1csICAgICAgIC8vIGZsYWdzCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgTlVMTCwgTlVMTCwgICAgICAgICAgICAgLy8gbG9ja2Z1bmMsIGxv
Y2thcmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmc2MtPnJlcGx5X2Rlc2NfdGFnKSkg
eworICAgICAgICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNhc19kZXYsICJDYW5ub3QgY3JlYXRlIHJl
cGx5IGRlc2NyaXB0b3IgdGFnXG4iKTsKKyAgICAgICAgcmV0dXJuIChFTk9NRU0pOworICAgIH0K
KyAgICBpZiAoYnVzX2RtYW1lbV9hbGxvYyhzYy0+cmVwbHlfZGVzY190YWcsICh2b2lkICoqKSZz
Yy0+cmVwbHlfZGVzY19tZW0sCisgICAgICAgICAgICAgICAgICAgIEJVU19ETUFfTk9XQUlULCAm
c2MtPnJlcGx5X2Rlc2NfZG1hbWFwKSkgeworICAgICAgICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNh
c19kZXYsICJDYW5ub3QgYWxsb2MgcmVwbHkgZGVzY3JpcHRvciBtZW1vcnlcbiIpOworICAgICAg
ICByZXR1cm4gKEVOT01FTSk7CisgICAgfQorICAgIGlmIChidXNfZG1hbWFwX2xvYWQoc2MtPnJl
cGx5X2Rlc2NfdGFnLCBzYy0+cmVwbHlfZGVzY19kbWFtYXAsCisgICAgICAgICAgICAgICAgICAg
ICAgICBzYy0+cmVwbHlfZGVzY19tZW0sIHJlcGx5X2Rlc2Nfc2l6ZSwgbXJzYXNfYWRkcl9jYiwK
KyAgICAgICAgICAgICAgICAgICAgICAgICZzYy0+cmVwbHlfZGVzY19waHlzX2FkZHIsIEJVU19E
TUFfTk9XQUlUKSkgeworICAgICAgICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNhc19kZXYsICJDYW5u
b3QgbG9hZCByZXBseSBkZXNjcmlwdG9yIG1lbW9yeVxuIik7CisgICAgICAgIHJldHVybiAoRU5P
TUVNKTsKKyAgICB9CisKKyAgICAvKgorICAgICAqIEFsbG9jYXRlIFNlbnNlIEJ1ZmZlciBBcnJh
eS4gIEtlZXAgaW4gbG93ZXIgNEdCIAorICAgICAqLworICAgIHNlbnNlX3NpemUgPSBzYy0+bWF4
X2Z3X2NtZHMgKiBNUlNBU19TRU5TRV9MRU47CisgICAgaWYgKGJ1c19kbWFfdGFnX2NyZWF0ZShz
Yy0+bXJzYXNfcGFyZW50X3RhZywgICAgLy8gcGFyZW50CisgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgNjQsIDAsICAgICAgICAgICAgICAgICAgIC8vIGFsZ25tbnQsIGJvdW5kYXJ5CisgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgQlVTX1NQQUNFX01BWEFERFJfMzJCSVQsLy8gbG93YWRk
cgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19TUEFDRV9NQVhBRERSLCAgICAgIC8v
IGhpZ2hhZGRyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwgTlVMTCwgICAgICAg
ICAgICAgLy8gZmlsdGVyLCBmaWx0ZXJhcmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBz
ZW5zZV9zaXplLCAgICAgICAgICAgICAvLyBtYXhzaXplCisgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgMSwgICAgICAgICAgICAgICAgICAgICAgLy8gbnNlZ21lbnRzCisgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgc2Vuc2Vfc2l6ZSwgICAgICAgICAgICAgLy8gbWF4c2Vnc2l6ZQorICAg
ICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19ETUFfQUxMT0NOT1csICAgICAgIC8vIGZsYWdz
CisgICAgICAgICAgICA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19ldnRfZGV0YWlsKTsgCisgICAg
aWYgKGJ1c19kbWFfdGFnX2NyZWF0ZSggc2MtPm1yc2FzX3BhcmVudF90YWcsICAgLy8gcGFyZW50
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgMCwgICAgICAgICAgICAgICAgICAgLy8g
YWxnbm1udCwgYm91bmRhcnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0Vf
TUFYQUREUl8zMkJJVCwvLyBsb3dhZGRyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVT
X1NQQUNFX01BWEFERFIsICAgICAgLy8gaGlnaGFkZHIKKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBOVUxMLCBOVUxMLCAgICAgICAgICAgICAvLyBmaWx0ZXIsIGZpbHRlcmFyZworICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIGV2dF9kZXRhaWxfc2l6ZSwgICAgICAgIC8vIG1heHNpemUK
KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLCAgICAgICAgICAgICAgICAgICAgICAvLyBt
c2VnbWVudHMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBldnRfZGV0YWlsX3NpemUsICAg
ICAgICAvLyBtYXhzZWdzaXplCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX0RNQV9B
TExPQ05PVywgICAgICAgLy8gZmxhZ3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxM
LCBOVUxMLCAgICAgICAgICAgICAvLyBsb2NrZnVuYywgbG9ja2FyZworICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICZzYy0+ZXZ0X2RldGFpbF90YWcpKSB7CisgICAgICAgIGRldmljZV9wcmlu
dGYoc2MtPm1yc2FzX2RldiwgIkNhbm5vdCBjcmVhdGUgRXZlbnQgZGV0YWlsIHRhZ1xuIik7Cisg
ICAgICAgIHJldHVybiAoRU5PTUVNKTsKKyAgICB9CisgICAgaWYgKGJ1c19kbWFtZW1fYW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ICAgICAgICAgIDEsICAgICAgICAgLy8gYWxpZ25tZW50IAorICAgICAg
ICAgICAgICAgICAgICAgICAgICAgMCwgICAgICAgICAgICAgICAgICAgICAgLy8gYm91bmRhcnkg
CisgICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0VfTUFYQUREUiwgICAgICAvLyBs
b3dhZGRyIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX1NQQUNFX01BWEFERFIsICAg
ICAgLy8gaGlnaGFkZHIgCisgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBOVUxMLCAg
ICAgICAgICAgICAvLyBmaWx0ZXIsIGZpbHRlcmFyZyAKKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgIE1SU0FTX01BWF9JT19TSVpFLCAgICAgIC8vIG1heHNpemUgCisgICAgICAgICAgICAgICAg
ICAgICAgICAgICBNUlNBU19NQVhfU0dMLCAgICAgICAgICAvLyBuc2VnbWVudHMgCisgICAgICAg
ICAgICAgICAgICAgICAgICAgICBNUlNBU19NQVhfSU9fU0laRSwgICAgICAvLyBtYXhzZWdzaXpl
IAorICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX0RNQV9BTExPQ05PVywgICAgICAgLy8g
ZmxhZ3MgCisgICAgICAgICAgICAgICAgICAgICAgICAgICBidXNkbWFfbG9ja19tdXRleCwgICAg
ICAvLyBsb2NrZnVuYyAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICZzYy0+aW9fbG9jaywg
ICAgICAgICAgIC8vIGxvY2tmdW5jYXJnIAorICAgICAgICAgICAgICAgICAgICAgICAgICAgJnNj
LT5kYXRhX3RhZykpIHsKKyAgICAgICAgZGV2aWNlX3ByaW50ZihzYy0+bXJzYXNfZGV2LCAiQ2Fu
bm90IGNyZWF0ZSBkYXRhIGRtYSB0YWdcbiIpOworICAgICAgICByZXR1cm4oRU5PTUVNKTsKKyAg
ICB9CisKKyAgICByZXR1cm4oMCk7Cit9CisKKy8qCisgKiBtcn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
YXNfc2V0dXBfcmFpZG1hcChzdHJ1Y3QgbXJzYXNfc29mdGMgKnNjKQoreyAgICAgICAKKyAgICBz
Yy0+bWFwX3N6ID0gc2l6ZW9mKE1SX0ZXX1JBSURfTUFQKSArCisgICAgICAgICAgICAgICAgKHNp
emVvZihNUl9MRF9TUEFOX01BUCkgKiAoTUFYX0xPR0lDQUxfRFJJVkVTIC0gMSkpOworCisgICAg
Zm9yIChpbnQgaT0wOyBpIDwgMjsgaSsrKQorICAgIHsKKyAgICAgICAgaWYgKGJ1c19kbWFfdGFn
X2NyZWF0ZShzYy0+bXJzYXNfcGFyZW50X3RhZywgICAgLy8gcGFyZW50CisgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgNCwgMCwgICAgICAgICAgICAgICAgICAgLy8gYWxnbm1udCwgYm91bmRh
cnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0VfTUFYQUREUl8zMkJJVCwv
LyBsb3dhZGRyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX1NQQUNFX01BWEFERFIs
ICAgICAgLy8gaGlnaGFkZHIKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBOVUxM
LCAgICAgICAgICAgICAvLyBmaWx0ZXIsIGZpbHRlcmFyZworICAgICAgICAgICAgICAgICAgICAg
ICAgICAgIHNjLT5tYXBfc3osICAgICAgICAgICAgIC8vIG1heHNpemUKKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAxLCAgICAgICAgICAgICAgICAgICAgICAvLyBuc2VnbWVudHMKKyAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBzYy0+bWFwX3N6LCAgICAgICAgICAgICAvLyBtYXhzZWdz
aXplCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX0RNQV9BTExPQ05PVywgICAgICAg
Ly8gZmxhZ3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxMLCBOVUxMLCAgICAgICAg
ICAgICAvLyBsb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AgICAgICByZXR1cm4ocmV0KTsKKworICAgIHJldCA9
IG1yc2FzX2FsbG9jX21wdF9jbWRzKHNjKTsKKyAgICBpZiAocmV0ICE9IFNVQ0NFU1MpCisgICAg
ICAgIHJldHVybihyZXQpOworCisgICAgcmV0ID0gbXJzYXNfaW9jX2luaXQoc2MpOworICAgIGlm
IChyZXQgIT0gU1VDQ0VTUykKKyAgICAgICAgcmV0dXJuKHJldCk7CisgICAgCisgICAgcmV0dXJu
KDApOworfQorCisvKioKKyAqIG1yc2FzX2FsbG9jX2lvY19jbWQ6ICAgQWxsb2NhdGVzIG1lbW9y
eSBmb3IgSU9DIEluaXQgY29tbWFuZCAKKyAqIGlucHV0OiAgICAgICAgICAgICAgICAgQWRhcHRl
ciBzb2Z0IHN0YXRlCisgKgorICogQWxsb2NhdGVzIGZvciB0aGUgSU9DIEluaXQgY21kIHRvIEZX
IHRvIGluaXRpYWxpemUgdGhlIFJPQy9jb250cm9sbGVyLgorICovCitpbnQgbXJzYXNfYWxsb2Nf
aW9jX2NtZChzdHJ1Y3QgbXJzYXNfc29mdGMgKnNjKQoreworICAgIGludCBpb2NfaW5pdF9zaXpl
OworCisgICAgLyogQWxsb2NhdGUgSU9DIElOSVQgY29tbWFuZCAqLworICAgIGlvY19pbml0X3Np
emUgPSAxMDI0ICsgc2l6ZW9mKE1QSTJfSU9DX0lOSVRfUkVRVUVTVCk7IAorICAgIGlmIChidXNf
ZG1hX3RhZ19jcmVhdGUoIHNjLT5tcnNhc19wYXJlbnRfdGFnLCAgIC8vIHBhcmVudAorICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIDEsIDAsICAgICAgICAgICAgICAgICAgIC8vIGFsZ25tbnQs
IGJvdW5kYXJ5CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX1NQQUNFX01BWEFERFJf
MzJCSVQsLy8gbG93YWRkcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19TUEFDRV9N
QVhBRERSLCAgICAgIC8vIGhpZ2hhZGRyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVM
TCwgTlVMTCwgICAgICAgICAgICAgLy8gZmlsdGVyLCBmaWx0ZXJhcmcKKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICBpb2NfaW5pdF9zaXplLCAgICAgICAgICAvLyBtYXhzaXplCisgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgMSwgICAgICAgICAgICAgICAgICAgICAgLy8gbXNlZ21lbnRz
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW9jX2luaXRfc2l6ZSwgICAgICAgICAgLy8g
bWF4c2Vnc2l6ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgIEJVU19ETUFfQUxMT0NOT1cs
ICAgICAgIC8vIGZsYWdzCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgTlVMTCwgTlVMTCwg
ICAgICAgICAgICAgLy8gbG9ja2Z1bmMsIGxvY2thcmcKKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAmc2MtPmlvY19pbml0X3RhZykpIHsKKyAgICAgICAgZGV2aWNlX3ByaW50ZihzYy0+bXJz
YXNfZGV2LCAiQ2Fubm90IGFsbG9jYXRlIGlvYyBpbml0IHRhZ1xuIik7CisgICAgICAgIHJldHVy
biAoRU5PTUVNKTsKKyAgICB9CisgICAgaWYgKGJ1c19kbWFtZW1fYWxsb2Moc2MtPmlvY19pbml0
X3RhZywgKHZvaWQgKiopJnNjLT5pb2NfaW5pdF9tZW0sCisgICAgICAgICAgICBCVVNfRE1BX05P
V0FJVCwgJnNjLT5pb2NfaW5pdF9kbWFtYXApKSB7CisgICAgICAgIGRldmljZV9wcmludGYoc2Mt
Pm1yc2FzX2RldiwgIkNhbm5vdCBhbGxvY2F0ZSBpb2MgaW5pdCBjbWQgbWVtXG4iKTsKKyAgICAg
ICAgcmV0dXJuIChFTk9NRU0pOworICAgIH0KKyAgICBiemVybyhzYy0+aW9jX2luaXRfbWVtLCBp
b2NfaW5pdF9zaXplKT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
IGR1ZSB0byBzaHV0ZG93biBmcm9tICVzXG4iLCBfX2Z1bmNfXyk7CisgICAgICAgICAgICBicmVh
azsKKyAgICAgICAgfQorICAgICAgICBmd19zdGF0dXMgPSBtcnNhc19yZWFkX3JlZyhzYywgCisJ
CQkJb2Zmc2V0b2YobXJzYXNfcmVnX3NldCwgb3V0Ym91bmRfc2NyYXRjaF9wYWQpKTsKKyAgICAg
ICAgZndfc3RhdGUgPSBmd19zdGF0dXMgJiBNRklfU1RBVEVfTUFTSzsKKyAgICAgICAgaWYgKGZ3
X3N0YXRlID09IE1GSV9TVEFURV9GQVVMVCB8fCBzYy0+ZG9fdGltZWRvdXRfcmVzZXQpIHsKKyAg
ICAgICAgICAgIGRldmljZV9wcmludGYoc2MtPm1yc2FzX2RldiwgIk9DUiBzdGFydGVkIGR1ZSB0
byAlcyFcbiIsCisgICAgICAgICAgICAgICAgIHNjLT5kb190aW1lZG91dF9yZXNldD8iSU8gVGlt
ZW91dCI6CisgICAgICAgICAgICAgICAgICJGVyBmYXVsdCBkZXRlY3RlZCIpOworICAgICAgICAg
ICAgbXR4X2xvY2tfc3Bpbigmc2MtPmlvY3RsX2xvY2spOworICAgICAgICAgICAgc2MtPnJlc2V0
X2luX3Byb2dyZXNzID0gMTsKKyAgICAgICAgICAgIHNjLT5yZXNldF9jb3VudCsrOworICAgICAg
ICAgICAgbXR4X3VubG9ja19zcGluKCZzYy0+aW9jdGxfbG9jayk7CisgICAgICAgICAgICBtcnNh
c194cHRfZnJlZXplKHNjKTsKKyAgICAgICAgICAgIG1yc2FzX3Jlc2V0X2N0cmwoc2MpOworICAg
ICAgICAgICAgbXJzYXNfeHB0X3JlbGVhc2Uoc2MpOworICAgICAgICAgICAgc2MtPnJlc2V0X2lu
X3Byb2dyZXNzID0gMDsKKyAgICAgICAgICAgIHNjLT5kb190aW1lZG91dF9yZXNldCA9IDA7Cisg
ICAgICAgIH0KKyAgICB9CisgICAgbXR4X3VubG9jaygmc2MtPnNpbV9sb2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X0VSUk9SKSB7CisgICAgICAgIGRldmljZV9wcmludGYoc2MtPm1yc2FzX2RldiwK
KyAgICAgICAgICAgICAgICAgICAgICAgICJtcnNhczogSGFyZHdhcmUgY3JpdGljYWwgZXJyb3Is
IHJldHVybmluZyBGQUlMLlxuIik7CisgICAgICAgIHJldHVybiBGQUlMOworICAgIH0KKworICAg
IHNldF9iaXQoTVJTQVNfRlVTSU9OX0lOX1JFU0VULCAmc2MtPnJlc2V0X2ZsYWdzKTsKKyAgICBz
Yy0+YWRwcmVjb3ZlcnkgPSBNUlNBU19BRFBSRVNFVF9TTV9JTkZBVUxUOworICAgIG1yc2FzX2Rp
c2FibGVfaW50cihzYyk7CisgICAgREVMQVkoMTAwMCAqIDEwMDApOworCisgICAgLyogRmlyc3Qg
dHJ5IHdhaXRpbmcgZm9yIGNvbW1hbmRzIHRvIGNvbXBsZXRlICovCisgICAgaWYgKG1yc2FzX3dh
aXRfZm9yX291dHN0YW5kaW5nKHNjKSkgeworICAgICAgICBtcnNhc19kcHJpbnQoc2MsIE1SU0FT
X09DUiwKKyAgICAgICAgICAgICAgICAgICAgICJyZXNldHRpbmcgYWRhcHRlciBmcm9tICVzLlxu
IiwKKyAgICAgICAgICAgICAgICAgICAgICBfX2Z1bmNfXyk7CisgICAgICAgIC8qIE5vdyByZXR1
cm4gY29tbWFuZHMgYmFjayB0byB0aGUgQ0FNIGxheWVyICovCisgICAgICAgIGZvciAoaSA9IDAg
OyBpIDwgc2MtPm1heF9md19jbWRzOyBpKyspIHsKKyAgICAgICAgICAgIG1wdF9jbWQgPSBzYy0+
bXB0X2NtZF9saXN0W2ldOworICAgICAgICAgICAgaWYgKG1wdF9jbWQtPmNjYl9wdHIpIHsKKyAg
ICAgICAgICAgICAgICBjY2IgPSAodW5pb24gY2NiICopKG1wdF9jbWQtPmNjYl9wdHIpOworICAg
ICAgICAgICAgICAgIGNjYi0+Y2NiX2guc3RhdHVzID0gQ0FNX1NDU0lfQlVTX1JFU0VUOworICAg
ICAgICAgICAgICAgIG1yc2FzX2NtZF9kb25lKHNjLCBtcHRfY21kKTsKKyAgICAgICAgICAgICAg
ICBhdG9taWNfZGVjKCZzYy0+Zndfb3V0c3RhbmRpbmcpOworICAgICAgICAgICAgfQorICAgICAg
ICB9CisgICAKKyAgICAgICAgc3RhdHVzX3JlZyA9IG1yc2FzX3JlYWRfcmVnKHNjLCBvZmZzZXRv
ZihtcnNhc19yZWdfc2V0LAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICBvdXRib3VuZF9zY3JhdGNoX3BhZCkpOworICAgICAgICBhYnNf
c3RhdGUgPSBzdGF0dXNfcmVnICYgTUZJX1NUQVRFX01BU0s7CisgICAgICAgIHJlc2V0X2FkYXB0
ZXIgPSBzdGF0dXNfcmVnICYgTUZJX1JFU0VUX0FEQVBURVI7CisgICAgICAgIGlmIChzYy0+ZGlz
YWJsZU9ubGluZUN0cmxSZXNldCB8fAorICAgICAgICAgICAgICAgICAgICAgICAgKGFic19zdGF0
ZSA9PSBNRklfU1RBVEVfRkFVTFQgJiYgIXJlc2V0X2FkYXB0ZXIpKSB7CisgICAgICAgICAgICAv
KiBSZXNldCBub3Qgc3VwcG9ydGVkLCBraWxsIGFkYXB0ZXIgKi8KKyAgICAgICAgICAgIG1yc2Fz
X2RwcmludChzYywgTVJTQVNfT0NSLCJSZXNldCBub3Qgc3VwcG9ydGVkLCBraWxsaW5nIGFkYXB0
ZXIuXG4iKTsKKyAgICAgICAgICAgIG1yc2FzX2tpbGxfaGJhKHNjKTsKKyAgICAgICAgICAgIHNj
LT5hZHByZWNvdmVyeSA9IE1SU0FTX0hXX0NSSVRJQ0FMX0VSUk9SOworICAgICAgICAgICAgcmV0
dmFsID0gRkFJTDsKKyAgICAgICAgICAgICBnb3RvIG91dDsKKyAgICAgICAgfQorCisgICAgICAg
IC8qIE5vdyB0cnkgdG8gcmVzZXQgdGhlIGNoaXAgKi8KKyAgICAgICAgZ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2FzX3JlZ19zZXQsIGZ1c2lvbl9zZXFfb2Zmc2V0KSwKKyAgICAgICAgICAg
ICAgICBNUEkyX1dSU0VRXzZUSF9LRVlfVkFMVUUpOworCisgICAgICAgICAgICAvKiBDaGVjayB0
aGF0IHRoZSBkaWFnIHdyaXRlIGVuYWJsZSAoRFJXRSkgYml0IGlzIG9uICovCisgICAgICAgICAg
ICBob3N0X2RpYWcgPSBtcnNhc19yZWFkX3JlZyhzYywgb2Zmc2V0b2YobXJzYXNfcmVnX3NldCwK
KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ZnVzaW9uX2hvc3RfZGlhZykpOworICAgICAgICAgICAgcmV0cnkgPSAwOworICAgICAgICAgICAg
d2hpbGUgKCEoaG9zdF9kaWFnICYgSE9TVF9ESUFHX1dSSVRFX0VOQUJMRSkpIHsKKyAgICAgICAg
ICAgICAgICBERUxBWSgxMDAgKiAxMDAwKTsKKyAgICAgICAgICAgICAgICBob3N0X2RpYWcgPSBt
cnNhc19yZWFkX3JlZyhzYywgb2Zmc2V0b2YobXJzYXNfcmVnX3NldCwKKyAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVzaW9uX2hvc3RfZGlh
ZykpOworICAgICAgICAgICAgICAgIGlmIChyZXRyeSsrID09IDEwMCkgeworICAgICAgICAgICAg
ICAgICAgICBtcnNhc19kcHJpbnQoc2MsIE1SU0FTX09DUiwKKyAgICAgICAgICAgICAgICAgICAg
Ikhvc3QgZGlhZyB1bmxvY2sgZmFpbGVkIVxuIik7CisgICAgICAgICAgICAgICAgICAgIGJyZWFr
OworICAgICAgICAgICAgICAgIH0KKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIGlmICghKGhv
c3RfZGlhZyAmIEhPU1RfRElBR19XUklURV9FTkFCTEUpKQorICAgICAgICAgICAgICAgIGNvbnRp
bnVlOworCisgICAgICAgICAgICAvKiBTZW5kIGNoaXAgcmVzZXQgY29tbWFuZCAqLworICAgICAg
ICAgICAgbXJzYXNfd3JpdGVfcmVnKHNjLCBvZmZzZXRvZihtcnNhc19yZWdfc2V0LCBmdXNpb25f
aG9zdF9kaWFnKSwKKyAgICAgICAgICAgICAgIGhvc3RfZGlhZyB8IEhPU1RfRElBR19SRVNFVF9B
REFQVEVSKTsKKyAgICAgICAgICAgIERFTEFZKDMwMDAgKiAxMDAwKTsKKworICAgICAgICAgICAg
LyogTWFrZSBzdXJlIHJlc2V0IGFkYXB0ZXIgYml0IGlzIGNsZWFyZWQgKi8KKyAgICAgICAgICAg
IGhvc3RfZGlhZyA9IG1yc2FzX3JlYWRfcmVnKHNjLCBvZmZzZXRvZihtcnNhc19yZWdfc2V0LAor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBm
dXNpb25faG9zdF9kaWFnKSk7CisgICAgICAgICAgICByZXRyeSA9IDA7CisgICAgICAgICAgICB3
aGlsZSAoaG9zdF9kaWFnICYgSE9TVF9ESUFHX1JFU0VUX0FEQVBURVIpIHsKKyAgICAgICAgICAg
ICAgICBERUxBWSgxMDAgKiAxMDAwKTsKKyAgICAgICAgICAgICAgICBob3N0X2RpYWcgPSBtcnNh
c19yZWFkX3JlZyhzYywgb2Zmc2V0b2YobXJzYXNfcmVnX3NldCwKKyAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnVzaW9uX2hvc3RfZGlhZykp
OworICAgICAgICAgICAgICAgIGlmIChyZXRyeSsrID09IDEwMDApIHsKKyAgICAgICAgICAgICAg
ICAgICAgbXJzYXNfZHByaW50KHNjLCBNUlNBU19PQ1IsCisgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIkRpYWcgcmVzZXQgYWRhcHRlciBuZXZlciBjbGVhcmVkIVxuIik7
CisgICAgICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgICAgIH0KKyAgICAgICAg
ICAgIH0KKyAgICAgICAgICAgIGlmIChob3N0X2RpYWcgJiBIT1NUX0RJQUdfUkVTRVRfQURBUFRF
UikKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKworICAgICAgICAgICAgYWJzX3N0YXRlID0g
bXJzYXNfcmVhZF9yZWcoc2MsIG9mZnNldG9mKG1yc2FzX3JlZ19zZXQsCisgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICBvdXRib3VuZF9zY3JhdGNoX3BhZCkpICYgTUZJX1NUQVRF
X01BU0s7CisgICAgICAgICAgICByZXRyeSA9IDA7CisKKyAgICAgICAgICAgIHdoaWxlICgoYWJz
X3N0YXRlIDw9IE1GSV9TVEFURV9GV19JTklUKSAmJiAocmV0cnkrKyA8IDEwMDApKSB7CisgICAg
ICAgICAgICAgICAgREVMQVkoMTAwICogMTAwMCk7CisgICAgICAgICAgICAgICAgYWJzX3N0YXRl
ID0gbXJzYXNfcmVhZF9yZWcoc2MsIG9mZnNldG9mKG1yc2FzX3JlZ19zZXQsCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0Ym91bmRfc2NyYXRjaF9wYWQpKSAmIE1GSV9T
VEFURV9NQVNLOworICAgICAgICAgICAgfQorICAgICAgICAgICAgaWYgKGFic19zdGF0ZSA8PSBN
RklfU1RBVEVfRldfSU5JVCkgeworICAgICAgICAgICAgICAgIG1yc2FzX2RwcmludChzYywgTVJT
QVNfT0NSLCAiZmlybXdhcmUgc3RhdGUgPCBNRklfU1RBVEVfRldfSU5JVCwiCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICIgc3RhdGUgPSAweCV4XG4iLCBhYnNfc3RhdGUpOworICAg
ICAgICAgICAgICAgIGNvbnRpbnVlOworICAgICAgICAgICAgfQorCisgICAgICAgICAgICAvKiBX
YWl0IGZvciBGVyB0byBiZWNvbWUgcmVhZHkgKi8KKyAgICAgICAgICAgIGlmIChtcnNhc190cmFu
c2l0aW9uX3RvX3JlYWR5KHNjLCAxKSkgeworICAgICAgICAgICAgICAgIG1yc2FzX2RwcmludChz
YywgTVJTQVNfT0NSLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgIm1yc2FzOiBGYWlsZWQg
dG8gdHJhbnNpdGlvbiBjb250cm9sbGVyIHRvIHJlYWR5LlxuIik7CisgICAgICAgICAgICAgICAg
Y29udGludWU7CisgICAgICAgICAgICB9CisKKyAgICAgICAgICAgIG1yc2FzX3Jlc2V0X3JlcGx5
X2Rlc2Moc2MpOworICAgICAgICAgICAgaWYgKG1yc2FzX2lvY19pbml0KHNjKSkgeworICAgICAg
ICAgICAgICAgIG1yc2FzX2RwcmludChzYywgTVJTQVNfT0NSLCAibXJzYXNfaW9jX2luaXQoKSBm
YWlsZWQhXG4iKTsKKyAgICAgICAgICAgICAgICBjb250aW51ZTsKKyAgICAgICAgICAgIH0KKwor
ICAgICAgICAgICAgY2xlYXJfYml0KE1SU0FTX0ZVU0lPTl9JTl9SRVNFVCwgJnNjLT5yZXNldF9m
bGFncyk7CisgICAgICAgICAgICBtcnNhc19lbmFibGVfaW50cihzYyk7CisgICAgICAgICAgICBz
Yy0+YWRwcmVjb3ZlcnkgPSBNUlNBU19IQkFfT1BFUkFUSU9OQUw7CisKKyAgICAgICAgICAgIC8q
IFJlLWZpcmUgbWFuYWdlbWVudCBjb21tYW5kcyAqLworICAgICAgICAgICAgZm9yIChqID0gMCA7
IGogPCBzYy0+bWF4X2Z3X2NtZHM7IGorKykgeworICAgICAgICAgICAgICAgIG1wdF9jbWQgPSBz
Yy0+bXB0X2NtZF9saXN0W2pdOworICAgICAgICAgICAgICAgIGlmIChtcHRfY21kLT5zeW5jX2Nt
ZF9pZHggIT0gKHVfaW50MzJfdClNUlNBU19VTE9OR19NQVgpIHsKKyAgICAgICAgICAgICAgICAg
ICAgbWZpX2NtZCA9IHNjLT5tZmlfY21kX2xpc3RbbXB0X2NtZC0+c3luY19jbWRfaWR4XTsKKyAg
ICAgICAgICAgICAgICAgICAgaWYgKG1maV9jbWQtPmZyYW1lLT5kY21kLm9wY29kZSA9PQorICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTVJfRENNRF9MRF9NQVBfR0VU
X0lORk8pIHsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1yc2FzX3JlbGVhc2VfbWZpX2NtZCht
ZmlfY21kKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIG1yc2FzX3JlbGVhc2VfbXB0X2NtZCht
cHRfY21kKTsKKyAgICAgICAgICAgICAgICAgICAgfSBlbHNlICB7CisgICAgICAgICAgICAgICAg
ICAgICAgICByZXFfZGVzYyA9IG1yc2FzX2dldF9yZXF1ZXN0X2Rlc2Moc2MsCisgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgbWZpX2NtZC0+Y21kX2lkLmNvbnRleHQuc21pZCAtIDEpOworICAg
ICAgICAgICAgICAgICAgICAgICAgbXJzYXNfZHByaW50KHNjLCBNUlNBU19PQ1IsCisgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIlJlLWZpcmUgY29tbWFuZCBEQ01EIG9wY29kZSAweCV4IGlu
ZGV4ICVkXG4gIiwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbWZpX2NtZC0+ZnJhbWUt
PmRjbWQub3Bjb2RlLCBqKTsKKyAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcmVxX2Rlc2Mp
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlX3ByaW50ZihzYy0+bXJzYXNfZGV2
LCAKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICJDYW5ub3QgYnVp
bGQgTVBUIGNtZC5cbiIpOworICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQorICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIG1yc2FzX2ZpcmVfY21kKHNjLCByZXFfZGVzYy0+YWRkci51Lmxv
dywKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
cmVxX2Rlc2MtPmFkZHIudS5oaWdoKTsKKyAgICAgICAgICAgICAgICAgICAgfQorICAgICAgICAg
ICAgICAgIH0KKyAgICAgICAgICAgIH0KKworICAgICAgICAgICAgLyogUmVzZXQgbG9hZCBiYWxh
bmNlIGluZm8gKi8KKyAgICAgICAgICAgIG1lbXNldChzYy0+bG9hZF9iYWxhbmNlX2luZm8sIDAs
IAorICAgICAgICAgICAgICAgICAgIHNpemVvZihMRF9MT0FEX0JBTEFOQ0VfSU5GTykgKiBNQVhf
TE9HSUNBTF9EUklWRVMpOyAKKworICAgICAgICAgICAgaWYgKCFtcnNhc19nZXRfbWFwX2luZm8o
c2MpKQorICAgICAgICAgICAgICAgIG1yc2FzX3N5bmNfbWFwX2luZm8oc2MpOworCisgICAgICAg
ICAgICAvKiBBZGFwdGVyIHJlc2V0IGNvbXBsZXRlZCBzdWNjZXNzZnVsbHkgKi8KKyAgICAgICAg
ICAgIGRldmljZV9wcmludGYoc2MtPm1yc2FzX2RldiwgIlJlc2V0IHN1Y2Nlc3NmdWxcbiIpOwor
ICAgICAgICAgICAgcmV0dmFsID0gU1VDQ0VTUzsKKyAgICAgICAgICAgIGdvdG8gb3V0OworICAg
ICAgICB9CisgICAgICAgIC8qIFJlc2V0IGZhaWxlZCwga2lsbCB0aGUgYWRhcHRlciAqLworICAg
ICAgICBkZXZpY2VfcHJpbnRmKHNjLT5tcnNhc19kZXYsICJSZXNldCBmYWlsZWQsIGtpbGxpbmcg
YWRhcHRlci5cbiIpOworICAgICAgICBtcnNhc19raWxsX2hiYShzYyk7CisgICAgICAgIHJldHZh
bCA9IEZBSUw7CisgICAgfSBlbHNlIHsKKyAgICAgICAgY2xlYXJfYml0KE1SU0FTX0ZVU0lPTl9J
Tl9SRVNFVCwgJnNjLT5yZXNldF9mbGFncyk7CisgICAgICAgIG1yc2FzX2VuYWJsZV9pbnRyKHNj
KTsKK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FRoaXMgZnVuY3Rpb24gd2lsbCB3YWl0IGZv
ciAxODAgc2Vjb25kcyBmb3Igb3V0c3RhbmRpbmcKKyAqIGNvbW1hbmRzIHRvIGJlIGNvbXBsZXRl
ZC4KKyAqLworaW50IG1yc2FzX3dhaXRfZm9yX291dHN0YW5kaW5nKHN0cnVjdCBtcnNhc19zb2Z0
YyAqc2MpCit7CisgICAgaW50IGksIG91dHN0YW5kaW5nLCByZXR2YWwgPSAwOworICAgIHVfaW50
MzJfdCBmd19zdGF0ZTsKKworICAgIGZvciAoaSA9IDA7IGkgPCBNUlNBU19SRVNFVF9XQUlUX1RJ
TUU7IGkrKykgeworICAgICAgICBpZiAoc2MtPnJlbW92ZV9pbl9wcm9ncmVzcykgeworICAgICAg
ICAgICAgbXJzYXNfZHByaW50KHNjLCBNUlNBU19PQ1IsCisgICAgICAgICAgICAgICAgIkRyaXZl
ciByZW1vdmUgb3Igc2h1dGRvd24gY2FsbGVkLlxuIik7CisgICAgICAgICAgICByZXR2YWwgPSAx
OworICAgICAgICAgICAgZ290byBvdXQ7CisgICAgICAgIH0KKyAgICAgICAgLyogQ2hlY2sgaWYg
ZmlybXdhcmUgaXMgaW4gZmF1bHQgc3RhdGUgKi8KKyAgICAgICAgZndfc3RhdGUgPSBtcnNhc19y
ZWFkX3JlZyhzYywgb2Zmc2V0b2YobXJzYXNfcmVnX3NldCwKKyAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICBvdXRib3VuZF9zY3JhdGNoX3BhZCkpICYgTUZJX1NUQVRFX01BU0s7Cisg
ICAgICAgIGlmIChmd19zdGF0ZSA9PSBNRklfU1RBVEVfRkFVTFQpIHsKKyAgICAgICAgICAgIG1y
c2FzX2RwcmludChzYywgTVJTQVNfT0NSLAorICAgICAgICAgICAgICAgICAgICAgICAgICJGb3Vu
ZCBGVyBpbiBGQVVMVCBzdGF0ZSwgd2lsbCByZXNldCBhZGFwdGVyLlxuIik7CisgICAgICAgICAg
ICByZXR2YWwgPSAxOworICAgICAgICAgICAgZ290byBvdXQ7CisgICAgICAgIH0KKyAgICAgICAg
b3V0c3RhbmRpbmcgPSBhdG9taWNfcmVhZCgmc2MtPmZ3X291dHN0YW5kaW5nKTsKKyAgICAgICAg
aWYgKCFvdXRzdGFuZGluZykKKyAgICAgICAgICAgIGdvdG8gb3V0OworCisgICAgICAgIGlmICgh
KGkgJSBNUlNBU19SRVNFVF9OT1RJQ0VfSU5URVJWQUwpKSB7CisgICAgICAgICAgICBtcnNhc19k
cHJpbnQoc2MsIE1SU0FTX09DUiwgIlslMmRdd2FpdGluZyBmb3IgJWQgIgorICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAiY29tbWFuZHMgdG8gY29tcGxldGVcbiIsaSxvdXRzdGFuZGlu
Zyk7CisgICAgICAgICAgICBtcnNhc19jb21wbGV0ZV9jbWQoc2MpOworICAgICAgICB9CisgICAg
ICAgIERFTEFZKDEwMDAgKiAxMDAwKTsKKyAgICB9CisKKyAgICBpZiAoYXRvbWljX3JlYWQoJnNj
LT5md19vdXRzdGFuZGluZykpIHsKKyAgICAgICAgbXJzYXNfZHByaW50KHNjLCBNUlNBU19PQ1Is
CisgICAgICAgICAgICAgICAgICAgICAgICAiIHBlbmRpbmcgY29tbWFuZHMgcmVtYWluIGFmdGVy
IHdhaXRpbmcsIgorICAgICAgICAgICAgICAgICAgICAgICAgIiB3aWxsIHJlc2V0IGFkYXB0ZXIu
XG4iKTsKKyAgICAgICAgcmV0dmFsID0gMTsKKyAgICB9CitvdXQ6CisgICAgcmV0dXJuIHJldHZh
bDsKK30KKworLyoqCisgKiBtcnNhc19yZWxlYXNlX21maV9jbWQ6IFJldHVybiBhIGNtZCB0byBm
cmVlIGNvbW1hbmQgcG9vbAorICogaW5wdXQ6ICAgICAgICAgICAgICAgICBDb21tYW5kIHBhY2tl
dCBmb3IgcmV0dXJuIHRvIGZyZWUgY21kIHBvb2wgCisgKgorICogVGhpcyBmdW5jdGlvbiByZXR1
cm5zIHRo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ybF9pbmZvKTsKKyAgICBpZiAoYnVzX2RtYV90YWdfY3JlYXRlKCBzYy0+bXJzYXNf
cGFyZW50X3RhZywgICAvLyBwYXJlbnQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLCAw
LCAgICAgICAgICAgICAgICAgICAvLyBhbGdubW50LCBib3VuZGFyeQorICAgICAgICAgICAgICAg
ICAgICAgICAgICAgIEJVU19TUEFDRV9NQVhBRERSXzMyQklULC8vIGxvd2FkZHIKKyAgICAgICAg
ICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0VfTUFYQUREUiwgICAgICAvLyBoaWdoYWRkcgor
ICAgICAgICAgICAgICAgICAgICAgICAgICAgIE5VTEwsIE5VTEwsICAgICAgICAgICAgIC8vIGZp
bHRlciwgZmlsdGVyYXJnCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3Rscl9pbmZvX3Np
emUsICAgICAgICAgIC8vIG1heHNpemUKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLCAg
ICAgICAgICAgICAgICAgICAgICAvLyBtc2VnbWVudHMKKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBjdGxyX2luZm9fc2l6ZSwgICAgICAgICAgLy8gbWF4c2Vnc2l6ZQorICAgICAgICAgICAg
ICAgICAgICAgICAgICAgIEJVU19ETUFfQUxMT0NOT1csICAgICAgIC8vIGZsYWdzCisgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgTlVMTCwgTlVMTCwgICAgICAgICAgICAgLy8gbG9ja2Z1bmMs
IGxvY2thcmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAmc2MtPmN0bHJfaW5mb190YWcp
KSB7CisgICAgICAgIGRldmljZV9wcmludGYoc2MtPm1yc2FzX2RldiwgIkNhbm5vdCBhbGxvY2F0
ZSBjdGxyIGluZm8gdGFnXG4iKTsKKyAgICAgICAgcmV0dXJuIChFTk9NRU0pOworICAgIH0KKyAg
ICBpZiAoYnVzX2RtYW1lbV9hbGxvYyhzY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5jbWRfc3RhdHVzID09IEVDT05OUkVGVVNFRCl7CisgICAgICAgICAgIHRz
bGVlcCgodm9pZCAqKSZzYy0+Y2hhbiwgMCwgIm1yc2FzX3NsZWVwIiwgaHopOworICAgICAgIH0K
KyAgICAgICBlbHNlCisgICAgICAgICAgIGJyZWFrOworICAgICAgIHRvdGFsX3RpbWUrKzsKKyAg
ICAgICBpZiAodG90YWxfdGltZSA+PSBtYXhfd2FpdCkgeworICAgICAgICAgICBkZXZpY2VfcHJp
bnRmKHNjLT5tcnNhc19kZXYsICJJbnRlcm5hbCBjb21tYW5kIHRpbWVkIG91dCBhZnRlciAlZCBz
ZWNvbmRzLlxuIiwgbWF4X3dhaXQpOworICAgICAgICAgICByZXRjb2RlID0gMTsKKyAgICAgICAg
ICAgYnJlYWs7CisgICAgICAgfSAKKyAgICB9IAorICAgIHJldHVybihyZXRjb2RlKTsKK30KKwor
LyoqCisgKiBtcnNhc19jb21wbGV0ZV9tcHRtZmlfcGFzc3RocnUgLSBDb21wbGV0ZXMgYSBjb21t
YW5kCisgKiBpbnB1dDogICAgICAgICAgICAgICAgICAgICAgICAgICBzYzogQWRhcHRlciBzb2Z0
IHN0YXRlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbWQ6IENvbW1hbmQg
dG8gYmUgY29tcGxldGVkCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdGF0
dXM6IGNtZCBjb21wbGV0aW9uIHN0YXR1cyAKKyAqCisgKiBUaGlzIGZ1bmN0aW9uIGlzIGNhbGxl
ZCBmcm9tIG1yc2FzX2NvbXBsZXRlX2NtZCgpIGFmdGVyIGFuIGludGVycnVwdCAKKyAqIGlzIHJl
Y2VpdmVkIGZyb20gRmlybXdhcmUsIGFuZCBpb19yZXF1ZXN0LT5GdW5jdGlvbiBpcyAKKyAqIE1S
U0FTX01QSTJfRlVOQ1RJT05fUEFTU1RIUlVfSU9fUkVRVUVTVC4KKyAqLwordm9pZAorbXJ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XBsZXRpb24uCisgICAgICAgICAgICAgKi8KKyAgICAgICAgICAgIGlm
IChjbWQtPnN5bmNfY21kKSB7CisgICAgICAgICAgICAgICAgY21kLT5zeW5jX2NtZCA9IDA7Cisg
ICAgICAgICAgICAgICAgbXJzYXNfd2FrZXVwKHNjLCBjbWQpOworICAgICAgICAgICAgICAgIGJy
ZWFrOworICAgICAgICAgICAgfQorICAgICAgICBjYXNlIE1GSV9DTURfU01QOgorICAgICAgICBj
YXNlIE1GSV9DTURfU1RQOgorICAgICAgICBjYXNlIE1GSV9DTURfRENNRDoKKyAgICAgICAgICAg
IC8qIENoZWNrIGZvciBMRCBtYXAgdXBkYXRlICovCisgICAgICAgICAgICBpZiAoKGNtZC0+ZnJh
bWUtPmRjbWQub3Bjb2RlID09IE1SX0RDTURfTERfTUFQX0dFVF9JTkZPKSAmJiAKKyAgICAgICAg
ICAgICAgICAoY21kLT5mcmFtZS0+ZGNtZC5tYm94LmJbMV0gPT0gMSkpIHsKKwkJbXR4X2xvY2so
JnNjLT5yYWlkbWFwX2xvY2spOworICAgICAgICAgICAgICAgIGlmIChjbWRfc3RhdHVzICE9IDAp
IHsKKyAgICAgICAgICAgICAgICAgICAgaWYgKGNtZF9zdGF0dXMgIT0gTUZJX1NUQVRfTk9UX0ZP
VU5EKQorICAgICAgICAgICAgICAgICAgICAgICAgZGV2aWNlX3ByaW50ZihzYy0+bXJzYXNfZGV2
LCAibWFwIHN5bmMgZmFpbGVkLCBzdGF0dXM9JXhcbiIsY21kX3N0YXR1cyk7CisgICAgICAgICAg
ICAgICAgICAgIGVsc2UgeworICAgICAgICAgICAgICAgICAgICAgICAgbXJzYXNfcmVsZWFzZV9t
ZmlfY21kKGNtZCk7CisJCSAgICAgICAgbXR4X3VubG9jaygmc2MtPnJhaWRtYXBfbG9jayk7Cisg
ICAgICAgICAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgICAgICAgICAgfQorICAg
ICAgICAgICAgICAgIH0gCisgICAgICAgICAgICAgICAgZWxzZSAKKyAgICAgICAgICAgICAgICAg
ICAgc2MtPm1hcF9pZCsrOworICAgICAgICAgICAgICAgIG1yc2FzX3JlbGVhc2VfbWZpX2NtZChj
bWQpOworICAgICAgICAgICAgICAgIGlmIChNUl9WYWxpZGF0ZU1hcEluZm8oc2MpKQorICAgICAg
ICAgICAgICAgICAgICBzYy0+ZmFzdF9wYXRoX2lvID0gMDsKKyAgICAgICAgICAgICAgICBlbHNl
CisgICAgICAgICAgICAgICAgICAgIHNjLT5mYXN0X3BhdGhfaW8gPSAxOworICAgICAgICAgICAg
ICAgIG1yc2FzX3N5bmNfbWFwX2luZm8oc2MpOworICAgICAgICAgICAgICAgIG10eF91bmxvY2so
JnNjLT5yYWlkbWFwX2xvY2spOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAg
fQorI2lmIDAgLy9jdXJyZW50bHkgbm90IHN1cHBvcnRpbmcgZXZlbnQgaGFuZGxpbmcsIHNvIGNv
bW1lbnRpbmcgb3V0CisgICAgICAgICAgICBpZiAoY21kLT5mcmFtZS0+ZGNtZC5vcGNvZGUgPT0g
TVJfRENNRF9DVFJMX0VWRU5UX0dFVF9JTkZPIHx8CisgICAgICAgICAgICAgICAgICAgIGNtZC0+
ZnJhbWUtPmRjbWQub3Bjb2RlID09IE1SX0RDTURfQ1RSTF9FVkVOVF9HRVQpIHsKKyAgICAgICAg
ICAgICAgICBtcnNhc19wb2xsX3dhaXRfYWVuID0gMDsKKyAgICAgICAgICAgIH0KKyNlbmRpZgor
ICAgICAgICAgICAgLyogU2VlIGlmIGdvdCBhbiBldmVudCBub3RpZmljYXRpb24gKi8KKyAgICAg
ICAgICAgIGlmIChjbWQtPmZyYW1lLT5kY21kLm9wY29kZSA9PSBNUl9EQ01EX0NUUkxfRVZFTlRf
V0FJVCkKKyAgICAgICAgICAgICAgICBtcnNhc19jb21wbGV0ZV9hZW4oc2MsIGNtZCk7CisgICAg
ICAgICAgICBlbHNlCisgICAgICAgICAg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jYXRlZAorICogbWVtb3J5IGlzIGluaXRpYWxpemVkIHRvIGFsbCB6ZXJv
cyB1cG9uIHN1Y2Nlc3NmdWwgbG9hZGluZyBvZiB0aGUgZG1hIAorICogbWFwcGVkIG1lbW9yeS4K
KyAqLworaW50IG1yc2FzX2FsbG9jX3RtcF9kY21kKHN0cnVjdCBtcnNhc19zb2Z0YyAqc2MsIHN0
cnVjdCBtcnNhc190bXBfZGNtZCAqdGNtZCwgCisgICAgICAgICAgaW50IHNpemUpCit7CisgICAg
aWYgKGJ1c19kbWFfdGFnX2NyZWF0ZSggc2MtPm1yc2FzX3BhcmVudF90YWcsICAgLy8gcGFyZW50
CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSwgMCwgICAgICAgICAgICAgICAgICAgLy8g
YWxnbm1udCwgYm91bmRhcnkKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBCVVNfU1BBQ0Vf
TUFYQUREUl8zMkJJVCwvLyBsb3dhZGRyCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVT
X1NQQUNFX01BWEFERFIsICAgICAgLy8gaGlnaGFkZHIKKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICBOVUxMLCBOVUxMLCAgICAgICAgICAgICAvLyBmaWx0ZXIsIGZpbHRlcmFyZworICAgICAg
ICAgICAgICAgICAgICAgICAgICAgIHNpemUsICAgICAgICAgICAgICAgICAgIC8vIG1heHNpemUK
KyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxLCAgICAgICAgICAgICAgICAgICAgICAvLyBt
c2VnbWVudHMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBzaXplLCAgICAgICAgICAgICAg
ICAgICAvLyBtYXhzZWdzaXplCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgQlVTX0RNQV9B
TExPQ05PVywgICAgICAgLy8gZmxhZ3MKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICBOVUxM
LCBOVUxMLCAgICAgICAgICAgICAvLyBsb2NrZnVuYyw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VmaW5lIE1SU0FTX1RPVVQgICAgICBNUlNBU19PQ1IKKyNkZWZpbmUgTVJTQVNf
QUVOICAgICAgICgxIDw8IDQpCisKKyNkZWZpbmUgbXJzYXNfZHByaW50KHNjLCBsZXZlbCwgbXNn
LCBhcmdzLi4uKSAgICAgICBcCitkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgXAorICAgIGlmIChzYy0+bXJzYXNfZGVidWcgJiBsZXZlbCkgICAgICAg
ICAgICAgICAgICAgIFwKKyAgICAgICAgZGV2aWNlX3ByaW50ZihzYy0+bXJzYXNfZGV2LCBtc2cs
ICMjYXJncyk7ICBcCit9IHdoaWxlICgwKQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBS
YWlkIENvbnRleHQgc3RydWN0dXJlIHdoaWNoIGRlc2NyaWJlcyBNZWdhUkFJRCBzcGVjaWZpYyBJ
TyBQYXJhbWVudGVycworICogVGhpcyByZXNpZGVzIGF0IG9mZnNldCAweDYwIHdoZXJlIHRoZSBT
R0wgbm9ybWFsbHkgc3RhcnRzIGluIE1QVCBJTyBGcmFtZXMKKyAqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
LworCit0eXBlZGVmIHN0cnVjdCBfUkFJRF9DT05URVhUIHsKKyAgICB1X2ludDhfdCAgICAgIFR5
cGU6NDsgICAgICAgICAgICAgLy8gMHgwMAorICAgIHVfaW50OF90ICAgICAgbnNlZzo0OyAgICAg
ICAgICAgICAvLyAweDAwCisgICAgdV9pbnQ4X3QgICAgICByZXN2ZDA7ICAgICAgICAgICAgIC8v
IDB4MDEKKyAgICB1X2ludDE2X3QgICAgIHRpbWVvdXRWYWx1ZTsgICAgICAgLy8gMHgwMiAtMHgw
MworICAgIHVfaW50OF90ICAgICAgcmVnTG9ja0ZsYWdzOyAgICAgICAvLyAweDA0CisgICAgdV9p
bnQ4X3QgICAgICByZXN2ZDE7ICAgICAgICAgICAgIC8vIDB4MDUKKyAgICB1X2ludDE2X3QgICAg
IFZpcnR1YWxEaXNrVGd0SWQ7ICAgLy8gMHgwNiAtMHgwNworICAgIHVfaW50NjRfdCAgICAgcmVn
TG9ja1Jvd0xCQTsgICAgICAvLyAweDA4IC0gMHgwRgorICAgIHVfaW50MzJfdCAgICAgcmVnTG9j
a0xlbmd0aDsgICAgICAvLyAweDEwIC0gMHgxMworICAgIHVfaW50MTZfdCAgICAgbmV4dExNSWQ7
ICAgICAgICAgICAvLyAweDE0IC0gMHgxNQorICAgIHVfaW50OF90ICAgICAgZXhTdGF0dXM7ICAg
ICAgICAgICAvLyAweDE2CisgICAgdV9pbnQ4X3QgICAgICBzdGF0dXM7ICAgICAgICAgICAgIC8v
IDB4MTcgc3RhdHVzCisgICAgdV9pbnQ4X3QgICAgICBSQUlERmxhZ3M7ICAvLyAweDE4IHJlc3Zk
Wzc6Nl0saW9TdWJUeXBlWzU6NF0scmVzdmRbMzoxXSxwcmVmZXJyZWRDcHVbMF0KKyAgICB1X2lu
dDhfdCAgICAgIG51bVNHRTsgICAgICAgIC8vIDB4MTkgbnVtU2dlOyBub3QgaW5jbHVkaW5nIGNo
YWluIGVudHJpZXMgCisgICAgdV9pbnQxNl90ICAgICBjb25maWdTZXFOdW07ICAgLy8gMHgxQSAt
MHgxQgorICAgIHVfaW50OF90ICAgICAgc3BhbkFybTsgICAgICAgICAgICAvLyAweDFDIHNwYW5b
Nzo1XSwgYXJtWzQ6MF0gCisgICAgdV9pbnQ4X3QgICAgICByZXN2ZDJbM107ICAgICAgICAgIC8v
IDB4MUQtMHgxZiAKK30gUkFJRF9DT05URVhUOworCisKKy8qKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBN
UEkyIERlZmluZXMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNkZWZpbmUgTVBJMl9GVU5DVElPTl9J
T0NfSU5JVCAgICAgICAgICAgICAgKDB4MDIpIC8qIElPQyBJbml0ICovCisjZGVmaW5lIE1QSTJf
V0hPSU5JVF9IT1NUX0RSSVZFUiAgICAgICAgICAgICgweDA0KQorI2RlZmluZSBNUEkyX1ZFUlNJ
T05fTUFKT1IgICAgICAgICAgICAgICAgICAoMHgwMikKKyNkZWZpbmUgTVBJMl9WRVJTSU9OX01J
Tk9SICAgICAgICAgICAgICAgICAgKDB4MDApCisjZGVmaW5lIE1QSTJfVkVSU0lPTl9NQUpPUl9N
QVNLICAgICAgICAgICAgICgweEZGMDApCisjZGVmaW5lIE1QSTJfVkVSU0lPTl9NQUpPUl9TSElG
VCAgICAgICAgICAgICg4KQorI2RlZmluZSBNUEkyX1ZFUlNJT05fTUlOT1JfTUFTSyAgICAgICAg
ICAgICAoMHgwMEZGKQorI2RlZmluZSBNUEkyX1ZFUlNJT05fTUlOT1JfU0hJRlQgICAgICAgICAg
ICAoMCkKKyNkZWZpbmUgTVBJMl9WRVJTSU9OICgoTVBJMl9WRVJTSU9OX01BSk9SIDw8IE1QSTJf
VkVSU0lPTl9NQUpPUl9TSElGVCkgfCBcCisgICAgICAgICAgICAgICAgICAgICAgTVBJMl9WRVJT
SU9OX01JTk9SKQorI2RlZmluZSBNUEkyX0hFQURFUl9WRVJTSU9OX1VOSVQgICAgICAgICAgICAo
MHgxMCkKKyNkZWZpbmUgTVBJMl9IRUFERVJfVkVSU0lPTl9ERVYgICAgICAgICAgICAgKDB4MDAp
CisjZGVmaW5lIE1QSTJfSEVBREVSX1ZFUlNJT05fVU5JVF9NQVNLICAgICAgICgweEZGMDApCisj
ZGVmaW5lIE1QSTJfSEVBREVSX1ZFUlNJT05fVU5JVF9TSElGVCAgICAgICg4KQorI2Rl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ICAoMHhEKQorCisjaWZuZGVmIE1QSTJfUE9JTlRFUgorI2RlZmluZSBN
UEkyX1BPSU5URVIgICAgICoKKyNlbmRpZgorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioKKyAqIE1QSTIgU3RydWN0dXJlcworICoqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKi8KKwordHlwZWRlZiBzdHJ1Y3QgX01QSTI1X0lFRUVfU0dFX0NI
QUlONjQKK3sKKyAgICB1X2ludDY0X3QgICAgICAgICAgICAgICAgICAgICBBZGRyZXNzOworICAg
IHVfaW50MzJfdCAgICAgICAgICAgICAgICAgICAgIExlbmd0aDsKKyAgICB1X2ludDE2X3QgICAg
ICAgICAgICAgICAgICAgICBSZXNlcnZlZDE7CisgICAgdV9pbnQ4X3QgICAgICAgICAgICAgICAg
ICAgICAgTmV4dENoYWluT2Zmc2V0OworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAg
IEZsYWdzOworfSBNUEkyNV9JRUVFX1NHRV9DSEFJTjY0LCBNUEkyX1BPSU5URVIgUFRSX01QSTI1
X0lFRUVfU0dFX0NIQUlONjQsCisgICAgTXBpMjVJZWVlU2dlQ2hhaW42NF90LCBNUEkyX1BPSU5U
RVIgcE1waTI1SWVlZVNnZUNoYWluNjRfdDsKKwordHlwZWRlZiBzdHJ1Y3QgX01QSTJfU0dFX1NJ
TVBMRV9VTklPTgoreworICAgIHVfaW50MzJfdCAgICAgICAgICAgIEZsYWdzTGVuZ3RoOworICAg
IHVuaW9uCisgICAgeworICAgICAgICB1X2ludDMyX3QgICAgICAgIEFkZHJlc3MzMjsKKyAgICAg
ICAgdV9pbnQ2NF90ICAgICAgICBBZGRyZXNzNjQ7CisgICAgfSB1OworfSBNUEkyX1NHRV9TSU1Q
TEVfVU5JT04sIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9TR0VfU0lNUExFX1VOSU9OLAorICAgIE1w
aTJTR0VTaW1wbGVVbmlvbl90LCBNUEkyX1BPSU5URVIgcE1waTJTR0VTaW1wbGVVbmlvbl90Owor
Cit0eXBlZGVmIHN0cnVjdAoreworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAgIENE
QlsyMF07ICAgICAgICAgICAgICAgICAgICAvKiAweDAwICovCisgICAgdV9pbnQzMl90ICAgICAg
ICAgICAgICAgICAgICAgUHJpbWFyeVJlZmVyZW5jZVRhZzsgICAgICAgIC8qIDB4MTQgKi8KKyAg
ICB1X2ludDE2X3QgICAgICAgICAgICAgICAgICAgICBQcmltYXJ5QXBwbGljYXRpb25UYWc7ICAg
ICAgLyogMHgxOCAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICAgICAgICAgIFByaW1hcnlB
cHBsaWNhdGlvblRhZ01hc2s7ICAvKiAweDFBICovCisgICAgdV9pbnQzMl90ICAgICAgICAgICAg
ICAgICAgICAgVHJhbnNmZXJMZW5ndGg7ICAgICAgICAgICAgIC8qIDB4MUMgKi8KK30gTVBJMl9T
Q1NJX0lPX0NEQl9FRURQMzIsIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9TQ1NJX0lPX0NEQl9FRURQ
MzIsCisgICAgTXBpMlNjc2lJb0NkYkVlZHAzMl90LCBNUEkyX1BPSU5URVIgcE1waTJTY3NpSW9D
ZGJFZWRwMzJfdDsKKwordHlwZWRlZiBzdHJ1Y3QgX01QSTJfU0dFX0NIQUlOX1VOSU9OCit7Cisg
ICAgdV9pbnQxNl90ICAgICAgICAgICAgICAgICAgICAgTGVuZ3RoOworICAgIHVfaW50OF90ICAg
ICAgICAgICAgICAgICAgICAgIE5leHRDaGFpbk9mZnNldDsKKyAgICB1X2ludDhfdCAgICAgICAg
ICAgICAgICAgICAgICBGbGFnczsKKyAgICB1bmlvbgorICAgIHsKKyAgICAgICAgdV9pbnQzMl90
ICAgICAgICAgICAgICAgICBBZGRyZXNzMzI7CisgICAgICAgIHVfaW50NjRfdCAgICAgICAgICAg
ICAgICAgQWRkc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BJZWVlU2ltcGxlOworICAgIE1QSTJf
SUVFRV9TR0VfQ0hBSU5fVU5JT04gICBJZWVlQ2hhaW47Cit9IE1QSTJfU0dFX0lPX1VOSU9OLCBN
UEkyX1BPSU5URVIgUFRSX01QSTJfU0dFX0lPX1VOSU9OLAorICAgIE1waTJTR0VJT1VuaW9uX3Qs
IE1QSTJfUE9JTlRFUiBwTXBpMlNHRUlPVW5pb25fdDsKKwordHlwZWRlZiB1bmlvbgoreworICAg
IHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAgIENEQjMyWzMyXTsKKyAgICBNUEkyX1NDU0lf
SU9fQ0RCX0VFRFAzMiBFRURQMzI7CisgICAgTVBJMl9TR0VfU0lNUExFX1VOSU9OICAgU0dFOwor
fSBNUEkyX1NDU0lfSU9fQ0RCX1VOSU9OLCBNUEkyX1BPSU5URVIgUFRSX01QSTJfU0NTSV9JT19D
REJfVU5JT04sCisgICAgTXBpMlNjc2lJb0NkYl90LCBNUEkyX1BPSU5URVIgcE1waTJTY3NpSW9D
ZGJfdDsKKworLyoKKyAqIFJBSUQgU0NTSSBJTyBSZXF1ZXN0IE1lc3NhZ2UKKyAqIFRvdGFsIFNH
RSBjb3VudCB3aWxsIGJlIG9uZSBsZXNzIHRoYW4gIF9NUEkyX1NDU0lfSU9fUkVRVUVTVAorICov
Cit0eXBlZGVmIHN0cnVjdCBfTVBJMl9SQUlEX1NDU0lfSU9fUkVRVUVTVAoreworICAgIHVfaW50
MTZfdCAgICAgICAgICAgICAgICAgICAgIERldkhhbmRsZTsgICAgICAgICAgICAgICAgICAgICAg
LyogMHgwMCAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAgIENoYWluT2Zmc2V0
OyAgICAgICAgICAgICAgICAgICAgLyogMHgwMiAqLworICAgIHVfaW50OF90ICAgICAgICAgICAg
ICAgICAgICAgIEZ1bmN0aW9uOyAgICAgICAgICAgICAgICAgICAgICAgLyogMHgwMyAqLworICAg
IHVfaW50MTZfdCAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgICAgICAg
ICAgICAgLyogMHgwNCAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAgIFJlc2Vy
dmVkMjsgICAgICAgICAgICAgICAgICAgICAgLyogMHgwNiAqLworICAgIHVfaW50OF90ICAgICAg
ICAgICAgICAgICAgICAgIE1zZ0ZsYWdzOyAgICAgICAgICAgICAgICAgICAgICAgLyogMHgwNyAq
LworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAgIFZQX0lEOyAgICAgICAgICAgICAg
ICAgICAgICAgICAgLyogMHgwOCAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAg
IFZGX0lEOyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogMHgwOSAqLworICAgIHVfaW50MTZf
dCAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMzsgICAgICAgICAgICAgICAgICAgICAgLyog
MHgwQSAqLworICAgIHVfaW50MzJfdCAgICAgICAgICAgICAgICAgICAgIFNlbnNlQnVmZmVyTG93
QWRkcmVzczsgICAgICAgICAgLyogMHgwQyAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICAg
ICAgICAgIFNHTEZsYWdzOyAgICAgICAgICAgICAgICAgICAgICAgLyogMHgxMCAqLworICAgIHVf
aW50OF90ICAgICAgICAgICAgICAgICAgICAgIFNlbnNlQnVmZmVyTGVuZ3RoOyAgICAgICAgICAg
ICAgLyogMHgxMiAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVk
NDsgICAgICAgICAgICAgICAgICAgICAgLyogMHgxMyAqLworICAgIHVfaW50OF90ICAgICAgICAg
ICAgICAgICAgICAgIFNHTE9mZnNldDA7ICAgICAgICAgICAgICAgICAgICAgLyogMHgxNCAqLwor
ICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAgIFNHTE9mZnNldDE7ICAgICAgICAgICAg
ICAgICAgICAgLyogMHgxNSAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAgIFNH
TE9mZnNldDI7ICAgICAgICAgICAgICAgICAgICAgLyogMHgxNiAqLworICAgIHVfaW50OF90ICAg
ICAgICAgICAgICAgICAgICAgIFNHTE9mZnNldDM7ICAgICAgICAgICAgICAgICAgICAgLyogMHgx
NyAqLworICAgIHVfaW50MzJfdCAgICAgICAgICAgICAgICAgICAgIFNraXBDb3VudDsgICAgICAg
ICAgICAgICAgICAgICAgLyogMHgxOCAqLworICAgIHVfaW50MzJfdCAgICAgICAgICAgICAgICAg
ICAgIERhdGFMZW5ndGg7ICAgICAgICAgICAgICAgICAgICAgLyogMHgxQyAqLworICAgIHVfaW50
MzJfdCAgICAgICAgICAgICAgICAgICAgIEJpZGlyZWN0aW9uYWxEYXRhTGVuZ3RoOyAgICAgICAg
LyogMHgyMCAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICAgICAgICAgIElvRmxhZ3M7ICAg
ICAgICAgICAgICAgICAgICAgICAgLyogMHgyNCAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAg
ICAgICAgICAgIEVFRFBGbGFnczsgICAgICAgICAgICAgICAgICAgICAgLyogMHgyNiAqLworICAg
IHVfaW50MzJfdCAgICAgICAgICAgICAgICAgICAgIEVFRFBCbG9ja1NpemU7ICAgICAgICAgICAg
ICAgICAgLyogMHgyOCAqLworICAgIHVfaW50MzJfdCAgICAgICAgICAgICAgICAgICAgIFNlY29u
ZGFyeVJlZmVyZW5jZVRhZzsgICAgICAgICAgLyogMHgyQyAqLworICAgIHVfaW50MTZfdCAgICAg
ICAgICAgICAgICAgICAgIFNlY29uZGFyeUFwcGxpY2F0aW9uVGFnOyAgICAgICAgLyogMHgzMCAq
LworICAgIHVfaW50MTZfdCAgICAgICAgICAgICAgICAgICAgIEFwcGxpY2F0aW9uVGFnVHJhbnNs
YXRpb25NYXNrOyAgLyogMHgzMiAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICAgICAgICAg
IExVTls4XTsgICAgICAgICAgICAgICAgICAgICAgICAgLyogMHgzNCAqLworICAgIHVfaW50MzJf
dCAgICAgICAgICAgICAgICAgICAgIENvbnRyb2w7ICAgICAgICAgICAgICAgICAgICAgICAgLyog
MHgzQyAqLworICAgIE1QSTJfU0NTSV9JT19DREJfVU5JT04gIENEQjsgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgLyogMHg0MCAqLworICAgIFJBSURfQ09OVEVYVCAgICAgICAgICAgIFJhaWRD
b250ZXh0OyAgICAgICAgICAgICAgICAgICAgLyogMHg2MCAqLworICAgIE1QSTJfU0dFX0lPX1VO
SU9OICAgICAgIFNHTDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogMHg4MCAqLworfSBN
UlNBU19SQUlEX1NDU0lfSU9fUkVRVUVTVCwgTVBJMl9QT0lOVEVSIFBUUl9NUlNBU19SQUlEX1ND
U0lfSU9fUkVRVUVTVCwKKyAgICBNUlNBU1JhaWRTQ1NJSU9SZXF1ZXN0X3QsIE1QSTJfUE9JTlRF
UiBwTVJTQVNSYWlkU0NTSUlPUmVxdWVzdF90OworCisvKgorICogTVBUIFJBSUQgTUZBIElPIERl
c2NyaXB0b3IuCisgKi8KK3R5cGVkZWYgc3RydWN0IF9NUlNBU19SQUlEX01GQV9JT19ERVNDUklQ
VE9SIHsKKyAgICB1X2ludDMyX3QgICAgIFJlcXVlc3RGbGFncyAgICA6IDg7CisgICAgdV9pbnQz
Ml90ICAgICBNZXNzYWdlQWRkcmVzczEgOiAyNDsgLyogYml0cyAzMTo4Ki8KKyAgICB1X2ludDMy
X3QgICAgIE1lc3NhZ2VBZGRyZXNzMjsgICAgICAvKiBiaXRzIDYxOjMyICovCit9IE1SU0FTX1JB
SURfTUZBX0lPX1JFUVVFU1RfREVTQ1JJUFRPUiwqUE1SU0FTX1JBSURfTUZBX0lPX1JFUVVFU1Rf
REVTQ1JJUFRPUjsKKworLyogRGVmYXVsdCBSZXF1ZXN0IERlc2NyaXB0b3IgKi8KK3R5cGVkZWYg
c3RydWN0IF9NUEkyX0RFRkFVTFRfUkVRVUVTVF9ERVNDUklQVE9SCit7CisgICAgdV9pbnQ4X3Qg
ICAgICAgICAgICAgIFJlcXVlc3RGbGFnczsgICAgICAgICAgICAgICAvKiAweDAwICovCisgICAg
dV9pbnQ4X3QgICAgICAgICAgICAgIE1TSXhJbmRleDsgICAgICAgICAgICAgICAgICAvKiAweDAx
ICovCisgICAgdV9pbnQxNl90ICAgICAgICAgICAgIFNNSUQ7ICAgICAgICAgICAgICAgICAgICAg
ICAvKiAweDAyICovCisgICAgdV9pbnQxNl90ICAgICAgICAgICAgIExNSUQ7ICAgICAgICAgICAg
ICAgICAgICAgICAvKiAweDA0ICovCisgICAgdV9pbnQxNl90ICAgICAgICAgICAgIERlc2NyaXB0
b3JUeXBlRGVwZW5kZW50OyAgICAvKiAweDA2ICovCit9IE1QSTJfREVGQVVMVF9SRVFVRVNUX0RF
U0NSSVBUT1IsCisgICAgTVBJMl9QT0lOVEVSIFBUUl9NUEkyX0RFRkFVTFRfUkVRVUVTVF9ERVND
UklQVE9SLAorICAgIE1waTJEZWZhdWx0UmVxdWVzdERlc2NyaXB0b3JfdCwgTVBJMl9QT0lOVEVS
IHBNcGkyRGVmYXVsdFJlcXVlc3REZXNjcmlwdG9yX3Q7CisgICAgCisvKiBIaWdoIFByaW9yaXR5
IFJlcXVlc3QgRGVzY3JpcHRvciAqLwordHlwZWRlZiBzdHJ1Y3QgX01QSTJfSElHSF9QUklPUklU
WV9SRVFVRVNUX0RFU0NSSVBUT1IKK3sKKyAgICB1X2ludDhfdCAgICAgICAgICAgICAgUmVxdWVz
dEZsYWdzOyAgICAgICAgICAgICAgIC8qIDB4MDAgKi8KKyAgICB1X2ludDhfdCAgICAgICAgICAg
ICAgTVNJeEluZGV4OyAgICAgICAgICAgICAgICAgIC8qIDB4MDEgKi8KKyAgICB1X2ludDE2X3Qg
ICAgICAgICAgICAgU01JRDsgICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MDIgKi8KKyAgICB1
X2ludDE2X3QgICAgICAgICAgICAgTE1JRDsgICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MDQg
Ki8KKyAgICB1X2ludDE2X3QgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgICAg
IC8qIDB4MDYgKi8KK30gTVBJMl9ISUdIX1BSSU9SSVRZX1JFUVVFU1RfREVTQ1JJUFRPUiwKKyAg
ICBNUEkyX1BPSU5URVIgUFRSX01QSTJfSElHSF9QUklPUklUWV9SRVFVRVNUX0RFU0NSSVBUT1Is
CisgICAgTXBpMkhpZ2hQcmlvcml0eVJlcXVlc3REZXNjcmlwdG9yX3QsCisgICAgTVBJMl9QT0lO
VEVSIHBNcGkySGlnaFByaW9yaXR5UmVxdWVzdERlc2NyaXB0b3JfdDsKKyAgICAKKy8qIFNDU0kg
SU8gUmVxdWVzdCBEZXNjcmlwdG9yICovCit0eXBlZGVmIHN0cnVjdCBfTVBJMl9TQ1NJX0lPX1JF
UVVFU1RfREVTQ1JJUFRPUgoreworICAgIHVfaW50OF90ICAgICAgICAgICAgICBSZXF1ZXN0Rmxh
Z3M7ICAgICAgICAgICAgICAgLyogMHgwMCAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICBN
U0l4SW5kZXg7ICAgICAgICAgICAgICAgICAgLyogMHgwMSAqLworICAgIHVfaW50MTZfdCAgICAg
ICAgICAgICBTTUlEOyAgICAgICAgICAgICAgICAgICAgICAgLyogMHgwMiAqLworICAgIHVfaW50
MTZfdCAgICAgICAgICAgICBMTUlEOyAgICAgICAgICAgICAgICAgICAgICAgLyogMHgwNCAqLwor
ICAgIHVfaW50MTZfdCAgICAgICAgICAgICBEZXZIYW5kbGU7ICAgICAgICAgICAgICAgICAgLyog
MHgwNiAqLworfSBNUEkyX1NDU0lfSU9fUkVRVUVTVF9ERVNDUklQVE9SLAorICAgIE1QSTJfUE9J
TlRFUiBQVFJfTVBJMl9TQ1NJX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UFRPUgoreworICAgIHVfaW50OF90
ICAgICAgICAgICAgICBSZXF1ZXN0RmxhZ3M7ICAgICAgICAgICAgICAgLyogMHgwMCAqLworICAg
IHVfaW50OF90ICAgICAgICAgICAgICBNU0l4SW5kZXg7ICAgICAgICAgICAgICAgICAgLyogMHgw
MSAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICBTTUlEOyAgICAgICAgICAgICAgICAgICAg
ICAgLyogMHgwMiAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICBMTUlEOyAgICAgICAgICAg
ICAgICAgICAgICAgLyogMHgwNCAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICBSZXNlcnZl
ZDsgICAgICAgICAgICAgICAgICAgLyogMHgwNiAqLworfSBNUEkyX1JBSURfQUNDRUxfUkVRVUVT
VF9ERVNDUklQVE9SLAorICAgIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9SQUlEX0FDQ0VMX1JFUVVF
U1RfREVTQ1JJUFRPUiwKKyAgICBNcGkyUkFJREFjY2VsZXJhdG9yUmVxdWVzdERlc2NyaXB0b3Jf
dCwKKyAgICBNUEkyX1BPSU5URVIgcE1waTJSQUlEQWNjZWxlcmF0b3JSZXF1ZXN0RGVzY3JpcHRv
cl90OworCisvKiB1bmlvbiBvZiBSZXF1ZXN0IERlc2NyaXB0b3JzICovCit0eXBlZGVmIHVuaW9u
IF9NUlNBU19SRVFVRVNUX0RFU0NSSVBUT1JfVU5JT04KK3sKKyAgICBNUEkyX0RFRkFVTFRfUkVR
VUVTVF9ERVNDUklQVE9SICAgICAgICAgICAgIERlZmF1bHQ7CisgICAgTVBJMl9ISUdIX1BSSU9S
SVRZX1JFUVVFU1RfREVTQ1JJUFRPUiAgICAgICBIaWdoUHJpb3JpdHk7CisgICAgTVBJMl9TQ1NJ
X0lPX1JFUVVFU1RfREVTQ1JJUFRPUiAgICAgICAgICAgICBTQ1NJSU87CisgICAgTVBJMl9TQ1NJ
X1RBUkdFVF9SRVFVRVNUX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5RGVzY3JpcHRvcl90Owor
CisvKiBBZGRyZXNzIFJlcGx5IERlc2NyaXB0b3IgKi8KK3R5cGVkZWYgc3RydWN0IF9NUEkyX0FE
RFJFU1NfUkVQTFlfREVTQ1JJUFRPUgoreworICAgIHVfaW50OF90ICAgICAgICAgICAgICBSZXBs
eUZsYWdzOyAgICAgICAgICAgICAgICAgLyogMHgwMCAqLworICAgIHVfaW50OF90ICAgICAgICAg
ICAgICBNU0l4SW5kZXg7ICAgICAgICAgICAgICAgICAgLyogMHgwMSAqLworICAgIHVfaW50MTZf
dCAgICAgICAgICAgICBTTUlEOyAgICAgICAgICAgICAgICAgICAgICAgLyogMHgwMiAqLworICAg
IHVfaW50MzJfdCAgICAgICAgICAgICBSZXBseUZyYW1lQWRkcmVzczsgICAgICAgICAgLyogMHgw
NCAqLworfSBNUEkyX0FERFJFU1NfUkVQTFlfREVTQ1JJUFRPUiwgTVBJMl9QT0lOVEVSIFBUUl9N
UEkyX0FERFJFU1NfUkVQTFlfREVTQ1JJUFRPUiwKKyAgICBNcGkyQWRkcmVzc1JlcGx5RGVzY3Jp
cHRvcl90LCBNUEkyX1BPSU5URVIgcE1waTJBZGRyZXNzUmVwbHlEZXNjcmlwdG9yX3Q7CisKKy8q
IFNDU0kgSU8gU3VjY2VzcyBSZXBseSBEZXNjcmlwdG9yICovCit0eXBlZGVmIHN0cnVjdCBfTVBJ
Ml9TQ1NJX0lPX1NVQ0NFU1NfUkVQTFlfREVTQ1JJUFRPUgoreworICAgIHVfaW50OF90ICAgICAg
ICAgICAgICBSZXBseUZsYWdzOyAgICAgICAgICAgICAgICAgLyogMHgwMCAqLworICAgIHVfaW50
OF90ICAgICAgICAgICAgICBNU0l4SW5kZXg7ICAgICAgICAgICAgICAgICAgLyogMHgwMSAqLwor
ICAgIHVfaW50MTZfdCAgICAgICAgICAgICBTTUlEOyAgICAgICAgICAgICAgICAgICAgICAgLyog
MHgwMiAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICBUYXNrVGFnOyAgICAgICAgICAgICAg
ICAgICAgLyogMHgwNCAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICBSZXNlcnZlZDE7ICAg
ICAgICAgICAgICAgICAgLyogMHgwNiAqLworfSBNUEkyX1NDU0lfSU9fU1VDQ0VTU19SRVBMWV9E
RVNDUklQVE9SLAorICAgIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9TQ1NJX0lPX1NVQ0NFU1NfUkVQ
TFlfREVTQ1JJUFRPUiwKKyAgICBNcGkyU0NTSUlPU3VjY2Vzc1JlcGx5RGVzY3JpcHRvcl90LAor
ICAgIE1QSTJfUE9JTlRFUiBwTXBpMlNDU0lJT1N1Y2Nlc3NSZXBseURlc2NyaXB0b3JfdDsKKwor
LyogVGFyZ2V0QXNzaXN0IFN1Y2Nlc3MgUmVwbHkgRGVzY3JpcHRvciAqLwordHlwZWRlZiBzdHJ1
Y3QgX01QSTJfVEFSR0VUQVNTSVNUX1NVQ0NFU1NfUkVQTFlfREVTQ1JJUFRPUgoreworICAgIHVf
aW50OF90ICAgICAgICAgICAgICBSZXBseUZsYWdzOyAgICAgICAgICAgICAgICAgLyogMHgwMCAq
LworICAgIHVfaW50OF90ICAgICAgICAgICAgICBNU0l4SW5kZXg7ICAgICAgICAgICAgICAgICAg
LyogMHgwMSAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICBTTUlEOyAgICAgICAgICAgICAg
ICAgICAgICAgLyogMHgwMiAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICBTZXF1ZW5jZU51
bWJlcjsgICAgICAgICAgICAgLyogMHgwNCAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICBS
ZXNlcnZlZDE7ICAgICAgICAgICAgICAgICAgLyogMHgwNSAqLworICAgIHVfaW50MTZfdCAgICAg
ICAgICAgICBJb0luZGV4OyAgICAgICAgICAgICAgICAgICAgLyogMHgwNiAqLworfSBNUEkyX1RB
UkdFVEFTU0lTVF9TVUNDRVNTX1JFUExZX0RFU0NSSVBUT1IsCisgICAgTVBJMl9QT0lOVEVSIFBU
Ul9NUEkyX1RBUkdFVEFTU0lTVF9TVUNDRVNTX1JFUExZX0RFU0NSSVBUT1IsCisgICAgTXBpMlRh
cmdldEFzc2lzdFN1Y2Nlc3NSZXBseURlc2NyaXB0b3JfdCwKKyAgICBNUEkyX1BPSU5URVIgcE1w
aTJUYXJnZXRBc3Npc3RTdWNjZXNzUmVwbHlEZXNjcmlwdG9yX3Q7CisKKy8qIFRhcmdldCBDb21t
YW5kIEJ1ZmZlciBSZXBseSBEZXNjcmlwdG9yICovCit0eXBlZGVmIHN0cnVjdCBfTVBJMl9UQVJH
RVRfQ09NTUFORF9CVUZGRVJfUkVQTFlfREVTQ1JJUFRPUgoreworICAgIHVfaW50OF90ICAgICAg
ICAgICAgICBSZXBseUZsYWdzOyAgICAgICAgICAgICAgICAgLyogMHgwMCAqLworICAgIHVfaW50
OF90ICAgICAgICAgICAgICBNU0l4SW5kZXg7ICAgICAgICAgICAgICAgICAgLyogMHgwMSAqLwor
ICAgIHVfaW50OF90ICAgICAgICAgICAgICBWUF9JRDsgICAgICAgICAgICAgICAgICAgICAgLyog
MHgwMiAqLworICAgIHVfaW50OF90ICAgICAgICAgICAgICBGbGFnczsgICAgICAgICAgICAgICAg
ICAgICAgLyogMHgwMyAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICBJbml0aWF0b3JEZXZI
YW5kbGU7ICAgICAgICAgLyogMHgwNCAqLworICAgIHVfaW50MTZfdCAgICAgICAgICAgICBJb0lu
ZGV4OyAgICAgICAgICAgICAgICAgICAgLyogMHgwNiAqLworfSBNUEkyX1RBUkdFVF9DT01NQU5E
X0JVRkZFUl9SRVBMWV9ERVNDUklQVE9SLAorICAgIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9UQVJH
RVRfQ09NTUFORF9CVUZGRVJfUkVQTFlfREVTQ1JJUFRPUiwKKyAgICBNcGkyVGFyZ2V0Q29tbWFu
ZEJ1ZmZlcl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No
YWRkX2ludCgmKHYpLT52YWwsIC0xKQorI2RlZmluZSBhdG9taWNfaW5jKHYpICAgYXRvbWljX2Zl
dGNoYWRkX2ludCgmKHYpLT52YWwsIDEpCisKKy8qIElPQ0luaXQgUmVxdWVzdCBtZXNzYWdlICov
Cit0eXBlZGVmIHN0cnVjdCBfTVBJMl9JT0NfSU5JVF9SRVFVRVNUCit7CisgICAgdV9pbnQ4X3Qg
ICAgICAgICAgICAgICAgICAgICAgV2hvSW5pdDsgICAgICAgICAgICAgICAgICAgICAgICAvKiAw
eDAwICovCisgICAgdV9pbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAg
ICAgICAgICAgICAgICAgICAvKiAweDAxICovCisgICAgdV9pbnQ4X3QgICAgICAgICAgICAgICAg
ICAgICAgQ2hhaW5PZmZzZXQ7ICAgICAgICAgICAgICAgICAgICAvKiAweDAyICovCisgICAgdV9p
bnQ4X3QgICAgICAgICAgICAgICAgICAgICAgRnVuY3Rpb247ICAgICAgICAgICAgICAgICAgICAg
ICAvKiAweDAzICovCisgICAgdV9pbnQxNl90ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQy
OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDA0ICovCisgICAgdV9pbnQ4X3QgICAgICAgICAg
ICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAgICAgICAgICAgICAvKiAweDA2ICovCisg
ICAgdV9pbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgTXNnRmxhZ3M7ICAgICAgICAgICAgICAg
ICAgICAgICAvKiAweDA3ICovCisgICAgdV9pbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgVlBf
SUQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDA4ICovCisgICAgdV9pbnQ4X3QgICAg
ICAgICAgICAgICAgICAgICAgVkZfSUQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAweDA5
ICovCisgICAgdV9pbnQxNl90ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ0OyAgICAgICAg
ICAgICAgICAgICAgICAvKiAweDBBICovCisgICAgdV9pbnQxNl90ICAgICAgICAgICAgICAgICAg
ICAgTXNnVmVyc2lvbjsgICAgICAgICAgICAgICAgICAgICAvKiAweDBDICovCisgICAgdV9pbnQx
Nl90ICAgICAgICAgICAgICAgICAgICAgSGVhZGVyVmVyc2lvbjsgICAgICAgICAgICAgICAgICAv
KiAweDBFICovCisgICAgdV9pbnQzMl90ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ1OyAg
ICAgICAgICAgICAgICAgICAgICAvKiAweDEwICovCisgICAgdV9pbnQxNl90ICAgICAgICAgICAg
ICAgICAgICAgUmVzZXJ2ZWQ2OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDE0ICovCisgICAg
dV9pbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ3OyAgICAgICAgICAgICAgICAg
ICAgICAvKiAweDE2ICovCisgICAgdV9pbnQ4X3QgICAgICAgICAgICAgICAgICAgICAgSG9zdE1T
SXhWZWN0b3JzOyAgICAgICAgICAgICAgICAvKiAweDE3ICovCisgICAgdV9pbnQxNl90ICAgICAg
ICAgICAgICAgICAgICAgUmVzZXJ2ZWQ4OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDE4ICov
CisgICAgdV9pbnQxNl90ICAgICAgICAgICAgICAgICAgICAgU3lzdGVtUmVxdWVzdEZyYW1lU2l6
ZTsgICAgICAgICAvKiAweDFBICovCisgICAgdV9pbnQxNl90ICAgICAgICAgICAgICAgICAgICAg
UmVwbHlEZXNjcmlwdG9yUG9zdFF1ZXVlRGVwdGg7ICAvKiAweDFDICovCisgICAgdV9pbnQxNl90
ICAgICAgICAgICAgICAgICAgICAgUmVwbHlGcmVlUXVldWVEZXB0aDsgICAgICAgICAgICAvKiAw
eDFFICovCisgICAgdV9pbnQzMl90ICAgICAgICAgICAgICAgICAgICAgU2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X0RFVl9IQU5ETEVfSU5GTzsgICAg
CisgCit0eXBlZGVmIHN0cnVjdCBfTVJfQVJSQVlfSU5GTyB7CisgICAgdV9pbnQxNl90ICAgICAg
cGRbTUFYX1JBSURNQVBfUk9XX1NJWkVdOworfSBNUl9BUlJBWV9JTkZPOyAgICAgICAgICAgICAg
ICAgICAgICAgLy8gMHg0MCwgVG90YWwgU2l6ZQorIAordHlwZWRlZiBzdHJ1Y3QgX01SX1FVQURf
RUxFTUVOVCB7CisgICAgdV9pbnQ2NF90ICAgICBsb2dTdGFydDsgICAgICAgICAgICAgICAgICAg
Ly8gMHgwMAorICAgIHVfaW50NjRfdCAgICAgbG9nRW5kOyAgICAgICAgICAgICAgICAgICAgIC8v
IDB4MDgKKyAgICB1X2ludDY0X3QgICAgIG9mZnNldEluU3BhbjsgICAgICAgICAgICAgICAvLyAw
eDEwCisgICAgdV9pbnQzMl90ICAgICBkaWZmOyAgICAgICAgICAgICAgICAgICAgICAgLy8gMHgx
OAorICAgIHVfaW50MzJfdCAgICAgcmVzZXJ2ZWQxOyAgICAgICAgICAgICAgICAgIC8vIDB4MUMK
K30gTVJfUVVBRF9FTEVNRU5UOyAgICAgICAgICAgICAgICAgICAgICAvLyAweDIwLCBUb3RhbCBz
aXplCisgCit0eXBlZGVmIHN0cnVjdCBfTVJfU1BBTl9JTkZPIHsKKyAgICB1X2ludDMyX3QgICAg
ICAgICAgICAgbm9FbGVtZW50czsgICAgICAgICAgICAgLy8gMHgwMAorICAgIHVfaW50MzJfdCAg
ICAgICAgICAgICByZXNlcnZlZDE7ICAgICAgICAgICAgICAvLyAweDA0CisgICAgTVJfUVVBRF9F
TEVNRU5UIHF1YWRbTUFYX1JBSURNQVBfU1BBTl9ERVBUSF07ICAgLy8gMHgwOAorfSBNUl9TUEFO
X0lORk87ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAweDEwOCwgVG90YWwgc2l6ZQor
ICAgIAordHlwZWRlZiBzdHJ1Y3QgX01SX0xEX1NQQU5fIHsgICAgICAgICAgIC8vIFNQQU4gc3Ry
dWN0dXJlCisgICAgdV9pbnQ2NF90ICAgICAgc3RhcnRCbGs7ICAgICAgICAgICAgICAgICAgLy8g
MHgwMCwgc3RhcnRpbmcgYmxvY2sgbnVtYmVyIGluIGFycmF5CisgICAgdV9pbnQ2NF90ICAgICAg
bnVtQmxrczsgICAgICAgICAgICAgICAgICAgLy8gMHgwOCwgbnVtYmVyIG9mIGJsb2NrcworICAg
IHVfaW50MTZfdCAgICAgIGFycmF5UmVmOyAgICAgICAgICAgICAgICAgIC8vIDB4MTAsIGFycmF5
IHJlZmVyZW5jZQorICAgIHVfaW50OF90ICAgICAgIHJlc2VydmVkWzZdOyAgICAgICAgICAgICAg
IC8vIDB4MTIKK30gTVJfTERfU1BBTjsgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAweDE4
LCBUb3RhbCBTaXplCisKK3R5cGVkZWYgc3RydWN0IF9NUl9TUEFOX0JMT0NLX0lORk8geworICAg
IHVfaW50NjRfdCAgICAgICAgICBudW1fcm93czsgICAgICAgICAgICAgLy8gbnVtYmVyIG9mIHJv
d3Mvc3BhbgorICAgIE1SX0xEX1NQQU4gICBzcGFuOyAgICAgICAgICAgICAgICAgLy8gMHgwOAor
ICAgIE1SX1NQQU5fSU5GTyBibG9ja19zcGFuX2luZm87ICAgICAgLy8gMHgyMAorfSBNUl9TUEFO
X0JMT0NLX0lORk87CisKK3R5cGVkZWYgc3RydWN0IF9NUl9MRF9SQUlEIHsKKyAgICBzdHJ1Y3Qg
eworICAgICAgICB1X2ludDMyX3QgICAgIGZwQ2FwYWJsZSAgICAgICAgICAgOjE7CisgICAgICAg
IHVfaW50MzJfdCAgICAgcmVzZXJ2ZWQ1ICAgICAgICAgICA6MzsKKyAgICAgICAgdV9pbnQzMl90
ICAgICBsZFBpTW9kZSAgICAgICAgICAgIDo0OworICAgICAgICB1X2ludDMyX3QgICAgIHBkUGlN
b2RlICAgICAgICAgICAgOjQ7IC8v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IG51bUJs
b2NrczsKKyAgICB1X2ludDE2X3QgbGRUZ3RJZDsKKyAgICB1X2ludDhfdCBpc1JlYWQ7CisgICAg
dV9pbnQxNl90IGRldkhhbmRsZTsKKyAgICB1X2ludDY0X3QgcGRCbG9jazsKKyAgICB1X2ludDhf
dCBmcE9rRm9ySW87Cit9OworCit0eXBlZGVmIHN0cnVjdCBfTVJfTERfVEFSR0VUX1NZTkMgewor
ICAgIHVfaW50OF90ICB0YXJnZXRJZDsKKyAgICB1X2ludDhfdCAgcmVzZXJ2ZWQ7CisgICAgdV9p
bnQxNl90IHNlcU51bTsKK30gTVJfTERfVEFSR0VUX1NZTkM7CisKKyNkZWZpbmUgSUVFRV9TR0Vf
RkxBR1NfQUREUl9NQVNLICAgICAgICAgICAgKDB4MDMpCisjZGVmaW5lIElFRUVfU0dFX0ZMQUdT
X1NZU1RFTV9BRERSICAgICAgICAgICgweDAwKQorI2RlZmluZSBJRUVFX1NHRV9GTEFHU19JT0NE
RFJfQUREUiAgICAgICAgICAoMHgwMSkKKyNkZWZpbmUgSUVFRV9TR0VfRkxBR1NfSU9DUExCX0FE
RFIgICAgICAgICAgKDB4MDIpCisjZGVmaW5lIElFRUVfU0dFX0ZMQUdTX0lPQ1BMQk5UQV9BRERS
ICAgICAgICgweDAzKQorI2RlZmluZSBJRUVFX1NHRV9GTEFHU19DSEFJTl9FTEVNRU5UICAgICAg
ICAoMHg4MCkKKyNkZWZpbmUgSUVFRV9TR0VfRkxBR1NfRU5EX09GX0xJU1QgICAgICAgICAgKDB4
NDApCisKK3VuaW9uIGRlc2NfdmFsdWUgeworICAgIHVfaW50NjRfdCB3b3JkOworICAgIHN0cnVj
dCB7CisgICAgICAgIHVfaW50MzJfdCBsb3c7CisgICAgICAgIHVfaW50MzJfdCBoaWdoOworICAg
IH0gdTsKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqIAorICogVGVtcG9yYXJ5IGNvbW1hbmQgCisgKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKiovCitzdHJ1Y3QgbXJzYXNfdG1wX2RjbWQgeworICAgIGJ1c19kbWFfdGFnX3QgICAgICB0
bXBfZGNtZF90YWc7ICAgIC8vIHRhZyBmb3IgdG1wIERNQ0QgY21kICAKKyAgICBidXNfZG1hbWFw
X3QgICAgICAgdG1wX2RjbWRfZG1hbWFwOyAvLyBkbWFtYXAgZm9yIHRtcCBEQ01EIGNtZCAKKyAg
ICB2b2lkICAgICAgICAgICAgICAgKnRtcF9kY21kX21lbTsgICAvLyB2aXJ0dWFsIGFkZHIgb2Yg
dG1wIERDTUQgY21kIAorICAgIGJ1c19hZGRyX3QgICAgICAgICB0bXBfZGNtZF9waHlzX2FkZHI7
IC8vcGh5c2ljYWwgYWRkciBvZiB0bXAgRENNRCAKK307CisKKy8qKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqIAorICogUmVn
aXN0ZXIgc2V0LCBpbmNsdWRlZCBsZWdhY3kgY29udHJvbGxlcnMgMTA2OCBhbmQgMTA3OCwgCisg
KiBzdHJ1Y3R1cmUgZXh0ZW5kZWQgZm9yIDEwNzggcmVnaXN0ZXJzCisgKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisj
cHJhZ21hIHBhY2soMSkKK3R5cGVkZWYgc3RydWN0IF9tcnNhc19yZWdpc3Rlcl9zZXQgeworICAg
IHVfaW50MzJfdCAgICAgZG9vcmJlbGw7ICAgICAgICAgICAgICAgICAgICAgICAvKjAwMDBoKi8K
KyAgICB1X2ludDMyX3QgICAgIGZ1c2lvbl9zZXFfb2Zmc2V0OyAgICAgICAgICAgICAgLyowMDA0
aCovCisgICAgdV9pbnQzMl90ICAgICBmdXNpb25faG9zdF9kaWFnOyAgICAgICAgICAgICAgIC8q
MDAwOGgqLworICAgIHVfaW50MzJfdCAgICAgcmVzZXJ2ZWRfMDE7ICAgICAgICAgICAgICAgICAg
ICAvKjAwMENoKi8KKworICAgIHVfaW50MzJfdCAgICAgaW5ib3VuZF9tc2dfMDsgICAgICAgICAg
ICAgICAgICAvKjAwMTBoKi8KKyAgICB1X2ludDMyX3QgICAgIGluYm91bmRfbXNnXzE7ICAgICAg
ICAgICAgICAgICAgLyowMDE0aCovCisgICAgdV9pbnQzMl90ICAgICBvdXRib3VuZF9tc2dfMDsg
ICAgICAgICAgICAgICAgIC8qMDAxOGgqLworICAgIHVfaW50MzJfdCAgICAgb3V0Ym91bmRfbXNn
XzE7ICAgICAgICAgICAgICAgICAvKjAwMUNoKi8KKworICAgIHVfaW50MzJfdCAgICAgaW5ib3Vu
ZF9kb29yYmVsbDsgICAgICAgICAgICAgICAvKjAwMjBoKi8KKyAgICB1X2ludDMyX3QgICAgIGlu
Ym91bmRfaW50cl9zdGF0dXM7ICAgICAgICAgICAgLyowMDI0aCovCisgICAgdV9pbnQzMl90ICAg
ICBpbmJvdW5kX2ludHJfbWFzazsgICAgICAgICAgICAgIC8qMDAyOGgqLworCisgICAgdV9pbnQz
Ml90ICAgICBvdXRib3VuZF9kb29yYmVsbDsgICAgICAgICAgICAgIC8qMDAyQ2gqLworICAgIHVf
aW50MzJfdCAgICAgb3V0Ym91bmRfaW50cl9zdGF0dXM7ICAgICAgICAgICAvKjAwMzBoKi8KKyAg
ICB1X2ludDMyX3QgICAgIG91dGJvdW5kX2ludHJfbWFzazsgICAgICAgICAgICAgLyowMDM0aCov
CisKKyAgICB1X2ludDMyX3QgICAgIHJlc2VydmVkXzFbMl07ICAgICAgICAgICAgICAgICAgLyow
MDM4aCovCisKKyAgICB1X2ludDMyX3QgICAgIGluYm91bmRfcXVldWVfcG9ydDsgICAgICAgICAg
ICAgLyowMDQwaCovCisgICAgdV9pbnQzMl90ICAgICBvdXRib3VuZF9xdWV1ZV9wb3J0OyAgICAg
ICAgICAgIC8qMDA0NGgqLworCisgICAgdV9pbnQzMl90ICAgICByZXNlcnZlZF8yWzldOyAgICAg
ICAgICAgICAgICAgIC8qMDA0OGgqLworICAgIHVfaW50MzJfdCAgICAgcmVwbHlfcG9zdF9ob3N0
X2luZGV4OyAgICAgICAgICAvKjAwNkNoKi8KKyAgICB1X2ludDMyX3QgICAgIHJlc2VydmVkXzJf
MlsxMl07ICAgICAgICAgICAgICAgLyowMDcwaCovCisKKyAgICB1X2ludDMyX3QgICAgIG91dGJv
dW5kX2Rvb3JiZWxsX2NsZWFyOyAgICAgICAgLyowMEEwaCovCisKKyAgICB1X2ludDMyX3QgICAg
IHJlc2VydmVkXzNbM107ICAgICAgICAgICAgICAgICAgLyowMEE0aCovCisKKyAgICB1X2ludDMy
X3QgICAgIG91dGJvdW5kX3NjcmF0Y2hfcGFkIDsgICAgICAgICAgLyowMEIwaCovCisgICAgdV9p
bnQzMl90ICAgICBvdXRib3VuZF9zY3JhdGNoX3BhZF8yOyAgICAgICAgIC8qMDBCNGgqLworCisg
ICAgdV9pbnQzMl90ICAgICByZXNlcnZlZF80WzJdOyAgICAgICAgICAgICAgICAgIC8qMDBCOGgq
LworCisgICAgdV9pbnQzMl90ICAgICBpbmJvdW5kX2xvd19xdWV1ZV9wb3J0IDsgICAgICAgIC8q
MDBDMGgqLworCisgICAgdV9pbnQzMl90ICAgICBpbmJvdW5kX2hpZ2hfcXVldWVfcG9ydCA7ICAg
ICAgIC8qMDBDNGgqLworCisgICAgdV9pbnQzMl90ICAgICByZXNlcnZlZF81OyAgICAgICAgICAg
ICAgICAgICAgIC8qMDBDOGgqLworICAgIHVfaW50MzJfdCAgICAgICAgIHJlc182WzExXTsgICAg
ICAgICAgICAgICAgICAvKkNDaCovCisgICAgdV9pbnQzMl90ICAgICAgICAgaG9zdF9kaWFnOwor
ICAgIHVfaW50MzJfdCAgICAgICAgIHNlcV9vZmZzZXQ7CisgICAgdV9pbnQzMl90ICAgICBpbmRl
eF9yZWdpc3RlcnNbODA3XTsgICAgICAgICAgIC8qMDBDQ2gqLworCit9IG1yc2FzX3JlZ19zZXQ7
CisjcHJhZ21hIHBhY2soKQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogRmlybXdhcmUgSW50ZXJmYWNlIERl
ZmluZXMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqCisgKiBNRkkgc3RhbmRzIGZvciBNZWdhUkFJRCBTQVMgRlcgSW50
ZXJmYWNlLiBUaGlzIGlzIGp1c3QgYSBtb25pa2VyCisgKiBmb3IgcHJvdG9jb2wgYmV0d2VlbiB0
aGUgc29mdHdhcmUgYW5kIGZpcm13YXJlLiBDb21tYW5kcyBhcmUKKyAqIGlzc3VlZCB1c2luZyAi
bWVzc2FnZSBmcmFtZXMiLgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qCisgKiBGVyBwb3N0cyBpdHMgc3RhdGUg
aW4gdXBwZXIgNCBiaXRzIG9mIG91dGJvdW5kX21zZ18wIHJlZ2lzdGVyCisgKi8KKyNkZWZpbmUg
TUZJX1NUQVRFX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgIDB4RjAwMDAwMDAKKyNkZWZp
bmUgTUZJX1NUQVRFX1VOREVGSU5FRCAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDAwMDAKKyNk
ZWZpbmUgTUZJX1NUQVRFX0JCX0lOSVQgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDAwMDAK
KyNkZWZpbmUgTUZJX1NUQVRFX0ZXX0lOSVQgICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMDAw
MDAKKyNkZWZpbmUgTUZJX1NUQVRFX1dBSVRfSEFORFNIQUtFICAg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OiBBYm9ydCBhbGwgcGVuZGluZyBjbWRzCisgKiBSRUFEWSAgICAgICAgOiBNb3Zl
IGZyb20gT1BFUkFUSU9OQUwgdG8gUkVBRFkgc3RhdGU7IGRpc2NhcmQgcXVldWUgaW5mbworICog
TUZJTU9ERSAgICAgIDogRGlzY2FyZCAocG9zc2libGUpIGxvdyBNRkEgcG9zdGVkIGluIDY0LWJp
dCBtb2RlICg/PykKKyAqIENMUl9IQU5EU0hBS0U6IEZXIGlzIHdhaXRpbmcgZm9yIEhBTkRTSEFL
RSBmcm9tIEJJT1Mgb3IgRHJpdmVyCisgKiBIT1RQTFVHICAgICAgOiBSZXN1bWUgZnJvbSBIb3Rw
bHVnCisgKiBNRklfU1RPUF9BRFAgOiBTZW5kIHNpZ25hbCB0byBGVyB0byBzdG9wIHByb2Nlc3Np
bmcKKyAqLworCisjZGVmaW5lIFdSSVRFX1NFUVVFTkNFX09GRlNFVCAgICAgICAgICAgKDB4MDAw
MDAwMEZDKSAvLyBJMjAKKyNkZWZpbmUgSE9TVF9ESUFHTk9TVElDX09GRlNFVCAgICAgICAgICAo
MHgwMDAwMDBGOCkgIC8vIEkyMAorI2RlZmluZSBESUFHX1dSSVRFX0VOQUJMRSAgICAgICAgICAg
ICAgICAgICAgICAgKDB4MDAwMDAwODApCisjZGVmaW5lIERJQUdfUkVTRVRfQURBUFRFUiAgICAg
ICAgICAgICAgICAgICAgICAoMHgwMDAwMDAwNCkKKworI2RlZmluZSBNRklfQURQX1JFU0VUICAg
ICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDA0MAorI2RlZmluZSBNRklfSU5JVF9BQk9S
VCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMQorI2RlZmluZSBNRklfSU5JVF9S
RUFEWSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwMgorI2RlZmluZSBNRklfSU5J
VF9NRklNT0RFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAwNAorI2RlZmluZSBNRklf
SU5JVF9DTEVBUl9IQU5EU0hBS0UgICAgICAgICAgICAgICAgMHgwMDAwMDAwOAorI2RlZmluZSBN
RklfSU5JVF9IT1RQTFVHICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAxMAorI2RlZmlu
ZSBNRklfU1RPUF9BRFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMDAyMAorI2Rl
ZmluZSBNRklfUkVTRVRfRkxBR1MgICAgICAgICAgICAgICAgICAgICAgICAgTUZJX0lOSVRfUkVB
RFl8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE1G
SV9JTklUX01GSU1PREV8IFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgIE1GSV9JTklUX0FCT1JUCisKKy8qCisgKiBNRkkgZnJhbWUgZmxhZ3MgCisgKi8K
KyNkZWZpbmUgTUZJX0ZSQU1FX1BPU1RfSU5fUkVQTFlfUVVFVUUgICAgICAgICAgIDB4MDAwMAor
I2RlZmluZSBNRklfRlJBTUVfRE9OVF9QT1NUX0lOX1JFUExZX1FVRVVFICAgICAgMHgwMDAxCisj
ZGVmaW5lIE1GSV9GUkFNRV9TR0wzMiAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAKKyNk
ZWZpbmUgTUZJX0ZSQU1FX1NHTDY0ICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMgorI2Rl
ZmluZSBNRklfRlJBTUVfU0VOU0UzMiAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwCisjZGVm
aW5lIE1GSV9GUkFNRV9TRU5TRTY0ICAgICAgICAgICAgICAgICAgICAgICAweDAwMDQKKyNkZWZp
bmUgTUZJX0ZSQU1FX0RJUl9OT05FICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMAorI2RlZmlu
ZSBNRklfRlJBTUVfRElSX1dSSVRFICAgICAgICAgICAgICAgICAgICAgMHgwMDA4CisjZGVmaW5l
IE1GSV9GUkFNRV9ESVJfUkVBRCAgICAgICAgICAgICAgICAgICAgICAweDAwMTAKKyNkZWZpbmUg
TUZJX0ZSQU1FX0RJUl9CT1RIICAgICAgICAgICAgICAgICAgICAgIDB4MDAxOAorI2RlZmluZSBN
RklfRlJBTUVfSUVFRSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDIwCisKKy8qCisgKiBE
ZWZpbml0aW9uIGZvciBjbWRfc3RhdHVzCisgKi8KKyNkZWZpbmUgTUZJX0NNRF9TVEFUVVNfUE9M
TF9NT0RFICAgICAgICAgICAgICAgIDB4RkYKKworLyoKKyAqIE1GSSBjb21tYW5kIG9wY29kZXMK
KyAqLworI2RlZmluZSBNRklfQ01EX0lOSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgw
MAorI2RlZmluZSBNRklfQ01EX0xEX1JFQUQgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMQor
I2RlZmluZSBNRklfQ01EX0xEX1dSSVRFICAgICAgICAgICAgICAgICAgICAgICAgMHgwMgorI2Rl
ZmluZSBNRklfQ01EX0xEX1NDU0lfSU8gICAgICAgICAgICAgICAgICAgICAgMHgwMworI2RlZmlu
ZSBNRklfQ01EX1BEX1NDU0lfSU8gICAgICAgICAgICAgICAgICAgICAgMHgwNAorI2RlZmluZSBN
RklfQ01EX0RDTUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNQorI2RlZmluZSBNRklf
Q01EX0FCT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNgorI2RlZmluZSBNRklfQ01E
X1NNUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNworI2RlZmluZSBNRklfQ01EX1NU
UCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOAorI2RlZmluZSBNRklfQ01EX0lOVkFM
SUQgICAgICAgICAgICAgICAgICAgICAgICAgMHhmZgorCisjZGVmaW5lIE1SX0RDTURfQ1RSTF9H
RVRfSU5GTyAgICAgICAgICAgICAgICAgICAweDAxMDEwMDAwCisjZGVmaW5lIE1SX0RDTURfTERf
R0VUX0xJU1QgICAgICAgICAgICAgICAgICAgICAweDAzMDEwMDAwCisjZGVmaW5lIE1SX0RDTURf
Q1RSTF9DQUNIRV9GTFVTSCAgICAgICAgICAgICAgICAweDAxMTAxMDAwCisjZGVmaW5lIE1SX0ZM
VVNIX0NUUkxfQ0FDSEUgICAgICAgICAgICAgICAgICAgICAweDAxCisjZGVmaW5lIE1SX0ZMVVNI
X0RJU0tfQ0FDSEUgICAgICAgICAgICAgICAgICAgICAweDAyCisKKyNkZWZpbmUgTVJfRENNRF9D
VFJMX1NIVVRET1dOICAgICAgICAgICAgICAgICAgIDB4MDEwNTAwMDAKKyNkZWZpbmUgTVJfRENN
RF9ISUJFUk5BVEVfU0hVVERPV04gICAgICAgICAgICAgIDB4MDEwNjAwMDAKKyNkZWZpbmUgTVJf
RU5BQkxFX0RSSVZFX1NQSU5ET1dOICAgICAgICAgICAgICAgIDB4MDEKKworI2RlZmluZSBNUl9E
Q01EX0NUUkxfRVZFTlRfR0VUX0lORk8gICAgICAgICAgICAgMHgwMTA0MDEwMAorI2RlZmluZSBN
Ul9EQ01EX0NUUkxfRVZFTlRfR0VUICAgICAgICAgICAgICAgICAgMHgwMTA0MDMwMAorI2RlZmlu
ZSBNUl9EQ01EX0NUUkxfRVZFTlRfV0FJVCAgICAgICAgICAgICAgICAgMHgwMTA0MDUwMAorI2Rl
ZmluZSBNUl9EQ01EX0xEX0dFVF9QUk9QRVJUSUVTICAgICAgICAgICAgICAgMHgwMzAzMDAwMAor
CisjZGVmaW5lIE1SX0RDTURfQ0xVU1RFUiAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAw
MDAwCisjZGVmaW5lIE1SX0RDTURfQ0xVU1RFUl9SRVNFVF9BTEwgICAgICAgICAgICAgICAweDA4
MDEwMTAwCisjZGVmaW5lIE1SX0RDTURfQ0xVU1RFUl9SRVNFVF9MRCAgICAgICAgICAgICAgICAw
eDA4MDEwMjAwCisjZGVmaW5lIE1SX0RDTURfUERfTElTVF9RVUVSWSAgICAgICAgICAgICAgICAg
ICAweDAyMDEwMTAwCisKKyNkZWZpbmUgTVJfRENNRF9DVFJMX01JU0NfQ1BYICAgICAgICAgICAg
ICAgICAgIDB4MDEwMGUyMDAKKyNkZWZpbmUgTVJfRENNRF9DVFJMX01JU0NfQ1BYX0lOSVRfREFU
QV9HRVQgICAgIDB4MDEwMGUyMDEKKyNkZWZpbmUgTVJfRENNRF9DVFJMX01JU0NfQ1BYX1FVRVVF
X0RBVEEgICAgICAgIDB4MDEwMGUyMDIKKyNkZWZpbmUgTVJfRENNRF9DVFJMX01JU0NfQ1BYX1VO
UkVHSVNURVIgICAgICAgIDB4MDEwMGUyMDMKKyNkZWZpbmUgTUFYX01SX1JPV19TSVpFICAgICAg
ICAgICAgICAgICAgICAgICAgIDMyCisjZGVmaW5lIE1SX0NQWF9ESVJfV1JJVEUgICAgICAgICAg
ICAgICAgICAgICAgICAxCisjZGVmaW5lIE1SX0NQWF9ESVJfUkVBRCAgICAgICAgICAgICAgICAg
ICAgICAgICAwCisjZGVmaW5lIE1SX0NQWF9WRVJTSU9OICAgICAgICAgICAgICAgICAgICAgICAg
ICAxCisKKyNkZWZpbmUgTVJfRENNRF9DVFJMX0lPX01FVFJJQ1NfR0VUICAgICAgICAgICAgIDB4
MDExNzAyMDAgICAvLyBnZXQgSU8gbWV0cmljcworCisjZGVmaW5lIE1SX0VWVF9DRkdfQ0xFQVJF
RCAgICAgICAgICAgICAgICAgICAgICAweDAwMDQKKworI2RlZmluZSBNUl9FVlRfTERfU1RBVEVf
Q0hBTkdFICAgICAgICAgICAgICAgICAgMHgwMDUxCisjZGVmaW5lIE1SX0VWVF9QRF9JTlNFUlRF
RCAgICAgICAgICAgICAgICAgICAgICAweDAwNWIKKyNkZWZpbmUgTVJfRVZUX1BEX1JFTU9WRUQg
ICAgICAgICAgICAgICAgICAgICAgID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g
ICAgICAgICAgaW5kZXg7CisgICAgdV9pbnQ4X3QgICAgICAgICAgICBzeW5jX2NtZDsKKyAgICB1
X2ludDhfdCAgICAgICAgICAgIGNtZF9zdGF0dXM7CisgICAgdV9pbnQ4X3QgICAgICAgICAgICBh
Ym9ydF9hZW47CisgICAgdV9pbnQ4X3QgICAgICAgICAgICByZXRyeV9mb3JfZndfcmVzZXQ7Cisg
ICAgc3RydWN0IG1yc2FzX3NvZnRjICAqc2M7CisgICAgdW5pb24gY2NiICAgICAgICAgICAqY2Ni
X3B0cjsgCisgICAgdW5pb24geworICAgICAgICBzdHJ1Y3QgeworICAgICAgICAgICAgdV9pbnQx
Nl90IHNtaWQ7CisgICAgICAgICAgICB1X2ludDE2X3QgcmVzdmQ7CisgICAgICAgIH0gY29udGV4
dDsKKyAgICAgICAgdV9pbnQzMl90IGZyYW1lX2NvdW50OworICAgIH0gY21kX2lkOyAKKyAgICBU
QUlMUV9FTlRSWShtcnNhc19tZmlfY21kKSAgbmV4dDsKK307CisKKworLyoKKyAqIGRlZmluZSBj
b25zdGFudHMgZm9yIGRldmljZSBsaXN0IHF1ZXJ5IG9wdGlvbnMKKyAqLworZW51bSBNUl9QRF9R
VUVSWV9UWVBFIHsKKyAgICBNUl9QRF9RVUVSWV9UWVBFX0FMTCAgICAgICAgICAgICAgICA9IDAs
CisgICAgTVJfUERfUVVFUllfVFlQRV9TVEFURSAgICAgICAgICAgICAgPSAxLAorICAgIE1SX1BE
X1FVRVJZX1RZUEVfUE9XRVJfU1RBVEUgICAgICAgID0gMiwKKyAgICBNUl9QRF9RVUVSWV9UWVBF
X01FRElBX1RZUEUgICAgICAgICA9IDMsCisgICAgTVJfUERfUVVFUllfVFlQRV9TUEVFRCAgICAg
ICAgICAgICAgPSA0LAorICAgIE1SX1BEX1FVRVJZX1RZUEVfRVhQT1NFRF9UT19IT1NUICAgID0g
NSwKK307CisKKyNkZWZpbmUgTVJfRVZUX0NGR19DTEVBUkVEICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgMHgwMDA0CisjZGVmaW5lIE1SX0VWVF9MRF9TVEFURV9DSEFOR0UgICAgICAgICAg
ICAgICAgICAgICAgICAgIDB4MDA1MQorI2RlZmluZSBNUl9FVlRfUERfSU5TRVJURUQgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAweDAwNWIKKyNkZWZpbmUgTVJfRVZUX1BEX1JFTU9WRUQg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDcwCisjZGVmaW5lIE1SX0VWVF9MRF9D
UkVBVEVEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDA4YQorI2RlZmluZSBNUl9F
VlRfTERfREVMRVRFRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwOGIKKyNkZWZp
bmUgTVJfRVZUX0ZPUkVJR05fQ0ZHX0lNUE9SVEVEICAgICAgICAgICAgICAgICAgICAgMHgwMGRi
CisjZGVmaW5lIE1SX0VWVF9MRF9PRkZMSU5FICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
IDB4MDBmYworI2RlZmluZSBNUl9FVlRfQ1RSTF9IT1NUX0JVU19TQ0FOX1JFUVVFU1RFRCAgICAg
ICAgICAgICAweDAxNTIKKworZW51bSBNUl9QRF9TVEFURSB7CisgICAgTVJfUERfU1RBVEVfVU5D
T05GSUdVUkVEX0dPT0QgICA9IDB4MDAsCisgICAgTVJfUERfU1RBVEVfVU5DT05GSUdVUkVEX0JB
RCAgICA9IDB4MDEsCisgICAgTVJfUERfU1RBVEVfSE9UX1NQQVJFICAgICAgICAgICA9IDB4MDIs
CisgICAgTVJfUERfU1RBVEVfT0ZGTElORSAgICAgICAgICAgICA9IDB4MTAsCisgICAgTVJfUERf
U1RBVEVfRkFJTEVEICAgICAgICAgICAgICA9IDB4MTEsCisgICAgTVJfUERfU1RBVEVfUkVCVUlM
RCAgICAgICAgICAgICA9IDB4MTQsCisgICAgTVJfUERfU1RBVEVfT05MSU5FICAgICAgICAgICAg
ICA9IDB4MTgsCisgICAgTVJfUERfU1RBVEVfQ09QWUJBQ0sgICAgICAgICAgICA9IDB4MjAsCisg
ICAgTVJfUERfU1RBVEVfU1lTVEVNICAgICAgICAgICAgICA9IDB4NDAsCisgfTsKKworIC8qCisg
KiBkZWZpbmVzIHRoZSBwaHlzaWNhbCBkcml2ZSBhZGRyZXNzIHN0cnVjdHVyZQorICovCisjcHJh
Z21hIHBhY2soMSkKK3N0cnVjdCBNUl9QRF9BRERSRVNTIHsKKyAgICB1X2ludDE2X3QgICAgIGRl
dmljZUlkOworICAgIHVfaW50MTZfdCAgICAgZW5jbERldmljZUlkOworCisgICAgdW5pb24gewor
ICAgICAgICBzdHJ1Y3QgeworICAgICAgICAgICAgdV9pbnQ4X3QgIGVuY2xJbmRleDsKKyAgICAg
ICAgICAgIHVfaW50OF90ICBzbG90TnVtYmVyOworICAgICAgICB9IG1yUGRBZGRyZXNzOworICAg
ICAgICBzdHJ1Y3QgeworICAgICAgICAgICAgdV9pbnQ4X3QgIGVuY2xQb3NpdGlvbjsKKyAgICAg
ICAgICAgIHVfaW50OF90ICBlbmNsQ29ubmVjdG9ySW5kZXg7CisgICAgICAgIH0gbXJFbmNsQWRk
cmVzczsKKyAgICB9IHUxOworICAgIHVfaW50OF90ICAgICAgc2NzaURldlR5cGU7CisgICAgdW5p
b24geworICAgICAgICB1X2ludDhfdCAgICAgIGNvbm5lY3RlZFBvcnRCaXRtYXA7CisgICAgICAg
IHVfaW50OF90ICAgICAgY29ubmVjdGVkUG9ydE51bWJlcnM7CisgICAgfSB1MjsKKyAgICB1X2lu
dDY0X3QgICAgIHNhc0FkZHJbMl07Cit9OworI3ByYWdtYSBwYWNrKCkKKworLyoKKyAqIGRlZmlu
ZXMgdGhlIHBoeXNpY2FsIGRyaXZlIGxpc3Qgc3RydWN0dXJlCisgKi8KKyNwcmFnbWEgcGFjaygx
KQorc3RydWN0IE1SX1BEX0xJU1QgeworICAgIHVfaW50MzJfdCAgICAgICAg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KKyAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxpa2UgR1BJTyBwaW5z
LgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gMSAtIGRpc2Fi
bGUgYXV0byBkZXRlY3QgU0dQSU8sCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAvLyAyIC0gZGlzYWJsZSBpMmMgU0VQIGF1dG8gZGV0ZWN0CisgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAzIC0gZGlzYWJsZSBib3RoIGF1dG8gZGV0
ZWN0CisgICAgdV9pbnQ4X3Qgc25hcFZEU3BhY2U7ICAvLyAlIG9mIHNvdXJjZSBMRCB0byBiZSBy
ZXNlcnZlZCBmb3IgYSBWRHMgc25hcHNob3QgaW4KKyAgICAgICAgICAgICAgICAgICAgICAgICAg
IC8vIHNuYXBzaG90IHJlcG9zaXRvcnksIGZvciBtZXRhZGF0YSBhbmQgdXNlciBkYXRhLgorICAg
ICAgICAgICAgICAgICAgICAgICAgICAgLy8gMT01JSwgMj0xMCUsIDM9MTUlIGFuZCBzbyBvbi4K
KyAgICAvKgorICAgICAqIEFkZCBwcm9wZXJ0aWVzIHRoYXQgY2FuIGJlIGNvbnRyb2xsZWQgYnkg
YSBiaXQgaW4gdGhlIGZvbGxvd2luZyBzdHJ1Y3R1cmUuCisgICAgICovCisgICAgc3RydWN0IHsK
KyAgICAgICAgdV9pbnQzMl90ICAgICBjb3B5QmFja0Rpc2FibGVkICAgICAgICAgICAgOiAxOyAg
Ly8gc2V0IFRSVUUgdG8gZGlzYWJsZSBjb3B5QmFjayAKKyAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gKDA9Y29wYmFjayBlbmFibGVkKQor
ICAgICAgICB1X2ludDMyX3QgICAgIFNNQVJUZXJFbmFibGVkICAgICAgICAgICAgICA6IDE7Cisg
ICAgICAgIHVfaW50MzJfdCAgICAgcHJDb3JyZWN0VW5jb25maWd1cmVkQXJlYXMgIDogMTsKKyAg
ICAgICAgdV9pbnQzMl90ICAgICB1c2VGZGVPbmx5ICAgICAgICAgICAgICAgICAgOiAxOworICAg
ICAgICB1X2ludDMyX3QgICAgIGRpc2FibGVOQ1EgICAgICAgICAgICAgICAgICA6IDE7CisgICAg
ICAgIHVfaW50MzJfdCAgICAgU1NEU01BUlRlckVuYWJsZWQgICAgICAgICAgIDogMTsKKyAgICAg
ICAgdV9pbnQzMl90ICAgICBTU0RQYXRyb2xSZWFkRW5hYmxlZCAgICAgICAgOiAxOworICAgICAg
ICB1X2ludDMyX3QgICAgIGVuYWJsZVNwaW5Eb3duVW5jb25maWd1cmVkICA6IDE7CisgICAgICAg
IHVfaW50MzJfdCAgICAgYXV0b0VuaGFuY2VkSW1wb3J0ICAgICAgICAgIDogMTsKKyAgICAgICAg
dV9pbnQzMl90ICAgICBlbmFibGVTZWNyZXRLZXlDb250cm9sICAgICAgOiAxOworICAgICAgICB1
X2ludDMyX3QgICAgIGRpc2FibGVPbmxpbmVDdHJsUmVzZXQgICAgICA6IDE7CisgICAgICAgIHVf
aW50MzJfdCAgICAgYWxsb3dCb290V2l0aFBpbm5lZENhY2hlICAgIDogMTsKKyAgICAgICAgdV9p
bnQzMl90ICAgICBkaXNhYmxlU3BpbkRvd25IUyAgICAgICAgICAgOiAxOworICAgICAgICB1X2lu
dDMyX3QgICAgIGVuYWJsZUpCT0QgICAgICAgICAgICAgICAgICA6IDE7CisgICAgICAgIHVfaW50
MzJfdCAgICAgcmVzZXJ2ZWQgICAgICAgICAgICAgICAgICAgIDoxODsKKyAgICB9IE9uT2ZmUHJv
cGVydGllczsKKyAgICB1X2ludDhfdCAgICAgIGF1dG9TbmFwVkRTcGFjZTsgIC8vICUgb2Ygc291
cmNlIExEIHRvIGJlIHJlc2VydmVkIGZvciBhdXRvIAorICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgLy8gc25hcHNob3QgaW4gc25hcHNob3QgcmVwb3NpdG9yeSwgZm9yIAorICAg
ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbWV0YWRhdGEgYW5kIHVzZXIgZGF0
YS4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDE9NSUsIDI9MTAlLCAz
PTE1JSBhbmQgc28gb24uCisgICAgdV9pbnQ4X3QgICAgICB2aWV3U3BhY2U7ICAgICAgICAvLyBz
bmFwc2hvdCB3cml0ZWFibGUgVklFV3MgY2FwYWNpdHkgYXMgYSAlIAorICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgICAgLy8gb2Ygc291cmNlIExEIGNhcGFjaXR5LiAwPVJFQUQgb25s
eS4KKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDE9NSUsIDI9MTAlLCAz
PTE1JSBhbmQgc28gb24KKyAgICB1X2ludDE2X3QgICAgIHNwaW5Eb3duVGltZTsgICAgIC8vICMg
b2YgaWRsZSBtaW51dGVzIGJlZm9yZSBkZXZpY2UgaXMgc3B1biAKKyAgICAgICAgICAgICAgICAg
ICAgICAgICAgICAgICAgICAgIC8vIGRvd24gKDA9dXNlIEZXIGRlZmF1bHRzKS4KKyAgICB1X2lu
dDhfdCAgICAgIHJlc2VydmVkWzI0XTsKKworfTsgCisjcHJhZ21hIHBhY2soKQorCisKKy8qCisg
KiBTQVMgY29udHJvbGxlciBpbmZvcm1hdGlvbgorICovCisvLyNwcmFnbWEgcGFjaygxKQorc3Ry
dWN0IG1yc2FzX2N0cmxfaW5mbyB7CisgICAgLyogCisgICAgICogUENJIGRldmljZSBpbmZvcm1h
dGlvbiAKKyAgICAgKi8KKyAgICBzdHJ1Y3QgeworICAgICAgICB1X2ludDE2X3QgdmVuZG9yX2lk
OworICAgICAgICB1X2ludDE2X3QgZGV2aWNlX2lkOworICAgICAgICB1X2ludDE2X3Qgc3ViX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VfaW50OF90IG1heF9hcnJh
eXM7CisgICAgdV9pbnQ4X3QgbWF4X2xkczsKKyAgICBjaGFyIHByb2R1Y3RfbmFtZVs4MF07Cisg
ICAgY2hhciBzZXJpYWxfbm9bMzJdOworCisgICAgLyoKKyAgICAgKiBPdGhlciBwaHlzaWNhbC9j
b250cm9sbGVyL29wZXJhdGlvbiBpbmZvcm1hdGlvbi4gSW5kaWNhdGVzIHRoZQorICAgICAqIHBy
ZXNlbmNlIG9mIHRoZSBoYXJkd2FyZQorICAgICAqLworICAgIHN0cnVjdCB7CisgICAgICAgIHVf
aW50MzJfdCBiYnU6MTsKKyAgICAgICAgdV9pbnQzMl90IGFsYXJtOjE7CisgICAgICAgIHVfaW50
MzJfdCBudnJhbToxOworICAgICAgICB1X2ludDMyX3QgdWFydDoxOworICAgICAgICB1X2ludDMy
X3QgcmVzZXJ2ZWQ6Mjg7CisgICAgfSBfX3BhY2tlZCBod19wcmVzZW50OworCisgICAgdV9pbnQz
Ml90IGN1cnJlbnRfZndfdGltZTsKKworICAgIC8qCisgICAgICogTWF4aW11bSBkYXRhIHRyYW5z
ZmVyIHNpemVzCisgICAgICovCisgICAgdV9pbnQxNl90IG1heF9jb25jdXJyZW50X2NtZHM7Cisg
ICAgdV9pbnQxNl90IG1heF9zZ2VfY291bnQ7CisgICAgdV9pbnQzMl90IG1heF9yZXF1ZXN0X3Np
emU7CisKKyAgICAvKgorICAgICAqIExvZ2ljYWwgYW5kIHBoeXNpY2FsIGRldmljZSBjb3VudHMK
KyAgICAgKi8KKyAgICB1X2ludDE2X3QgbGRfcHJlc2VudF9jb3VudDsKKyAgICB1X2ludDE2X3Qg
bGRfZGVncmFkZWRfY291bnQ7CisgICAgdV9pbnQxNl90IGxkX29mZmxpbmVfY291bnQ7CisKKyAg
ICB1X2ludDE2X3QgcGRfcHJlc2VudF9jb3VudDsKKyAgICB1X2ludDE2X3QgcGRfZGlza19wcmVz
ZW50X2NvdW50OworICAgIHVfaW50MTZfdCBwZF9kaXNrX3ByZWRfZmFpbHVyZV9jb3VudDsKKyAg
ICB1X2ludDE2X3QgcGRfZGlza19mYWlsZWRfY291bnQ7CisKKyAgICAvKgorICAgICAqIE1lbW9y
eSBzaXplIGluZm9ybWF0aW9uCisgICAgICovCisgICAgdV9pbnQxNl90IG52cmFtX3NpemU7Cisg
ICAgdV9pbnQxNl90IG1lbW9yeV9zaXplOworICAgIHVfaW50MTZfdCBmbGFzaF9zaXplOworCisg
ICAgLyoKKyAgICAgKiBFcnJvciBjb3VudGVycworICAgICAqLworICAgIHVfaW50MTZfdCBtZW1f
Y29ycmVjdGFibGVfZXJyb3JfY291bnQ7CisgICAgdV9pbnQxNl90IG1lbV91bmNvcnJlY3RhYmxl
X2Vycm9yX2NvdW50OworCisgICAgLyoKKyAgICAgKiBDbHVzdGVyIGluZm9ybWF0aW9uCisgICAg
ICovCisgICAgdV9pbnQ4X3QgY2x1c3Rlcl9wZXJtaXR0ZWQ7CisgICAgdV9pbnQ4X3QgY2x1c3Rl
cl9hY3RpdmU7CisKKyAgICAvKgorICAgICAqIEFkZGl0aW9uYWwgbWF4IGRhdGEgdHJhbnNmZXIg
c2l6ZXMKKyAgICAgKi8KKyAgICB1X2ludDE2X3QgbWF4X3N0cmlwc19wZXJfaW87CisKKyAgICAv
KgorICAgICAqIENvbnRyb2xsZXIgY2FwYWJpbGl0aWVzIHN0cnVjdHVyZXMKKyAgICAgKi8KKyAg
ICBzdHJ1Y3QgeworICAgICAgICB1X2ludDMyX3QgcmFpZF9sZXZlbF8wOjE7CisgICAgICAgIHVf
aW50MzJfdCByYWlkX2xldmVsXzE6MTsKKyAgICAgICAgdV9pbnQzMl90IHJhaWRfbGV2ZWxfNTox
OworICAgICAgICB1X2ludDMyX3QgcmFpZF9sZXZlbF8xRToxOworICAgICAgICB1X2ludDMyX3Qg
cmFpZF9sZXZlbF82OjE7CisgICAgICAgIHVfaW50MzJfdCByZXNlcnZlZDoyNzsKKyAgICB9IF9f
cGFja2VkIHJhaWRfbGV2ZWxzOworCisgICAgc3RydWN0IHsKKyAgICAgICAgdV9pbnQzMl90IHJi
bGRfcmF0ZToxOworICAgICAgICB1X2ludDMyX3QgY2NfcmF0ZToxOworICAgICAgICB1X2ludDMy
X3QgYmdpX3JhdGU6MTsKKyAgICAgICAgdV9pbnQzMl90IHJlY29uX3JhdGU6MTsKKyAgICAgICAg
dV9pbnQzMl90IHBhdHJvbF9yYXRlOjE7CisgICAgICAgIHVfaW50MzJfdCBhbGFybV9jb250cm9s
OjE7CisgICAgICAgIHVfaW50MzJfdCBjbHVzdGVyX3N1cHBvcnRlZDoxOworICAgICAgICB1X2lu
dDMyX3QgYmJ1OjE7CisgICAgICAgIHVfaW50MzJfdCBzcGFubmluZ19hbGxvd2VkOjE7CisgICAg
ICAgIHVfaW50MzJfdCBkZWRpY2F0ZWRfaG90c3BhcmVzOjE7CisgICAgICAgIHVfaW50MzJfdCBy
ZXZlcnRpYmxlX2hvdHNwYXJlczoxOworICAgICAgICB1X2ludDMyX3QgZm9yZWlnbl9jb25maWdf
aW1wb3J0OjE7CisgICAgICAgIHVfaW50MzJfdCBzZWxmX2RpYWdub3N0aWM6MTsKKyAgICAgICAg
dV9pbnQzMl90IG1peGVkX3JlZHVuZGFuY3lfYXJyOjE7CisgICAgICAgIHVfaW50MzJfdCBnbG9i
YWxfaG90X3NwYXJlczoxOworICAgICAgICB1X2ludDMyX3QgcmVzZXJ2ZWQ6MTc7CisgICAgfSBf
X3BhY2tlZCBhZGFwdGVyX29wZXJhdGlvbnM7CisKKyAgICBzdHJ1Y3QgeworICAgICAgICB1X2lu
dDMyX3QgcmVhZF9wb2xpY3k6MTsKKyAgICAgICAgdV9pbnQzMl90IHdyaXRlX3BvbGljeToxOwor
ICAgICAgICB1X2ludDMyX3QgaW9fcG9saWN5OjE7CisgICAgICAgIHVfaW50MzJfdCBhY2Nlc3Nf
cG9saWN5OjE7CisgICAgICAgIHVfaW50MzJfdCBkaXNrX2NhY2hlX3BvbGljeToxOworICAgICAg
ICB1X2ludDMyX3QgcmVzZXJ2ZWQ6Mjc7CisgICAgfSBfX3BhY2tlZCBsZF9vcGVyYXRpb25zOwor
CisgICAgc3RydWN0IHsKKyAgICAgICAgdV9pbnQ4X3QgbWluOworICAgICAgICB1X2ludDhfdCBt
YXg7CisgICAgICAgIHVfaW50OF90IHJlc2VydmVkWzJdOworICAgIH0gX19wYWNrZWQgc3RyaXBl
X3N6X29wczsKKworICAgIHN0cnVjdCB7CisgICAgICAgIHVfaW50MzJfdCBmb3JjZV9vbmxpbmU6
MTsKKyAgICAgICAgdV9pbnQzMl90IGZvcmNlX29mZmxpbmU6MTsKKyAgICAgICAgdV9pbnQzMl90
IGZvcmNlX3JlYnVpbGQ6MTsKKyAgICAgICAgdV9pbnQzMl90IHJlc2VydmVkOjI5OworICAgIH0g
X19wYWNrZWQgcGRfb3BlcmF0aW9uczsKKworICAgIHN0cnVjdCB7CisgICAgICAgIHVfaW50MzJf
dCBjdHJsX3N1cHBvcnRzX3NhczoxOworICAgICAgICB1X2ludDMyX3QgY3RybF9zdXBwb3J0c19z
YXRhOjE7CisgICAgICAgIHVfaW50MzJfdCBhbGxvd19taXhfaW5fZW5jbDoxOworICAgICAgICB1
X2ludDMyX3QgYWxsb3dfbWl4X2luX2xkOjE7CisgICAgICAgIHVfaW50MzJfdCBhbGxvd19zYXRh
X2luX2NsdXN0ZXI6MTsKKyAgICAgICAgdV9pbnQzMl90IHJlc2VydmVkOjI3OworICAgIH0gX19w
YWNrZWQgcGRfbWl4X3N1cHBvcnQ7CisKKyAgICAvKgorICAgICAqIERlZmluZSBFQ0Mgc2luZ2xl
LWJpdC1lcnJvciBidWNrZXQgaW5mb3JtYXRpb24KKyAgICAgKi8KKyAgICB1X2ludDhfdCBlY2Nf
YnVja2V0X2NvdW50OworICAgIHVfaW50OF90IHJlc2VydmVkXzJbMTFdOworCisgICAgLyoKKyAg
ICAgKiBJbmNsdWRlIHRoZSBjb250cm9sbGVyIHByb3BlcnRpZXMg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AgICAgICAgICAgICAgLyowNWggKi8KKyAgICB1X2ludDhf
dCBjZGJfbGVuOyAgICAgICAgICAgICAvKjA2aCAqLworICAgIHVfaW50OF90IHNnZV9jb3VudDsg
ICAgICAgICAgIC8qMDdoICovCisKKyAgICB1X2ludDMyX3QgY29udGV4dDsgICAgICAgICAgICAv
KjA4aCAqLworICAgIHVfaW50MzJfdCBwYWRfMDsgICAgICAgICAgICAgIC8qMENoICovCisKKyAg
ICB1X2ludDE2X3QgZmxhZ3M7ICAgICAgICAgICAgICAvKjEwaCAqLworICAgIHVfaW50MTZfdCB0
aW1lb3V0OyAgICAgICAgICAgIC8qMTJoICovCisgICAgdV9pbnQzMl90IGRhdGFfeGZlcmxlbjsg
ICAgICAgLyoxNGggKi8KK307CisjcHJhZ21hIHBhY2soKQorCisjcHJhZ21hIHBhY2soMSkKK3N0
cnVjdCBtcnNhc19pbml0X2ZyYW1lIHsKKyAgICB1X2ludDhfdCBjbWQ7ICAgICAgICAgICAgICAg
ICAvKjAwaCAqLworICAgIHVfaW50OF90IHJlc2VydmVkXzA7ICAgICAgICAgIC8qMDFoICovCisg
ICAgdV9pbnQ4X3QgY21kX3N0YXR1czsgICAgICAgICAgLyowMmggKi8KKworICAgIHVfaW50OF90
IHJlc2VydmVkXzE7ICAgICAgICAgIC8qMDNoICovCisgICAgdV9pbnQzMl90IHJlc2VydmVkXzI7
ICAgICAgICAgLyowNGggKi8KKworICAgIHVfaW50MzJfdCBjb250ZXh0OyAgICAgICAgICAgIC8q
MDhoICovCisgICAgdV9pbnQzMl90IHBhZF8wOyAgICAgICAgICAgICAgLyowQ2ggKi8KKworICAg
IHVfaW50MTZfdCBmbGFnczsgICAgICAgICAgICAgIC8qMTBoICovCisgICAgdV9pbnQxNl90IHJl
c2VydmVkXzM7ICAgICAgICAgLyoxMmggKi8KKyAgICB1X2ludDMyX3QgZGF0YV94ZmVyX2xlbjsg
ICAgICAvKjE0aCAqLworCisgICAgdV9pbnQzMl90IHF1ZXVlX2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worCisgICAgdV9pbnQxNl90IGZsYWdzOyAgICAgICAgICAgICAgLyox
MGggKi8KKyAgICB1X2ludDE2X3QgdGltZW91dDsgICAgICAgICAgICAvKjEyaCAqLworICAgIHVf
aW50MzJfdCBsYmFfY291bnQ7ICAgICAgICAgIC8qMTRoICovCisKKyAgICB1X2ludDMyX3Qgc2Vu
c2VfYnVmX3BoeXNfYWRkcl9sbzsgICAgIC8qMThoICovCisgICAgdV9pbnQzMl90IHNlbnNlX2J1
Zl9waHlzX2FkZHJfaGk7ICAgICAvKjFDaCAqLworCisgICAgdV9pbnQzMl90IHN0YXJ0X2xiYV9s
bzsgICAgICAgLyoyMGggKi8KKyAgICB1X2ludDMyX3Qgc3RhcnRfbGJhX2hpOyAgICAgICAvKjI0
aCAqLworCisgICAgdW5pb24gbXJzYXNfc2dsIHNnbDsgIC8qMjhoICovCit9OworI3ByYWdtYSBw
YWNrKCkKKworI3ByYWdtYSBwYWNrKDEpCitzdHJ1Y3QgbXJzYXNfcHRocnVfZnJhbWUgeworICAg
IHVfaW50OF90IGNtZDsgICAgICAgICAgICAgICAgIC8qMDBoICovCisgICAgdV9pbnQ4X3Qgc2Vu
c2VfbGVuOyAgICAgICAgICAgLyowMWggKi8KKyAgICB1X2ludDhfdCBjbWRfc3RhdHVzOyAgICAg
ICAgICAvKjAyaCAqLworICAgIHVfaW50OF90IHNjc2lfc3RhdHVzOyAgICAgICAgIC8qMDNoICov
CisKKyAgICB1X2ludDhfdCB0YXJnZXRfaWQ7ICAgICAgICAgICAvKjA0aCAqLworICAgIHVfaW50
OF90IGx1bjsgICAgICAgICAgICAgICAgIC8qMDVoICovCisgICAgdV9pbnQ4X3QgY2RiX2xlbjsg
ICAgICAgICAgICAgLyowNmggKi8KKyAgICB1X2ludDhfdCBzZ2VfY291bnQ7ICAgICAgICAgICAv
KjA3aCAqLworCisgICAgdV9pbnQzMl90IGNvbnRleHQ7ICAgICAgICAgICAgLyowOGggKi8KKyAg
ICB1X2ludDMyX3QgcGFkXzA7ICAgICAgICAgICAgICAvKjBDaCAqLworCisgICAgdV9pbnQxNl90
IGZsYWdzOyAgICAgICAgICAgICAgLyoxMGggKi8KKyAgICB1X2ludDE2X3QgdGltZW91dDsgICAg
ICAgICAgICAvKjEyaCAqLworICAgIHVfaW50MzJfdCBkYXRhX3hmZXJfbGVuOyAgICAgIC8qMTRo
ICovCisKKyAgICB1X2ludDMyX3Qgc2Vuc2VfYnVmX3BoeXNfYWRkcl9sbzsgICAgIC8qMThoICov
CisgICAgdV9pbnQzMl90IHNlbnNlX2J1Zl9waHlzX2FkZHJfaGk7ICAgICAvKjFDaCAqLworCisg
ICAgdV9pbnQ4X3QgY2RiWzE2XTsgICAgICAgICAgICAgLyoyMGggKi8KKyAgICB1bmlvbiBtcnNh
c19zZ2wgc2dsOyAgLyozMGggKi8KK307CisjcHJhZ21hIHBhY2soKQorCisjcHJhZ21hIHBhY2so
MSkKK3N0cnVjdCBtcnNhc19kY21kX2ZyYW1lIHsKKyAgICB1X2ludDhfdCBjbWQ7ICAgICAgICAg
ICAgICAgICAvKjAwaCAqLworICAgIHVfaW50OF90IHJlc2VydmVkXzA7ICAgICAgICAgIC8qMDFo
ICovCisgICAgdV9pbnQ4X3QgY21kX3N0YXR1czsgICAgICAgICAgLyowMmggKi8KKyAgICB1X2lu
dDhfdCByZXNlcnZlZF8xWzRdOyAgICAgICAvKjAzaCAqLworICAgIHVfaW50OF90IHNnZV9jb3Vu
dDsgICAgICAgICAgIC8qMDdoICovCisKKyAgICB1X2ludDMyX3QgY29udGV4dDsgICAgICAgICAg
ICAvKjA4aCAqLworICAgIHVfaW50MzJfdCBwYWRfMDsgICAgICAgICAgICAgIC8qMENoICovCisK
KyAgICB1X2ludDE2X3QgZmxhZ3M7ICAgICAgICAgICAgICAvKjEwaCAqLworICAgIHVfaW50MTZf
dCB0aW1lb3V0OyAgICAgICAgICAgIC8qMTJoICovCisKKyAgICB1X2ludDMyX3QgZGF0YV94ZmVy
X2xlbjsgICAgICAvKjE0aCAqLworICAgIHVfaW50MzJfdCBvcGNvZGU7ICAgICAgICAgICAgIC8q
MThoICovCisKKyAgICB1bmlvbiB7ICAgICAgICAgICAgICAgICAvKjFDaCAqLworICAgICAgICB1
X2ludDhfdCBiWzEyXTsKKyAgICAgICAgdV9pbnQxNl90IHNbNl07CisgICAgICAgIHVfaW50MzJf
dCB3WzNdOworICAgIH0gbWJveDsKKworICAgIHVuaW9uIG1yc2FzX3NnbCBzZ2w7ICAvKjI4aCAq
LworfTsKKyNwcmFnbWEgcGFjaygpCisKKyNwcmFnbWEgcGFjaygxKQorc3RydWN0IG1yc2FzX2Fi
b3J0X2ZyYW1lIHsKKyAgICB1X2ludDhfdCBjbWQ7ICAgICAgICAgICAgICAgICAvKjAwaCAqLwor
ICAgIHVfaW50OF90IHJlc2VydmVkXzA7ICAgICAgICAgIC8qMDFoICovCisgICAgdV9pbnQ4X3Qg
Y21kX3N0YXR1czsgICAgICAgICAgLyowMmggKi8KKworICAgIHVfaW50OF90IHJlc2VydmVkXzE7
ICAgICAgICAgIC8qMDNoICovCisgICAgdV9pbnQzMl90IHJlc2VydmVkXzI7ICAgICAgICAgLyow
NGggKi8KKworICAgIHVfaW50MzJfdCBjb250ZXh0OyAgICAgICAgICAgIC8qMDhoICovCisgICAg
dV9pbnQzMl90IHBhZF8wOyAgICAgICAgICAgICAgLyowQ2ggKi8KKworICAgIHVfaW50MTZfdCBm
bGFnczsgICAgICAgICAgICAgIC8qMTBoICovCisgICAgdV9pbnQxNl90IHJlc2VydmVkXzM7ICAg
ICAgICAgLyoxMmggKi8KKyAgICB1X2ludDMyX3QgcmVzZXJ2ZWRfNDsgICAgICAgICAvKjE0aCAq
LworCisgICAgdV9pbnQzMl90IGFib3J0X2NvbnRleHQ7ICAgICAgLyoxOGggKi8KKyAgICB1X2lu
dDMyX3QgcGFkXzE7ICAgICAgICAgICAgICAvKjFDaCAqLworCisgICAgdV9pbnQzMl90IGFib3J0
X21maV9waHlzX2FkZHJfbG87ICAgICAvKjIwaCAqLworICAgIHVfaW50MzJfdCBhYm9ydF9tZmlf
cGh5c19hZGRyX2hpOyAgICAgLyoyNGggKi8KKworICAgIHVfaW50MzJfdCByZXNlcnZlZF81WzZd
OyAgICAgIC8qMjhoICovCit9OworI3ByYWdtYSBwYWNrKCkKKworI3ByYWdtYSBwYWNrKDEpCitz
dHJ1Y3QgbXJzYXNfc21wX2ZyYW1lIHsKKyAgICB1X2ludDhfdCBjbWQ7ICAgICAgICAgICAgICAg
ICAvKjAwaCAqLworICAgIHVfaW50OF90IHJlc2VydmVkXzE7ICAgICAgICAgIC8qMDFoICovCisg
ICAgdV9pbnQ4X3QgY21kX3N0YXR1czsgICAgICAgICAgLyowMmggKi8KKyAgICB1X2ludDhfdCBj
b25uZWN0aW9uX3N0YXR1czsgICAvKjAzaCAqLworCisgICAgdV9pbnQ4X3QgcmVzZXJ2ZWRfMlsz
XTsgICAgICAgLyowNGggKi8KKyAgICB1X2ludDhfdCBzZ2VfY291bnQ7ICAgICAgICAgICAvKjA3
aCAqLworCisgICAgdV9pbnQzMl90IGNvbnRleHQ7ICAgICAgICAgICAgLyowOGggKi8KKyAgICB1
X2ludDMyX3QgcGFkXzA7ICAgICAgICAgICAgICAvKjBDaCAqLworCisgICAgdV9pbnQxNl90IGZs
YWdzOyAgICAgICAgICAgICAgLyoxMGggKi8KKyAgICB1X2ludDE2X3QgdGltZW91dDsgICAgICAg
ICAgICAvKjEyaCAqLworCisgICAgdV9pbnQzMl90IGRhdGFfeGZlcl9sZW47ICAgICAgLyoxNGgg
Ki8KKyAgICB1X2ludDY0X3Qgc2FzX2FkZHI7ICAgICAgICAgICAvKjE4aCAqLworCisgICAgdW5p
b24geworICAgICAgICBzdHJ1Y3QgbXJzYXNfc2dlMzIgc2dlMzJbMl07ICAvKiBbMF06IHJlc3Ag
WzFdOiByZXEgKi8KKyAgICAgICAgc3RydWN0IG1yc2FzX3NnZTY0IHNnZTY0WzJdOyAgLyogWzBd
OiByZXNwIFsxXTogcmVxICovCisgICAgfSBzZ2w7Cit9OworI3ByYWdtYSBwYWNrKCkKKworCisj
cHJhZ21hIHBhY2soMSkKK3N0cnVjdCBtcnNhc19zdHBfZnJhbWUgeworICAgIHVfaW50OF90IGNt
ZDsgICAgICAgICAgICAgICAgIC8qMDBoICovCisgICAgdV9pbnQ4X3QgcmVzZXJ2ZWRfMTsgICAg
ICAgICAgLyowMWggKi8KKyAgICB1X2ludDhfdCBjbWRfc3RhdHVzOyAgICAgICAgICAvKjAyaCAq
LworICAgIHVfaW50OF90IHJlc2VydmVkXzI7ICAgICAgICAgIC8qMDNoICovCisKKyAgICB1X2lu
dDhfdCB0YXJnZXRfaWQ7ICAgICAgICAgICAvKjA0aCAqLworICAgIHVfaW50OF90IHJlc2VydmVk
XzNbMl07ICAgICAgIC8qMDVoICovCisgICAgdV9pbnQ4X3Qgc2dlX2NvdW50OyAgICAgICAgICAg
LyowN2ggKi8KKworICAgIHVfaW50MzJfdCBjb250ZXh0OyAgICAgICAgICAgIC8qMDhoICovCisg
ICAgdV9pbnQzMl90IHBhZF8wOyAgICAgICAgICAgICAgLyowQ2ggKi8KKworICAgIHVfaW50MTZf
dCBmbGFnczsgICAgICAgICAgICAgIC8qMTBoICovCisgICAgdV9pbnQxNl90IHRpbWVvdXQ7ICAg
ICAgICAgICAgLyoxMmggKi8KKworICAgIHVfaW50MzJfdCBkYXRhX3hmZXJfbGVuOyAgICAgIC8q
MTRoICovCisKKyAgICB1X2ludDE2X3QgZmlzWzEwXTsgICAgICAgICAgICAvKjE4aCAqLworICAg
IHVfaW50MzJfdCBzdHBfZmxhZ3M7CisKKyAgICB1bmlvbiB7CisgICAgICAgIHN0cnVjdCBtcnNh
c19zZ2UzMiBzZ2UzMlsyXTsgIC8qIFswXTogcmVzcCBbMV06IGRhdGEgKi8KKyAgICAgICAgc3Ry
dWN0IG1yc2FzX3NnZTY0IHNnZTY0WzJdOyAgLyogWzBdOiByZXNwIFsxXTogZGF0YSAqLworICAg
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CXVfaW50MzJfdCBlY2FyOwor
CQkJdV9pbnQzMl90IGVsb2c7CisJCQljaGFyIHN0cls2NF07CisJCX0gX19wYWNrZWQgZWNjOwor
CisJCXVfaW50OF90IGJbOTZdOworCQl1X2ludDE2X3Qgc1s0OF07CisJCXVfaW50MzJfdCB3WzI0
XTsKKwkJdV9pbnQ2NF90IGRbMTJdOworCX0gYXJnczsKKworCWNoYXIgZGVzY3JpcHRpb25bMTI4
XTsKKworfSBfX3BhY2tlZDsKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogcGVyLWluc3RhbmNlIGRhdGEK
KyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq
KioqKioqKioqKioqKi8KK3N0cnVjdCBtcnNhc19zb2Z0YyB7CisgICAgZGV2aWNlX3QgICAgICAg
ICAgIG1yc2FzX2RldjsgICAgICAgICAvLyBidXMgZGV2aWNlCisgICAgc3RydWN0IGNkZXYgICAg
ICAgICptcnNhc19jZGV2OyAgICAgICAvLyBjb250cm9sbGVyIGRldmljZQorICAgIHVpbnQxNl90
ICAgICAgICAgICBkZXZpY2VfaWQ7ICAgICAgICAgLy8gcGNpIGRldmljZQorICAgIHN0cnVjdCBy
ZXNvdXJjZSAgICAqcmVnX3JlczsgICAgICAgICAgLy8gcmVnaXN0ZXIgaW50ZXJmYWNlIHdpbmRv
dworICAgIGludCAgICAgICAgICAgICAgICByZWdfcmVzX2lkOyAgICAgICAgLy8gcmVnaXN0ZXIg
cmVzb3VyY2UgaWQKKyAgICBidXNfc3BhY2VfdGFnX3QgICAgYnVzX3RhZzsgICAgICAgICAgIC8v
IGJ1cyBzcGFjZSB0YWcKKyAgICBidXNfc3BhY2VfaGFuZGxlX3QgYnVzX2hhbmRsZTsgICAgICAg
IC8vIGJ1cyBzcGFjZSBoYW5kbGUKKyAgICBidXNfZG1hX3RhZ190ICAgIC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ICAgICAvLyBsb2NrIGZvciByYWlk
IG1hcCBhY2Nlc3MvdXBkYXRlCisgICAgc3RydWN0IG10eCBhZW5fbG9jazsgICAgICAgICAgICAg
ICAgICAvLyBhZW4gbG9jaworICAgIHVpbnQzMl90ICAgICAgICAgICBtYXhfZndfY21kczsgICAg
ICAgLy8gTWF4IGNvbW1hbmRzIGZyb20gRlcKKyAgICB1aW50MzJfdCAgICAgICAgICAgbWF4X251
bV9zZ2U7ICAgICAgIC8vIE1heCBudW1iZXIgb2YgU0dFcworICAgIHN0cnVjdCByZXNvdXJjZSAg
ICAqbXJzYXNfaXJxOyAgICAgICAgLy8gaW50ZXJydXB0IGludGVyZmFjZSB3aW5kb3cKKyAgICB2
b2lkICAgICAgICAgICAgICAgKmludHJfaGFuZGxlOyAgICAgIC8vIGhhbmRsZQorICAgIGludCAg
ICAgICAgICAgICAgICBpcnFfaWQ7ICAgICAgICAgICAgLy8gaW50ciByZXNvdXJjZSBpZAorICAg
IHN0cnVjdCBtcnNhc19tcHRfY21kICAgKiptcHRfY21kX2xpc3Q7CisgICAgc3RydWN0IG1yc2Fz
X21maV9jbWQgICAqKm1maV9jbWRfbGlzdDsKKyAgICBUQUlMUV9IRUFEKCwgbXJzYXNfbXB0X2Nt
ZCkgbXJzYXNfbXB0X2NtZF9saXN0X2hlYWQ7CisgICAgVEFJTFFfSEVBRCgsIG1yc2FzX21maV9j
bWQpIG1yc2FzX21maV9jbWRfbGlzdF9oZWFkOworICAgIGJ1c19hZGRyX3QgICAgICAgICByZXFf
ZnJhbWVzX2Rlc2NfcGh5czsKKyAgICB1X2ludDhfdCAgICAgICAgICAgKnJlcV9mcmFtZXNfZGVz
YzsKKyAgICB1X2ludDhfdCAgICAgICAgICAgKnJlcV9kZXNjOworICAgIGJ1c19hZGRyX3QgICAg
ICAgICBpb19yZXF1ZXN0X2ZyYW1lc19waHlzOworICAgIHVfaW50OF90ICAgICAgICAgICAqaW9f
cmVxdWVzdF9mcmFtZXM7CisgICAgYnVzX2FkZHJfdCAgICAgICAgIHJlcGx5X2ZyYW1lc19kZXNj
X3BoeXM7CisgICAgdV9pbnQxNl90ICAgICAgICAgIGxhc3RfcmVwbHlfaWR4OworICAgIHVfaW50
MzJfdCAgICAgICAgICByZXBseV9xX2RlcHRoOworICAgIHVfaW50MzJfdCAgICAgICAgICByZXF1
ZXN0X2FsbG9jX3N6OworICAgIHVfaW50MzJfdCAgICAgICAgICByZXBseV9hbGxvY19zejsKKyAg
ICB1X2ludDMyX3QgICAgICAgICAgaW9fZnJhbWVzX2FsbG9jX3N6OworICAgIHVfaW50MzJfdCAg
ICAgICAgICBjaGFpbl9mcmFtZXNfYWxsb2Nfc3o7CisgICAgdV9pbnQxNl90ICAgICAgICAgIG1h
eF9zZ2VfaW5fbWFpbl9tc2c7CisgICAgdV9pbnQxNl90ICAgICAgICAgIG1heF9zZ2VfaW5fY2hh
aW47CisgICAgdV9pbnQ4X3QgICAgICAgICAgIGNoYWluX29mZnNldF9pb19yZXF1ZXN0OworICAg
IHVfaW50OF90ICAgICAgICAgICBjaGFpbl9vZmZzZXRfbWZpX3B0aHJ1OworICAgIHVfaW50MzJf
dCAgICAgICAgICBtYXBfc3o7CisgICAgdV9pbnQ2NF90ICAgICAgICAgIG1hcF9pZDsKKyAgICBz
dHJ1Y3QgbXJzYXNfbWZpX2NtZCAqbWFwX3VwZGF0ZV9jbWQ7CisgICAgc3RydWN0IG1yc2FzX21m
aV9jbWQgKmFlbl9jbWQ7CQorICAgIHVfaW50OF90ICAgICAgICAgICBmYXN0X3BhdGhfaW87Cisg
ICAgdm9pZCogICAgICAgICAgICAgIGNoYW47CisgICAgdm9pZCogICAgICAgICAgICAgIG9jcl9j
aGFuOworICAgIHVfaW50OF90ICAgICAgICAgICBhZHByZWNvdmVyeTsKKyAgICB1X2ludDhfdCAg
ICAgICAgICAgcmVtb3ZlX2luX3Byb2dyZXNzOworICAgIHVfaW50OF90ICAgICAgICAgICBvY3Jf
dGhyZWFkX2FjdGl2Z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1BST0JFX0RFRkFVTFQpOwogCX0KIAlyZXR1cm4gKEVO
WElPKTsKIH0K

--_003_08ba2a262fba45f687cdd3225f325110BN1PR07MB247namprd07pro_--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?08ba2a262fba45f687cdd3225f325110>