anchor.diff:  	  "{",Dst,",",DstBuf,"}",nl,
   	  "end"]),
       ok.
  +
  +optimize_alignment(Imm) ->
  +    opt_al(Imm, unknown).
  +
  +optimize_alignment(Imm, Al) ->
  +    opt_al(Imm, Al).
  +
   
   per_dec_boolean() ->
       {map,{get_bits,1,[1]},[{0,false},{1,true}]}.
  
positive.code: -record(st, {var,
  	     base}).
  
  dec_slim_cg(Imm, BytesVar) ->
      asn1ct_name:new(v),
      [H|T] = atom_to_list(asn1ct_name:curr(v)) ++ "@",
      VarBase = [H-($a-$A)|T],
  
negative.code: per_num_bits(N) when N =< 64 -> 6;
  per_num_bits(N) when N =< 128 -> 7;
  per_num_bits(N) when N =< 255 -> 8.
  
  %%%
  %%% Remove unnecessary aligning to octet boundaries.
  %%%
  
  opt_al({get_bits,E0,Opts0}, A0) ->
      {E,A1} = opt_al(E0, A0),
      Opts = opt_al_1(A1, Opts0),
      A = update_al(A1, E, Opts),
      {{get_bits,E,Opts},A};
  opt_al({call,Fun,E0}, A0) ->
      {E,A} = opt_al(E0, A0),
      {{call,Fun,E},A};
  opt_al({convert,Op,E0}, A0) ->
      {E,A} = opt_al(E0, A0),
      {{convert,Op,E},A};
  opt_al({value,E0}, A0) ->
      {E,A} = opt_al(E0, A0),
      {{value,E},A};
  opt_al({add,E0,I}, A0) when is_integer(I) ->
      {E,A} = opt_al(E0, A0),
      {{add,E,I},A};
  opt_al({test,E0,V,B0}, A0) ->
      {E,A1} = opt_al(E0, A0),
      {B,A2} = opt_al(B0, A1),
      {{test,E,V,B},A2};
  opt_al({'case',Cs0}, A0) ->
      {Cs,A} = opt_al_cs(Cs0, A0),
      {{'case',Cs},A};
  opt_al({map,E0,Cs}, A0) ->
      {E,A} = opt_al(E0, A0),
      {{map,E,Cs},A};
  opt_al(I, A) when is_integer(I) ->
      {I,A}.
  
  opt_al_cs([C0|Cs0], A0) ->
      {C,A1} = opt_al(C0, A0),
      {Cs,A2} = opt_al_cs(Cs0, A0),
      {[C|Cs],merge_al(A1, A2)};
  opt_al_cs([], _) -> {[],none}.
  
  merge_al(unknown, _) -> unknown;
  merge_al(Other, none) -> Other;
  merge_al(_, unknown) -> unknown;
  merge_al(I0, I1) ->
      case {I0 rem 8,I1 rem 8} of
  	{I,I} -> I;
  	{_,_} -> unknown
      end.
  
  opt_al_1(unknown, Opts) ->
      Opts;
  opt_al_1(A, Opts0) ->
      case alignment(Opts0) of
  	none ->
  	    Opts0;
  	full ->
  	    case A rem 8 of
  		0 ->
  		    %% Already in alignment.
  		    proplists:delete(align, Opts0);
  		Bits ->
  		    %% Cheaper alignment with a constant padding.
  		    Opts1 = proplists:delete(align, Opts0),
  		    [{align,8-Bits }|Opts1]
  	    end;
  	A ->					%Assertion.
  	    Opts0
      end.
  
  update_al(A0, E, Opts) ->
      A = case alignment(Opts) of
  	    none -> A0;
  	    full -> 0;
  	    Bits when is_integer(A0) ->
  		0  = (A0 + Bits) rem 8;		%Assertion.
  	    _ ->
  		0
  	end,
      [U] = [U || U <- Opts, is_integer(U)],
      if
  	U rem 8 =:= 0 -> A;
  	is_integer(A), is_integer(E) -> A + U*E;
  	true -> unknown
      end.
  
  %%%
  %%% Flatten the intermediate format and assign temporaries.
  