def _binary_op(result_name, func_name, arg1_name, arg2_name):
    """
    Generates a binary operator indicated by func_name in infix notation
    with arguments arg1_name and arg2_name storing the result in result_name.
    Supported func_names are add, sub, mul, and div.
    """
    funcs = {'add': '+', 'sub': '-', 'mul': '*', 'div': '/'}
    return f"{result_name} = {arg1_name} {funcs[func_name]} {arg2_name}"