let indir_at tbl label loc =
  let rec indir_rec loc = match loc with
    | D1addr (v,t) ->
        (* SMPrule *(@x) --> x *)
        let x = data_of_cvar_at tbl label v (fun _ -> t) in
          Fol.e_data x
    | D1mu _ | D1muRange _ ->
        Wp_parameters.fatal
          "Indirect access to (%a) which is not a pointer"
          pp_data loc
    | D1muI (_, NoneSome x) ->
        (* SMPrule *(mu (p, *, x)) --> x *)
        x
    | D1muI (p, Some (i), Some x) ->
        (* SMPrule *(mu(p, [#(i),*] -> q)) --> if (i=0) then x else *p *)
        e_cond (e_icmp Formula.Ceq i (e_int 0)) x (indir_rec p)
    | D1depl (p, ch) ->
        (* SMPrule *(p+ch) --> ( *p).ch *)
        proj (data_of_term (indir_rec p)) ch
    | _ ->
        Fol.e_data (D1indir (loc))
  in indir_rec loc