import java.util.*;
import java.util.zip.*;
import java.util.List;
import java.util.regex.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import java.util.concurrent.locks.*;
import javax.swing.*;
import javax.swing.event.*;
import javax.swing.text.*;
import javax.swing.table.*;
import java.io.*;
import java.net.*;
import java.lang.reflect.*;
import java.lang.ref.*;
import java.lang.management.*;
import java.security.*;
import java.security.spec.*;
import java.awt.*;
import java.awt.event.*;
import java.awt.image.*;
import javax.imageio.*;
import java.math.*;
import static x30_pkg.x30_util.DynamicObject;
import org.gagravarr.ogg.*;
import org.gagravarr.ogg.audio.*;
import org.gagravarr.opus.*;
import static org.gagravarr.ogg.OggStreamIdentifier.OggStreamType;
import org.concentus.*;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Iterator;
import static org.gagravarr.ogg.IOUtils.readOrEOF;
import java.text.NumberFormat;
class main {
static class OpusMachineIterator extends CloseableShortIterator {
OpusMachine machine;
OpusMachineIterator(OpusMachine machine) {
this.machine = machine; ownResource(machine); }
transient CloseablesHolder resources = new CloseablesHolder();
A ownResource(A resource) { { if (resources != null) resources.add(resource); } return resource; }
void ownResources(IResourceHolder holder) {
assertNotNull(resources);
if (holder == null) return;
resources.addAll(holder.takeAll());
}
public void close() { try { { if (resources != null) resources.close(); } } catch (Exception __e) { throw rethrow(__e); } }
int val = Integer.MAX_VALUE;
boolean hasNext() {
if (val == Integer.MAX_VALUE)
val = machine.get();
return val != Integer.MIN_VALUE;
}
short next() {
if (!hasNext()) throw fail("No such element");
var v = val;
val = Integer.MAX_VALUE;
return (short) v;
}
}
static void ownResource(AutoCloseable c) {
_registerAutoCloseable(c);
}
static A assertNotNull(A a) {
assertTrue(a != null);
return a;
}
static A assertNotNull(String msg, A a) {
assertTrue(msg, a != null);
return a;
}
static RuntimeException rethrow(Throwable t) {
if (t instanceof Error)
_handleError((Error) t);
throw t instanceof RuntimeException ? (RuntimeException) t : new RuntimeException(t);
}
static RuntimeException rethrow(String msg, Throwable t) {
throw new RuntimeException(msg, t);
}
static RuntimeException fail() { throw new RuntimeException("fail"); }
static RuntimeException fail(Throwable e) { throw asRuntimeException(e); }
static RuntimeException fail(Object msg) { throw new RuntimeException(String.valueOf(msg)); }
static RuntimeException fail(Object... objects) { throw new Fail(objects); }
static RuntimeException fail(String msg) { throw new RuntimeException(msg == null ? "" : msg); }
static RuntimeException fail(String msg, Throwable innerException) { throw new RuntimeException(msg, innerException); }
static Set _registerAutoCloseable_set = synchroHashSet();
static void _registerAutoCloseable(AutoCloseable c) {
addIfNotNull(_registerAutoCloseable_set, c);
}
static void cleanMeUp__registerAutoCloseable() {
closeAutoCloseables(getAndClearList(_registerAutoCloseable_set));
}
static void assertTrue(Object o) {
if (!(eq(o, true) /*|| isTrue(pcallF(o))*/))
throw fail(str(o));
}
static boolean assertTrue(String msg, boolean b) {
if (!b)
throw fail(msg);
return b;
}
static boolean assertTrue(boolean b) {
if (!b)
throw fail("oops");
return b;
}
static volatile StringBuffer local_log = new StringBuffer(); // not redirected
static volatile Appendable print_log = local_log; // might be redirected, e.g. to main bot
// in bytes - will cut to half that
static volatile int print_log_max = 1024*1024;
static volatile int local_log_max = 100*1024;
static boolean print_silent = false; // total mute if set
static Object print_byThread_lock = new Object();
static volatile ThreadLocal