anchor.diff:      throw(impossible);
   opt_choice_2([], _) -> [].
   
  -
  -%%%
  -%%% Helper functions for code generation of open types.
  -%%%
  -
  -per_enc_open_type(Val0, {ToBinMod,ToBinFunc}, Aligned) ->
  -    {B,[Val,Len,Bin]} = mk_vars(Val0, [len,bin]),
  -    B ++ [{call,ToBinMod,ToBinFunc,[Val],Bin},
  -	  {call,erlang,byte_size,[Bin],Len}|
  -	  per_enc_length(Bin, 8, Len, Aligned)].
  -
  -enc_open_type([{'cond',Cs}], Aligned) ->
  -    [{'cond',[[C|enc_open_type_1(Act, Aligned)] || [C|Act] <- Cs]}];
  -enc_open_type(_, _) ->
  -    throw(impossible).
  -
  -enc_open_type_1([{error,_}]=Imm, _) ->
  -    Imm;
  -enc_open_type_1(Imm, Aligned) ->
  -    NumBits = num_bits(Imm, 0),
  -    Pad = case 8 - (NumBits rem 8) of
  -	      8 -> [];
  -	      Pad0 -> [{put_bits,0,Pad0,[1]}]
  -	  end,
  -    NumBytes = (NumBits+7) div 8,
  -    enc_length(NumBytes, no, Aligned) ++ Imm ++ Pad.
  -
  -num_bits([{put_bits,_,N,[U|_]}|T], Sum) when is_integer(N) ->
  -    num_bits(T, Sum+N*U);
  -num_bits([_|_], _) ->
  -    throw(impossible);
  -num_bits([], Sum) -> Sum.
  -
  -per_enc_open_type_output(Imm) ->
  -    Dst = output_var(),
  -    {Dst,[{list,Imm,Dst}]}.
  -
  -output_var() ->
  -    asn1ct_name:new(enc),
  -    Curr = asn1ct_name:curr(enc),
  -    [H|T] = atom_to_list(Curr),
  -    {var,[H - ($a - $A)|T ++ "@output"]}.
  -
  -
   %%%
   %%% Optimize list comprehensions (SEQUENCE OF/SET OF).
   %%%
  
positive.code: 
  enc_cg(Imm0, false) ->
      Imm1 = enc_cse(Imm0),
      Imm = enc_pre_cg(Imm1),
      enc_cg(Imm);
  enc_cg(Imm0, true) ->
      Imm1 = enc_cse(Imm0),
      Imm2 = enc_hoist_align(Imm1),
      Imm3 = enc_opt_al(Imm2),
      Imm4 = per_fixup(Imm3),
      Imm = enc_pre_cg(Imm4),
      enc_cg(Imm).
  
  %%%
  
negative.code:     [Sep,mk_val(A)|enc_call_args(As, ", ")];
  enc_call_args([], _) -> [].
  
  enc_cg_cond(Cs) ->
      emit("if "),
      enc_cg_cond(Cs, ""),
  