public static EObject binary_to_term(EObject arg, EObject opts) {
EBinary bin; ESeq options;
if ((bin=arg.testBinary()) == null || (options = opts.testSeq()) == null) throw ERT.badarg(arg);
EInputStream in = bin.getInputStream();
if (!options.isNil()) {
if (options.head() == am_safe) {
in.setSafe(true);
}
}
try {
EObject val = in.read_any();