On a 2n-dimensional phase-space with coordinates $x$ and $p$, the Moyal product can be written explicitly as
$$g(x,p) \star h(x,p) = g(x,p) e^{\frac{i}{2}\left( \overleftarrow{\partial_x} \cdot \overrightarrow{\partial_p} - \overrightarrow{\partial_x} \cdot \overleftarrow{\partial_p}\right)} h(x,p) \, .$$
Assume now that we have something like $f(x,p)=g(x,p)\star h(x,p),$ where we have to solve for $g(x,p)$. I suppose it's not always possible, but how would one go about solving that when it is? And what would the invertibility conditions even be? I can't seem to find the answer anywhere.
Maybe even a simpler problem, $f(x,p)=g(x,p)\star g(x,p) $ with $f(x,p)$ known. How would one take the $\star$-square root and when would it be possible?