function fromASM(asm) {
  v.parse(v.string(), asm);
  // Compile the ASM string into a Uint8Array
  return compile(
    asm.split(' ').map(chunk => {
      // Check if the chunk is an opcode
      if (isNaN(Number(chunk)) && chunk in OPS) {
        return OPS[chunk];
      }
      // Validate if the chunk is a hexadecimal string
      v.parse(types.HexSchema, chunk);
      // Convert the chunk to Uint8Array data
      return tools.fromHex(chunk);
    }),
  );
}
Converts an ASM string to a Buffer.
@param asm The ASM string to convert.
@returns The converted Buffer.