Suppose $f$ and $g$ are differentiable functions such that
$$
x g(f(x)) f'(g(x)) g'(x) = f(g(x)) g'(f(x)) f'(x)
$$
for all real $x$. Moreover, $f$ is nonnegative and $g$ is positive. Furthermore,
$$
\int_{0}^{a} f(g(x)) dx = 1 - \frac{e^{-2a}}{2}
$$
for all reals $a$. Given that $g(f(0)) = 1$, compute the value of $g(f(4))$.