def METHOD_NAME():
    src_dir = sys.argv[1]
    bld_dir = sys.argv[2]
    # Check if operand patterns in opnd_defs.txt are ordered by pattern.
    patterns = filter_lines(
        os.path.join(src_dir, 'opnd_defs.txt'),
        re.compile(r'^([x\-\?\+]+)  [a-z0-9A-Z_]+.+#.+'))
    print('Checking if operand patterns in opnd_defs.txt are ordered by pattern')
    check(patterns, sorted(patterns, key=normalise_plus))
    print('  OK!')
    # Check if operand order in opnd_defs.txt and codec.c matches.
    op_names_txt = filter_lines(
        os.path.join( src_dir, 'opnd_defs.txt'),
        re.compile(r'^[x\-\?\+]+  ([a-z0-9A-Z_]+).+#.+'))
    op_names_c = filter_lines(os.path.join(src_dir, 'codec.c'), re.compile(
        r'^decode_opnd_([^\(]+)?(\(.*\)[^;])'), ignore_until='each type of operand')
    print('Checking if operand order in opnd_defs.txt matches codec.c')
    check(op_names_txt, op_names_c, duplicate_check=True)
    print('  OK!')
    # The Arm AArch64's architecture versions supported by the DynamoRIO codec.
    # Currently, v8.0 is fully supported, while v8.1, v8.2, v8.3, v8.4, v8.6, SVE,
    # and SVE2 are partially supported.
    isa_versions = ['v80', 'v81', 'v82', 'v83', 'v84', 'v86', 'sve', 'sve2']
    codecsort_py = os.path.join(src_dir, "codecsort.py")
    print("Checking if instructions are in the correct order and format in each codec_<version>.txt file.")
    codec_files = [os.path.join(src_dir, 'codec_' + isa_version + '.txt') for isa_version in isa_versions]
    with open(os.devnull, 'wb') as dev_null:
        needs_reorder = subprocess.call([codecsort_py] + codec_files, stdout=dev_null)
    if needs_reorder:
        print("codec file instructions are out of order, run:\n{} --rewrite {}".format(
            codecsort_py, " ".join(codec_files)))
        sys.exit(1)
    print(", ".join(codec_files), "OK!")
    print("Check there are no duplicate opcode enums across ALL codec_<version>.txt files.")