def compute_gcd(x, y):
    """Compute gcd of two positive integers x and y"""
    if x < y:
        return compute_gcd(y, x)

    residual = x % y
    if residual == 0:
        return y
    if residual == 1:
        return 1
    return compute_gcd(y, residual)