Curve of fastest descent between three points.

Let $$A, B$$, and $$C$$ be three points in $$\mathbb{R}^2$$ such that $$A = (x_1,y_1), B=(x_2,y_2)$$, and $$C= (x_3,y_3)$$ where $$x_1 and $$y_1 > y_2 > y_3$$. In other words, $$B$$ is to the upper left of $$C$$ and $$A$$ is to the upper left of $$B$$.

What is the curve $$y$$ of fastest descent that contains these three points, $$\textit{i.e.}$$ what is the curve $$y$$ such that a bead starting at $$A$$ travels to $$B$$ and then $$C$$ in the shortest amount of time, assuming there is no friction and that gravity is the only force acting upon the bead.

For two points the answer can be found to be the cycloid connecting the points relatively easily using calculus of variations; however for three points it seems a little trickier. I wonder if there is no unique minimizing answer that is differentiable, but I also cannot show that.

Depending on the local slope $$\phi_B$$ of a rigid junction point between fixed points (A,C) horizontal speeds of different double cycloids is different.
Three different time functions can be found out depending on must be given/assumed three positions and $$\phi_B$$ at discontinuity as boundary conditions in a C of V problem.