anchor.diff:       f("~s",
          [MergeCode]),
        f("    ~p(~s, 0, 0~s).~n",
  -       [mk_fn(d_read_field_def_, MsgName), RestVar, OutFieldVars])];
  -format_vi_based_field_decoder(MsgName, FieldDef, NF, Opts) when NF > 250 ->
  +       [mk_fn(d_read_field_def_, MsgName), RestVar, OutFieldVars])].
  +
  +format_vi_based_field_decoder_par(MsgName, FieldDef, Opts) ->
       #field{type=Type, name=FName}=FieldDef,
       BValueExpr = "X bsl N + Acc",
       {FValueCode, RestVar} = mk_unpack_vi(4, "FValue", BValueExpr, Type, "Rest",
  
positive.code:                 end,
                  InitAcc,
                  Defs).
  
  find_msgsizes_known_at_compile_time(Defs) ->
      T = ets:new(gpb_msg_sizes, [set, public]),
  
negative.code:             "0, 0" %% length of packed bytes is varint-based
      end.
  
  format_field_decoders(MsgName, MsgDef, AnRes, Opts) ->
      [[format_field_decoder(MsgName, Field, AnRes, Opts), "\n"]
       || Field <- MsgDef].
  
  format_field_decoder(MsgName, Field, AnRes, Opts) ->
      case is_packed(Field) of
          false -> format_non_packed_field_decoder(MsgName, Field, AnRes, Opts);
          true  -> format_packed_field_decoder(MsgName, Field, AnRes, Opts)
      end.
  
  format_non_packed_field_decoder(MsgName, #field{type=Type}=Field, AnRes, Opts)->
      case Type of
          sint32   -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          sint64   -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          int32    -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          int64    -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          uint32   -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          uint64   -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          bool     -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          {enum,_} -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          fixed32  -> format_uf32_field_decoder(MsgName, Field, AnRes);
          sfixed32 -> format_sf32_field_decoder(MsgName, Field, AnRes);
          float    -> format_float_field_decoder(MsgName, Field, AnRes);
          fixed64  -> format_uf64_field_decoder(MsgName, Field, AnRes);
          sfixed64 -> format_sf64_field_decoder(MsgName, Field, AnRes);
          double   -> format_double_field_decoder(MsgName, Field, AnRes);
          string   -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          bytes    -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts);
          {msg,_}  -> format_vi_based_field_decoder(MsgName, Field, AnRes, Opts)
      end.
  
  format_packed_field_decoder(MsgName, FieldDef, AnRes, Opts) ->
      case get_field_pass(MsgName, AnRes) of
          pass_as_params ->
              format_packed_field_decoder_pap(MsgName, FieldDef, AnRes, Opts);
          pass_as_record ->
              format_packed_field_decoder_par(MsgName, FieldDef, Opts)
      end.
  
  format_packed_field_decoder_pap(MsgName, FieldDef, AnRes, Opts) ->
      NF = get_num_fields(MsgName, AnRes),
      #field{name=FName, rnum=RNum, opts=FOpts}=FieldDef,
      DecodePackWrapFn = mk_fn(d_field_, MsgName, FName),
      FieldDefAsNonpacked = FieldDef#field{opts = FOpts -- [packed]},
  