anchor.diff:  %%    The state is used to allow us to determine the usage state
   %%  across branches.
   
  +-spec is_not_used(beam_asm:reg(), [instruction()], code_index()) -> boolean().
  +
   is_not_used(R, Is, D) ->
       St = #live{lbl=D,res=gb_trees:empty()},
       case check_liveness(R, Is, St) of
  
positive.code: %% code_at(Label, State) -> [I].
  %%  Retrieve the code at the given label.
  
  code_at(L, Ll) ->
      gb_trees:get(L, Ll).
  
  %% bif_to_test(Bif, [Op], Fail) -> {test,Test,Fail,[Op]}
  %%  Convert a BIF to a test. Fail if not possible.
  
  bif_to_test(is_atom,     [_]=Ops, Fail) -> {test,is_atom,Fail,Ops};
  bif_to_test(is_boolean,  [_]=Ops, Fail) -> {test,is_boolean,Fail,Ops};
  
negative.code: %%  Index the instruction sequence so that we can quickly
  %%  look up the instruction following a specific label.
  
  -spec index_labels([instruction()]) -> code_index().
  
  index_labels(Is) ->
      index_labels_1(Is, []).
  
  %% empty_label_index() -> State
  %%  Create an empty label index.
  
  -spec empty_label_index() -> code_index().
  
  empty_label_index() ->
      gb_trees:empty().
  
  %% index_label(Label, [Instruction], State) -> State
  %%  Add an index for a label.
  
  -spec index_label(beam_asm:label(), [instruction()], code_index()) ->
     code_index().
  
  index_label(Lbl, Is0, Acc) ->
      Is = drop_labels(Is0),
  