I was inspired by this question: it is quite easy to prove that for any positive odd number $2m+1$ there exists a function $f\in C^{\infty}(\mathbb{R})$ such that $$\left|\,f^{-1}(y)\right|=2m+1\tag{1}$$ for any $y\in\mathbb{R}$. My (double) question now is:
1) Is it possible that $(1)$ holds for a real-analytic function ?
2) Is it possible that $(1)$ holds for an entire real function ?
I am quite sure that the answer to the second point is negative. If we take $x_M$ as a point of local maximum ad $x_m$ as a point of local minimum, there must be $z_M,z_m\in\mathbb{R}$ with the properties that $f(z_M)=f(x_M),f(z_m)=f(x_m)$ and neither $z_m$ or $z_M$ are stationary points. If we prove that $f^{(k)}(z_m)=f^{(k)}(z_M)$ for any $k\geq 1$, then $g(z)=f'(z+z_m)-f'(z+z_M)\equiv 0$, so $f'$ is a $(z_M-z_m)$-periodic function. By translation, we can assume: $$z_m=-1,\quad z_M=1,\quad f(z_m)=-1,\quad f(z_M)=1,$$ and have a $2$-periodic function with the property that $f(\xi)\in\{-1,1\}$ for any $\xi\in[-1,1]$ such that $f'(\xi)=0$. So $f$ should be $(T_{2m+1}\circ\varphi)(x)$ with $T$ being a Chebyshev polynomial and $\varphi$ being a diffeomorphism of $[-1,1]$. But for such a function $f''(1)=-f''(1)\neq 0$.
However, there are too many "maybe" and "should" in this argument, and above all, it does not fit the real analytic case.

