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pbnQgdG8gdGhlIGludm9rZWQgYmxvY2sKKyAgICAgIHdoZXJlIHRoZSBjYWxsZXIgdXNlcyB0aGUgQVBJIGFwcGxpY2FibGUgdG8gdGhlIGNpcGhlciB0eXBlCisgICAgICBzcGVjaWZpZWQgZm9yIHRoZSBibG9jay4KKyAgICAgPC9wYXJhPgorCisgICAgIDxwcm9ncmFtbGlzdGluZz4KKzwhW0NEQVRBWwora2VybmVsIGNyeXB0byBBUEkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICBJUFNFQyBMYXllcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKystLS0tLS0tLS0tLSsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8Cit8ICAgICAgICAgICB8ICAgICAgICAgICAgKDEpCit8IGdpdmNpcGhlciB8IDwtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLSAgZXNwX291dHB1dAorfCAgKHNlcWl2KSAgfCAtLS0rCisrLS0tLS0tLS0tLS0rICAgIHwKKyAgICAgICAgICAgICAgICAgfCAoMikKKystLS0tLS0tLS0tLSsgICAgfAorfCAgICAgICAgICAgfCA8LS0rICAgICAgICAgICAgICAgICgyKQorfCAgIGFlYWQgICAgfCA8LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0gIGVzcF9pbnB1dAorfCAgIChnY20pICAgfCAtLS0tLS0tLS0tLS0rCisrLS0tLS0tLS0tLS0rICAgICAgICAgICAgIHwKKyAgICAgIHwgKDMpICAgICAgICAgICAgICAgfCAoNSkKKyAgICAgIHYgICAgICAgICAgICAgICAgICAgdgorKy0tLS0tLS0tLS0tKyAgICAgICArLS0tLS0tLS0tLS0rCit8ICAgICAgICAgICB8ICAgICAgIHwgICAgICAgICAgIHwKK3wgYWJsa2NpcGhlcnwgICAgICAgfCAgIGFoYXNoICAgfAorfCAgIChjdHIpICAgfCAtLS0rICB8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WVvdXQ6IFRoZSBzZXR0bGluZyBkdXJhdGlvbiAoaW4gbXMpIGlzIHRoZSBhbW91bnQgb2YgdGltZQorICAgICAgICAgICAgICAgICAgICB0aGUgdHNjIHdhaXRzIHRvIGFsbG93IHRoZSB2b2x0YWdlIHRvIHNldHRsZSBhZnRlcgorICAgICAgICAgICAgICAgICAgICB0dXJuaW5nIG9uIHRoZSBkcml2ZXJzIGluIGRldGVjdGlvbiBtb2RlLgorICAgICAgICAgICAgICAgICAgICBWYWxpZCB2YWx1ZXM6IDAtMTEKKyAgICAgICAgICAgICAgICAgICAgMCA9ICAwLjAwOCBtcworICAgICAgICAgICAgICAgICAgICAxID0gIDAuMDEgbXMKKyAgICAgICAgICAgICAgICAgICAgMiA9ICAwLjAyIG1zCisgICAgICAgICAgICAgICAgICAgIDMgPSAgMC4wNCBtcworICAgICAgICAgICAgICAgICAgICA0ID0gIDAuMDggbXMKKyAgICAgICAgICAgICAgICAgICAgNSA9ICAwLjE2IG1zCisgICAgICAgICAgICAgICAgICAgIDYgPSAgMC4zMiBtcworICAgICAgICAgICAgICAgICAgICA3ID0gIDAuNjQgbXMKKyAgICAgICAgICAgICAgICAgICAgOCA9ICAxLjI4IG1zCisgICAgICAgICAgICAgICAgICAgIDkgPSAgMi41NiBtcworICAgICAgICAgICAgICAgICAgIDEwID0gIDUuMTIgbXMKKyAgICAgICAgICAgICAgICAgICAxMSA9IDEwLjI0IG1zCistIHRvdWNoX3RpbWVvdXQ6IFRoZSBjb250aW51b3VzIG51bWJlciBvZiBzY2FuIHBlcmlvZHMgaW4gd2hpY2ggdG91Y2ggaXMKKyAgICAgICAgICAgICAgICBub3QgZGV0ZWN0ZWQgYmVmb3JlIHRoZSBjb250cm9sbGVyIHJldHVybnMgdG8gaWRsZSBzdGF0ZS4KKyAgICAgICAgICAgICAgICBWYWxpZCB2YWx1ZXMgMC0yNTUuCistIGF2ZXJhZ2VfZGF0YTogTnVtYmVyIG9mIGRhdGEgc2FtcGxlcyB3aG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WNvbSxzcG1pLXBtaWMudHh0CkBAIC0xNSwxMCArMTUsMjEgQEAKIAogUmVxdWlyZWQgcHJvcGVydGllczoKIC0gY29tcGF0aWJsZTogICAgICBTaG91bGQgY29udGFpbiBvbmUgb2Y6Ci0gICAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg5NDEiCi0gICAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg4NDEiCi0gICAgICAgICAgICAgICAgICAgICAicWNvbSxwbWE4MDg0IgotICAgICAgICAgICAgICAgICAgICAgb3IgZ2VuZXJhbGl6ZWQgInFjb20sc3BtaS1wbWljIi4KKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg5NDEiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODg0MSIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1hODA4NCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04MDE5IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTgyMjYiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODExMCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1hODA4NCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1pODk2MiIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG1kOTYzNSIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04OTk0IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbWk4OTk0IiwKKyAgICAgICAgICAgICAgICAgICAicWNvbSxwbTg5MTYiLAorICAgICAgICAgICAgICAgICAgICJxY29tLHBtODAwNCIsCisgICAgICAgICAgICAgICAgICAgInFjb20scG04OTA5IiwKKyAgICAgICAgICAgICAgICAgICBvciBnZW5lcmFsaXplZCAicWNvbSxzcG1pLXBtaWMiLgogLSByZWc6ICAgICAgICAgICAgIFNwZWNpZmllcyB0aGUgU1BNSSBVU0lEIHNsYXZlIGFkZHJlc3MgZm9yIHRoaXMgZGV2aWNlLgogICAgICAgICAgICAgICAgICAgIEZvciBtb3J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TJzMl8xX2dycCIsICJpMnMyXzJfZ3JwIiwgImkyczJfM19ncnAiLCAiaTJzMl80X2dycCIKKworInNwZGlmIjogInNwZGlmX2dycCIKKworInB3bTAiOiAicHdtMF9ncnAiCisKKyJwd20xIjogInB3bTFfZ3JwIgorCisicHdtMiI6ICJwd20yX2dycCIKKworInB3bTMiOiAicHdtM19ncnAiCisKKyJwd200IjogInB3bTRfZ3JwIgorCisicHdtNSI6ICJwd201X2dycCIKKworImtleSI6ICJrZXkwX2dycCIsICJrZXkxX2dycCIsICJrZXkyX2dycCIsICJrZXkzX2dycCIsICJrZXk0X2dycCIsICJrZXk1X2dycCIsCisia2V5Nl9ncnAiLCAia2V5N19ncnAiLCAia2V5OF9ncnAiLCAia2V5OV9ncnAiLCAia2V5MTBfZ3JwIiwgImtleTExX2dycCIsCisia2V5MTJfZ3JwIiwgImtleTEzX2dycCIsICJrZXkxNF9ncnAiLCAia2V5MTVfZ3JwIgorCisiYXVkaW9fZHRlIjogImF1ZGlvX2R0ZTBfZ3JwIiwgImF1ZGlvX2R0ZTFfZ3JwIiwgImF1ZGlvX2R0ZTJfZ3JwIiwgImF1ZGlvX2R0ZTNfZ3JwIgorCisic21hcnRfY2FyZDAiOiAic21hcnRfY2FyZDBfZ3JwIiwgInNtYXJ0X2NhcmQwX2ZjYl9ncnAiCisKKyJzbWFydF9jYXJkMSI6ICJzbWFydF9jYXJkMV9ncnAiLCAic21hcnRfY2FyZDFfZmNiX2dycCIKKworInNwaTAiOiAic3BpMF9ncnAiCisKKyJzcGkxIjogInNwaTFfZ3JwIgorCisic3BpMiI6ICJzcGkyX2dycCIKKworInNwaTMiOiAic3BpM19ncnAiCisKKyJzcGk0IjogInNwaTRfMF9ncnAiLCAic3BpNF8xX2dycCIKKworInNwaTUiOiAic3BpNV9ncnAiCisKKyJzd19sZWQwIjogInN3X2xlZDBfMF9ncnAiLCAic3dfbGVkMF8xX2dycCIKKworInN3X2xlZDEiOiAic3dfbGVkMV9ncnAiCisKK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gICAgICAgICAgICAgICAgdG90YWxfVkZzIC0gMQorICAgICArLS0tLS0tKy0tLS0tLSstICAgICAtKy0tLS0tLSstLS0tLS0rCisgICAgIHwgICAgICB8ICAgICAgfCAgLi4uICB8ICAgICAgfCAgICAgIHwKKyAgICAgKy0tLS0tLSstLS0tLS0rLSAgICAgLSstLS0tLS0rLS0tLS0tKworCisgICAgICAgICAgICAgICAgICAgICAgICAgICBWRihuKSBCQVIgc3BhY2UKKworICAgICAwICAgICAgMSAgICAgICAgICAgICAgICAgICAgIHRvdGFsX1ZGcyAtIDEgICAgICAgICAgICAgICAgMjU1CisgICAgICstLS0tLS0rLS0tLS0tKy0gICAgIC0rLS0tLS0tKy0tLS0tLSstICAgICAgLSstLS0tLS0rLS0tLS0tKworICAgICB8ICAgICAgfCAgICAgIHwgIC4uLiAgfCAgICAgIHwgICAgICB8ICAgLi4uICB8ICAgICAgfCAgICAgIHwKKyAgICAgKy0tLS0tLSstLS0tLS0rLSAgICAgLSstLS0tLS0rLS0tLS0tKy0gICAgICAtKy0tLS0tLSstLS0tLS0rCisKKyAgICAgICAgICAgICAgICAgICAgICAgICAgIE02NCB3aW5kb3cKKworCQlGaWd1cmUgMS4wIERpcmVjdCBtYXAgVkYobikgQkFSIHNwYWNlCisKKyAgT3VyIGN1cnJlbnQgc29sdXRpb24gaXMgdG8gYWxsb2NhdGUgMjU2IHNlZ21lbnRzIGV2ZW4gaWYgdGhlIFZGKG4pIEJBUgorICBzcGFjZSBkb2Vzbid0IG5lZWQgdGhhdCBtdWNoLCBhcyBzaG93biBpbiBGaWd1cmUgMS4xOgorCisgICAgIDAgICAgICAxICAgICAgICAgICAgICAgICAgICAgdG90YWxfVkZzIC0gMSAgICAgICAgICAgICAgICAyNTUKKyAgICAgKy0tLS0tLSstLS0tLS0rLSAgICAgLSstLS0tLS0rLS0tLS0tKy0gICAgICAtKy0tLS0tLSstLS0tLS0rCisgICAgIHwgICAgICB8ICAgICAgfCAgLi4uICB8ICAgICAgfCA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BhcmFtcworCisKK1RoZSBBTFNBIEFQSSBhbHNvIHByb3ZpZGUgYW4gYXVkaW9fdHN0YW1wIHdoaWNoIHJlZmxlY3RzIHRoZSBwYXNzYWdlCitvZiB0aW1lIGFzIG1lYXN1cmVkIGJ5IGRpZmZlcmVudCBjb21wb25lbnRzIG9mIGF1ZGlvIGhhcmR3YXJlLiAgSW4KK2FzY2lpLWFydCwgdGhpcyBjb3VsZCBiZSByZXByZXNlbnRlZCBhcyBmb2xsb3dzIChmb3IgdGhlIHBsYXliYWNrCitjYXNlKToKKworCistLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLT4gdGltZQorICBeICAgICAgICAgICAgICAgXiAgICAgICAgICAgICAgXiAgICAgICAgICAgICAgICBeICAgICAgICAgICBeCisgIHwgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgIHwgICAgICAgICAgIHwKKyBhbmFsb2cgICAgICAgICBsaW5rICAgICAgICAgICAgZG1hICAgICAgICAgICAgICBhcHAgICAgICAgRnVsbEJ1ZmZlcgorIHRpbWUgICAgICAgICAgIHRpbWUgICAgICAgICAgIHRpbWUgICAgICAgICAgICAgIHRpbWUgICAgICAgIHRpbWUKKyAgfCAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgfCAgICAgICAgICAgfAorICB8PCBjb2RlYyBkZWxheSA+fDwtLWh3IGRlbGF5LS0+fDxxdWV1ZWQgc2FtcGxlcz58PC0tLWF2YWlsLT58CisgIHw8LS0tLS0tLS0tLS0tLS0tLS0gZGVsYXktLS0tLS0tLS0tLS0tLS0tLS0tLS0tPnwgICAgICAgICAgIHwKKwkJCSAgICAgICAgIHw8LS0tLXJpbmcgYnVmZmVyIGxlbmd0aC0tLS0+fAorCitUaGUgYW5hbG9nIHRpbWUgaXMgdGFrZW4gYXQgdGhlIGxhc3Qgc3RhZ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i8KK2ludCB1bmVzcGNhcGUoY2hhciAqX2RzdCwgY2hhciAqX3NyYywgc2l6ZV90IGxlbikKK3sKKwlpbnQgcmV0ID0gMDsKKwljaGFyICpzcmMgPSBfc3JjOworCWNoYXIgKmRzdCA9IF9kc3Q7CisJdW5zaWduZWQgaW50IGNoOworCisJd2hpbGUgKCpzcmMpIHsKKwkJaWYgKCpzcmMgPT0gJ1xcJyAmJiAqKHNyYysxKSA9PSAneCcpIHsKKwkJCXNzY2FuZihzcmMgKyAyLCAiJTJ4IiwgJmNoKTsKKwkJCXNyYyArPSA0OworCQkJKmRzdCsrID0gKHVuc2lnbmVkIGNoYXIpY2g7CisJCX0gZWxzZSB7CisJCQkqZHN0KysgPSAqc3JjKys7CisJCX0KKwkJcmV0Kys7CisJfQorCXJldHVybiByZXQ7Cit9CisKK3N0YXRpYyB2b2lkIHRyYW5zZmVyKGludCBmZCwgdWludDhfdCBjb25zdCAqdHgsIHVpbnQ4X3QgY29uc3QgKnJ4LCBzaXplX3QgbGVuKQogewogCWludCByZXQ7Ci0JdWludDhfdCB0eFtdID0gewotCQkweEZGLCAweEZGLCAweEZGLCAweEZGLCAweEZGLCAweEZGLAotCQkweDQwLCAweDAwLCAweDAwLCAweDAwLCAweDAwLCAweDk1LAotCQkweEZGLCAweEZGLCAweEZGLCAweEZGLCAweEZGLCAweEZGLAotCQkweEZGLCAweEZGLCAweEZGLCAweEZGLCAweEZGLCAweEZGLAotCQkweEZGLCAweEZGLCAweEZGLCAweEZGLCAweEZGLCAweEZGLAotCQkweERFLCAweEFELCAweEJFLCAweEVGLCAweEJBLCAweEFELAotCQkweEYwLCAweDBELAotCX07Ci0JdWludDhfdCByeFtBUlJBWV9TSVpFKHR4KV0gPSB7MCwgfTsKKwogCXN0cnVjdCBzcGlfaW9jX3RyYW5zZmVyIHRyID0gewogCQkudHhfYnVmID0gKHVuc2lnbmVkIGxvbmcpdHgsCiAJCS5yeF9idWYgPSAodW5zaWduZWQgbG9uZylyeCwKLQ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X3VuZXZpY3RhYmxlX2FsbG93ZWQKIC0gZGlydHlfYmFja2dyb3VuZF9ieXRlcwogLSBkaXJ0eV9iYWNrZ3JvdW5kX3JhdGlvCiAtIGRpcnR5X2J5dGVzCkBAIC0xMDYsNiArMTA3LDE2IEBACiAKID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09CiAKK2NvbXBhY3RfdW5ldmljdGFibGVfYWxsb3dlZAorCitBdmFpbGFibGUgb25seSB3aGVuIENPTkZJR19DT01QQUNUSU9OIGlzIHNldC4gV2hlbiBzZXQgdG8gMSwgY29tcGFjdGlvbiBpcworYWxsb3dlZCB0byBleGFtaW5lIHRoZSB1bmV2aWN0YWJsZSBscnUgKG1sb2NrZWQgcGFnZXMpIGZvciBwYWdlcyB0byBjb21wYWN0LgorVGhpcyBzaG91bGQgYmUgdXNlZCBvbiBzeXN0ZW1zIHdoZXJlIHN0YWxscyBmb3IgbWlub3IgcGFnZSBmYXVsdHMgYXJlIGFuCithY2NlcHRhYmxlIHRyYWRlIGZvciBsYXJnZSBjb250aWd1b3VzIGZyZWUgbWVtb3J5LiAgU2V0IHRvIDAgdG8gcHJldmVudAorY29tcGFjdGlvbiBmcm9tIG1vdmluZyBwYWdlcyB0aGF0IGFyZSB1bmV2aWN0YWJsZS4gIERlZmF1bHQgdmFsdWUgaXMgMS4KKworPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KKwogZGlydHlfYmFja2dyb3VuZF9ieXRlcwogCiBDb250YWlucyB0aGUgYW1vdW50IG9mIGRpcnR5IG1lbW9yeSBhdCB3aGljaCB0aGUgYmFja2dyb3VuZCBrZXJuZWwKZGlmZiAtLWdpdCBhL0RvY3VtZW50YXRpb24vdGltZXJzL05PX0haLnR4dCBiL0RvY3VtZW50YXRpb24vdGltZXJzL05PX0haLnR4dAppbmRleCBjY2ExMjJmLi42ZWFmNTc2IDE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uYW1lPi4gSGVyZSBpcyBhIHNhbXBsZSBvZiBzdGF0IG91dHB1dDoKKworIyBjYXQgL3N5cy9rZXJuZWwvZGVidWcvenNtYWxsb2MvenJhbTAvY2xhc3NlcworCisgY2xhc3MgIHNpemUgYWxtb3N0X2Z1bGwgYWxtb3N0X2VtcHR5IG9ial9hbGxvY2F0ZWQgICBvYmpfdXNlZCBwYWdlc191c2VkIHBhZ2VzX3Blcl96c3BhZ2UKKyAgICAuLgorICAgIC4uCisgICAgIDkgICAxNzYgICAgICAgICAgIDAgICAgICAgICAgICAxICAgICAgICAgICAxODYgICAgICAgIDEyOSAgICAgICAgICA4ICAgICAgICAgICAgICAgIDQKKyAgICAxMCAgIDE5MiAgICAgICAgICAgMSAgICAgICAgICAgIDAgICAgICAgICAgMjg4MCAgICAgICAyODcyICAgICAgICAxMzUgICAgICAgICAgICAgICAgMworICAgIDExICAgMjA4ICAgICAgICAgICAwICAgICAgICAgICAgMSAgICAgICAgICAgODE5ICAgICAgICA3OTUgICAgICAgICA0MiAgICAgICAgICAgICAgICAyCisgICAgMTIgICAyMjQgICAgICAgICAgIDAgICAgICAgICAgICAxICAgICAgICAgICAyMTkgICAgICAgIDE1OSAgICAgICAgIDEyICAgICAgICAgICAgICAgIDQKKyAgICAuLgorICAgIC4uCisKKworY2xhc3M6IGluZGV4CitzaXplOiBvYmplY3Qgc2l6ZSB6c3BhZ2Ugc3RvcmVzCithbG1vc3RfZW1wdHk6IHRoZSBudW1iZXIgb2YgWlNfQUxNT1NUX0VNUFRZIHpzcGFnZXMoc2VlIGJlbG93KQorYWxtb3N0X2Z1bGw6IHRoZSBudW1iZXIgb2YgWlNfQUxNT1NUX0ZVTEwgenNwYWdlcyhzZWUgYmVsb3cpCitvYmpfYWxsb2NhdGVkOiB0aGUgbnVtYmVyIG9mIG9iamVjdHMgYWxsb2NhdGVkCitvYmpfdXNlZDogdGhlIG51bWJlciBvZiBvYmplY3RzIGFsbG9jYXRlZCB0byB0aGUgdXNlcg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1Y3QgYWVzX2Jsb2NrIHsKKwl1OCBiW0FFU19CTE9DS19TSVpFXTsKK307CisKK3N0YXRpYyBpbnQgbnVtX3JvdW5kcyhzdHJ1Y3QgY3J5cHRvX2Flc19jdHggKmN0eCkKK3sKKwkvKgorCSAqICMgb2Ygcm91bmRzIHNwZWNpZmllZCBieSBBRVM6CisJICogMTI4IGJpdCBrZXkJCTEwIHJvdW5kcworCSAqIDE5MiBiaXQga2V5CQkxMiByb3VuZHMKKwkgKiAyNTYgYml0IGtleQkJMTQgcm91bmRzCisJICogPT4gbiBieXRlIGtleQk9PiA2ICsgKG4vNCkgcm91bmRzCisJICovCisJcmV0dXJuIDYgKyBjdHgtPmtleV9sZW5ndGggLyA0OworfQorCitzdGF0aWMgaW50IGNlX2Flc19leHBhbmRrZXkoc3RydWN0IGNyeXB0b19hZXNfY3R4ICpjdHgsIGNvbnN0IHU4ICppbl9rZXksCisJCQkgICAgdW5zaWduZWQgaW50IGtleV9sZW4pCit7CisJLyoKKwkgKiBUaGUgQUVTIGtleSBzY2hlZHVsZSByb3VuZCBjb25zdGFudHMKKwkgKi8KKwlzdGF0aWMgdTggY29uc3QgcmNvbltdID0geworCQkweDAxLCAweDAyLCAweDA0LCAweDA4LCAweDEwLCAweDIwLCAweDQwLCAweDgwLCAweDFiLCAweDM2LAorCX07CisKKwl1MzIga3dvcmRzID0ga2V5X2xlbiAvIHNpemVvZih1MzIpOworCXN0cnVjdCBhZXNfYmxvY2sgKmtleV9lbmMsICprZXlfZGVjOworCWludCBpLCBqOworCisJaWYgKGtleV9sZW4gIT0gQUVTX0tFWVNJWkVfMTI4ICYmCisJICAgIGtleV9sZW4gIT0gQUVTX0tFWVNJWkVfMTkyICYmCisJICAgIGtleV9sZW4gIT0gQUVTX0tFWVNJWkVfMjU2KQorCQlyZXR1cm4gLUVJTlZBTDsKKworCW1lbWNweShjdHgtPmtleV9lbmMsIGluX2tleSwga2V5X2xlbik7CisJY3R4LT5rZXlfbGVuZ3RoID0ga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KwlhbmQJcjMscjMscjEyCisJYWRkCXI3LHI3LHIxMQorCWFkZAlyMTEscjExLHIwLHJvciMyCisJZW9yCXIzLHIzLHI1CisJYWRkCXIxMCxyMTAscjIKKwllb3IJcjIscjgscjkKKwllb3IJcjAscjcscjcscm9yIzUKKwlhZGQJcjExLHIxMSxyMworCWFuZAlyMixyMixyNworCWVvcglyMyxyMCxyNyxyb3IjMTkKKwllb3IJcjAscjExLHIxMSxyb3IjMTEKKwllb3IJcjIscjIscjkKKwlhZGQJcjEwLHIxMCxyMyxyb3IjNgorCWVvcglyMyxyMTEscjQKKwllb3IJcjAscjAscjExLHJvciMyMAorCWFkZAlyMTAscjEwLHIyCisJbGRyCXIyLFtzcCwjOF0KKwlhbmQJcjEyLHIxMixyMworCWFkZAlyNixyNixyMTAKKwlhZGQJcjEwLHIxMCxyMCxyb3IjMgorCWVvcglyMTIscjEyLHI0CisJYWRkCXI5LHI5LHIyCisJZW9yCXIyLHI3LHI4CisJZW9yCXIwLHI2LHI2LHJvciM1CisJYWRkCXIxMCxyMTAscjEyCisJYW5kCXIyLHIyLHI2CisJZW9yCXIxMixyMCxyNixyb3IjMTkKKwllb3IJcjAscjEwLHIxMCxyb3IjMTEKKwllb3IJcjIscjIscjgKKwlhZGQJcjkscjkscjEyLHJvciM2CisJZW9yCXIxMixyMTAscjExCisJZW9yCXIwLHIwLHIxMCxyb3IjMjAKKwlhZGQJcjkscjkscjIKKwlsZHIJcjIsW3NwLCMxMl0KKwlhbmQJcjMscjMscjEyCisJYWRkCXI1LHI1LHI5CisJYWRkCXI5LHI5LHIwLHJvciMyCisJZW9yCXIzLHIzLHIxMQorCWFkZAlyOCxyOCxyMgorCWVvcglyMixyNixyNworCWVvcglyMCxyNSxyNSxyb3IjNQorCWFkZAlyOSxyOSxyMworCWFuZAlyMixyMixyNQorCWVvcglyMyxyMCxyNSxyb3IjMTkKKwllb3IJcjAscjkscjkscm9yIzExCisJZW9yCXIyLHIyLHI3CisJYWRkCXI4LHI4LHIzLHJvciM2CisJZW9yCXIzLHI5LHIxMAorCWVvcglyMCxyMCxyOSxyb3IjMjAKKwlhZGQJcjgscjgscjIKKwlsZHIJcjIsW3NwLCMxNl0KKwlhbmQJcjEyLHIxMixyMworCWFkZAlyNCxyNCxyOAorCWFkZAlyOCxyOCxyMCxyb3IjMgorCWVvcglyMTIscjEyLHIxMAorCXZzdDEuMzIJe3E4fSxbcjEsOjEyOF0hCisJYWRkCXI3LHI3LHIyCisJZW9yCXIyLHI1LHI2CisJZW9yCXIwLHI0LHI0LHJvciM1CisJYWRkCXI4LHI4LHIxMgorCXZsZDEuMzIJe3E4fSxbcjE0LDoxMjhdIQorCWFuZAlyMixyMixyNAorCWVvcglyMTIscjAscjQscm9yIzE5CisJZW9yCXIwLHI4LHI4LHJvciMxMQorCWVvcglyMixyMixyNgorCXZyZXYzMi44CXExLHExCisJYWRkCXI3LHI3LHIxMixyb3IjNgorCWVvcglyMTIscjgscjkKKwllb3IJcjAscjAscjgscm9yIzIwCisJYWRkCXI3LHI3LHIyCisJdmFkZC5pMzIJcTgscTgscTEKKwlsZHIJcjIsW3NwLCMyMF0KKwlhbmQJcjMscjMscjEyCisJYWRkCXIxMSxyMTEscjcKKwlhZGQJcjcscjcscjAscm9yIzIKKwllb3IJcjMscjMscjkKKwlhZGQJcjYscjYscjIKKwllb3IJcjIscjQscjUKKwllb3IJcjAscjExLHIxMSxyb3IjNQorCWFkZAlyNyxyNyxyMworCWFuZAlyMixyMixyMTEKKwllb3IJcjMscjAscjExLHJvciMxOQorCWVvcglyMCxyNyxyNyxyb3IjMTEKKwllb3IJcjIscjIscjUKKwlhZGQJcjYscjYscjMscm9yIzYKKwllb3IJcjMscjcscjgKKwllb3IJcjAscjAscjcscm9yIzIwCisJYWRkCXI2LHI2LHIyCisJbGRyCXIyLFtzcCwjMjRdCisJYW5kCXIxMixyMTIscjMKKwlhZGQJcjEwLHIxMCxyNgorCWFkZAlyNixyNixyMCxyb3IjMgorCWVvcglyMTIsc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lhZGQJcjExLHIxMSxyMTIscm9yIzYKKwllb3IJcjEyLHI0LHI1CisJZW9yCXIwLHIwLHI0LHJvciMyMAorCWFkZAlyMTEscjExLHIyCisJdmFkZC5pMzIJcTgscTgscTIKKwlsZHIJcjIsW3NwLCMzNl0KKwlhbmQJcjMscjMscjEyCisJYWRkCXI3LHI3LHIxMQorCWFkZAlyMTEscjExLHIwLHJvciMyCisJZW9yCXIzLHIzLHI1CisJYWRkCXIxMCxyMTAscjIKKwllb3IJcjIscjgscjkKKwllb3IJcjAscjcscjcscm9yIzUKKwlhZGQJcjExLHIxMSxyMworCWFuZAlyMixyMixyNworCWVvcglyMyxyMCxyNyxyb3IjMTkKKwllb3IJcjAscjExLHIxMSxyb3IjMTEKKwllb3IJcjIscjIscjkKKwlhZGQJcjEwLHIxMCxyMyxyb3IjNgorCWVvcglyMyxyMTEscjQKKwllb3IJcjAscjAscjExLHJvciMyMAorCWFkZAlyMTAscjEwLHIyCisJbGRyCXIyLFtzcCwjNDBdCisJYW5kCXIxMixyMTIscjMKKwlhZGQJcjYscjYscjEwCisJYWRkCXIxMCxyMTAscjAscm9yIzIKKwllb3IJcjEyLHIxMixyNAorCWFkZAlyOSxyOSxyMgorCWVvcglyMixyNyxyOAorCWVvcglyMCxyNixyNixyb3IjNQorCWFkZAlyMTAscjEwLHIxMgorCWFuZAlyMixyMixyNgorCWVvcglyMTIscjAscjYscm9yIzE5CisJZW9yCXIwLHIxMCxyMTAscm9yIzExCisJZW9yCXIyLHIyLHI4CisJYWRkCXI5LHI5LHIxMixyb3IjNgorCWVvcglyMTIscjEwLHIxMQorCWVvcglyMCxyMCxyMTAscm9yIzIwCisJYWRkCXI5LHI5LHIyCisJbGRyCXIyLFtzcCwjNDRdCisJYW5kCXIzLHIzLHIxMgorCWFkZAlyNSxyNSxyOQorCWFkZAlyOSxyOSxyMCxyb3IjMgorCWVvcglyMyxyMyxyMTEKKwlhZGQJcjgscjgscjIKKwllb3IJcjIscjYscjcKKwllb3IJ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2l0IGEvYXJjaC9oZXhhZ29uL2luY2x1ZGUvYXNtL3RocmVhZF9pbmZvLmggYi9hcmNoL2hleGFnb24vaW5jbHVkZS9hc20vdGhyZWFkX2luZm8uaAppbmRleCBiYWNkM2Q2Li5iODBmZTFkIDEwMDY0NAotLS0gYS9hcmNoL2hleGFnb24vaW5jbHVkZS9hc20vdGhyZWFkX2luZm8uaAorKysgYi9hcmNoL2hleGFnb24vaW5jbHVkZS9hc20vdGhyZWFkX2luZm8uaApAQCAtNDcsNyArNDcsNiBAQAogCiBzdHJ1Y3QgdGhyZWFkX2luZm8gewogCXN0cnVjdCB0YXNrX3N0cnVjdAkqdGFzazsJCS8qIG1haW4gdGFzayBzdHJ1Y3R1cmUgKi8KLQlzdHJ1Y3QgZXhlY19kb21haW4gICAgICAqZXhlY19kb21haW47ICAgLyogZXhlY3V0aW9uIGRvbWFpbiAqLwogCXVuc2lnbmVkIGxvbmcJCWZsYWdzOyAgICAgICAgICAvKiBsb3cgbGV2ZWwgZmxhZ3MgKi8KIAlfX3UzMiAgICAgICAgICAgICAgICAgICBjcHU7ICAgICAgICAgICAgLyogY3VycmVudCBjcHUgKi8KIAlpbnQgICAgICAgICAgICAgICAgICAgICBwcmVlbXB0X2NvdW50OyAgLyogMD0+cHJlZW1wdGlibGUsPDA9PkJVRyAqLwpAQCAtNzcsNyArNzYsNiBAQAogI2RlZmluZSBJTklUX1RIUkVBRF9JTkZPKHRzaykgICAgICAgICAgICAgICAgICAgXAogeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCS50YXNrICAgICAgICAgICA9ICZ0c2ssICAgICAgICAgICAgICAgICBcCi0JLmV4ZWNfZG9tYWluICAgID0gJmRlZmF1bHRfZXhlY19kb21haW4sIFwKIAkuZmxhZ3MgICAgICAgICAgPSAwLCAgICAgICAgICAgICAgICAgICAgXAogCS5jcHUgICAgICAgICAgICA9IDAsICAgICAgICAgICAgICAgICAgICBcCiAJLnByZWVtc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RF9JVihySTIsIDgpCisJY21wd2kJCXJLVCwwCisJTE9BRF9JVihySTMsIDEyKQorCWJ0CQllcSxwcGNfZW5jcnlwdF94dHNfbm90d2VhaworCW1yCQlyS1AscktUCisJU1RBUlRfS0VZKHJJMCwgckkxLCBySTIsIHJJMykKKwlibAkJcHBjX2VuY3J5cHRfYmxvY2sKKwl4b3IJCXJJMCxyRDAsclcwCisJeG9yCQlySTEsckQxLHJXMQorCXhvcgkJckkyLHJEMixyVzIKKwl4b3IJCXJJMyxyRDMsclczCitwcGNfZW5jcnlwdF94dHNfbm90d2VhazoKKwlFTkRJQU5fU1dBUChyRzAsIHJHMSwgckkwLCBySTEpCisJRU5ESUFOX1NXQVAockcyLCByRzMsIHJJMiwgckkzKQorcHBjX2VuY3J5cHRfeHRzX2xvb3A6CisJTE9BRF9EQVRBKHJEMCwgMCkKKwltcgkJcktQLHJLUworCUxPQURfREFUQShyRDEsIDQpCisJc3ViaQkJckxOLHJMTiwxNgorCUxPQURfREFUQShyRDIsIDgpCisJTE9BRF9EQVRBKHJEMywgMTIpCisJeG9yCQlyRDAsckQwLHJJMAorCXhvcgkJckQxLHJEMSxySTEKKwl4b3IJCXJEMixyRDIsckkyCisJeG9yCQlyRDMsckQzLHJJMworCVNUQVJUX0tFWShyRDAsIHJEMSwgckQyLCByRDMpCisJYmwJCXBwY19lbmNyeXB0X2Jsb2NrCisJeG9yCQlyRDAsckQwLHJXMAorCXhvcgkJckQxLHJEMSxyVzEKKwl4b3IJCXJEMixyRDIsclcyCisJeG9yCQlyRDMsckQzLHJXMworCXhvcgkJckQwLHJEMCxySTAKKwlTQVZFX0RBVEEockQwLCAwKQorCXhvcgkJckQxLHJEMSxySTEKKwlTQVZFX0RBVEEockQxLCA0KQorCXhvcgkJckQyLHJEMixySTIKKwlTQVZFX0RBVEEockQyLCA4KQorCXhvcgkJckQzLHJEMyxySTMKKwlTQVZFX0RBVEEockQzLCAxMikKKwlHRjEyOF9NVUwockcwLCByRzEsIHJHMi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RfS0VZKHJJMCwgckkxLCBySTIsIHJJMykKKwlibAkJcHBjX2VuY3J5cHRfYmxvY2sKKwl4b3IJCXJJMCxyRDAsclcwCisJeG9yCQlySTEsckQxLHJXMQorCXhvcgkJckkyLHJEMixyVzIKKwl4b3IJCXJJMyxyRDMsclczCisJYWRkaQkJclQwLHJUMCw0MDk2CitwcGNfZGVjcnlwdF94dHNfbm90d2VhazoKKwlFTkRJQU5fU1dBUChyRzAsIHJHMSwgckkwLCBySTEpCisJRU5ESUFOX1NXQVAockcyLCByRzMsIHJJMiwgckkzKQorcHBjX2RlY3J5cHRfeHRzX2xvb3A6CisJTE9BRF9EQVRBKHJEMCwgMCkKKwltcgkJcktQLHJLUworCUxPQURfREFUQShyRDEsIDQpCisJc3ViaQkJckxOLHJMTiwxNgorCUxPQURfREFUQShyRDIsIDgpCisJTE9BRF9EQVRBKHJEMywgMTIpCisJeG9yCQlyRDAsckQwLHJJMAorCXhvcgkJckQxLHJEMSxySTEKKwl4b3IJCXJEMixyRDIsckkyCisJeG9yCQlyRDMsckQzLHJJMworCVNUQVJUX0tFWShyRDAsIHJEMSwgckQyLCByRDMpCisJYmwJCXBwY19kZWNyeXB0X2Jsb2NrCisJeG9yCQlyRDAsckQwLHJXMAorCXhvcgkJckQxLHJEMSxyVzEKKwl4b3IJCXJEMixyRDIsclcyCisJeG9yCQlyRDMsckQzLHJXMworCXhvcgkJckQwLHJEMCxySTAKKwlTQVZFX0RBVEEockQwLCAwKQorCXhvcgkJckQxLHJEMSxySTEKKwlTQVZFX0RBVEEockQxLCA0KQorCXhvcgkJckQyLHJEMixySTIKKwlTQVZFX0RBVEEockQyLCA4KQorCXhvcgkJckQzLHJEMyxySTMKKwlTQVZFX0RBVEEockQzLCAxMikKKwlHRjEyOF9NVUwockcwLCByRzEsIHJHMiwgckczLCByVzApCisJRU5ESUFOX1NXQVAockkwLCBySTEsIHJHMCwgckcxKQorCUVORElBTl9TV0FQKHJJMiwgckkzLCByRzIsIHJHMykKKw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SovIFwKKwlyb3Ryd2kJCWEsYSwyOwkJLyogMjogQiA9IEIgcm90bCAzMAkJKi8gXAorCW9yCQlyVDIsclQyLHJUMDsJLyogMjogRiA9IEYnIG9yIEYiCQkqLyBcCisJcm90cndpCQlyVDAsZSwyNzsJLyogMjogQScgPSBBIHJvdGwgNQkJKi8gXAorCWFkZAkJZCxkLHJUMjsJLyogMjogRSA9IEUgKyBGCQkJKi8gXAorCWFkZAkJZCxkLHJUMAkJLyogMjogRSA9IEUgKyBBJwkJKi8KKworI2RlZmluZSBSXzYwXzc5KGEsIGIsIGMsIGQsIGUsIHcwLCB3MSwgdzQsIHc2LCB3NywgaykgXAorCVJfMjBfMzkoYSwgYiwgYywgZCwgZSwgdzAsIHcxLCB3NCwgdzYsIHc3LCBrKQorCitfR0xPQkFMKHBwY19zcGVfc2hhMV90cmFuc2Zvcm0pCisJSU5JVElBTElaRQorCisJbHd6CQlySDAsMChySFApCisJbHd6CQlySDEsNChySFApCisJbXRjdHIJCXI1CisJbHd6CQlySDIsOChySFApCisJbGlzCQlyS1AsUFBDX1NQRV9TSEExX0tAaAorCWx3egkJckgzLDEyKHJIUCkKKwlvcmkJCXJLUCxyS1AsUFBDX1NQRV9TSEExX0tAbAorCWx3egkJckg0LDE2KHJIUCkKKworcHBjX3NwZV9zaGExX21haW46CisJUl8wMF8xNShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclcxLCByVzAsIDEsIDApCisJUl8wMF8xNShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclcyLCByVzEsIDAsIDgpCisJUl8wMF8xNShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclczLCByVzIsIDAsIDE2KQorCVJfMDBfMTUockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNCwgclczLCAwLCAyNCkKKwlSXzAwXzE1KHJIMiwgckgzLCBySDQsIHJIMCwgckgxLCByVzUsIHJXNCwgMCwgMzIpCisJUl8wMF8xNShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclc2LCByVzUsIDAsIDQwKQorCVJfMDBfMTUockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJUMywgclc2LCAwLCA0OCkKKwlSXzAwXzE1KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVDMsIHJXNywgMCwgNTYpCisKKwlSXzE2XzE5KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzAsIHJXMSwgclc0LCByVzYsIHJXNywgMCkKKwlSXzE2XzE5KHJIMiwgckgzLCBySDQsIHJIMCwgckgxLCByVzEsIHJXMiwgclc1LCByVzcsIHJXMCwgMikKKworCVJfMjBfMzkockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXMiwgclczLCByVzYsIHJXMCwgclcxLCAwKQorCVJfMjBfMzkockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXMywgclc0LCByVzcsIHJXMSwgclcyLCAwKQorCVJfMjBfMzkockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXNCwgclc1LCByVzAsIHJXMiwgclczLCAwKQorCVJfMjBfMzkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNSwgclc2LCByVzEsIHJXMywgclc0LCAwKQorCVJfMjBfMzkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXNiwgclc3LCByVzIsIHJXNCwgclc1LCAwKQorCVJfMjBfMzkockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJXNywgclcwLCByVzMsIHJXNSwgclc2LCAwKQorCVJfMjBfMzkockgzLCBySDQsIHJIMCwgckgxLCBySDIsIHJXMCwgclcxLCByVzQsIHJXNiwgclc3LCAwKQorCVJfMjBfMzkockgxLCBySDIsIHJIMywgckg0LCBySDAsIHJXMSwgclcyLCByVzUsIHJXNywgclcwLCAwKQorCVJfMjBfMzkockg0LCBySDAsIHJIMSwgckgyLCBySDMsIHJXMiwgclczLCByVzYsIHJXMCwgclcxLCAwKQorCVJfMjBfMzkockgyLCBySDMsIHJINCwgckgwLCBySDEsIHJXMywgclc0LCByVzcsIHJXMSwgclcyLCAzKQorCisJUl80MF81OShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclc0LCByVzUsIHJXMCwgclcyLCByVzMsIDApCisJUl80MF81OShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclc1LCByVzYsIHJXMSwgclczLCByVzQsIDApCisJUl80MF81OShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclc2LCByVzcsIHJXMiwgclc0LCByVzUsIDApCisJUl80MF81OShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclc3LCByVzAsIHJXMywgclc1LCByVzYsIDApCisJUl80MF81OShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclcwLCByVzEsIHJXNCwgclc2LCByVzcsIDApCisJUl80MF81OShySDAsIHJIMSwgckgyLCBySDMsIHJINCwgclcxLCByVzIsIHJXNSwgclc3LCByVzAsIDApCisJUl80MF81OShySDMsIHJINCwgckgwLCBySDEsIHJIMiwgclcyLCByVzMsIHJXNiwgclcwLCByVzEsIDApCisJUl80MF81OShySDEsIHJIMiwgckgzLCBySDQsIHJIMCwgclczLCByVzQsIHJXNywgclcxLCByVzIsIDApCisJUl80MF81OShySDQsIHJIMCwgckgxLCBySDIsIHJIMywgclc0LCByVzUsIHJXMCwgclcyLCByVzMsIDApCisJUl80MF81OShySDIsIHJIMywgckg0LCBySDAsIHJIMSwgclc1LCByVzYsIHJXMSwgclczLCByVzQsIDQpCisKKwlSXzYwXzc5KHJIMCwgckgxLCBySDIsIHJIMywgckg0LCByVzYsIHJXNywgclcyLCByVzQsIHJXNSwgMCkKKwlSXzYwXzc5KHJIMywgckg0LCBySDAsIHJIMSwgckgyLCByVzcsIHJXMCwgclczLCByVzUsIHJXNiwgMCkKKwlSXzYwXzc5KHJIMSwgckgyLCBySDMsIHJINCwgckgwLCByVzAsIHJXMSwgclc0LCByVzYsIHJXNywgMCkKKwlSXzYwXzc5KHJINCwgckgwLCBySDEsIHJIMiwgckgzLCByVzEsIHJXMiwgclc1LCByVzcs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g2LDI0KHJIUCkKKwlsd3oJCXJINywyOChySFApCisKK3BwY19zcGVfc2hhMjU2X21haW46CisJbGlzCQlyS1AsUFBDX1NQRV9TSEEyNTZfS0BoYQorCWFkZGkJCXJLUCxyS1AsUFBDX1NQRV9TSEEyNTZfS0BsCisKKwlSX0xPQURfVyhySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgclcwLCAwKQorCVJfTE9BRF9XKHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCByVzEsIDgpCisJUl9MT0FEX1cockg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJXMiwgMTYpCisJUl9MT0FEX1cockgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsIHJXMywgMjQpCisJUl9MT0FEX1cockgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwgckg2LCBySDcsIHJXNCwgMzIpCisJUl9MT0FEX1cockg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsIHJXNSwgNDApCisJUl9MT0FEX1cockg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwgckgyLCBySDMsIHJXNiwgNDgpCisJUl9MT0FEX1cockgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywgckgwLCBySDEsIHJXNywgNTYpCitwcGNfc3BlX3NoYTI1Nl8xNl9yb3VuZHM6CisJYWRkaQkJcktQLHJLUCw2NAorCVJfQ0FMQ19XKHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LAorCQkgclcwLCByVzEsIHJXNCwgclc1LCByVzcsIE4sIDApCisJUl9DQUxDX1cockg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywgckg0LCBySDUsCisJCSByVzEsIHJXMiwgclc1LCByVzYsIHJXMCwgTiwgOCkKKwlSX0NBTENfVyhySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywKKwkJIHJXMiwgclczLCByVzYsIHJXNywgclcxLCBOLCAxNikKKwlSX0NBTENfVyhySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwKKwkJIHJXMywgclc0LCByVzcsIHJXMCwgclcyLCBOLCAyNCkKKwlSX0NBTENfVyhySDAsIHJIMSwgckgyLCBySDMsIHJINCwgckg1LCBySDYsIHJINywKKwkJIHJXNCwgclc1LCByVzAsIHJXMSwgclczLCBOLCAzMikKKwlSX0NBTENfVyhySDYsIHJINywgckgwLCBySDEsIHJIMiwgckgzLCBySDQsIHJINSwKKwkJIHJXNSwgclc2LCByVzEsIHJXMiwgclc0LCBOLCA0MCkKKwlSX0NBTENfVyhySDQsIHJINSwgckg2LCBySDcsIHJIMCwgckgxLCBySDIsIHJIMywKKwkJIHJXNiwgclc3LCByVzIsIHJXMywgclc1LCBOLCA0OCkKKwlSX0NBTENfVyhySDIsIHJIMywgckg0LCBySDUsIHJINiwgckg3LCBySDAsIHJIMSwKKwkJIHJXNywgclcwLCByVzMsIHJXNCwgclc2LCBDLCA1NikKKwlidAkJZ3QscHBjX3NwZV9zaGEyNTZfMTZfcm91bmRzCisKKwlsd3oJCXJXMCwwKHJIUCkKKwlORVhUX0JMT0NLCisJbHd6CQlyVzEsNChySFApCisJbHd6CQlyVzIsOChySFApCisJbHd6CQlyVzMsMTIockhQKQorCWx3egkJclc0LDE2KHJIUCkKKwlsd3oJCXJXNSwyMChySFApCisJbHd6CQlyVzYsMjQockhQKQorCWx3egkJclc3LDI4KHJIUCkKKworCWFkZAkJckgwLHJIMCxyVzAKKwlzdHcJCXJIMCwwKHJIUCkKKwlhZGQJCXJIMSxySDEsclcxCisJc3R3CQlySDEsNChySFApCisJYWRkCQlySDIsckgyLHJXMgorCXN0dwkJckgyLDgockhQKQorCWFkZAkJckgzLHJIMyxyVzMKKwlzdHcJCXJIMywxMihySFApCisJYWRkCQlySDQsckg0LHJXNAorCXN0dwkJckg0LDE2KHJIUCk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aXRlID0gbnZyYW1fcHN0b3JlX3dyaXRlLAorfTsKKworc3RhdGljIGludCBudnJhbV9wc3RvcmVfaW5pdCh2b2lkKQoreworCWludCByYyA9IDA7CisKKwlpZiAobWFjaGluZV9pcyhwc2VyaWVzKSkgeworCQludnJhbV90eXBlX2lkc1syXSA9IFBTVE9SRV9UWVBFX1BQQ19SVEFTOworCQludnJhbV90eXBlX2lkc1szXSA9IFBTVE9SRV9UWVBFX1BQQ19PRjsKKwl9IGVsc2UKKwkJbnZyYW1fdHlwZV9pZHNbMl0gPSBQU1RPUkVfVFlQRV9QUENfT1BBTDsKKworCW52cmFtX3BzdG9yZV9pbmZvLmJ1ZiA9IG9vcHNfZGF0YTsKKwludnJhbV9wc3RvcmVfaW5mby5idWZzaXplID0gb29wc19kYXRhX3N6OworCisJc3Bpbl9sb2NrX2luaXQoJm52cmFtX3BzdG9yZV9pbmZvLmJ1Zl9sb2NrKTsKKworCXJjID0gcHN0b3JlX3JlZ2lzdGVyKCZudnJhbV9wc3RvcmVfaW5mbyk7CisJaWYgKHJjICE9IDApCisJCXByX2VycigibnZyYW06IHBzdG9yZV9yZWdpc3RlcigpIGZhaWxlZCwgZGVmYXVsdHMgdG8gIgorCQkJCSJrbXNnX2R1bXA7IHJldHVybmVkICVkXG4iLCByYyk7CisKKwlyZXR1cm4gcmM7Cit9CisjZWxzZQorc3RhdGljIGludCBudnJhbV9wc3RvcmVfaW5pdCh2b2lkKQoreworCXJldHVybiAtMTsKK30KKyNlbmRpZgorCit2b2lkIF9faW5pdCBudnJhbV9pbml0X29vcHNfcGFydGl0aW9uKGludCBydGFzX3BhcnRpdGlvbl9leGlzdHMpCit7CisJaW50IHJjOworCisJcmMgPSBudnJhbV9pbml0X29zX3BhcnRpdGlvbigmb29wc19sb2dfcGFydGl0aW9uKTsKKwlpZiAocmMgIT0gMCkgeworI2lmZGVmIENPTkZJR19QUENfUFNFUklFUworCQlpZiAoIXJ0YXNfcGFydGl0aW9uX2V4aXN0cykgewor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0JLndhaXRfc3RhdGUgICAgICAgICAgICAgPSBwb3dlcm52X2VlaF93YWl0X3N0YXRlLAotCS5nZXRfbG9nICAgICAgICAgICAgICAgID0gcG93ZXJudl9lZWhfZ2V0X2xvZywKLQkuY29uZmlndXJlX2JyaWRnZSAgICAgICA9IHBvd2VybnZfZWVoX2NvbmZpZ3VyZV9icmlkZ2UsCi0JLmVycl9pbmplY3QJCT0gcG93ZXJudl9lZWhfZXJyX2luamVjdCwKLQkucmVhZF9jb25maWcgICAgICAgICAgICA9IHBvd2VybnZfZWVoX3JlYWRfY29uZmlnLAotCS53cml0ZV9jb25maWcgICAgICAgICAgID0gcG93ZXJudl9lZWhfd3JpdGVfY29uZmlnLAotCS5uZXh0X2Vycm9yCQk9IHBvd2VybnZfZWVoX25leHRfZXJyb3IsCi0JLnJlc3RvcmVfY29uZmlnCQk9IHBvd2VybnZfZWVoX3Jlc3RvcmVfY29uZmlnCisJLmluaXQgICAgICAgICAgICAgICAgICAgPSBwbnZfZWVoX2luaXQsCisJLnBvc3RfaW5pdCAgICAgICAgICAgICAgPSBwbnZfZWVoX3Bvc3RfaW5pdCwKKwkucHJvYmUJCQk9IHBudl9lZWhfcHJvYmUsCisJLnNldF9vcHRpb24gICAgICAgICAgICAgPSBwbnZfZWVoX3NldF9vcHRpb24sCisJLmdldF9wZV9hZGRyICAgICAgICAgICAgPSBwbnZfZWVoX2dldF9wZV9hZGRyLAorCS5nZXRfc3RhdGUgICAgICAgICAgICAgID0gcG52X2VlaF9nZXRfc3RhdGUsCisJLnJlc2V0ICAgICAgICAgICAgICAgICAgPSBwbnZfZWVoX3Jlc2V0LAorCS53YWl0X3N0YXRlICAgICAgICAgICAgID0gcG52X2VlaF93YWl0X3N0YXRlLAorCS5nZXRfbG9nICAgICAgICAgICAgICAgID0gcG52X2VlaF9nZXRfbG9nLAorCS5jb25maWd1cmVfYnJpZGdlICAgICAgID0gcG52X2VlaF9jb25maWd1cmVfYnJpZGdlLAorCS5lcnJfaW5qZ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XJuIDA7Cit9CisKK3N0YXRpYyBpbnQgcG52X3BjaV92Zl9hc3NpZ25fbTY0KHN0cnVjdCBwY2lfZGV2ICpwZGV2LCB1MTYgbnVtX3ZmcykKK3sKKwlzdHJ1Y3QgcGNpX2J1cyAgICAgICAgKmJ1czsKKwlzdHJ1Y3QgcGNpX2NvbnRyb2xsZXIgKmhvc2U7CisJc3RydWN0IHBudl9waGIgICAgICAgICpwaGI7CisJc3RydWN0IHBjaV9kbiAgICAgICAgICpwZG47CisJdW5zaWduZWQgaW50ICAgICAgICAgICB3aW47CisJc3RydWN0IHJlc291cmNlICAgICAgICpyZXM7CisJaW50ICAgICAgICAgICAgICAgICAgICBpLCBqOworCWludDY0X3QgICAgICAgICAgICAgICAgcmM7CisJaW50ICAgICAgICAgICAgICAgICAgICB0b3RhbF92ZnM7CisJcmVzb3VyY2Vfc2l6ZV90ICAgICAgICBzaXplLCBzdGFydDsKKwlpbnQgICAgICAgICAgICAgICAgICAgIHBlX251bTsKKwlpbnQgICAgICAgICAgICAgICAgICAgIHZmX2dyb3VwczsKKwlpbnQgICAgICAgICAgICAgICAgICAgIHZmX3Blcl9ncm91cDsKKworCWJ1cyA9IHBkZXYtPmJ1czsKKwlob3NlID0gcGNpX2J1c190b19ob3N0KGJ1cyk7CisJcGhiID0gaG9zZS0+cHJpdmF0ZV9kYXRhOworCXBkbiA9IHBjaV9nZXRfcGRuKHBkZXYpOworCXRvdGFsX3ZmcyA9IHBjaV9zcmlvdl9nZXRfdG90YWx2ZnMocGRldik7CisKKwkvKiBJbml0aWFsaXplIHRoZSBtNjRfd2lucyB0byBJT0RBX0lOVkFMSURfTTY0ICovCisJZm9yIChpID0gMDsgaSA8IFBDSV9TUklPVl9OVU1fQkFSUzsgaSsrKQorCQlmb3IgKGogPSAwOyBqIDwgTTY0X1BFUl9JT1Y7IGorKykKKwkJCXBkbi0+bTY0X3dpbnNbaV1bal0gPSBJT0RBX0lOVkFMSURfTTY0OworCisJaWYgKHBkbi0+bT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kQoRCwyLFgpCi0jZGVmaW5lIEZQX1RPX0ZQSU5UX1JPVU5EX1EoWCkJX0ZQX1RPX0ZQSU5UX1JPVU5EKFEsNCxYKQotCi10eXBlZGVmIHVuaW9uIHsKLSAgICAgICAgbG9uZyBkb3VibGUgbGQ7Ci0gICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICAgICAgX191NjQgaGlnaDsKLSAgICAgICAgICAgICAgICBfX3U2NCBsb3c7Ci0gICAgICAgIH0gdzsKLX0gbWF0aGVtdV9sZGN2OwotCi0jaWZkZWYgQ09ORklHX1NZU0NUTAotaW50IHN5c2N0bF9pZWVlX2VtdWxhdGlvbl93YXJuaW5ncz0xOwotI2VuZGlmCi0KLSNkZWZpbmUgbWF0aGVtdV9wdXRfdXNlcih4LCBwKSBcCi0gICAgICAgIGRvIHsgXAotICAgICAgICAgICAgICAgIGlmIChwdXRfdXNlcigoeCksKHApKSkgXAotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNJR1NFR1Y7IFwKLSAgICAgICAgfSB3aGlsZSAoMCkKLQotI2RlZmluZSBtYXRoZW11X2dldF91c2VyKHgsIHApIFwKLSAgICAgICAgZG8geyBcCi0gICAgICAgICAgICAgICAgaWYgKGdldF91c2VyKCh4KSwocCkpKSBcCi0gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gU0lHU0VHVjsgXAotICAgICAgICB9IHdoaWxlICgwKQotCi0jZGVmaW5lIG1hdGhlbXVfY29weV9mcm9tX3VzZXIoZCwgcywgbilcCi0gICAgICAgIGRvIHsgXAotICAgICAgICAgICAgICAgIGlmIChjb3B5X2Zyb21fdXNlcigoZCksKHMpLChuKSkgIT0gMCkgXAotICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFNJR1NFR1Y7IFwKLSAgICAgICAgfSB3aGlsZSAoMCkKLQotI2RlZmluZSBtYXRoZW11X2NvcHlfdG9fdXNlcihkLCBzLCBuKSBcCi0gICAgICAgIGRvIHsgXAotICAgICAgICAgICAgICAgIGlmIChjb3B5X3RvX3VzZXIoKGQpLChzKSwobikpICE9IDApIFwKLSAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTSUdTRUdWOyBcCi0gICAgICAgIH0gd2hpbGUgKDApCi0KLXN0YXRpYyB2b2lkIGRpc3BsYXlfZW11bGF0aW9uX25vdF9pbXBsZW1lbnRlZChzdHJ1Y3QgcHRfcmVncyAqcmVncywgY2hhciAqaW5zdHIpCi17Ci0gICAgICAgIF9fdTE2ICpsb2NhdGlvbjsKLSAgICAgICAgCi0jaWZkZWYgQ09ORklHX1NZU0NUTAotICAgICAgICBpZihzeXNjdGxfaWVlZV9lbXVsYXRpb25fd2FybmluZ3MpCi0jZW5kaWYKLSAgICAgICAgewotICAgICAgICAgICAgICAgIGxvY2F0aW9uID0gKF9fdTE2ICopKHJlZ3MtPnBzdy5hZGRyLVMzOTBfbG93Y29yZS5wZ21faWxjKTsKLSAgICAgICAgICAgICAgICBwcmludGsoIiVzIGllZWUgZnB1IGluc3RydWN0aW9uIG5vdCBlbXVsYXRlZCAiCi0gICAgICAgICAgICAgICAgICAgICAgICJwcm9jZXNzIG5hbWU6ICVzIHBpZDogJWQgXG4iLAotICAgICAgICAgICAgICAgICAgICAgICBpbnN0ciwgY3VycmVudC0+Y29tbSwgY3VycmVudC0+cGlkKTsKLSAgICAgICAgICAgICAgICBwcmludGsoIiVzJ3MgUFNXOiAgICAlMDhseCAlMDhseFxuIiwgaW5zdHIsCi0gICAgICAgICAgICAgICAgICAgICAgICh1bnNpZ25lZCBsb25nKSByZWdzLT5wc3cubWFzaywKLSAgICAgICAgICAgICAgICAgICAgICAgKHVuc2lnbmVkIGxvbmcpIGxvY2F0aW9uKTsKLSAgICAgICAgfQotfQotCi1zdGF0aWMgaW5saW5lIHZvaWQgZW11X3NldF9DQyAoc3RydWN0IHB0X3JlZ3MgKnJlZ3MsIGludCBjYykKLXsKLSAgICAgICAgcmVncy0+cHN3Lm1hc2sgPSAocmVncy0+cH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b3VibGUgKi8KLXN0YXRpYyBpbnQgZW11X2NkYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgewotICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOwotICAgICAgICBpbnQgSVI7Ci0KLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmQpOwotICAgICAgICBGUF9VTlBBQ0tfUkFXX0RQKERCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZCk7Ci0gICAgICAgIEZQX0NNUF9EKElSLCBEQSwgREIsIDMpOwotICAgICAgICAvKgotICAgICAgICAgKiBJUiA9PSAtMSBpZiBEQSA8IERCLCBJUiA9PSAwIGlmIERBID09IERCLAotICAgICAgICAgKiBJUiA9PSAxIGlmIERBID4gREIgYW5kIElSID09IDMgaWYgdW5vcmRlcmRlZAotICAgICAgICAgKi8KLSAgICAgICAgZW11X3NldF9DQyhyZWdzLCAoSVIgPT0gLTEpID8gMSA6IChJUiA9PSAxKSA/IDIgOiBJUik7Ci0gICAgICAgIHJldHVybiAwOwotfQotCi0vKiBDb21wYXJlIGRvdWJsZSAqLwotc3RhdGljIGludCBlbXVfY2RiIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBkb3VibGUgKnZhbCkgewotICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOwotICAgICAgICBpbnQgSVI7Ci0KLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmQpOwotICAgICAgICBGUF9VTlBBQ0tfUkFXX0RQKERCLCB2YWwpOwotICAgICAgICBGUF9DTVBfRChJUiwgREEsIERCLCAzKTsKLSAgICAgICAgLyoKLSAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiw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WQuZnBfcmVncy5mcHJzW3J5KzJdLnVpOwotICAgICAgICBGUF9VTlBBQ0tfUVAoUUIsICZjdnQubGQpOwotICAgICAgICBGUF9DTVBfUShJUiwgUUEsIFFCLCAzKTsKLSAgICAgICAgLyoKLSAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiwgSVIgPT0gMCBpZiBEQSA9PSBEQiwKLSAgICAgICAgICogSVIgPT0gMSBpZiBEQSA+IERCIGFuZCBJUiA9PSAzIGlmIHVub3JkZXJkZWQKLSAgICAgICAgICovCi0gICAgICAgIGVtdV9zZXRfQ0MocmVncywgKElSID09IC0xKSA/IDEgOiAoSVIgPT0gMSkgPyAyIDogSVIpOwotICAgICAgICBpZiAoSVIgPT0gMykKLSAgICAgICAgICAgICAgICBGUF9TRVRfRVhDRVBUSU9OIChGUF9FWF9JTlZBTElEKTsKLSAgICAgICAgcmV0dXJuIF9mZXg7Ci19Ci0KLS8qIENvbXBhcmUgYW5kIHNpZ25hbCBkb3VibGUgKi8KLXN0YXRpYyBpbnQgZW11X2tkYnIgKHN0cnVjdCBwdF9yZWdzICpyZWdzLCBpbnQgcngsIGludCByeSkgewotICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOwotICAgICAgICBGUF9ERUNMX0VYOwotICAgICAgICBpbnQgSVI7Ci0KLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmQpOwotICAgICAgICBGUF9VTlBBQ0tfUkFXX0RQKERCLCAmY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnByc1tyeV0uZCk7Ci0gICAgICAgIEZQX0NNUF9EKElSLCBEQSwgREIsIDMpOwotICAgICAgICAvKgotICAgICAgICAgKiBJUiA9PSAtMSBpZiBEQSA8IERCLCBJUiA9PSAwIGlmIERBID09IERCLAotICAgICAgICAgKiBJUiA9PSAxIGlmIERBID4gREIgYW5kIElSID09IDMgaWYgdW5vcmRlcmRlZAotICAgICAgICAgKi8KLSAgICAgICAgZW11X3NldF9DQyhyZWdzLCAoSVIgPT0gLTEpID8gMSA6IChJUiA9PSAxKSA/IDIgOiBJUik7Ci0gICAgICAgIGlmIChJUiA9PSAzKQotICAgICAgICAgICAgICAgIEZQX1NFVF9FWENFUFRJT04gKEZQX0VYX0lOVkFMSUQpOwotICAgICAgICByZXR1cm4gX2ZleDsKLX0KLQotLyogQ29tcGFyZSBhbmQgc2lnbmFsIGRvdWJsZSAqLwotc3RhdGljIGludCBlbXVfa2RiIChzdHJ1Y3QgcHRfcmVncyAqcmVncywgaW50IHJ4LCBkb3VibGUgKnZhbCkgewotICAgICAgICBGUF9ERUNMX0QoREEpOyBGUF9ERUNMX0QoREIpOwotICAgICAgICBGUF9ERUNMX0VYOwotICAgICAgICBpbnQgSVI7Ci0KLSAgICAgICAgRlBfVU5QQUNLX1JBV19EUChEQSwgJmN1cnJlbnQtPnRocmVhZC5mcF9yZWdzLmZwcnNbcnhdLmQpOwotICAgICAgICBGUF9VTlBBQ0tfUkFXX0RQKERCLCB2YWwpOwotICAgICAgICBGUF9DTVBfRChJUiwgREEsIERCLCAzKTsKLSAgICAgICAgLyoKLSAgICAgICAgICogSVIgPT0gLTEgaWYgREEgPCBEQiwgSVIgPT0gMCBpZiBEQSA9PSBEQiwKLSAgICAgICAgICogSVIgPT0gMSBpZiBEQSA+IERCIGFuZCBJUiA9PSAzIGlmIHVub3JkZXJkZWQKLSAgICAgICAgICovCi0gICAgICAgIGVtdV9zZXRfQ0MocmVncywgKElSID09IC0xKSA/IDEgOiAoSVIgPT0gMSkgPyAyIDogSVIpOwotICAgICAgICBpZiAoSVIgPT0gMykKLSAgICAgICAgICAgICAgICBGUF9TRVRfRVhDRVBUSU9OIChGUF9FWF9JTlZBTElEKTsKLSAgICAgICAgcmV0dXJuIF9mZXg7Ci19Ci0KLS8qIENvbXBhcmUgYW5kIHNpZ25hbCBmbG9hdCAqLwotc3RhdGljIGlud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MDZdID0gZW11X2x4ZWJyLFsweDA3XSA9IGVtdV9teGRicixbMHgwOF0gPSBlbXVfa2ViciwKLSAgICAgICAgICAgICAgICBbMHgwOV0gPSBlbXVfY2ViciwgWzB4MGFdID0gZW11X2FlYnIsIFsweDBiXSA9IGVtdV9zZWJyLAotICAgICAgICAgICAgICAgIFsweDBjXSA9IGVtdV9tZGVicixbMHgwZF0gPSBlbXVfZGViciwgWzB4MGVdID0gZW11X21hZWJyLAotICAgICAgICAgICAgICAgIFsweDBmXSA9IGVtdV9tc2VicixbMHgxMF0gPSBlbXVfbHBkYnIsWzB4MTFdID0gZW11X2xuZGJyLCAKLSAgICAgICAgICAgICAgICBbMHgxMl0gPSBlbXVfbHRkYnIsWzB4MTNdID0gZW11X2xjZGJyLFsweDE0XSA9IGVtdV9zcWViciwKLSAgICAgICAgICAgICAgICBbMHgxNV0gPSBlbXVfc3FkYnIsWzB4MTZdID0gZW11X3NxeGJyLFsweDE3XSA9IGVtdV9tZWViciwKLSAgICAgICAgICAgICAgICBbMHgxOF0gPSBlbXVfa2RiciwgWzB4MTldID0gZW11X2NkYnIsIFsweDFhXSA9IGVtdV9hZGJyLAotICAgICAgICAgICAgICAgIFsweDFiXSA9IGVtdV9zZGJyLCBbMHgxY10gPSBlbXVfbWRiciwgWzB4MWRdID0gZW11X2RkYnIsICAKLSAgICAgICAgICAgICAgICBbMHgxZV0gPSBlbXVfbWFkYnIsWzB4MWZdID0gZW11X21zZGJyLFsweDQwXSA9IGVtdV9scHhiciwKLSAgICAgICAgICAgICAgICBbMHg0MV0gPSBlbXVfbG54YnIsWzB4NDJdID0gZW11X2x0eGJyLFsweDQzXSA9IGVtdV9sY3hiciwKLSAgICAgICAgICAgICAgICBbMHg0NF0gPSBlbXVfbGVkYnIsWzB4NDVdID0gZW11X2xkeGJyLFsweDQ2XSA9IGVtdV9sZXhiciwKLSAgICAgICAgICAgICAgICBbMHg0N10gPSBlbXVfZml4YnIsWzB4NDhdID0gZW11X2t4YnIs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C8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKixpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgoKG9wY29kZVszXSA+PiA0KSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSAmIDE1KSArIDIpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSAyOiAvKiBSUkUgZm9ybWF0LCBkb3VibGUgb3BlcmF0aW9uICovCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDM6IC8qIFJSRSBmb3JtYXQsIGZsb2F0IG9wZXJhdGlvbiAqLwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Uob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIF9mZXggPSAoKGludCAoKikoc3RydWN0IHB0X3JlZ3MgKiwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszXSA+PiA0LCBvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2Uob3Bjb2RlWzNdICYgMTUpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSA0OiAvKiBSUkYgZm9ybWF0LCBsb25nIGRvdWJsZSBvcGVyYXRpb24gKi8KLSAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMHgyMikKLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgoKG9wY29kZVszXSA+PiA0KSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdICYgMTUpICsgMik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUsIG9wY29kZVsyXSA+PiA0KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgoKG9wY29kZVszXSA+PiA0KSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSAmIDE1KSArIDIpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSA1OiAvKiBSUkYgZm9ybWF0LCBkb3VibGUgb3BlcmF0aW9uICovCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVsyXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50LCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbMV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVszX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UgZm9ybWF0LCBjeGZiciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGNhbGwgdGhlIGVtdWxhdGlvbiBmdW5jdGlvbiAqLwotICAgICAgICAgICAgICAgIGlmIChvcGNvZGVbM10gJiAweDIwKQotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKCgob3Bjb2RlWzNdID4+IDQpICYgMTUpICsgMik7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDg6IC8qIFJSRSBmb3JtYXQsIGNkZmJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0JCWJyZWFrOwotICAgICAgICBjYXNlIDk6IC8qIFJSRSBmb3JtYXQsIGNlZmJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgIC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ydWN0aW9uICovCi0gICAgICAgICAgICAgICAgaWYgKChvcGNvZGVbMl0gJiAxMjgpID09IDEyOCB8fCAob3Bjb2RlWzJdICYgOTYpID09IDMyKQotCQkJLyogbWFzayBvZiB7IDIsMyw4LTE1IH0gaXMgaW52YWxpZCAqLwotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUsIG9wY29kZVsyXSA+PiA0KTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgMTI6IC8qIFJSRiBmb3JtYXQsIGNmZWJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgaWYgKChvcGNvZGVbMl0gJiAxMjgpID09IDEyOCB8fCAob3Bjb2RlWzJdICYgOTYpID09IDMyKQotCQkJLyogbWFzayBvZiB7IDIsMyw4LTE1IH0gaXMgaW52YWxpZCAqLwotCQkJcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZShvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCB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0dXJuIFNJR0lMTDsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzNdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKG9wY29kZVszXSAgJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgoKG9wY29kZVszXSA+PiA0KSAmIDE1KSArIDIpOwotCQlicmVhazsKLSAgICAgICAgY2FzZSAxNTogLyogUlJFIGZvcm1hdCwgbGRlYnIgJiBtZGViciBpbnN0cnVjdGlvbiAqLwotICAgICAgICAgICAgICAgIC8qIGZsb2F0IHN0b3JlIGJ1dCBkb3VibGUgbG9hZCAqLwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Uob3Bjb2RlWzNdICAmIDE1KTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLQkJYnJlYWs7Ci0gICAgICAgIGNhc2UgMTY6IC8qIFJSRSBmb3JtYXQsIGxkeGJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogbG9uZyBkb3VibGUgc3RvcmUgYnV0IGRvdWJsZSBsb2FkICovCi0gICAgICAgICAgICAgICAgaWYgKG9wY29kZVszXSAmIDIpCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzNdICYgMTUpICsgMik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMTc6IC8qIFJSRSBmb3JtYXQsIGxkeGJyIGluc3RydWN0aW9uICovCi0gICAgICAgICAgICAgICAgLyogbG9uZyBkb3VibGUgc3RvcmUgYnV0IGZsb2F0IGxvYWQgKi8KLSAgICAgICAgICAgICAgICBpZiAob3Bjb2RlWzNdICYgMikKLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2Qob3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbM10gJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgaW50KSkKLQkJCWp1bXBfdGFibGVbb3Bjb2RlWzFdXSkKLSAgICAgICAgICAgICAgICAgICAgICAgIChyZWdzLCBvcGNvZGVbM10gPj4gNCwgb3Bjb2RlWzNdICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2UoKG9wY29kZVszXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgY2FzZSAxODogLyogUlJFIGZvcm1hdCwgbGVkYnIgaW5zdHJ1Y3Rpb24gKi8KLSAgICAgICAgICAgICAgICAvKiBkb3VibGUgc3RvcmUgYnV0IGZsb2F0IGxvYWQgKi8KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZChvcGNvZGVbM10gJiAxNSk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVsxXV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzNdID4+IDQsIG9wY29kZVszXSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdlKChvcGNvZGVbM10gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIGNhc2UgMTk6IC8qIFJSRSBmb3JtYXQsIGVmcGMgJiBzZnBjIGluc3RydWN0aW9uICovCi0gICAgICAg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BmXSA9IGVtdV9tc2ViLAotICAgICAgICAgICAgICAgIFsweDEwXSA9IGVtdV90Y2ViLFsweDExXSA9IGVtdV90Y2RiLFsweDEyXSA9IGVtdV90Y3hiLAotICAgICAgICAgICAgICAgIFsweDE0XSA9IGVtdV9zcWViLFsweDE1XSA9IGVtdV9zcWRiLFsweDE3XSA9IGVtdV9tZWViLAotICAgICAgICAgICAgICAgIFsweDE4XSA9IGVtdV9rZGIsIFsweDE5XSA9IGVtdV9jZGIsIFsweDFhXSA9IGVtdV9hZGIsCi0gICAgICAgICAgICAgICAgWzB4MWJdID0gZW11X3NkYiwgWzB4MWNdID0gZW11X21kYiwgWzB4MWRdID0gZW11X2RkYiwKLSAgICAgICAgICAgICAgICBbMHgxZV0gPSBlbXVfbWFkYixbMHgxZl0gPSBlbXVfbXNkYgotICAgICAgICB9OwotCi0gICAgICAgIHN3aXRjaCAoZm9ybWF0X3RhYmxlW29wY29kZVs1XV0pIHsKLSAgICAgICAgY2FzZSAxOiAvKiBSWEUgZm9ybWF0LCBkb3VibGUgY29uc3RhbnQgKi8gewotICAgICAgICAgICAgICAgIF9fdTY0ICpkeGIsIHRlbXA7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3U2NCAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgbWF0aGVtdV9jb3B5X2Zyb21fdXNlcigmdGVtcCwgZHhiLCA4KTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgZG91YmxlICopKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZG91YmxlICopICZ0ZW1wKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSAyOiAvKiBSWEUgZm9ybWF0LCBmbG9hdCBjb25zdGFudCAqLyB7Ci0gICAgICAgICAgICAgICAgX191MzIgKmR4YiwgdGVtcDsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTMyICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKLSAgICAgICAgICAgICAgICBtYXRoZW11X2dldF91c2VyKHRlbXAsIGR4Yik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGZsb2F0ICopKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZmxvYXQgKikgJnRlbXApOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDM6IC8qIFJYRiBmb3JtYXQsIGRvdWJsZSBjb25zdGFudCAqLyB7Ci0gICAgICAgICAgICAgICAgX191NjQgKmR4YiwgdGVtcDsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbNF0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKLSAgICAgICAgICAgICAgICBkeGIgPSAoX191NjQgKikgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOwotICAgICAgICAgICAgICAgIG1hdGhlbXVfY29weV9mcm9tX3VzZXIoJnRlbXAsIGR4YiwgOCk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGRvdWJsZSAqLCBpbnQpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZG91YmxlICopICZ0ZW1wLCBvcGNvZGVbNF0gPj4gNCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgNDogLyogUlhGIGZvcm1hdCwgZmxvYXQgY29uc3RhbnQgKi8gewotICAgICAgICAgICAgICAgIF9fdTMyICpkeGIsIHRlbXA7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotCi0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2UoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzRdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTMyICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKLSAgICAgICAgICAgICAgICBtYXRoZW11X2dldF91c2VyKHRlbXAsIGR4Yik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGZsb2F0ICosIGludCkpCi0JCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIChmbG9hdCAqKSAmdGVtcCwgb3Bjb2RlWzRdID4+IDQpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2UoKG9wY29kZVs0XSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDU6IC8qIFJYRSBmb3JtYXQsIGRvdWJsZSBjb25zdGFudCAqLwotICAgICAgICAgICAgICAgIC8qIHN0b3JlIGRvdWJsZSBhbmQgbG9hZCBsb25nIGRvdWJsZSAqLyAKLSAgICAgICAgewotICAgICAgICAgICAgICAgIF9fdTY0ICpkeGIsIHRlbXA7Ci0gICAgICAgICAgICAgICAgX191MzIgb3BjOwotICAgICAgICAgICAgICAgIGlmICgob3Bjb2RlWzFdID4+IDQpICYgMHgyMCkKLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBvcGMgPSAqKChfX3UzMiAqKSBvcGNvZGUpOwotICAgICAgICAgICAgICAgIGR4YiA9IChfX3U2NCAqKSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgbWF0aGVtdV9jb3B5X2Zyb21fdXNlcigmdGVtcCwgZHhiLCA4KTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgZG91YmxlICopKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZG91YmxlICopICZ0ZW1wKTsKLSAgICAgICAgICAgICAgICBlbXVfbG9hZF9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgoKG9wY29kZVsxXSA+PiA0KSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgNjogLyogUlhFIGZvcm1hdCwgZmxvYXQgY29uc3RhbnQgKi8KLSAgICAgICAgICAgICAgICAvKiBzdG9yZSBmbG9hdCBhbmQgbG9hZCBkb3VibGUgKi8gCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBfX3UzMiAqZHhiLCB0ZW1wOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTMyICopIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKLSAgICAgICAgICAgICAgICBtYXRoZW11X2dldF91c2VyKHRlbXAsIGR4Yik7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGZsb2F0ICopKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCAoZmxvYXQgKikgJnRlbXApOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDc6IC8qIFJYRSBmb3JtYXQsIGZsb2F0IGNvbnN0YW50ICovCi0gICAgICAgICAgICAgICAgLyogc3RvcmUgZmxvYXQgYW5kIGxvYWQgbG9uZyBkb3VibGUgKi8gCi0gICAgICAgIHsKLSAgICAgICAgICAgICAgICBfX3UzMiAqZHhiLCB0ZW1wOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLSAgICAgICAgICAgICAgICBpZiAoKG9wY29kZVsxXSA+PiA0KSAmIDB4MjApCi0JCQlyZXR1cm4gU0lHSUxMOwotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdlKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKLSAgICAgICAgICAgICAgICBkeGIgPSAoX191MzIgKikgY2FsY19hZGRyKHJlZ3MsIG9wYyA+PiAxNiwgb3BjID4+IDEyLCBvcGMpOwotICAgICAgICAgICAgICAgIG1hdGhlbXVfZ2V0X3VzZXIodGVtcCwgZHhiKTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgZmxvYXQgKikpCi0JCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIChmbG9hdCAqKSAmdGVtcCk7Ci0gICAgICAgICAgICAgICAgZW11X2xvYWRfcmVnZCgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIGVtdV9sb2FkX3JlZ2QoKChvcGNvZGVbMV0gPj4gNCkgJiAxNSkgKyAyKTsKLSAgICAgICAgICAgICAgICBicmVhazsKLSAgICAgICAgfQotICAgICAgICBjYXNlIDg6IC8qIFJYRSBmb3JtYXQsIFJYIGFkZHJlc3MgdXNlZCBhcyBpbnQgdmFsdWUgKi8gewotICAgICAgICAgICAgICAgIF9fdTY0IGR4YjsKLSAgICAgICAgICAgICAgICBfX3UzMiBvcGM7Ci0KLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZSgob3Bjb2RlWzFdID4+IDQpICYgMTUpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTY0KSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGxvbmcpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCBkeGIpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGNhc2UgOTogLyogUlhFIGZvcm1hdCwgUlggYWRkcmVzcyB1c2VkIGFzIGludCB2YWx1ZSAqLyB7Ci0gICAgICAgICAgICAgICAgX191NjQgZHhiOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLQotICAgICAgICAgICAgICAgIGVtdV9zdG9yZV9yZWdkKChvcGNvZGVbMV0gPj4gNCkgJiAxNSk7Ci0gICAgICAgICAgICAgICAgb3BjID0gKigoX191MzIgKikgb3Bjb2RlKTsKLSAgICAgICAgICAgICAgICBkeGIgPSAoX191NjQpIGNhbGNfYWRkcihyZWdzLCBvcGMgPj4gMTYsIG9wYyA+PiAxMiwgb3BjKTsKLSAgICAgICAgICAgICAgICAvKiBjYWxsIHRoZSBlbXVsYXRpb24gZnVuY3Rpb24gKi8KLSAgICAgICAgICAgICAgICBfZmV4ID0gKChpbnQgKCopKHN0cnVjdCBwdF9yZWdzICosIGludCwgbG9uZykpCi0JCQlqdW1wX3RhYmxlW29wY29kZVs1XV0pCi0gICAgICAgICAgICAgICAgICAgICAgICAocmVncywgb3Bjb2RlWzFdID4+IDQsIGR4Yik7Ci0gICAgICAgICAgICAgICAgYnJlYWs7Ci0gICAgICAgIH0KLSAgICAgICAgY2FzZSAxMDogLyogUlhFIGZvcm1hdCwgUlggYWRkcmVzcyB1c2VkIGFzIGludCB2YWx1ZSAqLyB7Ci0gICAgICAgICAgICAgICAgX191NjQgZHhiOwotICAgICAgICAgICAgICAgIF9fdTMyIG9wYzsKLQotICAgICAgICAgICAgICAgIGlmICgob3Bjb2RlWzFdID4+IDQpICYgMikKLQkJCXJldHVybiBTSUdJTEw7Ci0gICAgICAgICAgICAgICAgZW11X3N0b3JlX3JlZ2QoKG9wY29kZVsxXSA+PiA0KSAmIDE1KTsKLSAgICAgICAgICAgICAgICBlbXVfc3RvcmVfcmVnZCgoKG9wY29kZVsxXSA+PiA0KSAmIDE1KSArIDIpOwotICAgICAgICAgICAgICAgIG9wYyA9ICooKF9fdTMyICopIG9wY29kZSk7Ci0gICAgICAgICAgICAgICAgZHhiID0gKF9fdTY0KSBjYWxjX2FkZHIocmVncywgb3BjID4+IDE2LCBvcGMgPj4gMTIsIG9wYyk7Ci0gICAgICAgICAgICAgICAgLyogY2FsbCB0aGUgZW11bGF0aW9uIGZ1bmN0aW9uICovCi0gICAgICAgICAgICAgICAgX2ZleCA9ICgoaW50ICgqKShzdHJ1Y3QgcHRfcmVncyAqLCBpbnQsIGxvbmcpKQotCQkJanVtcF90YWJsZVtvcGNvZGVbNV1dKQotICAgICAgICAgICAgICAgICAgICAgICAgKHJlZ3MsIG9wY29kZVsxXSA+PiA0LCBkeGIpOwotICAgICAgICAgICAgICAgIGJyZWFrOwotICAgICAgICB9Ci0gICAgICAgIGRlZmF1bHQ6IC8qIGludmFsaWQgb3BlcmF0aW9uICovCi0gICAgICAgICAgICAgICAgcmV0dXJuIFNJR0lMTDsKLSAgICAgICAgfQotCWlmIChfZmV4ICE9IDApIHsKLQkJY3VycmVudC0+dGhyZWFkLmZwX3JlZ3MuZnBjIHw9IF9mZXg7Ci0JCWlmIChjdXJyZW50LT50aHJlYWQuZnBfcmVncy5mcGMgJiAoX2ZleCA8PCA4KSkKLQkJCXJldHVybiBTSUdGUEU7Ci0JfQotCXJldHVybiAwOwotfQotCi0vKgotICogRW11bGF0ZSBMRFIgUngsUnkgd2l0aCBSeCBvciBSeSBub3QgaW4gezAsIDIsIDQsIDZ9Ci0gKi8KLWludCBtYXRoX2VtdV9sZHIoX191OCAqb3Bjb2RlKSB7Ci0gICAgICAgIHMzOTBfZnBfcmVncyAqZnBfcmVncyA9ICZjdXJyZW50LT50aHJlYWQuZnBfcmVnczsKLSAgICAgICAgX191MTYgb3BjID0gKigoX191MTYgKikgb3Bjb2RlKTsKLQotICAgICAgICBpZiAoKG9wYyAmIDB4OTApID09IDApIHsgICAgICA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ICAqLwotI2RlZmluZSB0YXNrX3B0X3JlZ3ModGFzaykgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0oeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICBzdHJ1Y3QgcHRfcmVncyAqX19yZWdzX187ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgIF9fcmVnc19fID0gKHN0cnVjdCBwdF9yZWdzICopKEtTVEtfVE9QKHRhc2tfc3RhY2tfcGFnZSh0YXNrKSktOCk7IFwKLSAgICAgICBfX3JlZ3NfXyAtIDE7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorI2RlZmluZSB0YXNrX3B0X3JlZ3ModGFzaykgXAorKHsJCQkJCQkJCQlcCisJdW5zaWduZWQgbG9uZyBfX3B0ciA9ICh1bnNpZ25lZCBsb25nKXRhc2tfc3RhY2tfcGFnZSh0YXNrKTsJXAorCV9fcHRyICs9IFRIUkVBRF9TSVpFIC0gVE9QX09GX0tFUk5FTF9TVEFDS19QQURESU5HOwkJXAorCSgoc3RydWN0IHB0X3JlZ3MgKilfX3B0cikgLSAxOwkJCQkJXAogfSkKIAogI2RlZmluZSBLU1RLX0VTUCh0YXNrKQkJKHRhc2tfcHRfcmVncyh0YXNrKS0+c3ApCkBAIC04ODYsMTEgKzg5NSw3IEBACiAjZGVmaW5lIFNUQUNLX1RPUF9NQVgJCVRBU0tfU0laRV9NQVgKIAogI2RlZmluZSBJTklUX1RIUkVBRCAgeyBcCi0JLnNwMCA9ICh1bnNpZ25lZCBsb25nKSZpbml0X3N0YWNrICsgc2l6ZW9mKGluaXRfc3RhY2spIFwKLX0KLQotI2RlZmluZSBJTklUX1RTUyAgeyBcCi0JLng4Nl90c3Muc3AwID0gKHVuc2lnbmVkIGxvbmcpJmluaXRfc3RhY2sgKy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KworCVRQX0FSR1MobWFwLCByZWcsIHZhbCkKKworKTsKKworREVGSU5FX0VWRU5UKHJlZ21hcF9yZWcsIHJlZ21hcF9yZWdfcmVhZF9jYWNoZSwKKworCVRQX1BST1RPKHN0cnVjdCByZWdtYXAgKm1hcCwgdW5zaWduZWQgaW50IHJlZywKKwkJIHVuc2lnbmVkIGludCB2YWwpLAorCisJVFBfQVJHUyhtYXAsIHJlZywgdmFsKQorCispOworCitERUNMQVJFX0VWRU5UX0NMQVNTKHJlZ21hcF9ibG9jaywKKworCVRQX1BST1RPKHN0cnVjdCByZWdtYXAgKm1hcCwgdW5zaWduZWQgaW50IHJlZywgaW50IGNvdW50KSwKKworCVRQX0FSR1MobWFwLCByZWcsIGNvdW50KSwKKworCVRQX1NUUlVDVF9fZW50cnkoCisJCV9fc3RyaW5nKAluYW1lLAkJcmVnbWFwX25hbWUobWFwKQkpCisJCV9fZmllbGQoCXVuc2lnbmVkIGludCwJcmVnCQkJKQorCQlfX2ZpZWxkKAlpbnQsCQljb3VudAkJCSkKKwkpLAorCisJVFBfZmFzdF9hc3NpZ24oCisJCV9fYXNzaWduX3N0cihuYW1lLCByZWdtYXBfbmFtZShtYXApKTsKKwkJX19lbnRyeS0+cmVnID0gcmVnOworCQlfX2VudHJ5LT5jb3VudCA9IGNvdW50OworCSksCisKKwlUUF9wcmludGsoIiVzIHJlZz0leCBjb3VudD0lZCIsIF9fZ2V0X3N0cihuYW1lKSwKKwkJICAodW5zaWduZWQgaW50KV9fZW50cnktPnJlZywKKwkJICAoaW50KV9fZW50cnktPmNvdW50KQorKTsKKworREVGSU5FX0VWRU5UKHJlZ21hcF9ibG9jaywgcmVnbWFwX2h3X3JlYWRfc3RhcnQsCisKKwlUUF9QUk9UTyhzdHJ1Y3QgcmVnbWFwICptYXAsIHVuc2lnbmVkIGludCByZWcsIGludCBjb3VudCksCisKKwlUUF9BUkdTKG1hcCwgcmVnLCBjb3VudCkKKyk7CisKK0RFRklORV9FVkVOVChyZWdtY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JRF9CREFERFIsICZoZGV2LT5xdWlya3MpOworCX0KKworCWtmcmVlX3NrYihza2IpOworCisJcmV0dXJuIDA7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChidGludGVsX2NoZWNrX2JkYWRkcik7CisKK2ludCBidGludGVsX3NldF9iZGFkZHIoc3RydWN0IGhjaV9kZXYgKmhkZXYsIGNvbnN0IGJkYWRkcl90ICpiZGFkZHIpCit7CisJc3RydWN0IHNrX2J1ZmYgKnNrYjsKKwlpbnQgZXJyOworCisJc2tiID0gX19oY2lfY21kX3N5bmMoaGRldiwgMHhmYzMxLCA2LCBiZGFkZHIsIEhDSV9JTklUX1RJTUVPVVQpOworCWlmIChJU19FUlIoc2tiKSkgeworCQllcnIgPSBQVFJfRVJSKHNrYik7CisJCUJUX0VSUigiJXM6IENoYW5naW5nIEludGVsIGRldmljZSBhZGRyZXNzIGZhaWxlZCAoJWQpIiwKKwkJICAgICAgIGhkZXYtPm5hbWUsIGVycik7CisJCXJldHVybiBlcnI7CisJfQorCWtmcmVlX3NrYihza2IpOworCisJcmV0dXJuIDA7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChidGludGVsX3NldF9iZGFkZHIpOworCitNT0RVTEVfQVVUSE9SKCJNYXJjZWwgSG9sdG1hbm4gPG1hcmNlbEBob2x0bWFubi5vcmc+Iik7CitNT0RVTEVfREVTQ1JJUFRJT04oIkJsdWV0b290aCBzdXBwb3J0IGZvciBJbnRlbCBkZXZpY2VzIHZlciAiIFZFUlNJT04pOworTU9EVUxFX1ZFUlNJT04oVkVSU0lPTik7CitNT0RVTEVfTElDRU5TRSgiR1BMIik7CmRpZmYgLS1naXQgYS9kcml2ZXJzL2JsdWV0b290aC9idGludGVsLmggYi9kcml2ZXJzL2JsdWV0b290aC9idGludGVsLmgKbmV3IGZpbGUgbW9kZSAxMDA2NDQKaW5kZXggMDAwMDAwMC4uNGJkYTZhYgotLS0gL2Rldi9udWxsCisrKyBiL2RyaXZlcnMvYmx1ZXRvb3RoL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NTkgVGVtcGxlIFBsYWNlLCBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcgIFVTQQorICoKKyAqLworCitzdHJ1Y3QgaW50ZWxfdmVyc2lvbiB7CisJdTggc3RhdHVzOworCXU4IGh3X3BsYXRmb3JtOworCXU4IGh3X3ZhcmlhbnQ7CisJdTggaHdfcmV2aXNpb247CisJdTggZndfdmFyaWFudDsKKwl1OCBmd19yZXZpc2lvbjsKKwl1OCBmd19idWlsZF9udW07CisJdTggZndfYnVpbGRfd3c7CisJdTggZndfYnVpbGRfeXk7CisJdTggZndfcGF0Y2hfbnVtOworfSBfX3BhY2tlZDsKKworc3RydWN0IGludGVsX2Jvb3RfcGFyYW1zIHsKKwlfX3U4ICAgICBzdGF0dXM7CisJX191OCAgICAgb3RwX2Zvcm1hdDsKKwlfX3U4ICAgICBvdHBfY29udGVudDsKKwlfX3U4ICAgICBvdHBfcGF0Y2g7CisJX19sZTE2ICAgZGV2X3JldmlkOworCV9fdTggICAgIHNlY3VyZV9ib290OworCV9fdTggICAgIGtleV9mcm9tX2hkcjsKKwlfX3U4ICAgICBrZXlfdHlwZTsKKwlfX3U4ICAgICBvdHBfbG9jazsKKwlfX3U4ICAgICBhcGlfbG9jazsKKwlfX3U4ICAgICBkZWJ1Z19sb2NrOworCWJkYWRkcl90IG90cF9iZGFkZHI7CisJX191OCAgICAgbWluX2Z3X2J1aWxkX25uOworCV9fdTggICAgIG1pbl9md19idWlsZF9jdzsKKwlfX3U4ICAgICBtaW5fZndfYnVpbGRfeXk7CisJX191OCAgICAgbGltaXRlZF9jY2U7CisJX191OCAgICAgdW5sb2NrZWRfc3RhdGU7Cit9IF9fcGFja2VkOworCitzdHJ1Y3QgaW50ZWxfYm9vdHVwIHsKKwlfX3U4ICAgICB6ZXJvOworCV9fdTggICAgIG51bV9jbWRzOworCV9fdTggICAgIHNvdXJjZTsKKwlfX3U4ICAgICByZXNldF90eXBlOworCV9fdTggICAgIHJlc2V0X3J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TSVpFKTsKKyAgICAgICAgICAgIHBhZ2VmYXVsdF9lbmFibGUoKTsKKyAgICAgICAgICAgIHNyYyArPSBHSEFTSF9ESUdFU1RfU0laRSAtIGRjdHgtPmJ5dGVzOworICAgICAgICAgICAgc3JjbGVuIC09IEdIQVNIX0RJR0VTVF9TSVpFIC0gZGN0eC0+Ynl0ZXM7CisgICAgICAgICAgICBkY3R4LT5ieXRlcyA9IDA7CisgICAgICAgIH0KKyAgICAgICAgbGVuID0gc3JjbGVuICYgfihHSEFTSF9ESUdFU1RfU0laRSAtIDEpOworICAgICAgICBpZiAobGVuKSB7CisgICAgICAgICAgICBwYWdlZmF1bHRfZGlzYWJsZSgpOworICAgICAgICAgICAgZW5hYmxlX2tlcm5lbF9hbHRpdmVjKCk7CisgICAgICAgICAgICBlbmFibGVfa2VybmVsX2ZwKCk7CisgICAgICAgICAgICBnY21fZ2hhc2hfcDgoZGN0eC0+c2hhc2gsIGN0eC0+aHRhYmxlLCBzcmMsIGxlbik7CisgICAgICAgICAgICBwYWdlZmF1bHRfZW5hYmxlKCk7CisgICAgICAgICAgICBzcmMgKz0gbGVuOworICAgICAgICAgICAgc3JjbGVuIC09IGxlbjsKKyAgICAgICAgfQorICAgICAgICBpZiAoc3JjbGVuKSB7CisgICAgICAgICAgICBtZW1jcHkoZGN0eC0+YnVmZmVyLCBzcmMsIHNyY2xlbik7CisgICAgICAgICAgICBkY3R4LT5ieXRlcyA9IHNyY2xlbjsKKyAgICAgICAgfQorICAgICAgICByZXR1cm4gMDsKKyAgICB9Cit9CisKK3N0YXRpYyBpbnQgcDhfZ2hhc2hfZmluYWwoc3RydWN0IHNoYXNoX2Rlc2MgKmRlc2MsIHU4ICpvdXQpCit7CisgICAgaW50IGk7CisgICAgc3RydWN0IHA4X2doYXNoX2N0eCAqY3R4ID0gY3J5cHRvX3RmbV9jdHgoY3J5cHRvX3NoYXNoX3RmbShkZXNjLT50Zm0pKTsKKyAgICBzdHJ1Y3QgcDhfZ2hhc2hf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215ICRtYWNoaW5lID0gc3ViIHsKKyAgICBteSAkanVuayA9IHNoaWZ0OworICAgIG15ICRhcmNoID0gc2hpZnQ7CisgICAgaWYgKCRmbGF2b3VyID1+IC9vc3gvKQorICAgIHsJJGFyY2ggPX4gcy9cIi8vZzsKKwkkYXJjaCA9ICgkZmxhdm91cj1+LzY0LykgPyAicHBjOTcwLTY0IiA6ICJwcGM5NzAiIGlmICgkYXJjaCBlcSAiYW55Iik7CisgICAgfQorICAgICIubWFjaGluZQkkYXJjaCI7Cit9OworbXkgJHNpemUgPSBzdWIgeworICAgIGlmICgkZmxhdm91ciA9fiAvbGludXgvKQorICAgIHsJc2hpZnQ7CisJbXkgJG5hbWUgPSBzaGlmdDsgJG5hbWUgPX4gc3xeW1wuXF9dfHw7CisJbXkgJHJldCAgPSAiLnNpemUJJG5hbWUsLi0iLigkZmxhdm91cj1+LzY0JC8/Ii4iOiIiKS4kbmFtZTsKKwkkcmV0IC49ICJcbi5zaXplCS4kbmFtZSwuLS4kbmFtZSIgaWYgKCRmbGF2b3VyPX4vNjQkLyk7CisJJHJldDsKKyAgICB9CisgICAgZWxzZQorICAgIHsJIiI7CX0KK307CitteSAkYXNjaXogPSBzdWIgeworICAgIHNoaWZ0OworICAgIG15ICRsaW5lID0gam9pbigiLCIsQF8pOworICAgIGlmICgkbGluZSA9fiAvXiIoLiopIiQvKQorICAgIHsJIi5ieXRlCSIgLiBqb2luKCIsIix1bnBhY2soIkMqIiwkMSksMCkgLiAiXG4uYWxpZ24JMiI7CX0KKyAgICBlbHNlCisgICAgewkiIjsJfQorfTsKK215ICRxdWFkID0gc3ViIHsKKyAgICBzaGlmdDsKKyAgICBteSBAcmV0OworICAgIG15ICgkaGksJGxvKTsKKyAgICBmb3IgKEBfKSB7CisJaWYgKC9eMHgoWzAtOWEtZl0qPykoWzAtOWEtZl17MSw4fSkkL2lvKQorCXsgICRoaT0kMT8iMHgkMSI6IjAiOyAkbG89IjB4JDIiOyAgfQorCWVsc2lmICgv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J1Y3QgY3J5cHRvX2FsZyBwOF9hZXNfY3RyX2FsZzsKK3N0YXRpYyBzdHJ1Y3QgY3J5cHRvX2FsZyAqYWxnc1tdID0geworICAgICZwOF9hZXNfYWxnLAorICAgICZwOF9hZXNfY2JjX2FsZywKKyAgICAmcDhfYWVzX2N0cl9hbGcsCisgICAgTlVMTCwKK307CisKK2ludCBfX2luaXQgcDhfaW5pdCh2b2lkKQoreworICAgIGludCByZXQgPSAwOworICAgIHN0cnVjdCBjcnlwdG9fYWxnICoqYWxnX2l0OworCisgICAgaWYgKCEoY3VyX2NwdV9zcGVjLT5jcHVfdXNlcl9mZWF0dXJlczIgJiBQUENfRkVBVFVSRTJfVkVDX0NSWVBUTykpCisgICAgICAgIHJldHVybiAtRU5PREVWOworCisgICAgZm9yIChhbGdfaXQgPSBhbGdzOyAqYWxnX2l0OyBhbGdfaXQrKykgeworICAgICAgICByZXQgPSBjcnlwdG9fcmVnaXN0ZXJfYWxnKCphbGdfaXQpOworICAgICAgICBwcmludGsoS0VSTl9JTkZPICJjcnlwdG9fcmVnaXN0ZXJfYWxnICclcycgPSAlZFxuIiwKKyAgICAgICAgICAgICAgICAoKmFsZ19pdCktPmNyYV9uYW1lLCByZXQpOworICAgICAgICBpZiAocmV0KSB7CisgICAgICAgICAgICBmb3IgKGFsZ19pdC0tOyBhbGdfaXQgPj0gYWxnczsgYWxnX2l0LS0pCisgICAgICAgICAgICAgICAgY3J5cHRvX3VucmVnaXN0ZXJfYWxnKCphbGdfaXQpOworICAgICAgICAgICAgYnJlYWs7CisgICAgICAgIH0KKyAgICB9CisgICAgaWYgKHJldCkKKyAgICAgICAgcmV0dXJuIHJldDsKKworICAgIHJldCA9IGNyeXB0b19yZWdpc3Rlcl9zaGFzaCgmcDhfZ2hhc2hfYWxnKTsKKyAgICBpZiAocmV0KSB7CisgICAgICAgIGZvciAoYWxnX2l0ID0gYWxnczsgKmFsZ19pdDsgYWxnX2l0KyspCisgICAgICAgICAgICBjcnlwdG9f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OX1BIX0lEX05VTQotfTsKLQotLyogUmVwb3J0IGRlc2NyaXB0b3IgdGVtcGxhdGUgcGxhY2Vob2xkZXIgKi8KLSNkZWZpbmUgSFVJT05fUEgoX0lEKSBIVUlPTl9QSF9IRUFELCBIVUlPTl9QSF9JRF8jI19JRAotCi0vKiBGaXhlZCByZXBvcnQgZGVzY3JpcHRvciB0ZW1wbGF0ZSAqLwotc3RhdGljIGNvbnN0IF9fdTggaHVpb25fdGFibGV0X3JkZXNjX3RlbXBsYXRlW10gPSB7Ci0JMHgwNSwgMHgwRCwgICAgICAgICAgICAgLyogIFVzYWdlIFBhZ2UgKERpZ2l0aXplciksICAgICAgICAgICAgICAgICAqLwotCTB4MDksIDB4MDIsICAgICAgICAgICAgIC8qICBVc2FnZSAoUGVuKSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLQkweEExLCAweDAxLCAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAgICAgICAgICovCi0JMHg4NSwgMHgwNywgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgSUQgKDcpLCAgICAgICAgICAgICAgICAgICAgICAqLwotCTB4MDksIDB4MjAsICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFN0eWx1cyksICAgICAgICAgICAgICAgICAgICAgKi8KLQkweEEwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIENvbGxlY3Rpb24gKFBoeXNpY2FsKSwgICAgICAgICAgICAgICovCi0JMHgxNCwgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICAgICAqLwotCTB4MjUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksICAgICAgICAgICAgKi8KLQkweDc1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgU2l6ZSAoMSksICAgICAgICAgICAgICAgICovCi0JMHgwOSwgMHg0MiwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFRpcCBTd2l0Y2gpLCAgICAgICAgICAgICAqLwotCTB4MDksIDB4NDQsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChCYXJyZWwgU3dpdGNoKSwgICAgICAgICAgKi8KLQkweDA5LCAweDQ2LCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoVGFibGV0IFBpY2spLCAgICAgICAgICAgICovCi0JMHg5NSwgMHgwMywgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICAgICAqLwotCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KLQkweDk1LCAweDAzLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDMpLCAgICAgICAgICAgICAgICovCi0JMHg4MSwgMHgwMywgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksICAgICAqLwotCTB4MDksIDB4MzIsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChJbiBSYW5nZSksICAgICAgICAgICAgICAgKi8KLQkweDk1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgICAgICovCi0JMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLwotCTB4OTUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KLQkweDgxLCAweDAzLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoQ29uc3RhbnQsIFZhcmlhYmxlKSwgICAgICovCi0JMHg3NSwgMHgxMCwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IFNpemUgKDE2KSwgICAgICAgICAgICAgICAqLwotCTB4OTUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAgICAgKi8KLQkweEE0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgICAgICBQdXNoLCAgICAgICAgICAgICAgICAgICAgICAgICAgICovCi0JMHgwNSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgUGFnZSAoRGVza3RvcCksICAgICAgICAgICAqLwotCTB4NjUsIDB4MTMsICAgICAgICAgICAgIC8qICAgICAgICAgIFVuaXQgKEluY2gpLCAgICAgICAgICAgICAgICAgICAgKi8KLQkweDU1LCAweEZELCAgICAgICAgICAgICAvKiAgICAgICAgICBVbml0IEV4cG9uZW50ICgtMyksICAgICAgICAgICAgICovCi0JMHgzNCwgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgUGh5c2ljYWwgTWluaW11bSAoMCksICAgICAgICAgICAqLwotCTB4MDksIDB4MzAsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChYKSwgICAgICAgICAgICAgICAgICAgICAgKi8KLQkweDI3LCBIVUlPTl9QSChYX0xNKSwgICAvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgICovCi0JMHg0NywgSFVJT05fUEgoWF9QTSksICAgLyogICAgICAgICAgUGh5c2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAqLwotCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KLQkweDA5LCAweDMxLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoWSksICAgICAgICAgICAgICAgICAgICAgICovCi0JMHgyNywgSFVJT05fUEgoWV9MTSksICAgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICAqLwotCTB4NDcsIEhVSU9OX1BIKFlfUE0pLCAgIC8qICAgICAgICAgIFBoeXNpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgKi8KLQkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCi0JMHhCNCwgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgUG9wLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwotCTB4MDksIDB4MzAsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChUaXAgUHJlc3N1cmUpLCAgICAgICAgICAgKi8KLQkweDI3LAotCUhVSU9OX1BIKFBSRVNTVVJFX0xNKSwgIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAgKi8KLQkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCi0JMHhDMCwgICAgICAgICAgICAgICAgICAgLyogICAgICBFbmQgQ29sbGVjdGlvbiwgICAgICAgICAgICAgICAgICAgICAqLwotCTB4QzAgICAgICAgICAgICAgICAgICAgIC8qICBFbmQgQ29sbGVjdGlvbiAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KLX07Ci0KLS8qIFBhcmFtZXRlciBpbmRpY2VzICovCi1lbnVtIGh1aW9uX3BybSB7Ci0JSFVJT05fUFJNX1hfTE0JCT0gMSwKLQlIVUlPTl9QUk1fWV9MTQkJPSAyLAotCUhVSU9OX1BSTV9QUkVTU1VSRV9MTQk9IDQsCi0JSFVJT05fUFJNX1JFU09MVVRJT04JPSA1LAotCUhVSU9OX1BSTV9OVU0KLX07Ci0KLS8qIERyaXZlciBkYXRhICovCi1zdHJ1Y3QgaHVpb25fZHJ2ZGF0YSB7Ci0JX191OCAqcmRlc2M7Ci0JdW5zaWduZWQgaW50IHJzaXplOwotfTsKLQotc3RhdGljIF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kweEExLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAqLworCTB4ODUsIDB4MDUsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBJRCAoNSksICAgICAgICAgICAgICAgICovCisJMHgwNiwgMHgwMCwgMHhGRiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgUGFnZSAoRkYwMGgpLCAgICAgICAgICAgKi8KKwkweDA5LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICBVc2FnZSAoMDFoKSwgICAgICAgICAgICAgICAgICAqLworCTB4MTUsIDB4ODEsICAgICAgICAgICAgICAgICAgIC8qICAgIExvZ2ljYWwgTWluaW11bSAoLTEyNyksICAgICAgICovCisJMHgyNSwgMHg3RiwgICAgICAgICAgICAgICAgICAgLyogICAgTG9naWNhbCBNYXhpbXVtICgxMjcpLCAgICAgICAgKi8KKwkweDc1LCAweDA4LCAgICAgICAgICAgICAgICAgICAvKiAgICBSZXBvcnQgU2l6ZSAoOCksICAgICAgICAgICAgICAqLworCTB4OTUsIDB4MDcsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBDb3VudCAoNyksICAgICAgICAgICAgICovCisJMHhCMSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgRmVhdHVyZSAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweEMwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MEQsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSBQYWdlIChEaWdpdGl6ZXIpLCAgICAgICAgICovCisJMHgwOSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogIFVzYWdlIChQZW4pLCAgICAgICAgICAgICAgICAgICAgKi8KKwkweEExLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAqLworCTB4ODUsIDB4MTAsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBJRCAoMTYpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyMCwgICAgICAgICAgICAgICAgICAgLyogICAgVXNhZ2UgKFN0eWx1cyksICAgICAgICAgICAgICAgKi8KKwkweEEwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICBDb2xsZWN0aW9uIChQaHlzaWNhbCksICAgICAgICAqLworCTB4MDksIDB4NDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFRpcCBTd2l0Y2gpLCAgICAgICAgICovCisJMHgwOSwgMHg0NCwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoQmFycmVsIFN3aXRjaCksICAgICAgKi8KKwkweDA5LCAweDQ2LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChUYWJsZXQgUGljayksICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgKi8KKwkweDc1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBTaXplICgxKSwgICAgICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDA0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNCksICAgICAgICAgICAqLworCTB4ODEsIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksICovCisJMHgwOSwgMHgzMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoSW4gUmFuZ2UpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHg3NSwgMHgxMCwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoMTYpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoMSksICAgICAgICAgICAqLworCTB4QTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUHVzaCwgICAgICAgICAgICAgICAgICAgICAgICovCisJMHgwNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSBQYWdlIChEZXNrdG9wKSwgICAgICAgKi8KKwkweDU1LCAweEZELCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVuaXQgRXhwb25lbnQgKC0zKSwgICAgICAgICAqLworCTB4NjUsIDB4MTMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVW5pdCAoSW5jaCksICAgICAgICAgICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgKi8KKwkweDM0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIFBoeXNpY2FsIE1pbmltdW0gKDApLCAgICAgICAqLworCTB4MDksIDB4MzAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFgpLCAgICAgICAgICAgICAgICAgICovCisJMHgyNywgMHgwMCwgMHhGMCwgMHgwMCwgMHgwMCwgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDYxNDQwKSwgICAgKi8KKwkweDQ2LCAweEUwLCAweDJFLCAgICAgICAgICAgICAvKiAgICAgIFBoeXNpY2FsIE1heGltdW0gKDEyMDAwKSwgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHgwOSwgMHgzMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoWSksICAgICAgICAgICAgICAgICAgKi8KKwkweDI3LCAweDAwLCAweEI0LCAweDAwLCAweDAwLCAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoNDYwODApLCAgICAqLworCTB4NDYsIDB4MjgsIDB4MjMsICAgICAgICAgICAgIC8qICAgICAgUGh5c2ljYWwgTWF4aW11bSAoOTAwMCksICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweEI0LCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICAgIFBvcCwgICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4MzAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFRpcCBQcmVzc3VyZSksICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgKi8KKwkweDI2LCAweEZGLCAweDA3LCAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMjA0NyksICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHhDMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgKi8KKwkweEMwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MEQsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSBQYWdlIChEaWdpdGl6ZXIpLCAgICAgICAgICovCisJMHgwOSwgMHgyMSwgICAgICAgICAgICAgICAgICAgLyogIFVzYWdlIChQdWNrKSwgICAgICAgICAgICAgICAgICAgKi8KKwkweEExLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAqLworCTB4ODUsIDB4MTEsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBJRCAoMTcpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgyMSwgICAgICAgICAgICAgICAgICAgLyogICAgVXNhZ2UgKFB1Y2spLCAgICAgICAgICAgICAgICAgKi8KKwkweEEwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgICBDb2xsZWN0aW9uIChQaHlzaWNhbCksICAgICAgICAqLworCTB4MDUsIDB4MDksICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgUGFnZSAoQnV0dG9uKSwgICAgICAgICovCisJMHg3NSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgU2l6ZSAoMSksICAgICAgICAgICAgKi8KKwkweDE5LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIE1pbmltdW0gKDAxaCksICAgICAgICAqLworCTB4MjksIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgTWF4aW11bSAoMDNoKSwgICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKDApLCAgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgICAgICAgLyogICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgKi8KKwkweDk1LCAweDA0LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBDb3VudCAoNCksICAgICAgICAgICAqLworCTB4ODEsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKENvbnN0YW50KSwgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgKi8KKwkweDBCLCAweDMyLCAweDAwLCAweDBELCAweDAwLCAvKiAgICAgIFVzYWdlIChEaWdpdGl6ZXIgSW4gUmFuZ2UpLCAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgyNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4QTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUHVzaCwgICAgICAgICAgICAgICAgICAgICAgICovCisJMHgwNSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSBQYWdlIChEZXNrdG9wKSwgICAgICAgKi8KKwkweDc1LCAweDEwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBTaXplICgxNiksICAgICAgICAgICAqLworCTB4OTUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICovCisJMHg1NSwgMHhGRCwgICAgICAgICAgICAgICAgICAgLyogICAgICBVbml0IEV4cG9uZW50ICgtMyksICAgICAgICAgKi8KKwkweDY1LCAweDEzLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVuaXQgKEluY2gpLCAgICAgICAgICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICovCisJMHgzNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNaW5pbXVtICgwKSwgICAgICAgKi8KKwkweDA5LCAweDMwLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChYKSwgICAgICAgICAgICAgICAgICAqLworCTB4MjcsIDB4MDAsIDB4RjAsIDB4MDAsIDB4MDAsIC8qICAgICAgTG9naWNhbCBNYXhpbXVtICg2MTQ0MCksICAgICovCisJMHg0NiwgMHhFMCwgMHgyRSwgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNYXhpbXVtICgxMjAwMCksICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAqLworCTB4MDksIDB4MzEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgVXNhZ2UgKFkpLCAgICAgICAgICAgICAgICAgICovCisJMHgyNywgMHgwMCwgMHhCNCwgMHgwMCwgMHgwMCwgLyogICAgICBMb2dpY2FsIE1heGltdW0gKDQ2MDgwKSwgICAgKi8KKwkweDQ2LCAweDI4LCAweDIzLCAgICAgICAgICAgICAvKiAgICAgIFBoeXNpY2FsIE1heGltdW0gKDkwMDApLCAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgICAgICAgIC8qICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICovCisJMHgwOSwgMHgzOCwgICAgICAgICAgICAgICAgICAgLyogICAgICBVc2FnZSAoV2hlZWwpLCAgICAgICAgICAgICAgKi8KKwkweDc1LCAweDA4LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIFJlcG9ydCBTaXplICg4KSwgICAgICAgICAgICAqLworCTB4OTUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICovCisJMHgxNSwgMHhGRiwgICAgICAgICAgICAgICAgICAgLyogICAgICBMb2dpY2FsIE1pbmltdW0gKC0xKSwgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICAgIExvZ2ljYWwgTWF4aW11bSAoMSksICAgICAgICAqLworCTB4MzQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUGh5c2ljYWwgTWluaW11bSAoMCksICAgICAgICovCisJMHg0NCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgICBQaHlzaWNhbCBNYXhpbXVtICgwKSwgICAgICAgKi8KKwkweDgxLCAweDA2LCAgICAgICAgICAgICAgICAgICAvKiAgICAgIElucHV0IChWYXJpYWJsZSwgUmVsYXRpdmUpLCAqLworCTB4QjQsICAgICAgICAgICAgICAgICAgICAgICAgIC8qICAgICAgUG9wLCAgICAgICAgICAgICAgICAgICAgICAgICovCisJMHhDMCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgKi8KKwkweEMwLCAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MEMsICAgICAgICAgICAgICAgICAgIC8qICBVc2FnZSBQYWdlIChDb25zdW1lciksICAgICAgICAgICovCisJMHgwOSwgMHgwMSwgICAgICAgICAgICAgICAgICAgLyogIFVzYWdlIChDb25zdW1lciBDb250cm9sKSwgICAgICAgKi8KKwkweEExLCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgQ29sbGVjdGlvbiAoQXBwbGljYXRpb24pLCAgICAgICAqLworCTB4ODUsIDB4MTIsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBJRCAoMTgpLCAgICAgICAgICAgICAgICovCisJMHgxNCwgICAgICAgICAgICAgICAgICAgICAgICAgLyogICAgTG9naWNhbCBNaW5pbXVtICgwKSwgICAgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgICAgICAgICAgICAvKiAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgICAqLworCTB4NzUsIDB4MDEsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBTaXplICgxKSwgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwOCwgICAgICAgICAgICAgICAgICAgLyogICAgUmVwb3J0IENvdW50ICg4KSwgICAgICAgICAgICAgKi8KKwkweDA1LCAweDBDLCAgICAgICAgICAgICAgICAgICAvKiAgICBVc2FnZSBQYWdlIChDb25zdW1lciksICAgICAgICAqLworCTB4MEEsIDB4NkEsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBEZWxldGUpLCAgICAgICAgICAgICovCisJMHgwQSwgMHgxQSwgMHgwMiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgKEFDIFVuZG8pLCAgICAgICAgICAgICAgKi8KKwkweDBBLCAweDAxLCAweDAyLCAgICAgICAgICAgICAvKiAgICBVc2FnZSAoQUMgTmV3KSwgICAgICAgICAgICAgICAqLworCTB4MEEsIDB4MkYsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBab29tKSwgICAgICAgICAgICAgICovCisJMHgwQSwgMHgyNSwgMHgwMiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgKEFDIEZvcndhcmQpLCAgICAgICAgICAgKi8KKwkweDBBLCAweDI0LCAweDAyLCAgICAgICAgICAgICAvKiAgICBVc2FnZSAoQUMgQmFjayksICAgICAgICAgICAgICAqLworCTB4MEEsIDB4MkQsIDB4MDIsICAgICAgICAgICAgIC8qICAgIFVzYWdlIChBQyBab29tIEluKSwgICAgICAgICAgICovCisJMHgwQSwgMHgyRSwgMHgwMiwgICAgICAgICAgICAgLyogICAgVXNhZ2UgKEFDIFpvb20gT3V0KSwgICAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAgICAgICAvKiAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAqLworCTB4OTUsIDB4MzAsICAgICAgICAgICAgICAgICAgIC8qICAgIFJlcG9ydCBDb3VudCAoNDgpLCAgICAgICAgICAgICovCisJMHg4MSwgMHgwMywgICAgICAgICAgICAgICAgICAgLyogICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksICAgKi8KKwkweEMwICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24gICAgICAgICAgICAgICAgICAqLworfTsKKwogc3RhdGljIF9fdTggKmt5ZV9jb25zdW1lcl9jb250cm9sX2ZpeHVwKHN0cnVjdCBoaWRfZGV2aWNlICpoZGV2LCBfX3U4ICpyZGVzYywKIAkJdW5zaWduZWQgaW50ICpyc2l6ZSwgaW50IG9mZnNldCwgY29uc3QgY2hhciAqZGV2aWNlX25hbWUpIHsKIAkvKgpAQCAtMzM1LDYgKzQ2NiwxMiBAQAogCQkJKnJzaXplID0gc2l6ZW9mKGVhc3lwZW5fbTYxMHhfcmRlc2NfZml4ZWQpOwogCQl9CiAJCWJyZWFrOworCWNhc2UgVVNCX0RFVklDRV9JRF9LWUVfUEVOU0tFVENIX005MTI6CisJCWlmICgqcnNpemUgPT0gUEVOU0tFVENIX005MTJfUkRFU0NfT1JJR19TSVpFKSB7CisJCQlyZGVzYyA9IHBlbnNrZXRjaF9tOTEyX3JkZXNjX2ZpeGVkOworCQkJKnJzaXplID0gc2l6ZW9mKHBlbnNrZXRjaF9tOTEyX3JkZXNjX2ZpeGVkKTsKKwkJfQorCQlicmVhazsKIAljYXNlIFVTQl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kweDA3CisKKy8qIEZpeGVkIHJlcG9ydCBkZXNjcmlwdG9yIHRlbXBsYXRlICovCitzdGF0aWMgY29uc3QgX191OCB1Y2xvZ2ljX3RhYmxldF9yZGVzY190ZW1wbGF0ZVtdID0geworCTB4MDUsIDB4MEQsICAgICAgICAgICAgIC8qICBVc2FnZSBQYWdlIChEaWdpdGl6ZXIpLCAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDAyLCAgICAgICAgICAgICAvKiAgVXNhZ2UgKFBlbiksICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisJMHhBMSwgMHgwMSwgICAgICAgICAgICAgLyogIENvbGxlY3Rpb24gKEFwcGxpY2F0aW9uKSwgICAgICAgICAgICAgICAqLworCTB4ODUsIDB4MDcsICAgICAgICAgICAgIC8qICAgICAgUmVwb3J0IElEICg3KSwgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDIwLCAgICAgICAgICAgICAvKiAgICAgIFVzYWdlIChTdHlsdXMpLCAgICAgICAgICAgICAgICAgICAgICovCisJMHhBMCwgICAgICAgICAgICAgICAgICAgLyogICAgICBDb2xsZWN0aW9uIChQaHlzaWNhbCksICAgICAgICAgICAgICAqLworCTB4MTQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgICAgIExvZ2ljYWwgTWluaW11bSAoMCksICAgICAgICAgICAgKi8KKwkweDI1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKDEpLCAgICAgICAgICAgICovCisJMHg3NSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IFNpemUgKDEpLCAgICAgICAgICAgICAgICAqLworCTB4MDksIDB4NDIsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIChUaXAgU3dpdGNoKSwgICAgICAgICAgICAgKi8KKwkweDA5LCAweDQ0LCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoQmFycmVsIFN3aXRjaCksICAgICAgICAgICovCisJMHgwOSwgMHg0NiwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFRhYmxldCBQaWNrKSwgICAgICAgICAgICAqLworCTB4OTUsIDB4MDMsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBDb3VudCAoMyksICAgICAgICAgICAgICAgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwMywgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgzKSwgICAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDMsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChDb25zdGFudCwgVmFyaWFibGUpLCAgICAgKi8KKwkweDA5LCAweDMyLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoSW4gUmFuZ2UpLCAgICAgICAgICAgICAgICovCisJMHg5NSwgMHgwMSwgICAgICAgICAgICAgLyogICAgICAgICAgUmVwb3J0IENvdW50ICgxKSwgICAgICAgICAgICAgICAqLworCTB4ODEsIDB4MDIsICAgICAgICAgICAgIC8qICAgICAgICAgIElucHV0IChWYXJpYWJsZSksICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgICAgICovCisJMHg4MSwgMHgwMywgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKENvbnN0YW50LCBWYXJpYWJsZSksICAgICAqLworCTB4NzUsIDB4MTAsICAgICAgICAgICAgIC8qICAgICAgICAgIFJlcG9ydCBTaXplICgxNiksICAgICAgICAgICAgICAgKi8KKwkweDk1LCAweDAxLCAgICAgICAgICAgICAvKiAgICAgICAgICBSZXBvcnQgQ291bnQgKDEpLCAgICAgICAgICAgICAgICovCisJMHhBNCwgICAgICAgICAgICAgICAgICAgLyogICAgICAgICAgUHVzaCwgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MDUsIDB4MDEsICAgICAgICAgICAgIC8qICAgICAgICAgIFVzYWdlIFBhZ2UgKERlc2t0b3ApLCAgICAgICAgICAgKi8KKwkweDY1LCAweDEzLCAgICAgICAgICAgICAvKiAgICAgICAgICBVbml0IChJbmNoKSwgICAgICAgICAgICAgICAgICAgICovCisJMHg1NSwgMHhGRCwgICAgICAgICAgICAgLyogICAgICAgICAgVW5pdCBFeHBvbmVudCAoLTMpLCAgICAgICAgICAgICAqLworCTB4MzQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgICAgIFBoeXNpY2FsIE1pbmltdW0gKDApLCAgICAgICAgICAgKi8KKwkweDA5LCAweDMwLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoWCksICAgICAgICAgICAgICAgICAgICAgICovCisJMHgyNywgVUNMT0dJQ19QSChYX0xNKSwgLyogICAgICAgICAgTG9naWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICAqLworCTB4NDcsIFVDTE9HSUNfUEgoWF9QTSksIC8qICAgICAgICAgIFBoeXNpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgKi8KKwkweDgxLCAweDAyLCAgICAgICAgICAgICAvKiAgICAgICAgICBJbnB1dCAoVmFyaWFibGUpLCAgICAgICAgICAgICAgICovCisJMHgwOSwgMHgzMSwgICAgICAgICAgICAgLyogICAgICAgICAgVXNhZ2UgKFkpLCAgICAgICAgICAgICAgICAgICAgICAqLworCTB4MjcsIFVDTE9HSUNfUEgoWV9MTSksIC8qICAgICAgICAgIExvZ2ljYWwgTWF4aW11bSAoUExBQ0VIT0xERVIpLCAgKi8KKwkweDQ3LCBVQ0xPR0lDX1BIKFlfUE0pLCAvKiAgICAgICAgICBQaHlzaWNhbCBNYXhpbXVtIChQTEFDRUhPTERFUiksICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLworCTB4QjQsICAgICAgICAgICAgICAgICAgIC8qICAgICAgICAgIFBvcCwgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKwkweDA5LCAweDMwLCAgICAgICAgICAgICAvKiAgICAgICAgICBVc2FnZSAoVGlwIFByZXNzdXJlKSwgICAgICAgICAgICovCisJMHgyNywKKwlVQ0xPR0lDX1BIKFBSRVNTVVJFX0xNKSwvKiAgICAgICAgICBMb2dpY2FsIE1heGltdW0gKFBMQUNFSE9MREVSKSwgICovCisJMHg4MSwgMHgwMiwgICAgICAgICAgICAgLyogICAgICAgICAgSW5wdXQgKFZhcmlhYmxlKSwgICAgICAgICAgICAgICAqLworCTB4QzAsICAgICAgICAgICAgICAgICAgIC8qICAgICAgRW5kIENvbGxlY3Rpb24sICAgICAgICAgICAgICAgICAgICAgKi8KKwkweEMwICAgICAgICAgICAgICAgICAgICAvKiAgRW5kIENvbGxlY3Rpb24gICAgICAgICAgICAgICAgICAgICAgICAgICovCit9OworCisvKiBQYXJhbWV0ZXIgaW5kaWNlcyAqLworZW51bSB1Y2xvZ2ljX3BybSB7CisJVUNMT0dJQ19QUk1fWF9MTQk9IDEsCisJVUNMT0dJQ19QUk1fWV9MTQk9IDIsCisJVUNMT0dJQ19QUk1fUFJFU1NVUkVfTE0JPSA0LAorCVVDTE9HSUNfUFJNX1JFU09MVVRJT04JPSA1LAorCVVDTE9HSUNfUFJNX05VTQorfTsKKworLyogRHJpdmVyIGRhdGEgKi8KK3N0cnVjdCB1Y2xvZ2ljX2RydmRhdGEgeworCV9fdTggKnJkZXNjOworCXVuc2lnbmVkIGludCByc2l6ZTsKKwlib29sIGludmVydF9wZW5faW5yYW5nZTsKKwlib29sIGlnbm9yZV9wZW5fdXNhZ2U7Cit9OworCiBzdGF0aWMgX191OCAqdWNsb2dpY19yZXBvcnRfZml4dXAoc3RydWN0IGhpZF9kZXZpY2UgKmhkZXYsIF9fdTggKnJkZXNjLAogCQkJCQl1bnNpZ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cyBvZiB0aGUgY29yZS4KKwkJCSAqLworCQkJbiArPSBzbnByaW50ZihzZGF0YS0+bGFiZWwgKyBuLAorCQkJCSAgICAgIHNpemVvZihzZGF0YS0+bGFiZWwpIC0gbiwgIiAlZC0lZCIsCisJCQkJICAgICAgY3B1aWQsIGNwdWlkICsgdGhyZWFkc19wZXJfY29yZSAtIDEpOworCQllbHNlCisJCQluICs9IHNucHJpbnRmKHNkYXRhLT5sYWJlbCArIG4sCisJCQkJICAgICAgc2l6ZW9mKHNkYXRhLT5sYWJlbCkgLSBuLCAiIHBoeSVkIiwgaWQpOworCX0KKworCS8qCisJICogTWVtYnVmZmVyIHByZXR0eSBwcmludAorCSAqLworCWlmICghb2ZfcHJvcGVydHlfcmVhZF91MzIobnAsICJpYm0sY2hpcC1pZCIsICZpZCkpCisJCW4gKz0gc25wcmludGYoc2RhdGEtPmxhYmVsICsgbiwgc2l6ZW9mKHNkYXRhLT5sYWJlbCkgLSBuLAorCQkJICAgICAgIiAlZCIsIGlkICYgMHhmZmZmKTsKK30KKworc3RhdGljIGludCBnZXRfc2Vuc29yX2luZGV4X2F0dHIoY29uc3QgY2hhciAqbmFtZSwgdTMyICppbmRleCwgY2hhciAqYXR0cikKIHsKIAljaGFyICpoYXNoX3BvcyA9IHN0cmNocihuYW1lLCAnIycpOwogCWNoYXIgYnVmWzhdID0geyAwIH07CkBAIC0xMjcsNDYgKzE5Myw5MCBAQAogCXJldHVybiAwOwogfQogCitzdGF0aWMgY29uc3QgY2hhciAqY29udmVydF9vcGFsX2F0dHJfbmFtZShlbnVtIHNlbnNvcnMgdHlwZSwKKwkJCQkJICBjb25zdCBjaGFyICpvcGFsX2F0dHIpCit7CisJY29uc3QgY2hhciAqYXR0cl9uYW1lID0gTlVMTDsKKworCWlmICghc3RyY21wKG9wYWxfYXR0ciwgRFRfRkFVTFRfQVRUUl9TVUZGSVgpKSB7CisJCWF0dHJfbmFtZSA9ICJmYXVsdCI7CisJfSBlbHNlIGlmICghc3RyY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MucGRmCisgKgorICovCisKKyNpbmNsdWRlIDxsaW51eC9tb2R1bGUuaD4KKyNpbmNsdWRlIDxsaW51eC9paW8vaWlvLmg+CisjaW5jbHVkZSA8bGludXgvZGVsYXkuaD4KKworI2luY2x1ZGUgIm1zNTYxMS5oIgorCitzdGF0aWMgYm9vbCBtczU2MTFfcHJvbV9pc192YWxpZCh1MTYgKnByb20sIHNpemVfdCBsZW4pCit7CisJaW50IGksIGo7CisJdWludDE2X3QgY3JjID0gMCwgY3JjX29yaWcgPSBwcm9tWzddICYgMHgwMDBGOworCisJcHJvbVs3XSAmPSAweEZGMDA7CisKKwlmb3IgKGkgPSAwOyBpIDwgbGVuICogMjsgaSsrKSB7CisJCWlmIChpICUgMiA9PSAxKQorCQkJY3JjIF49IHByb21baSA+PiAxXSAmIDB4MDBGRjsKKwkJZWxzZQorCQkJY3JjIF49IHByb21baSA+PiAxXSA+PiA4OworCisJCWZvciAoaiA9IDA7IGogPCA4OyBqKyspIHsKKwkJCWlmIChjcmMgJiAweDgwMDApCisJCQkJY3JjID0gKGNyYyA8PCAxKSBeIDB4MzAwMDsKKwkJCWVsc2UKKwkJCQljcmMgPDw9IDE7CisJCX0KKwl9CisKKwljcmMgPSAoY3JjID4+IDEyKSAmIDB4MDAwRjsKKworCXJldHVybiBjcmNfb3JpZyAhPSAweDAwMDAgJiYgY3JjID09IGNyY19vcmlnOworfQorCitzdGF0aWMgaW50IG1zNTYxMV9yZWFkX3Byb20oc3RydWN0IGlpb19kZXYgKmluZGlvX2RldikKK3sKKwlpbnQgcmV0LCBpOworCXN0cnVjdCBtczU2MTFfc3RhdGUgKnN0ID0gaWlvX3ByaXYoaW5kaW9fZGV2KTsKKworCWZvciAoaSA9IDA7IGkgPCBNUzU2MTFfUFJPTV9XT1JEU19OQjsgaSsrKSB7CisJCXJldCA9IHN0LT5yZWFkX3Byb21fd29yZCgmaW5kaW9fZGV2LT5kZXYsIGksICZzdC0+cHJvbVtpXSk7CisJCWlmIChyZXQgP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Ac2V0dGxlX3RpbWU6ICAgICAgICBwbGF0Zm9ybSBzcGVjaWZpYyBzZXR0bGUgZG93biB0aW1lCisgKiBAaXJxdHlwZTogICAgICAgICAgICB0eXBlIG9mIGludGVycnVwdCwgZmFsbGluZyBvciByaXNpbmcgZWRnZQorICogQGVuYWJsZV93YWtldXA6ICAgICAgc3BlY2lmaWVzIGlmIGtleXBhZCBldmVudCBjYW4gd2FrZSB1cCBzeXN0ZW0gZnJvbSBzbGVlcAorICogQG5vX2F1dG9yZXBlYXQ6ICAgICAgZmxhZyBmb3IgYXV0byByZXBldGl0aW9uCisgKi8KK3N0cnVjdCB0YzM1ODl4X2tleXBhZF9wbGF0Zm9ybV9kYXRhIHsKKwljb25zdCBzdHJ1Y3QgbWF0cml4X2tleW1hcF9kYXRhICprZXltYXBfZGF0YTsKKwl1OCAgICAgICAgICAgICAgICAgICAgICBrcm93OworCXU4ICAgICAgICAgICAgICAgICAgICAgIGtjb2w7CisJdTggICAgICAgICAgICAgICAgICAgICAgZGVib3VuY2VfcGVyaW9kOworCXU4ICAgICAgICAgICAgICAgICAgICAgIHNldHRsZV90aW1lOworCXVuc2lnbmVkIGxvbmcgICAgICAgICAgIGlycXR5cGU7CisJYm9vbCAgICAgICAgICAgICAgICAgICAgZW5hYmxlX3dha2V1cDsKKwlib29sICAgICAgICAgICAgICAgICAgICBub19hdXRvcmVwZWF0OworfTsKKworLyoqCiAgKiBzdHJ1Y3QgdGNfa2V5cGFkIC0gZGF0YSBzdHJ1Y3R1cmUgdXNlZCBieSBrZXlwYWQgZHJpdmVyCiAgKiBAdGMzNTg5eDogICAgcG9pbnRlciB0byB0YzM1ODkzCiAgKiBAaW5wdXQ6ICAgICAgcG9pbnRlciB0byBpbnB1dCBkZXZpY2Ugb2JqZWN0CkBAIC0yOTYsNyArMzE4LDYgQEAKIAl0YzM1ODl4X2tleXBhZF9kaXNhYmxlKGtleXBhZCk7CiB9CiAKLSNpZmRlZiBDT05GSUdfT0YKIHN0YXRpY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SBhL2RyaXZlcnMvaW5wdXQvbW91c2Uvc3luYXB0aWNzLmMKKysrIGIvZHJpdmVycy9pbnB1dC9tb3VzZS9zeW5hcHRpY3MuYwpAQCAtNjcsNiArNjcsOSBAQAogI2RlZmluZSBYX01BWF9QT1NJVElWRSA4MTc2CiAjZGVmaW5lIFlfTUFYX1BPU0lUSVZFIDgxNzYKIAorLyogbWF4aW11bSBBQlNfTVRfUE9TSVRJT04gZGlzcGxhY2VtZW50IChpbiBtbSkgKi8KKyNkZWZpbmUgRE1BWCAxMAorCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqCVN0dWZmIHdlIG5lZWQgZXZlbiB3aGVuIHdlIGRvIG5vdCB3YW50IG5hdGl2ZSBTeW5hcHRpY3Mgc3VwcG9ydAogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0yMDMsNiArMjA2LDEzIEBACiAJTlVMTAogfTsKIAorLyogVGhpcyBsaXN0IGhhcyBiZWVuIGtpbmRseSBwcm92aWRlZCBieSBTeW5hcHRpY3MuICovCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGZvcmNlcGFkX3BucF9pZHNbXSA9IHsKKwkiU1lOMzAwRCIsCisJIlNZTjMwMTQiLAorCU5VTEwKK307CisKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICoJU3luYXB0aWNzIGNvbW11bmljYXRpb25zIGZ1bmN0aW9ucwogICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC02ODcsOCArNjk3LDYgQEAKIAlody0+ZXh0X2J1dHRvbnMgfD0gKGJ1Zls1XSA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aWZvX3RocmVzaG9sZDsKKworCS8qIE9wdGlvbmFsIHN0YW5kYXJkIHRvdWNoc2NyZWVuIHByb3BlcnRpZXMuICovCisJdTMyIG1heF94OworCXUzMiBtYXhfeTsKKwl1MzIgZnV6el94OworCXUzMiBmdXp6X3k7CisJYm9vbCBpbnZlcnRfeDsKKwlib29sIGludmVydF95OworfTsKKworc3RydWN0IGlwcm9jX3RzX3ByaXYgeworCXN0cnVjdCBwbGF0Zm9ybV9kZXZpY2UgKnBkZXY7CisJc3RydWN0IGlucHV0X2RldiAqaWRldjsKKworCXZvaWQgX19pb21lbSAqcmVnczsKKwlzdHJ1Y3QgY2xrICp0c2NfY2xrOworCisJaW50ICBwZW5fc3RhdHVzOworCXN0cnVjdCB0c2NfcGFyYW0gY2ZnX3BhcmFtczsKK307CisKKy8qCisgKiBTZXQgZGVmYXVsdCB2YWx1ZXMgdGhlIHNhbWUgYXMgaGFyZHdhcmUgcmVzZXQgdmFsdWVzCisgKiBleGNlcHQgZm9yIGZpZm9fdGhyZXNob2xkIHdpdGggaXMgc2V0IHRvIDEuCisgKi8KK3N0YXRpYyBjb25zdCBzdHJ1Y3QgdHNjX3BhcmFtIGlwcm9jX2RlZmF1bHRfY29uZmlnID0geworCS5zY2FubmluZ19wZXJpb2QgID0gMHg1LCAgLyogMSB0byAyNTYgKi8KKwkuZGVib3VuY2VfdGltZW91dCA9IDB4MjgsIC8qIDAgdG8gMjU1ICovCisJLnNldHRsaW5nX3RpbWVvdXQgPSAweDcsICAvKiAwIHRvIDExICovCisJLnRvdWNoX3RpbWVvdXQgICAgPSAweGEsICAvKiAwIHRvIDI1NSAqLworCS5hdmVyYWdlX2RhdGEgICAgID0gNSwgICAgLyogZW50cnkgNSA9IDMyIHB0cyAqLworCS5maWZvX3RocmVzaG9sZCAgID0gMSwgICAgLyogMCB0byAzMSAqLworCS5tYXhfeCAgICAgICAgICAgID0gWF9NQVgsCisJLm1heF95ICAgICAgICAgICAgPSBZX01BWCwKK307CisKK3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B4OWQ4MCwgMHg5ZGVjLAorCQkweDllMDAsIDB4OWU2YywKKwkJMHg5ZTgwLCAweDllZWMsCisJCTB4OWYwMCwgMHg5ZjZjLAorCQkweDlmODAsIDB4OWZlYywKKwkJMHhkMDA0LCAweGQwM2MsCisJCTB4ZGZjMCwgMHhkZmUwLAorCQkweGUwMDAsIDB4ZWE3YywKKwkJMHhmMDAwLCAweDExMTEwLAorCQkweDExMTE4LCAweDExMTkwLAorCQkweDE5MDQwLCAweDE5MDZjLAorCQkweDE5MDc4LCAweDE5MDgwLAorCQkweDE5MDhjLCAweDE5MTI0LAorCQkweDE5MTUwLCAweDE5MWIwLAorCQkweDE5MWQwLCAweDE5MWU4LAorCQkweDE5MjM4LCAweDE5MjRjLAorCQkweDE5M2Y4LCAweDE5NDc0LAorCQkweDE5NDkwLCAweDE5NGY4LAorCQkweDE5ODAwLCAweDE5ZjMwLAorCQkweDFhMDAwLCAweDFhMDZjLAorCQkweDFhMGIwLCAweDFhMTIwLAorCQkweDFhMTI4LCAweDFhMTM4LAorCQkweDFhMTkwLCAweDFhMWM0LAorCQkweDFhMWZjLCAweDFhMWZjLAorCQkweDFlMDQwLCAweDFlMDRjLAorCQkweDFlMjg0LCAweDFlMjhjLAorCQkweDFlMmMwLCAweDFlMmMwLAorCQkweDFlMmUwLCAweDFlMmUwLAorCQkweDFlMzAwLCAweDFlMzg0LAorCQkweDFlM2MwLCAweDFlM2M4LAorCQkweDFlNDQwLCAweDFlNDRjLAorCQkweDFlNjg0LCAweDFlNjhjLAorCQkweDFlNmMwLCAweDFlNmMwLAorCQkweDFlNmUwLCAweDFlNmUwLAorCQkweDFlNzAwLCAweDFlNzg0LAorCQkweDFlN2MwLCAweDFlN2M4LAorCQkweDFlODQwLCAweDFlODRjLAorCQkweDFlYTg0LCAweDFlYThjLAorCQkweDFlYWMwLCAweDFlYWMwLAorCQkweDFlYWUwLCAweDFlYWUwLAorCQkweDFlYjAwLCAweDFlYjg0LAorCQkweDFlYmMwLCAweDFlYmM4LAorCQkweDFlYzQwLCAweDFlYzRjLAorCQkweDFlZTg0LCAweDFlZThjLAorCQkweDFlZWMwLCAweDFlZWMwLAorCQkweDFlZWUwLCAweDFlZWUwLAorCQkweDFlZjAwLCAweDFlZjg0LAorCQkweDFlZmMwLCAweDFlZmM4LAorCQkweDFmMDQwLCAweDFmMDRjLAorCQkweDFmMjg0LCAweDFmMjhjLAorCQkweDFmMmMwLCAweDFmMmMwLAorCQkweDFmMmUwLCAweDFmMmUwLAorCQkweDFmMzAwLCAweDFmMzg0LAorCQkweDFmM2MwLCAweDFmM2M4LAorCQkweDFmNDQwLCAweDFmNDRjLAorCQkweDFmNjg0LCAweDFmNjhjLAorCQkweDFmNmMwLCAweDFmNmMwLAorCQkweDFmNmUwLCAweDFmNmUwLAorCQkweDFmNzAwLCAweDFmNzg0LAorCQkweDFmN2MwLCAweDFmN2M4LAorCQkweDFmODQwLCAweDFmODRjLAorCQkweDFmYTg0LCAweDFmYThjLAorCQkweDFmYWMwLCAweDFmYWMwLAorCQkweDFmYWUwLCAweDFmYWUwLAorCQkweDFmYjAwLCAweDFmYjg0LAorCQkweDFmYmMwLCAweDFmYmM4LAorCQkweDFmYzQwLCAweDFmYzRjLAorCQkweDFmZTg0LCAweDFmZThjLAorCQkweDFmZWMwLCAweDFmZWMwLAorCQkweDFmZWUwLCAweDFmZWUwLAorCQkweDFmZjAwLCAweDFmZjg0LAorCQkweDFmZmMwLCAweDFmZmM4LAorCQkweDIwMDAwLCAweDIwMDJjLAorCQkweDIwMTAwLCAweDIwMTNjLAorCQkweDIwMTkwLCAweDIwMWM4LAorCQkweDIwMjAwLCAweDIwMzE4LAorCQkweDIwNDAwLCAweDIwNTI4LAorCQkweDIwNTQwLCAweDIwNjE0LAorCQkweDIxMDAwLCAweDIxMDQwLAorCQkweDIxMDRjLCAweDIxMDYwLAorCQkweDIxMGMwLCAweDIxMGVjLAorCQkweDIxMjAwLCAweDIxMjY4LAorCQkweDIxMjcwLCAweDIxMjg0LAorCQkweDIxMmZjLCAweDIxMzg4LAorCQkweDIxNDAwLCAweDIxNDA0LAorCQkweDIxNTAwLCAweDIxNTE4LAorCQkweDIxNTJjLCAweDIxNTNjLAorCQkweDIxNTUwLCAweDIxNTU0LAorCQkweDIxNjAwLCAweDIxNjAwLAorCQkweDIxNjA4LCAweDIxNjI4LAorCQkweDIxNjMwLCAweDIxNjNjLAorCQkweDIxNzAwLCAweDIxNzFjLAorCQkweDIxNzgwLCAweDIxNzhjLAorCQkweDIxODAwLCAweDIxYzM4LAorCQkweDIxYzgwLCAweDIxZDdjLAorCQkweDIxZTAwLCAweDIxZTA0LAorCQkweDIyMDAwLCAweDIyMDJjLAorCQkweDIyMTAwLCAweDIyMTNjLAorCQkweDIyMTkwLCAweDIyMWM4LAorCQkweDIyMjAwLCAweDIyMzE4LAorCQkweDIyNDAwLCAweDIyNTI4LAorCQkweDIyNTQwLCAweDIyNjE0LAorCQkweDIzMDAwLCAweDIzMDQwLAorCQkweDIzMDRjLCAweDIzMDYwLAorCQkweDIzMGMwLCAweDIzMGVjLAorCQkweDIzMjAwLCAweDIzMjY4LAorCQkweDIzMjcwLCAweDIzMjg0LAorCQkweDIzMmZjLCAweDIzMzg4LAorCQkweDIzNDAwLCAweDIzNDA0LAorCQkweDIzNTAwLCAweDIzNTE4LAorCQkweDIzNTJjLCAweDIzNTNjLAorCQkweDIzNTUwLCAweDIzNTU0LAorCQkweDIzNjAwLCAweDIzNjAwLAorCQkweDIzNjA4LCAweDIzNjI4LAorCQkweDIzNjMwLCAweDIzNjNjLAorCQkweDIzNzAwLCAweDIzNzFjLAorCQkweDIzNzgwLCAweDIzNzhjLAorCQkweDIzODAwLCAweDIzYzM4LAorCQkweDIzYzgwLCAweDIzZDdjLAorCQkweDIzZTAwLCAweDIzZTA0LAorCQkweDI0MDAwLCAweDI0MDJjLAorCQkweDI0MTAwLCAweDI0MTNjLAorCQkweDI0MTkwLCAweDI0MWM4LAorCQkweDI0MjAwLCAweDI0MzE4LAorCQkweDI0NDAwLCAweDI0NTI4LAorCQkweDI0NTQwLCAweDI0NjE0LAorCQkweDI1MDAwLCAweDI1MDQwLAorCQkweDI1MDRjLCAweDI1MDYwLAorCQkweDI1MGMwLCAweDI1MGVjLAorCQkweDI1MjAwLCAweDI1MjY4LAorCQkweDI1MjcwLCAweDI1Mjg0LAorCQkweDI1MmZjLCAweDI1Mzg4LAorCQkweDI1NDAwLCAweDI1NDA0LAorCQkweDI1NTAwLCAweDI1NTE4LAorCQkweDI1NTJjLCAweDI1NTNjLAorCQkweDI1NTUwLCAweDI1NTU0LAorCQkweDI1NjAwLCAweDI1NjAwLAorCQkweDI1NjA4LCAweDI1NjI4LAorCQkweDI1NjMwLCAweDI1NjNjLAorCQkweDI1NzAwLCAweDI1NzFjLAorCQkweDI1NzgwLCAweDI1NzhjLAorCQkweDI1ODAwLCAweDI1YzM4LAorCQkweDI1YzgwLCAweDI1ZDdjLAorCQkweDI1ZTAwLCAweDI1ZTA0LAorCQkweDI2MDAwLCAweDI2MDJjLAorCQkweDI2MTAwLCAweDI2MTNjLAorCQkweDI2MTkwLCAweDI2MWM4LAorCQkweDI2MjAwLCAweDI2MzE4LAorCQkweDI2NDAwLCAweDI2NTI4LAorCQkweDI2NTQwLCAweDI2NjE0LAorCQkweDI3MDAwLCAweDI3MDQwLAorCQkweDI3MDRjLCAweDI3MDYwLAorCQkweDI3MGMwLCAweDI3MGVjLAorCQkweDI3MjAwLCAweDI3MjY4LAorCQkweDI3MjcwLCAweDI3Mjg0LAorCQkweDI3MmZjLCAweDI3Mzg4LAorCQkweDI3NDAwLCAweDI3NDA0LAorCQkweDI3NTAwLCAweDI3NTE4LAorCQkweDI3NTJjLCAweDI3NTNjLAorCQkweDI3NTUwLCAweDI3NTU0LAorCQkweDI3NjAwLCAweDI3NjAwLAorCQkweDI3NjA4LCAweDI3NjI4LAorCQkweDI3NjMwLCAweDI3NjNjLAorCQkweDI3NzAwLCAweDI3NzFjLAorCQkweDI3Nzgw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fR1BJT19QSU4oNDMpLAorCUJDTTI4MzVfR1BJT19QSU4oNDQpLAorCUJDTTI4MzVfR1BJT19QSU4oNDUpLAorCUJDTTI4MzVfR1BJT19QSU4oNDYpLAorCUJDTTI4MzVfR1BJT19QSU4oNDcpLAorCUJDTTI4MzVfR1BJT19QSU4oNDgpLAorCUJDTTI4MzVfR1BJT19QSU4oNDkpLAorCUJDTTI4MzVfR1BJT19QSU4oNTApLAorCUJDTTI4MzVfR1BJT19QSU4oNTEpLAorCUJDTTI4MzVfR1BJT19QSU4oNTIpLAorCUJDTTI4MzVfR1BJT19QSU4oNTMpLAorfTsKKworLyogb25lIHBpbiBwZXIgZ3JvdXAgKi8KK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgYmNtMjgzNV9ncGlvX2dyb3Vwc1tdID0geworCSJncGlvMCIsCisJImdwaW8xIiwKKwkiZ3BpbzIiLAorCSJncGlvMyIsCisJImdwaW80IiwKKwkiZ3BpbzUiLAorCSJncGlvNiIsCisJImdwaW83IiwKKwkiZ3BpbzgiLAorCSJncGlvOSIsCisJImdwaW8xMCIsCisJImdwaW8xMSIsCisJImdwaW8xMiIsCisJImdwaW8xMyIsCisJImdwaW8xNCIsCisJImdwaW8xNSIsCisJImdwaW8xNiIsCisJImdwaW8xNyIsCisJImdwaW8xOCIsCisJImdwaW8xOSIsCisJImdwaW8yMCIsCisJImdwaW8yMSIsCisJImdwaW8yMiIsCisJImdwaW8yMyIsCisJImdwaW8yNCIsCisJImdwaW8yNSIsCisJImdwaW8yNiIsCisJImdwaW8yNyIsCisJImdwaW8yOCIsCisJImdwaW8yOSIsCisJImdwaW8zMCIsCisJImdwaW8zMSIsCisJImdwaW8zMiIsCisJImdwaW8zMyIsCisJImdwaW8zNCIsCisJImdwaW8zNSIsCisJImdwaW8zNiIsCisJImdwaW8zNyIsCisJImdwaW8zOCIsCisJImdwaW8zOSIsCisJImdwaW80MCIsCisJImdwaW80MSIsCisJImdwaW80MiIsCisJImdwaW80MyIs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CAiYnNjMF9zZGEiLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoOCwgImJzYzFfc2NsIiwgMCwgMCwgMCksCisJQ1lHTlVTX1BJTl9ERVNDKDksICJic2MxX3NkYSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygxMCwgImQxd19kcSIsIDEsIDB4MjgsIDApLAorCUNZR05VU19QSU5fREVTQygxMSwgImQxd293c3R6X2wiLCAxLCAweDQsIDI4KSwKKwlDWUdOVVNfUElOX0RFU0MoMTIsICJncGlvMCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygxMywgImdwaW8xIiwgMCwgMCwgMCksCisJQ1lHTlVTX1BJTl9ERVNDKDE0LCAiZ3BpbzIiLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoMTUsICJncGlvMyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygxNiwgImdwaW80IiwgMCwgMCwgMCksCisJQ1lHTlVTX1BJTl9ERVNDKDE3LCAiZ3BpbzUiLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoMTgsICJncGlvNiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygxOSwgImdwaW83IiwgMCwgMCwgMCksCisJQ1lHTlVTX1BJTl9ERVNDKDIwLCAiZ3BpbzgiLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoMjEsICJncGlvOSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyMiwgImdwaW8xMCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyMywgImdwaW8xMSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNCwgImdwaW8xMiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNSwgImdwaW8xMyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNiwgImdwaW8xNCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyNywgImdwaW8xNSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyOCwgImdwaW8xNiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygyOSwgImdwaW8xNyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMCwgImdwaW8xOCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMSwgImdwaW8xOSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMiwgImdwaW8yMCIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzMywgImdwaW8yMSIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNCwgImdwaW8yMiIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNSwgImdwaW8yMyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNiwgIm1kYyIsIDAsIDAsIDApLAorCUNZR05VU19QSU5fREVTQygzNywgIm1kaW8iLCAwLCAwLCAwKSwKKwlDWUdOVVNfUElOX0RFU0MoMzgsICJwd20wIiwgMSwgMHgxMCwgMzApLAorCUNZR05VU19QSU5fREVTQygzOSwgInB3bTEiLCAxLCAweDEwLCAyOCksCisJQ1lHTlVTX1BJTl9ERVNDKDQwLCAicHdtMiIsIDEsIDB4MTAsIDI2KSwKKwlDWUdOVVNfUElOX0RFU0MoNDEsICJwd20zIiwgMSwgMHgxMCwgMjQpLAorCUNZR05VU19QSU5fREVTQyg0MiwgInNjMF9jbGsiLCAxLCAweDEwLCAyMiksCisJQ1lHTlVTX1BJTl9ERVNDKDQzLCAic2MwX2NtZHZjY19sIiwgMSwgMHgxMCwgMjApLAorCUNZR05VU19QSU5fREVTQyg0NCwgInNjMF9kZXRlY3QiLCAxLCAweDEwLCAxOCksCisJQ1lHTlVTX1BJTl9ERVNDKDQ1LCAic2MwX2ZjYiIsIDEsIDB4MTAsIDE2KSwKKwlDWUdOVVNfUElOX0RFU0MoNDYsICJzYzBfaW8iLCAxLCAweDEwLC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biA+PSBjb21tdW5pdHktPnBpbl9iYXNlICYmCisJCSAgICBwaW4gPCBjb21tdW5pdHktPnBpbl9iYXNlICsgY29tbXVuaXR5LT5ucGlucykKKwkJCXJldHVybiBjb21tdW5pdHk7CisJfQorCisJZGV2X3dhcm4ocGN0cmwtPmRldiwgImZhaWxlZCB0byBmaW5kIGNvbW11bml0eSBmb3IgcGluICV1XG4iLCBwaW4pOworCXJldHVybiBOVUxMOworfQorCitzdGF0aWMgdm9pZCBfX2lvbWVtICppbnRlbF9nZXRfcGFkY2ZnKHN0cnVjdCBpbnRlbF9waW5jdHJsICpwY3RybCwgdW5zaWduZWQgcGluLAorCQkJCSAgICAgIHVuc2lnbmVkIHJlZykKK3sKKwljb25zdCBzdHJ1Y3QgaW50ZWxfY29tbXVuaXR5ICpjb21tdW5pdHk7CisJdW5zaWduZWQgcGFkbm87CisKKwljb21tdW5pdHkgPSBpbnRlbF9nZXRfY29tbXVuaXR5KHBjdHJsLCBwaW4pOworCWlmICghY29tbXVuaXR5KQorCQlyZXR1cm4gTlVMTDsKKworCXBhZG5vID0gcGluX3RvX3BhZG5vKGNvbW11bml0eSwgcGluKTsKKwlyZXR1cm4gY29tbXVuaXR5LT5wYWRfcmVncyArIHJlZyArIHBhZG5vICogODsKK30KKworc3RhdGljIGJvb2wgaW50ZWxfcGFkX293bmVkX2J5X2hvc3Qoc3RydWN0IGludGVsX3BpbmN0cmwgKnBjdHJsLCB1bnNpZ25lZCBwaW4pCit7CisJY29uc3Qgc3RydWN0IGludGVsX2NvbW11bml0eSAqY29tbXVuaXR5OworCXVuc2lnbmVkIHBhZG5vLCBncHAsIGdwcF9vZmZzZXQsIG9mZnNldDsKKwl2b2lkIF9faW9tZW0gKnBhZG93bjsKKworCWNvbW11bml0eSA9IGludGVsX2dldF9jb21tdW5pdHkocGN0cmwsIHBpbik7CisJaWYgKCFjb21tdW5pdHkpCisJCXJldHVybiBmYWxzZTsKKwlpZiAoIWNvbW11bml0eS0+cGFkb3duX29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5kbGVyKTsKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBpbnRlbF9waW5jdHJsX3BtX2luaXQoc3RydWN0IGludGVsX3BpbmN0cmwgKnBjdHJsKQoreworI2lmZGVmIENPTkZJR19QTV9TTEVFUAorCWNvbnN0IHN0cnVjdCBpbnRlbF9waW5jdHJsX3NvY19kYXRhICpzb2MgPSBwY3RybC0+c29jOworCXN0cnVjdCBpbnRlbF9jb21tdW5pdHlfY29udGV4dCAqY29tbXVuaXRpZXM7CisJc3RydWN0IGludGVsX3BhZF9jb250ZXh0ICpwYWRzOworCWludCBpOworCisJcGFkcyA9IGRldm1fa2NhbGxvYyhwY3RybC0+ZGV2LCBzb2MtPm5waW5zLCBzaXplb2YoKnBhZHMpLCBHRlBfS0VSTkVMKTsKKwlpZiAoIXBhZHMpCisJCXJldHVybiAtRU5PTUVNOworCisJY29tbXVuaXRpZXMgPSBkZXZtX2tjYWxsb2MocGN0cmwtPmRldiwgcGN0cmwtPm5jb21tdW5pdGllcywKKwkJCQkgICBzaXplb2YoKmNvbW11bml0aWVzKSwgR0ZQX0tFUk5FTCk7CisJaWYgKCFjb21tdW5pdGllcykKKwkJcmV0dXJuIC1FTk9NRU07CisKKworCWZvciAoaSA9IDA7IGkgPCBwY3RybC0+bmNvbW11bml0aWVzOyBpKyspIHsKKwkJc3RydWN0IGludGVsX2NvbW11bml0eSAqY29tbXVuaXR5ID0gJnBjdHJsLT5jb21tdW5pdGllc1tpXTsKKwkJdTMyICppbnRtYXNrOworCisJCWludG1hc2sgPSBkZXZtX2tjYWxsb2MocGN0cmwtPmRldiwgY29tbXVuaXR5LT5uZ3BwcywKKwkJCQkgICAgICAgc2l6ZW9mKCppbnRtYXNrKSwgR0ZQX0tFUk5FTCk7CisJCWlmICghaW50bWFzaykKKwkJCXJldHVybiAtRU5PTUVNOworCisJCWNvbW11bml0aWVzW2ldLmludG1hc2sgPSBpbnRtYXNrOworCX0KKworCXBjdHJsLT5jb250ZXh0LnBhZHM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wgPSBwaW5jdHJsX2Rldl9nZXRfZHJ2ZGF0YShwY3RsZGV2KTsKKworCSpjb25maWcgPSBwY3RsLT5ncm91cHNbZ3JvdXBdLmNvbmZpZzsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IG10a19wY29uZl9ncm91cF9zZXQoc3RydWN0IHBpbmN0cmxfZGV2ICpwY3RsZGV2LCB1bnNpZ25lZCBncm91cCwKKwkJCQkgdW5zaWduZWQgbG9uZyAqY29uZmlncywgdW5zaWduZWQgbnVtX2NvbmZpZ3MpCit7CisJc3RydWN0IG10a19waW5jdHJsICpwY3RsID0gcGluY3RybF9kZXZfZ2V0X2RydmRhdGEocGN0bGRldik7CisJc3RydWN0IG10a19waW5jdHJsX2dyb3VwICpnID0gJnBjdGwtPmdyb3Vwc1tncm91cF07CisJaW50IGk7CisKKwlmb3IgKGkgPSAwOyBpIDwgbnVtX2NvbmZpZ3M7IGkrKykgeworCQltdGtfcGNvbmZfcGFyc2VfY29uZihwY3RsZGV2LCBnLT5waW4sCisJCQlwaW5jb25mX3RvX2NvbmZpZ19wYXJhbShjb25maWdzW2ldKSwKKwkJCXBpbmNvbmZfdG9fY29uZmlnX2FyZ3VtZW50KGNvbmZpZ3NbaV0pKTsKKworCQlnLT5jb25maWcgPSBjb25maWdzW2ldOworCX0KKworCXJldHVybiAwOworfQorCitzdGF0aWMgY29uc3Qgc3RydWN0IHBpbmNvbmZfb3BzIG10a19wY29uZl9vcHMgPSB7CisJLnBpbl9jb25maWdfZ3JvdXBfZ2V0CT0gbXRrX3Bjb25mX2dyb3VwX2dldCwKKwkucGluX2NvbmZpZ19ncm91cF9zZXQJPSBtdGtfcGNvbmZfZ3JvdXBfc2V0LAorfTsKKworc3RhdGljIHN0cnVjdCBtdGtfcGluY3RybF9ncm91cCAqCittdGtfcGN0cmxfZmluZF9ncm91cF9ieV9waW4oc3RydWN0IG10a19waW5jdHJsICpwY3RsLCB1MzIgcGluKQoreworCWludCBpOworCisJZm9yIChpID0gM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CisKKwkJCXdoaWxlIChmdW5jICYmIGZ1bmMtPm5hbWUpIHsKKwkJCQlpZiAoZnVuYy0+bXV4dmFsID09IGZudW0pCisJCQkJCXJldHVybiB0cnVlOworCQkJCWZ1bmMrKzsKKwkJCX0KKworCQkJYnJlYWs7CisJCX0KKwl9CisKKwlyZXR1cm4gZmFsc2U7Cit9CisKK3N0YXRpYyBpbnQgbXRrX3BjdHJsX2R0X25vZGVfdG9fbWFwX2Z1bmMoc3RydWN0IG10a19waW5jdHJsICpwY3RsLAorCQl1MzIgcGluLCB1MzIgZm51bSwgc3RydWN0IG10a19waW5jdHJsX2dyb3VwICpncnAsCisJCXN0cnVjdCBwaW5jdHJsX21hcCAqKm1hcCwgdW5zaWduZWQgKnJlc2VydmVkX21hcHMsCisJCXVuc2lnbmVkICpudW1fbWFwcykKK3sKKwlib29sIHJldDsKKworCWlmICgqbnVtX21hcHMgPT0gKnJlc2VydmVkX21hcHMpCisJCXJldHVybiAtRU5PU1BDOworCisJKCptYXApWypudW1fbWFwc10udHlwZSA9IFBJTl9NQVBfVFlQRV9NVVhfR1JPVVA7CisJKCptYXApWypudW1fbWFwc10uZGF0YS5tdXguZ3JvdXAgPSBncnAtPm5hbWU7CisKKwlyZXQgPSBtdGtfcGN0cmxfaXNfZnVuY3Rpb25fdmFsaWQocGN0bCwgcGluLCBmbnVtKTsKKwlpZiAoIXJldCkgeworCQlkZXZfZXJyKHBjdGwtPmRldiwgImludmFsaWQgZnVuY3Rpb24gJWQgb24gcGluICVkIC5cbiIsCisJCQkJZm51bSwgcGluKTsKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJKCptYXApWypudW1fbWFwc10uZGF0YS5tdXguZnVuY3Rpb24gPSBtdGtfZ3Bpb19mdW5jdGlvbnNbZm51bV07CisJKCpudW1fbWFwcykrKzsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IG10a19wY3RybF9kdF9zdWJub2RlX3RvX21hcChzdHJ1Y3QgcGluY3RybF9kZXYgKnBjdGxkZXYsCisJCQkJICAgICAgc3RydWN0IGRldmljZV9ub2RlICpub2RlLAorCQkJCSAgICAgIHN0cnVjdCBwaW5jdHJsX21hcCAqKm1hcCwKKwkJCQkgICAgICB1bnNpZ25lZCAqcmVzZXJ2ZWRfbWFwcywKKwkJCQkgICAgICB1bnNpZ25lZCAqbnVtX21hcHMpCit7CisJc3RydWN0IHByb3BlcnR5ICpwaW5zOworCXUzMiBwaW5mdW5jLCBwaW4sIGZ1bmM7CisJaW50IG51bV9waW5zLCBudW1fZnVuY3MsIG1hcHNfcGVyX3BpbjsKKwl1bnNpZ25lZCBsb25nICpjb25maWdzOworCXVuc2lnbmVkIGludCBudW1fY29uZmlnczsKKwlib29sIGhhc19jb25maWcgPSAwOworCWludCBpLCBlcnI7CisJdW5zaWduZWQgcmVzZXJ2ZSA9IDA7CisJc3RydWN0IG10a19waW5jdHJsX2dyb3VwICpncnA7CisJc3RydWN0IG10a19waW5jdHJsICpwY3RsID0gcGluY3RybF9kZXZfZ2V0X2RydmRhdGEocGN0bGRldik7CisKKwlwaW5zID0gb2ZfZmluZF9wcm9wZXJ0eShub2RlLCAicGlubXV4IiwgTlVMTCk7CisJaWYgKCFwaW5zKSB7CisJCWRldl9lcnIocGN0bC0+ZGV2LCAibWlzc2luZyBwaW5zIHByb3BlcnR5IGluIG5vZGUgJXMgLlxuIiwKKwkJCQlub2RlLT5uYW1lKTsKKwkJcmV0dXJuIC1FSU5WQUw7CisJfQorCisJZXJyID0gcGluY29uZl9nZW5lcmljX3BhcnNlX2R0X2NvbmZpZyhub2RlLCBwY3RsZGV2LCAmY29uZmlncywKKwkJJm51bV9jb25maWdzKTsKKwlpZiAobnVtX2NvbmZpZ3MpCisJCWhhc19jb25maWcgPSAxOworCisJbnVtX3BpbnMgPSBwaW5zLT5sZW5ndGggLyBzaXplb2YodTMyKTsKKwludW1fZnVuY3MgPSBudW1fcGluczsKKwltYXBzX3Blcl9waW4gPSAwOworCWlmIChudW1fZnVuY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nEocGN0bC0+Y2hpcCwgcGluLT5waW4ubnVtYmVyKTsKKwlpZiAocmV0KSB7CisJCWRldl9lcnIocGN0bC0+ZGV2LCAidW5hYmxlIHRvIGxvY2sgSFcgSVJRICVsdSBmb3IgSVJRXG4iLAorCQkJaXJxZF90b19od2lycShkKSk7CisJCXJldHVybiByZXQ7CisJfQorCisJLyogc2V0IG11eCB0byBJTlQgbW9kZSAqLworCW10a19wbXhfc2V0X21vZGUocGN0bC0+cGN0bF9kZXYsIHBpbi0+cGluLm51bWJlciwgcGluLT5laW50LmVpbnRtdXgpOworCisJcmV0dXJuIDA7Cit9CisKK3N0YXRpYyB2b2lkIG10a19waW5jdHJsX2lycV9yZWxlYXNlX3Jlc291cmNlcyhzdHJ1Y3QgaXJxX2RhdGEgKmQpCit7CisJc3RydWN0IG10a19waW5jdHJsICpwY3RsID0gaXJxX2RhdGFfZ2V0X2lycV9jaGlwX2RhdGEoZCk7CisJY29uc3Qgc3RydWN0IG10a19kZXNjX3BpbiAqcGluOworCisJcGluID0gbXRrX2ZpbmRfcGluX2J5X2VpbnRfbnVtKHBjdGwsIGQtPmh3aXJxKTsKKworCWlmICghcGluKSB7CisJCWRldl9lcnIocGN0bC0+ZGV2LCAiQ2FuIG5vdCBmaW5kIHBpblxuIik7CisJCXJldHVybjsKKwl9CisKKwlncGlvY2hpcF91bmxvY2tfYXNfaXJxKHBjdGwtPmNoaXAsIHBpbi0+cGluLm51bWJlcik7Cit9CisKK3N0YXRpYyB2b2lkIF9faW9tZW0gKm10a19laW50X2dldF9vZmZzZXQoc3RydWN0IG10a19waW5jdHJsICpwY3RsLAorCXVuc2lnbmVkIGludCBlaW50X251bSwgdW5zaWduZWQgaW50IG9mZnNldCkKK3sKKwl1bnNpZ25lZCBpbnQgZWludF9iYXNlID0gMDsKKwl2b2lkIF9faW9tZW0gKnJlZzsKKworCWlmIChlaW50X251bSA+PSBwY3RsLT5kZXZkYXRhLT5hcF9udW0pCisJCWVpbnRfYmFzZSA9IH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fUElOKDEzLCAiRUlOVDEzIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxMyksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzEzIiksCisJCU1US19GVU5DVElPTigxLCAiQ0xLTTMiKSwKKwkJTVRLX0ZVTkNUSU9OKDIsICJJMlMzX01DSyIpLAorCQlNVEtfRlVOQ1RJT04oMywgIlNSQ0xLRU5BMCIpLAorCQlNVEtfRlVOQ1RJT04oNSwgIkkyUzJfQkNLIiksCisJCU1US19GVU5DVElPTig3LCAiREJHX01PTl9BXzMyXyIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTigxNCwgIkVJTlQxNCIpLAorCQlOVUxMLCAibXQ4MTczIiwKKwkJTVRLX0VJTlRfRlVOQ1RJT04oMCwgMTQpLAorCQlNVEtfRlVOQ1RJT04oMCwgIkdQSU8xNCIpLAorCQlNVEtfRlVOQ1RJT04oMSwgIkNNREFUMCIpLAorCQlNVEtfRlVOQ1RJT04oMiwgIkNNQ1NEMCIpLAorCQlNVEtfRlVOQ1RJT04oNCwgIkNMS00yIiksCisJCU1US19GVU5DVElPTig3LCAiREJHX01PTl9CXzZfIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDE1LCAiRUlOVDE1IiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNSksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE1IiksCisJCU1US19GVU5DVElPTigxLCAiQ01EQVQxIiksCisJCU1US19GVU5DVElPTigyLCAiQ01DU0QxIiksCisJCU1US19GVU5DVElPTigzLCAiQ01GTEFTSCIpLAorCQlNVEtfRlVOQ1RJT04oNCwgIkNMS00zIiksCisJCU1US19GVU5DVElPTig3LCAiREJHX01PTl9CXzI5XyIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTigxNiwgIklERElHIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNiksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE2IiksCisJCU1US19GVU5DVElPTigxLCAiSURESUciKSwKKwkJTVRLX0ZVTkNUSU9OKDIsICJDTUZMQVNIIiksCisJCU1US19GVU5DVElPTig0LCAiUFdNNSIpCisJKSwKKwlNVEtfUElOKAorCQlQSU5DVFJMX1BJTigxNywgIldBVENIRE9HIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxNyksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE3IiksCisJCU1US19GVU5DVElPTigxLCAiV0FUQ0hET0dfQU8iKQorCSksCisJTVRLX1BJTigKKwkJUElOQ1RSTF9QSU4oMTgsICJDRUMiKSwKKwkJTlVMTCwgIm10ODE3MyIsCisJCU1US19FSU5UX0ZVTkNUSU9OKDAsIDE4KSwKKwkJTVRLX0ZVTkNUSU9OKDAsICJHUElPMTgiKSwKKwkJTVRLX0ZVTkNUSU9OKDEsICJDRUMiKQorCSksCisJTVRLX1BJTigKKwkJUElOQ1RSTF9QSU4oMTksICJIRE1JU0NLIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAxOSksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzE5IiksCisJCU1US19GVU5DVElPTigxLCAiSERNSVNDSyIpLAorCQlNVEtfRlVOQ1RJT04oMiwgIkhEQ1BfU0NMIikKKwkpLAorCU1US19QSU4oCisJCVBJTkNUUkxfUElOKDIwLCAiSERNSVNEIiksCisJCU5VTEwsICJtdDgxNzMiLAorCQlNVEtfRUlOVF9GVU5DVElPTigwLCAyMCksCisJCU1US19GVU5DVElPTigwLCAiR1BJTzIwIiksCisJCU1US19GVU5DVElPTigxLCAiSERNSVNEIiksCisJCU1US19GVU5DVElPTigyLCAiSERDUF9TREEiKQorCSksCisJTVRLX1BJTigKKwkJUElOQ1RSTF9Q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xNiksCi0JTUVTT05fUElOKEJPT1RfMTcpLAotCU1FU09OX1BJTihCT09UXzE4KSwKLQlNRVNPTl9QSU4oR1BJT0FPXzApLAotCU1FU09OX1BJTihHUElPQU9fMSksCi0JTUVTT05fUElOKEdQSU9BT18yKSwKLQlNRVNPTl9QSU4oR1BJT0FPXzMpLAotCU1FU09OX1BJTihHUElPQU9fNCksCi0JTUVTT05fUElOKEdQSU9BT181KSwKLQlNRVNPTl9QSU4oR1BJT0FPXzYpLAotCU1FU09OX1BJTihHUElPQU9fNyksCi0JTUVTT05fUElOKEdQSU9BT184KSwKLQlNRVNPTl9QSU4oR1BJT0FPXzkpLAotCU1FU09OX1BJTihHUElPQU9fMTApLAotCU1FU09OX1BJTihHUElPQU9fMTEpLAotCU1FU09OX1BJTihHUElPQU9fMTIpLAotCU1FU09OX1BJTihHUElPQU9fMTMpLAotCU1FU09OX1BJTihHUElPX0JTRF9FTiksCi0JTUVTT05fUElOKEdQSU9fVEVTVF9OKSwKKwlNRVNPTl9QSU4oR1BJT1hfMCwgMCksCisJTUVTT05fUElOKEdQSU9YXzEsIDApLAorCU1FU09OX1BJTihHUElPWF8yLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMywgMCksCisJTUVTT05fUElOKEdQSU9YXzQsIDApLAorCU1FU09OX1BJTihHUElPWF81LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfNiwgMCksCisJTUVTT05fUElOKEdQSU9YXzcsIDApLAorCU1FU09OX1BJTihHUElPWF84LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfOSwgMCksCisJTUVTT05fUElOKEdQSU9YXzEwLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTEsIDApLAorCU1FU09OX1BJTihHUElPWF8xMiwgMCksCisJTUVTT05fUElOKEdQSU9YXzEzLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTQsIDApLAorCU1FU09OX1BJTihHUElPWF8xNSwgMCksCisJTUVTT05fUElOKEdQSU9YX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Gluc1tdID0geyBQSU5fR1BJT1pfOCB9Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfcnhfZHZfcGluc1tdID0geyBQSU5fR1BJT1pfOSB9Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfcnhkMV9waW5zW10gPSB7IFBJTl9HUElPWl8xMCB9Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfcnhkMF9waW5zW10gPSB7IFBJTl9HUElPWl8xMSB9Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfbWRpb19waW5zW10gPSB7IFBJTl9HUElPWl8xMiB9Owotc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfbWRjX3BpbnNbXSA9IHsgUElOX0dQSU9aXzEzIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGV0aF90eF9jbGtfNTBtX3BpbnNbXSA9IHsgUElOKEdQSU9aXzQsIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGV0aF90eF9lbl9waW5zW10gPSB7IFBJTihHUElPWl81LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfdHhkMV9waW5zW10gPSB7IFBJTihHUElPWl82LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfdHhkMF9waW5zW10gPSB7IFBJTihHUElPWl83LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfcnhfY2xrX2luX3BpbnNbXSA9IHsgUElOKEdQSU9aXzgsIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IGV0aF9yeF9kdl9waW5zW10gPSB7IFBJTihHUElPWl85LCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBldGhfcnhkMV9waW5zW10gPSB7IFBJTihHUElPWl8xMCwgMCkgfTsKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgZXRoX3J4Z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9aXzEyKSwKLQlHUElPX0dST1VQKEdQSU9aXzEzKSwKLQlHUElPX0dST1VQKEdQSU9aXzE0KSwKLQlHUElPX0dST1VQKEdQSU9BT18wKSwKLQlHUElPX0dST1VQKEdQSU9BT18xKSwKLQlHUElPX0dST1VQKEdQSU9BT18yKSwKLQlHUElPX0dST1VQKEdQSU9BT18zKSwKLQlHUElPX0dST1VQKEdQSU9BT180KSwKLQlHUElPX0dST1VQKEdQSU9BT181KSwKLQlHUElPX0dST1VQKEdQSU9BT182KSwKLQlHUElPX0dST1VQKEdQSU9BT183KSwKLQlHUElPX0dST1VQKEdQSU9BT184KSwKLQlHUElPX0dST1VQKEdQSU9BT185KSwKLQlHUElPX0dST1VQKEdQSU9BT18xMCksCi0JR1BJT19HUk9VUChHUElPQU9fMTEpLAotCUdQSU9fR1JPVVAoR1BJT0FPXzEyKSwKLQlHUElPX0dST1VQKEdQSU9BT18xMyksCi0JR1BJT19HUk9VUChHUElPX0JTRF9FTiksCi0JR1BJT19HUk9VUChHUElPX1RFU1RfTiksCisJR1BJT19HUk9VUChHUElPWF8wLCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzEsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfMiwgMCksCisJR1BJT19HUk9VUChHUElPWF8zLCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzQsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfNSwgMCksCisJR1BJT19HUk9VUChHUElPWF82LCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzcsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfOCwgMCksCisJR1BJT19HUk9VUChHUElPWF85LCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzEwLCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzExLCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzEyLCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzEzLCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzE0LCAwKSwKKw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BJTihHUElPWF8xMCwgMCksCisJTUVTT05fUElOKEdQSU9YXzExLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTYsIDApLAorCU1FU09OX1BJTihHUElPWF8xNywgMCksCisJTUVTT05fUElOKEdQSU9YXzE4LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1hfMTksIDApLAorCU1FU09OX1BJTihHUElPWF8yMCwgMCksCisJTUVTT05fUElOKEdQSU9YXzIxLCAwKSwKKworCU1FU09OX1BJTihHUElPWV8wLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMSwgMCksCisJTUVTT05fUElOKEdQSU9ZXzMsIDApLAorCU1FU09OX1BJTihHUElPWV82LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfNywgMCksCisJTUVTT05fUElOKEdQSU9ZXzgsIDApLAorCU1FU09OX1BJTihHUElPWV85LCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMTAsIDApLAorCU1FU09OX1BJTihHUElPWV8xMSwgMCksCisJTUVTT05fUElOKEdQSU9ZXzEyLCAwKSwKKwlNRVNPTl9QSU4oR1BJT1lfMTMsIDApLAorCU1FU09OX1BJTihHUElPWV8xNCwgMCksCisKKwlNRVNPTl9QSU4oR1BJT0RWXzksIDApLAorCU1FU09OX1BJTihHUElPRFZfMjQsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjUsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjYsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjcsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjgsIDApLAorCU1FU09OX1BJTihHUElPRFZfMjksIDApLAorCisJTUVTT05fUElOKEdQSU9IXzAsIDApLAorCU1FU09OX1BJTihHUElPSF8xLCAwKSwKKwlNRVNPTl9QSU4oR1BJT0hfMiwgMCksCisJTUVTT05fUElOKEdQSU9IXzMsIDApLAorCU1FU09OX1BJTihHUElPSF80LCAwKSwKKwlNRVNPTl9QSU4oR1BJT0hfNSwgMCksCisJTUVTT05fUElO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zJfUCwgMCksCisJTUVTT05fUElOKERJRl8yX04sIDApLAorCU1FU09OX1BJTihESUZfM19QLCAwKSwKKwlNRVNPTl9QSU4oRElGXzNfTiwgMCksCisJTUVTT05fUElOKERJRl80X1AsIDApLAorCU1FU09OX1BJTihESUZfNF9OLCAwKSwKKworCU1FU09OX1BJTihHUElPQU9fMCwgQU9fT0ZGKSwKKwlNRVNPTl9QSU4oR1BJT0FPXzEsIEFPX09GRiksCisJTUVTT05fUElOKEdQSU9BT18yLCBBT19PRkYpLAorCU1FU09OX1BJTihHUElPQU9fMywgQU9fT0ZGKSwKKwlNRVNPTl9QSU4oR1BJT0FPXzQsIEFPX09GRiksCisJTUVTT05fUElOKEdQSU9BT181LCBBT19PRkYpLAorCU1FU09OX1BJTihHUElPQU9fNiwgQU9fT0ZGKSwKKwlNRVNPTl9QSU4oR1BJT0FPXzcsIEFPX09GRiksCisJTUVTT05fUElOKEdQSU9BT184LCBBT19PRkYpLAorCU1FU09OX1BJTihHUElPQU9fOSwgQU9fT0ZGKSwKKwlNRVNPTl9QSU4oR1BJT0FPXzEwLCBBT19PRkYpLAorCU1FU09OX1BJTihHUElPQU9fMTEsIEFPX09GRiksCisJTUVTT05fUElOKEdQSU9BT18xMiwgQU9fT0ZGKSwKKwlNRVNPTl9QSU4oR1BJT0FPXzEzLCBBT19PRkYpLAorCU1FU09OX1BJTihHUElPX0JTRF9FTiwgQU9fT0ZGKSwKKwlNRVNPTl9QSU4oR1BJT19URVNUX04sIEFPX09GRiksCit9OworCisvKiBiYW5rIFggKi8KK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBpbnQgc2RfZDBfYV9waW5zW10JPSB7IFBJTihHUElPWF8wLCAwKSB9Oworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGludCBzZF9kMV9hX3BpbnNbXQk9IHsgUElOKEdQSU9YXzEsIDApIH07CitzdGF0aWMgY29uc3QgdW5zaWduZWQgaW50IHNkX2QyX2FfcGluc1tdCT0geyBQSU4oR1BJ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0IHVuc2lnbmVkIGludCBldGhfbWRpb19lbl9waW5zW10JPSB7IFBJTihESUZfNF9OLCAwKSB9OworCitzdGF0aWMgc3RydWN0IG1lc29uX3BteF9ncm91cCBtZXNvbjhiX2dyb3Vwc1tdID0geworCUdQSU9fR1JPVVAoR1BJT1hfMCwgMCksCisJR1BJT19HUk9VUChHUElPWF8xLCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzIsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfMywgMCksCisJR1BJT19HUk9VUChHUElPWF80LCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzUsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfNiwgMCksCisJR1BJT19HUk9VUChHUElPWF83LCAwKSwKKwlHUElPX0dST1VQKEdQSU9YXzgsIDApLAorCUdQSU9fR1JPVVAoR1BJT1hfOSwgMCksCisJR1BJT19HUk9VUChHUElPWF8xMCwgMCksCisJR1BJT19HUk9VUChHUElPWF8xMSwgMCksCisJR1BJT19HUk9VUChHUElPWF8xNiwgMCksCisJR1BJT19HUk9VUChHUElPWF8xNywgMCksCisJR1BJT19HUk9VUChHUElPWF8xOCwgMCksCisJR1BJT19HUk9VUChHUElPWF8xOSwgMCksCisJR1BJT19HUk9VUChHUElPWF8yMCwgMCksCisJR1BJT19HUk9VUChHUElPWF8yMSwgMCksCisKKwlHUElPX0dST1VQKEdQSU9ZXzAsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMSwgMCksCisJR1BJT19HUk9VUChHUElPWV8zLCAwKSwKKwlHUElPX0dST1VQKEdQSU9ZXzYsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfNywgMCksCisJR1BJT19HUk9VUChHUElPWV84LCAwKSwKKwlHUElPX0dST1VQKEdQSU9ZXzksIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTAsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTEsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTIsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTMsIDApLAorCUdQSU9fR1JPVVAoR1BJT1lfMTQsIDApLAorCisJR1BJT19HUk9VUChHUElPRFZfOSwgMCksCisJR1BJT19HUk9VUChHUElPRFZfMjQsIDApLAorCUdQSU9fR1JPVVAoR1BJT0RWXzI1LCAwKSwKKwlHUElPX0dST1VQKEdQSU9EVl8yNiwgMCksCisJR1BJT19HUk9VUChHUElPRFZfMjcsIDApLAorCUdQSU9fR1JPVVAoR1BJT0RWXzI4LCAwKSwKKwlHUElPX0dST1VQKEdQSU9EVl8yOSwgMCksCisKKwlHUElPX0dST1VQKEdQSU9IXzAsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfMSwgMCksCisJR1BJT19HUk9VUChHUElPSF8yLCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzMsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfNCwgMCksCisJR1BJT19HUk9VUChHUElPSF81LCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzYsIDApLAorCUdQSU9fR1JPVVAoR1BJT0hfNywgMCksCisJR1BJT19HUk9VUChHUElPSF84LCAwKSwKKwlHUElPX0dST1VQKEdQSU9IXzksIDApLAorCisJR1BJT19HUk9VUChESUZfMF9QLCAwKSwKKwlHUElPX0dST1VQKERJRl8wX04sIDApLAorCUdQSU9fR1JPVVAoRElGXzFfUCwgMCksCisJR1BJT19HUk9VUChESUZfMV9OLCAwKSwKKwlHUElPX0dST1VQKERJRl8yX1AsIDApLAorCUdQSU9fR1JPVVAoRElGXzJfTiwgMCksCisJR1BJT19HUk9VUChESUZfM19QLCAwKSwKKwlHUElPX0dST1VQKERJRl8zX04sIDApLAorCUdQSU9fR1JPVVAoRElGXzRfUCwgMCksCisJR1BJT19HUk9VUChESUZfNF9OLCAwKSwKKworCUdQSU9fR1JPVVAoR1BJT0FPXzAsIEFPX09GRiksCisJR1BJT19HUk9VUChHUElPQU9fMSwgQU9fT0ZGKSwKKwlHUElPX0dST1VQKEdQSU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IGNvbnN0IGNoYXIgKiBjb25zdCBpMmNfbXN0X2FvX2dyb3Vwc1tdID0geworCSJpMmNfbXN0X3Nja19hbyIsICJpMmNfbXN0X3NkYV9hbyIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgY2xrX2dyb3Vwc1tdID0geworCSJjbGtfMjRtX291dCIsICJjbGtfMzJrX2luX291dCIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3Qgc3BkaWZfZ3JvdXBzW10gPSB7CisJInNwZGlmX291dF8xIiwgInNwZGlmX291dF8wIgorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBpMnNfZ3JvdXBzW10gPSB7CisJImkyc19hbV9jbGtfb3V0IiwgImkyc19hb19jbGtfb3V0IiwgImkyc19scl9jbGtfb3V0IiwKKwkiaTJzX291dF8wMSIsICJpMnNfaW5fY2gwMSIsICJpMnNfYW9fY2xrX2luIiwKKwkiaTJzX2xyX2Nsa19pbiIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgcHdtX2JfZ3JvdXBzW10gPSB7CisJInB3bV9iIgorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBwd21fY19ncm91cHNbXSA9IHsKKwkicHdtX2MwIiwgInB3bV9jMSIsICJwd21fYzIiCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHB3bV9kX2dyb3Vwc1tdID0geworCSJwd21fZCIKK307CisKK3N0YXRpYyBjb25zdCBjaGFyICogY29uc3QgcHdtX2VfZ3JvdXBzW10gPSB7CisJInB3bV9lIgorfTsKKworc3RhdGljIGNvbnN0IGNoYXIgKiBjb25zdCBwd21fdnNfZ3JvdXBzW10gPSB7CisJInB3bV92c18wIiwgInB3bV92c18xIiwgInB3bV92c18yIiwKKwkicHdtX3ZzXzMiLCAicHdtX3ZzXzQiCit9OworCitzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IHRzaW5fYV9ncm91cHNbXSA9I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VOQ1RJT04oaTJzKSwKKwlGVU5DVElPTihwd21fYiksCisJRlVOQ1RJT04ocHdtX2MpLAorCUZVTkNUSU9OKHB3bV9kKSwKKwlGVU5DVElPTihwd21fZSksCisJRlVOQ1RJT04ocHdtX3ZzKSwKKwlGVU5DVElPTih0c2luX2EpLAorCUZVTkNUSU9OKHRzaW5fYiksCit9OworCitzdGF0aWMgc3RydWN0IG1lc29uX2JhbmsgbWVzb244Yl9iYW5rc1tdID0geworCS8qICAgbmFtZSAgICBmaXJzdCAgICAgICAgICAgICAgICAgICAgICBsYXN0ICAgICAgICAgICAgICAgICAgIHB1bGxlbiAgcHVsbCAgICBkaXIgICAgIG91dCAgICAgaW4gICovCisJQkFOSygiWCIsICAgIFBJTihHUElPWF8wLCAwKSwJCVBJTihHUElPWF8yMSwgMCksICAgICAgNCwgIDAsICA0LCAgMCwgIDAsICAwLCAgMSwgIDAsICAyLCAgMCksCisJQkFOSygiWSIsICAgIFBJTihHUElPWV8wLCAwKSwJCVBJTihHUElPWV8xNCwgMCksICAgICAgMywgIDAsICAzLCAgMCwgIDMsICAwLCAgNCwgIDAsICA1LCAgMCksCisJQkFOSygiRFYiLCAgIFBJTihHUElPRFZfOSwgMCksCQlQSU4oR1BJT0RWXzI5LCAwKSwgICAgIDAsICAwLCAgMCwgIDAsICA3LCAgMCwgIDgsICAwLCAgOSwgIDApLAorCUJBTksoIkgiLCAgICBQSU4oR1BJT0hfMCwgMCksCQlQSU4oR1BJT0hfOSwgMCksICAgICAgIDEsIDE2LCAgMSwgMTYsICA5LCAxOSwgMTAsIDE5LCAxMSwgMTkpLAorCUJBTksoIkNBUkQiLCBQSU4oQ0FSRF8wLCAwKSwJCVBJTihDQVJEXzYsIDApLCAgICAgICAgMiwgMjAsICAyLCAyMCwgIDAsIDIyLCAgMSwgMjIsICAyLCAyMiksCisJQkFOSygiQk9PVCIsIFBJTihCT09UXzAsIDApLAkJUElOKEJPT1RfMTgsIDApLCAgICAgICAyLCAgMCwgIDIs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lKCZncGlvX2Rldi0+bG9jaywgZmxhZ3MpOworCisJcmV0dXJuIHJldDsKK30KKworI2lmZGVmIENPTkZJR19ERUJVR19GUworc3RhdGljIHZvaWQgYW1kX2dwaW9fZGJnX3Nob3coc3RydWN0IHNlcV9maWxlICpzLCBzdHJ1Y3QgZ3Bpb19jaGlwICpnYykKK3sKKwl1MzIgcGluX3JlZzsKKwl1bnNpZ25lZCBsb25nIGZsYWdzOworCXVuc2lnbmVkIGludCBiYW5rLCBpLCBwaW5fbnVtOworCXN0cnVjdCBhbWRfZ3BpbyAqZ3Bpb19kZXYgPSB0b19hbWRfZ3BpbyhnYyk7CisKKwljaGFyICpsZXZlbF90cmlnOworCWNoYXIgKmFjdGl2ZV9sZXZlbDsKKwljaGFyICppbnRlcnJ1cHRfZW5hYmxlOworCWNoYXIgKmludGVycnVwdF9tYXNrOworCWNoYXIgKndha2VfY250cmwwOworCWNoYXIgKndha2VfY250cmwxOworCWNoYXIgKndha2VfY250cmwyOworCWNoYXIgKnBpbl9zdHM7CisJY2hhciAqcHVsbF91cF9zZWw7CisJY2hhciAqcHVsbF91cF9lbmFibGU7CisJY2hhciAqcHVsbF9kb3duX2VuYWJsZTsKKwljaGFyICpvdXRwdXRfdmFsdWU7CisJY2hhciAqb3V0cHV0X2VuYWJsZTsKKworCWZvciAoYmFuayA9IDA7IGJhbmsgPCBBTURfR1BJT19UT1RBTF9CQU5LUzsgYmFuaysrKSB7CisJCXNlcV9wcmludGYocywgIkdQSU8gYmFuayVkXHQiLCBiYW5rKTsKKworCQlzd2l0Y2ggKGJhbmspIHsKKwkJY2FzZSAwOgorCQkJaSA9IDA7CisJCQlwaW5fbnVtID0gQU1EX0dQSU9fUElOU19CQU5LMDsKKwkJCWJyZWFrOworCQljYXNlIDE6CisJCQlpID0gNjQ7CisJCQlwaW5fbnVtID0gQU1EX0dQSU9fUElOU19CQU5LMSArIGk7CisJCQlicmVhazsKKwkJY2FzZSAyOgorCQkJaSA9IDEyODsKKwkJCX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4oMjYsICJHUElPXzI2IiksCisJUElOQ1RSTF9QSU4oMzksICJHUElPXzM5IiksCisJUElOQ1RSTF9QSU4oNDAsICJHUElPXzQwIiksCisJUElOQ1RSTF9QSU4oNDMsICJHUElPXzQyIiksCisJUElOQ1RSTF9QSU4oNDYsICJHUElPXzQ2IiksCisJUElOQ1RSTF9QSU4oNDcsICJHUElPXzQ3IiksCisJUElOQ1RSTF9QSU4oNDgsICJHUElPXzQ4IiksCisJUElOQ1RSTF9QSU4oNDksICJHUElPXzQ5IiksCisJUElOQ1RSTF9QSU4oNTAsICJHUElPXzUwIiksCisJUElOQ1RSTF9QSU4oNTEsICJHUElPXzUxIiksCisJUElOQ1RSTF9QSU4oNTIsICJHUElPXzUyIiksCisJUElOQ1RSTF9QSU4oNTMsICJHUElPXzUzIiksCisJUElOQ1RSTF9QSU4oNTQsICJHUElPXzU0IiksCisJUElOQ1RSTF9QSU4oNTUsICJHUElPXzU1IiksCisJUElOQ1RSTF9QSU4oNTYsICJHUElPXzU2IiksCisJUElOQ1RSTF9QSU4oNTcsICJHUElPXzU3IiksCisJUElOQ1RSTF9QSU4oNTgsICJHUElPXzU4IiksCisJUElOQ1RSTF9QSU4oNTksICJHUElPXzU5IiksCisJUElOQ1RSTF9QSU4oNjAsICJHUElPXzYwIiksCisJUElOQ1RSTF9QSU4oNjEsICJHUElPXzYxIiksCisJUElOQ1RSTF9QSU4oNjIsICJHUElPXzYyIiksCisJUElOQ1RSTF9QSU4oNjQsICJHUElPXzY0IiksCisJUElOQ1RSTF9QSU4oNjUsICJHUElPXzY1IiksCisJUElOQ1RSTF9QSU4oNjYsICJHUElPXzY2IiksCisJUElOQ1RSTF9QSU4oNjgsICJHUElPXzY4IiksCisJUElOQ1RSTF9QSU4oNjksICJHUElPXzY5IiksCisJUElOQ1RSTF9QSU4oNzAsICJHUElPXzcwIiksCisJUElOQ1RSTF9QSU4oNzEsICJHUElPXzcxIiksCisJUElOQ1RSTF9QSU4oNzIsICJHUElPXzcyIiksCisJUElOQ1RSTF9QSU4oNzQsICJHUElPXzc0IiksCisJUElOQ1RSTF9QSU4oNzUsICJHUElPXzc1IiksCisJUElOQ1RSTF9QSU4oNzYsICJHUElPXzc2IiksCisJUElOQ1RSTF9QSU4oODQsICJHUElPXzg0IiksCisJUElOQ1RSTF9QSU4oODUsICJHUElPXzg1IiksCisJUElOQ1RSTF9QSU4oODYsICJHUElPXzg2IiksCisJUElOQ1RSTF9QSU4oODcsICJHUElPXzg3IiksCisJUElOQ1RSTF9QSU4oODgsICJHUElPXzg4IiksCisJUElOQ1RSTF9QSU4oODksICJHUElPXzg5IiksCisJUElOQ1RSTF9QSU4oOTAsICJHUElPXzkwIiksCisJUElOQ1RSTF9QSU4oOTEsICJHUElPXzkxIiksCisJUElOQ1RSTF9QSU4oOTIsICJHUElPXzkyIiksCisJUElOQ1RSTF9QSU4oOTMsICJHUElPXzkzIiksCisJUElOQ1RSTF9QSU4oOTUsICJHUElPXzk1IiksCisJUElOQ1RSTF9QSU4oOTYsICJHUElPXzk2IiksCisJUElOQ1RSTF9QSU4oOTcsICJHUElPXzk3IiksCisJUElOQ1RSTF9QSU4oOTgsICJHUElPXzk4IiksCisJUElOQ1RSTF9QSU4oOTksICJHUElPXzk5IiksCisJUElOQ1RSTF9QSU4oMTAwLCAiR1BJT18xMDAiKSwKKwlQSU5DVFJMX1BJTigxMDEsICJHUElPXzEwMSIpLAorCVBJTkNUUkxfUElOKDEwMiwgIkdQSU9fMTAyIiksCisJUElOQ1RSTF9QSU4oMTEzLCAiR1BJT18xMTMiKSwKKwlQSU5DVFJMX1BJTigxMTQsICJHUElPXzExNCIpLAorCVBJTkNUUkxfUElOKDExNSwgIkdQSU9fMTE1IiksCisJUElOQ1RSTF9QSU4oMTE2LCAiR1BJT18xMTYiKSwKKwlQSU5DVFJMX1BJTigxMTcsICJHUElPXzExNyIpLAorCVBJTkNUUkxfUElOKDExOCwgIkdQSU9fMTE4IiksCisJUElOQ1RSTF9QSU4oMTE5LC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zIsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgdWFydDJfY3RzX3BnM19waW5zW10gPSB7CisJVEVHUkFfUElOX1VBUlQyX0NUU19QRzMsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgd2lmaV9lbl9waDBfcGluc1tdID0geworCVRFR1JBX1BJTl9XSUZJX0VOX1BIMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCB3aWZpX3JzdF9waDFfcGluc1tdID0geworCVRFR1JBX1BJTl9XSUZJX1JTVF9QSDEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgd2lmaV93YWtlX2FwX3BoMl9waW5zW10gPSB7CisJVEVHUkFfUElOX1dJRklfV0FLRV9BUF9QSDIsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgYXBfd2FrZV9idF9waDNfcGluc1tdID0geworCVRFR1JBX1BJTl9BUF9XQUtFX0JUX1BIMywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBidF9yc3RfcGg0X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fQlRfUlNUX1BINCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBidF93YWtlX2FwX3BoNV9waW5zW10gPSB7CisJVEVHUkFfUElOX0JUX1dBS0VfQVBfUEg1LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBoNl9waW5zW10gPSB7CisJVEVHUkFfUElOX1BINiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBhcF93YWtlX25mY19waDdfcGluc1tdID0geworCVRFR1JBX1BJTl9BUF9XQUtFX05GQ19QSDcsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgbmZjX2VuX3BpMF9waW5zW10gPSB7CisJVEVHUkFfUElOX05GQ19FTl9QSTAsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgbmZjX2ludF9waTFfcGluc1tdID0geworCVRFR1JBX1BJTl9ORkNfSU5UX1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uc3QgdW5zaWduZWQgZGFwNF9mc19wajRfcGluc1tdID0geworCVRFR1JBX1BJTl9EQVA0X0ZTX1BKNCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkYXA0X2Rpbl9wajVfcGluc1tdID0geworCVRFR1JBX1BJTl9EQVA0X0RJTl9QSjUsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZGFwNF9kb3V0X3BqNl9waW5zW10gPSB7CisJVEVHUkFfUElOX0RBUDRfRE9VVF9QSjYsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZGFwNF9zY2xrX3BqN19waW5zW10gPSB7CisJVEVHUkFfUElOX0RBUDRfU0NMS19QSjcsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcGswX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEswLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBrMV9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLMSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwazJfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzIsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcGszX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEszLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBrNF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLNCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwazVfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzUsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgcGs2X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEs2LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHBrN19waW5zW10gPSB7CisJVEVHUkFfUElOX1BLNywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBwbDBfcGluc1tdID0geworCVRFR1JBX1BJTl9QTDAsCit9OworCitzd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EtfMzJLX0lOLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGp0YWdfcnRja19waW5zW10gPSB7CisJVEVHUkFfUElOX0pUQUdfUlRDSywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBiYXR0X2JjbF9waW5zW10gPSB7CisJVEVHUkFfUElOX0JBVFRfQkNMLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGNsa19yZXFfcGluc1tdID0geworCVRFR1JBX1BJTl9DTEtfUkVRLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIHNodXRkb3duX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fU0hVVERPV04sCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGE2X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEE2LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BjYzdfcGluc1tdID0geworCVRFR1JBX1BJTl9QQ0M3LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BlNl9waW5zW10gPSB7CisJVEVHUkFfUElOX1BFNiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wZTdfcGluc1tdID0geworCVRFR1JBX1BJTl9QRTcsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGg2X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEg2LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BrMF9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLMCwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wazFfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzEsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGsyX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEsyLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BrM19waW5zW10gPSB7CisJVEVHUkFfUElOX1BLMywKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wazRfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzQsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGs1X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEs1LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BrNl9waW5zW10gPSB7CisJVEVHUkFfUElOX1BLNiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wazdfcGluc1tdID0geworCVRFR1JBX1BJTl9QSzcsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcGwwX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUEwwLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3BsMV9waW5zW10gPSB7CisJVEVHUkFfUElOX1BMMSwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wejBfcGluc1tdID0geworCVRFR1JBX1BJTl9QWjAsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcHoxX3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUFoxLAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3B6Ml9waW5zW10gPSB7CisJVEVHUkFfUElOX1BaMiwKK307CisKK3N0YXRpYyBjb25zdCB1bnNpZ25lZCBkcml2ZV9wejNfcGluc1tdID0geworCVRFR1JBX1BJTl9QWjMsCit9OworCitzdGF0aWMgY29uc3QgdW5zaWduZWQgZHJpdmVfcHo0X3BpbnNbXSA9IHsKKwlURUdSQV9QSU5fUFo0LAorfTsKKworc3RhdGljIGNvbnN0IHVuc2lnbmVkIGRyaXZlX3B6NV9waW5zW10gPSB7CisJVEVHUkF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gICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jMV9kYXQyX3BtMywgICAgICBTRE1NQzEsICAgICBTUEkzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMDBjLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMxX2RhdDFfcG00LCAgICAgIFNETU1DMSwgICAgIFNQSTMsICAgUlNWRDIsIFJTVkQzLCAweDMwMTAsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzFfZGF0MF9wbTUsICAgICAgU0RNTUMxLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAxNCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jM19jbGtfcHAwLCAgICAgICBTRE1NQzMsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDFjLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMzX2NtZF9wcDEsICAgICAgIFNETU1DMywgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwMjAsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzNfZGF0MF9wcDUsICAgICAgU0RNTUMzLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAyNCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNkbW1jM19kYXQxX3BwNCwgICAgICBTRE1NQzMsICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDI4LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc2RtbWMzX2RhdDJfcHAzLCAgICAgIFNETU1DMywgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwMmMsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzZG1tYzNfZGF0M19wcDIsICAgICAgU0RNTUMzLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzAzMCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBleF9sMF9yc3Rfbl9wYTAsICAgICBQRTAsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDM4LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTVjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGV4X2wwX2Nsa3JlcV9uX3BhMSwgIFBFMCwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwM2MsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhNTgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwZXhfd2FrZV9uX3BhMiwgICAgICAgUEUsICAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA0MCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweGE2OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBleF9sMV9yc3Rfbl9wYTMsICAgICBQRTEsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDQ0LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTY0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGV4X2wxX2Nsa3JlcV9uX3BhNCwgIFBFMSwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNDgsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhNjAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzYXRhX2xlZF9hY3RpdmVfcGE1LCAgU0FUQSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA0YywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGE5NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNwaTFfbW9zaV9wYzAsICAgICAgICBTUEkxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDUwLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWUwLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkxX21pc29fcGMxLCAgICAgICAgU1BJMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA1NCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFkYywgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMV9zY2tfcGMyLCAgICAgICAgIFNQSTEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwNTgsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZTQsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTFfY3MwX3BjMywgICAgICAgICBTUEkxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDVjLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWQ0LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkxX2NzMV9wYzQsICAgICAgICAgU1BJMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA2MCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFkOCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMl9tb3NpX3BiNCwgICAgICAgIFNQSTIsICAgICAgIERUViwgICAgUlNWRDIsIFJTVkQzLCAweDMwNjQsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZjQsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTJfbWlzb19wYjUsICAgICAgICBTUEkyLCAgICAgICBEVFYsICAgIFJTVkQyLCBSU1ZEMywgMHgzMDY4LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWYwLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGkyX3Nja19wYjYsICAgICAgICAgU1BJMiwgICAgICAgRFRWLCAgICBSU1ZEMiwgUlNWRDMsIDB4MzA2YywgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFmOCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpMl9jczBfcGI3LCAgICAgICAgIFNQSTIsICAgICAgIERUViwgICAgUlNWRDIsIFJTVkQzLCAweDMwNzAsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhZTgsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTJfY3MxX3BkZDAsICAgICAgICBTUEkyLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDc0LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YWVjLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGk0X21vc2lfcGM3LCAgICAgICAgU1BJNCwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA3OCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGIwNCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoc3BpNF9taXNvX3BkMCwgICAgICAgIFNQSTQsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwN2MsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhiMDAsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHNwaTRfc2NrX3BjNSwgICAgICAgICBTUEk0LCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDgwLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4YjA4LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChzcGk0X2NzMF9wYzYsICAgICAgICAgU1BJNCwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA4NCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweGFmYywgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAocXNwaV9zY2tfcGVlMCwgICAgICAgIFFTUEksICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwODgsIFksICAgWSwgICAgICAgTiwgICAgICAgMHhhOTAsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKHFzcGlfY3Nfbl9wZWUxLCAgICAgICBRU1BJLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDhjLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocXNwaV9pbzBfcGVlMiwgICAgICAgIFFTUEksICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwOTAsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChxc3BpX2lvMV9wZWUzLCAgICAgICAgUVNQSSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzA5NCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHFzcGlfaW8yX3BlZTQsICAgICAgICBRU1BJLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMDk4LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocXNwaV9pbzNfcGVlNSwgICAgICAgIFFTUEksICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwOWMsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkbWljMV9jbGtfcGUwLCAgICAgICAgRE1JQzEsICAgICAgSTJTMywgICBSU1ZEMiwgUlNWRDMsIDB4MzBhNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk4NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRtaWMxX2RhdF9wZTEsICAgICAgICBETUlDMSwgICAgICBJMlMzLCAgIFJTVkQyLCBSU1ZEMywgMHgzMGE4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTg4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZG1pYzJfY2xrX3BlMiwgICAgICAgIERNSUMyLCAgICAgIEkyUzMsICAgUlNWRDIsIFJTVkQzLCAweDMwYWMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5OGMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkbWljMl9kYXRfcGUzLCAgICAgICAgRE1JQzIsICAgICAgSTJTMywgICBSU1ZEMiwgUlNWRDMsIDB4MzBiMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk5MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRtaWMzX2Nsa19wZTQsICAgICAgICBETUlDMywgICAgICBJMlM1QSwgIFJTVkQyLCBSU1ZEMywgMHgzMGI0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTk0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZG1pYzNfZGF0X3BlNSwgICAgICAgIERNSUMzLCAgICAgIEkyUzVBLCAgUlNWRDIsIFJTVkQzLCAweDMwYjgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5OTgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChnZW4xX2kyY19zY2xfcGoxLCAgICAgSTJDMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBiYywgTiwgICBOLCAgICAgICBZLCAgICAgICAweDlhOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdlbjFfaTJjX3NkYV9wajAsICAgICBJMkMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGMwLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OWFjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ2VuMl9pMmNfc2NsX3BqMiwgICAgIEkyQzIsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwYzQsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg5YjAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChnZW4yX2kyY19zZGFfcGozLCAgICAgSTJDMiwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBjOCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweDliNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdlbjNfaTJjX3NjbF9wZjAsICAgICBJMkMzLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGNjLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OWI4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ2VuM19pMmNfc2RhX3BmMSwgICAgIEkyQzMsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwZDAsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHg5YmMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW1faTJjX3NjbF9wczIsICAgICAgSTJDMywgICAgICAgSTJDVkksICBSU1ZEMiwgUlNWRDMsIDB4MzBkNCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweDkzNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbV9pMmNfc2RhX3BzMywgICAgICBJMkMzLCAgICAgICBJMkNWSSwgIFJTVkQyLCBSU1ZEMywgMHgzMGQ4LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4OTM4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocHdyX2kyY19zY2xfcHkzLCAgICAgIEkyQ1BNVSwgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwZGMsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhhNmMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwd3JfaTJjX3NkYV9weTQsICAgICAgSTJDUE1VLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBlMCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweGE3MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQxX3R4X3B1MCwgICAgICAgICBVQVJUQSwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGU0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjI4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDFfcnhfcHUxLCAgICAgICAgIFVBUlRBLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMwZTgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMjQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0MV9ydHNfcHUyLCAgICAgICAgVUFSVEEsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzBlYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIyMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQxX2N0c19wdTMsICAgICAgICBVQVJUQSwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMGYwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjFjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDJfdHhfcGcwLCAgICAgICAgIFVBUlRCLCAgICAgIEkyUzRBLCAgU1BESUYsIFVBUlQsICAweDMwZjQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMzgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0Ml9yeF9wZzEsICAgICAgICAgVUFSVEIsICAgICAgSTJTNEEsICBTUERJRiwgVUFSVCwgIDB4MzBmOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIzNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQyX3J0c19wZzIsICAgICAgICBVQVJUQiwgICAgICBJMlM0QSwgIFJTVkQyLCBVQVJULCAgMHgzMGZjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjMwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDJfY3RzX3BnMywgICAgICAgIFVBUlRCLCAgICAgIEkyUzRBLCAgUlNWRDIsIFVBUlQsICAweDMxMDAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMmMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0M190eF9wZDEsICAgICAgICAgVUFSVEMsICAgICAgU1BJNCwgICBSU1ZEMiwgUlNWRDMsIDB4MzEwNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI0OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQzX3J4X3BkMiwgICAgICAgICBVQVJUQywgICAgICBTUEk0LCAgIFJTVkQyLCBSU1ZEMywgMHgzMTA4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjQ0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDNfcnRzX3BkMywgICAgICAgIFVBUlRDLCAgICAgIFNQSTQsICAgUlNWRDIsIFJTVkQzLCAweDMxMGMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNDAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0M19jdHNfcGQ0LCAgICAgICAgVUFSVEMsICAgICAgU1BJNCwgICBSU1ZEMiwgUlNWRDMsIDB4MzExMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGIzYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQ0X3R4X3BpNCwgICAgICAgICBVQVJURCwgICAgICBVQVJULCAgIFJTVkQyLCBSU1ZEMywgMHgzMTE0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjU4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodWFydDRfcnhfcGk1LCAgICAgICAgIFVBUlRELCAgICAgIFVBUlQsICAgUlNWRDIsIFJTVkQzLCAweDMxMTgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNTQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh1YXJ0NF9ydHNfcGk2LCAgICAgICAgVUFSVEQsICAgICAgVUFSVCwgICBSU1ZEMiwgUlNWRDMsIDB4MzExYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI1MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVhcnQ0X2N0c19waTcsICAgICAgICBVQVJURCwgICAgICBVQVJULCAgIFJTVkQyLCBSU1ZEMywgMHgzMTIwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjRjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZGFwMV9mc19wYjAsICAgICAgICAgIEkyUzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxMjQsIFksICAgWSwgICAgICAgTiwgICAgICAgMHg5NWMsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKGRhcDFfZGluX3BiMSwgICAgICAgICBJMlMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTI4LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4OTU0LCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChkYXAxX2RvdXRfcGIyLCAgICAgICAgSTJTMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzEyYywgWSwgICBZLCAgICAgICBOLCAgICAgICAweDk1OCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoZGFwMV9zY2xrX3BiMywgICAgICAgIEkyUzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxMzAsIFksICAgWSwgICAgICAgTiwgICAgICAgMHg5NjAsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKGRhcDJfZnNfcGFhMCwgICAgICAgICBJMlMyLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTM0LCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4OTZjLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChkYXAyX2Rpbl9wYWEyLCAgICAgICAgSTJTMiwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzEzOCwgWSwgICBZLCAgICAgICBOLCAgICAgICAweDk2NCwgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgMjgsICAgICAyLCAgICAgIDMwLCAgICAgMiksCisJUElOR1JPVVAoZGFwMl9kb3V0X3BhYTMsICAgICAgIEkyUzIsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxM2MsIFksICAgWSwgICAgICAgTiwgICAgICAgMHg5NjgsIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIDI4LCAgICAgMiwgICAgICAzMCwgICAgIDIpLAorCVBJTkdST1VQKGRhcDJfc2Nsa19wYWExLCAgICAgICBJMlMyLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTQwLCBZLCAgIFksICAgICAgIE4sICAgICAgIDB4OTcwLCAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAyOCwgICAgIDIsICAgICAgMzAsICAgICAyKSwKKwlQSU5HUk9VUChkYXA0X2ZzX3BqNCwgICAgICAgICAgSTJTNEIsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE0NCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk3YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGRhcDRfZGluX3BqNSwgICAgICAgICBJMlM0QiwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTQ4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTc0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZGFwNF9kb3V0X3BqNiwgICAgICAgIEkyUzRCLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNGMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5NzgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkYXA0X3NjbGtfcGo3LCAgICAgICAgSTJTNEIsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE1MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk4MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbTFfbWNsa19wczAsICAgICAgICBFWFRQRVJJUEgzLCBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTU0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTE4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtMl9tY2xrX3BzMSwgICAgICAgIEVYVFBFUklQSDMsIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNTgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MjQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChqdGFnX3J0Y2ssICAgICAgICAgICAgSlRBRywgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE1YywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGEyYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNsa18zMmtfaW4sICAgICAgICAgICBDTEssICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTYwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTQwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2xrXzMya19vdXRfcHk1LCAgICAgIFNPQywgICAgICAgIEJMSU5LLCAgUlNWRDIsIFJTVkQzLCAweDMxNjQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5NDQsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChiYXR0X2JjbCwgICAgICAgICAgICAgQkNMLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE2OCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweDhmOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNsa19yZXEsICAgICAgICAgICAgICBTWVMsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTZjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTQ4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY3B1X3B3cl9yZXEsICAgICAgICAgIENQVSwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxNzAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5NTAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwd3JfaW50X24sICAgICAgICAgICAgUE1JLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE3NCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGE3NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHNodXRkb3duLCAgICAgICAgICAgICBTSFVURE9XTiwgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTc4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YWM4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY29yZV9wd3JfcmVxLCAgICAgICAgIENPUkUsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxN2MsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5NGMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChhdWRfbWNsa19wYmIwLCAgICAgICAgQVVELCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE4MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDhmNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGR2ZnNfcHdtX3BiYjEsICAgICAgICBSU1ZEMCwgICAgICBDTERWRlMsIFNQSTMsICBSU1ZEMywgMHgzMTg0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OWE0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZHZmc19jbGtfcGJiMiwgICAgICAgIFJTVkQwLCAgICAgIENMRFZGUywgU1BJMywgIFJTVkQzLCAweDMxODgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5YTAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChncGlvX3gxX2F1ZF9wYmIzLCAgICAgUlNWRDAsICAgICAgUlNWRDEsICBTUEkzLCAgUlNWRDMsIDB4MzE4YywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGExNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdwaW9feDNfYXVkX3BiYjQsICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFNQSTMsICBSU1ZEMywgMHgzMTkwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTE4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGNjNywgICAgICAgICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxOTQsIE4sICAgTiwgICAgICAgWSwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChoZG1pX2NlY19wY2MwLCAgICAgICAgQ0VDLCAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzE5OCwgTiwgICBOLCAgICAgICBZLCAgICAgICAweGEyNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGhkbWlfaW50X2RwX2hwZF9wY2MxLCBEUCwgICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMTljLCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YTI4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoc3BkaWZfb3V0X3BjYzIsICAgICAgIFNQRElGLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYTAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhZDAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChzcGRpZl9pbl9wY2MzLCAgICAgICAgU1BESUYsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFhNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGFjYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHVzYl92YnVzX2VuMF9wY2M0LCAgICBVU0IsICAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWE4LCBOLCAgIE4sICAgICAgIFksICAgICAgIDB4YjVjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodXNiX3ZidXNfZW4xX3BjYzUsICAgIFVTQiwgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYWMsIE4sICAgTiwgICAgICAgWSwgICAgICAgMHhiNjAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChkcF9ocGQwX3BjYzYsICAgICAgICAgRFAsICAgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFiMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDk5YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHdpZmlfZW5fcGgwLCAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWI0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjY0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAod2lmaV9yc3RfcGgxLCAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxYjgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiNjgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUCh3aWZpX3dha2VfYXBfcGgyLCAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFiYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGI2YywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGFwX3dha2VfYnRfcGgzLCAgICAgICBSU1ZEMCwgICAgICBVQVJUQiwgIFNQRElGLCBSU1ZEMywgMHgzMWMwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OGVjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYnRfcnN0X3BoNCwgICAgICAgICAgIFJTVkQwLCAgICAgIFVBUlRCLCAgU1BESUYsIFJTVkQzLCAweDMxYzQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg4ZmMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChidF93YWtlX2FwX3BoNSwgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFjOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkwMCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGFwX3dha2VfbmZjX3BoNywgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWNjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OGYwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobmZjX2VuX3BpMCwgICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZDAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhNTAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChuZmNfaW50X3BpMSwgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFkNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGE1NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGdwc19lbl9waTIsICAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWQ4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTFjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoZ3BzX3JzdF9waTMsICAgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZGMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhMjAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW1fcnN0X3BzNCwgICAgICAgICAgVkdQMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFlMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkzYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbV9hZl9lbl9wczUsICAgICAgICBWSU1DTEssICAgICBWR1AyLCAgIFJTVkQyLCBSU1ZEMywgMHgzMWU0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTJjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtX2ZsYXNoX2VuX3BzNiwgICAgIFZJTUNMSywgICAgIFZHUDMsICAgUlNWRDIsIFJTVkQzLCAweDMxZTgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MzAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChjYW0xX3B3ZG5fcHM3LCAgICAgICAgVkdQNCwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFlYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkxYywgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGNhbTJfcHdkbl9wdDAsICAgICAgICBWR1A1LCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMWYwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTI4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoY2FtMV9zdHJvYmVfcHQxLCAgICAgIFZHUDYsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMxZjQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MjAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChsY2RfdGVfcHkyLCAgICAgICAgICAgRElTUExBWUEsICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzFmOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGE0NCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGxjZF9ibF9wd21fcHYwLCAgICAgICBESVNQTEFZQSwgICBQV00wLCAgIFNPUjAsICBSU1ZEMywgMHgzMWZjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTM0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobGNkX2JsX2VuX3B2MSwgICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMDAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhMzAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChsY2RfcnN0X3B2MiwgICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIwNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweGE0MCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGxjZF9ncGlvMV9wdjMsICAgICAgICBESVNQTEFZQiwgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjA4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YTM4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobGNkX2dwaW8yX3B2NCwgICAgICAgIERJU1BMQVlCLCAgIFBXTTEsICAgUlNWRDIsIFNPUjEsICAweDMyMGMsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhM2MsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChhcF9yZWFkeV9wdjUsICAgICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIxMCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDhlOCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHRvdWNoX3JzdF9wdjYsICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjE0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjE4LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAodG91Y2hfY2xrX3B2NywgICAgICAgIFRPVUNILCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMTgsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhiMTAsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChtb2RlbV93YWtlX2FwX3B4MCwgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIxYywgTiwgICBOLCAgICAgICBOLCAgICAgICAweGE0OCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHRvdWNoX2ludF9weDEsICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjIwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjE0LCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAobW90aW9uX2ludF9weDIsICAgICAgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMjQsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHhhNGMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChhbHNfcHJveF9pbnRfcHgzLCAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIyOCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDhlNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHRlbXBfYWxlcnRfcHg0LCAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjJjLCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4YjBjLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYnV0dG9uX3Bvd2VyX29uX3B4NSwgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyMzAsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MDgsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChidXR0b25fdm9sX3VwX3B4NiwgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzIzNCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkxNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKGJ1dHRvbl92b2xfZG93bl9weDcsICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjM4LCBOLCAgIE4sICAgICAgIE4sICAgICAgIDB4OTEwLCAxMiwgICAgICA1LCAgICAgICAyMCwgICAgICA1LCAgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAoYnV0dG9uX3NsaWRlX3N3X3B5MCwgIFJTVkQwLCAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyM2MsIE4sICAgTiwgICAgICAgTiwgICAgICAgMHg5MGMsIDEyLCAgICAgIDUsICAgICAgIDIwLCAgICAgIDUsICAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChidXR0b25faG9tZV9weTEsICAgICAgUlNWRDAsICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI0MCwgTiwgICBOLCAgICAgICBOLCAgICAgICAweDkwNCwgMTIsICAgICAgNSwgICAgICAgMjAsICAgICAgNSwgICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBhNiwgICAgICAgICAgICAgICAgICBTQVRBLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjQ0LCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGU2LCAgICAgICAgICAgICAgICAgIFJTVkQwLCAgICAgIEkyUzVBLCAgUFdNMiwgIFJTVkQzLCAweDMyNDgsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwZTcsICAgICAgICAgICAgICAgICAgUlNWRDAsICAgICAgSTJTNUEsICBQV00zLCAgUlNWRDMsIDB4MzI0YywgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBoNiwgICAgICAgICAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjUwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGswLCAgICAgICAgICAgICAgICAgIElRQzAsICAgICAgIEkyUzVCLCAgUlNWRDIsIFJTVkQzLCAweDMyNTQsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwazEsICAgICAgICAgICAgICAgICAgSVFDMCwgICAgICAgSTJTNUIsICBSU1ZEMiwgUlNWRDMsIDB4MzI1OCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBrMiwgICAgICAgICAgICAgICAgICBJUUMwLCAgICAgICBJMlM1QiwgIFJTVkQyLCBSU1ZEMywgMHgzMjVjLCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGszLCAgICAgICAgICAgICAgICAgIElRQzAsICAgICAgIEkyUzVCLCAgUlNWRDIsIFJTVkQzLCAweDMyNjAsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwazQsICAgICAgICAgICAgICAgICAgSVFDMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI2NCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBrNSwgICAgICAgICAgICAgICAgICBJUUMxLCAgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjY4LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGs2LCAgICAgICAgICAgICAgICAgIElRQzEsICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNmMsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwazcsICAgICAgICAgICAgICAgICAgSVFDMSwgICAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI3MCwgWSwgICBZLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHBsMCwgICAgICAgICAgICAgICAgICBSU1ZEMCwgICAgICBSU1ZEMSwgIFJTVkQyLCBSU1ZEMywgMHgzMjc0LCBZLCAgIFksICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocGwxLCAgICAgICAgICAgICAgICAgIFNPQywgICAgICAgIFJTVkQxLCAgUlNWRDIsIFJTVkQzLCAweDMyNzgsIFksICAgWSwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwejAsICAgICAgICAgICAgICAgICAgVklNQ0xLMiwgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI3YywgTiwgICBOLCAgICAgICBOLCAgICAgICAtMSwgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAgLTEsICAgICAtMSwgICAgIC0xLCAgICAgLTEpLAorCVBJTkdST1VQKHB6MSwgICAgICAgICAgICAgICAgICBWSU1DTEsyLCAgICBTRE1NQzEsIFJTVkQyLCBSU1ZEMywgMHgzMjgwLCBOLCAgIE4sICAgICAgIE4sICAgICAgIC0xLCAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgICAtMSwgICAgIC0xLCAgICAgLTEsICAgICAtMSksCisJUElOR1JPVVAocHoyLCAgICAgICAgICAgICAgICAgIFNETU1DMywgICAgIENDTEEsICAgUlNWRDIsIFJTVkQzLCAweDMyODQsIE4sICAgTiwgICAgICAgTiwgICAgICAgLTEsICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgIC0xLCAgICAgLTEsICAgICAtMSwgICAgIC0xKSwKKwlQSU5HUk9VUChwejMsICAgICAgICAgICAgICAgICAgU0RNTUMzLCAgICAgUlNWRDEsICBSU1ZEMiwgUlNWRDMsIDB4MzI4OCwgTiwgICBOLCAgICAg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W5vc19laW50X2dwaW9faW5pdCwKKwkJLnN1c3BlbmQJPSBleHlub3NfcGluY3RybF9zdXNwZW5kLAorCQkucmVzdW1lCQk9IGV4eW5vc19waW5jdHJsX3Jlc3VtZSwKKwl9LCB7CisJCS8qIHBpbi1jb250cm9sbGVyIGluc3RhbmNlIDMgZGF0YSAqLworCQkucGluX2JhbmtzCT0gZXh5bm9zNTQzM19waW5fYmFua3MzLAorCQkubnJfYmFua3MJPSBBUlJBWV9TSVpFKGV4eW5vczU0MzNfcGluX2JhbmtzMyksCisJCS5laW50X2dwaW9faW5pdCA9IGV4eW5vc19laW50X2dwaW9faW5pdCwKKwkJLnN1c3BlbmQJPSBleHlub3NfcGluY3RybF9zdXNwZW5kLAorCQkucmVzdW1lCQk9IGV4eW5vc19waW5jdHJsX3Jlc3VtZSwKKwl9LCB7CisJCS8qIHBpbi1jb250cm9sbGVyIGluc3RhbmNlIDQgZGF0YSAqLworCQkucGluX2JhbmtzCT0gZXh5bm9zNTQzM19waW5fYmFua3M0LAorCQkubnJfYmFua3MJPSBBUlJBWV9TSVpFKGV4eW5vczU0MzNfcGluX2JhbmtzNCksCisJCS5laW50X2dwaW9faW5pdCA9IGV4eW5vc19laW50X2dwaW9faW5pdCwKKwkJLnN1c3BlbmQJPSBleHlub3NfcGluY3RybF9zdXNwZW5kLAorCQkucmVzdW1lCQk9IGV4eW5vc19waW5jdHJsX3Jlc3VtZSwKKwl9LCB7CisJCS8qIHBpbi1jb250cm9sbGVyIGluc3RhbmNlIDUgZGF0YSAqLworCQkucGluX2JhbmtzCT0gZXh5bm9zNTQzM19waW5fYmFua3M1LAorCQkubnJfYmFua3MJPSBBUlJBWV9TSVpFKGV4eW5vczU0MzNfcGluX2JhbmtzNSksCisJCS5laW50X2dwaW9faW5pdCA9IGV4eW5vc19laW50X2dwaW9faW5pdCwKKwkJLnN1c3BlbmQJPSBleHlub3NfcGluY3RybF9zdXNwZW5kLAorCQkucmVzdW1lCQk9IGV4eW5vc19waW5jdHJsX3Jlc3VtZSwKKwl9LCB7CisJCS8qIHBpbi1jb250cm9sbGVyIGluc3RhbmNlIDYgZGF0YSAqLworCQkucGluX2JhbmtzCT0gZXh5bm9zNTQzM19waW5fYmFua3M2LAorCQkubnJfYmFua3MJPSBBUlJBWV9TSVpFKGV4eW5vczU0MzNfcGluX2JhbmtzNiksCisJCS5laW50X2dwaW9faW5pdCA9IGV4eW5vc19laW50X2dwaW9faW5pdCwKKwkJLnN1c3BlbmQJPSBleHlub3NfcGluY3RybF9zdXNwZW5kLAorCQkucmVzdW1lCQk9IGV4eW5vc19waW5jdHJsX3Jlc3VtZSwKKwl9LCB7CisJCS8qIHBpbi1jb250cm9sbGVyIGluc3RhbmNlIDcgZGF0YSAqLworCQkucGluX2JhbmtzCT0gZXh5bm9zNTQzM19waW5fYmFua3M3LAorCQkubnJfYmFua3MJPSBBUlJBWV9TSVpFKGV4eW5vczU0MzNfcGluX2JhbmtzNyksCisJCS5laW50X2dwaW9faW5pdCA9IGV4eW5vc19laW50X2dwaW9faW5pdCwKKwkJLnN1c3BlbmQJPSBleHlub3NfcGluY3RybF9zdXNwZW5kLAorCQkucmVzdW1lCQk9IGV4eW5vc19waW5jdHJsX3Jlc3VtZSwKKwl9LCB7CisJCS8qIHBpbi1jb250cm9sbGVyIGluc3RhbmNlIDggZGF0YSAqLworCQkucGluX2JhbmtzCT0gZXh5bm9zNTQzM19waW5fYmFua3M4LAorCQkubnJfYmFua3MJPSBBUlJBWV9TSVpFKGV4eW5vczU0MzNfcGluX2JhbmtzOCksCisJCS5laW50X2dwaW9faW5pdCA9IGV4eW5vc19laW50X2dwaW9faW5pdCwKKwkJLnN1c3BlbmQJPSBleHlub3NfcGluY3RybF9zdXNwZW5kLAorCQkucmVzdW1lCQk9IGV4eW5vc19waW5jdHJsX3Jlc3VtZSwKKwl9LCB7CisJCS8qIHBpbi1jb250cm9sbGVyIGluc3RhbmNlIDkgZGF0YSAqLworCQkucGluX2JhbmtzCT0gZXh5bm9zN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ggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC00MDYsOCArNDA2LDEzIEBACiAJc3RydWN0IFNjc2lfSG9zdCAgKnNob3N0ID0gY2xhc3NfdG9fc2hvc3QoZGV2KTsKIAlzdHJ1Y3QgbHBmY192cG9ydCAqdnBvcnQgPSAoc3RydWN0IGxwZmNfdnBvcnQgKikgc2hvc3QtPmhvc3RkYXRhOwogCXN0cnVjdCBscGZjX2hiYSAgICpwaGJhID0gdnBvcnQtPnBoYmE7CisJY2hhciBmd3JldltGV19SRVZfU1RSX1NJWkVdOwogCi0JcmV0dXJuIHNucHJpbnRmKGJ1ZiwgUEFHRV9TSVpFLCAiJXNcbiIsIHBoYmEtPk9wdGlvblJPTVZlcnNpb24pOworCWlmIChwaGJhLT5zbGlfcmV2IDwgTFBGQ19TTElfUkVWNCkKKwkJcmV0dXJuIHNucHJpbnRmKGJ1ZiwgUEFHRV9TSVpFLCAiJXNcbiIsIHBoYmEtPk9wdGlvblJPTVZlcnNpb24pOworCisJbHBmY19kZWN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HlyaWdodCAoQykgMjAwOS0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0zMTk0LDYgKzMxOTQsNyBAQAogCQljbWQtPnVuc2xpMy5yY3ZzbGkzLm94X2lkID0gMHhmZmZmOwogCX0KIAljbWRpb2NicS0+aW9jYl9mbGFnIHw9IExQRkNfSU9fTElCREZDOworCWNtZGlvY2JxLT5pb2NiX2ZsYWcgfD0gTFBGQ19JT19MT09QQkFDSzsKIAljbWRpb2NicS0+dnBvcnQgPSBwaGJhLT5wcG9ydDsKIAljbWRpb2NicS0+aW9jYl9jbXBsID0gTlVMTDsKIAlpb2NiX3N0YXQgPSBscGZjX3NsaV9pc3N1ZV9pb2NiX3dhaXQocGhiYSwgTFBGQ19FTFNfUklORywgY21kaW9jYnEsCkBAIC00MTc5LDYgKzQxODAsNyBAQAogCQkJc3dpdGNoIChvcGNvZGUpIHsKIAkJCWNhc2UgQ09NTl9PUENPREVfR0VUX0NOVExfQURETF9BVFRSSUJVVEVTOgogCQkJY2FzZSBDT01OX09QQ09ERV9HRVRfQ05UTF9BVFRSSUJVVEVTOgorCQkJY2FzZSBDT01OX09QQ09ERV9HRVRfUFJPRklMRV9DT05GSUc6CiAJCQkJbHBmY19wcmludGZfbG9nKHBoYmEsIEtFUk5fSU5GTywgTE9HX0xJQkRGQywKIAkJCQkJCSIzMTA2IEhhbmRsZWQgU0xJX0NPTkZJRyAiCiAJCQkJCQkic3Vic3lzX2NvbW4sIG9wY29kZTp4JXhcbiIsCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2JzZy5oIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ic2cuaAppbmRleCA5MjhlZjYwLi5lNTU3YmNkIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2JzZy5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfYnNnLmgKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMTAtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMTAtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC0yNDYsNiArMjQ2LDcgQEAKICNkZWZpbmUgbHBmY19lbWIxX3N1YmNtbmRfc3Vic3lzX1dPUkQJd29yZDYKIC8qIFN1YnN5c3RlbSBDT01OICgweDAxKSBPcENvZGVzICovCiAjZGVmaW5lIF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Z1bmN0aW9uX3RlbXBsYXRlIGxwZmNfdHJhbnNwb3J0X2Z1bmN0aW9uczsKIGV4dGVybiBzdHJ1Y3QgZmNfZnVuY3Rpb25fdGVtcGxhdGUgbHBmY192cG9ydF90cmFuc3BvcnRfZnVuY3Rpb25zOwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19jdC5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19jdC5jCmluZGV4IDYxYTMyY2QuLmFmMTI5OTYgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfY3QuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2N0LmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxMyBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEA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mcy5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19kZWJ1Z2ZzLmMKaW5kZXggNTYzM2U3ZGEuLjUxM2VkY2IgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZGVidWdmcy5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZGVidWdmcy5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA3LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNy0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2Vscy5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19lbHMuYwppbmRleCBjNjYwODhkLi44NTFlOGVmIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2Vscy5jCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfZWxzLmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogUG9ydGlvbnMgQ29weXJpZ2h0IChDKSAyMDA0LTIwMDUgQ2hyaXN0b3BoIEhlbGx3aWcgICAgICAgICAgICAgICoKQEAgLTIyNDMsOCArMjI0Myw3IEBACiAJKi8KIAlpZiAodnBvcnQtPnBvcnRfc3RhdGUgPCBMUEZDX1ZQT1JUX1JFQURZKSB7CiAJCS8qIElmIHdlIGdldCBoZXJlLCB0aGVyZSBpcyBub3RoaW5nIHRvIEFESVNDICovCi0JCWlmICh2cG9ydC0+cG9ydF90eXBlID09IExQRkNfUEhZU0lDQUxfUE9SVCkKLQkJCWxwZmNfaXNzdWVfY2xlYXJfbGEocGhiYSwgdnBvcnQpOworCQlscGZjX2lzc3VlX2NsZWFyX2xhKHBoYmEsIHZwb3J0K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MSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogUG9ydGlvbnMgQ29weXJpZ2h0IChDKSAyMDA0LTIwMDUgQ2hyaXN0b3BoIEhlbGx3aWcgICAgICAgICAgICAgICoKQEAgLTM0MzksNiArMzQzOSwxMSBAQAogCXBtYi0+Y29udGV4dDEgPSBOVUxMOwogCXBtYi0+Y29udGV4dDIgPSBOVUxMOwogCisJbHBmY19wcmludGZfdmxvZyh2cG9ydCwgS0VSTl9JTkZPLCBMT0dfU0xJLAorCQkJICIwMDAyIHJwaToleCBESUQ6JXggZmxnOiV4ICVkIG1hcDoleCAlcFxuIiwKKwkJCSBuZGxwLT5ubHBfcnBpLCBuZGxwLT5ubHBfRElELCBuZGxwLT5ubHBfZmxhZywKKwkJCSBhdG9taWNfcmVhZCgmbmRscC0+a3JlZi5yZWZjb3VudCksCisJCQkgbmRscC0+bmxwX3VzZ19tYXAsIG5kbHApOwogCWl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VzZ19tYXAsCi0JCQlhdG9taWNfcmVhZCgmbmRscC0+a3JlZi5yZWZjb3VudCkpOworCQkJYXRvbWljX3JlYWQoJm5kbHAtPmtyZWYucmVmY291bnQpLCBuZGxwLT5ubHBfcnBpKTsKIAogCS8qIHJlbW92ZSBuZGxwIGZyb20gYWN0aW9uLiAqLwogCWxwZmNfbmxwX3JlbW92ZShuZGxwLT52cG9ydCwgbmRscCk7CmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2h3LmggYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2h3LmgKaW5kZXggMjM2MjU5Mi4uMzdiZWI5ZCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ody5oCisrKyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaHcuaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKi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zaS9scGZjL2xwZmNfaHc0LmggYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2h3NC5oCmluZGV4IGY0MzJlYzEuLjE4MTNjNDUgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaHc0LmgKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19odzQuaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwOS0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwOS0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTMwODUsNiArMzA4NSw5IEBACiAjZGVmaW5lIExQRkNfQVNZTkNfTElOS19TUEVFRF8xMDBNQlBTCQkweDIKICNkZWZpbmUgTFBGQ19BU1lOQ19MSU5LX1NQRUVEXzFHQlBTCQkweDMKICNkZWZpbmUgTFBGQ19BU1lOQ19MSU5LX1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1PVEVfRFBPUlQJMHhBCiB9OwogCiAvKgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19pbml0LmMgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2luaXQuYwppbmRleCAwYjJjNTNhLi5lOGM4YzFlIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2luaXQuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2luaXQuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMTMzMCwxMyArMTMzMCwxNCBAQAogdm9pZAogbHBmY19zbGk0X29mZmxpbmVfZXJhdHQoc3RydWN0IGxwZmNfaGJhICpwaGJhKQogewor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bmRleCAwNjI0MWY1Li44MTZmNTk2IDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX21ib3guYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX21ib3guYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDEzIEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ucG9ydGRpc2MuYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfbnBvcnRkaXNjLmMKaW5kZXggNWNjMTEwMy4uNGNiOTg4MiAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ucG9ydGRpc2MuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX25wb3J0ZGlzYy5jCkBAIC0xLDcgKzEsNyBAQAogIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDEzIEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMjc2LDYgKzI3Niw3IEBACiAJc3RydWN0IFNjc2lfSG9zdCAgICpzaG9zdCA9IGxwZmNfc2hvc3RfZnJvbV92cG9ydCh2cG9ydCk7CiAJc3RydWN0IGxwZmNfaGJhICAgICpwaGJhID0gdnBvcnQtPnBoYmE7CiAJc3RydWN0IGxwZmNfZG1hYnVmICpwY21kOworCXVpbnQ2NF90IG5scF9wb3J0d3duID0gMDsKIAl1aW50MzJfdCAqbHA7CiAJSU9DQl90ICppY21kOwogCXN0cnVjdCBzZXJ2X3Bhcm0gKnNwOwpAQCAtMzMyLDYgKzMzMyw4IEBACiAJCQlOVUxM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bHBmYy9scGZjX3Njc2kuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Njc2kuYwpAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiBQb3J0aW9ucyBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwNSBDaHJpc3RvcGggSGVsbHdpZyAgICAgICAgICAgICAgKgpAQCAtMTEzMCw2ICsxMTMwLDI1IEBACiB9CiAKIC8qKgorICogbHBmY19mY3BjbWRfdG9faW9jYiAtIGNvcHkgdGhlIGZjcF9jbWQgZGF0YSBpbnRvIHRoZSBJT0NCCisgKiBAZGF0YTogQSBwb2ludGVyIHRvIHRoZSBpbW1lZGlhdGUgY29tbWFuZCBkYXRhIHBvcnRpb24gb2YgdGhlIElPQ0IuCisgKiBAZmNwX2NtbmQ6IFRoZSBGQ1AgQ29tbWFuZCB0aGF0IGlzIHByb3ZpZGVkIGJ5IHRoZSB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ZXJzL3Njc2kvbHBmYy9scGZjX3Njc2kuaAppbmRleCAwMzg5YWMxLi40NzRlMzBjIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Njc2kuaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Njc2kuaApAQCAtMSw3ICsxLDcgQEAKIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE0IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuYyBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpLmMKaW5kZXggMjA3YTQzZC4uNTZmNzM2OCAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3NsaS5jCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIFBvcnRpb25zIENvcHlyaWdodCAoQykgMjAwNC0yMDA1IENocmlzdG9waCBIZWxsd2lnICAgICAgICAgICAgICAqCkBAIC05MTgsMTIgKzkxOCwxNiBAQAogCQlscGZjX2NtZCA9IChzdHJ1Y3QgbHBmY19zY3NpX2J1ZiAqKSBwaW9jYnEtPmNvbnRleHQxOwogCQluZGxwID0gbHBmY19jbWQtPnJkYXRhLT5wbm9kZTsKIAl9IGVsc2UgIGlmICgocGlvY2JxLT5pb2NiLnVscENvbW1hbmQgPT0gQ01EX0dFTl9SRVFVRVNUNjRfQ1IpICYmCi0JCQkhKHBpb2NicS0+aW9jYl9mbGFnICYgTFBGQ19JT19MSUJERkMpKQorCQkJIShwaW9jYnEtPmlvY2JfZmxhZyAmIExQRkNfSU9fTElCREZDKSkgewogCQluZGxwID0g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wKKwkJCSIwMDAxIHJwaToleCBtYXg6JXggbGltOiV4XG4iLAorCQkJKGludCkgcnBpLCBtYXhfcnBpLCBycGlfbGltaXQpOwogCiAJLyoKIAkgKiBEb24ndCB0cnkgdG8gYWxsb2NhdGUgbW9yZSBycGkgaGVhZGVyIHJlZ2lvbnMgaWYgdGhlIGRldmljZSBsaW1pdApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuaCBiL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfc2xpLmgKaW5kZXggNGEwMTQ1Mi4uN2ZlOTlmZiAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19zbGkuaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3NsaS5oCkBAIC0xLDcgKzEsNyBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFRoaXMgZmlsZSBpcyBwYXJ0IG9mIHRoZSBFbXVsZXggTGludXggRGV2aWNlIERyaXZlciBmb3IgICAgICAgICAqCiAgKiBGaWJyZSBDaGFubmVsIEhvc3QgQnVzIEFkYXB0ZXJzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTQgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDE1IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgIC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pL2xwZmMvbHBmY192ZXJzaW9uLmgKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAxNCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTUgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTE4LDcgKzE4LDcgQEAKICAqIGluY2x1ZGVkIHdpdGggdGhpcyBwYWNrYWdlLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIAotI2RlZmluZSBMUEZDX0RSSVZFUl9WRVJTSU9OICIxMC40LjgwMDAuMC4iCisjZGVmaW5lIExQRkNfRFJJVkVSX1ZFUlNJT04gIjEwLjUuMC4wLiIKICNkZWZpbmUgTFBGQ19EUklWRVJfTkFNRQkJImxwZmMiCiAKIC8qIFVzZW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AgICAgMHgwMTdkICAgICAgIHwgMHgwMTQ0LDB4MDE0Ngl8CisgKiB8IE1vZHVsZSBJbml0IGFuZCBQcm9iZSAgICAgICAgfCAgICAgICAweDAxN2YgICAgICAgfCAweDAxNDYgICAgICAgICB8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDAxNWItMHgwMTYwCXwKLSAqIHwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgICAgICAgICAgICB8IDB4MDE2ZS0weDAxNzAJfAorICogfCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgICAgICAgICAgICAgICAgICAgIHwgMHgwMTZlLTB4MDE3MCAgfAogICogfCBNYWlsYm94IGNvbW1hbmRzICAgICAgICAgICAgIHwgICAgICAgMHgxMThkICAgICAgIHwgMHgxMTE1LTB4MTExNgl8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweDExMWEtMHgxMTFiICB8CiAgKiB8IERldmljZSBEaXNjb3ZlcnkgICAgICAgICAgICAgfCAgICAgICAweDIwMTYgICAgICAgfCAweDIwMjAtMHgyMDIyLCB8CkBAIC02MCw3ICs2MCw3IEBACiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweGIxM2MtMHhiMTQwICB8CiAgKiB8ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAgICAgICAgICAgICAgfCAweGIxNDkJCXwKICAqIHwgTXVsdGlRICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4YzAwYyAgICAgICB8CQl8Ci0gKiB8IE1pc2MgICAgICAgICAgICAgICAgICAgICAgICAgfCAgICAgICAweGQyMTMgICAgICAgfCAweGQwMTEtMHhkMDE3CXwKKyAqIHwgTWlzYyAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgIDB4ZDM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PT0gMCkKIAkJCWRldi0+aXJxID0gcGNpZGV2LT5pcnE7CiAJfQpAQCAtMTQ1OSwyMyArMTM2OCwyMiBAQAogCWlmICghaW5sKGRldi0+aW9iYXNlICsgTUU0MDAwX0RJT19ESVJfUkVHKSkgewogCQlzLT5pb19iaXRzIHw9IDB4RkY7CiAJCW91dGwoTUU0MDAwX0RJT19DVFJMX0JJVF9NT0RFXzAsCi0JCQlkZXYtPmlvYmFzZSArIE1FNDAwMF9ESU9fRElSX1JFRyk7CisJCSAgICAgZGV2LT5pb2Jhc2UgKyBNRTQwMDBfRElPX0RJUl9SRUcpOwogCX0KIAotICAgIC8qPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotICAgICAgQ291bnRlciBzdWJkZXZpY2UKLSAgICAgID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PSovCi0KKwkvKiBDb3VudGVyIHN1YmRldmljZSAoODI1NCkgKi8KIAlzID0gJmRldi0+c3ViZGV2aWNlc1szXTsKLQogCWlmICh0aGlzYm9hcmQtPmhhc19jb3VudGVyKSB7Ci0JCXMtPnR5cGUgPSBDT01FRElfU1VCRF9DT1VOVEVSOwotCQlzLT5zdWJkZXZfZmxhZ3MgPSBTREZfUkVBREFCTEUgfCBTREZfV1JJVEFCTEU7Ci0JCXMtPm5fY2hhbiA9IDM7Ci0JCXMtPm1heGRhdGEgPSAweEZGRkY7CS8qICAxNiBiaXQgY291bnRlcnMgKi8KLQkJcy0+aW5zbl9yZWFkID0gbWU0MDAwX2NudF9pbnNuX3JlYWQ7Ci0JCXMtPmluc25fd3JpdGUgPSBtZTQwMDBfY250X2luc25fd3JpdGU7Ci0JCXMtPmluc25fY29uZmlnID0gbWU0MDAwX2NudF9pbnNuX2NvbmZpZzsKKwkJdW5zaWduZWQgbG9uZyB0aW1lcl9iYXNlID0gcG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GhlIEdOVSBHZW5lcmFsIFB1YmxpYyBMaWNlbnNlCi0gKiBhbG9uZyB3aXRoIHRoaXMgcHJvZ3JhbTsgaWYgbm90LCB3cml0ZSB0byB0aGUgRnJlZSBTb2Z0d2FyZQotICogRm91bmRhdGlvbiwgSW5jLiwgNjc1IE1hc3MgQXZlLCBDYW1icmlkZ2UsIE1BIDAyMTM5LCBVU0EuCi0gKgotICoJTk9URTogVEhJUyBJUyBBIFNIQVJFRCBIRUFERVIuIERPIE5PVCBDSEFOR0UgQ09ESU5HIFNUWUxFISEhCi0gKgogICovCiAKICNpZm5kZWYgX19ER05DX0NMU19ICiAjZGVmaW5lIF9fREdOQ19DTFNfSAogCi0jaW5jbHVkZSAiZGduY190eXBlcy5oIgotCi0KIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICAqIFBlciBjaGFubmVsL3BvcnQgQ2xhc3NpYyBVQVJUIHN0cnVjdHVyZQkJCQkqCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCkBAIC0zNSwxNSArMjUsMjUgQEAKICAqCQkJVSA9IFVudXNlZC4JCQkJCSoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCiAKKy8qCisgKiB0eHJ4ICAgIDogV1IgUkhSL1RIUiAtIEhvbGRpbmcgcmVnCisgKiBpZXIgICAgIDogV1IgSUVSIC0gSW50ZXJydXB0IEVuYWJsZSBSZWcKKyAqIGlzcl9mY3IgOiBXUiBJU1IvRkNSIC0gSW50ZXJydXB0IFN0YXR1cyBSZWcvRmlmbyBDb250cm9sIFJlZworICogbGNyICAgICA6IFdSIExDUiAtIExpbmUgQ29udHJvbCBSZWcKKyAqIG1jciAgICAgOiBXUiBNQ1IgLSBNb2RlbSBDb250cm9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0xFCTB4ODAwMAkJLyogU3VwcG9ydCBSVFMgVG9nZ2xlCQkqLwotCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKiBUaGVzZSBvcHRpb25zIGFyZSBub3Qgc3VwcG9ydGVkIG9uIHRoZSBjb214aS4KLSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCi0jZGVmaW5lCURJR0lfQ09NWEkJKERJR0lfRkFTVHxESUdJX0NPT0t8RFNSUEFDRXxEQ0RQQUNFfERUUlBBQ0UpCi0KICNkZWZpbmUgRElHSV9QTEVOCTI4CQkvKiBTdHJpbmcgbGVuZ3RoCQkqLwogI2RlZmluZQlESUdJX1RTSVoJMTAJCS8qIFRlcm1pbmFsIHN0cmluZyBsZW4JCSovCiAKQEAgLTE2Myw3NiArNzcsNiBAQAogfTsKIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICogS01FIGRlZmluaXRpb25zIGFuZCBzdHJ1Y3R1cmVzLgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLSNkZWZpbmUJUldfSURMRQkJMAkvKiBPcGVyYXRpb24gY29tcGxldGUJCQkqLwotI2RlZmluZQlSV19SRUFECQkxCS8qIFJlYWQgQ29uY2VudHJhdG9yIE1lbW9yeQkJKi8KLSNkZWZpbmUJUldfV1JJVEUJMgkvKiBXcml0ZSBDb25jZW50cmF0b3IgTWVtb3J5CQkqLwotCi1zdHJ1Y3QgcndfdCB7Ci0JdW5zaWduZWQgY2hhcglyd19yZXE7CQkvKiBSZXF1ZXN0IHR5cGUJCQkqLwotCXVuc2lnbmVkIGNoYXIJcndfYm9hcmQ7CS8qIEhvc3Q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KiBOdW1iZXIgb2Ygc3luYyAgcG9ydHMgKi8KLQl1bnNpZ25lZCBjaGFyCXNocmlua19idWZfdHlwZTsJLyogQm9hcmQgdHlwZSAxID0gUEMvWGksCi0JCQkJCQkJICAgICAgMiA9IFBDL1htLAotCQkJCQkJCSAgICAgIDMgPSBQQy9YZQotCQkJCQkJCSAgICAgIDQgPSBNQy9YaQotCQkJCQkJCSAgICAgIDUgPSBDT01YL2kgKi8KLQl1bnNpZ25lZCBjaGFyCXNocmlua19idWZfY2FyZDsJLyogQ2FyZCBudW1iZXIgKi8KLQotfTsKLQotLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogU3RydWN0dXJlIHRvIGdldCBkcml2ZXIgc3RhdHVzIGluZm9ybWF0aW9uCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogc3RydWN0IGRpZ2lfZGluZm8gewpAQCAtMjYzLDUyICsxMDcsNiBAQAogCiAjZGVmaW5lCURJR0lfR0VUQkQJKCgnZCc8PDgpIHwgMjQ5KQkvKiBnZXQgYm9hcmQgaW5mbyAgICAgICAgICAqLwogCi1zdHJ1Y3QgZGlnaV9zdGF0IHsKLQl1bnNpZ25lZCBpbnQJaW5mb19jaGFuOwkJLyogQ2hhbm5lbCBudW1iZXIgKDAgYmFzZWQpICAqLwotCXVuc2lnbmVkIGludAlpbmZvX2JyZDsJCS8qIEJvYXJkIG51bWJlciAoMCBiYXNlZCkgICovCi0JdW5zaWduZWQgaW50CWluZm9fY2ZsYWc7CQkvKiBjZmxhZyBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX2lmbGFnOwkJLyogaWZsYWcgZm9yIGNoYW5uZWwgICAgICAgKi8KLQl1bnNpZ25lZCBpbnQJaW5mb19vZmxhZzsJCS8qIG9mbGFnIGZvciBjaGFubmVsICAgICAgICovCi0JdW5zaWduZWQgaW50CWluZm9fbXN0YXQ7CQkvKiBtc3RhdCBmb3IgY2hhbm5lbCAgICAgICAqLwotCXVuc2lnbmVkIGludAlpbmZvX3R4X2RhdGE7CQkvKiB0eF9kYXRhIGZvciBjaGFubmVsICAgICAgICovCi0JdW5zaWduZWQgaW50CWluZm9fcnhfZGF0YTsJCS8qIHJ4X2RhdGEgZm9yIGNoYW5uZWwgICAgICAgKi8KLQl1bnNpZ25lZCBpbnQJaW5mb19oZmxvdzsJCS8qIGhmbG93IGZvciBjaGFubmVsICAgICAgICovCi0JdW5zaWduZWQgaW50CWluZm9fcmVzZXJ2ZWRbOF07CS8qIGZvciBmdXR1cmUgZXhwYW5zaW9uICAgICovCi19OwotCi0jZGVmaW5lCURJR0lfR0VUU1RBVAkoKCdkJzw8OCkgfCAyNDQpCS8qIGdldCBib2FyZCBpbmZvICAgICAgICAgICovCi0vKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCi0gKgotICogU3RydWN0dXJlIHVzZWQgd2l0aCBpb2N0bCBjb21tYW5kcyBmb3IgcGVyLWNoYW5uZWwgaW5mb3JtYXRpb24KLSAqCi0gKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwotc3RydWN0IGRpZ2lfY2ggewotCXVuc2lnbmVkIGludAlpbmZvX2JkbnVtOwkJLyogQm9hcmQgbnVtYmVyICgwIGJhc2VkKSAgKi8KLQl1bnNpZ25lZCBpbnQJaW5mb19jaGFubmVsOwkJLyogQ2hhbm5lbCBpbmRleCBudW1iZXIgICAgKi8KLQl1bnNpZ25lZCBpbnQJaW5mb19jaF9jZmxhZzsJCS8qIENoYW5uZWwgY2ZsYWcJICAgKi8KLQl1bnNpZ25lZCBpbnQJaW5mb19jaF9pZmxhZzsJCS8qIENoYW5uZWwgaW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LCAweDIxKTsKIAotCS8qIEg9MSBUZW1wZXJhdHVyZSBjb250cm9sICovCi0Jd3JpdGVfcmVnKHBhciwgMHgwNCB8ICh0YyAmIDB4MykpOyAvKgotCSAgICAgICAgICAgICAgICAgICAgICAgICAyOjEgIDEKLQkgICAgICAgICAgICAgICAgICAgICAgICAgMTp4ICBUQzEgLSBUZW1wZXJhdHVyZSBDb2VmZmljaWVudDogMHgxMAotCQkJCQkJCSAwOnggIFRDMAotCQkJCQkJICAqLworCS8qIEg9MSBUZW1wZXJhdHVyZSBjb250cm9sCisJICoKKwkgKiAyOjEgIDEKKwkgKiAxOnggIFRDMSAtIFRlbXBlcmF0dXJlIENvZWZmaWNpZW50OiAweDEwCisJICogMDp4ICBUQzAKKwkgKi8KKwl3cml0ZV9yZWcocGFyLCAweDA0IHwgKHRjICYgMHgzKSk7CiAKLQkvKiBIPTEgQmlhcyBzeXN0ZW0gKi8KLQl3cml0ZV9yZWcocGFyLCAweDEwIHwgKGJzICYgMHg3KSk7IC8qCi0JICAgICAgICAgICAgICAgICAgICAgICAgIDQ6MSAgMQotCSAgICAgICAgICAgICAgICAgICAgICAgICAzOjAgIDAKLQkJCQkJCQkgMjp4ICBCUzIgLSBCaWFzIFN5c3RlbQotCQkJCQkJCSAxOnggIEJTMQotCQkJCQkJCSAwOnggIEJTMAotCSAgICAgICAgICAgICAgICAgICAgICAqLworCS8qIEg9MSBCaWFzIHN5c3RlbQorCSAqCisJICogNDoxICAxCisJICogMzowICAwCisJICogMjp4ICBCUzIgLSBCaWFzIFN5c3RlbQorCSAqIDE6eCAgQlMxCisJICogMDp4ICBCUzAKKwkgKi8KKwl3cml0ZV9yZWcocGFyLCAweDEwIHwgKGJzICYgMHg3KSk7CiAKLQkvKiBGdW5jdGlvbiBzZXQgKi8KLQl3cml0ZV9yZWcocGFyLCAweDIyKTsgLyogNToxICAxCi0JICAgICAgICAgICAgICAgICAgICAgICAgIDI6MCAgUEQgLSBQb3dlcmRvd24gY29udHJvbDog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GFycmF5CiAgKiBAZ2FtbWEubG9jazogTXV0ZXggZm9yIEdhbW1hIGN1cnZlIGxvY2tpbmcKICAqIEBnYW1tYS5jdXJ2ZXM6IFBvaW50ZXIgdG8gR2FtbWEgY3VydmUgYXJyYXkKQEAgLTI1OSw5ICsyNTksNyBAQAogI2RlZmluZSBOVU1BUkdTKC4uLikgIChzaXplb2YoKGludFtdKXtfX1ZBX0FSR1NfX30pL3NpemVvZihpbnQpKQogCiAjZGVmaW5lIHdyaXRlX3JlZyhwYXIsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlwYXItPmZidGZ0b3BzLndyaXRlX3JlZ2lzdGVyKHBhciwgTlVNQVJHUyhfX1ZBX0FSR1NfXyksIF9fVkFfQVJHU19fKTsgXAotfSB3aGlsZSAoMCkKKwlwYXItPmZidGZ0b3BzLndyaXRlX3JlZ2lzdGVyKHBhciwgTlVNQVJHUyhfX1ZBX0FSR1NfXyksIF9fVkFfQVJHU19fKQogCiAvKiBmYnRmdC1jb3JlLmMgKi8KIGV4dGVybiB2b2lkIGZidGZ0X2RiZ19oZXgoY29uc3Qgc3RydWN0IGRldmljZSAqZGV2LApAQCAtMzI2LDggKzMyNCw4IEBACiB9ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCQkJCQkJCQkgICBcCiBzdGF0aWMgY29uc3Qgc3RydWN0IG9mX2RldmljZV9pZCBkdF9pZHNbXSA9IHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHsgLmNvbXBhdGlibGUgPSBfY29tcGF0aWJsZSB9LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0gICAgICAgIHt9LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJeyAuY29tcGF0aWJsZSA9IF9jb21wYXRpYmxlIH0sICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwl7fSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogfTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkJCQkJCQkJICAgXAogTU9EVUxFX0RFVklDRV9UQUJMRShvZiwgZHRfaWRzKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXApAQCAtMzM3LDcgKzMzNSw3IEBACiAJLmRyaXZlciA9IHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkJLm5hbWUgICA9IF9uYW1lLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCS5vd25lciAgPSBUSElTX01PRFVMRSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotICAgICAgICAgICAgICAgIC5vZl9tYXRjaF90YWJsZSA9IG9mX21hdGNoX3B0cihkdF9pZHMpLCAgICAgICAgICAgICAgICAgICAgXAorCQkub2ZfbWF0Y2hfdGFibGUgPSBvZl9tYXRjaF9wdHIoZHRfaWRzKSwgICAgICAgICAgICAgICAgICAgIFwKIAl9LCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCS5wcm9iZSAgPSBmYnRmdF9kcml2ZXJfcHJvYmVfc3BpLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJLnJlbW92ZSA9IGZidGZ0X2RyaXZlcl9yZW1vdmVfc3BpLCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTM0Nyw3ICszNDUsNyBAQAogCS5kcml2ZXIgPSB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJCS5uYW1lICAgPSBfbmFtZSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCQkub3duZXIgID0gVEhJU19NT0RVTEUsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLSAgICAgICAgICAgICAgICAub2ZfbWF0Y2hfdGFibGUgPSBvZl9tYXRjaF9wdHIoZHRfaWRzKSwgICAgICAgICAgICAgICAgICAgIFwKKwkJLm9mX21hdGNoX3RhYmxlID0gb2ZfbWF0Y2hfcHRyKGR0X2lkcyksICAgICAgICAgICAgICAgICAgICBcCiAJfSwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKIAkucHJvYmUgID0gZmJ0ZnRfZHJpdmVyX3Byb2JlX3BkZXYsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogCS5yZW1vdmUgPSBmYnRmdF9kcml2ZXJfcmVtb3ZlX3BkZXYsICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvZmJ0ZnQvZmJ0ZnRfZGV2aWNlLmMgYi9kcml2ZXJzL3N0YWdpbmcvZmJ0ZnQvZmJ0ZnRfZGV2aWNlLmMKaW5kZXggYjlmNGMzMC4uZGY2Y2Q3NyAxMDA2NDQKLS0tIGEvZHJpdmVycy9zdGFnaW5nL2ZidGZ0L2ZidGZ0X2RldmljZS5jCisrKyBiL2RyaXZlcnMvc3RhZ2luZy9mYnRmdC9mYnRmdF9kZXZpY2UuYwpAQCAtMjksOCArMjksOCBAQAogCiAjZGVmaW5lIE1BWF9HUElPUyAzMgogCi1zdHJ1Y3Qgc3BpX2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V2LCB2b2lkICpkYXRhKQoreworCWludCBpOworCXN0cnVjdCBkcHJjX2NoaWxkX29ianMgKm9ianM7CisJc3RydWN0IGZzbF9tY19kZXZpY2UgKm1jX2RldjsKKworCVdBUk5fT04oIWRldik7CisJV0FSTl9PTighZGF0YSk7CisJbWNfZGV2ID0gdG9fZnNsX21jX2RldmljZShkZXYpOworCW9ianMgPSBkYXRhOworCisJZm9yIChpID0gMDsgaSA8IG9ianMtPmNoaWxkX2NvdW50OyBpKyspIHsKKwkJc3RydWN0IGRwcmNfb2JqX2Rlc2MgKm9ial9kZXNjID0gJm9ianMtPmNoaWxkX2FycmF5W2ldOworCisJCWlmIChzdHJsZW4ob2JqX2Rlc2MtPnR5cGUpICE9IDAgJiYKKwkJICAgIEZTTF9NQ19ERVZJQ0VfTUFUQ0gobWNfZGV2LCBvYmpfZGVzYykpCisJCQlicmVhazsKKwl9CisKKwlpZiAoaSA9PSBvYmpzLT5jaGlsZF9jb3VudCkKKwkJZnNsX21jX2RldmljZV9yZW1vdmUobWNfZGV2KTsKKworCXJldHVybiAwOworfQorCitzdGF0aWMgaW50IF9fZnNsX21jX2RldmljZV9yZW1vdmUoc3RydWN0IGRldmljZSAqZGV2LCB2b2lkICpkYXRhKQoreworCVdBUk5fT04oIWRldik7CisJV0FSTl9PTihkYXRhKTsKKwlmc2xfbWNfZGV2aWNlX3JlbW92ZSh0b19mc2xfbWNfZGV2aWNlKGRldikpOworCXJldHVybiAwOworfQorCisvKioKKyAqIGRwcmNfcmVtb3ZlX2RldmljZXMgLSBSZW1vdmVzIGRldmljZXMgZm9yIG9iamVjdHMgcmVtb3ZlZCBmcm9tIGEgRFBSQworICoKKyAqIEBtY19idXNfZGV2OiBwb2ludGVyIHRvIHRoZSBmc2wtbWMgZGV2aWNlIHRoYXQgcmVwcmVzZW50cyBhIERQUkMgb2JqZWN0CisgKiBAb2JqX2Rlc2NfYXJyYXk6IGFycmF5IG9mIG9iamVjdCBkZXNjcmlwdG9ycyBmb3Ig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YpKTsKKworCSpuZXdfbWNfZGV2ID0gbWNfZGV2OworCXJldHVybiAwOworCitlcnJvcl9jbGVhbnVwX2RldjoKKwlrZnJlZShtY19kZXYtPnJlZ2lvbnMpOworCWlmIChtY19idXMpCisJCWRldm1fa2ZyZWUocGFyZW50X2RldiwgbWNfYnVzKTsKKwllbHNlCisJCWttZW1fY2FjaGVfZnJlZShtY19kZXZfY2FjaGUsIG1jX2Rldik7CisKKwlyZXR1cm4gZXJyb3I7Cit9CitFWFBPUlRfU1lNQk9MX0dQTChmc2xfbWNfZGV2aWNlX2FkZCk7CisKKy8qKgorICogZnNsX21jX2RldmljZV9yZW1vdmUgLSBSZW1vdmUgYSBNQyBvYmplY3QgZGV2aWNlIGZyb20gYmVpbmcgdmlzaWJsZSB0bworICogTGludXgKKyAqCisgKiBAbWNfZGV2OiBQb2ludGVyIHRvIGEgTUMgb2JqZWN0IGRldmljZSBvYmplY3QKKyAqLwordm9pZCBmc2xfbWNfZGV2aWNlX3JlbW92ZShzdHJ1Y3QgZnNsX21jX2RldmljZSAqbWNfZGV2KQoreworCXN0cnVjdCBmc2xfbWNfYnVzICptY19idXMgPSBOVUxMOworCisJa2ZyZWUobWNfZGV2LT5yZWdpb25zKTsKKworCS8qCisJICogVGhlIGRldmljZS1zcGVjaWZpYyByZW1vdmUgY2FsbGJhY2sgd2lsbCBnZXQgaW52b2tlZCBieSBkZXZpY2VfZGVsKCkKKwkgKi8KKwlkZXZpY2VfZGVsKCZtY19kZXYtPmRldik7CisJcHV0X2RldmljZSgmbWNfZGV2LT5kZXYpOworCisJaWYgKHN0cmNtcChtY19kZXYtPm9ial9kZXNjLnR5cGUsICJkcHJjIikgPT0gMCkgeworCQltY19idXMgPSB0b19mc2xfbWNfYnVzKG1jX2Rldik7CisJCWlmIChtY19kZXYtPm1jX2lvKSB7CisJCQlmc2xfZGVzdHJveV9tY19pbyhtY19kZXYtPm1jX2lvKTsKKwkJCW1jX2Rldi0+bWNfaW8gPSBOVUxMOworCQl9CisKKwkJaWYgKCZtY19kZXYtPmRldiA9PSBmc2xfbWNfYnVzX3R5cGUuZGV2X3Jvb3QpCisJCQlmc2xfbWNfYnVzX3R5cGUuZGV2X3Jvb3QgPSBOVUxMOworCX0KKworCWlmIChtY19idXMpCisJCWRldm1fa2ZyZWUobWNfZGV2LT5kZXYucGFyZW50LCBtY19idXMpOworCWVsc2UKKwkJa21lbV9jYWNoZV9mcmVlKG1jX2Rldl9jYWNoZSwgbWNfZGV2KTsKK30KK0VYUE9SVF9TWU1CT0xfR1BMKGZzbF9tY19kZXZpY2VfcmVtb3ZlKTsKKworc3RhdGljIGludCBwYXJzZV9tY19yYW5nZXMoc3RydWN0IGRldmljZSAqZGV2LAorCQkJICAgaW50ICpwYWRkcl9jZWxscywKKwkJCSAgIGludCAqbWNfYWRkcl9jZWxscywKKwkJCSAgIGludCAqbWNfc2l6ZV9jZWxscywKKwkJCSAgIGNvbnN0IF9fYmUzMiAqKnJhbmdlc19zdGFydCwKKwkJCSAgIHVpbnQ4X3QgKm51bV9yYW5nZXMpCit7CisJY29uc3QgX19iZTMyICpwcm9wOworCWludCByYW5nZV90dXBsZV9jZWxsX2NvdW50OworCWludCByYW5nZXNfbGVuOworCWludCB0dXBsZV9sZW47CisJc3RydWN0IGRldmljZV9ub2RlICptY19ub2RlID0gZGV2LT5vZl9ub2RlOworCisJKnJhbmdlc19zdGFydCA9IG9mX2dldF9wcm9wZXJ0eShtY19ub2RlLCAicmFuZ2VzIiwgJnJhbmdlc19sZW4pOworCWlmICghKCpyYW5nZXNfc3RhcnQpIHx8ICFyYW5nZXNfbGVuKSB7CisJCWRldl93YXJuKGRldiwKKwkJCSAibWlzc2luZyBvciBlbXB0eSByYW5nZXMgcHJvcGVydHkgZm9yIGRldmljZSB0cmVlIG5vZGUgJyVzJ1xuIiwKKwkJCSBtY19ub2RlLT5uYW1lKTsKKworCQkqbnVtX3JhbmdlcyA9IDA7CisJCXJldHVybiAwOworCX0KKworCSpwYWRkcl9jZW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90CQlpcnFfaW5kZXgsCisJCQkgIHVpbnQzMl90CQlzdGF0dXMpOworCisvKioKKyAqIHN0cnVjdCBkcHJjX2F0dHJpYnV0ZXMgLSBDb250YWluZXIgYXR0cmlidXRlcworICogQGNvbnRhaW5lcl9pZDogQ29udGFpbmVyJ3MgSUQKKyAqIEBpY2lkOiBDb250YWluZXIncyBJQ0lECisgKiBAcG9ydGFsX2lkOiBDb250YWluZXIncyBwb3J0YWwgSUQKKyAqIEBvcHRpb25zOiBDb250YWluZXIncyBvcHRpb25zIGFzIHNldCBhdCBjb250YWluZXIncyBjcmVhdGlvbgorICogQHZlcnNpb246IERQUkMgdmVyc2lvbgorICovCitzdHJ1Y3QgZHByY19hdHRyaWJ1dGVzIHsKKwlpbnQgY29udGFpbmVyX2lkOworCXVpbnQxNl90IGljaWQ7CisJaW50IHBvcnRhbF9pZDsKKwl1aW50NjRfdCBvcHRpb25zOworCS8qKgorCSAqIHN0cnVjdCB2ZXJzaW9uIC0gRFBSQyB2ZXJzaW9uCisJICogQG1ham9yOiBEUFJDIG1ham9yIHZlcnNpb24KKwkgKiBAbWlub3I6IERQUkMgbWlub3IgdmVyc2lvbgorCSAqLworCXN0cnVjdCB7CisJCXVpbnQxNl90IG1ham9yOworCQl1aW50MTZfdCBtaW5vcjsKKwl9IHZlcnNpb247Cit9OworCisvKioKKyAqIGRwcmNfZ2V0X2F0dHJpYnV0ZXMoKSAtIE9idGFpbnMgY29udGFpbmVyIGF0dHJpYnV0ZXMKKyAqIEBtY19pbzoJUG9pbnRlciB0byBNQyBwb3J0YWwncyBJL08gb2JqZWN0CisgKiBAdG9rZW46CVRva2VuIG9mIERQUkMgb2JqZWN0CisgKiBAYXR0cmlidXRlcwlSZXR1cm5lZCBjb250YWluZXIgYXR0cmlidXRlcworICoKKyAqIFJldHVybjogICAgICcwJyBvbiBTdWNjZXNzOyBFcnJvciBjb2RlIG90aGVyd2lzZS4KKyAqLworaW50IGRwcmNfZ2V0X2F0dHJpYnV0ZX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cgQEAKIH0KIAogaW50Ci1raWJsbmRfaW5pdF9yZG1hIChraWJfY29ubl90ICpjb25uLCBraWJfdHhfdCAqdHgsIGludCB0eXBlLAora2libG5kX2luaXRfcmRtYShraWJfY29ubl90ICpjb25uLCBraWJfdHhfdCAqdHgsIGludCB0eXBlLAogCQkgIGludCByZXNpZCwga2liX3JkbWFfZGVzY190ICpkc3RyZCwgX191NjQgZHN0Y29va2llKQogewogCWtpYl9tc2dfdAkgKmlibXNnID0gdHgtPnR4X21zZzsKQEAgLTEwOTUsOSArMTA5NSw5IEBACiAJaW50CQlkc3RpZHg7CiAJaW50CQl3cmtub2I7CiAKLQlMQVNTRVJUICghaW5faW50ZXJydXB0KCkpOwotCUxBU1NFUlQgKHR4LT50eF9ud3JxID09IDApOwotCUxBU1NFUlQgKHR5cGUgPT0gSUJMTkRfTVNHX0dFVF9ET05FIHx8CisJTEFTU0VSVCghaW5faW50ZXJydXB0KCkpOworCUxBU1NFUlQodHgtPnR4X253cnEgPT0gMCk7CisJTEFTU0VSVCh0eXBlID09IElCTE5EX01TR19HRVRfRE9ORSB8fAogCQkgdHlwZSA9PSBJQkxORF9NU0dfUFVUX0RPTkUpOwogCiAJc3JjaWR4ID0gZHN0aWR4ID0gMDsKQEAgLTExNjIsMTkgKzExNjIsMTkgQEAKIAlpYm1zZy0+aWJtX3UuY29tcGxldGlvbi5pYmNtX3N0YXR1cyA9IHJjOwogCWlibXNnLT5pYm1fdS5jb21wbGV0aW9uLmliY21fY29va2llID0gZHN0Y29va2llOwogCWtpYmxuZF9pbml0X3R4X21zZyhjb25uLT5pYmNfcGVlci0+aWJwX25pLCB0eCwKLQkJCSAgIHR5cGUsIHNpemVvZiAoa2liX2NvbXBsZXRpb25fbXNnX3QpKTsKKwkJCSAgIHR5cGUsIHNpemVvZihraWJfY29tcGxldGlvbl9tc2dfdCkpOwogCiAJcmV0dXJuIHJjOwogfQogCiB2b2lkCi1raWJsbmRfcXVldWVfdHhfbG9ja2VkIChraWJfd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ihpbnQpLAorCQkubW9kZSAgICAgPSAwNjQ0LAorCQkucHJvY19oYW5kbGVyID0gJnByb2NfZG9iaXRtYXNrcywKKwl9LAorCXsKKwkJLnByb2NuYW1lID0gInByaW50ayIsCisJCS5kYXRhICAgICA9ICZsaWJjZnNfcHJpbnRrLAorCQkubWF4bGVuICAgPSBzaXplb2YoaW50KSwKKwkJLm1vZGUgICAgID0gMDY0NCwKKwkJLnByb2NfaGFuZGxlciA9ICZwcm9jX2RvYml0bWFza3MsCisJfSwKKwl7CisJCS5wcm9jbmFtZSA9ICJjb25zb2xlX3JhdGVsaW1pdCIsCisJCS5kYXRhICAgICA9ICZsaWJjZnNfY29uc29sZV9yYXRlbGltaXQsCisJCS5tYXhsZW4gICA9IHNpemVvZihpbnQpLAorCQkubW9kZSAgICAgPSAwNjQ0LAorCQkucHJvY19oYW5kbGVyID0gJnByb2NfZG9pbnR2ZWMKKwl9LAorCXsKKwkJLnByb2NuYW1lID0gImNvbnNvbGVfbWF4X2RlbGF5X2NlbnRpc2VjcyIsCisJCS5tYXhsZW4gICA9IHNpemVvZihpbnQpLAorCQkubW9kZSAgICAgPSAwNjQ0LAorCQkucHJvY19oYW5kbGVyID0gJnByb2NfY29uc29sZV9tYXhfZGVsYXlfY3MKKwl9LAorCXsKKwkJLnByb2NuYW1lID0gImNvbnNvbGVfbWluX2RlbGF5X2NlbnRpc2VjcyIsCisJCS5tYXhsZW4gICA9IHNpemVvZihpbnQpLAorCQkubW9kZSAgICAgPSAwNjQ0LAorCQkucHJvY19oYW5kbGVyID0gJnByb2NfY29uc29sZV9taW5fZGVsYXlfY3MKKwl9LAorCXsKKwkJLnByb2NuYW1lID0gImNvbnNvbGVfYmFja29mZiIsCisJCS5tYXhsZW4gICA9IHNpemVvZihpbnQpLAorCQkubW9kZSAgICAgPSAwNjQ0LAorCQkucHJvY19oYW5kbGVyID0gJnByb2NfY29uc29sZV9iYWNrb2ZmCisJfSwKKworCXsKKwkJLnByb2NuYW1lID0gImRlY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JWx1XG4iCisJCSAgICJwYWdlcyBwZXIgcG9vbDoJICAlbHVcbiIKKwkJICAgIm1heCBwYWdlczoJICAgICAgICVsdVxuIgorCQkgICAibWF4IHBvb2xzOgkgICAgICAgJXVcbiIKKwkJICAgInRvdGFsIHBhZ2VzOgkgICAgICVsdVxuIgorCQkgICAidG90YWwgZnJlZToJICAgICAgJWx1XG4iCisJCSAgICJpZGxlIGluZGV4OgkgICAgICAlbHUvMTAwXG4iCisJCSAgICJsYXN0IHNocmluazoJICAgICAlbGRzXG4iCisJCSAgICJsYXN0IGFjY2VzczoJICAgICAlbGRzXG4iCisJCSAgICJtYXggcGFnZXMgcmVhY2hlZDogICAgICAgJWx1XG4iCisJCSAgICJncm93czoJCSAgICV1XG4iCisJCSAgICJncm93cyBmYWlsdXJlOgkgICAldVxuIgorCQkgICAic2hyaW5rczoJCSAldVxuIgorCQkgICAiY2FjaGUgYWNjZXNzOgkgICAgJWx1XG4iCisJCSAgICJjYWNoZSBtaXNzaW5nOgkgICAlbHVcbiIKKwkJICAgImxvdyBmcmVlIG1hcms6CSAgICVsdVxuIgorCQkgICAibWF4IHdhaXRxdWV1ZSBkZXB0aDogICAgICV1XG4iCisJCSAgICJtYXggd2FpdCB0aW1lOgkgICAiIENGU19USU1FX1QgIi8ldVxuIiwKKwkJICAgdG90YWxyYW1fcGFnZXMsCisJCSAgIFBBR0VTX1BFUl9QT09MLAorCQkgICBwYWdlX3Bvb2xzLmVwcF9tYXhfcGFnZXMsCisJCSAgIHBhZ2VfcG9vbHMuZXBwX21heF9wb29scywKKwkJICAgcGFnZV9wb29scy5lcHBfdG90YWxfcGFnZXMsCisJCSAgIHBhZ2VfcG9vbHMuZXBwX2ZyZWVfcGFnZXMsCisJCSAgIHBhZ2VfcG9vbHMuZXBwX2lkbGVfaWR4LAorCQkgICBnZXRfc2Vjb25kcygpIC0gcGFnZV9wb29scy5lcHBfbGFzdF9zaHJpbmssCisJCSAgIGdldF9zZWNvbmRzKCkgLSBwYWd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RUxEX0ZJRUxEKHVpbnQzMl90IGVudW1kb25lbXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgdXNicnN0bXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgdXNic3VzcG1zawkJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IGVybHlzdXNwbXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgaTJjaW50CQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgdWxwaWNraW50bXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgZ291dG5ha2VmZm1zawkJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IGdpbm5ha2VmZm1zawkJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IG5wdHhmZW1wbXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgcnhmbHZsbXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3Qgc29mbXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3Qgb3RnaW50bXNrCQk6IDEsCisJCV9fQklURklFTERfRklFTEQodWludDMyX3QgbW9kZW1pc21zawkJOiAxLAorCQlfX0JJVEZJRUxEX0ZJRUxEKHVpbnQzMl90IHJlc2VydmVkXzBfMAkJOiAxLAorCQk7KSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkpKSkKIAl9IHM7CiB9OwogCkBAIC01MDQsMzggKzUwOSwzOSBAQAogCSAqCSogMSdiMTogSG9zdCBtb2RlCiAJICovCiAJc3RydWN0IGN2bXhfdXNiY3hfZ2ludHN0c19zIHsKLQkJdWludDMyX3Qgd2t1cGludAk6IDE7Ci0JCXVpbnQzMl90IHNlc3NyZXFpbnQJOiAxOwotCQl1aW50MzJfdCBkaXNjb25uaW50CTogMTsKLQkJdWludDMyX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W5uZWx8IFR5cGUgfCBJUCAgICAgIHwKKyAqICAgICAgIHwgRFNBUCB8IFNTQVAgfCAgICAgICAgIHwgICAgICAgICAgfCAgICAgIHwgUGFja2V0ICB8CisgKiAgICAgICB8IDB4QUEgfCAweEFBIHwweDAzIChVSSl8MHgwMC0wMC1GOHwgICAgICB8ICAgICAgICAgfAorICogICAgICAgYC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tfCAgICAgICAgIHwKKyAqIFRvdGFsOiA4IG5vbi1kYXRhIGJ5dGVzICAgICAgICAgICAgICAgICAgICAgICAgIGAtLS0tLi0tLS0nCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwKKyAqICAgICAgICAuLSAnSVAgUGFja2V0JyBleHBhbmRzLCBpZiBXRVAgZW5hYmxlZCwgdG8gPC0tJworICogICAgICAgIHwKKyAqICAgICAgICBWCisgKiAgICAgICAsLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0uCisgKiBCeXRlcyB8ICA0ICB8ICAgMC0yMjk2ICB8ICA0ICB8CisgKiAgICAgICB8LS0tLS18LS0tLS0tLS0tLS18LS0tLS18CisgKiBEZXNjLiB8IElWICB8IEVuY3J5cHRlZCB8IElDViB8CisgKiAgICAgICB8ICAgICB8IElQIFBhY2tldCB8ICAgICB8CisgKiAgICAgICBgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0nCisgKiBUb3RhbDogOCBub24tZGF0YSBieXRlcworICoKKyAqCisgKiA4MDIuMyBFdGhlcm5ldCBEYXRhIEZyYW1lCisgKgorICogICAgICAgLC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLgorICogQnl0ZXMgfCAgIDYgICB8ICAgNiAgIHwgIDIgICB8ICBWYXJpYWJsZSB8ICAgNCAgfAorICogICAgICAgfC0tLS0tLS18LS0tLS0tLXwtLS0tLS18LS0tLS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NlLCBJIHByaW50ICc/Jy4gQW5uaWUsIDIwMDUtMTEtMjIuKi8KLSNkZWZpbmUgUFJJTlRBQkxFKF9jaCkgIChfY2g+JyEnICYmIF9jaDwnficpCi0jZGVmaW5lIElFRUU4MDIxMV9QUklOVF9TVFIoX0NvbXAsIF9UaXRsZVN0cmluZywgX1B0ciwgX0xlbikJCQkJCVwKLQkJCWlmKChfQ29tcCkgJiBsZXZlbCkJCQkJCQkJXAotCQkJeyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJCWludCAgICAgICAgICAgICBfX2k7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkJdTggIGJ1ZmZlcltNQVhfU1RSX0xFTl07CQkJCQlcCi0JCQkJaW50IGxlbmd0aCA9IChfTGVuPE1BWF9TVFJfTEVOKT8gX0xlbiA6IChNQVhfU1RSX0xFTi0xKSA7CVwKLQkJCQltZW1zZXQoYnVmZmVyLCAwLCBNQVhfU1RSX0xFTik7CQkJCQlcCi0JCQkJbWVtY3B5KGJ1ZmZlciwgKHU4ICopX1B0ciwgbGVuZ3RoICk7CQkJCVwKLQkJCQlmb3IoIF9faT0wOyBfX2k8TUFYX1NUUl9MRU47IF9faSsrICkgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQkJCXsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkJICAgICBpZiggIVBSSU5UQUJMRShidWZmZXJbX19pXSkgKSAgIGJ1ZmZlcltfX2ldID0gJz8nOwkJXAotCQkJCX0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCi0JCQkJYnVmZmVyW2xlbmd0aF0gPSAnXDAnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwK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CQkJZHN0LApkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJ1L2llZWU4MDIxMS9ydGw4MTl4X0hUUHJvYy5jIGIvZHJpdmVycy9zdGFnaW5nL3J0bDgxOTJ1L2llZWU4MDIxMS9ydGw4MTl4X0hUUHJvYy5jCmluZGV4IGU2MGQ5MjYuLmMyNTg4ZjggMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc3RhZ2luZy9ydGw4MTkydS9pZWVlODAyMTEvcnRsODE5eF9IVFByb2MuYworKysgYi9kcml2ZXJzL3N0YWdpbmcvcnRsODE5MnUvaWVlZTgwMjExL3J0bDgxOXhfSFRQcm9jLmMKQEAgLTQ3MSwxMiArNDcxLDEwIEBACiBzdGF0aWMgYm9vbCBIVElPVEFjdElzRGlzYWJsZU1DU1R3b1NwYXRpYWxTdHJlYW0oc3RydWN0IGllZWU4MDIxMV9kZXZpY2UgKmllZWUsCiAJCQkJCQkgdTggKlBlZXJNYWNBZGRyKQogewotCWJvb2wgcmV0VmFsdWUgPSBmYWxzZTsKLQogI2lmZGVmIFRPRE8KIAkvLyBBcHBseSBmb3IgODE5dSBvbmx5CiAjZW5kaWYKLQlyZXR1cm4gcmV0VmFsdWU7CisJcmV0dXJuIGZhbHNlOwogfQogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKQEAgLTQ4OCwxMSArNDg2LDggQEAKICAgKiAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KIHN0YXRpYyB1OCBIVElPVEFjdElzRGlzYWJsZUVEQ0FUdXJibyhzdHJ1Y3QgaWVlZTgwMjExX2RldmljZSAqaWVlZSwKIA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gYml0bWFzaykgPj4gYml0c2hpZnQ7Ci0JCXJldHVybiByZWc7CiAJfQorCWJpdHNoaWZ0ID0gIHJ0bDgxOTJfQ2FsY3VsYXRlQml0U2hpZnQoYml0bWFzayk7CisJcmVnID0gKHJlZyAmIGJpdG1hc2spID4+IGJpdHNoaWZ0OworCXJldHVybiByZWc7CisKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgpAQCAtNDc4LDcgKzQ3Niw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCiAgKiBmdW5jdGlvbjogIFRoaXMgZnVuY3Rpb24gcmVhZHMgQkIgcGFyYW1ldGVycyBmcm9tIGhlYWRlciBmaWxlIHdlIGdlbmVyYXRlLAogICogICAgICAgICAgICBhbmQgZG8gcmVnaXN0ZXIgcmVhZC93cml0ZQotICogaW5wdXQ6ICAgICBuZXRfZGV2aWNlIAkqZGV2CisgKiBpbnB1dDogICAgIG5ldF9kZXZpY2UJKmRldgogICogb3V0cHV0OiAgICBub25lCiAgKiByZXR1cm46ICAgIG5vbmUKICAqIG5vdGljZTogICAgQkIgcGFyYW1ldGVycyBtYXkgY2hhbmdlIGFsbCB0aGUgdGltZSwgc28gcGxlYXNlIG1ha2UKQEAgLTgyNSw4ICs4MjMsOCBAQAogCXdyaXRlX25pY19ieXRlX0UoZGV2LCAweDVlLCAweDAwKTsKIAlpZiAocHJpdi0+Y2FyZF84MTkyX3ZlcnNpb24gPT0gKHU4KVZFUlNJT05fODE5eFVfQSkgewogCQkvKiBBbnRlbm5hIGdhaW4gb2Zmc2V0IGZyb20gQi9DL0QgdG8gQSAqLwotCQlyZWdfdTMyID0gKHByaXYtPkFudGVubmFUeFB3RGlmZlsxXTw8NCB8Ci0JCQkgICBwcml2LT5BbnRlbm5hVHhQd0RpZ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07Ci0JbWljX2hlYWRlcjFbMTBdID0gbXBkdVsxMF07ICAgICAvKiBBMiAqLworCW1pY19oZWFkZXIxWzEwXSA9IG1wZHVbMTBdOyAvKiBBMiAqLwogCW1pY19oZWFkZXIxWzExXSA9IG1wZHVbMTFdOwogCW1pY19oZWFkZXIxWzEyXSA9IG1wZHVbMTJdOwogCW1pY19oZWFkZXIxWzEzXSA9IG1wZHVbMTNdOwpAQCAtMTA0Niw3ICsxMDUxLDcgQEAKIH0KIAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLQkvKiBjb25zdHJ1Y3RfbWljX2hlYWRlcjIoKSAgICAgICAgICAgICAgICAgICAgICAqLworLyogY29uc3RydWN0X21pY19oZWFkZXIyKCkgICAgICAgICAgICAgICAgICAgICAgKi8KIC8qIEJ1aWxkcyB0aGUgbGFzdCBNSUMgaGVhZGVyIGJsb2NrIGZyb20gICAgICAgICovCiAvKiBoZWFkZXIgZmllbGRzLiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KQEAgLTEwNTUsOSArMTA2MCwxMCBAQAogewogCWludCBpOwogCi0JZm9yIChpID0gMDsgaTwxNjsgaSsrKSBtaWNfaGVhZGVyMltpXT0gMHgwMDsKKwlmb3IgKGkgPSAwOyBpIDwgMTY7IGkrKykKKwkJbWljX2hlYWRlcjJbaV0gPSAweDAwOwogCi0JbWljX2hlYWRlcjJbMF0gPSBtcGR1WzE2XTsgICAgLyogQTMgKi8KKwltaWNfaGVhZGVyMlswXSA9IG1wZHVbMTZdOyAvKiBBMyAqLwogCW1pY19oZWFkZXIyWzFdID0gbXBkdVsxN107CiAJbWljX2hlYWRlcjJbMl0gPSBtcGR1WzE4XTsKIAltaWNfaGVhZGVyMlszXSA9IG1wZHVbMTldOwpAQCAtMTA2OCw4ICsxMDc0LDggQEAKIAltaWNfaGVhZG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wgcDMsIFJPVCwgcl9udW0pIC8qIGZ1bGx5IHVucm9sbGVkICovIFwKLWRvIHsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCVJPVU5EMjU2KHAwLCBwMSwgcDIsIHAzLCBST1QsIHJfbnVtKTsgICAgICAgICAgICAgICAgIFwKLX0gd2hpbGUgKDApCisJUk9VTkQyNTYocDAsIHAxLCBwMiwgcDMsIFJPVCwgcl9udW0pCiAKICNkZWZpbmUgSTI1NihSKSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAogZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCkBAIC0xNTIsOSArMTUwLDcgQEAKIAogI2lmIFNLRUlOX1VOUk9MTF81MTIgPT0gMAogI2RlZmluZSBSNTEyKHAwLCBwMSwgcDIsIHAzLCBwNCwgcDUsIHA2LCBwNywgUk9ULCByX251bSkgLyogdW5yb2xsZWQgKi8gXAotZG8geyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCVJPVU5ENTEyKHAwLCBwMSwgcDIsIHAzLCBwNCwgcDUsIHA2LCBwNywgUk9ULCByX251bSk7ICAgICAgICAgICBcCi19IHdoaWxlICgwKQorCVJPVU5ENTEyKHAwLCBwMSwgcDIsIHAzLCBwNCwgcDUsIHA2LCBwNywgUk9ULCByX251bSkKIAogI2RlZmluZSBJNTEyKFIpICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCiBkbyB7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9zbGljb3N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RydWN0IF9wbGxfdmFsdWVfdAoreworICAgIGNsb2NrX3R5cGVfdCBjbG9ja1R5cGU7CisgICAgdW5zaWduZWQgbG9uZyBpbnB1dEZyZXE7IC8qIElucHV0IGNsb2NrIGZyZXF1ZW5jeSB0byB0aGUgUExMICovCisKKyAgICAvKiBVc2UgdGhpcyB3aGVuIGNsb2NrVHlwZSA9IFBBTkVMX1BMTCAqLworICAgIHVuc2lnbmVkIGxvbmcgTTsKKyAgICB1bnNpZ25lZCBsb25nIE47CisgICAgdW5zaWduZWQgbG9uZyBPRDsKKyAgICB1bnNpZ25lZCBsb25nIFBPRDsKK30KK3BsbF92YWx1ZV90OworCisvKiBpbnB1dCBzdHJ1Y3QgdG8gaW5pdENoaXBQYXJhbSgpIGZ1bmN0aW9uICovCit0eXBlZGVmIHN0cnVjdCBfaW5pdGNoaXBfcGFyYW1fdAoreworICAgIHVuc2lnbmVkIHNob3J0IHBvd2VyTW9kZTsgICAgLyogVXNlIHBvd2VyIG1vZGUgMCBvciAxICovCisgICAgdW5zaWduZWQgc2hvcnQgY2hpcENsb2NrOyAgICAvKiBTcGVlZCBvZiBtYWluIGNoaXAgY2xvY2sgaW4gTUh6IHVuaXQKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBrZWVwIHRoZSBjdXJyZW50IGNsb2NrIHNldHRpbmcKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE90aGVycyA9IHRoZSBuZXcgbWFpbiBjaGlwIGNsb2NrCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyAgICB1bnNpZ25lZCBzaG9ydCBtZW1DbG9jazsgICAgIC8qIFNwZWVkIG9mIG1lbW9yeSBjbG9jayBpbiBNSHogdW5pdAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IGtlZXAgdGhlIGN1cnJlbnQgY2xvY2sgc2V0dGluZworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgT3RoZXJzID0gdGhlIG5ldyBtZW1vcnkgY2xvY2sKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLworICAgIHVuc2lnbmVkIHNob3J0IG1hc3RlckNsb2NrOyAgLyogU3BlZWQgb2YgbWFzdGVyIGNsb2NrIGluIE1IeiB1bml0CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0ga2VlcCB0aGUgY3VycmVudCBjbG9jayBzZXR0aW5nCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPdGhlcnMgPSB0aGUgbmV3IG1hc3RlciBjbG9jaworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisgICAgdW5zaWduZWQgc2hvcnQgc2V0QWxsRW5nT2ZmOyAvKiAwID0gbGVhdmUgYWxsIGVuZ2luZSBzdGF0ZSB1bnRvdWNoZWQuCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gbWFrZSBzdXJlIHRoZXkgYXJlIG9mZjogMkQsIE92ZXJsYXksCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2aWRlbyBhbHBoYSwgYWxwaGEsIGhhcmR3YXJlIGN1cnNvcnMKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisgICAgdW5zaWduZWQgY2hhciByZXNldE1lbW9yeTsgICAvKiAwID0gRG8gbm90IHJlc2V0IHRoZSBtZW1vcnkgY29udHJvbGxlcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IFJlc2V0IHRoZSBtZW1vcnkgY29udHJvbGxlcgorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisKKyAgICAvKiBNb3JlIGluaXRpYWxpemF0aW9uIHBhcmFtZXRlciBjYW4gYmUgYWRkZWQgaWYgbmVlZGVkICovCit9Citpbml0Y2hpcF9wYXJhbV90OworCisKK2xvZ2ljYWxfY2hpcF90eXBlX3QgZ2V0Q2hpcFR5c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1BMTF9DVFJMKSwgUEFORUxfUExMX0NUUkwsIFBPV0VSKSA9PQorCQkJIFBBTkVMX1BMTF9DVFJMX1BPV0VSX09GRikgfHwKKwkJCShGSUVMRF9HRVQoUEVFSzMyKFBBTkVMX0RJU1BMQVlfQ1RSTCksIFBBTkVMX0RJU1BMQVlfQ1RSTCwgVElNSU5HKSA9PQorCQkJIFBBTkVMX0RJU1BMQVlfQ1RSTF9USU1JTkdfRElTQUJMRSkpCisJCXsKKwkJCXJldHVybjsKKwkJfQorCisgICAgICAgIHdoaWxlIChkZWxheS0tID4gMCkKKyAgICAgICAgeworICAgICAgICAgICAgLyogV2FpdCBmb3IgZW5kIG9mIHZzeW5jLiAqLworICAgICAgICAgICAgZG8KKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICBzdGF0dXMgPSBGSUVMRF9HRVQoUEVFSzMyKFNZU1RFTV9DVFJMKSwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgU1lTVEVNX0NUUkwsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBBTkVMX1ZTWU5DKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgICAgIHdoaWxlIChzdGF0dXMgPT0gU1lTVEVNX0NUUkxfUEFORUxfVlNZTkNfQUNUSVZFKTsKKworICAgICAgICAgICAgLyogV2FpdCBmb3Igc3RhcnQgb2YgdnN5bmMuICovCisgICAgICAgICAgICBkbworICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIHN0YXR1cyA9IEZJRUxEX0dFVChQRUVLMzIoU1lTVEVNX0NUUkwpLAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTWVNURU1fQ1RSTCwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEFORUxfVlNZTkMpOworICAgICAgICAgICAgfQorICAgICAgICAgICAgd2hpbGUgKHN0YXR1cyA9PSBTWVNURU1fQ1RSTF9QQU5FTF9WU1lOQ19JTkFDVElWRSk7C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N0IFJpc2luZyBFZGdlICovCisgICAgICAgICAgICAgICAgMSwgIC8qIFNlbGVjdCAyNC1iaXQgYnVzICovCisgICAgICAgICAgICAgICAgMCwgIC8qIFNlbGVjdCBTaW5nbGUgRWRnZSBjbG9jayAqLworICAgICAgICAgICAgICAgIDEsICAvKiBFbmFibGUgSFN5bmMgYXMgaXMgKi8KKyAgICAgICAgICAgICAgICAxLCAgLyogRW5hYmxlIFZTeW5jIGFzIGlzICovCisgICAgICAgICAgICAgICAgMSwgIC8qIEVuYWJsZSBEZS1za2V3ICovCisgICAgICAgICAgICAgICAgNywgIC8qIFNldCB0aGUgZGUtc2tldyBzZXR0aW5nIHRvIG1heGltdW0gc2V0dXAgKi8KKyAgICAgICAgICAgICAgICAxLCAgLyogRW5hYmxlIGNvbnRpbnVvdXMgU3luYyAqLworICAgICAgICAgICAgICAgIDEsICAvKiBFbmFibGUgUExMIEZpbHRlciAqLworICAgICAgICAgICAgICAgIDQgICAvKiBVc2UgdGhlIHJlY29tbWVuZGVkIHZhbHVlIGZvciBQTEwgRmlsdGVyIHZhbHVlICovCisgICAgICAgICkgIT0gMCkgJiYgKGR2aUdldFZlbmRvcklEKCkgIT0gMHgwMDAwKSAmJiAoZHZpR2V0RGV2aWNlSUQoKSAhPSAweDAwMDApKQorICAgIHsKKyAgICAgICAgcmV0dXJuICgtMSk7CisgICAgfQorCisgICAgLyogVE9ETzogSW5pdGlhbGl6ZSBvdGhlciBkaXNwbGF5IGNvbXBvbmVudCAqLworCisgICAgLyogU3VjY2VzcyAqLworICAgIHJldHVybiAwOworCit9CisKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc3RhZ2luZy9zbTc1MGZiL2Rkazc1MF9kaXNwbGF5LmggYi9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9kZGs3NTBfZGlzcGxheS5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmFlMGY4NGMKLS0tIC9kZXYvbnVsbAorKysgYi9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ydCBkdmlHZXRWZW5kb3JJRCh2b2lkKQoreworICAgIGR2aV9jdHJsX2RldmljZV90ICpwQ3VycmVudER2aUN0cmw7CisKKyAgICAvL3BDdXJyZW50RHZpQ3RybCA9IGdldER2aUN0cmwoKTsKKyAgICBwQ3VycmVudER2aUN0cmwgPSBnX2RjZnRTdXBwb3J0ZWREdmlDb250cm9sbGVyOworICAgIGlmIChwQ3VycmVudER2aUN0cmwgIT0gKGR2aV9jdHJsX2RldmljZV90ICopMCkKKyAgICAgICAgcmV0dXJuIHBDdXJyZW50RHZpQ3RybC0+cGZuR2V0VmVuZG9ySWQoKTsKKworICAgIHJldHVybiAweDAwMDA7Cit9CisKKworLyoKKyAqICBkdmlHZXREZXZpY2VJRAorICogICAgICBUaGlzIGZ1bmN0aW9uIGdldHMgdGhlIGRldmljZSBJRCBvZiB0aGUgRFZJIGNvbnRyb2xsZXIgY2hpcC4KKyAqCisgKiAgT3V0cHV0OgorICogICAgICBEZXZpY2UgSUQKKyAqLwordW5zaWduZWQgc2hvcnQgZHZpR2V0RGV2aWNlSUQodm9pZCkKK3sKKyAgICBkdmlfY3RybF9kZXZpY2VfdCAqcEN1cnJlbnREdmlDdHJsOworCisvLyAgICBwQ3VycmVudER2aUN0cmwgPSBnZXREdmlDdHJsKCk7CisJcEN1cnJlbnREdmlDdHJsID0gZ19kY2Z0U3VwcG9ydGVkRHZpQ29udHJvbGxlcjsKKyAgICBpZiAocEN1cnJlbnREdmlDdHJsICE9IChkdmlfY3RybF9kZXZpY2VfdCAqKTApCisgICAgICAgIHJldHVybiBwQ3VycmVudER2aUN0cmwtPnBmbkdldERldmljZUlkKCk7CisKKyAgICByZXR1cm4gMHgwMDAwOworfQorCisjZW5kaWYKKworCmRpZmYgLS1naXQgYS9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9kZGs3NTBfZHZpLmggYi9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9kZGs3NTBfZHZpLmgKbmV3IGZpbGUgbW9kZSAxM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C8qIFdhaXQgdW50aWwgdGhlIHRyYW5zZmVyIGlzIGNvbXBsZXRlZC4gKi8KKyAgICB0aW1lb3V0ID0gSFdJMkNfV0FJVF9USU1FT1VUOworCXdoaWxlICgoRklFTERfR0VUKFBFRUszMihJMkNfU1RBVFVTKSwgSTJDX1NUQVRVUywgVFgpICE9IEkyQ19TVEFUVVNfVFhfQ09NUExFVEVEKSAmJgorICAgICAgICAgICAodGltZW91dCAhPSAwKSkKKwkJdGltZW91dC0tOworCisJaWYgKHRpbWVvdXQgPT0gMCkKKwkgICAgcmV0dXJuICgtMSk7CisKKyAgICByZXR1cm4gMDsKK30KKworCisKKy8qCisgKiAgVGhpcyBmdW5jdGlvbiB3cml0ZXMgZGF0YSB0byB0aGUgaTJjIHNsYXZlIGRldmljZSByZWdpc3RlcnMuCisgKgorICogIFBhcmFtZXRlcnM6CisgKiAgICAgIGRldmljZUFkZHJlc3MgICAtIGkyYyBTbGF2ZSBkZXZpY2UgYWRkcmVzcworICogICAgICBsZW5ndGggICAgICAgICAgLSBUb3RhbCBudW1iZXIgb2YgYnl0ZXMgdG8gYmUgd3JpdHRlbiB0byB0aGUgZGV2aWNlCisgKiAgICAgIHBCdWZmZXIgICAgICAgICAtIFRoZSBidWZmZXIgdGhhdCBjb250YWlucyB0aGUgZGF0YSB0byBiZSB3cml0dGVuIHRvIHRoZQorICogICAgICAgICAgICAgICAgICAgICBpMmMgZGV2aWNlLgorICoKKyAqICBSZXR1cm4gVmFsdWU6CisgKiAgICAgIFRvdGFsIG51bWJlciBvZiBieXRlcyB0aG9zZSBhcmUgYWN0dWFsbHkgd3JpdHRlbi4KKyAqLworc3RhdGljIHVuc2lnbmVkIGludCBod0kyQ1dyaXRlRGF0YSgKKyAgICB1bnNpZ25lZCBjaGFyIGRldmljZUFkZHJlc3MsCisgICAgdW5zaWduZWQgaW50IGxlbmd0aCwKKyAgICB1bnNpZ25lZCBjaGFyICpwQnVmZmVyCispCit7CisgICAgdW5zaWduZWQgY2hhciBjb3VudCwgaTsKKyAgICB1bnNpZ25lZCBpbnQgdG90YWxCeXRlcyA9IDA7CisKKyAgICAvKiBTZXQgdGhlIERldmljZSBBZGRyZXNzICovCisgICAgUE9LRTMyKEkyQ19TTEFWRV9BRERSRVNTLCBkZXZpY2VBZGRyZXNzICYgfjB4MDEpOworCisgICAgLyogV3JpdGUgZGF0YS4KKyAgICAgKiBOb3RlOgorICAgICAqICAgICAgT25seSAxNiBieXRlIGNhbiBiZSBhY2Nlc3NlZCBwZXIgaTJjIHN0YXJ0IGluc3RydWN0aW9uLgorICAgICAqLworICAgIGRvCisgICAgeworICAgICAgICAvKiBSZXNldCBJMkMgYnkgd3JpdGluZyAwIHRvIEkyQ19SRVNFVCByZWdpc3RlciB0byBjbGVhciB0aGUgcHJldmlvdXMgc3RhdHVzLiAqLworICAgICAgICBQT0tFMzIoSTJDX1JFU0VULCAwKTsKKworICAgICAgICAvKiBTZXQgdGhlIG51bWJlciBvZiBieXRlcyB0byBiZSB3cml0dGVuICovCisgICAgICAgIGlmIChsZW5ndGggPCBNQVhfSFdJMkNfRklGTykKKyAgICAgICAgICAgIGNvdW50ID0gbGVuZ3RoIC0gMTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgY291bnQgPSBNQVhfSFdJMkNfRklGTyAtIDE7CisgICAgICAgIFBPS0UzMihJMkNfQllURV9DT1VOVCwgY291bnQpOworCisgICAgICAgIC8qIE1vdmUgdGhlIGRhdGEgdG8gdGhlIEkyQyBkYXRhIHJlZ2lzdGVyICovCisJICAgIGZvciAoaSA9IDA7IGkgPD0gY291bnQ7IGkrKykKKyAgICAgICAgICAgIFBPS0UzMihJMkNfREFUQTAgKyBpLCAqcEJ1ZmZlcisrKTsKKworICAgICAgICAvKiBTdGFydCB0aGUgSTJDICovCisgICAgICAgIFBPS0UzMihJMkNfQ1RSTCwgRklFTERfU0VUKFBFRUszMihJMkNfQ1RSTCksIEkyQ19DVFJMLCBDVFJMLCBTVEFSVCkpOworCisgICAgICA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gKi8KKyAgICAgICAgUE9LRTMyKEkyQ19DVFJMLCBGSUVMRF9TRVQoUEVFSzMyKEkyQ19DVFJMKSwgSTJDX0NUUkwsIENUUkwsIFNUQVJUKSk7CisKKyAgICAgICAgLyogV2FpdCB1bnRpbCB0cmFuc2FjdGlvbiBkb25lLiAqLworICAgICAgICBpZiAoaHdJMkNXYWl0VFhEb25lKCkgIT0gMCkKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIC8qIFNhdmUgdGhlIGRhdGEgdG8gdGhlIGdpdmVuIGJ1ZmZlciAqLworICAgICAgICBmb3IgKGkgPSAwOyBpIDw9IGNvdW50OyBpKyspCisJCSAgICAqcEJ1ZmZlcisrID0gUEVFSzMyKEkyQ19EQVRBMCArIGkpOworCisgICAgICAgIC8qIFN1YnN0cmFjdCBsZW5ndGggYnkgMTYgKi8KKyAgICAgICAgbGVuZ3RoIC09IChjb3VudCArIDEpOworCisgICAgICAgIC8qIE51bWJlciBvZiBieXRlcyByZWFkLiAqLworICAgICAgICB0b3RhbEJ5dGVzICs9IChjb3VudCArIDEpOworCisgICAgfSB3aGlsZSAobGVuZ3RoID4gMCk7CisKKyAgICByZXR1cm4gdG90YWxCeXRlczsKK30KKworCisKKworLyoKKyAqICBUaGlzIGZ1bmN0aW9uIHJlYWRzIHRoZSBzbGF2ZSBkZXZpY2UncyByZWdpc3RlcgorICoKKyAqICBQYXJhbWV0ZXJzOgorICogICAgICBkZXZpY2VBZGRyZXNzICAgLSBpMmMgU2xhdmUgZGV2aWNlIGFkZHJlc3Mgd2hpY2ggcmVnaXN0ZXIKKyAqICAgICAgICAgICAgICAgICAgICAgICAgdG8gYmUgcmVhZCBmcm9tCisgKiAgICAgIHJlZ2lzdGVySW5kZXggICAtIFNsYXZlIGRldmljZSdzIHJlZ2lzdGVyIHRvIGJlIHJlYWQKKyAqCisgKiAgUmV0dXJuIFZhbHVlOgorICogICAgICBSZWdpc3RlciB2YWx1ZQorICovCit1bnNpZ25lZCBjaGFy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DgwMCAmJiB5ID09IDYwMCApCisgICAgCWRpc3BDb250cm9sID0gRklFTERfU0VUKGRpc3BDb250cm9sLCBDUlRfRElTUExBWV9DVFJMLCBDTEssIFBMTDQxKTsKKwllbHNlIGlmICh4ID09IDEwMjQgJiYgeSA9PSA3NjgpCisgICAgCWRpc3BDb250cm9sID0gRklFTERfU0VUKGRpc3BDb250cm9sLCBDUlRfRElTUExBWV9DVFJMLCBDTEssIFBMTDY1KTsKKwllbHNlIGlmICh4ID09IDExNTIgJiYgeSA9PSA4NjQpCisgICAgCWRpc3BDb250cm9sID0gRklFTERfU0VUKGRpc3BDb250cm9sLCBDUlRfRElTUExBWV9DVFJMLCBDTEssIFBMTDgwKTsKKwllbHNlIGlmICh4ID09IDEyODAgJiYgeSA9PSA3NjgpCisgICAgCWRpc3BDb250cm9sID0gRklFTERfU0VUKGRpc3BDb250cm9sLCBDUlRfRElTUExBWV9DVFJMLCBDTEssIFBMTDgwKTsKKwllbHNlIGlmICh4ID09IDEyODAgJiYgeSA9PSA3MjApCisgICAgCWRpc3BDb250cm9sID0gRklFTERfU0VUKGRpc3BDb250cm9sLCBDUlRfRElTUExBWV9DVFJMLCBDTEssIFBMTDc0KTsKKwllbHNlIGlmICh4ID09IDEyODAgJiYgeSA9PSA5NjApCisgICAgCWRpc3BDb250cm9sID0gRklFTERfU0VUKGRpc3BDb250cm9sLCBDUlRfRElTUExBWV9DVFJMLCBDTEssIFBMTDEwOCk7CisJZWxzZSBpZiAoeCA9PSAxMjgwICYmIHkgPT0gMTAyNCkKKyAgICAJZGlzcENvbnRyb2wgPSBGSUVMRF9TRVQoZGlzcENvbnRyb2wsIENSVF9ESVNQTEFZX0NUUkwsIENMSywgUExMMTA4KTsKKwllbHNlIC8qIGRlZmF1bHQgdG8gVkdBIGNsb2NrICovCisgICAgCWRpc3BDb250cm9sID0gRklFTERfU0VUKGRpc3BDb250cm9sLCBDUlRfRElTUExBWV9DVFJMLCBDTEssIFBMTDI1KTsKKworCS8qIF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MKTsKKwkJdmFsdWU9IEZJRUxEX1ZBTFVFKHZhbHVlLFNZU1RFTV9DVFJMLERQTVMsc3RhdGUpOworCQlQT0tFMzIoU1lTVEVNX0NUUkwsIHZhbHVlKTsKKwl9Cit9CisKK3Vuc2lnbmVkIGludCBnZXRQb3dlck1vZGUodm9pZCkKK3sKKwlpZihnZXRDaGlwVHlwZSgpID09IFNNNzUwTEUpCisJCXJldHVybiAwOworICAgIHJldHVybiAoRklFTERfR0VUKFBFRUszMihQT1dFUl9NT0RFX0NUUkwpLCBQT1dFUl9NT0RFX0NUUkwsIE1PREUpKTsKK30KKworCisvKgorICogU001MHggY2FuIG9wZXJhdGUgaW4gb25lIG9mIHRocmVlIG1vZGVzOiAwLCAxIG9yIFNsZWVwLgorICogT24gaGFyZHdhcmUgcmVzZXQsIHBvd2VyIG1vZGUgMCBpcyBkZWZhdWx0LgorICovCit2b2lkIHNldFBvd2VyTW9kZSh1bnNpZ25lZCBpbnQgcG93ZXJNb2RlKQoreworICAgIHVuc2lnbmVkIGludCBjb250cm9sX3ZhbHVlID0gMDsKKworICAgIGNvbnRyb2xfdmFsdWUgPSBQRUVLMzIoUE9XRVJfTU9ERV9DVFJMKTsKKworCWlmKGdldENoaXBUeXBlKCkgPT0gU003NTBMRSkKKwkJcmV0dXJuOworCisgICAgc3dpdGNoIChwb3dlck1vZGUpCisgICAgeworICAgICAgICBjYXNlIFBPV0VSX01PREVfQ1RSTF9NT0RFX01PREUwOgorICAgICAgICAgICAgY29udHJvbF92YWx1ZSA9IEZJRUxEX1NFVChjb250cm9sX3ZhbHVlLCBQT1dFUl9NT0RFX0NUUkwsIE1PREUsIE1PREUwKTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGNhc2UgUE9XRVJfTU9ERV9DVFJMX01PREVfTU9ERTE6CisgICAgICAgICAgICBjb250cm9sX3ZhbHVlID0gRklFTERfU0VUKGNvbnRyb2xfdmFsdWUsIFBPV0VSX01PREVfQ1RSTCwgTU9ERSwgTU9ERTEpOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9TTEVFUDoKKyAgICAgICAgICAgIGNvbnRyb2xfdmFsdWUgPSBGSUVMRF9TRVQoY29udHJvbF92YWx1ZSwgUE9XRVJfTU9ERV9DVFJMLCBNT0RFLCBTTEVFUCk7CisgICAgICAgICAgICBicmVhazsKKworICAgICAgICBkZWZhdWx0OgorICAgICAgICAgICAgYnJlYWs7CisgICAgfQorCisgICAgLyogU2V0IHVwIG90aGVyIGZpZWxkcyBpbiBQb3dlciBDb250cm9sIFJlZ2lzdGVyICovCisgICAgaWYgKHBvd2VyTW9kZSA9PSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9TTEVFUCkKKyAgICB7CisgICAgICAgIGNvbnRyb2xfdmFsdWUgPQorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICAgICAgICAgRklFTERfU0VUKCAgY29udHJvbF92YWx1ZSwgUE9XRVJfTU9ERV9DVFJMLCAzMzZDTEssIE9GRikgfAorI2VuZGlmCisgICAgICAgICAgICBGSUVMRF9TRVQoICBjb250cm9sX3ZhbHVlLCBQT1dFUl9NT0RFX0NUUkwsIE9TQ19JTlBVVCwgIE9GRik7CisgICAgfQorICAgIGVsc2UKKyAgICB7CisgICAgICAgIGNvbnRyb2xfdmFsdWUgPQorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICAgICAgICAgRklFTERfU0VUKCAgY29udHJvbF92YWx1ZSwgUE9XRVJfTU9ERV9DVFJMLCAzMzZDTEssIE9OKSB8CisjZW5kaWYKKyAgICAgICAgICAgIEZJRUxEX1NFVCggIGNvbnRyb2xfdmFsdWUsIFBPV0VSX01PREVfQ1RSTCwgT1NDX0lOUFVULCAgT04pOworICAgIH0KKworICAgIC8qIFByb2dyYW0gbmV3IHBvd2VyIG1vZGUuICovCisgICAgUE9LRTMyKFBPV0VSX01PREVfQ1RSTCwgY29udHJvbF92YWx1ZSk7Cit9CisKK3ZvaWQgc2V0Q3VycmVudEdhdGUodW5zaWduZWQgaW50IGdhdGUpCit7CisgICAgdW5zaWduZWQgaW50IGdhdGVfcmVnOworICAgIHVuc2lnbmVkIGludCBtb2RlOworCisgICAgLyogR2V0IGN1cnJlbnQgcG93ZXIgbW9kZS4gKi8KKyAgICBtb2RlID0gZ2V0UG93ZXJNb2RlKCk7CisKKyAgICBzd2l0Y2ggKG1vZGUpCisgICAgeworICAgICAgICBjYXNlIFBPV0VSX01PREVfQ1RSTF9NT0RFX01PREUwOgorICAgICAgICAgICAgZ2F0ZV9yZWcgPSBNT0RFMF9HQVRFOworICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgY2FzZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9NT0RFMToKKyAgICAgICAgICAgIGdhdGVfcmVnID0gTU9ERTFfR0FURTsKKyAgICAgICAgICAgIGJyZWFrOworCisgICAgICAgIGRlZmF1bHQ6CisgICAgICAgICAgICBnYXRlX3JlZyA9IE1PREUwX0dBVEU7CisgICAgICAgICAgICBicmVhazsKKyAgICB9CisgICAgUE9LRTMyKGdhdGVfcmVnLCBnYXRlKTsKK30KKworCisKKy8qCisgKiBUaGlzIGZ1bmN0aW9uIGVuYWJsZS9kaXNhYmxlIHRoZSAyRCBlbmdpbmUuCisgKi8KK3ZvaWQgZW5hYmxlMkRFbmdpbmUodW5zaWduZWQgaW50IGVuYWJsZSkKK3sKKyAgICB1aW50MzJfdCBnYXRlOworCisgICAgZ2F0ZSA9IFBFRUszMihDVVJSRU5UX0dBVEUpOworICAgIGlmIChlbmFibGUpCisgICAgeworICAgICAgICBnYXRlID0gRklFTERfU0VUKGdhdGUsIENVUlJFTlRfR0FURSwgREUsICBPTik7CisgICAgICAgIGdhdGUgPSBGSUVMRF9TRVQoZ2F0ZSwgQ1VSUkVOVF9HQVRFLCBDU0MsIE9OKTsKKyAgICB9CisgICAgZWxzZQorICAgIHsKKyAgICAgICAgZ2F0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JpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3JlZy5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLjIwMTZmOTcKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9kZGs3NTBfcmVnLmgKQEAgLTAsMCArMSwyNjE2IEBACisjaWZuZGVmIERESzc1MF9SRUdfSF9fCisjZGVmaW5lIERESzc1MF9SRUdfSF9fCisKKy8qIE5ldyByZWdpc3RlciBmb3IgU003NTBMRSAqLworI2RlZmluZSBERV9TVEFURTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNTQKKyNkZWZpbmUgREVfU1RBVEUxX0RFX0FCT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBERV9TVEFURTFfREVfQUJPUlRfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFURTFfREVfQUJPUlRfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIERFX1NUQVRFMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA1OAorI2RlZmluZSBERV9TVEFURTJfREVfRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIERFX1NUQVRFMl9ERV9GSUZPX05PVEVNUFRZICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRFMl9ERV9GSUZPX0VNUFRZICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1NUQVRFMl9ERV9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgREVfU1RBVEUyX0RFX1NUQVRVU19JRExFICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVEUyX0RFX1NUQVRVU19CVVNZICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfU1RBVEUyX0RFX01FTV9GSUZPICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBERV9TVEFURTJfREVfTUVNX0ZJRk9fTk9URU1QVFkgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFURTJfREVfTUVNX0ZJRk9fRU1QVFkgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TVEFURTJfREVfUkVTRVJWRUQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisKKworCisjZGVmaW5lIFNZU1RFTV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwMAorI2RlZmluZSBTWVNURU1fQ1RSTF9EUE1TICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNU19WUEhQICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNU19WUEhOICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNU19WTkhQICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgU1lTVEVNX0NUUkxfRFBNU19WTkhOICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgU1lTVEVNX0NUUkxfUENJX0JVUlNUICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5CisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9CVVJTVF9PRkYgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9CVVJTVF9PTiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX1BDSV9NQVNURVIgICAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfTUFTVEVSX09GRiAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9QQ0lfTUFTVEVSX09OICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9MQVRFTkNZX1RJTUVSICAgICAgICAgICAgICAgICAgICAgMjQ6MjQKKyNkZWZpbmUgU1lTVEVNX0NUUkxfTEFURU5DWV9USU1FUl9PTiAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfTEFURU5DWV9USU1FUl9PRkYgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfRklGTyAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX0ZJRk9fTk9URU1QVFkgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX0ZJRk9fRU1QVFkgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFNZU1RFTV9DVFJMX0RFX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAyMjoyMgorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9TVEFUVVNfSURMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9TVEFUVVNfQlVTWSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBTWVNURU1fQ1RSTF9ERV9NRU1fRklGTyAgICAgICAgICAgICAgICAgICAgICAgMjE6MjEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfTUVNX0ZJRk9fTk9URU1QVFkgICAgICAgICAgICAgIDAKKyNkZWZpbmUgU1lTVEVNX0NUUkxfREVfTUVNX0ZJRk9fRU1QVFkgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgU1lTVEVNX0NUUkxfQ1NDX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgIC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AgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwNAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9SRVJFU0hfQ09VTlQgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fUkVSRVNIX0NPVU5UXzFST1cgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fUkVSRVNIX0NPVU5UXzNST1cgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fUkVGUkVTSF9USU1FICAgICAgICAgICAgICAgICAgIDI2OjI1CisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1JFRlJFU0hfVElNRV84ICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1JFRlJFU0hfVElNRV8xNiAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1JFRlJFU0hfVElNRV8zMiAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1JFRlJFU0hfVElNRV82NCAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE1JU0NfQ1RSTF9JTlRfT1VUUFVUICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBNSVNDX0NUUkxfSU5UX09VVFBVVF9OT1JNQUwgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfSU5UX09VVFBVVF9JTlZFUlQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfUExMX0NMS19DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgTUlTQ19DVFJMX1BMTF9DTEtfQ09VTlRfT0ZGICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX1BMTF9DTEtfQ09VTlRfT04gICAgICAgICAgICAgICAgICAgIDEKKyNk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TSVpFXzY0TSAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RXVFIgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UV1RSXzJDTEsgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UV1RSXzFDTEsgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UV1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFdSXzNDTEsgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFdSXzJDTEsgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJQICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUlBfM0NMSyAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUlBfNENMSyAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9UUkZDICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSRkNfMTJDTEsgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSRkNfMTRDTEsgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX1RSQVMgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJBU183Q0xLICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0RSQU1fVFJBU184Q0xLICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX1JFU0VUICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fUkVTRVRfUkVTRVQgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fUkVTRVRfTk9STUFMICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfTE9DQUxNRU1fU1RBVEUgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TVEFURV9BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9TVEFURV9JTkFDVElWRSAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9DUFVfQ0FTX0xBVEVOQ1kgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgTUlTQ19DVFJMX0NQVV9DQVNfTEFURU5DWV8yQ0xLICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0NQVV9DQVNfTEFURU5DWV8zQ0xLICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0RMTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBNSVNDX0NUUkxfRExMX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRExMX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNSVNDX0NUUkxfRFJBTV9PVVRQVVQgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX09VVFBVVF9MT1cgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1JU0NfQ1RSTF9EUkFNX09VVFBVVF9ISUdIICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1JU0NfQ1RSTF9MT0NBTE1FTV9CVVNfU0laRSAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX0JVU19TSVpFXzMyICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTUlTQ19DVFJMX0xPQ0FMTUVNX0JVU19TSVpFXzY0ICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTUlTQ19DVFJMX0VNQkVEREVEX0xPQ0FMTUVNICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBNSVNDX0NUUkxfRU1CRURERURfTE9DQUxNRU1fT04gICAgICAgICAgICAgICAgMAorI2RlZmluZSBNSVNDX0NUUkxfRU1CRURERURfTE9DQUxNRU1fT0ZGICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIEdQSU9fTVVYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwOAorI2RlZmluZSBHUElPX01VWF8zMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgR1BJT19NVVhfMzFfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMzFfSTJDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMwOjMwCisjZGVmaW5lIEdQSU9fTVVYXzMwX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzMwX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzI5ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToyOQorI2RlZmluZSBHUElPX01VWF8yOV9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yOV9TU1AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgR1BJT19NVVhfMjhfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjhfU1NQMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIEdQSU9fTVVYXzI3X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzI3X1NTUDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzI2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBHUElPX01VWF8yNl9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yNl9TU1AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU6MjUKKyNkZWZpbmUgR1BJT19NVVhfMjVfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjVfU1NQMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIEdQSU9fTVVYXzI0X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzI0X1NTUDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzIzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoyMworI2RlZmluZSBHUElPX01VWF8yM19HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yM19TU1AwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjI6MjIKKyNkZWZpbmUgR1BJT19NVVhfMjJfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMjJfU1NQMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMjEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxOjIxCisjZGVmaW5lIEdQSU9fTVVYXzIxX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzIxX1NTUDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzIwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBHUElPX01VWF8yMF9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8yMF9TU1AwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTk6MTkKKyNkZWZpbmUgR1BJT19NVVhfMTlfR1BJTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTlfUFdNICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIEdQSU9fTVVYXzE4X0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzE4X1BXTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzE3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBHUElPX01VWF8xN19HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xN19QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgR1BJT19NVVhfMTZfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTZfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIEdQSU9fTVVYXzE1X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzE1X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzE0ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNAorI2RlZmluZSBHUElPX01VWF8xNF9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xNF9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTMKKyNkZWZpbmUgR1BJT19NVVhfMTNfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTNfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjEyCisjZGVmaW5lIEdQSU9fTVVYXzEyX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzEyX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzExICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBHUElPX01VWF8xMV9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8xMV9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8xMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgR1BJT19NVVhfMTBfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMTBfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBHUElPX01VWF85X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF85X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF84ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIEdQSU9fTVVYXzhfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzhfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgR1BJT19NVVhfN19HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfN19URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBHUElPX01VWF82X0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF82X1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF81ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIEdQSU9fTVVYXzVfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzVfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgR1BJT19NVVhfNF9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfNF9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBHUElPX01VWF8zX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8zX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX01VWF8yICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIEdQSU9fTVVYXzJfR1BJT19aVlBPUlQgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fTVVYXzJfVEVTVF9EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fTVVYXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgR1BJT19NVVhfMV9HUElPX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19NVVhfMV9URVNUX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19NVVhfMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBHUElPX01VWF8wX0dQSU9fWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX01VWF8wX1RFU1RfREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIExPQ0FMTUVNX0FSQklUUkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAwQworI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9ST1RBVEUgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fUk9UQVRFX09GRiAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fUk9UQVRFX09OICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTE9DQUxNRU1fQVJCSVRSQVRJT05fVkdBICAgICAgICAgICAgICAgICAgICAgIDI2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ICAgICAgMworI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfNCAgICAgICAgICAgNAorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfNSAgICAgICAgICAgNQorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfNiAgICAgICAgICAgNgorI2RlZmluZSBMT0NBTE1FTV9BUkJJVFJBVElPTl9DUlRfUFJJT1JJVFlfNyAgICAgICAgICAgNworCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAxMAorI2RlZmluZSBQQ0lNRU1fQVJCSVRSQVRJT05fUk9UQVRFICAgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1JPVEFURV9PRkYgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1JPVEFURV9PTiAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1ZHQSAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI0CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WR0FfT0ZGICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfMSAgICAgICAgICAgICAxCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfMiAgICAgICAgICAgICAyCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfMyAgICAgICAgICAgICAzCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WR0FfUFJJT1JJVFlfNCAgICAgICAgICAgICA0CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElP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VElPTl9aVlBPUlQwX1BSSU9SSVRZXzcgICAgICAgICA3CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFTyAgICAgICAgICAgICAgICAgICAgICAxMDo4CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19PRkYgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8xICAgICAgICAgICAxCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8yICAgICAgICAgICAyCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV8zICAgICAgICAgICAzCisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV80ICAgICAgICAgICA0CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV81ICAgICAgICAgICA1CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV82ICAgICAgICAgICA2CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9WSURFT19QUklPUklUWV83ICAgICAgICAgICA3CisjZGVmaW5lIFBDSU1FTV9BUkJJVFJBVElPTl9QQU5FTCAgICAgICAgICAgICAgICAgICAgICA2OjQKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1BBTkVMX09GRiAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1BBTkVMX1BSSU9SSVRZXzEgICAgICAgICAgIDEKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1BBTkVMX1BSSU9SSVRZXzIgICAgICAgICAgIDIKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9OX1BBTkVMX1BSSU9SSVRZXzMgICAgICAgICAgIDMKKyNkZWZpbmUgUENJTUVNX0FSQklUUkFUSU9O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ZGVmaW5lIFJBV19JTlRfWlZQT1JUMV9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMV9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMV9WU1lOQ19DTEVBUiAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfWlZQT1JUMF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgUkFXX0lOVF9aVlBPUlQwX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUkFXX0lOVF9aVlBPUlQwX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUkFXX0lOVF9aVlBPUlQwX1ZTWU5DX0NMRUFSICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUkFXX0lOVF9DUlRfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBSQVdfSU5UX0NSVF9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBSQVdfSU5UX0NSVF9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSQVdfSU5UX0NSVF9WU1lOQ19DTEVBUiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBSQVdfSU5UX1BBTkVMX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIFJBV19JTlRfUEFORUxfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFJBV19JTlRfUEFORUxfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfUEFORUxfVlNZTkNfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFJBV19JTlRfVkdBX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgUkFXX0lOVF9WR0FfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUkFXX0lOVF9WR0FfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUkFXX0lOVF9WR0FfVlNZTkNfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJTlRfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjQKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzMxX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzMxX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzMwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8zMF9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8zMF9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjlfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjlfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjggICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI4X0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI4X0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI3ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yN19JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yN19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX0dQSU8yNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjZfSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjZfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19HUElPMjUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI1X0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfR1BJTzI1X0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfSTJDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBJTlRfU1RBVFVTX0kyQ19JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0kyQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1BXTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgSU5UX1NUQVRVU19QV01fSU5BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19QV01fQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19ETUExICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfRE1BMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgSU5UX1NUQVRVU19ETUEwX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19ETUEwX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19QQ0kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBJTlRfU1RBVFVTX1BDSV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX1BDSV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1NTUDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIElOVF9TVEFUVVNfU1NQMV9JTkFDVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfU1NQMV9BQ1RJVkUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfU1NQMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgSU5UX1NUQVRVU19TU1AwX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19TU1AwX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBJTlRfU1RBVFVTX0RFX0lOQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0RFX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1pWUE9SVDFfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIElOVF9TVEFUVVNfWlZQT1JUMV9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfWlZQT1JUMV9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfWlZQT1JUMF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgSU5UX1NUQVRVU19aVlBPUlQwX1ZTWU5DX0lOQUNUSVZFICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19aVlBPUlQwX1ZTWU5DX0FDVElWRSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX1NUQVRVU19DUlRfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBJTlRfU1RBVFVTX0NSVF9WU1lOQ19JTkFDVElWRSAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfU1RBVFVTX0NSVF9WU1lOQ19BQ1RJVkUgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfU1RBVFVTX1BBTkVMX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIElOVF9TVEFUVVNfUEFORUxfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9TVEFUVVNfUEFORUxfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9TVEFUVVNfVkdBX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgSU5UX1NUQVRVU19WR0FfVlNZTkNfSU5BQ1RJVkUgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX1NUQVRVU19WR0FfVlNZTkNfQUNUSVZFICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJTlRfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjgKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzMxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIElOVF9NQVNLX0dQSU8zMV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0dQSU8zMV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0dQSU8zMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBJTlRfTUFTS19HUElPMzBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19HUElPMzBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19HUElPMjkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI5X0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI5X0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIElOVF9NQVNLX0dQSU8yOF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yOF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBJTlRfTUFTS19HUElPMjdfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19HUElPMjdfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19HUElPMjYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI2X0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI2X0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfR1BJTzI1ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0dQSU8yNV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBJTlRfTUFTS19JMkNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19JMkNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgSU5UX01BU0tfUFdNX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfUFdNX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfRE1BMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIElOVF9NQVNLX0RNQTFfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX0RNQTFfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgSU5UX01BU0tfRE1BX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfRE1BX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfUENJICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBJTlRfTUFTS19QQ0lfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19QQ0lfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19TU1AxICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIElOVF9NQVNLX1NTUDFfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1NTUDFfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX1NTUDAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgSU5UX01BU0tfU1NQMF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfU1NQMF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfREUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBJTlRfTUFTS19ERV9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19ERV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19aVlBPUlQxX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIElOVF9NQVNLX1pWUE9SVDFfVlNZTkNfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1pWUE9SVDFfVlNZTkNfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX1pWUE9SVDBfVlNZTkMgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgSU5UX01BU0tfWlZQT1JUMF9WU1lOQ19ESVNBQkxFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfWlZQT1JUMF9WU1lOQ19FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSU5UX01BU0tfQ1JUX1ZTWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBJTlRfTUFTS19DUlRfVlNZTkNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJTlRfTUFTS19DUlRfVlNZTkNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJTlRfTUFTS19QQU5FTF9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIElOVF9NQVNLX1BBTkVMX1ZTWU5DX0RJU0FCTEUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIElOVF9NQVNLX1BBTkVMX1ZTWU5DX0VOQUJMRSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElOVF9NQVNLX1ZHQV9WU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgSU5UX01BU0tfVkdBX1ZTWU5DX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSU5UX01BU0tfVkdBX1ZTWU5DX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBDVVJSRU5UX0dBVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS18xMTJNSFogICAgICAgICAgICAgICAgICAgICAgMAorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEtfODRNSFogICAgICAgICAgICAgICAgICAgICAgIDEKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLXzU2TUhaICAgICAgICAgICAgICAgICAgICAgICAyCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS180Mk1IWiAgICAgICAgICAgICAgICAgICAgICAgMworI2Vsc2UKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLX0RJVl8zICAgICAgICAgICAgICAgICAgICAgICAwCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTUNMS19ESVZfNCAgICAgICAgICAgICAgICAgICAgICAgMQorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX01DTEtfRElWXzYgICAgICAgICAgICAgICAgICAgICAgIDIKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NQ0xLX0RJVl84ICAgICAgICAgICAgICAgICAgICAgICAzCisjZW5kaWYKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMSyAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLXzMzNk1IWiAgICAgICAgICAgICAgICAgICAgMAorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMS18xNjhNSFogICAgICAgICAgICAgICAgICAgIDEKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEtfMTEyTUhaICAgICAgICAgICAgICAgICAgICAyCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLXzg0TUhaICAgICAgICAgICAgICAgICAgICAgMworI2Vsc2UKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEtfRElWXzEgICAgICAgICAgICAgICAgICAgICAwCisgICAgI2RlZmluZSBDVVJSRU5UX0dBVEVfTTJYQ0xLX0RJVl8yICAgICAgICAgICAgICAgICAgICAgMQorICAgICNkZWZpbmUgQ1VSUkVOVF9HQVRFX00yWENMS19ESVZfMyAgICAgICAgICAgICAgICAgICAgIDIKKyAgICAjZGVmaW5lIENVUlJFTlRfR0FURV9NMlhDTEtfRElWXzQgICAgICAgICAgICAgICAgICAgICAzCisjZW5kaWYKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1ZHQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIENVUlJFTlRfR0FURV9WR0FfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9WR0FfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1BXTV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1BXTV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBDVVJSRU5UX0dBVEVfSTJDX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfSTJDX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfU1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIENVUlJFTlRfR0FURV9TU1BfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9TU1BfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0dQSU9fT0ZGICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0dQSU9fT04gICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBDVVJSRU5UX0dBVEVfWlZQT1JUX09GRiAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfWlZQT1JUX09OICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfQ1NDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIENVUlJFTlRfR0FURV9DU0NfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9DU0NfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RFX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RFX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RJU1BMQVkgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBDVVJSRU5UX0dBVEVfRElTUExBWV9PRkYgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDVVJSRU5UX0dBVEVfRElTUExBWV9PTiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDVVJSRU5UX0dBVEVfTE9DQUxNRU0gICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIENVUlJFTlRfR0FURV9MT0NBTE1FTV9PRkYgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENVUlJFTlRfR0FURV9MT0NBTE1FTV9PTiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENVUlJFTlRfR0FURV9ETUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RNQV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1VSUkVOVF9HQVRFX0RNQV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBNT0RFMF9HQVRFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNDQKKyNkZWZpbmUgTU9ERTBfR0FURV9NQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZGVmaW5lIE1PREUwX0dBVEVfTUNMS18xMTJNSFogICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfTUNMS184NE1IWiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfTUNMS181Nk1IWiAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1PREUwX0dBVEVfTUNMS180Mk1IWiAgICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE1PREUwX0dBVEVfTTJYQ0xLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2RlZmluZSBNT0RFMF9HQVRFX00yWENMS18zMzZNSFogICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX00yWENMS18xNjhNSFogICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX00yWENMS18xMTJNSFogICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBNT0RFMF9HQVRFX00yWENMS184NE1IWiAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBNT0RFMF9HQVRFX1ZHQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgTU9ERTBfR0FURV9WR0FfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9WR0FfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9QV00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBNT0RFMF9HQVRFX1BXTV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX1BXTV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX0kyQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIE1PREUwX0dBVEVfSTJDX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfSTJDX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfU1NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgTU9ERTBfR0FURV9TU1BfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9TU1BfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9HUElPICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBNT0RFMF9HQVRFX0dQSU9fT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX0dQSU9fT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX1pWUE9SVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIE1PREUwX0dBVEVfWlZQT1JUX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfWlZQT1JUX09OICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfQ1NDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgTU9ERTBfR0FURV9DU0NfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9DU0NfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9ERSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBNT0RFMF9HQVRFX0RFX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX0RFX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMF9HQVRFX0RJU1BMQVkgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIE1PREUwX0dBVEVfRElTUExBWV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUwX0dBVEVfRElTUExBWV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUwX0dBVEVfTE9DQUxNRU0gICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgTU9ERTBfR0FURV9MT0NBTE1FTV9PRkYgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTBfR0FURV9MT0NBTE1FTV9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTBfR0FURV9ETUEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBNT0RFMF9HQVRFX0RNQV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMF9HQVRFX0RNQV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIE1PREUxX0dBVEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0OAorI2RlZmluZSBNT0RFMV9HQVRFX01DTEsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLXzExMk1IWiAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLXzg0TUhaICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLXzU2TUhaICAgICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgTU9ERTFfR0FURV9NQ0xLXzQyTUhaICAgICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgTU9ERTFfR0FURV9NMlhDTEsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLXzMzNk1IWiAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLXzE2OE1IWiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLXzExMk1IWiAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIE1PREUxX0dBVEVfTTJYQ0xLXzg0TUhaICAgICAgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIE1PREUxX0dBVEVfVkdBICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDoxMAorI2RlZmluZSBNT0RFMV9HQVRFX1ZHQV9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX1ZHQV9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX1BXTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOTo5CisjZGVmaW5lIE1PREUxX0dBVEVfUFdNX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfUFdNX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfSTJDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgTU9ERTFfR0FURV9JMkNfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9JMkNfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9TU1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6NworI2RlZmluZSBNT0RFMV9HQVRFX1NTUF9PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX1NTUF9PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX0dQSU8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjo2CisjZGVmaW5lIE1PREUxX0dBVEVfR1BJT19PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfR1BJT19PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfWlZQT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgTU9ERTFfR0FURV9aVlBPUlRfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9aVlBPUlRfT04gICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9DU0MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBNT0RFMV9HQVRFX0NTQ19PRkYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX0NTQ19PTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIE1PREUxX0dBVEVfREVfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfREVfT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1PREUxX0dBVEVfRElTUExBWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgTU9ERTFfR0FURV9ESVNQTEFZX09GRiAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTU9ERTFfR0FURV9ESVNQTEFZX09OICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTU9ERTFfR0FURV9MT0NBTE1FTSAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBNT0RFMV9HQVRFX0xPQ0FMTUVNX09GRiAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNT0RFMV9HQVRFX0xPQ0FMTUVNX09OICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNT0RFMV9HQVRFX0RNQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIE1PREUxX0dBVEVfRE1BX09GRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1PREUxX0dBVEVfRE1BX09OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDRDCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfMzM2Q0xLICAgICAgICAgICAgICAgICAgICA0OjQKKyAgICAjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF8zMzZDTEtfT0ZGICAgICAgICAgICAgICAgIDAKKyAgICAjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF8zMzZDTEtfT04gICAgICAgICAgICAgICAgIDEKKyNlbmRpZgorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfT1NDX0lOUFVUICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9PU0NfSU5QVVRfT0ZGICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9PU0NfSU5QVVRfT04gICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBPV0VSX01PREVfQ1RSTF9BQ1BJICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX0FDUElfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX0FDUElfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUE9XRVJfTU9ERV9DVFJMX01PREUgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MAorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9NT0RFMCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9NT0RFMSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQT1dFUl9NT0RFX0NUUkxfTU9ERV9TTEVFUCAgICAgICAgICAgICAgICAgICAgMgorCisjZGVmaW5lIFBDSV9NQVNURVJfQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA1MAorI2RlZmluZSBQQ0lfTUFTVEVSX0JBU0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgREVWSUNFX0lEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDU0CisjZGVmaW5lIERFVklDRV9JRF9ERVZJQ0VfSUQgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERVZJQ0VfSURfUkVWSVNJT05fSUQgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgUExMX0NMS19DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDU4CisjZGVmaW5lIFBMTF9DTEtfQ09VTlRfQ09VTlRFUiAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgUEFORUxfUExMX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDVDCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9CWVBBU1NfT04gICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfUExMX0NUUkxfSU5QVVQgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX0lOUFVUX09TQyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX0lOUFVUX1RFU1RDTEsgICAgICAgICAgICAgICAgICAxCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorI2Vsc2UKKyAgICAjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX1BPRCAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisgICAgI2RlZmluZSBQQU5FTF9QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2VuZGlmCisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMTo4CisjZGVmaW5lIFBBTkVMX1BMTF9DVFJMX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBDUlRfUExMX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNjAKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIENSVF9QTExfQ1RSTF9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9QTExfQ1RSTF9CWVBBU1NfT04gICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9QTExfQ1RSTF9QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBDUlRfUExMX0NUUkxfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfUExMX0NUUkxfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfUExMX0NUUkxfSU5QVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX0lOUFVUX09TQyAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX0lOUFVUX1RFU1RDTEsgICAgICAgICAgICAgICAgICAgIDEKKyNpZmRlZiBWQUxJREFUSU9OX0NISVAKKyAgICAjZGVmaW5lIENSVF9QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZWxzZQorICAgICNkZWZpbmUgQ1JUX1BMTF9DVFJMX1BPRCAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyAgICAjZGVmaW5lIENSVF9QTExfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZW5kaWYKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjgKKyNkZWZpbmUgQ1JUX1BMTF9DVFJMX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIFZHQV9QTEwwX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA2NAorI2RlZmluZSBWR0FfUExMMF9DVFJMX0JZUEFTUyAgICAgICAgICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9CWVBBU1NfT0ZGICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9CWVBBU1NfT04gICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9QT1dFUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE3CisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfUE9XRVJfT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfUE9XRVJfT04gICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZHQV9QTEwwX0NUUkxfSU5QVVQgICAgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBWR0FfUExMMF9DVFJMX0lOUFVUX09TQyAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfUExMMF9DVFJMX0lOUFVUX1RFU1RDTEsgICAgICAgICAgICAgICAgICAgMQorI2lmZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MTQKKyNlbHNlCisgICAgI2RlZmluZSBWR0FfUExMMF9DVFJMX1BPRCAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorICAgICNkZWZpbmUgVkdBX1BMTDBfQ1RSTF9PRCAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTIKKyNlbmRpZgorI2RlZmluZSBWR0FfUExMMF9DVFJMX04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6OAorI2RlZmluZSBWR0FfUExMMF9DVFJMX00gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDY4CisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfQllQQVNTICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBWR0FfUExMMV9DVFJMX0JZUEFTU19PRkYgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfUExMMV9DVFJMX0JZUEFTU19PTiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWR0FfUExMMV9DVFJMX1BPV0VSICAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9QT1dFUl9PRkYgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9QT1dFUl9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVkdBX1BMTDFfQ1RSTF9JTlBVVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfSU5QVVRfT1NDICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfSU5QVVRfVEVTVENMSyAgICAgICAgICAgICAgICAgICAxCisjaWZkZWYgVkFMSURBVElPTl9DSElQCisgICAgI2RlZmluZSBWR0FfUExMMV9DVFJMX09EICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNAorI2Vsc2UKKyAgICAjZGVmaW5lIFZHQV9QTEwxX0NUUkxfUE9EICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisgICAgI2RlZmluZSBWR0FfUExMMV9DVFJMX09EICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2VuZGlmCisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMTo4CisjZGVmaW5lIFZHQV9QTEwxX0NUUkxfTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBTQ1JBVENIX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNmMKKworI2lmbmRlZiBWQUxJREFUSU9OX0NISVAKKworI2RlZmluZSBNWENMS19QTExfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNzAKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfQllQQVNTICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX0JZUEFTU19PRkYgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX0JZUEFTU19PTiAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX1BPV0VSICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBNWENMS19QTExfQ1RSTF9QT1dFUl9PRkYgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBNWENMS19QTExfQ1RSTF9QT1dFUl9PTiAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBNWENMS19QTExfQ1RSTF9JTlBVVCAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfSU5QVVRfT1NDICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfSU5QVVRfVEVTVENMSyAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgTVhDTEtfUExMX0NUUkxfUE9EICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE0CisjZGVmaW5lIE1YQ0xLX1BMTF9DVFJMX09EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzoxMgorI2RlZmluZSBNWENMS19QTExfQ1RSTF9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6OAorI2RlZmluZSBNWENMS19QTExfQ1RSTF9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgVkdBX0NPTkZJR1VSQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDg4CisjZGVmaW5lIFZHQV9DT05GSUdVUkFUSU9OX1VTRVJfREVGSU5FICAgICAgICAgICAgICAgICA1OjQKKyNkZWZpbmUgVkdBX0NPTkZJR1VSQVRJT05fUExMICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9QTExfVkdBICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9QTExfUEFORUwgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWR0FfQ09ORklHVVJBVElPTl9NT0RFICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIFZHQV9DT05GSUdVUkFUSU9OX01PREVfVEVYVCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZHQV9DT05GSUdVUkFUSU9OX01PREVfR1JBUEhJQyAgICAgICAgICAgICAgICAxCisKKyNlbmRpZgorCisjZGVmaW5lIEdQSU9fREFUQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDAwCisjZGVmaW5lIEdQSU9fREFUQV8zMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIEdQSU9fREFUQV8zMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMwOjMwCisjZGVmaW5lIEdQSU9fREFUQV8yOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjI5CisjZGVmaW5lIEdQSU9fREFUQV8yOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIEdQSU9fREFUQV8yNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIEdQSU9fREFUQV8yNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIEdQSU9fREFUQV8yNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIEdQSU9fREFUQV8yNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIEdQSU9fREFUQV8yMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjIzCisjZGVmaW5lIEdQSU9fREFUQV8yMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIEdQSU9fREFUQV8yMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxOjIxCisjZGVmaW5lIEdQSU9fREFUQV8yMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwOjIwCisjZGVmaW5lIEdQSU9fREFUQV8xOSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE5OjE5CisjZGVmaW5lIEdQSU9fREFUQV8xOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIEdQSU9fREFUQV8xNyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE3CisjZGVmaW5lIEdQSU9fREFUQV8xNiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIEdQSU9fREFUQV8xNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIEdQSU9fREFUQV8xNCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE0OjE0CisjZGVmaW5lIEdQSU9fREFUQV8xMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIEdQSU9fREFUQV8xMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjEyCisjZGVmaW5lIEdQSU9fREFUQV8xMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIEdQSU9fREFUQV8xMCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIEdQSU9fREFUQV85ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBHUElPX0RBVEFfOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgR1BJT19EQVRBXzcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIEdQSU9fREFUQV82ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBHUElPX0RBVEFfNSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgR1BJT19EQVRBXzQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIEdQSU9fREFUQV8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBHUElPX0RBVEFfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgR1BJT19EQVRBXzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIEdQSU9fREFUQV8wICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDA0CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMzEgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMzFfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8zMV9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMwICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMwX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMzBfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yOSAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yOV9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI5X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjggICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjhfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yOF9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI3ICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI3X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjdfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNiAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNl9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI2X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjUgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjVfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yNV9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI0ICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzI0X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjRfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMyAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yM19JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIzX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjIgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjJfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMl9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIxICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIxX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMjFfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMCAgICAgICAgICAgICAgICAgICAgICAgICAgMjA6MjAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8yMF9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzIwX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTkgICAgICAgICAgICAgICAgICAgICAgICAgIDE5OjE5CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTlfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xOV9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE4ICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE4X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMThfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNyAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xN19JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE3X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTYgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTZfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNl9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE1ICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE1X0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTVfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNCAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xNF9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzE0X09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTMgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTNfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xM19PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEyICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzEyX0lOUFVUICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTJfT1VUUFVUICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMSAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMV9JTlBVVCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzExX09VVFBVVCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMTBfSU5QVVQgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xMF9PVVRQVVQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzkgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl85X0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzlfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fOCAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzhfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fOF9PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl83ICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fN19JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl83X09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzYgICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl82X0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzZfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNSAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzVfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNV9PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl80ICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fNF9JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl80X09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzMgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8zX0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzNfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMiAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzJfSU5QVVQgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMl9PVVRQVVQgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMxCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fMV9JTlBVVCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8xX09VVFBVVCAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl8wX0lOUFVUICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OXzBfT1VUUFVUICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwMDgKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8zMSAgICAgICAgICAgICAgICAgMjI6MjIKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfVFJJR0dFUl8zMV9FREdFICAgICAgICAg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gICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU0VUVVBfRU5BQkxFXzI2X0dQSU8gICAgICAgICAgICAgMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TRVRVUF9FTkFCTEVfMjZfSU5URVJSVVBUICAgICAgICAxCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX0VOQUJMRV8yNSAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TRVRVUF9FTkFCTEVfMjVfR1BJTyAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NFVFVQX0VOQUJMRV8yNV9JTlRFUlJVUFQgICAgICAgIDEKKworI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDAwQworI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMzEgICAgICAgICAgICAgICAgICAgICAgICAyMjoyMgorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMzFfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18zMV9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzMxX1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMzAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMzBfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18zMF9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzMwX1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjkgICAgICAgICAgICAgICAgICAgICAgICAyMDoyMAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjlfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yOV9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI5X1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjggICAgICAgICAgICAgICAgICAgICAgICAxOToxOQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjhfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yOF9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI4X1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjcgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjdfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yN19BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI3X1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjYgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjZfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yNl9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI2X1JFU0VUICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjUgICAgICAgICAgICAgICAgICAgICAgICAxNjoxNgorI2RlZmluZSBHUElPX0lOVEVSUlVQVF9TVEFUVVNfMjVfSU5BQ1RJVkUgICAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fSU5URVJSVVBUX1NUQVRVU18yNV9BQ1RJVkUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19JTlRFUlJVUFRfU1RBVFVTXzI1X1JFU0VUICAgICAgICAgICAgICAgICAgMQorCisKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDAwCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9SRVNFUlZFRF8xX01BU0sgICAgICAgICAgICAzMTozMAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfUkVTRVJWRURfMV9NQVNLX0RJU0FCTEUgICAgMAorI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfUkVTRVJWRURfMV9NQVNLX0VOQUJMRSAgICAgMworI2RlZmluZSBQQU5FTF9ESVNQTEFZX0NUUkxfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgMjk6MjgKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1NFTEVDVF9QQU5FTCAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1NFTEVDVF9WR0EgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfRElTUExBWV9DVFJMX1NFTEVDVF9DUlQgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgUEFORUxfRElTUExBWV9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gICAgMTowCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9GT1JNQVRfOCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMTYgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMzIgICAgICAgICAgICAgICAgICAyCisKKyNkZWZpbmUgUEFORUxfUEFOX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDA0CisjZGVmaW5lIFBBTkVMX1BBTl9DVFJMX1ZFUlRJQ0FMX1BBTiAgICAgICAgICAgICAgICAgICAzMToyNAorI2RlZmluZSBQQU5FTF9QQU5fQ1RSTF9WRVJUSUNBTF9WU1lOQyAgICAgICAgICAgICAgICAgMjE6MTYKKyNkZWZpbmUgUEFORUxfUEFOX0NUUkxfSE9SSVpPTlRBTF9QQU4gICAgICAgICAgICAgICAgIDE1OjgKKyNkZWZpbmUgUEFORUxfUEFOX0NUUkxfSE9SSVpPTlRBTF9WU1lOQyAgICAgICAgICAgICAgIDU6MAorCisjZGVmaW5lIFBBTkVMX0NPTE9SX0tFWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAwOAorI2RlZmluZSBQQU5FTF9DT0xPUl9LRVlfTUFTSyAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgUEFORUxfQ09MT1JfS0VZX1ZBTFVFICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMEMKKyNkZWZpbmUgUEFORUxfRkJfQUREUkVTU19TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFBBTkVMX0ZCX0FERFJFU1NfU1RBVFVTX0NVUlJFTlQgICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0ZCX0FERFJFU1NfU1RBVFVTX1BFTkRJTkcgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0ZCX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9GQl9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFBBTkVMX0ZCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAxMAorI2RlZmluZSBQQU5FTF9GQl9XSURUSF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgUEFORUxfRkJfV0lEVEhfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjAKKworI2RlZmluZSBQQU5FTF9XSU5ET1dfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMTQKKyNkZWZpbmUgUEFORUxfV0lORE9XX1dJRFRIX1dJRFRIICAgICAgICAgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIFBBTkVMX1dJTkRPV19XSURUSF9YICAgICAgICAgICAgICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgUEFORUxfV0lORE9XX0hFSUdIVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDE4CisjZGVmaW5lIFBBTkVMX1dJTkRPV19IRUlHSFRfSEVJR0hUICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBQQU5FTF9XSU5ET1dfSEVJR0hUX1kgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIFBBTkVMX1BMQU5FX1RMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAxQworI2RlZmluZSBQQU5FTF9QTEFORV9UTF9UT1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgUEFORUxfUExBTkVfVExfTEVGVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBQQU5FTF9QTEFORV9CUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMjAKKyNkZWZpbmUgUEFORUxfUExBTkVfQlJfQk9UVE9NICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFBBTkVMX1BMQU5FX0JSX1JJR0hUICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgUEFORUxfSE9SSVpPTlRBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDI0CisjZGVmaW5lIFBBTkVMX0hPUklaT05UQUxfVE9UQUxfVE9UQUwgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBQQU5FTF9IT1JJWk9OVEFMX1RPVEFMX0RJU1BMQVlfRU5EICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIFBBTkVMX0hPUklaT05UQUxfU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAyOAorI2RlZmluZSBQQU5FTF9IT1JJWk9OVEFMX1NZTkNfV0lEVEggICAgICAgICAgICAgICAgICAgMjM6MTYKKyNkZWZpbmUgUEFORUxfSE9SSVpPTlRBTF9TWU5DX1NUQVJUICAgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBQQU5FTF9WRVJUSUNBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwMkMKKyNkZWZpbmUgUEFORUxfVkVSVElDQUxfVE9UQUxfVE9UQUwgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFBBTkVMX1ZFUlRJQ0FMX1RPVEFMX0RJU1BMQVlfRU5EICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgUEFORUxfVkVSVElDQUxfU1lOQyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDMwCisjZGVmaW5lIFBBTkVMX1ZFUlRJQ0FMX1NZTkNfSEVJR0hUICAgICAgICAgICAgICAgICAgICAyMToxNgorI2RlZmluZSBQQU5FTF9WRVJUSUNBTF9TWU5DX1NUQVJUICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFBBTkVMX0NVUlJFTlRfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDAzNAorI2RlZmluZSBQQU5FTF9DVVJSRU5UX0xJTkVfTElORSAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisvKiBWaWRlbyBDb250cm9sICovCisKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0xJTkVfQlVGRkVSICAgICAgICAgICAgICAgICAgMTg6MTgKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0xJTkVfQlVGRkVSX0RJU0FCTEUgICAgICAgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfTElORV9CVUZGRVJfRU5BQkxFICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GSUZPICAgICAgICAgICAgICAgICAgICAgICAgIDE3OjE2CisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GSUZPXzEgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0ZJRk9fMyAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRklGT183ICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GSUZPXzExICAgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0JVRkZFUiAgICAgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0JVRkZFUl8wICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfQlVGRkVSXzEgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9DQVBUVVJFICAgICAgICAgICAgICAgICAgICAgIDE0OjE0CisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9DQVBUVVJFX0RJU0FCTEUgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0NBUFRVUkVfRU5BQkxFICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRE9VQkxFX0JVRkZFUiAgICAgICAgICAgICAgICAxMzoxMworI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRE9VQkxFX0JVRkZFUl9ESVNBQkxFICAgICAgICAwCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9ET1VCTEVfQlVGRkVSX0VOQUJMRSAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0JZVEVfU1dBUCAgICAgICAgICAgICAgICAgICAgMTI6MTIKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0JZVEVfU1dBUF9ESVNBQkxFICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfQllURV9TV0FQX0VOQUJMRSAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9WRVJUSUNBTF9TQ0FMRSAgICAgICAgICAgICAgIDExOjExCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9WRV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NTUFfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9QTEFORSAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfUExBTkVfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9QTEFORV9FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0ZPUk1BVCAgICAgICAgICAgICAgICAgICAgICAgMTowCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GT1JNQVRfOCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRElTUExBWV9DVFJMX0ZPUk1BVF8xNiAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19ESVNQTEFZX0NUUkxfRk9STUFUXzMyICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFZJREVPX0RJU1BMQVlfQ1RSTF9GT1JNQVRfWVVWICAgICAgICAgICAgICAgICAgIDMKKworI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNDQKKyNkZWZpbmUgVklERU9fRkJfMF9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFZJREVPX0ZCXzBfQUREUkVTU19TVEFUVVNfQ1VSUkVOVCAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0ZCXzBfQUREUkVTU19TVEFUVVNfUEVORElORyAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0ZCXzBfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19GQl8wX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFZJREVPX0ZCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA0OAorI2RlZmluZSBWSURFT19GQl9XSURUSF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgVklERU9fRkJfV0lEVEhfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjAKKworI2RlZmluZSBWSURFT19GQl8wX0xBU1RfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNEMKKyNkZWZpbmUgVklERU9fRkJfMF9MQVNUX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFZJREVPX0ZCXzBfTEFTVF9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0ZCXzBfTEFTVF9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0ZCXzBfTEFTVF9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgVklERU9fUExBTkVfVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDUwCisjZGVmaW5lIFZJREVPX1BMQU5FX1RMX1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBWSURFT19QTEFORV9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFZJREVPX1BMQU5FX0JSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA1NAorI2RlZmluZSBWSURFT19QTEFORV9CUl9CT1RUT00gICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgVklERU9fUExBTkVfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBWSURFT19TQ0FMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNTgKKyNkZWZpbmUgVklERU9fU0NBTEVfVkVSVElDQUxfTU9ERSAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFZJREVPX1NDQUxFX1ZFUlRJQ0FMX01PREVfRVhQQU5EICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX1NDQUxFX1ZFUlRJQ0FMX01PREVfU0hSSU5LICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX1NDQUxFX1ZFUlRJQ0FMX1NDQUxFICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBWSURFT19TQ0FMRV9IT1JJWk9OVEFMX01PREUgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgVklERU9fU0NBTEVfSE9SSVpPTlRBTF9NT0RFX0VYUEFORCAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fU0NBTEVfSE9SSVpPTlRBTF9NT0RFX1NIUklOSyAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fU0NBTEVfSE9SSVpPTlRBTF9TQ0FMRSAgICAgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBWSURFT19JTklUSUFMX1NDQUxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwNUMKKyNkZWZpbmUgVklERU9fSU5JVElBTF9TQ0FMRV9GQl8xICAgICAgICAgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIFZJREVPX0lOSVRJQUxfU0NBTEVfRkJfMCAgICAgICAgICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgVklERU9fWVVWX0NPTlNUQU5UUyAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDYwCisjZGVmaW5lIFZJREVPX1lVVl9DT05TVEFOVFNfWSAgICAgICAgICAgICAgICAgICAgICAgICAzMToyNAorI2RlZmluZSBWSURFT19ZVVZfQ09OU1RBTlRTX1IgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MTYKKyNkZWZpbmUgVklERU9fWVVWX0NPTlNUQU5UU19HICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjgKKyNkZWZpbmUgVklERU9fWVVWX0NPTlNUQU5UU19CICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA2NAorI2RlZmluZSBWSURFT19GQl8xX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgVklERU9fRkJfMV9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fRkJfMV9BRERSRVNTX1NUQVRVU19QRU5ESU5HICAgICAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fRkJfMV9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0ZCXzFfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgVklERU9fRkJfMV9MQVNUX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDY4CisjZGVmaW5lIFZJREVPX0ZCXzFfTEFTVF9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBWSURFT19GQl8xX0xBU1RfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19GQl8xX0xBU1RfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgMQorI2RlZmluZSBWSURFT19GQl8xX0xBU1RfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgMjU6MAorCisvKiBWaWRlbyBBbHBoYSBDb250cm9sICovCisKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwODAKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVCAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVF9QRVJfUElYRUwgICAgICAgMAorI2RlZmluZSBWSURFT19BTFBIQV9ESVNQTEFZX0NUUkxfU0VMRUNUX0FMUEhBICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9BTFBIQSAgICAgICAgICAgICAgICAgIDI3OjI0CisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9GSUZPICAgICAgICAgICAgICAgICAgIDE3OjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9GSUZPXzEgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX0ZJRk9fMyAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19BTFBIQV9ESVNQTEFZX0NUUkxfRklGT183ICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9GSUZPXzExICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX1ZFUlRfU0NBTEUgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DV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JU1BMQVlfQ1RSTF9DSFJPTUFfS0VZX0VOQUJMRSAgICAgIDEKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX1BMQU5FICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9QTEFORV9ESVNBQkxFICAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX1BMQU5FX0VOQUJMRSAgICAgICAgICAgMQorI2RlZmluZSBWSURFT19BTFBIQV9ESVNQTEFZX0NUUkxfRk9STUFUICAgICAgICAgICAgICAgICAxOjAKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX0ZPUk1BVF84ICAgICAgICAgICAgICAgMAorI2RlZmluZSBWSURFT19BTFBIQV9ESVNQTEFZX0NUUkxfRk9STUFUXzE2ICAgICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0FMUEhBX0RJU1BMQVlfQ1RSTF9GT1JNQVRfQUxQSEFfNF80ICAgICAgIDIKKyNkZWZpbmUgVklERU9fQUxQSEFfRElTUExBWV9DVFJMX0ZPUk1BVF9BTFBIQV80XzRfNF80ICAgMworCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA4NAorI2RlZmluZSBWSURFT19BTFBIQV9GQl9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfQUREUkVTU19TVEFUVVNfQ1VSUkVOVCAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfQUREUkVTU19TVEFUVVNfUEVORElORyAgICAgICAgIDEKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAwCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfRVhUX0VYVEVSTkFMICAgICAgICAgICAxCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDg4CisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX1dJRFRIX1dJRFRIICAgICAgICAgICAgICAgICAgICAyOToxNgorI2RlZmluZSBWSURFT19BTFBIQV9GQl9XSURUSF9PRkZTRVQgICAgICAgICAgICAgICAgICAgMTM6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0ZCX0xBU1RfQUREUkVTUyAgICAgICAgICAgICAgICAgICAweDA4MDA4QworI2RlZmluZSBWSURFT19BTFBIQV9GQl9MQVNUX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfTEFTVF9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfTEFTVF9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgIDEKKyNkZWZpbmUgVklERU9fQUxQSEFfRkJfTEFTVF9BRERSRVNTX0FERFJFU1MgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9QTEFORV9UTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwOTAKKyNkZWZpbmUgVklERU9fQUxQSEFfUExBTkVfVExfVE9QICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX1BMQU5FX1RMX0xFRlQgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfUExBTkVfQlIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMDk0CisjZGVmaW5lIFZJREVPX0FMUEhBX1BMQU5FX0JSX0JPVFRPTSAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBWSURFT19BTFBIQV9QTEFORV9CUl9SSUdIVCAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX1NDQUxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDA5OAorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9WRVJUSUNBTF9NT0RFICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfVkVSVElDQUxfTU9ERV9FWFBBTkQgICAgICAgIDAKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfVkVSVElDQUxfTU9ERV9TSFJJTksgICAgICAgIDEKKyNkZWZpbmUgVklERU9fQUxQSEFfU0NBTEVfVkVSVElDQUxfU0NBTEUgICAgICAgICAgICAgIDI3OjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX1NDQUxFX0hPUklaT05UQUxfTU9ERSAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9IT1JJWk9OVEFMX01PREVfRVhQQU5EICAgICAgMAorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9IT1JJWk9OVEFMX01PREVfU0hSSU5LICAgICAgMQorI2RlZmluZSBWSURFT19BTFBIQV9TQ0FMRV9IT1JJWk9OVEFMX1NDQUxFICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0lOSVRJQUxfU0NBTEUgICAgICAgICAgICAgICAgICAgICAweDA4MDA5QworI2RlZmluZSBWSURFT19BTFBIQV9JTklUSUFMX1NDQUxFX1ZFUlRJQ0FMICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfSU5JVElBTF9TQ0FMRV9IT1JJWk9OVEFMICAgICAgICAgIDExOjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DSFJPTUFfS0VZICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwQTAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ0hST01BX0tFWV9NQVNLICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NIUk9NQV9LRVlfVkFMVUUgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxICAgICAgICAgICAgICAgICAgIDB4MDgwMEE0CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8wMV8xICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMDFfMV9SRUQgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzFfR1JFRU4gICAgICAgICAgIDI2OjIxCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8wMV8xX0JMVUUgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMDFfMCAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMDFfMF9SRUQgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfR1JFRU4gICAgICAgICAgIDEwOjUKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfQkxVRSAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yMyAgICAgICAgICAgICAgICAgICAweDA4MDBBOAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMjNfMyAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzNfUkVEICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18zX0dSRUVOICAgICAgICAgICAyNjoyMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfMjNfM19CTFVFICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzIgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzJfUkVEICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18yX0dSRUVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF8yM18yX0JMVUUgICAgICAgICAgICA0OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDUgICAgICAgICAgICAgICAgICAgMHgwODAwQUMKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzUgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF80NV81X1JFRCAgICAgICAgICAgICAzMToyNworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNV9HUkVFTiAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzVfQkxVRSAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF80NV80ICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF80NV80X1JFRCAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9HUkVFTiAgICAgICAgICAgMTA6NQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9CTFVFICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3ICAgICAgICAgICAgICAgICAgIDB4MDgwMEIwCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF82N183ICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNjdfN19SRUQgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzdfR1JFRU4gICAgICAgICAgIDI2OjIxCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF82N183X0JMVUUgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNjdfNiAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfNjdfNl9SRUQgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfR1JFRU4gICAgICAgICAgIDEwOjUKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfQkxVRSAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OSAgICAgICAgICAgICAgICAgICAweDA4MDBCNAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfODlfOSAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzlfUkVEICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV85X0dSRUVOICAgICAgICAgICAyNjoyMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfODlfOV9CTFVFICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzggICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzhfUkVEICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV84X0dSRUVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF84OV84X0JMVUUgICAgICAgICAgICA0OjAKKworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUIgICAgICAgICAgICAgICAgICAgMHgwODAwQjgKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0IgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9BQl9CX1JFRCAgICAgICAgICAgICAzMToyNworI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUJfQl9HUkVFTiAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0JfQkxVRSAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9BQl9BICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9BQl9BX1JFRCAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9HUkVFTiAgICAgICAgICAgMTA6NQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9CTFVFICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0NEICAgICAgICAgICAgICAgICAgIDB4MDgwMEJDCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9DRF9EICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQ0RfRF9SRUQgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0RfR1JFRU4gICAgICAgICAgIDI2OjIxCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9DRF9EX0JMVUUgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQ0RfQyAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfQ0RfQ19SRUQgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0NfR1JFRU4gICAgICAgICAgIDEwOjUKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0NfQkxVRSAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRiAgICAgICAgICAgICAgICAgICAweDA4MDBDMAorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfRUZfRiAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0ZfUkVEICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9GX0dSRUVOICAgICAgICAgICAyNjoyMQorI2RlZmluZSBWSURFT19BTFBIQV9DT0xPUl9MT09LVVBfRUZfRl9CTFVFICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0UgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgVklERU9fQUxQSEFfQ09MT1JfTE9PS1VQX0VGX0VfUkVEICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9FX0dSRUVOICAgICAgICAgICAxMDo1CisjZGVmaW5lIFZJREVPX0FMUEhBX0NPTE9SX0xPT0tVUF9FRl9FX0JMVUUgICAgICAgICAgICA0OjAKKworLyogUGFuZWwgQ3Vyc29yIENvbnRyb2wgKi8KKworI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRjAKKyNkZWZpbmUgUEFORUxfSFdDX0FERFJFU1NfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIFBBTkVMX0hXQ19BRERSRVNTX0VOQUJMRV9ESVNBQkxFICAgICAgICAgICAgICAwCisjZGVmaW5lIFBBTkVMX0hXQ19BRERSRVNTX0VOQUJMRV9FTkFCTEUgICAgICAgICAgICAgICAxCisjZGVmaW5lIFBBTkVMX0hXQ19BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9IV0NfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFBBTkVMX0hXQ19MT0NBVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDBGNAorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fVE9QICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX1RPUF9JTlNJREUgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX1RPUF9PVVRTSURFICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgUEFORUxfSFdDX0xPQ0FUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFBBTkVMX0hXQ19MT0NBVElPTl9MRUZUICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fTEVGVF9JTlNJREUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fTEVGVF9PVVRTSURFICAgICAgICAgICAgICAgMQorI2RlZmluZSBQQU5FTF9IV0NfTE9DQVRJT05fWCAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8xMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDBGOAorI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMTJfMl9SR0I1NjUgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzEyXzFfUkdCNTY1ICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRkMKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzNfUkdCNTY1ICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworLyogT2xkIERlZmluaXRpb25zICsrKyAqLworI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMDEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRjgKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzAxXzFfUkVEICAgICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8wMV8xX0dSRUVOICAgICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMDFfMV9CTFVFICAgICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzAxXzBfUkVEICAgICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8wMV8wX0dSRUVOICAgICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8wMV8wX0JMVUUgICAgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBQQU5FTF9IV0NfQ09MT1JfMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwRkMKKyNkZWZpbmUgUEFORUxfSFdDX0NPTE9SXzJfUkVEICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8yX0dSRUVOICAgICAgICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIFBBTkVMX0hXQ19DT0xPUl8yX0JMVUUgICAgICAgICAgICAgICAgICAgICAgICA0OjAKKy8qIE9sZCBEZWZpbml0aW9ucyAtLS0gKi8KKworLyogQWxwaGEgQ29udHJvbCAqLworCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEwMAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfU0VMRUNUICAgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVF9QRVJfUElYRUwgICAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1NFTEVDVF9BTFBIQSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0FMUEhBICAgICAgICAgICAgICAgICAgICAgIDI3OjI0CisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9GSUZPICAgICAgICAgICAgICAgICAgICAgICAxNzoxNgorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGT18xICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGT18zICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGT183ICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRklGT18xMSAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfUElYRUwgICAgICAgICAgICAgICAgICAgICAgNzo0CisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9DSFJPTUFfS0VZICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0NIUk9NQV9LRVlfRElTQUJMRSAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX0NIUk9NQV9LRVlfRU5BQkxFICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRElTUExBWV9DVFJMX1BMQU5FICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfUExBTkVfRElTQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfUExBTkVfRU5BQkxFICAgICAgICAgICAgICAgMQorI2RlZmluZSBBTFBIQV9ESVNQTEFZX0NUUkxfRk9STUFUICAgICAgICAgICAgICAgICAgICAgMTowCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9GT1JNQVRfMTYgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9GT1JNQVRfQUxQSEFfNF80ICAgICAgICAgICAyCisjZGVmaW5lIEFMUEhBX0RJU1BMQVlfQ1RSTF9GT1JNQVRfQUxQSEFfNF80XzRfNCAgICAgICAzCisKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTA0CisjZGVmaW5lIEFMUEhBX0ZCX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBBTFBIQV9GQl9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgICAgICAgMAorI2RlZmluZSBBTFBIQV9GQl9BRERSRVNTX1NUQVRVU19QRU5ESU5HICAgICAgICAgICAgICAgMQorI2RlZmluZSBBTFBIQV9GQl9BRERSRVNTX0VYVCAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQUxQSEFfRkJfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBBTFBIQV9GQl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMDgKKyNkZWZpbmUgQUxQSEFfRkJfV0lEVEhfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDI5OjE2CisjZGVmaW5lIEFMUEhBX0ZCX1dJRFRIX09GRlNFVCAgICAgICAgICAgICAgICAgICAgICAgICAxMzowCisKKyNkZWZpbmUgQUxQSEFfUExBTkVfVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTBDCisjZGVmaW5lIEFMUEhBX1BMQU5FX1RMX1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBBTFBIQV9QTEFORV9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIEFMUEhBX1BMQU5FX0JSICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDExMAorI2RlZmluZSBBTFBIQV9QTEFORV9CUl9CT1RUT00gICAgICAgICAgICAgICAgICAgICAgICAgMjY6MTYKKyNkZWZpbmUgQUxQSEFfUExBTkVfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBBTFBIQV9DSFJPTUFfS0VZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMTQKKyNkZWZpbmUgQUxQSEFfQ0hST01BX0tFWV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NIUk9NQV9LRVlfVkFMVUUgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTE4CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8wMV8xICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMDFfMV9SRUQgICAgICAgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzFfR1JFRU4gICAgICAgICAgICAgICAgIDI2OjIxCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8wMV8xX0JMVUUgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMDFfMCAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMDFfMF9SRUQgICAgICAgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfR1JFRU4gICAgICAgICAgICAgICAgIDEwOjUKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzAxXzBfQkxVRSAgICAgICAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yMyAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDExQworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMjNfMyAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzNfUkVEICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18zX0dSRUVOICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfMjNfM19CTFVFICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzIgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzIzXzJfUkVEICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18yX0dSRUVOICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF8yM18yX0JMVUUgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDUgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzUgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF80NV81X1JFRCAgICAgICAgICAgICAgICAgICAzMToyNworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNV9HUkVFTiAgICAgICAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzQ1XzVfQkxVRSAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF80NV80ICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF80NV80X1JFRCAgICAgICAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9HUkVFTiAgICAgICAgICAgICAgICAgMTA6NQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNDVfNF9CTFVFICAgICAgICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3ICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTI0CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF82N183ICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNjdfN19SRUQgICAgICAgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzdfR1JFRU4gICAgICAgICAgICAgICAgIDI2OjIxCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF82N183X0JMVUUgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNjdfNiAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfNjdfNl9SRUQgICAgICAgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfR1JFRU4gICAgICAgICAgICAgICAgIDEwOjUKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzY3XzZfQkxVRSAgICAgICAgICAgICAgICAgIDQ6MAorCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OSAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDEyOAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfODlfOSAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzlfUkVEICAgICAgICAgICAgICAgICAgIDMxOjI3CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV85X0dSRUVOICAgICAgICAgICAgICAgICAyNjoyMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfODlfOV9CTFVFICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzggICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQXzg5XzhfUkVEICAgICAgICAgICAgICAgICAgIDE1OjExCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV84X0dSRUVOICAgICAgICAgICAgICAgICAxMDo1CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF84OV84X0JMVUUgICAgICAgICAgICAgICAgICA0OjAKKworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUIgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAxMkMKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0IgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9BQl9CX1JFRCAgICAgICAgICAgICAgICAgICAzMToyNworI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQl9HUkVFTiAgICAgICAgICAgICAgICAgMjY6MjEKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0FCX0JfQkxVRSAgICAgICAgICAgICAgICAgIDIwOjE2CisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9BQl9BICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9BQl9BX1JFRCAgICAgICAgICAgICAgICAgICAxNToxMQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9HUkVFTiAgICAgICAgICAgICAgICAgMTA6NQorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQUJfQV9CTFVFICAgICAgICAgICAgICAgICAgNDowCisKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMTMwCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9DRF9EICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQ0RfRF9SRUQgICAgICAgICAgICAgICAgICAgMzE6MjcKKyNkZWZpbmUgQUxQSEFfQ09MT1JfTE9PS1VQX0NEX0RfR1JFRU4gICAgICAgICAgICAgICAgIDI2OjIxCisjZGVmaW5lIEFMUEhBX0NPTE9SX0xPT0tVUF9DRF9EX0JMVUUgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQ0RfQyAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2RlZmluZSBBTFBIQV9DT0xPUl9MT09LVVBfQ0RfQ19SRUQgICAgICAgICAgICAgICAgICAgMTU6MTEKKyNkZWZpbmUgQ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UlZFRF8xX01BU0tfRElTQUJMRSAgCQkJICAwCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfUkVTRVJWRURfMV9NQVNLX0VOQUJMRSAJCQkgIDB4MUYKKworLyogU003NTBMRSBkZWZpbml0aW9uICovCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfRFBNUyAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0RQTVNfMCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0RQTVNfMSAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0RQTVNfMiAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0RQTVNfMyAgICAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0NMSyAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MjcKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9DTEtfUExMMjUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9DTEtfUExMNDEgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9DTEtfUExMNjIgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9DTEtfUExMNjUgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9DTEtfUExMNzQgICAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9DTEtfUExMODAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9DTEtfUExMMTA4ICAgICAgICAgICA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wCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfQkxBTktfT0ZGICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfQkxBTktfT04gICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfVElNSU5HICAgICAgICAgICAgICAgICAgICAgICA4OjgKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9USU1JTkdfRElTQUJMRSAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9USU1JTkdfRU5BQkxFICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9QSVhFTCAgICAgICAgICAgICAgICAgICAgICAgIDc6NAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0dBTU1BICAgICAgICAgICAgICAgICAgICAgICAgMzozCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfR0FNTUFfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfR0FNTUFfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9ESVNQTEFZX0NUUkxfUExBTkUgICAgICAgICAgICAgICAgICAgICAgICAyOjIKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9QTEFORV9ESVNBQkxFICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9QTEFORV9FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0RJU1BMQVlfQ1RSTF9GT1JNQVQgICAgICAgICAgICAgICAgICAgICAgIDE6MAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0ZPUk1BVF84ICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0ZPUk1BVF8xNiAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX0ZPUk1BVF8zMiAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDUlRfRElTUExBWV9DVFJMX1JFU0VSVkVEX0JJVFNfTUFTSyAgICAgICAgICAgMHhGRjAwMDIwMAorCisjZGVmaW5lIENSVF9GQl9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIwNAorI2RlZmluZSBDUlRfRkJfQUREUkVTU19TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgQ1JUX0ZCX0FERFJFU1NfU1RBVFVTX0NVUlJFTlQgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0ZCX0FERFJFU1NfU1RBVFVTX1BFTkRJTkcgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0ZCX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENSVF9GQl9BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9GQl9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9GQl9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQ1JUX0ZCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjA4CisjZGVmaW5lIENSVF9GQl9XSURUSF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToxNgorI2RlZmluZSBDUlRfRkJfV0lEVEhfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MAorCisjZGVmaW5lIENSVF9IT1JJWk9OVEFMX1RPVEFMICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIwQworI2RlZmluZSBDUlRfSE9SSVpPTlRBTF9UT1RBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgQ1JUX0hPUklaT05UQUxfVE9UQUxfRElTUExBWV9FTkQgICAgICAgICAgICAgIDExOjAKKworI2RlZmluZSBDUlRfSE9SSVpPTlRBTF9TWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMTAKKyNkZWZpbmUgQ1JUX0hPUklaT05UQUxfU1lOQ19XSURUSCAgICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIENSVF9IT1JJWk9OVEFMX1NZTkNfU1RBUlQgICAgICAgICAgICAgICAgICAgICAxMTowCisKKyNkZWZpbmUgQ1JUX1ZFUlRJQ0FMX1RPVEFMICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjE0CisjZGVmaW5lIENSVF9WRVJUSUNBTF9UT1RBTF9UT1RBTCAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBDUlRfVkVSVElDQUxfVE9UQUxfRElTUExBWV9FTkQgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIENSVF9WRVJUSUNBTF9TWU5DICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA4MDIxOAorI2RlZmluZSBDUlRfVkVSVElDQUxfU1lOQ19IRUlHSFQgICAgICAgICAgICAgICAgICAgICAgMjE6MTYKKyNkZWZpbmUgQ1JUX1ZFUlRJQ0FMX1NZTkNfU1RBUlQgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBDUlRfU0lHTkFUVVJFX0FOQUxZWkVSICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMUMKKyNkZWZpbmUgQ1JUX1NJR05BVFVSRV9BTkFMWVpFUl9TVEFUVVMgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENSVF9TSUdOQVRVUkVfQU5BTFlaRVJfRU5BQkxFICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgQ1JUX1NJR05BVFVSRV9BTkFMWVpFUl9FTkFCTEVfRElTQUJMRSAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX1NJR05BVFVSRV9BTkFMWVpFUl9FTkFCTEVfRU5BQkxFICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX1NJR05BVFVSRV9BTkFMWVpFUl9SRVNFVCAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBDUlRfU0lHTkFUVVJFX0FOQUxZWkVSX1JFU0VUX05PUk1BTCAgICAgICAgICAgMAorI2RlZmluZSBDUlRfU0lHTkFUVVJFX0FOQUxZWkVSX1JFU0VUX1JFU0VUICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfU0lHTkFUVVJFX0FOQUxZWkVSX1NPVVJDRSAgICAgICAgICAgICAgICAgMTowCisjZGVmaW5lIENSVF9TSUdOQVRVUkVfQU5BTFlaRVJfU09VUkNFX1JFRCAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9TSUdOQVRVUkVfQU5BTFlaRVJfU09VUkNFX0dSRUVOICAgICAgICAgICAxCisjZGVmaW5lIENSVF9TSUdOQVRVUkVfQU5BTFlaRVJfU09VUkNFX0JMVUUgICAgICAgICAgICAyCisKKyNkZWZpbmUgQ1JUX0NVUlJFTlRfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjIwCisjZGVmaW5lIENSVF9DVVJSRU5UX0xJTkVfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjI0CisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAyNToyNQorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfVkFMVUVfRElTQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfVkFMVUVfRU5BQkxFICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfTU9OSVRPUl9ERVRFQ1RfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMjQ6MjQKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX0VOQUJMRV9ESVNBQkxFICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX0VOQUJMRV9FTkFCTEUgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX01PTklUT1JfREVURUNUX1JFRCAgICAgICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9HUkVFTiAgICAgICAgICAgICAgICAgICAgICAxNTo4CisjZGVmaW5lIENSVF9NT05JVE9SX0RFVEVDVF9CTFVFICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBDUlRfU0NBTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMjgKKyNkZWZpbmUgQ1JUX1NDQUxFX1ZFUlRJQ0FMX01PREUgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIENSVF9TQ0FMRV9WRVJUSUNBTF9NT0RFX0VYUEFORCAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9TQ0FMRV9WRVJUSUNBTF9NT0RFX1NIUklOSyAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9TQ0FMRV9WRVJUSUNBTF9TQ0FMRSAgICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBDUlRfU0NBTEVfSE9SSVpPTlRBTF9NT0RFICAgICAgICAgICAgICAgICAgICAgMTU6MTUKKyNkZWZpbmUgQ1JUX1NDQUxFX0hPUklaT05UQUxfTU9ERV9FWFBBTkQgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX1NDQUxFX0hPUklaT05UQUxfTU9ERV9TSFJJTksgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX1NDQUxFX0hPUklaT05UQUxfU0NBTEUgICAgICAgICAgICAgICAgICAgIDExOjAKKworLyogQ1JUIEN1cnNvciBDb250cm9sICovCisKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjMwCisjZGVmaW5lIENSVF9IV0NfQUREUkVTU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBDUlRfSFdDX0FERFJFU1NfRU5BQkxFX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDUlRfSFdDX0FERFJFU1NfRU5BQkxFX0VOQUJMRSAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDUlRfSFdDX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0hXQ19BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBDUlRfSFdDX0xPQ0FUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMzQKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9UT1AgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fVE9QX0lOU0lERSAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fVE9QX09VVFNJREUgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENSVF9IV0NfTE9DQVRJT05fWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBDUlRfSFdDX0xPQ0FUSU9OX0xFRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9MRUZUX0lOU0lERSAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9MRUZUX09VVFNJREUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1JUX0hXQ19MT0NBVElPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBDUlRfSFdDX0NPTE9SXzEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMzgKKyNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8xMl8yX1JHQjU2NSAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENSVF9IV0NfQ09MT1JfMTJfMV9SR0I1NjUgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8zICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMjNDCisjZGVmaW5lIENSVF9IV0NfQ09MT1JfM19SR0I1NjUgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKy8qIE9sZCBEZWZpbml0aW9ucyArKysuIE5lZWQgdG8gYmUgcmVtb3ZlZCBpZiBubyBhcHBsaWNhdGlvbiB1c2UgaXQuICovCisjaWYgMAorICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8wMSAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyMzgKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMDFfMV9SRUQgICAgICAgICAgICAgICAgICAgIDMxOjI3CisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzAxXzFfR1JFRU4gICAgICAgICAgICAgICAgICAyNjoyMQorICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8wMV8xX0JMVUUgICAgICAgICAgICAgICAgICAgMjA6MTYKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMDFfMF9SRUQgICAgICAgICAgICAgICAgICAgIDE1OjExCisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzAxXzBfR1JFRU4gICAgICAgICAgICAgICAgICAxMDo1CisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzAxXzBfQkxVRSAgICAgICAgICAgICAgICAgICA0OjAKKworICAgICNkZWZpbmUgQ1JUX0hXQ19DT0xPUl8yICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAyM0MKKyAgICAjZGVmaW5lIENSVF9IV0NfQ09MT1JfMl9SRUQgICAgICAgICAgICAgICAgICAgICAgIDE1OjExCisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzJfR1JFRU4gICAgICAgICAgICAgICAgICAgICAxMDo1CisgICAgI2RlZmluZSBDUlRfSFdDX0NPTE9SXzJfQkxVRSAgICAgICAgICAgICAgICAgICAgICA0OjAKKyNlbmRpZgorLyogT2xkIERlZmluaXRpb25zIC0tLSAqLworCisvKiBUaGlzIHZlcnRpY2FsIGV4cGFuc2lvbiBiZWxvdyBzdGFydCBhdCAweDA4MDI0MCB+IDB4MDgwMjY0ICovCisjZGVmaW5lIENSVF9WRVJUSUNBTF9FWFBBTlNJT04gICAgICAgICAgICAgICAgICAgICAgICAweDA4MDI0MAorI2lmbmRlZiBWQUxJREFUSU9OX0NISVAKKyAgICAjZGVmaW5lIENSVF9WRVJUSUNBTF9DRU5URVJJTkdfVkFMVUUgICAgICAgICAgICAgIDMxOjI0CisjZW5kaWYKKyNkZWZpbmUgQ1JUX1ZFUlRJQ0FMX0VYUEFOU0lPTl9DT01QQVJFX1ZBTFVFICAgICAgICAgIDIzOjE2CisjZGVmaW5lIENSVF9WRVJUSUNBTF9FWFBBTlNJT05fTElORV9CVUZGRVIgICAgICAgICAgICAxNToxMgorI2RlZmluZSBDUlRfVkVSVElDQUxfRVhQQU5TSU9OX1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vbnRyb2wgcGFuZWwgb3V0cHV0ICovCisjZGVmaW5lIERJU1BMQVlfQ09OVFJPTF83NTBMRSAJMHg4MDI4OAorLyogUGFsZXR0ZSBSQU0gKi8KKworLyogUGFuZWwgUGFsbGV0ZSByZWdpc3RlciBzdGFydHMgYXQgMHgwODA0MDAgfiAweDA4MDdGQyAqLworI2RlZmluZSBQQU5FTF9QQUxFVFRFX1JBTSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODA0MDAKKworLyogUGFuZWwgUGFsbGV0ZSByZWdpc3RlciBzdGFydHMgYXQgMHgwODBDMDAgfiAweDA4MEZGQyAqLworI2RlZmluZSBDUlRfUEFMRVRURV9SQU0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODBDMDAKKworLyogMkQgcmVnaXN0ZXJzCisgKiBtb3ZlIHRoZWlyIGRlZmluYXRpb24gaW50byBnZW5lcmFsIGx5bnhfYWNjZWwuaCBmaWxlCisgKiBiZWNhdXNlIGFsbCBzbWkgZ3JhcGhpYyBjaGlwIHNoYXJlIHRoZSBzYW1lIGRyYXdpbmcgZW5naW5lCisgKiByZWdpc3RlciBmb3JtYXQgKi8KKyNpZiAwCisjZGVmaW5lIERFX1NPVVJDRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDAwCisjZGVmaW5lIERFX1NPVVJDRV9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX1NPVVJDRV9XUkFQX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU09VUkNFX1dSQVBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisvKgorICogVGhlIGZvbGxvd2luZyBkZWZpbml0aW9ucyBhcmUgdXNlZCBpbiBkaWZmZXJlbnQgc2V0dGluZworICovCisKKy8qIFVzZSB0aGVzZSBkZWZpbml0aW9ucyBpbiBYWSBhZGRyZXNzaW5nIG1vZGUgb3IgbGluZWFyIGFkZHJlc3NpbmcgbW9kZS4gKi8KKyNkZWZpbmUgREVfU09VUkNFX1hfSzEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgREVfU09VUkNFX1lfSzIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisvKiBVc2UgdGhpcyBkZWZpbml0aW9uIGluIGhvc3Qgd3JpdGUgbW9kZSBmb3IgbW9uby4gVGhlIFlfSzIgaXMgbm90IHVzZWQKKyAgIGluIGhvc3Qgd3JpdGUgbW9kZS4gKi8KKyNkZWZpbmUgREVfU09VUkNFX1hfSzFfTU9OTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjA6MTYKKworLyogVXNlIHRoZXNlIGRlZmluaXRpb25zIGluIEJyZXNlbmhhbSBsaW5lIGRyYXdpbmcgbW9kZS4gKi8KKyNkZWZpbmUgREVfU09VUkNFX1hfSzFfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjk6MTYKKyNkZWZpbmUgREVfU09VUkNFX1lfSzJfTElORSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MAorCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDA0CisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfREVTVElOQVRJT05fV1JBUF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2lmIDEKKyAgICAjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyAgICAjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorI2Vsc2UKKyAgICAjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MTYKKyAgICAjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorI2VuZGlmCisKKyNkZWZpbmUgREVfRElNRU5TSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMDgKKyNkZWZpbmUgREVfRElNRU5TSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MTYKKyNkZWZpbmUgREVfRElNRU5TSU9OX1lfRVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX0NPTlRST0wgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDBDCisjZGVmaW5lIERFX0NPTlRST0xfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX0NPTlRST0xfU1RBVFVTX1NUT1AgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEFUVVNfU1RBUlQgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBERV9DT05UUk9MX1BBVFRFUk5fTU9OTyAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUEFUVEVSTl9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9VUERBVEVfREVTVElOQVRJT05fWCAgICAgICAgICAgICAgICAgMjk6MjkKKyNkZWZpbmUgREVfQ09OVFJPTF9VUERBVEVfREVTVElOQVRJT05fWF9ESVNBQkxFICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1VQREFURV9ERVNUSU5BVElPTl9YX0VOQUJMRSAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfUVVJQ0tfU1RBUlQgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjI4CisjZGVmaW5lIERFX0NPTlRST0xfUVVJQ0tfU1RBUlRfRElTQUJMRSAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9RVUlDS19TVEFSVF9FTkFCTEUgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0RJUkVDVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9DT05UUk9MX0RJUkVDVElPTl9MRUZUX1RPX1JJR0hUICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfRElSRUNUSU9OX1JJR0hUX1RPX0xFRlQgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9NQUpPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfQ09OVFJPTF9NQUpPUl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX01BSk9SX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9YX1BPU0lUSVZFICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1hfTkVHQVRJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWV9QT1NJVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9ZX05FR0FUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVFJFVENIICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgREVfQ09OVFJPTF9TVFJFVENIX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NUUkVUQ0hfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfSE9TVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOjIyCisjZGVmaW5lIERFX0NPTlRST0xfSE9TVF9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9IT1NUX01PTk8gICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0xBU1RfUElYRUwgICAgICAgICAgICAgICAgICAgICAgICAgICAyMToyMQorI2RlZmluZSBERV9DT05UUk9MX0xBU1RfUElYRUxfT0ZGICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfTEFTVF9QSVhFTF9PTiAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjA6MTYKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0JJVEJMVCAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfUkVDVEFOR0xFX0ZJTEwgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9ERV9USUxFICAgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1RSQVBFWk9JRF9GSUxMICAgICAgICAgICAgICAgMworI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfQUxQSEFfQkxFTkQgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9STEVfU1RSSVAgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1NIT1JUX1NUUk9LRSAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfTElORV9EUkFXICAgICAgICAgICAgICAgICAgICA3CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9IT1NUX1dSSVRFICAgICAgICAgICAgICAgICAgIDgKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0hPU1RfUkVBRCAgICAgICAgICAgICAgICAgICAgOQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfSE9TVF9XUklURV9CT1RUT01fVVAgICAgICAgICAxMAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfUk9UQVRFICAgICAgICAgICAgICAgICAgICAgICAxMQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfRk9OVCAgICAgICAgICAgICAgICAgICAgICAgICAxMgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfVEVYVFVSRV9MT0FEICAgICAgICAgICAgICAgICAxNQorI2RlZmluZSBERV9DT05UUk9MX1JPUF9TRUxFQ1QgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBERV9DT05UUk9MX1JPUF9TRUxFQ1RfUk9QMyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUk9QX1NFTEVDVF9ST1AyICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AyX1NPVVJDRSAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AyX1NPVVJDRV9CSVRNQVAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1JPUDJfU09VUkNFX1BBVFRFUk4gICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEyCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBX05PVF9QQUNLRUQgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEFfOF9QQUNLRUQgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX01PTk9fREFUQV8xNl9QQUNLRUQgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBXzMyX1BBQ0tFRCAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgREVfQ09OVFJPTF9SRVBFQVRfUk9UQVRFICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgREVfQ09OVFJPTF9SRVBFQVRfUk9UQVRFX0RJU0FCTEUgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1JFUEVBVF9ST1RBVEVfRU5BQkxFICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX01BVENIICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX01BVENIX09QQVFVRSAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfTUFUQ0hfVFJBTlNQQVJFTlQgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9TRUxFQ1QgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfU0VMRUNUX1NPVVJDRSAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9TRUxFQ1RfREVTVElOQVRJT04gICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9ESVNBQkxFICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX0VOQUJMRSAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKy8qIFBzZXVkbyBmaWVsZHMuICovCisKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSICAgICAgICAgICAgICAgICAgICAgMjc6MjQKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzIyNSAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMTM1ICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8zMTUgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzQ1ICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMjcwICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl85MCAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzE4MCAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMCAgICAgICAgICAgICAgICAgICAxMAorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNToyNAorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT05fMjcwICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1RBVElPTl85MCAgICAgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzE4MCAgICAgICAgICAgICAgICAgICAgICAgICAzCisKKyNkZWZpbmUgREVfUElUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMTAKKyNkZWZpbmUgREVfUElUQ0hfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MTYKKyNkZWZpbmUgREVfUElUQ0hfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI6MAorCisjZGVmaW5lIERFX0ZPUkVHUk9VTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDE0CisjZGVmaW5lIERFX0ZPUkVHUk9VTkRfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAKKworI2RlZmluZSBERV9CQUNLR1JPVU5EICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAxOAorI2RlZmluZSBERV9CQUNLR1JPVU5EX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTowCisKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMUMKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YWSAgICAgICAgICAgICAgICAgICAgMzA6MzAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YWV9OT1JNQUwgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1hZX09WRVJXUklURSAgICAgICAgICAxCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWSAgICAgICAgICAgICAgICAgICAgIDI5OjI3CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWCAgICAgICAgICAgICAgICAgICAgIDI1OjIzCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVCAgICAgICAgICAgICAgICAgIDIxOjIwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVF84ICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUXzE2ICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QSVhFTF9GT1JNQVRfMzIgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkcgICAgICAgICAgICAgICAgICAgIDE5OjE2CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkdfWFkgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfQUREUkVTU0lOR19MSU5FQVIgICAgICAgICAgICAgMTUKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfU09VUkNFX0hFSUdIVCAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIERFX0NPTE9SX0NPTVBBUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDIwCisjZGVmaW5lIERFX0NPTE9SX0NPTVBBUkVfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjAKKworI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAyNAorI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX01BU0tfTUFTS1MgICAgICAgICAgICAgICAgICAgICAyMzowCisKKyNkZWZpbmUgREVfTUFTS1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMjgKKyNkZWZpbmUgREVfTUFTS1NfQllURV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgREVfTUFTS1NfQklUX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX0NMSVBfVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDJDCisjZGVmaW5lIERFX0NMSVBfVExfVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ0xJUF9UTF9TVEFUVVNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVRfT1VUU0lERSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NMSVBfVExfSU5ISUJJVF9JTlNJREUgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ0xJUF9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIERFX0NMSVBfQlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDMwCisjZGVmaW5lIERFX0NMSVBfQlJfQk9UVE9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX0NMSVBfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9NT05PX1BBVFRFUk5fTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDAzNAorI2RlZmluZSBERV9NT05PX1BBVFRFUk5fTE9XX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgICAzMTowCisKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwMzgKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0hJR0hfUEFUVEVSTiAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX1dJTkRPV19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMDNDCisjZGVmaW5lIERFX1dJTkRPV19XSURUSF9ERVNUSU5BVElPTiAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisjZGVmaW5lIERFX1dJTkRPV19XSURUSF9TT1VSQ0UgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0MAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRSAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0NAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFQgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFRfTE9DQUwgICAgICAgICAgICAwCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0VYVF9FWFRFUk5BTCAgICAgICAgIDEKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1MgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1NfMCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9DU18xICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0FERFJFU1MgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBERV9BTFBIQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0OAorI2RlZmluZSBERV9BTFBIQV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBERV9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDA0QworI2RlZmluZSBERV9XUkFQX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERV9XUkFQX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgREVfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwNTAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIERFX1NUQVRVU19DU0NfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQ19OT1RfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFUVVNfQ1NDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1NUQVRVU18yRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBERV9TVEFUVVNfMkRfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRVU18yRF9OT1RfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTXzJEX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2VuZGlmCisvKiBDb2xvciBTcGFjZSBDb252ZXJzaW9uIHJlZ2lzdGVycy4gKi8KKworI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBDOAorI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRV9FWFQgICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRV9FWFRfTE9DQUwgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9CQVNFX0VYVF9FWFRFUk5BTCAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX0JBU0VfQ1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgQ1NDX1lfU09VUkNFX0JBU0VfQ1NfMCAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfWV9TT1VSQ0VfQkFTRV9DU18xICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9CQVNFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBDU0NfQ09OU1RBTlRTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBDQworI2RlZmluZSBDU0NfQ09OU1RBTlRTX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToyNAorI2RlZmluZSBDU0NfQ09OU1RBTlRTX1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoxNgorI2RlZmluZSBDU0NfQ09OU1RBTlRTX0cgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTo4CisjZGVmaW5lIENTQ19DT05TVEFOVFNfQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDc6MAorCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEQwCisjZGVmaW5lIENTQ19ZX1NPVVJDRV9YX0lOVEVHRVIgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIENTQ19ZX1NPVVJDRV9YX0ZSQUNUSU9OICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjMKKworI2RlZmluZSBDU0NfWV9TT1VSQ0VfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBENAorI2RlZmluZSBDU0NfWV9TT1VSQ0VfWV9JTlRFR0VSICAgICAgICAgICAgICAgICAgICAgICAgICAyNzoxNgorI2RlZmluZSBDU0NfWV9TT1VSQ0VfWV9GUkFDVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAxNTozCisKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRDgKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfVV9TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19VX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIENTQ19VX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX1VfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfVV9TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwREMKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfVl9TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIENTQ19WX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIENTQ19WX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX1ZfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfVl9TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgQ1NDX1NPVVJDRV9ESU1FTlNJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRTAKKyNkZWZpbmUgQ1NDX1NPVVJDRV9ESU1FTlNJT05fWCAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQ1NDX1NPVVJDRV9ESU1FTlNJT05fWSAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIENTQ19TT1VSQ0VfUElUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEU0CisjZGVmaW5lIENTQ19TT1VSQ0VfUElUQ0hfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENTQ19TT1VSQ0VfUElUQ0hfVVYgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBDU0NfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBFOAorI2RlZmluZSBDU0NfREVTVElOQVRJT05fV1JBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBDU0NfREVTVElOQVRJT05fV1JBUF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9XUkFQX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjc6MTYKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9ESU1FTlNJT04gICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEVDCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9ESU1FTlNJT05fWCAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9ESU1FTlNJT05fWSAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBDU0NfREVTVElOQVRJT05fUElUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAweDEwMDBGMAorI2RlZmluZSBDU0NfREVTVElOQVRJT05fUElUQ0hfWCAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBDU0NfREVTVElOQVRJT05fUElUQ0hfWSAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgQ1NDX1NDQUxFX0ZBQ1RPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMDAwRjQKKyNkZWZpbmUgQ1NDX1NDQUxFX0ZBQ1RPUl9IT1JJWk9OVEFMICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgQ1NDX1NDQUxFX0ZBQ1RPUl9WRVJUSUNBTCAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEY4CisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFX0VYVCAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFX0VYVF9MT0NBTCAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX0JBU0VfRVhUX0VYVEVSTkFMICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfREVTVElOQVRJT05fQkFTRV9DUyAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBDU0NfREVTVElOQVRJT05fQkFTRV9DU18wICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19ERVNUSU5BVElPTl9CQVNFX0NTXzEgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0RFU1RJTkFUSU9OX0JBU0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIENTQ19DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MTAwMEZDCisjZGVmaW5lIENTQ19DT05UUk9MX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIENTQ19DT05UUk9MX1NUQVRVU19TVE9QICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX0NPTlRST0xfU1RBVFVTX1NUQVJUICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfQ09OVFJPTF9TT1VSQ0VfRk9STUFUICAgICAgICAgICAgICAgICAgICAgICAzMDoyOAorI2RlZmluZSBDU0NfQ09OVFJPTF9TT1VSQ0VfRk9STUFUX1lVVjQyMiAgICAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19DT05UUk9MX1NPVVJDRV9GT1JNQVRfWVVWNDIwSSAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0NPTlRST0xfU09VUkNFX0ZPUk1BVF9ZVVY0MjAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBDU0NfQ09OVFJPTF9TT1VSQ0VfRk9STUFUX1lWVTkgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIENTQ19DT05UUk9MX1NPVVJDRV9GT1JNQVRfSVlVMSAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgQ1NDX0NPTlRST0xfU09VUkNFX0ZPUk1BVF9JWVUyICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBDU0NfQ09OVFJPTF9TT1VSQ0VfRk9STUFUX1JHQjU2NSAgICAgICAgICAgICAgICA2CisjZGVmaW5lIENTQ19DT05UUk9MX1NPVVJDRV9GT1JNQVRfUkdCODg4OCAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgQ1NDX0NPTlRST0xfREVTVElOQVRJT05fRk9STUFUICAgICAgICAgICAgICAgICAgMjc6MjYKKyNkZWZpbmUgQ1NDX0NPTlRST0xfREVTVElOQVRJT05fRk9STUFUX1JHQjU2NSAgICAgICAgICAgMAorI2RlZmluZSBDU0NfQ09OVFJPTF9ERVNUSU5BVElPTl9GT1JNQVRfUkdCODg4OCAgICAgICAgICAxCisjZGVmaW5lIENTQ19DT05UUk9MX0hPUklaT05UQUxfRklMVEVSICAgICAgICAgICAgICAgICAgIDI1OjI1CisjZGVmaW5lIENTQ19DT05UUk9MX0hPUklaT05UQUxfRklMVEVSX0RJU0FCTEUgICAgICAgICAgIDAKKyNkZWZpbmUgQ1NDX0NPTlRST0xfSE9SSVpPTlRBTF9GSUxURVJfRU5BQkxFICAgICAgICAgICAgMQorI2RlZmluZSBDU0NfQ09OVFJPTF9WRVJUSUNBTF9GSUxURVIgICAgICAgICAgICAgICAgICAgICAyNDoyNAorI2RlZmluZSBDU0NfQ09OVFJPTF9WRVJUSUNBTF9GSUxURVJfRElTQUJMRSAgICAgICAgICAgICAwCisjZGVmaW5lIENTQ19DT05UUk9MX1ZFUlRJQ0FMX0ZJTFRFUl9FTkFCTEUgICAgICAgICAgICAgIDEKKyNkZWZpbmUgQ1NDX0NPTlRST0xfQllURV9PUkRFUiAgICAgICAgICAgICAgICAgICAgICAgICAgMjM6MjMKKyNkZWZpbmUgQ1NDX0NPTlRST0xfQllURV9PUkRFUl9ZVVlWICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBDU0NfQ09OVFJPTF9CWVRFX09SREVSX1VZVlkgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgREVfREFUQV9QT1JUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgxMTAwMDAKKworI2RlZmluZSBJMkNfQllURV9DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0MAorI2RlZmluZSBJMkNfQllURV9DT1VOVF9DT1VOVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjAKKworI2RlZmluZSBJMkNfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0MQorI2RlZmluZSBJMkNfQ1RSTF9JTlQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgSTJDX0NUUkxfSU5UX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfQ1RSTF9JTlRfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEkyQ19DVFJMX0RJUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBJMkNfQ1RSTF9ESVJfV1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19DVFJMX0RJUl9SRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSTJDX0NUUkxfQ1RSTCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIEkyQ19DVFJMX0NUUkxfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX0NUUkxfQ1RSTF9TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJMkNfQ1RSTF9NT0RFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgSTJDX0NUUkxfTU9ERV9TVEFOREFSRCAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfQ1RSTF9NT0RFX0ZBU1QgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEkyQ19DVFJMX0VOICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBJMkNfQ1RSTF9FTl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19DVFJMX0VOX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJMkNfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0MgorI2RlZmluZSBJMkNfU1RBVFVTX1RYICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgSTJDX1NUQVRVU19UWF9QUk9HUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJMkNfU1RBVFVTX1RYX0NPTVBMRVRFRCAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIEkyQ19UWF9ET05FICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgKKyNkZWZpbmUgSTJDX1NUQVRVU19FUlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIEkyQ19TVEFUVVNfRVJSX05PUk1BTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX1NUQVRVU19FUlJfRVJST1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBJMkNfU1RBVFVTX0VSUl9DTEVBUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19TVEFUVVNfQUNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBJMkNfU1RBVFVTX0FDS19SRUNFSVZFRCAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19TVEFUVVNfQUNLX05PVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgSTJDX1NUQVRVU19CU1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIEkyQ19TVEFUVVNfQlNZX0lETEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSTJDX1NUQVRVU19CU1lfQlVTWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisjZGVmaW5lIEkyQ19SRVNFVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMDQyCisjZGVmaW5lIEkyQ19SRVNFVF9CVVNfRVJST1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBJMkNfUkVTRVRfQlVTX0VSUk9SX0NMRUFSICAgICAgICAgICAgICAgICAgICAgICAwCisKKyNkZWZpbmUgSTJDX1NMQVZFX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwNDMKKyNkZWZpbmUgSTJDX1NMQVZFX0FERFJFU1NfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgNzoxCisjZGVmaW5lIEkyQ19TTEFWRV9BRERSRVNTX1JXICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBJMkNfU0xBVkVfQUREUkVTU19SV19XICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIEkyQ19TTEFWRV9BRERSRVNTX1JXX1IgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBJMkNfREFUQTAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0NAorI2RlZmluZSBJMkNfREFUQTEgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0NQorI2RlZmluZSBJMkNfREFUQTIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0NgorI2RlZmluZSBJMkNfREFUQTMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0NworI2RlZmluZSBJMkNfREFUQTQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0OAorI2RlZmluZSBJMkNfREFUQTUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0OQorI2RlZmluZSBJMkNfREFUQTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0QQorI2RlZmluZSBJMkNfREFUQTcgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0QgorI2RlZmluZSBJMkNfREFUQTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0QworI2RlZmluZSBJMkNfREFUQTkgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0RAorI2RlZmluZSBJMkNfREFUQTEwICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0RQorI2RlZmluZSBJMkNfREFUQTExICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA0RgorI2RlZmluZSBJMkNfREFUQTEyICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA1MAorI2RlZmluZSBJMkNfREFUQTEzICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAxMDA1MQ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JUSUNBTF9TWU5DX0lOQUNUSVZFICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1ZFUlRJQ0FMX1NZTkNfQUNUSVZFICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQURKICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE5OjE5CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQURKX05PUk1BTCAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9BREpfREVMQVkgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0hBICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxODoxOAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0hBX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSEFfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTc6MTcKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WU0tfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1ZTS19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFNLICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2OjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFNLX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9IU0tfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0ZEICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNToxNQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0ZEX1JJU0lORyAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfRkRfRkFMTElORyAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTQ6MTQKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9WUF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1ZQX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfSFBfSElHSCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9IUF9MT1cgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NQX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ1BfTE9XICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9VVlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MTEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9VVlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1VWU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQlMgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjEwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9CU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NTICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5OjkKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DU18xNiAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NTXzggICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ0YgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg6OAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NGX1lVViAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQ0ZfUkdCICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzo3CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfRlNfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9GU19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1dFQVZFICAgICAgICAgICAgICAgICAgICAgICAgICA2OjYKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9XRUFWRV9ESVNBQkxFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1dFQVZFX0VOQUJMRSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQk9CICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU6NQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0JPQl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfQk9CX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9EQiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDo0CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfREJfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9EQl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NDICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzOjMKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DQ19DT05USU5VRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NDX0NPTkRJVElPTiAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfUkdCICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI6MgorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX1JHQl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfUkdCX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF82NTYgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0NUUkxfNjU2X0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF82NTZfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NBUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ1RSTF9DQVBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9DVFJMX0NBUF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ0xJUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMDQKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQ0xJUF9ZQ0xJUF9FVkVOX0ZJRUxEICAgICAgICAgICAgICAgIDI1OjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NMSVBfWUNMSVAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX0NMSVBfWENMSVAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6MAorCisjZGVmaW5lIFpWMF9DQVBUVVJFX1NJWkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDkwMDA4CisjZGVmaW5lIFpWMF9DQVBUVVJFX1NJWkVfSEVJR0hUICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjE2CisjZGVmaW5lIFpWMF9DQVBUVVJFX1NJWkVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEwOjAKKworI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1MgICAgICAgICAgICAgICAgICAgICAgICAweDA5MDAwQworI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYwX0FERFJFU1NfU1RBVFVTICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBaVjBfQ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VmaW5lIFpWMF9DQVBUVVJFX0JVRjFfQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMV9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAgMQorI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYxX0FERFJFU1NfQ1MgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9CVUYxX0FERFJFU1NfQ1NfMCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRjFfQUREUkVTU19DU18xICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGMV9BRERSRVNTX0FERFJFU1MgICAgICAgICAgICAgICAgMjU6MAorCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRl9PRkZTRVQgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDkwMDE0CisjaWZuZGVmIFZBTElEQVRJT05fQ0hJUAorICAgICNkZWZpbmUgWlYwX0NBUFRVUkVfQlVGX09GRlNFVF9ZQ0xJUF9PRERfRklFTEQgICAgICAyNToxNgorI2VuZGlmCisjZGVmaW5lIFpWMF9DQVBUVVJFX0JVRl9PRkZTRVRfT0ZGU0VUICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5MDAxOAorI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGTyAgICAgICAgICAgICAgICAgICAgICAyOjAKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fMCAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT18xICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMF9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzIgICAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fMyAgICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT180ICAgICAgICAgICAgICAgICAgICA0CisjZGVmaW5lIFpWMF9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzUgICAgICAgICAgICAgICAgICAgIDUKKyNkZWZpbmUgWlYwX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNiAgICAgICAgICAgICAgICAgICAgNgorI2RlZmluZSBaVjBfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT183ICAgICAgICAgICAgICAgICAgICA3CisKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTAwMUMKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVF9ZICAgICAgICAgICAgICAgICAgICAgICAgMzE6MjQKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVF9SICAgICAgICAgICAgICAgICAgICAgICAgMjM6MTYKKyNkZWZpbmUgWlYwX0NBUFRVUkVfWVJHQl9DT05TVF9HICAgICAgICAgICAgICAgICAgICAgICAgMTU6OAorI2RlZmluZSBaVjBfQ0FQVFVSRV9ZUkdCX0NPTlNUX0IgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBaVjBfQ0FQVFVSRV9MSU5FX0NPTVAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5MDAyMAorI2RlZmluZSBaVjBfQ0FQVFVSRV9MSU5FX0NPTVBfTEMgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKy8qIFpWMSAqLworCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDk4M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TEUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfUEFORUxfRU5BQkxFICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9BREogICAgICAgICAgICAgICAgICAgICAgICAgICAgMTk6MTkKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9BREpfTk9STUFMICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0FESl9ERUxBWSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfSEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE4OjE4CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfSEFfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IQV9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZTSyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzoxNworI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZTS19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfVlNLX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTY6MTYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IU0tfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0hTS19FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfRkRfUklTSU5HICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9GRF9GQUxMSU5HICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1ZQX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfVlBfTE9XICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTMKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9IUF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0hQX0xPVyAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1AgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjEyCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1BfSElHSCAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DUF9MT1cgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1VWUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1VWU19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfVVZTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CU19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0JTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NTXzE2ICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ1NfOCAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DRiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0ZfWVVWICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9DRl9SR0IgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0ZTICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjcKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9GU19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0ZTX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfV0VBVkUgICAgICAgICAgICAgICAgICAgICAgICAgIDY6NgorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX1dFQVZFX0RJU0FCTEUgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfV0VBVkVfRU5BQkxFICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CT0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTo1CisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQk9CX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9CT0JfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0RCICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OjQKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9EQl9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0RCX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0MgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM6MworI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NDX0NPTlRJTlVFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0NfQ09ORElUSU9OICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9SR0IgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjoyCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfUkdCX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF9SR0JfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMXzY1NiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxOjEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQ1RSTF82NTZfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMXzY1Nl9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0FQICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DVFJMX0NBUF9ESVNBQkxFICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIFpWMV9DQVBUVVJFX0NUUkxfQ0FQX0VOQUJMRSAgICAgICAgICAgICAgICAgICAgIDEKKworI2RlZmluZSBaVjFfQ0FQVFVSRV9DTElQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAwNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9DTElQX1lDTElQICAgICAgICAgICAgICAgICAgICAgICAgICAyNToxNgorI2RlZmluZSBaVjFfQ0FQVFVSRV9DTElQX1hDTElQICAgICAgICAgICAgICAgICAgICAgICAgICA5OjAKKworI2RlZmluZSBaVjFfQ0FQVFVSRV9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAwOAorI2RlZmluZSBaVjFfQ0FQVFVSRV9TSVpFX0hFSUdIVCAgICAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBaVjFfQ0FQVFVSRV9TSVpFX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxMDowCisKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTgwMEMKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX1NUQVRVUyAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMF9BRERSRVNTX1NUQVRVU19DVVJSRU5UICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYwX0FERFJ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JFX0JVRjFfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgIDEKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMV9BRERSRVNTX0NTICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfQlVGMV9BRERSRVNTX0NTXzAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUYxX0FERFJFU1NfQ1NfMSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIFpWMV9DQVBUVVJFX0JVRjFfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUZfT0ZGU0VUICAgICAgICAgICAgICAgICAgICAgICAgICAweDA5ODAxNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9CVUZfT0ZGU0VUX09GRlNFVCAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwOTgwMTgKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk8gICAgICAgICAgICAgICAgICAgICAgMjowCisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fMSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBaVjFfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT18yICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzMgICAgICAgICAgICAgICAgICAgIDMKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNCAgICAgICAgICAgICAgICAgICAgNAorI2RlZmluZSBaVjFfQ0FQVFVSRV9GSUZPX0NUUkxfRklGT181ICAgICAgICAgICAgICAgICAgICA1CisjZGVmaW5lIFpWMV9DQVBUVVJFX0ZJRk9fQ1RSTF9GSUZPXzYgICAgICAgICAgICAgICAgICAgIDYKKyNkZWZpbmUgWlYxX0NBUFRVUkVfRklGT19DVFJMX0ZJRk9fNyAgICAgICAgICAgICAgICAgICAgNworCisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1QgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDk4MDFDCisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1RfWSAgICAgICAgICAgICAgICAgICAgICAgIDMxOjI0CisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1RfUiAgICAgICAgICAgICAgICAgICAgICAgIDIzOjE2CisjZGVmaW5lIFpWMV9DQVBUVVJFX1lSR0JfQ09OU1RfRyAgICAgICAgICAgICAgICAgICAgICAgIDE1OjgKKyNkZWZpbmUgWlYxX0NBUFRVUkVfWVJHQl9DT05TVF9CICAgICAgICAgICAgICAgICAgICAgICAgNzowCisKKyNkZWZpbmUgRE1BXzFfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwRDAwMTAKKyNkZWZpbmUgRE1BXzFfU09VUkNFX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgRE1BXzFfU09VUkNFX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfMV9TT1VSQ0VfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAgICAxCisjZGVmaW5lIERNQV8xX1NPVVJDRV9BRERSRVNTX0NTICAgICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERNQV8xX1NPVVJDRV9BRERSRVNTX0NTXzAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BXzFfU09VUkNFX0FERFJFU1NfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfMV9TT1VSQ0VfQUREUkVTUyAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwRDAwMTQKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT05fQUREUkVTU19FWFQgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT05fQUREUkVTU19FWFRfTE9DQUwgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfMV9ERVNUSU5BVElPTl9BRERSRVNTX0VYVF9FWFRFUk5BTCAgICAgICAgICAxCisjZGVmaW5lIERNQV8xX0RFU1RJTkFUSU9OX0FERFJFU1NfQ1MgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIERNQV8xX0RFU1RJTkFUSU9OX0FERFJFU1NfQ1NfMCAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BXzFfREVTVElOQVRJT05fQUREUkVTU19DU18xICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfMV9ERVNUSU5BVElPTl9BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgRE1BXzFfU0laRV9DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwRDAwMTgKKyNkZWZpbmUgRE1BXzFfU0laRV9DT05UUk9MX1NUQVRVUyAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgRE1BXzFfU0laRV9DT05UUk9MX1NUQVRVU19JRExFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfMV9TSVpFX0NPTlRST0xfU1RBVFVTX0FDVElWRSAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERNQV8xX1NJWkVfQ09OVFJPTF9TSVpFICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjAKKworI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDBEMDAyMAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0FCT1JUXzEgICAgICAgICAgICAgICAgICAgICA1OjUKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9BQk9SVF8xX0VOQUJMRSAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0FCT1JUXzFfQUJPUlQgICAgICAgICAgICAgICAxCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfQUJPUlRfMCAgICAgICAgICAgICAgICAgICAgIDQ6NAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0FCT1JUXzBfRU5BQkxFICAgICAgICAgICAgICAwCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfQUJPUlRfMF9BQk9SVCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9JTlRfMSAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIERNQV9BQk9SVF9JTlRFUlJVUFRfSU5UXzFfQ0xFQVIgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9JTlRfMV9GSU5JU0hFRCAgICAgICAgICAgICAgMQorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0lOVF8wICAgICAgICAgICAgICAgICAgICAgICAwOjAKKyNkZWZpbmUgRE1BX0FCT1JUX0lOVEVSUlVQVF9JTlRfMF9DTEVBUiAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBETUFfQUJPUlRfSU5URVJSVVBUX0lOVF8wX0ZJTklTSEVEICAgICAgICAgICAgICAxCisKKworCisKKworLyogRGVmYXVsdCBpMmMgQ0xLIGFuZCBEYXRhIEdQSU8uIFRoZXNlIGFyZSB0aGUgZGVmYXVsdCBpMmMgcGlucyAqLworI2RlZmluZSBERUZBVUxUX0kyQ19TQ0wgICAgICAgICAgICAgICAgICAgICAzMAorI2RlZmluZSBERUZBVUxUX0kyQ19TREEgICAgICAgICAgICAgICAgICAgICAzMQorCisKKyNkZWZpbmUgR1BJT19EQVRBX1NNNzUwTEUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwMTgKKyNkZWZpbmUgR1BJT19EQVRBX1NNNzUwTEVfMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIEdQSU9fREFUQV9TTTc1MExFXzAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fU003NTBMRSAgICAgICAgICAgICAgICAgICAgIDB4MDIwMDFDCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fU003NTBMRV8xICAgICAgICAgICAgICAgICAgIDE6MQorI2RlZmluZSBHUElPX0RBVEFfRElSRUNUSU9OX1NNNzUwTEVfMV9JTlBVVCAgICAgICAgICAgICAwCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fU003NTBMRV8xX09VVFBVVCAgICAgICAgICAgIDEKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl9TTTc1MExFXzAgICAgICAgICAgICAgICAgICAgMDowCisjZGVmaW5lIEdQSU9fREFUQV9ESVJFQ1RJT05fU003NTBMRV8wX0lOUFVUICAgICAgICAgICAgIDAKKyNkZWZpbmUgR1BJT19EQVRBX0RJUkVDVElPTl9TTTc1MExFXzBfT1VUUFVUICAgICAgICAgICAgMQorCisKKyNlbmRpZgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3NpaTE2NC5jIGIvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3NpaTE2NC5jCm5ld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19BRERSRVNTLCBTSUkxNjRfREVWSUNFX0lEX0xPVyk7CisKKyAgICByZXR1cm4gZGV2aWNlSUQ7Cit9CisKKworCisvKiBEVkkuQyB3aWxsIGhhbmRsZSBhbGwgU2lJMTY0IGNoaXAgc3R1ZmZzIGFuZCB0cnkgaXQgYmVzdCB0byBtYWtlIGNvZGUgbWluaW1hbCBhbmQgdXNlZnVsICovCisKKy8qCisgKiAgc2lpMTY0SW5pdENoaXAKKyAqICAgICAgVGhpcyBmdW5jdGlvbiBpbml0aWFsaXplIGFuZCBkZXRlY3QgdGhlIERWSSBjb250cm9sbGVyIGNoaXAuCisgKgorICogIElucHV0OgorICogICAgICBlZGdlU2VsZWN0ICAgICAgICAgIC0gRWRnZSBTZWxlY3Q6CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBJbnB1dCBkYXRhIGlzIGZhbGxpbmcgZWRnZSBsYXRjaGVkIChmYWxsaW5nIGVkZ2UKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxhdGNoZWQgZmlyc3QgaW4gZHVhbCBlZGdlIG1vZGUpCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgPSBJbnB1dCBkYXRhIGlzIHJpc2luZyBlZGdlIGxhdGNoZWQgKHJpc2luZyBlZGdlCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsYXRjaGVkIGZpcnN0IGluIGR1YWwgZWRnZSBtb2RlKQorICogICAgICBidXNTZWxlY3QgICAgICAgICAgIC0gSW5wdXQgQnVzIFNlbGVjdDoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IElucHV0IGRhdGEgYnVzIGlzIDEyLWJpdHMgd2lkZQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gSW5wdXQgZGF0YSBidXMgaXMgMjQtYml0cyB3aWRlCisgKiAgICAgIGR1YWxFZGdlQ2xrU2VsZWN0ICAgLSBEdWFsIEVkZ2UgQ2xvY2sgU2VsZWN0CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBJbnB1dCBkYXRhIGlzIHNpbmdsZSBlZGdlIGxhdGNoZWQKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IElucHV0IGRhdGEgaXMgZHVhbCBlZGdlIGxhdGNoZWQKKyAqICAgICAgaHN5bmNFbmFibGUgICAgICAgICAtIEhvcml6b250YWwgU3luYyBFbmFibGU6CisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPSBIU1lOQyBpbnB1dCBpcyB0cmFuc21pdHRlZCBhcyBmaXhlZCBMT1cKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IEhTWU5DIGlucHV0IGlzIHRyYW5zbWl0dGVkIGFzIGlzCisgKiAgICAgIHZzeW5jRW5hYmxlICAgICAgICAgLSBWZXJ0aWNhbCBTeW5jIEVuYWJsZToKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IFZTWU5DIGlucHV0IGlzIHRyYW5zbWl0dGVkIGFzIGZpeGVkIExPVworICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gVlNZTkMgaW5wdXQgaXMgdHJhbnNtaXR0ZWQgYXMgaXMKKyAqICAgICAgZGVza2V3RW5hYmxlICAgICAgICAtIERlLXNrZXdpbmcgRW5hYmxlOgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0gRGUtc2tldyBkaXNhYmxlZAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gRGUtc2tldyBlbmFibGVkCisgKiAgICAgIGRlc2tld1NldHRpbmcgICAgICAgLSBEZS1za2V3aW5nIFNldHRpbmcgKGluY3JlbWVudCBvZiAyNjBwc2VjKQorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwID0gMSBzdGVwIC0tPiBtaW5pbXVtIHNldHVwIC8gbWF4aW11bSBob2xkCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEgPSAyIHN0ZXAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMiA9IDMgc3RlcAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzID0gNCBzdGVwCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgPSA1IHN0ZXAKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNSA9IDYgc3RlcAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2ID0gNyBzdGVwCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcgPSA4IHN0ZXAgLS0+IG1heGltdW0gc2V0dXAgLyBtaW5pbXVtIGhvbGQKKyAqICAgICAgY29udGludW91c1N5bmNFbmFibGUtIFNZTkMgQ29udGludW91czoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IERpc2FibGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA9IEVuYWJsZQorICogICAgICBwbGxGaWx0ZXJFbmFibGUgICAgIC0gUExMIEZpbHRlciBFbmFibGUKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA9IERpc2FibGUgUExMIEZpbHRlcgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxID0gRW5hYmxlIFBMTCBGaWx0ZXIKKyAqICAgICAgcGxsRmlsdGVyVmFsdWUgICAgICAtIFBMTCBGaWx0ZXIgY2hhcmFjdGVyaXN0aWNzOgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwfjcgKHJlY29tbWVuZGVkIHZhbHVlIGlzIDQpCisgKgorICogIE91dHB1dDoKKyAqICAgICAgMCAgIC0gU3VjY2VzcworICogICAgIC0xICAgLSBGYWlsLgorICovCitsb25nIHNpaTE2NEluaXRDaGlwKAorICAgIHVuc2lnbmVkIGNoYXIgZWRnZVNlbGVjdCwKKyAgICB1bnNpZ25lZCBjaGFyIGJ1c1NlbGVjdCwKKyAgICB1bnNpZ25lZCBjaGFy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gY29udHJvbGxlciBjaGlwLgorICAgICAgICAgKi8KKworICAgICAgICAvKiBTZWxlY3QgdGhlIGVkZ2UgKi8KKyAgICAgICAgaWYgKGVkZ2VTZWxlY3QgPT0gMCkKKyAgICAgICAgICAgIGNvbmZpZyA9IFNJSTE2NF9DT05GSUdVUkFUSU9OX0xBVENIX0ZBTExJTkc7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvbmZpZyA9IFNJSTE2NF9DT05GSUdVUkFUSU9OX0xBVENIX1JJU0lORzsKKworICAgICAgICAvKiBTZWxlY3QgYnVzIHdpZGUgKi8KKyAgICAgICAgaWYgKGJ1c1NlbGVjdCA9PSAwKQorICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9DT05GSUdVUkFUSU9OX0JVU18xMkJJVFM7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9CVVNfMjRCSVRTOworCisgICAgICAgIC8qIFNlbGVjdCBEdWFsL1NpbmdsZSBFZGdlIENsb2NrICovCisgICAgICAgIGlmIChkdWFsRWRnZUNsa1NlbGVjdCA9PSAwKQorICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9DT05GSUdVUkFUSU9OX0NMT0NLX1NJTkdMRTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9DT05GSUdVUkFUSU9OX0NMT0NLX0RVQUw7CisKKyAgICAgICAgLyogU2VsZWN0IEhTeW5jIEVuYWJsZSAqLworICAgICAgICBpZiAoaHN5bmNFbmFibGUgPT0gMCkKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9IU1lOQ19GT1JDRV9MT1c7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9IU1lOQ19BU19JUzsKKworICAgICAgICAvKiBTZWxlY3QgVlN5bmMgRW5hYmxlICovCisgICAgICAgIGlmICh2c3luY0VuYWJsZSA9PSAwKQorICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9DT05GSUdVUkFUSU9OX1ZTWU5DX0ZPUkNFX0xPVzsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9DT05GSUdVUkFUSU9OX1ZTWU5DX0FTX0lTOworCisgICAgICAgIGkyY1dyaXRlUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0NPTkZJR1VSQVRJT04sIGNvbmZpZyk7CisKKyAgICAgICAgLyogRGUtc2tldyBlbmFibGVkIHdpdGggZGVmYXVsdCAxMTFiIHZhbHVlLgorICAgICAgICAgICBUaGlzIHdpbGwgZml4IHNvbWUgYXJ0aWZhY3RzIHByb2JsZW0gaW4gc29tZSBtb2RlIG9uIGJvYXJkIDIuMi4KKyAgICAgICAgICAgU29tZWhvdyB0aGlzIGZpeCBkb2VzIG5vdCBhZmZlY3QgYm9hcmQgMi4xLgorICAgICAgICAgKi8KKyAgICAgICAgaWYgKGRlc2tld0VuYWJsZSA9PSAwKQorICAgICAgICAgICAgY29uZmlnID0gU0lJMTY0X0RFU0tFV19ESVNBQkxFOworICAgICAgICBlbHNlCisgICAgICAgICAgICBjb25maWcgPSBTSUkxNjRfREVTS0VXX0VOQUJMRTsKKworICAgICAgICBzd2l0Y2ggKGRlc2tld1NldHRpbmcpCisgICAgICAgIHsKKyAgICAgICAgICAgIGNhc2UgMDoKKyAgICAgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0RFU0tFV18xX1NURVA7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDE6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfMl9TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSAyOgorICAgICAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfREVTS0VXXzNfU1RFUDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgMzoKKyAgICAgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0RFU0tFV180X1NURVA7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDQ6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfNV9TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICAgICAgY2FzZSA1OgorICAgICAgICAgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfREVTS0VXXzZfU1RFUDsKKyAgICAgICAgICAgICAgICBicmVhazsKKyAgICAgICAgICAgIGNhc2UgNjoKKyAgICAgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X0RFU0tFV183X1NURVA7CisgICAgICAgICAgICAgICAgYnJlYWs7CisgICAgICAgICAgICBjYXNlIDc6CisgICAgICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9ERVNLRVdfOF9TVEVQOworICAgICAgICAgICAgICAgIGJyZWFrOworICAgICAgICB9CisgICAgICAgIGkyY1dyaXRlUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0RFU0tFVywgY29uZmlnKTsKKworICAgICAgICAvKiBFbmFibGUvRGlzYWJsZSBDb250aW51b3VzIFN5bmMuICovCisgICAgICAgIGlmIChjb250aW51b3VzU3luY0VuYWJsZSA9PSAwKQorICAgICAgICAgICAgY29uZmlnID0gU0lJMTY0X1BMTF9GSUxURVJfU1lOQ19DT05USU5VT1VTX0RJU0FCTEU7CisgICAgICAgIGVsc2UKKyAgICAgICAgICAgIGNvbmZpZyA9IFNJSTE2NF9QTExfRklMVEVSX1NZTkNfQ09OVElOVU9VU19FTkFCTEU7CisKKyAgICAgICAgLyogRW5hYmxlL0Rpc2FibGUgUExMIEZpbHRlciAqLworICAgICAgICBpZiAocGxsRmlsdGVyRW5hYmxlID09IDApCisgICAgICAgICAgICBjb25maWcgfD0gU0lJMTY0X1BMTF9GSUxURVJfRElTQUJMRTsKKyAgICAgICAgZWxzZQorICAgICAgICAgICAgY29uZmlnIHw9IFNJSTE2NF9QTExfRklMVEVSX0VOQUJMRTsKKworICAgICAgICAvKiBTZXQgdGhlIFBMTCBGaWx0ZXIgdmFsdWUgKi8KKyAgICAgICAgY29uZmlnIHw9ICgocGxsRmlsdGVyVmFsdWUgJiAweDA3KSA8PCAxKTsKKworICAgICAgICBpMmNXcml0ZVJlZyhTSUkxNjRfSTJDX0FERFJFU1MsIFNJSTE2NF9QTEwsIGNvbmZpZyk7CisKKyAgICAgICAgLyogUmVjb3ZlciBmcm9tIFBvd2VyIERvd24gYW5kIGVuYWJsZSBvdXRwdXQuICovCisgICAgICAgIGNvbmZpZyA9IGkyY1JlYWRSZWcoU0lJMTY0X0kyQ19BRERSRVNTLCBTSUkxNjRfQ09ORklHVVJBVElPTik7CisgICAgICAgIGNvbmZpZyB8PSBTSUkxNjRfQ09ORklHVVJBVElPTl9QT1dFUl9OT1JNQUw7CisgICAgICAgIGkyY1dyaXRlUmVnKFNJSTE2NF9JMkNfQUREUkVTUywgU0lJMTY0X0NPTkZJR1VSQVRJT04sIGNvbmZpZyk7CisKKyNpZmRlZiBEREtERUJVRworICAgICAgICAvL3NpaTE2NFByaW50UmVnaXN0ZXJWYWx1ZXMoKTsKKyNlbmRpZgorCisgICAgICAgIHJldHVybiAwOworICAgIH0KKworICAgIC8qIFJldHVybiAtMSBpZiBpbml0aWFsaXphdGlvbiBmYWlscy4gKi8KKyAgICByZXR1cm4gKC0xKTsKK30KKworCisKKworCisvKiBiZWxvdyBzaWkxNjQgZnVuY3Rpb24gaXMgbm90IG5lY2Nlc3NhcnkgKi8KKworI2lmZGVmIFNJSTE2NF9GVUxMX0ZVTkNUSU9OUworCisvKgorICogIHNpaTE2NFJlc2V0Q2hpcAorICogICAgICBUaGlzIGZ1bmN0aW9uIHJlc2V0cyB0a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AgICAgcmV0dXJuIDE7CisgICAgZWxzZQorICAgICAgICByZXR1cm4gMDsKK30KKworLyoKKyAqICBzaWkxNjRDaGVja0ludGVycnVwdAorICogICAgICBDaGVja3MgaWYgaW50ZXJydXB0IGhhcyBvY2N1cmVkLgorICoKKyAqICBPdXRwdXQ6CisgKiAgICAgIDAgICAtIE5vIGludGVycnVwdAorICogICAgICAxICAgLSBJbnRlcnJ1cHQgb2NjdXJzCisgKi8KK3Vuc2lnbmVkIGNoYXIgc2lpMTY0Q2hlY2tJbnRlcnJ1cHQodm9pZCkKK3sKKyAgICB1bnNpZ25lZCBjaGFyIGRldGVjdFJlZzsKKworICAgIGRldGVjdFJlZyA9IGkyY1JlYWRSZWcoU0lJMTY0X0kyQ19BRERSRVNTLCBTSUkxNjRfREVURUNUKSAmIFNJSTE2NF9ERVRFQ1RfTU9OSVRPUl9TVEFURV9NQVNLOworICAgIGlmIChkZXRlY3RSZWcgPT0gU0lJMTY0X0RFVEVDVF9NT05JVE9SX1NUQVRFX0NIQU5HRSkKKyAgICAgICAgcmV0dXJuIDE7CisgICAgZWxzZQorICAgICAgICByZXR1cm4gMDsKK30KKworLyoKKyAqICBzaWkxNjRDbGVhckludGVycnVwdAorICogICAgICBDbGVhciB0aGUgaG90IHBsdWcgaW50ZXJydXB0LgorICovCit2b2lkIHNpaTE2NENsZWFySW50ZXJydXB0KHZvaWQpCit7CisgICAgdW5zaWduZWQgY2hhciBkZXRlY3RSZWc7CisKKyAgICAvKiBDbGVhciB0aGUgTURJIGludGVycnVwdCAqLworICAgIGRldGVjdFJlZyA9IGkyY1JlYWRSZWcoU0lJMTY0X0kyQ19BRERSRVNTLCBTSUkxNjRfREVURUNUKTsKKyAgICBpMmNXcml0ZVJlZyhTSUkxNjRfSTJDX0FERFJFU1MsIFNJSTE2NF9ERVRFQ1QsIGRldGVjdFJlZyB8IFNJSTE2NF9ERVRFQ1RfTU9OSVRPUl9TVEFURV9DTEVBUik7Cit9CisKKyNlbmRpZgorCis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xlciBjaGlwICovCisvKgorICogVmVuZG9yIElEIHJlZ2lzdGVycworICovCisjZGVmaW5lIFNJSTE2NF9WRU5ET1JfSURfTE9XICAgICAgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfVkVORE9SX0lEX0hJR0ggICAgICAgICAgICAgICAgICAgICAgIDB4MDEKKworLyoKKyAqIERldmljZSBJRCByZWdpc3RlcnMKKyAqLworI2RlZmluZSBTSUkxNjRfREVWSUNFX0lEX0xPVyAgICAgICAgICAgICAgICAgICAgICAgIDB4MDIKKyNkZWZpbmUgU0lJMTY0X0RFVklDRV9JRF9ISUdIICAgICAgICAgICAgICAgICAgICAgICAweDAzCisKKy8qCisgKiBEZXZpY2UgUmV2aXNpb24KKyAqLworI2RlZmluZSBTSUkxNjRfREVWSUNFX1JFVklTSU9OICAgICAgICAgICAgICAgICAgICAgIDB4MDQKKworLyoKKyAqIEZyZXF1ZW5jeSBMaW1pdGF0aW9uIHJlZ2lzdGVycworICovCisjZGVmaW5lIFNJSTE2NF9GUkVRVUVOQ1lfTElNSVRfTE9XICAgICAgICAgICAgICAgICAgMHgwNgorI2RlZmluZSBTSUkxNjRfRlJFUVVFTkNZX0xJTUlUX0hJR0ggICAgICAgICAgICAgICAgIDB4MDcKKworLyoKKyAqIFBvd2VyIERvd24gYW5kIElucHV0IFNpZ25hbCBDb25maWd1cmF0aW9uIHJlZ2lzdGVycworICovCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OICAgICAgICAgICAgICAgICAgICAgICAgMHgwOAorCisvKiBQb3dlciBkb3duIChQRCkgKi8KKyNkZWZpbmUgU0lJMTY0X0NPTkZJR1VSQVRJT05fUE9XRVJfRE9XTiAgICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9DT05GSUdVUkFUSU9OX1BPV0VSX05PUk1BTCAgICAgICAgICAgMHgwMQorI2RlZmluZSBTSUkxNjRfQ09ORklHVVJBVElPTl9QT1dFUl9NQVNLICA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2NF9ERVRFQ1RfSU5URVJSVVBUX01BU0sgICAgICAgICAgICAgICAgMHgwOAorCisvKiBNb25pdG9yIFNlbnNlIE91dHB1dCAoTVNFTikgKi8KKyNkZWZpbmUgU0lJMTY0X0RFVEVDVF9NT05JVE9SX1NFTlNFX09VVFBVVF9ISUdIICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9ERVRFQ1RfTU9OSVRPUl9TRU5TRV9PVVRQVVRfTURJICAgICAgMHgxMAorI2RlZmluZSBTSUkxNjRfREVURUNUX01PTklUT1JfU0VOU0VfT1VUUFVUX1JTRU4gICAgIDB4MjAKKyNkZWZpbmUgU0lJMTY0X0RFVEVDVF9NT05JVE9SX1NFTlNFX09VVFBVVF9IVFBMRyAgICAweDMwCisjZGVmaW5lIFNJSTE2NF9ERVRFQ1RfTU9OSVRPUl9TRU5TRV9PVVRQVVRfRkxBRyAgICAgMHgzMAorCisvKgorICogU2tld2luZyByZWdpc3RlcnMKKyAqLworI2RlZmluZSBTSUkxNjRfREVTS0VXICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MEEKKworLyogR2VuZXJhbCBQdXJwb3NlIElucHV0IChDVExbMzoxXSkgKi8KKyNkZWZpbmUgU0lJMTY0X0RFU0tFV19HRU5FUkFMX1BVUlBPU0VfSU5QVVRfTUFTSyAgICAweDBFCisKKy8qIERlLXNrZXdpbmcgRW5hYmxlIGJpdCAoREtFTikgKi8KKyNkZWZpbmUgU0lJMTY0X0RFU0tFV19ESVNBQkxFICAgICAgICAgICAgICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMHgxMAorCisvKiBEZS1za2V3aW5nIFNldHRpbmcgKERLWzM6MV0pKi8KKyNkZWZpbmUgU0lJMTY0X0RFU0tFV18xX1NURVAgICAgICAgICAgICAgICAgICAgICAgICAweDAwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfMl9TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHgyMAorI2RlZmluZSBTSUkxNjRfREVTS0VXXzNfU1RFUCAgICAgICAgICAgICAgICAgICAgICAgIDB4NDAKKyNkZWZpbmUgU0lJMTY0X0RFU0tFV180X1NURVAgICAgICAgICAgICAgICAgICAgICAgICAweDYwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfNV9TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHg4MAorI2RlZmluZSBTSUkxNjRfREVTS0VXXzZfU1RFUCAgICAgICAgICAgICAgICAgICAgICAgIDB4QTAKKyNkZWZpbmUgU0lJMTY0X0RFU0tFV183X1NURVAgICAgICAgICAgICAgICAgICAgICAgICAweEMwCisjZGVmaW5lIFNJSTE2NF9ERVNLRVdfOF9TVEVQICAgICAgICAgICAgICAgICAgICAgICAgMHhFMAorCisvKgorICogVXNlciBDb25maWd1cmF0aW9uIERhdGEgcmVnaXN0ZXJzIChDRkcgNzowKQorICovCisjZGVmaW5lIFNJSTE2NF9VU0VSX0NPTkZJR1VSQVRJT04gICAgICAgICAgICAgICAgICAgMHgwQgorCisvKgorICogUExMIHJlZ2lzdGVycworICovCisjZGVmaW5lIFNJSTE2NF9QTEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwQworCisvKiBQTEwgRmlsdGVyIFZhbHVlIChQTExGKSAqLworI2RlZmluZSBTSUkxNjRfUExMX0ZJTFRFUl9WQUxVRV9NQVNLICAgICAgICAgICAgICAgIDB4MEUKKworLyogUExMIEZpbHRlciBFbmFibGUgKFBGRU4pICovCisjZGVmaW5lIFNJSTE2NF9QTExfRklMVEVSX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgMHgwMAorI2RlZmluZSBTSUkxNjRfUExMX0ZJTFRFUl9FTkFCTEUgICAgICAgICAgICAgICAgICAgIDB4MDEKKworLyogU3luYyBDb250aW51b3VzIChTQ05UKSAqLworI2RlZmluZSBTSUkxNjRfUExMX0ZJTFRFUl9TWU5DX0NPTlRJTlVPVVNfRElTQUJMRSAgIDB4MDAKKyNkZWZpbmUgU0lJMTY0X1BMTF9GSUxURVJfU1lOQ19DT05USU5VT1VTX0VOQUJMRSAgICAweDgwCisKKyNlbmRpZgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3N3aTJjLmMgYi9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9kZGs3NTBfc3dpMmMuYwpuZXcgZmlsZSBtb2RlIDEwMDY0NAppbmRleCAwMDAwMDAwLi45MDFiMzczCi0tLSAvZGV2L251bGwKKysrIGIvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvZGRrNzUwX3N3aTJjLmMKQEAgLTAsMCArMSw1MjIgQEAKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqCisqICAgICAgICAgQ29weXJpZ2h0IChjKSAyMDA3IGJ5IFNpbGljb24gTW90aW9uLCBJbmMuIChTTUkpCisqCisqICBBbGwgcmlnaHRzIGFyZSByZXNlcnZlZC4gUmVwcm9kdWN0aW9uIG9yIGluIHBhcnQgaXMgcHJvaGliaXRlZAorKiAgd2l0aG91dCB0aGUgd3JpdHRlbiBjb25zZW50IG9mIHRoZSBjb3B5cmlnaHQgb3duZXIuCisqCisqICBzd2kyYy5jIC0tLSBTTTc1MC9TTTcxOCBEREsKKyogIFRoaXMgZmlsZSBjb250YWlucyB0aGUgc291cmNlIGNvZGUgZm9yIEkyQyB1c2luZyBzb2Z0d2FyZQorKiAgaW1wbGVtZW50YXRpb24uCisqCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworI2luY2x1ZGUgImRkazc1MF9oZWxwLmgiCisjaW5jbHVkZSAiZGRrNzUwX3JlZy5oIgorI2luY2x1ZGUgImRkazc1MF9zd2kyYy5oIgorI2luY2x1ZGUgImRkazc1MF9wb3dlci5oIgorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBJMkMgU29mdHdhcmUgTWFzdGVyIERyaXZlcjoKKyAqID09PT09PT09PT09PT09PT09PT09PT09PT09PQorICogRWFjaCBpMmMgY3ljbGUgaXMgc3BsaXQgaW50byA0IHNlY3Rpb25zLiBFYWNoIG9mIHRoZXNlIHNlY3Rpb24gbWFya3MKKyAqIGEgcG9pbnQgaW4gdGltZSB3aGVyZSB0aGUgU0NMIG9yIFNEQSBtYXkgYmUgY2hhbmdlZC4KKyAqCisgKiAxIEN5Y2xlID09IHwgIFNlY3Rpb24gSS4gfCAgU2VjdGlvbiAyLiB8ICBTZWN0aW9uIDMuIHwgIFNlY3Rpb24gNC4gfAorICogICAgICAgICAgICArLS0tLS0tLS0tLS0tLSstLS0tLS0tLS0tLS0tKy0tLS0tLS0tLS0tLS0rLS0tLS0tLS0tLS0tLSsKKyAqICAgICAgICAgICAgfCBTQ0wgc2V0IExPVyB8U0NMIG5vIGNoYW5nZXwgU0NMIHNldCBISUdIfFNDTCBubyBjaGFuZ2V8CisgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfX19fX19fX19fX18gX19fX19fX19fX19fXworICogU0NMID09IFhYWFggX19fX19fX19fX19fXyBfX19fX19fX19fX18gLworICoKKyAqIEkuZS4gdGhlIFNDTCBtYXkgb25seSBiZSBjaGFuZ2VkIGluIHNlY3Rpb24gMS4gYW5kIHNlY3Rpb24gMy4gd2hpbGUKKyAqIHRoZSBTREEgbWF5IG9ubHkgYmUgY2hhbmdlZCBpbiBzZWN0aW9uIDIuIGFuZCBzZWN0aW9uIDQuIFRoZSB0YWJsZQorICogYmVsb3cgZ2l2ZXMgdGhlIGNoYW5nZXMgZm9yIHRoZXNlIDIgbGluZXMgaW4gdGhlIHZhcmlvcyBzZWN0aW9ucy4KKyAqCisgKiBTZWN0aW9uIGNoYW5nZXMgVGFibGU6CisgKiA9PT09PT09PT09PT09PT09PT09PT09CisgKiBibGFuayA9IG5vIGNoYW5nZSwgTCA9IHNldCBiaXQgTE9XLCBIID0gc2V0IGJpdCBISUdICisgKgorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHwgMS58IDIufCAzLnwgNC58CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqICAgICAgICAgICAgICAgICBUeCBTdGFydCAgIFNEQSB8ICAgfCBIIHwgICB8IEwgfAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgU0NMIHwgTCB8ICAgfCBIIHwgICB8CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqICAgICAgICAgICAgICAgICBUeCBTdG9wICAgIFNEQSB8ICAgfCBMIHwgICB8IEggfAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgU0NMIHwgTCB8ICAgfCBIIHwgICB8CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqICAgICAgICAgICAgICAgICBUeCBiaXQgSCAgIFNEQSB8ICAgfCBIIHwgICB8ICAgfAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgU0NMIHwgTCB8ICAgfCBIIHwgICB8CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqICAgICAgICAgICAgICAgICBUeCBiaXQgTCAgIFNEQSB8ICAgfCBMIHwgICB8ICAgfAorICogICAgICAgICAgICAgICAgICAgICAgICAgICAgU0NMIHwgTCB8ICAgfCBIIHwgICB8CisgKiAgICAgICAgICAgICAgICAgLS0tLS0tLS0tLS0tLS0tKy0tLSstLS0rLS0tKy0tLSsKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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gZnVuY3Rpb24gc2VuZHMgQUNLIHNpZ25hbAorICovCitzdGF0aWMgdm9pZCBzd0kyQ0Fjayh2b2lkKQoreworICAgIHJldHVybjsgIC8qIFNpbmdsZSBieXRlIHJlYWQgaXMgb2sgd2l0aG91dCBpdC4gKi8KK30KKworLyoKKyAqICBUaGlzIGZ1bmN0aW9uIHNlbmRzIHRoZSBzdGFydCBjb21tYW5kIHRvIHRoZSBzbGF2ZSBkZXZpY2UKKyAqLworc3RhdGljIHZvaWQgc3dJMkNTdGFydCh2b2lkKQoreworICAgIC8qIFN0YXJ0IEkyQyAqLworICAgIHN3STJDU0RBKDEpOworICAgIHN3STJDU0NMKDEpOworICAgIHN3STJDU0RBKDApOworfQorCisvKgorICogIFRoaXMgZnVuY3Rpb24gc2VuZHMgdGhlIHN0b3AgY29tbWFuZCB0byB0aGUgc2xhdmUgZGV2aWNlCisgKi8KK3N0YXRpYyB2b2lkIHN3STJDU3RvcCh2b2lkKQoreworICAgIC8qIFN0b3AgdGhlIEkyQyAqLworICAgIHN3STJDU0NMKDEpOworICAgIHN3STJDU0RBKDApOworICAgIHN3STJDU0RBKDEpOworfQorCisvKgorICogIFRoaXMgZnVuY3Rpb24gd3JpdGVzIG9uZSBieXRlIHRvIHRoZSBzbGF2ZSBkZXZpY2UKKyAqCisgKiAgUGFyYW1ldGVyczoKKyAqICAgICAgZGF0YSAgICAtIERhdGEgdG8gYmUgd3JpdGUgdG8gdGhlIHNsYXZlIGRldmljZQorICoKKyAqICBSZXR1cm4gVmFsdWU6CisgKiAgICAgICAwICAgLSBTdWNjZXNzCisgKiAgICAgIC0xICAgLSBGYWlsIHRvIHdyaXRlIGJ5dGUKKyAqLworc3RhdGljIGxvbmcgc3dJMkNXcml0ZUJ5dGUodW5zaWduZWQgY2hhciBkYXRhKQoreworICAgIHVuc2lnbmVkIGNoYXIgdmFsdWUgPSBkYXRhOworICAgIGludCBpOworCisgICAgLyogU2VuZGluZyB0aGUgZGF0YSBiaXQgYnkgYml0ICovCisgICAgZm9yIChpPTA7IGk8ODsgaSsrKQorICAgIHsKKyAgICAgICAgLyogU2V0IFNDTCB0byBsb3cgKi8KKyAgICAgICAgc3dJMkNTQ0woMCk7CisKKyAgICAgICAgLyogU2VuZCBkYXRhIGJpdCAqLworICAgICAgICBpZiAoKHZhbHVlICYgMHg4MCkgIT0gMCkKKyAgICAgICAgICAgIHN3STJDU0RBKDEpOworICAgICAgICBlbHNlCisgICAgICAgICAgICBzd0kyQ1NEQSgwKTsKKworICAgICAgICBzd0kyQ1dhaXQoKTsKKworICAgICAgICAvKiBUb2dnbGUgY2xrIGxpbmUgdG8gb25lICovCisgICAgICAgIHN3STJDU0NMKDEpOworICAgICAgICBzd0kyQ1dhaXQoKTsKKworICAgICAgICAvKiBTaGlmdCBieXRlIHRvIGJlIHNlbnQgKi8KKyAgICAgICAgdmFsdWUgPSB2YWx1ZSA8PCAxOworICAgIH0KKworICAgIC8qIFNldCB0aGUgU0NMIExvdyBhbmQgU0RBIEhpZ2ggKHByZXBhcmUgdG8gZ2V0IGlucHV0KSAqLworICAgIHN3STJDU0NMKDApOworICAgIHN3STJDU0RBKDEpOworCisgICAgLyogU2V0IHRoZSBTQ0wgSGlnaCBmb3IgYWNrICovCisgICAgc3dJMkNXYWl0KCk7CisgICAgc3dJMkNTQ0woMSk7CisgICAgc3dJMkNXYWl0KCk7CisKKyAgICAvKiBSZWFkIFNEQSwgdW50aWwgU0RBPT0wICovCisgICAgZm9yKGk9MDsgaTwweGZmOyBpKyspCisgICAgeworICAgICAgICBpZiAoIXN3STJDUmVhZFNEQSgpKQorICAgICAgICAgICAgYnJlYWs7CisKKyAgICAgICAgc3dJMkNTQ0woMCk7CisgICAgICAgIHN3STJDV2FpdCgpOworICAgICAgICBzd0kyQ1NDTCgxKTsKKyAgICAgICAgc3dJMkNXYWl0KCk7CisgICAgfQorCisgICAgLyogU2V0IHRoZSBTQ0wgTG93IGFuZCBTREEgSGlnaCAqLworICAgIHN3STJDU0NMKDApO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gICAgICAgICAgIFBFRUszMihnX2kyY0Nsa0dQSU9NdXhSZWcpICYgfigxIDw8IGdfaTJjQ2xvY2tHUElPKSk7CisgICAgUE9LRTMyKGdfaTJjRGF0YUdQSU9NdXhSZWcsCisgICAgICAgICAgICAgICAgICAgICAgUEVFSzMyKGdfaTJjRGF0YUdQSU9NdXhSZWcpICYgfigxIDw8IGdfaTJjRGF0YUdQSU8pKTsKKworICAgIC8qIEVuYWJsZSBHUElPIHBvd2VyICovCisgICAgZW5hYmxlR1BJTygxKTsKKworICAgIC8qIENsZWFyIHRoZSBpMmMgbGluZXMuICovCisgICAgZm9yKGk9MDsgaTw5OyBpKyspCisgICAgICAgIHN3STJDU3RvcCgpOworCisgICAgcmV0dXJuIDA7Cit9CisKKy8qCisgKiAgVGhpcyBmdW5jdGlvbiByZWFkcyB0aGUgc2xhdmUgZGV2aWNlJ3MgcmVnaXN0ZXIKKyAqCisgKiAgUGFyYW1ldGVyczoKKyAqICAgICAgZGV2aWNlQWRkcmVzcyAgIC0gaTJjIFNsYXZlIGRldmljZSBhZGRyZXNzIHdoaWNoIHJlZ2lzdGVyCisgKiAgICAgICAgICAgICAgICAgICAgICAgIHRvIGJlIHJlYWQgZnJvbQorICogICAgICByZWdpc3RlckluZGV4ICAgLSBTbGF2ZSBkZXZpY2UncyByZWdpc3RlciB0byBiZSByZWFkCisgKgorICogIFJldHVybiBWYWx1ZToKKyAqICAgICAgUmVnaXN0ZXIgdmFsdWUKKyAqLwordW5zaWduZWQgY2hhciBzd0kyQ1JlYWRSZWcoCisgICAgdW5zaWduZWQgY2hhciBkZXZpY2VBZGRyZXNzLAorICAgIHVuc2lnbmVkIGNoYXIgcmVnaXN0ZXJJbmRleAorKQoreworICAgIHVuc2lnbmVkIGNoYXIgZGF0YTsKKworICAgIC8qIFNlbmQgdGhlIFN0YXJ0IHNpZ25hbCAqLworICAgIHN3STJDU3RhcnQoKTsKKworICAgIC8qIFNlbmQgdGhlIGRldmljZSBhZGRyZXNzICov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yYworICogICAgICAgMCAgIC0gU3VjY2VzcworICovCitsb25nIHN3STJDSW5pdCgKKyAgICB1bnNpZ25lZCBjaGFyIGkyY0Nsa0dQSU8sCisgICAgdW5zaWduZWQgY2hhciBpMmNEYXRhR1BJTworKTsKKworLyoKKyAqICBUaGlzIGZ1bmN0aW9uIHJlYWRzIHRoZSBzbGF2ZSBkZXZpY2UncyByZWdpc3RlcgorICoKKyAqICBQYXJhbWV0ZXJzOgorICogICAgICBkZXZpY2VBZGRyZXNzICAgLSBpMmMgU2xhdmUgZGV2aWNlIGFkZHJlc3Mgd2hpY2ggcmVnaXN0ZXIKKyAqICAgICAgICAgICAgICAgICAgICAgICAgdG8gYmUgcmVhZCBmcm9tCisgKiAgICAgIHJlZ2lzdGVySW5kZXggICAtIFNsYXZlIGRldmljZSdzIHJlZ2lzdGVyIHRvIGJlIHJlYWQKKyAqCisgKiAgUmV0dXJuIFZhbHVlOgorICogICAgICBSZWdpc3RlciB2YWx1ZQorICovCit1bnNpZ25lZCBjaGFyIHN3STJDUmVhZFJlZygKKyAgICB1bnNpZ25lZCBjaGFyIGRldmljZUFkZHJlc3MsCisgICAgdW5zaWduZWQgY2hhciByZWdpc3RlckluZGV4CispOworCisvKgorICogIFRoaXMgZnVuY3Rpb24gd3JpdGVzIGEgdmFsdWUgdG8gdGhlIHNsYXZlIGRldmljZSdzIHJlZ2lzdGVyCisgKgorICogIFBhcmFtZXRlcnM6CisgKiAgICAgIGRldmljZUFkZHJlc3MgICAtIGkyYyBTbGF2ZSBkZXZpY2UgYWRkcmVzcyB3aGljaCByZWdpc3RlcgorICogICAgICAgICAgICAgICAgICAgICAgICB0byBiZSB3cml0dGVuCisgKiAgICAgIHJlZ2lzdGVySW5kZXggICAtIFNsYXZlIGRldmljZSdzIHJlZ2lzdGVyIHRvIGJlIHdyaXR0ZW4KKyAqICAgICAgZGF0YSAgICAgICAgICAgIC0gRGF0YSB0byBiZSB3cml0dGVuIHRvIHRoZSByZWdpc3RlcgorICoK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RoIGFuZCBoZWlnaHQgb2YgcmVjdGFuZ2xlIGluIHBpeGVsIHZhbHVlICovCit1bnNpZ25lZCBpbnQgcm9wMikgICAvKiBST1AgdmFsdWUgKi8KK3sKKyAgICB1bnNpZ25lZCBpbnQgbkRpcmVjdGlvbiwgZGVfY3RybDsKKyAgICBpbnQgb3BTaWduOworICAgIG5EaXJlY3Rpb24gPSBMRUZUX1RPX1JJR0hUOworCS8qIERpcmVjdGlvbiBvZiBST1AyIG9wZXJhdGlvbjogMSA9IExlZnQgdG8gUmlnaHQsICgtMSkgPSBSaWdodCB0byBMZWZ0ICovCisgICAgb3BTaWduID0gMTsKKyAgICBkZV9jdHJsID0gMDsKKworICAgIC8qIElmIHNvdXJjZSBhbmQgZGVzdGluYXRpb24gYXJlIHRoZSBzYW1lIHN1cmZhY2UsIG5lZWQgdG8gY2hlY2sgZm9yIG92ZXJsYXkgY2FzZXMgKi8KKyAgICBpZiAoc0Jhc2UgPT0gZEJhc2UgJiYgc1BpdGNoID09IGRQaXRjaCkKKyAgICB7CisgICAgICAgIC8qIERldGVybWluZSBkaXJlY3Rpb24gb2Ygb3BlcmF0aW9uICovCisgICAgICAgIGlmIChzeSA8IGR5KQorICAgICAgICB7CisgICAgICAgICAgICAvKiArLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgIHxTICAgICAgICAgfAorICAgICAgICAgICAgICAgfCAgICstLS0tLS0tLS0tKworICAgICAgICAgICAgICAgfCAgIHwgICAgICB8ICAgfAorICAgICAgICAgICAgICAgfCAgIHwgICAgICB8ICAgfAorICAgICAgICAgICAgICAgKy0tLXwtLS0tLS0rICAgfAorICAgICAgICAgICAgICAgICAgIHwgICAgICAgICBEfAorICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tKyAqLworCisgICAgICAgICAgICBuRGlyZWN0aW9uID0gQk9UVE9NX1RPX1RPUDsKKyAgICAgICAgfQorICAgICAgICBlbHNlIGlmIChzeSA+IGR5KQorICAgICAgICB7CisgICAgICAgICAgICAvKiArLS0tLS0tLS0tLSsKKyAgICAgICAgICAgICAgIHxEICAgICAgICAgfAorICAgICAgICAgICAgICAgfCAgICstLS0tLS0tLS0tKworICAgICAgICAgICAgICAgfCAgIHwgICAgICB8ICAgfAorICAgICAgICAgICAgICAgfCAgIHwgICAgICB8ICAgfAorICAgICAgICAgICAgICAgKy0tLXwtLS0tLS0rICAgfAorICAgICAgICAgICAgICAgICAgIHwgICAgICAgICBTfAorICAgICAgICAgICAgICAgICAgICstLS0tLS0tLS0tKyAqLworCisgICAgICAgICAgICBuRGlyZWN0aW9uID0gVE9QX1RPX0JPVFRPTTsKKyAgICAgICAgfQorICAgICAgICBlbHNlCisgICAgICAgIHsKKyAgICAgICAgICAgIC8qIHN5ID09IGR5ICovCisKKyAgICAgICAgICAgIGlmIChzeCA8PSBkeCkKKyAgICAgICAgICAgIHsKKyAgICAgICAgICAgICAgICAvKiArLS0tLS0tKy0tLSstLS0tLS0rCisgICAgICAgICAgICAgICAgICAgfFMgICAgIHwgICB8ICAgICBEfAorICAgICAgICAgICAgICAgICAgIHwgICAgICB8ICAgfCAgICAgIHwKKyAgICAgICAgICAgICAgICAgICB8ICAgICAgfCAgIHwgICAgICB8CisgICAgICAgICAgICAgICAgICAgfCAgICAgIHwgICB8ICAgICAgfAorICAgICAgICAgICAgICAgICAgICstLS0tLS0rLS0tKy0tLS0tLSsgKi8KKworICAgICAgICAgICAgICAgIG5EaXJlY3Rpb24gPSBSSUdIVF9UT19MRUZUOworICAgICAgICAgICAgfQorICAgICAgICAgICAgZWxzZQorICAgICAgICAgICAgeworICAgICAgICAgICAgICAgIC8qIHN4ID4gZHggKi8KKworICAgICAgICAgICAgICAgIC8qICstLS0tLS0rLS0tKy0tLS0tLSsKKyAgICAgICAgICAgICAgICAgICB8RCAgICAgfCAgIHwgICAgIFN8CisgICAgICAgICAgICAgICAgICAgfCAgICAgIHwgICB8ICAgICAgfAorICAgICAgICAgICAgICAgICAgIHwgICAgICB8ICAgfCAgICAg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7Ly9kcHIwOAorCisgICAgICAgIGRlX2N0cmwgPQorICAgICAgICAgICAgRklFTERfVkFMVUUoMCwgREVfQ09OVFJPTCwgUk9QLCByb3AyKSB8CisgICAgICAgICAgICBGSUVMRF9TRVQoMCwgREVfQ09OVFJPTCwgUk9QX1NFTEVDVCwgUk9QMikgfAorICAgICAgICAgICAgRklFTERfU0VUKDAsIERFX0NPTlRST0wsIENPTU1BTkQsIEJJVEJMVCkgfAorICAgICAgICAgICAgKChuRGlyZWN0aW9uID09IFJJR0hUX1RPX0xFRlQpID8KKyAgICAgICAgICAgIEZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBESVJFQ1RJT04sIFJJR0hUX1RPX0xFRlQpCisgICAgICAgICAgICA6IEZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBESVJFQ1RJT04sIExFRlRfVE9fUklHSFQpKSB8CisgICAgICAgICAgICBGSUVMRF9TRVQoMCwgREVfQ09OVFJPTCwgU1RBVFVTLCBTVEFSVCk7CisJCXdyaXRlX2RwcihhY2NlbCxERV9DT05UUk9MLGRlX2N0cmwpOy8vZHByMGMKKyAgICB9CisKKyAgICByZXR1cm4gMDsKK30KKworc3RhdGljIHVuc2lnbmVkIGludCBkZUdldFRyYW5zcGFyZW5jeShzdHJ1Y3QgbHlueF9hY2NlbCAqIGFjY2VsKQoreworICAgIHVuc2lnbmVkIGludCBkZV9jdHJsOworCisgICAgZGVfY3RybCA9IHJlYWRfZHByKGFjY2VsLERFX0NPTlRST0wpOworCisgICAgZGVfY3RybCAmPQorICAgICAgICBGSUVMRF9NQVNLKERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX01BVENIKSB8CisgICAgICAgIEZJRUxEX01BU0soREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfU0VMRUNUKXwKKyAgICAgICAgRklFTERfTUFTSyhERV9DT05UUk9MX1RSQU5TUEFSRU5DWSk7CisKKyAgICByZXR1cm4gZGVfY3RybDsKK30KKworaW50IGh3X2ltYWdlY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LCAgICB3aWR0aCkgfAorICAgICAgICBGSUVMRF9WQUxVRSgwLCBERV9ESU1FTlNJT04sIFlfRVQsIGhlaWdodCkpOy8vZHByMDgKKworICAgIHdyaXRlX2RwcihhY2NlbCxERV9GT1JFR1JPVU5ELCBmQ29sb3IpOworICAgIHdyaXRlX2RwcihhY2NlbCxERV9CQUNLR1JPVU5ELCBiQ29sb3IpOworCisJZGVfY3RybCA9IEZJRUxEX1ZBTFVFKDAsIERFX0NPTlRST0wsIFJPUCwgcm9wMikgICAgICAgICB8CisJCUZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBST1BfU0VMRUNULCBST1AyKSAgICB8CisJCUZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBDT01NQU5ELCBIT1NUX1dSSVRFKSB8CisJCUZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBIT1NULCBNT05PKSAgICAgICAgICB8CisJCUZJRUxEX1NFVCgwLCBERV9DT05UUk9MLCBTVEFUVVMsIFNUQVJUKTsKKworCXdyaXRlX2RwcihhY2NlbCxERV9DT05UUk9MLCBkZV9jdHJsIHwgZGVHZXRUcmFuc3BhcmVuY3koYWNjZWwpKTsKKworICAgIC8qIFdyaXRlIE1PTk8gZGF0YSAobGluZSBieSBsaW5lKSB0byAyRCBFbmdpbmUgZGF0YSBwb3J0ICovCisgICAgZm9yIChpPTA7IGk8aGVpZ2h0OyBpKyspCisgICAgeworICAgICAgICAvKiBGb3IgZWFjaCBsaW5lLCBzZW5kIHRoZSBkYXRhIGluIGNodW5rcyBvZiA0IGJ5dGVzICovCisgICAgICAgIGZvciAoaj0wOyBqPCh1bDRCeXRlc1BlclNjYW4vNCk7IGorKykKKyAgICAgICAgeworICAgICAgICAgICAgd3JpdGVfZHBQb3J0KGFjY2VsLCAqKHVuc2lnbmVkIGludCAqKShwU3JjYnVmICsgKGogKiA0KSkpOworICAgICAgICB9CisKKyAgICAgICAgaWYgKHVsQnl0ZXNSZW1haW4pCisgICAgICAgIHsKKyAg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qIHR5cGUxIGRhdGEgcG9ydCBhZGRyZXNzIGlzIGF0IG1tcmVnXzB4MTEwMDAwKi8KKyNkZWZpbmUgREVfUE9SVF9BRERSX1RZUEUxIDB4MTEwMDAwCisvKiBmb3Igc203MTIsZGF0YSBwb3J0IGFkZHJlc3MgaXMgYXQgbW1yZWdfMCAqLworI2RlZmluZSBERV9QT1JUX0FERFJfVFlQRTIgMHgxMDAwMDAKKy8qIGZvciBzbTcyMixkYXRhIHBvcnQgYWRkcmVzcyBpcyBhdCBtbXJlZ18xbWIgKi8KKyNkZWZpbmUgREVfUE9SVF9BRERSX1RZUEUzIDB4MTAwMDAwCisKKyNkZWZpbmUgREVfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwCisjZGVmaW5lIERFX1NPVVJDRV9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX1NPVVJDRV9XUkFQX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU09VUkNFX1dSQVBfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9TT1VSQ0VfWF9LMSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOToxNgorI2RlZmluZSBERV9TT1VSQ0VfWV9LMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisjZGVmaW5lIERFX1NPVVJDRV9YX0sxX01PTk8gCQkJCQkJCTIwOjE2CisKKyNkZWZpbmUgREVfREVTVElOQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjMxCisjZGVmaW5lIERFX0RFU1RJTkFUSU9OX1dSQVBfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfREVTVElOQVRJT05fV1JBUF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9ERVNUSU5BVElPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoxNgorI2RlZmluZSBERV9ERVNUSU5BVElPTl9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgREVfRElNRU5TSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4CisjZGVmaW5lIERFX0RJTUVOU0lPTl9YICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisjZGVmaW5lIERFX0RJTUVOU0lPTl9ZX0VUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjAKKworI2RlZmluZSBERV9DT05UUk9MICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweEMKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEFUVVMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MzEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEFUVVNfU1RPUCAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NUQVRVU19TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfUEFUVEVSTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMwOjMwCisjZGVmaW5lIERFX0NPTlRST0xfUEFUVEVSTl9NT05PICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9QQVRURVJOX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1VQREFURV9ERVNUSU5BVElPTl9YICAgICAgICAgICAgICAgICAyOToyOQorI2RlZmluZSBERV9DT05UUk9MX1VQREFURV9ERVNUSU5BVElPTl9YX0RJU0FCTEUgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfVVBEQVRFX0RFU1RJTkFUSU9OX1hfRU5BQkxFICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9RVUlDS19TVEFSVCAgICAgICAgICAgICAgICAgICAgICAgICAgMjg6MjgKKyNkZWZpbmUgREVfQ09OVFJPTF9RVUlDS19TVEFSVF9ESVNBQkxFICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1FVSUNLX1NUQVJUX0VOQUJMRSAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfRElSRUNUSU9OICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIERFX0NPTlRST0xfRElSRUNUSU9OX0xFRlRfVE9fUklHSFQgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9ESVJFQ1RJT05fUklHSFRfVE9fTEVGVCAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX01BSk9SICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNjoyNgorI2RlZmluZSBERV9DT05UUk9MX01BSk9SX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfTUFKT1JfWSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU6MjUKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1hfUE9TSVRJVkUgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1NURVBfWF9ORUdBVElWRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9ZICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0OjI0CisjZGVmaW5lIERFX0NPTlRST0xfU1RFUF9ZX1BPU0lUSVZFICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TVEVQX1lfTkVHQVRJVkUgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1NUUkVUQ0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMzoyMworI2RlZmluZSBERV9DT05UUk9MX1NUUkVUQ0hfRElTQUJMRSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU1RSRVRDSF9FTkFCTEUgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9IT1NUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjI6MjIKKyNkZWZpbmUgREVfQ09OVFJPTF9IT1NUX0NPTE9SICAgICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX0hPU1RfTU9OTyAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfTEFTVF9QSVhFTCAgICAgICAgICAgICAgICAgICAgICAgICAgIDIxOjIxCisjZGVmaW5lIERFX0NPTlRST0xfTEFTVF9QSVhFTF9PRkYgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9MQVNUX1BJWEVMX09OICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMDoxNgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfQklUQkxUICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9SRUNUQU5HTEVfRklMTCAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0RFX1RJTEUgICAgICAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfVFJBUEVaT0lEX0ZJTEwgICAgICAgICAgICAgICAzCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9BTFBIQV9CTEVORCAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX1JMRV9TVFJJUCAgICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfU0hPUlRfU1RST0tFICAgICAgICAgICAgICAgICA2CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9MSU5FX0RSQVcgICAgICAgICAgICAgICAgICAgIDcKKyNkZWZpbmUgREVfQ09OVFJPTF9DT01NQU5EX0hPU1RfV1JJVEUgICAgICAgICAgICAgICAgICAgOAorI2RlZmluZSBERV9DT05UUk9MX0NPTU1BTkRfSE9TVF9SRUFEICAgICAgICAgICAgICAgICAgICA5CisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9IT1NUX1dSSVRFX0JPVFRPTV9VUCAgICAgICAgIDEwCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9ST1RBVEUgICAgICAgICAgICAgICAgICAgICAgIDExCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9GT05UICAgICAgICAgICAgICAgICAgICAgICAgIDEyCisjZGVmaW5lIERFX0NPTlRST0xfQ09NTUFORF9URVhUVVJFX0xPQUQgICAgICAgICAgICAgICAgIDE1CisjZGVmaW5lIERFX0NPTlRST0xfUk9QX1NFTEVDVCAgICAgICAgICAgICAgICAgICAgICAgICAgIDE1OjE1CisjZGVmaW5lIERFX0NPTlRST0xfUk9QX1NFTEVDVF9ST1AzICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1BfU0VMRUNUX1JPUDIgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1JPUDJfU09VUkNFICAgICAgICAgICAgICAgICAgICAgICAgICAxNDoxNAorI2RlZmluZSBERV9DT05UUk9MX1JPUDJfU09VUkNFX0JJVE1BUCAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUk9QMl9TT1VSQ0VfUEFUVEVSTiAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEEgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTM6MTIKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEFfTk9UX1BBQ0tFRCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX01PTk9fREFUQV84X1BBQ0tFRCAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfTU9OT19EQVRBXzE2X1BBQ0tFRCAgICAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfQ09OVFJPTF9NT05PX0RBVEFfMzJfUEFDS0VEICAgICAgICAgICAgICAgICAgMworI2RlZmluZSBERV9DT05UUk9MX1JFUEVBVF9ST1RBVEUgICAgICAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBERV9DT05UUk9MX1JFUEVBVF9ST1RBVEVfRElTQUJMRSAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfUkVQRUFUX1JPVEFURV9FTkFCTEUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfTUFUQ0ggICAgICAgICAgICAgICAgICAgMTA6MTAKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfTUFUQ0hfT1BBUVVFICAgICAgICAgICAgMAorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9NQVRDSF9UUkFOU1BBUkVOVCAgICAgICAxCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX1NFTEVDVCAgICAgICAgICAgICAgICAgIDk6OQorI2RlZmluZSBERV9DT05UUk9MX1RSQU5TUEFSRU5DWV9TRUxFQ1RfU09VUkNFICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX1NFTEVDVF9ERVNUSU5BVElPTiAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1kgICAgICAgICAgICAgICAgICAgICAgICAgODo4CisjZGVmaW5lIERFX0NPTlRST0xfVFJBTlNQQVJFTkNZX0RJU0FCTEUgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9UUkFOU1BBUkVOQ1lfRU5BQkxFICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1JPUCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworLy8gUHNldWRvIGZpZWxkcy4KKworI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVIgICAgICAgICAgICAgICAgICAgICAyNzoyNAorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMjI1ICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8xMzUgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzMxNSAgICAgICAgICAgICAgICAgMgorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfNDUgICAgICAgICAgICAgICAgICAzCisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8yNzAgICAgICAgICAgICAgICAgIDQKKyNkZWZpbmUgREVfQ09OVFJPTF9TSE9SVF9TVFJPS0VfRElSXzkwICAgICAgICAgICAgICAgICAgNQorI2RlZmluZSBERV9DT05UUk9MX1NIT1JUX1NUUk9LRV9ESVJfMTgwICAgICAgICAgICAgICAgICA4CisjZGVmaW5lIERFX0NPTlRST0xfU0hPUlRfU1RST0tFX0RJUl8wICAgICAgICAgICAgICAgICAgIDEwCisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT04gICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1OjI0CisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT05fMCAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ09OVFJPTF9ST1RBVElPTl8yNzAgICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DT05UUk9MX1JPVEFUSU9OXzkwICAgICAgICAgICAgICAgICAgICAgICAgICAyCisjZGVmaW5lIERFX0NPTlRST0xfUk9UQVRJT05fMTgwICAgICAgICAgICAgICAgICAgICAgICAgIDMKKworI2RlZmluZSBERV9QSVRDSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAxMAorI2RlZmluZSBERV9QSVRDSF9ERVNUSU5BVElPTiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyODoxNgorI2RlZmluZSBERV9QSVRDSF9TT1VSQ0UgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjowCisKKyNkZWZpbmUgREVfRk9SRUdST1VORCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMTQKKyNkZWZpbmUgREVfRk9SRUdST1VORF9DT0xPUiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX0JBQ0tHUk9VTkQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDE4CisjZGVmaW5lIERFX0JBQ0tHUk9VTkRfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjAKKworI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAxQworI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1hZICAgICAgICAgICAgICAgICAgICAzMDozMAorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QQVRURVJOX1hZX05PUk1BTCAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BBVFRFUk5fWFlfT1ZFUldSSVRFICAgICAgICAgIDEKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9ZICAgICAgICAgICAgICAgICAgICAgMjk6MjcKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUEFUVEVSTl9YICAgICAgICAgICAgICAgICAgICAgMjU6MjMKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUICAgICAgICAgICAgICAgICAgMjE6MjAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUXzggICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVFJFVENIX0ZPUk1BVF9QSVhFTF9GT1JNQVRfMTYgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX1BJWEVMX0ZPUk1BVF8zMiAgICAgICAgICAgICAgIDIKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfUElYRUxfRk9STUFUXzI0ICAgICAgICAgICAgICAgMworCisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkcgICAgICAgICAgICAgICAgICAgIDE5OjE2CisjZGVmaW5lIERFX1NUUkVUQ0hfRk9STUFUX0FERFJFU1NJTkdfWFkgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfQUREUkVTU0lOR19MSU5FQVIgICAgICAgICAgICAgMTUKKyNkZWZpbmUgREVfU1RSRVRDSF9GT1JNQVRfU09VUkNFX0hFSUdIVCAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIERFX0NPTE9SX0NPTVBBUkUgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDIwCisjZGVmaW5lIERFX0NPTE9SX0NPTVBBUkVfQ09MT1IgICAgICAgICAgICAgICAgICAgICAgICAgIDIzOjAKKworI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAyNAorI2RlZmluZSBERV9DT0xPUl9DT01QQVJFX01BU0tfTUFTS1MgICAgICAgICAgICAgICAgICAgICAyMzowCisKKyNkZWZpbmUgREVfTUFTS1MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMjgKKyNkZWZpbmUgREVfTUFTS1NfQllURV9NQVNLICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzE6MTYKKyNkZWZpbmUgREVfTUFTS1NfQklUX01BU0sgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU6MAorCisjZGVmaW5lIERFX0NMSVBfVEwgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDJDCisjZGVmaW5lIERFX0NMSVBfVExfVE9QICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEzOjEzCisjZGVmaW5lIERFX0NMSVBfVExfU1RBVFVTX0RJU0FCTEUgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfQ0xJUF9UTF9TVEFUVVNfRU5BQkxFICAgICAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjoxMgorI2RlZmluZSBERV9DTElQX1RMX0lOSElCSVRfT1VUU0lERSAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX0NMSVBfVExfSU5ISUJJVF9JTlNJREUgICAgICAgICAgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfQ0xJUF9UTF9MRUZUICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTE6MAorCisjZGVmaW5lIERFX0NMSVBfQlIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDMwCisjZGVmaW5lIERFX0NMSVBfQlJfQk9UVE9NICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMxOjE2CisjZGVmaW5lIERFX0NMSVBfQlJfUklHSFQgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9NT05PX1BBVFRFUk5fTE9XICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDAzNAorI2RlZmluZSBERV9NT05PX1BBVFRFUk5fTE9XX1BBVFRFUk4gICAgICAgICAgICAgICAgICAgICAzMTowCisKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0hJR0ggICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwMzgKKyNkZWZpbmUgREVfTU9OT19QQVRURVJOX0hJR0hfUEFUVEVSTiAgICAgICAgICAgICAgICAgICAgMzE6MAorCisjZGVmaW5lIERFX1dJTkRPV19XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDAwMDNDCisjZGVmaW5lIERFX1dJTkRPV19XSURUSF9ERVNUSU5BVElPTiAgICAgICAgICAgICAgICAgICAgIDI4OjE2CisjZGVmaW5lIERFX1dJTkRPV19XSURUSF9TT1VSQ0UgICAgICAgICAgICAgICAgICAgICAgICAgIDEyOjAKKworI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0UgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0MAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUICAgICAgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfRVhUX0xPQ0FMICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9FWFRfRVhURVJOQUwgICAgICAgICAgICAgIDEKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTICAgICAgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfV0lORE9XX1NPVVJDRV9CQVNFX0NTXzAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfU09VUkNFX0JBU0VfQ1NfMSAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19TT1VSQ0VfQkFTRV9BRERSRVNTICAgICAgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRSAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0NAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFQgICAgICAgICAgICAgICAgICAyNzoyNworI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9FWFRfTE9DQUwgICAgICAgICAgICAwCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0VYVF9FWFRFUk5BTCAgICAgICAgIDEKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1MgICAgICAgICAgICAgICAgICAgMjY6MjYKKyNkZWZpbmUgREVfV0lORE9XX0RFU1RJTkFUSU9OX0JBU0VfQ1NfMCAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9XSU5ET1dfREVTVElOQVRJT05fQkFTRV9DU18xICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1dJTkRPV19ERVNUSU5BVElPTl9CQVNFX0FERFJFU1MgICAgICAgICAgICAgIDI1OjAKKworI2RlZmluZSBERV9BTFBIQSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0OAorI2RlZmluZSBERV9BTFBIQV9WQUxVRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3OjAKKworI2RlZmluZSBERV9XUkFQICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAweDAwMDA0QworI2RlZmluZSBERV9XUkFQX1ggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBERV9XUkFQX1kgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgREVfU1RBVFVTICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMDAwNTAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMToxCisjZGVmaW5lIERFX1NUQVRVU19DU0NfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTX0NTQ19OT1RfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBERV9TVEFUVVNfQ1NDX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIERFX1NUQVRVU18yRCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA6MAorI2RlZmluZSBERV9TVEFUVVNfMkRfQ0xFQVIgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwCisjZGVmaW5lIERFX1NUQVRVU18yRF9OT1RfQUNUSVZFICAgICAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgREVfU1RBVFVTXzJEX0FDVElWRSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMQorCisKKworLyogYmx0IGRpcmVjdGlvbiAqLworI2RlZmluZSBUT1BfVE9fQk9UVE9NIDAKKyNkZWZpbmUgTEVGVF9UT19SSUdIVCAwCisjZGVmaW5lIEJPVFRPTV9UT19UT1AgMQorI2RlZmluZSBSSUdIVF9UT19MRUZUIDEKKwordm9pZCBod19zZXQyZGZvcm1hdChzdHJ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3JlZW5faW5mby5oPgorCisjaW5jbHVkZSAic203NTAuaCIKKyNpbmNsdWRlICJzbTc1MF9oZWxwLmgiCisjaW5jbHVkZSAic203NTBfY3Vyc29yLmgiCisKKworI2RlZmluZSBQRUVLMzIoYWRkcikgXAorcmVhZGwoY3Vyc29yLT5tbWlvICsgKGFkZHIpKQorCisjZGVmaW5lIFBPS0UzMihhZGRyLGRhdGEpIFwKK3dyaXRlbCgoZGF0YSksY3Vyc29yLT5tbWlvICsgKGFkZHIpKQorCisvKiBjdXJzb3IgY29udHJvbCBmb3Igdm95YWdlciBhbmQgNzE4Lzc1MCovCisjZGVmaW5lIEhXQ19BRERSRVNTICAgICAgICAgICAgICAgICAgICAgICAgIDB4MAorI2RlZmluZSBIV0NfQUREUkVTU19FTkFCTEUgICAgICAgICAgICAgICAgICAzMTozMQorI2RlZmluZSBIV0NfQUREUkVTU19FTkFCTEVfRElTQUJMRSAgICAgICAgICAwCisjZGVmaW5lIEhXQ19BRERSRVNTX0VOQUJMRV9FTkFCTEUgICAgICAgICAgIDEKKyNkZWZpbmUgSFdDX0FERFJFU1NfRVhUICAgICAgICAgICAgICAgICAgICAgMjc6MjcKKyNkZWZpbmUgSFdDX0FERFJFU1NfRVhUX0xPQ0FMICAgICAgICAgICAgICAgMAorI2RlZmluZSBIV0NfQUREUkVTU19FWFRfRVhURVJOQUwgICAgICAgICAgICAxCisjZGVmaW5lIEhXQ19BRERSRVNTX0NTICAgICAgICAgICAgICAgICAgICAgIDI2OjI2CisjZGVmaW5lIEhXQ19BRERSRVNTX0NTXzAgICAgICAgICAgICAgICAgICAgIDAKKyNkZWZpbmUgSFdDX0FERFJFU1NfQ1NfMSAgICAgICAgICAgICAgICAgICAgMQorI2RlZmluZSBIV0NfQUREUkVTU19BRERSRVNTICAgICAgICAgICAgICAgICAyNTowCisKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OICAgICAgICAgICAgICAgICAgICAgICAgMHg0CisjZGVmaW5lIEhXQ19MT0NBVElPTl9UT1AgICAgICAgICAgICAgICAgICAgIDI3OjI3CisjZGVmaW5lIEhXQ19MT0NBVElPTl9UT1BfSU5TSURFICAgICAgICAgICAgIDAKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OX1RPUF9PVVRTSURFICAgICAgICAgICAgMQorI2RlZmluZSBIV0NfTE9DQVRJT05fWSAgICAgICAgICAgICAgICAgICAgICAyNjoxNgorI2RlZmluZSBIV0NfTE9DQVRJT05fTEVGVCAgICAgICAgICAgICAgICAgICAxMToxMQorI2RlZmluZSBIV0NfTE9DQVRJT05fTEVGVF9JTlNJREUgICAgICAgICAgICAwCisjZGVmaW5lIEhXQ19MT0NBVElPTl9MRUZUX09VVFNJREUgICAgICAgICAgIDEKKyNkZWZpbmUgSFdDX0xPQ0FUSU9OX1ggICAgICAgICAgICAgICAgICAgICAgMTA6MAorCisjZGVmaW5lIEhXQ19DT0xPUl8xMiAgICAgICAgICAgICAgICAgICAgICAgIDB4OAorI2RlZmluZSBIV0NfQ09MT1JfMTJfMl9SR0I1NjUgICAgICAgICAgICAgICAzMToxNgorI2RlZmluZSBIV0NfQ09MT1JfMTJfMV9SR0I1NjUgICAgICAgICAgICAgICAxNTowCisKKyNkZWZpbmUgSFdDX0NPTE9SXzMgICAgICAgICAgICAgICAgICAgICAgICAgMHhDCisjZGVmaW5lIEhXQ19DT0xPUl8zX1JHQjU2NSAgICAgICAgICAgICAgICAgIDE1OjAKKworCisvKiBod19jdXJzb3JfeHh4IHdvcmtzIGZvciB2b3lhZ2VyLDcxOCBhbmQgNzUwICovCit2b2lkIGh3X2N1cnNvcl9lbmFibGUoc3RydWN0IGx5bnhfY3Vyc29yICogY3Vyc29yKQoreworCXUzMiByZWc7CisJcmVnID0gRklFTERfVkFMVUUoMCxIV0NfQUREUkVTUyxBRERSRVNTLGN1cnNvci0+b2Zmc2V0KXwKKwkJCUZJRUxEX1NFVCgwLEhXQ19BRERSRVNTLEVYVCxMT0NBTCl8CisJCQlGSUVMRF9TRVQoMC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Ygcm9wLGNvbnN0IHU4KiBkYXRhLGNvbnN0IHU4KiBtYXNrKTsKKyNlbmRpZgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvc203NTBfaGVscC5oIGIvZHJpdmVycy9zdGFnaW5nL3NtNzUwZmIvc203NTBfaGVscC5oCm5ldyBmaWxlIG1vZGUgMTAwNjQ0CmluZGV4IDAwMDAwMDAuLmUwMTI4ZDIKLS0tIC9kZXYvbnVsbAorKysgYi9kcml2ZXJzL3N0YWdpbmcvc203NTBmYi9zbTc1MF9oZWxwLmgKQEAgLTAsMCArMSwxMTEgQEAKKyNpZm5kZWYgTFlOWF9IRUxQX0hfXworI2RlZmluZSBMWU5YX0hFTFBfSF9fCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcCisgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRklFTEQgTUFDUk9TICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKK1wqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworI2RlZmluZSBfTFNCKGYpICAgICAgICAgICAgICgwID8gZikKKyNkZWZpbmUgX01TQihmKSAgICAgICAgICAgICAoMSA/IGYpCisjZGVmaW5lIF9DT1VOVChmKSAgICAgICAgICAgKF9NU0IoZikgLSBfTFNCKGYpICsgMSkKKworI2RlZmluZSBSQVdfTUFTSyhmKSAgICAgICAgICgweEZGRkZGRkZGID4+ICgzMiAtIF9DT1VOVChmKSkpCisjZGVmaW5lIEdFVF9NQVNLKGYpICAgICAgICAgKFJBV19NQVNLKGYpIDw8IF9MU0IoZikpCisjZGVmaW5lIEdFVF9GSUVMRChkLGYpICAgICAgKCgoZCkgPj4gX0xTQihmKSkgJiBSQVdfTUFTSyhmKSkKKyNkZWZpbmUgVEVTVF9GSUVMRChkLGYsdikgICAoR0VUX0ZJRUxEKGQsZikgPT0gZiAjIyBfICMjIHYpCisjZGVmaW5lIFNFVF9GSUVMRChkLGYsdikgICAgKCgoZCkgJiB+R0VUX01BU0soZikpIHwgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGYgIyMgXyAjIyB2KSAmIFJBV19NQVNLKGYpKSA8PCBfTFNCKGYpKSkKKyNkZWZpbmUgU0VUX0ZJRUxEVihkLGYsdikgICAoKChkKSAmIH5HRVRfTUFTSyhmKSkgfCBcCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgodikgJiBSQVdfTUFTSyhmKSkgPDwgX0xTQihmKSkpCisKKworLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KKy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLyBJbnRlcm5hbCBtYWNyb3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCisKKyNkZWZpbmUgX0ZfU1RBUlQoZikgICAgICAgICAgICAgKDAgPyBmKQorI2RlZmluZSBfRl9FTkQoZikgICAgICAgICAgICAgICAoMSA/IGYpCisjZGVmaW5lIF9GX1NJWkUoZikgICAgICAgICAgICAgICgxICsgX0ZfRU5EKGYpIC0gX0ZfU1RBUlQoZikpCisjZGVmaW5lIF9GX01BU0soZikgICAgICAgICAgICAgICgoKDEgPDwgX0ZfU0laRShmKSkgLSAxKSA8PCBfRl9TVEFSVChmKSkKKyNkZWZpbmUgX0ZfTk9STUFMSVpFKHYsIGYpICAgICAgKCgodikgJiBfRl9NQVNLKGYpKSA+PiBfRl9TVEFSVChmKSkKKyNkZWZpbmUgX0ZfREVOT1JNQUxJWkUodiwgZikgICAgKCgodikgPDwgX0ZfU1RBUlQoZikpICYgX0ZfTUFTSyhmKSkKKworCisvLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLworLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vIEdsb2JhbCBtYWNyb3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KKworI2RlZmluZSBGSUVMRF9HRVQoeCwgcmVnLCBmaWVsZCkgXAorKCBcCisgICAgX0ZfTk9STUFMSVpFKCh4KSwgcmVnICMjIF8gIyMgZmllbGQpIFwKKykKKworI2RlZmluZSBGSUVMRF9TRVQoeCwgcmVnLCBmaWVsZCwgdmFsdWUpIFwKKyggXAorICAgICh4ICYgfl9GX01BU0socmVnICMjIF8gIyMgZmllbGQpKSBcCisgICAgfCBfRl9ERU5PUk1BTElaRShyZWcgIyMgXyAjIyBmaWVsZCAjIyBfICMjIHZhbHVlLCByZWcgIyMgXyAjIyBmaWVsZCkgXAorKQorCisjZGVmaW5lIEZJRUxEX1ZBTFVFKHgsIHJlZywgZmllbGQsIHZhbHVlKSBcCisoIFwKKyAgICAoeCAmIH5fRl9NQVNLKHJlZyAjIyBfICMjIGZpZWxkKSkgXAorICAgIHwgX0ZfREVOT1JNQUxJWkUodmFsdWUsIHJlZyAjIyBfICMjIGZpZWxkKSBcCispCisKKyNkZWZpbmUgRklFTERfQ0xFQVIocmVnLCBmaWVsZCkgXAorKCBcCisgICAgfiBfRl9NQVNLKHJlZyAjIyBfICMjIGZpZWxkKSBcCispCisKKworLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8KKy8vICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vCisvLyBGaWVsZCBNYWNyb3MgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLworLy8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8KKy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vLy8vCisKKyNkZWZpbmUgRklFTERfU1RBUlQoZmllbGQpICAgICAgICAgICAgICAoMCA/IGZpZWxkKQorI2RlZmluZSBGSUVMRF9FTkQoZmllbGQpICAgICAgICAgICAgICAgICgxID8gZmllbGQpCisjZGVmaW5lIEZJRUxEX1NJWkUoZmllbGQpICAgICAgICAgICAgICAgKDEgKyBGSUVMRF9FTkQoZmllbGQpIC0gRklFTERfU1RBUlQoZmllbGQpKQorI2RlZmluZSBGSUVMRF9NQVNLKGZpZWxkKSAgICAgICAgICAgICAgICgoKDEgPDwgKEZJRUxEX1NJWkUoZmllbGQpLTEpKSB8ICgoMSA8PCAoRklFTERfU0laRShmaWVsZCktMSkpIC0gMSkpIDw8IEZJRUxEX1NUQVJUKGZpZWxkKSkKKyNkZWZpbmUgRklFTERfTk9STUFMSVpFKHJlZywgZmllbGQpICAgICAoKChyZWcpICYgRklFTERfTUFTSyhmaWVsZCkpID4+IEZJRUxEX1NUQVJUKGZpZWxkKSkKKyNkZWZpbmUgRklFTERfREVOT1JNQUxJWkUoZmllbGQsIHZhbHVlKSAoKCh2YWx1ZSkgPDwgRklFTERfU1RBUlQoZmllbGQpKSAmIEZJRUxEX01BU0soZmllbGQpKQorCisjZGVmaW5lIEZJRUxEX0lOSVQocmVnLCBmaWVsZCwgdmFsdWUpICAgRklFTERfREVOT1JNQUxJWkUocmVnICMjIF8gIyMgZmllbGQsIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZWcgIyMgXyAjIyBmaWVsZCAjIyBfICMjIHZhbHVlKQorI2RlZmluZSBGSUVMRF9JTklUX1ZBTChyZWcsIGZpZWxkLCB2YWx1ZSkgXAorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChGSUVMRF9ERU5PUk1BTElaRShyZWcgIyMgXyAjIyBmaWVsZCwgdmFsdWUpKQorI2RlZmluZSBGSUVMRF9WQUxfU0VUKHgsIHIsIGYsIHYpICAgICAgIHggPSB4ICYgfkZJRUxEX01BU0sociAjIyBfICMjIGYpIFwKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8IEZJRUxEX0RFTk9STUFMSVpFKHIgIyMgXyAjIyBmLCByICMjIF8gIyMgZiAjIyBfICMjIHYpCisKKyNkZWZpbmUgUkdCKHIsIGcsIGIpIFwKKyggXAorICAgICh1bnNpZ25lZCBsb25nKSAoKChyKSA8PCAxNikgfCAoKGcpIDw8IDgpI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CQlURlRfRElTUCwKKwkJCQkJCQlzcGVjX3NoYXJlLT5zdGF0ZS5wbmx0eXBlKSk7CisJCQlicmVhazsKKwkJfQorCX1lbHNleworCQkvKiBmb3IgNzUwTEUgLG5vIERWSSBjaGlwIGluaXRpbGl6YXRpb24gbWFrZXMgTW9uaXRvciBubyBzaWduYWwgKi8KKwkJLyogU2V0IHVwIEdQSU8gZm9yIHNvZnR3YXJlIEkyQyB0byBwcm9ncmFtIERWSSBjaGlwIGluIHRoZQorCQkgICBYaWxpbnggU1A2MDUgYm9hcmQsIGluIG9yZGVyIHRvIGhhdmUgdmlkZW8gc2lnbmFsLgorCQkgKi8KKyAgICAgICAgc3dJMkNJbml0KDAsMSk7CisKKworICAgICAgICAvKiBDdXN0b21lciBtYXkgTk9UIHVzZSBDSDczMDEgRFZJIGNoaXAsIHdoaWNoIGhhcyB0byBiZQorICAgICAgICAgICBpbml0aWFsaXplZCBkaWZmZXJlbnRseS4KKyAgICAgICAgICovCisgICAgICAgIGlmIChzd0kyQ1JlYWRSZWcoMHhlYywgMHg0YSkgPT0gMHg5NSkKKyAgICAgICAgeworICAgICAgICAgICAgLyogVGhlIGZvbGxvd2luZyByZWdpc3RlciB2YWx1ZXMgZm9yIENINzMwMSBhcmUgZnJvbQorICAgICAgICAgICAgICAgQ2hyb250ZWwgYXBwIG5vdGUgYW5kIG91ciBleHBlcmltZW50LgorICAgICAgICAgICAgICovCisJCQlwcl9pbmZvKCJ5ZXMsQ0g3MzAxIERWSSBjaGlwIGZvdW5kXG4iKTsKKyAgICAgICAgICAgIHN3STJDV3JpdGVSZWcoMHhlYywgMHgxZCwgMHgxNik7CisgICAgICAgICAgICBzd0kyQ1dyaXRlUmVnKDB4ZWMsIDB4MjEsIDB4OSk7CisgICAgICAgICAgICBzd0kyQ1dyaXRlUmVnKDB4ZWMsIDB4NDksIDB4QzApOworCQkJcHJfaW5mbygib2theSxDSDczMDEgRFZJIGNoaXAgc2V0dXAgZG9uZVxuIik7CisgICAgIC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mV0dXJuIDA7CisJCX0KKwl9CisJLyogdGltZW91dCBlcnJvciAqLworCXJldHVybiAtMTsKK30KKworaW50IGh3X3NtNzUwX3Bhbl9kaXNwbGF5KHN0cnVjdCBseW54ZmJfY3J0YyAqY3J0YywKKyAgICAgICAgY29uc3Qgc3RydWN0IGZiX3Zhcl9zY3JlZW5pbmZvICp2YXIsCisgICAgICAgIGNvbnN0IHN0cnVjdCBmYl9pbmZvICppbmZvKQoreworICAgIHVpbnQzMl90IHRvdGFsOworICAgIC8vY2hlY2sgcGFyYW1zCisgICAgaWYgKCh2YXItPnhvZmZzZXQgKyB2YXItPnhyZXMgPiB2YXItPnhyZXNfdmlydHVhbCkgfHwKKyAgICAgICAgICAgICh2YXItPnlvZmZzZXQgKyB2YXItPnlyZXMgPiB2YXItPnlyZXNfdmlydHVhbCkpIHsKKyAgICAgICAgcmV0dXJuIC1FSU5WQUw7CisgICAgfQorCisgICAgdG90YWwgPSB2YXItPnlvZmZzZXQgKiBpbmZvLT5maXgubGluZV9sZW5ndGggKworICAgICAgICAoKHZhci0+eG9mZnNldCAqIHZhci0+Yml0c19wZXJfcGl4ZWwpID4+IDMpOworICAgIHRvdGFsICs9IGNydGMtPm9TY3JlZW47CisgICAgaWYgKGNydGMtPmNoYW5uZWwgPT0gc203NTBfcHJpbWFyeSkgeworICAgICAgICBQT0tFMzIoUEFORUxfRkJfQUREUkVTUywKKyAgICAgICAgICAgICAgICBGSUVMRF9WQUxVRShQRUVLMzIoUEFORUxfRkJfQUREUkVTUyksCisgICAgICAgICAgICAgICAgICAgIFBBTkVMX0ZCX0FERFJFU1MsIEFERFJFU1MsIHRvdGFsKSk7CisgICAgfSBlbHNlIHsKKyAgICAgICAgUE9LRTMyKENSVF9GQl9BRERSRVNTLAorICAgICAgICAgICAgICAgIEZJRUxEX1ZBTFVFKFBFRUszMihDUlRfRkJfQUREUkVTUyksCisgICAgICAgICAgICAgICAgICAgIENSVF9GQl9BRERSRVNTLCBBRERSRVNTLCB0b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gaW5mbyB0byBzaG93LiAgSXQgaXMgdGhlIGNvbnRleHQgdGhhdCB3YXMgb3JpZ2luYWxseQotICogIHBhc3NlZCB0byB2aXNvcl9lYXN5cHJvY19Jbml0RGV2aWNlKCkuCi0gKgotICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgotICovCi0KLSNpbmNsdWRlIDxsaW51eC9wcm9jX2ZzLmg+Ci0KLSNpbmNsdWRlICJ1bmlrbG9nLmgiCi0jaW5jbHVkZSAidGltc2ttb2QuaCIKLSNpbmNsdWRlICJlYXN5cHJvYy5oIgotCi0jZGVmaW5lIE1ZRFJWTkFNRSAiZWFzeXByb2MiCi0KLQotCi0vKgotICogICAvcHJvYy88UHJvY0lkPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFByb2NEaXIKLSAqICAgL3Byb2MvPFByb2NJZD4vZHJpdmVyICAgICAgICAgICAgICAgICAgICAgICBQcm9jRHJpdmVyRGlyCi0gKiAgIC9wcm9jLzxQcm9jSWQ+L2RyaXZlci9kaWFnICAgICAgICAgICAgICAgICAgUHJvY0RyaXZlckRpYWdGaWxlCi0gKiAgIC9wcm9jLzxQcm9jSWQ+L2RldmljZSAgICAgICAgICAgICAgICAgICAgICAgUHJvY0RldmljZURpcgotICogICAvcHJvYy88UHJvY0lkPi9kZXZpY2UvMCAgICAgICAgICAgICAgICAgICAgIHByb2NEZXZpY2V4RGlyCi0gKiAgIC9wcm9jLzxQcm9jSWQ+L2RldmljZS8wL2RpYWcgICAgICAgICAgICAgICAgcHJvY0RldmljZXhEaWFnRmlsZQotICovCi0KLQotc3RhdGljIHNzaXplX3QgcHJvY193cml0ZV9kZXZpY2Uoc3RydWN0IGZpbGUgKmZpbGUsIGNvbnN0IGNoYXIgX191c2VyICpidWZmZXIsCi0JCQkJIHNpemVfdCBjb3VudCwgbG9mZl90ICpwcG9zKTsKLXN0YXRpYyBzc2l6ZV90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mUgMHgyCisgKi8KKyNkZWZpbmUgVEFHCQkgICAgICAoMHgxRiA8PCAxNikKKyNkZWZpbmUgUkVWSVNJT04JICAgICAgKDB4RiA8PCAyMSkKKyNkZWZpbmUgVkVSU0lPTgkJICAgICAgKDB4RiA8PCAyNSkKKyNkZWZpbmUgQ0lWRVJTSU9OCSAgICAgICgweDcgPDwgMjkpCisKIC8qIEhDQ1BBUkFNUyAqLwogI2RlZmluZSBIQ0NQQVJBTVNfTEVOICAgICAgICAgQklUKDE3KQogCkBAIC01Myw2ICs2Myw3IEBACiAjZGVmaW5lIFBPUlRTQ19IU1AgICAgICAgICAgICBCSVQoOSkKICNkZWZpbmUgUE9SVFNDX1BQICAgICAgICAgICAgIEJJVCgxMikKICNkZWZpbmUgUE9SVFNDX1BUQyAgICAgICAgICAgICgweDBGVUwgPDwgMTYpCisjZGVmaW5lIFBPUlRTQ19XS0NOICAgICAgICAgICBCSVQoMjApCiAjZGVmaW5lIFBPUlRTQ19QSENEKGQpCSAgICAgICgoZCkgPyBCSVQoMjIpIDogQklUKDIzKSkKIC8qIFBUUyBhbmQgUFRXIGZvciBub24gbHBtIHZlcnNpb24gb25seSAqLwogI2RlZmluZSBQT1JUU0NfUEZTQyAgICAgICAgICAgQklUKDI0KQpkaWZmIC0tZ2l0IGEvZHJpdmVycy91c2IvY2hpcGlkZWEvY2kuaCBiL2RyaXZlcnMvdXNiL2NoaXBpZGVhL2NpLmgKaW5kZXggNjU5MTNkNC4uNmQ2MjAwZSAxMDA2NDQKLS0tIGEvZHJpdmVycy91c2IvY2hpcGlkZWEvY2kuaAorKysgYi9kcml2ZXJzL3VzYi9jaGlwaWRlYS9jaS5oCkBAIC0yOSw2ICsyOSwxNSBAQAogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogUkVHSVNURVJTCiAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKio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IlVCSUZTICh1YmklZDolZCk6ICIgZm10ICJcbiIsICAgICAgICAgICAgICAgICAgICBcCisJCSAgKGMpLT52aS51YmlfbnVtLCAoYyktPnZpLnZvbF9pZCwgIyNfX1ZBX0FSR1NfXykKIC8qIFVCSUZTIGVycm9yIG1lc3NhZ2VzICovCi0jZGVmaW5lIHViaWZzX2VycihmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKLQlwcl9lcnIoIlVCSUZTIGVycm9yIChwaWQgJWQpOiAlczogIiBmbXQgIlxuIiwgY3VycmVudC0+cGlkLCBcCisjZGVmaW5lIHViaWZzX2VycihjLCBmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlwcl9lcnIoIlVCSUZTIGVycm9yICh1YmklZDolZCBwaWQgJWQpOiAlczogIiBmbXQgIlxuIiwgICAgICBcCisJICAgICAgIChjKS0+dmkudWJpX251bSwgKGMpLT52aS52b2xfaWQsIGN1cnJlbnQtPnBpZCwgICAgICAgXAogCSAgICAgICBfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKIC8qIFVCSUZTIHdhcm5pbmcgbWVzc2FnZXMgKi8KLSNkZWZpbmUgdWJpZnNfd2FybihmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCXByX3dhcm4oIlVCSUZTIHdhcm5pbmcgKHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgICAgICAgICAgIFwKLQkJY3VycmVudC0+cGlkLCBfX2Z1bmNfXywgIyNfX1ZBX0FSR1NfXykKKyNkZWZpbmUgdWJpZnNfd2FybihjLCBmbXQsIC4uLikgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAorCXByX3dhcm4oIlVCSUZTIHdhcm5pbmcgKHViaSVkOiVkIHBpZCAlZCk6ICVzOiAiIGZtdCAiXG4iLCAgIFwKKwkJKGMpLT52aS51Ymlfbn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fR1BfRk5fU1BLX1RFTVBfV0FSTklORyAgICAgICAgICAgMHgyQwotI2RlZmluZSBBUklaT05BX0dQX0ZOX1VOREVSQ0xPQ0tFRCAgICAgICAgICAgICAgIDB4MkQKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9PVkVSQ0xPQ0tFRCAgICAgICAgICAgICAgICAweDJFCi0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fRFNQX0lSUTEgICAgICAgICAgICAgICAgICAgMHgzNQotI2RlZmluZSBBUklaT05BX0dQX0ZOX0RTUF9JUlEyICAgICAgICAgICAgICAgICAgIDB4MzYKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9BU1lOQ19PUENMSyAgICAgICAgICAgICAgICAweDNECi0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fQk9PVF9ET05FICAgICAgICAgICAgICAgICAgMHg0NAotI2RlZmluZSBBUklaT05BX0dQX0ZOX0RTUDFfUkFNX1JFQURZICAgICAgICAgICAgIDB4NDUKLSNkZWZpbmUgQVJJWk9OQV9HUF9GTl9TWVNDTEtfRU5BX1NUQVRVUyAgICAgICAgICAweDRCCi0jZGVmaW5lIEFSSVpPTkFfR1BfRk5fQVNZTkNDTEtfRU5BX1NUQVRVUyAgICAgICAgMHg0QwotCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RJUiAgICAgICAgICAgICAgICAgICAgICAgICAgMHg4MDAwICAvKiBHUE5fRElSICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RJUl9NQVNLICAgICAgICAgICAgICAgICAgICAgMHg4MDAwICAvKiBHUE5fRElSICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RJUl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDE1ICAvKiBHUE5fRElSICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RJUl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fRElSICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BVICAgICAgICAgICAgICAgICAgICAgICAgICAgMHg0MDAwICAvKiBHUE5fUFUgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDQwMDAgIC8qIEdQTl9QVSAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QVV9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAxNCAgLyogR1BOX1BVICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BVX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUFUgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUEQgICAgICAgICAgICAgICAgICAgICAgICAgICAweDIwMDAgIC8qIEdQTl9QRCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QRF9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMCAgLyogR1BOX1BEICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BEX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDEzICAvKiBHUE5fUEQgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUERfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9QRCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9MVkwgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDgwMCAgLyogR1BOX0xWTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9MVkxfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDgwMCAgLyogR1BOX0xWTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9MVkxfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxMSAgLyogR1BOX0xWTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9MVkxfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0xWTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QT0wgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDQwMCAgLyogR1BOX1BPTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QT0xfTUFTSyAgICAgICAgICAgICAgICAgICAgIDB4MDQwMCAgLyogR1BOX1BPTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QT0xfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAxMCAgLyogR1BOX1BPTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QT0xfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BPTCAqLwotI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkcgICAgICAgICAgICAgICAgICAgICAgIDB4MDIwMCAgLyogR1BOX09QX0NGRyAqLwotI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfTUFTSyAgICAgICAgICAgICAgICAgIDB4MDIwMCAgLyogR1BOX09QX0NGRyAqLwotI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgOSAgLyogR1BOX09QX0NGRyAqLwotI2RlZmluZSBBUklaT05BX0dQTl9PUF9DRkdfV0lEVEggICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX09QX0NGRyAqLwotI2RlZmluZSBBUklaT05BX0dQTl9EQiAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MDEwMCAgLyogR1BOX0RCICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RCX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBHUE5fREIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fREJfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDggIC8qIEdQTl9EQiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9EQl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX0RCICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0ZOX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgwMDdGICAvKiBHUE5fREIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fRk5fU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgIDAgIC8qIEdQTl9EQiAqLwotI2RlZmluZSBBUklaT05BX0dQTl9GTl9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgNyAgLyogR1BOX0RCICovCi0KLSNlbmRpZgpkaWZmIC0tZ2l0IGEvaW5jbHVkZS9saW51eC9tZmQvYXJpem9uYS9wZGF0YS5oIGIvaW5jbHVkZS9saW51eC9tZmQvYXJpem9uYS9wZGF0YS5oCmluZGV4IDQ1NzhjNzIuLjE3ODljYjAgMTAwNjQ0Ci0tLSBhL2luY2x1ZGUvbGludXgvbWZkL2FyaXpvbmEvcGRhdGEuaAorKysgYi9pbmNsdWRlL2xpbnV4L21mZC9hcml6b25hL3BkYXRhLmgKQEAgLTExLDMxICsxMSwyNiBAQAogI2lmbmRlZiBfQVJJWk9OQV9QREFUQV9ICiAjZGVmaW5lIF9BUklaT05BX1BEQVRBX0gKIAotI2RlZmluZSBBUklaT05BX0dQTl9ESVIgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ODAwMCAgLyogR1BOX0RJUiAqLworI2luY2x1ZGUgPGR0LWJpbmRpbmdzL21mZC9hcml6b25hLmg+CisKICNkZWZpbmUgQVJJWk9OQV9HUE5fRElSX01BU0sgICAgICAgICAgICAgICAgICAgICAweDgwMDAgIC8qIEdQTl9ESVIgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fRElSX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgMTUgIC8qIEdQTl9ESVIgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fRElSX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9ESVIgKi8KLSNkZWZpbmUgQVJJWk9OQV9HUE5fUFUgICAgICAgICAgICAgICAgICAgICAgICAgICAweDQwMDAgIC8qIEdQTl9QVSAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QVV9NQVNLICAgICAgICAgICAgICAgICAgICAgIDB4NDAwMCAgLyogR1BOX1BVICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BVX1NISUZUICAgICAgICAgICAgICAgICAgICAgICAgIDE0ICAvKiBHUE5fUFUgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fUFVfV0lEVEggICAgICAgICAgICAgICAgICAgICAgICAgIDEgIC8qIEdQTl9QVSAqLwotI2RlZmluZSBBUklaT05BX0dQTl9QRCAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4MjAwMCAgLyogR1BOX1BEICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BEX01BU0sgICAgICAgICAgICAgICAgICAgICAgMHgyMDAwICAvKiBHUE5fUEQgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fUERfU0hJRlQgICAgICAgICAgICAgICAgICAgICAgICAgMTMgIC8qIEdQTl9QRCAqLwogI2RlZmluZSBBUklaT05BX0dQTl9QRF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAgMSAgLyogR1BOX1BEICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0xWTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwODAwICAvKiBHUE5fTFZMICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0xWTF9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwODAwICAvKiBHUE5fTFZMICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0xWTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDExICAvKiBHUE5fTFZMICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0xWTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fTFZMICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX1BPTCAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwNDAwICAvKiBHUE5fUE9MICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BPTF9NQVNLICAgICAgICAgICAgICAgICAgICAgMHgwNDAwICAvKiBHUE5fUE9MICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BPTF9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgIDEwICAvKiBHUE5fUE9MICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX1BPTF9XSURUSCAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fUE9MICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGRyAgICAgICAgICAgICAgICAgICAgICAgMHgwMjAwICAvKiBHUE5fT1BfQ0ZHICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGR19NQVNLICAgICAgICAgICAgICAgICAgMHgwMjAwICAvKiBHUE5fT1BfQ0ZHICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGR19TSElGVCAgICAgICAgICAgICAgICAgICAgICA5ICAvKiBHUE5fT1BfQ0ZHICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX09QX0NGR19XSURUSCAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fT1BfQ0ZHICovCi0jZGVmaW5lIEFSSVpPTkFfR1BOX0RCICAgICAgICAgICAgICAgICAgICAgICAgICAgMHgwMTAwICAvKiBHUE5fREIgKi8KICNkZWZpbmUgQVJJWk9OQV9HUE5fREJfTUFTSyAgICAgICAgICAgICAgICAgICAgICAweDAxMDAgIC8qIEdQTl9EQiAqLwogI2RlZmluZSBBUklaT05BX0dQTl9EQl9TSElGVCAgICAgICAgICAgICAgICAgICAgICAgICAgOCAgLyogR1BOX0RCICovCiAjZGVmaW5lIEFSSVpPTkFfR1BOX0RCX1dJRFRIICAgICAgICAgICAgICAgICAgICAgICAgICAxICAvKiBHUE5fREIgKi8KQEAgLTQ1LDIzICs0MCwxMCBAQAogCiAjZGVmaW5lIEFSSVpPTkFfTUFYX0dQSU8gNQogCi0jZGVmaW5lIEFSSVpPTkFfMzJLWl9NQ0xLMSAxCi0jZGVmaW5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IsCisJLmFyZzFfdHlwZQk9IEFSR19QVFJfVE9fU1RBQ0ssCisJLmFyZzJfdHlwZQk9IEFSR19DT05TVF9TVEFDS19TSVpFLAorCS5hcmczX3R5cGUJPSBBUkdfQU5ZVEhJTkcsCit9OworCitzdGF0aWMgdTY0IGJwZl9rdGltZV9nZXRfbnModTY0IHIxLCB1NjQgcjIsIHU2NCByMywgdTY0IHI0LCB1NjQgcjUpCit7CisJLyogTk1JIHNhZmUgYWNjZXNzIHRvIGNsb2NrIG1vbm90b25pYyAqLworCXJldHVybiBrdGltZV9nZXRfbW9ub19mYXN0X25zKCk7Cit9CisKK3N0YXRpYyBjb25zdCBzdHJ1Y3QgYnBmX2Z1bmNfcHJvdG8gYnBmX2t0aW1lX2dldF9uc19wcm90byA9IHsKKwkuZnVuYwkJPSBicGZfa3RpbWVfZ2V0X25zLAorCS5ncGxfb25seQk9IHRydWUsCisJLnJldF90eXBlCT0gUkVUX0lOVEVHRVIsCit9OworCisvKgorICogbGltaXRlZCB0cmFjZV9wcmludGsoKQorICogb25seSAlZCAldSAleCAlbGQgJWx1ICVseCAlbGxkICVsbHUgJWxseCAlcCBjb252ZXJzaW9uIHNwZWNpZmllcnMgYWxsb3dlZAorICovCitzdGF0aWMgdTY0IGJwZl90cmFjZV9wcmludGsodTY0IHIxLCB1NjQgZm10X3NpemUsIHU2NCByMywgdTY0IHI0LCB1NjQgcjUpCit7CisJY2hhciAqZm10ID0gKGNoYXIgKikgKGxvbmcpIHIxOworCWludCBtb2RbM10gPSB7fTsKKwlpbnQgZm10X2NudCA9IDA7CisJaW50IGk7CisKKwkvKgorCSAqIGJwZl9jaGVjaygpLT5jaGVja19mdW5jX2FyZygpLT5jaGVja19zdGFja19ib3VuZGFyeSgpCisJICogZ3VhcmFudGVlcyB0aGF0IGZtdCBwb2ludHMgdG8gYnBmIHByb2dyYW0gc3RhY2ssCisJICogZm10X3NpemUgYnl0ZXMgb2YgaXQgd2VyZSBpbml0aWFsaXplZCBhbmQgZ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oZmlsZW5hbWUpKSB7CisJCXByaW50ZigiJXMiLCBicGZfbG9nX2J1Zik7CisJCXJldHVybiAxOworCX0KKworCWZvciAoaSA9IDE7IGkgPCBhYzsgaSsrKSB7CisJCWlmIChzdHJjbXAoYXJndltpXSwgIi1hIikgPT0gMCkgeworCQkJZnVsbF9yYW5nZSA9IHRydWU7CisJCX0gZWxzZSBpZiAoc3RyY21wKGFyZ3ZbaV0sICItdCIpID09IDApIHsKKwkJCXRleHRfb25seSA9IHRydWU7CisJCX0gZWxzZSBpZiAoc3RyY21wKGFyZ3ZbaV0sICItaCIpID09IDApIHsKKwkJCXByaW50ZigiVXNhZ2U6XG4iCisJCQkgICAgICAgIiAgLWEgZGlzcGxheSB3aWRlciBsYXRlbmN5IHJhbmdlXG4iCisJCQkgICAgICAgIiAgLXQgdGV4dCBvbmx5XG4iKTsKKwkJCXJldHVybiAxOworCQl9CisJfQorCisJcHJpbnRmKCIgIGhlYXRtYXAgb2YgSU8gbGF0ZW5jeVxuIik7CisJaWYgKHRleHRfb25seSkKKwkJcHJpbnRmKCIgICVzIiwgc3ltW251bV9jb2xvcnMgLSAxXSk7CisJZWxzZQorCQlwcmludGYoIiAgJXMgJXMiLCBjb2xvcltudW1fY29sb3JzIC0gMV0sIG5vY29sb3IpOworCXByaW50ZigiIC0gbWFueSBldmVudHMgd2l0aCB0aGlzIGxhdGVuY3lcbiIpOworCisJaWYgKHRleHRfb25seSkKKwkJcHJpbnRmKCIgICVzIiwgc3ltWzBdKTsKKwllbHNlCisJCXByaW50ZigiICAlcyAlcyIsIGNvbG9yWzBdLCBub2NvbG9yKTsKKwlwcmludGYoIiAtIGZldyBldmVudHNcbiIpOworCisJZm9yIChpID0gMDsgOyBpKyspIHsKKwkJaWYgKGkgJSAyMCA9PSAwKQorCQkJcHJpbnRfYmFubmVyKCk7CisJCXByaW50X2hpc3QobWFwX2ZkWzFdKTsKKwkJc2xlZXAoMik7CisJfQorCisJcmV0dXJuIDA7Cit9CmRpZmYg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AuY29uZmlnIC5jb25maWcgfHwJCQlcCiAJCQkobXYgLWYgLmNvbmZpZyAuY29uZmlnLm9sZC4xOwkJCVwKIAkJCSBtdiAtZiAudG1wLmNvbmZpZyAuY29uZmlnOwkJCVwKLQkJCSAkKG9iaikvY29uZiAtLXNpbGVudG9sZGNvbmZpZyAkKEtjb25maWcpOwlcCisJCQkgJChvYmopL2NvbmYgJChzaWxlbnQpIC0tc2lsZW50b2xkY29uZmlnICQoS2NvbmZpZyk7IFwKIAkJCSBtdiAtZiAuY29uZmlnLm9sZC4xIC5jb25maWcub2xkKQkJXAogCWVsc2UJCQkJCQkJCVwKIAkJCW12IC1mIC50bXAuY29uZmlnIC5jb25maWc7CQkJXAotCQkJJChvYmopL2NvbmYgLS1zaWxlbnRvbGRjb25maWcgJChLY29uZmlnKTsJXAorCQkJJChvYmopL2NvbmYgJChzaWxlbnQpIC0tc2lsZW50b2xkY29uZmlnICQoS2NvbmZpZyk7IFwKIAlmaQogCSQoUSlybSAtZiAudG1wLmNvbmZpZwogCiAjIENyZWF0ZSBuZXcgbGludXgucG90IGZpbGUKICMgQWRqdXN0IGNoYXJzZXQgdG8gVVRGLTggaW4gLnBvIGZpbGUgdG8gYWNjZXB0IFVURi04IGluIEtjb25maWcgZmlsZXMKIHVwZGF0ZS1wby1jb25maWc6ICQob2JqKS9reGdldHRleHQgJChvYmopL2djb25mLmdsYWRlLmgKLQkkKFEpZWNobyAiICBHRU4gICAgIGNvbmZpZy5wb3QiCisJJChRKSQoa2VjaG8pICIgIEdFTiAgICAgY29uZmlnLnBvdCIKIAkkKFEpeGdldHRleHQgLS1kZWZhdWx0LWRvbWFpbj1saW51eCAgICAgICAgICAgICAgICAgICAgICAgICBcCiAJICAgIC0tYWRkLWNvbW1lbnRzIC0ta2V5d29yZD1fIC0ta2V5d29yZD1OXyAgICAgICAgICAgICAgICAgXAogCSAgICAtLWZyb20tY29kZT1VVEYtOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKQEAgLTY1LDYxICs2Niw1OCBAQAogCSQoUSkoZm9yIGkgaW4gYGxzICQoc3JjdHJlZSkvYXJjaC8qL0tjb25maWcgICAgICBcCiAJICAgICQoc3JjdHJlZSkvYXJjaC8qL3VtL0tjb25maWdgOyAgICAgICAgICAgICAgIFwKIAkgICAgZG8gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXAotCQllY2hvICIgIEdFTiAgICAgJCRpIjsgICAgICAgICAgICAgICAgICAgIFwKKwkJJChrZWNobykgIiAgR0VOICAgICAkJGkiOyAgICAgICAgICAgICAgICAgICAgXAogCQkkKG9iaikva3hnZXR0ZXh0ICQkaSAgICAgICAgICAgICAgICAgICAgIFwKIAkJICAgICA+PiAkKG9iaikvY29uZmlnLnBvdDsgICAgICAgICAgICAgICBcCiAJICAgIGRvbmUgKQotCSQoUSllY2hvICIgIEdFTiAgICAgbGludXgucG90IgorCSQoUSkkKGtlY2hvKSAiICBHRU4gICAgIGxpbnV4LnBvdCIKIAkkKFEpbXNndW5pcSAtLXNvcnQtYnktZmlsZSAtLXRvLWNvZGU9VVRGLTggJChvYmopL2NvbmZpZy5wb3QgXAogCSAgICAtLW91dHB1dCAkKG9iaikvbGludXgucG90CiAJJChRKXJtIC1mICQob2JqKS9jb25maWcucG90CiAKLVBIT05ZICs9IGFsbG5vY29uZmlnIGFsbHllc2NvbmZpZyBhbGxtb2Rjb25maWcgYWxsZGVmY29uZmlnIHJhbmRjb25maWcKKyMgVGhlc2UgdGFyZ2V0cyBtYXAgMToxIHRvIHRoZSBjb21tYW5kbGluZSBvcHRpb25zIG9mICdjb25mJworc2ltcGxlLXRhcmdldHMgOj0gb2xkY29uZmlnIGFsbG5vY29uZmlnIGFsbHllc2NvbmZpZyBhbGxtb2Rjb25maWcgXAorCWFsbGRlZmNvbmZpZyByYW5kY29uZmlnIGxpc3RuZXdjb25maWcgb2xkZGVmY29uZmlnCitQSE9OWSArPSAkKHNpbXBsZS10YXJnZX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WRrYi5jCkBAIC03OCwxNSArNzgsMTIgQEAKIAlzdHJ1Y3Qgc25kX3NvY19jb2RlYyAqY29kZWMgPSBydGQtPmNvZGVjOwogCiAJLyogSGVhZHNldCBqYWNrIGRldGVjdGlvbiAqLwotCXNuZF9zb2NfamFja19uZXcoY29kZWMsICJIZWFkcGhvbmUgSmFjayIsIFNORF9KQUNLX0hFQURQSE9ORQotCQkJfCBTTkRfSkFDS19CVE5fMCB8IFNORF9KQUNLX0JUTl8xIHwgU05EX0pBQ0tfQlROXzIsCi0JCQkmaHNfamFjayk7Ci0Jc25kX3NvY19qYWNrX2FkZF9waW5zKCZoc19qYWNrLCBBUlJBWV9TSVpFKGhzX2phY2tfcGlucyksCi0JCQkgICAgICBoc19qYWNrX3BpbnMpOwotCXNuZF9zb2NfamFja19uZXcoY29kZWMsICJNaWNyb3Bob25lIEphY2siLCBTTkRfSkFDS19NSUNST1BIT05FLAotCQkJICZtaWNfamFjayk7Ci0Jc25kX3NvY19qYWNrX2FkZF9waW5zKCZtaWNfamFjaywgQVJSQVlfU0laRShtaWNfamFja19waW5zKSwKLQkJCSAgICAgIG1pY19qYWNrX3BpbnMpOworCXNuZF9zb2NfY2FyZF9qYWNrX25ldyhydGQtPmNhcmQsICJIZWFkcGhvbmUgSmFjayIsIFNORF9KQUNLX0hFQURQSE9ORSB8CisJCQkgICAgICBTTkRfSkFDS19CVE5fMCB8IFNORF9KQUNLX0JUTl8xIHwgU05EX0pBQ0tfQlROXzIsCisJCQkgICAgICAmaHNfamFjaywgaHNfamFja19waW5zLCBBUlJBWV9TSVpFKGhzX2phY2tfcGlucykpOworCXNuZF9zb2NfY2FyZF9qYWNrX25ldyhydGQtPmNhcmQsICJNaWNyb3Bob25lIEphY2siLCBTTkRfSkFDS19NSUNST1BIT05FLAorCQkJICAgICAgJm1pY19qYWNrLCBtaWNfamFja19waW5zLAorCQkJICAgICAgQVJSQVlfU0laRShtaWNfamFja19waW5zKSk7CiAKIAkvKiBoZWFkcGhv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pKTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFwKKwljYXQgJChkZXBmaWxlKSA+ICQoZG90LXRhcmdldCkuY21kOyAgICAgICAgICAgICAgICAgICAgICAgIFwKKwlwcmludGYgJyVzXG4nICdjbWRfJEAgOj0gJChtYWtlLWNtZCknID4+ICQoZG90LXRhcmdldCkuY21kKQorCisjIGlmX2NoYW5nZWQgICAgICAtIGV4ZWN1dGUgY29tbWFuZCBpZiBhbnkgcHJlcmVxdWlzaXRlIGlzIG5ld2VyIHRoYW4KKyMgICAgICAgICAgICAgICAgICAgdGFyZ2V0LCBvciBjb21tYW5kIGxpbmUgaGFzIGNoYW5nZWQKK2lmX2NoYW5nZWQgPSAkKGlmICQoc3RyaXAgJChhbnktcHJlcmVxKSAkKGFyZy1jaGVjaykpLCAgICAgICAgICAgICBcCisJQHNldCAtZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJJChlY2hvLWNtZCkgJChjbWRfJCgxKSk7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcCisJcHJpbnRmICclc1xuJyAnY21kXyRAIDo9ICQobWFrZS1jbWQpJyA+ICQoZG90LXRhcmdldCkuY21kKQorCisjIyMKKyMgQyBmbGFncyB0byBiZSB1c2VkIGluIHJ1bGUgZGVmaW5pdGlvbnMsIGluY2x1ZGVzOgorIyAtIGRlcGZpbGUgZ2VuZXJhdGlvbgorIyAtIGdsb2JhbCAkKENGTEFHUykKKyMgLSBwZXIgdGFyZ2V0IEMgZmxhZ3MKKyMgLSBwZXIgb2JqZWN0IEMgZmxhZ3MKKyMgLSBCVUlMRF9TVFIgbWFjcm8gdG8gYWxsb3cgJy1EIiQodmFyaWFibGUpIicgY29uc3RydWN0cworY19mbGFncyA9IC1XcCwtTUQsJChkZXBmaWxlKSwtTVQsJEAgJChDRkxBR1MpIC1EIkJVSUxEX1NUUihzKT1cI3MiICQoQ0ZMQUdTXyQoYmFzZX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c1trXS5tYXNrKSB8CisJCQkJCQl+Y2hhbm5lbHNba10ubWFzazsKKwkJCQkvKiBzcGVjaWFsIGNhc2UgZm9yIHRpbWVzdGFtcCAqLworCQkJCWlmIChjaGFubmVsc1trXS5zY2FsZSA9PSAxLjBmICYmCisJCQkJICAgIGNoYW5uZWxzW2tdLm9mZnNldCA9PSAwLjBmKQorCQkJCQlwcmludGYoIiUiIFBSSWQ2NCAiICIsIHZhbCk7CisJCQkJZWxzZQorCQkJCQlwcmludGYoIiUwNWYgIiwgKChmbG9hdCl2YWwgKworCQkJCQkJCSBjaGFubmVsc1trXS5vZmZzZXQpKgorCQkJCQkgICAgICAgY2hhbm5lbHNba10uc2NhbGUpOworCQkJfQorCQkJYnJlYWs7CisJCWRlZmF1bHQ6CisJCQlicmVhazsKKwkJfQorCXByaW50ZigiXG4iKTsKK30KKworaW50IG1haW4oaW50IGFyZ2MsIGNoYXIgKiphcmd2KQoreworCXVuc2lnbmVkIGxvbmcgbnVtX2xvb3BzID0gMjsKKwl1bnNpZ25lZCBsb25nIHRpbWVkZWxheSA9IDEwMDAwMDA7CisJdW5zaWduZWQgbG9uZyBidWZfbGVuID0gMTI4OworCisJaW50IHJldCwgYywgaSwgaiwgdG9yZWFkOworCWludCBmcDsKKworCWludCBudW1fY2hhbm5lbHM7CisJY2hhciAqdHJpZ2dlcl9uYW1lID0gTlVMTCwgKmRldmljZV9uYW1lID0gTlVMTDsKKwljaGFyICpkZXZfZGlyX25hbWUsICpidWZfZGlyX25hbWU7CisKKwlpbnQgZGF0YXJkeXRyaWdnZXIgPSAxOworCWNoYXIgKmRhdGE7CisJc3NpemVfdCByZWFkX3NpemU7CisJaW50IGRldl9udW0sIHRyaWdfbnVtOworCWNoYXIgKmJ1ZmZlcl9hY2Nlc3M7CisJaW50IHNjYW5fc2l6ZTsKKwlpbnQgbm9ldmVudHMgPSAwOworCWludCBub3RyaWdnZXIgPSAwOworCWNoYXIgKmR1bW15OworCisJc3RydWN0IGlpb19jaG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QlVHRlNfREVGQVVMVF9QQVRIOwogCiBzdGF0aWMgY29uc3QgY2hhciAqIGNvbnN0IGRlYnVnZnNfa25vd25fbW91bnRwb2ludHNbXSA9IHsKLQkiL3N5cy9rZXJuZWwvZGVidWciLAorCURFQlVHRlNfREVGQVVMVF9QQVRILAogCSIvZGVidWciLAogCTAsCiB9OwogCiBzdGF0aWMgYm9vbCBkZWJ1Z2ZzX2ZvdW5kOwogCitib29sIGRlYnVnZnNfY29uZmlndXJlZCh2b2lkKQoreworCXJldHVybiBkZWJ1Z2ZzX2ZpbmRfbW91bnRwb2ludCgpICE9IE5VTEw7Cit9CisKIC8qIGZpbmQgdGhlIHBhdGggdG8gdGhlIG1vdW50ZWQgZGVidWdmcyAqLwogY29uc3QgY2hhciAqZGVidWdmc19maW5kX21vdW50cG9pbnQodm9pZCkKIHsKLQljb25zdCBjaGFyICogY29uc3QgKnB0cjsKLQljaGFyIHR5cGVbMTAwXTsKLQlGSUxFICpmcDsKKwljb25zdCBjaGFyICpyZXQ7CiAKIAlpZiAoZGVidWdmc19mb3VuZCkKIAkJcmV0dXJuIChjb25zdCBjaGFyICopZGVidWdmc19tb3VudHBvaW50OwogCi0JcHRyID0gZGVidWdmc19rbm93bl9tb3VudHBvaW50czsKLQl3aGlsZSAoKnB0cikgewotCQlpZiAoZGVidWdmc192YWxpZF9tb3VudHBvaW50KCpwdHIpID09IDApIHsKLQkJCWRlYnVnZnNfZm91bmQgPSB0cnVlOwotCQkJc3RyY3B5KGRlYnVnZnNfbW91bnRwb2ludCwgKnB0cik7Ci0JCQlyZXR1cm4gZGVidWdmc19tb3VudHBvaW50OwotCQl9Ci0JCXB0cisrOwotCX0KKwlyZXQgPSBmaW5kX21vdW50cG9pbnQoImRlYnVnZnMiLCAobG9uZykgREVCVUdGU19NQUdJQywKKwkJCSAgICAgIGRlYnVnZnNfbW91bnRwb2ludCwgUEFUSF9NQVggKyAxLAorCQkJICAgICAgZGVidWdmc19rbm93bl9tb3VudHBvaW50c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SBpZiAoKGxvbmcpc3RfZnMuZl90eXBlICE9IG1hZ2ljKQorCQlyZXR1cm4gLUVOT0VOVDsKKworCXJldHVybiAwOworfQorCisvKiBmaW5kIHRoZSBwYXRoIHRvIGEgbW91bnRlZCBmaWxlIHN5c3RlbSAqLworY29uc3QgY2hhciAqZmluZF9tb3VudHBvaW50KGNvbnN0IGNoYXIgKmZzdHlwZSwgbG9uZyBtYWdpYywKKwkJCSAgICBjaGFyICptb3VudHBvaW50LCBpbnQgbGVuLAorCQkJICAgIGNvbnN0IGNoYXIgKiBjb25zdCAqa25vd25fbW91bnRwb2ludHMpCit7CisJY29uc3QgY2hhciAqIGNvbnN0ICpwdHI7CisJY2hhciBmb3JtYXRbMTI4XTsKKwljaGFyIHR5cGVbMTAwXTsKKwlGSUxFICpmcDsKKworCWlmIChrbm93bl9tb3VudHBvaW50cykgeworCQlwdHIgPSBrbm93bl9tb3VudHBvaW50czsKKwkJd2hpbGUgKCpwdHIpIHsKKwkJCWlmICh2YWxpZF9tb3VudHBvaW50KCpwdHIsIG1hZ2ljKSA9PSAwKSB7CisJCQkJc3RybmNweShtb3VudHBvaW50LCAqcHRyLCBsZW4gLSAxKTsKKwkJCQltb3VudHBvaW50W2xlbi0xXSA9IDA7CisJCQkJcmV0dXJuIG1vdW50cG9pbnQ7CisJCQl9CisJCQlwdHIrKzsKKwkJfQorCX0KKworCS8qIGdpdmUgdXAgYW5kIHBhcnNlIC9wcm9jL21vdW50cyAqLworCWZwID0gZm9wZW4oIi9wcm9jL21vdW50cyIsICJyIik7CisJaWYgKGZwID09IE5VTEwpCisJCXJldHVybiBOVUxMOworCisJc25wcmludGYoZm9ybWF0LCAxMjgsICIlJSpzICUlJWRzICUlOTlzICUlKnMgJSUqZCAlJSpkXG4iLCBsZW4pOworCisJd2hpbGUgKGZzY2FuZihmcCwgZm9ybWF0LCBtb3VudHBvaW50LCB0eXBlKSA9PSAyKSB7CisJCWlmIChzdHJjbXAodHlwZSwgZnN0eXBlKSA9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gLURDT05GSUdfUFJPVkVfTE9DS0lORyAtREJJVFNfUEVSX0xPTkc9X19XT1JEU0laRSAtRExJQkxPQ0tERVBfVkVSU0lPTj0nIiQoTElCTE9DS0RFUF9WRVJTSU9OKSInIC1yZHluYW1pYyAtTzAgLWcKK0NGTEFHUyArPSAtZlBJQwogCiBvdmVycmlkZSBDRkxBR1MgKz0gJChDT05GSUdfRkxBR1MpICQoSU5DTFVERVMpICQoUExVR0lOX0RJUl9TUSkKIAogaWZlcSAoJChWRVJCT1NFKSwxKQogICBRID0KLSAgcHJpbnRfY29tcGlsZSA9Ci0gIHByaW50X2FwcF9idWlsZCA9Ci0gIHByaW50X2ZwaWNfY29tcGlsZSA9CiAgIHByaW50X3NoYXJlZF9saWJfY29tcGlsZSA9CiAgIHByaW50X2luc3RhbGwgPQogZWxzZQogICBRID0gQAotICBwcmludF9jb21waWxlID0JCWVjaG8gJyAgQ0MgICAgICAgICAgICAgICAgICckKE9CSik7Ci0gIHByaW50X2FwcF9idWlsZCA9CQllY2hvICcgIEJVSUxEICAgICAgICAgICAgICAnJChPQkopOwotICBwcmludF9mcGljX2NvbXBpbGUgPQkJZWNobyAnICBDQyBGUElDICAgICAgICAgICAgJyQoT0JKKTsKLSAgcHJpbnRfc2hhcmVkX2xpYl9jb21waWxlID0JZWNobyAnICBCVUlMRCBTSEFSRUQgTElCICAgJyQoT0JKKTsKLSAgcHJpbnRfc3RhdGljX2xpYl9idWlsZCA9CWVjaG8gJyAgQlVJTEQgU1RBVElDIExJQiAgICckKE9CSik7Ci0gIHByaW50X2luc3RhbGwgPQkJZWNobyAnICBJTlNUQUxMICAgICAnJDEnCXRvCSQoREVTVERJUl9TUSkkMic7CisgIHByaW50X3NoYXJlZF9saWJfY29tcGlsZSA9CWVjaG8gJyAgTEQgICAgICAgJyQoT0JKKTsKKyAgcHJpbnRfc3RhdGljX2xpYl9idWlsZCA9CWVjaG8gJyAgTEQgICAgICAgJyQoT0JKKTsKKyAgcHJpbnRfaW5zd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lmbmRlZiBQWVRIT05fQ09ORklHCi0gICAgICAkKGNhbGwgZGlzYWJsZS1weXRob24scHl0aG9uLWNvbmZpZyB0b29sKQorICAgICAgJChjYWxsIGRpc2FibGUtcHl0aG9uLE5vICdweXRob24tY29uZmlnJyB0b29sIHdhcyBmb3VuZDogZGlzYWJsZXMgUHl0aG9uIHN1cHBvcnQgLSBwbGVhc2UgaW5zdGFsbCBweXRob24tZGV2ZWwvcHl0aG9uLWRldikKICAgICBlbHNlCiAKICAgICAgIFBZVEhPTl9DT05GSUdfU1EgOj0gJChjYWxsIHNoZWxsLXNxLCQoUFlUSE9OX0NPTkZJRykpCkBAIC01NDAsNyArNDU3LDcgQEAKICAgICAgIEZMQUdTX1BZVEhPTl9FTUJFRCA6PSAkKFBZVEhPTl9FTUJFRF9DQ09QVFMpICQoUFlUSE9OX0VNQkVEX0xET1BUUykKIAogICAgICAgaWZuZXEgKCQoZmVhdHVyZS1saWJweXRob24pLCAxKQotICAgICAgICAkKGNhbGwgZGlzYWJsZS1weXRob24sUHl0aG9uLmggKGZvciBQeXRob24gMi54KSkKKyAgICAgICAgJChjYWxsIGRpc2FibGUtcHl0aG9uLE5vICdQeXRob24uaCcgKGZvciBQeXRob24gMi54IHN1cHBvcnQpIHdhcyBmb3VuZDogZGlzYWJsZXMgUHl0aG9uIHN1cHBvcnQgLSBwbGVhc2UgaW5zdGFsbCBweXRob24tZGV2ZWwvcHl0aG9uLWRldikKICAgICAgIGVsc2UKIAogICAgICAgICBpZm5lcSAoJChmZWF0dXJlLWxpYnB5dGhvbi12ZXJzaW9uKSwgMSkKQEAgLTU2MCw2ICs0NzcsNyBAQAogICAgICAgICAgIExERkxBR1MgKz0gJChQWVRIT05fRU1CRURfTERGTEFHUykKICAgICAgICAgICBFWFRMSUJTICs9ICQoUFlUSE9OX0VNQkVEX0xJQkFERCkKICAgICAgICAgICBMQU5HX0JJTkRJTkdTICs9ICQob2JqLXBlcmYpcHl0aG9uL3BlcmYuc28KKyAgICAgICAgICAkKGNhbGwgZGV0ZWN0ZWQsQ09ORklHX0xJQlBZVEhPTikKICAgICAgICAgZW5kaWYKICAgICAgIGVuZGlmCiAgICAgZW5kaWYKQEAgLTYwMCw3ICs1MTgsNyBAQAogICAgICAgICAgICAgRVhUTElCUyArPSAtbGliZXJ0eQogICAgICAgICAgICAgQ0ZMQUdTICs9IC1ESEFWRV9DUExVU19ERU1BTkdMRV9TVVBQT1JUCiAgICAgICAgICAgZWxzZQotICAgICAgICAgICAgbXNnIDo9ICQod2FybmluZyBObyBiZmQuaC9saWJiZmQgZm91bmQsIGluc3RhbGwgYmludXRpbHMtZGV2W2VsXS96bGliLXN0YXRpYyB0byBnYWluIHN5bWJvbCBkZW1hbmdsaW5nKQorICAgICAgICAgICAgbXNnIDo9ICQod2FybmluZyBObyBiZmQuaC9saWJiZmQgZm91bmQsIHBsZWFzZSBpbnN0YWxsIGJpbnV0aWxzLWRldltlbF0vemxpYi1zdGF0aWMvbGliaWJlcnR5LWRldiB0byBnYWluIHN5bWJvbCBkZW1hbmdsaW5nKQogICAgICAgICAgICAgQ0ZMQUdTICs9IC1ETk9fREVNQU5HTEUKICAgICAgICAgICBlbmRpZgogICAgICAgICBlbmRpZgpAQCAtNjE3LDExICs1MzUsMjMgQEAKICAgaWZlcSAoJChmZWF0dXJlLXpsaWIpLCAxKQogICAgIENGTEFHUyArPSAtREhBVkVfWkxJQl9TVVBQT1JUCiAgICAgRVhUTElCUyArPSAtbHoKKyAgICAkKGNhbGwgZGV0ZWN0ZWQsQ09ORklHX1pMSUIpCiAgIGVsc2UKICAgICBOT19aTElCIDo9IDEKICAgZW5kaWYKIGVuZGlmCiAKK2lmbmRlZiBOT19MWk1BCisgIGlmZXEgKCQoZmVhdHVyZS1sem1hKSwgMSkKKyAgICBDRkxBR1MgKz0gLURIQVZFX0xaTUFfU1VQUE9SVAorICAgIEVYVExJQlMgKz0gLWxsem1hCisgICAgJChjYWxsIGRldGVjdGVkLENPTkZJR19MWk1BKQorICB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gdHJhY2UtZXZlbnQtc2NyaXB0aW5nLm8KK2xpYnBlcmYteSArPSB0cmFjZS1ldmVudC5vCitsaWJwZXJmLXkgKz0gc3ZnaGVscGVyLm8KK2xpYnBlcmYteSArPSBzb3J0Lm8KK2xpYnBlcmYteSArPSBoaXN0Lm8KK2xpYnBlcmYteSArPSB1dGlsLm8KK2xpYnBlcmYteSArPSB4eWFycmF5Lm8KK2xpYnBlcmYteSArPSBjcHVtYXAubworbGlicGVyZi15ICs9IGNncm91cC5vCitsaWJwZXJmLXkgKz0gdGFyZ2V0Lm8KK2xpYnBlcmYteSArPSByYmxpc3QubworbGlicGVyZi15ICs9IGludGxpc3QubworbGlicGVyZi15ICs9IHZkc28ubworbGlicGVyZi15ICs9IHN0YXQubworbGlicGVyZi15ICs9IHJlY29yZC5vCitsaWJwZXJmLXkgKz0gc3JjbGluZS5vCitsaWJwZXJmLXkgKz0gZGF0YS5vCitsaWJwZXJmLSQoQ09ORklHX1g4NikgKz0gdHNjLm8KK2xpYnBlcmYteSArPSBjbG9leGVjLm8KK2xpYnBlcmYteSArPSB0aHJlYWQtc3RhY2subworCitsaWJwZXJmLSQoQ09ORklHX0xJQkVMRikgKz0gc3ltYm9sLWVsZi5vCitsaWJwZXJmLSQoQ09ORklHX0xJQkVMRikgKz0gcHJvYmUtZXZlbnQubworCitpZm5kZWYgQ09ORklHX0xJQkVMRgorbGlicGVyZi15ICs9IHN5bWJvbC1taW5pbWFsLm8KK2VuZGlmCisKK2xpYnBlcmYtJChDT05GSUdfRFdBUkYpICs9IHByb2JlLWZpbmRlci5vCitsaWJwZXJmLSQoQ09ORklHX0RXQVJGKSArPSBkd2FyZi1hdXgubworCitsaWJwZXJmLSQoQ09ORklHX0xJQkRXX0RXQVJGX1VOV0lORCkgKz0gdW53aW5kLWxpYmR3Lm8KK2xpYnBlcmYtJChDT05GSUdfTElCVU5XSU5EKSAgICAgICAgICArPSB1bndpbmQtbGlidW53aW5kLm8KKworbGlicGVyZi0kKENPTk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RzX3BhdGgoIiIsIG1udCk7CisKKwlyZXR1cm4gbW50OworfQorCitzdGF0aWMgY29uc3QgY2hhciAqX19wZXJmX2RlYnVnZnNfbW91bnQoY29uc3QgY2hhciAqbW91bnRwb2ludCkKIHsKIAljb25zdCBjaGFyICptbnQ7CiAKQEAgLTMxNyw3ICszMzcsMjAgQEAKIAlpZiAoIW1udCkKIAkJcmV0dXJuIE5VTEw7CiAKLQlzZXRfdHJhY2luZ19ldmVudHNfcGF0aChtbnQpOworCXNldF90cmFjaW5nX2V2ZW50c19wYXRoKCJ0cmFjaW5nLyIsIG1udCk7CisKKwlyZXR1cm4gbW50OworfQorCitjb25zdCBjaGFyICpwZXJmX2RlYnVnZnNfbW91bnQoY29uc3QgY2hhciAqbW91bnRwb2ludCkKK3sKKwljb25zdCBjaGFyICptbnQ7CisKKwltbnQgPSBfX3BlcmZfdHJhY2Vmc19tb3VudChtb3VudHBvaW50KTsKKwlpZiAobW50KQorCQlyZXR1cm4gbW50OworCisJbW50ID0gX19wZXJmX2RlYnVnZnNfbW91bnQobW91bnRwb2ludCk7CiAKIAlyZXR1cm4gbW50OwogfQpAQCAtMzI1LDEyICszNTgsMTkgQEAKIHZvaWQgcGVyZl9kZWJ1Z2ZzX3NldF9wYXRoKGNvbnN0IGNoYXIgKm1udHB0KQogewogCXNucHJpbnRmKGRlYnVnZnNfbW91bnRwb2ludCwgc3RybGVuKGRlYnVnZnNfbW91bnRwb2ludCksICIlcyIsIG1udHB0KTsKLQlzZXRfdHJhY2luZ19ldmVudHNfcGF0aChtbnRwdCk7CisJc2V0X3RyYWNpbmdfZXZlbnRzX3BhdGgoInRyYWNpbmcvIiwgbW50cHQpOworfQorCitzdGF0aWMgY29uc3QgY2hhciAqZmluZF90cmFjZWZzKHZvaWQpCit7CisJY29uc3QgY2hhciAqcGF0aCA9IF9fcGVyZl90cmFjZWZzX21vdW50KE5VTEwpOworCisJcmV0dXJuIHBhdGg7CiB9CiAKIHN0YXRpYyBjb25zdCBja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aGUgZW5kIHIzID09IDAgaWYgZXZlcnl0aGluZydzIE9LLgorICovCisJbm9wCQkJIyBndWFyYW50ZWVkIHRvIGJlIGlsbGVnYWwgaW4gcmV2ZXJzZS1lbmRpYW4KKwltcglyOSxyMTUKKwljbXBkICAgIHI5LHIzCQkjIGNoZWNrIHIzCisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDQJIyBjaGVjayByNAorCWNtcGQgICAgcjkscjQKKwlibmUgICAgIDFmCisJbGlzICAgICByOSwweDAwRkYJIyBjaGVjayBDUgorCW9yaSAgICAgcjkscjksMHhGMDAwCisJbWZjciAgICByMTAKKwlhbmQgICAgIHIxMCxyMTAscjkKKwljbXB3ICAgIHI5LHIxMAorCWFkZGkgICAgcjkscjE1LDM0CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDMyCSMgY2hlY2sgTFIKKwltZmxyICAgIHIxMAorCWNtcGQgICAgcjkscjEwCisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDUJIyBjaGVjayByNQorCWNtcGQgICAgcjkscjUKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsNgkjIGNoZWNrIHI2CisJY21wZCAgICByOSxyNgorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSw3CSMgY2hlY2sgcjcKKwljbXBkICAgIHI5LHI3CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDgJIyBjaGVjayByOAorCWNtcGQgICAgcjkscjgKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMTMJIyBjaGVjayByMTMKKwljbXBkICAgIHI5LHIxMworCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwxNAkjIGNoZWNrIHIxNAorCWNtcGQgICAgcjkscjE0CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDE2CSMgY2hlY2sgcjE2CisJY21wZCAgICByOSxyMTYKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMTcJIyBjaGVjayByMTcKKwljbXBkICAgIHI5LHIxNworCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwxOAkjIGNoZWNrIHIxOAorCWNtcGQgICAgcjkscjE4CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDE5CSMgY2hlY2sgcjE5CisJY21wZCAgICByOSxyMTkKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMjAJIyBjaGVjayByMjAKKwljbXBkICAgIHI5LHIyMAorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwyMQkjIGNoZWNrIHIyMQorCWNtcGQgICAgcjkscjIxCisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDIyCSMgY2hlY2sgcjIyCisJY21wZCAgICByOSxyMjIKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMjMJIyBjaGVjayByMjMKKwljbXBkICAgIHI5LHIyMworCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwyNAkjIGNoZWNrIHIyNAorCWNtcGQgICAgcjkscjI0CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDI1CSMgY2hlY2sgcjI1CisJY21wZCAgICByOSxyMjUKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMjYJIyBjaGVjayByMjYKKwljbXBkICAgIHI5LHIyNgorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwyNwkjIGNoZWNrIHIyNworCWNtcGQgICAgcjkscjI3CisJYm5lICAgICAxZgorCWFkZGkgICAgcjkscjE1LDI4CSMgY2hlY2sgcjI4CisJY21wZCAgICByOSxyMjgKKwlibmUgICAgIDFmCisJYWRkaSAgICByOSxyMTUsMjkJIyBjaGVjayByMjkKKwljbXBkICAgIHI5LHIyOQorCWJuZSAgICAgMWYKKwlhZGRpICAgIHI5LHIxNSwzMAkjIGNoZWNrIHIzMAorCWNtcGQgICAgcjkscjMwCisJYm5lICAgICAxZgorCWFkZGkg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yAqLwordm9pZCAqc2hhcmVkX3RocmVhZCh2b2lkICphcmcpCit7CisJd2hpbGUgKCFkb25lKSB7CisJCS8qIHByb3RlY3QgdGhlIGxpc3QgKi8KKwkJcHRocmVhZF9tdXRleF9sb2NrKCZsaXN0X2xvY2spOworCisJCS8qIHNlZSBpZiB3ZSdyZSByZWFkeSB0byBjaGVjayB0aGUgbGlzdCAqLworCQlpZiAobGlzdGNvdW50ID49IExJU1RTSVpFKSB7CisJCQljaGVja2xpc3QoZ2xvYmFsX2xpc3QsIExJU1RTSVpFKTsKKwkJCWxpc3Rjb3VudCA9IDA7CisJCX0KKwkJY2xvY2tfZ2V0dGltZShDTE9DS19NT05PVE9OSUMsICZnbG9iYWxfbGlzdFtsaXN0Y291bnQrK10pOworCisJCXB0aHJlYWRfbXV0ZXhfdW5sb2NrKCZsaXN0X2xvY2spOworCX0KKwlyZXR1cm4gTlVMTDsKK30KKworCisvKiBFYWNoIGluZGVwZW5kZW50IHRocmVhZCBmaWxscyBpbiBpdHMgb3duCisgKiBsaXN0LiBUaGlzIHN0cmVzc2VzIGNsb2NrX2dldHRpbWUoKSBsb2NrIGNvbnRlbnRpb24uCisgKi8KK3ZvaWQgKmluZGVwZW5kZW50X3RocmVhZCh2b2lkICphcmcpCit7CisJc3RydWN0IHRpbWVzcGVjIG15X2xpc3RbTElTVFNJWkVdOworCWludCBjb3VudDsKKworCXdoaWxlICghZG9uZSkgeworCQkvKiBmaWxsIHRoZSBsaXN0ICovCisJCWZvciAoY291bnQgPSAwOyBjb3VudCA8IExJU1RTSVpFOyBjb3VudCsrKQorCQkJY2xvY2tfZ2V0dGltZShDTE9DS19NT05PVE9OSUMsICZteV9saXN0W2NvdW50XSk7CisJCWNoZWNrbGlzdChteV9saXN0LCBMSVNUU0laRSk7CisJfQorCXJldHVybiBOVUxMOworfQorCisjZGVmaW5lIERFRkFVTFRfVEhSRUFEX0NPVU5UIDgKKyNkZWZpbmUgREVGQVVMVF9SVU5USU1FIDMwCisKK2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