anchor.diff:      end.
   
   sig_bs([{L, #b_blk{is=Is,last=Last0}} | Bs],
  -       Ds0, Ls0, Fdb, Sub0, SuccTypes0, Meta, State0) when is_map_key(L, Ls0) ->
  -
  -    #{ L := Ts0 } = Ls0,
  -
  -    {Ts, Ds, Sub, State} = sig_is(Is, Ts0, Ds0, Ls0, Fdb, Sub0, State0),
  -
  -    Last = simplify_terminator(Last0, Ts, Ds, Sub),
  -    SuccTypes = update_success_types(Last, Ts, Ds, Meta, SuccTypes0),
  -    {_, Ls} = update_successors(Last, Ts, Ds, Ls0, Meta#metadata.used_once),
  -
  -    sig_bs(Bs, Ds, Ls, Fdb, Sub, SuccTypes, Meta, State);
  -sig_bs([_Blk | Bs], Ds, Ls, Fdb, Sub, SuccTypes, Meta, State) ->
  -    %% This block is never reached. Ignore it.
  -    sig_bs(Bs, Ds, Ls, Fdb, Sub, SuccTypes, Meta, State);
  +       Ds0, Ls0, Fdb, Sub0, SuccTypes0, Meta, State0) ->
  +    case Ls0 of
  +        #{ L := Incoming } ->
  +            {incoming, Ts0} = Incoming,         %Assertion.
  +
  +            {Ts, Ds, Sub, State} =
  +                sig_is(Is, Ts0, Ds0, Ls0, Fdb, Sub0, State0),
  +
  +            Last = simplify_terminator(Last0, Ts, Ds, Sub),
  +            SuccTypes = update_success_types(Last, Ts, Ds, Meta, SuccTypes0),
  +
  +            UsedOnce = Meta#metadata.used_once,
  +            {_, Ls1} = update_successors(Last, Ts, Ds, Ls0, UsedOnce),
  +
  +            %% In the future there may be a point to storing outgoing types on
  +            %% a per-edge basis as it would give us more precision in phi
  +            %% nodes, but there's nothing to gain from that at the moment so
  +            %% we'll store the current Ts to save memory.
  +            Ls = Ls1#{ L := {outgoing, Ts} },
  +            sig_bs(Bs, Ds, Ls, Fdb, Sub, SuccTypes, Meta, State);
  +        #{} ->
  +            %% This block is never reached. Ignore it.
  +            sig_bs(Bs, Ds0, Ls0, Fdb, Sub0, SuccTypes0, Meta, State0)
  +    end;
   sig_bs([], _Ds, _Ls, _Fdb, _Sub, SuccTypes, _Meta, State) ->
       {State, SuccTypes}.
   
  
positive.code:     RType = raw_type(RHS, Ts),
      beam_types:is_boolean_type(LType) andalso
          beam_types:is_boolean_type(RType).
  
  all_same([{H,_}|T]) ->
      all(fun({E,_}) -> E =:= H end, T).
  
  eval_bif(#b_set{op={bif,Bif},args=Args}=I, Ts) ->
      Arity = length(Args),
  
negative.code:     #b_local{name=#b_literal{val=Name}, arity=Arity}.
  
  opt_bs([{L, #b_blk{is=Is0,last=Last0}=Blk0} | Bs],
         Ds0, Ls0, Fdb0, Sub0, SuccTypes0, Meta, Acc) ->
      case Ls0 of
          #{ L := Incoming } ->
              {incoming, Ts0} = Incoming,         %Assertion.
  
              {Is, Ts, Ds, Fdb, Sub} =
              opt_is(Is0, Ts0, Ds0, Ls0, Fdb0, Sub0, Meta, []),
  
              Last1 = simplify_terminator(Last0, Ts, Ds, Sub),
              SuccTypes = update_success_types(Last1, Ts, Ds, Meta, SuccTypes0),
  
              UsedOnce = Meta#metadata.used_once,
              {Last, Ls1} = update_successors(Last1, Ts, Ds, Ls0, UsedOnce),
  
              Ls = Ls1#{ L := {outgoing, Ts} },           %Assertion.
  
              Blk = Blk0#b_blk{is=Is,last=Last},
              opt_bs(Bs, Ds, Ls, Fdb, Sub, SuccTypes, Meta, [{L,Blk} | Acc]);
          #{} ->
              %% This block is never reached. Discard it.
              opt_bs(Bs, Ds0, Ls0, Fdb0, Sub0, SuccTypes0, Meta, Acc)
      end;
  opt_bs([], _Ds, _Ls, Fdb, _Sub, SuccTypes, _Meta, Acc) ->
      {reverse(Acc), Fdb, SuccTypes}.
  
  