Definition match_prog (prog tprog: program) :=
  match_program (fun cu f tf => tf = transf_fundef (romem_for cu) f) eq prog tprog.

Lemma transf_ros_correct: forall bc rs ae ros f rs', genv_match bc ge -> ematch bc rs ae -> find_function ge ros rs = Some f -> regs_lessdef rs rs' -> exists cunit, find_function tge (transf_ros ae ros) rs' = Some (transf_fundef (romem_for cunit) f) /\ linkorder cunit prog.