Directly compile true and false branch of if to imperative