anchor.diff:      {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(<<>>)),
       ok.
   
  +
  +
   t_erlang_hash(Config) when is_list(Config) ->
   
       ok = t_bif_erlang_phash2(),
       ok = t_bif_erlang_phash(),
       ok = t_bif_erlang_hash(),
  -
       ok.
   
   t_bif_erlang_phash2() ->
  -
       39679005 = erlang:phash2(#{}),
  -    78942764 = erlang:phash2(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 }),
  -    37338230 = erlang:phash2(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} }),
  -    14363616 = erlang:phash2(#{ 1 => a }),
  -    51612236 = erlang:phash2(#{ a => 1 }),
  -
  -    37468437 = erlang:phash2(#{{} => <<>>}),
  -    44049159 = erlang:phash2(#{<<>> => {}}),
  +    33667975 = erlang:phash2(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 }), % 78942764
  +    95332690 = erlang:phash2(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} }), % 37338230
  +    108954384 = erlang:phash2(#{ 1 => a }), % 14363616
  +    59617982 = erlang:phash2(#{ a => 1 }), % 51612236
  +
  +    42770201 = erlang:phash2(#{{} => <<>>}), % 37468437
  +    71687700 = erlang:phash2(#{<<>> => {}}), % 44049159
   
       M0 = #{ a => 1, "key" => <<"value">> },
       M1 = maps:remove("key",M0),
       M2 = M1#{ "key" => <<"value">> },
   
  -    118679416 = erlang:phash2(M0),
  -    51612236  = erlang:phash2(M1),
  -    118679416 = erlang:phash2(M2),
  +    70249457 = erlang:phash2(M0), % 118679416
  +    59617982 = erlang:phash2(M1), % 51612236
  +    70249457 = erlang:phash2(M2), % 118679416
       ok.
   
   t_bif_erlang_phash() ->
       Sz = 1 bsl 32,
  -    268440612  = erlang:phash(#{},Sz),
  -    1196461908 = erlang:phash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz),
  -    3944426064 = erlang:phash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz),
  -    1394238263 = erlang:phash(#{ 1 => a },Sz),
  -    4066388227 = erlang:phash(#{ a => 1 },Sz),
  -
  -    1578050717 = erlang:phash(#{{} => <<>>},Sz),
  -    1578050717 = erlang:phash(#{<<>> => {}},Sz), % yep, broken
  +    1113425985 = erlang:phash(#{},Sz), % 268440612
  +    1510068139 = erlang:phash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz), % 1196461908
  +    3182345590 = erlang:phash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz), % 3944426064
  +    2927531828 = erlang:phash(#{ 1 => a },Sz), % 1394238263
  +    1670235874 = erlang:phash(#{ a => 1 },Sz), % 4066388227
  +
  +    3935089469 = erlang:phash(#{{} => <<>>},Sz), % 1578050717
  +    71692856   = erlang:phash(#{<<>> => {}},Sz), % 1578050717
   
       M0 = #{ a => 1, "key" => <<"value">> },
       M1 = maps:remove("key",M0),
       M2 = M1#{ "key" => <<"value">> },
   
  -    3590546636 = erlang:phash(M0,Sz),
  -    4066388227 = erlang:phash(M1,Sz),
  -    3590546636 = erlang:phash(M2,Sz),
  +    2620391445 = erlang:phash(M0,Sz), % 3590546636
  +    1670235874 = erlang:phash(M1,Sz), % 4066388227
  +    2620391445 = erlang:phash(M2,Sz), % 3590546636
       ok.
   
   t_bif_erlang_hash() ->
       Sz = 1 bsl 27 - 1,
  -    5158      = erlang:hash(#{},Sz),
  -    71555838  = erlang:hash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz),
  -    5497225   = erlang:hash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz),
  -    126071654 = erlang:hash(#{ 1 => a },Sz),
  -    126426236 = erlang:hash(#{ a => 1 },Sz),
  -
  -    101655720 = erlang:hash(#{{} => <<>>},Sz),
  -    101655720 = erlang:hash(#{<<>> => {}},Sz), % yep, broken
  +    39684169 = erlang:hash(#{},Sz),  % 5158
  +    33673142 = erlang:hash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz), % 71555838
  +    95337869 = erlang:hash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz), % 5497225
  +    108959561 = erlang:hash(#{ 1 => a },Sz), % 126071654
  +    59623150 = erlang:hash(#{ a => 1 },Sz), % 126426236
  +
  +    42775386 = erlang:hash(#{{} => <<>>},Sz), % 101655720
  +    71692856 = erlang:hash(#{<<>> => {}},Sz), % 101655720
   
       M0 = #{ a => 1, "key" => <<"value">> },
       M1 = maps:remove("key",M0),
       M2 = M1#{ "key" => <<"value">> },
   
  -    38260486  = erlang:hash(M0,Sz),
  -    126426236 = erlang:hash(M1,Sz),
  -    38260486  = erlang:hash(M2,Sz),
  -    ok.
  -
  +    70254632 = erlang:hash(M0,Sz), % 38260486
  +    59623150 = erlang:hash(M1,Sz), % 126426236
  +    70254632 = erlang:hash(M2,Sz), % 38260486
  +    ok.
   
   t_map_encode_decode(Config) when is_list(Config) ->
       <<131,116,0,0,0,0>> = erlang:term_to_binary(#{}),
  
positive.code: t_bif_map_keys(Config) when is_list(Config) ->
      [] = maps:keys(#{}),
  
      [1,2,3,4,5] = maps:keys(#{ 1 => a, 2 => b, 3 => c, 4 => d, 5 => e}),
      [1,2,3,4,5] = maps:keys(#{ 4 => d, 5 => e, 1 => a, 2 => b, 3 => c}),
  
      % values in key order: [4,int,"hi",<<"key">>]
      M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
      [4,int,"hi",<<"key">>] = maps:keys(M1),
  
      %% error case
      {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(1 bsl 65 + 3)),
  
negative.code:     EncodedTerm = Item, %% Asssert
      match_encoded_map(Bin1,Items).
  
  t_bif_map_to_list(Config) when is_list(Config) ->
      [] = maps:to_list(#{}),
      [{a,1},{b,2}] = lists:sort(maps:to_list(#{a=>1,b=>2})),
      [{a,1},{b,2},{c,3}] = lists:sort(maps:to_list(#{c=>3,a=>1,b=>2})),
      [{a,1},{b,2},{g,3}] = lists:sort(maps:to_list(#{g=>3,a=>1,b=>2})),
      [{a,1},{b,2},{g,3},{"c",4}] = lists:sort(maps:to_list(#{g=>3,a=>1,b=>2,"c"=>4})),
      [{3,v2},{hi,v4},{{hi,3},v5},{"hi",v3},{<<"hi">>,v1}] =
  	lists:sort(maps:to_list(#{<<"hi">>=>v1,3=>v2,"hi"=>v3,hi=>v4,{hi,3}=>v5})),
  
      [{3,v7},{hi,v9},{{hi,3},v10},{"hi",v8},{<<"hi">>,v6}] =
  	lists:sort(maps:to_list(#{<<"hi">>=>v1,3=>v2,"hi"=>v3,hi=>v4,{hi,3}=>v5,
  				  <<"hi">>=>v6,3=>v7,"hi"=>v8,hi=>v9,{hi,3}=>v10})),
  
      %% error cases
      {'EXIT', {badarg,_}} = (catch maps:to_list(id(a))),
  