anchor.diff:      beam_types:is_boolean_type(LType) andalso
           beam_types:is_boolean_type(RType).
   
  -eval_bif(#b_set{op={bif,Bif},args=Args}=I, Ts) ->
  +eval_bif(#b_set{op={bif,Bif},args=Args}=I, Ts, Ds) ->
       Arity = length(Args),
       case erl_bifs:is_pure(erlang, Bif, Arity) of
           false ->
  
positive.code: simplify(#b_set{dst=Dst,args=Args0}=I0, Ts0, Ds0, _Ls, Sub) ->
      Args = simplify_args(Args0, Ts0, Sub),
      I1 = beam_ssa:normalize(I0#b_set{args=Args}),
      case simplify(I1, Ts0) of
          #b_set{}=I ->
              Ts = update_types(I, Ts0, Ds0),
              Ds = Ds0#{ Dst => I },
  
negative.code:             Sub#{ Dst => Var }
      end.
  
  simplify(#b_set{op={bif,'and'},args=Args}=I, Ts, Ds) ->
      case is_safe_bool_op(Args, Ts) of
          true ->
              case Args of
                  [_,#b_literal{val=false}=Res] -> Res;
                  [Res,#b_literal{val=true}] -> Res;
                  _ -> eval_bif(I, Ts, Ds)
              end;
          false ->
              I
      end;
  simplify(#b_set{op={bif,'or'},args=Args}=I, Ts, Ds) ->
      case is_safe_bool_op(Args, Ts) of
          true ->
              case Args of
                  [Res,#b_literal{val=false}] -> Res;
                  [_,#b_literal{val=true}=Res] -> Res;
                  _ -> eval_bif(I, Ts, Ds)
              end;
          false ->
              I
      end;
  simplify(#b_set{op={bif,element},args=[#b_literal{val=Index},Tuple]}=I0, Ts, Ds) ->
      case normalized_type(Tuple, Ts) of
          #t_tuple{size=Size} when is_integer(Index),
                                   1 =< Index,
                                   Index =< Size ->
              I = I0#b_set{op=get_tuple_element,
                           args=[Tuple,#b_literal{val=Index-1}]},
              simplify(I, Ts, Ds);
          _ ->
              eval_bif(I0, Ts, Ds)
      end;
  simplify(#b_set{op={bif,hd},args=[List]}=I, Ts, Ds) ->
      case normalized_type(List, Ts) of
          #t_cons{} ->
              I#b_set{op=get_hd};
          _ ->
              eval_bif(I, Ts, Ds)
      end;
  simplify(#b_set{op={bif,tl},args=[List]}=I, Ts, Ds) ->
      case normalized_type(List, Ts) of
          #t_cons{} ->
              I#b_set{op=get_tl};
          _ ->
              eval_bif(I, Ts, Ds)
      end;
  simplify(#b_set{op={bif,size},args=[Term]}=I, Ts, Ds) ->
      case normalized_type(Term, Ts) of
          #t_tuple{} ->
              simplify(I#b_set{op={bif,tuple_size}}, Ts);
  