How bad could it be?
Let's try to learn something about the worst-case running-time
of the Euclidean GCD algorithm. If you actually run through the
example on some inputs, you'll see that the remainders keep
getting smaller and smaller until we hit zero and, in practice,
they seem to gert small fast. So a bad case for the Euclidean
algorithm is when they get small slowly, and it takes lots of
steps to get to zero. So, the key is this: what gives us big
remainders? Well, in dividing $a$ by $b$, if $b$ is too close
to $a$, the quotient is 1 and there is only a small amount of
leftover, which is the remainder, $r$. On the other hand, if
$b$ is small, then $r$ is necessarily small, since it must be
less than $b$. So, as with Bears, the middle is "just right".
If $b = \lfloor a/2 \rfloor + 1$ we get the largest possible
remainder. Even so, we have the following:
\[
r \lt 1/2 a
\]
If we apply this to the Euclidean algorithm, we get the
following (where $r_i$ is the remainder at the $i$th step:
\[
\begin{array}{cccl}
a&b&r&\text{bound}\\
\hline
a&b&r_1&\lt a/2\\
b&r_1&r_2&\lt b/2\\
r_1&r_2&r_3&\lt a/2^2\\
r_2&r_3&r_4&\lt b/2^2\\
\vdots&\vdots&\vdots&\vdots\\
r_{2k-2}&r_{2k-1}&r_{2k}&\lt b/2^k\\
\end{array}
\]
So, after $2 \lg b$ steps we have
$r_{2\lg b} \lt 1$
which means the algorithm is done.
This gives an upper bound of $2 \lg b$ on the number of steps
(i.e. recursive calls).
Note, however, that this is
not the same as the running
time. Why? Because each step requires a "mod" operation, and
when the integers involved are too big to fit in a machine word,
these mods will no longer take constant time!
So, we make $O(\lg b)$ loop iterations. The actual worst-case
running time depends on how quickly we can do division and
find remainders, since we do one such computation per
iteration. The "grade-school" method for division of
$a$ by $b$ is $O((\log a)^2)$. There are better ways to do
division, but we don't have time. In any event, this gives us
a worst case running time $T_w(a,b) \in O(\lg b (\lg a)^2)$