Let $X$ be a circle that with one corner (i.e. think of a triangle where we smooth out two of the vertices). Now let us consider the topological torus $M \cong \mathbb{T}^n$ which is the product of $n$ copies of $X$. Note that $M$ contains $n$ distinct circles along which it is not smooth.
Finally, suppose we are given a function $f:M \rightarrow \mathbb{R}$ which is continuous on all of $M$ and is smooth wherever $M$ is smooth. Is there any way to conclude that there exists a critical point on the smooth part of $M$? What if we replace some of the non-smooth circles with smooth ones? That is take $M$ to be the product of $k$ smooth circles, and $n -k$ non-smooth ones?
I'm not concerned whether the critical point is non-degenerate.
An easy example is the case $n = 1$: The $\min$ or $\max$ of $f$ will correspond to a critical point on the smooth part of $X$. This example tells us that generically we should expect $f$ to have a critical point on the smooth part of $M$ since, generically, the $\min$ or $\max$ should not lie on the measure zero subset of $M$ that is not smooth.
I heard of something called Stratified Morse Theory, but I'm not sure if this applies, or whether there is a more elementary way to think about the problem not using Stratified Morse Theory.