Computes the greatest common divisor of two integers by repeatedly replacing the larger number with the division remainder until zero.