static unsigned int BN_STACK_pop(BN_STACK *st)
{
    return st->indexes[--(st->depth)];
}
['int ec_GF2m_simple_is_on_curve(const EC_GROUP *group, const EC_POINT *point,\n                               BN_CTX *ctx)\n{\n    int ret = -1;\n    BN_CTX *new_ctx = NULL;\n    BIGNUM *lh, *y2;\n    int (*field_mul) (const EC_GROUP *, BIGNUM *, const BIGNUM *,\n                      const BIGNUM *, BN_CTX *);\n    int (*field_sqr) (const EC_GROUP *, BIGNUM *, const BIGNUM *, BN_CTX *);\n    if (EC_POINT_is_at_infinity(group, point))\n        return 1;\n    field_mul = group->meth->field_mul;\n    field_sqr = group->meth->field_sqr;\n    if (!point->Z_is_one)\n        return -1;\n    if (ctx == NULL) {\n        ctx = new_ctx = BN_CTX_new();\n        if (ctx == NULL)\n            return -1;\n    }\n    BN_CTX_start(ctx);\n    y2 = BN_CTX_get(ctx);\n    lh = BN_CTX_get(ctx);\n    if (lh == NULL)\n        goto err;\n    if (!BN_GF2m_add(lh, point->X, group->a))\n        goto err;\n    if (!field_mul(group, lh, lh, point->X, ctx))\n        goto err;\n    if (!BN_GF2m_add(lh, lh, point->Y))\n        goto err;\n    if (!field_mul(group, lh, lh, point->X, ctx))\n        goto err;\n    if (!BN_GF2m_add(lh, lh, group->b))\n        goto err;\n    if (!field_sqr(group, y2, point->Y, ctx))\n        goto err;\n    if (!BN_GF2m_add(lh, lh, y2))\n        goto err;\n    ret = BN_is_zero(lh);\n err:\n    BN_CTX_end(ctx);\n    BN_CTX_free(new_ctx);\n    return ret;\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}']