Quarterly loss puts Samsung on track for worst year since 2011