bn_check_top(a);
static BIGNUM *euclid(BIGNUM *a, BIGNUM *b)	{	BIGNUM *t;	int shifts=0;	bn_check_top(a);	bn_check_top(b);	/* 0 <= b <= a */	while (!BN_is_zero(b))		{		/* 0 < b <= a */		if (BN_is_odd(a))			{			if (BN_is_odd(b))				{				if (!BN_sub(a,a,b)) goto err;				if (!BN_rshift1(a,a)) goto err;				if (BN_cmp(a,b) < 0)					{ t=a; a=b; b=t; }				}			else		/* a odd - b even */				{				if (!BN_rshift1(b,b)) goto err;				if (BN_cmp(a,b) < 0)					{ t=a; a=b; b=t; }				}			}		else			/* a is even */			{			if (BN_is_odd(b))				{				if (!BN_rshift1(a,a)) goto err;				if (BN_cmp(a,b) < 0)					{ t=a; a=b; b=t; }				}			else		/* a even - b even */				{				if (!BN_rshift1(a,a)) goto err;				if (!BN_rshift1(b,b)) goto err;				shifts++;				}			}		/* 0 <= b <= a */		}	if (shifts)		{		if (!BN_lshift(a,a,shifts)) goto err;		}	return(a);err:	return(NULL);	}