def METHOD_NAME(sequence, filename, mods, moved):
    for lineno, raw_line in enumerate(sequence, 1):
        line = raw_line.strip()
        if not line:
            logger.error(f"file {filename!r}: empty line {lineno}")
            continue
        elif line != raw_line:
            logger.error(
                f"file {filename!r}: extra whitespace in {raw_line!r} on line {lineno}"
            )
        line = line.split()
        if line[0] == "move":
            if len(line) != 3:
                logger.error(
                    f"file {filename!r}: {raw_line!r} on line {lineno}: bad move form"
                )
                continue
            src, trg = atom(line[1]), atom(line[2])
            if src.fullver is not None:
                logger.error(
                    f"file {filename!r}: {raw_line!r} on line {lineno}: "
                    f"atom {src} must be versionless"
                )
                continue
            elif trg.fullver is not None:
                logger.error(
                    f"file {filename!r}: {raw_line!r} on line {lineno}: "
                    f"atom {trg} must be versionless"
                )
                continue
            if src.key in moved:
                logger.warning(
                    f"file {filename!r}: {raw_line!r} on line {lineno}: "
                    f"{src} was already moved to {moved[src.key]}, "
                    "this line is redundant"
                )
                continue
            d = deque()
            mods[src.key][1].extend([("move", src, trg), d])
            # start essentially a new checkpoint in the trg
            mods[trg.key][1].append(d)
            mods[trg.key][1] = d
            moved[src.key] = trg
        elif line[0] == "slotmove":
            if len(line) != 4:
                logger.error(
                    f"file {filename!r}: {raw_line!r} on line {lineno}: "
                    "bad slotmove form"
                )
                continue
            src = atom(line[1])
            if src.key in moved:
                logger.warning(
                    f"file {filename!r}: {raw_line!r} on line {lineno}: "
                    f"{src} was already moved to {moved[src.key]}, "
                    "this line is redundant"
                )
                continue
            elif src.slot is not None:
                logger.error(
                    f"file {filename!r}: {raw_line!r} on line {lineno}: "
                    "slotted atom makes no sense for slotmoves"
                )
                continue
            src_slot = atom(f"{src}:{line[2]}")
            trg_slot = atom(f"{src.key}:{line[3]}")
            mods[src.key][1].append(("slotmove", src_slot, line[3]))
        else:
            logger.error(
                f"file {filename!r}: {raw_line!r} on line {lineno}: unknown command"
            )