  We consider an $\ell_2$-regularized non-convex optimization problem for
recovering signals from their noisy phaseless observations. We design and study
the performance of a message passing algorithm that aims to solve this
optimization problem. We consider the asymptotic setting $m,n \rightarrow
\infty$, $m/n \rightarrow \delta$ and obtain sharp performance bounds, where
$m$ is the number of measurements and $n$ is the signal dimension. We show that
for complex signals the algorithm can perform accurate recovery with only $m=
\left(\frac{64}{\pi^2}-4\right)n \approx 2.5n$ measurements. Also, we provide
sharp analysis on the sensitivity of the algorithm to noise. We highlight the
following facts about our message passing algorithm: (i) Adding $\ell_2$
regularization to the non-convex loss function can be beneficial. (ii) Spectral
initialization has marginal impact on the performance of the algorithm. The
sharp analyses in this paper, not only enable us to compare the performance of
our method with other phase recovery schemes, but also shed light on designing
better iterative algorithms for other non-convex optimization problems.
