Rewrite to execute distribution specific code inline