def METHOD_NAME(block: Block, rewriter: PatternRewriter):
    """
    Change the type of the block arguments to `a` registers and add cast operations just
    after the block entry.
    """
    new_ops: list[Operation] = []
    for index, arg in enumerate(block.args):
        register_type = register_type_for_type(arg.type)
        move_op, new_value = move_ops_for_value(arg, register_type.unallocated())
        cast_op = builtin.UnrealizedConversionCastOp.get((new_value,), (arg.type,))
        new_ops.append(move_op)
        new_ops.append(cast_op)
        arg.type = register_type.a_register(index)
        arg.replace_by(cast_op.results[0])
        move_op.operands[0] = arg
    rewriter.insert_op_at_start(new_ops, block)