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ZFBIWXNJbmZvIChmcCwgJnBoeXNfaW5mbyk7CiAgICAgICAgICAg IH0KCQkJYnJlYWs7CgkJCQoJCQljYXNlIElFTkQ6CgkJCXsKICAgICAgICAgICAgICAgICBwbmdE ZWNvbXByZXNzSURBVCAoKTsKICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZTsKICAgICAgICAg ICAgfQogICAgICAgICAgICBicmVhazsKCiAgICAgICAgICAgIGNhc2UgYktHRDoKICAgICAgICAg ICAgewogICAgICAgICAgICAgICAgcG5nUmVhZEJLR0RJbmZvIChmcCwgJmloZHJfaW5mbywgJmJr Z2RfaW5mbyk7CiAgICAgICAgICAgIH0KICAgICAgICAgICAgYnJlYWs7CgogICAgICAgICAgICBj YXNlIHNCSVQ6CiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIHBuZ19tb2RlID0gcG5nX21v ZGUgfCBQTkdfSEFWRV9TQklUOwogICAgICAgICAgICAgICAgcG5nUmVhZFNCSVRJbmZvIChmcCwg JmloZHJfaW5mbywgJnNiaXRfaW5mbyk7CiAgICAgICAgICAgIH0KCQkJYnJlYWs7CgogICAgICAg ICAgICBjYXNlIHRFWFQ6CiAgICAgICAgICAgIHsKICAgICAgICAgICAgICAgIGd3X3BuZ190ZXh0 X2luZm8gdGV4dF9pbmZvOwogICAgICAgICAgICAgICAgcG5nUmVhZFRFWFRJbmZvIChmcCwgY2h1 bmtfaW5mby5sZW5ndGgsICZ0ZXh0X2luZm8pOwogICAgICAgICAgICB9CiAgICAgICAgICAgIGJy ZWFrOwoJCgkJCWNhc2UgaUNDUDoKCQkJewoJCQkJZ3dfcG5nX2ljY3BfaW5mbyBpY2NwX2luZm87 CgkJCQlwbmdSZWFkSUNDUEluZm8gKGZwLCBjaHVua19pbmZvLmxlbmd0aCwgJmljY3BfaW5mbyk7 CgkJCX0KCQkJYnJlYWs7CgkJCQoJCQljYXNlIHRSTlM6CgkJCXsKCQkJCXBuZ19tb2RlID0gcG5n X21vZGUgfCBQTkdf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