Removing recursion from a function with multiple params
Here is an equivalent way to calculate $t(x,y,z)$.

We distinguish between three cases:


$x \leq z$: the answer is $y$.
$x = z + 1$: the answer is $z$ if $y \leq x$, and $x$ otherwise.
$x-z \geq 2$: the answer is $z$ (if $x-z$ is odd) or $\min(y+1,z)$ (if $x-z$ is even) if $y \leq x+1$, and $x$ (if $y-x$ is even) or $z+1$ (if $y-x$ is odd) otherwise.


You should be able to prove this characterization by induction. The second case is identical to the third case, except that the condition $y \leq x$ is replaced by the condition $y \leq x+1$.