rr->neg=a->neg^b->neg;
int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BN_CTX *ctx)	{	int top,al,bl;	BIGNUM *rr;	int ret = 0;#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)	int i;#endif#ifdef BN_RECURSION	BIGNUM *t;	int j,k;#endif#ifdef BN_COUNT	printf("BN_mul %d * %d\n",a->top,b->top);#endif	bn_check_top(a);	bn_check_top(b);	bn_check_top(r);	al=a->top;	bl=b->top;	r->neg=a->neg^b->neg;	if ((al == 0) || (bl == 0))		{		BN_zero(r);		return(1);		}	top=al+bl;	BN_CTX_start(ctx);	if ((r == a) || (r == b))		{		if ((rr = BN_CTX_get(ctx)) == NULL) goto err;		}	else		rr = r;#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)	i = al-bl;#endif#ifdef BN_MUL_COMBA	if (i == 0)		{# if 0		if (al == 4)			{			if (bn_wexpand(rr,8) == NULL) goto err;			rr->top=8;			bn_mul_comba4(rr->d,a->d,b->d);			goto end;			}# endif		if (al == 8)			{			if (bn_wexpand(rr,16) == NULL) goto err;			rr->top=16;			bn_mul_comba8(rr->d,a->d,b->d);			goto end;			}		}#endif /* BN_MUL_COMBA */#ifdef BN_RECURSION	if ((al >= BN_MULL_SIZE_NORMAL) && (bl >= BN_MULL_SIZE_NORMAL))		{		if (i == 1 && !BN_get_flags(b,BN_FLG_STATIC_DATA))			{			bn_wexpand(b,al);			b->d[bl]=0;			bl++;			i--;			}		else if (i == -1 && !BN_get_flags(a,BN_FLG_STATIC_DATA))			{			bn_wexpand(a,bl);			a->d[al]=0;			al++;			i++;			}		if (i == 0)			{			/* symmetric and > 4 */			/* 16 or larger */			j=BN_num_bits_word((BN_ULONG)al);			j=1<<(j-1);			k=j+j;			t = BN_CTX_get(ctx);			if (al == j) /* exact multiple */				{				bn_wexpand(t,k*2);				bn_wexpand(rr,k*2);				bn_mul_recursive(rr->d,a->d,b->d,al,t->d);				}			else				{				bn_wexpand(a,k);				bn_wexpand(b,k);				bn_wexpand(t,k*4);				bn_wexpand(rr,k*4);				for (i=a->top; i<k; i++)					a->d[i]=0;				for (i=b->top; i<k; i++)					b->d[i]=0;				bn_mul_part_recursive(rr->d,a->d,b->d,al-j,j,t->d);				}			rr->top=top;			goto end;			}		}#endif /* BN_RECURSION */	if (bn_wexpand(rr,top) == NULL) goto err;	rr->top=top;	bn_mul_normal(rr->d,a->d,al,b->d,bl);#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)end:#endif	bn_fix_top(rr);	if (r != rr) BN_copy(r,rr);	ret=1;err:	BN_CTX_end(ctx);	return(ret);	}