def check_encoding(self, dex_method, f=sys.stdout):
    bytes_saved = 0
    ops = self.get_ops()
    if (len(ops) == 1):
        op = ops[0]
        if (op.op == DBG_END_SEQUENCE):
            bytes_saved += (get_uleb128_byte_size(self.line_start) + get_uleb128p1_byte_size(self.parameters_size))
            for parameter_name in self.parameter_names:
                bytes_saved += get_uleb128p1_byte_size(parameter_name)
            bytes_saved += 1
            f.write(('warning: %s debug info contains only a single ' % dex_method.get_qualified_name()))
            f.write(('%s, all debug info can be removed ' % op.op))
            f.write(('(%u bytes)\n' % bytes_saved))
            return bytes_saved
    for op in ops:
        size = op.get_byte_size()
        if (op.op == DBG_SET_PROLOGUE_END):
            f.write(('warning: %s %s can be removed (%u byte)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_SET_EPILOGUE_BEGIN):
            f.write(('warning: %s %s can be removed (%u byte)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_START_LOCAL):
            f.write(('warning: %s %s can be removed (%u bytes)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_START_LOCAL_EXTENDED):
            f.write(('warning: %s %s can be removed (%u bytes)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_END_LOCAL):
            f.write(('warning: %s %s can be removed (%u bytes)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_RESTART_LOCAL):
            f.write(('warning: %s %s can be removed (%u bytes)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
    return bytes_saved
def check_encoding(self, dex_method, f=sys.stdout):
    bytes_saved = 0
    ops = self.get_ops()
    if (len(ops) == 1):
        op = ops[0]
        if (op.op == DBG_END_SEQUENCE):
            bytes_saved += (get_uleb128_byte_size(self.line_start) + get_uleb128p1_byte_size(self.parameters_size))
            for parameter_name in self.parameter_names:
                bytes_saved += get_uleb128p1_byte_size(parameter_name)
            bytes_saved += 1
            f.write(('warning: %s debug info contains only a single ' % dex_method.get_qualified_name()))
            f.write(('%s, all debug info can be removed ' % op.op))
            f.write(('(%u bytes)\n' % bytes_saved))
            return bytes_saved
    for op in ops:
        size = op.get_byte_size()
        if (op.op == DBG_SET_PROLOGUE_END):
            f.write(('warning: %s %s can be removed (%u byte)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_SET_EPILOGUE_BEGIN):
            f.write(('warning: %s %s can be removed (%u byte)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_START_LOCAL):
            f.write(('warning: %s %s can be removed (%u bytes)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_START_LOCAL_EXTENDED):
            f.write(('warning: %s %s can be removed (%u bytes)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_END_LOCAL):
            f.write(('warning: %s %s can be removed (%u bytes)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
        elif (op.op == DBG_RESTART_LOCAL):
            f.write(('warning: %s %s can be removed (%u bytes)\n' % (dex_method.get_qualified_name(), op.op, size)))
            bytes_saved += size
    return bytes_saved