Decompositions in theorems in classical Fourier analysis which decompose a function into large Fourier coefficients and a part that is pseudorandom with respect to (has small correlation with) linear functions. The Goldreich-Levin theorem [GL89] can be viewed as an algorithmic version of such a decomposition as it gives an efficient algorithm for computing it. In the study of quadratic Fourier analysis'', higher degree analogues of such decompositions have been developed, which allow decompositions into parts with stronger properties. We develop a polynomial time algorithm for computing a decomposition of a function into quadratic phase function and a part which is small in Gowers $U^3$ norm. A key part of the algorithm is a local self-correction procedure for Reed-Muller codes of order 2 (over $\F_2^n$) for a function at distance $1/2-\epsilon$ from a codeword. This is an algorithmic version of a result of Samorodnitsky, who gave a tester for this problem. To our knowledge, this is the first instance of a correction procedure for any class of codes, beyond the list-decoding radius. I will describe a new constructive proof of the decomposition theorem of Gowers and Wolf [GT09], which gives a decomposition of an arbitrary bounded function, into few quadratic phases, a part that is small in Gowers $U^3$ norm and another error term which is small $\ell_1$ norm. I will then describe some components of the above correction procedure, which can be plugged into the proof of the decomposition theorem to obtain a quadratic Goldreich-Levin theorem. Joint work with Julia Wolf.