Compactness results for immersions of prescribed Gaussian curvature I - analytic aspects