anchor.diff:          fun(DecodeExprs, Rest2Var) ->
                   ReadFieldDefFn = mk_fn(dfp_read_field_def_, MsgName),
                   Params2 = updated_merged_params(MsgName, XFieldDef, AnRes,
  -                                                FVar, PrevValue, Params, Opts),
  -                C = ?exprs('<call-read-field>'('<Rest2>', 0, 0, '<Params2>'),
  +                                                FVar, PrevValue, Params,
  +                                                TrUserDataVar, Opts),
  +                C = ?exprs('<call-read-field>'('<Rest2>', 0, 0, '<Params2>',
  +                                               'TrUserData'),
                              [replace_term('<call-read-field>', ReadFieldDefFn),
                               replace_tree('<Rest2>', Rest2Var),
  -                            splice_trees('<Params2>', Params2)]),
  +                            splice_trees('<Params2>', Params2),
  +                            replace_tree('TrUserData', TrUserDataVar)]),
                   DecodeExprs ++ C
           end,
       Tr = mk_find_tr_fn_elem(MsgName, FieldDef, IsOneof, AnRes),
  -    Body = decode_int_value(FVar, Bindings, FieldDef, Tr, Opts, BodyTailFn),
  +    Body = decode_int_value(FVar, Bindings, FieldDef, Tr, TrUserDataVar,
  +                            Opts, BodyTailFn),
       gpb_codegen:format_fn(
         mk_fn(d_field_, MsgName, FName),
  -      fun(<<1:1, X:7, Rest/binary>>, N, Acc, '<Params>') when N < ?NB ->
  -              call_self(Rest, N + 7, X bsl N + Acc, '<Params>');
  -         (<<0:1, X:7, Rest/binary>>, N, Acc, '<InParams>') ->
  +      fun(<<1:1, X:7, Rest/binary>>, N, Acc, '<Params>', TrUserData)
  +            when N < ?NB ->
  +              call_self(Rest, N + 7, X bsl N + Acc, '<Params>', TrUserData);
  +         (<<0:1, X:7, Rest/binary>>, N, Acc, '<InParams>', TrUserData) ->
                 '<body>'
         end,
         [splice_trees('<Params>', Params),
  
positive.code:       end,
        MsgDef).
  
  decoder_finalize_result(Params, FFields, MsgName, MsgDef, AnRes, Opts) ->
      case get_field_pass(MsgName, AnRes) of
          pass_as_params ->
              case get_mapping_and_unset_by_opts(Opts) of
                  X when X == records;
                         X == {maps, present_undefined} ->
                      decoder_finalize_params_all_present(Params, MsgName, MsgDef,
                                                          AnRes, Opts);
                  {maps, omitted} ->
                      decoder_finalize_params_opt_omitted(Params, MsgName, MsgDef,
                                                          AnRes, Opts)
              end;
          pass_as_record ->
  
negative.code:            records -> ?f("-export([encode_msg/1, encode_msg/2]).~n");
             maps    -> ?f("-export([encode_msg/2, encode_msg/3]).~n")
         end,
         ?f("-export([decode_msg/2"),[", decode_msg/3" || NoNif], ?f("]).~n"),
         case get_records_or_maps_by_opts(Opts) of
             records -> ?f("-export([merge_msgs/2]).~n");
             maps    -> ?f("-export([merge_msgs/3]).~n")
  