static unsigned int BN_STACK_pop(BN_STACK *st)
{
    return st->indexes[--(st->depth)];
}
['int BN_GF2m_mod_sqrt_arr(BIGNUM *r, const BIGNUM *a, const int p[],\n                         BN_CTX *ctx)\n{\n    int ret = 0;\n    BIGNUM *u;\n    bn_check_top(a);\n    if (!p[0]) {\n        BN_zero(r);\n        return 1;\n    }\n    BN_CTX_start(ctx);\n    if ((u = BN_CTX_get(ctx)) == NULL)\n        goto err;\n    if (!BN_set_bit(u, p[0] - 1))\n        goto err;\n    ret = BN_GF2m_mod_exp_arr(r, a, u, p, ctx);\n    bn_check_top(r);\n err:\n    BN_CTX_end(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}']