Let $M$ be a simply connected Hadamard manifold. That is, $M$ is a complete Riemannian manifold with sectional curvature bounded above by 0. Let $f(x,y)=\frac{1}{2}d^2(x,y)$, where $x,y \in M$, and $d(.,.)$ is geodesic distance. I'm curious if $f:M^2 \to \mathbb{R}$ is a Morse-Bott function, and how to show it.

I know that $\nabla f(x,y)=(-\log_x(y),-\log_y(x))=0$ if and only if $x=y$. If I understand correctly, this is because $\exp_x:T_xM \to M$ and $\exp_y:T_yM \to M$ are both diffeomorphisms. Following from this, the critical points of $f$ are precisely $C^* =\{(x,x):x \in M\}$, hence a closed submanifold. It follows then to show that the kernel of $\nabla^2 f(x,x)$ is precisely the tangent bundle of $C^*$. This is something I find difficult as I do not really know how to compute the hessian of $f(x,y)=\frac{1}{2}d^2(x,y)$. Could I possibly get some help on this?

1more comment