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wNyBVU0EKKyAqLworCisKKyNpbmNsdWRlIDxjb25maWcuaD4KKyNpbmNsdWRlIDx2ZXJzaW9uLmg+CisKKworLyoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogSnVtcCB2ZWN0b3IgdGFibGUgYXMgaW4gdGFibGUgMy4xIGluIFsxXQorICoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKi8KKworCisuZ2xvYmwgX3N0YXJ0Citfc3RhcnQ6CWIgICAgICAgcmVzZXQKKwlsZHIJcGMsIF91bmRlZmluZWRfaW5zdHJ1Y3Rpb24KKwlsZHIJcGMsIF9zb2Z0d2FyZV9pbnRlcnJ1cHQKKwlsZHIJcGMsIF9wcmVmZXRjaF9hYm9ydAorCWxkcglwYywgX2RhdGFfYWJvcnQKKwlsZHIJcGMsIF9ub3RfdXNlZAorCWxkcglwYywgX2lycQorCWxkcglwYywgX2ZpcQorCitfdW5kZWZpbmVkX2luc3RydWN0aW9uOgkud29yZCB1bmRlZmluZWRfaW5zdHJ1Y3Rpb24KK19zb2Z0d2FyZV9pbnRlcnJ1cHQ6CS53b3JkIHNvZnR3YXJlX2ludGVycnVwdAorX3ByZWZldGNoX2Fib3J0Ogkud29yZCBwcmVmZXRjaF9hYm9ydAorX2RhdGFfYWJvcnQ6CQkud29yZCBkYXRhX2Fib3J0Citfbm90X3VzZWQ6CQkud29yZCBub3RfdXNlZAorX2lycToJCQkud29yZCBpcnEKK19maXE6CQkJLndvcmQgZmlxCisKKwkuYmFsaWdubCAxNiwweGRlYWRiZWVmCisKKworLyoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgKgorICogU3RhcnR1cCBDb2RlIChyZXNldCB2ZWN0b3IpCisg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JLyogdXBwZXIgMTI4IEtpQjogcmVsb2NhdGVkIHVib290ICAgKi8KKwlzdWIJcjAsIHIwLCAjQ0ZHX01BTExPQ19MRU4JLyogbWFsbG9jIGFyZWEgICAgICAgICAgICAgICAgICAgICAgKi8KKwlzdWIJcjAsIHIwLCAjQ0ZHX0dCTF9EQVRBX1NJWkUgLyogYmRpbmZvICAgICAgICAgICAgICAgICAgICAgICAgKi8KKyNpZmRlZiBDT05GSUdfVVNFX0lSUQorCXN1YglyMCwgcjAsICMoQ09ORklHX1NUQUNLU0laRV9JUlErQ09ORklHX1NUQUNLU0laRV9GSVEpCisjZW5kaWYKKwlzdWIJc3AsIHIwLCAjMTIJCS8qIGxlYXZlIDMgd29yZHMgZm9yIGFib3J0LXN0YWNrICAgICovCisKK2NsZWFyX2JzczoKKwlsZHIJcjAsIF9ic3Nfc3RhcnQJCS8qIGZpbmQgc3RhcnQgb2YgYnNzIHNlZ21lbnQgICAgICAgICovCisJQGFkZAlyMCwgcjAsICM0CQkvKiBzdGFydCBhdCBmaXJzdCBieXRlIG9mIGJzcyAgICAgICAqLworCQkJCQkvKiAgIHdoeSBpbmMuIDQgYnl0ZXMgcGFzdCB0aGVuPyAgICAqLworCWxkcglyMSwgX2Jzc19lbmQJCS8qIHN0b3AgaGVyZSAgICAgICAgICAgICAgICAgICAgICAgICovCisJbW92IAlyMiwgIzB4MDAwMDAwMDAJCS8qIGNsZWFyICAgICAgICAgICAgICAgICAgICAgICAgICAgICovCisKK2NsYnNzX2w6c3RyCXIyLCBbcjBdCQkvKiBjbGVhciBsb29wLi4uICAgICAgICAgICAgICAgICAgICAqLworCWFkZAlyMCwgcjAsICM0CisJY21wCXIwLCByMQorCWJuZQljbGJzc19sCisKKwlsZHIJcGMsIF9zdGFydF9hcm1ib290CisKK19zdGFydF9hcm1ib290Ogkud29yZCBzdGFydF9hcm1ib290CisKKworLyoKKyAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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hcmQtZGVwZW5kZW5kLCB5b3Ugd2lsbAorCSAqIGZpbmQgYSBtZW1zZXR1cC5TIGluIHlvdXIgYm9hcmQgZGlyZWN0b3J5LgorCSAqLworCW1vdglpcCwgbHIKKwlibAltZW1zZXR1cAorCW1vdglsciwgaXAKKworCW1vdglwYywgbHIKKworCisvKgorICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioKKyAqCisgKiBJbnRlcnJ1cHQgaGFuZGxpbmcKKyAqCisgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKgorICovCisKK0AKK0AgSVJRIHN0YWNrIGZyYW1lLgorQAorI2RlZmluZSBTX0ZSQU1FX1NJWkUJNzIKKworI2RlZmluZSBTX09MRF9SMAk2OAorI2RlZmluZSBTX1BTUgkJNjQKKyNkZWZpbmUgU19QQwkJNjAKKyNkZWZpbmUgU19MUgkJNTYKKyNkZWZpbmUgU19TUAkJNTIKKworI2RlZmluZSBTX0lQCQk0OAorI2RlZmluZSBTX0ZQCQk0NAorI2RlZmluZSBTX1IxMAkJNDAKKyNkZWZpbmUgU19SOQkJMzYKKyNkZWZpbmUgU19SOAkJMzIKKyNkZWZpbmUgU19SNwkJMjgKKyNkZWZpbmUgU19SNgkJMjQKKyNkZWZpbmUgU19SNQkJMjAKKyNkZWZpbmUgU19SNAkJMTYKKyNkZWZpbmUgU19SMwkJMTIKKyNkZWZpbmUgU19SMgkJOAorI2RlZmluZSBTX1IxCQk0CisjZGVmaW5lIFNfUjAJCTAKKworI2RlZmluZSBNT0RFX1NWQyAweDEzCisjZGVmaW5lIElfQklUCSAweDgwCisKKy8qCisgKiB1c2UgYmFkX3NhdmVfdXNlcl9yZWdzIGZvciBhYm9ydC9wcmVmZXRjaC91bmRlZi9zd2kgLi4uCisgKiB1c2UgaXJxX3NhdmVfdXNlcl9yZWdzIC8g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