Suppose that a function $f:[0,1]\to\mathbb{R}$ satisfies the following conditions:
$\int_{0}^{1}\,f(x)\,{\rm d}x=0$, and
$f\in R[0,1] $.
Prove that $$\int_{0}^{1}\,\left(\int_{0}^{x}\,f(y)\,{\rm d}y\right)^2\,{\rm d}x\leqslant -\frac{mM}{6(M-m)^2}(3m^2-8mM+3M^2)\,,$$ where $m:=\min\limits_{x\in[0,1]} f(x)$ and $M:=\max\limits_{x\in[0,1]} f(x)$.