Corolla sound like a diesel

Could be a timing chain. If it’s that loud it might have slipped which could account for lack of power. The noise could also mean the engine is toast. That noise could be bearings. You need to get this checked out soon.