Resolved dynamics and subgrid stresses in separating and reattaching flows