It's before. As someone who's done the work, albeit years ago, some of it gets dumped daily.
Modern pumping & processing practices have greatly reduced the waste, but yeah, it's just part of the process.