/** Emulate io_lib:write_binary_body(), but without using deep stack. */
@BIF
static public EObject write_binary_body(EObject arg1, EObject arg2)
{
EBitString bin = arg1.testBitString();
EInteger d = arg2.testInteger();
if (bin == null || d == null)
throw ERT.badarg(arg1, arg2);
int depth = d.intValue();
if (depth < 0) depth=Integer.MAX_VALUE;
ESeq builder = ERT.NIL;
long bitCount = bin.bitSize();
if (bitCount > 8*(depth-1)) {