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AgICAgPSAiZG0zNjVfdnBzcyIsCisgICAgICAgLm51bV9yZXNvdXJjZXMgICAgICAgICAgPSBBUlJBWV9TSVpFKGRtMzY1X3Zwc3NfcmVzb3VyY2VzKSwKKyAgICAgICAucmVzb3VyY2UgICAgICAgICAgICAgICA9IGRtMzY1X3Zwc3NfcmVzb3VyY2VzLAorfTsKKworc3RhdGljIHN0cnVjdCByZXNvdXJjZSB2cGZlX3Jlc291cmNlc1tdID0geworCXsKKwkJLnN0YXJ0ICAgICAgICAgID0gSVJRX1ZESU5UMCwKKwkJLmVuZCAgICAgICAgICAgID0gSVJRX1ZESU5UMCwKKwkJLmZsYWdzICAgICAgICAgID0gSU9SRVNPVVJDRV9JUlEsCisJfSwKKwl7CisJCS5zdGFydCAgICAgICAgICA9IElSUV9WRElOVDEsCisJCS5lbmQgICAgICAgICAgICA9IElSUV9WRElOVDEsCisJCS5mbGFncyAgICAgICAgICA9IElPUkVTT1VSQ0VfSVJRLAorCX0sCit9OworCitzdGF0aWMgdTY0IHZwZmVfY2FwdHVyZV9kbWFfbWFzayA9IERNQV9CSVRfTUFTSygzMik7CitzdGF0aWMgc3RydWN0IHBsYXRmb3JtX2RldmljZSB2cGZlX2NhcHR1cmVfZGV2ID0geworCS5uYW1lICAgICAgICAgICA9IENBUFRVUkVfRFJWX05BTUUsCisJLmlkICAgICAgICAgICAgID0gLTEsCisJLm51bV9yZXNvdXJjZXMgID0gQVJSQVlfU0laRSh2cGZlX3Jlc291cmNlcyksCisJLnJlc291cmNlICAgICAgID0gdnBmZV9yZXNvdXJjZXMsCisJLmRldiA9IHsKKwkJLmRtYV9tYXNrICAgICAgICAgICAgICAgPSAmdnBmZV9jYXB0dXJlX2RtYV9tYXNrLAorCQkuY29oZXJlbnRfZG1hX21hc2sgICAgICA9IERNQV9CSVRfTUFTSygzMiksCisJfSwKK307CisKK3N0YXRpYyB2b2lkIGRtMzY1X2lzaWZfc2V0dXBfcGlubXV4KHZvaWQpCit7CisJZGF2aW5jaV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0aXRhbl9pbmJfcCh1bnNpZ25lZCBsb25nIHBvcnQpCi17Ci0gICAgICAgIHU4IHY7Ci0KLSAgICAgICAgaWYgKFBYU0VHKHBvcnQpKQotICAgICAgICAgICAgICAgIHYgPSBjdHJsX2luYihwb3J0KTsKLSAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIHYgPSBjdHJsX2ludyhwb3J0MmFkcihwb3J0KSkgJiAweGZmOwotICAgICAgICBjdHJsX2RlbGF5KCk7Ci0gICAgICAgIHJldHVybiB2OwotfQotCi11MTYgdGl0YW5faW53KHVuc2lnbmVkIGxvbmcgcG9ydCkKLXsKLSAgICAgICAgaWYgKFBYU0VHKHBvcnQpKQotICAgICAgICAgICAgICAgIHJldHVybiBjdHJsX2ludyhwb3J0KTsKLSAgICAgICAgZWxzZSBpZiAocG9ydCA+PSAweDIwMDApCi0gICAgICAgICAgICAgICAgcmV0dXJuIGN0cmxfaW53KHBvcnQyYWRyKHBvcnQpKTsKLSAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIG1heWJlYmFkaW8ocG9ydCk7Ci0gICAgICAgIHJldHVybiAwOwotfQotCi11MzIgdGl0YW5faW5sKHVuc2lnbmVkIGxvbmcgcG9ydCkKLXsKLSAgICAgICAgaWYgKFBYU0VHKHBvcnQpKQotICAgICAgICAgICAgICAgIHJldHVybiBjdHJsX2lubChwb3J0KTsKLSAgICAgICAgZWxzZSBpZiAocG9ydCA+PSAweDIwMDApCi0gICAgICAgICAgICAgICAgcmV0dXJuIGN0cmxfaW53KHBvcnQyYWRyKHBvcnQpKTsKLSAgICAgICAgZWxzZQotICAgICAgICAgICAgICAgIG1heWJlYmFkaW8ocG9ydCk7Ci0gICAgICAgIHJldHVybiAwOwotfQotCi12b2lkIHRpdGFuX291dGIodTggdmFsdWUsIHVuc2lnbmVkIGxvbmcgcG9ydCkKLXsKLSAgICAgICAgaWYgKFBYU0VHKHBvcnQpKQotICAgICAgICAgICAgICAgIGN0cmxfb3V0Yih2YWx1Z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KyMKKyMgQ09ORklHX0kyQ19ERVNJR05XQVJFIGlzIG5vdCBzZXQKKyMgQ09ORklHX0kyQ19PQ09SRVMgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX1NIX01PQklMRSBpcyBub3Qgc2V0CisjIENPTkZJR19JMkNfU0lNVEVDIGlzIG5vdCBzZXQKKworIworIyBFeHRlcm5hbCBJMkMvU01CdXMgYWRhcHRlciBkcml2ZXJzCisjCisjIENPTkZJR19JMkNfUEFSUE9SVF9MSUdIVCBpcyBub3Qgc2V0CisjIENPTkZJR19JMkNfVEFPU19FVk0gaXMgbm90IHNldAorIyBDT05GSUdfSTJDX1RJTllfVVNCIGlzIG5vdCBzZXQKKworIworIyBPdGhlciBJMkMvU01CdXMgYnVzIGRyaXZlcnMKKyMKKyMgQ09ORklHX0kyQ19QQ0FfUExBVEZPUk0gaXMgbm90IHNldAorIyBDT05GSUdfSTJDX1NUVUIgaXMgbm90IHNldAorCisjCisjIE1pc2NlbGxhbmVvdXMgSTJDIENoaXAgc3VwcG9ydAorIworIyBDT05GSUdfU0VOU09SU19UU0wyNTUwIGlzIG5vdCBzZXQKKyMgQ09ORklHX0kyQ19ERUJVR19DT1JFIGlzIG5vdCBzZXQKKyMgQ09ORklHX0kyQ19ERUJVR19BTEdPIGlzIG5vdCBzZXQKKyMgQ09ORklHX0kyQ19ERUJVR19CVVMgaXMgbm90IHNldAorIyBDT05GSUdfSTJDX0RFQlVHX0NISVAgaXMgbm90IHNldAorQ09ORklHX1NQST15CisjIENPTkZJR19TUElfREVCVUcgaXMgbm90IHNldAorQ09ORklHX1NQSV9NQVNURVI9eQorCisjCisjIFNQSSBNYXN0ZXIgQ29udHJvbGxlciBEcml2ZXJzCisjCisjIENPTkZJR19TUElfQklUQkFORyBpcyBub3Qgc2V0CisjIENPTkZJR19TUElfU0hfTVNJT0YgaXMgbm90IHNldAorIyBDT05GSUdfU1BJX1NIX1NDSSBpcyBub3Qgc2V0CisjIENPTkZJR19TUElfWElMSU5YIGlzIG5vdCBzZXQKKyMgQ09ORklHX1NQSV9ERVNJR05XQVJFIGlzIG5vdCBzZXQKKworIworIyBTUEkgUHJvdG9jb2wgTWFzdGVycworIworIyBDT05GSUdfU1BJX1NQSURFViBpcyBub3Qgc2V0CisjIENPTkZJR19TUElfVExFNjJYMCBpcyBub3Qgc2V0CisKKyMKKyMgUFBTIHN1cHBvcnQKKyMKKyMgQ09ORklHX1BQUyBpcyBub3Qgc2V0CisjIENPTkZJR19XMSBpcyBub3Qgc2V0CisjIENPTkZJR19QT1dFUl9TVVBQTFkgaXMgbm90IHNldAorIyBDT05GSUdfSFdNT04gaXMgbm90IHNldAorIyBDT05GSUdfVEhFUk1BTCBpcyBub3Qgc2V0CitDT05GSUdfV0FUQ0hET0c9eQorIyBDT05GSUdfV0FUQ0hET0dfTk9XQVlPVVQgaXMgbm90IHNldAorCisjCisjIFdhdGNoZG9nIERldmljZSBEcml2ZXJzCisjCisjIENPTkZJR19TT0ZUX1dBVENIRE9HIGlzIG5vdCBzZXQKKyMgQ09ORklHX0FMSU03MTAxX1dEVCBpcyBub3Qgc2V0CisjIENPTkZJR19TSF9XRFQgaXMgbm90IHNldAorCisjCisjIFBDSS1iYXNlZCBXYXRjaGRvZyBDYXJkcworIworIyBDT05GSUdfUENJUENXQVRDSERPRyBpcyBub3Qgc2V0CisjIENPTkZJR19XRFRQQ0kgaXMgbm90IHNldAorCisjCisjIFVTQi1iYXNlZCBXYXRjaGRvZyBDYXJkcworIworIyBDT05GSUdfVVNCUENXQVRDSERPRyBpcyBub3Qgc2V0CitDT05GSUdfU1NCX1BPU1NJQkxFPXkKKworIworIyBTb25pY3MgU2lsaWNvbiBCYWNrcGxhbmUKKyMKKyMgQ09ORklHX1NTQiBpcyBub3Qgc2V0CisKKyMKKyMgTXVsdGlmdW5jdGlvbiBkZXZpY2UgZHJpdmVycworIworIyBDT05GSUdfTUZEX0NPUkUgaXMgbm90IHNldAorIyBDT05GSUdfTUZEX1NNNTAxIGlzIG5v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ypmb3J3YXJkIHF1YWQgcm91bmQqLwotc3RhdGljIHZvaWQgUSAodTMyICogYmxvY2ssIHU4ICogS3IsIHUzMiAqIEttKSB7CitzdGF0aWMgdm9pZCBRKHUzMiAqYmxvY2ssIHU4ICpLciwgdTMyICpLbSkKK3sKIAl1MzIgSTsKIAlibG9ja1syXSBePSBGMShibG9ja1szXSwgS3JbMF0sIEttWzBdKTsKIAlibG9ja1sxXSBePSBGMihibG9ja1syXSwgS3JbMV0sIEttWzFdKTsKIAlibG9ja1swXSBePSBGMyhibG9ja1sxXSwgS3JbMl0sIEttWzJdKTsKLQlibG9ja1szXSBePSBGMShibG9ja1swXSwgS3JbM10sIEttWzNdKTsJCQorCWJsb2NrWzNdIF49IEYxKGJsb2NrWzBdLCBLclszXSwgS21bM10pOwogfQogCiAvKnJldmVyc2UgcXVhZCByb3VuZCovCi1zdGF0aWMgdm9pZCBRQkFSICh1MzIgKiBibG9jaywgdTggKiBLciwgdTMyICogS20pIHsKK3N0YXRpYyB2b2lkIFFCQVIodTMyICpibG9jaywgdTggKktyLCB1MzIgKkttKQorewogCXUzMiBJOwotICAgICAgICBibG9ja1szXSBePSBGMShibG9ja1swXSwgS3JbM10sIEttWzNdKTsKLSAgICAgICAgYmxvY2tbMF0gXj0gRjMoYmxvY2tbMV0sIEtyWzJdLCBLbVsyXSk7Ci0gICAgICAgIGJsb2NrWzFdIF49IEYyKGJsb2NrWzJdLCBLclsxXSwgS21bMV0pOwotICAgICAgICBibG9ja1syXSBePSBGMShibG9ja1szXSwgS3JbMF0sIEttWzBdKTsKKwlibG9ja1szXSBePSBGMShibG9ja1swXSwgS3JbM10sIEttWzNdKTsKKwlibG9ja1swXSBePSBGMyhibG9ja1sxXSwgS3JbMl0sIEttWzJdKTsKKwlibG9ja1sxXSBePSBGMihibG9ja1syXSwgS3JbMV0sIEttWzFdKTsKKwlibG9ja1syXSBePSBGMShibG9ja1szXSwgS3JbMF0sIEttWzBdKTsKIH0KIAogc3RhdGljIHZva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IEttKTsKLQlLbSA9IGMtPkttWzldOyBLciA9IGMtPktyWzldOyBRQkFSIChibG9jaywgS3IsIEttKTsKLQlLbSA9IGMtPkttWzEwXTsgS3IgPSBjLT5LclsxMF07IFFCQVIgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bMTFdOyBLciA9IGMtPktyWzExXTsgUUJBUiAoYmxvY2ssIEtyLCBLbSk7CisJS20gPSBjLT5LbVswXTsgS3IgPSBjLT5LclswXTsgUShibG9jaywgS3IsIEttKTsKKwlLbSA9IGMtPkttWzFdOyBLciA9IGMtPktyWzFdOyBRKGJsb2NrLCBLciwgS20pOworCUttID0gYy0+S21bMl07IEtyID0gYy0+S3JbMl07IFEoYmxvY2ssIEtyLCBLbSk7CisJS20gPSBjLT5LbVszXTsgS3IgPSBjLT5LclszXTsgUShibG9jaywgS3IsIEttKTsKKwlLbSA9IGMtPkttWzRdOyBLciA9IGMtPktyWzRdOyBRKGJsb2NrLCBLciwgS20pOworCUttID0gYy0+S21bNV07IEtyID0gYy0+S3JbNV07IFEoYmxvY2ssIEtyLCBLbSk7CisJS20gPSBjLT5LbVs2XTsgS3IgPSBjLT5Lcls2XTsgUUJBUihibG9jaywgS3IsIEttKTsKKwlLbSA9IGMtPkttWzddOyBLciA9IGMtPktyWzddOyBRQkFSKGJsb2NrLCBLciwgS20pOworCUttID0gYy0+S21bOF07IEtyID0gYy0+S3JbOF07IFFCQVIoYmxvY2ssIEtyLCBLbSk7CisJS20gPSBjLT5LbVs5XTsgS3IgPSBjLT5Lcls5XTsgUUJBUihibG9jaywgS3IsIEttKTsKKwlLbSA9IGMtPkttWzEwXTsgS3IgPSBjLT5LclsxMF07IFFCQVIoYmxvY2ssIEtyLCBLbSk7CisJS20gPSBjLT5LbVsxMV07IEtyID0gYy0+S3JbMTFdOyBRQkFSKGJsb2NrLCBLciwgS20pOwogCiAJZHN0WzBdID0gY3B1X3RvX2JlMzIoYmxvY2tbMF0pOwogCWRzdFsxXSA9IGNwdV90b19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EgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bN107IEtyID0gYy0+S3JbN107IFEgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bNl07IEtyID0gYy0+S3JbNl07IFEgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bNV07IEtyID0gYy0+S3JbNV07IFFCQVIgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bNF07IEtyID0gYy0+S3JbNF07IFFCQVIgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bM107IEtyID0gYy0+S3JbM107IFFCQVIgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bMl07IEtyID0gYy0+S3JbMl07IFFCQVIgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bMV07IEtyID0gYy0+S3JbMV07IFFCQVIgKGJsb2NrLCBLciwgS20pOwotCUttID0gYy0+S21bMF07IEtyID0gYy0+S3JbMF07IFFCQVIgKGJsb2NrLCBLciwgS20pOwotCQorCUttID0gYy0+S21bMTFdOyBLciA9IGMtPktyWzExXTsgUShibG9jaywgS3IsIEttKTsKKwlLbSA9IGMtPkttWzEwXTsgS3IgPSBjLT5LclsxMF07IFEoYmxvY2ssIEtyLCBLbSk7CisJS20gPSBjLT5LbVs5XTsgS3IgPSBjLT5Lcls5XTsgUShibG9jaywgS3IsIEttKTsKKwlLbSA9IGMtPkttWzhdOyBLciA9IGMtPktyWzhdOyBRKGJsb2NrLCBLciwgS20pOworCUttID0gYy0+S21bN107IEtyID0gYy0+S3JbN107IFEoYmxvY2ssIEtyLCBLbSk7CisJS20gPSBjLT5LbVs2XTsgS3IgPSBjLT5Lcls2XTsgUShibG9jaywgS3IsIEttKTsKKwlLbSA9IGMtPkttWzVdOyBLciA9IGMtPktyWzVdOyBRQkFSKGJsb2NrLCBLciwgS20pOworCUttID0gYy0+S21bNF07IEtyID0gYy0+S3JbNF07IFFCQVIoYmxvY2ssIEtyLCBLbSk7CisJS20gPSBjLT5Lb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XJhdGlvbiBmYWlsZWQuICglZCkiLCByZXQpOworCQlyZXQgPSAtRUlPOworCX0gZWxzZQorCQlyZXQgPSAwOworCisJZGViX3hmZXIoImluOiByZXEuICUwMngsIHZhbDogJTA0eCwgaW5kOiAlMDR4LCBidWZmZXI6ICIsIHJlcSwgdmFsdWUsIGluZGV4KTsKKwlkZWJ1Z19kdW1wKGIsIGJsZW4sIGRlYl94ZmVyKTsKKworCW11dGV4X3VubG9jaygmZC0+dXNiX211dGV4KTsKKwlyZXR1cm4gcmV0OworfQorCitzdGF0aWMgaW50IGF6NjAyN191c2Jfb3V0X29wKHN0cnVjdCBkdmJfdXNiX2RldmljZSAqZCwKKwkJCSAgICAgdTggcmVxLAorCQkJICAgICB1MTYgdmFsdWUsCisJCQkgICAgIHUxNiBpbmRleCwKKwkJCSAgICAgdTggKmIsCisJCQkgICAgIGludCBibGVuKQoreworCWludCByZXQ7CisKKwlkZWJfeGZlcigib3V0OiByZXEuICUwMngsIHZhbDogJTA0eCwgaW5kOiAlMDR4LCBidWZmZXI6ICIsIHJlcSwgdmFsdWUsIGluZGV4KTsKKwlkZWJ1Z19kdW1wKGIsIGJsZW4sIGRlYl94ZmVyKTsKKworCWlmIChtdXRleF9sb2NrX2ludGVycnVwdGlibGUoJmQtPnVzYl9tdXRleCkpCisJCXJldHVybiAtRUFHQUlOOworCisJcmV0ID0gdXNiX2NvbnRyb2xfbXNnKGQtPnVkZXYsCisJCQkgICAgICB1c2Jfc25kY3RybHBpcGUoZC0+dWRldiwgMCksCisJCQkgICAgICByZXEsCisJCQkgICAgICBVU0JfVFlQRV9WRU5ET1IgfCBVU0JfRElSX09VVCwKKwkJCSAgICAgIHZhbHVlLAorCQkJICAgICAgaW5kZXgsCisJCQkgICAgICBiLAorCQkJICAgICAgYmxlbiwKKwkJCSAgICAgIDIwMDApOworCisJaWYgKHJldCAhPSBibGVuKSB7CisJCXdhcm4oInVzYiBvdXQgb3BlcmF0aW9uIGZhaWxlZC4gKCVkKSIs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GSU5FX01PRF9PUFRfQURBUFRFUl9OUihhZGFwdGVyX25yKTsKKworI2RlZmluZSBDT01NQU5EX1RJTUVPVVRfV09SS0FST1VORAorCisjZGVmaW5lIGRwcmludGsJaWYgKGRlYnVnKSBwcmludGsKKworI2RlZmluZSBERVZJQ0VfTkFNRSAibmdlbmUiCisKKyNkZWZpbmUgbmd3cml0ZWIoZGF0LCBhZHIpICAgICAgICAgd3JpdGViKChkYXQpLCAoY2hhciAqKShkZXYtPmlvbWVtICsgKGFkcikpKQorI2RlZmluZSBuZ3dyaXRlbChkYXQsIGFkcikgICAgICAgICB3cml0ZWwoKGRhdCksIChjaGFyICopKGRldi0+aW9tZW0gKyAoYWRyKSkpCisjZGVmaW5lIG5nd3JpdGViKGRhdCwgYWRyKSAgICAgICAgIHdyaXRlYigoZGF0KSwgKGNoYXIgKikoZGV2LT5pb21lbSArIChhZHIpKSkKKyNkZWZpbmUgbmdyZWFkbChhZHIpICAgICAgICAgICAgICAgcmVhZGwoZGV2LT5pb21lbSArIChhZHIpKQorI2RlZmluZSBuZ3JlYWRiKGFkcikgICAgICAgICAgICAgICByZWFkYihkZXYtPmlvbWVtICsgKGFkcikpCisjZGVmaW5lIG5nY3B5dG8oYWRyLCBzcmMsIGNvdW50KSAgIG1lbWNweV90b2lvKChjaGFyICopIFwKKwkJCQkgICAoZGV2LT5pb21lbSArIChhZHIpKSwgKHNyYyksIChjb3VudCkpCisjZGVmaW5lIG5nY3B5ZnJvbShkc3QsIGFkciwgY291bnQpIG1lbWNweV9mcm9taW8oKGRzdCksIChjaGFyICopIFwKKwkJCQkgICAoZGV2LT5pb21lbSArIChhZHIpKSwgKGNvdW50KSkKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBuR2VuZSBpbnRlcnJ1cHQgaGFuZGxlciAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqK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MDsKKwkJCQl0YXNrbGV0X3NjaGVkdWxlKAorCQkJCQkmZGV2LT5jaGFubmVsW2ldLmRlbXV4X3Rhc2tsZXQpOworCQkJCXJjID0gSVJRX0hBTkRMRUQ7CisJCQl9CisJCX0KKwkJc3Bpbl91bmxvY2soJmRldi0+Y2hhbm5lbFtpXS5zdGF0ZV9sb2NrKTsKKwl9CisKKwkvKiBSZXF1ZXN0IG1pZ2h0IGhhdmUgYmVlbiBwcm9jZXNzZWQgYnkgYSBwcmV2aW91cyBjYWxsLiAqLworCXJldHVybiBJUlFfSEFORExFRDsKK30KKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBuR2VuZSBjb21tYW5kIGludGVyZmFjZSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgdm9pZCBkdW1wX2NvbW1hbmRfaW8oc3RydWN0IG5nZW5lICpkZXYpCit7CisJdTggYnVmWzhdLCAqYjsKKworCW5nY3B5ZnJvbShidWYsIEhPU1RfVE9fTkdFTkUsIDgpOworCXByaW50ayhLRVJOX0VSUiAiaG9zdF90b19uZ2VuZSAoJTA0eCk6ICUwMnggJTAyeCAlMDJ4ICUwMnggJTAyeCAlMDJ4ICUwMnggJTAyeFxuIiwKKwkJSE9TVF9UT19OR0VORSwgYnVmWzBdLCBidWZbMV0sIGJ1ZlsyXSwgYnVmWzNdLAorCQlidWZbNF0sIGJ1Zls1XSwgYnVmWzZdLCBidWZbN10pOworCisJbmdjcHlmcm9tKGJ1ZiwgTkdFTkVfVE9fSE9TVCwgOCk7CisJcHJpbnRrKEtFUk5fRVJSICJuZ2VuZV90b19ob3N0ICglMDR4KTogJTAyeCAlMDJ4ICUwMn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CisJc3Bpbl91bmxvY2tfaXJxKCZjaGFuLT5zdGF0ZV9sb2NrKTsKKworCWlmIChuZ2VuZV9jb21tYW5kKGRldiwgJmNvbSkgPCAwKSB7CisJCXVwKCZkZXYtPnN0cmVhbV9tdXRleCk7CisJCXJldHVybiAtMTsKKwl9CisJdXAoJmRldi0+c3RyZWFtX211dGV4KTsKKwlyZXR1cm4gMDsKK30KKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIEkyQyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyB2b2lkIG5nZW5lX2kyY19zZXRfYnVzKHN0cnVjdCBuZ2VuZSAqZGV2LCBpbnQgYnVzKQoreworCWlmICghKGRldi0+Y2FyZF9pbmZvLT5pMmNfYWNjZXNzICYgMikpCisJCXJldHVybjsKKwlpZiAoZGV2LT5pMmNfY3VycmVudF9idXMgPT0gYnVzKQorCQlyZXR1cm47CisKKwlzd2l0Y2ggKGJ1cykgeworCWNhc2UgMDoKKwkJbmdlbmVfY29tbWFuZF9ncGlvX3NldChkZXYsIDMsIDApOworCQluZ2VuZV9jb21tYW5kX2dwaW9fc2V0KGRldiwgMiwgMSk7CisJCWJyZWFrOworCisJY2FzZSAxOgorCQluZ2VuZV9jb21tYW5kX2dwaW9fc2V0KGRldiwgMiwgMCk7CisJCW5nZW5lX2NvbW1hbmRfZ3Bpb19zZXQoZGV2LCAzLCAxKTsKKwkJYnJlYWs7CisJfQorCWRldi0+aTJjX2N1cnJlbnRfYnVzID0gYnVzOworfQorCitzdGF0aWMgaW50IG5nZW5lX2kyY19tYXN0ZXJfeGZlcihzdHJ1Y3QgaTJjX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hbmQgQVBJIGludGVyZmFjZSAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgc3dhcF9idWZmZXIodTMyICpwLCB1MzIgbGVuKQoreworCXdoaWxlIChsZW4pIHsKKwkJKnAgPSBzd2FiMzIoKnApOworCQlwKys7CisJCWxlbiAtPSA0OworCX0KK30KKworCitzdGF0aWMgdm9pZCAqdHNpbl9leGNoYW5nZSh2b2lkICpwcml2LCB2b2lkICpidWYsIHUzMiBsZW4sIHUzMiBjbG9jaywgdTMyIGZsYWdzKQoreworCXN0cnVjdCBuZ2VuZV9jaGFubmVsICpjaGFuID0gcHJpdjsKKworCisjaWZkZWYgQ09NTUFORF9USU1FT1VUX1dPUktBUk9VTkQKKwlpZiAoY2hhbi0+dXNlcnMgPiAwKQorI2VuZGlmCisJCWR2Yl9kbXhfc3dmaWx0ZXIoJmNoYW4tPmRlbXV4LCBidWYsIGxlbik7CisJcmV0dXJuIDA7Cit9CisKK3U4IGZpbGxfdHNbMTg4XSA9IHsgMHg0NywgMHgxZiwgMHhmZiwgMHgxMCB9OworCitzdGF0aWMgdm9pZCAqdHNvdXRfZXhjaGFuZ2Uodm9pZCAqcHJpdiwgdm9pZCAqYnVmLCB1MzIgbGVuLAorCQkJICAgIHUzMiBjbG9jaywgdTMyIGZsYWdzKQoreworCXN0cnVjdCBuZ2VuZV9jaGFubmVsICpjaGFuID0gcHJpdjsKKwlzdHJ1Y3QgbmdlbmUgKmRldiA9IGNoYW4tPmRldjsKKwl1MzIgYWxlbjsKKworCWFsZW4gPSBkdmJfcmluZ2J1ZmZlcl9hdmFpbCgmZGV2LT50c291dF9yYnVmKTsKKwlhbGVuIC09IGFsZW4gJSAxODg7CisKKwlpZiAoYWxlbiA8IGxlbikKKwkJRmlsbFRTQnVmZmVyKG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KwkJCQkgICAgICBzdHJ1Y3QgZG14X2Zyb250ZW5kICpod19mcm9udGVuZCwKKwkJCQkgICAgICBzdHJ1Y3QgZG14X2Zyb250ZW5kICptZW1fZnJvbnRlbmQsCisJCQkJICAgICAgc3RydWN0IGR2Yl9hZGFwdGVyICpkdmJfYWRhcHRlcikKK3sKKwlpbnQgcmV0OworCisJZG14ZGV2LT5maWx0ZXJudW0gPSAyNTY7CisJZG14ZGV2LT5kZW11eCA9ICZkdmJkZW11eC0+ZG14OworCWRteGRldi0+Y2FwYWJpbGl0aWVzID0gMDsKKwlyZXQgPSBkdmJfZG14ZGV2X2luaXQoZG14ZGV2LCBkdmJfYWRhcHRlcik7CisJaWYgKHJldCA8IDApCisJCXJldHVybiByZXQ7CisKKwlod19mcm9udGVuZC0+c291cmNlID0gRE1YX0ZST05URU5EXzA7CisJZHZiZGVtdXgtPmRteC5hZGRfZnJvbnRlbmQoJmR2YmRlbXV4LT5kbXgsIGh3X2Zyb250ZW5kKTsKKwltZW1fZnJvbnRlbmQtPnNvdXJjZSA9IERNWF9NRU1PUllfRkU7CisJZHZiZGVtdXgtPmRteC5hZGRfZnJvbnRlbmQoJmR2YmRlbXV4LT5kbXgsIG1lbV9mcm9udGVuZCk7CisJcmV0dXJuIGR2YmRlbXV4LT5kbXguY29ubmVjdF9mcm9udGVuZCgmZHZiZGVtdXgtPmRteCwgaHdfZnJvbnRlbmQpOworfQorCisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogbkdlbmUgaGFyZHdhcmUgaW5pdCBhbmQgcmVsZWFzZSBmdW5jdGlvbnMgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgZnJlZV9yaW5nYnVmZm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pOworCisJaWYgKGRldi0+RldJbnRlcmZhY2VCdWZmZXIpCisJCXBjaV9mcmVlX2NvbnNpc3RlbnQoZGV2LT5wY2lfZGV2LAorCQkJCSAgICA0MDk2LAorCQkJCSAgICBkZXYtPkZXSW50ZXJmYWNlQnVmZmVyLAorCQkJCSAgICBkZXYtPlBBRldJbnRlcmZhY2VCdWZmZXIpOworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIFJpbmcgYnVmZmVyIGhhbmRsaW5nICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBpbnQgY3JlYXRlX3JpbmdfYnVmZmVyKHN0cnVjdCBwY2lfZGV2ICpwY2lfZGV2LAorCQkgICAgICAgc3RydWN0IFNSaW5nQnVmZmVyRGVzY3JpcHRvciAqZGVzY3IsIHUzMiBOdW1CdWZmZXJzKQoreworCWRtYV9hZGRyX3QgdG1wOworCXN0cnVjdCBTQnVmZmVySGVhZGVyICpIZWFkOworCXUzMiBpOworCXUzMiBNZW1TaXplID0gU0laRU9GX1NCdWZmZXJIZWFkZXIgKiBOdW1CdWZmZXJzOworCXU2NCBQQVJpbmdCdWZmZXJIZWFkOworCXU2NCBQQVJpbmdCdWZmZXJDdXI7CisJdTY0IFBBUmluZ0J1ZmZlck5leHQ7CisJc3RydWN0IFNCdWZmZXJIZWFkZXIgKkN1ciwgKk5leHQ7CisKKwlkZXNjci0+SGVhZCA9IDA7CisJZGVzY3ItPk1lbVNpemUgPSAwOworCWRlc2NyLT5QQUhlYWQgPSAwOworCWRlc2NyLT5OdW1CdWZmZXJzID0gMDsKKworCWlmIChNZW1TaXplIDwgNDA5NikKKwkJTWVtU2l6ZS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ioqKioqKi8KKy8qIFN3aXRjaCBjb250cm9sIChJMkMgZ2F0ZXMsIGV0Yy4pICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKiBEZW1vZC90dW5lciBhdHRhY2htZW50ICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50IHR1bmVyX2F0dGFjaF9zdHY2MTEwKHN0cnVjdCBuZ2VuZV9jaGFubmVsICpjaGFuKQoreworCXN0cnVjdCBzdHYwOTB4X2NvbmZpZyAqZmVjb25mID0gKHN0cnVjdCBzdHYwOTB4X2NvbmZpZyAqKQorCQljaGFuLT5kZXYtPmNhcmRfaW5mby0+ZmVfY29uZmlnW2NoYW4tPm51bWJlcl07CisJc3RydWN0IHN0djYxMTB4X2NvbmZpZyAqdHVuZXJjb25mID0gKHN0cnVjdCBzdHY2MTEweF9jb25maWcgKikKKwkJY2hhbi0+ZGV2LT5jYXJkX2luZm8tPnR1bmVyX2NvbmZpZ1tjaGFuLT5udW1iZXJdOworCXN0cnVjdCBzdHY2MTEweF9kZXZjdGwgKmN0bDsKKworCWN0bCA9IGR2Yl9hdHRhY2goc3R2NjExMHhfYXR0YWNoLCBjaGFuLT5mZSwgdHVuZXJjb25mLAorCQkJICZjaGFuLT5pMmNfYWRhcHRlcik7CisJaWYgKGN0bCA9PSBOVUxMKSB7CisJCXByaW50ayhLRVJOX0VSUglERVZJQ0VfTkFNRSAiOiBObyBTVFY2MT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R0YWNoKHN0djA5MHhfYXR0YWNoLAorCQkJZmVjb25mLAorCQkJJmNoYW4tPmkyY19hZGFwdGVyLAorCQkJY2hhbi0+bnVtYmVyID09IDAgPyBTVFYwOTB4X0RFTU9EVUxBVE9SXzAgOgorCQkJCQkgICAgU1RWMDkweF9ERU1PRFVMQVRPUl8xKTsKKwlpZiAoY2hhbi0+ZmUgPT0gTlVMTCkgeworCQlwcmludGsoS0VSTl9FUlIJREVWSUNFX05BTUUgIjogTm8gU1RWMDkwMCBmb3VuZCFcbiIpOworCQlyZXR1cm4gLUVOT0RFVjsKKwl9CisKKwlpZiAoIWR2Yl9hdHRhY2gobG5iaDI0X2F0dGFjaCwgY2hhbi0+ZmUsICZjaGFuLT5pMmNfYWRhcHRlciwgMCwKKwkJCTAsIGNoYW4tPmRldi0+Y2FyZF9pbmZvLT5sbmJbY2hhbi0+bnVtYmVyXSkpIHsKKwkJcHJpbnRrKEtFUk5fRVJSIERFVklDRV9OQU1FICI6IE5vIExOQkgyNCBmb3VuZCFcbiIpOworCQlkdmJfZnJvbnRlbmRfZGV0YWNoKGNoYW4tPmZlKTsKKwkJcmV0dXJuIC1FTk9ERVY7CisJfQorCisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgcmVsZWFzZV9jaGFubmVsKHN0cnVjdCBuZ2VuZV9jaGFubmVsICpjaGFuKQoreworCXN0cnVjdCBkdmJfZGVtdXggKmR2YmRlbXV4ID0gJmNoYW4tPmRlbXV4OworCXN0cnVjdCBuZ2VuZ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QgbmdlbmUgKmRldikKK3sKKwlpbnQgaSwgajsKKworCWZvciAoaSA9IDA7IGkgPCBNQVhfU1RSRUFNOyBpKyspIHsKKwkJaWYgKGluaXRfY2hhbm5lbCgmZGV2LT5jaGFubmVsW2ldKSA8IDApIHsKKwkJCWZvciAoaiA9IGkgLSAxOyBqID49IDA7IGotLSkKKwkJCQlyZWxlYXNlX2NoYW5uZWwoJmRldi0+Y2hhbm5lbFtqXSk7CisJCQlyZXR1cm4gLTE7CisJCX0KKwl9CisJcmV0dXJuIDA7Cit9CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogZGV2aWNlIHByb2JlL3JlbW92ZSBjYWxscyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgX19kZXZleGl0IG5nZW5lX3JlbW92ZShzdHJ1Y3QgcGNpX2RldiAqcGRldikKK3sKKwlzdHJ1Y3QgbmdlbmUgKmRldiA9IChzdHJ1Y3QgbmdlbmUgKilwY2lfZ2V0X2RydmRhdGEocGRldik7CisJaW50IGk7CisKKwl0YXNrbGV0X2tpbGwoJmRldi0+ZXZlbnRfdGFza2xldCk7CisJZm9yIChpID0gTUFYX1NUUkVBTSAtIDE7IGkgPj0gMDsgaS0tKQorCQlyZWxlYXNlX2NoYW5uZWwoJmRldi0+Y2hhbm5lbFtpXSk7CisJbmdlbmVfc3RvcChkZXYpOworCW5nZW5lX3JlbGVhc2VfYnVmZmVycyhkZXYpOworCXBjaV9zZXRfZHJ2ZGF0YShwZGV2LCAwKTsKKwlwY2lfZGlzYWJsZV9kZXZpY2UocGRldik7Cit9CisKK3N0YXRpYyBpbnQgX19kZXZpbml0IG5nZW5lX3Byb2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I6CisJbmdlbmVfc3RvcChkZXYpOworZmFpbDE6CisJbmdlbmVfcmVsZWFzZV9idWZmZXJzKGRldik7CitmYWlsMDoKKwlwY2lfZGlzYWJsZV9kZXZpY2UocGNpX2Rldik7CisJcGNpX3NldF9kcnZkYXRhKHBjaV9kZXYsIDApOworCXJldHVybiBzdGF0OworfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIENhcmQgY29uZmlncyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBzdHJ1Y3Qgc3R2MDkweF9jb25maWcgZmVfY2luZVMyID0geworCS5kZXZpY2UgICAgICAgICA9IFNUVjA5MDAsCisJLmRlbW9kX21vZGUgICAgID0gU1RWMDkweF9EVUFMLAorCS5jbGtfbW9kZSAgICAgICA9IFNUVjA5MHhfQ0xLX0VYVCwKKworCS54dGFsICAgICAgICAgICA9IDI3MDAwMDAwLAorCS5hZGRyZXNzICAgICAgICA9IDB4NjgsCisKKwkudHMxX21vZGUgICAgICAgPSBTVFYwOTB4X1RTTU9ERV9TRVJJQUxfUFVOQ1RVUkVELAorCS50czJfbW9kZSAgICAgICA9IFNUVjA5MHhfVFNNT0RFX1NFUklBTF9QVU5DVFVSRUQsCisKKwkucmVwZWF0ZXJfbGV2ZWwgPSBTVFYwOTB4X1JQVExFVkVMXzE2LAorCisJLmFkYzFfcmFuZ2UJPSBTVFYwOTB4X0FEQ18xVnBwLAorCS5hZGMyX3JhbmdlCT0gU1RWMDkweF9BRENfMVZwcCwKKworCS5kaXNlcWNfZW52ZWxvcGVfbW9kZSA9IHRydWUsCit9OworCitzdGF0aWMgc3RydWN0IHN0djYxMTB4X2N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S5kZW1vZF9hdHRhY2gJPSB7ZGVtb2RfYXR0YWNoX3N0djA5MDAsIGRlbW9kX2F0dGFjaF9zdHYwOTAwfSwKKwkudHVuZXJfYXR0YWNoCT0ge3R1bmVyX2F0dGFjaF9zdHY2MTEwLCB0dW5lcl9hdHRhY2hfc3R2NjExMH0sCisJLmZlX2NvbmZpZwk9IHsmZmVfY2luZVMyLCAmZmVfY2luZVMyfSwKKwkudHVuZXJfY29uZmlnCT0geyZ0dW5lcl9jaW5lUzJfMCwgJnR1bmVyX2NpbmVTMl8xfSwKKwkubG5iCQk9IHsweDBiLCAweDA4fSwKKwkudHNmCQk9IHszLCAzfSwKKwkuZndfdmVyc2lvbgk9IDE1LAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIFBDSSBTdWJzeXN0ZW0gSUQgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKKyNkZWZpbmUgTkdFTkVfSUQoX3N1YnZlbmQsIF9zdWJkZXYsIF9kcml2ZXJkYXRhKSB7IFwKKwkudmVuZG9yID0gTkdFTkVfVklELCAuZGV2aWNlID0gTkdFTkVfUElELCBcCisJLnN1YnZlbmRvciA9IF9zdWJ2ZW5kLCAuc3ViZGV2aWNlID0gX3N1YmRldiwgXAorCS5kcml2ZXJfZGF0YSA9ICh1bnNpZ25lZCBsb25nKSAmX2RyaXZlcmRhdGEgfQorCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworc3RhdGljIGNvbnN0IHN0cnVjdCBwY2lfZGV2aWNlX2lkIG5nZW5lX2lkX3RibFtdIF9fZGV2aW5pdGRhdGEgPSB7CisJTkdFTkVfSUQoMHgxOGMzLCAweGFiYzMsIG5nZW5lX2luZm9fY2luZVMyKSwKKwlOR0VORV9JRCgweDE4YzMsIDB4YWJjNCwgbmdlbmVfaW5mb19jaW5lUzIpLAorCU5HRU5FX0lEKDB4MThjMywgMHhkYjAxLCBuZ2VuZV9pbmZvX3NhdGl4czIpLAorCXswfQorfTsKK01PRFVMRV9ERVZJQ0VfVEFCTEUocGNpLCBuZ2VuZV9pZF90YmwpOworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKy8qIEluaXQvRXhpdCAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisKK3N0YXRpYyBwY2lfZXJzX3Jlc3VsdF90IG5nZW5lX2Vycm9yX2RldGVjdGVkKHN0cnVjdCBwY2lfZGV2ICpkZXYsCisJCQkJCSAgICAgZW51bSBwY2lfY2hhbm5lbF9zdGF0ZSBzdGF0ZSkKK3sKKwlwcmludGsoS0VSTl9FUlIgREVWSUNFX05BTUUgIjogUENJIGVycm9yXG4iKTsKKwlpZiAoc3RhdGUgPT0gcGNpX2NoYW5uZWxfaW9fcGVybV9mYWlsdXJlKQorCQlyZXR1cm4gUENJX0VSU19SRVNVTFRfRElTQ09OTkVDVDsKKwlpZiAoc3RhdGUgPT0gcGNpX2NoYW5uZWxfaW9fZnJvemVuKQorCQlyZXR1cm4gUENJX0VSU19SRVNVTFRfTkVFRF9SRVNFVDsKKwlyZXR1cm4gUENJX0VSU19SRVN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QVJFRF9CVUZGRVIrMHgwRDgwKQorI2RlZmluZSBTR19BX09VVDIgICAgICAgKFNIQVJFRF9CVUZGRVIrMHgwRTAwKQorCisjZGVmaW5lIERBVEFfQV9JTl8xICAgICAoU0hBUkVEX0JVRkZFUisweDBFODApCisjZGVmaW5lIERBVEFfQV9JTl8yICAgICAoU0hBUkVEX0JVRkZFUisweDBGMDApCisjZGVmaW5lIERBVEFfQV9PVVQgICAgICAoU0hBUkVEX0JVRkZFUisweDBGODApCisjZGVmaW5lIERBVEFfVl9JTl8xICAgICAoU0hBUkVEX0JVRkZFUisweDEwMDApCisjZGVmaW5lIERBVEFfVl9JTl8yICAgICAoU0hBUkVEX0JVRkZFUisweDIwMDApCisjZGVmaW5lIERBVEFfVl9PVVQgICAgICAoU0hBUkVEX0JVRkZFUisweDMwMDApCisKKyNkZWZpbmUgREFUQV9GSUZPX0FSRUEgIChTSEFSRURfQlVGRkVSKzB4MTAwMCkKKworI2RlZmluZSBUSU1FU1RBTVBTICAgICAgMHhBMDAwCisjZGVmaW5lIFNDUkFUQ0hQQUQgICAgICAweEEwODAKKyNkZWZpbmUgRk9SQ0VfSU5UICAgICAgIDB4QTA4OAorI2RlZmluZSBGT1JDRV9OTUkgICAgICAgMHhBMDkwCisjZGVmaW5lIElOVF9TVEFUVVMgICAgICAweEEwQTAKKworI2RlZmluZSBERVZfVkVSICAgICAgICAgMHg5MDA0CisKKyNkZWZpbmUgRldfREVCVUdfREVGQVVMVCAoUFJPR1JBTV9TUkFNKzB4MDBGRikKKworc3RydWN0IFNHX0FERFIgeworCXU2NCBzdGFydDsKKwl1NjQgY3VycjsKKwl1MTYgY3Vycl9wdHI7CisJdTE2IGVsZW1lbnRzOworCXUzMiBwYWRbM107Cit9IF9fYXR0cmlidXRlX18gKChfX3BhY2tlZF9fKSk7CisKK3N0cnVjdCBTSEFSRURfTUVNT1JZIHsKKwkvKiBDMDAwICovCisJdTMyIEhvc3RUb05nZW5lWzY0XTsKKworCS8qIEMxMD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QlVGRkVSID0gMHgxMSwKKwlDTURfQ09ORklHVVJFX0ZSRUVfQlVGRkVSID0gMHgxMiwKKworCUNNRF9TUElfUkVBRCAgICAgICAgPSAweDEzLAorCUNNRF9TUElfV1JJVEUgICAgICAgPSAweDE0LAorCisJQ01EX01FTV9SRUFEICAgICAgICA9IDB4MjAsCisJQ01EX01FTV9XUklURQkgICAgPSAweDIxLAorCUNNRF9TRlJfUkVBRAkgICAgPSAweDIyLAorCUNNRF9TRlJfV1JJVEUJICAgID0gMHgyMywKKwlDTURfSVJBTV9SRUFECSAgICA9IDB4MjQsCisJQ01EX0lSQU1fV1JJVEUJICAgID0gMHgyNSwKKwlDTURfU0VUX0dQSU9fUElOICAgID0gMHgyNiwKKwlDTURfU0VUX0dQSU9fSU5UICAgID0gMHgyNywKKwlDTURfQ09ORklHVVJFX1VBUlQgID0gMHgyOCwKKwlDTURfV1JJVEVfVUFSVCAgICAgID0gMHgyOSwKKwlNQVhfQ01ECit9OworCitlbnVtIFJFU1BPTlNFUyB7CisJT0sgPSAwLAorCUVSUk9SID0gMQorfTsKKworc3RydWN0IEZXX0hFQURFUiB7CisJdTggT3Bjb2RlOworCXU4IExlbmd0aDsKK30gX19hdHRyaWJ1dGVfXyAoKF9fcGFja2VkX18pKTsKKworc3RydWN0IEZXX0kyQ19XUklURSB7CisJc3RydWN0IEZXX0hFQURFUiBoZHI7CisJdTggRGV2aWNlOworCXU4IERhdGFbMjUwXTsKK30gX19hdHRyaWJ1dGVfXyAoKF9fcGFja2VkX18pKTsKKworc3RydWN0IEZXX0kyQ19DT05USU5VRV9XUklURSB7CisJc3RydWN0IEZXX0hFQURFUiBoZHI7CisJdTggRGF0YVsyNTBdOworfSBfX2F0dHJpYnV0ZV9fICgoX19wYWNrZWRfXykpOworCitzdHJ1Y3QgRldfSTJDX1JFQUQgeworCXN0cnVjdCBGV19IRUFERVIgaGRyOworCXU4IERldmljZTsKKwl1OCBEYXRhWzI1Ml07ICAgIC8qIGZvbGxvd2V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SRV9VQVJUIHsKKwlzdHJ1Y3QgRldfSEVBREVSIGhkcjsKKwl1OCBVYXJ0Q29udHJvbDsKK30gX19hdHRyaWJ1dGVfXyAoKF9fcGFja2VkX18pKTsKKworZW51bSBfVUFSVF9DT05GSUcgeworCV9VQVJUX0JBVURSQVRFXzE5MjAwID0gMCwKKwlfVUFSVF9CQVVEUkFURV85NjAwICA9IDEsCisJX1VBUlRfQkFVRFJBVEVfNDgwMCAgPSAyLAorCV9VQVJUX0JBVURSQVRFXzI0MDAgID0gMywKKwlfVUFSVF9SWF9FTkFCTEUgICAgICA9IDB4NDAsCisJX1VBUlRfVFhfRU5BQkxFICAgICAgPSAweDgwLAorfTsKKworc3RydWN0IEZXX1dSSVRFX1VBUlQgeworCXN0cnVjdCBGV19IRUFERVIgaGRyOworCXU4IERhdGFbMjUyXTsKK30gX19hdHRyaWJ1dGVfXyAoKF9fcGFja2VkX18pKTsKKworCitzdHJ1Y3QgbmdlbmVfY29tbWFuZCB7CisJdTMyIGluX2xlbjsKKwl1MzIgb3V0X2xlbjsKKwl1bmlvbiB7CisJCXUzMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhd1s2NF07CisJCXU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJhdzhbMjU2XTsKKwkJc3RydWN0IEZXX0hFQURFUiAgICAgICAgICAgICAgICAgaGRyOworCQlzdHJ1Y3QgRldfSTJDX1dSSVRFICAgICAgICAgICAgICBJMkNXcml0ZTsKKwkJc3RydWN0IEZXX0kyQ19DT05USU5VRV9XUklURSAgICAgSTJDQ29udGludWVXcml0ZTsKKwkJc3RydWN0IEZXX0kyQ19SRUFEICAgICAgICAgICAgICAgSTJDUmVhZDsKKwkJc3RydWN0IEZXX1NUUkVBTV9DT05UUk9MICAgICAgICAgU3RyZWFtQ29udHJvbDsKKwkJc3RydWN0IEZXX0ZXTE9BRF9QUkVQQVJFICAgICAgICAgRldMb2FkUHJlcGFyZTsKKwkJc3RydWN0IEZXX0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qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogU1RSVUNUUyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKworLyogc291bmQgaGFyZHdhcmUgZGVmaW5pdGlvbiAqLworI2RlZmluZSBNSVhFUl9BRERSX1RWVFVORVIgICAgICAwCisjZGVmaW5lIE1JWEVSX0FERFJfTEFTVCAgICAgICAgIDAKKworc3RydWN0IG5nZW5lX2NoYW5uZWw7CisKKy8qc3RydWN0IHNvdW5kIGNoaXAqLworCitzdHJ1Y3QgbXljaGlwIHsKKwlzdHJ1Y3QgbmdlbmVfY2hhbm5lbCAqY2hhbjsKKwlzdHJ1Y3Qgc25kX2NhcmQgKmNhcmQ7CisJc3RydWN0IHBjaV9kZXYgKnBjaTsKKwlzdHJ1Y3Qgc25kX3BjbV9zdWJzdHJlYW0gKnN1YnN0cmVhbTsKKwlzdHJ1Y3Qgc25kX3BjbSAqcGNtOworCXVuc2lnbmVkIGxvbmcgcG9ydDsKKwlpbnQgaXJxOworCXNwaW5sb2NrX3QgbWl4ZXJfbG9jazsKKwlzcGlubG9ja190IGxvY2s7CisJaW50IG1peGVyX3ZvbHVtZVtNSVhFUl9BRERSX0xBU1QgKyAxXVsyXTsKKwlpbnQgY2FwdHVyZV9zb3VyY2VbTUlYRVJfQUREUl9MQVNUICsgMV1bMl07Cit9OworCisjaWZkZWYgTkdFTkVfVjRMCitzdHJ1Y3QgbmdlbmVfb3ZlcmxheSB7CisJaW50ICAgICAgICAgICAgICAgICAgICB0dm5vcm07CisJc3RydWN0IHY0bDJfcmVjdCAgICAgICB3OworCWVudW0gdjRsMl9maWVsZCAgICAgICAgZmllbGQ7CisJc3RydWN0IHY0bDJfY2xpcCAgICAgICAqY2xpcHM7CisJaW50ICAgICAgICAgICAgICAgICAgICBuY2xpcHM7CisJaW50ICAgICAgICAgICAgICAgICAgICBzZXR1cF9vazsKK307CisKK3N0cnVjdCBuZ2VuZV90dm5vcm0geworCWludCAgIHY0bDJfaWQ7CisJY2hhciAgKm5hbWU7CisJdTE2ICAgc3dpZHRoLCBzaGVpZ2h0OyAvKiBzY2FsZWQgc3RhbmRhcmQgd2lkdGgsIGhlaWdodCAqLworCWludCAgIHR1bmVyX25vcm07CisJaW50ICAgc291bmRzdGQ7Cit9OworCitzdHJ1Y3QgbmdlbmVfdm9wZW4geworCXN0cnVjdCBuZ2VuZV9jaGFubmVsICAgICAgKmNoOworCWVudW0gdjRsMl9wcmlvcml0eSAgICAgICAgIHByaW87CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGg7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgaGVpZ2h0OworCWludCAgICAgICAgICAgICAgICAgICAgICAgIGRlcHRoOworCXN0cnVjdCB2aWRlb2J1Zl9xdWV1ZSAgICAgIHZidWZfcTsKKwlzdHJ1Y3QgdmlkZW9idWZfcXVldWUgICAgICB2Ymk7CisJaW50ICAgICAgICAgICAgICAgICAgICAgICAgZm91cmNjOworCWludCAgICAgICAgICAgICAgICAgICAgICAgIHBpY3hjb3VudDsKKwlpbnQgICAgICAgICAgICAgICAgICAgICAgICByZXNvdXJjZXM7CisJZW51bSB2NGwyX2J1Zl90eXBlICAgICAgICAgdHlwZTsKKwljb25zdCBzdHJ1Y3QgbmdlbmVfZm9ybWF0ICpmbXQ7CisKKwljb25zdCBzdHJ1Y3QgbmdlbmVfZm9ybWF0ICpvdmZtdDsKKwlzdHJ1Y3QgbmdlbmVfb3ZlcmxheSAgICAgICBvdjsKK307CisjZW5kaWYKKworc3RydWN0IG5nZW5lX2NoYW5uZWwgeworCXN0cnVjdCBkZXZpY2UgICAgICAgICBkZXZpY2U7CisJc3RydWN0IGkyY19hZGFwdGVyICAgIGkyY19hZGFwdGVyOworCisJc3RydWN0IG5nZW5lICAgICAgICAgKmRldjsKKwlpbnQgICAgICAgICAgICAgICAgICAgbnVtYmVyOworCWludCAgICAgICAgICAgICAgICAgICB0eXBlOworCWludCAgICAgICAgICAgICAgICAgICBtb2RlOworCisJc3RydWN0IGR2Yl9mcm9udGVuZCAgKmZlOworCXN0cnVjdCBkbXhkZXYgICAgICAgICBkbXhkZXY7CisJc3RydWN0IGR2Yl9kZW11eCAgICAgIGRlbXV4OworCXN0cnVjdCBkbXhfZnJvbnRlbmQgICBod19mcm9udGVuZDsKKwlzdHJ1Y3QgZG14X2Zyb250ZW5kICAgbWVtX2Zyb250ZW5kOworCWludCAgICAgICAgICAgICAgICAgICB1c2VyczsKKwlzdHJ1Y3QgdmlkZW9fZGV2aWNlICAqdjRsX2RldjsKKwlzdHJ1Y3QgdGFza2xldF9zdHJ1Y3QgZGVtdXhfdGFza2xldDsKKworCXN0cnVjdCBTQnVmZmVySGVhZGVyICpuZXh0QnVmZmVyOworCWVudW0gS1NTVEFURSAgICAgICAgICBTdGF0ZTsKKwllbnVtIEhXU1RBVEUgICAgICAgICAgSFdTdGF0ZTsKKwl1OCAgICAgICAgICAgICAgICAgICAgU3RyZWFtOworCXU4ICAgICAgICAgICAgICAgICAgICBGbGFnczsKKwl1OCAgICAgICAgICAgICAgICAgICAgTW9kZTsKKwlJQnVmZmVyRXhjaGFuZ2UgICAgICAqcEJ1ZmZlckV4Y2hhbmdlOworCUlCdWZmZXJFeGNoYW5nZSAgICAgICpwQnVmZmVyRXhjaGFuZ2UyOworCisJc3BpbmxvY2tfdCAgICAgICAgICAgIHN0YXRlX2xvY2s7CisJdTE2ICAgICAgICAgICAgICAgICAgIG5MaW5lczsKKwl1MTYgICAgICAgICAgICAgICAgICAgbkJ5dGVzUGVyTGluZTsKKwl1MTYgICAgICAgICAgICAgICAgICAgblZCSUxpbmVzOworCXUxNiAgICAgICAgICAgICAgICAgICBuQnl0ZXNQZXJWQklMaW5lOworCXUxNiAgICAgICAgICAgICAgICAgICBpdHVtb2RlOworCXUzMiAgICAgICAgICAgICAgICAgICBDYXB0dXJlMUxlbmd0aDsKKwl1MzIgICAgICAgICAgICAgICAgICAgQ2FwdHVyZTJMZW5ndGg7CisJc3RydWN0IFNSaW5nQnVmZmVyRGVzY3JpcHRvciBSaW5nQnVmZmVyOworCXN0cnVjdCBTUmluZ0J1ZmZlckRlc2NyaXB0b3IgVFNSaW5nQnVmZmVyOworCXN0cnVjdCBTUmluZ0J1ZmZlckRlc2NyaXB0b3IgVFNJZGxlQnVmZmVyOworCisJdTMyICAgICAgICAgICAgICAgICAgIERhdGFGb3JtYXRGbGFnczsKKworCWludCAgICAgICAgICAgICAgICAgICBBdWRpb0RUT1VwZGF0ZWQ7CisJdTMyICAgICAgICAgICAgICAgICAgIEF1ZGlvRFRPVmFsdWU7CisKKwlpbnQgKCpzZXRfdG9uZSkoc3RydWN0IGR2Yl9mcm9udGVuZCAqLCBmZV9zZWNfdG9uZV9tb2RlX3QpOworCXU4IGxuYmg7CisKKwkvKiBzdHVmZiBmcm9tIGFuYWxvZyBkcml2ZXIgKi8KKworCWludCBtaW5vcjsKKwlzdHJ1Y3QgbXljaGlwICAgICAgICAqbXljaGlwOworCXN0cnVjdCBzbmRfY2FyZCAgICAgICpzb3VuZGNhcmQ7CisJdTggICAgICAgICAgICAgICAgICAgKmV2ZW5idWZmZXI7CisJdTggICAgICAgICAgICAgICAgICAgIGRtYV9vbjsKKwlpbnQgICAgICAgICAgICAgICAgICAgc291bmRzdHJlYW1vbjsKKwlpbnQgICAgICAgICAgICAgICAgICAgYXVkaW9tdXRlOworCWludCAgICAgICAgICAgICAgICAgICBzb3VuZGJ1ZmZpc2FsbG9jYXRlZDsKKwlpbnQgICAgICAgICAgICAgICAgICAgc25kYnVmZmZsYWc7CisJaW50ICAgICAgICAgICAgICAgICAgIHR1bl9yZHk7CisJaW50ICAgICAgICAgICAgICAgICAgIGRlY19yZHk7CisJaW50ICAgICAgICAgICAgICAgICAgIHR1bl9kZWNfcmR5OworCWludCAgICAgICAgICAgICAgICAgICBsYXN0YnVmZmVyZmxhZzsKKworCXN0cnVjdCBuZ2VuZV90dm5vcm0gICp0dm5vcm1zOworCWludCAgICAgICAgICAgICAgICAgICB0dm5vcm1fbnVtOworCWludCAgICAgICAgICAgICAgICAgICB0dm5vcm07CisKKyNpZmRlZiBOR0VORV9WNEwKKwlpbnQgICAgICAgICAgICAgICAgICAgdmlkZW91c2VyczsKKwlzdHJ1Y3QgdjRsMl9wcmlvX3N0YXRlIHByaW87CisJc3RydWN0IG5nZW5lX3ZvcGVuICAgIGluaXQ7CisJaW50ICAgICAgICAgICAgICAgICAgIHJlc291cmNlczsKKwlzdHJ1Y3QgdjRsMl9mcmFtZWJ1ZmZlciBmYnVmOworCXN0cnVjdCBuZ2VuZV9idWZmZXIgICpzY3JlZW47ICAgICAvKiBvdmVybGF5ICAgICAgICAgICAgICovCisJc3RydWN0IGxpc3RfaGVhZCAgICAgIGNhcHR1cmU7ICAgIC8qIHZpZGVvIGNhcHR1cmUgcXVldWUgKi8KKwlzcGlubG9ja190IHNfbG9jazsKKwlzdHJ1Y3Qgc2VtYXBob3JlIHJlc2xvY2s7CisjZW5kaWYKKworCWludCBydW5uaW5nOworfTsKKworc3RydWN0IG5nZW5lOworCit0eXBlZGVmIHZvaWQgKHJ4X2NiX3QpKHN0cnVjdCBuZ2VuZSAqLCB1MzIsIHU4KTsKK3R5cGVkZWYgdm9pZCAodHhfY2JfdCkoc3RydWN0IG5nZW5lICosIHUzMik7CisKK3N0cnVjdCBuZ2VuZSB7CisJaW50ICAgICAgICAgICAgICAgICAgIG5yOworCXN0cnVjdCBwY2lfZGV2ICAgICAgICpwY2lfZGV2OworCXVuc2lnbmVkIGNoYXIgICAgICAgICppb21lbTsKKworCS8qc3RydWN0IGkyY19hZGFwdGVyICBpMmNfYWRhcHRlcjsqLworCisJdTMyICAgICAgICAgICAgICAgICAgIGRldmljZV92ZXJzaW9uOworCXUzMiAgICAgICAgICAgICAgICAgICBmd19pbnRlcmZhY2VfdmVyc2lvbjsKKwl1MzIgICAgICAgICAgICAgICAgICAgaWNvdW50czsKKworCXU4ICAgICAgICAgICAgICAgICAgICpDbWREb25lQnl0ZTsKKwlpbnQgICAgICAgICAgICAgICAgICAgQm9vdEZpcm13YXJlOworCXZvaWQgICAgICAgICAgICAgICAgICpPdmVyZmxvd0J1ZmZlcjsKKwlkbWFfYWRkcl90ICAgICAgICAgICAgUEFPdmVyZmxvd0J1ZmZlcjsKKwl2b2lkICAgICAgICAgICAgICAgICAqRldJbnRlcmZhY2VCdWZmZXI7CisJZG1hX2FkZHJfdCAgICAgICAgICAgIFBBRldJbnRlcmZhY2VCdWZmZXI7CisJdTggICAgICAgICAgICAgICAgICAgKm5nZW5ldG9ob3N0OworCXU4ICAgICAgICAgICAgICAgICAgICpob3N0dG9uZ2VuZTsKKworCXN0cnVjdCBFVkVOVF9CVUZGRVIgICBFdmVudFF1ZXVlW0VWRU5UX1FVRVVFX1NJWkVdOworCWludCAgICAgICAgICAgICAgICAgICBFdmVudFF1ZXVlT3ZlcmZsb3dDb3VudDsKKwlpbnQgICAgICAgICAgICAgICAgICAgRXZlbnRRdWV1ZU92ZXJmbG93RmxhZzsKKwlzdHJ1Y3QgdGFza2xldF9zdHJ1Y3QgZXZlbnRfdGFza2xldDsKKwlzdHJ1Y3QgRVZFTlRfQlVGRkVSICAqRXZlbnRCdWZmZXI7CisJaW50ICAgICAgICAgICAgICAgICAgIEV2ZW50UXVldWVXcml0ZUluZGV4OworCWludCAgICAgICAgICAgICAgICAgICBFdmVudFF1ZXVlUmVhZEluZGV4OworCisJd2FpdF9xdWV1ZV9oZWFkX3QgICAgIGNtZF93cTsKKwlpbnQgICAgICAgICAgICAgICAgICAgY21kX2RvbmU7CisJc3RydWN0IHNlbWFwaG9yZSAgICAgIGNtZF9tdXRleDsKKwlzdHJ1Y3Qgc2VtYXBob3JlICAgICAgc3RyZWFtX211dGV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gICBkZW1vZGFbNF07CisJdTggICAgbG5iWzRdOworCWludCAgIGkyY19hY2Nlc3M7CisJdTggICAgbnRzYzsKKwl1OCAgICB0c2ZbNF07CisJdTggICAgaTJzWzRdOworCisJaW50ICgqZ2F0ZV9jdHJsKShzdHJ1Y3QgZHZiX2Zyb250ZW5kICosIGludCk7CisJaW50ICgqc3dpdGNoX2N0cmwpKHN0cnVjdCBuZ2VuZV9jaGFubmVsICosIGludCwgaW50KTsKK307CisKKyNpZmRlZiBOR0VORV9WNEwKK3N0cnVjdCBuZ2VuZV9mb3JtYXR7CisJY2hhciAqbmFtZTsKKwlpbnQgICBmb3VyY2M7ICAgICAgICAgIC8qIHZpZGVvNGxpbnV4IDIgICAgICAqLworCWludCAgIGJ0Zm9ybWF0OyAgICAgICAgLyogQlQ4NDhfQ09MT1JfRk1UXyogICovCisJaW50ICAgZm9ybWF0OworCWludCAgIGJ0c3dhcDsgICAgICAgICAgLyogQlQ4NDhfQ09MT1JfQ1RMXyogICovCisJaW50ICAgZGVwdGg7ICAgICAgICAgICAvKiBiaXQvcGl4ZWwgICAgICAgICAgKi8KKwlpbnQgICBmbGFnczsKKwlpbnQgICBoc2hpZnQsIHZzaGlmdDsgIC8qIGZvciBwbGFuYXIgbW9kZXMgICAqLworCWludCAgIHBhbGV0dGU7Cit9OworCisjZGVmaW5lIFJFU09VUkNFX09WRVJMQVkgICAgICAgMQorI2RlZmluZSBSRVNPVVJDRV9WSURFTyAgICAgICAgIDIKKyNkZWZpbmUgUkVTT1VSQ0VfVkJJICAgICAgICAgICA0CisKK3N0cnVjdCBuZ2VuZV9idWZmZXIgeworCS8qIGNvbW1vbiB2NGwgYnVmZmVyIHN0dWZmIC0tIG11c3QgYmUgZmlyc3QgKi8KKwlzdHJ1Y3QgdmlkZW9idWZfYnVmZmVyICAgICB2YjsKKworCS8qIG5nZW5lIHNwZWNpZmljICovCisJY29uc3Qgc3RydWN0IG5nZW5lX2Zvcm1hdCAqZm10OworCWludCAgICAgICA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CTB4NGMKKyNkZWZpbmUgQ1JHQUlOIAkJCQkJMHg1MAorI2RlZmluZSBDR1JHQUlOCQkJCQkweDU0CisjZGVmaW5lIENHQkdBSU4JCQkJCTB4NTgKKyNkZWZpbmUgQ0JHQUlOCQkJCQkweDVjCisjZGVmaW5lIENPRlNUQQkJCQkJMHg2MAorI2RlZmluZSBGTFNIQ0ZHMAkJCQkweDY0CisjZGVmaW5lIEZMU0hDRkcxCQkJCTB4NjgKKyNkZWZpbmUgRkxTSENGRzIJCQkJMHg2YworI2RlZmluZSBWRElOVDAJCQkJCTB4NzAKKyNkZWZpbmUgVkRJTlQxCQkJCQkweDc0CisjZGVmaW5lIFZESU5UMgkJCQkJMHg3OAorI2RlZmluZSBNSVNDIAkJCQkJMHg3YworI2RlZmluZSBDR0FNTUFXRAkJCQkweDgwCisjZGVmaW5lIFJFQzY1NklGCQkJCTB4ODQKKyNkZWZpbmUgQ0NEQ0ZHCQkJCQkweDg4CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyogRGVmZWN0IENvcnJlY3Rpb24gcmVnaXN0ZXJzCisqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KKyNkZWZpbmUgREZDQ1RMCQkJCQkweDhjCisjZGVmaW5lIFZERlNBVExWCQkJCTB4OTAKKyNkZWZpbmUgREZDTUVNQ1RMCQkJCTB4OTQKKyNkZWZpbmUgREZDTUVNMAkJCQkJMHg5OAorI2RlZmluZSBERkNNRU0xCQkJCQkweDljCisjZGVmaW5lIERGQ01FTTIJCQkJCTB4YTAKKyNkZWZpbmUgREZDTUVNMwkJCQkJMHhhNAorI2RlZmluZSBERkNNRU00CQkJCQkweGE4CisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiBCbGFjayBDbGFtcCByZWdpc3RlcnMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioq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TQ0LAorCQkuY29sb3JzcGFjZSA9IFY0TDJfQ09MT1JTUEFDRV9TUkdCLAorCQkucHJpdiA9IDB9LAorfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBHZW5lcmFsIGZ1bmN0aW9ucworICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworCitzdGF0aWMgaW50IGNwaWFfdXNiX3RyYW5zZmVyQ21kKHN0cnVjdCBnc3BjYV9kZXYgKmdzcGNhX2RldiwgdTggKmNvbW1hbmQpCit7CisJdTggcmVxdWVzdHR5cGU7CisJdW5zaWduZWQgaW50IHBpcGU7CisJaW50IHJldCwgZGF0YWJ5dGVzID0gY29tbWFuZFs2XSB8IChjb21tYW5kWzddIDw8IDgpOworCS8qIFNvbWV0aW1lcyB3ZSBzZWUgc3B1cmlvdXMgRVBJUEUgZXJyb3JzICovCisJaW50IHJldHJpZXMgPSAzOworCisJaWYgKGNvbW1hbmRbMF0gPT0gREFUQV9JTikgeworCQlwaXBlID0gdXNiX3JjdmN0cmxwaXBlKGdzcGNhX2Rldi0+ZGV2LCAwKTsKKwkJcmVxdWVzdHR5cGUgPSBVU0JfRElSX0lOIHwgVVNCX1RZUEVfVkVORE9SIHwgVVNCX1JFQ0lQX0RFVklDRTsKKwl9IGVsc2UgaWYgKGNvbW1hbmRbMF0gPT0gREFUQV9PVVQpIHsKKwkJcGlwZSA9IHVzYl9zbmRjdHJscGlwZShnc3BjYV9kZXYtPmRldiwgMCk7CisJCXJlcXVlc3R0eXBlID0gVVNCX1RZUEVfVkVORE9SIHwgVVNCX1JFQ0lQX0RFVklDRTsKKwl9IGVsc2UgeworCQlQREVCVUcoRF9FUlIsICJVbmV4cGVjdGVkIGZpcnN0IGJ5dGUgb2YgY29tbWFuZDogJXgiLAorCQkgICAgICAgY29tbW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2Vuc2UgZm9yIG1vcmUgZGV0YWlscy4KKyAqCisgKiBZb3Ugc2hvdWxkIGhhdmUgcmVjZWl2ZWQgYSBjb3B5IG9mIHRoZSBHTlUgR2VuZXJhbCBQdWJsaWMgTGljZW5zZQorICogYWxvbmcgd2l0aCB0aGlzIHByb2dyYW07IGlmIG5vdCwgd3JpdGUgdG8gdGhlIEZyZWUgU29mdHdhcmUKKyAqIEZvdW5kYXRpb24sIEluYy4sIDY3NSBNYXNzIEF2ZSwgQ2FtYnJpZGdlLCBNQSAwMjEzOSwgVVNBLgorICovCisKKy8qIE5hbWluZyBjb252ZW50aW9ucworICogLS0tLS0tLS0tLS0tLS0tLS0tCisgKgorICogRkRCSzogIEZlZWRiYWNrCisgKiBESVY6ICAgRGl2aWRlcgorICogQ1RMOiAgIENvbnRyb2wKKyAqIFNFTDogICBTZWxlY3QKKyAqIElOOiAgICBJbnB1dAorICogT1VUOiAgIE91dHB1dAorICogUjogICAgIFJlZAorICogRzogICAgIEdyZWVuCisgKiBCOiAgICAgQmx1ZQorICogT0ZGOiAgIE9mZnNldAorICogVEhSUzogIFRocmVzaG9sZAorICogREdUTDogIERpZ2l0YWwKKyAqIExWTDogICBMZXZlbAorICogUFdSOiAgIFBvd2VyCisgKiBNVklTOiAgTWFjcm92aXNpb24KKyAqIFc6ICAgICBXaWR0aAorICogSDogICAgIEhlaWdodAorICogQUxHTjogIEFsaWdubWVudAorICogQ0xLOiAgIENsb2NrcworICogVE9MOiAgIFRvbGVyYW5jZQorICogQldUSDogIEJhbmR3aWR0aAorICogQ09FRjogIENvZWZmaWNpZW50CisgKiBTVEFUOiAgU3RhdHVzCisgKiBBVVRPOiAgQXV0b21hdGljCisgKiBGTEQ6ICAgRmllbGQKKyAqIEw6CSAgTGluZQorICovCisKKyNkZWZpbmUgVFZQNzAwMl9DSElQX1JFVgkJMHgwMAorI2RlZmluZSBUVlA3MDAyX0hQTExfRkRCS19ESVZfTVNCUwkweDAxCisjZGVmaW5lIFRWUD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EwLDExLDEyLDE0LDB9OyAgICAvKiBJUlEgdGFibGUgKi8KK3N0YXRpYyB1OCAgIGdkdGhfaXJxX3RhYls2XSA9IHswLDEwLDExLDEyLDE0LDB9OyAgICAvKiBJUlEgdGFibGUgKi8KICNlbmRpZgotc3RhdGljIHVuY2hhciAgIGdkdGhfcG9sbGluZzsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBwb2xsaW5nIGlmIFRSVUUgKi8KK3N0YXRpYyB1OCAgIGdkdGhfcG9sbGluZzsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBwb2xsaW5nIGlmIFRSVUUgKi8KIHN0YXRpYyBpbnQgICAgICBnZHRoX2N0cl9jb3VudCAgPSAwOyAgICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBjb3VudCAqLwogc3RhdGljIExJU1RfSEVBRChnZHRoX2luc3RhbmNlcyk7ICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIGxpc3QgKi8KLXN0YXRpYyB1bmNoYXIgICBnZHRoX3dyaXRlX3Rocm91Z2ggPSBGQUxTRTsgICAgICAgICAgICAgLyogd3JpdGUgdGhyb3VnaCAqLworc3RhdGljIHU4ICAgZ2R0aF93cml0ZV90aHJvdWdoID0gRkFMU0U7ICAgICAgICAgICAgIC8qIHdyaXRlIHRocm91Z2ggKi8KIHN0YXRpYyBnZHRoX2V2dF9zdHIgZWJ1ZmZlcltNQVhfRVZFTlRTXTsgICAgICAgICAgICAgICAgLyogZXZlbnQgYnVmZmVyICovCiBzdGF0aWMgaW50IGVsYXN0aWR4Owogc3RhdGljIGludCBlb2xkaWR4OwpAQCAtMzAzLDcgKzMwMyw3IEBACiAjZGVmaW5lIERPVSAgICAgMiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBPVVQgZGF0YSBkaXJlY3Rpb24gKi8KICNkZWZpbmUgRE5PICAgICBESU4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG5vIGRhdGEgdHJhbnN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KLSAgICBoYS0+c3R5cGUgPSAodWxvbmczMilwZGV2LT5kZXZpY2U7CisgICAgaGEtPnN0eXBlID0gKHUzMilwZGV2LT5kZXZpY2U7CiAgICAgaGEtPmlycSA9IHBkZXYtPmlycTsKICAgICBoYS0+cGRldiA9IHBkZXY7CiAgICAgCkBAIC04OTEsNyArODkxLDcgQEAKICAgICAgICAgICAgIGZvdW5kID0gRkFMU0U7CiAgICAgICAgICAgICBmb3IgKGkgPSAweEM4MDAwOyBpIDwgMHhFODAwMDsgaSArPSAweDQwMDApIHsKICAgICAgICAgICAgICAgICBpb3VubWFwKGhhLT5icmQpOwotICAgICAgICAgICAgICAgIGhhLT5icmQgPSBpb3JlbWFwKGksIHNpemVvZih1c2hvcnQpKTsgCisgICAgICAgICAgICAgICAgaGEtPmJyZCA9IGlvcmVtYXAoaSwgc2l6ZW9mKHUxNikpOyAKICAgICAgICAgICAgICAgICBpZiAoaGEtPmJyZCA9PSBOVUxMKSB7CiAgICAgICAgICAgICAgICAgICAgIHByaW50aygiR0RULVBDSTogSW5pdGlhbGl6YXRpb24gZXJyb3IgKERQTUVNIHJlbWFwIGVycm9yKVxuIik7CiAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwOwpAQCAtOTQ3LDcgKzk0Nyw3IEBACiAgICAgICAgICAgICB9CiAgICAgICAgICAgICBnZHRoX2RlbGF5KDEpOwogICAgICAgICB9Ci0gICAgICAgIHByb3RfdmVyID0gKHVuY2hhcilyZWFkbCgmZHA2X3B0ci0+dS5pYy5TX0luZm9bMF0pOworICAgICAgICBwcm90X3ZlciA9ICh1OClyZWFkbCgmZHA2X3B0ci0+dS5pYy5TX0luZm9bMF0pOwogICAgICAgICB3cml0ZWIoMCwgJmRwNl9wdHItPnUuaWMuU19TdGF0dXMpOwogICAgICAgICB3cml0ZWIoMHhmZiwgJmRwNl9wdHItPmlvLmlycWRlbCk7CiAgICAgICAgIGlmIChwcm90X3ZlciAhPSBQUk9UT0NPTF9WRVJTSU9OKSB7CkBAIC0xMDAwLDcgKzEwMDAsNyBAQAogICAgICAgICAgICAgZm91bmQgPSBGQUxTRTsKICAgICAgICAgICAgIGZvciAoaSA9IDB4QzgwMDA7IGkgPCAweEU4MDAwOyBpICs9IDB4NDAwMCkgewogICAgICAgICAgICAgICAgIGlvdW5tYXAoaGEtPmJyZCk7Ci0gICAgICAgICAgICAgICAgaGEtPmJyZCA9IGlvcmVtYXAoaSwgc2l6ZW9mKHVzaG9ydCkpOyAKKyAgICAgICAgICAgICAgICBoYS0+YnJkID0gaW9yZW1hcChpLCBzaXplb2YodTE2KSk7IAogICAgICAgICAgICAgICAgIGlmIChoYS0+YnJkID09IE5VTEwpIHsKICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJHRFQtUENJOiBJbml0aWFsaXphdGlvbiBlcnJvciAoRFBNRU0gcmVtYXAgZXJyb3IpXG4iKTsKICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7CkBAIC0xMDU5LDcgKzEwNTksNyBAQAogICAgICAgICAgICAgfQogICAgICAgICAgICAgZ2R0aF9kZWxheSgxKTsKICAgICAgICAgfQotICAgICAgICBwcm90X3ZlciA9ICh1bmNoYXIpcmVhZGwoJmRwNmNfcHRyLT51LmljLlNfSW5mb1swXSk7CisgICAgICAgIHByb3RfdmVyID0gKHU4KXJlYWRsKCZkcDZjX3B0ci0+dS5pYy5TX0luZm9bMF0pOwogICAgICAgICB3cml0ZWIoMCwgJmRwNmNfcHRyLT51LmljLlN0YXR1cyk7CiAgICAgICAgIGlmIChwcm90X3ZlciAhPSBQUk9UT0NPTF9WRVJTSU9OKSB7CiAgICAgICAgICAgICBwcmludGsoIkdEVC1QQ0k6IElsbGVnYWwgcHJvdG9jb2wgdmVyc2lvblxuIik7CkBAIC0xMTI4LDcgKzExMjgsNyBAQAogICAgICAgICAgICAgZm91bmQgPSBGQUxTRTsKICAgICAgICAgICAgIGZvciAoaSA9IDB4QzgwMDA7IGkgPCAweEU4MDAwOyBpICs9IDB4NDAwMCkgewogICAgICAgICAgICAgICAgIGlvdW5tYXAoaGEtPmJyZCk7Ci0gICAgICAgICAgICAgICAgaGEtPmJyZCA9IGlvcmVtYXAoaSwgc2l6ZW9mKHVzaG9ydCkpOyAKKyAgICAgICAgICAgICAgICBoYS0+YnJkID0gaW9yZW1hcChpLCBzaXplb2YodTE2KSk7IAogICAgICAgICAgICAgICAgIGlmIChoYS0+YnJkID09IE5VTEwpIHsKICAgICAgICAgICAgICAgICAgICAgcHJpbnRrKCJHRFQtUENJOiBJbml0aWFsaXphdGlvbiBlcnJvciAoRFBNRU0gcmVtYXAgZXJyb3IpXG4iKTsKICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7CkBAIC0xMTgwLDcgKzExODAsNyBAQAogICAgICAgICAgICAgfQogICAgICAgICAgICAgZ2R0aF9kZWxheSgxKTsKICAgICAgICAgfQotICAgICAgICBwcm90X3ZlciA9ICh1bmNoYXIpcmVhZGwoJmRwNm1fcHRyLT51LmljLlNfSW5mb1swXSk7CisgICAgICAgIHByb3RfdmVyID0gKHU4KXJlYWRsKCZkcDZtX3B0ci0+dS5pYy5TX0luZm9bMF0pOwogICAgICAgICB3cml0ZWIoMCwgJmRwNm1fcHRyLT51LmljLlNfU3RhdHVzKTsKICAgICAgICAgaWYgKHByb3RfdmVyICE9IFBST1RPQ09MX1ZFUlNJT04pIHsKICAgICAgICAgICAgIHByaW50aygiR0RULVBDSTogSWxsZWdhbCBwcm90b2NvbCB2ZXJzaW9uXG4iKTsKQEAgLTEyMjMsNyArMTIyMyw3IEBACiAgICAgICAgICAgICB9CiAgICAgICAgICAgICBnZHRoX2RlbGF5KDEpOwogICAgICAgICB9Ci0gICAgICAgIHByb3RfdmVyID0gKHVuY2hhcikocmVhZGwoJmRwNm1fcHRyLT51LmljLlNfSW5mb1swXSkgPj4gMTYpOworICAgICAgICBwcm90X3ZlciA9ICh1OCkocmVhZGwoJmRwNm1fcHRyLT51LmljLlNfSW5mb1swXSkgPj4gMTYpOwog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AogICAgICAgICBkcDJfcHRyID0gaGEtPmJyZDsKICAgICAgICAgd3JpdGV3KGRwX29mZnNldCArIERQTUVNX0NPTU1BTkRfT0ZGU0VULAogICAgICAgICAgICAgICAgICAgICAmZHAyX3B0ci0+dS5pYy5jb21tX3F1ZXVlW2NtZF9ub10ub2Zmc2V0KTsKLSAgICAgICAgd3JpdGV3KCh1c2hvcnQpY21kX3B0ci0+U2VydmljZSwKKyAgICAgICAgd3JpdGV3KCh1MTYpY21kX3B0ci0+U2VydmljZSwKICAgICAgICAgICAgICAgICAgICAgJmRwMl9wdHItPnUuaWMuY29tbV9xdWV1ZVtjbWRfbm9dLnNlcnZfaWQpOwogICAgICAgICBtZW1jcHlfdG9pbygmZHAyX3B0ci0+dS5pYy5nZHRfZHByX2NtZFtkcF9vZmZzZXRdLGNtZF9wdHIsY3BfY291bnQpOwogICAgIH0gZWxzZSBpZiAoaGEtPnR5cGUgPT0gR0RUX1BDSSkgewogICAgICAgICBkcDZfcHRyID0gaGEtPmJyZDsKICAgICAgICAgd3JpdGV3KGRwX29mZnNldCArIERQTUVNX0NPTU1BTkRfT0ZGU0VULAogICAgICAgICAgICAgICAgICAgICAmZHA2X3B0ci0+dS5pYy5jb21tX3F1ZXVlW2NtZF9ub10ub2Zmc2V0KTsKLSAgICAgICAgd3JpdGV3KCh1c2hvcnQpY21kX3B0ci0+U2VydmljZSwKKyAgICAgICAgd3JpdGV3KCh1MTYpY21kX3B0ci0+U2VydmljZSwKICAgICAgICAgICAgICAgICAgICAgJmRwNl9wdHItPnUuaWMuY29tbV9xdWV1ZVtjbWRfbm9dLnNlcnZfaWQpOwogICAgICAgICBtZW1jcHlfdG9pbygmZHA2X3B0ci0+dS5pYy5nZHRfZHByX2NtZFtkcF9vZmZzZXRdLGNtZF9wdHIsY3BfY291bnQpOwogICAgIH0gZWxzZSBpZiAoaGEtPnR5cGUgPT0gR0RUX1BDSU5FVykgewogICAgICAgICBkcDZjX3B0ciA9IGhhLT5icmQ7CiAg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ICAgdTMyIGksajsKICAgICAgICAgZm9yIChpPTAsaj0wOyBqPEdEVEhfTUFYQ01EUzsgKytqKSB7CiAgICAgICAgICAgICBpZiAoaGEtPmNtZF90YWJbal0uY21uZCAhPSBVTlVTRURfQ01ORCkKICAgICAgICAgICAgICAgICArK2k7CiAgICAgICAgIH0KICAgICAgICAgaWYgKG1heF9pbmRleCA8IGkpIHsKICAgICAgICAgICAgIG1heF9pbmRleCA9IGk7Ci0gICAgICAgICAgICBUUkFDRTMoKCJHRFQ6IG1heF9pbmRleCA9ICVkXG4iLCh1c2hvcnQpaSkpOworICAgICAgICAgICAgVFJBQ0UzKCgiR0RUOiBtYXhfaW5kZXggPSAlZFxuIiwodTE2KWkpKTsKICAgICAgICAgfQogICAgIH0KICNlbmRpZgpAQCAtMTQ1MCw3ICsxNDUwLDcgQEAKICAgICB9CiB9CiAKLXN0YXRpYyBpbnQgZ2R0aF93YWl0KGdkdGhfaGFfc3RyICpoYSwgaW50IGluZGV4LCB1bG9uZzMyIHRpbWUpCitzdGF0aWMgaW50IGdkdGhfd2FpdChnZHRoX2hhX3N0ciAqaGEsIGludCBpbmRleCwgdTMyIHRpbWUpCiB7CiAgICAgaW50IGFuc3dlcl9mb3VuZCA9IEZBTFNFOwogICAgIGludCB3YWl0X2luZGV4ID0gMDsKQEAgLTE0NzYsOCArMTQ3Niw4IEBACiB9CiAKIAotc3RhdGljIGludCBnZHRoX2ludGVybmFsX2NtZChnZHRoX2hhX3N0ciAqaGEsIHVuY2hhciBzZXJ2aWNlLCB1c2hvcnQgb3Bjb2RlLAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bG9uZzMyIHAxLCB1bG9uZzY0IHAyLCB1bG9uZzY0IHAzKQorc3RhdGljIGludCBnZHRoX2ludGVybmFsX2NtZChnZHRoX2hhX3N0ciAqaGEsIHU4IHNlcnZpY2UsIHUxNiBvcGNvZGUsCisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUzMiBwMSwgdTY0IHAyLCB1NjQgcDMpCiB7CiAgICAgcmVnaXN0ZXIgZ2R0aF9jbWRfc3RyICpjbWRfcHRyOwogICAgIGludCByZXRyaWVzLGluZGV4OwpAQCAtMTUwMSwzNSArMTUwMSwzNSBAQAogICAgICAgICBpZiAoc2VydmljZSA9PSBDQUNIRVNFUlZJQ0UpIHsKICAgICAgICAgICAgIGlmIChvcGNvZGUgPT0gR0RUX0lPQ1RMKSB7CiAgICAgICAgICAgICAgICAgY21kX3B0ci0+dS5pb2N0bC5zdWJmdW5jID0gcDE7Ci0gICAgICAgICAgICAgICAgY21kX3B0ci0+dS5pb2N0bC5jaGFubmVsID0gKHVsb25nMzIpcDI7Ci0gICAgICAgICAgICAgICAgY21kX3B0ci0+dS5pb2N0bC5wYXJhbV9zaXplID0gKHVzaG9ydClwMzsKKyAgICAgICAgICAgICAgICBjbWRfcHRyLT51LmlvY3RsLmNoYW5uZWwgPSAodTMyKXAyOworICAgICAgICAgICAgICAgIGNtZF9wdHItPnUuaW9jdGwucGFyYW1fc2l6ZSA9ICh1MTYpcDM7CiAgICAgICAgICAgICAgICAgY21kX3B0ci0+dS5pb2N0bC5wX3BhcmFtID0gaGEtPnNjcmF0Y2hfcGh5czsKICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgaWYgKGhhLT5jYWNoZV9mZWF0ICYgR0RUXzY0QklUKSB7Ci0gICAgICAgICAgICAgICAgICAgIGNtZF9wdHItPnUuY2FjaGU2NC5EZXZpY2VObyA9ICh1c2hvcnQpcDE7CisgICAgICAgICAgICAgICAgICAgIGNtZF9wdHItPnUuY2FjaGU2NC5EZXZpY2VObyA9ICh1MTYpcDE7CiAgICAgICAgICAgICAgICAgICAgIGNtZF9wdHItPnUuY2FjaGU2NC5CbG9ja05vICA9IHAyOwogICAgICAgICAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICAgICAgICAgIGNtZF9wdHItPnUuY2FjaGUuRGV2aWNlTm8gPSAodXNob3J0KXAxOwotICAgICAgICAgICAgICAgICAgICBjbWRfcHRyLT51LmNhY2hlLkJsb2NrTm8gID0gKHVsb25nMzIpcDI7CisgICAgICAgICAgICAgICAgICAgIGNtZF9wdHItPnUuY2FjaGUuRGV2aWNlTm8gPSAodTE2KXAxOworICAgICAgICAgICAgICAgICAgICBjbWRfcHRyLT51LmNhY2hlLkJsb2NrTm8gID0gKHUzMilwMjsKICAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgICB9CiAgICAgICAgIH0gZWxzZSBpZiAoc2VydmljZSA9PSBTQ1NJUkFXU0VSVklDRSkgewogICAgICAgICAgICAgaWYgKGhhLT5yYXdfZmVhdCAmIEdEVF82NEJJVCkgewogICAgICAgICAgICAgICAgIGNtZF9wdHItPnUucmF3NjQuZGlyZWN0aW9uICA9IHAxOwotICAgICAgICAgICAgICAgIGNtZF9wdHItPnUucmF3NjQuYnVzICAgICAgICA9ICh1bmNoYXIpcDI7Ci0gICAgICAgICAgICAgICAgY21kX3B0ci0+dS5yYXc2NC50YXJnZXQgICAgID0gKHVuY2hhcilwMzsKLSAgICAgICAgICAgICAgICBjbWRfcHRyLT51LnJhdzY0Lmx1biAgICAgICAgPSAodW5jaGFyKShwMyA+PiA4KTsKKyAgICAgICAgICAgICAgICBjbWRfcHRyLT51LnJhdzY0LmJ1cyAgICAgICAgPSAodTgpcDI7CisgICAgICAgICAgICAgICAgY21kX3B0ci0+dS5yYXc2NC50YXJnZXQgICAgID0gKHU4KXAzOworICAgICAgICAgICAgICAgIGNtZF9wdHItPnUucmF3NjQubHVuICAgICAgICA9ICh1OCkocDMgPj4gOCk7CiAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgIGNtZF9wdHItPnUucmF3LmRpcmVjdGlvbiAgPSBwMTsKLSAgICAgICAgICAgICAgICBjbWRfcHRyLT51LnJhdy5idXMgICAgICAgID0gKHVuY2hhcilwMjsKLSAgICAgICAgICAgICAgICBjbWRfcHRyLT51LnJhdy50YXJnZXQgICAgID0gKHVuY2hhcilwMzsKLSAgICAgICAgICAgICAgICBjbWRfcHRyLT51LnJhdy5sdW4gICAgICAgID0gKHVuY2hhcikocDMgPj4gOCk7CisgICAgICAgICAgICAgICAgY21kX3B0ci0+dS5yYXcuYnVzICAgICAgICA9ICh1OClwMjsKKyAgICAgICAgICAgICAgICBjbWRfcHRyLT51LnJhdy50YXJnZXQgICAgID0gKHU4KXAzOworICAgICAgICAgICAgICAgIGNtZF9wdHItPnUucmF3Lmx1biAgICAgICAgPSAodTgpKHAzID4+IDgpOwogICAgICAgICAgICAgfQogICAgICAgICB9IGVsc2UgaWYgKHNlcnZpY2UgPT0gU0NSRUVOU0VSVklDRSkgewogICAgICAgICAgICAgaWYgKG9wY29kZSA9PSBHRFRfUkVBTFRJTUUpIHsKLSAgICAgICAgICAgICAgICAqKHVsb25nMzIgKikmY21kX3B0ci0+dS5zY3JlZW4uc3UuZGF0YVswXSA9IHAxOwotICAgICAgICAgICAgICAgICoodWxvbmczMiAqKSZjbWRfcHRyLT51LnNjcmVlbi5zdS5kYXRhWzRdID0gKHVsb25nMzIpcDI7Ci0gICAgICAgICAgICAgICAgKih1bG9uZzMyICopJmNtZF9wdHItPnUuc2NyZWVuLnN1LmRhdGFbOF0gPSAodWxvbmczMilwMzsKKyAgICAgICAgICAgICAgICAqKHUzMiAqKSZjbWRfcHRyLT51LnNjcmVlbi5zdS5kYXRhWzBdID0gcDE7CisgICAgICAgICAgICAgICAgKih1MzIgKikmY21kX3B0ci0+dS5zY3JlZW4uc3UuZGF0YVs0XSA9ICh1MzIpcDI7CisgICAgICAgICAgICAgICAgKih1MzIgKikmY21kX3B0ci0+dS5zY3JlZW4uc3UuZGF0YVs4XSA9ICh1MzIpcDM7CiAgICAgICAgICAgICB9CiAgICAgICAgIH0KICAgICAgICAgaGEtPmNtZF9sZW4gICAgICAgICAgPSBzaXplb2YoZ2R0aF9jbWRfc3RyKTsKQEAgLTE1NTUsOS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KigodTY0ICopJnBtb2QtPnN0X2J1ZmZfYWRkcjEpID0gaGEtPmNvYWxfc3RhdF9waHlzOwogICAgICAgICBwbW9kLT5zdF9idWZmX2luZHgxICAgID0gQ09BTElOREVYOwogICAgICAgICBwbW9kLT5zdF9idWZmX2FkZHIyICAgID0gMDsKICAgICAgICAgcG1vZC0+c3RfYnVmZl91X2FkZHIyICA9IDA7CkBAIC0xNzA1LDcgKzE3MDUsNyBAQAogICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgIGhhLT5idXNfaWRbYnVzX25vXSA9IDB4ZmY7CiAgICAgICAgIH0gICAgICAgCi0gICAgICAgIGhhLT5idXNfY250ID0gKHVuY2hhcilidXNfbm87CisgICAgICAgIGhhLT5idXNfY250ID0gKHU4KWJ1c19ubzsKICAgICB9CiAgICAgVFJBQ0UyKCgiZ2R0aF9zZWFyY2hfZHJpdmVzKCkgJWQgY2hhbm5lbHNcbiIsaGEtPmJ1c19jbnQpKTsKIApAQCAtMTc4OSwxMiArMTc4OSwxMiBAQAogCiAgICAgICAgIC8qIGxvZ2ljYWwgZHJpdmVzICovCiAgICAgICAgIGlmIChnZHRoX2ludGVybmFsX2NtZChoYSwgQ0FDSEVTRVJWSUNFLCBHRFRfSU9DVEwsIENBQ0hFX0RSVl9DTlQsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTlZBTElEX0NIQU5ORUwsc2l6ZW9mKHVsb25nMzIpKSkgewotICAgICAgICAgICAgZHJ2X2NudCA9ICoodWxvbmczMiAqKWhhLT5wc2NyYXRjaDsKKyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElOVkFMSURfQ0hBTk5FTCxzaXplb2YodTMyKSkpIHsKKyAgICAgICAgICAgIGRydl9jbnQgPSAqKHUzMiAqKWhhLT5wc2NyYXRjaDsKICAgICAgICAgICAgIGlmIChnZHRoX2ludGVybmFsX2NtZChoYSwgQ0FDSEVTRVJWSUNFLCBHRFRfSU9DVEwsIENBQ0hFX0RSVl9MSVNULAotICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElOVkFMSURfQ0hBTk5FTCxkcnZfY250ICogc2l6ZW9mKHVsb25nMzIpKSkgeworICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIElOVkFMSURfQ0hBTk5FTCxkcnZfY250ICogc2l6ZW9mKHUzMikpKSB7CiAgICAgICAgICAgICAgICAgZm9yIChqID0gMDsgaiA8IGRydl9jbnQ7ICsraikgewotICAgICAgICAgICAgICAgICAgICBkcnZfbm8gPSAoKHVsb25nMzIgKiloYS0+cHNjcmF0Y2gpW2pdOworICAgICAgICAgICAgICAgICAgICBkcnZfbm8gPSAoKHUzMiAqKWhhLT5wc2NyYXRjaClbal07CiAgICAgICAgICAgICAgICAgICAgIGlmIChkcnZfbm8gPCBNQVhfTERSSVZFUykgewogICAgICAgICAgICAgICAgICAgICAgICAgaGEtPmhkcltkcnZfbm9dLmlzX2xvZ2RydiA9IFRSVUU7CiAgICAgICAgICAgICAgICAgICAgICAgICBUUkFDRTIoKCJEcml2ZSAlZCBpcyBsb2cuIGRyaXZlXG4iLGRydl9ubykpOwpAQCAtMTgzOCw3ICsxODM4LDcgQEAKICAgICAgICAgaWYgKG9rKQogICAgICAgICAgICAgaGEtPnJhd19mZWF0ID0gR0RUXzY0QklUOwogICAgIH0KLSAgICBpZiAoZm9yY2VfZG1hMzIgfHwgKCFvayAmJiBoYS0+c3RhdHVzID09ICh1c2hvcnQpU19OT0ZVTkMpKQorICAgIGlmIChmb3JjZV9kbWEzMiB8fCAoIW9rICYmIGhhLT5zdGF0dXMgPT0gKHUxNilTX05PRlVOQykpCiAgICAgICAgIG9rID0gZ2R0aF9pbnRlcm5hbF9jbWQoaGEsIFNDU0lSQVdTRVJWSUNFLCBHRFRfSU5JVCwgMCwgMCwgMCk7CiAgICAgaWYgKCFvaykgewogICAgICAgICBwcmludGsoIkdEVC1IQSAlZDogSW5pdGlhbGl6YXRpb24gZXJyb3IgcmF3IHNlcnZpY2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ICAgICBjbWRwID0gaGEtPnBjY2I7CkBAIC0yNDk4LDE3ICsyNDk4LDE3IEBACiAKICAgICBpZiAocmVhZF93cml0ZSkgewogICAgICAgICBpZiAoc2NwLT5jbWRfbGVuID09IDE2KSB7Ci0gICAgICAgICAgICBtZW1jcHkoJm5vLCAmc2NwLT5jbW5kWzJdLCBzaXplb2YodWxvbmc2NCkpOworICAgICAgICAgICAgbWVtY3B5KCZubywgJnNjcC0+Y21uZFsyXSwgc2l6ZW9mKHU2NCkpOwogICAgICAgICAgICAgYmxvY2tubyA9IGJlNjRfdG9fY3B1KG5vKTsKLSAgICAgICAgICAgIG1lbWNweSgmY250LCAmc2NwLT5jbW5kWzEwXSwgc2l6ZW9mKHVsb25nMzIpKTsKKyAgICAgICAgICAgIG1lbWNweSgmY250LCAmc2NwLT5jbW5kWzEwXSwgc2l6ZW9mKHUzMikpOwogICAgICAgICAgICAgYmxvY2tjbnQgPSBiZTMyX3RvX2NwdShjbnQpOwogICAgICAgICB9IGVsc2UgaWYgKHNjcC0+Y21kX2xlbiA9PSAxMCkgewotICAgICAgICAgICAgbWVtY3B5KCZubywgJnNjcC0+Y21uZFsyXSwgc2l6ZW9mKHVsb25nMzIpKTsKKyAgICAgICAgICAgIG1lbWNweSgmbm8sICZzY3AtPmNtbmRbMl0sIHNpemVvZih1MzIpKTsKICAgICAgICAgICAgIGJsb2Nrbm8gPSBiZTMyX3RvX2NwdShubyk7Ci0gICAgICAgICAgICBtZW1jcHkoJmNudCwgJnNjcC0+Y21uZFs3XSwgc2l6ZW9mKHVzaG9ydCkpOworICAgICAgICAgICAgbWVtY3B5KCZjbnQsICZzY3AtPmNtbmRbN10sIHNpemVvZih1MTYpKTsKICAgICAgICAgICAgIGJsb2NrY250ID0gYmUxNl90b19jcHUoY250KTsKICAgICAgICAgfSBlbHNlIHsKLSAgICAgICAgICAgIG1lbWNweSgmbm8sICZzY3AtPmNtbmRbMF0sIHNpemVvZih1bG9uZzMyKSk7CisgICAgICAgICAgICBtZW1jcHkoJm5vLCAmc2NwLT5jbW5kWzBdLCBzaXplb2YodTMyKSk7CiAgICAgICAgICAgICBibG9ja25vID0gYmUzMl90b19jcHUobm8pICYgMHgwMDFmZmZmZlVMOwogICAgICAgICAgICAgYmxvY2tjbnQ9IHNjcC0+Y21uZFs0XT09MCA/IDB4MTAwIDogc2NwLT5jbW5kWzRdOwogICAgICAgICB9CkBAIC0yNTE2LDcgKzI1MTYsNyBAQAogICAgICAgICAgICAgY21kcC0+dS5jYWNoZTY0LkJsb2NrTm8gPSBibG9ja25vOwogICAgICAgICAgICAgY21kcC0+dS5jYWNoZTY0LkJsb2NrQ250ID0gYmxvY2tjbnQ7CiAgICAgICAgIH0gZWxzZSB7Ci0gICAgICAgICAgICBjbWRwLT51LmNhY2hlLkJsb2NrTm8gPSAodWxvbmczMilibG9ja25vOworICAgICAgICAgICAgY21kcC0+dS5jYWNoZS5CbG9ja05vID0gKHUzMilibG9ja25vOwogICAgICAgICAgICAgY21kcC0+dS5jYWNoZS5CbG9ja0NudCA9IGJsb2NrY250OwogICAgICAgICB9CiAKQEAgLTI1MjgsMTIgKzI1MjgsMTIgQEAKICAgICAgICAgICAgIGlmIChtb2RlNjQpIHsKICAgICAgICAgICAgICAgICBzdHJ1Y3Qgc2NhdHRlcmxpc3QgKnNsOwogCi0gICAgICAgICAgICAgICAgY21kcC0+dS5jYWNoZTY0LkRlc3RBZGRyPSAodWxvbmc2NCktMTsKKyAgICAgICAgICAgICAgICBjbWRwLT51LmNhY2hlNjQuRGVzdEFkZHI9ICh1NjQpLTE7CiAgICAgICAgICAgICAgICAgY21kcC0+dS5jYWNoZTY0LnNnX2NhbnogPSBzZ2NudDsKICAgICAgICAgICAgICAgICBzY3NpX2Zvcl9lYWNoX3NnKHNjcCwgc2wsIHNnY250LCBpKSB7CiAgICAgICAgICAgICAgICAgICAgIGNtZHAtPnUuY2FjaGU2NC5zZ19sc3RbaV0uc2dfcHRyID0gc2dfZG1hX2FkZHJlc3Moc2wpOwogI2lmZGVmIEdEVEhfRE1BX1NUQVRJU1RJQ1MKLSAgICAgICAgICAgICAgICAgICAgaWYgKGNtZHAtPnUuY2FjaGU2NC5zZ19sc3RbaV0uc2dfcHRyID4gKHVsb25nNjQpMHhmZmZmZmZmZikKKyAgICAgICAgICAgICAgICAgICAgaWYgKGNtZHAtPnUuY2FjaGU2NC5zZ19sc3RbaV0uc2dfcHRyID4gKHU2NCkweGZmZmZmZmZmKQogICAgICAgICAgICAgICAgICAgICAgICAgaGEtPmRtYTY0X2NudCsrOwogICAgICAgICAgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICAgICAgICAgICBoYS0+ZG1hMzJfY250Kys7CkBAIC0yNTU1LDggKzI1NTUsOCBAQAogICAgICAgICAgICAgfQogCiAjaWZkZWYgR0RUSF9TVEFUSVNUSUNTCi0gICAgICAgICAgICBpZiAobWF4X3NnIDwgKHVsb25nMzIpc2djbnQpIHsKLSAgICAgICAgICAgICAgICBtYXhfc2cgPSAodWxvbmczMilzZ2NudDsKKyAgICAgICAgICAgIGlmIChtYXhfc2cgPCAodTMyKXNnY250KSB7CisgICAgICAgICAgICAgICAgbWF4X3NnID0gKHUzMilzZ2NudDsKICAgICAgICAgICAgICAgICBUUkFDRTMoKCJHRFQ6IG1heF9zZyA9ICVkXG4iLG1heF9zZykpOwogICAgICAgICAgICAgfQogI2VuZGlmCkBAIC0yNTcyLDcgKzI1NzIsNyBAQAogICAgICAgICBUUkFDRSgoImNhY2hlIGNtZDogY21kICVkIGJsb2Nrbm8uICVkLCBibG9ja2NudCAlZFxuIiwKICAgICAgICAgICAgICAgIGNtZHAtPk9wQ29kZSxjbWRwLT51LmNhY2hlNjQuQmxvY2tObyxjbWRwLT51LmNhY2hlNjQuQmxvY2tDbnQpKTsKICAgICAgICAgaGEtPmNtZF9sZW4gPSBHRFRPRkZTT0YoZ2R0aF9jbWRfc3RyLHUuY2FjaGU2NC5zZ19sc3QpICsKLSAgICAgICAgICAgICh1c2hvcn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MTsKKyAgICAgICAgICAgICAgICBjbWRwLT51LnJhdzY0LnNkYXRhID0gKHU2NCktMTsKICAgICAgICAgICAgICAgICBjbWRwLT51LnJhdzY0LnNnX3JhbnogPSBzZ2NudDsKICAgICAgICAgICAgICAgICBzY3NpX2Zvcl9lYWNoX3NnKHNjcCwgc2wsIHNnY250LCBpKSB7CiAgICAgICAgICAgICAgICAgICAgIGNtZHAtPnUucmF3NjQuc2dfbHN0W2ldLnNnX3B0ciA9IHNnX2RtYV9hZGRyZXNzKHNsKTsKICNpZmRlZiBHRFRIX0RNQV9TVEFUSVNUSUNTCi0gICAgICAgICAgICAgICAgICAgIGlmIChjbWRwLT51LnJhdzY0LnNnX2xzdFtpXS5zZ19wdHIgPiAodWxvbmc2NCkweGZmZmZmZmZmKQorICAgICAgICAgICAgICAgICAgICBpZiAoY21kcC0+dS5yYXc2NC5zZ19sc3RbaV0uc2dfcHRyID4gKHU2NCkweGZmZmZmZmZmKQogICAgICAgICAgICAgICAgICAgICAgICAgaGEtPmRtYTY0X2NudCsrOwogICAgICAgICAgICAgICAgICAgICBlbHNlCiAgICAgICAgICAgICAgICAgICAgICAgICBoYS0+ZG1hMzJfY250Kys7CkBAIC0yNzQ0LDcgKzI3NDQsNyBAQAogICAgICAgICAgICAgICAgICAgIGNtZHAtPnUucmF3NjQuc2dfbHN0WzBdLnNnX2xlbikpOwogICAgICAgICAgICAgLyogZXZhbHVhdGUgY29tbWFuZCBzaXplICovCiAgICAgICAgICAgICBoYS0+Y21kX2xlbiA9IEdEVE9GRlNPRihnZHRoX2NtZF9zdHIsdS5yYXc2NC5zZ19sc3QpICsKLSAgICAgICAgICAgICAgICAodXNob3J0KWNtZHAtPnUucmF3NjQuc2dfcmFueiAqIHNpemVvZihnZHRoX3NnNjRfc3RyKTsKKyAgICAgICAgICAgICAgICAodTE2KWNtZHAtPnUucmF3NjQuc2dfcmFueiAqIHNpemVvZihnZHRoX3NnNjRfc3RyKTsKICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgIFRSQUNFKCgicmF3IGNtZDogYWRkci4gJXggc2dhbnogJXggc2dwdHIwICV4IHNnbGVuMCAleFxuIiwKICAgICAgICAgICAgICAgICAgICBjbWRwLT51LnJhdy5zZGF0YSxjbWRwLT51LnJhdy5zZ19yYW56LApAQCAtMjc1Miw3ICsyNzUyLDcgQEAKICAgICAgICAgICAgICAgICAgICBjbWRwLT51LnJhdy5zZ19sc3RbMF0uc2dfbGVuKSk7CiAgICAgICAgICAgICAvKiBldmFsdWF0ZSBjb21tYW5kIHNpemUgKi8KICAgICAgICAgICAgIGhhLT5jbWRfbGVuID0gR0RUT0ZGU09GKGdkdGhfY21kX3N0cix1LnJhdy5zZ19sc3QpICsKLSAgICAgICAgICAgICAgICAodXNob3J0KWNtZHAtPnUucmF3LnNnX3JhbnogKiBzaXplb2YoZ2R0aF9zZ19zdHIpOworICAgICAgICAgICAgICAgICh1MTYpY21kcC0+dS5yYXcuc2dfcmFueiAqIHNpemVvZihnZHRoX3NnX3N0cik7CiAgICAgICAgIH0KICAgICB9CiAgICAgLyogY2hlY2sgc3BhY2UgKi8KQEAgLTI4MDIsNyArMjgwMiw3IEBACiAgICAgaWYgKGNtZHAtPk9wQ29kZSA9PSBHRFRfSU9DVEwpIHsKICAgICAgICAgVFJBQ0UyKCgiSU9DVExcbiIpKTsKICAgICAgICAgaGEtPmNtZF9sZW4gPSAKLSAgICAgICAgICAgIEdEVE9GRlNPRihnZHRoX2NtZF9zdHIsdS5pb2N0bC5wX3BhcmFtKSArIHNpemVvZih1bG9uZzY0KTsKKyAgICAgICAgICAgIEdEVE9GRlNPRihnZHRoX2NtZF9zdHIsdS5pb2N0bC5wX3BhcmFtKSArIHNpemVvZih1NjQpOwogICAgIH0gZWxzZSBpZiAoY21kcC0+U2VydmljZSA9PSBDQUNIRVNFUlZJQ0UpIHsKICAgICAgICAgVFJBQ0UyKCgiY2FjaGUgY29tbWFuZCAlZFxuIixjbWRwLT5PcENvZGUpKTsKICAgIC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AgICAgICAgIH0KICNlbmRpZgogICAgIApAQCAtMzE5Nyw3ICszMTk3LDcgQEAKICAgICAgICAgICAgICsrYWN0X2ludF9jb2FsOwogICAgICAgICAgICAgaWYgKGFjdF9pbnRfY29hbCA+IG1heF9pbnRfY29hbCkgewogICAgICAgICAgICAgICAgIG1heF9pbnRfY29hbCA9IGFjdF9pbnRfY29hbDsKLSAgICAgICAgICAgICAgICBwcmludGsoIkdEVDogbWF4X2ludF9jb2FsID0gJWRcbiIsKHVzaG9ydCltYXhfaW50X2NvYWwpOworICAgICAgICAgICAgICAgIHByaW50aygiR0RUOiBtYXhfaW50X2NvYWwgPSAlZFxuIiwodTE2KW1heF9pbnRfY29hbCk7CiAgICAgICAgICAgICB9CiAjZW5kaWYgICAgICAKICAgICAgICAgICAgIC8qIHNlZSBpZiB0aGVyZSBpcyBhbm90aGVyIHN0YXR1cyAqLwpAQCAtMzIyNSwxMiArMzIyNSwxMiBAQAogCXJldHVybiBfX2dkdGhfaW50ZXJydXB0KGhhLCBmYWxzZSwgTlVMTCk7CiB9CiAKLXN0YXRpYyBpbnQgZ2R0aF9zeW5jX2V2ZW50KGdkdGhfaGFfc3RyICpoYSwgaW50IHNlcnZpY2UsIHVuY2hhciBpbmRleCwKK3N0YXRpYyBpbnQgZ2R0aF9zeW5jX2V2ZW50KGdkdGhfaGFfc3RyICpoYSwgaW50IHNlcnZpY2UsIHU4IGluZGV4LAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTY3NpX0NtbmQgKnNjcCkKIHsKICAgICBnZHRoX21zZ19zdHIgKm1zZzsKICAgICBnZHRoX2NtZF9zdHIgKmNtZHA7Ci0gICAgdW5jaGFyIGIsIHQ7CisgICAgdTggYiwgdDsKICAgICBzdHJ1Y3QgZ2R0aF9jbW5kaW5mbyAqY21uZGluZm8gPSBnZHRoX2NtbmRfcHJpdihzY3ApOwogCiAgICAgY21kcCA9IGhhLT5wY2NiOwpAQCAtMzI2Myw3ICszMjYzLDcgQEAKICAgICAgICAgICAgIGNtZHAtPnUuc2NyZWVuLnN1Lm1zZy5tc2dfYWRkciAgPSBoYS0+bXNnX3BoeXM7CiAgICAgICAgICAgICBoYS0+Y21kX29mZnNfZHBtZW0gPSAwOwogICAgICAgICAgICAgaGEtPmNtZF9sZW4gPSBHRFRPRkZTT0YoZ2R0aF9jbWRfc3RyLHUuc2NyZWVuLnN1Lm1zZy5tc2dfYWRkcikgCi0gICAgICAgICAgICAgICAgKyBzaXplb2YodWxvbmc2NCk7CisgICAgICAgICAgICAgICAgKyBzaXplb2YodTY0KTsKICAgICAgICAgICAgIGhhLT5jbWRfY250ID0gMDsKICAgICAgICAgICAgIGdkdGhfY29weV9jb21tYW5kKGhhKTsKICAgICAgICAgICAgIGdkdGhfcmVsZWFzZV9ldmVudChoYSk7CkBAIC0zMjk3LDcgKzMyOTcsNyBAQAogICAgICAgICAgICAgY21kcC0+dS5zY3JlZW4uc3UubXNnLm1zZ19hZGRyICA9IGhhLT5tc2dfcGh5czsKICAgICAgICAgICAgIGhhLT5jbWRfb2Zmc19kcG1lbSA9IDA7CiAgICAgICAgICAgICBoYS0+Y21kX2xlbiA9IEdEVE9GRlNPRihnZHRoX2NtZF9zdHIsdS5zY3JlZW4uc3UubXNnLm1zZ19hZGRyKSAKLSAgICAgICAgICAgICAgICArIHNpemVvZih1bG9uZzY0KTsKKyAgICAgICAgICAgICAgICArIHNpemVvZih1NjQpOwogICAgICAgICAgICAgaGEtPmNtZF9jbnQgPSAwOwogICAgICAgICAgICAgZ2R0aF9jb3B5X2NvbW1hbmQoaGEpOwogICAgICAgICAgICAgZ2R0aF9yZWxlYXNlX2V2ZW50KGhhKTsKQEAgLTMzMzUsNyArMzMzNSw3IEBACiAgICAgICAgICAgICAgICAgICAgICAgICBjbW5kaW5mby0+T3BDb2RlKSk7CiAgICAgICAgICAgICAgICAgLyogc3BlY2lhbCBjb21tYW5kcyBHRFRfQ0xVU1RfSU5GTy9HRFRfTU9VTlQgPyAqLwogICAgICAgICAgICAgICAgIGlmIChjbW5kaW5mby0+T3BDb2RlID09IEdEVF9DTFVTVF9JTkZPKSB7Ci0gICAgICAgICAgICAgICAgICAgIGhhLT5oZHJbdF0uY2x1c3Rlcl90eXBlID0gKHVuY2hhciloYS0+aW5mbzsKKyAgICAgICAgICAgICAgICAgICAgaGEtPmhkclt0XS5jbHVzdGVyX3R5cGUgPSAodTgpaGEtPmluZm87CiAgICAgICAgICAgICAgICAgICAgIGlmICghKGhhLT5oZHJbdF0uY2x1c3Rlcl90eXBlICYgCiAgICAgICAgICAgICAgICAgICAgICAgICBDTFVTVEVSX01PVU5URUQpKSB7CiAgICAgICAgICAgICAgICAgICAgICAgICAvKiBOT1QgTU9VTlRFRCAtPiBNT1VOVCAqLwpAQCAtMzM5Nyw3ICszMzk3LDcgQEAKICAgICAgICAgICAgICAgICAgICAgaGEtPmhkclt0XS5jbHVzdGVyX3R5cGUgJj0gfkNMVVNURVJfUkVTRVJWRUQ7CiAgICAgICAgICAgICAgICAgfQogICAgICAgICAgICAgICAgIG1lbXNldCgoY2hhciopc2NwLT5zZW5zZV9idWZmZXIsMCwxNik7Ci0gICAgICAgICAgICAgICAgaWYgKGhhLT5zdGF0dXMgPT0gKHVzaG9ydClTX0NBQ0hFX1JFU0VSVikgeworICAgICAgICAgICAgICAgIGlmIChoYS0+c3RhdHVzID09ICh1MTYpU19DQUNIRV9SRVNFUlYpIHsKICAgICAgICAgICAgICAgICAgICAgc2NwLT5yZXN1bHQgPSAoRElEX09LIDw8IDE2KSB8IChSRVNFUlZBVElPTl9DT05GTElDVCA8PCAxKTsKICAgICAgICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgICAgICBzY3AtPnNlbnNlX2J1ZmZlclswXSA9IDB4NzA7CkBAIC0zNjE0LDE2ICszNjE0LDE2IEBACiAgICAgICAgICAgICBjbWRwLT51LnNjcmVlbi5zdS5tc2cubXNnX2FkZHIgID0gaGEtPm1zZ19waHlzOwogICAgICAgICAgICAgaGEtPmNtZF9vZmZzX2RwbWVtID0gMDsKICAgICAgICAgICAgIGhhLT5jbWRfbGVuID0gR0RUT0ZGU09GKGdkdGhfY21kX3N0cix1LnNjcmVlbi5zdS5tc2cubXNnX2FkZHIpIAotICAgICAgICAgICAgICAgICsgc2l6ZW9mKHVsb25nNjQpOworICAgICAgICAgICAgICAgICsgc2l6ZW9mKHU2NCk7CiAgICAgICAgICAgICBoYS0+Y21kX2NudCA9IDA7CiAgICAgICAgICAgICBnZHRoX2NvcHlfY29tbWFuZChoYSk7CiAgICAgICAgICAgICBpZiAoaGEtPnR5cGUgPT0gR0RUX0VJU0EpCi0gICAgICAgICAgICAgICAgcHJpbnRrKCJbRUlTQSBzbG90ICVkXSAiLCh1c2hvcnQpaGEtPmJyZF9waHlzKTsKKyAgICAgICAgICAgICAgICBwcmludGsoIltFSVNBIHNsb3QgJWRdICIsKHUxNiloYS0+YnJkX3BoeXMpOwogICAgICAgICAgICAgZWxzZSBpZiAoaGEtPnR5cGUgPT0gR0RUX0lTQSkKLSAgICAgICAgICAgICAgICBwcmludGsoIltEUE1FTSAweCU0WF0gIiwodXNob3J0KWhhLT5icmRfcGh5cyk7CisgICAgICAgICAgICAgICAgcHJpbnRrKCJbRFBNRU0gMHglNFhdICIsKHUxNiloYS0+YnJkX3BoeXMpOwogICAgICAgICAgICAgZWxzZSAKLSAgICAgICAgICAgICAgICBwcmludGsoIltQQ0kgJWQvJWRdICIsKHVzaG9ydCkoaGEtPmJyZF9waHlzPj44KSwKLSAgICAgICAgICAgICAgICAgICAgICAgKHVzaG9ydCkoKGhhLT5icmRfcGh5cz4+MykmMHgxZikpOworICAgICAgICAgICAgICAgIHByaW50aygiW1BDSSAlZC8lZF0gIiwodTE2KShoYS0+YnJkX3BoeXM+PjgpLAorICAgICAgICAgICAgICAgICAgICAgICAodTE2KSgoaGEtPmJyZF9waHlzPj4zKSYweDFmKSk7CiAgICAgICAgICAgICBnZHR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GRyaXZlKGhhbnVtLCAodTE2KWhhLT5pbmZvKTsgKi8KICAgICAgICAgfSAgIAogICAgIH0KICAgICByZXR1cm4gMTsKQEAgLTM2ODAsMTMgKzM2ODAsMTMgQEAKICAgICAgICAgZm9yIChqPTAsaT0xOyBpIDwgZlswXTsgaSs9MikgewogICAgICAgICAgICAgc3dpdGNoIChmW2krMV0pIHsKICAgICAgICAgICAgICAgY2FzZSA0OgotICAgICAgICAgICAgICAgIHN0YWNrLmJbaisrXSA9ICoodWxvbmczMiopJmR2ci0+ZXUuc3RyZWFtWyhpbnQpZltpXV07CisgICAgICAgICAgICAgICAgc3RhY2suYltqKytdID0gKih1MzIqKSZkdnItPmV1LnN0cmVhbVsoaW50KWZbaV1dOwogICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICBjYXNlIDI6Ci0gICAgICAgICAgICAgICAgc3RhY2suYltqKytdID0gKih1c2hvcnQqKSZkdnItPmV1LnN0cmVhbVsoaW50KWZbaV1dOworICAgICAgICAgICAgICAgIHN0YWNrLmJbaisrXSA9ICoodTE2KikmZHZyLT5ldS5zdHJlYW1bKGludClmW2ldXTsKICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgY2FzZSAxOgotICAgICAgICAgICAgICAgIHN0YWNrLmJbaisrXSA9ICoodW5jaGFyKikmZHZyLT5ldS5zdHJlYW1bKGludClmW2ldXTsKKyAgICAgICAgICAgICAgICBzdGFjay5iW2orK10gPSAqKHU4KikmZHZyLT5ldS5zdHJlYW1bKGludClmW2ldXTsKICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgICAgZGVmYXVsdDoKICAgICAgICAgICAgICAgICBicmVhazsKQEAgLTM3MTIsMTQgKzM3MTIsMTQgQEAKIH0KIAogI2lmZGVmIEdEVEhfU1RBVElTVElDUwotc3RhdGljIHVuY2hhcglnZHRoX3RpbWVyX3J1bm5pbmc7CitzdGF0aWMgdTgJZ2R0aF90aW1lcl9ydW5uaW5nOw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LSAgICB1bG9uZzY0IHBhZGRyOyAKKyAgICB1NjQgcGFkZHI7IAogICAgIGdkdGhfaGFfc3RyICpoYTsKICAgICBpbnQgcnZhbDsKIApAQCAtNDE5NCw3ICs0MTk0LDcgQEAKICAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LmNhY2hlNjQuRGV2aWNlTm8gPSBnZW4uY29tbWFuZC51LmNhY2hlLkRldmljZU5vOwogICAgICAgICAgICAgICAgIC8qIGFkZHJlc3NlcyAqLwogICAgICAgICAgICAgICAgIGlmIChoYS0+Y2FjaGVfZmVhdCAmIFNDQVRURVJfR0FUSEVSKSB7Ci0gICAgICAgICAgICAgICAgICAgIGdlbi5jb21tYW5kLnUuY2FjaGU2NC5EZXN0QWRkciA9ICh1bG9uZzY0KS0xOworICAgICAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LmNhY2hlNjQuRGVzdEFkZHIgPSAodTY0KS0xOwogICAgICAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LmNhY2hlNjQuc2dfY2FueiA9IDE7CiAgICAgICAgICAgICAgICAgICAgIGdlbi5jb21tYW5kLnUuY2FjaGU2NC5zZ19sc3RbMF0uc2dfcHRyID0gcGFkZHI7CiAgICAgICAgICAgICAgICAgICAgIGdlbi5jb21tYW5kLnUuY2FjaGU2NC5zZ19sc3RbMF0uc2dfbGVuID0gZ2VuLmRhdGFfbGVuOwpAQCAtNDIwNyw3ICs0MjA3LDcgQEAKICAgICAgICAgICAgICAgICBpZiAoaGEtPmNhY2hlX2ZlYXQgJiBTQ0FUVEVSX0dBVEhFUikgewogICAgICAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LmNhY2hlLkRlc3RBZGRyID0gMHhmZmZmZmZmZjsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5jYWNoZS5zZ19jYW56ID0gMTsKLSAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5jYWNoZS5zZ19sc3RbMF0uc2dfcHRyID0gKHVsb25nMzIpcGFkZHI7CisgICAgICAgICAgICAgICAgICAgIGdlbi5jb21tYW5kLnUuY2FjaGUuc2dfbHN0WzBdLnNnX3B0ciA9ICh1MzIpcGFkZHI7CiAgICAgICAgICAgICAgICAgICAgIGdlbi5jb21tYW5kLnUuY2FjaGUuc2dfbHN0WzBdLnNnX2xlbiA9IGdlbi5kYXRhX2xlbjsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5jYWNoZS5zZ19sc3RbMV0uc2dfbGVuID0gMDsKICAgICAgICAgICAgICAgICB9IGVsc2UgewpAQCAtNDIzMCw3ICs0MjMwLDcgQEAKICAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LnJhdzY0LmRpcmVjdGlvbiA9IGdlbi5jb21tYW5kLnUucmF3LmRpcmVjdGlvbjsKICAgICAgICAgICAgICAgICAvKiBhZGRyZXNzZXMgKi8KICAgICAgICAgICAgICAgICBpZiAoaGEtPnJhd19mZWF0ICYgU0NBVFRFUl9HQVRIRVIpIHsKLSAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXc2NC5zZGF0YSA9ICh1bG9uZzY0KS0xOworICAgICAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LnJhdzY0LnNkYXRhID0gKHU2NCktMTsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXc2NC5zZ19yYW56ID0gMTsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXc2NC5zZ19sc3RbMF0uc2dfcHRyID0gcGFkZHI7CiAgICAgICAgICAgICAgICAgICAgIGdlbi5jb21tYW5kLnUucmF3NjQuc2dfbHN0WzBdLnNnX2xlbiA9IGdlbi5kYXRhX2xlbjsKQEAgLTQyNDQsMTQgKzQyNDQsMTQgQEAKICAgICAgICAgICAgICAgICBpZiAoaGEtPnJhd19mZWF0ICYgU0NBVFRFUl9HQVRIRVIpIHsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXcuc2RhdGEgPSAweGZmZmZmZmZmOwogICAgICAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LnJhdy5zZ19yYW56ID0gMTsKLSAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXcuc2dfbHN0WzBdLnNnX3B0ciA9ICh1bG9uZzMyKXBhZGRyOworICAgICAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LnJhdy5zZ19sc3RbMF0uc2dfcHRyID0gKHUzMilwYWRkcjsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXcuc2dfbHN0WzBdLnNnX2xlbiA9IGdlbi5kYXRhX2xlbjsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXcuc2dfbHN0WzFdLnNnX2xlbiA9IDA7CiAgICAgICAgICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXcuc2RhdGEgPSBwYWRkcjsKICAgICAgICAgICAgICAgICAgICAgZ2VuLmNvbW1hbmQudS5yYXcuc2dfcmFueiA9IDA7CiAgICAgICAgICAgICAgICAgfQotICAgICAgICAgICAgICAgIGdlbi5jb21tYW5kLnUucmF3LnNlbnNlX2RhdGEgPSAodWxvbmczMilwYWRkciArIGdlbi5kYXRhX2xlbjsKKyAgICAgICAgICAgICAgICBnZW4uY29tbWFuZC51LnJhdy5zZW5zZV9kYXRhID0gKHUzMilwYWRkciArIGdlbi5kYXRhX2xlbjsKICAgICAgICAgICAgIH0KICAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgIGdkdGhfaW9jdGxfZnJlZShoYSwgZ2VuLmRhdGFfbGVuK2dlbi5zZW5zZV9sZW4sIGJ1ZiwgcGFkZHIpOwpAQCAtNDI4Myw3ICs0MjgzLDcgQEAKICAgICBnZHRoX2lvY3RsX3Jlc2NhbiAqcnNjOwogICAgIGdkdGhfY21k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2N0bF9vc3ZlcnMpKSkKICAgICAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsKICAgICAgICAgYnJlYWs7CkBAIC00NTEyLDEwICs0NTEyLDEwIEBACiAgICAgICAgICAgICByZXR1cm4gLUVGQVVMVDsKIAogICAgICAgICBpZiAoaGEtPnR5cGUgPT0gR0RUX0lTQSB8fCBoYS0+dHlwZSA9PSBHRFRfRUlTQSkgewotICAgICAgICAgICAgY3RydC50eXBlID0gKHVuY2hhcikoKGhhLT5zdHlwZT4+MjApIC0gMHgxMCk7CisgICAgICAgICAgICBjdHJ0LnR5cGUgPSAodTgpKChoYS0+c3R5cGU+PjIwKSAtIDB4MTApOwogICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgaWYgKGhhLT50eXBlICE9IEdEVF9QQ0lNUFIpIHsKLSAgICAgICAgICAgICAgICBjdHJ0LnR5cGUgPSAodW5jaGFyKSgoaGEtPnN0eXBlPDw0KSArIDYpOworICAgICAgICAgICAgICAgIGN0cnQudHlwZSA9ICh1OCkoKGhhLT5zdHlwZTw8NCkgKyA2KTsKICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgY3RydC50eXBlID0gCiAgICAgICAgICAgICAgICAgICAgIChoYS0+b2VtX2lkID09IE9FTV9JRF9JTlRFTCA/IDB4ZmQgOiAweGZlKTsKQEAgLTQ1NDYsNyArNDU0Niw3IEBACiAgICAgICBjYXNlIEdEVElPQ1RMX0xPQ0tDSE46CiAgICAgICB7CiAgICAgICAgIGdkdGhfaW9jdGxfbG9ja2NobiBsY2huOwotICAgICAgICB1bmNoYXIgaSwgajsKKyAgICAgICAgdTggaSwgajsKIAogICAgICAgICBpZiAoY29weV9mcm9tX3VzZXIoJmxjaG4sIGFyZ3AsIHNpemVvZihnZHRoX2lvY3RsX2xvY2tjaG4pKSB8fAogICAgICAgICAgICAgKE5VTEwgPT0gKGhhID0gZ2R0aF9maW5kX2hhKGxjaG4uaW9ub2RlKSkpKQpAQCAtN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19hbnN3ZXI7ICAgICAgICAgICAgICAgICAgICAgLyogYW5zd2VyIGZsYWcgKi8KLSAgICB1bmNoYXIgICAgICBtc2dfZXh0OyAgICAgICAgICAgICAgICAgICAgICAgIC8qIG1vcmUgbWVzc2FnZXMgKi8KLSAgICB1bmNoYXIgICAgICBtc2dfcmVzZXJ2ZWRbMl07CisgICAgdTMyICAgICBtc2dfaGFuZGxlOyAgICAgICAgICAgICAgICAgICAgIC8qIG1lc3NhZ2UgaGFuZGxlICovCisgICAgdTMyICAgICBtc2dfbGVuOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHNpemUgb2YgbWVzc2FnZSAqLworICAgIHUzMiAgICAgbXNnX2FsZW47ICAgICAgICAgICAgICAgICAgICAgICAvKiBhbnN3ZXIgbGVuZ3RoICovCisgICAgdTggICAgICBtc2dfYW5zd2VyOyAgICAgICAgICAgICAgICAgICAgIC8qIGFuc3dlciBmbGFnICovCisgICAgdTggICAgICBtc2dfZXh0OyAgICAgICAgICAgICAgICAgICAgICAgIC8qIG1vcmUgbWVzc2FnZXMgKi8KKyAgICB1OCAgICAgIG1zZ19yZXNlcnZlZFsyXTsKICAgICBjaGFyICAgICAgICBtc2dfdGV4dFtNU0dMRU4rMl07ICAgICAgICAgICAgIC8qIHRoZSBtZXNzYWdlIHRleHQgKi8KLX0gUEFDS0VEIGdkdGhfbXNnX3N0cjsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9tc2dfc3RyOwogCiAKIC8qIElPQ1RMIGRhdGEgc3RydWN0dXJlcyAqLwogCiAvKiBTdGF0dXMgY29hbGVzY2luZyBidWZmZXIgZm9yIHJldHVybmluZyBtdWx0aXBsZSByZXF1ZXN0cyBwZXIgaW50ZXJydXB0ICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdWxvbmczMiAgICAgc3RhdHVzOwotICAgIHVsb25nMzIgICAgIGV4dF9zdGF0dXM7Ci0gICAgdWxvbmczMiAgICAgaW5mbzA7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AgdTMyICAgICBjbWRfYnVmZl91X2FkZHIxOyAgIC8qIHJlc2VydmVkIGZvciA2NCBiaXQgYWRkcmVzc2luZyAqLworICAgIHUzMiAgICAgY21kX2J1ZmZfaW5keDE7ICAgICAvKiBjbWQgYnVmIGFkZHIxIHVuaXF1ZSBpZGVudGlmaWVyICovCisgICAgdTMyICAgICBjbWRfYnVmZl9hZGRyMjsgICAgIC8qIHBoeXNpY2FsIGFkZHJlc3Mgb2YgY21kIGJ1ZmZlciAxICovICAgCisgICAgdTMyICAgICBjbWRfYnVmZl91X2FkZHIyOyAgIC8qIHJlc2VydmVkIGZvciA2NCBiaXQgYWRkcmVzc2luZyAqLworICAgIHUzMiAgICAgY21kX2J1ZmZfaW5keDI7ICAgICAvKiBjbWQgYnVmIGFkZHIxIHVuaXF1ZSBpZGVudGlmaWVyICovCisgICAgdTMyICAgICBjbWRfYnVmZl9zaXplOyAgICAgIC8qIHNpemUgb2YgZWFjaCBjbWQgYnVmZXIgaW4gYnl0ZXMgKi8KKyAgICB1MzIgICAgIHJlc2VydmVkMTsKKyAgICB1MzIgICAgIHJlc2VydmVkMjsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9wZXJmX21vZGVzOwogCiAvKiBTQ1NJIGRyaXZlIGluZm8gKi8KIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bmNoYXIgICAgICB2ZW5kb3JbOF07ICAgICAgICAgICAgICAgICAgICAgIC8qIHZlbmRvciBzdHJpbmcgKi8KLSAgICB1bmNoYXIgICAgICBwcm9kdWN0WzE2XTsgICAgICAgICAgICAgICAgICAgIC8qIHByb2R1Y3Qgc3RyaW5nICovCi0gICAgdW5jaGFyICAgICAgcmV2aXNpb25bNF07ICAgICAgICAgICAgICAgICAgICAvKiByZXZpc2lvbiAqLwotICAgIHVsb25nMzIgICAgIHN5X3JhdGU7ICAgICAgICAgICAgICAgICAgICAgICAgLyogY3VycmVudCByYXRlIGZvciBzeW5jLiB0ci4gKi8KLSAgICB1bG9uZzMyICAgICBzeV9tYXhfcmF0ZTsgICAgICAgICAgICAgICAgICAgIC8qIG1heC4gcmF0ZSBmb3Igc3luYy4gdHIuICovCi0gICAgdWxvbmczMiAgICAgbm9fbGRyaXZlOyAgICAgICAgICAgICAgICAgICAgICAvKiBiZWxvbmdzIHRvIHRoaXMgbG9nLiBkcnYuKi8KLSAgICB1bG9uZzMyICAgICBibGtjbnQ7ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBibG9ja3MgKi8KLSAgICB1c2hvcnQgICAgICBibGtzaXplOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHNpemUgb2YgYmxvY2sgaW4gYnl0ZXMgKi8KLSAgICB1bmNoYXIgICAgICBhdmFpbGFibGU7ICAgICAgICAgICAgICAgICAgICAgIC8qIGZsYWc6IGFjY2VzcyBpcyBhdmFpbGFibGUgKi8KLSAgICB1bmNoYXIgICAgICBpbml0OyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG1lZGl1bSBpcyBpbml0aWFsaXplZCAqLwotICAgIHVuY2hhciAgICAgIGRldnR5cGU7ICAgICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBkZXZpY2V0eXBlICovCi0gICAgdW5jaGFyICAgICAgcm1fbWVkaXVtOyAgICAgICAgICAgICAgICAgICAgICAvKiBtZWRpdW0gaXMgcmVtb3ZhYmxlICovCi0gICAgdW5jaGFyICAgICAgd3BfbWVkaXVtOyAgICAgICAgICAgICAgICAgICAgICAvKiBtZWRpdW0gaXMgd3JpdGUgcHJvdGVjdGVkICovCi0gICAgdW5jaGFyICAgICAgYW5zaTsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIEkvSUkgb3IgSUlJPyAqLwotICAgIHVuY2hhciAgICAgIHByb3RvY29sOyAgICAgICAgICAgICAgICAgICAgICAgLyogc2FtZSBhcyBhbnNpICovCi0gICAgdW5jaGFyICAgICAgc3luYzsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBmbGFnOiBzeW5jLiB0cmFuc2ZlciBlbmFiLiAqLwotICAgIHVuY2hhciAgICAgIGRpc2M7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZmxhZzogZGlzY29ubmVjdCBlbmFibGVkICovCi0gICAgdW5jaGFyICAgICAgcXVldWVpbmc7ICAgICAgICAgICAgICAgICAgICAgICAvKiBmbGFnOiBjb21tYW5kIHF1ZWluZyBlbmFiLiAqLwotICAgIHVuY2hhciAgICAgIGNhY2hlZDsgICAgICAgICAgICAgICAgICAgICAgICAgLyogZmxhZzogY2FjaGluZyBlbmFibGVkICovCi0gICAgdW5jaGFyICAgICAgdGFyZ2V0X2lkOyAgICAgICAgICAgICAgICAgICAgICAvKiB0YXJnZXQgSUQgb2YgZGV2aWNlICovCi0gICAgdW5jaGFyICAgICAgbHVuOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBMVU4gaWQgb2YgZGV2aWNlICovCi0gICAgdW5jaGFyICAgICAgb3JwaGFuOyAgICAgICAgICAgICAgICAgICAgICAgICAvKiBmbGFnOiBkcml2ZSBmcmFnbWVudCAqLwotICAgIHVsb25nMzIgICAgIGxhc3RfZXJyb3I7ICAgICAgICAgICAgICAgICAgICAgLyogc2Vuc2Uga2V5IG9yIGRyaXZlIHN0YXRlICovCi0gICAgdWxvbmczMiAgICAgbGFzdF9yZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAvKiByZXN1bHQgb2YgbGFzdCBjb21tYW5kICovCi0gICAgdWxvbmczMiAgICAgY2hlY2tfZXJyb3JzOyAgICAgICAgICAgICAgICAgICAvKiBlcnIuIGluIGxhc3Qgc3VyZmFjZSBjaGVjayAqLwotICAgIHVuY2hhciAgICAgIHBlcmNlbnQ7ICAgICAgICAgICAgICAgICAgICAgICAgLyogcHJvZ3Jlc3MgZm9yIHN1cmZhY2UgY2hlY2sgKi8KLSAgICB1bmNoYXIgICAgICBsYXN0X2NoZWNrOyAgICAgICAgICAgICAgICAgICAgIC8qIElPQ1RSTCBvcGVyYXRpb24gKi8KLSAgICB1bmNoYXIgICAgICByZXNbMl07Ci0gICAgdWxvbmczMiAgICAgZmxhZ3M7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBmcm9tIDEuMTkvMi4xOTogcmF3IHJlc2Vydi4qLwotICAgIHVuY2hhciAgICAgIG11bHRpX2J1czsgICAgICAgICAgICAgICAgICAgICAgLyogbXVsdGkgYnVzIGRldj8gKGZpYnJlIGNoLikgKi8KLSAgICB1bmNoYXIgICAgICBtYl9zdGF0dXM7ICAgICAgICAgICAgICAgICAgICAgIC8qIHN0YXR1czogYXZhaWxhYmxlPyAqLwotICAgIHVuY2hhciAgICAgIHJlczJbMl07Ci0gICAgdW5jaGFyICAgICAgbWJfYWx0X3N0YXR1czsgICAgICAgICAgICAgICAgICAvKiBzdGF0dXMgb24gc2Vjb25kIGJ1cyAqLwotICAgIHVuY2hhciAgICAgIG1iX2FsdF9iaWQ7ICAgICAgICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIHNlY29uZCBidXMgKi8KLSAgICB1bmNoYXIgICAgICBtYl9hbHRfdGlkOyAgICAgICAgICAgICAgICAgICAgIC8qIHRhcmdldCBpZCBvbiBzZWNvbmQgYnVzICovCi0gICAgdW5jaGFyICAgICAgcmVzMzsKLSAgICB1bmNoYXIgICAgICBmY19mbGFnOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIGZyb20gMS4yMi8yLjIyOiBpbmZvIHZhbGlkPyovCi0gICAgdW5jaGFyICAgICAgcmVzNDsKLSAgICB1c2hvcnQgICAgICBmY19mcmFtZV9zaXplOyAgICAgICAgICAgICAgICAgIC8qIGZyYW1lIHNpemUgKGJ5dGVzKSAqLworICAgIHU4ICAgICAgdmVuZG9yWzhdOyAgICAgICAgICAgICAgICAgICAgICAvKiB2ZW5kb3Igc3RyaW5nICovCisgICAgdTggICAgICBwcm9kdWN0WzE2XTsgICAgICAgICAgICAgICAgICAgIC8qIHByb2R1Y3Qgc3RyaW5nICovCisgICAgdTggICAgICByZXZpc2lvbls0XTsgICAgICAgICAgICAgICAgICAgIC8qIHJldmlzaW9uICovCisgICAgdTMyICAgICBzeV9yYXRlOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIGN1cnJlbnQgcmF0ZSBmb3Igc3luYy4gdHIuICovCisgICAgdTMyICAgICBzeV9tYXhfcmF0ZTsgICAgICAgICAgICAgICAgICAgIC8qIG1heC4gcmF0ZSBmb3Igc3luYy4gdHIuICovCisgICAgdTMyICAgICBub19sZHJpdmU7ICAgICAgICAgICAgICAgICAgICAgIC8qIGJlbG9uZ3MgdG8gdGhpcyBsb2cuIGRydi4qLworICAgIHUzMiAgICAgYmxrY250OyAgICAgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgYmxvY2tzICovCisgICAgdTE2ICAgICAgYmxrc2l6ZTsgICAgICAgICAgICAgICAgICAgICAgICAvKiBzaXplIG9mIGJsb2NrIGluIGJ5dGVzICovCisgICAgdTggICAgICBhdmFpbGFibGU7ICAgICAgICAgICAgICAgICAgICAgIC8qIGZsYWc6IGFjY2VzcyBpcyBhdmFpbGFibGUgKi8KKyAgICB1OCAgICAgIGluaXQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogbWVkaXVtIGlzIGluaXRpYWxpemVkICovCisgICAgdTggICAgICBkZXZ0eXBlOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIFNDU0kgZGV2aWNldHlwZSAqLworICAgIHU4ICAgICAgcm1fbWVkaXVtOyAgICAgICAgICAgICAgICAgICAgICAvKiBtZWRpdW0gaXMgcmVtb3ZhYmxlICovCisgICAgdTggICAgICB3cF9tZWRpdW07ICAgICAgICAgICAgICAgICAgICAgIC8qIG1lZGl1bSBpcyB3cml0ZSBwcm90ZWN0ZWQgKi8KKyAgICB1OCAgICAgIGFuc2k7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBJL0lJIG9yIElJST8gKi8KKyAgICB1OCAgICAgIHByb3RvY29sOyAgICAgICAgICAgICAgICAgICAgICAgLyogc2FtZSBhcyBhbnNpICovCisgICAgdTggICAgICBzeW5jOyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGZsYWc6IHN5bmMuIHRyYW5zZmVyIGVuYWIuICovCisgICAgdTggICAgICBkaXNjOyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGZsYWc6IGRpc2Nvbm5lY3QgZW5hYmxlZCAqLworICAgIHU4ICAgICAgcXVldWVpbmc7ICAgICAgICAgICAgICAgICAgICAgICAvKiBmbGFnOiBjb21tYW5kIHF1ZWluZyBlbmFiLiAqLworICAgIHU4ICAgICAgY2FjaGVkOyAgICAgICAgICAgICAgICAgICAgICAgICAvKiBmbGFnOiBjYWNoaW5nIGVuYWJsZWQgKi8KKyAgICB1OCAgICAgIHRhcmdldF9pZDsgICAgICAgICAgICAgICAgICAgICAgLyogdGFyZ2V0IElEIG9mIGRldmljZSAqLworICAgIHU4ICAgICAgbHVuOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBMVU4gaWQgb2YgZGV2aWNlICovCisgICAgdTggICAgICBvcnBoYW47ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGZsYWc6IGRyaXZlIGZyYWdtZW50ICovCisgICAgdTMyICAgICBsYXN0X2Vycm9yOyAgICAgICAgICAgICAgICAgICAgIC8qIHNlbnNlIGtleSBvciBkcml2ZSBzdGF0ZSAqLworICAgIHUzMiAgICAgbGFzdF9yZXN1bHQ7ICAgICAgICAgICAgICAgICAgICAvKiByZXN1bHQgb2YgbGFzdCBjb21tYW5kICovCisgICAgdTMyICAgICBjaGVja19lcnJvcnM7ICAgICAgICAgICAgICAgICAgIC8qIGVyci4gaW4gbGFzdCBzdXJmYWNlIGNoZWNrICovCisgICAgdTggICAgICBwZXJjZW50OyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHByb2dyZXNzIGZvciBzdXJmYWNlIGNoZWNrICovCisgICAgdTggICAgICBsYXN0X2NoZWNrOyAgICAgICAgICAgICAgICAgICAgIC8qIElPQ1RSTCBvcGVyYXRpb24gKi8KKyAgICB1OCAgICAgIHJlc1syXTsKKyAgICB1MzIgICAgIGZsYWdzOyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZnJvbSAxLjE5LzIuMTk6IHJhdyByZXNlcnYuKi8KKyAgICB1OCAgICAgIG11bHRpX2J1czsgICAgICAgICAgICAgICAgICAgICAgLyogbXVsdGkgYnVzIGRldj8gKGZpYnJlIGNoLikgKi8KKyAgICB1OCAgICAgIG1iX3N0YXR1czsgICAgICAgICAgICAgICAgICAgICAgLyogc3RhdHVzOiBhdmFpbGFibGU/ICovCisgICAgdTggICAgICByZXMyWzJdOworICAgIHU4ICAgICAgbWJfYWx0X3N0YXR1czsgICAgICAgICAgICAgICAgICAvKiBzdGF0dXMgb24gc2Vjb25kIGJ1cyAqLworICAgIHU4ICAgICAgbWJfYWx0X2JpZDsgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2Ygc2Vjb25kIGJ1cyAqLworICAgIHU4ICAgICAgbWJfYWx0X3RpZDsgICAgICAgICAgICAgICAgICAgICAvKiB0YXJnZXQgaWQgb24gc2Vjb25kIGJ1cyAqLworICAgIHU4ICAgICAgcmVzMzsKKyAgICB1OCAgICAgIGZjX2ZsYWc7ICAgICAgICAgICAgICAgICAgICAgICAgLyogZnJvbSAxLjIyLzIuMjI6IGluZm8gdmFsaWQ/Ki8KKyAgICB1OCAgICAgIHJlczQ7CisgICAgdTE2ICAgICAgZmNfZnJhbWVfc2l6ZTsgICAgICAgICAgICAgICAgICAvKiBmcmFtZSBzaXplIChieXRlcykgKi8KICAgICBjaGFyICAgICAgICB3d25bOF07ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHdvcmxkIHdpZGUgbmFtZSAqLwotfSBQQUNLRUQgZ2R0aF9kaXNraW5mb19zdHI7Cit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGdkdGhfZGlza2luZm9fc3RyOwogCiAvKiBnZXQgU0NTSSBjaGFubmVsIGNvdW50ICAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVsb25nMzIgICAgIGNoYW5uZWxfbm87ICAgICAgICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGNoYW5uZWwgKi8KLSAgICB1bG9uZzMyICAgICBkcml2ZV9jbnQ7ICAgICAgICAgICAgICAgICAgICAgIC8qIGRyaXZlIGNvdW50ICovCi0gICAgdW5jaGFyICAgICAgc2lvcF9pZDsgICAgICAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIHByb2Nlc3NvciBJRCAqLwotICAgIHVuY2hhciAgICAgIHNpb3Bfc3RhdGU7ICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBwcm9jZXNzb3Igc3RhdGUgKi8gCi19IFBBQ0tFRCBnZHRoX2dldGNoX3N0cjsKKyAgICB1MzIgICAgIGNoYW5uZWxfbm87ICAgICAgICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGNoYW5uZWwgKi8KKyAgICB1MzIgICAgIGRyaXZlX2NudDsgICAgICAgICAgICAgICAgICAgICAgLyogZHJpdmUgY291bnQgKi8KKyAgICB1OCAgICAgIHNpb3BfaWQ7ICAgICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBwcm9jZXNzb3IgSUQgKi8KKyAgICB1OCAgICAgIHNpb3Bfc3RhdGU7ICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBwcm9jZXNzb3Igc3RhdGUgKi8gCit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGdkdGhfZ2V0Y2hfc3RyOwogCiAvKiBnZXQgU0NTSSBkcml2ZSBudW1iZXJzICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdWxvbmczMiAgICAgc2Nfbm87ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIGNoYW5uZWwgKi8KLSAgICB1bG9uZzMyICAgICBzY19jbnQ7ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHNjX2xpc3RbXSBlbGVtZW50cyAqLwotICAgIHVsb25nMzIgICAgIHNjX2xpc3RbTUFYSURdOyAgICAgICAgICAgICAgICAgLyogbWlub3IgZGV2aWNlIG51bWJlcnMgKi8KLX0gUEFDS0VEIGdkdGhfZHJsaXN0X3N0cjsKKyAgICB1MzIgICAgIHNjX25vOyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBjaGFubmVsICovCisgICAgdTMyICAgICBzY19jbnQ7ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHNjX2xpc3RbXSBlbGVtZW50cyAqLworICAgIHUzMiAgICAgc2NfbGlzdFtNQVhJRF07ICAgICAgICAgICAgICAgICAvKiBtaW5vciBkZXZpY2UgbnVtYmVycyAqLworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRoX2RybGlzdF9zdHI7CiAKIC8qIGdldCBncm93bi9wcmltYXJ5IGRlZmVjdCBjb3VudCAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVuY2hhciAgICAgIHNkZGNfdHlwZTsgICAgICAgICAgICAgICAgICAgICAgLyogMHgwODogZ3Jvd24sIDB4MTA6IHByaW0uICovCi0gICAgdW5jaGFyICAgICAgc2RkY19mb3JtYXQ7ICAgICAgICAgICAgICAgICAgICAvKiBsaXN0IGVudHJ5IGZvcm1hdCAqLwotICAgIHVuY2hhciAgICAgIHNkZGNfbGVuOyAgICAgICAgICAgICAgICAgICAgICAgLyogbGlzdCBlbnRyeSBsZW5ndGggKi8KLSAgICB1bmNoYXIgICAgICBzZGRjX3JlczsKLSAgICB1bG9uZzMyICAgICBzZGRjX2NudDsgICAgICAgICAgICAgICAgICAgICAgIC8qIGVudHJ5IGNvdW50ICovCi19IFBBQ0tFRCBnZHRoX2RlZmNudF9zdHI7CisgICAgdTggICAgICBzZGRjX3R5cGU7ICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MDg6IGdyb3duLCAweDEwOiBwcmltLiAqLworICAgIHU4ICAgICAgc2RkY19mb3JtYXQ7ICAgICAgICAgICAgICAgICAgICAvKiBsaXN0IGVudHJ5IGZvcm1hdCAqLworICAgIHU4ICAgICAgc2RkY19sZW47ICAgICAgICAgICAgICAgICAgICAgICAvKiBsaXN0IGVudHJ5IGxlbmd0aCAqLworICAgIHU4ICAgICAgc2RkY19yZXM7CisgICAgdTMyICAgICBzZGRjX2NudDsgICAgICAgICAgICAgICAgICAgICAgIC8qIGVudHJ5IGNvdW50ICovCit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGdkdGhfZGVmY250X3N0cjsKIAogLyogZGlzayBzdGF0aXN0aWNzICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdWxvbmczMiAgICAgYmlkOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIGNoYW5uZWwgKi8KLSAgICB1bG9uZzMyICAgICBmaXJzdDsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGZpcnN0IFNDU0kgZGlzayAqLwotICAgIHVsb25nMzIgICAgIGVudHJpZXM7ICAgICAgICAgICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGVsZW1lbnRzICovCi0gICAgdWxvbmczMiAgICAgY291bnQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAoUikgbnVtYmVyIG9mIGluaXQuIGVsLiAqLwotICAgIHVsb25nMzIgICAgIG1vbl90aW1lOyAgICAgICAgICAgICAgICAgICAgICAgLyogdGltZSBzdGFtcCAqLworICAgIHUzMiAgICAgYmlkOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIGNoYW5uZWwgKi8KKyAgICB1MzIgICAgIGZpcnN0OyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZmlyc3QgU0NTSSBkaXNrICovCisgICAgdTMyICAgICBlbnRyaWVzOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBlbGVtZW50cyAqLworICAgIHUzMiAgICAgY291bnQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiAoUikgbnVtYmVyIG9mIGluaXQuIGVsLiAqLworICAgIHUzMiAgICAgbW9uX3RpbWU7ICAgICAgICAgICAgICAgICAgICAgICAvKiB0aW1lIHN0YW1wICovCiAgICAgc3RydWN0IHsKLSAgICAgICAgdW5jaGFyICB0aWQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRhcmdldCBJRCAqLwotICAgICAgICB1bmNoYXIgIGx1bjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogTFVOICovCi0gICAgICAgIHVuY2hhciAgcmVzWzJdOwotICAgICAgICB1bG9uZzMyIGJsa19zaXplOyAgICAgICAgICAgICAgICAgICAgICAgLyogYmxvY2sgc2l6ZSBpbiBieXRlcyAqLwotICAgICAgICB1bG9uZzMyIHJkX2NvdW50OyAgICAgICAgICAgICAgICAgICAgICAgLyogYnl0ZXMgcmVhZCAqLwotICAgICAgICB1bG9uZzMyIHdyX2NvdW50OyAgICAgICAgICAgICAgICAgICAgICAgLyogYnl0ZXMgd3JpdHRlbiAqLwotICAgICAgICB1bG9uZzMyIHJkX2Jsa19jb3VudDsgICAgICAgICAgICAgICAgICAgLyogYmxvY2tzIHJlYWQgKi8KLSAgICAgICAgdWxvbmczMiB3cl9ibGtfY291bnQ7ICAgICAgICAgICAgICAgICAgIC8qIGJsb2NrcyB3cml0dGVuICovCi0gICAgICAgIHVsb25nMzIgcmV0cmllczsgICAgICAgICAgICAgICAgICAgICAgICAvKiByZXRyaWVzICovCi0gICAgICAgIHVsb25nMzIgcmVhc3NpZ25zOyAgICAgICAgICAgICAgICAgICAgICAvKiByZWFzc2lnbnMgKi8KLSAgICB9IFBBQ0tFRCBsaXN0WzFdOwotfSBQQUNLRUQgZ2R0aF9kc2tzdGF0X3N0cjsKKyAgICAgICAgdTggIHRpZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogdGFyZ2V0IElEICovCisgICAgICAgIHU4ICBsdW47ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIExVTiAqLworICAgICAgICB1OCAgcmVzWzJdOworICAgICAgICB1MzIgYmxrX3NpemU7ICAgICAgICAgICAgICAgICAgICAgICAvKiBibG9jayBzaXplIGluIGJ5dGVzICovCisgICAgICAgIHUzMiByZF9jb3VudDsgICAgICAgICAgICAgICAgICAgICAgIC8qIGJ5dGVzIHJlYWQgKi8KKyAgICAgICAgdTMyIHdyX2NvdW50OyAgICAgICAgICAgICAgICAgICAgICAgLyogYnl0ZXMgd3JpdHRlbiAqLworICAgICAgICB1MzIgcmRfYmxrX2NvdW50OyAgICAgICAgICAgICAgICAgICAvKiBibG9ja3MgcmVhZCAqLworICAgICAgICB1MzIgd3JfYmxrX2NvdW50OyAgICAgICAgICAgICAgICAgICAvKiBibG9ja3Mgd3JpdHRlbiAqLworICAgICAgICB1MzIgcmV0cmllczsgICAgICAgICAgICAgICAgICAgICAgICAvKiByZXRyaWVzICovCisgICAgICAgIHUzMiByZWFzc2lnbnM7ICAgICAgICAgICAgICAgICAgICAgIC8qIHJlYXNzaWducyAqLworICAgIH0gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgbGlzdFsxXTsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9kc2tzdGF0X3N0cjsKIAogLyogSU8gY2hhbm5lbCBoZWFkZXIgKi8KIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bG9uZzMyICAgICB2ZXJzaW9uOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHZlcnNpb24gKC0xVUw6IG5ld2VzdCkgKi8KLSAgICB1bmNoYXIgICAgICBsaXN0X2VudHJpZXM7ICAgICAgICAgICAgICAgICAgIC8qIGxpc3QgZW50cnkgY291bnQgKi8KLSAgICB1bmNoYXIgICAgICBmaXJzdF9jaGFuOyAgICAgICAgICAgICAgICAgICAgIC8qIGZpcnN0IGNoYW5uZWwgbnVtYmVyICovCi0gICAgdW5jaGFyICAgICAgbGFzdF9jaGFuOyAgICAgICAgICAgICAgICAgICAgICAvKiBsYXN0IGNoYW5uZWwgbnVtYmVyICovCi0gICAgdW5jaGFyICAgICAgY2hhbl9jb3VudDsgICAgICAgICAgICAgICAgICAgICAvKiAoUikgY2hhbm5lbCBjb3VudCAqLwotICAgIHVsb25nMzIgICAgIGxpc3Rfb2Zmc2V0OyAgICAgICAgICAgICAgICAgICAgLyogb2Zmc2V0IG9mIGxpc3RbMF0gKi8KLX0gUEFDS0VEIGdkdGhfaW9jaGFuX2hlYWRlcjsKKyAgICB1MzIgICAgIHZlcnNpb247ICAgICAgICAgICAgICAgICAgICAgICAgLyogdmVyc2lvbiAoLTFVTDogbmV3ZXN0KSAqLworICAgIHU4ICAgICAgbGlzdF9lbnRyaWVzOyAgICAgICAgICAgICAgICAgICAvKiBsaXN0IGVudHJ5IGNvdW50ICovCisgICAgdTggICAgICBmaXJzdF9jaGFuOyAgICAgICAgICAgICAgICAgICAgIC8qIGZpcnN0IGNoYW5uZWwgbnVtYmVyICovCisgICAgdTggICAgICBsYXN0X2NoYW47ICAgICAgICAgICAgICAgICAgICAgIC8qIGxhc3QgY2hhbm5lbCBudW1iZXIgKi8KKyAgICB1OCAgICAgIGNoYW5fY291bnQ7ICAgICAgICAgICAgICAgICAgICAgLyogKFIpIGNoYW5uZWwgY291bnQgKi8KKyAgICB1MzIgICAgIGxpc3Rfb2Zmc2V0OyAgICAgICAgICAgICAgICAgICAgLyogb2Zmc2V0IG9mIGxpc3RbMF0gKi8KK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9pb2NoYW5faGVhZGVyOwogCiAvKiBnZXQgSU8gY2hhbm5lbCBkZXNjcmlwdGlvbiAqLwogdHlwZWRlZiBzdHJ1Y3QgewogICAgIGdkdGhfaW9jaGFuX2hlYWRlciAgaGRyOwogICAgIHN0cnVjdCB7Ci0gICAgICAgIHVsb25nMzIgICAgICAgICBhZGRyZXNzOyAgICAgICAgICAgICAgICAvKiBjaGFubmVsIGFkZHJlc3MgKi8KLSAgICAgICAgdW5jaGFyICAgICAgICAgIHR5cGU7ICAgICAgICAgICAgICAgICAgIC8qIHR5cGUgKFNDU0ksIEZDQUwpICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBsb2NhbF9ubzsgICAgICAgICAgICAgICAvKiBsb2NhbCBudW1iZXIgKi8KLSAgICAgICAgdXNob3J0ICAgICAgICAgIGZlYXR1cmVzOyAgICAgICAgICAgICAgIC8qIGNoYW5uZWwgZmVhdHVyZXMgKi8KLSAgICB9IFBBQ0tFRCBsaXN0W01BWEJVU107Ci19IFBBQ0tFRCBnZHRoX2lvY2hhbl9zdHI7CisgICAgICAgIHUzMiAgICAgICAgIGFkZHJlc3M7ICAgICAgICAgICAgICAgIC8qIGNoYW5uZWwgYWRkcmVzcyAqLworICAgICAgICB1OCAgICAgICAgICB0eXBlOyAgICAgICAgICAgICAgICAgICAvKiB0eXBlIChTQ1NJLCBGQ0FMKSAqLworICAgICAgICB1OCAgICAgICAgICBsb2NhbF9ubzsgICAgICAgICAgICAgICAvKiBsb2NhbCBudW1iZXIgKi8KKyAgICAgICAgdTE2ICAgICAgICAgIGZlYXR1cmVzOyAgICAgICAgICAgICAgIC8qIGNoYW5uZWwgZmVhdHVyZXMgKi8KKyAgICB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGxpc3RbTUFYQlVTXTsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9pb2NoYW5fc3RyOwogCiAvKiBnZXQgcmF3IElPIGNoYW5uZWwgZGVzY3JpcHRpb24gKi8KIHR5cGVkZWYgc3RydWN0IHsKICAgICBnZHRoX2lvY2hhbl9oZWFkZXIgIGhkcjsKICAgICBzdHJ1Y3QgewotICAgICAgICB1bmNoYXIgICAgICBwcm9jX2lkOyAgICAgICAgICAgICAgICAgICAgLyogcHJvY2Vzc29yIGlkICovCi0gICAgICAgIHVuY2hhciAgICAgIHByb2NfZGVmZWN0OyAgICAgICAgICAgICAgICAvKiBkZWZlY3QgPyAqLwotICAgICAgICB1bmNoYXIgICAgICByZXNlcnZlZFsyXTsKLSAgICB9IFBBQ0tFRCBsaXN0W01BWEJVU107Ci19IFBBQ0tFRCBnZHRoX3Jhd19pb2NoYW5fc3RyOworICAgICAgICB1OCAgICAgIHByb2NfaWQ7ICAgICAgICAgICAgICAgICAgICAvKiBwcm9jZXNzb3IgaWQgKi8KKyAgICAgICAgdTggICAgICBwcm9jX2RlZmVjdDsgICAgICAgICAgICAgICAgLyogZGVmZWN0ID8gKi8KKyAgICAgICAgdTggICAgICByZXNlcnZlZFsyXTsKKyAgICB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGxpc3RbTUFYQlVTXTsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9yYXdfaW9jaGFuX3N0cjsKIAogLyogYXJyYXkgZHJpdmUgY29tcG9uZW50ICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdWxvbmczMiAgICAgYWxfY29udHJvbGxlcjsgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIElEICovCi0gICAgdW5jaGFyICAgICAgYWxfY2FjaGVfZHJpdmU7ICAgICAgICAgICAgICAgICAvKiBjYWNoZSBkcml2ZSBudW1iZXIgKi8KLSAgICB1bmNoYXIgICAgICBhbF9zdGF0dXM7ICAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIGRyaXZlIHN0YXRlICovCi0gICAgdW5jaGFyICAgICAgYWxfcmVzWzJdOyAgICAgCi19IFBBQ0tFRCBnZHRoX2FycmF5Y29tcF9zdHI7CisgICAgdTMyICAgICBhbF9jb250cm9sbGVyOyAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgSUQgKi8KKyAgICB1OCAgICAgIGFsX2NhY2hlX2RyaXZlOyAgICAgICAgICAgICAgICAgLyogY2FjaGUgZHJpdmUgbnVtYmVyICovCisgICAgdTggICAgICBhbF9zdGF0dXM7ICAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIGRyaXZlIHN0YXRlICovCisgICAgdTggICAgICBhbF9yZXNbMl07ICAgICAKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9hcnJheWNvbXBfc3RyOwogCiAvKiBhcnJheSBkcml2ZSBpbmZvcm1hdGlvbiAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVuY2hhciAgICAgIGFpX3R5cGU7ICAgICAgICAgICAgICAgICAgICAgICAgLyogYXJyYXkgdHlwZSAoUkFJRDAsNCw1KSAqLwotICAgIHVuY2hhciAgICAgIGFpX2NhY2hlX2RyaXZlX2NudDsgICAgICAgICAgICAgLyogYWN0aXZlIGNhY2hlZHJpdmVzICovCi0gICAgdW5jaGFyICAgICAgYWlfc3RhdGU7ICAgICAgICAgICAgICAgICAgICAgICAvKiBhcnJheSBkcml2ZSBzdGF0ZSAqLwotICAgIHVuY2hhciAgICAgIGFpX21hc3Rlcl9jZDsgICAgICAgICAgICAgICAgICAgLyogbWFzdGVyIGNhY2hlZHJpdmUgKi8KLSAgICB1bG9uZzMyICAgICBhaV9tYXN0ZXJfY29udHJvbGxlcjsgICAgICAgICAgIC8qIElEIG9mIG1hc3RlciBjb250cm9sbGVyICovCi0gICAgdWxvbmczMiAgICAgYWlfc2l6ZTsgICAgICAgICAgICAgICAgICAgICAgICAvKiB1c2VyIGNhcGFjaXR5IFtzZWN0b3JzXSAqLwotICAgIHVsb25nMzIgICAgIGFpX3N0cmlwaW5nX3NpemU7ICAgICAgICAgICAgICAgLyogc3RyaXBpbmcgc2l6ZSBbc2VjdG9yc10gKi8KLSAgICB1bG9uZzMyICAgICBhaV9zZWNzaXplOyAgICAgICAgICAgICAgICAgICAgIC8qIHNlY3RvciBzaXplIFtieXRlc10gKi8KLSAgICB1bG9uZzMyICAgICBhaV9lcnJfaW5mbzsgICAgICAgICAgICAgICAgICAgIC8qIGZhaWxlZCBjYWNoZSBkcml2ZSAqLwotICAgIHVuY2hhciAgICAgIGFpX25hbWVbOF07ICAgICAgICAgICAgICAgICAgICAgLyogbmFtZSBvZiB0aGUgYXJyYXkgZHJpdmUgKi8KLSAgICB1bmNoYXIgICAgICBhaV9jb250cm9sbGVyX2NudDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBjb250cm9sbGVycyAqLwotICAgIHVuY2hhciAgICAgIGFpX3JlbW92YWJsZTsgICAgICAgICAgICAgICAgICAgLyogZmxhZzogcmVtb3ZhYmxlICovCi0gICAgdW5jaGFyICAgICAgYWlfd3JpdGVfcHJvdGVjdGVkOyAgICAgICAgICAgICAvKiBmbGFnOiB3cml0ZSBwcm90ZWN0ZWQgKi8KLSAgICB1bmNoYXIgICAgICBhaV9kZXZ0eXBlOyAgICAgICAgICAgICAgICAgICAgIC8qIHR5cGU6IGFsd2F5cyBkaXJlY3QgYWNjZXNzICovCisgICAgdTggICAgICBhaV90eXBlOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIGFycmF5IHR5cGUgKFJBSUQwLDQsNSkgKi8KKyAgICB1OCAgICAgIGFpX2NhY2hlX2RyaXZlX2NudDsgICAgICAgICAgICAgLyogYWN0aXZlIGNhY2hlZHJpdmVzICovCisgICAgdTggICAgICBhaV9zdGF0ZTsgICAgICAgICAgICAgICAgICAgICAgIC8qIGFycmF5IGRyaXZlIHN0YXRlICovCisgICAgdTggICAgICBhaV9tYXN0ZXJfY2Q7ICAgICAgICAgICAgICAgICAgIC8qIG1hc3RlciBjYWNoZWRyaXZlICovCisgICAgdTMyICAgICBhaV9tYXN0ZXJfY29udHJvbGxlcjsgICAgICAgICAgIC8qIElEIG9mIG1hc3RlciBjb250cm9sbGVyICovCisgICAgdTMyICAgICBhaV9zaXplOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIHVzZXIgY2FwYWNpdHkgW3NlY3RvcnNdICovCisgICAgdTMyICAgICBhaV9zdHJpcGluZ19zaXplOyAgICAgICAgICAgICAgIC8qIHN0cmlwaW5nIHNpemUgW3NlY3RvcnNdICovCisgICAgdTMyICAgICBhaV9zZWNzaXplOyAgICAgICAgICAgICAgICAgICAgIC8qIHNlY3RvciBzaXplIFtieXRlc10gKi8KKyAgICB1MzIgICAgIGFpX2Vycl9pbmZvOyAgICAgICAgICAgICAgICAgICAgLyogZmFpbGVkIGNhY2hlIGRyaXZlICovCisgICAgdTggICAgICBhaV9uYW1lWzhdOyAgICAgICAgICAgICAgICAgICAgIC8qIG5hbWUgb2YgdGhlIGFycmF5IGRyaXZlICovCisgICAgdTggICAgICBhaV9jb250cm9sbGVyX2NudDsgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBjb250cm9sbGVycyAqLworICAgIHU4ICAgICAgYWlfcmVtb3ZhYmxlOyAgICAgICAgICAgICAgICAgICAvKiBmbGFnOiByZW1vdmFibGUgKi8KKyAgICB1OCAgICAgIGFpX3dyaXRlX3Byb3RlY3RlZDsgICAgICAgICAgICAgLyogZmxhZzogd3JpdGUgcHJvdGVjdGVkICovCisgICAgdTggICAgICBhaV9kZXZ0eXBlOyAgICAgICAgICAgICAgICAgICAgIC8qIHR5cGU6IGFsd2F5cyBkaXJlY3QgYWNjZXNzICovCiAgICAgZ2R0aF9hcnJheWNvbXBfc3RyICBhaV9kcml2ZXNbMzVdOyAgICAgICAgICAvKiBkcml2ZSBjb21wb25lbnRzOiAqLwotICAgIHVuY2hhciAgICAgIGFpX2RyaXZlX2VudHJpZXM7ICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGRyaXZlIGNvbXBvbmVudHMgKi8KLSAgICB1bmNoYXIgICAgICBhaV9wcm90ZWN0ZWQ7ICAgICAgICAgICAgICAgICAgIC8qIHByb3RlY3Rpb24gZmxhZyAqLwotICAgIHVuY2hhciAgICAgIGFpX3ZlcmlmeV9zdGF0ZTsgICAgICAgICAgICAgICAgLyogc3RhdGUgb2YgYSBwYXJpdHkgdmVyaWZ5ICovCi0gICAgdW5jaGFyICAgICAgYWlfZXh0X3N0YXRlOyAgICAgICAgICAgICAgICAgICAvKiBleHRlbmRlZCBhcnJheSBkcml2ZSBzdGF0ZSAqLwotICAgIHVuY2hhciAgICAgIGFpX2V4cGFuZF9zdGF0ZTsgICAgICAgICAgICAgICAgLyogYXJyYXkgZXhwYW5kIHN0YXRlICg+PTIuMTgpKi8KLSAgICB1bmNoYXIgICAgICBhaV9yZXNlcnZlZFszXTsKLX0gUEFDS0VEIGdkdGhfYXJyYXlpbmZfc3RyOworICAgIHU4ICAgICAgYWlfZHJpdmVfZW50cmllczsgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgZHJpdmUgY29tcG9uZW50cyAqLworICAgIHU4ICAgICAgYWlfcHJvdGVjdGVkOyAgICAgICAgICAgICAgICAgICAvKiBwcm90ZWN0aW9uIGZsYWcgKi8KKyAgICB1OCAgICAgIGFpX3ZlcmlmeV9zdGF0ZTsgICAgICAgICAgICAgICAgLyogc3RhdGUgb2YgYSBwYXJpdHkgdmVyaWZ5ICovCisgICAgdTggICAgICBhaV9leHRfc3RhdGU7ICAgICAgICAgICAgICAgICAgIC8qIGV4dGVuZGVkIGFycmF5IGRyaXZlIHN0YXRlICovCisgICAgdTggICAgICBhaV9leHBhbmRfc3RhdGU7ICAgICAgICAgICAgICAgIC8qIGFycmF5IGV4cGFuZCBzdGF0ZSAoPj0yLjE4KSovCisgICAgdTggICAgICBhaV9yZXNlcnZlZFszXTsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9hcnJheWluZl9zdHI7CiAKIC8qIGdldCBhcnJheSBkcml2ZSBsaXN0ICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdWxvbmczMiAgICAgY29udHJvbGxlcl9ubzsgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG5vLiAqLwotICAgIHVuY2hhciAgICAgIGNkX2hhbmRsZTsgICAgICAgICAgICAgICAgICAgICAgLyogbWFzdGVyIGNhY2hlZHJpdmUgKi8KLSAgICB1bmNoYXIgICAgICBpc19hcnJheWQ7ICAgICAgICAgICAgICAgICAgICAgIC8qIEZsYWc6IGlzIGFycmF5IGRyaXZlPyAqLwotICAgIHVuY2hhciAgICAgIGlzX21hc3RlcjsgICAgICAgICAgICAgICAgICAgICAgLyogRmxhZzogaXMgYXJyYXkgbWFzdGVyPyAqLwotICAgIHVuY2hhciAgICAgIGlzX3Bhcml0eTsgICAgICAgICAgICAgICAgICAgICAgLyogRmxhZzogaXMgcGFyaXR5IGRyaXZlPyAqLwotICAgIHVuY2hhciAgICAgIGlzX2hvdGZpeDsgICAgICAgICAgICAgICAgICAgICAgLyogRmxhZzogaXMgaG90Zml4IGRyaXZlPyAqLwotICAgIHVuY2hhciAgICAgIHJlc1szXTsKLX0gUEFDS0VEIGdkdGhfYWxpc3Rfc3RyOworICAgIHUzMiAgICAgY29udHJvbGxlcl9ubzsgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG5vLiAqLworICAgIHU4ICAgICAgY2RfaGFuZGxlOyAgICAgICAgICAgICAgICAgICAgICAvKiBtYXN0ZXIgY2FjaGVkcml2ZSAqLworICAgIHU4ICAgICAgaXNfYXJyYXlkOyAgICAgICAgICAgICAgICAgICAgICAvKiBGbGFnOiBpcyBhcnJheSBkcml2ZT8gKi8KKyAgICB1OCAgICAgIGlzX21hc3RlcjsgICAgICAgICAgICAgICAgICAgICAgLyogRmxhZzogaXMgYXJyYXkgbWFzdGVyPyAqLworICAgIHU4ICAgICAgaXNfcGFyaXR5OyAgICAgICAgICAgICAgICAgICAgICAvKiBGbGFnOiBpcyBwYXJpdHkgZHJpdmU/ICovCisgICAgdTggICAgICBpc19ob3RmaXg7ICAgICAgICAgICAgICAgICAgICAgIC8qIEZsYWc6IGlzIGhvdGZpeCBkcml2ZT8gKi8KKyAgICB1OCAgICAgIHJlc1szXTsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9hbGlzdF9zdHI7CiAKIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bG9uZzMyICAgICBlbnRyaWVzX2F2YWlsOyAgICAgICAgICAgICAgICAgIC8qIGFsbG9jYXRlZCBlbnRyaWVzICovCi0gICAgdWxvbmczMiAgICAgZW50cmllc19pbml0OyAgICAgICAgICAgICAgICAgICAvKiByZXR1cm5lZCBlbnRyaWVzICovCi0gICAgdWxvbmczMiAgICAgZmlyc3RfZW50cnk7ICAgICAgICAgICAgICAgICAgICAvKiBmaXJzdCBlbnRyeSBudW1iZXIgKi8KLSAgICB1bG9uZzMyICAgICBsaXN0X29mZnNldDsgICAgICAgICAgICAgICAgICAgIC8qIG9mZnNldCBvZiBmb2xsb3dpbmcgbGlzdCAqLworICAgIHUzMiAgICAgZW50cmllc19hdmFpbDsgICAgICAgICAgICAgICAgICAvKiBhbGxvY2F0ZWQgZW50cmllcyAqLworICAgIHUzMiAgICAgZW50cmllc19pbml0OyAgICAgICAgICAgICAgICAgICAvKiByZXR1cm5lZCBlbnRyaWVzICovCisgICAgdTMyICAgICBmaXJzdF9lbnRyeTsgICAgICAgICAgICAgICAgICAgIC8qIGZpcnN0IGVudHJ5IG51bWJlciAqLworICAgIHUzMiAgICAgbGlzdF9vZmZzZXQ7ICAgICAgICAgICAgICAgICAgICAvKiBvZmZzZXQgb2YgZm9sbG93aW5nIGxpc3QgKi8KICAgICBnZHRoX2FsaXN0X3N0ciBsaXN0WzFdOyAgICAgICAgICAgICAgICAgICAgIC8qIGxpc3QgKi8KLX0gUEFDS0VEIGdkdGhfYXJjZGxfc3RyOworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRoX2FyY2RsX3N0cjsKIAogLyogY2FjaGUgaW5mby9jb25maWcgSU9DVEwgKi8KIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bG9uZzMyICAgICB2ZXJzaW9uOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIGZpcm13YXJlIHZlcnNpb24gKi8KLSAgICB1c2hvcnQgICAgICBzdGF0ZTsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIHN0YXRlIChvbi9vZmYpICovCi0gICAgdXNob3J0ICAgICAgc3RyYXRlZ3k7ICAgICAgICAgICAgICAgICAgICAgICAvKiBjYWNoZSBzdHJhdGVneSAqLwotICAgIHVzaG9ydCAgICAgIHdyaXRlX2JhY2s7ICAgICAgICAgICAgICAgICAgICAgLyogd3JpdGUgYmFjayBzdGF0ZSAob24vb2ZmKSAqLwotICAgIHVzaG9ydCAgICAgIGJsb2NrX3NpemU7ICAgICAgICAgICAgICAgICAgICAgLyogY2FjaGUgYmxvY2sgc2l6ZSAqLwotfSBQQUNLRUQgZ2R0aF9jcGFyX3N0cjsKKyAgICB1MzIgICAgIHZlcnNpb247ICAgICAgICAgICAgICAgICAgICAgICAgLyogZmlybXdhcmUgdmVyc2lvbiAqLworICAgIHUxNiAgICAgIHN0YXRlOyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogY2FjaGUgc3RhdGUgKG9uL29mZikgKi8KKyAgICB1MTYgICAgICBzdHJhdGVneTsgICAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIHN0cmF0ZWd5ICovCisgICAgdTE2ICAgICAgd3JpdGVfYmFjazsgICAgICAgICAgICAgICAgICAgICAvKiB3cml0ZSBiYWNrIHN0YXRlIChvbi9vZmYpICovCisgICAgdTE2ICAgICAgYmxvY2tfc2l6ZTsgICAgICAgICAgICAgICAgICAgICAvKiBjYWNoZSBibG9jayBzaXplICovCit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGdkdGhfY3Bhcl9zdHI7CiAKIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bG9uZzMyICAgICBjc2l6ZTsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIHNpemUgKi8KLSAgICB1bG9uZzMyICAgICByZWFkX2NudDsgICAgICAgICAgICAgICAgICAgICAgIC8qIHJlYWQvd3JpdGUgY291bnRlciAqLwotICAgIHVsb25nMzIgICAgIHdyaXRlX2NudDsKLSAgICB1bG9uZzMyICAgICB0cl9oaXRzOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIGhpdHMgKi8KLSAgICB1bG9uZzMyICAgICBzZWNfaGl0czsKLSAgICB1bG9uZzMyICAgICBzZWNfbWlzczsgICAgICAgICAgICAgICAgICAgICAgIC8qIG1pc3NlcyAqLwotfSBQQUNLRUQgZ2R0aF9jc3RhdF9zdHI7CisgICAgdTMyICAgICBjc2l6ZTsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIHNpemUgKi8KKyAgICB1MzIgICAgIHJlYWRfY250OyAgICAgICAgICAgICAgICAgICAgICAgLyogcmVhZC93cml0ZSBjb3VudGVyICovCisgICAgdTMyICAgICB3cml0ZV9jbnQ7CisgICAgdTMyICAgICB0cl9oaXRzOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIGhpdHMgKi8KKyAgICB1MzIgICAgIHNlY19oaXRzOworICAgIHUzMiAgICAgc2VjX21pc3M7ICAgICAgICAgICAgICAgICAgICAgICAvKiBtaXNzZXMgKi8KK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9jc3RhdF9zdHI7CiAKIHR5cGVkZWYgc3RydWN0IHsKICAgICBnZHRoX2NwYXJfc3RyICAgY3BhcjsKICAgICBnZHRoX2NzdGF0X3N0ciAgY3N0YXQ7Ci19IFBBQ0tFRCBnZHRoX2NpbmZvX3N0cjsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9jaW5mb19zdHI7CiAKIC8qIGNhY2hlIGRyaXZlIGluZm8gKi8KIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bmNoYXIgICAgICBjZF9uYW1lWzhdOyAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIGRyaXZlIG5hbWUgKi8KLSAgICB1bG9uZzMyICAgICBjZF9kZXZ0eXBlOyAgICAgICAgICAgICAgICAgICAgIC8qIFNDU0kgZGV2aWNldHlwZSAqLwotICAgIHVsb25nMzIgICAgIGNkX2xkY250OyAgICAgICAgICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGxvZy4gZHJpdmVzICovCi0gICAgdWxvbmczMiAgICAgY2RfbGFzdF9lcnJvcjsgICAgICAgICAgICAgICAgICAvKiBsYXN0IGVycm9yICovCi0gICAgdW5jaGFyICAgICAgY2RfaW5pdGlhbGl6ZWQ7ICAgICAgICAgICAgICAgICAvKiBkcml2ZSBpcyBpbml0aWFsaXplZCAqLwotICAgIHVuY2hhciAgICAgIGNkX3JlbW92YWJsZTsgICAgICAgICAgICAgICAgICAgLyogbWVkaWEgaXMgcmVtb3ZhYmxlICovCi0gICAgdW5jaGFyICAgICAgY2Rfd3JpdGVfcHJvdGVjdGVkOyAgICAgICAgICAgICAvKiB3cml0ZSBwcm90ZWN0ZWQgKi8KLSAgICB1bmNoYXIgICAgICBjZF9mbGFnczsgICAgICAgICAgICAgICAgICAgICAgIC8qIFBvb2wgSG90IEZpeD8gKi8KLSAgICB1bG9uZzMyICAgICBsZF9ibGtjbnQ7ICAgICAgICAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBibG9ja3MgKi8KLSAgICB1bG9uZzMyICAgICBsZF9ibGtzaXplOyAgICAgICAgICAgICAgICAgICAgIC8qIGJsb2Nrc2l6ZSAqLwotICAgIHVsb25nMzIgICAgIGxkX2RjbnQ7ICAgICAgICAgICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGRpc2tzICovCi0gICAgdWxvbmczMiAgICAgbGRfc2xhdmU7ICAgICAgICAgICAgICAgICAgICAgICAvKiBsb2cuIGRyaXZlIGluZGV4ICovCi0gICAgdWxvbmczMiAgICAgbGRfZHR5cGU7ICAgICAgICAgICAgICAgICAgICAgICAvKiB0eXBlIG9mIGxvZ2ljYWwgZHJpdmUgKi8KLSAgICB1bG9uZzMyICAgICBsZF9sYXN0X2Vycm9yOyAgICAgICAgICAgICAgICAgIC8qIGxhc3QgZXJyb3IgKi8KLSAgICB1bmNoYXIgICAgICBsZF9uYW1lWzhdOyAgICAgICAgICAgICAgICAgICAgIC8qIGxvZy4gZHJpdmUgbmFtZSAqLwotICAgIHVuY2hhciAgICAgIGxkX2Vycm9yOyAgICAgICAgICAgICAgICAgICAgICAgLyogZXJyb3IgKi8KLX0gUEFDS0VEIGdkdGhfY2RyaW5mb19zdHI7CisgICAgdTggICAgICBjZF9uYW1lWzhdOyAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIGRyaXZlIG5hbWUgKi8KKyAgICB1MzIgICAgIGNkX2RldnR5cGU7ICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBkZXZpY2V0eXBlICovCisgICAgdTMyICAgICBjZF9sZGNudDsgICAgICAgICAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBsb2cuIGRyaXZlcyAqLworICAgIHUzMiAgICAgY2RfbGFzdF9lcnJvcjsgICAgICAgICAgICAgICAgICAvKiBsYXN0IGVycm9yICovCisgICAgdTggICAgICBjZF9pbml0aWFsaXplZDsgICAgICAgICAgICAgICAgIC8qIGRyaXZlIGlzIGluaXRpYWxpemVkICovCisgICAgdTggICAgICBjZF9yZW1vdmFibGU7ICAgICAgICAgICAgICAgICAgIC8qIG1lZGlhIGlzIHJlbW92YWJsZSAqLworICAgIHU4ICAgICAgY2Rfd3JpdGVfcHJvdGVjdGVkOyAgICAgICAgICAgICAvKiB3cml0ZSBwcm90ZWN0ZWQgKi8KKyAgICB1OCAgICAgIGNkX2ZsYWdzOyAgICAgICAgICAgICAgICAgICAgICAgLyogUG9vbCBIb3QgRml4PyAqLworICAgIHUzMiAgICAgbGRfYmxrY250OyAgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgYmxvY2tzICovCisgICAgdTMyICAgICBsZF9ibGtzaXplOyAgICAgICAgICAgICAgICAgICAgIC8qIGJsb2Nrc2l6ZSAqLworICAgIHUzMiAgICAgbGRfZGNudDsgICAgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgZGlza3MgKi8KKyAgICB1MzIgICAgIGxkX3NsYXZlOyAgICAgICAgICAgICAgICAgICAgICAgLyogbG9nLiBkcml2ZSBpbmRleCAqLworICAgIHUzMiAgICAgbGRfZHR5cGU7ICAgICAgICAgICAgICAgICAgICAgICAvKiB0eXBlIG9mIGxvZ2ljYWwgZHJpdmUgKi8KKyAgICB1MzIgICAgIGxkX2xhc3RfZXJyb3I7ICAgICAgICAgICAgICAgICAgLyogbGFzdCBlcnJvciAqLworICAgIHU4ICAgICAgbGRfbmFtZVs4XTsgICAgICAgICAgICAgICAgICAgICAvKiBsb2cuIGRyaXZlIG5hbWUgKi8KKyAgICB1OCAgICAgIGxkX2Vycm9yOyAgICAgICAgICAgICAgICAgICAgICAgLyogZXJyb3IgKi8KK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9jZHJpbmZvX3N0cjsKIAogLyogT0VNIHN0cmluZyAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVsb25nMzIgICAgIGN0bF92ZXJzaW9uOwotICAgIHVsb25nMzIgICAgIGZpbGVfbWFqb3JfdmVyc2lvbjsKLSAgICB1bG9uZzMyICAgICBmaWxlX21pbm9yX3ZlcnNpb247Ci0gICAgdWxvbmczMiAgICAgYnVmZmVyX3NpemU7Ci0gICAgdWxvbmczMiAgICAgY3B5X2NvdW50OwotICAgIHVsb25nMzIgICAgIGV4dF9lcnJvcjsKLSAgICB1bG9uZzMyICAgICBvZW1faWQ7Ci0gICAgdWxvbmczMiAgICAgYm9hcmRfaWQ7Ci19IFBBQ0tFRCBnZHRoX29lbV9zdHJfcGFyYW1zOworICAgIHUzMiAgICAgY3RsX3ZlcnNpb247CisgICAgdTMyICAgICBmaWxlX21ham9yX3ZlcnNpb247CisgICAgdTMyICAgICBmaWxlX21pbm9yX3ZlcnNpb247CisgICAgdTMyICAgICBidWZmZXJfc2l6ZTsKKyAgICB1MzIgICAgIGNweV9jb3VudDsKKyAgICB1MzIgICAgIGV4dF9lcnJvcjsKKyAgICB1MzIgICAgIG9lbV9pZDsKKyAgICB1MzIgICAgIGJvYXJkX2lkOworfSBfX2F0dHJpY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ICAgICAgdG9vbF9uYW1lXzNbMzJdOwotICAgIHVuY2hhciAgICAgIG9lbV9jb250YWN0XzFbODRdOwotICAgIHVuY2hhciAgICAgIG9lbV9jb250YWN0XzJbODRdOwotICAgIHVuY2hhciAgICAgIG9lbV9jb250YWN0XzNbODRdOwotfSBQQUNLRUQgZ2R0aF9vZW1fc3RyOworICAgIHU4ICAgICAgcHJvZHVjdF8wXzFfbmFtZVsxNl07CisgICAgdTggICAgICBwcm9kdWN0XzRfNV9uYW1lWzE2XTsKKyAgICB1OCAgICAgIHByb2R1Y3RfY2x1c3Rlcl9uYW1lWzE2XTsKKyAgICB1OCAgICAgIHByb2R1Y3RfcmVzZXJ2ZWRbMTZdOworICAgIHU4ICAgICAgc2NzaV9jbHVzdGVyX3RhcmdldF92ZW5kb3JfaWRbMTZdOworICAgIHU4ICAgICAgY2x1c3Rlcl9yYWlkX2Z3X25hbWVbMTZdOworICAgIHU4ICAgICAgb2VtX2JyYW5kX25hbWVbMTZdOworICAgIHU4ICAgICAgb2VtX3JhaWRfdHlwZVsxNl07CisgICAgdTggICAgICBiaW9zX3R5cGVbMTNdOworICAgIHU4ICAgICAgYmlvc190aXRsZVs1MF07CisgICAgdTggICAgICBvZW1fY29tcGFueV9uYW1lWzM3XTsKKyAgICB1MzIgICAgIHBjaV9pZF8xOworICAgIHUzMiAgICAgcGNpX2lkXzI7CisgICAgdTggICAgICB2YWxpZGF0aW9uX3N0YXR1c1s4MF07CisgICAgdTggICAgICByZXNlcnZlZF8xWzRdOworICAgIHU4ICAgICAgc2NzaV9ob3N0X2RyaXZlX2lucXVpcnlfdmVuZG9yX2lkWzE2XTsKKyAgICB1OCAgICAgIGxpYnJhcnlfZmlsZV90ZW1wbGF0ZVsxNl07CisgICAgdTggICAgICByZXNlcnZlZF8yWzE2XTsKKyAgICB1OCAgICAgIHRvb2xfbmFtZV8xWzMyXTsKKyAgICB1OCAgICAgIHRvb2xfbmFtZV8yWzMyXTsKKyAgICB1OCAgICAgIHRvb2xfbmFtZV8zWzMyXTsKKyAgICB1OCAgICAgIG9lbV9jb250YWN0XzFbODRdOworICAgIHU4ICAgICAgb2VtX2NvbnRhY3RfMls4NF07CisgICAgdTggICAgICBvZW1fY29udGFjdF8zWzg0XTsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9vZW1fc3RyOwogCiB0eXBlZGVmIHN0cnVjdCB7CiAgICAgZ2R0aF9vZW1fc3RyX3BhcmFtcyBwYXJhbXM7CiAgICAgZ2R0aF9vZW1fc3RyICAgICAgICB0ZXh0OwotfSBQQUNLRUQgZ2R0aF9vZW1fc3RyX2lvY3RsOworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRoX29lbV9zdHJfaW9jdGw7CiAKIC8qIGJvYXJkIGZlYXR1cmVzICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdW5jaGFyICAgICAgY2hhaW5pbmc7ICAgICAgICAgICAgICAgICAgICAgICAvKiBDaGFpbmluZyBzdXBwb3J0ZWQgKi8KLSAgICB1bmNoYXIgICAgICBzdHJpcGluZzsgICAgICAgICAgICAgICAgICAgICAgIC8qIFN0cmlwaW5nIChSQUlELTApIHN1cHAuICovCi0gICAgdW5jaGFyICAgICAgbWlycm9yaW5nOyAgICAgICAgICAgICAgICAgICAgICAvKiBNaXJyb3JpbmcgKFJBSUQtMSkgc3VwcC4gKi8KLSAgICB1bmNoYXIgICAgICByYWlkOyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIFJBSUQtNC81LzEwIHN1cHBvcnRlZCAqLwotfSBQQUNLRUQgZ2R0aF9iZmVhdF9zdHI7CisgICAgdTggICAgICBjaGFpbmluZzsgICAgICAgICAgICAgICAgICAgICAgIC8qIENoYWluaW5nIHN1cHBvcnRlZCAqLworICAgIHU4ICAgICAgc3RyaXBpbmc7ICAgICAgICAgICAgICAgICAgICAgICAvKiBTdHJpcGluZyAoUkFJRC0wKSBzdXBwLiAqLworICAgIHU4ICAgICAgbWlycm9yaW5nOyAgICAgICAgICAgICAgICAgICAgICAvKiBNaXJyb3JpbmcgKFJBSUQtMSkgc3VwcC4gKi8KKyAgICB1OCAgICAgIHJhaWQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogUkFJRC00LzUvMTAgc3VwcG9ydGVkICovCit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGdkdGhfYmZlYXRfc3RyOwogCiAvKiBib2FyZCBpbmZvIElPQ1RMICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdWxvbmczMiAgICAgc2VyX25vOyAgICAgICAgICAgICAgICAgICAgICAgICAvKiBzZXJpYWwgbm8uICovCi0gICAgdW5jaGFyICAgICAgb2VtX2lkWzJdOyAgICAgICAgICAgICAgICAgICAgICAvKiBPRU0gSUQgKi8KLSAgICB1c2hvcnQgICAgICBlcF9mbGFnczsgICAgICAgICAgICAgICAgICAgICAgIC8qIGVwcm9tIGZsYWdzICovCi0gICAgdWxvbmczMiAgICAgcHJvY19pZDsgICAgICAgICAgICAgICAgICAgICAgICAvKiBwcm9jZXNzb3IgSUQgKi8KLSAgICB1bG9uZzMyICAgICBtZW1zaXplOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIG1lbW9yeSBzaXplIChieXRlcykgKi8KLSAgICB1bmNoYXIgICAgICBtZW1fYmFua3M7ICAgICAgICAgICAgICAgICAgICAgIC8qIG1lbW9yeSBiYW5rcyAqLwotICAgIHVuY2hhciAgICAgIGNoYW5fdHlwZTsgICAgICAgICAgICAgICAgICAgICAgLyogY2hhbm5lbCB0eXBlICovCi0gICAgdW5jaGFyICAgICAgY2hhbl9jb3VudDsgICAgICAgICAgICAgICAgICAgICAvKiBjaGFubmVsIGNvdW50ICovCi0gICAgdW5jaGFyICAgICAgcmRvbmdsZV9wcmVzOyAgICAgICAgICAgICAgICAgICAvKiBkb25nbGUgcHJlc2VudD8gKi8KLSAgICB1bG9uZzMyICAgICBlcHJfZndfdmVyOyAgICAgICAgICAgICAgICAgICAgIC8qIChlcHJvbSkgZmlybXdhcmUgdmVyc2lvbiAqLwotICAgIHVsb25nMzIgICAgIHVwZF9md192ZXI7ICAgICAgICAgICAgICAgICAgICAgLyogKHVwZGF0ZSkgZmlybXdhcmUgdmVyc2lvbiAqLwotICAgIHVsb25nMzIgICAgIHVwZF9yZXZpc2lvbjsgICAgICAgICAgICAgICAgICAgLyogdXBkYXRlIHJldmlzaW9uICovCisgICAgdTMyICAgICBzZXJfbm87ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHNlcmlhbCBuby4gKi8KKyAgICB1OCAgICAgIG9lbV9pZFsyXTsgICAgICAgICAgICAgICAgICAgICAgLyogT0VNIElEICovCisgICAgdTE2ICAgICAgZXBfZmxhZ3M7ICAgICAgICAgICAgICAgICAgICAgICAvKiBlcHJvbSBmbGFncyAqLworICAgIHUzMiAgICAgcHJvY19pZDsgICAgICAgICAgICAgICAgICAgICAgICAvKiBwcm9jZXNzb3IgSUQgKi8KKyAgICB1MzIgICAgIG1lbXNpemU7ICAgICAgICAgICAgICAgICAgICAgICAgLyogbWVtb3J5IHNpemUgKGJ5dGVzKSAqLworICAgIHU4ICAgICAgbWVtX2JhbmtzOyAgICAgICAgICAgICAgICAgICAgICAvKiBtZW1vcnkgYmFua3MgKi8KKyAgICB1OCAgICAgIGNoYW5fdHlwZTsgICAgICAgICAgICAgICAgICAgICAgLyogY2hhbm5lbCB0eXBlICovCisgICAgdTggICAgICBjaGFuX2NvdW50OyAgICAgICAgICAgICAgICAgICAgIC8qIGNoYW5uZWwgY291bnQgKi8KKyAgICB1OCAgICAgIHJkb25nbGVfcHJlczsgICAgICAgICAgICAgICAgICAgLyogZG9uZ2xlIHByZXNlbnQ/ICovCisgICAgdTMyICAgICBlcHJfZndfdmVyOyAgICAgICAgICAgICAgICAgICAgIC8qIChlcHJvbSkgZmlybXdhcmUgdmVyc2lvbiAqLworICAgIHUzMiAgICAgdXBkX2Z3X3ZlcjsgICAgICAgICAgICAgICAgICAgICAvKiAodXBkYXRlKSBmaXJtd2FyZSB2ZXJzaW9uICovCisgICAgdTMyICAgICB1cGRfcmV2aXNpb247ICAgICAgICAgICAgICAgICAgIC8qIHVwZGF0ZSByZXZpc2lvbiAqLwogICAgIGNoYXIgICAgICAgIHR5cGVfc3RyaW5nWzE2XTsgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBuYW1lICovCiAgICAgY2hhciAgICAgICAgcmFpZF9zdHJpbmdbMTZdOyAgICAgICAgICAgICAgICAvKiBSQUlEIGZpcm13YXJlIG5hbWUgKi8KLSAgICB1bmNoYXIgICAgICB1cGRhdGVfcHJlczsgICAgICAgICAgICAgICAgICAgIC8qIHVwZGF0ZSBwcmVzZW50PyAqLwotICAgIHVuY2hhciAgICAgIHhvcl9wcmVzOyAgICAgICAgICAgICAgICAgICAgICAgLyogWE9SIGVuZ2luZSBwcmVzZW50PyAqLwotICAgIHVuY2hhciAgICAgIHByb21fdHlwZTsgICAgICAgICAgICAgICAgICAgICAgLyogUk9NIHR5cGUgKGVwcm9tL2ZsYXNoKSAqLwotICAgIHVuY2hhciAgICAgIHByb21fY291bnQ7ICAgICAgICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIFJPTSBkZXZpY2VzICovCi0gICAgdWxvbmczMiAgICAgZHVwX3ByZXM7ICAgICAgICAgICAgICAgICAgICAgICAvKiBkdXBsZXhpbmcgbW9kdWxlIHByZXNlbnQ/ICovCi0gICAgdWxvbmczMiAgICAgY2hhbl9wcmVzOyAgICAgICAgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgZXhwYW5zaW9uIGNobi4gKi8KLSAgICB1bG9uZzMyICAgICBtZW1fcHJlczsgICAgICAgICAgICAgICAgICAgICAgIC8qIG1lbW9yeSBleHBhbnNpb24gaW5zdC4gPyAqLwotICAgIHVuY2hhciAgICAgIGZ0X2J1c19zeXN0ZW07ICAgICAgICAgICAgICAgICAgLyogZmF1bHQgYnVzIHN1cHBvcnRlZD8gKi8KLSAgICB1bmNoYXIgICAgICBzdWJ0eXBlX3ZhbGlkOyAgICAgICAgICAgICAgICAgIC8qIGJvYXJkX3N1YnR5cGUgdmFsaWQ/ICovCi0gICAgdW5jaGFyICAgICAgYm9hcmRfc3VidHlwZTsgICAgICAgICAgICAgICAgICAvKiBzdWJ0eXBlL2hhcmR3YXJlIGxldmVsICovCi0gICAgdW5jaGFyICAgICAgcmFtcGFyaXR5X3ByZXM7ICAgICAgICAgICAgICAgICAvKiBSQU0gcGFyaXR5IGNoZWNrIGhhcmR3YXJlPyAqLwotfSBQQUNLRUQgZ2R0aF9iaW5mb19zdHI7IAorICAgIHU4ICAgICAgdXBkYXRlX3ByZXM7ICAgICAgICAgICAgICAgICAgICAvKiB1cGRhdGUgcHJlc2VudD8gKi8KKyAgICB1OCAgICAgIHhvcl9wcmVzOyAgICAgICAgICAgICAgICAgICAgICAgLyogWE9SIGVuZ2luZSBwcmVzZW50PyAqLworICAgIHU4ICAgICAgcHJvbV90eXBlOyAgICAgICAgICAgICAgICAgICAgICAvKiBST00gdHlwZSAoZXByb20vZmxhc2gpICovCisgICAgdTggICAgICBwcm9tX2NvdW50OyAgICAgICAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBST00gZGV2aWNlcyAqLworICAgIHUzMiAgICAgZHVwX3ByZXM7ICAgICAgICAgICAgICAgICAgICAgICAvKiBkdXBsZXhpbmcgbW9kdWxlIHByZXNlbnQ/ICovCisgICAgdTMyICAgICBjaGFuX3ByZXM7ICAgICAgICAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBleHBhbnNpb24gY2huLiAqLworICAgIHUzMiAgICAgbWVtX3ByZXM7ICAgICAgICAgICAgICAgICAgICAgICAvKiBtZW1vcnkgZXhwYW5zaW9uIGluc3QuID8gKi8KKyAgICB1OCAgICAgIGZ0X2J1c19zeXN0ZW07ICAgICAgICAgICAgICAgICAgLyogZmF1bHQgYnVzIHN1cHBvcnRlZD8gKi8KKyAgICB1OCAgICAgIHN1YnR5cGVfdmFsaWQ7ICAgICAgICAgICAgICAgICAgLyogYm9hcmRfc3VidHlwZSB2YWxpZD8gKi8KKyAgICB1OCAgICAgIGJvYXJkX3N1YnR5cGU7ICAgICAgICAgICAgICAgICAgLyogc3VidHlwZS9oYXJkd2FyZSBsZXZlbCAqLworICAgIHU4ICAgICAgcmFtcGFyaXR5X3ByZXM7ICAgICAgICAgICAgICAgICAvKiBSQU0gcGFyaXR5IGNoZWNrIGhhcmR3YXJlPyAqLworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRoX2JpbmZvX3N0cjsgCiAKIC8qIGdldCBob3N0IGRyaXZlIGluZm8gKi8KIHR5cGVkZWYgc3RydWN0IHsKICAgICBjaGFyICAgICAgICBuYW1lWzhdOyAgICAgICAgICAgICAgICAgICAgICAgIC8qIGhvc3QgZHJpdmUgbmFtZSAqLwotICAgIHVsb25nMzIgICAgIHNpemU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogc2l6ZSAoc2VjdG9ycykgKi8KLSAgICB1bmNoYXIgICAgICBob3N0X2RyaXZlOyAgICAgICAgICAgICAgICAgICAgIC8qIGhvc3QgZHJpdmUgbnVtYmVyICovCi0gICAgdW5jaGFyICAgICAgbG9nX2RyaXZlOyAgICAgICAgICAgICAgICAgICAgICAvKiBsb2cuIGRyaXZlIChtYXN0ZXIpICovCi0gICAgdW5jaGFyICAgICAgcmVzZXJ2ZWQ7Ci0gICAgdW5jaGFyICAgICAgcndfYXR0cmliczsgICAgICAgICAgICAgICAgICAgICAvKiByL3cgYXR0cmlicyAqLwotICAgIHVsb25nMzIgICAgIHN0YXJ0X3NlYzsgICAgICAgICAgICAgICAgICAgICAgLyogc3RhcnQgc2VjdG9yICovCi19IFBBQ0tFRCBnZHRoX2hlbnRyeV9zdHI7CisgICAgdTMyICAgICBzaXplOyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHNpemUgKHNlY3RvcnMpICovCisgICAgdTggICAgICBob3N0X2RyaXZlOyAgICAgICAgICAgICAgICAgICAgIC8qIGhvc3QgZHJpdmUgbnVtYmVyICovCisgICAgdTggICAgICBsb2dfZHJpdmU7ICAgICAgICAgICAgICAgICAgICAgIC8qIGxvZy4gZHJpdmUgKG1hc3RlcikgKi8KKyAgICB1OCAgICAgIHJlc2VydmVkOworICAgIHU4ICAgICAgcndfYXR0cmliczsgICAgICAgICAgICAgICAgICAgICAvKiByL3cgYXR0cmlicyAqLworICAgIHUzMiAgICAgc3RhcnRfc2VjOyAgICAgICAgICAgICAgICAgICAgICAvKiBzdGFydCBzZWN0b3IgKi8KK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9oZW50cnlfc3RyOwogCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdWxvbmczMiAgICAgZW50cmllczsgICAgICAgICAgICAgICAgICAgICAgICAvKiBlbnRyeSBjb3VudCAqLwotICAgIHVsb25nMzIgICAgIG9mZnNldDsgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2Zmc2V0IG9mIGVudHJpZXMgKi8KLSAgICB1bmNoYXIgICAgICBzZWNzX3BfaGVhZDsgICAgICAgICAgICAgICAgICAgIC8qIHNlY3RvcnMvaGVhZCAqLwotICAgIHVuY2hhciAgICAgIGhlYWRzX3BfY3lsOyAgICAgICAgICAgICAgICAgICAgLyogaGVhZHMvY3lsaW5kZXIgKi8KLSAgICB1bmNoYXIgICAgICByZXNlcnZlZDsKLSAgICB1bmNoYXIgICAgICBjbHVzdF9kcnZ0eXBlOyAgICAgICAgICAgICAgICAgIC8qIGNsdXN0ZXIgZHJpdmUgdHlwZSAqLwotICAgIHVsb25nMzIgICAgIGxvY2F0aW9uOyAgICAgICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBudW1iZXIgKi8KKyAgICB1MzIgICAgIGVudHJpZXM7ICAgICAgICAgICAgICAgICAgICAgICAgLyogZW50cnkgY291bnQgKi8KKyAgICB1MzIgICAgIG9mZnNldDsgICAgICAgICAgICAgICAgICAgICAgICAgLyogb2Zmc2V0IG9mIGVudHJpZXMgKi8KKyAgICB1OCAgICAgIHNlY3NfcF9oZWFkOyAgICAgICAgICAgICAgICAgICAgLyogc2VjdG9ycy9oZWFkICovCisgICAgdTggICAgICBoZWFkc19wX2N5bDsgICAgICAgICAgICAgICAgICAgIC8qIGhlYWRzL2N5bGluZGVyICovCisgICAgdTggICAgICByZXNlcnZlZDsKKyAgICB1OCAgICAgIGNsdXN0X2RydnR5cGU7ICAgICAgICAgICAgICAgICAgLyogY2x1c3RlciBkcml2ZSB0eXBlICovCisgICAgdTMyICAgICBsb2NhdGlvbjsgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgbnVtYmVyICovCiAgICAgZ2R0aF9oZW50cnlfc3RyIGVudHJ5W01BWF9IRFJJVkVTXTsgICAgICAgICAvKiBlbnRyaWVzICovCi19IFBBQ0tFRCBnZHRoX2hnZXRfc3RyOyAgICAKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9oZ2V0X3N0cjsgICAgCiAKIAogLyogRFBSQU0gc3RydWN0dXJlcyAqLwogCiAvKiBpbnRlcmZhY2UgYXJlYSBJU0EvUENJICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdW5jaGFyICAgICAgICAgICAgICBTX0NtZF9JbmR4OyAgICAgICAgICAgICAvKiBzcGVjaWFsIGNvbW1hbmQgKi8KLSAgICB1bmNoYXIgdm9sYXRpbGUgICAgIFNfU3RhdHVzOyAgICAgICAgICAgICAgIC8qIHN0YXR1cyBzcGVjaWFsIGNvbW1hbmQgKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIHJlc2VydmVkMTsKLSAgICB1bG9uZzMyICAgICAgICAgICAgIFNfSW5mb1s0XTsgICAgICAgICAgICAgIC8qIGFkZC4gaW5mbyBzcGVjaWFsIGNvbW1hbmQgKi8KLSAgICB1bmNoYXIgdm9sYXRpbGUgICAgIFNlbWEwOyAgICAgICAgICAgICAgICAgIC8qIGNvbW1hbmQgc2VtYXBob3JlICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICByZXNlcnZlZDJbM107Ci0gICAgdW5jaGFyICAgICAgICAgICAgICBDbWRfSW5kZXg7ICAgICAgICAgICAgICAvKiBjb21tYW5kIG51bWJlciAqLwotICAgIHVuY2hhciAgICAgICAgICAgICAgcmVzZXJ2ZWQzWzNdOwotICAgIHVzaG9ydCB2b2xhdGlsZSAgICAgU3RhdHVzOyAgICAgICAgICAgICAgICAgLyogY29tbWFuZCBzdGF0dXMgKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIFNlcnZpY2U7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UoZm9yIGFzeW5jLmV2ZW50cykgKi8KLSAgICB1bG9uZzMyICAgICAgICAgICAgIEluZm9bMl07ICAgICAgICAgICAgICAgIC8qIGFkZGl0aW9uYWwgaW5mbyAqLworICAgIHU4ICAgICAgICAgICAgICBTX0NtZF9JbmR4OyAgICAgICAgICAgICAvKiBzcGVjaWFsIGNvbW1hbmQgKi8KKyAgICB1OCB2b2xhdGlsZSAgICAgU19TdGF0dXM7ICAgICAgICAgICAgICAgLyogc3RhdHVzIHNwZWNpYWwgY29tbWFuZCAqLworICAgIHUxNiAgICAgICAgICAgICAgcmVzZXJ2ZWQxOworICAgIHUzMiAgICAgICAgICAgICBTX0luZm9bNF07ICAgICAgICAgICAgICAvKiBhZGQuIGluZm8gc3BlY2lhbCBjb21tYW5kICovCisgICAgdTggdm9sYXRpbGUgICAgIFNlbWEwOyAgICAgICAgICAgICAgICAgIC8qIGNvbW1hbmQgc2VtYXBob3JlICovCisgICAgdTggICAgICAgICAgICAgIHJlc2VydmVkMlszXTsKKyAgICB1OCAgICAgICAgICAgICAgQ21kX0luZGV4OyAgICAgICAgICAgICAgLyogY29tbWFuZCBudW1iZXIgKi8KKyAgICB1OCAgICAgICAgICAgICAgcmVzZXJ2ZWQzWzNdOworICAgIHUxNiB2b2xhdGlsZSAgICAgU3RhdHVzOyAgICAgICAgICAgICAgICAgLyogY29tbWFuZCBzdGF0dXMgKi8KKyAgICB1MTYgICAgICAgICAgICAgIFNlcnZpY2U7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UoZm9yIGFzeW5jLmV2ZW50cykgKi8KKyAgICB1MzIgICAgICAgICAgICAgSW5mb1syXTsgICAgICAgICAgICAgICAgLyogYWRkaXRpb25hbCBpbmZvICovCiAgICAgc3RydWN0IHsKLSAgICAgICAgdXNob3J0ICAgICAgICAgIG9mZnNldDsgICAgICAgICAgICAgICAgIC8qIGNvbW1hbmQgb2Zmcy4gaW4gdGhlIERQUkFNKi8KLSAgICAgICAgdXNob3J0ICAgICAgICAgIHNlcnZfaWQ7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UgKi8KLSAgICB9IFBBQ0tFRCBjb21tX3F1ZXVlW01BWE9GRlNFVFNdOyAgICAgICAgICAgIC8qIGNvbW1hbmQgcXVldWUgKi8KLSAgICB1bG9uZzMyICAgICAgICAgICAgIGJpb3NfcmVzZXJ2ZWRbMl07Ci0gICAgdW5jaGFyICAgICAgICAgICAgICBnZHRfZHByX2NtZFsxXTsgICAgICAgICAvKiBjb21tYW5kcyAqLwotfSBQQUNLRUQgZ2R0X2Rwcl9pZjsKKyAgICAgICAgdTE2ICAgICAgICAgIG9mZnNldDsgICAgICAgICAgICAgICAgIC8qIGNvbW1hbmQgb2Zmcy4gaW4gdGhlIERQUkFNKi8KKyAgICAgICAgdTE2ICAgICAgICAgIHNlcnZfaWQ7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UgKi8KKyAgICB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGNvbW1fcXVldWVbTUFYT0ZGU0VUU107ICAgICAgICAgICAgLyogY29tbWFuZCBxdWV1ZSAqLworICAgIHUzMiAgICAgICAgICAgICBiaW9zX3Jlc2VydmVkWzJdOworICAgIHU4ICAgICAgICAgICAgICBnZHRfZHByX2NtZFsxXTsgICAgICAgICAvKiBjb21tYW5kcyAqLworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRfZHByX2lmOwogCiAvKiBTUkFNIHN0cnVjdHVyZSBQQ0kgY29udHJvbGxlcnMgKi8KIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bG9uZzMyICAgICBtYWdpYzsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgSUQgZnJvbSBCSU9TICovCi0gICAgdXNob3J0ICAgICAgbmVlZF9kZWluaXQ7ICAgICAgICAgICAgICAgICAgICAvKiBzd2l0Y2ggYmV0dy4gQklPUy9kcml2ZXIgKi8KLSAgICB1bmNoYXIgICAgICBzd2l0Y2hfc3VwcG9ydDsgICAgICAgICAgICAgICAgIC8qIHNlZSBuZWVkX2RlaW5pdCAqLwotICAgIHVuY2hhciAgICAgIHBhZGRpbmdbOV07Ci0gICAgdW5jaGFyICAgICAgb3NfdXNlZFsxNl07ICAgICAgICAgICAgICAgICAgICAvKiBPUyBjb2RlIHBlciBzZXJ2aWNlICovCi0gICAgdW5jaGFyICAgICAgdW51c2VkWzI4XTsKLSAgICB1bmNoYXIgICAgICBmd19tYWdpYzsgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyLiBJRCBmcm9tIGZpcm13YXJlICovCi19IFBBQ0tFRCBnZHRfcGNpX3NyYW07CisgICAgdTMyICAgICBtYWdpYzsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgSUQgZnJvbSBCSU9TICovCisgICAgdTE2ICAgICAgbmVlZF9kZWluaXQ7ICAgICAgICAgICAgICAgICAgICAvKiBzd2l0Y2ggYmV0dy4gQklPUy9kcml2ZXIgKi8KKyAgICB1OCAgICAgIHN3aXRjaF9zdXBwb3J0OyAgICAgICAgICAgICAgICAgLyogc2VlIG5lZWRfZGVpbml0ICovCisgICAgdTggICAgICBwYWRkaW5nWzldOworICAgIHU4ICAgICAgb3NfdXNlZFsxNl07ICAgICAgICAgICAgICAgICAgICAvKiBPUyBjb2RlIHBlciBzZXJ2aWNlICovCisgICAgdTggICAgICB1bnVzZWRbMjhdOworICAgIHU4ICAgICAgZndfbWFnaWM7ICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250ci4gSUQgZnJvbSBmaXJtd2FyZSAqLworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRfcGNpX3NyYW07CiAKIC8qIFNSQU0gc3RydWN0dXJlIEVJU0EgY29udHJvbGxlcnMgKGJ1dCBOT1QgR0RUMzAwMC8zMDIwKSAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVuY2hhciAgICAgIG9zX3VzZWRbMTZdOyAgICAgICAgICAgICAgICAgICAgLyogT1MgY29kZSBwZXIgc2VydmljZSAqLwotICAgIHVzaG9ydCAgICAgIG5lZWRfZGVpbml0OyAgICAgICAgICAgICAgICAgICAgLyogc3dpdGNoIGJldHcuIEJJT1MvZHJpdmVyICovCi0gICAgdW5jaGFyICAgICAgc3dpdGNoX3N1cHBvcnQ7ICAgICAgICAgICAgICAgICAvKiBzZWUgbmVlZF9kZWluaXQgKi8KLSAgICB1bmNoYXIgICAgICBwYWRkaW5nOwotfSBQQUNLRUQgZ2R0X2Vpc2Ffc3JhbTsKKyAgICB1OCAgICAgIG9zX3VzZWRbMTZdOyAgICAgICAgICAgICAgICAgICAgLyogT1MgY29kZSBwZXIgc2VydmljZSAqLworICAgIHUxNiAgICAgIG5lZWRfZGVpbml0OyAgICAgICAgICAgICAgICAgICAgLyogc3dpdGNoIGJldHcuIEJJT1MvZHJpdmVyICovCisgICAgdTggICAgICBzd2l0Y2hfc3VwcG9ydDsgICAgICAgICAgICAgICAgIC8qIHNlZSBuZWVkX2RlaW5pdCAqLworICAgIHU4ICAgICAgcGFkZGluZzsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0X2Vpc2Ffc3JhbTsKIAogCiAvKiBEUFJBTSBJU0EgY29udHJvbGxlcnMgKi8KIHR5cGVkZWYgc3RydWN0IHsKICAgICB1bmlvbiB7CiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1bmNoYXIgICAgICBiaW9zX3VzZWRbMHgzYzAwLTMyXTsgICAvKiAxNUtCIC0gMzJCeXRlcyBCSU9TICovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBtYWdpYzsgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIChFSVNBKSBJRCAqLwotICAgICAgICAgICAgdXNob3J0ICAgICAgbmVlZF9kZWluaXQ7ICAgICAgICAgICAgLyogc3dpdGNoIGJldHcuIEJJT1MvZHJpdmVyICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICBzd2l0Y2hfc3VwcG9ydDsgICAgICAgICAvKiBzZWUgbmVlZF9kZWluaXQgKi8KLSAgICAgICAgICAgIHVuY2hhciAgICAgIHBhZGRpbmdbOV07Ci0gICAgICAgICAgICB1bmNoYXIgICAgICBvc191c2VkWzE2XTsgICAgICAgICAgICAvKiBPUyBjb2RlIHBlciBzZXJ2aWNlICovCi0gICAgICAgIH0gUEFDS0VEIGRwX3NyYW07Ci0gICAgICAgIHVuY2hhciAgICAgICAgICBiaW9zX2FyZWFbMHg0MDAwXTsgICAgICAvKiAxNktCIHJlc2VydmVkIGZvciBCSU9TICovCisgICAgICAgICAgICB1OCAgICAgIGJpb3NfdXNlZFsweDNjMDAtMzJdOyAgIC8qIDE1S0IgLSAzMkJ5dGVzIEJJT1MgKi8KKyAgICAgICAgICAgIHUzMiAgICAgbWFnaWM7ICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciAoRUlTQSkgSUQgKi8KKyAgICAgICAgICAgIHUxNiAgICAgIG5lZWRfZGVpbml0OyAgICAgICAgICAgIC8qIHN3aXRjaCBiZXR3LiBCSU9TL2RyaXZlciAqLworICAgICAgICAgICAgdTggICAgICBzd2l0Y2hfc3VwcG9ydDsgICAgICAgICAvKiBzZWUgbmVlZF9kZWluaXQgKi8KKyAgICAgICAgICAgIHU4ICAgICAgcGFkZGluZ1s5XTsKKyAgICAgICAgICAgIHU4ICAgICAgb3NfdXNlZFsxNl07ICAgICAgICAgICAgLyogT1MgY29kZSBwZXIgc2VydmljZSAqLworICAgICAgICB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGRwX3NyYW07CisgICAgICAgIHU4ICAgICAgICAgIGJpb3NfYXJlYVsweDQwMDBdOyAgICAgIC8qIDE2S0IgcmVzZXJ2ZWQgZm9yIEJJT1MgKi8KICAgICB9IGJ1OwogICAgIHVuaW9uIHsKICAgICAgICAgZ2R0X2Rwcl9pZiAgICAgIGljOyAgICAgICAgICAgICAgICAgICAgIC8qIGludGVyZmFjZSBhcmVhICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBpZl9hcmVhWzB4MzAwMF07ICAgICAgICAvKiAxMktCIGZvciBpbnRlcmZhY2UgKi8KKyAgICAgICAgdTggICAgICAgICAgaWZfYXJlYVsweDMwMDBdOyAgICAgICAgLyogMTJLQiBmb3IgaW50ZXJmYWNlICovCiAgICAgfSB1OwogICAgIHN0cnVjdCB7Ci0gICAgICAgIHVuY2hhciAgICAgICAgICBtZW1sb2NrOyAgICAgICAgICAgICAgICAvKiB3cml0ZSBwcm90ZWN0aW9uIERQUkFNICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBldmVudDsgICAgICAgICAgICAgICAgICAvKiByZWxlYXNlIGV2ZW50ICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBpcnFlbjsgICAgICAgICAgICAgICAgICAvKiBib2FyZCBpbnRlcnJ1cHRzIGVuYWJsZSAqLwotICAgICAgICB1bmNoYXIgICAgICAgICAgaXJxZGVsOyAgICAgICAgICAgICAgICAgLyogYWNrbm93bGVkZ2UgYm9hcmQgaW50LiAqLwotICAgICAgICB1bmNoYXIgdm9sYXRpbGUgU2VtYTE7ICAgICAgICAgICAgICAgICAgLyogc3RhdHVzIHNlbWFwaG9yZSAqLwotICAgICAgICB1bmNoYXIgICAgICAgICAgcnE7ICAgICAgICAgICAgICAgICAgICAgLyogSVJRL0RSUSBjb25maWd1cmF0aW9uICovCi0gICAgfSBQQUNLRUQgaW87Ci19IFBBQ0tFRCBnZHQyX2RwcmFtX3N0cjsKKyAgICAgICAgdTggICAgICAgICAgbWVtbG9jazsgICAgICAgICAgICAgICAgLyogd3JpdGUgcHJvdGVjdGlvbiBEUFJBTSAqLworICAgICAgICB1OCAgICAgICAgICBldmVudDsgICAgICAgICAgICAgICAgICAvKiByZWxlYXNlIGV2ZW50ICovCisgICAgICAgIHU4ICAgICAgICAgIGlycWVuOyAgICAgICAgICAgICAgICAgIC8qIGJvYXJkIGludGVycnVwdHMgZW5hYmxlICovCisgICAgICAgIHU4ICAgICAgICAgIGlycWRlbDsgICAgICAgICAgICAgICAgIC8qIGFja25vd2xlZGdlIGJvYXJkIGludC4gKi8KKyAgICAgICAgdTggdm9sYXRpbGUgU2VtYTE7ICAgICAgICAgICAgICAgICAgLyogc3RhdHVzIHNlbWFwaG9yZSAqLworICAgICAgICB1OCAgICAgICAgICBycTsgICAgICAgICAgICAgICAgICAgICAvKiBJUlEvRFJRIGNvbmZpZ3VyYXRpb24gKi8KKyAgICB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGlvOworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHQyX2RwcmFtX3N0cjsKIAogLyogRFBSQU0gUENJIGNvbnRyb2xsZXJzICovCiB0eXBlZGVmIHN0cnVjdCB7CiAgICAgdW5pb24gewogICAgICAgICBnZHRfZHByX2lmICAgICAgaWM7ICAgICAgICAgICAgICAgICAgICAgLyogaW50ZXJmYWNlIGFyZWEgKi8KLSAgICAgICAgdW5jaGFyICAgICAgICAgIGlmX2FyZWFbMHhmZjAtc2l6ZW9mKGdkdF9wY2lfc3JhbSldOworICAgICAgICB1OCAgICAgICAgICBpZl9hcmVhWzB4ZmYwLXNpemVvZihnZHRfcGNpX3NyYW0pXTsKICAgICB9IHU7CiAgICAgZ2R0X3BjaV9zcmFtICAgICAgICBnZHQ2c3I7ICAgICAgICAgICAgICAgICAvKiBTUkFNIHN0cnVjdHVyZSAqLwogICAgIHN0cnVjdCB7Ci0gICAgICAgIHVuY2hhciAgICAgICAgICB1bnVzZWQwWzFdOwotICAgICAgICB1bmNoYXIgdm9sYXRpbGUgU2VtYTE7ICAgICAgICAgICAgICAgICAgLyogY29tbWFuZCBzZW1hcGhvcmUgKi8KLSAgICAgICAgdW5jaGFyICAgICAgICAgIHVudXNlZDFbM107Ci0gICAgICAgIHVuY2hhciAgICAgICAgICBpcnFlbjsgICAgICAgICAgICAgICAgICAvKiBib2FyZCBpbnRlcnJ1cHRzIGVuYWJsZSAqLwotICAgICAgICB1bmNoYXIgICAgICAgICAgdW51c2VkMlsyXTsKLSAgICAgICAgdW5jaGFyICAgICAgICAgIGV2ZW50OyAgICAgICAgICAgICAgICAgIC8qIHJlbGVhc2UgZXZlbnQgKi8KLSAgICAgICAgdW5jaGFyICAgICAgICAgIHVudXNlZDNbM107Ci0gICAgICAgIHVuY2hhciAgICAgICAgICBpcnFkZWw7ICAgICAgICAgICAgICAgICAvKiBhY2tub3dsZWRnZSBib2FyZCBpbnQuICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICB1bnVzZWQ0WzNdOwotICAgIH0gUEFDS0VEIGlvOwotfSBQQUNLRUQgZ2R0Nl9kcHJhbV9zdHI7CisgICAgICAgIHU4ICAgICAgICAgIHVudXNlZDBbMV07CisgICAgICAgIHU4IHZvbGF0aWxlIFNlbWExOyAgICAgICAgICAgICAgICAgIC8qIGNvbW1hbmQgc2VtYXBob3JlICovCisgICAgICAgIHU4ICAgICAgICAgIHVudXNlZDFbM107CisgICAgICAgIHU4ICAgICAgICAgIGlycWVuOyAgICAgICAgICAgICAgICAgIC8qIGJvYXJkIGludGVycnVwdHMgZW5hYmxlICovCisgICAgICAgIHU4ICAgICAgICAgIHVudXNlZDJbMl07CisgICAgICAgIHU4ICAgICAgICAgIGV2ZW50OyAgICAgICAgICAgICAgICAgIC8qIHJlbGVhc2UgZXZlbnQgKi8KKyAgICAgICAgdTggICAgICAgICAgdW51c2VkM1szXTsKKyAgICAgICAgdTggICAgICAgICAgaXJxZGVsOyAgICAgICAgICAgICAgICAgLyogYWNrbm93bGVkZ2UgYm9hcmQgaW50LiAqLworICAgICAgICB1OCAgICAgICAgICB1bnVzZWQ0WzNdOworICAgIH0gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgaW87Cit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGdkdDZfZHByYW1fc3RyOwogCiAvKiBQTFggcmVnaXN0ZXIgc3RydWN0dXJlIChuZXcgUENJIGNvbnRyb2xsZXJzKSAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVuY2hhciAgICAgICAgICAgICAgY2ZnX3JlZzsgICAgICAgIC8qIERQUkFNIGNmZy4oMjpiZWxvdyAxTUIsMDphbnl3aGVyZSkqLwotICAgIHVuY2hhciAgICAgICAgICAgICAgdW51c2VkMVsweDNmXTsKLSAgICB1bmNoYXIgdm9sYXRpbGUgICAgIHNlbWEwX3JlZzsgICAgICAgICAgICAgIC8qIGNvbW1hbmQgc2VtYXBob3JlICovCi0gICAgdW5jaGFyIHZvbGF0aWxlICAgICBzZW1hMV9yZWc7ICAgICAgICAgICAgICAvKiBzdGF0dXMgc2VtYXBob3JlICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICB1bnVzZWQyWzJdOwotICAgIHVzaG9ydCB2b2xhdGlsZSAgICAgc3RhdHVzOyAgICAgICAgICAgICAgICAgLyogY29tbWFuZCBzdGF0dXMgKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIHNlcnZpY2U7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UgKi8KLSAgICB1bG9uZzMyICAgICAgICAgICAgIGluZm9bMl07ICAgICAgICAgICAgICAgIC8qIGFkZGl0aW9uYWwgaW5mbyAqLwotICAgIHVuY2hhciAgICAgICAgICAgICAgdW51c2VkM1sweDEwXTsKLSAgICB1bmNoYXIgICAgICAgICAgICAgIGxkb29yX3JlZzsgICAgICAgICAgICAgIC8qIFBDSSB0byBsb2NhbCBkb29yYmVsbCAqLwotICAgIHVuY2hhciAgICAgICAgICAgICAgdW51c2VkNFszXTsKLSAgICB1bmNoYXIgdm9sYXRpbGUgICAgIGVkb29yX3JlZzsgICAgICAgICAgICAgIC8qIGxvY2FsIHRvIFBDSSBkb29yYmVsbCAqLwotICAgIHVuY2hhciAgICAgICAgICAgICAgdW51c2VkNVszXTsKLSAgICB1bmNoYXIgICAgICAgICAgICAgIGNvbnRyb2wwOyAgICAgICAgICAgICAgIC8qIGNvbnRyb2wwIHJlZ2lzdGVyKHVudXNlZCkgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIGNvbnRyb2wxOyAgICAgICAgICAgICAgIC8qIGJvYXJkIGludGVycnVwdHMgZW5hYmxlICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICB1bnVzZWQ2WzB4MTZdOwotfSBQQUNLRUQgZ2R0NmNfcGx4X3JlZ3M7CisgICAgdTggICAgICAgICAgICAgIGNmZ19yZWc7ICAgICAgICAvKiBEUFJBTSBjZmcuKDI6YmVsb3cgMU1CLDA6YW55d2hlcmUpKi8KKyAgICB1OCAgICAgICAgICAgICAgdW51c2VkMVsweDNmXTsKKyAgICB1OCB2b2xhdGlsZSAgICAgc2VtYTBfcmVnOyAgICAgICAgICAgICAgLyogY29tbWFuZCBzZW1hcGhvcmUgKi8KKyAgICB1OCB2b2xhdGlsZSAgICAgc2VtYTFfcmVnOyAgICAgICAgICAgICAgLyogc3RhdHVzIHNlbWFwaG9yZSAqLworICAgIHU4ICAgICAgICAgICAgICB1bnVzZWQyWzJdOworICAgIHUxNiB2b2xhdGlsZSAgICAgc3RhdHVzOyAgICAgICAgICAgICAgICAgLyogY29tbWFuZCBzdGF0dXMgKi8KKyAgICB1MTYgICAgICAgICAgICAgIHNlcnZpY2U7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UgKi8KKyAgICB1MzIgICAgICAgICAgICAgaW5mb1syXTsgICAgICAgICAgICAgICAgLyogYWRkaXRpb25hbCBpbmZvICovCisgICAgdTggICAgICAgICAgICAgIHVudXNlZDNbMHgxMF07CisgICAgdTggICAgICAgICAgICAgIGxkb29yX3JlZzsgICAgICAgICAgICAgIC8qIFBDSSB0byBsb2NhbCBkb29yYmVsbCAqLworICAgIHU4ICAgICAgICAgICAgICB1bnVzZWQ0WzNdOworICAgIHU4IHZvbGF0aWxlICAgICBlZG9vcl9yZWc7ICAgICAgICAgICAgICAvKiBsb2NhbCB0byBQQ0kgZG9vcmJlbGwgKi8KKyAgICB1OCAgICAgICAgICAgICAgdW51c2VkNVszXTsKKyAgICB1OCAgICAgICAgICAgICAgY29udHJvbDA7ICAgICAgICAgICAgICAgLyogY29udHJvbDAgcmVnaXN0ZXIodW51c2VkKSAqLworICAgIHU4ICAgICAgICAgICAgICBjb250cm9sMTsgICAgICAgICAgICAgICAvKiBib2FyZCBpbnRlcnJ1cHRzIGVuYWJsZSAqLworICAgIHU4ICAgICAgICAgICAgICB1bnVzZWQ2WzB4MTZdOworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHQ2Y19wbHhfcmVnczsKIAogLyogRFBSQU0gbmV3IFBDSSBjb250cm9sbGVycyAqLwogdHlwZWRlZiBzdHJ1Y3QgewogICAgIHVuaW9uIHsKICAgICAgICAgZ2R0X2Rwcl9pZiAgICAgIGljOyAgICAgICAgICAgICAgICAgICAgIC8qIGludGVyZmFjZSBhcmVhICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBpZl9hcmVhWzB4NDAwMC1zaXplb2YoZ2R0X3BjaV9zcmFtKV07CisgICAgICAgIHU4ICAgICAgICAgIGlmX2FyZWFbMHg0MDAwLXNpemVvZihnZHRfcGNpX3NyYW0pXTsKICAgICB9IHU7CiAgICAgZ2R0X3BjaV9zcmFtICAgICAgICBnZHQ2c3I7ICAgICAgICAgICAgICAgICAvKiBTUkFNIHN0cnVjdHVyZSAqLwotfSBQQUNLRUQgZ2R0NmNfZHByYW1fc3RyOworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHQ2Y19kcHJhbV9zdHI7CiAKIC8qIGk5NjAgcmVnaXN0ZXIgc3RydWN0dXJlIChQQ0kgTVBSIGNvbnRyb2xsZXJzKSAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVuY2hhciAgICAgICAgICAgICAgdW51c2VkMVsxNl07Ci0gICAgdW5jaGFyIHZvbGF0aWxlICAgICBzZW1hMF9yZWc7ICAgICAgICAgICAgICAvKiBjb21tYW5kIHNlbWFwaG9yZSAqLwotICAgIHVuY2hhciAgICAgICAgICAgICAgdW51c2VkMjsKLSAgICB1bmNoYXIgdm9sYXRpbGUgICAgIHNlbWExX3JlZzsgICAgICAgICAgICAgIC8qIHN0YXR1cyBzZW1hcGhvcmUgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIHVudXNlZDM7Ci0gICAgdXNob3J0IHZvbGF0aWxlICAgICBzdGF0dXM7ICAgICAgICAgICAgICAgICAvKiBjb21tYW5kIHN0YXR1cyAqLwotICAgIHVzaG9ydCAgICAgICAgICAgICAgc2VydmljZTsgICAgICAgICAgICAgICAgLyogc2VydmljZSAqLwotICAgIHVsb25nMzIgICAgICAgICAgICAgaW5mb1syXTsgICAgICAgICAgICAgICAgLyogYWRkaXRpb25hbCBpbmZvICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICBsZG9vcl9yZWc7ICAgICAgICAgICAgICAvKiBQQ0kgdG8gbG9jYWwgZG9vcmJlbGwgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIHVudXNlZDRbMTFdOwotICAgIHVuY2hhciB2b2xhdGlsZSAgICAgZWRvb3JfcmVnOyAgICAgICAgICAgICAgLyogbG9jYWwgdG8gUENJIGRvb3JiZWxsICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICB1bnVzZWQ1WzddOwotICAgIHVuY2hhciAgICAgICAgICAgICAgZWRvb3JfZW5fcmVnOyAgICAgICAgICAgLyogYm9hcmQgaW50ZXJydXB0cyBlbmFibGUgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIHVudXNlZDZbMjddOwotICAgIHVsb25nMzIgICAgICAgICAgICAgdW51c2VkN1s5MzldOyAgICAgICAgIAotICAgIHVsb25nMzIgICAgICAgICAgICAgc2V2ZXJpdHk7ICAgICAgIAorICAgIHU4ICAgICAgICAgICAgICB1bnVzZWQxWzE2XTsKKyAgICB1OCB2b2xhdGlsZSAgICAgc2VtYTBfcmVnOyAgICAgICAgICAgICAgLyogY29tbWFuZCBzZW1hcGhvcmUgKi8KKyAgICB1OCAgICAgICAgICAgICAgdW51c2VkMjsKKyAgICB1OCB2b2xhdGlsZSAgICAgc2VtYTFfcmVnOyAgICAgICAgICAgICAgLyogc3RhdHVzIHNlbWFwaG9yZSAqLworICAgIHU4ICAgICAgICAgICAgICB1bnVzZWQzOworICAgIHUxNiB2b2xhdGlsZSAgICAgc3RhdHVzOyAgICAgICAgICAgICAgICAgLyogY29tbWFuZCBzdGF0dXMgKi8KKyAgICB1MTYgICAgICAgICAgICAgIHNlcnZpY2U7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UgKi8KKyAgICB1MzIgICAgICAgICAgICAgaW5mb1syXTsgICAgICAgICAgICAgICAgLyogYWRkaXRpb25hbCBpbmZvICovCisgICAgdTggICAgICAgICAgICAgIGxkb29yX3JlZzsgICAgICAgICAgICAgIC8qIFBDSSB0byBsb2NhbCBkb29yYmVsbCAqLworICAgIHU4ICAgICAgICAgICAgICB1bnVzZWQ0WzExXTsKKyAgICB1OCB2b2xhdGlsZSAgICAgZWRvb3JfcmVnOyAgICAgICAgICAgICAgLyogbG9jYWwgdG8gUENJIGRvb3JiZWxsICovCisgICAgdTggICAgICAgICAgICAgIHVudXNlZDVbN107CisgICAgdTggICAgICAgICAgICAgIGVkb29yX2VuX3JlZzsgICAgICAgICAgIC8qIGJvYXJkIGludGVycnVw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ICAgICAgICBkcG1lbTsgICAgICAgICAgICAgICAgICAvKiBEUFJBTSBhZGRyZXNzICovCi0gICAgdWxvbmcgICAgICAgICAgICAgICBpbzsgICAgICAgICAgICAgICAgICAgICAvKiBJTyBhZGRyZXNzICovCisgICAgdW5zaWduZWQgbG9uZyAgICAgICAgICAgICAgIGRwbWVtOyAgICAgICAgICAgICAgICAgIC8qIERQUkFNIGFkZHJlc3MgKi8KKyAgICB1bnNpZ25lZCBsb25nICAgICAgICAgICAgICAgaW87ICAgICAgICAgICAgICAgICAgICAgLyogSU8gYWRkcmVzcyAqLwogfSBnZHRoX3BjaV9zdHI7CiAKIApAQCAtODQ2LDkzICs4NDYsOTMgQEAKIHR5cGVkZWYgc3RydWN0IHsKICAgICBzdHJ1Y3QgU2NzaV9Ib3N0ICAgICpzaG9zdDsKICAgICBzdHJ1Y3QgbGlzdF9oZWFkICAgIGxpc3Q7Ci0gICAgdXNob3J0ICAgICAgCWhhbnVtOwotICAgIHVzaG9ydCAgICAgICAgICAgICAgb2VtX2lkOyAgICAgICAgICAgICAgICAgLyogT0VNICovCi0gICAgdXNob3J0ICAgICAgICAgICAgICB0eXBlOyAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIGNsYXNzICovCi0gICAgdWxvbmczMiAgICAgICAgICAgICBzdHlwZTsgICAgICAgICAgICAgICAgICAvKiBzdWJ0eXBlIChQQ0k6IGRldmljZSBJRCkgKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIGZ3X3ZlcnM7ICAgICAgICAgICAgICAgIC8qIGZpcm13YXJlIHZlcnNpb24gKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIGNhY2hlX2ZlYXQ7ICAgICAgICAgICAgIC8qIGZlYXQuIGNhY2hlIHNlcnYuIChzL2csLi4pKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIHJhd19mZWF0OyAgICAgICAgICAgICAgIC8qIGZlYXQuIHJhdyBzZXJ2aWNlIChzL2csLi4pKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIHNjcmVlbl9mZWF0OyAgICAgICAgICAgIC8qIGZlYXQuIHJhdyBzZXJ2aWNlIChzL2csLi4pKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIGJtaWM7ICAgICAgICAgICAgICAgICAgIC8qIEJNSUMgYWRkcmVzcyAoRUlTQSkgKi8KKyAgICB1MTYgICAgICAJaGFudW07CisgICAgdTE2ICAgICAgICAgICAgICBvZW1faWQ7ICAgICAgICAgICAgICAgICAvKiBPRU0gKi8KKyAgICB1MTYgICAgICAgICAgICAgIHR5cGU7ICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgY2xhc3MgKi8KKyAgICB1MzIgICAgICAgICAgICAgc3R5cGU7ICAgICAgICAgICAgICAgICAgLyogc3VidHlwZSAoUENJOiBkZXZpY2UgSUQpICovCisgICAgdTE2ICAgICAgICAgICAgICBmd192ZXJzOyAgICAgICAgICAgICAgICAvKiBmaXJtd2FyZSB2ZXJzaW9uICovCisgICAgdTE2ICAgICAgICAgICAgICBjYWNoZV9mZWF0OyAgICAgICAgICAgICAvKiBmZWF0LiBjYWNoZSBzZXJ2LiAocy9nLC4uKSovCisgICAgdTE2ICAgICAgICAgICAgICByYXdfZmVhdDsgICAgICAgICAgICAgICAvKiBmZWF0LiByYXcgc2VydmljZSAocy9nLC4uKSovCisgICAgdTE2ICAgICAgICAgICAgICBzY3JlZW5fZmVhdDsgICAgICAgICAgICAvKiBmZWF0LiByYXcgc2VydmljZSAocy9nLC4uKSovCisgICAgdTE2ICAgICAgICAgICAgICBibWljOyAgICAgICAgICAgICAgICAgICAvKiBCTUlDIGFkZHJlc3MgKEVJU0EpICovCiAgICAgdm9pZCBfX2lvbWVtICAgICAgICAqYnJkOyAgICAgICAgICAgICAgICAgICAvKiBEUFJBTSBhZGRyZXNzICovCi0gICAgdWxvbmczMiAgICAgICAgICAgICBicmRfcGh5czsgICAgICAgICAgICAgICAvKiBzbG90IG51bWJlci9CSU9TIGFkZHJlc3MgKi8KKyAgICB1MzIgICAgICAgICAgICAgYnJkX3BoeXM7ICAgICAgICAgICAgICAgLyogc2xvdCBudW1iZXIvQklPUyBhZGRyZXNzICovCiAgICAgZ2R0NmNfcGx4X3JlZ3MgICAgICAqcGx4OyAgICAgICAgICAgICAgICAgICAvKiBQTFggcmVncyAobmV3IFBDSSBjb250ci4pICovCiAgICAgZ2R0aF9jbWRfc3RyICAgICAgICBjbWRleHQ7CiAgICAgZ2R0aF9jbWRfc3RyICAgICAgICAqcGNjYjsgICAgICAgICAgICAgICAgICAvKiBhZGRyZXNzIGNvbW1hbmQgc3RydWN0dXJlICovCi0gICAgdWxvbmczMiAgICAgICAgICAgICBjY2JfcGh5czsgICAgICAgICAgICAgICAvKiBwaHlzLiBhZGRyZXNzICovCisgICAgdTMyICAgICAgICAgICAgIGNjYl9waHlzOyAgICAgICAgICAgICAgIC8qIHBoeXMuIGFkZHJlc3MgKi8KICNpZmRlZiBJTlRfQ09BTAogICAgIGdkdGhfY29hbF9zdGF0dXMgICAgKmNvYWxfc3RhdDsgICAgICAgICAgICAgLyogYnVmZmVyIGZvciBjb2FsZXNjaW5nIGludC4qLwotICAgIHVsb25nNjQgICAgICAgICAgICAgY29hbF9zdGF0X3BoeXM7ICAgICAgICAgLyogcGh5cy4gYWRkcmVzcyAqLworICAgIHU2NCAgICAgICAgICAgICBjb2FsX3N0YXRfcGh5czsgICAgICAgICAvKiBwaHlzLiBhZGRyZXNzICovCiAjZW5kaWYKICAgICBjaGFyICAgICAgICAgICAgICAgICpwc2NyYXRjaDsgICAgICAgICAgICAgIC8qIHNjcmF0Y2ggKERNQSkgYnVmZmVyICovCi0gICAgdWxvbmc2NCAgICAgICAgICAgICBzY3JhdGNoX3BoeXM7ICAgICAgICAgICAvKiBwaHlzLiBhZGRyZXNzICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICBzY3JhdGNoX2J1c3k7ICAgICAgICAgICAvKiBpbiB1c2U/ICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICBkbWE2NF9zdXBwb3J0OyAgICAgICAgICAvKiA2NC1iaXQgRE1BIHN1cHBvcnRlZD8gKi8KKyAgICB1NjQgICAgICAgICAgICAgc2NyYXRjaF9waHlzOyAgICAgICAgICAgLyogcGh5cy4gYWRkcmVzcyAqLworICAgIHU4ICAgICAgICAgICAgICBzY3JhdGNoX2J1c3k7ICAgICAgICAgICAvKiBpbiB1c2U/ICovCisgICAgdTggICAgICAgICAgICAgIGRtYTY0X3N1cHBvcnQ7ICAgICAgICAgIC8qIDY0LWJpdCBETUEgc3VwcG9ydGVkPyAqLwogICAgIGdkdGhfbXNnX3N0ciAgICAgICAgKnBtc2c7ICAgICAgICAgICAgICAgICAgLyogbWVzc2FnZSBidWZmZXIgKi8KLSAgICB1bG9uZzY0ICAgICAgICAgICAgIG1zZ19waHlzOyAgICAgICAgICAgICAgIC8qIHBoeXMuIGFkZHJlc3MgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIHNjYW5fbW9kZTsgICAgICAgICAgICAgIC8qIGN1cnJlbnQgc2NhbiBtb2RlICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICBpcnE7ICAgICAgICAgICAgICAgICAgICAvKiBJUlEgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIGRycTsgICAgICAgICAgICAgICAgICAgIC8qIERSUSAoSVNBIGNvbnRyb2xsZXJzKSAqLwotICAgIHVzaG9ydCAgICAgICAgICAgICAgc3RhdHVzOyAgICAgICAgICAgICAgICAgLyogY29tbWFuZCBzdGF0dXMgKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgIHNlcnZpY2U7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UvZmlybXdhcmUgdmVyLi8uLiAqLwotICAgIHVsb25nMzIgICAgICAgICAgICAgaW5mbzsKLSAgICB1bG9uZzMyICAgICAgICAgICAgIGluZm8yOyAgICAgICAgICAgICAgICAgIC8qIGFkZGl0aW9uYWwgaW5mbyAqLworICAgIHU2NCAgICAgICAgICAgICBtc2dfcGh5czsgICAgICAgICAgICAgICAvKiBwaHlzLiBhZGRyZXNzICovCisgICAgdTggICAgICAgICAgICAgIHNjYW5fbW9kZTsgICAgICAgICAgICAgIC8qIGN1cnJlbnQgc2NhbiBtb2RlICovCisgICAgdTggICAgICAgICAgICAgIGlycTsgICAgICAgICAgICAgICAgICAgIC8qIElSUSAqLworICAgIHU4ICAgICAgICAgICAgICBkcnE7ICAgICAgICAgICAgICAgICAgICAvKiBEUlEgKElTQSBjb250cm9sbGVycykgKi8KKyAgICB1MTYgICAgICAgICAgICAgIHN0YXR1czsgICAgICAgICAgICAgICAgIC8qIGNvbW1hbmQgc3RhdHVzICovCisgICAgdTE2ICAgICAgICAgICAgICBzZXJ2aWNlOyAgICAgICAgICAgICAgICAvKiBzZXJ2aWNlL2Zpcm13YXJlIHZlci4vLi4gKi8KKyAgICB1MzIgICAgICAgICAgICAgaW5mbzsKKyAgICB1MzIgICAgICAgICAgICAgaW5mbzI7ICAgICAgICAgICAgICAgICAgLyogYWRkaXRpb25hbCBpbmZvICovCiAgICAgU2NzaV9DbW5kICAgICAgICAgICAqcmVxX2ZpcnN0OyAgICAgICAgICAgICAvKiB0b3Agb2YgcmVxdWVzdCBxdWV1ZSAqLwogICAgIHN0cnVjdCB7Ci0gICAgICAgIHVuY2hhciAgICAgICAgICBwcmVzZW50OyAgICAgICAgICAgICAgICAvKiBGbGFnOiBob3N0IGRyaXZlIHByZXNlbnQ/ICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBpc19sb2dkcnY7ICAgICAgICAgICAgICAvKiBGbGFnOiBsb2cuIGRyaXZlIChtYXN0ZXIpPyAqLwotICAgICAgICB1bmNoYXIgICAgICAgICAgaXNfYXJyYXlkcnY7ICAgICAgICAgICAgLyogRmxhZzogYXJyYXkgZHJpdmU/ICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBpc19tYXN0ZXI7ICAgICAgICAgICAgICAvKiBGbGFnOiBhcnJheSBkcml2ZSBtYXN0ZXI/ICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBpc19wYXJpdHk7ICAgICAgICAgICAgICAvKiBGbGFnOiBwYXJpdHkgZHJpdmU/ICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBpc19ob3RmaXg7ICAgICAgICAgICAgICAvKiBGbGFnOiBob3RmaXggZHJpdmU/ICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBtYXN0ZXJfbm87ICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgbWFzdGVyIGRyaXZlICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBsb2NrOyAgICAgICAgICAgICAgICAgICAvKiBkcml2ZSBsb2NrZWQ/IChob3QgcGx1ZykgKi8KLSAgICAgICAgdW5jaGFyICAgICAgICAgIGhlYWRzOyAgICAgICAgICAgICAgICAgIC8qIG1hcHBpbmcgKi8KLSAgICAgICAgdW5jaGFyICAgICAgICAgIHNlY3M7Ci0gICAgICAgIHVzaG9ydCAgICAgICAgICBkZXZ0eXBlOyAgICAgICAgICAgICAgICAvKiBmdXJ0aGVyIGluZm9ybWF0aW9uICovCi0gICAgICAgIHVsb25nNjQgICAgICAgICBzaXplOyAgICAgICAgICAgICAgICAgICAvKiBjYXBhY2l0eSAqLwotICAgICAgICB1bmNoYXIgICAgICAgICAgbGRyX25vOyAgICAgICAgICAgICAgICAgLyogbG9nLiBkcml2ZSBuby4gKi8KLSAgICAgICAgdW5jaGFyICAgICAgICAgIHJ3X2F0dHJpYnM7ICAgICAgICAgICAgIC8qIHIvdyBhdHRyaWJ1dGVzICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBjbHVzdGVyX3R5cGU7ICAgICAgICAgICAvKiBjbHVzdGVyIHByb3BlcnRpZXMgKi8KLSAgICAgICAgdW5jaGFyICAgICAgICAgIG1lZGlhX2NoYW5nZWQ7ICAgICAgICAgIC8qIEZsYWc6TU9VTlQvVU5NT1VOVCBvY2N1cmVkICovCi0gICAgICAgIHVsb25nMzIgICAgICAgICBzdGFydF9zZWM7ICAgICAgICAgICAgICAvKiBzdGFydCBzZWN0b3IgKi8KKyAgICAgICAgdTggICAgICAgICAgcHJlc2VudDsgICAgICAgICAgICAgICAgLyogRmxhZzogaG9zdCBkcml2ZSBwcmVzZW50PyAqLworICAgICAgICB1OCAgICAgICAgICBpc19sb2dkcnY7ICAgICAgICAgICAgICAvKiBGbGFnOiBsb2cuIGRyaXZlIChtYXN0ZXIpPyAqLworICAgICAgICB1OCAgICAgICAgICBpc19hcnJheWRydjsgICAgICAgICAgICAvKiBGbGFnOiBhcnJheSBkcml2ZT8gKi8KKyAgICAgICAgdTggICAgICAgICAgaXNfbWFzdGVyOyAgICAgICAgICAgICAgLyogRmxhZzogYXJyYXkgZHJpdmUgbWFzdGVyPyAqLworICAgICAgICB1OCAgICAgICAgICBpc19wYXJpdHk7ICAgICAgICAgICAgICAvKiBGbGFnOiBwYXJpdHkgZHJpdmU/ICovCisgICAgICAgIHU4ICAgICAgICAgIGlzX2hvdGZpeDsgICAgICAgICAgICAgIC8qIEZsYWc6IGhvdGZpeCBkcml2ZT8gKi8KKyAgICAgICAgdTggICAgICAgICAgbWFzdGVyX25vOyAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIG1hc3RlciBkcml2ZSAqLworICAgICAgICB1OCAgICAgICAgICBsb2NrOyAgICAgICAgICAgICAgICAgICAvKiBkcml2ZSBsb2NrZWQ/IChob3QgcGx1ZykgKi8KKyAgICAgICAgdTggICAgICAgICAgaGVhZHM7ICAgICAgICAgICAgICAgICAgLyogbWFwcGluZyAqLworICAgICAgICB1OCAgICAgICAgICBzZWNzOworICAgICAgICB1MTYgICAgICAgICAgZGV2dHlwZTsgICAgICAgICAgICAgICAgLyogZnVydGhlciBpbmZvcm1hdGlvbiAqLworICAgICAgICB1NjQgICAgICAgICBzaXplOyAgICAgICAgICAgICAgICAgICAvKiBjYXBhY2l0eSAqLworICAgICAgICB1OCAgICAgICAgICBsZHJfbm87ICAgICAgICAgICAgICAgICAvKiBsb2cuIGRyaXZlIG5vLiAqLworICAgICAgICB1OCAgICAgICAgICByd19hdHRyaWJzOyAgICAgICAgICAgICAvKiByL3cgYXR0cmlidXRlcyAqLworICAgICAgICB1OCAgICAgICAgICBjbHVzdGVyX3R5cGU7ICAgICAgICAgICAvKiBjbHVzdGVyIHByb3BlcnRpZXMgKi8KKyAgICAgICAgdTggICAgICAgICAgbWVkaWFfY2hhbmdlZDsgICAgICAgICAgLyogRmxhZzpNT1VOVC9VTk1PVU5UIG9jY3VyZWQgKi8KKyAgICAgICAgdTMyICAgICAgICAgc3RhcnRfc2VjOyAgICAgICAgICAgICAgLyogc3RhcnQgc2VjdG9yICovCiAgICAgfSBoZHJbTUFYX0xEUklWRVNdOyAgICAgICAgICAgICAgICAgICAgICAgICAvKiBob3N0IGRyaXZlcyAqLwogICAgIHN0cnVjdCB7Ci0gICAgICAgIHVuY2hhciAgICAgICAgICBsb2NrOyAgICAgICAgICAgICAgICAgICAvKiBjaGFubmVsIGxvY2tlZD8gKGhvdCBwbHVnKSAqLwotICAgICAgICB1bmNoYXIgICAgICAgICAgcGRldl9jbnQ7ICAgICAgICAgICAgICAgLyogcGh5c2ljYWwgZGV2aWNlIGNvdW50ICovCi0gICAgICAgIHVuY2hhciAgICAgICAgICBsb2NhbF9ubzsgICAgICAgICAgICAgICAvKiBsb2NhbCBjaGFubmVsIG51bWJlciAqLwotICAgICAgICB1bmNoYXIgICAgICAgICAgaW9fY250W01BWElEXTsgICAgICAgICAgLyogY3VycmVudCBJTyBjb3VudCAqLwotICAgICAgICB1bG9uZzMyICAgICAgICAgYWRkcmVzczsgICAgICAgICAgICAgICAgLyogY2hhbm5lbCBhZGRyZXNzICovCi0gICAgICAgIHVsb25nMzIgICAgICAgICBpZF9saXN0W01BWElEXTsgICAgICAgICAvKiBJRHMgb2YgdGhlIHBoeXMuIGRldmljZXMgKi8KKyAgICAgICAgdTggICAgICAgICAgbG9jazsgICAgICAgICAgICAgICAgICAgLyogY2hhbm5lbCBsb2NrZWQ/IChob3QgcGx1ZykgKi8KKyAgICAgICAgdTggICAgICAgICAgcGRldl9jbnQ7ICAgICAgICAgICAgICAgLyogcGh5c2ljYWwgZGV2aWNlIGNvdW50ICovCisgICAgICAgIHU4ICAgICAgICAgIGxvY2FsX25vOyAgICAgICAgICAgICAgIC8qIGxvY2FsIGNoYW5uZWwgbnVtYmVyICovCisgICAgICAgIHU4ICAgICAgICAgIGlvX2NudFtNQVhJRF07ICAgICAgICAgIC8qIGN1cnJlbnQgSU8gY291bnQgKi8KKyAgICAgICAgdTMyICAgICAgICAgYWRkcmVzczsgICAgICAgICAgICAgICAgLyogY2hhbm5lbCBhZGRyZXNzICovCisgICAgICAgIHUzMiAgICAgICAgIGlkX2xpc3RbTUFYSURdOyAgICAgICAgIC8qIElEcyBvZiB0aGUgcGh5cy4gZGV2aWNlcyAqLwogICAgIH0gcmF3W01BWEJVU107ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBjaGFubmVscyAqLwogICAgIHN0cnVjdCB7CiAgICAgICAgIFNjc2lfQ21uZCAgICAgICAqY21uZDsgICAgICAgICAgICAgICAgICAvKiBwZW5kaW5nIHJlcXVlc3QgKi8KLSAgICAgICAgdXNob3J0ICAgICAgICAgIHNlcnZpY2U7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UgKi8KKyAgICAgICAgdTE2ICAgICAgICAgIHNlcnZpY2U7ICAgICAgICAgICAgICAgIC8qIHNlcnZpY2UgKi8KICAgICB9IGNtZF90YWJbR0RUSF9NQVhDTURTXTsgICAgICAgICAgICAgICAgICAgIC8qIHRhYmxlIG9mIHBlbmQuIHJlcXVlc3RzICovCiAgICAgc3RydWN0IGdkdGhfY21uZGluZm8geyAgICAgICAgICAgICAgICAgICAgICAvKiBwZXItY29tbWFuZCBwcml2YXRlIGluZm8gKi8KICAgICAgICAgaW50IGluZGV4OwogICAgICAgICBpbnQgaW50ZXJuYWxfY29tbWFuZDsgICAgICAgICAgICAgICAgICAgLyogZG9uJ3QgY2FsbCBzY3NpX2RvbmUgKi8KICAgICAgICAgZ2R0aF9jbWRfc3RyICppbnRlcm5hbF9jbWRfc3RyOyAgICAgICAgIC8qIGNyaWVyIGZvciBpbnRlcm5hbCBtZXNzYWdlcyovCiAgICAgICAgIGRtYV9hZGRyX3Qgc2Vuc2VfcGFkZHI7ICAgICAgICAgICAgICAgICAvKiBzZW5zZSBkbWEtYWRkciAqLwotICAgICAgICB1bmNoYXIgcHJpb3JpdHk7CisgICAgICAgIHU4IHByaW9yaXR5OwogCWludCB0aW1lb3V0X2NvdW50OwkJCS8qICMgb2YgdGltZW91dCBjYWxscyAqLwogICAgICAgICB2b2xhdGlsZSBpbnQgd2FpdF9mb3JfY29tcGxldGlvbjsKLSAgICAgICAgdXNob3J0IHN0YXR1czsKLSAgICAgICAgdWxvbmczMiBpbmZvOworICAgICAgICB1MTYgc3RhdHVzOworICAgICAgICB1MzIgaW5mbzsKICAgICAgICAgZW51bSBkbWFfZGF0YV9kaXJlY3Rpb24gZG1hX2RpcjsKICAgICAgICAgaW50IHBoYXNlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qID8/Pz8gKi8KICAgICAgICAgaW50IE9wQ29kZTsKICAgICB9IGNtbmRpbmZvW0dEVEhfTUFYQ01EU107ICAgICAgICAgICAgICAgICAgIC8qIGluZGV4PT0wIGlzIGZyZWUgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIGJ1c19jbnQ7ICAgICAgICAgICAgICAgIC8qIFNDU0kgYnVzIGNvdW50ICovCi0gICAgdW5jaGFyICAgICAgICAgICAgICB0aWRfY250OyAgICAgICAgICAgICAgICAvKiBUYXJnZXQgSUQgY291bnQgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIGJ1c19pZFtNQVhCVVNdOyAgICAgICAgIC8qIElPUCBJRHMgKi8KLSAgICB1bmNoYXIgICAgICAgICAgICAgIHZpcnRfYnVzOyAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiB2aXJ0dWFsIGJ1cyAqLwotICAgIHVuY2hhciAgICAgICAgICAgICAgbW9yZV9wcm9jOyAgICAgICAgICAgICAgLyogbW9yZSAvcHJvYyBpbmZvIHN1cHBvcnRlZCAqLwotICAgIHVzaG9ydCAgICAgICAgICAgICAgY21kX2NudDsgICAgICAgICAgICAgICAgLyogY29tbWFuZCBjb3VudCBpbiBEUFJBTSAqLwotICAgIHVzaG9ydCAgICAgICAgICAgICAgY21kX2xlbjsgICAgICAgICAgICAgICAgLyogbGVuZ3RoIG9mIGFjdHVhbCBjb21tYW5kICovCi0gICAgdXNob3J0ICAgICAgICAgICAgICBjbWRfb2Zmc19kcG1lbTsgICAgICAgICAvKiBhY3R1YWwgb2Zmc2V0IGluIERQUkFNICovCi0gICAgdXNob3J0ICAgICAgICAgICAgICBpY19hbGxfc2l6ZTsgICAgICAgICAgICAvKiBzaXplb2YgRFBSQU0gaW50ZXJmLiBhcmVhICovCisgICAgdTggICAgICAgICAgICAgIGJ1c19jbnQ7ICAgICAgICAgICAgICAgIC8qIFNDU0kgYnVzIGNvdW50ICovCisgICAgdTggICAgICAgICAgICAgIHRpZF9jbnQ7ICAgICAgICAgICAgICAgIC8qIFRhcmdldCBJRCBjb3VudCAqLworICAgIHU4ICAgICAgICAgICAgICBidXNfaWRbTUFYQlVTXTsgICAgICAgICAvKiBJT1AgSURzICovCisgICAgdTggICAgICAgICAgICAgIHZpcnRfYnVzOyAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiB2aXJ0dWFsIGJ1cyAqLworICAgIHU4ICAgICAgICAgICAgICBtb3JlX3Byb2M7ICAgICAgICAgICAgICAvKiBtb3JlIC9wcm9jIGluZm8gc3VwcG9ydGVkICovCisgICAgdTE2ICAgICAgICAgICAgICBjbWRfY250OyAgICAgICAgICAgICAgICAvKiBjb21tYW5kIGNvdW50IGluIERQUkFNICovCisgICAgdTE2ICAgICAgICAgICAgICBjbWRfbGVuOyAgICAgICAgICAgICAgICAvKiBsZW5ndGggb2YgYWN0dWFsIGNvbW1hbmQgKi8KKyAgICB1MTYgICAgICAgICAgICAgIGNtZF9vZmZzX2RwbWVtOyAgICAgICAgIC8qIGFjdHVhbCBvZmZzZXQgaW4gRFBSQU0gKi8KKyAgICB1MTYgICAgICAgICAgICAgIGljX2FsbF9zaXplOyAgICAgICAgICAgIC8qIHNpemVvZiBEUFJBTSBpbnRlcmYuIGFyZWEgKi8KICAgICBnZHRoX2NwYXJfc3RyICAgICAgIGNwYXI7ICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgY2FjaGUgcGFyLiAqLwogICAgIGdkdGhfYmZlYXRfc3RyICAgICAgYmZlYXQ7ICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBmZWF0dXJlcyAqLwogICAgIGdkdGhfYmluZm9fc3RyICAgICAgYmluZm87ICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBpbmZvICovCkBAIC05NDEsNyArOTQxLDcgQEAKICAgICBzdHJ1Y3QgcGNpX2RldiAgICAgICpwZGV2OwogICAgIGNoYXIgICAgICAgICAgICAgICAgb2VtX25hbWVbOF07CiAjaWZkZWYgR0RUSF9ETUFfU1RBVElTVElDUwotICAgIHVsb25nICAgICAgICAgICAgICAgZG1hMzJfY250LCBkbWE2NF9jbnQ7ICAgLyogc3RhdGlzdGljczogRE1BIGJ1ZmZlciAqLworICAgIHVuc2lnbmVkIGxvbmcgICAgICAgICAgICAgICBkbWEzMl9jbnQsIGRtYTY0X2NudDsgICAvKiBzdGF0aXN0aWNzOiBETUEgYnVmZmVyICovCiAjZW5kaWYKICAgICBzdHJ1Y3Qgc2NzaV9kZXZpY2UgICAgICAgICAqc2RldjsKIH0gZ2R0aF9oYV9zdHI7CkBAIC05NTMsNjUgKzk1Myw2NSBAQAogCiAvKiBJTlFVSVJZIGRhdGEgZm9ybWF0ICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdW5jaGFyICAgICAgdHlwZV9xdWF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X3NlbnNlX2RhdGE7CiAKIC8qIE1PREVfU0VOU0UgZGF0YSBmb3JtYXQgKi8KIHR5cGVkZWYgc3RydWN0IHsKICAgICBzdHJ1Y3QgewotICAgICAgICB1bmNoYXIgIGRhdGFfbGVuZ3RoOwotICAgICAgICB1bmNoYXIgIG1lZF90eXBlOwotICAgICAgICB1bmNoYXIgIGRldl9wYXI7Ci0gICAgICAgIHVuY2hhciAgYmRfbGVuZ3RoOwotICAgIH0gUEFDS0VEIGhkOworICAgICAgICB1OCAgZGF0YV9sZW5ndGg7CisgICAgICAgIHU4ICBtZWRfdHlwZTsKKyAgICAgICAgdTggIGRldl9wYXI7CisgICAgICAgIHU4ICBiZF9sZW5ndGg7CisgICAgfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBoZDsKICAgICBzdHJ1Y3QgewotICAgICAgICB1bmNoYXIgIGRlbnNfY29kZTsKLSAgICAgICAgdW5jaGFyICBibG9ja19jb3VudFszXTsKLSAgICAgICAgdW5jaGFyICByZXNlcnZlZDsKLSAgICAgICAgdW5jaGFyICBibG9ja19sZW5ndGhbM107Ci0gICAgfSBQQUNLRUQgYmQ7Ci19IFBBQ0tFRCBnZHRoX21vZGVwX2RhdGE7CisgICAgICAgIHU4ICBkZW5zX2NvZGU7CisgICAgICAgIHU4ICBibG9ja19jb3VudFszXTsKKyAgICAgICAgdTggIHJlc2VydmVkOworICAgICAgICB1OCAgYmxvY2tfbGVuZ3RoWzNdOworICAgIH0gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgYmQ7Cit9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGdkdGhfbW9kZXBfZGF0YTsKIAogLyogc3RhY2sgZnJhbWUgKi8KIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bG9uZyAgICAgICBiWzEwXTsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIDMyLzY0IGJpdCBjb21waWxlciAhICovCi19IFBBQ0tFRCBnZHRoX3N0YWNrZnJhbWU7Cisg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19sZW47ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGxlbmd0aCAqLworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRoX3NnX3N0cjsKIAogLyogc2NhdHRlci9nYXRoZXIgZWxlbWVudCAtIDY0Yml0IGFkZHJlc3NlcyAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVsb25nNjQgICAgIHNnX3B0cjsgICAgICAgICAgICAgICAgICAgICAgICAgLyogYWRkcmVzcyAqLwotICAgIHVsb25nMzIgICAgIHNnX2xlbjsgICAgICAgICAgICAgICAgICAgICAgICAgLyogbGVuZ3RoICovCi19IFBBQ0tFRCBnZHRoX3NnNjRfc3RyOworICAgIHU2NCAgICAgc2dfcHRyOyAgICAgICAgICAgICAgICAgICAgICAgICAvKiBhZGRyZXNzICovCisgICAgdTMyICAgICBzZ19sZW47ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGxlbmd0aCAqLworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRoX3NnNjRfc3RyOwogCiAvKiBjb21tYW5kIHN0cnVjdHVyZSAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVsb25nMzIgICAgIEJvYXJkTm9kZTsgICAgICAgICAgICAgICAgICAgICAgLyogYm9hcmQgbm9kZSAoYWx3YXlzIDApICovCi0gICAgdWxvbmczMiAgICAgQ29tbWFuZEluZGV4OyAgICAgICAgICAgICAgICAgICAvKiBjb21tYW5kIG51bWJlciAqLwotICAgIHVzaG9ydCAgICAgIE9wQ29kZTsgICAgICAgICAgICAgICAgICAgICAgICAgLyogdGhlIGNvbW1hbmQgKFJFQUQsLi4pICovCisgICAgdTMyICAgICBCb2FyZE5vZGU7ICAgICAgICAgICAgICAgICAgICAgIC8qIGJvYXJkIG5vZGUgKGFsd2F5cyAwKSAqLworICAgIHUzMiAgICAgQ29tbWFuZEluZGV4OyAgICAgICAgICAgICAgICAgICAvKiBjb21tYW5kIG51bWJlciAqLworICAgIHUxNiAgICAgIE9wQ29kZTsgICAgICAgICAgICAgICAgICAgICAgICAgLyogdGhlIGNvbW1hbmQgKFJFQUQsLi4pICovCiAgICAgdW5pb24gewogICAgICAgICBzdHJ1Y3QgewotICAgICAgICAgICAgdXNob3J0ICAgICAgRGV2aWNlTm87ICAgICAgICAgICAgICAgLyogbnVtYmVyIG9mIGNhY2hlIGRyaXZlICovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBCbG9ja05vOyAgICAgICAgICAgICAgICAvKiBibG9jayBudW1iZXIgKi8KLSAgICAgICAgICAgIHVsb25nMzIgICAgIEJsb2NrQ250OyAgICAgICAgICAgICAgIC8qIGJsb2NrIGNvdW50ICovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBEZXN0QWRkcjsgICAgICAgICAgICAgICAvKiBkZXN0LiBhZGRyLiAoaWYgcy9nOiAtMSkgKi8KLSAgICAgICAgICAgIHVsb25nMzIgICAgIHNnX2Nhbno7ICAgICAgICAgICAgICAgIC8qIHMvZyBlbGVtZW50IGNvdW50ICovCisgICAgICAgICAgICB1MTYgICAgICBEZXZpY2VObzsgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgY2FjaGUgZHJpdmUgKi8KKyAgICAgICAgICAgIHUzMiAgICAgQmxvY2tObzsgICAgICAgICAgICAgICAgLyogYmxvY2sgbnVtYmVyICovCisgICAgICAgICAgICB1MzIgICAgIEJsb2NrQ250OyAgICAgICAgICAgICAgIC8qIGJsb2NrIGNvdW50ICovCisgICAgICAgICAgICB1MzIgICAgIERlc3RBZGRyOyAgICAgICAgICAgICAgIC8qIGRlc3QuIGFkZHIuIChpZiBzL2c6IC0xKSAqLworICAgICAgICAgICAgdTMyICAgICBzZ19jYW56OyAgICAgICAgICAgICAgICAvKiBzL2cgZWxlbWVudCBjb3VudCAqLwogICAgICAgICAgICAgZ2R0aF9zZ19zdHIgc2dfbHN0W0dEVEhfTUFYU0ddOyAgICAgLyogcy9nIGxpc3QgKi8KLSAgICAgICAgfSBQQUNLRUQgY2FjaGU7ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIHNlcnZpY2UgY21kLiBzdHIuICovCisgICAgICAgIH0gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgY2FjaGU7ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNhY2hlIHNlcnZpY2UgY21kLiBzdHIuICovCiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1c2hvcnQgICAgICBEZXZpY2VObzsgICAgICAgICAgICAgICAvKiBudW1iZXIgb2YgY2FjaGUgZHJpdmUgKi8KLSAgICAgICAgICAgIHVsb25nNjQgICAgIEJsb2NrTm87ICAgICAgICAgICAgICAgIC8qIGJsb2NrIG51bWJlciAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgQmxvY2tDbnQ7ICAgICAgICAgICAgICAgLyogYmxvY2sgY291bnQgKi8KLSAgICAgICAgICAgIHVsb25nNjQgICAgIERlc3RBZGRyOyAgICAgICAgICAgICAgIC8qIGRlc3QuIGFkZHIuIChpZiBzL2c6IC0xKSAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgc2dfY2FuejsgICAgICAgICAgICAgICAgLyogcy9nIGVsZW1lbnQgY291bnQgKi8KKyAgICAgICAgICAgIHUxNiAgICAgIERldmljZU5vOyAgICAgICAgICAgICAgIC8qIG51bWJlciBvZiBjYWNoZSBkcml2ZSAqLworICAgICAgICAgICAgdTY0ICAgICBCbG9ja05vOyAgICAgICAgICAgICAgICAvKiBibG9jayBudW1iZXIgKi8KKyAgICAgICAgICAgIHUzMiAgICAgQmxvY2tDbnQ7ICAgICAgICAgICAgICAgLyogYmxvY2sgY291bnQgKi8KKyAgICAgICAgICAgIHU2NCAgICAgRGVzdEFkZHI7ICAgICAgICAgICAgICAgLyogZGVzdC4gYWRkci4gKGlmIHMvZzogLTEpICovCisgICAgICAgICAgICB1MzIgICAgIHNnX2Nhbno7ICAgICAgICAgICAgICAgIC8qIHMvZyBlbGVtZW50IGNvdW50ICovCiAgICAgICAgICAgICBnZHRoX3NnNjRfc3RyIHNnX2xzdFtHRFRIX01BWFNHXTsgICAvKiBzL2cgbGlzdCAqLwotICAgICAgICB9IFBBQ0tFRCBjYWNoZTY0OyAgICAgICAgICAgICAgICAgICAgICAgLyogY2FjaGUgc2VydmljZSBjbWQuIHN0ci4gKi8KKyAgICAgICAgfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBjYWNoZTY0OyAgICAgICAgICAgICAgICAgICAgICAgLyogY2FjaGUgc2VydmljZSBjbWQuIHN0ci4gKi8KICAgICAgICAgc3RydWN0IHsKLSAgICAgICAgICAgIHVzaG9ydCAgICAgIHBhcmFtX3NpemU7ICAgICAgICAgICAgIC8qIHNpemUgb2YgcF9wYXJhbSBidWZmZXIgKi8KLSAgICAgICAgICAgIHVsb25nMzIgICAgIHN1YmZ1bmM7ICAgICAgICAgICAgICAgIC8qIElPQ1RMIGZ1bmN0aW9uICovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBjaGFubmVsOyAgICAgICAgICAgICAgICAvKiBkZXZpY2UgKi8KLSAgICAgICAgICAgIHVsb25nNjQgICAgIHBfcGFyYW07ICAgICAgICAgICAgICAgIC8qIGJ1ZmZlciAqLwotICAgICAgICB9IFBBQ0tFRCBpb2N0bDsgICAgICAgICAgICAgICAgICAgICAgICAgLyogSU9DVEwgY29tbWFuZCBzdHJ1Y3R1cmUgKi8KKyAgICAgICAgICAgIHUxNiAgICAgIHBhcmFtX3NpemU7ICAgICAgICAgICAgIC8qIHNpemUgb2YgcF9wYXJhbSBidWZmZXIgKi8KKyAgICAgICAgICAgIHUzMiAgICAgc3ViZnVuYzsgICAgICAgICAgICAgICAgLyogSU9DVEwgZnVuY3Rpb24gKi8KKyAgICAgICAgICAgIHUzMiAgICAgY2hhbm5lbDsgICAgICAgICAgICAgICAgLyogZGV2aWNlICovCisgICAgICAgICAgICB1NjQgICAgIHBfcGFyYW07ICAgICAgICAgICAgICAgIC8qIGJ1ZmZlciAqLworICAgICAgICB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGlvY3RsOyAgICAgICAgICAgICAgICAgICAgICAgICAvKiBJT0NUTCBjb21tYW5kIHN0cnVjdHVyZSAqLwogICAgICAgICBzdHJ1Y3QgewotICAgICAgICAgICAgdXNob3J0ICAgICAgcmVzZXJ2ZWQ7CisgICAgICAgICAgICB1MTYgICAgICByZXNlcnZlZDsKICAgICAgICAgICAgIHVuaW9uIHsKICAgICAgICAgICAgICAgICBzdHJ1Y3QgewotICAgICAgICAgICAgICAgICAgICB1bG9uZzMyICBtc2dfaGFuZGxlOyAgICAgICAgLyogbWVzc2FnZSBoYW5kbGUgKi8KLSAgICAgICAgICAgICAgICAgICAgdWxvbmc2NCAgbXNnX2FkZHI7ICAgICAgICAgIC8qIG1lc3NhZ2UgYnVmZmVyIGFkZHJlc3MgKi8KLSAgICAgICAgICAgICAgICB9IFBBQ0tFRCBtc2c7Ci0gICAgICAgICAgICAgICAgdW5jaGFyICAgICAgIGRhdGFbMTJdOyAgICAgICAgICAvKiBidWZmZXIgZm9yIHJ0YyBkYXRhLCAuLi4gKi8KKyAgICAgICAgICAgICAgICAgICAgdTMyICBtc2dfaGFuZGxlOyAgICAgICAgLyogbWVzc2FnZSBoYW5kbGUgKi8KKyAgICAgICAgICAgICAgICAgICAgdTY0ICBtc2dfYWRkcjsgICAgICAgICAgLyogbWVzc2FnZSBidWZmZXIgYWRkcmVzcyAqLworICAgICAgICAgICAgICAgIH0gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgbXNnOworICAgICAgICAgICAgICAgIHU4ICAgICAgIGRhdGFbMTJdOyAgICAgICAgICAvKiBidWZmZXIgZm9yIHJ0YyBkYXRhLCAuLi4gKi8KICAgICAgICAgICAgIH0gc3U7Ci0gICAgICAgIH0gUEFDS0VEIHNjcmVlbjsgICAgICAgICAgICAgICAgICAgICAgICAvKiBzY3JlZW4gc2VydmljZSBjbWQuIHN0ci4gKi8KKyAgICAgICAgfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBzY3JlZW47ICAgICAgICAgICAgICAgICAgICAgICAgLyogc2NyZWVuIHNlcnZpY2UgY21kLiBzdHIuICovCiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1c2hvcnQgICAgICByZXNlcnZlZDsKLSAgICAgICAgICAgIHVsb25nMzIgICAgIGRpcmVjdGlvbjsgICAgICAgICAgICAgIC8qIGRhdGEgZGlyZWN0aW9uICovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBtZGlzY190aW1lOyAgICAgICAgICAgICAvKiBkaXNjLiB0aW1lICgwOiBubyB0aW1lb3V0KSovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBtY29uX3RpbWU7ICAgICAgICAgICAgICAvKiBjb25uZWN0IHRpbWUoMDogbm8gdG8uKSAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgc2RhdGE7ICAgICAgICAgICAgICAgICAgLyogZGVzdC4gYWRkci4gKGlmIHMvZzogLTEpICovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBzZGxlbjsgICAgICAgICAgICAgICAgICAvKiBkYXRhIGxlbmd0aCAoYnl0ZXMpICovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBjbGVuOyAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIGNtZC4gbGVuZ3RoKDYsMTAsMTIpICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICBjbWRbMTJdOyAgICAgICAgICAgICAgICAvKiBTQ1NJIGNvbW1hbmQgKi8KLSAgICAgICAgICAgIHVuY2hhciAgICAgIHRhcmdldDsgICAgICAgICAgICAgICAgIC8qIHRhcmdldCBJRCAqLwotICAgICAgICAgICAgdW5jaGFyICAgICAgbHVuOyAgICAgICAgICAgICAgICAgICAgLyogTFVOICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICBidXM7ICAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIGJ1cyBudW1iZXIgKi8KLSAgICAgICAgICAgIHVuY2hhciAgICAgIHByaW9yaXR5OyAgICAgICAgICAgICAgIC8qIG9ubHkgMCB1c2VkICovCi0gICAgICAgICAgICB1bG9uZzMyICAgICBzZW5zZV9sZW47ICAgICAgICAgICAgICAvKiBzZW5zZSBkYXRhIGxlbmd0aCAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgc2Vuc2VfZGF0YTsgICAgICAgICAgICAgLyogc2Vuc2UgZGF0YSBhZGRyLiAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgbGlua19wOyAgICAgICAgICAgICAgICAgLyogbGlua2VkIGNtZHMgKG5vdCBzdXBwLikgKi8KLSAgICAgICAgICAgIHVsb25nMzIgICAgIHNnX3Jhbno7ICAgICAgICAgICAgICAgIC8qIHMvZyBlbGVtZW50IGNvdW50ICovCisgICAgICAgICAgICB1MTYgICAgICByZXNlcnZlZDsKKyAgICAgICAgICAgIHUzMiAgICAgZGlyZWN0aW9uOyAgICAgICAgICAgICAgLyogZGF0YSBkaXJlY3Rpb24gKi8KKyAgICAgICAgICAgIHUzMiAgICAgbWRpc2NfdGltZTsgICAgICAgICAgICAgLyogZGlzYy4gdGltZSAoMDogbm8gdGltZW91dCkqLworICAgICAgICAgICAgdTMyICAgICBtY29uX3RpbWU7ICAgICAgICAgICAgICAvKiBjb25uZWN0IHRpbWUoMDogbm8gdG8uKSAqLworICAgICAgICAgICAgdTMyICAgICBzZGF0YTsgICAgICAgICAgICAgICAgICAvKiBkZXN0LiBhZGRyLiAoaWYgcy9nOiAtMSkgKi8KKyAgICAgICAgICAgIHUzMiAgICAgc2RsZW47ICAgICAgICAgICAgICAgICAgLyogZGF0YSBsZW5ndGggKGJ5dGVzKSAqLworICAgICAgICAgICAgdTMyICAgICBjbGVuOyAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIGNtZC4gbGVuZ3RoKDYsMTAsMTIpICovCisgICAgICAgICAgICB1OCAgICAgIGNtZFsxMl07ICAgICAgICAgICAgICAgIC8qIFNDU0kgY29tbWFuZCAqLworICAgICAgICAgICAgdTggICAgICB0YXJnZXQ7ICAgICAgICAgICAgICAgICAvKiB0YXJnZXQgSUQgKi8KKyAgICAgICAgICAgIHU4ICAgICAgbHVuOyAgICAgICAgICAgICAgICAgICAgLyogTFVOICovCisgICAgICAgICAgICB1OCAgICAgIGJ1czsgICAgICAgICAgICAgICAgICAgIC8qIFNDU0kgYnVzIG51bWJlciAqLworICAgICAgICAgICAgdTggICAgICBwcmlvcml0eTsgICAgICAgICAgICAgICAvKiBvbmx5IDAgdXNlZCAqLworICAgICAgICAgICAgdTMyICAgICBzZW5zZV9sZW47ICAgICAgICAgICAgICAvKiBzZW5zZSBkYXRhIGxlbmd0aCAqLworICAgICAgICAgICAgdTMyICAgICBzZW5zZV9kYXRhOyAgICAgICAgICAgICAvKiBzZW5zZSBkYXRhIGFkZHIuICovCisgICAgICAgICAgICB1MzIgICAgIGxpbmtfcDsgICAgICAgICAgICAgICAgIC8qIGxpbmtlZCBjbWRzIChub3Qgc3VwcC4pICovCisgICAgICAgICAgICB1MzIgICAgIHNnX3Jhbno7ICAgICAgICAgICAgICAgIC8qIHMvZyBlbGVtZW50IGNvdW50ICovCiAgICAgICAgICAgICBnZHRoX3NnX3N0ciBzZ19sc3RbR0RUSF9NQVhTR107ICAgICAvKiBzL2cgbGlzdCAqLwotICAgICAgICB9IFBBQ0tFRCByYXc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogcmF3IHNlcnZpY2UgY21kLiBzdHJ1Y3QuICovCisgICAgICAgIH0gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgcmF3OyAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHJhdyBzZXJ2aWNlIGNtZC4gc3RydWN0LiAqLwogICAgICAgICBzdHJ1Y3QgewotICAgICAgICAgICAgdXNob3J0ICAgICAgcmVzZXJ2ZWQ7Ci0gICAgICAgICAgICB1bG9uZzMyICAgICBkaXJlY3Rpb247ICAgICAgICAgICAgICAvKiBkYXRhIGRpcmVjdGlvbiAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgbWRpc2NfdGltZTsgICAgICAgICAgICAgLyogZGlzYy4gdGltZSAoMDogbm8gdGltZW91dCkqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgbWNvbl90aW1lOyAgICAgICAgICAgICAgLyogY29ubmVjdCB0aW1lKDA6IG5vIHRvLikgKi8KLSAgICAgICAgICAgIHVsb25nNjQgICAgIHNkYXRhOyAgICAgICAgICAgICAgICAgIC8qIGRlc3QuIGFkZHIuIChpZiBzL2c6IC0xKSAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgc2RsZW47ICAgICAgICAgICAgICAgICAgLyogZGF0YSBsZW5ndGggKGJ5dGVzKSAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgY2xlbjsgICAgICAgICAgICAgICAgICAgLyogU0NTSSBjbWQuIGxlbmd0aCg2LC4uLDE2KSAqLwotICAgICAgICAgICAgdW5jaGFyICAgICAgY21kWzE2XTsgICAgICAgICAgICAgICAgLyogU0NTSSBjb21tYW5kICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICB0YXJnZXQ7ICAgICAgICAgICAgICAgICAvKiB0YXJnZXQgSUQgKi8KLSAgICAgICAgICAgIHVuY2hhciAgICAgIGx1bjsgICAgICAgICAgICAgICAgICAgIC8qIExVTiAqLwotICAgICAgICAgICAgdW5jaGFyICAgICAgYnVzOyAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBidXMgbnVtYmVyICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICBwcmlvcml0eTsgICAgICAgICAgICAgICAvKiBvbmx5IDAgdXNlZCAqLwotICAgICAgICAgICAgdWxvbmczMiAgICAgc2Vuc2VfbGVuOyAgICAgICAgICAgICAgLyogc2Vuc2UgZGF0YSBsZW5ndGggKi8KLSAgICAgICAgICAgIHVsb25nNjQgICAgIHNlbnNlX2RhdGE7ICAgICAgICAgICAgIC8qIHNlbnNlIGRhdGEgYWRkci4gKi8KLSAgICAgICAgICAgIHVsb25nMzIgICAgIHNnX3Jhbno7ICAgICAgICAgICAgICAgIC8qIHMvZyBlbGVtZW50IGNvdW50ICovCisgICAgICAgICAgICB1MTYgICAgICByZXNlcnZlZDsKKyAgICAgICAgICAgIHUzMiAgICAgZGlyZWN0aW9uOyAgICAgICAgICAgICAgLyogZGF0YSBkaXJlY3Rpb24gKi8KKyAgICAgICAgICAgIHUzMiAgICAgbWRpc2NfdGltZTsgICAgICAgICAgICAgLyogZGlzYy4gdGltZSAoMDogbm8gdGltZW91dCkqLworICAgICAgICAgICAgdTMyICAgICBtY29uX3RpbWU7ICAgICAgICAgICAgICAvKiBjb25uZWN0IHRpbWUoMDogbm8gdG8uKSAqLworICAgICAgICAgICAgdTY0ICAgICBzZGF0YTsgICAgICAgICAgICAgICAgICAvKiBkZXN0LiBhZGRyLiAoaWYgcy9nOiAtMSkgKi8KKyAgICAgICAgICAgIHUzMiAgICAgc2RsZW47ICAgICAgICAgICAgICAgICAgLyogZGF0YSBsZW5ndGggKGJ5dGVzKSAqLworICAgICAgICAgICAgdTMyICAgICBjbGVuOyAgICAgICAgICAgICAgICAgICAvKiBTQ1NJIGNtZC4gbGVuZ3RoKDYsLi4sMTYpICovCisgICAgICAgICAgICB1OCAgICAgIGNtZFsxNl07ICAgICAgICAgICAgICAgIC8qIFNDU0kgY29tbWFuZCAqLworICAgICAgICAgICAgdTggICAgICB0YXJnZXQ7ICAgICAgICAgICAgICAgICAvKiB0YXJnZXQgSUQgKi8KKyAgICAgICAgICAgIHU4ICAgICAgbHVuOyAgICAgICAgICAgICAgICAgICAgLyogTFVOICovCisgICAgICAgICAgICB1OCAgICAgIGJ1czsgICAgICAgICAgICAgICAgICAgIC8qIFNDU0kgYnVzIG51bWJlciAqLworICAgICAgICAgICAgdTggICAgICBwcmlvcml0eTsgICAgICAgICAgICAgICAvKiBvbmx5IDAgdXNlZCAqLworICAgICAgICAgICAgdTMyICAgICBzZW5zZV9sZW47ICAgICAgICAgICAgICAvKiBzZW5zZSBkYXRhIGxlbmd0aCAqLworICAgICAgICAgICAgdTY0ICAgICBzZW5zZV9kYXRhOyAgICAgICAgICAgICAvKiBzZW5zZSBkYXRhIGFkZHIuICovCisgICAgICAgICAgICB1MzIgICAgIHNnX3Jhbno7ICAgICAgICAgICAgICAgIC8qIHMvZyBlbGVtZW50IGNvdW50ICovCiAgICAgICAgICAgICBnZHRoX3NnNjRfc3RyIHNnX2xzdFtHRFRIX01BWFNHXTsgICAvKiBzL2cgbGlzdCAqLwotICAgICAgICB9IFBBQ0tFRCByYXc2NDsgICAgICAgICAgICAgICAgICAgICAgICAgLyogcmF3IHNlcnZpY2UgY21kLiBzdHJ1Y3QuICovCisgICAgICAgIH0gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgcmF3NjQ7ICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHJhdyBzZXJ2aWNlIGNtZC4gc3RydWN0LiAqLwogICAgIH0gdTsKICAgICAvKiBhZGRpdGlvbmFsIHZhcmlhYmxlcyAqLwotICAgIHVuY2hhciAgICAgIFNlcnZpY2U7ICAgICAgICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBzZXJ2aWNlICovCi0gICAgdW5jaGFyICAgICAgcmVzZXJ2ZWQ7Ci0gICAgdXNob3J0ICAgICAgU3RhdHVzOyAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb21tYW5kIHJlc3VsdCAqLwotICAgIHVsb25nMzIgICAgIEluZm87ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogYWRkaXRpb25hbCBpbmZvcm1hdGlvbiAqLworICAgIHU4ICAgICAgU2VydmljZTsgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIHNlcnZpY2UgKi8KKyAgICB1OCAgICAgIHJlc2VydmVkOworICAgIHUxNiAgICAgIFN0YXR1czsgICAgICAgICAgICAgICAgICAgICAgICAgLyogY29tbWFuZCByZXN1bHQgKi8KKyAgICB1MzIgICAgIEluZm87ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogYWRkaXRpb25hbCBpbmZvcm1hdGlvbiAqLwogICAgIHZvaWQgICAgICAgICpSZXF1ZXN0QnVmZmVyOyAgICAgICAgICAgICAgICAgLyogcmVxdWVzdCBidWZmZXIgKi8KLX0gUEFDS0VEIGdkdGhfY21kX3N0cjsKK30gX19hdHRyaWJ1dGVfXygocGFja2VkKSkgZ2R0aF9jbWRfc3RyOwogCiAvKiBjb250cm9sbGVyIGV2ZW50IHN0cnVjdHVyZSAqLwogI2RlZmluZSBFU19BU1lOQyAgICAxCkBAIC0xNDIsMTI5ICsxMzQsMTI5IEBACiAjZGVmaW5lIEVTX1RFU1QgICAgIDMKICNkZWZpbmUgRVNfU1lOQyAgICAgNAogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVzaG9ydCAgICAgICAgICAgICAgICAgIHNpemU7ICAgICAgICAgICAgICAgLyogc2l6ZSBvZiBzdHJ1Y3R1cmUgKi8KKyAgICB1MTYgICAgICAgICAgICAgICAgICBzaXplOyAgICAgICAgICAgICAgIC8qIHNpemUgb2Ygc3RydWN0dXJlICovCiAgICAgdW5pb24gewogICAgICAgICBjaGFyICAgICAgICAgICAgICAgIHN0cmVhbVsxNl07CiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1c2hvcnQgICAgICAgICAgaW9ub2RlOwotICAgICAgICAgICAgdXNob3J0ICAgICAgICAgIHNlcnZpY2U7Ci0gICAgICAgICAgICB1bG9uZzMyICAgICAgICAgaW5kZXg7Ci0gICAgICAgIH0gUEFDS0VEIGRyaXZlcjsKKyAgICAgICAgICAgIHUxNiAgICAgICAgICBpb25vZGU7CisgICAgICAgICAgICB1MTYgICAgICAgICAgc2VydmljZTsKKyAgICAgICAgICAgIHUzMiAgICAgICAgIGluZGV4OworICAgICAgICB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIGRyaXZlcjsKICAgICAgICAgc3RydWN0IHsKLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBpb25vZGU7Ci0gICAgICAgICAgICB1c2hvcnQgICAgICAgICAgc2VydmljZTsKLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBzdGF0dXM7Ci0gICAgICAgICAgICB1bG9uZzMyICAgICAgICAgaW5mbzsKLSAgICAgICAgICAgIHVuY2hhciAgICAgICAgICBzY3NpX2Nvb3JkWzNdOwotICAgICAgICB9IFBBQ0tFRCBhc3luYzsKKyAgICAgICAgICAgIHUxNiAgICAgICAgICBpb25vZGU7CisgICAgICAgICAgICB1MTYgICAgICAgICAgc2VydmljZTsKKyAgICAgICAgICAgIHUxNiAgICAgICAgICBzdGF0dXM7CisgICAgICAgICAgICB1MzIgICAgICAgICBpbmZvOworICAgICAgICAgICAgdTggICAgICAgICAgc2NzaV9jb29yZFszXTsKKyAgICAgICAgfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBhc3luYzsKICAgICAgICAgc3RydWN0IHsKLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBpb25vZGU7Ci0gICAgICAgICAgICB1c2hvcnQgICAgICAgICAgc2VydmljZTsKLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBzdGF0dXM7Ci0gICAgICAgICAgICB1bG9uZzMyICAgICAgICAgaW5mbzsKLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBob3N0ZHJpdmU7Ci0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgc2NzaV9jb29yZFszXTsKLSAgICAgICAgICAgIHVuY2hhciAgICAgICAgICBzZW5zZV9rZXk7Ci0gICAgICAgIH0gUEFDS0VEIHN5bmM7CisgICAgICAgICAgICB1MTYgICAgICAgICAgaW9ub2RlOworICAgICAgICAgICAgdTE2ICAgICAgICAgIHNlcnZpY2U7CisgICAgICAgICAgICB1MTYgICAgICAgICAgc3RhdHVzOworICAgICAgICAgICAgdTMyICAgICAgICAgaW5mbzsKKyAgICAgICAgICAgIHUxNiAgICAgICAgICBob3N0ZHJpdmU7CisgICAgICAgICAgICB1OCAgICAgICAgICBzY3NpX2Nvb3JkWzNdOworICAgICAgICAgICAgdTggICAgICAgICAgc2Vuc2Vfa2V5OworICAgICAgICB9IF9fYXR0cmlidXRlX18oKHBhY2tlZCkpIHN5bmM7CiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1bG9uZzMyICAgICAgICAgbDEsIGwyLCBsMywgbDQ7Ci0gICAgICAgIH0gUEFDS0VEIHRlc3Q7CisgICAgICAgICAgICB1MzIgICAgICAgICBsMSwgbDIsIGwzLCBsNDsKKyAgICAgICAgfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSB0ZXN0OwogICAgIH0gZXU7Ci0gICAgdWxvbmczMiAgICAgICAgICAgICAgICAgc2V2ZXJpdHk7Ci0gICAgdW5jaGFyICAgICAgICAgICAgICAgICAgZXZlbnRfc3RyaW5nWzI1Nl07ICAgICAgICAgIAotfSBQQUNLRUQgZ2R0aF9ldnRfZGF0YTsKKyAgICB1MzIgICAgICAgICAgICAgICAgIHNldmVyaXR5OworICAgIHU4ICAgICAgICAgICAgICAgICAgZXZlbnRfc3RyaW5nWzI1Nl07ICAgICAgICAgIAorfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRoX2V2dF9kYXRhOwogCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdWxvbmczMiAgICAgICAgIGZpcnN0X3N0YW1wOwotICAgIHVsb25nMzIgICAgICAgICBsYXN0X3N0YW1wOwotICAgIHVzaG9ydCAgICAgICAgICBzYW1lX2NvdW50OwotICAgIHVzaG9ydCAgICAgICAgICBldmVudF9zb3VyY2U7Ci0gICAgdXNob3J0ICAgICAgICAgIGV2ZW50X2lkeDsKLSAgICB1bmNoYXIgICAgICAgICAgYXBwbGljYXRpb247Ci0gICAgdW5jaGFyICAgICAgICAgIHJlc2VydmVkOworICAgIHUzMiAgICAgICAgIGZpcnN0X3N0YW1wOworICAgIHUzMiAgICAgICAgIGxhc3Rfc3RhbXA7CisgICAgdTE2ICAgICAgICAgIHNhbWVfY291bnQ7CisgICAgdTE2ICAgICAgICAgIGV2ZW50X3NvdXJjZTsKKyAgICB1MTYgICAgICAgICAgZXZlbnRfaWR4OworICAgIHU4ICAgICAgICAgIGFwcGxpY2F0aW9uOworICAgIHU4ICAgICAgICAgIHJlc2VydmVkOwogICAgIGdkdGhfZXZ0X2RhdGEgICBldmVudF9kYXRhOwotfSBQQUNLRUQgZ2R0aF9ldnRfc3RyOworfSBfX2F0dHJpYnV0ZV9fKChwYWNrZWQpKSBnZHRoX2V2dF9zdHI7CiAKIAogI2lmZGVmIEdEVEhfSU9DVExfUFJPQwogLyogSU9DVEwgc3RydWN0dXJlICh3cml0ZSkgKi8KIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1bG9uZzMyICAgICAgICAgICAgICAgICBtYWdpYzsgICAgICAgICAgICAgIC8qIElPQ1RMIG1hZ2ljICovCi0gICAgdXNob3J0ICAgICAgICAgICAgICAgICAgaW9jdGw7ICAgICAgICAgICAgICAvKiBJT0NUTCAqLwotICAgIHVzaG9ydCAgICAgICAgICAgICAgICAgIGlvbm9kZTsgICAgICAgICAgICAgLyogY29udHJvbGxlciBudW1iZXIgKi8KLSAgICB1c2hvcnQgICAgICAgICAgICAgICAgICBzZXJ2aWNlOyAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgc2VydmljZSAqLwotICAgIHVzaG9ydCAgICAgICAgICAgICAgICAgIHRpbWVvdXQ7ICAgICAgICAgICAgLyogdGltZW91dCAqLworICAgIHUzMiAgICAgICAgICAgICAgICAgbWFnaWM7ICAgICAgICAgICAgICAvKiBJT0NUTCBtYWdpYyAqLworICAgIHUxNiAgICAgICAgICAgICAgICAgIGlvY3RsOyAgICAgICAgICAgICAgLyogSU9DVEwgKi8KKyAgICB1MTYgICAgICAgICAgICAgICAgICBpb25vZGU7ICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgbnVtYmVyICovCisgICAgdTE2ICAgICAgICAgICAgICAgICAgc2VydmljZTsgICAgICAgICAgICAvKiBjb250cm9sbGVyIHNlcnZpY2UgKi8KKyAgICB1MTYgICAgICAgICAgICAgICAgICB0aW1lb3V0OyAgICAgICAgICAgIC8qIHRpbWVvdXQgKi8KICAgICB1bmlvbiB7CiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgY29tbWFuZFs1MTJdOyAgICAgICAvKiBjb250cm9sbGVyIGNvbW1hbmQgKi8KLSAgICAgICAgICAgIHVuY2hhciAgICAgICAgICBkYXRhWzFdOyAgICAgICAgICAgIC8qIGFkZC4gZGF0YSAqLworICAgICAgICAgICAgdTggICAgICAgICAgY29tbWFuZFs1MTJdOyAgICAgICAvKiBjb250cm9sbGVyIGNvbW1hbmQgKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGRhdGFbMV07ICAgICAgICAgICAgLyogYWRkLiBkYXRhICovCiAgICAgICAgIH0gZ2VuZXJhbDsKICAgICAgICAgc3RydWN0IHsKLSAgICAgICAgICAgIHVuY2hhciAgICAgICAgICBsb2NrOyAgICAgICAgICAgICAgIC8qIGxvY2svdW5sb2NrICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgZHJpdmVfY250OyAgICAgICAgICAvKiBkcml2ZSBjb3VudCAqLwotICAgICAgICAgICAgdXNob3J0ICAgICAgICAgIGRyaXZlc1tNQVhfSERSSVZFU107LyogZHJpdmVzICovCisgICAgICAgICAgICB1OCAgICAgICAgICBsb2NrOyAgICAgICAgICAgICAgIC8qIGxvY2svdW5sb2NrICovCisgICAgICAgICAgICB1OCAgICAgICAgICBkcml2ZV9jbnQ7ICAgICAgICAgIC8qIGRyaXZlIGNvdW50ICovCisgICAgICAgICAgICB1MTYgICAgICAgICAgZHJpdmVzW01BWF9IRFJJVkVTXTsvKiBkcml2ZXMgKi8KICAgICAgICAgfSBsb2NrZHJ2OwogICAgICAgICBzdHJ1Y3QgewotICAgICAgICAgICAgdW5jaGFyICAgICAgICAgIGxvY2s7ICAgICAgICAgICAgICAgLyogbG9jay91bmxvY2sgKi8KLSAgICAgICAgICAgIHVuY2hhciAgICAgICAgICBjaGFubmVsOyAgICAgICAgICAgIC8qIGNoYW5uZWwgKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGxvY2s7ICAgICAgICAgICAgICAgLyogbG9jay91bmxvY2sgKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGNoYW5uZWw7ICAgICAgICAgICAgLyogY2hhbm5lbCAqLwogICAgICAgICB9IGxvY2tjaG47CiAgICAgICAgIHN0cnVjdCB7CiAgICAgICAgICAgICBpbnQgICAgICAgICAgICAgZXJhc2U7ICAgICAgICAgICAgICAvKiBlcmFzZSBldmVudCA/ICovCiAgICAgICAgICAgICBpbnQgICAgICAgICAgICAgaGFuZGxlOwotICAgICAgICAgICAgdW5jaGFyICAgICAgICAgIGV2dFtFVkVOVF9TSVpFXTsgICAgLyogZXZlbnQgc3RydWN0dXJlICovCisgICAgICAgICAgICB1OCAgICAgICAgICBldnRbRVZFTlRfU0laRV07ICAgIC8qIGV2ZW50IHN0cnVjdHVyZSAqLwogICAgICAgICB9IGV2ZW50OwogICAgICAgICBzdHJ1Y3QgewotICAgICAgICAgICAgdW5jaGFyICAgICAgICAgIGJ1czsgICAgICAgICAgICAgICAgLyogU0NTSSBidXMgKi8KLSAgICAgICAgICAgIHVuY2hhciAgICAgICAgICB0YXJnZXQ7ICAgICAgICAgICAgIC8qIHRhcmdldCBJRCAqLwotICAgICAgICAgICAgdW5jaGFyICAgICAgICAgIGx1bjsgICAgICAgICAgICAgICAgLyogTFVOICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgY21kX2xlbjsgICAgICAgICAgICAvKiBjb21tYW5kIGxlbmd0aCAqLwotICAgICAgICAgICAgdW5jaGFyICAgICAgICAgIGNtZFsxMl07ICAgICAgICAgICAgLyogU0NTSSBjb21tYW5kICovCisgICAgICAgICAgICB1OCAgICAgICAgICBidXM7ICAgICAgICAgICAgICAgIC8qIFNDU0kgYnVzICovCisgICAgICAgICAgICB1OCAgICAgICAgICB0YXJnZXQ7ICAgICAgICAgICAgIC8qIHRhcmdldCBJRCAqLworICAgICAgICAgICAgdTggICAgICAgICAgbHVuOyAgICAgICAgICAgICAgICAvKiBMVU4gKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGNtZF9sZW47ICAgICAgICAgICAgLyogY29tbWFuZCBsZW5ndGggKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGNtZFsxMl07ICAgICAgICAgICAgLyogU0NTSSBjb21tYW5kICovCiAgICAgICAgIH0gc2NzaTsKICAgICAgICAgc3RydWN0IHsKLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBoZHJfbm87ICAgICAgICAgICAgIC8qIGhvc3QgZHJpdmUgbnVtYmVyICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgZmxhZzsgICAgICAgICAgICAgICAvKiBvbGQgbWV0aC4vYWRkL3JlbW92ZSAqLworICAgICAgICAgICAgdTE2ICAgICAgICAgIGhkcl9ubzsgICAgICAgICAgICAgLyogaG9zdCBkcml2ZSBudW1iZXIgKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGZsYWc7ICAgICAgICAgICAgICAgLyogb2xkIG1ldGguL2FkZC9yZW1vdmUgKi8KICAgICAgICAgfSByZXNjYW47CiAgICAgfSBpdTsKIH0gZ2R0aF9pb3dyX3N0cjsKIAogLyogSU9DVEwgc3RydWN0dXJlIChyZWFkKSAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVsb25nMzIgICAgICAgICAgICAgICAgIHNpemU7ICAgICAgICAgICAgICAgLyogYnVmZmVyIHNpemUgKi8KLSAgICB1bG9uZzMyICAgICAgICAgICAgICAgICBzdGF0dXM7ICAgICAgICAgICAgIC8qIElPQ1RMIGVycm9yIGNvZGUgKi8KKyAgICB1MzIgICAgICAgICAgICAgICAgIHNpemU7ICAgICAgICAgICAgICAgLyogYnVmZmVyIHNpemUgKi8KKyAgICB1MzIgICAgICAgICAgICAgICAgIHN0YXR1czsgICAgICAgICAgICAgLyogSU9DVEwgZXJyb3IgY29kZSAqLwogICAgIHVuaW9uIHsKICAgICAgICAgc3RydWN0IHsKLSAgICAgICAgICAgIHVuY2hhciAgICAgICAgICBkYXRhWzFdOyAgICAgICAgICAgIC8qIGRhdGEgKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGRhdGFbMV07ICAgICAgICAgICAgLyogZGF0YSAqLwogICAgICAgICB9IGdlbmVyYWw7CiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1c2hvcnQgICAgICAgICAgdmVyc2lvbjsgICAgICAgICAgICAvKiBkcml2ZXIgdmVyc2lvbiAqLworICAgICAgICAgICAgdTE2ICAgICAgICAgIHZlcnNpb247ICAgICAgICAgICAgLyogZHJpdmVyIHZlcnNpb24gKi8KICAgICAgICAgfSBkcnZlcnM7CiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgdHlwZTsgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIHR5cGUgKi8KLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBpbmZvOyAgICAgICAgICAgICAgIC8qIHNsb3QgZXRjLiAqLwotICAgICAgICAgICAgdXNob3J0ICAgICAgICAgIG9lbV9pZDsgICAgICAgICAgICAgLyogT0VNIElEICovCi0gICAgICAgICAgICB1c2hvcnQgICAgICAgICAgYmlvc192ZXI7ICAgICAgICAgICAvKiBub3QgdXNlZCAqLwotICAgICAgICAgICAgdXNob3J0ICAgICAgICAgIGFjY2VzczsgICAgICAgICAgICAgLyogbm90IHVzZWQgKi8KLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBleHRfdHlwZTsgICAgICAgICAgIC8qIGV4dGVuZGVkIHR5cGUgKi8KLSAgICAgICAgICAgIHVzaG9ydCAgICAgICAgICBkZXZpY2VfaWQ7ICAgICAgICAgIC8qIGRldmljZSBJRCAqLwotICAgICAgICAgICAgdXNob3J0ICAgICAgICAgIHN1Yl9kZXZpY2VfaWQ7ICAgICAgLyogc3ViIGRldmljZSBJRCAqLworICAgICAgICAgICAgdTggICAgICAgICAgdHlwZTsgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIHR5cGUgKi8KKyAgICAgICAgICAgIHUxNiAgICAgICAgICBpbmZvOyAgICAgICAgICAgICAgIC8qIHNsb3QgZXRjLiAqLworICAgICAgICAgICAgdTE2ICAgICAgICAgIG9lbV9pZDsgICAgICAgICAgICAgLyogT0VNIElEICovCisgICAgICAgICAgICB1MTYgICAgICAgICAgYmlvc192ZXI7ICAgICAgICAgICAvKiBub3QgdXNlZCAqLworICAgICAgICAgICAgdTE2ICAgICAgICAgIGFjY2VzczsgICAgICAgICAgICAgLyogbm90IHVzZWQgKi8KKyAgICAgICAgICAgIHUxNiAgICAgICAgICBleHRfdHlwZTsgICAgICAgICAgIC8qIGV4dGVuZGVkIHR5cGUgKi8KKyAgICAgICAgICAgIHUxNiAgICAgICAgICBkZXZpY2VfaWQ7ICAgICAgICAgIC8qIGRldmljZSBJRCAqLworICAgICAgICAgICAgdTE2ICAgICAgICAgIHN1Yl9kZXZpY2VfaWQ7ICAgICAgLyogc3ViIGRldmljZSBJRCAqLwogICAgICAgICB9IGN0cnR5cGU7CiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgdmVyc2lvbjsgICAgICAgICAgICAvKiBPUyB2ZXJzaW9uICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgc3VidmVyc2lvbjsgICAgICAgICAvKiBPUyBzdWJ2ZXJzaW9uICovCi0gICAgICAgICAgICB1c2hvcnQgICAgICAgICAgcmV2aXNpb247ICAgICAgICAgICAvKiByZXZpc2lvbiAqLworICAgICAgICAgICAgdTggICAgICAgICAgdmVyc2lvbjsgICAgICAgICAgICAvKiBPUyB2ZXJzaW9uICovCisgICAgICAgICAgICB1OCAgICAgICAgICBzdWJ2ZXJzaW9uOyAgICAgICAgIC8qIE9TIHN1YnZlcnNpb24gKi8KKyAgICAgICAgICAgIHUxNiAgICAgICAgICByZXZpc2lvbjsgICAgICAgICAgIC8qIHJldmlzaW9uICovCiAgICAgICAgIH0gb3N2ZXJzOwogICAgICAgICBzdHJ1Y3QgewotICAgICAgICAgICAgdXNob3J0ICAgICAgICAgIGNvdW50OyAgICAgICAgICAgICAgLyogY29udHJvbGxlciBjb3VudCAqLworICAgICAgICAgICAgdTE2ICAgICAgICAgIGNvdW50OyAgICAgICAgICAgICAgLyogY29udHJvbGxlciBjb3VudCAqLwogICAgICAgICB9IGN0cmNudDsKICAgICAgICAgc3RydWN0IHsKICAgICAgICAgICAgIGludCAgICAgICAgICAgICBoYW5kbGU7Ci0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgZXZ0W0VWRU5UX1NJWkVdOyAgICAvKiBldmVudCBzdHJ1Y3R1cmUgKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGV2dFtFVkVOVF9TSVpFXTsgICAgLyogZXZlbnQgc3RydWN0dXJlICovCiAgICAgICAgIH0gZXZlbnQ7CiAgICAgICAgIHN0cnVjdCB7Ci0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgYnVzOyAgICAgICAgICAgICAgICAvKiBTQ1NJIGJ1cywgMHhmZjogaW52YWxpZCAqLwotICAgICAgICAgICAgdW5jaGFyICAgICAgICAgIHRhcmdldDsgICAgICAgICAgICAgLyogdGFyZ2V0IElEICovCi0gICAgICAgICAgICB1bmNoYXIgICAgICAgICAgbHVuOyAgICAgICAgICAgICAgICAvKiBMVU4gKi8KLSAgICAgICAgICAgIHVuY2hhciAgICAgICAgICBjbHVzdGVyX3R5cGU7ICAgICAgIC8qIGNsdXN0ZXIgcHJvcGVydGllcyAqLworICAgICAgICAgICAgdTggICAgICAgICAgYnVzOyAgICAgICAgICAgICAgICAvKiBTQ1NJIGJ1cywgMHhmZjogaW52YWxpZCAqLworICAgICAgICAgICAgdTggICAgICAgICAgdGFyZ2V0OyAgICAgICAgICAgICAvKiB0YXJnZXQgSUQgKi8KKyAgICAgICAgICAgIHU4ICAgICAgICAgIGx1bjsgICAgICAgICAgICAgICAgLyogTFVOICovCisgICAgICAgICAgICB1OCAgICAgICAgICBjbHVzdGVyX3R5cGU7ICAgICAgIC8qIGNsdXN0ZXIgcHJvcGVydGllcyAqLwogICAgICAgICB9IGhkcl9saXN0W01BWF9IRFJJVkVTXTsgICAgICAgICAgICAgICAgLyogaW5kZXggaXMgaG9zdCBkcml2ZSBudW1iZXIgKi8KICAgICB9IGl1OwogfSBnZHRoX2lvcmRfc3RyOwpAQCAtMjcyLDUzICsyNjQsNTMgQEAKIAogLyogR0RUSU9DVExfR0VORVJBTCAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVzaG9ydCBpb25vZGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBudW1iZXIgKi8KLSAgICB1c2hvcnQgdGltZW91dDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRpbWVvdXQgKi8KLSAgICB1bG9uZzMyIGluZm87ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGVycm9yIGluZm8gKi8gCi0gICAgdXNob3J0IHN0YXR1czsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBzdGF0dXMgKi8KLSAgICB1bG9uZyBkYXRhX2xlbjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGRhdGEgYnVmZmVyIHNpemUgKi8KLSAgICB1bG9uZyBzZW5zZV9sZW47ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHNlbnNlIGJ1ZmZlciBzaXplICovCisgICAgdTE2IGlvbm9kZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG51bWJlciAqLworICAgIHUxNiB0aW1lb3V0OyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogdGltZW91dCAqLworICAgIHUzMiBpbmZvOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBlcnJvciBpbmZvICovIAorICAgIHUxNiBzdGF0dXM7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogc3RhdHVzICovCisgICAgdW5zaWduZWQgbG9uZyBkYXRhX2xlbjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGRhdGEgYnVmZmVyIHNpemUgKi8KKyAgICB1bnNpZ25lZCBsb25nIHNlbnNlX2xlbjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogc2Vuc2UgYnVmZmVyIHNpemUgKi8KICAgICBnZHRoX2NtZF9zdHIgY29tbWFuZDsgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvbW1hbmQgKi8gICAgICAgICAgICAgICAgICAgCiB9IGdkdGhfaW9jdGxfZ2VuZXJhbDsKIAogLyogR0RUSU9DVExfTE9DS0RSViAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVzaG9ydCBpb25vZGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBudW1iZXIgKi8KLSAgICB1bmNoYXIgbG9jazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGxvY2svdW5sb2NrICovCi0gICAgdW5jaGFyIGRyaXZlX2NudDsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBkcml2ZSBjb3VudCAqLwotICAgIHVzaG9ydCBkcml2ZXNbTUFYX0hEUklWRVNdOyAgICAgICAgICAgICAgICAgLyogZHJpdmVzICovCisgICAgdTE2IGlvbm9kZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG51bWJlciAqLworICAgIHU4IGxvY2s7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBsb2NrL3VubG9jayAqLworICAgIHU4IGRyaXZlX2NudDsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBkcml2ZSBjb3VudCAqLworICAgIHUxNiBkcml2ZXNbTUFYX0hEUklWRVNdOyAgICAgICAgICAgICAgICAgLyogZHJpdmVzICovCiB9IGdkdGhfaW9jdGxfbG9ja2RydjsKIAogLyogR0RUSU9DVExfTE9DS0NITiAqLwogdHlwZWRlZiBzdHJ1Y3QgewotICAgIHVzaG9ydCBpb25vZGU7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciBudW1iZXIgKi8KLSAgICB1bmNoYXIgbG9jazsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGxvY2svdW5sb2NrICovCi0gICAgdW5jaGFyIGNoYW5uZWw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjaGFubmVsICovCisgICAgdTE2IGlvbm9kZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG51bWJlciAqLworICAgIHU4IGxvY2s7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBsb2NrL3VubG9jayAqLworICAgIHU4IGNoYW5uZWw7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjaGFubmVsICovCiB9IGdkdGhfaW9jdGxfbG9ja2NobjsKIAogLyogR0RUSU9DVExfT1NWRVJTICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdW5jaGFyIHZlcnNpb247ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBPUyB2ZXJzaW9uICovCi0gICAgdW5jaGFyIHN1YnZlcnNpb247ICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBPUyBzdWJ2ZXJzaW9uICovCi0gICAgdXNob3J0IHJldmlzaW9uOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiByZXZpc2lvbiAqLworICAgIHU4IHZlcnNpb247ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBPUyB2ZXJzaW9uICovCisgICAgdTggc3VidmVyc2lvbjsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIE9TIHN1YnZlcnNpb24gKi8KKyAgICB1MTYgcmV2aXNpb247ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHJldmlzaW9uICovCiB9IGdkdGhfaW9jdGxfb3N2ZXJzOwogCiAvKiBHRFRJT0NUTF9DVFJUWVBFICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdXNob3J0IGlvbm9kZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG51bWJlciAqLwotICAgIHVuY2hhciB0eXBlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogY29udHJvbGxlciB0eXBlICovCi0gICAgdXNob3J0IGluZm87ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBzbG90IGV0Yy4gKi8KLSAgICB1c2hvcnQgb2VtX2lkOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIE9FTSBJRCAqLwotICAgIHVzaG9ydCBiaW9zX3ZlcjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogbm90IHVzZWQgKi8KLSAgICB1c2hvcnQgYWNjZXNzOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG5vdCB1c2VkICovCi0gICAgdXNob3J0IGV4dF90eXBlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBleHRlbmRlZCB0eXBlICovCi0gICAgdXNob3J0IGRldmljZV9pZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBkZXZpY2UgSUQgKi8KLSAgICB1c2hvcnQgc3ViX2RldmljZV9pZDsgICAgICAgICAgICAgICAgICAgICAgIC8qIHN1YiBkZXZpY2UgSUQgKi8KKyAgICB1MTYgaW9ub2RlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgbnVtYmVyICovCisgICAgdTggdHlwZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgdHlwZSAqLworICAgIHUxNiBpbmZvOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogc2xvdCBldGMuICovCisgICAgdTE2IG9lbV9pZDsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBPRU0gSUQgKi8KKyAgICB1MTYgYmlvc192ZXI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIG5vdCB1c2VkICovCisgICAgdTE2IGFjY2VzczsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBub3QgdXNlZCAqLworICAgIHUxNiBleHRfdHlwZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZXh0ZW5kZWQgdHlwZSAqLworICAgIHUxNiBkZXZpY2VfaWQ7ICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZGV2aWNlIElEICovCisgICAgdTE2IHN1Yl9kZXZpY2VfaWQ7ICAgICAgICAgICAgICAgICAgICAgICAvKiBzdWIgZGV2aWNlIElEICovCiB9IGdkdGhfaW9jdGxfY3RydHlwZTsKIAogLyogR0RUSU9DVExfRVZFTlQgKi8KIHR5cGVkZWYgc3RydWN0IHsKLSAgICB1c2hvcnQgaW9ub2RlOworICAgIHUxNiBpb25vZGU7CiAgICAgaW50IGVyYXNlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBlcmFzZSBldmVudD8gKi8KICAgICBpbnQgaGFuZGxlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGV2ZW50IGhhbmRsZSAqLwogICAgIGdkdGhfZXZ0X3N0ciBldmVudDsKQEAgLTMyNiwyMiArMzE4LDIyIEBACiAKIC8qIEdEVElPQ1RMX1JFU0NBTi9HRFRJT0NUTF9IRFJMSVNUICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdXNob3J0IGlvbm9kZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG51bWJlciAqLwotICAgIHVuY2hhciBmbGFnOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogYWRkL3JlbW92ZSAqLwotICAgIHVzaG9ydCBoZHJfbm87ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogZHJpdmUgbm8uICovCisgICAgdTE2IGlvbm9kZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG51bWJlciAqLworICAgIHU4IGZsYWc7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBhZGQvcmVtb3ZlICovCisgICAgdTE2IGhkcl9ubzsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBkcml2ZSBuby4gKi8KICAgICBzdHJ1Y3QgewotICAgICAgICB1bmNoYXIgYnVzOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBidXMgKi8KLSAgICAgICAgdW5jaGFyIHRhcmdldDsgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHRhcmdldCBJRCAqLwotICAgICAgICB1bmNoYXIgbHVuOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogTFVOICovCi0gICAgICAgIHVuY2hhciBjbHVzdGVyX3R5cGU7ICAgICAgICAgICAgICAgICAgICAvKiBjbHVzdGVyIHByb3BlcnRpZXMgKi8KKyAgICAgICAgdTggYnVzOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogU0NTSSBidXMgKi8KKyAgICAgICAgdTggdGFyZ2V0OyAgICAgICAgICAgICAgICAgICAgICAgICAgLyogdGFyZ2V0IElEICovCisgICAgICAgIHU4IGx1bjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIExVTiAqLworICAgICAgICB1OCBjbHVzdGVyX3R5cGU7ICAgICAgICAgICAgICAgICAgICAvKiBjbHVzdGVyIHByb3BlcnRpZXMgKi8KICAgICB9IGhkcl9saXN0W01BWF9IRFJJVkVTXTsgICAgICAgICAgICAgICAgICAgIC8qIGluZGV4IGlzIGhvc3QgZHJpdmUgbnVtYmVyICovCiB9IGdkdGhfaW9jdGxfcmVzY2FuOwogCiAvKiBHRFRJT0NUTF9SRVNFVF9CVVMvR0RUSU9DVExfUkVTRVRfRFJWICovCiB0eXBlZGVmIHN0cnVjdCB7Ci0gICAgdXNob3J0IGlvbm9kZTsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBjb250cm9sbGVyIG51bWJlciAqLwotICAgIHVzaG9ydCBudW1iZXI7ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyogYnVzL2hvc3QgZHJpdmUgbnVtYmVyICovCi0gICAgdXNob3J0IHN0YXR1czsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBzdGF0dXMgKi8KKyAgICB1MTYgaW9ub2RlOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIGNvbnRyb2xsZXIgbnVtYmVyICovCisgICAgdTE2IG51bWJlcjsgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvKiBidXMvaG9zdCBkcml2ZSBudW1iZXIgKi8KKyAgICB1MTYgc3RhdHVzOyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8qIHN0YXR1cyAqLwogfSBnZHRoX2lvY3RsX3Jlc2V0OwogCiAjZW5kaWYKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9nZHRoX3Byb2MuYyBiL2RyaXZlcnMvc2NzaS9nZHRoX3Byb2MuYwppbmRleCAxMjU4ZGEzLi5mZmIyYjIxIDEwMDY0NAotLS0gYS9kcml2ZXJzL3Njc2kvZ2R0aF9wcm9jLmMKKysrIGIvZHJpdmVycy9zY3NpL2dkdGhfcHJvYy5jCkBAIC00Myw3ICs0Myw3IEBACiAgICAgaW50IGksIGZvdW5kOwogICAgIGdkdGhfY21kX3N0ciAgICBnZHRjbWQ7CiAgICAgZ2R0aF9jcGFyX3N0ciAgICpwY3BhcjsKLSAgICB1bG9uZzY0ICAgICAgICAgcGFkZHI7CisgICAgdTY0ICAgICAgICAgcGFkZHI7CiAKICAgICBjaGFyICAgICAgICAgICAgY21uZFtNQVhfQ09NTUFORF9TSVpFXTsKICAgICBtZW1zZXQoY21uZCwgMHhmZiwgMTIpOwpAQCAtMTU2LDggKzE1Niw4IEBACiAgICAgb2ZmX3QgYmVnaW4gPSAwLHBvcyA9IDA7CiAgICAgaW50IGlkLCBpLCBqLCBrLCBzZWMsIGZsYWc7CiAgICAgaW50IG5vX21kcnYgPSAwLCBkcnZfbm8sIGlzX21pcnI7Ci0gICAgdWxvbmczMiBjbnQ7Ci0gICAgdWxvbmc2NCBwYWRkcjsKKyAgICB1MzIgY250OworICAgIHU2NCBwYWRkcjsKICAgICBpbnQgcmMgPSAtRU5PTUVNOwogCiAgICAgZ2R0aF9jbWRfc3RyICpnZHRjbWQ7CkBAIC0yMjAsMTQgKzIyMCwxNCBAQAogCiAgICAgaWYgKGhhLT5tb3JlX3Byb2MpCiAgICAgICAgIHNwcmludGYoaHJlYywgIiVkLiUwMmQuJTAyZC0lYyUwM1giLCAKLSAgICAgICAgICAgICAgICAodW5jaGFyKShoYS0+YmluZm8udXBkX2Z3X3Zlcj4+MjQpLAotICAgICAgICAgICAgICAgICh1bmNoYXIpKGhhLT5iaW5mby51cGRfZndfdmVyPj4xNiksCi0gICAgICAgICAgICAgICAgKHVuY2hhcikoaGEtPmJpbmZvLnVwZF9md192ZXIpLAorICAgICAgICAgICAgICAgICh1OCkoaGEtPmJpbmZvLnVwZF9md192ZXI+PjI0KSwKKyAgICAgICAgICAgICAgICAodTgpKGhhLT5iaW5mby51cGRfZndfdmVyPj4xNiksCisgICAgICAgICAgICAgICAgKHU4KShoYS0+YmluZm8udXBkX2Z3X3ZlciksCiAgICAgICAgICAgICAgICAgaGEtPmJmZWF0LnJhaWQgPyAnUic6J04nLAogICAgICAgICAgICAgICAgIGhhLT5iaW5mby51cGRfcmV2aXNpb24pOwogICAgIGVsc2UKLSAgICAgICAgc3ByaW50ZihocmVjLCAiJWQuJTAyZCIsICh1bmNoYXIpKGhhLT5jcGFyLnZlcnNpb24+PjgpLAotICAgICAgICAgICAgICAgICh1bmNoYXIpKGhhLT5jcGFyLnZlcnNpb24pKTsKKyAgICAgICAgc3ByaW50ZihocmVjLCAiJWQuJTAyZCIsICh1OCkoaGEtPmNwYXIudmVyc2lvbj4+OCksCisgICAgICAgICAgICAgICAgKHU4KShoYS0+Y3Bhci52ZXJzaW9uKSk7CiAKICAgICBzaXplID0gc3ByaW50ZihidWZmZXIrbGVuLAogICAgICAgICAgICAgICAgICAgICIgRHJpdmVyIFZlci46ICBcdCUtMTBzXHRGaXJtd2FyZSBWZXIuOiBcdCVzXG4iLApAQCAtMjgxLDcgKzI4MSw3IEBACiAgICAgICAgICAgICBwZHMtPmJpZCA9IGhhLT5yYXdbaV0ubG9jYWxfbm87CiAgICAgICAgICAgICBwZHMtPmZpcnN0ID0gMDsKICAgICAgICAgICAgIHBkcy0+ZW50cmllcyA9IGhhLT5yYXdbaV0ucGRldl9jbnQ7Ci0gICAgICAgICAgICBjbnQgPSAoMypHRFRIX1NDUkFUQ0gvNCAtIDUgKiBzaXplb2YodWxvbmczMikpIC8KKyAgICAgICAgICAgIGNudCA9ICgzKkdEVEhfU0NSQVRDSC80IC0gNSAqIHNpemVvZih1MzIpKSAvCiAgICAgICAgICAgICAgICAgc2l6ZW9mKHBkcy0+bGlzdFswXSk7CiAgICAgICAgICAgICBpZiAocGRzLT5lbnRyaWVzID4gY250KQogICAgICAgICAgICAgICAgIHBkcy0+ZW50cmllcyA9IGNudDsKQEAgLTYwNCw3ICs2MDQsNyBAQAogCiAgICAgICAgICAgICBzaXplID0gc3ByaW50ZihidWZmZXIrbGVuLAogICAgICAgICAgICAgICAgICAgICAgICAgICAgIiBDYXBhY2l0eSBbTUJdOlx0JS02ZCAgICBcdFN0YXJ0IFNlY3RvcjogIFx0JWRcbiIsCi0gICAgICAgICAgICAgICAgICAgICAgICAgICAodWxvbmczMikoaGEtPmhkcltpXS5zaXplLzIwNDgpLCBoYS0+aGRyW2ldLnN0YXJ0X3NlYyk7CisgICAgICAgICAgICAgICAg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wotCV9fdTMyICAgICAgICAgICAgIEJ1czo2OwotCV9fdTMyICAgICAgICAgICAgIE1vZGU6MjsKKwl1MzIgICAgICAgICAgICAgVGFyZ2V0SWQ6MjQ7CisJdTMyICAgICAgICAgICAgIEJ1czo2OworCXUzMiAgICAgICAgICAgICBNb2RlOjI7CiAJLyogMiBsZXZlbCB0YXJnZXQgZGV2aWNlIGFkZHIgKi8KIAl1bmlvbiBTQ1NJM0FkZHIgIFRhcmdldFsyXTsKIH07CiAKIHN0cnVjdCBMb2dEZXZBZGRyIHsKLQlfX3UzMiAgICAgICAgICAgIFZvbElkOjMwOwotCV9fdTMyICAgICAgICAgICAgTW9kZToyOwotCV9fdTggICAgICAgICAgICAgcmVzZXJ2ZWRbNF07CisJdTMyICAgICAgICAgICAgVm9sSWQ6MzA7CisJdTMyICAgICAgICAgICAgTW9kZToyOworCXU4ICAgICAgICAgICAgIHJlc2VydmVkWzRdOwogfTsKIAogdW5pb24gTFVOQWRkciB7Ci0JX191OCAgICAgICAgICAgICAgIEx1bkFkZHJCeXRlc1s4XTsKKwl1OCAgICAgICAgICAgICAgIEx1bkFkZHJCeXRlc1s4XTsKIAl1bmlvbiBTQ1NJM0FkZHIgICAgU0NTSTNMdW5bNF07CiAJc3RydWN0IFBoeXNEZXZBZGRyIFBoeXNEZXY7CiAJc3RydWN0IExvZ0RldkFkZHIgIExvZ0RldjsKIH07CiAKIHN0cnVjdCBDb21tYW5kTGlzdEhlYWRlciB7Ci0JX191OCAgICAgICAgICAgICAgUmVwbHlRdWV1ZTsKLQlfX3U4ICAgICAgICAgICAgICBTR0xpc3Q7Ci0JX191MTYgICAgICAgICAgICAgU0dUb3RhbDsKKwl1OCAgICAgICAgICAgICAgUmVwbHlRdWV1ZTsKKwl1OCAgICAgICAgICAgICAgU0dMaXN0OworCXUxNiAgICAgICAgICAgICBTR1RvdGFsOwogCXN0cnVjdCB2YWxzMzIgICAgIFRhZzsKIAl1bmlvbiBMVU5BZGRyICAgICBMVU47CiB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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgotICogQ29weXJpZ2h0IChDKSAyMDA5IEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwOS0yMDEwIEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTIxLDYgKzIxLDcgQEAKICNpbmNsdWRlIDxsaW51eC9pbnRlcnJ1cHQuaD4KICNpbmNsdWRlIDxsaW51eC9tZW1wb29sLmg+CiAjaW5jbHVkZSA8bGludXgvcGNpLmg+CisjaW5jbHVkZSA8bGludXgvZGVsYXkuaD4KIAogI2luY2x1ZGUgPHNjc2kvc2NzaS5oPgogI2luY2x1ZGUgPHNjc2kvc2NzaV9ob3N0Lmg+CkBAIC0zMyw2ICszNCw3IEBACiAjaW5jbHVkZSAibHBmY19zbGkuaCIKICNpbmNsdWRlICJscGZjX3NsaTQuaCIKICNpbmNsdWRlICJscGZjX25sLmgiCisjaW5jbHVkZSAibHBmY19ic2cuaCIKICNpbmNsdWRlICJscGZjX2Rpc2MuaCIKICNpbmNsdWRlICJscGZjX3Njc2kuaCIKICNpbmNsdWRlICJscGZjLmgiCkBAIC00MSwxNCArNDMsMTgzIEBACiAjaW5jbHVkZSAibHBmY192cG9ydC5oIgogI2luY2x1ZGUgImxwZmNfdmVyc2lvbi5oIgogCitzdHJ1Y3QgbHBmY19ic2dfZXZlbnQgeworCXN0cnVjdCBsaXN0X2hlYW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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKiBUaGlzIGZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgorICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAxMCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgICAgICAqCisgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgorICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKKyAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCisgKiBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsgeW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yICAgKgorICogbW9kaWZ5IGl0IHVuZGVyIHRoZSB0ZXJtcyBvZiB2ZXJzaW9uIDIgb2YgdGhlIEdOVSBHZW5lcmFsICAgICAgICoKKyAqIFB1YmxpYyBMaWNlbnNlIGFzIHB1Ymxpc2hlZCBieSB0aGUgRnJlZSBTb2Z0d2FyZSBGb3VuZGF0aW9uLiAgICAqCisgKiBUaGlzIHByb2dyYW0gaXMgZGlzdHJpYnV0ZWQgaW4gdGhlIGhvcGUgdGhhdCBpdCB3aWxsIGJlIHVzZWZ1bC4gKgorICogQUxMIEVYUFJFU1MgT1IgSU1QTElFRCBDT05ESVRJT05TLCBSRVBSRVNFTlRBVElPTlMgQU5EICAgICAgICAgICoKKyAqIFdBUlJBTlRJRVMsIElOQ0xVRElORyBBTlkg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MDA0LTIwMDggRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKKyAqIENvcHlyaWdodCAoQykgMjAwNC0yMDEwIEVtdWxleC4gIEFsbCByaWdodHMgcmVzZXJ2ZWQuICAgICAgICAgICAqCiAgKiBFTVVMRVggYW5kIFNMSSBhcmUgdHJhZGVtYXJrcyBvZiBFbXVsZXguICAgICAgICAgICAgICAgICAgICAgICAgKgogICogd3d3LmVtdWxleC5jb20gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCkBAIC00NCwxOCArNDQsMjYgQEAKIHZvaWQgbHBmY191bnJlZ19sb2dpbihzdHJ1Y3QgbHBmY19oYmEgKiwgdWludDE2X3QsIHVpbnQzMl90LCBMUEZDX01CT1hRX3QgKik7CiB2b2lkIGxwZmNfdW5yZWdfZGlkKHN0cnVjdCBscGZjX2hiYSAqLCB1aW50MTZfdCwgdWludDMyX3QsIExQRkNfTUJPWFFfdCAqKTsKIHZvaWQgbHBmY19yZWdfdnBpKHN0cnVjdCBscGZjX3Zwb3J0ICosIExQRkNfTUJPWFFfdCAqKTsKK3ZvaWQgbHBmY19yZWdpc3Rlcl9uZXdfdnBvcnQoc3RydWN0IGxwZmNfaGJhICosIHN0cnVjdCBscGZjX3Zwb3J0ICosCisJCQlzdHJ1Y3QgbHBmY19ub2RlbGlzdCAqKTsKIHZvaWQgbHBmY191bnJlZ192cGkoc3RydWN0IGxwZmNfaGJhICosIHVpbnQxNl90LCBMUEZDX01CT1hRX3QgKik7CiB2b2lkIGxwZmNfaW5pdF9saW5rKHN0cnVjdCBscGZjX2hiYSAqLCBMUEZDX01CT1hRX3QgKiwgdWludDMyX3QsIHVpbnQzMl90KTsKIHZvaWQgbHBmY19yZXF1ZXN0X2ZlYXR1cmVzKHN0cnVjdCBscGZj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V9yaW5nICosCitpbnQgbHBmY19ic2dfY3RfdW5zb2xfZXZlbnQoc3RydWN0IGxwZmNfaGJhICosIHN0cnVjdCBscGZjX3NsaV9yaW5nICosCiAJCQkgICAgIHN0cnVjdCBscGZjX2lvY2JxICopOwpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19jdC5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19jdC5jCmluZGV4IDBlYmNkOWIuLmM3ZTkyMTkgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfY3QuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2N0LmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwOSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTAgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTk3LDcgKz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tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ody5oIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19ody5oCmluZGV4IGM5ZmFhMWQuLjg5ZmY3YzAgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaHcuaAorKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX2h3LmgKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwOSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTAgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKQEAgLTEzNDYsNiArMTM0Niw5IEBACiAjZGVmaW5lIE1CWF9IRUFSVEJFQVQgICAgICAgMHgzMQogI2RlZmluZSBNQlhfV1JJVEVfVlBBUk1TICAgIDB4MzIKICNkZWZpbmUgTUJYX0FTWU5DRVZUX0VOQUJMRSAweDMzCisj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X0VWRU5UX1RZUEVfRkNGX0RFQUQJCTB4MwogI2RlZmluZSBMUEZDX0ZDT0VfRVZFTlRfVFlQRV9DVkwJCTB4NAorI2RlZmluZSBMUEZDX0ZDT0VfRVZFTlRfVFlQRV9GQ0ZfUEFSQU1fTU9ECTB4NQogCXVpbnQzMl90IGV2ZW50X3RhZzsKIAl1aW50MzJfdCB0cmFpbGVyOwogfTsKZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfaW5pdC5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19pbml0LmMKaW5kZXggYjhlYjFiNi4uZDI5YWM3YyAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19pbml0LmMKKysrIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY19pbml0LmMKQEAgLTEsNyArMSw3IEBACiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogICogVGhpcyBmaWxlIGlzIHBhcnQgb2YgdGhlIEVtdWxleCBMaW51eCBEZXZpY2UgRHJpdmVyIGZvciAgICAgICAgICoKICAqIEZpYnJlIENoYW5uZWwgSG9zdCBCdXMgQWRhcHRlcnMuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCi0gKiBDb3B5cmlnaHQgKEMpIDIwMDQtMjAwOSBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgKgorICogQ29weXJpZ2h0IChDKSAyMDA0LTIwMTAgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICoKICAqIEVNVUxFWCBhbmQgU0xJIGFyZSB0cmFkZW1hcmtzIG9mIEVtdWxleC4gICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiB3d3cuZW11bGV4LmNvbSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgogICogUG9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ZpbGUgaXMgcGFydCBvZiB0aGUgRW11bGV4IExpbnV4IERldmljZSBEcml2ZXIgZm9yICAgICAgICAgKgogICogRmlicmUgQ2hhbm5lbCBIb3N0IEJ1cyBBZGFwdGVycy4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKLSAqIENvcHlyaWdodCAoQykgMjAwOCBFbXVsZXguICBBbGwgcmlnaHRzIHJlc2VydmVkLiAgICAgICAgICAgICAgICAqCisgKiBDb3B5cmlnaHQgKEMpIDIwMTAgRW11bGV4LiAgQWxsIHJpZ2h0cyByZXNlcnZlZC4gICAgICAgICAgICAgICAgKgogICogRU1VTEVYIGFuZCBTTEkgYXJlIHRyYWRlbWFya3Mgb2YgRW11bGV4LiAgICAgICAgICAgICAgICAgICAgICAgICoKICAqIHd3dy5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMTc3LDIzICsxNzcsMyBAQAogCXVpbnQzMl90IGRhdGE7CiB9OwogCi0vKiBic2cgZGVmaW5pdGlvbnMgKi8KLSNkZWZpbmUgTFBGQ19CU0dfVkVORE9SX1NFVF9DVF9FVkVOVAkxCi0jZGVmaW5lIExQRkNfQlNHX1ZFTkRPUl9HRVRfQ1RfRVZFTlQJMgotCi1zdHJ1Y3Qgc2V0X2N0X2V2ZW50IHsKLQl1aW50MzJfdCBjb21tYW5kOwotCXVpbnQzMl90IGV2X3JlcV9pZDsKLQl1aW50MzJfdCBldl9yZWdfaWQ7Ci19OwotCi1zdHJ1Y3QgZ2V0X2N0X2V2ZW50IHsKLQl1aW50MzJfdCBjb21tYW5kOwotCXVpbnQzMl90IGV2X3JlZ19pZDsKLQl1aW50MzJfdCBldl9yZXFfaWQ7Ci19OwotCi1zdHJ1Y3QgZ2V0X2N0X2V2ZW50X3JlcGx5IHsKL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5lbXVsZXguY29tICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqCiAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKgpAQCAtMTgsNyArMTgsNyBAQAogICogaW5jbHVkZWQgd2l0aCB0aGlzIHBhY2thZ2UuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICoKICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLwogCi0jZGVmaW5lIExQRkNfRFJJVkVSX1ZFUlNJT04gIjguMy43IgorI2RlZmluZSBMUEZDX0RSSVZFUl9WRVJTSU9OICI4LjMuOSIKICNkZWZpbmUgTFBGQ19EUklWRVJfTkFNRQkJImxwZmMiCiAjZGVmaW5lIExQRkNfU1BfRFJJVkVSX0hBTkRMRVJfTkFNRQkibHBmYzpzcCIKICNkZWZpbmUgTFBGQ19GUF9EUklWRVJfSEFORExFUl9OQU1FCSJscGZjOmZwIgpkaWZmIC0tZ2l0IGEvZHJpdmVycy9zY3NpL2xwZmMvbHBmY192cG9ydC5jIGIvZHJpdmVycy9zY3NpL2xwZmMvbHBmY192cG9ydC5jCmluZGV4IGUzYzdmYTYuLmRjODZlODcgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9scGZjL2xwZmNfdnBvcnQuYworKysgYi9kcml2ZXJzL3Njc2kvbHBmYy9scGZjX3Zwb3J0LmMKQEAgLTM4OSw3ICszODksNyBAQAogCSAqIGJ5IHRoZSBwb3J0LgogCSAqLwogCWlmICgocGhiYS0+c2xpX3JldiA9PSBMUEZDX1NMSV9SRVY0KSAmJgotCSAgICAocHBvcnQtPnZwaV9zdGF0ZSAmIExQRkNfVlBJX1JFR0lTVEVSRUQpKSB7CisJCShwcG9ydC0+ZmNfZmxhZyAmIEZDX1ZGSV9SRUdJU1RFUkVEKSkgewogCQ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gwMDAwMDgwMCkKICNkZWZpbmUgTVBJMl9JT1VOSVRQQUdFMV9NQVNLX1NBVEFfV1JJVEVfQ0FDSEUgICAgICAgICAgKDB4MDAwMDA2MDApCiAjZGVmaW5lIE1QSTJfSU9VTklUUEFHRTFfRU5BQkxFX1NBVEFfV1JJVEVfQ0FDSEUgICAgICAgICgweDAwMDAwMDAwKQogI2RlZmluZSBNUEkyX0lPVU5JVFBBR0UxX0RJU0FCTEVfU0FUQV9XUklURV9DQUNIRSAgICAgICAoMHgwMDAwMDIwMCkKQEAgLTIyOTEsNiArMjI5NCwyNiBAQAogI2RlZmluZSBNUEkyX1NBU1BIWTNfUEFHRVZFUlNJT04gICAgICAgICAgICAoMHgwMCkKIAogCisvKiBTQVMgUEhZIFBhZ2UgNCAqLworCit0eXBlZGVmIHN0cnVjdCBfTVBJMl9DT05GSUdfUEFHRV9TQVNfUEhZXzQgeworICAgIE1QSTJfQ09ORklHX0VYVEVOREVEX1BBR0VfSEVBREVSICAgIEhlYWRlcjsgICAgICAgICAgICAgICAgICAgICAvKiAweDAwICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQxOyAgICAgICAgICAgICAgICAgIC8qIDB4MDggKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDI7ICAgICAgICAgICAgICAgICAgLyogMHgwQSAqLworICAgIFU4ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZsYWdzOyAgICAgICAgICAgICAgICAgICAgICAvKiAweDBCICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSW5pdGlhbEZyYW1lWzI4XTsgICAgICAgICAgIC8qIDB4MEMgKi8KK30gTVBJMl9DT05GSUdfUEFHRV9TQVNfUEhZXzQsIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9DT05GSUdfUEFHRV9TQVNfUEhZXzQsCisgIE1waTJTYXNQaHlQYWdlNF90LCBNUEkyX1BPSU5URVIgcE1waTJTYXNQaHlQYWdlNF90OworCisjZGVmaW5lIE1QSTJfU0FTUEhZNF9QQUdFVkVSU0lPTiAgICAgICAgICAgICgweDAwKQorCisvKiB2YWx1ZXMgZm9yIHRoZSBGbGFncyBmaWVsZCAqLworI2RlZmluZSBNUEkyX1NBU1BIWTRfRkxBR1NfRlJBTUVfVkFMSUQgICAgICAgICgweDAyKQorI2RlZmluZSBNUEkyX1NBU1BIWTRfRkxBR1NfU0FUQV9GUkFNRSAgICAgICAgICgweDAxKQorCisKKworCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiAgIFNBUyBQb3J0IENvbmZpZyBQYWdlcwogKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KZGlmZiAtLWdpdCBhL2RyaXZlcnMvc2NzaS9tcHQyc2FzL21waS9tcGkyX2hpc3RvcnkudHh0IGIvZHJpdmVycy9zY3NpL21wdDJzYXMvbXBpL21waTJfaGlzdG9yeS50eHQKaW5kZXggNjVmY2FhMy4uYzRhZGY3NiAxMDA2NDQKLS0tIGEvZHJpdmVycy9zY3NpL21wdDJzYXMvbXBpL21waTJfaGlzdG9yeS50eHQKKysrIGIvZHJpdmVycy9zY3NpL21wdDJzYXMvbXBpL21waTJfaGlzdG9yeS50eHQKQEAgLTUsMjMgKzUsMjQgQEAKICBDb3B5cmlnaHQgKGMpIDIwMDAtMjAwOSBMU0kgQ29ycG9yYXRpb24uCiAKICAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KLSBIZWFkZXIgU2V0IFJlbGVhc2UgVmVyc2lvbjogICAgMDIuMDAuMTIKLSBIZWFkZXIgU2V0IFJlbGVhc2UgRGF0ZTogICAgICAgMDUtMDYtMDkKKyBIZWFk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5oICAgICAgICAgICAgIDAyLjAwLjAzICAgICAgICAgICAgMDIuMDAuMDIKICBtcGkyX3RhcmcuaCAgICAgICAgICAgIDAyLjAwLjAzICAgICAgICAgICAgMDIuMDAuMDMKLSBtcGkyX3Rvb2wuaCAgICAgICAgICAgIDAyLjAwLjAzICAgICAgICAgICAgMDIuMDAuMDIKKyBtcGkyX3Rvb2wuaCAgICAgICAgICAgIDAyLjAwLjA0ICAgICAgICAgICAgMDIuMDAuMDQKICBtcGkyX3R5cGUuaCAgICAgICAgICAgIDAyLjAwLjAwICAgICAgICAgICAgMDIuMDAuMDAKLSBtcGkyX3JhLmggICAgICAgICAgICAgIDAyLjAwLjAwCi0gbXBpMl9oaXN0b3J5LnR4dCAgICAgICAwMi4wMC4xMSAgICAgICAgICAgIDAyLjAwLjEyCisgbXBpMl9yYS5oICAgICAgICAgICAgICAwMi4wMC4wMCAgICAgICAgICAgIDAyLjAwLjAwCisgbXBpMl9oYmQuaCAgICAgICAgICAgICAwMi4wMC4wMAorIG1waTJfaGlzdG9yeS50eHQgICAgICAgMDIuMDAuMTQgICAgICAgICAgICAwMi4wMC4xMwogCiAKICAqICBEYXRlICAgICAgVmVyc2lvbiAgIERlc2NyaXB0aW9uCkBAIC02NSw2ICs2NiwxMSBAQAogICogICAgICAgICAgICAgICAgICAgICAgTVBJMl9TQ1NJX0lPX1NVQ0NFU1NfUkVQTFlfREVTQ1JJUFRPUiBhbmQgbWFkZSB0aG9zZQogICogICAgICAgICAgICAgICAgICAgICAgYnl0ZXMgcmVzZXJ2ZWQuCiAgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBSQUlEIEFjY2VsZXJhdG9yIGZ1bmN0aW9uYWxpdHkuCisgKiAgMDctMzAtMDkgIDAyLjAwLjEzICBCdW1wZWQgTVBJMl9IRUFERVJfVkVSU0lPTl9VTklULgorICogIDEwLTI4LTA5ICAwMi4wMC4xNCAgQnVtcGVkIE1QSTJfSEVBREVSX1ZFUlNJT05fVU5JVC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE1TSS14IGluZGV4IG1hc2sgYW5kIHNoaWZ0IGZvciBSZXBseSBQb3N0IEhvc3QKKyAqICAgICAgICAgICAgICAgICAgICAgIEluZGV4IHJlZ2lzdGVyLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgZnVuY3Rpb24gY29kZSBmb3IgSG9zdCBCYXNlZCBEaXNjb3ZlcnkgQWN0aW9uLgogICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAKIG1waTJfY25mZy5oCkBAIC0xNTUsNiArMTYxLDE1IEBACiAgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBleHBhbmRlciByZWR1Y2VkIGZ1bmN0aW9uYWxpdHkgZGF0YSB0byBTQVMKICAqICAgICAgICAgICAgICAgICAgICAgIEV4cGFuZGVyIFBhZ2UgMC4KICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIFNBUyBQSFkgUGFnZSAyIGFuZCBTQVMgUEhZIFBhZ2UgMy4KKyAqICAwNy0zMC0wOSAgMDIuMDAuMTIgIEFkZGVkIElPIFVuaXQgUGFnZSA3LgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgbmV3IGRldmljZSBpZHMuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBTQVMgSU8gVW5pdCBQYWdlIDUuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBwYXJ0aWFsIGFuZCBzbHVtYmVyIHBvd2VyIG1hbmFnZW1lbnQgY2FwYWJsZSBmbGFncworICogICAgICAgICAgICAgICAgICAgICAgdG8gU0FTIERldmljZSBQYWdlIDAgRmxhZ3MgZmllbGQuCisgKiAgICAgICAgICAgICAgICAgICAgICBBZGRlZCBQaHlJbmZvIGRlZmluZXMgZm9yIHBvd2VyIGNvbmRpdGlvbi4KKy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gZGVmaW5lLgogICogIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCiAKIG1waTJfaW9jLmgKQEAgLTI0Niw2ICsyNjUsMjAgQEAKICAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIHR3byBuZXcgcmVhc29uIGNvZGVzIGZvciBTQVMgRGV2aWNlIFN0YXR1cyBDaGFuZ2UKICAqICAgICAgICAgICAgICAgICAgICAgIEV2ZW50LgogICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgbmV3IGV2ZW50OiBTQVMgUEhZIENvdW50ZXIuCisgKiAgMDctMzAtMDkgIDAyLjAwLjEyICBBZGRlZCBHUElPIEludGVycnVwdCBldmVudCBkZWZpbmUgYW5kIHN0cnVjdHVyZS4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE1QSTJfSU9DRkFDVFNfQ0FQQUJJTElUWV9FWFRFTkRFRF9CVUZGRVIgZGVmaW5lLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgbmV3IHByb2R1Y3QgaWQgZmFtaWx5IGZvciAyMjA4LgorICogIDEwLTI4LTA5ICAwMi4wMC4xMyAgQWRkZWQgSG9zdE1TSXhWZWN0b3JzIGZpZWxkIHRvIE1QSTJfSU9DX0lOSVRfUkVRVUVTVC4KKyAqICAgICAgICAgICAgICAgICAgICAgIEFkZGVkIE1heE1TSXhWZWN0b3JzIGZpZWxkIHRvIE1QSTJfSU9DX0ZBQ1RTX1JFUExZLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgTWluRGV2SGFuZGxlIGZpZWxkIHRvIE1QSTJfSU9DX0ZBQ1RTX1JFUExZLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgTVBJMl9JT0NGQUNUU19DQVBBQklMSVRZX0hPU1RfQkFTRURfRElTQ09WRVJZLgorICogICAgICAgICAgICAgICAgICAgICA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JJMiAgICAgICAgICAgICAgICAgICgweDAwMDBGRjAwKQorI2RlZmluZSBNUEkyX1NDU0lUQVNLTUdNVF9SSV9TSElGVF9BUkkyICAgICAgICAgICAgICAgICAoOCkKKyNkZWZpbmUgTVBJMl9TQ1NJVEFTS01HTVRfUklfTUFTS19BUkkxICAgICAgICAgICAgICAgICAgKDB4MDBGRjAwMDApCisjZGVmaW5lIE1QSTJfU0NTSVRBU0tNR01UX1JJX1NISUZUX0FSSTEgICAgICAgICAgICAgICAgICgxNikKKyNkZWZpbmUgTVBJMl9TQ1NJVEFTS01HTVRfUklfTUFTS19BUkkwICAgICAgICAgICAgICAgICAgKDB4RkYwMDAwMDApCisjZGVmaW5lIE1QSTJfU0NTSVRBU0tNR01UX1JJX1NISUZUX0FSSTAgICAgICAgICAgICAgICAgICgyNCkKKwogCiAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgogKiAgU0NTSSBFbmNsb3N1cmUgUHJvY2Vzc29yIG1lc3NhZ2VzCmRpZmYgLS1naXQgYS9kcml2ZXJzL3Njc2kvbXB0MnNhcy9tcGkvbXBpMl9pb2MuaCBiL2RyaXZlcnMvc2NzaS9tcHQyc2FzL21waS9tcGkyX2lvYy5oCmluZGV4IGVhNTFjZTguLjc1NDkzODQgMTAwNjQ0Ci0tLSBhL2RyaXZlcnMvc2NzaS9tcHQyc2FzL21waS9tcGkyX2lvYy5oCisrKyBiL2RyaXZlcnMvc2NzaS9tcHQyc2FzL21waS9tcGkyX2lvYy5oCkBAIC02LDcgKzYsNyBAQAogICogICAgICAgICAgVGl0bGU6ICBNUEkgSU9DLCBQb3J0LCBFdmVudCwgRlcgRG93bmxvYWQsIGFuZCBGVyBVcGxvYWQgbWVzc2FnZXMKICAqICBDcmVhdGlvbiBEYXRlOiAgT2N0b2JlciAxMSwgMjAwNgogICoKLSAqICBtcGkyX2lvYy5oIFZlcnNpb246ICAwMi4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kYXRhLgorICogICAgICAgICAgICAgICAgICAgICAgQWRkZWQgZGVmaW5lcyBmb3IgUHJvZHVjdElEIFByb2R1Y3QgZmllbGQKKyAqICAgICAgICAgICAgICAgICAgICAgIChNUEkyX0ZXX0hFQURFUl9QSURfKS4KKyAqICAgICAgICAgICAgICAgICAgICAgIE1vZGlmaWVkIHZhbHVlcyBmb3IgU0FTIFByb2R1Y3RJRCBGYW1pbHkKKyAqICAgICAgICAgICAgICAgICAgICAgIChNUEkyX0ZXX0hFQURFUl9QSURfRkFNSUxZXykuCiAgKiAgLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAqLwogCkBAIC0xMTksOCArMTMwLDEwIEBACiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgTXNnVmVyc2lvbjsgICAgICAgICAgICAgICAgICAgICAvKiAweDBDICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgSGVhZGVyVmVyc2lvbjsgICAgICAgICAgICAgICAgICAvKiAweDBFICovCiAgICAgVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ1OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDEwICovCi0gICAgVTMyICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ2OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDE0ICovCi0gICAgVTE2ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ3OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDE4ICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ2OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDE0ICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ3OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDE2ICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgSG9zdE1TSXhWZWN0b3JzOyAgICAgICAgICAgICAgICAvKiAweDE3ICovCisgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQ4OyAgICAgICAgICAgICAgICAgICAgICAvKiAweDE4ICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgU3lzdGVtUmVxdWVzdEZyYW1lU2l6ZTsgICAgICAgICAvKiAweDFBICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgUmVwbHlEZXNjcmlwdG9yUG9zdFF1ZXVlRGVwdGg7ICAvKiAweDFDICovCiAgICAgVTE2ICAgICAgICAgICAgICAgICAgICAgUmVwbHlGcmVlUXVldWVEZXB0aDsgICAgICAgICAgICAvKiAweDFFICovCkBAIC0yMTUsNyArMjI4LDcgQEAKICAgICBVOCAgICAgICAgICAgICAgICAgICAgICBNYXhDaGFpbkRlcHRoOyAgICAgICAgICAgICAgICAgIC8qIDB4MTQgKi8KICAgICBVOCAgICAgICAgICAgICAgICAgICAgICBXaG9Jbml0OyAgICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTUgKi8KICAgICBVOCAgICAgICAgICAgICAgICAgICAgICBOdW1iZXJPZlBvcnRzOyAgICAgICAgICAgICAgICAgIC8qIDB4MTYgKi8KLSAgICBVOCAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDI7ICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MTcgKi8KKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICBNYXhNU0l4VmVjdG9yczsgICAgICAgICAgICAgICAgIC8qIDB4MTcgKi8KICAgICBVMTYgICAgICAgICAgICAgICAgICAgICBSZXF1ZXN0Q3JlZGl0OyAgICAgICAgICAgICAgICAgIC8qIDB4MTggKi8KICAgICBVMTYgICAgICAgICAgICAgICAgICAgICBQcm9kdWN0SUQ7ICAgICAgICAgICAgICAgICAgICAgIC8qIDB4MUEgKi8KICAgICBVMzIgICAgICAgICAgICAgICAgICAgICBJT0NDYXBhYmlsaXRpZXM7ICAgICAgICAgICAgICAgIC8qIDB4MUMgKi8KQEAgLTIzMyw3ICsyNDYsOCBAQAogICAgIFU4ICAgICAgICAgICAgICAgICAgICAgIE1heFZvbHVtZXM7ICAgICAgICAgICAgICAgICAgICAgLyogMHgzNyAqLwogICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIE1heERldkhhbmRsZTsgICAgICAgICAgICAgICAgICAgLyogMHgzOCAqLwogICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIE1heFBlcnNpc3RlbnRFbnRyaWVzOyAgICAgICAgICAgLyogMHgzQSAqLwotICAgIFUzMiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNDsgICAgICAgICAgICAgICAgICAgICAgLyogMHgzQyAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIE1pbkRldkhhbmRsZTsgICAgICAgICAgICAgICAgICAgLyogMHgzQyAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkNDsgICAgICAgICAgICAgICAgICAgICAgLyogMHgzRSAqLwogfSBNUEkyX0lPQ19GQUNUU19SRVBMWSwgTVBJMl9QT0lOVEVSIFBUUl9NUEkyX0lPQ19GQUNUU19SRVBMWSwKICAgTXBpMklPQ0ZhY3RzUmVwbHlfdCwgTVBJMl9QT0lOVEVSIHBNcGkySU9DRmFjdHNSZXBseV90OwogCkBAIC0yNjksNiArMjgzLDcgQEAKIC8qIFByb2R1Y3RJRCBmaWVsZCB1c2VzIE1QSTJfRldfSEVBREVSX1BJRF8gKi8KIAogLyogSU9DQ2FwYWJpbGl0aWVzICovCisjZGVmaW5lIE1QSTJfSU9DRkFDVFNfQ0FQQUJJTElUWV9IT1NUX0JBU0VEX0RJU0NPVkVSWSAgICgweDAwMDEwMDAwKQogI2RlZmluZSBNUEkyX0lPQ0ZBQ1RTX0NBUEFCSUxJVFlfTVNJX1hfSU5ERVggICAgICAgICAgICAoMHgwMDAwODAwMCkKICNkZWZpbmUgTVBJMl9JT0NGQUNUU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RfSEJEX0RFU0NSSVBUT1IgeworICAgIE1QSTJfRVZFTlRfSEJEX1BIWV9TQVMgICAgICBTYXM7Cit9IE1QSTJfRVZFTlRfSEJEX0RFU0NSSVBUT1IsIE1QSTJfUE9JTlRFUiBQVFJfTVBJMl9FVkVOVF9IQkRfREVTQ1JJUFRPUiwKKyAgTXBpMkV2ZW50SGJkRGVzY3JpcHRvcl90LCBNUEkyX1BPSU5URVIgcE1waTJFdmVudEhiZERlc2NyaXB0b3JfdDsKKwordHlwZWRlZiBzdHJ1Y3QgX01QSTJfRVZFTlRfREFUQV9IQkRfUEhZIHsKKyAgICBVOCAgICAgICAgICAgICAgICAgICAgICAgICAgRGVzY3JpcHRvclR5cGU7ICAgICAvKiAweDAwICovCisgICAgVTggICAgICAgICAgICAgICAgICAgICAgICAgIFJlc2VydmVkMTsgICAgICAgICAgLyogMHgwMSAqLworICAgIFUxNiAgICAgICAgICAgICAgICAgICAgICAgICBSZXNlcnZlZDI7ICAgICAgICAgIC8qIDB4MDIgKi8KKyAgICBVMzIgICAgICAgICAgICAgICAgICAgICAgICAgUmVzZXJ2ZWQzOyAgICAgICAgICAvKiAweDA0ICovCisgICAgTVBJMl9FVkVOVF9IQkRfREVTQ1JJUFRPUiAgIERlc2NyaXB0b3I7ICAgICAgICAgLyogMHgwOCAqLworfSBNUEkyX0VWRU5UX0RBVEFfSEJEX1BIWSwgTVBJMl9QT0lOVEVSIFBUUl9NUEkyX0VWRU5UX0RBVEFfSEJEX1BIWSwKKyAgTXBpMkV2ZW50RGF0YUhiZFBoeV90LCBNUEkyX1BPSU5URVIgcE1waTJFdmVudERhdGFNcGkyRXZlbnREYXRhSGJkUGh5X3Q7CisKKy8qIHZhbHVlcyBmb3IgdGhlIERlc2NyaXB0b3JUeXBlIGZpZWxkICovCisjZGVmaW5lIE1QSTJfRVZFTlRfSEJEX0RUX1NBUyAgICAgICAgICAgICAgICgweDAxKQorCisKKwogLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKICogIEV2ZW50QWNrIG1lc3NhZ2UKICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCkBAIC0xMTI2LDEzICsxMTgxLDE3IEBACiAjZGVmaW5lIE1QSTJfRldfSEVBREVSX1BJRF9UWVBFX01BU0sgICAgICAgICAgICAoMHhGMDAwKQogI2RlZmluZSBNUEkyX0ZXX0hFQURFUl9QSURfVFlQRV9TQVMgICAgICAgICAgICAgKDB4MjAwMCkKIAotI2RlZmluZSBNUEkyX0ZXX0hFQURFUl9QSURfUFJPRF9NQVNLICAgICAgICAgICAgKDB4MEYwMCkKLSNkZWZpbmUgTVBJMl9GV19IRUFERVJfUElEX1BST0RfQSAgICAgICAgICAgICAgICgweDAwMDApCisjZGVmaW5lIE1QSTJfRldfSEVBREVSX1BJRF9QUk9EX01BU0sgICAgICAgICAgICAgICAgICAgICgweDBGMDApCisjZGVmaW5lIE1QSTJfRldfSEVBREVSX1BJRF9QUk9EX0EgICAgICAgICAgICAgICAgICAgICAgICgweDAwMDApCisjZGVmaW5lIE1QSTJfRldfSEVBREVSX1BJRF9QUk9EX01BU0sgICAgICAgICAgICAgICAgICAgICgweDBGMDApCisjZGVmaW5lIE1QSTJfRldfSEVBREVSX1BJRF9QUk9EX1RBUkdFVF9JTklUSUFUT1JfU0NTSSAgICgweDAyMDApCisjZGVmaW5lIE1QSTJfRldfSEVBREVSX1BJRF9QUk9EX0lSX1NDU0kgICAgICAgICAgICAgICAgICgweDA3MDApCisKIAogI2RlZmluZSBNUEkyX0ZXX0hFQURFUl9QSURfRkFNSUxZX01BU0sgICAgICAgICAgKDB4MDBGRikKIC8qIFNBUyAqLwotI2RlZmluZSBNUEkyX0ZXX0hFQURFUl9QSURfRkFNSUxZXzIxMDhfU0FTICAgICAgKDB4MDAxMCkKLSNkZWZpbmUgTVBJM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b2cgRGF0YSAqLworI2RlZmluZSBRTEE4NF9NR01UX0lORk9fTE9HX0RBVEEgICAgICAgICAgICAgICAgMiAvKiBHZXQgTG9nIERhdGEgKi8KKyNkZWZpbmUgUUxBODRfTUdNVF9JTkZPX1BPUlRfU1RBVCAgICAgICAgICAgICAgIDMgLyogR2V0IFBvcnQgU3RhdGlzdGljcyAqLworI2RlZmluZSBRTEE4NF9NR01UX0lORk9fTElGX1NUQVQgICAgICAgICAgICAgICAgNCAvKiBHZXQgTElGIFN0YXRpc3RpY3MgICovCisjZGVmaW5lIFFMQTg0X01HTVRfSU5GT19BU0lDX1NUQVQgICAgICAgICAgICAgICA1IC8qIEdldCBBU0lDIFN0YXRpc3RpY3MgKi8KKyNkZWZpbmUgUUxBODRfTUdNVF9JTkZPX0NPTkZJR19QQVJBTVMgICAgICAgICAgIDYgLyogR2V0IENvbmZpZyBQYXJhbWV0ZXJzICovCisjZGVmaW5lIFFMQTg0X01HTVRfSU5GT19QQU5JQ19MT0cgICAgICAgICAgICAgICA3IC8qIEdldCBQYW5pYyBMb2cgKi8KKworCQl1aW50MzJfdCBjb250ZXh0OworLyoKKyogY29udGV4dCBkZWZpbml0aW9ucyBmb3IgUUxBODRfTUdNVF9JTkZPX0NPTkZJR19MT0dfREFUQQorKi8KKyNkZWZpbmUgSUNfTE9HX0RBVEFfTE9HX0lEX0RFQlVHX0xPRyAgICAgICAgICAgICAgICAgICAgMAorI2RlZmluZSBJQ19MT0dfREFUQV9MT0dfSURfTEVBUk5fTE9HICAgICAgICAgICAgICAgICAgICAxCisjZGVmaW5lIElDX0xPR19EQVRBX0xPR19JRF9GQ19BQ0xfSU5HUkVTU19MT0cgICAgICAgICAgIDIKKyNkZWZpbmUgSUNfTE9HX0RBVEFfTE9HX0lEX0ZDX0FDTF9FR1JFU1NfTE9HICAgICAgICAgICAgMworI2RlZmluZSBJQ19MT0dfREFUQV9MT0dfSURfRVRIRVJORVRfQUNMX0lOR1JFU1NfTE9HICAgICA0Cisj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0aGUgRnJlZSBTb2Z0d2FyZQorICogRm91bmRhdGlvbiwgSW5jLiwgNTkgVGVtcGxlIFBsYWNlLCBTdWl0ZSAzMzAsIEJvc3RvbiwgTUEgIDAyMTExLTEzMDcgIFVTQQorICoKKyAqIGlzaWYgaGVhZGVyIGZpbGUKKyAqLworI2lmbmRlZiBfSVNJRl9ICisjZGVmaW5lIF9JU0lGX0gKKworI2luY2x1ZGUgPG1lZGlhL2RhdmluY2kvY2NkY190eXBlcy5oPgorI2luY2x1ZGUgPG1lZGlhL2RhdmluY2kvdnBmZV90eXBlcy5oPgorCisvKiBpc2lmIGZsb2F0IHR5cGUgUzhROC9VOFE4ICovCitzdHJ1Y3QgaXNpZl9mbG9hdF84IHsKKwkvKiA4IGJpdCBpbnRlZ2VyIHBhcnQgKi8KKwlfX3U4IGludGVnZXI7CisJLyogOCBiaXQgZGVjaW1hbCBwYXJ0ICovCisJX191OCBkZWNpbWFsOworfTsKKworLyogaXNpZiBmbG9hdCB0eXBlIFUxNlExNi9TMTZRMTYgKi8KK3N0cnVjdCBpc2lmX2Zsb2F0XzE2IHsKKwkvKiAxNiBiaXQgaW50ZWdlciBwYXJ0ICovCisJX191MTYgaW50ZWdlcjsKKwkvKiAxNiBiaXQgZGVjaW1hbCBwYXJ0ICovCisJX191MTYgZGVjaW1hbDsKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqICAgVmVydGljYWwgRGVmZWN0IENvcnJlY3Rpb24gcGFyYW1ldGVycworICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqLworLyogRGVmZWN0IENvcnJlY3Rpb24gKERGQykgdGFibGUgZW50cnkgKi8KK3N0cnVjdCBpc2lmX3ZkZmNfZW50cnkgeworCS8qIHZlcnRpY2FsIHBvc2l0aW9uIG9mIGRlZmVjdCAqLworCV9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UlpfQkNfU1pfVl8yNTZQSVhFTFMJMworCS8qIEhlaWdodCBvZiB0aGUgc2FtcGxlIHdpbmRvdyBpbiBwaXhlbHMgZm9yIGNhbGN1bGF0aW9uICovCisJX191OCB3aW5fdl9zel9jYWxjOworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICogIEJsYWNrIENsYW1wIHBhcmFtZXRlcnMKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBpc2lmX3ZlcnRfYmNsYW1wIHsKKwkvKiBSZXNldCB2YWx1ZSB1c2VkIGlzIHRoZSBjbGFtcCB2YWx1ZSBjYWxjdWxhdGVkICovCisjZGVmaW5lCUlTSUZfVkVSVF9CQ19VU0VfSE9SWl9DTEFNUF9WQUwJCTAKKwkvKiBSZXNldCB2YWx1ZSB1c2VkIGlzIHJlc2V0X2NsYW1wX3ZhbCBjb25maWd1cmVkICovCisjZGVmaW5lCUlTSUZfVkVSVF9CQ19VU0VfQ09ORklHX0NMQU1QX1ZBTAkxCisJLyogTm8gdXBkYXRlLCBwcmV2aW91cyBpbWFnZSB2YWx1ZSBpcyB1c2VkICovCisjZGVmaW5lCUlTSUZfVkVSVF9CQ19OT19VUERBVEUJCQkyCisJLyoKKwkgKiBSZXNldCB2YWx1ZSBzZWxlY3RvciBmb3IgdmVydGljYWwgY2xhbXAgY2FsY3VsYXRpb24uIFVzZSBvbmUgb2YKKwkgKiB0aGUgYWJvdmUgdmFsdWVzCisJICovCisJX191OCByZXNldF92YWxfc2VsOworCS8qIFU4UTguIExpbmUgYXZlcmFnZSBjb2VmZmljaWVudCB1c2VkIGluIHZlcnRpY2FsIGNsYW1wIGNhbGN1bGF0aW9uICovCisJX191OCBsaW5lX2F2ZV9jb2VmOworCS8qIEhlaWdodCBvZiB0aGUgb3B0aWN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X2JjbGFtcCBob3J6OworCS8qIEJsYWNrIGNsYW1wIGZvciB2ZXJ0aWNhbCBkaXJlY3Rpb24gKi8KKwlzdHJ1Y3QgaXNpZl92ZXJ0X2JjbGFtcCB2ZXJ0OworfTsKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoqIENvbG9yIFNwYWNlIENvbnZlcnRpb24gKENTQykKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCisjZGVmaW5lIElTSUZfQ1NDX05VTV9DT0VGRgkxNgorc3RydWN0IGlzaWZfY29sb3Jfc3BhY2VfY29udiB7CisJLyogRW5hYmxlIGNvbG9yIHNwYWNlIGNvbnZlcnNpb24gKi8KKwlfX3U4IGVuOworCS8qCisJICogY3NjIGNvZWZmaWVudCB0YWJsZS4gUzhRNSwgTTAwIGF0IGluZGV4IDAsIE0wMSBhdCBpbmRleCAxLCBhbmQKKwkgKiBzbyBmb3J0aAorCSAqLworCXN0cnVjdCBpc2lmX2Zsb2F0XzggY29lZmZbSVNJRl9DU0NfTlVNX0NPRUZGXTsKK307CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyoqICBCbGFjayAgQ29tcGVuc2F0aW9uIHBhcmFtZXRlcnMKKyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCitzdHJ1Y3QgaXNpZl9ibGFja19jb21wIHsKKwkvKiBDb21wIGZvciBSZWQgKi8KKwlfX3M4IHJfY29tcDsKKwkvKiBDb21wIGZvciBHciAqLworCV9fczggZ3JfY29tcDsKKwkvKiBDb21wIGZvciBCbHVlICovCisJX19zOCBiX2NvbXA7CisJLyogQ29tcCBmb3IgR2IgKi8KKwlfX3M4IGdiX2NvbXA7Cit9OworCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiogIEdhaW4gcGFyYW1ldGVycworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBpc2lmX2dhaW4geworCS8qIEdhaW4gZm9yIFJlZCBvciB5ZSAqLworCXN0cnVjdCBpc2lmX2Zsb2F0XzE2IHJfeWU7CisJLyogR2FpbiBmb3IgR3Igb3IgY3kgKi8KKwlzdHJ1Y3QgaXNpZl9mbG9hdF8xNiBncl9jeTsKKwkvKiBHYWluIGZvciBHYiBvciBnICovCisJc3RydWN0IGlzaWZfZmxvYXRfMTYgZ2JfZzsKKwkvKiBHYWluIGZvciBCbHVlIG9yIG1nICovCisJc3RydWN0IGlzaWZfZmxvYXRfMTYgYl9tZzsKK307CisKKyNkZWZpbmUgSVNJRl9MSU5FQVJfVEFCX1NJWkUJMTkyCisvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorKiogIExpbmVhcml6YXRpb24gcGFyYW1ldGVycworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBpc2lmX2xpbmVhcml6ZSB7CisJLyogRW5hYmxlIG9yIERpc2FibGUgbGluZWFyaXphdGlvbiBvZiBkYXRhICovCisJX191OCBlbjsKKwkvKiBTaGlmdCB2YWx1ZSBhcHBsaWVkICovCisJX191OCBjb3JyX3NoZnQ7CisJLyogc2NhbGUgZmFjdG9yIGFwcGxpZWQgVTExUTEwICovCisJc3RydWN0IGlzaWZfZmxvYXRfMTYgc2NhbGVfZmFjdDsKKwkvKiBTaXplIG9mIHRoZSBsaW5lYXIgdGFibGUgKi8KKwlfX3UxNiB0YWJsZVtJU0lGX0xJTkVBUl9UQUJfU0laRV07Cit9OworCisvKiBDb2xvciBwYXR0ZXJucyAqLworI2RlZmluZSBJU0lGX1JFRAkwCisjZGVmaW5lCUlTSUZfR1JFRU5fUkVECTEKKyNkZWZpbmUgSVNJRl9HUkVFTl9CTFVFCTIKKyNkZWZpbmUgSVNJRl9CTFVFCTMKK3N0cnVjdCBpc2lmX2NvbF9wYXQgeworCV9fdTggb2xvcDsKKwlfX3U4IG9sZXA7CisJX191OCBlbG9wOworCV9fdTggZWxlcDsKK307CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisqKiAgRGF0YSBmb3JtYXR0ZXIgcGFyYW1ldGVycworKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KK3N0cnVjdCBpc2lmX2ZtdHBsZW4geworCS8qCisJICogbnVtYmVyIG9mIHByb2dyYW0gZW50cmllcyBmb3IgU0VUMCwgcmFuZ2UgMSAtIDE2CisJICogd2hlbiBmbXRtb2RlIGlzIElTSUZfU1BMSVQsIDEgLSA4IHdoZW4gZm10bW9kZSBpcworCSAqIElTSUZfQ09NQklORQorCSAqLworCV9fdTE2IHBsZW4wOworCS8qCisJICogbnVtYmVyIG9mIHByb2dyYW0gZW50cmllcyBmb3IgU0VUMSwgcmFuZ2UgMSAtIDE2CisJICogd2hlbiBmbXRtb2RlIGlzIElTSUZfU1BMSVQsIDEgLSA4IHdoZW4gZm10bW9kZSBpcworCSAqIElTSUZfQ09NQklORQorCSAqLworCV9fdTE2IHBsZW4xOworCS8qKgorCSAqIG51bWJlciBvZiBwcm9ncmFtIGVudHJpZXMgZm9yIFNFVDIsIHJhbmdlIDEgLSAxNgorCSAqIHdoZW4gZm10bW9kZSBpcyBJU0lGX1NQTElULCAxIC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2FibGUgR2FpbiBhZGp1c3RtZW50IGZvciBTRFJBTSBkYXRhICovCisJX191OCBvZmZzZXRfc2RyYW1fZW47CisJLyogRW5hYmxlIG9yIERpc2FibGUgR2FpbiBhZGp1c3RtZW50IGZvciBJUElQRSBkYXRhICovCisJX191OCBvZmZzZXRfaXBpcGVfZW47CisJLyogRW5hYmxlIG9yIERpc2FibGUgR2FpbiBhZGp1c3RtZW50IGZvciBIM0EgZGF0YSAqLworCV9fdTggb2Zmc2V0X2gzYV9lbjsKK307CisKK3N0cnVjdCBpc2lmX2N1bCB7CisJLyogSG9yaXpvbnRhbCBDdWxsIHBhdHRlcm4gZm9yIG9kZCBsaW5lcyAqLworCV9fdTggaGNwYXRfb2RkOworCS8qIEhvcml6b250YWwgQ3VsbCBwYXR0ZXJuIGZvciBldmVuIGxpbmVzICovCisJX191OCBoY3BhdF9ldmVuOworCS8qIFZlcnRpY2FsIEN1bGwgcGF0dGVybiAqLworCV9fdTggdmNwYXQ7CisJLyogRW5hYmxlIG9yIGRpc2FibGUgbHBmLiBBcHBseSB3aGVuIGN1bGwgaXMgZW5hYmxlZCAqLworCV9fdTggZW5fbHBmOworfTsKKworc3RydWN0IGlzaWZfY29tcHJlc3MgeworI2RlZmluZSBJU0lGX0FMQVcJCTAKKyNkZWZpbmUgSVNJRl9EUENNCQkxCisjZGVmaW5lIElTSUZfTk9fQ09NUFJFU1NJT04JMgorCS8qIENvbXByZXNzaW9uIEFsZ29yaXRobSB1c2VkICovCisJX191OCBhbGc7CisJLyogQ2hvb3NlIFByZWRpY3RvcjEgZm9yIERQQ00gY29tcHJlc3Npb24gKi8KKyNkZWZpbmUgSVNJRl9EUENNX1BSRUQxCQkwCisJLyogQ2hvb3NlIFByZWRpY3RvcjIgZm9yIERQQ00gY29tcHJlc3Npb24gKi8KKyNkZWZpbmUgSVNJRl9EUENNX1BSRUQyCQkxCisJLyogUHJlZGljdG9yIGZvciBEUENNIGNvbXByZXNzaW9uICovCisJX191OCBwcmVkOwor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