else tmp2_ = &b->Y;
int ec_GFp_simple_cmp(const EC_GROUP *group, const EC_POINT *a, const EC_POINT *b, BN_CTX *ctx)	{	/* return values:	 *  -1   error	 *   0   equal (in affine coordinates)	 *   1   not equal	 */	int (*field_mul)(const EC_GROUP *, BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *);	int (*field_sqr)(const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);	BN_CTX *new_ctx = NULL;	BIGNUM *tmp1, *tmp2, *Za23, *Zb23;	const BIGNUM *tmp1_, *tmp2_;	int ret = -1;		if (EC_POINT_is_at_infinity(group, a))		{		return EC_POINT_is_at_infinity(group, b) ? 0 : 1;		}		if (a->Z_is_one && b->Z_is_one)		{		return ((BN_cmp(&a->X, &b->X) == 0) && BN_cmp(&a->Y, &b->Y) == 0) ? 0 : 1;		}	field_mul = group->meth->field_mul;	field_sqr = group->meth->field_sqr;	if (ctx == NULL)		{		ctx = new_ctx = BN_CTX_new();		if (ctx == NULL)			return -1;		}	BN_CTX_start(ctx);	tmp1 = BN_CTX_get(ctx);	tmp2 = BN_CTX_get(ctx);	Za23 = BN_CTX_get(ctx);	Zb23 = BN_CTX_get(ctx);	if (Zb23 == NULL) goto end;	/* We have to decide whether	 *     (X_a/Z_a^2, Y_a/Z_a^3) = (X_b/Z_b^2, Y_b/Z_b^3),	 * or equivalently, whether	 *     (X_a*Z_b^2, Y_a*Z_b^3) = (X_b*Z_a^2, Y_b*Z_a^3).	 */	if (!b->Z_is_one)		{		if (!field_sqr(group, Zb23, &b->Z, ctx)) goto end;		if (!field_mul(group, tmp1, &a->X, Zb23, ctx)) goto end;		tmp1_ = tmp1;		}	else		tmp1_ = &a->X;	if (!a->Z_is_one)		{		if (!field_sqr(group, Za23, &a->Z, ctx)) goto end;		if (!field_mul(group, tmp2, &b->X, Za23, ctx)) goto end;		tmp2_ = tmp2;		}	else		tmp2_ = &b->X;		/* compare  X_a*Z_b^2  with  X_b*Z_a^2 */	if (BN_cmp(tmp1_, tmp2_) != 0)		{		ret = 1; /* points differ */		goto end;		}	if (!b->Z_is_one)		{		if (!field_mul(group, Zb23, Zb23, &b->Z, ctx)) goto end;		if (!field_mul(group, tmp1, &a->Y, Zb23, ctx)) goto end;		}	if (!a->Z_is_one)		{		if (!field_mul(group, Za23, Za23, &a->Z, ctx)) goto end;		if (!field_mul(group, tmp2, &b->Y, Za23, ctx)) goto end;		}	/* tmp1_ and tmp2_ are still ok */	/* compare  Y_a*Z_b^3  with  Y_b*Z_a^3 */	if (BN_cmp(tmp1_, tmp2_) != 0)		{		ret = 1; /* points differ */		goto end;		}	/* points are equal */	ret = 0; end:	BN_CTX_end(ctx);	if (new_ctx != NULL)		BN_CTX_free(new_ctx);	return ret;	}