anchor.diff:      %% tag. Therefore the Y registers must be initialized at this point.
       verify_y_init(Vst),
       Vst;
  -fork_state(L, #vst{current=St,branched=B,ref_ctr=Counter0}=Vst) ->
  -    case gb_trees:is_defined(L, B) of
  -        true ->
  -            {MergedSt, Counter} = merge_states(L, St, B, Counter0),
  -            Branched = gb_trees:update(L, MergedSt, B),
  -            Vst#vst{branched=Branched,ref_ctr=Counter};
  -        false ->
  -            Vst#vst{branched=gb_trees:insert(L, St, B)}
  -    end.
  +fork_state(L, #vst{current=St0,branched=Branched0,ref_ctr=Counter0}=Vst) ->
  +    {St, Counter} = merge_states(L, St0, Branched0, Counter0),
  +    Branched = Branched0#{ L => St },
  +    Vst#vst{branched=Branched,ref_ctr=Counter}.
   
   %% merge_states/3 is used when there's more than one way to arrive at a
   %% certain point, requiring the states to be merged down to the least
   %% common subset for the subsequent code.
   
   merge_states(L, St, Branched, Counter) when L =/= 0 ->
  -    case gb_trees:lookup(L, Branched) of
  -        {value, OtherSt} -> merge_states_1(St, OtherSt, Counter);
  -        none -> {St, Counter}
  +    case Branched of
  +        #{ L := OtherSt } -> merge_states_1(St, OtherSt, Counter);
  +        #{} -> {St, Counter}
       end.
   
   merge_states_1(St, none, Counter) ->
  
positive.code:     St#st{h=0,hf=0}.
  
  validate_instrs([], MFA, _Offset, #vst{branched=Targets0,labels=Labels0}=Vst) ->
      Targets = gb_trees:keys(Targets0),
      Labels = gb_sets:to_list(Labels0),
      case Targets -- Labels of
  	[] -> Vst;
  	Undef ->
  
negative.code:         X -> gcd(B, X)
      end.
  
  error(Error) -> throw(Error).
  