bn_check_top(r);
int BN_nist_mod_256(BIGNUM *r, const BIGNUM *a, const BIGNUM *field,	BN_CTX *ctx)	{#ifndef NO_32_BIT_TYPE	int	tmp_int;	int	carry = 0;	register BN_ULONG *a_d, *r_d;	BN_ULONG t_d[BN_NIST_256_TOP];	BN_ULONG t_d2[BN_NIST_256_TOP];	BN_32_BIT_BUF(8)  BN_32_BIT_BUF(9)	BN_32_BIT_BUF(10) BN_32_BIT_BUF(11)	BN_32_BIT_BUF(12) BN_32_BIT_BUF(13)	BN_32_BIT_BUF(14) BN_32_BIT_BUF(15)	if (!_is_set_256_data)		{		CRYPTO_w_lock(CRYPTO_LOCK_BN);				if (!_is_set_256_data)			_init_256_data();				CRYPTO_w_unlock(CRYPTO_LOCK_BN);		}		tmp_int = BN_ucmp(field, a);	if (tmp_int == 0)		return BN_zero(r);	else if (tmp_int > 0)		return (r == a)? 1 : (BN_copy(r ,a) != NULL);	if (r != a)		if (!BN_ncopy(r, a, BN_NIST_256_TOP))			return 0;	tmp_int = a->top-1;	a_d = a->d;	r_d = r->d;	switch (tmp_int)		{		BN_CASE_32_BIT(15, a_d)		BN_CASE_32_BIT(14, a_d)		BN_CASE_32_BIT(13, a_d)		BN_CASE_32_BIT(12, a_d)		BN_CASE_32_BIT(11, a_d)		BN_CASE_32_BIT(10, a_d)		BN_CASE_32_BIT(9,  a_d)		BN_CASE_32_BIT(8,  a_d)			break;		default: /* a->top == field->top */			return BN_usub(r, a, field);		}	/*S1*/	BN_256_SET(t_d,15,14,13,12,11,0,0,0)	/*S2*/	BN_256_SET(t_d2,0,15,14,13,12,0,0,0)	if (bn_add_words(t_d, t_d, t_d2, BN_NIST_256_TOP))		carry = 2;	/* left shift */		{		register BN_ULONG *ap,t,c;		ap = t_d;		c=0;		for (tmp_int=BN_NIST_256_TOP; tmp_int != 0; --tmp_int)			{			t= *ap;			*(ap++)=((t<<1)|c)&BN_MASK2;			c=(t & BN_TBIT)?1:0;			}		if (c)			++carry;		}	if (bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP))		++carry;	/*S3*/	BN_256_SET(t_d,15,14,0,0,0,10,9,8)	if (bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP))		++carry;	/*S4*/	BN_256_SET(t_d,8,13,15,14,13,11,10,9)	if (bn_add_words(r_d, r_d, t_d, BN_NIST_256_TOP))		++carry;	/*D1*/	BN_256_SET(t_d,10,8,0,0,0,13,12,11)	if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))		--carry;	/*D2*/	BN_256_SET(t_d,11,9,0,0,15,14,13,12)	if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))		--carry;	/*D3*/	BN_256_SET(t_d,12,0,10,9,8,15,14,13)	if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))		--carry;	/*D4*/	BN_256_SET(t_d,13,0,11,10,9,0,15,14)	if (bn_sub_words(r_d, r_d, t_d, BN_NIST_256_TOP))		--carry;		if (carry)		{		if (carry > 0)			bn_sub_words(r_d, r_d, _256_data + BN_NIST_256_TOP *				--carry, BN_NIST_256_TOP);		else			{			carry = -carry;			bn_add_words(r_d, r_d, _256_data + BN_NIST_256_TOP *				--carry, BN_NIST_256_TOP);			}		}	r->top = BN_NIST_256_TOP;#if 1	bn_clear_top2max(r);#endif	bn_fix_top(r);	if (BN_ucmp(r, field) >= 0)		{		bn_sub_words(r_d, r_d, _nist_p_256, BN_NIST_256_TOP);		bn_fix_top(r);		}	return 1;#else	return 0;#endif	}