Let f be the piecewise function such that f(x) = x^2 - 5x - 64 & \text{if} \ x \le 0, \\ x^2 + 3x - 38 & \text{if} \ x > 0. Find all x such that f(x) = 50.