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CIKCiNpbmNsdWRlICJnZW5lcmljU3Rkcy5oIgoKCi8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLyogICAgICAgICAgICAgICAgICAgQklRVUFEIEZpbHRlciBTcGVjaWZpY2F0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAqLwovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCgojZGVmaW5lIEIxIDAKI2RlZmluZSBCMiAxCiNkZWZpbmUgQTEgMgojZGVmaW5lIEEyIDMKCiNkZWZpbmUgQlFDKHgpIEZMMkZYQ09OU1RfU0dMKHgvMikKCgpzdHJ1Y3QgRklMVEVSX1BBUkFNIHsKICBjb25zdCBGSVhQX1NHTCAqY29lZmZhOyAgICAvKiEgU09TIG1hdHJpeCBPbmUgcm93L3NlY3Rpb24uIFNjYWxlZCB1c2luZyBCUUMoKS4gT3JkZXIgb2YgY29lZmZpY2llbnRzOiBCMSxCMixBMSxBMi4gQjA9QTA9MS4wICovCiAgRklYUF9EQkwgZzsgICAgICAgICAgICAgICAgLyohIG92ZXJhbGwgZ2FpbiAqLwogIGludCBXYzsgICAgICAgICAgICAgICAgICAgIC8qISBub3JtYWxpemVkIHBhc3NiYW5kIGJhbmR3aWR0aCBhdCBpbnB1dCBzYW1wbGVyYXRlICogMTAwMCAqLwogIGludCBub0NvZWZmczsgICAgICAgICAgICAgIC8qISBudW1iZXIgb2YgZmlsdGVyIGNvZWZmcyAqLwogIGludCBkZWxheTsgICAgICAgICAgICAgICAgIC8qISBkZWxheSBpbiBzYW1wbGVzIGF0IGlucHV0IHNhbXBsZXJhdGUgKi8KfTsKCiNkZWZpbmUgQklRVUFEX0NPRUZTVEVQIDQKCi8qKgogKlxicmllZiBMb3cgUGFzcwogV2MgPSAwLDUsIG9yZGVyIDMwLCBTdG9wIEJhbmQgLTk2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hbV9zZXQ0NSwKICAmcGFyYW1fc2V0NDEsCiAgJnBhcmFtX3NldDM1LAogICZwYXJhbV9zZXQyNQp9OwoKCi8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi8KLyogICAgICAgICAgICAgICAgICAgICAgICAgUmVzYW1wbGVyIEZ1bmN0aW9ucyAgICAgICAgICAgICAgICAgICAgICAgICAgICAqLwovKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovCgoKLyohCiAgXGJyaWVmICAgUmVzZXQgZG93bnNhbXBsZXIgaW5zdGFuY2UgYW5kIGNsZWFyIGRlbGF5IGxpbmVzCgogIFxyZXR1cm4gIHN1Y2Nlc3Mgb2Ygb3BlcmF0aW9uCiovCgpJTlQgRkRLYWFjRW5jX0luaXREb3duc2FtcGxlcihET1dOU0FNUExFUiAqRG93blNhbXBsZXIsIC8qITwgcG9pbnRlciB0byBkb3duc2FtcGxlciBpbnN0YW5jZSAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgV2MsICAgICAgICAgICAgICAgICAgIC8qITwgbm9ybWFsaXplZCBjdXRvZmYgZnJlcSAqIDEwMDAqICAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgcmF0aW8pICAgICAgICAgICAgICAgIC8qITwgZG93bnNhbXBsZXIgcmF0aW8gKG9ubHkgMiBzdXBwb3J0ZWQgYXQgdGhlIG1vbW1lbnQpICovCgp7CiAgVUlOVCBpOwogIGNvbnN0IHN0cnVjdCBGSUxURVJfUEFSQU0gKmN1cnJlbnRTZXQ9TlVMTDsKCiAgRkRLX0FTU0VSVChyYXRpbyA9PSAyKTsKICBGREttZW1jbGVhcihEb3duU2FtcGxlci0+ZG93bkZpbHRlci5zdGF0ZXMsIHNpemVvZihEb3duU2FtcGxlci0+ZG93bkZpbHRlci5zdGF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qel4wICsgYVsxXSp6XjEgKyBhWzJdKnpeMiAuLi4gYVtuXSp6Xm4KCiAgXHJldHVybiAgZmlsdGVyZWQgdmFsdWUKKi8KCnN0YXRpYyBpbmxpbmUgSU5UX1BDTSBBZHZhbmNlRmlsdGVyKExQX0ZJTFRFUiAqZG93bkZpbHRlciwgIC8qITwgcG9pbnRlciB0byBpaXIgZmlsdGVyIGluc3RhbmNlICovCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBJTlRfUENNICAqcElucHV0LCAgICAgICAgICAvKiE8IGlucHV0IG9mIGZpbHRlciAgICAgICAgICAgICAgICAqLwogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaW50IGRvd25SYXRpbywKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBpblN0cmlkZSkKewogIElOVF9QQ00gb3V0cHV0OwogIGludCBpLCBuOwoKCiNpZmRlZiBSU19CSVFVQURfU0NBVFRFUkdBSU4KI2RlZmluZSBCSVFVQURfU0NBTEUgMwojZWxzZQojZGVmaW5lIEJJUVVBRF9TQ0FMRSAxMgojZW5kaWYKCiAgRklYUF9EQkwgeSA9IEZMMkZYQ09OU1RfREJMKDAuMGYpOwogIEZJWFBfREJMIGlucHV0OwoKICBmb3IgKG49MDsgbjxkb3duUmF0aW87IG4rKykKICB7CiAgICBGSVhQX0JRUyAoKnN0YXRlcylbMl0gPSBkb3duRmlsdGVyLT5zdGF0ZXM7CiAgICBjb25zdCBGSVhQX1NHTCAqY29lZmYgPSBkb3duRmlsdGVyLT5jb2VmZmE7CiAgICBpbnQgczEsczI7CgogICAgczEgPSBkb3duRmlsdGVyLT5wdHI7CiAgICBzMiA9IHMxIF4gMTsKCiNpZiAoU0FNUExFX0JJVFMgPT0gMTYpCiAgICBpbnB1dCA9ICAoKEZJWFBfREJMKXBJbnB1dFtuKmluU3RyaWRlXSkgPDwgKERGUkFDVF9CSVRTLVNBTVBMRV9CSVRTLUJJUVVBRF9TQ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U0FNUExFX0JJVFMpOwojZWxzZQogIG91dHB1dCA9IFNBVFVSQVRFX0xFRlRfU0hJRlQoeSwgQklRVUFEX1NDQUxFLCBTQU1QTEVfQklUUyk7CiNlbmRpZgoKCiAgcmV0dXJuIG91dHB1dDsKfQoKCgoKLyohCiAgXGJyaWVmICAgRkRLYWFjRW5jX0Rvd25zYW1wbGUgbnVtSW5TYW1wbGVzIG9mIHR5cGUgSU5UX1BDTQogICAgICAgICAgIFJldHVybnMgbnVtYmVyIG9mIG91dHB1dCBzYW1wbGVzIGluIG51bU91dFNhbXBsZXMKCiAgXHJldHVybiAgc3VjY2VzcyBvZiBvcGVyYXRpb24KKi8KCklOVCBGREthYWNFbmNfRG93bnNhbXBsZShET1dOU0FNUExFUiAqRG93blNhbXBsZXIsICAvKiE8IHBvaW50ZXIgdG8gZG93bnNhbXBsZXIgaW5zdGFuY2UgKi8KICAgICAgICAgICAgICAgICAgICAgICAgIElOVF9QQ00gKmluU2FtcGxlcywgICAgICAgIC8qITwgcG9pbnRlciB0byBpbnB1dCBzYW1wbGVzICovCiAgICAgICAgICAgICAgICAgICAgICAgICBJTlQgbnVtSW5TYW1wbGVzLCAgICAgICAgICAvKiE8IG51bWJlciAgb2YgaW5wdXQgc2FtcGxlcyAgKi8KICAgICAgICAgICAgICAgICAgICAgICAgIElOVCBpblN0cmlkZSwgICAgICAgICAgICAgIC8qITwgaW5jcmVtZW50IG9mIGlucHV0IHNhbXBsZXMgKi8KICAgICAgICAgICAgICAgICAgICAgICAgIElOVF9QQ00gKm91dFNhbXBsZXMsICAgICAgIC8qITwgcG9pbnRlciB0byBvdXRwdXQgc2FtcGxlcyAqLwogICAgICAgICAgICAgICAgICAgICAgICAgSU5UICpudW1PdXRTYW1wbGVzLCAgICAgICAgLyohPCBwb2ludGVyIHRwIG51bWJlciBvZiBvdXRwdXQgc2FtcGxlcyAqLwogICAgICAgICAgICAgICAgICAgICAgICAgSU5UIG91dFN0cmlkZSAgICAgICAgICAgICAgLyohPCBpbmNyZW1lbnQgb2Ygb3V0cHV0IHNhbXBsZXMgKi8KICAgICAgICAgICAgICAgICAgICAgICAgICkKewogICAgSU5UIGk7CiAgICAqbnVtT3V0U2FtcGxlcz0wOwoKICAgIGZvcihpPTA7IGk8bnVtSW5TYW1wbGVzOyBpKz1Eb3duU2FtcGxlci0+cmF0aW8pCiAgICB7CiAgICAgICpvdXRTYW1wbGVzID0gQWR2YW5jZUZpbHRlcigmKERvd25TYW1wbGVyLT5kb3duRmlsdGVyKSwgJmluU2FtcGxlc1tpKmluU3RyaWRlXSwgRG93blNhbXBsZXItPnJhdGlvLCBpblN0cmlkZSk7CiAgICAgIG91dFNhbXBsZXMgKz0gb3V0U3RyaWRlOwogICAgfQogICAgKm51bU91dFNhbXBsZXMgPSBudW1JblNhbXBsZXMvRG93blNhbXBsZXItPnJhdGlvOwoKICAgIHJldHVybiAwOwp9Cgo=