t=NULL; i=j=k=0;
int i,j,k; #endif
int BN_mul(r,a,b,ctx)BIGNUM *r,*a,*b;BN_CTX *ctx;	{	int top,i,j,k,al,bl;	BIGNUM *t;	t=NULL;	i=j=k=0;#ifdef BN_COUNTprintf("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;#if defined(BN_MUL_COMBA) || defined(BN_RECURSION)	if (al == bl)		{#  ifdef BN_MUL_COMBA/*		if (al == 4)			{			if (bn_wexpand(r,8) == NULL) return(0);			r->top=8;			bn_mul_comba4(r->d,a->d,b->d);			goto end;			}		else */ if (al == 8)			{			if (bn_wexpand(r,16) == NULL) return(0);			r->top=16;			bn_mul_comba8(r->d,a->d,b->d);			goto end;			}		else#  endif#ifdef BN_RECURSION		if (al < BN_MULL_SIZE_NORMAL)#endif			{			if (bn_wexpand(r,top) == NULL) return(0);			r->top=top;			bn_mul_normal(r->d,a->d,al,b->d,bl);			goto end;			}#  ifdef BN_RECURSION		goto symetric;#  endif		}#endif#ifdef BN_RECURSION	else if ((al < BN_MULL_SIZE_NORMAL) || (bl < BN_MULL_SIZE_NORMAL))		{		if (bn_wexpand(r,top) == NULL) return(0);		r->top=top;		bn_mul_normal(r->d,a->d,al,b->d,bl);		goto end;		}	else		{		i=(al-bl);		if ((i ==  1) && !BN_get_flags(b,BN_FLG_STATIC_DATA))			{			bn_wexpand(b,al);			b->d[bl]=0;			bl++;			goto symetric;			}		else if ((i ==  -1) && !BN_get_flags(a,BN_FLG_STATIC_DATA))			{			bn_wexpand(a,bl);			a->d[al]=0;			al++;			goto symetric;			}		}#endif	/* asymetric and >= 4 */ 	if (bn_wexpand(r,top) == NULL) return(0);	r->top=top;	bn_mul_normal(r->d,a->d,al,b->d,bl);#ifdef BN_RECURSION	if (0)		{symetric:		/* symetric and > 4 */		/* 16 or larger */		j=BN_num_bits_word((BN_ULONG)al);		j=1<<(j-1);		k=j+j;		t= &(ctx->bn[ctx->tos]);		if (al == j) /* exact multiple */			{			bn_wexpand(t,k*2);			bn_wexpand(r,k*2);			bn_mul_recursive(r->d,a->d,b->d,al,t->d);			}		else			{			bn_wexpand(a,k);			bn_wexpand(b,k);			bn_wexpand(t,k*4);			bn_wexpand(r,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(r->d,a->d,b->d,al-j,j,t->d);			}		r->top=top;		}#endifend:	bn_fix_top(r);	return(1);	}