anchor.diff:      end.
   
   updated_merged_params(MsgName, XFieldDef, AnRes, NewValue, PrevValue,
  -                      Params, Opts) ->
  +                      Params, TrUserDataVar, Opts) ->
       Tr = mk_find_tr_fn_elem_or_default(MsgName, XFieldDef, AnRes),
       case {get_field_pass(MsgName, AnRes), XFieldDef} of
           {pass_as_params, {#?gpb_field{rnum=RNum}, _IsOneof}} ->
               MergedValue = merge_field_expr(XFieldDef, PrevValue, NewValue,
  -                                           MsgName, Tr, AnRes, Opts),
  +                                           MsgName, Tr, TrUserDataVar,
  +                                           AnRes, Opts),
               lists_setelement(RNum - 1, Params, MergedValue);
           {pass_as_record, {#?gpb_field{name=FName}, false}} ->
               MsgVar = hd(Params),
               MergedValue = merge_field_expr(XFieldDef, PrevValue, NewValue,
  -                                           MsgName, Tr, AnRes, Opts),
  +                                           MsgName, Tr, TrUserDataVar,
  +                                           AnRes, Opts),
               [mapping_update(MsgVar, MsgName, [{FName, MergedValue}], Opts)];
           {pass_as_record, {_OField, {true, CFName}}} ->
               MsgVar = hd(Params),
               MergedValue = merge_field_expr(XFieldDef, PrevValue, NewValue,
  -                                           MsgName, Tr, AnRes, Opts),
  +                                           MsgName, Tr, TrUserDataVar,
  +                                           AnRes, Opts),
               [mapping_update(MsgVar, MsgName, [{CFName, MergedValue}], Opts)]
       end.
   
   merge_field_expr({FieldDef, false}, PrevValue, NewValue,
  -                 MsgName, Tr, AnRes, Opts) ->
  +                 MsgName, Tr, TrUserDataVar, AnRes, Opts) ->
       case classify_field_merge_action(FieldDef) of
           overwrite ->
               NewValue;
           seqadd ->
               ElemPath = [MsgName, get_field_name(FieldDef)],
               Cons = find_translation(ElemPath, decode_repeated_add_elem, AnRes),
  -            ?expr('[New|Acc]'('<New>', '<Acc>'),
  +            ?expr('[New|Acc]'('<New>', '<Acc>', 'TrUserData'),
                     [replace_term('[New|Acc]', Cons),
                      replace_tree('<New>', NewValue),
  -                   replace_tree('<Acc>', PrevValue)]);
  +                   replace_tree('<Acc>', PrevValue),
  +                   replace_tree('TrUserData', TrUserDataVar)]);
           msgmerge ->
               #?gpb_field{type={msg,FMsgName}} = FieldDef,
               MergeFn = mk_fn(merge_msg_, FMsgName),
  
positive.code:                               undefined ->
                                    {'tag', 'New'};
                                {'tag', 'MVPrev'} ->
                                    {'tag', 'merge_msg_X'('MVPrev', 'New')};
                                _ ->
                                    {'tag', 'New'}
                            end,
  
negative.code:     ReadFieldDefFnName = mk_fn(dfp_read_field_def_, MsgName),
      Replacements =
          [splice_trees('InParams', InParams),
           replace_term('<call-read-field>', ReadFieldDefFnName),
           replace_tree('TrUserData', TrUserDataVar)] ++
          OutParamsReplacements,
      case Type of
          float ->
              gpb_codegen:format_fn(
                mk_fn(d_field_, MsgName, FName),
                fun(<<0:16,128,127, Rest/binary>>, Z1, Z2, 'InParams',
                    'TrUserData') ->
                        '<call-read-field>'(Rest, Z1, Z2, 'InfinityOutParams',
                                            'TrUserData');
                   (<<0:16,128,255, Rest/binary>>, Z1, Z2, 'InParams',
                    'TrUserData') ->
                        '<call-read-field>'(Rest, Z1, Z2, '-InfinityOutParams',
                                            'TrUserData');
                   (<<_:16,1:1,_:7,_:1,127:7, Rest/binary>>, Z1, Z2,
                    'InParams', 'TrUserData') ->
                        '<call-read-field>'(Rest, Z1, Z2, 'NanOutParams',
                                            'TrUserData');
                   (<<Value:32/little-float, Rest/binary>>, Z1, Z2,
                    'InParams', 'TrUserData') ->
                        '<call-read-field>'(Rest, Z1, Z2, 'OutParams',
                                            'TrUserData')
                end,
                Replacements);
          double ->
              gpb_codegen:format_fn(
                mk_fn(d_field_, MsgName, FName),
                fun(<<0:48,240,127, Rest/binary>>, Z1, Z2, 'InParams',
                    'TrUserData') ->
                        '<call-read-field>'(Rest, Z1, Z2, 'InfinityOutParams',
                                            'TrUserData');
                   (<<0:48,240,255, Rest/binary>>, Z1, Z2, 'InParams',
                    'TrUserData') ->
                        '<call-read-field>'(Rest, Z1, Z2, '-InfinityOutParams',
                                            'TrUserData');
                   (<<_:48,15:4,_:4,_:1,127:7, Rest/binary>>, Z1, Z2,
                    'InParams', 'TrUserData') ->
                        '<call-read-field>'(Rest, Z1, Z2, 'NanOutParams',
                                            'TrUserData');
                   (<<Value:64/little-float, Rest/binary>>, Z1, Z2,
                    'InParams', 'TrUserData') ->
                        '<call-read-field>'(Rest, Z1, Z2, 'OutParams',
                                            'TrUserData')
                end,
                Replacements)
      end.
  