static unsigned int BN_STACK_pop(BN_STACK *st)
{
    return st->indexes[--(st->depth)];
}
['int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,\n                                             BIGNUM *y)\n{\n    BN_CTX *ctx = NULL;\n    BIGNUM *tx, *ty;\n    EC_POINT *point = NULL;\n    int ok = 0;\n    if (key == NULL || key->group == NULL || x == NULL || y == NULL) {\n        ECerr(EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES,\n              ERR_R_PASSED_NULL_PARAMETER);\n        return 0;\n    }\n    ctx = BN_CTX_new();\n    if (ctx == NULL)\n        return 0;\n    BN_CTX_start(ctx);\n    point = EC_POINT_new(key->group);\n    if (point == NULL)\n        goto err;\n    tx = BN_CTX_get(ctx);\n    ty = BN_CTX_get(ctx);\n    if (ty == NULL)\n        goto err;\n    if (!EC_POINT_set_affine_coordinates(key->group, point, x, y, ctx))\n        goto err;\n    if (!EC_POINT_get_affine_coordinates(key->group, point, tx, ty, ctx))\n        goto err;\n    if (BN_cmp(x, tx) || BN_cmp(y, ty)\n        || (BN_cmp(x, key->group->field) >= 0)\n        || (BN_cmp(y, key->group->field) >= 0)) {\n        ECerr(EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES,\n              EC_R_COORDINATES_OUT_OF_RANGE);\n        goto err;\n    }\n    if (!EC_KEY_set_public_key(key, point))\n        goto err;\n    if (EC_KEY_check_key(key) == 0)\n        goto err;\n    ok = 1;\n err:\n    BN_CTX_end(ctx);\n    BN_CTX_free(ctx);\n    EC_POINT_free(point);\n    return ok;\n}', 'void BN_CTX_start(BN_CTX *ctx)\n{\n    CTXDBG("ENTER BN_CTX_start()", ctx);\n    if (ctx->err_stack || ctx->too_many)\n        ctx->err_stack++;\n    else if (!BN_STACK_push(&ctx->stack, ctx->used)) {\n        BNerr(BN_F_BN_CTX_START, BN_R_TOO_MANY_TEMPORARY_VARIABLES);\n        ctx->err_stack++;\n    }\n    CTXDBG("LEAVE BN_CTX_start()", ctx);\n}', 'void BN_CTX_end(BN_CTX *ctx)\n{\n    CTXDBG("ENTER BN_CTX_end()", ctx);\n    if (ctx->err_stack)\n        ctx->err_stack--;\n    else {\n        unsigned int fp = BN_STACK_pop(&ctx->stack);\n        if (fp < ctx->used)\n            BN_POOL_release(&ctx->pool, ctx->used - fp);\n        ctx->used = fp;\n        ctx->too_many = 0;\n    }\n    CTXDBG("LEAVE BN_CTX_end()", ctx);\n}', 'static unsigned int BN_STACK_pop(BN_STACK *st)\n{\n    return st->indexes[--(st->depth)];\n}']