Let $x >0$. How can one find good $O$ bounds on the integrals $$\int_0^x\frac{\operatorname{li}(t)-\pi(t)}{t}dt$$ and $$\int_x^\infty\frac{\operatorname{li}(t)-\pi(t)}{t^2}dt$$ where $\pi(x)$ is the prime counting function and $\operatorname{li}(x) = \int_0^x \frac{1}{\log t}dt$ is the logarithmic integral, and where all Cauchy principal values are assumed? I'm looking for better bounds than can be deduced from the prime number theorem with error bound. In particular, I'm hoping that the first integral is $O\left(\frac{\sqrt{x}\log \log \log x}{\log x}\right)$ and the second integral is $O\left(\frac{\log \log \log x}{\sqrt{x}\log x }\right)$, unconditionally. Is this correct?
Note that $$\int_1^\infty \frac{\operatorname{li}(t)-\pi(t)}{t^{2}} dt = \gamma -M = 0.315718452053\ldots,$$ $$\int_0^1\frac{\operatorname{li}(t)-\pi(t)}{t}dt = -1,$$ and $$\int_0^\mu\frac{\operatorname{li}(t)-\pi(t)}{t}dt = -\mu,$$ where ${M=\lim _{n\rightarrow \infty }\left(\sum _{p\leq n}{\frac {1}{p}}-\log \log n\right)} = 0.261497212847\ldots$ is the Meissel-Mertens constant and $\mu = 1.451369234883\ldots$ is the Ramanujan-Soldner constant (i.e., the unique positive zero of $\operatorname{li}(x)$). Obvious $O$ bounds from the 1899 prime number theorem with error bound, for example, are $$\int_0^x\frac{\operatorname{li}(t)-\pi(t)}{t}dt = O\left(xe^{-c\sqrt{\log x}}\right) \ (x \to \infty)$$ and $$\int_x^\infty\frac{\operatorname{li}(t)-\pi(t)}{t^2}dt= O\left(e^{-c\sqrt{\log x}}\right) \ (x \to \infty),$$ for some $c > 0$, but I'm hoping that one can do much better than any prime number theorem by exploiting the oscillation of $\operatorname{li}(x)-\pi(x)$.