(** Auxiliary for the compilation of [switch] statements. *)

Definition tr_jumptable (nexits: list node) (tbl: list nat) (ttbl: list node) : Prop :=
  forall v act,
  list_nth_z tbl v = Some act ->
  exists n, list_nth_z ttbl v = Some n /\ nth_error nexits act = Some n.

Lemma transl_switch_charact: forall map r nexits t s ns s' incr, map_valid map s -> reg_valid r s -> transl_switch r nexits t s = OK ns s' incr -> tr_switch s'.(st_code) map r nexits t ns.